chunk-0f3ff1fc.f422245a.js 2.4 MB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222
  1. (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-0f3ff1fc","chunk-e7e0bc78","chunk-58ff19f5","chunk-3edf0b24","chunk-2311d2e0","chunk-51d6ade7"],{"00fd":function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));n("14d9");var r=n("9f10"),i=n("81ea");class s extends r["a"]{constructor(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];super(e)}getTrimmedIndexes(){return Object(i["arrayReduce"])(this.getValues(),(e,t,n)=>(t&&e.push(n),e),[])}}},"010e":function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
  2. //! moment.js locale configuration
  3. var t=e.defineLocale("uz-latn",{months:"Yanvar_Fevral_Mart_Aprel_May_Iyun_Iyul_Avgust_Sentabr_Oktabr_Noyabr_Dekabr".split("_"),monthsShort:"Yan_Fev_Mar_Apr_May_Iyun_Iyul_Avg_Sen_Okt_Noy_Dek".split("_"),weekdays:"Yakshanba_Dushanba_Seshanba_Chorshanba_Payshanba_Juma_Shanba".split("_"),weekdaysShort:"Yak_Dush_Sesh_Chor_Pay_Jum_Shan".split("_"),weekdaysMin:"Ya_Du_Se_Cho_Pa_Ju_Sha".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"D MMMM YYYY, dddd HH:mm"},calendar:{sameDay:"[Bugun soat] LT [da]",nextDay:"[Ertaga] LT [da]",nextWeek:"dddd [kuni soat] LT [da]",lastDay:"[Kecha soat] LT [da]",lastWeek:"[O'tgan] dddd [kuni soat] LT [da]",sameElse:"L"},relativeTime:{future:"Yaqin %s ichida",past:"Bir necha %s oldin",s:"soniya",ss:"%d soniya",m:"bir daqiqa",mm:"%d daqiqa",h:"bir soat",hh:"%d soat",d:"bir kun",dd:"%d kun",M:"bir oy",MM:"%d oy",y:"bir yil",yy:"%d yil"},week:{dow:1,doy:7}});return t}))},"0283":function(e,t,n){"use strict";n.r(t),n.d(t,"CONTEXT_MENU_ITEMS_NAMESPACE",(function(){return r})),n.d(t,"CONTEXTMENU_ITEMS_NO_ITEMS",(function(){return s})),n.d(t,"CONTEXTMENU_ITEMS_ROW_ABOVE",(function(){return o})),n.d(t,"CONTEXTMENU_ITEMS_ROW_BELOW",(function(){return a})),n.d(t,"CONTEXTMENU_ITEMS_INSERT_LEFT",(function(){return l})),n.d(t,"CONTEXTMENU_ITEMS_INSERT_RIGHT",(function(){return c})),n.d(t,"CONTEXTMENU_ITEMS_REMOVE_ROW",(function(){return u})),n.d(t,"CONTEXTMENU_ITEMS_REMOVE_COLUMN",(function(){return h})),n.d(t,"CONTEXTMENU_ITEMS_UNDO",(function(){return d})),n.d(t,"CONTEXTMENU_ITEMS_REDO",(function(){return m})),n.d(t,"CONTEXTMENU_ITEMS_READ_ONLY",(function(){return g})),n.d(t,"CONTEXTMENU_ITEMS_CLEAR_COLUMN",(function(){return p})),n.d(t,"CONTEXTMENU_ITEMS_COPY",(function(){return f})),n.d(t,"CONTEXTMENU_ITEMS_COPY_WITH_COLUMN_HEADERS",(function(){return R})),n.d(t,"CONTEXTMENU_ITEMS_COPY_WITH_COLUMN_GROUP_HEADERS",(function(){return y})),n.d(t,"CONTEXTMENU_ITEMS_COPY_COLUMN_HEADERS_ONLY",(function(){return M})),n.d(t,"CONTEXTMENU_ITEMS_CUT",(function(){return S})),n.d(t,"CONTEXTMENU_ITEMS_FREEZE_COLUMN",(function(){return b})),n.d(t,"CONTEXTMENU_ITEMS_UNFREEZE_COLUMN",(function(){return w})),n.d(t,"CONTEXTMENU_ITEMS_MERGE_CELLS",(function(){return T})),n.d(t,"CONTEXTMENU_ITEMS_UNMERGE_CELLS",(function(){return O})),n.d(t,"CONTEXTMENU_ITEMS_ADD_COMMENT",(function(){return v})),n.d(t,"CONTEXTMENU_ITEMS_EDIT_COMMENT",(function(){return E})),n.d(t,"CONTEXTMENU_ITEMS_REMOVE_COMMENT",(function(){return C})),n.d(t,"CONTEXTMENU_ITEMS_READ_ONLY_COMMENT",(function(){return L})),n.d(t,"CONTEXTMENU_ITEMS_ALIGNMENT",(function(){return N})),n.d(t,"CONTEXTMENU_ITEMS_ALIGNMENT_LEFT",(function(){return _})),n.d(t,"CONTEXTMENU_ITEMS_ALIGNMENT_CENTER",(function(){return I})),n.d(t,"CONTEXTMENU_ITEMS_ALIGNMENT_RIGHT",(function(){return P})),n.d(t,"CONTEXTMENU_ITEMS_ALIGNMENT_JUSTIFY",(function(){return x})),n.d(t,"CONTEXTMENU_ITEMS_ALIGNMENT_TOP",(function(){return D})),n.d(t,"CONTEXTMENU_ITEMS_ALIGNMENT_MIDDLE",(function(){return A})),n.d(t,"CONTEXTMENU_ITEMS_ALIGNMENT_BOTTOM",(function(){return F})),n.d(t,"CONTEXTMENU_ITEMS_BORDERS",(function(){return Y})),n.d(t,"CONTEXTMENU_ITEMS_BORDERS_TOP",(function(){return H})),n.d(t,"CONTEXTMENU_ITEMS_BORDERS_RIGHT",(function(){return k})),n.d(t,"CONTEXTMENU_ITEMS_BORDERS_BOTTOM",(function(){return V})),n.d(t,"CONTEXTMENU_ITEMS_BORDERS_LEFT",(function(){return U})),n.d(t,"CONTEXTMENU_ITEMS_REMOVE_BORDERS",(function(){return W})),n.d(t,"CONTEXTMENU_ITEMS_NESTED_ROWS_INSERT_CHILD",(function(){return X})),n.d(t,"CONTEXTMENU_ITEMS_NESTED_ROWS_DETACH_CHILD",(function(){return j})),n.d(t,"CONTEXTMENU_ITEMS_HIDE_COLUMN",(function(){return Z})),n.d(t,"CONTEXTMENU_ITEMS_SHOW_COLUMN",(function(){return Q})),n.d(t,"CONTEXTMENU_ITEMS_HIDE_ROW",(function(){return K})),n.d(t,"CONTEXTMENU_ITEMS_SHOW_ROW",(function(){return G})),n.d(t,"FILTERS_NAMESPACE",(function(){return B})),n.d(t,"FILTERS_CONDITIONS_NAMESPACE",(function(){return J})),n.d(t,"FILTERS_CONDITIONS_NONE",(function(){return z})),n.d(t,"FILTERS_CONDITIONS_EMPTY",(function(){return $})),n.d(t,"FILTERS_CONDITIONS_NOT_EMPTY",(function(){return q})),n.d(t,"FILTERS_CONDITIONS_EQUAL",(function(){return ee})),n.d(t,"FILTERS_CONDITIONS_NOT_EQUAL",(function(){return te})),n.d(t,"FILTERS_CONDITIONS_BEGINS_WITH",(function(){return ne})),n.d(t,"FILTERS_CONDITIONS_ENDS_WITH",(function(){return re})),n.d(t,"FILTERS_CONDITIONS_CONTAINS",(function(){return ie})),n.d(t,"FILTERS_CONDITIONS_NOT_CONTAIN",(function(){return se})),n.d(t,"FILTERS_CONDITIONS_BY_VALUE",(function(){return oe})),n.d(t,"FILTERS_CONDITIONS_GREATER_THAN",(function(){return ae})),n.d(t,"FILTERS_CONDITIONS_GREATER_THAN_OR_EQUAL",(function(){return le})),n.d(t,"FILTERS_CONDITIONS_LESS_THAN",(function(){return ce})),n.d(t,"FILTERS_CONDITIONS_LESS_THAN_OR_EQUAL",(function(){return ue})),n.d(t,"FILTERS_CONDITIONS_BETWEEN",(function(){return he})),n.d(t,"FILTERS_CONDITIONS_NOT_BETWEEN",(function(){return de})),n.d(t,"FILTERS_CONDITIONS_AFTER",(function(){return me})),n.d(t,"FILTERS_CONDITIONS_BEFORE",(function(){return ge})),n.d(t,"FILTERS_CONDITIONS_TODAY",(function(){return pe})),n.d(t,"FILTERS_CONDITIONS_TOMORROW",(function(){return fe})),n.d(t,"FILTERS_CONDITIONS_YESTERDAY",(function(){return Re})),n.d(t,"FILTERS_DIVS_FILTER_BY_CONDITION",(function(){return ye})),n.d(t,"FILTERS_DIVS_FILTER_BY_VALUE",(function(){return Me})),n.d(t,"FILTERS_LABELS_CONJUNCTION",(function(){return Se})),n.d(t,"FILTERS_LABELS_DISJUNCTION",(function(){return be})),n.d(t,"FILTERS_VALUES_BLANK_CELLS",(function(){return we})),n.d(t,"FILTERS_BUTTONS_SELECT_ALL",(function(){return Te})),n.d(t,"FILTERS_BUTTONS_CLEAR",(function(){return Oe})),n.d(t,"FILTERS_BUTTONS_OK",(function(){return ve})),n.d(t,"FILTERS_BUTTONS_CANCEL",(function(){return Ee})),n.d(t,"FILTERS_BUTTONS_PLACEHOLDER_SEARCH",(function(){return Ce})),n.d(t,"FILTERS_BUTTONS_PLACEHOLDER_VALUE",(function(){return Le})),n.d(t,"FILTERS_BUTTONS_PLACEHOLDER_SECOND_VALUE",(function(){return Ne})),n.d(t,"CHECKBOX_RENDERER_NAMESPACE",(function(){return _e})),n.d(t,"CHECKBOX_CHECKED",(function(){return Ie})),n.d(t,"CHECKBOX_UNCHECKED",(function(){return Pe}));const r="ContextMenu:items",i=r,s=i+".noItems",o=i+".insertRowAbove",a=i+".insertRowBelow",l=i+".insertColumnOnTheLeft",c=i+".insertColumnOnTheRight",u=i+".removeRow",h=i+".removeColumn",d=i+".undo",m=i+".redo",g=i+".readOnly",p=i+".clearColumn",f=i+".copy",R=i+".copyWithHeaders",y=i+".copyWithGroupHeaders",M=i+".copyHeadersOnly",S=i+".cut",b=i+".freezeColumn",w=i+".unfreezeColumn",T=i+".mergeCells",O=i+".unmergeCells",v=i+".addComment",E=i+".editComment",C=i+".removeComment",L=i+".readOnlyComment",N=i+".align",_=i+".align.left",I=i+".align.center",P=i+".align.right",x=i+".align.justify",D=i+".align.top",A=i+".align.middle",F=i+".align.bottom",Y=i+".borders",H=i+".borders.top",k=i+".borders.right",V=i+".borders.bottom",U=i+".borders.left",W=i+".borders.remove",X=i+".nestedHeaders.insertChildRow",j=i+".nestedHeaders.detachFromParent",Z=i+".hideColumn",Q=i+".showColumn",K=i+".hideRow",G=i+".showRow",B="Filters:",J=B+"conditions",z=J+".none",$=J+".isEmpty",q=J+".isNotEmpty",ee=J+".isEqualTo",te=J+".isNotEqualTo",ne=J+".beginsWith",re=J+".endsWith",ie=J+".contains",se=J+".doesNotContain",oe=J+".byValue",ae=J+".greaterThan",le=J+".greaterThanOrEqualTo",ce=J+".lessThan",ue=J+".lessThanOrEqualTo",he=J+".isBetween",de=J+".isNotBetween",me=J+".after",ge=J+".before",pe=J+".today",fe=J+".tomorrow",Re=J+".yesterday",ye=B+"labels.filterByCondition",Me=B+"labels.filterByValue",Se=B+"labels.conjunction",be=B+"labels.disjunction",we=B+"values.blankCells",Te=B+"buttons.selectAll",Oe=B+"buttons.clear",ve=B+"buttons.ok",Ee=B+"buttons.cancel",Ce=B+"buttons.placeholder.search",Le=B+"buttons.placeholder.value",Ne=B+"buttons.placeholder.secondValue",_e="CheckboxRenderer:",Ie=_e+"checked",Pe=_e+"unchecked"},"02fb":function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
  4. //! moment.js locale configuration
  5. var t=e.defineLocale("ml",{months:"ജനുവരി_ഫെബ്രുവരി_മാർച്ച്_ഏപ്രിൽ_മേയ്_ജൂൺ_ജൂലൈ_ഓഗസ്റ്റ്_സെപ്റ്റംബർ_ഒക്ടോബർ_നവംബർ_ഡിസംബർ".split("_"),monthsShort:"ജനു._ഫെബ്രു._മാർ._ഏപ്രി._മേയ്_ജൂൺ_ജൂലൈ._ഓഗ._സെപ്റ്റ._ഒക്ടോ._നവം._ഡിസം.".split("_"),monthsParseExact:!0,weekdays:"ഞായറാഴ്ച_തിങ്കളാഴ്ച_ചൊവ്വാഴ്ച_ബുധനാഴ്ച_വ്യാഴാഴ്ച_വെള്ളിയാഴ്ച_ശനിയാഴ്ച".split("_"),weekdaysShort:"ഞായർ_തിങ്കൾ_ചൊവ്വ_ബുധൻ_വ്യാഴം_വെള്ളി_ശനി".split("_"),weekdaysMin:"ഞാ_തി_ചൊ_ബു_വ്യാ_വെ_ശ".split("_"),longDateFormat:{LT:"A h:mm -നു",LTS:"A h:mm:ss -നു",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm -നു",LLLL:"dddd, D MMMM YYYY, A h:mm -നു"},calendar:{sameDay:"[ഇന്ന്] LT",nextDay:"[നാളെ] LT",nextWeek:"dddd, LT",lastDay:"[ഇന്നലെ] LT",lastWeek:"[കഴിഞ്ഞ] dddd, LT",sameElse:"L"},relativeTime:{future:"%s കഴിഞ്ഞ്",past:"%s മുൻപ്",s:"അൽപ നിമിഷങ്ങൾ",ss:"%d സെക്കൻഡ്",m:"ഒരു മിനിറ്റ്",mm:"%d മിനിറ്റ്",h:"ഒരു മണിക്കൂർ",hh:"%d മണിക്കൂർ",d:"ഒരു ദിവസം",dd:"%d ദിവസം",M:"ഒരു മാസം",MM:"%d മാസം",y:"ഒരു വർഷം",yy:"%d വർഷം"},meridiemParse:/രാത്രി|രാവിലെ|ഉച്ച കഴിഞ്ഞ്|വൈകുന്നേരം|രാത്രി/i,meridiemHour:function(e,t){return 12===e&&(e=0),"രാത്രി"===t&&e>=4||"ഉച്ച കഴിഞ്ഞ്"===t||"വൈകുന്നേരം"===t?e+12:e},meridiem:function(e,t,n){return e<4?"രാത്രി":e<12?"രാവിലെ":e<17?"ഉച്ച കഴിഞ്ഞ്":e<20?"വൈകുന്നേരം":"രാത്രി"}});return t}))},"0352":function(e,t,n){"use strict";n.d(t,"a",(function(){return w}));n("d9e2");var r=n("13e1"),i=n("87d6"),s=n("63d8"),o=n("5d7f"),a=n("ffec");function l(e,t,n){e.addEventListener(t,n,!1)}function c(e,t,n){e.removeEventListener(t,n,!1)}function u(e){return e.ownerDocument.defaultView.getComputedStyle(e)}function h(e){const t={minHeight:200,maxHeight:300,minWidth:100,maxWidth:300},n=e.body,r=e.createTextNode(""),i=e.createElement("span");let s;function o(){r.textContent=s.value,i.style.position="absolute",i.style.fontSize=u(s).fontSize,i.style.fontFamily=u(s).fontFamily,i.style.whiteSpace="pre",n.appendChild(i);const e=i.clientWidth+2;n.removeChild(i);const o=s.style;o.height=t.minHeight+"px",t.minWidth>e?o.width=t.minWidth+"px":e>t.maxWidth?o.width=t.maxWidth+"px":o.width=e+"px";const a=s.scrollHeight?s.scrollHeight-1:0;t.minHeight>a?o.height=t.minHeight+"px":t.maxHeight<a?(o.height=t.maxHeight+"px",o.overflowY="visible"):o.height=a+"px"}function a(){e.defaultView.setTimeout(o,0)}function h(e){if(e&&e.minHeight)if("inherit"===e.minHeight)t.minHeight=s.clientHeight;else{const n=parseInt(e.minHeight,10);isNaN(n)||(t.minHeight=n)}if(e&&e.maxHeight)if("inherit"===e.maxHeight)t.maxHeight=s.clientHeight;else{const n=parseInt(e.maxHeight,10);isNaN(n)||(t.maxHeight=n)}if(e&&e.minWidth)if("inherit"===e.minWidth)t.minWidth=s.clientWidth;else{const n=parseInt(e.minWidth,10);isNaN(n)||(t.minWidth=n)}if(e&&e.maxWidth)if("inherit"===e.maxWidth)t.maxWidth=s.clientWidth;else{const n=parseInt(e.maxWidth,10);isNaN(n)||(t.maxWidth=n)}i.firstChild||(i.className="autoResize",i.style.display="inline-block",i.appendChild(r))}function d(e,n){let r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];s=e,h(n),"TEXTAREA"===s.nodeName&&(s.style.resize="none",s.style.height=t.minHeight+"px",s.style.minWidth=t.minWidth+"px",s.style.maxWidth=t.maxWidth+"px",s.style.overflowY="hidden"),r&&(l(s,"input",o),l(s,"keydown",a)),o()}return{init:d,resize:o,unObserve(){c(s,"input",o),c(s,"keydown",a)}}}var d=n("7b9c");function m(e,t){const n=Object(o["getCaretPosition"])(t),r=t.value.split("\n");let i=n,s=0;for(let o=0;o<r.length;o++){const t=r[o];0!==o&&(s+=r[o-1].length+1);const a=s+t.length;if("home"===e?i=s:"end"===e&&(i=a),n<=a)break}Object(o["setCaretPosition"])(t,i)}var g=n("8828");function p(e,t,n){return(t=f(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function f(e){var t=R(e,"string");return"symbol"==typeof t?t:t+""}function R(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}const y="ht_editor_visible",M="ht_editor_hidden",S="textEditor",b="text";class w extends r["a"]{static get EDITOR_TYPE(){return b}constructor(e){super(e),p(this,"eventManager",new i["a"](this)),p(this,"autoResize",h(this.hot.rootDocument)),p(this,"TEXTAREA",void 0),p(this,"textareaStyle",void 0),p(this,"TEXTAREA_PARENT",void 0),p(this,"textareaParentStyle",void 0),p(this,"layerClass",void 0),this.eventManager=new i["a"](this),this.createElements(),this.bindEvents(),this.hot.addHookOnce("afterDestroy",()=>this.destroy())}getValue(){return this.TEXTAREA.value}setValue(e){this.TEXTAREA.value=e}open(){this.refreshDimensions(),this.showEditableElement(),this.hot.getShortcutManager().setActiveContextName("editor"),this.registerShortcuts()}close(){this.autoResize.unObserve(),Object(o["isThisHotChild"])(this.hot.rootDocument.activeElement,this.hot.rootElement)&&this.hot.listen(),this.hideEditableElement(),this.unregisterShortcuts()}prepare(e,t,n,i,s,o){const a=this.state;if(super.prepare(e,t,n,i,s,o),!o.readOnly){this.refreshDimensions(!0);const{allowInvalid:e}=o;e&&!this.isOpened()&&(this.TEXTAREA.value=""),a===r["b"].FINISHED||this.isOpened()||this.hideEditableElement()}}beginEditing(e,t){this.state===r["b"].VIRGIN&&(this.TEXTAREA.value="",super.beginEditing(e,t))}focus(){this.TEXTAREA.select(),Object(o["setCaretPosition"])(this.TEXTAREA,this.TEXTAREA.value.length)}createElements(){const{rootDocument:e}=this.hot;this.TEXTAREA=e.createElement("TEXTAREA"),Object(o["setAttribute"])(this.TEXTAREA,[["data-hot-input",""],Object(g["L"])(-1)]),Object(o["addClass"])(this.TEXTAREA,"handsontableInput"),this.textareaStyle=this.TEXTAREA.style,this.textareaStyle.width=0,this.textareaStyle.height=0,this.textareaStyle.overflowY="visible",this.TEXTAREA_PARENT=e.createElement("DIV"),Object(o["addClass"])(this.TEXTAREA_PARENT,"handsontableInputHolder"),Object(o["hasClass"])(this.TEXTAREA_PARENT,this.layerClass)&&Object(o["removeClass"])(this.TEXTAREA_PARENT,this.layerClass),Object(o["addClass"])(this.TEXTAREA_PARENT,M),this.textareaParentStyle=this.TEXTAREA_PARENT.style,this.TEXTAREA_PARENT.appendChild(this.TEXTAREA),this.hot.rootElement.appendChild(this.TEXTAREA_PARENT)}hideEditableElement(){Object(s["isEdge"])()&&(this.textareaStyle.textIndent="-99999px"),this.textareaStyle.overflowY="visible",this.textareaParentStyle.opacity="0",this.textareaParentStyle.height="1px",Object(o["removeClass"])(this.TEXTAREA_PARENT,this.layerClass),Object(o["addClass"])(this.TEXTAREA_PARENT,M)}showEditableElement(){this.textareaParentStyle.height="",this.textareaParentStyle.overflow="",this.textareaParentStyle.position="",this.textareaParentStyle[this.hot.isRtl()?"left":"right"]="auto",this.textareaParentStyle.opacity="1",this.textareaStyle.textIndent="";const e=this.TEXTAREA_PARENT.childNodes;let t=!1;Object(a["rangeEach"])(e.length-1,n=>{const r=e[n];if(Object(o["hasClass"])(r,"handsontableEditor"))return t=!0,!1}),Object(o["hasClass"])(this.TEXTAREA_PARENT,M)&&Object(o["removeClass"])(this.TEXTAREA_PARENT,M),t?(this.layerClass=y,Object(o["addClass"])(this.TEXTAREA_PARENT,this.layerClass)):(this.layerClass=this.getEditedCellsLayerClass(),Object(o["addClass"])(this.TEXTAREA_PARENT,this.layerClass))}refreshValue(){const e=this.hot.toPhysicalRow(this.row),t=this.hot.getSourceDataAtCell(e,this.col);this.originalValue=t,this.setValue(t),this.refreshDimensions()}refreshDimensions(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(this.state!==r["b"].EDITING&&!e)return;if(this.TD=this.getEditedCell(),!this.TD)return void(e||this.close());const{top:t,start:n,width:i,maxWidth:s,height:a,maxHeight:l}=this.getEditedCellRect();this.textareaParentStyle.top=t+"px",this.textareaParentStyle[this.hot.isRtl()?"right":"left"]=n+"px",this.showEditableElement();const c=Object(o["getComputedStyle"])(this.TD,this.hot.rootWindow);this.TEXTAREA.style.fontSize=c.fontSize,this.TEXTAREA.style.fontFamily=c.fontFamily,this.TEXTAREA.style.backgroundColor=this.TD.style.backgroundColor;const u=Object(o["getComputedStyle"])(this.TEXTAREA),h=parseInt(u.paddingLeft,10)+parseInt(u.paddingRight,10),d=parseInt(u.paddingTop,10)+parseInt(u.paddingBottom,10),m=i-h,g=a-d,p=s-h,f=l-d;this.autoResize.init(this.TEXTAREA,{minWidth:Math.min(m,p),minHeight:Math.min(g,f),maxWidth:p,maxHeight:f},!0)}bindEvents(){Object(s["isIOS"])()&&this.eventManager.addEventListener(this.TEXTAREA,"focusout",()=>this.finishEditing(!1)),this.addHook("afterScrollHorizontally",()=>this.refreshDimensions()),this.addHook("afterScrollVertically",()=>this.refreshDimensions()),this.addHook("afterColumnResize",()=>{this.refreshDimensions(),this.state===r["b"].EDITING&&this.focus()}),this.addHook("afterRowResize",()=>{this.refreshDimensions(),this.state===r["b"].EDITING&&this.focus()})}allowKeyEventPropagation(){}destroy(){this.eventManager.destroy(),this.clearHooks()}registerShortcuts(){const e=this.hot.getShortcutManager(),t=e.getContext("editor"),n={runOnlyIf:()=>Object(d["isDefined"])(this.hot.getSelected()),group:S},r=()=>{this.hot.rootDocument.execCommand("insertText",!1,"\n")};t.addShortcuts([{keys:[["Control","Enter"]],callback:()=>(r(),!1),runOnlyIf:e=>!this.hot.selection.isMultiple()&&!e.altKey},{keys:[["Meta","Enter"]],callback:()=>(r(),!1),runOnlyIf:()=>!this.hot.selection.isMultiple()},{keys:[["Alt","Enter"]],callback:()=>(r(),!1)},{keys:[["Home"]],callback:(e,t)=>{let[n]=t;m(n,this.TEXTAREA)}},{keys:[["End"]],callback:(e,t)=>{let[n]=t;m(n,this.TEXTAREA)}}],n)}unregisterShortcuts(){const e=this.hot.getShortcutManager(),t=e.getContext("editor");t.removeShortcutsByGroup(S)}}},"03ec":function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
  6. //! moment.js locale configuration
  7. var t=e.defineLocale("cv",{months:"кӑрлач_нарӑс_пуш_ака_май_ҫӗртме_утӑ_ҫурла_авӑн_юпа_чӳк_раштав".split("_"),monthsShort:"кӑр_нар_пуш_ака_май_ҫӗр_утӑ_ҫур_авн_юпа_чӳк_раш".split("_"),weekdays:"вырсарникун_тунтикун_ытларикун_юнкун_кӗҫнерникун_эрнекун_шӑматкун".split("_"),weekdaysShort:"выр_тун_ытл_юн_кӗҫ_эрн_шӑм".split("_"),weekdaysMin:"вр_тн_ыт_юн_кҫ_эр_шм".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD-MM-YYYY",LL:"YYYY [ҫулхи] MMMM [уйӑхӗн] D[-мӗшӗ]",LLL:"YYYY [ҫулхи] MMMM [уйӑхӗн] D[-мӗшӗ], HH:mm",LLLL:"dddd, YYYY [ҫулхи] MMMM [уйӑхӗн] D[-мӗшӗ], HH:mm"},calendar:{sameDay:"[Паян] LT [сехетре]",nextDay:"[Ыран] LT [сехетре]",lastDay:"[Ӗнер] LT [сехетре]",nextWeek:"[Ҫитес] dddd LT [сехетре]",lastWeek:"[Иртнӗ] dddd LT [сехетре]",sameElse:"L"},relativeTime:{future:function(e){var t=/сехет$/i.exec(e)?"рен":/ҫул$/i.exec(e)?"тан":"ран";return e+t},past:"%s каялла",s:"пӗр-ик ҫеккунт",ss:"%d ҫеккунт",m:"пӗр минут",mm:"%d минут",h:"пӗр сехет",hh:"%d сехет",d:"пӗр кун",dd:"%d кун",M:"пӗр уйӑх",MM:"%d уйӑх",y:"пӗр ҫул",yy:"%d ҫул"},dayOfMonthOrdinalParse:/\d{1,2}-мӗш/,ordinal:"%d-мӗш",week:{dow:1,doy:7}});return t}))},"0402":function(e,t,n){"use strict";var r=n("23e7"),i=n("da84"),s=n("2cf4").set,o=n("20cc"),a=i.setImmediate?o(s,!1):s;r({global:!0,bind:!0,enumerable:!0,forced:i.setImmediate!==a},{setImmediate:a})},"0558":function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
  8. //! moment.js locale configuration
  9. function t(e){return e%100===11||e%10!==1}function n(e,n,r,i){var s=e+" ";switch(r){case"s":return n||i?"nokkrar sekúndur":"nokkrum sekúndum";case"ss":return t(e)?s+(n||i?"sekúndur":"sekúndum"):s+"sekúnda";case"m":return n?"mínúta":"mínútu";case"mm":return t(e)?s+(n||i?"mínútur":"mínútum"):n?s+"mínúta":s+"mínútu";case"hh":return t(e)?s+(n||i?"klukkustundir":"klukkustundum"):s+"klukkustund";case"d":return n?"dagur":i?"dag":"degi";case"dd":return t(e)?n?s+"dagar":s+(i?"daga":"dögum"):n?s+"dagur":s+(i?"dag":"degi");case"M":return n?"mánuður":i?"mánuð":"mánuði";case"MM":return t(e)?n?s+"mánuðir":s+(i?"mánuði":"mánuðum"):n?s+"mánuður":s+(i?"mánuð":"mánuði");case"y":return n||i?"ár":"ári";case"yy":return t(e)?s+(n||i?"ár":"árum"):s+(n||i?"ár":"ári")}}var r=e.defineLocale("is",{months:"janúar_febrúar_mars_apríl_maí_júní_júlí_ágúst_september_október_nóvember_desember".split("_"),monthsShort:"jan_feb_mar_apr_maí_jún_júl_ágú_sep_okt_nóv_des".split("_"),weekdays:"sunnudagur_mánudagur_þriðjudagur_miðvikudagur_fimmtudagur_föstudagur_laugardagur".split("_"),weekdaysShort:"sun_mán_þri_mið_fim_fös_lau".split("_"),weekdaysMin:"Su_Má_Þr_Mi_Fi_Fö_La".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY [kl.] H:mm",LLLL:"dddd, D. MMMM YYYY [kl.] H:mm"},calendar:{sameDay:"[í dag kl.] LT",nextDay:"[á morgun kl.] LT",nextWeek:"dddd [kl.] LT",lastDay:"[í gær kl.] LT",lastWeek:"[síðasta] dddd [kl.] LT",sameElse:"L"},relativeTime:{future:"eftir %s",past:"fyrir %s síðan",s:n,ss:n,m:n,mm:n,h:"klukkustund",hh:n,d:n,dd:n,M:n,MM:n,y:n,yy:n},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}});return r}))},"0716":function(e,t,n){"use strict";n("d9e2");function r(e,t,n){i(e,t),t.set(e,n)}function i(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function s(e,t,n){return(t=o(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e){var t=a(e,"string");return"symbol"==typeof t?t:t+""}function a(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function l(e,t){return e.get(u(e,t))}function c(e,t,n){return e.set(u(e,t),n),n}function u(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}var h=new WeakMap;class d{constructor(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];s(this,"row",null),s(this,"col",null),r(this,h,!1),c(h,this,n),"undefined"!==typeof e&&"undefined"!==typeof t&&(this.row=e,this.col=t)}isValid(e){const{countRows:t,countCols:n,countRowHeaders:r,countColHeaders:i}={countRows:0,countCols:0,countRowHeaders:0,countColHeaders:0,...e};return!(!Number.isInteger(this.row)||!Number.isInteger(this.col))&&(!(this.row<-i||this.col<-r)&&!(this.row>=t||this.col>=n))}isEqual(e){return e===this||this.row===e.row&&this.col===e.col}isHeader(){return!this.isCell()}isCell(){return this.row>=0&&this.col>=0}isRtl(){return l(h,this)}isSouthEastOf(e){return this.row>=e.row&&(l(h,this)?this.col<=e.col:this.col>=e.col)}isNorthWestOf(e){return this.row<=e.row&&(l(h,this)?this.col>=e.col:this.col<=e.col)}isSouthWestOf(e){return this.row>=e.row&&(l(h,this)?this.col>=e.col:this.col<=e.col)}isNorthEastOf(e){return this.row<=e.row&&(l(h,this)?this.col<=e.col:this.col>=e.col)}normalize(){return this.row=null===this.row?this.row:Math.max(this.row,0),this.col=null===this.col?this.col:Math.max(this.col,0),this}assign(e){return Number.isInteger(null===e||void 0===e?void 0:e.row)&&(this.row=e.row),Number.isInteger(null===e||void 0===e?void 0:e.col)&&(this.col=e.col),e instanceof d&&c(h,this,e.isRtl()),this}clone(){return new d(this.row,this.col,l(h,this))}toObject(){return{row:this.row,col:this.col}}}t["a"]=d},"0721":function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
  10. //! moment.js locale configuration
  11. var t=e.defineLocale("fo",{months:"januar_februar_mars_apríl_mai_juni_juli_august_september_oktober_november_desember".split("_"),monthsShort:"jan_feb_mar_apr_mai_jun_jul_aug_sep_okt_nov_des".split("_"),weekdays:"sunnudagur_mánadagur_týsdagur_mikudagur_hósdagur_fríggjadagur_leygardagur".split("_"),weekdaysShort:"sun_mán_týs_mik_hós_frí_ley".split("_"),weekdaysMin:"su_má_tý_mi_hó_fr_le".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D. MMMM, YYYY HH:mm"},calendar:{sameDay:"[Í dag kl.] LT",nextDay:"[Í morgin kl.] LT",nextWeek:"dddd [kl.] LT",lastDay:"[Í gjár kl.] LT",lastWeek:"[síðstu] dddd [kl] LT",sameElse:"L"},relativeTime:{future:"um %s",past:"%s síðani",s:"fá sekund",ss:"%d sekundir",m:"ein minuttur",mm:"%d minuttir",h:"ein tími",hh:"%d tímar",d:"ein dagur",dd:"%d dagar",M:"ein mánaður",MM:"%d mánaðir",y:"eitt ár",yy:"%d ár"},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}});return t}))},"079e":function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
  12. //! moment.js locale configuration
  13. var t=e.defineLocale("ja",{eras:[{since:"2019-05-01",offset:1,name:"令和",narrow:"㋿",abbr:"R"},{since:"1989-01-08",until:"2019-04-30",offset:1,name:"平成",narrow:"㍻",abbr:"H"},{since:"1926-12-25",until:"1989-01-07",offset:1,name:"昭和",narrow:"㍼",abbr:"S"},{since:"1912-07-30",until:"1926-12-24",offset:1,name:"大正",narrow:"㍽",abbr:"T"},{since:"1873-01-01",until:"1912-07-29",offset:6,name:"明治",narrow:"㍾",abbr:"M"},{since:"0001-01-01",until:"1873-12-31",offset:1,name:"西暦",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"紀元前",narrow:"BC",abbr:"BC"}],eraYearOrdinalRegex:/(元|\d+)年/,eraYearOrdinalParse:function(e,t){return"元"===t[1]?1:parseInt(t[1]||e,10)},months:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),weekdays:"日曜日_月曜日_火曜日_水曜日_木曜日_金曜日_土曜日".split("_"),weekdaysShort:"日_月_火_水_木_金_土".split("_"),weekdaysMin:"日_月_火_水_木_金_土".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY/MM/DD",LL:"YYYY年M月D日",LLL:"YYYY年M月D日 HH:mm",LLLL:"YYYY年M月D日 dddd HH:mm",l:"YYYY/MM/DD",ll:"YYYY年M月D日",lll:"YYYY年M月D日 HH:mm",llll:"YYYY年M月D日(ddd) HH:mm"},meridiemParse:/午前|午後/i,isPM:function(e){return"午後"===e},meridiem:function(e,t,n){return e<12?"午前":"午後"},calendar:{sameDay:"[今日] LT",nextDay:"[明日] LT",nextWeek:function(e){return e.week()!==this.week()?"[来週]dddd LT":"dddd LT"},lastDay:"[昨日] LT",lastWeek:function(e){return this.week()!==e.week()?"[先週]dddd LT":"dddd LT"},sameElse:"L"},dayOfMonthOrdinalParse:/\d{1,2}日/,ordinal:function(e,t){switch(t){case"y":return 1===e?"元年":e+"年";case"d":case"D":case"DDD":return e+"日";default:return e}},relativeTime:{future:"%s後",past:"%s前",s:"数秒",ss:"%d秒",m:"1分",mm:"%d分",h:"1時間",hh:"%d時間",d:"1日",dd:"%d日",M:"1ヶ月",MM:"%dヶ月",y:"1年",yy:"%d年"}});return t}))},"07ac":function(e,t,n){"use strict";var r=n("23e7"),i=n("6f53").values;r({target:"Object",stat:!0},{values:function(e){return i(e)}})},"0a3c":function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
  14. //! moment.js locale configuration
  15. var t="ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.".split("_"),n="ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic".split("_"),r=[/^ene/i,/^feb/i,/^mar/i,/^abr/i,/^may/i,/^jun/i,/^jul/i,/^ago/i,/^sep/i,/^oct/i,/^nov/i,/^dic/i],i=/^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre|ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i,s=e.defineLocale("es-do",{months:"enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre".split("_"),monthsShort:function(e,r){return e?/-MMM-/.test(r)?n[e.month()]:t[e.month()]:t},monthsRegex:i,monthsShortRegex:i,monthsStrictRegex:/^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i,monthsShortStrictRegex:/^(ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i,monthsParse:r,longMonthsParse:r,shortMonthsParse:r,weekdays:"domingo_lunes_martes_miércoles_jueves_viernes_sábado".split("_"),weekdaysShort:"dom._lun._mar._mié._jue._vie._sáb.".split("_"),weekdaysMin:"do_lu_ma_mi_ju_vi_sá".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"DD/MM/YYYY",LL:"D [de] MMMM [de] YYYY",LLL:"D [de] MMMM [de] YYYY h:mm A",LLLL:"dddd, D [de] MMMM [de] YYYY h:mm A"},calendar:{sameDay:function(){return"[hoy a la"+(1!==this.hours()?"s":"")+"] LT"},nextDay:function(){return"[mañana a la"+(1!==this.hours()?"s":"")+"] LT"},nextWeek:function(){return"dddd [a la"+(1!==this.hours()?"s":"")+"] LT"},lastDay:function(){return"[ayer a la"+(1!==this.hours()?"s":"")+"] LT"},lastWeek:function(){return"[el] dddd [pasado a la"+(1!==this.hours()?"s":"")+"] LT"},sameElse:"L"},relativeTime:{future:"en %s",past:"hace %s",s:"unos segundos",ss:"%d segundos",m:"un minuto",mm:"%d minutos",h:"una hora",hh:"%d horas",d:"un día",dd:"%d días",w:"una semana",ww:"%d semanas",M:"un mes",MM:"%d meses",y:"un año",yy:"%d años"},dayOfMonthOrdinalParse:/\d{1,2}º/,ordinal:"%dº",week:{dow:1,doy:4}});return s}))},"0a84":function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
  16. //! moment.js locale configuration
  17. var t=e.defineLocale("ar-ma",{months:"يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر".split("_"),monthsShort:"يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر".split("_"),weekdays:"الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت".split("_"),weekdaysShort:"احد_اثنين_ثلاثاء_اربعاء_خميس_جمعة_سبت".split("_"),weekdaysMin:"ح_ن_ث_ر_خ_ج_س".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[اليوم على الساعة] LT",nextDay:"[غدا على الساعة] LT",nextWeek:"dddd [على الساعة] LT",lastDay:"[أمس على الساعة] LT",lastWeek:"dddd [على الساعة] LT",sameElse:"L"},relativeTime:{future:"في %s",past:"منذ %s",s:"ثوان",ss:"%d ثانية",m:"دقيقة",mm:"%d دقائق",h:"ساعة",hh:"%d ساعات",d:"يوم",dd:"%d أيام",M:"شهر",MM:"%d أشهر",y:"سنة",yy:"%d سنوات"},week:{dow:1,doy:4}});return t}))},"0caa":function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
  18. //! moment.js locale configuration
  19. function t(e,t,n,r){var i={s:["thoddea sekondamni","thodde sekond"],ss:[e+" sekondamni",e+" sekond"],m:["eka mintan","ek minut"],mm:[e+" mintamni",e+" mintam"],h:["eka voran","ek vor"],hh:[e+" voramni",e+" voram"],d:["eka disan","ek dis"],dd:[e+" disamni",e+" dis"],M:["eka mhoinean","ek mhoino"],MM:[e+" mhoineamni",e+" mhoine"],y:["eka vorsan","ek voros"],yy:[e+" vorsamni",e+" vorsam"]};return r?i[n][0]:i[n][1]}var n=e.defineLocale("gom-latn",{months:{standalone:"Janer_Febrer_Mars_Abril_Mai_Jun_Julai_Agost_Setembr_Otubr_Novembr_Dezembr".split("_"),format:"Janerachea_Febrerachea_Marsachea_Abrilachea_Maiachea_Junachea_Julaiachea_Agostachea_Setembrachea_Otubrachea_Novembrachea_Dezembrachea".split("_"),isFormat:/MMMM(\s)+D[oD]?/},monthsShort:"Jan._Feb._Mars_Abr._Mai_Jun_Jul._Ago._Set._Otu._Nov._Dez.".split("_"),monthsParseExact:!0,weekdays:"Aitar_Somar_Mongllar_Budhvar_Birestar_Sukrar_Son'var".split("_"),weekdaysShort:"Ait._Som._Mon._Bud._Bre._Suk._Son.".split("_"),weekdaysMin:"Ai_Sm_Mo_Bu_Br_Su_Sn".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"A h:mm [vazta]",LTS:"A h:mm:ss [vazta]",L:"DD-MM-YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY A h:mm [vazta]",LLLL:"dddd, MMMM Do, YYYY, A h:mm [vazta]",llll:"ddd, D MMM YYYY, A h:mm [vazta]"},calendar:{sameDay:"[Aiz] LT",nextDay:"[Faleam] LT",nextWeek:"[Fuddlo] dddd[,] LT",lastDay:"[Kal] LT",lastWeek:"[Fattlo] dddd[,] LT",sameElse:"L"},relativeTime:{future:"%s",past:"%s adim",s:t,ss:t,m:t,mm:t,h:t,hh:t,d:t,dd:t,M:t,MM:t,y:t,yy:t},dayOfMonthOrdinalParse:/\d{1,2}(er)/,ordinal:function(e,t){switch(t){case"D":return e+"er";default:case"M":case"Q":case"DDD":case"d":case"w":case"W":return e}},week:{dow:0,doy:3},meridiemParse:/rati|sokallim|donparam|sanje/,meridiemHour:function(e,t){return 12===e&&(e=0),"rati"===t?e<4?e:e+12:"sokallim"===t?e:"donparam"===t?e>12?e:e+12:"sanje"===t?e+12:void 0},meridiem:function(e,t,n){return e<4?"rati":e<12?"sokallim":e<16?"donparam":e<20?"sanje":"rati"}});return n}))},"0e49":function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
  20. //! moment.js locale configuration
  21. var t=e.defineLocale("fr-ch",{months:"janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre".split("_"),monthsShort:"janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.".split("_"),monthsParseExact:!0,weekdays:"dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi".split("_"),weekdaysShort:"dim._lun._mar._mer._jeu._ven._sam.".split("_"),weekdaysMin:"di_lu_ma_me_je_ve_sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[Aujourd’hui à] LT",nextDay:"[Demain à] LT",nextWeek:"dddd [à] LT",lastDay:"[Hier à] LT",lastWeek:"dddd [dernier à] LT",sameElse:"L"},relativeTime:{future:"dans %s",past:"il y a %s",s:"quelques secondes",ss:"%d secondes",m:"une minute",mm:"%d minutes",h:"une heure",hh:"%d heures",d:"un jour",dd:"%d jours",M:"un mois",MM:"%d mois",y:"un an",yy:"%d ans"},dayOfMonthOrdinalParse:/\d{1,2}(er|e)/,ordinal:function(e,t){switch(t){default:case"M":case"Q":case"D":case"DDD":case"d":return e+(1===e?"er":"e");case"w":case"W":return e+(1===e?"re":"e")}},week:{dow:1,doy:4}});return t}))},"0e6b":function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
  22. //! moment.js locale configuration
  23. var t=e.defineLocale("en-au",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY h:mm A",LLLL:"dddd, D MMMM YYYY h:mm A"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(e){var t=e%10,n=1===~~(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th";return e+n},week:{dow:0,doy:4}});return t}))},"0e81":function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
  24. //! moment.js locale configuration
  25. var t={1:"'inci",5:"'inci",8:"'inci",70:"'inci",80:"'inci",2:"'nci",7:"'nci",20:"'nci",50:"'nci",3:"'üncü",4:"'üncü",100:"'üncü",6:"'ncı",9:"'uncu",10:"'uncu",30:"'uncu",60:"'ıncı",90:"'ıncı"},n=e.defineLocale("tr",{months:"Ocak_Şubat_Mart_Nisan_Mayıs_Haziran_Temmuz_Ağustos_Eylül_Ekim_Kasım_Aralık".split("_"),monthsShort:"Oca_Şub_Mar_Nis_May_Haz_Tem_Ağu_Eyl_Eki_Kas_Ara".split("_"),weekdays:"Pazar_Pazartesi_Salı_Çarşamba_Perşembe_Cuma_Cumartesi".split("_"),weekdaysShort:"Paz_Pzt_Sal_Çar_Per_Cum_Cmt".split("_"),weekdaysMin:"Pz_Pt_Sa_Ça_Pe_Cu_Ct".split("_"),meridiem:function(e,t,n){return e<12?n?"öö":"ÖÖ":n?"ös":"ÖS"},meridiemParse:/öö|ÖÖ|ös|ÖS/,isPM:function(e){return"ös"===e||"ÖS"===e},longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[bugün saat] LT",nextDay:"[yarın saat] LT",nextWeek:"[gelecek] dddd [saat] LT",lastDay:"[dün] LT",lastWeek:"[geçen] dddd [saat] LT",sameElse:"L"},relativeTime:{future:"%s sonra",past:"%s önce",s:"birkaç saniye",ss:"%d saniye",m:"bir dakika",mm:"%d dakika",h:"bir saat",hh:"%d saat",d:"bir gün",dd:"%d gün",w:"bir hafta",ww:"%d hafta",M:"bir ay",MM:"%d ay",y:"bir yıl",yy:"%d yıl"},ordinal:function(e,n){switch(n){case"d":case"D":case"Do":case"DD":return e;default:if(0===e)return e+"'ıncı";var r=e%10,i=e%100-r,s=e>=100?100:null;return e+(t[r]||t[i]||t[s])}},week:{dow:1,doy:7}});return n}))},"0f14":function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
  26. //! moment.js locale configuration
  27. var t=e.defineLocale("da",{months:"januar_februar_marts_april_maj_juni_juli_august_september_oktober_november_december".split("_"),monthsShort:"jan_feb_mar_apr_maj_jun_jul_aug_sep_okt_nov_dec".split("_"),weekdays:"søndag_mandag_tirsdag_onsdag_torsdag_fredag_lørdag".split("_"),weekdaysShort:"søn_man_tir_ons_tor_fre_lør".split("_"),weekdaysMin:"sø_ma_ti_on_to_fr_lø".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY HH:mm",LLLL:"dddd [d.] D. MMMM YYYY [kl.] HH:mm"},calendar:{sameDay:"[i dag kl.] LT",nextDay:"[i morgen kl.] LT",nextWeek:"på dddd [kl.] LT",lastDay:"[i går kl.] LT",lastWeek:"[i] dddd[s kl.] LT",sameElse:"L"},relativeTime:{future:"om %s",past:"%s siden",s:"få sekunder",ss:"%d sekunder",m:"et minut",mm:"%d minutter",h:"en time",hh:"%d timer",d:"en dag",dd:"%d dage",M:"en måned",MM:"%d måneder",y:"et år",yy:"%d år"},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}});return t}))},"0f38":function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
  28. //! moment.js locale configuration
  29. var t=e.defineLocale("tl-ph",{months:"Enero_Pebrero_Marso_Abril_Mayo_Hunyo_Hulyo_Agosto_Setyembre_Oktubre_Nobyembre_Disyembre".split("_"),monthsShort:"Ene_Peb_Mar_Abr_May_Hun_Hul_Ago_Set_Okt_Nob_Dis".split("_"),weekdays:"Linggo_Lunes_Martes_Miyerkules_Huwebes_Biyernes_Sabado".split("_"),weekdaysShort:"Lin_Lun_Mar_Miy_Huw_Biy_Sab".split("_"),weekdaysMin:"Li_Lu_Ma_Mi_Hu_Bi_Sab".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"MM/D/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY HH:mm",LLLL:"dddd, MMMM DD, YYYY HH:mm"},calendar:{sameDay:"LT [ngayong araw]",nextDay:"[Bukas ng] LT",nextWeek:"LT [sa susunod na] dddd",lastDay:"LT [kahapon]",lastWeek:"LT [noong nakaraang] dddd",sameElse:"L"},relativeTime:{future:"sa loob ng %s",past:"%s ang nakalipas",s:"ilang segundo",ss:"%d segundo",m:"isang minuto",mm:"%d minuto",h:"isang oras",hh:"%d oras",d:"isang araw",dd:"%d araw",M:"isang buwan",MM:"%d buwan",y:"isang taon",yy:"%d taon"},dayOfMonthOrdinalParse:/\d{1,2}/,ordinal:function(e){return e},week:{dow:1,doy:4}});return t}))},"0fe1":function(e,t,n){"use strict";n.r(t);var r=n("96c7"),i=n("c7cc");for(var s in i)["default"].indexOf(s)<0&&function(e){n.d(t,e,(function(){return i[e]}))}(s);n("8127");var o=n("2877"),a=Object(o["a"])(i["default"],r["a"],r["b"],!1,null,null,null);t["default"]=a.exports},"0ff2":function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
  30. //! moment.js locale configuration
  31. var t=e.defineLocale("eu",{months:"urtarrila_otsaila_martxoa_apirila_maiatza_ekaina_uztaila_abuztua_iraila_urria_azaroa_abendua".split("_"),monthsShort:"urt._ots._mar._api._mai._eka._uzt._abu._ira._urr._aza._abe.".split("_"),monthsParseExact:!0,weekdays:"igandea_astelehena_asteartea_asteazkena_osteguna_ostirala_larunbata".split("_"),weekdaysShort:"ig._al._ar._az._og._ol._lr.".split("_"),weekdaysMin:"ig_al_ar_az_og_ol_lr".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY-MM-DD",LL:"YYYY[ko] MMMM[ren] D[a]",LLL:"YYYY[ko] MMMM[ren] D[a] HH:mm",LLLL:"dddd, YYYY[ko] MMMM[ren] D[a] HH:mm",l:"YYYY-M-D",ll:"YYYY[ko] MMM D[a]",lll:"YYYY[ko] MMM D[a] HH:mm",llll:"ddd, YYYY[ko] MMM D[a] HH:mm"},calendar:{sameDay:"[gaur] LT[etan]",nextDay:"[bihar] LT[etan]",nextWeek:"dddd LT[etan]",lastDay:"[atzo] LT[etan]",lastWeek:"[aurreko] dddd LT[etan]",sameElse:"L"},relativeTime:{future:"%s barru",past:"duela %s",s:"segundo batzuk",ss:"%d segundo",m:"minutu bat",mm:"%d minutu",h:"ordu bat",hh:"%d ordu",d:"egun bat",dd:"%d egun",M:"hilabete bat",MM:"%d hilabete",y:"urte bat",yy:"%d urte"},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:7}});return t}))},1004:function(e,t,n){"use strict";n("d9e2"),n("14d9"),n("73d9");var r=n("81ea"),i=n("351d"),s=n("29b0"),o=n("bd5e"),a=n("67a8"),l=n("97b9");function c(e,t,n){return(t=u(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function u(e){var t=h(e,"string");return"symbol"==typeof t?t:t+""}function h(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}const d=["afterCellMetaReset","afterChange","afterContextMenuDefaultOptions","beforeContextMenuSetItems","afterDropdownMenuDefaultOptions","beforeDropdownMenuSetItems","afterContextMenuHide","beforeContextMenuShow","afterContextMenuShow","afterCopyLimit","beforeCreateCol","afterColumnSequenceChange","afterCreateCol","beforeCreateRow","afterCreateRow","afterDeselect","afterDestroy","afterDocumentKeyDown","afterDrawSelection","beforeRemoveCellClassNames","afterGetCellMeta","afterGetColHeader","afterGetRowHeader","afterInit","afterLoadData","afterUpdateData","afterMomentumScroll","afterOnCellCornerMouseDown","afterOnCellCornerDblClick","afterOnCellMouseDown","afterOnCellMouseUp","afterOnCellContextMenu","afterOnCellMouseOver","afterOnCellMouseOut","afterRemoveCol","afterRemoveRow","beforeRenderer","afterRenderer","afterRowSequenceChange","beforeViewportScrollVertically","beforeViewportScrollHorizontally","beforeViewportScroll","afterScrollHorizontally","afterScrollVertically","afterScroll","afterSelection","afterSelectionByProp","afterSelectionEnd","afterSelectionEndByProp","afterSelectionFocusSet","beforeSelectColumns","afterSelectColumns","beforeSelectRows","afterSelectRows","afterSetCellMeta","afterRemoveCellMeta","afterSetDataAtCell","afterSetDataAtRowProp","afterSetSourceDataAtCell","afterUpdateSettings","afterValidate","beforeLanguageChange","afterLanguageChange","beforeAutofill","afterAutofill","beforeCellAlignment","beforeChange","beforeChangeRender","beforeDrawBorders","beforeGetCellMeta","beforeRemoveCellMeta","beforeInit","beforeInitWalkontable","beforeLoadData","beforeUpdateData","beforeKeyDown","beforeOnCellMouseDown","beforeOnCellMouseUp","beforeOnCellContextMenu","beforeOnCellMouseOver","beforeOnCellMouseOut","beforeRemoveCol","beforeRemoveRow","beforeViewRender","afterViewRender","beforeRender","afterRender","beforeRowWrap","beforeColumnWrap","beforeSetCellMeta","beforeSelectionFocusSet","beforeSetRangeStartOnly","beforeSetRangeStart","beforeSetRangeEnd","beforeSelectionHighlightSet","beforeTouchScroll","beforeValidate","beforeValueRender","construct","init","modifyColHeader","modifyColWidth","modifyFiltersMultiSelectValue","modifyFocusedElement","modifyRowHeader","modifyRowHeight","modifyRowHeightByOverlayName","modifyData","modifySourceData","modifyRowData","modifyGetCellCoords","modifyFocusOnTabNavigation","beforeHighlightingRowHeader","beforeHighlightingColumnHeader","persistentStateLoad","persistentStateReset","persistentStateSave","beforeColumnSort","afterColumnSort","modifyAutofillRange","modifyCopyableRange","beforeCut","afterCut","beforeCopy","afterCopy","beforePaste","afterPaste","beforeColumnFreeze","afterColumnFreeze","beforeColumnMove","afterColumnMove","beforeColumnUnfreeze","afterColumnUnfreeze","beforeRowMove","afterRowMove","beforeColumnResize","afterColumnResize","beforeRowResize","afterRowResize","afterGetColumnHeaderRenderers","afterGetRowHeaderRenderers","beforeStretchingColumnWidth","beforeFilter","afterFilter","afterFormulasValuesUpdate","afterNamedExpressionAdded","afterNamedExpressionRemoved","afterSheetAdded","afterSheetRenamed","afterSheetRemoved","modifyColumnHeaderHeight","modifyColumnHeaderValue","beforeUndo","beforeUndoStackChange","afterUndo","afterUndoStackChange","beforeRedo","beforeRedoStackChange","afterRedo","afterRedoStackChange","modifyRowHeaderWidth","modifyTransformFocus","modifyTransformStart","modifyTransformEnd","afterModifyTransformFocus","afterModifyTransformStart","afterModifyTransformEnd","afterViewportRowCalculatorOverride","afterViewportColumnCalculatorOverride","afterPluginsInitialized","beforeHideRows","afterHideRows","beforeUnhideRows","afterUnhideRows","beforeHideColumns","afterHideColumns","beforeUnhideColumns","afterUnhideColumns","beforeTrimRow","afterTrimRow","beforeUntrimRow","afterUntrimRow","beforeDropdownMenuShow","afterDropdownMenuShow","afterDropdownMenuHide","beforeAddChild","afterAddChild","beforeDetachChild","afterDetachChild","beforeBeginEditing","afterBeginEditing","beforeMergeCells","afterMergeCells","beforeUnmergeCells","afterUnmergeCells","afterListen","afterUnlisten","afterRefreshDimensions","beforeRefreshDimensions","beforeColumnCollapse","afterColumnCollapse","beforeColumnExpand","afterColumnExpand","modifyAutoColumnSizeSeed"],m=a["a"]`The plugin hook "[hookName]" was removed in Handsontable [removedInVersion].\x20
  32. Please consult release notes https://github.com/handsontable/handsontable/releases/tag/[removedInVersion] to\x20
  33. learn about the migration path.`,g=new Map([["modifyRow","8.0.0"],["modifyCol","8.0.0"],["unmodifyRow","8.0.0"],["unmodifyCol","8.0.0"],["skipLengthCache","8.0.0"],["hiddenColumn","8.0.0"],["hiddenRow","8.0.0"]]),p=new Map([[]]),f=new WeakMap;class R{static getSingleton(){return M()}constructor(){c(this,"globalBucket",void 0),this.globalBucket=this.createEmptyBucket()}createEmptyBucket(){const e=Object.create(null);return Object(r["arrayEach"])(d,t=>{e[t]=[],this.initOrderMap(e,t)}),e}getBucket(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return e?(e.pluginHookBucket||(e.pluginHookBucket=this.createEmptyBucket()),e.pluginHookBucket):this.globalBucket}add(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,i=arguments.length>3?arguments[3]:void 0;if(Array.isArray(t))Object(r["arrayEach"])(t,t=>this.add(e,t,n));else{g.has(e)&&Object(o["b"])(Object(s["substitute"])(m,{hookName:e,removedInVersion:g.get(e)})),p.has(e)&&Object(o["b"])(p.get(e));const a=this.getBucket(n);if("undefined"===typeof a[e]&&(this.register(e),a[e]=[],this.initOrderMap(a,e)),t.skip=!1,-1===a[e].indexOf(t)){let n=!1;t.initialHook&&Object(r["arrayEach"])(a[e],(r,i)=>{if(r.initialHook)return a[e][i]=t,n=!0,!1}),n||a[e].push(t)}this.setCallbackOrderIndex(a,e,t,i),this.orderBucketByOrderIndex(a,e)}return this}once(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,i=arguments.length>3?arguments[3]:void 0;Array.isArray(t)?Object(r["arrayEach"])(t,t=>this.once(e,t,n)):(t.runOnce=!0,this.add(e,t,n,i))}remove(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;const r=this.getBucket(n);return"undefined"!==typeof r[e]&&r[e].indexOf(t)>=0&&(t.skip=!0,!0)}has(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;const n=this.getBucket(t);return!(void 0===n[e]||!n[e].length)}run(e,t,n,r,i,s,o,a){{const c=this.globalBucket[t],u=c?c.length:0;let h=0;if(u)while(h<u){if(!c[h]||c[h].skip){h+=1;continue}const u=Object(l["fastCall"])(c[h],e,n,r,i,s,o,a);void 0!==u&&(n=u),c[h]&&c[h].runOnce&&this.remove(t,c[h]),h+=1}}{const c=this.getBucket(e)[t],u=c?c.length:0;let h=0;if(u)while(h<u){if(!c[h]||c[h].skip){h+=1;continue}const u=Object(l["fastCall"])(c[h],e,n,r,i,s,o,a);void 0!==u&&(n=u),c[h]&&c[h].runOnce&&this.remove(t,c[h],e),h+=1}}return n}destroy(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;Object(i["objectEach"])(this.getBucket(e),(e,t,n)=>n[t].length=0)}register(e){this.isRegistered(e)||d.push(e)}deregister(e){this.isRegistered(e)&&d.splice(d.indexOf(e),1)}isDeprecated(e){return p.has(e)||g.has(e)}isRegistered(e){return d.indexOf(e)>=0}getRegistered(){return d}setCallbackOrderIndex(e,t,n,r){const i=Number.isInteger(r)?r:0,s=this.getCallbackOrderMap(e,t);s.set(i,[...s.get(i)||[],n])}orderBucketByOrderIndex(e,t){const n=this.getCallbackOrderMap(e,t);void 0===n||0===n.size||1===n.size&&n.has(0)||(e[t]=[...n].sort((e,t)=>e[0]-t[0]).flatMap(e=>{let[,t]=e;return t}))}initOrderMap(e,t){f.has(e)||f.set(e,[]),f.get(e)[t]=new Map}getCallbackOrderMap(e,t){return f.get(e)[t]}}const y=new R;function M(){return y}t["a"]=R},1096:function(e,t,n){"use strict";n.d(t,"a",(function(){return u}));n("d9e2"),n("14d9");var r=n("ffec"),i=n("351d"),s=n("97b9"),o=n("7ae0");function a(e,t,n){return(t=l(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function l(e){var t=c(e,"string");return"symbol"==typeof t?t:t+""}function c(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}class u{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;a(this,"indexedValues",[]),a(this,"initValueOrFn",void 0),this.initValueOrFn=e}getValues(){return this.indexedValues}getValueAtIndex(e){const t=this.indexedValues;if(e<t.length)return t[e]}setValues(e){this.indexedValues=e.slice(),this.runLocalHooks("change")}setValueAtIndex(e,t){return e<this.indexedValues.length&&(this.indexedValues[e]=t,this.runLocalHooks("change"),!0)}clear(){this.setDefaultValues()}getLength(){return this.getValues().length}setDefaultValues(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.indexedValues.length;this.indexedValues.length=0,Object(s["isFunction"])(this.initValueOrFn)?Object(r["rangeEach"])(e-1,e=>this.indexedValues.push(this.initValueOrFn(e))):Object(r["rangeEach"])(e-1,()=>this.indexedValues.push(this.initValueOrFn)),this.runLocalHooks("change")}init(e){return this.setDefaultValues(e),this.runLocalHooks("init"),this}insert(){this.runLocalHooks("change")}remove(){this.runLocalHooks("change")}destroy(){this.clearLocalHooks(),this.indexedValues=null,this.initValueOrFn=null}}Object(i["mixin"])(u,o["a"])},"10e8":function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
  34. //! moment.js locale configuration
  35. var t=e.defineLocale("th",{months:"มกราคม_กุมภาพันธ์_มีนาคม_เมษายน_พฤษภาคม_มิถุนายน_กรกฎาคม_สิงหาคม_กันยายน_ตุลาคม_พฤศจิกายน_ธันวาคม".split("_"),monthsShort:"ม.ค._ก.พ._มี.ค._เม.ย._พ.ค._มิ.ย._ก.ค._ส.ค._ก.ย._ต.ค._พ.ย._ธ.ค.".split("_"),monthsParseExact:!0,weekdays:"อาทิตย์_จันทร์_อังคาร_พุธ_พฤหัสบดี_ศุกร์_เสาร์".split("_"),weekdaysShort:"อาทิตย์_จันทร์_อังคาร_พุธ_พฤหัส_ศุกร์_เสาร์".split("_"),weekdaysMin:"อา._จ._อ._พ._พฤ._ศ._ส.".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY เวลา H:mm",LLLL:"วันddddที่ D MMMM YYYY เวลา H:mm"},meridiemParse:/ก่อนเที่ยง|หลังเที่ยง/,isPM:function(e){return"หลังเที่ยง"===e},meridiem:function(e,t,n){return e<12?"ก่อนเที่ยง":"หลังเที่ยง"},calendar:{sameDay:"[วันนี้ เวลา] LT",nextDay:"[พรุ่งนี้ เวลา] LT",nextWeek:"dddd[หน้า เวลา] LT",lastDay:"[เมื่อวานนี้ เวลา] LT",lastWeek:"[วัน]dddd[ที่แล้ว เวลา] LT",sameElse:"L"},relativeTime:{future:"อีก %s",past:"%sที่แล้ว",s:"ไม่กี่วินาที",ss:"%d วินาที",m:"1 นาที",mm:"%d นาที",h:"1 ชั่วโมง",hh:"%d ชั่วโมง",d:"1 วัน",dd:"%d วัน",w:"1 สัปดาห์",ww:"%d สัปดาห์",M:"1 เดือน",MM:"%d เดือน",y:"1 ปี",yy:"%d ปี"}});return t}))},1157:function(e,t,n){var r,i;
  36. /*!
  37. * jQuery JavaScript Library v3.7.1
  38. * https://jquery.com/
  39. *
  40. * Copyright OpenJS Foundation and other contributors
  41. * Released under the MIT license
  42. * https://jquery.org/license
  43. *
  44. * Date: 2023-08-28T13:37Z
  45. */(function(t,n){"use strict";"object"===typeof e.exports?e.exports=t.document?n(t,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return n(e)}:n(t)})("undefined"!==typeof window?window:this,(function(n,s){"use strict";var o=[],a=Object.getPrototypeOf,l=o.slice,c=o.flat?function(e){return o.flat.call(e)}:function(e){return o.concat.apply([],e)},u=o.push,h=o.indexOf,d={},m=d.toString,g=d.hasOwnProperty,p=g.toString,f=p.call(Object),R={},y=function(e){return"function"===typeof e&&"number"!==typeof e.nodeType&&"function"!==typeof e.item},M=function(e){return null!=e&&e===e.window},S=n.document,b={type:!0,src:!0,nonce:!0,noModule:!0};function w(e,t,n){n=n||S;var r,i,s=n.createElement("script");if(s.text=e,t)for(r in b)i=t[r]||t.getAttribute&&t.getAttribute(r),i&&s.setAttribute(r,i);n.head.appendChild(s).parentNode.removeChild(s)}function T(e){return null==e?e+"":"object"===typeof e||"function"===typeof e?d[m.call(e)]||"object":typeof e}var O="3.7.1",v=/HTML$/i,E=function(e,t){return new E.fn.init(e,t)};function C(e){var t=!!e&&"length"in e&&e.length,n=T(e);return!y(e)&&!M(e)&&("array"===n||0===t||"number"===typeof t&&t>0&&t-1 in e)}function L(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()}E.fn=E.prototype={jquery:O,constructor:E,length:0,toArray:function(){return l.call(this)},get:function(e){return null==e?l.call(this):e<0?this[e+this.length]:this[e]},pushStack:function(e){var t=E.merge(this.constructor(),e);return t.prevObject=this,t},each:function(e){return E.each(this,e)},map:function(e){return this.pushStack(E.map(this,(function(t,n){return e.call(t,n,t)})))},slice:function(){return this.pushStack(l.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},even:function(){return this.pushStack(E.grep(this,(function(e,t){return(t+1)%2})))},odd:function(){return this.pushStack(E.grep(this,(function(e,t){return t%2})))},eq:function(e){var t=this.length,n=+e+(e<0?t:0);return this.pushStack(n>=0&&n<t?[this[n]]:[])},end:function(){return this.prevObject||this.constructor()},push:u,sort:o.sort,splice:o.splice},E.extend=E.fn.extend=function(){var e,t,n,r,i,s,o=arguments[0]||{},a=1,l=arguments.length,c=!1;for("boolean"===typeof o&&(c=o,o=arguments[a]||{},a++),"object"===typeof o||y(o)||(o={}),a===l&&(o=this,a--);a<l;a++)if(null!=(e=arguments[a]))for(t in e)r=e[t],"__proto__"!==t&&o!==r&&(c&&r&&(E.isPlainObject(r)||(i=Array.isArray(r)))?(n=o[t],s=i&&!Array.isArray(n)?[]:i||E.isPlainObject(n)?n:{},i=!1,o[t]=E.extend(c,s,r)):void 0!==r&&(o[t]=r));return o},E.extend({expando:"jQuery"+(O+Math.random()).replace(/\D/g,""),isReady:!0,error:function(e){throw new Error(e)},noop:function(){},isPlainObject:function(e){var t,n;return!(!e||"[object Object]"!==m.call(e))&&(t=a(e),!t||(n=g.call(t,"constructor")&&t.constructor,"function"===typeof n&&p.call(n)===f))},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},globalEval:function(e,t,n){w(e,{nonce:t&&t.nonce},n)},each:function(e,t){var n,r=0;if(C(e)){for(n=e.length;r<n;r++)if(!1===t.call(e[r],r,e[r]))break}else for(r in e)if(!1===t.call(e[r],r,e[r]))break;return e},text:function(e){var t,n="",r=0,i=e.nodeType;if(!i)while(t=e[r++])n+=E.text(t);return 1===i||11===i?e.textContent:9===i?e.documentElement.textContent:3===i||4===i?e.nodeValue:n},makeArray:function(e,t){var n=t||[];return null!=e&&(C(Object(e))?E.merge(n,"string"===typeof e?[e]:e):u.call(n,e)),n},inArray:function(e,t,n){return null==t?-1:h.call(t,e,n)},isXMLDoc:function(e){var t=e&&e.namespaceURI,n=e&&(e.ownerDocument||e).documentElement;return!v.test(t||n&&n.nodeName||"HTML")},merge:function(e,t){for(var n=+t.length,r=0,i=e.length;r<n;r++)e[i++]=t[r];return e.length=i,e},grep:function(e,t,n){for(var r,i=[],s=0,o=e.length,a=!n;s<o;s++)r=!t(e[s],s),r!==a&&i.push(e[s]);return i},map:function(e,t,n){var r,i,s=0,o=[];if(C(e))for(r=e.length;s<r;s++)i=t(e[s],s,n),null!=i&&o.push(i);else for(s in e)i=t(e[s],s,n),null!=i&&o.push(i);return c(o)},guid:1,support:R}),"function"===typeof Symbol&&(E.fn[Symbol.iterator]=o[Symbol.iterator]),E.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),(function(e,t){d["[object "+t+"]"]=t.toLowerCase()}));var N=o.pop,_=o.sort,I=o.splice,P="[\\x20\\t\\r\\n\\f]",x=new RegExp("^"+P+"+|((?:^|[^\\\\])(?:\\\\.)*)"+P+"+$","g");E.contains=function(e,t){var n=t&&t.parentNode;return e===n||!(!n||1!==n.nodeType||!(e.contains?e.contains(n):e.compareDocumentPosition&&16&e.compareDocumentPosition(n)))};var D=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\x80-\uFFFF\w-]/g;function A(e,t){return t?"\0"===e?"�":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e}E.escapeSelector=function(e){return(e+"").replace(D,A)};var F=S,Y=u;(function(){var e,t,r,i,s,a,c,u,d,m,p=Y,f=E.expando,y=0,M=0,S=te(),b=te(),w=te(),T=te(),O=function(e,t){return e===t&&(s=!0),0},v="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",C="(?:\\\\[\\da-fA-F]{1,6}"+P+"?|\\\\[^\\r\\n\\f]|[\\w-]|[^\0-\\x7f])+",D="\\["+P+"*("+C+")(?:"+P+"*([*^$|!~]?=)"+P+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+C+"))|)"+P+"*\\]",A=":("+C+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+D+")*)|.*)\\)|)",H=new RegExp(P+"+","g"),k=new RegExp("^"+P+"*,"+P+"*"),V=new RegExp("^"+P+"*([>+~]|"+P+")"+P+"*"),U=new RegExp(P+"|>"),W=new RegExp(A),X=new RegExp("^"+C+"$"),j={ID:new RegExp("^#("+C+")"),CLASS:new RegExp("^\\.("+C+")"),TAG:new RegExp("^("+C+"|[*])"),ATTR:new RegExp("^"+D),PSEUDO:new RegExp("^"+A),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+P+"*(even|odd|(([+-]|)(\\d*)n|)"+P+"*(?:([+-]|)"+P+"*(\\d+)|))"+P+"*\\)|)","i"),bool:new RegExp("^(?:"+v+")$","i"),needsContext:new RegExp("^"+P+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+P+"*((?:-\\d)?\\d*)"+P+"*\\)|)(?=[^-]|$)","i")},Z=/^(?:input|select|textarea|button)$/i,Q=/^h\d$/i,K=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,G=/[+~]/,B=new RegExp("\\\\[\\da-fA-F]{1,6}"+P+"?|\\\\([^\\r\\n\\f])","g"),J=function(e,t){var n="0x"+e.slice(1)-65536;return t||(n<0?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,1023&n|56320))},z=function(){ce()},$=me((function(e){return!0===e.disabled&&L(e,"fieldset")}),{dir:"parentNode",next:"legend"});function q(){try{return a.activeElement}catch(e){}}try{p.apply(o=l.call(F.childNodes),F.childNodes),o[F.childNodes.length].nodeType}catch(we){p={apply:function(e,t){Y.apply(e,l.call(t))},call:function(e){Y.apply(e,l.call(arguments,1))}}}function ee(e,t,n,r){var i,s,o,l,c,h,m,g=t&&t.ownerDocument,y=t?t.nodeType:9;if(n=n||[],"string"!==typeof e||!e||1!==y&&9!==y&&11!==y)return n;if(!r&&(ce(t),t=t||a,u)){if(11!==y&&(c=K.exec(e)))if(i=c[1]){if(9===y){if(!(o=t.getElementById(i)))return n;if(o.id===i)return p.call(n,o),n}else if(g&&(o=g.getElementById(i))&&ee.contains(t,o)&&o.id===i)return p.call(n,o),n}else{if(c[2])return p.apply(n,t.getElementsByTagName(e)),n;if((i=c[3])&&t.getElementsByClassName)return p.apply(n,t.getElementsByClassName(i)),n}if(!T[e+" "]&&(!d||!d.test(e))){if(m=e,g=t,1===y&&(U.test(e)||V.test(e))){g=G.test(e)&&le(t.parentNode)||t,g==t&&R.scope||((l=t.getAttribute("id"))?l=E.escapeSelector(l):t.setAttribute("id",l=f)),h=he(e),s=h.length;while(s--)h[s]=(l?"#"+l:":scope")+" "+de(h[s]);m=h.join(",")}try{return p.apply(n,g.querySelectorAll(m)),n}catch(M){T(e,!0)}finally{l===f&&t.removeAttribute("id")}}}return be(e.replace(x,"$1"),t,n,r)}function te(){var e=[];function n(r,i){return e.push(r+" ")>t.cacheLength&&delete n[e.shift()],n[r+" "]=i}return n}function ne(e){return e[f]=!0,e}function re(e){var t=a.createElement("fieldset");try{return!!e(t)}catch(we){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function ie(e){return function(t){return L(t,"input")&&t.type===e}}function se(e){return function(t){return(L(t,"input")||L(t,"button"))&&t.type===e}}function oe(e){return function(t){return"form"in t?t.parentNode&&!1===t.disabled?"label"in t?"label"in t.parentNode?t.parentNode.disabled===e:t.disabled===e:t.isDisabled===e||t.isDisabled!==!e&&$(t)===e:t.disabled===e:"label"in t&&t.disabled===e}}function ae(e){return ne((function(t){return t=+t,ne((function(n,r){var i,s=e([],n.length,t),o=s.length;while(o--)n[i=s[o]]&&(n[i]=!(r[i]=n[i]))}))}))}function le(e){return e&&"undefined"!==typeof e.getElementsByTagName&&e}function ce(e){var n,r=e?e.ownerDocument||e:F;return r!=a&&9===r.nodeType&&r.documentElement?(a=r,c=a.documentElement,u=!E.isXMLDoc(a),m=c.matches||c.webkitMatchesSelector||c.msMatchesSelector,c.msMatchesSelector&&F!=a&&(n=a.defaultView)&&n.top!==n&&n.addEventListener("unload",z),R.getById=re((function(e){return c.appendChild(e).id=E.expando,!a.getElementsByName||!a.getElementsByName(E.expando).length})),R.disconnectedMatch=re((function(e){return m.call(e,"*")})),R.scope=re((function(){return a.querySelectorAll(":scope")})),R.cssHas=re((function(){try{return a.querySelector(":has(*,:jqfake)"),!1}catch(we){return!0}})),R.getById?(t.filter.ID=function(e){var t=e.replace(B,J);return function(e){return e.getAttribute("id")===t}},t.find.ID=function(e,t){if("undefined"!==typeof t.getElementById&&u){var n=t.getElementById(e);return n?[n]:[]}}):(t.filter.ID=function(e){var t=e.replace(B,J);return function(e){var n="undefined"!==typeof e.getAttributeNode&&e.getAttributeNode("id");return n&&n.value===t}},t.find.ID=function(e,t){if("undefined"!==typeof t.getElementById&&u){var n,r,i,s=t.getElementById(e);if(s){if(n=s.getAttributeNode("id"),n&&n.value===e)return[s];i=t.getElementsByName(e),r=0;while(s=i[r++])if(n=s.getAttributeNode("id"),n&&n.value===e)return[s]}return[]}}),t.find.TAG=function(e,t){return"undefined"!==typeof t.getElementsByTagName?t.getElementsByTagName(e):t.querySelectorAll(e)},t.find.CLASS=function(e,t){if("undefined"!==typeof t.getElementsByClassName&&u)return t.getElementsByClassName(e)},d=[],re((function(e){var t;c.appendChild(e).innerHTML="<a id='"+f+"' href='' disabled='disabled'></a><select id='"+f+"-\r\\' disabled='disabled'><option selected=''></option></select>",e.querySelectorAll("[selected]").length||d.push("\\["+P+"*(?:value|"+v+")"),e.querySelectorAll("[id~="+f+"-]").length||d.push("~="),e.querySelectorAll("a#"+f+"+*").length||d.push(".#.+[+~]"),e.querySelectorAll(":checked").length||d.push(":checked"),t=a.createElement("input"),t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),c.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&d.push(":enabled",":disabled"),t=a.createElement("input"),t.setAttribute("name",""),e.appendChild(t),e.querySelectorAll("[name='']").length||d.push("\\["+P+"*name"+P+"*="+P+"*(?:''|\"\")")})),R.cssHas||d.push(":has"),d=d.length&&new RegExp(d.join("|")),O=function(e,t){if(e===t)return s=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n||(n=(e.ownerDocument||e)==(t.ownerDocument||t)?e.compareDocumentPosition(t):1,1&n||!R.sortDetached&&t.compareDocumentPosition(e)===n?e===a||e.ownerDocument==F&&ee.contains(F,e)?-1:t===a||t.ownerDocument==F&&ee.contains(F,t)?1:i?h.call(i,e)-h.call(i,t):0:4&n?-1:1)},a):a}for(e in ee.matches=function(e,t){return ee(e,null,null,t)},ee.matchesSelector=function(e,t){if(ce(e),u&&!T[t+" "]&&(!d||!d.test(t)))try{var n=m.call(e,t);if(n||R.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(we){T(t,!0)}return ee(t,a,null,[e]).length>0},ee.contains=function(e,t){return(e.ownerDocument||e)!=a&&ce(e),E.contains(e,t)},ee.attr=function(e,n){(e.ownerDocument||e)!=a&&ce(e);var r=t.attrHandle[n.toLowerCase()],i=r&&g.call(t.attrHandle,n.toLowerCase())?r(e,n,!u):void 0;return void 0!==i?i:e.getAttribute(n)},ee.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},E.uniqueSort=function(e){var t,n=[],r=0,o=0;if(s=!R.sortStable,i=!R.sortStable&&l.call(e,0),_.call(e,O),s){while(t=e[o++])t===e[o]&&(r=n.push(o));while(r--)I.call(e,n[r],1)}return i=null,e},E.fn.uniqueSort=function(){return this.pushStack(E.uniqueSort(l.apply(this)))},t=E.expr={cacheLength:50,createPseudo:ne,match:j,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(B,J),e[3]=(e[3]||e[4]||e[5]||"").replace(B,J),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||ee.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&ee.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return j.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&W.test(n)&&(t=he(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(B,J).toLowerCase();return"*"===e?function(){return!0}:function(e){return L(e,t)}},CLASS:function(e){var t=S[e+" "];return t||(t=new RegExp("(^|"+P+")"+e+"("+P+"|$)"))&&S(e,(function(e){return t.test("string"===typeof e.className&&e.className||"undefined"!==typeof e.getAttribute&&e.getAttribute("class")||"")}))},ATTR:function(e,t,n){return function(r){var i=ee.attr(r,e);return null==i?"!="===t:!t||(i+="","="===t?i===n:"!="===t?i!==n:"^="===t?n&&0===i.indexOf(n):"*="===t?n&&i.indexOf(n)>-1:"$="===t?n&&i.slice(-n.length)===n:"~="===t?(" "+i.replace(H," ")+" ").indexOf(n)>-1:"|="===t&&(i===n||i.slice(0,n.length+1)===n+"-"))}},CHILD:function(e,t,n,r,i){var s="nth"!==e.slice(0,3),o="last"!==e.slice(-4),a="of-type"===t;return 1===r&&0===i?function(e){return!!e.parentNode}:function(t,n,l){var c,u,h,d,m,g=s!==o?"nextSibling":"previousSibling",p=t.parentNode,R=a&&t.nodeName.toLowerCase(),M=!l&&!a,S=!1;if(p){if(s){while(g){h=t;while(h=h[g])if(a?L(h,R):1===h.nodeType)return!1;m=g="only"===e&&!m&&"nextSibling"}return!0}if(m=[o?p.firstChild:p.lastChild],o&&M){u=p[f]||(p[f]={}),c=u[e]||[],d=c[0]===y&&c[1],S=d&&c[2],h=d&&p.childNodes[d];while(h=++d&&h&&h[g]||(S=d=0)||m.pop())if(1===h.nodeType&&++S&&h===t){u[e]=[y,d,S];break}}else if(M&&(u=t[f]||(t[f]={}),c=u[e]||[],d=c[0]===y&&c[1],S=d),!1===S)while(h=++d&&h&&h[g]||(S=d=0)||m.pop())if((a?L(h,R):1===h.nodeType)&&++S&&(M&&(u=h[f]||(h[f]={}),u[e]=[y,S]),h===t))break;return S-=i,S===r||S%r===0&&S/r>=0}}},PSEUDO:function(e,n){var r,i=t.pseudos[e]||t.setFilters[e.toLowerCase()]||ee.error("unsupported pseudo: "+e);return i[f]?i(n):i.length>1?(r=[e,e,"",n],t.setFilters.hasOwnProperty(e.toLowerCase())?ne((function(e,t){var r,s=i(e,n),o=s.length;while(o--)r=h.call(e,s[o]),e[r]=!(t[r]=s[o])})):function(e){return i(e,0,r)}):i}},pseudos:{not:ne((function(e){var t=[],n=[],r=Se(e.replace(x,"$1"));return r[f]?ne((function(e,t,n,i){var s,o=r(e,null,i,[]),a=e.length;while(a--)(s=o[a])&&(e[a]=!(t[a]=s))})):function(e,i,s){return t[0]=e,r(t,null,s,n),t[0]=null,!n.pop()}})),has:ne((function(e){return function(t){return ee(e,t).length>0}})),contains:ne((function(e){return e=e.replace(B,J),function(t){return(t.textContent||E.text(t)).indexOf(e)>-1}})),lang:ne((function(e){return X.test(e||"")||ee.error("unsupported lang: "+e),e=e.replace(B,J).toLowerCase(),function(t){var n;do{if(n=u?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return n=n.toLowerCase(),n===e||0===n.indexOf(e+"-")}while((t=t.parentNode)&&1===t.nodeType);return!1}})),target:function(e){var t=n.location&&n.location.hash;return t&&t.slice(1)===e.id},root:function(e){return e===c},focus:function(e){return e===q()&&a.hasFocus()&&!!(e.type||e.href||~e.tabIndex)},enabled:oe(!1),disabled:oe(!0),checked:function(e){return L(e,"input")&&!!e.checked||L(e,"option")&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,!0===e.selected},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType<6)return!1;return!0},parent:function(e){return!t.pseudos.empty(e)},header:function(e){return Q.test(e.nodeName)},input:function(e){return Z.test(e.nodeName)},button:function(e){return L(e,"input")&&"button"===e.type||L(e,"button")},text:function(e){var t;return L(e,"input")&&"text"===e.type&&(null==(t=e.getAttribute("type"))||"text"===t.toLowerCase())},first:ae((function(){return[0]})),last:ae((function(e,t){return[t-1]})),eq:ae((function(e,t,n){return[n<0?n+t:n]})),even:ae((function(e,t){for(var n=0;n<t;n+=2)e.push(n);return e})),odd:ae((function(e,t){for(var n=1;n<t;n+=2)e.push(n);return e})),lt:ae((function(e,t,n){var r;for(r=n<0?n+t:n>t?t:n;--r>=0;)e.push(r);return e})),gt:ae((function(e,t,n){for(var r=n<0?n+t:n;++r<t;)e.push(r);return e}))}},t.pseudos.nth=t.pseudos.eq,{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})t.pseudos[e]=ie(e);for(e in{submit:!0,reset:!0})t.pseudos[e]=se(e);function ue(){}function he(e,n){var r,i,s,o,a,l,c,u=b[e+" "];if(u)return n?0:u.slice(0);a=e,l=[],c=t.preFilter;while(a){for(o in r&&!(i=k.exec(a))||(i&&(a=a.slice(i[0].length)||a),l.push(s=[])),r=!1,(i=V.exec(a))&&(r=i.shift(),s.push({value:r,type:i[0].replace(x," ")}),a=a.slice(r.length)),t.filter)!(i=j[o].exec(a))||c[o]&&!(i=c[o](i))||(r=i.shift(),s.push({value:r,type:o,matches:i}),a=a.slice(r.length));if(!r)break}return n?a.length:a?ee.error(e):b(e,l).slice(0)}function de(e){for(var t=0,n=e.length,r="";t<n;t++)r+=e[t].value;return r}function me(e,t,n){var r=t.dir,i=t.next,s=i||r,o=n&&"parentNode"===s,a=M++;return t.first?function(t,n,i){while(t=t[r])if(1===t.nodeType||o)return e(t,n,i);return!1}:function(t,n,l){var c,u,h=[y,a];if(l){while(t=t[r])if((1===t.nodeType||o)&&e(t,n,l))return!0}else while(t=t[r])if(1===t.nodeType||o)if(u=t[f]||(t[f]={}),i&&L(t,i))t=t[r]||t;else{if((c=u[s])&&c[0]===y&&c[1]===a)return h[2]=c[2];if(u[s]=h,h[2]=e(t,n,l))return!0}return!1}}function ge(e){return e.length>1?function(t,n,r){var i=e.length;while(i--)if(!e[i](t,n,r))return!1;return!0}:e[0]}function pe(e,t,n){for(var r=0,i=t.length;r<i;r++)ee(e,t[r],n);return n}function fe(e,t,n,r,i){for(var s,o=[],a=0,l=e.length,c=null!=t;a<l;a++)(s=e[a])&&(n&&!n(s,r,i)||(o.push(s),c&&t.push(a)));return o}function Re(e,t,n,r,i,s){return r&&!r[f]&&(r=Re(r)),i&&!i[f]&&(i=Re(i,s)),ne((function(s,o,a,l){var c,u,d,m,g=[],f=[],R=o.length,y=s||pe(t||"*",a.nodeType?[a]:a,[]),M=!e||!s&&t?y:fe(y,g,e,a,l);if(n?(m=i||(s?e:R||r)?[]:o,n(M,m,a,l)):m=M,r){c=fe(m,f),r(c,[],a,l),u=c.length;while(u--)(d=c[u])&&(m[f[u]]=!(M[f[u]]=d))}if(s){if(i||e){if(i){c=[],u=m.length;while(u--)(d=m[u])&&c.push(M[u]=d);i(null,m=[],c,l)}u=m.length;while(u--)(d=m[u])&&(c=i?h.call(s,d):g[u])>-1&&(s[c]=!(o[c]=d))}}else m=fe(m===o?m.splice(R,m.length):m),i?i(null,o,m,l):p.apply(o,m)}))}function ye(e){for(var n,i,s,o=e.length,a=t.relative[e[0].type],l=a||t.relative[" "],c=a?1:0,u=me((function(e){return e===n}),l,!0),d=me((function(e){return h.call(n,e)>-1}),l,!0),m=[function(e,t,i){var s=!a&&(i||t!=r)||((n=t).nodeType?u(e,t,i):d(e,t,i));return n=null,s}];c<o;c++)if(i=t.relative[e[c].type])m=[me(ge(m),i)];else{if(i=t.filter[e[c].type].apply(null,e[c].matches),i[f]){for(s=++c;s<o;s++)if(t.relative[e[s].type])break;return Re(c>1&&ge(m),c>1&&de(e.slice(0,c-1).concat({value:" "===e[c-2].type?"*":""})).replace(x,"$1"),i,c<s&&ye(e.slice(c,s)),s<o&&ye(e=e.slice(s)),s<o&&de(e))}m.push(i)}return ge(m)}function Me(e,n){var i=n.length>0,s=e.length>0,o=function(o,l,c,h,d){var m,g,f,R=0,M="0",S=o&&[],b=[],w=r,T=o||s&&t.find.TAG("*",d),O=y+=null==w?1:Math.random()||.1,v=T.length;for(d&&(r=l==a||l||d);M!==v&&null!=(m=T[M]);M++){if(s&&m){g=0,l||m.ownerDocument==a||(ce(m),c=!u);while(f=e[g++])if(f(m,l||a,c)){p.call(h,m);break}d&&(y=O)}i&&((m=!f&&m)&&R--,o&&S.push(m))}if(R+=M,i&&M!==R){g=0;while(f=n[g++])f(S,b,l,c);if(o){if(R>0)while(M--)S[M]||b[M]||(b[M]=N.call(h));b=fe(b)}p.apply(h,b),d&&!o&&b.length>0&&R+n.length>1&&E.uniqueSort(h)}return d&&(y=O,r=w),S};return i?ne(o):o}function Se(e,t){var n,r=[],i=[],s=w[e+" "];if(!s){t||(t=he(e)),n=t.length;while(n--)s=ye(t[n]),s[f]?r.push(s):i.push(s);s=w(e,Me(i,r)),s.selector=e}return s}function be(e,n,r,i){var s,o,a,l,c,h="function"===typeof e&&e,d=!i&&he(e=h.selector||e);if(r=r||[],1===d.length){if(o=d[0]=d[0].slice(0),o.length>2&&"ID"===(a=o[0]).type&&9===n.nodeType&&u&&t.relative[o[1].type]){if(n=(t.find.ID(a.matches[0].replace(B,J),n)||[])[0],!n)return r;h&&(n=n.parentNode),e=e.slice(o.shift().value.length)}s=j.needsContext.test(e)?0:o.length;while(s--){if(a=o[s],t.relative[l=a.type])break;if((c=t.find[l])&&(i=c(a.matches[0].replace(B,J),G.test(o[0].type)&&le(n.parentNode)||n))){if(o.splice(s,1),e=i.length&&de(o),!e)return p.apply(r,i),r;break}}}return(h||Se(e,d))(i,n,!u,r,!n||G.test(e)&&le(n.parentNode)||n),r}ue.prototype=t.filters=t.pseudos,t.setFilters=new ue,R.sortStable=f.split("").sort(O).join("")===f,ce(),R.sortDetached=re((function(e){return 1&e.compareDocumentPosition(a.createElement("fieldset"))})),E.find=ee,E.expr[":"]=E.expr.pseudos,E.unique=E.uniqueSort,ee.compile=Se,ee.select=be,ee.setDocument=ce,ee.tokenize=he,ee.escape=E.escapeSelector,ee.getText=E.text,ee.isXML=E.isXMLDoc,ee.selectors=E.expr,ee.support=E.support,ee.uniqueSort=E.uniqueSort})();var H=function(e,t,n){var r=[],i=void 0!==n;while((e=e[t])&&9!==e.nodeType)if(1===e.nodeType){if(i&&E(e).is(n))break;r.push(e)}return r},k=function(e,t){for(var n=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n},V=E.expr.match.needsContext,U=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function W(e,t,n){return y(t)?E.grep(e,(function(e,r){return!!t.call(e,r,e)!==n})):t.nodeType?E.grep(e,(function(e){return e===t!==n})):"string"!==typeof t?E.grep(e,(function(e){return h.call(t,e)>-1!==n})):E.filter(t,e,n)}E.filter=function(e,t,n){var r=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===r.nodeType?E.find.matchesSelector(r,e)?[r]:[]:E.find.matches(e,E.grep(t,(function(e){return 1===e.nodeType})))},E.fn.extend({find:function(e){var t,n,r=this.length,i=this;if("string"!==typeof e)return this.pushStack(E(e).filter((function(){for(t=0;t<r;t++)if(E.contains(i[t],this))return!0})));for(n=this.pushStack([]),t=0;t<r;t++)E.find(e,i[t],n);return r>1?E.uniqueSort(n):n},filter:function(e){return this.pushStack(W(this,e||[],!1))},not:function(e){return this.pushStack(W(this,e||[],!0))},is:function(e){return!!W(this,"string"===typeof e&&V.test(e)?E(e):e||[],!1).length}});var X,j=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/,Z=E.fn.init=function(e,t,n){var r,i;if(!e)return this;if(n=n||X,"string"===typeof e){if(r="<"===e[0]&&">"===e[e.length-1]&&e.length>=3?[null,e,null]:j.exec(e),!r||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof E?t[0]:t,E.merge(this,E.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:S,!0)),U.test(r[1])&&E.isPlainObject(t))for(r in t)y(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return i=S.getElementById(r[2]),i&&(this[0]=i,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):y(e)?void 0!==n.ready?n.ready(e):e(E):E.makeArray(e,this)};Z.prototype=E.fn,X=E(S);var Q=/^(?:parents|prev(?:Until|All))/,K={children:!0,contents:!0,next:!0,prev:!0};function G(e,t){while((e=e[t])&&1!==e.nodeType);return e}E.fn.extend({has:function(e){var t=E(e,this),n=t.length;return this.filter((function(){for(var e=0;e<n;e++)if(E.contains(this,t[e]))return!0}))},closest:function(e,t){var n,r=0,i=this.length,s=[],o="string"!==typeof e&&E(e);if(!V.test(e))for(;r<i;r++)for(n=this[r];n&&n!==t;n=n.parentNode)if(n.nodeType<11&&(o?o.index(n)>-1:1===n.nodeType&&E.find.matchesSelector(n,e))){s.push(n);break}return this.pushStack(s.length>1?E.uniqueSort(s):s)},index:function(e){return e?"string"===typeof e?h.call(E(e),this[0]):h.call(this,e.jquery?e[0]:e):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(E.uniqueSort(E.merge(this.get(),E(e,t))))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),E.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return H(e,"parentNode")},parentsUntil:function(e,t,n){return H(e,"parentNode",n)},next:function(e){return G(e,"nextSibling")},prev:function(e){return G(e,"previousSibling")},nextAll:function(e){return H(e,"nextSibling")},prevAll:function(e){return H(e,"previousSibling")},nextUntil:function(e,t,n){return H(e,"nextSibling",n)},prevUntil:function(e,t,n){return H(e,"previousSibling",n)},siblings:function(e){return k((e.parentNode||{}).firstChild,e)},children:function(e){return k(e.firstChild)},contents:function(e){return null!=e.contentDocument&&a(e.contentDocument)?e.contentDocument:(L(e,"template")&&(e=e.content||e),E.merge([],e.childNodes))}},(function(e,t){E.fn[e]=function(n,r){var i=E.map(this,t,n);return"Until"!==e.slice(-5)&&(r=n),r&&"string"===typeof r&&(i=E.filter(r,i)),this.length>1&&(K[e]||E.uniqueSort(i),Q.test(e)&&i.reverse()),this.pushStack(i)}}));var B=/[^\x20\t\r\n\f]+/g;function J(e){var t={};return E.each(e.match(B)||[],(function(e,n){t[n]=!0})),t}function z(e){return e}function $(e){throw e}function q(e,t,n,r){var i;try{e&&y(i=e.promise)?i.call(e).done(t).fail(n):e&&y(i=e.then)?i.call(e,t,n):t.apply(void 0,[e].slice(r))}catch(e){n.apply(void 0,[e])}}E.Callbacks=function(e){e="string"===typeof e?J(e):E.extend({},e);var t,n,r,i,s=[],o=[],a=-1,l=function(){for(i=i||e.once,r=t=!0;o.length;a=-1){n=o.shift();while(++a<s.length)!1===s[a].apply(n[0],n[1])&&e.stopOnFalse&&(a=s.length,n=!1)}e.memory||(n=!1),t=!1,i&&(s=n?[]:"")},c={add:function(){return s&&(n&&!t&&(a=s.length-1,o.push(n)),function t(n){E.each(n,(function(n,r){y(r)?e.unique&&c.has(r)||s.push(r):r&&r.length&&"string"!==T(r)&&t(r)}))}(arguments),n&&!t&&l()),this},remove:function(){return E.each(arguments,(function(e,t){var n;while((n=E.inArray(t,s,n))>-1)s.splice(n,1),n<=a&&a--})),this},has:function(e){return e?E.inArray(e,s)>-1:s.length>0},empty:function(){return s&&(s=[]),this},disable:function(){return i=o=[],s=n="",this},disabled:function(){return!s},lock:function(){return i=o=[],n||t||(s=n=""),this},locked:function(){return!!i},fireWith:function(e,n){return i||(n=n||[],n=[e,n.slice?n.slice():n],o.push(n),t||l()),this},fire:function(){return c.fireWith(this,arguments),this},fired:function(){return!!r}};return c},E.extend({Deferred:function(e){var t=[["notify","progress",E.Callbacks("memory"),E.Callbacks("memory"),2],["resolve","done",E.Callbacks("once memory"),E.Callbacks("once memory"),0,"resolved"],["reject","fail",E.Callbacks("once memory"),E.Callbacks("once memory"),1,"rejected"]],r="pending",i={state:function(){return r},always:function(){return s.done(arguments).fail(arguments),this},catch:function(e){return i.then(null,e)},pipe:function(){var e=arguments;return E.Deferred((function(n){E.each(t,(function(t,r){var i=y(e[r[4]])&&e[r[4]];s[r[1]]((function(){var e=i&&i.apply(this,arguments);e&&y(e.promise)?e.promise().progress(n.notify).done(n.resolve).fail(n.reject):n[r[0]+"With"](this,i?[e]:arguments)}))})),e=null})).promise()},then:function(e,r,i){var s=0;function o(e,t,r,i){return function(){var a=this,l=arguments,c=function(){var n,c;if(!(e<s)){if(n=r.apply(a,l),n===t.promise())throw new TypeError("Thenable self-resolution");c=n&&("object"===typeof n||"function"===typeof n)&&n.then,y(c)?i?c.call(n,o(s,t,z,i),o(s,t,$,i)):(s++,c.call(n,o(s,t,z,i),o(s,t,$,i),o(s,t,z,t.notifyWith))):(r!==z&&(a=void 0,l=[n]),(i||t.resolveWith)(a,l))}},u=i?c:function(){try{c()}catch(n){E.Deferred.exceptionHook&&E.Deferred.exceptionHook(n,u.error),e+1>=s&&(r!==$&&(a=void 0,l=[n]),t.rejectWith(a,l))}};e?u():(E.Deferred.getErrorHook?u.error=E.Deferred.getErrorHook():E.Deferred.getStackHook&&(u.error=E.Deferred.getStackHook()),n.setTimeout(u))}}return E.Deferred((function(n){t[0][3].add(o(0,n,y(i)?i:z,n.notifyWith)),t[1][3].add(o(0,n,y(e)?e:z)),t[2][3].add(o(0,n,y(r)?r:$))})).promise()},promise:function(e){return null!=e?E.extend(e,i):i}},s={};return E.each(t,(function(e,n){var o=n[2],a=n[5];i[n[1]]=o.add,a&&o.add((function(){r=a}),t[3-e][2].disable,t[3-e][3].disable,t[0][2].lock,t[0][3].lock),o.add(n[3].fire),s[n[0]]=function(){return s[n[0]+"With"](this===s?void 0:this,arguments),this},s[n[0]+"With"]=o.fireWith})),i.promise(s),e&&e.call(s,s),s},when:function(e){var t=arguments.length,n=t,r=Array(n),i=l.call(arguments),s=E.Deferred(),o=function(e){return function(n){r[e]=this,i[e]=arguments.length>1?l.call(arguments):n,--t||s.resolveWith(r,i)}};if(t<=1&&(q(e,s.done(o(n)).resolve,s.reject,!t),"pending"===s.state()||y(i[n]&&i[n].then)))return s.then();while(n--)q(i[n],o(n),s.reject);return s.promise()}});var ee=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;E.Deferred.exceptionHook=function(e,t){n.console&&n.console.warn&&e&&ee.test(e.name)&&n.console.warn("jQuery.Deferred exception: "+e.message,e.stack,t)},E.readyException=function(e){n.setTimeout((function(){throw e}))};var te=E.Deferred();function ne(){S.removeEventListener("DOMContentLoaded",ne),n.removeEventListener("load",ne),E.ready()}E.fn.ready=function(e){return te.then(e).catch((function(e){E.readyException(e)})),this},E.extend({isReady:!1,readyWait:1,ready:function(e){(!0===e?--E.readyWait:E.isReady)||(E.isReady=!0,!0!==e&&--E.readyWait>0||te.resolveWith(S,[E]))}}),E.ready.then=te.then,"complete"===S.readyState||"loading"!==S.readyState&&!S.documentElement.doScroll?n.setTimeout(E.ready):(S.addEventListener("DOMContentLoaded",ne),n.addEventListener("load",ne));var re=function(e,t,n,r,i,s,o){var a=0,l=e.length,c=null==n;if("object"===T(n))for(a in i=!0,n)re(e,t,a,n[a],!0,s,o);else if(void 0!==r&&(i=!0,y(r)||(o=!0),c&&(o?(t.call(e,r),t=null):(c=t,t=function(e,t,n){return c.call(E(e),n)})),t))for(;a<l;a++)t(e[a],n,o?r:r.call(e[a],a,t(e[a],n)));return i?e:c?t.call(e):l?t(e[0],n):s},ie=/^-ms-/,se=/-([a-z])/g;function oe(e,t){return t.toUpperCase()}function ae(e){return e.replace(ie,"ms-").replace(se,oe)}var le=function(e){return 1===e.nodeType||9===e.nodeType||!+e.nodeType};function ce(){this.expando=E.expando+ce.uid++}ce.uid=1,ce.prototype={cache:function(e){var t=e[this.expando];return t||(t={},le(e)&&(e.nodeType?e[this.expando]=t:Object.defineProperty(e,this.expando,{value:t,configurable:!0}))),t},set:function(e,t,n){var r,i=this.cache(e);if("string"===typeof t)i[ae(t)]=n;else for(r in t)i[ae(r)]=t[r];return i},get:function(e,t){return void 0===t?this.cache(e):e[this.expando]&&e[this.expando][ae(t)]},access:function(e,t,n){return void 0===t||t&&"string"===typeof t&&void 0===n?this.get(e,t):(this.set(e,t,n),void 0!==n?n:t)},remove:function(e,t){var n,r=e[this.expando];if(void 0!==r){if(void 0!==t){Array.isArray(t)?t=t.map(ae):(t=ae(t),t=t in r?[t]:t.match(B)||[]),n=t.length;while(n--)delete r[t[n]]}(void 0===t||E.isEmptyObject(r))&&(e.nodeType?e[this.expando]=void 0:delete e[this.expando])}},hasData:function(e){var t=e[this.expando];return void 0!==t&&!E.isEmptyObject(t)}};var ue=new ce,he=new ce,de=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,me=/[A-Z]/g;function ge(e){return"true"===e||"false"!==e&&("null"===e?null:e===+e+""?+e:de.test(e)?JSON.parse(e):e)}function pe(e,t,n){var r;if(void 0===n&&1===e.nodeType)if(r="data-"+t.replace(me,"-$&").toLowerCase(),n=e.getAttribute(r),"string"===typeof n){try{n=ge(n)}catch(i){}he.set(e,t,n)}else n=void 0;return n}E.extend({hasData:function(e){return he.hasData(e)||ue.hasData(e)},data:function(e,t,n){return he.access(e,t,n)},removeData:function(e,t){he.remove(e,t)},_data:function(e,t,n){return ue.access(e,t,n)},_removeData:function(e,t){ue.remove(e,t)}}),E.fn.extend({data:function(e,t){var n,r,i,s=this[0],o=s&&s.attributes;if(void 0===e){if(this.length&&(i=he.get(s),1===s.nodeType&&!ue.get(s,"hasDataAttrs"))){n=o.length;while(n--)o[n]&&(r=o[n].name,0===r.indexOf("data-")&&(r=ae(r.slice(5)),pe(s,r,i[r])));ue.set(s,"hasDataAttrs",!0)}return i}return"object"===typeof e?this.each((function(){he.set(this,e)})):re(this,(function(t){var n;if(s&&void 0===t)return n=he.get(s,e),void 0!==n?n:(n=pe(s,e),void 0!==n?n:void 0);this.each((function(){he.set(this,e,t)}))}),null,t,arguments.length>1,null,!0)},removeData:function(e){return this.each((function(){he.remove(this,e)}))}}),E.extend({queue:function(e,t,n){var r;if(e)return t=(t||"fx")+"queue",r=ue.get(e,t),n&&(!r||Array.isArray(n)?r=ue.access(e,t,E.makeArray(n)):r.push(n)),r||[]},dequeue:function(e,t){t=t||"fx";var n=E.queue(e,t),r=n.length,i=n.shift(),s=E._queueHooks(e,t),o=function(){E.dequeue(e,t)};"inprogress"===i&&(i=n.shift(),r--),i&&("fx"===t&&n.unshift("inprogress"),delete s.stop,i.call(e,o,s)),!r&&s&&s.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return ue.get(e,n)||ue.access(e,n,{empty:E.Callbacks("once memory").add((function(){ue.remove(e,[t+"queue",n])}))})}}),E.fn.extend({queue:function(e,t){var n=2;return"string"!==typeof e&&(t=e,e="fx",n--),arguments.length<n?E.queue(this[0],e):void 0===t?this:this.each((function(){var n=E.queue(this,e,t);E._queueHooks(this,e),"fx"===e&&"inprogress"!==n[0]&&E.dequeue(this,e)}))},dequeue:function(e){return this.each((function(){E.dequeue(this,e)}))},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,t){var n,r=1,i=E.Deferred(),s=this,o=this.length,a=function(){--r||i.resolveWith(s,[s])};"string"!==typeof e&&(t=e,e=void 0),e=e||"fx";while(o--)n=ue.get(s[o],e+"queueHooks"),n&&n.empty&&(r++,n.empty.add(a));return a(),i.promise(t)}});var fe=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,Re=new RegExp("^(?:([+-])=|)("+fe+")([a-z%]*)$","i"),ye=["Top","Right","Bottom","Left"],Me=S.documentElement,Se=function(e){return E.contains(e.ownerDocument,e)},be={composed:!0};Me.getRootNode&&(Se=function(e){return E.contains(e.ownerDocument,e)||e.getRootNode(be)===e.ownerDocument});var we=function(e,t){return e=t||e,"none"===e.style.display||""===e.style.display&&Se(e)&&"none"===E.css(e,"display")};function Te(e,t,n,r){var i,s,o=20,a=r?function(){return r.cur()}:function(){return E.css(e,t,"")},l=a(),c=n&&n[3]||(E.cssNumber[t]?"":"px"),u=e.nodeType&&(E.cssNumber[t]||"px"!==c&&+l)&&Re.exec(E.css(e,t));if(u&&u[3]!==c){l/=2,c=c||u[3],u=+l||1;while(o--)E.style(e,t,u+c),(1-s)*(1-(s=a()/l||.5))<=0&&(o=0),u/=s;u*=2,E.style(e,t,u+c),n=n||[]}return n&&(u=+u||+l||0,i=n[1]?u+(n[1]+1)*n[2]:+n[2],r&&(r.unit=c,r.start=u,r.end=i)),i}var Oe={};function ve(e){var t,n=e.ownerDocument,r=e.nodeName,i=Oe[r];return i||(t=n.body.appendChild(n.createElement(r)),i=E.css(t,"display"),t.parentNode.removeChild(t),"none"===i&&(i="block"),Oe[r]=i,i)}function Ee(e,t){for(var n,r,i=[],s=0,o=e.length;s<o;s++)r=e[s],r.style&&(n=r.style.display,t?("none"===n&&(i[s]=ue.get(r,"display")||null,i[s]||(r.style.display="")),""===r.style.display&&we(r)&&(i[s]=ve(r))):"none"!==n&&(i[s]="none",ue.set(r,"display",n)));for(s=0;s<o;s++)null!=i[s]&&(e[s].style.display=i[s]);return e}E.fn.extend({show:function(){return Ee(this,!0)},hide:function(){return Ee(this)},toggle:function(e){return"boolean"===typeof e?e?this.show():this.hide():this.each((function(){we(this)?E(this).show():E(this).hide()}))}});var Ce=/^(?:checkbox|radio)$/i,Le=/<([a-z][^\/\0>\x20\t\r\n\f]*)/i,Ne=/^$|^module$|\/(?:java|ecma)script/i;(function(){var e=S.createDocumentFragment(),t=e.appendChild(S.createElement("div")),n=S.createElement("input");n.setAttribute("type","radio"),n.setAttribute("checked","checked"),n.setAttribute("name","t"),t.appendChild(n),R.checkClone=t.cloneNode(!0).cloneNode(!0).lastChild.checked,t.innerHTML="<textarea>x</textarea>",R.noCloneChecked=!!t.cloneNode(!0).lastChild.defaultValue,t.innerHTML="<option></option>",R.option=!!t.lastChild})();var _e={thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};function Ie(e,t){var n;return n="undefined"!==typeof e.getElementsByTagName?e.getElementsByTagName(t||"*"):"undefined"!==typeof e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&L(e,t)?E.merge([e],n):n}function Pe(e,t){for(var n=0,r=e.length;n<r;n++)ue.set(e[n],"globalEval",!t||ue.get(t[n],"globalEval"))}_e.tbody=_e.tfoot=_e.colgroup=_e.caption=_e.thead,_e.th=_e.td,R.option||(_e.optgroup=_e.option=[1,"<select multiple='multiple'>","</select>"]);var xe=/<|&#?\w+;/;function De(e,t,n,r,i){for(var s,o,a,l,c,u,h=t.createDocumentFragment(),d=[],m=0,g=e.length;m<g;m++)if(s=e[m],s||0===s)if("object"===T(s))E.merge(d,s.nodeType?[s]:s);else if(xe.test(s)){o=o||h.appendChild(t.createElement("div")),a=(Le.exec(s)||["",""])[1].toLowerCase(),l=_e[a]||_e._default,o.innerHTML=l[1]+E.htmlPrefilter(s)+l[2],u=l[0];while(u--)o=o.lastChild;E.merge(d,o.childNodes),o=h.firstChild,o.textContent=""}else d.push(t.createTextNode(s));h.textContent="",m=0;while(s=d[m++])if(r&&E.inArray(s,r)>-1)i&&i.push(s);else if(c=Se(s),o=Ie(h.appendChild(s),"script"),c&&Pe(o),n){u=0;while(s=o[u++])Ne.test(s.type||"")&&n.push(s)}return h}var Ae=/^([^.]*)(?:\.(.+)|)/;function Fe(){return!0}function Ye(){return!1}function He(e,t,n,r,i,s){var o,a;if("object"===typeof t){for(a in"string"!==typeof n&&(r=r||n,n=void 0),t)He(e,a,n,r,t[a],s);return e}if(null==r&&null==i?(i=n,r=n=void 0):null==i&&("string"===typeof n?(i=r,r=void 0):(i=r,r=n,n=void 0)),!1===i)i=Ye;else if(!i)return e;return 1===s&&(o=i,i=function(e){return E().off(e),o.apply(this,arguments)},i.guid=o.guid||(o.guid=E.guid++)),e.each((function(){E.event.add(this,t,i,r,n)}))}function ke(e,t,n){n?(ue.set(e,t,!1),E.event.add(e,t,{namespace:!1,handler:function(e){var n,r=ue.get(this,t);if(1&e.isTrigger&&this[t]){if(r)(E.event.special[t]||{}).delegateType&&e.stopPropagation();else if(r=l.call(arguments),ue.set(this,t,r),this[t](),n=ue.get(this,t),ue.set(this,t,!1),r!==n)return e.stopImmediatePropagation(),e.preventDefault(),n}else r&&(ue.set(this,t,E.event.trigger(r[0],r.slice(1),this)),e.stopPropagation(),e.isImmediatePropagationStopped=Fe)}})):void 0===ue.get(e,t)&&E.event.add(e,t,Fe)}E.event={global:{},add:function(e,t,n,r,i){var s,o,a,l,c,u,h,d,m,g,p,f=ue.get(e);if(le(e)){n.handler&&(s=n,n=s.handler,i=s.selector),i&&E.find.matchesSelector(Me,i),n.guid||(n.guid=E.guid++),(l=f.events)||(l=f.events=Object.create(null)),(o=f.handle)||(o=f.handle=function(t){return"undefined"!==typeof E&&E.event.triggered!==t.type?E.event.dispatch.apply(e,arguments):void 0}),t=(t||"").match(B)||[""],c=t.length;while(c--)a=Ae.exec(t[c])||[],m=p=a[1],g=(a[2]||"").split(".").sort(),m&&(h=E.event.special[m]||{},m=(i?h.delegateType:h.bindType)||m,h=E.event.special[m]||{},u=E.extend({type:m,origType:p,data:r,handler:n,guid:n.guid,selector:i,needsContext:i&&E.expr.match.needsContext.test(i),namespace:g.join(".")},s),(d=l[m])||(d=l[m]=[],d.delegateCount=0,h.setup&&!1!==h.setup.call(e,r,g,o)||e.addEventListener&&e.addEventListener(m,o)),h.add&&(h.add.call(e,u),u.handler.guid||(u.handler.guid=n.guid)),i?d.splice(d.delegateCount++,0,u):d.push(u),E.event.global[m]=!0)}},remove:function(e,t,n,r,i){var s,o,a,l,c,u,h,d,m,g,p,f=ue.hasData(e)&&ue.get(e);if(f&&(l=f.events)){t=(t||"").match(B)||[""],c=t.length;while(c--)if(a=Ae.exec(t[c])||[],m=p=a[1],g=(a[2]||"").split(".").sort(),m){h=E.event.special[m]||{},m=(r?h.delegateType:h.bindType)||m,d=l[m]||[],a=a[2]&&new RegExp("(^|\\.)"+g.join("\\.(?:.*\\.|)")+"(\\.|$)"),o=s=d.length;while(s--)u=d[s],!i&&p!==u.origType||n&&n.guid!==u.guid||a&&!a.test(u.namespace)||r&&r!==u.selector&&("**"!==r||!u.selector)||(d.splice(s,1),u.selector&&d.delegateCount--,h.remove&&h.remove.call(e,u));o&&!d.length&&(h.teardown&&!1!==h.teardown.call(e,g,f.handle)||E.removeEvent(e,m,f.handle),delete l[m])}else for(m in l)E.event.remove(e,m+t[c],n,r,!0);E.isEmptyObject(l)&&ue.remove(e,"handle events")}},dispatch:function(e){var t,n,r,i,s,o,a=new Array(arguments.length),l=E.event.fix(e),c=(ue.get(this,"events")||Object.create(null))[l.type]||[],u=E.event.special[l.type]||{};for(a[0]=l,t=1;t<arguments.length;t++)a[t]=arguments[t];if(l.delegateTarget=this,!u.preDispatch||!1!==u.preDispatch.call(this,l)){o=E.event.handlers.call(this,l,c),t=0;while((i=o[t++])&&!l.isPropagationStopped()){l.currentTarget=i.elem,n=0;while((s=i.handlers[n++])&&!l.isImmediatePropagationStopped())l.rnamespace&&!1!==s.namespace&&!l.rnamespace.test(s.namespace)||(l.handleObj=s,l.data=s.data,r=((E.event.special[s.origType]||{}).handle||s.handler).apply(i.elem,a),void 0!==r&&!1===(l.result=r)&&(l.preventDefault(),l.stopPropagation()))}return u.postDispatch&&u.postDispatch.call(this,l),l.result}},handlers:function(e,t){var n,r,i,s,o,a=[],l=t.delegateCount,c=e.target;if(l&&c.nodeType&&!("click"===e.type&&e.button>=1))for(;c!==this;c=c.parentNode||this)if(1===c.nodeType&&("click"!==e.type||!0!==c.disabled)){for(s=[],o={},n=0;n<l;n++)r=t[n],i=r.selector+" ",void 0===o[i]&&(o[i]=r.needsContext?E(i,this).index(c)>-1:E.find(i,this,null,[c]).length),o[i]&&s.push(r);s.length&&a.push({elem:c,handlers:s})}return c=this,l<t.length&&a.push({elem:c,handlers:t.slice(l)}),a},addProp:function(e,t){Object.defineProperty(E.Event.prototype,e,{enumerable:!0,configurable:!0,get:y(t)?function(){if(this.originalEvent)return t(this.originalEvent)}:function(){if(this.originalEvent)return this.originalEvent[e]},set:function(t){Object.defineProperty(this,e,{enumerable:!0,configurable:!0,writable:!0,value:t})}})},fix:function(e){return e[E.expando]?e:new E.Event(e)},special:{load:{noBubble:!0},click:{setup:function(e){var t=this||e;return Ce.test(t.type)&&t.click&&L(t,"input")&&ke(t,"click",!0),!1},trigger:function(e){var t=this||e;return Ce.test(t.type)&&t.click&&L(t,"input")&&ke(t,"click"),!0},_default:function(e){var t=e.target;return Ce.test(t.type)&&t.click&&L(t,"input")&&ue.get(t,"click")||L(t,"a")}},beforeunload:{postDispatch:function(e){void 0!==e.result&&e.originalEvent&&(e.originalEvent.returnValue=e.result)}}}},E.removeEvent=function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n)},E.Event=function(e,t){if(!(this instanceof E.Event))return new E.Event(e,t);e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||void 0===e.defaultPrevented&&!1===e.returnValue?Fe:Ye,this.target=e.target&&3===e.target.nodeType?e.target.parentNode:e.target,this.currentTarget=e.currentTarget,this.relatedTarget=e.relatedTarget):this.type=e,t&&E.extend(this,t),this.timeStamp=e&&e.timeStamp||Date.now(),this[E.expando]=!0},E.Event.prototype={constructor:E.Event,isDefaultPrevented:Ye,isPropagationStopped:Ye,isImmediatePropagationStopped:Ye,isSimulated:!1,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=Fe,e&&!this.isSimulated&&e.preventDefault()},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=Fe,e&&!this.isSimulated&&e.stopPropagation()},stopImmediatePropagation:function(){var e=this.originalEvent;this.isImmediatePropagationStopped=Fe,e&&!this.isSimulated&&e.stopImmediatePropagation(),this.stopPropagation()}},E.each({altKey:!0,bubbles:!0,cancelable:!0,changedTouches:!0,ctrlKey:!0,detail:!0,eventPhase:!0,metaKey:!0,pageX:!0,pageY:!0,shiftKey:!0,view:!0,char:!0,code:!0,charCode:!0,key:!0,keyCode:!0,button:!0,buttons:!0,clientX:!0,clientY:!0,offsetX:!0,offsetY:!0,pointerId:!0,pointerType:!0,screenX:!0,screenY:!0,targetTouches:!0,toElement:!0,touches:!0,which:!0},E.event.addProp),E.each({focus:"focusin",blur:"focusout"},(function(e,t){function n(e){if(S.documentMode){var n=ue.get(this,"handle"),r=E.event.fix(e);r.type="focusin"===e.type?"focus":"blur",r.isSimulated=!0,n(e),r.target===r.currentTarget&&n(r)}else E.event.simulate(t,e.target,E.event.fix(e))}E.event.special[e]={setup:function(){var r;if(ke(this,e,!0),!S.documentMode)return!1;r=ue.get(this,t),r||this.addEventListener(t,n),ue.set(this,t,(r||0)+1)},trigger:function(){return ke(this,e),!0},teardown:function(){var e;if(!S.documentMode)return!1;e=ue.get(this,t)-1,e?ue.set(this,t,e):(this.removeEventListener(t,n),ue.remove(this,t))},_default:function(t){return ue.get(t.target,e)},delegateType:t},E.event.special[t]={setup:function(){var r=this.ownerDocument||this.document||this,i=S.documentMode?this:r,s=ue.get(i,t);s||(S.documentMode?this.addEventListener(t,n):r.addEventListener(e,n,!0)),ue.set(i,t,(s||0)+1)},teardown:function(){var r=this.ownerDocument||this.document||this,i=S.documentMode?this:r,s=ue.get(i,t)-1;s?ue.set(i,t,s):(S.documentMode?this.removeEventListener(t,n):r.removeEventListener(e,n,!0),ue.remove(i,t))}}})),E.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},(function(e,t){E.event.special[e]={delegateType:t,bindType:t,handle:function(e){var n,r=this,i=e.relatedTarget,s=e.handleObj;return i&&(i===r||E.contains(r,i))||(e.type=s.origType,n=s.handler.apply(this,arguments),e.type=t),n}}})),E.fn.extend({on:function(e,t,n,r){return He(this,e,t,n,r)},one:function(e,t,n,r){return He(this,e,t,n,r,1)},off:function(e,t,n){var r,i;if(e&&e.preventDefault&&e.handleObj)return r=e.handleObj,E(e.delegateTarget).off(r.namespace?r.origType+"."+r.namespace:r.origType,r.selector,r.handler),this;if("object"===typeof e){for(i in e)this.off(i,t,e[i]);return this}return!1!==t&&"function"!==typeof t||(n=t,t=void 0),!1===n&&(n=Ye),this.each((function(){E.event.remove(this,e,n,t)}))}});var Ve=/<script|<style|<link/i,Ue=/checked\s*(?:[^=]|=\s*.checked.)/i,We=/^\s*<!\[CDATA\[|\]\]>\s*$/g;function Xe(e,t){return L(e,"table")&&L(11!==t.nodeType?t:t.firstChild,"tr")&&E(e).children("tbody")[0]||e}function je(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function Ze(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function Qe(e,t){var n,r,i,s,o,a,l;if(1===t.nodeType){if(ue.hasData(e)&&(s=ue.get(e),l=s.events,l))for(i in ue.remove(t,"handle events"),l)for(n=0,r=l[i].length;n<r;n++)E.event.add(t,i,l[i][n]);he.hasData(e)&&(o=he.access(e),a=E.extend({},o),he.set(t,a))}}function Ke(e,t){var n=t.nodeName.toLowerCase();"input"===n&&Ce.test(e.type)?t.checked=e.checked:"input"!==n&&"textarea"!==n||(t.defaultValue=e.defaultValue)}function Ge(e,t,n,r){t=c(t);var i,s,o,a,l,u,h=0,d=e.length,m=d-1,g=t[0],p=y(g);if(p||d>1&&"string"===typeof g&&!R.checkClone&&Ue.test(g))return e.each((function(i){var s=e.eq(i);p&&(t[0]=g.call(this,i,s.html())),Ge(s,t,n,r)}));if(d&&(i=De(t,e[0].ownerDocument,!1,e,r),s=i.firstChild,1===i.childNodes.length&&(i=s),s||r)){for(o=E.map(Ie(i,"script"),je),a=o.length;h<d;h++)l=i,h!==m&&(l=E.clone(l,!0,!0),a&&E.merge(o,Ie(l,"script"))),n.call(e[h],l,h);if(a)for(u=o[o.length-1].ownerDocument,E.map(o,Ze),h=0;h<a;h++)l=o[h],Ne.test(l.type||"")&&!ue.access(l,"globalEval")&&E.contains(u,l)&&(l.src&&"module"!==(l.type||"").toLowerCase()?E._evalUrl&&!l.noModule&&E._evalUrl(l.src,{nonce:l.nonce||l.getAttribute("nonce")},u):w(l.textContent.replace(We,""),l,u))}return e}function Be(e,t,n){for(var r,i=t?E.filter(t,e):e,s=0;null!=(r=i[s]);s++)n||1!==r.nodeType||E.cleanData(Ie(r)),r.parentNode&&(n&&Se(r)&&Pe(Ie(r,"script")),r.parentNode.removeChild(r));return e}E.extend({htmlPrefilter:function(e){return e},clone:function(e,t,n){var r,i,s,o,a=e.cloneNode(!0),l=Se(e);if(!R.noCloneChecked&&(1===e.nodeType||11===e.nodeType)&&!E.isXMLDoc(e))for(o=Ie(a),s=Ie(e),r=0,i=s.length;r<i;r++)Ke(s[r],o[r]);if(t)if(n)for(s=s||Ie(e),o=o||Ie(a),r=0,i=s.length;r<i;r++)Qe(s[r],o[r]);else Qe(e,a);return o=Ie(a,"script"),o.length>0&&Pe(o,!l&&Ie(e,"script")),a},cleanData:function(e){for(var t,n,r,i=E.event.special,s=0;void 0!==(n=e[s]);s++)if(le(n)){if(t=n[ue.expando]){if(t.events)for(r in t.events)i[r]?E.event.remove(n,r):E.removeEvent(n,r,t.handle);n[ue.expando]=void 0}n[he.expando]&&(n[he.expando]=void 0)}}}),E.fn.extend({detach:function(e){return Be(this,e,!0)},remove:function(e){return Be(this,e)},text:function(e){return re(this,(function(e){return void 0===e?E.text(this):this.empty().each((function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=e)}))}),null,e,arguments.length)},append:function(){return Ge(this,arguments,(function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=Xe(this,e);t.appendChild(e)}}))},prepend:function(){return Ge(this,arguments,(function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=Xe(this,e);t.insertBefore(e,t.firstChild)}}))},before:function(){return Ge(this,arguments,(function(e){this.parentNode&&this.parentNode.insertBefore(e,this)}))},after:function(){return Ge(this,arguments,(function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)}))},empty:function(){for(var e,t=0;null!=(e=this[t]);t++)1===e.nodeType&&(E.cleanData(Ie(e,!1)),e.textContent="");return this},clone:function(e,t){return e=null!=e&&e,t=null==t?e:t,this.map((function(){return E.clone(this,e,t)}))},html:function(e){return re(this,(function(e){var t=this[0]||{},n=0,r=this.length;if(void 0===e&&1===t.nodeType)return t.innerHTML;if("string"===typeof e&&!Ve.test(e)&&!_e[(Le.exec(e)||["",""])[1].toLowerCase()]){e=E.htmlPrefilter(e);try{for(;n<r;n++)t=this[n]||{},1===t.nodeType&&(E.cleanData(Ie(t,!1)),t.innerHTML=e);t=0}catch(i){}}t&&this.empty().append(e)}),null,e,arguments.length)},replaceWith:function(){var e=[];return Ge(this,arguments,(function(t){var n=this.parentNode;E.inArray(this,e)<0&&(E.cleanData(Ie(this)),n&&n.replaceChild(t,this))}),e)}}),E.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},(function(e,t){E.fn[e]=function(e){for(var n,r=[],i=E(e),s=i.length-1,o=0;o<=s;o++)n=o===s?this:this.clone(!0),E(i[o])[t](n),u.apply(r,n.get());return this.pushStack(r)}}));var Je=new RegExp("^("+fe+")(?!px)[a-z%]+$","i"),ze=/^--/,$e=function(e){var t=e.ownerDocument.defaultView;return t&&t.opener||(t=n),t.getComputedStyle(e)},qe=function(e,t,n){var r,i,s={};for(i in t)s[i]=e.style[i],e.style[i]=t[i];for(i in r=n.call(e),t)e.style[i]=s[i];return r},et=new RegExp(ye.join("|"),"i");function tt(e,t,n){var r,i,s,o,a=ze.test(t),l=e.style;return n=n||$e(e),n&&(o=n.getPropertyValue(t)||n[t],a&&o&&(o=o.replace(x,"$1")||void 0),""!==o||Se(e)||(o=E.style(e,t)),!R.pixelBoxStyles()&&Je.test(o)&&et.test(t)&&(r=l.width,i=l.minWidth,s=l.maxWidth,l.minWidth=l.maxWidth=l.width=o,o=n.width,l.width=r,l.minWidth=i,l.maxWidth=s)),void 0!==o?o+"":o}function nt(e,t){return{get:function(){if(!e())return(this.get=t).apply(this,arguments);delete this.get}}}(function(){function e(){if(u){c.style.cssText="position:absolute;left:-11111px;width:60px;margin-top:1px;padding:0;border:0",u.style.cssText="position:relative;display:block;box-sizing:border-box;overflow:scroll;margin:auto;border:1px;padding:1px;width:60%;top:1%",Me.appendChild(c).appendChild(u);var e=n.getComputedStyle(u);r="1%"!==e.top,l=12===t(e.marginLeft),u.style.right="60%",o=36===t(e.right),i=36===t(e.width),u.style.position="absolute",s=12===t(u.offsetWidth/3),Me.removeChild(c),u=null}}function t(e){return Math.round(parseFloat(e))}var r,i,s,o,a,l,c=S.createElement("div"),u=S.createElement("div");u.style&&(u.style.backgroundClip="content-box",u.cloneNode(!0).style.backgroundClip="",R.clearCloneStyle="content-box"===u.style.backgroundClip,E.extend(R,{boxSizingReliable:function(){return e(),i},pixelBoxStyles:function(){return e(),o},pixelPosition:function(){return e(),r},reliableMarginLeft:function(){return e(),l},scrollboxSize:function(){return e(),s},reliableTrDimensions:function(){var e,t,r,i;return null==a&&(e=S.createElement("table"),t=S.createElement("tr"),r=S.createElement("div"),e.style.cssText="position:absolute;left:-11111px;border-collapse:separate",t.style.cssText="box-sizing:content-box;border:1px solid",t.style.height="1px",r.style.height="9px",r.style.display="block",Me.appendChild(e).appendChild(t).appendChild(r),i=n.getComputedStyle(t),a=parseInt(i.height,10)+parseInt(i.borderTopWidth,10)+parseInt(i.borderBottomWidth,10)===t.offsetHeight,Me.removeChild(e)),a}}))})();var rt=["Webkit","Moz","ms"],it=S.createElement("div").style,st={};function ot(e){var t=e[0].toUpperCase()+e.slice(1),n=rt.length;while(n--)if(e=rt[n]+t,e in it)return e}function at(e){var t=E.cssProps[e]||st[e];return t||(e in it?e:st[e]=ot(e)||e)}var lt=/^(none|table(?!-c[ea]).+)/,ct={position:"absolute",visibility:"hidden",display:"block"},ut={letterSpacing:"0",fontWeight:"400"};function ht(e,t,n){var r=Re.exec(t);return r?Math.max(0,r[2]-(n||0))+(r[3]||"px"):t}function dt(e,t,n,r,i,s){var o="width"===t?1:0,a=0,l=0,c=0;if(n===(r?"border":"content"))return 0;for(;o<4;o+=2)"margin"===n&&(c+=E.css(e,n+ye[o],!0,i)),r?("content"===n&&(l-=E.css(e,"padding"+ye[o],!0,i)),"margin"!==n&&(l-=E.css(e,"border"+ye[o]+"Width",!0,i))):(l+=E.css(e,"padding"+ye[o],!0,i),"padding"!==n?l+=E.css(e,"border"+ye[o]+"Width",!0,i):a+=E.css(e,"border"+ye[o]+"Width",!0,i));return!r&&s>=0&&(l+=Math.max(0,Math.ceil(e["offset"+t[0].toUpperCase()+t.slice(1)]-s-l-a-.5))||0),l+c}function mt(e,t,n){var r=$e(e),i=!R.boxSizingReliable()||n,s=i&&"border-box"===E.css(e,"boxSizing",!1,r),o=s,a=tt(e,t,r),l="offset"+t[0].toUpperCase()+t.slice(1);if(Je.test(a)){if(!n)return a;a="auto"}return(!R.boxSizingReliable()&&s||!R.reliableTrDimensions()&&L(e,"tr")||"auto"===a||!parseFloat(a)&&"inline"===E.css(e,"display",!1,r))&&e.getClientRects().length&&(s="border-box"===E.css(e,"boxSizing",!1,r),o=l in e,o&&(a=e[l])),a=parseFloat(a)||0,a+dt(e,t,n||(s?"border":"content"),o,r,a)+"px"}function gt(e,t,n,r,i){return new gt.prototype.init(e,t,n,r,i)}E.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=tt(e,"opacity");return""===n?"1":n}}}},cssNumber:{animationIterationCount:!0,aspectRatio:!0,borderImageSlice:!0,columnCount:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,gridArea:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnStart:!0,gridRow:!0,gridRowEnd:!0,gridRowStart:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,scale:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeMiterlimit:!0,strokeOpacity:!0},cssProps:{},style:function(e,t,n,r){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var i,s,o,a=ae(t),l=ze.test(t),c=e.style;if(l||(t=at(a)),o=E.cssHooks[t]||E.cssHooks[a],void 0===n)return o&&"get"in o&&void 0!==(i=o.get(e,!1,r))?i:c[t];s=typeof n,"string"===s&&(i=Re.exec(n))&&i[1]&&(n=Te(e,t,i),s="number"),null!=n&&n===n&&("number"!==s||l||(n+=i&&i[3]||(E.cssNumber[a]?"":"px")),R.clearCloneStyle||""!==n||0!==t.indexOf("background")||(c[t]="inherit"),o&&"set"in o&&void 0===(n=o.set(e,n,r))||(l?c.setProperty(t,n):c[t]=n))}},css:function(e,t,n,r){var i,s,o,a=ae(t),l=ze.test(t);return l||(t=at(a)),o=E.cssHooks[t]||E.cssHooks[a],o&&"get"in o&&(i=o.get(e,!0,n)),void 0===i&&(i=tt(e,t,r)),"normal"===i&&t in ut&&(i=ut[t]),""===n||n?(s=parseFloat(i),!0===n||isFinite(s)?s||0:i):i}}),E.each(["height","width"],(function(e,t){E.cssHooks[t]={get:function(e,n,r){if(n)return!lt.test(E.css(e,"display"))||e.getClientRects().length&&e.getBoundingClientRect().width?mt(e,t,r):qe(e,ct,(function(){return mt(e,t,r)}))},set:function(e,n,r){var i,s=$e(e),o=!R.scrollboxSize()&&"absolute"===s.position,a=o||r,l=a&&"border-box"===E.css(e,"boxSizing",!1,s),c=r?dt(e,t,r,l,s):0;return l&&o&&(c-=Math.ceil(e["offset"+t[0].toUpperCase()+t.slice(1)]-parseFloat(s[t])-dt(e,t,"border",!1,s)-.5)),c&&(i=Re.exec(n))&&"px"!==(i[3]||"px")&&(e.style[t]=n,n=E.css(e,t)),ht(e,n,c)}}})),E.cssHooks.marginLeft=nt(R.reliableMarginLeft,(function(e,t){if(t)return(parseFloat(tt(e,"marginLeft"))||e.getBoundingClientRect().left-qe(e,{marginLeft:0},(function(){return e.getBoundingClientRect().left})))+"px"})),E.each({margin:"",padding:"",border:"Width"},(function(e,t){E.cssHooks[e+t]={expand:function(n){for(var r=0,i={},s="string"===typeof n?n.split(" "):[n];r<4;r++)i[e+ye[r]+t]=s[r]||s[r-2]||s[0];return i}},"margin"!==e&&(E.cssHooks[e+t].set=ht)})),E.fn.extend({css:function(e,t){return re(this,(function(e,t,n){var r,i,s={},o=0;if(Array.isArray(t)){for(r=$e(e),i=t.length;o<i;o++)s[t[o]]=E.css(e,t[o],!1,r);return s}return void 0!==n?E.style(e,t,n):E.css(e,t)}),e,t,arguments.length>1)}}),E.Tween=gt,gt.prototype={constructor:gt,init:function(e,t,n,r,i,s){this.elem=e,this.prop=n,this.easing=i||E.easing._default,this.options=t,this.start=this.now=this.cur(),this.end=r,this.unit=s||(E.cssNumber[n]?"":"px")},cur:function(){var e=gt.propHooks[this.prop];return e&&e.get?e.get(this):gt.propHooks._default.get(this)},run:function(e){var t,n=gt.propHooks[this.prop];return this.options.duration?this.pos=t=E.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):this.pos=t=e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):gt.propHooks._default.set(this),this}},gt.prototype.init.prototype=gt.prototype,gt.propHooks={_default:{get:function(e){var t;return 1!==e.elem.nodeType||null!=e.elem[e.prop]&&null==e.elem.style[e.prop]?e.elem[e.prop]:(t=E.css(e.elem,e.prop,""),t&&"auto"!==t?t:0)},set:function(e){E.fx.step[e.prop]?E.fx.step[e.prop](e):1!==e.elem.nodeType||!E.cssHooks[e.prop]&&null==e.elem.style[at(e.prop)]?e.elem[e.prop]=e.now:E.style(e.elem,e.prop,e.now+e.unit)}}},gt.propHooks.scrollTop=gt.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},E.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2},_default:"swing"},E.fx=gt.prototype.init,E.fx.step={};var pt,ft,Rt=/^(?:toggle|show|hide)$/,yt=/queueHooks$/;function Mt(){ft&&(!1===S.hidden&&n.requestAnimationFrame?n.requestAnimationFrame(Mt):n.setTimeout(Mt,E.fx.interval),E.fx.tick())}function St(){return n.setTimeout((function(){pt=void 0})),pt=Date.now()}function bt(e,t){var n,r=0,i={height:e};for(t=t?1:0;r<4;r+=2-t)n=ye[r],i["margin"+n]=i["padding"+n]=e;return t&&(i.opacity=i.width=e),i}function wt(e,t,n){for(var r,i=(vt.tweeners[t]||[]).concat(vt.tweeners["*"]),s=0,o=i.length;s<o;s++)if(r=i[s].call(n,t,e))return r}function Tt(e,t,n){var r,i,s,o,a,l,c,u,h="width"in t||"height"in t,d=this,m={},g=e.style,p=e.nodeType&&we(e),f=ue.get(e,"fxshow");for(r in n.queue||(o=E._queueHooks(e,"fx"),null==o.unqueued&&(o.unqueued=0,a=o.empty.fire,o.empty.fire=function(){o.unqueued||a()}),o.unqueued++,d.always((function(){d.always((function(){o.unqueued--,E.queue(e,"fx").length||o.empty.fire()}))}))),t)if(i=t[r],Rt.test(i)){if(delete t[r],s=s||"toggle"===i,i===(p?"hide":"show")){if("show"!==i||!f||void 0===f[r])continue;p=!0}m[r]=f&&f[r]||E.style(e,r)}if(l=!E.isEmptyObject(t),l||!E.isEmptyObject(m))for(r in h&&1===e.nodeType&&(n.overflow=[g.overflow,g.overflowX,g.overflowY],c=f&&f.display,null==c&&(c=ue.get(e,"display")),u=E.css(e,"display"),"none"===u&&(c?u=c:(Ee([e],!0),c=e.style.display||c,u=E.css(e,"display"),Ee([e]))),("inline"===u||"inline-block"===u&&null!=c)&&"none"===E.css(e,"float")&&(l||(d.done((function(){g.display=c})),null==c&&(u=g.display,c="none"===u?"":u)),g.display="inline-block")),n.overflow&&(g.overflow="hidden",d.always((function(){g.overflow=n.overflow[0],g.overflowX=n.overflow[1],g.overflowY=n.overflow[2]}))),l=!1,m)l||(f?"hidden"in f&&(p=f.hidden):f=ue.access(e,"fxshow",{display:c}),s&&(f.hidden=!p),p&&Ee([e],!0),d.done((function(){for(r in p||Ee([e]),ue.remove(e,"fxshow"),m)E.style(e,r,m[r])}))),l=wt(p?f[r]:0,r,d),r in f||(f[r]=l.start,p&&(l.end=l.start,l.start=0))}function Ot(e,t){var n,r,i,s,o;for(n in e)if(r=ae(n),i=t[r],s=e[n],Array.isArray(s)&&(i=s[1],s=e[n]=s[0]),n!==r&&(e[r]=s,delete e[n]),o=E.cssHooks[r],o&&"expand"in o)for(n in s=o.expand(s),delete e[r],s)n in e||(e[n]=s[n],t[n]=i);else t[r]=i}function vt(e,t,n){var r,i,s=0,o=vt.prefilters.length,a=E.Deferred().always((function(){delete l.elem})),l=function(){if(i)return!1;for(var t=pt||St(),n=Math.max(0,c.startTime+c.duration-t),r=n/c.duration||0,s=1-r,o=0,l=c.tweens.length;o<l;o++)c.tweens[o].run(s);return a.notifyWith(e,[c,s,n]),s<1&&l?n:(l||a.notifyWith(e,[c,1,0]),a.resolveWith(e,[c]),!1)},c=a.promise({elem:e,props:E.extend({},t),opts:E.extend(!0,{specialEasing:{},easing:E.easing._default},n),originalProperties:t,originalOptions:n,startTime:pt||St(),duration:n.duration,tweens:[],createTween:function(t,n){var r=E.Tween(e,c.opts,t,n,c.opts.specialEasing[t]||c.opts.easing);return c.tweens.push(r),r},stop:function(t){var n=0,r=t?c.tweens.length:0;if(i)return this;for(i=!0;n<r;n++)c.tweens[n].run(1);return t?(a.notifyWith(e,[c,1,0]),a.resolveWith(e,[c,t])):a.rejectWith(e,[c,t]),this}}),u=c.props;for(Ot(u,c.opts.specialEasing);s<o;s++)if(r=vt.prefilters[s].call(c,e,u,c.opts),r)return y(r.stop)&&(E._queueHooks(c.elem,c.opts.queue).stop=r.stop.bind(r)),r;return E.map(u,wt,c),y(c.opts.start)&&c.opts.start.call(e,c),c.progress(c.opts.progress).done(c.opts.done,c.opts.complete).fail(c.opts.fail).always(c.opts.always),E.fx.timer(E.extend(l,{elem:e,anim:c,queue:c.opts.queue})),c}E.Animation=E.extend(vt,{tweeners:{"*":[function(e,t){var n=this.createTween(e,t);return Te(n.elem,e,Re.exec(t),n),n}]},tweener:function(e,t){y(e)?(t=e,e=["*"]):e=e.match(B);for(var n,r=0,i=e.length;r<i;r++)n=e[r],vt.tweeners[n]=vt.tweeners[n]||[],vt.tweeners[n].unshift(t)},prefilters:[Tt],prefilter:function(e,t){t?vt.prefilters.unshift(e):vt.prefilters.push(e)}}),E.speed=function(e,t,n){var r=e&&"object"===typeof e?E.extend({},e):{complete:n||!n&&t||y(e)&&e,duration:e,easing:n&&t||t&&!y(t)&&t};return E.fx.off?r.duration=0:"number"!==typeof r.duration&&(r.duration in E.fx.speeds?r.duration=E.fx.speeds[r.duration]:r.duration=E.fx.speeds._default),null!=r.queue&&!0!==r.queue||(r.queue="fx"),r.old=r.complete,r.complete=function(){y(r.old)&&r.old.call(this),r.queue&&E.dequeue(this,r.queue)},r},E.fn.extend({fadeTo:function(e,t,n,r){return this.filter(we).css("opacity",0).show().end().animate({opacity:t},e,n,r)},animate:function(e,t,n,r){var i=E.isEmptyObject(e),s=E.speed(t,n,r),o=function(){var t=vt(this,E.extend({},e),s);(i||ue.get(this,"finish"))&&t.stop(!0)};return o.finish=o,i||!1===s.queue?this.each(o):this.queue(s.queue,o)},stop:function(e,t,n){var r=function(e){var t=e.stop;delete e.stop,t(n)};return"string"!==typeof e&&(n=t,t=e,e=void 0),t&&this.queue(e||"fx",[]),this.each((function(){var t=!0,i=null!=e&&e+"queueHooks",s=E.timers,o=ue.get(this);if(i)o[i]&&o[i].stop&&r(o[i]);else for(i in o)o[i]&&o[i].stop&&yt.test(i)&&r(o[i]);for(i=s.length;i--;)s[i].elem!==this||null!=e&&s[i].queue!==e||(s[i].anim.stop(n),t=!1,s.splice(i,1));!t&&n||E.dequeue(this,e)}))},finish:function(e){return!1!==e&&(e=e||"fx"),this.each((function(){var t,n=ue.get(this),r=n[e+"queue"],i=n[e+"queueHooks"],s=E.timers,o=r?r.length:0;for(n.finish=!0,E.queue(this,e,[]),i&&i.stop&&i.stop.call(this,!0),t=s.length;t--;)s[t].elem===this&&s[t].queue===e&&(s[t].anim.stop(!0),s.splice(t,1));for(t=0;t<o;t++)r[t]&&r[t].finish&&r[t].finish.call(this);delete n.finish}))}}),E.each(["toggle","show","hide"],(function(e,t){var n=E.fn[t];E.fn[t]=function(e,r,i){return null==e||"boolean"===typeof e?n.apply(this,arguments):this.animate(bt(t,!0),e,r,i)}})),E.each({slideDown:bt("show"),slideUp:bt("hide"),slideToggle:bt("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},(function(e,t){E.fn[e]=function(e,n,r){return this.animate(t,e,n,r)}})),E.timers=[],E.fx.tick=function(){var e,t=0,n=E.timers;for(pt=Date.now();t<n.length;t++)e=n[t],e()||n[t]!==e||n.splice(t--,1);n.length||E.fx.stop(),pt=void 0},E.fx.timer=function(e){E.timers.push(e),E.fx.start()},E.fx.interval=13,E.fx.start=function(){ft||(ft=!0,Mt())},E.fx.stop=function(){ft=null},E.fx.speeds={slow:600,fast:200,_default:400},E.fn.delay=function(e,t){return e=E.fx&&E.fx.speeds[e]||e,t=t||"fx",this.queue(t,(function(t,r){var i=n.setTimeout(t,e);r.stop=function(){n.clearTimeout(i)}}))},function(){var e=S.createElement("input"),t=S.createElement("select"),n=t.appendChild(S.createElement("option"));e.type="checkbox",R.checkOn=""!==e.value,R.optSelected=n.selected,e=S.createElement("input"),e.value="t",e.type="radio",R.radioValue="t"===e.value}();var Et,Ct=E.expr.attrHandle;E.fn.extend({attr:function(e,t){return re(this,E.attr,e,t,arguments.length>1)},removeAttr:function(e){return this.each((function(){E.removeAttr(this,e)}))}}),E.extend({attr:function(e,t,n){var r,i,s=e.nodeType;if(3!==s&&8!==s&&2!==s)return"undefined"===typeof e.getAttribute?E.prop(e,t,n):(1===s&&E.isXMLDoc(e)||(i=E.attrHooks[t.toLowerCase()]||(E.expr.match.bool.test(t)?Et:void 0)),void 0!==n?null===n?void E.removeAttr(e,t):i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:(e.setAttribute(t,n+""),n):i&&"get"in i&&null!==(r=i.get(e,t))?r:(r=E.find.attr(e,t),null==r?void 0:r))},attrHooks:{type:{set:function(e,t){if(!R.radioValue&&"radio"===t&&L(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},removeAttr:function(e,t){var n,r=0,i=t&&t.match(B);if(i&&1===e.nodeType)while(n=i[r++])e.removeAttribute(n)}}),Et={set:function(e,t,n){return!1===t?E.removeAttr(e,n):e.setAttribute(n,n),n}},E.each(E.expr.match.bool.source.match(/\w+/g),(function(e,t){var n=Ct[t]||E.find.attr;Ct[t]=function(e,t,r){var i,s,o=t.toLowerCase();return r||(s=Ct[o],Ct[o]=i,i=null!=n(e,t,r)?o:null,Ct[o]=s),i}}));var Lt=/^(?:input|select|textarea|button)$/i,Nt=/^(?:a|area)$/i;function _t(e){var t=e.match(B)||[];return t.join(" ")}function It(e){return e.getAttribute&&e.getAttribute("class")||""}function Pt(e){return Array.isArray(e)?e:"string"===typeof e&&e.match(B)||[]}E.fn.extend({prop:function(e,t){return re(this,E.prop,e,t,arguments.length>1)},removeProp:function(e){return this.each((function(){delete this[E.propFix[e]||e]}))}}),E.extend({prop:function(e,t,n){var r,i,s=e.nodeType;if(3!==s&&8!==s&&2!==s)return 1===s&&E.isXMLDoc(e)||(t=E.propFix[t]||t,i=E.propHooks[t]),void 0!==n?i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:e[t]=n:i&&"get"in i&&null!==(r=i.get(e,t))?r:e[t]},propHooks:{tabIndex:{get:function(e){var t=E.find.attr(e,"tabindex");return t?parseInt(t,10):Lt.test(e.nodeName)||Nt.test(e.nodeName)&&e.href?0:-1}}},propFix:{for:"htmlFor",class:"className"}}),R.optSelected||(E.propHooks.selected={get:function(e){var t=e.parentNode;return t&&t.parentNode&&t.parentNode.selectedIndex,null},set:function(e){var t=e.parentNode;t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex)}}),E.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],(function(){E.propFix[this.toLowerCase()]=this})),E.fn.extend({addClass:function(e){var t,n,r,i,s,o;return y(e)?this.each((function(t){E(this).addClass(e.call(this,t,It(this)))})):(t=Pt(e),t.length?this.each((function(){if(r=It(this),n=1===this.nodeType&&" "+_t(r)+" ",n){for(s=0;s<t.length;s++)i=t[s],n.indexOf(" "+i+" ")<0&&(n+=i+" ");o=_t(n),r!==o&&this.setAttribute("class",o)}})):this)},removeClass:function(e){var t,n,r,i,s,o;return y(e)?this.each((function(t){E(this).removeClass(e.call(this,t,It(this)))})):arguments.length?(t=Pt(e),t.length?this.each((function(){if(r=It(this),n=1===this.nodeType&&" "+_t(r)+" ",n){for(s=0;s<t.length;s++){i=t[s];while(n.indexOf(" "+i+" ")>-1)n=n.replace(" "+i+" "," ")}o=_t(n),r!==o&&this.setAttribute("class",o)}})):this):this.attr("class","")},toggleClass:function(e,t){var n,r,i,s,o=typeof e,a="string"===o||Array.isArray(e);return y(e)?this.each((function(n){E(this).toggleClass(e.call(this,n,It(this),t),t)})):"boolean"===typeof t&&a?t?this.addClass(e):this.removeClass(e):(n=Pt(e),this.each((function(){if(a)for(s=E(this),i=0;i<n.length;i++)r=n[i],s.hasClass(r)?s.removeClass(r):s.addClass(r);else void 0!==e&&"boolean"!==o||(r=It(this),r&&ue.set(this,"__className__",r),this.setAttribute&&this.setAttribute("class",r||!1===e?"":ue.get(this,"__className__")||""))})))},hasClass:function(e){var t,n,r=0;t=" "+e+" ";while(n=this[r++])if(1===n.nodeType&&(" "+_t(It(n))+" ").indexOf(t)>-1)return!0;return!1}});var xt=/\r/g;E.fn.extend({val:function(e){var t,n,r,i=this[0];return arguments.length?(r=y(e),this.each((function(n){var i;1===this.nodeType&&(i=r?e.call(this,n,E(this).val()):e,null==i?i="":"number"===typeof i?i+="":Array.isArray(i)&&(i=E.map(i,(function(e){return null==e?"":e+""}))),t=E.valHooks[this.type]||E.valHooks[this.nodeName.toLowerCase()],t&&"set"in t&&void 0!==t.set(this,i,"value")||(this.value=i))}))):i?(t=E.valHooks[i.type]||E.valHooks[i.nodeName.toLowerCase()],t&&"get"in t&&void 0!==(n=t.get(i,"value"))?n:(n=i.value,"string"===typeof n?n.replace(xt,""):null==n?"":n)):void 0}}),E.extend({valHooks:{option:{get:function(e){var t=E.find.attr(e,"value");return null!=t?t:_t(E.text(e))}},select:{get:function(e){var t,n,r,i=e.options,s=e.selectedIndex,o="select-one"===e.type,a=o?null:[],l=o?s+1:i.length;for(r=s<0?l:o?s:0;r<l;r++)if(n=i[r],(n.selected||r===s)&&!n.disabled&&(!n.parentNode.disabled||!L(n.parentNode,"optgroup"))){if(t=E(n).val(),o)return t;a.push(t)}return a},set:function(e,t){var n,r,i=e.options,s=E.makeArray(t),o=i.length;while(o--)r=i[o],(r.selected=E.inArray(E.valHooks.option.get(r),s)>-1)&&(n=!0);return n||(e.selectedIndex=-1),s}}}}),E.each(["radio","checkbox"],(function(){E.valHooks[this]={set:function(e,t){if(Array.isArray(t))return e.checked=E.inArray(E(e).val(),t)>-1}},R.checkOn||(E.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})}));var Dt=n.location,At={guid:Date.now()},Ft=/\?/;E.parseXML=function(e){var t,r;if(!e||"string"!==typeof e)return null;try{t=(new n.DOMParser).parseFromString(e,"text/xml")}catch(i){}return r=t&&t.getElementsByTagName("parsererror")[0],t&&!r||E.error("Invalid XML: "+(r?E.map(r.childNodes,(function(e){return e.textContent})).join("\n"):e)),t};var Yt=/^(?:focusinfocus|focusoutblur)$/,Ht=function(e){e.stopPropagation()};E.extend(E.event,{trigger:function(e,t,r,i){var s,o,a,l,c,u,h,d,m=[r||S],p=g.call(e,"type")?e.type:e,f=g.call(e,"namespace")?e.namespace.split("."):[];if(o=d=a=r=r||S,3!==r.nodeType&&8!==r.nodeType&&!Yt.test(p+E.event.triggered)&&(p.indexOf(".")>-1&&(f=p.split("."),p=f.shift(),f.sort()),c=p.indexOf(":")<0&&"on"+p,e=e[E.expando]?e:new E.Event(p,"object"===typeof e&&e),e.isTrigger=i?2:3,e.namespace=f.join("."),e.rnamespace=e.namespace?new RegExp("(^|\\.)"+f.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,e.result=void 0,e.target||(e.target=r),t=null==t?[e]:E.makeArray(t,[e]),h=E.event.special[p]||{},i||!h.trigger||!1!==h.trigger.apply(r,t))){if(!i&&!h.noBubble&&!M(r)){for(l=h.delegateType||p,Yt.test(l+p)||(o=o.parentNode);o;o=o.parentNode)m.push(o),a=o;a===(r.ownerDocument||S)&&m.push(a.defaultView||a.parentWindow||n)}s=0;while((o=m[s++])&&!e.isPropagationStopped())d=o,e.type=s>1?l:h.bindType||p,u=(ue.get(o,"events")||Object.create(null))[e.type]&&ue.get(o,"handle"),u&&u.apply(o,t),u=c&&o[c],u&&u.apply&&le(o)&&(e.result=u.apply(o,t),!1===e.result&&e.preventDefault());return e.type=p,i||e.isDefaultPrevented()||h._default&&!1!==h._default.apply(m.pop(),t)||!le(r)||c&&y(r[p])&&!M(r)&&(a=r[c],a&&(r[c]=null),E.event.triggered=p,e.isPropagationStopped()&&d.addEventListener(p,Ht),r[p](),e.isPropagationStopped()&&d.removeEventListener(p,Ht),E.event.triggered=void 0,a&&(r[c]=a)),e.result}},simulate:function(e,t,n){var r=E.extend(new E.Event,n,{type:e,isSimulated:!0});E.event.trigger(r,null,t)}}),E.fn.extend({trigger:function(e,t){return this.each((function(){E.event.trigger(e,t,this)}))},triggerHandler:function(e,t){var n=this[0];if(n)return E.event.trigger(e,t,n,!0)}});var kt=/\[\]$/,Vt=/\r?\n/g,Ut=/^(?:submit|button|image|reset|file)$/i,Wt=/^(?:input|select|textarea|keygen)/i;function Xt(e,t,n,r){var i;if(Array.isArray(t))E.each(t,(function(t,i){n||kt.test(e)?r(e,i):Xt(e+"["+("object"===typeof i&&null!=i?t:"")+"]",i,n,r)}));else if(n||"object"!==T(t))r(e,t);else for(i in t)Xt(e+"["+i+"]",t[i],n,r)}E.param=function(e,t){var n,r=[],i=function(e,t){var n=y(t)?t():t;r[r.length]=encodeURIComponent(e)+"="+encodeURIComponent(null==n?"":n)};if(null==e)return"";if(Array.isArray(e)||e.jquery&&!E.isPlainObject(e))E.each(e,(function(){i(this.name,this.value)}));else for(n in e)Xt(n,e[n],t,i);return r.join("&")},E.fn.extend({serialize:function(){return E.param(this.serializeArray())},serializeArray:function(){return this.map((function(){var e=E.prop(this,"elements");return e?E.makeArray(e):this})).filter((function(){var e=this.type;return this.name&&!E(this).is(":disabled")&&Wt.test(this.nodeName)&&!Ut.test(e)&&(this.checked||!Ce.test(e))})).map((function(e,t){var n=E(this).val();return null==n?null:Array.isArray(n)?E.map(n,(function(e){return{name:t.name,value:e.replace(Vt,"\r\n")}})):{name:t.name,value:n.replace(Vt,"\r\n")}})).get()}});var jt=/%20/g,Zt=/#.*$/,Qt=/([?&])_=[^&]*/,Kt=/^(.*?):[ \t]*([^\r\n]*)$/gm,Gt=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Bt=/^(?:GET|HEAD)$/,Jt=/^\/\//,zt={},$t={},qt="*/".concat("*"),en=S.createElement("a");function tn(e){return function(t,n){"string"!==typeof t&&(n=t,t="*");var r,i=0,s=t.toLowerCase().match(B)||[];if(y(n))while(r=s[i++])"+"===r[0]?(r=r.slice(1)||"*",(e[r]=e[r]||[]).unshift(n)):(e[r]=e[r]||[]).push(n)}}function nn(e,t,n,r){var i={},s=e===$t;function o(a){var l;return i[a]=!0,E.each(e[a]||[],(function(e,a){var c=a(t,n,r);return"string"!==typeof c||s||i[c]?s?!(l=c):void 0:(t.dataTypes.unshift(c),o(c),!1)})),l}return o(t.dataTypes[0])||!i["*"]&&o("*")}function rn(e,t){var n,r,i=E.ajaxSettings.flatOptions||{};for(n in t)void 0!==t[n]&&((i[n]?e:r||(r={}))[n]=t[n]);return r&&E.extend(!0,e,r),e}function sn(e,t,n){var r,i,s,o,a=e.contents,l=e.dataTypes;while("*"===l[0])l.shift(),void 0===r&&(r=e.mimeType||t.getResponseHeader("Content-Type"));if(r)for(i in a)if(a[i]&&a[i].test(r)){l.unshift(i);break}if(l[0]in n)s=l[0];else{for(i in n){if(!l[0]||e.converters[i+" "+l[0]]){s=i;break}o||(o=i)}s=s||o}if(s)return s!==l[0]&&l.unshift(s),n[s]}function on(e,t,n,r){var i,s,o,a,l,c={},u=e.dataTypes.slice();if(u[1])for(o in e.converters)c[o.toLowerCase()]=e.converters[o];s=u.shift();while(s)if(e.responseFields[s]&&(n[e.responseFields[s]]=t),!l&&r&&e.dataFilter&&(t=e.dataFilter(t,e.dataType)),l=s,s=u.shift(),s)if("*"===s)s=l;else if("*"!==l&&l!==s){if(o=c[l+" "+s]||c["* "+s],!o)for(i in c)if(a=i.split(" "),a[1]===s&&(o=c[l+" "+a[0]]||c["* "+a[0]],o)){!0===o?o=c[i]:!0!==c[i]&&(s=a[0],u.unshift(a[1]));break}if(!0!==o)if(o&&e.throws)t=o(t);else try{t=o(t)}catch(h){return{state:"parsererror",error:o?h:"No conversion from "+l+" to "+s}}}return{state:"success",data:t}}en.href=Dt.href,E.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:Dt.href,type:"GET",isLocal:Gt.test(Dt.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":qt,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":JSON.parse,"text xml":E.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?rn(rn(e,E.ajaxSettings),t):rn(E.ajaxSettings,e)},ajaxPrefilter:tn(zt),ajaxTransport:tn($t),ajax:function(e,t){"object"===typeof e&&(t=e,e=void 0),t=t||{};var r,i,s,o,a,l,c,u,h,d,m=E.ajaxSetup({},t),g=m.context||m,p=m.context&&(g.nodeType||g.jquery)?E(g):E.event,f=E.Deferred(),R=E.Callbacks("once memory"),y=m.statusCode||{},M={},b={},w="canceled",T={readyState:0,getResponseHeader:function(e){var t;if(c){if(!o){o={};while(t=Kt.exec(s))o[t[1].toLowerCase()+" "]=(o[t[1].toLowerCase()+" "]||[]).concat(t[2])}t=o[e.toLowerCase()+" "]}return null==t?null:t.join(", ")},getAllResponseHeaders:function(){return c?s:null},setRequestHeader:function(e,t){return null==c&&(e=b[e.toLowerCase()]=b[e.toLowerCase()]||e,M[e]=t),this},overrideMimeType:function(e){return null==c&&(m.mimeType=e),this},statusCode:function(e){var t;if(e)if(c)T.always(e[T.status]);else for(t in e)y[t]=[y[t],e[t]];return this},abort:function(e){var t=e||w;return r&&r.abort(t),O(0,t),this}};if(f.promise(T),m.url=((e||m.url||Dt.href)+"").replace(Jt,Dt.protocol+"//"),m.type=t.method||t.type||m.method||m.type,m.dataTypes=(m.dataType||"*").toLowerCase().match(B)||[""],null==m.crossDomain){l=S.createElement("a");try{l.href=m.url,l.href=l.href,m.crossDomain=en.protocol+"//"+en.host!==l.protocol+"//"+l.host}catch(v){m.crossDomain=!0}}if(m.data&&m.processData&&"string"!==typeof m.data&&(m.data=E.param(m.data,m.traditional)),nn(zt,m,t,T),c)return T;for(h in u=E.event&&m.global,u&&0===E.active++&&E.event.trigger("ajaxStart"),m.type=m.type.toUpperCase(),m.hasContent=!Bt.test(m.type),i=m.url.replace(Zt,""),m.hasContent?m.data&&m.processData&&0===(m.contentType||"").indexOf("application/x-www-form-urlencoded")&&(m.data=m.data.replace(jt,"+")):(d=m.url.slice(i.length),m.data&&(m.processData||"string"===typeof m.data)&&(i+=(Ft.test(i)?"&":"?")+m.data,delete m.data),!1===m.cache&&(i=i.replace(Qt,"$1"),d=(Ft.test(i)?"&":"?")+"_="+At.guid+++d),m.url=i+d),m.ifModified&&(E.lastModified[i]&&T.setRequestHeader("If-Modified-Since",E.lastModified[i]),E.etag[i]&&T.setRequestHeader("If-None-Match",E.etag[i])),(m.data&&m.hasContent&&!1!==m.contentType||t.contentType)&&T.setRequestHeader("Content-Type",m.contentType),T.setRequestHeader("Accept",m.dataTypes[0]&&m.accepts[m.dataTypes[0]]?m.accepts[m.dataTypes[0]]+("*"!==m.dataTypes[0]?", "+qt+"; q=0.01":""):m.accepts["*"]),m.headers)T.setRequestHeader(h,m.headers[h]);if(m.beforeSend&&(!1===m.beforeSend.call(g,T,m)||c))return T.abort();if(w="abort",R.add(m.complete),T.done(m.success),T.fail(m.error),r=nn($t,m,t,T),r){if(T.readyState=1,u&&p.trigger("ajaxSend",[T,m]),c)return T;m.async&&m.timeout>0&&(a=n.setTimeout((function(){T.abort("timeout")}),m.timeout));try{c=!1,r.send(M,O)}catch(v){if(c)throw v;O(-1,v)}}else O(-1,"No Transport");function O(e,t,o,l){var h,d,M,S,b,w=t;c||(c=!0,a&&n.clearTimeout(a),r=void 0,s=l||"",T.readyState=e>0?4:0,h=e>=200&&e<300||304===e,o&&(S=sn(m,T,o)),!h&&E.inArray("script",m.dataTypes)>-1&&E.inArray("json",m.dataTypes)<0&&(m.converters["text script"]=function(){}),S=on(m,S,T,h),h?(m.ifModified&&(b=T.getResponseHeader("Last-Modified"),b&&(E.lastModified[i]=b),b=T.getResponseHeader("etag"),b&&(E.etag[i]=b)),204===e||"HEAD"===m.type?w="nocontent":304===e?w="notmodified":(w=S.state,d=S.data,M=S.error,h=!M)):(M=w,!e&&w||(w="error",e<0&&(e=0))),T.status=e,T.statusText=(t||w)+"",h?f.resolveWith(g,[d,w,T]):f.rejectWith(g,[T,w,M]),T.statusCode(y),y=void 0,u&&p.trigger(h?"ajaxSuccess":"ajaxError",[T,m,h?d:M]),R.fireWith(g,[T,w]),u&&(p.trigger("ajaxComplete",[T,m]),--E.active||E.event.trigger("ajaxStop")))}return T},getJSON:function(e,t,n){return E.get(e,t,n,"json")},getScript:function(e,t){return E.get(e,void 0,t,"script")}}),E.each(["get","post"],(function(e,t){E[t]=function(e,n,r,i){return y(n)&&(i=i||r,r=n,n=void 0),E.ajax(E.extend({url:e,type:t,dataType:i,data:n,success:r},E.isPlainObject(e)&&e))}})),E.ajaxPrefilter((function(e){var t;for(t in e.headers)"content-type"===t.toLowerCase()&&(e.contentType=e.headers[t]||"")})),E._evalUrl=function(e,t,n){return E.ajax({url:e,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,converters:{"text script":function(){}},dataFilter:function(e){E.globalEval(e,t,n)}})},E.fn.extend({wrapAll:function(e){var t;return this[0]&&(y(e)&&(e=e.call(this[0])),t=E(e,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&t.insertBefore(this[0]),t.map((function(){var e=this;while(e.firstElementChild)e=e.firstElementChild;return e})).append(this)),this},wrapInner:function(e){return y(e)?this.each((function(t){E(this).wrapInner(e.call(this,t))})):this.each((function(){var t=E(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)}))},wrap:function(e){var t=y(e);return this.each((function(n){E(this).wrapAll(t?e.call(this,n):e)}))},unwrap:function(e){return this.parent(e).not("body").each((function(){E(this).replaceWith(this.childNodes)})),this}}),E.expr.pseudos.hidden=function(e){return!E.expr.pseudos.visible(e)},E.expr.pseudos.visible=function(e){return!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)},E.ajaxSettings.xhr=function(){try{return new n.XMLHttpRequest}catch(e){}};var an={0:200,1223:204},ln=E.ajaxSettings.xhr();R.cors=!!ln&&"withCredentials"in ln,R.ajax=ln=!!ln,E.ajaxTransport((function(e){var t,r;if(R.cors||ln&&!e.crossDomain)return{send:function(i,s){var o,a=e.xhr();if(a.open(e.type,e.url,e.async,e.username,e.password),e.xhrFields)for(o in e.xhrFields)a[o]=e.xhrFields[o];for(o in e.mimeType&&a.overrideMimeType&&a.overrideMimeType(e.mimeType),e.crossDomain||i["X-Requested-With"]||(i["X-Requested-With"]="XMLHttpRequest"),i)a.setRequestHeader(o,i[o]);t=function(e){return function(){t&&(t=r=a.onload=a.onerror=a.onabort=a.ontimeout=a.onreadystatechange=null,"abort"===e?a.abort():"error"===e?"number"!==typeof a.status?s(0,"error"):s(a.status,a.statusText):s(an[a.status]||a.status,a.statusText,"text"!==(a.responseType||"text")||"string"!==typeof a.responseText?{binary:a.response}:{text:a.responseText},a.getAllResponseHeaders()))}},a.onload=t(),r=a.onerror=a.ontimeout=t("error"),void 0!==a.onabort?a.onabort=r:a.onreadystatechange=function(){4===a.readyState&&n.setTimeout((function(){t&&r()}))},t=t("abort");try{a.send(e.hasContent&&e.data||null)}catch(l){if(t)throw l}},abort:function(){t&&t()}}})),E.ajaxPrefilter((function(e){e.crossDomain&&(e.contents.script=!1)})),E.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(e){return E.globalEval(e),e}}}),E.ajaxPrefilter("script",(function(e){void 0===e.cache&&(e.cache=!1),e.crossDomain&&(e.type="GET")})),E.ajaxTransport("script",(function(e){var t,n;if(e.crossDomain||e.scriptAttrs)return{send:function(r,i){t=E("<script>").attr(e.scriptAttrs||{}).prop({charset:e.scriptCharset,src:e.url}).on("load error",n=function(e){t.remove(),n=null,e&&i("error"===e.type?404:200,e.type)}),S.head.appendChild(t[0])},abort:function(){n&&n()}}}));var cn=[],un=/(=)\?(?=&|$)|\?\?/;E.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=cn.pop()||E.expando+"_"+At.guid++;return this[e]=!0,e}}),E.ajaxPrefilter("json jsonp",(function(e,t,r){var i,s,o,a=!1!==e.jsonp&&(un.test(e.url)?"url":"string"===typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&un.test(e.data)&&"data");if(a||"jsonp"===e.dataTypes[0])return i=e.jsonpCallback=y(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,a?e[a]=e[a].replace(un,"$1"+i):!1!==e.jsonp&&(e.url+=(Ft.test(e.url)?"&":"?")+e.jsonp+"="+i),e.converters["script json"]=function(){return o||E.error(i+" was not called"),o[0]},e.dataTypes[0]="json",s=n[i],n[i]=function(){o=arguments},r.always((function(){void 0===s?E(n).removeProp(i):n[i]=s,e[i]&&(e.jsonpCallback=t.jsonpCallback,cn.push(i)),o&&y(s)&&s(o[0]),o=s=void 0})),"script"})),R.createHTMLDocument=function(){var e=S.implementation.createHTMLDocument("").body;return e.innerHTML="<form></form><form></form>",2===e.childNodes.length}(),E.parseHTML=function(e,t,n){return"string"!==typeof e?[]:("boolean"===typeof t&&(n=t,t=!1),t||(R.createHTMLDocument?(t=S.implementation.createHTMLDocument(""),r=t.createElement("base"),r.href=S.location.href,t.head.appendChild(r)):t=S),i=U.exec(e),s=!n&&[],i?[t.createElement(i[1])]:(i=De([e],t,s),s&&s.length&&E(s).remove(),E.merge([],i.childNodes)));var r,i,s},E.fn.load=function(e,t,n){var r,i,s,o=this,a=e.indexOf(" ");return a>-1&&(r=_t(e.slice(a)),e=e.slice(0,a)),y(t)?(n=t,t=void 0):t&&"object"===typeof t&&(i="POST"),o.length>0&&E.ajax({url:e,type:i||"GET",dataType:"html",data:t}).done((function(e){s=arguments,o.html(r?E("<div>").append(E.parseHTML(e)).find(r):e)})).always(n&&function(e,t){o.each((function(){n.apply(this,s||[e.responseText,t,e])}))}),this},E.expr.pseudos.animated=function(e){return E.grep(E.timers,(function(t){return e===t.elem})).length},E.offset={setOffset:function(e,t,n){var r,i,s,o,a,l,c,u=E.css(e,"position"),h=E(e),d={};"static"===u&&(e.style.position="relative"),a=h.offset(),s=E.css(e,"top"),l=E.css(e,"left"),c=("absolute"===u||"fixed"===u)&&(s+l).indexOf("auto")>-1,c?(r=h.position(),o=r.top,i=r.left):(o=parseFloat(s)||0,i=parseFloat(l)||0),y(t)&&(t=t.call(e,n,E.extend({},a))),null!=t.top&&(d.top=t.top-a.top+o),null!=t.left&&(d.left=t.left-a.left+i),"using"in t?t.using.call(e,d):h.css(d)}},E.fn.extend({offset:function(e){if(arguments.length)return void 0===e?this:this.each((function(t){E.offset.setOffset(this,e,t)}));var t,n,r=this[0];return r?r.getClientRects().length?(t=r.getBoundingClientRect(),n=r.ownerDocument.defaultView,{top:t.top+n.pageYOffset,left:t.left+n.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var e,t,n,r=this[0],i={top:0,left:0};if("fixed"===E.css(r,"position"))t=r.getBoundingClientRect();else{t=this.offset(),n=r.ownerDocument,e=r.offsetParent||n.documentElement;while(e&&(e===n.body||e===n.documentElement)&&"static"===E.css(e,"position"))e=e.parentNode;e&&e!==r&&1===e.nodeType&&(i=E(e).offset(),i.top+=E.css(e,"borderTopWidth",!0),i.left+=E.css(e,"borderLeftWidth",!0))}return{top:t.top-i.top-E.css(r,"marginTop",!0),left:t.left-i.left-E.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map((function(){var e=this.offsetParent;while(e&&"static"===E.css(e,"position"))e=e.offsetParent;return e||Me}))}}),E.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},(function(e,t){var n="pageYOffset"===t;E.fn[e]=function(r){return re(this,(function(e,r,i){var s;if(M(e)?s=e:9===e.nodeType&&(s=e.defaultView),void 0===i)return s?s[t]:e[r];s?s.scrollTo(n?s.pageXOffset:i,n?i:s.pageYOffset):e[r]=i}),e,r,arguments.length)}})),E.each(["top","left"],(function(e,t){E.cssHooks[t]=nt(R.pixelPosition,(function(e,n){if(n)return n=tt(e,t),Je.test(n)?E(e).position()[t]+"px":n}))})),E.each({Height:"height",Width:"width"},(function(e,t){E.each({padding:"inner"+e,content:t,"":"outer"+e},(function(n,r){E.fn[r]=function(i,s){var o=arguments.length&&(n||"boolean"!==typeof i),a=n||(!0===i||!0===s?"margin":"border");return re(this,(function(t,n,i){var s;return M(t)?0===r.indexOf("outer")?t["inner"+e]:t.document.documentElement["client"+e]:9===t.nodeType?(s=t.documentElement,Math.max(t.body["scroll"+e],s["scroll"+e],t.body["offset"+e],s["offset"+e],s["client"+e])):void 0===i?E.css(t,n,a):E.style(t,n,i,a)}),t,o?i:void 0,o)}}))})),E.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],(function(e,t){E.fn[t]=function(e){return this.on(t,e)}})),E.fn.extend({bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)},hover:function(e,t){return this.on("mouseenter",e).on("mouseleave",t||e)}}),E.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),(function(e,t){E.fn[t]=function(e,n){return arguments.length>0?this.on(t,null,e,n):this.trigger(t)}}));var hn=/^[\s\uFEFF\xA0]+|([^\s\uFEFF\xA0])[\s\uFEFF\xA0]+$/g;E.proxy=function(e,t){var n,r,i;if("string"===typeof t&&(n=e[t],t=e,e=n),y(e))return r=l.call(arguments,2),i=function(){return e.apply(t||this,r.concat(l.call(arguments)))},i.guid=e.guid=e.guid||E.guid++,i},E.holdReady=function(e){e?E.readyWait++:E.ready(!0)},E.isArray=Array.isArray,E.parseJSON=JSON.parse,E.nodeName=L,E.isFunction=y,E.isWindow=M,E.camelCase=ae,E.type=T,E.now=Date.now,E.isNumeric=function(e){var t=E.type(e);return("number"===t||"string"===t)&&!isNaN(e-parseFloat(e))},E.trim=function(e){return null==e?"":(e+"").replace(hn,"$1")},r=[],i=function(){return E}.apply(t,r),void 0===i||(e.exports=i);var dn=n.jQuery,mn=n.$;return E.noConflict=function(e){return n.$===E&&(n.$=mn),e&&n.jQuery===E&&(n.jQuery=dn),E},"undefined"===typeof s&&(n.jQuery=n.$=E),E}))},"130f":function(e,t,n){"use strict";n("e20c"),n("0402")},"13e1":function(e,t,n){"use strict";n.d(t,"b",(function(){return g})),n.d(t,"a",(function(){return p}));n("d9e2");var r=n("7b9c"),i=n("351d"),s=(n("14d9"),n("81ea"));const o="hooksRefRegisterer",a={_hooksStorage:Object.create(null),addHook(e,t){return this._hooksStorage[e]||(this._hooksStorage[e]=[]),this.hot.addHook(e,t),this._hooksStorage[e].push(t),this},removeHooksByKey(e){Object(s["arrayEach"])(this._hooksStorage[e]||[],t=>{this.hot.removeHook(e,t)})},clearHooks(){Object(i["objectEach"])(this._hooksStorage,(e,t)=>this.removeHooksByKey(t)),this._hooksStorage={}}};Object(i["defineGetter"])(a,"MIXIN_NAME",o,{writable:!1,enumerable:!1});var l=a,c=n("5d7f");function u(e,t,n){return(t=h(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function h(e){var t=d(e,"string");return"symbol"==typeof t?t:t+""}function d(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}const m="base",g=Object.freeze({VIRGIN:"STATE_VIRGIN",EDITING:"STATE_EDITING",WAITING:"STATE_WAITING",FINISHED:"STATE_FINISHED"});class p{static get EDITOR_TYPE(){return m}constructor(e){u(this,"hot",void 0),u(this,"state",g.VIRGIN),u(this,"_opened",!1),u(this,"_fullEditMode",!1),u(this,"_closeCallback",null),u(this,"TD",null),u(this,"row",null),u(this,"col",null),u(this,"prop",null),u(this,"originalValue",null),u(this,"cellProperties",null),this.hot=e,this.init()}_fireCallbacks(e){this._closeCallback&&(this._closeCallback(e),this._closeCallback=null)}init(){}getValue(){throw Error("Editor getValue() method unimplemented")}setValue(){throw Error("Editor setValue() method unimplemented")}open(){throw Error("Editor open() method unimplemented")}close(){throw Error("Editor close() method unimplemented")}prepare(e,t,n,r,i,s){this.TD=r,this.row=e,this.col=t,this.prop=n,this.originalValue=i,this.cellProperties=s,this.state=this.isOpened()?this.state:g.VIRGIN}extend(){return class extends this.constructor{}}saveValue(e,t){let n,r,i,s;if(t){const e=this.hot.getSelectedLast();n=Math.max(Math.min(e[0],e[2]),0),r=Math.max(Math.min(e[1],e[3]),0),i=Math.max(e[0],e[2]),s=Math.max(e[1],e[3])}else[n,r,i,s]=[this.row,this.col,null,null];const o=this.hot.runHooks("modifyGetCellCoords",n,r);Array.isArray(o)&&([n,r]=o),this.hot.populateFromArray(n,r,e,i,s,"edit")}beginEditing(e,t){if(this.state!==g.VIRGIN)return;const n=this.hot,i=n.rowIndexMapper.getRenderableFromVisualIndex(this.row),s=n.columnIndexMapper.getRenderableFromVisualIndex(this.col);if(n.view.scrollViewport(n._createCellCoords(i,s)),this.state=g.EDITING,this.isInFullEditMode()){const t="string"===typeof e?e:Object(r["stringify"])(this.originalValue);this.setValue(t)}this.open(t),this._opened=!0,this.focus(),n.view.render(),n.runHooks("afterBeginEditing",this.row,this.col)}finishEditing(e,t,n){let r;if(n){const e=this._closeCallback;this._closeCallback=t=>{e&&e(t),n(t),this.hot.view.render()}}if(!this.isWaiting())if(this.state!==g.VIRGIN){if(this.state===g.EDITING){if(e)return this.cancelChanges(),void this.hot.view.render();const n=this.getValue();r=this.cellProperties.trimWhitespace?[["string"===typeof n?String.prototype.trim.call(n||""):n]]:[[n]],this.state=g.WAITING,this.saveValue(r,t),this.hot.getCellValidator(this.cellProperties)?this.hot.addHookOnce("postAfterValidate",e=>{this.state=g.FINISHED,this.discardEditor(e)}):(this.state=g.FINISHED,this.discardEditor(!0))}}else this.hot._registerTimeout(()=>{this._fireCallbacks(!0)})}cancelChanges(){this.state=g.FINISHED,this.discardEditor()}discardEditor(e){if(this.state===g.FINISHED)if(!1===e&&!0!==this.cellProperties.allowInvalid)this.hot.selectCell(this.row,this.col),this.focus(),this.state=g.EDITING,this._fireCallbacks(!1);else{this.close(),this._opened=!1,this._fullEditMode=!1,this.state=g.VIRGIN,this._fireCallbacks(!0);const e=this.hot.getShortcutManager();e.setActiveContextName("grid")}}enableFullEditMode(){this._fullEditMode=!0}isInFullEditMode(){return this._fullEditMode}isOpened(){return this._opened}isWaiting(){return this.state===g.WAITING}getEditedCellRect(){var e;const t=this.getEditedCell();if(!t)return;const{wtOverlays:n,wtViewport:r}=this.hot.view._wt,i=this.hot.rootWindow,s=Object(c["offset"])(t),o=Object(c["outerWidth"])(t),a=Object(c["offset"])(this.hot.rootElement),l=Object(c["outerWidth"])(this.hot.rootElement),u=n.topOverlay.holder,h=n.inlineStartOverlay.holder,d=u!==i?u.scrollTop:0,m=h!==i?h.scrollLeft:0,g=i.innerWidth-a.left-l,{wtTable:p}=null!==(e=n.getParentOverlay(t))&&void 0!==e?e:this.hot.view._wt,f=p.name,R=["master","inline_start"].includes(f)?d:0,y=["master","top","bottom"].includes(f)?m:0,M=s.top===a.top?0:1;let S=s.top-a.top-M-R,b=0;b=this.hot.isRtl()?i.innerWidth-s.left-o-g-1+y:s.left-a.left-1-y,["top","top_inline_start_corner"].includes(f)&&(S+=n.topOverlay.getOverlayOffset()),["inline_start","top_inline_start_corner"].includes(f)&&(b+=Math.abs(n.inlineStartOverlay.getOverlayOffset()));const w=this.hot.hasColHeaders(),T=this.hot.rowIndexMapper.getRenderableFromVisualIndex(this.row),O=this.hot.columnIndexMapper.getRenderableFromVisualIndex(this.col),v=this.hot.rowIndexMapper.getRenderableIndexesLength(),E=v-this.hot.view._wt.getSetting("fixedRowsBottom");(w&&T<=0||T===E)&&(S+=1),O<=0&&(b+=1);const C=r.rowsRenderCalculator.startPosition,L=r.columnsRenderCalculator.startPosition,N=Math.abs(n.inlineStartOverlay.getScrollPosition()),_=n.topOverlay.getScrollPosition(),I=Object(c["getScrollbarWidth"])(this.hot.rootDocument);let P=t.offsetTop;if(["inline_start","master"].includes(f)&&(P+=C-_),["bottom","bottom_inline_start_corner"].includes(f)){const{wtViewport:e,wtTable:t}=n.bottomOverlay.clone;P+=e.getWorkspaceHeight()-t.getHeight()-I}let x=t.offsetLeft;this.hot.isRtl()?(x=x>=0?p.getWidth()-t.offsetLeft:Math.abs(x),x+=L-N-o):["top","master","bottom"].includes(f)&&(x+=L-N);const D=Object(c["getComputedStyle"])(this.TD,this.hot.rootWindow),A=this.hot.isRtl()?"borderRightWidth":"borderLeftWidth",F=parseInt(D[A],10)>0?0:1,Y=parseInt(D.borderTopWidth,10)>0?0:1,H=Object(c["outerWidth"])(t)+F,k=Object(c["outerHeight"])(t)+Y,V=Object(c["hasVerticalScrollbar"])(u)?I:0,U=Object(c["hasHorizontalScrollbar"])(h)?I:0,W=this.hot.view.maximumVisibleElementWidth(x)-V+F,X=Math.max(this.hot.view.maximumVisibleElementHeight(P)-U+Y,23);return{top:S,start:b,height:k,maxHeight:X,width:H,maxWidth:W}}getEditedCellsLayerClass(){const e=this.checkEditorSection();switch(e){case"inline-start":return"ht_clone_left ht_clone_inline_start";case"bottom":return"ht_clone_bottom";case"bottom-inline-start-corner":return"ht_clone_bottom_left_corner ht_clone_bottom_inline_start_corner";case"top":return"ht_clone_top";case"top-inline-start-corner":return"ht_clone_top_left_corner ht_clone_top_inline_start_corner";default:return"ht_clone_master"}}getEditedCell(){return this.hot.getCell(this.row,this.col,!0)}checkEditorSection(){const e=this.hot.countRows();let t="";return this.row<this.hot.getSettings().fixedRowsTop?t=this.col<this.hot.getSettings().fixedColumnsStart?"top-inline-start-corner":"top":this.hot.getSettings().fixedRowsBottom&&this.row>=e-this.hot.getSettings().fixedRowsBottom?t=this.col<this.hot.getSettings().fixedColumnsStart?"bottom-inline-start-corner":"bottom":this.col<this.hot.getSettings().fixedColumnsStart&&(t="inline-start"),t}}Object(i["mixin"])(p,l)},"13e9":function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
  46. //! moment.js locale configuration
  47. var t={words:{ss:["секунда","секунде","секунди"],m:["један минут","једног минута"],mm:["минут","минута","минута"],h:["један сат","једног сата"],hh:["сат","сата","сати"],d:["један дан","једног дана"],dd:["дан","дана","дана"],M:["један месец","једног месеца"],MM:["месец","месеца","месеци"],y:["једну годину","једне године"],yy:["годину","године","година"]},correctGrammaticalCase:function(e,t){return e%10>=1&&e%10<=4&&(e%100<10||e%100>=20)?e%10===1?t[0]:t[1]:t[2]},translate:function(e,n,r,i){var s,o=t.words[r];return 1===r.length?"y"===r&&n?"једна година":i||n?o[0]:o[1]:(s=t.correctGrammaticalCase(e,o),"yy"===r&&n&&"годину"===s?e+" година":e+" "+s)}},n=e.defineLocale("sr-cyrl",{months:"јануар_фебруар_март_април_мај_јун_јул_август_септембар_октобар_новембар_децембар".split("_"),monthsShort:"јан._феб._мар._апр._мај_јун_јул_авг._сеп._окт._нов._дец.".split("_"),monthsParseExact:!0,weekdays:"недеља_понедељак_уторак_среда_четвртак_петак_субота".split("_"),weekdaysShort:"нед._пон._уто._сре._чет._пет._суб.".split("_"),weekdaysMin:"не_по_ут_ср_че_пе_су".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"D. M. YYYY.",LL:"D. MMMM YYYY.",LLL:"D. MMMM YYYY. H:mm",LLLL:"dddd, D. MMMM YYYY. H:mm"},calendar:{sameDay:"[данас у] LT",nextDay:"[сутра у] LT",nextWeek:function(){switch(this.day()){case 0:return"[у] [недељу] [у] LT";case 3:return"[у] [среду] [у] LT";case 6:return"[у] [суботу] [у] LT";case 1:case 2:case 4:case 5:return"[у] dddd [у] LT"}},lastDay:"[јуче у] LT",lastWeek:function(){var e=["[прошле] [недеље] [у] LT","[прошлог] [понедељка] [у] LT","[прошлог] [уторка] [у] LT","[прошле] [среде] [у] LT","[прошлог] [четвртка] [у] LT","[прошлог] [петка] [у] LT","[прошле] [суботе] [у] LT"];return e[this.day()]},sameElse:"L"},relativeTime:{future:"за %s",past:"пре %s",s:"неколико секунди",ss:t.translate,m:t.translate,mm:t.translate,h:t.translate,hh:t.translate,d:t.translate,dd:t.translate,M:t.translate,MM:t.translate,y:t.translate,yy:t.translate},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:7}});return n}))},"167b":function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
  48. //! moment.js locale configuration
  49. var t=e.defineLocale("oc-lnc",{months:{standalone:"genièr_febrièr_març_abril_mai_junh_julhet_agost_setembre_octòbre_novembre_decembre".split("_"),format:"de genièr_de febrièr_de març_d'abril_de mai_de junh_de julhet_d'agost_de setembre_d'octòbre_de novembre_de decembre".split("_"),isFormat:/D[oD]?(\s)+MMMM/},monthsShort:"gen._febr._març_abr._mai_junh_julh._ago._set._oct._nov._dec.".split("_"),monthsParseExact:!0,weekdays:"dimenge_diluns_dimars_dimècres_dijòus_divendres_dissabte".split("_"),weekdaysShort:"dg._dl._dm._dc._dj._dv._ds.".split("_"),weekdaysMin:"dg_dl_dm_dc_dj_dv_ds".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM [de] YYYY",ll:"D MMM YYYY",LLL:"D MMMM [de] YYYY [a] H:mm",lll:"D MMM YYYY, H:mm",LLLL:"dddd D MMMM [de] YYYY [a] H:mm",llll:"ddd D MMM YYYY, H:mm"},calendar:{sameDay:"[uèi a] LT",nextDay:"[deman a] LT",nextWeek:"dddd [a] LT",lastDay:"[ièr a] LT",lastWeek:"dddd [passat a] LT",sameElse:"L"},relativeTime:{future:"d'aquí %s",past:"fa %s",s:"unas segondas",ss:"%d segondas",m:"una minuta",mm:"%d minutas",h:"una ora",hh:"%d oras",d:"un jorn",dd:"%d jorns",M:"un mes",MM:"%d meses",y:"un an",yy:"%d ans"},dayOfMonthOrdinalParse:/\d{1,2}(r|n|t|è|a)/,ordinal:function(e,t){var n=1===e?"r":2===e?"n":3===e?"r":4===e?"t":"è";return"w"!==t&&"W"!==t||(n="a"),e+n},week:{dow:1,doy:4}});return t}))},"169f":function(e,t,n){"use strict";n.d(t,"d",(function(){return u})),n.d(t,"b",(function(){return c})),n.d(t,"c",(function(){return o})),n.d(t,"a",(function(){return a}));n("d9e2");var r=n("9acd");const{register:i,getItem:s,hasItem:o,getNames:a,getValues:l}=Object(r["a"])("validators");function c(e){if("function"===typeof e)return e;if(!o(e))throw Error(`No registered validator found under "${e}" name`);return s(e)}function u(e,t){"string"!==typeof e&&(t=e,e=t.VALIDATOR_TYPE),i(e,t)}},"1b1a":function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n("1096"),i=n("3d57"),s=n("a73f");class o extends r["a"]{constructor(){super(e=>e)}insert(e,t){const n=Object(s["b"])(this.indexedValues,t);this.indexedValues=Object(i["a"])(n,e,t),super.insert(e,t)}remove(e){const t=Object(i["b"])(this.indexedValues,e);this.indexedValues=Object(s["a"])(t,e),super.remove(e)}}},"1b45":function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
  50. //! moment.js locale configuration
  51. var t=e.defineLocale("mt",{months:"Jannar_Frar_Marzu_April_Mejju_Ġunju_Lulju_Awwissu_Settembru_Ottubru_Novembru_Diċembru".split("_"),monthsShort:"Jan_Fra_Mar_Apr_Mej_Ġun_Lul_Aww_Set_Ott_Nov_Diċ".split("_"),weekdays:"Il-Ħadd_It-Tnejn_It-Tlieta_L-Erbgħa_Il-Ħamis_Il-Ġimgħa_Is-Sibt".split("_"),weekdaysShort:"Ħad_Tne_Tli_Erb_Ħam_Ġim_Sib".split("_"),weekdaysMin:"Ħa_Tn_Tl_Er_Ħa_Ġi_Si".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Illum fil-]LT",nextDay:"[Għada fil-]LT",nextWeek:"dddd [fil-]LT",lastDay:"[Il-bieraħ fil-]LT",lastWeek:"dddd [li għadda] [fil-]LT",sameElse:"L"},relativeTime:{future:"f’ %s",past:"%s ilu",s:"ftit sekondi",ss:"%d sekondi",m:"minuta",mm:"%d minuti",h:"siegħa",hh:"%d siegħat",d:"ġurnata",dd:"%d ġranet",M:"xahar",MM:"%d xhur",y:"sena",yy:"%d sni"},dayOfMonthOrdinalParse:/\d{1,2}º/,ordinal:"%dº",week:{dow:1,doy:4}});return t}))},"1c4c":function(e,t,n){"use strict";n.d(t,"c",(function(){return i})),n.d(t,"b",(function(){return s})),n.d(t,"a",(function(){return o}));var r=n("b775");function i(e){return Object(r["a"])({url:"/source/data/search",method:"post",data:e})}function s(e){return Object(r["a"])({url:"/source/data/info",method:"post",data:e})}function o(e){return Object(r["a"])({url:"/source/data/find",method:"post",data:e})}},"1cfd":function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
  52. //! moment.js locale configuration
  53. var t={1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9",0:"0"},n=function(e){return 0===e?0:1===e?1:2===e?2:e%100>=3&&e%100<=10?3:e%100>=11?4:5},r={s:["أقل من ثانية","ثانية واحدة",["ثانيتان","ثانيتين"],"%d ثوان","%d ثانية","%d ثانية"],m:["أقل من دقيقة","دقيقة واحدة",["دقيقتان","دقيقتين"],"%d دقائق","%d دقيقة","%d دقيقة"],h:["أقل من ساعة","ساعة واحدة",["ساعتان","ساعتين"],"%d ساعات","%d ساعة","%d ساعة"],d:["أقل من يوم","يوم واحد",["يومان","يومين"],"%d أيام","%d يومًا","%d يوم"],M:["أقل من شهر","شهر واحد",["شهران","شهرين"],"%d أشهر","%d شهرا","%d شهر"],y:["أقل من عام","عام واحد",["عامان","عامين"],"%d أعوام","%d عامًا","%d عام"]},i=function(e){return function(t,i,s,o){var a=n(t),l=r[e][n(t)];return 2===a&&(l=l[i?0:1]),l.replace(/%d/i,t)}},s=["يناير","فبراير","مارس","أبريل","مايو","يونيو","يوليو","أغسطس","سبتمبر","أكتوبر","نوفمبر","ديسمبر"],o=e.defineLocale("ar-ly",{months:s,monthsShort:s,weekdays:"الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت".split("_"),weekdaysShort:"أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت".split("_"),weekdaysMin:"ح_ن_ث_ر_خ_ج_س".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"D/‏M/‏YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},meridiemParse:/ص|م/,isPM:function(e){return"م"===e},meridiem:function(e,t,n){return e<12?"ص":"م"},calendar:{sameDay:"[اليوم عند الساعة] LT",nextDay:"[غدًا عند الساعة] LT",nextWeek:"dddd [عند الساعة] LT",lastDay:"[أمس عند الساعة] LT",lastWeek:"dddd [عند الساعة] LT",sameElse:"L"},relativeTime:{future:"بعد %s",past:"منذ %s",s:i("s"),ss:i("s"),m:i("m"),mm:i("m"),h:i("h"),hh:i("h"),d:i("d"),dd:i("d"),M:i("M"),MM:i("M"),y:i("y"),yy:i("y")},preparse:function(e){return e.replace(/،/g,",")},postformat:function(e){return e.replace(/\d/g,(function(e){return t[e]})).replace(/,/g,"،")},week:{dow:6,doy:12}});return o}))},"1e5a":function(e,t,n){"use strict";var r=n("23e7"),i=n("9961"),s=n("dad2");r({target:"Set",proto:!0,real:!0,forced:!s("symmetricDifference")},{symmetricDifference:i})},"1e70":function(e,t,n){"use strict";var r=n("23e7"),i=n("a5f7"),s=n("dad2");r({target:"Set",proto:!0,real:!0,forced:!s("difference")},{difference:i})},"1e8c":function(e,t,n){"use strict";n.d(t,"a",(function(){return te}));var r=n("c4fa");const i={name:"editorCloseAndSave",callback(e){const t=e._getEditorManager();t.closeEditorAndSaveChanges()}};var s=n("13e1");const o={name:"editorCloseAndSaveByArrowKeys",callback(e,t,n){const r=e._getEditorManager(),i=r.getActiveEditor();i.isInFullEditMode()&&i.state===s["b"].EDITING||(r.closeEditorAndSaveChanges(),e.getSelected()&&(n.includes("arrowdown")?e.selection.transformStart(1,0):n.includes("arrowup")?e.selection.transformStart(-1,0):n.includes("arrowleft")?e.selection.transformStart(0,-1*e.getDirectionFactor()):n.includes("arrowright")&&e.selection.transformStart(0,e.getDirectionFactor())),t.preventDefault())}},a={name:"editorCloseAndSaveByEnter",callback(e,t){const n=e._getEditorManager();n.closeEditorAndSaveChanges(t.ctrlKey||t.metaKey),n.moveSelectionAfterEnter(t)}},l={name:"editorCloseWithoutSaving",callback(e){const t=e._getEditorManager();t.closeEditorAndRestoreOriginalValue(e.getShortcutManager().isCtrlPressed()),t.activeEditor.focus()}},c={name:"editorFastOpen",callback(e,t){const{highlight:n}=e.getSelectedRangeLast();n.isHeader()||e._getEditorManager().openEditor(null,t,!0)}};var u=n("de3b");const h={name:"editorOpen",callback(e,t,n){const r=e._getEditorManager(),i=e.getSelectedRangeLast(),{highlight:s}=i;if(e.selection.isMultiple()&&!i.isHeader()&&e.countRenderedCols()>0&&e.countRenderedRows()>0){const r=e.getSettings(),i="function"===typeof r.enterMoves?r.enterMoves(t):r.enterMoves;n.includes("shift")?e.selection.transformFocus(-i.row,-i.col):e.selection.transformFocus(i.row,i.col)}else s.isHeader()||(e.getSettings().enterBeginsEditing?r.cellProperties.readOnly?r.moveSelectionAfterEnter(t):r.openEditor(null,t,!0):r.moveSelectionAfterEnter(t),Object(u["stopImmediatePropagation"])(t))}};function d(){return[i,o,a,l,c,h]}const m={name:"extendCellsSelectionDown",callback(e){const{highlight:t}=e.getSelectedRangeLast();e.selection.isSelectedByColumnHeader()||e.selection.isSelectedByCorner()||!(t.isCell()||t.isHeader()&&e.selection.isSelectedByRowHeader())||e.selection.transformEnd(1,0)}},g={name:"extendCellsSelectionDownByViewportHeight",callback(e){const{to:t}=e.getSelectedRangeLast(),n=Math.min(t.row+e.countVisibleRows(),e.countRows()-1),r=e.rowIndexMapper.getNearestNotHiddenIndex(n,-1);if(null!==r){const n=e._createCellCoords(r,t.col),i=t.row-e.view.getFirstFullyVisibleRow(),s=Math.min(n.row-i,e.countRows()-1);e.selection.setRangeEnd(n),e.scrollViewportTo({row:s,verticalSnap:"top",horizontalSnap:"start"})}}},p={name:"extendCellsSelectionLeft",callback(e){const{highlight:t}=e.getSelectedRangeLast();e.selection.isSelectedByRowHeader()||e.selection.isSelectedByCorner()||!(t.isCell()||t.isHeader()&&e.selection.isSelectedByColumnHeader())||e.selection.transformEnd(0,-1*e.getDirectionFactor())}},f={name:"extendCellsSelectionRight",callback(e){const{highlight:t}=e.getSelectedRangeLast();e.selection.isSelectedByRowHeader()||e.selection.isSelectedByCorner()||!(t.isCell()||t.isHeader()&&e.selection.isSelectedByColumnHeader())||e.selection.transformEnd(0,e.getDirectionFactor())}},R={name:"extendCellsSelectionToColumns",callback(e){const{highlight:t,from:n,to:r}=e.getSelectedRangeLast();e.selection.isSelectedByRowHeader()?e.selection.selectAll(!0,!0):e.selectColumns(n.col,r.col,t)}},y={name:"extendCellsSelectionToMostBottom",callback(e){const{selection:t,rowIndexMapper:n}=e,{highlight:r,from:i,to:s}=e.getSelectedRangeLast(),o=r.isHeader()&&e.selection.isSelectedByRowHeader();if(r.isCell()||o){const a=n.getNearestNotHiddenIndex(e.countRows()-1,-1),l=i.clone();l.row=r.row,t.setRangeStart(l,void 0,!1,r.clone()),o&&t.selectedByRowHeader.add(t.getLayerLevel()),t.setRangeEnd(e._createCellCoords(a,s.col))}}},M={name:"extendCellsSelectionToMostInlineEnd",callback(e){const{selection:t,columnIndexMapper:n}=e,{highlight:r,from:i,to:s}=e.getSelectedRangeLast();if(!e.selection.isSelectedByRowHeader()&&!e.selection.isSelectedByCorner()&&r.isCell()){const o=n.getNearestNotHiddenIndex(e.countCols()-1,-1),a=i.clone();a.col=r.col,t.setRangeStart(a,void 0,!1,r.clone()),t.setRangeEnd(e._createCellCoords(s.row,o))}}},S={name:"extendCellsSelectionToMostInlineStart",callback(e){const{selection:t,columnIndexMapper:n}=e,{highlight:r,from:i,to:s}=e.getSelectedRangeLast();if(!e.selection.isSelectedByRowHeader()&&!e.selection.isSelectedByCorner()&&r.isCell()){const o=parseInt(e.getSettings().fixedColumnsStart,10),a=n.getNearestNotHiddenIndex(o,1),l=i.clone();l.col=r.col,t.setRangeStart(l,void 0,!1,r.clone()),t.setRangeEnd(e._createCellCoords(s.row,a))}}},b={name:"extendCellsSelectionToMostLeft",callback(e){const{selection:t,columnIndexMapper:n}=e,{highlight:r,from:i,to:s}=e.getSelectedRangeLast(),o=r.isHeader()&&e.selection.isSelectedByColumnHeader();if(r.isCell()||o){const a=n.getNearestNotHiddenIndex(...e.isRtl()?[e.countCols()-1,-1]:[0,1]),l=i.clone();l.col=r.col,t.setRangeStart(l,void 0,!1,r.clone()),o&&t.selectedByColumnHeader.add(t.getLayerLevel()),t.setRangeEnd(e._createCellCoords(s.row,a))}}},w={name:"extendCellsSelectionToMostRight",callback(e){const{selection:t,columnIndexMapper:n}=e,{highlight:r,from:i,to:s}=e.getSelectedRangeLast(),o=r.isHeader()&&e.selection.isSelectedByColumnHeader();if(r.isCell()||o){const a=n.getNearestNotHiddenIndex(...e.isRtl()?[0,1]:[e.countCols()-1,-1]),l=i.clone();l.col=r.col,t.setRangeStart(l,void 0,!1,r.clone()),o&&t.selectedByColumnHeader.add(t.getLayerLevel()),t.setRangeEnd(e._createCellCoords(s.row,a))}}},T={name:"extendCellsSelectionToMostTop",callback(e){const{selection:t,rowIndexMapper:n}=e,{highlight:r,from:i,to:s}=e.getSelectedRangeLast(),o=r.isHeader()&&e.selection.isSelectedByRowHeader();if(r.isCell()||o){const a=n.getNearestNotHiddenIndex(0,1),l=i.clone();l.row=r.row,t.setRangeStart(l,void 0,!1,r.clone()),o&&t.selectedByRowHeader.add(t.getLayerLevel()),t.setRangeEnd(e._createCellCoords(a,s.col))}}},O={name:"extendCellsSelectionToRows",callback(e){const{highlight:t,from:n,to:r}=e.getSelectedRangeLast();e.selection.isSelectedByColumnHeader()?e.selection.selectAll(!0,!0):e.selectRows(n.row,r.row,t)}},v={name:"extendCellsSelectionUp",callback(e){const{highlight:t}=e.getSelectedRangeLast();e.selection.isSelectedByColumnHeader()||e.selection.isSelectedByCorner()||!(t.isCell()||t.isHeader()&&e.selection.isSelectedByRowHeader())||e.selection.transformEnd(-1,0)}},E={name:"extendCellsSelectionUpByViewportHeight",callback(e){const{to:t}=e.getSelectedRangeLast(),n=Math.max(t.row-e.countVisibleRows(),0),r=e.rowIndexMapper.getNearestNotHiddenIndex(n,1);if(null!==r){const n=e._createCellCoords(r,t.col),i=t.row-e.view.getFirstFullyVisibleRow(),s=Math.max(n.row-i,0);e.selection.setRangeEnd(n),e.scrollViewportTo({row:s,verticalSnap:"top",horizontalSnap:"start"})}}};function C(){return[m,g,p,f,R,y,M,S,b,w,T,O,v,E]}const L={name:"moveCellSelectionDown",callback(e){let{selection:t}=e;t.transformStart(1,0)}},N={name:"moveCellSelectionDownByViewportHeight",callback(e){const{navigableHeaders:t}=e.getSettings(),n=t?e.countColHeaders():0,{row:r}=e.getSelectedRangeLast().highlight;let i=e.countVisibleRows()+n;r===e.countRows()-1?i=1:r+i>e.countRows()&&(i=e.countRows()-r-1),e.selection.transformStart(i,0),e.getSelectedRangeLast().highlight.row<0&&e.scrollViewportTo({row:0})}},_={name:"moveCellSelectionInlineEnd",callback(e,t){const n=e.getSettings(),r=e.getSelectedRangeLast(),i="function"===typeof n.tabMoves?n.tabMoves(t):n.tabMoves;e.selection.isMultiple()&&!r.isHeader()&&e.countRenderedCols()>0&&e.countRenderedRows()>0?e.selection.transformFocus(-i.row,-i.col):e.selection.transformStart(-i.row,-i.col)}},I={name:"moveCellSelectionInlineStart",callback(e,t){const n=e.getSettings(),r=e.getSelectedRangeLast(),i="function"===typeof n.tabMoves?n.tabMoves(t):n.tabMoves;e.selection.isMultiple()&&!r.isHeader()&&e.countRenderedCols()>0&&e.countRenderedRows()>0?e.selection.transformFocus(i.row,i.col):e.selection.transformStart(i.row,i.col)}},P={name:"moveCellSelectionLeft",callback(e){e.selection.transformStart(0,-1*e.getDirectionFactor())}},x={name:"moveCellSelectionRight",callback(e){e.selection.transformStart(0,e.getDirectionFactor())}},D={name:"moveCellSelectionToMostBottom",callback(e){const{col:t}=e.getSelectedRangeLast().highlight;let n=e.rowIndexMapper.getNearestNotHiddenIndex(e.countRows()-1,-1);null===n&&(n=-1),e.selection.setRangeStart(e._createCellCoords(n,t))}},A={name:"moveCellSelectionToMostBottomInlineEnd",callback(e){const{selection:t,rowIndexMapper:n,columnIndexMapper:r}=e,i=parseInt(e.getSettings().fixedRowsBottom,10),s=n.getNearestNotHiddenIndex(e.countRows()-i-1,-1),o=r.getNearestNotHiddenIndex(e.countCols()-1,-1);t.setRangeStart(e._createCellCoords(s,o))}},F={name:"moveCellSelectionToMostInlineEnd",callback(e){const{selection:t,columnIndexMapper:n}=e;t.setRangeStart(e._createCellCoords(e.getSelectedRangeLast().highlight.row,n.getNearestNotHiddenIndex(e.countCols()-1,-1)))}},Y={name:"moveCellSelectionToMostInlineStart",callback(e){const{selection:t,columnIndexMapper:n}=e,r=parseInt(e.getSettings().fixedColumnsStart,10),i=e.getSelectedRangeLast().highlight.row,s=n.getNearestNotHiddenIndex(r,1);t.setRangeStart(e._createCellCoords(i,s))}},H={name:"moveCellSelectionToMostLeft",callback(e){const{selection:t,columnIndexMapper:n}=e,r=e.getSelectedRangeLast().highlight.row;let i=n.getNearestNotHiddenIndex(...e.isRtl()?[e.countCols()-1,-1]:[0,1]);null===i&&(i=e.isRtl()?-1:-e.countRowHeaders()),t.setRangeStart(e._createCellCoords(r,i))}},k={name:"moveCellSelectionToMostRight",callback(e){const{selection:t,columnIndexMapper:n}=e,{row:r}=e.getSelectedRangeLast().highlight;let i=n.getNearestNotHiddenIndex(...e.isRtl()?[0,1]:[e.countCols()-1,-1]);null===i&&(i=e.isRtl()?-e.countRowHeaders():-1),t.setRangeStart(e._createCellCoords(r,i))}},V={name:"moveCellSelectionToMostTop",callback(e){const{col:t}=e.getSelectedRangeLast().highlight;let n=e.rowIndexMapper.getNearestNotHiddenIndex(0,1);null===n&&(n=-e.countColHeaders()),e.selection.setRangeStart(e._createCellCoords(n,t))}},U={name:"moveCellSelectionToMostTopInlineStart",callback(e){const{selection:t,rowIndexMapper:n,columnIndexMapper:r}=e,i=parseInt(e.getSettings().fixedRowsTop,10),s=parseInt(e.getSettings().fixedColumnsStart,10),o=n.getNearestNotHiddenIndex(i,1),a=r.getNearestNotHiddenIndex(s,1);t.setRangeStart(e._createCellCoords(o,a))}},W={name:"moveCellSelectionUp",callback(e){let{selection:t}=e;t.transformStart(-1,0)}},X={name:"moveCellSelectionUpByViewportHight",callback(e){const{navigableHeaders:t}=e.getSettings(),n=t?e.countColHeaders():0,{row:r}=e.getSelectedRangeLast().highlight;let i=-(e.countVisibleRows()+n);r===-n?i=-1:r+i<n&&(i=-(r+n)),e.selection.transformStart(i,0),e.getSelectedRangeLast().highlight.row<0&&e.scrollViewportTo({row:0})}};function j(){return[L,N,_,I,P,x,D,A,F,Y,H,k,V,U,W,X]}const Z={name:"emptySelectedCells",callback(e){e.emptySelectedCells(),e._getEditorManager().prepareEditor()}},Q={name:"scrollToFocusedCell",callback(e){const{highlight:t}=e.getSelectedRangeLast(),n=e.view.getFirstFullyVisibleRow()-1,r=e.view.getFirstFullyVisibleColumn()-1,i=e.view.getLastFullyVisibleRow()+1,s=e.view.getLastFullyVisibleColumn()+1,o=e._createCellCoords(n,r),a=e._createCellCoords(i,s),l=e._createCellRange(o,o,a);if(!l.includes(t)&&(t.row>=0||t.col>=0)){const n={};if(t.col>=0){const r=Math.floor(e.countVisibleCols()/2);n.col=Math.max(t.col-r,0)}if(t.row>=0){const r=Math.floor(e.countVisibleRows()/2);n.row=Math.max(t.row-r,0)}e.scrollViewportTo({...n,verticalSnap:"top",horizontalSnap:"start"})}}},K={name:"selectAllCells",callback(e){e.selection.selectAll(!0,!0,{disableHeadersHighlight:!0})}},G={name:"selectAllCellsAndHeaders",callback(e){e.selection.selectAll(!0,!0,{disableHeadersHighlight:!1})}},B={name:"populateSelectedCellsData",callback(e){const t=e.getSelectedRange(),{row:n,col:r}=t[t.length-1].highlight.normalize(),i=e.getDataAtCell(n,r),s=new Map;for(let o=0;o<t.length;o++)t[o].forAll((t,o)=>{if(t>=0&&o>=0&&(t!==n||o!==r)){const{readOnly:n}=e.getCellMeta(t,o);n||s.set(`${t}x${o}`,[t,o,i])}});e.setDataAtCell(Array.from(s.values()))}},J=[...d(),...C(),...j(),Z,Q,K,G,B];function z(e){const t={};return J.forEach(n=>{let{name:r,callback:i}=n;t[r]=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return i(e,...n)}}),t}function $(e){const t=e.getShortcutManager().addContext("editor"),n=z(e),i={group:r["a"]};t.addShortcuts([{keys:[["Enter"],["Enter","Shift"]],callback:(e,t)=>n.editorCloseAndSaveByEnter(e,t)},{keys:[["Enter","Control/Meta"],["Enter","Control/Meta","Shift"]],captureCtrl:!0,callback:(e,t)=>n.editorCloseAndSaveByEnter(e,t)},{keys:[["Tab"],["Tab","Shift"],["PageDown"],["PageUp"]],forwardToContext:e.getShortcutManager().getContext("grid"),callback:(e,t)=>n.editorCloseAndSave(e,t)},{keys:[["ArrowDown"],["ArrowUp"],["ArrowLeft"],["ArrowRight"]],preventDefault:!1,callback:(e,t)=>n.editorCloseAndSaveByArrowKeys(e,t)},{keys:[["Escape"],["Escape","Control/Meta"]],callback:()=>n.editorCloseWithoutSaving()}],i)}var q=n("7b9c");function ee(e){const t=e.getShortcutManager().addContext("grid"),n=z(e),i={runOnlyIf:()=>{const{navigableHeaders:t}=e.getSettings();return Object(q["isDefined"])(e.getSelected())&&(t||!t&&e.countRenderedRows()>0&&e.countRenderedCols()>0)},group:r["b"]};t.addShortcuts([{keys:[["F2"]],callback:e=>n.editorFastOpen(e)},{keys:[["Enter"],["Enter","Shift"]],callback:(e,t)=>n.editorOpen(e,t)},{keys:[["Backspace"],["Delete"]],callback:()=>n.emptySelectedCells()}],{group:r["a"],runOnlyIf:()=>Object(q["isDefined"])(e.getSelected())}),t.addShortcuts([{keys:[["Control/Meta","A"]],callback:()=>n.selectAllCells(),runOnlyIf:()=>{var t;return!(null!==(t=e.getSelectedRangeLast())&&void 0!==t&&t.highlight.isHeader())}},{keys:[["Control/Meta","A"]],callback:()=>{},runOnlyIf:()=>{var t;return null===(t=e.getSelectedRangeLast())||void 0===t?void 0:t.highlight.isHeader()},preventDefault:!0},{keys:[["Control/Meta","Shift","Space"]],callback:()=>n.selectAllCellsAndHeaders()},{keys:[["Control/Meta","Enter"]],callback:()=>n.populateSelectedCellsData(),runOnlyIf:()=>{var t,n;return!(null!==(t=e.getSelectedRangeLast())&&void 0!==t&&t.highlight.isHeader())&&(null===(n=e.getSelectedRangeLast())||void 0===n?void 0:n.getCellsCount())>1}},{keys:[["Control","Space"]],captureCtrl:!0,callback:()=>n.extendCellsSelectionToColumns()},{keys:[["Shift","Space"]],stopPropagation:!0,callback:()=>n.extendCellsSelectionToRows()},{keys:[["ArrowUp"]],callback:()=>n.moveCellSelectionUp()},{keys:[["ArrowUp","Control/Meta"]],captureCtrl:!0,callback:()=>n.moveCellSelectionToMostTop()},{keys:[["ArrowUp","Shift"]],callback:()=>n.extendCellsSelectionUp()},{keys:[["ArrowUp","Shift","Control/Meta"]],captureCtrl:!0,callback:()=>n.extendCellsSelectionToMostTop(),runOnlyIf:()=>!(e.selection.isSelectedByCorner()||e.selection.isSelectedByColumnHeader())},{keys:[["ArrowDown"]],callback:()=>n.moveCellSelectionDown()},{keys:[["ArrowDown","Control/Meta"]],captureCtrl:!0,callback:()=>n.moveCellSelectionToMostBottom()},{keys:[["ArrowDown","Shift"]],callback:()=>n.extendCellsSelectionDown()},{keys:[["ArrowDown","Shift","Control/Meta"]],captureCtrl:!0,callback:()=>n.extendCellsSelectionToMostBottom(),runOnlyIf:()=>!(e.selection.isSelectedByCorner()||e.selection.isSelectedByColumnHeader())},{keys:[["ArrowLeft"]],callback:()=>n.moveCellSelectionLeft()},{keys:[["ArrowLeft","Control/Meta"]],captureCtrl:!0,callback:()=>n.moveCellSelectionToMostLeft()},{keys:[["ArrowLeft","Shift"]],callback:()=>n.extendCellsSelectionLeft()},{keys:[["ArrowLeft","Shift","Control/Meta"]],captureCtrl:!0,callback:()=>n.extendCellsSelectionToMostLeft(),runOnlyIf:()=>!(e.selection.isSelectedByCorner()||e.selection.isSelectedByRowHeader())},{keys:[["ArrowRight"]],callback:()=>n.moveCellSelectionRight()},{keys:[["ArrowRight","Control/Meta"]],captureCtrl:!0,callback:()=>n.moveCellSelectionToMostRight()},{keys:[["ArrowRight","Shift"]],callback:()=>n.extendCellsSelectionRight()},{keys:[["ArrowRight","Shift","Control/Meta"]],captureCtrl:!0,callback:()=>n.extendCellsSelectionToMostRight(),runOnlyIf:()=>!(e.selection.isSelectedByCorner()||e.selection.isSelectedByRowHeader())},{keys:[["Home"]],captureCtrl:!0,callback:()=>n.moveCellSelectionToMostInlineStart(),runOnlyIf:()=>e.view.isMainTableNotFullyCoveredByOverlays()},{keys:[["Home","Shift"]],callback:()=>n.extendCellsSelectionToMostInlineStart()},{keys:[["Home","Control/Meta"]],captureCtrl:!0,callback:()=>n.moveCellSelectionToMostTopInlineStart(),runOnlyIf:()=>e.view.isMainTableNotFullyCoveredByOverlays()},{keys:[["End"]],captureCtrl:!0,callback:()=>n.moveCellSelectionToMostInlineEnd(),runOnlyIf:()=>e.view.isMainTableNotFullyCoveredByOverlays()},{keys:[["End","Shift"]],callback:()=>n.extendCellsSelectionToMostInlineEnd()},{keys:[["End","Control/Meta"]],captureCtrl:!0,callback:()=>n.moveCellSelectionToMostBottomInlineEnd(),runOnlyIf:()=>e.view.isMainTableNotFullyCoveredByOverlays()},{keys:[["PageUp"]],callback:()=>n.moveCellSelectionUpByViewportHight()},{keys:[["PageUp","Shift"]],callback:()=>n.extendCellsSelectionUpByViewportHeight()},{keys:[["PageDown"]],callback:()=>n.moveCellSelectionDownByViewportHeight()},{keys:[["PageDown","Shift"]],callback:()=>n.extendCellsSelectionDownByViewportHeight()},{keys:[["Tab"]],preventDefault:!1,callback:e=>n.moveCellSelectionInlineStart(e)},{keys:[["Shift","Tab"]],preventDefault:!1,callback:e=>n.moveCellSelectionInlineEnd(e)},{keys:[["Control/Meta","Backspace"]],callback:()=>n.scrollToFocusedCell()}],i)}function te(e){[ee,$].forEach(t=>t(e))}},"1fc1":function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
  54. //! moment.js locale configuration
  55. function t(e,t){var n=e.split("_");return t%10===1&&t%100!==11?n[0]:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?n[1]:n[2]}function n(e,n,r){var i={ss:n?"секунда_секунды_секунд":"секунду_секунды_секунд",mm:n?"хвіліна_хвіліны_хвілін":"хвіліну_хвіліны_хвілін",hh:n?"гадзіна_гадзіны_гадзін":"гадзіну_гадзіны_гадзін",dd:"дзень_дні_дзён",MM:"месяц_месяцы_месяцаў",yy:"год_гады_гадоў"};return"m"===r?n?"хвіліна":"хвіліну":"h"===r?n?"гадзіна":"гадзіну":e+" "+t(i[r],+e)}var r=e.defineLocale("be",{months:{format:"студзеня_лютага_сакавіка_красавіка_траўня_чэрвеня_ліпеня_жніўня_верасня_кастрычніка_лістапада_снежня".split("_"),standalone:"студзень_люты_сакавік_красавік_травень_чэрвень_ліпень_жнівень_верасень_кастрычнік_лістапад_снежань".split("_")},monthsShort:"студ_лют_сак_крас_трав_чэрв_ліп_жнів_вер_каст_ліст_снеж".split("_"),weekdays:{format:"нядзелю_панядзелак_аўторак_сераду_чацвер_пятніцу_суботу".split("_"),standalone:"нядзеля_панядзелак_аўторак_серада_чацвер_пятніца_субота".split("_"),isFormat:/\[ ?[Ууў] ?(?:мінулую|наступную)? ?\] ?dddd/},weekdaysShort:"нд_пн_ат_ср_чц_пт_сб".split("_"),weekdaysMin:"нд_пн_ат_ср_чц_пт_сб".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY г.",LLL:"D MMMM YYYY г., HH:mm",LLLL:"dddd, D MMMM YYYY г., HH:mm"},calendar:{sameDay:"[Сёння ў] LT",nextDay:"[Заўтра ў] LT",lastDay:"[Учора ў] LT",nextWeek:function(){return"[У] dddd [ў] LT"},lastWeek:function(){switch(this.day()){case 0:case 3:case 5:case 6:return"[У мінулую] dddd [ў] LT";case 1:case 2:case 4:return"[У мінулы] dddd [ў] LT"}},sameElse:"L"},relativeTime:{future:"праз %s",past:"%s таму",s:"некалькі секунд",m:n,mm:n,h:n,hh:n,d:"дзень",dd:n,M:"месяц",MM:n,y:"год",yy:n},meridiemParse:/ночы|раніцы|дня|вечара/,isPM:function(e){return/^(дня|вечара)$/.test(e)},meridiem:function(e,t,n){return e<4?"ночы":e<12?"раніцы":e<17?"дня":"вечара"},dayOfMonthOrdinalParse:/\d{1,2}-(і|ы|га)/,ordinal:function(e,t){switch(t){case"M":case"d":case"DDD":case"w":case"W":return e%10!==2&&e%10!==3||e%100===12||e%100===13?e+"-ы":e+"-і";case"D":return e+"-га";default:return e}},week:{dow:1,doy:7}});return r}))},"201b":function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
  56. //! moment.js locale configuration
  57. var t=e.defineLocale("ka",{months:"იანვარი_თებერვალი_მარტი_აპრილი_მაისი_ივნისი_ივლისი_აგვისტო_სექტემბერი_ოქტომბერი_ნოემბერი_დეკემბერი".split("_"),monthsShort:"იან_თებ_მარ_აპრ_მაი_ივნ_ივლ_აგვ_სექ_ოქტ_ნოე_დეკ".split("_"),weekdays:{standalone:"კვირა_ორშაბათი_სამშაბათი_ოთხშაბათი_ხუთშაბათი_პარასკევი_შაბათი".split("_"),format:"კვირას_ორშაბათს_სამშაბათს_ოთხშაბათს_ხუთშაბათს_პარასკევს_შაბათს".split("_"),isFormat:/(წინა|შემდეგ)/},weekdaysShort:"კვი_ორშ_სამ_ოთხ_ხუთ_პარ_შაბ".split("_"),weekdaysMin:"კვ_ორ_სა_ოთ_ხუ_პა_შა".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[დღეს] LT[-ზე]",nextDay:"[ხვალ] LT[-ზე]",lastDay:"[გუშინ] LT[-ზე]",nextWeek:"[შემდეგ] dddd LT[-ზე]",lastWeek:"[წინა] dddd LT-ზე",sameElse:"L"},relativeTime:{future:function(e){return e.replace(/(წამ|წუთ|საათ|წელ|დღ|თვ)(ი|ე)/,(function(e,t,n){return"ი"===n?t+"ში":t+n+"ში"}))},past:function(e){return/(წამი|წუთი|საათი|დღე|თვე)/.test(e)?e.replace(/(ი|ე)$/,"ის წინ"):/წელი/.test(e)?e.replace(/წელი$/,"წლის წინ"):e},s:"რამდენიმე წამი",ss:"%d წამი",m:"წუთი",mm:"%d წუთი",h:"საათი",hh:"%d საათი",d:"დღე",dd:"%d დღე",M:"თვე",MM:"%d თვე",y:"წელი",yy:"%d წელი"},dayOfMonthOrdinalParse:/0|1-ლი|მე-\d{1,2}|\d{1,2}-ე/,ordinal:function(e){return 0===e?e:1===e?e+"-ლი":e<20||e<=100&&e%20===0||e%100===0?"მე-"+e:e+"-ე"},week:{dow:1,doy:7}});return t}))},"20b7":function(e,t,n){},"20cc":function(e,t,n){"use strict";var r=n("da84"),i=n("2ba4"),s=n("1626"),o=n("c6a7"),a=n("342f"),l=n("f36a"),c=n("d6d6"),u=r.Function,h=/MSIE .\./.test(a)||o&&function(){var e=r.Bun.version.split(".");return e.length<3||"0"===e[0]&&(e[1]<3||"3"===e[1]&&"0"===e[2])}();e.exports=function(e,t){var n=t?2:1;return h?function(r,o){var a=c(arguments.length,1)>n,h=s(r)?r:u(r),d=a?l(arguments,n):[],m=a?function(){i(h,this,d)}:h;return t?e(m,o):e(m)}:e}},"220a":function(e,t,n){"use strict";n("d9e2"),n("14d9");var r=n("5d7f"),i=n("81ea");function s(e,t,n){return(t=o(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e){var t=a(e,"string");return"symbol"==typeof t?t:t+""}function a(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}class l{constructor(e){s(this,"hot",null),s(this,"container",null),s(this,"injected",!1),s(this,"rows",[]),s(this,"columns",[]),s(this,"samples",null),s(this,"settings",{useHeaders:!0}),this.hot=e}addRow(e,t){if(this.columns.length)throw new Error("Doesn't support multi-dimensional table");this.rows.length||(this.container=this.createContainer(this.hot.rootElement.className));const n={row:e};this.rows.push(n),this.samples=t,this.table=this.createTable(this.hot.table.className),this.table.colGroup.appendChild(this.createColGroupsCol(e)),this.table.tr.appendChild(this.createRow(e)),this.container.container.appendChild(this.table.fragment),n.table=this.table.table}addColumnHeadersRow(e){const t=this.hot.getColHeader(0);if(null!==t&&void 0!==t){const t={row:-1};this.rows.push(t),this.container=this.createContainer(this.hot.rootElement.className),this.samples=e,this.table=this.createTable(this.hot.table.className),this.table.colGroup.appendChild(this.createColGroupsCol()),this.appendColumnHeadersRow(),this.container.container.appendChild(this.table.fragment),t.table=this.table.table}}addColumn(e,t){if(this.rows.length)throw new Error("Doesn't support multi-dimensional table");this.columns.length||(this.container=this.createContainer(this.hot.rootElement.className));const n={col:e};this.columns.push(n),this.samples=t,this.table=this.createTable(this.hot.table.className),this.getSetting("useHeaders")&&null!==this.hot.getColHeader(e)&&this.hot.view.appendColHeader(e,this.table.th),this.table.tBody.appendChild(this.createCol(e)),this.container.container.appendChild(this.table.fragment),n.table=this.table.table}getHeights(e){this.injected||this.injectTable(),Object(i["arrayEach"])(this.rows,t=>{const{height:n}=t.table.getBoundingClientRect();e(t.row,Math.ceil(n)-1)})}getWidths(e){this.injected||this.injectTable(),Object(i["arrayEach"])(this.columns,t=>{const{width:n}=t.table.getBoundingClientRect();e(t.col,Math.ceil(n))})}setSettings(e){this.settings=e}setSetting(e,t){this.settings||(this.settings={}),this.settings[e]=t}getSettings(){return this.settings}getSetting(e){return this.settings?this.settings[e]:null}createColGroupsCol(e){const t=this.hot.rootDocument.createDocumentFragment();return this.hot.hasRowHeaders()&&t.appendChild(this.createColElement(-1,-1)),this.samples.forEach(n=>{Object(i["arrayEach"])(n.strings,n=>{t.appendChild(this.createColElement(n.col,e))})}),t}createRow(e){const{rootDocument:t}=this.hot,n=t.createDocumentFragment(),r=t.createElement("th");return this.hot.hasRowHeaders()&&(this.hot.view.appendRowHeader(e,r),n.appendChild(r)),this.samples.forEach(r=>{Object(i["arrayEach"])(r.strings,r=>{const i=r.col,s=this.hot.getCellMeta(e,i),o=this.hot.getCellRenderer(s),a=t.createElement("td");a.setAttribute("ghost-table",1),o(this.hot,a,e,i,this.hot.colToProp(i),r.value,s),n.appendChild(a)})}),n}appendColumnHeadersRow(){const{rootDocument:e}=this.hot,t=e.createDocumentFragment(),n=[];if(this.hot.hasRowHeaders()){const r=e.createElement("th");n.push([-1,r]),t.appendChild(r)}this.samples.forEach(r=>{Object(i["arrayEach"])(r.strings,r=>{const i=r.col,s=e.createElement("th");n.push([i,s]),t.appendChild(s)})}),this.table.tHead.appendChild(t),Object(i["arrayEach"])(n,e=>{const[t,n]=e;this.hot.view.appendColHeader(t,n)})}createCol(e){const{rootDocument:t}=this.hot,n=t.createDocumentFragment();return this.samples.forEach(r=>{Object(i["arrayEach"])(r.strings,r=>{const i=r.row,s=this.hot.getCellMeta(i,e),o=this.hot.getCellRenderer(s),a=t.createElement("td"),l=t.createElement("tr");a.setAttribute("ghost-table",1),o(this.hot,a,i,e,this.hot.colToProp(e),r.value,s),l.appendChild(a),n.appendChild(l)})}),n}clean(){this.rows.length=0,this.rows[-1]=void 0,this.columns.length=0,this.samples&&this.samples.clear(),this.samples=null,this.removeTable()}injectTable(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;this.injected||((e||this.hot.rootElement).appendChild(this.container.fragment),this.injected=!0)}removeTable(){this.injected&&this.container.container.parentNode&&(this.container.container.parentNode.removeChild(this.container.container),this.container=null,this.injected=!1)}createColElement(e,t){const n=this.hot.rootDocument.createElement("col");let r=0;t>=0&&e>=0&&(r=this.hot.getCellMeta(t,e).colspan);let i=this.hot.getColWidth(e);if(r>1)for(let s=e+1;s<e+r;s++)i+=this.hot.getColWidth(s);return n.style.width=i+"px",n}createTable(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";const{rootDocument:t}=this.hot,n=t.createDocumentFragment(),i=t.createElement("table"),s=t.createElement("thead"),o=t.createElement("tbody"),a=t.createElement("colgroup"),l=t.createElement("tr"),c=t.createElement("th");return this.isVertical()&&i.appendChild(a),this.isHorizontal()&&(l.appendChild(c),s.appendChild(l),i.style.tableLayout="auto",i.style.width="auto"),i.appendChild(s),this.isVertical()&&o.appendChild(l),i.appendChild(o),Object(r["addClass"])(i,e),n.appendChild(i),{fragment:n,table:i,tHead:s,tBody:o,colGroup:a,tr:l,th:c}}createContainer(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";const{rootDocument:t}=this.hot,n=t.createDocumentFragment(),i=t.createElement("div"),s="htGhostTable htAutoSize "+e.trim();return Object(r["addClass"])(i,s),n.appendChild(i),{fragment:n,container:i}}isVertical(){return!(!this.rows.length||this.columns.length)}isHorizontal(){return!(!this.columns.length||this.rows.length)}}t["a"]=l},"22f8":function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
  58. //! moment.js locale configuration
  59. var t=e.defineLocale("ko",{months:"1월_2월_3월_4월_5월_6월_7월_8월_9월_10월_11월_12월".split("_"),monthsShort:"1월_2월_3월_4월_5월_6월_7월_8월_9월_10월_11월_12월".split("_"),weekdays:"일요일_월요일_화요일_수요일_목요일_금요일_토요일".split("_"),weekdaysShort:"일_월_화_수_목_금_토".split("_"),weekdaysMin:"일_월_화_수_목_금_토".split("_"),longDateFormat:{LT:"A h:mm",LTS:"A h:mm:ss",L:"YYYY.MM.DD.",LL:"YYYY년 MMMM D일",LLL:"YYYY년 MMMM D일 A h:mm",LLLL:"YYYY년 MMMM D일 dddd A h:mm",l:"YYYY.MM.DD.",ll:"YYYY년 MMMM D일",lll:"YYYY년 MMMM D일 A h:mm",llll:"YYYY년 MMMM D일 dddd A h:mm"},calendar:{sameDay:"오늘 LT",nextDay:"내일 LT",nextWeek:"dddd LT",lastDay:"어제 LT",lastWeek:"지난주 dddd LT",sameElse:"L"},relativeTime:{future:"%s 후",past:"%s 전",s:"몇 초",ss:"%d초",m:"1분",mm:"%d분",h:"한 시간",hh:"%d시간",d:"하루",dd:"%d일",M:"한 달",MM:"%d달",y:"일 년",yy:"%d년"},dayOfMonthOrdinalParse:/\d{1,2}(일|월|주)/,ordinal:function(e,t){switch(t){case"d":case"D":case"DDD":return e+"일";case"M":return e+"월";case"w":case"W":return e+"주";default:return e}},meridiemParse:/오전|오후/,isPM:function(e){return"오후"===e},meridiem:function(e,t,n){return e<12?"오전":"오후"}});return t}))},2421:function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
  60. //! moment.js locale configuration
  61. var t={1:"١",2:"٢",3:"٣",4:"٤",5:"٥",6:"٦",7:"٧",8:"٨",9:"٩",0:"٠"},n={"١":"1","٢":"2","٣":"3","٤":"4","٥":"5","٦":"6","٧":"7","٨":"8","٩":"9","٠":"0"},r=["کانونی دووەم","شوبات","ئازار","نیسان","ئایار","حوزەیران","تەمموز","ئاب","ئەیلوول","تشرینی یەكەم","تشرینی دووەم","كانونی یەکەم"],i=e.defineLocale("ku",{months:r,monthsShort:r,weekdays:"یه‌كشه‌ممه‌_دووشه‌ممه‌_سێشه‌ممه‌_چوارشه‌ممه‌_پێنجشه‌ممه‌_هه‌ینی_شه‌ممه‌".split("_"),weekdaysShort:"یه‌كشه‌م_دووشه‌م_سێشه‌م_چوارشه‌م_پێنجشه‌م_هه‌ینی_شه‌ممه‌".split("_"),weekdaysMin:"ی_د_س_چ_پ_ه_ش".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},meridiemParse:/ئێواره‌|به‌یانی/,isPM:function(e){return/ئێواره‌/.test(e)},meridiem:function(e,t,n){return e<12?"به‌یانی":"ئێواره‌"},calendar:{sameDay:"[ئه‌مرۆ كاتژمێر] LT",nextDay:"[به‌یانی كاتژمێر] LT",nextWeek:"dddd [كاتژمێر] LT",lastDay:"[دوێنێ كاتژمێر] LT",lastWeek:"dddd [كاتژمێر] LT",sameElse:"L"},relativeTime:{future:"له‌ %s",past:"%s",s:"چه‌ند چركه‌یه‌ك",ss:"چركه‌ %d",m:"یه‌ك خوله‌ك",mm:"%d خوله‌ك",h:"یه‌ك كاتژمێر",hh:"%d كاتژمێر",d:"یه‌ك ڕۆژ",dd:"%d ڕۆژ",M:"یه‌ك مانگ",MM:"%d مانگ",y:"یه‌ك ساڵ",yy:"%d ساڵ"},preparse:function(e){return e.replace(/[١٢٣٤٥٦٧٨٩٠]/g,(function(e){return n[e]})).replace(/،/g,",")},postformat:function(e){return e.replace(/\d/g,(function(e){return t[e]})).replace(/,/g,"،")},week:{dow:6,doy:12}});return i}))},"24b5":function(e,t,n){"use strict";n.d(t,"b",(function(){return b})),n.d(t,"a",(function(){return w})),n.d(t,"c",(function(){return T})),n.d(t,"d",(function(){return O}));n("d9e2");var r=n("29b0"),i=n("ffec"),s=n("97b9");const o="asc",a="desc",l=new Map([[o,[-1,1]],[a,[1,-1]]]),c=e=>`The priority '${e}' is already declared in a map.`,u=e=>`The priority '${e}' is not a number.`;function h(){let{errorPriorityExists:e,errorPriorityNaN:t}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const n=new Map;function r(r,s){if(!Object(i["isNumeric"])(r))throw new Error(t(r));if(n.has(r))throw new Error(e(r));n.set(r,s)}function a(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:o;const[t,r]=l.get(e)||l.get(o);return[...n].sort((e,n)=>e[0]<n[0]?t:r).map(e=>e[1])}return e=Object(s["isFunction"])(e)?e:c,t=Object(s["isFunction"])(t)?t:u,{addItem:r,getItems:a}}var d=n("6906");n("1e70"),n("79a4"),n("c1a1"),n("8b00"),n("a4e7"),n("1e5a"),n("72c3");const m=e=>`'${e}' value is already declared in a unique set.`;function g(){let{errorItemExists:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=new Set;function n(n){if(t.has(n))throw new Error(e(n));t.add(n)}function r(){return[...t]}function i(){t.clear()}return e=Object(s["isFunction"])(e)?e:m,{addItem:n,clear:i,getItems:r}}const p=e=>`There is already registered "${e}" plugin.`,f=e=>`There is already registered plugin on priority "${e}".`,R=e=>`The priority "${e}" is not a number.`,y=h({errorPriorityExists:f,errorPriorityNaN:R}),M=g({errorItemExists:p}),S=Object(d["a"])({errorIdExists:p});function b(){return[...y.getItems(),...M.getItems()]}function w(e){const t=Object(r["toUpperCaseFirst"])(e);return S.getItem(t)}function T(e){return!!w(e)}function O(e,t,n){[e,t,n]=E(e,t,n),void 0===w(e)&&v(e,t,n)}function v(e,t,n){const i=Object(r["toUpperCaseFirst"])(e);if(S.hasItem(i))throw new Error(p(i));void 0===n?M.addItem(i):y.addItem(n,i),S.addItem(i,t)}function E(e,t,n){return"function"===typeof e&&(t=e,e=t.PLUGIN_KEY,n=t.PLUGIN_PRIORITY),[e,t,n]}},25548:function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
  62. //! moment.js locale configuration
  63. function t(e,t,n,r){switch(n){case"m":return t?"jedna minuta":r?"jednu minutu":"jedne minute"}}function n(e,t,n){var r=e+" ";switch(n){case"ss":return r+=1===e?"sekunda":2===e||3===e||4===e?"sekunde":"sekundi",r;case"mm":return r+=1===e?"minuta":2===e||3===e||4===e?"minute":"minuta",r;case"h":return"jedan sat";case"hh":return r+=1===e?"sat":2===e||3===e||4===e?"sata":"sati",r;case"dd":return r+=1===e?"dan":"dana",r;case"MM":return r+=1===e?"mjesec":2===e||3===e||4===e?"mjeseca":"mjeseci",r;case"yy":return r+=1===e?"godina":2===e||3===e||4===e?"godine":"godina",r}}var r=e.defineLocale("bs",{months:"januar_februar_mart_april_maj_juni_juli_august_septembar_oktobar_novembar_decembar".split("_"),monthsShort:"jan._feb._mar._apr._maj._jun._jul._aug._sep._okt._nov._dec.".split("_"),monthsParseExact:!0,weekdays:"nedjelja_ponedjeljak_utorak_srijeda_četvrtak_petak_subota".split("_"),weekdaysShort:"ned._pon._uto._sri._čet._pet._sub.".split("_"),weekdaysMin:"ne_po_ut_sr_če_pe_su".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm",LLLL:"dddd, D. MMMM YYYY H:mm"},calendar:{sameDay:"[danas u] LT",nextDay:"[sutra u] LT",nextWeek:function(){switch(this.day()){case 0:return"[u] [nedjelju] [u] LT";case 3:return"[u] [srijedu] [u] LT";case 6:return"[u] [subotu] [u] LT";case 1:case 2:case 4:case 5:return"[u] dddd [u] LT"}},lastDay:"[jučer u] LT",lastWeek:function(){switch(this.day()){case 0:case 3:return"[prošlu] dddd [u] LT";case 6:return"[prošle] [subote] [u] LT";case 1:case 2:case 4:case 5:return"[prošli] dddd [u] LT"}},sameElse:"L"},relativeTime:{future:"za %s",past:"prije %s",s:"par sekundi",ss:n,m:t,mm:n,h:n,hh:n,d:"dan",dd:n,M:"mjesec",MM:n,y:"godinu",yy:n},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:7}});return r}))},"26f9":function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
  64. //! moment.js locale configuration
  65. var t={ss:"sekundė_sekundžių_sekundes",m:"minutė_minutės_minutę",mm:"minutės_minučių_minutes",h:"valanda_valandos_valandą",hh:"valandos_valandų_valandas",d:"diena_dienos_dieną",dd:"dienos_dienų_dienas",M:"mėnuo_mėnesio_mėnesį",MM:"mėnesiai_mėnesių_mėnesius",y:"metai_metų_metus",yy:"metai_metų_metus"};function n(e,t,n,r){return t?"kelios sekundės":r?"kelių sekundžių":"kelias sekundes"}function r(e,t,n,r){return t?s(n)[0]:r?s(n)[1]:s(n)[2]}function i(e){return e%10===0||e>10&&e<20}function s(e){return t[e].split("_")}function o(e,t,n,o){var a=e+" ";return 1===e?a+r(e,t,n[0],o):t?a+(i(e)?s(n)[1]:s(n)[0]):o?a+s(n)[1]:a+(i(e)?s(n)[1]:s(n)[2])}var a=e.defineLocale("lt",{months:{format:"sausio_vasario_kovo_balandžio_gegužės_birželio_liepos_rugpjūčio_rugsėjo_spalio_lapkričio_gruodžio".split("_"),standalone:"sausis_vasaris_kovas_balandis_gegužė_birželis_liepa_rugpjūtis_rugsėjis_spalis_lapkritis_gruodis".split("_"),isFormat:/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?|MMMM?(\[[^\[\]]*\]|\s)+D[oD]?/},monthsShort:"sau_vas_kov_bal_geg_bir_lie_rgp_rgs_spa_lap_grd".split("_"),weekdays:{format:"sekmadienį_pirmadienį_antradienį_trečiadienį_ketvirtadienį_penktadienį_šeštadienį".split("_"),standalone:"sekmadienis_pirmadienis_antradienis_trečiadienis_ketvirtadienis_penktadienis_šeštadienis".split("_"),isFormat:/dddd HH:mm/},weekdaysShort:"Sek_Pir_Ant_Tre_Ket_Pen_Šeš".split("_"),weekdaysMin:"S_P_A_T_K_Pn_Š".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY-MM-DD",LL:"YYYY [m.] MMMM D [d.]",LLL:"YYYY [m.] MMMM D [d.], HH:mm [val.]",LLLL:"YYYY [m.] MMMM D [d.], dddd, HH:mm [val.]",l:"YYYY-MM-DD",ll:"YYYY [m.] MMMM D [d.]",lll:"YYYY [m.] MMMM D [d.], HH:mm [val.]",llll:"YYYY [m.] MMMM D [d.], ddd, HH:mm [val.]"},calendar:{sameDay:"[Šiandien] LT",nextDay:"[Rytoj] LT",nextWeek:"dddd LT",lastDay:"[Vakar] LT",lastWeek:"[Praėjusį] dddd LT",sameElse:"L"},relativeTime:{future:"po %s",past:"prieš %s",s:n,ss:o,m:r,mm:o,h:r,hh:o,d:r,dd:o,M:r,MM:o,y:r,yy:o},dayOfMonthOrdinalParse:/\d{1,2}-oji/,ordinal:function(e){return e+"-oji"},week:{dow:1,doy:4}});return a}))},2921:function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
  66. //! moment.js locale configuration
  67. var t=e.defineLocale("vi",{months:"tháng 1_tháng 2_tháng 3_tháng 4_tháng 5_tháng 6_tháng 7_tháng 8_tháng 9_tháng 10_tháng 11_tháng 12".split("_"),monthsShort:"Thg 01_Thg 02_Thg 03_Thg 04_Thg 05_Thg 06_Thg 07_Thg 08_Thg 09_Thg 10_Thg 11_Thg 12".split("_"),monthsParseExact:!0,weekdays:"chủ nhật_thứ hai_thứ ba_thứ tư_thứ năm_thứ sáu_thứ bảy".split("_"),weekdaysShort:"CN_T2_T3_T4_T5_T6_T7".split("_"),weekdaysMin:"CN_T2_T3_T4_T5_T6_T7".split("_"),weekdaysParseExact:!0,meridiemParse:/sa|ch/i,isPM:function(e){return/^ch$/i.test(e)},meridiem:function(e,t,n){return e<12?n?"sa":"SA":n?"ch":"CH"},longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM [năm] YYYY",LLL:"D MMMM [năm] YYYY HH:mm",LLLL:"dddd, D MMMM [năm] YYYY HH:mm",l:"DD/M/YYYY",ll:"D MMM YYYY",lll:"D MMM YYYY HH:mm",llll:"ddd, D MMM YYYY HH:mm"},calendar:{sameDay:"[Hôm nay lúc] LT",nextDay:"[Ngày mai lúc] LT",nextWeek:"dddd [tuần tới lúc] LT",lastDay:"[Hôm qua lúc] LT",lastWeek:"dddd [tuần trước lúc] LT",sameElse:"L"},relativeTime:{future:"%s tới",past:"%s trước",s:"vài giây",ss:"%d giây",m:"một phút",mm:"%d phút",h:"một giờ",hh:"%d giờ",d:"một ngày",dd:"%d ngày",w:"một tuần",ww:"%d tuần",M:"một tháng",MM:"%d tháng",y:"một năm",yy:"%d năm"},dayOfMonthOrdinalParse:/\d{1,2}/,ordinal:function(e){return e},week:{dow:1,doy:4}});return t}))},"293c":function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
  68. //! moment.js locale configuration
  69. var t={words:{ss:["sekund","sekunda","sekundi"],m:["jedan minut","jednog minuta"],mm:["minut","minuta","minuta"],h:["jedan sat","jednog sata"],hh:["sat","sata","sati"],dd:["dan","dana","dana"],MM:["mjesec","mjeseca","mjeseci"],yy:["godina","godine","godina"]},correctGrammaticalCase:function(e,t){return 1===e?t[0]:e>=2&&e<=4?t[1]:t[2]},translate:function(e,n,r){var i=t.words[r];return 1===r.length?n?i[0]:i[1]:e+" "+t.correctGrammaticalCase(e,i)}},n=e.defineLocale("me",{months:"januar_februar_mart_april_maj_jun_jul_avgust_septembar_oktobar_novembar_decembar".split("_"),monthsShort:"jan._feb._mar._apr._maj_jun_jul_avg._sep._okt._nov._dec.".split("_"),monthsParseExact:!0,weekdays:"nedjelja_ponedjeljak_utorak_srijeda_četvrtak_petak_subota".split("_"),weekdaysShort:"ned._pon._uto._sri._čet._pet._sub.".split("_"),weekdaysMin:"ne_po_ut_sr_če_pe_su".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm",LLLL:"dddd, D. MMMM YYYY H:mm"},calendar:{sameDay:"[danas u] LT",nextDay:"[sjutra u] LT",nextWeek:function(){switch(this.day()){case 0:return"[u] [nedjelju] [u] LT";case 3:return"[u] [srijedu] [u] LT";case 6:return"[u] [subotu] [u] LT";case 1:case 2:case 4:case 5:return"[u] dddd [u] LT"}},lastDay:"[juče u] LT",lastWeek:function(){var e=["[prošle] [nedjelje] [u] LT","[prošlog] [ponedjeljka] [u] LT","[prošlog] [utorka] [u] LT","[prošle] [srijede] [u] LT","[prošlog] [četvrtka] [u] LT","[prošlog] [petka] [u] LT","[prošle] [subote] [u] LT"];return e[this.day()]},sameElse:"L"},relativeTime:{future:"za %s",past:"prije %s",s:"nekoliko sekundi",ss:t.translate,m:t.translate,mm:t.translate,h:t.translate,hh:t.translate,d:"dan",dd:t.translate,M:"mjesec",MM:t.translate,y:"godinu",yy:t.translate},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:7}});return n}))},"29b0":function(e,t,n){"use strict";n.r(t),n.d(t,"toUpperCaseFirst",(function(){return s})),n.d(t,"equalsIgnoreCase",(function(){return o})),n.d(t,"randomString",(function(){return a})),n.d(t,"isPercentValue",(function(){return l})),n.d(t,"substitute",(function(){return c})),n.d(t,"stripTags",(function(){return u})),n.d(t,"sanitize",(function(){return h}));n("14d9");var r=n("c0c4"),i=n("7b9c");function s(e){return e[0].toUpperCase()+e.substr(1)}function o(){const e=[];for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];let s=n.length;while(s){s-=1;const t=Object(i["stringify"])(n[s]).toLowerCase();-1===e.indexOf(t)&&e.push(t)}return 1===e.length}function a(){function e(){return Math.floor(65536*(1+Math.random())).toString(16).substring(1)}return e()+e()+e()+e()}function l(e){return/^([0-9][0-9]?%$)|(^100%$)/.test(e)}function c(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return(""+e).replace(/(?:\\)?\[([^[\]]+)]/g,(e,n)=>"\\"===e.charAt(0)?e.substr(1,e.length-1):void 0===t[n]?"":t[n])}function u(e){return h(""+e,{ALLOWED_TAGS:[]})}function h(e,t){return r.sanitize(e,t)}},"2bfb":function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
  70. //! moment.js locale configuration
  71. var t=e.defineLocale("af",{months:"Januarie_Februarie_Maart_April_Mei_Junie_Julie_Augustus_September_Oktober_November_Desember".split("_"),monthsShort:"Jan_Feb_Mrt_Apr_Mei_Jun_Jul_Aug_Sep_Okt_Nov_Des".split("_"),weekdays:"Sondag_Maandag_Dinsdag_Woensdag_Donderdag_Vrydag_Saterdag".split("_"),weekdaysShort:"Son_Maa_Din_Woe_Don_Vry_Sat".split("_"),weekdaysMin:"So_Ma_Di_Wo_Do_Vr_Sa".split("_"),meridiemParse:/vm|nm/i,isPM:function(e){return/^nm$/i.test(e)},meridiem:function(e,t,n){return e<12?n?"vm":"VM":n?"nm":"NM"},longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Vandag om] LT",nextDay:"[Môre om] LT",nextWeek:"dddd [om] LT",lastDay:"[Gister om] LT",lastWeek:"[Laas] dddd [om] LT",sameElse:"L"},relativeTime:{future:"oor %s",past:"%s gelede",s:"'n paar sekondes",ss:"%d sekondes",m:"'n minuut",mm:"%d minute",h:"'n uur",hh:"%d ure",d:"'n dag",dd:"%d dae",M:"'n maand",MM:"%d maande",y:"'n jaar",yy:"%d jaar"},dayOfMonthOrdinalParse:/\d{1,2}(ste|de)/,ordinal:function(e){return e+(1===e||8===e||e>=20?"ste":"de")},week:{dow:1,doy:4}});return t}))},"2e8c":function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
  72. //! moment.js locale configuration
  73. var t=e.defineLocale("uz",{months:"январ_феврал_март_апрел_май_июн_июл_август_сентябр_октябр_ноябр_декабр".split("_"),monthsShort:"янв_фев_мар_апр_май_июн_июл_авг_сен_окт_ноя_дек".split("_"),weekdays:"Якшанба_Душанба_Сешанба_Чоршанба_Пайшанба_Жума_Шанба".split("_"),weekdaysShort:"Якш_Душ_Сеш_Чор_Пай_Жум_Шан".split("_"),weekdaysMin:"Як_Ду_Се_Чо_Па_Жу_Ша".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"D MMMM YYYY, dddd HH:mm"},calendar:{sameDay:"[Бугун соат] LT [да]",nextDay:"[Эртага] LT [да]",nextWeek:"dddd [куни соат] LT [да]",lastDay:"[Кеча соат] LT [да]",lastWeek:"[Утган] dddd [куни соат] LT [да]",sameElse:"L"},relativeTime:{future:"Якин %s ичида",past:"Бир неча %s олдин",s:"фурсат",ss:"%d фурсат",m:"бир дакика",mm:"%d дакика",h:"бир соат",hh:"%d соат",d:"бир кун",dd:"%d кун",M:"бир ой",MM:"%d ой",y:"бир йил",yy:"%d йил"},week:{dow:1,doy:7}});return t}))},"351d":function(e,t,n){"use strict";n.r(t),n.d(t,"duckSchema",(function(){return i})),n.d(t,"inherit",(function(){return s})),n.d(t,"extend",(function(){return o})),n.d(t,"deepExtend",(function(){return a})),n.d(t,"deepClone",(function(){return l})),n.d(t,"clone",(function(){return c})),n.d(t,"mixin",(function(){return u})),n.d(t,"isObjectEqual",(function(){return h})),n.d(t,"isObject",(function(){return d})),n.d(t,"defineGetter",(function(){return m})),n.d(t,"objectEach",(function(){return g})),n.d(t,"getProperty",(function(){return p})),n.d(t,"setProperty",(function(){return f})),n.d(t,"deepObjectSize",(function(){return R})),n.d(t,"createObjectPropListener",(function(){return y})),n.d(t,"hasOwnProperty",(function(){return M}));n("d9e2"),n("14d9"),n("e9c4");var r=n("81ea");function i(e){let t;return Array.isArray(e)?t=e.length?new Array(e.length).fill(null):[]:(t={},g(e,(e,n)=>{"__children"!==n&&(e&&"object"===typeof e&&!Array.isArray(e)?t[n]=i(e):Array.isArray(e)?e.length&&"object"===typeof e[0]&&!Array.isArray(e[0])?t[n]=[i(e[0])]:t[n]=[]:t[n]=null)})),t}function s(e,t){return t.prototype.constructor=t,e.prototype=new t,e.prototype.constructor=e,e}function o(e,t,n){const r=Array.isArray(n);return g(t,(t,i)=>{(!1===r||n.includes(i))&&(e[i]=t)}),e}function a(e,t){g(t,(n,r)=>{t[r]&&"object"===typeof t[r]?(e[r]||(Array.isArray(t[r])?e[r]=[]:"[object Date]"===Object.prototype.toString.call(t[r])?e[r]=t[r]:e[r]={}),a(e[r],t[r])):e[r]=t[r]})}function l(e){return"object"===typeof e?JSON.parse(JSON.stringify(e)):e}function c(e){const t={};return g(e,(e,n)=>{t[n]=e}),t}function u(e){e.MIXINS||(e.MIXINS=[]);for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];return Object(r["arrayEach"])(n,t=>{e.MIXINS.push(t.MIXIN_NAME),g(t,(t,n)=>{if(void 0!==e.prototype[n])throw new Error(`Mixin conflict. Property '${n}' already exist and cannot be overwritten.`);if("function"===typeof t)e.prototype[n]=t;else{const r=function(e,t){const n="_"+e,r=e=>{let t=e;return(Array.isArray(t)||d(t))&&(t=l(t)),t};return function(){return void 0===this[n]&&(this[n]=r(t)),this[n]}},i=function(e){const t="_"+e;return function(e){this[t]=e}};Object.defineProperty(e.prototype,n,{get:r(n,t),set:i(n),configurable:!0})}})}),e}function h(e,t){return JSON.stringify(e)===JSON.stringify(t)}function d(e){return"[object Object]"===Object.prototype.toString.call(e)}function m(e,t,n,r){r.value=n,r.writable=!1!==r.writable,r.enumerable=!1!==r.enumerable,r.configurable=!1!==r.configurable,Object.defineProperty(e,t,r)}function g(e,t){for(const n in e)if((!e.hasOwnProperty||e.hasOwnProperty&&Object.prototype.hasOwnProperty.call(e,n))&&!1===t(e[n],n,e))break;return e}function p(e,t){const n=t.split(".");let r=e;return g(n,e=>{if(r=r[e],void 0===r)return r=void 0,!1}),r}function f(e,t,n){const r=t.split(".");let i=e;r.forEach((e,t)=>{t!==r.length-1?(M(i,e)||(i[e]={}),i=i[e]):i[e]=n})}function R(e){if(!d(e))return 0;const t=function(e){let n=0;return d(e)?g(e,(e,r)=>{"__children"!==r&&(n+=t(e))}):n+=1,n};return t(e)}function y(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"value";const n="_"+t,r={_touched:!1,[n]:e,isTouched(){return this._touched}};return Object.defineProperty(r,t,{get(){return this[n]},set(e){this._touched=!0,this[n]=e},enumerable:!0,configurable:!0}),r}function M(e,t){return Object.prototype.hasOwnProperty.call(e,t)}},"384f":function(e,t,n){"use strict";var r=n("e330"),i=n("5388"),s=n("cb27"),o=s.Set,a=s.proto,l=r(a.forEach),c=r(a.keys),u=c(new o).next;e.exports=function(e,t,n){return n?i({iterator:c(e),next:u},t):l(e,t)}},3886:function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
  74. //! moment.js locale configuration
  75. var t=e.defineLocale("en-ca",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"YYYY-MM-DD",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(e){var t=e%10,n=1===~~(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th";return e+n}});return t}))},"395e":function(e,t,n){"use strict";var r=n("dc19"),i=n("cb27").has,s=n("8e16"),o=n("7f65"),a=n("5388"),l=n("2a62");e.exports=function(e){var t=r(this),n=o(e);if(s(t)<n.size)return!1;var c=n.getIterator();return!1!==a(c,(function(e){if(!i(t,e))return l(c,"normal",!1)}))}},"39a6":function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
  76. //! moment.js locale configuration
  77. var t=e.defineLocale("en-gb",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(e){var t=e%10,n=1===~~(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th";return e+n},week:{dow:1,doy:4}});return t}))},"39bd":function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
  78. //! moment.js locale configuration
  79. var t={1:"१",2:"२",3:"३",4:"४",5:"५",6:"६",7:"७",8:"८",9:"९",0:"०"},n={"१":"1","२":"2","३":"3","४":"4","५":"5","६":"6","७":"7","८":"8","९":"9","०":"0"};function r(e,t,n,r){var i="";if(t)switch(n){case"s":i="काही सेकंद";break;case"ss":i="%d सेकंद";break;case"m":i="एक मिनिट";break;case"mm":i="%d मिनिटे";break;case"h":i="एक तास";break;case"hh":i="%d तास";break;case"d":i="एक दिवस";break;case"dd":i="%d दिवस";break;case"M":i="एक महिना";break;case"MM":i="%d महिने";break;case"y":i="एक वर्ष";break;case"yy":i="%d वर्षे";break}else switch(n){case"s":i="काही सेकंदां";break;case"ss":i="%d सेकंदां";break;case"m":i="एका मिनिटा";break;case"mm":i="%d मिनिटां";break;case"h":i="एका तासा";break;case"hh":i="%d तासां";break;case"d":i="एका दिवसा";break;case"dd":i="%d दिवसां";break;case"M":i="एका महिन्या";break;case"MM":i="%d महिन्यां";break;case"y":i="एका वर्षा";break;case"yy":i="%d वर्षां";break}return i.replace(/%d/i,e)}var i=e.defineLocale("mr",{months:"जानेवारी_फेब्रुवारी_मार्च_एप्रिल_मे_जून_जुलै_ऑगस्ट_सप्टेंबर_ऑक्टोबर_नोव्हेंबर_डिसेंबर".split("_"),monthsShort:"जाने._फेब्रु._मार्च._एप्रि._मे._जून._जुलै._ऑग._सप्टें._ऑक्टो._नोव्हें._डिसें.".split("_"),monthsParseExact:!0,weekdays:"रविवार_सोमवार_मंगळवार_बुधवार_गुरूवार_शुक्रवार_शनिवार".split("_"),weekdaysShort:"रवि_सोम_मंगळ_बुध_गुरू_शुक्र_शनि".split("_"),weekdaysMin:"र_सो_मं_बु_गु_शु_श".split("_"),longDateFormat:{LT:"A h:mm वाजता",LTS:"A h:mm:ss वाजता",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm वाजता",LLLL:"dddd, D MMMM YYYY, A h:mm वाजता"},calendar:{sameDay:"[आज] LT",nextDay:"[उद्या] LT",nextWeek:"dddd, LT",lastDay:"[काल] LT",lastWeek:"[मागील] dddd, LT",sameElse:"L"},relativeTime:{future:"%sमध्ये",past:"%sपूर्वी",s:r,ss:r,m:r,mm:r,h:r,hh:r,d:r,dd:r,M:r,MM:r,y:r,yy:r},preparse:function(e){return e.replace(/[१२३४५६७८९०]/g,(function(e){return n[e]}))},postformat:function(e){return e.replace(/\d/g,(function(e){return t[e]}))},meridiemParse:/पहाटे|सकाळी|दुपारी|सायंकाळी|रात्री/,meridiemHour:function(e,t){return 12===e&&(e=0),"पहाटे"===t||"सकाळी"===t?e:"दुपारी"===t||"सायंकाळी"===t||"रात्री"===t?e>=12?e:e+12:void 0},meridiem:function(e,t,n){return e>=0&&e<6?"पहाटे":e<12?"सकाळी":e<17?"दुपारी":e<20?"सायंकाळी":"रात्री"},week:{dow:0,doy:6}});return i}))},"3a39":function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
  80. //! moment.js locale configuration
  81. var t={1:"१",2:"२",3:"३",4:"४",5:"५",6:"६",7:"७",8:"८",9:"९",0:"०"},n={"१":"1","२":"2","३":"3","४":"4","५":"5","६":"6","७":"7","८":"8","९":"9","०":"0"},r=e.defineLocale("ne",{months:"जनवरी_फेब्रुवरी_मार्च_अप्रिल_मई_जुन_जुलाई_अगष्ट_सेप्टेम्बर_अक्टोबर_नोभेम्बर_डिसेम्बर".split("_"),monthsShort:"जन._फेब्रु._मार्च_अप्रि._मई_जुन_जुलाई._अग._सेप्ट._अक्टो._नोभे._डिसे.".split("_"),monthsParseExact:!0,weekdays:"आइतबार_सोमबार_मङ्गलबार_बुधबार_बिहिबार_शुक्रबार_शनिबार".split("_"),weekdaysShort:"आइत._सोम._मङ्गल._बुध._बिहि._शुक्र._शनि.".split("_"),weekdaysMin:"आ._सो._मं._बु._बि._शु._श.".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"Aको h:mm बजे",LTS:"Aको h:mm:ss बजे",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, Aको h:mm बजे",LLLL:"dddd, D MMMM YYYY, Aको h:mm बजे"},preparse:function(e){return e.replace(/[१२३४५६७८९०]/g,(function(e){return n[e]}))},postformat:function(e){return e.replace(/\d/g,(function(e){return t[e]}))},meridiemParse:/राति|बिहान|दिउँसो|साँझ/,meridiemHour:function(e,t){return 12===e&&(e=0),"राति"===t?e<4?e:e+12:"बिहान"===t?e:"दिउँसो"===t?e>=10?e:e+12:"साँझ"===t?e+12:void 0},meridiem:function(e,t,n){return e<3?"राति":e<12?"बिहान":e<16?"दिउँसो":e<20?"साँझ":"राति"},calendar:{sameDay:"[आज] LT",nextDay:"[भोलि] LT",nextWeek:"[आउँदो] dddd[,] LT",lastDay:"[हिजो] LT",lastWeek:"[गएको] dddd[,] LT",sameElse:"L"},relativeTime:{future:"%sमा",past:"%s अगाडि",s:"केही क्षण",ss:"%d सेकेण्ड",m:"एक मिनेट",mm:"%d मिनेट",h:"एक घण्टा",hh:"%d घण्टा",d:"एक दिन",dd:"%d दिन",M:"एक महिना",MM:"%d महिना",y:"एक बर्ष",yy:"%d बर्ष"},week:{dow:0,doy:6}});return r}))},"3a6c":function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
  82. //! moment.js locale configuration
  83. var t=e.defineLocale("zh-mo",{months:"一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),weekdays:"星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"),weekdaysShort:"週日_週一_週二_週三_週四_週五_週六".split("_"),weekdaysMin:"日_一_二_三_四_五_六".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"YYYY年M月D日",LLL:"YYYY年M月D日 HH:mm",LLLL:"YYYY年M月D日dddd HH:mm",l:"D/M/YYYY",ll:"YYYY年M月D日",lll:"YYYY年M月D日 HH:mm",llll:"YYYY年M月D日dddd HH:mm"},meridiemParse:/凌晨|早上|上午|中午|下午|晚上/,meridiemHour:function(e,t){return 12===e&&(e=0),"凌晨"===t||"早上"===t||"上午"===t?e:"中午"===t?e>=11?e:e+12:"下午"===t||"晚上"===t?e+12:void 0},meridiem:function(e,t,n){var r=100*e+t;return r<600?"凌晨":r<900?"早上":r<1130?"上午":r<1230?"中午":r<1800?"下午":"晚上"},calendar:{sameDay:"[今天] LT",nextDay:"[明天] LT",nextWeek:"[下]dddd LT",lastDay:"[昨天] LT",lastWeek:"[上]dddd LT",sameElse:"L"},dayOfMonthOrdinalParse:/\d{1,2}(日|月|週)/,ordinal:function(e,t){switch(t){case"d":case"D":case"DDD":return e+"日";case"M":return e+"月";case"w":case"W":return e+"週";default:return e}},relativeTime:{future:"%s內",past:"%s前",s:"幾秒",ss:"%d 秒",m:"1 分鐘",mm:"%d 分鐘",h:"1 小時",hh:"%d 小時",d:"1 天",dd:"%d 天",M:"1 個月",MM:"%d 個月",y:"1 年",yy:"%d 年"}});return t}))},"3b1b":function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
  84. //! moment.js locale configuration
  85. var t={0:"-ум",1:"-ум",2:"-юм",3:"-юм",4:"-ум",5:"-ум",6:"-ум",7:"-ум",8:"-ум",9:"-ум",10:"-ум",12:"-ум",13:"-ум",20:"-ум",30:"-юм",40:"-ум",50:"-ум",60:"-ум",70:"-ум",80:"-ум",90:"-ум",100:"-ум"},n=e.defineLocale("tg",{months:{format:"январи_феврали_марти_апрели_майи_июни_июли_августи_сентябри_октябри_ноябри_декабри".split("_"),standalone:"январ_феврал_март_апрел_май_июн_июл_август_сентябр_октябр_ноябр_декабр".split("_")},monthsShort:"янв_фев_мар_апр_май_июн_июл_авг_сен_окт_ноя_дек".split("_"),weekdays:"якшанбе_душанбе_сешанбе_чоршанбе_панҷшанбе_ҷумъа_шанбе".split("_"),weekdaysShort:"яшб_дшб_сшб_чшб_пшб_ҷум_шнб".split("_"),weekdaysMin:"яш_дш_сш_чш_пш_ҷм_шб".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Имрӯз соати] LT",nextDay:"[Фардо соати] LT",lastDay:"[Дирӯз соати] LT",nextWeek:"dddd[и] [ҳафтаи оянда соати] LT",lastWeek:"dddd[и] [ҳафтаи гузашта соати] LT",sameElse:"L"},relativeTime:{future:"баъди %s",past:"%s пеш",s:"якчанд сония",m:"як дақиқа",mm:"%d дақиқа",h:"як соат",hh:"%d соат",d:"як рӯз",dd:"%d рӯз",M:"як моҳ",MM:"%d моҳ",y:"як сол",yy:"%d сол"},meridiemParse:/шаб|субҳ|рӯз|бегоҳ/,meridiemHour:function(e,t){return 12===e&&(e=0),"шаб"===t?e<4?e:e+12:"субҳ"===t?e:"рӯз"===t?e>=11?e:e+12:"бегоҳ"===t?e+12:void 0},meridiem:function(e,t,n){return e<4?"шаб":e<11?"субҳ":e<16?"рӯз":e<19?"бегоҳ":"шаб"},dayOfMonthOrdinalParse:/\d{1,2}-(ум|юм)/,ordinal:function(e){var n=e%10,r=e>=100?100:null;return e+(t[e]||t[n]||t[r])},week:{dow:1,doy:7}});return n}))},"3bc4":function(e,t,n){"use strict";n.d(t,"a",(function(){return o})),n.d(t,"b",(function(){return a}));const r=/^(\r\n|\n\r|\r|\n)/,i=/^[^\t\r\n]+/,s=/^\t/;function o(e){const t=[[""]];if(0===e.length)return t;let n,o=0,a=0;while(e.length>0){if(n===e.length)break;if(n=e.length,e.match(s))e=e.replace(s,""),o+=1,t[a][o]="";else if(e.match(r))e=e.replace(r,""),o=0,a+=1,t[a]=[""];else{let n="";if(e.startsWith('"')){let t=0,r=!0;while(r){const i=e.slice(0,1);'"'===i&&(t+=1),n+=i,e=e.slice(1),(0===e.length||e.match(/^[\t\r\n]/)&&t%2===0)&&(r=!1)}n=n.replace(/^"/,"").replace(/"$/,"").replace(/["]*/g,e=>new Array(Math.floor(e.length/2)).fill('"').join(""))}else{const t=e.match(i);n=t?t[0]:"",e=e.slice(n.length)}t[a][o]=n}}return t}function a(e){let t,n,r,i,s,o="";for(t=0,n=e.length;t<n;t+=1){for(i=e[t].length,r=0;r<i;r+=1)r>0&&(o+="\t"),s=e[t][r],"string"===typeof s?s.indexOf("\n")>-1?o+=`"${s.replace(/"/g,'""')}"`:o+=s:o+=null===s||void 0===s?"":s;t!==n-1&&(o+="\n")}return o}},"3c0d":function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
  86. //! moment.js locale configuration
  87. var t={standalone:"leden_únor_březen_duben_květen_červen_červenec_srpen_září_říjen_listopad_prosinec".split("_"),format:"ledna_února_března_dubna_května_června_července_srpna_září_října_listopadu_prosince".split("_"),isFormat:/DD?[o.]?(\[[^\[\]]*\]|\s)+MMMM/},n="led_úno_bře_dub_kvě_čvn_čvc_srp_zář_říj_lis_pro".split("_"),r=[/^led/i,/^úno/i,/^bře/i,/^dub/i,/^kvě/i,/^(čvn|červen$|června)/i,/^(čvc|červenec|července)/i,/^srp/i,/^zář/i,/^říj/i,/^lis/i,/^pro/i],i=/^(leden|únor|březen|duben|květen|červenec|července|červen|června|srpen|září|říjen|listopad|prosinec|led|úno|bře|dub|kvě|čvn|čvc|srp|zář|říj|lis|pro)/i;function s(e){return e>1&&e<5&&1!==~~(e/10)}function o(e,t,n,r){var i=e+" ";switch(n){case"s":return t||r?"pár sekund":"pár sekundami";case"ss":return t||r?i+(s(e)?"sekundy":"sekund"):i+"sekundami";case"m":return t?"minuta":r?"minutu":"minutou";case"mm":return t||r?i+(s(e)?"minuty":"minut"):i+"minutami";case"h":return t?"hodina":r?"hodinu":"hodinou";case"hh":return t||r?i+(s(e)?"hodiny":"hodin"):i+"hodinami";case"d":return t||r?"den":"dnem";case"dd":return t||r?i+(s(e)?"dny":"dní"):i+"dny";case"M":return t||r?"měsíc":"měsícem";case"MM":return t||r?i+(s(e)?"měsíce":"měsíců"):i+"měsíci";case"y":return t||r?"rok":"rokem";case"yy":return t||r?i+(s(e)?"roky":"let"):i+"lety"}}var a=e.defineLocale("cs",{months:t,monthsShort:n,monthsRegex:i,monthsShortRegex:i,monthsStrictRegex:/^(leden|ledna|února|únor|březen|března|duben|dubna|květen|května|červenec|července|červen|června|srpen|srpna|září|říjen|října|listopadu|listopad|prosinec|prosince)/i,monthsShortStrictRegex:/^(led|úno|bře|dub|kvě|čvn|čvc|srp|zář|říj|lis|pro)/i,monthsParse:r,longMonthsParse:r,shortMonthsParse:r,weekdays:"neděle_pondělí_úterý_středa_čtvrtek_pátek_sobota".split("_"),weekdaysShort:"ne_po_út_st_čt_pá_so".split("_"),weekdaysMin:"ne_po_út_st_čt_pá_so".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm",LLLL:"dddd D. MMMM YYYY H:mm",l:"D. M. YYYY"},calendar:{sameDay:"[dnes v] LT",nextDay:"[zítra v] LT",nextWeek:function(){switch(this.day()){case 0:return"[v neděli v] LT";case 1:case 2:return"[v] dddd [v] LT";case 3:return"[ve středu v] LT";case 4:return"[ve čtvrtek v] LT";case 5:return"[v pátek v] LT";case 6:return"[v sobotu v] LT"}},lastDay:"[včera v] LT",lastWeek:function(){switch(this.day()){case 0:return"[minulou neděli v] LT";case 1:case 2:return"[minulé] dddd [v] LT";case 3:return"[minulou středu v] LT";case 4:case 5:return"[minulý] dddd [v] LT";case 6:return"[minulou sobotu v] LT"}},sameElse:"L"},relativeTime:{future:"za %s",past:"před %s",s:o,ss:o,m:o,mm:o,h:o,hh:o,d:o,dd:o,M:o,MM:o,y:o,yy:o},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}});return a}))},"3c65":function(e,t,n){"use strict";var r=n("23e7"),i=n("7b0b"),s=n("07fa"),o=n("3a34"),a=n("083a"),l=n("3511"),c=1!==[].unshift(0),u=function(){try{Object.defineProperty([],"length",{writable:!1}).unshift()}catch(e){return e instanceof TypeError}},h=c||!u();r({target:"Array",proto:!0,arity:1,forced:h},{unshift:function(e){var t=i(this),n=s(t),r=arguments.length;if(r){l(n+r);var c=n;while(c--){var u=c+r;c in t?t[u]=t[c]:a(t,u)}for(var h=0;h<r;h++)t[h]=arguments[h]}return o(t,n+r)}})},"3d57":function(e,t,n){"use strict";n.d(t,"a",(function(){return i})),n.d(t,"b",(function(){return s}));var r=n("81ea");function i(e,t,n){return[...e.slice(0,t),...n,...e.slice(t)]}function s(e,t){return Object(r["arrayFilter"])(e,e=>!1===t.includes(e))}},"3d76":function(e,t,n){"use strict";n.d(t,"d",(function(){return u})),n.d(t,"b",(function(){return c})),n.d(t,"c",(function(){return o})),n.d(t,"a",(function(){return a}));n("d9e2");var r=n("9acd");const{register:i,getItem:s,hasItem:o,getNames:a,getValues:l}=Object(r["a"])("renderers");function c(e){if("function"===typeof e)return e;if(!o(e))throw Error(`No registered renderer found under "${e}" name`);return s(e)}function u(e,t){"string"!==typeof e&&(t=e,e=t.RENDERER_TYPE),i(e,t)}},"3de5":function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
  88. //! moment.js locale configuration
  89. var t={1:"௧",2:"௨",3:"௩",4:"௪",5:"௫",6:"௬",7:"௭",8:"௮",9:"௯",0:"௦"},n={"௧":"1","௨":"2","௩":"3","௪":"4","௫":"5","௬":"6","௭":"7","௮":"8","௯":"9","௦":"0"},r=e.defineLocale("ta",{months:"ஜனவரி_பிப்ரவரி_மார்ச்_ஏப்ரல்_மே_ஜூன்_ஜூலை_ஆகஸ்ட்_செப்டெம்பர்_அக்டோபர்_நவம்பர்_டிசம்பர்".split("_"),monthsShort:"ஜனவரி_பிப்ரவரி_மார்ச்_ஏப்ரல்_மே_ஜூன்_ஜூலை_ஆகஸ்ட்_செப்டெம்பர்_அக்டோபர்_நவம்பர்_டிசம்பர்".split("_"),weekdays:"ஞாயிற்றுக்கிழமை_திங்கட்கிழமை_செவ்வாய்கிழமை_புதன்கிழமை_வியாழக்கிழமை_வெள்ளிக்கிழமை_சனிக்கிழமை".split("_"),weekdaysShort:"ஞாயிறு_திங்கள்_செவ்வாய்_புதன்_வியாழன்_வெள்ளி_சனி".split("_"),weekdaysMin:"ஞா_தி_செ_பு_வி_வெ_ச".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, HH:mm",LLLL:"dddd, D MMMM YYYY, HH:mm"},calendar:{sameDay:"[இன்று] LT",nextDay:"[நாளை] LT",nextWeek:"dddd, LT",lastDay:"[நேற்று] LT",lastWeek:"[கடந்த வாரம்] dddd, LT",sameElse:"L"},relativeTime:{future:"%s இல்",past:"%s முன்",s:"ஒரு சில விநாடிகள்",ss:"%d விநாடிகள்",m:"ஒரு நிமிடம்",mm:"%d நிமிடங்கள்",h:"ஒரு மணி நேரம்",hh:"%d மணி நேரம்",d:"ஒரு நாள்",dd:"%d நாட்கள்",M:"ஒரு மாதம்",MM:"%d மாதங்கள்",y:"ஒரு வருடம்",yy:"%d ஆண்டுகள்"},dayOfMonthOrdinalParse:/\d{1,2}வது/,ordinal:function(e){return e+"வது"},preparse:function(e){return e.replace(/[௧௨௩௪௫௬௭௮௯௦]/g,(function(e){return n[e]}))},postformat:function(e){return e.replace(/\d/g,(function(e){return t[e]}))},meridiemParse:/யாமம்|வைகறை|காலை|நண்பகல்|எற்பாடு|மாலை/,meridiem:function(e,t,n){return e<2?" யாமம்":e<6?" வைகறை":e<10?" காலை":e<14?" நண்பகல்":e<18?" எற்பாடு":e<22?" மாலை":" யாமம்"},meridiemHour:function(e,t){return 12===e&&(e=0),"யாமம்"===t?e<2?e:e+12:"வைகறை"===t||"காலை"===t||"நண்பகல்"===t&&e>=10?e:e+12},week:{dow:0,doy:6}});return r}))},"3e92":function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
  90. //! moment.js locale configuration
  91. var t={1:"೧",2:"೨",3:"೩",4:"೪",5:"೫",6:"೬",7:"೭",8:"೮",9:"೯",0:"೦"},n={"೧":"1","೨":"2","೩":"3","೪":"4","೫":"5","೬":"6","೭":"7","೮":"8","೯":"9","೦":"0"},r=e.defineLocale("kn",{months:"ಜನವರಿ_ಫೆಬ್ರವರಿ_ಮಾರ್ಚ್_ಏಪ್ರಿಲ್_ಮೇ_ಜೂನ್_ಜುಲೈ_ಆಗಸ್ಟ್_ಸೆಪ್ಟೆಂಬರ್_ಅಕ್ಟೋಬರ್_ನವೆಂಬರ್_ಡಿಸೆಂಬರ್".split("_"),monthsShort:"ಜನ_ಫೆಬ್ರ_ಮಾರ್ಚ್_ಏಪ್ರಿಲ್_ಮೇ_ಜೂನ್_ಜುಲೈ_ಆಗಸ್ಟ್_ಸೆಪ್ಟೆಂ_ಅಕ್ಟೋ_ನವೆಂ_ಡಿಸೆಂ".split("_"),monthsParseExact:!0,weekdays:"ಭಾನುವಾರ_ಸೋಮವಾರ_ಮಂಗಳವಾರ_ಬುಧವಾರ_ಗುರುವಾರ_ಶುಕ್ರವಾರ_ಶನಿವಾರ".split("_"),weekdaysShort:"ಭಾನು_ಸೋಮ_ಮಂಗಳ_ಬುಧ_ಗುರು_ಶುಕ್ರ_ಶನಿ".split("_"),weekdaysMin:"ಭಾ_ಸೋ_ಮಂ_ಬು_ಗು_ಶು_ಶ".split("_"),longDateFormat:{LT:"A h:mm",LTS:"A h:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm",LLLL:"dddd, D MMMM YYYY, A h:mm"},calendar:{sameDay:"[ಇಂದು] LT",nextDay:"[ನಾಳೆ] LT",nextWeek:"dddd, LT",lastDay:"[ನಿನ್ನೆ] LT",lastWeek:"[ಕೊನೆಯ] dddd, LT",sameElse:"L"},relativeTime:{future:"%s ನಂತರ",past:"%s ಹಿಂದೆ",s:"ಕೆಲವು ಕ್ಷಣಗಳು",ss:"%d ಸೆಕೆಂಡುಗಳು",m:"ಒಂದು ನಿಮಿಷ",mm:"%d ನಿಮಿಷ",h:"ಒಂದು ಗಂಟೆ",hh:"%d ಗಂಟೆ",d:"ಒಂದು ದಿನ",dd:"%d ದಿನ",M:"ಒಂದು ತಿಂಗಳು",MM:"%d ತಿಂಗಳು",y:"ಒಂದು ವರ್ಷ",yy:"%d ವರ್ಷ"},preparse:function(e){return e.replace(/[೧೨೩೪೫೬೭೮೯೦]/g,(function(e){return n[e]}))},postformat:function(e){return e.replace(/\d/g,(function(e){return t[e]}))},meridiemParse:/ರಾತ್ರಿ|ಬೆಳಿಗ್ಗೆ|ಮಧ್ಯಾಹ್ನ|ಸಂಜೆ/,meridiemHour:function(e,t){return 12===e&&(e=0),"ರಾತ್ರಿ"===t?e<4?e:e+12:"ಬೆಳಿಗ್ಗೆ"===t?e:"ಮಧ್ಯಾಹ್ನ"===t?e>=10?e:e+12:"ಸಂಜೆ"===t?e+12:void 0},meridiem:function(e,t,n){return e<4?"ರಾತ್ರಿ":e<10?"ಬೆಳಿಗ್ಗೆ":e<17?"ಮಧ್ಯಾಹ್ನ":e<20?"ಸಂಜೆ":"ರಾತ್ರಿ"},dayOfMonthOrdinalParse:/\d{1,2}(ನೇ)/,ordinal:function(e){return e+"ನೇ"},week:{dow:0,doy:6}});return r}))},"3eb5":function(e,t,n){"use strict";function r(e){const t=new Date(e);return isNaN(new Date(e+"T00:00").getDate())?t:new Date(t.getTime()+6e4*t.getTimezoneOffset())}n.r(t),n.d(t,"getNormalizedDate",(function(){return r}))},4069:function(e,t,n){"use strict";var r=n("44d2");r("flat")},"423e":function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
  92. //! moment.js locale configuration
  93. var t=e.defineLocale("ar-kw",{months:"يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر".split("_"),monthsShort:"يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر".split("_"),weekdays:"الأحد_الإتنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت".split("_"),weekdaysShort:"احد_اتنين_ثلاثاء_اربعاء_خميس_جمعة_سبت".split("_"),weekdaysMin:"ح_ن_ث_ر_خ_ج_س".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[اليوم على الساعة] LT",nextDay:"[غدا على الساعة] LT",nextWeek:"dddd [على الساعة] LT",lastDay:"[أمس على الساعة] LT",lastWeek:"dddd [على الساعة] LT",sameElse:"L"},relativeTime:{future:"في %s",past:"منذ %s",s:"ثوان",ss:"%d ثانية",m:"دقيقة",mm:"%d دقائق",h:"ساعة",hh:"%d ساعات",d:"يوم",dd:"%d أيام",M:"شهر",MM:"%d أشهر",y:"سنة",yy:"%d سنوات"},week:{dow:0,doy:12}});return t}))},"440c":function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
  94. //! moment.js locale configuration
  95. function t(e,t,n,r){var i={m:["eng Minutt","enger Minutt"],h:["eng Stonn","enger Stonn"],d:["een Dag","engem Dag"],M:["ee Mount","engem Mount"],y:["ee Joer","engem Joer"]};return t?i[n][0]:i[n][1]}function n(e){var t=e.substr(0,e.indexOf(" "));return i(t)?"a "+e:"an "+e}function r(e){var t=e.substr(0,e.indexOf(" "));return i(t)?"viru "+e:"virun "+e}function i(e){if(e=parseInt(e,10),isNaN(e))return!1;if(e<0)return!0;if(e<10)return 4<=e&&e<=7;if(e<100){var t=e%10,n=e/10;return i(0===t?n:t)}if(e<1e4){while(e>=10)e/=10;return i(e)}return e/=1e3,i(e)}var s=e.defineLocale("lb",{months:"Januar_Februar_Mäerz_Abrëll_Mee_Juni_Juli_August_September_Oktober_November_Dezember".split("_"),monthsShort:"Jan._Febr._Mrz._Abr._Mee_Jun._Jul._Aug._Sept._Okt._Nov._Dez.".split("_"),monthsParseExact:!0,weekdays:"Sonndeg_Méindeg_Dënschdeg_Mëttwoch_Donneschdeg_Freideg_Samschdeg".split("_"),weekdaysShort:"So._Mé._Dë._Më._Do._Fr._Sa.".split("_"),weekdaysMin:"So_Mé_Dë_Më_Do_Fr_Sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm [Auer]",LTS:"H:mm:ss [Auer]",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm [Auer]",LLLL:"dddd, D. MMMM YYYY H:mm [Auer]"},calendar:{sameDay:"[Haut um] LT",sameElse:"L",nextDay:"[Muer um] LT",nextWeek:"dddd [um] LT",lastDay:"[Gëschter um] LT",lastWeek:function(){switch(this.day()){case 2:case 4:return"[Leschten] dddd [um] LT";default:return"[Leschte] dddd [um] LT"}}},relativeTime:{future:n,past:r,s:"e puer Sekonnen",ss:"%d Sekonnen",m:t,mm:"%d Minutten",h:t,hh:"%d Stonnen",d:t,dd:"%d Deeg",M:t,MM:"%d Méint",y:t,yy:"%d Joer"},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}});return s}))},4478:function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));n("14d9"),n("4ae1");var r=n("d967"),i=n("b380");function s(e,t,n){if(Object(r["a"])())return Reflect.construct.apply(null,arguments);var s=[null];s.push.apply(s,t);var o=new(e.bind.apply(e,s));return n&&Object(i["a"])(o,n.prototype),o}},4678:function(e,t,n){var r={"./af":"2bfb","./af.js":"2bfb","./ar":"8e73","./ar-dz":"a356","./ar-dz.js":"a356","./ar-kw":"423e","./ar-kw.js":"423e","./ar-ly":"1cfd","./ar-ly.js":"1cfd","./ar-ma":"0a84","./ar-ma.js":"0a84","./ar-ps":"4c98","./ar-ps.js":"4c98","./ar-sa":"8230","./ar-sa.js":"8230","./ar-tn":"6d83","./ar-tn.js":"6d83","./ar.js":"8e73","./az":"485c","./az.js":"485c","./be":"1fc1","./be.js":"1fc1","./bg":"84aa","./bg.js":"84aa","./bm":"a7fa","./bm.js":"a7fa","./bn":"9043","./bn-bd":"9686","./bn-bd.js":"9686","./bn.js":"9043","./bo":"d26a","./bo.js":"d26a","./br":"6887","./br.js":"6887","./bs":"25548","./bs.js":"25548","./ca":"d716","./ca.js":"d716","./cs":"3c0d","./cs.js":"3c0d","./cv":"03ec","./cv.js":"03ec","./cy":"9797","./cy.js":"9797","./da":"0f14","./da.js":"0f14","./de":"b469","./de-at":"b3eb","./de-at.js":"b3eb","./de-ch":"bb71","./de-ch.js":"bb71","./de.js":"b469","./dv":"598a","./dv.js":"598a","./el":"8d47","./el.js":"8d47","./en-au":"0e6b","./en-au.js":"0e6b","./en-ca":"3886","./en-ca.js":"3886","./en-gb":"39a6","./en-gb.js":"39a6","./en-ie":"e1d3","./en-ie.js":"e1d3","./en-il":"7333","./en-il.js":"7333","./en-in":"ec2e","./en-in.js":"ec2e","./en-nz":"6f50","./en-nz.js":"6f50","./en-sg":"b7e9","./en-sg.js":"b7e9","./eo":"65db","./eo.js":"65db","./es":"898b","./es-do":"0a3c","./es-do.js":"0a3c","./es-mx":"b5b7","./es-mx.js":"b5b7","./es-us":"55c9","./es-us.js":"55c9","./es.js":"898b","./et":"ec18","./et.js":"ec18","./eu":"0ff2","./eu.js":"0ff2","./fa":"8df48","./fa.js":"8df48","./fi":"81e9","./fi.js":"81e9","./fil":"d69a","./fil.js":"d69a","./fo":"0721","./fo.js":"0721","./fr":"9f26","./fr-ca":"d9f8","./fr-ca.js":"d9f8","./fr-ch":"0e49","./fr-ch.js":"0e49","./fr.js":"9f26","./fy":"7118","./fy.js":"7118","./ga":"5120","./ga.js":"5120","./gd":"f6b46","./gd.js":"f6b46","./gl":"8840","./gl.js":"8840","./gom-deva":"aaf2","./gom-deva.js":"aaf2","./gom-latn":"0caa","./gom-latn.js":"0caa","./gu":"e0c5","./gu.js":"e0c5","./he":"c7aa","./he.js":"c7aa","./hi":"dc4d","./hi.js":"dc4d","./hr":"4ba9","./hr.js":"4ba9","./hu":"5b14","./hu.js":"5b14","./hy-am":"d6b6","./hy-am.js":"d6b6","./id":"5038","./id.js":"5038","./is":"0558","./is.js":"0558","./it":"6e98","./it-ch":"6f12","./it-ch.js":"6f12","./it.js":"6e98","./ja":"079e","./ja.js":"079e","./jv":"b540","./jv.js":"b540","./ka":"201b","./ka.js":"201b","./kk":"6d79","./kk.js":"6d79","./km":"e81d","./km.js":"e81d","./kn":"3e92","./kn.js":"3e92","./ko":"22f8","./ko.js":"22f8","./ku":"2421","./ku-kmr":"7558","./ku-kmr.js":"7558","./ku.js":"2421","./ky":"9609","./ky.js":"9609","./lb":"440c","./lb.js":"440c","./lo":"b29d","./lo.js":"b29d","./lt":"26f9","./lt.js":"26f9","./lv":"b97c","./lv.js":"b97c","./me":"293c","./me.js":"293c","./mi":"688b","./mi.js":"688b","./mk":"6909","./mk.js":"6909","./ml":"02fb","./ml.js":"02fb","./mn":"958b","./mn.js":"958b","./mr":"39bd","./mr.js":"39bd","./ms":"ebe4","./ms-my":"6403","./ms-my.js":"6403","./ms.js":"ebe4","./mt":"1b45","./mt.js":"1b45","./my":"8689","./my.js":"8689","./nb":"6ce3","./nb.js":"6ce3","./ne":"3a39","./ne.js":"3a39","./nl":"facd","./nl-be":"db29","./nl-be.js":"db29","./nl.js":"facd","./nn":"b84c","./nn.js":"b84c","./oc-lnc":"167b","./oc-lnc.js":"167b","./pa-in":"f3ff","./pa-in.js":"f3ff","./pl":"8d57","./pl.js":"8d57","./pt":"f260","./pt-br":"d2d4","./pt-br.js":"d2d4","./pt.js":"f260","./ro":"972c","./ro.js":"972c","./ru":"957c","./ru.js":"957c","./sd":"6784","./sd.js":"6784","./se":"ffff","./se.js":"ffff","./si":"eda5","./si.js":"eda5","./sk":"7be6","./sk.js":"7be6","./sl":"8155","./sl.js":"8155","./sq":"c8f3","./sq.js":"c8f3","./sr":"cf1e","./sr-cyrl":"13e9","./sr-cyrl.js":"13e9","./sr.js":"cf1e","./ss":"52bd","./ss.js":"52bd","./sv":"5fbd","./sv.js":"5fbd","./sw":"74dc","./sw.js":"74dc","./ta":"3de5","./ta.js":"3de5","./te":"5cbb","./te.js":"5cbb","./tet":"576c","./tet.js":"576c","./tg":"3b1b","./tg.js":"3b1b","./th":"10e8","./th.js":"10e8","./tk":"5aff","./tk.js":"5aff","./tl-ph":"0f38","./tl-ph.js":"0f38","./tlh":"cf75","./tlh.js":"cf75","./tr":"0e81","./tr.js":"0e81","./tzl":"cf51","./tzl.js":"cf51","./tzm":"c109","./tzm-latn":"b53d","./tzm-latn.js":"b53d","./tzm.js":"c109","./ug-cn":"6117","./ug-cn.js":"6117","./uk":"ada2","./uk.js":"ada2","./ur":"5294","./ur.js":"5294","./uz":"2e8c","./uz-latn":"010e","./uz-latn.js":"010e","./uz.js":"2e8c","./vi":"2921","./vi.js":"2921","./x-pseudo":"fd7e","./x-pseudo.js":"fd7e","./yo":"7f33","./yo.js":"7f33","./zh-cn":"5c3a","./zh-cn.js":"5c3a","./zh-hk":"49ab","./zh-hk.js":"49ab","./zh-mo":"3a6c","./zh-mo.js":"3a6c","./zh-tw":"90ea","./zh-tw.js":"90ea"};function i(e){var t=s(e);return n(t)}function s(e){if(!n.o(r,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return r[e]}i.keys=function(){return Object.keys(r)},i.resolve=s,e.exports=i,i.id="4678"},"480c":function(e,t,n){"use strict";n.r(t),n.d(t,"spreadsheetColumnLabel",(function(){return o})),n.d(t,"spreadsheetColumnIndex",(function(){return a})),n.d(t,"createSpreadsheetData",(function(){return l})),n.d(t,"createSpreadsheetObjectData",(function(){return c})),n.d(t,"createEmptySpreadsheetData",(function(){return u})),n.d(t,"dataRowToChangesArray",(function(){return h})),n.d(t,"countFirstRowKeys",(function(){return d})),n.d(t,"isArrayOfArrays",(function(){return m})),n.d(t,"isArrayOfObjects",(function(){return g}));n("14d9");var r=n("351d");const i="ABCDEFGHIJKLMNOPQRSTUVWXYZ",s=i.length;function o(e){let t,n=e+1,r="";while(n>0)t=(n-1)%s,r=String.fromCharCode(65+t)+r,n=parseInt((n-t)/s,10);return r}function a(e){let t=0;if(e)for(let n=0,r=e.length-1;n<e.length;n+=1,r-=1)t+=s**r*(i.indexOf(e[n])+1);return t-=1,t}function l(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:100,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:4;const n=[];let r,i;for(r=0;r<e;r++){const e=[];for(i=0;i<t;i++)e.push(o(i)+(r+1));n.push(e)}return n}function c(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:100,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:4;const n=[];let r,i;for(r=0;r<e;r++){const e={};for(i=0;i<t;i++)e["prop"+i]=o(i)+(r+1);n.push(e)}return n}function u(e,t){const n=[];let r;for(let i=0;i<e;i++){r=[];for(let e=0;e<t;e++)r.push("");n.push(r)}return n}function h(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=e;const r=[];return Array.isArray(e)&&Array.isArray(e[0])||(n=[e]),n.forEach((e,n)=>{Array.isArray(e)?e.forEach((e,i)=>{r.push([n+t,i,e])}):Object.keys(e).forEach(i=>{r.push([n+t,i,e[i]])})}),r}function d(e){let t=0;return Array.isArray(e)&&(e[0]&&Array.isArray(e[0])?t=e[0].length:e[0]&&Object(r["isObject"])(e[0])&&(t=Object(r["deepObjectSize"])(e[0]))),t}function m(e){return!!(Array.isArray(e)&&e.length&&e.every(e=>Array.isArray(e)))}function g(e){return!!(Array.isArray(e)&&e.length&&e.every(e=>"object"===typeof e&&!Array.isArray(e)&&null!==e))}},"485c":function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
  96. //! moment.js locale configuration
  97. var t={1:"-inci",5:"-inci",8:"-inci",70:"-inci",80:"-inci",2:"-nci",7:"-nci",20:"-nci",50:"-nci",3:"-üncü",4:"-üncü",100:"-üncü",6:"-ncı",9:"-uncu",10:"-uncu",30:"-uncu",60:"-ıncı",90:"-ıncı"},n=e.defineLocale("az",{months:"yanvar_fevral_mart_aprel_may_iyun_iyul_avqust_sentyabr_oktyabr_noyabr_dekabr".split("_"),monthsShort:"yan_fev_mar_apr_may_iyn_iyl_avq_sen_okt_noy_dek".split("_"),weekdays:"Bazar_Bazar ertəsi_Çərşənbə axşamı_Çərşənbə_Cümə axşamı_Cümə_Şənbə".split("_"),weekdaysShort:"Baz_BzE_ÇAx_Çər_CAx_Cüm_Şən".split("_"),weekdaysMin:"Bz_BE_ÇA_Çə_CA_Cü_Şə".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[bugün saat] LT",nextDay:"[sabah saat] LT",nextWeek:"[gələn həftə] dddd [saat] LT",lastDay:"[dünən] LT",lastWeek:"[keçən həftə] dddd [saat] LT",sameElse:"L"},relativeTime:{future:"%s sonra",past:"%s əvvəl",s:"bir neçə saniyə",ss:"%d saniyə",m:"bir dəqiqə",mm:"%d dəqiqə",h:"bir saat",hh:"%d saat",d:"bir gün",dd:"%d gün",M:"bir ay",MM:"%d ay",y:"bir il",yy:"%d il"},meridiemParse:/gecə|səhər|gündüz|axşam/,isPM:function(e){return/^(gündüz|axşam)$/.test(e)},meridiem:function(e,t,n){return e<4?"gecə":e<12?"səhər":e<17?"gündüz":"axşam"},dayOfMonthOrdinalParse:/\d{1,2}-(ıncı|inci|nci|üncü|ncı|uncu)/,ordinal:function(e){if(0===e)return e+"-ıncı";var n=e%10,r=e%100-n,i=e>=100?100:null;return e+(t[n]||t[r]||t[i])},week:{dow:1,doy:7}});return n}))},"491c":function(e,t,n){"use strict";n.d(t,"e",(function(){return g})),n.d(t,"a",(function(){return m})),n.d(t,"b",(function(){return d})),n.d(t,"d",(function(){return l})),n.d(t,"c",(function(){return c}));n("d9e2");var r=n("1004"),i=n("9acd");const s=new WeakMap,{register:o,getItem:a,hasItem:l,getNames:c,getValues:u}=Object(i["a"])("editors");function h(e){const t={},n=e;this.getConstructor=function(){return e},this.getInstance=function(e){return e.guid in t||(t[e.guid]=new n(e)),t[e.guid]},r["a"].getSingleton().add("afterDestroy",(function(){t[this.guid]=null}))}function d(e,t){let n;if("function"===typeof e)s.get(e)||g(null,e),n=s.get(e);else{if("string"!==typeof e)throw Error('Only strings and functions can be passed as "editor" parameter');n=a(e)}if(!n)throw Error(`No editor registered under name "${e}"`);return n.getInstance(t)}function m(e){if("function"===typeof e)return e;if(!l(e))throw Error(`No registered editor found under "${e}" name`);return a(e).getConstructor()}function g(e,t){e&&"string"!==typeof e&&(t=e,e=t.EDITOR_TYPE);const n=new h(t);"string"===typeof e&&o(e,n),s.set(t,n)}},"49ab":function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
  98. //! moment.js locale configuration
  99. var t=e.defineLocale("zh-hk",{months:"一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),weekdays:"星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"),weekdaysShort:"週日_週一_週二_週三_週四_週五_週六".split("_"),weekdaysMin:"日_一_二_三_四_五_六".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY/MM/DD",LL:"YYYY年M月D日",LLL:"YYYY年M月D日 HH:mm",LLLL:"YYYY年M月D日dddd HH:mm",l:"YYYY/M/D",ll:"YYYY年M月D日",lll:"YYYY年M月D日 HH:mm",llll:"YYYY年M月D日dddd HH:mm"},meridiemParse:/凌晨|早上|上午|中午|下午|晚上/,meridiemHour:function(e,t){return 12===e&&(e=0),"凌晨"===t||"早上"===t||"上午"===t?e:"中午"===t?e>=11?e:e+12:"下午"===t||"晚上"===t?e+12:void 0},meridiem:function(e,t,n){var r=100*e+t;return r<600?"凌晨":r<900?"早上":r<1200?"上午":1200===r?"中午":r<1800?"下午":"晚上"},calendar:{sameDay:"[今天]LT",nextDay:"[明天]LT",nextWeek:"[下]ddddLT",lastDay:"[昨天]LT",lastWeek:"[上]ddddLT",sameElse:"L"},dayOfMonthOrdinalParse:/\d{1,2}(日|月|週)/,ordinal:function(e,t){switch(t){case"d":case"D":case"DDD":return e+"日";case"M":return e+"月";case"w":case"W":return e+"週";default:return e}},relativeTime:{future:"%s後",past:"%s前",s:"幾秒",ss:"%d 秒",m:"1 分鐘",mm:"%d 分鐘",h:"1 小時",hh:"%d 小時",d:"1 天",dd:"%d 天",M:"1 個月",MM:"%d 個月",y:"1 年",yy:"%d 年"}});return t}))},"4ba9":function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
  100. //! moment.js locale configuration
  101. function t(e,t,n){var r=e+" ";switch(n){case"ss":return r+=1===e?"sekunda":2===e||3===e||4===e?"sekunde":"sekundi",r;case"m":return t?"jedna minuta":"jedne minute";case"mm":return r+=1===e?"minuta":2===e||3===e||4===e?"minute":"minuta",r;case"h":return t?"jedan sat":"jednog sata";case"hh":return r+=1===e?"sat":2===e||3===e||4===e?"sata":"sati",r;case"dd":return r+=1===e?"dan":"dana",r;case"MM":return r+=1===e?"mjesec":2===e||3===e||4===e?"mjeseca":"mjeseci",r;case"yy":return r+=1===e?"godina":2===e||3===e||4===e?"godine":"godina",r}}var n=e.defineLocale("hr",{months:{format:"siječnja_veljače_ožujka_travnja_svibnja_lipnja_srpnja_kolovoza_rujna_listopada_studenoga_prosinca".split("_"),standalone:"siječanj_veljača_ožujak_travanj_svibanj_lipanj_srpanj_kolovoz_rujan_listopad_studeni_prosinac".split("_")},monthsShort:"sij._velj._ožu._tra._svi._lip._srp._kol._ruj._lis._stu._pro.".split("_"),monthsParseExact:!0,weekdays:"nedjelja_ponedjeljak_utorak_srijeda_četvrtak_petak_subota".split("_"),weekdaysShort:"ned._pon._uto._sri._čet._pet._sub.".split("_"),weekdaysMin:"ne_po_ut_sr_če_pe_su".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"Do MMMM YYYY",LLL:"Do MMMM YYYY H:mm",LLLL:"dddd, Do MMMM YYYY H:mm"},calendar:{sameDay:"[danas u] LT",nextDay:"[sutra u] LT",nextWeek:function(){switch(this.day()){case 0:return"[u] [nedjelju] [u] LT";case 3:return"[u] [srijedu] [u] LT";case 6:return"[u] [subotu] [u] LT";case 1:case 2:case 4:case 5:return"[u] dddd [u] LT"}},lastDay:"[jučer u] LT",lastWeek:function(){switch(this.day()){case 0:return"[prošlu] [nedjelju] [u] LT";case 3:return"[prošlu] [srijedu] [u] LT";case 6:return"[prošle] [subote] [u] LT";case 1:case 2:case 4:case 5:return"[prošli] dddd [u] LT"}},sameElse:"L"},relativeTime:{future:"za %s",past:"prije %s",s:"par sekundi",ss:t,m:t,mm:t,h:t,hh:t,d:"dan",dd:t,M:"mjesec",MM:t,y:"godinu",yy:t},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:7}});return n}))},"4c98":function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
  102. //! moment.js locale configuration
  103. var t={1:"١",2:"٢",3:"٣",4:"٤",5:"٥",6:"٦",7:"٧",8:"٨",9:"٩",0:"٠"},n={"١":"1","٢":"2","٣":"3","٤":"4","٥":"5","٦":"6","٧":"7","٨":"8","٩":"9","٠":"0"},r=e.defineLocale("ar-ps",{months:"كانون الثاني_شباط_آذار_نيسان_أيّار_حزيران_تمّوز_آب_أيلول_تشري الأوّل_تشرين الثاني_كانون الأوّل".split("_"),monthsShort:"ك٢_شباط_آذار_نيسان_أيّار_حزيران_تمّوز_آب_أيلول_ت١_ت٢_ك١".split("_"),weekdays:"الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت".split("_"),weekdaysShort:"أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت".split("_"),weekdaysMin:"ح_ن_ث_ر_خ_ج_س".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},meridiemParse:/ص|م/,isPM:function(e){return"م"===e},meridiem:function(e,t,n){return e<12?"ص":"م"},calendar:{sameDay:"[اليوم على الساعة] LT",nextDay:"[غدا على الساعة] LT",nextWeek:"dddd [على الساعة] LT",lastDay:"[أمس على الساعة] LT",lastWeek:"dddd [على الساعة] LT",sameElse:"L"},relativeTime:{future:"في %s",past:"منذ %s",s:"ثوان",ss:"%d ثانية",m:"دقيقة",mm:"%d دقائق",h:"ساعة",hh:"%d ساعات",d:"يوم",dd:"%d أيام",M:"شهر",MM:"%d أشهر",y:"سنة",yy:"%d سنوات"},preparse:function(e){return e.replace(/[٣٤٥٦٧٨٩٠]/g,(function(e){return n[e]})).split("").reverse().join("").replace(/[١٢](?![\u062a\u0643])/g,(function(e){return n[e]})).split("").reverse().join("").replace(/،/g,",")},postformat:function(e){return e.replace(/\d/g,(function(e){return t[e]})).replace(/,/g,"،")},week:{dow:0,doy:6}});return r}))},"4ec9":function(e,t,n){"use strict";n("6f48")},5038:function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
  104. //! moment.js locale configuration
  105. var t=e.defineLocale("id",{months:"Januari_Februari_Maret_April_Mei_Juni_Juli_Agustus_September_Oktober_November_Desember".split("_"),monthsShort:"Jan_Feb_Mar_Apr_Mei_Jun_Jul_Agt_Sep_Okt_Nov_Des".split("_"),weekdays:"Minggu_Senin_Selasa_Rabu_Kamis_Jumat_Sabtu".split("_"),weekdaysShort:"Min_Sen_Sel_Rab_Kam_Jum_Sab".split("_"),weekdaysMin:"Mg_Sn_Sl_Rb_Km_Jm_Sb".split("_"),longDateFormat:{LT:"HH.mm",LTS:"HH.mm.ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY [pukul] HH.mm",LLLL:"dddd, D MMMM YYYY [pukul] HH.mm"},meridiemParse:/pagi|siang|sore|malam/,meridiemHour:function(e,t){return 12===e&&(e=0),"pagi"===t?e:"siang"===t?e>=11?e:e+12:"sore"===t||"malam"===t?e+12:void 0},meridiem:function(e,t,n){return e<11?"pagi":e<15?"siang":e<19?"sore":"malam"},calendar:{sameDay:"[Hari ini pukul] LT",nextDay:"[Besok pukul] LT",nextWeek:"dddd [pukul] LT",lastDay:"[Kemarin pukul] LT",lastWeek:"dddd [lalu pukul] LT",sameElse:"L"},relativeTime:{future:"dalam %s",past:"%s yang lalu",s:"beberapa detik",ss:"%d detik",m:"semenit",mm:"%d menit",h:"sejam",hh:"%d jam",d:"sehari",dd:"%d hari",M:"sebulan",MM:"%d bulan",y:"setahun",yy:"%d tahun"},week:{dow:0,doy:6}});return t}))},5120:function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
  106. //! moment.js locale configuration
  107. var t=["Eanáir","Feabhra","Márta","Aibreán","Bealtaine","Meitheamh","Iúil","Lúnasa","Meán Fómhair","Deireadh Fómhair","Samhain","Nollaig"],n=["Ean","Feabh","Márt","Aib","Beal","Meith","Iúil","Lún","M.F.","D.F.","Samh","Noll"],r=["Dé Domhnaigh","Dé Luain","Dé Máirt","Dé Céadaoin","Déardaoin","Dé hAoine","Dé Sathairn"],i=["Domh","Luan","Máirt","Céad","Déar","Aoine","Sath"],s=["Do","Lu","Má","Cé","Dé","A","Sa"],o=e.defineLocale("ga",{months:t,monthsShort:n,monthsParseExact:!0,weekdays:r,weekdaysShort:i,weekdaysMin:s,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Inniu ag] LT",nextDay:"[Amárach ag] LT",nextWeek:"dddd [ag] LT",lastDay:"[Inné ag] LT",lastWeek:"dddd [seo caite] [ag] LT",sameElse:"L"},relativeTime:{future:"i %s",past:"%s ó shin",s:"cúpla soicind",ss:"%d soicind",m:"nóiméad",mm:"%d nóiméad",h:"uair an chloig",hh:"%d uair an chloig",d:"lá",dd:"%d lá",M:"mí",MM:"%d míonna",y:"bliain",yy:"%d bliain"},dayOfMonthOrdinalParse:/\d{1,2}(d|na|mh)/,ordinal:function(e){var t=1===e?"d":e%10===2?"na":"mh";return e+t},week:{dow:1,doy:4}});return o}))},5294:function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
  108. //! moment.js locale configuration
  109. var t=["جنوری","فروری","مارچ","اپریل","مئی","جون","جولائی","اگست","ستمبر","اکتوبر","نومبر","دسمبر"],n=["اتوار","پیر","منگل","بدھ","جمعرات","جمعہ","ہفتہ"],r=e.defineLocale("ur",{months:t,monthsShort:t,weekdays:n,weekdaysShort:n,weekdaysMin:n,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd، D MMMM YYYY HH:mm"},meridiemParse:/صبح|شام/,isPM:function(e){return"شام"===e},meridiem:function(e,t,n){return e<12?"صبح":"شام"},calendar:{sameDay:"[آج بوقت] LT",nextDay:"[کل بوقت] LT",nextWeek:"dddd [بوقت] LT",lastDay:"[گذشتہ روز بوقت] LT",lastWeek:"[گذشتہ] dddd [بوقت] LT",sameElse:"L"},relativeTime:{future:"%s بعد",past:"%s قبل",s:"چند سیکنڈ",ss:"%d سیکنڈ",m:"ایک منٹ",mm:"%d منٹ",h:"ایک گھنٹہ",hh:"%d گھنٹے",d:"ایک دن",dd:"%d دن",M:"ایک ماہ",MM:"%d ماہ",y:"ایک سال",yy:"%d سال"},preparse:function(e){return e.replace(/،/g,",")},postformat:function(e){return e.replace(/,/g,"،")},week:{dow:1,doy:4}});return r}))},"52bd":function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
  110. //! moment.js locale configuration
  111. var t=e.defineLocale("ss",{months:"Bhimbidvwane_Indlovana_Indlov'lenkhulu_Mabasa_Inkhwekhweti_Inhlaba_Kholwane_Ingci_Inyoni_Imphala_Lweti_Ingongoni".split("_"),monthsShort:"Bhi_Ina_Inu_Mab_Ink_Inh_Kho_Igc_Iny_Imp_Lwe_Igo".split("_"),weekdays:"Lisontfo_Umsombuluko_Lesibili_Lesitsatfu_Lesine_Lesihlanu_Umgcibelo".split("_"),weekdaysShort:"Lis_Umb_Lsb_Les_Lsi_Lsh_Umg".split("_"),weekdaysMin:"Li_Us_Lb_Lt_Ls_Lh_Ug".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY h:mm A",LLLL:"dddd, D MMMM YYYY h:mm A"},calendar:{sameDay:"[Namuhla nga] LT",nextDay:"[Kusasa nga] LT",nextWeek:"dddd [nga] LT",lastDay:"[Itolo nga] LT",lastWeek:"dddd [leliphelile] [nga] LT",sameElse:"L"},relativeTime:{future:"nga %s",past:"wenteka nga %s",s:"emizuzwana lomcane",ss:"%d mzuzwana",m:"umzuzu",mm:"%d emizuzu",h:"lihora",hh:"%d emahora",d:"lilanga",dd:"%d emalanga",M:"inyanga",MM:"%d tinyanga",y:"umnyaka",yy:"%d iminyaka"},meridiemParse:/ekuseni|emini|entsambama|ebusuku/,meridiem:function(e,t,n){return e<11?"ekuseni":e<15?"emini":e<19?"entsambama":"ebusuku"},meridiemHour:function(e,t){return 12===e&&(e=0),"ekuseni"===t?e:"emini"===t?e>=11?e:e+12:"entsambama"===t||"ebusuku"===t?0===e?0:e+12:void 0},dayOfMonthOrdinalParse:/\d{1,2}/,ordinal:"%d",week:{dow:1,doy:4}});return t}))},5388:function(e,t,n){"use strict";var r=n("c65b");e.exports=function(e,t,n){var i,s,o=n?e:e.iterator,a=e.next;while(!(i=r(a,o)).done)if(s=t(i.value),void 0!==s)return s}},"55c9":function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
  112. //! moment.js locale configuration
  113. var t="ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.".split("_"),n="ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic".split("_"),r=[/^ene/i,/^feb/i,/^mar/i,/^abr/i,/^may/i,/^jun/i,/^jul/i,/^ago/i,/^sep/i,/^oct/i,/^nov/i,/^dic/i],i=/^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre|ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i,s=e.defineLocale("es-us",{months:"enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre".split("_"),monthsShort:function(e,r){return e?/-MMM-/.test(r)?n[e.month()]:t[e.month()]:t},monthsRegex:i,monthsShortRegex:i,monthsStrictRegex:/^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i,monthsShortStrictRegex:/^(ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i,monthsParse:r,longMonthsParse:r,shortMonthsParse:r,weekdays:"domingo_lunes_martes_miércoles_jueves_viernes_sábado".split("_"),weekdaysShort:"dom._lun._mar._mié._jue._vie._sáb.".split("_"),weekdaysMin:"do_lu_ma_mi_ju_vi_sá".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"MM/DD/YYYY",LL:"D [de] MMMM [de] YYYY",LLL:"D [de] MMMM [de] YYYY h:mm A",LLLL:"dddd, D [de] MMMM [de] YYYY h:mm A"},calendar:{sameDay:function(){return"[hoy a la"+(1!==this.hours()?"s":"")+"] LT"},nextDay:function(){return"[mañana a la"+(1!==this.hours()?"s":"")+"] LT"},nextWeek:function(){return"dddd [a la"+(1!==this.hours()?"s":"")+"] LT"},lastDay:function(){return"[ayer a la"+(1!==this.hours()?"s":"")+"] LT"},lastWeek:function(){return"[el] dddd [pasado a la"+(1!==this.hours()?"s":"")+"] LT"},sameElse:"L"},relativeTime:{future:"en %s",past:"hace %s",s:"unos segundos",ss:"%d segundos",m:"un minuto",mm:"%d minutos",h:"una hora",hh:"%d horas",d:"un día",dd:"%d días",w:"una semana",ww:"%d semanas",M:"un mes",MM:"%d meses",y:"un año",yy:"%d años"},dayOfMonthOrdinalParse:/\d{1,2}º/,ordinal:"%dº",week:{dow:0,doy:6}});return s}))},5714:function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));n("d9e2");function r(e,t,n){return(t=i(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e){var t=s(e,"string");return"symbol"==typeof t?t:t+""}function s(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}class o{constructor(e){r(this,"calculationTypes",[]),r(this,"calculationResults",new Map),this.calculationTypes=e}_initialize(e){this.calculationTypes.forEach(t=>{let[n,r]=t;this.calculationResults.set(n,r),r.initialize(e)})}_process(e,t){this.calculationTypes.forEach(n=>{let[,r]=n;return r.process(e,t)})}_finalize(e){this.calculationTypes.forEach(t=>{let[,n]=t;return n.finalize(e)})}getResultsFor(e){return this.calculationResults.get(e)}}},"576c":function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
  114. //! moment.js locale configuration
  115. var t=e.defineLocale("tet",{months:"Janeiru_Fevereiru_Marsu_Abril_Maiu_Juñu_Jullu_Agustu_Setembru_Outubru_Novembru_Dezembru".split("_"),monthsShort:"Jan_Fev_Mar_Abr_Mai_Jun_Jul_Ago_Set_Out_Nov_Dez".split("_"),weekdays:"Domingu_Segunda_Tersa_Kuarta_Kinta_Sesta_Sabadu".split("_"),weekdaysShort:"Dom_Seg_Ters_Kua_Kint_Sest_Sab".split("_"),weekdaysMin:"Do_Seg_Te_Ku_Ki_Ses_Sa".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Ohin iha] LT",nextDay:"[Aban iha] LT",nextWeek:"dddd [iha] LT",lastDay:"[Horiseik iha] LT",lastWeek:"dddd [semana kotuk] [iha] LT",sameElse:"L"},relativeTime:{future:"iha %s",past:"%s liuba",s:"segundu balun",ss:"segundu %d",m:"minutu ida",mm:"minutu %d",h:"oras ida",hh:"oras %d",d:"loron ida",dd:"loron %d",M:"fulan ida",MM:"fulan %d",y:"tinan ida",yy:"tinan %d"},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(e){var t=e%10,n=1===~~(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th";return e+n},week:{dow:1,doy:4}});return t}))},"598a":function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
  116. //! moment.js locale configuration
  117. var t=["ޖެނުއަރީ","ފެބްރުއަރީ","މާރިޗު","އޭޕްރީލު","މޭ","ޖޫން","ޖުލައި","އޯގަސްޓު","ސެޕްޓެމްބަރު","އޮކްޓޯބަރު","ނޮވެމްބަރު","ޑިސެމްބަރު"],n=["އާދިއްތަ","ހޯމަ","އަންގާރަ","ބުދަ","ބުރާސްފަތި","ހުކުރު","ހޮނިހިރު"],r=e.defineLocale("dv",{months:t,monthsShort:t,weekdays:n,weekdaysShort:n,weekdaysMin:"އާދި_ހޯމަ_އަން_ބުދަ_ބުރާ_ހުކު_ހޮނި".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"D/M/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},meridiemParse:/މކ|މފ/,isPM:function(e){return"މފ"===e},meridiem:function(e,t,n){return e<12?"މކ":"މފ"},calendar:{sameDay:"[މިއަދު] LT",nextDay:"[މާދަމާ] LT",nextWeek:"dddd LT",lastDay:"[އިއްޔެ] LT",lastWeek:"[ފާއިތުވި] dddd LT",sameElse:"L"},relativeTime:{future:"ތެރޭގައި %s",past:"ކުރިން %s",s:"ސިކުންތުކޮޅެއް",ss:"d% ސިކުންތު",m:"މިނިޓެއް",mm:"މިނިޓު %d",h:"ގަޑިއިރެއް",hh:"ގަޑިއިރު %d",d:"ދުވަހެއް",dd:"ދުވަސް %d",M:"މަހެއް",MM:"މަސް %d",y:"އަހަރެއް",yy:"އަހަރު %d"},preparse:function(e){return e.replace(/،/g,",")},postformat:function(e){return e.replace(/,/g,"،")},week:{dow:7,doy:12}});return r}))},"5aff":function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
  118. //! moment.js locale configuration
  119. var t={1:"'inji",5:"'inji",8:"'inji",70:"'inji",80:"'inji",2:"'nji",7:"'nji",20:"'nji",50:"'nji",3:"'ünji",4:"'ünji",100:"'ünji",6:"'njy",9:"'unjy",10:"'unjy",30:"'unjy",60:"'ynjy",90:"'ynjy"},n=e.defineLocale("tk",{months:"Ýanwar_Fewral_Mart_Aprel_Maý_Iýun_Iýul_Awgust_Sentýabr_Oktýabr_Noýabr_Dekabr".split("_"),monthsShort:"Ýan_Few_Mar_Apr_Maý_Iýn_Iýl_Awg_Sen_Okt_Noý_Dek".split("_"),weekdays:"Ýekşenbe_Duşenbe_Sişenbe_Çarşenbe_Penşenbe_Anna_Şenbe".split("_"),weekdaysShort:"Ýek_Duş_Siş_Çar_Pen_Ann_Şen".split("_"),weekdaysMin:"Ýk_Dş_Sş_Çr_Pn_An_Şn".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[bugün sagat] LT",nextDay:"[ertir sagat] LT",nextWeek:"[indiki] dddd [sagat] LT",lastDay:"[düýn] LT",lastWeek:"[geçen] dddd [sagat] LT",sameElse:"L"},relativeTime:{future:"%s soň",past:"%s öň",s:"birnäçe sekunt",m:"bir minut",mm:"%d minut",h:"bir sagat",hh:"%d sagat",d:"bir gün",dd:"%d gün",M:"bir aý",MM:"%d aý",y:"bir ýyl",yy:"%d ýyl"},ordinal:function(e,n){switch(n){case"d":case"D":case"Do":case"DD":return e;default:if(0===e)return e+"'unjy";var r=e%10,i=e%100-r,s=e>=100?100:null;return e+(t[r]||t[i]||t[s])}},week:{dow:1,doy:7}});return n}))},"5b14":function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
  120. //! moment.js locale configuration
  121. var t="vasárnap hétfőn kedden szerdán csütörtökön pénteken szombaton".split(" ");function n(e,t,n,r){var i=e;switch(n){case"s":return r||t?"néhány másodperc":"néhány másodperce";case"ss":return i+(r||t)?" másodperc":" másodperce";case"m":return"egy"+(r||t?" perc":" perce");case"mm":return i+(r||t?" perc":" perce");case"h":return"egy"+(r||t?" óra":" órája");case"hh":return i+(r||t?" óra":" órája");case"d":return"egy"+(r||t?" nap":" napja");case"dd":return i+(r||t?" nap":" napja");case"M":return"egy"+(r||t?" hónap":" hónapja");case"MM":return i+(r||t?" hónap":" hónapja");case"y":return"egy"+(r||t?" év":" éve");case"yy":return i+(r||t?" év":" éve")}return""}function r(e){return(e?"":"[múlt] ")+"["+t[this.day()]+"] LT[-kor]"}var i=e.defineLocale("hu",{months:"január_február_március_április_május_június_július_augusztus_szeptember_október_november_december".split("_"),monthsShort:"jan._feb._márc._ápr._máj._jún._júl._aug._szept._okt._nov._dec.".split("_"),monthsParseExact:!0,weekdays:"vasárnap_hétfő_kedd_szerda_csütörtök_péntek_szombat".split("_"),weekdaysShort:"vas_hét_kedd_sze_csüt_pén_szo".split("_"),weekdaysMin:"v_h_k_sze_cs_p_szo".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"YYYY.MM.DD.",LL:"YYYY. MMMM D.",LLL:"YYYY. MMMM D. H:mm",LLLL:"YYYY. MMMM D., dddd H:mm"},meridiemParse:/de|du/i,isPM:function(e){return"u"===e.charAt(1).toLowerCase()},meridiem:function(e,t,n){return e<12?!0===n?"de":"DE":!0===n?"du":"DU"},calendar:{sameDay:"[ma] LT[-kor]",nextDay:"[holnap] LT[-kor]",nextWeek:function(){return r.call(this,!0)},lastDay:"[tegnap] LT[-kor]",lastWeek:function(){return r.call(this,!1)},sameElse:"L"},relativeTime:{future:"%s múlva",past:"%s",s:n,ss:n,m:n,mm:n,h:n,hh:n,d:n,dd:n,M:n,MM:n,y:n,yy:n},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}});return i}))},"5b81":function(e,t,n){"use strict";var r=n("23e7"),i=n("c65b"),s=n("e330"),o=n("1d80"),a=n("1626"),l=n("7234"),c=n("44e7"),u=n("577e"),h=n("dc4a"),d=n("90d8"),m=n("0cb2"),g=n("b622"),p=n("c430"),f=g("replace"),R=TypeError,y=s("".indexOf),M=s("".replace),S=s("".slice),b=Math.max;r({target:"String",proto:!0},{replaceAll:function(e,t){var n,r,s,g,w,T,O,v,E,C=o(this),L=0,N=0,_="";if(!l(e)){if(n=c(e),n&&(r=u(o(d(e))),!~y(r,"g")))throw new R("`.replaceAll` does not allow non-global regexes");if(s=h(e,f),s)return i(s,e,C,t);if(p&&n)return M(u(C),e,t)}g=u(C),w=u(e),T=a(t),T||(t=u(t)),O=w.length,v=b(1,O),L=y(g,w);while(-1!==L)E=T?u(t(w,L,g)):m(w,g,L,[],void 0,t),_+=S(g,N,L)+E,N=L+O,L=L+v>g.length?-1:y(g,w,L+v);return N<g.length&&(_+=S(g,N)),_}})},"5c3a":function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
  122. //! moment.js locale configuration
  123. var t=e.defineLocale("zh-cn",{months:"一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),weekdays:"星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"),weekdaysShort:"周日_周一_周二_周三_周四_周五_周六".split("_"),weekdaysMin:"日_一_二_三_四_五_六".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY/MM/DD",LL:"YYYY年M月D日",LLL:"YYYY年M月D日Ah点mm分",LLLL:"YYYY年M月D日ddddAh点mm分",l:"YYYY/M/D",ll:"YYYY年M月D日",lll:"YYYY年M月D日 HH:mm",llll:"YYYY年M月D日dddd HH:mm"},meridiemParse:/凌晨|早上|上午|中午|下午|晚上/,meridiemHour:function(e,t){return 12===e&&(e=0),"凌晨"===t||"早上"===t||"上午"===t?e:"下午"===t||"晚上"===t?e+12:e>=11?e:e+12},meridiem:function(e,t,n){var r=100*e+t;return r<600?"凌晨":r<900?"早上":r<1130?"上午":r<1230?"中午":r<1800?"下午":"晚上"},calendar:{sameDay:"[今天]LT",nextDay:"[明天]LT",nextWeek:function(e){return e.week()!==this.week()?"[下]dddLT":"[本]dddLT"},lastDay:"[昨天]LT",lastWeek:function(e){return this.week()!==e.week()?"[上]dddLT":"[本]dddLT"},sameElse:"L"},dayOfMonthOrdinalParse:/\d{1,2}(日|月|周)/,ordinal:function(e,t){switch(t){case"d":case"D":case"DDD":return e+"日";case"M":return e+"月";case"w":case"W":return e+"周";default:return e}},relativeTime:{future:"%s后",past:"%s前",s:"几秒",ss:"%d 秒",m:"1 分钟",mm:"%d 分钟",h:"1 小时",hh:"%d 小时",d:"1 天",dd:"%d 天",w:"1 周",ww:"%d 周",M:"1 个月",MM:"%d 个月",y:"1 年",yy:"%d 年"},week:{dow:1,doy:4}});return t}))},"5cbb":function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
  124. //! moment.js locale configuration
  125. var t=e.defineLocale("te",{months:"జనవరి_ఫిబ్రవరి_మార్చి_ఏప్రిల్_మే_జూన్_జులై_ఆగస్టు_సెప్టెంబర్_అక్టోబర్_నవంబర్_డిసెంబర్".split("_"),monthsShort:"జన._ఫిబ్ర._మార్చి_ఏప్రి._మే_జూన్_జులై_ఆగ._సెప్._అక్టో._నవ._డిసె.".split("_"),monthsParseExact:!0,weekdays:"ఆదివారం_సోమవారం_మంగళవారం_బుధవారం_గురువారం_శుక్రవారం_శనివారం".split("_"),weekdaysShort:"ఆది_సోమ_మంగళ_బుధ_గురు_శుక్ర_శని".split("_"),weekdaysMin:"ఆ_సో_మం_బు_గు_శు_శ".split("_"),longDateFormat:{LT:"A h:mm",LTS:"A h:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm",LLLL:"dddd, D MMMM YYYY, A h:mm"},calendar:{sameDay:"[నేడు] LT",nextDay:"[రేపు] LT",nextWeek:"dddd, LT",lastDay:"[నిన్న] LT",lastWeek:"[గత] dddd, LT",sameElse:"L"},relativeTime:{future:"%s లో",past:"%s క్రితం",s:"కొన్ని క్షణాలు",ss:"%d సెకన్లు",m:"ఒక నిమిషం",mm:"%d నిమిషాలు",h:"ఒక గంట",hh:"%d గంటలు",d:"ఒక రోజు",dd:"%d రోజులు",M:"ఒక నెల",MM:"%d నెలలు",y:"ఒక సంవత్సరం",yy:"%d సంవత్సరాలు"},dayOfMonthOrdinalParse:/\d{1,2}వ/,ordinal:"%dవ",meridiemParse:/రాత్రి|ఉదయం|మధ్యాహ్నం|సాయంత్రం/,meridiemHour:function(e,t){return 12===e&&(e=0),"రాత్రి"===t?e<4?e:e+12:"ఉదయం"===t?e:"మధ్యాహ్నం"===t?e>=10?e:e+12:"సాయంత్రం"===t?e+12:void 0},meridiem:function(e,t,n){return e<4?"రాత్రి":e<10?"ఉదయం":e<17?"మధ్యాహ్నం":e<20?"సాయంత్రం":"రాత్రి"},week:{dow:0,doy:6}});return t}))},"5d7f":function(e,t,n){"use strict";n.r(t),n.d(t,"getParent",(function(){return s})),n.d(t,"isThisHotChild",(function(){return o})),n.d(t,"getFrameElement",(function(){return a})),n.d(t,"getParentWindow",(function(){return l})),n.d(t,"hasAccessToParentWindow",(function(){return c})),n.d(t,"closest",(function(){return u})),n.d(t,"closestDown",(function(){return h})),n.d(t,"isChildOf",(function(){return d})),n.d(t,"index",(function(){return m})),n.d(t,"overlayContainsElement",(function(){return g})),n.d(t,"hasClass",(function(){return R})),n.d(t,"addClass",(function(){return y})),n.d(t,"removeClass",(function(){return M})),n.d(t,"setAttribute",(function(){return S})),n.d(t,"removeAttribute",(function(){return b})),n.d(t,"removeTextNodes",(function(){return w})),n.d(t,"empty",(function(){return T})),n.d(t,"HTML_CHARACTERS",(function(){return O})),n.d(t,"fastInnerHTML",(function(){return v})),n.d(t,"fastInnerText",(function(){return E})),n.d(t,"isVisible",(function(){return C})),n.d(t,"offset",(function(){return L})),n.d(t,"getWindowScrollTop",(function(){return N})),n.d(t,"getWindowScrollLeft",(function(){return _})),n.d(t,"getScrollTop",(function(){return I})),n.d(t,"getScrollLeft",(function(){return P})),n.d(t,"getScrollableElement",(function(){return x})),n.d(t,"getMaximumScrollTop",(function(){return D})),n.d(t,"getMaximumScrollLeft",(function(){return A})),n.d(t,"getTrimmingContainer",(function(){return F})),n.d(t,"getStyle",(function(){return Y})),n.d(t,"matchesCSSRules",(function(){return H})),n.d(t,"getComputedStyle",(function(){return k})),n.d(t,"outerWidth",(function(){return V})),n.d(t,"outerHeight",(function(){return U})),n.d(t,"innerHeight",(function(){return W})),n.d(t,"innerWidth",(function(){return X})),n.d(t,"addEvent",(function(){return j})),n.d(t,"removeEvent",(function(){return Z})),n.d(t,"getCaretPosition",(function(){return Q})),n.d(t,"getSelectionEndPosition",(function(){return K})),n.d(t,"getSelectionText",(function(){return G})),n.d(t,"clearTextSelection",(function(){return B})),n.d(t,"setCaretPosition",(function(){return J})),n.d(t,"getScrollbarWidth",(function(){return q})),n.d(t,"hasVerticalScrollbar",(function(){return ee})),n.d(t,"hasHorizontalScrollbar",(function(){return te})),n.d(t,"setOverlayPosition",(function(){return ne})),n.d(t,"getCssTransform",(function(){return re})),n.d(t,"resetCssTransform",(function(){return ie})),n.d(t,"isInput",(function(){return se})),n.d(t,"isOutsideInput",(function(){return oe})),n.d(t,"selectElementIfAllowed",(function(){return ae})),n.d(t,"isDetached",(function(){return le})),n.d(t,"observeVisibilityChangeOnce",(function(){return ce})),n.d(t,"makeElementContentEditableAndSelectItsContent",(function(){return ue})),n.d(t,"removeContentEditableFromElementAndDeselect",(function(){return he})),n.d(t,"runWithSelectedContendEditableElement",(function(){return de}));n("d9e2"),n("14d9");var r=n("29b0"),i=n("8828");function s(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=-1,r=null,i=e;while(null!==i){if(n===t){r=i;break}i.host&&i.nodeType===Node.DOCUMENT_FRAGMENT_NODE?i=i.host:(n+=1,i=i.parentNode)}return r}function o(e,t){const n=e.closest(".handsontable");return!!n&&(n.parentNode===t||n===t)}function a(e){return Object.getPrototypeOf(e.parent)&&e.frameElement}function l(e){return a(e)&&e.parent}function c(e){return!!Object.getPrototypeOf(e.parent)}function u(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=arguments.length>2?arguments[2]:void 0;const{ELEMENT_NODE:r,DOCUMENT_FRAGMENT_NODE:i}=Node;let s=e;while(null!==s&&void 0!==s&&s!==n){const{nodeType:e,nodeName:n}=s;if(e===r&&(t.includes(n)||t.includes(s)))return s;const{host:o}=s;s=o&&e===i?o:s.parentNode}return null}function h(e,t,n){const r=[];let i=e;while(i){if(i=u(i,t,n),!i||n&&!n.contains(i))break;r.push(i),i=i.host&&i.nodeType===Node.DOCUMENT_FRAGMENT_NODE?i.host:i.parentNode}const s=r.length;return s?r[s-1]:null}function d(e,t){let n=e.parentNode,r=[];"string"===typeof t?r=e.defaultView?Array.prototype.slice.call(e.querySelectorAll(t),0):Array.prototype.slice.call(e.ownerDocument.querySelectorAll(t),0):r.push(t);while(null!==n){if(r.indexOf(n)>-1)return!0;n=n.parentNode}return!1}function m(e){let t=0,n=e;if(n.previousSibling)while(n=n.previousSibling)t+=1;return t}function g(e,t,n){const r=n.parentElement.querySelector(".ht_clone_"+e);return r?r.contains(t):null}function p(e){return e&&e.length?e.filter(e=>!!e):[]}function f(e,t){if(!e||!e.length)return t?{regexFree:[],regexes:[]}:[];const n=[],r=[];return r.push(...e.filter(e=>{const r=e instanceof RegExp;return r&&t&&n.push(e),!r})),t?{regexFree:r,regexes:n}:r}function R(e,t){return void 0!==e.classList&&"string"===typeof t&&""!==t&&e.classList.contains(t)}function y(e,t){"string"===typeof t&&(t=t.split(" ")),t=p(t),t.length>0&&e.classList.add(...t)}function M(e,t){"string"===typeof t?t=t.split(" "):t instanceof RegExp&&(t=[t]);let{regexFree:n,regexes:r}=f(t,!0);n=p(n),n.length>0&&e.classList.remove(...n),r.forEach(t=>{e.classList.forEach(n=>{t.test(n)&&e.classList.remove(n)})})}function S(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=arguments.length>2?arguments[2]:void 0;Array.isArray(t)||(t=[[t,n]]),t.forEach(t=>{Array.isArray(t)&&""!==t[0]&&e.setAttribute(...t)})}function b(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];"string"===typeof t?t=t.split(" "):t instanceof RegExp&&(t=[t]);const{regexFree:n,regexes:r}=f(t,!0);n.forEach(t=>{""!==t&&e.removeAttribute(t)}),r.forEach(t=>{e.getAttributeNames().forEach(n=>{t.test(n)&&e.removeAttribute(n)})})}function w(e){if(3===e.nodeType)e.parentNode.removeChild(e);else if(["TABLE","THEAD","TBODY","TFOOT","TR"].indexOf(e.nodeName)>-1){const t=e.childNodes;for(let e=t.length-1;e>=0;e--)w(t[e])}}function T(e){let t;while(t=e.lastChild)e.removeChild(t)}const O=/(<(.*)>|&(.*);)/;function v(e,t){let n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];O.test(t)?e.innerHTML=n?Object(r["sanitize"])(t):t:E(e,t)}function E(e,t){const n=e.firstChild;n&&3===n.nodeType&&null===n.nextSibling?n.textContent=t:(T(e),e.appendChild(e.ownerDocument.createTextNode(t)))}function C(e){const t=e.ownerDocument.documentElement;let n=e;while(n!==t){if(null===n)return!1;if(n.nodeType===Node.DOCUMENT_FRAGMENT_NODE){if(n.host){if(n.host.impl)return C(n.host.impl);if(n.host)return C(n.host);throw new Error("Lost in Web Components world")}return!1}if("none"===k(n).display)return!1;n=n.parentNode}return!0}function L(e){const t=e.ownerDocument,n=t.defaultView,r=t.documentElement;let i,s,o,a=e;i=a.offsetLeft,s=a.offsetTop,o=a;while(a=a.offsetParent){if(a===t.body)break;if(!("offsetLeft"in a))break;i+=a.offsetLeft,s+=a.offsetTop,o=a}return o&&"fixed"===o.style.position&&(i+=n.pageXOffset||r.scrollLeft,s+=n.pageYOffset||r.scrollTop),{left:i,top:s}}function N(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window;return e.scrollY}function _(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window;return e.scrollX}function I(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:window;return e===t?N(t):e.scrollTop}function P(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:window;return e===t?_(t):e.scrollLeft}function x(e){let t=e.ownerDocument,n=t?t.defaultView:void 0;t||(t=e.document?e.document:e,n=t.defaultView);const r=["auto","scroll"];let i=e.parentNode;while(i&&i.style&&t.body!==i){let{overflow:e,overflowX:t,overflowY:s}=i.style;if([e,t,s].includes("scroll"))return i;if(({overflow:e,overflowX:t,overflowY:s}=n.getComputedStyle(i)),r.includes(e)||r.includes(t)||r.includes(s))return i;if(i.clientHeight<=i.scrollHeight+1&&(r.includes(s)||r.includes(e)))return i;if(i.clientWidth<=i.scrollWidth+1&&(r.includes(t)||r.includes(e)))return i;i=i.parentNode}return n}function D(e){return e.scrollHeight-e.clientHeight}function A(e){return e.scrollWidth-e.clientWidth}function F(e){const t=e.ownerDocument,n=t.defaultView;let r=e.parentNode;while(r&&r.style&&t.body!==r){if("visible"!==r.style.overflow&&""!==r.style.overflow)return r;const e=k(r,n),t=["scroll","hidden","auto"],i=e.getPropertyValue("overflow"),s=e.getPropertyValue("overflow-y"),o=e.getPropertyValue("overflow-x");if(t.includes(i)||t.includes(s)||t.includes(o))return r;r=r.parentNode}return n}function Y(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:window;if(!e)return;if(e===n)return"width"===t?n.innerWidth+"px":"height"===t?n.innerHeight+"px":void 0;const r=e.style[t];if(""!==r&&void 0!==r)return r;const i=k(e,n);return""!==i[t]&&void 0!==i[t]?i[t]:void 0}function H(e,t){const{selectorText:n}=t;let r=!1;return t.type===CSSRule.STYLE_RULE&&n&&(e.msMatchesSelector?r=e.msMatchesSelector(n):e.matches&&(r=e.matches(n))),r}function k(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:window;return e.currentStyle||t.getComputedStyle(e)}function V(e){return e.offsetWidth}function U(e){return e.offsetHeight}function W(e){return e.clientHeight||e.innerHeight}function X(e){return e.clientWidth||e.innerWidth}function j(e,t,n){e.addEventListener(t,n,!1)}function Z(e,t,n){e.removeEventListener(t,n,!1)}function Q(e){return e.selectionStart?e.selectionStart:0}function K(e){return e.selectionEnd?e.selectionEnd:0}function G(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window;const t=e.document;let n="";return e.getSelection?n=e.getSelection().toString():t.selection&&"Control"!==t.selection.type&&(n=t.selection.createRange().text),n}function B(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window;e.getSelection&&(e.getSelection().empty?e.getSelection().empty():e.getSelection().removeAllRanges&&e.getSelection().removeAllRanges())}function J(e,t,n){if(void 0===n&&(n=t),e.setSelectionRange){e.focus();try{e.setSelectionRange(t,n)}catch(r){const i=e.parentNode,s=i.style.display;i.style.display="block",e.setSelectionRange(t,n),i.style.display=s}}}let z;function $(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document;const t=e.createElement("div");t.style.height="200px",t.style.width="100%";const n=e.createElement("div");n.style.boxSizing="content-box",n.style.height="150px",n.style.left="0px",n.style.overflow="hidden",n.style.position="absolute",n.style.top="0px",n.style.width="200px",n.style.visibility="hidden",n.appendChild(t),(e.body||e.documentElement).appendChild(n);const r=t.offsetWidth;n.style.overflow="scroll";let i=t.offsetWidth;return r===i&&(i=n.clientWidth),(e.body||e.documentElement).removeChild(n),r-i}function q(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document;return void 0===z&&(z=$(e)),z}function ee(e){return e.offsetWidth!==e.clientWidth}function te(e){return e.offsetHeight!==e.clientHeight}function ne(e,t,n){e.style.transform=`translate3d(${t},${n},0)`}function re(e){let t;return e.style.transform&&""!==(t=e.style.transform)?["transform",t]:-1}function ie(e){e.style.transform&&""!==e.style.transform&&(e.style.transform="")}function se(e){const t=["INPUT","SELECT","TEXTAREA"];return e&&(t.indexOf(e.nodeName)>-1||"true"===e.contentEditable)}function oe(e){return se(e)&&!1===e.hasAttribute("data-hot-input")}function ae(e){const t=e.ownerDocument.activeElement;oe(t)||e.select()}function le(e){return!e.parentNode}function ce(e,t){const n=new IntersectionObserver((n,r)=>{n.forEach(n=>{n.isIntersecting&&null!==e.offsetParent&&(t(),r.unobserve(e))})},{root:e.ownerDocument.body});n.observe(e)}function ue(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];const r=e.ownerDocument,s=r.createRange(),o=r.defaultView.getSelection();S(e,"contenteditable",!0),n&&S(e,...Object(i["n"])()),t&&y(e,"invisibleSelection"),s.selectNodeContents(e),o.removeAllRanges(),o.addRange(s)}function he(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];const n=e.ownerDocument.defaultView.getSelection();e.hasAttribute("aria-hidden")&&e.removeAttribute("aria-hidden"),n.removeAllRanges(),t&&M(e,"invisibleSelection"),e.removeAttribute("contenteditable")}function de(e,t){let n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];ue(e,n),t(),he(e,n)}},"5fbd":function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
  126. //! moment.js locale configuration
  127. var t=e.defineLocale("sv",{months:"januari_februari_mars_april_maj_juni_juli_augusti_september_oktober_november_december".split("_"),monthsShort:"jan_feb_mar_apr_maj_jun_jul_aug_sep_okt_nov_dec".split("_"),weekdays:"söndag_måndag_tisdag_onsdag_torsdag_fredag_lördag".split("_"),weekdaysShort:"sön_mån_tis_ons_tor_fre_lör".split("_"),weekdaysMin:"sö_må_ti_on_to_fr_lö".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY-MM-DD",LL:"D MMMM YYYY",LLL:"D MMMM YYYY [kl.] HH:mm",LLLL:"dddd D MMMM YYYY [kl.] HH:mm",lll:"D MMM YYYY HH:mm",llll:"ddd D MMM YYYY HH:mm"},calendar:{sameDay:"[Idag] LT",nextDay:"[Imorgon] LT",lastDay:"[Igår] LT",nextWeek:"[På] dddd LT",lastWeek:"[I] dddd[s] LT",sameElse:"L"},relativeTime:{future:"om %s",past:"för %s sedan",s:"några sekunder",ss:"%d sekunder",m:"en minut",mm:"%d minuter",h:"en timme",hh:"%d timmar",d:"en dag",dd:"%d dagar",M:"en månad",MM:"%d månader",y:"ett år",yy:"%d år"},dayOfMonthOrdinalParse:/\d{1,2}(\:e|\:a)/,ordinal:function(e){var t=e%10,n=1===~~(e%100/10)?":e":1===t||2===t?":a":":e";return e+n},week:{dow:1,doy:4}});return t}))},6117:function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
  128. //! moment.js locale configuration
  129. var t=e.defineLocale("ug-cn",{months:"يانۋار_فېۋرال_مارت_ئاپرېل_ماي_ئىيۇن_ئىيۇل_ئاۋغۇست_سېنتەبىر_ئۆكتەبىر_نويابىر_دېكابىر".split("_"),monthsShort:"يانۋار_فېۋرال_مارت_ئاپرېل_ماي_ئىيۇن_ئىيۇل_ئاۋغۇست_سېنتەبىر_ئۆكتەبىر_نويابىر_دېكابىر".split("_"),weekdays:"يەكشەنبە_دۈشەنبە_سەيشەنبە_چارشەنبە_پەيشەنبە_جۈمە_شەنبە".split("_"),weekdaysShort:"يە_دۈ_سە_چا_پە_جۈ_شە".split("_"),weekdaysMin:"يە_دۈ_سە_چا_پە_جۈ_شە".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY-MM-DD",LL:"YYYY-يىلىM-ئاينىڭD-كۈنى",LLL:"YYYY-يىلىM-ئاينىڭD-كۈنى، HH:mm",LLLL:"dddd، YYYY-يىلىM-ئاينىڭD-كۈنى، HH:mm"},meridiemParse:/يېرىم كېچە|سەھەر|چۈشتىن بۇرۇن|چۈش|چۈشتىن كېيىن|كەچ/,meridiemHour:function(e,t){return 12===e&&(e=0),"يېرىم كېچە"===t||"سەھەر"===t||"چۈشتىن بۇرۇن"===t?e:"چۈشتىن كېيىن"===t||"كەچ"===t?e+12:e>=11?e:e+12},meridiem:function(e,t,n){var r=100*e+t;return r<600?"يېرىم كېچە":r<900?"سەھەر":r<1130?"چۈشتىن بۇرۇن":r<1230?"چۈش":r<1800?"چۈشتىن كېيىن":"كەچ"},calendar:{sameDay:"[بۈگۈن سائەت] LT",nextDay:"[ئەتە سائەت] LT",nextWeek:"[كېلەركى] dddd [سائەت] LT",lastDay:"[تۆنۈگۈن] LT",lastWeek:"[ئالدىنقى] dddd [سائەت] LT",sameElse:"L"},relativeTime:{future:"%s كېيىن",past:"%s بۇرۇن",s:"نەچچە سېكونت",ss:"%d سېكونت",m:"بىر مىنۇت",mm:"%d مىنۇت",h:"بىر سائەت",hh:"%d سائەت",d:"بىر كۈن",dd:"%d كۈن",M:"بىر ئاي",MM:"%d ئاي",y:"بىر يىل",yy:"%d يىل"},dayOfMonthOrdinalParse:/\d{1,2}(-كۈنى|-ئاي|-ھەپتە)/,ordinal:function(e,t){switch(t){case"d":case"D":case"DDD":return e+"-كۈنى";case"w":case"W":return e+"-ھەپتە";default:return e}},preparse:function(e){return e.replace(/،/g,",")},postformat:function(e){return e.replace(/,/g,"،")},week:{dow:1,doy:7}});return t}))},"63d8":function(e,t,n){"use strict";n.r(t),n.d(t,"setBrowserMeta",(function(){return l})),n.d(t,"setPlatformMeta",(function(){return c})),n.d(t,"isChrome",(function(){return u})),n.d(t,"isChromeWebKit",(function(){return h})),n.d(t,"isFirefox",(function(){return d})),n.d(t,"isFirefoxWebKit",(function(){return m})),n.d(t,"isSafari",(function(){return g})),n.d(t,"isEdge",(function(){return p})),n.d(t,"isEdgeWebKit",(function(){return f})),n.d(t,"isMobileBrowser",(function(){return R})),n.d(t,"isIOS",(function(){return y})),n.d(t,"isIpadOS",(function(){return M})),n.d(t,"isWindowsOS",(function(){return S})),n.d(t,"isMacOS",(function(){return b})),n.d(t,"isLinuxOS",(function(){return w}));var r=n("351d"),i=n("7dd0");const s=e=>{const t={value:!1,test:(n,r)=>{t.value=e(n,r)}};return t},o={chrome:s((e,t)=>/Chrome/.test(e)&&/Google/.test(t)),chromeWebKit:s(e=>/CriOS/.test(e)),edge:s(e=>/Edge/.test(e)),edgeWebKit:s(e=>/EdgiOS/.test(e)),firefox:s(e=>/Firefox/.test(e)),firefoxWebKit:s(e=>/FxiOS/.test(e)),mobile:s(e=>/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(e)),safari:s((e,t)=>/Safari/.test(e)&&/Apple Computer/.test(t))},a={mac:s(e=>/^Mac/.test(e)),win:s(e=>/^Win/.test(e)),linux:s(e=>/^Linux/.test(e)),ios:s(e=>/iPhone|iPad|iPod/i.test(e))};function l(){let{userAgent:e=navigator.userAgent,vendor:t=navigator.vendor}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};Object(r["objectEach"])(o,n=>{let{test:r}=n;r(e,t)})}function c(){let{platform:e=navigator.platform}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};Object(r["objectEach"])(a,t=>{let{test:n}=t;n(e)})}function u(){return o.chrome.value}function h(){return o.chromeWebKit.value}function d(){return o.firefox.value}function m(){return o.firefoxWebKit.value}function g(){return o.safari.value}function p(){return o.edge.value}function f(){return o.edgeWebKit.value}function R(){return o.mobile.value}function y(){return a.ios.value}function M(){let{maxTouchPoints:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:navigator;return e>2&&a.mac.value}function S(){return a.win.value}function b(){return a.mac.value}function w(){return a.linux.value}Object(i["isCSR"])()&&(l(),c())},6403:function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
  130. //! moment.js locale configuration
  131. var t=e.defineLocale("ms-my",{months:"Januari_Februari_Mac_April_Mei_Jun_Julai_Ogos_September_Oktober_November_Disember".split("_"),monthsShort:"Jan_Feb_Mac_Apr_Mei_Jun_Jul_Ogs_Sep_Okt_Nov_Dis".split("_"),weekdays:"Ahad_Isnin_Selasa_Rabu_Khamis_Jumaat_Sabtu".split("_"),weekdaysShort:"Ahd_Isn_Sel_Rab_Kha_Jum_Sab".split("_"),weekdaysMin:"Ah_Is_Sl_Rb_Km_Jm_Sb".split("_"),longDateFormat:{LT:"HH.mm",LTS:"HH.mm.ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY [pukul] HH.mm",LLLL:"dddd, D MMMM YYYY [pukul] HH.mm"},meridiemParse:/pagi|tengahari|petang|malam/,meridiemHour:function(e,t){return 12===e&&(e=0),"pagi"===t?e:"tengahari"===t?e>=11?e:e+12:"petang"===t||"malam"===t?e+12:void 0},meridiem:function(e,t,n){return e<11?"pagi":e<15?"tengahari":e<19?"petang":"malam"},calendar:{sameDay:"[Hari ini pukul] LT",nextDay:"[Esok pukul] LT",nextWeek:"dddd [pukul] LT",lastDay:"[Kelmarin pukul] LT",lastWeek:"dddd [lepas pukul] LT",sameElse:"L"},relativeTime:{future:"dalam %s",past:"%s yang lepas",s:"beberapa saat",ss:"%d saat",m:"seminit",mm:"%d minit",h:"sejam",hh:"%d jam",d:"sehari",dd:"%d hari",M:"sebulan",MM:"%d bulan",y:"setahun",yy:"%d tahun"},week:{dow:1,doy:7}});return t}))},6566:function(e,t,n){"use strict";var r=n("7c73"),i=n("edd0"),s=n("6964"),o=n("0366"),a=n("19aa"),l=n("7234"),c=n("2266"),u=n("c6d2"),h=n("4754"),d=n("2626"),m=n("83ab"),g=n("f183").fastKey,p=n("69f3"),f=p.set,R=p.getterFor;e.exports={getConstructor:function(e,t,n,u){var h=e((function(e,i){a(e,d),f(e,{type:t,index:r(null),first:void 0,last:void 0,size:0}),m||(e.size=0),l(i)||c(i,e[u],{that:e,AS_ENTRIES:n})})),d=h.prototype,p=R(t),y=function(e,t,n){var r,i,s=p(e),o=M(e,t);return o?o.value=n:(s.last=o={index:i=g(t,!0),key:t,value:n,previous:r=s.last,next:void 0,removed:!1},s.first||(s.first=o),r&&(r.next=o),m?s.size++:e.size++,"F"!==i&&(s.index[i]=o)),e},M=function(e,t){var n,r=p(e),i=g(t);if("F"!==i)return r.index[i];for(n=r.first;n;n=n.next)if(n.key===t)return n};return s(d,{clear:function(){var e=this,t=p(e),n=t.first;while(n)n.removed=!0,n.previous&&(n.previous=n.previous.next=void 0),n=n.next;t.first=t.last=void 0,t.index=r(null),m?t.size=0:e.size=0},delete:function(e){var t=this,n=p(t),r=M(t,e);if(r){var i=r.next,s=r.previous;delete n.index[r.index],r.removed=!0,s&&(s.next=i),i&&(i.previous=s),n.first===r&&(n.first=i),n.last===r&&(n.last=s),m?n.size--:t.size--}return!!r},forEach:function(e){var t,n=p(this),r=o(e,arguments.length>1?arguments[1]:void 0);while(t=t?t.next:n.first){r(t.value,t.key,this);while(t&&t.removed)t=t.previous}},has:function(e){return!!M(this,e)}}),s(d,n?{get:function(e){var t=M(this,e);return t&&t.value},set:function(e,t){return y(this,0===e?0:e,t)}}:{add:function(e){return y(this,e=0===e?0:e,e)}}),m&&i(d,"size",{configurable:!0,get:function(){return p(this).size}}),h},setStrong:function(e,t,n){var r=t+" Iterator",i=R(t),s=R(r);u(e,t,(function(e,t){f(this,{type:r,target:e,state:i(e),kind:t,last:void 0})}),(function(){var e=s(this),t=e.kind,n=e.last;while(n&&n.removed)n=n.previous;return e.target&&(e.last=n=n?n.next:e.state.first)?h("keys"===t?n.key:"values"===t?n.value:[n.key,n.value],!1):(e.target=void 0,h(void 0,!0))}),n?"entries":"values",!n,!0),d(t)}}},"65db":function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
  132. //! moment.js locale configuration
  133. var t=e.defineLocale("eo",{months:"januaro_februaro_marto_aprilo_majo_junio_julio_aŭgusto_septembro_oktobro_novembro_decembro".split("_"),monthsShort:"jan_feb_mart_apr_maj_jun_jul_aŭg_sept_okt_nov_dec".split("_"),weekdays:"dimanĉo_lundo_mardo_merkredo_ĵaŭdo_vendredo_sabato".split("_"),weekdaysShort:"dim_lun_mard_merk_ĵaŭ_ven_sab".split("_"),weekdaysMin:"di_lu_ma_me_ĵa_ve_sa".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY-MM-DD",LL:"[la] D[-an de] MMMM, YYYY",LLL:"[la] D[-an de] MMMM, YYYY HH:mm",LLLL:"dddd[n], [la] D[-an de] MMMM, YYYY HH:mm",llll:"ddd, [la] D[-an de] MMM, YYYY HH:mm"},meridiemParse:/[ap]\.t\.m/i,isPM:function(e){return"p"===e.charAt(0).toLowerCase()},meridiem:function(e,t,n){return e>11?n?"p.t.m.":"P.T.M.":n?"a.t.m.":"A.T.M."},calendar:{sameDay:"[Hodiaŭ je] LT",nextDay:"[Morgaŭ je] LT",nextWeek:"dddd[n je] LT",lastDay:"[Hieraŭ je] LT",lastWeek:"[pasintan] dddd[n je] LT",sameElse:"L"},relativeTime:{future:"post %s",past:"antaŭ %s",s:"kelkaj sekundoj",ss:"%d sekundoj",m:"unu minuto",mm:"%d minutoj",h:"unu horo",hh:"%d horoj",d:"unu tago",dd:"%d tagoj",M:"unu monato",MM:"%d monatoj",y:"unu jaro",yy:"%d jaroj"},dayOfMonthOrdinalParse:/\d{1,2}a/,ordinal:"%da",week:{dow:1,doy:7}});return t}))},6784:function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
  134. //! moment.js locale configuration
  135. var t=["جنوري","فيبروري","مارچ","اپريل","مئي","جون","جولاءِ","آگسٽ","سيپٽمبر","آڪٽوبر","نومبر","ڊسمبر"],n=["آچر","سومر","اڱارو","اربع","خميس","جمع","ڇنڇر"],r=e.defineLocale("sd",{months:t,monthsShort:t,weekdays:n,weekdaysShort:n,weekdaysMin:n,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd، D MMMM YYYY HH:mm"},meridiemParse:/صبح|شام/,isPM:function(e){return"شام"===e},meridiem:function(e,t,n){return e<12?"صبح":"شام"},calendar:{sameDay:"[اڄ] LT",nextDay:"[سڀاڻي] LT",nextWeek:"dddd [اڳين هفتي تي] LT",lastDay:"[ڪالهه] LT",lastWeek:"[گزريل هفتي] dddd [تي] LT",sameElse:"L"},relativeTime:{future:"%s پوء",past:"%s اڳ",s:"چند سيڪنڊ",ss:"%d سيڪنڊ",m:"هڪ منٽ",mm:"%d منٽ",h:"هڪ ڪلاڪ",hh:"%d ڪلاڪ",d:"هڪ ڏينهن",dd:"%d ڏينهن",M:"هڪ مهينو",MM:"%d مهينا",y:"هڪ سال",yy:"%d سال"},preparse:function(e){return e.replace(/،/g,",")},postformat:function(e){return e.replace(/,/g,"،")},week:{dow:1,doy:4}});return r}))},"67a8":function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n("81ea");function i(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];const s=Object(r["arrayReduce"])(e,(e,t,r)=>{const i=t.replace(/\r?\n\s*/g,""),s=n[r]?n[r]:"";return e+i+s},"");return s.trim()}},6887:function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
  136. //! moment.js locale configuration
  137. function t(e,t,n){var r={mm:"munutenn",MM:"miz",dd:"devezh"};return e+" "+i(r[n],e)}function n(e){switch(r(e)){case 1:case 3:case 4:case 5:case 9:return e+" bloaz";default:return e+" vloaz"}}function r(e){return e>9?r(e%10):e}function i(e,t){return 2===t?s(e):e}function s(e){var t={m:"v",b:"v",d:"z"};return void 0===t[e.charAt(0)]?e:t[e.charAt(0)]+e.substring(1)}var o=[/^gen/i,/^c[ʼ\']hwe/i,/^meu/i,/^ebr/i,/^mae/i,/^(mez|eve)/i,/^gou/i,/^eos/i,/^gwe/i,/^her/i,/^du/i,/^ker/i],a=/^(genver|c[ʼ\']hwevrer|meurzh|ebrel|mae|mezheven|gouere|eost|gwengolo|here|du|kerzu|gen|c[ʼ\']hwe|meu|ebr|mae|eve|gou|eos|gwe|her|du|ker)/i,l=/^(genver|c[ʼ\']hwevrer|meurzh|ebrel|mae|mezheven|gouere|eost|gwengolo|here|du|kerzu)/i,c=/^(gen|c[ʼ\']hwe|meu|ebr|mae|eve|gou|eos|gwe|her|du|ker)/i,u=[/^sul/i,/^lun/i,/^meurzh/i,/^merc[ʼ\']her/i,/^yaou/i,/^gwener/i,/^sadorn/i],h=[/^Sul/i,/^Lun/i,/^Meu/i,/^Mer/i,/^Yao/i,/^Gwe/i,/^Sad/i],d=[/^Su/i,/^Lu/i,/^Me([^r]|$)/i,/^Mer/i,/^Ya/i,/^Gw/i,/^Sa/i],m=e.defineLocale("br",{months:"Genver_Cʼhwevrer_Meurzh_Ebrel_Mae_Mezheven_Gouere_Eost_Gwengolo_Here_Du_Kerzu".split("_"),monthsShort:"Gen_Cʼhwe_Meu_Ebr_Mae_Eve_Gou_Eos_Gwe_Her_Du_Ker".split("_"),weekdays:"Sul_Lun_Meurzh_Mercʼher_Yaou_Gwener_Sadorn".split("_"),weekdaysShort:"Sul_Lun_Meu_Mer_Yao_Gwe_Sad".split("_"),weekdaysMin:"Su_Lu_Me_Mer_Ya_Gw_Sa".split("_"),weekdaysParse:d,fullWeekdaysParse:u,shortWeekdaysParse:h,minWeekdaysParse:d,monthsRegex:a,monthsShortRegex:a,monthsStrictRegex:l,monthsShortStrictRegex:c,monthsParse:o,longMonthsParse:o,shortMonthsParse:o,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D [a viz] MMMM YYYY",LLL:"D [a viz] MMMM YYYY HH:mm",LLLL:"dddd, D [a viz] MMMM YYYY HH:mm"},calendar:{sameDay:"[Hiziv da] LT",nextDay:"[Warcʼhoazh da] LT",nextWeek:"dddd [da] LT",lastDay:"[Decʼh da] LT",lastWeek:"dddd [paset da] LT",sameElse:"L"},relativeTime:{future:"a-benn %s",past:"%s ʼzo",s:"un nebeud segondennoù",ss:"%d eilenn",m:"ur vunutenn",mm:t,h:"un eur",hh:"%d eur",d:"un devezh",dd:t,M:"ur miz",MM:t,y:"ur bloaz",yy:n},dayOfMonthOrdinalParse:/\d{1,2}(añ|vet)/,ordinal:function(e){var t=1===e?"añ":"vet";return e+t},week:{dow:1,doy:4},meridiemParse:/a.m.|g.m./,isPM:function(e){return"g.m."===e},meridiem:function(e,t,n){return e<12?"a.m.":"g.m."}});return m}))},"688b":function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
  138. //! moment.js locale configuration
  139. var t=e.defineLocale("mi",{months:"Kohi-tāte_Hui-tanguru_Poutū-te-rangi_Paenga-whāwhā_Haratua_Pipiri_Hōngoingoi_Here-turi-kōkā_Mahuru_Whiringa-ā-nuku_Whiringa-ā-rangi_Hakihea".split("_"),monthsShort:"Kohi_Hui_Pou_Pae_Hara_Pipi_Hōngoi_Here_Mahu_Whi-nu_Whi-ra_Haki".split("_"),monthsRegex:/(?:['a-z\u0101\u014D\u016B]+\-?){1,3}/i,monthsStrictRegex:/(?:['a-z\u0101\u014D\u016B]+\-?){1,3}/i,monthsShortRegex:/(?:['a-z\u0101\u014D\u016B]+\-?){1,3}/i,monthsShortStrictRegex:/(?:['a-z\u0101\u014D\u016B]+\-?){1,2}/i,weekdays:"Rātapu_Mane_Tūrei_Wenerei_Tāite_Paraire_Hātarei".split("_"),weekdaysShort:"Ta_Ma_Tū_We_Tāi_Pa_Hā".split("_"),weekdaysMin:"Ta_Ma_Tū_We_Tāi_Pa_Hā".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY [i] HH:mm",LLLL:"dddd, D MMMM YYYY [i] HH:mm"},calendar:{sameDay:"[i teie mahana, i] LT",nextDay:"[apopo i] LT",nextWeek:"dddd [i] LT",lastDay:"[inanahi i] LT",lastWeek:"dddd [whakamutunga i] LT",sameElse:"L"},relativeTime:{future:"i roto i %s",past:"%s i mua",s:"te hēkona ruarua",ss:"%d hēkona",m:"he meneti",mm:"%d meneti",h:"te haora",hh:"%d haora",d:"he ra",dd:"%d ra",M:"he marama",MM:"%d marama",y:"he tau",yy:"%d tau"},dayOfMonthOrdinalParse:/\d{1,2}º/,ordinal:"%dº",week:{dow:1,doy:4}});return t}))},"68df":function(e,t,n){"use strict";var r=n("dc19"),i=n("8e16"),s=n("384f"),o=n("7f65");e.exports=function(e){var t=r(this),n=o(e);return!(i(t)>n.size)&&!1!==s(t,(function(e){if(!n.includes(e))return!1}),!0)}},6906:function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));n("d9e2");var r=n("97b9");const i=e=>`The id '${e}' is already declared in a map.`;function s(){let{errorIdExists:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=new Map;function n(n,r){if(u(n))throw new Error(e(n));t.set(n,r)}function s(e){return t.delete(e)}function o(){t.clear()}function a(e){const[t]=c().find(t=>{let[n,r]=t;return e===r&&n})||[null];return t}function l(e){return t.get(e)}function c(){return[...t]}function u(e){return t.has(e)}return e=Object(r["isFunction"])(e)?e:i,{addItem:n,clear:o,getId:a,getItem:l,getItems:c,hasItem:u,removeItem:s}}},6909:function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
  140. //! moment.js locale configuration
  141. var t=e.defineLocale("mk",{months:"јануари_февруари_март_април_мај_јуни_јули_август_септември_октомври_ноември_декември".split("_"),monthsShort:"јан_фев_мар_апр_мај_јун_јул_авг_сеп_окт_ное_дек".split("_"),weekdays:"недела_понеделник_вторник_среда_четврток_петок_сабота".split("_"),weekdaysShort:"нед_пон_вто_сре_чет_пет_саб".split("_"),weekdaysMin:"нe_пo_вт_ср_че_пе_сa".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"D.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY H:mm",LLLL:"dddd, D MMMM YYYY H:mm"},calendar:{sameDay:"[Денес во] LT",nextDay:"[Утре во] LT",nextWeek:"[Во] dddd [во] LT",lastDay:"[Вчера во] LT",lastWeek:function(){switch(this.day()){case 0:case 3:case 6:return"[Изминатата] dddd [во] LT";case 1:case 2:case 4:case 5:return"[Изминатиот] dddd [во] LT"}},sameElse:"L"},relativeTime:{future:"за %s",past:"пред %s",s:"неколку секунди",ss:"%d секунди",m:"една минута",mm:"%d минути",h:"еден час",hh:"%d часа",d:"еден ден",dd:"%d дена",M:"еден месец",MM:"%d месеци",y:"една година",yy:"%d години"},dayOfMonthOrdinalParse:/\d{1,2}-(ев|ен|ти|ви|ри|ми)/,ordinal:function(e){var t=e%10,n=e%100;return 0===e?e+"-ев":0===n?e+"-ен":n>10&&n<20?e+"-ти":1===t?e+"-ви":2===t?e+"-ри":7===t||8===t?e+"-ми":e+"-ти"},week:{dow:1,doy:7}});return t}))},"6ce3":function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
  142. //! moment.js locale configuration
  143. var t=e.defineLocale("nb",{months:"januar_februar_mars_april_mai_juni_juli_august_september_oktober_november_desember".split("_"),monthsShort:"jan._feb._mars_apr._mai_juni_juli_aug._sep._okt._nov._des.".split("_"),monthsParseExact:!0,weekdays:"søndag_mandag_tirsdag_onsdag_torsdag_fredag_lørdag".split("_"),weekdaysShort:"sø._ma._ti._on._to._fr._lø.".split("_"),weekdaysMin:"sø_ma_ti_on_to_fr_lø".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY [kl.] HH:mm",LLLL:"dddd D. MMMM YYYY [kl.] HH:mm"},calendar:{sameDay:"[i dag kl.] LT",nextDay:"[i morgen kl.] LT",nextWeek:"dddd [kl.] LT",lastDay:"[i går kl.] LT",lastWeek:"[forrige] dddd [kl.] LT",sameElse:"L"},relativeTime:{future:"om %s",past:"%s siden",s:"noen sekunder",ss:"%d sekunder",m:"ett minutt",mm:"%d minutter",h:"én time",hh:"%d timer",d:"én dag",dd:"%d dager",w:"én uke",ww:"%d uker",M:"én måned",MM:"%d måneder",y:"ett år",yy:"%d år"},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}});return t}))},"6d79":function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
  144. //! moment.js locale configuration
  145. var t={0:"-ші",1:"-ші",2:"-ші",3:"-ші",4:"-ші",5:"-ші",6:"-шы",7:"-ші",8:"-ші",9:"-шы",10:"-шы",20:"-шы",30:"-шы",40:"-шы",50:"-ші",60:"-шы",70:"-ші",80:"-ші",90:"-шы",100:"-ші"},n=e.defineLocale("kk",{months:"қаңтар_ақпан_наурыз_сәуір_мамыр_маусым_шілде_тамыз_қыркүйек_қазан_қараша_желтоқсан".split("_"),monthsShort:"қаң_ақп_нау_сәу_мам_мау_шіл_там_қыр_қаз_қар_жел".split("_"),weekdays:"жексенбі_дүйсенбі_сейсенбі_сәрсенбі_бейсенбі_жұма_сенбі".split("_"),weekdaysShort:"жек_дүй_сей_сәр_бей_жұм_сен".split("_"),weekdaysMin:"жк_дй_сй_ср_бй_жм_сн".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Бүгін сағат] LT",nextDay:"[Ертең сағат] LT",nextWeek:"dddd [сағат] LT",lastDay:"[Кеше сағат] LT",lastWeek:"[Өткен аптаның] dddd [сағат] LT",sameElse:"L"},relativeTime:{future:"%s ішінде",past:"%s бұрын",s:"бірнеше секунд",ss:"%d секунд",m:"бір минут",mm:"%d минут",h:"бір сағат",hh:"%d сағат",d:"бір күн",dd:"%d күн",M:"бір ай",MM:"%d ай",y:"бір жыл",yy:"%d жыл"},dayOfMonthOrdinalParse:/\d{1,2}-(ші|шы)/,ordinal:function(e){var n=e%10,r=e>=100?100:null;return e+(t[e]||t[n]||t[r])},week:{dow:1,doy:7}});return n}))},"6d83":function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
  146. //! moment.js locale configuration
  147. var t=e.defineLocale("ar-tn",{months:"جانفي_فيفري_مارس_أفريل_ماي_جوان_جويلية_أوت_سبتمبر_أكتوبر_نوفمبر_ديسمبر".split("_"),monthsShort:"جانفي_فيفري_مارس_أفريل_ماي_جوان_جويلية_أوت_سبتمبر_أكتوبر_نوفمبر_ديسمبر".split("_"),weekdays:"الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت".split("_"),weekdaysShort:"أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت".split("_"),weekdaysMin:"ح_ن_ث_ر_خ_ج_س".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[اليوم على الساعة] LT",nextDay:"[غدا على الساعة] LT",nextWeek:"dddd [على الساعة] LT",lastDay:"[أمس على الساعة] LT",lastWeek:"dddd [على الساعة] LT",sameElse:"L"},relativeTime:{future:"في %s",past:"منذ %s",s:"ثوان",ss:"%d ثانية",m:"دقيقة",mm:"%d دقائق",h:"ساعة",hh:"%d ساعات",d:"يوم",dd:"%d أيام",M:"شهر",MM:"%d أشهر",y:"سنة",yy:"%d سنوات"},week:{dow:1,doy:4}});return t}))},"6e98":function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
  148. //! moment.js locale configuration
  149. var t=e.defineLocale("it",{months:"gennaio_febbraio_marzo_aprile_maggio_giugno_luglio_agosto_settembre_ottobre_novembre_dicembre".split("_"),monthsShort:"gen_feb_mar_apr_mag_giu_lug_ago_set_ott_nov_dic".split("_"),weekdays:"domenica_lunedì_martedì_mercoledì_giovedì_venerdì_sabato".split("_"),weekdaysShort:"dom_lun_mar_mer_gio_ven_sab".split("_"),weekdaysMin:"do_lu_ma_me_gi_ve_sa".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:function(){return"[Oggi a"+(this.hours()>1?"lle ":0===this.hours()?" ":"ll'")+"]LT"},nextDay:function(){return"[Domani a"+(this.hours()>1?"lle ":0===this.hours()?" ":"ll'")+"]LT"},nextWeek:function(){return"dddd [a"+(this.hours()>1?"lle ":0===this.hours()?" ":"ll'")+"]LT"},lastDay:function(){return"[Ieri a"+(this.hours()>1?"lle ":0===this.hours()?" ":"ll'")+"]LT"},lastWeek:function(){switch(this.day()){case 0:return"[La scorsa] dddd [a"+(this.hours()>1?"lle ":0===this.hours()?" ":"ll'")+"]LT";default:return"[Lo scorso] dddd [a"+(this.hours()>1?"lle ":0===this.hours()?" ":"ll'")+"]LT"}},sameElse:"L"},relativeTime:{future:"tra %s",past:"%s fa",s:"alcuni secondi",ss:"%d secondi",m:"un minuto",mm:"%d minuti",h:"un'ora",hh:"%d ore",d:"un giorno",dd:"%d giorni",w:"una settimana",ww:"%d settimane",M:"un mese",MM:"%d mesi",y:"un anno",yy:"%d anni"},dayOfMonthOrdinalParse:/\d{1,2}º/,ordinal:"%dº",week:{dow:1,doy:4}});return t}))},"6f12":function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
  150. //! moment.js locale configuration
  151. var t=e.defineLocale("it-ch",{months:"gennaio_febbraio_marzo_aprile_maggio_giugno_luglio_agosto_settembre_ottobre_novembre_dicembre".split("_"),monthsShort:"gen_feb_mar_apr_mag_giu_lug_ago_set_ott_nov_dic".split("_"),weekdays:"domenica_lunedì_martedì_mercoledì_giovedì_venerdì_sabato".split("_"),weekdaysShort:"dom_lun_mar_mer_gio_ven_sab".split("_"),weekdaysMin:"do_lu_ma_me_gi_ve_sa".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[Oggi alle] LT",nextDay:"[Domani alle] LT",nextWeek:"dddd [alle] LT",lastDay:"[Ieri alle] LT",lastWeek:function(){switch(this.day()){case 0:return"[la scorsa] dddd [alle] LT";default:return"[lo scorso] dddd [alle] LT"}},sameElse:"L"},relativeTime:{future:function(e){return(/^[0-9].+$/.test(e)?"tra":"in")+" "+e},past:"%s fa",s:"alcuni secondi",ss:"%d secondi",m:"un minuto",mm:"%d minuti",h:"un'ora",hh:"%d ore",d:"un giorno",dd:"%d giorni",M:"un mese",MM:"%d mesi",y:"un anno",yy:"%d anni"},dayOfMonthOrdinalParse:/\d{1,2}º/,ordinal:"%dº",week:{dow:1,doy:4}});return t}))},"6f48":function(e,t,n){"use strict";var r=n("6d61"),i=n("6566");r("Map",(function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}}),i)},"6f50":function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
  152. //! moment.js locale configuration
  153. var t=e.defineLocale("en-nz",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY h:mm A",LLLL:"dddd, D MMMM YYYY h:mm A"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(e){var t=e%10,n=1===~~(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th";return e+n},week:{dow:1,doy:4}});return t}))},7118:function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
  154. //! moment.js locale configuration
  155. var t="jan._feb._mrt._apr._mai_jun._jul._aug._sep._okt._nov._des.".split("_"),n="jan_feb_mrt_apr_mai_jun_jul_aug_sep_okt_nov_des".split("_"),r=e.defineLocale("fy",{months:"jannewaris_febrewaris_maart_april_maaie_juny_july_augustus_septimber_oktober_novimber_desimber".split("_"),monthsShort:function(e,r){return e?/-MMM-/.test(r)?n[e.month()]:t[e.month()]:t},monthsParseExact:!0,weekdays:"snein_moandei_tiisdei_woansdei_tongersdei_freed_sneon".split("_"),weekdaysShort:"si._mo._ti._wo._to._fr._so.".split("_"),weekdaysMin:"Si_Mo_Ti_Wo_To_Fr_So".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD-MM-YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[hjoed om] LT",nextDay:"[moarn om] LT",nextWeek:"dddd [om] LT",lastDay:"[juster om] LT",lastWeek:"[ôfrûne] dddd [om] LT",sameElse:"L"},relativeTime:{future:"oer %s",past:"%s lyn",s:"in pear sekonden",ss:"%d sekonden",m:"ien minút",mm:"%d minuten",h:"ien oere",hh:"%d oeren",d:"ien dei",dd:"%d dagen",M:"ien moanne",MM:"%d moannen",y:"ien jier",yy:"%d jierren"},dayOfMonthOrdinalParse:/\d{1,2}(ste|de)/,ordinal:function(e){return e+(1===e||8===e||e>=20?"ste":"de")},week:{dow:1,doy:4}});return r}))},"72c3":function(e,t,n){"use strict";var r=n("23e7"),i=n("e9bc"),s=n("dad2");r({target:"Set",proto:!0,real:!0,forced:!s("union")},{union:i})},7333:function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
  156. //! moment.js locale configuration
  157. var t=e.defineLocale("en-il",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(e){var t=e%10,n=1===~~(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th";return e+n}});return t}))},"73d9":function(e,t,n){"use strict";var r=n("44d2");r("flatMap")},"74dc":function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
  158. //! moment.js locale configuration
  159. var t=e.defineLocale("sw",{months:"Januari_Februari_Machi_Aprili_Mei_Juni_Julai_Agosti_Septemba_Oktoba_Novemba_Desemba".split("_"),monthsShort:"Jan_Feb_Mac_Apr_Mei_Jun_Jul_Ago_Sep_Okt_Nov_Des".split("_"),weekdays:"Jumapili_Jumatatu_Jumanne_Jumatano_Alhamisi_Ijumaa_Jumamosi".split("_"),weekdaysShort:"Jpl_Jtat_Jnne_Jtan_Alh_Ijm_Jmos".split("_"),weekdaysMin:"J2_J3_J4_J5_Al_Ij_J1".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"hh:mm A",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[leo saa] LT",nextDay:"[kesho saa] LT",nextWeek:"[wiki ijayo] dddd [saat] LT",lastDay:"[jana] LT",lastWeek:"[wiki iliyopita] dddd [saat] LT",sameElse:"L"},relativeTime:{future:"%s baadaye",past:"tokea %s",s:"hivi punde",ss:"sekunde %d",m:"dakika moja",mm:"dakika %d",h:"saa limoja",hh:"masaa %d",d:"siku moja",dd:"siku %d",M:"mwezi mmoja",MM:"miezi %d",y:"mwaka mmoja",yy:"miaka %d"},week:{dow:1,doy:7}});return t}))},7558:function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
  160. //! moment.js locale configuration
  161. function t(e,t,n,r){var i={s:["çend sanîye","çend sanîyeyan"],ss:[e+" sanîye",e+" sanîyeyan"],m:["deqîqeyek","deqîqeyekê"],mm:[e+" deqîqe",e+" deqîqeyan"],h:["saetek","saetekê"],hh:[e+" saet",e+" saetan"],d:["rojek","rojekê"],dd:[e+" roj",e+" rojan"],w:["hefteyek","hefteyekê"],ww:[e+" hefte",e+" hefteyan"],M:["mehek","mehekê"],MM:[e+" meh",e+" mehan"],y:["salek","salekê"],yy:[e+" sal",e+" salan"]};return t?i[n][0]:i[n][1]}function n(e){e=""+e;var t=e.substring(e.length-1),n=e.length>1?e.substring(e.length-2):"";return 12==n||13==n||"2"!=t&&"3"!=t&&"50"!=n&&"70"!=t&&"80"!=t?"ê":"yê"}var r=e.defineLocale("ku-kmr",{months:"Rêbendan_Sibat_Adar_Nîsan_Gulan_Hezîran_Tîrmeh_Tebax_Îlon_Cotmeh_Mijdar_Berfanbar".split("_"),monthsShort:"Rêb_Sib_Ada_Nîs_Gul_Hez_Tîr_Teb_Îlo_Cot_Mij_Ber".split("_"),monthsParseExact:!0,weekdays:"Yekşem_Duşem_Sêşem_Çarşem_Pêncşem_În_Şemî".split("_"),weekdaysShort:"Yek_Du_Sê_Çar_Pên_În_Şem".split("_"),weekdaysMin:"Ye_Du_Sê_Ça_Pê_În_Şe".split("_"),meridiem:function(e,t,n){return e<12?n?"bn":"BN":n?"pn":"PN"},meridiemParse:/bn|BN|pn|PN/,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"Do MMMM[a] YYYY[an]",LLL:"Do MMMM[a] YYYY[an] HH:mm",LLLL:"dddd, Do MMMM[a] YYYY[an] HH:mm",ll:"Do MMM[.] YYYY[an]",lll:"Do MMM[.] YYYY[an] HH:mm",llll:"ddd[.], Do MMM[.] YYYY[an] HH:mm"},calendar:{sameDay:"[Îro di saet] LT [de]",nextDay:"[Sibê di saet] LT [de]",nextWeek:"dddd [di saet] LT [de]",lastDay:"[Duh di saet] LT [de]",lastWeek:"dddd[a borî di saet] LT [de]",sameElse:"L"},relativeTime:{future:"di %s de",past:"berî %s",s:t,ss:t,m:t,mm:t,h:t,hh:t,d:t,dd:t,w:t,ww:t,M:t,MM:t,y:t,yy:t},dayOfMonthOrdinalParse:/\d{1,2}(?:yê|ê|\.)/,ordinal:function(e,t){var r=t.toLowerCase();return r.includes("w")||r.includes("m")?e+".":e+n(e)},week:{dow:1,doy:4}});return r}))},"76ab":function(e,t,n){"use strict";n.d(t,"d",(function(){return m})),n.d(t,"a",(function(){return d})),n.d(t,"c",(function(){return c})),n.d(t,"b",(function(){return u}));n("d9e2");var r=n("9acd"),i=n("491c"),s=n("3d76"),o=n("169f");const{register:a,getItem:l,hasItem:c,getNames:u,getValues:h}=Object(r["a"])("cellTypes");function d(e){if(!c(e))throw Error(`You declared cell type "${e}" as a string that is not mapped to a known object.\n Cell type must be an object or a string mapped to an object registered by\n "Handsontable.cellTypes.registerCellType" method`);return l(e)}function m(e,t){"string"!==typeof e&&(t=e,e=t.CELL_TYPE);const{editor:n,renderer:r,validator:l}=t;n&&Object(i["e"])(e,n),r&&Object(s["d"])(e,r),l&&Object(o["d"])(e,l),a(e,t)}},"77aa":function(e,t,n){"use strict";function r(e){return e&&0===e.length}function i(e){return void 0===e||null===e?[]:Object.keys(e)}function s(e){for(var t=[],n=Object.keys(e),r=0;r<n.length;r++)t.push(e[n[r]]);return t}function o(e,t){for(var n=[],r=i(e),s=0;s<r.length;s++){var o=r[s];n.push(t.call(null,e[o],o))}return n}function a(e,t){for(var n=[],r=0;r<e.length;r++)n.push(t.call(null,e[r],r));return n}function l(e){for(var t=[],n=0;n<e.length;n++){var r=e[n];Array.isArray(r)?t=t.concat(l(r)):t.push(r)}return t}function c(e){return r(e)?void 0:e[0]}function u(e){var t=e&&e.length;return t?e[t-1]:void 0}function h(e,t){if(Array.isArray(e))for(var n=0;n<e.length;n++)t.call(null,e[n],n);else{if(!P(e))throw Error("non exhaustive match");var r=i(e);for(n=0;n<r.length;n++){var s=r[n],o=e[s];t.call(null,o,s)}}}function d(e){return"string"===typeof e}function m(e){return void 0===e}function g(e){return e instanceof Function}function p(e,t){return void 0===t&&(t=1),e.slice(t,e.length)}function f(e,t){return void 0===t&&(t=1),e.slice(0,e.length-t)}function R(e,t){var n=[];if(Array.isArray(e))for(var r=0;r<e.length;r++){var i=e[r];t.call(null,i)&&n.push(i)}return n}function y(e,t){return R(e,(function(e){return!t(e)}))}function M(e,t){for(var n=Object.keys(e),r={},i=0;i<n.length;i++){var s=n[i],o=e[s];t(o)&&(r[s]=o)}return r}function S(e,t){return!!P(e)&&e.hasOwnProperty(t)}function b(e,t){return void 0!==O(e,(function(e){return e===t}))}function w(e){for(var t=[],n=0;n<e.length;n++)t.push(e[n]);return t}function T(e){var t={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t}function O(e,t){for(var n=0;n<e.length;n++){var r=e[n];if(t.call(null,r))return r}}function v(e,t){for(var n=[],r=0;r<e.length;r++){var i=e[r];t.call(null,i)&&n.push(i)}return n}function E(e,t,n){for(var r=Array.isArray(e),o=r?e:s(e),a=r?[]:i(e),l=n,c=0;c<o.length;c++)l=t.call(null,l,o[c],r?c:a[c]);return l}function C(e){return y(e,(function(e){return null===e||void 0===e}))}function L(e,t){void 0===t&&(t=function(e){return e});var n=[];return E(e,(function(e,r){var i=t(r);return b(n,i)?e:(n.push(i),e.concat(r))}),[])}function N(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];var r=[null],i=r.concat(t);return Function.bind.apply(e,i)}function _(e){return Array.isArray(e)}function I(e){return e instanceof RegExp}function P(e){return e instanceof Object}function x(e,t){for(var n=0;n<e.length;n++)if(!t(e[n],n))return!1;return!0}function D(e,t){return y(e,(function(e){return b(t,e)}))}function A(e,t){for(var n=0;n<e.length;n++)if(t(e[n]))return!0;return!1}function F(e,t){for(var n=0;n<e.length;n++)if(e[n]===t)return n;return-1}function Y(e,t){var n=w(e);return n.sort((function(e,n){return t(e)-t(n)})),n}function H(e,t){if(e.length!==t.length)throw Error("can't zipObject with different number of keys and values!");for(var n={},r=0;r<e.length;r++)n[e[r]]=t[r];return n}function k(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];for(var r=0;r<t.length;r++)for(var s=t[r],o=i(s),a=0;a<o.length;a++){var l=o[a];e[l]=s[l]}return e}function V(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];for(var r=0;r<t.length;r++){var s=t[r];if(!m(s))for(var o=i(s),a=0;a<o.length;a++){var l=o[a];S(e,l)||(e[l]=s[l])}}return e}function U(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return V.apply(null,[{}].concat(e))}function W(e,t){var n={};return h(e,(function(e){var r=t(e),i=n[r];i?i.push(e):n[r]=[e]})),n}function X(e,t){for(var n=T(e),r=i(t),s=0;s<r.length;s++){var o=r[s],a=t[o];n[o]=a}return n}function j(){}function Z(e){return e}function Q(e){for(var t=[],n=0;n<e.length;n++){var r=e[n];t.push(void 0!==r?r:void 0)}return t}function K(e){console&&console.error&&console.error("Error: "+e)}function G(e){console&&console.warn&&console.warn("Warning: "+e)}function B(){return"function"===typeof Map}function J(e,t){t.forEach((function(t){var n=t.prototype;Object.getOwnPropertyNames(n).forEach((function(r){if("constructor"!==r){var i=Object.getOwnPropertyDescriptor(n,r);i&&(i.get||i.set)?Object.defineProperty(e.prototype,r,i):e.prototype[r]=t.prototype[r]}}))}))}function z(e){function t(){}t.prototype=e;var n=new t;function r(){return typeof n.bar}return r(),r(),e}function $(e){return e[e.length-1]}function q(e){var t=(new Date).getTime(),n=e(),r=(new Date).getTime(),i=r-t;return{time:i,value:n}}n.d(t,"A",(function(){return r})),n.d(t,"G",(function(){return i})),n.d(t,"U",(function(){return s})),n.d(t,"J",(function(){return o})),n.d(t,"I",(function(){return a})),n.d(t,"t",(function(){return l})),n.d(t,"s",(function(){return c})),n.d(t,"H",(function(){return u})),n.d(t,"u",(function(){return h})),n.d(t,"E",(function(){return d})),n.d(t,"F",(function(){return m})),n.d(t,"B",(function(){return g})),n.d(t,"m",(function(){return p})),n.d(t,"n",(function(){return f})),n.d(t,"p",(function(){return R})),n.d(t,"P",(function(){return y})),n.d(t,"N",(function(){return M})),n.d(t,"w",(function(){return S})),n.d(t,"j",(function(){return b})),n.d(t,"g",(function(){return w})),n.d(t,"h",(function(){return T})),n.d(t,"q",(function(){return O})),n.d(t,"r",(function(){return v})),n.d(t,"O",(function(){return E})),n.d(t,"i",(function(){return C})),n.d(t,"T",(function(){return L})),n.d(t,"y",(function(){return _})),n.d(t,"D",(function(){return I})),n.d(t,"C",(function(){return P})),n.d(t,"o",(function(){return x})),n.d(t,"l",(function(){return D})),n.d(t,"Q",(function(){return A})),n.d(t,"x",(function(){return F})),n.d(t,"f",(function(){return k})),n.d(t,"k",(function(){return U})),n.d(t,"v",(function(){return W})),n.d(t,"K",(function(){return X})),n.d(t,"b",(function(){return j})),n.d(t,"a",(function(){return Z})),n.d(t,"L",(function(){return Q})),n.d(t,"c",(function(){return K})),n.d(t,"d",(function(){return G})),n.d(t,"z",(function(){return B})),n.d(t,"e",(function(){return J})),n.d(t,"S",(function(){return z})),n.d(t,"M",(function(){return $})),n.d(t,"R",(function(){return q}))},"79a4":function(e,t,n){"use strict";var r=n("23e7"),i=n("d039"),s=n("953b"),o=n("dad2"),a=!o("intersection")||i((function(){return"3,2"!==String(Array.from(new Set([1,2,3]).intersection(new Set([3,2]))))}));r({target:"Set",proto:!0,real:!0,forced:a},{intersection:s})},"7ae0":function(e,t,n){"use strict";n("14d9");var r=n("351d"),i=n("97b9");const s="localHooks",o={_localHooks:Object.create(null),addLocalHook(e,t){return this._localHooks[e]||(this._localHooks[e]=[]),this._localHooks[e].push(t),this},runLocalHooks(e,t,n,r,s,o,a){if(this._localHooks[e]){const l=this._localHooks[e].length;for(let c=0;c<l;c++)Object(i["fastCall"])(this._localHooks[e][c],this,t,n,r,s,o,a)}},clearLocalHooks(){return this._localHooks={},this}};Object(r["defineGetter"])(o,"MIXIN_NAME",s,{writable:!1,enumerable:!1}),t["a"]=o},"7b9c":function(e,t,n){"use strict";n.r(t),n.d(t,"stringify",(function(){return s})),n.d(t,"isDefined",(function(){return o})),n.d(t,"isUndefined",(function(){return a})),n.d(t,"isEmpty",(function(){return l})),n.d(t,"isRegExp",(function(){return c})),n.d(t,"_injectProductInfo",(function(){return b}));var r=n("c1df"),i=n("67a8");function s(e){let t;switch(typeof e){case"string":case"number":t=""+e;break;case"object":t=null===e?"":e.toString();break;case"undefined":t="";break;default:t=e.toString();break}return t}function o(e){return"undefined"!==typeof e}function a(e){return"undefined"===typeof e}function l(e){return null===e||""===e||a(e)}function c(e){return"[object RegExp]"===Object.prototype.toString.call(e)}const u="length",h=e=>parseInt(e,16),d=e=>parseInt(e,10),m=(e,t,n)=>e["substr"](t,n),g=e=>e["codePointAt"](0)-65,p=e=>(""+e).replace(/\-/g,""),f=e=>h(m(p(e),h("12"),g("F")))/(h(m(p(e),g("B"),~~![][u]))||9),R=()=>"undefined"!==typeof location&&/^([a-z0-9\-]+\.)?\x68\x61\x6E\x64\x73\x6F\x6E\x74\x61\x62\x6C\x65\x2E\x63\x6F\x6D$/i.test(location.host);let y=!1;const M={invalid:()=>i["a"]`
  162. The license key for Handsontable is invalid.\x20
  163. If you need any help, contact us at support@handsontable.com.`,expired:e=>{let{keyValidityDate:t,hotVersion:n}=e;return i["a"]`
  164. The license key for Handsontable expired on ${t}, and is not valid for the installed\x20
  165. version ${n}. Renew your license key at handsontable.com or downgrade to a version released prior\x20
  166. to ${t}. If you need any help, contact us at sales@handsontable.com.`},missing:()=>i["a"]`
  167. The license key for Handsontable is missing. Use your purchased key to activate the product.\x20
  168. Alternatively, you can activate Handsontable to use for non-commercial purposes by\x20
  169. passing the key: 'non-commercial-and-evaluation'. If you need any help, contact\x20
  170. us at support@handsontable.com.`,non_commercial:()=>""},S={invalid:()=>i["a"]`
  171. The license key for Handsontable is invalid.\x20
  172. <a href="https://handsontable.com/docs/tutorial-license-key.html" target="_blank">Read more</a> on how to\x20
  173. install it properly or contact us at <a href="mailto:support@handsontable.com">support@handsontable.com</a>.`,expired:e=>{let{keyValidityDate:t,hotVersion:n}=e;return i["a"]`
  174. The license key for Handsontable expired on ${t}, and is not valid for the installed\x20
  175. version ${n}. <a href="https://handsontable.com/pricing" target="_blank">Renew</a> your\x20
  176. license key or downgrade to a version released prior to ${t}. If you need any\x20
  177. help, contact us at <a href="mailto:sales@handsontable.com">sales@handsontable.com</a>.`},missing:()=>i["a"]`
  178. The license key for Handsontable is missing. Use your purchased key to activate the product.\x20
  179. Alternatively, you can activate Handsontable to use for non-commercial purposes by\x20
  180. passing the key: 'non-commercial-and-evaluation'.\x20
  181. <a href="https://handsontable.com/docs/tutorial-license-key.html" target="_blank">Read more</a> about it in\x20
  182. the documentation or contact us at <a href="mailto:support@handsontable.com">support@handsontable.com</a>.`,non_commercial:()=>""};function b(e,t){const n=!l(e),i="string"===typeof e&&"non-commercial-and-evaluation"===e.toLowerCase(),s="14.6.1";let o,a="invalid",c="invalid";e=p(e||"");const u=w(e);if(n||i||u)if(u){const t=r("17/10/2024","DD/MM/YYYY"),n=Math.floor(t.toDate().getTime()/864e5),i=f(e);o=r(864e5*(i+1),"x").format("MMMM DD, YYYY"),n>i?(a="expired",c="expired"):(a="valid",c="valid")}else i?(a="non_commercial",c="valid"):(a="invalid",c="invalid");else a="missing",c="missing";if(R()&&(a="valid",c="valid"),!y&&"valid"!==a){const e=M[a]({keyValidityDate:o,hotVersion:s});e&&console["non_commercial"===a?"info":"warn"](M[a]({keyValidityDate:o,hotVersion:s})),y=!0}if("valid"!==c&&t.parentNode){const e=S[c]({keyValidityDate:o,hotVersion:s});if(e){const e=document.createElement("div");e.className="hot-display-license-info",e.innerHTML=S[c]({keyValidityDate:o,hotVersion:s}),t.parentNode.insertBefore(e,t.nextSibling)}}}function w(e){let t=[][u],n=t;if(e[u]!==g("Z"))return!1;for(let r="",i="B<H4P+".split(""),s=g(i.shift());s;s=g(i.shift()||"A"))--s<""[u]?n|=(d(""+d(h(r)+(h(m(e,Math.abs(s),2))+[]).padStart(2,"0")))%97||2)>>1:r=m(e,s,s?1===i[u]?9:8:6);return n===t}},"7be6":function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
  183. //! moment.js locale configuration
  184. var t="január_február_marec_apríl_máj_jún_júl_august_september_október_november_december".split("_"),n="jan_feb_mar_apr_máj_jún_júl_aug_sep_okt_nov_dec".split("_");function r(e){return e>1&&e<5}function i(e,t,n,i){var s=e+" ";switch(n){case"s":return t||i?"pár sekúnd":"pár sekundami";case"ss":return t||i?s+(r(e)?"sekundy":"sekúnd"):s+"sekundami";case"m":return t?"minúta":i?"minútu":"minútou";case"mm":return t||i?s+(r(e)?"minúty":"minút"):s+"minútami";case"h":return t?"hodina":i?"hodinu":"hodinou";case"hh":return t||i?s+(r(e)?"hodiny":"hodín"):s+"hodinami";case"d":return t||i?"deň":"dňom";case"dd":return t||i?s+(r(e)?"dni":"dní"):s+"dňami";case"M":return t||i?"mesiac":"mesiacom";case"MM":return t||i?s+(r(e)?"mesiace":"mesiacov"):s+"mesiacmi";case"y":return t||i?"rok":"rokom";case"yy":return t||i?s+(r(e)?"roky":"rokov"):s+"rokmi"}}var s=e.defineLocale("sk",{months:t,monthsShort:n,weekdays:"nedeľa_pondelok_utorok_streda_štvrtok_piatok_sobota".split("_"),weekdaysShort:"ne_po_ut_st_št_pi_so".split("_"),weekdaysMin:"ne_po_ut_st_št_pi_so".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm",LLLL:"dddd D. MMMM YYYY H:mm"},calendar:{sameDay:"[dnes o] LT",nextDay:"[zajtra o] LT",nextWeek:function(){switch(this.day()){case 0:return"[v nedeľu o] LT";case 1:case 2:return"[v] dddd [o] LT";case 3:return"[v stredu o] LT";case 4:return"[vo štvrtok o] LT";case 5:return"[v piatok o] LT";case 6:return"[v sobotu o] LT"}},lastDay:"[včera o] LT",lastWeek:function(){switch(this.day()){case 0:return"[minulú nedeľu o] LT";case 1:case 2:return"[minulý] dddd [o] LT";case 3:return"[minulú stredu o] LT";case 4:case 5:return"[minulý] dddd [o] LT";case 6:return"[minulú sobotu o] LT"}},sameElse:"L"},relativeTime:{future:"za %s",past:"pred %s",s:i,ss:i,m:i,mm:i,h:i,hh:i,d:i,dd:i,M:i,MM:i,y:i,yy:i},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}});return s}))},"7cb9":function(e,t,n){"use strict";n.r(t);var r,i=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"template-textarea"},[1==e.isEdit?[n("div",{staticClass:"editor-area sticky-editor"},[n("CanvasEditor",{key:e.keys,ref:"wordEditor",attrs:{"edit-mode":e.Modetype,"html-data":e.com.content,"doc-json":e.docJson},on:{save:e.save,"is-save":e.getSave}})],1)]:[n("div",{ref:"richEditor",staticClass:"rich-editor",class:{"view-mode":2==e.isEdit},domProps:{innerHTML:e._s(e.content)},on:{click:e.handleImageClick}})],e.loading?n("div",{staticClass:"overlay"},[n("el-progress",{staticClass:"full-width-progress",attrs:{percentage:e.progress}})],1):e._e()],2)},s=[],o=n("ade3"),a=n("4478"),l=n("2909"),c=n("b85c"),u=n("c7eb"),h=n("1da1"),d=(n("d9e2"),n("99af"),n("4de4"),n("a630"),n("caad"),n("a15b"),n("d81d"),n("14d9"),n("b0c0"),n("a9e3"),n("b680"),n("b64b"),n("d3b7"),n("07ac"),n("4d63"),n("c607"),n("ac1f"),n("2c3e"),n("25f0"),n("2532"),n("3ca3"),n("466d"),n("5319"),n("0643"),n("2382"),n("4e3e"),n("a573"),n("159b"),n("ddb0"),n("1c4c")),m=n("bc3a"),g=n.n(m),p=(n("1157"),n("22d6")),f={name:"app",emits:["onUpdate","onUpdateAttr","onUpdateProdAttr"],components:{CanvasEditor:p["a"]},props:{coms:{type:Array,default:function(){return[]}},isEdit:{type:Number,default:2},isAdmin:{type:Number,default:2},currentIndex:{type:Number,default:0},com:{type:Object,default:null},insertCmd:{type:Object,default:null}},watch:{isEdit:{handler:function(e){console.log("isEdit:",e);var t=this;"2"==e?t.save():null!=t.com&&t.replaceData(t.com.content).then((function(e){t.content=e,t.$nextTick((function(){t.bindEvents()}))}))},immediate:!0,deep:!0},com:{handler:function(e){var t=this;return Object(h["a"])(Object(u["a"])().mark((function n(){var r,i;return Object(u["a"])().wrap((function(n){while(1)switch(n.prev=n.next){case 0:if(r=t,null!=e){n.next=3;break}return n.abrupt("return");case 3:if(void 0!=e.content&&null!=e.content){n.next=5;break}return n.abrupt("return");case 5:return n.prev=5,n.next=8,r.replaceData(e.content);case 8:i=n.sent,r.htmlData=i,r.content=i,r.$nextTick((function(){r.bindEvents(),r.initializeInputWidths()})),n.next=17;break;case 14:n.prev=14,n.t0=n["catch"](5),console.error("处理 com 时出错:",n.t0);case 17:case"end":return n.stop()}}),n,null,[[5,14]])})))()},immediate:!0,deep:!0},insertCmd:{handler:function(e){var t=this;null!=e&&1==this.isEdit&&this.$nextTick(Object(h["a"])(Object(u["a"])().mark((function n(){var r,i,s,o,a,l,c,h,d,m,g,p,f,R,y;return Object(u["a"])().wrap((function(n){while(1)switch(n.prev=n.next){case 0:if(n.prev=0,t.$refs.wordEditor){n.next=4;break}return console.warn("编辑器未就绪"),n.abrupt("return");case 4:if(o=t.$refs.wordEditor,a=t.com.content||"",l=e.content,"ProductAttr"!==e.type){n.next=24;break}if(h=null===(c=e.attrs)||void 0===c||null===(c=c.specifications)||void 0===c?void 0:c[0],!h){n.next=24;break}m="".concat(e.id,"_").concat((null===(d=t.com.attrs)||void 0===d?void 0:d.length)||0),g='\n <div class="product-attr-container">\n <div class="spec-label">'.concat(h.psp_name||"规格",':</div>\n <div class="spec-input">\n '),n.t0=h.psp_type,n.next="单选"===n.t0?15:"多选"===n.t0?18:21;break;case 15:return p=h.psp_value?h.psp_value.split(","):[],g+='\n <select \n id="'.concat(m,'" \n data-index="').concat((null===(r=t.com.attrs)||void 0===r?void 0:r.length)||0,'"\n class="text-input-box product-select"\n style="min-width: 120px;"\n >\n <option value="">请选择</option>\n ').concat(p.map((function(e){return'<option value="'.concat(e,'">').concat(e,"</option>")})).join(""),"\n </select>\n "),n.abrupt("break",22);case 18:return f=h.psp_value?h.psp_value.split(","):[],g+='\n <select \n id="'.concat(m,'" \n data-index="').concat((null===(i=t.com.attrs)||void 0===i?void 0:i.length)||0,'"\n class="text-input-box product-select" \n multiple\n style="min-width: 120px;"\n >\n ').concat(f.map((function(e){return'<option value="'.concat(e,'">').concat(e,"</option>")})).join(""),"\n </select>\n "),n.abrupt("break",22);case 21:g+='\n <input \n type="text" \n id="'.concat(m,'" \n data-index="').concat((null===(s=t.com.attrs)||void 0===s?void 0:s.length)||0,'"\n class="text-input-box auto-width" \n value="').concat(h.ps_name||0,'"\n placeholder="请输入').concat(h.psp_name||"",'"\n style="min-width: 120px;"\n >\n ');case 22:g+="\n </div>\n </div>\n ",l=g;case 24:return l.includes("{{")&&l.includes("}}")&&(l=" ".concat(l," ")),o.getSelection?(y=o.getSelection(),R=y?a.substring(0,y.start)+l+a.substring(y.end):a+l):R=a+l,t.com.content=R,o.setHtmlData&&o.setHtmlData(R),t.keys=(new Date).getTime(),n.next=31,t.save({main:R});case 31:t.$nextTick((function(){t.bindProductAttrEvents(),t.$forceUpdate()})),n.next=37;break;case 34:n.prev=34,n.t1=n["catch"](0),console.error("插入内容时出错:",n.t1);case 37:case"end":return n.stop()}}),n,null,[[0,34]])}))))},deep:!0}},data:function(){return{editorUrl:"/ckeditor/ckeditor.js",editorConfig:{language:"zh-cn",height:"650px"},content:"",editor:null,loading:!1,progress:0,isEditing:!1,focusedInputId:null,variableNullInputs:{},Modetype:"edit",htmlData:"",docJson:null,keys:(new Date).getTime()}},mounted:function(){var e=this;this.$nextTick((function(){e.initializeInputWidths(),e.syncContent(),e.bindProductAttrEvents()}))},updated:function(){var e=this;this.$nextTick((function(){"2"==e.isEdit?e.syncContent():e.bindProductAttrEvents()}))},beforeDestroy:function(){var e=this;this.$el.removeEventListener("input",this.handleInputChange),this.$el.removeEventListener("input",this.handleVariableNullInput),this.$el.removeEventListener("blur",this.handleVariableNullBlur,!0);var t=this.$el.querySelectorAll(".text-input-box");t.forEach((function(t){t.removeEventListener("change",e.handleProductAttrChange)}))},methods:(r={save:function(e){var t=e?e.main:this.com.content;return console.log(112),this.com.content=t,this.syncContent(),this.$emit("onUpdate",this.currentIndex,this.com.content),!0},getSave:function(e){console.log("是否已保存:",e)},replaceData:function(e){var t=this;return Object(h["a"])(Object(u["a"])().mark((function n(){var r,i,s,o,h;return Object(u["a"])().wrap((function(n){while(1)switch(n.prev=n.next){case 0:r=t,i={abs:Math.abs,ceil:Math.ceil,floor:Math.floor,max:Math.max,min:Math.min,round:Math.round,sqrt:Math.sqrt,IF:function(e,t,n){return e?t:n}},s=Object(u["a"])().mark((function n(){var s,d,m,g,p,f,R,y,M,S,b,w,T,O,v,E,C,L,N,_,I,P,x,D,A,F,Y,H,k,V;return Object(u["a"])().wrap((function(n){while(1)switch(n.prev=n.next){case 0:if(s=r.com.attrs[h].id,"variable"!=r.com.attrs[h].type){n.next=6;break}if(d=r.com.attrs[h],2==d.data.value_type){for(m=d.data.value_item.split(","),g='<select id="'+s+'" data-index="'+h+'" class="text-input-box">',o=0;o<m.length;o++)d.content==m[o]?g+='<option value="'+m[o]+'" selected>'+m[o]+"</option>":g+='<option value="'+m[o]+'">'+m[o]+"</option>";g+="</select>",e=e.replace("{{"+d.id+"}}",g)}else e=e.replace("{{"+s+"}}",'<input type="text" ref="input_'+s+'" name="'+r.com.attrs[h].name+'" id="'+s+'" data-index="'+h+'" class="text-input-box auto-width" value="'+r.com.attrs[h].content+'">');n.next=66;break;case 6:if("variableNull"!=r.com.attrs[h].type){n.next=12;break}p=r.com.attrs[h],t.variableNullInputs[s]=p.content,e=e.replace("{{"+s+"}}",'<input type="text" ref="input_'+s+'" name="'+p.name+'" id="'+s+'" data-index="'+h+'" data-attr-id="'+s+'" class="text-input-boxs auto-width" value="'+p.content+'">'),n.next=66;break;case 12:if("ProductAttr"!=r.com.attrs[h].type){n.next=42;break}if(y=r.com.attrs[h],M=y.id+"_"+h,console.log("ProductAttr item:",y),console.log("ProductAttr specifications:",null===(f=y.attrs)||void 0===f?void 0:f.specifications),S=null===(R=y.attrs)||void 0===R||null===(R=R.specifications)||void 0===R?void 0:R[0],S){n.next=21;break}return console.warn("No specifications found for ProductAttr:",y),n.abrupt("return",1);case 21:if(b='\n <div class="product-attr-container">\n <div class="spec-label">'.concat(S.psp_name||"规格",':</div>\n <div class="spec-input">\n '),"1"!=t.isEdit){n.next=26;break}b+='<span class="preview-content">'.concat(y.content||"","</span>"),n.next=38;break;case 26:console.log(S.psp_type),n.t0=S.psp_type,n.next="单选"===n.t0?30:"多选"===n.t0?33:37;break;case 30:return w=S.psp_value?S.psp_value.split(","):[],b+='\n <select \n id="'.concat(M,'" \n data-index="').concat(h,'" \n class="text-input-box product-select"\n style="min-width: 120px;"\n >\n <option value="">请选择</option>\n ').concat(w.map((function(e){return'\n <option \n value="'.concat(e,'" \n ').concat(y.content===e?"selected":"","\n >").concat(e,"</option>\n ")})).join(""),"\n </select>\n "),n.abrupt("break",38);case 33:return T=S.psp_value?S.psp_value.split(","):[],O=S.ps_name?S.ps_name.split(","):[],b+='\n <select \n id="'.concat(M,'" \n data-index="').concat(h,'" \n class="text-input-box product-select" \n multiple\n style="min-width: 120px;"\n >\n ').concat(T.map((function(e){return'\n <option \n value="'.concat(e,'" \n ').concat(O.includes(e)?"selected":"","\n >").concat(e,"</option>\n ")})).join(""),"\n </select>\n "),n.abrupt("break",38);case 37:b+='\n <input \n id="'.concat(M,'" \n data-index="').concat(h,'" \n class="text-input-box product-input" \n value="').concat(y.content||0,'"\n placeholder="请输入').concat(S.psp_name||"",'"\n style="min-width: 120px;"\n >\n ');case 38:b+="\n </div>\n </div>\n ",e=e.replace("{{"+y.id+"}}",b),n.next=66;break;case 42:if("formual"!=r.com.attrs[h].type){n.next=58;break}return n.next=45,r.analysisFormual(r.com.attrs[h]);case 45:return v=n.sent,E=r.com.attrs[h].data.point,n.next=49,r.getRemote(v);case 49:if(v=n.sent,C={},L=/\b[a-zA-Z_][a-zA-Z0-9_]*\b/g,N=v.match(L),N){_=Object(c["a"])(N);try{for(_.s();!(I=_.n()).done;)P=I.value,"IF"===P||Object.keys(i).includes(P)||(C[P]="".concat(P))}catch(u){_.e(u)}finally{_.f()}}x=function(e,t){var n=Object(a["a"])(Function,Object(l["a"])(Object.keys(i)).concat(Object(l["a"])(Object.keys(t)),["return ".concat(e)]));return n.apply(void 0,Object(l["a"])(Object.values(i)).concat(Object(l["a"])(Object.values(t))))};try{D=x(v,C),A="number"!==typeof D||isNaN(D)?"boolean"===typeof D?D?"1":"0":String(D):D.toFixed(E),r.com.attrs[h].content=A,e=e.replace("{{"+r.com.attrs[h].id+"}}",A)}catch(U){console.error("处理公式时出错:",U),console.error("错误的公式:",v),r.com.attrs[h].content="计算错误",e=e.replace("{{"+r.com.attrs[h].id+"}}","计算错误")}n.next=66;break;case 58:if("sourceData"!=r.com.attrs[h].type){n.next=65;break}return n.next=61,r.getRemote1(r.com.attrs[h].formula);case 61:F=n.sent,e=e.replace("{{"+s+"}}",F),n.next=66;break;case 65:"Directory"==r.com.attrs[h].type?(Y=r.com.attrs[h].number+". "+r.com.attrs[h].content,H=r.com.attrs[h].level||1,k=r.com.attrs[h].id,V=new RegExp("<div[^>]*>\\s*{{\\s*".concat(k,"\\s*}}\\s*</div>|{{\\s*").concat(k,"\\s*}}"),"g"),e=e.replace(V,(function(e,t,n){var r="h".concat(Math.min(H,6)),i="directory-level-".concat(H);return"<".concat(r,' class="').concat(i,'">').concat(Y,"</").concat(r,">")}))):e=e.replace("{{"+s+"}}",r.com.attrs[h].content);case 66:case"end":return n.stop()}}),n)})),h=0;case 4:if(!(h<r.com.attrs.length)){n.next=11;break}return n.delegateYield(s(),"t0",6);case 6:if(!n.t0){n.next=8;break}return n.abrupt("continue",8);case 8:h++,n.next=4;break;case 11:return t.$nextTick((function(){t.addInputListeners(),t.initializeInputWidths(),t.addVariableNullListeners()})),n.abrupt("return",e);case 13:case"end":return n.stop()}}),n)})))()},addVariableNullListeners:function(){this.$el.addEventListener("input",this.handleVariableNullInput),this.$el.addEventListener("blur",this.handleVariableNullBlur,!0)},handleVariableNullInput:function(e){if(e.target.classList.contains("text-input-boxs")){var t=e.target.dataset.attrId,n=e.target.value;this.$set(this.variableNullInputs,t,n)}},handleVariableNullBlur:function(e){if(e.target.classList.contains("text-input-boxs")){var t=parseInt(e.target.dataset.index,10),n=e.target.dataset.attrId,r=this.variableNullInputs[n];this.updateVariableNullContent(t,n,r,!0)}},updateVariableNullContent:function(e,t,n){var r=this,i=arguments.length>3&&void 0!==arguments[3]&&arguments[3];this.com&&this.com.attrs&&this.com.attrs[e]&&this.com.attrs[e].id===t&&(this.$set(this.com.attrs[e],"content",n),this.$nextTick((function(){var e=r.$el.querySelector("#".concat(t));e&&(e.value=n)})),i&&this.$emit("onUpdata",this.currentIndex,e,t,n))},addInputListeners:function(){this.$el.addEventListener("blur",this.handleInputChange,!0),this.$el.addEventListener("input",this.adjustInputWidth,!0)},initializeInputWidths:function(){var e=this,t=this.$el.querySelectorAll(".text-input-box, .text-input-boxs");t.forEach((function(t){return e.adjustInputWidth({target:t})}))},adjustInputWidth:function(e){if(e.target.classList.contains("text-input-box")||e.target.classList.contains("text-input-boxs")){var t=e.target,n=document.createElement("span");n.className="size-calculator",n.textContent=t.value||t.placeholder||"0",document.body.appendChild(n);var r=window.getComputedStyle(t);n.style.font=r.font,n.style.fontSize=r.fontSize,n.style.fontWeight=r.fontWeight,n.style.letterSpacing=r.letterSpacing;var i=n.offsetWidth;t.style.width="".concat(i+10,"px"),document.body.removeChild(n)}},handleInputChange:function(e){var t=this;if(e.target.classList.contains("text-input-box")||e.target.classList.contains("text-input-boxs")){e.target.id;var n=e.target.name,r=parseInt(e.target.dataset.index,10),i=e.target.value;this.com&&this.com.attrs&&this.com.attrs[r]?(this.$set(this.com.attrs[r],"content",i),this.com.attrs.forEach((function(e){e.name===n&&t.$set(e,"content",i)})),this.$emit("onUpdateAttr",this.currentIndex,r,i)):console.warn("Unable to find attribute at index ".concat(r))}},bindEvents:function(){for(var e=this,t=0;t<e.com.attrs.length;t++){var n=e.com.attrs[t].id,r=e.com.attrs[t];if("variable"==e.com.attrs[t].type){var i=e.$el.querySelector("#"+n);i&&(2==r.data.value_type?i.addEventListener("change",e.handleInput):i.addEventListener("blur",e.handleInput))}else if("ProductAttr"==e.com.attrs[t].type){var s=r.id+"_"+t,o=e.$el.querySelector("#"+s);o&&(1==r.attrs.type?o.addEventListener("blur",e.handleInputProduct):o.addEventListener("change",e.handleChangeProduct))}}},analysisFormual:function(e){var t=this;return Object(h["a"])(Object(u["a"])().mark((function n(){var r,i,s,o,a;return Object(u["a"])().wrap((function(n){while(1)switch(n.prev=n.next){case 0:return r=t,i=e.formula,s=/\[T\]\[(.*?)\]\[(.*?)\]/g,n.next=5,t.replaceAsync(i,s,function(){var e=Object(h["a"])(Object(u["a"])().mark((function e(t,n,i){var s;return Object(u["a"])().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,r.getModuleData(n,i);case 3:if(s=e.sent,null!==s&&void 0!==s){e.next=9;break}return console.warn("获取到的数据无效: ".concat(t)),e.abrupt("return","''");case 9:return e.abrupt("return","string"===typeof s?"".concat(s):s);case 10:e.next=16;break;case 12:return e.prev=12,e.t0=e["catch"](0),console.error("处理 ".concat(t," 时出错:"),e.t0),e.abrupt("return","''");case 16:case"end":return e.stop()}}),e,null,[[0,12]])})));return function(t,n,r){return e.apply(this,arguments)}}());case 5:i=n.sent,o=/IF\s*\((.*?),(.*?),(.*?)\)/gi,a=0;while(i.match(o)&&a<10)i=i.replace(o,(function(e,t,n,r){return n.includes("IF(")||r.includes("IF(")||n.includes("if(")||r.includes("if(")?"(".concat(t," ? (").concat(n,") : (").concat(r,"))"):"(".concat(t," ? ").concat(n," : ").concat(r,")")})),a++;return n.abrupt("return",i);case 10:case"end":return n.stop()}}),n)})))()},replaceAsync:function(e,t,n){return Object(h["a"])(Object(u["a"])().mark((function r(){var i,s;return Object(u["a"])().wrap((function(r){while(1)switch(r.prev=r.next){case 0:return i=[],e.replace(t,(function(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),s=1;s<t;s++)r[s-1]=arguments[s];var o=n.apply(void 0,[e].concat(r));i.push(o)})),r.next=4,Promise.all(i);case 4:return s=r.sent,r.abrupt("return",e.replace(t,(function(){return s.shift()})));case 6:case"end":return r.stop()}}),r)})))()}},Object(o["a"])(Object(o["a"])(Object(o["a"])(Object(o["a"])(Object(o["a"])(Object(o["a"])(Object(o["a"])(Object(o["a"])(Object(o["a"])(Object(o["a"])(r,"replaceAsync",(function(e,t,n){return Object(h["a"])(Object(u["a"])().mark((function r(){var i,s;return Object(u["a"])().wrap((function(r){while(1)switch(r.prev=r.next){case 0:return i=[],e.replace(t,(function(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),s=1;s<t;s++)r[s-1]=arguments[s];var o=n.apply(void 0,[e].concat(r));i.push(o)})),r.next=4,Promise.all(i);case 4:return s=r.sent,r.abrupt("return",e.replace(t,(function(){return s.shift()})));case 6:case"end":return r.stop()}}),r)})))()})),"getFormualData",(function(e,t){var n=this;return Object(h["a"])(Object(u["a"])().mark((function t(){var r,i,s,o,a;return Object(u["a"])().wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(r=n,i=/\[(.*?)\]\[(.*?)\]\[(.*?)\]/,s=new RegExp(i),o=e.match(s),a=0,!o||"T"!=o[1]){t.next=11;break}return t.next=8,r.getModuleData(o[2],o[3]);case 8:a=t.sent,t.next=12;break;case 11:console.warn("无法解析公式项:",e);case 12:return t.abrupt("return",a);case 13:case"end":return t.stop()}}),t)})))()})),"getRemote",(function(e){var t=this;return Object(h["a"])(Object(u["a"])().mark((function n(){var r,i,s,o,a,l,c;return Object(u["a"])().wrap((function(n){while(1)switch(n.prev=n.next){case 0:r=t,i=/\[(.*?)\]\[(.*?)\]\[(.*?)\]\[(.*?)\]/,s=new RegExp(i);case 3:if(o=e.match(s),null!=o){n.next=7;break}return n.abrupt("break",18);case 7:if("R"!=o[1]){n.next=16;break}return a=o[4],a=o[4].split(","),n.next=12,r.getRemoteData(o[2],o[3],a[0],a[1]);case 12:l=n.sent,c=o[0],e=isNaN(l)?e.replace(c,'"'.concat(l,'"')):e.replace(c,"("+parseFloat(l)+")"),e=e.replace(c,"("+parseFloat(l)+")");case 16:n.next=3;break;case 18:return n.abrupt("return",e);case 19:case"end":return n.stop()}}),n)})))()})),"getRemote1",(function(e){var t=this;return Object(h["a"])(Object(u["a"])().mark((function n(){var r,i,s,o,a,l,c;return Object(u["a"])().wrap((function(n){while(1)switch(n.prev=n.next){case 0:r=t,i=/\[(.*?)\]\[(.*?)\]\[(.*?)\]\[(.*?)\]/,s=new RegExp(i);case 3:if(o=e.match(s),null!=o){n.next=7;break}return n.abrupt("break",17);case 7:if("R"!=o[1]){n.next=15;break}return a=o[4],a=o[4].split(","),n.next=12,r.getRemoteData(o[2],o[3],a[0],a[1]);case 12:l=n.sent,c=o[0],e=isNaN(l)?e.replace(c,'"'.concat(l,'"')):e.replace(c,"("+parseFloat(l)+")");case 15:n.next=3;break;case 17:return n.abrupt("return",e);case 18:case"end":return n.stop()}}),n)})))()})),"onFocus",(function(){this.isEditing=!0})),"onBlur",(function(){this.isEditing=!1})),"getRemoteData",(function(e,t,n,r){var i=this;return Object(h["a"])(Object(u["a"])().mark((function s(){var o,a,l;return Object(u["a"])().wrap((function(s){while(1)switch(s.prev=s.next){case 0:return i,o=0,a={code:e,sheetName:t,row:n,col:r},s.prev=3,s.next=6,Object(d["a"])(a);case 6:if(l=s.sent,l){s.next=10;break}return console.warn("No response received from findData"),s.abrupt("return",o);case 10:200===l.status&&l.data?(o=l.data.result,"string"!==typeof o||isNaN(o)||(o=parseFloat(o))):console.warn("Invalid response format:",l),s.next=17;break;case 13:s.prev=13,s.t0=s["catch"](3),console.error("获取远程数据错误:",s.t0),i.$message&&i.$message.error("获取远程数据失败");case 17:return s.abrupt("return",o);case 18:case"end":return s.stop()}}),s,null,[[3,13]])})))()})),"getModuleData",(function(e,t){var n=this;return Object(h["a"])(Object(u["a"])().mark((function r(){var i,s,o;return Object(u["a"])().wrap((function(r){while(1)switch(r.prev=r.next){case 0:if(i=n,s=i.coms.filter((function(t){return t.name==e})),!(s.length>0)){r.next=6;break}if(o=s[0].attrs.filter((function(e){return e.name==t})),!(o.length>0)){r.next=6;break}return r.abrupt("return",o[0].content);case 6:return r.abrupt("return","");case 7:case"end":return r.stop()}}),r)})))()})),"handleChangeProduct",(function(e){var t=e.target.dataset.index;this.$emit("onUpdateProdAttr",this.currentIndex,t,e.target.value)})),"handleInputProduct",(function(e){var t=e.target.dataset.index;this.$emit("onUpdateProdAttr",this.currentIndex,t,e.target.value)})),Object(o["a"])(Object(o["a"])(Object(o["a"])(Object(o["a"])(Object(o["a"])(Object(o["a"])(Object(o["a"])(Object(o["a"])(Object(o["a"])(Object(o["a"])(r,"handleInput",(function(e){var t=e.target.dataset.index;this.$emit("onUpdateAttr",this.currentIndex,t,e.target.value)})),"onEditorReady",(function(e){})),"onInputText",(function(e){this.$emit("onUpdate",this.currentIndex,e)})),"handleImageClick",(function(e){"IMG"===e.target.tagName&&this.replaceImage(e.target)})),"selectImage",(function(){return new Promise((function(e){var t=document.createElement("input");t.type="file",t.accept="image/*",t.onchange=function(t){return e(t.target.files[0])},t.click()}))})),"uploadImage",(function(e){return Object(h["a"])(Object(u["a"])().mark((function t(){var n;return Object(u["a"])().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,g.a.post("http://58.246.234.210:8084/upload/image",e,{headers:{"Content-Type":"multipart/form-data"}});case 3:if(n=t.sent,console.log("Upload response:",n),200!==n.status||!n.data||!n.data.url){t.next=9;break}return t.abrupt("return",n.data.url);case 9:throw new Error("Invalid upload response");case 10:t.next=16;break;case 12:throw t.prev=12,t.t0=t["catch"](0),console.error("Error uploading image:",t.t0),t.t0;case 16:case"end":return t.stop()}}),t,null,[[0,12]])})))()})),"replaceImage",(function(e){var t=this;return Object(h["a"])(Object(u["a"])().mark((function n(){var r,i,s;return Object(u["a"])().wrap((function(n){while(1)switch(n.prev=n.next){case 0:return n.prev=0,n.next=3,t.selectImage();case 3:if(r=n.sent,!r){n.next=12;break}return i=new FormData,i.append("upload",r),n.next=9,t.uploadImage(i);case 9:s=n.sent,e.src=s,t.$nextTick((function(){t.updateContentWithNewImage(e,s)}));case 12:n.next=17;break;case 14:n.prev=14,n.t0=n["catch"](0),console.error("Error replacing image:",n.t0);case 17:case"end":return n.stop()}}),n,null,[[0,14]])})))()})),"updateContentWithNewImage",(function(e,t){var n=this.$refs.richEditor,r=document.createElement("img");r.src=t;var i,s=Object(c["a"])(e.attributes);try{for(s.s();!(i=s.n()).done;){var o=i.value;"src"!==o.name&&r.setAttribute(o.name,o.value)}}catch(a){s.e(a)}finally{s.f()}e.parentNode.replaceChild(r,e),this.content=n.innerHTML,this.com.content=this.content,this.$emit("updateComContent",this.currentIndex,this.com)})),"syncContent",(function(){var e=this;if("2"==this.isEdit&&this.com&&this.com.content){var t=this.formatContent(this.com.content);this.replaceData(t).then((function(t){e.content=t,e.$nextTick((function(){e.bindEvents(),e.initializeInputWidths(),e.com.attrs&&e.com.attrs.forEach((function(t,n){var r=e.$el.querySelector("#".concat(t.id));r&&(r.value=t.content||"",e.adjustInputWidth({target:r}))}))}))}))}})),"getCursorPosition",(function(){var e=this.$refs.wordEditor;if(!e)return 0;if(e.getCursorPosition)return e.getCursorPosition();if(e.getSelection){var t=e.getSelection();return t&&t.start||0}return 0})),Object(o["a"])(Object(o["a"])(Object(o["a"])(Object(o["a"])(r,"formatContent",(function(e){return e.replace(/\s+/g," ").replace(/\n/g,"<br>")})),"handleProductAttrChange",(function(e){var t,n=e.target,r=parseInt(n.dataset.index),i=this.com.attrs[r];(console.log("ProductAttr change:",{target:n,index:r,item:i}),i&&"ProductAttr"===i.type)&&(t=n.multiple?Array.from(n.selectedOptions).map((function(e){return e.value})).filter(Boolean).join(","):n.value,this.$set(i,"content",t),this.$emit("onUpdateProdAttr",this.currentIndex,r,t))})),"handleProductAttrInput",(function(e){var t=e.target;t.classList.contains("product-input")&&this.adjustInputWidth({target:t})})),"bindProductAttrEvents",(function(){var e=this;this.$nextTick((function(){var t=e.$el.querySelectorAll(".product-input, .product-select");console.log("Found product inputs:",t.length),t.forEach((function(t){t.removeEventListener("change",e.handleProductAttrChange),t.removeEventListener("input",e.handleProductAttrInput),t.removeEventListener("blur",e.handleProductAttrChange),t.removeAttribute("readonly"),t.removeAttribute("disabled"),"select"===t.tagName.toLowerCase()?t.addEventListener("change",e.handleProductAttrChange):(t.addEventListener("input",e.handleProductAttrInput),t.addEventListener("blur",e.handleProductAttrChange))}))}))})))},R=f,y=(n("c62c"),n("2877")),M=Object(y["a"])(R,i,s,!1,null,"6c717716",null);t["default"]=M.exports},"7dd0":function(e,t,n){"use strict";function r(e){return window.requestAnimationFrame(e)}function i(e){window.cancelAnimationFrame(e)}function s(){return"ontouchstart"in window}function o(){return"undefined"!==typeof window}let a;function l(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return a||(a="object"===typeof Intl?new Intl.Collator(e,t).compare:"function"===typeof String.prototype.localeCompare?(e,t)=>(""+e).localeCompare(t):(e,t)=>e===t?0:e>t?-1:1,a)}n.r(t),n.d(t,"requestAnimationFrame",(function(){return r})),n.d(t,"cancelAnimationFrame",(function(){return i})),n.d(t,"isTouchSupported",(function(){return s})),n.d(t,"isCSR",(function(){return o})),n.d(t,"getComparisonFunction",(function(){return l}))},"7ed3":function(e,t,n){"use strict";var r=n("23e7"),i=n("c65b"),s=n("825a"),o=n("861d"),a=n("c60d"),l=n("d039"),c=n("9bf2"),u=n("06cf"),h=n("e163"),d=n("5c6c");function m(e,t,n){var r,l,g,p=arguments.length<4?e:arguments[3],f=u.f(s(e),t);if(!f){if(o(l=h(e)))return m(l,t,n,p);f=d(0)}if(a(f)){if(!1===f.writable||!o(p))return!1;if(r=u.f(p,t)){if(r.get||r.set||!1===r.writable)return!1;r.value=n,c.f(p,t,r)}else c.f(p,t,d(0,n))}else{if(g=f.set,void 0===g)return!1;i(g,p,n)}return!0}var g=l((function(){var e=function(){},t=c.f(new e,"a",{configurable:!0});return!1!==Reflect.set(e.prototype,"a",1,t)}));r({target:"Reflect",stat:!0,forced:g},{set:m})},"7f33":function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
  185. //! moment.js locale configuration
  186. var t=e.defineLocale("yo",{months:"Sẹ́rẹ́_Èrèlè_Ẹrẹ̀nà_Ìgbé_Èbibi_Òkùdu_Agẹmo_Ògún_Owewe_Ọ̀wàrà_Bélú_Ọ̀pẹ̀̀".split("_"),monthsShort:"Sẹ́r_Èrl_Ẹrn_Ìgb_Èbi_Òkù_Agẹ_Ògú_Owe_Ọ̀wà_Bél_Ọ̀pẹ̀̀".split("_"),weekdays:"Àìkú_Ajé_Ìsẹ́gun_Ọjọ́rú_Ọjọ́bọ_Ẹtì_Àbámẹ́ta".split("_"),weekdaysShort:"Àìk_Ajé_Ìsẹ́_Ọjr_Ọjb_Ẹtì_Àbá".split("_"),weekdaysMin:"Àì_Aj_Ìs_Ọr_Ọb_Ẹt_Àb".split("_"),longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY h:mm A",LLLL:"dddd, D MMMM YYYY h:mm A"},calendar:{sameDay:"[Ònì ni] LT",nextDay:"[Ọ̀la ni] LT",nextWeek:"dddd [Ọsẹ̀ tón'bọ] [ni] LT",lastDay:"[Àna ni] LT",lastWeek:"dddd [Ọsẹ̀ tólọ́] [ni] LT",sameElse:"L"},relativeTime:{future:"ní %s",past:"%s kọjá",s:"ìsẹjú aayá die",ss:"aayá %d",m:"ìsẹjú kan",mm:"ìsẹjú %d",h:"wákati kan",hh:"wákati %d",d:"ọjọ́ kan",dd:"ọjọ́ %d",M:"osù kan",MM:"osù %d",y:"ọdún kan",yy:"ọdún %d"},dayOfMonthOrdinalParse:/ọjọ́\s\d{1,2}/,ordinal:"ọjọ́ %d",week:{dow:1,doy:4}});return t}))},"7f65":function(e,t,n){"use strict";var r=n("59ed"),i=n("825a"),s=n("c65b"),o=n("5926"),a=n("46c4"),l="Invalid size",c=RangeError,u=TypeError,h=Math.max,d=function(e,t){this.set=e,this.size=h(t,0),this.has=r(e.has),this.keys=r(e.keys)};d.prototype={getIterator:function(){return a(i(s(this.keys,this.set)))},includes:function(e){return s(this.has,this.set,e)}},e.exports=function(e){i(e);var t=+e.size;if(t!==t)throw new u(l);var n=o(t);if(n<0)throw new c(l);return new d(e,n)}},8033:function(e,t,n){},8127:function(e,t,n){"use strict";n("f955")},8155:function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
  187. //! moment.js locale configuration
  188. function t(e,t,n,r){var i=e+" ";switch(n){case"s":return t||r?"nekaj sekund":"nekaj sekundami";case"ss":return i+=1===e?t?"sekundo":"sekundi":2===e?t||r?"sekundi":"sekundah":e<5?t||r?"sekunde":"sekundah":"sekund",i;case"m":return t?"ena minuta":"eno minuto";case"mm":return i+=1===e?t?"minuta":"minuto":2===e?t||r?"minuti":"minutama":e<5?t||r?"minute":"minutami":t||r?"minut":"minutami",i;case"h":return t?"ena ura":"eno uro";case"hh":return i+=1===e?t?"ura":"uro":2===e?t||r?"uri":"urama":e<5?t||r?"ure":"urami":t||r?"ur":"urami",i;case"d":return t||r?"en dan":"enim dnem";case"dd":return i+=1===e?t||r?"dan":"dnem":2===e?t||r?"dni":"dnevoma":t||r?"dni":"dnevi",i;case"M":return t||r?"en mesec":"enim mesecem";case"MM":return i+=1===e?t||r?"mesec":"mesecem":2===e?t||r?"meseca":"mesecema":e<5?t||r?"mesece":"meseci":t||r?"mesecev":"meseci",i;case"y":return t||r?"eno leto":"enim letom";case"yy":return i+=1===e?t||r?"leto":"letom":2===e?t||r?"leti":"letoma":e<5?t||r?"leta":"leti":t||r?"let":"leti",i}}var n=e.defineLocale("sl",{months:"januar_februar_marec_april_maj_junij_julij_avgust_september_oktober_november_december".split("_"),monthsShort:"jan._feb._mar._apr._maj._jun._jul._avg._sep._okt._nov._dec.".split("_"),monthsParseExact:!0,weekdays:"nedelja_ponedeljek_torek_sreda_četrtek_petek_sobota".split("_"),weekdaysShort:"ned._pon._tor._sre._čet._pet._sob.".split("_"),weekdaysMin:"ne_po_to_sr_če_pe_so".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD. MM. YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm",LLLL:"dddd, D. MMMM YYYY H:mm"},calendar:{sameDay:"[danes ob] LT",nextDay:"[jutri ob] LT",nextWeek:function(){switch(this.day()){case 0:return"[v] [nedeljo] [ob] LT";case 3:return"[v] [sredo] [ob] LT";case 6:return"[v] [soboto] [ob] LT";case 1:case 2:case 4:case 5:return"[v] dddd [ob] LT"}},lastDay:"[včeraj ob] LT",lastWeek:function(){switch(this.day()){case 0:return"[prejšnjo] [nedeljo] [ob] LT";case 3:return"[prejšnjo] [sredo] [ob] LT";case 6:return"[prejšnjo] [soboto] [ob] LT";case 1:case 2:case 4:case 5:return"[prejšnji] dddd [ob] LT"}},sameElse:"L"},relativeTime:{future:"čez %s",past:"pred %s",s:t,ss:t,m:t,mm:t,h:t,hh:t,d:t,dd:t,M:t,MM:t,y:t,yy:t},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:7}});return n}))},"81e9":function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
  189. //! moment.js locale configuration
  190. var t="nolla yksi kaksi kolme neljä viisi kuusi seitsemän kahdeksan yhdeksän".split(" "),n=["nolla","yhden","kahden","kolmen","neljän","viiden","kuuden",t[7],t[8],t[9]];function r(e,t,n,r){var s="";switch(n){case"s":return r?"muutaman sekunnin":"muutama sekunti";case"ss":s=r?"sekunnin":"sekuntia";break;case"m":return r?"minuutin":"minuutti";case"mm":s=r?"minuutin":"minuuttia";break;case"h":return r?"tunnin":"tunti";case"hh":s=r?"tunnin":"tuntia";break;case"d":return r?"päivän":"päivä";case"dd":s=r?"päivän":"päivää";break;case"M":return r?"kuukauden":"kuukausi";case"MM":s=r?"kuukauden":"kuukautta";break;case"y":return r?"vuoden":"vuosi";case"yy":s=r?"vuoden":"vuotta";break}return s=i(e,r)+" "+s,s}function i(e,r){return e<10?r?n[e]:t[e]:e}var s=e.defineLocale("fi",{months:"tammikuu_helmikuu_maaliskuu_huhtikuu_toukokuu_kesäkuu_heinäkuu_elokuu_syyskuu_lokakuu_marraskuu_joulukuu".split("_"),monthsShort:"tammi_helmi_maalis_huhti_touko_kesä_heinä_elo_syys_loka_marras_joulu".split("_"),weekdays:"sunnuntai_maanantai_tiistai_keskiviikko_torstai_perjantai_lauantai".split("_"),weekdaysShort:"su_ma_ti_ke_to_pe_la".split("_"),weekdaysMin:"su_ma_ti_ke_to_pe_la".split("_"),longDateFormat:{LT:"HH.mm",LTS:"HH.mm.ss",L:"DD.MM.YYYY",LL:"Do MMMM[ta] YYYY",LLL:"Do MMMM[ta] YYYY, [klo] HH.mm",LLLL:"dddd, Do MMMM[ta] YYYY, [klo] HH.mm",l:"D.M.YYYY",ll:"Do MMM YYYY",lll:"Do MMM YYYY, [klo] HH.mm",llll:"ddd, Do MMM YYYY, [klo] HH.mm"},calendar:{sameDay:"[tänään] [klo] LT",nextDay:"[huomenna] [klo] LT",nextWeek:"dddd [klo] LT",lastDay:"[eilen] [klo] LT",lastWeek:"[viime] dddd[na] [klo] LT",sameElse:"L"},relativeTime:{future:"%s päästä",past:"%s sitten",s:r,ss:r,m:r,mm:r,h:r,hh:r,d:r,dd:r,M:r,MM:r,y:r,yy:r},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}});return s}))},"81ea":function(e,t,n){"use strict";n.r(t),n.d(t,"to2dArray",(function(){return r})),n.d(t,"extendArray",(function(){return i})),n.d(t,"pivot",(function(){return s})),n.d(t,"arrayReduce",(function(){return o})),n.d(t,"arrayFilter",(function(){return a})),n.d(t,"arrayMap",(function(){return l})),n.d(t,"arrayEach",(function(){return c})),n.d(t,"arraySum",(function(){return u})),n.d(t,"arrayMax",(function(){return h})),n.d(t,"arrayMin",(function(){return d})),n.d(t,"arrayAvg",(function(){return m})),n.d(t,"arrayFlatten",(function(){return g})),n.d(t,"arrayUnique",(function(){return p})),n.d(t,"getDifferenceOfArrays",(function(){return f})),n.d(t,"getIntersectionOfArrays",(function(){return R})),n.d(t,"getUnionOfArrays",(function(){return y})),n.d(t,"stringToArray",(function(){return M}));n("14d9"),n("1e70"),n("79a4"),n("c1a1"),n("8b00"),n("a4e7"),n("1e5a"),n("72c3");function r(e){const t=e.length;let n=0;while(n<t)e[n]=[e[n]],n+=1}function i(e,t){const n=t.length;let r=0;while(r<n)e.push(t[r]),r+=1}function s(e){const t=[];if(!e||0===e.length||!e[0]||0===e[0].length)return t;const n=e.length,r=e[0].length;for(let i=0;i<n;i++)for(let n=0;n<r;n++)t[n]||(t[n]=[]),t[n][i]=e[i][n];return t}function o(e,t,n,r){let i=-1,s=e,o=n;Array.isArray(e)||(s=Array.from(e));const a=s.length;r&&a&&(i+=1,o=s[i]),i+=1;while(i<a)o=t(o,s[i],i,s),i+=1;return o}function a(e,t){let n=0,r=e;Array.isArray(e)||(r=Array.from(e));const i=r.length,s=[];let o=-1;while(n<i){const e=r[n];t(e,n,r)&&(o+=1,s[o]=e),n+=1}return s}function l(e,t){let n=0,r=e;Array.isArray(e)||(r=Array.from(e));const i=r.length,s=[];let o=-1;while(n<i){const e=r[n];o+=1,s[o]=t(e,n,r),n+=1}return s}function c(e,t){let n=0,r=e;Array.isArray(e)||(r=Array.from(e));const i=r.length;while(n<i){if(!1===t(r[n],n,r))break;n+=1}return e}function u(e){return o(e,(e,t)=>e+t,0)}function h(e){return o(e,(e,t)=>e>t?e:t,Array.isArray(e)?e[0]:void 0)}function d(e){return o(e,(e,t)=>e<t?e:t,Array.isArray(e)?e[0]:void 0)}function m(e){return e.length?u(e)/e.length:0}function g(e){return o(e,(e,t)=>e.concat(Array.isArray(t)?g(t):t),[])}function p(e){const t=[];return c(e,e=>{-1===t.indexOf(e)&&t.push(e)}),t}function f(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];const[r,...i]=[...t];let s=r;return c(i,e=>{s=s.filter(t=>!e.includes(t))}),s}function R(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];const[r,...i]=[...t];let s=r;return c(i,e=>{s=s.filter(t=>e.includes(t))}),s}function y(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];const[r,...i]=[...t],s=new Set(r);return c(i,e=>{c(e,e=>{s.has(e)||s.add(e)})}),Array.from(s)}function M(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:" ";return e.split(t)}},8230:function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
  191. //! moment.js locale configuration
  192. var t={1:"١",2:"٢",3:"٣",4:"٤",5:"٥",6:"٦",7:"٧",8:"٨",9:"٩",0:"٠"},n={"١":"1","٢":"2","٣":"3","٤":"4","٥":"5","٦":"6","٧":"7","٨":"8","٩":"9","٠":"0"},r=e.defineLocale("ar-sa",{months:"يناير_فبراير_مارس_أبريل_مايو_يونيو_يوليو_أغسطس_سبتمبر_أكتوبر_نوفمبر_ديسمبر".split("_"),monthsShort:"يناير_فبراير_مارس_أبريل_مايو_يونيو_يوليو_أغسطس_سبتمبر_أكتوبر_نوفمبر_ديسمبر".split("_"),weekdays:"الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت".split("_"),weekdaysShort:"أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت".split("_"),weekdaysMin:"ح_ن_ث_ر_خ_ج_س".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},meridiemParse:/ص|م/,isPM:function(e){return"م"===e},meridiem:function(e,t,n){return e<12?"ص":"م"},calendar:{sameDay:"[اليوم على الساعة] LT",nextDay:"[غدا على الساعة] LT",nextWeek:"dddd [على الساعة] LT",lastDay:"[أمس على الساعة] LT",lastWeek:"dddd [على الساعة] LT",sameElse:"L"},relativeTime:{future:"في %s",past:"منذ %s",s:"ثوان",ss:"%d ثانية",m:"دقيقة",mm:"%d دقائق",h:"ساعة",hh:"%d ساعات",d:"يوم",dd:"%d أيام",M:"شهر",MM:"%d أشهر",y:"سنة",yy:"%d سنوات"},preparse:function(e){return e.replace(/[١٢٣٤٥٦٧٨٩٠]/g,(function(e){return n[e]})).replace(/،/g,",")},postformat:function(e){return e.replace(/\d/g,(function(e){return t[e]})).replace(/,/g,"،")},week:{dow:0,doy:6}});return r}))},"83b9e":function(e,t,n){"use strict";var r=n("cb27"),i=n("384f"),s=r.Set,o=r.add;e.exports=function(e){var t=new s;return i(e,(function(e){o(t,e)})),t}},"84aa":function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
  193. //! moment.js locale configuration
  194. var t=e.defineLocale("bg",{months:"януари_февруари_март_април_май_юни_юли_август_септември_октомври_ноември_декември".split("_"),monthsShort:"яну_фев_мар_апр_май_юни_юли_авг_сеп_окт_ное_дек".split("_"),weekdays:"неделя_понеделник_вторник_сряда_четвъртък_петък_събота".split("_"),weekdaysShort:"нед_пон_вто_сря_чет_пет_съб".split("_"),weekdaysMin:"нд_пн_вт_ср_чт_пт_сб".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"D.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY H:mm",LLLL:"dddd, D MMMM YYYY H:mm"},calendar:{sameDay:"[Днес в] LT",nextDay:"[Утре в] LT",nextWeek:"dddd [в] LT",lastDay:"[Вчера в] LT",lastWeek:function(){switch(this.day()){case 0:case 3:case 6:return"[Миналата] dddd [в] LT";case 1:case 2:case 4:case 5:return"[Миналия] dddd [в] LT"}},sameElse:"L"},relativeTime:{future:"след %s",past:"преди %s",s:"няколко секунди",ss:"%d секунди",m:"минута",mm:"%d минути",h:"час",hh:"%d часа",d:"ден",dd:"%d дена",w:"седмица",ww:"%d седмици",M:"месец",MM:"%d месеца",y:"година",yy:"%d години"},dayOfMonthOrdinalParse:/\d{1,2}-(ев|ен|ти|ви|ри|ми)/,ordinal:function(e){var t=e%10,n=e%100;return 0===e?e+"-ев":0===n?e+"-ен":n>10&&n<20?e+"-ти":1===t?e+"-ви":2===t?e+"-ри":7===t||8===t?e+"-ми":e+"-ти"},week:{dow:1,doy:7}});return t}))},"861dd":function(e,t,n){"use strict";n.d(t,"a",(function(){return a})),n.d(t,"b",(function(){return l}));n("d9e2"),n("14d9");var r=n("5714");function i(e,t,n){return(t=s(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function s(e){var t=o(e,"string");return"symbol"==typeof t?t:t+""}function o(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}const a=50;class l extends r["a"]{constructor(e){let{calculationTypes:t,viewportWidth:n,scrollOffset:r,totalColumns:s,columnWidthFn:o,overrideFn:a,inlineStartOffset:l}=e;super(t),i(this,"viewportWidth",0),i(this,"scrollOffset",0),i(this,"zeroBasedScrollOffset",0),i(this,"totalColumns",0),i(this,"columnWidthFn",null),i(this,"columnWidth",0),i(this,"overrideFn",null),i(this,"inlineStartOffset",0),i(this,"totalCalculatedWidth",0),i(this,"startPositions",[]),i(this,"needReverse",!0),this.viewportWidth=n,this.scrollOffset=r,this.zeroBasedScrollOffset=Math.max(r,0),this.totalColumns=s,this.columnWidthFn=o,this.overrideFn=a,this.inlineStartOffset=l,this.calculate()}calculate(){this._initialize(this);for(let e=0;e<this.totalColumns;e++)if(this.columnWidth=this.getColumnWidth(e),this._process(e,this),this.startPositions.push(this.totalCalculatedWidth),this.totalCalculatedWidth+=this.columnWidth,this.totalCalculatedWidth>=this.zeroBasedScrollOffset+this.viewportWidth){this.needReverse=!1;break}this._finalize(this)}getColumnWidth(e){const t=this.columnWidthFn(e);return isNaN(t)?a:t}}},8689:function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
  195. //! moment.js locale configuration
  196. var t={1:"၁",2:"၂",3:"၃",4:"၄",5:"၅",6:"၆",7:"၇",8:"၈",9:"၉",0:"၀"},n={"၁":"1","၂":"2","၃":"3","၄":"4","၅":"5","၆":"6","၇":"7","၈":"8","၉":"9","၀":"0"},r=e.defineLocale("my",{months:"ဇန်နဝါရီ_ဖေဖော်ဝါရီ_မတ်_ဧပြီ_မေ_ဇွန်_ဇူလိုင်_သြဂုတ်_စက်တင်ဘာ_အောက်တိုဘာ_နိုဝင်ဘာ_ဒီဇင်ဘာ".split("_"),monthsShort:"ဇန်_ဖေ_မတ်_ပြီ_မေ_ဇွန်_လိုင်_သြ_စက်_အောက်_နို_ဒီ".split("_"),weekdays:"တနင်္ဂနွေ_တနင်္လာ_အင်္ဂါ_ဗုဒ္ဓဟူး_ကြာသပတေး_သောကြာ_စနေ".split("_"),weekdaysShort:"နွေ_လာ_ဂါ_ဟူး_ကြာ_သော_နေ".split("_"),weekdaysMin:"နွေ_လာ_ဂါ_ဟူး_ကြာ_သော_နေ".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[ယနေ.] LT [မှာ]",nextDay:"[မနက်ဖြန်] LT [မှာ]",nextWeek:"dddd LT [မှာ]",lastDay:"[မနေ.က] LT [မှာ]",lastWeek:"[ပြီးခဲ့သော] dddd LT [မှာ]",sameElse:"L"},relativeTime:{future:"လာမည့် %s မှာ",past:"လွန်ခဲ့သော %s က",s:"စက္ကန်.အနည်းငယ်",ss:"%d စက္ကန့်",m:"တစ်မိနစ်",mm:"%d မိနစ်",h:"တစ်နာရီ",hh:"%d နာရီ",d:"တစ်ရက်",dd:"%d ရက်",M:"တစ်လ",MM:"%d လ",y:"တစ်နှစ်",yy:"%d နှစ်"},preparse:function(e){return e.replace(/[၁၂၃၄၅၆၇၈၉၀]/g,(function(e){return n[e]}))},postformat:function(e){return e.replace(/\d/g,(function(e){return t[e]}))},week:{dow:1,doy:4}});return r}))},8722:function(e,t,n){var r;!function(t){e.exports=t()}((function(){return function e(t,n,i){function s(a,l){if(!n[a]){if(!t[a]){var c="function"==typeof r&&r;if(!l&&c)return r(a,!0);if(o)return o(a,!0);var u=new Error("Cannot find module '"+a+"'");throw u.code="MODULE_NOT_FOUND",u}var h=n[a]={exports:{}};t[a][0].call(h.exports,(function(e){return s(t[a][1][e]||e)}),h,h.exports,e,t,n,i)}return n[a].exports}for(var o="function"==typeof r&&r,a=0;a<i.length;a++)s(i[a]);return s}({1:[function(e,t,n){!function(e){"use strict";var n,r=/^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i,i=Math.ceil,s=Math.floor,o="[BigNumber Error] ",a=o+"Number primitive has more than 15 significant digits: ",l=1e14,c=14,u=9007199254740991,h=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13],d=1e7,m=1e9;function g(e){var t=0|e;return 0<e||e===t?t:t-1}function p(e){for(var t,n,r=1,i=e.length,s=e[0]+"";r<i;){for(t=e[r++]+"",n=c-t.length;n--;t="0"+t);s+=t}for(i=s.length;48===s.charCodeAt(--i););return s.slice(0,i+1||1)}function f(e,t){var n,r,i=e.c,s=t.c,o=e.s,a=t.s,l=e.e,c=t.e;if(!o||!a)return null;if(n=i&&!i[0],r=s&&!s[0],n||r)return n?r?0:-a:o;if(o!=a)return o;if(n=o<0,r=l==c,!i||!s)return r?0:!i^n?1:-1;if(!r)return c<l^n?1:-1;for(a=(l=i.length)<(c=s.length)?l:c,o=0;o<a;o++)if(i[o]!=s[o])return i[o]>s[o]^n?1:-1;return l==c?0:c<l^n?1:-1}function R(e,t,n,r){if(e<t||n<e||e!==(e<0?i(e):s(e)))throw Error(o+(r||"Argument")+("number"==typeof e?e<t||n<e?" out of range: ":" not an integer: ":" not a primitive number: ")+String(e))}function y(e){var t=e.c.length-1;return g(e.e/c)==t&&e.c[t]%2!=0}function M(e,t){return(1<e.length?e.charAt(0)+"."+e.slice(1):e)+(t<0?"e":"e+")+t}function S(e,t,n){var r,i;if(t<0){for(i=n+".";++t;i+=n);e=i+e}else if(++t>(r=e.length)){for(i=n,t-=r;--t;i+=n);e+=i}else t<r&&(e=e.slice(0,t)+"."+e.slice(t));return e}(n=function e(t){var n,b,w,T,O,v,E,C,L,N,_=X.prototype={constructor:X,toString:null,valueOf:null},I=new X(1),P=20,x=4,D=-7,A=21,F=-1e7,Y=1e7,H=!1,k=1,V=0,U={prefix:"",groupSize:3,secondaryGroupSize:0,groupSeparator:",",decimalSeparator:".",fractionGroupSize:0,fractionGroupSeparator:" ",suffix:""},W="0123456789abcdefghijklmnopqrstuvwxyz";function X(e,t){var n,i,o,l,h,d,m,g,p=this;if(!(p instanceof X))return new X(e,t);if(null==t){if(e instanceof X)return p.s=e.s,p.e=e.e,void(p.c=(e=e.c)?e.slice():e);if((d="number"==typeof e)&&0*e==0){if(p.s=1/e<0?(e=-e,-1):1,e===~~e){for(l=0,h=e;10<=h;h/=10,l++);return p.e=l,void(p.c=[e])}g=String(e)}else{if(g=String(e),!r.test(g))return w(p,g,d);p.s=45==g.charCodeAt(0)?(g=g.slice(1),-1):1}-1<(l=g.indexOf("."))&&(g=g.replace(".","")),0<(h=g.search(/e/i))?(l<0&&(l=h),l+=+g.slice(h+1),g=g.substring(0,h)):l<0&&(l=g.length)}else{if(R(t,2,W.length,"Base"),g=String(e),10==t)return K(p=new X(e instanceof X?e:g),P+p.e+1,x);if(d="number"==typeof e){if(0*e!=0)return w(p,g,d,t);if(p.s=1/e<0?(g=g.slice(1),-1):1,X.DEBUG&&15<g.replace(/^0\.0*|\./,"").length)throw Error(a+e);d=!1}else p.s=45===g.charCodeAt(0)?(g=g.slice(1),-1):1;for(n=W.slice(0,t),l=h=0,m=g.length;h<m;h++)if(n.indexOf(i=g.charAt(h))<0){if("."==i){if(l<h){l=m;continue}}else if(!o&&(g==g.toUpperCase()&&(g=g.toLowerCase())||g==g.toLowerCase()&&(g=g.toUpperCase()))){o=!0,h=-1,l=0;continue}return w(p,String(e),d,t)}-1<(l=(g=b(g,t,10,p.s)).indexOf("."))?g=g.replace(".",""):l=g.length}for(h=0;48===g.charCodeAt(h);h++);for(m=g.length;48===g.charCodeAt(--m););if(g=g.slice(h,++m)){if(m-=h,d&&X.DEBUG&&15<m&&(u<e||e!==s(e)))throw Error(a+p.s*e);if(Y<(l=l-h-1))p.c=p.e=null;else if(l<F)p.c=[p.e=0];else{if(p.e=l,p.c=[],h=(l+1)%c,l<0&&(h+=c),h<m){for(h&&p.c.push(+g.slice(0,h)),m-=c;h<m;)p.c.push(+g.slice(h,h+=c));g=g.slice(h),h=c-g.length}else h-=m;for(;h--;g+="0");p.c.push(+g)}}else p.c=[p.e=0]}function j(e,t,n,r){var i,s,o,a,l;if(null==n?n=x:R(n,0,8),!e.c)return e.toString();if(i=e.c[0],o=e.e,null==t)l=p(e.c),l=1==r||2==r&&(o<=D||A<=o)?M(l,o):S(l,o,"0");else if(s=(e=K(new X(e),t,n)).e,a=(l=p(e.c)).length,1==r||2==r&&(t<=s||s<=D)){for(;a<t;l+="0",a++);l=M(l,s)}else if(t-=o,l=S(l,s,"0"),a<s+1){if(0<--t)for(l+=".";t--;l+="0");}else if(0<(t+=s-a))for(s+1==a&&(l+=".");t--;l+="0");return e.s<0&&i?"-"+l:l}function Z(e,t){for(var n,r=1,i=new X(e[0]);r<e.length;r++){if(!(n=new X(e[r])).s){i=n;break}t.call(i,n)&&(i=n)}return i}function Q(e,t,n){for(var r=1,i=t.length;!t[--i];t.pop());for(i=t[0];10<=i;i/=10,r++);return(n=r+n*c-1)>Y?e.c=e.e=null:e.c=n<F?[e.e=0]:(e.e=n,t),e}function K(e,t,n,r){var o,a,u,d,m,g,p,f=e.c,R=h;if(f){e:{for(o=1,d=f[0];10<=d;d/=10,o++);if((a=t-o)<0)a+=c,u=t,p=(m=f[g=0])/R[o-u-1]%10|0;else if((g=i((a+1)/c))>=f.length){if(!r)break e;for(;f.length<=g;f.push(0));m=p=0,u=(a%=c)-c+(o=1)}else{for(m=d=f[g],o=1;10<=d;d/=10,o++);p=(u=(a%=c)-c+o)<0?0:m/R[o-u-1]%10|0}if(r=r||t<0||null!=f[g+1]||(u<0?m:m%R[o-u-1]),r=n<4?(p||r)&&(0==n||n==(e.s<0?3:2)):5<p||5==p&&(4==n||r||6==n&&(0<a?0<u?m/R[o-u]:0:f[g-1])%10&1||n==(e.s<0?8:7)),t<1||!f[0])return f.length=0,r?(t-=e.e+1,f[0]=R[(c-t%c)%c],e.e=-t||0):f[0]=e.e=0,e;if(0==a?(f.length=g,d=1,g--):(f.length=g+1,d=R[c-a],f[g]=0<u?s(m/R[o-u]%R[u])*d:0),r)for(;;){if(0==g){for(a=1,u=f[0];10<=u;u/=10,a++);for(u=f[0]+=d,d=1;10<=u;u/=10,d++);a!=d&&(e.e++,f[0]==l&&(f[0]=1));break}if(f[g]+=d,f[g]!=l)break;f[g--]=0,d=1}for(a=f.length;0===f[--a];f.pop());}e.e>Y?e.c=e.e=null:e.e<F&&(e.c=[e.e=0])}return e}function G(e){var t,n=e.e;return null===n?e.toString():(t=p(e.c),t=n<=D||A<=n?M(t,n):S(t,n,"0"),e.s<0?"-"+t:t)}return X.clone=e,X.ROUND_UP=0,X.ROUND_DOWN=1,X.ROUND_CEIL=2,X.ROUND_FLOOR=3,X.ROUND_HALF_UP=4,X.ROUND_HALF_DOWN=5,X.ROUND_HALF_EVEN=6,X.ROUND_HALF_CEIL=7,X.ROUND_HALF_FLOOR=8,X.EUCLID=9,X.config=X.set=function(e){var t,n;if(null!=e){if("object"!=typeof e)throw Error(o+"Object expected: "+e);if(e.hasOwnProperty(t="DECIMAL_PLACES")&&(R(n=e[t],0,m,t),P=n),e.hasOwnProperty(t="ROUNDING_MODE")&&(R(n=e[t],0,8,t),x=n),e.hasOwnProperty(t="EXPONENTIAL_AT")&&((n=e[t])&&n.pop?(R(n[0],-m,0,t),R(n[1],0,m,t),D=n[0],A=n[1]):(R(n,-m,m,t),D=-(A=n<0?-n:n))),e.hasOwnProperty(t="RANGE"))if((n=e[t])&&n.pop)R(n[0],-m,-1,t),R(n[1],1,m,t),F=n[0],Y=n[1];else{if(R(n,-m,m,t),!n)throw Error(o+t+" cannot be zero: "+n);F=-(Y=n<0?-n:n)}if(e.hasOwnProperty(t="CRYPTO")){if((n=e[t])!==!!n)throw Error(o+t+" not true or false: "+n);if(n){if("undefined"==typeof crypto||!crypto||!crypto.getRandomValues&&!crypto.randomBytes)throw H=!n,Error(o+"crypto unavailable");H=n}else H=n}if(e.hasOwnProperty(t="MODULO_MODE")&&(R(n=e[t],0,9,t),k=n),e.hasOwnProperty(t="POW_PRECISION")&&(R(n=e[t],0,m,t),V=n),e.hasOwnProperty(t="FORMAT")){if("object"!=typeof(n=e[t]))throw Error(o+t+" not an object: "+n);U=n}if(e.hasOwnProperty(t="ALPHABET")){if("string"!=typeof(n=e[t])||/^.$|[+-.\s]|(.).*\1/.test(n))throw Error(o+t+" invalid: "+n);W=n}}return{DECIMAL_PLACES:P,ROUNDING_MODE:x,EXPONENTIAL_AT:[D,A],RANGE:[F,Y],CRYPTO:H,MODULO_MODE:k,POW_PRECISION:V,FORMAT:U,ALPHABET:W}},X.isBigNumber=function(e){return e instanceof X||e&&!0===e._isBigNumber||!1},X.maximum=X.max=function(){return Z(arguments,_.lt)},X.minimum=X.min=function(){return Z(arguments,_.gt)},X.random=(T=9007199254740992,O=Math.random()*T&2097151?function(){return s(Math.random()*T)}:function(){return 8388608*(1073741824*Math.random()|0)+(8388608*Math.random()|0)},function(e){var t,n,r,a,l,u=0,d=[],g=new X(I);if(null==e?e=P:R(e,0,m),a=i(e/c),H)if(crypto.getRandomValues){for(t=crypto.getRandomValues(new Uint32Array(a*=2));u<a;)9e15<=(l=131072*t[u]+(t[u+1]>>>11))?(n=crypto.getRandomValues(new Uint32Array(2)),t[u]=n[0],t[u+1]=n[1]):(d.push(l%1e14),u+=2);u=a/2}else{if(!crypto.randomBytes)throw H=!1,Error(o+"crypto unavailable");for(t=crypto.randomBytes(a*=7);u<a;)9e15<=(l=281474976710656*(31&t[u])+1099511627776*t[u+1]+4294967296*t[u+2]+16777216*t[u+3]+(t[u+4]<<16)+(t[u+5]<<8)+t[u+6])?crypto.randomBytes(7).copy(t,u):(d.push(l%1e14),u+=7);u=a/7}if(!H)for(;u<a;)(l=O())<9e15&&(d[u++]=l%1e14);for(a=d[--u],e%=c,a&&e&&(l=h[c-e],d[u]=s(a/l)*l);0===d[u];d.pop(),u--);if(u<0)d=[r=0];else{for(r=-1;0===d[0];d.splice(0,1),r-=c);for(u=1,l=d[0];10<=l;l/=10,u++);u<c&&(r-=c-u)}return g.e=r,g.c=d,g}),X.sum=function(){for(var e=1,t=arguments,n=new X(t[0]);e<t.length;)n=n.plus(t[e++]);return n},b=function(){var e="0123456789";function t(e,t,n,r){for(var i,s,o=[0],a=0,l=e.length;a<l;){for(s=o.length;s--;o[s]*=t);for(o[0]+=r.indexOf(e.charAt(a++)),i=0;i<o.length;i++)o[i]>n-1&&(null==o[i+1]&&(o[i+1]=0),o[i+1]+=o[i]/n|0,o[i]%=n)}return o.reverse()}return function(r,i,s,o,a){var l,c,u,h,d,m,g,f,R=r.indexOf("."),y=P,M=x;for(0<=R&&(h=V,V=0,r=r.replace(".",""),m=(f=new X(i)).pow(r.length-R),V=h,f.c=t(S(p(m.c),m.e,"0"),10,s,e),f.e=f.c.length),u=h=(g=t(r,i,s,a?(l=W,e):(l=e,W))).length;0==g[--h];g.pop());if(!g[0])return l.charAt(0);if(R<0?--u:(m.c=g,m.e=u,m.s=o,g=(m=n(m,f,y,M,s)).c,d=m.r,u=m.e),R=g[c=u+y+1],h=s/2,d=d||c<0||null!=g[c+1],d=M<4?(null!=R||d)&&(0==M||M==(m.s<0?3:2)):h<R||R==h&&(4==M||d||6==M&&1&g[c-1]||M==(m.s<0?8:7)),c<1||!g[0])r=d?S(l.charAt(1),-y,l.charAt(0)):l.charAt(0);else{if(g.length=c,d)for(--s;++g[--c]>s;)g[c]=0,c||(++u,g=[1].concat(g));for(h=g.length;!g[--h];);for(R=0,r="";R<=h;r+=l.charAt(g[R++]));r=S(r,u,l.charAt(0))}return r}}(),n=function(){function e(e,t,n){var r,i,s,o,a=0,l=e.length,c=t%d,u=t/d|0;for(e=e.slice();l--;)a=((i=c*(s=e[l]%d)+(r=u*s+(o=e[l]/d|0)*c)%d*d+a)/n|0)+(r/d|0)+u*o,e[l]=i%n;return a&&(e=[a].concat(e)),e}function t(e,t,n,r){var i,s;if(n!=r)s=r<n?1:-1;else for(i=s=0;i<n;i++)if(e[i]!=t[i]){s=e[i]>t[i]?1:-1;break}return s}function n(e,t,n,r){for(var i=0;n--;)e[n]-=i,i=e[n]<t[n]?1:0,e[n]=i*r+e[n]-t[n];for(;!e[0]&&1<e.length;e.splice(0,1));}return function(r,i,o,a,u){var h,d,m,p,f,R,y,M,S,b,w,T,O,v,E,C,L,N=r.s==i.s?1:-1,_=r.c,I=i.c;if(!(_&&_[0]&&I&&I[0]))return new X(r.s&&i.s&&(_?!I||_[0]!=I[0]:I)?_&&0==_[0]||!I?0*N:N/0:NaN);for(S=(M=new X(N)).c=[],N=o+(d=r.e-i.e)+1,u||(u=l,d=g(r.e/c)-g(i.e/c),N=N/c|0),m=0;I[m]==(_[m]||0);m++);if(I[m]>(_[m]||0)&&d--,N<0)S.push(1),p=!0;else{for(v=_.length,C=I.length,N+=2,1<(f=s(u/(I[m=0]+1)))&&(I=e(I,f,u),_=e(_,f,u),C=I.length,v=_.length),O=C,w=(b=_.slice(0,C)).length;w<C;b[w++]=0);L=I.slice(),L=[0].concat(L),E=I[0],I[1]>=u/2&&E++;do{if(f=0,(h=t(I,b,C,w))<0){if(T=b[0],C!=w&&(T=T*u+(b[1]||0)),1<(f=s(T/E)))for(u<=f&&(f=u-1),y=(R=e(I,f,u)).length,w=b.length;1==t(R,b,y,w);)f--,n(R,C<y?L:I,y,u),y=R.length,h=1;else 0==f&&(h=f=1),y=(R=I.slice()).length;if(y<w&&(R=[0].concat(R)),n(b,R,w,u),w=b.length,-1==h)for(;t(I,b,C,w)<1;)f++,n(b,C<w?L:I,w,u),w=b.length}else 0===h&&(f++,b=[0]);S[m++]=f,b[0]?b[w++]=_[O]||0:(b=[_[O]],w=1)}while((O++<v||null!=b[0])&&N--);p=null!=b[0],S[0]||S.splice(0,1)}if(u==l){for(m=1,N=S[0];10<=N;N/=10,m++);K(M,o+(M.e=m+d*c-1)+1,a,p)}else M.e=d,M.r=+p;return M}}(),v=/^(-?)0([xbo])(?=\w[\w.]*$)/i,E=/^([^.]+)\.$/,C=/^\.([^.]+)$/,L=/^-?(Infinity|NaN)$/,N=/^\s*\+(?=[\w.])|^\s+|\s+$/g,w=function(e,t,n,r){var i,s=n?t:t.replace(N,"");if(L.test(s))e.s=isNaN(s)?null:s<0?-1:1,e.c=e.e=null;else{if(!n&&(s=s.replace(v,(function(e,t,n){return i="x"==(n=n.toLowerCase())?16:"b"==n?2:8,r&&r!=i?e:t})),r&&(i=r,s=s.replace(E,"$1").replace(C,"0.$1")),t!=s))return new X(s,i);if(X.DEBUG)throw Error(o+"Not a"+(r?" base "+r:"")+" number: "+t);e.c=e.e=e.s=null}},_.absoluteValue=_.abs=function(){var e=new X(this);return e.s<0&&(e.s=1),e},_.comparedTo=function(e,t){return f(this,new X(e,t))},_.decimalPlaces=_.dp=function(e,t){var n,r,i;if(null!=e)return R(e,0,m),null==t?t=x:R(t,0,8),K(new X(this),e+this.e+1,t);if(!(n=this.c))return null;if(r=((i=n.length-1)-g(this.e/c))*c,i=n[i])for(;i%10==0;i/=10,r--);return r<0&&(r=0),r},_.dividedBy=_.div=function(e,t){return n(this,new X(e,t),P,x)},_.dividedToIntegerBy=_.idiv=function(e,t){return n(this,new X(e,t),0,1)},_.exponentiatedBy=_.pow=function(e,t){var n,r,a,l,u,h,d,m,g=this;if((e=new X(e)).c&&!e.isInteger())throw Error(o+"Exponent not an integer: "+G(e));if(null!=t&&(t=new X(t)),u=14<e.e,!g.c||!g.c[0]||1==g.c[0]&&!g.e&&1==g.c.length||!e.c||!e.c[0])return m=new X(Math.pow(+G(g),u?2-y(e):+G(e))),t?m.mod(t):m;if(h=e.s<0,t){if(t.c?!t.c[0]:!t.s)return new X(NaN);(r=!h&&g.isInteger()&&t.isInteger())&&(g=g.mod(t))}else{if(9<e.e&&(0<g.e||g.e<-1||(0==g.e?1<g.c[0]||u&&24e7<=g.c[1]:g.c[0]<8e13||u&&g.c[0]<=9999975e7)))return l=g.s<0&&y(e)?-0:0,-1<g.e&&(l=1/l),new X(h?1/l:l);V&&(l=i(V/c+2))}for(d=u?(n=new X(.5),h&&(e.s=1),y(e)):(a=Math.abs(+G(e)))%2,m=new X(I);;){if(d){if(!(m=m.times(g)).c)break;l?m.c.length>l&&(m.c.length=l):r&&(m=m.mod(t))}if(a){if(0===(a=s(a/2)))break;d=a%2}else if(K(e=e.times(n),e.e+1,1),14<e.e)d=y(e);else{if(0==(a=+G(e)))break;d=a%2}g=g.times(g),l?g.c&&g.c.length>l&&(g.c.length=l):r&&(g=g.mod(t))}return r?m:(h&&(m=I.div(m)),t?m.mod(t):l?K(m,V,x,void 0):m)},_.integerValue=function(e){var t=new X(this);return null==e?e=x:R(e,0,8),K(t,t.e+1,e)},_.isEqualTo=_.eq=function(e,t){return 0===f(this,new X(e,t))},_.isFinite=function(){return!!this.c},_.isGreaterThan=_.gt=function(e,t){return 0<f(this,new X(e,t))},_.isGreaterThanOrEqualTo=_.gte=function(e,t){return 1===(t=f(this,new X(e,t)))||0===t},_.isInteger=function(){return!!this.c&&g(this.e/c)>this.c.length-2},_.isLessThan=_.lt=function(e,t){return f(this,new X(e,t))<0},_.isLessThanOrEqualTo=_.lte=function(e,t){return-1===(t=f(this,new X(e,t)))||0===t},_.isNaN=function(){return!this.s},_.isNegative=function(){return this.s<0},_.isPositive=function(){return 0<this.s},_.isZero=function(){return!!this.c&&0==this.c[0]},_.minus=function(e,t){var n,r,i,s,o=this,a=o.s;if(t=(e=new X(e,t)).s,!a||!t)return new X(NaN);if(a!=t)return e.s=-t,o.plus(e);var u=o.e/c,h=e.e/c,d=o.c,m=e.c;if(!u||!h){if(!d||!m)return d?(e.s=-t,e):new X(m?o:NaN);if(!d[0]||!m[0])return m[0]?(e.s=-t,e):new X(d[0]?o:3==x?-0:0)}if(u=g(u),h=g(h),d=d.slice(),a=u-h){for((i=(s=a<0)?(a=-a,d):(h=u,m)).reverse(),t=a;t--;i.push(0));i.reverse()}else for(r=(s=(a=d.length)<(t=m.length))?a:t,a=t=0;t<r;t++)if(d[t]!=m[t]){s=d[t]<m[t];break}if(s&&(i=d,d=m,m=i,e.s=-e.s),0<(t=(r=m.length)-(n=d.length)))for(;t--;d[n++]=0);for(t=l-1;a<r;){if(d[--r]<m[r]){for(n=r;n&&!d[--n];d[n]=t);--d[n],d[r]+=l}d[r]-=m[r]}for(;0==d[0];d.splice(0,1),--h);return d[0]?Q(e,d,h):(e.s=3==x?-1:1,e.c=[e.e=0],e)},_.modulo=_.mod=function(e,t){var r,i,s=this;return e=new X(e,t),!s.c||!e.s||e.c&&!e.c[0]?new X(NaN):!e.c||s.c&&!s.c[0]?new X(s):(9==k?(i=e.s,e.s=1,r=n(s,e,0,3),e.s=i,r.s*=i):r=n(s,e,0,k),(e=s.minus(r.times(e))).c[0]||1!=k||(e.s=s.s),e)},_.multipliedBy=_.times=function(e,t){var n,r,i,s,o,a,u,h,m,p,f,R,y,M,S,b=this,w=b.c,T=(e=new X(e,t)).c;if(!(w&&T&&w[0]&&T[0]))return!b.s||!e.s||w&&!w[0]&&!T||T&&!T[0]&&!w?e.c=e.e=e.s=null:(e.s*=b.s,w&&T?(e.c=[0],e.e=0):e.c=e.e=null),e;for(r=g(b.e/c)+g(e.e/c),e.s*=b.s,(u=w.length)<(p=T.length)&&(y=w,w=T,T=y,i=u,u=p,p=i),i=u+p,y=[];i--;y.push(0));for(M=l,S=d,i=p;0<=--i;){for(n=0,f=T[i]%S,R=T[i]/S|0,s=i+(o=u);i<s;)n=((h=f*(h=w[--o]%S)+(a=R*h+(m=w[o]/S|0)*f)%S*S+y[s]+n)/M|0)+(a/S|0)+R*m,y[s--]=h%M;y[s]=n}return n?++r:y.splice(0,1),Q(e,y,r)},_.negated=function(){var e=new X(this);return e.s=-e.s||null,e},_.plus=function(e,t){var n,r=this,i=r.s;if(t=(e=new X(e,t)).s,!i||!t)return new X(NaN);if(i!=t)return e.s=-t,r.minus(e);var s=r.e/c,o=e.e/c,a=r.c,u=e.c;if(!s||!o){if(!a||!u)return new X(i/0);if(!a[0]||!u[0])return u[0]?e:new X(a[0]?r:0*i)}if(s=g(s),o=g(o),a=a.slice(),i=s-o){for((n=0<i?(o=s,u):(i=-i,a)).reverse();i--;n.push(0));n.reverse()}for((i=a.length)-(t=u.length)<0&&(n=u,u=a,a=n,t=i),i=0;t;)i=(a[--t]=a[t]+u[t]+i)/l|0,a[t]=l===a[t]?0:a[t]%l;return i&&(a=[i].concat(a),++o),Q(e,a,o)},_.precision=_.sd=function(e,t){var n,r,i;if(null!=e&&e!==!!e)return R(e,1,m),null==t?t=x:R(t,0,8),K(new X(this),e,t);if(!(n=this.c))return null;if(r=(i=n.length-1)*c+1,i=n[i]){for(;i%10==0;i/=10,r--);for(i=n[0];10<=i;i/=10,r++);}return e&&this.e+1>r&&(r=this.e+1),r},_.shiftedBy=function(e){return R(e,-u,u),this.times("1e"+e)},_.squareRoot=_.sqrt=function(){var e,t,r,i,s,o=this,a=o.c,l=o.s,c=o.e,u=P+4,h=new X("0.5");if(1!==l||!a||!a[0])return new X(!l||l<0&&(!a||a[0])?NaN:a?o:1/0);if((r=0==(l=Math.sqrt(+G(o)))||l==1/0?(((t=p(a)).length+c)%2==0&&(t+="0"),l=Math.sqrt(+t),c=g((c+1)/2)-(c<0||c%2),new X(t=l==1/0?"1e"+c:(t=l.toExponential()).slice(0,t.indexOf("e")+1)+c)):new X(l+"")).c[0])for((l=(c=r.e)+u)<3&&(l=0);;)if(s=r,r=h.times(s.plus(n(o,s,u,1))),p(s.c).slice(0,l)===(t=p(r.c)).slice(0,l)){if(r.e<c&&--l,"9999"!=(t=t.slice(l-3,l+1))&&(i||"4999"!=t)){+t&&(+t.slice(1)||"5"!=t.charAt(0))||(K(r,r.e+P+2,1),e=!r.times(r).eq(o));break}if(!i&&(K(s,s.e+P+2,0),s.times(s).eq(o))){r=s;break}u+=4,l+=4,i=1}return K(r,r.e+P+1,x,e)},_.toExponential=function(e,t){return null!=e&&(R(e,0,m),e++),j(this,e,t,1)},_.toFixed=function(e,t){return null!=e&&(R(e,0,m),e=e+this.e+1),j(this,e,t)},_.toFormat=function(e,t,n){var r;if(null==n)null!=e&&t&&"object"==typeof t?(n=t,t=null):e&&"object"==typeof e?(n=e,e=t=null):n=U;else if("object"!=typeof n)throw Error(o+"Argument not an object: "+n);if(r=this.toFixed(e,t),this.c){var i,s=r.split("."),a=+n.groupSize,l=+n.secondaryGroupSize,c=n.groupSeparator||"",u=s[0],h=s[1],d=this.s<0,m=d?u.slice(1):u,g=m.length;if(l&&(i=a,a=l,g-=l=i),0<a&&0<g){for(i=g%a||a,u=m.substr(0,i);i<g;i+=a)u+=c+m.substr(i,a);0<l&&(u+=c+m.slice(i)),d&&(u="-"+u)}r=h?u+(n.decimalSeparator||"")+((l=+n.fractionGroupSize)?h.replace(new RegExp("\\d{"+l+"}\\B","g"),"$&"+(n.fractionGroupSeparator||"")):h):u}return(n.prefix||"")+r+(n.suffix||"")},_.toFraction=function(e){var t,r,i,s,a,l,u,d,m,g,f,R,y=this,M=y.c;if(null!=e&&(!(u=new X(e)).isInteger()&&(u.c||1!==u.s)||u.lt(I)))throw Error(o+"Argument "+(u.isInteger()?"out of range: ":"not an integer: ")+G(u));if(!M)return new X(y);for(t=new X(I),m=r=new X(I),i=d=new X(I),R=p(M),a=t.e=R.length-y.e-1,t.c[0]=h[(l=a%c)<0?c+l:l],e=!e||0<u.comparedTo(t)?0<a?t:m:u,l=Y,Y=1/0,u=new X(R),d.c[0]=0;g=n(u,t,0,1),1!=(s=r.plus(g.times(i))).comparedTo(e);)r=i,i=s,m=d.plus(g.times(s=m)),d=s,t=u.minus(g.times(s=t)),u=s;return s=n(e.minus(r),i,0,1),d=d.plus(s.times(m)),r=r.plus(s.times(i)),d.s=m.s=y.s,f=n(m,i,a*=2,x).minus(y).abs().comparedTo(n(d,r,a,x).minus(y).abs())<1?[m,i]:[d,r],Y=l,f},_.toNumber=function(){return+G(this)},_.toPrecision=function(e,t){return null!=e&&R(e,1,m),j(this,e,t,2)},_.toString=function(e){var t,n=this,r=n.s,i=n.e;return null===i?r?(t="Infinity",r<0&&(t="-"+t)):t="NaN":(t=null==e?i<=D||A<=i?M(p(n.c),i):S(p(n.c),i,"0"):10===e?S(p((n=K(new X(n),P+i+1,x)).c),n.e,"0"):(R(e,2,W.length,"Base"),b(S(p(n.c),i,"0"),10,e,r,!0)),r<0&&n.c[0]&&(t="-"+t)),t},_.valueOf=_.toJSON=function(){return G(this)},_._isBigNumber=!0,"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator&&(_[Symbol.toStringTag]="BigNumber",_[Symbol.for("nodejs.util.inspect.custom")]=_.valueOf),null!=t&&X.set(t),X}()).default=n.BigNumber=n,void 0!==t&&t.exports?t.exports=n:(e||(e="undefined"!=typeof self&&self?self:window),e.BigNumber=n)}(this)},{}],2:[function(e,t,n){"use strict";t.exports={languageTag:"en-US",delimiters:{thousands:",",decimal:"."},abbreviations:{thousand:"k",million:"m",billion:"b",trillion:"t"},spaceSeparated:!1,ordinal:function(e){var t=e%10;return 1==~~(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th"},currency:{symbol:"$",position:"prefix",code:"USD"},currencyFormat:{thousandSeparated:!0,totalLength:4,spaceSeparated:!0},formats:{fourDigits:{totalLength:4,spaceSeparated:!0},fullWithTwoDecimals:{output:"currency",thousandSeparated:!0,mantissa:2},fullWithTwoDecimalsNoCurrency:{thousandSeparated:!0,mantissa:2},fullWithNoDecimals:{output:"currency",thousandSeparated:!0,mantissa:0}}}},{}],3:[function(e,t,n){"use strict";function r(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=[],r=!0,i=!1,s=void 0;try{for(var o,a=e[Symbol.iterator]();!(r=(o=a.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,s=e}finally{try{r||null==a.return||a.return()}finally{if(i)throw s}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}var i=e("./globalState"),s=e("./validating"),o=e("./parsing"),a=["B","KB","MB","GB","TB","PB","EB","ZB","YB"],l={general:{scale:1024,suffixes:a,marker:"bd"},binary:{scale:1024,suffixes:["B","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"],marker:"b"},decimal:{scale:1e3,suffixes:a,marker:"d"}},c={totalLength:0,characteristic:0,forceAverage:!1,average:!1,mantissa:-1,optionalMantissa:!0,thousandSeparated:!1,spaceSeparated:!1,negative:"sign",forceSign:!1};function u(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},n=2<arguments.length?arguments[2]:void 0;if("string"==typeof t&&(t=o.parseFormat(t)),!s.validateFormat(t))return"ERROR: invalid format";var r=t.prefix||"",a=t.postfix||"",u=function(e,t,n){switch(t.output){case"currency":return t=p(t,i.currentCurrencyDefaultFormat()),function(e,t,n){var r=n.currentCurrency(),i=Object.assign({},c,t),s=void 0,o="",a=!!i.totalLength||!!i.forceAverage||i.average,l=t.currencyPosition||r.position,u=t.currencySymbol||r.symbol;i.spaceSeparated&&(o=" "),"infix"===l&&(s=o+u+o);var h=g({instance:e,providedFormat:t,state:n,decimalSeparator:s});return"prefix"===l&&(h=e._value<0&&"sign"===i.negative?"-".concat(o).concat(u).concat(h.slice(1)):u+o+h),l&&"postfix"!==l||(h=h+(o=a?"":o)+u),h}(e,t,i);case"percent":return t=p(t,i.currentPercentageDefaultFormat()),function(e,t,n,r){var i=t.prefixSymbol,s=g({instance:r(100*e._value),providedFormat:t,state:n}),o=Object.assign({},c,t);return i?"%".concat(o.spaceSeparated?" ":"").concat(s):"".concat(s).concat(o.spaceSeparated?" ":"","%")}(e,t,i,n);case"byte":return t=p(t,i.currentByteDefaultFormat()),S=e,w=i,T=n,O=(b=t).base||"binary",v=l[O],E=h(S._value,v.suffixes,v.scale),C=E.value,L=E.suffix,N=g({instance:T(C),providedFormat:b,state:w,defaults:w.currentByteDefaultFormat()}),_=w.currentAbbreviations(),"".concat(N).concat(_.spaced?" ":"").concat(L);case"time":return t=p(t,i.currentTimeDefaultFormat()),f=e,R=Math.floor(f._value/60/60),y=Math.floor((f._value-60*R*60)/60),M=Math.round(f._value-60*R*60-60*y),"".concat(R,":").concat(y<10?"0":"").concat(y,":").concat(M<10?"0":"").concat(M);case"ordinal":return t=p(t,i.currentOrdinalDefaultFormat()),r=e,s=t,a=(o=i).currentOrdinal(),u=Object.assign({},c,s),d=g({instance:r,providedFormat:s,state:o}),m=a(r._value),"".concat(d).concat(u.spaceSeparated?" ":"").concat(m);case"number":default:return g({instance:e,providedFormat:t,numbro:n})}var r,s,o,a,u,d,m,f,R,y,M,S,b,w,T,O,v,E,C,L,N,_}(e,t,n);return(u=r+u)+a}function h(e,t,n){var r=t[0],i=Math.abs(e);if(n<=i){for(var s=1;s<t.length;++s){var o=Math.pow(n,s),a=Math.pow(n,s+1);if(o<=i&&i<a){r=t[s],e/=o;break}}r===t[0]&&(e/=Math.pow(n,t.length-1),r=t[t.length-1])}return{value:e,suffix:r}}function d(e){for(var t="",n=0;n<e;n++)t+="0";return t}function m(e,t){return-1!==e.toString().indexOf("e")?function(e,t){var n=e.toString(),i=r(n.split("e"),2),s=i[0],o=i[1],a=r(s.split("."),2),l=a[0],c=a[1],u=void 0===c?"":c;if(0<+o)n=l+u+d(o-u.length);else{var h=".";h=+l<0?"-0".concat(h):"0".concat(h);var m=(d(-o-1)+Math.abs(l)+u).substr(0,t);m.length<t&&(m+=d(t-m.length)),n=h+m}return 0<+o&&0<t&&(n+=".".concat(d(t))),n}(e,t):(Math.round(+"".concat(e,"e+").concat(t))/Math.pow(10,t)).toFixed(t)}function g(e){var t=e.instance,n=e.providedFormat,s=e.state,o=void 0===s?i:s,a=e.decimalSeparator,l=e.defaults,u=void 0===l?o.currentDefaults():l,h=t._value;if(0===h&&o.hasZeroFormat())return o.getZeroFormat();if(!isFinite(h))return h.toString();var d,g,p,f,R,y,M,S,b=Object.assign({},c,u,n),w=b.totalLength,T=w?0:b.characteristic,O=b.optionalCharacteristic,v=b.forceAverage,E=!!w||!!v||b.average,C=w?-1:E&&void 0===n.mantissa?0:b.mantissa,L=!w&&(void 0===n.optionalMantissa?-1===C:b.optionalMantissa),N=b.trimMantissa,_=b.thousandSeparated,I=b.spaceSeparated,P=b.negative,x=b.forceSign,D=b.exponential,A="";if(E){var F=function(e){var t=e.value,n=e.forceAverage,r=e.abbreviations,i=e.spaceSeparated,s=void 0!==i&&i,o=e.totalLength,a=void 0===o?0:o,l="",c=Math.abs(t),u=-1;if(c>=Math.pow(10,12)&&!n||"trillion"===n?(l=r.trillion,t/=Math.pow(10,12)):c<Math.pow(10,12)&&c>=Math.pow(10,9)&&!n||"billion"===n?(l=r.billion,t/=Math.pow(10,9)):c<Math.pow(10,9)&&c>=Math.pow(10,6)&&!n||"million"===n?(l=r.million,t/=Math.pow(10,6)):(c<Math.pow(10,6)&&c>=Math.pow(10,3)&&!n||"thousand"===n)&&(l=r.thousand,t/=Math.pow(10,3)),l&&(l=(s?" ":"")+l),a){var h=t.toString().split(".")[0];u=Math.max(a-h.length,0)}return{value:t,abbreviation:l,mantissaPrecision:u}}({value:h,forceAverage:v,abbreviations:o.currentAbbreviations(),spaceSeparated:I,totalLength:w});h=F.value,A+=F.abbreviation,w&&(C=F.mantissaPrecision)}if(D){var Y=(g=(d={value:h,characteristicPrecision:T}).value,p=d.characteristicPrecision,f=void 0===p?0:p,R=r(g.toExponential().split("e"),2),y=R[0],M=R[1],S=+y,f&&1<f&&(S*=Math.pow(10,f-1),M=0<=(M=+M-(f-1))?"+".concat(M):M),{value:S,abbreviation:"e".concat(M)});h=Y.value,A=Y.abbreviation+A}var H,k,V,U=function(e,t,n,i,s){if(-1===i)return e;var o=m(t,i),a=r(o.toString().split("."),2),l=a[0],c=a[1],u=void 0===c?"":c;if(u.match(/^0+$/)&&(n||s))return l;var h=u.match(/0+$/);return s&&h?"".concat(l,".").concat(u.toString().slice(0,h.index)):o.toString()}(h.toString(),h,L,C,N);return U=function(e,t,n,r,i){var s=r.currentDelimiters(),o=s.thousands;i=i||s.decimal;var a=s.thousandsSize||3,l=e.toString(),c=l.split(".")[0],u=l.split(".")[1];return n&&(t<0&&(c=c.slice(1)),function(e,t){for(var n=[],r=0,i=e;0<i;i--)r===t&&(n.unshift(i),r=0),r++;return n}(c.length,a).forEach((function(e,t){c=c.slice(0,e+t)+o+c.slice(e+t)})),t<0&&(c="-".concat(c))),u?c+i+u:c}(U=function(e,t,n,i){var s=e,o=r(s.toString().split("."),2),a=o[0],l=o[1];if(a.match(/^-?0$/)&&n)return l?"".concat(a.replace("0",""),".").concat(l):a.replace("0","");if(a.length<i)for(var c=i-a.length,u=0;u<c;u++)s="0".concat(s);return s.toString()}(U,0,O,T),h,_,o,a),(E||D)&&(U+=A),(x||h<0)&&(H=U,V=P,U=0===(k=h)?H:0==+H?H.replace("-",""):0<k?"+".concat(H):"sign"===V?H:"(".concat(H.replace("-",""),")")),U}function p(e,t){if(!e)return t;var n=Object.keys(e);return 1===n.length&&"output"===n[0]?t:e}t.exports=function(e){return{format:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return u.apply(void 0,n.concat([e]))},getByteUnit:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return function(e){var t=l.general;return h(e._value,t.suffixes,t.scale).suffix}.apply(void 0,n.concat([e]))},getBinaryByteUnit:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return function(e){var t=l.binary;return h(e._value,t.suffixes,t.scale).suffix}.apply(void 0,n.concat([e]))},getDecimalByteUnit:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return function(e){var t=l.decimal;return h(e._value,t.suffixes,t.scale).suffix}.apply(void 0,n.concat([e]))},formatOrDefault:p}}},{"./globalState":4,"./parsing":8,"./validating":10}],4:[function(e,t,n){"use strict";var r=e("./en-US"),i=e("./validating"),s=e("./parsing"),o={},a=void 0,l={},c=null,u={};function h(e){a=e}function d(){return l[a]}o.languages=function(){return Object.assign({},l)},o.currentLanguage=function(){return a},o.currentCurrency=function(){return d().currency},o.currentAbbreviations=function(){return d().abbreviations},o.currentDelimiters=function(){return d().delimiters},o.currentOrdinal=function(){return d().ordinal},o.currentDefaults=function(){return Object.assign({},d().defaults,u)},o.currentOrdinalDefaultFormat=function(){return Object.assign({},o.currentDefaults(),d().ordinalFormat)},o.currentByteDefaultFormat=function(){return Object.assign({},o.currentDefaults(),d().byteFormat)},o.currentPercentageDefaultFormat=function(){return Object.assign({},o.currentDefaults(),d().percentageFormat)},o.currentCurrencyDefaultFormat=function(){return Object.assign({},o.currentDefaults(),d().currencyFormat)},o.currentTimeDefaultFormat=function(){return Object.assign({},o.currentDefaults(),d().timeFormat)},o.setDefaults=function(e){e=s.parseFormat(e),i.validateFormat(e)&&(u=e)},o.getZeroFormat=function(){return c},o.setZeroFormat=function(e){return c="string"==typeof e?e:null},o.hasZeroFormat=function(){return null!==c},o.languageData=function(e){if(e){if(l[e])return l[e];throw new Error('Unknown tag "'.concat(e,'"'))}return d()},o.registerLanguage=function(e){var t=1<arguments.length&&void 0!==arguments[1]&&arguments[1];if(!i.validateLanguage(e))throw new Error("Invalid language data");l[e.languageTag]=e,t&&h(e.languageTag)},o.setLanguage=function(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:r.languageTag;if(!l[e]){var n=e.split("-")[0],i=Object.keys(l).find((function(e){return e.split("-")[0]===n}));return l[i]?void h(i):void h(t)}h(e)},o.registerLanguage(r),a=r.languageTag,t.exports=o},{"./en-US":2,"./parsing":8,"./validating":10}],5:[function(e,t,n){"use strict";t.exports=function(t){return{loadLanguagesInNode:function(n){return r=t,void n.forEach((function(t){var n=void 0;try{n=e("../languages/".concat(t))}catch(n){console.error('Unable to load "'.concat(t,'". No matching language file found.'))}n&&r.registerLanguage(n)}));var r}}}},{}],6:[function(e,t,n){"use strict";var r=e("bignumber.js");function i(e,t,n){var i=new r(e._value),s=t;return n.isNumbro(t)&&(s=t._value),s=new r(s),e._value=i.minus(s).toNumber(),e}t.exports=function(e){return{add:function(t,n){return s=n,o=e,a=new r((i=t)._value),l=s,o.isNumbro(s)&&(l=s._value),l=new r(l),i._value=a.plus(l).toNumber(),i;var i,s,o,a,l},subtract:function(t,n){return i(t,n,e)},multiply:function(t,n){return s=n,o=e,a=new r((i=t)._value),l=s,o.isNumbro(s)&&(l=s._value),l=new r(l),i._value=a.times(l).toNumber(),i;var i,s,o,a,l},divide:function(t,n){return s=n,o=e,a=new r((i=t)._value),l=s,o.isNumbro(s)&&(l=s._value),l=new r(l),i._value=a.dividedBy(l).toNumber(),i;var i,s,o,a,l},set:function(t,n){return r=t,s=i=n,e.isNumbro(i)&&(s=i._value),r._value=s,r;var r,i,s},difference:function(t,n){return r=n,i(o=(s=e)(t._value),r,s),Math.abs(o._value);var r,s,o}}}},{"bignumber.js":1}],7:[function(e,t,n){"use strict";function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var i=e("./globalState"),s=e("./validating"),o=e("./loading")(m),a=e("./unformatting"),l=e("./formatting")(m),c=e("./manipulating")(m),u=e("./parsing"),h=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._value=t}var t,n,s;return t=e,(n=[{key:"clone",value:function(){return m(this._value)}},{key:"format",value:function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};return l.format(this,e)}},{key:"formatCurrency",value:function(e){return"string"==typeof e&&(e=u.parseFormat(e)),(e=l.formatOrDefault(e,i.currentCurrencyDefaultFormat())).output="currency",l.format(this,e)}},{key:"formatTime",value:function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};return e.output="time",l.format(this,e)}},{key:"binaryByteUnits",value:function(){return l.getBinaryByteUnit(this)}},{key:"decimalByteUnits",value:function(){return l.getDecimalByteUnit(this)}},{key:"byteUnits",value:function(){return l.getByteUnit(this)}},{key:"difference",value:function(e){return c.difference(this,e)}},{key:"add",value:function(e){return c.add(this,e)}},{key:"subtract",value:function(e){return c.subtract(this,e)}},{key:"multiply",value:function(e){return c.multiply(this,e)}},{key:"divide",value:function(e){return c.divide(this,e)}},{key:"set",value:function(e){return c.set(this,d(e))}},{key:"value",value:function(){return this._value}},{key:"valueOf",value:function(){return this._value}}])&&r(t.prototype,n),s&&r(t,s),e}();function d(e){var t=e;return m.isNumbro(e)?t=e._value:"string"==typeof e?t=m.unformat(e):isNaN(e)&&(t=NaN),t}function m(e){return new h(d(e))}m.version="2.1.2",m.isNumbro=function(e){return e instanceof h},m.language=i.currentLanguage,m.registerLanguage=i.registerLanguage,m.setLanguage=i.setLanguage,m.languages=i.languages,m.languageData=i.languageData,m.zeroFormat=i.setZeroFormat,m.defaultFormat=i.currentDefaults,m.setDefaults=i.setDefaults,m.defaultCurrencyFormat=i.currentCurrencyDefaultFormat,m.validate=s.validate,m.loadLanguagesInNode=o.loadLanguagesInNode,m.unformat=a.unformat,t.exports=m},{"./formatting":3,"./globalState":4,"./loading":5,"./manipulating":6,"./parsing":8,"./unformatting":9,"./validating":10}],8:[function(e,t,n){"use strict";t.exports={parseFormat:function(e){var t,n,r,i,s,o,a,l,c,u,h,d,m,g,p,f,R,y,M,S,b=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{};return"string"!=typeof e?e:(n=b,e=(r=(t=e).match(/^{([^}]*)}/))?(n.prefix=r[1],t.slice(r[0].length)):t,s=b,function(e,t){if(-1===e.indexOf("$")){if(-1===e.indexOf("%"))return-1!==e.indexOf("bd")?(t.output="byte",t.base="general"):-1!==e.indexOf("b")?(t.output="byte",t.base="binary"):-1!==e.indexOf("d")?(t.output="byte",t.base="decimal"):-1===e.indexOf(":")?-1!==e.indexOf("o")&&(t.output="ordinal"):t.output="time";t.output="percent"}else t.output="currency"}(e=(o=(i=e).match(/{([^}]*)}$/))?(s.postfix=o[1],i.slice(0,-o[0].length)):i,b),a=b,(l=e.match(/[1-9]+[0-9]*/))&&(a.totalLength=+l[0]),c=b,(u=e.split(".")[0].match(/0+/))&&(c.characteristic=u[0].length),function(e,t){if(-1!==e.indexOf(".")){var n=e.split(".")[0];t.optionalCharacteristic=-1===n.indexOf("0")}}(e,b),h=b,-1!==e.indexOf("a")&&(h.average=!0),m=b,-1!==(d=e).indexOf("K")?m.forceAverage="thousand":-1!==d.indexOf("M")?m.forceAverage="million":-1!==d.indexOf("B")?m.forceAverage="billion":-1!==d.indexOf("T")&&(m.forceAverage="trillion"),function(e,t){var n=e.split(".")[1];if(n){var r=n.match(/0+/);r&&(t.mantissa=r[0].length)}}(e,b),p=b,(g=e).match(/\[\.]/)?p.optionalMantissa=!0:g.match(/\./)&&(p.optionalMantissa=!1),f=b,-1!==e.indexOf(",")&&(f.thousandSeparated=!0),R=b,-1!==e.indexOf(" ")&&(R.spaceSeparated=!0),M=b,(y=e).match(/^\+?\([^)]*\)$/)&&(M.negative="parenthesis"),y.match(/^\+?-/)&&(M.negative="sign"),S=b,e.match(/^\+/)&&(S.forceSign=!0),b)}}},{}],9:[function(e,t,n){"use strict";var r=[{key:"ZiB",factor:Math.pow(1024,7)},{key:"ZB",factor:Math.pow(1e3,7)},{key:"YiB",factor:Math.pow(1024,8)},{key:"YB",factor:Math.pow(1e3,8)},{key:"TiB",factor:Math.pow(1024,4)},{key:"TB",factor:Math.pow(1e3,4)},{key:"PiB",factor:Math.pow(1024,5)},{key:"PB",factor:Math.pow(1e3,5)},{key:"MiB",factor:Math.pow(1024,2)},{key:"MB",factor:Math.pow(1e3,2)},{key:"KiB",factor:Math.pow(1024,1)},{key:"KB",factor:Math.pow(1e3,1)},{key:"GiB",factor:Math.pow(1024,3)},{key:"GB",factor:Math.pow(1e3,3)},{key:"EiB",factor:Math.pow(1024,6)},{key:"EB",factor:Math.pow(1e3,6)},{key:"B",factor:1}];function i(e){return e.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&")}function s(e,t){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:"",s=3<arguments.length?arguments[3]:void 0,o=4<arguments.length?arguments[4]:void 0,a=5<arguments.length?arguments[5]:void 0,l=6<arguments.length?arguments[6]:void 0;if(""!==e)return e===o?0:function e(t,n){var s=2<arguments.length&&void 0!==arguments[2]?arguments[2]:"",o=3<arguments.length?arguments[3]:void 0,a=4<arguments.length?arguments[4]:void 0,l=5<arguments.length?arguments[5]:void 0,c=6<arguments.length?arguments[6]:void 0;if(!isNaN(+t))return+t;var u="",h=t.replace(/(^[^(]*)\((.*)\)([^)]*$)/,"$1$2$3");if(h!==t)return-1*e(h,n,s,o,a,l,c);for(var d=0;d<r.length;d++){var m=r[d];if((u=t.replace(m.key,""))!==t)return e(u,n,s,o,a,l,c)*m.factor}if((u=t.replace("%",""))!==t)return e(u,n,s,o,a,l,c)/100;var g=parseFloat(t);if(!isNaN(g)){var p=o(g);if(p&&"."!==p&&(u=t.replace(new RegExp("".concat(i(p),"$")),""))!==t)return e(u,n,s,o,a,l,c);var f={};Object.keys(l).forEach((function(e){f[l[e]]=e}));for(var R=Object.keys(f).sort().reverse(),y=R.length,M=0;M<y;M++){var S=R[M],b=f[S];if((u=t.replace(S,""))!==t){var w=void 0;switch(b){case"thousand":w=Math.pow(10,3);break;case"million":w=Math.pow(10,6);break;case"billion":w=Math.pow(10,9);break;case"trillion":w=Math.pow(10,12)}return e(u,n,s,o,a,l,c)*w}}}}(function(e,t){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:"",r=e.replace(n,"");return(r=r.replace(new RegExp("([0-9])".concat(i(t.thousands),"([0-9])"),"g"),"$1$2")).replace(t.decimal,".")}(e,t,n),t,n,s,o,a,l)}t.exports={unformat:function(t,n){var r,i,o,a=e("./globalState"),l=a.currentDelimiters(),c=a.currentCurrency().symbol,u=a.currentOrdinal(),h=a.getZeroFormat(),d=a.currentAbbreviations(),m=void 0;if("string"==typeof t)m=function(e,t){if(!e.indexOf(":")||":"===t.thousands)return!1;var n=e.split(":");if(3!==n.length)return!1;var r=+n[0],i=+n[1],s=+n[2];return!isNaN(r)&&!isNaN(i)&&!isNaN(s)}(t,l)?(r=t.split(":"),i=+r[0],o=+r[1],+r[2]+60*o+3600*i):s(t,l,c,u,h,d,n);else{if("number"!=typeof t)return;m=t}if(void 0!==m)return m}}},{"./globalState":4}],10:[function(e,t,n){"use strict";function r(e){return function(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t<e.length;t++)n[t]=e[t];return n}}(e)||function(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}function i(e){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var s=e("./unformatting"),o=/^[a-z]{2,3}(-[a-zA-Z]{4})?(-([A-Z]{2}|[0-9]{3}))?$/,a={output:{type:"string",validValues:["currency","percent","byte","time","ordinal","number"]},base:{type:"string",validValues:["decimal","binary","general"],restriction:function(e,t){return"byte"===t.output},message:"`base` must be provided only when the output is `byte`",mandatory:function(e){return"byte"===e.output}},characteristic:{type:"number",restriction:function(e){return 0<=e},message:"value must be positive"},prefix:"string",postfix:"string",forceAverage:{type:"string",validValues:["trillion","billion","million","thousand"]},average:"boolean",currencyPosition:{type:"string",validValues:["prefix","infix","postfix"]},currencySymbol:"string",totalLength:{type:"number",restrictions:[{restriction:function(e){return 0<=e},message:"value must be positive"},{restriction:function(e,t){return!t.exponential},message:"`totalLength` is incompatible with `exponential`"}]},mantissa:{type:"number",restriction:function(e){return 0<=e},message:"value must be positive"},optionalMantissa:"boolean",trimMantissa:"boolean",optionalCharacteristic:"boolean",thousandSeparated:"boolean",spaceSeparated:"boolean",abbreviations:{type:"object",children:{thousand:"string",million:"string",billion:"string",trillion:"string"}},negative:{type:"string",validValues:["sign","parenthesis"]},forceSign:"boolean",exponential:{type:"boolean"},prefixSymbol:{type:"boolean",restriction:function(e,t){return"percent"===t.output},message:"`prefixSymbol` can be provided only when the output is `percent`"}},l={languageTag:{type:"string",mandatory:!0,restriction:function(e){return e.match(o)},message:"the language tag must follow the BCP 47 specification (see https://tools.ieft.org/html/bcp47)"},delimiters:{type:"object",children:{thousands:"string",decimal:"string",thousandsSize:"number"},mandatory:!0},abbreviations:{type:"object",children:{thousand:{type:"string",mandatory:!0},million:{type:"string",mandatory:!0},billion:{type:"string",mandatory:!0},trillion:{type:"string",mandatory:!0}},mandatory:!0},spaceSeparated:"boolean",ordinal:{type:"function",mandatory:!0},currency:{type:"object",children:{symbol:"string",position:"string",code:"string"},mandatory:!0},defaults:"format",ordinalFormat:"format",byteFormat:"format",percentageFormat:"format",currencyFormat:"format",timeDefaults:"format",formats:{type:"object",children:{fourDigits:{type:"format",mandatory:!0},fullWithTwoDecimals:{type:"format",mandatory:!0},fullWithTwoDecimalsNoCurrency:{type:"format",mandatory:!0},fullWithNoDecimals:{type:"format",mandatory:!0}}}};function c(e){return!!s.unformat(e)}function u(e,t,n){var s=3<arguments.length&&void 0!==arguments[3]&&arguments[3],o=Object.keys(e).map((function(r){if(!t[r])return console.error("".concat(n," Invalid key: ").concat(r)),!1;var s=e[r],o=t[r];if("string"==typeof o&&(o={type:o}),"format"===o.type){if(!u(s,a,"[Validate ".concat(r,"]"),!0))return!1}else if(i(s)!==o.type)return console.error("".concat(n," ").concat(r,' type mismatched: "').concat(o.type,'" expected, "').concat(i(s),'" provided')),!1;if(o.restrictions&&o.restrictions.length)for(var l=o.restrictions.length,c=0;c<l;c++){var h=o.restrictions[c],d=h.restriction,m=h.message;if(!d(s,e))return console.error("".concat(n," ").concat(r," invalid value: ").concat(m)),!1}return o.restriction&&!o.restriction(s,e)?(console.error("".concat(n," ").concat(r," invalid value: ").concat(o.message)),!1):o.validValues&&-1===o.validValues.indexOf(s)?(console.error("".concat(n," ").concat(r," invalid value: must be among ").concat(JSON.stringify(o.validValues),', "').concat(s,'" provided')),!1):!(o.children&&!u(s,o.children,"[Validate ".concat(r,"]")))}));return s||o.push.apply(o,r(Object.keys(t).map((function(r){var i=t[r];if("string"==typeof i&&(i={type:i}),i.mandatory){var s=i.mandatory;if("function"==typeof s&&(s=s(e)),s&&void 0===e[r])return console.error("".concat(n,' Missing mandatory key "').concat(r,'"')),!1}return!0})))),o.reduce((function(e,t){return e&&t}),!0)}function h(e){return u(e,a,"[Validate format]")}t.exports={validate:function(e,t){var n=c(e),r=h(t);return n&&r},validateFormat:h,validateInput:c,validateLanguage:function(e){return u(e,l,"[Validate language]")}}},{"./unformatting":9}]},{},[7])(7)}))},"87d6":function(e,t,n){"use strict";n.d(t,"b",(function(){return u}));n("d9e2"),n("14d9");var r=n("de3b");function i(e,t,n){return(t=s(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function s(e){var t=o(e,"string");return"symbol"==typeof t?t:t+""}function o(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}let a=0;class l{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;i(this,"context",void 0),this.context=e||this,this.context.eventListeners||(this.context.eventListeners=[])}addEventListener(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];function i(e){n.call(this,c(e))}return this.context.eventListeners.push({element:e,event:t,callback:n,callbackProxy:i,options:r,eventManager:this}),e.addEventListener(t,i,r),a+=1,()=>{this.removeEventListener(e,t,n)}}removeEventListener(e,t,n){let r,i=arguments.length>3&&void 0!==arguments[3]&&arguments[3],s=this.context.eventListeners.length;while(s)if(s-=1,r=this.context.eventListeners[s],r.event===t&&r.element===e){if(n&&n!==r.callback)continue;if(i&&r.eventManager!==this)continue;this.context.eventListeners.splice(s,1),r.element.removeEventListener(r.event,r.callbackProxy,r.options),a-=1}}clearEvents(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(!this.context)return;let t=this.context.eventListeners.length;while(t){t-=1;const n=this.context.eventListeners[t];e&&n.eventManager!==this||(this.context.eventListeners.splice(t,1),n.element.removeEventListener(n.event,n.callbackProxy,n.options),a-=1)}}clear(){this.clearEvents()}destroy(){this.clearEvents(),this.context=null}destroyWithOwnEventsOnly(){this.clearEvents(!0),this.context=null}fireEvent(e,t){let n=e.document,r=e;n||(n=e.ownerDocument?e.ownerDocument:e,r=n.defaultView);const i={bubbles:!0,cancelable:"mousemove"!==t,view:r,detail:0,screenX:0,screenY:0,clientX:1,clientY:1,ctrlKey:!1,altKey:!1,shiftKey:!1,metaKey:!1,button:0,relatedTarget:void 0};let s;n.createEvent?(s=n.createEvent("MouseEvents"),s.initMouseEvent(t,i.bubbles,i.cancelable,i.view,i.detail,i.screenX,i.screenY,i.clientX,i.clientY,i.ctrlKey,i.altKey,i.shiftKey,i.metaKey,i.button,i.relatedTarget||n.body.parentNode)):s=n.createEventObject(),e.dispatchEvent?e.dispatchEvent(s):e.fireEvent("on"+t,s)}}function c(e){const t=e.stopImmediatePropagation;return e.stopImmediatePropagation=function(){t.apply(this),Object(r["stopImmediatePropagation"])(this)},e}function u(){return a}t["a"]=l},8828:function(e,t,n){"use strict";n.d(t,"L",(function(){return r})),n.d(t,"N",(function(){return i})),n.d(t,"y",(function(){return s})),n.d(t,"l",(function(){return o})),n.d(t,"E",(function(){return a})),n.d(t,"D",(function(){return l})),n.d(t,"g",(function(){return c})),n.d(t,"B",(function(){return u})),n.d(t,"s",(function(){return h})),n.d(t,"t",(function(){return d})),n.d(t,"u",(function(){return m})),n.d(t,"h",(function(){return g})),n.d(t,"q",(function(){return p})),n.d(t,"w",(function(){return f})),n.d(t,"c",(function(){return R})),n.d(t,"G",(function(){return y})),n.d(t,"H",(function(){return M})),n.d(t,"M",(function(){return S})),n.d(t,"p",(function(){return b})),n.d(t,"n",(function(){return w})),n.d(t,"j",(function(){return T})),n.d(t,"v",(function(){return O})),n.d(t,"m",(function(){return v})),n.d(t,"C",(function(){return E})),n.d(t,"e",(function(){return C})),n.d(t,"F",(function(){return L})),n.d(t,"f",(function(){return N})),n.d(t,"k",(function(){return _})),n.d(t,"K",(function(){return I})),n.d(t,"z",(function(){return P})),n.d(t,"o",(function(){return x})),n.d(t,"d",(function(){return D})),n.d(t,"I",(function(){return A})),n.d(t,"b",(function(){return F})),n.d(t,"i",(function(){return Y})),n.d(t,"a",(function(){return H})),n.d(t,"r",(function(){return k})),n.d(t,"A",(function(){return V})),n.d(t,"J",(function(){return U})),n.d(t,"x",(function(){return W}));const r=e=>["tabindex",e],i=()=>["role","treegrid"],s=()=>["role","presentation"],o=()=>["role","gridcell"],a=()=>["role","rowheader"],l=()=>["role","rowgroup"],c=()=>["role","columnheader"],u=()=>["role","row"],h=()=>["role","menu"],d=()=>["role","menuitem"],m=()=>["role","menuitemcheckbox"],g=()=>["role","combobox"],p=()=>["role","listbox"],f=()=>["role","option"],R=()=>["role","checkbox"],y=()=>["scope","col"],M=()=>["scope","row"],S=()=>["type","text"],b=e=>["aria-label",e],w=()=>["aria-hidden","true"],T=()=>["aria-disabled","true"],O=()=>["aria-multiselectable","true"],v=e=>["aria-haspopup",e],E=e=>["aria-rowcount",e],C=e=>["aria-colcount",e],L=e=>["aria-rowindex",e],N=e=>["aria-colindex",e],_=e=>["aria-expanded",e],I=e=>["aria-sort",e],P=()=>["aria-readonly","true"],x=()=>["aria-invalid","true"],D=e=>["aria-checked",e],A=()=>["aria-selected","true"],F=()=>["aria-autocomplete","list"],Y=e=>["aria-controls",e],H=e=>["aria-activedescendant",e],k=e=>["aria-live",e],V=e=>["aria-relevant",e],U=e=>["aria-setsize",e],W=e=>["aria-posinset",e]},8840:function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
  197. //! moment.js locale configuration
  198. var t=e.defineLocale("gl",{months:"xaneiro_febreiro_marzo_abril_maio_xuño_xullo_agosto_setembro_outubro_novembro_decembro".split("_"),monthsShort:"xan._feb._mar._abr._mai._xuñ._xul._ago._set._out._nov._dec.".split("_"),monthsParseExact:!0,weekdays:"domingo_luns_martes_mércores_xoves_venres_sábado".split("_"),weekdaysShort:"dom._lun._mar._mér._xov._ven._sáb.".split("_"),weekdaysMin:"do_lu_ma_mé_xo_ve_sá".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD/MM/YYYY",LL:"D [de] MMMM [de] YYYY",LLL:"D [de] MMMM [de] YYYY H:mm",LLLL:"dddd, D [de] MMMM [de] YYYY H:mm"},calendar:{sameDay:function(){return"[hoxe "+(1!==this.hours()?"ás":"á")+"] LT"},nextDay:function(){return"[mañá "+(1!==this.hours()?"ás":"á")+"] LT"},nextWeek:function(){return"dddd ["+(1!==this.hours()?"ás":"a")+"] LT"},lastDay:function(){return"[onte "+(1!==this.hours()?"á":"a")+"] LT"},lastWeek:function(){return"[o] dddd [pasado "+(1!==this.hours()?"ás":"a")+"] LT"},sameElse:"L"},relativeTime:{future:function(e){return 0===e.indexOf("un")?"n"+e:"en "+e},past:"hai %s",s:"uns segundos",ss:"%d segundos",m:"un minuto",mm:"%d minutos",h:"unha hora",hh:"%d horas",d:"un día",dd:"%d días",M:"un mes",MM:"%d meses",y:"un ano",yy:"%d anos"},dayOfMonthOrdinalParse:/\d{1,2}º/,ordinal:"%dº",week:{dow:1,doy:4}});return t}))},"890f":function(e,t,n){var r,i,s;(function(n,o){i=[],r=o,s="function"===typeof r?r.apply(t,i):r,void 0===s||(e.exports=s)})("undefined"!==typeof self&&self,(function(){function e(){}e.prototype.saveState=function(){return{idx:this.idx,input:this.input,groupIdx:this.groupIdx}},e.prototype.restoreState=function(e){this.idx=e.idx,this.input=e.input,this.groupIdx=e.groupIdx},e.prototype.pattern=function(e){this.idx=0,this.input=e,this.groupIdx=0,this.consumeChar("/");var t=this.disjunction();this.consumeChar("/");var n={type:"Flags",global:!1,ignoreCase:!1,multiLine:!1,unicode:!1,sticky:!1};while(this.isRegExpFlag())switch(this.popChar()){case"g":a(n,"global");break;case"i":a(n,"ignoreCase");break;case"m":a(n,"multiLine");break;case"u":a(n,"unicode");break;case"y":a(n,"sticky");break}if(this.idx!==this.input.length)throw Error("Redundant input: "+this.input.substring(this.idx));return{type:"Pattern",flags:n,value:t}},e.prototype.disjunction=function(){var e=[];e.push(this.alternative());while("|"===this.peekChar())this.consumeChar("|"),e.push(this.alternative());return{type:"Disjunction",value:e}},e.prototype.alternative=function(){var e=[];while(this.isTerm())e.push(this.term());return{type:"Alternative",value:e}},e.prototype.term=function(){return this.isAssertion()?this.assertion():this.atom()},e.prototype.assertion=function(){switch(this.popChar()){case"^":return{type:"StartAnchor"};case"$":return{type:"EndAnchor"};case"\\":switch(this.popChar()){case"b":return{type:"WordBoundary"};case"B":return{type:"NonWordBoundary"}}throw Error("Invalid Assertion Escape");case"(":var e;switch(this.consumeChar("?"),this.popChar()){case"=":e="Lookahead";break;case"!":e="NegativeLookahead";break}l(e);var t=this.disjunction();return this.consumeChar(")"),{type:e,value:t}}c()},e.prototype.quantifier=function(e){var t;switch(this.popChar()){case"*":t={atLeast:0,atMost:1/0};break;case"+":t={atLeast:1,atMost:1/0};break;case"?":t={atLeast:0,atMost:1};break;case"{":var n=this.integerIncludingZero();switch(this.popChar()){case"}":t={atLeast:n,atMost:n};break;case",":var r;this.isDigit()?(r=this.integerIncludingZero(),t={atLeast:n,atMost:r}):t={atLeast:n,atMost:1/0},this.consumeChar("}");break}if(!0===e&&void 0===t)return;l(t);break}if(!0!==e||void 0!==t)return l(t),"?"===this.peekChar(0)?(this.consumeChar("?"),t.greedy=!1):t.greedy=!0,t.type="Quantifier",t},e.prototype.atom=function(){var e;switch(this.peekChar()){case".":e=this.dotAll();break;case"\\":e=this.atomEscape();break;case"[":e=this.characterClass();break;case"(":e=this.group();break}return void 0===e&&this.isPatternCharacter()&&(e=this.patternCharacter()),l(e),this.isQuantifier()&&(e.quantifier=this.quantifier()),e},e.prototype.dotAll=function(){return this.consumeChar("."),{type:"Set",complement:!0,value:[s("\n"),s("\r"),s("\u2028"),s("\u2029")]}},e.prototype.atomEscape=function(){switch(this.consumeChar("\\"),this.peekChar()){case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":return this.decimalEscapeAtom();case"d":case"D":case"s":case"S":case"w":case"W":return this.characterClassEscape();case"f":case"n":case"r":case"t":case"v":return this.controlEscapeAtom();case"c":return this.controlLetterEscapeAtom();case"0":return this.nulCharacterAtom();case"x":return this.hexEscapeSequenceAtom();case"u":return this.regExpUnicodeEscapeSequenceAtom();default:return this.identityEscapeAtom()}},e.prototype.decimalEscapeAtom=function(){var e=this.positiveInteger();return{type:"GroupBackReference",value:e}},e.prototype.characterClassEscape=function(){var e,t=!1;switch(this.popChar()){case"d":e=u;break;case"D":e=u,t=!0;break;case"s":e=d;break;case"S":e=d,t=!0;break;case"w":e=h;break;case"W":e=h,t=!0;break}return l(e),{type:"Set",value:e,complement:t}},e.prototype.controlEscapeAtom=function(){var e;switch(this.popChar()){case"f":e=s("\f");break;case"n":e=s("\n");break;case"r":e=s("\r");break;case"t":e=s("\t");break;case"v":e=s("\v");break}return l(e),{type:"Character",value:e}},e.prototype.controlLetterEscapeAtom=function(){this.consumeChar("c");var e=this.popChar();if(!1===/[a-zA-Z]/.test(e))throw Error("Invalid ");var t=e.toUpperCase().charCodeAt(0)-64;return{type:"Character",value:t}},e.prototype.nulCharacterAtom=function(){return this.consumeChar("0"),{type:"Character",value:s("\0")}},e.prototype.hexEscapeSequenceAtom=function(){return this.consumeChar("x"),this.parseHexDigits(2)},e.prototype.regExpUnicodeEscapeSequenceAtom=function(){return this.consumeChar("u"),this.parseHexDigits(4)},e.prototype.identityEscapeAtom=function(){var e=this.popChar();return{type:"Character",value:s(e)}},e.prototype.classPatternCharacterAtom=function(){switch(this.peekChar()){case"\n":case"\r":case"\u2028":case"\u2029":case"\\":case"]":throw Error("TBD");default:var e=this.popChar();return{type:"Character",value:s(e)}}},e.prototype.characterClass=function(){var e=[],t=!1;this.consumeChar("["),"^"===this.peekChar(0)&&(this.consumeChar("^"),t=!0);while(this.isClassAtom()){var n=this.classAtom(),r="Character"===n.type;if(r&&this.isRangeDash()){this.consumeChar("-");var i=this.classAtom(),a="Character"===i.type;if(a){if(i.value<n.value)throw Error("Range out of order in character class");e.push({from:n.value,to:i.value})}else o(n.value,e),e.push(s("-")),o(i.value,e)}else o(n.value,e)}return this.consumeChar("]"),{type:"Set",complement:t,value:e}},e.prototype.classAtom=function(){switch(this.peekChar()){case"]":case"\n":case"\r":case"\u2028":case"\u2029":throw Error("TBD");case"\\":return this.classEscape();default:return this.classPatternCharacterAtom()}},e.prototype.classEscape=function(){switch(this.consumeChar("\\"),this.peekChar()){case"b":return this.consumeChar("b"),{type:"Character",value:s("\b")};case"d":case"D":case"s":case"S":case"w":case"W":return this.characterClassEscape();case"f":case"n":case"r":case"t":case"v":return this.controlEscapeAtom();case"c":return this.controlLetterEscapeAtom();case"0":return this.nulCharacterAtom();case"x":return this.hexEscapeSequenceAtom();case"u":return this.regExpUnicodeEscapeSequenceAtom();default:return this.identityEscapeAtom()}},e.prototype.group=function(){var e=!0;switch(this.consumeChar("("),this.peekChar(0)){case"?":this.consumeChar("?"),this.consumeChar(":"),e=!1;break;default:this.groupIdx++;break}var t=this.disjunction();this.consumeChar(")");var n={type:"Group",capturing:e,value:t};return e&&(n.idx=this.groupIdx),n},e.prototype.positiveInteger=function(){var e=this.popChar();if(!1===i.test(e))throw Error("Expecting a positive integer");while(r.test(this.peekChar(0)))e+=this.popChar();return parseInt(e,10)},e.prototype.integerIncludingZero=function(){var e=this.popChar();if(!1===r.test(e))throw Error("Expecting an integer");while(r.test(this.peekChar(0)))e+=this.popChar();return parseInt(e,10)},e.prototype.patternCharacter=function(){var e=this.popChar();switch(e){case"\n":case"\r":case"\u2028":case"\u2029":case"^":case"$":case"\\":case".":case"*":case"+":case"?":case"(":case")":case"[":case"|":throw Error("TBD");default:return{type:"Character",value:s(e)}}},e.prototype.isRegExpFlag=function(){switch(this.peekChar(0)){case"g":case"i":case"m":case"u":case"y":return!0;default:return!1}},e.prototype.isRangeDash=function(){return"-"===this.peekChar()&&this.isClassAtom(1)},e.prototype.isDigit=function(){return r.test(this.peekChar(0))},e.prototype.isClassAtom=function(e){switch(void 0===e&&(e=0),this.peekChar(e)){case"]":case"\n":case"\r":case"\u2028":case"\u2029":return!1;default:return!0}},e.prototype.isTerm=function(){return this.isAtom()||this.isAssertion()},e.prototype.isAtom=function(){if(this.isPatternCharacter())return!0;switch(this.peekChar(0)){case".":case"\\":case"[":case"(":return!0;default:return!1}},e.prototype.isAssertion=function(){switch(this.peekChar(0)){case"^":case"$":return!0;case"\\":switch(this.peekChar(1)){case"b":case"B":return!0;default:return!1}case"(":return"?"===this.peekChar(1)&&("="===this.peekChar(2)||"!"===this.peekChar(2));default:return!1}},e.prototype.isQuantifier=function(){var e=this.saveState();try{return void 0!==this.quantifier(!0)}catch(t){return!1}finally{this.restoreState(e)}},e.prototype.isPatternCharacter=function(){switch(this.peekChar()){case"^":case"$":case"\\":case".":case"*":case"+":case"?":case"(":case")":case"[":case"|":case"/":case"\n":case"\r":case"\u2028":case"\u2029":return!1;default:return!0}},e.prototype.parseHexDigits=function(e){for(var t="",r=0;r<e;r++){var i=this.popChar();if(!1===n.test(i))throw Error("Expecting a HexDecimal digits");t+=i}var s=parseInt(t,16);return{type:"Character",value:s}},e.prototype.peekChar=function(e){return void 0===e&&(e=0),this.input[this.idx+e]},e.prototype.popChar=function(){var e=this.peekChar(0);return this.consumeChar(),e},e.prototype.consumeChar=function(e){if(void 0!==e&&this.input[this.idx]!==e)throw Error("Expected: '"+e+"' but found: '"+this.input[this.idx]+"' at offset: "+this.idx);if(this.idx>=this.input.length)throw Error("Unexpected end of input");this.idx++};var t,n=/[0-9a-fA-F]/,r=/[0-9]/,i=/[1-9]/;function s(e){return e.charCodeAt(0)}function o(e,t){void 0!==e.length?e.forEach((function(e){t.push(e)})):t.push(e)}function a(e,t){if(!0===e[t])throw"duplicate flag "+t;e[t]=!0}function l(e){if(void 0===e)throw Error("Internal Error - Should never get here!")}function c(){throw Error("Internal Error - Should never get here!")}var u=[];for(t=s("0");t<=s("9");t++)u.push(t);var h=[s("_")].concat(u);for(t=s("a");t<=s("z");t++)h.push(t);for(t=s("A");t<=s("Z");t++)h.push(t);var d=[s(" "),s("\f"),s("\n"),s("\r"),s("\t"),s("\v"),s("\t"),s(" "),s(" "),s(" "),s(" "),s(" "),s(" "),s(" "),s(" "),s(" "),s(" "),s(" "),s(" "),s(" "),s("\u2028"),s("\u2029"),s(" "),s(" "),s(" "),s("\ufeff")];function m(){}return m.prototype.visitChildren=function(e){for(var t in e){var n=e[t];e.hasOwnProperty(t)&&(void 0!==n.type?this.visit(n):Array.isArray(n)&&n.forEach((function(e){this.visit(e)}),this))}},m.prototype.visit=function(e){switch(e.type){case"Pattern":this.visitPattern(e);break;case"Flags":this.visitFlags(e);break;case"Disjunction":this.visitDisjunction(e);break;case"Alternative":this.visitAlternative(e);break;case"StartAnchor":this.visitStartAnchor(e);break;case"EndAnchor":this.visitEndAnchor(e);break;case"WordBoundary":this.visitWordBoundary(e);break;case"NonWordBoundary":this.visitNonWordBoundary(e);break;case"Lookahead":this.visitLookahead(e);break;case"NegativeLookahead":this.visitNegativeLookahead(e);break;case"Character":this.visitCharacter(e);break;case"Set":this.visitSet(e);break;case"Group":this.visitGroup(e);break;case"GroupBackReference":this.visitGroupBackReference(e);break;case"Quantifier":this.visitQuantifier(e);break}this.visitChildren(e)},m.prototype.visitPattern=function(e){},m.prototype.visitFlags=function(e){},m.prototype.visitDisjunction=function(e){},m.prototype.visitAlternative=function(e){},m.prototype.visitStartAnchor=function(e){},m.prototype.visitEndAnchor=function(e){},m.prototype.visitWordBoundary=function(e){},m.prototype.visitNonWordBoundary=function(e){},m.prototype.visitLookahead=function(e){},m.prototype.visitNegativeLookahead=function(e){},m.prototype.visitCharacter=function(e){},m.prototype.visitSet=function(e){},m.prototype.visitGroup=function(e){},m.prototype.visitGroupBackReference=function(e){},m.prototype.visitQuantifier=function(e){},{RegExpParser:e,BaseRegExpVisitor:m,VERSION:"0.4.0"}}))},"898b":function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
  199. //! moment.js locale configuration
  200. var t="ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.".split("_"),n="ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic".split("_"),r=[/^ene/i,/^feb/i,/^mar/i,/^abr/i,/^may/i,/^jun/i,/^jul/i,/^ago/i,/^sep/i,/^oct/i,/^nov/i,/^dic/i],i=/^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre|ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i,s=e.defineLocale("es",{months:"enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre".split("_"),monthsShort:function(e,r){return e?/-MMM-/.test(r)?n[e.month()]:t[e.month()]:t},monthsRegex:i,monthsShortRegex:i,monthsStrictRegex:/^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i,monthsShortStrictRegex:/^(ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i,monthsParse:r,longMonthsParse:r,shortMonthsParse:r,weekdays:"domingo_lunes_martes_miércoles_jueves_viernes_sábado".split("_"),weekdaysShort:"dom._lun._mar._mié._jue._vie._sáb.".split("_"),weekdaysMin:"do_lu_ma_mi_ju_vi_sá".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD/MM/YYYY",LL:"D [de] MMMM [de] YYYY",LLL:"D [de] MMMM [de] YYYY H:mm",LLLL:"dddd, D [de] MMMM [de] YYYY H:mm"},calendar:{sameDay:function(){return"[hoy a la"+(1!==this.hours()?"s":"")+"] LT"},nextDay:function(){return"[mañana a la"+(1!==this.hours()?"s":"")+"] LT"},nextWeek:function(){return"dddd [a la"+(1!==this.hours()?"s":"")+"] LT"},lastDay:function(){return"[ayer a la"+(1!==this.hours()?"s":"")+"] LT"},lastWeek:function(){return"[el] dddd [pasado a la"+(1!==this.hours()?"s":"")+"] LT"},sameElse:"L"},relativeTime:{future:"en %s",past:"hace %s",s:"unos segundos",ss:"%d segundos",m:"un minuto",mm:"%d minutos",h:"una hora",hh:"%d horas",d:"un día",dd:"%d días",w:"una semana",ww:"%d semanas",M:"un mes",MM:"%d meses",y:"un año",yy:"%d años"},dayOfMonthOrdinalParse:/\d{1,2}º/,ordinal:"%dº",week:{dow:1,doy:4},invalidDate:"Fecha inválida"});return s}))},"8b00":function(e,t,n){"use strict";var r=n("23e7"),i=n("68df"),s=n("dad2");r({target:"Set",proto:!0,real:!0,forced:!s("isSubsetOf")},{isSubsetOf:i})},"8c7e":function(e,t,n){"use strict";n.d(t,"a",(function(){return xL}));n("d9e2"),n("14d9");var r=n("0352"),i=n("5d7f"),s=n("de3b"),o=n("351d"),a=n("c4fa");const l="handsontableEditor",c="handsontable";class u extends r["a"]{static get EDITOR_TYPE(){return c}open(){super.open(),this.htEditor&&this.htEditor.destroy(),"none"===this.htContainer.style.display&&(this.htContainer.style.display=""),this.htEditor=new this.hot.constructor(this.htContainer,this.htOptions),this.htEditor.init(),this.htEditor.rootElement.style.display="",this.cellProperties.strict?this.htEditor.selectCell(0,0):this.htEditor.deselectCell(),Object(i["setCaretPosition"])(this.TEXTAREA,0,this.TEXTAREA.value.length),this.refreshDimensions()}close(){this.htEditor&&(this.htEditor.rootElement.style.display="none"),this.removeHooksByKey("beforeKeyDown"),super.close()}prepare(e,t,n,r,i,s){super.prepare(e,t,n,r,i,s);const a=this,l={startRows:0,startCols:0,minRows:0,minCols:0,className:"listbox",copyPaste:!1,autoColumnSize:!1,autoRowSize:!1,readOnly:!0,fillHandle:!1,autoWrapCol:!1,autoWrapRow:!1,ariaTags:!1,afterOnCellMouseDown(e,t){const n=this.getSourceData(t.row,t.col);void 0!==n&&a.setValue(n),a.hot.destroyEditor()},preventWheel:!0,layoutDirection:this.hot.isRtl()?"rtl":"ltr"};this.cellProperties.handsontable&&Object(o["extend"])(l,s.handsontable),this.htOptions=l}beginEditing(e,t){const n=this.hot.getSettings().onBeginEditing;n&&!1===n()||super.beginEditing(e,t)}createElements(){super.createElements();const e=this.hot.rootDocument.createElement("DIV");e.className="handsontableEditor",this.TEXTAREA_PARENT.appendChild(e),this.htContainer=e,this.assignHooks()}finishEditing(e,t,n){if(this.htEditor&&this.htEditor.isListening()&&this.hot.listen(),this.htEditor&&this.htEditor.getSelectedLast()){const e=this.htEditor.getValue();void 0!==e&&this.setValue(e)}super.finishEditing(e,t,n)}assignHooks(){this.hot.addHook("afterDestroy",()=>{this.htEditor&&this.htEditor.destroy()})}registerShortcuts(){const e=this.hot.getShortcutManager(),t=e.getContext("editor");super.registerShortcuts();const n={group:l,relativeToGroup:a["a"],position:"before"},r=(e,t)=>{const n=this.htEditor;if(void 0!==e&&(e<0||n.flipped&&e>n.countRows()-1?n.deselectCell():n.selectCell(e,0),n.getData().length))return t.preventDefault(),Object(s["stopImmediatePropagation"])(t),this.hot.listen(),this.TEXTAREA.focus(),!1};t.addShortcuts([{keys:[["ArrowUp"]],callback:e=>{const t=this.htEditor;let n,i;return!t.getSelectedLast()&&t.flipped?n=t.countRows()-1:t.getSelectedLast()&&(t.flipped?(i=t.getSelectedLast()[0],n=Math.max(0,i-1)):(i=t.getSelectedLast()[0],n=i-1)),r(n,e)},preventDefault:!1},{keys:[["ArrowDown"]],callback:e=>{const t=this.htEditor;let n,i;if(t.getSelectedLast()||t.flipped){if(t.getSelectedLast())if(t.flipped)n=t.getSelectedLast()[0]+1;else if(!t.flipped){const e=t.countRows()-1;i=t.getSelectedLast()[0],n=Math.min(e,i+1)}}else n=0;return r(n,e)},preventDefault:!1}],n)}unregisterShortcuts(){super.unregisterShortcuts();const e=this.hot.getShortcutManager(),t=e.getContext("editor");t.removeShortcutsByGroup(l)}}var h=n("81ea"),d=n("7b9c"),m=n("29b0"),g=n("f938"),p=n("63d8"),f=n("dd49"),R=n("8828");function y(e,t,n){M(e,t),t.set(e,n)}function M(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function S(e,t,n){return(t=b(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function b(e){var t=w(e,"string");return"symbol"==typeof t?t:t+""}function w(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function T(e,t){return e.get(O(e,t))}function O(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}const v="autocomplete";var E=new WeakMap;class C extends u{constructor(){super(...arguments),S(this,"query",null),S(this,"strippedChoices",[]),S(this,"rawChoices",[]),y(this,E,this.hot.guid.slice(0,9)),S(this,"sortByRelevance",(function(e,t,n){const r=[],i=[],s=e.length;let o,a,l,c,u=t.length;if(0===s){for(l=0;l<u;l++)i.push(l);return i}for(l=0;l<u;l++){if(a=Object(m["stripTags"])(Object(d["stringify"])(t[l])),n)c=a.indexOf(e);else{const t=this.cellProperties.locale;c=a.toLocaleLowerCase(t).indexOf(e.toLocaleLowerCase(t))}-1!==c&&(o=a.length-c-s,r.push({baseIndex:l,index:c,charsLeft:o,value:a}))}for(r.sort((e,t)=>{if(-1===t.index)return-1;if(-1===e.index)return 1;if(e.index<t.index)return-1;if(t.index<e.index)return 1;if(e.index===t.index){if(e.charsLeft<t.charsLeft)return-1;if(e.charsLeft>t.charsLeft)return 1}return 0}),l=0,u=r.length;l<u;l++)i.push(r[l].baseIndex);return i}))}static get EDITOR_TYPE(){return v}getValue(){const e=this.rawChoices.find(e=>{const t=this.stripValueIfNeeded(e);return t===this.TEXTAREA.value});return Object(d["isDefined"])(e)?e:this.TEXTAREA.value}createElements(){super.createElements(),Object(i["addClass"])(this.htContainer,"autocompleteEditor"),Object(i["addClass"])(this.htContainer,-1===this.hot.rootWindow.navigator.platform.indexOf("Mac")?"":"htMacScroll"),this.hot.getSettings().ariaTags&&Object(i["setAttribute"])(this.TEXTAREA,[Object(R["M"])(),Object(R["h"])(),Object(R["m"])("listbox"),Object(R["b"])()])}prepare(e,t,n,r,s,o){super.prepare(e,t,n,r,s,o),this.hot.getSettings().ariaTags&&Object(i["setAttribute"])(this.TEXTAREA,[Object(R["k"])("false"),Object(R["i"])(`${T(E,this)}-listbox-${e}-${t}`)])}open(){super.open();const e=void 0===this.cellProperties.trimDropdown||this.cellProperties.trimDropdown,t=this.hot.getSettings().ariaTags,n=Array.isArray(this.cellProperties.source)?this.cellProperties.source:null,r=null===n||void 0===n?void 0:n.length,{row:s,col:o}=this;this.showEditableElement(),this.focus();let a=Object(i["getScrollbarWidth"])();0===a&&Object(p["isMacOS"])()&&(a+=15),this.addHook("beforeKeyDown",e=>this.onBeforeKeyDown(e)),this.htEditor.updateSettings({colWidths:e?[Object(i["outerWidth"])(this.TEXTAREA)-2]:void 0,width:e?Object(i["outerWidth"])(this.TEXTAREA)+a:void 0,autoColumnSize:!0,renderer:(e,s,o,a,l,c,u)=>{Object(f["a"])(e,s,o,a,l,c,u);const{filteringCaseSensitive:h,allowHtml:m,locale:g}=this.cellProperties,p=this.query;let y,M,S=Object(d["stringify"])(c);S&&!m&&(y=!0===h?S.indexOf(p):S.toLocaleLowerCase(g).indexOf(p.toLocaleLowerCase(g)),-1!==y&&(M=S.substr(y,p.length),S=S.replace(M,`<strong>${M}</strong>`))),t&&Object(i["setAttribute"])(s,[Object(R["w"])(),...n?[Object(R["J"])(r)]:[],...n?[Object(R["x"])(n.indexOf(c)+1)]:[],["id",`${this.htEditor.rootElement.id}_${o}-${a}`]]),s.innerHTML=S},afterSelectionEnd:(e,n)=>{if(t){const t=this.htEditor.getCell(e,n,!0);Object(i["setAttribute"])(t,[Object(R["I"])()]),Object(i["setAttribute"])(this.TEXTAREA,...Object(R["a"])(t.id))}}}),t&&(Object(i["setAttribute"])(this.htEditor.view._wt.wtOverlays.wtTable.TABLE,...Object(R["y"])()),Object(i["setAttribute"])(this.htEditor.rootElement,[Object(R["q"])(),Object(R["r"])("polite"),Object(R["A"])("text"),["id",`${T(E,this)}-listbox-${s}-${o}`]]),Object(i["setAttribute"])(this.TEXTAREA,...Object(R["k"])("true"))),this.hot._registerTimeout(()=>{this.queryChoices(this.TEXTAREA.value)})}close(){this.removeHooksByKey("beforeKeyDown"),super.close(),this.hot.getSettings().ariaTags&&Object(i["setAttribute"])(this.TEXTAREA,[Object(R["k"])("false")])}discardEditor(e){super.discardEditor(e),this.hot.view.render()}queryChoices(e){const t=this.cellProperties.source;this.query=e,"function"===typeof t?t.call(this.cellProperties,e,e=>{this.rawChoices=e,this.updateChoicesList(this.stripValuesIfNeeded(e))}):Array.isArray(t)?(this.rawChoices=t,this.updateChoicesList(this.stripValuesIfNeeded(t))):this.updateChoicesList([])}updateChoicesList(e){const t=Object(i["getCaretPosition"])(this.TEXTAREA),n=Object(i["getSelectionEndPosition"])(this.TEXTAREA),r=this.cellProperties.sortByRelevance,s=this.cellProperties.filter;let o=null,a=null,l=e;r&&(o=this.sortByRelevance(this.stripValueIfNeeded(this.getValue()),l,this.cellProperties.filteringCaseSensitive));const c=Array.isArray(o)?o.length:0;if(!1===s)c&&(a=o[0]);else{const e=[];for(let t=0,n=l.length;t<n;t++){if(r&&c<=t)break;c?e.push(l[o[t]]):e.push(l[t])}a=0,l=e}this.strippedChoices=l,0===l.length?this.htEditor.rootElement.style.display="none":this.htEditor.rootElement.style.display="",this.htEditor.loadData(Object(h["pivot"])([l])),l.length>0&&(this.updateDropdownDimensions(),this.flipDropdownIfNeeded(),!0===this.cellProperties.strict&&this.highlightBestMatchingChoice(a)),this.hot.listen(),Object(i["setCaretPosition"])(this.TEXTAREA,t,t===n?void 0:n)}flipDropdownIfNeeded(){const e=Object(i["getTrimmingContainer"])(this.hot.view._wt.wtTable.TABLE),t=e===this.hot.rootWindow,n=this.cellProperties.preventOverflow;if(t||!t&&(n||"horizontal"===n))return!1;const r=Object(i["offset"])(this.TEXTAREA),s=Object(i["outerHeight"])(this.TEXTAREA),o=this.getDropdownHeight(),a=e.scrollTop,l=Object(i["outerHeight"])(this.hot.view._wt.wtTable.THEAD),c=Object(i["offset"])(e),u=r.top-c.top-l+a,h=e.scrollHeight-u-l-s,d=o>h&&u>h;return d?this.flipDropdown(o):this.unflipDropdown(),this.limitDropdownIfNeeded(d?u:h,o),d}limitDropdownIfNeeded(e,t){if(t>e){let n=0,r=0,i=0,s=null;do{i=this.htEditor.getRowHeight(r)||this.htEditor.view._wt.getSetting("defaultRowHeight"),n+=i,r+=1}while(n<e);s=n-i,this.htEditor.flipped&&(this.htEditor.rootElement.style.top=parseInt(this.htEditor.rootElement.style.top,10)+t-s+"px"),this.setDropdownHeight(n-i)}}flipDropdown(e){const t=this.htEditor.rootElement.style;t.position="absolute",t.top=-e+"px",this.htEditor.flipped=!0}unflipDropdown(){const e=this.htEditor.rootElement.style;e.position="absolute",e.top="",this.htEditor.flipped=void 0}updateDropdownDimensions(){const e=this.htEditor.getColWidth(0)+Object(i["getScrollbarWidth"])(this.hot.rootDocument)+2,t=this.cellProperties.trimDropdown;this.htEditor.updateSettings({height:this.getDropdownHeight(),width:t?void 0:e}),this.htEditor.view._wt.wtTable.alignOverlaysWithTrimmingContainer()}setDropdownHeight(e){this.htEditor.updateSettings({height:e})}highlightBestMatchingChoice(e){"number"===typeof e?this.htEditor.selectCell(e,0,void 0,void 0,void 0,!1):this.htEditor.deselectCell()}getDropdownHeight(){const e=this.htEditor.getRowHeight(0)||23,t=this.cellProperties.visibleRows;return this.strippedChoices.length>=t?t*e:this.strippedChoices.length*e+8}stripValueIfNeeded(e){return this.stripValuesIfNeeded([e])[0]}stripValuesIfNeeded(e){const{allowHtml:t}=this.cellProperties,n=Object(h["arrayMap"])(e,e=>Object(d["stringify"])(e)),r=Object(h["arrayMap"])(n,e=>t?e:Object(m["stripTags"])(e));return r}allowKeyEventPropagation(e){const t=this.htEditor.getSelectedRangeLast(),n={row:t?t.from.row:-1};let r=!1;return e===g["KEY_CODES"].ARROW_DOWN&&n.row>0&&n.row<this.htEditor.countRows()-1&&(r=!0),e===g["KEY_CODES"].ARROW_UP&&n.row>-1&&(r=!0),r}onBeforeKeyDown(e){if(Object(g["isPrintableChar"])(e.keyCode)||e.keyCode===g["KEY_CODES"].BACKSPACE||e.keyCode===g["KEY_CODES"].DELETE||e.keyCode===g["KEY_CODES"].INSERT){let t=10;if(e.keyCode===g["KEY_CODES"].C&&(e.ctrlKey||e.metaKey))return;this.isOpened()||(t+=10),this.htEditor&&this.hot._registerTimeout(()=>{this.queryChoices(this.TEXTAREA.value)},t)}}}var L=n("13e1");const N="checkbox";class _ extends L["a"]{static get EDITOR_TYPE(){return N}beginEditing(e,t){if(t&&"mouseup"===t.type&&"TD"===t.target.nodeName){const e=this.TD.querySelector('input[type="checkbox"]');Object(i["hasClass"])(e,"htBadValue")||e.click()}}finishEditing(){}init(){}open(){}close(){}getValue(){}setValue(){}focus(){}}var I=n("c1df");
  201. /*!
  202. * Pikaday
  203. *
  204. * Copyright © 2014 David Bushell | BSD & MIT license | https://github.com/Pikaday/Pikaday
  205. */const P=()=>window,x=()=>window.document,D=(e,t)=>window.setTimeout(e,t),A=function(e,t,n,r){e.addEventListener(t,n,!!r)},F=function(e,t,n,r){e.removeEventListener(t,n,!!r)},Y=function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")},H=function(e,t){return-1!==(" "+e.className+" ").indexOf(" "+t+" ")},k=function(e,t){H(e,t)||(e.className=""===e.className?t:e.className+" "+t)},V=function(e,t){e.className=Y((" "+e.className+" ").replace(" "+t+" "," "))},U=function(e){return/Array/.test(Object.prototype.toString.call(e))},W=function(e){return/Date/.test(Object.prototype.toString.call(e))&&!isNaN(e.getTime())},X=function(e){let t=e.getDay();return 0===t||6===t},j=function(e){return e%4===0&&e%100!==0||e%400===0},Z=function(e,t){return[31,j(e)?29:28,31,30,31,30,31,31,30,31,30,31][t]},Q=function(e){W(e)&&e.setHours(0,0,0,0)},K=function(e,t){return e.getTime()===t.getTime()},G=function(e,t,n){let r,i;for(r in t)i=void 0!==e[r],i&&"object"===typeof t[r]&&null!==t[r]&&void 0===t[r].nodeName?W(t[r])?n&&(e[r]=new Date(t[r].getTime())):U(t[r])?n&&(e[r]=t[r].slice(0)):e[r]=G({},t[r],n):!n&&i||(e[r]=t[r]);return e},B=function(e,t,n){let r=x().createEvent("HTMLEvents");r.initEvent(t,!0,!1),r=G(r,n),e.dispatchEvent(r)},J=function(e){return e.month<0&&(e.year-=Math.ceil(Math.abs(e.month)/12),e.month+=12),e.month>11&&(e.year+=Math.floor(Math.abs(e.month)/12),e.month-=12),e},z={field:null,bound:void 0,ariaLabel:"Use the arrow keys to pick a date",position:"bottom left",reposition:!0,format:"YYYY-MM-DD",toString:null,parse:null,defaultDate:null,setDefaultDate:!1,firstDay:0,firstWeekOfYearMinDays:4,formatStrict:!1,minDate:null,maxDate:null,yearRange:10,showWeekNumber:!1,pickWholeWeek:!1,minYear:0,maxYear:9999,minMonth:void 0,maxMonth:void 0,startRange:null,endRange:null,isRTL:!1,yearSuffix:"",showMonthAfterYear:!1,showDaysInNextAndPreviousMonths:!1,enableSelectionDaysInNextAndPreviousMonths:!1,numberOfMonths:1,mainCalendar:"left",container:void 0,blurFieldOnSelect:!0,i18n:{previousMonth:"Previous Month",nextMonth:"Next Month",months:["January","February","March","April","May","June","July","August","September","October","November","December"],weekdays:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],weekdaysShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"]},theme:null,events:[],onSelect:null,onOpen:null,onClose:null,onDraw:null,keyboardInput:!0},$=function(e,t,n){t+=e.firstDay;while(t>=7)t-=7;return n?e.i18n.weekdaysShort[t]:e.i18n.weekdays[t]},q=function(e){let t=[],n="false";if(e.isEmpty){if(!e.showDaysInNextAndPreviousMonths)return'<td class="is-empty"></td>';t.push("is-outside-current-month"),e.enableSelectionDaysInNextAndPreviousMonths||t.push("is-selection-disabled")}return e.isDisabled&&t.push("is-disabled"),e.isToday&&t.push("is-today"),e.isSelected&&(t.push("is-selected"),n="true"),e.hasEvent&&t.push("has-event"),e.isInRange&&t.push("is-inrange"),e.isStartRange&&t.push("is-startrange"),e.isEndRange&&t.push("is-endrange"),'<td data-day="'+e.day+'" class="'+t.join(" ")+'" aria-selected="'+n+'"><button class="pika-button pika-day" type="button" data-pika-year="'+e.year+'" data-pika-month="'+e.month+'" data-pika-day="'+e.day+'">'+e.day+"</button></td>"},ee=function(e,t){e.setHours(0,0,0,0);let n=e.getDate(),r=e.getDay(),i=t,s=i-1,o=7,a=function(e){return(e+o-1)%o};e.setDate(n+s-a(r));let l=new Date(e.getFullYear(),0,i),c=864e5,u=(e.getTime()-l.getTime())/c,h=1+Math.round((u-s+a(l.getDay()))/o);return h},te=function(e,t,n,r,i){let s=new Date(r,n,t),o=e.hasMoment?e.moment(s).isoWeek():ee(s,i);return'<td class="pika-week">'+o+"</td>"},ne=function(e,t,n,r){return'<tr class="pika-row'+(n?" pick-whole-week":"")+(r?" is-selected":"")+'">'+(t?e.reverse():e).join("")+"</tr>"},re=function(e){return"<tbody>"+e.join("")+"</tbody>"},ie=function(e){let t,n=[];for(e.showWeekNumber&&n.push("<th></th>"),t=0;t<7;t++)n.push('<th scope="col"><abbr title="'+$(e,t)+'">'+$(e,t,!0)+"</abbr></th>");return"<thead><tr>"+(e.isRTL?n.reverse():n).join("")+"</tr></thead>"},se=function(e,t,n,r,i,s){let o,a,l,c,u,h=e._o,d=n===h.minYear,m=n===h.maxYear,g='<div id="'+s+'" class="pika-title" role="heading" aria-live="polite">',p=!0,f=!0;for(l=[],o=0;o<12;o++)l.push('<option value="'+(n===i?o-t:12+o-t)+'"'+(o===r?' selected="selected"':"")+(d&&o<h.minMonth||m&&o>h.maxMonth?' disabled="disabled"':"")+">"+h.i18n.months[o]+"</option>");for(c='<div class="pika-label">'+h.i18n.months[r]+'<select class="pika-select pika-select-month" tabindex="-1">'+l.join("")+"</select></div>",U(h.yearRange)?(o=h.yearRange[0],a=h.yearRange[1]+1):(o=n-h.yearRange,a=1+n+h.yearRange),l=[];o<a&&o<=h.maxYear;o++)o>=h.minYear&&l.push('<option value="'+o+'"'+(o===n?' selected="selected"':"")+">"+o+"</option>");return u='<div class="pika-label">'+n+h.yearSuffix+'<select class="pika-select pika-select-year" tabindex="-1">'+l.join("")+"</select></div>",h.showMonthAfterYear?g+=u+c:g+=c+u,d&&(0===r||h.minMonth>=r)&&(p=!1),m&&(11===r||h.maxMonth<=r)&&(f=!1),0===t&&(g+='<button class="pika-prev'+(p?"":" is-disabled")+'" type="button">'+h.i18n.previousMonth+"</button>"),t===e._o.numberOfMonths-1&&(g+='<button class="pika-next'+(f?"":" is-disabled")+'" type="button">'+h.i18n.nextMonth+"</button>"),g+"</div>"},oe=function(e,t,n){return'<table cellpadding="0" cellspacing="0" class="pika-table" role="grid" aria-labelledby="'+n+'">'+ie(e)+re(t)+"</table>"};function ae(e){let t=this,n=t.config(e);t._onMouseDown=function(e){if(!t._v)return;e=e||P().event;let r=e.target||e.srcElement;if(r)if(H(r,"is-disabled")||(!H(r,"pika-button")||H(r,"is-empty")||H(r.parentNode,"is-disabled")?H(r,"pika-prev")?t.prevMonth():H(r,"pika-next")&&t.nextMonth():(t.setDate(new Date(r.getAttribute("data-pika-year"),r.getAttribute("data-pika-month"),r.getAttribute("data-pika-day"))),n.bound&&D((function(){t.hide(),n.blurFieldOnSelect&&n.field&&n.field.blur()}),100))),H(r,"pika-select"))t._c=!0;else{if(!e.preventDefault)return e.returnValue=!1,!1;e.preventDefault()}},t._onChange=function(e){e=e||P().event;let n=e.target||e.srcElement;n&&(H(n,"pika-select-month")?t.gotoMonth(n.value):H(n,"pika-select-year")&&t.gotoYear(n.value))},t._onKeyChange=function(e){if(e=e||P().event,t.isVisible())switch(e.keyCode){case 13:case 27:n.field&&n.field.blur();break;case 37:t.adjustDate("subtract",1);break;case 38:t.adjustDate("subtract",7);break;case 39:t.adjustDate("add",1);break;case 40:t.adjustDate("add",7);break;case 8:case 46:t.setDate(null);break}},t._parseFieldValue=function(){if(n.parse)return n.parse(n.field.value,n.format);if(this.hasMoment){let e=this.moment(n.field.value,n.format,n.formatStrict);return e&&e.isValid()?e.toDate():null}return new Date(Date.parse(n.field.value))},t._onInputChange=function(e){let n;e.firedBy!==t&&(n=t._parseFieldValue(),W(n)&&t.setDate(n),t._v||t.show())},t._onInputFocus=function(){t.show()},t._onInputClick=function(){t.show()},t._onInputBlur=function(){let e=x().activeElement;do{if(H(e,"pika-single"))return}while(e=e.parentNode);t._c||(t._b=D((function(){t.hide()}),50)),t._c=!1},t._onClick=function(e){e=e||P().event;let r=e.target||e.srcElement,i=r;if(r){!hasEventListeners&&H(r,"pika-select")&&(r.onchange||(r.setAttribute("onchange","return;"),A(r,"change",t._onChange)));do{if(H(i,"pika-single")||i===n.trigger)return}while(i=i.parentNode);t._v&&r!==n.trigger&&i!==n.trigger&&t.hide()}},t.el=x().createElement("div"),t.el.className="pika-single"+(n.isRTL?" is-rtl":"")+(n.theme?" "+n.theme:""),A(t.el,"mousedown",t._onMouseDown,!0),A(t.el,"touchend",t._onMouseDown,!0),A(t.el,"change",t._onChange),n.keyboardInput&&A(x(),"keydown",t._onKeyChange),n.field&&(n.container?n.container.appendChild(t.el):n.bound?x().body.appendChild(t.el):n.field.parentNode.insertBefore(t.el,n.field.nextSibling),A(n.field,"change",t._onInputChange),n.defaultDate||(n.defaultDate=t._parseFieldValue(),n.setDefaultDate=!0));let r=n.defaultDate;W(r)?n.setDefaultDate?t.setDate(r,!0):t.gotoDate(r):t.gotoDate(new Date),n.bound?(this.hide(),t.el.className+=" is-bound",A(n.trigger,"click",t._onInputClick),A(n.trigger,"focus",t._onInputFocus),A(n.trigger,"blur",t._onInputBlur)):this.show()}function le(e,t,n){return(t=ce(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ce(e){var t=ue(e,"string");return"symbol"==typeof t?t:t+""}function ue(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}ae.prototype={config:function(e){this._o||(this._o=G({},z,!0));let t=G(this._o,e,!0);t.isRTL=!!t.isRTL,t.field=t.field&&t.field.nodeName?t.field:null,t.theme="string"===typeof t.theme&&t.theme?t.theme:null,t.bound=!!(void 0!==t.bound?t.field&&t.bound:t.field),t.trigger=t.trigger&&t.trigger.nodeName?t.trigger:t.field,t.disableWeekends=!!t.disableWeekends,t.disableDayFn="function"===typeof t.disableDayFn?t.disableDayFn:null;let n=parseInt(t.numberOfMonths,10)||1;if(t.numberOfMonths=n>4?4:n,W(t.minDate)||(t.minDate=!1),W(t.maxDate)||(t.maxDate=!1),t.minDate&&t.maxDate&&t.maxDate<t.minDate&&(t.maxDate=t.minDate=!1),t.minDate&&this.setMinDate(t.minDate),t.maxDate&&this.setMaxDate(t.maxDate),U(t.yearRange)){let e=(new Date).getFullYear()-10;t.yearRange[0]=parseInt(t.yearRange[0],10)||e,t.yearRange[1]=parseInt(t.yearRange[1],10)||e}else t.yearRange=Math.abs(parseInt(t.yearRange,10))||z.yearRange,t.yearRange>100&&(t.yearRange=100);return t},toString:function(e){return e=e||this._o.format,W(this._d)?this._o.toString?this._o.toString(this._d,e):this.hasMoment?this.moment(this._d).format(e):this._d.toDateString():""},getMoment:function(){return this.hasMoment?this.moment(this._d):null},setMoment:function(e,t){this.hasMoment&&this.moment.isMoment(e)&&this.setDate(e.toDate(),t)},useMoment:function(e){this.hasMoment=!0,this.moment=e},getDate:function(){return W(this._d)?new Date(this._d.getTime()):null},setDate:function(e,t){if(!e)return this._d=null,this._o.field&&(this._o.field.value="",B(this._o.field,"change",{firedBy:this})),this.draw();if("string"===typeof e&&(e=new Date(Date.parse(e))),!W(e))return;let n=this._o.minDate,r=this._o.maxDate;W(n)&&e<n?e=n:W(r)&&e>r&&(e=r),this._d=new Date(e.getTime()),Q(this._d),this.gotoDate(this._d),this._o.field&&(this._o.field.value=this.toString(),B(this._o.field,"change",{firedBy:this})),t||"function"!==typeof this._o.onSelect||this._o.onSelect.call(this,this.getDate())},clear:function(){this.setDate(null)},gotoDate:function(e){let t=!0;if(W(e)){if(this.calendars){let n=new Date(this.calendars[0].year,this.calendars[0].month,1),r=new Date(this.calendars[this.calendars.length-1].year,this.calendars[this.calendars.length-1].month,1),i=e.getTime();r.setMonth(r.getMonth()+1),r.setDate(r.getDate()-1),t=i<n.getTime()||r.getTime()<i}t&&(this.calendars=[{month:e.getMonth(),year:e.getFullYear()}],"right"===this._o.mainCalendar&&(this.calendars[0].month+=1-this._o.numberOfMonths)),this.adjustCalendars()}},adjustDate:function(e,t){let n,r=this.getDate()||new Date,i=24*parseInt(t)*60*60*1e3;"add"===e?n=new Date(r.valueOf()+i):"subtract"===e&&(n=new Date(r.valueOf()-i)),this.setDate(n)},adjustCalendars:function(){this.calendars[0]=J(this.calendars[0]);for(let e=1;e<this._o.numberOfMonths;e++)this.calendars[e]=J({month:this.calendars[0].month+e,year:this.calendars[0].year});this.draw()},gotoToday:function(){this.gotoDate(new Date)},gotoMonth:function(e){isNaN(e)||(this.calendars[0].month=parseInt(e,10),this.adjustCalendars())},nextMonth:function(){this.calendars[0].month++,this.adjustCalendars()},prevMonth:function(){this.calendars[0].month--,this.adjustCalendars()},gotoYear:function(e){isNaN(e)||(this.calendars[0].year=parseInt(e,10),this.adjustCalendars())},setMinDate:function(e){e instanceof Date?(Q(e),this._o.minDate=e,this._o.minYear=e.getFullYear(),this._o.minMonth=e.getMonth()):(this._o.minDate=z.minDate,this._o.minYear=z.minYear,this._o.minMonth=z.minMonth,this._o.startRange=z.startRange),this.draw()},setMaxDate:function(e){e instanceof Date?(Q(e),this._o.maxDate=e,this._o.maxYear=e.getFullYear(),this._o.maxMonth=e.getMonth()):(this._o.maxDate=z.maxDate,this._o.maxYear=z.maxYear,this._o.maxMonth=z.maxMonth,this._o.endRange=z.endRange),this.draw()},setStartRange:function(e){this._o.startRange=e},setEndRange:function(e){this._o.endRange=e},draw:function(e){if(!this._v&&!e)return;let t,n=this._o,r=n.minYear,i=n.maxYear,s=n.minMonth,o=n.maxMonth,a="";this._y<=r&&(this._y=r,!isNaN(s)&&this._m<s&&(this._m=s)),this._y>=i&&(this._y=i,!isNaN(o)&&this._m>o&&(this._m=o));for(let l=0;l<n.numberOfMonths;l++)t="pika-title-"+Math.random().toString(36).replace(/[^a-z]+/g,"").substr(0,2),a+='<div class="pika-lendar">'+se(this,l,this.calendars[l].year,this.calendars[l].month,this.calendars[0].year,t)+this.render(this.calendars[l].year,this.calendars[l].month,t)+"</div>";this.el.innerHTML=a,n.bound&&"hidden"!==n.field.type&&D((function(){n.trigger.focus()}),1),"function"===typeof this._o.onDraw&&this._o.onDraw(this),n.bound&&n.field.setAttribute("aria-label",n.ariaLabel)},adjustPosition:function(){let e,t,n,r,i,s,o,a,l,c,u;this._o.container||(this.el.style.position="absolute",e=this._o.trigger,t=this.el.offsetWidth,n=this.el.offsetHeight,r=P().innerWidth||x().documentElement.clientWidth,i=P().innerHeight||x().documentElement.clientHeight,s=x().body.scrollTop||x().documentElement.scrollTop,c=!0,u=!0,l=e.getBoundingClientRect(),o=l.left+P().pageXOffset,a=l.bottom+P().pageYOffset,(this._o.reposition&&o+t>r||this._o.position.indexOf("right")>-1&&o-t+e.offsetWidth>0)&&(o=o-t+e.offsetWidth,c=!1),(this._o.reposition&&a+n>i+s||this._o.position.indexOf("top")>-1&&a-n-e.offsetHeight>0)&&(a=a-n-e.offsetHeight,u=!1),o<0&&(o=0),a<0&&(a=0),this.el.style.left=o+"px",this.el.style.top=a+"px",k(this.el,c?"left-aligned":"right-aligned"),k(this.el,u?"bottom-aligned":"top-aligned"),V(this.el,c?"right-aligned":"left-aligned"),V(this.el,u?"top-aligned":"bottom-aligned"))},render:function(e,t,n){let r=this._o,i=new Date,s=Z(e,t),o=new Date(e,t,1).getDay(),a=[],l=[];Q(i),r.firstDay>0&&(o-=r.firstDay,o<0&&(o+=7));let c=0===t?11:t-1,u=11===t?0:t+1,h=0===t?e-1:e,d=11===t?e+1:e,m=Z(h,c),g=s+o,p=g;while(p>7)p-=7;g+=7-p;let f=!1;for(let R=0,y=0;R<g;R++){let n=new Date(e,t,R-o+1),g=!!W(this._d)&&K(n,this._d),p=K(n,i),M=-1!==r.events.indexOf(n.toDateString()),S=R<o||R>=s+o,b=R-o+1,w=t,T=e,O=r.startRange&&K(r.startRange,n),v=r.endRange&&K(r.endRange,n),E=r.startRange&&r.endRange&&r.startRange<n&&n<r.endRange,C=r.minDate&&n<r.minDate||r.maxDate&&n>r.maxDate||r.disableWeekends&&X(n)||r.disableDayFn&&r.disableDayFn(n);S&&(R<o?(b=m+b,w=c,T=h):(b-=s,w=u,T=d));let L={day:b,month:w,year:T,hasEvent:M,isSelected:g,isToday:p,isDisabled:C,isEmpty:S,isStartRange:O,isEndRange:v,isInRange:E,showDaysInNextAndPreviousMonths:r.showDaysInNextAndPreviousMonths,enableSelectionDaysInNextAndPreviousMonths:r.enableSelectionDaysInNextAndPreviousMonths};r.pickWholeWeek&&g&&(f=!0),l.push(q(L)),7===++y&&(r.showWeekNumber&&l.unshift(te(this,R-o,t,e,r.firstWeekOfYearMinDays)),a.push(ne(l,r.isRTL,r.pickWholeWeek,f)),l=[],y=0,f=!1)}return oe(r,a,n)},isVisible:function(){return this._v},show:function(){this.isVisible()||(this._v=!0,this.draw(),V(this.el,"is-hidden"),this._o.bound&&(A(x(),"click",this._onClick),this.adjustPosition()),"function"===typeof this._o.onOpen&&this._o.onOpen.call(this))},hide:function(){let e=this._v;!1!==e&&(this._o.bound&&F(x(),"click",this._onClick),this._o.container||(this.el.style.position="static",this.el.style.left="auto",this.el.style.top="auto"),k(this.el,"is-hidden"),this._v=!1,void 0!==e&&"function"===typeof this._o.onClose&&this._o.onClose.call(this))},destroy:function(){let e=this._o;this.hide(),F(this.el,"mousedown",this._onMouseDown,!0),F(this.el,"touchend",this._onMouseDown,!0),F(this.el,"change",this._onChange),e.keyboardInput&&F(x(),"keydown",this._onKeyChange),e.field&&(F(e.field,"change",this._onInputChange),e.bound&&(F(e.trigger,"click",this._onInputClick),F(e.trigger,"focus",this._onInputFocus),F(e.trigger,"blur",this._onInputBlur))),this.el.parentNode&&this.el.parentNode.removeChild(this.el)}};const he="date",de="dateEditor";class me extends r["a"]{constructor(){super(...arguments),le(this,"defaultDateFormat","DD/MM/YYYY"),le(this,"parentDestroyed",!1),le(this,"$datePicker",null)}static get EDITOR_TYPE(){return he}init(){if("function"!==typeof I)throw new Error("You need to include moment.js to your project.");if("function"!==typeof ae)throw new Error("You need to include Pikaday to your project.");super.init(),this.hot.addHook("afterDestroy",()=>{this.parentDestroyed=!0,this.destroyElements()})}createElements(){super.createElements(),this.datePicker=this.hot.rootDocument.createElement("DIV"),this.datePickerStyle=this.datePicker.style,this.datePickerStyle.position="absolute",this.datePickerStyle.top=0,this.datePickerStyle.left=0,this.datePickerStyle.zIndex=9999,this.datePicker.setAttribute("dir",this.hot.isRtl()?"rtl":"ltr"),Object(i["addClass"])(this.datePicker,"htDatepickerHolder"),this.hot.rootDocument.body.appendChild(this.datePicker),this.eventManager.addEventListener(this.datePicker,"mousedown",e=>{Object(i["hasClass"])(e.target,"pika-day")&&this.hideDatepicker(),e.stopPropagation()})}destroyElements(){const e=this.datePicker.parentNode;this.$datePicker&&this.$datePicker.destroy(),e&&e.removeChild(this.datePicker)}prepare(e,t,n,r,i,s){super.prepare(e,t,n,r,i,s)}open(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;const t=this.hot.getShortcutManager(),n=t.getContext("editor");this.showDatepicker(e),super.open(),n.addShortcuts([{keys:[["ArrowLeft"]],callback:()=>{this.$datePicker.adjustDate("subtract",1)}},{keys:[["ArrowRight"]],callback:()=>{this.$datePicker.adjustDate("add",1)}},{keys:[["ArrowUp"]],callback:()=>{this.$datePicker.adjustDate("subtract",7)}},{keys:[["ArrowDown"]],callback:()=>{this.$datePicker.adjustDate("add",7)}}],{group:de})}close(){var e;this._opened=!1,null!==(e=this.$datePicker)&&void 0!==e&&e.destroy&&this.$datePicker.destroy(),this.hot._registerTimeout(()=>{const e=this.hot._getEditorManager();e.closeEditor(),this.hot.view.render(),e.prepareEditor()});const t=this.hot.getShortcutManager(),n=t.getContext("editor");n.removeShortcutsByGroup(de),super.close()}finishEditing(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];super.finishEditing(e,t)}showDatepicker(e){const t=this.cellProperties.dateFormat||this.defaultDateFormat,n=this.hot.view.isMouseDown(),r=!!e&&Object(g["isFunctionKey"])(e.keyCode);let i;this.datePicker.style.display="block",this.$datePicker=new ae(this.getDatePickerConfig()),"function"===typeof this.$datePicker.useMoment&&this.$datePicker.useMoment(I),this.$datePicker._onInputFocus=function(){},this.originalValue?(i=this.originalValue,I(i,t,!0).isValid()&&this.$datePicker.setMoment(I(i,t),!0),this.getValue()!==this.originalValue&&this.setValue(this.originalValue),r||n||this.setValue("")):this.cellProperties.defaultDate?(i=this.cellProperties.defaultDate,I(i,t,!0).isValid()&&this.$datePicker.setMoment(I(i,t),!0),r||n||this.setValue("")):this.$datePicker.gotoToday()}hideDatepicker(){this.datePickerStyle.display="none",this.$datePicker.hide()}getDatePickerConfig(){const e=this.TEXTAREA,t={};this.cellProperties&&this.cellProperties.datePickerConfig&&Object(o["deepExtend"])(t,this.cellProperties.datePickerConfig);const n=t.onSelect,r=t.onClose;return t.field=e,t.trigger=e,t.container=this.datePicker,t.bound=!1,t.keyboardInput=!1,t.format=t.format||this.defaultDateFormat,t.reposition=t.reposition||!1,t.isRTL=!1,t.onSelect=e=>{let t=e;isNaN(t.getTime())||(t=I(t).format(this.cellProperties.dateFormat||this.defaultDateFormat)),this.setValue(t),n&&n()},t.onClose=()=>{this.parentDestroyed||this.finishEditing(!1),r&&r()},t}refreshDimensions(e){var t;if(super.refreshDimensions(e),this.state!==L["b"].EDITING)return;if(this.TD=this.getEditedCell(),!this.TD)return void this.hideDatepicker();const{rowIndexMapper:n,columnIndexMapper:r}=this.hot,{wtOverlays:s}=this.hot.view._wt,{wtTable:o}=null!==(t=s.getParentOverlay(this.TD))&&void 0!==t?t:this.hot.view._wt,a=n.getVisualFromRenderableIndex(o.getFirstPartiallyVisibleRow()),l=n.getVisualFromRenderableIndex(o.getLastPartiallyVisibleRow()),c=r.getVisualFromRenderableIndex(o.getFirstPartiallyVisibleColumn()),u=r.getVisualFromRenderableIndex(o.getLastPartiallyVisibleColumn());if(this.row>=a&&this.row<=l&&this.col>=c&&this.col<=u){const e=this.TD.getBoundingClientRect();this.datePickerStyle.top=this.hot.rootWindow.pageYOffset+e.top+Object(i["outerHeight"])(this.TD)+"px";let t=this.hot.rootWindow.pageXOffset;this.hot.isRtl()?t+=e.right-Object(i["outerWidth"])(this.datePicker):t+=e.left,this.datePickerStyle.left=t+"px"}else this.hideDatepicker()}}var ge=n("1004");const pe="dropdown";class fe extends C{static get EDITOR_TYPE(){return pe}prepare(e,t,n,r,i,s){super.prepare(e,t,n,r,i,s),this.cellProperties.filter=!1,this.cellProperties.strict=!0}}ge["a"].getSingleton().add("beforeValidate",(function(e,t,n){const r=this.propToCol(n);if(Number.isInteger(r)){const e=this.getCellMeta(t,r);e.editor===fe&&void 0===e.strict&&(e.filter=!1,e.strict=!0)}}));const Re="numeric";class ye extends r["a"]{static get EDITOR_TYPE(){return Re}}const Me="password";class Se extends r["a"]{static get EDITOR_TYPE(){return Me}createElements(){super.createElements(),this.TEXTAREA=this.hot.rootDocument.createElement("input"),this.TEXTAREA.setAttribute("type","password"),this.TEXTAREA.setAttribute("data-hot-input",""),this.TEXTAREA.className="handsontableInput",this.textareaStyle=this.TEXTAREA.style,this.textareaStyle.width=0,this.textareaStyle.height=0,Object(i["empty"])(this.TEXTAREA_PARENT),this.TEXTAREA_PARENT.appendChild(this.TEXTAREA)}}const be="ht_editor_visible",we="selectEditor",Te="select";class Oe extends L["a"]{static get EDITOR_TYPE(){return Te}init(){this.select=this.hot.rootDocument.createElement("select"),this.select.setAttribute("data-hot-input","true"),this.select.style.display="none",Object(i["addClass"])(this.select,"htSelectEditor"),this.hot.rootElement.appendChild(this.select),this.registerHooks()}getValue(){return this.select.value}setValue(e){this.select.value=e}open(){this._opened=!0,this.refreshDimensions(),this.select.style.display="";const e=this.hot.getShortcutManager();e.setActiveContextName("editor"),this.registerShortcuts()}close(){this._opened=!1,this.select.style.display="none",Object(i["hasClass"])(this.select,be)&&Object(i["removeClass"])(this.select,be),this.unregisterShortcuts(),this.clearHooks()}focus(){this.select.focus()}registerHooks(){this.addHook("afterScrollHorizontally",()=>this.refreshDimensions()),this.addHook("afterScrollVertically",()=>this.refreshDimensions()),this.addHook("afterColumnResize",()=>this.refreshDimensions()),this.addHook("afterRowResize",()=>this.refreshDimensions())}prepare(e,t,n,r,s,a){super.prepare(e,t,n,r,s,a);const l=this.cellProperties.selectOptions;let c;c="function"===typeof l?this.prepareOptions(l(this.row,this.col,this.prop)):this.prepareOptions(l),Object(i["empty"])(this.select),Object(o["objectEach"])(c,(e,t)=>{const n=this.hot.rootDocument.createElement("OPTION");n.value=t,Object(i["fastInnerHTML"])(n,e),this.select.appendChild(n)})}prepareOptions(e){let t={};if(Array.isArray(e))for(let n=0,r=e.length;n<r;n++)t[e[n]]=e[n];else"object"===typeof e&&(t=e);return t}refreshValue(){const e=this.hot.getSourceDataAtCell(this.row,this.prop);this.originalValue=e,this.setValue(e),this.refreshDimensions()}refreshDimensions(){if(this.state!==L["b"].EDITING)return;if(this.TD=this.getEditedCell(),!this.TD)return void this.close();const{top:e,start:t,width:n,height:r}=this.getEditedCellRect(),s=this.select.style;s.height=r+"px",s.width=n+"px",s.top=e+"px",s[this.hot.isRtl()?"right":"left"]=t+"px",s.margin="0px",Object(i["addClass"])(this.select,be)}registerShortcuts(){const e=this.hot.getShortcutManager(),t=e.getContext("editor"),n={group:we};this.isInFullEditMode()&&t.addShortcuts([{keys:[["ArrowUp"]],callback:()=>{const e=this.select.selectedIndex-1;e>=0&&(this.select[e].selected=!0)}},{keys:[["ArrowDown"]],callback:()=>{const e=this.select.selectedIndex+1;e<=this.select.length-1&&(this.select[e].selected=!0)}}],n)}unregisterShortcuts(){const e=this.hot.getShortcutManager(),t=e.getContext("editor");t.removeShortcutsByGroup(we)}}const ve="time";class Ee extends r["a"]{static get EDITOR_TYPE(){return ve}prepare(e,t,n,r,i,s){super.prepare(e,t,n,r,i,s),this.TEXTAREA.dir="ltr"}}var Ce=n("491c");function Le(){Object(Ce["e"])(L["a"]),Object(Ce["e"])(C),Object(Ce["e"])(_),Object(Ce["e"])(me),Object(Ce["e"])(fe),Object(Ce["e"])(u),Object(Ce["e"])(ye),Object(Ce["e"])(Se),Object(Ce["e"])(Oe),Object(Ce["e"])(r["a"]),Object(Ce["e"])(Ee)}var Ne=n("a357");const _e="html";function Ie(e,t,n,r,s,o,a){Ne["a"].apply(this,[e,t,n,r,s,o,a]),Object(i["fastInnerHTML"])(t,null===o||void 0===o?"":o,!1)}Ie.RENDERER_TYPE=_e;var Pe=n("87d6");const xe="autocomplete";function De(e,t,n,r,s,o,a){const{rootDocument:l}=e,c=a.allowHtml?Ie:f["a"],u=l.createElement("DIV"),h=e.getSettings().ariaTags;if(u.className="htAutocompleteArrow",h&&u.setAttribute(...Object(R["n"])()),u.appendChild(l.createTextNode(String.fromCharCode(9660))),c.apply(this,[e,t,n,r,s,o,a]),t.firstChild||t.appendChild(l.createTextNode(String.fromCharCode(160))),t.insertBefore(u,t.firstChild),Object(i["addClass"])(t,"htAutocomplete"),!e.acArrowListener){const s=new Pe["a"](e);e.acArrowListener=function(s){Object(i["hasClass"])(s.target,"htAutocompleteArrow")&&e.view._wt.getSetting("onCellDblClick",null,e._createCellCoords(n,r),t)},s.addEventListener(e.rootElement,"mousedown",e.acArrowListener),e.addHookOnce("afterDestroy",()=>{s.destroy()})}}De.RENDERER_TYPE=xe;const Ae="dropdown";function Fe(e,t,n,r,i,s,o){De.apply(this,[e,t,n,r,i,s,o])}Fe.RENDERER_TYPE=Ae;var Ye=n("0283");const He=new WeakMap,ke=new WeakMap,Ve="htBadValue",Ue="data-row",We="data-col",Xe="checkboxRenderer",je="checkbox";function Ze(e,t,n,r,s,o,l){const{rootDocument:c}=e,u=e.getSettings().ariaTags;Ne["a"].apply(this,[e,t,n,r,s,o,l]),Qe(e);let h=Ke(c);const m=l.label;let g=!1;if("undefined"===typeof l.checkedTemplate&&(l.checkedTemplate=!0),"undefined"===typeof l.uncheckedTemplate&&(l.uncheckedTemplate=!1),Object(i["empty"])(t),o===l.checkedTemplate||Object(d["stringify"])(o).toLocaleLowerCase(l.locale)===Object(d["stringify"])(l.checkedTemplate).toLocaleLowerCase(l.locale)?h.checked=!0:o===l.uncheckedTemplate||Object(d["stringify"])(o).toLocaleLowerCase(l.locale)===Object(d["stringify"])(l.uncheckedTemplate).toLocaleLowerCase(l.locale)?h.checked=!1:Object(d["isEmpty"])(o)?Object(i["addClass"])(h,"noValue"):(h.style.display="none",Object(i["addClass"])(h,Ve),g=!0),Object(i["setAttribute"])(h,[[Ue,n],[We,r]]),u&&Object(i["setAttribute"])(h,[Object(R["p"])(h.checked?e.getTranslatedPhrase(Ye["CHECKBOX_CHECKED"]):e.getTranslatedPhrase(Ye["CHECKBOX_UNCHECKED"])),Object(R["d"])(h.checked),Object(R["c"])()]),!g&&m){let i="";if(m.value)i="function"===typeof m.value?m.value.call(this,n,r,s,o):m.value;else if(m.property){const t=e.getDataAtRowProp(n,m.property);i=null!==t?t:""}const a=Ge(c,i,!0!==m.separated);"before"===m.position?m.separated?(t.appendChild(a),t.appendChild(h)):(a.appendChild(h),h=a):m.position&&"after"!==m.position||(m.separated?(t.appendChild(h),t.appendChild(a)):(a.insertBefore(h,a.firstChild),h=a))}function p(){const t=e.getShortcutManager(),n=t.getContext("grid"),r={group:Xe,relativeToGroup:a["a"],position:"before"};n.addShortcuts([{keys:[["space"]],callback:()=>(f(),!y()),runOnlyIf:()=>{var t;return null===(t=e.getSelectedRangeLast())||void 0===t?void 0:t.highlight.isCell()}},{keys:[["enter"]],callback:()=>(f(),!y()),runOnlyIf:()=>{const t=e.getSelectedRangeLast();return e.getSettings().enterBeginsEditing&&(null===t||void 0===t?void 0:t.isSingle())&&t.highlight.isCell()}},{keys:[["delete"],["backspace"]],callback:()=>(f(!0),!y()),runOnlyIf:()=>{var t;return null===(t=e.getSelectedRangeLast())||void 0===t?void 0:t.highlight.isCell()}}],r)}function f(){let t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];const n=e.getSelectedRange(),r=[],i=new Map;let s=[],o=0;if(n){for(let a=0;a<n.length;a++){const{row:l,col:c}=n[a].getTopStartCorner(),{row:u,col:h}=n[a].getBottomEndCorner();for(let n=l;n<=u;n+=1)for(let a=c;a<=h;a+=1){const l=e.getCellMeta(n,a),c={checkedTemplate:l.checkedTemplate,uncheckedTemplate:l.uncheckedTemplate};if("checkbox"!==l.type){!0!==t||l.readOnly||(i.has(r.length)?i.set(r.length,[...i.get(r.length),[n,a,null]]):i.set(r.length,[[n,a,null]]));continue}if(!0===l.readOnly)continue;"undefined"===typeof l.checkedTemplate&&(l.checkedTemplate=!0),"undefined"===typeof l.uncheckedTemplate&&(l.uncheckedTemplate=!1);const u=e.getDataAtCell(n,a);!1===t?[l.checkedTemplate,l.checkedTemplate.toString()].includes(u)?s.push([n,a,l.uncheckedTemplate,c]):[l.uncheckedTemplate,l.uncheckedTemplate.toString(),null,void 0].includes(u)&&s.push([n,a,l.checkedTemplate,c]):s.push([n,a,l.uncheckedTemplate,c]),o+=1}r.push(o),o=0}s=s.every(e=>{let[,,t]=e;return t===s[0][2]})?s.map(e=>{let[t,n,r]=e;return[t,n,r]}):s.map(e=>{let[t,n,,r]=e;return[t,n,r.checkedTemplate]}),s.length>0&&r.forEach((t,n)=>{let r=s.splice(0,t);i.size&&i.has(n)&&(r=[...r,...i.get(n)]),e.setDataAtCell(r)})}}function y(){const t=e.getSelectedRange();if(t){for(let n=0;n<t.length;n++){const r=t[n].getTopStartCorner(),i=t[n].getBottomEndCorner();for(let t=r.row;t<=i.row;t++)for(let n=r.col;n<=i.col;n++){const r=e.getCellMeta(t,n),i=e.getCell(t,n);if(null===i||void 0===i)return!0;{const e=i.querySelectorAll("input[type=checkbox]");if(e.length>0&&!r.readOnly)return!0}}}return!1}}(!m||m&&!m.separated)&&t.appendChild(h),g&&t.appendChild(c.createTextNode("#bad-value#")),He.has(e)||(He.set(e,!0),p())}function Qe(e){let t=ke.get(e);if(!t){const{rootElement:n}=e;t=new Pe["a"](e),t.addEventListener(n,"click",t=>Je(t,e)),t.addEventListener(n,"mouseup",t=>Be(t,e)),t.addEventListener(n,"change",t=>ze(t,e)),ke.set(e,t)}return t}function Ke(e){const t=e.createElement("input");return t.className="htCheckboxRendererInput",t.type="checkbox",t.setAttribute("tabindex","-1"),t.cloneNode(!1)}function Ge(e,t,n){const r=e.createElement("label");return r.className="htCheckboxRendererLabel "+(n?"fullWidth":""),r.appendChild(e.createTextNode(t)),r.cloneNode(!0)}function Be(e,t){const{target:n}=e;$e(n)&&n.hasAttribute(Ue)&&n.hasAttribute(We)&&setTimeout(t.listen,10)}function Je(e,t){const{target:n}=e;if(!$e(n))return;if(!n.hasAttribute(Ue)||!n.hasAttribute(We))return;const r=parseInt(n.getAttribute(Ue),10),i=parseInt(n.getAttribute(We),10),s=t.getCellMeta(r,i);s.readOnly&&e.preventDefault()}function ze(e,t){const{target:n}=e;if(!$e(n))return;if(!n.hasAttribute(Ue)||!n.hasAttribute(We))return;const r=parseInt(n.getAttribute(Ue),10),i=parseInt(n.getAttribute(We),10),s=t.getCellMeta(r,i);if(!s.readOnly){let n=null;n=e.target.checked?void 0===s.uncheckedTemplate||s.checkedTemplate:void 0!==s.uncheckedTemplate&&s.uncheckedTemplate,t.setDataAtCell(r,i,n)}}function $e(e){return"INPUT"===e.tagName&&"checkbox"===e.getAttribute("type")}ge["a"].getSingleton().add("modifyAutoColumnSizeSeed",(function(e,t,n){const{label:r,type:i,row:s,column:o,prop:a}=t;if(i===je){if(r){const{value:t,property:i}=r;let l=n;if(t)l="function"===typeof t?t(s,o,a,n):t;else if(i){const e=this.getDataAtRowProp(s,i);l=null!==e?e:n}e=l}return e}})),Ze.RENDERER_TYPE=je;const qe="handsontable";function et(e,t,n,r,i,s,o){De.apply(this,[e,t,n,r,i,s,o])}et.RENDERER_TYPE=qe;var tt=n("8722"),nt=n("ffec");const rt="numeric";function it(e,t){if(Object(nt["isNumeric"])(e)){const n=t.numericFormat,r=n&&n.culture||"-",i=n&&n.pattern;if("undefined"!==typeof r&&!tt.languages()[r]){const e=r.replace("-",""),t=tt.allLanguages?tt.allLanguages[r]:tt[e];t&&tt.registerLanguage(t)}tt.setLanguage(r),e=tt(e).format(i||"0")}return e}function st(e,t,n,r,i,s,o){let a=s;if(Object(nt["isNumeric"])(a)){const e=o.className||"",n=e.length?e.split(" "):[];a=it(a,o),n.indexOf("htLeft")<0&&n.indexOf("htCenter")<0&&n.indexOf("htRight")<0&&n.indexOf("htJustify")<0&&n.push("htRight"),n.indexOf("htNumeric")<0&&n.push("htNumeric"),o.className=n.join(" "),t.dir="ltr"}Object(f["a"])(e,t,n,r,i,a,o)}st.RENDERER_TYPE=rt;const ot="password";function at(e,t,n,r,s,o,a){f["a"].apply(this,[e,t,n,r,s,o,a]);const l=a.hashLength||t.innerHTML.length,c=a.hashSymbol||"*";let u="";Object(nt["rangeEach"])(l-1,()=>{u+=c}),Object(i["fastInnerHTML"])(t,u)}at.RENDERER_TYPE=ot;const lt="select";function ct(e,t,n,r,i,s,o){f["a"].apply(this,[e,t,n,r,i,s,o])}ct.RENDERER_TYPE=lt;const ut="time";function ht(e,t,n,r,i,s,o){f["a"].apply(this,[e,t,n,r,i,s,o]),t.dir="ltr"}ht.RENDERER_TYPE=ut;var dt=n("3d76");function mt(){Object(dt["d"])(De),Object(dt["d"])(Ne["a"]),Object(dt["d"])(Ze),Object(dt["d"])(Fe),Object(dt["d"])(et),Object(dt["d"])(Ie),Object(dt["d"])(st),Object(dt["d"])(at),Object(dt["d"])(ct),Object(dt["d"])(f["a"]),Object(dt["d"])(ht)}const gt="autocomplete";function pt(e,t){let n=e;null!==n&&void 0!==n||(n=""),this.allowEmpty&&""===n?t(!0):this.strict&&this.source?"function"===typeof this.source?this.source(n,ft(n,t)):ft(n,t)(this.source):t(!0)}function ft(e,t){const n=e;return function(e){let r=!1;for(let t=0,i=e.length;t<i;t++)if(n===e[t]){r=!0;break}t(r)}}pt.VALIDATOR_TYPE=gt;var Rt=n("3eb5");const yt="date";function Mt(e,t){const n=Object(Ce["b"])(he,this.instance);let r=e,i=!0;null!==r&&void 0!==r||(r="");let s=I(r,this.dateFormat||n.defaultDateFormat,!0).isValid(),o=I(new Date(r)).isValid()||s;if(this.allowEmpty&&""===r&&(o=!0,s=!0),o||(i=!1),!o&&s&&(i=!0),o&&!s)if(!0===this.correctFormat){const e=St(r,this.dateFormat);this.instance.setDataAtCell(this.visualRow,this.visualCol,e,"dateValidator"),i=!0}else i=!1;t(i)}function St(e,t){const n=I(Object(Rt["getNormalizedDate"])(e)),r=I(e,t),i=e.search(/[A-z]/g)>-1;let s;return s=n.isValid()&&n.format("x")===r.format("x")||!r.isValid()||i?n:r,s.format(t)}Mt.VALIDATOR_TYPE=yt;const bt="dropdown";function wt(e,t){pt.apply(this,[e,t])}wt.VALIDATOR_TYPE=bt;const Tt="numeric";function Ot(e,t){let n=e;null!==n&&void 0!==n||(n=""),this.allowEmpty&&""===n?t(!0):t(""!==n&&Object(nt["isNumeric"])(e))}Ot.VALIDATOR_TYPE=Tt;const vt=["YYYY-MM-DDTHH:mm:ss.SSSZ","X","x"],Et="time";function Ct(e,t){const n=this.timeFormat||"h:mm:ss a";let r=!0,i=e;null===i&&(i=""),i=/^\d{3,}$/.test(i)?parseInt(i,10):i;const s=/^\d{1,2}$/.test(i);s&&(i+=":00");const o=I(i,vt,!0).isValid()?I(i):I(i,n);let a=o.isValid(),l=I(i,n,!0).isValid()&&!s;if(this.allowEmpty&&""===i&&(a=!0,l=!0),a||(r=!1),!a&&l&&(r=!0),a&&!l)if(!0===this.correctFormat){const e=o.format(n);this.instance.setDataAtCell(this.visualRow,this.visualCol,e,"timeValidator"),r=!0}else r=!1;t(r)}Ct.VALIDATOR_TYPE=Et;var Lt=n("169f");function Nt(){Object(Lt["d"])(pt),Object(Lt["d"])(wt),Object(Lt["d"])(Mt),Object(Lt["d"])(Ot),Object(Lt["d"])(Ct)}const _t="autocomplete",It={CELL_TYPE:_t,editor:C,renderer:De,validator:pt},Pt="checkbox",xt={CELL_TYPE:Pt,editor:_,renderer:Ze},Dt="date";function At(e,t,n,r,i,s,o){De.apply(this,[e,t,n,r,i,s,o])}At.RENDERER_TYPE=Dt;const Ft="date",Yt={CELL_TYPE:Ft,editor:me,renderer:At,validator:Mt},Ht="dropdown",kt={CELL_TYPE:Ht,editor:fe,renderer:Fe,validator:wt},Vt="handsontable",Ut={CELL_TYPE:Vt,editor:u,renderer:et},Wt="numeric",Xt={CELL_TYPE:Wt,editor:ye,renderer:st,validator:Ot,dataType:"number"},jt="password",Zt={CELL_TYPE:jt,editor:Se,renderer:at,copyable:!1},Qt="select",Kt={CELL_TYPE:Qt,editor:Oe,renderer:ct};var Gt=n("ef07");const Bt="time",Jt={CELL_TYPE:Bt,editor:Ee,renderer:ht,validator:Ct};var zt=n("76ab");function $t(){Object(zt["d"])(It),Object(zt["d"])(xt),Object(zt["d"])(Yt),Object(zt["d"])(kt),Object(zt["d"])(Ut),Object(zt["d"])(Xt),Object(zt["d"])(Zt),Object(zt["d"])(Kt),Object(zt["d"])(Gt["a"]),Object(zt["d"])(Jt)}var qt=n("d3c5"),en=n("7dd0"),tn=n("220a");function nn(e,t,n){return(t=rn(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function rn(e){var t=sn(e,"string");return"symbol"==typeof t?t:t+""}function sn(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}class on{static get SAMPLE_COUNT(){return 3}constructor(e){nn(this,"samples",null),nn(this,"dataFactory",null),nn(this,"customSampleCount",null),nn(this,"allowDuplicates",!1),this.dataFactory=e}getSampleCount(){return this.customSampleCount?this.customSampleCount:on.SAMPLE_COUNT}setSampleCount(e){this.customSampleCount=e}setAllowDuplicates(e){this.allowDuplicates=e}generateRowSamples(e,t){return this.generateSamples("row",t,e)}generateColumnSamples(e,t){return this.generateSamples("col",t,e)}generateSamples(e,t,n){const r=new Map,{from:i,to:s}="number"===typeof n?{from:n,to:n}:n;return Object(nt["rangeEach"])(i,s,n=>{const i=this.generateSample(e,t,n);r.set(n,i)}),r}generateSample(e,t,n){if("row"!==e&&"col"!==e)throw new Error("Unsupported sample type");const r=new Map,i="row"===e?"col":"row",s=[];return Object(nt["rangeEach"])(t.from,t.to,t=>{const a="row"===e?this.dataFactory(n,t):this.dataFactory(t,n);if(!1===a)return;const{value:l,bundleSeed:c}=a,u="string"===typeof c&&c.length>0;let h;h=u?c:Object(o["isObject"])(l)?""+Object.keys(l).length:Array.isArray(l)?""+l.length:""+Object(d["stringify"])(l).length,r.has(h)||r.set(h,{needed:this.getSampleCount(),strings:[]});const m=r.get(h);if(m.needed){const e=s.indexOf(l)>-1;(!e||this.allowDuplicates||u)&&(m.strings.push({value:l,[i]:t}),s.push(l),m.needed-=1)}}),r}}var an=on,ln=n("861dd"),cn=n("9f10");function un(e,t){dn(e,t),t.add(e)}function hn(e,t,n){dn(e,t),t.set(e,n)}function dn(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function mn(e,t,n){return(t=gn(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function gn(e){var t=pn(e,"string");return"symbol"==typeof t?t:t+""}function pn(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function fn(e,t){return e.get(yn(e,t))}function Rn(e,t,n){return e.set(yn(e,t),n),n}function yn(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}ge["a"].getSingleton().register("modifyAutoColumnSizeSeed");const Mn="autoColumnSize",Sn=10,bn="autoColumnSize";var wn=new WeakMap,Tn=new WeakMap,On=new WeakSet;class vn extends qt["a"]{static get PLUGIN_KEY(){return Mn}static get PLUGIN_PRIORITY(){return Sn}static get SETTING_KEYS(){return!0}static get CALCULATION_STEP(){return 50}static get SYNC_CALCULATION_LIMIT(){return 50}constructor(e){super(e),un(this,On),mn(this,"ghostTable",new tn["a"](this.hot)),mn(this,"samplesGenerator",new an((e,t)=>{const n=this.hot.toPhysicalRow(e),r=this.hot.toPhysicalColumn(t);if(this.hot.rowIndexMapper.isHidden(n)||this.hot.columnIndexMapper.isHidden(r))return!1;const i=this.hot.getCellMeta(e,t);let s="";i.spanned||(s=this.hot.getDataAtCell(e,t));let o="";return this.hot.hasHook("modifyAutoColumnSizeSeed")&&(o=this.hot.runHooks("modifyAutoColumnSizeSeed",o,i,s)),{value:s,bundleSeed:o}})),mn(this,"inProgress",!1),mn(this,"measuredColumns",0),mn(this,"columnWidthsMap",new cn["a"]),hn(this,wn,[]),hn(this,Tn,[]),this.hot.columnIndexMapper.registerMap(bn,this.columnWidthsMap),this.addHook("beforeColumnResize",(e,t,n)=>yn(On,this,_n).call(this,e,t,n))}isEnabled(){return!1!==this.hot.getSettings()[Mn]&&!this.hot.getSettings().colWidths}enablePlugin(){var e=this;if(this.enabled)return;const t=this.hot.getSettings()[Mn];t&&null!==t.useHeaders&&void 0!==t.useHeaders&&this.ghostTable.setSetting("useHeaders",t.useHeaders),this.setSamplingOptions(),this.addHook("afterLoadData",(function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return yn(On,e,Ln).call(e,...n)})),this.addHook("beforeChangeRender",(function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return yn(On,e,Nn).call(e,...n)})),this.addHook("afterFormulasValuesUpdate",(function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return yn(On,e,Pn).call(e,...n)})),this.addHook("beforeRender",()=>yn(On,this,Cn).call(this)),this.addHook("modifyColWidth",(e,t)=>this.getColumnWidth(t,e)),this.addHook("init",()=>yn(On,this,In).call(this)),super.enablePlugin()}updatePlugin(){Rn(Tn,this,this.findColumnsWhereHeaderWasChanged()),super.updatePlugin()}disablePlugin(){super.disablePlugin(),this.addHook("beforeColumnResize",(e,t,n)=>yn(On,this,_n).call(this,e,t,n))}calculateVisibleColumnsWidth(){if(!this.hot.countRows())return;const e=this.getFirstVisibleColumn(),t=this.getLastVisibleColumn();if(-1===e||-1===t)return;const n=this.hot.renderCall;this.calculateColumnsWidth({from:e,to:t},void 0,n)}calculateColumnsWidth(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{from:0,to:this.hot.countCols()-1},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{from:0,to:this.hot.countRows()-1},n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const r="number"===typeof e?{from:e,to:e}:e,i="number"===typeof t?{from:t,to:t}:t;Object(nt["rangeEach"])(r.from,r.to,e=>{let t=this.hot.toPhysicalColumn(e);if(null===t&&(t=e),n||null===this.columnWidthsMap.getValueAtIndex(t)&&!this.hot._getColWidthFromSettings(t)){const t=this.samplesGenerator.generateColumnSamples(e,i);t.forEach((e,t)=>this.ghostTable.addColumn(t,e))}}),this.ghostTable.columns.length&&(this.hot.batchExecution(()=>{this.ghostTable.getWidths((e,t)=>{const n=this.hot.toPhysicalColumn(e);this.columnWidthsMap.setValueAtIndex(n,t)})},!0),this.measuredColumns=r.to+1,this.ghostTable.clean())}calculateAllColumnsWidth(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{from:0,to:this.hot.countRows()-1},t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=0;const r=this.hot.countCols()-1;let i=null;this.inProgress=!0;const s=()=>{if(!this.hot)return Object(en["cancelAnimationFrame"])(i),void(this.inProgress=!1);this.calculateColumnsWidth({from:n,to:Math.min(n+vn.CALCULATION_STEP,r)},e,t),n=n+vn.CALCULATION_STEP+1,n<r?i=Object(en["requestAnimationFrame"])(s):(Object(en["cancelAnimationFrame"])(i),this.inProgress=!1,this.hot.view.adjustElementsSize())},o=this.getSyncCalculationLimit();o>=0&&(this.calculateColumnsWidth({from:0,to:o},e,t),n=o+1),n<r?s():this.inProgress=!1}setSamplingOptions(){const e=this.hot.getSettings()[Mn],t=e&&Object(o["hasOwnProperty"])(e,"samplingRatio")?e.samplingRatio:void 0,n=e&&Object(o["hasOwnProperty"])(e,"allowSampleDuplicates")?e.allowSampleDuplicates:void 0;t&&!isNaN(t)&&this.samplesGenerator.setSampleCount(parseInt(t,10)),n&&this.samplesGenerator.setAllowDuplicates(n)}recalculateAllColumnsWidth(){this.hot.view.isVisible()&&this.calculateAllColumnsWidth({from:0,to:this.hot.countRows()-1},!0)}getSyncCalculationLimit(){const e=this.hot.getSettings()[Mn];let t=vn.SYNC_CALCULATION_LIMIT;const n=this.hot.countCols()-1;return Object(o["isObject"])(e)&&(t=e.syncLimit,Object(m["isPercentValue"])(t)?t=Object(nt["valueAccordingPercent"])(n,t):t>>=0),Math.min(t,n)}getColumnWidth(e,t){let n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],r=t;return void 0===r&&(r=this.columnWidthsMap.getValueAtIndex(this.hot.toPhysicalColumn(e)),n&&"number"===typeof r&&(r=Math.max(r,ln["a"]))),r}getFirstVisibleColumn(){var e;return null!==(e=this.hot.view.getFirstRenderedVisibleColumn())&&void 0!==e?e:-1}getLastVisibleColumn(){var e;return null!==(e=this.hot.view.getLastRenderedVisibleColumn())&&void 0!==e?e:-1}findColumnsWhereHeaderWasChanged(){const e=this.hot.getColHeader(),t=e.reduce((e,t,n)=>{const r=fn(wn,this).length;return(r-1<n||fn(wn,this)[n]!==t)&&e.push(this.hot.toVisualColumn(n)),r-1<n?fn(wn,this).push(t):fn(wn,this)[n]=t,e},[]);return t}clearCache(e){Array.isArray(e)?this.hot.batchExecution(()=>{e.forEach(e=>{this.columnWidthsMap.setValueAtIndex(e,null)})},!0):this.columnWidthsMap.clear()}isNeedRecalculate(){return!!this.columnWidthsMap.getValues().slice(0,this.measuredColumns).filter(e=>null===e).length}destroy(){this.ghostTable.clean(),super.destroy()}}function En(e){const t={from:0,to:this.hot.countRows()-1};e.forEach(e=>{const n=this.hot.toPhysicalColumn(e);if(null!==n&&!this.hot._getColWidthFromSettings(n)){const n=this.samplesGenerator.generateColumnSamples(e,t);n.forEach((e,t)=>this.ghostTable.addColumn(t,e))}}),this.ghostTable.columns.length&&(this.hot.batchExecution(()=>{this.ghostTable.getWidths((e,t)=>{const n=this.hot.toPhysicalColumn(e);this.columnWidthsMap.setValueAtIndex(n,t)})},!0),this.ghostTable.clean())}function Cn(){this.calculateVisibleColumnsWidth(),this.inProgress||(yn(On,this,En).call(this,fn(Tn,this)),Rn(Tn,this,[]))}function Ln(e,t){t||this.recalculateAllColumnsWidth()}function Nn(e){const t=e.reduce((e,t)=>{let[,n]=t;const r=this.hot.propToCol(n);return Number.isInteger(r)&&-1===e.indexOf(r)&&e.push(r),e},[]);fn(Tn,this).push(...t)}function _n(e,t,n){let r=e;return n&&(this.calculateColumnsWidth(t,void 0,!0),r=this.getColumnWidth(t,void 0,!1)),r}function In(){Rn(wn,this,this.hot.getColHeader()),this.recalculateAllColumnsWidth()}function Pn(e){const t=e.reduce((e,t)=>{var n;const r=null===(n=t.address)||void 0===n?void 0:n.col;if(Number.isInteger(r)){const t=this.hot.toVisualColumn(r);-1===e.indexOf(t)&&e.push(t)}return e},[]);fn(Tn,this).push(...t)}const xn={horizontal:"horizontal",vertical:"vertical"};function Dn(e,t,n){let r,i,s;return t[0]===e[0]&&t[1]<e[1]?(s="left",r=n(t[0],t[1]),i=n(t[2],e[1]-1)):t[2]===e[2]&&t[0]===e[0]&&t[3]>e[3]?(s="right",r=n(t[0],e[3]+1),i=n(t[2],t[3])):t[0]<e[0]&&t[1]===e[1]?(s="up",r=n(t[0],t[1]),i=n(e[0]-1,t[3])):t[2]>e[2]&&t[1]===e[1]&&(s="down",r=n(e[2]+1,t[1]),i=n(t[2],t[3])),r&&r.normalize(),i&&i.normalize(),{directionOfDrag:s,startOfDragCoords:r,endOfDragCoords:i}}function An(e){const t={};return!0===e?(t.directions=Object.keys(xn),t.autoInsertRow=!0):Object(o["isObject"])(e)?(Object(d["isDefined"])(e.autoInsertRow)?e.direction===xn.horizontal?t.autoInsertRow=!1:t.autoInsertRow=e.autoInsertRow:t.autoInsertRow=!1,Object(d["isDefined"])(e.direction)?t.directions=[e.direction]:t.directions=Object.keys(xn)):"string"===typeof e?(t.directions=[e],t.autoInsertRow=!0):(t.directions=[],t.autoInsertRow=!1),t}function Fn(e,t){Yn(e,t),t.add(e)}function Yn(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Hn(e,t,n){return(t=kn(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function kn(e){var t=Vn(e,"string");return"symbol"==typeof t?t:t+""}function Vn(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function Un(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}ge["a"].getSingleton().register("modifyAutofillRange"),ge["a"].getSingleton().register("beforeAutofill"),ge["a"].getSingleton().register("afterAutofill");const Wn="autofill",Xn=20,jn=["fillHandle"],Zn="insert_row_below",Qn=200;var Kn=new WeakSet;class Gn extends qt["a"]{constructor(){super(...arguments),Fn(this,Kn),Hn(this,"addingStarted",!1),Hn(this,"mouseDownOnCellCorner",!1),Hn(this,"mouseDragOutside",!1),Hn(this,"handleDraggedCells",0),Hn(this,"directions",[]),Hn(this,"autoInsertRow",!1)}static get PLUGIN_KEY(){return Wn}static get PLUGIN_PRIORITY(){return Xn}static get SETTING_KEYS(){return[Wn,...jn]}isEnabled(){return this.hot.getSettings().fillHandle}enablePlugin(){this.enabled||(this.mapSettings(),this.registerEvents(),this.addHook("afterOnCellCornerMouseDown",e=>Un(Kn,this,Jn).call(this,e)),this.addHook("afterOnCellCornerDblClick",e=>Un(Kn,this,Bn).call(this,e)),this.addHook("beforeOnCellMouseOver",(e,t)=>Un(Kn,this,zn).call(this,t)),super.enablePlugin())}updatePlugin(){this.disablePlugin(),this.enablePlugin(),super.updatePlugin()}disablePlugin(){this.clearMappedSettings(),super.disablePlugin()}getSelectionData(){const e=this.hot.getSelectedRangeLast(),{row:t,col:n}=e.getTopStartCorner(),{row:r,col:i}=e.getBottomEndCorner(),s=this.hot.runHooks("modifyCopyableRange",[{startRow:t,startCol:n,endRow:r,endCol:i}]),o=[],a=[],l=[];return Object(h["arrayEach"])(s,e=>{for(let t=e.startRow;t<=e.endRow;t+=1)-1===o.indexOf(t)&&o.push(t);for(let t=e.startCol;t<=e.endCol;t+=1)-1===a.indexOf(t)&&a.push(t)}),Object(h["arrayEach"])(o,e=>{const t=[];Object(h["arrayEach"])(a,n=>{t.push(this.hot.getCopyableData(e,n))}),l.push(t)}),l}fillIn(){if(this.hot.selection.highlight.getFill().isEmpty())return!1;const[e,t,n,r]=this.hot.selection.highlight.getFill().getVisualCorners(),i=this.hot.getSelectedRangeLast(),s=i.getTopStartCorner(),o=i.getBottomEndCorner();this.resetSelectionOfDraggedArea();const a=[s.row,s.col,o.row,o.col],l=this.hot.runHooks("modifyAutofillRange",[Math.min(s.row,e),Math.min(s.col,t),Math.max(o.row,n),Math.max(o.col,r)],a),{directionOfDrag:c,startOfDragCoords:u,endOfDragCoords:h}=Dn(a,l,(e,t)=>this.hot._createCellCoords(e,t));if(u&&u.row>-1&&u.col>-1){const e=this.getSelectionData(),t=i.clone(),n=this.hot._createCellRange(u,u,h),r=this.hot.runHooks("beforeAutofill",e,t,n,c);if(!1===r)return this.hot.selection.highlight.getFill().clear(),this.hot.render(),!1;let s=r;const o=r;if(["up","left"].indexOf(c)>-1&&(1!==o.length||0!==o[0].length))if(s=[],"up"===c){const e=h.row-u.row+1,t=e%o.length;for(let n=0;n<e;n++)s.push(o[(n+(o.length-t))%o.length])}else{const e=h.col-u.col+1,t=e%o[0].length;for(let n=0;n<o.length;n++){s.push([]);for(let r=0;r<e;r++)s[n].push(o[n][(r+(o[n].length-t))%o[n].length])}}this.hot.populateFromArray(u.row,u.col,s,h.row,h.col,this.pluginName+".fill",null),this.setSelection(l),this.hot.runHooks("afterAutofill",s,t,n,c),this.hot.render()}else this.hot.view.render();return!0}reduceSelectionAreaIfNeeded(e){return e.row<0&&(e.row=0),e.col<0&&(e.col=0),e}getCoordsOfDragAndDropBorders(e){const t=this.hot.getSelectedRangeLast(),n=t.getBottomEndCorner();let r=e;if(this.directions.includes(xn.vertical)&&this.directions.includes(xn.horizontal)){const i=t.getTopStartCorner();(n.col<=e.col||i.col>=e.col)&&(r=this.hot._createCellCoords(n.row,e.col)),(n.row<e.row||i.row>e.row)&&(r=this.hot._createCellCoords(e.row,n.col))}else if(this.directions.includes(xn.vertical))r=this.hot._createCellCoords(e.row,n.col);else{if(!this.directions.includes(xn.horizontal))return;r=this.hot._createCellCoords(n.row,e.col)}return this.reduceSelectionAreaIfNeeded(r)}showBorder(e){const t=this.getCoordsOfDragAndDropBorders(e);t&&this.redrawBorders(t)}addRow(){this.hot._registerTimeout(()=>{this.hot.alter(Zn,void 0,1,this.pluginName+".fill"),this.addingStarted=!1},Qn)}addNewRowIfNeeded(){if(!this.hot.selection.highlight.getFill().isEmpty()&&!1===this.addingStarted&&this.autoInsertRow){const e=this.hot.getSelectedLast(),t=this.hot.selection.highlight.getFill().getVisualCorners(),n=this.hot.countRows();e[2]<n-1&&t[2]===n-1&&(this.addingStarted=!0,this.addRow())}}getIndexOfLastAdjacentFilledInRow(e){const t=this.hot.getData(),n=this.hot.countRows();let r;for(let i=e[2]+1;i<n;i++){for(let r=e[1];r<=e[3];r++){const e=t[i][r];if(!Object(d["isEmpty"])(e))return-1}const n=t[i][e[1]-1],s=t[i][e[3]+1];Object(d["isEmpty"])(n)&&Object(d["isEmpty"])(s)||(r=i)}return r}addSelectionFromStartAreaToSpecificRowIndex(e,t){this.hot.selection.highlight.getFill().clear().add(this.hot._createCellCoords(e[0],e[1])).add(this.hot._createCellCoords(t,e[3])).commit()}setSelection(e){this.hot.selectCell(...Object(h["arrayMap"])(e,e=>Math.max(e,0)),!1,!1)}selectAdjacent(){const e=this.hot.getSelectedLast(),t=this.getIndexOfLastAdjacentFilledInRow(e);return-1!==t&&void 0!==t&&(this.addSelectionFromStartAreaToSpecificRowIndex(e,t),!0)}resetSelectionOfDraggedArea(){this.handleDraggedCells=0,this.hot.selection.highlight.getFill().clear()}redrawBorders(e){this.hot.selection.highlight.getFill().clear().add(this.hot.getSelectedRangeLast().from).add(this.hot.getSelectedRangeLast().to).add(e).commit(),this.hot.view.render()}getIfMouseWasDraggedOutside(e){const{documentElement:t}=this.hot.rootDocument,n=Object(i["offset"])(this.hot.table).top-(this.hot.rootWindow.pageYOffset||t.scrollTop)+Object(i["outerHeight"])(this.hot.table),r=Object(i["offset"])(this.hot.table).left-(this.hot.rootWindow.pageXOffset||t.scrollLeft)+Object(i["outerWidth"])(this.hot.table);return e.clientY>n&&e.clientX<=r}registerEvents(){const{documentElement:e}=this.hot.rootDocument;this.eventManager.addEventListener(e,"mouseup",()=>Un(Kn,this,$n).call(this)),this.eventManager.addEventListener(e,"mousemove",e=>Un(Kn,this,qn).call(this,e))}clearMappedSettings(){this.directions.length=0,this.autoInsertRow=!1}mapSettings(){const e=An(this.hot.getSettings().fillHandle);this.directions=e.directions,this.autoInsertRow=e.autoInsertRow}destroy(){super.destroy()}}function Bn(){const e=this.selectAdjacent();e&&this.fillIn()}function Jn(){this.handleDraggedCells=1,this.mouseDownOnCellCorner=!0}function zn(e){this.mouseDownOnCellCorner&&!this.hot.view.isMouseDown()&&this.handleDraggedCells&&(this.handleDraggedCells+=1,this.showBorder(e),this.addNewRowIfNeeded())}function $n(){this.handleDraggedCells&&(this.handleDraggedCells>1&&this.fillIn(),this.handleDraggedCells=0,this.mouseDownOnCellCorner=!1)}function qn(e){const t=this.getIfMouseWasDraggedOutside(e);!1===this.addingStarted&&this.handleDraggedCells>0&&t?(this.mouseDragOutside=!0,this.addingStarted=!0):this.mouseDragOutside=!1,this.mouseDragOutside&&this.autoInsertRow&&this.addRow()}function er(e,t){nr(e,t),t.add(e)}function tr(e,t,n){nr(e,t),t.set(e,n)}function nr(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function rr(e,t,n){return(t=ir(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ir(e){var t=sr(e,"string");return"symbol"==typeof t?t:t+""}function sr(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function or(e,t,n){return e.set(lr(e,t),n),n}function ar(e,t){return e.get(lr(e,t))}function lr(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}const cr="autoRowSize",ur=40,hr="autoRowSize";var dr=new WeakMap,mr=new WeakSet;class gr extends qt["a"]{static get PLUGIN_KEY(){return cr}static get PLUGIN_PRIORITY(){return ur}static get SETTING_KEYS(){return!0}static get CALCULATION_STEP(){return 50}static get SYNC_CALCULATION_LIMIT(){return 500}constructor(e){super(e),er(this,mr),rr(this,"headerHeight",null),rr(this,"ghostTable",new tn["a"](this.hot)),rr(this,"samplesGenerator",new an((e,t)=>{const n=this.hot.toPhysicalRow(e),r=this.hot.toPhysicalColumn(t);if(this.hot.rowIndexMapper.isHidden(n)||this.hot.columnIndexMapper.isHidden(r))return!1;if(e>=0&&t>=0){const n=this.hot.getCellMeta(e,t);if(n.hidden)return!1}let i;return e>=0?i=this.hot.getDataAtCell(e,t):-1===e&&(i=this.hot.getColHeader(t)),{value:i}})),rr(this,"inProgress",!1),rr(this,"measuredRows",0),rr(this,"rowHeightsMap",new cn["a"]),tr(this,dr,[]),this.hot.rowIndexMapper.registerMap(hr,this.rowHeightsMap),this.addHook("beforeRowResize",(e,t,n)=>lr(mr,this,Rr).call(this,e,t,n))}isEnabled(){const e=this.hot.getSettings()[cr];return!0===e||Object(o["isObject"])(e)}enablePlugin(){var e=this;this.enabled||(this.setSamplingOptions(),this.addHook("afterLoadData",(function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return lr(mr,e,yr).call(e,...n)})),this.addHook("beforeChangeRender",(function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return lr(mr,e,Mr).call(e,...n)})),this.addHook("beforeColumnResize",()=>this.recalculateAllRowsHeight()),this.addHook("afterFormulasValuesUpdate",(function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return lr(mr,e,br).call(e,...n)})),this.addHook("beforeRender",()=>lr(mr,this,fr).call(this)),this.addHook("modifyRowHeight",(e,t)=>this.getRowHeight(t,e)),this.addHook("init",()=>lr(mr,this,Sr).call(this)),this.addHook("modifyColumnHeaderHeight",()=>this.getColumnHeaderHeight()),super.enablePlugin())}disablePlugin(){this.headerHeight=null,super.disablePlugin(),this.addHook("beforeRowResize",(e,t,n)=>lr(mr,this,Rr).call(this,e,t,n))}calculateVisibleRowsHeight(){if(!this.hot.countCols())return;const e=this.getFirstVisibleRow(),t=this.getLastVisibleRow();if(-1===e||-1===t)return;const n=this.hot.renderCall;this.calculateRowsHeight({from:e,to:t},void 0,n)}calculateRowsHeight(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{from:0,to:this.hot.countRows()-1},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{from:0,to:this.hot.countCols()-1},n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const r="number"===typeof e?{from:e,to:e}:e,i="number"===typeof t?{from:t,to:t}:t;if(null!==this.hot.getColHeader(0)){const e=this.samplesGenerator.generateRowSamples(-1,i);this.ghostTable.addColumnHeadersRow(e.get(-1))}Object(nt["rangeEach"])(r.from,r.to,e=>{let t=this.hot.toPhysicalRow(e);if(null===t&&(t=e),n||null===this.rowHeightsMap.getValueAtIndex(t)){const t=this.samplesGenerator.generateRowSamples(e,i);t.forEach((e,t)=>this.ghostTable.addRow(t,e))}}),this.ghostTable.rows.length&&(this.hot.batchExecution(()=>{this.ghostTable.getHeights((e,t)=>{e<0?this.headerHeight=t:this.rowHeightsMap.setValueAtIndex(this.hot.toPhysicalRow(e),t)})},!0),this.measuredRows=r.to+1,this.ghostTable.clean())}calculateAllRowsHeight(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{from:0,to:this.hot.countCols()-1},t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=0;const r=this.hot.countRows()-1;let i=null;this.inProgress=!0;const s=()=>{if(!this.hot)return Object(en["cancelAnimationFrame"])(i),void(this.inProgress=!1);this.calculateRowsHeight({from:n,to:Math.min(n+gr.CALCULATION_STEP,r)},e,t),n=n+gr.CALCULATION_STEP+1,n<r?i=Object(en["requestAnimationFrame"])(s):(Object(en["cancelAnimationFrame"])(i),this.inProgress=!1,this.hot.view.adjustElementsSize(),this.hot.view._wt.wtOverlays.inlineStartOverlay.needFullRender&&this.hot.view._wt.wtOverlays.inlineStartOverlay.clone.draw())},o=this.getSyncCalculationLimit();o>=0&&(this.calculateRowsHeight({from:0,to:o},e,t),n=o+1),n<r?s():(this.inProgress=!1,this.hot.view.adjustElementsSize())}setSamplingOptions(){const e=this.hot.getSettings()[cr],t=e&&Object(o["hasOwnProperty"])(e,"samplingRatio")?e.samplingRatio:void 0,n=e&&Object(o["hasOwnProperty"])(e,"allowSampleDuplicates")?e.allowSampleDuplicates:void 0;t&&!isNaN(t)&&this.samplesGenerator.setSampleCount(parseInt(t,10)),n&&this.samplesGenerator.setAllowDuplicates(n)}recalculateAllRowsHeight(){this.hot.view.isVisible()&&this.calculateAllRowsHeight({from:0,to:this.hot.countCols()-1},!0)}getSyncCalculationLimit(){const e=this.hot.getSettings()[cr];let t=gr.SYNC_CALCULATION_LIMIT;const n=this.hot.countRows()-1;return Object(o["isObject"])(e)&&(t=e.syncLimit,Object(m["isPercentValue"])(t)?t=Object(nt["valueAccordingPercent"])(n,t):t>>=0),Math.min(t,n)}getRowHeight(e,t){const n=e<0?this.headerHeight:this.rowHeightsMap.getValueAtIndex(this.hot.toPhysicalRow(e));let r=t;return null!==n&&n>(t||0)&&(r=n),r}getColumnHeaderHeight(){return this.headerHeight}getFirstVisibleRow(){var e;return null!==(e=this.hot.view.getFirstRenderedVisibleRow())&&void 0!==e?e:-1}getLastVisibleRow(){var e;return null!==(e=this.hot.view.getLastRenderedVisibleRow())&&void 0!==e?e:-1}clearCache(e){this.headerHeight=null,Array.isArray(e)?this.hot.batchExecution(()=>{e.forEach(e=>{this.rowHeightsMap.setValueAtIndex(e,null)})},!0):this.rowHeightsMap.clear()}clearCacheByRange(e){const{from:t,to:n}="number"===typeof e?{from:e,to:e}:e;this.hot.batchExecution(()=>{Object(nt["rangeEach"])(Math.min(t,n),Math.max(t,n),e=>{this.rowHeightsMap.setValueAtIndex(e,null)})},!0)}isNeedRecalculate(){return!!this.rowHeightsMap.getValues().slice(0,this.measuredRows).filter(e=>null===e).length}destroy(){this.ghostTable.clean(),super.destroy()}}function pr(e){const t={from:0,to:this.hot.countCols()-1};e.forEach(e=>{const n=this.samplesGenerator.generateRowSamples(e,t);n.forEach((e,t)=>this.ghostTable.addRow(t,e))}),this.ghostTable.rows.length&&(this.hot.batchExecution(()=>{this.ghostTable.getHeights((e,t)=>{const n=this.hot.toPhysicalRow(e);this.rowHeightsMap.setValueAtIndex(n,t)})},!0),this.ghostTable.clean())}function fr(){this.calculateVisibleRowsHeight(),this.inProgress||(lr(mr,this,pr).call(this,ar(dr,this)),or(dr,this,[]))}function Rr(e,t,n){let r=e;return n&&(this.calculateRowsHeight(t,void 0,!0),r=this.getRowHeight(t)),r}function yr(e,t){t||this.recalculateAllRowsHeight()}function Mr(e){const t=e.reduce((e,t)=>{let[n]=t;return-1===e.indexOf(n)&&e.push(n),e},[]);ar(dr,this).push(...t)}function Sr(){this.recalculateAllRowsHeight()}function br(e){const t=e.reduce((e,t)=>{var n;const r=null===(n=t.address)||void 0===n?void 0:n.row;if(Number.isInteger(r)){const t=this.hot.toVisualRow(r);-1===e.indexOf(t)&&e.push(t)}return e},[]);ar(dr,this).push(...t)}var wr=n("bdd7"),Tr=n("1096"),Or=n("a73f");const{getListWithInsertedItems:vr,getListWithRemovedItems:Er}=Object(wr["a"])("physicallyIndexed");class Cr extends Tr["a"]{constructor(){super(e=>e)}insert(e,t){const n=Object(Or["b"])(this.indexedValues,t);this.indexedValues=vr(n,e,t,this.initValueOrFn),super.insert(e,t)}remove(e){const t=Er(this.indexedValues,e);this.indexedValues=Object(Or["a"])(t,e),super.remove(e)}}var Lr=Cr;const{getListWithInsertedItems:Nr,getListWithRemovedItems:_r}=Object(wr["a"])("physicallyIndexed");class Ir extends Tr["a"]{constructor(){super(e=>e)}insert(e,t){this.indexedValues=Nr(this.indexedValues,e,t,(e,t)=>this.getNextValue(t)),super.insert(e,t)}remove(e){this.indexedValues=_r(this.indexedValues,e),super.remove(e)}getNextValue(e){return Math.max(...this.getValues())+1+e}}var Pr=Ir;function xr(e,t){Dr(e,t),t.add(e)}function Dr(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Ar(e,t,n){return(t=Fr(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Fr(e){var t=Yr(e,"string");return"symbol"==typeof t?t:t+""}function Yr(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function Hr(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}const kr="bindRowsWithHeaders",Vr=210,Ur="loose",Wr=new Map([["loose",Lr],["strict",Pr]]);var Xr=new WeakSet;class jr extends qt["a"]{constructor(){super(...arguments),xr(this,Xr),Ar(this,"headerIndexes",null)}static get PLUGIN_KEY(){return kr}static get PLUGIN_PRIORITY(){return Vr}isEnabled(){return!!this.hot.getSettings()[kr]}enablePlugin(){if(this.enabled)return;let e=this.hot.getSettings()[kr];"string"!==typeof e&&(e=Ur);const t=Wr.get(e);this.headerIndexes=this.hot.rowIndexMapper.registerMap("bindRowsWithHeaders",new t),this.addHook("modifyRowHeader",e=>Hr(Xr,this,Zr).call(this,e)),super.enablePlugin()}disablePlugin(){this.hot.rowIndexMapper.unregisterMap("bindRowsWithHeaders"),super.disablePlugin()}destroy(){super.destroy()}}function Zr(e){return this.headerIndexes.getValueAtIndex(this.hot.toPhysicalRow(e))}var Qr=n("bd5e");function Kr(e,t){Br(e,t),t.add(e)}function Gr(e,t,n){Br(e,t),t.set(e,n)}function Br(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Jr(e,t,n){return(t=zr(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function zr(e){var t=$r(e,"string");return"symbol"==typeof t?t:t+""}function $r(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function qr(e,t){return e.get(ti(e,t))}function ei(e,t,n){return e.set(ti(e,t),n),n}function ti(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}const ni="collapsibleColumns",ri=290,ii=["nestedHeaders"],si="collapsibleIndicator",oi=ni,ai=new Map([["collapse",{hideColumn:!0,beforeHook:"beforeColumnCollapse",afterHook:"afterColumnCollapse"}],["expand",{hideColumn:!1,beforeHook:"beforeColumnExpand",afterHook:"afterColumnExpand"}]]);var li=new WeakMap,ci=new WeakSet;class ui extends qt["a"]{constructor(){super(...arguments),Kr(this,ci),Jr(this,"nestedHeadersPlugin",null),Jr(this,"headerStateManager",null),Gr(this,li,null)}static get PLUGIN_KEY(){return ni}static get PLUGIN_PRIORITY(){return ri}static get PLUGIN_DEPS(){return["plugin:NestedHeaders"]}static get SETTING_KEYS(){return[ni,...ii]}isEnabled(){return!!this.hot.getSettings()[ni]}enablePlugin(){var e=this;if(this.enabled)return;const{nestedHeaders:t}=this.hot.getSettings();t||Object(Qr["b"])("You need to configure the Nested Headers plugin in order to use collapsible headers."),ei(li,this,this.hot.columnIndexMapper.createAndRegisterIndexMap(this.pluginName,"hiding")),this.nestedHeadersPlugin=this.hot.getPlugin("nestedHeaders"),this.headerStateManager=this.nestedHeadersPlugin.getStateManager(),this.addHook("init",()=>ti(ci,this,mi).call(this)),this.addHook("afterLoadData",(function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return ti(ci,e,gi).call(e,...n)})),this.addHook("afterGetColHeader",(function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return ti(ci,e,hi).call(e,...n)})),this.addHook("beforeOnCellMouseDown",(e,t,n)=>ti(ci,this,di).call(this,e,t,n)),this.registerShortcuts(),super.enablePlugin(),this.updatePlugin()}updatePlugin(){if(this.hot.view){if(!this.nestedHeadersPlugin.detectedOverlappedHeaders){const{collapsibleColumns:e}=this.hot.getSettings();"boolean"===typeof e?this.headerStateManager.mapState(e=>({collapsible:e.origColspan>1})):Array.isArray(e)&&(this.headerStateManager.mapState(()=>({collapsible:!1})),this.headerStateManager.mergeStateWith(e))}super.updatePlugin()}}disablePlugin(){this.hot.columnIndexMapper.unregisterMap(this.pluginName),ei(li,this,null),this.nestedHeadersPlugin=null,this.unregisterShortcuts(),this.clearButtons(),super.disablePlugin()}registerShortcuts(){this.hot.getShortcutManager().getContext("grid").addShortcut({keys:[["Enter"]],callback:()=>{var e;const{row:t,col:n}=this.hot.getSelectedRangeLast().highlight,{collapsible:r,isCollapsed:i,columnIndex:s}=null!==(e=this.headerStateManager.getHeaderTreeNodeData(t,n))&&void 0!==e?e:{};if(r)return i?this.expandSection({row:t,col:s}):this.collapseSection({row:t,col:s}),!1},runOnlyIf:()=>{var e,t;return(null===(e=this.hot.getSelectedRangeLast())||void 0===e?void 0:e.isSingle())&&(null===(t=this.hot.getSelectedRangeLast())||void 0===t?void 0:t.highlight.isHeader())},group:oi,relativeToGroup:a["a"],position:"before"})}unregisterShortcuts(){this.hot.getShortcutManager().getContext("grid").removeShortcutsByGroup(oi)}clearButtons(){if(!this.hot.view)return;const e=this.hot.view._wt.getSetting("columnHeaders").length,t=this.hot.view._wt.wtTable.THEAD,n=this.hot.view._wt.wtOverlays.topOverlay.clone.wtTable.THEAD,r=this.hot.view._wt.wtOverlays.topInlineStartCornerOverlay?this.hot.view._wt.wtOverlays.topInlineStartCornerOverlay.clone.wtTable.THEAD:null,i=function(e){e&&e.parentNode.removeChild(e)};Object(nt["rangeEach"])(0,e-1,e=>{const s=t.childNodes[e],o=n.childNodes[e],a=r?r.childNodes[e]:null;Object(nt["rangeEach"])(0,s.childNodes.length-1,e=>{let t=s.childNodes[e].querySelector("."+si);i(t),o&&o.childNodes[e]&&(t=o.childNodes[e].querySelector("."+si),i(t)),r&&a&&a.childNodes[e]&&(t=a.childNodes[e].querySelector("."+si),i(t))})},!0)}expandSection(e){this.toggleCollapsibleSection([e],"expand")}collapseSection(e){this.toggleCollapsibleSection([e],"collapse")}toggleAllCollapsibleSections(e){const t=this.headerStateManager.mapNodes(t=>{const{collapsible:n,origColspan:r,headerLevel:i,columnIndex:s,isCollapsed:o}=t;if(!0===n&&r>1&&(o&&"expand"===e||!o&&"collapse"===e))return{row:this.headerStateManager.levelToRowCoords(i),col:s}});this.toggleCollapsibleSection(t,e)}collapseAll(){this.toggleAllCollapsibleSections("collapse")}expandAll(){this.toggleAllCollapsibleSections("expand")}toggleCollapsibleSection(e,t){if(!ai.has(t))throw new Error(`Unsupported action is passed (${t}).`);if(!Array.isArray(e))return;const n=Object(h["arrayFilter"])(e,e=>{let{row:t}=e;return t<0});let r=n.length>0;Object(h["arrayEach"])(n,e=>{var n;let{row:i,col:s}=e;const{collapsible:o,isCollapsed:a}=null!==(n=this.headerStateManager.getHeaderSettings(i,s))&&void 0!==n?n:{};if(!o||a&&"collapse"===t||!a&&"expand"===t)return r=!1,!1});const i=[],s=[];r&&Object(h["arrayEach"])(n,e=>{let{row:n,col:r}=e;const{colspanCompensation:o,affectedColumns:a,rollbackModification:l}=this.headerStateManager.triggerNodeModification(t,n,r);o>0&&(s.push(...a),i.push(l))});const o=this.getCollapsedColumns();let a=[];"collapse"===t?a=Object(h["arrayUnique"])([...o,...s]):"expand"===t&&(a=Object(h["arrayFilter"])(o,e=>!s.includes(e)));const l=ai.get(t),c=this.hot.runHooks(l.beforeHook,o,a,r);if(!1===c)return void Object(h["arrayEach"])(i,e=>{e()});this.hot.batchExecution(()=>{Object(h["arrayEach"])(s,e=>{qr(li,this).setValueAtIndex(this.hot.toPhysicalColumn(e),l.hideColumn)})},!0);const u=this.getCollapsedColumns().length!==o.length,d=this.hot.getSelectedRangeLast();if("collapse"===t&&u&&d){const{row:e,col:t}=d.highlight,n=this.hot.rowIndexMapper.isHidden(e)||this.hot.columnIndexMapper.isHidden(t);if(n&&s.includes(t)){const n=e>=0?this.hot.rowIndexMapper.getNearestNotHiddenIndex(e,1,!0):e,r=t>=0?this.hot.columnIndexMapper.getNearestNotHiddenIndex(t,1,!0):t;null!==n&&null!==r&&this.hot.selectCell(n,r)}}this.hot.runHooks(l.afterHook,o,a,r,u),this.hot.render(),this.hot.view.adjustElementsSize()}getCollapsedColumns(){return qr(li,this).getHiddenIndexes()}destroy(){ei(li,this,null),super.destroy()}}function hi(e,t,n){var r;const{collapsible:s,origColspan:o,isCollapsed:a}=null!==(r=this.headerStateManager.getHeaderSettings(n,e))&&void 0!==r?r:{},l=s&&o>1&&e>=this.hot.getSettings().fixedColumnsStart,c=this.hot.getSettings().ariaTags;let u=t.querySelector("."+si);var h;(Object(i["removeAttribute"])(t,[Object(R["k"])("")[0]]),l)?(u||(u=this.hot.rootDocument.createElement("div"),Object(i["addClass"])(u,si),t.querySelector("div:first-child").appendChild(u)),Object(i["removeClass"])(u,["collapsed","expanded"]),a?(Object(i["addClass"])(u,"collapsed"),Object(i["fastInnerText"])(u,"+"),c&&Object(i["setAttribute"])(t,...Object(R["k"])(!1))):(Object(i["addClass"])(u,"expanded"),Object(i["fastInnerText"])(u,"-"),c&&Object(i["setAttribute"])(t,...Object(R["k"])(!0))),c&&Object(i["setAttribute"])(u,...Object(R["n"])())):null===(h=u)||void 0===h||h.remove()}function di(e,t){Object(i["hasClass"])(e.target,si)&&(Object(i["hasClass"])(e.target,"expanded")?(this.eventManager.fireEvent(e.target,"mouseup"),this.toggleCollapsibleSection([t],"collapse")):Object(i["hasClass"])(e.target,"collapsed")&&(this.eventManager.fireEvent(e.target,"mouseup"),this.toggleCollapsibleSection([t],"expand")),Object(s["stopImmediatePropagation"])(e))}function mi(){this.updatePlugin()}function gi(e,t){t||this.updatePlugin()}var pi=n("97b9"),fi=n("1b1a"),Ri=n("9056");function yi(e,t,n){return(t=Mi(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Mi(e){var t=Si(e,"string");return"symbol"==typeof t?t:t+""}function Si(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}const bi=["sortEmptyCells","indicator","headerAction","compareFunctionFactory"],wi=!1,Ti=!0,Oi=!0;class vi{constructor(e,t){yi(this,"hot",void 0),yi(this,"sortingStates",new Ri["a"]),yi(this,"sortEmptyCells",wi),yi(this,"indicator",Ti),yi(this,"headerAction",Oi),yi(this,"compareFunctionFactory",void 0),yi(this,"mapName",void 0),this.hot=e,this.mapName=t,this.hot.columnIndexMapper.registerMap(t,this.sortingStates)}updateAllColumnsProperties(e){Object(o["isObject"])(e)&&Object(o["objectEach"])(e,(e,t)=>{bi.includes(t)&&(this[t]=e)})}getAllColumnsProperties(){const e={sortEmptyCells:this.sortEmptyCells,indicator:this.indicator,headerAction:this.headerAction};return"function"===typeof this.compareFunctionFactory&&(e.compareFunctionFactory=this.compareFunctionFactory),e}getSortOrderOfColumn(e){var t;return null===(t=this.sortingStates.getValueAtIndex(this.hot.toPhysicalColumn(e)))||void 0===t?void 0:t.sortOrder}getIndexOfColumnInSortQueue(e){return e=this.hot.toPhysicalColumn(e),this.sortingStates.getEntries().findIndex(t=>{let[n]=t;return n===e})}getNumberOfSortedColumns(){return this.sortingStates.getLength()}isListOfSortedColumnsEmpty(){return 0===this.getNumberOfSortedColumns()}isColumnSorted(e){return Object(o["isObject"])(this.sortingStates.getValueAtIndex(this.hot.toPhysicalColumn(e)))}getSortStates(){if(null===this.sortingStates)return[];const e=this.sortingStates.getEntries();return e.map(e=>{let[t,n]=e;return{column:this.hot.toVisualColumn(t),...n}})}getColumnSortState(e){const t=this.getSortOrderOfColumn(e);if(Object(d["isDefined"])(t))return{column:e,sortOrder:t}}setSortStates(e){this.sortingStates.clear();for(let t=0;t<e.length;t+=1)this.sortingStates.setValueAtIndex(this.hot.toPhysicalColumn(e[t].column),{sortOrder:e[t].sortOrder})}destroy(){this.hot.columnIndexMapper.unregisterMap(this.mapName),this.sortingStates=null}}n("1e70"),n("79a4"),n("c1a1"),n("8b00"),n("a4e7"),n("1e5a"),n("72c3");function Ei(e,t,n){const r=t.locale;return function(t,i){const{sortEmptyCells:s}=n;return"string"===typeof t&&(t=t.toLocaleLowerCase(r)),"string"===typeof i&&(i=i.toLocaleLowerCase(r)),t===i?Xi:Object(d["isEmpty"])(t)?Object(d["isEmpty"])(i)?Xi:s&&"asc"===e?ji:Zi:Object(d["isEmpty"])(i)?s&&"asc"===e?Zi:ji:isNaN(t)&&!isNaN(i)?"asc"===e?Zi:ji:!isNaN(t)&&isNaN(i)?"asc"===e?ji:Zi:(isNaN(t)||isNaN(i)||(t=parseFloat(t),i=parseFloat(i)),t<i?"asc"===e?ji:Zi:t>i?"asc"===e?Zi:ji:Xi)}}const Ci="default";function Li(e,t,n){return function(t,r){const i=parseFloat(t),s=parseFloat(r),{sortEmptyCells:o}=n;if(i===s||isNaN(i)&&isNaN(s))return Xi;if(o){if(Object(d["isEmpty"])(t))return"asc"===e?ji:Zi;if(Object(d["isEmpty"])(r))return"asc"===e?Zi:ji}return isNaN(i)?Zi:isNaN(s)?ji:i<s?"asc"===e?ji:Zi:i>s?"asc"===e?Zi:ji:Xi}}const Ni="numeric";function _i(e,t,n){const r=t.checkedTemplate,i=t.uncheckedTemplate,{sortEmptyCells:s}=n;return function(o,a){const l=Object(d["isEmpty"])(o),c=Object(d["isEmpty"])(a),u=l?i:o,h=c?i:a,m=u===i||u===r,g=h===i||h===r;if(!1===s){if(l&&!1===c)return Zi;if(!1===l&&c)return ji}return!1===m&&g?"asc"===e?ji:Zi:m&&!1===g?"asc"===e?Zi:ji:!1===m&&!1===g?Ei(e,t,n)(o,a):u===i&&h===r?"asc"===e?ji:Zi:u===r&&h===i?"asc"===e?Zi:ji:Xi}}const Ii="checkbox";function Pi(e,t,n){return ns(e,t.dateFormat,n)}const xi="date";function Di(e,t,n){return ns(e,t.timeFormat,n)}const Ai="time";var Fi=n("9acd");const{register:Yi,getItem:Hi,hasItem:ki}=Object(Fi["a"])("sorting.compareFunctionFactory"),{register:Vi,getItem:Ui}=Object(Fi["a"])("sorting.mainSortComparator");function Wi(e){return ki(e)?Hi(e):Hi(Ci)}Yi(Ii,_i),Yi(xi,Pi),Yi(Ci,Ei),Yi(Ni,Li),Yi(Ai,Di);const Xi=0,ji=-1,Zi=1;function Qi(e,t){const n=Ui(t);for(var r=arguments.length,i=new Array(r>2?r-2:0),s=2;s<r;s++)i[s-2]=arguments[s];e.sort(n(...i))}const Ki="asc",Gi="desc",Bi="colHeader";function Ji(e){if(!1===Object(o["isObject"])(e))return!1;const{column:t,sortOrder:n}=e;return Number.isInteger(t)&&[Ki,Gi].includes(n)}function zi(e){if(e.some(e=>!1===Ji(e)))return!1;const t=e.map(e=>{let{column:t}=e;return t});return new Set(t).size===t.length}function $i(e){if(e!==Gi)return e===Ki?Gi:Ki}function qi(e){const t=e.querySelector("."+Bi);return t}function es(e,t){if(e<0||!t.parentNode)return!1;const n=t.parentNode.parentNode.childNodes,r=Array.from(n).indexOf(t.parentNode)-n.length;return-1===r}function ts(e,t,n){return-1===e&&t>=0&&!1===Object(s["isRightClick"])(n)}function ns(e,t,n){return function(r,i){const{sortEmptyCells:s}=n;if(r===i)return Xi;if(Object(d["isEmpty"])(r))return Object(d["isEmpty"])(i)?Xi:s&&"asc"===e?ji:Zi;if(Object(d["isEmpty"])(i))return s&&"asc"===e?Zi:ji;const o=I(r,t),a=I(i,t);return o.isValid()?a.isValid()?a.isAfter(o)?"asc"===e?ji:Zi:a.isBefore(o)?"asc"===e?Zi:ji:Xi:ji:Zi}}const rs="ascending",is="descending",ss="indicatorDisabled",os="columnSorting",as="sortAction",ls=new Map([[Ki,rs],[Gi,is]]);function cs(e,t,n,r){const i=[os];if(r&&i.push(as),!1===n)return i.push(ss),i;const s=e.getSortOrderOfColumn(t);return Object(d["isDefined"])(s)&&i.push(ls.get(s)),i}function us(){return Array.from(ls.values()).concat(as,ss,os)}function hs(e,t){return function(n,r){const[,...i]=n,[,...s]=r;return function(n){const r=e[n],o=t[n],a=i[n],l=s[n],c=o.columnSorting,u=c.compareFunctionFactory?c.compareFunctionFactory:Wi(o.type),h=u(r,o,c)(a,l);return h}(0)}}function ds(e,t){ms(e,t),t.add(e)}function ms(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function gs(e,t,n){return(t=ps(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ps(e){var t=fs(e,"string");return"symbol"==typeof t?t:t+""}function fs(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function Rs(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}const ys="columnSorting",Ms=50,Ss="append",bs="replace",ws=ys;Vi(ys,hs),ge["a"].getSingleton().register("beforeColumnSort"),ge["a"].getSingleton().register("afterColumnSort");var Ts=new WeakSet;class Os extends qt["a"]{constructor(){super(...arguments),ds(this,Ts),gs(this,"columnStatesManager",null),gs(this,"columnMetaCache",null),gs(this,"pluginKey",ys),gs(this,"indexesSequenceCache",null)}static get PLUGIN_KEY(){return ys}static get PLUGIN_PRIORITY(){return Ms}isEnabled(){return!!this.hot.getSettings()[this.pluginKey]}enablePlugin(){var e=this;this.enabled||(this.columnStatesManager=new vi(this.hot,this.pluginKey+".sortingStates"),this.columnMetaCache=new cn["a"](e=>{let t=this.hot.toVisualColumn(e);return null===t&&(t=e),this.getMergedPluginSettings(t)}),this.hot.columnIndexMapper.registerMap(this.pluginKey+".columnMeta",this.columnMetaCache),this.addHook("afterGetColHeader",(e,t)=>Rs(Ts,this,Es).call(this,e,t)),this.addHook("beforeOnCellMouseDown",(function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return Rs(Ts,e,Ls).call(e,...n)})),this.addHook("afterOnCellMouseDown",(e,t)=>this.onAfterOnCellMouseDown(e,t)),this.addHook("afterInit",()=>Rs(Ts,this,vs).call(this)),this.addHook("afterLoadData",(function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return Rs(Ts,e,Cs).call(e,...n)})),this.hot.view&&Rs(Ts,this,vs).call(this),this.registerShortcuts(),super.enablePlugin())}disablePlugin(){const e=(e,t)=>{const n=qi(t);!1!==es(e,t)&&null!==n&&this.updateHeaderClasses(n)};this.hot.addHook("afterGetColHeader",e),this.hot.addHookOnce("afterViewRender",()=>{this.hot.removeHook("afterGetColHeader",e)}),this.hot.batchExecution(()=>{null!==this.indexesSequenceCache&&(this.hot.rowIndexMapper.setIndexesSequence(this.indexesSequenceCache.getValues()),this.hot.rowIndexMapper.unregisterMap(this.pluginKey),this.indexesSequenceCache=null)},!0),this.hot.columnIndexMapper.unregisterMap(this.pluginKey+".columnMeta"),this.columnStatesManager.destroy(),this.columnMetaCache=null,this.columnStatesManager=null,this.unregisterShortcuts(),super.disablePlugin()}registerShortcuts(){this.hot.getShortcutManager().getContext("grid").addShortcut({keys:[["Enter"]],callback:()=>{const{highlight:e}=this.hot.getSelectedRangeLast();return this.sort(this.getColumnNextConfig(e.col)),!1},runOnlyIf:()=>{var e,t;const n=null===(e=this.hot.getSelectedRangeLast())||void 0===e?void 0:e.highlight;return n&&(null===(t=this.hot.getSelectedRangeLast())||void 0===t?void 0:t.isSingle())&&this.hot.selection.isCellVisible(n)&&-1===n.row&&n.col>=0},relativeToGroup:a["a"],position:"before",group:ws})}unregisterShortcuts(){this.hot.getShortcutManager().getContext("grid").removeShortcutsByGroup(ws)}sort(e){const t=this.getSortConfig(),n=this.getNormalizedSortConfigs(e),r=this.areValidSortConfigs(n),i=this.hot.runHooks("beforeColumnSort",t,n,r);!1!==i&&(0===t.length&&null===this.indexesSequenceCache&&(this.indexesSequenceCache=this.hot.rowIndexMapper.registerMap(this.pluginKey,new fi["a"]),this.indexesSequenceCache.setValues(this.hot.rowIndexMapper.getIndexesSequence())),r&&(this.columnStatesManager.setSortStates(n),this.sortByPresetSortStates(n),this.saveAllSortSettings(n)),this.hot.runHooks("afterColumnSort",t,r?n:t,r),r&&(this.hot.render(),this.hot.forceFullRender=!1,this.hot.view.render()))}clearSort(){this.sort([])}isSorted(){return this.enabled&&!this.columnStatesManager.isListOfSortedColumnsEmpty()}getSortConfig(e){return Object(d["isDefined"])(e)?this.columnStatesManager.getColumnSortState(e):this.columnStatesManager.getSortStates()}setSortConfig(e){const t=this.getNormalizedSortConfigs(e);this.areValidSortConfigs(t)&&this.columnStatesManager.setSortStates(t)}getNormalizedSortConfigs(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return Array.isArray(e)?e.slice(0,1):[e]}areValidSortConfigs(e){const t=this.hot.countCols();return zi(e)&&e.every(e=>{let{column:n}=e;return n<=t&&n>=0})}saveAllSortSettings(e){const t=this.columnStatesManager.getAllColumnsProperties(),n=e=>{let{column:t,...n}=e;return{column:this.hot.toPhysicalColumn(t),...n}};t.initialConfig=Object(h["arrayMap"])(e,n),this.hot.runHooks("persistentStateSave","columnSorting",t)}getAllSavedSortSettings(){const e={};this.hot.runHooks("persistentStateLoad","columnSorting",e);const t=e.value,n=e=>{let{column:t,...n}=e;return{column:this.hot.toVisualColumn(t),...n}};return Object(d["isDefined"])(t)&&Array.isArray(t.initialConfig)&&(t.initialConfig=Object(h["arrayMap"])(t.initialConfig,n)),t}getColumnNextConfig(e){const t=this.columnStatesManager.getSortOrderOfColumn(e);if(Object(d["isDefined"])(t)){const n=$i(t);return Object(d["isDefined"])(n)?{column:e,sortOrder:n}:void 0}const n=this.hot.countCols();if(Number.isInteger(e)&&e>=0&&e<n)return{column:e,sortOrder:$i()}}getNextSortConfig(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Ss;const n=this.columnStatesManager.getIndexOfColumnInSortQueue(e),r=-1!==n,i=this.getSortConfig(),s=this.getColumnNextConfig(e);if(r){if(Object(d["isUndefined"])(s))return[...i.slice(0,n),...i.slice(n+1)];if(t===Ss)return[...i.slice(0,n),...i.slice(n+1),s];if(t===bs)return[...i.slice(0,n),s,...i.slice(n+1)]}return Object(d["isDefined"])(s)?i.concat(s):i}getPluginColumnConfig(e){if(Object(o["isObject"])(e)){const t=e[this.pluginKey];if(Object(o["isObject"])(t))return t}return{}}getMergedPluginSettings(e){const t=this.hot.getSettings()[this.pluginKey],n=this.columnStatesManager.getAllColumnsProperties(),r=this.hot.getCellMeta(0,e),i=Object.getPrototypeOf(r);return Array.isArray(i.columns)?Object.assign(n,t,this.getPluginColumnConfig(i.columns[e])):Object(pi["isFunction"])(i.columns)?Object.assign(n,t,this.getPluginColumnConfig(i.columns(e))):Object.assign(n,t)}getFirstCellSettings(e){const t=this.hot.getCellMeta(0,e),n=Object.create(t);return n[this.pluginKey]=this.columnMetaCache.getValueAtIndex(this.hot.toPhysicalColumn(e)),n}getNumberOfRowsToSort(e){const t=this.hot.getSettings();return t.maxRows<=e?t.maxRows:e-t.minSpareRows}sortByPresetSortStates(e){if(this.hot.rowIndexMapper.setIndexesSequence(this.indexesSequenceCache.getValues()),0===e.length)return;const t=[],n=this.hot.countRows(),r=t=>Object(h["arrayMap"])(e,e=>this.hot.getDataAtCell(t,e.column));for(let l=0;l<this.getNumberOfRowsToSort(n);l+=1)t.push([this.hot.toPhysicalRow(l)].concat(r(l)));const i=Object(h["arrayMap"])(t,e=>e[0]);Qi(t,this.pluginKey,Object(h["arrayMap"])(e,e=>e.sortOrder),Object(h["arrayMap"])(e,e=>this.getFirstCellSettings(e.column)));for(let l=t.length;l<n;l+=1)t.push([l].concat(r(l)));const s=Object(h["arrayMap"])(t,e=>e[0]),o=new Map(Object(h["arrayMap"])(i,(e,t)=>[e,s[t]])),a=Object(h["arrayMap"])(this.hot.rowIndexMapper.getIndexesSequence(),e=>o.has(e)?o.get(e):e);this.hot.rowIndexMapper.setIndexesSequence(a)}sortBySettings(e){if(Object(o["isObject"])(e)){this.columnStatesManager.updateAllColumnsProperties(e);const t=e.initialConfig;(Array.isArray(t)||Object(o["isObject"])(t))&&this.sort(t)}else this.hot.render()}updateHeaderClasses(e){if(Object(i["removeClass"])(e,us(e)),!1!==this.enabled){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];Object(i["addClass"])(e,cs(...n))}}onUpdateSettings(e){super.onUpdateSettings(),null!==this.columnMetaCache&&this.columnMetaCache.init(this.hot.columnIndexMapper.getNumberOfIndexes()),Object(d["isDefined"])(e[this.pluginKey])&&this.sortBySettings(e[this.pluginKey])}wasClickableHeaderClicked(e,t){const n=this.getFirstCellSettings(t)[this.pluginKey],r=n.headerAction;return r&&Object(i["hasClass"])(e.target,Bi)}onAfterOnCellMouseDown(e,t){if(!1!==ts(t.row,t.col,e)&&this.wasClickableHeaderClicked(e,t.col)){this.hot.getShortcutManager().isCtrlPressed()&&(this.hot.deselectCell(),this.hot.selectColumns(t.col));const e=this.hot.getActiveEditor(),n=this.getColumnNextConfig(t.col);null!==e&&void 0!==e&&e.isOpened()&&this.hot.getCellValidator(e.row,e.col)?this.hot.addHookOnce("postAfterValidate",()=>{this.sort(n)}):this.sort(n)}}destroy(){var e;null===(e=this.columnStatesManager)||void 0===e||e.destroy(),super.destroy()}}function vs(){const e=this.getAllSavedSortSettings();if(Object(o["isObject"])(e))this.sortBySettings(e);else{const e=this.hot.getSettings()[this.pluginKey];this.sortBySettings(e)}}function Es(e,t){const n=qi(t);if(!1===es(e,t)||null===n)return;const r=this.getFirstCellSettings(e)[this.pluginKey],s=r.indicator,o=r.headerAction;if(this.updateHeaderClasses(n,this.columnStatesManager,e,s,o),this.hot.getSettings().ariaTags){const n=this.columnStatesManager.getSortOrderOfColumn(e);Object(i["setAttribute"])(t,...Object(R["K"])(n?n+"ending":"none"))}}function Cs(e){!0===e&&this.hot.view&&Rs(Ts,this,vs).call(this)}function Ls(e,t,n,r){!1!==ts(t.row,t.col,e)&&this.wasClickableHeaderClicked(e,t.col)&&this.hot.getShortcutManager().isCtrlPressed()&&(r.column=!0)}function Ns(e,t,n){return(t=_s(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function _s(e){var t=Is(e,"string");return"symbol"==typeof t?t:t+""}function Is(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}class Ps{constructor(e,t){Ns(this,"plugin",void 0),Ns(this,"hot",void 0),Ns(this,"endpoints",[]),Ns(this,"settings",void 0),Ns(this,"settingsType","array"),Ns(this,"currentEndpoint",null),Ns(this,"cellsToSetCache",[]),this.plugin=e,this.hot=this.plugin.hot,this.settings=t}initEndpoints(){this.endpoints=this.parseSettings(),this.refreshAllEndpoints()}getEndpoint(e){return"function"===this.settingsType?this.fillMissingEndpointData(this.settings)[e]:this.endpoints[e]}getAllEndpoints(){return"function"===this.settingsType?this.fillMissingEndpointData(this.settings):this.endpoints}fillMissingEndpointData(e){return this.parseSettings(e.call(this))}parseSettings(e){const t=[];let n=e;if(n||"function"!==typeof this.settings)return n||(n=this.settings),Object(h["arrayEach"])(n,e=>{const n={};this.assignSetting(e,n,"ranges",[[0,this.hot.countRows()-1]]),this.assignSetting(e,n,"reversedRowCoords",!1),this.assignSetting(e,n,"destinationRow",new Error("\n You must provide a destination row for the Column Summary plugin in order to work properly!\n ")),this.assignSetting(e,n,"destinationColumn",new Error("\n You must provide a destination column for the Column Summary plugin in order to work properly!\n ")),this.assignSetting(e,n,"sourceColumn",e.destinationColumn),this.assignSetting(e,n,"type","sum"),this.assignSetting(e,n,"forceNumeric",!1),this.assignSetting(e,n,"suppressDataTypeErrors",!0),this.assignSetting(e,n,"customFunction",null),this.assignSetting(e,n,"readOnly",!0),this.assignSetting(e,n,"roundFloat",!1),t.push(n)}),t;this.settingsType="function"}assignSetting(e,t,n,r){if("ranges"!==n||void 0!==e[n]){if("ranges"!==n||0!==e[n].length)if(void 0===e[n]){if(r instanceof Error)throw r;t[n]=r}else"destinationRow"===n&&t.reversedRowCoords?t[n]=this.hot.countRows()-e[n]-1:t[n]=e[n]}else t[n]=r}resetSetupBeforeStructureAlteration(e,t,n){if("function"!==this.settingsType)return;const r=e.indexOf("row")>-1?"row":"col",i=this.getAllEndpoints();Object(h["arrayEach"])(i,i=>{"row"===r&&i.destinationRow>=t&&("insert_row"===e?i.alterRowOffset=n:"remove_row"===e&&(i.alterRowOffset=-1*n)),"col"===r&&i.destinationColumn>=t&&("insert_col"===e?i.alterColumnOffset=n:"remove_col"===e&&(i.alterColumnOffset=-1*n))}),this.resetAllEndpoints(i,!1)}resetSetupAfterStructureAlteration(e,t,n,r,i){let s=!(arguments.length>5&&void 0!==arguments[5])||arguments[5];if("function"===this.settingsType){const e=()=>(this.hot.removeHook("beforeViewRender",e),this.refreshAllEndpoints());return void this.hot.addHookOnce("beforeViewRender",e)}const o=e.indexOf("row")>-1?"row":"col",a=e.indexOf("remove")>-1?-1:1,l=this.getAllEndpoints(),c=0===e.indexOf("move_row"),u=t;Object(h["arrayEach"])(l,e=>{"row"===o&&e.destinationRow>=u&&(e.alterRowOffset=a*n),"col"===o&&e.destinationColumn>=u&&(e.alterColumnOffset=a*n)}),this.resetAllEndpoints(l,!c),c?Object(h["arrayEach"])(l,e=>{this.extendEndpointRanges(e,u,r[0],r.length),this.recreatePhysicalRanges(e),this.clearOffsetInformation(e)}):Object(h["arrayEach"])(l,e=>{this.shiftEndpointCoordinates(e,u)}),s&&this.refreshAllEndpoints()}clearOffsetInformation(e){e.alterRowOffset=void 0,e.alterColumnOffset=void 0}extendEndpointRanges(e,t,n,r){Object(h["arrayEach"])(e.ranges,e=>{e[1]&&(t>=e[0]&&t<=e[1]?n>e[1]?e[1]+=r:n<e[0]&&(e[0]-=r):n>=e[0]&&n<=e[1]&&(e[1]-=r,t<=e[0]&&(e[0]+=1,e[1]+=1)))})}recreatePhysicalRanges(e){const t=e.ranges,n=[],r=[];Object(h["arrayEach"])(t,e=>{const t=[];if(e[1])for(let n=e[0];n<=e[1];n++)t.push(this.hot.toPhysicalRow(n));else t.push(this.hot.toPhysicalRow(e[0]));r.push(t)}),Object(h["arrayEach"])(r,e=>{let t=[];Object(h["arrayEach"])(e,(r,i)=>{0===i?t.push(r):e[i]!==e[i-1]+1&&(t.push(e[i-1]),n.push(t),t=[],t.push(r)),i===e.length-1&&(t.push(r),n.push(t))})}),e.ranges=n}shiftEndpointCoordinates(e,t){e.alterRowOffset&&0!==e.alterRowOffset?(e.destinationRow+=e.alterRowOffset||0,Object(h["arrayEach"])(e.ranges,n=>{Object(h["arrayEach"])(n,(r,i)=>{r>=t&&(n[i]+=e.alterRowOffset||0)})})):e.alterColumnOffset&&0!==e.alterColumnOffset&&(e.destinationColumn+=e.alterColumnOffset||0,e.sourceColumn+=e.alterColumnOffset||0)}resetAllEndpoints(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.getAllEndpoints(),t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];const n=e.some(e=>{const t=e.alterRowOffset||0,n=e.alterColumnOffset||0;return e.destinationRow+t>=this.hot.countRows()||e.destinationColumn+n>=this.hot.countCols()});n||(this.cellsToSetCache=[],Object(h["arrayEach"])(e,e=>{this.resetEndpointValue(e,t)}),this.hot.setDataAtCell(this.cellsToSetCache,"ColumnSummary.reset"),this.cellsToSetCache=[])}refreshAllEndpoints(){this.cellsToSetCache=[],Object(h["arrayEach"])(this.getAllEndpoints(),e=>{this.currentEndpoint=e,this.plugin.calculate(e),this.setEndpointValue(e,"init")}),this.currentEndpoint=null,this.hot.setDataAtCell(this.cellsToSetCache,"ColumnSummary.reset"),this.cellsToSetCache=[]}refreshChangedEndpoints(e){const t=[];this.cellsToSetCache=[],Object(h["arrayEach"])(e,(e,n,r)=>{""+(e[2]||"")!==""+e[3]&&Object(h["arrayEach"])(this.getAllEndpoints(),(e,i)=>{this.hot.propToCol(r[n][1])===e.sourceColumn&&-1===t.indexOf(i)&&t.push(i)})}),Object(h["arrayEach"])(t,e=>{this.refreshEndpoint(this.getEndpoint(e))}),this.hot.setDataAtCell(this.cellsToSetCache,"ColumnSummary.reset"),this.cellsToSetCache=[]}refreshCellMetas(){this.endpoints.forEach(e=>{const t=this.hot.toVisualRow(e.destinationRow);if(null!==t){const n=this.hot.getCellMeta(t,e.destinationColumn);n.readOnly=e.readOnly,n.className="columnSummaryResult"}})}refreshEndpoint(e){this.currentEndpoint=e,this.plugin.calculate(e),this.setEndpointValue(e),this.currentEndpoint=null}resetEndpointValue(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];const n=e.alterRowOffset||0,r=e.alterColumnOffset||0;this.cellsToSetCache.push([this.hot.toVisualRow(e.destinationRow+(t?n:0)),this.hot.toVisualColumn(e.destinationColumn+(t?r:0)),""])}setEndpointValue(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const r=this.hot.toVisualRow(e.destinationRow);if(e.destinationRow>=this.hot.countRows()||e.destinationColumn>=this.hot.countCols())return void this.throwOutOfBoundsWarning();const i=this.hot.toVisualRow(e.destinationRow);if(null!==i){const n=this.hot.getCellMeta(i,e.destinationColumn);"init"!==t&&n.readOnly===e.readOnly||(n.readOnly=e.readOnly,n.className="columnSummaryResult")}if((!0===e.roundFloat||Number.isInteger(e.roundFloat))&&!isNaN(e.result)){const t=e.roundFloat;let n=0;Number.isInteger(t)&&(n=Math.min(Math.max(0,t),100)),e.result=e.result.toFixed(n)}n?this.hot.setDataAtCell(r,e.destinationColumn,e.result,"ColumnSummary.set"):this.cellsToSetCache.push([r,e.destinationColumn,e.result]),e.alterRowOffset=void 0,e.alterColumnOffset=void 0}throwOutOfBoundsWarning(){Object(Qr["b"])("One of the Column Summary plugins' destination points you provided is beyond the table boundaries!")}}var xs=Ps,Ds=n("67a8");function As(e){return null===e||void 0===e||isNaN(e)}function Fs(e,t){Ys(e,t),t.add(e)}function Ys(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Hs(e,t,n){return(t=ks(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ks(e){var t=Vs(e,"string");return"symbol"==typeof t?t:t+""}function Vs(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function Us(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}const Ws="columnSummary",Xs=220;var js=new WeakSet;class Zs extends qt["a"]{constructor(){super(...arguments),Fs(this,js),Hs(this,"endpoints",null)}static get PLUGIN_KEY(){return Ws}static get PLUGIN_PRIORITY(){return Xs}isEnabled(){return!!this.hot.getSettings()[Ws]}enablePlugin(){var e=this;this.enabled||(this.settings=this.hot.getSettings()[Ws],this.endpoints=new xs(this,this.settings),this.addHook("afterInit",(function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return Us(js,e,Qs).call(e,...n)})),this.addHook("afterChange",(function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return Us(js,e,Gs).call(e,...n)})),this.addHook("afterUpdateSettings",(function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return Us(js,e,Ks).call(e,...n)})),this.addHook("beforeCreateRow",(e,t,n)=>this.endpoints.resetSetupBeforeStructureAlteration("insert_row",e,t,null,n)),this.addHook("beforeCreateCol",(e,t,n)=>this.endpoints.resetSetupBeforeStructureAlteration("insert_col",e,t,null,n)),this.addHook("beforeRemoveRow",(function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return e.endpoints.resetSetupBeforeStructureAlteration("remove_row",...n)})),this.addHook("beforeRemoveCol",(function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return e.endpoints.resetSetupBeforeStructureAlteration("remove_col",...n)})),this.addHook("afterCreateRow",(e,t,n)=>this.endpoints.resetSetupAfterStructureAlteration("insert_row",e,t,null,n)),this.addHook("afterCreateCol",(e,t,n)=>this.endpoints.resetSetupAfterStructureAlteration("insert_col",e,t,null,n)),this.addHook("afterRemoveRow",(function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return e.endpoints.resetSetupAfterStructureAlteration("remove_row",...n)})),this.addHook("afterRemoveCol",(function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return e.endpoints.resetSetupAfterStructureAlteration("remove_col",...n)})),this.addHook("afterRowMove",(function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return Us(js,e,Bs).call(e,...n)})),super.enablePlugin())}disablePlugin(){this.endpoints=null,this.settings=null,this.currentEndpoint=null,super.disablePlugin()}updatePlugin(){this.disablePlugin(),this.enablePlugin(),this.endpoints.initEndpoints(),super.updatePlugin()}calculate(e){switch(e.type.toLowerCase()){case"sum":e.result=this.calculateSum(e);break;case"min":e.result=this.calculateMinMax(e,e.type);break;case"max":e.result=this.calculateMinMax(e,e.type);break;case"count":e.result=this.countEntries(e);break;case"average":e.result=this.calculateAverage(e);break;case"custom":e.result=e.customFunction.call(this,e);break;default:break}}calculateSum(e){let t=0;return Object(o["objectEach"])(e.ranges,n=>{t+=this.getPartialSum(n,e.sourceColumn)}),t}getPartialSum(e,t){let n=0,r=e[1]||e[0],i=null,s=0;do{if(i=this.getCellValue(r,t),i=As(i)?null:i,null!==i){const e=((""+i).split(".")[1]||[]).length||1;e>s&&(s=e)}n+=i||0,r-=1}while(r>=e[0]);return Math.round(n*10**s)/10**s}calculateMinMax(e,t){let n=null;return Object(o["objectEach"])(e.ranges,r=>{const i=this.getPartialMinMax(r,e.sourceColumn,t);if(null===n&&null!==i&&(n=i),null!==i)switch(t){case"min":n=Math.min(n,i);break;case"max":n=Math.max(n,i);break;default:break}}),null===n?"Not enough data":n}getPartialMinMax(e,t,n){let r,i=null,s=e[1]||e[0];do{if(r=this.getCellValue(s,t),r=As(r)?null:r,null===i)i=r;else if(null!==r)switch(n){case"min":i=Math.min(i,r);break;case"max":i=Math.max(i,r);break;default:break}s-=1}while(s>=e[0]);return i}countEmpty(e,t){let n,r=0,i=e[1]||e[0];do{n=this.getCellValue(i,t),n=As(n)?null:n,null===n&&(r+=1),i-=1}while(i>=e[0]);return r}countEntries(e){let t=0;const n=e.ranges;return Object(o["objectEach"])(n,n=>{const r=void 0===n[1]?1:n[1]-n[0]+1,i=this.countEmpty(n,e.sourceColumn);t+=r,t-=i}),t}calculateAverage(e){const t=this.calculateSum(e),n=this.countEntries(e);return t/n}getCellValue(e,t){const n=this.hot.toVisualRow(e),r=this.hot.toVisualColumn(t);let i=this.hot.getSourceDataAtCell(e,t),s="";if(null!==n&&null!==r&&(s=this.hot.getCellMeta(n,r).className||""),s.indexOf("columnSummaryResult")>-1)return null;if(this.endpoints.currentEndpoint.forceNumeric&&("string"===typeof i&&(i=i.replace(/,/,".")),i=parseFloat(i)),isNaN(i)&&!this.endpoints.currentEndpoint.suppressDataTypeErrors)throw new Error(Ds["a"]`ColumnSummary plugin: cell at (${e}, ${t}) is not in a\x20
  206. numeric format. Cannot do the calculation.`);return i}}function Qs(){this.endpoints.initEndpoints()}function Ks(e){void 0!==e.columns&&this.endpoints.refreshCellMetas()}function Gs(e,t){e&&"ColumnSummary.reset"!==t&&"ColumnSummary.set"!==t&&"loadData"!==t&&this.endpoints.refreshChangedEndpoints(e)}function Bs(e,t){this.endpoints.resetSetupBeforeStructureAlteration("move_row",e[0],e.length,e,this.pluginName),this.endpoints.resetSetupAfterStructureAlteration("move_row",t,e.length,e,this.pluginName)}var Js=n("7ae0");function zs(e,t){qs(e,t),t.add(e)}function $s(e,t,n){qs(e,t),t.set(e,n)}function qs(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function eo(e,t){return e.get(no(e,t))}function to(e,t,n){return e.set(no(e,t),n),n}function no(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}var ro=new WeakMap,io=new WeakMap,so=new WeakMap,oo=new WeakSet;class ao{constructor(){zs(this,oo),$s(this,ro,!0),$s(this,io,null),$s(this,so,new ResizeObserver(e=>no(oo,this,lo).call(this,e)))}setObservedElement(e){to(io,this,e)}unobserve(){eo(so,this).unobserve(eo(io,this))}observe(){to(ro,this,!0),eo(so,this).observe(eo(io,this))}destroy(){eo(so,this).disconnect()}}function lo(e){!eo(ro,this)&&Array.isArray(e)&&e.length?e.forEach(e=>{let{borderBoxSize:t}=e;const{inlineSize:n,blockSize:r}=t[0];this.runLocalHooks("resize",n,r)}):to(ro,this,!1)}function co(e,t,n){uo(e,t),t.set(e,n)}function uo(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function ho(e,t){return e.get(go(e,t))}function mo(e,t,n){return e.set(go(e,t),n),n}function go(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}Object(o["mixin"])(ao,Js["a"]);var po=new WeakMap,fo=new WeakMap,Ro=new WeakMap,yo=new WeakMap,Mo=new WeakMap,So=new WeakMap,bo=new WeakMap;class wo{static get CLASS_EDITOR_CONTAINER(){return"htCommentsContainer"}static get CLASS_EDITOR(){return"htComments"}static get CLASS_INPUT(){return"htCommentTextArea"}static get CLASS_CELL(){return"htCommentCell"}constructor(e,t){var n=this;co(this,po,void 0),co(this,fo,!1),co(this,Ro,null),co(this,yo,void 0),co(this,Mo,void 0),co(this,So,!0),co(this,bo,new ao),mo(po,this,e),mo(fo,this,t),mo(yo,this,this.createEditor()),mo(Mo,this,ho(yo,this).style),ho(bo,this).setObservedElement(this.getInputElement()),ho(bo,this).addLocalHook("resize",(function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return n.runLocalHooks("resize",...t)})),this.hide()}setPosition(e,t){ho(Mo,this).left=e+"px",ho(Mo,this).top=t+"px"}setSize(e,t){if(e&&t){const n=this.getInputElement();n.style.width=e+"px",n.style.height=t+"px"}}getSize(){return{width:Object(i["outerWidth"])(this.getInputElement()),height:Object(i["outerHeight"])(this.getInputElement())}}observeSize(){ho(bo,this).observe()}resetSize(){const e=this.getInputElement();e.style.width="",e.style.height=""}setReadOnlyState(e){const t=this.getInputElement();t.readOnly=e}show(){ho(Mo,this).display="block",mo(So,this,!1)}hide(){ho(bo,this).unobserve(),ho(So,this)||(ho(Mo,this).display="none"),mo(So,this,!0)}isVisible(){return"block"===ho(Mo,this).display}setValue(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";const t=e||"";this.getInputElement().value=t}getValue(){return this.getInputElement().value}isFocused(){return ho(po,this).activeElement===this.getInputElement()}focus(){this.getInputElement().focus()}createEditor(){const e=ho(po,this).createElement("div"),t=ho(po,this).createElement("textarea");return e.style.display="none",mo(Ro,this,ho(po,this).createElement("div")),ho(Ro,this).setAttribute("dir",ho(fo,this)?"rtl":"ltr"),Object(i["addClass"])(ho(Ro,this),wo.CLASS_EDITOR_CONTAINER),ho(po,this).body.appendChild(ho(Ro,this)),Object(i["addClass"])(e,wo.CLASS_EDITOR),Object(i["addClass"])(t,wo.CLASS_INPUT),t.setAttribute("data-hot-input",!0),e.appendChild(t),ho(Ro,this).appendChild(e),e}getInputElement(){return ho(yo,this).querySelector("."+wo.CLASS_INPUT)}destroy(){const e=ho(Ro,this)?ho(Ro,this).parentNode:null;ho(yo,this).parentNode.removeChild(ho(yo,this)),mo(yo,this,null),mo(Mo,this,null),ho(bo,this).destroy(),e&&e.removeChild(ho(Ro,this))}}Object(o["mixin"])(wo,Js["a"]);var To=wo;function Oo(e,t,n){return(t=vo(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function vo(e){var t=Eo(e,"string");return"symbol"==typeof t?t:t+""}function Eo(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}const Co=250,Lo=250;class No{constructor(e){Oo(this,"wasLastActionShow",!0),Oo(this,"showDebounced",null),Oo(this,"hidingTimer",null),this.updateDelay(e)}hide(){this.wasLastActionShow=!1,this.hidingTimer=setTimeout(()=>{!1===this.wasLastActionShow&&this.runLocalHooks("hide")},Lo)}show(e){this.wasLastActionShow=!0,this.showDebounced(e)}cancelHiding(){this.wasLastActionShow=!0,clearTimeout(this.hidingTimer),this.hidingTimer=null}updateDelay(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Co;this.showDebounced=Object(pi["debounce"])(e=>{this.wasLastActionShow&&this.runLocalHooks("show",e.from.row,e.from.col)},e)}destroy(){this.clearLocalHooks()}}Object(o["mixin"])(No,Js["a"]);var _o=No;const Io="---------";function Po(){return{name:Io}}function xo(e){return{key:"commentsAddEdit",name(){var t;const n=null===(t=this.getSelectedRangeLast())||void 0===t?void 0:t.highlight;return null!==n&&void 0!==n&&n.isCell()&&e.getCommentAtCell(n.row,n.col)?this.getTranslatedPhrase(Ye["CONTEXTMENU_ITEMS_EDIT_COMMENT"]):this.getTranslatedPhrase(Ye["CONTEXTMENU_ITEMS_ADD_COMMENT"])},callback(){const t=this.getSelectedRangeLast();e.setRange(t),e.show(),e.focusEditor()},disabled(){const e=this.getSelectedRangeLast();return!!(!e||e.highlight.isHeader()||this.selection.isEntireRowSelected()&&this.selection.isEntireColumnSelected()||0===this.countRenderedRows()||0===this.countRenderedCols())}}}function Do(e){return{key:"commentsRemove",name(){return this.getTranslatedPhrase(Ye["CONTEXTMENU_ITEMS_REMOVE_COMMENT"])},callback(){const t=this.getSelectedRangeLast();t.forAll((t,n)=>{t>=0&&n>=0&&e.removeCommentAtCell(t,n,!1)}),this.render()},disabled(){const e=this.getSelectedRangeLast();return!!(!e||e.highlight.isHeader()||this.selection.isEntireRowSelected()&&this.selection.isEntireColumnSelected()||0===this.countRenderedRows()||0===this.countRenderedCols())}}}function Ao(e,t){if(-1!==e.indexOf(t))return e;const n=e.replace("htTop","").replace("htMiddle","").replace("htBottom","").replace(" ","");return`${n} ${t}`}function Fo(e,t){if(-1!==e.indexOf(t))return e;const n=e.replace("htLeft","").replace("htCenter","").replace("htRight","").replace("htJustify","").replace(" ","");return`${n} ${t}`}function Yo(e,t){const n={};return Object(h["arrayEach"])(e,e=>{e.forAll((e,r)=>{e>=0&&r>=0&&(n[e]||(n[e]=[]),n[e][r]=t(e,r))})}),n}function Ho(e,t,n,r,i){Object(h["arrayEach"])(e,e=>{e.forAll((e,s)=>{e>=0&&s>=0&&ko(e,s,t,n,r,i)})})}function ko(e,t,n,r,i,s){const o=i(e,t);let a=r;o.className&&(a="vertical"===n?Ao(o.className,r):Fo(o.className,r)),s(e,t,"className",a)}function Vo(e){return`<span class="selected">${String.fromCharCode(10003)}</span>${e}`}function Uo(e,t){let n=!1;return Array.isArray(e)&&Object(h["arrayEach"])(e,e=>(e.forAll((e,r)=>{if(e>=0&&r>=0&&t(e,r))return n=!0,!1}),n)),n}function Wo(e,t){const n={top:0,left:0};if(t!==e.ownerDocument){const{frameElement:e}=t.defaultView,{top:r,left:i}=e.getBoundingClientRect();n.top=r,n.left=i}return n}function Xo(e){return function(t,n){const r=this.getCellMeta(t,n).className;return r&&-1!==r.indexOf(e)}}function jo(e,t){return Uo(e.getSelectedRange(),Xo(t).bind(e))}function Zo(e){return{key:"commentsReadOnly",name(){const t=this.getTranslatedPhrase(Ye["CONTEXTMENU_ITEMS_READ_ONLY_COMMENT"]),n=Uo(this.getSelectedRange(),(t,n)=>e.getCommentMeta(t,n,oa));return n?Vo(t):t},callback(){const t=this.getSelectedRangeLast();t.forAll((t,n)=>{if(t>=0&&n>=0){const r=!!e.getCommentMeta(t,n,oa);e.updateCommentMeta(t,n,{[oa]:!r})}})},disabled(){const t=this.getSelectedRangeLast();return!!(!t||t.highlight.isHeader()||!e.getCommentAtCell(t.highlight.row,t.highlight.col)||this.selection.isEntireRowSelected()&&this.selection.isEntireColumnSelected()||0===this.countRenderedRows()||0===this.countRenderedCols())}}}function Qo(e,t){Go(e,t),t.add(e)}function Ko(e,t,n){Go(e,t),t.set(e,n)}function Go(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Bo(e,t,n){return(t=Jo(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Jo(e){var t=zo(e,"string");return"symbol"==typeof t?t:t+""}function zo(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function $o(e,t,n){return e.set(ea(e,t),n),n}function qo(e,t){return e.get(ea(e,t))}function ea(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}const ta="comments",na=60,ra="comment",ia="value",sa="style",oa="readOnly",aa=ta,la="plugin:"+ta;var ca=new WeakMap,ua=new WeakMap,ha=new WeakMap,da=new WeakMap,ma=new WeakMap,ga=new WeakMap,pa=new WeakSet;class fa extends qt["a"]{constructor(){super(...arguments),Qo(this,pa),Bo(this,"range",{}),Ko(this,ca,null),Ko(this,ua,null),Ko(this,ha,!1),Ko(this,da,!1),Ko(this,ma,null),Ko(this,ga,"")}static get PLUGIN_KEY(){return ta}static get PLUGIN_PRIORITY(){return na}isEnabled(){return!!this.hot.getSettings()[ta]}enablePlugin(){var e=this;this.enabled||(qo(ca,this)||($o(ca,this,new To(this.hot.rootDocument,this.hot.isRtl())),qo(ca,this).addLocalHook("resize",(function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return ea(pa,e,Ta).call(e,...n)}))),qo(ua,this)||$o(ua,this,new _o(this.getDisplayDelaySetting())),this.addHook("afterContextMenuDefaultOptions",e=>this.addToContextMenu(e)),this.addHook("afterRenderer",(e,t,n,r,i,s)=>ea(pa,this,Sa).call(this,e,s)),this.addHook("afterScroll",()=>ea(pa,this,va).call(this)),this.addHook("afterBeginEditing",()=>this.hide()),this.addHook("afterDocumentKeyDown",e=>ea(pa,this,Oa).call(this,e)),qo(ua,this).addLocalHook("hide",()=>this.hide()),qo(ua,this).addLocalHook("show",(e,t)=>this.showAtCell(e,t)),this.registerShortcuts(),this.registerListeners(),super.enablePlugin())}updatePlugin(){qo(ua,this).updateDelay(this.getDisplayDelaySetting()),super.updatePlugin()}disablePlugin(){this.unregisterShortcuts(),super.disablePlugin()}registerShortcuts(){const e=this.hot.getShortcutManager(),t=e.getContext("grid"),n=e.addContext(la);t.addShortcut({keys:[["Control","Alt","M"]],callback:()=>{const t=this.hot.getSelectedRangeLast();$o(da,this,!0),this.hot.scrollToFocusedCell(()=>{this.setRange(t),this.show(),this.focusEditor(),e.setActiveContextName(la),this.hot._registerTimeout(()=>{$o(da,this,!1)})})},stopPropagation:!0,runOnlyIf:()=>{var e;return(null===(e=this.hot.getSelectedRangeLast())||void 0===e?void 0:e.highlight.isCell())&&!qo(ca,this).isVisible()},group:aa}),n.addShortcut({keys:[["Escape"]],callback:()=>{qo(ca,this).setValue(qo(ga,this)),this.hide(),e.setActiveContextName("grid")},runOnlyIf:()=>qo(ca,this).isVisible()&&qo(ca,this).isFocused(),group:aa}),n.addShortcut({keys:[["Control/Meta","Enter"]],callback:()=>{this.hide(),e.setActiveContextName("grid")},runOnlyIf:()=>qo(ca,this).isVisible()&&qo(ca,this).isFocused(),group:aa})}unregisterShortcuts(){this.hot.getShortcutManager().getContext("grid").removeShortcutsByGroup(aa)}registerListeners(){const{rootDocument:e}=this.hot,t=this.getEditorInputElement();this.eventManager.addEventListener(e,"mouseover",e=>ea(pa,this,ya).call(this,e)),this.eventManager.addEventListener(e,"mousedown",e=>ea(pa,this,Ra).call(this,e)),this.eventManager.addEventListener(e,"mouseup",()=>ea(pa,this,Ma).call(this)),this.eventManager.addEventListener(t,"focus",()=>ea(pa,this,wa).call(this)),this.eventManager.addEventListener(t,"blur",()=>ea(pa,this,ba).call(this))}setRange(e){this.range=e}clearRange(){this.range={}}targetIsCellWithComment(e){const t=Object(i["closest"])(e.target,"TD","TBODY");return!!(t&&Object(i["hasClass"])(t,"htCommentCell")&&Object(i["closest"])(t,[this.hot.rootElement]))}targetIsCommentTextArea(e){return this.getEditorInputElement()===e.target}setComment(e){if(!this.range.from)throw new Error('Before using this method, first set cell range (hot.getPlugin("comment").setRange())');const t=qo(ca,this).getValue();let n="";null!==e&&void 0!==e?n=e:null!==t&&void 0!==t&&(n=t);const r=this.range.from.row,i=this.range.from.col;this.updateCommentMeta(r,i,{[ia]:n}),this.hot.render()}setCommentAtCell(e,t,n){this.setRange({from:this.hot._createCellCoords(e,t)}),this.setComment(n)}removeComment(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];if(!this.range.from)throw new Error('Before using this method, first set cell range (hot.getPlugin("comment").setRange())');this.hot.setCellMeta(this.range.from.row,this.range.from.col,ra),e&&this.hot.render(),this.hide()}removeCommentAtCell(e,t){let n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];this.setRange({from:this.hot._createCellCoords(e,t)}),this.removeComment(n)}getComment(){const e=this.range.from.row,t=this.range.from.col;return this.getCommentMeta(e,t,ia)}getCommentAtCell(e,t){return this.getCommentMeta(e,t,ia)}show(){var e;if(!this.range.from)throw new Error('Before using this method, first set cell range (hot.getPlugin("comment").setRange())');const{from:{row:t,col:n}}=this.range;if(t<0||t>this.hot.countSourceRows()-1||n<0||n>this.hot.countSourceCols()-1)return!1;const r=this.hot.getCellMeta(this.range.from.row,this.range.from.col);return qo(ua,this).cancelHiding(),qo(ca,this).setValue(null!==(e=r[ra]?r[ra][ia]:null)&&void 0!==e?e:""),qo(ca,this).show(),this.refreshEditor(!0),!0}showAtCell(e,t){return this.setRange({from:this.hot._createCellCoords(e,t)}),this.show()}hide(){qo(ca,this).hide()}refreshEditor(){var e,t;let n=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(!n&&(!this.range.from||!qo(ca,this).isVisible()))return;const{rowIndexMapper:r,columnIndexMapper:s}=this.hot,{row:o,col:a}=this.range.from;let l=r.getRenderableFromVisualIndex(o),c=s.getRenderableFromVisualIndex(a);const u=null===l;qo(ca,this).setPosition(0,0),null===l&&(l=r.getRenderableFromVisualIndex(r.getNearestNotHiddenIndex(o,-1))),null===c&&(c=s.getRenderableFromVisualIndex(s.getNearestNotHiddenIndex(a,-1)));const h=null===l,d=null===c;l=null!==(e=l)&&void 0!==e?e:0,c=null!==(t=c)&&void 0!==t?t:0;const{rootWindow:m,view:{_wt:g}}=this.hot,{wtTable:p}=g,f=g.getCell({row:l,col:c},!0),R=this.getCommentMeta(o,a,sa);R?qo(ca,this).setSize(R.width,R.height):qo(ca,this).resetSize();const y=d?0:p.getStretchedColumnWidth(c),M=u&&!h?Object(i["outerHeight"])(f):0,{left:S,top:b,width:w,height:T}=f.getBoundingClientRect(),{width:O,height:v}=qo(ca,this).getSize(),{innerWidth:E,innerHeight:C}=this.hot.rootWindow,L=this.hot.rootDocument.documentElement;let N=S+m.scrollX+y,_=b+m.scrollY+M;this.hot.isRtl()&&(N-=O+y),this.hot.isLtr()&&S+w+O>E?N=S+m.scrollX-O-1:this.hot.isRtl()&&N<-(L.scrollWidth-L.clientWidth)&&(N=S+m.scrollX+y+1),b+v>C&&(_-=v-T+1),qo(ca,this).setPosition(N,_),qo(ca,this).setReadOnlyState(this.getCommentMeta(o,a,oa)),qo(ca,this).observeSize()}focusEditor(){qo(ca,this).focus()}updateCommentMeta(e,t,n){const r=this.hot.getCellMeta(e,t)[ra];let i;r?(i=Object(o["deepClone"])(r),Object(o["deepExtend"])(i,n)):i=n,this.hot.setCellMeta(e,t,ra,i)}getCommentMeta(e,t,n){const r=this.hot.getCellMeta(e,t);if(r[ra])return r[ra][n]}addToContextMenu(e){e.items.push({name:Io},xo(this),Do(this),Zo(this))}getDisplayDelaySetting(){const e=this.hot.getSettings()[ta];if(Object(o["isObject"])(e))return e.displayDelay}getEditorInputElement(){return qo(ca,this).getInputElement()}destroy(){var e,t;null===(e=qo(ca,this))||void 0===e||e.destroy(),null===(t=qo(ua,this))||void 0===t||t.destroy(),super.destroy()}}function Ra(e){if(this.hot.view&&this.hot.view._wt&&!qo(ha,this)&&!this.targetIsCommentTextArea(e)){const t=Object(i["closest"])(e.target,"TD","TBODY");let n=null;t&&(n=this.hot.getCoords(t)),(!t||this.range.from&&n&&(this.range.from.row!==n.row||this.range.from.col!==n.col))&&this.hide()}}function ya(e){const{rootDocument:t}=this.hot;if(!(qo(ha,this)||qo(ca,this).isFocused()||Object(i["hasClass"])(e.target,"wtBorder")||qo(ma,this)===e.target)&&qo(ca,this))if($o(ma,this,t.elementFromPoint(e.clientX,e.clientY)),this.targetIsCellWithComment(e)){const t=this.hot._createCellRange(this.hot.getCoords(e.target));qo(ua,this).show(t)}else Object(i["isChildOf"])(e.target,t)&&!this.targetIsCommentTextArea(e)&&qo(ua,this).hide()}function Ma(){$o(ha,this,!1)}function Sa(e,t){t[ra]&&t[ra][ia]&&Object(i["addClass"])(e,t.commentedCellClassName)}function ba(){$o(ga,this,""),this.hot.getShortcutManager().setActiveContextName("grid"),this.setComment()}function wa(){$o(ga,this,this.getComment()),this.hot.listen(),this.hot.getShortcutManager().setActiveContextName(la)}function Ta(e,t){this.updateCommentMeta(this.range.from.row,this.range.from.col,{[sa]:{width:e,height:t}})}function Oa(e){qo(ca,this).isVisible()&&Object(s["stopImmediatePropagation"])(e)}function va(){qo(da,this)||this.hide()}n("3c65");function Ea(e,t,n){return(t=Ca(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ca(e){var t=La(e,"string");return"symbol"==typeof t?t:t+""}function La(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}class Na{constructor(e){Ea(this,"hot",void 0),Ea(this,"commands",{}),Ea(this,"commonCallback",null),this.hot=e}registerCommand(e,t){this.commands[e]=t}setCommonCallback(e){this.commonCallback=e}execute(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];const i=e.split(":"),s=i[0],a=2===i.length?i[1]:null;let l=this.commands[s];if(!l)throw new Error(`Menu command '${s}' not exists.`);if(a&&l.submenu&&(l=_a(a,l.submenu.items)),!0===l.disabled)return;if("function"===typeof l.disabled&&!0===l.disabled.call(this.hot))return;if(Object(o["hasOwnProperty"])(l,"submenu"))return;const c=[];"function"===typeof l.callback&&c.push(l.callback),"function"===typeof this.commonCallback&&c.push(this.commonCallback),n.unshift(i.join(":")),Object(h["arrayEach"])(c,e=>e.apply(this.hot,n))}}function _a(e,t){let n;return Object(h["arrayEach"])(t,t=>{const r=t.key?t.key.split(":"):null;if(Array.isArray(r)&&r[1]===e)return n=t,!1}),n}const Ia="alignment";function Pa(){return{key:Ia,name(){return this.getTranslatedPhrase(Ye["CONTEXTMENU_ITEMS_ALIGNMENT"])},disabled(){if(0===this.countRows()||0===this.countCols())return!0;const e=this.getSelectedRangeLast();return!e||(!!e.isSingleHeader()||!(this.getSelectedRange()&&!this.selection.isSelectedByCorner()))},submenu:{items:[{key:Ia+":left",checkable:!0,ariaLabel(){return this.getTranslatedPhrase(Ye["CONTEXTMENU_ITEMS_ALIGNMENT_LEFT"])},ariaChecked(){return jo(this,"htLeft")},name(){let e=this.getTranslatedPhrase(Ye["CONTEXTMENU_ITEMS_ALIGNMENT_LEFT"]);return jo(this,"htLeft")&&(e=Vo(e)),e},callback(){const e=this.getSelectedRange(),t=Yo(e,(e,t)=>this.getCellMeta(e,t).className),n="horizontal",r="htLeft";this.runHooks("beforeCellAlignment",t,e,n,r),Ho(e,n,r,(e,t)=>this.getCellMeta(e,t),(e,t,n,r)=>this.setCellMeta(e,t,n,r)),this.render()},disabled:!1},{key:Ia+":center",checkable:!0,ariaLabel(){return this.getTranslatedPhrase(Ye["CONTEXTMENU_ITEMS_ALIGNMENT_CENTER"])},ariaChecked(){return jo(this,"htCenter")},name(){let e=this.getTranslatedPhrase(Ye["CONTEXTMENU_ITEMS_ALIGNMENT_CENTER"]);return jo(this,"htCenter")&&(e=Vo(e)),e},callback(){const e=this.getSelectedRange(),t=Yo(e,(e,t)=>this.getCellMeta(e,t).className),n="horizontal",r="htCenter";this.runHooks("beforeCellAlignment",t,e,n,r),Ho(e,n,r,(e,t)=>this.getCellMeta(e,t),(e,t,n,r)=>this.setCellMeta(e,t,n,r)),this.render()},disabled:!1},{key:Ia+":right",checkable:!0,ariaLabel(){return this.getTranslatedPhrase(Ye["CONTEXTMENU_ITEMS_ALIGNMENT_RIGHT"])},ariaChecked(){return jo(this,"htRight")},name(){let e=this.getTranslatedPhrase(Ye["CONTEXTMENU_ITEMS_ALIGNMENT_RIGHT"]);return jo(this,"htRight")&&(e=Vo(e)),e},callback(){const e=this.getSelectedRange(),t=Yo(e,(e,t)=>this.getCellMeta(e,t).className),n="horizontal",r="htRight";this.runHooks("beforeCellAlignment",t,e,n,r),Ho(e,n,r,(e,t)=>this.getCellMeta(e,t),(e,t,n,r)=>this.setCellMeta(e,t,n,r)),this.render()},disabled:!1},{key:Ia+":justify",checkable:!0,ariaLabel(){return this.getTranslatedPhrase(Ye["CONTEXTMENU_ITEMS_ALIGNMENT_JUSTIFY"])},ariaChecked(){return jo(this,"htJustify")},name(){let e=this.getTranslatedPhrase(Ye["CONTEXTMENU_ITEMS_ALIGNMENT_JUSTIFY"]);return jo(this,"htJustify")&&(e=Vo(e)),e},callback(){const e=this.getSelectedRange(),t=Yo(e,(e,t)=>this.getCellMeta(e,t).className),n="horizontal",r="htJustify";this.runHooks("beforeCellAlignment",t,e,n,r),Ho(e,n,r,(e,t)=>this.getCellMeta(e,t),(e,t,n,r)=>this.setCellMeta(e,t,n,r)),this.render()},disabled:!1},{name:Io},{key:Ia+":top",checkable:!0,ariaLabel(){return this.getTranslatedPhrase(Ye["CONTEXTMENU_ITEMS_ALIGNMENT_TOP"])},ariaChecked(){return jo(this,"htTop")},name(){let e=this.getTranslatedPhrase(Ye["CONTEXTMENU_ITEMS_ALIGNMENT_TOP"]);return jo(this,"htTop")&&(e=Vo(e)),e},callback(){const e=this.getSelectedRange(),t=Yo(e,(e,t)=>this.getCellMeta(e,t).className),n="vertical",r="htTop";this.runHooks("beforeCellAlignment",t,e,n,r),Ho(e,n,r,(e,t)=>this.getCellMeta(e,t),(e,t,n,r)=>this.setCellMeta(e,t,n,r)),this.render()},disabled:!1},{key:Ia+":middle",checkable:!0,ariaLabel(){return this.getTranslatedPhrase(Ye["CONTEXTMENU_ITEMS_ALIGNMENT_MIDDLE"])},ariaChecked(){return jo(this,"htMiddle")},name(){let e=this.getTranslatedPhrase(Ye["CONTEXTMENU_ITEMS_ALIGNMENT_MIDDLE"]);return jo(this,"htMiddle")&&(e=Vo(e)),e},callback(){const e=this.getSelectedRange(),t=Yo(e,(e,t)=>this.getCellMeta(e,t).className),n="vertical",r="htMiddle";this.runHooks("beforeCellAlignment",t,e,n,r),Ho(e,n,r,(e,t)=>this.getCellMeta(e,t),(e,t,n,r)=>this.setCellMeta(e,t,n,r)),this.render()},disabled:!1},{key:Ia+":bottom",checkable:!0,ariaLabel(){return this.getTranslatedPhrase(Ye["CONTEXTMENU_ITEMS_ALIGNMENT_BOTTOM"])},ariaChecked(){return jo(this,"htBottom")},name(){let e=this.getTranslatedPhrase(Ye["CONTEXTMENU_ITEMS_ALIGNMENT_BOTTOM"]);return jo(this,"htBottom")&&(e=Vo(e)),e},callback(){const e=this.getSelectedRange(),t=Yo(e,(e,t)=>this.getCellMeta(e,t).className),n="vertical",r="htBottom";this.runHooks("beforeCellAlignment",t,e,n,r),Ho(e,n,r,(e,t)=>this.getCellMeta(e,t),(e,t,n,r)=>this.setCellMeta(e,t,n,r)),this.render()},disabled:!1}]}}}const xa="clear_column";function Da(){return{key:xa,name(){return this.getTranslatedPhrase(Ye["CONTEXTMENU_ITEMS_CLEAR_COLUMN"])},callback(e,t){const n=t[0].start.col,r=t[0].end.col;this.countRows()&&this.populateFromArray(0,n,[[null]],Math.max(t[0].start.row,t[0].end.row),r,"ContextMenu.clearColumn")},disabled(){const e=this.getSelectedRangeLast();return!e||(!!(e.isSingleHeader()&&e.highlight.col<0)||!this.selection.isSelectedByColumnHeader())}}}const Aa="col_left";function Fa(){return{key:Aa,name(){return this.getTranslatedPhrase(Ye["CONTEXTMENU_ITEMS_INSERT_LEFT"])},callback(){const e=this.getSelectedRangeLast().getTopLeftCorner(),t=this.isRtl()?"insert_col_end":"insert_col_start";this.alter(t,e.col,1,"ContextMenu.columnLeft")},disabled(){if(!this.isColumnModificationAllowed())return!0;const e=this.getSelectedRangeLast();if(!e)return!0;if(e.isSingleHeader()&&e.highlight.col<0)return!0;if(this.selection.isSelectedByCorner()){const e=this.countCols();return 0===e}return this.selection.isSelectedByRowHeader()||this.countCols()>=this.getSettings().maxCols},hidden(){return!this.getSettings().allowInsertColumn}}}const Ya="col_right";function Ha(){return{key:Ya,name(){return this.getTranslatedPhrase(Ye["CONTEXTMENU_ITEMS_INSERT_RIGHT"])},callback(){const e=this.getSelectedRangeLast().getTopRightCorner(),t=this.isRtl()?"insert_col_start":"insert_col_end";this.alter(t,e.col,1,"ContextMenu.columnRight")},disabled(){if(!this.isColumnModificationAllowed())return!0;const e=this.getSelectedRangeLast();return!e||(!!(e.isSingleHeader()&&e.highlight.col<0)||!this.selection.isSelectedByCorner()&&(this.selection.isSelectedByRowHeader()||this.countCols()>=this.getSettings().maxCols))},hidden(){return!this.getSettings().allowInsertColumn}}}const ka="make_read_only";function Va(){return{key:ka,checkable:!0,ariaChecked(){const e=Uo(this.getSelectedRange(),(e,t)=>this.getCellMeta(e,t).readOnly);return e},ariaLabel(){return this.getTranslatedPhrase(Ye["CONTEXTMENU_ITEMS_READ_ONLY"])},name(){let e=this.getTranslatedPhrase(Ye["CONTEXTMENU_ITEMS_READ_ONLY"]);const t=Uo(this.getSelectedRange(),(e,t)=>this.getCellMeta(e,t).readOnly);return t&&(e=Vo(e)),e},callback(){const e=this.getSelectedRange(),t=Uo(e,(e,t)=>this.getCellMeta(e,t).readOnly);Object(h["arrayEach"])(e,e=>{e.forAll((e,n)=>{e>=0&&n>=0&&this.setCellMeta(e,n,"readOnly",!t)})}),this.render()},disabled(){const e=this.getSelectedRangeLast();return!e||(!!e.isSingleHeader()||(!!this.selection.isSelectedByCorner()||(0===this.countRows()||0===this.countCols()||(!this.getSelectedRange()||0===this.getSelectedRange().length))))}}}const Ua="redo";function Wa(){return{key:Ua,name(){return this.getTranslatedPhrase(Ye["CONTEXTMENU_ITEMS_REDO"])},callback(){this.redo()},hidden(){const e=this.getPlugin("undoRedo");return!e||!e.isEnabled()},disabled(){return!this.getPlugin("undoRedo").isRedoAvailable()}}}var Xa=n("a952");const ja="remove_col";function Za(){return{key:ja,name(){const e=this.getSelected();let t=0;if(e)if(e.length>1)t=1;else{const[,n,,r]=e[0];n-r!==0&&(t=1)}return this.getTranslatedPhrase(Ye["CONTEXTMENU_ITEMS_REMOVE_COLUMN"],t)},callback(){this.alter("remove_col",Object(Xa["e"])(this),null,"ContextMenu.removeColumn")},disabled(){if(!this.isColumnModificationAllowed())return!0;const e=this.getSelectedRangeLast();if(!e)return!0;if(e.isSingleHeader()&&e.highlight.col<0)return!0;const t=this.countCols();return this.selection.isSelectedByCorner()?0===t:this.selection.isSelectedByRowHeader()||0===t},hidden(){return!this.getSettings().allowRemoveColumn}}}const Qa="remove_row";function Ka(){return{key:Qa,name(){const e=this.getSelected();let t=0;if(e)if(e.length>1)t=1;else{const[n,,r]=e[0];n-r!==0&&(t=1)}return this.getTranslatedPhrase(Ye["CONTEXTMENU_ITEMS_REMOVE_ROW"],t)},callback(){this.alter("remove_row",Object(Xa["f"])(this),1,"ContextMenu.removeRow")},disabled(){const e=this.getSelectedRangeLast();if(!e)return!0;if(e.isSingleHeader()&&e.highlight.row<0)return!0;const t=this.countRows();return this.selection.isSelectedByCorner()?0===t:this.selection.isSelectedByColumnHeader()||0===t},hidden(){return!this.getSettings().allowRemoveRow}}}const Ga="row_above";function Ba(){return{key:Ga,name(){return this.getTranslatedPhrase(Ye["CONTEXTMENU_ITEMS_ROW_ABOVE"])},callback(){const e=this.getSelectedRangeLast().getTopLeftCorner();this.alter("insert_row_above",e.row,1,"ContextMenu.rowAbove")},disabled(){const e=this.getSelectedRangeLast();if(!e)return!0;if(e.isSingleHeader()&&e.highlight.row<0)return!0;if(this.selection.isSelectedByCorner()){const e=this.countRows();return 0===e}return this.selection.isSelectedByColumnHeader()||this.countRows()>=this.getSettings().maxRows},hidden(){return!this.getSettings().allowInsertRow}}}const Ja="row_below";function za(){return{key:Ja,name(){return this.getTranslatedPhrase(Ye["CONTEXTMENU_ITEMS_ROW_BELOW"])},callback(){const e=this.getSelectedRangeLast().getBottomRightCorner();this.alter("insert_row_below",e.row,1,"ContextMenu.rowBelow")},disabled(){const e=this.getSelectedRangeLast();return!e||(!!(e.isSingleHeader()&&e.highlight.row<0)||!this.selection.isSelectedByCorner()&&(this.selection.isSelectedByColumnHeader()||this.countRows()>=this.getSettings().maxRows))},hidden(){return!this.getSettings().allowInsertRow}}}const $a="no_items";function qa(){return{key:$a,name(){return this.getTranslatedPhrase(Ye["CONTEXTMENU_ITEMS_NO_ITEMS"])},disabled:!0,isCommand:!1}}const el="undo";function tl(){return{key:el,name(){return this.getTranslatedPhrase(Ye["CONTEXTMENU_ITEMS_UNDO"])},callback(){this.undo()},hidden(){const e=this.getPlugin("undoRedo");return!e||!e.isEnabled()},disabled(){return!this.getPlugin("undoRedo").isUndoAvailable()}}}const nl=[Ga,Ja,Aa,Ya,xa,Qa,ja,el,Ua,ka,Ia,Io,$a],rl={[Io]:Po,[$a]:qa,[Ga]:Ba,[Ja]:za,[Aa]:Fa,[Ya]:Ha,[xa]:Da,[Qa]:Ka,[ja]:Za,[el]:tl,[Ua]:Wa,[ka]:Va,[Ia]:Pa};function il(){const e={};return Object(o["objectEach"])(rl,(t,n)=>{e[n]=t()}),e}function sl(e,t,n){return(t=ol(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ol(e){var t=al(e,"string");return"symbol"==typeof t?t:t+""}function al(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}class ll{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;sl(this,"hot",void 0),sl(this,"predefinedItems",il()),sl(this,"defaultOrderPattern",void 0),this.hot=e,this.defaultOrderPattern=t}setPredefinedItems(e){const t={};this.defaultOrderPattern.length=0,Object(o["objectEach"])(e,(e,n)=>{let r="";e.name===Io?(t[Io]=e,r=Io):isNaN(parseInt(n,10))?(e.key=void 0===e.key?n:e.key,t[n]=e,r=e.key):(t[e.key]=e,r=e.key),this.defaultOrderPattern.push(r)}),this.predefinedItems=t}getItems(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return cl(e,this.defaultOrderPattern,this.predefinedItems)}}function cl(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const r=[];let i=e;return i&&i.items?i=i.items:Array.isArray(i)||(i=t),Object(o["isObject"])(i)?Object(o["objectEach"])(i,(e,t)=>{let i=n["string"===typeof e?e:t];i||(i=e),Object(o["isObject"])(e)?Object(o["extend"])(i,e):"string"===typeof i&&(i={name:i}),void 0===i.key&&(i.key=t),r.push(i)}):Object(h["arrayEach"])(i,(e,t)=>{let i=n[e];!i&&nl.indexOf(e)>=0||(i||(i={name:e,key:""+t}),Object(o["isObject"])(e)&&Object(o["extend"])(i,e),void 0===i.key&&(i.key=t),r.push(i))}),r}function ul(e,t,n){return(t=hl(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function hl(e){var t=dl(e,"string");return"symbol"==typeof t?t:t+""}function dl(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}class ml{constructor(e,t){ul(this,"top",void 0),ul(this,"topRelative",void 0),ul(this,"left",void 0),ul(this,"leftRelative",void 0),ul(this,"scrollTop",void 0),ul(this,"scrollLeft",void 0),ul(this,"cellHeight",void 0),ul(this,"cellWidth",void 0);const n=t.scrollY,r=t.scrollX;let i,s,o,a,l,c;this.rootWindow=t,this.type=this.getSourceType(e),"literal"===this.type?(i=parseInt(e.top,10),o=parseInt(e.left,10),l=e.height||0,c=e.width||0,s=i,a=o,i+=n,o+=r):"event"===this.type&&(i=parseInt(e.pageY,10),o=parseInt(e.pageX,10),l=e.target.clientHeight,c=e.target.clientWidth,s=i-n,a=o-r),this.top=i,this.topRelative=s,this.left=o,this.leftRelative=a,this.scrollTop=n,this.scrollLeft=r,this.cellHeight=l,this.cellWidth=c}getSourceType(e){let t="literal";return e instanceof Event&&(t="event"),t}fitsAbove(e){return this.topRelative>=e.offsetHeight}fitsBelow(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.rootWindow.innerHeight;return this.topRelative+e.offsetHeight<=t}fitsOnRight(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.rootWindow.innerWidth;return this.leftRelative+this.cellWidth+e.offsetWidth<=t}fitsOnLeft(e){return this.leftRelative>=e.offsetWidth}}function gl(e,t,n){pl(e,t),t.set(e,n)}function pl(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function fl(e,t){return e.get(yl(e,t))}function Rl(e,t,n){return e.set(yl(e,t),n),n}function yl(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}var Ml=new WeakMap,Sl=new WeakMap,bl=new WeakMap,wl=new WeakMap,Tl=new WeakMap;class Ol{constructor(e){gl(this,Ml,void 0),gl(this,Sl,void 0),gl(this,bl,void 0),gl(this,wl,!1),gl(this,Tl,{above:0,below:0,left:0,right:0}),Rl(wl,this,e)}setOffset(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return fl(Tl,this)[e]=t,this}setElement(e){return Rl(Ml,this,e),this}setParentElement(e){return Rl(Sl,this,e),this}updatePosition(e){Rl(bl,this,new ml(e,fl(Ml,this).ownerDocument.defaultView)),fl(wl,this)?(fl(bl,this).fitsBelow(fl(Ml,this))?this.setPositionBelowCursor():fl(bl,this).fitsAbove(fl(Ml,this))?this.setPositionAboveCursor():this.setPositionBelowCursor(),this.updateHorizontalPosition()):(this.setPositionBelowCursor(),this.setPositionOnRightOfCursor())}updateHorizontalPosition(){"rtl"===fl(Ml,this).dir?fl(bl,this).fitsOnLeft(fl(Ml,this))?this.setPositionOnLeftOfCursor():this.setPositionOnRightOfCursor():fl(bl,this).fitsOnRight(fl(Ml,this))?this.setPositionOnRightOfCursor():this.setPositionOnLeftOfCursor()}setPositionAboveCursor(){let e=fl(Tl,this).above+fl(bl,this).top-fl(Ml,this).offsetHeight;fl(Sl,this)&&(e=fl(bl,this).top+fl(bl,this).cellHeight-fl(Ml,this).offsetHeight+3),fl(Ml,this).style.top=e+"px"}setPositionBelowCursor(){let e=fl(Tl,this).below+fl(bl,this).top+1;fl(Sl,this)&&(e=fl(bl,this).top-1),fl(Ml,this).style.top=e+"px"}setPositionOnRightOfCursor(){let e=fl(bl,this).left;if(fl(Sl,this)){const t=Number.parseInt(getComputedStyle(fl(Sl,this).querySelector(".htCore")).borderRightWidth,10);e+=fl(bl,this).cellWidth+t}else e+=fl(Tl,this).right;fl(Ml,this).style.left=e+"px"}setPositionOnLeftOfCursor(){let e=fl(Tl,this).left+fl(bl,this).left-fl(Ml,this).offsetWidth;if(fl(Sl,this)){const t=Number.parseInt(getComputedStyle(fl(Sl,this).querySelector(".htCore")).borderLeftWidth,10);e-=t}fl(Ml,this).style.left=e+"px"}}function vl(e){let{initialPage:t=-1,size:n=(()=>0),onItemSelect:r=(()=>{}),onClear:i=(()=>{})}=e;const s=new Set;let o=Object(nt["clamp"])(t,-1,g()-1);function a(e,t){const n=g()-1;if(e<0&&(e=n),e>n&&(e=0),s.has(e))return-1;s.add(e);const i=r(e,!1);return!1===i&&(e=a(1===t?++e:--e,t)),e}function l(e){e>-1&&e<g()&&!1!==r(e,!0)&&(o=e)}function c(){return o}function u(){g()>0&&(s.clear(),o=a(0,1))}function h(){g()>0&&(s.clear(),o=a(g()-1,-1))}function d(){g()>0&&(s.clear(),o=a(++o,1))}function m(){g()>0&&(s.clear(),o=a(--o,-1))}function g(){return Math.max(n(),0)}function p(){s.clear(),o=t,i()}return{setCurrentPage:l,getCurrentPage:c,toFirstItem:u,toLastItem:h,toNextItem:d,toPreviousItem:m,getSize:g,clear:p}}function El(e){return Object(h["arrayMap"])(e,e=>({start:e.getTopStartCorner(),end:e.getBottomEndCorner()}))}function Cl(e){return Object(o["hasOwnProperty"])(e,"submenu")}function Ll(e){return new RegExp(Io,"i").test(e.name)}function Nl(e,t){return!0===e.disabled||"function"===typeof e.disabled&&!0===e.disabled.call(t)}function _l(e){return Object(o["hasOwnProperty"])(e,"disableSelection")}function Il(e){return Object(i["hasClass"])(e,"htSeparator")}function Pl(e){return Object(i["hasClass"])(e,"htSubmenu")}function xl(e){return Object(i["hasClass"])(e,"htDisabled")}function Dl(e){return Object(i["hasClass"])(e,"htSelectionDisabled")}function Al(e,t){return!e.hidden||!("function"===typeof e.hidden&&e.hidden.call(t))}function Fl(e,t){const n=e.slice(0);for(let r=0;r<n.length;){if(n[r].name!==t)break;n.shift()}return n}function Yl(e,t){let n=e.slice(0);return n.reverse(),n=Fl(n,t),n.reverse(),n}function Hl(e){const t=[];return Object(h["arrayEach"])(e,(e,n)=>{n>0?t[t.length-1].name!==e.name&&t.push(e):t.push(e)}),t}function kl(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Io,n=e.slice(0);return n=Fl(n,t),n=Yl(n,t),n=Hl(n),n}function Vl(e){return!0===e.checkable}function Ul(e){return vl({size:()=>e.countRows(),onItemSelect(t,n){const r=e.getCell(t,0);if(!r||Il(r)||xl(r)||Dl(r))return!1;e.selectCell(t,0,...n?[t,0,!1,!1]:[])},onClear(){e.deselectCell()}})}function Wl(e){const{hot:t,hotMenu:n}=e;return[{keys:[["Control/Meta","A"]],forwardToContext:t.getShortcutManager().getContext("grid"),callback:()=>e.close(!0)},{keys:[["Tab"],["Shift","Tab"]],callback:(n,r)=>{const i=t.getSettings(),s="function"===typeof i.tabMoves?i.tabMoves(n):i.tabMoves;r.includes("shift")?t.selection.transformStart(-s.row,-s.col):t.selection.transformStart(s.row,s.col),e.close(!0)}},{keys:[["Escape"]],callback:()=>e.close()},{keys:[["ArrowDown"]],callback:()=>e.getNavigator().toNextItem()},{keys:[["ArrowUp"]],callback:()=>e.getNavigator().toPreviousItem()},{keys:[["ArrowRight"]],callback:()=>{const t=n.getSelectedLast();if(t){const n=e.openSubMenu(t[0]);n&&n.getNavigator().toFirstItem()}}},{keys:[["ArrowLeft"]],callback:()=>{const t=n.getSelectedLast();t&&e.isSubMenu()&&(e.close(),e.isSubMenu()&&e.parentMenu.hotMenu.listen())}},{keys:[["Control/Meta","ArrowUp"],["Home"]],callback:()=>e.getNavigator().toFirstItem()},{keys:[["Control/Meta","ArrowDown"],["End"]],callback:()=>e.getNavigator().toLastItem()},{keys:[["Enter"],["Space"]],callback:t=>{const r=n.getSelectedLast();r&&(n.getSourceDataAtRow(r[0]).submenu?e.openSubMenu(r[0]).getNavigator().toFirstItem():(e.executeCommand(t),e.close(!0)))}},{keys:[["PageUp"]],callback:()=>{const t=n.getSelectedLast();t?n.selection.transformStart(-n.countVisibleRows(),0):e.getNavigator().toFirstItem()}},{keys:[["PageDown"]],callback:()=>{const t=n.getSelectedLast();t?n.selection.transformStart(n.countVisibleRows(),0):e.getNavigator().toLastItem()}}]}const Xl="menu",jl=Xl;function Zl(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];const n=[];function r(e,t){a(t).addShortcuts(e,{group:Xl})}function i(e,t){const i=a(t);e.forEach(e=>{let{keys:t}=e;t.forEach(e=>i.removeShortcutsByKeys(e))}),n.push({shortcuts:e,contextName:t}),r(e,t)}function s(){return[...n]}function o(e){return e?`${jl}:${e}`:jl}function a(t){var n;const r=e.hotMenu.getShortcutManager(),i=o(t);return null!==(n=r.getContext(i))&&void 0!==n?n:r.addContext(i)}function l(t){e.hotMenu.getShortcutManager().setActiveContextName(o(t))}return r(Wl(e)),t.forEach(e=>{let{shortcuts:t,contextName:n}=e;i(t,n)}),{addCustomShortcuts:i,getCustomShortcuts:s,getContext:a,listen:l}}function Ql(e){return(t,n,r,s,o,a)=>{const l=t.getSourceDataAtRow(r),c=e.rootDocument.createElement("div"),u="function"===typeof a?a.call(e):a,h="function"===typeof l.ariaLabel?l.ariaLabel.call(e):l.ariaLabel,d="function"===typeof l.ariaChecked?l.ariaChecked.call(e):l.ariaChecked;if(Object(i["empty"])(n),Object(i["addClass"])(c,"htItemWrapper"),e.getSettings().ariaTags){const t=!Nl(l,e)&&!_l(l)&&!Ll(l);Object(i["setAttribute"])(n,[...Vl(l)?[Object(R["u"])(),Object(R["p"])(h),Object(R["d"])(d)]:[Object(R["t"])(),Object(R["p"])(u)],...t?[Object(R["L"])(-1)]:[],...Nl(l,e)?[Object(R["j"])()]:[],...Cl(l)?[Object(R["k"])(!1)]:[]])}n.className="",n.appendChild(c),Ll(l)?Object(i["addClass"])(n,"htSeparator"):"function"===typeof l.renderer?(Object(i["addClass"])(n,"htCustomMenuRenderer"),n.appendChild(l.renderer(t,c,r,s,o,u))):Object(i["fastInnerHTML"])(c,u),Nl(l,e)?Object(i["addClass"])(n,"htDisabled"):_l(l)?Object(i["addClass"])(n,"htSelectionDisabled"):Cl(l)&&Object(i["addClass"])(n,"htSubmenu")}}function Kl(e,t,n){Gl(e,t),t.set(e,n)}function Gl(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Bl(e,t,n){return(t=Jl(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Jl(e){var t=zl(e,"string");return"symbol"==typeof t?t:t+""}function zl(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function $l(e,t,n){return e.set(ec(e,t),n),n}function ql(e,t){return e.get(ec(e,t))}function ec(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}const tc=215;var nc=new WeakMap,rc=new WeakMap,ic=new WeakMap;class sc{get tableBorderWidth(){return void 0===ql(ic,this)&&this.hotMenu&&$l(ic,this,parseInt(Object(i["getComputedStyle"])(this.hotMenu.view._wt.wtTable.TABLE).borderWidth,10)),ql(ic,this)}constructor(e,t){var n=this;Bl(this,"hot",void 0),Bl(this,"options",void 0),Bl(this,"eventManager",new Pe["a"](this)),Bl(this,"container",void 0),Bl(this,"positioner",void 0),Bl(this,"hotMenu",null),Bl(this,"hotSubMenus",{}),Bl(this,"parentMenu",void 0),Bl(this,"menuItems",null),Bl(this,"origOutsideClickDeselects",null),Kl(this,nc,void 0),Kl(this,rc,void 0),Kl(this,ic,void 0),this.hot=e,this.options=t||{parent:null,name:null,className:"",keepInViewport:!0,standalone:!1,minWidth:tc,container:this.hot.rootDocument.documentElement},this.container=this.createContainer(this.options.name),this.positioner=new Ol(this.options.keepInViewport),this.parentMenu=this.options.parent||null,this.registerEvents(),this.isSubMenu()&&this.addLocalHook("afterSelectionChange",(function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return n.parentMenu.runLocalHooks("afterSelectionChange",...t)}))}registerEvents(){let e=this.hot.rootWindow;while(e)this.eventManager.addEventListener(e.document,"mousedown",e=>this.onDocumentMouseDown(e)),this.eventManager.addEventListener(e.document,"touchstart",e=>this.onDocumentMouseDown(e)),this.eventManager.addEventListener(e.document,"contextmenu",e=>this.onDocumentContextMenu(e)),e=Object(i["getParentWindow"])(e)}setMenuItems(e){this.menuItems=e}getNavigator(){return ql(nc,this)}getKeyboardShortcutsCtrl(){return ql(rc,this)}getSelectedItem(){return this.hasSelectedItem()?this.hotMenu.getSourceDataAtRow(this.hotMenu.getSelectedLast()[0]):null}hasSelectedItem(){return Array.isArray(this.hotMenu.getSelectedLast())}isSubMenu(){return null!==this.parentMenu}open(){this.runLocalHooks("beforeOpen"),this.container.removeAttribute("style"),this.container.style.display="block";const e=Object(pi["debounce"])(e=>this.openSubMenu(e),300),t=this.options.minWidth||tc;let n=!1,r=Object(h["arrayFilter"])(this.menuItems,e=>(e.key===$a&&(n=!0),Al(e,this.hot)));if(r.length<1&&!n)r.push(il()[$a]);else if(0===r.length)return;r=kl(r,Io);let i=!1;const o={data:r,colHeaders:!1,autoColumnSize:!0,autoWrapRow:!1,modifyColWidth(e){return Object(d["isDefined"])(e)&&e<t?t:e},autoRowSize:!1,readOnly:!0,editor:!1,copyPaste:!1,hiddenRows:!0,maxCols:1,columns:[{data:"name",renderer:Ql(this.hot)}],renderAllRows:!0,fragmentSelection:!1,outsideClickDeselects:!1,disableVisualSelection:"area",layoutDirection:this.hot.isRtl()?"rtl":"ltr",ariaTags:!1,beforeOnCellMouseOver:(e,t)=>{ql(nc,this).setCurrentPage(t.row)},afterOnCellMouseOver:(t,n)=>{this.isAllSubMenusClosed()?e(n.row):this.openSubMenu(n.row)},rowHeights:e=>r[e].name===Io?1:void 0,afterOnCellContextMenu:e=>{e.preventDefault(),Object(p["isWindowsOS"])()&&i&&this.hasSelectedItem()&&this.close(!0)},afterSelection:(e,t,n,r,i)=>{this.hotMenu.view.isMouseDown()&&(i.value=!0),this.runLocalHooks("afterSelectionChange",this.getSelectedItem())},beforeOnCellMouseUp:e=>{this.hasSelectedItem()&&(i=!this.isCommandPassive(this.getSelectedItem()),this.executeCommand(e))},afterOnCellMouseUp:e=>{Object(p["isWindowsOS"])()&&Object(s["isRightClick"])(e)||!i||!this.hasSelectedItem()||(Object(p["isMobileBrowser"])()||Object(p["isIpadOS"])()?this.hot._registerTimeout(()=>this.close(!0),325):this.close(!0))},afterUnlisten:()=>{!this.hasSelectedItem()&&this.isOpened()&&this.hotMenu.listen()}};this.origOutsideClickDeselects=this.hot.getSettings().outsideClickDeselects,this.hot.getSettings().outsideClickDeselects=!1,this.hotMenu=new this.hot.constructor(this.container,o),this.hotMenu.addHook("afterInit",()=>this.onAfterInit()),this.hotMenu.init(),$l(nc,this,Ul(this.hotMenu)),$l(rc,this,Zl(this)),ql(rc,this).listen(),this.focus(),this.isSubMenu()&&this.addLocalHook("afterOpen",()=>this.parentMenu.runLocalHooks("afterSubmenuOpen",this)),this.runLocalHooks("afterOpen",this)}close(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(this.isOpened())if(e&&this.isSubMenu())this.parentMenu.close();else if(ql(nc,this).clear(),this.closeAllSubMenus(),this.container.style.display="none",this.hotMenu.destroy(),this.hotMenu=null,this.hot.getSettings().outsideClickDeselects=this.origOutsideClickDeselects,this.runLocalHooks("afterClose"),this.isSubMenu()){if(this.hot.getSettings().ariaTags){const e=this.parentMenu.hotMenu.getSelectedLast();if(e){const t=this.parentMenu.hotMenu.getCell(e[0],0);Object(i["setAttribute"])(t,[Object(R["k"])(!1)])}}this.parentMenu.hotMenu.listen()}}openSubMenu(e){if(!this.hotMenu)return!1;const t=this.hotMenu.getCell(e,0);if(this.closeAllSubMenus(),!t||!Pl(t))return!1;const n=this.hotMenu.getSourceDataAtRow(e),r=new sc(this.hot,{parent:this,name:n.name,className:this.options.className,keepInViewport:!0,container:this.options.container});return r.setMenuItems(n.submenu.items),r.open(),r.setPosition(t.getBoundingClientRect()),this.hotSubMenus[n.key]=r,this.hot.getSettings().ariaTags&&Object(i["setAttribute"])(t,[Object(R["k"])(!0)]),r}closeSubMenu(e){const t=this.hotMenu.getSourceDataAtRow(e),n=this.hotSubMenus[t.key];if(n){n.destroy(),delete this.hotSubMenus[t.key];const r=this.hotMenu.getCell(e,0);this.hot.getSettings().ariaTags&&Object(i["setAttribute"])(r,[Object(R["k"])(!1)])}}closeAllSubMenus(){Object(h["arrayEach"])(this.hotMenu.getData(),(e,t)=>this.closeSubMenu(t))}isAllSubMenusClosed(){return 0===Object.keys(this.hotSubMenus).length}focus(){this.isOpened()&&(this.hotMenu.rootElement.focus({preventScroll:!0}),this.getKeyboardShortcutsCtrl().listen(),this.hotMenu.listen())}destroy(){const e=this.container.parentNode;this.clearLocalHooks(),this.close(),this.parentMenu=null,this.eventManager.destroy(),e&&e.removeChild(this.container)}isOpened(){return null!==this.hotMenu}executeCommand(e){if(!this.isOpened()||!this.hasSelectedItem())return;const t=this.getSelectedItem();if(this.runLocalHooks("select",t,e),this.isCommandPassive(t))return;const n=this.hot.getSelectedRange(),r=n?El(n):[];this.runLocalHooks("executeCommand",t.key,r,e),this.isSubMenu()&&this.parentMenu.runLocalHooks("executeCommand",t.key,r,e)}isCommandPassive(e){return!1===e.isCommand||Ll(e)||Nl(e,this.hot)||Cl(e)}setOffset(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;this.positioner.setOffset(e,t)}setPosition(e){this.isSubMenu()&&this.positioner.setParentElement(this.parentMenu.container),this.positioner.setElement(this.container).updatePosition(e)}updateMenuDimensions(){const{wtTable:e}=this.hotMenu.view._wt,t=this.hotMenu.getSettings().data,n=e.hider.style,r=e.holder.style,s=parseInt(n.width,10),o=Object(h["arrayReduce"])(t,(e,t,n)=>{const r=this.hotMenu.getCell(n,0),s=r?Object(i["outerHeight"])(this.hotMenu.getCell(n,0)):0;return e+(t.name===Io?1:s)},0);r.width=s+3+"px",r.height=o+3+"px",n.height=r.height}createContainer(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;const t=this.options.container.ownerDocument;let n,r=e;return r&&(Object(pi["isFunction"])(r)&&(r=r.call(this.hot),r=null===r||Object(d["isUndefined"])(r)?"":r.toString()),r=r.replace(/[^A-z0-9]/g,"_"),r=`${this.options.className}Sub_${r}`,n=t.querySelector(`.${this.options.className}.${r}`)),n||(n=t.createElement("div"),Object(i["addClass"])(n,"htMenu "+this.options.className),r&&Object(i["addClass"])(n,r),this.options.container.appendChild(n)),n}onAfterInit(){this.updateMenuDimensions(),this.hot.getSettings().ariaTags&&Object(i["setAttribute"])(this.hotMenu.rootElement,[Object(R["s"])(),Object(R["L"])(-1)])}onDocumentMouseDown(e){this.isOpened()&&(this.options.standalone&&this.hotMenu&&!Object(i["isChildOf"])(e.target,this.hotMenu.rootElement)?this.close(!0):!this.isAllSubMenusClosed()&&!this.isSubMenu()||Object(i["isChildOf"])(e.target,".htMenu")||this.close(!0))}onDocumentContextMenu(e){this.isOpened()&&Object(i["hasClass"])(e.target,"htCore")&&Object(i["isChildOf"])(e.target,this.hotMenu.rootElement)&&e.preventDefault()}}function oc(e,t){ac(e,t),t.add(e)}function ac(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function lc(e,t,n){return(t=cc(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function cc(e){var t=uc(e,"string");return"symbol"==typeof t?t:t+""}function uc(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function hc(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}Object(o["mixin"])(sc,Js["a"]);const dc="contextMenu",mc=70,gc=dc;ge["a"].getSingleton().register("afterContextMenuDefaultOptions"),ge["a"].getSingleton().register("beforeContextMenuShow"),ge["a"].getSingleton().register("afterContextMenuShow"),ge["a"].getSingleton().register("afterContextMenuHide"),ge["a"].getSingleton().register("afterContextMenuExecute");var pc=new WeakSet;class fc extends qt["a"]{constructor(){super(...arguments),oc(this,pc),lc(this,"commandExecutor",new Na(this.hot)),lc(this,"itemsFactory",null),lc(this,"menu",null)}static get PLUGIN_KEY(){return dc}static get PLUGIN_PRIORITY(){return mc}static get PLUGIN_DEPS(){return["plugin:AutoColumnSize"]}static get DEFAULT_ITEMS(){return[Ga,Ja,Io,Aa,Ya,Io,Qa,ja,Io,el,Ua,Io,ka,Io,Ia]}isEnabled(){return!!this.hot.getSettings()[dc]}enablePlugin(){var e=this;if(this.enabled)return;const t=this.hot.getSettings()[dc];"function"===typeof t.callback&&this.commandExecutor.setCommonCallback(t.callback),this.menu=new sc(this.hot,{className:"htContextMenu",keepInViewport:!0,container:t.uiContainer||this.hot.rootDocument.body}),this.menu.addLocalHook("beforeOpen",()=>hc(pc,this,yc).call(this)),this.menu.addLocalHook("afterOpen",()=>hc(pc,this,Mc).call(this)),this.menu.addLocalHook("afterClose",()=>hc(pc,this,Sc).call(this)),this.menu.addLocalHook("executeCommand",(function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return e.executeCommand.call(e,...n)})),this.addHook("afterOnCellContextMenu",e=>hc(pc,this,Rc).call(this,e)),this.registerShortcuts(),super.enablePlugin()}updatePlugin(){this.disablePlugin(),this.enablePlugin(),super.updatePlugin()}disablePlugin(){this.close(),this.menu&&(this.menu.destroy(),this.menu=null),this.unregisterShortcuts(),super.disablePlugin()}registerShortcuts(){this.hot.getShortcutManager().getContext("grid").addShortcut({keys:[["Control/Meta","Shift","Backslash"],["Shift","F10"]],callback:()=>{const{highlight:e}=this.hot.getSelectedRangeLast();this.hot.scrollToFocusedCell();const t=this.hot.getCell(e.row,e.col,!0).getBoundingClientRect(),n=Wo(this.menu.container,this.hot.rootDocument);this.open({left:t.left+n.left,top:t.top+n.top-1+t.height},{left:t.width,above:-t.height}),this.menu.getNavigator().toFirstItem()},runOnlyIf:()=>{var e;const t=null===(e=this.hot.getSelectedRangeLast())||void 0===e?void 0:e.highlight;return t&&this.hot.selection.isCellVisible(t)&&!this.menu.isOpened()},group:gc})}unregisterShortcuts(){this.hot.getShortcutManager().getContext("grid").removeShortcutsByGroup(gc)}open(e){var t;let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{above:0,below:0,left:0,right:0};if(null!==(t=this.menu)&&void 0!==t&&t.isOpened())return;this.prepareMenuItems(),this.menu.open();const r=this.menu.tableBorderWidth>0;r||(n.below+=1,n.right+=1,n.above-=1,n.left-=1),Object(o["objectEach"])(n,(e,t)=>{this.menu.setOffset(t,e)}),this.menu.setPosition(e)}close(){var e;null===(e=this.menu)||void 0===e||e.close(),this.itemsFactory=null}executeCommand(e){null===this.itemsFactory&&this.prepareMenuItems();for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];this.commandExecutor.execute(e,...n)}prepareMenuItems(){this.itemsFactory=new ll(this.hot,fc.DEFAULT_ITEMS);const e=this.hot.getSettings()[dc],t={items:this.itemsFactory.getItems(e)};this.hot.runHooks("afterContextMenuDefaultOptions",t),this.itemsFactory.setPredefinedItems(t.items);const n=this.itemsFactory.getItems(e);this.hot.runHooks("beforeContextMenuSetItems",n),this.menu.setMenuItems(n),Object(h["arrayEach"])(n,e=>this.commandExecutor.registerCommand(e.key,e))}destroy(){this.close(),this.menu&&this.menu.destroy(),super.destroy()}}function Rc(e){const t=this.hot.getSettings(),n=t.rowHeaders,r=t.colHeaders;function s(e){return"TD"===e.nodeName||"TD"===e.parentNode.nodeName}const o=e.target;if(this.close(),Object(i["hasClass"])(o,"handsontableInput"))return;if(e.preventDefault(),e.stopPropagation(),!n&&!r&&!s(o)&&(!Object(i["hasClass"])(o,"current")||!Object(i["hasClass"])(o,"wtBorder")))return;const a=Wo(this.menu.container,this.hot.rootDocument);this.open({top:e.clientY+a.top,left:e.clientX+a.left})}function yc(){this.hot.runHooks("beforeContextMenuShow",this)}function Mc(){this.hot.runHooks("afterContextMenuShow",this)}function Sc(){this.hot.listen(),this.hot.runHooks("afterContextMenuHide",this)}fc.SEPARATOR={name:Io};var bc=n("3bc4");function wc(e){return{key:"copy",name(){return this.getTranslatedPhrase(Ye["CONTEXTMENU_ITEMS_COPY"])},callback(){e.copyCellsOnly()},disabled(){if(0===this.countRows()||0===this.countCols())return!0;const e=this.getSelectedRangeLast();if(!e)return!0;if(e.isSingleHeader())return!0;const t=this.getSelected();return!t||t.length>1},hidden:!1}}function Tc(e){return{key:"copy_column_headers_only",name(){const e=this.getSelectedRangeLast(),t=e?Object(nt["clamp"])(e.getWidth()-1,0,1):0;return this.getTranslatedPhrase(Ye["CONTEXTMENU_ITEMS_COPY_COLUMN_HEADERS_ONLY"],t)},callback(){e.copyColumnHeadersOnly()},disabled(){if(!this.hasColHeaders())return!0;const e=this.getSelectedRangeLast();if(!e)return!0;if(e.isSingleHeader())return!0;const t=this.getSelected();return!t||t.length>1},hidden:!1}}function Oc(e){return{key:"copy_with_column_group_headers",name(){const e=this.getSelectedRangeLast(),t=e?Object(nt["clamp"])(e.getWidth()-1,0,1):0;return this.getTranslatedPhrase(Ye["CONTEXTMENU_ITEMS_COPY_WITH_COLUMN_GROUP_HEADERS"],t)},callback(){e.copyWithAllColumnHeaders()},disabled(){if(!this.hasColHeaders()||!this.getSettings().nestedHeaders)return!0;const e=this.getSelectedRangeLast();if(!e)return!0;if(e.isSingleHeader())return!0;const t=this.getSelected();return!t||t.length>1},hidden:!1}}function vc(e){return{key:"copy_with_column_headers",name(){const e=this.getSelectedRangeLast(),t=e?Object(nt["clamp"])(e.getWidth()-1,0,1):0;return this.getTranslatedPhrase(Ye["CONTEXTMENU_ITEMS_COPY_WITH_COLUMN_HEADERS"],t)},callback(){e.copyWithColumnHeaders()},disabled(){if(!this.hasColHeaders())return!0;const e=this.getSelectedRangeLast();if(!e)return!0;if(e.isSingleHeader())return!0;const t=this.getSelected();return!t||t.length>1},hidden:!1}}function Ec(e){return{key:"cut",name(){return this.getTranslatedPhrase(Ye["CONTEXTMENU_ITEMS_CUT"])},callback(){e.cut()},disabled(){if(0===this.countRows()||0===this.countCols())return!0;const e=this.getSelectedRangeLast();if(!e)return!0;if(e.isSingleHeader())return!0;const t=this.getSelected();return!t||t.length>1},hidden:!1}}class Cc{constructor(){this.data={}}setData(e,t){this.data[e]=t}getData(e){return this.data[e]||void 0}}class Lc{constructor(){this.clipboardData=new Cc}preventDefault(){}}function Nc(e,t){Ic(e,t),t.add(e)}function _c(e,t,n){Ic(e,t),t.set(e,n)}function Ic(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Pc(e,t){return e.get(Dc(e,t))}function xc(e,t,n){return e.set(Dc(e,t),n),n}function Dc(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}var Ac=new WeakMap,Fc=new WeakMap,Yc=new WeakMap,Hc=new WeakMap,kc=new WeakMap,Vc=new WeakMap,Uc=new WeakSet;class Wc{constructor(e){let{countRows:t,countColumns:n,rowsLimit:r,columnsLimit:i,countColumnHeaders:s}=e;Nc(this,Uc),_c(this,Ac,void 0),_c(this,Fc,void 0),_c(this,Yc,void 0),_c(this,Hc,void 0),_c(this,kc,void 0),_c(this,Vc,void 0),xc(Fc,this,t),xc(Yc,this,n),xc(Hc,this,r),xc(kc,this,i),xc(Vc,this,s)}setSelectedRange(e){xc(Ac,this,e)}getCellsRange(){if(0===Pc(Fc,this).call(this)||0===Pc(Yc,this).call(this))return null;const{row:e,col:t}=Pc(Ac,this).getTopStartCorner(),{row:n,col:r}=Pc(Ac,this).getBottomEndCorner(),i=Dc(Uc,this,jc).call(this,e,n),s=Dc(Uc,this,Xc).call(this,t,r),o=n!==i||r!==s;return{isRangeTrimmed:o,startRow:e,startCol:t,endRow:i,endCol:s}}getMostBottomColumnHeadersRange(){if(0===Pc(Yc,this).call(this)||0===Pc(Vc,this).call(this))return null;const{col:e}=Pc(Ac,this).getTopStartCorner(),{col:t}=Pc(Ac,this).getBottomEndCorner(),n=Dc(Uc,this,Xc).call(this,e,t),r=t!==n;return{isRangeTrimmed:r,startRow:-1,startCol:e,endRow:-1,endCol:n}}getAllColumnHeadersRange(){if(0===Pc(Yc,this).call(this)||0===Pc(Vc,this).call(this))return null;const{col:e}=Pc(Ac,this).getTopStartCorner(),{col:t}=Pc(Ac,this).getBottomEndCorner(),n=Dc(Uc,this,Xc).call(this,e,t),r=t!==n;return{isRangeTrimmed:r,startRow:-Pc(Vc,this).call(this),startCol:e,endRow:-1,endCol:n}}}function Xc(e,t){return Math.min(t,Math.max(e+Pc(kc,this).call(this)-1,e))}function jc(e,t){return Math.min(t,Math.max(e+Pc(Hc,this).call(this)-1,e))}function Zc(e){const t=[],n=[];return Object(h["arrayEach"])(e,e=>{const r=Math.min(e.startRow,e.endRow),i=Math.max(e.startRow,e.endRow);Object(nt["rangeEach"])(r,i,e=>{-1===t.indexOf(e)&&t.push(e)});const s=Math.min(e.startCol,e.endCol),o=Math.max(e.startCol,e.endCol);Object(nt["rangeEach"])(s,o,e=>{-1===n.indexOf(e)&&n.push(e)})}),{rows:t,columns:n}}var Qc=n("a776");function Kc(e,t){Bc(e,t),t.add(e)}function Gc(e,t,n){Bc(e,t),t.set(e,n)}function Bc(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Jc(e,t,n){return(t=zc(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function zc(e){var t=$c(e,"string");return"symbol"==typeof t?t:t+""}function $c(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function qc(e,t){return e.get(tu(e,t))}function eu(e,t,n){return e.set(tu(e,t),n),n}function tu(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}ge["a"].getSingleton().register("afterCopyLimit"),ge["a"].getSingleton().register("modifyCopyableRange"),ge["a"].getSingleton().register("beforeCut"),ge["a"].getSingleton().register("afterCut"),ge["a"].getSingleton().register("beforePaste"),ge["a"].getSingleton().register("afterPaste"),ge["a"].getSingleton().register("beforeCopy"),ge["a"].getSingleton().register("afterCopy");const nu="copyPaste",ru=80,iu=["fragmentSelection"],su=['<meta name="generator" content="Handsontable"/>','<style type="text/css">td{white-space:normal}br{mso-data-placement:same-cell}</style>'].join("");var ou=new WeakMap,au=new WeakMap,lu=new WeakMap,cu=new WeakMap,uu=new WeakMap,hu=new WeakMap,du=new WeakMap,mu=new WeakMap,gu=new WeakSet;class pu extends qt["a"]{constructor(){super(...arguments),Kc(this,gu),Jc(this,"columnsLimit",1/0),Jc(this,"rowsLimit",1/0),Jc(this,"pasteMode","overwrite"),Jc(this,"uiContainer",this.hot.rootDocument.body),Gc(this,ou,!1),Gc(this,au,!1),Gc(this,lu,!1),Gc(this,cu,"cells-only"),Gc(this,uu,!1),Gc(this,hu,!1),Gc(this,du,new Wc({countRows:()=>this.hot.countRows(),countColumns:()=>this.hot.countCols(),rowsLimit:()=>this.rowsLimit,columnsLimit:()=>this.columnsLimit,countColumnHeaders:()=>this.hot.view.getColumnHeadersCount()})),Gc(this,mu,!1),Jc(this,"copyableRanges",[])}static get PLUGIN_KEY(){return nu}static get SETTING_KEYS(){return[nu,...iu]}static get PLUGIN_PRIORITY(){return ru}isEnabled(){return!!this.hot.getSettings()[nu]}enablePlugin(){var e=this;if(this.enabled)return;const{[nu]:t}=this.hot.getSettings();var n,r;"object"===typeof t&&(this.pasteMode=null!==(n=t.pasteMode)&&void 0!==n?n:this.pasteMode,this.rowsLimit=isNaN(t.rowsLimit)?this.rowsLimit:t.rowsLimit,this.columnsLimit=isNaN(t.columnsLimit)?this.columnsLimit:t.columnsLimit,eu(ou,this,!!t.copyColumnHeaders),eu(au,this,!!t.copyColumnGroupHeaders),eu(lu,this,!!t.copyColumnHeadersOnly),this.uiContainer=null!==(r=t.uiContainer)&&void 0!==r?r:this.uiContainer);this.addHook("afterContextMenuDefaultOptions",e=>tu(gu,this,Su).call(this,e)),this.addHook("afterSelection",(function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return tu(gu,e,bu).call(e,...n)})),this.addHook("afterSelectionEnd",()=>tu(gu,this,wu).call(this)),this.eventManager.addEventListener(this.hot.rootDocument,"copy",(function(){return e.onCopy(...arguments)})),this.eventManager.addEventListener(this.hot.rootDocument,"cut",(function(){return e.onCut(...arguments)})),this.eventManager.addEventListener(this.hot.rootDocument,"paste",(function(){return e.onPaste(...arguments)})),Object(p["isSafari"])()&&(this.eventManager.addEventListener(this.hot.rootDocument.body,"mouseenter",(function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return tu(gu,e,Tu).call(e,...n)})),this.eventManager.addEventListener(this.hot.rootDocument.body,"mouseleave",(function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return tu(gu,e,Ou).call(e,...n)})),this.addHook("afterSelection",()=>tu(gu,this,vu).call(this))),super.enablePlugin()}updatePlugin(){this.disablePlugin(),this.enablePlugin(),super.updatePlugin()}disablePlugin(){super.disablePlugin()}copy(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"cells-only";eu(cu,this,e),eu(uu,this,!0),tu(gu,this,fu).call(this,"copy")}copyCellsOnly(){this.copy("cells-only")}copyColumnHeadersOnly(){this.copy("column-headers-only")}copyWithAllColumnHeaders(){this.copy("with-column-group-headers")}copyWithColumnHeaders(){this.copy("with-column-headers")}cut(){eu(hu,this,!0),tu(gu,this,fu).call(this,"cut")}getRangedCopyableData(e){return Object(bc["b"])(this.getRangedData(e))}getRangedData(e){const t=[],{rows:n,columns:r}=Zc(e);return Object(h["arrayEach"])(n,e=>{const n=[];Object(h["arrayEach"])(r,t=>{e<0?n.push(this.hot.getColHeader(t,e)):n.push(this.hot.getCopyableData(e,t))}),t.push(n)}),t}paste(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e;if(!e&&!t)return;const n=new Lc;e&&n.clipboardData.setData("text/plain",e),t&&n.clipboardData.setData("text/html",t),this.onPaste(n)}setCopyableText(){const e=this.hot.getSelectedRangeLast();if(!e)return;if(e.isSingleHeader())return void(this.copyableRanges=[]);qc(du,this).setSelectedRange(e);const t=new Map([["headers",null],["cells",null]]);"column-headers-only"===qc(cu,this)?t.set("headers",qc(du,this).getMostBottomColumnHeadersRange()):("with-column-headers"===qc(cu,this)?t.set("headers",qc(du,this).getMostBottomColumnHeadersRange()):"with-column-group-headers"===qc(cu,this)&&t.set("headers",qc(du,this).getAllColumnHeadersRange()),t.set("cells",qc(du,this).getCellsRange())),this.copyableRanges=Array.from(t.values()).filter(e=>null!==e).map(e=>{let{startRow:t,startCol:n,endRow:r,endCol:i}=e;return{startRow:t,startCol:n,endRow:r,endCol:i}}),this.copyableRanges=this.hot.runHooks("modifyCopyableRange",this.copyableRanges);const n=t.get("cells");if(null!==n&&n.isRangeTrimmed){const{startRow:e,startCol:t,endRow:r,endCol:i}=n;this.hot.runHooks("afterCopyLimit",r-e+1,i-t+1,this.rowsLimit,this.columnsLimit)}}isEditorOpened(){var e;return null===(e=this.hot.getActiveEditor())||void 0===e?void 0:e.isOpened()}populateValues(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.hot.getSelectedRangeLast();if(!e.length)return;const n=e.length,r=e[0].length,i=[],{row:s,col:o}=t.getTopStartCorner(),{row:a,col:l}=t.getBottomEndCorner();let c=s,u=o,h=s,d=o;while(i.length<n||c<=a){const{skipRowOnPaste:t,visualRow:a}=this.hot.getCellMeta(c,o);if(c=a+1,!0===t)continue;h=a,u=o;const m=[],g=i.length%n;while(m.length<r||u<=l){const{skipColumnOnPaste:t,visualCol:n}=this.hot.getCellMeta(s,u);if(u=n+1,!0===t)continue;d=n;const i=m.length%r;m.push(e[g][i])}i.push(m)}return eu(mu,this,!0),this.hot.populateFromArray(s,o,i,void 0,void 0,"CopyPaste.paste",this.pasteMode),[s,o,h,d]}onCopy(e){var t;const n=this.hot.getFocusManager().getRefocusElement(),r=null===(t=e.target)||void 0===t?void 0:t.hasAttribute("data-hot-input");if(!this.hot.isListening()&&!qc(uu,this)||this.isEditorOpened()||e.target instanceof HTMLElement&&(r&&e.target!==n||!r&&e.target!==this.hot.rootDocument.body))return;e.preventDefault(),this.setCopyableText(),eu(uu,this,!1);const i=this.getRangedData(this.copyableRanges),s=tu(gu,this,Ru).call(this,this.copyableRanges),o=!!this.hot.runHooks("beforeCopy",i,this.copyableRanges,s);if(o){const t=Object(bc["b"])(i);if(e&&e.clipboardData){const n=Object(Qc["_dataToHTML"])(i,this.hot.rootDocument);e.clipboardData.setData("text/plain",t),e.clipboardData.setData("text/html",[su,n].join(""))}else"undefined"===typeof ClipboardEvent&&this.hot.rootWindow.clipboardData.setData("Text",t);this.hot.runHooks("afterCopy",i,this.copyableRanges,s)}eu(cu,this,"cells-only")}onCut(e){var t;const n=this.hot.getFocusManager().getRefocusElement(),r=null===(t=e.target)||void 0===t?void 0:t.hasAttribute("data-hot-input");if(!this.hot.isListening()&&!qc(hu,this)||this.isEditorOpened()||e.target instanceof HTMLElement&&(r&&e.target!==n||!r&&e.target!==this.hot.rootDocument.body))return;e.preventDefault(),this.setCopyableText(),eu(hu,this,!1);const i=this.getRangedData(this.copyableRanges),s=!!this.hot.runHooks("beforeCut",i,this.copyableRanges);if(s){const t=Object(bc["b"])(i);if(e&&e.clipboardData){const n=Object(Qc["_dataToHTML"])(i,this.hot.rootDocument);e.clipboardData.setData("text/plain",t),e.clipboardData.setData("text/html",[su,n].join(""))}else"undefined"===typeof ClipboardEvent&&this.hot.rootWindow.clipboardData.setData("Text",t);this.hot.emptySelectedCells("CopyPaste.cut"),this.hot.runHooks("afterCut",i,this.copyableRanges)}}onPaste(e){var t;const n=this.hot.getFocusManager().getRefocusElement(),r=null===(t=e.target)||void 0===t?void 0:t.hasAttribute("data-hot-input");if(!this.hot.isListening()||this.isEditorOpened()||!this.hot.getSelected()||e.target instanceof HTMLElement&&(r&&e.target!==n||!r&&e.target!==this.hot.rootDocument.body))return;let i;if(e.preventDefault(),e&&"undefined"!==typeof e.clipboardData){const t=Object(m["sanitize"])(e.clipboardData.getData("text/html"),{ADD_TAGS:["meta"],ADD_ATTR:["content"],FORCE_BODY:!0});if(t&&/(<table)|(<TABLE)/g.test(t)){const e=Object(Qc["htmlToGridSettings"])(t,this.hot.rootDocument);i=e.data}else i=e.clipboardData.getData("text/plain")}else"undefined"===typeof ClipboardEvent&&"undefined"!==typeof this.hot.rootWindow.clipboardData&&(i=this.hot.rootWindow.clipboardData.getData("Text"));if("string"===typeof i&&(i=Object(bc["a"])(i)),void 0===i||i&&0===i.length)return;if(!1===this.hot.runHooks("beforePaste",i,this.copyableRanges))return;const[s,o,a,l]=this.populateValues(i);this.hot.selectCell(s,o,Math.min(this.hot.countRows()-1,a),Math.min(this.hot.countCols()-1,l)),this.hot.runHooks("afterPaste",i,this.copyableRanges)}destroy(){super.destroy()}}function fu(e){if(Object(p["isSafari"])()){const t=this.hot.getSelectedRangeLast();if(t){const{row:n,col:r}=t.highlight,s=this.hot.getCell(n,r,!0);s&&Object(i["runWithSelectedContendEditableElement"])(s,()=>{this.hot.rootDocument.execCommand(e)})}}else this.hot.rootDocument.execCommand(e)}function Ru(e){const{rows:t}=Zc(e);let n=0;for(let r=0;r<t.length;r++){if(t[r]>=0)break;n+=1}return{columnHeadersCount:n}}function yu(){if(this.hot.isListening()){const e=this.hot.getSelectedRangeLast();if(e){const{row:t,col:n}=e.highlight,r=this.hot.getCell(t,n,!0);r&&Object(i["makeElementContentEditableAndSelectItsContent"])(r)}}}function Mu(){if(this.hot.isListening()){const e=this.hot.getSelectedRangeLast();if(e){const{row:t,col:n}=e.highlight,r=this.hot.getCell(t,n,!0);null!==r&&void 0!==r&&r.hasAttribute("contenteditable")&&Object(i["removeContentEditableFromElementAndDeselect"])(r)}}}function Su(e){e.items.push({name:"---------"},wc(this)),qc(ou,this)&&e.items.push(vc(this)),qc(au,this)&&e.items.push(Oc(this)),qc(lu,this)&&e.items.push(Tc(this)),e.items.push(Ec(this))}function bu(e,t,n,r,i){qc(mu,this)&&(i.value=!0),eu(mu,this,!1)}function wu(){this.isEditorOpened()||this.hot.getSettings().fragmentSelection||this.setCopyableText()}function Tu(){tu(gu,this,Mu).call(this)}function Ou(){tu(gu,this,yu).call(this)}function vu(){tu(gu,this,Mu).call(this)}function Eu(e,t){return`border_row${e}col${t}`}function Cu(){return{width:1,color:"#000"}}function Lu(){return{hide:!0}}function Nu(){return{width:1,color:"#000",cornerVisible:!1}}function _u(e){var t,n;(Object(d["isDefined"])(e.start)||Object(d["isDefined"])(e.left))&&(e.start=null!==(t=e.start)&&void 0!==t?t:e.left);(Object(d["isDefined"])(e.end)||Object(d["isDefined"])(e.right))&&(e.end=null!==(n=e.end)&&void 0!==n?n:e.right);return delete e.left,delete e.right,e}function Iu(e){return Object(d["isDefined"])(e.start)&&(e.left=e.start),Object(d["isDefined"])(e.end)&&(e.right=e.end),e}function Pu(e,t){return{id:Eu(e,t),border:Nu(),row:e,col:t,top:Lu(),bottom:Lu(),start:Lu(),end:Lu()}}function xu(e,t){return Object(o["hasOwnProperty"])(t,"border")&&t.border&&(e.border=t.border),Object(o["hasOwnProperty"])(t,"top")&&Object(d["isDefined"])(t.top)&&(t.top?(Object(o["isObject"])(t.top)||(t.top=Cu()),e.top=t.top):(t.top=Lu(),e.top=t.top)),Object(o["hasOwnProperty"])(t,"bottom")&&Object(d["isDefined"])(t.bottom)&&(t.bottom?(Object(o["isObject"])(t.bottom)||(t.bottom=Cu()),e.bottom=t.bottom):(t.bottom=Lu(),e.bottom=t.bottom)),Object(o["hasOwnProperty"])(t,"start")&&Object(d["isDefined"])(t.start)&&(t.start?(Object(o["isObject"])(t.start)||(t.start=Cu()),e.start=t.start):(t.start=Lu(),e.start=t.start)),Object(o["hasOwnProperty"])(t,"end")&&Object(d["isDefined"])(t.end)&&(t.end?(Object(o["isObject"])(t.end)||(t.end=Cu()),e.end=t.end):(t.end=Lu(),e.end=t.end)),e}function Du(e,t){let n=!1;return Object(h["arrayEach"])(e.getSelectedRange(),r=>{r.forAll((r,i)=>{if(r<0||i<0)return;const s=e.getCellMeta(r,i).borders;if(s){if(!t)return n=!0,!1;if(!Object(o["hasOwnProperty"])(s[t],"hide")||!1===s[t].hide)return n=!0,!1}})}),n}function Au(e){return`<span class="selected">${String.fromCharCode(10003)}</span>${e}`}function Fu(e){return e.some(e=>Object(d["isDefined"])(e.left)||Object(d["isDefined"])(e.right))}function Yu(e){return e.some(e=>Object(d["isDefined"])(e.start)||Object(d["isDefined"])(e.end))}const Hu=new Map([["left","start"],["right","end"]]);function ku(e){var t;return null!==(t=Hu.get(e))&&void 0!==t?t:e}function Vu(e){return{key:"borders:top",name(){let e=this.getTranslatedPhrase(Ye["CONTEXTMENU_ITEMS_BORDERS_TOP"]);const t=Du(this,"top");return t&&(e=Au(e)),e},callback(t,n){const r=Du(this,"top");e.prepareBorder(n,"top",r)}}}function Uu(e){const t=e.hot.isRtl()?"start":"end";return{key:"borders:right",name(){let e=this.getTranslatedPhrase(Ye["CONTEXTMENU_ITEMS_BORDERS_RIGHT"]);const n=Du(this,t);return n&&(e=Au(e)),e},callback(n,r){const i=Du(this,t);e.prepareBorder(r,t,i)}}}function Wu(e){return{key:"borders:bottom",name(){let e=this.getTranslatedPhrase(Ye["CONTEXTMENU_ITEMS_BORDERS_BOTTOM"]);const t=Du(this,"bottom");return t&&(e=Au(e)),e},callback(t,n){const r=Du(this,"bottom");e.prepareBorder(n,"bottom",r)}}}function Xu(e){const t=e.hot.isRtl()?"end":"start";return{key:"borders:left",name(){let e=this.getTranslatedPhrase(Ye["CONTEXTMENU_ITEMS_BORDERS_LEFT"]);const n=Du(this,t);return n&&(e=Au(e)),e},callback(n,r){const i=Du(this,t);e.prepareBorder(r,t,i)}}}function ju(e){return{key:"borders:no_borders",name(){return this.getTranslatedPhrase(Ye["CONTEXTMENU_ITEMS_REMOVE_BORDERS"])},callback(t,n){e.prepareBorder(n,"noBorders")},disabled(){return!Du(this)}}}function Zu(e,t){Qu(e,t),t.add(e)}function Qu(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Ku(e,t,n){return(t=Gu(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Gu(e){var t=Bu(e,"string");return"symbol"==typeof t?t:t+""}function Bu(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function Ju(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}const zu="customBorders",$u=90;var qu=new WeakSet;class eh extends qt["a"]{constructor(){super(...arguments),Zu(this,qu),Ku(this,"savedBorders",[])}static get PLUGIN_KEY(){return zu}static get PLUGIN_PRIORITY(){return $u}isEnabled(){return!!this.hot.getSettings()[zu]}enablePlugin(){this.enabled||(this.addHook("afterContextMenuDefaultOptions",e=>Ju(qu,this,th).call(this,e)),this.addHook("init",()=>Ju(qu,this,nh).call(this)),super.enablePlugin())}disablePlugin(){this.hideBorders(),super.disablePlugin()}updatePlugin(){this.disablePlugin(),this.enablePlugin(),this.changeBorderSettings(),super.updatePlugin()}setBorders(e,t){let n=["top","bottom","start","end"],r=null;t&&(this.checkSettingsCohesion([t]),n=Object.keys(t),r=_u(t));const i=Object(Xa["c"])(e),s=Object(Xa["d"])(i,{createCellCoords:this.hot._createCellCoords.bind(this.hot),createCellRange:this.hot._createCellRange.bind(this.hot)});Object(h["arrayEach"])(e,e=>{s(e).forAll((e,t)=>{Object(h["arrayEach"])(n,n=>{this.prepareBorderFromCustomAdded(e,t,r,ku(n))})})}),this.hot.view.render()}getBorders(e){if(!Array.isArray(e))return this.savedBorders;const t=Object(Xa["c"])(e),n=Object(Xa["d"])(t,{createCellCoords:this.hot._createCellCoords.bind(this.hot),createCellRange:this.hot._createCellRange.bind(this.hot)}),r=[];return Object(h["arrayEach"])(e,e=>{n(e).forAll((e,t)=>{Object(h["arrayEach"])(this.savedBorders,n=>{n.row===e&&n.col===t&&r.push(Iu(n))})})}),r}clearBorders(e){e?this.setBorders(e):(Object(h["arrayEach"])(this.savedBorders,e=>{this.clearBordersFromSelectionSettings(e.id),this.clearNullCellRange(),this.hot.removeCellMeta(e.row,e.col,"borders")}),this.savedBorders.length=0)}insertBorderIntoSettings(e,t){const n=this.checkSavedBorders(e);n||this.savedBorders.push(e);const r=this.hot._createCellRange(this.hot._createCellCoords(e.row,e.col)),i=this.checkCustomSelections(e,r,t);i||this.hot.selection.highlight.addCustomSelection({border:e,visualCellRange:r})}prepareBorderFromCustomAdded(e,t,n,r){const i=this.hot.countRows(),s=this.hot.countCols();if(e>=i||t>=s)return;let o=Pu(e,t);n&&(o=xu(o,n),Object(h["arrayEach"])(this.hot.selection.highlight.customSelections,e=>{if(o.id===e.settings.id)return Object.assign(e.settings,n),o.id=e.settings.id,o.top=e.settings.top,o.bottom=e.settings.bottom,o.start=e.settings.start,o.end=e.settings.end,!1})),this.hot.setCellMeta(e,t,"borders",Iu(o)),this.insertBorderIntoSettings(o,r)}prepareBorderFromCustomAddedRange(e,t){const n=Math.min(e.to.row,this.hot.countRows()-1),r=Math.min(e.to.col,this.hot.countCols()-1);Object(nt["rangeEach"])(e.from.row,n,n=>{Object(nt["rangeEach"])(e.from.col,r,r=>{const i=Pu(n,r);let s=0;n===e.from.row&&Object(o["hasOwnProperty"])(t,"top")&&(s+=1,i.top=t.top),n===e.to.row&&Object(o["hasOwnProperty"])(t,"bottom")&&(s+=1,i.bottom=t.bottom),r===e.from.col&&Object(o["hasOwnProperty"])(t,"start")&&(s+=1,i.start=t.start),r===e.to.col&&Object(o["hasOwnProperty"])(t,"end")&&(s+=1,i.end=t.end),s>0&&(this.hot.setCellMeta(n,r,"borders",Iu(i)),this.insertBorderIntoSettings(i))})})}removeAllBorders(e,t){const n=Eu(e,t);this.spliceBorder(n),this.clearBordersFromSelectionSettings(n),this.clearNullCellRange(),this.hot.removeCellMeta(e,t,"borders")}setBorder(e,t,n,r){let i=this.hot.getCellMeta(e,t).borders;if(i=i&&void 0!==i.border?_u(i):Pu(e,t),r){i[n]=Lu();const s=this.countHide(i);if(4===s)this.removeAllBorders(e,t);else{const s=this.checkCustomSelectionsFromContextMenu(i,n,r);s||this.insertBorderIntoSettings(i),this.hot.setCellMeta(e,t,"borders",Iu(i))}}else{i[n]=Cu();const s=this.checkCustomSelectionsFromContextMenu(i,n,r);s||this.insertBorderIntoSettings(i),this.hot.setCellMeta(e,t,"borders",Iu(i))}}prepareBorder(e,t,n){Object(h["arrayEach"])(e,e=>{let{start:r,end:i}=e;if(r.row===i.row&&r.col===i.col)"noBorders"===t?this.removeAllBorders(r.row,r.col):this.setBorder(r.row,r.col,t,n);else switch(t){case"noBorders":Object(nt["rangeEach"])(r.col,i.col,e=>{Object(nt["rangeEach"])(r.row,i.row,t=>{this.removeAllBorders(t,e)})});break;case"top":Object(nt["rangeEach"])(r.col,i.col,e=>{this.setBorder(r.row,e,t,n)});break;case"bottom":Object(nt["rangeEach"])(r.col,i.col,e=>{this.setBorder(i.row,e,t,n)});break;case"start":Object(nt["rangeEach"])(r.row,i.row,e=>{this.setBorder(e,r.col,t,n)});break;case"end":Object(nt["rangeEach"])(r.row,i.row,e=>{this.setBorder(e,i.col,t,n)});break;default:break}})}createCustomBorders(e){Object(h["arrayEach"])(e,e=>{const t=_u(e);e.range?this.prepareBorderFromCustomAddedRange(e.range,t):this.prepareBorderFromCustomAdded(e.row,e.col,t)})}countHide(e){const{top:t,bottom:n,start:r,end:i}=e,s=[t,n,r,i];return Object(h["arrayReduce"])(s,(e,t)=>{let n=e;return t&&t.hide&&(n+=1),n},0)}clearBordersFromSelectionSettings(e){const t=Object(h["arrayMap"])(this.hot.selection.highlight.customSelections,e=>e.settings.id).indexOf(e);t>-1&&this.hot.selection.highlight.customSelections[t].clear()}clearNullCellRange(){Object(h["arrayEach"])(this.hot.selection.highlight.customSelections,(e,t)=>{if(null===e.cellRange)return this.hot.selection.highlight.customSelections[t].destroy(),this.hot.selection.highlight.customSelections.splice(t,1),!1})}hideBorders(){Object(h["arrayEach"])(this.savedBorders,e=>{this.clearBordersFromSelectionSettings(e.id),this.clearNullCellRange()})}spliceBorder(e){const t=Object(h["arrayMap"])(this.savedBorders,e=>e.id).indexOf(e);t>-1&&this.savedBorders.splice(t,1)}checkSavedBorders(e){let t=!1;const n=this.countHide(e);return 4===n?(this.spliceBorder(e.id),t=!0):Object(h["arrayEach"])(this.savedBorders,(n,r)=>{if(e.id===n.id)return this.savedBorders[r]=e,t=!0,!1}),t}checkCustomSelectionsFromContextMenu(e,t,n){let r=!1;return Object(h["arrayEach"])(this.hot.selection.highlight.customSelections,i=>{if(e.id===i.settings.id){const e=this.hot.view._wt.selectionManager.getBorderInstances(i);return Object(h["arrayEach"])(e,e=>{e.toggleHiddenClass(t,n)}),r=!0,!1}}),r}checkCustomSelections(e,t,n){const r=this.countHide(e);let i=!1;return 4===r?(this.removeAllBorders(e.row,e.col),i=!0):Object(h["arrayEach"])(this.hot.selection.highlight.customSelections,r=>{if(e.id===r.settings.id){if(r.visualCellRange=t,r.commit(),n){const t=this.hot.view._wt.selectionManager.getBorderInstances(r);Object(h["arrayEach"])(t,t=>{t.changeBorderStyle(n,e)})}return i=!0,!1}}),i}changeBorderSettings(){const e=this.hot.getSettings()[zu];if(Array.isArray(e)){const t=Object(o["deepClone"])(e);this.checkSettingsCohesion(t),t.length||(this.savedBorders=t),this.createCustomBorders(t)}else void 0!==e&&this.createCustomBorders(this.savedBorders)}checkSettingsCohesion(e){const t=Fu(e),n=Yu(e);if(t&&n)throw new Error('The "left"/"right" and "start"/"end" options should not be used together. Please use only the option "start"/"end".');if(this.hot.isRtl()&&t)throw new Error('The "left"/"right" properties are not supported for RTL. Please use option "start"/"end".')}destroy(){super.destroy()}}function th(e){this.hot.getSettings()[zu]&&e.items.push({name:"---------"},{key:"borders",name(){return this.getTranslatedPhrase(Ye["CONTEXTMENU_ITEMS_BORDERS"])},disabled(){const e=this.getSelectedRangeLast();return!e||(!!e.isSingleHeader()||this.selection.isSelectedByCorner())},submenu:{items:[Vu(this),Uu(this),Wu(this),Xu(this),ju(this)]}})}function nh(){this.changeBorderSettings()}function rh(e,t){ih(e,t),t.add(e)}function ih(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function sh(e,t,n){return(t=oh(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function oh(e){var t=ah(e,"string");return"symbol"==typeof t?t:t+""}function ah(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function lh(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}const ch="dragToScroll",uh=100;var hh=new WeakSet;class dh extends qt["a"]{constructor(){super(...arguments),rh(this,hh),sh(this,"boundaries",null),sh(this,"callback",null),sh(this,"listening",!1)}static get PLUGIN_KEY(){return ch}static get PLUGIN_PRIORITY(){return uh}isEnabled(){return!!this.hot.getSettings()[ch]}enablePlugin(){this.enabled||(this.addHook("afterOnCellMouseDown",e=>lh(hh,this,mh).call(this,e)),this.addHook("afterOnCellCornerMouseDown",e=>lh(hh,this,mh).call(this,e)),this.registerEvents(),super.enablePlugin())}updatePlugin(){this.disablePlugin(),this.enablePlugin(),super.updatePlugin()}disablePlugin(){this.unregisterEvents(),super.disablePlugin()}setBoundaries(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{left:0,right:this.hot.rootWindow.innerWidth,top:0,bottom:this.hot.rootWindow.innerHeight};this.boundaries=e}setCallback(e){this.callback=e}check(e,t){let n=0,r=0;t<this.boundaries.top?r=t-this.boundaries.top:t>this.boundaries.bottom&&(r=t-this.boundaries.bottom),e<this.boundaries.left?n=e-this.boundaries.left:e>this.boundaries.right&&(n=e-this.boundaries.right),this.callback(n,r)}listen(){this.listening=!0}unlisten(){this.listening=!1}isListening(){return this.listening}registerEvents(){const{rootWindow:e}=this.hot;let t=e;while(t)this.eventManager.addEventListener(t.document,"contextmenu",()=>this.unlisten()),this.eventManager.addEventListener(t.document,"mouseup",()=>this.unlisten()),this.eventManager.addEventListener(t.document,"mousemove",e=>this.onMouseMove(e)),t=Object(i["getParentWindow"])(t)}unregisterEvents(){this.eventManager.clear()}onMouseMove(e){this.isListening()&&this.check(e.clientX,e.clientY)}destroy(){super.destroy()}}function mh(e){if(Object(s["isRightClick"])(e))return;const t=this.hot.view._wt.wtOverlays.topOverlay.mainTableScrollableElement;this.setBoundaries(t!==this.hot.rootWindow?t.getBoundingClientRect():void 0),this.setCallback((e,n)=>{var r,i;const s=null!==(r=t.scrollLeft)&&void 0!==r?r:t.scrollX,o=null!==(i=t.scrollTop)&&void 0!==i?i:t.scrollY;t.scroll(s+50*Math.sign(e),o+20*Math.sign(n))}),this.listen()}function gh(e,t){fh(e,t),t.add(e)}function ph(e,t,n){fh(e,t),t.set(e,n)}function fh(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Rh(e,t,n){return(t=yh(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function yh(e){var t=Mh(e,"string");return"symbol"==typeof t?t:t+""}function Mh(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function Sh(e,t){return e.get(wh(e,t))}function bh(e,t,n){return e.set(wh(e,t),n),n}function wh(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}ge["a"].getSingleton().register("afterDropdownMenuDefaultOptions"),ge["a"].getSingleton().register("beforeDropdownMenuShow"),ge["a"].getSingleton().register("afterDropdownMenuShow"),ge["a"].getSingleton().register("afterDropdownMenuHide"),ge["a"].getSingleton().register("afterDropdownMenuExecute");const Th="dropdownMenu",Oh=230,vh="changeType",Eh=Th;var Ch=new WeakMap,Lh=new WeakSet;class Nh extends qt["a"]{static get PLUGIN_KEY(){return Th}static get PLUGIN_PRIORITY(){return Oh}static get PLUGIN_DEPS(){return["plugin:AutoColumnSize"]}static get DEFAULT_ITEMS(){return[Aa,Ya,Io,ja,Io,xa,Io,ka,Io,Ia]}constructor(e){super(e),gh(this,Lh),Rh(this,"commandExecutor",new Na(this.hot)),Rh(this,"itemsFactory",null),Rh(this,"menu",null),ph(this,Ch,!1),this.hot.addHook("afterGetColHeader",(e,t)=>wh(Lh,this,Ph).call(this,e,t))}isEnabled(){return this.hot.getSettings()[Th]}enablePlugin(){var e=this;if(this.enabled)return;this.itemsFactory=new ll(this.hot,Nh.DEFAULT_ITEMS),this.addHook("beforeOnCellMouseDown",(function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return wh(Lh,e,Hh).call(e,...n)})),this.addHook("beforeViewportScrollHorizontally",(function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return wh(Lh,e,Yh).call(e,...n)}));const t=this.hot.getSettings()[Th],n={items:this.itemsFactory.getItems(t)};this.registerEvents(),"function"===typeof t.callback&&this.commandExecutor.setCommonCallback(t.callback),this.registerShortcuts(),super.enablePlugin(),this.callOnPluginsReady(()=>{this.hot.runHooks("afterDropdownMenuDefaultOptions",n),this.itemsFactory.setPredefinedItems(n.items);const r=this.itemsFactory.getItems(t);this.menu&&this.menu.destroy(),this.menu=new sc(this.hot,{className:"htDropdownMenu",keepInViewport:!0,container:t.uiContainer||this.hot.rootDocument.body}),this.hot.runHooks("beforeDropdownMenuSetItems",r),this.menu.setMenuItems(r),this.menu.addLocalHook("beforeOpen",()=>wh(Lh,this,xh).call(this)),this.menu.addLocalHook("afterOpen",()=>wh(Lh,this,Dh).call(this)),this.menu.addLocalHook("afterSubmenuOpen",e=>wh(Lh,this,Ah).call(this,e)),this.menu.addLocalHook("afterClose",()=>wh(Lh,this,Fh).call(this)),this.menu.addLocalHook("executeCommand",(function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return e.executeCommand.call(e,...n)})),Object(h["arrayEach"])(r,e=>this.commandExecutor.registerCommand(e.key,e))})}updatePlugin(){this.disablePlugin(),this.enablePlugin(),super.updatePlugin()}disablePlugin(){this.close(),this.menu&&this.menu.destroy(),this.unregisterShortcuts(),super.disablePlugin()}registerShortcuts(){const e=this.hot.getShortcutManager().getContext("grid"),t=()=>{const{highlight:e}=this.hot.getSelectedRangeLast();if((e.isHeader()&&-1===e.row||e.isCell())&&e.col>=0){this.hot.selectColumns(e.col,e.col,-1);const{from:t}=this.hot.getSelectedRangeLast(),n=Wo(this.menu.container,this.hot.rootDocument),r=this.hot.getCell(-1,t.col,!0).querySelector("."+vh),i=r.getBoundingClientRect();this.open({left:i.left+n.left,top:i.top+r.offsetHeight+n.top},{left:i.width,right:0,above:0,below:3}),this.menu.getNavigator().toFirstItem()}};e.addShortcuts([{keys:[["Shift","Alt","ArrowDown"],["Control/Meta","Enter"]],callback:t,runOnlyIf:()=>{var e;const t=null===(e=this.hot.getSelectedRangeLast())||void 0===e?void 0:e.highlight;return t&&this.hot.selection.isCellVisible(t)&&t.isHeader()&&!this.menu.isOpened()},captureCtrl:!0,group:Eh},{keys:[["Shift","Alt","ArrowDown"]],callback:t,runOnlyIf:()=>{var e;const t=null===(e=this.hot.getSelectedRangeLast())||void 0===e?void 0:e.highlight;return t&&this.hot.selection.isCellVisible(t)&&t.isCell()&&!this.menu.isOpened()},group:Eh}])}unregisterShortcuts(){this.hot.getShortcutManager().getContext("grid").removeShortcutsByGroup(Eh)}registerEvents(){this.eventManager.addEventListener(this.hot.rootElement,"click",e=>wh(Lh,this,Ih).call(this,e))}open(e){var t;let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{above:0,below:0,left:0,right:0};null!==(t=this.menu)&&void 0!==t&&t.isOpened()||(this.menu.open(),Object(o["objectEach"])(n,(e,t)=>{this.menu.setOffset(t,e)}),this.menu.setPosition(e))}close(){var e;null===(e=this.menu)||void 0===e||e.close()}executeCommand(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];this.commandExecutor.execute(e,...n)}setListening(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.menu.isOpened()&&(e?this.menu.hotMenu.listen():this.menu.hotMenu.unlisten())}destroy(){this.close(),this.menu&&this.menu.destroy(),super.destroy()}}function _h(e){e.getKeyboardShortcutsCtrl().addCustomShortcuts([{keys:[["Control/Meta","A"]],callback:()=>!1}])}function Ih(e){if(Object(i["hasClass"])(e.target,vh)){const t=Wo(this.menu.container,this.hot.rootDocument),n=e.target.getBoundingClientRect();e.stopPropagation(),bh(Ch,this,!1),this.open({left:n.left+t.left,top:n.top+e.target.offsetHeight+t.top},{left:n.width,right:0,above:0,below:3})}}function Ph(e,t){const n=t.parentNode;if(!n)return;const r=n.parentNode.childNodes,s=Array.prototype.indexOf.call(r,n);if(e<0||s!==r.length-1)return;const o=t.querySelector("."+vh);if(this.enabled&&o)return;if(!this.enabled)return void(o&&o.parentNode.removeChild(o));const a=this.hot.rootDocument.createElement("button");a.className=vh,a.type="button",a.tabIndex=-1,this.hot.getSettings().ariaTags&&(Object(i["setAttribute"])(a,[Object(R["n"])(),Object(R["p"])(" ")]),Object(i["setAttribute"])(t,[Object(R["m"])("menu")])),a.onclick=function(){return!1},t.firstChild.insertBefore(a,t.firstChild.firstChild)}function xh(){this.hot.runHooks("beforeDropdownMenuShow",this)}function Dh(){this.hot.runHooks("afterDropdownMenuShow",this),wh(Lh,this,_h).call(this,this.menu)}function Ah(e){wh(Lh,this,_h).call(this,e)}function Fh(){this.hot.listen(),this.hot.runHooks("afterDropdownMenuHide",this)}function Yh(e){return Sh(Ch,this)?null:e}function Hh(e){Object(i["hasClass"])(e.target,vh)&&bh(Ch,this,!0)}function kh(e,t,n){return(t=Vh(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Vh(e){var t=Uh(e,"string");return"symbol"==typeof t?t:t+""}function Uh(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}Nh.SEPARATOR={name:Io};class Wh{constructor(e){kh(this,"hot",void 0),kh(this,"options",{}),this.hot=e}setOptions(e){this.options=e}getData(){const{startRow:e,startCol:t,endRow:n,endCol:r}=this._getDataRange(),i=this.options,s=[];return Object(nt["rangeEach"])(e,n,e=>{const n=[];!i.exportHiddenRows&&this._isHiddenRow(e)||(Object(nt["rangeEach"])(t,r,t=>{!i.exportHiddenColumns&&this._isHiddenColumn(t)||n.push(this.hot.getDataAtCell(e,t))}),s.push(n))}),s}getRowHeaders(){const e=[];if(this.options.rowHeaders){const{startRow:t,endRow:n}=this._getDataRange(),r=this.hot.getRowHeader();Object(nt["rangeEach"])(t,n,t=>{!this.options.exportHiddenRows&&this._isHiddenRow(t)||e.push(r[t])})}return e}getColumnHeaders(){const e=[];if(this.options.columnHeaders){const{startCol:t,endCol:n}=this._getDataRange(),r=this.hot.getColHeader();Object(nt["rangeEach"])(t,n,t=>{!this.options.exportHiddenColumns&&this._isHiddenColumn(t)||e.push(r[t])})}return e}_getDataRange(){const e=this.hot.countCols()-1,t=this.hot.countRows()-1;let[n=0,r=0,i=t,s=e]=this.options.range;return n=Math.max(n,0),r=Math.max(r,0),i=Math.min(i,t),s=Math.min(s,e),{startRow:n,startCol:r,endRow:i,endCol:s}}_isHiddenRow(e){return this.hot.rowIndexMapper.isHidden(this.hot.toPhysicalRow(e))}_isHiddenColumn(e){return this.hot.columnIndexMapper.isHidden(this.hot.toPhysicalColumn(e))}}var Xh=Wh;function jh(e,t,n){return(t=Zh(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Zh(e){var t=Qh(e,"string");return"symbol"==typeof t?t:t+""}function Qh(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}class Kh{static get DEFAULT_OPTIONS(){return{mimeType:"text/plain",fileExtension:"txt",filename:"Handsontable [YYYY]-[MM]-[DD]",encoding:"utf-8",bom:!1,columnHeaders:!1,rowHeaders:!1,exportHiddenColumns:!1,exportHiddenRows:!1,range:[]}}constructor(e,t){jh(this,"dataProvider",void 0),jh(this,"options",void 0),this.dataProvider=e,this.options=this._mergeOptions(t),this.dataProvider.setOptions(this.options)}_mergeOptions(e){let t=Object(o["clone"])(this.constructor.DEFAULT_OPTIONS);const n=new Date;return t=Object(o["extend"])(Object(o["clone"])(Kh.DEFAULT_OPTIONS),t),t=Object(o["extend"])(t,e),t.filename=Object(m["substitute"])(t.filename,{YYYY:n.getFullYear(),MM:(""+(n.getMonth()+1)).padStart(2,"0"),DD:(""+n.getDate()).padStart(2,"0")}),t}}var Gh=Kh;const Bh=String.fromCharCode(13),Jh=String.fromCharCode(34),zh=String.fromCharCode(10);class $h extends Gh{static get DEFAULT_OPTIONS(){return{mimeType:"text/csv",fileExtension:"csv",bom:!0,columnDelimiter:",",rowDelimiter:"\r\n"}}export(){const e=this.options,t=this.dataProvider.getData();let n=this.dataProvider.getColumnHeaders();const r=n.length>0,i=this.dataProvider.getRowHeaders(),s=i.length>0;let o=e.bom?String.fromCharCode(65279):"";return r&&(n=Object(h["arrayMap"])(n,e=>this._escapeCell(e,!0)),s&&(o+=e.columnDelimiter),o+=n.join(e.columnDelimiter),o+=e.rowDelimiter),Object(h["arrayEach"])(t,(t,n)=>{n>0&&(o+=e.rowDelimiter),s&&(o+=this._escapeCell(i[n])+e.columnDelimiter),o+=t.map(e=>this._escapeCell(e)).join(e.columnDelimiter)}),o}_escapeCell(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=Object(d["stringify"])(e);return""!==n&&(t||n.indexOf(Bh)>=0||n.indexOf(Jh)>=0||n.indexOf(zh)>=0||n.indexOf(this.options.columnDelimiter)>=0)&&(n=n.replace(new RegExp('"',"g"),'""'),n=`"${n}"`),n}}var qh=$h;const ed="csv",td={[ed]:qh};function nd(e,t,n){return"function"===typeof td[e]?new td[e](t,n):null}const rd="exportFile",id=240;class sd extends qt["a"]{static get PLUGIN_KEY(){return rd}static get PLUGIN_PRIORITY(){return id}isEnabled(){return!0}exportAsString(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this._createTypeFormatter(e,t).export()}exportAsBlob(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this._createBlob(this._createTypeFormatter(e,t))}downloadFile(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{rootDocument:n,rootWindow:r}=this.hot,i=this._createTypeFormatter(e,t),s=this._createBlob(i),o=r.URL||r.webkitURL,a=n.createElement("a"),l=`${i.options.filename}.${i.options.fileExtension}`;if(void 0!==a.download){const e=o.createObjectURL(s);a.style.display="none",a.setAttribute("href",e),a.setAttribute("download",l),n.body.appendChild(a),a.dispatchEvent(new MouseEvent("click")),n.body.removeChild(a),setTimeout(()=>{o.revokeObjectURL(e)},100)}else navigator.msSaveOrOpenBlob&&navigator.msSaveOrOpenBlob(s,l)}_createTypeFormatter(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!td[e])throw new Error(`Export format type "${e}" is not supported.`);return nd(e,new Xh(this.hot),t)}_createBlob(e){let t=null;return"undefined"!==typeof Blob&&(t=new Blob([e.export()],{type:`${e.options.mimeType};charset=${e.options.encoding}`})),t}}n("4069");function od(e,t,n){return(t=ad(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ad(e){var t=ld(e,"string");return"symbol"==typeof t?t:t+""}function ld(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}class cd{constructor(e,t){let{id:n,stateless:r=!0}=t;od(this,"hot",void 0),od(this,"id",void 0),od(this,"elements",[]),od(this,"hidden",!1),od(this,"stateId",""),od(this,"state",void 0),this.hot=e,this.id=n,this.stateId="Filters.component."+this.id,this.state=r?null:this.hot.columnIndexMapper.registerMap(this.stateId,new Ri["a"])}getElements(){return this.elements}reset(){Object(h["arrayEach"])(this.elements,e=>e.reset())}hide(){this.hidden=!0}show(){this.hidden=!1}isHidden(){return null===this.hot||this.hidden}restoreState(e){this.state&&this.setState(this.state.getValueAtIndex(e))}setState(){throw new Error("The state setting logic is not implemented")}saveState(e){this.state&&this.state.setValueAtIndex(e,this.getState())}getState(){throw new Error("The state gathering logic is not implemented")}destroy(){this.hot.columnIndexMapper.unregisterMap(this.stateId),this.clearLocalHooks(),Object(h["arrayEach"])(this.elements,e=>e.destroy()),this.state=null,this.elements=null,this.hot=null}}Object(o["mixin"])(cd,Js["a"]);const ud={};function hd(e,t){if(!ud[e])throw Error(`Filter condition "${e}" does not exist.`);const{condition:n,descriptor:r}=ud[e];let i=t;return r.inputValuesDecorator&&(i=r.inputValuesDecorator(i)),function(e){return n.apply(e.meta.instance,[].concat([e],[i]))}}function dd(e){if(!ud[e])throw Error(`Filter condition "${e}" does not exist.`);return ud[e].descriptor}function md(e,t,n){n.key=e,ud[e]={condition:t,descriptor:n}}const gd="none";function pd(){return!0}md(gd,pd,{name:Ye["FILTERS_CONDITIONS_NONE"],inputsCount:0,showOperators:!1});const fd="empty";function Rd(e){return Object(d["isEmpty"])(e.value)}md(fd,Rd,{name:Ye["FILTERS_CONDITIONS_EMPTY"],inputsCount:0,showOperators:!0});const yd="not_empty";function Md(e,t){return!hd(fd,t)(e)}md(yd,Md,{name:Ye["FILTERS_CONDITIONS_NOT_EMPTY"],inputsCount:0,showOperators:!0});const Sd="eq";function bd(e,t){let[n]=t;return Object(d["stringify"])(e.value).toLocaleLowerCase(e.meta.locale)===Object(d["stringify"])(n)}md(Sd,bd,{name:Ye["FILTERS_CONDITIONS_EQUAL"],inputsCount:1,showOperators:!0});const wd="neq";function Td(e,t){return!hd(Sd,t)(e)}md(wd,Td,{name:Ye["FILTERS_CONDITIONS_NOT_EQUAL"],inputsCount:1,showOperators:!0});const Od="gt";function vd(e,t){let[n]=t,r=n;return"numeric"===e.meta.type&&(r=parseFloat(r,10)),e.value>r}md(Od,vd,{name:Ye["FILTERS_CONDITIONS_GREATER_THAN"],inputsCount:1,showOperators:!0});const Ed="gte";function Cd(e,t){let[n]=t,r=n;return"numeric"===e.meta.type&&(r=parseFloat(r,10)),e.value>=r}md(Ed,Cd,{name:Ye["FILTERS_CONDITIONS_GREATER_THAN_OR_EQUAL"],inputsCount:1,showOperators:!0});const Ld="lt";function Nd(e,t){let[n]=t,r=n;return"numeric"===e.meta.type&&(r=parseFloat(r,10)),e.value<r}md(Ld,Nd,{name:Ye["FILTERS_CONDITIONS_LESS_THAN"],inputsCount:1,showOperators:!0});const _d="lte";function Id(e,t){let[n]=t,r=n;return"numeric"===e.meta.type&&(r=parseFloat(r,10)),e.value<=r}md(_d,Id,{name:Ye["FILTERS_CONDITIONS_LESS_THAN_OR_EQUAL"],inputsCount:1,showOperators:!0});const Pd="date_after";function xd(e,t){let[n]=t;const r=I(e.value,e.meta.dateFormat),i=I(n,e.meta.dateFormat);return!(!r.isValid()||!i.isValid())&&r.diff(i)>=0}md(Pd,xd,{name:Ye["FILTERS_CONDITIONS_AFTER"],inputsCount:1,showOperators:!0});const Dd="date_before";function Ad(e,t){let[n]=t;const r=I(e.value,e.meta.dateFormat),i=I(n,e.meta.dateFormat);return!(!r.isValid()||!i.isValid())&&r.diff(i)<=0}md(Dd,Ad,{name:Ye["FILTERS_CONDITIONS_BEFORE"],inputsCount:1,showOperators:!0});const Fd="between";function Yd(e,t){let[n,r]=t,i=n,s=r;if("numeric"===e.meta.type){const e=parseFloat(i,10),t=parseFloat(s,10);i=Math.min(e,t),s=Math.max(e,t)}else if("date"===e.meta.type){const t=hd(Dd,[s]),n=hd(Pd,[i]);return t(e)&&n(e)}return e.value>=i&&e.value<=s}md(Fd,Yd,{name:Ye["FILTERS_CONDITIONS_BETWEEN"],inputsCount:2,showOperators:!0});const Hd="not_between";function kd(e,t){return!hd(Fd,t)(e)}md(Hd,kd,{name:Ye["FILTERS_CONDITIONS_NOT_BETWEEN"],inputsCount:2,showOperators:!0});const Vd="begins_with";function Ud(e,t){let[n]=t;return Object(d["stringify"])(e.value).toLocaleLowerCase(e.meta.locale).startsWith(Object(d["stringify"])(n))}md(Vd,Ud,{name:Ye["FILTERS_CONDITIONS_BEGINS_WITH"],inputsCount:1,showOperators:!0});const Wd="ends_with";function Xd(e,t){let[n]=t;return Object(d["stringify"])(e.value).toLocaleLowerCase(e.meta.locale).endsWith(Object(d["stringify"])(n))}md(Wd,Xd,{name:Ye["FILTERS_CONDITIONS_ENDS_WITH"],inputsCount:1,showOperators:!0});const jd="contains";function Zd(e,t){let[n]=t;return Object(d["stringify"])(e.value).toLocaleLowerCase(e.meta.locale).indexOf(Object(d["stringify"])(n))>=0}md(jd,Zd,{name:Ye["FILTERS_CONDITIONS_CONTAINS"],inputsCount:1,showOperators:!0});const Qd="not_contains";function Kd(e,t){return!hd(jd,t)(e)}md(Qd,Kd,{name:Ye["FILTERS_CONDITIONS_NOT_CONTAIN"],inputsCount:1,showOperators:!0});const Gd="date_tomorrow";function Bd(e){const t=I(e.value,e.meta.dateFormat);return!!t.isValid()&&t.isSame(I().subtract(-1,"days").startOf("day"),"d")}md(Gd,Bd,{name:Ye["FILTERS_CONDITIONS_TOMORROW"],inputsCount:0});const Jd="date_today";function zd(e){const t=I(e.value,e.meta.dateFormat);return!!t.isValid()&&t.isSame(I().startOf("day"),"d")}md(Jd,zd,{name:Ye["FILTERS_CONDITIONS_TODAY"],inputsCount:0});const $d="date_yesterday";function qd(e){const t=I(e.value,e.meta.dateFormat);return!!t.isValid()&&t.isSame(I().subtract(1,"days").startOf("day"),"d")}md($d,qd,{name:Ye["FILTERS_CONDITIONS_YESTERDAY"],inputsCount:0});const em="numeric",tm="text",nm="date",rm={[em]:[gd,Io,fd,yd,Io,Sd,wd,Io,Od,Ed,Ld,_d,Fd,Hd],[tm]:[gd,Io,fd,yd,Io,Sd,wd,Io,Vd,Wd,Io,jd,Qd],[nm]:[gd,Io,fd,yd,Io,Sd,wd,Io,Dd,Pd,Fd,Io,Gd,Jd,$d]};function im(e){const t=[];let n=e;return rm[n]||(n=tm),Object(h["arrayEach"])(rm[n],e=>{let n;n=e===Io?{name:Io}:Object(o["clone"])(dd(e)),t.push(n)}),t}function sm(e,t,n){return(t=om(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function om(e){var t=am(e,"string");return"symbol"==typeof t?t:t+""}function am(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}const lm="built",cm="building",um=["click","input","keydown","keypress","keyup","focus","blur","change"];class hm{static get DEFAULTS(){return Object(o["clone"])({className:"",value:"",tagName:"div",children:[],wrapIt:!0})}constructor(e,t){sm(this,"hot",void 0),sm(this,"eventManager",new Pe["a"](this)),sm(this,"options",void 0),sm(this,"_element",void 0),sm(this,"buildState",void 0),this.hot=e,this.options=Object(o["extend"])(hm.DEFAULTS,t),this._element=this.hot.rootDocument.createElement(this.options.wrapIt?"div":this.options.tagName)}setValue(e){this.options.value=e,this.update()}getValue(){return this.options.value}get element(){return this.buildState===cm?this._element:this.buildState===lm?(this.update(),this._element):(this.buildState=cm,this.build(),this.buildState=lm,this._element)}isBuilt(){return this.buildState===lm}translateIfPossible(e){return"string"===typeof e&&e.startsWith(Ye["FILTERS_NAMESPACE"])?this.hot.getTranslatedPhrase(e):e}build(){const e=(e,t)=>{this.eventManager.addEventListener(e,t,e=>this.runLocalHooks(t,e,this))};if(this.buildState||(this.buildState=cm),this._element.setAttribute("data-hot-input",!0),void 0!==this.options.tabIndex&&this._element.setAttribute("tabindex",this.options.tabIndex),void 0!==this.options.role&&this._element.setAttribute("role",this.options.role),this.options.className&&Object(i["addClass"])(this._element,this.options.className),this.options.children.length)Object(h["arrayEach"])(this.options.children,e=>this._element.appendChild(e.element));else if(this.options.wrapIt){const t=this.hot.rootDocument.createElement(this.options.tagName);t.setAttribute("data-hot-input",!0),Object(o["objectEach"])(this.options,(e,n)=>{void 0!==t[n]&&"className"!==n&&"tagName"!==n&&"children"!==n&&(t[n]=this.translateIfPossible(e))}),this._element.appendChild(t),Object(h["arrayEach"])(um,n=>e(t,n))}else Object(h["arrayEach"])(um,t=>e(this._element,t))}update(){}reset(){this.options.value="",this.update()}show(){this.element.style.display=""}hide(){this.element.style.display="none"}focus(){}destroy(){this.eventManager.destroy(),this.eventManager=null,this.hot=null,this._element.parentNode&&this._element.parentNode.removeChild(this._element),this._element=null}}function dm(e,t){gm(e,t),t.add(e)}function mm(e,t,n){gm(e,t),t.set(e,n)}function gm(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function pm(e,t){return e.get(Rm(e,t))}function fm(e,t,n){return e.set(Rm(e,t),n),n}function Rm(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}Object(o["mixin"])(hm,Js["a"]);var ym=new WeakMap,Mm=new WeakSet;class Sm extends hm{static get DEFAULTS(){return Object(o["clone"])({placeholder:"",type:"text",tagName:"input",tabIndex:-1})}constructor(e,t){super(e,Object(o["extend"])(Sm.DEFAULTS,t)),dm(this,Mm),mm(this,ym,void 0),this.registerHooks()}registerHooks(){this.addLocalHook("keyup",e=>Rm(Mm,this,bm).call(this,e))}build(){super.build();const e=this.hot.rootDocument.createElement("div");fm(ym,this,this._element.firstChild),Object(i["addClass"])(this._element,"htUIInput"),Object(i["addClass"])(e,"htUIInputIcon"),this._element.appendChild(e),this.update()}update(){this.isBuilt()&&(pm(ym,this).type=this.options.type,pm(ym,this).placeholder=this.translateIfPossible(this.options.placeholder),pm(ym,this).value=this.translateIfPossible(this.options.value))}focus(){this.isBuilt()&&pm(ym,this).focus()}}function bm(e){this.options.value=e.target.value}function wm(e,t){Om(e,t),t.add(e)}function Tm(e,t,n){Om(e,t),t.set(e,n)}function Om(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function vm(e,t,n){return e.set(Cm(e,t),n),n}function Em(e,t){return e.get(Cm(e,t))}function Cm(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}var Lm=new WeakMap,Nm=new WeakMap,_m=new WeakMap,Im=new WeakMap,Pm=new WeakMap,xm=new WeakSet;class Dm extends hm{static get DEFAULTS(){return Object(o["clone"])({className:"htUISelect",wrapIt:!1,tabIndex:-1})}constructor(e,t){super(e,Object(o["extend"])(Dm.DEFAULTS,t)),wm(this,xm),Tm(this,Lm,null),Tm(this,Nm,[]),Tm(this,_m,void 0),Tm(this,Im,void 0),Tm(this,Pm,void 0),this.registerHooks()}getMenu(){return Em(Lm,this)}registerHooks(){this.addLocalHook("click",()=>Cm(xm,this,Ym).call(this))}setItems(e){vm(Nm,this,this.translateNames(e)),Em(Lm,this)&&Em(Lm,this).setMenuItems(Em(Nm,this))}translateNames(e){return Object(h["arrayEach"])(e,e=>{e.name=this.translateIfPossible(e.name)}),e}build(){super.build(),vm(Lm,this,new sc(this.hot,{className:"htSelectUI htFiltersConditionsMenu",keepInViewport:!1,standalone:!0,container:this.options.menuContainer})),Em(Lm,this).setMenuItems(Em(Nm,this));const e=new hm(this.hot,{className:"htUISelectCaption"}),t=new hm(this.hot,{className:"htUISelectDropdown"});vm(_m,this,e),vm(Im,this,e.element),vm(Pm,this,t),this.hot.getSettings().ariaTags&&(Object(i["setAttribute"])(t.element,[Object(R["n"])()]),Object(i["setAttribute"])(this._element,[Object(R["q"])()])),Object(h["arrayEach"])([e,t],e=>this._element.appendChild(e.element)),Em(Lm,this).addLocalHook("select",e=>Cm(xm,this,Am).call(this,e)),Em(Lm,this).addLocalHook("afterClose",()=>Cm(xm,this,Fm).call(this)),this.update()}update(){if(!this.isBuilt())return;let e;e=this.options.value?this.options.value.name:Em(Lm,this).hot.getTranslatedPhrase(Ye["FILTERS_CONDITIONS_NONE"]),Em(Im,this).textContent=e,super.update()}openOptions(){const e=this.element.getBoundingClientRect();Em(Lm,this)&&(Em(Lm,this).open(),Em(Lm,this).setPosition({left:this.hot.isLtr()?e.left-5:e.left-31,top:e.top-1,width:e.width,height:e.height}),Em(Lm,this).getNavigator().toFirstItem(),Em(Lm,this).getKeyboardShortcutsCtrl().addCustomShortcuts([{keys:[["Tab"],["Shift","Tab"]],callback:e=>{this.closeOptions(),this.runLocalHooks("tabKeydown",e)}},{keys:[["Control/Meta","A"]],callback:()=>!1}]))}closeOptions(){Em(Lm,this)&&Em(Lm,this).close()}focus(){this.isBuilt()&&this.element.focus()}destroy(){Em(Lm,this)&&(Em(Lm,this).destroy(),vm(Lm,this,null)),Em(_m,this)&&Em(_m,this).destroy(),Em(Pm,this)&&Em(Pm,this).destroy(),super.destroy()}}function Am(e){e.name!==Io&&(this.options.value=e,this.update(),this.runLocalHooks("select",this.options.value))}function Fm(){this.runLocalHooks("afterClose")}function Ym(){this.openOptions()}function Hm(e,t){km(e,t),t.add(e)}function km(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Vm(e,t,n){return(t=Um(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Um(e){var t=Wm(e,"string");return"symbol"==typeof t?t:t+""}function Wm(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function Xm(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}var jm=new WeakSet;class Zm extends cd{constructor(e,t){super(e,{id:t.id,stateless:!1}),Hm(this,jm),Vm(this,"name",""),Vm(this,"addSeparator",!1),this.name=t.name,this.addSeparator=t.addSeparator,this.elements.push(new Dm(this.hot,{menuContainer:t.menuContainer})),this.elements.push(new Sm(this.hot,{placeholder:Ye["FILTERS_BUTTONS_PLACEHOLDER_VALUE"]})),this.elements.push(new Sm(this.hot,{placeholder:Ye["FILTERS_BUTTONS_PLACEHOLDER_SECOND_VALUE"]})),this.registerHooks()}registerHooks(){this.getSelectElement().addLocalHook("select",e=>Xm(jm,this,Qm).call(this,e)).addLocalHook("afterClose",()=>this.runLocalHooks("afterClose")).addLocalHook("tabKeydown",e=>this.runLocalHooks("selectTabKeydown",e)),Object(h["arrayEach"])(this.getInputElements(),e=>{e.addLocalHook("keydown",e=>Xm(jm,this,Km).call(this,e))})}setState(e){if(this.reset(),!e)return;const t=Object(o["clone"])(e.command);t.name.startsWith(Ye["FILTERS_CONDITIONS_NAMESPACE"])&&(t.name=this.hot.getTranslatedPhrase(t.name)),this.getSelectElement().setValue(t),Object(h["arrayEach"])(e.args,(e,n)=>{if(n>t.inputsCount-1)return!1;const r=this.getInputElement(n);r.setValue(e),r[t.inputsCount>n?"show":"hide"](),n||this.hot._registerTimeout(()=>r.focus(),10)})}getState(){const e=this.getSelectElement().getValue()||dd(gd),t=[];return Object(h["arrayEach"])(this.getInputElements(),(n,r)=>{e.inputsCount>r&&t.push(n.getValue())}),{command:e,args:t}}updateState(e,t){const n=dd(e?e.name:gd);this.state.setValueAtIndex(t,{command:n,args:e?e.args:[]}),e||Object(h["arrayEach"])(this.getInputElements(),e=>e.setValue(null))}getSelectElement(){return this.elements.filter(e=>e instanceof Dm)[0]}getInputElement(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return this.getInputElements()[e]}getInputElements(){return this.elements.filter(e=>e instanceof Sm)}getMenuItemDescriptor(){return{key:this.id,name:this.name,isCommand:!1,disableSelection:!0,hidden:()=>this.isHidden(),renderer:(e,t,n,r,s,o)=>{Object(i["addClass"])(t.parentNode,"htFiltersMenuCondition"),this.addSeparator&&Object(i["addClass"])(t.parentNode,"border");const a=this.hot.rootDocument.createElement("div");return Object(i["addClass"])(a,"htFiltersMenuLabel"),a.textContent=o,t.appendChild(a),t.parentElement.hasAttribute("ghost-table")||Object(h["arrayEach"])(this.elements,e=>t.appendChild(e.element)),t}}}reset(){const e=this.hot.getPlugin("filters").getSelectedColumn();let t=[dd(gd)];if(null!==e){const{visualIndex:n}=e;t=im(this.hot.getDataType(0,n,this.hot.countRows(),n))}Object(h["arrayEach"])(this.getInputElements(),e=>e.hide()),this.getSelectElement().setItems(t),super.reset(),this.getSelectElement().setValue(t[0])}}function Qm(e){Object(h["arrayEach"])(this.getInputElements(),(t,n)=>{t[e.inputsCount>n?"show":"hide"](),0===n&&this.hot._registerTimeout(()=>t.focus(),10)}),this.runLocalHooks("change",e)}function Km(e){Object(g["isKey"])(e.keyCode,"ESCAPE")&&(this.runLocalHooks("cancel"),Object(s["stopImmediatePropagation"])(e))}const Gm={};function Bm(e){if(!Gm[e])throw Error(`Operation with id "${e}" does not exist.`);const t=Gm[e].func;return function(e,n){return t(e,n)}}function Jm(e){return Gm[e].name}function zm(e,t,n){Gm[e]={name:t,func:n}}const $m="conjunction",qm=Ye["FILTERS_LABELS_CONJUNCTION"];function eg(e,t){return e.every(e=>e.func(t))}zm($m,qm,eg);const tg="disjunction",ng=Ye["FILTERS_LABELS_DISJUNCTION"];function rg(e,t){return e.some(e=>e.func(t))}zm(tg,ng,rg);const ig="disjunctionWithExtraCondition",sg=Ye["FILTERS_LABELS_DISJUNCTION"];function og(e,t){if(e.length<3)throw Error("Operation doesn't work on less then three conditions.");return e.slice(0,e.length-1).some(e=>e.func(t))&&e[e.length-1].func(t)}function ag(e,t,n){lg(e,t),t.set(e,n)}function lg(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function cg(e,t){return e.get(hg(e,t))}function ug(e,t,n){return e.set(hg(e,t),n),n}function hg(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}zm(ig,sg,og);var dg=new WeakMap,mg=new WeakMap;class gg extends hm{static get DEFAULTS(){return Object(o["clone"])({type:"radio",tagName:"input",className:"htUIRadio",label:{}})}constructor(e,t){super(e,Object(o["extend"])(gg.DEFAULTS,t)),ag(this,dg,void 0),ag(this,mg,void 0)}build(){super.build();const e=this.hot.rootDocument.createElement("label");e.textContent=this.translateIfPossible(this.options.label.textContent),e.htmlFor=this.translateIfPossible(this.options.label.htmlFor),ug(mg,this,e),ug(dg,this,this._element.firstChild),cg(dg,this).checked=this.options.checked,this._element.appendChild(e),this.update()}update(){this.isBuilt()&&(cg(mg,this).textContent=this.translateIfPossible(this.options.label.textContent))}isChecked(){return!!this.isBuilt()&&cg(dg,this).checked}setChecked(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.isBuilt()&&(cg(dg,this).checked=e)}focus(){this.isBuilt()&&cg(dg,this).focus()}}function pg(e,t){fg(e,t),t.add(e)}function fg(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Rg(e,t,n){return(t=yg(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function yg(e){var t=Mg(e,"string");return"symbol"==typeof t?t:t+""}function Mg(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function Sg(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}const bg=0;var wg=new WeakSet;class Tg extends cd{constructor(e,t){super(e,{id:t.id,stateless:!1}),pg(this,wg),Rg(this,"name",""),this.name=t.name,this.buildOperatorsElement()}getMenuItemDescriptor(){return{key:this.id,name:this.name,isCommand:!1,disableSelection:!0,hidden:()=>this.isHidden(),renderer:(e,t)=>(Object(i["addClass"])(t.parentNode,"htFiltersMenuOperators"),Object(h["arrayEach"])(this.elements,e=>t.appendChild(e.element)),t)}}buildOperatorsElement(){const e=[$m,tg];Object(h["arrayEach"])(e,t=>{const n=new gg(this.hot,{name:"operator",label:{htmlFor:t,textContent:Jm(t)},value:t,checked:t===e[bg],id:t});n.addLocalHook("change",e=>Sg(wg,this,Og).call(this,e)),this.elements.push(n)})}setChecked(e){if(this.elements.length<e)throw Error(Ds["a"]`Radio button with index ${e} doesn't exist.`);Object(h["arrayEach"])(this.elements,(t,n)=>{t.setChecked(n===e)})}getActiveOperationId(){const e=this.elements.find(e=>e instanceof gg&&e.isChecked());return e?e.getValue():$m}getState(){return this.getActiveOperationId()}setState(e){this.reset(),e&&this.getActiveOperationId()!==e&&Object(h["arrayEach"])(this.elements,t=>{t.setChecked(t.getValue()===e)})}updateState(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:$m,t=arguments.length>1?arguments[1]:void 0,n=e;n===ig&&(n=tg),this.state.setValueAtIndex(t,n)}reset(){this.setChecked(bg)}}function Og(e){this.setState(e.target.value)}Object(en["getComparisonFunction"])();function vg(e,t){let n=e;return""===n&&(n=`(${t})`),n}const Eg=new Set([1]).has(1),Cg=Eg&&"function"===typeof Array.from;function Lg(e){let t=e;return Eg&&(t=new Set(t)),function(e){let n;return n=Eg?t.has(e):!!~t.indexOf(e),n}}function Ng(e){return null===e||void 0===e?"":e}function _g(e){let t=e;return t=Cg?Array.from(new Set(t)):Object(h["arrayUnique"])(t),t=t.sort((e,t)=>"number"===typeof e&&"number"===typeof t?e-t:e===t?0:e>t?1:-1),t}function Ig(e,t,n,r){const i=[],s=e===t;let o;return s||(o=Lg(t)),Object(h["arrayEach"])(e,e=>{let t=!1;(s||o(e))&&(t=!0);const a={checked:t,value:e,visualValue:vg(e,n)};r&&r(a),i.push(a)}),i}var Pg=n("480c");function xg(e,t,n){Dg(e,t),t.set(e,n)}function Dg(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Ag(e,t){return e.get(Yg(e,t))}function Fg(e,t,n){return e.set(Yg(e,t),n),n}function Yg(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}var Hg=new WeakMap;class kg extends hm{static get DEFAULTS(){return Object(o["clone"])({href:"#",tagName:"a",tabIndex:-1,role:"button"})}constructor(e,t){super(e,Object(o["extend"])(kg.DEFAULTS,t)),xg(this,Hg,void 0)}build(){super.build(),Fg(Hg,this,this._element.firstChild)}update(){this.isBuilt()&&(Ag(Hg,this).textContent=this.translateIfPossible(this.options.textContent))}focus(){this.isBuilt()&&Ag(Hg,this).focus()}activate(){Ag(Hg,this).click()}}function Vg(e,t){Wg(e,t),t.add(e)}function Ug(e,t,n){Wg(e,t),t.set(e,n)}function Wg(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Xg(e,t){return e.get(Zg(e,t))}function jg(e,t,n){return e.set(Zg(e,t),n),n}function Zg(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}const Qg="multipleSelect.itemBox";var Kg=new WeakMap,Gg=new WeakMap,Bg=new WeakMap,Jg=new WeakMap,zg=new WeakMap,$g=new WeakMap,qg=new WeakSet;class ep extends hm{static get DEFAULTS(){return Object(o["clone"])({className:"htUIMultipleSelect",value:[]})}constructor(e,t){super(e,Object(o["extend"])(ep.DEFAULTS,t)),Vg(this,qg),Ug(this,Kg,[]),Ug(this,Gg,void 0),Ug(this,Bg,void 0),Ug(this,Jg,void 0),Ug(this,zg,void 0),Ug(this,$g,void 0),jg(Jg,this,new Sm(this.hot,{placeholder:Ye["FILTERS_BUTTONS_PLACEHOLDER_SEARCH"],className:"htUIMultipleSelectSearch"})),jg(zg,this,new kg(this.hot,{textContent:Ye["FILTERS_BUTTONS_SELECT_ALL"],className:"htUISelectAll"})),jg($g,this,new kg(this.hot,{textContent:Ye["FILTERS_BUTTONS_CLEAR"],className:"htUIClearAll"})),this.registerHooks()}getItemsBox(){return Xg(Gg,this)}registerHooks(){Xg(Jg,this).addLocalHook("keydown",e=>Zg(qg,this,np).call(this,e)),Xg(Jg,this).addLocalHook("input",e=>Zg(qg,this,tp).call(this,e)),Xg(zg,this).addLocalHook("click",e=>Zg(qg,this,rp).call(this,e)),Xg($g,this).addLocalHook("click",e=>Zg(qg,this,ip).call(this,e))}setItems(e){var t;jg(Kg,this,e),null===(t=Xg(Gg,this))||void 0===t||t.loadData(Xg(Kg,this))}setLocale(e){jg(Bg,this,e)}getLocale(){return Xg(Bg,this)}getItems(){return[...Xg(Kg,this)]}getValue(){return op(Xg(Kg,this))}getSearchInputElement(){return Xg(Jg,this)}getSelectAllElement(){return Xg(zg,this)}getClearAllElement(){return Xg($g,this)}isSelectedAllValues(){return Xg(Kg,this).length===this.getValue().length}build(){super.build();const{rootDocument:e}=this.hot,t=e.createElement("div"),n=new hm(this.hot,{className:"htUISelectionControls",children:[Xg(zg,this),Xg($g,this)]});this._element.appendChild(Xg(Jg,this).element),this._element.appendChild(n.element),this._element.appendChild(t);const r=t=>{var n;if(!this._element)return;null===(n=Xg(Gg,this))||void 0===n||n.destroy(),Object(i["addClass"])(t,"htUIMultipleSelectHot"),jg(Gg,this,new this.hot.constructor(t,{data:Xg(Kg,this),columns:[{data:"checked",type:"checkbox",label:{property:"visualValue",position:"after"}}],beforeRenderer:(e,t,n,r,i,s)=>{e.title=s.instance.getDataAtRowProp(t,s.label.property)},afterListen:()=>{this.runLocalHooks("focus",this)},beforeOnCellMouseUp:()=>{Xg(Gg,this).listen()},colWidths:()=>Xg(Gg,this).container.scrollWidth-Object(i["getScrollbarWidth"])(e),maxCols:1,autoWrapCol:!0,height:110,copyPaste:!1,disableVisualSelection:"area",fillHandle:!1,fragmentSelection:"cell",tabMoves:{row:1,col:0},layoutDirection:this.hot.isRtl()?"rtl":"ltr"})),Xg(Gg,this).init();const r=Xg(Gg,this).getShortcutManager(),s=r.getContext("grid");s.removeShortcutsByKeys(["Tab"]),s.removeShortcutsByKeys(["Shift","Tab"]),s.addShortcut({keys:[["Escape"]],callback:e=>{this.runLocalHooks("keydown",e,this)},group:Qg}),s.addShortcut({keys:[["Tab"],["Shift","Tab"]],callback:e=>{Xg(Gg,this).deselectCell(),this.runLocalHooks("keydown",e,this),this.runLocalHooks("listTabKeydown",e,this)},group:Qg})};r(t),this.hot._registerTimeout(()=>r(t),100)}focus(){this.isBuilt()&&Xg(Gg,this).listen()}reset(){Xg(Jg,this).reset(),Xg(zg,this).reset(),Xg($g,this).reset()}update(){this.isBuilt()&&(Xg(Gg,this).loadData(sp(Xg(Kg,this),this.options.value)),super.update())}destroy(){var e;null===(e=Xg(Gg,this))||void 0===e||e.destroy(),Xg(Jg,this).destroy(),Xg($g,this).destroy(),Xg(zg,this).destroy(),jg(Jg,this,null),jg($g,this,null),jg(zg,this,null),jg(Gg,this,null),jg(Kg,this,null),super.destroy()}}function tp(e){const t=e.target.value.toLocaleLowerCase(this.getLocale());let n;n=""===t?[...Xg(Kg,this)]:Xg(Kg,this).filter(e=>(""+e.value).toLocaleLowerCase(this.getLocale()).indexOf(t)>=0),Xg(Gg,this).loadData(n)}function np(e){this.runLocalHooks("keydown",e,this);const t=Object(pi["partial"])(g["isKey"],e.keyCode);t("ARROW_DOWN")&&(e.preventDefault(),Object(s["stopImmediatePropagation"])(e),Xg(Gg,this).listen(),Xg(Gg,this).selectCell(0,0))}function rp(e){const t=[];e.preventDefault(),Xg(Gg,this).getSourceData().forEach((e,n)=>{e.checked=!0,t.push(Object(Pg["dataRowToChangesArray"])(e,n)[0])}),Xg(Gg,this).setSourceDataAtCell(t)}function ip(e){const t=[];e.preventDefault(),Xg(Gg,this).getSourceData().forEach((e,n)=>{e.checked=!1,t.push(Object(Pg["dataRowToChangesArray"])(e,n)[0])}),Xg(Gg,this).setSourceDataAtCell(t)}function sp(e,t){const n=Lg(t);return e.map(e=>(e.checked=n(e.value),e))}function op(e){const t=[];return e.forEach(e=>{e.checked&&t.push(e.value)}),t}const ap="by_value";function lp(e,t){let[n]=t;return n(e.value)}function cp(e,t){up(e,t),t.add(e)}function up(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function hp(e,t,n){return(t=dp(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function dp(e){var t=mp(e,"string");return"symbol"==typeof t?t:t+""}function mp(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function gp(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}md(ap,lp,{name:"By value",inputsCount:0,inputValuesDecorator(e){let[t]=e;return[Lg(t)]},showOperators:!1});var pp,fp=new WeakSet;class Rp extends cd{constructor(e,t){super(e,{id:t.id,stateless:!1}),cp(this,fp),hp(this,"name",""),this.name=t.name,this.elements.push(new ep(this.hot)),this.registerHooks()}registerHooks(){this.getMultipleSelectElement().addLocalHook("keydown",e=>gp(fp,this,yp).call(this,e)).addLocalHook("listTabKeydown",e=>this.runLocalHooks("listTabKeydown",e)),this.hot.addHook("modifyFiltersMultiSelectValue",(e,t)=>gp(fp,this,Sp).call(this,e,t))}getElements(){const e=this.getMultipleSelectElement();return[e.getSearchInputElement(),e.getSelectAllElement(),e.getClearAllElement(),this.getMultipleSelectElement()]}setState(e){if(this.reset(),e&&e.command.key===ap){const t=this.getMultipleSelectElement();t.setItems(e.itemsSnapshot),t.setValue(e.args[0]),t.setLocale(e.locale)}}getState(){const e=this.getMultipleSelectElement(),t=e.getItems();return{command:{key:e.isSelectedAllValues()||!t.length?gd:ap},args:[e.getValue()],itemsSnapshot:t}}updateState(e){const t=(t,n,r,i,s)=>{const[o]=Object(h["arrayFilter"])(n,e=>e.name===ap),a={},l=this.hot.getTranslatedPhrase(Ye["FILTERS_VALUES_BLANK_CELLS"]);if(o){const n=i(t,s),c=Object(h["arrayMap"])(n,e=>e.value),u=new Map(n.map(e=>[e.value,this.hot.getCellMeta(e.meta.visualRow,e.meta.visualCol)])),d=_g(c);r&&(o.args[0]=r);const m=[],g=Ig(d,o.args[0],l,e=>{e.checked&&m.push(e.value),gp(fp,this,Mp).call(this,e,u)}),p=e.editedConditionStack.column;a.locale=this.hot.getCellMeta(0,p).locale,a.args=[m],a.command=dd(ap),a.itemsSnapshot=g}else a.args=[],a.command=dd(gd);this.state.setValueAtIndex(t,a)};t(e.editedConditionStack.column,e.editedConditionStack.conditions,e.conditionArgsChange,e.filteredRowsFactory),e.dependentConditionStacks.length&&t(e.dependentConditionStacks[0].column,e.dependentConditionStacks[0].conditions,e.conditionArgsChange,e.filteredRowsFactory,e.editedConditionStack)}getMultipleSelectElement(){return this.elements.filter(e=>e instanceof ep)[0]}getMenuItemDescriptor(){return{key:this.id,name:this.name,isCommand:!1,disableSelection:!0,hidden:()=>this.isHidden(),renderer:(e,t,n,r,s,o)=>{Object(i["addClass"])(t.parentNode,"htFiltersMenuValue");const a=this.hot.rootDocument.createElement("div");return Object(i["addClass"])(a,"htFiltersMenuLabel"),a.textContent=o,t.appendChild(a),t.parentElement.hasAttribute("ghost-table")||Object(h["arrayEach"])(this.elements,e=>t.appendChild(e.element)),t}}}reset(){const e=this.hot.getTranslatedPhrase(Ye["FILTERS_VALUES_BLANK_CELLS"]),t=this._getColumnVisibleValues(),n=t.map(e=>e.value),r=new Map(t.map(e=>[e.value,e.meta])),i=_g(n),s=Ig(i,i,e,e=>{gp(fp,this,Mp).call(this,e,r)});this.getMultipleSelectElement().setItems(s),super.reset(),this.getMultipleSelectElement().setValue(i);const o=this.hot.getPlugin("filters").getSelectedColumn();null!==o&&this.getMultipleSelectElement().setLocale(this.hot.getCellMeta(0,o.visualIndex).locale)}_getColumnVisibleValues(){const e=this.hot.getPlugin("filters").getSelectedColumn();return null===e?[]:Object(h["arrayMap"])(this.hot.getDataAtCol(e.visualIndex),(t,n)=>({value:Ng(t),meta:this.hot.getCellMeta(n,e.visualIndex)}))}}function yp(e){Object(g["isKey"])(e.keyCode,"ESCAPE")&&(this.runLocalHooks("cancel"),Object(s["stopImmediatePropagation"])(e))}function Mp(e,t){this.hot.hasHook("modifyFiltersMultiSelectValue")&&(e.visualValue=this.hot.runHooks("modifyFiltersMultiSelectValue",e.visualValue,t.get(e.value)))}function Sp(e,t){switch(t.type){case"numeric":return it(e,t);default:return e}}function bp(e,t){wp(e,t),t.add(e)}function wp(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Tp(e,t,n){return(t=Op(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Op(e){var t=vp(e,"string");return"symbol"==typeof t?t:t+""}function vp(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function Ep(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}var Cp=new WeakSet;class Lp extends cd{static get BUTTON_OK(){return"ok"}static get BUTTON_CANCEL(){return"cancel"}constructor(e,t){super(e,{id:t.id,stateless:!0}),bp(this,Cp),Tp(this,"name",""),this.name=t.name,this.elements.push(new Sm(this.hot,{type:"button",value:Ye["FILTERS_BUTTONS_OK"],className:"htUIButton htUIButtonOK",identifier:Lp.BUTTON_OK})),this.elements.push(new Sm(this.hot,{type:"button",value:Ye["FILTERS_BUTTONS_CANCEL"],className:"htUIButton htUIButtonCancel",identifier:Lp.BUTTON_CANCEL})),this.registerHooks()}registerHooks(){Object(h["arrayEach"])(this.elements,e=>{e.addLocalHook("click",(e,t)=>Ep(Cp,this,Np).call(this,e,t))})}getMenuItemDescriptor(){return{key:this.id,name:this.name,isCommand:!1,disableSelection:!0,hidden:()=>this.isHidden(),renderer:(e,t)=>(Object(i["addClass"])(t.parentNode,"htFiltersMenuActionBar"),Object(h["arrayEach"])(this.elements,e=>t.appendChild(e.element)),t)}}accept(){this.runLocalHooks("accept")}cancel(){this.runLocalHooks("cancel")}}function Np(e,t){t.options.identifier===pp.BUTTON_OK?this.accept():this.cancel()}function _p(e,t,n){return(t=Ip(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ip(e){var t=Pp(e,"string");return"symbol"==typeof t?t:t+""}function Pp(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}pp=Lp;const xp="ConditionCollection.filteringStates";class Dp{constructor(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];_p(this,"hot",void 0),_p(this,"isMapRegistrable",void 0),_p(this,"filteringStates",new Ri["a"]),_p(this,"previousConditionStack",null),this.hot=e,this.isMapRegistrable=t,!0===this.isMapRegistrable?this.hot.columnIndexMapper.registerMap(xp,this.filteringStates):this.filteringStates.init(this.hot.columnIndexMapper.getNumberOfIndexes())}isEmpty(){return 0===this.getFilteredColumns().length}isMatch(e,t){var n;const r=this.filteringStates.getValueAtIndex(t),i=null!==(n=null===r||void 0===r?void 0:r.conditions)&&void 0!==n?n:[],s=null===r||void 0===r?void 0:r.operation;return this.isMatchInConditions(i,e,s)}isMatchInConditions(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:$m;return!e.length||Bm(n)(e,t)}addCondition(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:$m,r=arguments.length>3?arguments[3]:void 0;const i=this.hot.getCellMeta(0,e).locale,s=Object(h["arrayMap"])(t.args,e=>"string"===typeof e?e.toLocaleLowerCase(i):e),o=t.name||t.command.key;null===this.previousConditionStack&&this.setPreviousConditionStack(this.exportAllConditions()),this.runLocalHooks("beforeAdd",e);const a=this.getOperation(e);if(a){if(a!==n)throw Error(Ds["a"]`The column of index ${e} has been already applied with a \`${a}\`\x20
  207. filter operation. Use \`removeConditions\` to clear the current conditions and then add new ones.\x20
  208. Mind that you cannot mix different types of operations (for instance, if you use \`conjunction\`,\x20
  209. use it consequently for a particular column).`)}else if(Object(d["isUndefined"])(Gm[n]))throw new Error(Ds["a"]`Unexpected operation named \`${n}\`. Possible ones are\x20
  210. \`disjunction\` and \`conjunction\`.`);const l=this.getConditions(e);0===l.length?this.filteringStates.setValueAtIndex(e,{operation:n,conditions:[{name:o,args:s,func:hd(o,s)}]},r):l.push({name:o,args:s,func:hd(o,s)}),this.runLocalHooks("afterAdd",e)}getConditions(e){var t,n;return null!==(t=null===(n=this.filteringStates.getValueAtIndex(e))||void 0===n?void 0:n.conditions)&&void 0!==t?t:[]}getOperation(e){var t;return null===(t=this.filteringStates.getValueAtIndex(e))||void 0===t?void 0:t.operation}getFilteredColumns(){return this.filteringStates.getEntries().map(e=>{let[t]=e;return t})}getColumnStackPosition(e){return this.getFilteredColumns().indexOf(e)}exportAllConditions(){return Object(h["arrayReduce"])(this.filteringStates.getEntries(),(e,t)=>{let[n,{operation:r,conditions:i}]=t;return e.push({column:n,operation:r,conditions:Object(h["arrayMap"])(i,e=>{let{name:t,args:n}=e;return{name:t,args:n}})}),e},[])}importAllConditions(e){this.clean(),Object(h["arrayEach"])(e,e=>{Object(h["arrayEach"])(e.conditions,t=>this.addCondition(e.column,t))})}removeConditions(e){this.setPreviousConditionStack(this.exportAllConditions()),this.runLocalHooks("beforeRemove",e),this.filteringStates.clearValue(e),this.runLocalHooks("afterRemove",e)}clean(){this.runLocalHooks("beforeClean"),this.filteringStates.clear(),this.runLocalHooks("afterClean")}hasConditions(e,t){const n=this.getConditions(e);return t?n.some(e=>e.name===t):n.length>0}setPreviousConditionStack(e){this.previousConditionStack=e}destroy(){this.isMapRegistrable&&this.hot.columnIndexMapper.unregisterMap(xp),this.filteringStates=null,this.clearLocalHooks()}}Object(o["mixin"])(Dp,Js["a"]);var Ap=Dp;function Fp(e,t,n){return(t=Yp(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Yp(e){var t=Hp(e,"string");return"symbol"==typeof t?t:t+""}function Hp(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}class kp{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:()=>[];Fp(this,"conditionCollection",void 0),Fp(this,"columnDataFactory",void 0),this.conditionCollection=e,this.columnDataFactory=t}filter(){let e=[];return Object(h["arrayEach"])(this.conditionCollection.getFilteredColumns(),(t,n)=>{let r=this.columnDataFactory(t);n&&(r=this._getIntersectData(r,e)),e=this.filterByColumn(t,r)}),e}filterByColumn(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];const n=[];return Object(h["arrayEach"])(t,t=>{void 0!==t&&this.conditionCollection.isMatch(t,e)&&n.push(t)}),n}_getIntersectData(e,t){const n=[];return Object(h["arrayEach"])(t,t=>{const r=t.meta.visualRow;void 0!==e[r]&&(n[r]=e[r])}),n}}var Vp=kp;function Up(e,t){Wp(e,t),t.add(e)}function Wp(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Xp(e,t,n){return(t=jp(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function jp(e){var t=Zp(e,"string");return"symbol"==typeof t?t:t+""}function Zp(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function Qp(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}var Kp=new WeakSet;class Gp{constructor(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:()=>[];Up(this,Kp),Xp(this,"hot",void 0),Xp(this,"conditionCollection",void 0),Xp(this,"columnDataFactory",void 0),Xp(this,"changes",[]),Xp(this,"grouping",!1),Xp(this,"latestEditedColumnPosition",-1),Xp(this,"latestOrderStack",[]),this.hot=e,this.conditionCollection=t,this.columnDataFactory=n,this.conditionCollection.addLocalHook("beforeRemove",e=>Qp(Kp,this,Bp).call(this,e)),this.conditionCollection.addLocalHook("afterRemove",e=>this.updateStatesAtColumn(e)),this.conditionCollection.addLocalHook("afterAdd",e=>this.updateStatesAtColumn(e)),this.conditionCollection.addLocalHook("beforeClean",()=>Qp(Kp,this,Jp).call(this)),this.conditionCollection.addLocalHook("afterClean",()=>Qp(Kp,this,zp).call(this))}groupChanges(){this.grouping=!0}flush(){this.grouping=!1,Object(h["arrayEach"])(this.changes,e=>{this.updateStatesAtColumn(e)}),this.changes.length=0}updateStatesAtColumn(e,t){var n=this;if(this.grouping)return void(-1===this.changes.indexOf(e)&&this.changes.push(e));const r=this.conditionCollection.exportAllConditions();let i=this.conditionCollection.getColumnStackPosition(e);-1===i&&(i=this.latestEditedColumnPosition);const s=r.slice(0,i),o=r.slice(i);o.length&&o[0].column===e&&o.shift();const a=Object(pi["curry"])((function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];const i=new Ap(n.hot,!1),s=[].concat(e,r);i.importAllConditions(s);const o=n.columnDataFactory(t);let a;a=i.isEmpty()?o:new Vp(i,e=>n.columnDataFactory(e)).filter(),a=Object(h["arrayMap"])(a,e=>e.meta.visualRow);const l=Lg(a);return i.destroy(),Object(h["arrayFilter"])(o,e=>l(e.meta.visualRow))}))(s),l=[].concat(this.conditionCollection.getConditions(e));this.runLocalHooks("update",{editedConditionStack:{column:e,conditions:l},dependentConditionStacks:o,filteredRowsFactory:a,conditionArgsChange:t})}destroy(){this.clearLocalHooks(),Object(o["objectEach"])(this,(e,t)=>{this[t]=null})}}function Bp(e){this.latestEditedColumnPosition=this.conditionCollection.getColumnStackPosition(e)}function Jp(){this.latestOrderStack=this.conditionCollection.getFilteredColumns()}function zp(){Object(h["arrayEach"])(this.latestOrderStack,e=>{this.updateStatesAtColumn(e)})}Object(o["mixin"])(Gp,Js["a"]);var $p=Gp;function qp(e){const t=vl({initialPage:0,size:()=>e.length,onItemSelect:(t,n)=>{const r=e[t];return r instanceof ep?n:!(r.element&&!Object(i["isVisible"])(r.element))&&void r.focus()}});return t}const ef="filters";function tf(e,t){let n=-1;const r=qp(t),i=n=>()=>{e.isOpened()&&e.getKeyboardShortcutsCtrl().listen(ef),r.setCurrentPage(t.indexOf(n))};function s(i){const s=e.getKeyboardShortcutsCtrl(),o=i.getKeyboardShortcutsCtrl();r.clear(),o.addCustomShortcuts([{keys:[["Tab"],["Shift","Tab"]],forwardToContext:s.getContext(ef),callback:()=>{i.isSubMenu()&&i.close(),s.listen(ef)}}]),i.isSubMenu()||s.addCustomShortcuts([{keys:[["Tab"],["Shift","Tab"]],callback:t=>{const i=e.getNavigator();i.getCurrentPage()>-1&&(n=i.getCurrentPage()),i.clear(),t.shiftKey?r.toPreviousItem():r.toNextItem()}},{keys:[["Escape"]],callback:()=>{e.close()}},{keys:[["Enter"],["Space"]],preventDefault:!1,callback:e=>{const n=t[r.getCurrentPage()];n instanceof Dm&&(n.openOptions(),e.preventDefault()),n instanceof kg&&(n.activate(),e.preventDefault()),n instanceof hm||e.preventDefault()}}],ef)}function o(){e.focus(),e.getKeyboardShortcutsCtrl().listen(ef)}function a(){return n}return t.forEach(e=>{e instanceof hm&&(e.addLocalHook("click",i(e)),e.addLocalHook("focus",i(e)),e.addLocalHook("afterClose",i(e)))}),e.addLocalHook("afterSelectionChange",e=>{e.key.startsWith("filter_")||r.clear()}),e.addLocalHook("afterSubmenuOpen",s),e.addLocalHook("afterOpen",s),{...r,listen:o,getLastMenuPage:a}}var nf=n("00fd");function rf(e,t){of(e,t),t.add(e)}function sf(e,t,n){of(e,t),t.set(e,n)}function of(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function af(e,t,n){return(t=lf(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function lf(e){var t=cf(e,"string");return"symbol"==typeof t?t:t+""}function cf(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function uf(e,t,n){return e.set(df(e,t),n),n}function hf(e,t){return e.get(df(e,t))}function df(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}const mf="filters",gf=250,pf=mf;var ff=new WeakMap,Rf=new WeakSet;class yf extends qt["a"]{static get PLUGIN_KEY(){return mf}static get PLUGIN_PRIORITY(){return gf}static get PLUGIN_DEPS(){return["plugin:DropdownMenu","plugin:HiddenRows","cell-type:checkbox"]}constructor(e){super(e),rf(this,Rf),af(this,"dropdownMenuPlugin",null),af(this,"conditionCollection",null),af(this,"conditionUpdateObserver",null),af(this,"components",new Map([["filter_by_condition",null],["filter_operators",null],["filter_by_condition2",null],["filter_by_value",null],["filter_action_bar",null]])),af(this,"filtersRowsMap",null),sf(this,ff,void 0),this.hot.addHook("afterGetColHeader",(e,t)=>df(Rf,this,Ef).call(this,e,t))}isEnabled(){return!!this.hot.getSettings()[mf]}enablePlugin(){if(this.enabled)return;this.filtersRowsMap=this.hot.rowIndexMapper.registerMap(this.pluginName,new nf["a"]),this.dropdownMenuPlugin=this.hot.getPlugin("dropdownMenu");const e=this.hot.getSettings().dropdownMenu,t=e&&e.uiContainer||this.hot.rootDocument.body,n=e=>(e.addLocalHook("accept",()=>df(Rf,this,Tf).call(this,"accept")),e.addLocalHook("cancel",()=>df(Rf,this,Tf).call(this,"cancel")),e.addLocalHook("change",t=>df(Rf,this,Of).call(this,e,t)),e),r=()=>this.hot.getTranslatedPhrase(Ye["FILTERS_DIVS_FILTER_BY_CONDITION"])+":",i=()=>this.hot.getTranslatedPhrase(Ye["FILTERS_DIVS_FILTER_BY_VALUE"])+":";if(!this.components.get("filter_by_condition")){const e=new Zm(this.hot,{id:"filter_by_condition",name:r,addSeparator:!1,menuContainer:t});e.addLocalHook("afterClose",()=>df(Rf,this,vf).call(this)),this.components.set("filter_by_condition",n(e))}if(this.components.get("filter_operators")||this.components.set("filter_operators",new Tg(this.hot,{id:"filter_operators",name:"Operators"})),!this.components.get("filter_by_condition2")){const e=new Zm(this.hot,{id:"filter_by_condition2",name:"",addSeparator:!0,menuContainer:t});e.addLocalHook("afterClose",()=>df(Rf,this,vf).call(this)),this.components.set("filter_by_condition2",n(e))}if(this.components.get("filter_by_value")||this.components.set("filter_by_value",n(new Rp(this.hot,{id:"filter_by_value",name:i}))),this.components.get("filter_action_bar")||this.components.set("filter_action_bar",n(new Lp(this.hot,{id:"filter_action_bar",name:"Action bar"}))),this.conditionCollection||(this.conditionCollection=new Ap(this.hot)),this.conditionUpdateObserver||(this.conditionUpdateObserver=new $p(this.hot,this.conditionCollection,e=>this.getDataMapAtColumn(e)),this.conditionUpdateObserver.addLocalHook("update",e=>df(Rf,this,Cf).call(this,e))),this.components.forEach(e=>e.show()),this.addHook("afterDropdownMenuDefaultOptions",e=>df(Rf,this,wf).call(this,e)),this.addHook("afterDropdownMenuShow",()=>df(Rf,this,Sf).call(this)),this.addHook("afterDropdownMenuHide",()=>df(Rf,this,bf).call(this)),this.addHook("afterChange",e=>df(Rf,this,Mf).call(this,e)),this.hot.getSettings().dropdownMenu&&this.dropdownMenuPlugin&&(this.dropdownMenuPlugin.disablePlugin(),this.dropdownMenuPlugin.enablePlugin()),!hf(ff,this)&&this.dropdownMenuPlugin.enabled){const e=this.dropdownMenuPlugin.menu,t=[{focus:()=>{const t=e.getNavigator(),n=hf(ff,this).getLastMenuPage();e.focus(),n>0?t.setCurrentPage(n):t.toFirstItem()}},...Array.from(this.components).map(e=>{let[,t]=e;return t.getElements()}).flat()];uf(ff,this,tf(e,t));const n=e=>{hf(ff,this).listen(),e.preventDefault(),Object(g["isKey"])(e.keyCode,"TAB")&&(e.shiftKey?hf(ff,this).toPreviousItem():hf(ff,this).toNextItem())};this.components.get("filter_by_value").addLocalHook("listTabKeydown",n),this.components.get("filter_by_condition").addLocalHook("selectTabKeydown",n)}this.registerShortcuts(),super.enablePlugin()}disablePlugin(){var e;this.enabled&&(null!==(e=this.dropdownMenuPlugin)&&void 0!==e&&e.enabled&&this.dropdownMenuPlugin.menu.clearLocalHooks(),this.components.forEach((e,t)=>{e.destroy(),this.components.set(t,null)}),this.conditionCollection.destroy(),this.conditionCollection=null,this.hot.rowIndexMapper.unregisterMap(this.pluginName));this.unregisterShortcuts(),super.disablePlugin()}registerShortcuts(){this.hot.getShortcutManager().getContext("grid").addShortcut({keys:[["Alt","A"]],stopPropagation:!0,callback:()=>{const e=this.hot.getSelected();this.clearConditions(),this.filter(),e&&this.hot.selectCells(e)},group:pf})}unregisterShortcuts(){this.hot.getShortcutManager().getContext("grid").removeShortcutsByGroup(pf)}addCondition(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:$m;const i=this.hot.toPhysicalColumn(e);this.conditionCollection.addCondition(i,{command:{key:t},args:n},r)}removeConditions(e){const t=this.hot.toPhysicalColumn(e);this.conditionCollection.removeConditions(t)}clearConditions(e){if(void 0===e)this.conditionCollection.clean();else{const t=this.hot.toPhysicalColumn(e);this.conditionCollection.removeConditions(t)}}filter(){const{navigableHeaders:e}=this.hot.getSettings(),t=this._createDataFilter(),n=!this.conditionCollection.isEmpty();let r=[];const i=this.conditionCollection.exportAllConditions(),s=this.hot.runHooks("beforeFilter",i,this.conditionCollection.previousConditionStack);if(!1!==s)if(n){const n=[];this.hot.batchExecution(()=>{this.filtersRowsMap.clear(),r=Object(h["arrayMap"])(t.filter(),e=>e.meta.visualRow);const e=Lg(r);Object(nt["rangeEach"])(this.hot.countSourceRows()-1,t=>{e(t)||n.push(t)}),Object(h["arrayEach"])(n,e=>{this.filtersRowsMap.setValueAtIndex(e,!0)})},!0),e||r.length||this.hot.deselectCell()}else this.filtersRowsMap.clear();this.hot.runHooks("afterFilter",i),this.conditionCollection.setPreviousConditionStack(null),this.hot.view.adjustElementsSize(),this.hot.render(),this.hot.selection.isSelected()&&this.hot.selectCell(e?-1:0,this.hot.getSelectedRangeLast().highlight.col)}getSelectedColumn(){var e;const t=null===(e=this.hot.getSelectedRangeLast())||void 0===e?void 0:e.highlight;return t?{visualIndex:t.col,physicalIndex:this.hot.toPhysicalColumn(t.col)}:null}getDataMapAtColumn(e){const t=this.hot.toVisualColumn(e),n=[];return Object(h["arrayEach"])(this.hot.getSourceDataAtCol(t),(e,r)=>{var i;const{row:s,col:o,visualCol:a,visualRow:l,type:c,instance:u,dateFormat:h,locale:d}=this.hot.getCellMeta(r,t),m=null!==(i=this.hot.getDataAtCell(this.hot.toVisualRow(r),t))&&void 0!==i?i:e;n.push({meta:{row:s,col:o,visualCol:a,visualRow:l,type:c,instance:u,dateFormat:h,locale:d},value:Ng(m)})}),n}updateValueComponentCondition(e){const t=this.hot.getDataAtCol(e),n=_g(t);this.conditionUpdateObserver.updateStatesAtColumn(e,n)}restoreComponents(e){var t;const n=null===(t=this.getSelectedColumn())||void 0===t?void 0:t.physicalIndex;e.forEach(e=>{e.isHidden()||e.restoreState(n)}),this.updateDependentComponentsVisibility()}getOperationBasedOnArguments(e,t,n,r){let i=e;return i===tg&&t.command.key!==gd&&n.command.key!==gd&&r.command.key!==gd?i=ig:r.command.key!==gd&&(t.command.key!==gd&&n.command.key!==gd||(i=$m)),i}setListeningDropdownMenu(){this.dropdownMenuPlugin&&this.dropdownMenuPlugin.setListening()}updateDependentComponentsVisibility(){const e=this.components.get("filter_by_condition"),{command:t}=e.getState(),n=[this.components.get("filter_by_condition2"),this.components.get("filter_operators")];t.showOperators?this.showComponents(...n):this.hideComponents(...n)}_createDataFilter(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.conditionCollection;return new Vp(e,e=>this.getDataMapAtColumn(e))}getIndexesOfComponents(){const e=[];if(!this.dropdownMenuPlugin)return e;const t=this.dropdownMenuPlugin.menu;for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Object(h["arrayEach"])(r,n=>{Object(h["arrayEach"])(t.menuItems,(t,r)=>{t.key===n.getMenuItemDescriptor().key&&e.push(r)})}),e}changeComponentsVisibility(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];if(!this.dropdownMenuPlugin)return;const t=this.dropdownMenuPlugin.menu,n=t.hotMenu,r=n.getPlugin("hiddenRows");for(var i=arguments.length,s=new Array(i>1?i-1:0),o=1;o<i;o++)s[o-1]=arguments[o];const a=this.getIndexesOfComponents(...s);e?r.showRows(a):r.hideRows(a),n.render()}hideComponents(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];this.changeComponentsVisibility(!1,...t)}showComponents(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];this.changeComponentsVisibility(!0,...t)}destroy(){this.enabled&&(this.components.forEach((e,t)=>{null!==e&&(e.destroy(),this.components.set(t,null))}),this.conditionCollection.destroy(),this.conditionUpdateObserver.destroy(),this.hot.rowIndexMapper.unregisterMap(this.pluginName)),super.destroy()}}function Mf(e){e&&Object(h["arrayEach"])(e,e=>{const[,t]=e,n=this.hot.propToCol(t);this.conditionCollection.hasConditions(n)&&this.updateValueComponentCondition(n)})}function Sf(){const e=this.dropdownMenuPlugin.menu;this.restoreComponents(Array.from(this.components.values())),e.updateMenuDimensions()}function bf(){this.components.get("filter_by_condition").getSelectElement().closeOptions(),this.components.get("filter_by_condition2").getSelectElement().closeOptions()}function wf(e){e.items.push({name:Io}),this.components.forEach(t=>{e.items.push(t.getMenuItemDescriptor())})}function Tf(e){var t;if("accept"===e){const e=this.getSelectedColumn();var n;if(null===e)return void(null===(n=this.dropdownMenuPlugin)||void 0===n||n.close());const{physicalIndex:t}=e,r=this.components.get("filter_by_condition").getState(),i=this.components.get("filter_by_condition2").getState(),s=this.components.get("filter_by_value").getState(),o=this.getOperationBasedOnArguments(this.components.get("filter_operators").getActiveOperationId(),r,i,s);this.conditionUpdateObserver.groupChanges();let a=this.conditionCollection.getColumnStackPosition(t);-1===a&&(a=void 0),this.conditionCollection.removeConditions(t),r.command.key!==gd&&(this.conditionCollection.addCondition(t,r,o,a),i.command.key!==gd&&this.conditionCollection.addCondition(t,i,o,a)),s.command.key!==gd&&this.conditionCollection.addCondition(t,s,o,a),this.conditionUpdateObserver.flush(),this.components.forEach(e=>e.saveState(t)),this.filtersRowsMap.clear(),this.filter()}null===(t=this.dropdownMenuPlugin)||void 0===t||t.close()}function Of(e,t){this.updateDependentComponentsVisibility(),e.constructor!==Zm||t.inputsCount||this.setListeningDropdownMenu()}function vf(){this.setListeningDropdownMenu()}function Ef(e,t){const n=this.hot.toPhysicalColumn(e);this.enabled&&this.conditionCollection.hasConditions(n)?Object(i["addClass"])(t,"htFiltersActive"):Object(i["removeClass"])(t,"htFiltersActive")}function Cf(e){var t;if(null===(t=this.dropdownMenuPlugin)||void 0===t||!t.enabled)return;const{editedConditionStack:{conditions:n,column:r}}=e,i=n.filter(e=>e.name===ap),s=n.filter(e=>e.name!==ap);if(i.length>=2||s.length>=3)Object(Qr["b"])(Ds["a"]`The filter conditions have been applied properly, but couldn’t be displayed visually.\x20
  211. The overall amount of conditions exceed the capability of the dropdown menu.\x20
  212. For more details see the documentation.`);else{const t=this.conditionCollection.getOperation(r);this.components.get("filter_by_condition").updateState(s[0],r),this.components.get("filter_by_condition2").updateState(s[1],r),this.components.get("filter_operators").updateState(t,r),this.components.get("filter_by_value").updateState(e)}}n("e9c4");const Lf="internal-use-in-handsontable",Nf={licenseKey:Lf,useArrayArithmetic:!0,useColumnIndex:!1,useStats:!1,evaluateNullToZero:!0,precisionEpsilon:1e-13,precisionRounding:14,smartRounding:!0,leapYear1900:!1,nullDate:{year:1899,month:12,day:30},nullYear:30,dateFormats:["DD/MM/YYYY","DD/MM/YY"],timeFormats:["hh:mm","hh:mm:ss.sss"],matchWholeCell:!0,useRegularExpressions:!1,useWildcards:!0,functionArgSeparator:",",thousandSeparator:"",decimalSeparator:".",language:"enGB"};function _f(e){var t;return{maxColumns:e.maxColumns,maxRows:e.maxRows,language:null===(t=e[UR])||void 0===t||null===(t=t.language)||void 0===t?void 0:t.langCode}}function If(e){return Object.keys(e).reduce((t,n)=>("hyperformula"!==n&&(t[n]=e[n]),t),{})}function Pf(e){var t;const n=e[UR],r=If(null!==n&&void 0!==n&&null!==(t=n.engine)&&void 0!==t&&t.hyperformula?n.engine:{}),i=_f(e);return{...Nf,...r,...i}}function xf(e){var t;const n=e[UR],r=If(null!==n&&void 0!==n&&null!==(t=n.engine)&&void 0!==t&&t.hyperformula?n.engine:{}),i=_f(e);return{...r,...i}}function Df(e,t){return Object.keys(t).some(n=>void 0!==t[n]&&t[n]!==e[n])}function Af(){const e="engine_relationship",t=Object(Fi["a"])(UR);return t.hasItem(e)||t.register(e,new Map),t.getItem(e)}function Ff(){const e="shared_engine_usage",t=Object(Fi["a"])(UR);return t.hasItem(e)||t.register(e,new Map),t.getItem(e)}function Yf(e){const t=e.getSettings(),n=t[UR],r=null===n||void 0===n?void 0:n.engine;if(!0===n)return null;if(Object(d["isUndefined"])(r))return null;var i;if("function"===typeof r.hyperformula||"function"===typeof r)return Hf(null!==(i=r.hyperformula)&&void 0!==i?i:r,t,e);if("object"===typeof r&&Object(d["isUndefined"])(r.hyperformula)){const t=Af(),n=Ff().get(r);return t.has(r)||t.set(r,[]),t.get(r).push(e),n&&n.push(e.guid),r.getConfig().licenseKey||r.updateConfig({licenseKey:Lf}),r.getConfig().leapYear1900===Nf.leapYear1900&&!1!==Object(o["isObjectEqual"])(r.getConfig().nullDate,Nf.nullDate)||Object(Qr["b"])(Ds["a"]`If you use HyperFormula with Handsontable, keep the default \`leapYear1900\` and \`nullDate\`
  213. settings. Otherwise, HyperFormula's dates may not sync correctly with Handsontable's dates.`),r}return null}function Hf(e,t,n){const r=t[UR],i=Pf(t),s=Af(),o=Ff();Uf(e,r.functions),Wf(e,r.language);const a=e.buildEmpty(i);return s.set(a,[n]),o.set(a,[n.guid]),Xf(a,r.namedExpressions),a.on("sheetAdded",()=>{a.rebuildAndRecalculate()}),a.on("sheetRemoved",()=>{a.rebuildAndRecalculate()}),a}function kf(e){var t;const n=Af(),r=0===n.size?[]:Array.from(null!==(t=n.get(e))&&void 0!==t?t:[]);return new Map(r.map(e=>[e.getPlugin("formulas").sheetId,e]))}function Vf(e,t){if(e){const n=Af(),r=n.get(e),i=Ff(),s=i.get(e);r&&r.includes(t)&&(r.splice(r.indexOf(t),1),0===r.length&&n.delete(e)),s&&s.includes(t.guid)&&(s.splice(s.indexOf(t.guid),1),0===s.length&&(i.delete(e),e.destroy()))}}function Uf(e,t){t&&t.forEach(t=>{const{name:n,plugin:r,translations:i}=t;try{e.registerFunction(n,r,i)}catch(s){Object(Qr["b"])(s.message)}})}function Wf(e,t){if(t){const{langCode:r}=t;try{e.registerLanguage(r,t)}catch(n){Object(Qr["b"])(n.message)}}}function Xf(e,t){t&&(e.suspendEvaluation(),t.forEach(t=>{const{name:n,expression:r,scope:i,options:s}=t;try{e.addNamedExpression(n,r,i,s)}catch(o){Object(Qr["b"])(o.message)}}),e.resumeEvaluation())}function jf(e,t){return!Object(d["isUndefined"])(t)&&e.doesSheetExist(t)||(t=e.addSheet(t)),t}const Zf="DD/MM/YYYY";function Qf(e){return"string"===typeof e&&"'"===e.charAt(0)&&"="===e.charAt(1)}function Kf(e){return Qf(e)?e.substr(1):e}function Gf(e){return"string"===typeof e&&e.startsWith("=")}function Bf(e,t){return"string"===typeof e&&"date"===t}function Jf(e,t){return I(e,t,!0).isValid()}function zf(e,t){return I(e,t,!0).format(Zf)}function $f(e,t){return I(e,Zf,!0).format(t)}function qf(e,t){const n=-1,r=new Date(Date.UTC(0,0,e+n));return I(r).format(t)}function eR(e,t,n){const r=Array.from(Array(n).keys()).filter(t=>!1===e.includes(t));var i;return 0===t?null!==(i=r[t])&&void 0!==i?i:0:r[t-1]+1}function tR(e,t){const n=[];return e.forEach(e=>{const r={from:e,to:t};n.forEach(e=>{const t=e.from>e.to,n=e.to<=r.from,i=e.from>r.from;i&&n&&t&&(r.from+=1)}),r.from>=t&&(t+=1),n.push(r)}),n}function nR(e){return e.forEach((t,n)=>{const r=e.slice(n+1);r.forEach(e=>{const n=e.from<e.to;e.from>t.from&&n&&(e.from-=1)})}),e}function rR(e,t,n){const r=tR(e,eR(e,t,n));return nR(r)}function iR(e,t,n){sR(e,t),t.set(e,n)}function sR(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function oR(e,t){return e.get(lR(e,t))}function aR(e,t,n){return e.set(lR(e,t),n),n}function lR(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}var cR=new WeakMap,uR=new WeakMap,hR=new WeakMap,dR=new WeakMap,mR=new WeakMap,gR=new WeakMap,pR=new WeakMap;class fR{constructor(e,t,n){iR(this,cR,void 0),iR(this,uR,void 0),iR(this,hR,void 0),iR(this,dR,[]),iR(this,mR,[]),iR(this,gR,void 0),iR(this,pR,[]),aR(cR,this,e),aR(uR,this,t),aR(hR,this,n)}setRemovedHfIndexes(e){return aR(pR,this,e.map(e=>{const t=oR(uR,this).getVisualFromPhysicalIndex(e);return this.getHfIndexFromVisualIndex(t)})),oR(pR,this)}getRemovedHfIndexes(){return oR(pR,this)}getHfIndexFromVisualIndex(e){const t=oR(uR,this).getIndexesSequence(),n=oR(uR,this).getNotTrimmedIndexes();return t.indexOf(n[e])}syncMoves(e){const t=1,n=`move${Object(m["toUpperCaseFirst"])(oR(cR,this))}s`;oR(hR,this).getEngine().batch(()=>{e.forEach(e=>{const r=e.from!==e.to,i=e.from+1!==e.to;r&&i&&oR(hR,this).getEngine()[n](oR(hR,this).getSheetId(),e.from,t,e.to)})})}storeMovesInformation(e,t,n){!1!==n&&(aR(mR,this,e.map(e=>this.getHfIndexFromVisualIndex(e))),aR(gR,this,this.getHfIndexFromVisualIndex(t)))}calculateAndSyncMoves(e,t){if(oR(hR,this).isPerformingUndoRedo())return;if(!1===e||!1===t)return;const n=rR(oR(mR,this),oR(gR,this),oR(uR,this).getNumberOfIndexes());null===oR(hR,this).getSheetId()?oR(hR,this).getPostponeAction(()=>this.syncMoves(n)):this.syncMoves(n)}getIndexesChangeSyncMethod(){const e=`set${Object(m["toUpperCaseFirst"])(oR(cR,this))}Order`;return t=>{if(oR(hR,this).isPerformingUndoRedo())return;const n=oR(uR,this).getIndexesSequence();if("update"===t&&n.length>0){const t=oR(dR,this).map(e=>n.indexOf(e)),r=oR(hR,this).getEngine().getSheetDimensions(oR(hR,this).getSheetId());let i;i="row"===oR(cR,this)?r.height:r.width;const s=t.length;for(let e=s;e<i;e+=1)t.push(e);oR(hR,this).getEngine()[e](oR(hR,this).getSheetId(),t)}aR(dR,this,n)}}init(){aR(dR,this,oR(uR,this).getIndexesSequence())}}var RR=fR;function yR(e,t,n){MR(e,t),t.set(e,n)}function MR(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function SR(e,t){return e.get(wR(e,t))}function bR(e,t,n){return e.set(wR(e,t),n),n}function wR(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}var TR=new WeakMap,OR=new WeakMap,vR=new WeakMap,ER=new WeakMap,CR=new WeakMap,LR=new WeakMap,NR=new WeakMap;class _R{constructor(e,t,n){yR(this,TR,void 0),yR(this,OR,void 0),yR(this,vR,void 0),yR(this,ER,!1),yR(this,CR,!1),yR(this,LR,null),yR(this,NR,null),bR(TR,this,new RR("row",e,this)),bR(OR,this,new RR("column",t,this)),bR(vR,this,n)}getForAxis(e){return SR("row"===e?TR:OR,this)}setPerformUndo(e){bR(ER,this,e)}setPerformRedo(e){bR(CR,this,e)}isPerformingUndoRedo(){return SR(ER,this)||SR(CR,this)}getSheetId(){return SR(NR,this)}getEngine(){return SR(LR,this)}getPostponeAction(){return SR(vR,this)}setupSyncEndpoint(e,t){bR(LR,this,e),bR(NR,this,t),SR(TR,this).init(),SR(OR,this).init()}}var IR=_R;function PR(e,t){YR(e,t),t.add(e)}function xR(e,t,n){return(t=DR(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function DR(e){var t=AR(e,"string");return"symbol"==typeof t?t:t+""}function AR(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function FR(e,t,n){YR(e,t),t.set(e,n)}function YR(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function HR(e,t,n){return e.set(VR(e,t),n),n}function kR(e,t){return e.get(VR(e,t))}function VR(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}const UR="formulas",WR=["maxRows","maxColumns","language"],XR=260;ge["a"].getSingleton().register("afterNamedExpressionAdded"),ge["a"].getSingleton().register("afterNamedExpressionRemoved"),ge["a"].getSingleton().register("afterSheetAdded"),ge["a"].getSingleton().register("afterSheetRemoved"),ge["a"].getSingleton().register("afterSheetRenamed"),ge["a"].getSingleton().register("afterFormulasValuesUpdate");const jR=e=>"UndoRedo.undo"===e||"UndoRedo.redo"===e||"auto"===e;var ZR=new WeakMap,QR=new WeakMap,KR=new WeakMap,GR=new WeakSet;class BR extends qt["a"]{constructor(){var e;super(...arguments),e=this,PR(this,GR),FR(this,ZR,!1),FR(this,QR,!1),FR(this,KR,[["valuesUpdated",function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return VR(GR,e,gy).call(e,...n)}],["namedExpressionAdded",function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return VR(GR,e,py).call(e,...n)}],["namedExpressionRemoved",function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return VR(GR,e,fy).call(e,...n)}],["sheetAdded",function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return VR(GR,e,Ry).call(e,...n)}],["sheetRenamed",function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return VR(GR,e,yy).call(e,...n)}],["sheetRemoved",function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return VR(GR,e,My).call(e,...n)}]]),xR(this,"staticRegister",Object(Fi["a"])("formulas")),xR(this,"engine",null),xR(this,"sheetName",null),xR(this,"indexSyncer",null),xR(this,"rowAxisSyncer",null),xR(this,"columnAxisSyncer",null)}static get PLUGIN_KEY(){return UR}static get PLUGIN_PRIORITY(){return XR}static get SETTING_KEYS(){return[UR,...WR]}get sheetId(){return null===this.sheetName?null:this.engine.getSheetId(this.sheetName)}isEnabled(){return!!this.hot.getSettings()[UR]}enablePlugin(){var e,t=this;if(!this.enabled)if(this.engine=null!==(e=Yf(this.hot))&&void 0!==e?e:this.engine,this.engine){if(null!==this.sheetName&&!this.engine.doesSheetExist(this.sheetName)){const e=this.addSheet(this.sheetName,this.hot.getSourceDataArray());!1!==e&&(this.sheetName=e)}this.addHook("beforeLoadData",(function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return VR(GR,t,$R).call(t,...n)})),this.addHook("afterLoadData",(function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return VR(GR,t,ey).call(t,...n)})),this.addHook("beforeUpdateData",(function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return VR(GR,t,$R).call(t,...n)})),this.addHook("afterUpdateData",(function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return VR(GR,t,ey).call(t,...n)})),this.addHook("modifyData",(function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return VR(GR,t,ty).call(t,...n)})),this.addHook("modifySourceData",(function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return VR(GR,t,ny).call(t,...n)})),this.addHook("beforeValidate",(function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return VR(GR,t,JR).call(t,...n)})),this.addHook("afterSetSourceDataAtCell",(function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return VR(GR,t,iy).call(t,...n)})),this.addHook("afterSetDataAtCell",(function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return VR(GR,t,ry).call(t,...n)})),this.addHook("afterSetDataAtRowProp",(function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return VR(GR,t,ry).call(t,...n)})),this.addHook("beforeCreateRow",(function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return VR(GR,t,sy).call(t,...n)})),this.addHook("beforeCreateCol",(function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return VR(GR,t,oy).call(t,...n)})),this.addHook("afterCreateRow",(function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return VR(GR,t,cy).call(t,...n)})),this.addHook("afterCreateCol",(function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return VR(GR,t,uy).call(t,...n)})),this.addHook("beforeRemoveRow",(function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return VR(GR,t,ay).call(t,...n)})),this.addHook("beforeRemoveCol",(function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return VR(GR,t,ly).call(t,...n)})),this.addHook("afterRemoveRow",(function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return VR(GR,t,hy).call(t,...n)})),this.addHook("afterRemoveCol",(function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return VR(GR,t,dy).call(t,...n)})),this.indexSyncer=new IR(this.hot.rowIndexMapper,this.hot.columnIndexMapper,e=>{this.hot.addHookOnce("init",()=>{e()})}),this.rowAxisSyncer=this.indexSyncer.getForAxis("row"),this.columnAxisSyncer=this.indexSyncer.getForAxis("column"),this.hot.addHook("afterRowSequenceChange",this.rowAxisSyncer.getIndexesChangeSyncMethod()),this.hot.addHook("afterColumnSequenceChange",this.columnAxisSyncer.getIndexesChangeSyncMethod()),this.hot.addHook("beforeRowMove",(e,t,n,r)=>{this.rowAxisSyncer.storeMovesInformation(e,t,r)}),this.hot.addHook("beforeColumnMove",(e,t,n,r)=>{this.columnAxisSyncer.storeMovesInformation(e,t,r)}),this.hot.addHook("afterRowMove",(e,t,n,r,i)=>{this.rowAxisSyncer.calculateAndSyncMoves(r,i)}),this.hot.addHook("afterColumnMove",(e,t,n,r,i)=>{this.columnAxisSyncer.calculateAndSyncMoves(r,i)}),this.hot.addHook("beforeColumnFreeze",(e,t)=>{this.columnAxisSyncer.storeMovesInformation([e],this.hot.getSettings().fixedColumnsStart,t)}),this.hot.addHook("afterColumnFreeze",(e,t)=>{this.columnAxisSyncer.calculateAndSyncMoves(t,t)}),this.hot.addHook("beforeColumnUnfreeze",(e,t)=>{this.columnAxisSyncer.storeMovesInformation([e],this.hot.getSettings().fixedColumnsStart-1,t)}),this.hot.addHook("afterColumnUnfreeze",(e,t)=>{this.columnAxisSyncer.calculateAndSyncMoves(t,t)}),this.addHook("afterCellMetaReset",(function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return VR(GR,t,qR).call(t,...n)})),this.addHook("beforeUndo",()=>{this.indexSyncer.setPerformUndo(!0),this.engine.undo()}),this.addHook("beforeRedo",()=>{this.indexSyncer.setPerformRedo(!0),this.engine.redo()}),this.addHook("afterUndo",()=>{this.indexSyncer.setPerformUndo(!1)}),this.addHook("afterUndo",()=>{this.indexSyncer.setPerformRedo(!1)}),this.addHook("afterDetachChild",(function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return VR(GR,t,my).call(t,...n)})),this.addHook("beforeAutofill",(function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return VR(GR,t,zR).call(t,...n)})),kR(KR,this).forEach(e=>{let[t,n]=e;return this.engine.on(t,n)}),super.enablePlugin()}else Object(Qr["b"])("Missing the required `engine` key in the Formulas settings. Please fill it with either an engine class or an engine instance.")}disablePlugin(){kR(KR,this).forEach(e=>{let[t,n]=e;return this.engine.off(t,n)}),Vf(this.engine,this.hot),this.engine=null,super.disablePlugin()}updatePlugin(e){const t=xf(this.hot.getSettings());Df(this.engine.getConfig(),t)&&this.engine.updateConfig(t);const n=this.hot.getSettings()[UR];if(Object(d["isDefined"])(n)&&Object(d["isDefined"])(n.sheetName)&&n.sheetName!==this.sheetName&&this.switchSheet(n.sheetName),!e.data&&null===this.sheetName){const e=this.hot.getSettings()[UR].sheetName;e&&this.engine.doesSheetExist(e)?this.switchSheet(this.sheetName):this.sheetName=this.addSheet(null!==e&&void 0!==e?e:void 0,this.hot.getSourceDataArray())}super.updatePlugin(e)}destroy(){kR(KR,this).forEach(e=>{var t;let[n,r]=e;return null===(t=this.engine)||void 0===t?void 0:t.off(n,r)}),HR(KR,this,null),Vf(this.engine,this.hot),this.engine=null,super.destroy()}addSheet(e,t){if(Object(d["isDefined"])(t)&&!Object(Pg["isArrayOfArrays"])(t))return Object(Qr["b"])("The provided data should be an array of arrays."),!1;if(void 0!==e&&null!==e&&this.engine.doesSheetExist(e))return Object(Qr["b"])("Sheet with the provided name already exists."),!1;try{const n=this.engine.addSheet(null!==e&&void 0!==e?e:void 0);return t&&this.engine.setSheetContent(this.engine.getSheetId(n),t),n}catch(n){return Object(Qr["b"])(n.message),!1}}switchSheet(e){if(!this.engine.doesSheetExist(e))return void Object(Qr["a"])(`The sheet named \`${e}\` does not exist, switch aborted.`);this.sheetName=e;const t=this.engine.getSheetSerialized(this.sheetId);t.length>0&&this.hot.loadData(t,Object(m["toUpperCaseFirst"])(UR)+".switchSheet")}getCellType(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.sheetId;const r=this.hot.toPhysicalRow(e),i=this.hot.toPhysicalColumn(t);return null!==r&&null!==i?this.engine.getCellType({sheet:n,row:this.rowAxisSyncer.getHfIndexFromVisualIndex(e),col:this.columnAxisSyncer.getHfIndexFromVisualIndex(t)}):"EMPTY"}isFormulaCellType(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.sheetId;return this.engine.doesCellHaveFormula({sheet:n,row:this.rowAxisSyncer.getHfIndexFromVisualIndex(e),col:this.columnAxisSyncer.getHfIndexFromVisualIndex(t)})}renderDependentSheets(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const n=new Set;e.forEach(e=>{var t;const r=null===e||void 0===e||null===(t=e.address)||void 0===t?void 0:t.sheet;void 0!==r&&(n.has(r)||n.add(r))}),kf(this.engine).forEach((e,r)=>{var i;(t||r!==this.sheetId)&&n.has(r)&&(e.render(),null===(i=e.view)||void 0===i||i.adjustElementsSize())})}validateDependentCells(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];const n=e=>{var t;const{row:n,col:r,sheet:i}=null!==(t=null===e||void 0===e?void 0:e.address)&&void 0!==t?t:{};return Object(d["isDefined"])(i)?`${i}:${n}x${r}`:""},r=new Set(t.map(e=>n(e)));e.forEach(e=>{var t,i;const{row:s,col:o}=null!==(t=e.address)&&void 0!==t?t:{};if(!1===Object(d["isDefined"])(s)||!1===Object(d["isDefined"])(o)||s>=this.hot.countRows()||o>=this.hot.countCols())return;const a=null===e||void 0===e||null===(i=e.address)||void 0===i?void 0:i.sheet,l=n(e);if(void 0!==a&&!r.has(l)){const e=kf(this.engine).get(a);if(!e)return;e.validateCell(e.getDataAtCell(s,o),e.getCellMeta(s,o),()=>{})}})}syncChangeWithEngine(e,t,n){const r={row:this.rowAxisSyncer.getHfIndexFromVisualIndex(e),col:this.columnAxisSyncer.getHfIndexFromVisualIndex(t),sheet:this.sheetId};if(!this.engine.isItPossibleToSetCellContents(r))return void Object(Qr["b"])("Not possible to set cell data at "+JSON.stringify(r));const i=this.hot.getCellMeta(e,t);return Bf(n,i.type)&&(Jf(n,i.dateFormat)?n=zf(n,i.dateFormat):!1===Gf(n)&&(n="'"+n)),this.engine.setCellContents(r,n)}}function JR(e,t,n){const r=this.hot.propToCol(n);if(this.isFormulaCellType(t,r)){const e={row:this.rowAxisSyncer.getHfIndexFromVisualIndex(t),col:this.columnAxisSyncer.getHfIndexFromVisualIndex(r),sheet:this.sheetId},n=this.hot.getCellMeta(t,r);let i=this.engine.getCellValue(e);return"date"===n.type&&Object(nt["isNumeric"])(i)&&(i=qf(i,n.dateFormat)),"object"===typeof i&&null!==i?i.value:i}return e}function zR(e,t,n){const{row:r,col:i}=t.getTopStartCorner(),{row:s,col:o}=t.getBottomEndCorner(),{row:a,col:l}=n.getTopStartCorner(),{row:c,col:u}=n.getBottomEndCorner(),h={start:{row:this.rowAxisSyncer.getHfIndexFromVisualIndex(r),col:this.columnAxisSyncer.getHfIndexFromVisualIndex(i),sheet:this.sheetId},end:{row:this.rowAxisSyncer.getHfIndexFromVisualIndex(s),col:this.columnAxisSyncer.getHfIndexFromVisualIndex(o),sheet:this.sheetId}},d={start:{row:this.rowAxisSyncer.getHfIndexFromVisualIndex(a),col:this.columnAxisSyncer.getHfIndexFromVisualIndex(l),sheet:this.sheetId},end:{row:this.rowAxisSyncer.getHfIndexFromVisualIndex(c),col:this.columnAxisSyncer.getHfIndexFromVisualIndex(u),sheet:this.sheetId}};if(!1===this.engine.isItPossibleToSetCellContents(d))return!1;const m=this.engine.getFillRangeData(h,d),{row:g,col:p}=h.start,{row:f,col:R}=h.end,y=f-g+1,M=R-p+1;for(let S=0;S<m.length;S+=1)for(let e=0;e<m[S].length;e+=1){const t=m[S][e],n=g+S%y,r=p+e%M,i=this.hot.getCellMeta(n,r);Bf(t,i.type)&&(t.startsWith("'")?m[S][e]=t.slice(1):!1===this.isFormulaCellType(n,r,this.sheetId)&&(m[S][e]=$f(t,i.dateFormat)))}return m}function $R(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";n.includes(Object(m["toUpperCaseFirst"])(UR))||HR(QR,this,Object(d["isUndefined"])(this.hot.getSettings().data))}function qR(){const e=this.hot.getSourceDataArray();let t=!1;e.forEach((n,r)=>{n.forEach((n,i)=>{const s=this.hot.getCellMeta(r,i),o=s.dateFormat;Bf(n,s.type)&&(t=!0,Jf(n,o)?e[r][i]=zf(n,o):!1===this.isFormulaCellType(r,i)&&(e[r][i]="'"+n))})}),!0===t&&(HR(ZR,this,!0),this.engine.setSheetContent(this.sheetId,e),HR(ZR,this,!1))}function ey(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";if(!n.includes(Object(m["toUpperCaseFirst"])(UR)))if(this.sheetName=jf(this.engine,this.hot.getSettings()[UR].sheetName),kR(QR,this))this.switchSheet(this.sheetName);else{const e=this.hot.getSourceDataArray();if(this.engine.isItPossibleToReplaceSheetContent(this.sheetId,e)){HR(ZR,this,!0);const t=this.engine.setSheetContent(this.sheetId,e);this.indexSyncer.setupSyncEndpoint(this.engine,this.sheetId),this.renderDependentSheets(t),HR(ZR,this,!1)}}}function ty(e,t,n,r){if("get"!==r||kR(ZR,this)||null===this.sheetName||!this.engine.doesSheetExist(this.sheetName))return;const i=this.hot.toVisualRow(e);if(null===i||null===t)return;const s=this.isFormulaCellType(i,t);if(!s){const e=this.getCellType(i,t);if("ARRAY"!==e)return void(Qf(n.value)&&(n.value=Kf(n.value)))}const o={row:this.rowAxisSyncer.getHfIndexFromVisualIndex(i),col:this.columnAxisSyncer.getHfIndexFromVisualIndex(t),sheet:this.sheetId};let a=this.engine.getCellValue(o),l=this.hot.getCellsMeta().find(e=>e.visualRow===i&&e.visualCol===t);void 0===l&&(l={}),"date"===l.type&&Object(nt["isNumeric"])(a)&&(a=qf(a,l.dateFormat));const c="object"===typeof a&&null!==a?a.value:a;n.value=c}function ny(e,t,n,r){if("get"!==r||kR(ZR,this)||null===this.sheetName||!this.engine.doesSheetExist(this.sheetName))return;const i=this.hot.toVisualRow(e),s=this.hot.propToCol(t);if(null===i||null===s)return;const o=this.isFormulaCellType(i,s);if(!o){const e=this.getCellType(i,s);if("ARRAY"!==e)return}const a=this.engine.getSheetDimensions(this.engine.getSheetId(this.sheetName));if(0===a.width&&0===a.height)return;const l={row:this.rowAxisSyncer.getHfIndexFromVisualIndex(i),col:this.columnAxisSyncer.getHfIndexFromVisualIndex(s),sheet:this.sheetId};n.value=this.engine.getCellSerialized(l)}function ry(e,t){if(jR(t))return;const n=[],r=[],i=this.engine.batch(()=>{e.forEach(e=>{let[t,i,,s]=e;const o=this.hot.propToCol(i),a=this.hot.toPhysicalRow(t),l=this.hot.toPhysicalColumn(o),c={row:this.rowAxisSyncer.getHfIndexFromVisualIndex(t),col:this.columnAxisSyncer.getHfIndexFromVisualIndex(o),sheet:this.sheetId};null!==a&&null!==l?this.syncChangeWithEngine(t,o,s):n.push([t,o,s]),r.push({address:c})})});n.length&&this.hot.addHookOnce("afterChange",()=>{const e=this.engine.batch(()=>{n.forEach(e=>{let[t,n,r]=e;this.syncChangeWithEngine(t,n,r)})});this.renderDependentSheets(e,!0)}),this.renderDependentSheets(i),this.validateDependentCells(i,r)}function iy(e,t){if(jR(t))return;const n=[],r=[];e.forEach(e=>{let[t,i,,s]=e;const o=this.hot.propToCol(i);if(!Object(nt["isNumeric"])(o))return;const a={row:this.rowAxisSyncer.getHfIndexFromVisualIndex(t),col:this.columnAxisSyncer.getHfIndexFromVisualIndex(o),sheet:this.sheetId};this.engine.isItPossibleToSetCellContents(a)?(r.push({address:a}),n.push(...this.engine.setCellContents(a,s))):Object(Qr["b"])("Not possible to set source cell data at "+JSON.stringify(a))}),this.renderDependentSheets(n),this.validateDependentCells(n,r)}function sy(e,t){let n=this.rowAxisSyncer.getHfIndexFromVisualIndex(e);if(e>=this.hot.countRows()&&(n=e),null===this.sheetId||!this.engine.doesSheetExist(this.sheetName)||!this.engine.isItPossibleToAddRows(this.sheetId,[n,t]))return!1}function oy(e,t){let n=this.columnAxisSyncer.getHfIndexFromVisualIndex(e);if(e>=this.hot.countCols()&&(n=e),null===this.sheetId||!this.engine.doesSheetExist(this.sheetName)||!this.engine.isItPossibleToAddColumns(this.sheetId,[n,t]))return!1}function ay(e,t,n){const r=this.rowAxisSyncer.setRemovedHfIndexes(n),i=r.every(e=>this.engine.isItPossibleToRemoveRows(this.sheetId,[e,1]));return!1!==i&&void 0}function ly(e,t,n){const r=this.columnAxisSyncer.setRemovedHfIndexes(n),i=r.every(e=>this.engine.isItPossibleToRemoveColumns(this.sheetId,[e,1]));return!1!==i&&void 0}function cy(e,t,n){if(jR(n))return;const r=this.engine.addRows(this.sheetId,[this.rowAxisSyncer.getHfIndexFromVisualIndex(e),t]);this.renderDependentSheets(r)}function uy(e,t,n){if(jR(n))return;const r=this.engine.addColumns(this.sheetId,[this.columnAxisSyncer.getHfIndexFromVisualIndex(e),t]);this.renderDependentSheets(r)}function hy(e,t,n,r){if(jR(r))return;const i=this.rowAxisSyncer.getRemovedHfIndexes().sort((e,t)=>t-e),s=this.engine.batch(()=>{i.forEach(e=>{this.engine.removeRows(this.sheetId,[e,1])})});this.renderDependentSheets(s)}function dy(e,t,n,r){if(jR(r))return;const i=this.columnAxisSyncer.getRemovedHfIndexes().sort((e,t)=>t-e),s=this.engine.batch(()=>{i.forEach(e=>{this.engine.removeColumns(this.sheetId,[e,1])})});this.renderDependentSheets(s)}function my(e,t,n){var r;HR(ZR,this,!0);const i=this.hot.getSourceDataArray(n,0,n+((null===(r=t.__children)||void 0===r?void 0:r.length)||0),this.hot.countSourceCols());HR(ZR,this,!1),i.forEach((e,t)=>{e.forEach((e,r)=>{this.engine.setCellContents({col:r,row:n+t,sheet:this.sheetId},[[e]])})})}function gy(e){this.hot.runHooks("afterFormulasValuesUpdate",e)}function py(e,t){this.hot.runHooks("afterNamedExpressionAdded",e,t)}function fy(e,t){this.hot.runHooks("afterNamedExpressionRemoved",e,t)}function Ry(e){this.hot.runHooks("afterSheetAdded",e)}function yy(e,t){this.sheetName=t,this.hot.runHooks("afterSheetRenamed",e,t)}function My(e,t){this.hot.runHooks("afterSheetRemoved",e,t)}function Sy(e){return{key:"hidden_columns_hide",name(){const e=this.getSelectedLast();let t=0;if(Array.isArray(e)){const[,n,,r]=e;n-r!==0&&(t=1)}return this.getTranslatedPhrase(Ye["CONTEXTMENU_ITEMS_HIDE_COLUMN"],t)},callback(){const{from:t,to:n}=this.getSelectedRangeLast(),r=Math.max(Math.min(t.col,n.col),0),i=Math.max(t.col,n.col),s=[];for(let e=r;e<=i;e+=1)s.push(e);e.hideColumns(s);const o=s[s.length-1],a=this.columnIndexMapper.getNearestNotHiddenIndex(o,1,!0);Number.isInteger(a)&&a>=0?this.selectColumns(a):this.deselectCell(),this.render(),this.view.adjustElementsSize()},disabled:!1,hidden(){return!(this.selection.isSelectedByColumnHeader()||this.selection.isSelectedByCorner())}}}function by(e){const t=[];return{key:"hidden_columns_show",name(){const e=t.length>1?1:0;return this.getTranslatedPhrase(Ye["CONTEXTMENU_ITEMS_SHOW_COLUMN"],e)},callback(){var n,r;if(0===t.length)return;let i=t[0],s=t[t.length-1];i=null!==(n=this.columnIndexMapper.getNearestNotHiddenIndex(i-1,-1))&&void 0!==n?n:0,s=null!==(r=this.columnIndexMapper.getNearestNotHiddenIndex(s+1,1))&&void 0!==r?r:this.countCols()-1,e.showColumns(t),this.render(),this.view.adjustElementsSize();const o=s-i+1===this.countCols();o||this.selectColumns(i,s)},disabled:!1,hidden(){const n=Object(h["arrayMap"])(e.getHiddenColumns(),e=>this.toPhysicalColumn(e));if(!this.selection.isSelectedByColumnHeader()&&!this.selection.isSelectedByCorner()||n.length<1)return!0;t.length=0;const r=this.getSelectedRangeLast(),i=r.getTopStartCorner().col,s=r.getBottomEndCorner().col,o=this.columnIndexMapper,a=o.getRenderableFromVisualIndex(i),l=o.getRenderableFromVisualIndex(s),c=o.getNotTrimmedIndexes(),u=[];if(i!==s){const e=s-i+1,t=l-a+1;if(e>t){const e=c.slice(i,s+1);u.push(...e.filter(e=>n.includes(e)))}}else if(0===a&&a<i)u.push(...c.slice(0,i));else if(null===a)u.push(...c.slice(0,this.countCols()));else{const e=this.countCols()-1,t=o.getRenderableFromVisualIndex(o.getNearestNotHiddenIndex(e,-1));l===t&&e>s&&u.push(...c.slice(s+1))}return Object(h["arrayEach"])(u,e=>{t.push(this.toVisualColumn(e))}),0===t.length}}}var wy=n("cef7");function Ty(e,t){vy(e,t),t.add(e)}function Oy(e,t,n){vy(e,t),t.set(e,n)}function vy(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Ey(e,t){return e.get(Ly(e,t))}function Cy(e,t,n){return e.set(Ly(e,t),n),n}function Ly(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}ge["a"].getSingleton().register("beforeHideColumns"),ge["a"].getSingleton().register("afterHideColumns"),ge["a"].getSingleton().register("beforeUnhideColumns"),ge["a"].getSingleton().register("afterUnhideColumns");const Ny="hiddenColumns",_y=310;var Iy=new WeakMap,Py=new WeakMap,xy=new WeakSet;class Dy extends qt["a"]{constructor(){super(...arguments),Ty(this,xy),Oy(this,Iy,{}),Oy(this,Py,null)}static get PLUGIN_KEY(){return Ny}static get PLUGIN_PRIORITY(){return _y}isEnabled(){return!!this.hot.getSettings()[Ny]}enablePlugin(){var e=this;if(this.enabled)return;const t=this.hot.getSettings()[Ny];Object(o["isObject"])(t)&&(Cy(Iy,this,t),Object(d["isUndefined"])(t.copyPasteEnabled)&&(t.copyPasteEnabled=!0)),Cy(Py,this,new wy["a"]),Ey(Py,this).addLocalHook("init",()=>Ly(xy,this,Vy).call(this)),this.hot.columnIndexMapper.registerMap(this.pluginName,Ey(Py,this)),this.addHook("afterContextMenuDefaultOptions",(function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return Ly(xy,e,ky).call(e,...n)})),this.addHook("afterGetCellMeta",(e,t,n)=>Ly(xy,this,Fy).call(this,e,t,n)),this.addHook("modifyColWidth",(e,t)=>Ly(xy,this,Ay).call(this,e,t),2),this.addHook("afterGetColHeader",(function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return Ly(xy,e,Hy).call(e,...n)})),this.addHook("modifyCopyableRange",e=>Ly(xy,this,Yy).call(this,e)),super.enablePlugin()}updatePlugin(){this.disablePlugin(),this.enablePlugin(),super.updatePlugin()}disablePlugin(){this.hot.columnIndexMapper.unregisterMap(this.pluginName),Cy(Iy,this,{}),super.disablePlugin(),this.resetCellsMeta()}showColumns(e){const t=this.getHiddenColumns(),n=this.isValidConfig(e);let r=t;const i=Ey(Py,this).getValues().slice(),s=e.length>0;if(n&&s){const t=e.map(e=>this.hot.toPhysicalColumn(e));Object(h["arrayEach"])(t,e=>{i[e]=!1}),r=Object(h["arrayReduce"])(i,(e,t,n)=>(t&&e.push(this.hot.toVisualColumn(n)),e),[])}const o=this.hot.runHooks("beforeUnhideColumns",t,r,n&&s);!1!==o&&(n&&s&&Ey(Py,this).setValues(i),this.hot.view.adjustElementsSize(),this.hot.runHooks("afterUnhideColumns",t,r,n&&s,n&&r.length<t.length))}showColumn(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];this.showColumns(t)}hideColumns(e){const t=this.getHiddenColumns(),n=this.isValidConfig(e);let r=t;n&&(r=Array.from(new Set(t.concat(e))));const i=this.hot.runHooks("beforeHideColumns",t,r,n);!1!==i&&(n&&this.hot.batchExecution(()=>{Object(h["arrayEach"])(e,e=>{Ey(Py,this).setValueAtIndex(this.hot.toPhysicalColumn(e),!0)})},!0),this.hot.runHooks("afterHideColumns",t,r,n,n&&r.length>t.length))}hideColumn(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];this.hideColumns(t)}getHiddenColumns(){return Object(h["arrayMap"])(Ey(Py,this).getHiddenIndexes(),e=>this.hot.toVisualColumn(e))}isHidden(e){return Ey(Py,this).getValueAtIndex(this.hot.toPhysicalColumn(e))||!1}isValidConfig(e){const t=this.hot.countCols();return!!(Array.isArray(e)&&e.length>0)&&e.every(e=>Number.isInteger(e)&&e>=0&&e<t)}resetCellsMeta(){Object(h["arrayEach"])(this.hot.getCellsMeta(),e=>{e&&(e.skipColumnOnPaste=!1)})}destroy(){Cy(Iy,this,null),Cy(Py,this,null),super.destroy()}}function Ay(e,t){return this.isHidden(t)?0:Ey(Iy,this).indicators&&(this.isHidden(t+1)||this.isHidden(t-1))&&"number"===typeof e&&this.hot.hasColHeaders()?e+15:void 0}function Fy(e,t,n){if(!1===Ey(Iy,this).copyPasteEnabled&&this.isHidden(t)&&(n.skipColumnOnPaste=!0),this.isHidden(t-1))n.className=n.className||"",-1===n.className.indexOf("afterHiddenColumn")&&(n.className+=" afterHiddenColumn");else if(n.className){const e=n.className.split(" ");if(e.length>0){const t=e.indexOf("afterHiddenColumn");t>-1&&e.splice(t,1),n.className=e.join(" ")}}}function Yy(e){if(Ey(Iy,this).copyPasteEnabled)return e;const t=[],n=(e,n,r,i)=>{t.push({startRow:e,endRow:n,startCol:r,endCol:i})};return Object(h["arrayEach"])(e,e=>{let t=!0,r=0;Object(nt["rangeEach"])(e.startCol,e.endCol,i=>{this.isHidden(i)?(t||n(e.startRow,e.endRow,r,i-1),t=!0):(t&&(r=i),i===e.endCol&&n(e.startRow,e.endRow,r,i),t=!1)})}),t}function Hy(e,t){if(!Ey(Iy,this).indicators||e<0)return;const n=[];e>=1&&this.isHidden(e-1)&&n.push("afterHiddenColumn"),e<this.hot.countCols()-1&&this.isHidden(e+1)&&n.push("beforeHiddenColumn"),Object(i["addClass"])(t,n)}function ky(e){e.items.push({name:Io},Sy(this),by(this))}function Vy(){Array.isArray(Ey(Iy,this).columns)&&this.hideColumns(Ey(Iy,this).columns)}function Uy(e){return{key:"hidden_rows_hide",name(){const e=this.getSelectedLast();let t=0;if(Array.isArray(e)){const[n,,r]=e;n-r!==0&&(t=1)}return this.getTranslatedPhrase(Ye["CONTEXTMENU_ITEMS_HIDE_ROW"],t)},callback(){const{from:t,to:n}=this.getSelectedRangeLast(),r=Math.max(Math.min(t.row,n.row),0),i=Math.max(t.row,n.row),s=[];for(let e=r;e<=i;e+=1)s.push(e);e.hideRows(s);const o=s[s.length-1],a=this.rowIndexMapper.getNearestNotHiddenIndex(o,1,!0);Number.isInteger(a)&&a>=0?this.selectRows(a):this.deselectCell(),this.render(),this.view.adjustElementsSize()},disabled:!1,hidden(){return!(this.selection.isSelectedByRowHeader()||this.selection.isSelectedByCorner())}}}function Wy(e){const t=[];return{key:"hidden_rows_show",name(){const e=t.length>1?1:0;return this.getTranslatedPhrase(Ye["CONTEXTMENU_ITEMS_SHOW_ROW"],e)},callback(){var n,r;if(0===t.length)return;let i=t[0],s=t[t.length-1];i=null!==(n=this.rowIndexMapper.getNearestNotHiddenIndex(i-1,-1))&&void 0!==n?n:0,s=null!==(r=this.rowIndexMapper.getNearestNotHiddenIndex(s+1,1))&&void 0!==r?r:this.countRows()-1,e.showRows(t),this.render(),this.view.adjustElementsSize();const o=s-i+1===this.countRows();o||this.selectRows(i,s)},disabled:!1,hidden(){const n=Object(h["arrayMap"])(e.getHiddenRows(),e=>this.toPhysicalRow(e));if(!this.selection.isSelectedByRowHeader()&&!this.selection.isSelectedByCorner()||n.length<1)return!0;t.length=0;const r=this.getSelectedRangeLast(),i=r.getTopStartCorner().row,s=r.getBottomEndCorner().row,o=this.rowIndexMapper,a=o.getRenderableFromVisualIndex(i),l=o.getRenderableFromVisualIndex(s),c=o.getNotTrimmedIndexes(),u=[];if(i!==s){const e=s-i+1,t=l-a+1;if(e>t){const e=c.slice(i,s+1);u.push(...e.filter(e=>n.includes(e)))}}else if(0===a&&a<i)u.push(...c.slice(0,i));else if(null===a)u.push(...c.slice(0,this.countRows()));else{const e=this.countRows()-1,t=o.getRenderableFromVisualIndex(o.getNearestNotHiddenIndex(e,-1));l===t&&e>s&&u.push(...c.slice(s+1))}return Object(h["arrayEach"])(u,e=>{t.push(this.toVisualRow(e))}),0===t.length}}}function Xy(e,t){Zy(e,t),t.add(e)}function jy(e,t,n){Zy(e,t),t.set(e,n)}function Zy(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Qy(e,t){return e.get(Gy(e,t))}function Ky(e,t,n){return e.set(Gy(e,t),n),n}function Gy(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}ge["a"].getSingleton().register("beforeHideRows"),ge["a"].getSingleton().register("afterHideRows"),ge["a"].getSingleton().register("beforeUnhideRows"),ge["a"].getSingleton().register("afterUnhideRows");const By="hiddenRows",Jy=320;var zy=new WeakMap,$y=new WeakMap,qy=new WeakSet;class eM extends qt["a"]{constructor(){super(...arguments),Xy(this,qy),jy(this,zy,{}),jy(this,$y,null)}static get PLUGIN_KEY(){return By}static get PLUGIN_PRIORITY(){return Jy}isEnabled(){return!!this.hot.getSettings()[By]}enablePlugin(){var e=this;if(this.enabled)return;const t=this.hot.getSettings()[By];Object(o["isObject"])(t)&&(Ky(zy,this,t),Object(d["isUndefined"])(t.copyPasteEnabled)&&(t.copyPasteEnabled=!0)),Ky($y,this,new wy["a"]),Qy($y,this).addLocalHook("init",()=>Gy(qy,this,oM).call(this)),this.hot.rowIndexMapper.registerMap(this.pluginName,Qy($y,this)),this.addHook("afterContextMenuDefaultOptions",(function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return Gy(qy,e,sM).call(e,...n)})),this.addHook("afterGetCellMeta",(e,t,n)=>Gy(qy,this,nM).call(this,e,t,n)),this.addHook("modifyRowHeight",(e,t)=>Gy(qy,this,tM).call(this,e,t)),this.addHook("afterGetRowHeader",(function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return Gy(qy,e,iM).call(e,...n)})),this.addHook("modifyCopyableRange",e=>Gy(qy,this,rM).call(this,e)),super.enablePlugin()}updatePlugin(){this.disablePlugin(),this.enablePlugin(),super.updatePlugin()}disablePlugin(){this.hot.rowIndexMapper.unregisterMap(this.pluginName),Ky(zy,this,{}),super.disablePlugin(),this.resetCellsMeta()}showRows(e){const t=this.getHiddenRows(),n=this.isValidConfig(e);let r=t;const i=Qy($y,this).getValues().slice(),s=e.length>0;if(n&&s){const t=e.map(e=>this.hot.toPhysicalRow(e));Object(h["arrayEach"])(t,e=>{i[e]=!1}),r=Object(h["arrayReduce"])(i,(e,t,n)=>(t&&e.push(this.hot.toVisualRow(n)),e),[])}const o=this.hot.runHooks("beforeUnhideRows",t,r,n&&s);!1!==o&&(n&&s&&Qy($y,this).setValues(i),this.hot.runHooks("afterUnhideRows",t,r,n&&s,n&&r.length<t.length))}showRow(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];this.showRows(t)}hideRows(e){const t=this.getHiddenRows(),n=this.isValidConfig(e);let r=t;n&&(r=Array.from(new Set(t.concat(e))));const i=this.hot.runHooks("beforeHideRows",t,r,n);!1!==i&&(n&&this.hot.batchExecution(()=>{Object(h["arrayEach"])(e,e=>{Qy($y,this).setValueAtIndex(this.hot.toPhysicalRow(e),!0)})},!0),this.hot.runHooks("afterHideRows",t,r,n,n&&r.length>t.length))}hideRow(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];this.hideRows(t)}getHiddenRows(){return Object(h["arrayMap"])(Qy($y,this).getHiddenIndexes(),e=>this.hot.toVisualRow(e))}isHidden(e){return Qy($y,this).getValueAtIndex(this.hot.toPhysicalRow(e))||!1}isValidConfig(e){const t=this.hot.countRows();return!!(Array.isArray(e)&&e.length>0)&&e.every(e=>Number.isInteger(e)&&e>=0&&e<t)}resetCellsMeta(){Object(h["arrayEach"])(this.hot.getCellsMeta(),e=>{e&&(e.skipRowOnPaste=!1)})}destroy(){Ky(zy,this,null),Ky($y,this,null),super.destroy()}}function tM(e,t){return this.isHidden(t)?0:e}function nM(e,t,n){if(!1===Qy(zy,this).copyPasteEnabled&&this.isHidden(e)&&(n.skipRowOnPaste=!0),this.isHidden(e-1))n.className=n.className||"",-1===n.className.indexOf("afterHiddenRow")&&(n.className+=" afterHiddenRow");else if(n.className){const e=n.className.split(" ");if(e.length>0){const t=e.indexOf("afterHiddenRow");t>-1&&e.splice(t,1),n.className=e.join(" ")}}}function rM(e){if(Qy(zy,this).copyPasteEnabled)return e;const t=[],n=(e,n,r,i)=>{t.push({startRow:e,endRow:n,startCol:r,endCol:i})};return Object(h["arrayEach"])(e,e=>{let t=!0,r=0;Object(nt["rangeEach"])(e.startRow,e.endRow,i=>{this.isHidden(i)?(t||n(r,i-1,e.startCol,e.endCol),t=!0):(t&&(r=i),i===e.endRow&&n(r,i,e.startCol,e.endCol),t=!1)})}),t}function iM(e,t){if(!Qy(zy,this).indicators||e<0)return;const n=[];e>=1&&this.isHidden(e-1)&&n.push("afterHiddenRow"),e<this.hot.countRows()-1&&this.isHidden(e+1)&&n.push("beforeHiddenRow"),Object(i["addClass"])(t,n)}function sM(e){e.items.push({name:Io},Uy(this),Wy(this))}function oM(){Array.isArray(Qy(zy,this).rows)&&this.hideRows(Qy(zy,this).rows)}function aM(e){return{key:"freeze_column",name(){return this.getTranslatedPhrase(Ye["CONTEXTMENU_ITEMS_FREEZE_COLUMN"])},callback(t,n){const[{start:{col:r}}]=n;e.freezeColumn(r),this.render(),this.view.adjustElementsSize()},hidden(){const e=this.getSelectedRange();let t=!1;return(void 0===e||e.length>1||e[0].from.col!==e[0].to.col||e[0].from.col<=this.getSettings().fixedColumnsStart-1)&&(t=!0),t}}}function lM(e){return{key:"unfreeze_column",name(){return this.getTranslatedPhrase(Ye["CONTEXTMENU_ITEMS_UNFREEZE_COLUMN"])},callback(t,n){const[{start:{col:r}}]=n;e.unfreezeColumn(r),this.render(),this.view.adjustElementsSize()},hidden(){const e=this.getSelectedRange();let t=!1;return(void 0===e||e.length>1||e[0].from.col!==e[0].to.col||e[0].from.col>=this.getSettings().fixedColumnsStart)&&(t=!0),t}}}function cM(e,t){hM(e,t),t.add(e)}function uM(e,t,n){hM(e,t),t.set(e,n)}function hM(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function dM(e,t){return e.get(gM(e,t))}function mM(e,t,n){return e.set(gM(e,t),n),n}function gM(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}ge["a"].getSingleton().register("beforeColumnFreeze"),ge["a"].getSingleton().register("afterColumnFreeze"),ge["a"].getSingleton().register("beforeColumnUnfreeze"),ge["a"].getSingleton().register("afterColumnUnfreeze");const pM="manualColumnFreeze",fM=110;var RM=new WeakMap,yM=new WeakSet;class MM extends qt["a"]{constructor(){super(...arguments),cM(this,yM),uM(this,RM,!1)}static get PLUGIN_KEY(){return pM}static get PLUGIN_PRIORITY(){return fM}isEnabled(){return!!this.hot.getSettings()[pM]}enablePlugin(){this.enabled||(this.addHook("afterContextMenuDefaultOptions",e=>gM(yM,this,SM).call(this,e)),this.addHook("beforeColumnMove",(e,t)=>gM(yM,this,bM).call(this,e,t)),super.enablePlugin())}disablePlugin(){mM(RM,this,!1),super.disablePlugin()}updatePlugin(){this.disablePlugin(),this.enablePlugin(),super.updatePlugin()}freezeColumn(e){const t=this.hot.getSettings(),n=t.fixedColumnsStart<this.hot.countCols()&&e>t.fixedColumnsStart-1;dM(RM,this)||mM(RM,this,!0);const r=this.hot.runHooks("beforeColumnFreeze",e,n);!1!==r&&(n&&(this.hot.columnIndexMapper.moveIndexes(e,t.fixedColumnsStart),t._fixedColumnsStart+=1),this.hot.runHooks("afterColumnFreeze",e,n))}unfreezeColumn(e){const t=this.hot.getSettings(),n=t.fixedColumnsStart>0&&e<=t.fixedColumnsStart-1;dM(RM,this)||mM(RM,this,!0);const r=this.hot.runHooks("beforeColumnUnfreeze",e,n);!1!==r&&(n&&(t._fixedColumnsStart-=1,this.hot.columnIndexMapper.moveIndexes(e,t.fixedColumnsStart)),this.hot.runHooks("afterColumnUnfreeze",e,n))}}function SM(e){e.items.push({name:"---------"},aM(this),lM(this))}function bM(e,t){if(dM(RM,this)){const n=this.hot.getSettings().fixedColumnsStart;if(t<n)return!1;if(e.some(e=>e<n))return!1}}function wM(e,t,n){return(t=TM(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function TM(e){var t=OM(e,"string");return"symbol"==typeof t?t:t+""}function OM(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}const vM=0,EM=1,CM=2,LM="px";class NM{constructor(e){wM(this,"hot",void 0),wM(this,"_element",null),wM(this,"state",vM),wM(this,"inlineProperty",void 0),this.hot=e,this.inlineProperty=e.isRtl()?"right":"left"}appendTo(e){e.appendChild(this._element),this.state=CM}build(){this.state===vM&&(this._element=this.hot.rootDocument.createElement("div"),this.state=EM)}destroy(){this.isAppended()&&this._element.parentElement.removeChild(this._element),this._element=null,this.state=vM}isAppended(){return this.state===CM}isBuilt(){return this.state>=EM}setPosition(e,t){Object(nt["isNumeric"])(e)&&(this._element.style.top=e+LM),Object(nt["isNumeric"])(t)&&(this._element.style[this.inlineProperty]=t+LM)}getPosition(){const e=this._element.style;return{top:e.top?parseInt(e.top,10):0,start:e[this.inlineProperty]?parseInt(e[this.inlineProperty],10):0}}setSize(e,t){Object(nt["isNumeric"])(e)&&(this._element.style.width=e+LM),Object(nt["isNumeric"])(t)&&(this._element.style.height=t+LM)}getSize(){return{width:this._element.style.width?parseInt(this._element.style.width,10):0,height:this._element.style.height?parseInt(this._element.style.height,10):0}}setOffset(e,t){Object(nt["isNumeric"])(e)&&(this._element.style.marginTop=e+LM),Object(nt["isNumeric"])(t)&&(this._element.style["margin"+Object(m["toUpperCaseFirst"])(this.inlineProperty)]=t+LM)}getOffset(){const e=this._element.style,t="margin"+Object(m["toUpperCaseFirst"])(this.inlineProperty);return{top:e.marginTop?parseInt(e.marginTop,10):0,start:e[t]?parseInt(e[t],10):0}}}var _M=NM;const IM="ht__manualColumnMove--backlight";class PM extends _M{build(){super.build(),Object(i["addClass"])(this._element,IM)}}var xM=PM;const DM="ht__manualColumnMove--guideline";class AM extends _M{build(){super.build(),Object(i["addClass"])(this._element,DM)}}var FM=AM;function YM(e,t){kM(e,t),t.add(e)}function HM(e,t,n){kM(e,t),t.set(e,n)}function kM(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function VM(e,t,n){return e.set(WM(e,t),n),n}function UM(e,t){return e.get(WM(e,t))}function WM(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}ge["a"].getSingleton().register("beforeColumnMove"),ge["a"].getSingleton().register("afterColumnMove");const XM="manualColumnMove",jM=120,ZM="ht__manualColumnMove",QM="show-ui",KM="on-moving--columns",GM="after-selection--columns";var BM=new WeakMap,JM=new WeakMap,zM=new WeakMap,$M=new WeakMap,qM=new WeakMap,eS=new WeakMap,tS=new WeakMap,nS=new WeakMap,rS=new WeakMap,iS=new WeakMap,sS=new WeakMap,oS=new WeakSet;class aS extends qt["a"]{constructor(){super(...arguments),YM(this,oS),HM(this,BM,new xM(this.hot)),HM(this,JM,new FM(this.hot)),HM(this,zM,[]),HM(this,$M,0),HM(this,qM,!1),HM(this,eS,{}),HM(this,tS,void 0),HM(this,nS,void 0),HM(this,rS,void 0),HM(this,iS,void 0),HM(this,sS,void 0)}static get PLUGIN_KEY(){return XM}static get PLUGIN_PRIORITY(){return jM}isEnabled(){return!!this.hot.getSettings()[XM]}enablePlugin(){var e=this;this.enabled||(this.addHook("beforeOnCellMouseDown",(function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return WM(oS,e,lS).call(e,...n)})),this.addHook("beforeOnCellMouseOver",(function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return WM(oS,e,uS).call(e,...n)})),this.addHook("afterScrollVertically",()=>WM(oS,this,dS).call(this)),this.addHook("afterLoadData",(function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return WM(oS,e,mS).call(e,...n)})),this.buildPluginUI(),this.registerEvents(),Object(i["addClass"])(this.hot.rootElement,ZM),super.enablePlugin())}updatePlugin(){this.disablePlugin(),this.enablePlugin(),this.moveBySettingsOrLoad(),super.updatePlugin()}disablePlugin(){Object(i["removeClass"])(this.hot.rootElement,ZM),this.unregisterEvents(),UM(BM,this).destroy(),UM(JM,this).destroy(),super.disablePlugin()}moveColumn(e,t){return this.moveColumns([e],t)}moveColumns(e,t){const n=UM(tS,this),r=this.isMovePossible(e,t),i=this.hot.runHooks("beforeColumnMove",e,t,n,r);if(VM(tS,this,void 0),!1===i)return;r&&this.hot.columnIndexMapper.moveIndexes(e,t);const s=r&&this.isColumnOrderChanged(e,t);return this.hot.runHooks("afterColumnMove",e,t,n,r,s),s}dragColumn(e,t){return this.dragColumns([e],t)}dragColumns(e,t){const n=this.countFinalIndex(e,t);return VM(tS,this,t),this.moveColumns(e,n)}isMovePossible(e,t){const n=this.hot.columnIndexMapper.getNotTrimmedIndexesLength(),r=e.length+t>n,i=t<0,s=e.some(e=>e<0),o=e.some(e=>e>=n);return!(r||i||s||o)}isColumnOrderChanged(e,t){return e.some((e,n)=>e-n!==t)}countFinalIndex(e,t){const n=Object(h["arrayReduce"])(e,(e,n)=>(n<t&&(e+=1),e),0);return t-n}getColumnsWidth(e,t){const n=this.hot.columnIndexMapper;let r=0;for(let i=e;i<=t;i+=1){const e=n.getRenderableFromVisualIndex(i);i<0?r+=this.hot.view._wt.wtViewport.getRowHeaderWidth()||0:null!==e&&(r+=this.hot.view._wt.wtTable.getStretchedColumnWidth(e)||0)}return r}moveBySettingsOrLoad(){const e=this.hot.getSettings()[XM];if(Array.isArray(e))this.moveColumns(e,0);else if(void 0!==e){const e=this.persistentStateLoad();e.length&&this.moveColumns(e,0)}}isFixedColumnsStart(e){return e<this.hot.getSettings().fixedColumnsStart}persistentStateSave(){this.hot.runHooks("persistentStateSave","manualColumnMove",this.hot.columnIndexMapper.getIndexesSequence())}persistentStateLoad(){const e={};return this.hot.runHooks("persistentStateLoad","manualColumnMove",e),e.value?e.value:[]}prepareColumnsToMoving(e,t){const n=[];return Object(nt["rangeEach"])(e,t,e=>{n.push(e)}),n}refreshPositions(){const e=this.hot.view.getFirstFullyVisibleColumn();this.isFixedColumnsStart(UM(nS,this))&&e>0&&this.hot.scrollViewportTo({col:this.hot.columnIndexMapper.getNearestNotHiddenIndex(e-1,-1)});const t=this.hot.view._wt.wtTable,n=this.hot.view._wt.wtOverlays.scrollableElement,r="number"===typeof n.scrollX?n.scrollX:n.scrollLeft;let s=this.hot.view.THEAD.offsetLeft+this.getColumnsWidth(0,UM(nS,this)-1);const o=t.hider.offsetWidth,a=t.TBODY.offsetLeft,l=UM(BM,this).getOffset().start,c=UM(BM,this).getSize().width;let u=0,h=0;if(this.hot.isRtl()){const e=this.hot.rootWindow,t=Object(i["outerWidth"])(this.hot.rootElement),s=e.innerWidth-UM(rS,this)-t;h=e.innerWidth-UM(eS,this).eventPageX-s-(void 0===n.scrollX?r:0)}else h=UM(eS,this).eventPageX-(UM(rS,this)-(void 0===n.scrollX?r:0));if(UM(iS,this)&&(u=this.hot.view._wt.wtOverlays.inlineStartOverlay.clone.wtTable.getColumnHeader(-1).offsetWidth),this.isFixedColumnsStart(UM(nS,this))&&(s+=r),s+=u,UM(nS,this)<0)UM(sS,this)>0?UM(eS,this).col=0:UM(eS,this).col=e>0?e-1:e;else if(UM(eS,this).TD.offsetWidth/2+s<=h){const e=UM(nS,this)>=UM($M,this)?UM($M,this)-1:UM(nS,this);UM(eS,this).col=e+1,s+=UM(eS,this).TD.offsetWidth}else UM(eS,this).col=UM(nS,this);let d=h,m=s;h+c+l>=o?d=o-c-l:h+l<a+u&&(d=a+u+Math.abs(l)),s>=o-1?m=o-1:0===m?m=1:void 0!==n.scrollX&&UM(nS,this)<UM(sS,this)&&(m-=UM(rS,this)<=n.scrollX?UM(rS,this):0),UM(BM,this).setPosition(null,d),UM(JM,this).setPosition(null,m)}registerEvents(){const{documentElement:e}=this.hot.rootDocument;this.eventManager.addEventListener(e,"mousemove",e=>WM(oS,this,cS).call(this,e)),this.eventManager.addEventListener(e,"mouseup",()=>WM(oS,this,hS).call(this))}unregisterEvents(){this.eventManager.clear()}buildPluginUI(){UM(BM,this).build(),UM(JM,this).build()}destroy(){UM(BM,this).destroy(),UM(JM,this).destroy(),super.destroy()}}function lS(e,t,n,r){const o=this.hot.view._wt.wtTable,a=this.hot.selection.isSelectedByColumnHeader(),l=this.hot.getSelectedRangeLast(),c=Object(i["hasClass"])(e.target,"sortAction");if(!l||!a||UM(qM,this)||0!==e.button||c)return VM(qM,this,!1),UM(zM,this).length=0,void Object(i["removeClass"])(this.hot.rootElement,[KM,QM]);const u=UM(JM,this).isBuilt()&&!UM(JM,this).isAppended(),h=UM(BM,this).isBuilt()&&!UM(BM,this).isAppended();u&&h&&(UM(JM,this).appendTo(o.hider),UM(BM,this).appendTo(o.hider));const{from:d,to:m}=l,g=Math.min(d.col,m.col),p=Math.max(d.col,m.col);if(t.row<0&&t.col>=g&&t.col<=p){r.column=!0,VM(qM,this,!0);const a=n.firstChild?Object(s["offsetRelativeTo"])(e,n.firstChild).x:e.offsetX;UM(eS,this).eventPageX=e.pageX,VM(nS,this,t.col),UM(eS,this).TD=n,UM(eS,this).col=t.col,VM(zM,this,this.prepareColumnsToMoving(g,p)),VM(iS,this,!!this.hot.getSettings().rowHeaders),VM($M,this,this.hot.countCols()),VM(sS,this,this.hot.getSettings().fixedColumnsStart),VM(rS,this,Object(i["offset"])(this.hot.rootElement).left);const l=UM(iS,this)?-1:0,c=o.holder.scrollTop+o.getColumnHeaderHeight(0)+1,u=t.col<UM(sS,this),h=this.hot.view._wt.wtOverlays.inlineStartOverlay.getOverlayOffset(),d=Math.abs(a-(this.hot.isRtl()?n.offsetWidth:0)),m=this.getColumnsWidth(g,t.col-1)+d,f=this.getColumnsWidth(l,g-1)+(u?h:0)+m;UM(BM,this).setPosition(c,f),UM(BM,this).setSize(this.getColumnsWidth(g,p),o.hider.offsetHeight-c),UM(BM,this).setOffset(null,-m),Object(i["addClass"])(this.hot.rootElement,KM)}else Object(i["removeClass"])(this.hot.rootElement,GM),VM(qM,this,!1),UM(zM,this).length=0}function cS(e){UM(qM,this)&&(UM(eS,this).eventPageX=e.pageX,this.refreshPositions())}function uS(e,t,n,r){const s=this.hot.getSelectedRangeLast();s&&UM(qM,this)&&(UM(zM,this).indexOf(t.col)>-1?Object(i["removeClass"])(this.hot.rootElement,QM):Object(i["addClass"])(this.hot.rootElement,QM),r.row=!0,r.column=!0,r.cell=!0,VM(nS,this,t.col),UM(eS,this).TD=n)}function hS(){const e=UM(eS,this).col,t=UM(zM,this).length;if(VM(nS,this,void 0),VM(qM,this,!1),Object(i["removeClass"])(this.hot.rootElement,[KM,QM,GM]),this.hot.selection.isSelectedByColumnHeader()&&Object(i["addClass"])(this.hot.rootElement,GM),t<1||void 0===e)return;const n=UM(zM,this)[0],r=this.hot.toPhysicalColumn(n),s=this.dragColumns(UM(zM,this),e);if(UM(zM,this).length=0,!0===s){this.persistentStateSave(),this.hot.render(),this.hot.view.adjustElementsSize();const e=this.hot.toVisualColumn(r),n=e+t-1;this.hot.selectColumns(e,n)}}function dS(){const e=this.hot.view._wt.wtTable,t=e.getColumnHeaderHeight(0)+1,n=e.holder.scrollTop,r=t+n;UM(BM,this).setPosition(r),UM(BM,this).setSize(null,e.hider.offsetHeight-r)}function mS(){this.moveBySettingsOrLoad()}function gS(e,t){fS(e,t),t.add(e)}function pS(e,t,n){fS(e,t),t.set(e,n)}function fS(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function RS(e,t,n){return e.set(MS(e,t),n),n}function yS(e,t){return e.get(MS(e,t))}function MS(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}const SS="manualColumnResize",bS=130,wS="manualColumnWidths";var TS=new WeakMap,OS=new WeakMap,vS=new WeakMap,ES=new WeakMap,CS=new WeakMap,LS=new WeakMap,NS=new WeakMap,_S=new WeakMap,IS=new WeakMap,PS=new WeakMap,xS=new WeakMap,DS=new WeakMap,AS=new WeakMap,FS=new WeakMap,YS=new WeakMap,HS=new WeakMap,kS=new WeakSet;class VS extends qt["a"]{static get PLUGIN_KEY(){return SS}static get PLUGIN_PRIORITY(){return bS}constructor(e){super(e),gS(this,kS),pS(this,TS,null),pS(this,OS,null),pS(this,vS,[]),pS(this,ES,null),pS(this,CS,null),pS(this,LS,null),pS(this,NS,null),pS(this,_S,null),pS(this,IS,this.hot.rootDocument.createElement("DIV")),pS(this,PS,this.hot.rootDocument.createElement("DIV")),pS(this,xS,null),pS(this,DS,!1),pS(this,AS,0),pS(this,FS,null),pS(this,YS,void 0),pS(this,HS,void 0),Object(i["addClass"])(yS(IS,this),"manualColumnResizer"),Object(i["addClass"])(yS(PS,this),"manualColumnResizerGuide")}get inlineDir(){return this.hot.isRtl()?"right":"left"}isEnabled(){return this.hot.getSettings()[SS]}enablePlugin(){this.enabled||(RS(YS,this,new cn["a"]),yS(YS,this).addLocalHook("init",()=>MS(kS,this,US).call(this)),this.hot.columnIndexMapper.registerMap(this.pluginName,yS(YS,this)),this.addHook("modifyColWidth",(e,t)=>MS(kS,this,KS).call(this,e,t),1),this.addHook("beforeStretchingColumnWidth",(e,t)=>MS(kS,this,GS).call(this,e,t)),this.addHook("beforeColumnResize",(e,t,n)=>MS(kS,this,BS).call(this,e,t,n)),this.bindEvents(),super.enablePlugin())}updatePlugin(){this.disablePlugin(),this.enablePlugin(),super.updatePlugin()}disablePlugin(){RS(HS,this,yS(YS,this).getValues()),this.hot.columnIndexMapper.unregisterMap(this.pluginName),super.disablePlugin()}saveManualColumnWidths(){this.hot.runHooks("persistentStateSave",wS,yS(YS,this).getValues())}loadManualColumnWidths(){const e={};return this.hot.runHooks("persistentStateLoad",wS,e),e.value}setManualSize(e,t){const n=Math.max(t,20),r=this.hot.toPhysicalColumn(e);return yS(YS,this).setValueAtIndex(r,n),n}clearManualSize(e){const t=this.hot.toPhysicalColumn(e);yS(YS,this).setValueAtIndex(t,null)}setupHandlePosition(e){if(!e.parentNode)return;RS(TS,this,e);const{_wt:t}=this.hot.view,n=t.wtTable.getCoords(yS(TS,this)),r=n.col;if(r<0)return;const s=Object(i["outerHeight"])(yS(TS,this)),o=yS(TS,this).getBoundingClientRect(),a=r<t.getSetting("fixedColumnsStart");let l;a&&(l=t.wtOverlays.topInlineStartCornerOverlay.getRelativeCellPosition(yS(TS,this),n.row,n.col)),l||(l=t.wtOverlays.topOverlay.getRelativeCellPosition(yS(TS,this),n.row,n.col)),RS(OS,this,this.hot.columnIndexMapper.getVisualFromRenderableIndex(r)),RS(vS,this,[]);const c=this.hot.selection.isSelectedByCorner()||this.hot.selection.isSelectedByColumnHeader();if(this.hot.selection.isSelected()&&c){const e=this.hot.getSelectedRange();Object(h["arrayEach"])(e,e=>{const t=e.getTopStartCorner().col,n=e.getBottomEndCorner().col;Object(nt["rangeEach"])(t,n,e=>{yS(vS,this).includes(e)||yS(vS,this).push(e)})})}yS(vS,this).includes(yS(OS,this))||RS(vS,this,[yS(OS,this)]),RS(_S,this,l.start-6),RS(NS,this,parseInt(o.width,10)),yS(IS,this).style.top=l.top+"px",yS(IS,this).style[this.inlineDir]=yS(_S,this)+yS(NS,this)+"px",yS(IS,this).style.height=s+"px",this.hot.rootElement.appendChild(yS(IS,this))}refreshHandlePosition(){yS(IS,this).style[this.inlineDir]=yS(_S,this)+yS(ES,this)+"px"}setupGuidePosition(){const e=parseInt(Object(i["outerHeight"])(yS(IS,this)),10),t=parseInt(yS(IS,this).style.top,10)+e,n=parseInt(this.hot.view.maximumVisibleElementHeight(0),10);Object(i["addClass"])(yS(IS,this),"active"),Object(i["addClass"])(yS(PS,this),"active"),yS(PS,this).style.top=t+"px",this.refreshGuidePosition(),yS(PS,this).style.height=n-e+"px",this.hot.rootElement.appendChild(yS(PS,this))}refreshGuidePosition(){yS(PS,this).style[this.inlineDir]=yS(IS,this).style[this.inlineDir]}hideHandleAndGuide(){Object(i["removeClass"])(yS(IS,this),"active"),Object(i["removeClass"])(yS(PS,this),"active")}checkIfColumnHeader(e){const t=Object(i["closest"])(e,["THEAD"],this.hot.rootElement),{topOverlay:n,topInlineStartCornerOverlay:r}=this.hot.view._wt.wtOverlays;return[n.clone.wtTable.THEAD,r.clone.wtTable.THEAD].includes(t)}getClosestTHParent(e){return"TABLE"!==e.tagName?"TH"===e.tagName?e:this.getClosestTHParent(e.parentNode):null}afterMouseDownTimeout(){const e=()=>{this.hot.forceFullRender=!0,this.hot.view.render(),this.hot.view.adjustElementsSize()},t=(t,n)=>{const r=this.hot.runHooks("beforeColumnResize",yS(CS,this),t,!0);void 0!==r&&RS(CS,this,r),"all"===this.hot.getSettings().stretchH?this.clearManualSize(t):this.setManualSize(t,yS(CS,this)),this.saveManualColumnWidths(),this.hot.runHooks("afterColumnResize",yS(CS,this),t,!0),n&&e()};if(yS(AS,this)>=2){const n=yS(vS,this).length;n>1?(Object(h["arrayEach"])(yS(vS,this),e=>{t(e)}),e()):Object(h["arrayEach"])(yS(vS,this),e=>{t(e,!0)})}RS(AS,this,0),RS(FS,this,null)}bindEvents(){const{rootWindow:e,rootElement:t}=this.hot;this.eventManager.addEventListener(t,"mouseover",e=>MS(kS,this,WS).call(this,e)),this.eventManager.addEventListener(t,"mousedown",e=>MS(kS,this,XS).call(this,e)),this.eventManager.addEventListener(e,"mousemove",e=>MS(kS,this,jS).call(this,e)),this.eventManager.addEventListener(e,"mouseup",()=>MS(kS,this,ZS).call(this)),this.eventManager.addEventListener(yS(IS,this),"contextmenu",()=>MS(kS,this,QS).call(this))}destroy(){super.destroy()}}function US(){const e=this.hot.getSettings()[SS],t=this.loadManualColumnWidths();"undefined"!==typeof t?this.hot.batchExecution(()=>{t.forEach((e,t)=>{yS(YS,this).setValueAtIndex(t,e)})},!0):Array.isArray(e)?(this.hot.batchExecution(()=>{e.forEach((e,t)=>{yS(YS,this).setValueAtIndex(t,e)})},!0),RS(HS,this,e)):!0===e&&Array.isArray(yS(HS,this))&&this.hot.batchExecution(()=>{yS(HS,this).forEach((e,t)=>{yS(YS,this).setValueAtIndex(t,e)})},!0)}function WS(e){if(!Object(i["isDetached"])(e.target)&&!0!==yS(DS,this)&&this.checkIfColumnHeader(e.target)){const t=this.getClosestTHParent(e.target);if(!t)return;const n=t.getAttribute("colspan");!t||null!==n&&"1"!==n||yS(xS,this)||this.setupHandlePosition(t)}}function XS(e){e.target.parentNode===this.hot.rootElement&&Object(i["hasClass"])(e.target,"manualColumnResizer")&&(this.setupHandlePosition(yS(TS,this)),this.setupGuidePosition(),RS(xS,this,!0),null===yS(FS,this)&&(RS(FS,this,setTimeout(()=>this.afterMouseDownTimeout(),500)),this.hot._registerTimeout(yS(FS,this))),RS(AS,this,yS(AS,this)+1),this.startX=e.pageX,RS(CS,this,yS(NS,this)))}function jS(e){if(yS(xS,this)){const t=(e.pageX-this.startX)*this.hot.getDirectionFactor();RS(ES,this,yS(NS,this)+t),Object(h["arrayEach"])(yS(vS,this),e=>{RS(CS,this,this.setManualSize(e,yS(ES,this)))}),this.refreshHandlePosition(),this.refreshGuidePosition()}}function ZS(){const e=()=>{this.hot.forceFullRender=!0,this.hot.view.render(),this.hot.view.adjustElementsSize()},t=(t,n)=>{this.hot.runHooks("beforeColumnResize",yS(CS,this),t,!1),n&&e(),this.saveManualColumnWidths(),this.hot.runHooks("afterColumnResize",yS(CS,this),t,!1)};if(yS(xS,this)){if(this.hideHandleAndGuide(),RS(xS,this,!1),yS(CS,this)!==yS(NS,this)){const n=yS(vS,this).length;n>1?(Object(h["arrayEach"])(yS(vS,this),e=>{t(e)}),e()):Object(h["arrayEach"])(yS(vS,this),e=>{t(e,!0)})}this.setupHandlePosition(yS(TS,this))}}function QS(){this.hideHandleAndGuide(),this.hot.rootElement.removeChild(yS(IS,this)),this.hot.rootElement.removeChild(yS(PS,this)),RS(xS,this,!1),RS(DS,this,!0),this.hot._registerImmediate(()=>{RS(DS,this,!1)})}function KS(e,t){let n=e;if(this.enabled){const e=this.hot.toPhysicalColumn(t),r=yS(YS,this).getValueAtIndex(e);this.hot.getSettings()[SS]&&r&&(n=r)}return n}function GS(e,t){let n=yS(YS,this).getValueAtIndex(t);return null===n&&(n=e),n}function BS(){this.hot.view._wt.wtViewport.resetHasOversizedColumnHeadersMarked()}function JS(e,t,n){return(t=zS(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function zS(e){var t=$S(e,"string");return"symbol"==typeof t?t:t+""}function $S(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}const qS=0,eb=1,tb=2,nb="px";class rb{constructor(e){JS(this,"hot",void 0),JS(this,"_element",null),JS(this,"state",qS),this.hot=e}appendTo(e){e.appendChild(this._element),this.state=tb}build(){this.state===qS&&(this._element=this.hot.rootDocument.createElement("div"),this.state=eb)}destroy(){this.isAppended()&&this._element.parentElement.removeChild(this._element),this._element=null,this.state=qS}isAppended(){return this.state===tb}isBuilt(){return this.state>=eb}setPosition(e,t){void 0!==e&&(this._element.style.top=e+nb),void 0!==t&&(this._element.style.left=t+nb)}getPosition(){return{top:this._element.style.top?parseInt(this._element.style.top,10):0,left:this._element.style.left?parseInt(this._element.style.left,10):0}}setSize(e,t){e&&(this._element.style.width=e+nb),t&&(this._element.style.height=t+nb)}getSize(){return{width:this._element.style.width?parseInt(this._element.style.width,10):0,height:this._element.style.height?parseInt(this._element.style.height,10):0}}setOffset(e,t){e&&(this._element.style.marginTop=e+nb),t&&(this._element.style.marginLeft=t+nb)}getOffset(){return{top:this._element.style.marginTop?parseInt(this._element.style.marginTop,10):0,left:this._element.style.marginLeft?parseInt(this._element.style.marginLeft,10):0}}}var ib=rb;const sb="ht__manualRowMove--backlight";class ob extends ib{build(){super.build(),Object(i["addClass"])(this._element,sb)}}var ab=ob;const lb="ht__manualRowMove--guideline";class cb extends ib{build(){super.build(),Object(i["addClass"])(this._element,lb)}}var ub=cb;function hb(e,t){mb(e,t),t.add(e)}function db(e,t,n){mb(e,t),t.set(e,n)}function mb(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function gb(e,t,n){return e.set(fb(e,t),n),n}function pb(e,t){return e.get(fb(e,t))}function fb(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}ge["a"].getSingleton().register("beforeRowMove"),ge["a"].getSingleton().register("afterRowMove");const Rb="manualRowMove",yb=140,Mb="ht__manualRowMove",Sb="show-ui",bb="on-moving--rows",wb="after-selection--rows";var Tb=new WeakMap,Ob=new WeakMap,vb=new WeakMap,Eb=new WeakMap,Cb=new WeakMap,Lb=new WeakMap,Nb=new WeakSet;class _b extends qt["a"]{constructor(){super(...arguments),hb(this,Nb),db(this,Tb,new ab(this.hot)),db(this,Ob,new ub(this.hot)),db(this,vb,[]),db(this,Eb,void 0),db(this,Cb,{}),db(this,Lb,void 0)}static get PLUGIN_KEY(){return Rb}static get PLUGIN_PRIORITY(){return yb}isEnabled(){return!!this.hot.getSettings()[Rb]}enablePlugin(){var e=this;this.enabled||(this.addHook("beforeOnCellMouseDown",(function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return fb(Nb,e,Ib).call(e,...n)})),this.addHook("beforeOnCellMouseOver",(function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return fb(Nb,e,xb).call(e,...n)})),this.addHook("afterScrollHorizontally",()=>fb(Nb,this,Ab).call(this)),this.addHook("afterLoadData",(function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return fb(Nb,e,Fb).call(e,...n)})),this.buildPluginUI(),this.registerEvents(),Object(i["addClass"])(this.hot.rootElement,Mb),super.enablePlugin())}updatePlugin(){this.disablePlugin(),this.enablePlugin(),this.moveBySettingsOrLoad(),super.updatePlugin()}disablePlugin(){Object(i["removeClass"])(this.hot.rootElement,Mb),this.unregisterEvents(),pb(Tb,this).destroy(),pb(Ob,this).destroy(),super.disablePlugin()}moveRow(e,t){return this.moveRows([e],t)}moveRows(e,t){const n=pb(Lb,this),r=this.isMovePossible(e,t),i=this.hot.runHooks("beforeRowMove",e,t,n,r);if(gb(Lb,this,void 0),!1===i)return;r&&this.hot.rowIndexMapper.moveIndexes(e,t);const s=r&&this.isRowOrderChanged(e,t);return this.hot.runHooks("afterRowMove",e,t,n,r,s),s}dragRow(e,t){return this.dragRows([e],t)}dragRows(e,t){const n=this.countFinalIndex(e,t);return gb(Lb,this,t),this.moveRows(e,n)}isMovePossible(e,t){const n=this.hot.rowIndexMapper.getNotTrimmedIndexesLength(),r=e.length+t>n,i=t<0,s=e.some(e=>e<0),o=e.some(e=>e>=n);return!(r||i||s||o)}isRowOrderChanged(e,t){return e.some((e,n)=>e-n!==t)}countFinalIndex(e,t){const n=Object(h["arrayReduce"])(e,(e,n)=>(n<t&&(e+=1),e),0);return t-n}getRowsHeight(e,t){const n=this.hot.rowIndexMapper;let r=0;for(let i=e;i<=t;i++){const e=n.getRenderableFromVisualIndex(i);null!==e&&(r+=this.hot.view._wt.wtTable.getRowHeight(e)||23)}return r}moveBySettingsOrLoad(){const e=this.hot.getSettings()[Rb];if(Array.isArray(e))this.moveRows(e,0);else if(void 0!==e){const e=this.persistentStateLoad();e.length&&this.moveRows(e,0)}}isFixedRowTop(e){return e<this.hot.getSettings().fixedRowsTop}isFixedRowBottom(e){return e>this.hot.countRows()-1-this.hot.getSettings().fixedRowsBottom}persistentStateSave(){this.hot.runHooks("persistentStateSave","manualRowMove",this.hot.rowIndexMapper.getIndexesSequence())}persistentStateLoad(){const e={};return this.hot.runHooks("persistentStateLoad","manualRowMove",e),e.value?e.value:[]}prepareRowsToMoving(){const e=this.hot.getSelectedRangeLast(),t=[];if(!e)return t;const{from:n,to:r}=e,i=Math.min(n.row,r.row),s=Math.max(n.row,r.row);return Object(nt["rangeEach"])(i,s,e=>{t.push(e)}),t}refreshPositions(){const e=pb(Cb,this).coords,t=this.hot.view.getFirstFullyVisibleRow(),n=this.hot.view.getLastFullyVisibleRow(),r=this.hot.countRows();this.isFixedRowTop(e.row)&&t>0&&this.hot.scrollViewportTo(this.hot.rowIndexMapper.getNearestNotHiddenIndex(t-1,-1)),this.isFixedRowBottom(e.row)&&n<r&&this.hot.scrollViewportTo(this.hot.rowIndexMapper.getNearestNotHiddenIndex(n+1,1),void 0,!0);const s=this.hot.view._wt.wtTable,o=pb(Cb,this).TD,a=this.hot.rootElement,l=Object(i["offset"])(a),c=Object(i["getTrimmingContainer"])(a),u=s.holder.scrollTop,h=this.hot.rootWindow!==c?c.scrollTop:0,d=l.top-h,m=pb(Cb,this).eventPageY-d+u,g=s.hider.offsetHeight,p=s.TBODY.offsetTop,f=pb(Tb,this).getOffset().top,R=pb(Tb,this).getSize().height,y=o.offsetHeight/2,M=o.offsetHeight;let S=this.hot.view.THEAD.offsetHeight+this.getRowsHeight(0,e.row-1);const b=m>=S+y;this.isFixedRowTop(e.row)&&(S+=this.hot.view._wt.wtOverlays.topOverlay.getOverlayOffset()),e.row<0?pb(Cb,this).row=t>0?t-1:t:b?(pb(Cb,this).row=e.row+1,S+=0===e.row?M-1:M):pb(Cb,this).row=e.row;let w=m,T=S;m+R+f>=g?w=g-R-f:m+f<p&&(w=p+Math.abs(f)),S>=g-1&&(T=g-1),pb(Tb,this).setPosition(w),pb(Ob,this).setPosition(T)}registerEvents(){const{documentElement:e}=this.hot.rootDocument;this.eventManager.addEventListener(e,"mousemove",e=>fb(Nb,this,Pb).call(this,e)),this.eventManager.addEventListener(e,"mouseup",()=>fb(Nb,this,Db).call(this))}unregisterEvents(){this.eventManager.clear()}buildPluginUI(){pb(Tb,this).build(),pb(Ob,this).build()}destroy(){pb(Tb,this).destroy(),pb(Ob,this).destroy(),super.destroy()}}function Ib(e,t,n,r){const{wtTable:s,wtViewport:o}=this.hot.view._wt,a=this.hot.selection.isSelectedByRowHeader(),l=this.hot.getSelectedRangeLast();if(!l||!a||pb(Eb,this)||0!==e.button)return gb(Eb,this,!1),pb(vb,this).length=0,void Object(i["removeClass"])(this.hot.rootElement,[bb,Sb]);const c=pb(Ob,this).isBuilt()&&!pb(Ob,this).isAppended(),u=pb(Tb,this).isBuilt()&&!pb(Tb,this).isAppended();c&&u&&(pb(Ob,this).appendTo(s.hider),pb(Tb,this).appendTo(s.hider));const{from:h,to:d}=l,m=Math.min(h.row,d.row),g=Math.max(h.row,d.row);if(t.col<0&&t.row>=m&&t.row<=g){r.row=!0,gb(Eb,this,!0),pb(Cb,this).eventPageY=e.pageY,pb(Cb,this).coords=t,pb(Cb,this).TD=n,gb(vb,this,this.prepareRowsToMoving());const a=s.holder.scrollLeft+o.getRowHeaderWidth(),l=this.getRowsHeight(m,t.row-1)+e.offsetY;pb(Tb,this).setPosition(null,a),pb(Tb,this).setSize(s.hider.offsetWidth-a,this.getRowsHeight(m,g)),pb(Tb,this).setOffset(-l,null),Object(i["addClass"])(this.hot.rootElement,bb),this.refreshPositions()}else Object(i["removeClass"])(this.hot.rootElement,wb),gb(Eb,this,!1),pb(vb,this).length=0}function Pb(e){pb(Eb,this)&&(pb(Cb,this).eventPageY=e.pageY,this.refreshPositions())}function xb(e,t,n,r){const s=this.hot.getSelectedRangeLast();s&&pb(Eb,this)&&(pb(vb,this).indexOf(t.row)>-1?Object(i["removeClass"])(this.hot.rootElement,Sb):Object(i["addClass"])(this.hot.rootElement,Sb),r.row=!0,r.column=!0,r.cell=!0,pb(Cb,this).coords=t,pb(Cb,this).TD=n)}function Db(){const e=pb(Cb,this).row,t=pb(vb,this).length;if(gb(Eb,this,!1),Object(i["removeClass"])(this.hot.rootElement,[bb,Sb,wb]),this.hot.selection.isSelectedByRowHeader()&&Object(i["addClass"])(this.hot.rootElement,wb),t<1||void 0===e)return;const n=pb(vb,this)[0],r=this.hot.toPhysicalRow(n),s=this.dragRows(pb(vb,this),e);if(pb(vb,this).length=0,!0===s){this.persistentStateSave(),this.hot.render(),this.hot.view.adjustElementsSize();const e=this.hot.toVisualRow(r),n=e+t-1;this.hot.selectRows(e,n)}}function Ab(){const e=this.hot.view._wt.wtTable,t=this.hot.view._wt.wtViewport.getRowHeaderWidth(),n=e.holder.scrollLeft,r=t+n;pb(Tb,this).setPosition(null,r),pb(Tb,this).setSize(e.hider.offsetWidth-r)}function Fb(){this.moveBySettingsOrLoad()}var Yb=n("eb36");function Hb(e,t){Vb(e,t),t.add(e)}function kb(e,t,n){Vb(e,t),t.set(e,n)}function Vb(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Ub(e,t,n){return e.set(Xb(e,t),n),n}function Wb(e,t){return e.get(Xb(e,t))}function Xb(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}const jb="manualRowResize",Zb=30,Qb="manualRowHeights";var Kb=new WeakMap,Gb=new WeakMap,Bb=new WeakMap,Jb=new WeakMap,zb=new WeakMap,$b=new WeakMap,qb=new WeakMap,ew=new WeakMap,tw=new WeakMap,nw=new WeakMap,rw=new WeakMap,iw=new WeakMap,sw=new WeakMap,ow=new WeakMap,aw=new WeakMap,lw=new WeakMap,cw=new WeakSet;class uw extends qt["a"]{static get PLUGIN_KEY(){return jb}static get PLUGIN_PRIORITY(){return Zb}constructor(e){super(e),Hb(this,cw),kb(this,Kb,null),kb(this,Gb,null),kb(this,Bb,[]),kb(this,Jb,null),kb(this,zb,null),kb(this,$b,null),kb(this,qb,null),kb(this,ew,null),kb(this,tw,this.hot.rootDocument.createElement("DIV")),kb(this,nw,this.hot.rootDocument.createElement("DIV")),kb(this,rw,!1),kb(this,iw,!1),kb(this,sw,0),kb(this,ow,null),kb(this,aw,void 0),kb(this,lw,void 0),Object(i["addClass"])(Wb(tw,this),"manualRowResizer"),Object(i["addClass"])(Wb(nw,this),"manualRowResizerGuide")}get inlineDir(){return this.hot.isRtl()?"right":"left"}isEnabled(){return this.hot.getSettings()[jb]}enablePlugin(){this.enabled||(Ub(aw,this,new cn["a"]),Wb(aw,this).addLocalHook("init",()=>Xb(cw,this,Rw).call(this)),this.hot.rowIndexMapper.registerMap(this.pluginName,Wb(aw,this)),this.addHook("modifyRowHeight",(e,t)=>Xb(cw,this,fw).call(this,e,t)),this.bindEvents(),super.enablePlugin())}updatePlugin(){this.disablePlugin(),this.enablePlugin(),super.updatePlugin()}disablePlugin(){Ub(lw,this,Wb(aw,this).getValues()),this.hot.rowIndexMapper.unregisterMap(this.pluginName),super.disablePlugin()}saveManualRowHeights(){this.hot.runHooks("persistentStateSave",Qb,Wb(aw,this).getValues())}loadManualRowHeights(){const e={};return this.hot.runHooks("persistentStateLoad",Qb,e),e.value}setManualSize(e,t){const n=this.hot.toPhysicalRow(e),r=Math.max(t,Yb["a"]);return Wb(aw,this).setValueAtIndex(n,r),r}getLastDesiredRowHeight(){return Wb(Jb,this)}setupHandlePosition(e){Ub(Kb,this,e);const{view:t}=this.hot,{_wt:n}=t,r=n.wtTable.getCoords(Wb(Kb,this)),s=r.row;if(s<0)return;const o=Object(i["outerWidth"])(Wb(Kb,this)),a=Wb(Kb,this).getBoundingClientRect(),l=s<n.getSetting("fixedRowsTop"),c=s>=t.countNotHiddenRowIndexes(0,1)-n.getSetting("fixedRowsBottom");let u;l?u=n.wtOverlays.topInlineStartCornerOverlay.getRelativeCellPosition(Wb(Kb,this),r.row,r.col):c&&(u=n.wtOverlays.bottomInlineStartCornerOverlay.getRelativeCellPosition(Wb(Kb,this),r.row,r.col)),u||(u=n.wtOverlays.inlineStartOverlay.getRelativeCellPosition(Wb(Kb,this),r.row,r.col)),Ub(Gb,this,this.hot.rowIndexMapper.getVisualFromRenderableIndex(s)),Ub(Bb,this,[]);const d=this.hot.selection.isSelectedByCorner()||this.hot.selection.isSelectedByRowHeader();if(this.hot.selection.isSelected()&&d){const e=this.hot.getSelectedRange();Object(h["arrayEach"])(e,e=>{const t=e.getTopStartCorner().row,n=e.getBottomStartCorner().row;Object(nt["rangeEach"])(t,n,e=>{Wb(Bb,this).includes(e)||Wb(Bb,this).push(e)})})}Wb(Bb,this).includes(Wb(Gb,this))||Ub(Bb,this,[Wb(Gb,this)]),Ub(ew,this,u.top-6),Ub(qb,this,parseInt(a.height,10)),Wb(tw,this).style.top=Wb(ew,this)+Wb(qb,this)+"px",Wb(tw,this).style[this.inlineDir]=u.start+"px",Wb(tw,this).style.width=o+"px",this.hot.rootElement.appendChild(Wb(tw,this))}refreshHandlePosition(){Wb(tw,this).style.top=Wb(ew,this)+Wb(Jb,this)+"px"}setupGuidePosition(){const e=parseInt(Object(i["outerWidth"])(Wb(tw,this)),10),t=parseInt(Wb(tw,this).style[this.inlineDir],10)+e,n=parseInt(this.hot.view.maximumVisibleElementWidth(0),10);Object(i["addClass"])(Wb(tw,this),"active"),Object(i["addClass"])(Wb(nw,this),"active"),Wb(nw,this).style.top=Wb(tw,this).style.top,Wb(nw,this).style[this.inlineDir]=t+"px",Wb(nw,this).style.width=n-e+"px",this.hot.rootElement.appendChild(Wb(nw,this))}refreshGuidePosition(){Wb(nw,this).style.top=Wb(tw,this).style.top}hideHandleAndGuide(){Object(i["removeClass"])(Wb(tw,this),"active"),Object(i["removeClass"])(Wb(nw,this),"active")}checkIfRowHeader(e){const t=Object(i["closest"])(e,["TBODY"],this.hot.rootElement),{inlineStartOverlay:n,topInlineStartCornerOverlay:r,bottomInlineStartCornerOverlay:s}=this.hot.view._wt.wtOverlays;return[n.clone.wtTable.TBODY,r.clone.wtTable.TBODY,s.clone.wtTable.TBODY].includes(t)}getClosestTHParent(e){return"TABLE"!==e.tagName?"TH"===e.tagName?e:this.getClosestTHParent(e.parentNode):null}getActualRowHeight(e){const t=this.hot.view._wt.wtTable.getRowHeight(e);return void 0!==t&&Wb(zb,this)<t?t:Wb(zb,this)}afterMouseDownTimeout(){const e=()=>{this.hot.forceFullRender=!0,this.hot.view.render(),this.hot.view.adjustElementsSize()},t=(t,n)=>{const r=this.hot.runHooks("beforeRowResize",this.getActualRowHeight(t),t,!0);void 0!==r&&Ub(zb,this,r),this.setManualSize(t,Wb(zb,this)),this.hot.runHooks("afterRowResize",this.getActualRowHeight(t),t,!0),n&&e()};if(Wb(sw,this)>=2){const n=Wb(Bb,this).length;n>1?(Object(h["arrayEach"])(Wb(Bb,this),e=>{t(e)}),e()):Object(h["arrayEach"])(Wb(Bb,this),e=>{t(e,!0)})}Ub(sw,this,0),Ub(ow,this,null)}bindEvents(){const{rootElement:e,rootWindow:t}=this.hot;this.eventManager.addEventListener(e,"mouseover",e=>Xb(cw,this,hw).call(this,e)),this.eventManager.addEventListener(e,"mousedown",e=>Xb(cw,this,dw).call(this,e)),this.eventManager.addEventListener(t,"mousemove",e=>Xb(cw,this,mw).call(this,e)),this.eventManager.addEventListener(t,"mouseup",()=>Xb(cw,this,gw).call(this)),this.eventManager.addEventListener(Wb(tw,this),"contextmenu",()=>Xb(cw,this,pw).call(this))}destroy(){super.destroy()}}function hw(e){if(!Object(i["isDetached"])(e.target)&&!0!==Wb(iw,this)&&this.checkIfRowHeader(e.target)){const t=this.getClosestTHParent(e.target);t&&(Wb(rw,this)||this.setupHandlePosition(t))}}function dw(e){Object(i["hasClass"])(e.target,"manualRowResizer")&&(this.setupHandlePosition(Wb(Kb,this)),this.setupGuidePosition(),Ub(rw,this,!0),null===Wb(ow,this)&&(Ub(ow,this,setTimeout(()=>this.afterMouseDownTimeout(),500)),this.hot._registerTimeout(Wb(ow,this))),Ub(sw,this,Wb(sw,this)+1),Ub($b,this,e.pageY),Ub(zb,this,Wb(qb,this)))}function mw(e){Wb(rw,this)&&(Ub(Jb,this,Wb(qb,this)+(e.pageY-Wb($b,this))),Object(h["arrayEach"])(Wb(Bb,this),e=>{Ub(zb,this,this.setManualSize(e,Wb(Jb,this)))}),this.refreshHandlePosition(),this.refreshGuidePosition())}function gw(){const e=()=>{this.hot.forceFullRender=!0,this.hot.view.render(),this.hot.view.adjustElementsSize()},t=(t,n)=>{this.hot.runHooks("beforeRowResize",this.getActualRowHeight(t),t,!1),n&&e(),this.saveManualRowHeights(),this.hot.runHooks("afterRowResize",this.getActualRowHeight(t),t,!1)};if(Wb(rw,this)){if(this.hideHandleAndGuide(),Ub(rw,this,!1),Wb(zb,this)!==Wb(qb,this)){const n=Wb(Bb,this).length;n>1?(Object(h["arrayEach"])(Wb(Bb,this),e=>{t(e)}),e()):Object(h["arrayEach"])(Wb(Bb,this),e=>{t(e,!0)})}this.setupHandlePosition(Wb(Kb,this))}}function pw(){this.hideHandleAndGuide(),this.hot.rootElement.removeChild(Wb(tw,this)),this.hot.rootElement.removeChild(Wb(nw,this)),Ub(rw,this,!1),Ub(iw,this,!0),this.hot._registerImmediate(()=>{Ub(iw,this,!1)})}function fw(e,t){let n=e;if(this.enabled){const e=this.hot.toPhysicalRow(t),r=Wb(aw,this).getValueAtIndex(e);this.hot.getSettings()[jb]&&r&&(n=r)}return n}function Rw(){const e=this.hot.getSettings()[jb],t=this.loadManualRowHeights();this.hot.batchExecution(()=>{"undefined"!==typeof t?t.forEach((e,t)=>{Wb(aw,this).setValueAtIndex(t,e)}):Array.isArray(e)?(e.forEach((e,t)=>{Wb(aw,this).setValueAtIndex(t,e)}),Ub(lw,this,e)):!0===e&&Array.isArray(Wb(lw,this))&&Wb(lw,this).forEach((e,t)=>{Wb(aw,this).setValueAtIndex(t,e)})},!0)}n("73d9");function yw(e,t,n){Mw(e,t),t.set(e,n)}function Mw(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Sw(e,t,n){return(t=bw(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function bw(e){var t=ww(e,"string");return"symbol"==typeof t?t:t+""}function ww(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function Tw(e,t){return e.get(vw(e,t))}function Ow(e,t,n){return e.set(vw(e,t),n),n}function vw(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}var Ew=new WeakMap;class Cw{constructor(e,t,n,r,i,s){Sw(this,"row",void 0),Sw(this,"col",void 0),Sw(this,"rowspan",void 0),Sw(this,"colspan",void 0),Sw(this,"removed",!1),Sw(this,"cellCoordsFactory",void 0),Sw(this,"cellRangeFactory",void 0),yw(this,Ew,null),this.row=e,this.col=t,this.rowspan=n,this.colspan=r,this.cellCoordsFactory=i,this.cellRangeFactory=s}static NEGATIVE_VALUES_WARNING(e){let{row:t,col:n,rowspan:r,colspan:i}=e;return Ds["a"]`The merged cell declared with {row: ${t}, col: ${n},\x20
  214. rowspan: ${r}, colspan: ${i}} contains negative values, which is\x20
  215. not supported. It will not be added to the collection.`}static IS_OUT_OF_BOUNDS_WARNING(e){let{row:t,col:n}=e;return Ds["a"]`The merged cell declared at [${t}, ${n}] is positioned\x20
  216. (or positioned partially) outside of the table range. It was not added to the table, please fix your setup.`}static IS_SINGLE_CELL(e){let{row:t,col:n}=e;return Ds["a"]`The merged cell declared at [${t}, ${n}] has both "rowspan"\x20
  217. and "colspan" declared as "1", which makes it a single cell. It cannot be added to the collection.`}static ZERO_SPAN_WARNING(e){let{row:t,col:n}=e;return Ds["a"]`The merged cell declared at [${t}, ${n}] has "rowspan"\x20
  218. or "colspan" declared as "0", which is not supported. It cannot be added to the collection.`}static containsNegativeValues(e){let{row:t,col:n,rowspan:r,colspan:i}=e;return t<0||n<0||r<0||i<0}static isSingleCell(e){let{rowspan:t,colspan:n}=e;return 1===n&&1===t}static containsZeroSpan(e){let{rowspan:t,colspan:n}=e;return 0===n||0===t}static isOutOfBounds(e,t,n){return e.row<0||e.col<0||e.row>=t||e.row+e.rowspan-1>=t||e.col>=n||e.col+e.colspan-1>=n}normalize(e){const t=e.countRows(),n=e.countCols();this.row<0?this.row=0:this.row>t-1&&(this.row=t-1),this.col<0?this.col=0:this.col>n-1&&(this.col=n-1),this.row+this.rowspan>t-1&&(this.rowspan=t-this.row),this.col+this.colspan>n-1&&(this.colspan=n-this.col),Ow(Ew,this,null)}includes(e,t){return this.row<=e&&this.col<=t&&this.row+this.rowspan-1>=e&&this.col+this.colspan-1>=t}includesHorizontally(e){return this.col<=e&&this.col+this.colspan-1>=e}includesVertically(e){return this.row<=e&&this.row+this.rowspan-1>=e}shift(e,t){const n=e[0]||e[1],r=t+Math.abs(e[0]||e[1])-1,i=e[0]?"colspan":"rowspan",s=e[0]?"col":"row",o=Math.min(t,r),a=Math.max(t,r),l=this[s],c=this[s]+this[i]-1;if(l>=t&&(this[s]+=n),n>0)t<=c&&t>l&&(this[i]+=n);else if(n<0){if(o<=l&&a>=c)return this.removed=!0,Ow(Ew,this,null),!1;if(l>=o&&l<=a){const e=a-l+1,t=Math.abs(n)-e;this[s]-=t+n,this[i]-=e}else if(l<=o&&c>=a)this[i]+=n;else if(l<=o&&c>=o&&c<a){const e=c-o+1;this[i]-=e}}return Ow(Ew,this,null),!0}isFarther(e,t){return!e||("down"===t?e.row+e.rowspan-1<this.row+this.rowspan-1:"up"===t?e.row>this.row:"right"===t?e.col+e.colspan-1<this.col+this.colspan-1:"left"===t?e.col>this.col:null)}getLastRow(){return this.row+this.rowspan-1}getLastColumn(){return this.col+this.colspan-1}getRange(){return Tw(Ew,this)||Ow(Ew,this,this.cellRangeFactory(this.cellCoordsFactory(this.row,this.col),this.cellCoordsFactory(this.row,this.col),this.cellCoordsFactory(this.getLastRow(),this.getLastColumn()))),Tw(Ew,this)}}var Lw=Cw;function Nw(e,t){_w(e,t),t.add(e)}function _w(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Iw(e,t,n){return(t=Pw(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Pw(e){var t=xw(e,"string");return"symbol"==typeof t?t:t+""}function xw(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function Dw(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}var Aw=new WeakSet;class Fw{constructor(e){Nw(this,Aw),Iw(this,"plugin",void 0),Iw(this,"mergedCells",[]),Iw(this,"mergedCellsMatrix",new Map),Iw(this,"hot",void 0),this.plugin=e,this.hot=e.hot}static IS_OVERLAPPING_WARNING(e){let{row:t,col:n}=e;return Ds["a"]`The merged cell declared at [${t}, ${n}], overlaps\x20
  219. with the other declared merged cell. The overlapping merged cell was not added to the table, please\x20
  220. fix your setup.`}get(e,t){var n;return!!this.mergedCellsMatrix.has(e)&&(null!==(n=this.mergedCellsMatrix.get(e).get(t))&&void 0!==n&&n)}getByRange(e){let t=!1;return Object(h["arrayEach"])(this.mergedCells,n=>!(n.row<=e.from.row&&n.row+n.rowspan-1>=e.to.row&&n.col<=e.from.col&&n.col+n.colspan-1>=e.to.col)||(t=n,t)),t}filterOverlappingMergeCells(e){const t=new Set;this.mergedCells.forEach(e=>{const{row:n,col:r,colspan:i,rowspan:s}=e;for(let o=n;o<n+s;o++)for(let e=r;e<r+i;e++)t.add(`r${o},c${e}`)});const n=e.filter(e=>{const{row:n,col:r,colspan:i,rowspan:s}=e,o=new Set;let a=!1;for(let l=n;l<n+s;l++){for(let n=r;n<r+i;n++){const r=`r${l},c${n}`;if(t.has(r)){Object(Qr["b"])(Fw.IS_OVERLAPPING_WARNING(e)),a=!0;break}o.add(r)}if(a)break}return a||t.add(...o),!a});return n}getWithinRange(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const{row:n,col:r}=e.getTopStartCorner(),{row:i,col:s}=e.getBottomEndCorner(),o=[];for(let a=n;a<=i;a++)for(let e=r;e<=s;e++){const n=this.get(a,e);n&&(t||!t&&n.row===a&&n.col===e)&&o.push(n)}return o}add(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const n=e.row,r=e.col,i=e.rowspan,s=e.colspan,o=new Lw(n,r,i,s,this.hot._createCellCoords,this.hot._createCellRange),a=this.get(n,r),l=!t&&this.isOverlapping(o);return a||l?(Object(Qr["b"])(Fw.IS_OVERLAPPING_WARNING(o)),!1):(this.hot&&o.normalize(this.hot),this.mergedCells.push(o),Dw(Aw,this,Hw).call(this,o),o)}remove(e,t){const n=this.get(e,t),r=n?this.mergedCells.indexOf(n):-1;return!(!n||-1===r)&&(this.mergedCells.splice(r,1),Dw(Aw,this,kw).call(this,n),n)}clear(){Object(h["arrayEach"])(this.mergedCells,e=>{let{row:t,col:n,rowspan:r,colspan:i}=e;Object(nt["rangeEach"])(t,t+r,e=>{Object(nt["rangeEach"])(n,n+i,t=>{const n=this.hot.getCell(e,t);n&&(n.removeAttribute("rowspan"),n.removeAttribute("colspan"),n.style.display="")})})}),this.mergedCells.length=0,this.mergedCellsMatrix=new Map}isOverlapping(e){const t=e.getRange();for(let n=0;n<this.mergedCells.length;n++){const e=this.mergedCells[n],r=e.getRange();if(r.overlaps(t))return!0}return!1}isFirstRenderableMergedCell(e,t){const n=this.get(e,t);return n&&this.hot.rowIndexMapper.getNearestNotHiddenIndex(n.row,1)===e&&this.hot.columnIndexMapper.getNearestNotHiddenIndex(n.col,1)===t}getFirstRenderableCoords(e,t){const n=this.get(e,t);if(!n||this.isFirstRenderableMergedCell(e,t))return this.hot._createCellCoords(e,t);const r=this.hot.rowIndexMapper.getNearestNotHiddenIndex(n.row,1),i=this.hot.columnIndexMapper.getNearestNotHiddenIndex(n.col,1);return this.hot._createCellCoords(r,i)}getStartMostColumnIndex(e,t){const n=Dw(Aw,this,Yw).call(this,e,"col",-1);let r=t;for(let i=0;i<n.length;i++)if(n[i]<=t){r=n[i];break}return r}getEndMostColumnIndex(e,t){const n=Dw(Aw,this,Yw).call(this,e,"col",1);let r=t;for(let i=0;i<n.length;i++)if(n[i]>=t){r=n[i];break}return r}getTopMostRowIndex(e,t){const n=Dw(Aw,this,Yw).call(this,e,"row",-1);let r=t;for(let i=0;i<n.length;i++)if(n[i]<=t){r=n[i];break}return r}getBottomMostRowIndex(e,t){const n=Dw(Aw,this,Yw).call(this,e,"row",1);let r=t;for(let i=0;i<n.length;i++)if(n[i]>=t){r=n[i];break}return r}shiftCollections(e,t,n){const r=[0,0];switch(e){case"right":r[0]+=n;break;case"left":r[0]-=n;break;case"down":r[1]+=n;break;case"up":r[1]-=n;break;default:}const i=[];this.mergedCells.forEach(e=>{e.shift(r,t),e.removed&&i.push(e)}),i.forEach(e=>{this.mergedCells.splice(this.mergedCells.indexOf(e),1)}),this.mergedCellsMatrix.clear(),this.mergedCells.forEach(e=>{Dw(Aw,this,Hw).call(this,e)})}}function Yw(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;const r=new Map,i=1===n?e.getTopStartCorner():e.getBottomEndCorner(),s=1===n?e.getBottomEndCorner():e.getTopStartCorner();for(let o=i.row;1===n?o<=s.row:o>=s.row;o+=n)for(let e=i.col;1===n?e<=s.col:e>=s.col;e+=n){const i="row"===t?o:e,s=this.get(o,e);let a=i;s&&(a=1===n?s[t]+s[t+"span"]-1:s[t]),r.has(i)||r.set(i,new Set),r.get(i).add(a)}return Array.from(new Set(Array.from(r.entries()).filter(e=>{let[,t]=e;return 1===t.size}).flatMap(e=>{let[,t]=e;return Array.from(t)})))}function Hw(e){for(let t=e.row;t<e.row+e.rowspan;t++)for(let n=e.col;n<e.col+e.colspan;n++)this.mergedCellsMatrix.has(t)||this.mergedCellsMatrix.set(t,new Map),this.mergedCellsMatrix.get(t).set(n,e)}function kw(e){for(let t=e.row;t<e.row+e.rowspan;t++)for(let n=e.col;n<e.col+e.colspan;n++)this.mergedCellsMatrix.get(t).delete(n)}var Vw=Fw;function Uw(e,t,n){return(t=Ww(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ww(e){var t=Xw(e,"string");return"symbol"==typeof t?t:t+""}function Xw(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}class jw{constructor(e){Uw(this,"plugin",void 0),Uw(this,"mergedCellsCollection",void 0),Uw(this,"currentFillData",null),this.plugin=e,this.mergedCellsCollection=this.plugin.mergedCellsCollection}correctSelectionAreaSize(e){if(e[0]===e[2]&&e[1]===e[3]){const t=this.mergedCellsCollection.get(e[0],e[1]);t&&(e[2]=e[0]+t.rowspan-1,e[3]=e[1]+t.colspan-1)}}getDirection(e,t){let n=null;return n=t[0]===e[0]&&t[1]===e[1]&&t[3]===e[3]?"down":t[2]===e[2]&&t[1]===e[1]&&t[3]===e[3]?"up":t[1]===e[1]&&t[2]===e[2]?"right":"left",n}snapDragArea(e,t,n,r){const i=t.slice(0),s=this.getAutofillSize(e,t,n),[o,a,l,c]=e,u=["up","down"].indexOf(n)>-1,h=u?l-o+1:c-a+1,d=Math.floor(s/h)*h,m=s-d,g=this.getFarthestCollection(e,t,n,r);if(g)if("down"===n){const e=g.row+g.rowspan-o-m,t=i[2]+e;t>=this.plugin.hot.countRows()?i[2]-=m:i[2]+=m?e:0}else if("right"===n){const e=g.col+g.colspan-a-m,t=i[3]+e;t>=this.plugin.hot.countCols()?i[3]-=m:i[3]+=m?e:0}else if("up"===n){const e=l-m-g.row+1,t=i[0]+e;t<0?i[0]+=m:i[0]-=m?e:0}else if("left"===n){const e=c-m-g.col+1,t=i[1]+e;t<0?i[1]+=m:i[1]-=m?e:0}return this.updateCurrentFillCache({baseArea:e,dragDirection:n,foundMergedCells:r,fillSize:s,dragArea:i,cycleLength:h}),i}updateCurrentFillCache(e){this.currentFillData||(this.currentFillData={}),Object(o["extend"])(this.currentFillData,e)}getAutofillSize(e,t,n){const[r,i,s,o]=e,[a,l,c,u]=t;switch(n){case"up":return r-a;case"down":return c-s;case"left":return i-l;case"right":return u-o;default:return null}}getDragArea(e,t,n){const[r,i,s,o]=e,[a,l,c,u]=t;switch(n){case"up":return[a,l,r-1,o];case"down":return[s+1,i,c,o];case"left":return[a,l,s,i-1];case"right":return[r,o+1,c,u];default:return null}}getFarthestCollection(e,t,n,r){const[i,s,o,a]=e,l=["up","down"].indexOf(n)>-1,c=l?o:a,u=l?i:s,d=this.getAutofillSize(e,t,n),m=l?o-i+1:a-s+1,g=Math.floor(d/m)*m,p=d-g;let f=null,R=null,y=null;switch(n){case"up":f="includesVertically",y=c-p+1;break;case"left":f="includesHorizontally",y=c-p+1;break;case"down":f="includesVertically",y=u+p-1;break;case"right":f="includesHorizontally",y=u+p-1;break;default:}return Object(h["arrayEach"])(r,e=>{e[f](y)&&e.isFarther(R,n)&&(R=e)}),R}recreateAfterDataPopulation(e){if(!this.currentFillData)return;const t=this.getRangeFromChanges(e),n=this.currentFillData.foundMergedCells,r=this.currentFillData.dragDirection,i=(e,n)=>{switch(r){case"up":return e.row-n>=t.from.row;case"down":return e.row+e.rowspan-1+n<=t.to.row;case"left":return e.col-n>=t.from.column;case"right":return e.col+e.colspan-1+n<=t.to.column;default:return null}};let s=0,o=null,a=1;do{for(let e=0;e<n.length;e+=1){if(o=n[e],s=a*this.currentFillData.cycleLength,i(o,s))switch(r){case"up":this.plugin.mergedCellsCollection.add({row:o.row-s,rowspan:o.rowspan,col:o.col,colspan:o.colspan});break;case"down":this.plugin.mergedCellsCollection.add({row:o.row+s,rowspan:o.rowspan,col:o.col,colspan:o.colspan});break;case"left":this.plugin.mergedCellsCollection.add({row:o.row,rowspan:o.rowspan,col:o.col-s,colspan:o.colspan});break;case"right":this.plugin.mergedCellsCollection.add({row:o.row,rowspan:o.rowspan,col:o.col+s,colspan:o.colspan});break;default:}e===n.length-1&&(a+=1)}}while(i(o,s));this.currentFillData=null,this.plugin.hot.render(),n.length>0&&this.plugin.ifChromeForceRepaint()}getRangeFromChanges(e){const t={min:null,max:null},n={min:null,max:null};return Object(h["arrayEach"])(e,e=>{const r=e[0],i=this.plugin.hot.propToCol(e[1]);(null===t.min||r<t.min)&&(t.min=r),(null===t.max||r>t.max)&&(t.max=r),(null===n.min||i<n.min)&&(n.min=i),(null===n.max||i>n.max)&&(n.max=i)}),{from:{row:t.min,column:n.min},to:{row:t.max,column:n.max}}}dragAreaOverlapsCollections(e,t,n){const r=this.getDragArea(e,t,n),[i,s,o,a]=r,l=this.plugin.hot._createCellCoords(i,s),c=this.plugin.hot._createCellCoords(o,a),u=this.plugin.hot._createCellRange(l,l,c);return this.mergedCellsCollection.getWithinRange(u,!0).length>0}}var Zw=jw;function Qw(e,t,n){return(t=Kw(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Kw(e){var t=Gw(e,"string");return"symbol"==typeof t?t:t+""}function Gw(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}class Bw{constructor(e){Qw(this,"plugin",void 0),Qw(this,"hot",void 0),Qw(this,"fullySelectedMergedCellClassName","fullySelectedMergedCell"),this.plugin=e,this.hot=e.hot}getSelectedMergedCellClassName(e,t,n,r){const i=Math.min(n[0],n[2]),s=Math.min(n[1],n[3]),o=Math.max(n[0],n[2]),a=Math.max(n[1],n[3]);if(void 0===r)return;const l=this.plugin.mergedCellsCollection.isFirstRenderableMergedCell(e,t);if(!l)return;const c=this.plugin.mergedCellsCollection.get(e,t);if(!c)return;const u=c.getLastRow(),h=c.getLastColumn(),d=i<=c.row&&s<=c.col&&o>=u&&a>=h;return d?`${this.fullySelectedMergedCellClassName}-${r}`:this.isMergeCellFullySelected(c,this.plugin.hot.getSelectedRange())?this.fullySelectedMergedCellClassName+"-multiple":void 0}isMergeCellFullySelected(e,t){const n=[];if(!t||!e)return!1;for(let r=0;r<e.rowspan;r+=1)for(let t=0;t<e.colspan;t+=1)n.push(this.hot._createCellCoords(e.row+r,e.col+t));for(let r=0;r<n.length;r+=1){const e=[];for(let i=0;i<t.length;i+=1)e[i]=t[i].includes(n[r]);if(!e.includes(!0))return!1}return!0}getSelectedMergedCellClassNameToRemove(){const e=[];for(let t=0;t<=7;t+=1)e.push(`${this.fullySelectedMergedCellClassName}-${t}`);return e.push(this.fullySelectedMergedCellClassName+"-multiple"),e}}var Jw=Bw;function zw(e){return{key:"mergeCells",name(){const t=this.getSelectedLast();if(t){const n=e.mergedCellsCollection.get(t[0],t[1]);if(n.row===t[0]&&n.col===t[1]&&n.row+n.rowspan-1===t[2]&&n.col+n.colspan-1===t[3])return this.getTranslatedPhrase(Ye["CONTEXTMENU_ITEMS_UNMERGE_CELLS"])}return this.getTranslatedPhrase(Ye["CONTEXTMENU_ITEMS_MERGE_CELLS"])},callback(){const t=this.getSelectedRangeLast();if(!t)return;t.setDirection(this.isRtl()?"NE-SW":"NW-SE");const{from:n,to:r}=t;e.toggleMerge(t),this.selectCell(n.row,n.col,r.row,r.col,!1)},disabled(){const e=this.getSelectedLast();if(!e)return!0;const t=Lw.isSingleCell({row:e[0],col:e[1],rowspan:e[2]-e[0]+1,colspan:e[3]-e[1]+1});return t||this.selection.isSelectedByCorner()},hidden:!1}}function $w(e,t,n){return(t=qw(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function qw(e){var t=eT(e,"string");return"symbol"==typeof t?t:t+""}function eT(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}class tT{constructor(e){$w(this,"data",void 0),$w(this,"next",null),$w(this,"prev",null),this.data=e}}class nT{constructor(){$w(this,"first",null),$w(this,"last",null)}push(e){const t=new tT(e);if(null===this.first)this.first=t,this.last=t;else{const e=this.last;this.last=t,t.prev=e,e.next=t}return t}unshift(e){const t=new tT(e);if(null===this.first)this.first=t,this.last=t;else{const e=this.first;this.first=t,t.next=e,e.prev=t}}inorder(e){let t=this.first;while(t){const n=e(t);if(t===this.last||!0===n)break;t=t.next}}remove(e){if(null===this.first)return!1;let t,n,r=this.first;while(r){if(r.data===e)return t=r.next,n=r.prev,t&&(t.prev=n),n&&(n.next=t),r===this.first&&(this.first=t),r===this.last&&(this.last=n),!0;r=r.next}return!1}hasCycle(){let e=this.first,t=this.first;while(1){if(null===e)return!1;if(e=e.next,null===e)return!1;if(e=e.next,t=t.next,e===t)return!0}}pop(){if(null===this.last)return null;const e=this.last;return this.last=this.last.prev,e}shift(){if(null===this.first)return null;const e=this.first;return this.first=this.first.next,e}recursiveReverse(){function e(t,n){n&&(e(n,n.next),n.next=t)}if(!this.first)return;e(this.first,this.first.next),this.first.next=null;const t=this.first;this.first=this.last,this.last=t}reverse(){if(!this.first||!this.first.next)return;let e,t=this.first.next,n=this.first;while(t)e=t.next,t.next=n,n.prev=t,n=t,t=e;this.first.next=null,this.last.prev=null,e=this.first,this.first=n,this.last=e}}var rT=nT;function iT(e,t){oT(e,t),t.add(e)}function sT(e,t,n){oT(e,t),t.set(e,n)}function oT(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function aT(e,t){return e.get(cT(e,t))}function lT(e,t,n){return e.set(cT(e,t),n),n}function cT(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}var uT=new WeakMap,hT=new WeakMap,dT=new WeakMap,mT=new WeakMap,gT=new WeakMap,pT=new WeakMap,fT=new WeakMap,RT=new WeakSet;class yT{constructor(e){let{mergedCellsGetter:t,rowIndexMapper:n,columnIndexMapper:r}=e;iT(this,RT),sT(this,uT,new rT),sT(this,hT,new rT),sT(this,dT,null),sT(this,mT,null),sT(this,gT,null),sT(this,pT,null),sT(this,fT,null),lT(gT,this,t),lT(pT,this,n),lT(fT,this,r)}getCurrentVerticalNode(){return aT(mT,this).data}getFirstVerticalNode(){return aT(hT,this).first.data}getNextVerticalNode(){return aT(mT,this).next.data}getPrevVerticalNode(){return aT(mT,this).prev.data}getCurrentHorizontalNode(){return aT(dT,this).data}getFirstHorizontalNode(){return aT(uT,this).first.data}getNextHorizontalNode(){return aT(dT,this).next.data}getPrevHorizontalNode(){return aT(dT,this).prev.data}setPrevNodeAsActive(){lT(mT,this,aT(mT,this).prev),lT(dT,this,aT(dT,this).prev)}setNextNodeAsActive(){lT(mT,this,aT(mT,this).next),lT(dT,this,aT(dT,this).next)}buildFocusOrder(e){const t=e.getTopStartCorner(),n=e.getBottomEndCorner(),r=new WeakSet;lT(uT,this,new rT);for(let s=t.row;s<=n.row;s++)if(!aT(pT,this).isHidden(s))for(let i=t.col;i<=n.col;i++){if(aT(fT,this).isHidden(i))continue;const t=cT(RT,this,MT).call(this,e,aT(uT,this),r,s,i);t&&lT(dT,this,t)}aT(uT,this).first&&(aT(uT,this).first.prev=aT(uT,this).last,aT(uT,this).last.next=aT(uT,this).first);const i=new WeakSet;lT(hT,this,new rT);for(let s=t.col;s<=n.col;s++)if(!aT(fT,this).isHidden(s))for(let r=t.row;r<=n.row;r++){if(aT(pT,this).isHidden(r))continue;const t=cT(RT,this,MT).call(this,e,aT(hT,this),i,r,s);t&&lT(mT,this,t)}aT(hT,this).first&&(aT(hT,this).first.prev=aT(hT,this).last,aT(hT,this).last.next=aT(hT,this).first)}setActiveNode(e,t){return aT(uT,this).inorder(n=>{const{rowStart:r,rowEnd:i,colStart:s,colEnd:o}=n.data;if(e>=r&&e<=i&&t>=s&&t<=o)return lT(dT,this,n),!1}),aT(hT,this).inorder(n=>{const{rowStart:r,rowEnd:i,colStart:s,colEnd:o}=n.data;if(e>=r&&e<=i&&t>=s&&t<=o)return lT(mT,this,n),!1}),this}}function MT(e,t,n,r,i){const s=e.getTopStartCorner(),o=e.getBottomEndCorner(),a=e.highlight.clone().normalize(),l=aT(gT,this).call(this,r,i);if(l&&n.has(l))return null;const c={colStart:i,colEnd:i,rowStart:r,rowEnd:r};if(l){if(n.add(l),l.row<s.row||l.row+l.rowspan-1>o.row||l.col<s.col||l.col+l.colspan-1>o.col)return null;c.colStart=l.col,c.colEnd=l.col+l.colspan-1,c.rowStart=l.row,c.rowEnd=l.row+l.rowspan-1}const u=t.push(c);return r===a.row&&i===a.col||l&&a.row>=l.row&&a.row<=l.row+l.rowspan-1&&a.col>=l.col&&a.col<=l.col+l.colspan-1?u:null}function ST(e){const{hot:t}=e,{rowIndexMapper:n,columnIndexMapper:r}=t;function i(){}function s(t,i,s){const a=e.mergedCellsCollection.get(i,s);if(!Object(o["isObject"])(a))return t.removeAttribute("rowspan"),t.removeAttribute("colspan"),void(t.style.display="");const{row:l,col:c,colspan:u,rowspan:h}=a,[d,m]=e.translateMergedCellToRenderable(l,h,c,u),g=n.getRenderableFromVisualIndex(i),p=r.getRenderableFromVisualIndex(s),f=d-g+1,R=m-p+1,y=n.getNearestNotHiddenIndex(l,1),M=r.getNearestNotHiddenIndex(c,1),S=Math.min(h,f),b=Math.min(u,R);y===i&&M===s?(t.setAttribute("rowspan",S),t.setAttribute("colspan",b)):(t.removeAttribute("rowspan"),t.removeAttribute("colspan"),t.style.display="none")}return{before:i,after:s}}function bT(e,t){TT(e,t),t.add(e)}function wT(e,t,n){TT(e,t),t.set(e,n)}function TT(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function OT(e,t,n){return(t=vT(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function vT(e){var t=ET(e,"string");return"symbol"==typeof t?t:t+""}function ET(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function CT(e,t,n){return e.set(NT(e,t),n),n}function LT(e,t){return e.get(NT(e,t))}function NT(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}ge["a"].getSingleton().register("beforeMergeCells"),ge["a"].getSingleton().register("afterMergeCells"),ge["a"].getSingleton().register("beforeUnmergeCells"),ge["a"].getSingleton().register("afterUnmergeCells");const _T="mergeCells",IT=150,PT=_T;var xT=new WeakMap,DT=new WeakMap,AT=new WeakMap,FT=new WeakMap,YT=new WeakSet;class HT extends qt["a"]{constructor(){super(...arguments),bT(this,YT),OT(this,"mergedCellsCollection",null),OT(this,"autofillCalculations",null),OT(this,"selectionCalculations",null),wT(this,xT,null),wT(this,DT,{row:0,col:0}),wT(this,AT,new yT({mergedCellsGetter:(e,t)=>this.mergedCellsCollection.get(e,t),rowIndexMapper:this.hot.rowIndexMapper,columnIndexMapper:this.hot.columnIndexMapper})),wT(this,FT,ST(this))}static get PLUGIN_KEY(){return _T}static get PLUGIN_PRIORITY(){return IT}isEnabled(){return!!this.hot.getSettings()[_T]}enablePlugin(){var e=this;this.enabled||(this.mergedCellsCollection=new Vw(this),this.autofillCalculations=new Zw(this),this.selectionCalculations=new Jw(this),this.addHook("afterInit",(function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return NT(YT,e,kT).call(e,...n)})),this.addHook("modifyTransformFocus",(function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return NT(YT,e,UT).call(e,...n)})),this.addHook("modifyTransformStart",(function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return NT(YT,e,WT).call(e,...n)})),this.addHook("modifyTransformEnd",(function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return NT(YT,e,XT).call(e,...n)})),this.addHook("beforeSelectionHighlightSet",(function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return NT(YT,e,jT).call(e,...n)})),this.addHook("beforeSetRangeStart",(function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return NT(YT,e,KT).call(e,...n)})),this.addHook("beforeSetRangeStartOnly",(function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return NT(YT,e,KT).call(e,...n)})),this.addHook("beforeSelectionFocusSet",(function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return NT(YT,e,GT).call(e,...n)})),this.addHook("afterSelectionFocusSet",(function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return NT(YT,e,BT).call(e,...n)})),this.addHook("afterSelectionEnd",(function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return NT(YT,e,JT).call(e,...n)})),this.addHook("modifyGetCellCoords",(function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return NT(YT,e,ZT).call(e,...n)})),this.addHook("afterIsMultipleSelection",(function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return NT(YT,e,VT).call(e,...n)})),this.addHook("afterRenderer",(function(){return LT(FT,e).after(...arguments)})),this.addHook("afterContextMenuDefaultOptions",(function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return NT(YT,e,QT).call(e,...n)})),this.addHook("afterGetCellMeta",(function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return NT(YT,e,zT).call(e,...n)})),this.addHook("afterViewportRowCalculatorOverride",(function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return NT(YT,e,$T).call(e,...n)})),this.addHook("afterViewportColumnCalculatorOverride",(function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return NT(YT,e,qT).call(e,...n)})),this.addHook("modifyAutofillRange",(function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return NT(YT,e,eO).call(e,...n)})),this.addHook("afterCreateCol",(function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return NT(YT,e,tO).call(e,...n)})),this.addHook("afterRemoveCol",(function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return NT(YT,e,nO).call(e,...n)})),this.addHook("afterCreateRow",(function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return NT(YT,e,rO).call(e,...n)})),this.addHook("afterRemoveRow",(function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return NT(YT,e,iO).call(e,...n)})),this.addHook("afterChange",(function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return NT(YT,e,sO).call(e,...n)})),this.addHook("beforeDrawBorders",(function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return NT(YT,e,oO).call(e,...n)})),this.addHook("afterDrawSelection",(function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return NT(YT,e,aO).call(e,...n)})),this.addHook("beforeRemoveCellClassNames",(function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return NT(YT,e,lO).call(e,...n)})),this.addHook("beforeBeginEditing",(function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return NT(YT,e,cO).call(e,...n)})),this.addHook("modifyRowHeightByOverlayName",(function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return NT(YT,e,uO).call(e,...n)})),this.addHook("beforeUndoStackChange",(e,t)=>{if("MergeCells"===t)return!1}),this.registerShortcuts(),super.enablePlugin())}disablePlugin(){this.clearCollections(),this.unregisterShortcuts(),this.hot.render(),super.disablePlugin()}updatePlugin(){const e=this.hot.getSettings()[_T];this.disablePlugin(),this.enablePlugin(),this.generateFromSettings(e),super.updatePlugin()}ifChromeForceRepaint(){if(!Object(p["isChrome"])())return;const e=[];let t=[];this.mergedCellsCollection.mergedCells.forEach(e=>{const{row:n,rowspan:r}=e;for(let i=n+1;i<n+r;i++)t.push(i)}),t=[...new Set(t)],t.forEach(t=>{const n=this.hot.rowIndexMapper.getRenderableFromVisualIndex(t);this.hot.view._wt.wtOverlays.getOverlays(!0).map(e=>"master"===(null===e||void 0===e?void 0:e.name)?e:e.clone.wtTable).forEach(t=>{const r=t.getRow(n);r&&(r.style.background=Object(i["getStyle"])(r,"backgroundColor").replace(")",", 0.99)"),e.push(r))})}),this.hot._registerTimeout(()=>{e.forEach(e=>{e.style.background=Object(i["getStyle"])(e,"backgroundColor").replace(", 0.99)",")")})},1)}validateSetting(e){return!!e&&(Lw.containsNegativeValues(e)?(Object(Qr["b"])(Lw.NEGATIVE_VALUES_WARNING(e)),!1):Lw.isOutOfBounds(e,this.hot.countRows(),this.hot.countCols())?(Object(Qr["b"])(Lw.IS_OUT_OF_BOUNDS_WARNING(e)),!1):Lw.isSingleCell(e)?(Object(Qr["b"])(Lw.IS_SINGLE_CELL(e)),!1):!Lw.containsZeroSpan(e)||(Object(Qr["b"])(Lw.ZERO_SPAN_WARNING(e)),!1))}generateFromSettings(e){if(!Array.isArray(e))return;const t=e.filter(e=>this.validateSetting(e)),n=this.mergedCellsCollection.filterOverlappingMergeCells(t),r=[];n.forEach(e=>{const{row:t,col:n,rowspan:i,colspan:s}=e,o=this.hot._createCellCoords(t,n),a=this.hot._createCellCoords(t+i-1,n+s-1),l=this.hot._createCellRange(o,o,a);this.mergeRange(l,!0,!0);for(let c=t;c<t+i;c++)for(let e=n;e<n+s;e++)c===t&&e===n||r.push([c,e,null])}),0!==r.length&&this.hot.setDataAtCell(r,void 0,void 0,this.pluginName)}clearCollections(){this.mergedCellsCollection.clear()}canMergeRange(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return!!t||this.validateSetting(e)}mergeSelection(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.hot.getSelectedRangeLast();if(!e)return;e.setDirection(this.hot.isRtl()?"NE-SW":"NW-SE");const{from:t,to:n}=e;this.unmergeRange(e,!0),this.mergeRange(e),this.hot.selectCell(t.row,t.col,n.row,n.col,!1)}unmergeSelection(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.hot.getSelectedRangeLast();if(!e)return;const{from:t,to:n}=e;this.unmergeRange(e,!0),this.hot.selectCell(t.row,t.col,n.row,n.col,!1)}mergeRange(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const r=e.getTopStartCorner(),i=e.getBottomEndCorner(),s={row:r.row,col:r.col,rowspan:i.row-r.row+1,colspan:i.col-r.col+1},o=[];let a=null;if(!this.canMergeRange(s,t))return!1;this.hot.runHooks("beforeMergeCells",e,t),Object(nt["rangeEach"])(0,s.rowspan-1,e=>{Object(nt["rangeEach"])(0,s.colspan-1,t=>{let n=null;o[e]||(o[e]=[]),0===e&&0===t?n=this.hot.getSourceDataAtCell(this.hot.toPhysicalRow(s.row),this.hot.toPhysicalColumn(s.col)):this.hot.setCellMeta(s.row+e,s.col+t,"hidden",!0),o[e][t]=n})}),this.hot.setCellMeta(s.row,s.col,"spanned",!0);const l=this.mergedCellsCollection.add(s,t);return!l||(n?a=[s.row,s.col,o]:this.hot.populateFromArray(s.row,s.col,o,void 0,void 0,this.pluginName),t||this.ifChromeForceRepaint(),this.hot.runHooks("afterMergeCells",e,s,t),a)}unmergeRange(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const n=this.mergedCellsCollection.getWithinRange(e);0!==n.length&&(this.hot.runHooks("beforeUnmergeCells",e,t),Object(h["arrayEach"])(n,e=>{this.mergedCellsCollection.remove(e.row,e.col),Object(nt["rangeEach"])(0,e.rowspan-1,t=>{Object(nt["rangeEach"])(0,e.colspan-1,n=>{this.hot.removeCellMeta(e.row+t,e.col+n,"hidden"),this.hot.removeCellMeta(e.row+t,e.col+n,"copyable")})}),this.hot.removeCellMeta(e.row,e.col,"spanned")}),this.hot.runHooks("afterUnmergeCells",e,t),this.hot.render())}toggleMerge(e){const t=this.mergedCellsCollection.get(e.from.row,e.from.col),n=t.row===e.from.row&&t.col===e.from.col&&t.row+t.rowspan-1===e.to.row&&t.col+t.colspan-1===e.to.col;n?this.unmergeRange(e):this.mergeSelection(e)}merge(e,t,n,r){const i=this.hot._createCellCoords(e,t),s=this.hot._createCellCoords(n,r);this.mergeRange(this.hot._createCellRange(i,i,s))}unmerge(e,t,n,r){const i=this.hot._createCellCoords(e,t),s=this.hot._createCellCoords(n,r);this.unmergeRange(this.hot._createCellRange(i,i,s))}registerShortcuts(){const e=this.hot.getShortcutManager(),t=e.getContext("grid");t.addShortcut({keys:[["Control","m"]],callback:()=>{const e=this.hot.getSelectedRangeLast();e&&!e.isSingleHeader()&&(this.toggleMerge(e),this.hot.render())},runOnlyIf:e=>!e.altKey,group:PT})}unregisterShortcuts(){const e=this.hot.getShortcutManager(),t=e.getContext("grid");t.removeShortcutsByGroup(PT)}modifyViewportRowStart(e,t){const n=this.hot.rowIndexMapper,r=n.getVisualFromRenderableIndex(e.startRow);for(let i=0;i<t;i+=1){const s=this.mergedCellsCollection.get(r,i);if(Object(o["isObject"])(s)){const r=n.getRenderableFromVisualIndex(n.getNearestNotHiddenIndex(s.row,1));if(r<e.startRow)return e.startRow=r,void this.modifyViewportRowStart(e,t)}}}modifyViewportRowEnd(e,t){const n=this.hot.rowIndexMapper,r=n.getVisualFromRenderableIndex(e.endRow);for(let i=0;i<t;i+=1){const s=this.mergedCellsCollection.get(r,i);if(Object(o["isObject"])(s)){const r=s.row+s.rowspan-1,i=n.getRenderableFromVisualIndex(n.getNearestNotHiddenIndex(r,-1));if(i>e.endRow)return e.endRow=i,void this.modifyViewportRowEnd(e,t)}}}modifyViewportColumnStart(e,t){const n=this.hot.columnIndexMapper,r=n.getVisualFromRenderableIndex(e.startColumn);for(let i=0;i<t;i+=1){const s=this.mergedCellsCollection.get(i,r);if(Object(o["isObject"])(s)){const r=n.getRenderableFromVisualIndex(n.getNearestNotHiddenIndex(s.col,1));if(r<e.startColumn)return e.startColumn=r,void this.modifyViewportColumnStart(e,t)}}}modifyViewportColumnEnd(e,t){const n=this.hot.columnIndexMapper,r=n.getVisualFromRenderableIndex(e.endColumn);for(let i=0;i<t;i+=1){const s=this.mergedCellsCollection.get(i,r);if(Object(o["isObject"])(s)){const r=s.col+s.colspan-1,i=n.getRenderableFromVisualIndex(n.getNearestNotHiddenIndex(r,-1));if(i>e.endColumn)return e.endColumn=i,void this.modifyViewportColumnEnd(e,t)}}}translateMergedCellToRenderable(e,t,n,r){const{rowIndexMapper:i,columnIndexMapper:s}=this.hot;let o,a;o=0===t?i.getNearestNotHiddenIndex(e,1):i.getNearestNotHiddenIndex(e+t-1,-1),a=0===r?s.getNearestNotHiddenIndex(n,1):s.getNearestNotHiddenIndex(n+r-1,-1);const l=e>=0?i.getRenderableFromVisualIndex(o):e,c=n>=0?s.getRenderableFromVisualIndex(a):n;return[l,c]}}function kT(){this.generateFromSettings(this.hot.getSettings()[_T]),this.hot.render()}function VT(e){if(e){const e=this.mergedCellsCollection.mergedCells,t=this.hot.getSelectedRangeLast(),n=t.getTopStartCorner(),r=t.getBottomEndCorner();for(let i=0;i<e.length;i+=1)if(n.row===e[i].row&&n.col===e[i].col&&r.row===e[i].row+e[i].rowspan-1&&r.col===e[i].col+e[i].colspan-1)return!1}return e}function UT(e){LT(DT,this).row=e.row,LT(DT,this).col=e.col}function WT(e){const t=this.hot.getSelectedRangeLast(),{highlight:n}=t,{columnIndexMapper:r,rowIndexMapper:i}=this.hot;LT(xT,this)&&(null!==i.getRenderableFromVisualIndex(LT(xT,this).row)&&(n.row=LT(xT,this).row),null!==r.getRenderableFromVisualIndex(LT(xT,this).col)&&(n.col=LT(xT,this).col),CT(xT,this,null));const s=this.mergedCellsCollection.get(n.row,n.col);if(!s)return;const o=s.col,a=s.col+s.colspan-1;if(e.col<0){const t=n.col>=o&&n.col<=a?o-1:a,i=r.getNearestNotHiddenIndex(t,-1);e.col=null===i?-this.hot.view.countRenderableColumnsInRange(0,n.col):-Math.max(this.hot.view.countRenderableColumnsInRange(i,n.col)-1,1)}else if(e.col>0){const t=n.col>=o&&n.col<=a?a+1:o,i=r.getNearestNotHiddenIndex(t,1);e.col=null===i?this.hot.view.countRenderableColumnsInRange(n.col,this.hot.countCols()):Math.max(this.hot.view.countRenderableColumnsInRange(n.col,i)-1,1)}const l=s.row,c=s.row+s.rowspan-1;if(e.row<0){const t=n.row>=l&&n.row<=c?l-1:c,r=i.getNearestNotHiddenIndex(t,-1);e.row=null===r?-this.hot.view.countRenderableRowsInRange(0,n.row):-Math.max(this.hot.view.countRenderableRowsInRange(r,n.row)-1,1)}else if(e.row>0){const t=n.row>=l&&n.row<=c?c+1:l,r=i.getNearestNotHiddenIndex(t,1);e.row=null===r?this.hot.view.countRenderableRowsInRange(n.row,this.hot.countRows()):Math.max(this.hot.view.countRenderableRowsInRange(n.row,r)-1,1)}}function XT(e){const t=this.hot.getSelectedRangeLast(),n=t.clone(),{to:r}=t,{columnIndexMapper:i,rowIndexMapper:s}=this.hot,o=(e,t)=>{n.expand(this.hot._createCellCoords(e,t));for(let r=0;r<this.mergedCellsCollection.mergedCells.length;r+=1)n.expandByRange(this.mergedCellsCollection.mergedCells[r].getRange())};if(e.col<0){let s=this.mergedCellsCollection.getStartMostColumnIndex(t,r.col)+e.col;o(r.row,s),"E-W"===t.getHorizontalDirection()&&"E-W"===n.getHorizontalDirection()&&(s=n.getTopStartCorner().col);const a=i.getNearestNotHiddenIndex(s,1);null!==a&&(e.col=-Math.max(this.hot.view.countRenderableColumnsInRange(a,r.col)-1,1))}else if(e.col>0){let s=this.mergedCellsCollection.getEndMostColumnIndex(t,r.col)+e.col;o(r.row,s),"W-E"===t.getHorizontalDirection()&&"W-E"===n.getHorizontalDirection()&&(s=n.getBottomEndCorner().col);const a=i.getNearestNotHiddenIndex(s,-1);null!==a&&(e.col=Math.max(this.hot.view.countRenderableColumnsInRange(r.col,a)-1,1))}if(e.row<0){let i=this.mergedCellsCollection.getTopMostRowIndex(t,r.row)+e.row;o(i,r.col),"S-N"===t.getVerticalDirection()&&"S-N"===n.getVerticalDirection()&&(i=n.getTopStartCorner().row);const a=s.getNearestNotHiddenIndex(i,1);null!==a&&(e.row=-Math.max(this.hot.view.countRenderableRowsInRange(a,r.row)-1,1))}else if(e.row>0){let i=this.mergedCellsCollection.getBottomMostRowIndex(t,r.row)+e.row;o(i,r.col),"N-S"===t.getVerticalDirection()&&"N-S"===n.getVerticalDirection()&&(i=n.getBottomStartCorner().row);const a=s.getNearestNotHiddenIndex(i,-1);null!==a&&(e.row=Math.max(this.hot.view.countRenderableRowsInRange(r.row,a)-1,1))}}function jT(){const e=this.hot.getSelectedRangeLast(),{highlight:t}=e;if(this.hot.selection.isSelectedByColumnHeader()||this.hot.selection.isSelectedByRowHeader())return void CT(xT,this,t.clone());for(let r=0;r<this.mergedCellsCollection.mergedCells.length;r+=1)e.expandByRange(this.mergedCellsCollection.mergedCells[r].getRange(),!1);for(let r=0;r<this.mergedCellsCollection.mergedCells.length;r+=1)e.expandByRange(this.mergedCellsCollection.mergedCells[r].getRange(),!1);const n=this.mergedCellsCollection.get(t.row,t.col);CT(xT,this,t.clone()),n&&t.assign(n)}function ZT(e,t){if(e<0||t<0)return;const n=this.mergedCellsCollection.get(e,t);if(!n)return;const{row:r,col:i,colspan:s,rowspan:o}=n;return[r,i,r+o-1,i+s-1]}function QT(e){e.items.push({name:"---------"},zw(this))}function KT(){CT(xT,this,null)}function GT(){if(LT(xT,this).isCell())return;const e=this.hot.getSelectedRangeLast(),t=e.getVerticalDirection(),n=e.getHorizontalDirection(),r=LT(xT,this).clone().normalize();LT(AT,this).setActiveNode(r.row,r.col),LT(DT,this).row>0||LT(DT,this).col>0?LT(AT,this).setPrevNodeAsActive():("E-W"===n&&LT(DT,this).col<0||"S-N"===t&&LT(DT,this).row<0)&&LT(AT,this).setNextNodeAsActive()}function BT(e,t){const n=this.hot.getSelectedRangeLast(),{columnIndexMapper:r,rowIndexMapper:i}=this.hot;let s=null,o=null;if(LT(DT,this).col<0){const{rowEnd:e,colEnd:t}=LT(AT,this).getPrevHorizontalNode();o=r.getNearestNotHiddenIndex(t,-1),s=i.getNearestNotHiddenIndex(e,-1)}else if(LT(DT,this).col>0){const{rowStart:e,colStart:t}=LT(AT,this).getNextHorizontalNode();o=r.getNearestNotHiddenIndex(t,1),s=i.getNearestNotHiddenIndex(e,1)}else if(LT(DT,this).row<0){const{rowEnd:e,colEnd:t}=LT(AT,this).getPrevVerticalNode();o=r.getNearestNotHiddenIndex(t,-1),s=i.getNearestNotHiddenIndex(e,-1)}else if(LT(DT,this).row>0){const{rowStart:e,colStart:t}=LT(AT,this).getNextVerticalNode();o=r.getNearestNotHiddenIndex(t,1),s=i.getNearestNotHiddenIndex(e,1)}if(null!==s||null!==o){const r=this.hot._createCellCoords(s,o),i=this.mergedCellsCollection.get(r.row,r.col),a=this.hot.selection.highlight.getFocus();e=r.row,t=r.col,i?n.highlight.assign({row:this.hot.rowIndexMapper.getNearestNotHiddenIndex(i.row,1),col:this.hot.columnIndexMapper.getNearestNotHiddenIndex(i.col,1)}):n.highlight.assign(r),a.clear(),a.add(r).commit()}LT(AT,this).setActiveNode(e,t),CT(DT,this,{row:0,col:0})}function JT(){const e=this.hot.getSelectedRangeLast();e.isHeader()||LT(AT,this).buildFocusOrder(this.hot.getSelectedRangeLast())}function zT(e,t,n){const r=this.mergedCellsCollection.get(e,t);r&&(r.row!==e||r.col!==t?n.copyable=!1:(n.rowspan=r.rowspan,n.colspan=r.colspan))}function $T(e){const t=this.hot.countCols();this.modifyViewportRowStart(e,t),this.modifyViewportRowEnd(e,t)}function qT(e){const t=this.hot.countRows();this.modifyViewportColumnStart(e,t),this.modifyViewportColumnEnd(e,t)}function eO(e,t){this.autofillCalculations.correctSelectionAreaSize(t);const n=this.autofillCalculations.getDirection(t,e);let r=e;if(this.autofillCalculations.dragAreaOverlapsCollections(t,r,n))return r=t,r;const i=this.hot._createCellCoords(t[0],t[1]),s=this.hot._createCellCoords(t[2],t[3]),o=this.hot._createCellRange(i,i,s),a=this.mergedCellsCollection.getWithinRange(o);return 0===a.length||(r=this.autofillCalculations.snapDragArea(t,r,n,a)),r}function tO(e,t){this.mergedCellsCollection.shiftCollections("right",e,t)}function nO(e,t){this.mergedCellsCollection.shiftCollections("left",e,t)}function rO(e,t,n){"auto"!==n&&this.mergedCellsCollection.shiftCollections("down",e,t)}function iO(e,t){this.mergedCellsCollection.shiftCollections("up",e,t)}function sO(e,t){"Autofill.fill"===t&&this.autofillCalculations.recreateAfterDataPopulation(e)}function oO(e,t){if(t&&"area"===t){const t=this.hot.getSelectedRangeLast(),n=this.mergedCellsCollection.getWithinRange(t);Object(h["arrayEach"])(n,n=>{t.getBottomEndCorner().row===n.getLastRow()&&t.getBottomEndCorner().col===n.getLastColumn()&&(e[2]=n.row,e[3]=n.col)})}}function aO(e,t,n,r){if(n)return this.selectionCalculations.getSelectedMergedCellClassName(e,t,n,r)}function lO(){return this.selectionCalculations.getSelectedMergedCellClassNameToRemove()}function cO(e,t,n,r){if(!(r instanceof MouseEvent))return;const i=this.hot.getSelectedRangeLast(),s=this.mergedCellsCollection.getByRange(i);if(!s)return;const o=this.hot._createCellCoords(s.row,s.col),a=this.hot._createCellCoords(s.row+s.rowspan-1,s.col+s.colspan-1);return 0===this.hot.selection.getLayerLevel()&&i.isEqual(this.hot._createCellRange(o,o,a))}function uO(e,t,n){if(this.hot.getSettings().rowHeaders||"bottom"===n||"bottom_inline_start_corner"===n)return e;let r,i;if("master"===n)r=this.hot.view.getFirstRenderedVisibleColumn(),i=this.hot.view.getLastRenderedVisibleColumn();else{const e=this.hot.view.getOverlayByName(n);r=this.hot.columnIndexMapper.getVisualFromRenderableIndex(e.clone.wtTable.getFirstRenderedColumn()),i=this.hot.columnIndexMapper.getVisualFromRenderableIndex(e.clone.wtTable.getLastRenderedColumn())}const s=this.mergedCellsCollection.get(t,r);if(!s)return e;const o=this.hot._createCellCoords(t,r),a=this.hot._createCellCoords(t,i),l=this.hot._createCellRange(o,o,a),c=this.mergedCellsCollection.getWithinRange(l),u=c.reduce((e,t)=>{let{rowspan:n}=t;return Math.max(e,n)},1);let h=0;return c.length>1&&c[0].rowspan<u&&(h=u-c[0].rowspan),c.forEach(r=>{var i;let{rowspan:s}=r,o=0;o="top"===n||"top_inline_start_corner"===n?Math.min(u,this.hot.view.countNotHiddenFixedRowsTop()-t):s-h,e=Math.max(null!==(i=e)&&void 0!==i?i:0,NT(YT,this,hO).call(this,t,o))}),e}function hO(e,t){const n=this.hot.view._wt.wtSettings.getSettingPure("defaultRowHeight"),r=this.hot.getPlugin("autoRowSize");let i=0;for(let o=e;o<e+t;o++){var s;if(!this.hot.rowIndexMapper.isHidden(o))i+=null!==(s=null===r||void 0===r?void 0:r.getRowHeight(o))&&void 0!==s?s:n}return i}function dO(e,t){return function(n,r){const[,...i]=n,[,...s]=r;return function n(r){const o=e[r],a=t[r],l=i[r],c=s[r],u=a.multiColumnSorting,h=u.compareFunctionFactory?u.compareFunctionFactory:Wi(a.type),d=h(o,a,u)(l,c);if(d===Xi){const e=r+1;if("undefined"!==typeof t[e])return n(e)}return d}(0)}}function mO(){Object(Qr["b"])(Ds["a"]`Plugins \`columnSorting\` and \`multiColumnSorting\` should not be enabled simultaneously.
  221. Only \`multiColumnSorting\` will work. The \`columnSorting\` plugin will be disabled.`)}const gO="sort";function pO(e,t,n){const r=[];return!1===n||e.isColumnSorted(t)&&e.getNumberOfSortedColumns()>1&&r.push(`${gO}-${e.getIndexOfColumnInSortQueue(t)+1}`),r}function fO(e){const t=e.className.split(" "),n=new RegExp(`^${gO}-[0-9]{1,2}$`);return t.filter(e=>n.test(e))}function RO(e,t,n){return(t=yO(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function yO(e){var t=MO(e,"string");return"symbol"==typeof t?t:t+""}function MO(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}const SO="multiColumnSorting",bO=170,wO="columnSorting",TO=SO;Vi(SO,dO);class OO extends Os{constructor(){super(...arguments),RO(this,"pluginKey",SO)}static get PLUGIN_KEY(){return SO}static get PLUGIN_PRIORITY(){return bO}isEnabled(){return super.isEnabled()}enablePlugin(){!this.enabled&&this.hot.getSettings()[this.pluginKey]&&this.hot.getSettings()[wO]&&(mO(),this.hot.getPlugin(wO).disablePlugin()),super.enablePlugin()}disablePlugin(){super.disablePlugin()}registerShortcuts(){super.registerShortcuts(),this.hot.getShortcutManager().getContext("grid").addShortcut({keys:[["Shift","Enter"]],callback:()=>{const{highlight:e}=this.hot.getSelectedRangeLast();return-1===e.row&&e.col>=0&&this.sort(this.getNextSortConfig(e.col,Ss)),!1},runOnlyIf:()=>{var e,t;const n=null===(e=this.hot.getSelectedRangeLast())||void 0===e?void 0:e.highlight;return n&&(null===(t=this.hot.getSelectedRangeLast())||void 0===t?void 0:t.isSingle())&&this.hot.selection.isCellVisible(n)&&n.isHeader()},relativeToGroup:a["a"],position:"before",group:TO})}unregisterShortcuts(){super.unregisterShortcuts(),this.hot.getShortcutManager().getContext("grid").removeShortcutsByGroup(TO)}sort(e){super.sort(e)}clearSort(){super.clearSort()}isSorted(){return super.isSorted()}getSortConfig(e){return super.getSortConfig(e)}setSortConfig(e){super.setSortConfig(e)}getNormalizedSortConfigs(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return Array.isArray(e)?e:[e]}updateHeaderClasses(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];super.updateHeaderClasses(e,...n),Object(i["removeClass"])(e,fO(e)),!1!==this.enabled&&Object(i["addClass"])(e,pO(...n))}onUpdateSettings(e){this.hot.getSettings()[this.pluginKey]&&this.hot.getSettings()[wO]&&mO(),super.onUpdateSettings(e)}onAfterOnCellMouseDown(e,t){!1!==ts(t.row,t.col,e)&&this.wasClickableHeaderClicked(e,t.col)&&(this.hot.getShortcutManager().isCtrlPressed()?(this.hot.deselectCell(),this.hot.selectColumns(t.col),this.sort(this.getNextSortConfig(t.col,Ss))):this.sort(this.getColumnNextConfig(t.col)))}}function vO(e,t,n){return(t=EO(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function EO(e){var t=CO(e,"string");return"symbol"==typeof t?t:t+""}function CO(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}const LO="multipleSelectionHandles",NO=160;class _O extends qt["a"]{constructor(){super(...arguments),vO(this,"dragged",[]),vO(this,"lastSetCell",null)}static get PLUGIN_KEY(){return LO}static get PLUGIN_PRIORITY(){return NO}isEnabled(){return Object(p["isMobileBrowser"])()}enablePlugin(){this.enabled||(this.registerListeners(),super.enablePlugin())}registerListeners(){const e=this,{rootElement:t}=this.hot;function n(t){if(1===e.dragged.length)return e.dragged.splice(0,e.dragged.length),!0;const n=e.dragged.indexOf(t);if(-1===n)return!1;0===n?e.dragged=e.dragged.slice(0,1):1===n&&(e.dragged=e.dragged.slice(-1))}this.eventManager.addEventListener(t,"touchstart",t=>{let n;return Object(i["hasClass"])(t.target,"topSelectionHandle-HitArea")?(n=e.hot.getSelectedRangeLast(),e.dragged.push("top"),e.touchStartRange={width:n.getWidth(),height:n.getHeight(),direction:n.getDirection()},t.preventDefault(),!1):Object(i["hasClass"])(t.target,"bottomSelectionHandle-HitArea")?(n=e.hot.getSelectedRangeLast(),e.dragged.push("bottom"),e.touchStartRange={width:n.getWidth(),height:n.getHeight(),direction:n.getDirection()},t.preventDefault(),!1):void 0}),this.eventManager.addEventListener(t,"touchend",t=>Object(i["hasClass"])(t.target,"topSelectionHandle-HitArea")?(n.call(e,"top"),e.touchStartRange=void 0,t.preventDefault(),!1):Object(i["hasClass"])(t.target,"bottomSelectionHandle-HitArea")?(n.call(e,"bottom"),e.touchStartRange=void 0,t.preventDefault(),!1):void 0),this.eventManager.addEventListener(t,"touchmove",t=>{const{rootDocument:n}=this.hot;let r,i,s,o,a,l;if(0===e.dragged.length)return;const c=n.elementFromPoint(t.touches[0].clientX,t.touches[0].clientY);c&&c!==e.lastSetCell&&("TD"!==c.nodeName&&"TH"!==c.nodeName||(r=e.hot.getCoords(c),-1===r.col&&(r.col=0),i=e.hot.getSelectedRangeLast(),s=i.getWidth(),o=i.getHeight(),a=i.getDirection(),1===s&&1===o&&e.hot.selection.setRangeEnd(r),l=e.getCurrentRangeCoords(i,r,e.touchStartRange.direction,a,e.dragged[0]),null!==l.start&&e.hot.selection.setRangeStart(l.start),e.hot.selection.setRangeEnd(l.end),e.lastSetCell=c),t.preventDefault())})}getCurrentRangeCoords(e,t,n,r,i){const s=e.getTopStartCorner(),o=e.getBottomEndCorner(),a=e.getBottomStartCorner(),l=e.getTopEndCorner();let c={start:null,end:null};switch(n){case"NE-SW":switch(r){case"NE-SW":case"NW-SE":c="top"===i?{start:this.hot._createCellCoords(t.row,e.highlight.col),end:this.hot._createCellCoords(a.row,t.col)}:{start:this.hot._createCellCoords(e.highlight.row,t.col),end:this.hot._createCellCoords(t.row,s.col)};break;case"SE-NW":"bottom"===i&&(c={start:this.hot._createCellCoords(o.row,t.col),end:this.hot._createCellCoords(t.row,s.col)});break;default:break}break;case"NW-SE":switch(r){case"NE-SW":"top"===i?c={start:t,end:a}:c.end=t;break;case"NW-SE":"top"===i?c={start:t,end:o}:c.end=t;break;case"SE-NW":"top"===i?c={start:t,end:s}:c.end=t;break;case"SW-NE":"top"===i?c={start:t,end:l}:c.end=t;break;default:break}break;case"SW-NE":switch(r){case"NW-SE":c="bottom"===i?{start:this.hot._createCellCoords(t.row,s.col),end:this.hot._createCellCoords(a.row,t.col)}:{start:this.hot._createCellCoords(s.row,t.col),end:this.hot._createCellCoords(t.row,o.col)};break;case"SW-NE":c="top"===i?{start:this.hot._createCellCoords(e.highlight.row,t.col),end:this.hot._createCellCoords(t.row,o.col)}:{start:this.hot._createCellCoords(t.row,s.col),end:this.hot._createCellCoords(s.row,t.col)};break;case"SE-NW":"bottom"===i?c={start:this.hot._createCellCoords(t.row,l.col),end:this.hot._createCellCoords(s.row,t.col)}:"top"===i&&(c={start:a,end:t});break;default:break}break;case"SE-NW":switch(r){case"NW-SE":case"NE-SW":case"SW-NE":"top"===i&&(c.end=t);break;case"SE-NW":"top"===i?c.end=t:c={start:t,end:s};break;default:break}break;default:break}return c}isDragged(){return this.dragged.length>0}}var IO=n("a309");function PO(){let{label:e="",colspan:t=1,origColspan:n=1,collapsible:r=!1,crossHiddenColumns:i=[],isCollapsed:s=!1,isHidden:o=!1,isRoot:a=!1,isPlaceholder:l=!1,headerClassNames:c=[]}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{label:e,colspan:t,origColspan:n,collapsible:r,isCollapsed:s,crossHiddenColumns:i,isHidden:o,isRoot:a,isPlaceholder:l,headerClassNames:c}}function xO(){return{label:"",isPlaceholder:!0}}function DO(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1/0;const n=[];if(0===t)return n;Object(h["arrayEach"])(e,e=>{const r=[];let i=0;n.push(r),Object(h["arrayEach"])(e,e=>{const n=PO();if(Object(o["isObject"])(e)){const{label:t,colspan:r,headerClassName:i}=e;n.label=Object(d["stringify"])(t),"number"===typeof r&&r>1&&(n.colspan=r,n.origColspan=r),"string"===typeof i&&(n.headerClassNames=[...i.split(" ")])}else n.label=Object(d["stringify"])(e);i+=n.origColspan;let s=!1;if(i>=t&&(n.colspan=n.origColspan-(i-t),n.origColspan=n.colspan,s=!0),r.push(n),n.colspan>1)for(let t=0;t<n.colspan-1;t++)r.push(xO());return!s})});const r=Math.max(...Object(h["arrayMap"])(n,e=>e.length));return Object(h["arrayEach"])(n,e=>{if(e.length<r){const t=Object(h["arrayMap"])(new Array(r-e.length),()=>PO());e.splice(e.length,0,...t)}}),n}function AO(e,t,n){FO(e,t),t.set(e,n)}function FO(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function YO(e,t){return e.get(kO(e,t))}function HO(e,t,n){return e.set(kO(e,t),n),n}function kO(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}const VO=["label","collapsible"];var UO=new WeakMap,WO=new WeakMap,XO=new WeakMap;class jO{constructor(){AO(this,UO,[]),AO(this,WO,0),AO(this,XO,1/0)}setColumnsLimit(e){HO(XO,this,e)}setData(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];HO(UO,this,DO(e,YO(XO,this))),HO(WO,this,YO(UO,this).length)}getData(){return YO(UO,this)}mergeWith(e){Object(h["arrayEach"])(e,e=>{let{row:t,col:n,...r}=e;const i=this.getHeaderSettings(t,n);null!==i&&Object(o["extend"])(i,r,VO)})}map(e){Object(h["arrayEach"])(YO(UO,this),t=>{Object(h["arrayEach"])(t,t=>{const n=e({...t});Object(o["isObject"])(n)&&Object(o["extend"])(t,n,VO)})})}getHeaderSettings(e,t){var n;if(e>=YO(WO,this)||e<0)return null;const r=YO(UO,this)[e];return!1===Array.isArray(r)||t>=r.length?null:null!==(n=r[t])&&void 0!==n?n:null}getHeadersSettings(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;const r=[];if(e>=YO(WO,this)||e<0)return r;const i=YO(UO,this)[e];let s=0;for(let o=t;o<i.length;o++){const e=i[o];if(e.isPlaceholder)throw new Error("The first column settings cannot overlap the other header layers");if(s+=e.colspan,r.push(e),e.colspan>1&&(o+=e.colspan-1),s===n)break;if(s>n)throw new Error("The last column settings cannot overlap the other header layers")}return r}getLayersCount(){return YO(WO,this)}getColumnsCount(){return YO(WO,this)>0?YO(UO,this)[0].length:0}clear(){HO(UO,this,[]),HO(WO,this,0)}}function ZO(e,t,n){return(t=QO(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function QO(e){var t=KO(e,"string");return"symbol"==typeof t?t:t+""}function KO(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}const GO="DF-pre-order";function BO(e,t){let n=e.call(t,this);for(let r=0;r<this.childs.length;r++){if(!1===n)return!1;n=BO.call(this.childs[r],e,t)}return n}const JO="DF-post-order";function zO(e,t){for(let n=0;n<this.childs.length;n++){const r=zO.call(this.childs[n],e,t);if(!1===r)return!1}return e.call(t,this)}const $O="BF";function qO(e,t){const n=[this];function r(){if(0===n.length)return;const i=n.shift();n.push(...i.childs),!1!==e.call(t,i)&&r()}r()}const ev=$O,tv=new Map([[GO,BO],[JO,zO],[$O,qO]]);class nv{constructor(e){ZO(this,"data",{}),ZO(this,"parent",null),ZO(this,"childs",[]),this.data=e}addChild(e){e.parent=this,this.childs.push(e)}cloneTree(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this;const t=new nv({...e.data});for(let n=0;n<e.childs.length;n++)t.addChild(this.cloneTree(e.childs[n]));return t}replaceTreeWith(e){this.data={...e.data},this.childs=[];for(let t=0;t<e.childs.length;t++)this.addChild(e.childs[t])}walkDown(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:ev;if(!tv.has(t))throw new Error(`Traversal strategy "${t}" does not exist`);tv.get(t).call(this,e,this)}walkUp(e){const t=this,n=r=>{const i=e.call(t,r);!1!==i&&null!==r.parent&&n(r.parent)};n(this)}}function rv(e,t,n){iv(e,t),t.set(e,n)}function iv(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function sv(e,t){return e.get(av(e,t))}function ov(e,t,n){return e.set(av(e,t),n),n}function av(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}var lv=new WeakMap,cv=new WeakMap,uv=new WeakMap;class hv{constructor(e){rv(this,lv,new Map),rv(this,cv,new Map),rv(this,uv,null),ov(uv,this,e)}getRoots(){return Array.from(sv(lv,this).values())}getRootByColumn(e){let t;return sv(cv,this).has(e)&&(t=sv(lv,this).get(sv(cv,this).get(e))),t}getNode(e,t){const n=this.getRootByColumn(t);if(!n)return;const r=t-sv(cv,this).get(t);let i,s=0;return n.walkDown(n=>{const{data:{origColspan:o,headerLevel:a}}=n;if(e===a){if(r>=s&&r<=s+o-1)return i=n,i.data.isRoot=t===i.data.columnIndex,!1;s+=o}}),i}rebuildTreeIndex(){let e=0;sv(cv,this).clear(),Object(h["arrayEach"])(sv(lv,this),t=>{let[,{data:{colspan:n}}]=t;for(let r=e;r<e+n;r++)sv(cv,this).set(r,e);e+=n})}buildTree(){this.clear();const e=sv(uv,this).getColumnsCount();let t=0;while(t<e){const e=sv(uv,this).getHeaderSettings(0,t),n=new nv;sv(lv,this).set(t,n),this.buildLeaves(n,t,0,e.origColspan),t+=e.origColspan}this.rebuildTreeIndex()}buildLeaves(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1;const i=sv(uv,this).getHeadersSettings(n,t,r);n+=1,Object(h["arrayEach"])(i,r=>{const i={...r,headerLevel:n-1,columnIndex:t};let s;1===n?(e.data=i,s=e):(s=new nv(i),e.addChild(s)),n<sv(uv,this).getLayersCount()&&this.buildLeaves(s,t,n,r.origColspan),t+=r.origColspan})}clear(){sv(lv,this).clear(),sv(cv,this).clear()}}function dv(e,t){e.walkDown(e=>{let{data:n,childs:r}=e;if(!n.isHidden&&(t(n.columnIndex),0===r.length))for(let i=1;i<n.colspan;i++)t(n.columnIndex+i)})}function mv(e,t){let{childs:n}=e;if(0!==n.length)return n[0].data[t]}function gv(e){return mv(e,"origColspan")===e.data.origColspan}function pv(e){const{data:t,childs:n}=e;if(!t.isCollapsed||t.isHidden||t.origColspan<=1)return{rollbackModification:()=>{},affectedColumns:[],colspanCompensation:0};const r=gv(e);if(r)return pv(n[0]);t.isCollapsed=!1;const i=n.slice(1),s=new Set;let o=0;if(i.length>0)Object(h["arrayEach"])(i,e=>{e.replaceTreeWith(e.data.clonedTree),e.data.clonedTree=null;const t=e.data;o+=t.colspan,dv(e,e=>{s.add(e)})});else{const{colspan:e,origColspan:n,columnIndex:r}=t;o=n-e;for(let t=1;t<n;t++)s.add(r+t)}return e.walkUp(e=>{const{data:t}=e;t.colspan+=o,t.colspan>=t.origColspan?(t.colspan=t.origColspan,t.isCollapsed=!1):gv(e)&&(t.isCollapsed=mv(e,"isCollapsed"))}),{rollbackModification:()=>fv(e),affectedColumns:Array.from(s),colspanCompensation:o}}function fv(e){var t;const{data:n,childs:r}=e;if(n.isCollapsed||n.isHidden||n.origColspan<=1)return{rollbackModification:()=>{},affectedColumns:[],colspanCompensation:0};const i=gv(e);if(i)return fv(r[0]);n.isCollapsed=!0;const s=r.slice(1),o=new Set;if(s.length>0)Object(h["arrayEach"])(s,e=>{dv(e,e=>{o.add(e)}),e.data.clonedTree=e.cloneTree(),e.walkDown(e=>{let{data:t}=e;t.isHidden=!0})});else{const{origColspan:e,columnIndex:t}=n;for(let n=1;n<e;n++){const e=t+n;o.add(e)}}const a=n.colspan-(null!==(t=mv(e,"colspan"))&&void 0!==t?t:1);return e.walkUp(e=>{const{data:t}=e;t.colspan-=a,t.colspan<=1?(t.colspan=1,t.isCollapsed=!0):gv(e)&&(t.isCollapsed=mv(e,"isCollapsed"))}),{rollbackModification:()=>pv(e),affectedColumns:Array.from(o),colspanCompensation:a}}function Rv(e,t){if(!Number.isInteger(t))throw new Error("The passed gridColumnIndex argument has invalid type.");if(e.childs.length>0)throw new Error(Ds["a"]`The passed node is not the last node on the tree. Only for\x20
  222. the last node, the hide column modification can be applied.`);const{crossHiddenColumns:n}=e.data;if(n.includes(t))return;let r=!1;e.walkUp(e=>{const{data:{collapsible:t}}=e;if(t)return r=!0,!1}),r||e.walkUp(e=>{const{data:n}=e;n.crossHiddenColumns.push(t),n.colspan>1?n.colspan-=1:n.isHidden=!0})}function yv(e,t){if(!Number.isInteger(t))throw new Error("The passed gridColumnIndex argument has invalid type.");if(e.childs.length>0)throw new Error(Ds["a"]`The passed node is not the last node on the tree. Only for\x20
  223. the last node, the show column modification can be applied.`);const{crossHiddenColumns:n}=e.data;if(!n.includes(t))return;let r=!1;e.walkUp(e=>{const{data:{collapsible:t}}=e;if(t)return r=!0,!1}),r||e.walkUp(e=>{const{data:n}=e;n.crossHiddenColumns.splice(n.crossHiddenColumns.indexOf(t),1),!n.isHidden&&n.colspan<n.origColspan&&(n.colspan+=1),n.isHidden=!1})}const Mv=new Map([["collapse",fv],["expand",pv],["hide-column",Rv],["show-column",yv]]);function Sv(e,t,n){if(!Mv.has(e))throw new Error(`The node modifier action ("${e}") does not exist.`);return Mv.get(e)(t,n)}function bv(e){const t=[];return Object(h["arrayEach"])(e,e=>{e.walkDown(e=>{const n=e.data,{origColspan:r,columnIndex:i,headerLevel:s,crossHiddenColumns:o}=n,a=Tv(t,s);let l=!1;for(let t=i;t<i+r;t++){const e=o.includes(t);if(e||l)a.push(xO(n));else{const e=wv(n);e.isRoot=!0,a.push(e),l=!0}}})}),t}function wv(e){const{crossHiddenColumns:t,...n}=PO(e);return n}function Tv(e,t){let n;return Array.isArray(e[t])?n=e[t]:(n=[],e[t]=n),n}function Ov(e,t,n){vv(e,t),t.set(e,n)}function vv(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Ev(e,t,n){return e.set(Lv(e,t),n),n}function Cv(e,t){return e.get(Lv(e,t))}function Lv(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}var Nv=new WeakMap,_v=new WeakMap,Iv=new WeakMap;class Pv{constructor(){Ov(this,Nv,new jO),Ov(this,_v,new hv(Cv(Nv,this))),Ov(this,Iv,[[]])}setState(e){Cv(Nv,this).setData(e);let t=!1;try{Cv(_v,this).buildTree()}catch(n){Cv(_v,this).clear(),Cv(Nv,this).clear(),t=!0}return Ev(Iv,this,bv(Cv(_v,this).getRoots())),t}setColumnsLimit(e){Cv(Nv,this).setColumnsLimit(e)}mergeStateWith(e){const t=Object(h["arrayMap"])(e,e=>{let{row:t,...n}=e;return{row:t<0?this.rowCoordsToLevel(t):t,...n}});Cv(Nv,this).mergeWith(t),Cv(_v,this).buildTree(),Ev(Iv,this,bv(Cv(_v,this).getRoots()))}mapState(e){Cv(Nv,this).map(e),Cv(_v,this).buildTree(),Ev(Iv,this,bv(Cv(_v,this).getRoots()))}mapNodes(e){return Object(h["arrayReduce"])(Cv(_v,this).getRoots(),(t,n)=>(n.walkDown(n=>{const r=e(n.data);void 0!==r&&t.push(r)}),t),[])}triggerNodeModification(e,t,n){t<0&&(t=this.rowCoordsToLevel(t));const r=Cv(_v,this).getNode(t,n);let i;return r&&(i=Sv(e,r,n),Ev(Iv,this,bv(Cv(_v,this).getRoots()))),i}triggerColumnModification(e,t){return this.triggerNodeModification(e,-1,t)}rowCoordsToLevel(e){if(e>=0)return null;const t=e+Math.max(this.getLayersCount(),1);return t<0?null:t}levelToRowCoords(e){if(e<0)return null;const t=e-Math.max(this.getLayersCount(),1);return t>=0?null:t}getHeaderSettings(e,t){var n,r;return e<0&&(e=this.rowCoordsToLevel(e)),null===e||e>=this.getLayersCount()?null:null!==(n=null===(r=Cv(Iv,this)[e])||void 0===r?void 0:r[t])&&void 0!==n?n:null}getHeaderTreeNodeData(e,t){const n=this.getHeaderTreeNode(e,t);return n?{...n.data}:null}getHeaderTreeNode(e,t){if(e<0&&(e=this.rowCoordsToLevel(e)),null===e||e>=this.getLayersCount())return null;const n=Cv(_v,this).getNode(e,t);return n||null}findTopMostEntireHeaderLevel(e){var t;let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e;const r=n-e+1;let i=!1,s=null;for(let o=e;o<=n;o++){const t=Cv(_v,this).getRootByColumn(o);if(!t)break;i=!0,t.walkDown(t=>{const{columnIndex:i,headerLevel:o,origColspan:a,isHidden:l}=t.data;l||a<=r&&i>=e&&i+a-1<=n&&(null===s||o<s)&&(s=o)},GO)}return i&&null===s?-1:this.levelToRowCoords(null!==(t=s)&&void 0!==t?t:0)}findLeftMostColumnIndex(e,t){var n;const{isRoot:r}=null!==(n=this.getHeaderSettings(e,t))&&void 0!==n?n:{isRoot:!0};if(r)return t;let i=t-1;while(i>=0){var s;const{isRoot:t}=null!==(s=this.getHeaderSettings(e,i))&&void 0!==s?s:{isRoot:!0};if(t)break;i-=1}return i}findRightMostColumnIndex(e,t){var n;const{isRoot:r,origColspan:i}=null!==(n=this.getHeaderSettings(e,t))&&void 0!==n?n:{isRoot:!0,origColspan:1};if(r)return t+i-1;let s=t+1;while(s<this.getColumnsCount()){var o;const{isRoot:t}=null!==(o=this.getHeaderSettings(e,s))&&void 0!==o?o:{isRoot:!0};if(t)break;s+=1}return s-1}getLayersCount(){return Cv(Nv,this).getLayersCount()}getColumnsCount(){return Cv(Nv,this).getColumnsCount()}clear(){Ev(Iv,this,[]),Cv(Nv,this).clear(),Cv(_v,this).clear()}}function xv(e,t,n){return(t=Dv(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Dv(e){var t=Av(e,"string");return"symbol"==typeof t?t:t+""}function Av(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}class Fv{constructor(e,t){xv(this,"hot",void 0),xv(this,"nestedHeaderSettingsGetter",void 0),xv(this,"layersCount",0),xv(this,"container",void 0),xv(this,"widthsMap",void 0),this.hot=e,this.nestedHeaderSettingsGetter=t,this.widthsMap=this.hot.columnIndexMapper.createAndRegisterIndexMap("nestedHeaders.widthsMap","physicalIndexToValue")}setLayersCount(e){return this.layersCount=e,this}getWidth(e){return this.widthsMap.getValueAtIndex(this.hot.toPhysicalColumn(e))}buildWidthsMap(){this.container=this.hot.rootDocument.createElement("div"),this.container.classList.add("handsontable","htGhostTable","htAutoSize"),this._buildGhostTable(this.container),this.hot.rootDocument.body.appendChild(this.container);const e=this.container.querySelectorAll("tr:last-of-type th"),t=e.length;this.widthsMap.clear();for(let n=0;n<t;n++){const t=this.hot.columnIndexMapper.getVisualFromRenderableIndex(n),r=this.hot.toPhysicalColumn(t);this.widthsMap.setValueAtIndex(r,e[n].offsetWidth)}this.container.parentNode.removeChild(this.container),this.container=null}_buildGhostTable(e){const{rootDocument:t,columnIndexMapper:n}=this.hot,r=t.createDocumentFragment(),s=t.createElement("table"),o=!!this.hot.getSettings().dropdownMenu,a=n.getRenderableIndexesLength();for(let l=0;l<this.layersCount;l++){const e=t.createElement("tr");for(let r=0;r<a;r++){let s=n.getVisualFromRenderableIndex(r);null===s&&(s=r);const a=t.createElement("th"),c=this.nestedHeaderSettingsGetter(l,s);if(c&&(!c.isPlaceholder||c.isHidden)){let t=c.label;o&&(t+='<button class="changeType"></button>'),Object(i["fastInnerHTML"])(a,t),a.colSpan=c.colspan,e.appendChild(a)}}s.appendChild(e)}r.appendChild(s),e.appendChild(r)}clear(){this.widthsMap.clear(),this.container=null}}var Yv=Fv;function Hv(e,t){Xv(e,t),t.add(e)}function kv(e,t,n){return(t=Vv(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Vv(e){var t=Uv(e,"string");return"symbol"==typeof t?t:t+""}function Uv(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function Wv(e,t,n){Xv(e,t),t.set(e,n)}function Xv(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function jv(e,t,n){return e.set(Qv(e,t),n),n}function Zv(e,t){return e.get(Qv(e,t))}function Qv(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}const Kv="nestedHeaders",Gv=280;var Bv=new WeakMap,Jv=new WeakMap,zv=new WeakMap,$v=new WeakMap,qv=new WeakSet;class eE extends qt["a"]{constructor(){super(...arguments),Hv(this,qv),Wv(this,Bv,new Pv),Wv(this,Jv,null),Wv(this,zv,null),Wv(this,$v,!1),kv(this,"ghostTable",new Yv(this.hot,(e,t)=>this.getHeaderSettings(e,t))),kv(this,"detectedOverlappedHeaders",!1)}static get PLUGIN_KEY(){return Kv}static get PLUGIN_PRIORITY(){return Gv}isEnabled(){return!!this.hot.getSettings()[Kv]}enablePlugin(){var e=this;if(this.enabled)return;const{nestedHeaders:t}=this.hot.getSettings();Array.isArray(t)&&Array.isArray(t[0])||Object(Qr["b"])(Ds["a"]`Your Nested Headers plugin configuration is invalid. The settings has to be\x20
  224. passed as an array of arrays e.q. [['A1', { label: 'A2', colspan: 2 }]]`),this.addHook("init",()=>Qv(qv,this,RE).call(this)),this.addHook("afterLoadData",(function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return Qv(qv,e,yE).call(e,...n)})),this.addHook("beforeOnCellMouseDown",(function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return Qv(qv,e,sE).call(e,...n)})),this.addHook("afterOnCellMouseDown",(function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return Qv(qv,e,oE).call(e,...n)})),this.addHook("beforeOnCellMouseOver",(function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return Qv(qv,e,aE).call(e,...n)})),this.addHook("beforeOnCellMouseUp",(function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return Qv(qv,e,lE).call(e,...n)})),this.addHook("beforeSelectionHighlightSet",(function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return Qv(qv,e,cE).call(e,...n)})),this.addHook("modifyTransformStart",(function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return Qv(qv,e,uE).call(e,...n)})),this.addHook("afterSelection",()=>Qv(qv,this,tE).call(this)),this.addHook("afterSelectionFocusSet",()=>Qv(qv,this,tE).call(this)),this.addHook("beforeViewportScrollHorizontally",(function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return Qv(qv,e,nE).call(e,...n)})),this.addHook("afterGetColumnHeaderRenderers",e=>Qv(qv,this,dE).call(this,e)),this.addHook("modifyColWidth",(function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return Qv(qv,e,gE).call(e,...n)})),this.addHook("modifyColumnHeaderValue",(function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return Qv(qv,e,pE).call(e,...n)})),this.addHook("beforeHighlightingColumnHeader",(function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return Qv(qv,e,rE).call(e,...n)})),this.addHook("beforeCopy",(function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return Qv(qv,e,iE).call(e,...n)})),this.addHook("beforeSelectColumns",(function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return Qv(qv,e,hE).call(e,...n)})),this.addHook("afterViewportColumnCalculatorOverride",(function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return Qv(qv,e,mE).call(e,...n)})),this.addHook("modifyFocusedElement",(function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return Qv(qv,e,fE).call(e,...n)})),this.hot.columnIndexMapper.addLocalHook("cacheUpdated",()=>Qv(qv,this,tE).call(this)),this.hot.rowIndexMapper.addLocalHook("cacheUpdated",()=>Qv(qv,this,tE).call(this)),super.enablePlugin(),this.updatePlugin()}updatePlugin(){if(!this.hot.view)return;const{nestedHeaders:e}=this.hot.getSettings();Zv(Bv,this).setColumnsLimit(this.hot.countCols()),Array.isArray(e)&&(this.detectedOverlappedHeaders=Zv(Bv,this).setState(e)),this.detectedOverlappedHeaders&&Object(Qr["b"])(Ds["a"]`Your Nested Headers plugin setup contains overlapping headers. This kind of configuration\x20
  225. is currently not supported.`),this.enabled&&this.hot.columnIndexMapper.hidingMapsCollection.getMergedValues().forEach((e,t)=>{const n=!0===e?"hide-column":"show-column";Zv(Bv,this).triggerColumnModification(n,t)}),!Zv(Jv,this)&&this.enabled&&jv(Jv,this,this.hot.columnIndexMapper.createChangesObserver("hiding").subscribe(e=>{e.forEach(e=>{let{op:t,index:n,newValue:r}=e;if("replace"===t){const e=!0===r?"hide-column":"show-column";Zv(Bv,this).triggerColumnModification(e,n)}}),this.ghostTable.buildWidthsMap()})),this.ghostTable.setLayersCount(this.getLayersCount()).buildWidthsMap(),super.updatePlugin()}disablePlugin(){this.clearColspans(),Zv(Bv,this).clear(),Zv(Jv,this).unsubscribe(),jv(Jv,this,null),this.ghostTable.clear(),super.disablePlugin()}getStateManager(){return Zv(Bv,this)}getLayersCount(){return Zv(Bv,this).getLayersCount()}getHeaderSettings(e,t){return Zv(Bv,this).getHeaderSettings(e,t)}clearColspans(){if(!this.hot.view)return;const{_wt:e}=this.hot.view,t=e.getSetting("columnHeaders").length,n=e.wtTable.THEAD,r=e.wtOverlays.topOverlay.clone.wtTable.THEAD,s=e.wtOverlays.topInlineStartCornerOverlay?e.wtOverlays.topInlineStartCornerOverlay.clone.wtTable.THEAD:null;for(let o=0;o<t;o++){const e=n.childNodes[o];if(!e)break;const t=r.childNodes[o],a=s?s.childNodes[o]:null;for(let n=0,r=e.childNodes.length;n<r;n++)e.childNodes[n].removeAttribute("colspan"),Object(i["removeClass"])(e.childNodes[n],"hiddenHeader"),t&&t.childNodes[n]&&(t.childNodes[n].removeAttribute("colspan"),Object(i["removeClass"])(t.childNodes[n],"hiddenHeader")),s&&a&&a.childNodes[n]&&(a.childNodes[n].removeAttribute("colspan"),Object(i["removeClass"])(a.childNodes[n],"hiddenHeader"))}}headerRendererFactory(e){var t=this;const n=this.hot.view._wt.getSetting("fixedColumnsStart");return(r,s)=>{var o;const{columnIndexMapper:a,view:l}=this.hot;let c=a.getVisualFromRenderableIndex(r);null===c&&(c=r),s.removeAttribute("colspan"),Object(i["removeClass"])(s,"hiddenHeader");const{colspan:u,isHidden:h,isPlaceholder:d,headerClassNames:m}=null!==(o=Zv(Bv,this).getHeaderSettings(e,c))&&void 0!==o?o:{label:""};if(d||h)Object(i["addClass"])(s,"hiddenHeader");else if(u>1){var g,p;const{wtOverlays:e}=l._wt,t=null===(g=e.topInlineStartCornerOverlay)||void 0===g?void 0:g.clone.wtTable.THEAD.contains(s),i=null===(p=e.inlineStartOverlay)||void 0===p?void 0:p.clone.wtTable.THEAD.contains(s),o=t||i?Math.min(u,n-r):u;o>1&&s.setAttribute("colspan",o)}if(this.hot.view.appendColHeader(c,s,(function(){return t.getColumnHeaderValue(...arguments)}),e),!d&&!h){const e=s.querySelector("div.relative");e&&m&&m.length>0&&(Object(i["removeClass"])(e,this.hot.getColumnMeta(c).headerClassName),Object(i["addClass"])(e,m))}}}getColumnHeaderValue(e,t){var n;const{isHidden:r,isPlaceholder:i}=null!==(n=Zv(Bv,this).getHeaderSettings(t,e))&&void 0!==n?n:{};return i||r?"":this.hot.getColHeader(e,t)}destroy(){jv(Bv,this,null),null!==Zv(Jv,this)&&(Zv(Jv,this).unsubscribe(),jv(Jv,this,null)),super.destroy()}_getHeaderTreeNodeDataByCoords(e){if(!(e.row>=0||e.col<0))return Zv(Bv,this).getHeaderTreeNodeData(e.row,e.col)}}function tE(){var e;const t=null===(e=this.hot)||void 0===e?void 0:e.getSelectedRangeLast();if(!t)return;const{highlight:n}=t,r=n.isHeader()&&n.col>=0;if(r){const e=Zv(Bv,this).findLeftMostColumnIndex(n.row,n.col),t=this.hot.selection.highlight.getFocus();t.visualCellRange.highlight.col=e,t.visualCellRange.from.col=e,t.visualCellRange.to.col=e,t.commit()}}function nE(e){const t=this.hot.getSelectedRangeLast();if(!t)return e;const{highlight:n}=t,r=n.isHeader()&&n.col>=0;if(!r)return e;const i=this.hot.view.getFirstFullyVisibleColumn(),s=this.hot.view.getLastFullyVisibleColumn(),o=Zv(Bv,this).findLeftMostColumnIndex(n.row,n.col),a=Zv(Bv,this).findRightMostColumnIndex(n.row,n.col);return o<i&&a>s?e:o<i?o:a}function rE(e,t,n){const r=Zv(Bv,this).getHeaderTreeNodeData(t,e);if(!r)return e;const{columnCursor:i,selectionType:s,selectionWidth:o}=n,{isRoot:a,colspan:l}=Zv(Bv,this).getHeaderSettings(t,e);if(s===IO["g"]){if(!a)return r.columnIndex}else if(s===IO["a"]&&(l>o-i||!a))return null;return e}function iE(e,t,n){let{columnHeadersCount:r}=n;if(0!==r)for(let s=0;s<t.length;s++){const{startRow:n,startCol:r,endRow:o,endCol:a}=t[s],l=o-n+1,c=r-a+1;if(n>=0||1===c)break;for(let t=r;t<=a;t++)for(let s=n;s<=o;s++){var i;const n=l+s,o=t-r;if(0===o)continue;const a=null===(i=Zv(Bv,this).getHeaderTreeNodeData(s,t))||void 0===i?void 0:i.isRoot;!1===a&&(e[n][o]="")}}}function sE(e,t,n,r){const i=this._getHeaderTreeNodeDataByCoords(t);i&&(r.column=!0)}function oE(e,t){const n=this._getHeaderTreeNodeDataByCoords(t);if(!n)return;jv(zv,this,t.clone()),jv($v,this,!0);const{selection:r}=this.hot,i=r.isSelected()?r.getSelectedRange().current():null,o=[],{columnIndex:a,origColspan:l}=n,c=!r.inInSelection(t);e.shiftKey&&i?t.col<i.from.col?o.push(i.getTopEndCorner().col,a,t.row):t.col>i.from.col?o.push(i.getTopStartCorner().col,a+l-1,t.row):o.push(a,a+l-1,t.row):(Object(s["isLeftClick"])(e)||Object(s["isRightClick"])(e)&&c||Object(s["isTouchEvent"])(e))&&o.push(a,a+l-1,t.row),r.selectColumns(...o)}function aE(e,t,n,r){if(!this.hot.view.isMouseDown())return;const i=this._getHeaderTreeNodeDataByCoords(t);if(!i)return;const{columnIndex:s,origColspan:o}=i,a=this.hot.getSelectedRangeLast(),l=a.getTopStartCorner(),c=a.getBottomEndCorner(),{from:u}=a;r.column=!0,r.cell=!0;const h=[],d=Object(nt["clamp"])(t.row,-1/0,-1);t.col<u.col?h.push(c.col,s,d):t.col>u.col?h.push(l.col,s+o-1,d):h.push(s,s+o-1,d),this.hot.selection.selectColumns(...h)}function lE(){jv($v,this,!1)}function cE(){const{navigableHeaders:e}=this.hot.getSettings();if(!this.hot.view.isMouseDown()||!Zv($v,this)||!e)return;const t=this.hot.getSelectedRangeLast(),n=t.getTopStartCorner().col,r=t.getBottomEndCorner().col,{columnIndex:i,origColspan:s}=Zv(Bv,this).getHeaderTreeNodeData(Zv(zv,this).row,Zv(zv,this).col);if(t.setHighlight(Zv(zv,this)),s>t.getWidth()||i<n||i+s-1>r){const e=Zv(Bv,this).findTopMostEntireHeaderLevel(Object(nt["clamp"])(n,i,i+s-1),Object(nt["clamp"])(r,i,i+s-1));t.highlight.row=e,t.highlight.col=t.from.col}}function uE(e){const{highlight:t}=this.hot.getSelectedRangeLast(),n=this.hot._createCellCoords(t.row+e.row,t.col+e.col),r=n.isHeader()&&n.col>=0;if(!r)return;const i=Zv(Bv,this).findLeftMostColumnIndex(n.row,n.col),s=Zv(Bv,this).findRightMostColumnIndex(n.row,n.col);if(e.col<0){const n=t.col>=i&&t.col<=s?i-1:s,r=this.hot.columnIndexMapper.getNearestNotHiddenIndex(n,-1);e.col=null===r?-this.hot.view.countRenderableColumnsInRange(0,t.col):-Math.max(this.hot.view.countRenderableColumnsInRange(r,t.col)-1,1)}else if(e.col>0){const n=t.col>=i&&t.col<=s?s+1:i,r=this.hot.columnIndexMapper.getNearestNotHiddenIndex(n,1);e.col=null===r?this.hot.view.countRenderableColumnsInRange(t.col,this.hot.countCols()):Math.max(this.hot.view.countRenderableColumnsInRange(t.col,r)-1,1)}}function hE(e,t){const n=e.row,r=this._getHeaderTreeNodeDataByCoords({row:n,col:e.col}),i=this._getHeaderTreeNodeDataByCoords({row:n,col:t.col});t.col<e.col?(r&&(e.col=r.columnIndex+r.origColspan-1),i&&(t.col=i.columnIndex)):t.col>=e.col&&(r&&(e.col=r.columnIndex),i&&(t.col=i.columnIndex+i.origColspan-1))}function dE(e){e.length=0;for(let t=0;t<Zv(Bv,this).getLayersCount();t++)e.push(this.headerRendererFactory(t))}function mE(e){const t=Zv(Bv,this).getLayersCount();let n=e.startColumn,r=!!t;for(let i=0;i<t;i++){const t=Zv(Bv,this).findLeftMostColumnIndex(i,e.startColumn),s=this.hot.columnIndexMapper.getRenderableFromVisualIndex(t);if(t>=0&&(r=!1),Object(nt["isNumeric"])(s)&&s<e.startColumn){n=s;break}}e.startColumn=r?Zv(Bv,this).getHeaderTreeNodeData(0,n).columnIndex:n}function gE(e,t){const n=this.ghostTable.getWidth(t);return e>n?e:n}function pE(e,t,n){var r;const{label:i}=null!==(r=Zv(Bv,this).getHeaderTreeNodeData(n,t))&&void 0!==r?r:{label:""};return i}function fE(e,t){if(e<0)return this.hot.getCell(e,Zv(Bv,this).findLeftMostColumnIndex(e,t),!0)}function RE(){this.updatePlugin()}function yE(e,t){t||this.updatePlugin()}function ME(e,t,n){return(t=SE(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function SE(e){var t=bE(e,"string");return"symbol"==typeof t?t:t+""}function bE(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}class wE{constructor(e,t){ME(this,"hot",void 0),ME(this,"data",null),ME(this,"plugin",void 0),ME(this,"parentReference",new WeakMap),ME(this,"cache",{levels:[],levelCount:0,rows:[],nodeInfo:new WeakMap}),this.hot=t,this.plugin=e}setData(e){this.data=e}getData(){return this.data}getRawSourceData(){let e=null;return this.plugin.disableCoreAPIModifiers(),e=this.hot.getSourceData(),this.plugin.enableCoreAPIModifiers(),e}updateWithData(e){this.setData(e),this.rewriteCache()}rewriteCache(){this.cache={levels:[],levelCount:0,rows:[],nodeInfo:new WeakMap},Object(nt["rangeEach"])(0,this.data.length-1,e=>{this.cacheNode(this.data[e],0,null)})}cacheNode(e,t,n){this.cache.levels[t]||(this.cache.levels[t]=[],this.cache.levelCount+=1),this.cache.levels[t].push(e),this.cache.rows.push(e),this.cache.nodeInfo.set(e,{parent:n,row:this.cache.rows.length-1,level:t}),this.hasChildren(e)&&Object(h["arrayEach"])(e.__children,n=>{this.cacheNode(n,t+1,e)})}getDataObject(e){return null===e||void 0===e?null:this.cache.rows[e]}readTreeNodes(e,t,n,r){let i=!1,s=t;if(isNaN(s)&&s.end)return s;let o=e;return o||(o={__children:this.data},i=!0,s-=1),null!==n&&void 0!==n&&s===n?{result:o,end:!0}:null!==r&&void 0!==r&&o===r?{result:s,end:!0}:(s+=1,o.__children&&Object(h["arrayEach"])(o.__children,e=>{if(this.parentReference.set(e,i?null:o),s=this.readTreeNodes(e,s,n,r),isNaN(s)&&s.end)return!1}),s)}mockParent(){const e=this.mockNode();return e.__children=this.data,e}mockNode(){const e={};return Object(o["objectEach"])(this.data[0],(t,n)=>{e[n]=null}),e}getRowIndex(e){return null===e||void 0===e?null:this.cache.nodeInfo.get(e).row}getRowIndexWithinParent(e){let t=null;t=isNaN(e)?e:this.getDataObject(e);const n=this.getRowParent(e);return null===n||void 0===n?this.data.indexOf(t):n.__children.indexOf(t)}countAllRows(){const e={__children:this.data};return this.countChildren(e)}countChildren(e){let t=0,n=e;return isNaN(n)||(n=this.getDataObject(n)),n&&n.__children?(Object(h["arrayEach"])(n.__children,e=>{t+=1,e.__children&&(t+=this.countChildren(e))}),t):0}getRowParent(e){let t;return t=isNaN(e)?e:this.getDataObject(e),this.getRowObjectParent(t)}getRowObjectParent(e){return e&&"object"===typeof e?this.cache.nodeInfo.get(e).parent:null}getRowLevel(e){let t=null;return t=isNaN(e)?e:this.getDataObject(e),t?this.getRowObjectLevel(t):null}getRowObjectLevel(e){return null===e||void 0===e?null:this.cache.nodeInfo.get(e).level}hasChildren(e){let t=e;return isNaN(t)||(t=this.getDataObject(t)),!(!t.__children||!t.__children.length)}isChild(e){return null!==this.getRowParent(e)}getChild(e,t){var n;return(null===(n=e.__children)||void 0===n?void 0:n[t])||null}isRowHighestLevel(e){return!this.isChild(e)}isParent(e){var t;let n=e;return isNaN(n)||(n=this.getDataObject(n)),n&&!!n.__children&&0!==(null===(t=n.__children)||void 0===t?void 0:t.length)}addChild(e,t){let n=t;this.hot.runHooks("beforeAddChild",e,n);let r=null;e&&(r=this.getRowIndex(e)),this.hot.runHooks("beforeCreateRow",r+this.countChildren(e)+1,1);let i=e;e||(i=this.mockParent()),i.__children||(i.__children=[]),n||(n=this.mockNode()),i.__children.push(n),this.rewriteCache();const s=this.getRowIndex(n);this.hot.rowIndexMapper.insertIndexes(s,1),this.hot.runHooks("afterCreateRow",s,1),this.hot.runHooks("afterAddChild",e,n)}addChildAtIndex(e,t,n){let r,i=n;if(i||(i=this.mockNode()),this.hot.runHooks("beforeAddChild",e,i,t),e){const n=this.getRowIndex(e),s=n+t+1;this.hot.runHooks("beforeCreateRow",s,1),e.__children.splice(t,null,i),this.rewriteCache(),this.plugin.disableCoreAPIModifiers(),this.hot.setSourceDataAtCell(this.getRowIndexWithinParent(e),"__children",e.__children,"NestedRows.addChildAtIndex"),this.hot.rowIndexMapper.insertIndexes(s,1),this.plugin.enableCoreAPIModifiers(),this.hot.runHooks("afterCreateRow",s,1),r=s}else this.plugin.disableCoreAPIModifiers(),this.hot.alter("insert_row_above",t,1,"NestedRows.addChildAtIndex"),this.plugin.enableCoreAPIModifiers(),r=this.getRowIndex(this.data[t]);i=this.getDataObject(r),this.hot.runHooks("afterAddChild",e,i,t)}addSibling(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"below";const n=this.translateTrimmedRow(e),r=this.getRowParent(n),i=this.getRowIndexWithinParent(n);switch(t){case"below":this.addChildAtIndex(r,i+1,null);break;case"above":this.addChildAtIndex(r,i,null);break;default:break}}detachFromParent(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=null;const r=[];Array.isArray(e)?(Object(nt["rangeEach"])(e[0],e[2],e=>{const t=this.translateTrimmedRow(e);r.push(this.getDataObject(t))}),Object(nt["rangeEach"])(0,r.length-2,e=>{this.detachFromParent(r[e],!1)}),n=r[r.length-1]):n=e;const i=this.getRowIndex(n),s=this.countChildren(n),o=this.getRowIndexWithinParent(n),a=this.getRowParent(n),l=this.getRowParent(a),c=this.getRowIndex(l);let u=null;if(this.hot.runHooks("beforeDetachChild",a,n),null!==o&&void 0!==o){const e=Array.from(new Array(i+s+1).keys()).splice(-1*(s+1));if(this.hot.runHooks("beforeRemoveRow",i,s+1,e,this.plugin.pluginName),a.__children.splice(o,1),this.rewriteCache(),this.hot.runHooks("afterRemoveRow",i,s+1,e,this.plugin.pluginName),l){u=c+this.countChildren(l);const e=this.getChild(l,this.countChildren(l)-1),t=this.getRowIndex(e);this.hot.runHooks("beforeCreateRow",t+1,s+1,this.plugin.pluginName),l.__children.push(n)}else u=this.hot.countRows()+1,this.hot.runHooks("beforeCreateRow",u-2,s+1,this.plugin.pluginName),this.data.push(n)}this.rewriteCache(),this.hot.runHooks("afterCreateRow",u-2,s+1,this.plugin.pluginName),this.hot.runHooks("afterDetachChild",a,n,this.getRowIndex(n)),t&&this.hot.render()}filterData(e,t,n){const r=[];Object(h["arrayEach"])(n,e=>{r.push(this.getDataObject(e))}),Object(h["arrayEach"])(r,e=>{const t=this.getRowIndexWithinParent(e),n=this.getRowParent(e);null===n?this.data.splice(t,1):n.__children.splice(t,1)}),this.rewriteCache()}spliceData(e,t,n){const r=this.getDataObject(e-1);let i=null,s=e;r&&r.__children&&0===r.__children.length?(i=r,s=0):e<this.countAllRows()&&(i=this.getRowParent(e),s=this.getRowIndexWithinParent(e)),i?n?i.__children.splice(s,t,...n):i.__children.splice(s,t):n?this.data.splice(s,t,...n):this.data.splice(s,t),this.rewriteCache()}syncRowWithRawSource(e){let t=e,n=null;do{n=this.getRowParent(n),null!==n&&(t=n)}while(null!==n);this.plugin.disableCoreAPIModifiers(),this.hot.setSourceDataAtCell(this.getRowIndex(t),"__children",t.__children,"NestedRows.syncRowWithRawSource"),this.plugin.enableCoreAPIModifiers()}moveRow(e,t,n,r){const i=t===this.hot.countRows(),s=this.getRowParent(e),o=this.getRowIndexWithinParent(e),a=s.__children.slice(o,o+1),l=e>t;let c=i?this.getRowParent(t-1):this.getRowParent(t);null!==c&&void 0!==c||(c=this.getRowParent(t-1)),null!==c&&void 0!==c||(c=this.getDataObject(t-1)),c?c.__children||(c.__children=[]):(c=this.getDataObject(t),c.__children=[]);const u=i||n||r?c.__children.length:this.getRowIndexWithinParent(t),h=s===c;c.__children.splice(u,0,a[0]),s.__children.splice(o+(l&&h?1:0),1),this.syncRowWithRawSource(s),h||this.syncRowWithRawSource(c)}translateTrimmedRow(e){return this.plugin.collapsingUI?this.plugin.collapsingUI.translateTrimmedRow(e):e}untranslateTrimmedRow(e){return this.plugin.collapsingUI?this.plugin.collapsingUI.untranslateTrimmedRow(e):e}}var TE=wE;function OE(e,t,n){return(t=vE(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function vE(e){var t=EE(e,"string");return"symbol"==typeof t?t:t+""}function EE(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}class CE{constructor(e,t){OE(this,"hot",void 0),OE(this,"plugin",void 0),this.hot=t,this.plugin=e}}var LE=CE;class NE extends LE{static get CSS_CLASSES(){return{indicatorContainer:"ht_nestingLevels",parent:"ht_nestingParent",indicator:"ht_nestingLevel",emptyIndicator:"ht_nestingLevel_empty",button:"ht_nestingButton",expandButton:"ht_nestingExpand",collapseButton:"ht_nestingCollapse"}}constructor(e,t){super(e,t),this.dataManager=this.plugin.dataManager,this.collapsingUI=this.plugin.collapsingUI,this.rowHeaderWidthCache=null}appendLevelIndicators(e,t){const n=this.hot.toPhysicalRow(e),r=this.dataManager.getRowLevel(n),s=this.dataManager.getDataObject(n),o=t.getElementsByTagName("DIV")[0],a=o.querySelector("span.rowHeader"),l=o.querySelectorAll('[class^="ht_nesting"]'),c=this.hot.getSettings().ariaTags;if(Object(h["arrayEach"])(l,e=>{e&&o.removeChild(e)}),Object(i["addClass"])(t,NE.CSS_CLASSES.indicatorContainer),r){const{rootDocument:e}=this.hot,t=a.cloneNode(!0);o.innerHTML="",Object(nt["rangeEach"])(0,r-1,()=>{const t=e.createElement("SPAN");Object(i["addClass"])(t,NE.CSS_CLASSES.emptyIndicator),o.appendChild(t)}),o.appendChild(t)}if(this.dataManager.hasChildren(s)){const e=this.hot.rootDocument.createElement("DIV");c&&Object(i["setAttribute"])(e,[Object(R["n"])()]),Object(i["addClass"])(t,NE.CSS_CLASSES.parent),this.collapsingUI.areChildrenCollapsed(n)?(Object(i["addClass"])(e,`${NE.CSS_CLASSES.button} ${NE.CSS_CLASSES.expandButton}`),c&&Object(i["setAttribute"])(t,[Object(R["k"])(!1)])):(Object(i["addClass"])(e,`${NE.CSS_CLASSES.button} ${NE.CSS_CLASSES.collapseButton}`),c&&Object(i["setAttribute"])(t,[Object(R["k"])(!0)])),o.appendChild(e)}}updateRowHeaderWidth(e){let t=e;t||(t=this.dataManager.cache.levelCount),this.rowHeaderWidthCache=Math.max(50,11+10*t+25),this.hot.render()}}var _E=NE;class IE extends LE{constructor(e,t){var n;super(e,t),n=this,this.dataManager=this.plugin.dataManager,this.collapsedRows=[],this.collapsedRowsStash={stash:function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];n.lastCollapsedRows=n.collapsedRows.slice(0),n.expandMultipleChildren(n.lastCollapsedRows,e)},shiftStash:function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;null!==t&&void 0!==t||(t=1/0),Object(h["arrayEach"])(n.lastCollapsedRows,(i,s)=>{i>=e&&i<t&&(n.lastCollapsedRows[s]=i+r)})},applyStash:function(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];n.collapseMultipleChildren(n.lastCollapsedRows,e),n.lastCollapsedRows=void 0},trimStash:(e,t)=>{Object(nt["rangeEach"])(e,e+t-1,e=>{const t=this.lastCollapsedRows.indexOf(e);t>-1&&this.lastCollapsedRows.splice(t,1)})}}}collapseChildren(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];const r=[];let i=null,s=null,o=null;return isNaN(e)?(i=e,s=this.dataManager.getRowIndex(i)):(i=this.dataManager.getDataObject(e),s=e),this.dataManager.hasChildren(i)&&Object(h["arrayEach"])(i.__children,e=>{r.push(this.dataManager.getRowIndex(e))}),o=this.collapseRows(r,!0,!1),n&&this.trimRows(o),t&&this.renderAndAdjust(),-1===this.collapsedRows.indexOf(s)&&this.collapsedRows.push(s),o}collapseMultipleChildren(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];const r=[];Object(h["arrayEach"])(e,e=>{r.push(...this.collapseChildren(e,!1,!1))}),n&&this.trimRows(r),t&&this.renderAndAdjust()}collapseRow(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];this.collapseRows([e],t)}collapseRows(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const r=[];return Object(h["arrayEach"])(e,e=>{r.push(e),t&&this.collapseChildRows(e,r)}),n&&this.trimRows(r),r}collapseChildRows(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if(this.dataManager.hasChildren(e)){const n=this.dataManager.getDataObject(e);Object(h["arrayEach"])(n.__children,e=>{const n=this.dataManager.getRowIndex(e);t.push(n),this.collapseChildRows(n,t)})}n&&this.trimRows(t)}expandRow(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];this.expandRows([e],t)}expandRows(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const r=[];return Object(h["arrayEach"])(e,e=>{r.push(e),t&&this.expandChildRows(e,r)}),n&&this.untrimRows(r),r}expandChildRows(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if(this.dataManager.hasChildren(e)){const n=this.dataManager.getDataObject(e);Object(h["arrayEach"])(n.__children,e=>{if(!this.isAnyParentCollapsed(e)){const n=this.dataManager.getRowIndex(e);t.push(n),this.expandChildRows(n,t)}})}n&&this.untrimRows(t)}expandChildren(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];const r=[];let i=null,s=null,o=null;return isNaN(e)?(i=e,s=this.dataManager.getRowIndex(e)):(i=this.dataManager.getDataObject(e),s=e),this.collapsedRows.splice(this.collapsedRows.indexOf(s),1),this.dataManager.hasChildren(i)&&Object(h["arrayEach"])(i.__children,e=>{const t=this.dataManager.getRowIndex(e);r.push(t)}),o=this.expandRows(r,!0,!1),n&&this.untrimRows(o),t&&this.renderAndAdjust(),o}expandMultipleChildren(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];const r=[];Object(h["arrayEach"])(e,e=>{r.push(...this.expandChildren(e,!1,!1))}),n&&this.untrimRows(r),t&&this.renderAndAdjust()}collapseAll(){const e=this.dataManager.getData(),t=[];Object(h["arrayEach"])(e,e=>{this.dataManager.hasChildren(e)&&t.push(e)}),this.collapseMultipleChildren(t),this.renderAndAdjust()}expandAll(){const e=this.dataManager.getData(),t=[];Object(h["arrayEach"])(e,e=>{this.dataManager.hasChildren(e)&&t.push(e)}),this.expandMultipleChildren(t),this.renderAndAdjust()}trimRows(e){this.hot.batchExecution(()=>{Object(h["arrayEach"])(e,e=>{this.plugin.collapsedRowsMap.setValueAtIndex(e,!0)})},!0)}untrimRows(e){this.hot.batchExecution(()=>{Object(h["arrayEach"])(e,e=>{this.plugin.collapsedRowsMap.setValueAtIndex(e,!1)})},!0)}areChildrenCollapsed(e){let t=isNaN(e)?e:this.dataManager.getDataObject(e),n=!0;return null===t&&(t={__children:this.dataManager.data}),this.dataManager.hasChildren(t)&&Object(h["arrayEach"])(t.__children,e=>{const t=this.dataManager.getRowIndex(e);if(!this.plugin.collapsedRowsMap.getValueAtIndex(t))return n=!1,!1}),n}isAnyParentCollapsed(e){let t=e;while(null!==t){t=this.dataManager.getRowParent(t);const e=this.dataManager.getRowIndex(t);if(this.collapsedRows.indexOf(e)>-1)return!0}return!1}toggleState(e,t){if(t.col>=0)return;const n=this.translateTrimmedRow(t.row);Object(i["hasClass"])(e.target,_E.CSS_CLASSES.button)&&(this.areChildrenCollapsed(n)?this.expandChildren(n):this.collapseChildren(n),Object(s["stopImmediatePropagation"])(e))}translateTrimmedRow(e){return this.hot.toPhysicalRow(e)}untranslateTrimmedRow(e){return this.hot.toVisualRow(e)}renderAndAdjust(){this.hot.render(),this.hot.view.adjustElementsSize()}}var PE=IE;function xE(e,t,n){DE(e,t),t.set(e,n)}function DE(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function AE(e,t,n){return(t=FE(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function FE(e){var t=YE(e,"string");return"symbol"==typeof t?t:t+""}function YE(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function HE(e,t){return e.get(kE(e,t))}function kE(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}var VE=new WeakMap;class UE extends LE{constructor(){super(...arguments),AE(this,"dataManager",this.plugin.dataManager),xE(this,VE,{row_above:(e,t)=>{const n=t[t.length-1];this.dataManager.addSibling(n.start.row,"above")},row_below:(e,t)=>{const n=t[t.length-1];this.dataManager.addSibling(n.start.row,"below")}})}appendOptions(e){const t=[{key:"add_child",name(){return this.getTranslatedPhrase(Ye["CONTEXTMENU_ITEMS_NESTED_ROWS_INSERT_CHILD"])},callback:()=>{const e=this.dataManager.translateTrimmedRow(this.hot.getSelectedLast()[0]),t=this.dataManager.getDataObject(e);this.dataManager.addChild(t)},disabled:()=>{const e=this.hot.getSelectedLast();return!e||e[0]<0||this.hot.selection.isSelectedByColumnHeader()||this.hot.countRows()>=this.hot.getSettings().maxRows}},{key:"detach_from_parent",name(){return this.getTranslatedPhrase(Ye["CONTEXTMENU_ITEMS_NESTED_ROWS_DETACH_CHILD"])},callback:()=>{this.dataManager.detachFromParent(this.hot.getSelectedLast())},disabled:()=>{const e=this.hot.getSelectedLast(),t=this.dataManager.translateTrimmedRow(e[0]),n=this.dataManager.getRowParent(t);return!n||!e||e[0]<0||this.hot.selection.isSelectedByColumnHeader()||this.hot.countRows()>=this.hot.getSettings().maxRows}},{name:"---------"}];return Object(nt["rangeEach"])(0,e.items.length-1,n=>{if(0===n)return Object(h["arrayEach"])(t,(t,r)=>{e.items.splice(n+r,0,t)}),!1}),this.modifyRowInsertingOptions(e)}modifyRowInsertingOptions(e){return Object(nt["rangeEach"])(0,e.items.length-1,t=>{const n=HE(VE,this)[e.items[t].key];null!==n&&void 0!==n&&(e.items[t].callback=n)}),e}}var WE=UE;function XE(e,t,n){return(t=jE(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function jE(e){var t=ZE(e,"string");return"symbol"==typeof t?t:t+""}function ZE(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}class QE{constructor(e){XE(this,"plugin",void 0),XE(this,"hot",void 0),XE(this,"dataManager",void 0),XE(this,"collapsingUI",void 0),this.plugin=e,this.hot=e.hot,this.dataManager=e.dataManager,this.collapsingUI=e.collapsingUI}onBeforeRowMove(e,t,n,r){const i=this.displayAPICompatibilityWarning({rows:e,finalIndex:t,dropIndex:n,movePossible:r});if(i)return!1;this.movedToCollapsed=!1;const s=n===this.hot.countRows(),o=s?this.hot.countSourceRows():this.dataManager.translateTrimmedRow(n);let a=!0;const l=e.map(e=>{if(!a)return!1;const t=this.dataManager.translateTrimmedRow(e);return a=this.shouldAllowMoving(t,o),t}),c=-1===l.indexOf(o);if(!a||!c)return!1;const u=this.getBaseParent(l),h=this.getTargetParent(s,o),d=u===h;return this.movedToCollapsed=this.collapsingUI.areChildrenCollapsed(h),this.collapsingUI.collapsedRowsStash.stash(),this.shiftCollapsibleParentsLocations(l,o,d),this.moveRows(l,o,h),this.dataManager.rewriteCache(),this.moveCellsMeta(l,o),this.collapsingUI.collapsedRowsStash.applyStash(!1),this.hot.runHooks("afterRowMove",e,t,n,r,r&&this.isRowOrderChanged(e,t)),this.hot.render(),this.selectCells(e,n),!1}displayAPICompatibilityWarning(e){const{rows:t,finalIndex:n,dropIndex:r,movePossible:i}=e;let s=!1;return Object(d["isUndefined"])(r)&&(Object(Qr["b"])(Ds["a"]`Since version 8.0.0 of the Handsontable the 'moveRows' method isn't used for moving rows\x20
  226. when the NestedRows plugin is enabled. Please use the 'dragRows' method instead.`),this.hot.runHooks("afterRowMove",t,n,r,i,!1),s=!0),s}shouldAllowMoving(e,t){return!(this.dataManager.isParent(e)||this.dataManager.isRowHighestLevel(e)||e===t||0===t)}getBaseParent(e){return this.dataManager.getRowParent(e[0])}getTargetParent(e,t){let n=this.dataManager.getRowParent(e?t-1:t);return null!==n&&void 0!==n||(n=this.dataManager.getRowParent(t-1)),n}shiftCollapsibleParentsLocations(e,t,n){n||(Math.max(...e)<=t?this.collapsingUI.collapsedRowsStash.shiftStash(e[0],t,-1*e.length):this.collapsingUI.collapsedRowsStash.shiftStash(t,e[0],e.length))}moveRows(e,t,n){const r=t===this.dataManager.getRowIndex(n)+this.dataManager.countChildren(n)+1;this.hot.batchRender(()=>{e.forEach(e=>{this.dataManager.moveRow(e,t,this.movedToCollapsed,r)})})}moveCellsMeta(e,t){const n=[],r=Math.max(...e)<t;e.forEach(e=>{n.push(this.hot.getCellMetaAtRow(e))}),this.hot.spliceCellsMeta(e[0],e.length),this.hot.spliceCellsMeta(t-(r?n.length:0),0,...n)}selectCells(e,t){const n=e.length;let r=0,i=0,s=null,o=null;if(this.movedToCollapsed){let s=null;s=e[n-1]<t?this.dataManager.translateTrimmedRow(t-n):this.dataManager.translateTrimmedRow(t);const o=this.dataManager.getRowParent(null===s?this.hot.countSourceRows()-1:s-1),a=this.dataManager.getRowIndex(o);r=this.dataManager.untranslateTrimmedRow(a),i=r}else e[n-1]<t?(i=t-1,r=i-n+1):(r=t,i=r+n-1);s=this.hot.selection,o=this.hot.countCols()-1,s.setRangeStart(this.hot._createCellCoords(r,0)),s.setRangeEnd(this.hot._createCellCoords(i,o),!0)}isRowOrderChanged(e,t){return e.some((e,n)=>e-n!==t)}}function KE(e,t){BE(e,t),t.add(e)}function GE(e,t,n){BE(e,t),t.set(e,n)}function BE(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function JE(e,t,n){return(t=zE(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function zE(e){var t=$E(e,"string");return"symbol"==typeof t?t:t+""}function $E(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function qE(e,t){return e.get(tC(e,t))}function eC(e,t,n){return e.set(tC(e,t),n),n}function tC(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}const nC="nestedRows",rC=300,iC=nC,sC="The Nested Rows plugin requires an Array of Objects as a dataset to be provided. The plugin has been disabled.";var oC=new WeakMap,aC=new WeakMap,lC=new WeakSet;class cC extends qt["a"]{constructor(){super(...arguments),KE(this,lC),JE(this,"dataManager",null),JE(this,"headersUI",null),JE(this,"collapsedRowsMap",null),GE(this,oC,!1),GE(this,aC,!1)}static get PLUGIN_KEY(){return nC}static get PLUGIN_PRIORITY(){return rC}isEnabled(){return!!this.hot.getSettings()[nC]}enablePlugin(){var e=this;this.enabled||(this.collapsedRowsMap=this.hot.rowIndexMapper.registerMap("nestedRows",new nf["a"]),this.dataManager=new TE(this,this.hot),this.collapsingUI=new PE(this,this.hot),this.headersUI=new _E(this,this.hot),this.contextMenuUI=new WE(this,this.hot),this.rowMoveController=new QE(this),this.addHook("afterInit",(function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return tC(lC,e,TC).call(e,...n)})),this.addHook("beforeViewRender",(function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return tC(lC,e,OC).call(e,...n)})),this.addHook("modifyRowData",(function(){return e.onModifyRowData(...arguments)})),this.addHook("modifySourceLength",(function(){return e.onModifySourceLength(...arguments)})),this.addHook("beforeDataSplice",(function(){return e.onBeforeDataSplice(...arguments)})),this.addHook("filterData",(function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return tC(lC,e,dC).call(e,...n)})),this.addHook("afterContextMenuDefaultOptions",(function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return tC(lC,e,mC).call(e,...n)})),this.addHook("afterGetRowHeader",(function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return tC(lC,e,gC).call(e,...n)})),this.addHook("beforeOnCellMouseDown",(function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return tC(lC,e,hC).call(e,...n)})),this.addHook("beforeRemoveRow",(function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return tC(lC,e,RC).call(e,...n)})),this.addHook("afterRemoveRow",(function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return tC(lC,e,fC).call(e,...n)})),this.addHook("beforeAddChild",(function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return tC(lC,e,yC).call(e,...n)})),this.addHook("afterAddChild",(function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return tC(lC,e,MC).call(e,...n)})),this.addHook("beforeDetachChild",(function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return tC(lC,e,SC).call(e,...n)})),this.addHook("afterDetachChild",(function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return tC(lC,e,bC).call(e,...n)})),this.addHook("modifyRowHeaderWidth",(function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return tC(lC,e,pC).call(e,...n)})),this.addHook("afterCreateRow",(function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return tC(lC,e,wC).call(e,...n)})),this.addHook("beforeRowMove",(function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return tC(lC,e,uC).call(e,...n)})),this.addHook("beforeLoadData",e=>tC(lC,this,vC).call(this,e)),this.addHook("beforeUpdateData",e=>tC(lC,this,vC).call(this,e)),this.registerShortcuts(),super.enablePlugin())}disablePlugin(){this.hot.rowIndexMapper.unregisterMap("nestedRows"),this.unregisterShortcuts(),super.disablePlugin()}updatePlugin(){this.disablePlugin();const e=this.dataManager.getData();this.enablePlugin(),this.dataManager.updateWithData(e),super.updatePlugin()}registerShortcuts(){this.hot.getShortcutManager().getContext("grid").addShortcut({keys:[["Enter"]],callback:()=>{const{highlight:e}=this.hot.getSelectedRangeLast(),t=this.collapsingUI.translateTrimmedRow(e.row);return this.collapsingUI.areChildrenCollapsed(t)?this.collapsingUI.expandChildren(t):this.collapsingUI.collapseChildren(t),!1},runOnlyIf:()=>{var e,t;const n=null===(e=this.hot.getSelectedRangeLast())||void 0===e?void 0:e.highlight;return n&&(null===(t=this.hot.getSelectedRangeLast())||void 0===t?void 0:t.isSingle())&&this.hot.selection.isCellVisible(n)&&-1===n.col&&n.row>=0},group:iC,relativeToGroup:a["a"],position:"before"})}unregisterShortcuts(){this.hot.getShortcutManager().getContext("grid").removeShortcutsByGroup(iC)}disableCoreAPIModifiers(){eC(aC,this,!0)}enableCoreAPIModifiers(){eC(aC,this,!1)}onModifyRowData(e){if(!qE(aC,this))return this.dataManager.getDataObject(e)}onModifySourceLength(){if(!qE(aC,this))return this.dataManager.countAllRows()}onBeforeDataSplice(e,t,n){return!(!qE(aC,this)&&!this.dataManager.isRowHighestLevel(e))||(this.dataManager.spliceData(e,t,n),!1)}destroy(){super.destroy()}}function uC(e,t,n,r){return this.rowMoveController.onBeforeRowMove(e,t,n,r)}function hC(e,t,n){this.collapsingUI.toggleState(e,t,n)}function dC(e,t,n){return this.collapsingUI.collapsedRowsStash.stash(),this.collapsingUI.collapsedRowsStash.trimStash(n[0],t),this.collapsingUI.collapsedRowsStash.shiftStash(n[0],null,-1*t),this.dataManager.filterData(e,t,n),eC(oC,this,!0),this.dataManager.getData().slice()}function mC(e){return this.contextMenuUI.appendOptions(e)}function gC(e,t){this.headersUI.appendLevelIndicators(e,t)}function pC(e){return Math.max(this.headersUI.rowHeaderWidthCache,e)}function fC(e,t,n,r){r!==this.pluginName&&this.hot._registerTimeout(()=>{eC(oC,this,!1),this.headersUI.updateRowHeaderWidth(),this.collapsingUI.collapsedRowsStash.applyStash()})}function RC(e,t,n){const r=Array.from(n.reduce((e,t)=>{if(this.dataManager.isParent(t)){const n=this.dataManager.getDataObject(t).__children;return e.add(t),Array.isArray(n)&&n.forEach(t=>e.add(this.dataManager.getRowIndex(t))),e}return e.add(t)},new Set));n.length=0,n.push(...r)}function yC(){this.collapsingUI.collapsedRowsStash.stash()}function MC(e,t){this.collapsingUI.collapsedRowsStash.shiftStash(this.dataManager.getRowIndex(t)),this.collapsingUI.collapsedRowsStash.applyStash(),this.headersUI.updateRowHeaderWidth()}function SC(){this.collapsingUI.collapsedRowsStash.stash()}function bC(e,t,n){this.collapsingUI.collapsedRowsStash.shiftStash(n,null,-1),this.collapsingUI.collapsedRowsStash.applyStash(),this.headersUI.updateRowHeaderWidth()}function wC(){this.dataManager.rewriteCache()}function TC(){this.headersUI.updateRowHeaderWidth()}function OC(e,t){qE(oC,this)&&(t.skipRender=!0)}function vC(e){if(!Object(Pg["isArrayOfObjects"])(e))return Object(Qr["a"])(sC),this.hot.getSettings()[nC]=!1,void this.disablePlugin();this.dataManager.setData(e),this.dataManager.rewriteCache()}function EC(e,t,n){return(t=CC(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function CC(e){var t=LC(e,"string");return"symbol"==typeof t?t:t+""}function LC(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}class NC{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:window;EC(this,"rootWindow",void 0),EC(this,"prefix",void 0),EC(this,"savedKeys",[]),this.rootWindow=t,this.prefix=e,this.loadSavedKeys()}saveValue(e,t){this.rootWindow.localStorage.setItem(`${this.prefix}_${e}`,JSON.stringify(t)),-1===this.savedKeys.indexOf(e)&&(this.savedKeys.push(e),this.saveSavedKeys())}loadValue(e,t){const n="undefined"===typeof e?t:e,r=this.rootWindow.localStorage.getItem(`${this.prefix}_${n}`);return null===r?void 0:JSON.parse(r)}reset(e){this.rootWindow.localStorage.removeItem(`${this.prefix}_${e}`)}resetAll(){Object(h["arrayEach"])(this.savedKeys,(e,t)=>{this.rootWindow.localStorage.removeItem(`${this.prefix}_${this.savedKeys[t]}`)}),this.clearSavedKeys()}loadSavedKeys(){const e=this.rootWindow.localStorage.getItem(this.prefix+"__persistentStateKeys"),t="string"===typeof e?JSON.parse(e):void 0;this.savedKeys=t||[]}saveSavedKeys(){this.rootWindow.localStorage.setItem(this.prefix+"__persistentStateKeys",JSON.stringify(this.savedKeys))}clearSavedKeys(){this.savedKeys.length=0,this.saveSavedKeys()}}var _C=NC;function IC(e,t,n){return(t=PC(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function PC(e){var t=xC(e,"string");return"symbol"==typeof t?t:t+""}function xC(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}ge["a"].getSingleton().register("persistentStateSave"),ge["a"].getSingleton().register("persistentStateLoad"),ge["a"].getSingleton().register("persistentStateReset");const DC="persistentState",AC=0;class FC extends qt["a"]{constructor(){super(...arguments),IC(this,"storage",void 0)}static get PLUGIN_KEY(){return DC}static get PLUGIN_PRIORITY(){return AC}isEnabled(){return!!this.hot.getSettings()[DC]}enablePlugin(){this.enabled||(this.storage||(this.storage=new _C(this.hot.rootElement.id,this.hot.rootWindow)),this.addHook("persistentStateSave",(e,t)=>this.saveValue(e,t)),this.addHook("persistentStateLoad",(e,t)=>this.loadValue(e,t)),this.addHook("persistentStateReset",()=>this.resetValue()),super.enablePlugin())}disablePlugin(){this.storage=void 0,super.disablePlugin()}updatePlugin(){this.disablePlugin(),this.enablePlugin(),super.updatePlugin()}loadValue(e,t){t.value=this.storage.loadValue(e)}saveValue(e,t){this.storage.saveValue(e,t)}resetValue(e){"undefined"===typeof e?this.storage.resetAll():this.storage.reset(e)}destroy(){super.destroy()}}function YC(e,t){HC(e,t),t.add(e)}function HC(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function kC(e,t,n){return(t=VC(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function VC(e){var t=UC(e,"string");return"symbol"==typeof t?t:t+""}function UC(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function WC(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}const XC="search",jC=190,ZC="htSearchResult",QC=function(e,t,n,r,i){e.getCellMeta(t,n).isSearchResult=i},KC=function(e,t,n){return!(Object(d["isUndefined"])(e)||null===e||!e.toLocaleLowerCase||0===e.length)&&(!Object(d["isUndefined"])(t)&&null!==t&&-1!==t.toString().toLocaleLowerCase(n.locale).indexOf(e.toLocaleLowerCase(n.locale)))};var GC=new WeakSet;class BC extends qt["a"]{constructor(){super(...arguments),YC(this,GC),kC(this,"callback",QC),kC(this,"queryMethod",KC),kC(this,"searchResultClass",ZC)}static get PLUGIN_KEY(){return XC}static get PLUGIN_PRIORITY(){return jC}isEnabled(){return this.hot.getSettings()[XC]}enablePlugin(){var e=this;if(this.enabled)return;const t=this.hot.getSettings()[XC];this.updatePluginSettings(t),this.addHook("beforeRenderer",(function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return WC(GC,e,JC).call(e,...n)})),super.enablePlugin()}disablePlugin(){var e=this;const t=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return WC(GC,e,JC).call(e,...n)};this.hot.addHook("beforeRenderer",t),this.hot.addHookOnce("afterViewRender",()=>{this.hot.removeHook("beforeRenderer",t)}),super.disablePlugin()}updatePlugin(){this.disablePlugin(),this.enablePlugin(),super.updatePlugin()}query(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.getCallback(),n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.getQueryMethod();const r=this.hot.countRows(),i=this.hot.countCols(),s=[],o=this.hot;return Object(nt["rangeEach"])(0,r-1,r=>{Object(nt["rangeEach"])(0,i-1,i=>{const a=this.hot.getDataAtCell(r,i),l=this.hot.getCellMeta(r,i),c=l.search.callback||t,u=l.search.queryMethod||n,h=u(e,a,l);if(h){const e={row:r,col:i,data:a};s.push(e)}c&&c(o,r,i,a,h)})}),s}getCallback(){return this.callback}setCallback(e){this.callback=e}getQueryMethod(){return this.queryMethod}setQueryMethod(e){this.queryMethod=e}getSearchResultClass(){return this.searchResultClass}setSearchResultClass(e){this.searchResultClass=e}updatePluginSettings(e){Object(o["isObject"])(e)&&(e.searchResultClass&&this.setSearchResultClass(e.searchResultClass),e.queryMethod&&this.setQueryMethod(e.queryMethod),e.callback&&this.setCallback(e.callback))}destroy(){super.destroy()}}function JC(e,t,n,r,i,s){const o=s.className||[];let a=[];"string"===typeof o?a=o.split(" "):a.push(...o),this.isEnabled()&&s.isSearchResult?a.includes(this.searchResultClass)||a.push(""+this.searchResultClass):a.includes(this.searchResultClass)&&a.splice(a.indexOf(this.searchResultClass),1),s.className=a.join(" ")}function zC(e,t){$C(e,t),t.add(e)}function $C(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function qC(e,t,n){return(t=eL(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function eL(e){var t=tL(e,"string");return"symbol"==typeof t?t:t+""}function tL(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function nL(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}const rL="touchScroll",iL=200;var sL=new WeakSet;class oL extends qt["a"]{constructor(){super(...arguments),zC(this,sL),qC(this,"scrollbars",[]),qC(this,"clones",[]),qC(this,"lockedCollection",!1),qC(this,"freezeOverlays",!1)}static get PLUGIN_KEY(){return rL}static get PLUGIN_PRIORITY(){return iL}static get SETTING_KEYS(){return!0}isEnabled(){return Object(en["isTouchSupported"])()}enablePlugin(){this.enabled||(this.addHook("afterViewRender",()=>nL(sL,this,aL).call(this)),this.registerEvents(),super.enablePlugin())}updatePlugin(){this.lockedCollection=!1,super.updatePlugin()}disablePlugin(){super.disablePlugin()}registerEvents(){this.addHook("beforeTouchScroll",()=>nL(sL,this,lL).call(this)),this.addHook("afterMomentumScroll",()=>nL(sL,this,cL).call(this))}}function aL(){if(this.lockedCollection)return;const{topOverlay:e,bottomOverlay:t,inlineStartOverlay:n,topInlineStartCornerOverlay:r,bottomInlineStartCornerOverlay:i}=this.hot.view._wt.wtOverlays;this.lockedCollection=!0,this.scrollbars.length=0,this.scrollbars.push(e),t.clone&&this.scrollbars.push(t),this.scrollbars.push(n),r&&this.scrollbars.push(r),i&&i.clone&&this.scrollbars.push(i),this.clones=[],e.needFullRender&&this.clones.push(e.clone.wtTable.holder.parentNode),t.needFullRender&&this.clones.push(t.clone.wtTable.holder.parentNode),n.needFullRender&&this.clones.push(n.clone.wtTable.holder.parentNode),r&&this.clones.push(r.clone.wtTable.holder.parentNode),i&&i.clone&&this.clones.push(i.clone.wtTable.holder.parentNode)}function lL(){this.freezeOverlays=!0,Object(h["arrayEach"])(this.clones,e=>{Object(i["addClass"])(e,"hide-tween")})}function cL(){this.freezeOverlays=!1,Object(h["arrayEach"])(this.clones,e=>{Object(i["removeClass"])(e,"hide-tween"),Object(i["addClass"])(e,"show-tween")}),this.hot._registerTimeout(()=>{Object(h["arrayEach"])(this.clones,e=>{Object(i["removeClass"])(e,"show-tween")})},400),Object(h["arrayEach"])(this.scrollbars,e=>{e.refresh(),e.resetFixedPosition()}),this.hot.view._wt.wtOverlays.syncScrollWithMaster()}function uL(e,t){hL(e,t),t.add(e)}function hL(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function dL(e,t,n){return(t=mL(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function mL(e){var t=gL(e,"string");return"symbol"==typeof t?t:t+""}function gL(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function pL(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}const fL="trimRows",RL=330;var yL=new WeakSet;class ML extends qt["a"]{constructor(){super(...arguments),uL(this,yL),dL(this,"trimmedRowsMap",null)}static get PLUGIN_KEY(){return fL}static get PLUGIN_PRIORITY(){return RL}isEnabled(){return!!this.hot.getSettings()[fL]}enablePlugin(){this.enabled||(this.trimmedRowsMap=this.hot.rowIndexMapper.registerMap("trimRows",new nf["a"]),this.trimmedRowsMap.addLocalHook("init",()=>pL(yL,this,SL).call(this)),super.enablePlugin())}updatePlugin(){const e=this.hot.getSettings()[fL];Array.isArray(e)&&this.hot.batchExecution(()=>{this.trimmedRowsMap.clear(),Object(h["arrayEach"])(e,e=>{this.trimmedRowsMap.setValueAtIndex(e,!0)})},!0),super.updatePlugin()}disablePlugin(){this.hot.rowIndexMapper.unregisterMap("trimRows"),super.disablePlugin()}getTrimmedRows(){return this.trimmedRowsMap.getTrimmedIndexes()}trimRows(e){const t=this.getTrimmedRows(),n=this.isValidConfig(e);let r=t;n&&(r=Array.from(new Set(t.concat(e))));const i=this.hot.runHooks("beforeTrimRow",t,r,n);!1!==i&&(n&&this.hot.batchExecution(()=>{Object(h["arrayEach"])(e,e=>{this.trimmedRowsMap.setValueAtIndex(e,!0)})},!0),this.hot.runHooks("afterTrimRow",t,r,n,n&&r.length>t.length))}trimRow(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];this.trimRows(t)}untrimRows(e){const t=this.getTrimmedRows(),n=this.isValidConfig(e);let r=t;const i=this.trimmedRowsMap.getValues().slice(),s=e.length>0;n&&s&&(Object(h["arrayEach"])(e,e=>{i[e]=!1}),r=Object(h["arrayReduce"])(i,(e,t,n)=>(t&&e.push(n),e),[]));const o=this.hot.runHooks("beforeUntrimRow",t,r,n&&s);!1!==o&&(n&&s&&this.trimmedRowsMap.setValues(i),this.hot.runHooks("afterUntrimRow",t,r,n&&s,n&&r.length<t.length))}untrimRow(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];this.untrimRows(t)}isTrimmed(e){return this.trimmedRowsMap.getValueAtIndex(e)||!1}untrimAll(){this.untrimRows(this.getTrimmedRows())}isValidConfig(e){const t=this.hot.countSourceRows();return e.every(e=>Number.isInteger(e)&&e>=0&&e<t)}destroy(){super.destroy()}}function SL(){const e=this.hot.getSettings()[fL];Array.isArray(e)&&this.hot.batchExecution(()=>{Object(h["arrayEach"])(e,e=>{this.trimmedRowsMap.setValueAtIndex(e,!0)})},!0)}n("c1f9");const bL="undoRedo",wL="undoRedo";function TL(e){const t=this;this.instance=e,this.doneActions=[],this.undoneActions=[],this.ignoreNewActions=!1,this.enabled=!1,e.addHook("afterChange",(function(n,r){const i=n&&n.length;if(!i)return;const s=n.find(e=>{const[,,t,n]=e;return t!==n});if(!s)return;const o=()=>{const t=n.reduce((e,t)=>(e.push([...t]),e),[]);Object(h["arrayEach"])(t,t=>{t[1]=e.propToCol(t[1])});const r=i>1?this.getSelected():[[t[0][0],t[0][1]]];return new TL.ChangeAction(t,r)};t.done(o,r)})),e.addHook("afterCreateRow",(e,n,r)=>{t.done(()=>new TL.CreateRowAction(e,n),r)});const n=(t,n,r,i)=>{const s=["visualRow","visualCol","row","col","prop"],o=s.length,a=[];return Object(nt["rangeEach"])(r,i,r=>{Object(nt["rangeEach"])(t,n,t=>{const n=e.getCellMeta(t,r);if(Object.keys(n).length!==o){const e=Object.fromEntries(Object.entries(n).filter(e=>{let[t]=e;return!1===s.includes(t)}));a.push([n.visualRow,n.visualCol,e])}})}),a};e.addHook("beforeRemoveRow",(r,i,s,a)=>{const l=()=>{const s=e.toPhysicalRow(r),a=s+i-1,l=Object(o["deepClone"])(t.instance.getSourceData(s,0,s+i-1,t.instance.countSourceCols()-1));return new TL.RemoveRowAction(s,l,e.getSettings().fixedRowsBottom,e.getSettings().fixedRowsTop,e.rowIndexMapper.getIndexesSequence(),n(s,a,0,e.countCols()-1))};t.done(l,a)}),e.addHook("afterCreateCol",(e,n,r)=>{t.done(()=>new TL.CreateColumnAction(e,n),r)}),e.addHook("beforeRemoveCol",(r,i,s,o)=>{const a=()=>{const s=t.instance.getSourceDataArray(),o=(t.instance.countCols()+r)%t.instance.countCols(),a=o+i-1,l=[],c=[],u=[];Object(nt["rangeEach"])(s.length-1,t=>{const n=[],r=s[t];Object(nt["rangeEach"])(o,a,t=>{n.push(r[e.toPhysicalColumn(t)])}),l.push(n)}),Object(nt["rangeEach"])(i-1,t=>{u.push(e.toPhysicalColumn(o+t))}),Array.isArray(e.getSettings().colHeaders)&&Object(nt["rangeEach"])(i-1,t=>{c.push(e.getSettings().colHeaders[e.toPhysicalColumn(o+t)]||null)});const h=e.columnIndexMapper.getIndexesSequence(),d=e.rowIndexMapper.getIndexesSequence();return new TL.RemoveColumnAction(o,u,l,c,h,d,e.getSettings().fixedColumnsStart,n(0,e.countRows(),o,a))};t.done(a,o)}),e.addHook("beforeCellAlignment",(e,n,r,i)=>{t.done(()=>new TL.CellAlignmentAction(e,n,r,i))}),e.addHook("beforeFilter",(e,n)=>{t.done(()=>new TL.FiltersAction(e,n))}),e.addHook("beforeRowMove",(e,n)=>{!1!==e&&t.done(()=>new TL.RowMoveAction(e,n))}),e.addHook("beforeColumnMove",(e,n)=>{!1!==e&&t.done(()=>new TL.ColumnMoveAction(e,n))}),e.addHook("beforeMergeCells",(n,r)=>{r||t.done(()=>new TL.MergeCellsAction(e,n))}),e.addHook("afterUnmergeCells",(n,r)=>{r||t.done(()=>new TL.UnmergeCellsAction(e,n))}),e.addHook("beforeColumnSort",(e,n,r)=>{r&&t.done(()=>new TL.ColumnSortAction(e,n))}),e.addHook("afterInit",()=>{t.init()})}TL.prototype.done=function(e,t){if(this.ignoreNewActions)return;const n="UndoRedo.undo"===t||"UndoRedo.redo"===t||"auto"===t;if(n)return;const r=this.doneActions.slice(),i=this.instance.runHooks("beforeUndoStackChange",r,t);if(!1===i)return;const s=e(),o=this.undoneActions.slice();this.doneActions.push(s),this.instance.runHooks("afterUndoStackChange",r,this.doneActions.slice()),this.instance.runHooks("beforeRedoStackChange",o),this.undoneActions.length=0,this.instance.runHooks("afterRedoStackChange",o,this.undoneActions.slice())},TL.prototype.undo=function(){if(this.isUndoAvailable()){const e=this.doneActions.slice();this.instance.runHooks("beforeUndoStackChange",e);const t=this.doneActions.pop();this.instance.runHooks("afterUndoStackChange",e,this.doneActions.slice());const n=Object(o["deepClone"])(t),r=this.instance.runHooks("beforeUndo",n);if(!1===r)return;this.ignoreNewActions=!0;const i=this,s=this.undoneActions.slice();this.instance.runHooks("beforeRedoStackChange",s),t.undo(this.instance,()=>{i.ignoreNewActions=!1,i.undoneActions.push(t)}),this.instance.runHooks("afterRedoStackChange",s,this.undoneActions.slice()),this.instance.runHooks("afterUndo",n)}},TL.prototype.redo=function(){if(this.isRedoAvailable()){const e=this.undoneActions.slice();this.instance.runHooks("beforeRedoStackChange",e);const t=this.undoneActions.pop();this.instance.runHooks("afterRedoStackChange",e,this.undoneActions.slice());const n=Object(o["deepClone"])(t),r=this.instance.runHooks("beforeRedo",n);if(!1===r)return;this.ignoreNewActions=!0;const i=this,s=this.doneActions.slice();this.instance.runHooks("beforeUndoStackChange",s),t.redo(this.instance,()=>{i.ignoreNewActions=!1,i.doneActions.push(t)}),this.instance.runHooks("afterUndoStackChange",s,this.doneActions.slice()),this.instance.runHooks("afterRedo",n)}},TL.prototype.isUndoAvailable=function(){return this.doneActions.length>0},TL.prototype.isRedoAvailable=function(){return this.undoneActions.length>0},TL.prototype.clear=function(){this.doneActions.length=0,this.undoneActions.length=0},TL.prototype.isEnabled=function(){return this.enabled},TL.prototype.enable=function(){if(this.isEnabled())return;const e=this.instance;this.enabled=!0,CL(e),this.registerShortcuts(),e.addHook("afterChange",EL)},TL.prototype.disable=function(){if(!this.isEnabled())return;const e=this.instance;this.enabled=!1,LL(e),this.unregisterShortcuts(),e.removeHook("afterChange",EL)},TL.prototype.destroy=function(){this.clear(),this.instance=null,this.doneActions=null,this.undoneActions=null},TL.Action=function(){},TL.Action.prototype.undo=function(){},TL.Action.prototype.redo=function(){},TL.ChangeAction=function(e,t){this.changes=e,this.selected=t,this.actionType="change"},Object(o["inherit"])(TL.ChangeAction,TL.Action),TL.ChangeAction.prototype.undo=function(e,t){const n=Object(o["deepClone"])(this.changes),r=e.countEmptyRows(!0),i=e.countEmptyCols(!0);for(let o=0,a=n.length;o<a;o++)n[o].splice(3,1);e.addHookOnce("afterChange",t),e.setDataAtCell(n,null,null,"UndoRedo.undo");for(let o=0,a=n.length;o<a;o++){const[t,s]=n[o];e.getSettings().minSpareRows&&t+1+e.getSettings().minSpareRows===e.countRows()&&r===e.getSettings().minSpareRows&&(e.alter("remove_row",parseInt(t+1,10),e.getSettings().minSpareRows),e.undoRedo.doneActions.pop()),e.getSettings().minSpareCols&&s+1+e.getSettings().minSpareCols===e.countCols()&&i===e.getSettings().minSpareCols&&(e.alter("remove_col",parseInt(s+1,10),e.getSettings().minSpareCols),e.undoRedo.doneActions.pop())}const s=e.getSelectedLast();if(void 0!==s){const[t,r]=n[0],[i,o]=s,a=e.view.getFirstFullyVisibleRow(),l=e.view.getFirstFullyVisibleColumn(),c=t>=a,u=r>=l,h=c&&u,d=i!==t||o!==r;if(!1===h&&!0===d){const n={row:t,col:r};!1===c&&(n.verticalSnap="top"),!1===u&&(n.horizontalSnap="start"),e.scrollViewportTo(n)}}e.selectCells(this.selected,!1,!1)},TL.ChangeAction.prototype.redo=function(e,t){const n=Object(o["deepClone"])(this.changes);for(let r=0,i=n.length;r<i;r++)n[r].splice(2,1);e.addHookOnce("afterChange",t),e.setDataAtCell(n,null,null,"UndoRedo.redo"),this.selected&&e.selectCells(this.selected,!1,!1)},TL.CreateRowAction=function(e,t){this.index=e,this.amount=t,this.actionType="insert_row"},Object(o["inherit"])(TL.CreateRowAction,TL.Action),TL.CreateRowAction.prototype.undo=function(e,t){const n=e.countRows(),r=e.getSettings().minSpareRows;this.index>=n&&this.index-r<n&&(this.index-=r),e.addHookOnce("afterRemoveRow",t),e.alter("remove_row",this.index,this.amount,"UndoRedo.undo")},TL.CreateRowAction.prototype.redo=function(e,t){e.addHookOnce("afterCreateRow",t),e.alter("insert_row_above",this.index,this.amount,"UndoRedo.redo")},TL.RemoveRowAction=function(e,t,n,r,i,s){this.index=e,this.data=t,this.actionType="remove_row",this.fixedRowsBottom=n,this.fixedRowsTop=r,this.rowIndexesSequence=i,this.removedCellMetas=s},Object(o["inherit"])(TL.RemoveRowAction,TL.Action),TL.RemoveRowAction.prototype.undo=function(e,t){const n=e.getSettings(),r=[];n.fixedRowsBottom=this.fixedRowsBottom,n.fixedRowsTop=this.fixedRowsTop,this.data.forEach((e,t)=>{Object.keys(e).forEach(n=>{const i=parseInt(n,10);r.push([this.index+t,isNaN(i)?n:i,e[n]])})}),e.alter("insert_row_above",this.index,this.data.length,"UndoRedo.undo"),this.removedCellMetas.forEach(t=>{let[n,r,i]=t;e.setCellMetaObject(n,r,i)}),e.addHookOnce("afterViewRender",t),e.setSourceDataAtCell(r,null,null,"UndoRedo.undo"),e.rowIndexMapper.setIndexesSequence(this.rowIndexesSequence)},TL.RemoveRowAction.prototype.redo=function(e,t){e.addHookOnce("afterRemoveRow",t),e.alter("remove_row",this.index,this.data.length,"UndoRedo.redo")},TL.CreateColumnAction=function(e,t){this.index=e,this.amount=t,this.actionType="insert_col"},Object(o["inherit"])(TL.CreateColumnAction,TL.Action),TL.CreateColumnAction.prototype.undo=function(e,t){e.addHookOnce("afterRemoveCol",t),e.alter("remove_col",this.index,this.amount,"UndoRedo.undo")},TL.CreateColumnAction.prototype.redo=function(e,t){e.addHookOnce("afterCreateCol",t),e.alter("insert_col_start",this.index,this.amount,"UndoRedo.redo")},TL.RemoveColumnAction=function(e,t,n,r,i,s,o,a){this.index=e,this.indexes=t,this.data=n,this.amount=this.data[0].length,this.headers=r,this.columnPositions=i.slice(0),this.rowPositions=s.slice(0),this.actionType="remove_col",this.fixedColumnsStart=o,this.removedCellMetas=a},Object(o["inherit"])(TL.RemoveColumnAction,TL.Action),TL.RemoveColumnAction.prototype.undo=function(e,t){const n=e.getSettings();n.fixedColumnsStart=this.fixedColumnsStart;const r=this.indexes.slice(0).sort(),i=(e,t,n)=>n[this.indexes.indexOf(r[t])],s=this.data.length,o=[];for(let c=0;c<s;c++)o.push(Object(h["arrayMap"])(this.data[c],i));const a=Object(h["arrayMap"])(this.headers,i),l=[];e.alter("insert_col_start",this.indexes[0],this.indexes.length,"UndoRedo.undo"),Object(h["arrayEach"])(e.getSourceDataArray(),(e,t)=>{Object(h["arrayEach"])(r,(n,r)=>{e[n]=o[t][r],l.push([t,n,e[n]])})}),e.setSourceDataAtCell(l,void 0,void 0,"UndoRedo.undo"),"undefined"!==typeof this.headers&&Object(h["arrayEach"])(a,(t,n)=>{e.getSettings().colHeaders[r[n]]=t}),this.removedCellMetas.forEach(t=>{let[n,r,i]=t;e.setCellMetaObject(n,r,i)}),e.batchExecution(()=>{e.rowIndexMapper.setIndexesSequence(this.rowPositions),e.columnIndexMapper.setIndexesSequence(this.columnPositions)},!0),e.addHookOnce("afterViewRender",t),e.render()},TL.RemoveColumnAction.prototype.redo=function(e,t){e.addHookOnce("afterRemoveCol",t),e.alter("remove_col",this.index,this.amount,"UndoRedo.redo")},TL.CellAlignmentAction=function(e,t,n,r){this.stateBefore=e,this.range=t,this.type=n,this.alignment=r},TL.CellAlignmentAction.prototype.undo=function(e,t){Object(h["arrayEach"])(this.range,t=>{t.forAll((t,n)=>{t>=0&&n>=0&&e.setCellMeta(t,n,"className",this.stateBefore[t][n]||" htLeft")})}),e.addHookOnce("afterViewRender",t),e.render()},TL.CellAlignmentAction.prototype.redo=function(e,t){Ho(this.range,this.type,this.alignment,(t,n)=>e.getCellMeta(t,n),(t,n,r,i)=>e.setCellMeta(t,n,r,i)),e.addHookOnce("afterViewRender",t),e.render()},TL.FiltersAction=function(e,t){this.previousConditionsStack=t,this.conditionsStack=e,this.actionType="filter"},Object(o["inherit"])(TL.FiltersAction,TL.Action),TL.FiltersAction.prototype.undo=function(e,t){const n=e.getPlugin("filters");e.addHookOnce("afterViewRender",t),this.previousConditionsStack&&n.conditionCollection.importAllConditions(this.previousConditionsStack),n.filter()},TL.FiltersAction.prototype.redo=function(e,t){const n=e.getPlugin("filters");e.addHookOnce("afterViewRender",t),n.conditionCollection.importAllConditions(this.conditionsStack),n.filter()};class OL extends TL.Action{constructor(e,t){super(),this.cellRange=t;const n=this.cellRange.getTopStartCorner(),r=this.cellRange.getBottomEndCorner();this.rangeData=e.getData(n.row,n.col,r.row,r.col)}undo(e,t){const n=e.getPlugin("mergeCells");e.addHookOnce("afterViewRender",t),n.unmergeRange(this.cellRange,!0);const r=this.cellRange.getTopStartCorner();e.populateFromArray(r.row,r.col,this.rangeData,void 0,void 0,"MergeCells")}redo(e,t){const n=e.getPlugin("mergeCells");e.addHookOnce("afterViewRender",t),n.mergeRange(this.cellRange)}}TL.MergeCellsAction=OL;class vL extends TL.Action{constructor(e,t){super(),this.cellRange=t}undo(e,t){const n=e.getPlugin("mergeCells");e.addHookOnce("afterViewRender",t),n.mergeRange(this.cellRange,!0)}redo(e,t){const n=e.getPlugin("mergeCells");e.addHookOnce("afterViewRender",t),n.unmergeRange(this.cellRange,!0),e.render()}}function EL(e,t){const n=this;if("loadData"===t)return n.undoRedo.clear()}function CL(e){e.undo=function(){return e.undoRedo.undo()},e.redo=function(){return e.undoRedo.redo()},e.isUndoAvailable=function(){return e.undoRedo.isUndoAvailable()},e.isRedoAvailable=function(){return e.undoRedo.isRedoAvailable()},e.clearUndo=function(){return e.undoRedo.clear()}}function LL(e){delete e.undo,delete e.redo,delete e.isUndoAvailable,delete e.isRedoAvailable,delete e.clearUndo}TL.UnmergeCellsAction=vL,TL.RowMoveAction=function(e,t){this.rows=e.slice(),this.finalRowIndex=t,this.actionType="row_move"},Object(o["inherit"])(TL.RowMoveAction,TL.Action),TL.RowMoveAction.prototype.undo=function(e,t){const n=e.getPlugin("manualRowMove");e.addHookOnce("afterViewRender",t);const r=rR(this.rows,this.finalRowIndex,e.rowIndexMapper.getNumberOfIndexes());r.reverse().forEach(e=>{let{from:t,to:r}=e;t<r&&(r-=1),n.moveRow(r,t)}),e.render(),e.deselectCell(),e.selectRows(this.rows[0],this.rows[0]+this.rows.length-1)},TL.RowMoveAction.prototype.redo=function(e,t){const n=e.getPlugin("manualRowMove");e.addHookOnce("afterViewRender",t),n.moveRows(this.rows.slice(),this.finalRowIndex),e.render(),e.deselectCell(),e.selectRows(this.finalRowIndex,this.finalRowIndex+this.rows.length-1)},TL.ColumnMoveAction=function(e,t){this.columns=e.slice(),this.finalColumnIndex=t,this.actionType="col_move"},Object(o["inherit"])(TL.ColumnMoveAction,TL.Action),TL.ColumnMoveAction.prototype.undo=function(e,t){const n=e.getPlugin("manualColumnMove");e.addHookOnce("afterViewRender",t);const r=rR(this.columns,this.finalColumnIndex,e.columnIndexMapper.getNumberOfIndexes());r.reverse().forEach(e=>{let{from:t,to:r}=e;t<r&&(r-=1),n.moveColumn(r,t)}),e.render(),e.deselectCell(),e.selectColumns(this.columns[0],this.columns[0]+this.columns.length-1)},TL.ColumnMoveAction.prototype.redo=function(e,t){const n=e.getPlugin("manualColumnMove");e.addHookOnce("afterViewRender",t),n.moveColumns(this.columns.slice(),this.finalColumnIndex),e.render(),e.deselectCell(),e.selectColumns(this.finalColumnIndex,this.finalColumnIndex+this.columns.length-1)},TL.ColumnSortAction=function(e,t){this.previousSortState=e,this.nextSortState=t},Object(o["inherit"])(TL.ColumnSortAction,TL.Action),TL.ColumnSortAction.prototype.undo=function(e,t){const n=e.getPlugin("columnSorting"),r=e.getPlugin("multiColumnSorting"),i=r.isEnabled()?r:n;this.previousSortState.length?i.sort(this.previousSortState):i.clearSort(),t()},TL.ColumnSortAction.prototype.redo=function(e,t){const n=e.getPlugin("columnSorting"),r=e.getPlugin("multiColumnSorting"),i=r.isEnabled()?r:n;i.sort(this.nextSortState),t()},TL.prototype.init=function(){const e=this.instance.getSettings().undo,t="undefined"===typeof e||e;this.instance.undoRedo||(this.instance.undoRedo=this),t?this.instance.undoRedo.enable():this.instance.undoRedo.disable()},TL.prototype.registerShortcuts=function(){const e=this.instance.getShortcutManager(),t=e.getContext("grid"),n=e=>!e.altKey,r={runOnlyIf:n,group:bL};t.addShortcuts([{keys:[["Control/Meta","z"]],callback:()=>{this.undo()}},{keys:[["Control/Meta","y"],["Control/Meta","Shift","z"]],callback:()=>{this.redo()}}],r)},TL.prototype.unregisterShortcuts=function(){const e=this.instance.getShortcutManager(),t=e.getContext("grid");t.removeShortcutsByGroup(bL)};const NL=ge["a"].getSingleton();NL.add("afterUpdateSettings",(function(){var e;null===(e=this.getPlugin("undoRedo"))||void 0===e||e.init()})),NL.register("beforeUndo"),NL.register("afterUndo"),NL.register("beforeRedo"),NL.register("afterRedo"),TL.PLUGIN_KEY=wL,TL.SETTING_KEYS=!0;var _L=TL,IL=n("24b5");function PL(){Object(IL["d"])(vn),Object(IL["d"])(Gn),Object(IL["d"])(gr),Object(IL["d"])(jr),Object(IL["d"])(ui),Object(IL["d"])(Os),Object(IL["d"])(Zs),Object(IL["d"])(fa),Object(IL["d"])(fc),Object(IL["d"])(pu),Object(IL["d"])(eh),Object(IL["d"])(dh),Object(IL["d"])(Nh),Object(IL["d"])(sd),Object(IL["d"])(yf),Object(IL["d"])(BR),Object(IL["d"])(Dy),Object(IL["d"])(eM),Object(IL["d"])(MM),Object(IL["d"])(aS),Object(IL["d"])(VS),Object(IL["d"])(_b),Object(IL["d"])(uw),Object(IL["d"])(HT),Object(IL["d"])(OO),Object(IL["d"])(_O),Object(IL["d"])(eE),Object(IL["d"])(cC),Object(IL["d"])(FC),Object(IL["d"])(BC),Object(IL["d"])(oL),Object(IL["d"])(ML),Object(IL["d"])(_L)}function xL(){Le(),mt(),Nt(),$t(),PL()}},"8d47":function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
  227. //! moment.js locale configuration
  228. function t(e){return"undefined"!==typeof Function&&e instanceof Function||"[object Function]"===Object.prototype.toString.call(e)}var n=e.defineLocale("el",{monthsNominativeEl:"Ιανουάριος_Φεβρουάριος_Μάρτιος_Απρίλιος_Μάιος_Ιούνιος_Ιούλιος_Αύγουστος_Σεπτέμβριος_Οκτώβριος_Νοέμβριος_Δεκέμβριος".split("_"),monthsGenitiveEl:"Ιανουαρίου_Φεβρουαρίου_Μαρτίου_Απριλίου_Μαΐου_Ιουνίου_Ιουλίου_Αυγούστου_Σεπτεμβρίου_Οκτωβρίου_Νοεμβρίου_Δεκεμβρίου".split("_"),months:function(e,t){return e?"string"===typeof t&&/D/.test(t.substring(0,t.indexOf("MMMM")))?this._monthsGenitiveEl[e.month()]:this._monthsNominativeEl[e.month()]:this._monthsNominativeEl},monthsShort:"Ιαν_Φεβ_Μαρ_Απρ_Μαϊ_Ιουν_Ιουλ_Αυγ_Σεπ_Οκτ_Νοε_Δεκ".split("_"),weekdays:"Κυριακή_Δευτέρα_Τρίτη_Τετάρτη_Πέμπτη_Παρασκευή_Σάββατο".split("_"),weekdaysShort:"Κυρ_Δευ_Τρι_Τετ_Πεμ_Παρ_Σαβ".split("_"),weekdaysMin:"Κυ_Δε_Τρ_Τε_Πε_Πα_Σα".split("_"),meridiem:function(e,t,n){return e>11?n?"μμ":"ΜΜ":n?"πμ":"ΠΜ"},isPM:function(e){return"μ"===(e+"").toLowerCase()[0]},meridiemParse:/[ΠΜ]\.?Μ?\.?/i,longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY h:mm A",LLLL:"dddd, D MMMM YYYY h:mm A"},calendarEl:{sameDay:"[Σήμερα {}] LT",nextDay:"[Αύριο {}] LT",nextWeek:"dddd [{}] LT",lastDay:"[Χθες {}] LT",lastWeek:function(){switch(this.day()){case 6:return"[το προηγούμενο] dddd [{}] LT";default:return"[την προηγούμενη] dddd [{}] LT"}},sameElse:"L"},calendar:function(e,n){var r=this._calendarEl[e],i=n&&n.hours();return t(r)&&(r=r.apply(n)),r.replace("{}",i%12===1?"στη":"στις")},relativeTime:{future:"σε %s",past:"%s πριν",s:"λίγα δευτερόλεπτα",ss:"%d δευτερόλεπτα",m:"ένα λεπτό",mm:"%d λεπτά",h:"μία ώρα",hh:"%d ώρες",d:"μία μέρα",dd:"%d μέρες",M:"ένας μήνας",MM:"%d μήνες",y:"ένας χρόνος",yy:"%d χρόνια"},dayOfMonthOrdinalParse:/\d{1,2}η/,ordinal:"%dη",week:{dow:1,doy:4}});return n}))},"8d57":function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
  229. //! moment.js locale configuration
  230. var t="styczeń_luty_marzec_kwiecień_maj_czerwiec_lipiec_sierpień_wrzesień_październik_listopad_grudzień".split("_"),n="stycznia_lutego_marca_kwietnia_maja_czerwca_lipca_sierpnia_września_października_listopada_grudnia".split("_"),r=[/^sty/i,/^lut/i,/^mar/i,/^kwi/i,/^maj/i,/^cze/i,/^lip/i,/^sie/i,/^wrz/i,/^paź/i,/^lis/i,/^gru/i];function i(e){return e%10<5&&e%10>1&&~~(e/10)%10!==1}function s(e,t,n){var r=e+" ";switch(n){case"ss":return r+(i(e)?"sekundy":"sekund");case"m":return t?"minuta":"minutę";case"mm":return r+(i(e)?"minuty":"minut");case"h":return t?"godzina":"godzinę";case"hh":return r+(i(e)?"godziny":"godzin");case"ww":return r+(i(e)?"tygodnie":"tygodni");case"MM":return r+(i(e)?"miesiące":"miesięcy");case"yy":return r+(i(e)?"lata":"lat")}}var o=e.defineLocale("pl",{months:function(e,r){return e?/D MMMM/.test(r)?n[e.month()]:t[e.month()]:t},monthsShort:"sty_lut_mar_kwi_maj_cze_lip_sie_wrz_paź_lis_gru".split("_"),monthsParse:r,longMonthsParse:r,shortMonthsParse:r,weekdays:"niedziela_poniedziałek_wtorek_środa_czwartek_piątek_sobota".split("_"),weekdaysShort:"ndz_pon_wt_śr_czw_pt_sob".split("_"),weekdaysMin:"Nd_Pn_Wt_Śr_Cz_Pt_So".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Dziś o] LT",nextDay:"[Jutro o] LT",nextWeek:function(){switch(this.day()){case 0:return"[W niedzielę o] LT";case 2:return"[We wtorek o] LT";case 3:return"[W środę o] LT";case 6:return"[W sobotę o] LT";default:return"[W] dddd [o] LT"}},lastDay:"[Wczoraj o] LT",lastWeek:function(){switch(this.day()){case 0:return"[W zeszłą niedzielę o] LT";case 3:return"[W zeszłą środę o] LT";case 6:return"[W zeszłą sobotę o] LT";default:return"[W zeszły] dddd [o] LT"}},sameElse:"L"},relativeTime:{future:"za %s",past:"%s temu",s:"kilka sekund",ss:s,m:s,mm:s,h:s,hh:s,d:"1 dzień",dd:"%d dni",w:"tydzień",ww:s,M:"miesiąc",MM:s,y:"rok",yy:s},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}});return o}))},"8df48":function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
  231. //! moment.js locale configuration
  232. var t={1:"۱",2:"۲",3:"۳",4:"۴",5:"۵",6:"۶",7:"۷",8:"۸",9:"۹",0:"۰"},n={"۱":"1","۲":"2","۳":"3","۴":"4","۵":"5","۶":"6","۷":"7","۸":"8","۹":"9","۰":"0"},r=e.defineLocale("fa",{months:"ژانویه_فوریه_مارس_آوریل_مه_ژوئن_ژوئیه_اوت_سپتامبر_اکتبر_نوامبر_دسامبر".split("_"),monthsShort:"ژانویه_فوریه_مارس_آوریل_مه_ژوئن_ژوئیه_اوت_سپتامبر_اکتبر_نوامبر_دسامبر".split("_"),weekdays:"یک‌شنبه_دوشنبه_سه‌شنبه_چهارشنبه_پنج‌شنبه_جمعه_شنبه".split("_"),weekdaysShort:"یک‌شنبه_دوشنبه_سه‌شنبه_چهارشنبه_پنج‌شنبه_جمعه_شنبه".split("_"),weekdaysMin:"ی_د_س_چ_پ_ج_ش".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},meridiemParse:/قبل از ظهر|بعد از ظهر/,isPM:function(e){return/بعد از ظهر/.test(e)},meridiem:function(e,t,n){return e<12?"قبل از ظهر":"بعد از ظهر"},calendar:{sameDay:"[امروز ساعت] LT",nextDay:"[فردا ساعت] LT",nextWeek:"dddd [ساعت] LT",lastDay:"[دیروز ساعت] LT",lastWeek:"dddd [پیش] [ساعت] LT",sameElse:"L"},relativeTime:{future:"در %s",past:"%s پیش",s:"چند ثانیه",ss:"%d ثانیه",m:"یک دقیقه",mm:"%d دقیقه",h:"یک ساعت",hh:"%d ساعت",d:"یک روز",dd:"%d روز",M:"یک ماه",MM:"%d ماه",y:"یک سال",yy:"%d سال"},preparse:function(e){return e.replace(/[۰-۹]/g,(function(e){return n[e]})).replace(/،/g,",")},postformat:function(e){return e.replace(/\d/g,(function(e){return t[e]})).replace(/,/g,"،")},dayOfMonthOrdinalParse:/\d{1,2}م/,ordinal:"%dم",week:{dow:6,doy:12}});return r}))},"8e16":function(e,t,n){"use strict";var r=n("7282"),i=n("cb27");e.exports=r(i.proto,"size","get")||function(e){return e.size}},"8e73":function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
  233. //! moment.js locale configuration
  234. var t={1:"١",2:"٢",3:"٣",4:"٤",5:"٥",6:"٦",7:"٧",8:"٨",9:"٩",0:"٠"},n={"١":"1","٢":"2","٣":"3","٤":"4","٥":"5","٦":"6","٧":"7","٨":"8","٩":"9","٠":"0"},r=function(e){return 0===e?0:1===e?1:2===e?2:e%100>=3&&e%100<=10?3:e%100>=11?4:5},i={s:["أقل من ثانية","ثانية واحدة",["ثانيتان","ثانيتين"],"%d ثوان","%d ثانية","%d ثانية"],m:["أقل من دقيقة","دقيقة واحدة",["دقيقتان","دقيقتين"],"%d دقائق","%d دقيقة","%d دقيقة"],h:["أقل من ساعة","ساعة واحدة",["ساعتان","ساعتين"],"%d ساعات","%d ساعة","%d ساعة"],d:["أقل من يوم","يوم واحد",["يومان","يومين"],"%d أيام","%d يومًا","%d يوم"],M:["أقل من شهر","شهر واحد",["شهران","شهرين"],"%d أشهر","%d شهرا","%d شهر"],y:["أقل من عام","عام واحد",["عامان","عامين"],"%d أعوام","%d عامًا","%d عام"]},s=function(e){return function(t,n,s,o){var a=r(t),l=i[e][r(t)];return 2===a&&(l=l[n?0:1]),l.replace(/%d/i,t)}},o=["يناير","فبراير","مارس","أبريل","مايو","يونيو","يوليو","أغسطس","سبتمبر","أكتوبر","نوفمبر","ديسمبر"],a=e.defineLocale("ar",{months:o,monthsShort:o,weekdays:"الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت".split("_"),weekdaysShort:"أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت".split("_"),weekdaysMin:"ح_ن_ث_ر_خ_ج_س".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"D/‏M/‏YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},meridiemParse:/ص|م/,isPM:function(e){return"م"===e},meridiem:function(e,t,n){return e<12?"ص":"م"},calendar:{sameDay:"[اليوم عند الساعة] LT",nextDay:"[غدًا عند الساعة] LT",nextWeek:"dddd [عند الساعة] LT",lastDay:"[أمس عند الساعة] LT",lastWeek:"dddd [عند الساعة] LT",sameElse:"L"},relativeTime:{future:"بعد %s",past:"منذ %s",s:s("s"),ss:s("s"),m:s("m"),mm:s("m"),h:s("h"),hh:s("h"),d:s("d"),dd:s("d"),M:s("M"),MM:s("M"),y:s("y"),yy:s("y")},preparse:function(e){return e.replace(/[١٢٣٤٥٦٧٨٩٠]/g,(function(e){return n[e]})).replace(/،/g,",")},postformat:function(e){return e.replace(/\d/g,(function(e){return t[e]})).replace(/,/g,"،")},week:{dow:6,doy:12}});return a}))},9043:function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
  235. //! moment.js locale configuration
  236. var t={1:"১",2:"২",3:"৩",4:"৪",5:"৫",6:"৬",7:"৭",8:"৮",9:"৯",0:"০"},n={"১":"1","২":"2","৩":"3","৪":"4","৫":"5","৬":"6","৭":"7","৮":"8","৯":"9","০":"0"},r=e.defineLocale("bn",{months:"জানুয়ারি_ফেব্রুয়ারি_মার্চ_এপ্রিল_মে_জুন_জুলাই_আগস্ট_সেপ্টেম্বর_অক্টোবর_নভেম্বর_ডিসেম্বর".split("_"),monthsShort:"জানু_ফেব্রু_মার্চ_এপ্রিল_মে_জুন_জুলাই_আগস্ট_সেপ্ট_অক্টো_নভে_ডিসে".split("_"),weekdays:"রবিবার_সোমবার_মঙ্গলবার_বুধবার_বৃহস্পতিবার_শুক্রবার_শনিবার".split("_"),weekdaysShort:"রবি_সোম_মঙ্গল_বুধ_বৃহস্পতি_শুক্র_শনি".split("_"),weekdaysMin:"রবি_সোম_মঙ্গল_বুধ_বৃহ_শুক্র_শনি".split("_"),longDateFormat:{LT:"A h:mm সময়",LTS:"A h:mm:ss সময়",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm সময়",LLLL:"dddd, D MMMM YYYY, A h:mm সময়"},calendar:{sameDay:"[আজ] LT",nextDay:"[আগামীকাল] LT",nextWeek:"dddd, LT",lastDay:"[গতকাল] LT",lastWeek:"[গত] dddd, LT",sameElse:"L"},relativeTime:{future:"%s পরে",past:"%s আগে",s:"কয়েক সেকেন্ড",ss:"%d সেকেন্ড",m:"এক মিনিট",mm:"%d মিনিট",h:"এক ঘন্টা",hh:"%d ঘন্টা",d:"এক দিন",dd:"%d দিন",M:"এক মাস",MM:"%d মাস",y:"এক বছর",yy:"%d বছর"},preparse:function(e){return e.replace(/[১২৩৪৫৬৭৮৯০]/g,(function(e){return n[e]}))},postformat:function(e){return e.replace(/\d/g,(function(e){return t[e]}))},meridiemParse:/রাত|সকাল|দুপুর|বিকাল|রাত/,meridiemHour:function(e,t){return 12===e&&(e=0),"রাত"===t&&e>=4||"দুপুর"===t&&e<5||"বিকাল"===t?e+12:e},meridiem:function(e,t,n){return e<4?"রাত":e<10?"সকাল":e<17?"দুপুর":e<20?"বিকাল":"রাত"},week:{dow:0,doy:6}});return r}))},9056:function(e,t,n){"use strict";n.d(t,"a",(function(){return h}));n("d9e2");var r=n("1096"),i=n("e90f"),s=n("3d57"),o=n("a73f"),a=n("97b9");function l(e,t,n){return(t=c(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function c(e){var t=u(e,"string");return"symbol"==typeof t?t:t+""}function u(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}class h extends r["a"]{constructor(){super(...arguments),l(this,"orderOfIndexes",[])}getValues(){return this.orderOfIndexes.map(e=>this.indexedValues[e])}setValues(e){this.orderOfIndexes=[...Array(e.length).keys()],super.setValues(e)}setValueAtIndex(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.orderOfIndexes.length;return e<this.indexedValues.length&&(this.indexedValues[e]=t,!1===this.orderOfIndexes.includes(e)&&this.orderOfIndexes.splice(n,0,e),this.runLocalHooks("change"),!0)}clearValue(e){this.orderOfIndexes=Object(s["b"])(this.orderOfIndexes,[e]),Object(a["isFunction"])(this.initValueOrFn)?super.setValueAtIndex(e,this.initValueOrFn(e)):super.setValueAtIndex(e,this.initValueOrFn)}getLength(){return this.orderOfIndexes.length}setDefaultValues(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.indexedValues.length;this.orderOfIndexes.length=0,super.setDefaultValues(e)}insert(e,t){this.indexedValues=Object(i["a"])(this.indexedValues,e,t,this.initValueOrFn),this.orderOfIndexes=Object(o["b"])(this.orderOfIndexes,t),super.insert(e,t)}remove(e){this.indexedValues=Object(i["b"])(this.indexedValues,e),this.orderOfIndexes=Object(s["b"])(this.orderOfIndexes,e),this.orderOfIndexes=Object(o["a"])(this.orderOfIndexes,e),super.remove(e)}getEntries(){return this.orderOfIndexes.map(e=>[e,this.getValueAtIndex(e)])}}},"90ea":function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
  237. //! moment.js locale configuration
  238. var t=e.defineLocale("zh-tw",{months:"一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),weekdays:"星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"),weekdaysShort:"週日_週一_週二_週三_週四_週五_週六".split("_"),weekdaysMin:"日_一_二_三_四_五_六".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY/MM/DD",LL:"YYYY年M月D日",LLL:"YYYY年M月D日 HH:mm",LLLL:"YYYY年M月D日dddd HH:mm",l:"YYYY/M/D",ll:"YYYY年M月D日",lll:"YYYY年M月D日 HH:mm",llll:"YYYY年M月D日dddd HH:mm"},meridiemParse:/凌晨|早上|上午|中午|下午|晚上/,meridiemHour:function(e,t){return 12===e&&(e=0),"凌晨"===t||"早上"===t||"上午"===t?e:"中午"===t?e>=11?e:e+12:"下午"===t||"晚上"===t?e+12:void 0},meridiem:function(e,t,n){var r=100*e+t;return r<600?"凌晨":r<900?"早上":r<1130?"上午":r<1230?"中午":r<1800?"下午":"晚上"},calendar:{sameDay:"[今天] LT",nextDay:"[明天] LT",nextWeek:"[下]dddd LT",lastDay:"[昨天] LT",lastWeek:"[上]dddd LT",sameElse:"L"},dayOfMonthOrdinalParse:/\d{1,2}(日|月|週)/,ordinal:function(e,t){switch(t){case"d":case"D":case"DDD":return e+"日";case"M":return e+"月";case"w":case"W":return e+"週";default:return e}},relativeTime:{future:"%s後",past:"%s前",s:"幾秒",ss:"%d 秒",m:"1 分鐘",mm:"%d 分鐘",h:"1 小時",hh:"%d 小時",d:"1 天",dd:"%d 天",M:"1 個月",MM:"%d 個月",y:"1 年",yy:"%d 年"}});return t}))},"953b":function(e,t,n){"use strict";var r=n("dc19"),i=n("cb27"),s=n("8e16"),o=n("7f65"),a=n("384f"),l=n("5388"),c=i.Set,u=i.add,h=i.has;e.exports=function(e){var t=r(this),n=o(e),i=new c;return s(t)>n.size?l(n.getIterator(),(function(e){h(t,e)&&u(i,e)})):a(t,(function(e){n.includes(e)&&u(i,e)})),i}},"957c":function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
  239. //! moment.js locale configuration
  240. function t(e,t){var n=e.split("_");return t%10===1&&t%100!==11?n[0]:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?n[1]:n[2]}function n(e,n,r){var i={ss:n?"секунда_секунды_секунд":"секунду_секунды_секунд",mm:n?"минута_минуты_минут":"минуту_минуты_минут",hh:"час_часа_часов",dd:"день_дня_дней",ww:"неделя_недели_недель",MM:"месяц_месяца_месяцев",yy:"год_года_лет"};return"m"===r?n?"минута":"минуту":e+" "+t(i[r],+e)}var r=[/^янв/i,/^фев/i,/^мар/i,/^апр/i,/^ма[йя]/i,/^июн/i,/^июл/i,/^авг/i,/^сен/i,/^окт/i,/^ноя/i,/^дек/i],i=e.defineLocale("ru",{months:{format:"января_февраля_марта_апреля_мая_июня_июля_августа_сентября_октября_ноября_декабря".split("_"),standalone:"январь_февраль_март_апрель_май_июнь_июль_август_сентябрь_октябрь_ноябрь_декабрь".split("_")},monthsShort:{format:"янв._февр._мар._апр._мая_июня_июля_авг._сент._окт._нояб._дек.".split("_"),standalone:"янв._февр._март_апр._май_июнь_июль_авг._сент._окт._нояб._дек.".split("_")},weekdays:{standalone:"воскресенье_понедельник_вторник_среда_четверг_пятница_суббота".split("_"),format:"воскресенье_понедельник_вторник_среду_четверг_пятницу_субботу".split("_"),isFormat:/\[ ?[Вв] ?(?:прошлую|следующую|эту)? ?] ?dddd/},weekdaysShort:"вс_пн_вт_ср_чт_пт_сб".split("_"),weekdaysMin:"вс_пн_вт_ср_чт_пт_сб".split("_"),monthsParse:r,longMonthsParse:r,shortMonthsParse:r,monthsRegex:/^(январ[ья]|янв\.?|феврал[ья]|февр?\.?|марта?|мар\.?|апрел[ья]|апр\.?|ма[йя]|июн[ья]|июн\.?|июл[ья]|июл\.?|августа?|авг\.?|сентябр[ья]|сент?\.?|октябр[ья]|окт\.?|ноябр[ья]|нояб?\.?|декабр[ья]|дек\.?)/i,monthsShortRegex:/^(январ[ья]|янв\.?|феврал[ья]|февр?\.?|марта?|мар\.?|апрел[ья]|апр\.?|ма[йя]|июн[ья]|июн\.?|июл[ья]|июл\.?|августа?|авг\.?|сентябр[ья]|сент?\.?|октябр[ья]|окт\.?|ноябр[ья]|нояб?\.?|декабр[ья]|дек\.?)/i,monthsStrictRegex:/^(январ[яь]|феврал[яь]|марта?|апрел[яь]|ма[яй]|июн[яь]|июл[яь]|августа?|сентябр[яь]|октябр[яь]|ноябр[яь]|декабр[яь])/i,monthsShortStrictRegex:/^(янв\.|февр?\.|мар[т.]|апр\.|ма[яй]|июн[ья.]|июл[ья.]|авг\.|сент?\.|окт\.|нояб?\.|дек\.)/i,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY г.",LLL:"D MMMM YYYY г., H:mm",LLLL:"dddd, D MMMM YYYY г., H:mm"},calendar:{sameDay:"[Сегодня, в] LT",nextDay:"[Завтра, в] LT",lastDay:"[Вчера, в] LT",nextWeek:function(e){if(e.week()===this.week())return 2===this.day()?"[Во] dddd, [в] LT":"[В] dddd, [в] LT";switch(this.day()){case 0:return"[В следующее] dddd, [в] LT";case 1:case 2:case 4:return"[В следующий] dddd, [в] LT";case 3:case 5:case 6:return"[В следующую] dddd, [в] LT"}},lastWeek:function(e){if(e.week()===this.week())return 2===this.day()?"[Во] dddd, [в] LT":"[В] dddd, [в] LT";switch(this.day()){case 0:return"[В прошлое] dddd, [в] LT";case 1:case 2:case 4:return"[В прошлый] dddd, [в] LT";case 3:case 5:case 6:return"[В прошлую] dddd, [в] LT"}},sameElse:"L"},relativeTime:{future:"через %s",past:"%s назад",s:"несколько секунд",ss:n,m:n,mm:n,h:"час",hh:n,d:"день",dd:n,w:"неделя",ww:n,M:"месяц",MM:n,y:"год",yy:n},meridiemParse:/ночи|утра|дня|вечера/i,isPM:function(e){return/^(дня|вечера)$/.test(e)},meridiem:function(e,t,n){return e<4?"ночи":e<12?"утра":e<17?"дня":"вечера"},dayOfMonthOrdinalParse:/\d{1,2}-(й|го|я)/,ordinal:function(e,t){switch(t){case"M":case"d":case"DDD":return e+"-й";case"D":return e+"-го";case"w":case"W":return e+"-я";default:return e}},week:{dow:1,doy:4}});return i}))},"958b":function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
  241. //! moment.js locale configuration
  242. function t(e,t,n,r){switch(n){case"s":return t?"хэдхэн секунд":"хэдхэн секундын";case"ss":return e+(t?" секунд":" секундын");case"m":case"mm":return e+(t?" минут":" минутын");case"h":case"hh":return e+(t?" цаг":" цагийн");case"d":case"dd":return e+(t?" өдөр":" өдрийн");case"M":case"MM":return e+(t?" сар":" сарын");case"y":case"yy":return e+(t?" жил":" жилийн");default:return e}}var n=e.defineLocale("mn",{months:"Нэгдүгээр сар_Хоёрдугаар сар_Гуравдугаар сар_Дөрөвдүгээр сар_Тавдугаар сар_Зургадугаар сар_Долдугаар сар_Наймдугаар сар_Есдүгээр сар_Аравдугаар сар_Арван нэгдүгээр сар_Арван хоёрдугаар сар".split("_"),monthsShort:"1 сар_2 сар_3 сар_4 сар_5 сар_6 сар_7 сар_8 сар_9 сар_10 сар_11 сар_12 сар".split("_"),monthsParseExact:!0,weekdays:"Ням_Даваа_Мягмар_Лхагва_Пүрэв_Баасан_Бямба".split("_"),weekdaysShort:"Ням_Дав_Мяг_Лха_Пүр_Баа_Бям".split("_"),weekdaysMin:"Ня_Да_Мя_Лх_Пү_Ба_Бя".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY-MM-DD",LL:"YYYY оны MMMMын D",LLL:"YYYY оны MMMMын D HH:mm",LLLL:"dddd, YYYY оны MMMMын D HH:mm"},meridiemParse:/ҮӨ|ҮХ/i,isPM:function(e){return"ҮХ"===e},meridiem:function(e,t,n){return e<12?"ҮӨ":"ҮХ"},calendar:{sameDay:"[Өнөөдөр] LT",nextDay:"[Маргааш] LT",nextWeek:"[Ирэх] dddd LT",lastDay:"[Өчигдөр] LT",lastWeek:"[Өнгөрсөн] dddd LT",sameElse:"L"},relativeTime:{future:"%s дараа",past:"%s өмнө",s:t,ss:t,m:t,mm:t,h:t,hh:t,d:t,dd:t,M:t,MM:t,y:t,yy:t},dayOfMonthOrdinalParse:/\d{1,2} өдөр/,ordinal:function(e,t){switch(t){case"d":case"D":case"DDD":return e+" өдөр";default:return e}}});return n}))},9609:function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
  243. //! moment.js locale configuration
  244. var t={0:"-чү",1:"-чи",2:"-чи",3:"-чү",4:"-чү",5:"-чи",6:"-чы",7:"-чи",8:"-чи",9:"-чу",10:"-чу",20:"-чы",30:"-чу",40:"-чы",50:"-чү",60:"-чы",70:"-чи",80:"-чи",90:"-чу",100:"-чү"},n=e.defineLocale("ky",{months:"январь_февраль_март_апрель_май_июнь_июль_август_сентябрь_октябрь_ноябрь_декабрь".split("_"),monthsShort:"янв_фев_март_апр_май_июнь_июль_авг_сен_окт_ноя_дек".split("_"),weekdays:"Жекшемби_Дүйшөмбү_Шейшемби_Шаршемби_Бейшемби_Жума_Ишемби".split("_"),weekdaysShort:"Жек_Дүй_Шей_Шар_Бей_Жум_Ише".split("_"),weekdaysMin:"Жк_Дй_Шй_Шр_Бй_Жм_Иш".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Бүгүн саат] LT",nextDay:"[Эртең саат] LT",nextWeek:"dddd [саат] LT",lastDay:"[Кечээ саат] LT",lastWeek:"[Өткөн аптанын] dddd [күнү] [саат] LT",sameElse:"L"},relativeTime:{future:"%s ичинде",past:"%s мурун",s:"бирнече секунд",ss:"%d секунд",m:"бир мүнөт",mm:"%d мүнөт",h:"бир саат",hh:"%d саат",d:"бир күн",dd:"%d күн",M:"бир ай",MM:"%d ай",y:"бир жыл",yy:"%d жыл"},dayOfMonthOrdinalParse:/\d{1,2}-(чи|чы|чү|чу)/,ordinal:function(e){var n=e%10,r=e>=100?100:null;return e+(t[e]||t[n]||t[r])},week:{dow:1,doy:7}});return n}))},9686:function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
  245. //! moment.js locale configuration
  246. var t={1:"১",2:"২",3:"৩",4:"৪",5:"৫",6:"৬",7:"৭",8:"৮",9:"৯",0:"০"},n={"১":"1","২":"2","৩":"3","৪":"4","৫":"5","৬":"6","৭":"7","৮":"8","৯":"9","০":"0"},r=e.defineLocale("bn-bd",{months:"জানুয়ারি_ফেব্রুয়ারি_মার্চ_এপ্রিল_মে_জুন_জুলাই_আগস্ট_সেপ্টেম্বর_অক্টোবর_নভেম্বর_ডিসেম্বর".split("_"),monthsShort:"জানু_ফেব্রু_মার্চ_এপ্রিল_মে_জুন_জুলাই_আগস্ট_সেপ্ট_অক্টো_নভে_ডিসে".split("_"),weekdays:"রবিবার_সোমবার_মঙ্গলবার_বুধবার_বৃহস্পতিবার_শুক্রবার_শনিবার".split("_"),weekdaysShort:"রবি_সোম_মঙ্গল_বুধ_বৃহস্পতি_শুক্র_শনি".split("_"),weekdaysMin:"রবি_সোম_মঙ্গল_বুধ_বৃহ_শুক্র_শনি".split("_"),longDateFormat:{LT:"A h:mm সময়",LTS:"A h:mm:ss সময়",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm সময়",LLLL:"dddd, D MMMM YYYY, A h:mm সময়"},calendar:{sameDay:"[আজ] LT",nextDay:"[আগামীকাল] LT",nextWeek:"dddd, LT",lastDay:"[গতকাল] LT",lastWeek:"[গত] dddd, LT",sameElse:"L"},relativeTime:{future:"%s পরে",past:"%s আগে",s:"কয়েক সেকেন্ড",ss:"%d সেকেন্ড",m:"এক মিনিট",mm:"%d মিনিট",h:"এক ঘন্টা",hh:"%d ঘন্টা",d:"এক দিন",dd:"%d দিন",M:"এক মাস",MM:"%d মাস",y:"এক বছর",yy:"%d বছর"},preparse:function(e){return e.replace(/[১২৩৪৫৬৭৮৯০]/g,(function(e){return n[e]}))},postformat:function(e){return e.replace(/\d/g,(function(e){return t[e]}))},meridiemParse:/রাত|ভোর|সকাল|দুপুর|বিকাল|সন্ধ্যা|রাত/,meridiemHour:function(e,t){return 12===e&&(e=0),"রাত"===t?e<4?e:e+12:"ভোর"===t||"সকাল"===t?e:"দুপুর"===t?e>=3?e:e+12:"বিকাল"===t||"সন্ধ্যা"===t?e+12:void 0},meridiem:function(e,t,n){return e<4?"রাত":e<6?"ভোর":e<12?"সকাল":e<15?"দুপুর":e<18?"বিকাল":e<20?"সন্ধ্যা":"রাত"},week:{dow:0,doy:6}});return r}))},"96c7":function(e,t,n){"use strict";n.d(t,"a",(function(){return r})),n.d(t,"b",(function(){return i}));var r=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"com-empty"})},i=[]},"972c":function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
  247. //! moment.js locale configuration
  248. function t(e,t,n){var r={ss:"secunde",mm:"minute",hh:"ore",dd:"zile",ww:"săptămâni",MM:"luni",yy:"ani"},i=" ";return(e%100>=20||e>=100&&e%100===0)&&(i=" de "),e+i+r[n]}var n=e.defineLocale("ro",{months:"ianuarie_februarie_martie_aprilie_mai_iunie_iulie_august_septembrie_octombrie_noiembrie_decembrie".split("_"),monthsShort:"ian._feb._mart._apr._mai_iun._iul._aug._sept._oct._nov._dec.".split("_"),monthsParseExact:!0,weekdays:"duminică_luni_marți_miercuri_joi_vineri_sâmbătă".split("_"),weekdaysShort:"Dum_Lun_Mar_Mie_Joi_Vin_Sâm".split("_"),weekdaysMin:"Du_Lu_Ma_Mi_Jo_Vi_Sâ".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY H:mm",LLLL:"dddd, D MMMM YYYY H:mm"},calendar:{sameDay:"[azi la] LT",nextDay:"[mâine la] LT",nextWeek:"dddd [la] LT",lastDay:"[ieri la] LT",lastWeek:"[fosta] dddd [la] LT",sameElse:"L"},relativeTime:{future:"peste %s",past:"%s în urmă",s:"câteva secunde",ss:t,m:"un minut",mm:t,h:"o oră",hh:t,d:"o zi",dd:t,w:"o săptămână",ww:t,M:"o lună",MM:t,y:"un an",yy:t},week:{dow:1,doy:7}});return n}))},9797:function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
  249. //! moment.js locale configuration
  250. var t=e.defineLocale("cy",{months:"Ionawr_Chwefror_Mawrth_Ebrill_Mai_Mehefin_Gorffennaf_Awst_Medi_Hydref_Tachwedd_Rhagfyr".split("_"),monthsShort:"Ion_Chwe_Maw_Ebr_Mai_Meh_Gor_Aws_Med_Hyd_Tach_Rhag".split("_"),weekdays:"Dydd Sul_Dydd Llun_Dydd Mawrth_Dydd Mercher_Dydd Iau_Dydd Gwener_Dydd Sadwrn".split("_"),weekdaysShort:"Sul_Llun_Maw_Mer_Iau_Gwe_Sad".split("_"),weekdaysMin:"Su_Ll_Ma_Me_Ia_Gw_Sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Heddiw am] LT",nextDay:"[Yfory am] LT",nextWeek:"dddd [am] LT",lastDay:"[Ddoe am] LT",lastWeek:"dddd [diwethaf am] LT",sameElse:"L"},relativeTime:{future:"mewn %s",past:"%s yn ôl",s:"ychydig eiliadau",ss:"%d eiliad",m:"munud",mm:"%d munud",h:"awr",hh:"%d awr",d:"diwrnod",dd:"%d diwrnod",M:"mis",MM:"%d mis",y:"blwyddyn",yy:"%d flynedd"},dayOfMonthOrdinalParse:/\d{1,2}(fed|ain|af|il|ydd|ed|eg)/,ordinal:function(e){var t=e,n="",r=["","af","il","ydd","ydd","ed","ed","ed","fed","fed","fed","eg","fed","eg","eg","fed","eg","eg","fed","eg","fed"];return t>20?n=40===t||50===t||60===t||80===t||100===t?"fed":"ain":t>0&&(n=r[t]),e+n},week:{dow:1,doy:4}});return t}))},"97b9":function(e,t,n){"use strict";n.r(t),n.d(t,"isFunction",(function(){return s})),n.d(t,"throttle",(function(){return o})),n.d(t,"throttleAfterHits",(function(){return a})),n.d(t,"debounce",(function(){return l})),n.d(t,"pipe",(function(){return c})),n.d(t,"partial",(function(){return u})),n.d(t,"curry",(function(){return h})),n.d(t,"curryRight",(function(){return d})),n.d(t,"fastCall",(function(){return m}));var r=n("81ea"),i=n("7b9c");function s(e){return"function"===typeof e}function o(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:200,n=0;const r={lastCallThrottled:!0};let i=null;function s(){for(var s=arguments.length,o=new Array(s),a=0;a<s;a++)o[a]=arguments[a];const l=Date.now();let c=!1;r.lastCallThrottled=!0,n||(n=l,c=!0);const u=t-(l-n);return c?(r.lastCallThrottled=!1,e.apply(this,o)):(i&&clearTimeout(i),i=setTimeout(()=>{r.lastCallThrottled=!1,e.apply(this,o),n=0,i=void 0},u)),r}return s}function a(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:200,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:10;const r=o(e,t);let i=n;function s(){i=n}function a(){for(var t=arguments.length,n=new Array(t),s=0;s<t;s++)n[s]=arguments[s];return i?(i-=1,e.apply(this,n)):r.apply(this,n)}return a.clearHits=s,a}function l(e){let t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:200,r=null;function i(){for(var i=arguments.length,s=new Array(i),o=0;o<i;o++)s[o]=arguments[o];return r&&clearTimeout(r),r=setTimeout(()=>{t=e.apply(this,s)},n),t}return i}function c(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];const[i,...s]=t;return function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Object(r["arrayReduce"])(s,(e,t)=>t(e),i.apply(this,t))}}function u(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return function(){for(var t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];return e.apply(this,n.concat(r))}}function h(e){const t=e.length;function n(r){return function(){for(var i=arguments.length,s=new Array(i),o=0;o<i;o++)s[o]=arguments[o];const a=r.concat(s);let l;return l=a.length>=t?e.apply(this,a):n(a),l}}return n([])}function d(e){const t=e.length;function n(r){return function(){for(var i=arguments.length,s=new Array(i),o=0;o<i;o++)s[o]=arguments[o];const a=r.concat(s.reverse());let l;return l=a.length>=t?e.apply(this,a):n(a),l}}return n([])}function m(e,t,n,r,s,o,a,l){return Object(i["isDefined"])(l)?e.call(t,n,r,s,o,a,l):Object(i["isDefined"])(a)?e.call(t,n,r,s,o,a):Object(i["isDefined"])(o)?e.call(t,n,r,s,o):Object(i["isDefined"])(s)?e.call(t,n,r,s):Object(i["isDefined"])(r)?e.call(t,n,r):Object(i["isDefined"])(n)?e.call(t,n):e.call(t)}},9961:function(e,t,n){"use strict";var r=n("dc19"),i=n("cb27"),s=n("83b9e"),o=n("7f65"),a=n("5388"),l=i.add,c=i.has,u=i.remove;e.exports=function(e){var t=r(this),n=o(e).getIterator(),i=s(t);return a(n,(function(e){c(t,e)?u(i,e):l(i,e)})),i}},"9acd":function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));const r=new Map;function i(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"common";r.has(e)||r.set(e,new Map);const t=r.get(e);function n(e,n){t.set(e,n)}function i(e){return t.get(e)}function s(e){return t.has(e)}function o(){return[...t.keys()]}function a(){return[...t.values()]}return{register:n,getItem:i,hasItem:s,getNames:o,getValues:a}}},"9f10":function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var r=n("1096"),i=n("e90f");class s extends r["a"]{insert(e,t){this.indexedValues=Object(i["a"])(this.indexedValues,e,t,this.initValueOrFn),super.insert(e,t)}remove(e){this.indexedValues=Object(i["b"])(this.indexedValues,e),super.remove(e)}}},"9f26":function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
  251. //! moment.js locale configuration
  252. var t=/^(janvier|février|mars|avril|mai|juin|juillet|août|septembre|octobre|novembre|décembre)/i,n=/(janv\.?|févr\.?|mars|avr\.?|mai|juin|juil\.?|août|sept\.?|oct\.?|nov\.?|déc\.?)/i,r=/(janv\.?|févr\.?|mars|avr\.?|mai|juin|juil\.?|août|sept\.?|oct\.?|nov\.?|déc\.?|janvier|février|mars|avril|mai|juin|juillet|août|septembre|octobre|novembre|décembre)/i,i=[/^janv/i,/^févr/i,/^mars/i,/^avr/i,/^mai/i,/^juin/i,/^juil/i,/^août/i,/^sept/i,/^oct/i,/^nov/i,/^déc/i],s=e.defineLocale("fr",{months:"janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre".split("_"),monthsShort:"janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.".split("_"),monthsRegex:r,monthsShortRegex:r,monthsStrictRegex:t,monthsShortStrictRegex:n,monthsParse:i,longMonthsParse:i,shortMonthsParse:i,weekdays:"dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi".split("_"),weekdaysShort:"dim._lun._mar._mer._jeu._ven._sam.".split("_"),weekdaysMin:"di_lu_ma_me_je_ve_sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[Aujourd’hui à] LT",nextDay:"[Demain à] LT",nextWeek:"dddd [à] LT",lastDay:"[Hier à] LT",lastWeek:"dddd [dernier à] LT",sameElse:"L"},relativeTime:{future:"dans %s",past:"il y a %s",s:"quelques secondes",ss:"%d secondes",m:"une minute",mm:"%d minutes",h:"une heure",hh:"%d heures",d:"un jour",dd:"%d jours",w:"une semaine",ww:"%d semaines",M:"un mois",MM:"%d mois",y:"un an",yy:"%d ans"},dayOfMonthOrdinalParse:/\d{1,2}(er|)/,ordinal:function(e,t){switch(t){case"D":return e+(1===e?"er":"");default:case"M":case"Q":case"DDD":case"d":return e+(1===e?"er":"e");case"w":case"W":return e+(1===e?"re":"e")}},week:{dow:1,doy:4}});return s}))},"9fdb":function(e,t,n){"use strict";n.r(t);var r=function(){var e=this,t=e.$createElement,n=e._self._c||t;return null!=e.com?n("div",{staticClass:"template-table"},[n("div",{staticClass:"table"},[n("hot-table",{ref:"hotTable",staticStyle:{width:"100%"},attrs:{settings:e.settings,licenseKey:"non-commercial-and-evaluation"}})],1)]):e._e()},i=[],s=n("ade3"),o=(n("4de4"),n("14d9"),n("a9e3"),n("d3b7"),n("ac1f"),n("5319"),n("0643"),n("2382"),n("e437"),n("c24d")),a=n("8c7e"),l=n("cc6f");n("8033"),n("c1cf"),l["a"].buildEmpty({licenseKey:"internal-use-in-handsontable",precisionRounding:10,nullDate:{year:1900,month:1,day:1}});var c={name:"table",components:{HotTable:o["a"]},emits:["onUploadAttr","onUploadItemIndex"],props:{isActive:{type:Boolean,default:!1},currentIndex:{type:Number,default:0},com:{type:Object,default:null},insertCmd:{type:Object,default:null}},watch:{com:{handler:function(e){if(null!=e&&void 0!=e){var t=this;console.log("watch com",e),t.initSetting()}},immediate:!0,deep:!0},isActive:{handler:function(e){void 0==e&&null!=e||(this.settings.readOnly=!e,this.settings.colHeaders=e,this.settings.rowHeaders=e)},immediate:!0,deep:!0},insertCmd:{handler:function(e){null!=e&&this.isActive&&console.log("insertCmd table val",e)},immediate:!0,deep:!0}},data:function(){return{cellStyle:[],settings:{language:"zh-CN",startRows:5,startCols:3},currentFocus:{row:0,col:0}}},created:function(){},methods:{onExport:function(e){var t=this.$refs.hotTable.hotInstance.getPlugin("exportFile"),n=t.exportAsString("csv",{filename:"MyFile"});console.log("str",n)},initSetting:function(){var e,t=this,n=this;n.settings=(e={language:"zh-CN",startRows:1,startCols:6,height:"auto",stretchH:"all",customBorders:!0,licenseKey:"non-commercial-and-evaluation",comments:!0,mergeCells:!0,allowRemoveColumn:!0,allowRemoveRow:!0,copyPaste:{columnsLimit:25,rowsLimit:50,pasteMode:"shift_down",uiContainer:document.body},cell:n.cellStyle,contextMenu:{callback:function(e,t,r){if(console.log("callback",e,t,r),void 0==n.cellStyle&&(n.cellStyle=[]),"importExcel"!=e)if("clearColor"!=e){if(e.length>=8){if("bgColor"==e.substr(0,7)){var i=e.replace("bgColor:",""),s="whiteBg";switch(i){case"red":s="redBg";break;case"gray":s="grayBg";break}for(u=t[0].start.col;u<=t[0].end.col;u++)for(h=t[0].start.row;h<=t[0].end.row;h++){var o=n.cellStyle.filter((function(e){return e.col==u&&e.row==h}));o.length>0?o[0].className.indexOf(s)<0&&(o[0].className+=" "+s):n.cellStyle.push({col:u,row:h,className:s})}return}if("fontColor"==e.substr(0,9)){var a=e.replace("fontColor:",""),l="blackFont";switch(a){case"white":l="whiteFont";break;case"black":l="blackFont";break}void 0==n.cellStyle&&(n.cellStyle=[]);for(u=t[0].start.col;u<=t[0].end.col;u++)for(h=t[0].start.row;h<=t[0].end.row;h++){var c=n.cellStyle.filter((function(e){return e.col==u&&e.row==h}));c.length>0?c[0].className.indexOf(l)<0&&(c[0].className+=" "+l):n.cellStyle.push({col:u,row:h,className:l})}return}}}else{for(var u=t[0].start.col;u<=t[0].end.col;u++)for(var h=t[0].start.row;h<=t[0].end.row;h++)n.cellStyle=n.cellStyle.filter((function(e){return e.col!=u&&e.row!=h}));n.initSetting()}},items:{row_above:{name:"上方插入行",disabled:function(){return 0===this.getSelectedLast()[0]}},row_below:{name:"下方插入行"},col_left:{name:"左侧插入列"},col_right:{name:"右侧插入列"},remove_row:{name:"删除行"},remove_col:{name:"删除列"},sp1:"---------",mergeCells:{name:"合并单元格"},alignment:{name:"对齐"},borders:{name:"边框"},sp2:"---------",importExcel:{name:"导入Excel",key:"importExcel"},sp3:"---------",clearColor:{name:"清除样式",key:"clearColor"},bgColor:{name:"背景颜色",submenu:{items:[{key:"bgColor:red",name:"红色"},{key:"bgColor:gray",name:"灰色"}]}},fontColor:{name:"文字颜色",submenu:{items:[{key:"fontColor:white",name:"白色"},{key:"fontColor:black",name:"黑色"}]}}}},colHeaders:!0,rowHeaders:!0,width:"100%"},Object(s["a"])(Object(s["a"])(Object(s["a"])(Object(s["a"])(Object(s["a"])(Object(s["a"])(Object(s["a"])(Object(s["a"])(Object(s["a"])(Object(s["a"])(e,"height","auto"),"colWidths","auto"),"allowHtml",!0),"filters",!0),"manualRowResize",!0),"manualColumnResize",!0),"manualRowMove",!0),"manualColumnMove",!0),"formulas",{engine:l["a"]}),"tableClassName","tb-class"),Object(s["a"])(e,"afterOnCellMouseDown",(function(e,n,r){t.currentFocus=n}))),Object(a["a"])()}}},u=c,h=(n("bf7d"),n("2877")),d=Object(h["a"])(u,r,i,!1,null,null,null);t["default"]=d.exports},a309:function(e,t,n){"use strict";n.d(t,"a",(function(){return r})),n.d(t,"g",(function(){return i})),n.d(t,"b",(function(){return s})),n.d(t,"f",(function(){return o})),n.d(t,"e",(function(){return a})),n.d(t,"h",(function(){return l})),n.d(t,"c",(function(){return c})),n.d(t,"d",(function(){return u}));const r="active-header",i="header",s="area",o="focus",a="fill",l="row",c="column",u="custom-selection"},a356:function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
  253. //! moment.js locale configuration
  254. var t=function(e){return 0===e?0:1===e?1:2===e?2:e%100>=3&&e%100<=10?3:e%100>=11?4:5},n={s:["أقل من ثانية","ثانية واحدة",["ثانيتان","ثانيتين"],"%d ثوان","%d ثانية","%d ثانية"],m:["أقل من دقيقة","دقيقة واحدة",["دقيقتان","دقيقتين"],"%d دقائق","%d دقيقة","%d دقيقة"],h:["أقل من ساعة","ساعة واحدة",["ساعتان","ساعتين"],"%d ساعات","%d ساعة","%d ساعة"],d:["أقل من يوم","يوم واحد",["يومان","يومين"],"%d أيام","%d يومًا","%d يوم"],M:["أقل من شهر","شهر واحد",["شهران","شهرين"],"%d أشهر","%d شهرا","%d شهر"],y:["أقل من عام","عام واحد",["عامان","عامين"],"%d أعوام","%d عامًا","%d عام"]},r=function(e){return function(r,i,s,o){var a=t(r),l=n[e][t(r)];return 2===a&&(l=l[i?0:1]),l.replace(/%d/i,r)}},i=["جانفي","فيفري","مارس","أفريل","ماي","جوان","جويلية","أوت","سبتمبر","أكتوبر","نوفمبر","ديسمبر"],s=e.defineLocale("ar-dz",{months:i,monthsShort:i,weekdays:"الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت".split("_"),weekdaysShort:"أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت".split("_"),weekdaysMin:"ح_ن_ث_ر_خ_ج_س".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"D/‏M/‏YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},meridiemParse:/ص|م/,isPM:function(e){return"م"===e},meridiem:function(e,t,n){return e<12?"ص":"م"},calendar:{sameDay:"[اليوم عند الساعة] LT",nextDay:"[غدًا عند الساعة] LT",nextWeek:"dddd [عند الساعة] LT",lastDay:"[أمس عند الساعة] LT",lastWeek:"dddd [عند الساعة] LT",sameElse:"L"},relativeTime:{future:"بعد %s",past:"منذ %s",s:r("s"),ss:r("s"),m:r("m"),mm:r("m"),h:r("h"),hh:r("h"),d:r("d"),dd:r("d"),M:r("M"),MM:r("M"),y:r("y"),yy:r("y")},postformat:function(e){return e.replace(/,/g,"،")},week:{dow:0,doy:4}});return s}))},a357:function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));n("14d9");var r=n("5d7f"),i=n("8828");const s="base";function o(e,t,n,s,o,a,l){const c=l.ariaTags,u=[],h=[],d=[],m=[];l.className&&Object(r["addClass"])(t,l.className),l.readOnly?(u.push(l.readOnlyCellClassName),c&&m.push(Object(i["z"])())):c&&d.push(Object(i["z"])()[0]),!1===l.valid&&l.invalidCellClassName?(u.push(l.invalidCellClassName),c&&m.push(Object(i["o"])())):(h.push(l.invalidCellClassName),c&&d.push(Object(i["o"])()[0])),!1===l.wordWrap&&l.noWordWrapClassName&&u.push(l.noWordWrapClassName),!a&&l.placeholder&&u.push(l.placeholderCellClassName),Object(r["removeClass"])(t,h),Object(r["addClass"])(t,u),Object(r["removeAttribute"])(t,d),Object(r["setAttribute"])(t,m)}o.RENDERER_TYPE=s},a4e7:function(e,t,n){"use strict";var r=n("23e7"),i=n("395e"),s=n("dad2");r({target:"Set",proto:!0,real:!0,forced:!s("isSupersetOf")},{isSupersetOf:i})},a5f7:function(e,t,n){"use strict";var r=n("dc19"),i=n("cb27"),s=n("83b9e"),o=n("8e16"),a=n("7f65"),l=n("384f"),c=n("5388"),u=i.has,h=i.remove;e.exports=function(e){var t=r(this),n=a(e),i=s(t);return o(t)<=n.size?l(t,(function(e){n.includes(e)&&h(i,e)})):c(n.getIterator(),(function(e){u(t,e)&&h(i,e)})),i}},a73f:function(e,t,n){"use strict";n.d(t,"a",(function(){return i})),n.d(t,"b",(function(){return s}));var r=n("81ea");function i(e,t){return Object(r["arrayMap"])(e,e=>e-t.filter(t=>t<e).length)}function s(e,t){const n=t[0],i=t.length;return Object(r["arrayMap"])(e,e=>e>=n?e+i:e)}},a776:function(e,t,n){"use strict";n.r(t),n.d(t,"instanceToHTML",(function(){return a})),n.d(t,"_dataToHTML",(function(){return l})),n.d(t,"htmlToGridSettings",(function(){return c}));n("14d9"),n("5b81");var r=n("7b9c");const i={"&nbsp;":" ","&amp;":"&","&lt;":"<","&gt;":">"},s=new RegExp(Object.keys(i).map(e=>`(${e})`).join("|"),"gi");function o(e){return"TABLE"===(e&&e.nodeName||"")}function a(e){const t=e.hasColHeaders(),n=e.hasRowHeaders(),i=[t?-1:0,n?-1:0,e.countRows()-1,e.countCols()-1],s=e.getData(...i),o=s.length,a=o>0?s[0].length:0,l=["<table>","</table>"],c=t?["<thead>","</thead>"]:[],u=["<tbody>","</tbody>"],h=n?1:0,d=t?1:0;for(let m=0;m<o;m+=1){const i=t&&0===m,o=[];for(let t=0;t<a;t+=1){const a=!i&&n&&0===t;let l="";if(i)l=`<th>${e.getColHeader(t-h)}</th>`;else if(a)l=`<th>${e.getRowHeader(m-d)}</th>`;else{const n=s[m][t],{hidden:i,rowspan:o,colspan:a}=e.getCellMeta(m-d,t-h);if(!i){const e=[];if(o&&e.push(`rowspan="${o}"`),a&&e.push(`colspan="${a}"`),Object(r["isEmpty"])(n))l=`<td ${e.join(" ")}></td>`;else{const t=n.toString().replace("<","&lt;").replace(">","&gt;").replace(/(<br(\s*|\/)>(\r\n|\n)?|\r\n|\n)/g,"<br>\r\n").replace(/\x20/gi,"&nbsp;").replace(/\t/gi,"&#9;");l=`<td ${e.join(" ")}>${t}</td>`}}}o.push(l)}const l=["<tr>",...o,"</tr>"].join("");i?c.splice(1,0,l):u.splice(-1,0,l)}return l.splice(1,0,c.join(""),u.join("")),l.join("")}function l(e){const t=e.length,n=["<table>"];for(let i=0;i<t;i+=1){const s=e[i],o=s.length,a=[];0===i&&n.push("<tbody>");for(let e=0;e<o;e+=1){const t=s[e],n=Object(r["isEmpty"])(t)?"":t.toString().replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/(<br(\s*|\/)>(\r\n|\n)?|\r\n|\n)/g,"<br>\r\n").replace(/\x20{2,}/gi,e=>`<span style="mso-spacerun: yes">${"&nbsp;".repeat(e.length-1)} </span>`).replace(/\t/gi,"&#9;");a.push(`<td>${n}</td>`)}n.push("<tr>",...a,"</tr>"),i+1===t&&n.push("</tbody>")}return n.push("</table>"),n.join("")}function c(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:document;const n={},r=t.createDocumentFragment(),a=t.createElement("div");r.appendChild(a);let l=e;if("string"===typeof l){const e=l.replace(/<td\b[^>]*?>([\s\S]*?)<\/\s*td>/g,e=>{const t=e.match(/<td\b[^>]*?>/g)[0],n=/<p.*?>/g,r=e.substring(t.length,e.lastIndexOf("<")).trim().replaceAll(/\n\s+/g," ").replaceAll(n,"\n").replace("\n","").replaceAll(/<\/(.*)>\s+$/gm,"</$1>").replace(/(<(?!br)([^>]+)>)/gi,"").replaceAll(/^&nbsp;$/gm,""),i="</td>";return`${t}${r}${i}`});a.insertAdjacentHTML("afterbegin",""+e),l=a.querySelector("table")}if(!l||!o(l))return;const c=a.querySelector('meta[name$="enerator"]'),u=null!==l.querySelector("tbody th"),h=l.querySelector("tr"),d=h?Array.from(h.cells).reduce((e,t)=>e+t.colSpan,0)-(u?1:0):0,m=l.tFoot&&Array.from(l.tFoot.rows)||[],g=[];let p=!1,f=0,R=0;if(l.tHead){const e=Array.from(l.tHead.rows).filter(e=>{const t=null!==e.querySelector("td");return t&&g.push(e),!t});f=e.length,p=f>0,f>1?n.nestedHeaders=Array.from(e).reduce((e,t)=>{const n=Array.from(t.cells).reduce((e,t,n)=>{if(u&&0===n)return e;const{colSpan:r,innerHTML:i}=t,s=r>1?{label:i,colspan:r}:i;return e.push(s),e},[]);return e.push(n),e},[]):p&&(n.colHeaders=Array.from(e[0].children).reduce((e,t,n)=>(u&&0===n||e.push(t.innerHTML),e),[]))}g.length&&(n.fixedRowsTop=g.length),m.length&&(n.fixedRowsBottom=m.length);const y=[...g,...Array.from(l.tBodies).reduce((e,t)=>(e.push(...Array.from(t.rows)),e),[]),...m];R=y.length;const M=new Array(R);for(let i=0;i<R;i++)M[i]=new Array(d);const S=[],b=[];for(let o=0;o<R;o++){const e=y[o],t=Array.from(e.cells),n=t.length;for(let r=0;r<n;r++){const e=t[r],{nodeName:n,innerHTML:a,rowSpan:l,colSpan:u}=e,h=M[o].findIndex(e=>void 0===e);if("TD"===n){if(l>1||u>1){for(let e=o;e<o+l;e++)if(e<R)for(let t=h;t<h+u;t++)M[e][t]=null;const t=e.getAttribute("style"),n=t&&t.includes("mso-ignore:colspan");n||S.push({col:h,row:o,rowspan:l,colspan:u})}let t="";t=c&&/excel/gi.test(c.content)?a.replace(/[\r\n][\x20]{0,2}/g," ").replace(/<br(\s*|\/)>[\r\n]?[\x20]{0,3}/gim,"\r\n"):a.replace(/<br(\s*|\/)>[\r\n]?/gim,"\r\n"),M[o][h]=t.replace(s,e=>i[e])}else b.push(a)}}return S.length&&(n.mergeCells=S),b.length&&(n.rowHeaders=b),M.length&&(n.data=M),n}},a7fa:function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
  255. //! moment.js locale configuration
  256. var t=e.defineLocale("bm",{months:"Zanwuyekalo_Fewuruyekalo_Marisikalo_Awirilikalo_Mɛkalo_Zuwɛnkalo_Zuluyekalo_Utikalo_Sɛtanburukalo_ɔkutɔburukalo_Nowanburukalo_Desanburukalo".split("_"),monthsShort:"Zan_Few_Mar_Awi_Mɛ_Zuw_Zul_Uti_Sɛt_ɔku_Now_Des".split("_"),weekdays:"Kari_Ntɛnɛn_Tarata_Araba_Alamisa_Juma_Sibiri".split("_"),weekdaysShort:"Kar_Ntɛ_Tar_Ara_Ala_Jum_Sib".split("_"),weekdaysMin:"Ka_Nt_Ta_Ar_Al_Ju_Si".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"MMMM [tile] D [san] YYYY",LLL:"MMMM [tile] D [san] YYYY [lɛrɛ] HH:mm",LLLL:"dddd MMMM [tile] D [san] YYYY [lɛrɛ] HH:mm"},calendar:{sameDay:"[Bi lɛrɛ] LT",nextDay:"[Sini lɛrɛ] LT",nextWeek:"dddd [don lɛrɛ] LT",lastDay:"[Kunu lɛrɛ] LT",lastWeek:"dddd [tɛmɛnen lɛrɛ] LT",sameElse:"L"},relativeTime:{future:"%s kɔnɔ",past:"a bɛ %s bɔ",s:"sanga dama dama",ss:"sekondi %d",m:"miniti kelen",mm:"miniti %d",h:"lɛrɛ kelen",hh:"lɛrɛ %d",d:"tile kelen",dd:"tile %d",M:"kalo kelen",MM:"kalo %d",y:"san kelen",yy:"san %d"},week:{dow:1,doy:4}});return t}))},a952:function(e,t,n){"use strict";n.d(t,"b",(function(){return o})),n.d(t,"a",(function(){return a})),n.d(t,"c",(function(){return g})),n.d(t,"d",(function(){return p})),n.d(t,"e",(function(){return f})),n.d(t,"f",(function(){return R}));n("d9e2"),n("14d9"),n("1e70"),n("79a4"),n("c1a1"),n("8b00"),n("a4e7"),n("1e5a"),n("72c3");var r=n("d852"),i=n("81ea"),s=n("7b9c");const o=0,a=1,l=2,c=3,u=[c,l],h=[["number"],["number","string"],["number","undefined"],["number","string","undefined"]],d=Symbol("root"),m=Symbol("child");function g(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:d;if(t!==d&&t!==m)throw new Error("The second argument is used internally only and cannot be overwritten.");const n=Array.isArray(e),i=t===d;let s=o;if(n){const t=e[0];if(0===e.length)s=a;else if(i&&t instanceof r["a"])s=c;else if(i&&Array.isArray(t))s=g(t,m);else if(e.length>=2&&e.length<=4){const t=!e.some((e,t)=>!h[t].includes(typeof e));t&&(s=l)}}return s}function p(e){let{createCellCoords:t,createCellRange:n,keepDirection:r=!1,propToCol:i}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!u.includes(e))throw new Error("Unsupported selection ranges schema type was provided.");return function(o){const a=e===c;let l=a?o.from.row:o[0],u=a?o.from.col:o[1],h=a?o.to.row:o[2],d=a?o.to.col:o[3];if("function"===typeof i&&("string"===typeof u&&(u=i(u)),"string"===typeof d&&(d=i(d))),Object(s["isUndefined"])(h)&&(h=l),Object(s["isUndefined"])(d)&&(d=u),!r){const e=l,t=u,n=h,r=d;l=Math.min(e,n),u=Math.min(t,r),h=Math.max(e,n),d=Math.max(t,r)}const m=t(l,u),g=t(h,d);return n(m,m,g)}}function f(e){const t=g(e.getSelected());if(t===o||t===a)return[];const n=p(t,{createCellCoords:e._createCellCoords.bind(e),createCellRange:e._createCellRange.bind(e)}),r=new Set;Object(i["arrayEach"])(e.getSelected(),e=>{const{from:t,to:s}=n(e),o=Math.max(t.col,0),a=s.col-o+1;Object(i["arrayEach"])(Array.from(new Array(a),(e,t)=>o+t),e=>{r.has(e)||r.add(e)})});const s=Array.from(r).sort((e,t)=>e-t),l=Object(i["arrayReduce"])(s,(e,t,n,r)=>(0!==n&&t===r[n-1]+1?e[e.length-1][1]+=1:e.push([t,1]),e),[]);return l}function R(e){const t=g(e.getSelected());if(t===o||t===a)return[];const n=p(t,{createCellCoords:e._createCellCoords.bind(e),createCellRange:e._createCellRange.bind(e)}),r=new Set;Object(i["arrayEach"])(e.getSelected(),e=>{const{from:t,to:s}=n(e),o=Math.max(t.row,0),a=s.row-o+1;Object(i["arrayEach"])(Array.from(new Array(a),(e,t)=>o+t),e=>{r.has(e)||r.add(e)})});const s=Array.from(r).sort((e,t)=>e-t),l=Object(i["arrayReduce"])(s,(e,t,n,r)=>(0!==n&&t===r[n-1]+1?e[e.length-1][1]+=1:e.push([t,1]),e),[]);return l}},aaf2:function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
  257. //! moment.js locale configuration
  258. function t(e,t,n,r){var i={s:["थोडया सॅकंडांनी","थोडे सॅकंड"],ss:[e+" सॅकंडांनी",e+" सॅकंड"],m:["एका मिणटान","एक मिनूट"],mm:[e+" मिणटांनी",e+" मिणटां"],h:["एका वरान","एक वर"],hh:[e+" वरांनी",e+" वरां"],d:["एका दिसान","एक दीस"],dd:[e+" दिसांनी",e+" दीस"],M:["एका म्हयन्यान","एक म्हयनो"],MM:[e+" म्हयन्यानी",e+" म्हयने"],y:["एका वर्सान","एक वर्स"],yy:[e+" वर्सांनी",e+" वर्सां"]};return r?i[n][0]:i[n][1]}var n=e.defineLocale("gom-deva",{months:{standalone:"जानेवारी_फेब्रुवारी_मार्च_एप्रील_मे_जून_जुलय_ऑगस्ट_सप्टेंबर_ऑक्टोबर_नोव्हेंबर_डिसेंबर".split("_"),format:"जानेवारीच्या_फेब्रुवारीच्या_मार्चाच्या_एप्रीलाच्या_मेयाच्या_जूनाच्या_जुलयाच्या_ऑगस्टाच्या_सप्टेंबराच्या_ऑक्टोबराच्या_नोव्हेंबराच्या_डिसेंबराच्या".split("_"),isFormat:/MMMM(\s)+D[oD]?/},monthsShort:"जाने._फेब्रु._मार्च_एप्री._मे_जून_जुल._ऑग._सप्टें._ऑक्टो._नोव्हें._डिसें.".split("_"),monthsParseExact:!0,weekdays:"आयतार_सोमार_मंगळार_बुधवार_बिरेस्तार_सुक्रार_शेनवार".split("_"),weekdaysShort:"आयत._सोम._मंगळ._बुध._ब्रेस्त._सुक्र._शेन.".split("_"),weekdaysMin:"आ_सो_मं_बु_ब्रे_सु_शे".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"A h:mm [वाजतां]",LTS:"A h:mm:ss [वाजतां]",L:"DD-MM-YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY A h:mm [वाजतां]",LLLL:"dddd, MMMM Do, YYYY, A h:mm [वाजतां]",llll:"ddd, D MMM YYYY, A h:mm [वाजतां]"},calendar:{sameDay:"[आयज] LT",nextDay:"[फाल्यां] LT",nextWeek:"[फुडलो] dddd[,] LT",lastDay:"[काल] LT",lastWeek:"[फाटलो] dddd[,] LT",sameElse:"L"},relativeTime:{future:"%s",past:"%s आदीं",s:t,ss:t,m:t,mm:t,h:t,hh:t,d:t,dd:t,M:t,MM:t,y:t,yy:t},dayOfMonthOrdinalParse:/\d{1,2}(वेर)/,ordinal:function(e,t){switch(t){case"D":return e+"वेर";default:case"M":case"Q":case"DDD":case"d":case"w":case"W":return e}},week:{dow:0,doy:3},meridiemParse:/राती|सकाळीं|दनपारां|सांजे/,meridiemHour:function(e,t){return 12===e&&(e=0),"राती"===t?e<4?e:e+12:"सकाळीं"===t?e:"दनपारां"===t?e>12?e:e+12:"सांजे"===t?e+12:void 0},meridiem:function(e,t,n){return e<4?"राती":e<12?"सकाळीं":e<16?"दनपारां":e<20?"सांजे":"राती"}});return n}))},ada2:function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
  259. //! moment.js locale configuration
  260. function t(e,t){var n=e.split("_");return t%10===1&&t%100!==11?n[0]:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?n[1]:n[2]}function n(e,n,r){var i={ss:n?"секунда_секунди_секунд":"секунду_секунди_секунд",mm:n?"хвилина_хвилини_хвилин":"хвилину_хвилини_хвилин",hh:n?"година_години_годин":"годину_години_годин",dd:"день_дні_днів",MM:"місяць_місяці_місяців",yy:"рік_роки_років"};return"m"===r?n?"хвилина":"хвилину":"h"===r?n?"година":"годину":e+" "+t(i[r],+e)}function r(e,t){var n,r={nominative:"неділя_понеділок_вівторок_середа_четвер_п’ятниця_субота".split("_"),accusative:"неділю_понеділок_вівторок_середу_четвер_п’ятницю_суботу".split("_"),genitive:"неділі_понеділка_вівторка_середи_четверга_п’ятниці_суботи".split("_")};return!0===e?r["nominative"].slice(1,7).concat(r["nominative"].slice(0,1)):e?(n=/(\[[ВвУу]\]) ?dddd/.test(t)?"accusative":/\[?(?:минулої|наступної)? ?\] ?dddd/.test(t)?"genitive":"nominative",r[n][e.day()]):r["nominative"]}function i(e){return function(){return e+"о"+(11===this.hours()?"б":"")+"] LT"}}var s=e.defineLocale("uk",{months:{format:"січня_лютого_березня_квітня_травня_червня_липня_серпня_вересня_жовтня_листопада_грудня".split("_"),standalone:"січень_лютий_березень_квітень_травень_червень_липень_серпень_вересень_жовтень_листопад_грудень".split("_")},monthsShort:"січ_лют_бер_квіт_трав_черв_лип_серп_вер_жовт_лист_груд".split("_"),weekdays:r,weekdaysShort:"нд_пн_вт_ср_чт_пт_сб".split("_"),weekdaysMin:"нд_пн_вт_ср_чт_пт_сб".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY р.",LLL:"D MMMM YYYY р., HH:mm",LLLL:"dddd, D MMMM YYYY р., HH:mm"},calendar:{sameDay:i("[Сьогодні "),nextDay:i("[Завтра "),lastDay:i("[Вчора "),nextWeek:i("[У] dddd ["),lastWeek:function(){switch(this.day()){case 0:case 3:case 5:case 6:return i("[Минулої] dddd [").call(this);case 1:case 2:case 4:return i("[Минулого] dddd [").call(this)}},sameElse:"L"},relativeTime:{future:"за %s",past:"%s тому",s:"декілька секунд",ss:n,m:n,mm:n,h:"годину",hh:n,d:"день",dd:n,M:"місяць",MM:n,y:"рік",yy:n},meridiemParse:/ночі|ранку|дня|вечора/,isPM:function(e){return/^(дня|вечора)$/.test(e)},meridiem:function(e,t,n){return e<4?"ночі":e<12?"ранку":e<17?"дня":"вечора"},dayOfMonthOrdinalParse:/\d{1,2}-(й|го)/,ordinal:function(e,t){switch(t){case"M":case"d":case"DDD":case"w":case"W":return e+"-й";case"D":return e+"-го";default:return e}},week:{dow:1,doy:7}});return s}))},aed6:function(e,t,n){"use strict";n.d(t,"a",(function(){return kt})),n.d(t,"b",(function(){return Vt})),n.d(t,"c",(function(){return de})),n.d(t,"d",(function(){return Dn})),n.d(t,"e",(function(){return nt})),n.d(t,"f",(function(){return qe})),n.d(t,"g",(function(){return C})),n.d(t,"h",(function(){return mo})),n.d(t,"i",(function(){return U})),(()=>{(function(){try{if("undefined"!=typeof document){var e=document.createElement("style");e.id="canvas-editor-style",e.appendChild(document.createTextNode('.ce-select-control-popup{max-width:160px;min-width:69px;max-height:225px;position:absolute;z-index:1;border:1px solid #e4e7ed;border-radius:4px;background-color:#fff;box-shadow:0 2px 12px #0000001a;box-sizing:border-box;margin:5px 0;overflow-y:auto}.ce-select-control-popup ul{list-style:none;padding:3px 0;margin:0;box-sizing:border-box}.ce-select-control-popup ul li{font-size:13px;padding:0 20px;position:relative;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:#666;height:36px;line-height:36px;box-sizing:border-box;cursor:pointer}.ce-select-control-popup ul li:hover{background-color:#eef2fd}.ce-select-control-popup ul li.active{color:var(--COLOR-HOVER, #5175f4);font-weight:700}.ce-date-container{display:none;width:300px;overflow:hidden;left:0;right:0;position:absolute;z-index:1;color:#606266;background:#ffffff;border-radius:4px;padding:10px;user-select:none;border:1px solid #e4e7ed;box-shadow:0 2px 12px #0000001a}.ce-date-container.active{display:block}.ce-date-wrap{display:none}.ce-date-wrap.active{display:block}.ce-date-title{display:flex;justify-content:center;align-items:center;text-align:center;color:#606266;font-size:16px}.ce-date-title>span{display:inline-block}.ce-date-title>span:not(.ce-date-title__now){font-family:cursive;cursor:pointer}.ce-date-title>span:not(.ce-date-title__now):hover{color:#5175f4}.ce-date-title .ce-date-title__pre-year,.ce-date-title .ce-date-title__pre-month{width:15%}.ce-date-title .ce-date-title__now{width:40%}.ce-date-title .ce-date-title__next-year,.ce-date-title .ce-date-title__next-month{width:15%}.ce-date-week{width:100%;display:flex;justify-content:center;margin-top:15px;padding-bottom:5px;border-bottom:1px solid #e4e7ed}.ce-date-week>span{list-style:none;width:14.28571%;text-align:center;color:#606266;font-size:14px}.ce-date-day{width:100%;display:flex;flex-wrap:wrap;align-items:center;margin-top:5px}.ce-date-day>div{width:14.28571%;height:40px;text-align:center;color:#606266;font-size:14px;cursor:pointer;line-height:40px;border-radius:4px}.ce-date-day>div:hover{color:#5175f4;opacity:.8}.ce-date-day>div.active{color:#5175f4;font-weight:700}.ce-date-day>div.disable{color:#c0c4cc}.ce-date-day>div.select{color:#fff;background-color:#5175f4}.ce-time-wrap{display:none;padding:10px;height:286px}.ce-time-wrap ::-webkit-scrollbar{width:0}.ce-time-wrap.active{display:flex}.ce-time-wrap li{list-style:none}.ce-time-wrap>li{width:33.3%;height:100%;text-align:center}.ce-time-wrap>li>span{transform:translateY(-5px);display:inline-block}.ce-time-wrap>li>ol{height:calc(100% - 20px);overflow-y:auto;border:1px solid #e2e2e2;position:relative}.ce-time-wrap>li:first-child>ol{border-right:0}.ce-time-wrap>li:last-child>ol{border-left:0}.ce-time-wrap>li>ol>li{line-height:30px;cursor:pointer;transition:all .3s}.ce-time-wrap>li>ol>li:hover{background-color:#eaeaea}.ce-time-wrap>li>ol>li.active{color:#fff;background:#5175F4}.ce-date-menu{width:100%;height:28px;display:flex;justify-content:flex-end;align-items:center;padding-top:10px;position:relative;border-top:1px solid #e4e7ed}.ce-date-menu button{display:inline-block;line-height:1;white-space:nowrap;cursor:pointer;background:#fff;border:1px solid #dcdfe6;color:#606266;appearance:none;text-align:center;box-sizing:border-box;outline:none;transition:.1s;font-weight:500;user-select:none;padding:7px 15px;font-size:12px;border-radius:3px;margin:0 0 0 10px}.ce-date-menu button:hover{color:#5175f4;border-color:#5175f4}.ce-date-menu button.ce-date-menu__time{border:1px solid transparent;position:absolute;left:0;margin-left:0}.ce-date-menu button.ce-date-menu__time:hover{color:#5175f4}.ce-block-item{position:absolute;z-index:0;overflow:hidden;border-radius:8px;background-color:#fff;border:1px solid rgb(235 236 240)}.ce-table-tool__row{position:absolute;width:12px;border-radius:6.5px;overflow:hidden;background-color:#e2e6ed}.ce-table-tool__row .ce-table-tool__row__item{width:100%;position:relative;cursor:pointer;transition:all .3s}.ce-table-tool__row .ce-table-tool__row__item:after{content:"";position:absolute;bottom:0;left:2px;width:8px;height:1px;background-color:#c0c6cf}.ce-table-tool__row .ce-table-tool__row__item:hover{background-color:#dadce0}.ce-table-tool__row .ce-table-tool__row__item:last-child:after{display:none}.ce-table-tool__quick__add{width:16px;height:16px;position:absolute;border-radius:50%;background-color:#e2e6ed;cursor:pointer}.ce-table-tool__quick__add:after{content:"+";color:#fff;position:absolute;top:50%;left:50%;transform:translate(-50%,-55%)}.ce-table-tool__select{width:16px;height:18px;position:absolute;border-radius:3px;cursor:pointer}.ce-table-tool__select:hover{background-color:#e2e6ed}.ce-table-tool__select:after{content:":::";color:#aaaaab;position:absolute;top:50%;left:50%;transform:translate(-75%,-50%) rotate(-90deg)}.ce-table-tool__col{position:absolute;height:12px;border-radius:6.5px;overflow:hidden;background-color:#e2e6ed;display:flex}.ce-table-tool__col .ce-table-tool__col__item{height:100%;position:relative;cursor:pointer;transition:all .3s}.ce-table-tool__col .ce-table-tool__col__item:after{content:"";position:absolute;top:2px;left:-1px;width:1px;height:8px;z-index:1;background-color:#c0c6cf}.ce-table-tool__col .ce-table-tool__col__item:hover{background-color:#dadce0}.ce-table-tool__col .ce-table-tool__col__item:first-child:after{display:none}.ce-table-tool__row .ce-table-tool__row__item.active,.ce-table-tool__col .ce-table-tool__col__item.active{background-color:#c4d7fa}.ce-table-tool__col .ce-table-tool__anchor{right:-5px;width:10px;height:12px;z-index:9;position:absolute;cursor:col-resize}.ce-table-tool__row .ce-table-tool__anchor{bottom:-5px;left:0;width:12px;height:10px;z-index:9;position:absolute;cursor:row-resize}.ce-table-anchor__line{z-index:9;position:absolute;border:1px dotted #000000}.ce-table-tool__border{position:absolute;z-index:1;background:transparent;pointer-events:none}.ce-table-tool__border__row{position:absolute;cursor:row-resize;pointer-events:auto}.ce-table-tool__border__col{position:absolute;cursor:col-resize;pointer-events:auto}.ce-resizer-selection{position:absolute;border:1px solid;pointer-events:none}.ce-resizer-selection .resizer-handle{position:absolute;z-index:9;width:10px;height:10px;box-shadow:0 1px 4px #0000004d;border-radius:5px;border:2px solid #ffffff;box-sizing:border-box;pointer-events:initial}.ce-resizer-selection .handle-0{cursor:nw-resize}.ce-resizer-selection .handle-1{cursor:n-resize}.ce-resizer-selection .handle-2{cursor:ne-resize}.ce-resizer-selection .handle-3{cursor:e-resize}.ce-resizer-selection .handle-4{cursor:se-resize}.ce-resizer-selection .handle-5{cursor:s-resize}.ce-resizer-selection .handle-6{cursor:sw-resize}.ce-resizer-selection .handle-7{cursor:w-resize}.ce-resizer-size-view{display:flex;align-items:center;height:20px;white-space:nowrap;position:absolute;z-index:9;top:-30px;left:0;opacity:.9;background-color:#000;padding:0 5px;border-radius:4px}.ce-resizer-size-view span{color:#fff;font-size:12px}.ce-resizer-image{position:absolute;opacity:.5}.ce-image-previewer{position:fixed;left:0;top:0;z-index:1000;width:100%;height:100%;overflow:hidden;background:#f2f4f7;display:flex;align-items:center;justify-content:center;animation:previewerAnimation .3s}@keyframes previewerAnimation{0%{opacity:.1}to{opacity:1}}.ce-image-previewer .image-close{width:24px;height:24px;display:inline-block;position:absolute;right:50px;top:30px;z-index:99;cursor:pointer;background:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzIiIGhlaWdodD0iMzIiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTIzLjk3IDdsMS40MTUgMS40MTQtNy43NzkgNy43NzggNy43NzkgNy43NzktMS40MTQgMS40MTQtNy43NzktNy43NzktNy43NzggNy43NzlMNyAyMy45N2w3Ljc3OC03Ljc3OUw3IDguNDE0IDguNDE0IDdsNy43NzggNy43NzhMMjMuOTcxIDd6IiBmaWxsPSIjM0Q0NzU3IiBmaWxsLXJ1bGU9ImV2ZW5vZGQiLz48L3N2Zz4=) no-repeat;background-size:100% 100%;transition:all .3s;border-radius:50%}.ce-image-previewer .image-close:hover{background-color:#e2e6ed}.ce-image-previewer .ce-image-container{position:relative}.ce-image-previewer .ce-image-container img{cursor:move;position:relative}.ce-image-previewer .ce-image-menu{height:50px;position:absolute;bottom:50px;z-index:99;display:flex;align-items:center;justify-content:center}.ce-image-previewer .ce-image-menu i{width:32px;height:32px;margin:0 8px;cursor:pointer;display:inline-block;background-repeat:no-repeat;background-size:100% 100%;transition:all .3s;border-radius:50%}.ce-image-previewer .ce-image-menu i:hover{background-color:#e2e6ed}.ce-image-previewer .ce-image-menu i.zoom-in{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzIiIGhlaWdodD0iMzIiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTE0IDE0di00aDJ2NGg0djJoLTR2NGgtMnYtNGgtNHYtMmg0em04Ljc0OSAxMC4xNjNBMTEuOTUyIDExLjk1MiAwIDAxMTUgMjdDOC4zNzMgMjcgMyAyMS42MjcgMyAxNVM4LjM3MyAzIDE1IDNzMTIgNS4zNzMgMTIgMTJjMCAyLjk1NC0xLjA2NyA1LjY1OC0yLjgzNyA3Ljc0OWw0LjkwOCA0LjkwOC0xLjQxNCAxLjQxNC00LjkwOC00LjkwOHpNMTUgMjVjNS41MjMgMCAxMC00LjQ3NyAxMC0xMFMyMC41MjMgNSAxNSA1IDUgOS40NzcgNSAxNXM0LjQ3NyAxMCAxMCAxMHoiIGZpbGw9IiMzRDQ3NTciLz48L3N2Zz4=)}.ce-image-previewer .ce-image-menu i.zoom-out{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzIiIGhlaWdodD0iMzIiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTIyLjc0OSAyNC4xNjNBMTEuOTUyIDExLjk1MiAwIDAxMTUgMjdDOC4zNzMgMjcgMyAyMS42MjcgMyAxNVM4LjM3MyAzIDE1IDNzMTIgNS4zNzMgMTIgMTJjMCAyLjk1NC0xLjA2NyA1LjY1OC0yLjgzNyA3Ljc0OWw0LjkwOCA0LjkwOC0xLjQxNCAxLjQxNC00LjkwOC00LjkwOHpNMTUgMjVjNS41MjMgMCAxMC00LjQ3NyAxMC0xMFMyMC41MjMgNSAxNSA1IDUgOS40NzcgNSAxNXM0LjQ3NyAxMCAxMCAxMHptLTUtMTFoMTB2MkgxMHYtMnoiIGZpbGw9IiMzRDQ3NTciLz48L3N2Zz4=)}.ce-image-previewer .ce-image-menu i.rotate{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzIiIGhlaWdodD0iMzIiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0iIzNENDc1NyIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBkPSJNMTYgNGM2LjYyNyAwIDEyIDUuMzczIDEyIDEyYTExLjk3IDExLjk3IDAgMDEtNCA4Ljk0NFYyM2gtLjg2QTkuOTY4IDkuOTY4IDAgMDAyNiAxNmMwLTUuNTIzLTQuNDc3LTEwLTEwLTEwUzYgMTAuNDc3IDYgMTZjMCA1LjE4NSAzLjk0NyA5LjQ0OSA5IDkuOTV2Mi4wMDlDOC44NCAyNy40NTEgNCAyMi4yOTEgNCAxNiA0IDkuMzczIDkuMzczIDQgMTYgNHoiIGZpbGwtcnVsZT0ibm9uemVybyIvPjxwYXRoIGQ9Ik0xOS44NzkgMjcuMzI4bDEuNzY3LTYuNzE3IDQuOTUgNC45NXoiLz48L2c+PC9zdmc+)}.ce-image-previewer .ce-image-menu i.original-size{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzIiIGhlaWdodD0iMzIiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTQgNGgyNHYyNEg0VjR6bTIgMnYyMGgyMFY2SDZ6bTQgNWgydjEwaC0yVjExem01IDJoMnYyaC0ydi0yem0wIDRoMnYyaC0ydi0yem01LTZoMnYxMGgtMlYxMXoiIGZpbGw9IiMzRDQ3NTciLz48L3N2Zz4=)}.ce-image-previewer .ce-image-menu i.image-download{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTQuNSAxNXYzLjVoMTVWMTVIMjF2NUgzdi01aDEuNXptOC4yMzItMTEuMjI2djkuMTk2bDQuMDUtNC4wNSAxLjA2IDEuMDYtNS44MzQgNS44MzQtNS44MzMtNS44MzMgMS4wNi0xLjA2IDMuOTk4IDMuOTk2VjMuNzc0aDEuNXoiIGZpbGw9IiMzRDQ3NTciLz48L3N2Zz4=)}.ce-contextmenu-container{z-index:9;position:fixed;display:none;padding:4px;overflow-x:hidden;overflow-y:auto;background:#fff;box-shadow:0 2px 12px #38383833;border:1px solid #e2e6ed;border-radius:2px}.ce-contextmenu-content{display:flex;flex-direction:column}.ce-contextmenu-content .ce-contextmenu-sub-item:after{position:absolute;content:"";width:16px;height:16px;right:12px;background:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBkPSJNMCAwaDE2djE2SDB6Ii8+PGcgZmlsbD0iIzc2N0M4NSI+PHBhdGggZD0iTTcgMTIuMjQzbC0uNzA3LS43MDcgNC4yNDMtNC4yNDMuNzA3LjcwN3oiLz48cGF0aCBkPSJNNi4yOTMgNC40NjRMNyAzLjc1NyAxMS4yNDMgOGwtLjcwNy43MDd6Ii8+PC9nPjwvZz48L3N2Zz4=)}.ce-contextmenu-content .ce-contextmenu-item{min-width:140px;padding:0 32px 0 16px;height:30px;display:flex;align-items:center;white-space:nowrap;box-sizing:border-box;cursor:pointer}.ce-contextmenu-content .ce-contextmenu-item.hover{background:rgba(25,55,88,.04)}.ce-contextmenu-content .ce-contextmenu-item span{max-width:300px;font-size:12px;color:#3d4757;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.ce-contextmenu-content .ce-contextmenu-item span.ce-shortcut{color:#767c85;height:30px;flex:1;text-align:right;line-height:30px;margin-left:20px}.ce-contextmenu-content .ce-contextmenu-item i{width:16px;height:16px;vertical-align:middle;display:inline-block;background-repeat:no-repeat;background-size:100% 100%;flex-shrink:0;margin-right:8px}.ce-contextmenu-divider{background-color:#e2e6ed;margin:4px 16px;height:1px}.ce-contextmenu-print{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAxNiAxNiIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48ZyBmaWxsPSIjM0Q0NzU3IiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPjxwYXRoIGQ9Ik0xMiA0aC0xVjJINXYySDRWMmExIDEgMCAwMTEtMWg2YTEgMSAwIDAxMSAxdjJ6bTAgNXY0YTEgMSAwIDAxLTEgMUg1YTEgMSAwIDAxLTEtMVY5aDF2NGg2VjloMXoiLz48cGF0aCBkPSJNMTIgMTJ2LTFoMlY1SDJ2NmgydjFIMmExIDEgMCAwMS0xLTFWNWExIDEgMCAwMTEtMWgxMmExIDEgMCAwMTEgMXY2YTEgMSAwIDAxLTEgMWgtMnoiLz48cGF0aCBkPSJNMyA4aDEwdjFIM3ptOC0yaDJ2MWgtMnoiLz48L2c+PC9zdmc+)}.ce-contextmenu-image{background-image:url(data:image/svg+xml;base64,PHN2ZyB2ZXJzaW9uPSIxLjEiIGlkPSLlm77lsYJfMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4PSIwIiB5PSIwIiB2aWV3Qm94PSIwIDAgMTYgMTYiIHhtbDpzcGFjZT0icHJlc2VydmUiPjxzdHlsZT4uc3Qwe2ZpbGw6IzNkNDc1N308L3N0eWxlPjxnIGlkPSJfeDMwXzAt5YWs5YWxX3gyRl8wMuW3peWFt+agj194MkZf5o+S5YWl5Zu+54mHLTE2cHgtIj48ZyBpZD0iR3JvdXAtMTkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKDEgMSkiPjxwYXRoIGlkPSJDb21iaW5lZC1TaGFwZSIgY2xhc3M9InN0MCIgZD0iTTEgMGgxMmMuNiAwIDEgLjQgMSAxdjExYzAgLjYtLjQgMS0xIDFIMWMtLjYgMC0xLS40LTEtMVYxYzAtLjYuNC0xIDEtMXptMCAxdjExaDEyVjFIMXoiLz48Y2lyY2xlIGlkPSLmpK3lnIblvaIiIGNsYXNzPSJzdDAiIGN4PSIxMCIgY3k9IjQiIHI9IjEiLz48cGF0aCBpZD0iUGF0aCIgY2xhc3M9InN0MCIgZD0iTTguNSAxMS4ybC00LTQuMUwxIDEwLjdWOS4yYzEuNy0xLjYgMi43LTIuNSAzLTIuOC40LS41LjctLjQgMSAwTDguNSAxMCAxMSA3LjNjLjQtLjUuNi0uNSAxLS4xbDIgMi44djEuNWwtMi41LTMuNC0zIDMuMXoiLz48L2c+PC9nPjwvc3ZnPg==)}.ce-contextmenu-image-change{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj48ZyB0cmFuc2Zvcm09InRyYW5zbGF0ZSgyIDQpIiBmaWxsPSIjM0Q0NzU3Ij48Y2lyY2xlIGZpbGwtcnVsZT0ibm9uemVybyIgY3g9IjMiIGN5PSIxIiByPSIxIi8+PHBhdGggZD0iTTcuNDczIDguMjIzTDMuNDcgNC4xMDcgMCA3LjY2N3YtMS41QzEuNzE1IDQuNiAyLjcwNyAzLjY2NCAyLjk3NSAzLjM1OGMuNDAyLS40NTcuNjUxLS4zOSAxLjA0MiAwTDcuNDczIDcgOS45NiA0LjM0OWMuNDE0LS40NjIuNjItLjQ2MiAxLjAxMS0uMDcxTDEzIDcuMDZ2MS41bC0yLjUxLTMuNDEtMy4wMTcgMy4wNzJ6Ii8+PC9nPjxwYXRoIGQ9Ik02IDEuNUgxLjV2MTJoMTN2LTRWMTNhLjUuNSAwIDAxLS41LjVIMmEuNS41IDAgMDEtLjUtLjVWMmEuNS41IDAgMDEuNS0uNWg0em04LjUgOFY2bC0uNS41aDFsLS41LS41djMuNXpNNiAxLjVoNEw5LjUgMXYxbC41LS41SDZ6IiBzdHJva2U9IiMzRDQ3NTciLz48cGF0aCBkPSJNMTMuMDg1IDEuMzE2bC0zLjgxNCA0YTEgMSAwIDAwMS40NTggMS4zNjhsMy44MTUtNGExIDEgMCAxMC0xLjQ1OS0xLjM2OHoiIGZpbGw9IiMzRDQ3NTciIGZpbGwtcnVsZT0ibm9uemVybyIvPjwvZz48L3N2Zz4=)}.ce-contextmenu-insert-row-col{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBzdHJva2U9IiMzRDQ3NTciIGQ9Ik04LjUgNS41aDZ2NGgtNnoiLz48cGF0aCBmaWxsPSIjM0Q0NzU3IiBkPSJNNCA3djFoMlY3em0tMyAuNUw0IDV2NXpNMSAxaDEydjFIMXptMCAxMmgxMnYxSDF6Ii8+PC9nPjwvc3ZnPg==)}.ce-contextmenu-insert-top-row{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBmaWxsPSIjM0Q0NzU3IiBkPSJNOCA1SDd2M2gxem0tLjUtM0wxMCA1SDV6Ii8+PHJlY3Qgc3Ryb2tlPSIjM0Q0NzU3IiB4PSIxLjUiIHk9IjEwLjUiIHdpZHRoPSIxMiIgaGVpZ2h0PSIzIiByeD0iMSIvPjwvZz48L3N2Zz4=)}.ce-contextmenu-insert-bottom-row{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBmaWxsPSIjM0Q0NzU3IiBkPSJNNyAxMWgxVjhIN3ptLjUgM0w1IDExaDV6Ii8+PHJlY3Qgc3Ryb2tlPSIjM0Q0NzU3IiB4PSIxLjUiIHk9IjIuNSIgd2lkdGg9IjEyIiBoZWlnaHQ9IjMiIHJ4PSIxIi8+PC9nPjwvc3ZnPg==)}.ce-contextmenu-insert-left-col{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBmaWxsPSIjM0Q0NzU3IiBkPSJNMTEgN3YxaDNWN3ptLTMgLjVMMTEgNXY1eiIvPjxyZWN0IHN0cm9rZT0iIzNENDc1NyIgdHJhbnNmb3JtPSJyb3RhdGUoOTAgNCA3LjUpIiB4PSItMiIgeT0iNiIgd2lkdGg9IjEyIiBoZWlnaHQ9IjMiIHJ4PSIxIi8+PC9nPjwvc3ZnPg==)}.ce-contextmenu-insert-right-col{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBmaWxsPSIjM0Q0NzU3IiBkPSJNNSA4VjdIMnYxem0zLS41TDUgMTBWNXoiLz48cmVjdCBzdHJva2U9IiMzRDQ3NTciIHRyYW5zZm9ybT0icm90YXRlKDkwIDEyIDcuNSkiIHg9IjYiIHk9IjYiIHdpZHRoPSIxMiIgaGVpZ2h0PSIzIiByeD0iMSIvPjwvZz48L3N2Zz4=)}.ce-contextmenu-delete-row-col{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBzdHJva2U9IiM5MjlBQTgiIGQ9Ik04LjUgNi41aDZ2MmgtNnoiLz48cGF0aCBmaWxsPSIjM0Q0NzU3IiBkPSJNMiAxMmgxMXYxSDJ6TTIgMmgxMXYxSDJ6bS42MyAzTDcgOS4zNWwtLjYzNS42NUwyIDUuNjN6Ii8+PHBhdGggZmlsbD0iIzNENDc1NyIgZD0iTTIgOS4zNjNMNi4zNTUgNSA3IDUuNzA3IDIuNjk1IDEweiIvPjwvZz48L3N2Zz4=)}.ce-contextmenu-delete-row{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBzdHJva2U9IiM5MjlBQTgiIGQ9Ik04LjUgNS41aDZ2NGgtNnoiLz48cGF0aCBmaWxsPSIjM0Q0NzU3IiBkPSJNMSAxM2gxMnYxSDF6TTEgMWgxMnYxSDF6bTAgNGgxdjFIMXptMSAxaDF2MUgyem0xIDFoMXYxSDN6bTEtMWgxdjFINHptMS0xaDF2MUg1ek00IDhoMXYxSDR6TTIgOGgxdjFIMnptMyAxaDF2MUg1ek0xIDloMXYxSDF6Ii8+PC9nPjwvc3ZnPg==)}.ce-contextmenu-delete-col{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBzdHJva2U9IiM5MjlBQTgiIGQ9Ik01LjUgNy41di02aDR2NnoiLz48cGF0aCBmaWxsPSIjM0Q0NzU3IiBkPSJNMTMgMTVWM2gxdjEyek0xIDE1VjNoMXYxMnptNCAwdi0xaDF2MXptMS0xdi0xaDF2MXptMS0xdi0xaDF2MXptLTEtMXYtMWgxdjF6bS0xLTF2LTFoMXYxem0zIDF2LTFoMXYxem0wIDJ2LTFoMXYxem0xLTN2LTFoMXYxem0wIDR2LTFoMXYxeiIvPjwvZz48L3N2Zz4=)}.ce-contextmenu-delete-table{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0iIzNENDc1NyIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBkPSJNMTQgMTNoLTF2LTNIMnYzSDF2LTNhMSAxIDAgMDExLTFoMTFhMSAxIDAgMDExIDF2M3oiIGZpbGwtcnVsZT0ibm9uemVybyIvPjxwYXRoIGQ9Ik01LjYyNSAyTDEwIDYuMzc1IDkuMzc1IDcgNSAyLjYyNXoiLz48cGF0aCBkPSJNNSA2LjM3NUw5LjM3NSAybC42MjUuNjI1TDUuNjI1IDd6Ii8+PC9nPjwvc3ZnPg==)}.ce-contextmenu-merge-cell{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0iIzNENDc1NyIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBkPSJNNiAxdjFIMnYxMWg0djFIMmExIDEgMCAwMS0xLTFWMmExIDEgMCAwMTEtMWg0em0zIDBoNGExIDEgMCAwMTEgMXYxMWExIDEgMCAwMS0xIDFIOXYtMWg0VjJIOVYxeiIvPjxwYXRoIGZpbGwtcnVsZT0ibm9uemVybyIgZD0iTTYgMWgxdjRINnptMiAwaDF2NEg4eiIvPjxwYXRoIGQ9Ik04IDcuNUwxMCA2djN6bS0xIDBMNSA2djN6Ii8+PHBhdGggZD0iTTkgN2gzdjFIOXpNMyA3aDN2MUgzeiIvPjxwYXRoIGZpbGwtcnVsZT0ibm9uemVybyIgZD0iTTggMTBoMXY0SDh6bS0yIDBoMXY0SDZ6Ii8+PC9nPjwvc3ZnPg==)}.ce-contextmenu-merge-cancel-cell{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0iIzNENDc1NyIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBkPSJNNiAxdjFIMnYxMWg0djFIMmExIDEgMCAwMS0xLTFWMmExIDEgMCAwMTEtMWg0em0zIDBoNGExIDEgMCAwMTEgMXYxMWExIDEgMCAwMS0xIDFIOXYtMWg0VjJIOVYxeiIvPjxwYXRoIGZpbGwtcnVsZT0ibm9uemVybyIgZD0iTTYgMWgxdjRINnptMiAwaDF2NEg4eiIvPjxwYXRoIGQ9Ik0zIDcuNUw1IDZ2M3ptOSAwTDEwIDZ2M3oiLz48cGF0aCBkPSJNNCA3aDN2MUg0em00IDBoM3YxSDh6Ii8+PHBhdGggZmlsbC1ydWxlPSJub256ZXJvIiBkPSJNOCAxMGgxdjRIOHptLTIgMGgxdjRINnoiLz48L2c+PC9zdmc+)}.ce-contextmenu-vertical-align{background-image:url(data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjE2IiB2aWV3Qm94PSIwIDAgMTYgMTYiIHdpZHRoPSIxNiIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBkPSJNMiAxM2gxMnYxSDJ6bTAtM2g4djFIMnptMC0zaDEydjFIMnptMC02aDEydjFIMnptMCAzaDh2MUgyeiIgZmlsbD0iIzNkNDc1NyIgZmlsbC1ydWxlPSJldmVub2RkIi8+PC9zdmc+)}.ce-contextmenu-vertical-align-top{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTggOEg3djZoMXptLS41LTNMMTAgOEg1ek0yIDNoMTF2MUgyeiIgZmlsbD0iIzNENDc1NyIgZmlsbC1ydWxlPSJldmVub2RkIi8+PC9zdmc+)}.ce-contextmenu-vertical-align-middle{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAxNiAxNiIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBkPSJNOCAxMkg3djNoMXptLS41LTNsMi41IDNINXpNNyAzaDFWMEg3em0uNSAzTDUgM2g1ek0yIDdoMTF2MUgyeiIgZmlsbD0iIzNENDc1NyIgZmlsbC1ydWxlPSJldmVub2RkIi8+PC9zdmc+)}.ce-contextmenu-vertical-align-bottom{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTcgOWgxVjNIN3ptLjUgM0w1IDloNXpNMiAxM2gxMXYxSDJ6IiBmaWxsPSIjM0Q0NzU3IiBmaWxsLXJ1bGU9ImV2ZW5vZGQiLz48L3N2Zz4=)}.ce-contextmenu-border-all{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTIuNSAzYS41LjUgMCAwMS41LS41aDExYS41LjUgMCAwMS41LjV2MTFhLjUuNSAwIDAxLS41LjVIM2EuNS41IDAgMDEtLjUtLjVWM3oiIHN0cm9rZT0iIzNENDc1NyIvPjxwYXRoIGZpbGw9IiMzRDQ3NTciIGQ9Ik0zIDhoMTF2MUgzeiIvPjxwYXRoIGZpbGw9IiMzRDQ3NTciIGQ9Ik05IDN2MTFIOFYzeiIvPjwvc3ZnPg==)}.ce-contextmenu-border-empty{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0xMyAzaC0xVjJoMWExIDEgMCAwMTEgMXYxaC0xVjN6bS0zLTF2MUg4LjV2MmgtMVYzSDZWMmg0ek00IDJ2MUgzdjFIMlYzYTEgMSAwIDAxMS0xaDF6TTIgNmgxdjEuNWgydjFIM1YxMEgyVjZ6bTAgNmgxdjFoMXYxSDNhMSAxIDAgMDEtMS0xdi0xem00IDJ2LTFoMS41di0yaDF2MkgxMHYxSDZ6bTYgMHYtMWgxdi0xaDF2MWExIDEgMCAwMS0xIDFoLTF6bTItNGgtMVY4LjVoLTJ2LTFoMlY2aDF2NHpNOC41IDcuNXYtMWgtMXYxaC0xdjFoMXYxaDF2LTFoMXYtMWgtMXoiIGZpbGw9IiNBQUFDQjAiLz48L3N2Zz4=)}.ce-contextmenu-border-dash{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0xMyAzaC0xVjJoMWExIDEgMCAwMTEgMXYxaC0xVjN6bS0zLTF2MUg4LjV2MmgtMVYzSDZWMmg0ek00IDJ2MUgzdjFIMlYzYTEgMSAwIDAxMS0xaDF6TTIgNmgxdjEuNWgydjFIM1YxMEgyVjZ6bTAgNmgxdjFoMXYxSDNhMSAxIDAgMDEtMS0xdi0xem00IDJ2LTFoMS41di0yaDF2MkgxMHYxSDZ6bTYgMHYtMWgxdi0xaDF2MWExIDEgMCAwMS0xIDFoLTF6bTItNGgtMVY4LjVoLTJ2LTFoMlY2aDF2NHpNOC41IDcuNXYtMWgtMXYxaC0xdjFoMXYxaDF2LTFoMXYtMWgtMXoiIGZpbGw9IiMwMDAwMDAiLz48L3N2Zz4=)}.ce-contextmenu-border-external{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTIuNSAzYS41LjUgMCAwMS41LS41aDExYS41LjUgMCAwMS41LjV2MTFhLjUuNSAwIDAxLS41LjVIM2EuNS41IDAgMDEtLjUtLjVWM3oiIHN0cm9rZT0iIzNENDc1NyIvPjxwYXRoIGZpbGwtcnVsZT0iZXZlbm9kZCIgY2xpcC1ydWxlPSJldmVub2RkIiBkPSJNOSA1VjNIOHYyaDF6bTAgOXYtMkg4djJoMXpNNSA4SDN2MWgyVjh6bTkgMGgtMnYxaDJWOHpNOSA3djFoMXYxSDl2MUg4VjlIN1Y4aDFWN2gxeiIgZmlsbD0iI0FBQUNCMCIvPjwvc3ZnPg==)}.ce-contextmenu-border-internal{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTIuNSAzYS41LjUgMCAwMS41LS41aDExYS41LjUgMCAwMS41LjV2MTFhLjUuNSAwIDAxLS41LjVIM2EuNS41IDAgMDEtLjUtLjVWM3oiIHN0cm9rZT0iI0FBQUNCMCIvPjxwYXRoIGZpbGwtcnVsZT0iZXZlbm9kZCIgY2xpcC1ydWxlPSJldmVub2RkIiBkPSJNOSA1VjNIOHYyaDF6bTAgOXYtMkg4djJoMXpNNSA4SDN2MWgyVjh6bTkgMGgtMnYxaDJWOHpNOSA3djFoMXYxSDl2MUg4VjlIN1Y4aDFWN2gxeiIgZmlsbD0iIzNENDc1NyIvPjwvc3ZnPg==)}.ce-contextmenu-border-td{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTIuNSAzYS41LjUgMCAwMS41LS41aDExYS41LjUgMCAwMS41LjV2MTFhLjUuNSAwIDAxLS41LjVIM2EuNS41IDAgMDEtLjUtLjVWM3oiIHN0cm9rZT0iI0FBQUNCMCIvPjxwYXRoIHN0cm9rZT0iIzNENDc1NyIgZD0iTTguNSAyLjUgdjYgaC02Ii8+PC9zdmc+)}.ce-contextmenu-border-td-top{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTIuNSAzYS41LjUgMCAwMS41LS41aDExYS41LjUgMCAwMS41LjV2MTFhLjUuNSAwIDAxLS41LjVIM2EuNS41IDAgMDEtLjUtLjVWM3oiIHN0cm9rZT0iI0FBQUNCMCIvPjxwYXRoIHN0cm9rZT0iIzNENDc1NyIgc3Ryb2tlLXdpZHRoPSIyIiBkPSJNMi41IDMgaDEyIi8+PC9zdmc+)}.ce-contextmenu-border-td-left{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTIuNSAzYS41LjUgMCAwMS41LS41aDExYS41LjUgMCAwMS41LjV2MTFhLjUuNSAwIDAxLS41LjVIM2EuNS41IDAgMDEtLjUtLjVWM3oiIHN0cm9rZT0iI0FBQUNCMCIvPjxwYXRoIHN0cm9rZT0iIzNENDc1NyIgc3Ryb2tlLXdpZHRoPSIyIiBkPSJNMyAzIHYxMSIvPjwvc3ZnPg==)}.ce-contextmenu-border-td-bottom{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTIuNSAzYS41LjUgMCAwMS41LS41aDExYS41LjUgMCAwMS41LjV2MTFhLjUuNSAwIDAxLS41LjVIM2EuNS41IDAgMDEtLjUtLjVWM3oiIHN0cm9rZT0iI0FBQUNCMCIvPjxwYXRoIHN0cm9rZT0iIzNENDc1NyIgc3Ryb2tlLXdpZHRoPSIyIiBkPSJNMi41IDE0IGgxMiIvPjwvc3ZnPg==)}.ce-contextmenu-border-td-right{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTIuNSAzYS41LjUgMCAwMS41LS41aDExYS41LjUgMCAwMS41LjV2MTFhLjUuNSAwIDAxLS41LjVIM2EuNS41IDAgMDEtLjUtLjVWM3oiIHN0cm9rZT0iI0FBQUNCMCIvPjxwYXRoIHN0cm9rZT0iIzNENDc1NyIgc3Ryb2tlLXdpZHRoPSIyIiBkPSJNMTQgMyB2MTEiLz48L3N2Zz4=)}.ce-contextmenu-border-td-forward{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTIuNSAzYS41LjUgMCAwMS41LS41aDExYS41LjUgMCAwMS41LjV2MTFhLjUuNSAwIDAxLS41LjVIM2EuNS41IDAgMDEtLjUtLjVWM3oiIHN0cm9rZT0iI0FBQUNCMCIgLz48cGF0aCBzdHJva2U9IiMzRDQ3NTciIGQ9Ik0xNCAzIGwtMTEgMTEiIC8+PC9zdmc+)}.ce-contextmenu-border-td-back{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTIuNSAzYS41LjUgMCAwMS41LS41aDExYS41LjUgMCAwMS41LjV2MTFhLjUuNSAwIDAxLS41LjVIM2EuNS41IDAgMDEtLjUtLjVWM3oiIHN0cm9rZT0iI0FBQUNCMCIgLz48cGF0aCBzdHJva2U9IiMzRDQ3NTciIGQ9Ik0zIDMgbDExIDExIiAvPjwvc3ZnPg==)}.ce-hyperlink-popup{background:#fff;box-shadow:0 2px 12px #626b8433;border-radius:2px;color:#3d4757;padding:12px 16px;position:absolute;z-index:1;text-align:center;display:none}.ce-hyperlink-popup a{min-width:100px;max-width:300px;font-size:12px;display:inline-block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;cursor:pointer;text-decoration:none;border-bottom-width:1px;border-bottom-style:solid;color:#00f}.ce-zone-indicator>div{padding:3px 6px;color:#000;font-size:12px;background:rgb(218 231 252);position:absolute;transform-origin:0 0}.ce-zone-indicator-border__top,.ce-zone-indicator-border__bottom,.ce-zone-indicator-border__left,.ce-zone-indicator-border__right{display:block;position:absolute;z-index:0}.ce-zone-indicator-border__top{border-top:2px dashed rgb(238,238,238)}.ce-zone-indicator-border__bottom{border-top:2px dashed rgb(238,238,238);width:100%}.ce-zone-indicator-border__left{border-left:2px dashed rgb(238,238,238)}.ce-zone-indicator-border__right{border-right:2px dashed rgb(238,238,238)}.ce-zone-tip{display:none;align-items:center;height:30px;white-space:nowrap;position:fixed;opacity:.9;background-color:#000;padding:0 5px;border-radius:4px;z-index:9;transition:all .3s;outline:none;user-select:none;pointer-events:none;transform:translate(10px,10px)}.ce-zone-tip.show{display:flex}.ce-zone-tip span{color:#fff;font-size:12px}.ce-inputarea{width:100px;height:30px;min-width:0;min-height:0;margin:0;padding:0;left:0;top:0;letter-spacing:0;font-size:12px;position:absolute;z-index:-1;outline:none;resize:none;border:none;overflow:hidden;color:transparent;user-select:none;caret-color:transparent;background-color:transparent}.ce-cursor{width:1px;height:20px;left:0;right:0;position:absolute;outline:none;background-color:#000;pointer-events:none}.ce-cursor.ce-cursor--animation{animation-duration:1s;animation-iteration-count:infinite;animation-name:cursorAnimation}@keyframes cursorAnimation{0%{opacity:1}13%{opacity:0}50%{opacity:0}63%{opacity:1}to{opacity:1}}.ce-float-image{position:absolute;opacity:.5;pointer-events:none}')),document.head.appendChild(e)}}catch(t){console.error("vite-plugin-css-injected-by-js",t)}})()})();var r=Object.defineProperty,i=Object.defineProperties,s=Object.getOwnPropertyDescriptors,o=Object.getOwnPropertySymbols,a=Object.prototype.hasOwnProperty,l=Object.prototype.propertyIsEnumerable,c=(e,t,n)=>t in e?r(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,u=(e,t)=>{for(var n in t||(t={}))a.call(t,n)&&c(e,n,t[n]);if(o)for(var n of o(t))l.call(t,n)&&c(e,n,t[n]);return e},h=(e,t)=>i(e,s(t)),d=(e,t,n)=>(c(e,"symbol"!==typeof t?t+"":t,n),n);const m="0.9.99";var g,p,f,R,y;(function(e){e["HALF"]="half",e["ONE_THIRD"]="one-third",e["QUARTER"]="quarter"})(g||(g={})),function(e){e["ARABIC"]="arabic",e["CHINESE"]="chinese"}(p||(p={})),function(e){e["INLINE"]="inline",e["BLOCK"]="block",e["SURROUND"]="surround",e["FLOAT_TOP"]="float-top",e["FLOAT_BOTTOM"]="float-bottom"}(f||(f={})),function(e){e["BEFORE"]="before",e["AFTER"]="after"}(R||(R={})),function(e){e["ROW"]="row",e["COLUMN"]="column"}(y||(y={}));const M="​",S="\n",b=" ",w="&nbsp;",T=["·","、",":",":",",",",",".","。",";",";","?","?","!","!"],O={[g.HALF]:.5,[g.ONE_THIRD]:1/3,[g.QUARTER]:1/4},v={ENGLISH:"A-Za-z",SPANISH:"A-Za-zÁÉÍÓÚáéíóúÑñÜü",FRENCH:"A-Za-zÀÂÇàâçÉéÈèÊêËëÎîÏïÔôÙùÛûŸÿ",GERMAN:"A-Za-zÄäÖöÜüß",RUSSIAN:"А-Яа-яЁё",PORTUGUESE:"A-Za-zÁÉÍÓÚáéíóúÃÕãõÇç",ITALIAN:"A-Za-zÀàÈèÉéÌìÍíÎîÓóÒòÙù",DUTCH:"A-Za-zÀàÁáÂâÄäÈèÉéÊêËëÌìÍíÎîÏïÓóÒòÔôÖöÙùÛûÜü",SWEDISH:"A-Za-zÅåÄäÖö",GREEK:"ΑαΒβΓγΔδΕεΖζΗηΘθΙιΚκΛλΜμΝνΞξΟοΠπΡρΣσςΤτΥυΦφΧχΨψΩω"},E="日";var C;(function(e){e["LEFT"]="left",e["CENTER"]="center",e["RIGHT"]="right",e["ALIGNMENT"]="alignment",e["JUSTIFY"]="justify"})(C||(C={}));const L=/[0-9.]/,N=/[\uD800-\uDBFF][\uDC00-\uDFFF]/,_=/[#*0-9]\uFE0F?\u20E3|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26AA\u26B0\u26B1\u26BD\u26BE\u26C4\u26C8\u26CF\u26D1\u26E9\u26F0-\u26F5\u26F7\u26F8\u26FA\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2757\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B55\u3030\u303D\u3297\u3299]\uFE0F?|[\u261D\u270C\u270D](?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?|[\u270A\u270B](?:\uD83C[\uDFFB-\uDFFF])?|[\u23E9-\u23EC\u23F0\u23F3\u25FD\u2693\u26A1\u26AB\u26C5\u26CE\u26D4\u26EA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2795-\u2797\u27B0\u27BF\u2B50]|\u26D3\uFE0F?(?:\u200D\uD83D\uDCA5)?|\u26F9(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|\u2764\uFE0F?(?:\u200D(?:\uD83D\uDD25|\uD83E\uDE79))?|\uD83C(?:[\uDC04\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]\uFE0F?|[\uDF85\uDFC2\uDFC7](?:\uD83C[\uDFFB-\uDFFF])?|[\uDFC4\uDFCA](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDFCB\uDFCC](?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF43\uDF45-\uDF4A\uDF4C-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uDDE6\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF]|\uDDE7\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF]|\uDDE8\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF]|\uDDE9\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF]|\uDDEA\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA]|\uDDEB\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7]|\uDDEC\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE]|\uDDED\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA]|\uDDEE\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9]|\uDDEF\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5]|\uDDF0\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF]|\uDDF1\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE]|\uDDF2\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF]|\uDDF3\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF]|\uDDF4\uD83C\uDDF2|\uDDF5\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE]|\uDDF6\uD83C\uDDE6|\uDDF7\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC]|\uDDF8\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF]|\uDDF9\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF]|\uDDFA\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF]|\uDDFB\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA]|\uDDFC\uD83C[\uDDEB\uDDF8]|\uDDFD\uD83C\uDDF0|\uDDFE\uD83C[\uDDEA\uDDF9]|\uDDFF\uD83C[\uDDE6\uDDF2\uDDFC]|\uDF44(?:\u200D\uD83D\uDFEB)?|\uDF4B(?:\u200D\uD83D\uDFE9)?|\uDFC3(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDFF3\uFE0F?(?:\u200D(?:\u26A7\uFE0F?|\uD83C\uDF08))?|\uDFF4(?:\u200D\u2620\uFE0F?|\uDB40\uDC67\uDB40\uDC62\uDB40(?:\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDC73\uDB40\uDC63\uDB40\uDC74|\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F)?)|\uD83D(?:[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3]\uFE0F?|[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC](?:\uD83C[\uDFFB-\uDFFF])?|[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4\uDEB5](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD74\uDD90](?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?|[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC25\uDC27-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE41\uDE43\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED7\uDEDC-\uDEDF\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB\uDFF0]|\uDC08(?:\u200D\u2B1B)?|\uDC15(?:\u200D\uD83E\uDDBA)?|\uDC26(?:\u200D(?:\u2B1B|\uD83D\uDD25))?|\uDC3B(?:\u200D\u2744\uFE0F?)?|\uDC41\uFE0F?(?:\u200D\uD83D\uDDE8\uFE0F?)?|\uDC68(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDC68\uDC69]\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE])))?))?|\uDC69(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?[\uDC68\uDC69]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?|\uDC69\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?))|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFE])))?))?|\uDC6F(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDD75(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDE2E(?:\u200D\uD83D\uDCA8)?|\uDE35(?:\u200D\uD83D\uDCAB)?|\uDE36(?:\u200D\uD83C\uDF2B\uFE0F?)?|\uDE42(?:\u200D[\u2194\u2195]\uFE0F?)?|\uDEB6(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?)|\uD83E(?:[\uDD0C\uDD0F\uDD18-\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5\uDEC3-\uDEC5\uDEF0\uDEF2-\uDEF8](?:\uD83C[\uDFFB-\uDFFF])?|[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD\uDDCF\uDDD4\uDDD6-\uDDDD](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDDDE\uDDDF](?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD0D\uDD0E\uDD10-\uDD17\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCC\uDDD0\uDDE0-\uDDFF\uDE70-\uDE7C\uDE80-\uDE88\uDE90-\uDEBD\uDEBF-\uDEC2\uDECE-\uDEDB\uDEE0-\uDEE8]|\uDD3C(?:\u200D[\u2640\u2642]\uFE0F?|\uD83C[\uDFFB-\uDFFF])?|\uDDCE(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDDD1(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1|\uDDD1\u200D\uD83E\uDDD2(?:\u200D\uD83E\uDDD2)?|\uDDD2(?:\u200D\uD83E\uDDD2)?))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?))?|\uDEF1(?:\uD83C(?:\uDFFB(?:\u200D\uD83E\uDEF2\uD83C[\uDFFC-\uDFFF])?|\uDFFC(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFD-\uDFFF])?|\uDFFD(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])?|\uDFFE(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFD\uDFFF])?|\uDFFF(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFE])?))?)/g,I=new RegExp(`${_.source}|${N.source}`,"g"),P=/[、,。?!;:……「」“”‘’*()【】〔〕〖〗〘〙〚〛《》———﹝﹞–—\\/·.,!?;:`~<>()[\]{}'"|]/,x=new RegExp(`^[${M}\n]`);function D(e,t){let n;return function(...r){n&&window.clearTimeout(n),n=window.setTimeout(()=>{e.apply(this,r)},t)}}function A(e,t){let n,r=0;return function(...i){const s=Date.now();s-r>=t?(window.clearTimeout(n),e.apply(this,i),r=s):(window.clearTimeout(n),n=window.setTimeout(()=>{e.apply(this,i),r=s},t))}}function F(e,t){if(!e||"object"!==typeof e)return e;let n={};return Array.isArray(e)?n=e.map(e=>F(e,t)):Object.keys(e).forEach(r=>{if(!t.includes(r))return n[r]=F(e[r],t)}),n}function Y(e){if(!e||"object"!==typeof e)return e;let t={};return Array.isArray(e)?t=e.map(e=>Y(e)):Object.keys(e).forEach(n=>t[n]=Y(e[n])),t}function H(e){return e&&1===e.nodeType&&"body"===e.tagName.toLowerCase()}function k(e,t,n){if(e&&!H(e)){e=n?e:e.parentNode;while(e){if(!t||t(e)||H(e))return t&&!t(e)&&H(e)?null:e;e=e.parentNode}}return null}function V(){function e(){return(65536*(1+Math.random())|0).toString(16).substring(1)}return e()+e()+"-"+e()+"-"+e()+"-"+e()+"-"+e()+e()+e()}function U(e){const t=[];if(Intl.Segmenter){const n=new Intl.Segmenter,r=n.segment(e);for(const{segment:e}of r)t.push(e)}else{const n=new Map;for(const t of e.matchAll(I))n.set(t.index,t[0]);let r=0;while(r<e.length){const i=n.get(r);i?(t.push(i),r+=i.length):(t.push(e[r]),r++)}}return t}function W(e,t){const n=document.createElement("a");n.href=e,n.download=t,n.click()}function X(e,t){j(3,e,t)}function j(e,t,n){let r=0,i=0;const s=function(t){const s=(new Date).getTime();r=s-i<300?r+1:0,i=(new Date).getTime(),r>=e-1&&(n(t),r=0)};t.addEventListener("click",s)}function Z(e){return"[object Object]"===Object.prototype.toString.call(e)}function Q(e){return Array.isArray(e)}function K(e,t){if(Z(e)&&Z(t)){const n=t;for(const[t,r]of Object.entries(e))n[t]?n[t]=K(r,n[t]):n[t]=r}else Q(e)&&Q(t)&&t.push(...e);return t}function G(e){setTimeout(()=>{e()},0)}function B(e){const t=["零","一","二","三","四","五","六","七","八","九"],n=["","十","百","千","万","十","百","千","亿","十","百","千","万","十","百","千","亿"];if(!e||isNaN(e))return"零";const r=e.toString().split("");let i="";for(let s=0;s<r.length;s++){const e=r.length-1-s;i=`${n[s]}${i}`,i=`${t[Number(r[e])]}${i}`}return i=i.replace(/零(千|百|十)/g,"零").replace(/十零/g,"十"),i=i.replace(/零+/g,"零"),i=i.replace(/零亿/g,"亿").replace(/零万/g,"万"),i=i.replace(/亿万/g,"亿"),i=i.replace(/零+$/,""),i=i.replace(/^一十/g,"十"),i}function J(e,t,n){for(let r=0;r<e.length;r++){const i=e[r],s=t[i];void 0!==s?n[i]=s:delete n[i]}}function z(e,t){const n={};for(const r in e)t.includes(r)&&(n[r]=e[r]);return n}function $(e,t){const n={};for(const r in e)t.includes(r)||(n[r]=e[r]);return n}function q(e){const t=new TextEncoder,n=t.encode(e),r=Array.from(n,e=>String.fromCharCode(e)),i=window.btoa(r.join(""));return i}function ee(e){let t=e.parentElement;while(t){const e=window.getComputedStyle(t),n=e.getPropertyValue("overflow-y");if(t.scrollHeight>t.clientHeight&&("auto"===n||"scroll"===n))return t;t=t.parentElement}return document.documentElement}function te(e,t){return e.length===t.length&&!e.some(e=>!t.includes(e))}function ne(e,t){if(!Z(e)||!Z(t))return!1;const n=Object.keys(e),r=Object.keys(t);return n.length===r.length&&!n.some(n=>t[n]!==e[n])}function re(e,t){const n=e.x,r=e.x+e.width,i=e.y,s=e.y+e.height,o=t.x,a=t.x+t.width,l=t.y,c=t.y+t.height;return!(n>a||r<o||i>c||s<l)}function ie(e){return void 0===e||null===e}function se(e){return e.replace(/\r\n|\r/g,"\n")}const oe=12,ae={width:1,color:"#000000",dragWidth:2,dragColor:"#0000FF"},le="editor-component",ce="ce",ue=ce+"-clipboard";var he,de;(function(e){e["UP"]="top",e["DOWN"]="down",e["LEFT"]="left",e["RIGHT"]="right"})(he||(he={})),function(e){e["TEXT"]="text",e["IMAGE"]="image",e["TABLE"]="table",e["HYPERLINK"]="hyperlink",e["SUPERSCRIPT"]="superscript",e["SUBSCRIPT"]="subscript",e["SEPARATOR"]="separator",e["PAGE_BREAK"]="pageBreak",e["CONTROL"]="control",e["AREA"]="area",e["CHECKBOX"]="checkbox",e["RADIO"]="radio",e["LATEX"]="latex",e["TAB"]="tab",e["DATE"]="date",e["BLOCK"]="block",e["TITLE"]="title",e["LIST"]="list"}(de||(de={}));const me=["bold","color","highlight","font","size","italic","underline","strikeout","textDecoration"],ge=["rowFlex","rowMargin"],pe=["type","font","size","bold","color","italic","highlight","underline","strikeout","rowFlex","url","areaId","hyperlinkId","dateId","dateFormat","groupIds","rowMargin","textDecoration"],fe=["type","font","size","bold","color","italic","highlight","underline","strikeout","rowFlex","rowMargin","dashArray","trList","borderType","borderColor","width","height","url","colgroup","valueList","control","checkbox","radio","dateFormat","block","level","title","listType","listStyle","listWrap","groupIds","conceptId","imgDisplay","imgFloatPosition","textDecoration","extension","externalId","areaId","area"],Re=["conceptId","extension","externalId","verticalAlign","backgroundColor","borderTypes","slashTypes"],ye=["tdId","trId","tableId"],Me=["level","titleId","title"],Se=["listId","listType","listStyle"],be=["control","controlId","controlComponent"],we=["font","size","bold","highlight","italic","strikeout"],Te=["areaId","area"],Oe=[...ye,...Me,...Se,...Te],ve=[de.TEXT,de.HYPERLINK,de.SUBSCRIPT,de.SUPERSCRIPT,de.CONTROL,de.DATE],Ee=[de.IMAGE,de.LATEX],Ce=[de.BLOCK,de.PAGE_BREAK,de.SEPARATOR,de.TABLE],Le=["HR","TABLE","UL","OL"],Ne=[de.TITLE,de.LIST];class _e{constructor(e){d(this,"draw"),d(this,"options"),d(this,"imageCache"),d(this,"container"),d(this,"floatImageContainer"),d(this,"floatImage"),this.draw=e,this.options=e.getOptions(),this.container=e.getContainer(),this.imageCache=new Map,this.floatImageContainer=null,this.floatImage=null}createFloatImage(e){const{scale:t}=this.options;let n=this.floatImageContainer,r=this.floatImage;n||(n=document.createElement("div"),n.classList.add(ce+"-float-image"),this.container.append(n),this.floatImageContainer=n),r||(r=document.createElement("img"),n.append(r),this.floatImage=r),n.style.display="none",r.style.width=e.width*t+"px",r.style.height=e.height*t+"px";const i=this.draw.getHeight(),s=this.draw.getPageGap(),o=this.draw.getPageNo()*(i+s),a=e.imgFloatPosition;n.style.left=a.x+"px",n.style.top=o+a.y+"px",r.src=e.value}dragFloatImage(e,t){if(!this.floatImageContainer)return;this.floatImageContainer.style.display="block";const n=parseFloat(this.floatImageContainer.style.left)+e,r=parseFloat(this.floatImageContainer.style.top)+t;this.floatImageContainer.style.left=n+"px",this.floatImageContainer.style.top=r+"px"}destroyFloatImage(){this.floatImageContainer&&(this.floatImageContainer.style.display="none")}addImageObserver(e){this.draw.getImageObserver().add(e)}getFallbackImage(e,t){const n=8,r=(e-Math.ceil(e/n)*n)/2,i=(t-Math.ceil(t/n)*n)/2,s=`<svg xmlns="http://www.w3.org/2000/svg" width="${e}" height="${t}" viewBox="0 0 ${e} ${t}">\n <rect width="${e}" height="${t}" fill="url(#mosaic)" />\n <defs>\n <pattern id="mosaic" x="${r}" y="${i}" width="${2*n}" height="${2*n}" patternUnits="userSpaceOnUse">\n <rect width="${n}" height="${n}" fill="#cccccc" />\n <rect width="${n}" height="${n}" fill="#cccccc" transform="translate(${n}, ${n})" />\n </pattern>\n </defs>\n </svg>`,o=new Image;return o.src="data:image/svg+xml;base64,"+q(s),o}render(e,t,n,r){const{scale:i}=this.options,s=t.width*i,o=t.height*i;if(this.imageCache.has(t.value)){const i=this.imageCache.get(t.value);e.drawImage(i,n,r,s,o)}else{const i=new Promise((i,a)=>{const l=new Image;l.setAttribute("crossOrigin","Anonymous"),l.src=t.value,l.onload=()=>{this.imageCache.set(t.value,l),i(t),t.imgDisplay===f.FLOAT_BOTTOM?this.draw.render({isCompute:!1,isSetCursor:!1,isSubmitHistory:!1}):e.drawImage(l,n,r,s,o)},l.onerror=i=>{const l=this.getFallbackImage(s,o);l.onload=()=>{e.drawImage(l,n,r,s,o),this.imageCache.set(t.value,l)},a(i)}});this.addImageObserver(i)}}}const Ie="R".charCodeAt(0);function Pe(e){return null==De[e]&&xe(e),De[e]}function xe(e){const t=Ae[e];if(null==t)return;const n=t.substring(3,5),r=1*n.charCodeAt(0)-Ie,i=1*n.charCodeAt(1)-Ie,s=t.substring(5),o=[[]];let a=1/0,l=-1/0,c=1/0,u=-1/0,h=0;while(h<s.length){const e=s.substring(h,h+2);if(" R"==e)o.push([]);else{const t=e.charCodeAt(0)-Ie-r,n=e.charCodeAt(1)-Ie;a=Math.min(n,a),l=Math.max(n,l),c=Math.min(t,c),u=Math.max(t,u),o[o.length-1].push([t,n])}h+=2}De[e]={w:i-r,xmin:c,xmax:u,ymin:a,ymax:l,polylines:o}}const De={},Ae={1:" 9MWRMNV RRMVV RPSTS",2:" 16MWOMOV ROMSMUNUPSQ ROQSQURUUSVOV",3:" 11MXVNTMRMPNOPOSPURVTVVU",4:" 12MWOMOV ROMRMTNUPUSTURVOV",5:" 12MWOMOV ROMUM ROQSQ ROVUV",6:" 9MVOMOV ROMUM ROQSQ",7:" 15MXVNTMRMPNOPOSPURVTVVUVR RSRVR",8:" 9MWOMOV RUMUV ROQUQ",9:" 3PTRMRV",10:" 7NUSMSTRVPVOTOS",11:" 9MWOMOV RUMOS RQQUV",12:" 6MVOMOV ROVUV",13:" 12LXNMNV RNMRV RVMRV RVMVV",14:" 9MWOMOV ROMUV RUMUV",15:" 14MXRMPNOPOSPURVSVUUVSVPUNSMRM",16:" 10MWOMOV ROMSMUNUQSROR",17:" 17MXRMPNOPOSPURVSVUUVSVPUNSMRM RSTVW",18:" 13MWOMOV ROMSMUNUQSROR RRRUV",19:" 13MWUNSMQMONOOPPTRUSUUSVQVOU",20:" 6MWRMRV RNMVM",21:" 9MXOMOSPURVSVUUVSVM",22:" 6MWNMRV RVMRV",23:" 12LXNMPV RRMPV RRMTV RVMTV",24:" 6MWOMUV RUMOV",25:" 7MWNMRQRV RVMRQ",26:" 9MWUMOV ROMUM ROVUV",27:" 9MWRMNV RRMVV RPSTS",28:" 16MWOMOV ROMSMUNUPSQ ROQSQURUUSVOV",29:" 6MVOMOV ROMUM",30:" 9MWRMNV RRMVV RNVVV",31:" 12MWOMOV ROMUM ROQSQ ROVUV",32:" 9MWUMOV ROMUM ROVUV",33:" 9MWOMOV RUMUV ROQUQ",34:" 20MXRMPNOPOSPURVSVUUVSVPUNSMRM RQQTR RTQQR",35:" 3PTRMRV",36:" 9MWOMOV RUMOS RQQUV",37:" 6MWRMNV RRMVV",38:" 12LXNMNV RNMRV RVMRV RVMVV",39:" 9MWOMOV ROMUV RUMUV",40:" 12MWOMUM RPQTR RTQPR ROVUV",41:" 14MXRMPNOPOSPURVSVUUVSVPUNSMRM",42:" 9MWOMOV RUMUV ROMUM",43:" 10MWOMOV ROMSMUNUQSROR",44:" 10MWOMRQOV ROMUM ROVUV",45:" 6MWRMRV RNMVM",46:" 15MWNONNOMPMQNRPRV RVOVNUMTMSNRP",47:" 13LXRMRV RPONPNSPTTTVSVPTOPO",48:" 6MWOMUV RUMOV",49:" 12LXRMRV RNOOPOSQTSTUSUPVO",50:" 13MXOVQVOROPPNRMSMUNVPVRTVVV",200:" 12MWRMPNOPOSPURVTUUSUPTNRM",201:" 4MWPORMRV",202:" 9MWONQMSMUNUPTROVUV",203:" 15MWONQMSMUNUPSQ RRQSQURUUSVQVOU",204:" 7MWSMSV RSMNSVS",205:" 14MWPMOQQPRPTQUSTURVQVOU RPMTM",206:" 14MWTMRMPNOPOSPURVTUUSTQRPPQOS",207:" 6MWUMQV ROMUM",208:" 19MWQMONOPQQSQUPUNSMQM RQQOROUQVSVUUURSQ",209:" 14MWUPTRRSPROPPNRMTNUPUSTURVPV",210:" 6PURURVSVSURU",211:" 7PUSVRVRUSUSWRY",212:" 12PURPRQSQSPRP RRURVSVSURU",213:" 13PURPRQSQSPRP RSVRVRUSUSWRY",214:" 12PURMRR RSMSR RRURVSVSURU",215:" 17NWPNRMSMUNUPRQRRSRSQUP RRURVSVSURU",216:" 3PTRMRQ",217:" 6NVPMPQ RTMTQ",218:" 10NVQMPNPPQQSQTPTNSMQM",219:" 16MWUNSMQMONOPQQTRUSUUSVQVOU RRLRW",220:" 3MWVLNW",221:" 7OVTLRNQPQSRUTW",222:" 7NUPLRNSPSSRUPW",223:" 3PTRLRW",224:" 3LXNRVR",225:" 6LXRNRV RNRVR",226:" 6LXNPVP RNTVT",227:" 6MWOOUU RUOOU",228:" 9MWRORU ROPUT RUPOT",229:" 6PURQRRSRSQRQ",230:" 7PUSMRORQSQSPRP",231:" 7PUSNRNRMSMSORQ",232:" 7LXSOVRSU RNRVR",233:" 12MXRLPW RULSW ROPVP ROSVS",234:" 21LXVRURTSSURVOVNUNSORRQSPSNRMPMONOPQSSUUVVV",235:" 20LXNNOQOSNV RVNUQUSVV RNNQOSOVN RNVQUSUVV",501:" 9I[RFJ[ RRFZ[ RMTWT",502:" 24G\\KFK[ RKFTFWGXHYJYLXNWOTP RKPTPWQXRYTYWXYWZT[K[",503:" 19H]ZKYIWGUFQFOGMILKKNKSLVMXOZQ[U[WZYXZV",504:" 16G\\KFK[ RKFRFUGWIXKYNYSXVWXUZR[K[",505:" 12H[LFL[ RLFYF RLPTP RL[Y[",506:" 9HZLFL[ RLFYF RLPTP",507:" 23H]ZKYIWGUFQFOGMILKKNKSLVMXOZQ[U[WZYXZVZS RUSZS",508:" 9G]KFK[ RYFY[ RKPYP",509:" 3NVRFR[",510:" 11JZVFVVUYTZR[P[NZMYLVLT",511:" 9G\\KFK[ RYFKT RPOY[",512:" 6HYLFL[ RL[X[",513:" 12F^JFJ[ RJFR[ RZFR[ RZFZ[",514:" 9G]KFK[ RKFY[ RYFY[",515:" 22G]PFNGLIKKJNJSKVLXNZP[T[VZXXYVZSZNYKXIVGTFPF",516:" 14G\\KFK[ RKFTFWGXHYJYMXOWPTQKQ",517:" 25G]PFNGLIKKJNJSKVLXNZP[T[VZXXYVZSZNYKXIVGTFPF RSWY]",518:" 17G\\KFK[ RKFTFWGXHYJYLXNWOTPKP RRPY[",519:" 21H\\YIWGTFPFMGKIKKLMMNOOUQWRXSYUYXWZT[P[MZKX",520:" 6JZRFR[ RKFYF",521:" 11G]KFKULXNZQ[S[VZXXYUYF",522:" 6I[JFR[ RZFR[",523:" 12F^HFM[ RRFM[ RRFW[ R\\FW[",524:" 6H\\KFY[ RYFK[",525:" 7I[JFRPR[ RZFRP",526:" 9H\\YFK[ RKFYF RK[Y[",527:" 9I[RFJ[ RRFZ[ RMTWT",528:" 24G\\KFK[ RKFTFWGXHYJYLXNWOTP RKPTPWQXRYTYWXYWZT[K[",529:" 6HYLFL[ RLFXF",530:" 9I[RFJ[ RRFZ[ RJ[Z[",531:" 12H[LFL[ RLFYF RLPTP RL[Y[",532:" 9H\\YFK[ RKFYF RK[Y[",533:" 9G]KFK[ RYFY[ RKPYP",534:" 25G]PFNGLIKKJNJSKVLXNZP[T[VZXXYVZSZNYKXIVGTFPF ROPUP",535:" 3NVRFR[",536:" 9G\\KFK[ RYFKT RPOY[",537:" 6I[RFJ[ RRFZ[",538:" 12F^JFJ[ RJFR[ RZFR[ RZFZ[",539:" 9G]KFK[ RKFY[ RYFY[",540:" 9I[KFYF ROPUP RK[Y[",541:" 22G]PFNGLIKKJNJSKVLXNZP[T[VZXXYVZSZNYKXIVGTFPF",542:" 9G]KFK[ RYFY[ RKFYF",543:" 14G\\KFK[ RKFTFWGXHYJYMXOWPTQKQ",544:" 10I[KFRPK[ RKFYF RK[Y[",545:" 6JZRFR[ RKFYF",546:" 19I[KKKILGMFOFPGQIRMR[ RYKYIXGWFUFTGSIRM",547:" 21H\\RFR[ RPKMLLMKOKRLTMUPVTVWUXTYRYOXMWLTKPK",548:" 6H\\KFY[ RK[YF",549:" 18G]RFR[ RILJLKMLQMSNTQUSUVTWSXQYMZL[L",550:" 17H\\K[O[LTKPKLLINGQFSFVGXIYLYPXTU[Y[",551:" 20G[G[IZLWOSSLVFV[UXSUQSNQLQKRKTLVNXQZT[Y[",552:" 41F]SHTITLSPRSQUOXMZK[J[IZIWJRKOLMNJPHRGUFXFZG[I[KZMYNWOTP RSPTPWQXRYTYWXYWZU[R[PZOX",553:" 24H\\TLTMUNWNYMZKZIYGWFTFQGOIMLLNKRKVLYMZO[Q[TZVXWV",554:" 35G^TFRGQIPMOSNVMXKZI[G[FZFXGWIWKXMZP[S[VZXXZT[O[KZHYGWFTFRHRJSMUPWRZT\\U",555:" 28H\\VJVKWLYLZKZIYGVFRFOGNINLONPOSPPPMQLRKTKWLYMZP[S[VZXXYV",556:" 28H\\RLPLNKMINGQFTFXG[G]F RXGVNTTRXPZN[L[JZIXIVJULUNV RQPZP",557:" 29G^G[IZMVPQQNRJRGQFPFOGNINLONQOUOXNYMZKZQYVXXVZS[O[LZJXIVIT",558:" 38F^MMKLJJJIKGMFNFPGQIQKPONULYJ[H[GZGX RMRVOXN[L]J^H^G]F\\FZHXLVRUWUZV[W[YZZY\\V",559:" 25IZWVUTSQROQLQIRGSFUFVGWIWLVQTVSXQZO[M[KZJXJVKUMUOV",560:" 25JYT^R[PVOPOJPGRFTFUGVJVMURR[PaOdNfLgKfKdLaN^P\\SZWX",561:" 39F^MMKLJJJIKGMFNFPGQIQKPONULYJ[H[GZGX R^I^G]F\\FZGXIVLTNROPO RROSQSXTZU[V[XZYY[V",562:" 29I\\MRORSQVOXMYKYHXFVFUGTISNRSQVPXNZL[J[IZIXJWLWNXQZT[V[YZ[X",563:" 45@aEMCLBJBICGEFFFHGIIIKHPGTE[ RGTJLLHMGOFPFRGSISKRPQTO[ RQTTLVHWGYFZF\\G]I]K\\PZWZZ[[\\[^Z_YaV",564:" 32E]JMHLGJGIHGJFKFMGNINKMPLTJ[ RLTOLQHRGTFVFXGYIYKXPVWVZW[X[ZZ[Y]V",565:" 29H]TFQGOIMLLNKRKVLYMZO[Q[TZVXXUYSZOZKYHXGVFTFRHRKSNUQWSZU\\V",566:" 31F_SHTITLSPRSQUOXMZK[J[IZIWJRKOLMNJPHRGUFZF\\G]H^J^M]O\\PZQWQUPTO",567:" 32H^ULTNSOQPOPNNNLOIQGTFWFYGZIZMYPWSSWPYNZK[I[HZHXIWKWMXPZS[V[YZ[X",568:" 38F_SHTITLSPRSQUOXMZK[J[IZIWJRKOLMNJPHRGUFYF[G\\H]J]M\\O[PYQVQSPTQUSUXVZX[ZZ[Y]V",569:" 28H\\H[JZLXOTQQSMTJTGSFRFQGPIPKQMSOVQXSYUYWXYWZT[P[MZKXJVJT",570:" 25H[RLPLNKMINGQFTFXG[G]F RXGVNTTRXPZN[L[JZIXIVJULUNV",571:" 33E]JMHLGJGIHGJFKFMGNINKMOLRKVKXLZN[P[RZSYUUXMZF RXMWQVWVZW[X[ZZ[Y]V",572:" 32F]KMILHJHIIGKFLFNGOIOKNOMRLVLYM[O[QZTWVTXPYMZIZGYFXFWGVIVKWNYP[Q",573:" 25C_HMFLEJEIFGHFIFKGLILLK[ RUFK[ RUFS[ RaF_G\\JYNVTS[",574:" 36F^NLLLKKKILGNFPFRGSISLQUQXRZT[V[XZYXYVXUVU R]I]G\\FZFXGVITLPUNXLZJ[H[GZGX",575:" 38F]KMILHJHIIGKFLFNGOIOKNOMRLVLXMZN[P[RZTXVUWSYM R[FYMVWT]RbPfNgMfMdNaP^S[VY[V",576:" 40H]ULTNSOQPOPNNNLOIQGTFWFYGZIZMYPWTTWPZN[K[JZJXKWNWPXQYR[R^QaPcNfLgKfKdLaN^Q[TYZV",583:" 9I[JFR[ RZFR[ RJFZF",601:" 18I\\XMX[ RXPVNTMQMONMPLSLUMXOZQ[T[VZXX",602:" 18H[LFL[ RLPNNPMSMUNWPXSXUWXUZS[P[NZLX",603:" 15I[XPVNTMQMONMPLSLUMXOZQ[T[VZXX",604:" 18I\\XFX[ RXPVNTMQMONMPLSLUMXOZQ[T[VZXX",605:" 18I[LSXSXQWOVNTMQMONMPLSLUMXOZQ[T[VZXX",606:" 9MYWFUFSGRJR[ ROMVM",607:" 23I\\XMX]W`VaTbQbOa RXPVNTMQMONMPLSLUMXOZQ[T[VZXX",608:" 11I\\MFM[ RMQPNRMUMWNXQX[",609:" 9NVQFRGSFREQF RRMR[",610:" 12MWRFSGTFSERF RSMS^RaPbNb",611:" 9IZMFM[ RWMMW RQSX[",612:" 3NVRFR[",613:" 19CaGMG[ RGQJNLMOMQNRQR[ RRQUNWMZM\\N]Q][",614:" 11I\\MMM[ RMQPNRMUMWNXQX[",615:" 18I\\QMONMPLSLUMXOZQ[T[VZXXYUYSXPVNTMQM",616:" 18H[LMLb RLPNNPMSMUNWPXSXUWXUZS[P[NZLX",617:" 18I\\XMXb RXPVNTMQMONMPLSLUMXOZQ[T[VZXX",618:" 9KXOMO[ ROSPPRNTMWM",619:" 18J[XPWNTMQMNNMPNRPSUTWUXWXXWZT[Q[NZMX",620:" 9MYRFRWSZU[W[ ROMVM",621:" 11I\\MMMWNZP[S[UZXW RXMX[",622:" 6JZLMR[ RXMR[",623:" 12G]JMN[ RRMN[ RRMV[ RZMV[",624:" 6J[MMX[ RXMM[",625:" 10JZLMR[ RXMR[P_NaLbKb",626:" 9J[XMM[ RMMXM RM[X[",627:" 24H]QMONMPLRKUKXLZN[P[RZUWWTYPZM RQMSMTNUPWXXZY[Z[",628:" 31I\\UFSGQIOMNPMTLZKb RUFWFYHYKXMWNUORO RROTPVRWTWWVYUZS[Q[OZNYMV",629:" 17I\\JPLNNMOMQNROSRSVR[ RZMYPXRR[P_Ob",630:" 24I[TMQMONMPLSLVMYNZP[R[TZVXWUWRVOTMRKQIQGRFTFVGXI",631:" 19JZWOVNTMQMONOPPRSS RSSOTMVMXNZP[S[UZWX",632:" 23JYTFRGQHQIRJUKXK RXKTMQONRMUMWNYP[S]T_TaSbQbP`",633:" 19H\\IQJOLMNMONOPNTL[ RNTPPRNTMVMXOXRWWTb",634:" 27G\\HQIOKMMMNNNPMUMXNZO[Q[SZUWVUWRXMXJWGUFSFRHRJSMUPWRZT",635:" 9LWRMPTOXOZP[R[TYUW",636:" 19I[OMK[ RYNXMWMUNQROSNS RNSPTQUSZT[U[VZ",637:" 9JZKFMFOGPHX[ RRML[",638:" 21H]OMIb RNQMVMYO[Q[SZUXWT RYMWTVXVZW[Y[[Y\\W",639:" 14I[LMOMNSMXL[ RYMXPWRUURXOZL[",640:" 29JZTFRGQHQIRJUKXK RUKRLPMOOOQQSTTVT RTTPUNVMXMZO\\S^T_TaRbPb",641:" 18J[RMPNNPMSMVNYOZQ[S[UZWXXUXRWOVNTMRM",642:" 13G]PML[ RUMVSWXX[ RIPKNNM[M",643:" 19I[MSMVNYOZQ[S[UZWXXUXRWOVNTMRMPNNPMSIb",644:" 18I][MQMONMPLSLVMYNZP[R[TZVXWUWRVOUNSM",645:" 8H\\SMP[ RJPLNOMZM",646:" 16H\\IQJOLMNMONOPMVMYO[Q[TZVXXTYPYM",647:" 21G]ONMOKQJTJWKYLZN[Q[TZWXYUZRZOXMVMTORSPXMb",648:" 14I[KMMMOOU`WbYb RZMYOWRM]K`Jb",649:" 20F]VFNb RGQHOJMLMMNMPLULXMZO[Q[TZVXXUZP[M",650:" 23F]NMLNJQITIWJZK[M[OZQW RRSQWRZS[U[WZYWZTZQYNXM",651:" 22L\\UUTSRRPRNSMTLVLXMZO[Q[SZTXVRUWUZV[W[YZZY\\V",652:" 23M[MVOSRNSLTITGSFQGPIOMNTNZO[P[RZTXUUURVVWWYW[V",653:" 14MXTTTSSRQROSNTMVMXNZP[S[VYXV",654:" 24L\\UUTSRRPRNSMTLVLXMZO[Q[SZTXZF RVRUWUZV[W[YZZY\\V",655:" 17NXOYQXRWSUSSRRQROSNUNXOZQ[S[UZVYXV",656:" 24OWOVSQUNVLWIWGVFTGSIQQNZKaJdJfKgMfNcOZP[R[TZUYWV",657:" 28L[UUTSRRPRNSMTLVLXMZO[Q[SZTY RVRTYPdOfMgLfLdMaP^S\\U[XY[V",658:" 29M\\MVOSRNSLTITGSFQGPIOMNSM[ RM[NXOVQSSRURVSVUUXUZV[W[YZZY\\V",659:" 16PWSMSNTNTMSM RPVRRPXPZQ[R[TZUYWV",660:" 20PWSMSNTNTMSM RPVRRLdKfIgHfHdIaL^O\\Q[TYWV",661:" 33M[MVOSRNSLTITGSFQGPIOMNSM[ RM[NXOVQSSRURVSVUTVQV RQVSWTZU[V[XZYY[V",662:" 18OWOVQSTNULVIVGUFSGRIQMPTPZQ[R[TZUYWV",663:" 33E^EVGSIRJSJTIXH[ RIXJVLSNRPRQSQTPXO[ RPXQVSSURWRXSXUWXWZX[Y[[Z\\Y^V",664:" 23J\\JVLSNROSOTNXM[ RNXOVQSSRURVSVUUXUZV[W[YZZY\\V",665:" 23LZRRPRNSMTLVLXMZO[Q[SZTYUWUUTSRRQSQURWTXWXYWZV",666:" 24KZKVMSNQMUGg RMUNSPRRRTSUUUWTYSZQ[ RMZO[R[UZWYZV",667:" 27L[UUTSRRPRNSMTLVLXMZO[Q[SZ RVRUUSZPaOdOfPgRfScS\\U[XY[V",668:" 15MZMVOSPQPSSSTTTVSYSZT[U[WZXYZV",669:" 16NYNVPSQQQSSVTXTZR[ RNZP[T[VZWYYV",670:" 16OXOVQSSO RVFPXPZQ[S[UZVYXV RPNWN",671:" 19L[LVNRLXLZM[O[QZSXUU RVRTXTZU[V[XZYY[V",672:" 17L[LVNRMWMZN[O[RZTXUUUR RURVVWWYW[V",673:" 25I^LRJTIWIYJ[L[NZPX RRRPXPZQ[S[UZWXXUXR RXRYVZW\\W^V",674:" 20JZJVLSNRPRQSQZR[U[XYZV RWSVRTRSSOZN[L[KZ",675:" 23L[LVNRLXLZM[O[QZSXUU RVRPdOfMgLfLdMaP^S\\U[XY[V",676:" 23LZLVNSPRRRTTTVSXQZN[P\\Q^QaPdOfMgLfLdMaP^S\\WYZV",677:" 22J\\K[NZQXSVUSWOXKXIWGUFSGRHQJPOPTQXRZT[V[XZYY",683:" 26I[WUWRVOUNSMQMONMPLSLVMYNZP[R[TZVXWUXPXKWHVGTFRFPGNI",684:" 16JZWNUMRMPNNPMSMVNYOZQ[T[VZ RMTUT",685:" 23J[TFRGPJOLNOMTMXNZO[Q[SZUWVUWRXMXIWGVFTF RNPWP",686:" 21H\\VFNb RQMNNLPKSKVLXNZQ[S[VZXXYUYRXPVNSMQM",687:" 16I[XOWNTMQMNNMOLQLSMUOWSZT\\T^S_Q_",700:" 18H\\QFNGLJKOKRLWNZQ[S[VZXWYRYOXJVGSFQF",701:" 5H\\NJPISFS[",702:" 15H\\LKLJMHNGPFTFVGWHXJXLWNUQK[Y[",703:" 16H\\MFXFRNUNWOXPYSYUXXVZS[P[MZLYKW",704:" 7H\\UFKTZT RUFU[",705:" 18H\\WFMFLOMNPMSMVNXPYSYUXXVZS[P[MZLYKW",706:" 24H\\XIWGTFRFOGMJLOLTMXOZR[S[VZXXYUYTXQVOSNRNOOMQLT",707:" 6H\\YFO[ RKFYF",708:" 30H\\PFMGLILKMMONSOVPXRYTYWXYWZT[P[MZLYKWKTLRNPQOUNWMXKXIWGTFPF",709:" 24H\\XMWPURRSQSNRLPKMKLLINGQFRFUGWIXMXRWWUZR[P[MZLX",710:" 6MWRYQZR[SZRY",711:" 9MWSZR[QZRYSZS\\R^Q_",712:" 12MWRMQNROSNRM RRYQZR[SZRY",713:" 15MWRMQNROSNRM RSZR[QZRYSZS\\R^Q_",714:" 9MWRFRT RRYQZR[SZRY",715:" 21I[LKLJMHNGPFTFVGWHXJXLWNVORQRT RRYQZR[SZRY",716:" 3NVRFRM",717:" 6JZNFNM RVFVM",718:" 14KYQFOGNINKOMQNSNUMVKVIUGSFQF",719:" 27H\\PBP_ RTBT_ RYIWGTFPFMGKIKKLMMNOOUQWRXSYUYXWZT[P[MZKX",720:" 3G][BIb",721:" 11KYVBTDRGPKOPOTPYR]T`Vb",722:" 11KYNBPDRGTKUPUTTYR]P`Nb",723:" 3NVRBRb",724:" 3E_IR[R",725:" 6E_RIR[ RIR[R",726:" 6E_IO[O RIU[U",727:" 6G]KKYY RYKKY",728:" 9JZRLRX RMOWU RWOMU",729:" 6MWRQQRRSSRRQ",730:" 8MWSFRGQIQKRLSKRJ",731:" 8MWRHQGRFSGSIRKQL",732:" 9E_UMXP[RXTUW RIR[R",733:" 12H]SBLb RYBRb RLOZO RKUYU",734:" 35E_\\O\\N[MZMYNXPVUTXRZP[L[JZIYHWHUISJRQNRMSKSIRGPFNGMIMKNNPQUXWZY[[[\\Z\\Y",735:" 28G]IIJKKOKUJYI[ R[IZKYOYUZY[[ RIIKJOKUKYJ[I RI[KZOYUYYZ[[",737:" 6KYOBO[ RUBU[",738:" 6F^RBR[ RI[[[",739:" 4F^[BI[[[",740:" 18E_RIQJRKSJRI RIYHZI[JZIY R[YZZ[[\\Z[Y",741:" 33F^RHNLKPJSJUKWMXOXQWRU RRHVLYPZSZUYWWXUXSWRU RRUQYP\\ RRUSYT\\ RP\\T\\",742:" 26F^RNQKPINHMHKIJKJOKRLTNWR\\ RRNSKTIVHWHYIZKZOYRXTVWR\\",743:" 20F^RGPJLOIR RRGTJXO[R RIRLUPZR] R[RXUTZR]",744:" 48F^RTTWVXXXZW[U[SZQXPVPSQ RSQUOVMVKUISHQHOINKNMOOQQ RQQNPLPJQISIUJWLXNXPWRT RRTQYP\\ RRTSYT\\ RP\\T\\",745:" 55F^RRR[Q\\ RRVQ\\ RRIQHOHNINKONRR RRISHUHVIVKUNRR RRRNOLNJNIOIQJR RRRVOXNZN[O[QZR RRRNULVJVIUISJR RRRVUXVZV[U[SZR",746:" 55F^ISJSLTMVMXLZ RISIRJQLQMRNTNWMYLZ RRGPIOLOOQUQXPZR\\ RRGTIULUOSUSXTZR\\ R[S[RZQXQWRVTVWWYXZ R[SZSXTWVWXXZ RKVYV",750:" 18PSSRRSQSPRPQQPRPSQSSRUQV RQQQRRRRQQQ",751:" 16PTQPPQPSQTSTTSTQSPQP RRQQRRSSRRQ",752:" 9NVPOTU RTOPU RNRVR",753:" 28MWRKQMOPMR RRKSMUPWR RRMOQ RRMUQ RROPQ RROTQ RQQSQ RMRWR",754:" 26MWMRMQNOONQMSMUNVOWQWR RPNTN ROOUO RNPVP RNQVQ RMRWR",755:" 14LRLFLRRRLF RLIPQ RLLOR RLOMQ",756:" 10MWRKQMOPMR RRKSMUPWR",757:" 11MWWRWQVOUNSMQMONNOMQMR",758:" 13G]]R]P\\MZJWHTGPGMHJJHMGPGR",759:" 11MWMRMSNUOVQWSWUVVUWSWR",760:" 7LXLPNRQSSSVRXP",761:" 6RURUTTURTPRO",762:" 7RVRRUPVNVLUKTK",763:" 7NRRROPNNNLOKPK",764:" 21MWWHVGTFQFOGNHMJMLNNOOUSVTWVWXVZU[S\\P\\N[MZ",765:" 21G]IWHVGTGQHOINKMMMONPOTUUVWWYW[V\\U]S]P\\N[M",766:" 31G]RRTUUVWWYW[V\\U]S]Q\\O[NYMWMUNTOPUOVMWKWIVHUGSGQHOINKMMMONPORR",767:" 22H\\KFK[ RHF[FQP[Z RZV[Y\\[ RZVZY RWYZY RWYZZ\\[",768:" 30KYUARBPCNELHKLKRLUNWQXSXVWXUYR RKPLMNKQJSJVKXMYPYVXZV]T_R`Oa",796:" 3>f>RfR",797:" 3D`D``D",798:" 3RRR>Rf",799:" 3D`DD``",800:" 3D`DR`R",801:" 3F^FY^K",802:" 3KYK^YF",803:" 3RRRDR`",804:" 3KYKFY^",805:" 3F^FK^Y",806:" 3KYKRYR",807:" 3MWMWWM",808:" 3RRRKRY",809:" 3MWMMWW",810:" 8GRRGPGMHJJHMGPGR",811:" 8GRGRGTHWJZM\\P]R]",812:" 8R]R]T]W\\ZZ\\W]T]R",813:" 8R]]R]P\\MZJWHTGRG",814:" 9D`DOGQKSPTTTYS]Q`O",815:" 9PUUDSGQKPPPTQYS]U`",816:" 9OTODQGSKTPTTSYQ]O`",817:" 9D`DUGSKQPPTPYQ]S`U",818:" 5KYRJYNKVRZ",819:" 5JZJRNKVYZR",820:" 5KYKVKNYVYN",821:" 5JZLXJPZTXL",822:" 23JZJ]L]O\\Q[TXUVVSVOULTJSIQIPJOLNONSOVPXS[U\\X]Z]",823:" 23I]]Z]X\\U[SXPVOSNONLOJPIQISJTLUOVSVVUXT[Q\\O]L]J",824:" 23JZZGXGUHSIPLONNQNUOXPZQ[S[TZUXVUVQUNTLQIOHLGJG",825:" 23G[GJGLHOIQLTNUQVUVXUZT[S[QZPXOUNQNNOLPISHUGXGZ",826:" 21E[EPFRHTJUMVQVUUXSZP[NZLWLSMQNNPLSKVKYL\\M^",827:" 19EYETHVKWPWSVVTXQYNYLXKVKSLPNNQMTMYN\\P_",828:" 26OUQOOQOSQUSUUSUQSOQO RQPPQPSQTSTTSTQSPQP RRQQRRSSRRQ",829:" 11RWRMSMUNVOWQWSVUUVSWRW",830:" 9D`DRJR RORUR RZR`R",831:" 5D`DUDO`O`U",832:" 6JZRDJR RRDZR",833:" 9D`DR`R RJYZY RP`T`",834:" 9D`DR`R RDRRb R`RRb",840:" 18KYQKNLLNKQKSLVNXQYSYVXXVYSYQXNVLSKQK",841:" 6LXLLLXXXXLLL",842:" 5KYRJKVYVRJ",843:" 6LXRHLRR\\XRRH",844:" 12JZRIPOJOOSMYRUWYUSZOTORI",845:" 6KYRKRY RKRYR",846:" 6MWMMWW RWMMW",847:" 9MWRLRX RMOWU RWOMU",850:" 35NVQNOONQNSOUQVSVUUVSVQUOSNQN ROQOS RPPPT RQOQU RRORU RSOSU RTPTT RUQUS",851:" 27NVNNNVVVVNNN ROOOU RPOPU RQOQU RRORU RSOSU RTOTU RUOUU",852:" 17MWRLMUWURL RROOT RROUT RRRQT RRRST",853:" 17LULRUWUMLR RORTU RORTO RRRTS RRRTQ",854:" 17MWRXWOMORX RRUUP RRUOP RRRSP RRRQP",855:" 17OXXROMOWXR RURPO RURPU RRRPQ RRRPS",856:" 22LXRLNWXPLPVWRL RRRRL RRRLP RRRNW RRRVW RRRXP",857:" 11RYRKRY RRKYNRQ RSMVNSO",860:" 13MWRLRX ROOUO RMUOWQXSXUWWU",861:" 11LXRLRX RLQMOWOXQ RPWTW",862:" 14KYMNWX RWNMX ROLLOKQ RULXOYQ",863:" 18I[NII[ RVI[[ RMM[[ RWMI[ RNIVI RMMWM",864:" 21I[RGRV RMJWP RWJMP RIVL\\ R[VX\\ RIV[V RL\\X\\",865:" 11G[MJSV RKPSL RG\\[\\[RG\\",866:" 14LXPLPPLPLTPTPXTXTTXTXPTPTLPL",867:" 32KYYPXNVLSKQKNLLNKQKSLVNXQYSYVXXVYT RYPWNUMSMQNPOOQOSPUQVSWUWWVYT",868:" 10KYRJKVYVRJ RRZYNKNRZ",869:" 34G]PIPGQFSFTGTI RGZHXJVKTLPLKMJOIUIWJXKXPYTZV\\X]Z RGZ]Z RQZP[Q\\S\\T[SZ",870:" 64JZRMRS RRSQ\\ RRSS\\ RQ\\S\\ RRMQJPHNG RQJNG RRMSJTHVG RSJVG RRMNKLKJM RPLLLJM RRMVKXKZM RTLXLZM RRMPNOOOR RRMPOOR RRMTNUOUR RRMTOUR",871:" 94JZRIRK RRNRP RRSRU RRYQ\\ RRYS\\ RQ\\S\\ RRGQIPJ RRGSITJ RPJRITJ RRKPNNOMN RRKTNVOWN RNOPORNTOVO RRPPSNTLTKRKSLT RRPTSVTXTYRYSXT RNTPTRSTTVT RRUPXOYMZLZKYJWJYLZ RRUTXUYWZXZYYZWZYXZ RMZOZRYUZWZ",872:" 40JZRYQ\\ RRYS\\ RQ\\S\\ RRYUZXZZXZUYTWTYRZOYMWLUMVJUHSGQGOHNJOMMLKMJOKRMTKTJUJXLZOZRY",873:" 32JZRYQ\\ RRYS\\ RQ\\S\\ RRYVXVVXUXRZQZLYIXHVHTGPGNHLHKIJLJQLRLUNVNXRY",874:" 15I[IPKR RLKNP RRGRO RXKVP R[PYR",899:" 6QSRQQRRSSRRQ",900:" 10PTQPPQPSQTSTTSTQSPQP",901:" 14NVQNOONQNSOUQVSVUUVSVQUOSNQN",902:" 18MWQMONNOMQMSNUOVQWSWUVVUWSWQVOUNSMQM",903:" 18KYQKNLLNKQKSLVNXQYSYVXXVYSYQXNVLSKQK",904:" 22G]PGMHJJHMGPGTHWJZM\\P]T]W\\ZZ\\W]T]P\\MZJWHTGPG",905:" 34AcPALBJCGEEGCJBLAPATBXCZE]G_JaLbPcTcXbZa]__]aZbXcTcPbLaJ_G]EZCXBTAPA",906:" 34<hP<K=G?DAAD?G=K<P<T=Y?]A`DcGeKgPhThYg]e`cc`e]gYhThPgKeGcD`A]?Y=T<P<",907:" 50){O)I*E+@-;073370;-@+E*I)O)U*[+_-d0i3m7q;t@wEyIzO{U{[z_ydwitmqqmtiwdy_z[{U{OzIyEw@t;q7m3i0d-_+[*U)O)",908:" 34>fRAPCMDJDGCEA>H@JAMAZB]D_G`M`PaRc RRATCWDZD]C_AfHdJcMcZb]`_]`W`TaRc",909:" 33AcRAPCMDJDGCEABGAKAPBTDXG\\L`Rc RRATCWDZD]C_AbGcKcPbT`X]\\X`Rc RBHbH",997:" 3MWMXWX",998:" 3JZJZZZ",999:" 3JZJ]Z]",1001:" 18KYRKMX RRNVX RRKWX ROTTT RKXPX RTXYX",1002:" 35JZNKNX ROKOX RLKSKVLWNVPSQ RSKULVNUPSQ ROQSQVRWTWUVWSXLX RSQURVTVUUWSX",1003:" 24KYVLWKWOVLTKQKOLNMMPMSNVOWQXTXVWWU RQKOMNPNSOVQX",1004:" 26JZNKNX ROKOX RLKSKVLWMXPXSWVVWSXLX RSKULVMWPWSVVUWSX",1005:" 22JYNKNX ROKOX RSOSS RLKVKVOUK ROQSQ RLXVXVTUX",1006:" 20JXNKNX ROKOX RSOSS RLKVKVOUK ROQSQ RLXQX",1007:" 36K[VLWKWOVLTKQKOLNMMPMSNVOWQXTXVW RQKOMNPNSOVQX RTXUWVU RVSVX RWSWX RTSYS",1008:" 27J[NKNX ROKOX RVKVX RWKWX RLKQK RTKYK ROQVQ RLXQX RTXYX",1009:" 12NWRKRX RSKSX RPKUK RPXUX",1010:" 19LXSKSURWQX RTKTUSWQXPXNWMUNTOUNV RQKVK",1011:" 27JZNKNX ROKOX RWKOS RQQVX RRQWX RLKQK RTKYK RLXQX RTXYX",1012:" 14KXOKOX RPKPX RMKRK RMXWXWTVX",1013:" 30I\\MKMX RNNRX RNKRU RWKRX RWKWX RXKXX RKKNK RWKZK RKXOX RUXZX",1014:" 21JZNKNX ROMVX ROKVV RVKVX RLKOK RTKXK RLXPX",1015:" 32KZQKOLNMMPMSNVOWQXTXVWWVXSXPWMVLTKQK RQKOMNPNSOVQX RTXVVWSWPVMTK",1016:" 25JYNKNX ROKOX RLKSKVLWNWOVQSROR RSKULVNVOUQSR RLXQX",1017:" 47KZQKOLNMMPMSNVOWQXTXVWWVXSXPWMVLTKQK RQKOMNPNSOVQX RTXVVWSWPVMTK RPWPUQTSTTUUZV[W[XZ RTUUXVZW[",1018:" 37JZNKNX ROKOX RLKSKVLWNWOVQSROR RSKULVNVOUQSR RLXQX RSRTSUWVXWXXW RSRUSVWWX",1019:" 32KZVMWKWOVMULSKQKOLNMNOOPQQTRVSWT RNNOOQPTQVRWSWVVWTXRXPWOVNTNXOV",1020:" 16KZRKRX RSKSX RNKMOMKXKXOWK RPXUX",1021:" 20J[NKNUOWQXTXVWWUWK ROKOUPWQX RLKQK RUKYK",1022:" 15KYMKRX RNKRU RWKRX RKKPK RTKYK",1023:" 24I[LKOX RMKOT RRKOX RRKUX RSKUT RXKUX RJKOK RVKZK",1024:" 21KZNKVX ROKWX RWKNX RLKQK RTKYK RLXQX RTXYX",1025:" 20LYNKRRRX ROKSR RWKSRSX RLKQK RTKYK RPXUX",1026:" 16LYVKNX RWKOX ROKNONKWK RNXWXWTVX",1027:" 18KYRKMX RRNVX RRKWX ROTTT RKXPX RTXYX",1028:" 35JZNKNX ROKOX RLKSKVLWNVPSQ RSKULVNUPSQ ROQSQVRWTWUVWSXLX RSQURVTVUUWSX",1029:" 14KXOKOX RPKPX RMKWKWOVK RMXRX",1030:" 15KYRKLX RRMWX RRKXX RMWVW RLXXX",1031:" 22JYNKNX ROKOX RSOSS RLKVKVOUK ROQSQ RLXVXVTUX",1032:" 16LYVKNX RWKOX ROKNONKWK RNXWXWTVX",1033:" 27J[NKNX ROKOX RVKVX RWKWX RLKQK RTKYK ROQVQ RLXQX RTXYX",1034:" 44KZQKOLNMMPMSNVOWQXTXVWWVXSXPWMVLTKQK RQKOMNPNSOVQX RTXVVWSWPVMTK RQOQT RTOTT RQQTQ RQRTR",1035:" 12NWRKRX RSKSX RPKUK RPXUX",1036:" 27JZNKNX ROKOX RWKOS RQQVX RRQWX RLKQK RTKYK RLXQX RTXYX",1037:" 15KYRKMX RRNVX RRKWX RKXPX RTXYX",1038:" 30I\\MKMX RNNRX RNKRU RWKRX RWKWX RXKXX RKKNK RWKZK RKXOX RUXZX",1039:" 21JZNKNX ROMVX ROKVV RVKVX RLKOK RTKXK RLXPX",1040:" 36JZMJLM RXJWM RPPOS RUPTS RMVLY RXVWY RMKWK RMLWL RPQTQ RPRTR RMWWW RMXWX",1041:" 32KZQKOLNMMPMSNVOWQXTXVWWVXSXPWMVLTKQK RQKOMNPNSOVQX RTXVVWSWPVMTK",1042:" 21J[NKNX ROKOX RVKVX RWKWX RLKYK RLXQX RTXYX",1043:" 25JYNKNX ROKOX RLKSKVLWNWOVQSROR RSKULVNVOUQSR RLXQX",1044:" 20K[MKRQ RNKSQMX RMKWKXOVK RNWWW RMXWXXTVX",1045:" 16KZRKRX RSKSX RNKMOMKXKXOWK RPXUX",1046:" 33KZMONLOKPKQLRORX RXOWLVKUKTLSOSX RMONMOLPLQMRO RXOWMVLULTMSO RPXUX",1047:" 40KZRKRX RSKSX RQNNOMQMRNTQUTUWTXRXQWOTNQN RQNOONQNROTQU RTUVTWRWQVOTN RPKUK RPXUX",1048:" 21KZNKVX ROKWX RWKNX RLKQK RTKYK RLXQX RTXYX",1049:" 33J[RKRX RSKSX RLPMONOOSQU RTUVSWOXOYP RMONROTQUTUVTWRXO RPKUK RPXUX",1050:" 35KZMVNXQXMRMONMOLQKTKVLWMXOXRTXWXXV ROUNRNOOMQK RTKVMWOWRVU RNWPW RUWWW",1051:" 18KYTKKX RSMTX RTKUX RNTTT RIXNX RRXWX",1052:" 34JYPKLX RQKMX RNKUKWLWNVPSQ RUKVLVNUPSQ ROQRQTRUSUUTWQXJX RRQTSTUSWQX",1053:" 25KXVLWLXKWNVLTKRKPLOMNOMRMUNWPXRXTWUU RRKPMOONRNVPX",1054:" 26JYPKLX RQKMX RNKTKVLWNWQVTUVTWQXJX RTKULVNVQUTTVSWQX",1055:" 22JYPKLX RQKMX RSORS RNKXKWNWK ROQRQ RJXTXUUSX",1056:" 20JXPKLX RQKMX RSORS RNKXKWNWK ROQRQ RJXOX",1057:" 33KYVLWLXKWNVLTKRKPLOMNOMRMUNWPXRXTWUVVS RRKPMOONRNVPX RRXTVUS RSSXS",1058:" 27J[PKLX RQKMX RXKTX RYKUX RNKSK RVK[K ROQVQ RJXOX RRXWX",1059:" 12NWTKPX RUKQX RRKWK RNXSX",1060:" 19LXUKRUQWPX RVKSURWPXOXMWLUMTNUMV RSKXK",1061:" 27JZPKLX RQKMX RYKOR RRPTX RSPUX RNKSK RVK[K RJXOX RRXWX",1062:" 14KXQKMX RRKNX ROKTK RKXUXVUTX",1063:" 30I\\OKKX ROMPX RPKQV RYKPX RYKUX RZKVX RMKPK RYK\\K RIXMX RSXXX",1064:" 21JZPKLX RPKTX RQKTU RXKTX RNKQK RVKZK RJXNX",1065:" 32KYRKPLOMNOMRMUNWPXRXTWUVVTWQWNVLTKRK RRKPMOONRNVPX RRXTVUTVQVMTK",1066:" 24JYPKLX RQKMX RNKUKWLXMXOWQTROR RUKWMWOVQTR RJXOX",1067:" 46KYRKPLOMNOMRMUNWPXRXTWUVVTWQWNVLTKRK RRKPMOONRNVPX RRXTVUTVQVMTK ROWOVPUQURVRZS[T[UZ RRVSZT[",1068:" 35JZPKLX RQKMX RNKUKWLXMXOWQTROR RUKWMWOVQTR RSRTWUXVXWW RSRTSUWVX RJXOX",1069:" 28KZWLXLYKXNWLUKRKPLOMOOPPUSVT RONPOURVSVVUWSXPXNWMULXMWNW",1070:" 16KZTKPX RUKQX RPKNNOKZKYNYK RNXSX",1071:" 20J[PKMUMWOXSXUWVUYK RQKNUNWOX RNKSK RWK[K",1072:" 15KYOKPX RPKQV RYKPX RMKRK RVK[K",1073:" 24I[NKMX ROKNV RTKMX RTKSX RUKTV RZKSX RLKQK RXK\\K",1074:" 21KZPKTX RQKUX RYKLX RNKSK RVK[K RJXOX RRXWX",1075:" 20LYPKRQPX RQKSQ RYKSQQX RNKSK RVK[K RNXSX",1076:" 16LYXKLX RYKMX RQKONPKYK RLXUXVUTX",1101:" 32LZQOPPPQOQOPQOTOVQVWWXXX RTOUQUWWX RURRSPTOUOWPXSXTWUU RRSPUPWQX",1102:" 29JYNKNX ROKOX RORPPROTOVPWRWUVWTXRXPWOU RTOUPVRVUUWTX RLKOK",1103:" 24LXVQUQURVRVQUPSOQOOPNRNUOWQXSXUWVV RQOPPOROUPWQX",1104:" 32L[VKVX RWKWX RVRUPSOQOOPNRNUOWQXSXUWVU RQOPPOROUPWQX RTKWK RVXYX",1105:" 26LXOSVSVRUPSOQOOPNRNUOWQXSXUWVV RUSUQSO RQOPPOROUPWQX",1106:" 20LWTKULUMVMVLTKRKPMPX RRKQMQX RNOSO RNXSX",1107:" 42LYQOOQOSQUSUUSUQSOQO RQOPQPSQU RSUTSTQSO RTPUOVO RPTOUOXPYTYVZ ROWPXTXVYV[T\\P\\N[NYPX",1108:" 28J[NKNX ROKOX RORPPROTOVPWRWX RTOUPVRVX RLKOK RLXQX RTXYX",1109:" 18NWRKRLSLSKRK RRORX RSOSX RPOSO RPXUX",1110:" 23NWSKSLTLTKSK RSOSZR\\ RTOTZR\\P\\O[OZPZP[O[ RQOTO",1111:" 27JZNKNX ROKOX RWOOU RRSVX RSSWX RLKOK RTOYO RLXQX RTXYX",1112:" 12NWRKRX RSKSX RPKSK RPXUX",1113:" 44F_JOJX RKOKX RKRLPNOPORPSRSX RPOQPRRRX RSRTPVOXOZP[R[X RXOYPZRZX RHOKO RHXMX RPXUX RXX]X",1114:" 28J[NONX ROOOX RORPPROTOVPWRWX RTOUPVRVX RLOOO RLXQX RTXYX",1115:" 28LYQOOPNRNUOWQXTXVWWUWRVPTOQO RQOPPOROUPWQX RTXUWVUVRUPTO",1116:" 32JYNON\\ ROOO\\ RORPPROTOVPWRWUVWTXRXPWOU RTOUPVRVUUWTX RLOOO RL\\Q\\",1117:" 29KYUOU\\ RVOV\\ RURTPROPONPMRMUNWPXRXTWUU RPOOPNRNUOWPX RS\\X\\",1118:" 22KXOOOX RPOPX RPRQPSOUOVPVQUQUPVP RMOPO RMXRX",1119:" 26LYTOUPUQVQVPTOQOOPORQSTTVU ROQQRTSVTVWTXQXOWOVPVPWQX",1120:" 14LWPKPVRXTXUWUV RQKQVRX RNOTO",1121:" 28J[NONUOWQXSXUWVU ROOOUPWQX RVOVX RWOWX RLOOO RTOWO RVXYX",1122:" 15KYNORX ROORV RVORX RLOQO RTOXO",1123:" 24I[LOOX RMOOU RROOX RROUX RSOUU RXOUX RJOOO RVOZO",1124:" 21KYNOUX ROOVX RVONX RLOQO RTOXO RLXPX RSXXX",1125:" 23KYNORX ROORV RVORXP[N\\M\\L[LZMZM[L[ RLOQO RTOXO",1126:" 16LXUONX RVOOX ROONQNOVO RNXVXVVUX",1127:" 32K[QOOPNQMSMUNWPXQXSWUUWRXO RQOOQNSNUOWPX RQOSOUPWWXX RSOTPVWXXYX",1128:" 40KXRKPMOOMUK\\ RQLPNNTL\\ RRKTKVLVNUPRQ RTKULUNTPRQ RRQTRUTUVTWRXQXOWNT RRQSRTTTVRX",1129:" 19KYLQNOPORPSSSXR\\ RLQNPPPRQSS RWOVRSXQ\\",1130:" 39KYSOQOOPNQMSMUNWPXRXTWUVVTVRUPRNQLQKRJTJUKVM RQOOQNSNVPX RRXTVUTUQSO RQLRKTKVM",1131:" 27LXVPTOQOOPOQPRRS RQOPPPQRS RRSOTNUNWPXSXUW RRSPTOUOWPX",1132:" 28LWRKQLQMSNVNVMSNPOOPNRNTOVPWRXSYS[R\\P\\O[ RSNQOPPOROTPVRX",1133:" 26IYJRKPLONOOPOQMX RMONPNQLX ROQPPROTOVPVRS\\ RTOUPURR\\",1134:" 35IYJSKQLPNPOQOVPX RMPNQNUOWPXQXSWTVUTVQVNULTKRKQLQNRPURWS RQXSVTTUQUNTK",1135:" 13NWROPVPWQXSXUWVU RSOQVQWRX",1136:" 26KYOOLX RPOMX RUOVPWPVOTORQOR RORPSRWTXVWWU RORQSSWTX",1137:" 15LXLKNKPLWX RNKOLVX RRPMX RRPNX",1138:" 26KZOOK\\ RPOL\\ RNUNWOXQXSWTV RVOTVTWUXWXXWYU RWOUVUWVX",1139:" 19JYNOMX ROONUMX RVRVOWOVRTUQWNXMX RLOOO",1140:" 36MXRKQLQMSNVN RTNQOPPPRRSUS RTNROQPQRRS RSSPTOUOWQXSYTZT[S\\Q\\ RSSQTPUPWQX",1141:" 28KXQOOPNQMSMUNWPXRXTWUVVTVRUPSOQO RQOOQNSNVPX RRXTVUTUQSO",1142:" 20IZPPMX RPPNX RTPSX RTPTX RKQMOXO RKQMPXP",1143:" 29JXSOQOOPNQMSJ\\ RQOOQNSK\\ RSOUPVRVTUVTWRXPXNWMU RSOUQUTTVRX",1144:" 28K[YOQOOPNQMSMUNWPXRXTWUVVTVRUPYP RQOOQNSNVPX RRXTVUTUQSO",1145:" 14KZSPQX RSPRX RMQOOXO RMQOPXP",1146:" 24JXKRLPMOOOPPPROUOWPX RNOOPORNUNWPXQXSWUUVRVOUOVP",1147:" 35KZOPNQMSMUNWPXRXUWWUXRXPWOUOTPSRRUO\\ RMUNVPWRWUVWTXR RXQWPUPSR RRUQXP\\",1148:" 17KXMONOPPS[T\\ RNOOPR[T\\U\\ RVOTRNYL\\",1149:" 28I[TKQ\\ RUKP\\ RJRKPLONOOPOVPWSWUVWT RMONPNTOWPXSXUWWTXRYO",1150:" 36JZNPPPPONPMQLSLUMWNXPXQWRUSR RLUNWPWRU RRRRWSXUXWVXTXRWPVOVPWP RRUSWUWWV",1151:" 32KZVOTVTWUXWXXWYU RWOUVUWVX RUSUQSOQOOPNQMSMUNWPXRXTV RQOOQNSNVPX",1152:" 32JXOKMR RPKNRNVPX RNROPQOSOUPVRVTUVTWRXPXNWMUMR RSOUQUTTVRX RMKPK",1153:" 22KXUPUQVQUPSOQOOPNQMSMUNWPXRXTWUV RQOOQNSNVPX",1154:" 35KZWKTVTWUXWXXWYU RXKUVUWVX RUSUQSOQOOPNQMSMUNWPXRXTV RQOOQNSNVPX RUKXK",1155:" 23KWNURTTSURUPSOQOOPNQMSMUNWPXRXTWUV RQOOQNSNVPX",1156:" 23MXWKXLXKVKTLSNPYO[N\\ RVKULTNQYP[N\\L\\L[M\\ RPOVO",1157:" 34KYVOTVSYR[ RWOUVTYR[P\\M\\L[M[N\\ RUSUQSOQOOPNQMSMUNWPXRXTV RQOOQNSNVPX",1158:" 29KZPKLX RQKMX ROQPPROTOVPVRUUUWVX RTOUPURTUTWUXWXXWYU RNKQK",1159:" 26MWSKSLTLTKSK RNROPPOROSPSRRURWSX RQORPRRQUQWRXTXUWVU",1160:" 26MWTKTLULUKTK RORPPQOSOTPTRRYQ[O\\M\\M[N\\ RROSPSRQYP[O\\",1161:" 32KXPKLX RQKMX RVPUQVQVPUOTORQPROR RORPSQWRXTXUWVU RORQSRWSX RNKQK",1162:" 16NVSKPVPWQXSXTWUU RTKQVQWRX RQKTK",1163:" 46F^GRHPIOKOLPLQJX RJOKPKQIX RLQMPOOQOSPSQQX RQORPRQPX RSQTPVOXOZPZRYUYWZX RXOYPYRXUXWYX[X\\W]U",1164:" 33J[KRLPMOOOPPPQNX RNOOPOQMX RPQQPSOUOWPWRVUVWWX RUOVPVRUUUWVXXXYWZU",1165:" 28KXQOOPNQMSMUNWPXRXTWUVVTVRUPSOQO RQOOQNSNVPX RRXTVUTUQSO",1166:" 35JYKRLPMOOOPPPQM\\ RNOOPOQL\\ RPQROTOVPWRWTVVUWSXQXOVOT RTOVQVTUVSX RJ\\O\\",1167:" 28KYVOR\\ RWOS\\ RUSUQSOQOOPNQMSMUNWPXRXTV RQOOQNSNVPX RP\\U\\",1168:" 22LXMRNPOOQORPRQPX RPOQPQQOX RRQSPUOVOWPWQVQWP",1169:" 24LYVPVQWQVPTOQOOPORQSTTVU ROQQRTSVTVWTXQXOWNVOVOW",1170:" 16NWSKPVPWQXSXTWUU RTKQVQWRX RPOUO",1171:" 33IZJRKPLONOOPORNUNWOX RMONPNRMUMWOXQXSWTV RVOTVTWUXWXXWYU RWOUVUWVX",1172:" 24JXKRLPMOOOPPPROUOWPX RNOOPORNUNWPXQXSWUUVRVOUOVP",1173:" 37H\\IRJPKOMONPNRMUMWNX RLOMPMRLULWNXOXQWRV RTORVRWTX RUOSVSWTXUXWWYUZRZOYOZP",1174:" 38JZMRNPPOROSPSR RQORPRRQUPWNXMXLWLVMVLW RXPWQXQXPWOVOTPSRRURWSX RQUQWRXTXVWWU",1175:" 35IYJRKPLONOOPORNUNWOX RMONPNRMUMWOXQXSWTV RVOTVSYR[ RWOUVTYR[P\\M\\L[M[N\\",1176:" 27KYWOWPVQNVMWMX RNQOOROUQ ROPRPUQVQ RNVOVRWUW ROVRXUXVV",1177:" 39H[RKSLSMTMTLRKOKMLLNLX ROKNLMNMX RXKYLYMZMZLXKVKTMTX RVKUMUX RJOWO RJXOX RRXWX",1178:" 29J[UKVLWLWKQKOLNNNX RQKPLONOX RVOVX RWOWX RLOWO RLXQX RTXYX",1179:" 27J[WKQKOLNNNX RQKPLONOX RUKVLVX RWKWX RLOVO RLXQX RTXYX",1180:" 48F_PKQLQMRMRLPKMKKLJNJX RMKLLKNKX RYKZL[L[KUKSLRNRX RUKTLSNSX RZOZX R[O[X RHO[O RHXMX RPXUX RXX]X",1181:" 46F_PKQLQMRMRLPKMKKLJNJX RMKLLKNKX R[KUKSLRNRX RUKTLSNSX RYKZLZX R[K[X RHOZO RHXMX RPXUX RXX]X",1182:" 12NWRORX RSOSX RPOSO RPXUX",1184:" 21LXVPTOROPPOQNSNUOWQXSXUW RROPQOSOVQX ROSSS",1185:" 35LYSKQLPMOONRNUOWPXRXTWUVVTWQWNVLUKSK RSKQMPOOSOVPX RRXTVUTVPVMUK ROQVQ",1186:" 34KZTKQ\\ RUKP\\ RQONPMRMUNWQXTXWWXUXRWPTOQO RQOOPNRNUOWQX RTXVWWUWRVPTO",1187:" 22LXUPVRVQUPSOQOOPNRNTOVRX RQOOQOTPVRXSYS[R\\P\\",1191:" 45I[VKWLXLVKSKQLPMOOLYK[J\\ RSKQMPOMYL[J\\H\\H[I\\ RZK[L[KYKWLVNSYR[Q\\ RYKXLWNTYS[Q\\O\\O[P\\ RLOYO",1192:" 38IZVKWLXLXKSKQLPMOOLYK[J\\ RSKQMPOMYL[J\\H\\H[I\\ RVOTVTWUXWXXWYU RWOUVUWVX RLOWO",1193:" 38IZVKWL RXKSKQLPMOOLYK[J\\ RSKQMPOMYL[J\\H\\H[I\\ RWKTVTWUXWXXWYU RXKUVUWVX RLOVO",1194:" 63F^SKTLTM RULSKPKNLMMLOIYH[G\\ RPKNMMOJYI[G\\E\\E[F\\ RZK[L\\L\\KWKUL RTMSOPYO[N\\ RWKUMTOQYP[N\\L\\L[M\\ RZOXVXWYX[X\\W]U R[OYVYWZX RIO[O",1195:" 63F^SKTLTM RULSKPKNLMMLOIYH[G\\ RPKNMMOJYI[G\\E\\E[F\\ RZK[L R\\KWKUL RTMSOPYO[N\\ RWKUMTOQYP[N\\L\\L[M\\ R[KXVXWYX[X\\W]U R\\KYVYWZX RIOZO",1196:" 20MWNROPPOROSPSRRURWSX RQORPRRQUQWRXTXUWVU",1200:" 28LYQKOLNONTOWQXTXVWWTWOVLTKQK RQKPLOOOTPWQX RTXUWVTVOULTK",1201:" 10LYPNSKSX RRLRX ROXVX",1202:" 35LYOMONNNNMOLQKTKVLWNVPTQQROSNUNX RTKULVNUPTQ RNWOVPVSWVWWV RPVSXVXWVWU",1203:" 39LYOMONNNNMOLQKTKVLWNVPTQ RTKULVNUPTQ RRQTQVRWTWUVWTXQXOWNVNUOUOV RTQURVTVUUWTX",1204:" 13LYSMSX RTKTX RTKMTXT RQXVX",1205:" 33LYOKNQ ROKVK ROLSLVK RNQOPQOTOVPWRWUVWTXQXOWNVNUOUOV RTOUPVRVUUWTX",1206:" 36LYVMVNWNWMVLTKRKPLOMNPNUOWQXTXVWWUWSVQTPQPNR RRKPMOPOUPWQX RTXUWVUVSUQTP",1207:" 22LYNKNO RVMRTPX RWKTQQX RNMPKRKUM RNMPLRLUMVM",1208:" 51LYQKOLNNOPQQTQVPWNVLTKQK RQKPLONPPQQ RTQUPVNULTK RQQORNTNUOWQXTXVWWUWTVRTQ RQQPROTOUPWQX RTXUWVUVTURTQ",1209:" 36LYOVOUNUNVOWQXSXUWVVWSWNVLTKQKOLNNNPORQSTSWQ RSXUVVSVNULTK RQKPLONOPPRQS",1210:" 6NVRVQWRXSWRV",1211:" 8NVSWRXQWRVSWSYQ[",1212:" 12NVROQPRQSPRO RRVQWRXSWRV",1213:" 14NVROQPRQSPRO RSWRXQWRVSWSYQ[",1214:" 15NVRKQLRSSLRK RRLRO RRVQWRXSWRV",1215:" 29LYNNONOONONNOLQKTKVLWNWOVQSRRSRTST RTKVMVPUQSR RRWRXSXSWRW",1216:" 6OVRKRP RSKRP",1217:" 12LXOKOP RPKOP RUKUP RVKUP",1218:" 10MWQKPLPNQOSOTNTLSKQK",1219:" 9MWRJRP ROKUO RUKOO",1220:" 3KZXHM\\",1221:" 16MWUHSJQMPPPTQWSZU\\ RSJRLQPQTRXSZ",1222:" 16MWOHQJSMTPTTSWQZO\\ RQJRLSPSTRXQZ",1223:" 12MWPHP\\ RQHQ\\ RPHUH RP\\U\\",1224:" 12MWSHS\\ RTHT\\ ROHTH RO\\T\\",1225:" 38LWSHQIPJPLRNSP RQIPL RSNRQ RPJQLSNSPRQPRRSSTSVQXPZ RRSSV RPXQ[ RSTRVPXPZQ[S\\",1226:" 38MXQHSITJTLRNQP RSITL RQNRQ RTJSLQNQPRQTRRSQTQVSXTZ RRSQV RTXS[ RQTRVTXTZS[Q\\",1227:" 4MWTHPRT\\",1228:" 4MWPHTRP\\",1229:" 3OURHR\\",1230:" 6MWPHP\\ RTHT\\",1231:" 3I[LRXR",1232:" 6I[RLRX RLRXR",1233:" 9JZRMRX RMRWR RMXWX",1234:" 9JZRMRX RMMWM RMRWR",1235:" 6JZMMWW RWMMW",1236:" 6NVRQQRRSSRRQ",1237:" 15I[RLQMRNSMRL RLRXR RRVQWRXSWRV",1238:" 6I[LPXP RLTXT",1239:" 9I[WLMX RLPXP RLTXT",1240:" 9I[LNXN RLRXR RLVXV",1241:" 4JZWLMRWX",1242:" 4JZMLWRMX",1243:" 10JZWKMOWS RMTWT RMXWX",1244:" 10JZMKWOMS RMTWT RMXWX",1245:" 21H[YUWUUTTSRPQOONNNLOKQKRLTNUOUQTRSTPUOWNYN",1246:" 16JZLTLRMPOPUSWSXR RLRMQOQUTWTXRXP",1247:" 8JZMSRPWS RMSRQWS",1248:" 7NVSKPO RSKTLPO",1249:" 7NVQKTO RQKPLTO",1250:" 14LXNKOMQNSNUMVK RNKONQOSOUNVK",1251:" 8NVSLRMQLRKSLSNQP",1252:" 8NVSKQMQORPSORNQO",1253:" 8NVQLRMSLRKQLQNSP",1254:" 8NVQKSMSORPQORNSO",1256:" 11JZWMQMONNOMQMSNUOVQWWW",1257:" 11JZMMMSNUOVQWSWUVVUWSWM",1258:" 11JZMMSMUNVOWQWSVUUVSWMW",1259:" 11JZMWMQNOONQMSMUNVOWQWW",1260:" 14JZWMQMONNOMQMSNUOVQWWW RMRUR",1261:" 13I[TOUPXRUTTU RUPWRUT RLRWR",1262:" 13MWRMRX ROPPORLTOUP RPORMTO",1263:" 13I[POOPLROTPU ROPMROT RMRXR",1264:" 13MWRLRW ROTPURXTUUT RPURWTU",1265:" 37KYVSUPSOQOOPNQMSMUNWPXRXTWUVVTWQWNVLTKQKPLQLRK RQOOQNSNVPX RRXTVUTVQVNULTK",1266:" 15JZLKRX RMKRV RXKRX RLKXK RNLWL",1267:" 10G[IOLORW RKORX R[FRX",1268:" 26I[XIXJYJYIXHVHTJSLROQUPYO[ RUITKSORUQXPZN\\L\\K[KZLZL[",1269:" 40I[XIXJYJYIXHVHTJSLROQUPYO[ RUITKSORUQXPZN\\L\\K[KZLZL[ RQNOONQNSOUQVSVUUVSVQUOSNQN",1270:" 26H\\ZRYTWUVUTTSSQPPONNMNKOJQJRKTMUNUPTQSSPTOVNWNYOZQZR",1271:" 26JZXKLX ROKPLPNOOMOLNLLMKOKSLVLXK RUTTUTWUXWXXWXUWTUT",1272:" 41J[YPXPXQYQYPXOWOVPUTTVSWQXOXMWLVLTMSORRPSNSLRKPKOLONPQUWWXXXYW ROXMVMTOR RONPPVWWX",1273:" 29J[UPSOQOPQPRQTSTUS RUOUSVTXTYRYQXNVLSKRKOLMNLQLRMUOWRXSXVW",1274:" 34KZQHQ\\ RTHT\\ RWLVLVMWMWLUKPKNLNNOPVSWT RNNOOVRWTWVVWTXQXOWNVNUOUOVNV",1275:" 12KYRKN\\ RVKR\\ RNQWQ RMVVV",1276:" 40LXTLSLSMTMTLSKQKPLPNQPTRUS RPNQOTQUSUUSW RQPOROTPVSXTY ROTPUSWTYT[S\\Q\\P[PZQZQ[P[",1277:" 29LXRKQLRMSLRK RRMRQ RRQQSRVSSRQ RRVR\\ RPOONNOOPPOTOUNVOUPTO",1278:" 42LXRMSLRKQLRMRQQRSURV RRQSRQURVRZQ[R\\S[RZ RPOONNOOPPOTOUNVOUPTO RPXOWNXOYPXTXUWVXUYTX",1279:" 12LYVKVX RNKVK RQQVQ RNXVX",1281:" 24H\\QKNLLNKQKSLVNXQYSYVXXVYSYQXNVLSKQK RRQQRRSSRRQ",1282:" 33LYQKPLPMQN RTKULUMTN RRNPOOQORPTRUSUUTVRVQUOSNRN RRURY RSUSY ROWVW",1283:" 23LYRKPLONOOPQRRSRUQVOVNULSKRK RRRRX RSRSX ROUVU",1284:" 24H\\QKNLLNKQKSLVNXQYSYVXXVYSYQXNVLSKQK RRKRY RKRYR",1285:" 25JYRRPQOQMRLTLUMWOXPXRWSUSTRR RWMRR RRMWMWR RRMVNWR",1286:" 25JZLLMKOKQLRNRPQRPSNT ROKPLQNQQPS RVKUX RWKTX RNTXT",1287:" 27JYNKNU ROKNR RNROPQOSOUPVQVTTVTXUYVYWX RSOUQUTTV RLKOK",1288:" 27LYONRKRQ RVNSKSQ RRQPROTOUPWRXSXUWVUVTURSQ RRTRUSUSTRT",1289:" 27JZRKRY RMKMPNRPSTSVRWPWK RLMMKNM RQMRKSM RVMWKXM ROVUV",1290:" 27JYNKNX ROKOX RLKSKVLWNWOVQSROR RSKULVNVOUQSR RLXVXVUUX",1291:" 20LYWKTKQLONNQNSOVQXTYWY RWKTLRNQQQSRVTXWY",1292:" 23JZRRPQOQMRLTLUMWOXPXRWSUSTRR RSLQQ RWMRR RXQSS",1293:" 12KYPMTW RTMPW RMPWT RWPMT",1294:" 34J[OUMULVLXMYOYPXPVNTMRMONMOLQKTKVLWMXOXRWTUVUXVYXYYXYVXUVU RNMPLULWM",1295:" 34J[OOMOLNLLMKOKPLPNNPMRMUNWOXQYTYVXWWXUXRWPUNULVKXKYLYNXOVO RNWPXUXWW",1401:" 21F^KHK\\ RLHL\\ RXHX\\ RYHY\\ RHH\\H RH\\O\\ RU\\\\\\",1402:" 20H]KHRQJ\\ RJHQQ RJHYHZMXH RK[X[ RJ\\Y\\ZWX\\",1403:" 20KYVBTDRGPKOPOTPYR]T`Vb RTDRHQKPPPTQYR\\T`",1404:" 20KYNBPDRGTKUPUTTYR]P`Nb RPDRHSKTPTTSYR\\P`",1405:" 12KYOBOb RPBPb ROBVB RObVb",1406:" 12KYTBTb RUBUb RNBUB RNbUb",1407:" 40KYTBRCQDPFPHQJRKSMSOQQ RRCQEQGRISJTLTNSPORSTTVTXSZR[Q]Q_Ra RQSSUSWRYQZP\\P^Q`RaTb",1408:" 40KYPBRCSDTFTHSJRKQMQOSQ RRCSESGRIQJPLPNQPURQTPVPXQZR[S]S_Ra RSSQUQWRYSZT\\T^S`RaPb",1409:" 24KYU@RCPFOIOLPOSVTYT\\S_Ra RRCQEPHPKQNTUUXU[T^RaOd",1410:" 24KYO@RCTFUIULTOQVPYP\\Q_Ra RRCSETHTKSNPUOXO[P^RaUd",1411:" 13AXCRGRR` RGSRa RFSRb RX:Rb",1412:" 32F^[CZD[E\\D\\C[BYBWCUETGSJRNPZO^N` RVDUFTJRVQZP]O_MaKbIbHaH`I_J`Ia",2001:" 18H\\RFK[ RRFY[ RRIX[ RMUVU RI[O[ RU[[[",2002:" 45G]LFL[ RMFM[ RIFUFXGYHZJZLYNXOUP RUFWGXHYJYLXNWOUP RMPUPXQYRZTZWYYXZU[I[ RUPWQXRYTYWXYWZU[",2003:" 32G\\XIYLYFXIVGSFQFNGLIKKJNJSKVLXNZQ[S[VZXXYV RQFOGMILKKNKSLVMXOZQ[",2004:" 30G]LFL[ RMFM[ RIFSFVGXIYKZNZSYVXXVZS[I[ RSFUGWIXKYNYSXVWXUZS[",2005:" 22G\\LFL[ RMFM[ RSLST RIFYFYLXF RMPSP RI[Y[YUX[",2006:" 20G[LFL[ RMFM[ RSLST RIFYFYLXF RMPSP RI[P[",2007:" 40G^XIYLYFXIVGSFQFNGLIKKJNJSKVLXNZQ[S[VZXX RQFOGMILKKNKSLVMXOZQ[ RXSX[ RYSY[ RUS\\S",2008:" 27F^KFK[ RLFL[ RXFX[ RYFY[ RHFOF RUF\\F RLPXP RH[O[ RU[\\[",2009:" 12MXRFR[ RSFS[ ROFVF RO[V[",2010:" 20KZUFUWTZR[P[NZMXMVNUOVNW RTFTWSZR[ RQFXF",2011:" 27F\\KFK[ RLFL[ RYFLS RQOY[ RPOX[ RHFOF RUF[F RH[O[ RU[[[",2012:" 14I[NFN[ ROFO[ RKFRF RK[Z[ZUY[",2013:" 30F_KFK[ RLFRX RKFR[ RYFR[ RYFY[ RZFZ[ RHFLF RYF]F RH[N[ RV[][",2014:" 21G^LFL[ RMFYY RMHY[ RYFY[ RIFMF RVF\\F RI[O[",2015:" 44G]QFNGLIKKJOJRKVLXNZQ[S[VZXXYVZRZOYKXIVGSFQF RQFOGMILKKOKRLVMXOZQ[ RS[UZWXXVYRYOXKWIUGSF",2016:" 29G]LFL[ RMFM[ RIFUFXGYHZJZMYOXPUQMQ RUFWGXHYJYMXOWPUQ RI[P[",2017:" 64G]QFNGLIKKJOJRKVLXNZQ[S[VZXXYVZRZOYKXIVGSFQF RQFOGMILKKOKRLVMXOZQ[ RS[UZWXXVYRYOXKWIUGSF RNYNXOVQURUTVUXV_W`Y`Z^Z] RUXV\\W^X_Y_Z^",2018:" 45G]LFL[ RMFM[ RIFUFXGYHZJZLYNXOUPMP RUFWGXHYJYLXNWOUP RI[P[ RRPTQURXYYZZZ[Y RTQUSWZX[Z[[Y[X",2019:" 34H\\XIYFYLXIVGSFPFMGKIKKLMMNOOUQWRYT RKKMMONUPWQXRYTYXWZT[Q[NZLXKUK[LX",2020:" 16I\\RFR[ RSFS[ RLFKLKFZFZLYF RO[V[",2021:" 23F^KFKULXNZQ[S[VZXXYUYF RLFLUMXOZQ[ RHFOF RVF\\F",2022:" 15H\\KFR[ RLFRX RYFR[ RIFOF RUF[F",2023:" 24F^JFN[ RKFNV RRFN[ RRFV[ RSFVV RZFV[ RGFNF RWF]F",2024:" 21H\\KFX[ RLFY[ RYFK[ RIFOF RUF[F RI[O[ RU[[[",2025:" 20H]KFRQR[ RLFSQS[ RZFSQ RIFOF RVF\\F RO[V[",2026:" 16H\\XFK[ RYFL[ RLFKLKFYF RK[Y[YUX[",2027:" 18H\\RFK[ RRFY[ RRIX[ RMUVU RI[O[ RU[[[",2028:" 45G]LFL[ RMFM[ RIFUFXGYHZJZLYNXOUP RUFWGXHYJYLXNWOUP RMPUPXQYRZTZWYYXZU[I[ RUPWQXRYTYWXYWZU[",2029:" 14I[NFN[ ROFO[ RKFZFZLYF RK[R[",2030:" 15H\\RFJ[ RRFZ[ RRIY[ RKZYZ RJ[Z[",2031:" 22G\\LFL[ RMFM[ RSLST RIFYFYLXF RMPSP RI[Y[YUX[",2032:" 16H\\XFK[ RYFL[ RLFKLKFYF RK[Y[YUX[",2033:" 27F^KFK[ RLFL[ RXFX[ RYFY[ RHFOF RUF\\F RLPXP RH[O[ RU[\\[",2034:" 56G]QFNGLIKKJOJRKVLXNZQ[S[VZXXYVZRZOYKXIVGSFQF RQFOGMILKKOKRLVMXOZQ[ RS[UZWXXVYRYOXKWIUGSF ROMOT RUMUT ROPUP ROQUQ",2035:" 12MXRFR[ RSFS[ ROFVF RO[V[",2036:" 27F\\KFK[ RLFL[ RYFLS RQOY[ RPOX[ RHFOF RUF[F RH[O[ RU[[[",2037:" 15H\\RFK[ RRFY[ RRIX[ RI[O[ RU[[[",2038:" 30F_KFK[ RLFRX RKFR[ RYFR[ RYFY[ RZFZ[ RHFLF RYF]F RH[N[ RV[][",2039:" 21G^LFL[ RMFYY RMHY[ RYFY[ RIFMF RVF\\F RI[O[",2040:" 36G]KEJJ RZEYJ RONNS RVNUS RKWJ\\ RZWY\\ RKGYG RKHYH ROPUP ROQUQ RKYYY RKZYZ",2041:" 44G]QFNGLIKKJOJRKVLXNZQ[S[VZXXYVZRZOYKXIVGSFQF RQFOGMILKKOKRLVMXOZQ[ RS[UZWXXVYRYOXKWIUGSF",2042:" 21F^KFK[ RLFL[ RXFX[ RYFY[ RHF\\F RH[O[ RU[\\[",2043:" 29G]LFL[ RMFM[ RIFUFXGYHZJZMYOXPUQMQ RUFWGXHYJYMXOWPUQ RI[P[",2044:" 20H]KFRPJ[ RJFQP RJFYFZLXF RKZXZ RJ[Y[ZUX[",2045:" 16I\\RFR[ RSFS[ RLFKLKFZFZLYF RO[V[",2046:" 33I\\KKKILGMFOFPGQIRMR[ RKIMGOGQI RZKZIYGXFVFUGTISMS[ RZIXGVGTI RO[V[",2047:" 48H]RFR[ RSFS[ RPKMLLMKOKRLTMUPVUVXUYTZRZOYMXLUKPK RPKNLMMLOLRMTNUPV RUVWUXTYRYOXMWLUK ROFVF RO[V[",2048:" 21H\\KFX[ RLFY[ RYFK[ RIFOF RUF[F RI[O[ RU[[[",2049:" 41G^RFR[ RSFS[ RIMJLLMMQNSOTQU RJLKMLQMSNTQUTUWTXSYQZM[L RTUVTWSXQYM[L\\M ROFVF RO[V[",2050:" 43G]JXK[O[MWKSJPJLKIMGPFTFWGYIZLZPYSWWU[Y[ZX RMWLTKPKLLINGPF RTFVGXIYLYPXTWW RKZNZ RVZYZ",2051:" 18H\\UFH[ RUFV[ RTHU[ RLUUU RF[L[ RR[X[",2052:" 41F^OFI[ RPFJ[ RLFWFZG[I[KZNYOVP RWFYGZIZKYNXOVP RMPVPXQYSYUXXVZR[F[ RVPWQXSXUWXUZR[",2053:" 34H]ZH[H\\F[L[JZHYGWFTFQGOIMLLOKSKVLYMZP[S[UZWXXV RTFRGPINLMOLSLVMYNZP[",2054:" 30F]OFI[ RPFJ[ RLFUFXGYHZKZOYSWWUYSZO[F[ RUFWGXHYKYOXSVWTYRZO[",2055:" 22F]OFI[ RPFJ[ RTLRT RLF[FZLZF RMPSP RF[U[WVT[",2056:" 20F\\OFI[ RPFJ[ RTLRT RLF[FZLZF RMPSP RF[M[",2057:" 42H^ZH[H\\F[L[JZHYGWFTFQGOIMLLOKSKVLYMZP[R[UZWXYT RTFRGPINLMOLSLVMYNZP[ RR[TZVXXT RUT\\T",2058:" 27E_NFH[ ROFI[ R[FU[ R\\FV[ RKFRF RXF_F RLPXP RE[L[ RR[Y[",2059:" 12LYUFO[ RVFP[ RRFYF RL[S[",2060:" 21I[XFSWRYQZO[M[KZJXJVKULVKW RWFRWQYO[ RTF[F",2061:" 27F]OFI[ RPFJ[ R]FLS RSOW[ RROV[ RLFSF RYF_F RF[M[ RS[Y[",2062:" 14H\\QFK[ RRFL[ RNFUF RH[W[YUV[",2063:" 30E`NFH[ RNFO[ ROFPY R\\FO[ R\\FV[ R]FW[ RKFOF R\\F`F RE[K[ RS[Z[",2064:" 21F_OFI[ ROFVX ROIV[ R\\FV[ RLFOF RYF_F RF[L[",2065:" 42G]SFPGNILLKOJSJVKYLZN[Q[TZVXXUYRZNZKYHXGVFSF RSFQGOIMLLOKSKVLYN[ RQ[SZUXWUXRYNYKXHVF",2066:" 27F]OFI[ RPFJ[ RLFXF[G\\I\\K[NYPUQMQ RXFZG[I[KZNXPUQ RF[M[",2067:" 61G]SFPGNILLKOJSJVKYLZN[Q[TZVXXUYRZNZKYHXGVFSF RSFQGOIMLLOKSKVLYN[ RQ[SZUXWUXRYNYKXHVF RLYLXMVOUPURVSXS_T`V`W^W] RSXT^U_V_W^",2068:" 42F^OFI[ RPFJ[ RLFWFZG[I[KZNYOVPMP RWFYGZIZKYNXOVP RRPTQURVZW[Y[ZYZX RURWYXZYZZY RF[M[",2069:" 35G^ZH[H\\F[L[JZHYGVFRFOGMIMKNMONVRXT RMKOMVQWRXTXWWYVZS[O[LZKYJWJUI[JYKY",2070:" 16H]UFO[ RVFP[ ROFLLNF]F\\L\\F RL[S[",2071:" 25F_NFKQJUJXKZN[R[UZWXXU\\F ROFLQKUKXLZN[ RKFRF RYF_F",2072:" 15H\\NFO[ ROFPY R\\FO[ RLFRF RXF^F",2073:" 24E_MFK[ RNFLY RUFK[ RUFS[ RVFTY R]FS[ RJFQF RZF`F",2074:" 21G]NFU[ ROFV[ R\\FH[ RLFRF RXF^F RF[L[ RR[X[",2075:" 20H]NFRPO[ ROFSPP[ R]FSP RLFRF RYF_F RL[S[",2076:" 16G][FH[ R\\FI[ ROFLLNF\\F RH[V[XUU[",2077:" 46H\\KILKXWYYY[ RLLXX RKIKKLMXYY[ RPPLTKVKXLZK[ RKVMZ RLTLVMXMZK[ RSSXN RVIVLWNYNYLWKVI RVIWLYN",2101:" 39I]NONPMPMONNPMTMVNWOXQXXYZZ[ RWOWXXZZ[[[ RWQVRPSMTLVLXMZP[S[UZWX RPSNTMVMXNZP[",2102:" 33G\\LFL[ RMFM[ RMPONQMSMVNXPYSYUXXVZS[Q[OZMX RSMUNWPXSXUWXUZS[ RIFMF",2103:" 28H[WPVQWRXQXPVNTMQMNNLPKSKULXNZQ[S[VZXX RQMONMPLSLUMXOZQ[",2104:" 36H]WFW[ RXFX[ RWPUNSMQMNNLPKSKULXNZQ[S[UZWX RQMONMPLSLUMXOZQ[ RTFXF RW[[[",2105:" 31H[LSXSXQWOVNTMQMNNLPKSKULXNZQ[S[VZXX RWSWPVN RQMONMPLSLUMXOZQ[",2106:" 22KXUGTHUIVHVGUFSFQGPIP[ RSFRGQIQ[ RMMUM RM[T[",2107:" 60I\\QMONNOMQMSNUOVQWSWUVVUWSWQVOUNSMQM RONNPNTOV RUVVTVPUN RVOWNYMYNWN RNUMVLXLYM[P\\U\\X]Y^ RLYMZP[U[X\\Y^Y_XaUbObLaK_K^L\\O[",2108:" 28G]LFL[ RMFM[ RMPONRMTMWNXPX[ RTMVNWPW[ RIFMF RI[P[ RT[[[",2109:" 18MXRFQGRHSGRF RRMR[ RSMS[ ROMSM RO[V[",2110:" 25MXSFRGSHTGSF RTMT_SaQbObNaN`O_P`Oa RSMS_RaQb RPMTM",2111:" 27G\\LFL[ RMFM[ RWMMW RRSX[ RQSW[ RIFMF RTMZM RI[P[ RT[Z[",2112:" 12MXRFR[ RSFS[ ROFSF RO[V[",2113:" 44BcGMG[ RHMH[ RHPJNMMOMRNSPS[ ROMQNRPR[ RSPUNXMZM]N^P^[ RZM\\N]P][ RDMHM RD[K[ RO[V[ RZ[a[",2114:" 28G]LML[ RMMM[ RMPONRMTMWNXPX[ RTMVNWPW[ RIMMM RI[P[ RT[[[",2115:" 36H\\QMNNLPKSKULXNZQ[S[VZXXYUYSXPVNSMQM RQMONMPLSLUMXOZQ[ RS[UZWXXUXSWPUNSM",2116:" 36G\\LMLb RMMMb RMPONQMSMVNXPYSYUXXVZS[Q[OZMX RSMUNWPXSXUWXUZS[ RIMMM RIbPb",2117:" 33H\\WMWb RXMXb RWPUNSMQMNNLPKSKULXNZQ[S[UZWX RQMONMPLSLUMXOZQ[ RTb[b",2118:" 23IZNMN[ ROMO[ ROSPPRNTMWMXNXOWPVOWN RKMOM RK[R[",2119:" 32J[WOXMXQWOVNTMPMNNMOMQNRPSUUWVXW RMPNQPRUTWUXVXYWZU[Q[OZNYMWM[NY",2120:" 16KZPFPWQZS[U[WZXX RQFQWRZS[ RMMUM",2121:" 28G]LMLXMZP[R[UZWX RMMMXNZP[ RWMW[ RXMX[ RIMMM RTMXM RW[[[",2122:" 15I[LMR[ RMMRY RXMR[ RJMPM RTMZM",2123:" 24F^JMN[ RKMNX RRMN[ RRMV[ RSMVX RZMV[ RGMNM RWM]M",2124:" 21H\\LMW[ RMMX[ RXML[ RJMPM RTMZM RJ[P[ RT[Z[",2125:" 22H[LMR[ RMMRY RXMR[P_NaLbKbJaK`La RJMPM RTMZM",2126:" 16I[WML[ RXMM[ RMMLQLMXM RL[X[XWW[",2127:" 40G^QMNNLPKRJUJXKZN[P[RZUWWTYPZM RQMONMPLRKUKXLZN[ RQMSMUNVPXXYZZ[ RSMTNUPWXXZZ[[[",2128:" 57G\\TFQGOIMMLPKTJZIb RTFRGPINMMPLTKZJb RTFVFXGYHYKXMWNTOPO RVFXHXKWMVNTO RPOTPVRWTWWVYUZR[P[NZMYLV RPOSPURVTVWUYTZR[",2129:" 28H\\IPKNMMOMQNROSRSVRZOb RJOLNPNRO RZMYPXRSYP^Nb RYMXPWRSY",2130:" 44I\\VNTMRMONMQLTLWMYNZP[R[UZWWXTXQWOSJRHRFSEUEWFYH RRMPNNQMTMXNZ RR[TZVWWTWPVNTKSISGTFVFYH",2131:" 32I[XPVNTMPMNNNPPRSS RPMONOPQRSS RSSNTLVLXMZP[S[UZWX RSSOTMVMXNZP[",2132:" 31I[TFRGQHQIRJUKZKZJWKSMPOMRLULWMYP[S]T_TaSbQbPa RULQONRMUMWNYP[",2133:" 32G]HQIOKMNMONOPNTL[ RMMNNNPMTK[ RNTPPRNTMVMXNYOYRXWUb RVMXOXRWWTb",2134:" 44F]GQHOJMMMNNNPMUMXNZO[ RLMMNMPLULXMZO[Q[SZUXWUXRYMYIXGVFTFRHRJSMUPWRZT RSZUWVUWRXMXIWGVF",2135:" 15LXRMPTOXOZP[S[UYVW RSMQTPXPZQ[",2136:" 29H\\NMJ[ ROMK[ RXMYNZNYMWMUNQROSMS ROSQTSZT[ ROSPTRZS[U[WZYW",2137:" 23H\\KFMFOGPHQJWXXZY[ RMFOHPJVXWZY[Z[ RRMJ[ RRMK[",2138:" 28F]MMGb RNMHb RMPLVLYN[P[RZTXVU RXMUXUZV[Y[[Y\\W RYMVXVZW[",2139:" 24H\\NML[ ROMNSMXL[ RYMXQVU RZMYPXRVUTWQYOZL[ RKMOM",2140:" 45IZTFRGQHQIRJUKXK RUKQLOMNONQPSSTVT RUKRLPMOOOQQSST RSTOUMVLXLZN\\S^T_TaRbPb RSTPUNVMXMZO\\S^",2141:" 32I[RMONMQLTLWMYNZP[R[UZWWXTXQWOVNTMRM RRMPNNQMTMXNZ RR[TZVWWTWPVN",2142:" 22G]PNL[ RPNM[ RVNV[ RVNW[ RIPKNNM[M RIPKONN[N",2143:" 31H[LVMYNZP[R[UZWWXTXQWOVNTMRMONMQLTHb RR[TZVWWTWPVN RRMPNNQMTIb",2144:" 35H][MQMNNLQKTKWLYMZO[Q[TZVWWTWQVOUNSM RQMONMQLTLXMZ RQ[SZUWVTVPUN RUN[N",2145:" 16H\\SNP[ RSNQ[ RJPLNOMZM RJPLOONZN",2146:" 31H\\IQJOLMOMPNPPNVNYP[ RNMONOPMVMYNZP[Q[TZVXXUYRYOXMWNXOYR RXUYO",2147:" 37G]ONMOKQJTJWKYLZN[Q[TZWXYUZRZOXMVMTORSPXMb RJWLYNZQZTYWWYU RZOXNVNTPRSPYNb",2148:" 23I[KMMMONPPU_VaWb RMMNNOPT_UaWbYb RZMYOWRM]K`Jb",2149:" 34F]UFOb RVFNb RGQHOJMMMNNNPMUMXOZRZTYWVYS RLMMNMPLULXMZO[R[TZVXXUYS[M",2150:" 44F]JQLOONNMLNJQITIWJZK[M[OZQWRT RIWJYKZMZOYQW RQTQWRZS[U[WZYWZTZQYNXMWNYOZQ RQWRYSZUZWYYW",2151:" 39H]XMVTUXUZV[Y[[Y\\W RYMWTVXVZW[ RVTVQUNSMQMNNLQKTKWLYMZO[Q[SZUWVT RQMONMQLTLXMZ",2152:" 36H[PFLSLVMYNZ RQFMS RMSNPPNRMTMVNWOXQXTWWUZR[P[NZMWMS RVNWPWTVWTZR[ RMFQF",2153:" 25I[WPWQXQXPWNUMRMONMQLTLWMYNZP[R[UZWW RRMPNNQMTMXNZ",2154:" 42H]ZFVTUXUZV[Y[[Y\\W R[FWTVXVZW[ RVTVQUNSMQMNNLQKTKWLYMZO[Q[SZUWVT RQMONMQLTLXMZ RWF[F",2155:" 26I[MVQUTTWRXPWNUMRMONMQLTLWMYNZP[R[UZWX RRMPNNQMTMXNZ",2156:" 35KZZGYHZI[H[GZFXFVGUHTJSMP[O_Na RXFVHUJTNRWQ[P^O`NaLbJbIaI`J_K`Ja ROMYM",2157:" 43H\\YMU[T^RaObLbJaI`I_J^K_J` RXMT[S^QaOb RVTVQUNSMQMNNLQKTKWLYMZO[Q[SZUWVT RQMONMQLTLXMZ",2158:" 31H]PFJ[ RQFK[ RMTOPQNSMUMWNXOXQVWVZW[ RUMWOWQUWUZV[Y[[Y\\W RMFQF",2159:" 26LYUFTGUHVGUF RMQNOPMSMTNTQRWRZS[ RRMSNSQQWQZR[U[WYXW",2160:" 32LYVFUGVHWGVF RNQOOQMTMUNUQR[Q^P`OaMbKbJaJ`K_L`Ka RSMTNTQQ[P^O`Mb",2161:" 34H\\PFJ[ RQFK[ RXNWOXPYOYNXMWMUNQROSMS ROSQTSZT[ ROSPTRZS[U[WZYW RMFQF",2162:" 18MYUFQTPXPZQ[T[VYWW RVFRTQXQZR[ RRFVF",2163:" 52AbBQCOEMHMINIPHTF[ RGMHNHPGTE[ RHTJPLNNMPMRNSOSQP[ RPMRORQO[ RRTTPVNXMZM\\N]O]Q[W[Z\\[ RZM\\O\\QZWZZ[[^[`YaW",2164:" 37F]GQHOJMMMNNNPMTK[ RLMMNMPLTJ[ RMTOPQNSMUMWNXOXQVWVZW[ RUMWOWQUWUZV[Y[[Y\\W",2165:" 32I[RMONMQLTLWMYNZP[R[UZWWXTXQWOVNTMRM RRMPNNQMTMXNZ RR[TZVWWTWPVN",2166:" 42G\\HQIOKMNMONOPNTJb RMMNNNPMTIb RNTOQQNSMUMWNXOYQYTXWVZS[Q[OZNWNT RWNXPXTWWUZS[ RFbMb",2167:" 33H\\XMRb RYMSb RVTVQUNSMQMNNLQKTKWLYMZO[Q[SZUWVT RQMONMQLTLXMZ RObVb",2168:" 26IZJQKOMMPMQNQPPTN[ ROMPNPPOTM[ RPTRPTNVMXMYNYOXPWOXN",2169:" 28J[XOXPYPYOXNUMRMONNONQORVVWW RNPOQVUWVWYVZS[P[MZLYLXMXMY",2170:" 18KYTFPTOXOZP[S[UYVW RUFQTPXPZQ[ RNMWM",2171:" 37F]GQHOJMMMNNNQLWLYN[ RLMMNMQKWKYLZN[P[RZTXVT RXMVTUXUZV[Y[[Y\\W RYMWTVXVZW[",2172:" 26H\\IQJOLMOMPNPQNWNYP[ RNMONOQMWMYNZP[Q[TZVXXUYQYMXMYO",2173:" 41C`DQEOGMJMKNKQIWIYK[ RIMJNJQHWHYIZK[M[OZQXRV RTMRVRYSZU[W[YZ[X\\V]R]M\\M]O RUMSVSYU[",2174:" 42H\\KQMNOMRMSOSR RQMRORRQVPXNZL[K[JZJYKXLYKZ RQVQYR[U[WZYW RYNXOYPZOZNYMXMVNTPSRRVRYS[",2175:" 41G\\HQIOKMNMONOQMWMYO[ RMMNNNQLWLYMZO[Q[SZUXWT RZMV[U^SaPbMbKaJ`J_K^L_K` RYMU[T^RaPb",2176:" 31H\\YMXOVQNWLYK[ RLQMOOMRMVO RMOONRNVOXO RLYNYRZUZWY RNYR[U[WYXW",2177:" 43G^VGUHVIWHWGUFRFOGMILLL[ RRFPGNIMLM[ R\\G[H\\I]H]G\\FZFXGWIW[ RZFYGXIX[ RIM[M RI[P[ RT[[[",2178:" 33G]WGVHWIXHWGUFRFOGMILLL[ RRFPGNIMLM[ RWMW[ RXMX[ RIMXM RI[P[ RT[[[",2179:" 35G]VGUHVIWHWGUF RXFRFOGMILLL[ RRFPGNIMLM[ RWHW[ RXFX[ RIMWM RI[P[ RT[[[",2180:" 54BcRGQHRISHRGPFMFJGHIGLG[ RMFKGIIHLH[ R]G\\H]I^H]G[FXFUGSIRLR[ RXFVGTISLS[ R]M][ R^M^[ RDM^M RD[K[ RO[V[ RZ[a[",2181:" 56BcRGQHRISHRGPFMFJGHIGLG[ RMFKGIIHLH[ R\\G[H\\I]H]G[F R^FXFUGSIRLR[ RXFVGTISLS[ R]H][ R^F^[ RDM]M RD[K[ RO[V[ RZ[a[",2182:" 12MXRMR[ RSMS[ ROMSM RO[V[",2184:" 25IZWNUMRMONMPLSLVMYNZQ[T[VZ RRMPNNPMSMVNYOZQ[ RMTUT",2185:" 43I\\TFQGOJNLMOLTLXMZO[Q[TZVWWUXRYMYIXGVFTF RTFRGPJOLNOMTMXNZO[ RQ[SZUWVUWRXMXIWGVF RNPWP",2186:" 42G]UFOb RVFNb RQMMNKPJSJVKXMZP[S[WZYXZUZRYPWNTMQM RQMNNLPKSKVLXNZP[ RS[VZXXYUYRXPVNTM",2187:" 27I[TMVNXPXOWNTMQMNNMOLQLSMUOWSZ RQMONNOMQMSNUSZT\\T^S_Q_",2190:" 45G]LMKNJPJRKUOYP[ RJRKTOXP[P]O`MbLbKaJ_J\\KXMTOQRNTMVMYNZPZTYXWZU[T[SZSXTWUXTY RVMXNYPYTXXWZ",2191:" 69E_YGXHYIZHYGWFTFQGOINKMNLRJ[I_Ha RTFRGPIOKNNLWK[J^I`HaFbDbCaC`D_E`Da R_G^H_I`H`G_F]F[GZHYJXMU[T_Sa R]F[HZJYNWWV[U^T`SaQbObNaN`O_P`Oa RIM^M",2192:" 52F^[GZH[I\\H[GXFUFRGPIOKNNMRK[J_Ia RUFSGQIPKONMWL[K^J`IaGbEbDaD`E_F`Ea RYMWTVXVZW[Z[\\Y]W RZMXTWXWZX[ RJMZM",2193:" 54F^YGXHYIZHZGXF R\\FUFRGPIOKNNMRK[J_Ia RUFSGQIPKONMWL[K^J`IaGbEbDaD`E_F`Ea R[FWTVXVZW[Z[\\Y]W R\\FXTWXWZX[ RJMYM",2194:" 86@cTGSHTIUHTGRFOFLGJIIKHNGRE[D_Ca ROFMGKIJKINGWF[E^D`CaAb?b>a>`?_@`?a R`G_H`IaH`G]FZFWGUITKSNRRP[O_Na RZFXGVIUKTNRWQ[P^O`NaLbJbIaI`J_K`Ja R^M\\T[X[Z\\[_[aYbW R_M]T\\X\\Z][ RDM_M",2195:" 88@cTGSHTIUHTGRFOFLGJIIKHNGRE[D_Ca ROFMGKIJKINGWF[E^D`CaAb?b>a>`?_@`?a R^G]H^I_H_G]F RaFZFWGUITKSNRRP[O_Na RZFXGVIUKTNRWQ[P^O`NaLbJbIaI`J_K`Ja R`F\\T[X[Z\\[_[aYbW RaF]T\\X\\Z][ RDM^M",2196:" 20LYMQNOPMSMTNTQRWRZS[ RRMSNSQQWQZR[U[WYXW",2200:" 40H\\QFNGLJKOKRLWNZQ[S[VZXWYRYOXJVGSFQF RQFOGNHMJLOLRMWNYOZQ[ RS[UZVYWWXRXOWJVHUGSF",2201:" 11H\\NJPISFS[ RRGR[ RN[W[",2202:" 45H\\LJMKLLKKKJLHMGPFTFWGXHYJYLXNUPPRNSLUKXK[ RTFVGWHXJXLWNTPPR RKYLXNXSZVZXYYX RNXS[W[XZYXYV",2203:" 47H\\LJMKLLKKKJLHMGPFTFWGXIXLWNTOQO RTFVGWIWLVNTO RTOVPXRYTYWXYWZT[P[MZLYKWKVLUMVLW RWQXTXWWYVZT[",2204:" 13H\\THT[ RUFU[ RUFJUZU RQ[X[",2205:" 39H\\MFKP RKPMNPMSMVNXPYSYUXXVZS[P[MZLYKWKVLUMVLW RSMUNWPXSXUWXUZS[ RMFWF RMGRGWF",2206:" 48H\\WIVJWKXJXIWGUFRFOGMILKKOKULXNZQ[S[VZXXYUYTXQVOSNRNOOMQLT RRFPGNIMKLOLUMXOZQ[ RS[UZWXXUXTWQUOSN",2207:" 31H\\KFKL RKJLHNFPFUIWIXHYF RLHNGPGUI RYFYIXLTQSSRVR[ RXLSQRSQVQ[",2208:" 63H\\PFMGLILLMNPOTOWNXLXIWGTFPF RPFNGMIMLNNPO RTOVNWLWIVGTF RPOMPLQKSKWLYMZP[T[WZXYYWYSXQWPTO RPONPMQLSLWMYNZP[ RT[VZWYXWXSWQVPTO",2209:" 48H\\XMWPURRSQSNRLPKMKLLINGQFSFVGXIYLYRXVWXUZR[O[MZLXLWMVNWMX RQSORMPLMLLMIOGQF RSFUGWIXLXRWVVXTZR[",2210:" 6MWRYQZR[SZRY",2211:" 8MWR[QZRYSZS\\R^Q_",2212:" 12MWRMQNROSNRM RRYQZR[SZRY",2213:" 14MWRMQNROSNRM RR[QZRYSZS\\R^Q_",2214:" 15MWRFQHRTSHRF RRHRN RRYQZR[SZRY",2215:" 32I[MJNKMLLKLJMHNGPFSFVGWHXJXLWNVORQRT RSFUGVHWJWLVNTP RRYQZR[SZRY",2216:" 6NVRFQM RSFQM",2217:" 12JZNFMM ROFMM RVFUM RWFUM",2218:" 14KYQFOGNINKOMQNSNUMVKVIUGSFQF",2219:" 9JZRFRR RMIWO RWIMO",2220:" 3G][BIb",2221:" 20KYVBTDRGPKOPOTPYR]T`Vb RTDRHQKPPPTQYR\\T`",2222:" 20KYNBPDRGTKUPUTTYR]P`Nb RPDRHSKTPTTSYR\\P`",2223:" 12KYOBOb RPBPb ROBVB RObVb",2224:" 12KYTBTb RUBUb RNBUB RNbUb",2225:" 40KYTBRCQDPFPHQJRKSMSOQQ RRCQEQGRISJTLTNSPORSTTVTXSZR[Q]Q_Ra RQSSUSWRYQZP\\P^Q`RaTb",2226:" 40KYPBRCSDTFTHSJRKQMQOSQ RRCSESGRIQJPLPNQPURQTPVPXQZR[S]S_Ra RSSQUQWRYSZT\\T^S`RaPb",2227:" 4KYUBNRUb",2228:" 4KYOBVROb",2229:" 3NVRBRb",2230:" 6KYOBOb RUBUb",2231:" 3E_IR[R",2232:" 6E_RIR[ RIR[R",2233:" 9F^RJR[ RJRZR RJ[Z[",2234:" 9F^RJR[ RJJZJ RJRZR",2235:" 6G]KKYY RYKKY",2236:" 6MWRQQRRSSRRQ",2237:" 15E_RIQJRKSJRI RIR[R RRYQZR[SZRY",2238:" 6E_IO[O RIU[U",2239:" 9E_YIK[ RIO[O RIU[U",2240:" 9E_IM[M RIR[R RIW[W",2241:" 4F^ZIJRZ[",2242:" 4F^JIZRJ[",2243:" 10F^ZFJMZT RJVZV RJ[Z[",2244:" 10F^JFZMJT RJVZV RJ[Z[",2245:" 21F_[WYWWVUTRPQOONMNKOJQJSKUMVOVQURTUPWNYM[M",2246:" 24F^IUISJPLONOPPTSVTXTZS[Q RISJQLPNPPQTTVUXUZT[Q[O",2247:" 8G]JTROZT RJTRPZT",2248:" 7LXTFOL RTFUGOL",2249:" 7LXPFUL RPFOGUL",2250:" 18H\\KFLHNJQKSKVJXHYF RKFLINKQLSLVKXIYF",2251:" 8MWRHQGRFSGSIRKQL",2252:" 8MWSFRGQIQKRLSKRJ",2253:" 8MWRHSGRFQGQIRKSL",2254:" 8MWQFRGSISKRLQKRJ",2255:" 10E[HMLMRY RKMR[ R[BR[",2256:" 13F^ZJSJOKMLKNJQJSKVMXOYSZZZ",2257:" 13F^JJJQKULWNYQZSZVYXWYUZQZJ",2258:" 13F^JJQJUKWLYNZQZSYVWXUYQZJZ",2259:" 13F^JZJSKOLMNKQJSJVKXMYOZSZZ",2260:" 16F^ZJSJOKMLKNJQJSKVMXOYSZZZ RJRVR",2261:" 11E_XP[RXT RUMZRUW RIRZR",2262:" 11JZPLRITL RMORJWO RRJR[",2263:" 11E_LPIRLT ROMJROW RJR[R",2264:" 11JZPXR[TX RMURZWU RRIRZ",2265:" 44I\\XRWOVNTMRMONMQLTLWMYNZP[R[UZWXXUYPYKXHWGUFRFPGOHOIPIPH RRMPNNQMTMXNZ RR[TZVXWUXPXKWHUF",2266:" 15H\\JFR[ RKFRY RZFR[ RJFZF RKGYG",2267:" 10AbDMIMRY RHNR[ Rb:R[",2268:" 32F^[CZD[E\\D\\C[BYBWCUETGSJRNPZO^N` RVDUFTJRVQZP]O_MaKbIbHaH`I_J`Ia",2269:" 50F^[CZD[E\\D\\C[BYBWCUETGSJRNPZO^N` RVDUFTJRVQZP]O_MaKbIbHaH`I_J`Ia RQKNLLNKQKSLVNXQYSYVXXVYSYQXNVLSKQK",2270:" 26F_\\S[UYVWVUUTTQPPONNLNJOIQISJULVNVPUQTTPUOWNYN[O\\Q\\S",2271:" 32F^[FI[ RNFPHPJOLMMKMIKIIJGLFNFPGSHVHYG[F RWTUUTWTYV[X[ZZ[X[VYTWT",2272:" 49F_[NZO[P\\O\\N[MZMYNXPVUTXRZP[M[JZIXIUJSPORMSKSIRGPFNGMIMKNNPQUXWZZ[[[\\Z\\Y RM[KZJXJUKSMQ RMKNMVXXZZ[",2273:" 56E`WNVLTKQKOLNMMPMSNUPVSVUUVS RQKOMNPNSOUPV RWKVSVUXVZV\\T]Q]O\\L[JYHWGTFQFNGLHJJILHOHRIUJWLYNZQ[T[WZYYZX RXKWSWUXV",2274:" 42H\\PBP_ RTBT_ RXIWJXKYJYIWGTFPFMGKIKKLMMNOOUQWRYT RKKMMONUPWQXRYTYXWZT[P[MZKXKWLVMWLX",2275:" 12H]SFLb RYFRb RLQZQ RKWYW",2276:" 46JZUITJUKVJVIUGSFQFOGNINKOMQOVR ROMTPVRWTWVVXTZ RPNNPMRMTNVPXU[ RNVSYU[V]V_UaSbQbOaN_N^O]P^O_",2277:" 30JZRFQHRJSHRF RRFRb RRQQTRbSTRQ RLMNNPMNLLM RLMXM RTMVNXMVLTM",2278:" 56JZRFQHRJSHRF RRFRT RRPQRSVRXQVSRRP RRTRb RR^Q`RbS`R^ RLMNNPMNLLM RLMXM RTMVNXMVLTM RL[N\\P[NZL[ RL[X[ RT[V\\X[VZT[",2279:" 12I\\XFX[ RKFXF RPPXP RK[X[",2281:" 38E`QFNGKIILHOHRIUKXNZQ[T[WZZX\\U]R]O\\LZIWGTFQF RROQPQQRRSRTQTPSORO RRPRQSQSPRP",2282:" 45J[PFNGOIQJ RPFOGOI RUFWGVITJ RUFVGVI RQJOKNLMNMQNSOTQUTUVTWSXQXNWLVKTJQJ RRUR[ RSUS[ RNXWX",2283:" 27I\\RFOGMILLLMMPORRSSSVRXPYMYLXIVGSFRF RRSR[ RSSS[ RNWWW",2284:" 28D`PFMGJIHLGOGSHVJYM[P\\T\\W[ZY\\V]S]O\\LZIWGTFPF RRFR\\ RGQ]Q",2285:" 31G`PMMNKPJSJTKWMYPZQZTYVWWTWSVPTNQMPM R]GWG[HUN R]G]M\\IVO R\\HVN",2286:" 28F\\IIJGLFOFQGRIRLQOPQNSKU ROFPGQIQMPPNS RVFT[ RWFS[ RKUYU",2287:" 30I\\MFMU RNFMQ RMQNOONQMTMWNXPXRWTUV RTMVNWPWRTXTZU[W[YY RKFNF",2288:" 44I\\RNOOMQLTLUMXOZR[S[VZXXYUYTXQVOSNRN RRHNJRFRN RSHWJSFSN RRSQTQURVSVTUTTSSRS RRTRUSUSTRT",2289:" 37G^QHRFR[ RTHSFS[ RJHKFKMLPNRQSRS RMHLFLNMQ R[HZFZMYPWRTSSS RXHYFYNXQ RNWWW",2290:" 31G]LFL[ RMFM[ RIFUFXGYHZJZMYOXPUQMQ RUFWGXHYJYMXOWPUQ RI[Y[YVX[",2291:" 24H[YGUGQHNJLMKPKSLVNYQ[U\\Y\\ RYGVHSJQMPPPSQVSYV[Y\\",2292:" 27F_OQMQKRJSIUIWJYKZM[O[QZRYSWSURSQROQ RSHPQ RZJRR R\\QST",2293:" 12H\\OKUY RUKOY RKOYU RYOKU",2294:" 48F^NVLUKUIVHXHYI[K\\L\\N[OYOXNVKRJOJMKJMHPGTGWHYJZMZOYRVVUXUYV[X\\Y\\[[\\Y\\X[VYUXUVV RJMKKMIPHTHWIYKZM",2295:" 48F^NMLNKNIMHKHJIHKGLGNHOJOKNMKQJTJVKYM[P\\T\\W[YYZVZTYQVMUKUJVHXGYG[H\\J\\K[MYNXNVM RJVKXMZP[T[WZYXZV",2301:" 40F_JMILIJJHLGNGPHQIRKSP RIJKHMHOIPJQLRPR[ R[M\\L\\J[HYGWGUHTISKRP R\\JZHXHVIUJTLSPS[",2302:" 51F^IGJKKMMOPPTPWOYMZK[G RIGJJKLMNPOTOWNYLZJ[G RPONPMQLSLVMXOZQ[S[UZWXXVXSWQVPTO RPPNQMSMVNY RVYWVWSVQTP",2303:" 30F^MJMV RNKNU RVKVU RWJWV RIGKIMJPKTKWJYI[G RIYKWMVPUTUWVYW[Y",2304:" 48F^[ILIJJILINJPLQNQPPQNQLPJ[J RIMJOKPMQ RQMPKOJMI RIXXXZW[U[SZQXPVPTQSSSUTWIW R[TZRYQWP RSTTVUWWX",2305:" 48F]OUMTLTJUIWIXJZL[M[OZPXPWOUJPINIKJILHOGSGWHYJZLZOYRVUUWUYV[X[YZZX RMSKPJNJKKILH RSGVHXJYLYOXRVU",2306:" 48G_HKKHMKMV RJILLLV RMKPHRKRU ROIQLQU RRKUHWKW[ RTIVLV[ RWKZH[J\\M\\P[SZUXWUYP[ RYIZJ[M[PZSYUWWTYP[",2307:" 41F^ISMSLRKOKMLJNHQGSGVHXJYMYOXRWS[S RITOTMRLOLMMJOHQG RSGUHWJXMXOWRUT[T RKXYX RKYYY",2308:" 30F_GLJIMLMX RIJLMLX RMLPISLSX ROJRMRX RSLVIYLYW[Y RUJXMXXZZ]W",2309:" 33G]ZIJY RZIWJQJ RXKUKQJ RZIYLYR RXKXNYR RQRJR RPSMSJR RQRQY RPSPVQY",2310:" 33F^HOJKOU RJMOWRPWPZO[M[KZIXHWHUITKTMUPVRWUWXUZ RWHVIUKUMWQXTXWWYUZ",2311:" 36F^IOLLPN RKMOORLUN RQMTOWLYN RVMXO[L RIULRPT RKSOURRUT RQSTUWRYT RVSXU[R",2312:" 48F^JHNJPLQOQRPUNWJY RJHMIOJQLRO RRRQUOWMXJY RZHWIUJSLRO RRRSUUWWXZY RZHVJTLSOSRTUVWZY RIP[P RIQ[Q",2317:" 12NVQQQSSSSQQQ RQQSS RSQQS",2318:" 18JZMPQRTTVVWYW[V]U^ RMQST RMRPSTUVWWY",2319:" 18JZWKVMTOPQMR RSPMS RUFVGWIWKVNTPQRMT",2320:" 36H\\SMONLPKRKTLVNWQWUVXTYRYPXNVMSM RXNSM RVMQNLP RONKR RLVQW RNWSVXT RUVYR",2321:" 36H\\SMONLPKRKTLVNWQWUVXTYRYPXNVMSM RXNSM RVMQNLP RONKR RLVQW RNWSVXT RUVYR",2322:" 34J[SMPNNPMRMTNVPWRWUVWTXRXPWNUMSM ROPUM RNRVN RMTWO RNUXP ROVWR RPWVT",2323:" 18JZOGO^ RUFU] RMNWL RMOWM RMWWU RMXWV",2324:" 18JZNFNX RVLV^ RNNVL RNOVM RNWVU RNXVV",2325:" 25JZNBNW RNNQLTLVMWOWQVSSUQVNW RNNQMTMVN RUMVOVQUSSU",2326:" 18E_HIHL R\\I\\L RHI\\I RHJ\\J RHK\\K RHL\\L",2327:" 18JZMNMQ RWNWQ RMNWN RMOWO RMPWP RMQWQ",2328:" 49JZMLWX RMLONQOTOVNWMWKUKUMTO RONTO RQOWM RVKVN RULWL RWXUVSUPUNVMWMYOYOWPU RUVPU RSUMW RNVNY RMXOX",2329:" 26JZPOOMOKMKMMNNPOSOUNWL RNKNN RMLOL RMMSO RPOUN RWLWY",2330:" 86A^GfHfIeIdHcGcFdFfGhIiKiNhPfQdR`RUQ;Q4R/S-U,V,X-Y/Y3X6W8U;P?JCHEFHEJDNDREVGYJ[N\\R\\V[XZZW[T[PZMYKWITHPHMIKKJNJRKUMW RGdGeHeHdGd RU;Q?LCIFGIFKENERFVGXJ[ RR\\U[WZYWZTZPYMXKVITH",2331:"103EfNSOUQVSVUUVSVQUOSNQNOONPMSMVNYP[S\\V\\Y[[Y\\W]T]P\\MZJXIUHRHOIMJKLIOHSHXI]KaMcPeTfYf]e`cba RKLJNIRIXJ\\L`NbQdUeYe]d_cba RPOTO ROPUP RNQVQ RNRVR RNSVS ROTUT RPUTU RaLaNcNcLaL RbLbN RaMcM RaVaXcXcVaV RbVbX RaWcW",2332:" 30D`H@Hd RM@Md RW@Wd R\\@\\d RMMWK RMNWL RMOWM RMWWU RMXWV RMYWW",2367:" 12NVQQQSSSSQQQ RQQSS RSQQS",2368:" 18JZMPQRTTVVWYW[V]U^ RMQST RMRPSTUVWWY",2369:" 18JZWKVMTOPQMR RSPMS RUFVGWIWKVNTPQRMT",2370:" 32H\\PMMNLOKQKSLUMVPWTWWVXUYSYQXOWNTMPM RMNLPLSMUNVPW RWVXTXQWOVNTM",2371:" 36H\\SMONLPKRKTLVNWQWUVXTYRYPXNVMSM RXNSM RVMQNLP RONKR RLVQW RNWSVXT RUVYR",2372:" 34J[SMPNNPMRMTNVPWRWUVWTXRXPWNUMSM ROPUM RNRVN RMTWO RNUXP ROVWR RPWVT",2373:" 18JZOGO^ RUFU] RMNWL RMOWM RMWWU RMXWV",2374:" 18JZNFNX RVLV^ RNNVL RNOVM RNWVU RNXVV",2375:" 25JZNBNW RNNQLTLVMWOWQVSSUQVNW RNNQMTMVN RUMVOVQUSSU",2376:" 18E_HIHL R\\I\\L RHI\\I RHJ\\J RHK\\K RHL\\L",2377:" 18JZMNMQ RWNWQ RMNWN RMOWO RMPWP RMQWQ",2378:" 36JZQCVMRTRU RULQS RTITKPRRUUY RW\\UYSXQXOYN[N]O_Ra RW\\UZSYOYO]P_Ra RSXPZN]",2379:" 26JZPOOMOKMKMMNNPOSOUNWL RNKNN RMLOL RMMSO RPOUN RWLSY",2380:" 86A^GfHfIeIdHcGcFdFfGhIiKiNhPfQdR`RUQ;Q4R/S-U,V,X-Y/Y3X6W8U;P?JCHEFHEJDNDREVGYJ[N\\R\\V[XZZW[T[PZMYKWITHPHMIKKJNJRKUMW RGdGeHeHdGd RU;Q?LCIFGIFKENERFVGXJ[ RR\\U[WZYWZTZPYMXKVITH",2381:" 89IjNQOOQNSNUOVQVSUUSVQVOUNTMQMNNKPISHWH[I^K`NaRaW`[_]]`ZcVfQiMk RWHZI]K_N`R`W_[^]\\`YcTgQi RPOTO ROPUP RNQVQ RNRVR RNSVS ROTUT RPUTU ReLeNgNgLeL RfLfN ReMgM ReVeXgXgVeV RfVfX ReWgW",2382:" 85D`H>Hf RI>If RM>Mf RQBSBSDQDQAR?T>W>Y?[A\\D\\I[LYNWOUOSNRLQNOQNROSQVRXSVUUWUYV[X\\[\\`[cYeWfTfReQcQ`S`SbQb RRBRD RQCSC RY?ZA[D[IZLYN RRLRNPQNRPSRVRX RYVZX[[[`ZcYe RR`Rb RQaSa",2401:" 21AcHBHb RIBIb R[B[b R\\B\\b RDB`B RDbMb RWb`b",2402:" 23BaGBQPFb RFBPP REBPQ REB\\B^I[B RGa\\a RFb\\b^[[b",2403:" 28I[X+U1R8P=OANFMNMVN^OcPgRlUsXy RU1S6Q<P@OFNNNVO^PdQhSnUs",2404:" 28I[L+O1R8T=UAVFWNWVV^UcTgRlOsLy RO1Q6S<T@UFVNVVU^TdShQnOs",2405:" 14I[M+MRMy RN+NRNy RM+X+ RMyXy",2406:" 14I[V+VRVy RW+WRWy RL+W+ RLyWy",2407:" 48I[V+S-Q/P1O4O8P<TDUGUJTMRP RS-Q0P4P8Q;UCVGVJUMRPNRRTUWVZV]UaQiPlPpQtSw RRTTWUZU]T`PhOlOpPsQuSwVy",2408:" 48I[N+Q-S/T1U4U8T<PDOGOJPMRP RQ-S0T4T8S;OCNGNJOMRPVRRTOWNZN]OaSiTlTpStQw RRTPWOZO]P`ThUlUpTsSuQwNy",2409:" 32I[V.S1Q4O8N=NCOIPMSXT\\UbUgTlSoQs RS1Q5P8O=OBPHQLTWU[VaVgUlSpQsNv",2410:" 32I[N.Q1S4U8V=VCUITMQXP\\ObOgPlQoSs RQ1S5T8U=UBTHSLPWO[NaNgOlQpSsVv",2411:' 147Z:RARRo R@RQo R?RRr RZ"VJRr',2412:" 57Ca].\\.[/[0\\1]1^0^.],[+Y+W,U.T0S3R:QJQjPsOv R\\/\\0]0]/\\/ RR:Rj RU.T1S:SZRjQqPtOvMxKyIyGxFvFtGsHsItIuHvGv RGtGuHuHtGt",2501:" 20H\\RFJ[ RRIK[J[ RRIY[Z[ RRFZ[ RMUWU RLVXV",2502:" 44H\\LFL[ RMGMZ RLFTFWGXHYJYMXOWPTQ RMGTGWHXJXMWOTP RMPTPWQXRYTYWXYWZT[L[ RMQTQWRXTXWWYTZMZ",2503:" 38H]ZKYIWGUFQFOGMILKKNKSLVMXOZQ[U[WZYXZV RZKYKXIWHUGQGOHMKLNLSMVOYQZUZWYXXYVZV",2504:" 32H]LFL[ RMGMZ RLFSFVGXIYKZNZSYVXXVZS[L[ RMGSGVHWIXKYNYSXVWXVYSZMZ",2505:" 27I\\MFM[ RNGNZ RMFYF RNGYGYF RNPTPTQ RNQTQ RNZYZY[ RM[Y[",2506:" 21I[MFM[ RNGN[M[ RMFYF RNGYGYF RNPTPTQ RNQTQ",2507:" 44H]ZKYIWGUFQFOGMILKKNKSLVMXOZQ[U[WZYXZVZRUR RZKYKXIWHUGQGOHNIMKLNLSMVNXOYQZUZWYXXYVYSUSUR",2508:" 22G]KFK[ RKFLFL[K[ RYFXFX[Y[ RYFY[ RLPXP RLQXQ",2509:" 8NWRFR[S[ RRFSFS[",2510:" 20J[VFVVUYSZQZOYNVMV RVFWFWVVYUZS[Q[OZNYMV",2511:" 22H]LFL[M[ RLFMFM[ RZFYFMR RZFMS RPOY[Z[ RQOZ[",2512:" 14IZMFM[ RMFNFNZ RNZYZY[ RM[Y[",2513:" 26F^JFJ[ RKKK[J[ RKKR[ RJFRX RZFRX RYKR[ RYKY[Z[ RZFZ[",2514:" 20G]KFK[ RLIL[K[ RLIY[ RKFXX RXFXX RXFYFY[",2515:" 40G]PFNGLIKKJNJSKVLXNZP[T[VZXXYVZSZNYKXIVGTFPF RQGNHLKKNKSLVNYQZSZVYXVYSYNXKVHSGQG",2516:" 27H\\LFL[ RMGM[L[ RLFUFWGXHYJYMXOWPUQMQ RMGUGWHXJXMWOUPMP",2517:" 48G]PFNGLIKKJNJSKVLXNZP[T[VZXXYVZSZNYKXIVGTFPF RQGNHLKKNKSLVNYQZSZVYXVYSYNXKVHSGQG RSXX]Y] RSXTXY]",2518:" 34H\\LFL[ RMGM[L[ RLFTFWGXHYJYMXOWPTQMQ RMGTGWHXJXMWOTPMP RRQX[Y[ RSQY[",2519:" 43H\\YIWGTFPFMGKIKKLMMNOOTQVRWSXUXXWYTZPZNYMXKX RYIWIVHTGPGMHLILKMMONTPVQXSYUYXWZT[P[MZKX",2520:" 15J[RGR[ RSGS[R[ RLFYFYG RLFLGYG",2521:" 24G]KFKULXNZQ[S[VZXXYUYF RKFLFLUMXNYQZSZVYWXXUXFYF",2522:" 14H\\JFR[ RJFKFRX RZFYFRX RZFR[",2523:" 26E_GFM[ RGFHFMX RRFMX RRIM[ RRIW[ RRFWX R]F\\FWX R]FW[",2524:" 16H\\KFX[Y[ RKFLFY[ RYFXFK[ RYFL[K[",2525:" 17I\\KFRPR[S[ RKFLFSP RZFYFRP RZFSPS[",2526:" 20H\\XFK[ RYFL[ RKFYF RKFKGXG RLZYZY[ RK[Y[",2551:" 38E\\XFVHTKQPOSLWIZG[E[DZDXEWFXEY RXFWJUTT[ RXFU[ RT[TYSVRTPRNQLQKRKTLWOZR[V[XZ",2552:" 70F^UGTHSJQOOUNWLZJ[ RTHSKQSPVOXMZJ[H[GZGXHWIXHY ROLNNMOKOJNJLKJMHOGRFXFZG[I[KZMXNTORO RXFYGZIZKYMXN RTOWPXQYSYVXYWZU[S[RZRXSU RTOVPWQXSXVWYU[",2553:" 41H]KHJJJLKNNOQOUNWMYKZIZGYFWFTGQJOMMQLULXMZP[R[UZWXXVXTWRURSSRU RWFUGRJPMNQMUMXNZP[",2554:" 43F]UGTHSJQOOUNWLZJ[ RTHSKQSPVOXMZJ[H[GZGXHWJWLXNZP[S[UZWXYTZOZLYIWGUFPFMGKIJKJMKNMNNMOK",2555:" 49I\\WIVJVLWMYMZKZIYGWFTFRGQHPJPLQNSO RTFRHQJQMSO RSOQONPLRKTKWLYMZO[R[UZWXXVXTWRURSSRU RQOOPMRLTLXMZ",2556:" 46G\\WHVJTORUQWOZM[ RQLPNNOLOKMKKLINGQF[FXGWHVKTSSVRXPZM[K[IZHYHXIWJXIY RSFWGXG ROSPRRQVQXPZMXT",2557:" 53G]JIIKIMJOLPOPROTNWKXHXGWFVFTGRIQKPNPQQSSTUTWSYQZO RWFUGSIRKQNQRST RZOYSWWUYSZO[L[JZIXIWJVKWJX RYSWVUXRZO[",2558:" 55F^LLKKKILGOFRFOQMWLYKZI[G[FZFXGWHXGY RRFOONRLWKYI[ RJTKSMRVOXN[L]J^H^G]F\\FZGXJWLURTVTYV[W[YZ[X R\\FZHXLVRUVUYV[",2559:" 33IYWHUKSPQUPWNZL[ RYLWNTOQOONNLNJOHQGUFYFWHVJTPRVQXOZL[J[IZIXJWKXJY",2560:" 34IZYFWHUKSPPYN] RYMWOTPQPOONMNKOIQGUFYFWIVKSTQXPZN]M^K_J^J\\KZMXOWRVVU",2561:" 59F^LLKKKIMGPFRFOQMWLYKZI[G[FZFXGWHXGY RRFOONRLWKYI[ RZGWKUMSNPO R]G\\H]I^H^G]F\\FZGWLVMTNPO RPOSPTRUYV[ RPORPSRTYV[W[YZ[X",2562:" 40I[MILKLMMOOPRPUOWNZK[H[GZFYFWGVHTKPUOWMZK[ RVHTLRSQVPXNZK[I[HZHXIWKWMXPZR[U[WZYX",2563:" 49D`RFNOKUIXGZE[C[BZBXCWDXCY RRFPMOQNVNZP[ RRFQJPOOVOZP[ R[FWORXP[ R[FYMXQWVWZY[Z[\\Z^X R[FZJYOXVXZY[",2564:" 38G^RFQJOPMULWJZH[F[EZEXFWGXFY RRFRKSVT[ RRFSKTVT[ R`G_H`IaHaG`F^F\\GZJYLWQUWT[",2565:" 34H]SFQGOIMLLNKRKVLYMZO[Q[TZVXXUYSZOZKYHXGWGUHSJQNPSPV RQGOJMNLRLVMYO[",2566:" 53F]UGTHSJQOOUNWLZJ[ RTHSKQSPVOXMZJ[H[GZGXHWIXHY ROLNNMOKOJNJLKJMHOGRFVFYGZH[J[MZOYPVQTQRP RVFXGYHZJZMYOXPVQ",2567:" 43H]UJULTNSOQPOPNNNLOIQGTFWFYGZIZMYPWSSWPYNZK[I[HZHXIWKWMXPZS[V[XZZX RWFXGYIYMXPVSSVOYK[",2568:" 65F^UGTHSJQOOUNWLZJ[ RTHSKQSPVOXMZJ[H[GZGXHWIXHY ROLNNMOKOJNJLKJMHOGRFWFZG[I[KZMYNVORO RWFYGZIZKYMXNVO RROUPVRWYX[ RROTPURVYX[Y[[Z]X",2569:" 36H\\NIMKMMNOPPSPVOXN[K\\H\\G[FZFXGWHVJUMSTRWPZN[ RVJUNTUSXQZN[K[IZHXHWIVJWIX",2570:" 38I[YHXJVOTUSWQZO[ RSLRNPONOMMMKNIPGSF\\FZGYHXKVSUVTXRZO[M[KZJYJXKWLXKY RUFYGZG",2571:" 39G]HJJGLFMFOHOKNNKVKYL[ RMFNHNKKSJVJYL[N[PZSWUTVR RZFVRUVUYW[X[ZZ\\X R[FWRVVVYW[",2572:" 36G\\HJJGLFMFOHOKNOLVLYM[ RMFNHNKLRKVKYM[N[QZTWVTXPYMZIZGYFXFWGVIVLWNYP[Q]Q",2573:" 41F]ILHLGKGIHGJFNFMHLLKUJ[ RLLLUK[ RVFTHRLOUMYK[ RVFUHTLSUR[ RTLTUS[ R`F^G\\IZLWUUYS[",2574:" 52H\\PKOLMLLKLIMGOFQFSGTITLSPQUOXMZJ[H[GZGXHWIXHY RQFRGSISLRPPUNXLZJ[ R]G\\H]I^H^G]F[FYGWIULSPRURXSZT[U[WZYX",2575:" 42G]JJLGNFOFQGQIOOORPT ROFPGPINONRPTRTUSWQYNZL R\\FZLWTUX R]F[LYQWUUXSZP[L[JZIXIWJVKWJX",2576:" 44G\\ZHYJWOVRUTSWQYOZL[ RSLRNPONOMMMKNIPGSF]F[GZHYKXOVUTXQZL[H[GZGXHWJWLXOZQ[T[WZYX RVFZG[G",2601:" 36H\\WMW[X[ RWMXMX[ RWPUNSMPMNNLPKSKULXNZP[S[UZWX RWPSNPNNOMPLSLUMXNYPZSZWX",2602:" 36H\\LFL[M[ RLFMFM[ RMPONQMTMVNXPYSYUXXVZT[Q[OZMX RMPQNTNVOWPXSXUWXVYTZQZMX",2603:" 32I[XPVNTMQMONMPLSLUMXOZQ[T[VZXX RXPWQVOTNQNOONPMSMUNXOYQZTZVYWWXX",2604:" 36H\\WFW[X[ RWFXFX[ RWPUNSMPMNNLPKSKULXNZP[S[UZWX RWPSNPNNOMPLSLUMXNYPZSZWX",2605:" 36I[MTXTXQWOVNTMQMONMPLSLUMXOZQ[T[VZXX RMSWSWQVOTNQNOONPMSMUNXOYQZTZVYWWXX",2606:" 24LZWFUFSGRJR[S[ RWFWGUGSH RTGSJS[ ROMVMVN ROMONVN",2607:" 48H\\XMWMW\\V_U`SaQaO`N_L_ RXMX\\W_UaSbPbNaL_ RWPUNSMPMNNLPKSKULXNZP[S[UZWX RWPSNPNNOMPLSLUMXNYPZSZWX",2608:" 25H\\LFL[M[ RLFMFM[ RMQPNRMUMWNXQX[ RMQPORNTNVOWQW[X[",2609:" 24NWRFQGQHRISITHTGSFRF RRGRHSHSGRG RRMR[S[ RRMSMS[",2610:" 24NWRFQGQHRISITHTGSFRF RRGRHSHSGRG RRMRbSb RRMSMSb",2611:" 22H[LFL[M[ RLFMFM[ RXMWMMW RXMMX RPTV[X[ RQSX[",2612:" 8NWRFR[S[ RRFSFS[",2613:" 42CbGMG[H[ RGMHMH[ RHQKNMMPMRNSQS[ RHQKOMNONQORQR[S[ RSQVNXM[M]N^Q^[ RSQVOXNZN\\O]Q][^[",2614:" 25H\\LML[M[ RLMMMM[ RMQPNRMUMWNXQX[ RMQPORNTNVOWQW[X[",2615:" 36I\\QMONMPLSLUMXOZQ[T[VZXXYUYSXPVNTMQM RQNOONPMSMUNXOYQZTZVYWXXUXSWPVOTNQN",2616:" 36H\\LMLbMb RLMMMMb RMPONQMTMVNXPYSYUXXVZT[Q[OZMX RMPQNTNVOWPXSXUWXVYTZQZMX",2617:" 36H\\WMWbXb RWMXMXb RWPUNSMPMNNLPKSKULXNZP[S[UZWX RWPSNPNNOMPLSLUMXNYPZSZWX",2618:" 21KYOMO[P[ ROMPMP[ RPSQPSNUMXM RPSQQSOUNXNXM",2619:" 50J[XPWNTMQMNNMPNRPSUUWV RVUWWWXVZ RWYTZQZNY ROZNXMX RXPWPVN RWOTNQNNO RONNPOR RNQPRUTWUXWXXWZT[Q[NZMX",2620:" 16MXRFR[S[ RRFSFS[ ROMVMVN ROMONVN",2621:" 25H\\LMLWMZO[R[TZWW RLMMMMWNYPZRZTYWW RWMW[X[ RWMXMX[",2622:" 14JZLMR[ RLMMMRY RXMWMRY RXMR[",2623:" 26F^IMN[ RIMJMNX RRMNX RRPN[ RRPV[ RRMVX R[MZMVX R[MV[",2624:" 16I[LMW[X[ RLMMMX[ RXMWML[ RXMM[L[",2625:" 17JZLMR[ RLMMMRY RXMWMRYNb RXMR[ObNb",2626:" 20I[VNL[ RXMNZ RLMXM RLMLNVN RNZXZX[ RL[X[",2651:" 33K[UUTSRRPRNSMTLVLXMZO[Q[SZTX RPRNTMVMYO[ RVRTXTZV[XZYY[V RWRUXUZV[",2652:" 23LZLVNSPO RSFMXMZO[P[RZTXUUURVVWWXWZV RTFNXNZO[",2653:" 22LXTSSTTTTSSRQROSNTMVMXNZP[S[VYXV RQROTNVNYP[",2654:" 33K[UUTSRRPRNSMTLVLXMZO[Q[SZTX RPRNTMVMYO[ RZFTXTZV[XZYY[V R[FUXUZV[",2655:" 23LXOYQXRWSUSSRRQROSNTMVMXNZP[S[VYXV RQROTNVNYP[",2656:" 27OXRRUOWLXIXGWFUGTIKdKfLgNfOcPZQ[S[UZVYXV RTISNRRO[M`Kd",2657:" 38K[UUTSRRPRNSMTLVLXMZO[Q[SZTX RPRNTMVMYO[ RVRPd RWRT[R`PdOfMgLfLdMaO_R]V[YY[V",2658:" 30L[LVNSPO RSFL[ RTFM[ ROUQSSRTRVSVUUXUZV[ RTRUSUUTXTZV[XZYY[V",2659:" 19NVSLRMSNTMSL RQROXOZQ[SZTYVV RRRPXPZQ[",2660:" 24NVSLRMSNTMSL RQRKd RRRO[M`KdJfHgGfGdHaJ_M]Q[TYVV",2661:" 31LZLVNSPO RSFL[ RTFM[ RURUSVSURTRRTOU ROURVSZT[ ROUQVRZT[U[XYZV",2662:" 17NVNVPSRO RUFOXOZQ[SZTYVV RVFPXPZQ[",2663:" 45E^EVGSIRKSKUI[ RIRJSJUH[ RKUMSORPRRSRUP[ RPRQSQUO[ RRUTSVRWRYSYUXXXZY[ RWRXSXUWXWZY[[Z\\Y^V",2664:" 32I[IVKSMROSOUM[ RMRNSNUL[ ROUQSSRTRVSVUUXUZV[ RTRUSUUTXTZV[XZYY[V",2665:" 29KYRRPRNSMTLVLXMZO[Q[SZTYUWUUTSRRQSQURWTXVXXWYV RPRNTMVMYO[",2666:" 30L[LVNSPO RQLHg RRLIg ROUQSSRTRVSVUUXUZV[ RTRUSUUTXTZV[XZYY[V",2667:" 35K[UUTSRRPRNSMTLVLXMZO[Q[SZ RPRNTMVMYO[ RVRPdPfQgSfTcT[V[YY[V RWRT[R`Pd",2668:" 24LZLVNSPRRSRUP[ RPRQSQUO[ RRUTSVRWRVU RVRVUWWXWZV",2669:" 22NZNVPSQQQSTUUWUYTZR[ RQSSUTWTYR[ RNZP[U[XYZV",2670:" 20NVNVPSRO RUFOXOZQ[SZTYVV RVFPXPZQ[ RPNVN",2671:" 27K[NRLXLZN[O[QZSXUU RORMXMZN[ RVRTXTZV[XZYY[V RWRUXUZV[",2672:" 23KZNRMTLWLZN[O[RZTXUUUR RORNTMWMZN[ RURVVWWXWZV",2673:" 36H]LRJTIWIZK[L[NZPX RMRKTJWJZK[ RRRPXPZR[S[UZWXXUXR RSRQXQZR[ RXRYVZW[W]V",2674:" 42JZJVLSNRPRQSQUPXOZM[L[KZKYLYKZ RWSVTWTWSVRURSSRUQXQZR[U[XYZV RQSRU RSSQU RPXQZ RQXOZ",2675:" 32K[NRLXLZN[O[QZSXUU RORMXMZN[ RVRPd RWRT[R`PdOfMgLfLdMaO_R]V[YY[V",2676:" 38LYLVNSPRRRTSTVSXPZN[ RRRSSSVRXPZ RN[P\\Q^QaPdNfLgKfKdLaO^R\\VYYV RN[O\\P^PaOdNf",2700:" 42H\\QFNGLJKOKRLWNZQ[S[VZXWYRYOXJVGSFQF ROGMJLOLRMWOZ RNYQZSZVY RUZWWXRXOWJUG RVHSGQGNH",2701:" 12H\\NJPISFS[ RNJNKPJRHR[S[",2702:" 34H\\LKLJMHNGPFTFVGWHXJXLWNUQL[ RLKMKMJNHPGTGVHWJWLVNTQK[ RLZYZY[ RK[Y[",2703:" 48H\\MFXFQO RMFMGWG RWFPO RQNSNVOXQYTYUXXVZS[P[MZLYKWLW RPOSOVPXS RTOWQXTXUWXTZ RXVVYSZPZMYLW ROZLX",2704:" 18H\\UIU[V[ RVFV[ RVFKVZV RUILV RLUZUZV",2705:" 53H\\MFLO RNGMN RMFWFWG RNGWG RMNPMSMVNXPYSYUXXVZS[P[MZLYKWLW RLOMOONSNVOXR RTNWPXSXUWXTZ RXVVYSZPZMYLW ROZLX",2706:" 62H\\VGWIXIWGTFRFOGMJLOLTMXOZR[S[VZXXYUYTXQVOSNRNOOMQ RWHTGRGOH RPGNJMOMTNXQZ RMVOYRZSZVYXV RTZWXXUXTWQTO RXSVPSOROOPMS RQONQMT",2707:" 12H\\KFYFO[ RKFKGXG RXFN[O[",2708:" 68H\\PFMGLILKMMNNPOTPVQWRXTXWWYTZPZMYLWLTMRNQPPTOVNWMXKXIWGTFPF RNGMIMKNMPNTOVPXRYTYWXYWZT[P[MZLYKWKTLRNPPOTNVMWKWIVG RWHTGPGMH RLXOZ RUZXX",2709:" 62H\\WPURRSQSNRLPKMKLLINGQFRFUGWIXMXRWWUZR[P[MZLXMXNZ RWMVPSR RWNUQRRQRNQLN RPRMPLMLLMIPG RLKNHQGRGUHWK RSGVIWMWRVWTZ RUYRZPZMY",2710:" 16MXRXQYQZR[S[TZTYSXRX RRYRZSZSYRY",2711:" 24MXTZS[R[QZQYRXSXTYT\\S^Q_ RRYRZSZSYRY RS[T\\ RTZS^",2712:" 32MXRMQNQORPSPTOTNSMRM RRNROSOSNRN RRXQYQZR[S[TZTYSXRX RRYRZSZSYRY",2713:" 40MXRMQNQORPSPTOTNSMRM RRNROSOSNRN RTZS[R[QZQYRXSXTYT\\S^Q_ RRYRZSZSYRY RS[T\\ RTZS^",2714:" 24MXRFRTST RRFSFST RRXQYQZR[S[TZTYSXRX RRYRZSZSYRY",2715:" 58I\\LKLJMHNGQFTFWGXHYJYLXNWOUPRQ RLKMKMJNHQGTGWHXJXLWNUORP RMIPG RUGXI RXMTP RRPRTSTSP RRXQYQZR[S[TZTYSXRX RRYRZSZSYRY",2716:" 24MXTFRGQIQLRMSMTLTKSJRJQK RRKRLSLSKRK RRGQK RQIRJ",2717:" 24MXTHSIRIQHQGRFSFTGTJSLQM RRGRHSHSGRG RSITJ RTHSL",2718:" 71F_\\MZMXNWPUVTXSYQZMZKYJWJUKSLRQOSMTKTISGQFPFNGMIMKNNPQUWXZZ[\\[ R\\M\\NZNXO RYNXPVVUXSZQ[M[KZJYIWIUJSLQQNRMSKSIRG RSHQGPGNH ROGNINKONQQVWXYZZ\\Z\\[",2719:" 51I\\RBR_S_ RRBSBS_ RWIYIWGTFQFNGLILKMMNNVRWSXUXWWYTZQZOYNX RWIVHTGQGNHMIMKNMVQXSYUYWXYWZT[Q[NZLXNX RXXUZ",2720:" 8G^[BIbJb R[B\\BJb",2721:" 24KYUBSDQGOKNPNTOYQ]S`UbVb RUBVBTDRGPKOPOTPYR]T`Vb",2722:" 24KYNBPDRGTKUPUTTYR]P`NbOb RNBOBQDSGUKVPVTUYS]Q`Ob",2723:" 39JZRFQGSQRR RRFRR RRFSGQQRR RMINIVOWO RMIWO RMIMJWNWO RWIVINOMO RWIMO RWIWJMNMO",2724:" 8F_JQ[Q[R RJQJR[R",2725:" 16F_RIRZSZ RRISISZ RJQ[Q[R RJQJR[R",2726:" 16F_JM[M[N RJMJN[N RJU[U[V RJUJV[V",2727:" 11NWSFRGRM RSGRM RSFTGRM",2728:" 22I[NFMGMM RNGMM RNFOGMM RWFVGVM RWGVM RWFXGVM",2729:" 30KYQFOGNINKOMQNSNUMVKVIUGSFQF RQFNIOMSNVKUGQF RSFOGNKQNUMVISF",2750:" 42H]TFQGOIMLLOKSKVLYMZO[Q[TZVXXUYRZNZKYHXGVFTF RTFRGPINLMOLSLVMYO[ RQ[SZUXWUXRYNYKXHVF",2751:" 15H]TJO[ RVFP[ RVFSIPKNL RUIQKNL",2752:" 42H]OJPKOLNKNJOHPGSFVFYGZIZKYMWOTQPSMUKWI[ RVFXGYIYKXMVOPS RJYKXMXRZUZWYXW RMXR[U[WZXW",2753:" 50H]OJPKOLNKNJOHPGSFVFYGZIZKYMVOSP RVFXGYIYKXMVO RQPSPVQWRXTXWWYVZS[O[LZKYJWJVKULVKW RSPUQVRWTWWVYUZS[",2754:" 10H]XGR[ RYFS[ RYFJUZU",2755:" 39H]QFLP RQF[F RQGVG[F RLPMOPNSNVOWPXRXUWXUZR[O[LZKYJWJVKULVKW RSNUOVPWRWUVXTZR[",2756:" 46H]YIXJYKZJZIYGWFTFQGOIMLLOKSKWLYMZO[R[UZWXXVXSWQVPTOQOOPMRLT RTFRGPINLMOLSLXMZ RR[TZVXWVWRVP",2757:" 30H]NFLL R[FZIXLSRQUPWO[ RXLRRPUOWN[ RMIPFRFWI RNHPGRGWIYIZH[F",2758:" 63H]SFPGOHNJNMOOQPTPXOYNZLZIYGVFSF RSFQGPHOJOMPOQP RTPWOXNYLYIXGVF RQPMQKSJUJXKZN[R[VZWYXWXTWRVQTP RQPNQLSKUKXLZN[ RR[UZVYWWWSVQ",2759:" 46H]YMXOVQTRQROQNPMNMKNIPGSFVFXGYHZJZNYRXUVXTZQ[N[LZKXKWLVMWLX ROQNONKOIQGSF RXGYIYNXRWUUXSZQ[",2760:" 6MXPYOZP[QZPY",2761:" 8MXP[OZPYQZQ[P]N_",2762:" 11MXSMRNSOTNSM RPYOZP[QZ",2763:" 14MXSMRNSOTNSM RP[OZPYQZQ[P]N_",2764:" 17MXUFTGRS RUGRS RUFVGRS RPYOZP[QZPY",2765:" 34H]OJPKOLNKNJOHPGSFWFZG[I[KZMYNSPQQQSRTTT RWFYGZIZKYMXNVO RPYOZP[QZPY",2766:" 8MXVFTHSJSKTLUKTJ",2767:" 8MXUHTGUFVGVHUJSL",2768:" 55E_\\N[O\\P]O]N\\M[MYNWPRXPZN[K[HZGXGVHTISKRPPROTMUKUITGRFPGOIOLPRQUSXUZW[Y[ZYZX RK[IZHXHVITJSPP ROLPQQTSWUYWZYZZY",2769:" 41H]TBL_ RYBQ_ RZJYKZL[K[JZHYGVFRFOGMIMKNMONVRXT RMKOMVQWRXTXWWYVZS[O[LZKYJWJVKULVKW",2770:" 3G]_BEb",2771:" 20KZZBVESHQKOONTNXO]P`Qb RVESIQMPPOUOZP_Qb",2772:" 20JYSBTDUGVLVPUUSYQ\\N_Jb RSBTEUJUOTTSWQ[N_",2773:" 9J[TFTR ROIYO RYIOO",2774:" 3E_IR[R",2775:" 6E_RIR[ RIR[R",2776:" 6E_IO[O RIU[U",2777:" 6NWUFSM RVFSM",2778:" 12I[PFNM RQFNM RYFWM RZFWM",2779:" 14KZSFQGPIPKQMSNUNWMXKXIWGUFSF",2801:" 18H\\RFK[ RRFY[ RRIX[ RMUVU RI[O[ RU[[[",2802:" 31G]LFL[ RMFM[ RIFYFYLXF RMPUPXQYRZTZWYYXZU[I[ RUPWQXRYTYWXYWZU[",2803:" 45G]LFL[ RMFM[ RIFUFXGYHZJZLYNXOUP RUFWGXHYJYLXNWOUP RMPUPXQYRZTZWYYXZU[I[ RUPWQXRYTYWXYWZU[",2804:" 14I[NFN[ ROFO[ RKFZFZLYF RK[R[",2805:" 31F^NFNLMTLXKZJ[ RXFX[ RYFY[ RKF\\F RG[\\[ RG[Gb RH[Gb R[[\\b R\\[\\b",2806:" 22G\\LFL[ RMFM[ RSLST RIFYFYLXF RMPSP RI[Y[YUX[",2807:" 71CbRFR[ RSFS[ ROFVF RGGHHGIFHFGGFHFIGJIKMLONPWPYOZM[I\\G]F^F_G_H^I]H^G RNPLQKSJXIZH[ RNPMQLSKXJZI[G[FZEX RWPYQZS[X\\Z][ RWPXQYSZX[Z\\[^[_Z`X RO[V[",2808:" 45H\\LIKFKLLINGPFTFWGXIXLWNTOQO RTFVGWIWLVNTO RTOVPXRYTYWXYWZT[O[MZLYKWKVLUMVLW RWQXTXWWYVZT[",2809:" 27F^KFK[ RLFL[ RXFX[ RYFY[ RHFOF RUF\\F RXHLY RH[O[ RU[\\[",2810:" 37F^KFK[ RLFL[ RXFX[ RYFY[ RHFOF RUF\\F RXHLY RH[O[ RU[\\[ RN@N?M?M@NBPCTCVBW@",2811:" 43F^KFK[ RLFL[ RHFOF RLPSPUOVMWIXGYFZF[G[HZIYHZG RSPUQVSWXXZY[ RSPTQUSVXWZX[Z[[Z\\X RH[O[",2812:" 25E^MFMLLTKXJZI[H[GZGYHXIYHZ RXFX[ RYFY[ RJF\\F RU[\\[",2813:" 30F_KFK[ RLFRX RKFR[ RYFR[ RYFY[ RZFZ[ RHFLF RYF]F RH[N[ RV[][",2814:" 27F^KFK[ RLFL[ RXFX[ RYFY[ RHFOF RUF\\F RLPXP RH[O[ RU[\\[",2815:" 44G]QFNGLIKKJOJRKVLXNZQ[S[VZXXYVZRZOYKXIVGSFQF RQFOGMILKKOKRLVMXOZQ[ RS[UZWXXVYRYOXKWIUGSF",2816:" 21F^KFK[ RLFL[ RXFX[ RYFY[ RHF\\F RH[O[ RU[\\[",2817:" 29G]LFL[ RMFM[ RIFUFXGYHZJZMYOXPUQMQ RUFWGXHYJYMXOWPUQ RI[P[",2818:" 32G\\XIYLYFXIVGSFQFNGLIKKJNJSKVLXNZQ[S[VZXXYV RQFOGMILKKNKSLVMXOZQ[",2819:" 16I\\RFR[ RSFS[ RLFKLKFZFZLYF RO[V[",2820:" 24H]KFRV RLFSV RZFSVQYPZN[M[LZLYMXNYMZ RIFOF RVF\\F",2821:" 48F_RFR[ RSFS[ ROFVF RPILJJLIOIRJULWPXUXYW[U\\R\\O[LYJUIPI RPIMJKLJOJRKUMWPX RUXXWZU[R[OZLXJUI RO[V[",2822:" 21H\\KFX[ RLFY[ RYFK[ RIFOF RUF[F RI[O[ RU[[[",2823:" 27F^KFK[ RLFL[ RXFX[ RYFY[ RHFOF RUF\\F RH[\\[ R[[\\b R\\[\\b",2824:" 28F]KFKQLSOTRTUSWQ RLFLQMSOT RWFW[ RXFX[ RHFOF RTF[F RT[[[",2825:" 30BcGFG[ RHFH[ RRFR[ RSFS[ R]F][ R^F^[ RDFKF ROFVF RZFaF RD[a[",2826:" 36BcGFG[ RHFH[ RRFR[ RSFS[ R]F][ R^F^[ RDFKF ROFVF RZFaF RD[a[ R`[ab Ra[ab",2827:" 31F`PFP[ RQFQ[ RIFHLHFTF RQPXP[Q\\R]T]W\\Y[ZX[M[ RXPZQ[R\\T\\W[YZZX[",2828:" 41CaHFH[ RIFI[ REFLF RIPPPSQTRUTUWTYSZP[E[ RPPRQSRTTTWSYRZP[ R[F[[ R\\F\\[ RXF_F RX[_[",2829:" 29H]MFM[ RNFN[ RJFQF RNPUPXQYRZTZWYYXZU[J[ RUPWQXRYTYWXYWZU[",2830:" 39H]LIKFKLLINGQFSFVGXIYKZNZSYVXXVZS[P[MZLYKWKVLUMVLW RSFUGWIXKYNYSXVWXUZS[ RPPYP",2831:" 59CbHFH[ RIFI[ REFLF RE[L[ RVFSGQIPKOOORPVQXSZV[X[[Z]X^V_R_O^K]I[GXFVF RVFTGRIQKPOPRQVRXTZV[ RX[ZZ\\X]V^R^O]K\\IZGXF RIPOP",2832:" 45G]WFW[ RXFX[ R[FOFLGKHJJJLKNLOOPWP ROFMGLHKJKLLNMOOP RRPPQORLYKZJZIY RPQOSMZL[J[IYIX RT[[[",2901:" 39I]NONPMPMONNPMTMVNWOXQXXYZZ[ RWOWXXZZ[[[ RWQVRPSMTLVLXMZP[S[UZWX RPSNTMVMXNZP[",2902:" 48H\\XFWGQINKLNKQKULXNZQ[S[VZXXYUYSXPVNSMQMNNLPKS RXFWHUIQJNLLN RQMONMPLSLUMXOZQ[ RS[UZWXXUXSWPUNSM",2903:" 37H\\MMM[ RNMN[ RJMUMXNYPYQXSUT RUMWNXPXQWSUT RNTUTXUYWYXXZU[J[ RUTWUXWXXWZU[",2904:" 14HZMMM[ RNMN[ RJMXMXRWM RJ[Q[",2905:" 22F]NMNQMWLZK[ RWMW[ RXMX[ RKM[M RI[H`H[[[[`Z[",2906:" 31H[LSXSXQWOVNTMQMNNLPKSKULXNZQ[S[VZXX RWSWPVN RQMONMPLSLUMXOZQ[",2907:" 59E`RMR[ RSMS[ ROMVM RJNIOHNIMJMKNMRNSPTUTWSXRZN[M\\M]N\\O[N RPTNUMVKZJ[ RPTNVLZK[I[HZGX RUTWUXVZZ[[ RUTWVYZZ[\\[]Z^X RO[V[",2908:" 42I[MOLMLQMONNPMTMWNXPXQWSTT RTMVNWPWQVSTT RQTTTWUXWXXWZT[P[MZLXLWMVNWMX RTTVUWWWXVZT[",2909:" 27G]LML[ RMMM[ RWMW[ RXMX[ RIMPM RTM[M RI[P[ RT[[[ RWNMZ",2910:" 37G]LML[ RMMM[ RWMW[ RXMX[ RIMPM RTM[M RI[P[ RT[[[ RWNMZ ROGOFNFNGOIQJSJUIVG",2911:" 38H\\MMM[ RNMN[ RJMQM RNTPTSSTRVNWMXMYNXOWN RPTSUTVVZW[ RPTRUSVUZV[X[YZZX RJ[Q[",2912:" 22G]NMNQMWLZK[J[IZJYKZ RWMW[ RXMX[ RKM[M RT[[[",2913:" 30G^LML[ RLMR[ RMMRY RXMR[ RXMX[ RYMY[ RIMMM RXM\\M RI[O[ RU[\\[",2914:" 27G]LML[ RMMM[ RWMW[ RXMX[ RIMPM RTM[M RMTWT RI[P[ RT[[[",2915:" 36H\\QMNNLPKSKULXNZQ[S[VZXXYUYSXPVNSMQM RQMONMPLSLUMXOZQ[ RS[UZWXXUXSWPUNSM",2916:" 21G]LML[ RMMM[ RWMW[ RXMX[ RIM[M RI[P[ RT[[[",2917:" 36G\\LMLb RMMMb RMPONQMSMVNXPYSYUXXVZS[Q[OZMX RSMUNWPXSXUWXUZS[ RIMMM RIbPb",2918:" 28H[WPVQWRXQXPVNTMQMNNLPKSKULXNZQ[S[VZXX RQMONMPLSLUMXOZQ[",2919:" 16I\\RMR[ RSMS[ RMMLRLMYMYRXM RO[V[",2920:" 22I[LMR[ RMMRY RXMR[P_NaLbKbJaK`La RJMPM RTMZM",2921:" 52H]RFRb RSFSb ROFSF RRPQNPMNMLNKQKWLZN[P[QZRX RNMMNLQLWMZN[ RWMXNYQYWXZW[ RSPTNUMWMYNZQZWYZW[U[TZSX RObVb",2922:" 21H\\LMW[ RMMX[ RXML[ RJMPM RTMZM RJ[P[ RT[Z[",2923:" 23G]LML[ RMMM[ RWMW[ RXMX[ RIMPM RTM[M RI[[[[`Z[",2924:" 28G]LMLTMVPWRWUVWT RMMMTNVPW RWMW[ RXMX[ RIMPM RTM[M RT[[[",2925:" 30CbHMH[ RIMI[ RRMR[ RSMS[ R\\M\\[ R]M][ REMLM ROMVM RYM`M RE[`[",2926:" 32CbHMH[ RIMI[ RRMR[ RSMS[ R\\M\\[ R]M][ REMLM ROMVM RYM`M RE[`[``_[",2927:" 27H]QMQ[ RRMR[ RLMKRKMUM RRTVTYUZWZXYZV[N[ RVTXUYWYXXZV[",2928:" 37E_JMJ[ RKMK[ RGMNM RKTOTRUSWSXRZO[G[ ROTQURWRXQZO[ RYMY[ RZMZ[ RVM]M RV[][",2929:" 25J[OMO[ RPMP[ RLMSM RPTTTWUXWXXWZT[L[ RTTVUWWWXVZT[",2930:" 34I\\MOLMLQMONNPMSMVNXPYSYUXXVZS[P[NZLXLWMVNWMX RSMUNWPXSXUWXUZS[ RRTXT",2931:" 51DaIMI[ RJMJ[ RFMMM RF[M[ RVMSNQPPSPUQXSZV[X[[Z]X^U^S]P[NXMVM RVMTNRPQSQURXTZV[ RX[ZZ\\X]U]S\\PZNXM RJTPT",2932:" 40G\\VMV[ RWMW[ RZMOMLNKPKQLSOTVT ROMMNLPLQMSOT RTTQUPVNZM[ RTTRUQVOZN[L[KZJX RS[Z[",3001:" 36H\\RFKZ RQIW[ RRIX[ RRFY[ RMUVU RI[O[ RT[[[ RKZJ[ RKZM[ RWZU[ RWYV[ RXYZ[",3002:" 78G]LFL[ RMGMZ RNFN[ RIFUFXGYHZJZLYNXOUP RXHYJYLXN RUFWGXIXMWOUP RNPUPXQYRZTZWYYXZU[I[ RXRYTYWXY RUPWQXSXXWZU[ RJFLG RKFLH ROFNH RPFNG RLZJ[ RLYK[ RNYO[ RNZP[",3003:" 37G\\XIYFYLXIVGTFQFNGLIKKJNJSKVLXNZQ[T[VZXXYV RMILKKNKSLVMX RQFOGMJLNLSMWOZQ[",3004:" 62G]LFL[ RMGMZ RNFN[ RIFSFVGXIYKZNZSYVXXVZS[I[ RWIXKYNYSXVWX RSFUGWJXNXSWWUZS[ RJFLG RKFLH ROFNH RPFNG RLZJ[ RLYK[ RNYO[ RNZP[",3005:" 83G\\LFL[ RMGMZ RNFN[ RIFYFYL RNPTP RTLTT RI[Y[YU RJFLG RKFLH ROFNH RPFNG RTFYG RVFYH RWFYI RXFYL RTLSPTT RTNRPTR RTOPPTQ RLZJ[ RLYK[ RNYO[ RNZP[ RT[YZ RV[YY RW[YX RX[YU",3006:" 70G[LFL[ RMGMZ RNFN[ RIFYFYL RNPTP RTLTT RI[Q[ RJFLG RKFLH ROFNH RPFNG RTFYG RVFYH RWFYI RXFYL RTLSPTT RTNRPTR RTOPPTQ RLZJ[ RLYK[ RNYO[ RNZP[",3007:" 60G^XIYFYLXIVGTFQFNGLIKKJNJSKVLXNZQ[T[VZXZY[YS RMILKKNKSLVMX RQFOGMJLNLSMWOZQ[ RXTXY RWSWYVZ RTS\\S RUSWT RVSWU RZSYU R[SYT",3008:" 81F^KFK[ RLGLZ RMFM[ RWFW[ RXGXZ RYFY[ RHFPF RTF\\F RMPWP RH[P[ RT[\\[ RIFKG RJFKH RNFMH ROFMG RUFWG RVFWH RZFYH R[FYG RKZI[ RKYJ[ RMYN[ RMZO[ RWZU[ RWYV[ RYYZ[ RYZ[[",3009:" 39LXQFQ[ RRGRZ RSFS[ RNFVF RN[V[ ROFQG RPFQH RTFSH RUFSG RQZO[ RQYP[ RSYT[ RSZU[",3010:" 45JYSFSWRZQ[ RTGTWSZ RUFUWTZQ[O[MZLXLVMUNUOVOWNXMX RMVMWNWNVMV RPFXF RQFSG RRFSH RVFUH RWFUG",3011:" 69F\\KFK[ RLGLZ RMFM[ RXGMR RPPW[ RQPX[ RQNY[ RHFPF RUF[F RH[P[ RT[[[ RIFKG RJFKH RNFMH ROFMG RWFXG RZFXG RKZI[ RKYJ[ RMYN[ RMZO[ RWYU[ RWYZ[",3012:" 52I[NFN[ ROGOZ RPFP[ RKFSF RK[Z[ZU RLFNG RMFNH RQFPH RRFPG RNZL[ RNYM[ RPYQ[ RPZR[ RU[ZZ RW[ZY RX[ZX RY[ZU",3013:" 63E_JFJZ RJFQ[ RKFQX RLFRX RXFQ[ RXFX[ RYGYZ RZFZ[ RGFLF RXF]F RG[M[ RU[][ RHFJG R[FZH R\\FZG RJZH[ RJZL[ RXZV[ RXYW[ RZY[[ RZZ\\[",3014:" 39F^KFKZ RKFY[ RLFXX RMFYX RYGY[ RHFMF RVF\\F RH[N[ RIFKG RWFYG R[FYG RKZI[ RKZM[",3015:" 54G]QFNGLIKKJOJRKVLXNZQ[S[VZXXYVZRZOYKXIVGSFQF RMILKKNKSLVMX RWXXVYSYNXKWI RQFOGMJLNLSMWOZQ[ RS[UZWWXSXNWJUGSF",3016:" 59G]LFL[ RMGMZ RNFN[ RIFUFXGYHZJZMYOXPUQNQ RXHYJYMXO RUFWGXIXNWPUQ RI[Q[ RJFLG RKFLH ROFNH RPFNG RLZJ[ RLYK[ RNYO[ RNZP[",3017:" 77G]QFNGLIKKJOJRKVLXNZQ[S[VZXXYVZRZOYKXIVGSFQF RMILKKNKSLVMX RWXXVYSYNXKWI RQFOGMJLNLSMWOZQ[ RS[UZWWXSXNWJUGSF RNXOVQURUTVUXV^W`Y`Z^Z\\ RV\\W^X_Y_ RUXW]X^Y^Z]",3018:" 80G]LFL[ RMGMZ RNFN[ RIFUFXGYHZJZLYNXOUPNP RXHYJYLXN RUFWGXIXMWOUP RRPTQUSWYX[Z[[Y[W RWWXYYZZZ RTQURXXYYZY[X RI[Q[ RJFLG RKFLH ROFNH RPFNG RLZJ[ RLYK[ RNYO[ RNZP[",3019:" 44H\\XIYFYLXIVGSFPFMGKIKLLNOPURWSXUXXWZ RLLMNOOUQWRXT RMGLILKMMONUPXRYTYWXYWZT[Q[NZLXKUK[LX",3020:" 57H\\JFJL RQFQ[ RRGRZ RSFS[ RZFZL RJFZF RN[V[ RKFJL RLFJI RMFJH ROFJG RUFZG RWFZH RXFZI RYFZL RQZO[ RQYP[ RSYT[ RSZU[",3021:" 45F^KFKULXNZQ[S[VZXXYUYG RLGLVMX RMFMVNYOZQ[ RHFPF RVF\\F RIFKG RJFKH RNFMH ROFMG RWFYG R[FYG",3022:" 34H\\KFR[ RLFRXR[ RMFSX RYGR[ RIFPF RUF[F RJFLH RNFMH ROFMG RWFYG RZFYG",3023:" 55F^JFN[ RKFNVN[ RLFOV RRFOVN[ RRFV[ RSFVVV[ RTFWV RZGWVV[ RGFOF RRFTF RWF]F RHFKG RIFKH RMFLH RNFLG RXFZG R\\FZG",3024:" 54H\\KFW[ RLFX[ RMFY[ RXGLZ RIFPF RUF[F RI[O[ RT[[[ RJFMH RNFMH ROFMG RVFXG RZFXG RLZJ[ RLZN[ RWZU[ RWYV[ RWYZ[",3025:" 48G]JFQQQ[ RKFRQRZ RLFSQS[ RYGSQ RHFOF RVF\\F RN[V[ RIFKG RNFLG RWFYG R[FYG RQZO[ RQYP[ RSYT[ RSZU[",3026:" 41H\\YFKFKL RWFK[ RXFL[ RYFM[ RK[Y[YU RLFKL RMFKI RNFKH RPFKG RT[YZ RV[YY RW[YX RX[YU",3051:" 38H\\UFIZ RSJT[ RTHUZ RUFUHVYV[ RLUTU RF[L[ RQ[X[ RIZG[ RIZK[ RTZR[ RTYS[ RVYW[",3052:" 78F^OFI[ RPFJ[ RQFK[ RLFWFZG[I[KZNYOVP RYGZIZKYNXO RWFXGYIYKXNVP RNPVPXQYSYUXXVZR[F[ RWQXSXUWXUZ RVPWRWUVXTZR[ RMFPG RNFOH RRFPH RSFPG RJZG[ RJYH[ RKYL[ RJZM[",3053:" 41H]ZH[H\\F[L[JZHYGWFTFQGOIMLLOKSKVLYMZP[S[UZWXXV RQHOJNLMOLSLWMY RTFRGPJOLNOMSMXNZP[",3054:" 63F]OFI[ RPFJ[ RQFK[ RLFUFXGYHZKZOYSWWUYSZO[F[ RWGXHYKYOXSVWTY RUFWHXKXOWSUWRZO[ RMFPG RNFOH RRFPH RSFPG RJZG[ RJYH[ RKYL[ RJZM[",3055:" 80F]OFI[ RPFJ[ RQFK[ RULST RLF[FZL RNPTP RF[U[WV RMFPG RNFOH RRFPH RSFPG RWFZG RXFZH RYFZI RZFZL RULSPST RTNRPSR RTOQPSQ RJZG[ RJYH[ RKYL[ RJZM[ RP[UZ RR[UY RUYWV",3056:" 70F\\OFI[ RPFJ[ RQFK[ RULST RLF[FZL RNPTP RF[N[ RMFPG RNFOH RRFPH RSFPG RWFZG RXFZH RYFZI RZFZL RULSPST RTNRPSR RTOQPSQ RJZG[ RJYH[ RKYL[ RJZM[",3057:" 65H^ZH[H\\F[L[JZHYGWFTFQGOIMLLOKSKVLYMZP[R[UZWXYT RQHOJNLMOLSLWMY RVXWWXT RTFRGPJOLNOMSMXNZP[ RR[TZVWWT RTT\\T RUTWU RVTWW RZTXV R[TXU",3058:" 81E_NFH[ ROFI[ RPFJ[ RZFT[ R[FU[ R\\FV[ RKFSF RWF_F RLPXP RE[M[ RQ[Y[ RLFOG RMFNH RQFOH RRFOG RXF[G RYFZH R]F[H R^F[G RIZF[ RIYG[ RJYK[ RIZL[ RUZR[ RUYS[ RVYW[ RUZX[",3059:" 39KYTFN[ RUFO[ RVFP[ RQFYF RK[S[ RRFUG RSFTH RWFUH RXFUG ROZL[ ROYM[ RPYQ[ ROZR[",3060:" 47I\\WFRWQYO[ RXFTSSVRX RYFUSSXQZO[M[KZJXJVKULUMVMWLXKX RKVKWLWLVKV RTF\\F RUFXG RVFWH RZFXH R[FXG",3061:" 72F]OFI[ RPFJ[ RQFK[ R\\GMR RQOU[ RROV[ RSNWZ RLFTF RYF_F RF[N[ RR[Y[ RMFPG RNFOH RRFPH RSFPG RZF\\G R^F\\G RJZG[ RJYH[ RKYL[ RJZM[ RUZS[ RUYT[ RVYX[",3062:" 49H\\QFK[ RRFL[ RSFM[ RNFVF RH[W[YU ROFRG RPFQH RTFRH RUFRG RLZI[ RLYJ[ RMYN[ RLZO[ RR[WZ RT[XX RV[YU",3063:" 68D`MFGZ RMGNYN[ RNFOY ROFPX R[FPXN[ R[FU[ R\\FV[ R]FW[ RJFOF R[F`F RD[J[ RR[Z[ RKFMG RLFMH R^F\\H R_F\\G RGZE[ RGZI[ RVZS[ RVYT[ RWYX[ RVZY[",3064:" 43F_OFIZ ROFV[ RPFVX RQFWX R\\GWXV[ RLFQF RYF_F RF[L[ RMFPG RNFPH RZF\\G R^F\\G RIZG[ RIZK[",3065:" 56G]SFPGNILLKOJSJVKYLZN[Q[TZVXXUYRZNZKYHXGVFSF ROIMLLOKSKWLY RUXWUXRYNYJXH RSFQGOJNLMOLSLXMZN[ RQ[SZUWVUWRXNXIWGVF",3066:" 60F]OFI[ RPFJ[ RQFK[ RLFXF[G\\I\\K[NYPUQMQ RZG[I[KZNXP RXFYGZIZKYNWPUQ RF[N[ RMFPG RNFOH RRFPH RSFPG RJZG[ RJYH[ RKYL[ RJZM[",3067:" 78G]SFPGNILLKOJSJVKYLZN[Q[TZVXXUYRZNZKYHXGVFSF ROIMLLOKSKWLY RUXWUXRYNYJXH RSFQGOJNLMOLSLXMZN[ RQ[SZUWVUWRXNXIWGVF RLXMVOUPURVSXT]U^V^W] RT^U_V_ RSXS_T`V`W]W\\",3068:" 78F^OFI[ RPFJ[ RQFK[ RLFWFZG[I[KZNYOVPNP RYGZIZKYNXO RWFXGYIYKXNVP RRPTQURWXXYYYZX RWYXZYZ RURVZW[Y[ZXZW RF[N[ RMFPG RNFOH RRFPH RSFPG RJZG[ RJYH[ RKYL[ RJZM[",3069:" 44G^ZH[H\\F[L[JZHYGVFRFOGMIMLNNPPVSWUWXVZ RNLONVRWT ROGNINKOMUPWRXTXWWYVZS[O[LZKYJWJUI[JYKY",3070:" 54G]TFN[ RUFO[ RVFP[ RMFKL R]F\\L RMF]F RK[S[ RNFKL RPFLI RRFMG RYF\\G RZF\\H R[F\\I R\\F\\L ROZL[ ROYM[ RPYQ[ ROZR[",3071:" 48F_NFKQJUJXKZN[R[UZWXXU\\G ROFLQKUKYLZ RPFMQLULYN[ RKFSF RYF_F RLFOG RMFNH RQFOH RRFOG RZF\\G R^F\\G",3072:" 35H\\NFNHOYO[ ROGPX RPFQW R[GO[ RLFSF RXF^F RMFNH RQFPH RRFOG RYF[G R]F[G",3073:" 57E_MFMHKYK[ RNGLX ROFMW RUFMWK[ RUFUHSYS[ RVGTX RWFUW R]GUWS[ RJFRF RUFWF RZF`F RKFNG RLFMH RPFNI RQFNG R[F]G R_F]G",3074:" 54G]NFT[ ROFU[ RPFV[ R[GIZ RLFSF RXF^F RF[L[ RQ[X[ RMFOH RQFPH RRFPG RYF[G R]F[G RIZG[ RIZK[ RTZR[ RTYS[ RUYW[",3075:" 51G]MFQPN[ RNFRPO[ ROFSPP[ R\\GSP RKFRF RYF_F RK[S[ RLFNG RPFOH RQFNG RZF\\G R^F\\G ROZL[ ROYM[ RPYQ[ ROZR[",3076:" 35G]ZFH[ R[FI[ R\\FJ[ R\\FNFLL RH[V[XU ROFLL RPFMI RRFNG RR[VZ RT[WX RU[XU",3101:" 54I]NPNOOOOQMQMONNPMTMVNWOXQXXYZZ[ RVOWQWXXZ RTMUNVPVXWZZ[[[ RVRUSPTMULWLXMZP[S[UZVX RNUMWMXNZ RUSQTOUNWNXOZP[",3102:" 47G\\LFL[MZOZ RMGMY RIFNFNZ RNPONQMSMVNXPYSYUXXVZS[Q[OZNX RWPXRXVWX RSMUNVOWRWVVYUZS[ RJFLG RKFLH",3103:" 34H[WQWPVPVRXRXPVNTMQMNNLPKSKULXNZQ[S[VZXX RMPLRLVMX RQMONNOMRMVNYOZQ[",3104:" 52H]VFV[[[ RWGWZ RSFXFX[ RVPUNSMQMNNLPKSKULXNZQ[S[UZVX RMPLRLVMX RQMONNOMRMVNYOZQ[ RTFVG RUFVH RXYY[ RXZZ[",3105:" 41H[MSXSXQWOVNSMQMNNLPKSKULXNZQ[S[VZXX RWRWQVO RMPLRLVMX RVSVPUNSM RQMONNOMRMVNYOZQ[",3106:" 40KYWHWGVGVIXIXGWFTFRGQHPKP[ RRHQKQZ RTFSGRIR[ RMMVM RM[U[ RPZN[ RPYO[ RRYS[ RRZT[",3107:" 89I\\XNYOZNYMXMVNUO RQMONNOMQMSNUOVQWSWUVVUWSWQVOUNSMQM ROONQNSOU RUUVSVQUO RQMPNOPOTPVQW RSWTVUTUPTNSM RNUMVLXLYM[N\\Q]U]X^Y_ RN[Q\\U\\X] RLYMZP[U[X\\Y^Y_XaUbObLaK_K^L\\O[ RObMaL_L^M\\O[",3108:" 65G^LFL[ RMGMZ RIFNFN[ RNQOOPNRMUMWNXOYRY[ RWOXRXZ RUMVNWQW[ RI[Q[ RT[\\[ RJFLG RKFLH RLZJ[ RLYK[ RNYO[ RNZP[ RWZU[ RWYV[ RYYZ[ RYZ[[",3109:" 43LXQFQHSHSFQF RRFRH RQGSG RQMQ[ RRNRZ RNMSMS[ RN[V[ ROMQN RPMQO RQZO[ RQYP[ RSYT[ RSZU[",3110:" 41KXRFRHTHTFRF RSFSH RRGTG RRMR^QaPb RSNS]R` ROMTMT]S`RaPbMbLaL_N_NaMaM` RPMRN RQMRO",3111:" 61G]LFL[ RMGMZ RIFNFN[ RWNNW RRSY[ RRTX[ RQTW[ RTM[M RI[Q[ RT[[[ RJFLG RKFLH RUMWN RZMWN RLZJ[ RLYK[ RNYO[ RNZP[ RWYU[ RVYZ[",3112:" 31LXQFQ[ RRGRZ RNFSFS[ RN[V[ ROFQG RPFQH RQZO[ RQYP[ RSYT[ RSZU[",3113:" 99AcFMF[ RGNGZ RCMHMH[ RHQIOJNLMOMQNROSRS[ RQORRRZ ROMPNQQQ[ RSQTOUNWMZM\\N]O^R^[ R\\O]R]Z RZM[N\\Q\\[ RC[K[ RN[V[ RY[a[ RDMFN REMFO RFZD[ RFYE[ RHYI[ RHZJ[ RQZO[ RQYP[ RSYT[ RSZU[ R\\ZZ[ R\\Y[[ R^Y_[ R^Z`[",3114:" 65G^LML[ RMNMZ RIMNMN[ RNQOOPNRMUMWNXOYRY[ RWOXRXZ RUMVNWQW[ RI[Q[ RT[\\[ RJMLN RKMLO RLZJ[ RLYK[ RNYO[ RNZP[ RWZU[ RWYV[ RYYZ[ RYZ[[",3115:" 46H\\QMNNLPKSKULXNZQ[S[VZXXYUYSXPVNSMQM RMPLRLVMX RWXXVXRWP RQMONNOMRMVNYOZQ[ RS[UZVYWVWRVOUNSM",3116:" 60G\\LMLb RMNMa RIMNMNb RNPONQMSMVNXPYSYUXXVZS[Q[OZNX RWPXRXVWX RSMUNVOWRWVVYUZS[ RIbQb RJMLN RKMLO RLaJb RL`Kb RN`Ob RNaPb",3117:" 55H\\VNVb RWOWa RUNWNXMXb RVPUNSMQMNNLPKSKULXNZQ[S[UZVX RMPLRLVMX RQMONNOMRMVNYOZQ[ RSb[b RVaTb RV`Ub RX`Yb RXaZb",3118:" 43IZNMN[ RONOZ RKMPMP[ RWOWNVNVPXPXNWMUMSNQPPS RK[S[ RLMNN RMMNO RNZL[ RNYM[ RPYQ[ RPZR[",3119:" 43J[WOXMXQWOVNTMPMNNMOMQNSPTUUWVXY RNNMQ RNRPSUTWU RXVWZ RMONQPRUSWTXVXYWZU[Q[OZNYMWM[NY",3120:" 22KZPHPVQYRZT[V[XZYX RQHQWRY RPHRFRWSZT[ RMMVM",3121:" 43G^LMLVMYNZP[S[UZVYWW RMNMWNY RIMNMNWOZP[ RWMW[\\[ RXNXZ RTMYMY[ RJMLN RKMLO RYYZ[ RYZ[[",3122:" 31I[LMR[ RMMRY RNMSY RXNSYR[ RJMQM RTMZM RKMNO RPMNN RVMXN RYMXN",3123:" 45F^JMN[ RKMNX RLMOX RRMOXN[ RRMV[ RSMVX RRMTMWX RZNWXV[ RGMOM RWM]M RHMKN RNMLN RXMZN R\\MZN",3124:" 48H\\LMV[ RMMW[ RNMX[ RWNMZ RJMQM RTMZM RJ[P[ RS[Z[ RKMMN RPMNN RUMWN RYMWN RMZK[ RMZO[ RVZT[ RWZY[",3125:" 40H[LMR[ RMMRY RNMSY RXNSYP_NaLbJbIaI_K_KaJaJ` RJMQM RTMZM RKMNO RPMNN RVMXN RYMXN",3126:" 41I[VML[ RWMM[ RXMN[ RXMLMLQ RL[X[XW RMMLQ RNMLP ROMLO RQMLN RS[XZ RU[XY RV[XX RW[XW",3151:" 50G]WMUTUXVZW[Y[[Y\\W RXMVTVZ RWMYMWTVX RUTUQTNRMPMMNKQJTJVKYLZN[P[RZSYTWUT RNNLQKTKWLY RPMNOMQLTLWMZN[",3152:" 52I\\PFNMMSMWNYOZQ[S[VZXWYTYRXOWNUMSMQNPOOQNT RQFOMNQNWOZ RVYWWXTXQWO RMFRFPMNT RS[UYVWWTWQVNUM RNFQG ROFPH",3153:" 34I[WQWPVPVRXRXPWNUMRMONMQLTLVMYNZP[R[UZWW ROONQMTMWNY RRMPOOQNTNWOZP[",3154:" 58G]YFVQUUUXVZW[Y[[Y\\W RZFWQVUVZ RVF[FWTVX RUTUQTNRMPMMNKQJTJVKYLZN[P[RZSYTWUT RMOLQKTKWLY RPMNOMQLTLWMZN[ RWFZG RXFYH",3155:" 33I[MVQUTTWRXPWNUMRMONMQLTLVMYNZP[R[UZWX ROONQMTMWNY RRMPOOQNTNWOZP[",3156:" 45JZZHZGYGYI[I[GZFXFVGTISKRNQRO[N^M`Kb RTJSMRRP[O^ RXFVHUJTMSRQZP]O_MaKbIbHaH_J_JaIaI` RNMYM",3157:" 57H]XMT[S^QaOb RYMU[S_ RXMZMV[T_RaObLbJaI`I^K^K`J`J_ RVTVQUNSMQMNNLQKTKVLYMZO[Q[SZTYUWVT RNOMQLTLWMY RQMOONQMTMWNZO[",3158:" 41G]OFI[K[ RPFJ[ RLFQFK[ RMTOPQNSMUMWNXPXSVX RWNWRVVVZ RWPUUUXVZW[Y[[Y\\W RMFPG RNFOH",3159:" 35KXSFSHUHUFSF RTFTH RSGUG RLQMOOMQMRNSPSSQX RRNRRQVQZ RRPPUPXQZR[T[VYWW",3160:" 45KXUFUHWHWFUF RVFVH RUGWG RMQNOPMRMSNTPTSRZQ]P_NaLbJbIaI_K_KaJaJ` RSNSSQZP]O_ RSPRTP[O^N`Lb",3161:" 49G]OFI[K[ RPFJ[ RLFQFK[ RYOYNXNXPZPZNYMWMUNQROS RMSOSQTRUTYUZWZ RQUSYTZ ROSPTRZS[U[WZYW RMFPG RNFOH",3162:" 26LXTFQQPUPXQZR[T[VYWW RUFRQQUQZ RQFVFRTQX RRFUG RSFTH",3163:" 61@cAQBODMFMGNHPHSF[ RGNGSE[ RGPFTD[F[ RHSJPLNNMPMRNSPSSQ[ RRNRSP[ RRPQTO[Q[ RSSUPWNYM[M]N^P^S\\X R]N]R\\V\\Z R]P[U[X\\Z][_[aYbW",3164:" 42F^GQHOJMLMMNNPNSL[ RMNMSK[ RMPLTJ[L[ RNSPPRNTMVMXNYPYSWX RXNXRWVWZ RXPVUVXWZX[Z[\\Y]W",3165:" 46H\\QMNNLQKTKVLYMZP[S[VZXWYTYRXOWNTMQM RNOMQLTLWMY RVYWWXTXQWO RQMOONQMTMWNZP[ RS[UYVWWTWQVNTM",3166:" 66G]HQIOKMMMNNOPOSNWKb RNNNSMWJb RNPMTIb ROTPQQORNTMVMXNYOZRZTYWWZT[R[PZOWOT RXOYQYTXWWY RVMWNXQXTWWVYT[ RFbNb RJaGb RJ`Hb RK`Lb RJaMb",3167:" 57G\\WMQb RXMRb RWMYMSb RUTUQTNRMPMMNKQJTJVKYLZN[P[RZSYTWUT RMOLQKTKWLY RPMNOMQLTLWMZN[ RNbVb RRaOb RR`Pb RS`Tb RRaUb",3168:" 30I[JQKOMMOMPNQPQTO[ RPNPTN[ RPPOTM[O[ RYOYNXNXPZPZNYMWMUNSPQT",3169:" 47J[XPXOWOWQYQYOXNUMRMONNONQOSQTTUVVWX RONNQ RORQSTTVU RWVVZ RNOOQQRTSVTWVWXVZS[P[MZLYLWNWNYMYMX",3170:" 23KYTFQQPUPXQZR[T[VYWW RUFRQQUQZ RTFVFRTQX RNMXM",3171:" 42F^GQHOJMLMMNNPNSLX RMNMRLVLZ RMPKUKXLZN[P[RZTXVU RXMVUVXWZX[Z[\\Y]W RYMWUWZ RXMZMXTWX",3172:" 29H\\IQJOLMNMONPPPSNX RONORNVNZ ROPMUMXNZP[R[TZVXXUYQYMXMXNYP",3173:" 48CaDQEOGMIMJNKPKSIX RJNJRIVIZ RJPHUHXIZK[M[OZQXRU RTMRURXSZU[W[YZ[X]U^Q^M]M]N^P RUMSUSZ RTMVMTTSX",3174:" 51G]JQLNNMPMRNSPSR RPMQNQRPVOXMZK[I[HZHXJXJZIZIY RRORRQVQY RZOZNYNYP[P[NZMXMVNTPSRRVRZS[ RPVPXQZS[U[WZYW",3175:" 49G]HQIOKMMMNNOPOSMX RNNNRMVMZ RNPLULXMZO[Q[SZUXWT RYMU[T^RaPb RZMV[T_ RYM[MW[U_SaPbMbKaJ`J^L^L`K`K_",3176:" 39H\\YMXOVQNWLYK[ RXOOOMPLR RVORNONNO RVORMOMMOLR RLYUYWXXV RNYRZUZVY RNYR[U[WYXV",3200:" 50H\\QFNGLJKOKRLWNZQ[S[VZXWYRYOXJVGSFQF RNHMJLNLSMWNY RVYWWXSXNWJVH RQFOGNIMNMSNXOZQ[ RS[UZVXWSWNVIUGSF",3201:" 28H\\QHQ[ RRHRZ RSFS[ RSFPINJ RM[W[ RQZO[ RQYP[ RSYT[ RSZU[",3202:" 62H\\LJLKMKMJLJ RLIMINJNKMLLLKKKJLHMGPFTFWGXHYJYLXNUPPRNSLUKXK[ RWHXJXLWN RTFVGWJWLVNTPPR RKYLXNXSYWYYX RNXSZWZXY RNXS[W[XZYXYV",3203:" 76H\\LJLKMKMJLJ RLIMINJNKMLLLKKKJLHMGPFTFWGXIXLWNTO RVGWIWLVN RSFUGVIVLUNSO RQOTOVPXRYTYWXYWZT[P[MZLYKWKVLUMUNVNWMXLX RWRXTXWWY RSOUPVQWTWWVZT[ RLVLWMWMVLV",3204:" 28H\\SIS[ RTHTZ RUFU[ RUFJUZU RP[X[ RSZQ[ RSYR[ RUYV[ RUZW[",3205:" 55H\\MFKPMNPMSMVNXPYSYUXXVZS[P[MZLYKWKVLUMUNVNWMXLX RWPXRXVWX RSMUNVOWRWVVYUZS[ RLVLWMWMVLV RMFWF RMGUG RMHQHUGWF",3206:" 69H\\VIVJWJWIVI RWHVHUIUJVKWKXJXIWGUFRFOGMILKKOKULXNZQ[S[VZXXYUYTXQVOSNQNOONPMR RNIMKLOLUMXNY RWXXVXSWQ RRFPGOHNJMNMUNXOZQ[ RS[UZVYWVWSVPUOSN",3207:" 43H\\KFKL RYFYIXLTQSSRWR[ RSRRTQWQ[ RXLSQQTPWP[R[ RKJLHNFPFUIWIXHYF RMHNGPGRH RKJLINHPHUI",3208:" 79H\\PFMGLILLMNPOTOWNXLXIWGTFPF RNGMIMLNN RVNWLWIVG RPFOGNINLONPO RTOUNVLVIUGTF RPOMPLQKSKWLYMZP[T[WZXYYWYSXQWPTO RMQLSLWMY RWYXWXSWQ RPONPMSMWNZP[ RT[VZWWWSVPTO",3209:" 69H\\MWMXNXNWMW RWOVQURSSQSNRLPKMKLLINGQFSFVGXIYLYRXVWXUZR[O[MZLXLWMVNVOWOXNYMY RMPLNLKMI RVHWIXLXRWVVX RQSORNQMNMKNHOGQF RSFUGVIWLWSVWUYTZR[",3210:" 16MXRXQYQZR[S[TZTYSXRX RRYRZSZSYRY",3211:" 24MXTZS[R[QZQYRXSXTYT\\S^Q_ RRYRZSZSYRY RS[T\\ RTZS^",3212:" 32MXRMQNQORPSPTOTNSMRM RRNROSOSNRN RRXQYQZR[S[TZTYSXRX RRYRZSZSYRY",3213:" 40MXRMQNQORPSPTOTNSMRM RRNROSOSNRN RTZS[R[QZQYRXSXTYT\\S^Q_ RRYRZSZSYRY RS[T\\ RTZS^",3214:" 34MXRFQGQIRQ RRFRTST RRFSFST RSFTGTISQ RRXQYQZR[S[TZTYSXRX RRYRZSZSYRY",3215:" 52I\\MKMJNJNLLLLJMHNGPFTFWGXHYJYLXNWOSQ RWHXIXMWN RTFVGWIWMVOUP RRQRTSTSQRQ RRXQYQZR[S[TZTYSXRX RRYRZSZSYRY",3216:" 24MXTFRGQIQLRMSMTLTKSJRJQK RRKRLSLSKRK RRGQK RQIRJ",3217:" 24MXTHSIRIQHQGRFSFTGTJSLQM RRGRHSHSGRG RSITJ RTHSL",3218:" 74E_[O[NZNZP\\P\\N[MZMYNXPVUTXRZP[L[JZIXIUJSPORMSKSIRGPFNGMIMLNOPRTWWZY[[[\\Y\\X RKZJXJUKSLR RRMSI RSKRG RNGMK RNNPQTVWYYZ RN[LZKXKULSPO RMINMQQUVXYZZ[Z\\Y",3219:" 56H\\PBP_ RTBT_ RXKXJWJWLYLYJXHWGTFPFMGKIKLLNOPURWSXUXXWZ RLLMNOOUQWRXT RMGLILKMMONUPXRYTYWXYWZT[P[MZLYKWKUMUMWLWLV",3220:" 8G^[BIbJb R[B\\BJb",3221:" 27KYUBSDQGOKNPNTOYQ]S`Ub RQHPKOOOUPYQ\\ RSDRFQIPOPUQ[R^S`",3222:" 27KYOBQDSGUKVPVTUYS]Q`Ob RSHTKUOUUTYS\\ RQDRFSITOTUS[R^Q`",3223:" 39JZRFQGSQRR RRFRR RRFSGQQRR RMINIVOWO RMIWO RMIMJWNWO RWIVINOMO RWIMO RWIWJMNMO",3224:" 8F_JQ[Q[R RJQJR[R",3225:" 16F_RIRZSZ RRISISZ RJQ[Q[R RJQJR[R",3226:" 16F_JM[M[N RJMJN[N RJU[U[V RJUJV[V",3227:" 11NWSFRGRM RSGRM RSFTGRM",3228:" 22I[NFMGMM RNGMM RNFOGMM RWFVGVM RWGVM RWFXGVM",3229:" 30KYQFOGNINKOMQNSNUMVKVIUGSFQF RQFNIOMSNVKUGQF RSFOGNKQNUMVISF",3250:" 58H]TFQGOIMLLOKSKVLYMZO[Q[TZVXXUYRZNZKYHXGVFTF RQHOJNLMOLSLWMY RTYVWWUXRYNYJXH RTFRGPJOLNOMSMXNZO[ RQ[SZUWVUWRXNXIWGVF",3251:" 20H]TJO[Q[ RWFUJP[ RWFQ[ RWFTIQKOL RTJRKOL",3252:" 52H]OKOJPJPLNLNJOHPGSFVFYGZIZKYMWOMUKWI[ RXGYIYKXMVOSQ RVFWGXIXKWMUOMU RJYKXMXRYWYXX RMXRZWZ RMXR[U[WZXXXW",3253:" 64H]OKOJPJPLNLNJOHPGSFVFYGZIZKYMXNVOSP RXGYIYKXMWN RVFWGXIXKWMUOSP RQPSPVQWRXTXWWYUZR[O[LZKYJWJULULWKWKV RVRWTWWVY RSPUQVSVWUYTZR[",3254:" 15H]WJR[T[ RZFXJS[ RZFT[ RZFJUZU",3255:" 49H]QFLP RQF[F RQGYG RPHUHYG[F RLPMOPNSNVOWPXRXUWXUZQ[N[LZKYJWJULULWKWKV RVPWRWUVXTZ RSNUOVQVUUXSZQ[",3256:" 61H]YJYIXIXKZKZIYGWFTFQGOIMLLOKSKVLYMZO[R[UZWXXVXSWQVPTOQOOPNQMS RPINLMOLSLWMY RVXWVWSVQ RTFRGPJOLNOMSMXNZO[ RR[TZUYVVVRUPTO",3257:" 39H]NFLL R[FZIXLTQRTQWP[ RRSPWO[ RXLRRPUOWN[P[ RMIPFRFWI ROGRGWI RMIOHRHWIYIZH[F",3258:"104H]SFPGOHNJNMOOQPTPWOYNZLZIYGWFSF RUFPG RPHOJONPO ROORP RSPWO RXNYLYIXG RYGUF RSFQHPJPNQP RTPVOWNXLXHWF RQPMQKSJUJXKZN[R[VZWYXWXTWRVQTP RRPMQ RNQLSKUKXLZ RKZP[VZ RVYWWWTVR RVQSP RQPOQMSLULXMZN[ RR[TZUYVWVSUQTP",3259:" 61H]XNWPVQTRQROQNPMNMKNIPGSFVFXGYHZKZNYRXUVXTZQ[N[LZKXKVMVMXLXLW ROPNNNKOI RXHYJYNXRWUUX RQRPQOOOKPHQGSF RVFWGXIXNWRVUUWSZQ[",3260:" 16MXPXOYOZP[Q[RZRYQXPX RPYPZQZQYPY",3261:" 22MXQ[P[OZOYPXQXRYR[Q]P^N_ RPYPZQZQYPY RQ[Q\\P^",3262:" 32MXSMRNROSPTPUOUNTMSM RSNSOTOTNSN RPXOYOZP[Q[RZRYQXPX RPYPZQZQYPY",3263:" 38MXSMRNROSPTPUOUNTMSM RSNSOTOTNSN RQ[P[OZOYPXQXRYR[Q]P^N_ RPYPZQZQYPY RQ[Q\\P^",3264:" 34MXVFUFTGRT RVGUGRT RVGVHRT RVFWGWHRT RPXOYOZP[Q[RZRYQXPX RPYPZQZQYPY",3265:" 59H]OKOJPJPLNLNJOHPGSFWFZG[I[KZMYNWOSPQQQSSTTT RUFZG RYGZIZKYMXNVO RWFXGYIYKXMWNSPRQRSST RPXOYOZP[Q[RZRYQXPX RPYPZQZQYPY",3266:" 22MXWFUGTHSJSLTMUMVLVKUJTJ RUGTITJ RTKTLULUKTK",3267:" 22MXVIUITHTGUFVFWGWIVKULSM RUGUHVHVGUG RVIVJUL",3268:" 72E_\\O\\N[N[P]P]N\\M[MYNWPRXPZN[K[HZGXGVHTISKRPPROTMUKUITGRFPGOIOLPRQURWTZV[X[YYYX RL[HZ RIZHXHVITJSLR RPPQSTYVZ RK[JZIXIVJTKSMRRO ROLPOQRSVUYWZXZYY",3269:" 52H]TBL_ RYBQ_ RZKZJYJYL[L[JZHYGVFRFOGMIMLNNPPVSWUWXVZ RNLONVRWT ROGNINKOMUPWRXTXWWYVZS[O[LZKYJWJULULWKWKV",3270:" 8G^_BEbFb R_B`BFb",3271:" 32JZZBXCUERHPKNOMSMXN\\O_Qb RSHQKOONTN\\ RZBWDTGRJQLPOOSN\\ RNTO]P`Qb",3272:" 32JZSBUEVHWLWQVUTYR\\O_LaJb RVHVPUUSYQ\\ RSBTDUGVP RVHUQTUSXRZP]M`Jb",3273:" 39J[TFSGUQTR RTFTR RTFUGSQTR ROIPIXOYO ROIYO ROIOJYNYO RYIXIPOOO RYIOO RYIYJONOO",3274:" 8F_JQ[Q[R RJQJR[R",3275:" 16F_RIRZSZ RRISISZ RJQ[Q[R RJQJR[R",3276:" 16F_JM[M[N RJMJN[N RJU[U[V RJUJV[V",3277:" 11MWUFTGRM RUGRM RUFVGRM",3278:" 22H\\PFOGMM RPGMM RPFQGMM RZFYGWM RZGWM RZF[GWM",3279:" 30KZSFQGPIPKQMSNUNWMXKXIWGUFSF RSFPIQMUNXKWGSF RUFQGPKSNWMXIUF",3301:" 62F^IHJIIJHIIGKFMFOGPHQKQOPRNTLUIV ROHPKPPOR RMFNGOJOPNSLU RLVOY RKVOZ RIVN[UV R\\G[H\\H\\G[FYFWGVHUJUYW[[W RWHVJVXXZ RYFXGWJWWYY",3302:"101E_GQGRHSJSLRLOKMIJIHKF RKOIK RJSKRKPIMHKHIIGKFNFPGQHRJRRQUOW RPHQJQT RNFOGPJPUOW RRISGUFWFYGZH[J\\K RYHZJ RWFXGYJZK\\K R\\KRP RYM[O\\R\\U[XYZV[S[PZJWIWHX RXNYN[P RVNYO[Q\\S RTZRZLWKW RZYXZUZRYNWKVIVHXHZI[JZIY",3303:" 79F^RHPFNFLGJJINIRJVLYNZQ[T[WZYY[W RLHKJJMJRKVMYPZ RNFMGLIKMKQLUMWOYRZUZXY[W RUFRHQIPKPLQNTPURUT RQKQLUPUQ RQIQJRLUNVPVRUTSURUPTOR RUFVGXHZH RUGVHWH RTGVIXIZH[G",3304:" 79E_HLHKIIKGNFRFUGWHYJ[M\\Q\\U[XYZV[S[PZJWIWHX RKHMGRGUHWIYK[N RTZRZLWKW RHKJIMHRHUIWJYL[O\\R RZYXZUZRYNWKVIVHXHZI[JZIY RPHMKLMLONSNU RMNMONQNR RMKMMOQOSNUMVKVJUJT",3305:" 95F^RHPFNFLGJJINIRJVLYNZQ[T[WZYY[W RLHKJJMJRKVMYPZ RNFMGLIKMKQLUMWOYRZUZXY[W RUFRHQIPKPLQNTPURUT RQKQLUPUQ RQIQJRLUNVPVRUTSURUPTOR RUFVGXHZH RUGVHWH RTGVIXIZH[G RUNYK RYKZL\\L RXLYMZM RWMXNZN\\L",3306:" 94F^MNKMJKJIKGNFQFTGXI RKHMGRGUH RJKKIMHRHXIZI[H[GZFYF RSHRIQKQMROVSWVWYV\\U]S^ RTPWSXVXYW[ RQMSOVQXSYVYYX[V]S^O^L]K\\JZJWLTLRKQ RL\\K[KWLU RO^M]L[LWMTMRLQJQIRIS RUPYL RYLZM\\M RXMYNZN RWNXOZO\\M",3307:" 99E_UJTHSGQFNFKGIJHNHRIUJWLYNZQ[T[WZYY[W\\T\\Q[NYL RKHJJIMIRJUKW RZW[U[QZNYM RNFLGKIJMJRKVLXNZ RWZYXZUZQYOWM RUFRHPJOLOMPOSQTSTU RPLPMTQTR RPJPKQMTOUQUSTURVQVOUNS RTOYLZJ R\\FZJ RYG]I R\\F[GYGZHZJ[I]I\\H\\F",3308:" 92F_RFPGNIMKMMNOPQQSQU RNLNMQQQR RNINKOMQORQRSQUPVNWLWJVIUHSHQIPJQIR RRFTHVHXG RQGSH RPGQHSIUIXG RRPYK RYK[N\\Q\\T[WYYVZR[ RXLZN[Q[UZW RVMWMYOZRZVYXXYVZ RVZTZRYPYNZM\\N^P_R_T^ RSZQZ RR[PZNZ",3309:" 83F_PPNPLOKNJLJJKHLGOFQFTGWJYK RLHNGRGTHUI RJJKIMHQHTIVJYK[K\\J\\H[GYG RJXKYJZIYIWJVLVNWPYR\\T^ RNXOYQ\\R] RLVMWNYP\\Q]S^V^X]Y\\ZZZWYUWRVPVO RYXYWVRVQ RX]Y[YYXWVTURUPWNYNZOZP",3310:" 83F_PPNPLOKNJLJJKHLGOFQFTGWJYK RLHNGRGTHUI RJJKIMHQHTIVJYK[K\\J\\H[GYG RJXKYJZIYIWJVLVNWPYR\\T^ RNXOYQ\\R] RLVMWNYP\\Q]S^V^X]Y\\ZZZWYUWRVPVO RYXYWVRVQ RX]Y[YYXWVTURUPWNYNZOZP",3311:" 81E_[KZIXGUFRFOGMILKLNMQPWPYN[ RMNMOPUPV RNHMJMMNOPSQVQXPZN[L[JZ RHVJZ RGYKW RHVHXGYIYJZJXKWIWHV RNONMOKQJTJVKXMYM RUKWM RRJTKULVN RYMPQ RUOYXZY[Y RTPXXZZ RSPWYY[\\X",3312:" 73G^ZSYTVTUSUQVOXLYJYH RVQVPYLYK RWTVSVRWPYNZLZJYHXGUFPFMGLHKJKLLNNQOSOTNV RLKLLOQOR RLHLJMLOOPQPSOUMWJY RMWOWRYUZXZZY RNXOXSZTZ RJYLXMXQZT[V[YZZY[W",3313:"128BbEQERFSHSJRJOIMGJGHIF RIOGK RHSIRIPGMFKFIGGIFKFMGOIPLPROUNWLYI[HZGZ RNIOLORNUMW RJZIYHY RKFMHNKNRMVLXKYJXIXF[ RNGPFRFTGVIWLWRVUUWSYQ[PZOZ RUIVLVRUV RRZQYPY RRFTHUKUSTWSYRXQXN[ RUHVGXFZF\\G]H^J_K R\\H]J RZF[G\\J]K_K R_K\\M[NZQZT[X][`X R\\N[P[T\\W^Z R_K]M\\O\\S]W_Y",3314:" 96D`GQGRHSJSLRLOKMIJIHKF RKOIK RJSKRKPIMHKHIIGKFNFPGRISLSRRUQWOYL[KZIZG[ RQIRKRRQUPWOX RMZKYIY RNFPHQKQRPVNYLXJXG[ RRHSGUFWFYGZH[J\\K RYHZJ RWFXGYJZK\\K R\\KYMXNWQWTXXZ[]X RYNXPXTYW[Z R\\KZMYOYSZW\\Y",3315:" 72D`PFNGLIKKKMMQMS RLLLMMOMP RLILKNONQMSLTJTISIR RPFQGWIZK[M\\P\\S[VZXXZU[R[OZIWHWGX RPGQHWJYKZL RPFPHQIWKYL[N\\P RSZQZKWJW RYYWZTZQYMWJVHVGXGZH[IZHY",3316:"100E`HQHRISKSMRMOLMJJJHLF RLOJK RKSLRLPJMIKIIJGLFOFQGRHSJSU RSWS\\R^P_M_L^L\\M[N\\M] RQHRJR\\Q^ ROFPGQJQU RQWQ\\P^O_ RSJXF RXFZI[K\\O\\R[UYXV[ RWGZK[N[O RVHXJZM[P[SZVYX RWYUVSU RQUOVMX RWZUWSVPV RV[TXSW RQWOWMX",3317:" 88D`PFNGLIKKKMMQMS RLLLMMOMP RLILKNONQMSLTJTISIR RPFQGWIZK[M\\P\\S[VZX RXZU[R[OZIWHWGX RPGQHWJYKZL RPFPHQIWKYL[N\\P RSZQZKWJW RXZTZQYMWJVHVGXGZH[IZHY RTXVVXV\\Z]Z RWWXW[Z RUWVWZ[\\[^Y",3318:" 96D`GQGRHSJSLRLOKMIJIHKF RKOIK RJSKRKPIMHKHIIGKFNFPGQHRJRVQXOZM[K[IZ RPHQJQVPX RNFOGPJPVOYM[ RGVIZ RFYJW RGVGXFYHYIZIXJWHWGV RRISGUFWFYGZH[J\\K RYHZJ RWFXGYJZK\\K R\\KRP RTOXYZ[]X RUOYX[Z RVNZX[Y\\Y",3319:" 83E`\\H[G\\F]G]I\\KZKVISHOHKIIK RYJVHSGOGLH R]I\\JZJVGSFOFLGJIIKHNHRIUJWLYNZQ[U[XZZY\\W]T]Q\\OZNWNUOSRQSOS RLXNYQZUZYY RIUKWMXPYUYYX[W\\V]T RXOWOSSRS R]Q[OYOWPUSSTQTOSNQNOOMQL",3320:" 81F_LNJMIKIIJGMFRFUGYJ[J\\I RJHLGRGUHXJ RIKJILHRHUIYK[K\\I\\G[FZG[H RUIRLQNQPSTSV RRORPSRSS RRLRNTRTTSVRWPWOVOT RJYKZJ[IZIXJVLVOWSYVZYZ[Y RLWMWSZUZ RIXJWKWMXQZT[W[ZZ\\X",3321:" 45G]JHKHLILWJX RKGMHMXPZ RIILFNHNWPYRY RJXKXMYO[RYVV RTHUHVIVYX[[X RUGWHWYYZ RSIVFYHXIXXYYZY",3322:"100D`GQGRHSJSLRLOKMIJIHKF RKOIK RJSKRKPIMHKHIIGKFNFPGQHRJRRQUOW RPHQJQT RNFOGPJPUOW RRISGUFWFYG[J\\K RYHZJ RWFXGYJZK\\K RZKXKWLWNXP[R\\T RXO[Q RWMXN[P\\R\\V[XYZW[S[PZJWIWHX RTZRZLWKW RZYXZUZRYNWKVIVHXHZI[JZIY",3323:"143BcEQERFSHSJRJOIMGJGHIF RIOGK RHSIRIPGMFKFIGGIFLFNGOHPJPNOQMTKV RNHOJOONR RLFMGNJNOMSKV RNGPFSFUG RWFTGSISMTPVSWUWWVY RTMTNWSWT RWFUGTITLUNWQXTXVWXUZS[O[MZKXIWGWFX RNZKWJW RQ[OZLWJVGVFXFZG[HZGY RWFZF\\G^J_K R\\H]J RZF[G\\J]K_K R]K[KZLZN[P^R_T R[O^Q RZM[N^P_R_W^Y]Z[[X[UZ RYZXZVY R^Y\\ZZZXYWX",3324:" 86F^KHMHOIPJQMQO RQQQUPXM[KZI[ RNZLYKY ROYNYLXI[ RMGPHQIRLRUSWUYWZ RIINFPGRISLSO RSQSTTWUXWYYY RQURXTZV[[X RSLTIWFYG[F RVGXHYH RUHVHXI[F RKSMOQO RSOWOYM RMPWP RKSMQQQ RSQWQYM",3325:" 74E_HQHRISKSMRMOLMJJJHLF RLOJK RKSLRLPJMIKIIJGLFOFQGRHSJSORRQTQUSWTW RQHRJRPQSPUSX ROFPGQJQPPTOVRYUV RSJ[F RYGYZX] RZGZXY[ R[F[VZZY\\W^T_P_M^K\\JZKYLZK[",3326:" 74F^NIOGQFTFVGWHXJXMWOVPTQ RQQOPNN RVHWIWNVO RTFUGVIVNUPTQ RMUNSORQQTQWRYTZVZZY\\W^T_P_N^KZJY RXTYVYZX\\ RTQWSXUX[W]V^T_ RO^N]LZKY RR_P^O]MZLYIYHZH\\I]J]",3401:" 46J[TMQNOONPMSMVNYO[UX RNVOYPZ RQNOPNSNUOXQZ RRNSOUPUYW[ZX RSNVPVXXZ RTMUNWOXO RWPXO RWPWXXYYY",3402:" 50J[LHMINK RTFQGOINKNXMY RPIOKOXRZ RTFRGQHPKPXRYSZ RMYNYPZQ[TZ RPPVMWOXRXUWXVYTZ RUNVOWQ RTNVPWSWUVXTZ",3403:" 27KXRNTPVOTMRNOPNRNWOYQ[UY RSNUO RPPOROWPYQZ RQOPQPVQXSZ",3404:" 47J[QFNINKOLSNVPWRWUVXTZ ROJOKSMVOWP ROHOIPJUMWOXRXUWXTZQ[ RRNNPNXMY ROPOXRZ RPOPXRYSZ RMYNYPZQ[",3405:" 27KXPUVQSMOPNRNWOYQ[UY RUQRN RPPOROWPYQZ RTRROQOPQPVQXSZ",3406:" 49LYXFWGUGSFQFPHPMOONP RVHTHRGQG RXFWHVITIRHQHPI RPKQMRNTOVOVP RNPPP RRPVP RPPPTQ` RSOPOQNQ[ RRPRTQ`",3407:" 53J[TMQNOONPMSMVNYO[UX RNWOYPZ RQNOPNSNUOXQZ RRNSOUPUXV[V]U_ RSNVPVZ RTMUNWOXO RWPXO RWPW\\V^U_S`P`N_M^M]N]N^",3408:" 50J[LHMINK RTFQGOINKNXMY RPIOKOYPZ RTFRGQHPKPXQYRY RMYOZP[SX RPPVMWOXSXWWZV\\T^Q` RUNVOWR RTNVQWTWWV[T^",3409:" 39MWRFQGQHRISHSGRF RQGSH RQHSG ROOPOQPQYS[VX RPNRORXTZ RNPQMRNTO RSPTO RSPSXTYUY",3410:" 45MWRFQGQHRISHSGRF RQGSH RQHSG ROOPOQPQ[P^O_M` RPNROR[Q] RNPQMRNTO RSPTO RSPS[R]P_M` RS[T]U^",3411:" 63KYNHOIPK RUFSGQIPKPMOONP RPPPXOY RRIQKQM RQOPOQMQXSZ RUFSHRKRO RRPRXSYTY ROYQZR[UX RRLVIWJWLUNSO RUJVKVLUN RROWOWP RNPPP RRPWP",3412:" 29MWOHPIQK RWFTGRIQKQXPY RSIRKRYTZ RWFUGTHSKSXTYUY RPYRZS[VX",3413:" 74E_GOHOIPIXHYJ[ RHNJPJXIYJZKYJX RFPIMKOKXLYJ[ RNNPOQQQXPYR[ RPNQORQRXQYRZSYRX RKPNNPMRNSPSXTYR[ RVNWOYPYY[[^X RWNZPZX\\Z RSPVNXMYN[O\\O R[P\\O R[P[X\\Y]Y",3414:" 49I[KOLOMPMXLYN[ RLNNPNXMYNZOYNX RJPMMOOOXPYN[ RRNSOUPUYW[ZX RSNVPVXXZ ROPRNTMUNWOXO RWPXO RWPWXXYYY",3415:" 41J[NPNXMY ROPOXRZ RQOPPPXRYSZ RMYNYPZQ[TZ RNPQOVMWOXRXUWXVYTZ RUNVOWQ RTNVPWSWUVXTZ",3416:" 57J[OJMLMNNQNXLZ RNYO` RNMNNOQO[ RNKNLONPQPXQXSYTZ RPYO` RSZQY RTZR[PY RNYLZ RPPVMWOXRXUWXVYTZ RUNVOWQ RTNVPWSWUVXTZ",3417:" 43J[TMQNOONPMSMVNYO[UX RNWOYPZ RQNOPNSNUOXQZ RRNSOUPUXV` RSNVPV[ RTMUNWOXO RWPXO RWPWXV`",3418:" 32KYNOOOPPPXOY RONQPQYSZ RMPPMRORXSYTY ROYQZR[UX RTNUPWOVMRO RUNVO",3419:" 42LWXFWGUGSFQFPHPMOONP RVHTHRGQG RXFWHVITIRHQHPI RPKRP RPPPTQ` RQOPOQNQ[ RRPRTQ` RNPPP",3420:" 37LXSIRLQNPONP RSISOVOVP RNPQP RSPVP RQPQXPY RROQORMRXTZ RSPSXTYUY RPYRZS[VX",3421:" 47I[KOLOMPMXLY RLNNPNXPZ RJPMMOOOXQYRZ RLYMYOZP[RZUX RVMTOUPUYW[ZX RVPWOVNUOVPVXXZ RVMXOWPWXXYYY",3422:" 47J[OKMMMONRNXMY RNNNOOROXRZ RNLNMOOPRPXRYSZ RMYNYPZQ[TZ RPPVMWOXRXUWXVYTZ RUNVOWQ RTNVPWSWUVXTZ",3423:" 72F_KKIMIOJRJXIYK[ RJNJOKRKXJYKZLYKX RJLJMKOLRLXMYK[ RONQORQRXQY RQNROSQSXVZ RLPONQMSNTPTXVYWZ RQYRYTZU[XZ RTPZM[O\\R\\T[XZYXZ RYNZO[Q RXNZP[S[UZXXZ",3424:" 44KZOOPOQPQXPXNYM[M]N_P`S`V_V^U^U_ RPNRPRXUZ RNPQMSOSXUYVZ RXYT[SZQYOYM[ RUNVPXOWMSO RVNWO",3425:" 47J[OKMMMONRNXMY RNNNOOROYQZ RNLNMOOPRPXQYRY RMYOZP[SX RPPVMWOXSXWWZV\\T^Q` RUNVOWR RTNVQWTWWV[T^",3426:" 43KYNPSMUNVPVRUTQV RSNUO RRNTOUQURTTSU RSUUWVYV]U_S`Q`O_N]N[OYQXWV RRVTWUY RQVTXUZU]T_S`",3427:" 61JZRMPNMPMRNU RNPNROT RPNOOORPT RPNROTOVNWMWKVJTJ RQNSN RRMTNVN RNUVRWUWWVYR[ RUSVUVXUY RTSUUUXTZ RTZRYOYL[ RSZQZ RR[PZNZL[",3428:" 78J[VFUGSGQFOFNHNMMOLP RTHRHPGOG RVFUHTIRIPHOHNI RNKPP RNPNTO` ROONOONO[ RPPPTO` RLPNP RPPUMWNXPXRWTSV RUNWO RTNVOWQWRVTUU RUUWVXXX[W]U_R` RUVWW RSVTVVWWYW\\V^",3429:" 62J[PIOLNNMOKP RPIPXQYO[ ROONOONOXNYOZPYOX RKPNPNXMYO[ RPPUMWNXPXRWTSV RUNWO RTNVOWQWRVTUU RUUWVXXX[W]U_R` RUVWW RSVTVVWWYW\\V^",3501:" 60G]LINGPFRFSGZW[X]X RQGRHYXZZ[YYX RNGPGQHXXYZZ[[[]X RLMMLOKPKQL RPLPM RMLOLPN RG[IYKXNXPY RJYNYOZ RG[JZMZN[PY RRJLX RNSVS",3502:"110F^HHJFMFOGQF RKGNG RHHJGLHOHQF RMKLLKNKOIOHPHRIQKQKW RLMLU RIPLP RMKMTLVKW RRIQJPLPU RQKQS RRIRRQTPU RRIXFZG[I[KYMUO RXGZIZK RVGXHYIYLWN RWNZP[R[X RYPZRZW RWNXOYQYX RJ[MYPXTXWY RLZOYTYVZ RJ[NZSZU[WYYX[X RUOUX RURYR RUUYU",3503:" 69E]NGLHJJILHOHSIVJXMZP[S[VZXYZW[U RJKINISKWNYQZTZWY RNGLIKKJNJRKUNXQYTYWXYW[U RPJPV RQJQT RRIRSQUPV RPJRIUFWGYGZF RTGVHXH RSHUIWIYHZF RWIWX",3504:" 72G^IFWFYGZIZX RKGWGYIYW RIFJGLHWHXIXX ROKNLMNMOKOJPJRKQMQMV RNMNT RKPNP ROKOSNUMV RI[LYOXSXVY RKZNYSYUZ RI[MZRZT[VYXXZX RRHRX RRMTNVNXM RRSTRVRXS",3505:" 94G]IHKFMFOGQF RLGNG RIHKGMHOHQF RNKMLLNLOJOIPIRJQLQLW RMMMU RJPMP RNKNTMVLW RQMRJSHTGVFXF[G RTHVGXGZH RRJSIUHWHYI[G RQURRSPTOVOXP RTPVPWQ RRRSQUQVRXP RK[NYRXWX[Y RMZPYWYZZ RK[OZVZY[[Y RQMQX",3506:" 91F]JHLFOFQGSF RMGPG RJHLGNHQHSF RPKOLNNNOLOKPKRLQNQNV ROMOT RLPOP RPKPSOUNV RSJSYRZQZMXKXIYG[ RTJTX RTPXP RPZOZMYJY RUIUOXO RXQUQUWTYP[N[LZJZG[ RSJUIXFZG\\G]F RWGYH[H RVHXIZI\\H]F RXIXW",3507:" 87E^NGLHJJILHOHRIUJWLYNZQ[U[XZZX[V[SZQYPWOUO RJKINISJV RNGLIKKJNJSKVLXNZ RYXZWZSYQ RU[WZXYYWYSXQWPUO RPJPW RQJQU RRIRTQVPW RPJRIUFWGYGZF RTGVHXH RSHUIWIYHZF RYHUOU[ RUSYS RUVYV",3508:"112F^HHJFMFOGQF RKGNG RHHJGLHOHQF RMKLLKNKOIOHPHRIQKQKW RLMLU RIPLP RMKMTLVKW RJ[MYPXSXUY RLZOYRYTZ RJ[NZQZS[UY RRIQJPLPU RQKQS RRIRRQTPU RRITGVFXFZG RWGXGYH RTGVGXIZG RUOWNYLZM[P[TZXX[ RXMYNZPZUYX RWNXNYPYUX[ RUOUY RURYR RUUYU",3509:" 67I\\LHNFQFTGVF ROGSG RLHNGQHTHVF RSKRLQNQOOONPNROQQQQV RRMRT ROPRP RSKSSRUQV RYHWJVMVXUZSZOXMXKYI[ RWKWW RRZQZOYLY RYHXJXVWXUZS[P[NZKZI[",3510:" 65H\\LHNFQFTGVF ROGSG RLHNGQHTHVF RSKRLQNQOOONPNROQQQQV RRMRT ROPRP RSKSSRUQV RYHWJVMVXUZ RWKWW RYHXJXVWXUZR[O[LZJXJVKULUMVLWKW RJVMV",3511:"115F^HHJFMFOGQF RKGNG RHHJGLHOHQF RMKLLKNKOIOHPHRIQKQKW RLMLU RIPLP RMKMTLVKW RJ[MYPXSXUY RLZNYRYTZ RJ[NZQZS[UY RRIQJPLPU RQKQS RRIRRQTPU RRITGVFXFZG RWGXGYH RTGVGXIZG RUOXLYM[N RWMYN[N R[NYQWSUU RWSYTZX[Z\\Z RYVZZ RWSXTYZZ[[[\\Z RUOUY",3512:" 85G]IHKFNFPGRF RLGOG RIHKGMHPHRF RNKMLLNLOJOIPIRJQLQLW RMMMU RJPMP RNKNTMVLW RK[NYRXWX[Y RMZPYWYZZ RK[OZVZY[[Y RSIRJQLQU RRKRS RSISRRTQU RSIUGWFYF[G RXGYGZH RUGWGYI[G RWGWX",3513:"107D`LJKKJMJOHOGPGRHQJQJU RKLKS RHPKP RLJLRKTJU RE[GYIXKXMYNYOX RHYKYMZ RE[GZJZL[M[NZOX RLJPFTJTWUYVY RPGSJSXRYSZTYSX RPPSP RNHOHRKROOO ROQRQRXQYS[VYWX RTJXF\\J\\W]Y^Y RXG[J[X]Z RXP[P RVHWHZKZOWO RWQZQZY\\[^Y ROHOX RWHWX",3514:" 84E^GIIGKFMFOGQJVUXXYY RMGOIPKVWYZ RIGKGMHOKTVVYWZY[ RVHXIZI\\H]F RWGYH[H RVHXFZG\\G]F RKOIOHPHRIQKQ RIPKP RG[IYKXNXPY RJYMYOZ RG[JZMZN[PY RKGKX RYIY[ RRLSMUNWNYM RKTMSQSST",3515:" 79E_NFLGJIIKHNHRIUJWLYNZQ[S[VZXYZW[U\\R\\N[KZIXGVFUGRIOJ RJJIMISJV RNFLHKJJMJSKVLXNZ RZV[S[MYIXH RVZXXYVZSZMYKWHUG ROJOW RPJPU RQJQTPVOW RUGUZ RUMWNXNZM RUSWRXRZS",3516:" 70H^KFLGMIMOKOJPJRKQMQMYJ[MZMbO` RMHNJN` RKPNP RKFMGNHOJO` ROKRIVFZJZX RVGYJYX RTHUHXKXY RRXUXXY RSYUYWZ RRZTZV[XYZX RRIR_ RRMTNVNXM RRSTRVRXS",3517:" 99E_NFLGJIIKHNHRIUJWLYNZP[T[VZXYZW[U\\R\\N[KZIXGVFUGRIOJ RJJIMISJV RNFLHKJJMJSKVLXNZ RZV[S[MYIXH RVZXXYVZSZMYKWHUG ROJOW RPJPU RQJQTPVOW RUGUZ RUMWNXNZM RUSWRXRZS RP[QZRZT[X`Za[a RT\\V_XaYa RRZS[VaXbZb[a",3518:"108F^HHJFMFOGQF RKGNG RHHJGLHOHQF RMKLLKNKOIOHPHRIQKQKW RLMLU RIPLP RMKMTLVKW RJ[MYPXRXUY RLZNYRYTZ RJ[NZQZS[UY RRIQJPLPU RQKQS RRIRRQTPU RRIUGWFYGZIZLYNXOTQRR RWGXGYIYMXN RUGWHXJXMWOTQ RTQVRWSZX[Y\\Y RWTYX[Z RTQVSXYZ[\\Y",3519:" 94G^UITHRGOF RVHTG RWGSFOFLGKHJJKLLMONWNYOZPZRYU RKKLLOMXMZN[O[QZS RKHKJLKOLYL[M\\O\\QYUU[ RIOJPLQUQVRVSUU RJQLRTRUS RIOIPJRLSSSUTUU RI[LYPXSXVY RKZNYRYUZ RI[MZRZU[ RWGUISL RRNPQ ROSMUKVJVJUKV",3520:" 71E]JJILHOHSIVKYMZP[S[VZXYZW[U RISJVLXNYQZTZWY RJJIMIQJTLWNXQYTYWXYW[U RHIIGKFOFUGYG[F RPGTHXH RHIIHKGNGTIWIYH[F RSIRJPKPV RQKQT RRJRSQUPV RWIWX",3521:" 89F^HHJFLFOGQF RKGNG RHHJGMHOHQF RKJJLIOISJVKXMZP[S[VZXYZ[\\Y RJSKVNYQZTZ RKJJNJQKTLVNXQYUYXX RUIQJPLPV RQKQT RRJRSQUPV RUIWHYFZG\\HZIZW[Y\\Y RYIZHYGXHYIYX[Z RWHXIXX RUIUY RUNXN RURXR",3522:" 72G^JFKGLILOJOIPIRJQLQLXJY RLHMJMX RJPMP RNYQYSZ RJFLGMHNJNXRXUY RJYMYPZR[UYXXZX RRJUIWHYFZG\\HZIZX RYIZHYGXHYIYW RWHXIXX RRJRX RRMTNVNXM RRSTRVRXS",3523:" 95E`HFIGJIJOHOGPGRHQJQJXHY RJHKJKX RHPKP RLYNYPZ RHFJGKHLJLXOXQY RHYKYNZO[QYTXVYW[YY\\X ROHRFTHTXWXYY RRGSHSX ROHQHRIRXQY RWYXZ RWHZF\\H\\X RZG[H[X RWHYHZIZXYY ROHOX RWHWX RONRN RORRR RWNZN RWRZR",3524:" 65G]HIJGLFNFOGWYXZZZ RMGNHVYWZ RJGLGMHUZV[X[ZZ\\X RWFYG[G\\F RWGXHZH RVHWIYI[H\\F RH[IYKXMXNY RJYLYMZ RH[IZKZM[ RWFSO RQRM[ RLPPP RSPXP",3525:" 86G^JFKGLILOJOIPIRJQLQLXJY RLHMJMX RJPMP RNYQYSZ RJFLGMHNJNXRXUY RJYMYPZR[UYXX RRJUIWHYFZG\\HZIZ^Y`WbUaQ`L` RYIZHYGXHYIYY RWHXIXXZ[ RXaV`S` RY`V_P_L` RRJRX RRMTNVNXM RRSTRVRXS",3526:" 57H\\XGWIROOSMWJ[ RVKNV RZFWJUNRRMXLZ RJHLFOGUGZF RKGOHSHWG RJHNIRIVHXG RLZNYRXVXZY RMZQYUYYZ RJ[OZUZX[ZY RMPQP RTPXP",3601:" 53J[PRNTMVMXNZP[RYUX RMVNXOYQZ RNTNVOXQYRY RNPPPSOUNVMXOWPWXXYYY RONNOQO RTOWOVNVYWZ RMOOMPNROUPUYW[YY RMORT",3602:" 44I[LHMJMXKY RNJMHNGNXQZ RLHOFOXQYRZ RKYMYOZP[RZUYWY ROPROTNUMVNXOYOWPWY RTNVOVX RROSOUPUY",3603:" 35JXNONXLYMYOZP[ ROOOYQZ RPOPXRYSYQZP[ RNORNTMUNWOXO RSNTOVO RPORNTPVPXO",3604:" 41IZRMPNMOMXKY RNONXQZ RRMOOOXQYRZ RKYMYOZP[RZUYWY RMHPFQIWOWY RPINHOGPIVOVX RMHUPUY",3605:" 32JXNONXLYMYOZP[ ROOOYQZ RPOPXRYSYQZP[ RNORNTMWQURPU RSNVQ RPORNUR",3606:" 41JWNHNXLYMYOZP[ ROHOYQZ RPHPXRYSYQZP[ RNHQGSFTGVHWH RRGSHUH RPHQGSIUIWH RKMNM RPMTM",3607:" 56I[MOMXKYLYNZO[PZRYUX RNPNYPZ ROOOXQYRY RMOOORNTMUNWOYOWPW\\V_TaRbQaO`M` RSNVPV\\ RSaQ`P` RRNSOUPUZV]V_ RTaS`Q_O_M`",3608:" 47I[LHMJMXKYLYNZO[ RNJMHNGNYPZ RLHOFOXQYO[ ROPROTNUMVNXOYOWPWYU[T] RTNVOVYU[ RROSOUPUYT]T`UbVbT`",3609:" 35MWRFPHRITHRF RRGQHSHRG RRMQNOOQPQYS[UY RRPSORNQORPRYSZ RRMSNUOSPSXTYUY",3610:" 39MWRFPHRITHRF RRGQHSHRG RRMQNOOQPQYS[T] RRPSORNQORPRYS[ RRMSNUOSPSYT]T`RbPbPaRb",3611:" 50IZLHMJMXKYLYNZO[ RNJMHNGNYPZ RLHOFOXQYO[ ROPRNTMVPSROU RSNUP RRNTQ RSRTSVXWYXY RSSTTUYVZ RRSSTTYV[XY",3612:" 22MWPHQJQXOYPYRZS[ RRJQHRGRYTZ RPHSFSXUYVYTZS[",3613:" 67E_GOHOIPIXGYHYJZK[ RINJOJYLZ RGOIMKOKXMYK[ RKPNOPNQMSOSXUYS[ RPNRORYTZ RNOOOQPQXPYRZS[ RSPVOXNYMZN\\O]O[P[X\\Y]Y RXNZOZY[Z RVOWOYPYY[[]Y",3614:" 45I[KOLOMPMXKYLYNZO[ RMNNONYPZ RKOMMOOOXQYO[ ROPROTNUMVNXOYOWPWXXYYY RTNVOVYWZ RROSOUPUYW[YY",3615:" 40I[MOMXKY RNPNXQZ ROOOXQYRZ RKYMYOZP[RZUYWY RMOOORNTMUNWOYOWPWY RSNVPVX RRNSOUPUY",3616:" 54I[LMMOMXKYMYMb RMNNONaO`N^ RNYOYQZ RLMNNOOOXQYRZ ROZP[RZUYWY ROZO^P`Mb ROPROTNUMVNXOYOWPWY RTNVOVX RROSOUPUY",3617:" 44I[MOMXKY RNPNYPZ ROOOXQYRY RKYLYNZO[PZRYUX RMOOORNTMUNWOYOWPWb RSNVPVaU`V^ RRNSOUPU^T`Wb",3618:" 38JXLOMONPNXLYMYOZP[ RMNOOOYQZ RLONMPOPXRYSYQZP[ RPOTMUNWOXO RSNTOVO RRNTPVPXO",3619:" 59JZMOMSOTUTWUWY RNONS RVUVY RPNOOOSQT RSTUUUYTZ RMOPNRMTNVNWM RQNSN RPNROTOVN RWYTZR[PZNZL[ RSZQZ RTZRYOYL[ RWMVOTROWL[",3620:" 28MWPHQJQXOYPYRZS[ RRJQHRGRYTZ RPHSFSXUYVYTZS[ RNMQM RSMVM",3621:" 47I[KOLOMPMXKY RLNNONYPZ RKOMMOOOXQYRY RKYLYNZO[PZRYUX RUMVNXOYOWPWXXYYY RTNVOVYWZ RUMSOUPUYW[YY",3622:" 36I[LMMOMXP[RYUXWX RMNNONXQZ RLMNNOOOWPXRY RUMVNXOYOWPWX RTNVOVW RUMSOUPUX",3623:" 57E_HMIOIXL[NYQX RINJOJXMZ RHMJNKOKWLXNY RQMOOQPQXT[VYYX[X RPNRORXUZ RQMRNTOSPSWTXVY RYMZN\\O]O[P[X RXNZOZW RYMWOYPYX",3624:" 59H[KOLONPOQSYTZV[XY RMNOOTYVZ RKOMMONPOTWUXWYXY RRSUMVNXNYM RUNVOWO RTOVPXOYM RQUN[MZKZJ[ RNZMYLY ROYMXKYJ[ RMTPT RSTVT",3625:" 60I[KOLOMPMXKY RLNNONYPZ RKOMMOOOXQYRY RKYLYNZO[PZRYUX RUMVNXOYOWPW\\V_TaRbQaO`M` RTNVOV\\ RSaQ`P` RUMSOUPUZV]V_ RTaS`Q_O_M`",3626:" 38I[XML[ RLONPQPTOXM RMNOOSO RLONMPNTNXM RL[PYSXVXXY RQYUYWZ RL[PZTZV[XY RNTVT",3700:" 42H\\LHLXJY RMIMXPZ RNHNXPYQZ RLHNHSGUF RSGTHVIVY RTGWIWX RUFVGXHZHXIXY RJYLYNZO[QZVYXY",3701:" 27H\\OHPIQKQXOY RQIPHQGRIRYTZ ROHRFSHSXUYVY ROYPYRZS[TZVY",3702:" 48H\\LHNHPGQFSGVHXH RPHRG RLHNIPIRHSG RVHVP RWIWO RXHXPQPNQLSKVK[ RK[OYSXVXZY RNZQYVYYZ RK[PZUZX[ZY",3703:" 57H\\LHMHOGPFRGVHXH ROHQG RLHNIPIRG RVHVO RWIWN RXHXOVOSPQQ RQPSQVRXRXY RWSWX RVRVY RKYMXOXQYRZ ROYQZ RKYMYOZP[RZVYXY",3704:" 41H\\UFKPKUTU RVUZU[V[TZU RLPLT RMNMU RTGTXRY RUJVHUGUYWZ RUFWHVJVXXYYY RRYSYUZV[WZYY",3705:" 53H\\LFLO RLFXF RMGVG RLHUHWGXF RVLUMSNOOLO RSNTNVOVY RUMWNWX RVLWMYNZNXOXY RKYMXOXQYRZ ROYQZ RKYMYOZP[RZVYXY",3706:" 59H\\LHLXJY RMIMXPZ RNHNXPYQZ RLHNHRGTFUGWHXH RSGUH RRGTIVIXH RNPOPSOUNVM RSOTOVPVY RUNWPWX RVMWNYOZOXPXY RJYLYNZO[QZVYXY",3707:" 38H\\KHMFPGUGZF RLGOHTHWG RKHOIRIVHZF RZFYHWKSOQRPUPXQ[ RRQQTQWRZ RUMSPRSRVSYQ[",3708:" 71H\\LILO RMJMN RNINO RLINISHUGVF RSHTHVIVO RUGWHWN RVFWGYHZHXIXO RLONOVRXR RXOVONRLR RLRLXJY RMSMXPZ RNRNXPYQZ RVRVY RWSWX RXRXY RJYLYNZO[QZVYXY",3709:" 60H\\LHLQJR RMIMROS RNHNQPRQR RLHNHSGUF RSGTHVIVY RTGWIWX RUFVGXHZHXIXY RJRKRMSNTOSQRUQVQ RKYMXOXQYRZ ROYQZ RKYMYOZP[RZVYXY",3710:" 11LXRXPZR[TZRX RRYQZSZRY",3711:" 14LXR^R\\PZRXSZS\\R^P_ RRYQZR[RY",3712:" 22LXRMPORPTORM RRNQOSORN RRXPZR[TZRX RRYQZSZRY",3713:" 25LXRMPORPTORM RRNQOSORN RR^R\\PZRXSZS\\R^P_ RRYQZR[RY",3714:" 30LXRFQGOHQIRT RRISHRGQHRIRT RRFSGUHSIRT RRXPZR[TZRX RRYQZSZRY",3715:" 51I[LJMHNGQFSFVGWHXJXLWNUPSQ RMJNH RVHWIWMVN RLJNKNIOGQF RSFUGVIVMUOSQ RRQRTSQQQRT RRXPZR[TZRX RRYQZSZRY",3716:" 14LXTFRGQIQKRMTKRIRG RRJRLSKRJ",3717:" 14LXRLRJPHRFSHSJRLPM RRGQHRIRG",3718:" 62E_YNZO[O\\N RXOYP[P RXPYQZQ[P\\N RYNST RRUL[HVNP ROOSKOFJLPRTXVZX[Z[[Z\\X RLZIV RRKOG RKLPQTWVYXZ[Z RMZIU RRLNG RKKQQUWVXXY[Y\\X",3719:" 60H\\PBP_ RTBT_ RTFVGWIWKYJXHWGTFPFMGKIKLLNOPURWSXUXXWZ RXJWH RLLMNOOUQWRXT RMYLW RMGLILKMMONUPXRYTYWXYWZT[P[MZLYKWMVMXNZP[",3720:" 8G^[BIbJb R[B\\BJb",3721:" 27KYUBSDQGOKNPNTOYQ]S`Ub RQHPKOOOUPYQ\\ RSDRFQIPOPUQ[R^S`",3722:" 27KYOBQDSGUKVPVTUYS]Q`Ob RSHTKUOUUTYS\\ RQDRFSITOTUS[R^Q`",3723:" 39JZRFQGSQRR RRFRR RRFSGQQRR RMINIVOWO RMIWO RMIMJWNWO RWIVINOMO RWIMO RWIWJMNMO",3724:" 8F_JQ[Q[R RJQJR[R",3725:" 16F_RIRZSZ RRISISZ RJQ[Q[R RJQJR[R",3726:" 16F_JM[M[N RJMJN[N RJU[U[V RJUJV[V",3727:" 11NWSFRGRM RSGRM RSFTGRM",3728:" 22I[NFMGMM RNGMM RNFOGMM RWFVGVM RWGVM RWFXGVM",3729:" 30KYQFOGNINKOMQNSNUMVKVIUGSFQF RQFNIOMSNVKUGQF RSFOGNKQNUMVISF",3801:" 52E_NHLIJKIMHPHSIUKV RJLIOISJU RNHLJKLJOJRKVKXJZH[ RVHXHXYVY RYHYY RZGZZ RHFKGQHVHZG\\F RJPXP RH[KZQYVYZZ\\[",3802:" 65E_LGLZ RMGMZ RPFNGNZP[ RHJJHLGPFUFXGZIZKYM RXHYIYKXM RUFWGXIXKWL RQUOTNRNPONPMSLVLYM[O\\Q\\T[WYYWZT[P[LZJYHW RZO[Q[UZW RVLYNZQZUYXWZ",3803:" 60E_\\F[HZJXHVGSFQFNGLHJJILHOHRIUJWLYNZQ[S[VZXYZW[Y\\[ R[HZMZT[Y RZKYJ RZNYKXIVG RJKINISJV RNGLIKKJNJSKVLXNZ RYWZV RVZXXYVZS",3804:" 46E_KGKZ RLGLZ RNFMGMZN[ RHKIIKGNFSFVGXHZJ[L\\O\\R[UZWXYVZS[N[KZIXHV RZK[N[SZV RVGXIYKZNZSYVXXVZ",3805:" 86E_\\F[HZJXHVGSFQFNGLHJJILHOHRIUJWLYNZQ[S[VZXYZW[Y\\[ R[HZMZT[Y RZKYJ RZMXIVG RJKINISJV RNGLIKKJNJSKVLXNZ RYWZV RVZXXYVZS RJPKONOUQXQZP RPPRQURWRYQ RMORRUSWSYRZP RZMYLXLWMXNYM",3806:" 69E_JHJZ RMGKHKY ROFMGLILYNY RHJJHLGOFSFVGXHYI\\F R\\F[HZLZO[S\\U RZIYK RVGXIYLZO RLPMOOOTPWPYO RQPTQVQXP RNOTRVRXQYOYLXKWKVLWMXL RH[JZNYSYYZ\\[",3807:" 90E_\\F[HZJXHVGSFQFNGLHJJILHOHRIUJWLYNZQ[T[VZXYYXZV[Y\\[ R[HZMZT[Y RZKYJ RZNYKXIVG RJKINISJV RNGLIKKJNJSKVLXNZ RXXYVYR RVZWYXVXQ RKSLRMSLTKTJS RJPKNMMOMRNUPWQ RKOMNONROTP RJPLOOOUQYQZP",3808:" 50E_JGJZH[ RKHKZ RNHLHLZ RHFJGNHSHYG\\F RLPMNOLRKVKYL[N\\Q\\T[UYV RZN[P[SZU RVKXLYMZOZSYVYXZZ\\[ RH[LZPZU[",3809:" 23E_QIQY RRJRX RSISY RHFLHPITIXH\\F RH[KZOYUYYZ\\[",3810:" 42E_TIVIVXUZS[ RWIWXVY RXHXY RHFLHPITIXH\\F RIOHQHUIXKZN[S[VZXYZW\\T RIUJXKY RHSJUKXLZN[",3811:" 70E_JGJZH[ RKHKZ RNHLHLZ RHFJGNHSHYG\\F RLPMNOLRKUKXLYMYOXPSRQSPTPUQVRUQT RWLXMXOWP RUKWMWOVPSR RSRVRYSZUZWYX RWSYUYW RSRVSXUYXZZ[[\\[ RH[LZPZU[",3812:" 45E_JGJZ RKHKY RNHLHLYNY R\\KZNYPXSXUYW[X RZOYRYUZW R\\K[MZQZT[X\\[ RHFJGNHSHYG\\F RH[JZNYSYYZ\\[",3813:" 68E_QIQY RRJRX RSISY RNYLWJVIUHRHMIJKHMGPFTFWGYH[J\\M\\R[UZVXWVY RJUIRIMJJ RLWKUJRJLKIMG RZJ[M[RZU RWGYIZLZRYUXW RHFLHPITIXH\\F RH[KZOYUYYZ\\[",3814:" 48E_JHJZH[ RLHKIKZ ROFMGLILZ RHJJHLGOFSFVGXHZJ[L\\O\\S[UYV RZK[N[RZU RVGXIYKZNZRYVYXZZ[[\\[ RH[LZPZU[",3815:" 54E_QFNGLHJJILHOHRIUJWLYNZQ[S[VZXYZW[U\\R\\O[LZJXHVGSFQF RJKINISJV RNGLIKKJNJSKVLXNZ RZV[S[NZK RVZXXYVZSZNYKXIVG",3816:" 51E_JIJZ RMHKJKY RQFOGMILKLYNY RHKJINGQFTFWGYH[J\\M\\O[RYTVURUOTMRLO RZJ[L[PZR RWGYIZLZPYSVU RH[JZNYSYYZ\\[",3817:" 74E_QFNGLHJJILHOHRIUJWLYNZQ[S[VZXYZW[U\\R\\O[LZJXHVGSFQF RJKINISJV RNGLIKKJNJSKVLXNZ RZV[S[NZK RVZXXYVZSZNYKXIVG RJSKUNVTW[W\\X\\Z[[[Z\\Y RPWRW RKUNWQXSXTW",3818:" 69E_JIJZH[ RKIKZ RLHLZ RHKJILHNGQFUFYG[I\\K\\N[PZQ RYHZI[K[NZP RUFWGYIZKZOYQ RXRUSRSPRPPROUOXPZR\\U\\W[XZX RXQYR[V[WZT RTOVPXRYTZX[Z\\[ RH[LZPZU[",3819:" 94E_TFZG\\F[H[JYHWGTFPFMGJJIMIOJRLTOURUTTUSVQVP R[GZH[J RJPKRLSOTRTTS RKIJKJNKPMRPSRSTRVPWOXO RLQMQNPPNRMUMWNYPZRZUYXWZ RPMRLULXMZO[R[UZW RIWJYIZ RNPNOOMPLRKUKXL[O\\R\\T[WYYWZT[P[MZKYIWIYH[JZP[",3820:" 66E_QHMHKIJJILHOHSIVJXKYMZP[S[VZXYZW[U\\R\\N[KYIWH RUHTITKULVKUJ RISJVLXNYQZTZWY RJJINIQJTLWNXQYTYWXYW[T\\R RHFKI RKHLG RIGJGKFMGQHWHZG\\F",3821:" 51E_LHJJILHOHRIUJWLYNZQ[U[XZZY RKJJLIOISJV RKILJLKKMJPJSKVLXNZ RVHXHXXWZU[ RYHYXXY RZGZY\\[ RHFKGQHVHZG\\F",3822:" 31E_HFR[ RIGJHQWRY RJGKHRWSX R\\FR[ RWNUS RYLUQTTTV RHFJGOHUHZG\\F",3823:" 67E_LHJJILHOHRIUJWLYNZQ[S[VZXYZW[U\\R\\O[LZJXH RJLIOIRJUKW RJJKKKLJOJRKVLXNZ RYWZU[R[OZL RVZXXYVZRZOYLYKZJ RQIQ[ RRJRZ RSIS[ RHFLHPITIXH\\F",3824:" 41E_HFXYYZ RIGKHZZ RLH\\[ R\\FSP RQRJZ RPSMULW RQRMTLUKWKY RHFLHPITIXH\\F RH[JZNYSYYZ\\[",3825:" 47E_XHXZ RYHYY RZGZY RKHIJHMHPISKUMVPWSWVVXU RLUOVUV RHPIRKTNUTUVV RHFLHPITIXH\\F RHWJYLZP[T[XZ\\X",3826:" 73E_HFIGKHNHSFVFYGZIZKYM RXGYIYKXM RVFWGXIXL RXNTOROPNPLRKTKXL RTKVLWMVNTO RYM[O\\R\\T[WYYWZT[P[MZKYIWHTHRIOJNLMNMPNPPOQNPOO RXMZO[Q[UZW RXNYOZQZUYXWZ",3901:" 42J[PQMTMXP[TY RNTNXPZ ROROWRZ RRSMNNMONNO RONSNUMWOWXXY RUNVOVXUYVZWYVX RSNUPUXTYV[XY",3902:" 31IZNHLFMJMXP[UYWX RNHNXPZ RNHPFOJOWRZ ROOTMWPWX RTNVPVX RRNUQUY",3903:" 23KWNPNYP[RY ROPOYPZ RPOPXQYRY RNPTMVOTPRN RSNUO",3904:" 32JZRMMPMXP[RZUYWY RNPNXPZ ROOOWRZ RPIPFQIWPWY RPIVPVX RPIMIPJUPUY",3905:" 25KXNPNYP[RY ROPOYPZ RPOPXQYRY RNPTMWQPU RSNVQ RRNUR",3906:" 32KWOIOXNYP[ RPIPXOYPZQYPX RQHQXRYP[ ROIUFWHUISG RTGVH RLMOM RQMUM",3907:" 41J[MPMXP[UY RNPNXPZ ROOOWRZ RMPOOTMWPW]V_U`SaQaO`MaObQa RTNVPV]U_ RPaNa RRNUQU^T`Sa",3908:" 42I[NHLFMJMXLYN[ RNHNXMYNZOYNX RNHPFOJOXPYN[ ROORNTMWPWYT]T`UbVbT` RTNVPVYU[ RRNUQUZT]",3909:" 37MWRFPHRJTHRF RRGQHRISHRG RRMPOQPQXPYR[ RRPSORNQORPRXQYRZSYRX RRMTOSPSXTYR[",3910:" 37MWRFPHRJTHRF RRGQHRISHRG RRMPOQPQYT] RRPSORNQORPRYS[ RRMTOSPSZT]T`RbPaPbRb",3911:" 51IZNHLFMJMXLYN[ RNHNXMYNZOYNX RNHPFOJOXPYN[ ROPRNTMVPSROU RSNUP RRNTQ RRSSTTYV[XY RSSTUUYVZ RSRTSVXWYXY",3912:" 21MWRHPFQJQXPYR[ RRHRXQYRZSYRX RRHTFSJSXTYR[",3913:" 66E_GOHOIPIXHYJ[ RINJOJXIYJZKYJX RGOIMKOKXLYJ[ RKONNPMSOSXTYR[ RPNRORXQYRZSYRX RNNQPQXPYR[ RSOVNXM[O[X\\YZ[ RXNZOZXYYZZ[YZX RVNYPYXXYZ[",3914:" 44I[KOLOMPMXLYN[ RMNNONXMYNZOYNX RKOMMOOOXPYN[ ROORNTMWOWXXYV[ RTNVOVXUYVZWYVX RRNUPUXTYV[",3915:" 28JZMPMXP[UYWX RNPNXPZ ROOOWRZ RMPOOTMWPWX RTNVPVX RRNUQUY",3916:" 47IZLMMOMXKYMYM_LbN` RNON` RLMNNOOOXQYRZ RNYOYQZ ROZP[UYWX ROZO_PbN` ROORNTMWPWX RTNVPVX RRNUQUY",3917:" 31J[MPMXP[UY RNPNXPZ ROOOWRZ RMPOOTMWPW_XbV` RTNVPV` RRNUQU_TbV`",3918:" 31KXMONOOPOXNYP[ RONPOPXOYPZQYPX RMOOMQOQXRYP[ RQOUMWOUPSN RTNVO",3919:" 41JZMPMSOUURWTWX RNPNSOT ROOOSPT RUSVTVX RTSUTUY RMPSMVNTOQN RRNUN RWXQ[MYOXSZ ROYQZ",3920:" 27MWRHPFQJQXPYR[ RRHRXQYRZSYRX RRHTFSJSXTYR[ RNMQM RSMVM",3921:" 40I[KOLOMPMYP[UY RMNNONYPZ RKOMMOOOXRZ RVMXOWPWXXYYY RVPWOVNUOVPVYWZ RVMTOUPUYW[YY",3922:" 36I[LMMOMXQ[SYWW RMNNONXQZ RLMNNOOOWRYSY RVMXOWPWW RVPWOVNUOVPVW RVMTOUPUX",3923:" 59E_HMIOIXM[OYQX RINJOJXMZ RHMJNKOKWNYOY RRMPOQPQXU[WY[W RRPSORNQORPRXUZ RRMTOSPSWVYWY RZM\\O[P[W RZP[OZNYOZPZW RZMXOYPYX",3924:" 39I[LONPUZV[XY RMNOOUYWZ RLONMONVXXY RXMVMVOXOXMVOSS RQUNYL[N[NYLYL[ RNTQT RSTVT",3925:" 49I[KOLOMPMYP[UY RMNNONYPZ RKOMMOOOXRZ RVMXOWPW]V_U`SaQaO`MaObQa RVPWOVNUOVPV^U_ RPaNa RVMTOUPU^T`Sa",3926:" 43L[RNOPOORNTMWOWSRU RTNVOVS RRNUPUSTT RRUWWW]V_U`SaQaO`MaObQa RVWV^U_ RPaNa RTVUWU^T`Sa"},Fe={"\\frac":{glyph:0,arity:2,flags:{}},"\\binom":{glyph:0,arity:2,flags:{}},"\\sqrt":{glyph:2267,arity:1,flags:{opt:!0,xfl:!0,yfl:!0}},"^":{glyph:0,arity:1,flags:{}},_:{glyph:0,arity:1,flags:{}},"(":{glyph:2221,arity:0,flags:{yfl:!0}},")":{glyph:2222,arity:0,flags:{yfl:!0}},"[":{glyph:2223,arity:0,flags:{yfl:!0}},"]":{glyph:2224,arity:0,flags:{yfl:!0}},"\\langle":{glyph:2227,arity:0,flags:{yfl:!0}},"\\rangle":{glyph:2228,arity:0,flags:{yfl:!0}},"|":{glyph:2229,arity:0,flags:{yfl:!0}},"\\|":{glyph:2230,arity:0,flags:{yfl:!0}},"\\{":{glyph:2225,arity:0,flags:{yfl:!0}},"\\}":{glyph:2226,arity:0,flags:{yfl:!0}},"\\#":{glyph:2275,arity:0,flags:{}},"\\$":{glyph:2274,arity:0,flags:{}},"\\&":{glyph:2273,arity:0,flags:{}},"\\%":{glyph:2271,arity:0,flags:{}},"\\begin":{glyph:0,arity:1,flags:{}},"\\end":{glyph:0,arity:1,flags:{}},"\\left":{glyph:0,arity:1,flags:{}},"\\right":{glyph:0,arity:1,flags:{}},"\\middle":{glyph:0,arity:1,flags:{}},"\\cdot":{glyph:2236,arity:0,flags:{}},"\\pm":{glyph:2233,arity:0,flags:{}},"\\mp":{glyph:2234,arity:0,flags:{}},"\\times":{glyph:2235,arity:0,flags:{}},"\\div":{glyph:2237,arity:0,flags:{}},"\\leqq":{glyph:2243,arity:0,flags:{}},"\\geqq":{glyph:2244,arity:0,flags:{}},"\\leq":{glyph:2243,arity:0,flags:{}},"\\geq":{glyph:2244,arity:0,flags:{}},"\\propto":{glyph:2245,arity:0,flags:{}},"\\sim":{glyph:2246,arity:0,flags:{}},"\\equiv":{glyph:2240,arity:0,flags:{}},"\\dagger":{glyph:2277,arity:0,flags:{}},"\\ddagger":{glyph:2278,arity:0,flags:{}},"\\ell":{glyph:662,arity:0,flags:{}},"\\vec":{glyph:2261,arity:1,flags:{hat:!0,xfl:!0,yfl:!0}},"\\overrightarrow":{glyph:2261,arity:1,flags:{hat:!0,xfl:!0,yfl:!0}},"\\overleftarrow":{glyph:2263,arity:1,flags:{hat:!0,xfl:!0,yfl:!0}},"\\bar":{glyph:2231,arity:1,flags:{hat:!0,xfl:!0}},"\\overline":{glyph:2231,arity:1,flags:{hat:!0,xfl:!0}},"\\widehat":{glyph:2247,arity:1,flags:{hat:!0,xfl:!0,yfl:!0}},"\\hat":{glyph:2247,arity:1,flags:{hat:!0}},"\\acute":{glyph:2248,arity:1,flags:{hat:!0}},"\\grave":{glyph:2249,arity:1,flags:{hat:!0}},"\\breve":{glyph:2250,arity:1,flags:{hat:!0}},"\\tilde":{glyph:2246,arity:1,flags:{hat:!0}},"\\underline":{glyph:2231,arity:1,flags:{mat:!0,xfl:!0}},"\\not":{glyph:2220,arity:1,flags:{}},"\\neq":{glyph:2239,arity:1,flags:{}},"\\ne":{glyph:2239,arity:1,flags:{}},"\\exists":{glyph:2279,arity:0,flags:{}},"\\in":{glyph:2260,arity:0,flags:{}},"\\subset":{glyph:2256,arity:0,flags:{}},"\\supset":{glyph:2258,arity:0,flags:{}},"\\cup":{glyph:2257,arity:0,flags:{}},"\\cap":{glyph:2259,arity:0,flags:{}},"\\infty":{glyph:2270,arity:0,flags:{}},"\\partial":{glyph:2265,arity:0,flags:{}},"\\nabla":{glyph:2266,arity:0,flags:{}},"\\aleph":{glyph:2077,arity:0,flags:{}},"\\wp":{glyph:2190,arity:0,flags:{}},"\\therefore":{glyph:740,arity:0,flags:{}},"\\mid":{glyph:2229,arity:0,flags:{}},"\\sum":{glyph:2402,arity:0,flags:{big:!0}},"\\prod":{glyph:2401,arity:0,flags:{big:!0}},"\\bigoplus":{glyph:2284,arity:0,flags:{big:!0}},"\\bigodot":{glyph:2281,arity:0,flags:{big:!0}},"\\int":{glyph:2412,arity:0,flags:{yfl:!0}},"\\oint":{glyph:2269,arity:0,flags:{yfl:!0}},"\\oplus":{glyph:1284,arity:0,flags:{}},"\\odot":{glyph:1281,arity:0,flags:{}},"\\perp":{glyph:738,arity:0,flags:{}},"\\angle":{glyph:739,arity:0,flags:{}},"\\triangle":{glyph:842,arity:0,flags:{}},"\\Box":{glyph:841,arity:0,flags:{}},"\\rightarrow":{glyph:2261,arity:0,flags:{}},"\\to":{glyph:2261,arity:0,flags:{}},"\\leftarrow":{glyph:2263,arity:0,flags:{}},"\\gets":{glyph:2263,arity:0,flags:{}},"\\circ":{glyph:902,arity:0,flags:{}},"\\bigcirc":{glyph:904,arity:0,flags:{}},"\\bullet":{glyph:828,arity:0,flags:{}},"\\star":{glyph:856,arity:0,flags:{}},"\\diamond":{glyph:743,arity:0,flags:{}},"\\ast":{glyph:728,arity:0,flags:{}},"\\log":{glyph:0,arity:0,flags:{txt:!0}},"\\ln":{glyph:0,arity:0,flags:{txt:!0}},"\\exp":{glyph:0,arity:0,flags:{txt:!0}},"\\mod":{glyph:0,arity:0,flags:{txt:!0}},"\\lim":{glyph:0,arity:0,flags:{txt:!0,big:!0}},"\\sin":{glyph:0,arity:0,flags:{txt:!0}},"\\cos":{glyph:0,arity:0,flags:{txt:!0}},"\\tan":{glyph:0,arity:0,flags:{txt:!0}},"\\csc":{glyph:0,arity:0,flags:{txt:!0}},"\\sec":{glyph:0,arity:0,flags:{txt:!0}},"\\cot":{glyph:0,arity:0,flags:{txt:!0}},"\\sinh":{glyph:0,arity:0,flags:{txt:!0}},"\\cosh":{glyph:0,arity:0,flags:{txt:!0}},"\\tanh":{glyph:0,arity:0,flags:{txt:!0}},"\\csch":{glyph:0,arity:0,flags:{txt:!0}},"\\sech":{glyph:0,arity:0,flags:{txt:!0}},"\\coth":{glyph:0,arity:0,flags:{txt:!0}},"\\arcsin":{glyph:0,arity:0,flags:{txt:!0}},"\\arccos":{glyph:0,arity:0,flags:{txt:!0}},"\\arctan":{glyph:0,arity:0,flags:{txt:!0}},"\\arccsc":{glyph:0,arity:0,flags:{txt:!0}},"\\arcsec":{glyph:0,arity:0,flags:{txt:!0}},"\\arccot":{glyph:0,arity:0,flags:{txt:!0}},"\\text":{glyph:0,arity:1,flags:{}},"\\mathnormal":{glyph:0,arity:1,flags:{}},"\\mathrm":{glyph:0,arity:1,flags:{}},"\\mathit":{glyph:0,arity:1,flags:{}},"\\mathbf":{glyph:0,arity:1,flags:{}},"\\mathsf":{glyph:0,arity:1,flags:{}},"\\mathtt":{glyph:0,arity:1,flags:{}},"\\mathfrak":{glyph:0,arity:1,flags:{}},"\\mathcal":{glyph:0,arity:1,flags:{}},"\\mathbb":{glyph:0,arity:1,flags:{}},"\\mathscr":{glyph:0,arity:1,flags:{}},"\\rm":{glyph:0,arity:1,flags:{}},"\\it":{glyph:0,arity:1,flags:{}},"\\bf":{glyph:0,arity:1,flags:{}},"\\sf":{glyph:0,arity:1,flags:{}},"\\tt":{glyph:0,arity:1,flags:{}},"\\frak":{glyph:0,arity:1,flags:{}},"\\cal":{glyph:0,arity:1,flags:{}},"\\bb":{glyph:0,arity:1,flags:{}},"\\scr":{glyph:0,arity:1,flags:{}},"\\quad":{glyph:0,arity:0,flags:{}},"\\,":{glyph:0,arity:0,flags:{}},"\\.":{glyph:0,arity:0,flags:{}},"\\;":{glyph:0,arity:0,flags:{}},"\\!":{glyph:0,arity:0,flags:{}},"\\alpha":{glyph:2127,flags:{}},"\\beta":{glyph:2128,flags:{}},"\\gamma":{glyph:2129,flags:{}},"\\delta":{glyph:2130,flags:{}},"\\varepsilon":{glyph:2131,flags:{}},"\\zeta":{glyph:2132,flags:{}},"\\eta":{glyph:2133,flags:{}},"\\vartheta":{glyph:2134,flags:{}},"\\iota":{glyph:2135,flags:{}},"\\kappa":{glyph:2136,flags:{}},"\\lambda":{glyph:2137,flags:{}},"\\mu":{glyph:2138,flags:{}},"\\nu":{glyph:2139,flags:{}},"\\xi":{glyph:2140,flags:{}},"\\omicron":{glyph:2141,flags:{}},"\\pi":{glyph:2142,flags:{}},"\\rho":{glyph:2143,flags:{}},"\\sigma":{glyph:2144,flags:{}},"\\tau":{glyph:2145,flags:{}},"\\upsilon":{glyph:2146,flags:{}},"\\varphi":{glyph:2147,flags:{}},"\\chi":{glyph:2148,flags:{}},"\\psi":{glyph:2149,flags:{}},"\\omega":{glyph:2150,flags:{}},"\\epsilon":{glyph:2184,flags:{}},"\\theta":{glyph:2185,flags:{}},"\\phi":{glyph:2186,flags:{}},"\\varsigma":{glyph:2187,flags:{}},"\\Alpha":{glyph:2027,flags:{}},"\\Beta":{glyph:2028,flags:{}},"\\Gamma":{glyph:2029,flags:{}},"\\Delta":{glyph:2030,flags:{}},"\\Epsilon":{glyph:2031,flags:{}},"\\Zeta":{glyph:2032,flags:{}},"\\Eta":{glyph:2033,flags:{}},"\\Theta":{glyph:2034,flags:{}},"\\Iota":{glyph:2035,flags:{}},"\\Kappa":{glyph:2036,flags:{}},"\\Lambda":{glyph:2037,flags:{}},"\\Mu":{glyph:2038,flags:{}},"\\Nu":{glyph:2039,flags:{}},"\\Xi":{glyph:2040,flags:{}},"\\Omicron":{glyph:2041,flags:{}},"\\Pi":{glyph:2042,flags:{}},"\\Rho":{glyph:2043,flags:{}},"\\Sigma":{glyph:2044,flags:{}},"\\Tau":{glyph:2045,flags:{}},"\\Upsilon":{glyph:2046,flags:{}},"\\Phi":{glyph:2047,flags:{}},"\\Chi":{glyph:2048,flags:{}},"\\Psi":{glyph:2049,flags:{}},"\\Omega":{glyph:2050,flags:{}}};function Ye(e,t="math"){const n=e.charCodeAt(0);if(65<=n&&n<=90){const e=n-65;return"text"==t||"rm"==t?e+2001:"tt"==t?e+501:"bf"==t||"bb"==t?e+3001:"sf"==t?e+2501:"frak"==t?e+3301:"scr"==t||"cal"==t?e+2551:e+2051}if(97<=n&&n<=122){const e=n-97;return"text"==t||"rm"==t?e+2101:"tt"==t?e+601:"bf"==t||"bb"==t?e+3101:"sf"==t?e+2601:"frak"==t?e+3401:"scr"==t||"cal"==t?e+2651:e+2151}if(48<=n&&n<=57){const e=n-48;return"it"==t?e+2750:"bf"==t?e+3200:"tt"==t?e+700:e+2200}return{".":2210,",":2211,":":2212,";":2213,"!":2214,"?":2215,"'":2216,'"':2217,"*":2219,"/":2220,"-":2231,"+":2232,"=":2238,"<":2241,">":2242,"~":2246,"@":2273,"\\":804}[e]}const He={SUB_SUP_SCALE:.5,SQRT_MAG_SCALE:.5,FRAC_SCALE:.85,LINE_SPACING:.5,FRAC_SPACING:.4};function ke(e){e=e.replace(/\n/g," ");let t=0;const n=[];let r="";while(t<e.length)" "==e[t]?r.length&&(n.push(r),r=""):"\\"==e[t]?1==r.length&&"\\"==r[0]?(r+=e[t],n.push(r),r=""):(r.length&&n.push(r),r=e[t]):/[A-Za-z0-9\.]/.test(e[t])?r+=e[t]:(r.length&&"\\"!=r&&(n.push(r),r=""),r+=e[t],n.push(r),r=""),t++;return r.length&&n.push(r),n}function Ve(e){return{type:Fe[e]?"symb":"char",mode:"math",text:e,chld:[],bbox:null}}function Ue(e){let t=0,n={type:"node",text:"",mode:"math",chld:[],bbox:null};function r(){if("["!=e[t])return null;let n=0,r=t;while(r<e.length){if("["==e[r])n++;else if("]"==e[r]&&(n--,!n))break;r++}const i=Ue(e.slice(t+1,r));return t=r,i}function i(n){let r=t,i=r,s=0,o=0;const a=[];while(r<e.length){if("{"==e[r])s||(i=r),s++;else if("}"==e[r]){if(s--,!s&&(a.push(Ue(e.slice(i+1,r))),o++,o==n))break}else if(0==s&&(a.push(Ve(e[r])),o++,o==n))break;r++}return t=r,a}for(t=0;t<e.length;t++){const s=Fe[e[t]],o={type:"",text:e[t],mode:"math",chld:[],bbox:null};if(s)if(s.arity){t++,o.type="func";let e=null;s.flags.opt&&(e=r(),e&&t++);const n=i(s.arity);o.chld=n,e&&o.chld.push(e)}else o.type="symb";else"{"==e[t]?(o.type="node",o.text="",o.chld=i(1)):o.type="char";n.chld.push(o)}return 1==n.chld.length&&(n=n.chld[0]),n}function We(e){let t=0;while(t<e.length){if("\\begin"==e[t].text){let n;for(n=t;n<e.length;n++)if("\\end"==e[n].text)break;const r=e.splice(t+1,n-(t+1));We(r),e[t].text=e[t].chld[0].text,e[t].chld=r,e.splice(t+1,1)}t++}}function Xe(e,t,n,r,i,s){if(null==n&&(n=t),e.bbox){s&&(e.bbox.x*=t,e.bbox.y*=n),e.bbox.w*=t,e.bbox.h*=n;for(let r=0;r<e.chld.length;r++)Xe(e.chld[r],t,n,0,0,!0);e.bbox.x+=r,e.bbox.y+=i}}function je(e){let t=1/0,n=-1/0,r=1/0,i=-1/0;for(let s=0;s<e.length;s++)e[s].bbox&&(t=Math.min(t,e[s].bbox.x),r=Math.min(r,e[s].bbox.y),n=Math.max(n,e[s].bbox.x+e[s].bbox.w),i=Math.max(i,e[s].bbox.y+e[s].bbox.h));return{x:t,y:r,w:n-t,h:i-r}}function Ze(e){if(!e.length)return null;const t=je(e);for(let r=0;r<e.length;r++)e[r].bbox&&(e[r].bbox.x-=t.x,e[r].bbox.y-=t.y);const n={type:"node",text:"",mode:"math",chld:e,bbox:t};return n}function Qe(e,t="center"){for(let c=0;c<e.length;c++)if("^"==e[c].text||"'"==e[c].text){let t=0,n=c;while(n>0&&("^"==e[n].text||"_"==e[n].text||"'"==e[n].text))n--;t=e[n].bbox.y,"'"==e[c].text?e[c].bbox.y=t:(Xe(e[c],He.SUB_SUP_SCALE,null,0,0),Fe[e[n].text]&&Fe[e[n].text].flags.big?e[c].bbox.y=t-e[c].bbox.h:"\\int"==e[n].text?e[c].bbox.y=t:e[c].bbox.y=t-e[c].bbox.h/2)}else if("_"==e[c].text){let t=1,n=c;while(n>0&&("^"==e[n].text||"_"==e[n].text||"'"==e[n].text))n--;t=e[n].bbox.y+e[n].bbox.h,Xe(e[c],He.SUB_SUP_SCALE,null,0,0),Fe[e[n].text]&&Fe[e[n].text].flags.big?e[c].bbox.y=t:"\\int"==e[n].text?e[c].bbox.y=t-e[c].bbox.h:e[c].bbox.y=t-e[c].bbox.h/2}function n(t,n,r,i,s){let o=t,a=s,l=1/0,c=-1/0;while(i>0?o<e.length:o>=0){if(e[o].text==n)a++;else if(e[o].text==r){if(a--,0==a)break}else"^"==e[o].text||"_"==e[o].text||e[o].bbox&&(l=Math.min(l,e[o].bbox.y),c=Math.max(c,e[o].bbox.y+e[o].bbox.h));o+=i}return[l,c]}for(let c=0;c<e.length;c++)if("\\left"==e[c].text){const[t,r]=n(c,"\\left","\\right",1,0);t!=1/0&&r!=-1/0&&(e[c].bbox.y=t,Xe(e[c],1,(r-t)/e[c].bbox.h,0,0))}else if("\\right"==e[c].text){const[t,r]=n(c,"\\right","\\left",-1,0);t!=1/0&&r!=-1/0&&(e[c].bbox.y=t,Xe(e[c],1,(r-t)/e[c].bbox.h,0,0))}else if("\\middle"==e[c].text){const[t,r]=n(c,"\\right","\\left",-1,1),[i,s]=n(c,"\\left","\\right",1,1),o=Math.min(t,i),a=Math.max(r,s);o!=1/0&&a!=-1/0&&(e[c].bbox.y=o,Xe(e[c],1,(a-o)/e[c].bbox.h,0,0))}if(!e.some(e=>"&"==e.text||"\\\\"==e.text))return;const r=[];let i=[],s=[];for(let c=0;c<e.length;c++)"&"==e[c].text?(i.push(s),s=[]):"\\\\"==e[c].text?(s.length&&(i.push(s),s=[]),r.push(i),i=[]):s.push(e[c]);s.length&&i.push(s),i.length&&r.push(i);const o=[],a=[];for(let c=0;c<r.length;c++){const e=[];for(let t=0;t<r[c].length;t++){const n=Ze(r[c][t]);n&&(o[t]=o[t]||0,o[t]=Math.max(n.bbox.w+1,o[t])),e[t]=n}a.push(e)}const l=[];for(let c=0;c<a.length;c++){let e=1/0,t=-1/0;for(let n=0;n<a[c].length;n++)a[c][n]&&(e=Math.min(e,a[c][n].bbox.y),t=Math.max(t,a[c][n].bbox.y+a[c][n].bbox.h));l.push([e,t])}for(let c=0;c<l.length;c++)l[c][0]!=1/0&&l[c][1]!=1/0||(l[c][0]=0==c?0:l[c-1][1],l[c][1]=l[c][0]+2);for(let c=1;c<a.length;c++){const e=l[c-1][1]-l[c][0]+He.LINE_SPACING;for(let t=0;t<a[c].length;t++)a[c][t]&&(a[c][t].bbox.y+=e);l[c][0]+=e,l[c][1]+=e}e.splice(0,e.length);for(let c=0;c<a.length;c++){let n=0;for(let r=0;r<a[c].length;r++){const i=a[c][r];i?(i.bbox.x+=n,n+=o[r]-i.bbox.w,"center"==t?i.bbox.x+=(o[r]-i.bbox.w)/2:"left"==t||("right"==t||"equation"==t&&r!=a[c].length-1)&&(i.bbox.x+=o[r]-i.bbox.w),e.push(i)):n+=o[r]}}}function Ke(e,t="math"){var n,r,i;const s=null!=(n={"\\text":"text","\\mathnormal":"math","\\mathrm":"rm","\\mathit":"it","\\mathbf":"bf","\\mathsf":"sf","\\mathtt":"tt","\\mathfrak":"frak","\\mathcal":"cal","\\mathbb":"bb","\\mathscr":"scr","\\rm":"rm","\\it":"it","\\bf":"bf","\\sf":"tt","\\tt":"tt","\\frak":"frak","\\cal":"cal","\\bb":"bb","\\scr":"scr"}[e.text])?n:t;if(e.chld.length)if("\\frac"==e.text){const t=e.chld[0],n=e.chld[1],r=He.FRAC_SCALE;Ke(t),Ke(n),t.bbox.x=0,t.bbox.y=0,n.bbox.x=0,n.bbox.y=0;const i=Math.max(t.bbox.w,n.bbox.w)*r;Xe(t,r,null,(i-t.bbox.w*r)/2,0),Xe(n,r,null,(i-n.bbox.w*r)/2,t.bbox.h+He.FRAC_SPACING),e.bbox={x:0,y:1-t.bbox.h-He.FRAC_SPACING/2,w:i,h:t.bbox.h+n.bbox.h+He.FRAC_SPACING}}else if("\\binom"==e.text){const t=e.chld[0],n=e.chld[1];Ke(t),Ke(n),t.bbox.x=0,t.bbox.y=0,n.bbox.x=0,n.bbox.y=0;const r=Math.max(t.bbox.w,n.bbox.w);Xe(t,1,null,(r-t.bbox.w)/2+1,0),Xe(n,1,null,(r-n.bbox.w)/2+1,t.bbox.h),e.bbox={x:0,y:1-t.bbox.h,w:r+2,h:t.bbox.h+n.bbox.h}}else if("\\sqrt"==e.text){const t=e.chld[0];Ke(t);const n=e.chld[1];let r=0;n&&(Ke(n),r=Math.max(n.bbox.w*He.SQRT_MAG_SCALE-.5,0),Xe(n,He.SQRT_MAG_SCALE,null,0,.5)),Xe(t,1,null,1+r,.5),e.bbox={x:0,y:2-t.bbox.h-.5,w:t.bbox.w+1+r,h:t.bbox.h+.5}}else if(Fe[e.text]&&Fe[e.text].flags.hat){const t=e.chld[0];Ke(t);const n=t.bbox.y-.5;t.bbox.y=.5,e.bbox={x:0,y:n,w:t.bbox.w,h:t.bbox.h+.5}}else if(Fe[e.text]&&Fe[e.text].flags.mat){const t=e.chld[0];Ke(t),e.bbox={x:0,y:0,w:t.bbox.w,h:t.bbox.h+.5}}else{let n=0,o=0,a=1;for(let i=0;i<e.chld.length;i++){const l=e.chld[i],c=null!=(r={"\\quad":2,"\\,":6/18,"\\:":8/18,"\\;":10/18,"\\!":-6/18}[l.text])?r:null;if("\\\\"!=l.text){if("&"!=l.text)if(null==c){if(Ke(l,s),Xe(l,1,null,n,o),"^"==l.text||"_"==l.text||"'"==l.text){let t=i;while(t>0&&("^"==e.chld[t].text||"_"==e.chld[t].text||"'"==e.chld[t].text))t--;const r=Fe[e.chld[t].text]&&Fe[e.chld[t].text].flags.big;if("'"==l.text){let r=t+1,s=0;while(r<i)"'"==e.chld[r].text&&s++,r++;l.bbox.x=e.chld[t].bbox.x+e.chld[t].bbox.w+l.bbox.w*s,n=Math.max(n,l.bbox.x+l.bbox.w)}else if(r){const r=e.chld[t].bbox.x+(e.chld[t].bbox.w-l.bbox.w*He.SUB_SUP_SCALE)/2;l.bbox.x=r,n=Math.max(n,e.chld[t].bbox.x+e.chld[t].bbox.w+(l.bbox.w*He.SUB_SUP_SCALE-e.chld[t].bbox.w)/2)}else l.bbox.x=e.chld[t].bbox.x+e.chld[t].bbox.w,n=Math.max(n,l.bbox.x+l.bbox.w*He.SUB_SUP_SCALE)}else n+=l.bbox.w;"text"==t&&(n+=1),a=Math.max(l.bbox.y+l.bbox.h-o,a)}else n+=c}else o+=a,n=0,a=1}o+=a;const l={bmatrix:["[","]"],pmatrix:["(",")"],Bmatrix:["\\{","\\}"],cases:["\\{"]},c=null!=(i={bmatrix:"center",pmatrix:"center",Bmatrix:"center",cases:"left",matrix:"center",aligned:"equation"}[e.text])?i:"left",u=!!l[e.text],h=!!l[e.text]&&l[e.text].length>1;Qe(e.chld,c);const d=je(e.chld);"\\text"==e.text&&(d.x-=1,d.w+=2);for(let t=0;t<e.chld.length;t++)Xe(e.chld[t],1,null,-d.x+(u?1.5:0),-d.y);e.bbox={x:0,y:0,w:d.w+1.5*Number(u)+1.5*Number(h),h:d.h},u&&e.chld.unshift({type:"symb",text:l[e.text][0],mode:e.mode,chld:[],bbox:{x:0,y:0,w:1,h:d.h}}),h&&e.chld.push({type:"symb",text:l[e.text][1],mode:e.mode,chld:[],bbox:{x:d.w+2,y:0,w:1,h:d.h}}),(u||h||"matrix"==e.text)&&(e.type="node",e.text="",e.bbox.y-=(e.bbox.h-2)/2)}else{if(Fe[e.text])if(Fe[e.text].flags.big)"\\lim"==e.text?e.bbox={x:0,y:0,w:3.5,h:2}:e.bbox={x:0,y:-.5,w:3,h:3};else if(Fe[e.text].flags.txt){let t=0;for(let n=1;n<e.text.length;n++)t+=Pe(Ye(e.text[n],"text")).w;t/=16,e.bbox={x:0,y:0,w:t,h:2}}else if(Fe[e.text].glyph){let t=Pe(Fe[e.text].glyph).w;t/=16,"\\int"==e.text||"\\oint"==e.text?e.bbox={x:0,y:-1.5,w:t,h:5}:e.bbox={x:0,y:0,w:t,h:2}}else e.bbox={x:0,y:0,w:1,h:2};else{let t=0;for(let n=0;n<e.text.length;n++)Pe(Ye(e.text[n],s))&&(t+="tt"==s?16:Pe(Ye(e.text[n],s)).w);t/=16,e.bbox={x:0,y:0,w:t,h:2}}e.mode=s}}function Ge(e){function t(e,n,r){const i=[];if(e.bbox)if(n+=e.bbox.x,r+=e.bbox.y,"\\frac"==e.text){const t=e.chld[1].bbox.y-(e.chld[0].bbox.y+e.chld[0].bbox.h),s={type:"symb",mode:e.mode,text:"\\bar",bbox:{x:n,y:r+(e.chld[1].bbox.y-t/2)-t/2,w:e.bbox.w,h:t},chld:[]};i.push(s)}else if("\\sqrt"==e.text){const t=e.chld[0].bbox.y,s=Math.max(0,e.chld[0].bbox.x-e.chld[0].bbox.h/2),o={type:"symb",mode:e.mode,text:"\\sqrt",bbox:{x:n+s,y:r+t/2,w:e.chld[0].bbox.x-s,h:e.bbox.h-t/2},chld:[]};i.push(o),i.push({type:"symb",text:"\\bar",mode:e.mode,bbox:{x:n+e.chld[0].bbox.x,y:r,w:e.bbox.w-e.chld[0].bbox.x,h:t},chld:[]})}else if("\\binom"==e.text){const t=Math.min(e.chld[0].bbox.x,e.chld[1].bbox.x),s={type:"symb",mode:e.mode,text:"(",bbox:{x:n,y:r,w:t,h:e.bbox.h},chld:[]};i.push(s),i.push({type:"symb",text:")",mode:e.mode,bbox:{x:n+e.bbox.w-t,y:r,w:t,h:e.bbox.h},chld:[]})}else if(Fe[e.text]&&Fe[e.text].flags.hat){const t=e.chld[0].bbox.y,s={type:"symb",mode:e.mode,text:e.text,bbox:{x:n,y:r,w:e.bbox.w,h:t},chld:[]};i.push(s)}else if(Fe[e.text]&&Fe[e.text].flags.mat){const t=e.chld[0].bbox.h,s={type:"symb",text:e.text,mode:e.mode,bbox:{x:n,y:r+t,w:e.bbox.w,h:e.bbox.h-t},chld:[]};i.push(s)}else if("node"!=e.type&&"^"!=e.text&&"_"!=e.text){const t={type:"func"==e.type?"symb":e.type,text:e.text,mode:e.mode,bbox:{x:n,y:r,w:e.bbox.w,h:e.bbox.h},chld:[]};i.push(t)}for(let s=0;s<e.chld.length;s++){const o=t(e.chld[s],n,r);i.push(...o)}return i}const n=t(e,-e.bbox.x,-e.bbox.y);e.type="node",e.text="",e.chld=n}function Be(e){const t=[];for(let n=0;n<e.chld.length;n++){const r=e.chld[n];let i=r.bbox.h/2,s=!1;if(Fe[r.text]&&Fe[r.text].flags.hat&&!Fe[r.text].flags.xfl&&!Fe[r.text].flags.yfl&&(i*=4,s=!0),Fe[r.text]&&Fe[r.text].glyph){const e=Pe(Fe[r.text].glyph);for(let n=0;n<e.polylines.length;n++){const o=[];for(let t=0;t<e.polylines[n].length;t++){let a=e.polylines[n][t][0],l=e.polylines[n][t][1];if(Fe[r.text].flags.xfl)a=(a-e.xmin)/Math.max(e.xmax-e.xmin,1)*r.bbox.w,a+=r.bbox.x;else if(e.w/16*i>r.bbox.w)a=a/Math.max(e.w,1)*r.bbox.w,a+=r.bbox.x;else{a=a/16*i;const t=(r.bbox.w-e.w/16*i)/2;a+=r.bbox.x+t}if(Fe[r.text].flags.yfl)l=(l-e.ymin)/Math.max(e.ymax-e.ymin,1)*r.bbox.h,l+=r.bbox.y;else{if(l=l/16*i,s){const t=(e.ymax+e.ymin)/2;l-=t/16*i}l+=r.bbox.y+r.bbox.h/2}o.push([a,l])}t.push(o)}}else if(Fe[r.text]&&Fe[r.text].flags.txt||"char"==r.type){let e=r.bbox.x;const n=!(!Fe[r.text]||!Fe[r.text].flags.txt);for(let s=Number(n);s<r.text.length;s++){const o=Pe(Ye(r.text[s],n?"text":r.mode));if(o){for(let n=0;n<o.polylines.length;n++){const s=[];for(let t=0;t<o.polylines[n].length;t++){let a=o.polylines[n][t][0],l=o.polylines[n][t][1];a/=16,l/=16,a*=i,l*=i,"tt"==r.mode&&(o.w>16?a*=16/o.w:a+=(16-o.w)/2/16),a+=e,l+=r.bbox.y+r.bbox.h/2,s.push([a,l])}t.push(s)}"tt"==r.mode?e+=i:e+=o.w/16*i}else console.warn("unmapped character: "+r.text[s])}}}return t}function Je(e){return Math.round(100*e)/100}class ze{constructor(e){d(this,"_latex"),d(this,"_tree"),d(this,"_tokens"),d(this,"_polylines"),this._latex=e,this._tokens=ke(e),this._tree=Ue(this._tokens),We(this._tree.chld),Ke(this._tree),Ge(this._tree),this._polylines=Be(this._tree)}resolveScale(e){var t,n,r,i;if(void 0==e)return[16,16,16,16];let s=null!=(t=e.SCALE_X)?t:16,o=null!=(n=e.SCALE_Y)?n:16;if(void 0!=e.MIN_CHAR_H){let t=0;for(let e=0;e<this._tree.chld.length;e++){const n=this._tree.chld[e];("char"==n.type||Fe[n.text]&&(Fe[n.text].flags.txt||!Object.keys(Fe[n.text].flags).length))&&(t=Math.min(n.bbox.h,t))}const n=Math.max(1,e.MIN_CHAR_H/t);s*=n,o*=n}if(void 0!=e.MAX_W){const t=s;s=Math.min(s,e.MAX_W/this._tree.bbox.w),o*=s/t}if(void 0!=e.MAX_H){const t=o;o=Math.min(o,e.MAX_H/this._tree.bbox.h),s*=o/t}const a=null!=(r=e.MARGIN_X)?r:s,l=null!=(i=e.MARGIN_Y)?i:o;return[a,l,s,o]}polylines(e){e||(e={});const t=[],[n,r,i,s]=this.resolveScale(e);for(let o=0;o<this._polylines.length;o++){t.push([]);for(let e=0;e<this._polylines[o].length;e++){const[a,l]=this._polylines[o][e];t[t.length-1].push([n+a*i,r+l*s])}}return t}pathd(e){e||(e={});let t="";const[n,r,i,s]=this.resolveScale(e);for(let o=0;o<this._polylines.length;o++)for(let e=0;e<this._polylines[o].length;e++){const[a,l]=this._polylines[o][e];t+=e?"L":"M",t+=`${Je(n+a*i)} ${Je(r+l*s)}`}return t}svg(e){var t,n;e||(e={});const[r,i,s,o]=this.resolveScale(e),a=Je(this._tree.bbox.w*s+2*r),l=Je(this._tree.bbox.h*o+2*i);let c=`<svg\n xmlns="http://www.w3.org/2000/svg"\n width="${a}" height="${l}"\n fill="none" stroke="${null!=(t=e.FG_COLOR)?t:"black"}" stroke-width="${null!=(n=e.STROKE_W)?n:1}"\n stroke-linecap="round" stroke-linejoin="round"\n >`;e.BG_COLOR&&(c+=`<rect x="0" y="0" width="${a}" height="${l}" fill="${e.BG_COLOR}" stroke="none"></rect>`),c+='<path d="';for(let u=0;u<this._polylines.length;u++){c+="M";for(let e=0;e<this._polylines[u].length;e++){const[t,n]=this._polylines[u][e];c+=Je(r+t*s)+" "+Je(i+n*o)+" "}}return c+='"/>',c+="</svg>",{svg:"data:image/svg+xml;base64,"+window.btoa(c),width:Math.ceil(a),height:Math.ceil(l)}}pdf(e){var t;e||(e={});const[n,r,i,s]=this.resolveScale(e),o=Je(this._tree.bbox.w*i+2*n),a=Je(this._tree.bbox.h*s+2*r);let l=`%PDF-1.1\n%%¥±ë\n1 0 obj\n<< /Type /Catalog\n/Pages 2 0 R\n>>endobj\n 2 0 obj\n<< /Type /Pages\n/Kids [3 0 R]\n/Count 1\n/MediaBox [0 0 ${o} ${a}]\n>>\nendobj\n 3 0 obj\n<< /Type /Page\n/Parent 2 0 R\n/Resources\n<< /Font\n<< /F1\n<< /Type /Font\n /Subtype /Type1\n/BaseFont /Times-Roman\n>>\n>>\n>>\n/Contents [`,c="",u=4;for(let h=0;h<this._polylines.length;h++){c+=`${u} 0 obj \n<< /Length 0 >>\n stream\n 1 j 1 J ${null!=(t=e.STROKE_W)?t:1} w\n`;for(let e=0;e<this._polylines[h].length;e++){const[t,o]=this._polylines[h][e];c+=`${Je(n+t*i)} ${Je(a-(r+o*s))} ${e?"l":"m"} `}c+="\nS\nendstream\nendobj\n",l+=u+" 0 R ",u++}return l+="]\n>>\nendobj\n",c+="\ntrailer\n<< /Root 1 0 R \n /Size 0\n >>startxref\n\n%%EOF\n",l+c}boxes(e){e||(e={});const[t,n,r,i]=this.resolveScale(e),s=[];for(let o=0;o<this._tree.chld.length;o++){const{x:e,y:a,w:l,h:c}=this._tree.chld[o].bbox;s.push({x:t+e*r,y:n+a*i,w:l*r,h:c*i})}return s}box(e){e||(e={});const[t,n,r,i]=this.resolveScale(e);return{x:t+this._tree.bbox.x*r,y:n+this._tree.bbox.y*i,w:this._tree.bbox.w*r,h:this._tree.bbox.h*i}}}class $e extends _e{static convertLaTextToSVG(e){return new ze(e).svg({SCALE_X:10,SCALE_Y:10,MARGIN_X:0,MARGIN_Y:0})}render(e,t,n,r){const{scale:i}=this.options,s=t.width*i,o=t.height*i;if(this.imageCache.has(t.value)){const i=this.imageCache.get(t.value);e.drawImage(i,n,r,s,o)}else{const i=new Promise((i,a)=>{const l=new Image;l.src=t.laTexSVG,l.onload=()=>{e.drawImage(l,n,r,s,o),this.imageCache.set(t.value,l),i(t)},l.onerror=e=>{a(e)}});this.addImageObserver(i)}}}var qe,et,tt,nt;(function(e){e["UL"]="ul",e["OL"]="ol"})(qe||(qe={})),function(e){e["DISC"]="disc",e["CIRCLE"]="circle",e["SQUARE"]="square",e["CHECKBOX"]="checkbox"}(et||(et={})),function(e){e["DECIMAL"]="decimal"}(tt||(tt={})),function(e){e["DISC"]="disc",e["CIRCLE"]="circle",e["SQUARE"]="square",e["DECIMAL"]="decimal",e["CHECKBOX"]="checkbox"}(nt||(nt={}));const rt={[et.DISC]:"•",[et.CIRCLE]:"◦",[et.SQUARE]:"▫︎",[et.CHECKBOX]:"☑️"},it={[qe.OL]:"ol",[qe.UL]:"ul"},st={[nt.DISC]:"disc",[nt.CIRCLE]:"circle",[nt.SQUARE]:"square",[nt.DECIMAL]:"decimal",[nt.CHECKBOX]:"checkbox"};var ot;(function(e){e["FIRST"]="first",e["SECOND"]="second",e["THIRD"]="third",e["FOURTH"]="fourth",e["FIFTH"]="fifth",e["SIXTH"]="sixth"})(ot||(ot={}));const at={defaultFirstSize:26,defaultSecondSize:24,defaultThirdSize:22,defaultFourthSize:20,defaultFifthSize:18,defaultSixthSize:16},lt={[ot.FIRST]:"defaultFirstSize",[ot.SECOND]:"defaultSecondSize",[ot.THIRD]:"defaultThirdSize",[ot.FOURTH]:"defaultFourthSize",[ot.FIFTH]:"defaultFifthSize",[ot.SIXTH]:"defaultSixthSize"},ct={[ot.FIRST]:1,[ot.SECOND]:2,[ot.THIRD]:3,[ot.FOURTH]:4,[ot.FIFTH]:5,[ot.SIXTH]:6},ut={H1:ot.FIRST,H2:ot.SECOND,H3:ot.THIRD,H4:ot.FOURTH,H5:ot.FIFTH,H6:ot.SIXTH};var ht,dt,mt,gt,pt,ft;(function(e){e["TEXT"]="text",e["SELECT"]="select",e["CHECKBOX"]="checkbox",e["RADIO"]="radio",e["DATE"]="date",e["NUMBER"]="number"})(ht||(ht={})),function(e){e["PREFIX"]="prefix",e["POSTFIX"]="postfix",e["PRE_TEXT"]="preText",e["POST_TEXT"]="postText",e["PLACEHOLDER"]="placeholder",e["VALUE"]="value",e["CHECKBOX"]="checkbox",e["RADIO"]="radio"}(dt||(dt={})),function(e){e["ROW_START"]="rowStart",e["VALUE_START"]="valueStart"}(mt||(mt={})),function(e){e["ACTIVE"]="active",e["INACTIVE"]="inactive"}(gt||(gt={})),function(e){e["CONTAIN"]="contain",e["COVER"]="cover"}(pt||(pt={})),function(e){e["REPEAT"]="repeat",e["NO_REPEAT"]="no-repeat",e["REPEAT_X"]="repeat-x",e["REPEAT_Y"]="repeat-y"}(ft||(ft={}));const Rt={color:"#FFFFFF",image:"",size:pt.COVER,repeat:ft.NO_REPEAT,applyPageNumbers:[]};var yt;(function(e){e["TOP"]="top",e["MIDDLE"]="middle",e["BOTTOM"]="bottom"})(yt||(yt={}));const Mt={width:14,height:14,gap:5,lineWidth:1,fillStyle:"#5175f4",strokeStyle:"#ffffff",verticalAlign:yt.BOTTOM},St={placeholderColor:"#9c9b9b",bracketColor:"#000000",prefix:"{",postfix:"}",borderWidth:1,borderColor:"#000000",activeBackgroundColor:""},bt={bottom:30,maxHeightRadio:g.HALF,disabled:!1,editable:!0},wt={opacity:.1,backgroundColor:"#E99D00",activeOpacity:.5,activeBackgroundColor:"#E99D00",disabled:!1},Tt={top:30,maxHeightRadio:g.HALF,disabled:!1,editable:!0},Ot={disabled:!0,color:"#CCCCCC",lineWidth:1.5},vt={font:"Microsoft YaHei",fontSize:12,lineDash:[3,1]},Et={PAGE_NO:"{pageNo}",PAGE_COUNT:"{pageCount}"},Ct={bottom:60,size:12,font:"Microsoft YaHei",color:"#000000",rowFlex:C.CENTER,format:Et.PAGE_NO,numberType:p.ARABIC,disabled:!1,startPageNo:1,fromPageNo:0,maxPageNo:null},Lt={data:"",color:"#DCDFE6",opacity:1,size:16,font:"Microsoft YaHei"},Nt={width:14,height:14,gap:5,lineWidth:1,fillStyle:"#5175f4",strokeStyle:"#000000",verticalAlign:yt.BOTTOM},_t={lineWidth:1,strokeStyle:"#000000"},It={tdPadding:[0,5,5,5],defaultTrMinHeight:42,defaultColMinWidth:40,defaultBorderColor:"#000000"},Pt={data:"",color:"#AEB5C0",opacity:.3,size:200,font:"Microsoft YaHei",repeat:!1,gap:[10,10]},xt={tipDisabled:!0};var Dt;(function(e){e["PAGE"]="page",e["CONTINUITY"]="continuity"})(Dt||(Dt={}));const At={size:12,font:"Microsoft YaHei",color:"#000000",disabled:!0,right:20,type:Dt.CONTINUITY},Ft={color:"#000000",lineWidth:1,padding:[0,5,0,5],disabled:!0};var Yt,Ht,kt,Vt,Ut,Wt,Xt,jt;(function(e){e["COMPONENT"]="component",e["MENU"]="menu",e["MAIN"]="main",e["FOOTER"]="footer",e["CONTEXTMENU"]="contextmenu",e["POPUP"]="popup",e["CATALOG"]="catalog",e["COMMENT"]="comment"})(Yt||(Yt={})),function(e){e["PAGE"]="page",e["TABLE"]="table"}(Ht||(Ht={})),function(e){e["EDIT"]="edit",e["CLEAN"]="clean",e["READONLY"]="readonly",e["FORM"]="form",e["PRINT"]="print",e["DESIGN"]="design"}(kt||(kt={})),function(e){e["HEADER"]="header",e["MAIN"]="main",e["FOOTER"]="footer"}(Vt||(Vt={})),function(e){e["PAGING"]="paging",e["CONTINUITY"]="continuity"}(Ut||(Ut={})),function(e){e["VERTICAL"]="vertical",e["HORIZONTAL"]="horizontal"}(Wt||(Wt={})),function(e){e["BREAK_ALL"]="break-all",e["BREAK_WORD"]="break-word"}(Xt||(Xt={})),function(e){e["SPEED"]="speed",e["COMPATIBILITY"]="compatibility"}(jt||(jt={}));const Zt={top:0,left:5};function Qt(e={}){const t=u(u({},It),e.table),n=u(u({},Tt),e.header),r=u(u({},bt),e.footer),i=u(u({},Ct),e.pageNumber),s=u(u({},Pt),e.watermark),o=u(u({},St),e.control),a=u(u({},Mt),e.checkbox),l=u(u({},Nt),e.radio),c=u(u({},ae),e.cursor),d=u(u({},at),e.title),m=u(u({},Lt),e.placeholder),g=u(u({},wt),e.group),p=u(u({},vt),e.pageBreak),f=u(u({},xt),e.zone),R=u(u({},Rt),e.background),y=u(u({},Ot),e.lineBreak),M=u(u({},_t),e.separator),S=u(u({},At),e.lineNumber),b=u(u({},Ft),e.pageBorder),w=u(u({},Zt),e.badge);return h(u({mode:kt.EDIT,defaultType:"TEXT",defaultColor:"#000000",defaultFont:"Microsoft YaHei",defaultSize:16,minSize:5,maxSize:72,defaultRowMargin:1,defaultBasicRowMarginHeight:8,defaultTabWidth:32,width:794,height:1123,scale:1,pageGap:20,underlineColor:"#000000",strikeoutColor:"#FF0000",rangeAlpha:.6,rangeColor:"#AECBFA",rangeMinWidth:5,searchMatchAlpha:.6,searchMatchColor:"#FFFF00",searchNavigateMatchColor:"#AAD280",highlightAlpha:.6,resizerColor:"#4182D9",resizerSize:5,marginIndicatorSize:35,marginIndicatorColor:"#BABABA",margins:[100,120,100,120],pageMode:Ut.PAGING,renderMode:jt.SPEED,defaultHyperlinkColor:"#0000FF",paperDirection:Wt.VERTICAL,inactiveAlpha:.6,historyMaxRecordCount:100,wordBreak:Xt.BREAK_WORD,printPixelRatio:3,maskMargin:[0,0,0,0],letterClass:[v.ENGLISH],contextMenuDisableKeys:[],scrollContainerSelector:""},e),{table:t,header:n,footer:r,pageNumber:i,watermark:s,control:o,checkbox:a,radio:l,cursor:c,title:d,placeholder:m,group:g,pageBreak:p,zone:f,background:R,lineBreak:y,separator:M,lineNumber:S,pageBorder:b,badge:w})}function Kt(e){const t=[];for(let n=0;n<e.length;n++){const r=e[n],i=U(r.value);for(let e=0;e<i.length;e++)t.push(h(u({},r),{value:i[e]}))}return t}function Gt(e,t){var n;const{isHandleFirstElement:r=!0,isForceCompensation:i=!1,editorOptions:s}=t,o=e[0];(i||r&&(null==o?void 0:o.type)!==de.LIST&&((null==o?void 0:o.type)&&o.type!==de.TEXT||!x.test(null==o?void 0:o.value)))&&e.unshift({value:M});let a=0;while(a<e.length){let r=e[a];if(r.type===de.TITLE){e.splice(a,1);const n=r.valueList||[];if(Gt(n,h(u({},t),{isHandleFirstElement:!1,isForceCompensation:!1})),n.length){const t=r.titleId||V(),i=s.title;for(let s=0;s<n.length;s++){const o=n[s];o.title=r.title,r.level&&(o.titleId=t,o.level=r.level),tn(o)&&(o.size||(o.size=i[lt[o.level]]),void 0===o.bold&&(o.bold=!0)),e.splice(a,0,o),a++}}a--}else if(r.type===de.LIST){e.splice(a,1);const n=r.valueList||[];if(Gt(n,h(u({},t),{isHandleFirstElement:!0,isForceCompensation:!1})),n.length){const t=V();for(let i=0;i<n.length;i++){const s=n[i];s.listId=t,s.listType=r.listType,s.listStyle=r.listStyle,e.splice(a,0,s),a++}}a--}else if(r.type===de.AREA){e.splice(a,1);const n=(null==r?void 0:r.valueList)||[];if(Gt(n,h(u({},t),{isHandleFirstElement:!1,isForceCompensation:!1})),n.length){const t=V();for(let i=0;i<n.length;i++){const s=n[i];if(s.areaId=r.areaId||t,s.area=r.area,s.type===de.TABLE){const e=s.trList;for(let n=0;n<e.length;n++){const i=e[n];for(let e=0;e<i.tdList.length;e++){const n=i.tdList[e],s=n.value;for(let e=0;e<s.length;e++){const n=s[e];n.areaId=r.areaId||t,n.area=r.area}}}}e.splice(a,0,s),a++}}a--}else if(r.type===de.TABLE){const e=r.id||V();if(r.id=e,r.trList){const{defaultTrMinHeight:n}=s.table;for(let i=0;i<r.trList.length;i++){const s=r.trList[i],o=s.id||V();s.id=o,(!s.minHeight||s.minHeight<n)&&(s.minHeight=n),s.height<s.minHeight&&(s.height=s.minHeight);for(let n=0;n<s.tdList.length;n++){const r=s.tdList[n],i=r.id||V();r.id=i,Gt(r.value,h(u({},t),{isHandleFirstElement:!0,isForceCompensation:!0}));for(let t=0;t<r.value.length;t++){const n=r.value[t];n.tdId=i,n.trId=o,n.tableId=e}}}}}else if(r.type===de.HYPERLINK){e.splice(a,1);const t=Kt(r.valueList||[]);if(t.length){const n=V();for(let i=0;i<t.length;i++){const s=t[i];s.type=r.type,s.url=r.url,s.hyperlinkId=n,e.splice(a,0,s),a++}}a--}else if(r.type===de.DATE){e.splice(a,1);const t=Kt(r.valueList||[]);if(t.length){const n=V();for(let i=0;i<t.length;i++){const s=t[i];s.type=r.type,s.dateFormat=r.dateFormat,s.dateId=n,e.splice(a,0,s),a++}}a--}else if(r.type===de.CONTROL){if(!r.control){a++;continue}const{prefix:n,postfix:i,preText:o,postText:l,value:c,placeholder:d,code:m,type:g,valueSets:p}=r.control,{editorOptions:{control:f,checkbox:R,radio:y}}=t,S=r.controlId||V();e.splice(a,1);const b=z(r,[...Oe,...ge]),w=z(r.control,we),T=h(u({},w),{color:s.control.bracketColor}),O=U(n||f.prefix);for(let t=0;t<O.length;t++){const n=O[t];e.splice(a,0,h(u(u({},b),T),{controlId:S,value:n,type:r.type,control:r.control,controlComponent:dt.PREFIX})),a++}if(o){const t=U(o);for(let n=0;n<t.length;n++){const i=t[n];e.splice(a,0,h(u(u({},b),w),{controlId:S,value:i,type:r.type,control:r.control,controlComponent:dt.PRE_TEXT})),a++}}if(c&&c.length||g===ht.CHECKBOX||g===ht.RADIO||g===ht.SELECT&&m&&(!c||!c.length)){let n=c||[];if(g===ht.CHECKBOX){const t=m?m.split(","):[];if(Array.isArray(p)&&p.length){const i=n.reduce((e,t)=>e.concat(t.value.split("").map(e=>h(u({},t),{value:e}))),[]);let s=0;for(let n=0;n<p.length;n++){const o=p[n];e.splice(a,0,h(u(u({},b),w),{controlId:S,value:"",type:r.type,control:r.control,controlComponent:dt.CHECKBOX,checkbox:{code:o.code,value:t.includes(o.code)}})),a++;const l=U(o.value);for(let t=0;t<l.length;t++){const n=l[t],o=t===l.length-1;e.splice(a,0,h(u(u(u({},b),w),i[s]),{controlId:S,value:"\n"===n?M:n,letterSpacing:o?R.gap:0,control:r.control,controlComponent:dt.VALUE})),s++,a++}}}}else if(g===ht.RADIO){if(Array.isArray(p)&&p.length){const t=n.reduce((e,t)=>e.concat(t.value.split("").map(e=>h(u({},t),{value:e}))),[]);let i=0;for(let n=0;n<p.length;n++){const s=p[n];e.splice(a,0,h(u(u({},b),w),{controlId:S,value:"",type:r.type,control:r.control,controlComponent:dt.RADIO,radio:{code:s.code,value:m===s.code}})),a++;const o=U(s.value);for(let n=0;n<o.length;n++){const s=o[n],l=n===o.length-1;e.splice(a,0,h(u(u(u({},b),w),t[i]),{controlId:S,value:"\n"===s?M:s,letterSpacing:l?y.gap:0,control:r.control,controlComponent:dt.VALUE})),i++,a++}}}}else{if((!c||!c.length)&&Array.isArray(p)&&p.length){const e=p.find(e=>e.code===m);e&&(n=[{value:e.value}])}Gt(n,h(u({},t),{isHandleFirstElement:!1,isForceCompensation:!1}));for(let t=0;t<n.length;t++){const i=n[t],s=i.value;e.splice(a,0,h(u(u(u({},b),w),i),{controlId:S,value:"\n"===s?M:s,type:i.type||de.TEXT,control:r.control,controlComponent:dt.VALUE})),a++}}}else if(d){const t=h(u({},w),{color:s.control.placeholderColor}),n=U(d);for(let i=0;i<n.length;i++){const s=n[i];e.splice(a,0,h(u(u({},b),t),{controlId:S,value:"\n"===s?M:s,type:r.type,control:r.control,controlComponent:dt.PLACEHOLDER})),a++}}if(l){const t=U(l);for(let n=0;n<t.length;n++){const i=t[n];e.splice(a,0,h(u(u({},b),w),{controlId:S,value:i,type:r.type,control:r.control,controlComponent:dt.POST_TEXT})),a++}}const v=U(i||f.postfix);for(let t=0;t<v.length;t++){const n=v[t];e.splice(a,0,h(u(u({},b),T),{controlId:S,value:n,type:r.type,control:r.control,controlComponent:dt.POSTFIX})),a++}a--}else if((!r.type||ve.includes(r.type))&&(null==(n=r.value)?void 0:n.length)>1){e.splice(a,1);const t=U(r.value);for(let n=0;n<t.length;n++)e.splice(a+n,0,h(u({},r),{value:t[n]}));r=e[a]}if("\n"!==r.value&&"\r\n"!=r.value||(r.value=M),r.type!==de.IMAGE&&r.type!==de.BLOCK||(r.id=r.id||V()),r.type===de.LATEX){const{svg:e,width:t,height:n}=$e.convertLaTextToSVG(r.value);r.width=r.width||t,r.height=r.height||n,r.laTexSVG=e,r.id=r.id||V()}a++}}function Bt(e,t){const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(let i=0;i<n.length;i++){const r=n[i];if("value"!==r&&(!("groupIds"===r&&Array.isArray(e[r])&&Array.isArray(t[r])&&te(e[r],t[r]))&&e[r]!==t[r]))return!1}return!0}function Jt(e,t={}){const{extraPickAttrs:n}=t,r=fe;n&&r.push(...n);const i={value:e.value===M?"\n":e.value};return r.forEach(t=>{const n=e[t];void 0!==n&&(i[t]=n)}),i}function zt(e,t={}){const{extraPickAttrs:n,isClassifyArea:r=!1}=t,i=Y(e),s=[];let o=0;while(o<i.length){let e=i[o];if(0===o&&e.value===M&&!e.listId&&(!e.type||e.type===de.TEXT)){o++;continue}if(e.titleId&&e.level){const n=e.titleId;if(n){const r=e.level,s={type:de.TITLE,title:e.title,titleId:n,value:"",level:r},a=[];while(o<i.length){const e=i[o];if(n!==e.titleId){o--;break}delete e.level,delete e.title,a.push(e),o++}s.valueList=zt(a,t),e=s}}else if(e.listId&&e.listType){const n=e.listId;if(n){const r=e.listType,s=e.listStyle,a={type:de.LIST,value:"",listId:n,listType:r,listStyle:s},l=[];while(o<i.length){const e=i[o];if(n!==e.listId){o--;break}delete e.listType,delete e.listStyle,l.push(e),o++}a.valueList=zt(l,t),e=a}}else if(e.areaId&&e.area){const n=e.areaId,a=e.area,l=[];while(o<i.length){const e=i[o];if(n!==e.areaId){o--;break}delete e.area,delete e.areaId,l.push(e),o++}const c=zt(l,t);if(!r){s.splice(o,0,...c);continue}{const t={type:de.AREA,value:"",areaId:n,area:a};t.valueList=c,e=t}}else if(e.type===de.TABLE){if(e.pagingId){let t=o+1,n=0;while(t<i.length){const r=i[t];if(r.pagingId!==e.pagingId)break;e.height+=r.height,e.trList.push(...r.trList),t++,n++}o+=n}if(e.trList)for(let n=0;n<e.trList.length;n++){const r=e.trList[n];delete r.id;for(let e=0;e<r.tdList.length;e++){const n=r.tdList[e],i={colspan:n.colspan,rowspan:n.rowspan,value:zt(n.value,h(u({},t),{isClassifyArea:!1}))};Re.forEach(e=>{const t=n[e];void 0!==t&&(i[e]=t)}),r.tdList[e]=i}}}else if(e.type===de.HYPERLINK){const n=e.hyperlinkId;if(n){const r={type:de.HYPERLINK,value:"",url:e.url},s=[];while(o<i.length){const e=i[o];if(n!==e.hyperlinkId){o--;break}delete e.type,delete e.url,s.push(e),o++}r.valueList=zt(s,t),e=r}}else if(e.type===de.DATE){const n=e.dateId;if(n){const r={type:de.DATE,value:"",dateFormat:e.dateFormat},s=[];while(o<i.length){const e=i[o];if(n!==e.dateId){o--;break}delete e.type,delete e.dateFormat,s.push(e),o++}r.valueList=zt(s,t),e=r}}else if(e.controlId){const r=e.controlId;if(e.controlComponent===dt.PREFIX){const s=[];let a=!1,l=o;while(l<i.length){const e=i[l];if(r!==e.controlId)break;e.controlComponent===dt.VALUE&&(delete e.control,delete e.controlId,s.push(e)),e.controlComponent===dt.POSTFIX&&(a=!0),l++}if(a){const i=z(e,we),a=u(u({},e.control),i),c=h(u({},z(e,ge)),{type:de.CONTROL,value:"",control:a,controlId:r});c.control.value=zt(s,t),e=Jt(c,{extraPickAttrs:n}),o+=l-o-1}}if(e.controlComponent&&(delete e.control,delete e.controlId,e.controlComponent!==dt.VALUE&&e.controlComponent!==dt.PRE_TEXT&&e.controlComponent!==dt.POST_TEXT)){o++;continue}}const a=Jt(e,{extraPickAttrs:n});if(e.type&&e.type!==de.TEXT&&e.type!==de.SUBSCRIPT&&e.type!==de.SUPERSCRIPT)o++;else while(o<i.length){const e=i[o+1];if(o++,!e||!Bt(a,Jt(e,{extraPickAttrs:n})))break;{const t=e.value===M?"\n":e.value;a.value+=t}}s.push(a)}return s}function $t(e){const t=window.getComputedStyle(e).textAlign;switch(t){case"left":case"start":return C.LEFT;case"center":return C.CENTER;case"right":case"end":return C.RIGHT;case"justify":return C.ALIGNMENT;case"justify-all":return C.JUSTIFY;default:return C.LEFT}}function qt(e){return e===C.ALIGNMENT?"justify":e}function en(e){switch(e){case C.LEFT:return"flex-start";case C.CENTER:return"center";case C.RIGHT:return"flex-end";case C.ALIGNMENT:case C.JUSTIFY:return"space-between";default:return"flex-start"}}function tn(e){return!e.type||ve.includes(e.type)}function nn(e,t){const n=e[t];if(!n)return null;const r=e[t+1];return!n.listId&&n.value===M&&r&&r.value!==M&&n.areaId===r.areaId?r:n}function rn(e,t,n,r){var i,s,o;let a=nn(e,n);if(!a)return;const{isBreakWhenWrap:l=!1,editorOptions:c}=r||{},{mode:u}=c||{};u!==kt.DESIGN&&(null==(i=a.title)?void 0:i.disabled)&&(a=$(a,Me));let h=!1;for(let d=0;d<t.length;d++){const i=t[d];if(l&&!a.listId&&x.test(i.value)&&(h=!0),h||!a.listId&&i.type===de.LIST){const e=[...ye,...ge,...Te];J(e,a,i),null==(s=i.valueList)||s.forEach(t=>{J(e,a,t)});continue}(null==(o=i.valueList)?void 0:o.length)&&rn(e,i.valueList,n,r);const c=[...Oe];mn(i)||c.push(...ge),J(c,a,i)}}function sn(e,t){let n="span";e.type===de.SUPERSCRIPT?n="sup":e.type===de.SUBSCRIPT&&(n="sub");const r=document.createElement(n);return r.style.fontFamily=e.font||t.defaultFont,e.rowFlex&&(r.style.textAlign=qt(e.rowFlex)),e.color&&(r.style.color=e.color),e.bold&&(r.style.fontWeight="600"),e.italic&&(r.style.fontStyle="italic"),r.style.fontSize=(e.size||t.defaultSize)+"px",e.highlight&&(r.style.backgroundColor=e.highlight),e.underline&&(r.style.textDecoration="underline"),e.strikeout&&(r.style.textDecoration+=" line-through"),r.innerText=e.value.replace(new RegExp(""+M,"g"),"\n"),r}function on(e){let t=0;const n=new Map;for(let r=0;r<e.length;r++){const i=e[r];if(0===r){if(i.checkbox)continue;i.value=i.value.replace(x,"")}if(i.listWrap){const e=n.get(t)||[];e.push(i),n.set(t,e)}else{const e=i.value.split("\n");for(let r=0;r<e.length;r++){r>0&&(t+=1);const s=e[r],o=n.get(t)||[];o.push(h(u({},i),{value:s})),n.set(t,o)}}}return n}function an(e){var t;const n=[];if(!e.length)return n;let r=(null==(t=e[0])?void 0:t.rowFlex)||null;n.push({rowFlex:r,data:[e[0]]});for(let i=1;i<e.length;i++){const t=e[i],s=t.rowFlex||null;if(r!==s||mn(t)||mn(e[i-1]))n.push({rowFlex:s,data:[t]}),r=s;else{const e=n[n.length-1];e.data.push(t)}}for(let i=0;i<n.length;i++){const e=n[i];e.data=zt(e.data)}return n}function ln(e,t){const n=Qt(t);function r(e){var i,s,o,a,l,c,u,h,d;const m=document.createElement("div");for(let g=0;g<e.length;g++){const p=e[g];if(p.type===de.TABLE){const e=document.createElement("table");e.setAttribute("cellSpacing","0"),e.setAttribute("cellpadding","0"),e.setAttribute("border","0");const n="1px solid #000000";p.borderType&&p.borderType!==yr.ALL?p.borderType===yr.EXTERNAL&&(e.style.border=n):(e.style.borderTop=n,e.style.borderLeft=n),e.style.width=p.width+"px";const r=document.createElement("colgroup");for(let t=0;t<p.colgroup.length;t++){const e=p.colgroup[t],n=document.createElement("col");n.setAttribute("width",""+e.width),r.append(n)}e.append(r);const l=p.trList;for(let c=0;c<l.length;c++){const r=document.createElement("tr"),u=l[c];r.style.height=u.height+"px";for(let e=0;e<u.tdList.length;e++){const l=document.createElement("td");p.borderType&&p.borderType!==yr.ALL||(l.style.borderBottom=l.style.borderRight="1px solid");const c=u.tdList[e];l.colSpan=c.colspan,l.rowSpan=c.rowspan,l.style.verticalAlign=c.verticalAlign||"top",(null==(i=c.borderTypes)?void 0:i.includes(Mr.TOP))&&(l.style.borderTop=n),(null==(s=c.borderTypes)?void 0:s.includes(Mr.RIGHT))&&(l.style.borderRight=n),(null==(o=c.borderTypes)?void 0:o.includes(Mr.BOTTOM))&&(l.style.borderBottom=n),(null==(a=c.borderTypes)?void 0:a.includes(Mr.LEFT))&&(l.style.borderLeft=n);const h=ln(c.value,t);l.innerHTML=h.innerHTML,c.backgroundColor&&(l.style.backgroundColor=c.backgroundColor),r.append(l)}e.append(r)}m.append(e)}else if(p.type===de.HYPERLINK){const e=document.createElement("a");e.innerText=p.valueList.map(e=>e.value).join(""),p.url&&(e.href=p.url),m.append(e)}else if(p.type===de.TITLE){const e=document.createElement("h"+ct[p.level]),t=r(p.valueList);e.innerHTML=t.innerHTML,m.append(e)}else if(p.type===de.LIST){const e=document.createElement(it[p.listType]);p.listStyle&&(e.style.listStyleType=st[p.listStyle]);const t=zt(p.valueList),n=on(t);n.forEach(t=>{const n=document.createElement("li"),i=r(t);n.innerHTML=i.innerHTML,e.append(n)}),m.append(e)}else if(p.type===de.IMAGE){const e=document.createElement("img");p.value&&(e.src=p.value,e.width=p.width,e.height=p.height),m.append(e)}else if(p.type===de.SEPARATOR){const e=document.createElement("hr");m.append(e)}else if(p.type===de.CHECKBOX){const e=document.createElement("input");e.type="checkbox",(null==(l=p.checkbox)?void 0:l.value)&&e.setAttribute("checked","true"),m.append(e)}else if(p.type===de.RADIO){const e=document.createElement("input");e.type="radio",(null==(c=p.radio)?void 0:c.value)&&e.setAttribute("checked","true"),m.append(e)}else if(p.type===de.TAB){const e=document.createElement("span");e.innerHTML=`${w}${w}`,m.append(e)}else if(p.type===de.CONTROL){const e=document.createElement("span"),t=r((null==(u=p.control)?void 0:u.value)||[]);e.innerHTML=t.innerHTML,m.append(e)}else if(!p.type||p.type===de.LATEX||ve.includes(p.type)){let t="";if(t=p.type===de.DATE?(null==(h=p.valueList)?void 0:h.map(e=>e.value).join(""))||"":p.value,!t)continue;const r=sn(p,n);(null==(d=e[g-1])?void 0:d.type)===de.TITLE&&(t=t.replace(/^\n/,"")),r.innerText=t.replace(new RegExp(""+M,"g"),"\n"),m.append(r)}}return m}const i=document.createElement("div"),s=an(e);for(let o=0;o<s.length;o++){const e=s[o],t=!e.rowFlex||e.rowFlex===C.LEFT,n=document.createElement("div");if(!t){const t=e.data[0];mn(t)?(n.style.display="flex",n.style.justifyContent=en(t.rowFlex)):n.style.textAlign=qt(e.rowFlex)}n.innerHTML=r(e.data).innerHTML,t?n.childNodes.forEach(e=>{i.append(e.cloneNode(!0))}):i.append(n)}return i}function cn(e){if(!e||3!==e.nodeType)return null;const t=e.parentNode,n="FONT"===t.nodeName?t.parentNode:t,r=$t(n),i=e.textContent,s=window.getComputedStyle(n);if(!i||"STYLE"===n.nodeName)return null;const o={value:i,color:s.color,bold:Number(s.fontWeight)>500,italic:s.fontStyle.includes("italic"),size:Math.floor(parseFloat(s.fontSize))};return"SUB"===n.nodeName||"sub"===s.verticalAlign?o.type=de.SUBSCRIPT:"SUP"!==n.nodeName&&"super"!==s.verticalAlign||(o.type=de.SUPERSCRIPT),r!==C.LEFT&&(o.rowFlex=r),"rgba(0, 0, 0, 0)"!==s.backgroundColor&&(o.highlight=s.backgroundColor),s.textDecorationLine.includes("underline")&&(o.underline=!0),s.textDecorationLine.includes("line-through")&&(o.strikeout=!0),o}function un(e,t){const n=[];function r(e){if(3===e.nodeType){const t=cn(e);t&&n.push(t)}else if(1===e.nodeType){const i=e.childNodes;for(let e=0;e<i.length;e++){const s=i[e];if("BR"===s.nodeName)n.push({value:"\n"});else if("A"===s.nodeName){const e=s,t=e.innerText;t&&n.push({type:de.HYPERLINK,value:"",valueList:[{value:t}],url:e.href})}else if(/H[1-6]/.test(s.nodeName)){const e=s,r=un(gn(e,"div").outerHTML,t);n.push({value:"",type:de.TITLE,level:ut[s.nodeName],valueList:r}),s.nextSibling&&!Le.includes(s.nextSibling.nodeName)&&n.push({value:"\n"})}else if("UL"===s.nodeName||"OL"===s.nodeName){const e=s,r={value:"",type:de.LIST,valueList:[]};"OL"===s.nodeName?r.listType=qe.OL:(r.listType=qe.UL,r.listStyle=e.style.listStyleType),e.querySelectorAll("li").forEach(e=>{const n=un(e.innerHTML,t);n.forEach(e=>{"\n"===e.value&&(e.listWrap=!0)}),n.unshift({value:"\n"}),r.valueList.push(...n)}),n.push(r)}else if("HR"===s.nodeName)n.push({value:"\n",type:de.SEPARATOR});else if("IMG"===s.nodeName){const{src:e,width:t,height:r}=s;e&&t&&r&&n.push({width:t,height:r,value:e,type:de.IMAGE})}else if("TABLE"===s.nodeName){const e=s,r={type:de.TABLE,value:"\n",colgroup:[],trList:[]};if(e.querySelectorAll("tr").forEach(e=>{const n=window.getComputedStyle(e).height.replace("px",""),i={height:Number(n),tdList:[]};e.querySelectorAll("th,td").forEach(e=>{const n=e,r=un(n.innerHTML,t),s={colspan:n.colSpan,rowspan:n.rowSpan,value:r};n.style.backgroundColor&&(s.backgroundColor=n.style.backgroundColor),i.tdList.push(s)}),r.trList.push(i)}),r.trList.length){const e=r.trList[0].tdList.reduce((e,t)=>e+t.colspan,0),i=Math.ceil(t.innerWidth/e);for(let t=0;t<e;t++)r.colgroup.push({width:i});n.push(r)}}else if("INPUT"===s.nodeName&&s.type===dt.CHECKBOX)n.push({type:de.CHECKBOX,value:"",checkbox:{value:s.checked}});else if("INPUT"===s.nodeName&&s.type===dt.RADIO)n.push({type:de.RADIO,value:"",radio:{value:s.checked}});else if(r(s),1===s.nodeType&&e!==i.length-1){const e=window.getComputedStyle(s).display;"block"===e&&n.push({value:"\n"})}}}}const i=document.createElement("div");i.innerHTML=e,document.body.appendChild(i);const s=[];return i.childNodes.forEach(e=>{var t;1===e.nodeType||(null==(t=e.textContent)?void 0:t.trim())||s.push(e)}),s.forEach(e=>e.remove()),r(i),i.remove(),n}function hn(e){function t(e){var n,r,i,s,o,a,l;let c="";for(let u=0;u<e.length;u++){const h=e[u];if(h.type===de.TABLE){c+="\n";const e=h.trList;for(let n=0;n<e.length;n++){const r=e[n];for(let e=0;e<r.tdList.length;e++){const n=r.tdList[e],i=t(zt(n.value)),s=0===e,o=r.tdList.length-1===e;c+=`${s?"":" "}${i}${o?"\n":""}`}}}else if(h.type===de.TAB)c+="\t";else if(h.type===de.HYPERLINK)c+=h.valueList.map(e=>e.value).join("");else if(h.type===de.TITLE)c+=""+t(zt(h.valueList));else if(h.type===de.LIST){const e=zt(h.valueList),n=on(e);let r="";h.listType===qe.UL&&(r=rt[h.listStyle]),n.forEach((e,i)=>{const s=n.size-1===i;c+=`\n${r||i+1+"."}${t(e)}${s?"\n":""}`})}else if(h.type===de.CHECKBOX)c+=(null==(n=h.checkbox)?void 0:n.value)?"☑":"□";else if(h.type===de.RADIO)c+=(null==(r=h.radio)?void 0:r.value)?"☉":"○";else if(!h.type||h.type===de.LATEX||ve.includes(h.type)){let e="";if(h.type===de.CONTROL){const t=(null==(s=null==(i=h.control.value)?void 0:i[0])?void 0:s.value)||"";e=t?`${(null==(o=h.control)?void 0:o.preText)||""}${t}${(null==(a=h.control)?void 0:a.postText)||""}`:""}else e=h.type===de.DATE?(null==(l=h.valueList)?void 0:l.map(e=>e.value).join(""))||"":h.value;c+=e.replace(new RegExp(""+M,"g"),"\n")}}return c}return t(zt(e))}function dn(e){return F(e,["metrics","style"])}function mn(e){return!!(null==e?void 0:e.type)&&(Ce.includes(e.type)||e.imgDisplay===f.INLINE)}function gn(e,t){const n=document.createElement(t);for(let r=0;r<e.attributes.length;r++){const t=e.attributes[r];n.setAttribute(t.name,t.value)}return n.innerHTML=e.innerHTML,n}function pn(e){const t=[];for(let n=0;n<e.length;n++){const r=e[n];r.imgDisplay===f.SURROUND&&t.push(r)}return t}function fn(e,t){var n;for(let r=e.length-1;r>=0;r--){const i=e[r];(null==(n=i.imgFloatPosition)?void 0:n.pageNo)===t&&e.splice(r,1)}}function Rn(e){localStorage.setItem(ue,JSON.stringify({text:e.text,elementList:e.elementList}))}function yn(){const e=localStorage.getItem(ue);return e?JSON.parse(e):null}function Mn(){localStorage.removeItem(ue)}function Sn(e,t,n){if(!e&&!t&&!n.length)return;const r=new Blob([e],{type:"text/plain"}),i=new Blob([t],{type:"text/html"});if(window.ClipboardItem){const e=new ClipboardItem({[r.type]:r,[i.type]:i});window.navigator.clipboard.write([e])}else{const e=document.createElement("div");e.setAttribute("contenteditable","true"),e.innerHTML=t,document.body.append(e);const n=window.getSelection(),r=document.createRange(),i=document.createElement("span");i.innerText="\n",e.append(i),r.selectNodeContents(e),null==n||n.removeAllRanges(),null==n||n.addRange(r),document.execCommand("copy"),e.remove()}Rn({text:e,elementList:n})}function bn(e,t){const n=ln(e,t);document.body.append(n);const r=n.innerText;n.remove();const i=n.innerHTML;(r||i||e.length)&&Sn(r,i,zt(e))}function wn(e){let t=!1;for(let n=0;n<e.items.length;n++){const r=e.items[n];if("file"===r.kind){t=!0;break}}return t}function Tn(e,t){const n=e.getDraw();if(n.isReadonly()||n.isDisabled()||n.getControl().getIsDisabledPasteControl())return;const r=n.getRange(),{startIndex:i}=r.getRange(),s=n.getElementList();if(~i&&!r.getIsSelectAll()){const e=s[i];if((null==e?void 0:e.titleId)||(null==e?void 0:e.listId)){let n=0;while(n<t.length){const r=t[n];if(e.titleId&&/^\n/.test(r.value))break;if(Ne.includes(r.type)){if(t.splice(n,1),r.valueList)for(let e=0;e<r.valueList.length;e++){const i=r.valueList[e];i.value!==M&&"\n"!==i.value&&(t.splice(n,0,i),n++)}n--}n++}}rn(s,t,i,{isBreakWhenWrap:!0,editorOptions:n.getOptions()})}n.insertElementList(t)}function On(e,t){const n=e.getDraw();if(n.isReadonly()||n.isDisabled())return;const r=un(t,{innerWidth:n.getOriginalInnerWidth()});Tn(e,r)}function vn(e,t){const n=e.getDraw();if(n.isReadonly()||n.isDisabled())return;const r=n.getRange(),{startIndex:i}=r.getRange(),s=n.getElementList(),o=new FileReader;o.readAsDataURL(t),o.onload=()=>{const e=new Image,t=o.result;e.src=t,e.onload=()=>{const r={value:t,type:de.IMAGE,width:e.width,height:e.height};~i&&rn(s,[r],i,{editorOptions:n.getOptions()}),n.insertElementList([r])}}}function En(e,t){const n=e.getDraw();if(n.isReadonly()||n.isDisabled())return;const r=t.clipboardData;if(!r)return;const{paste:i}=n.getOverride();if(i){const e=i(t);if(!1!==(null==e?void 0:e.preventDefault))return}if(!wn(r)){const t=r.getData("text"),n=yn();if(n&&se(t)===se(n.text))return void Tn(e,n.elementList)}Mn();let s=!1;for(let o=0;o<r.items.length;o++){const e=r.items[o];if("text/html"===e.type){s=!0;break}}for(let o=0;o<r.items.length;o++){const t=r.items[o];if("string"===t.kind){if("text/plain"===t.type&&!s){t.getAsString(t=>{e.input(t)});break}if("text/html"===t.type&&s){t.getAsString(t=>{On(e,t)});break}}else if("file"===t.kind&&t.type.includes("image")){const n=t.getAsFile();n&&vn(e,n)}}}async function Cn(e,t){const n=e.getDraw();if(n.isReadonly()||n.isDisabled())return;const{paste:r}=n.getOverride();if(r){const e=r();if(!1!==(null==e?void 0:e.preventDefault))return}const i=await navigator.clipboard.readText(),s=yn();if(i!==(null==s?void 0:s.text))if(Mn(),null==t?void 0:t.isPlainText)i&&e.input(i);else{const t=await navigator.clipboard.read();let n=!1;for(const e of t)if(e.types.includes("text/html")){n=!0;break}for(const r of t)if(r.types.includes("text/plain")&&!n){const t=await r.getType("text/plain"),n=await t.text();n&&e.input(n)}else if(r.types.includes("text/html")&&n){const t=await r.getType("text/html"),n=await t.text();n&&On(e,n)}else if(r.types.some(e=>e.startsWith("image/"))){const t=r.types.find(e=>e.startsWith("image/")),n=await r.getType(t);vn(e,n)}}else Tn(e,s.elementList)}class Ln{constructor(e,t){d(this,"draw"),d(this,"container"),d(this,"agentCursorDom"),d(this,"canvasEvent"),this.draw=e,this.container=e.getContainer(),this.canvasEvent=t;const n=document.createElement("textarea");n.autocomplete="off",n.classList.add(ce+"-inputarea"),n.innerText="",this.container.append(n),this.agentCursorDom=n,n.onkeydown=e=>this._keyDown(e),n.oninput=D(this._input.bind(this),0),n.onpaste=e=>this._paste(e),n.addEventListener("compositionstart",this._compositionstart.bind(this)),n.addEventListener("compositionend",this._compositionend.bind(this))}getAgentCursorDom(){return this.agentCursorDom}_keyDown(e){this.canvasEvent.keydown(e)}_input(e){const t=e.data;t&&this.canvasEvent.input(t)}_paste(e){const t=this.draw.isReadonly();if(t)return;const n=e.clipboardData;n&&(En(this.canvasEvent,e),e.preventDefault())}_compositionstart(){this.canvasEvent.compositionstart()}_compositionend(e){this.canvasEvent.compositionend(e)}}class Nn{constructor(e,t){d(this,"ANIMATION_CLASS",ce+"-cursor--animation"),d(this,"draw"),d(this,"container"),d(this,"options"),d(this,"position"),d(this,"cursorDom"),d(this,"cursorAgent"),d(this,"blinkTimeout"),this.draw=e,this.container=e.getContainer(),this.position=e.getPosition(),this.options=e.getOptions(),this.cursorDom=document.createElement("div"),this.cursorDom.classList.add(ce+"-cursor"),this.container.append(this.cursorDom),this.cursorAgent=new Ln(e,t),this.blinkTimeout=null}getCursorDom(){return this.cursorDom}getAgentDom(){return this.cursorAgent.getAgentCursorDom()}getAgentIsActive(){return this.getAgentDom()===document.activeElement}getAgentDomValue(){return this.getAgentDom().value}clearAgentDomValue(){this.getAgentDom().value=""}_blinkStart(){this.cursorDom.classList.add(this.ANIMATION_CLASS)}_blinkStop(){this.cursorDom.classList.remove(this.ANIMATION_CLASS)}_setBlinkTimeout(){this._clearBlinkTimeout(),this.blinkTimeout=window.setTimeout(()=>{this._blinkStart()},500)}_clearBlinkTimeout(){this.blinkTimeout&&(this._blinkStop(),window.clearTimeout(this.blinkTimeout),this.blinkTimeout=null)}focus(){const e=this.cursorAgent.getAgentCursorDom();document.activeElement!==e&&(e.focus(),e.setSelectionRange(0,0))}drawCursor(e){let t=this.position.getCursorPosition();if(!t)return;const{scale:n,cursor:r}=this.options,{color:i,width:s,isShow:o=!0,isBlink:a=!0,isFocus:l=!0,hitLineStartIndex:c}=u(u({},r),e),h=this.draw.getHeight(),d=this.draw.getPageGap();if(c){const e=this.position.getPositionList();t=e[c]}const{metrics:m,coordinate:{leftTop:g,rightTop:p},ascent:f,pageNo:R}=t,y=this.draw.getZone(),M=y.isMainActive()?R:this.draw.getPageNo(),S=M*(h+d),b=oe*n,w=Math.min(m.height/4,b),T=m.height+2*w,O=this.cursorAgent.getAgentCursorDom();l&&setTimeout(()=>{this.focus()});const v=m.boundingBoxDescent<0?0:m.boundingBoxDescent,E=g[1]+f+v-(T-w)+S,C=c?g[0]:p[0];if(O.style.left=C+"px",O.style.top=E+T-b+"px",!o)return void this.recoveryCursor();const L=this.draw.isReadonly();this.cursorDom.style.width=s*n+"px",this.cursorDom.style.backgroundColor=i,this.cursorDom.style.left=C+"px",this.cursorDom.style.top=E+"px",this.cursorDom.style.display=L?"none":"block",this.cursorDom.style.height=T+"px",a?this._setBlinkTimeout():this._clearBlinkTimeout()}recoveryCursor(){this.cursorDom.style.display="none",this._clearBlinkTimeout()}moveCursorToVisible(e){const{cursorPosition:t,direction:n}=e;if(!t||!n)return;const{pageNo:r,coordinate:{leftTop:i,leftBottom:s}}=t,o=r*(this.draw.getHeight()+this.draw.getPageGap())+this.container.getBoundingClientRect().top,a=n===he.UP,l=s[0],c=a?i[1]+o:s[1]+o,u=ee(this.container),h={left:0,right:0,top:0,bottom:0};if(u===document.documentElement)h.right=window.innerWidth,h.bottom=window.innerHeight;else{const{left:e,right:t,top:n,bottom:r}=u.getBoundingClientRect();h.left=e,h.right=t,h.top=n,h.bottom=r}const{maskMargin:d}=this.options;if(h.top+=d[0],h.bottom-=d[2],!(l>=h.left&&l<=h.right&&c>=h.top&&c<=h.bottom)){const{scrollLeft:e,scrollTop:t}=u;a?u.scroll(e,t-(h.top-c)):u.scroll(e,t+c-h.bottom)}}}var _n;(function(e){e[e["LEFT"]=0]="LEFT",e[e["CENTER"]=1]="CENTER",e[e["RIGHT"]=2]="RIGHT"})(_n||(_n={}));const In="undefined"!==typeof navigator&&/Mac OS X/.test(navigator.userAgent),Pn="undefined"!==typeof navigator&&/iPad|iPhone/.test(navigator.userAgent);function xn(e){return In?e.metaKey:e.ctrlKey}var Dn;(function(e){e["Delete"]="Delete",e["Backspace"]="Backspace",e["Enter"]="Enter",e["Left"]="ArrowLeft",e["Right"]="ArrowRight",e["Up"]="ArrowUp",e["Down"]="ArrowDown",e["ESC"]="Escape",e["TAB"]="Tab",e["META"]="Meta",e["LEFT_BRACKET"]="[",e["RIGHT_BRACKET"]="]",e["COMMA"]=",",e["PERIOD"]=".",e["LEFT_ANGLE_BRACKET"]="<",e["RIGHT_ANGLE_BRACKET"]=">",e["EQUAL"]="=",e["MINUS"]="-",e["PLUS"]="+",e["A"]="a",e["B"]="b",e["C"]="c",e["D"]="d",e["E"]="e",e["F"]="f",e["G"]="g",e["H"]="h",e["I"]="i",e["J"]="j",e["K"]="k",e["L"]="l",e["M"]="m",e["N"]="n",e["O"]="o",e["P"]="p",e["Q"]="q",e["R"]="r",e["S"]="s",e["T"]="t",e["U"]="u",e["V"]="v",e["W"]="w",e["X"]="x",e["Y"]="y",e["Z"]="z",e["A_UPPERCASE"]="A",e["B_UPPERCASE"]="B",e["C_UPPERCASE"]="C",e["D_UPPERCASE"]="D",e["E_UPPERCASE"]="E",e["F_UPPERCASE"]="F",e["G_UPPERCASE"]="G",e["H_UPPERCASE"]="H",e["I_UPPERCASE"]="I",e["J_UPPERCASE"]="J",e["K_UPPERCASE"]="K",e["L_UPPERCASE"]="L",e["M_UPPERCASE"]="M",e["N_UPPERCASE"]="N",e["O_UPPERCASE"]="O",e["P_UPPERCASE"]="P",e["Q_UPPERCASE"]="Q",e["R_UPPERCASE"]="R",e["S_UPPERCASE"]="S",e["T_UPPERCASE"]="T",e["U_UPPERCASE"]="U",e["V_UPPERCASE"]="V",e["W_UPPERCASE"]="W",e["X_UPPERCASE"]="X",e["Y_UPPERCASE"]="Y",e["Z_UPPERCASE"]="Z",e["ZERO"]="0",e["ONE"]="1",e["TWO"]="2",e["THREE"]="3",e["FOUR"]="4",e["FIVE"]="5",e["SIX"]="6",e["SEVEN"]="7",e["EIGHT"]="8",e["NINE"]="9"})(Dn||(Dn={}));class An{constructor(e,t){d(this,"element"),d(this,"control"),this.element=e,this.control=t}setElement(e){this.element=e}getElement(){return this.element}getCode(){var e;return(null==(e=this.element.control)?void 0:e.code)||null}getValue(){const e=this.control.getElementList(),{startIndex:t}=this.control.getRange(),n=e[t],r=[];let i=t;while(i>0){const t=e[i];if(t.controlId!==n.controlId||t.controlComponent===dt.PREFIX||t.controlComponent===dt.PRE_TEXT)break;t.controlComponent===dt.VALUE&&r.unshift(t),i--}let s=t+1;while(s<e.length){const t=e[s];if(t.controlId!==n.controlId||t.controlComponent===dt.POSTFIX||t.controlComponent===dt.POST_TEXT)break;t.controlComponent===dt.VALUE&&r.push(t),s++}return r}setValue(){return-1}setSelect(e,t={},n={}){if(!n.isIgnoreDisabledRule&&this.control.getIsDisabledControl(t))return;const{control:r}=this.element,i=t.elementList||this.control.getElementList(),{startIndex:s}=t.range||this.control.getRange(),o=i[s];let a=s;while(a>0){const t=i[a];if(t.controlId!==o.controlId||t.controlComponent===dt.PREFIX||t.controlComponent===dt.PRE_TEXT)break;if(t.controlComponent===dt.CHECKBOX){const n=t.checkbox;n.value=e.includes(n.code)}a--}let l=s+1;while(l<i.length){const t=i[l];if(t.controlId!==o.controlId||t.controlComponent===dt.POSTFIX||t.controlComponent===dt.POST_TEXT)break;if(t.controlComponent===dt.CHECKBOX){const n=t.checkbox;n.value=e.includes(n.code)}l++}r.code=e.join(","),this.control.repaintControl({curIndex:s,isSetCursor:!1})}keydown(e){if(this.control.getIsDisabledControl())return null;const t=this.control.getRange();this.control.shrinkBoundary();const{startIndex:n,endIndex:r}=t;return e.key===Dn.Backspace||e.key===Dn.Delete?this.control.removeControl(n):r}cut(){return-1}}class Fn extends An{setSelect(e,t={},n={}){if(!n.isIgnoreDisabledRule&&this.control.getIsDisabledControl(t))return;const{control:r}=this.element,i=t.elementList||this.control.getElementList(),{startIndex:s}=t.range||this.control.getRange(),o=i[s];let a=s;while(a>0){const t=i[a];if(t.controlId!==o.controlId||t.controlComponent===dt.PREFIX||t.controlComponent===dt.PRE_TEXT)break;if(t.controlComponent===dt.RADIO){const n=t.radio;n.value=e.includes(n.code)}a--}let l=s+1;while(l<i.length){const t=i[l];if(t.controlId!==o.controlId||t.controlComponent===dt.POSTFIX||t.controlComponent===dt.POST_TEXT)break;if(t.controlComponent===dt.RADIO){const n=t.radio;n.value=e.includes(n.code)}l++}r.code=e.join(","),this.control.repaintControl({curIndex:s,isSetCursor:!1})}}function Yn(e){const t=e.getDraw(),n=t.getPosition(),r=t.getRange();e.isAllowDrag=!0,e.cacheRange=Y(r.getRange()),e.cacheElementList=t.getElementList(),e.cachePositionList=n.getPositionList(),e.cachePositionContext=n.getPositionContext()}function Hn(e,t){const{checkbox:n,control:r}=e;if(r){const e=(null==r?void 0:r.code)?r.code.split(","):[];if(null==n?void 0:n.value){const t=e.findIndex(e=>e===n.code);e.splice(t,1)}else(null==n?void 0:n.code)&&e.push(n.code);const i=t.getControl().getActiveControl();i instanceof An&&i.setSelect(e)}else t.getCheckboxParticle().setSelect(e)}function kn(e,t){const{radio:n,control:r}=e;if(r){const e=(null==n?void 0:n.code)?[n.code]:[],r=t.getControl().getActiveControl();r instanceof Fn&&r.setSelect(e)}else t.getRadioParticle().setSelect(e)}function Vn(e,t){var n,r;if(e.button===_n.RIGHT)return;const i=t.getDraw(),s=i.isReadonly(),o=i.getRange(),a=i.getPosition();if(!t.isAllowDrag){const n=o.getRange();if(!s&&n.startIndex!==n.endIndex){const n=o.getIsPointInRange(e.offsetX,e.offsetY);if(n)return void Yn(t)}}const l=e.target,c=l.dataset.index;c&&i.setPageNo(Number(c)),t.isAllowSelection=!0;const d=Y(a.getPositionContext()),m=a.adjustPositionContext({x:e.offsetX,y:e.offsetY});if(!m)return;const{index:g,isDirectHit:p,isCheckbox:R,isRadio:y,isImage:M,isTable:S,tdValueIndex:b,hitLineStartIndex:w}=m;t.mouseDownStartPosition=h(u({},m),{index:S?b:g,x:e.offsetX,y:e.offsetY});const T=i.getElementList(),O=a.getPositionList(),v=S?b:g,E=T[v],C=!(!p||!M),L=!(!p||!R),N=!(!p||!y);if(~g){let l=v,c=v;if(e.shiftKey){const{startIndex:e}=o.getRange();if(~e){const t=a.getPositionContext();t.tdId===d.tdId&&(v>e?l=e:c=e)}}if(o.setRange(l,c),a.setCursorPosition(O[v]),L&&!s)Hn(E,i);else if(N&&!s)kn(E,i);else if(E.controlComponent!==dt.VALUE||(null==(n=E.control)?void 0:n.type)!==ht.CHECKBOX&&(null==(r=E.control)?void 0:r.type)!==ht.RADIO)i.render({curIndex:v,isCompute:!1,isSubmitHistory:!1,isSetCursor:!C&&!L&&!N});else{let e=v;while(e>0){const t=T[e];if(t.controlComponent===dt.CHECKBOX){Hn(t,i);break}if(t.controlComponent===dt.RADIO){kn(t,i);break}e--}}w&&t.getDraw().getCursor().drawCursor({hitLineStartIndex:w})}const _=i.getPreviewer();if(_.clearResizer(),C){const e={dragDisable:s||!E.controlId&&i.getMode()===kt.FORM};E.type===de.LATEX&&(e.mime="svg",e.srcKey="laTexSVG"),_.drawResizer(E,O[v],e),i.getCursor().drawCursor({isShow:!1}),Yn(t),E.imgDisplay!==f.SURROUND&&E.imgDisplay!==f.FLOAT_TOP&&E.imgDisplay!==f.FLOAT_BOTTOM||i.getImageParticle().createFloatImage(E)}const I=i.getTableTool();I.dispose(),S&&!s&&i.getMode()!==kt.FORM&&I.render();const P=i.getHyperlinkParticle();P.clearHyperlinkPopup(),E.type===de.HYPERLINK&&(xn(e)?P.openHyperlink(E):P.drawHyperlinkPopup(E,O[v]));const x=i.getDateParticle();x.clearDatePicker(),E.type!==de.DATE||s||x.renderDatePicker(E,O[v])}function Un(e){const t=V();return Reflect.set(e,"dragId",t),t}function Wn(e,t){return t.findIndex(t=>t.dragId===e)}function Xn(e,t,n){const r=n.getDraw();if(e.imgDisplay===f.SURROUND||e.imgDisplay===f.FLOAT_TOP||e.imgDisplay===f.FLOAT_BOTTOM){const i=t.offsetX-n.mouseDownStartPosition.x,s=t.offsetY-n.mouseDownStartPosition.y,o=e.imgFloatPosition;e.imgFloatPosition={x:o.x+i,y:o.y+s,pageNo:r.getPageNo()}}r.getImageParticle().destroyFloatImage()}function jn(e,t){var n,r,i,s;if(t.isAllowDrop){const o=t.getDraw();if(o.isReadonly()||o.isDisabled())return void t.mousedown(e);const a=o.getPosition(),l=a.getPositionList(),c=a.getPositionContext(),d=o.getRange(),m=t.cacheRange,g=t.cacheElementList,p=t.cachePositionList,R=d.getRange(),y=m.startIndex===m.endIndex,M=y?m.startIndex-1:m.startIndex,S=m.endIndex;if(R.startIndex>=M&&R.endIndex<=S&&(null==(n=t.cachePositionContext)?void 0:n.tdId)===c.tdId){o.clearSideEffect();let n=!1,r=!1;if(y){const i=g[S];if(i.type===de.IMAGE||i.type===de.LATEX){if(Xn(i,e,t),i.imgDisplay===f.SURROUND||i.imgDisplay===f.FLOAT_TOP||i.imgDisplay===f.FLOAT_BOTTOM)o.getPreviewer().drawResizer(i),n=!0;else{const e=p[S];o.getPreviewer().drawResizer(i,e)}r=i.imgDisplay===f.SURROUND}}return d.replaceRange(u({},m)),void o.render({isCompute:r,isSubmitHistory:n,isSetCursor:!1})}const b=g.slice(M+1,S+1),w=b.find(e=>e.controlId);if(w){const e=g[M+1],t=g[S],n=(!e.controlId||e.controlComponent===dt.PREFIX)&&(!t.controlId||t.controlComponent===dt.POSTFIX)||e.controlId===t.controlId&&e.controlComponent===dt.PREFIX&&t.controlComponent===dt.POSTFIX||(null==(r=e.control)?void 0:r.type)===ht.TEXT&&e.controlComponent===dt.VALUE&&(null==(i=t.control)?void 0:i.type)===ht.TEXT&&t.controlComponent===dt.VALUE;if(!n)return void o.render({curIndex:R.startIndex,isCompute:!1,isSubmitHistory:!1})}const T=o.getControl(),O=o.getElementList(),v=!w||!!O[R.startIndex].controlId||!T.getIsElementListContainFullControl(b),E=o.getOptions(),C=b.map(e=>{if(e.type&&e.type!==de.TEXT){let t=Y(e);return v&&(t=$(t,be)),Gt([t],{isHandleFirstElement:!1,editorOptions:E}),t}{const t={value:e.value},n=me;return v||n.push(...be),n.forEach(n=>{const r=e[n];void 0!==r&&(t[n]=r)}),t}});rn(O,C,R.startIndex,{editorOptions:o.getOptions()});const L=g[M],N=p[M],_=Un(g[M]),I=Un(g[S]),P=C.length;let x=R.startIndex,D=x+P;const A=T.getActiveControl();if(A&&g[x].controlComponent!==dt.POSTFIX?(D=A.setValue(C),x=D-P):o.spliceElementList(O,x+1,0,...C),!~D)return void o.render({isSetCursor:!1});const F=Un(O[x]),H=Un(O[D]),k=Wn(_,g),V=Wn(I,g),U=g[V];U.controlId&&U.controlComponent!==dt.POSTFIX?(d.replaceRange(h(u({},m),{startIndex:k,endIndex:V})),null==(s=T.getActiveControl())||s.cut()):o.spliceElementList(g,k+1,V-k);const W=O[R.startIndex],X=l[R.startIndex];let j=c.index;j&&(W.tableId&&!L.tableId?N.index<j&&(j-=P):!W.tableId&&L.tableId&&X.index<j&&(j+=P),a.setPositionContext(h(u({},c),{index:j})));const Z=Wn(F,O),Q=Wn(H,O);d.setRange(y?Q:Z,Q,R.tableId,R.startTdIndex,R.endTdIndex,R.startTrIndex,R.endTrIndex),o.clearSideEffect();let K=null;if(y){const n=o.getElementList(),r=n[Q];r.type!==de.IMAGE&&r.type!==de.LATEX||(Xn(r,e,t),K=r)}if(o.render({isSetCursor:!1}),K)if(K.imgDisplay===f.SURROUND||K.imgDisplay===f.FLOAT_TOP||K.imgDisplay===f.FLOAT_BOTTOM)o.getPreviewer().drawResizer(K);else{const e=a.getPositionList(),t=e[Q];o.getPreviewer().drawResizer(K,t)}}else t.isAllowDrag&&t.mousedown(e)}function Zn(e,t){const n=t.getDraw(),r=n.getPageContainer(),{x:i,y:s,width:o,height:a}=r.getBoundingClientRect();e.x>=i&&e.x<=i+o&&e.y>=s&&e.y<=s+a||t.setIsAllowSelection(!1)}function Qn(e,t){var n;const r=t.getDraw();if(t.isAllowDrag){const i=e.offsetX,s=e.offsetY,{startIndex:o,endIndex:a}=t.cacheRange,l=t.cachePositionList;for(let e=o+1;e<=a;e++){const{coordinate:{leftTop:t,rightBottom:n}}=l[e];if(i>=t[0]&&i<=n[0]&&s>=t[1]&&s<=n[1])return}const c=null==(n=t.cacheRange)?void 0:n.startIndex;if(c){const n=t.cacheElementList[c];(null==n?void 0:n.type)!==de.IMAGE||n.imgDisplay!==f.SURROUND&&n.imgDisplay!==f.FLOAT_TOP&&n.imgDisplay!==f.FLOAT_BOTTOM||(r.getPreviewer().clearResizer(),r.getImageParticle().dragFloatImage(e.movementX,e.movementY))}return t.dragover(e),void(t.isAllowDrop=!0)}if(!t.isAllowSelection||!t.mouseDownStartPosition)return;const i=e.target,s=i.dataset.index;s&&r.setPageNo(Number(s));const o=r.getPosition(),a=o.getPositionByXY({x:e.offsetX,y:e.offsetY});if(!~a.index)return;const{index:l,isTable:c,tdValueIndex:u,tdIndex:h,trIndex:d,tableId:m}=a,{index:g,isTable:p,tdIndex:R,trIndex:y,tableId:M}=t.mouseDownStartPosition,S=c?u:l,b=r.getRange();if(c&&p&&(h!==R||d!==y))b.setRange(S,S,m,R,h,y,d);else{let e=~S?S:0;if((p||c)&&M!==m)return;let t=g;if(t>e&&([t,e]=[e,t]),t===e)return;const n=r.getElementList(),i=n[t+1],s=n[e];if((null==i?void 0:i.controlComponent)===dt.PLACEHOLDER&&(null==s?void 0:s.controlComponent)===dt.PLACEHOLDER&&i.controlId===s.controlId)return;b.setRange(t,e)}r.render({isSubmitHistory:!1,isSetCursor:!1,isCompute:!1})}function Kn(e,t){const n=t.getDraw();if(n.isReadonly())return;const r=n.getRange();if(!r.getIsCanInput())return;const{startIndex:i,endIndex:s,isCrossRowCol:o}=r.getRange(),a=n.getControl();let l;if(o){const e=n.getTableParticle().getRangeRowCol();if(!e)return;let t=!1;for(let r=0;r<e.length;r++){const i=e[r];for(let e=0;e<i.length;e++){const r=i[e];r.value.length>1&&(n.spliceElementList(r.value,1,r.value.length-1),t=!0)}}l=t?0:null}else if(a.getActiveControl()&&a.getIsRangeCanCaptureEvent())l=a.keydown(e);else{const t=n.getPosition(),o=t.getCursorPosition();if(!o)return;const{index:a}=o,c=r.getIsCollapsed(),u=n.getElementList();if(c&&0===a){const t=u[a];if(t.value===M)return t.listId&&n.getListParticle().unsetList(),void e.preventDefault()}const h=u[i];if(c&&h.rowFlex&&h.value===M){const e=r.getRangeRowElementList();if(e){const t=u[i-1];e.forEach(e=>{e.rowFlex=null==t?void 0:t.rowFlex})}}c?n.spliceElementList(u,a,1):n.spliceElementList(u,i+1,s-i),l=c?a-1:i}n.getGlobalEvent().setCanvasEventAbility(),null===l?(r.setRange(i,i),n.render({curIndex:i,isSubmitHistory:!1})):(r.setRange(l,l),n.render({curIndex:l}))}function Gn(e,t){var n;const r=t.getDraw();if(r.isReadonly())return;const i=r.getRange();if(!i.getIsCanInput())return;const{startIndex:s,endIndex:o,isCrossRowCol:a}=i.getRange(),l=r.getElementList(),c=r.getControl();let u;if(a){const e=r.getTableParticle().getRangeRowCol();if(!e)return;let t=!1;for(let n=0;n<e.length;n++){const i=e[n];for(let e=0;e<i.length;e++){const n=i[e];n.value.length>1&&(r.spliceElementList(n.value,1,n.value.length-1),t=!0)}}u=t?0:null}else if(c.getActiveControl()&&c.getIsRangeWithinControl())u=c.keydown(e);else if(null==(n=l[o+1])?void 0:n.controlId)u=c.removeControl(o+1);else{const e=r.getPosition(),t=e.getCursorPosition();if(!t)return;const{index:n}=t,a=e.getPositionContext();if(a.isDirectHit&&a.isImage)r.spliceElementList(l,n,1),u=n-1;else{const e=i.getIsCollapsed();if(e){if(!l[n+1])return;r.spliceElementList(l,n+1,1)}else r.spliceElementList(l,s+1,o-s);u=e?n:s}}r.getGlobalEvent().setCanvasEventAbility(),null===u?(i.setRange(s,s),r.render({curIndex:s,isSubmitHistory:!1})):(i.setRange(u,u),r.render({curIndex:u}))}function Bn(e,t){var n,r,i;const s=t.getDraw();if(s.isReadonly())return;const o=s.getRange();if(!o.getIsCanInput())return;const{startIndex:a,endIndex:l}=o.getRange(),c=o.getIsCollapsed(),u=s.getElementList(),h=u[a],d=u[l];if(c&&d.listId&&d.value===M&&(null==(n=u[l+1])?void 0:n.listId)!==d.listId)return void s.getListParticle().unsetList();let m={value:M};if(e.shiftKey&&h.listId&&(m.listWrap=!0),rn(u,[m],a,{isBreakWhenWrap:!0,editorOptions:s.getOptions()}),e.shiftKey&&d.areaId&&d.areaId!==(null==(r=u[l+1])?void 0:r.areaId)&&(m=$(m,Te)),!d.titleId||d.titleId===(null==(i=u[l+1])?void 0:i.titleId)){const e=o.getRangeAnchorStyle(u,l);if(e){const t=[...ge];e.controlComponent!==dt.POSTFIX&&t.push(...me),t.forEach(t=>{const n=e[t];void 0!==n&&(m[t]=n)})}}const g=s.getControl(),p=g.getActiveControl();let f;if(p&&g.getIsRangeWithinControl())f=g.setValue([m]);else{const e=s.getPosition(),t=e.getCursorPosition();if(!t)return;const{index:n}=t;c?s.spliceElementList(u,n+1,0,m):s.spliceElementList(u,a+1,l-a,m),f=n+1}~f&&(o.setRange(f,f),s.render({curIndex:f})),e.preventDefault()}function Jn(e,t){var n,r,i;const s=t.getDraw(),o=s.isReadonly();if(o)return;const a=s.getPosition(),l=a.getCursorPosition();if(!l)return;const c=a.getPositionContext(),{index:u}=l;if(u<=0&&!c.isTable)return;const h=s.getRange(),{startIndex:d,endIndex:m}=h.getRange(),g=h.getIsCollapsed(),p=s.getElementList(),f=s.getControl();if(s.getMode()===kt.FORM&&f.getActiveControl()&&((null==(n=p[u])?void 0:n.controlComponent)===dt.PREFIX||(null==(r=p[u])?void 0:r.controlComponent)===dt.PRE_TEXT))return void f.initNextControl({direction:he.UP});let R=1;if(xn(e)){const t=s.getLetterReg(),n=e.shiftKey&&!g&&d===(null==l?void 0:l.index)?m:d;if(t.test(null==(i=p[n])?void 0:i.value)){let e=n-1;while(e>0){const n=p[e];if(!t.test(n.value))break;R++,e--}}}const y=d-R;let M=y,S=y;if(e.shiftKey&&l&&(d!==m?d===l.index?(M=d,S=m-R):(M=y,S=m):S=m),!e.shiftKey){const e=p[d];if(e.type===de.TABLE){const t=e.trList,n=t.length-1,r=t[n],i=r.tdList.length-1,o=r.tdList[i];a.setPositionContext({isTable:!0,index:d,trIndex:n,tdIndex:i,tdId:o.id,trId:r.id,tableId:e.id}),M=o.value.length-1,S=M,s.getTableTool().render()}else if(e.tableId&&0===d){const t=s.getOriginalElementList(),n=t[c.index].trList;e:for(let r=0;r<n.length;r++){const t=n[r];if(t.id!==e.trId)continue;const i=t.tdList;for(let o=0;o<i.length;o++){const t=i[o];if(t.id===e.tdId){if(0===r&&0===o)a.setPositionContext({isTable:!1}),M=c.index-1,S=M,s.getTableTool().dispose();else{let t=r,i=o-1;i<0&&(t=r-1,i=n[t].tdList.length-1);const l=n[t],u=l.tdList[i];a.setPositionContext({isTable:!0,index:c.index,trIndex:t,tdIndex:i,tdId:u.id,trId:l.id,tableId:e.tableId}),M=u.value.length-1,S=M,s.getTableTool().render()}break e}}}}}if(!~M||!~S)return;h.setRange(M,S);const b=M===S;s.render({curIndex:b?M:void 0,isSetCursor:b,isSubmitHistory:!1,isCompute:!1}),e.preventDefault()}function zn(e,t){var n,r,i;const s=t.getDraw(),o=s.isReadonly();if(o)return;const a=s.getPosition(),l=a.getCursorPosition();if(!l)return;const{index:c}=l,u=a.getPositionList(),h=a.getPositionContext();if(c>u.length-1&&!h.isTable)return;const d=s.getRange(),{startIndex:m,endIndex:g}=d.getRange(),p=d.getIsCollapsed();let f=s.getElementList();const R=s.getControl();if(s.getMode()===kt.FORM&&R.getActiveControl()&&((null==(n=f[c+1])?void 0:n.controlComponent)===dt.POSTFIX||(null==(r=f[c+1])?void 0:r.controlComponent)===dt.POST_TEXT))return void R.initNextControl({direction:he.DOWN});let y=1;if(xn(e)){const t=s.getLetterReg(),n=e.shiftKey&&!p&&m===(null==l?void 0:l.index)?g:m;if(t.test(null==(i=f[n+1])?void 0:i.value)){let e=n+2;while(e<f.length){const n=f[e];if(!t.test(n.value))break;y++,e++}}}const M=g+y;let S=M,b=M;if(e.shiftKey&&l&&(m!==g?m===l.index?(S=m,b=M):(S=m+y,b=g):S=m),!e.shiftKey){const e=f[g],t=f[g+1];if((null==t?void 0:t.type)===de.TABLE){const e=t.trList,n=e[0],r=n.tdList[0];a.setPositionContext({isTable:!0,index:g+1,trIndex:0,tdIndex:0,tdId:r.id,trId:n.id,tableId:t.id}),S=0,b=0,s.getTableTool().render()}else if(e.tableId&&!t){const t=s.getOriginalElementList(),n=t[h.index].trList;e:for(let r=0;r<n.length;r++){const t=n[r];if(t.id!==e.trId)continue;const i=t.tdList;for(let o=0;o<i.length;o++){const t=i[o];if(t.id===e.tdId){if(r===n.length-1&&o===i.length-1)a.setPositionContext({isTable:!1}),S=h.index,b=S,f=s.getElementList(),s.getTableTool().dispose();else{let t=r,l=o+1;l>i.length-1&&(t=r+1,l=0);const c=n[t],u=c.tdList[l];a.setPositionContext({isTable:!0,index:h.index,trIndex:t,tdIndex:l,tdId:u.id,trId:c.id,tableId:e.tableId}),S=0,b=S,s.getTableTool().render()}break e}}}}}const w=f.length-1;if(S>w||b>w)return;d.setRange(S,b);const T=S===b;s.render({curIndex:T?S:void 0,isSetCursor:T,isSubmitHistory:!1,isCompute:!1}),e.preventDefault()}function $n(e,t){const n=t.getDraw(),r=n.isReadonly();if(r)return;e.preventDefault();const i=n.getControl(),s=i.getActiveControl();if(s&&i.getIsRangeWithinControl())i.initNextControl({direction:e.shiftKey?he.UP:he.DOWN});else{const e={type:de.TAB,value:""},t=n.getRange(),{startIndex:r}=t.getRange(),i=n.getElementList();rn(i,[e],r,{editorOptions:n.getOptions()}),n.insertElementList([e])}}function qn(e){const{positionList:t,index:n,isUp:r,rowNo:i,cursorX:s}=e;let o=-1;const a=[];if(r){let e=n-1;while(e>=0){const n=t[e];if(e--,n.rowNo!==i){if(a[0]&&a[0].rowNo!==n.rowNo)break;a.unshift(n)}}}else{let e=n+1;while(e<t.length){const n=t[e];if(e++,n.rowNo!==i){if(a[0]&&a[0].rowNo!==n.rowNo)break;a.push(n)}}}for(let l=0;l<a.length;l++){const e=a[l],{coordinate:{leftTop:[t],rightTop:[n]}}=e;if(l===a.length-1&&(o=e.index),!(s<t||s>n)){o=e.index;break}}return o}function er(e,t){const n=t.getDraw(),r=n.isReadonly();if(r)return;const i=n.getPosition(),s=i.getCursorPosition();if(!s)return;const o=n.getRange(),{startIndex:a,endIndex:l}=o.getRange();let c=i.getPositionList();const u=e.key===Dn.Up;let h=-1,d=-1;const m=i.getPositionContext();if(!e.shiftKey&&m.isTable&&(u&&0===s.rowIndex||!u&&s.rowIndex===n.getRowCount()-1)){const{index:e,trIndex:t,tdIndex:r,tableId:s}=m;if(u)if(0===t)i.setPositionContext({isTable:!1}),h=e-1,d=h,n.getTableTool().dispose();else{let o=-1,a=-1;const l=n.getOriginalElementList(),c=l[e].trList,u=c[t].tdList[r].colIndex;e:for(let e=t-1;e>=0;e--){const t=c[e],n=t.tdList;for(let r=0;r<n.length;r++){const t=n[r];if(t.colIndex===u||t.colIndex+t.colspan-1>=u&&t.colIndex<=u){o=e,a=r;break e}}}if(!~o||!~a)return;const m=c[o],g=m.tdList[a];i.setPositionContext({isTable:!0,index:e,trIndex:o,tdIndex:a,tdId:g.id,trId:m.id,tableId:s}),h=g.value.length-1,d=h,n.getTableTool().render()}else{const o=n.getOriginalElementList(),a=o[e].trList;if(t===a.length-1)i.setPositionContext({isTable:!1}),h=e,d=h,n.getTableTool().dispose();else{let o=-1,l=-1;const c=a[t].tdList[r].colIndex;e:for(let e=t+1;e<a.length;e++){const t=a[e],n=t.tdList;for(let r=0;r<n.length;r++){const t=n[r];if(t.colIndex===c||t.colIndex+t.colspan-1>=c&&t.colIndex<=c){o=e,l=r;break e}}}if(!~o||!~l)return;const u=a[o],m=u.tdList[l];i.setPositionContext({isTable:!0,index:e,trIndex:o,tdIndex:l,tdId:m.id,trId:u.id,tableId:s}),h=m.value.length-1,d=h,n.getTableTool().render()}}}else{let t=s;e.shiftKey&&(t=a===s.index?c[l]:c[a]);const{index:r,rowNo:o,rowIndex:m,coordinate:{rightTop:[g]}}=t;if(u&&0===m||!u&&m===n.getRowCount()-1)return;const p=qn({positionList:c,index:r,rowNo:o,isUp:u,cursorX:g});if(p<0)return;h=p,d=p,e.shiftKey&&(a!==l?a===s.index?h=a:d=l:u?d=l:h=a);const f=n.getElementList(),R=f[p];if(R.type===de.TABLE){const{scale:e}=n.getOptions(),t=n.getMargins(),r=R.trList;let s=-1,o=-1,a=-1;if(u)e:for(let n=r.length-1;n>=0;n--){const i=r[n],l=i.tdList;for(let r=0;r<l.length;r++){const i=l[r],c=i.x*e+t[3],h=i.width*e;if(g>=c&&g<=c+h){const e=i.positionList,t=e[e.length-1],l=qn({positionList:e,index:t.index+1,rowNo:t.rowNo-1,isUp:u,cursorX:g})||t.index;s=n,o=r,a=l;break e}}}else e:for(let n=0;n<r.length;n++){const i=r[n],l=i.tdList;for(let r=0;r<l.length;r++){const i=l[r],c=i.x*e+t[3],h=i.width*e;if(g>=c&&g<=c+h){const e=i.positionList,t=qn({positionList:e,index:-1,rowNo:-1,isUp:u,cursorX:g})||0;s=n,o=r,a=t;break e}}}if(~s&&~o&&~a){const e=r[s],t=e.tdList[o];i.setPositionContext({isTable:!0,index:p,trIndex:s,tdIndex:o,tdId:t.id,trId:e.id,tableId:R.id}),h=a,d=h,c=i.getPositionList(),n.getTableTool().render()}}}if(!~h||!~d)return;h>d&&([h,d]=[d,h]),o.setRange(h,d);const g=h===d;n.render({curIndex:g?h:void 0,isSetCursor:g,isSubmitHistory:!1,isCompute:!1}),n.getCursor().moveCursorToVisible({cursorPosition:c[u?h:d],direction:u?he.UP:he.DOWN})}function tr(e,t){if(t.isComposing)return;const n=t.getDraw();if(e.key===Dn.Backspace)Kn(e,t);else if(e.key===Dn.Delete)Gn(e,t);else if(e.key===Dn.Enter)Bn(e,t);else if(e.key===Dn.Left)Jn(e,t);else if(e.key===Dn.Right)zn(e,t);else if(e.key===Dn.Up||e.key===Dn.Down)er(e,t);else if(xn(e)&&e.key===Dn.Z){if(n.isReadonly()&&n.getMode()!==kt.FORM)return;n.getHistoryManager().undo(),e.preventDefault()}else if(xn(e)&&e.key===Dn.Y){if(n.isReadonly()&&n.getMode()!==kt.FORM)return;n.getHistoryManager().redo(),e.preventDefault()}else if(xn(e)&&e.key===Dn.C)t.copy(),e.preventDefault();else if(xn(e)&&e.key===Dn.X)t.cut(),e.preventDefault();else if(xn(e)&&e.key===Dn.A)t.selectAll(),e.preventDefault();else if(xn(e)&&e.key===Dn.S){if(n.isReadonly())return;const t=n.getListener();t.saved&&t.saved(n.getValue());const r=n.getEventBus();r.isSubscribe("saved")&&r.emit("saved",n.getValue()),e.preventDefault()}else if(e.key===Dn.ESC){t.clearPainterStyle();const r=n.getZone();r.isMainActive()||r.setZone(Vt.MAIN),e.preventDefault()}else e.key===Dn.TAB&&$n(e,t)}function nr(e,t){var n;const r=t.getDraw();if(r.isReadonly()||r.isDisabled())return;const i=r.getPosition(),s=i.getCursorPosition();if(!e||!s)return;const o=t.isComposing;if(o&&(null==(n=t.compositionInfo)?void 0:n.value)===e)return;const a=r.getRange();if(!a.getIsCanInput())return;if(rr(t),!o){const e=r.getCursor();e.clearAgentDomValue()}const{TEXT:l,HYPERLINK:c,SUBSCRIPT:u,SUPERSCRIPT:h,DATE:d}=de,m=e.replaceAll("\n",M),{startIndex:g,endIndex:p}=a.getRange(),f=r.getElementList(),R=a.getRangeAnchorStyle(f,p);if(!R)return;const y=r.isDesignMode(),S=U(m).map(e=>{var t,n;const r={value:e};if(y||!(null==(t=R.title)?void 0:t.disabled)&&!(null==(n=R.control)?void 0:n.disabled)){const e=f[p+1];(!R.type||R.type===l||R.type===c&&(null==e?void 0:e.type)===c||R.type===d&&(null==e?void 0:e.type)===d||R.type===u&&(null==e?void 0:e.type)===u||R.type===h&&(null==e?void 0:e.type)===h)&&pe.forEach(t=>{if("groupIds"===t&&!(null==e?void 0:e.groupIds))return;const n=R[t];void 0!==n&&(r[t]=n)}),o&&(r.underline=!0)}return r}),b=r.getControl();let w;if(b.getActiveControl()&&b.getIsRangeWithinControl())w=b.setValue(S);else{const e=g+1;g!==p&&r.spliceElementList(f,e,p-g),rn(f,S,g,{editorOptions:r.getOptions()}),r.spliceElementList(f,e,0,...S),w=g+S.length}~w&&(a.setRange(w,w),r.render({curIndex:w,isSubmitHistory:!o})),o&&(t.compositionInfo={elementList:f,value:m,startIndex:w-S.length,endIndex:w})}function rr(e){if(!e.compositionInfo)return;const{elementList:t,startIndex:n,endIndex:r}=e.compositionInfo;t.splice(n+1,r-n);const i=e.getDraw().getRange();i.setRange(n,n),e.compositionInfo=null}function ir(e){const t=e.getDraw(),n=t.getRange(),{startIndex:r,endIndex:i}=n.getRange();if(!~r&&!~r)return;if(t.isReadonly()||!n.getIsCanInput())return;const s=t.getElementList();let o=r,a=i;if(r===i){const e=t.getPosition(),n=e.getPositionList(),i=n[r],s=i.rowNo,l=i.pageNo,c=[];for(let t=0;t<n.length;t++){const e=n[t];if(e.pageNo>l)break;e.pageNo===l&&e.rowNo===s&&c.push(t)}const u=c[0]-1;o=u<0?0:u,a=c[c.length-1]}const l=t.getOptions();bn(s.slice(o+1,a+1),l);const c=t.getControl();let u;c.getActiveControl()&&c.getIsRangeWithinControl()?u=c.cut():(t.spliceElementList(s,o+1,a-o),u=o),n.setRange(u,u),t.render({curIndex:u})}function sr(e,t){const n=e.getDraw(),{copy:r}=n.getOverride();if(r){const e=r();if(!1!==(null==e?void 0:e.preventDefault))return}const i=n.getRange();let s=null;const o=i.getRange();if(o.isCrossRowCol){const e=i.getRangeTableElement();if(!e)return;const t=n.getTableParticle().getRangeRowCol();if(!t)return;const r={type:de.TABLE,value:"",colgroup:[],trList:[]},o=t[0],a=o[0].colIndex,l=o[o.length-1],c=l.colIndex+l.colspan-1;for(let n=a;n<=c;n++)r.colgroup.push(e.colgroup[n]);for(let n=0;n<t.length;n++){const i=t[n],s=e.trList[i[0].rowIndex],o={tdList:[],height:s.height,minHeight:s.minHeight};for(let e=0;e<i.length;e++)o.tdList.push(i[e]);r.trList.push(o)}s=zt([r])}else s=i.getIsCollapsed()?i.getRangeRowElementList():i.getSelectionElementList();(null==t?void 0:t.isPlainText)&&(null==s?void 0:s.length)&&(s=[{value:hn(s)}]),(null==s?void 0:s.length)&&bn(s,n.getOptions())}function or(e,t){var n,r;const i=t.getDraw(),{drop:s}=i.getOverride();if(s){const t=s(e);if(!1!==(null==t?void 0:t.preventDefault))return}e.preventDefault();const o=null==(n=e.dataTransfer)?void 0:n.getData("text");if(o)t.input(o);else{const n=null==(r=e.dataTransfer)?void 0:r.files;if(!n)return;for(let e=0;e<n.length;e++){const r=n[e];r.type.startsWith("image")&&vn(t,r)}}}function ar(e){var t;if(!Intl.Segmenter)return null;const n=e.getDraw(),r=n.getPosition().getCursorPosition();if(!r)return null;const i=n.getRange(),s=i.getRangeParagraphInfo();if(!s)return null;const o=(null==(t=null==s?void 0:s.elementList)?void 0:t.map(e=>!e.type||e.type!==de.CONTROL&&ve.includes(e.type)?e.value:M).join(""))||"";if(!o)return null;const a=r.index,l=s.startIndex,c=new Intl.Segmenter(void 0,{granularity:"word"}),u=c.segment(o);let h=-1,d=-1;for(const{segment:m,index:g,isWordLike:p}of u){const e=g+l;if(p&&a>=e&&a<e+m.length){h=e-1,d=h+m.length;break}}return~h&&~d?{startIndex:h,endIndex:d}:null}function lr(e){const t=e.getDraw(),n=t.getPosition().getCursorPosition();if(!n)return null;const{value:r,index:i}=n,s=t.getLetterReg();let o=0,a=0;const l=L.test(r);if(l||s.test(r)){const e=t.getElementList();let n=i-1;while(n>0){const t=e[n].value;if(!(l&&L.test(t)||!l&&s.test(t)))break;o++,n--}let r=i+1;while(r<e.length){const t=e[r].value;if(!(l&&L.test(t)||!l&&s.test(t)))break;a++,r++}}const c=i-o-1;return c<0?null:{startIndex:c,endIndex:i+a}}function cr(e,t){const n=e.getDraw(),r=n.getPosition(),i=r.getPositionByXY({x:t.offsetX,y:t.offsetY});if(i.isImage&&i.isDirectHit)return void n.getPreviewer().render();if(n.getIsPagingMode()&&!~i.index&&i.zone)return n.getZone().setZone(i.zone),n.clearSideEffect(),void r.setPositionContext({isTable:!1});if((i.isCheckbox||i.isRadio)&&i.isDirectHit)return;const s=n.getRange(),o=ar(e)||lr(e);o&&(s.setRange(o.startIndex,o.endIndex),n.render({isSubmitHistory:!1,isSetCursor:!1,isCompute:!1}),s.setRangeStyle())}function ur(e){var t,n;const r=e.getDraw(),i=r.getPosition(),s=i.getCursorPosition();if(!s)return;const{index:o}=s,a=r.getElementList();let l=0,c=0,u=o-1;while(u>0){const e=a[u],t=a[u-1];if(e.value===M&&!e.listWrap||e.listId!==(null==t?void 0:t.listId)||e.titleId!==(null==t?void 0:t.titleId))break;l++,u--}let h=o+1;while(h<a.length){const e=a[h],t=a[h+1];if(e.value===M&&!e.listWrap||e.listId!==(null==t?void 0:t.listId)||e.titleId!==(null==t?void 0:t.titleId))break;c++,h++}const d=r.getRange();let m=o-l-1;if((null==(t=a[m])?void 0:t.value)!==M&&(m-=1),m<0)return;let g=o+c+1;((null==(n=a[g])?void 0:n.value)===M||g>a.length-1)&&(g-=1),d.setRange(m,g),r.render({isSubmitHistory:!1,isSetCursor:!1,isCompute:!1})}var hr={dblclick:cr,threeClick:ur};function dr(e){e.isComposing=!0}function mr(e,t){e.isComposing=!1;const n=e.getDraw();if(t.data)setTimeout(()=>{e.compositionInfo&&nr(t.data,e)},1);else{rr(e);const t=n.getRange(),{endIndex:r}=t.getRange();n.render({curIndex:r,isSubmitHistory:!1})}const r=n.getCursor();r.clearAgentDomValue()}var gr={compositionstart:dr,compositionend:mr};function pr(e,t){const n=t.getDraw(),r=n.isReadonly();if(r)return;e.preventDefault();const i=n.getPageContainer(),s=k(e.target,e=>e===i,!0);if(!s)return;const o=e.target,a=o.dataset.index;a&&n.setPageNo(Number(a));const l=n.getPosition(),c=l.adjustPositionContext({x:e.offsetX,y:e.offsetY});if(!c)return;const{isTable:u,tdValueIndex:h,index:d}=c,m=l.getPositionList(),g=u?h:d;if(~d){const e=n.getRange();e.setRange(g,g),l.setCursorPosition(m[g])}const p=n.getCursor(),{cursor:{dragColor:f,dragWidth:R}}=n.getOptions();p.drawCursor({width:R,color:f,isBlink:!1,isFocus:!1})}var fr,Rr,yr,Mr,Sr,br,wr={dragover:pr};class Tr{constructor(e){d(this,"isAllowSelection"),d(this,"isComposing"),d(this,"compositionInfo"),d(this,"isAllowDrag"),d(this,"isAllowDrop"),d(this,"cacheRange"),d(this,"cacheElementList"),d(this,"cachePositionList"),d(this,"cachePositionContext"),d(this,"mouseDownStartPosition"),d(this,"draw"),d(this,"pageContainer"),d(this,"pageList"),d(this,"range"),d(this,"position"),this.draw=e,this.pageContainer=e.getPageContainer(),this.pageList=e.getPageList(),this.range=this.draw.getRange(),this.position=this.draw.getPosition(),this.isAllowSelection=!1,this.isComposing=!1,this.compositionInfo=null,this.isAllowDrag=!1,this.isAllowDrop=!1,this.cacheRange=null,this.cacheElementList=null,this.cachePositionList=null,this.cachePositionContext=null,this.mouseDownStartPosition=null}getDraw(){return this.draw}register(){this.pageContainer.addEventListener("click",this.click.bind(this)),this.pageContainer.addEventListener("mousedown",this.mousedown.bind(this)),this.pageContainer.addEventListener("mouseup",this.mouseup.bind(this)),this.pageContainer.addEventListener("mouseleave",this.mouseleave.bind(this)),this.pageContainer.addEventListener("mousemove",this.mousemove.bind(this)),this.pageContainer.addEventListener("dblclick",this.dblclick.bind(this)),this.pageContainer.addEventListener("dragover",this.dragover.bind(this)),this.pageContainer.addEventListener("drop",this.drop.bind(this)),X(this.pageContainer,this.threeClick.bind(this))}setIsAllowSelection(e){this.isAllowSelection=e,e||this.applyPainterStyle()}setIsAllowDrag(e){this.isAllowDrag=e,this.isAllowDrop=e}clearPainterStyle(){this.pageList.forEach(e=>{e.style.cursor="text"}),this.draw.setPainterStyle(null)}applyPainterStyle(){const e=this.draw.getPainterStyle();if(!e)return;const t=this.draw.isReadonly()||this.draw.isDisabled();if(t)return;const n=this.range.getSelection();if(!n)return;const r=Object.keys(e);n.forEach(t=>{r.forEach(n=>{const r=n;t[r]=e[r]})}),this.draw.render({isSetCursor:!1});const i=this.draw.getPainterOptions();i&&i.isDblclick||this.clearPainterStyle()}selectAll(){const e=this.position.getPositionList();this.range.setRange(0,e.length-1),this.draw.render({isSubmitHistory:!1,isSetCursor:!1,isCompute:!1})}mousemove(e){Qn(e,this)}mousedown(e){Vn(e,this)}click(){Pn&&!this.draw.isReadonly()&&this.draw.getCursor().getAgentDom().focus()}mouseup(e){jn(e,this)}mouseleave(e){Zn(e,this)}keydown(e){tr(e,this)}dblclick(e){hr.dblclick(this,e)}threeClick(){hr.threeClick(this)}input(e){nr(e,this)}cut(){ir(this)}copy(e){sr(this,e)}compositionstart(){gr.compositionstart(this)}compositionend(e){gr.compositionend(this,e)}drop(e){or(e,this)}dragover(e){wr.dragover(e,this)}}class Or{constructor(e,t){d(this,"draw"),d(this,"options"),d(this,"cursor"),d(this,"canvasEvent"),d(this,"range"),d(this,"previewer"),d(this,"tableTool"),d(this,"hyperlinkParticle"),d(this,"control"),d(this,"dateParticle"),d(this,"imageParticle"),d(this,"dprMediaQueryList"),d(this,"clearSideEffect",e=>{if(!this.cursor)return;const t=(null==e?void 0:e.composedPath()[0])||e.target,n=this.draw.getPageList(),r=k(t,e=>n.includes(e),!0);if(r)return void this.setRangeStyle();const i=k(t,e=>!!e&&1===e.nodeType&&!!e.getAttribute(le),!0);if(i)return this.setRangeStyle(),void this.watchCursorActive();this.cursor.recoveryCursor(),this.range.recoveryRangeStyle(),this.previewer.clearResizer(),this.tableTool.dispose(),this.hyperlinkParticle.clearHyperlinkPopup(),this.control.destroyControl(),this.dateParticle.clearDatePicker(),this.imageParticle.destroyFloatImage()}),d(this,"setCanvasEventAbility",()=>{this.canvasEvent.setIsAllowDrag(!1),this.canvasEvent.setIsAllowSelection(!1)}),d(this,"setRangeStyle",()=>{this.range.setRangeStyle()}),d(this,"setPageScale",e=>{if(!e.ctrlKey)return;e.preventDefault();const{scale:t}=this.options;if(e.deltaY<0){const e=10*t+1;e<=30&&this.draw.setPageScale(e/10)}else{const e=10*t-1;e>=5&&this.draw.setPageScale(e/10)}}),d(this,"_handleVisibilityChange",()=>{if("visible"===document.visibilityState){const e=this.range.getRange(),t=!!~e.startIndex&&!!~e.endIndex&&e.startIndex===e.endIndex;this.range.replaceRange(e),this.draw.render({isSetCursor:t,isCompute:!1,isSubmitHistory:!1,curIndex:e.startIndex})}}),d(this,"_handleDprChange",()=>{this.draw.setPageDevicePixel()}),this.draw=e,this.options=e.getOptions(),this.canvasEvent=t,this.cursor=null,this.range=e.getRange(),this.previewer=e.getPreviewer(),this.tableTool=e.getTableTool(),this.hyperlinkParticle=e.getHyperlinkParticle(),this.dateParticle=e.getDateParticle(),this.imageParticle=e.getImageParticle(),this.control=e.getControl(),this.dprMediaQueryList=window.matchMedia(`(resolution: ${window.devicePixelRatio}dppx)`)}register(){this.cursor=this.draw.getCursor(),this.addEvent()}addEvent(){window.addEventListener("blur",this.clearSideEffect),document.addEventListener("keyup",this.setRangeStyle),document.addEventListener("click",this.clearSideEffect),document.addEventListener("mouseup",this.setCanvasEventAbility),document.addEventListener("wheel",this.setPageScale,{passive:!1}),document.addEventListener("visibilitychange",this._handleVisibilityChange),this.dprMediaQueryList.addEventListener("change",this._handleDprChange)}removeEvent(){window.removeEventListener("blur",this.clearSideEffect),document.removeEventListener("keyup",this.setRangeStyle),document.removeEventListener("click",this.clearSideEffect),document.removeEventListener("mouseup",this.setCanvasEventAbility),document.removeEventListener("wheel",this.setPageScale),document.removeEventListener("visibilitychange",this._handleVisibilityChange),this.dprMediaQueryList.removeEventListener("change",this._handleDprChange)}watchCursorActive(){this.range.getIsCollapsed()&&setTimeout(()=>{var e,t;(null==(e=this.cursor)?void 0:e.getAgentIsActive())||null==(t=this.cursor)||t.drawCursor({isFocus:!1,isBlink:!1})})}}class vr{constructor(e){d(this,"undoStack",[]),d(this,"redoStack",[]),d(this,"maxRecordCount"),this.maxRecordCount=e.getOptions().historyMaxRecordCount+1}undo(){if(this.undoStack.length>1){const e=this.undoStack.pop();this.redoStack.push(e),this.undoStack.length&&this.undoStack[this.undoStack.length-1]()}}redo(){if(this.redoStack.length){const e=this.redoStack.pop();this.undoStack.push(e),e()}}execute(e){this.undoStack.push(e),this.redoStack.length&&(this.redoStack=[]);while(this.undoStack.length>this.maxRecordCount)this.undoStack.shift()}isCanUndo(){return this.undoStack.length>1}isCanRedo(){return!!this.redoStack.length}isStackEmpty(){return!this.undoStack.length&&!this.redoStack.length}recovery(){this.undoStack=[],this.redoStack=[]}popUndo(){return this.undoStack.pop()}}class Er{constructor(e){d(this,"cursorPosition"),d(this,"positionContext"),d(this,"positionList"),d(this,"floatPositionList"),d(this,"draw"),d(this,"eventBus"),d(this,"options"),this.positionList=[],this.floatPositionList=[],this.cursorPosition=null,this.positionContext={isTable:!1,isControl:!1},this.draw=e,this.eventBus=e.getEventBus(),this.options=e.getOptions()}getFloatPositionList(){return this.floatPositionList}getTablePositionList(e){const{index:t,trIndex:n,tdIndex:r}=this.positionContext;return e[t].trList[n].tdList[r].positionList||[]}getPositionList(){return this.positionContext.isTable?this.getTablePositionList(this.draw.getOriginalElementList()):this.getOriginalPositionList()}getMainPositionList(){return this.positionContext.isTable?this.getTablePositionList(this.draw.getOriginalMainElementList()):this.positionList}getOriginalPositionList(){const e=this.draw.getZone();if(e.isHeaderActive()){const e=this.draw.getHeader();return e.getPositionList()}if(e.isFooterActive()){const e=this.draw.getFooter();return e.getPositionList()}return this.positionList}getOriginalMainPositionList(){return this.positionList}getSelectionPositionList(){const{startIndex:e,endIndex:t}=this.draw.getRange().getRange();if(e===t)return null;const n=this.getPositionList();return n.slice(e+1,t+1)}setPositionList(e){this.positionList=e}setFloatPositionList(e){this.floatPositionList=e}computePageRowPosition(e){const{positionList:t,rowList:n,pageNo:r,startX:i,startY:s,startRowIndex:o,startIndex:a,innerWidth:l,zone:c}=e,{scale:u,table:{tdPadding:h}}=this.options;let d=i,m=s,g=a;for(let p=0;p<n.length;p++){const s=n[p];if(!s.isSurround){const e=s.width+(s.offsetX||0);s.rowFlex===C.CENTER?d+=(l-e)/2:s.rowFlex===C.RIGHT&&(d+=l-e)}d+=s.offsetX||0,m+=s.offsetY||0;const a=d,R=m;for(let n=0;n<s.elementList.length;n++){const i=s.elementList[n],l=i.metrics,y=i.imgDisplay!==f.INLINE&&i.type===de.IMAGE||i.type===de.LATEX?s.ascent-l.height:s.ascent;i.left&&(d+=i.left);const M={pageNo:r,index:g,value:i.value,rowIndex:o+p,rowNo:p,metrics:l,left:i.left||0,ascent:y,lineHeight:s.height,isFirstLetter:0===n,isLastLetter:n===s.elementList.length-1,coordinate:{leftTop:[d,m],leftBottom:[d,m+s.height],rightTop:[d+l.width,m],rightBottom:[d+l.width,m+s.height]}};if(i.imgDisplay===f.SURROUND||i.imgDisplay===f.FLOAT_TOP||i.imgDisplay===f.FLOAT_BOTTOM){const n=t[t.length-1];n&&(M.metrics=n.metrics,M.coordinate=n.coordinate),i.imgFloatPosition||(i.imgFloatPosition={x:d,y:m,pageNo:r}),this.floatPositionList.push({pageNo:r,element:i,position:M,isTable:e.isTable,index:e.index,tdIndex:e.tdIndex,trIndex:e.trIndex,tdValueIndex:g,zone:c})}if(t.push(M),g++,d+=l.width,i.type===de.TABLE){const e=h[1]+h[3],t=h[0]+h[2];for(let n=0;n<i.trList.length;n++){const s=i.trList[n];for(let i=0;i<s.tdList.length;i++){const o=s.tdList[i];o.positionList=[];const l=o.rowList,p=this.computePageRowPosition({positionList:o.positionList,rowList:l,pageNo:r,startRowIndex:0,startIndex:0,startX:(o.x+h[3])*u+a,startY:(o.y+h[0])*u+R,innerWidth:(o.width-e)*u,isTable:!0,index:g-1,tdIndex:i,trIndex:n,zone:c});if(o.verticalAlign===yt.MIDDLE||o.verticalAlign===yt.BOTTOM){const e=l.reduce((e,t)=>e+t.height,0),n=(o.height-t)*u-e,r=o.verticalAlign===yt.MIDDLE?n/2:n;Math.floor(r)>0&&o.positionList.forEach(e=>{const{coordinate:{leftTop:t,leftBottom:n,rightBottom:i,rightTop:s}}=e;t[1]+=r,n[1]+=r,i[1]+=r,s[1]+=r})}d=p.x,m=p.y}}d=a,m=R}}d=i,m+=s.height}return{x:d,y:m,index:g}}computePositionList(){var e;this.positionList=[];const t=this.draw.getInnerWidth(),n=this.draw.getPageRowList(),r=this.draw.getMargins(),i=r[3],s=this.draw.getHeader(),o=s.getExtraHeight(),a=r[0]+o;let l=0;for(let c=0;c<n.length;c++){const r=n[c],s=null==(e=r[0])?void 0:e.startIndex;this.computePageRowPosition({positionList:this.positionList,rowList:r,pageNo:c,startRowIndex:l,startIndex:s,startX:i,startY:a,innerWidth:t}),l+=r.length}}computeRowPosition(e){const{row:t,innerWidth:n}=e,r=[];return this.computePageRowPosition({positionList:r,innerWidth:n,rowList:[Y(t)],pageNo:0,startX:0,startY:0,startIndex:0,startRowIndex:0}),r}setCursorPosition(e){this.cursorPosition=e}getCursorPosition(){return this.cursorPosition}getPositionContext(){return this.positionContext}setPositionContext(e){this.eventBus.emit("positionContextChange",{value:e,oldValue:this.positionContext}),this.positionContext=e}getPositionByXY(e){var t,n,r,i,s;const{x:o,y:a,isTable:l}=e;let{elementList:c,positionList:d}=e;c||(c=this.draw.getOriginalElementList()),d||(d=this.getOriginalPositionList());const m=this.draw.getZone(),g=null!=(t=e.pageNo)?t:this.draw.getPageNo(),p=m.isMainActive(),R=p?g:0;if(!l){const t=this.getFloatPositionByXY(h(u({},e),{imgDisplays:[f.FLOAT_TOP,f.SURROUND]}));if(t)return t}for(let u=0;u<d.length;u++){const{index:e,pageNo:t,left:n,isFirstLetter:r,coordinate:{leftTop:i,rightTop:s,leftBottom:l}}=d[u];if(R===t){if(t>R)break;if(i[0]-n<=o&&s[0]>=o&&i[1]<=a&&l[1]>=a){let t=u;const n=c[u];if(n.type===de.TABLE)for(let r=0;r<n.trList.length;r++){const t=n.trList[r];for(let i=0;i<t.tdList.length;i++){const s=t.tdList[i],l=this.getPositionByXY({x:o,y:a,td:s,pageNo:g,tablePosition:d[u],isTable:!0,elementList:s.value,positionList:s.positionList});if(~l.index){const{index:o,hitLineStartIndex:a}=l,c=s.value[o];return{index:e,isCheckbox:l.isCheckbox||c.type===de.CHECKBOX||c.controlComponent===dt.CHECKBOX,isRadio:c.type===de.RADIO||c.controlComponent===dt.RADIO,isControl:!!c.controlId,isImage:l.isImage,isDirectHit:l.isDirectHit,isTable:!0,tdIndex:i,trIndex:r,tdValueIndex:o,tdId:s.id,trId:t.id,tableId:n.id,hitLineStartIndex:a}}}}if(n.type===de.IMAGE||n.type===de.LATEX)return{index:t,isDirectHit:!0,isImage:!0};if(n.type===de.CHECKBOX||n.controlComponent===dt.CHECKBOX)return{index:t,isDirectHit:!0,isCheckbox:!0};if(n.type===de.RADIO||n.controlComponent===dt.RADIO)return{index:t,isDirectHit:!0,isRadio:!0};let l;if(c[e].value!==M){const e=s[0]-i[0];o<i[0]+e/2&&(t=u-1,r&&(l=u))}return{isDirectHit:!0,hitLineStartIndex:l,index:t,isControl:!!n.controlId}}}}if(!l){const t=this.getFloatPositionByXY(h(u({},e),{imgDisplays:[f.FLOAT_BOTTOM]}));if(t)return t}let y,S=!1,b=-1;if(l){const{scale:t}=this.options,{td:n,tablePosition:r}=e;if(n&&r){const{leftTop:e}=r.coordinate,i=n.x*t+e[0],s=n.y*t+e[1],l=n.width*t,c=n.height*t;if(!(i<o&&o<i+l&&s<a&&a<s+c))return{index:b}}}const w=d.filter(e=>e.isLastLetter&&e.pageNo===R);for(let u=0;u<w.length;u++){const{index:e,rowNo:t,coordinate:{leftTop:n,leftBottom:r}}=w[u];if(a>n[1]&&a<=r[1]){const r=d.findIndex(e=>e.pageNo===R&&e.rowNo===t),i=c[r],s=d[r],a=i.listStyle===nt.CHECKBOX?this.options.margins[3]:s.coordinate.leftTop[0];if(o<a)~r?s.value===M?b=r:(b=r-1,y=r):b=e;else{if(i.listStyle===nt.CHECKBOX&&o<n[0])return{index:r,isDirectHit:!0,isCheckbox:!0};b=e}S=!0;break}}if(!S){const e=this.draw.getHeader(),t=e.getHeight(),s=e.getHeaderTop()+t,l=this.draw.getFooter(),c=this.draw.getHeight(),u=c-(l.getFooterBottom()+l.getHeight());if(p){if(a<s)return{index:-1,zone:Vt.HEADER};if(a>u)return{index:-1,zone:Vt.FOOTER}}else if(a<=u&&a>=s)return{index:-1,zone:Vt.MAIN};const h=this.draw.getMargins();if(a<=h[0])for(let r=0;r<d.length;r++){const e=d[r];if(e.pageNo!==R||0!==e.rowNo)continue;const{leftTop:t,rightTop:i}=e.coordinate;if(o<=h[3]||o>=t[0]&&o<=i[0]||0!==(null==(n=d[r+1])?void 0:n.rowNo))return{index:e.index}}else{const e=w[w.length-1];if(e){const t=e.rowNo;for(let e=0;e<d.length;e++){const n=d[e];if(n.pageNo!==R||n.rowNo!==t)continue;const{leftTop:i,rightTop:s}=n.coordinate;if(o<=h[3]||o>=i[0]&&o<=s[0]||(null==(r=d[e+1])?void 0:r.rowNo)!==t)return{index:n.index}}}}return{index:(null==(i=w[w.length-1])?void 0:i.index)||d.length-1}}return{hitLineStartIndex:y,index:b,isControl:!!(null==(s=c[b])?void 0:s.controlId)}}getFloatPositionByXY(e){var t;const{x:n,y:r}=e,i=null!=(t=e.pageNo)?t:this.draw.getPageNo(),s=this.draw.getZone().getZone();for(let o=0;o<this.floatPositionList.length;o++){const{position:t,element:a,isTable:l,index:c,trIndex:u,tdIndex:h,tdValueIndex:d,zone:m,pageNo:g}=this.floatPositionList[o];if(i===g&&a.type===de.IMAGE&&a.imgDisplay&&e.imgDisplays.includes(a.imgDisplay)&&(!m||m===s)){const e=a.imgFloatPosition;if(n>=e.x&&n<=e.x+a.width&&r>=e.y&&r<=e.y+a.height)return l?{index:c,isDirectHit:!0,isImage:!0,isTable:l,trIndex:u,tdIndex:h,tdValueIndex:d,tdId:a.tdId,trId:a.trId,tableId:a.tableId}:{index:t.index,isDirectHit:!0,isImage:!0}}}}adjustPositionContext(e){const t=this.getPositionByXY(e);if(!~t.index)return null;if(t.isControl&&this.draw.getMode()!==kt.READONLY){const{index:e,isTable:n,trIndex:r,tdIndex:i,tdValueIndex:s}=t,o=this.draw.getControl(),{newIndex:a}=o.moveCursor({index:e,isTable:n,trIndex:r,tdIndex:i,tdValueIndex:s});n?t.tdValueIndex=a:t.index=a}const{index:n,isCheckbox:r,isRadio:i,isControl:s,isImage:o,isDirectHit:a,isTable:l,trIndex:c,tdIndex:u,tdId:h,trId:d,tableId:m}=t;return this.setPositionContext({isTable:l||!1,isCheckbox:r||!1,isRadio:i||!1,isControl:s||!1,isImage:o||!1,isDirectHit:a||!1,index:n,trIndex:c,tdIndex:u,tdId:h,trId:d,tableId:m}),t}setSurroundPosition(e){var t;const{pageNo:n,row:r,rowElement:i,rowElementRect:s,surroundElementList:o,availableWidth:a}=e;let l=s.x,c=0;if(o.length&&!mn(i)&&!(null==(t=i.control)?void 0:t.minWidth))for(let d=0;d<o.length;d++){const e=o[d],t=e.imgFloatPosition;if(t.pageNo!==n)continue;const m=h(u({},t),{width:e.width,height:e.height});if(re(s,m)){r.isSurround=!0;const e=m.width+m.x-s.x;if(i.left=e,r.width+=e,c+=e,l=m.x+m.width,r.width+i.metrics.width>a){i.left=0,r.width-=c;break}}}return{x:l,rowIncreaseWidth:c}}}class Cr{constructor(e){d(this,"draw"),d(this,"options"),d(this,"range"),d(this,"listener"),d(this,"eventBus"),d(this,"position"),d(this,"historyManager"),d(this,"defaultStyle"),this.draw=e,this.options=e.getOptions(),this.listener=e.getListener(),this.eventBus=e.getEventBus(),this.position=e.getPosition(),this.historyManager=e.getHistoryManager(),this.range={startIndex:-1,endIndex:-1},this.defaultStyle=null}getRange(){return this.range}clearRange(){this.setRange(-1,-1)}setDefaultStyle(e){this.defaultStyle=e?u(u({},this.defaultStyle),e):null}getDefaultStyle(){return this.defaultStyle}getRangeAnchorStyle(e,t){const n=nn(e,t);return n?u(u({},n),this.defaultStyle):null}getIsCollapsed(){const{startIndex:e,endIndex:t}=this.range;return e===t}getIsSelection(){const{startIndex:e,endIndex:t}=this.range;return!(!~e&&!~t)&&e!==t}getSelection(){const{startIndex:e,endIndex:t}=this.range;if(e===t)return null;const n=this.draw.getElementList();return n.slice(e+1,t+1)}getSelectionElementList(){if(this.range.isCrossRowCol){const e=this.draw.getTableParticle().getRangeRowCol();if(!e)return null;const t=[];for(let n=0;n<e.length;n++){const r=e[n];for(let e=0;e<r.length;e++){const n=r[e];t.push(...n.value)}}return t}return this.getSelection()}getTextLikeSelection(){const e=this.getSelection();return e?e.filter(e=>!e.type||ve.includes(e.type)):null}getTextLikeSelectionElementList(){const e=this.getSelectionElementList();return e?e.filter(e=>!e.type||ve.includes(e.type)):null}getRangeRow(){const{startIndex:e,endIndex:t}=this.range;if(!~e&&!~t)return null;const n=this.position.getPositionList(),r=new Map;for(let i=e;i<t+1;i++){const{pageNo:e,rowNo:t}=n[i],s=r.get(e);s?s.has(t)||s.add(t):r.set(e,new Set([t]))}return r}getRangeRowElementList(){const{startIndex:e,endIndex:t,isCrossRowCol:n}=this.range;if(!~e&&!~t)return null;if(n)return this.getSelectionElementList();const r=this.getRangeRow();if(!r)return null;const i=this.position.getPositionList(),s=this.draw.getElementList(),o=[];for(let a=0;a<i.length;a++){const e=i[a],t=r.get(e.pageNo);t&&(t.has(e.rowNo)&&o.push(s[a]))}return o}getRangeParagraph(){const{startIndex:e,endIndex:t}=this.range;if(!~e&&!~t)return null;const n=this.position.getPositionList(),r=this.draw.getElementList(),i=new Map;let s=e;while(s>=0){const{pageNo:e,rowNo:t}=n[s];let o=i.get(e);o||(o=[],i.set(e,o)),o.includes(t)||o.unshift(t);const a=r[s],l=r[s-1];if(a.value===M&&!a.listWrap||a.listId!==(null==l?void 0:l.listId)||a.titleId!==(null==l?void 0:l.titleId))break;s--}const o=e===t;if(!o){let r=e+1;while(r<t){const{pageNo:e,rowNo:t}=n[r];let s=i.get(e);s||(s=[],i.set(e,s)),s.includes(t)||s.push(t),r++}}let a=t;o&&r[e].value===M&&(a+=1);while(a<n.length){const e=r[a],t=r[a+1];if(e.value===M&&!e.listWrap||e.listId!==(null==t?void 0:t.listId)||e.titleId!==(null==t?void 0:t.titleId))break;const{pageNo:s,rowNo:o}=n[a];let l=i.get(s);l||(l=[],i.set(s,l)),l.includes(o)||l.push(o),a++}return i}getRangeParagraphInfo(){const{startIndex:e,endIndex:t}=this.range;if(!~e&&!~t)return null;let n=-1;const r=[],i=this.getRangeParagraph();if(!i)return null;const s=this.draw.getElementList(),o=this.position.getPositionList();for(let a=0;a<o.length;a++){const e=o[a],t=i.get(e.pageNo);t&&(t.includes(e.rowNo)&&(~n||(n=e.index),r.push(s[a])))}return r.length?{elementList:r,startIndex:n}:null}getRangeParagraphElementList(){var e;return(null==(e=this.getRangeParagraphInfo())?void 0:e.elementList)||null}getRangeTableElement(){const e=this.position.getPositionContext();if(!e.isTable)return null;const t=this.draw.getOriginalElementList();return t[e.index]}getIsSelectAll(){const e=this.draw.getElementList(),{startIndex:t,endIndex:n}=this.range;return 0===t&&e.length-1===n&&!this.position.getPositionContext().isTable}getIsPointInRange(e,t){const{startIndex:n,endIndex:r}=this.range,i=this.position.getPositionList();for(let s=n+1;s<=r;s++){const n=i[s];if(!n)break;const{coordinate:{leftTop:r,rightBottom:o}}=i[s];if(e>=r[0]&&e<=o[0]&&t>=r[1]&&t<=o[1])return!0}return!1}getKeywordRangeList(e){const t=this.draw.getSearch().getMatchList(e,this.draw.getOriginalElementList()),n=new Map;for(const i of t){const e=n.get(i.groupId);if(e)e.endIndex+=1;else{const{type:e,groupId:t,tableId:r,index:s,tdIndex:o,trIndex:a}=i,l={startIndex:s,endIndex:s};e===Ht.TABLE&&(l.tableId=r,l.startTdIndex=o,l.endTdIndex=o,l.startTrIndex=a,l.endTrIndex=a),n.set(t,l)}}const r=[];return n.forEach(e=>{r.push(e)}),r}getIsCanInput(){var e;const{startIndex:t,endIndex:n}=this.getRange();if(!~t&&!~n)return!1;const r=this.draw.getElementList(),i=r[t];if(t===n)return(i.controlComponent!==dt.PRE_TEXT||(null==(e=r[t+1])?void 0:e.controlComponent)!==dt.PRE_TEXT)&&i.controlComponent!==dt.POST_TEXT;const s=r[n];return!i.controlId&&!s.controlId||(!i.controlId||i.controlComponent===dt.POSTFIX)&&(!s.controlId||s.controlComponent===dt.POSTFIX)||!!i.controlId&&s.controlId===i.controlId&&s.controlComponent!==dt.PRE_TEXT&&s.controlComponent!==dt.POST_TEXT&&s.controlComponent!==dt.POSTFIX}setRange(e,t,n,r,i,s,o){this.range.startIndex=e,this.range.endIndex=t,this.range.tableId=n,this.range.startTdIndex=r,this.range.endTdIndex=i,this.range.startTrIndex=s,this.range.endTrIndex=o,this.range.isCrossRowCol=!!(r||i||s||o),this.setDefaultStyle(null),this.range.zone=this.draw.getZone().getZone();const a=this.draw.getControl();if(~e&&~t){const t=this.draw.getElementList(),n=t[e];if(null==n?void 0:n.controlId)return void a.initControl()}a.destroyControl()}replaceRange(e){this.setRange(e.startIndex,e.endIndex,e.tableId,e.startTdIndex,e.endTdIndex,e.startTrIndex,e.endTrIndex)}setRangeStyle(){var e,t;const n=this.listener.rangeStyleChange,r=this.eventBus.isSubscribe("rangeStyleChange");if(!n&&!r)return;const{startIndex:i,endIndex:s,isCrossRowCol:o}=this.range;if(!~i&&!~s)return;let a;if(o){const e=this.draw.getOriginalElementList(),t=this.position.getPositionContext();a=e[t.index]}else{const e=~s?s:0,t=this.draw.getElementList();a=this.getRangeAnchorStyle(t,e)}if(!a)return;const l=this.getSelection()||[a],c=a.type||de.TEXT,u=a.font||this.options.defaultFont,h=a.size||this.options.defaultSize,d=!~l.findIndex(e=>!e.bold),m=!~l.findIndex(e=>!e.italic),g=!~l.findIndex(e=>{var t;return!e.underline&&!(null==(t=e.control)?void 0:t.underline)}),p=!~l.findIndex(e=>!e.strikeout),f=a.color||null,R=a.highlight||null,y=a.rowFlex||null,M=null!=(e=a.rowMargin)?e:this.options.defaultRowMargin,S=a.dashArray||[],b=a.level||null,w=a.listType||null,T=a.listStyle||null,O=g&&a.textDecoration||null,v=!!this.draw.getPainterStyle(),E=this.historyManager.isCanUndo(),C=this.historyManager.isCanRedo(),L=a.groupIds||null,N=null!=(t=a.extension)?t:null,_={type:c,undo:E,redo:C,painter:v,font:u,size:h,bold:d,italic:m,underline:g,strikeout:p,color:f,highlight:R,rowFlex:y,rowMargin:M,dashArray:S,level:b,listType:w,listStyle:T,groupIds:L,textDecoration:O,extension:N};n&&n(_),r&&this.eventBus.emit("rangeStyleChange",_)}recoveryRangeStyle(){const e=this.listener.rangeStyleChange,t=this.eventBus.isSubscribe("rangeStyleChange");if(!e&&!t)return;const n=this.options.defaultFont,r=this.options.defaultSize,i=this.options.defaultRowMargin,s=!!this.draw.getPainterStyle(),o=this.historyManager.isCanUndo(),a=this.historyManager.isCanRedo(),l={type:null,undo:o,redo:a,painter:s,font:n,size:r,bold:!1,italic:!1,underline:!1,strikeout:!1,color:null,highlight:null,rowFlex:null,rowMargin:i,dashArray:[],level:null,listType:null,listStyle:null,groupIds:null,textDecoration:null,extension:null};e&&e(l),t&&this.eventBus.emit("rangeStyleChange",l)}shrinkBoundary(e={}){const t=e.elementList||this.draw.getElementList(),n=e.range||this.getRange(),{startIndex:r,endIndex:i}=n;if(!~r&&!~i)return;const s=t[r],o=t[i];if(r===i){if(s.controlComponent===dt.PLACEHOLDER){let e=r-1;while(e>0){const r=t[e];if(r.controlId!==s.controlId||r.controlComponent===dt.PREFIX||r.controlComponent===dt.PRE_TEXT){n.startIndex=e,n.endIndex=e;break}e--}}}else{if(s.controlComponent===dt.PLACEHOLDER||o.controlComponent===dt.PLACEHOLDER){let e=i-1;while(e>0){const r=t[e];if(r.controlId!==o.controlId||r.controlComponent===dt.PREFIX||r.controlComponent===dt.PRE_TEXT)return n.startIndex=e,void(n.endIndex=e);e--}}if(s.controlComponent===dt.PREFIX){let e=r+1;while(e<t.length){const r=t[e];if(r.controlId!==s.controlId||r.controlComponent===dt.VALUE){n.startIndex=e-1;break}if(r.controlComponent===dt.PLACEHOLDER)return n.startIndex=e-1,void(n.endIndex=e-1);e++}}if(o.controlComponent!==dt.VALUE){let e=r-1;while(e>0){const r=t[e];if(r.controlId!==s.controlId||r.controlComponent===dt.VALUE){n.startIndex=e;break}if(r.controlComponent===dt.PLACEHOLDER)return n.startIndex=e,void(n.endIndex=e);e--}}}}render(e,t,n,r,i){e.save(),e.globalAlpha=this.options.rangeAlpha,e.fillStyle=this.options.rangeColor,e.fillRect(t,n,r,i),e.restore()}toString(){const e=this.getTextLikeSelection();return e?e.map(e=>e.value).join("").replace(new RegExp(M,"g"),""):""}}class Lr{constructor(e){d(this,"draw"),d(this,"options"),d(this,"imageCache"),this.draw=e,this.options=e.getOptions(),this.imageCache=new Map}_renderBackgroundColor(e,t,n,r){e.save(),e.fillStyle=t,e.fillRect(0,0,n,r),e.restore()}_drawImage(e,t,n,r){const{background:i,scale:s}=this.options;if(i.size===pt.CONTAIN){const o=t.width*s,a=t.height*s;if(i.repeat&&i.repeat!==ft.NO_REPEAT){let l=0,c=0;const u=i.repeat===ft.REPEAT||i.repeat===ft.REPEAT_X?Math.ceil(n*s/o):1,h=i.repeat===ft.REPEAT||i.repeat===ft.REPEAT_Y?Math.ceil(r*s/a):1;for(let n=0;n<u;n++){for(let n=0;n<h;n++)e.drawImage(t,l,c,o,a),c+=a;c=0,l+=o}}else e.drawImage(t,0,0,o,a)}else e.drawImage(t,0,0,n*s,r*s)}_renderBackgroundImage(e,t,n){const{background:r}=this.options,i=this.imageCache.get(r.image);if(i)this._drawImage(e,i,t,n);else{const i=new Image;i.setAttribute("crossOrigin","Anonymous"),i.src=r.image,i.onload=()=>{this.imageCache.set(r.image,i),this._drawImage(e,i,t,n),this.draw.render({isCompute:!1,isSubmitHistory:!1})}}}render(e,t){const{background:{image:n,color:r,applyPageNumbers:i}}=this.options;if(!n||(null==i?void 0:i.length)&&!i.includes(t)){const n=this.draw.getCanvasWidth(t),i=this.draw.getCanvasHeight(t);this._renderBackgroundColor(e,r,n,i)}else{const{width:t,height:n}=this.options;this._renderBackgroundImage(e,t,n)}}}class Nr{constructor(){d(this,"fillRect"),d(this,"fillColor"),d(this,"fillDecorationStyle"),this.fillRect=this.clearFillInfo()}clearFillInfo(){return this.fillColor=void 0,this.fillDecorationStyle=void 0,this.fillRect={x:0,y:0,width:0,height:0},this.fillRect}recordFillInfo(e,t,n,r,i,s,o){const a=!this.fillRect.width;if(!a&&(this.fillColor!==s||this.fillDecorationStyle!==o))return this.render(e),this.clearFillInfo(),void this.recordFillInfo(e,t,n,r,i,s,o);a&&(this.fillRect.x=t,this.fillRect.y=n),i&&this.fillRect.height<i&&(this.fillRect.height=i),this.fillRect.width+=r,this.fillColor=s,this.fillDecorationStyle=o}}class _r extends Nr{constructor(e){super(),d(this,"options"),this.options=e.getOptions()}render(e){if(!this.fillRect.width)return;const{highlightAlpha:t}=this.options,{x:n,y:r,width:i,height:s}=this.fillRect;e.save(),e.globalAlpha=t,e.fillStyle=this.fillColor,e.fillRect(n,r,i,s),e.restore(),this.clearFillInfo()}}class Ir{constructor(e){d(this,"draw"),d(this,"options"),this.draw=e,this.options=e.getOptions()}render(e,t){const{marginIndicatorColor:n,pageMode:r}=this.options,i=this.draw.getWidth(),s=r===Ut.CONTINUITY?this.draw.getCanvasHeight(t)/this.draw.getPagePixelRatio():this.draw.getHeight(),o=this.draw.getMargins(),a=this.draw.getMarginIndicatorSize();e.save(),e.translate(.5,.5),e.strokeStyle=n,e.beginPath();const l=[o[3],o[0]],c=[i-o[1],o[0]],u=[o[3],s-o[2]],h=[i-o[1],s-o[2]];e.moveTo(l[0]-a,l[1]),e.lineTo(...l),e.lineTo(l[0],l[1]-a),e.moveTo(c[0]+a,c[1]),e.lineTo(...c),e.lineTo(c[0],c[1]-a),e.moveTo(u[0]-a,u[1]),e.lineTo(...u),e.lineTo(u[0],u[1]+a),e.moveTo(h[0]+a,h[1]),e.lineTo(...h),e.lineTo(h[0],h[1]+a),e.stroke(),e.restore()}}class Pr{constructor(e){d(this,"draw"),d(this,"options"),d(this,"position"),d(this,"searchKeyword"),d(this,"searchNavigateIndex"),d(this,"searchMatchList"),this.draw=e,this.options=e.getOptions(),this.position=e.getPosition(),this.searchNavigateIndex=null,this.searchKeyword=null,this.searchMatchList=[]}getSearchKeyword(){return this.searchKeyword}setSearchKeyword(e){this.searchKeyword=e,this.searchNavigateIndex=null}searchNavigatePre(){if(!this.searchMatchList.length||!this.searchKeyword)return null;if(null===this.searchNavigateIndex)this.searchNavigateIndex=0;else{let e=this.searchNavigateIndex-1,t=!1;const n=this.searchMatchList[this.searchNavigateIndex].groupId;while(e>=0){const r=this.searchMatchList[e];if(n!==r.groupId){t=!0,this.searchNavigateIndex=e-(this.searchKeyword.length-1);break}e--}if(!t){const e=this.searchMatchList[this.searchMatchList.length-1];if(e.groupId===n)return null;this.searchNavigateIndex=this.searchMatchList.length-1-(this.searchKeyword.length-1)}}return this.searchNavigateIndex}searchNavigateNext(){if(!this.searchMatchList.length||!this.searchKeyword)return null;if(null===this.searchNavigateIndex)this.searchNavigateIndex=0;else{let e=this.searchNavigateIndex+1,t=!1;const n=this.searchMatchList[this.searchNavigateIndex].groupId;while(e<this.searchMatchList.length){const r=this.searchMatchList[e];if(n!==r.groupId){t=!0,this.searchNavigateIndex=e;break}e++}if(!t){const e=this.searchMatchList[0];if(e.groupId===n)return null;this.searchNavigateIndex=0}}return this.searchNavigateIndex}searchNavigateScrollIntoView(e){const{coordinate:{leftTop:t,leftBottom:n,rightTop:r},pageNo:i}=e,s=this.draw.getHeight(),o=this.draw.getPageGap(),a=i*(s+o),l=document.createElement("div");l.style.position="absolute";const c=50;l.style.width=r[0]-t[0]+c+"px",l.style.height=n[1]-t[1]+c+"px",l.style.left=t[0]+"px",l.style.top=t[1]+a+"px",this.draw.getContainer().append(l),l.scrollIntoView(!1),l.remove()}getSearchNavigateIndexList(){return null!==this.searchNavigateIndex&&this.searchKeyword?new Array(this.searchKeyword.length).fill(this.searchNavigateIndex).map((e,t)=>e+t):[]}getSearchMatchList(){return this.searchMatchList}getSearchNavigateInfo(){if(!this.searchKeyword||!this.searchMatchList.length)return null;const e=null!==this.searchNavigateIndex?this.searchNavigateIndex/this.searchKeyword.length+1:0;let t=0,n=null;for(let r=0;r<this.searchMatchList.length;r++){const e=this.searchMatchList[r];n!==e.groupId&&(n=e.groupId,t+=1)}return{index:e,count:t}}getMatchList(e,t){const n=e.toLocaleLowerCase(),r=[],i=[],s=t.length,o=[];for(let u=0;u<s;u++){const e=t[u];e.type===de.TABLE&&o.push(u)}let a=0,l=0;while(l<s-1){const e=o.length?o[a]:s,n=t.slice(l,e);n.length&&i.push({index:l,type:Ht.PAGE,elementList:n});const r=t[e];r&&i.push({index:e,type:Ht.TABLE,elementList:[r]}),l=e+1,a++}function c(e,t,n,i){if(!e)return;const s=n.map(e=>!e.type||ve.includes(e.type)&&e.controlComponent!==dt.CHECKBOX?e.value:M).filter(Boolean).join("").toLocaleLowerCase(),o=[];let a=s.indexOf(e);while(-1!==a)o.push(a),a=s.indexOf(e,a+e.length);for(let l=0;l<o.length;l++){const n=o[l],s=V();for(let o=0;o<e.length;o++){const e=n+o+((null==i?void 0:i.startIndex)||0);r.push(u({type:t,index:e,groupId:s},i))}}}for(let u=0;u<i.length;u++){const e=i[u];if(e.type===Ht.TABLE){const t=e.elementList[0];for(let r=0;r<t.trList.length;r++){const i=t.trList[r];for(let s=0;s<i.tdList.length;s++){const o=i.tdList[s],a={tableId:t.id,tableIndex:e.index,trIndex:r,tdIndex:s,tdId:o.id};c(n,e.type,o.value,a)}}}else c(n,e.type,e.elementList,{startIndex:e.index})}return r}compute(e){this.searchMatchList=this.getMatchList(e,this.draw.getOriginalElementList())}render(e,t){var n,r;if(!this.searchMatchList||!this.searchMatchList.length||!this.searchKeyword)return;const{searchMatchAlpha:i,searchMatchColor:s,searchNavigateMatchColor:o}=this.options,a=this.position.getOriginalPositionList(),l=this.draw.getOriginalElementList();e.save(),e.globalAlpha=i;for(let c=0;c<this.searchMatchList.length;c++){const i=this.searchMatchList[c];let u=null;if(i.type===Ht.TABLE){const{tableIndex:e,trIndex:t,tdIndex:s,index:o}=i;u=null==(r=null==(n=l[e])?void 0:n.trList[t].tdList[s])?void 0:r.positionList[o]}else u=a[i.index];if(!u)continue;const{coordinate:{leftTop:h,leftBottom:d,rightTop:m},pageNo:g}=u;if(g!==t)continue;const p=this.getSearchNavigateIndexList();if(p.includes(c)){e.fillStyle=o;const t=this.searchMatchList[c-1];t&&t.groupId===i.groupId||this.searchNavigateScrollIntoView(u)}else e.fillStyle=s;const f=h[0],R=h[1],y=m[0]-h[0],M=d[1]-h[1];e.fillRect(f,R,y,M)}e.restore()}}class xr extends Nr{constructor(e){super(),d(this,"options"),this.options=e.getOptions()}render(e){if(!this.fillRect.width)return;const{scale:t,strikeoutColor:n}=this.options,{x:r,y:i,width:s}=this.fillRect;e.save(),e.lineWidth=t,e.strokeStyle=n;const o=i+.5;e.beginPath(),e.moveTo(r,o),e.lineTo(r+s,o),e.stroke(),e.restore(),this.clearFillInfo()}}(function(e){e["SOLID"]="solid",e["DOUBLE"]="double",e["DASHED"]="dashed",e["DOTTED"]="dotted",e["WAVY"]="wavy"})(fr||(fr={})),function(e){e["SOLID"]="solid",e["DASHED"]="dashed",e["DOTTED"]="dotted"}(Rr||(Rr={}));class Dr extends Nr{constructor(e){super(),d(this,"options"),this.options=e.getOptions()}_drawLine(e,t,n,r,i){const s=t+r;switch(e.beginPath(),i){case Rr.DASHED:e.setLineDash([3,1]);break;case Rr.DOTTED:e.setLineDash([1,1]);break}e.moveTo(t,n),e.lineTo(s,n),e.stroke()}_drawDouble(e,t,n,r){const i=3,s=t+r,o=n+i*this.options.scale;e.beginPath(),e.moveTo(t,n),e.lineTo(s,n),e.stroke(),e.beginPath(),e.moveTo(t,o),e.lineTo(s,o),e.stroke()}_drawWave(e,t,n,r){const{scale:i}=this.options,s=1.2*i,o=1/i,a=n+2*s;e.beginPath();for(let l=0;l<r;l++){const n=s*Math.sin(o*l);e.lineTo(t+l,a+n)}e.stroke()}render(e){if(!this.fillRect.width)return;const{underlineColor:t,scale:n}=this.options,{x:r,y:i,width:s}=this.fillRect;e.save(),e.strokeStyle=this.fillColor||t,e.lineWidth=n;const o=Math.floor(i+2*e.lineWidth)+.5;switch(this.fillDecorationStyle){case fr.WAVY:this._drawWave(e,r,o,s);break;case fr.DOUBLE:this._drawDouble(e,r,o,s);break;case fr.DASHED:this._drawLine(e,r,o,s,Rr.DASHED);break;case fr.DOTTED:this._drawLine(e,r,o,s,Rr.DOTTED);break;default:this._drawLine(e,r,o,s);break}e.restore(),this.clearFillInfo()}}class Ar{constructor(e){d(this,"draw"),d(this,"options"),d(this,"ctx"),d(this,"curX"),d(this,"curY"),d(this,"text"),d(this,"curStyle"),d(this,"curColor"),d(this,"cacheMeasureText"),this.draw=e,this.options=e.getOptions(),this.ctx=e.getCtx(),this.curX=-1,this.curY=-1,this.text="",this.curStyle="",this.cacheMeasureText=new Map}measureBasisWord(e,t){e.save(),e.font=t;const n=this.measureText(e,{value:E});return e.restore(),n}measureWord(e,t,n){const r=this.draw.getLetterReg();let i=0,s=t[n],o=n;while(o<t.length){const n=t[o];if(n.type&&n.type!==de.TEXT||!r.test(n.value)){s=n;break}i+=this.measureText(e,n).width,o++}return{width:i,endElement:s}}measurePunctuationWidth(e,t){return t&&T.includes(t.value)?this.measureText(e,t).width:0}measureText(e,t){if(t.width){const n=e.measureText(t.value);return{width:t.width,actualBoundingBoxAscent:n.actualBoundingBoxAscent,actualBoundingBoxDescent:n.actualBoundingBoxDescent,actualBoundingBoxLeft:n.actualBoundingBoxLeft,actualBoundingBoxRight:n.actualBoundingBoxRight,fontBoundingBoxAscent:n.fontBoundingBoxAscent,fontBoundingBoxDescent:n.fontBoundingBoxDescent}}const n=`${t.value}${e.font}`,r=this.cacheMeasureText.get(n);if(r)return r;const i=e.measureText(t.value);return this.cacheMeasureText.set(n,i),i}complete(){this._render(),this.text=""}record(e,t,n,r){if(this.ctx=e,this.options.renderMode===jt.COMPATIBILITY)return this._setCurXY(n,r),this.text=t.value,this.curStyle=t.style,this.curColor=t.color,void this.complete();this.text||this._setCurXY(n,r),(this.curStyle&&t.style!==this.curStyle||t.color!==this.curColor)&&(this.complete(),this._setCurXY(n,r)),this.text+=t.value,this.curStyle=t.style,this.curColor=t.color}_setCurXY(e,t){this.curX=e,this.curY=t}_render(){this.text&&~this.curX&&~this.curX&&(this.ctx.save(),this.ctx.font=this.curStyle,this.ctx.fillStyle=this.curColor||this.options.defaultColor,this.ctx.fillText(this.text,this.curX,this.curY),this.ctx.restore())}}class Fr{constructor(e){d(this,"draw"),d(this,"options"),this.draw=e,this.options=e.getOptions()}render(e,t){const{scale:n,pageNumber:{size:r,font:i,color:s,rowFlex:o,numberType:a,format:l,startPageNo:c,fromPageNo:u}}=this.options;if(t<u)return;let h=l;const d=new RegExp(Et.PAGE_NO);if(d.test(h)){const e=t+c-u,n=a===p.CHINESE?B(e):""+e;h=h.replace(d,n)}const m=new RegExp(Et.PAGE_COUNT);if(m.test(h)){const e=this.draw.getPageCount()-u,t=a===p.CHINESE?B(e):""+e;h=h.replace(m,t)}const g=this.draw.getWidth(),f=this.draw.getHeight(),R=this.draw.getPageNumberBottom(),y=f-R;e.save(),e.fillStyle=s,e.font=`${r*n}px ${i}`;let M=0;const S=this.draw.getMargins(),{width:b}=e.measureText(h);M=o===C.CENTER?(g-b)/2:o===C.RIGHT?g-b-S[1]:S[3],e.fillText(h,M,y),e.restore()}}class Yr{constructor(e){d(this,"draw"),d(this,"options"),d(this,"scrollContainer"),d(this,"_observer",D(()=>{const{intersectionPageNo:e,visiblePageNoList:t}=this.getPageVisibleInfo();this.draw.setIntersectionPageNo(e),this.draw.setVisiblePageNoList(t)},150)),this.draw=e,this.options=e.getOptions(),this.scrollContainer=this.getScrollContainer(),setTimeout(()=>{window.scrollY||this._observer()}),this._addEvent()}getScrollContainer(){return this.options.scrollContainerSelector&&document.querySelector(this.options.scrollContainerSelector)||document}_addEvent(){this.scrollContainer.addEventListener("scroll",this._observer)}removeEvent(){this.scrollContainer.removeEventListener("scroll",this._observer)}getElementVisibleInfo(e){const t=e.getBoundingClientRect(),n=this.scrollContainer===document?Math.max(document.documentElement.clientHeight,window.innerHeight):this.scrollContainer.clientHeight,r=Math.min(t.bottom,n)-Math.max(t.top,0);return{intersectionHeight:r>0?r:0}}getPageVisibleInfo(){const e=this.draw.getPageList(),t=[];let n=0,r=0;for(let i=0;i<e.length;i++){const s=e[i],{intersectionHeight:o}=this.getElementVisibleInfo(s);if(r&&!o)break;o&&t.push(i),o>r&&(r=o,n=i)}return{intersectionPageNo:n,visiblePageNoList:t}}}class Hr{constructor(e){d(this,"step",5),d(this,"thresholdPoints",[70,40,10,20]),d(this,"selectionContainer"),d(this,"rangeManager"),d(this,"requestAnimationFrameId"),d(this,"isMousedown"),d(this,"isMoving"),d(this,"clientWidth"),d(this,"clientHeight"),d(this,"containerRect"),d(this,"_mousedown",()=>{if(this.isMousedown=!0,this.clientWidth=this.selectionContainer instanceof Document?document.documentElement.clientWidth:this.selectionContainer.clientWidth,this.clientHeight=this.selectionContainer instanceof Document?document.documentElement.clientHeight:this.selectionContainer.clientHeight,!(this.selectionContainer instanceof Document)){const e=this.selectionContainer.getBoundingClientRect();this.containerRect=e}}),d(this,"_mouseup",()=>{this.isMousedown=!1,this._stopMove()}),d(this,"_mousemove",e=>{if(!this.isMousedown||this.rangeManager.getIsCollapsed())return;let{x:t,y:n}=e;this.containerRect&&(t-=this.containerRect.x,n-=this.containerRect.y),n<this.thresholdPoints[0]?this._startMove(he.UP):this.clientHeight-n<=this.thresholdPoints[1]?this._startMove(he.DOWN):t<this.thresholdPoints[2]?this._startMove(he.LEFT):this.clientWidth-t<this.thresholdPoints[3]?this._startMove(he.RIGHT):this._stopMove()}),this.rangeManager=e.getRange();const{scrollContainerSelector:t}=e.getOptions();this.selectionContainer=t&&document.querySelector(t)||document,this.requestAnimationFrameId=null,this.isMousedown=!1,this.isMoving=!1,this.clientWidth=0,this.clientHeight=0,this.containerRect=null,this._addEvent()}_addEvent(){const e=this.selectionContainer;e.addEventListener("mousedown",this._mousedown),e.addEventListener("mousemove",this._mousemove),e.addEventListener("mouseup",this._mouseup),document.addEventListener("mouseleave",this._mouseup)}removeEvent(){const e=this.selectionContainer;e.removeEventListener("mousedown",this._mousedown),e.removeEventListener("mousemove",this._mousemove),e.removeEventListener("mouseup",this._mouseup),document.removeEventListener("mouseleave",this._mouseup)}_move(e){const t=this.selectionContainer instanceof Document?window:this.selectionContainer,n=this.selectionContainer instanceof Document?window.scrollX:t.scrollLeft,r=this.selectionContainer instanceof Document?window.scrollY:t.scrollTop;e===he.DOWN?t.scrollTo(n,r+this.step):e===he.UP?t.scrollTo(n,r-this.step):e===he.LEFT?t.scrollTo(n-this.step,r):t.scrollTo(n+this.step,r),this.requestAnimationFrameId=window.requestAnimationFrame(this._move.bind(this,e))}_startMove(e){this.isMoving||(this.isMoving=!0,this._move(e))}_stopMove(){this.requestAnimationFrameId&&(window.cancelAnimationFrame(this.requestAnimationFrameId),this.requestAnimationFrameId=null,this.isMoving=!1)}}(function(e){e["ALL"]="all",e["EMPTY"]="empty",e["EXTERNAL"]="external",e["INTERNAL"]="internal",e["DASH"]="dash"})(yr||(yr={})),function(e){e["TOP"]="top",e["RIGHT"]="right",e["BOTTOM"]="bottom",e["LEFT"]="left"}(Mr||(Mr={})),function(e){e["FORWARD"]="forward",e["BACK"]="back"}(Sr||(Sr={}));class kr{constructor(e){d(this,"draw"),d(this,"range"),d(this,"options"),this.draw=e,this.range=e.getRange(),this.options=e.getOptions()}getTrListGroupByCol(e){var t;const n=Y(e);for(let r=0;r<e.length;r++){const e=n[r];for(let r=e.tdList.length-1;r>=0;r--){const i=e.tdList[r],{rowspan:s,rowIndex:o,colIndex:a}=i,l=o+s-1;if(l!==r){const i=e.tdList.splice(r,1)[0];null==(t=n[l])||t.tdList.splice(a,0,i)}}}return n}getRangeRowCol(){const{isTable:e,index:t,trIndex:n,tdIndex:r}=this.draw.getPosition().getPositionContext();if(!e)return null;const{isCrossRowCol:i,startTdIndex:s,endTdIndex:o,startTrIndex:a,endTrIndex:l}=this.range.getRange(),c=this.draw.getOriginalElementList(),u=c[t],h=u.trList;if(!i)return[[h[n].tdList[r]]];let d=h[a].tdList[s],m=h[l].tdList[o];(d.x>m.x||d.y>m.y)&&([d,m]=[m,d]);const g=d.colIndex,p=m.colIndex+(m.colspan-1),f=d.rowIndex,R=m.rowIndex+(m.rowspan-1),y=[];for(let M=0;M<h.length;M++){const e=h[M],t=[];for(let n=0;n<e.tdList.length;n++){const r=e.tdList[n],i=r.colIndex,s=r.rowIndex;i>=g&&i<=p&&s>=f&&s<=R&&t.push(r)}t.length&&y.push(t)}return y.length?y:null}_drawOuterBorder(e){const{ctx:t,startX:n,startY:r,width:i,height:s,isDrawFullBorder:o}=e;t.beginPath();const a=Math.round(n),l=Math.round(r);t.translate(.5,.5),o?t.rect(a,l,i,s):(t.moveTo(a,l+s),t.lineTo(a,l),t.lineTo(a+i,l)),t.stroke(),t.translate(-.5,-.5)}_drawSlash(e,t,n,r){var i,s;const{scale:o}=this.options;e.save();const a=t.width*o,l=t.height*o,c=Math.round(t.x*o+n),u=Math.round(t.y*o+r);(null==(i=t.slashTypes)?void 0:i.includes(Sr.FORWARD))&&(e.moveTo(c+a,u),e.lineTo(c,u+l)),(null==(s=t.slashTypes)?void 0:s.includes(Sr.BACK))&&(e.moveTo(c,u),e.lineTo(c+a,u+l)),e.stroke(),e.restore()}_drawBorder(e,t,n,r){var i,s,o,a,l,c;const{colgroup:u,trList:h,borderType:d,borderColor:m}=t;if(!u||!h)return;const{scale:g,table:{defaultBorderColor:p}}=this.options,f=t.width*g,R=t.height*g,y=d===yr.EMPTY,M=d===yr.EXTERNAL,S=d===yr.INTERNAL;e.save(),d===yr.DASH&&e.setLineDash([3,3]),e.lineWidth=g,e.strokeStyle=m||p,y||S||this._drawOuterBorder({ctx:e,startX:n,startY:r,width:f,height:R,isDrawFullBorder:M});for(let b=0;b<h.length;b++){const t=h[b];for(let d=0;d<t.tdList.length;d++){const m=t.tdList[d];if((null==(i=m.slashTypes)?void 0:i.length)&&this._drawSlash(e,m,n,r),!(null==(s=m.borderTypes)?void 0:s.length)&&(y||M))continue;const p=m.width*g,f=m.height*g,R=Math.round(m.x*g+n+p),b=Math.round(m.y*g+r);e.translate(.5,.5),e.beginPath(),(null==(o=m.borderTypes)?void 0:o.includes(Mr.TOP))&&(e.moveTo(R-p,b),e.lineTo(R,b),e.stroke()),(null==(a=m.borderTypes)?void 0:a.includes(Mr.RIGHT))&&(e.moveTo(R,b),e.lineTo(R,b+f),e.stroke()),(null==(l=m.borderTypes)?void 0:l.includes(Mr.BOTTOM))&&(e.moveTo(R,b+f),e.lineTo(R-p,b+f),e.stroke()),(null==(c=m.borderTypes)?void 0:c.includes(Mr.LEFT))&&(e.moveTo(R-p,b),e.lineTo(R-p,b+f),e.stroke()),y||M||((!S||m.colIndex+m.colspan<u.length)&&(e.moveTo(R,b),e.lineTo(R,b+f)),(!S||m.rowIndex+m.rowspan<h.length)&&(e.moveTo(R,b+f),e.lineTo(R-p,b+f)),e.stroke()),e.translate(-.5,-.5)}}e.restore()}_drawBackgroundColor(e,t,n,r){const{trList:i}=t;if(!i)return;const{scale:s}=this.options;for(let o=0;o<i.length;o++){const t=i[o];for(let i=0;i<t.tdList.length;i++){const o=t.tdList[i];if(!o.backgroundColor)continue;e.save();const a=o.width*s,l=o.height*s,c=Math.round(o.x*s+n),u=Math.round(o.y*s+r);e.fillStyle=o.backgroundColor,e.fillRect(c,u,a,l),e.restore()}}}getTableWidth(e){return e.colgroup.reduce((e,t)=>e+t.width,0)}getTableHeight(e){const t=e.trList;return(null==t?void 0:t.length)?this.getTdListByColIndex(t,0).reduce((e,t)=>e+t.height,0):0}getRowCountByColIndex(e,t){return this.getTdListByColIndex(e,t).reduce((e,t)=>e+t.rowspan,0)}getTdListByColIndex(e,t){const n=[];for(let r=0;r<e.length;r++){const i=e[r].tdList;for(let e=0;e<i.length;e++){const r=i[e],s=r.colIndex,o=s+r.colspan-1;t>=s&&t<=o&&n.push(r)}}return n}getTdListByRowIndex(e,t){const n=[];for(let r=0;r<e.length;r++){const i=e[r].tdList;for(let e=0;e<i.length;e++){const r=i[e],s=r.rowIndex,o=s+r.rowspan-1;t>=s&&t<=o&&n.push(r)}}return n}computeRowColInfo(e){const{colgroup:t,trList:n}=e;if(!t||!n)return;let r=0;for(let i=0;i<n.length;i++){const e=n[i],s=n.length-1===i;for(let o=0;o<e.tdList.length;o++){const a=e.tdList[o];let l=0;if(n.length>1&&0!==i){const s=e.tdList[o-1],a=s?s.colIndex+s.colspan:o;for(let e=a;e<t.length;e++){const s=this.getRowCountByColIndex(n.slice(0,i),e);if(s===i){l=e;let n=0;for(let r=0;r<e;r++)n+=t[r].width;r=n;break}}}else{const t=e.tdList[o-1];t&&(l=t.colIndex+t.colspan)}let c=0;for(let e=0;e<a.colspan;e++)c+=t[e+l].width;let u=0;for(let e=0;e<a.rowspan;e++){const t=n[e+i]||n[i];u+=t.height}const h=e.tdList.length-1===o;let d=s;if(!d&&a.rowspan>1){const e=n.length-1-i;d=a.rowspan-1===e}const m=s&&h;a.isLastRowTd=h,a.isLastColTd=d,a.isLastTd=m,a.x=r;let g=0;for(let e=0;e<i;e++){const t=n[e].tdList;for(let e=0;e<t.length;e++){const n=t[e];if(l>=n.colIndex&&l<n.colIndex+n.colspan){g+=n.height;break}}}a.y=g,a.width=c,a.height=u,a.rowIndex=i,a.colIndex=l,a.trIndex=i,a.tdIndex=o,r+=c,h&&!m&&(r=0)}}}drawRange(e,t,n,r){const{scale:i,rangeAlpha:s,rangeColor:o}=this.options,{type:a,trList:l}=t;if(!l||a!==de.TABLE)return;const{isCrossRowCol:c,startTdIndex:u,endTdIndex:h,startTrIndex:d,endTrIndex:m}=this.range.getRange();if(!c)return;let g=l[d].tdList[u],p=l[m].tdList[h];(g.x>p.x||g.y>p.y)&&([g,p]=[p,g]);const f=g.colIndex,R=p.colIndex+(p.colspan-1),y=g.rowIndex,M=p.rowIndex+(p.rowspan-1);e.save();for(let S=0;S<l.length;S++){const t=l[S];for(let a=0;a<t.tdList.length;a++){const l=t.tdList[a],c=l.colIndex,u=l.rowIndex;if(c>=f&&c<=R&&u>=y&&u<=M){const t=l.x*i,a=l.y*i,c=l.width*i,u=l.height*i;e.globalAlpha=s,e.fillStyle=o,e.fillRect(t+n,a+r,c,u)}}}e.restore()}render(e,t,n,r){this._drawBackgroundColor(e,t,n,r),this._drawBorder(e,t,n,r)}}(function(e){e["ROW"]="row",e["COL"]="col"})(br||(br={}));class Vr{constructor(e){d(this,"MIN_TD_WIDTH",20),d(this,"ROW_COL_OFFSET",18),d(this,"ROW_COL_QUICK_WIDTH",16),d(this,"ROW_COL_QUICK_OFFSET",5),d(this,"ROW_COL_QUICK_POSITION",this.ROW_COL_OFFSET+(this.ROW_COL_OFFSET-this.ROW_COL_QUICK_WIDTH)/2),d(this,"BORDER_VALUE",4),d(this,"TABLE_SELECT_OFFSET",20),d(this,"draw"),d(this,"canvas"),d(this,"options"),d(this,"position"),d(this,"range"),d(this,"container"),d(this,"toolRowContainer"),d(this,"toolRowAddBtn"),d(this,"toolColAddBtn"),d(this,"toolTableSelectBtn"),d(this,"toolColContainer"),d(this,"toolBorderContainer"),d(this,"anchorLine"),d(this,"mousedownX"),d(this,"mousedownY"),this.draw=e,this.canvas=e.getPage(),this.options=e.getOptions(),this.position=e.getPosition(),this.range=e.getRange(),this.container=e.getContainer(),this.toolRowContainer=null,this.toolRowAddBtn=null,this.toolColAddBtn=null,this.toolTableSelectBtn=null,this.toolColContainer=null,this.toolBorderContainer=null,this.anchorLine=null,this.mousedownX=0,this.mousedownY=0}dispose(){var e,t,n,r,i,s;null==(e=this.toolRowContainer)||e.remove(),null==(t=this.toolRowAddBtn)||t.remove(),null==(n=this.toolColAddBtn)||n.remove(),null==(r=this.toolTableSelectBtn)||r.remove(),null==(i=this.toolColContainer)||i.remove(),null==(s=this.toolBorderContainer)||s.remove(),this.toolRowContainer=null,this.toolRowAddBtn=null,this.toolColAddBtn=null,this.toolTableSelectBtn=null,this.toolColContainer=null,this.toolBorderContainer=null}render(){const{isTable:e,index:t,trIndex:n,tdIndex:r}=this.position.getPositionContext();if(!e)return;this.dispose();const{scale:i}=this.options,s=this.draw.getOriginalElementList(),o=this.position.getOriginalPositionList(),a=s[t],l=o[t],{colgroup:c,trList:u}=a,{coordinate:{leftTop:h}}=l,d=this.draw.getHeight(),m=this.draw.getPageGap(),g=this.draw.getPageNo()*(d+m),p=h[0],f=h[1]+g,R=a.trList[n].tdList[r],y=R.rowIndex,M=R.colIndex,S=a.height*i,b=a.width*i,w=document.createElement("div");w.classList.add(ce+"-table-tool__select"),w.style.height=""+S*i,w.style.left=p+"px",w.style.top=f+"px",w.style.transform=`translate(-${this.TABLE_SELECT_OFFSET*i}px, ${-this.TABLE_SELECT_OFFSET*i}px)`,w.onclick=()=>{this.draw.getTableOperate().tableSelectAll()},this.container.append(w),this.toolTableSelectBtn=w;const T=u.map(e=>e.height),O=document.createElement("div");O.classList.add(ce+"-table-tool__row"),O.style.transform=`translateX(-${this.ROW_COL_OFFSET*i}px)`;for(let _=0;_<T.length;_++){const e=T[_]*i,n=document.createElement("div");n.classList.add(ce+"-table-tool__row__item"),_===y&&n.classList.add("active"),n.onclick=()=>{const e=this.draw.getTableParticle().getTdListByRowIndex(u,_),n=e[0],r=e[e.length-1];this.position.setPositionContext({index:t,isTable:!0,trIndex:n.trIndex,tdIndex:n.tdIndex,tableId:a.id}),this.range.setRange(0,0,a.id,n.tdIndex,r.tdIndex,n.trIndex,r.trIndex),this.draw.render({curIndex:0,isCompute:!1,isSubmitHistory:!1}),this._setAnchorActive(O,_)};const r=document.createElement("div");r.classList.add(ce+"-table-tool__anchor"),r.onmousedown=e=>{this._mousedown({evt:e,element:a,index:_,order:br.ROW})},n.append(r),n.style.height=e+"px",O.append(n)}O.style.left=p+"px",O.style.top=f+"px",this.container.append(O),this.toolRowContainer=O;const v=document.createElement("div");v.classList.add(ce+"-table-tool__quick__add"),v.style.height=""+S*i,v.style.left=p+"px",v.style.top=f+S+"px",v.style.transform=`translate(-${this.ROW_COL_QUICK_POSITION*i}px, ${this.ROW_COL_QUICK_OFFSET*i}px)`,v.onclick=()=>{this.position.setPositionContext({index:t,isTable:!0,trIndex:u.length-1,tdIndex:0,tableId:a.id}),this.draw.getTableOperate().insertTableBottomRow()},this.container.append(v),this.toolRowAddBtn=v;const E=c.map(e=>e.width),C=document.createElement("div");C.classList.add(ce+"-table-tool__col"),C.style.transform=`translateY(-${this.ROW_COL_OFFSET*i}px)`;for(let _=0;_<E.length;_++){const e=E[_]*i,n=document.createElement("div");n.classList.add(ce+"-table-tool__col__item"),_===M&&n.classList.add("active"),n.onclick=()=>{const e=this.draw.getTableParticle().getTdListByColIndex(u,_),n=e[0],r=e[e.length-1];this.position.setPositionContext({index:t,isTable:!0,trIndex:n.trIndex,tdIndex:n.tdIndex,tableId:a.id}),this.range.setRange(0,0,a.id,n.tdIndex,r.tdIndex,n.trIndex,r.trIndex),this.draw.render({curIndex:0,isCompute:!1,isSubmitHistory:!1}),this._setAnchorActive(C,_)};const r=document.createElement("div");r.classList.add(ce+"-table-tool__anchor"),r.onmousedown=e=>{this._mousedown({evt:e,element:a,index:_,order:br.COL})},n.append(r),n.style.width=e+"px",C.append(n)}C.style.left=p+"px",C.style.top=f+"px",this.container.append(C),this.toolColContainer=C;const L=document.createElement("div");L.classList.add(ce+"-table-tool__quick__add"),L.style.height=""+S*i,L.style.left=p+b+"px",L.style.top=f+"px",L.style.transform=`translate(${this.ROW_COL_QUICK_OFFSET*i}px, -${this.ROW_COL_QUICK_POSITION*i}px)`,L.onclick=()=>{this.position.setPositionContext({index:t,isTable:!0,trIndex:0,tdIndex:u[0].tdList.length-1||0,tableId:a.id}),this.draw.getTableOperate().insertTableRightCol()},this.container.append(L),this.toolColAddBtn=L;const N=document.createElement("div");N.classList.add(ce+"-table-tool__border"),N.style.height=S+"px",N.style.width=b+"px",N.style.left=p+"px",N.style.top=f+"px";for(let _=0;_<u.length;_++){const e=u[_];for(let t=0;t<e.tdList.length;t++){const n=e.tdList[t],r=document.createElement("div");r.classList.add(ce+"-table-tool__border__row"),r.style.width=n.width*i+"px",r.style.height=this.BORDER_VALUE+"px",r.style.top=(n.y+n.height)*i-this.BORDER_VALUE/2+"px",r.style.left=n.x*i+"px",r.onmousedown=e=>{this._mousedown({evt:e,element:a,index:n.rowIndex+n.rowspan-1,order:br.ROW})},N.appendChild(r);const s=document.createElement("div");s.classList.add(ce+"-table-tool__border__col"),s.style.width=this.BORDER_VALUE+"px",s.style.height=n.height*i+"px",s.style.top=n.y*i+"px",s.style.left=(n.x+n.width)*i-this.BORDER_VALUE/2+"px",s.onmousedown=e=>{this._mousedown({evt:e,element:a,index:n.colIndex+n.colspan-1,order:br.COL})},N.appendChild(s)}}this.container.append(N),this.toolBorderContainer=N}_setAnchorActive(e,t){const n=e.children;for(let r=0;r<n.length;r++){const e=n[r];r===t?e.classList.add("active"):e.classList.remove("active")}}_mousedown(e){const{evt:t,index:n,order:r,element:i}=e;this.canvas=this.draw.getPage();const{scale:s}=this.options,o=this.draw.getWidth(),a=this.draw.getHeight(),l=this.draw.getPageGap(),c=this.draw.getPageNo()*(a+l);this.mousedownX=t.x,this.mousedownY=t.y;const u=t.target,h=this.canvas.getBoundingClientRect(),d=window.getComputedStyle(u).cursor;document.body.style.cursor=d,this.canvas.style.cursor=d;let m=0,g=0;const p=document.createElement("div");p.classList.add(ce+"-table-anchor__line"),r===br.ROW?(p.classList.add(ce+"-table-anchor__line__row"),p.style.width=o+"px",m=0,g=c+this.mousedownY-h.top):(p.classList.add(ce+"-table-anchor__line__col"),p.style.height=a+"px",m=this.mousedownX-h.left,g=c),p.style.left=m+"px",p.style.top=g+"px",this.container.append(p),this.anchorLine=p;let f=0,R=0;const y=e=>{const t=this._mousemove(e,r,m,g);t&&(f=t.dx,R=t.dy)};document.addEventListener("mousemove",y),document.addEventListener("mouseup",()=>{var e;let t=!1;if(r===br.ROW){const e=i.trList,r=e[n]||e[n-1],{defaultTrMinHeight:s}=this.options.table;R<0&&r.height+R<s&&(R=s-r.height),R&&(r.height+=R,r.minHeight=r.height,t=!0)}else{const{colgroup:r}=i;if(r&&f){const o=this.draw.getInnerWidth(),a=r[n].width;f<0&&a+f<this.MIN_TD_WIDTH&&(f=this.MIN_TD_WIDTH-a);const l=null==(e=r[n+1])?void 0:e.width;f>0&&l&&l-f<this.MIN_TD_WIDTH&&(f=l-this.MIN_TD_WIDTH);const c=a+f;if(n===r.length-1){let e=0;for(let t=0;t<r.length;t++){const i=r[t];t===n+1&&(e-=f),t===n&&(e+=c),t!==n&&(e+=i.width)}if(e>o){const e=i.width;f=o-e}}f&&(r.length-1!==n&&(r[n+1].width-=f/s),r[n].width+=f/s,t=!0)}}t&&this.draw.render({isSetCursor:!1}),p.remove(),document.removeEventListener("mousemove",y),document.body.style.cursor="",this.canvas.style.cursor="text"},{once:!0}),t.preventDefault()}_mousemove(e,t,n,r){if(!this.anchorLine)return null;const i=e.x-this.mousedownX,s=e.y-this.mousedownY;return t===br.ROW?this.anchorLine.style.top=r+s+"px":this.anchorLine.style.left=n+i+"px",e.preventDefault(),{dx:i,dy:s}}}class Ur{constructor(e){d(this,"draw"),d(this,"options"),d(this,"container"),d(this,"hyperlinkPopupContainer"),d(this,"hyperlinkDom"),this.draw=e,this.options=e.getOptions(),this.container=e.getContainer();const{hyperlinkPopupContainer:t,hyperlinkDom:n}=this._createHyperlinkPopupDom();this.hyperlinkDom=n,this.hyperlinkPopupContainer=t}_createHyperlinkPopupDom(){const e=document.createElement("div");e.classList.add(ce+"-hyperlink-popup");const t=document.createElement("a");return t.target="_blank",t.rel="noopener",e.append(t),this.container.append(e),{hyperlinkPopupContainer:e,hyperlinkDom:t}}drawHyperlinkPopup(e,t){const{coordinate:{leftTop:[n,r]},lineHeight:i}=t,s=this.draw.getHeight(),o=this.draw.getPageGap(),a=this.draw.getPageNo()*(s+o);this.hyperlinkPopupContainer.style.display="block",this.hyperlinkPopupContainer.style.left=n+"px",this.hyperlinkPopupContainer.style.top=r+a+i+"px";const l=e.url||"#";this.hyperlinkDom.href=l,this.hyperlinkDom.title=l,this.hyperlinkDom.innerText=l}clearHyperlinkPopup(){this.hyperlinkPopupContainer.style.display="none"}openHyperlink(e){const t=window.open(e.url,"_blank");t&&(t.opener=null)}render(e,t,n,r){e.save(),e.font=t.style,t.color||(t.color=this.options.defaultHyperlinkColor),e.fillStyle=t.color,void 0===t.underline&&(t.underline=!0),e.fillText(t.value,n,r),e.restore()}}class Wr{constructor(e,t){d(this,"draw"),d(this,"position"),d(this,"options"),d(this,"elementList"),d(this,"rowList"),d(this,"positionList"),this.draw=e,this.position=e.getPosition(),this.options=e.getOptions(),this.elementList=t||[],this.rowList=[],this.positionList=[]}getRowList(){return this.rowList}setElementList(e){this.elementList=e}getElementList(){return this.elementList}getPositionList(){return this.positionList}compute(){this.recovery(),this._computeRowList(),this._computePositionList()}recovery(){this.rowList=[],this.positionList=[]}_computeRowList(){const e=this.draw.getInnerWidth(),t=this.draw.getMargins(),n=pn(this.elementList);this.rowList=this.draw.computeRowList({startX:t[3],startY:this.getHeaderTop(),innerWidth:e,elementList:this.elementList,surroundElementList:n})}_computePositionList(){const e=this.getHeaderTop(),t=this.draw.getInnerWidth(),n=this.draw.getMargins(),r=n[3],i=e;this.position.computePageRowPosition({positionList:this.positionList,rowList:this.rowList,pageNo:0,startRowIndex:0,startIndex:0,startX:r,startY:i,innerWidth:t,zone:Vt.HEADER})}getHeaderTop(){const{header:{top:e,disabled:t},scale:n}=this.options;return t?0:Math.floor(e*n)}getMaxHeight(){const{header:{maxHeightRadio:e}}=this.options,t=this.draw.getHeight();return Math.floor(t*O[e])}getHeight(){const e=this.getMaxHeight(),t=this.getRowHeight();return t>e?e:t}getRowHeight(){return this.rowList.reduce((e,t)=>e+t.height,0)}getExtraHeight(){const e=this.draw.getMargins(),t=this.getHeight(),n=this.getHeaderTop(),r=n+t-e[0];return r<=0?0:r}render(e,t){e.globalAlpha=1;const n=this.draw.getInnerWidth(),r=this.getMaxHeight(),i=[];let s=0;for(let o=0;o<this.rowList.length;o++){const e=this.rowList[o];if(s+e.height>r)break;i.push(e),s+=e.height}this.draw.drawRow(e,{elementList:this.elementList,positionList:this.positionList,rowList:i,pageNo:t,startIndex:0,innerWidth:n,zone:Vt.HEADER})}}class Xr{getOffsetY(e){return-e.metrics.height/2}render(e,t,n,r){e.save(),e.font=t.style,t.color&&(e.fillStyle=t.color),e.fillText(t.value,n,r+this.getOffsetY(t)),e.restore()}}class jr{getOffsetY(e){return e.metrics.height/2}render(e,t,n,r){e.save(),e.font=t.style,t.color&&(e.fillStyle=t.color),e.fillText(t.value,n,r+this.getOffsetY(t)),e.restore()}}class Zr{constructor(e){d(this,"options"),this.options=e.getOptions()}render(e,t,n,r){var i;e.save();const{scale:s,separator:{lineWidth:o,strokeStyle:a}}=this.options;e.lineWidth=o*s,e.strokeStyle=t.color||a,(null==(i=t.dashArray)?void 0:i.length)&&e.setLineDash(t.dashArray);const l=Math.round(r);e.translate(0,e.lineWidth/2),e.beginPath(),e.moveTo(n,l),e.lineTo(n+t.width*s,l),e.stroke(),e.restore()}}class Qr{constructor(e){d(this,"draw"),d(this,"options"),d(this,"i18n"),this.draw=e,this.options=e.getOptions(),this.i18n=e.getI18n()}render(e,t,n,r){const{pageBreak:{font:i,fontSize:s,lineDash:o}}=this.options,a=this.i18n.t("pageBreak.displayName"),{scale:l,defaultRowMargin:c}=this.options,u=s*l,h=t.width*l,d=this.draw.getDefaultBasicRowMarginHeight()*c;e.save(),e.font=`${u}px ${i}`;const m=e.measureText(a),g=(h-m.width)/2;e.setLineDash(o),e.translate(0,.5+d),e.beginPath(),e.moveTo(n,r),e.lineTo(n+g,r),e.moveTo(n+g+m.width,r),e.lineTo(n+h,r),e.stroke(),e.fillText(a,n+g,r+m.actualBoundingBoxAscent-u/2),e.restore()}}class Kr{constructor(e){d(this,"draw"),d(this,"options"),this.draw=e,this.options=e.getOptions()}render(e){const{watermark:{data:t,opacity:n,font:r,size:i,color:s,repeat:o,gap:a},scale:l}=this.options,c=this.draw.getWidth(),u=this.draw.getHeight();e.save(),e.globalAlpha=n,e.font=`${i*l}px ${r}`;const h=e.measureText(t);if(o){const n=this.draw.getPagePixelRatio(),o=document.createElement("canvas"),d=o.getContext("2d"),m=h.width,g=h.actualBoundingBoxAscent+h.actualBoundingBoxDescent,p=Math.sqrt(Math.pow(m,2)+Math.pow(g,2)),f=p+2*a[0]*l,R=p+2*a[1]*l;o.width=f,o.height=R,o.style.width=f*n+"px",o.style.height=R*n+"px",d.translate(f/2,R/2),d.rotate(-45*Math.PI/180),d.translate(-f/2,-R/2),d.font=`${i*l}px ${r}`,d.fillStyle=s,d.fillText(t,(f-m)/2,(R-g)/2+h.actualBoundingBoxAscent);const y=e.createPattern(o,"repeat");y&&(e.fillStyle=y,e.fillRect(0,0,c,u))}else{const n=c/2,r=u/2;e.fillStyle=s,e.translate(n,r),e.rotate(-45*Math.PI/180),e.fillText(t,-h.width/2,h.actualBoundingBoxAscent-i/2)}e.restore()}}class Gr{constructor(e){d(this,"draw"),d(this,"options"),d(this,"highlightList"),d(this,"highlightMatchResult"),this.draw=e.getDraw(),this.options=this.draw.getOptions(),this.highlightList=[],this.highlightMatchResult=[]}getHighlightMatchResult(){return this.highlightMatchResult}getHighlightList(){return this.highlightList}setHighlightList(e){this.highlightList=e}computeHighlightList(){const e=this.draw.getSearch(),t=(n,r)=>{let i=0;while(i<n.length){const s=n[i];if(i++,s.type===de.TABLE){const e=s.trList;for(let n=0;n<e.length;n++){const r=e[n];for(let e=0;e<r.tdList.length;e++){const o=r.tdList[e],a={tableId:s.id,tableIndex:i-1,trIndex:n,tdIndex:e,tdId:o.id};t(o.value,a)}}}const o=null==s?void 0:s.control;if(!o)continue;const a=this.highlightList.findIndex(e=>e.id===s.controlId||o.conceptId&&o.conceptId===e.conceptId);if(!~a)continue;const l=i;let c=i;while(c<n.length){const e=n[c];if(e.controlId!==s.controlId)break;c++}i=c;const d=n.slice(l,c).map(e=>e.controlComponent===dt.VALUE?e:{value:M}),m=this.highlightList[a],{ruleList:g}=m;for(let t=0;t<g.length;t++){const n=g[t],i=e.getMatchList(n.keyword,d);this.highlightMatchResult.push(...i.map(e=>h(u(u(u({},e),n),r),{index:e.index+l})))}}};this.highlightMatchResult=[],t(this.draw.getOriginalMainElementList())}renderHighlightList(e,t){var n,r,i;if(!(null==(n=this.highlightMatchResult)?void 0:n.length))return;const{searchMatchAlpha:s,searchMatchColor:o}=this.options,a=this.draw.getPosition().getOriginalPositionList(),l=this.draw.getOriginalElementList();e.save();for(let c=0;c<this.highlightMatchResult.length;c++){const n=this.highlightMatchResult[c];let u=null;if(n.tableId){const{tableIndex:e,trIndex:t,tdIndex:s,index:o}=n;u=null==(i=null==(r=l[e])?void 0:r.trList[t].tdList[s])?void 0:i.positionList[o]}else u=a[n.index];if(!u)continue;const{coordinate:{leftTop:h,leftBottom:d,rightTop:m},pageNo:g}=u;if(g!==t)continue;e.fillStyle=n.backgroundColor||o,e.globalAlpha=n.alpha||s;const p=h[0],f=h[1],R=m[0]-h[0],y=d[1]-h[1];e.fillRect(p,f,R,y)}e.restore()}}class Br{constructor(e){d(this,"borderRect"),d(this,"options"),this.borderRect=this.clearBorderInfo(),this.options=e.getOptions()}clearBorderInfo(){return this.borderRect={x:0,y:0,width:0,height:0},this.borderRect}recordBorderInfo(e,t,n,r){const i=!this.borderRect.width;i&&(this.borderRect.x=e,this.borderRect.y=t,this.borderRect.height=r),this.borderRect.width+=n}render(e){if(!this.borderRect.width)return;const{scale:t,control:{borderWidth:n,borderColor:r}}=this.options,{x:i,y:s,width:o,height:a}=this.borderRect;e.save(),e.translate(0,1*t),e.lineWidth=n*t,e.strokeStyle=r,e.beginPath(),e.rect(i,s,o,a),e.stroke(),e.restore(),this.clearBorderInfo()}}class Jr{constructor(e,t){d(this,"element"),d(this,"control"),d(this,"isPopup"),d(this,"selectDom"),d(this,"options"),d(this,"VALUE_DELIMITER",","),d(this,"DEFAULT_MULTI_SELECT_DELIMITER",",");const n=t.getDraw();this.options=n.getOptions(),this.element=e,this.control=t,this.isPopup=!1,this.selectDom=null}setElement(e){this.element=e}getElement(){return this.element}getIsPopup(){return this.isPopup}getCodes(){var e,t;return(null==(t=null==(e=this.element)?void 0:e.control)?void 0:t.code)?this.element.control.code.split(","):[]}getText(e){var t,n;if(!(null==(t=this.element)?void 0:t.control))return null;const r=this.element.control;if(!(null==(n=r.valueSets)?void 0:n.length))return null;const i=(null==r?void 0:r.multiSelectDelimiter)||this.DEFAULT_MULTI_SELECT_DELIMITER,s=r.valueSets,o=[];return e.forEach(e=>{const t=s.find(t=>t.code===e);t&&!ie(t.value)&&o.push(t.value)}),o.join(i)||null}getValue(e={}){const t=e.elementList||this.control.getElementList(),{startIndex:n}=e.range||this.control.getRange(),r=t[n],i=[];let s=n;while(s>0){const e=t[s];if(e.controlId!==r.controlId||e.controlComponent===dt.PREFIX||e.controlComponent===dt.PRE_TEXT)break;e.controlComponent===dt.VALUE&&i.unshift(e),s--}let o=n+1;while(o<t.length){const e=t[o];if(e.controlId!==r.controlId||e.controlComponent===dt.POSTFIX||e.controlComponent===dt.POST_TEXT)break;e.controlComponent===dt.VALUE&&i.push(e),o++}return i}setValue(e,t={},n={}){var r,i;if(!(null==(i=null==(r=this.element.control)?void 0:r.selectExclusiveOptions)?void 0:i.inputAble)||!n.isIgnoreDisabledRule&&this.control.getIsDisabledControl(t))return-1;const s=t.elementList||this.control.getElementList(),o=t.range||this.control.getRange();this.control.shrinkBoundary(t);const{startIndex:a,endIndex:l}=o,c=this.control.getDraw();a!==l?c.spliceElementList(s,a+1,l-a):this.control.removePlaceholder(a,t);const d=s[a],m=d.type&&!ve.includes(d.type)||d.controlComponent===dt.PREFIX||d.controlComponent===dt.PRE_TEXT?z(d,["control","controlId",...we]):$(d,["type"]),g=o.startIndex+1;for(let p=0;p<e.length;p++){const t=h(u(u({},m),e[p]),{controlComponent:dt.VALUE});rn(s,[t],a,{editorOptions:this.options}),c.spliceElementList(s,g+p,0,t)}return g+e.length-1}keydown(e){if(this.control.getIsDisabledControl())return null;const t=this.control.getElementList(),n=this.control.getRange();this.control.shrinkBoundary();const{startIndex:r,endIndex:i}=n,s=t[r],o=t[i];if(e.key===Dn.Backspace)return r!==i?this.clearSelect():s.controlComponent===dt.PREFIX||s.controlComponent===dt.PRE_TEXT||o.controlComponent===dt.POSTFIX||o.controlComponent===dt.POST_TEXT||s.controlComponent===dt.PLACEHOLDER?this.control.removeControl(r):this.clearSelect();if(e.key===Dn.Delete){if(r!==i)return this.clearSelect();{const e=t[i+1];return(s.controlComponent===dt.PREFIX||s.controlComponent===dt.PRE_TEXT)&&e.controlComponent===dt.PLACEHOLDER||e.controlComponent===dt.POSTFIX||e.controlComponent===dt.POST_TEXT||s.controlComponent===dt.PLACEHOLDER?this.control.removeControl(r):this.clearSelect()}}return i}cut(){if(this.control.getIsDisabledControl())return-1;this.control.shrinkBoundary();const{startIndex:e,endIndex:t}=this.control.getRange();return e===t?e:this.clearSelect()}clearSelect(e={},t={}){const{isIgnoreDisabledRule:n=!1,isAddPlaceholder:r=!0}=t;if(!n&&this.control.getIsDisabledControl(e))return-1;const i=e.elementList||this.control.getElementList(),{startIndex:s}=e.range||this.control.getRange(),o=i[s];let a=-1,l=-1,c=s;while(c>0){const e=i[c];if(e.controlId!==o.controlId||e.controlComponent===dt.PREFIX||e.controlComponent===dt.PRE_TEXT){a=c;break}c--}let u=s+1;while(u<i.length){const e=i[u];if(e.controlId!==o.controlId||e.controlComponent===dt.POSTFIX||e.controlComponent===dt.POST_TEXT){l=u-1;break}u++}if(!~a||!~l)return-1;const h=this.control.getDraw();return h.spliceElementList(i,a+1,l-a),r&&this.control.addPlaceholder(c,e),this.control.setControlProperties({code:null},{elementList:i,range:{startIndex:c,endIndex:c}}),c}setSelect(e,t={},n={}){var r;if(!n.isIgnoreDisabledRule&&this.control.getIsDisabledControl(t))return;const i=t.elementList||this.control.getElementList(),s=t.range||this.control.getRange(),o=this.element.control,a=(null==e?void 0:e.split(this.VALUE_DELIMITER))||[],l=o.code,c=(null==(r=o.code)?void 0:r.split(this.VALUE_DELIMITER))||[],d=o.isMultiSelect;if(!d&&e===l||d&&te(c,a))return this.control.repaintControl({curIndex:s.startIndex,isCompute:!1,isSubmitHistory:!1}),void this.destroy();const m=o.valueSets;if(!Array.isArray(m)||!m.length)return;const g=this.getText(a);if(!g){if(l){const e=this.clearSelect(t);~e&&this.control.repaintControl({curIndex:e})}return}const p=this.getValue(t)[0],f=p?z(p,me):z(i[s.startIndex],we),R=this.clearSelect(t,{isAddPlaceholder:!1});if(!~R)return;l||this.control.removePlaceholder(R,t);const y=$(i[R],me),M=R+1,S=U(g),b=this.control.getDraw();for(let w=0;w<S.length;w++){const e=h(u(u({},f),y),{type:de.TEXT,value:S[w],controlComponent:dt.VALUE});rn(i,[e],R,{editorOptions:this.options}),b.spliceElementList(i,M+w,0,e)}if(this.control.setControlProperties({code:e},{elementList:i,range:{startIndex:R,endIndex:R}}),!t.range){const e=M+S.length-1;this.control.repaintControl({curIndex:e}),d||this.destroy()}}_createSelectPopupDom(){const e=this.element.control,t=e.valueSets;if(!Array.isArray(t)||!t.length)return;const n=this.control.getPosition();if(!n)return;const r=document.createElement("div");r.classList.add(ce+"-select-control-popup"),r.setAttribute(le,Yt.POPUP);const i=document.createElement("ul");for(let u=0;u<t.length;u++){const n=t[u],r=document.createElement("li");let s=this.getCodes();s.includes(n.code)&&r.classList.add("active"),r.onclick=()=>{const t=s.findIndex(e=>e===n.code);e.isMultiSelect?~t?s.splice(t,1):s.push(n.code):s=~t?[]:[n.code],this.setSelect(s.join(this.VALUE_DELIMITER))},r.append(document.createTextNode(n.value)),i.append(r)}r.append(i);const{coordinate:{leftTop:[s,o]},lineHeight:a}=n,l=this.control.getPreY();r.style.left=s+"px",r.style.top=o+l+a+"px";const c=this.control.getContainer();c.append(r),this.selectDom=r}awake(){var e;if(this.isPopup||this.control.getIsDisabledControl())return;const{startIndex:t}=this.control.getRange(),n=this.control.getElementList();(null==(e=n[t+1])?void 0:e.controlId)===this.element.controlId&&(this._createSelectPopupDom(),this.isPopup=!0)}destroy(){var e;this.isPopup&&(null==(e=this.selectDom)||e.remove(),this.isPopup=!1)}}class zr{constructor(e,t){d(this,"element"),d(this,"control"),d(this,"options");const n=t.getDraw();this.options=n.getOptions(),this.element=e,this.control=t}setElement(e){this.element=e}getElement(){return this.element}getValue(e={}){const t=e.elementList||this.control.getElementList(),{startIndex:n}=e.range||this.control.getRange(),r=t[n],i=[];let s=n;while(s>0){const e=t[s];if(e.controlId!==r.controlId||e.controlComponent===dt.PREFIX||e.controlComponent===dt.PRE_TEXT)break;e.controlComponent===dt.VALUE&&i.unshift(e),s--}let o=n+1;while(o<t.length){const e=t[o];if(e.controlId!==r.controlId||e.controlComponent===dt.POSTFIX||e.controlComponent===dt.POST_TEXT)break;e.controlComponent===dt.VALUE&&i.push(e),o++}return i}setValue(e,t={},n={}){if(!n.isIgnoreDisabledRule&&this.control.getIsDisabledControl(t))return-1;const r=t.elementList||this.control.getElementList(),i=t.range||this.control.getRange();this.control.shrinkBoundary(t);const{startIndex:s,endIndex:o}=i,a=this.control.getDraw();s!==o?a.spliceElementList(r,s+1,o-s):this.control.removePlaceholder(s,t);const l=r[s],c=l.type&&!ve.includes(l.type)||l.controlComponent===dt.PREFIX||l.controlComponent===dt.PRE_TEXT?z(l,["control","controlId",...we]):$(l,["type"]),d=i.startIndex+1;for(let m=0;m<e.length;m++){const t=h(u(u({},c),e[m]),{controlComponent:dt.VALUE});rn(r,[t],s,{editorOptions:this.options}),a.spliceElementList(r,d+m,0,t)}return d+e.length-1}clearValue(e={},t={}){if(!t.isIgnoreDisabledRule&&this.control.getIsDisabledControl(e))return-1;const n=e.elementList||this.control.getElementList(),r=e.range||this.control.getRange(),{startIndex:i,endIndex:s}=r;this.control.getDraw().spliceElementList(n,i+1,s-i);const o=this.getValue(e);return o.length||this.control.addPlaceholder(i,e),i}keydown(e){if(this.control.getIsDisabledControl())return null;const t=this.control.getElementList(),n=this.control.getRange();this.control.shrinkBoundary();const{startIndex:r,endIndex:i}=n,s=t[r],o=t[i],a=this.control.getDraw();if(e.key===Dn.Backspace){if(r!==i){a.spliceElementList(t,r+1,i-r);const e=this.getValue();return e.length||this.control.addPlaceholder(r),r}if(s.controlComponent===dt.PREFIX||s.controlComponent===dt.PRE_TEXT||o.controlComponent===dt.POSTFIX||o.controlComponent===dt.POST_TEXT||s.controlComponent===dt.PLACEHOLDER)return this.control.removeControl(r);{a.spliceElementList(t,r,1);const e=this.getValue();return e.length||this.control.addPlaceholder(r-1),r-1}}if(e.key===Dn.Delete){if(r!==i){a.spliceElementList(t,r+1,i-r);const e=this.getValue();return e.length||this.control.addPlaceholder(r),r}{const e=t[i+1];if((s.controlComponent===dt.PREFIX||s.controlComponent===dt.PRE_TEXT)&&e.controlComponent===dt.PLACEHOLDER||e.controlComponent===dt.POSTFIX||e.controlComponent===dt.POST_TEXT||s.controlComponent===dt.PLACEHOLDER)return this.control.removeControl(r);{a.spliceElementList(t,r+1,1);const e=this.getValue();return e.length||this.control.addPlaceholder(r),r}}}return i}cut(){if(this.control.getIsDisabledControl())return-1;this.control.shrinkBoundary();const{startIndex:e,endIndex:t}=this.control.getRange();if(e===t)return e;const n=this.control.getDraw(),r=this.control.getElementList();n.spliceElementList(r,e+1,t-e);const i=this.getValue();return i.length||this.control.addPlaceholder(e),e}}class $r{constructor(e,t={}){d(this,"draw"),d(this,"options"),d(this,"now"),d(this,"dom"),d(this,"renderOptions"),d(this,"isDatePicker"),d(this,"pickDate"),d(this,"lang"),this.draw=e,this.options=t,this.lang=this._getLang(),this.now=new Date,this.dom=this._createDom(),this.renderOptions=null,this.isDatePicker=!0,this.pickDate=null,this._bindEvent()}_createDom(){const e=document.createElement("div");e.classList.add(ce+"-date-container"),e.setAttribute(le,Yt.POPUP);const t=document.createElement("div");t.classList.add(ce+"-date-wrap");const n=document.createElement("div");n.classList.add(ce+"-date-title");const r=document.createElement("span");r.classList.add(ce+"-date-title__pre-year"),r.innerText="<<";const i=document.createElement("span");i.classList.add(ce+"-date-title__pre-month"),i.innerText="<";const s=document.createElement("span");s.classList.add(ce+"-date-title__now");const o=document.createElement("span");o.classList.add(ce+"-date-title__next-month"),o.innerText=">";const a=document.createElement("span");a.classList.add(ce+"-date-title__next-year"),a.innerText=">>",n.append(r),n.append(i),n.append(s),n.append(o),n.append(a);const l=document.createElement("div");l.classList.add(ce+"-date-week");const{weeks:{sun:c,mon:u,tue:h,wed:d,thu:m,fri:g,sat:p}}=this.lang,f=[c,u,h,d,m,g,p];f.forEach(e=>{const t=document.createElement("span");t.innerText=""+e,l.append(t)});const R=document.createElement("div");R.classList.add(ce+"-date-day"),t.append(n),t.append(l),t.append(R);const y=document.createElement("ul");let M,S,b;y.classList.add(ce+"-time-wrap");const w=[this.lang.hour,this.lang.minute,this.lang.second];w.forEach((e,t)=>{const n=document.createElement("li"),r=document.createElement("span");r.innerText=e,n.append(r);const i=document.createElement("ol"),s=0===t,o=1===t,a=s?24:60;for(let l=0;l<a;l++){const e=document.createElement("li");e.innerText=""+String(l).padStart(2,"0"),e.setAttribute("data-id",""+l),i.append(e)}s?M=i:o?S=i:b=i,n.append(i),y.append(n)});const T=document.createElement("div");T.classList.add(ce+"-date-menu");const O=document.createElement("button");O.classList.add(ce+"-date-menu__time"),O.innerText=this.lang.timeSelect;const v=document.createElement("button");v.classList.add(ce+"-date-menu__now"),v.innerText=this.lang.now;const E=document.createElement("button");return E.classList.add(ce+"-date-menu__submit"),E.innerText=this.lang.confirm,T.append(O),T.append(v),T.append(E),e.append(t),e.append(y),e.append(T),this.draw.getContainer().append(e),{container:e,dateWrap:t,datePickerWeek:l,timeWrap:y,title:{preYear:r,preMonth:i,now:s,nextMonth:o,nextYear:a},day:R,time:{hour:M,minute:S,second:b},menu:{time:O,now:v,submit:E}}}_bindEvent(){this.dom.title.preYear.onclick=()=>{this._preYear()},this.dom.title.preMonth.onclick=()=>{this._preMonth()},this.dom.title.nextMonth.onclick=()=>{this._nextMonth()},this.dom.title.nextYear.onclick=()=>{this._nextYear()},this.dom.menu.time.onclick=()=>{this.isDatePicker=!this.isDatePicker,this._toggleDateTimePicker()},this.dom.menu.now.onclick=()=>{this._now(),this._submit()},this.dom.menu.submit.onclick=()=>{this.dispose(),this._submit()},this.dom.time.hour.onclick=e=>{if(!this.pickDate)return;const t=e.target,n=t.dataset.id;n&&(this.pickDate.setHours(Number(n)),this._setTimePick(!1))},this.dom.time.minute.onclick=e=>{if(!this.pickDate)return;const t=e.target,n=t.dataset.id;n&&(this.pickDate.setMinutes(Number(n)),this._setTimePick(!1))},this.dom.time.second.onclick=e=>{if(!this.pickDate)return;const t=e.target,n=t.dataset.id;n&&(this.pickDate.setSeconds(Number(n)),this._setTimePick(!1))}}_setPosition(){if(!this.renderOptions)return;const{position:{coordinate:{leftTop:[e,t]},lineHeight:n,pageNo:r}}=this.renderOptions,i=this.draw.getHeight(),s=this.draw.getPageGap(),o=null!=r?r:this.draw.getPageNo(),a=o*(i+s);this.dom.container.style.left=e+"px",this.dom.container.style.top=t+a+n+"px"}isInvalidDate(e){return"Invalid Date"===e.toDateString()}_setValue(){var e;const t=null==(e=this.renderOptions)?void 0:e.value;if(t){const e=new Date(t);this.now=this.isInvalidDate(e)?new Date:e}else this.now=new Date;this.pickDate=new Date(this.now)}_getLang(){const e=this.draw.getI18n(),t=e.t.bind(e);return{now:t("datePicker.now"),confirm:t("datePicker.confirm"),return:t("datePicker.return"),timeSelect:t("datePicker.timeSelect"),weeks:{sun:t("datePicker.weeks.sun"),mon:t("datePicker.weeks.mon"),tue:t("datePicker.weeks.tue"),wed:t("datePicker.weeks.wed"),thu:t("datePicker.weeks.thu"),fri:t("datePicker.weeks.fri"),sat:t("datePicker.weeks.sat")},year:t("datePicker.year"),month:t("datePicker.month"),hour:t("datePicker.hour"),minute:t("datePicker.minute"),second:t("datePicker.second")}}_setLangChange(){this.dom.menu.time.innerText=this.lang.timeSelect,this.dom.menu.now.innerText=this.lang.now,this.dom.menu.submit.innerText=this.lang.confirm;const{weeks:{sun:e,mon:t,tue:n,wed:r,thu:i,fri:s,sat:o}}=this.lang,a=[e,t,n,r,i,s,o];this.dom.datePickerWeek.childNodes.forEach((e,t)=>{const n=e;n.innerText=a[t]});const l=this.dom.time.hour.previousElementSibling;l.innerText=this.lang.hour;const c=this.dom.time.minute.previousElementSibling;c.innerText=this.lang.minute;const u=this.dom.time.second.previousElementSibling;u.innerText=this.lang.second}_update(){const e=new Date,t=e.getFullYear(),n=e.getMonth()+1,r=e.getDate();let i=null,s=null,o=null;this.pickDate&&(i=this.pickDate.getFullYear(),s=this.pickDate.getMonth()+1,o=this.pickDate.getDate());const a=this.now.getFullYear(),l=this.now.getMonth()+1;this.dom.title.now.innerText=`${a}${this.lang.year} ${String(l).padStart(2,"0")}${this.lang.month}`;const c=new Date(a,l,0),u=c.getDate();let h=new Date(a,l-1,1).getDay();0===h&&(h=7);const d=new Date(a,l-1,0).getDate();this.dom.day.innerHTML="";const m=d-h+1;for(let p=m;p<=d;p++){const e=document.createElement("div");e.classList.add("disable"),e.innerText=""+p,e.onclick=()=>{const e=l-2;this.now=new Date(a,e,p),this._setDatePick(a,e,p)},this.dom.day.append(e)}for(let p=1;p<=u;p++){const e=document.createElement("div");t===a&&n===l&&r===p&&e.classList.add("active"),this.pickDate&&i===a&&s===l&&o===p&&e.classList.add("select"),e.innerText=""+p,e.onclick=e=>{const t=l-1;this.now=new Date(a,t,p),this._setDatePick(a,t,p),e.stopPropagation()},this.dom.day.append(e)}const g=42-h-u;for(let p=1;p<=g;p++){const e=document.createElement("div");e.classList.add("disable"),e.innerText=""+p,e.onclick=()=>{this.now=new Date(a,l,p),this._setDatePick(a,l,p)},this.dom.day.append(e)}}_toggleDateTimePicker(){this.isDatePicker?(this.dom.dateWrap.classList.add("active"),this.dom.timeWrap.classList.remove("active"),this.dom.menu.time.innerText=this.lang.timeSelect):(this.dom.dateWrap.classList.remove("active"),this.dom.timeWrap.classList.add("active"),this.dom.menu.time.innerText=this.lang.return,this._setTimePick())}_setDatePick(e,t,n){var r,i,s;this.now=new Date(e,t,n),null==(r=this.pickDate)||r.setFullYear(e),null==(i=this.pickDate)||i.setMonth(t),null==(s=this.pickDate)||s.setDate(n),this._update()}_setTimePick(e=!0){var t,n,r;const i=(null==(t=this.pickDate)?void 0:t.getHours())||0,s=(null==(n=this.pickDate)?void 0:n.getMinutes())||0,o=(null==(r=this.pickDate)?void 0:r.getSeconds())||0,{hour:a,minute:l,second:c}=this.dom.time,u=[a,l,c];u.forEach(e=>{e.querySelectorAll("li").forEach(e=>e.classList.remove("active"))});const h=[[a,i],[l,s],[c,o]];h.forEach(([t,n])=>{const r=t.querySelector(`[data-id='${n}']`);r.classList.add("active"),e&&this._scrollIntoView(t,r)})}_scrollIntoView(e,t){if(!t)return void(e.scrollTop=0);const n=[];let r=t.offsetParent;while(r&&e!==r&&e.contains(r))n.push(r),r=r.offsetParent;const i=t.offsetTop+n.reduce((e,t)=>e+t.offsetTop,0),s=i+t.offsetHeight,o=e.scrollTop,a=o+e.clientHeight;i<o?e.scrollTop=i:s>a&&(e.scrollTop=s-e.clientHeight)}_preMonth(){this.now.setMonth(this.now.getMonth()-1),this._update()}_nextMonth(){this.now.setMonth(this.now.getMonth()+1),this._update()}_preYear(){this.now.setFullYear(this.now.getFullYear()-1),this._update()}_nextYear(){this.now.setFullYear(this.now.getFullYear()+1),this._update()}_now(){this.pickDate=new Date,this.dispose()}_toggleVisible(e){e?this.dom.container.classList.add("active"):this.dom.container.classList.remove("active")}_submit(){var e;if(this.options.onSubmit&&this.pickDate){const t=null==(e=this.renderOptions)?void 0:e.dateFormat,n=this.formatDate(this.pickDate,t);this.options.onSubmit(n)}}formatDate(e,t="yyyy-MM-dd hh:mm:ss"){let n=t;const r={"y+":e.getFullYear().toString(),"M+":(e.getMonth()+1).toString(),"d+":e.getDate().toString(),"h+":e.getHours().toString(),"m+":e.getMinutes().toString(),"s+":e.getSeconds().toString()};for(const i in r){const e=new RegExp("("+i+")").exec(t),s=i;e&&(n=n.replace(e[1],1===e[1].length?r[s]:r[s].padStart(e[1].length,"0")))}return n}render(e){this.renderOptions=e,this.lang=this._getLang(),this._setLangChange(),this._setValue(),this._update(),this._setPosition(),this.isDatePicker=!0,this._toggleDateTimePicker(),this._toggleVisible(!0)}dispose(){this._toggleVisible(!1)}destroy(){this.dom.container.remove()}}class qr{constructor(e,t){d(this,"draw"),d(this,"element"),d(this,"control"),d(this,"isPopup"),d(this,"datePicker"),d(this,"options");const n=t.getDraw();this.draw=n,this.options=n.getOptions(),this.element=e,this.control=t,this.isPopup=!1,this.datePicker=null}setElement(e){this.element=e}getElement(){return this.element}getIsPopup(){return this.isPopup}getValueRange(e={}){const t=e.elementList||this.control.getElementList(),{startIndex:n}=e.range||this.control.getRange(),r=t[n];let i=n;while(i>0){const e=t[i];if(e.controlId!==r.controlId||e.controlComponent===dt.PREFIX||e.controlComponent===dt.PRE_TEXT)break;i--}let s=n+1;while(s<t.length){const e=t[s];if(e.controlId!==r.controlId||e.controlComponent===dt.POSTFIX||e.controlComponent===dt.POST_TEXT)break;s++}return i===s?null:[i,s-1]}getValue(e={}){const t=e.elementList||this.control.getElementList(),n=this.getValueRange(e);if(!n)return[];const r=[],[i,s]=n;for(let o=i;o<=s;o++){const e=t[o];e.controlComponent===dt.VALUE&&r.push(e)}return r}setValue(e,t={},n={}){if(!n.isIgnoreDisabledRule&&this.control.getIsDisabledControl(t))return-1;const r=t.elementList||this.control.getElementList(),i=t.range||this.control.getRange();this.control.shrinkBoundary(t);const{startIndex:s,endIndex:o}=i,a=this.control.getDraw();s!==o?a.spliceElementList(r,s+1,o-s):this.control.removePlaceholder(s,t);const l=r[s],c=l.type&&!ve.includes(l.type)||l.controlComponent===dt.PREFIX||l.controlComponent===dt.PRE_TEXT?z(l,["control","controlId",...we]):$(l,["type"]),d=i.startIndex+1;for(let m=0;m<e.length;m++){const t=h(u(u({},c),e[m]),{controlComponent:dt.VALUE});rn(r,[t],s,{editorOptions:this.options}),a.spliceElementList(r,d+m,0,t)}return d+e.length-1}clearSelect(e={},t={}){const{isIgnoreDisabledRule:n=!1,isAddPlaceholder:r=!0}=t;if(!n&&this.control.getIsDisabledControl(e))return-1;const i=this.getValueRange(e);if(!i)return-1;const[s,o]=i;if(!~s||!~o)return-1;const a=e.elementList||this.control.getElementList(),l=this.control.getDraw();return l.spliceElementList(a,s+1,o-s),r&&this.control.addPlaceholder(s,e),s}setSelect(e,t={},n={}){if(!n.isIgnoreDisabledRule&&this.control.getIsDisabledControl(t))return;const r=t.elementList||this.control.getElementList(),i=t.range||this.control.getRange(),s=this.getValue(t)[0],o=s?z(s,me):z(r[i.startIndex],we),a=this.clearSelect(t,{isAddPlaceholder:!1});if(!~a)return;const l=$(r[a],me),c=a+1,d=this.control.getDraw();for(let m=0;m<e.length;m++){const t=h(u(u({},o),l),{type:de.TEXT,value:e[m],controlComponent:dt.VALUE});rn(r,[t],a,{editorOptions:this.options}),d.spliceElementList(r,c+m,0,t)}if(!t.range){const t=c+e.length-1;this.control.repaintControl({curIndex:t}),this.destroy()}}keydown(e){if(this.control.getIsDisabledControl())return null;const t=this.control.getElementList(),n=this.control.getRange();this.control.shrinkBoundary();const{startIndex:r,endIndex:i}=n,s=t[r],o=t[i],a=this.control.getDraw();if(e.key===Dn.Backspace){if(r!==i){a.spliceElementList(t,r+1,i-r);const e=this.getValue();return e.length||this.control.addPlaceholder(r),r}if(s.controlComponent===dt.PREFIX||s.controlComponent===dt.PRE_TEXT||o.controlComponent===dt.POSTFIX||o.controlComponent===dt.POST_TEXT||s.controlComponent===dt.PLACEHOLDER)return this.control.removeControl(r);{a.spliceElementList(t,r,1);const e=this.getValue();return e.length||this.control.addPlaceholder(r-1),r-1}}if(e.key===Dn.Delete){if(r!==i){a.spliceElementList(t,r+1,i-r);const e=this.getValue();return e.length||this.control.addPlaceholder(r),r}{const e=t[i+1];if((s.controlComponent===dt.PREFIX||s.controlComponent===dt.PRE_TEXT)&&e.controlComponent===dt.PLACEHOLDER||e.controlComponent===dt.POSTFIX||e.controlComponent===dt.POST_TEXT||s.controlComponent===dt.PLACEHOLDER)return this.control.removeControl(r);{a.spliceElementList(t,r+1,1);const e=this.getValue();return e.length||this.control.addPlaceholder(r),r}}}return i}cut(){if(this.control.getIsDisabledControl())return-1;this.control.shrinkBoundary();const{startIndex:e,endIndex:t}=this.control.getRange();if(e===t)return e;const n=this.control.getDraw(),r=this.control.getElementList();n.spliceElementList(r,e+1,t-e);const i=this.getValue();return i.length||this.control.addPlaceholder(e),e}awake(){var e,t;if(this.isPopup||this.control.getIsDisabledControl())return;const n=this.control.getPosition();if(!n)return;const r=this.draw.getElementList(),{startIndex:i}=this.control.getRange();if((null==(e=r[i+1])?void 0:e.controlId)!==this.element.controlId)return;this.datePicker=new $r(this.draw,{onSubmit:this._setDate.bind(this)});const s=this.getValue().map(e=>e.value).join("")||"",o=null==(t=this.element.control)?void 0:t.dateFormat;this.datePicker.render({value:s,position:n,dateFormat:o}),this.isPopup=!0}destroy(){var e;this.isPopup&&(null==(e=this.datePicker)||e.destroy(),this.isPopup=!1)}_setDate(e){e?this.setSelect(e):this.clearSelect(),this.destroy()}}class ei extends zr{}class ti{constructor(e){d(this,"controlBorder"),d(this,"draw"),d(this,"range"),d(this,"listener"),d(this,"eventBus"),d(this,"controlSearch"),d(this,"options"),d(this,"controlOptions"),d(this,"activeControl"),d(this,"activeControlValue"),this.controlBorder=new Br(e),this.draw=e,this.range=e.getRange(),this.listener=e.getListener(),this.eventBus=e.getEventBus(),this.controlSearch=new Gr(this),this.options=e.getOptions(),this.controlOptions=this.options.control,this.activeControl=null,this.activeControlValue=[]}setHighlightList(e){this.controlSearch.setHighlightList(e)}computeHighlightList(){const e=this.controlSearch.getHighlightList();e.length&&this.controlSearch.computeHighlightList()}renderHighlightList(e,t){const n=this.controlSearch.getHighlightMatchResult();n.length&&this.controlSearch.renderHighlightList(e,t)}getDraw(){return this.draw}filterAssistElement(e){return e.filter((t,n)=>{var r,i,s;if(t.type===de.TABLE){const e=t.trList;for(let t=0;t<e.length;t++){const n=e[t];for(let e=0;e<n.tdList.length;e++){const t=n.tdList[e];t.value=this.filterAssistElement(t.value)}}}if(!t.controlId)return!0;if(null==(r=t.control)?void 0:r.minWidth){if(t.controlComponent===dt.PREFIX||t.controlComponent===dt.POSTFIX)return t.value="",!0}else{if((null==(i=t.control)?void 0:i.preText)&&t.controlComponent===dt.PRE_TEXT){let r=!1,i=n+1;while(i<e.length){const n=e[i];if(t.controlId!==n.controlId)break;if(n.controlComponent===dt.VALUE){r=!0;break}i++}return r}if((null==(s=t.control)?void 0:s.postText)&&t.controlComponent===dt.POST_TEXT){let r=!1,i=n-1;while(i<e.length){const n=e[i];if(t.controlId!==n.controlId)break;if(n.controlComponent===dt.VALUE){r=!0;break}i--}return r}}return t.controlComponent!==dt.PREFIX&&t.controlComponent!==dt.POSTFIX&&t.controlComponent!==dt.PLACEHOLDER})}getIsRangeCanCaptureEvent(){if(!this.activeControl)return!1;const{startIndex:e,endIndex:t}=this.getRange();if(!~e&&!~t)return!1;const n=this.getElementList(),r=n[e];if(e===t&&r.controlComponent===dt.POSTFIX)return!0;const i=n[t];return!(!r.controlId||r.controlId!==i.controlId||i.controlComponent===dt.POSTFIX)}getIsRangeInPostfix(){if(!this.activeControl)return!1;const{startIndex:e,endIndex:t}=this.getRange();if(e!==t)return!1;const n=this.getElementList(),r=n[e];return r.controlComponent===dt.POSTFIX}getIsRangeWithinControl(){const{startIndex:e,endIndex:t}=this.getRange();if(!~e&&!~t)return!1;const n=this.getElementList(),r=n[e],i=n[t];return!(!r.controlId||r.controlId!==i.controlId||i.controlComponent===dt.POSTFIX)}getIsElementListContainFullControl(e){if(!e.some(e=>e.controlId))return!1;let t=0,n=0;for(let r=0;r<e.length;r++){const i=e[r];i.controlComponent===dt.PREFIX?t++:i.controlComponent===dt.POSTFIX&&n++}return!(!t||!n)&&t===n}getIsDisabledControl(e={}){var t,n;if(this.draw.isDesignMode()||!this.activeControl)return!1;const{startIndex:r,endIndex:i}=e.range||this.range.getRange();if(r===i&&~r&&~i){const t=e.elementList||this.getElementList(),n=t[r];if(n.controlComponent===dt.POSTFIX)return!1}return!!(null==(n=null==(t=this.activeControl.getElement())?void 0:t.control)?void 0:n.disabled)}getIsDisabledPasteControl(e={}){var t,n;if(this.draw.isDesignMode()||!this.activeControl)return!1;const{startIndex:r,endIndex:i}=e.range||this.range.getRange();if(r===i&&~r&&~i){const t=e.elementList||this.getElementList(),n=t[r];if(n.controlComponent===dt.POSTFIX)return!1}return!!(null==(n=null==(t=this.activeControl.getElement())?void 0:t.control)?void 0:n.pasteDisabled)}getContainer(){return this.draw.getContainer()}getElementList(){return this.draw.getElementList()}getPosition(){const e=this.draw.getPosition().getPositionList(),{endIndex:t}=this.range.getRange();return e[t]||null}getPreY(){var e,t;const n=this.draw.getHeight(),r=this.draw.getPageGap(),i=null!=(t=null==(e=this.getPosition())?void 0:e.pageNo)?t:this.draw.getPageNo();return i*(n+r)}getRange(){return this.range.getRange()}shrinkBoundary(e={}){this.range.shrinkBoundary(e)}getActiveControl(){return this.activeControl}getControlElementList(e={}){const t=e.elementList||this.getElementList(),{startIndex:n}=e.range||this.getRange(),r=t[n],i=[];let s=n;while(s>0){const e=t[s];if(e.controlId!==r.controlId)break;i.unshift(e),s--}let o=n+1;while(o<t.length){const e=t[o];if(e.controlId!==r.controlId)break;i.push(e),o++}return i}updateActiveControlValue(){this.activeControl&&(this.activeControlValue=this.getControlElementList())}initControl(){var e,t;const n=this.getElementList(),r=this.getRange(),i=n[r.startIndex];if(this.activeControl){(this.activeControl instanceof Jr||this.activeControl instanceof qr)&&(i.controlComponent===dt.POSTFIX?this.activeControl.destroy():this.activeControl.awake());const e=this.activeControl.getElement();if(i.controlId===e.controlId)return void this.updateActiveControlValue()}this.destroyControl();const s=this.draw.isReadonly();if(s)return;const o=i.control;if(o.type===ht.TEXT)this.activeControl=new zr(i,this);else if(o.type===ht.SELECT){const e=new Jr(i,this);this.activeControl=e,e.awake()}else if(o.type===ht.CHECKBOX)this.activeControl=new An(i,this);else if(o.type===ht.RADIO)this.activeControl=new Fn(i,this);else if(o.type===ht.DATE){const e=new qr(i,this);this.activeControl=e,e.awake()}else o.type===ht.NUMBER&&(this.activeControl=new ei(i,this));this.updateActiveControlValue();const a=this.eventBus.isSubscribe("controlChange");if(this.listener.controlChange||a){let n;const r=this.activeControlValue;(null==r?void 0:r.length)?n=zt(r)[0].control:(n=Jt(Y(i)).control,n.value=[]);const s={control:n,controlId:i.controlId,state:gt.ACTIVE};null==(t=(e=this.listener).controlChange)||t.call(e,s),a&&this.eventBus.emit("controlChange",s)}}destroyControl(e={}){var t,n;if(!this.activeControl)return;const{isEmitEvent:r=!0}=e;if((this.activeControl instanceof Jr||this.activeControl instanceof qr)&&this.activeControl.destroy(),r){const e=this.eventBus.isSubscribe("controlChange");if(this.listener.controlChange||e){let r;const i=this.activeControlValue,s=this.activeControl.getElement();(null==i?void 0:i.length)?r=zt(i)[0].control:(r=Jt(Y(s)).control,r.value=[]);const o={control:r,controlId:s.controlId,state:gt.INACTIVE};null==(n=(t=this.listener).controlChange)||n.call(t,o),e&&this.eventBus.emit("controlChange",o)}}this.activeControl=null,this.activeControlValue=[]}repaintControl(e={}){const{curIndex:t,isCompute:n=!0,isSubmitHistory:r=!0,isSetCursor:i=!0}=e;void 0===t?(this.range.clearRange(),this.draw.render({isCompute:n,isSubmitHistory:r,isSetCursor:!1})):(this.range.setRange(t,t),this.draw.render({curIndex:t,isCompute:n,isSetCursor:i,isSubmitHistory:r}))}reAwakeControl(){if(!this.activeControl)return;const e=this.getElementList(),t=this.getRange(),n=e[t.startIndex];this.activeControl.setElement(n),(this.activeControl instanceof qr||this.activeControl instanceof Jr)&&this.activeControl.getIsPopup()&&(this.activeControl.destroy(),this.activeControl.awake())}moveCursor(e){const{index:t,trIndex:n,tdIndex:r,tdValueIndex:i}=e;let s,o=this.draw.getOriginalElementList();const a=e.isTable?i:t;if(e.isTable?(o=o[t].trList[n].tdList[r].value,s=o[i]):s=o[t],s.controlComponent===dt.VALUE)return{newIndex:a,newElement:s};if(s.controlComponent===dt.POSTFIX){let e=a+1;while(e<o.length){const t=o[e];if(t.controlId!==s.controlId)return{newIndex:e-1,newElement:o[e-1]};e++}}else if(s.controlComponent===dt.PREFIX||s.controlComponent===dt.PRE_TEXT){let e=a+1;while(e<o.length){const t=o[e];if(t.controlId!==s.controlId||t.controlComponent!==dt.PREFIX&&t.controlComponent!==dt.PRE_TEXT)return{newIndex:e-1,newElement:o[e-1]};e++}}else if(s.controlComponent===dt.PLACEHOLDER||s.controlComponent===dt.POST_TEXT){let e=a-1;while(e>0){const t=o[e];if(t.controlId!==s.controlId||t.controlComponent===dt.VALUE||t.controlComponent===dt.PREFIX||t.controlComponent===dt.PRE_TEXT)return{newIndex:e,newElement:o[e]};e--}}return{newIndex:a,newElement:s}}removeControl(e,t={}){const n=t.elementList||this.getElementList(),r=n[e];if(!this.draw.isDesignMode()){const{deletable:e=!0}=r.control;if(!e)return null}let i=-1,s=-1,o=e;while(o>0){const e=n[o];if(e.controlId!==r.controlId){i=o;break}o--}let a=e+1;while(a<n.length){const e=n[a];if(e.controlId!==r.controlId){s=a-1;break}a++}return a===n.length&&(s=a-1),~i||~s?(i=~i?i:0,this.draw.spliceElementList(n,i+1,s-i),i):e}removePlaceholder(e,t={}){const n=t.elementList||this.getElementList(),r=n[e],i=n[e+1];if(r.controlComponent===dt.PLACEHOLDER||i.controlComponent===dt.PLACEHOLDER){let t=!1,i=e;while(i<n.length){const s=n[i];if(s.controlId!==r.controlId)break;s.controlComponent===dt.PLACEHOLDER?(t||(t=!0,this.draw.getHistoryManager().popUndo(),this.draw.submitHistory(e)),n.splice(i,1)):i++}}}addPlaceholder(e,t={}){const n=t.elementList||this.getElementList(),r=n[e],i=r.control;if(!i.placeholder)return;const s=U(i.placeholder),o=z(r,we);for(let a=0;a<s.length;a++){const t=s[a],i=h(u({},o),{value:"\n"===t?M:t,controlId:r.controlId,type:de.CONTROL,control:r.control,controlComponent:dt.PLACEHOLDER,color:this.controlOptions.placeholderColor});rn(n,[i],e,{editorOptions:this.options}),this.draw.spliceElementList(n,e+a+1,0,i)}}setValue(e){if(!this.activeControl)throw new Error("active control is null");return this.activeControl.setValue(e)}setControlProperties(e,t={}){const n=t.elementList||this.getElementList(),{startIndex:r}=t.range||this.getRange(),i=n[r];let s=r;while(s>0){const t=n[s];if(t.controlId!==i.controlId)break;t.control=u(u({},t.control),e),s--}let o=r+1;while(o<n.length){const t=n[o];if(t.controlId!==i.controlId)break;t.control=u(u({},t.control),e),o++}}keydown(e){if(!this.activeControl)throw new Error("active control is null");return this.activeControl.keydown(e)}cut(){if(!this.activeControl)throw new Error("active control is null");return this.activeControl.cut()}getValueById(e){const{id:t,conceptId:n,areaId:r}=e,i=[];if(!t&&!n)return i;const s=(e,o)=>{let a=0;while(a<e.length){const l=e[a];if(a++,l.type===de.TABLE){const e=l.trList;for(let t=0;t<e.length;t++){const n=e[t];for(let e=0;e<n.tdList.length;e++){const t=n.tdList[e];s(t.value,o)}}}if(!l.control||t&&l.controlId!==t||n&&l.control.conceptId!==n||r&&l.areaId!==r)continue;const{type:c,code:d,valueSets:m}=l.control;let g=a,p="";const f=[];while(g<e.length){const t=e[g];if(t.controlId!==l.controlId)break;c!==ht.TEXT&&c!==ht.DATE&&c!==ht.NUMBER||t.controlComponent!==dt.VALUE||(p+=t.value,f.push($(t,be))),g++}if(c===ht.TEXT||c===ht.DATE||c===ht.NUMBER)i.push(h(u({},l.control),{zone:o,value:p||null,innerText:p||null,elementList:zt(f)}));else if(c===ht.SELECT||c===ht.CHECKBOX||c===ht.RADIO){const e=null==d?void 0:d.split(",").map(e=>{var t;return null==(t=null==m?void 0:m.find(t=>t.code===e))?void 0:t.value}).filter(Boolean).join("");i.push(h(u({},l.control),{zone:o,value:d||null,innerText:e||null}))}a=g}},o=[{zone:Vt.HEADER,elementList:this.draw.getHeaderElementList()},{zone:Vt.MAIN,elementList:this.draw.getOriginalMainElementList()},{zone:Vt.FOOTER,elementList:this.draw.getFooterElementList()}];for(const{zone:a,elementList:l}of o)s(l,a);return i}setValueById(e){let t=!1;const{id:n,conceptId:r,areaId:i,value:s}=e;if(!n&&!r)return;const o=e=>{let a=0;while(a<e.length){const l=e[a];if(a++,l.type===de.TABLE){const e=l.trList;for(let t=0;t<e.length;t++){const n=e[t];for(let e=0;e<n.tdList.length;e++){const t=n.tdList[e];o(t.value)}}}if(!l.control||n&&l.controlId!==n||r&&l.control.conceptId!==r||i&&l.areaId!==i)continue;t=!0;const{type:c}=l.control;let u=a;while(u<e.length){const t=e[u];if(t.controlId!==l.controlId)break;u++}const h={startIndex:a-1,endIndex:u-2},d={range:h,elementList:e},m={isIgnoreDisabledRule:!0};if(c===ht.TEXT){const e=Array.isArray(s)?s:[{value:s}];Gt(e,{isHandleFirstElement:!1,editorOptions:this.options});const t=new zr(l,this);this.activeControl=t,s?t.setValue(e,d,m):t.clearValue(d,m)}else if(c===ht.SELECT){if(Array.isArray(s))continue;const e=new Jr(l,this);this.activeControl=e,s?e.setSelect(s,d,m):e.clearSelect(d,m)}else if(c===ht.CHECKBOX){if(Array.isArray(s))continue;const e=new An(l,this);this.activeControl=e;const t=s?s.split(","):[];e.setSelect(t,d,m)}else if(c===ht.RADIO){if(Array.isArray(s))continue;const e=new Fn(l,this);this.activeControl=e;const t=s?[s]:[];e.setSelect(t,d,m)}else if(c===ht.DATE){if(Array.isArray(s))continue;const e=new qr(l,this);this.activeControl=e,s?e.setSelect(s,d,m):e.clearSelect(d,m)}else if(c===ht.NUMBER){const e=Array.isArray(s)?s:[{value:s}];Gt(e,{isHandleFirstElement:!1,editorOptions:this.options});const t=new ei(l,this);this.activeControl=t,s?t.setValue(e,d,m):t.clearValue(d,m)}this.activeControl=null;let g=a;while(g<e.length){const t=e[g];if(t.controlId!==l.controlId)break;g++}a=g}};this.destroyControl({isEmitEvent:!1});const a=[this.draw.getHeaderElementList(),this.draw.getOriginalMainElementList(),this.draw.getFooterElementList()];for(const l of a)o(l);t&&this.draw.render({isSetCursor:!1})}setExtensionById(e){const{id:t,conceptId:n,areaId:r,extension:i}=e;if(!t&&!n)return;const s=e=>{let o=0;while(o<e.length){const a=e[o];if(o++,a.type===de.TABLE){const e=a.trList;for(let t=0;t<e.length;t++){const n=e[t];for(let e=0;e<n.tdList.length;e++){const t=n.tdList[e];s(t.value)}}}if(!a.control||t&&a.controlId!==t||n&&a.control.conceptId!==n||r&&a.areaId!==r)continue;this.setControlProperties({extension:i},{elementList:e,range:{startIndex:o,endIndex:o}});let l=o;while(l<e.length){const t=e[l];if(t.controlId!==a.controlId)break;l++}o=l}},o=[this.draw.getHeaderElementList(),this.draw.getOriginalMainElementList(),this.draw.getFooterElementList()];for(const a of o)s(a)}setPropertiesById(e){const{id:t,conceptId:n,areaId:r,properties:i}=e;if(!t&&!n)return;let s=!1;const o=e=>{let a=0;while(a<e.length){const l=e[a];if(a++,l.type===de.TABLE){const e=l.trList;for(let t=0;t<e.length;t++){const n=e[t];for(let e=0;e<n.tdList.length;e++){const t=n.tdList[e];o(t.value)}}}if(!l.control||t&&l.controlId!==t||n&&l.control.conceptId!==n||r&&l.areaId!==r)continue;s=!0,this.setControlProperties(h(u(u({},l.control),i),{value:l.control.value}),{elementList:e,range:{startIndex:a,endIndex:a}}),we.forEach(e=>{const t=i[e];t&&Reflect.set(l,e,t)});let c=a;while(c<e.length){const t=e[c];if(t.controlId!==l.controlId)break;c++}a=c}},a={header:this.draw.getHeaderElementList(),main:this.draw.getOriginalMainElementList(),footer:this.draw.getFooterElementList()};for(const l in a){const e=a[l];o(e)}if(s){for(const e in a){const t=e,n=zt(a[t],{isClassifyArea:!0});a[t]=n,Gt(n,{editorOptions:this.options,isForceCompensation:!0})}this.draw.setEditorData(a),this.draw.render({isSetCursor:!1})}}getList(){const e=[];function t(n){for(let r=0;r<n.length;r++){const i=n[r];if(i.type===de.TABLE){const e=i.trList;for(let n=0;n<e.length;n++){const r=e[n];for(let e=0;e<r.tdList.length;e++){const n=r.tdList[e],i=n.value;t(i)}}}if(i.controlId){const t=$(i,[...Me,...Se]);e.push(t)}}}const n=[this.draw.getHeader().getElementList(),this.draw.getOriginalMainElementList(),this.draw.getFooter().getElementList()];for(const r of n)t(r);return zt(e,{extraPickAttrs:["controlId"]})}recordBorderInfo(e,t,n,r){this.controlBorder.recordBorderInfo(e,t,n,r)}drawBorder(e){this.controlBorder.render(e)}getPreControlContext(){if(!this.activeControl)return null;const e=this.draw.getPosition(),t=e.getPositionContext();if(!t)return null;const n=this.activeControl.getElement();function r(e,t){for(let i=t;i>0;i--){const t=e[i];if(t.type===de.TABLE){const e=t.trList||[];for(let n=e.length-1;n>=0;n--){const s=e[n],o=s.tdList;for(let e=o.length-1;e>=0;e--){const a=o[e],l=r(a.value,a.value.length-1);if(l)return{positionContext:{isTable:!0,index:i,trIndex:n,tdIndex:e,tdId:a.id,trId:s.id,tableId:t.id},nextIndex:l.nextIndex}}}}if(!t.controlId||t.controlId===n.controlId)continue;let s=i;while(s>0){const t=e[s];if(t.controlComponent===dt.VALUE||t.controlComponent===dt.PREFIX||t.controlComponent===dt.PRE_TEXT)break;s--}return{positionContext:{isTable:!1},nextIndex:s}}return null}const{startIndex:i}=this.range.getRange(),s=this.getElementList(),o=r(s,i);if(o)return{positionContext:t.isTable?t:o.positionContext,nextIndex:o.nextIndex};if(n.tableId){const e=this.draw.getOriginalElementList(),{index:i,trIndex:s,tdIndex:o}=t,a=e[i].trList;for(let c=s;c>=0;c--){const e=a[c],i=e.tdList;for(let a=i.length-1;a>=0;a--){if(s===c&&a>=o)continue;const l=i[a],u=r(l.value,l.value.length-1);if(u)return{positionContext:{isTable:!0,index:t.index,trIndex:c,tdIndex:a,tdId:l.id,trId:e.id,tableId:n.tableId},nextIndex:u.nextIndex}}}const l=r(e,i-1);if(l)return{positionContext:{isTable:!1},nextIndex:l.nextIndex}}return null}getNextControlContext(){if(!this.activeControl)return null;const e=this.draw.getPosition(),t=e.getPositionContext();if(!t)return null;const n=this.activeControl.getElement();function r(e,t){var i,s;for(let o=t;o<e.length;o++){const t=e[o];if(t.type===de.TABLE){const e=t.trList||[];for(let n=0;n<e.length;n++){const i=e[n],s=i.tdList;for(let e=0;e<s.length;e++){const a=s[e],l=r(a.value,0);if(l)return{positionContext:{isTable:!0,index:o,trIndex:n,tdIndex:e,tdId:a.id,trId:i.id,tableId:t.id},nextIndex:l.nextIndex}}}}if(t.controlId&&t.controlId!==n.controlId&&(null==(i=e[o+1])?void 0:i.controlComponent)!==dt.PREFIX&&(null==(s=e[o+1])?void 0:s.controlComponent)!==dt.PRE_TEXT)return{positionContext:{isTable:!1},nextIndex:o}}return null}const{endIndex:i}=this.range.getRange(),s=this.getElementList(),o=r(s,i);if(o)return{positionContext:t.isTable?t:o.positionContext,nextIndex:o.nextIndex};if(n.tableId){const e=this.draw.getOriginalElementList(),{index:i,trIndex:s,tdIndex:o}=t,a=e[i].trList;for(let c=s;c<a.length;c++){const e=a[c],i=e.tdList;for(let a=0;a<i.length;a++){if(s===c&&a<=o)continue;const l=i[a],u=r(l.value,0);if(u)return{positionContext:{isTable:!0,index:t.index,trIndex:c,tdIndex:a,tdId:l.id,trId:e.id,tableId:n.tableId},nextIndex:u.nextIndex}}}const l=r(e,i+1);if(l)return{positionContext:{isTable:!1},nextIndex:l.nextIndex}}return null}initNextControl(e={}){const{direction:t=he.DOWN}=e;let n=null;if(n=t===he.UP?this.getPreControlContext():this.getNextControlContext(),!n)return;const{nextIndex:r,positionContext:i}=n,s=this.draw.getPosition();s.setPositionContext(i),this.draw.getRange().replaceRange({startIndex:r,endIndex:r}),this.draw.render({curIndex:r,isCompute:!1,isSetCursor:!0,isSubmitHistory:!1});const o=s.getPositionList();this.draw.getCursor().moveCursorToVisible({cursorPosition:o[r],direction:t})}setMinWidthControlInfo(e){var t,n,r,i,s;const{row:o,rowElement:a,controlRealWidth:l,availableWidth:c}=e;if(!(null==(t=a.control)?void 0:t.minWidth))return;const{scale:u}=this.options,h=a.control.minWidth*u;let d=null;if((null==(n=a.control)?void 0:n.minWidth)&&((null==(r=a.control)?void 0:r.rowFlex)===C.CENTER||(null==(i=a.control)?void 0:i.rowFlex)===C.RIGHT)){let e=a.metrics.width,t=o.elementList.length-1;while(t>=0){const n=o.elementList[t];if(e+=n.metrics.width,(null==(s=o.elementList[t-1])?void 0:s.controlComponent)===dt.PREFIX){d=n;break}t--}d&&e<h&&(a.control.rowFlex===C.CENTER?d.left=(h-e)/2:a.control.rowFlex===C.RIGHT&&(d.left=h-e-a.metrics.width))}const m=h-l;if(m>0){const e=(null==d?void 0:d.left)||0,t=c-o.width-a.metrics.width,n=Math.min(t,m);a.left=n-e,o.width+=n-e}}}class ni{constructor(e){d(this,"draw"),d(this,"options"),this.draw=e,this.options=e.getOptions()}setSelect(e){const{checkbox:t}=e;t?t.value=!t.value:e.checkbox={value:!0},this.draw.render({isCompute:!1,isSetCursor:!1})}render(e){const{ctx:t,x:n,index:r,row:i}=e;let{y:s}=e;const{checkbox:{gap:o,lineWidth:a,fillStyle:l,strokeStyle:c,verticalAlign:u},scale:h}=this.options,{metrics:d,checkbox:m}=i.elementList[r];if(u===yt.TOP||u===yt.MIDDLE){let e=r+1,t=null;while(e<i.elementList.length){if(t=i.elementList[e],t.value!==M&&t.value!==b)break;e++}if(t){const{metrics:{boundingBoxAscent:e,boundingBoxDescent:n}}=t,r=e+n;r>d.height&&(u===yt.TOP?s-=e-d.height:u===yt.MIDDLE&&(s-=(r-d.height)/2))}}const g=Math.round(n+o*h),p=Math.round(s-d.height+a),f=d.width-2*o*h,R=d.height;t.save(),t.beginPath(),t.translate(.5,.5),(null==m?void 0:m.value)?(t.lineWidth=a,t.strokeStyle=l,t.rect(g,p,f,R),t.stroke(),t.beginPath(),t.fillStyle=l,t.fillRect(g,p,f,R),t.beginPath(),t.strokeStyle=c,t.lineWidth=2*a*h,t.moveTo(g+2*h,p+R/2),t.lineTo(g+f/2,p+R-3*h),t.lineTo(g+f-2*h,p+3*h),t.stroke()):(t.lineWidth=a,t.rect(g,p,f,R),t.stroke()),t.closePath(),t.restore()}}class ri{constructor(e){d(this,"draw"),d(this,"options"),this.draw=e,this.options=e.getOptions()}setSelect(e){const{radio:t}=e;t?t.value=!t.value:e.radio={value:!0},this.draw.render({isCompute:!1,isSetCursor:!1})}render(e){const{ctx:t,x:n,index:r,row:i}=e;let{y:s}=e;const{radio:{gap:o,lineWidth:a,fillStyle:l,strokeStyle:c,verticalAlign:u},scale:h}=this.options,{metrics:d,radio:m}=i.elementList[r];if(u===yt.TOP||u===yt.MIDDLE){let e=r+1,t=null;while(e<i.elementList.length){if(t=i.elementList[e],t.value!==M&&t.value!==b)break;e++}if(t){const{metrics:{boundingBoxAscent:e,boundingBoxDescent:n}}=t,r=e+n;r>d.height&&(u===yt.TOP?s-=e-d.height:u===yt.MIDDLE&&(s-=(r-d.height)/2))}}const g=Math.round(n+o*h),p=Math.round(s-d.height+a),f=d.width-2*o*h,R=d.height;t.save(),t.beginPath(),t.translate(.5,.5),t.strokeStyle=(null==m?void 0:m.value)?l:c,t.lineWidth=a,t.arc(g+f/2,p+R/2,f/2,0,2*Math.PI),t.stroke(),(null==m?void 0:m.value)&&(t.beginPath(),t.fillStyle=l,t.arc(g+f/2,p+R/2,f/3,0,2*Math.PI),t.fill()),t.closePath(),t.restore()}}const ii="KCgpPT57KGZ1bmN0aW9uKCl7InVzZSBzdHJpY3QiO3ZhciBmOyhmdW5jdGlvbih0KXt0LlRFWFQ9InRleHQiLHQuVEFCTEU9InRhYmxlIix0LkhZUEVSTElOSz0iaHlwZXJsaW5rIix0LkNPTlRST0w9ImNvbnRyb2wifSkoZnx8KGY9e30pKTt2YXIgcDsoZnVuY3Rpb24odCl7dC5WQUxVRT0idmFsdWUifSkocHx8KHA9e30pKTtjb25zdCBoPSJcdTIwMEIiLGc9YApgO2Z1bmN0aW9uIGEodCl7bGV0IGw9IiIsbj0wO2Zvcig7bjx0Lmxlbmd0aDspe2NvbnN0IG89dFtuXTtpZihvLnR5cGU9PT1mLlRBQkxFKXtpZihvLnRyTGlzdClmb3IobGV0IHI9MDtyPG8udHJMaXN0Lmxlbmd0aDtyKyspe2NvbnN0IHM9by50ckxpc3Rbcl07Zm9yKGxldCBlPTA7ZTxzLnRkTGlzdC5sZW5ndGg7ZSsrKXtjb25zdCBpPXMudGRMaXN0W2VdO2wrPWEoaS52YWx1ZSl9fX1lbHNlIGlmKG8udHlwZT09PWYuSFlQRVJMSU5LKXtjb25zdCByPW8uaHlwZXJsaW5rSWQscz1bXTtmb3IoO248dC5sZW5ndGg7KXtjb25zdCBlPXRbbl07aWYociE9PWUuaHlwZXJsaW5rSWQpe24tLTticmVha31kZWxldGUgZS50eXBlLHMucHVzaChlKSxuKyt9bCs9YShzKX1lbHNlIGlmKG8uY29udHJvbElkKXtjb25zdCByPW8uY29udHJvbElkLHM9W107Zm9yKDtuPHQubGVuZ3RoOyl7Y29uc3QgZT10W25dO2lmKHIhPT1lLmNvbnRyb2xJZCl7bi0tO2JyZWFrfWUuY29udHJvbENvbXBvbmVudD09PXAuVkFMVUUmJihkZWxldGUgZS5jb250cm9sSWQscy5wdXNoKGUpKSxuKyt9bCs9YShzKX1lbHNlKCFvLnR5cGV8fG8udHlwZT09PWYuVEVYVCkmJihsKz1vLnZhbHVlKTtuKyt9cmV0dXJuIGx9ZnVuY3Rpb24gZCh0KXtjb25zdCBsPVtdLG49L1swLTldLyxvPS9bQS1aYS16XS8scj0vXHMvO2xldCBzPSExLGU9ITEsaT0iIjtmdW5jdGlvbiB1KCl7aSYmKGwucHVzaChpKSxpPSIiKX1mb3IoY29uc3QgYyBvZiB0KW8udGVzdChjKT8oc3x8dSgpLGkrPWMscz0hMCxlPSExKTpuLnRlc3QoYyk/KGV8fHUoKSxpKz1jLHM9ITEsZT0hMCk6KHUoKSxzPSExLGU9ITEsci50ZXN0KGMpfHxsLnB1c2goYykpO3JldHVybiB1KCksbH1vbm1lc3NhZ2U9dD0+e2NvbnN0IGw9dC5kYXRhLG89YShsKS5yZXBsYWNlKG5ldyBSZWdFeHAoYF4ke2h9YCksIiIpLnJlcGxhY2UobmV3IFJlZ0V4cChoLCJnIiksZykscj1kKG8pO3Bvc3RNZXNzYWdlKHIubGVuZ3RoKX19KSgpO30pKCk7Cg==",si="undefined"!==typeof window&&window.Blob&&new Blob([atob(ii)],{type:"text/javascript;charset=utf-8"});function oi(){const e=si&&(window.URL||window.webkitURL).createObjectURL(si);try{return e?new Worker(e):new Worker("data:application/javascript;base64,"+ii,{type:"module"})}finally{e&&(window.URL||window.webkitURL).revokeObjectURL(e)}}const ai="KCgpPT57KGZ1bmN0aW9uKCl7InVzZSBzdHJpY3QiO3ZhciBhOyhmdW5jdGlvbih0KXt0LlRFWFQ9InRleHQiLHQuSU1BR0U9ImltYWdlIix0LlRBQkxFPSJ0YWJsZSIsdC5IWVBFUkxJTks9Imh5cGVybGluayIsdC5TVVBFUlNDUklQVD0ic3VwZXJzY3JpcHQiLHQuU1VCU0NSSVBUPSJzdWJzY3JpcHQiLHQuU0VQQVJBVE9SPSJzZXBhcmF0b3IiLHQuUEFHRV9CUkVBSz0icGFnZUJyZWFrIix0LkNPTlRST0w9ImNvbnRyb2wiLHQuQ0hFQ0tCT1g9ImNoZWNrYm94Iix0LlJBRElPPSJyYWRpbyIsdC5MQVRFWD0ibGF0ZXgiLHQuVEFCPSJ0YWIiLHQuREFURT0iZGF0ZSIsdC5CTE9DSz0iYmxvY2siLHQuVElUTEU9InRpdGxlIix0LkFSRUE9ImFyZWEiLHQuTElTVD0ibGlzdCJ9KShhfHwoYT17fSkpO3ZhciBsOyhmdW5jdGlvbih0KXt0LkZJUlNUPSJmaXJzdCIsdC5TRUNPTkQ9InNlY29uZCIsdC5USElSRD0idGhpcmQiLHQuRk9VUlRIPSJmb3VydGgiLHQuRklGVEg9ImZpZnRoIix0LlNJWFRIPSJzaXh0aCJ9KShsfHwobD17fSkpO2NvbnN0IGc9e1tsLkZJUlNUXToxLFtsLlNFQ09ORF06MixbbC5USElSRF06MyxbbC5GT1VSVEhdOjQsW2wuRklGVEhdOjUsW2wuU0lYVEhdOjZ9LEw9W2EuVEVYVCxhLkhZUEVSTElOSyxhLlNVQlNDUklQVCxhLlNVUEVSU0NSSVBULGEuQ09OVFJPTCxhLkRBVEVdLGQ9Ilx1MjAwQiI7ZnVuY3Rpb24gZih0KXtyZXR1cm4hdC50eXBlfHxMLmluY2x1ZGVzKHQudHlwZSl9ZnVuY3Rpb24gQyh0KXtjb25zdHtlbGVtZW50TGlzdDpuLHBvc2l0aW9uTGlzdDp2fT10LEk9W107bGV0IGk9MDtmb3IoO2k8bi5sZW5ndGg7KXtjb25zdCBzPW5baV07aWYocy50aXRsZUlkKXtjb25zdCBvPXMudGl0bGVJZCxlPXMubGV2ZWwsYz17dHlwZTphLlRJVExFLHZhbHVlOiIiLGxldmVsOmUsdGl0bGVJZDpvLHBhZ2VObzp2W2ldLnBhZ2VOb30scj1bXTtmb3IoO2k8bi5sZW5ndGg7KXtjb25zdCB1PW5baV07aWYobyE9PXUudGl0bGVJZCl7aS0tO2JyZWFrfXIucHVzaCh1KSxpKyt9Yy52YWx1ZT1yLmZpbHRlcih1PT5mKHUpKS5tYXAodT0+dS52YWx1ZSkuam9pbigiIikucmVwbGFjZShuZXcgUmVnRXhwKGQsImciKSwiIiksSS5wdXNoKGMpfWkrK31pZighSS5sZW5ndGgpcmV0dXJuIG51bGw7Y29uc3QgaD0ocyxvKT0+e2NvbnN0IGU9by5zdWJDYXRhbG9nW28uc3ViQ2F0YWxvZy5sZW5ndGgtMV0sYz1nW2U9PW51bGw/dm9pZCAwOmUubGV2ZWxdLHI9Z1tzLmxldmVsXTtlJiZyPmM/aChzLGUpOm8uc3ViQ2F0YWxvZy5wdXNoKHtpZDpzLnRpdGxlSWQsbmFtZTpzLnZhbHVlLGxldmVsOnMubGV2ZWwscGFnZU5vOnMucGFnZU5vLHN1YkNhdGFsb2c6W119KX0sUj1bXTtmb3IobGV0IHM9MDtzPEkubGVuZ3RoO3MrKyl7Y29uc3Qgbz1JW3NdLGU9UltSLmxlbmd0aC0xXSxjPWdbZT09bnVsbD92b2lkIDA6ZS5sZXZlbF0scj1nW28ubGV2ZWxdO2UmJnI+Yz9oKG8sZSk6Ui5wdXNoKHtpZDpvLnRpdGxlSWQsbmFtZTpvLnZhbHVlLGxldmVsOm8ubGV2ZWwscGFnZU5vOm8ucGFnZU5vLHN1YkNhdGFsb2c6W119KX1yZXR1cm4gUn1vbm1lc3NhZ2U9dD0+e2NvbnN0IG49dC5kYXRhLHY9QyhuKTtwb3N0TWVzc2FnZSh2KX19KSgpO30pKCk7Cg==",li="undefined"!==typeof window&&window.Blob&&new Blob([atob(ai)],{type:"text/javascript;charset=utf-8"});function ci(){const e=li&&(window.URL||window.webkitURL).createObjectURL(li);try{return e?new Worker(e):new Worker("data:application/javascript;base64,"+ai,{type:"module"})}finally{e&&(window.URL||window.webkitURL).revokeObjectURL(e)}}const ui="KCgpPT57KGZ1bmN0aW9uKCl7InVzZSBzdHJpY3QiO3ZhciBuOyhmdW5jdGlvbihvKXtvLlRBQkxFPSJ0YWJsZSJ9KShufHwobj17fSkpO2Z1bmN0aW9uIGMobyl7Y29uc3QgdD1bXTtmb3IoY29uc3QgcyBvZiBvKXtpZihzLnR5cGU9PT1uLlRBQkxFKXtjb25zdCBlPXMudHJMaXN0O2ZvcihsZXQgcj0wO3I8ZS5sZW5ndGg7cisrKXtjb25zdCBpPWVbcl07Zm9yKGxldCB1PTA7dTxpLnRkTGlzdC5sZW5ndGg7dSsrKXtjb25zdCBkPWkudGRMaXN0W3VdO3QucHVzaCguLi5jKGQudmFsdWUpKX19fWlmKCEhcy5ncm91cElkcylmb3IoY29uc3QgZSBvZiBzLmdyb3VwSWRzKXQuaW5jbHVkZXMoZSl8fHQucHVzaChlKX1yZXR1cm4gdH1vbm1lc3NhZ2U9bz0+e2NvbnN0IHQ9by5kYXRhLHM9Yyh0KTtwb3N0TWVzc2FnZShzKX19KSgpO30pKCk7Cg==",hi="undefined"!==typeof window&&window.Blob&&new Blob([atob(ui)],{type:"text/javascript;charset=utf-8"});function di(){const e=hi&&(window.URL||window.webkitURL).createObjectURL(hi);try{return e?new Worker(e):new Worker("data:application/javascript;base64,"+ui,{type:"module"})}finally{e&&(window.URL||window.webkitURL).revokeObjectURL(e)}}class mi{constructor(e){d(this,"draw"),d(this,"wordCountWorker"),d(this,"catalogWorker"),d(this,"groupWorker"),this.draw=e,this.wordCountWorker=new oi,this.catalogWorker=new ci,this.groupWorker=new di}getWordCount(){return new Promise((e,t)=>{this.wordCountWorker.onmessage=t=>{e(t.data)},this.wordCountWorker.onerror=e=>{t(e)};const n=this.draw.getOriginalMainElementList();this.wordCountWorker.postMessage(n)})}getCatalog(){return new Promise((e,t)=>{this.catalogWorker.onmessage=t=>{e(t.data)},this.catalogWorker.onerror=e=>{t(e)};const n=this.draw.getOriginalMainElementList(),r=this.draw.getPosition().getOriginalMainPositionList();this.catalogWorker.postMessage({elementList:n,positionList:r})})}getGroupIds(){return new Promise((e,t)=>{this.groupWorker.onmessage=t=>{e(t.data)},this.groupWorker.onerror=e=>{t(e)};const n=this.draw.getOriginalMainElementList();this.groupWorker.postMessage(n)})}}class gi{constructor(e){d(this,"container"),d(this,"canvas"),d(this,"draw"),d(this,"options"),d(this,"curElement"),d(this,"curElementSrc"),d(this,"previewerDrawOption"),d(this,"curPosition"),d(this,"resizerSelection"),d(this,"resizerHandleList"),d(this,"resizerImageContainer"),d(this,"resizerImage"),d(this,"resizerSize"),d(this,"width"),d(this,"height"),d(this,"mousedownX"),d(this,"mousedownY"),d(this,"curHandleIndex"),d(this,"previewerContainer"),d(this,"previewerImage"),d(this,"_keydown",()=>{"block"===this.resizerSelection.style.display&&(this.clearResizer(),document.removeEventListener("keydown",this._keydown))}),this.container=e.getContainer(),this.canvas=e.getPage(),this.draw=e,this.options=e.getOptions(),this.curElement=null,this.curElementSrc="",this.previewerDrawOption={},this.curPosition=null;const{resizerSelection:t,resizerHandleList:n,resizerImageContainer:r,resizerImage:i,resizerSize:s}=this._createResizerDom();this.resizerSelection=t,this.resizerHandleList=n,this.resizerImageContainer=r,this.resizerImage=i,this.resizerSize=s,this.width=0,this.height=0,this.mousedownX=0,this.mousedownY=0,this.curHandleIndex=0,this.previewerContainer=null,this.previewerImage=null}_getElementPosition(e,t=null){var n;let r=0,i=0;const s=this.draw.getHeight(),o=this.draw.getPageGap(),a=null!=(n=null==t?void 0:t.pageNo)?n:this.draw.getPageNo(),l=a*(s+o);if(e.imgFloatPosition)r=e.imgFloatPosition.x,i=e.imgFloatPosition.y+l;else if(t){const{coordinate:{leftTop:[e,n]},ascent:s}=t;r=e,i=n+l+s}return{x:r,y:i}}_createResizerDom(){const{scale:e}=this.options,t=document.createElement("div");t.classList.add(ce+"-resizer-selection"),t.style.display="none",t.style.borderColor=this.options.resizerColor,t.style.borderWidth=e+"px";const n=[];for(let a=0;a<8;a++){const e=document.createElement("div");e.style.background=this.options.resizerColor,e.classList.add("resizer-handle"),e.classList.add("handle-"+a),e.setAttribute("data-index",String(a)),e.onmousedown=this._mousedown.bind(this),t.append(e),n.push(e)}this.container.append(t);const r=document.createElement("div");r.classList.add(ce+"-resizer-size-view");const i=document.createElement("span");r.append(i),t.append(r);const s=document.createElement("div");s.classList.add(ce+"-resizer-image"),s.style.display="none";const o=document.createElement("img");return s.append(o),this.container.append(s),{resizerSelection:t,resizerHandleList:n,resizerImageContainer:s,resizerImage:o,resizerSize:i}}_mousedown(e){if(this.canvas=this.draw.getPage(),!this.curElement)return;const{scale:t}=this.options;this.mousedownX=e.x,this.mousedownY=e.y;const n=e.target;this.curHandleIndex=Number(n.dataset.index);const r=window.getComputedStyle(n).cursor;document.body.style.cursor=r,this.canvas.style.cursor=r,this.resizerImage.src=this.curElementSrc,this.resizerImageContainer.style.display="block";const{x:i,y:s}=this._getElementPosition(this.curElement,this.curPosition);this.resizerImageContainer.style.left=i+"px",this.resizerImageContainer.style.top=s+"px",this.resizerImage.style.width=this.curElement.width*t+"px",this.resizerImage.style.height=this.curElement.height*t+"px";const o=this._mousemove.bind(this);document.addEventListener("mousemove",o),document.addEventListener("mouseup",()=>{var e;this.curElement&&!this.previewerDrawOption.dragDisable&&(this.curElement.width=this.width,this.curElement.height=this.height,this.draw.render({isSetCursor:!0,curIndex:null==(e=this.curPosition)?void 0:e.index})),this.resizerImageContainer.style.display="none",document.removeEventListener("mousemove",o),document.body.style.cursor="",this.canvas.style.cursor="text"},{once:!0}),e.preventDefault()}_mousemove(e){if(!this.curElement||this.previewerDrawOption.dragDisable)return;const{scale:t}=this.options;let n=0,r=0;switch(this.curHandleIndex){case 0:{const t=this.mousedownX-e.x,i=this.mousedownY-e.y;n=Math.cbrt(t**3+i**3),r=this.curElement.height*n/this.curElement.width}break;case 1:r=this.mousedownY-e.y;break;case 2:{const t=e.x-this.mousedownX,i=this.mousedownY-e.y;n=Math.cbrt(t**3+i**3),r=this.curElement.height*n/this.curElement.width}break;case 4:{const t=e.x-this.mousedownX,i=e.y-this.mousedownY;n=Math.cbrt(t**3+i**3),r=this.curElement.height*n/this.curElement.width}break;case 3:n=e.x-this.mousedownX;break;case 5:r=e.y-this.mousedownY;break;case 6:{const t=this.mousedownX-e.x,i=e.y-this.mousedownY;n=Math.cbrt(t**3+i**3),r=this.curElement.height*n/this.curElement.width}break;case 7:n=this.mousedownX-e.x;break}const i=this.curElement.width+n/t,s=this.curElement.height+r/t;if(i<=0||s<=0)return;this.width=i,this.height=s;const o=i*t,a=s*t;this.resizerImage.style.width=o+"px",this.resizerImage.style.height=a+"px",this._updateResizerRect(o,a),this._updateResizerSizeView(o,a),e.preventDefault()}_drawPreviewer(){const e=document.createElement("div");e.classList.add(ce+"-image-previewer");const t=document.createElement("i");t.classList.add("image-close"),t.onclick=()=>{this._clearPreviewer()},e.append(t);const n=document.createElement("div");n.classList.add(ce+"-image-container");const r=document.createElement("img");r.src=this.curElementSrc,r.draggable=!1,n.append(r),this.previewerImage=r,e.append(n);let i=0,s=0,o=1,a=0;const l=document.createElement("div");l.classList.add(ce+"-image-menu");const c=document.createElement("i");c.classList.add("zoom-in"),c.onclick=()=>{o+=.1,this._setPreviewerTransform(o,a,i,s)},l.append(c);const u=document.createElement("i");u.onclick=()=>{o-.1<=.1||(o-=.1,this._setPreviewerTransform(o,a,i,s))},u.classList.add("zoom-out"),l.append(u);const h=document.createElement("i");h.classList.add("rotate"),h.onclick=()=>{a+=1,this._setPreviewerTransform(o,a,i,s)},l.append(h);const d=document.createElement("i");d.classList.add("original-size"),d.onclick=()=>{i=0,s=0,o=1,a=0,this._setPreviewerTransform(o,a,i,s)},l.append(d);const m=document.createElement("i");m.classList.add("image-download"),m.onclick=()=>{var e;const{mime:t}=this.previewerDrawOption;W(r.src,`${null==(e=this.curElement)?void 0:e.id}.${t||"png"}`)},l.append(m),e.append(l),this.previewerContainer=e,document.body.append(e);let g=0,p=0,f=!1;r.onmousedown=t=>{f=!0,g=t.x,p=t.y,e.style.cursor="move"},e.onmousemove=e=>{f&&(i+=e.x-g,s+=e.y-p,g=e.x,p=e.y,this._setPreviewerTransform(o,a,i,s))},e.onmouseup=()=>{f=!1,e.style.cursor="auto"},e.onwheel=e=>{if(e.preventDefault(),e.stopPropagation(),e.deltaY<0)o+=.1;else{if(o-.1<=.1)return;o-=.1}this._setPreviewerTransform(o,a,i,s)}}_setPreviewerTransform(e,t,n,r){this.previewerImage&&(this.previewerImage.style.left=n+"px",this.previewerImage.style.top=r+"px",this.previewerImage.style.transform=`scale(${e}) rotate(${90*t}deg)`)}_clearPreviewer(){var e;null==(e=this.previewerContainer)||e.remove(),this.previewerContainer=null,document.body.style.overflow="auto"}_updateResizerRect(e,t){const{resizerSize:n,scale:r}=this.options,i=this.draw.isReadonly();this.resizerSelection.style.width=e+"px",this.resizerSelection.style.height=t+"px";for(let s=0;s<8;s++){const o=0===s||6===s||7===s?-n:1===s||5===s?e/2:e-n,a=0===s||1===s||2===s?-n:3===s||7===s?t/2-n:t-n;this.resizerHandleList[s].style.transform=`scale(${r})`,this.resizerHandleList[s].style.left=o+"px",this.resizerHandleList[s].style.top=a+"px",this.resizerHandleList[s].style.display=i?"none":"block"}}_updateResizerSizeView(e,t){this.resizerSize.innerText=`${Math.round(e)} × ${Math.round(t)}`}render(){this._drawPreviewer(),document.body.style.overflow="hidden"}drawResizer(e,t=null,n={}){this.previewerDrawOption=n,this.curElementSrc=e[n.srcKey||"value"]||"",this.updateResizer(e,t),document.addEventListener("keydown",this._keydown)}updateResizer(e,t=null){const{scale:n}=this.options,r=e.width*n,i=e.height*n;this._updateResizerSizeView(r,i);const{x:s,y:o}=this._getElementPosition(e,t);this.resizerSelection.style.left=s+"px",this.resizerSelection.style.top=o+"px",this.resizerSelection.style.borderWidth=n+"px",this._updateResizerRect(r,i),this.resizerSelection.style.display="block",this.curElement=e,this.curPosition=t,this.width=r,this.height=i}clearResizer(){this.resizerSelection.style.display="none",document.removeEventListener("keydown",this._keydown)}}class pi{constructor(e){d(this,"draw"),d(this,"range"),d(this,"datePicker"),d(this,"options"),this.draw=e,this.options=e.getOptions(),this.range=e.getRange(),this.datePicker=new $r(e,{onSubmit:this._setValue.bind(this)})}_setValue(e){if(!e)return;const t=this.getDateElementRange();if(!t)return;const[n,r]=t,i=this.draw.getElementList(),s=i[n+1];this.draw.spliceElementList(i,n+1,r-n),this.range.setRange(n,n);const o={type:de.DATE,value:"",dateFormat:s.dateFormat,valueList:[{value:e}]};rn(i,[o],n,{editorOptions:this.options}),this.draw.insertElementList([o])}getDateElementRange(){let e=-1,t=-1;const{startIndex:n,endIndex:r}=this.range.getRange();if(!~n&&!~r)return null;const i=this.draw.getElementList(),s=i[n];if(s.type!==de.DATE)return null;let o=n;while(o>=0){const t=i[o];if(t.dateId!==s.dateId){e=o;break}o--}let a=n+1;while(a<i.length){const e=i[a];if(e.dateId!==s.dateId){t=a-1;break}a++}return a===i.length&&(t=a-1),~e&&~t?[e,t]:null}clearDatePicker(){this.datePicker.dispose()}renderDatePicker(e,t){const n=this.draw.getElementList(),r=this.getDateElementRange(),i=r?n.slice(r[0]+1,r[1]+1).map(e=>e.value).join(""):"";this.datePicker.render({value:i,position:t,dateFormat:e.dateFormat})}}var fi;(function(e){e["IFRAME"]="iframe",e["VIDEO"]="video"})(fi||(fi={}));const Ri=class{constructor(e){d(this,"element"),this.element=e}_defineIframeProperties(e){Object.defineProperties(e,{parent:{get:()=>null},__POWERED_BY_CANVAS_EDITOR__:{get:()=>!0}})}render(e){var t,n;const r=this.element.block,i=document.createElement("iframe");i.setAttribute("data-id",this.element.id),i.sandbox.add(...Ri.sandbox),i.style.border="none",i.style.width="100%",i.style.height="100%",(null==(t=r.iframeBlock)?void 0:t.src)?i.src=r.iframeBlock.src:(null==(n=r.iframeBlock)?void 0:n.srcdoc)&&(i.srcdoc=r.iframeBlock.srcdoc),e.append(i),this._defineIframeProperties(i.contentWindow)}};let yi=Ri;d(yi,"sandbox",["allow-scripts","allow-same-origin"]);class Mi{constructor(e){d(this,"element"),this.element=e}render(e){var t;const n=this.element.block,r=document.createElement("video");r.style.width="100%",r.style.height="100%",r.style.objectFit="contain",r.src=(null==(t=n.videoBlock)?void 0:t.src)||"",r.controls=!0,r.crossOrigin="anonymous",e.append(r)}}class Si{constructor(e,t){d(this,"draw"),d(this,"element"),d(this,"block"),d(this,"blockContainer"),d(this,"blockItem"),this.draw=e.getDraw(),this.blockContainer=e.getBlockContainer(),this.element=t,this.block=null,this.blockItem=this._createBlockItem(),this.blockContainer.append(this.blockItem)}getBlockElement(){return this.element}_createBlockItem(){const e=document.createElement("div");return e.classList.add(ce+"-block-item"),e}render(){const e=this.element.block;e.type===fi.IFRAME?(this.block=new yi(this.element),this.block.render(this.blockItem)):e.type===fi.VIDEO&&(this.block=new Mi(this.element),this.block.render(this.blockItem))}setClientRects(e,t,n){const r=this.draw.getHeight(),i=this.draw.getPageGap(),s=e*(r+i),{metrics:o}=this.element;this.blockItem.style.width=o.width+"px",this.blockItem.style.height=o.height+"px",this.blockItem.style.left=t+"px",this.blockItem.style.top=s+n+"px"}remove(){this.blockItem.remove()}}class bi{constructor(e){d(this,"draw"),d(this,"container"),d(this,"blockContainer"),d(this,"blockMap"),this.draw=e,this.container=e.getContainer(),this.blockMap=new Map,this.blockContainer=this._createBlockContainer(),this.container.append(this.blockContainer)}_createBlockContainer(){const e=document.createElement("div");return e.classList.add(ce+"-block-container"),e}getDraw(){return this.draw}getBlockContainer(){return this.blockContainer}render(e,t,n,r){const i=t.id,s=this.blockMap.get(i);if(s)s.setClientRects(e,n,r);else{const s=new Si(this,t);s.render(),s.setClientRects(e,n,r),this.blockMap.set(i,s)}}clear(){if(!this.blockMap.size)return;const e=this.draw.getElementList(),t=[];for(let n=0;n<e.length;n++){const r=e[n];r.type===de.BLOCK&&t.push(r.id)}this.blockMap.forEach(e=>{const n=e.getBlockElement().id;t.includes(n)||(e.remove(),this.blockMap.delete(n))})}}const wi={global:{cut:"剪切",copy:"复制",paste:"粘贴",selectAll:"全选",print:"打印"},control:{delete:"删除控件"},hyperlink:{delete:"删除链接",cancel:"取消链接",edit:"编辑链接"},image:{change:"更改图片",saveAs:"另存为图片",textWrap:"文字环绕",textWrapType:{embed:"嵌入型",upDown:"上下型环绕",surround:"四周型环绕",floatTop:"浮于文字上方",floatBottom:"衬于文字下方"}},table:{insertRowCol:"插入行列",insertTopRow:"上方插入1行",insertBottomRow:"下方插入1行",insertLeftCol:"左侧插入1列",insertRightCol:"右侧插入1列",deleteRowCol:"删除行列",deleteRow:"删除1行",deleteCol:"删除1列",deleteTable:"删除整个表格",mergeCell:"合并单元格",mergeCancelCell:"取消合并",verticalAlign:"垂直对齐",verticalAlignTop:"顶端对齐",verticalAlignMiddle:"垂直居中",verticalAlignBottom:"底端对齐",border:"表格边框",borderAll:"所有框线",borderEmpty:"无框线",borderDash:"虚框线",borderExternal:"外侧框线",borderInternal:"内侧框线",borderTd:"单元格边框",borderTdTop:"上边框",borderTdRight:"右边框",borderTdBottom:"下边框",borderTdLeft:"左边框",borderTdForward:"正斜线",borderTdBack:"反斜线"}},Ti={now:"此刻",confirm:"确定",return:"返回日期",timeSelect:"时间选择",weeks:{sun:"日",mon:"一",tue:"二",wed:"三",thu:"四",fri:"五",sat:"六"},year:"年",month:"月",hour:"时",minute:"分",second:"秒"},Oi={header:"页眉",footer:"页脚"},vi={displayName:"分页符"},Ei={headerTip:"双击编辑页眉",footerTip:"双击编辑页脚"};var Ci={contextmenu:wi,datePicker:Ti,frame:Oi,pageBreak:vi,zone:Ei};const Li={global:{cut:"Cut",copy:"Copy",paste:"Paste",selectAll:"Select all",print:"Print"},control:{delete:"Delete control"},hyperlink:{delete:"Delete hyperlink",cancel:"Cancel hyperlink",edit:"Edit hyperlink"},image:{change:"Change image",saveAs:"Save as image",textWrap:"Text wrap",textWrapType:{embed:"Embed",upDown:"Up down",surround:"Surround",floatTop:"Float above text",floatBottom:"Float below text"}},table:{insertRowCol:"Insert row col",insertTopRow:"Insert top 1 row",insertBottomRow:"Insert bottom 1 row",insertLeftCol:"Insert left 1 col",insertRightCol:"Insert right 1 col",deleteRowCol:"Delete row col",deleteRow:"Delete 1 row",deleteCol:"Delete 1 col",deleteTable:"Delete table",mergeCell:"Merge cell",mergeCancelCell:"Cancel merge cell",verticalAlign:"Vertical align",verticalAlignTop:"Top",verticalAlignMiddle:"Middle",verticalAlignBottom:"Bottom",border:"Table border",borderAll:"All",borderEmpty:"Empty",borderDash:"Dash",borderExternal:"External",borderInternal:"Internal",borderTd:"Table cell border",borderTdTop:"Top",borderTdRight:"Right",borderTdBottom:"Bottom",borderTdLeft:"Left",borderTdForward:"Forward",borderTdBack:"Back"}},Ni={now:"Now",confirm:"Confirm",return:"Return",timeSelect:"Time select",weeks:{sun:"Sun",mon:"Mon",tue:"Tue",wed:"Wed",thu:"Thu",fri:"Fri",sat:"Sat"},year:" ",month:" ",hour:"Hour",minute:"Minute",second:"Second"},_i={header:"Header",footer:"Footer"},Ii={displayName:"Page Break"},Pi={headerTip:"Double click to edit header",footerTip:"Double click to edit footer"};var xi={contextmenu:Li,datePicker:Ni,frame:_i,pageBreak:Ii,zone:Pi};class Di{constructor(){d(this,"langMap",new Map([["zhCN",Ci],["en",xi]])),d(this,"currentLocale","zhCN")}registerLangMap(e,t){const n=this.langMap.get(e);this.langMap.set(e,K(n||Ci,t))}getLocale(){return this.currentLocale}setLocale(e){this.currentLocale=e}getLang(){return this.langMap.get(this.currentLocale)||Ci}t(e){const t=e.split(".");let n="",r=this.getLang();for(let i=0;i<t.length;i++){const e=t[i],s=Reflect.get(r,e);if(!s)return"";n=r=s}return n}}class Ai{constructor(){d(this,"promiseList"),this.promiseList=[]}add(e){this.promiseList.push(e)}clearAll(){this.promiseList=[]}allSettled(){return Promise.allSettled(this.promiseList)}}class Fi{constructor(e,t){d(this,"draw"),d(this,"zone"),d(this,"i18n"),d(this,"container"),d(this,"pageContainer"),d(this,"isDisableMouseMove"),d(this,"tipContainer"),d(this,"tipContent"),d(this,"currentMoveZone"),this.draw=e,this.zone=t,this.i18n=e.getI18n(),this.container=e.getContainer(),this.pageContainer=e.getPageContainer();const{tipContainer:n,tipContent:r}=this._drawZoneTip();this.tipContainer=n,this.tipContent=r,this.isDisableMouseMove=!0,this.currentMoveZone=Vt.MAIN;const i=[],{header:s,footer:o}=e.getOptions();s.disabled||i.push(Vt.HEADER),o.disabled||i.push(Vt.FOOTER),i.length&&this._watchMouseMoveZoneChange(i)}_watchMouseMoveZoneChange(e){this.pageContainer.addEventListener("mousemove",A(t=>{if(!this.isDisableMouseMove&&this.draw.getIsPagingMode()&&t.offsetY)if(t.target instanceof HTMLCanvasElement){const n=this.zone.getZoneByY(t.offsetY);if(!e.includes(n))return void this._updateZoneTip(!1);this.currentMoveZone=n,this._updateZoneTip(this.zone.getZone()===Vt.MAIN&&(n===Vt.HEADER||n===Vt.FOOTER),t.x,t.y)}else this._updateZoneTip(!1)},250)),this.pageContainer.addEventListener("mouseenter",()=>{this.isDisableMouseMove=!1}),this.pageContainer.addEventListener("mouseleave",()=>{this.isDisableMouseMove=!0,this._updateZoneTip(!1)})}_drawZoneTip(){const e=document.createElement("div");e.classList.add(ce+"-zone-tip");const t=document.createElement("span");return e.append(t),this.container.append(e),{tipContainer:e,tipContent:t}}_updateZoneTip(e,t,n){e?(this.tipContainer.classList.add("show"),this.tipContainer.style.left=t+"px",this.tipContainer.style.top=n+"px",this.tipContent.innerText=this.i18n.t("zone."+(this.currentMoveZone===Vt.HEADER?"headerTip":"footerTip"))):this.tipContainer.classList.remove("show")}}class Yi{constructor(e){d(this,"INDICATOR_PADDING",2),d(this,"INDICATOR_TITLE_TRANSLATE",[20,5]),d(this,"draw"),d(this,"options"),d(this,"i18n"),d(this,"container"),d(this,"currentZone"),d(this,"indicatorContainer"),this.draw=e,this.i18n=e.getI18n(),this.options=e.getOptions(),this.container=e.getContainer(),this.currentZone=Vt.MAIN,this.indicatorContainer=null,this.options.zone.tipDisabled||new Fi(e,this)}isHeaderActive(){return this.getZone()===Vt.HEADER}isMainActive(){return this.getZone()===Vt.MAIN}isFooterActive(){return this.getZone()===Vt.FOOTER}getZone(){return this.currentZone}setZone(e){const{header:t,footer:n}=this.options;!t.editable&&e===Vt.HEADER||!n.editable&&e===Vt.FOOTER||this.currentZone!==e&&(this.currentZone=e,this.draw.getRange().clearRange(),this.draw.render({isSubmitHistory:!1,isSetCursor:!1,isCompute:!1}),this.drawZoneIndicator(),G(()=>{const t=this.draw.getListener();t.zoneChange&&t.zoneChange(e);const n=this.draw.getEventBus();n.isSubscribe("zoneChange")&&n.emit("zoneChange",e)}))}getZoneByY(e){const t=this.draw.getHeader(),n=t.getHeaderTop()+t.getHeight(),r=this.draw.getFooter(),i=this.draw.getHeight(),s=i-(r.getFooterBottom()+r.getHeight());return e<n?Vt.HEADER:e>s?Vt.FOOTER:Vt.MAIN}drawZoneIndicator(){if(this._clearZoneIndicator(),!this.isHeaderActive()&&!this.isFooterActive())return;const{scale:e}=this.options,t=this.isHeaderActive(),[n,r]=this.INDICATOR_TITLE_TRANSLATE,i=this.draw.getPageList(),s=this.draw.getMargins(),o=this.draw.getInnerWidth(),a=this.draw.getHeight(),l=this.draw.getPageGap(),c=a+l;this.indicatorContainer=document.createElement("div"),this.indicatorContainer.classList.add(ce+"-zone-indicator");const u=this.draw.getHeader(),h=this.draw.getFooter(),d=t?u.getHeight():h.getHeight(),m=t?u.getHeaderTop():a-h.getFooterBottom()-d;for(let g=0;g<i.length;g++){const i=c*g+m,a=s[3]-this.INDICATOR_PADDING,l=s[3]+o+this.INDICATOR_PADDING,u=t?i-this.INDICATOR_PADDING:i+d+this.INDICATOR_PADDING,h=t?i+d+this.INDICATOR_PADDING:i-this.INDICATOR_PADDING,p=document.createElement("div");p.innerText=this.i18n.t("frame."+(t?"header":"footer")),p.style.top=h+"px",p.style.transform=`translate(${n*e}px, ${r*e}px) scale(${e})`,this.indicatorContainer.append(p);const f=document.createElement("span");f.classList.add(ce+"-zone-indicator-border__top"),f.style.top=u+"px",f.style.width=o+"px",f.style.marginLeft=s[3]+"px",this.indicatorContainer.append(f);const R=document.createElement("span");R.classList.add(ce+"-zone-indicator-border__left"),R.style.top=i+"px",R.style.height=d+"px",R.style.left=a+"px",this.indicatorContainer.append(R);const y=document.createElement("span");y.classList.add(ce+"-zone-indicator-border__bottom"),y.style.top=h+"px",this.indicatorContainer.append(y);const M=document.createElement("span");M.classList.add(ce+"-zone-indicator-border__right"),M.style.top=i+"px",M.style.height=d+"px",M.style.left=l+"px",this.indicatorContainer.append(M)}this.container.append(this.indicatorContainer)}_clearZoneIndicator(){var e;null==(e=this.indicatorContainer)||e.remove(),this.indicatorContainer=null}}class Hi{constructor(e,t){d(this,"draw"),d(this,"position"),d(this,"options"),d(this,"elementList"),d(this,"rowList"),d(this,"positionList"),this.draw=e,this.position=e.getPosition(),this.options=e.getOptions(),this.elementList=t||[],this.rowList=[],this.positionList=[]}getRowList(){return this.rowList}setElementList(e){this.elementList=e}getElementList(){return this.elementList}getPositionList(){return this.positionList}compute(){this.recovery(),this._computeRowList(),this._computePositionList()}recovery(){this.rowList=[],this.positionList=[]}_computeRowList(){const e=this.draw.getInnerWidth();this.rowList=this.draw.computeRowList({innerWidth:e,elementList:this.elementList})}_computePositionList(){const e=this.getFooterBottom(),t=this.draw.getInnerWidth(),n=this.draw.getMargins(),r=n[3],i=this.draw.getHeight(),s=this.getHeight(),o=i-e-s;this.position.computePageRowPosition({positionList:this.positionList,rowList:this.rowList,pageNo:0,startRowIndex:0,startIndex:0,startX:r,startY:o,innerWidth:t,zone:Vt.FOOTER})}getFooterBottom(){const{footer:{bottom:e,disabled:t},scale:n}=this.options;return t?0:Math.floor(e*n)}getMaxHeight(){const{footer:{maxHeightRadio:e}}=this.options,t=this.draw.getHeight();return Math.floor(t*O[e])}getHeight(){const e=this.getMaxHeight(),t=this.getRowHeight();return t>e?e:t}getRowHeight(){return this.rowList.reduce((e,t)=>e+t.height,0)}getExtraHeight(){const e=this.draw.getMargins(),t=this.getHeight(),n=this.getFooterBottom(),r=n+t-e[2];return r<=0?0:r}render(e,t){e.globalAlpha=1;const n=this.draw.getInnerWidth(),r=this.getMaxHeight(),i=[];let s=0;for(let o=0;o<this.rowList.length;o++){const e=this.rowList[o];if(s+e.height>r)break;i.push(e),s+=e.height}this.draw.drawRow(e,{elementList:this.elementList,positionList:this.positionList,rowList:i,pageNo:t,startIndex:0,innerWidth:n,zone:Vt.FOOTER})}}class ki{constructor(e){d(this,"draw"),d(this,"range"),d(this,"options"),d(this,"UN_COUNT_STYLE_WIDTH",20),d(this,"MEASURE_BASE_TEXT","0"),d(this,"LIST_GAP",10),this.draw=e,this.range=e.getRange(),this.options=e.getOptions()}setList(e,t){const n=this.draw.isReadonly();if(n)return;const{startIndex:r,endIndex:i}=this.range.getRange();if(!~r&&!~i)return;const s=this.range.getRangeParagraphElementList();if(!s||!s.length)return;const o=s.find(n=>n.listType===e&&n.listStyle===t);if(o||!e)return void this.unsetList();const a=V();s.forEach(n=>{n.listId=a,n.listType=e,n.listStyle=t});const l=r===i,c=l?i:r;this.draw.render({curIndex:c,isSetCursor:l})}unsetList(){var e;const t=this.draw.isReadonly();if(t)return;const{startIndex:n,endIndex:r}=this.range.getRange();if(!~n&&!~r)return;const i=null==(e=this.range.getRangeParagraphElementList())?void 0:e.filter(e=>e.listId);if(!i||!i.length)return;const s=this.draw.getElementList(),o=s[r];if(o.listId){let e=r+1;while(e<s.length){const t=s[e];if(t.value===M&&!t.listWrap)break;if(t.listId!==o.listId){this.draw.spliceElementList(s,e,0,{value:M});break}e++}}i.forEach(e=>{delete e.listId,delete e.listType,delete e.listStyle,delete e.listWrap});const a=n===r,l=a?r:n;this.draw.render({curIndex:l,isSetCursor:a})}computeListStyle(e,t){const n=new Map;let r=0,i=t[r].listId,s=[];const o=t.length;while(r<o){const o=t[r];if(i&&i===o.listId)s.push(o);else if(o.listId&&o.listId!==i){if(s.length){const t=this.getListStyleWidth(e,s);n.set(i,t)}i=o.listId,s=i?[o]:[]}r++}if(s.length){const t=this.getListStyleWidth(e,s);n.set(i,t)}return n}getListStyleWidth(e,t){const{scale:n,checkbox:r}=this.options,i=t[0];if(i.listStyle&&i.listStyle!==nt.DECIMAL)return i.listStyle===nt.CHECKBOX?(r.width+this.LIST_GAP)*n:this.UN_COUNT_STYLE_WIDTH*n;const s=t.reduce((e,t)=>(t.value===M&&(e+=1),e),0);if(!s)return 0;const o=`${this.MEASURE_BASE_TEXT.repeat(String(s).length)}${Dn.PERIOD}`,a=e.measureText(o);return Math.ceil((a.width+this.LIST_GAP)*n)}drawListStyle(e,t,n){var r;const{elementList:i,offsetX:s,listIndex:o,ascent:a}=t,l=i[0];if(l.value!==M||l.listWrap)return;let c=0;const{defaultTabWidth:d,scale:m,defaultFont:g,defaultSize:p}=this.options;for(let u=1;u<i.length;u++){const e=i[u];if((null==e?void 0:e.type)!==de.TAB)break;c+=d*m}const{coordinate:{leftTop:[f,R]}}=n,y=f-s+c,S=R+a;if(l.listStyle===nt.CHECKBOX){const{width:n,height:i,gap:s}=this.options.checkbox,o=h(u({},l),{checkbox:{value:!!(null==(r=l.checkbox)?void 0:r.value)},metrics:h(u({},l.metrics),{width:(n+2*s)*m,height:i*m})});this.draw.getCheckboxParticle().render({ctx:e,x:y-s*m,y:S,index:0,row:h(u({},t),{elementList:[o,...t.elementList]})})}else{let t="";if(t=l.listType===qe.UL?rt[l.listStyle]||rt[et.DISC]:`${o+1}${Dn.PERIOD}`,!t)return;e.save(),e.font=`${p*m}px ${g}`,e.fillText(t,y,S),e.restore()}}}const Vi=class{constructor(e){d(this,"options"),this.options=e.getOptions()}render(e,t,n,r){const{scale:i,lineBreak:{color:s,lineWidth:o}}=this.options;e.save(),e.beginPath();const a=r-Vi.HEIGHT*i/2,l=n+t.metrics.width;e.translate(l,a),e.scale(i,i),e.strokeStyle=s,e.lineWidth=o,e.lineCap="round",e.lineJoin="round",e.beginPath(),e.moveTo(8,0),e.lineTo(12,0),e.lineTo(12,6),e.lineTo(3,6),e.moveTo(3,6),e.lineTo(6,3),e.moveTo(3,6),e.lineTo(6,9),e.stroke(),e.closePath(),e.restore()}};let Ui=Vi;d(Ui,"WIDTH",12),d(Ui,"HEIGHT",9),d(Ui,"GAP",3);class Wi{constructor(e){d(this,"draw"),d(this,"position"),d(this,"options"),d(this,"elementList"),d(this,"rowList"),d(this,"positionList"),this.draw=e,this.position=e.getPosition(),this.options=e.getOptions(),this.elementList=[],this.rowList=[],this.positionList=[]}_recovery(){this.elementList=[],this.rowList=[],this.positionList=[]}_compute(){this._computeRowList(),this._computePositionList()}_computeRowList(){const e=this.draw.getInnerWidth();this.rowList=this.draw.computeRowList({innerWidth:e,elementList:this.elementList})}_computePositionList(){const{lineBreak:e,scale:t}=this.options,n=this.draw.getHeader().getExtraHeight(),r=this.draw.getInnerWidth(),i=this.draw.getMargins();let s=i[3];e.disabled||(s+=(Ui.WIDTH+Ui.GAP)*t);const o=i[0]+n;this.position.computePageRowPosition({positionList:this.positionList,rowList:this.rowList,pageNo:0,startRowIndex:0,startIndex:0,startX:s,startY:o,innerWidth:r})}render(e){const{placeholder:{data:t,font:n,size:r,color:i,opacity:s}}=this.options;if(!t)return;this._recovery(),this.elementList=[{value:t,font:n,size:r,color:i}],Gt(this.elementList,{editorOptions:this.options,isForceCompensation:!0}),this._compute();const o=this.draw.getInnerWidth();e.save(),e.globalAlpha=s,this.draw.drawRow(e,{elementList:this.elementList,positionList:this.positionList,rowList:this.rowList,pageNo:0,startIndex:0,innerWidth:o,isDrawLineBreak:!1}),e.restore()}}class Xi{constructor(e){d(this,"draw"),d(this,"options"),d(this,"range"),d(this,"fillRectMap"),this.draw=e,this.options=e.getOptions(),this.range=e.getRange(),this.fillRectMap=new Map}setGroup(){if(this.draw.isReadonly()||this.draw.getZone().getZone()!==Vt.MAIN)return null;const e=this.range.getSelection();if(!e)return null;const t=V();return e.forEach(e=>{Array.isArray(e.groupIds)||(e.groupIds=[]),e.groupIds.push(t)}),this.draw.render({isSetCursor:!1,isCompute:!1}),t}getElementListByGroupId(e,t){var n,r;const i=[];for(let s=0;s<e.length;s++){const o=e[s];if(o.type===de.TABLE){const e=o.trList;for(let n=0;n<e.length;n++){const r=e[n];for(let e=0;e<r.tdList.length;e++){const n=r.tdList[e],s=this.getElementListByGroupId(n.value,t);if(s.length)return i.push(...s),i}}}if(null==(n=null==o?void 0:o.groupIds)?void 0:n.includes(t)){i.push(o);const n=e[s+1];if(!(null==(r=null==n?void 0:n.groupIds)?void 0:r.includes(t)))break}}return i}deleteGroup(e){if(this.draw.isReadonly())return;const t=this.draw.getOriginalMainElementList(),n=this.getElementListByGroupId(t,e);if(n.length){for(let t=0;t<n.length;t++){const r=n[t],i=r.groupIds,s=i.findIndex(t=>t===e);i.splice(s,1),i.length||delete r.groupIds}this.draw.render({isSetCursor:!1,isCompute:!1})}}getContextByGroupId(e,t){var n,r;for(let i=0;i<e.length;i++){const s=e[i];if(s.type===de.TABLE){const e=s.trList;for(let n=0;n<e.length;n++){const r=e[n];for(let e=0;e<r.tdList.length;e++){const o=r.tdList[e],a=this.getContextByGroupId(o.value,t);if(a)return h(u({},a),{isTable:!0,index:i,trIndex:n,tdIndex:e,tdId:o.id,trId:r.id,tableId:s.tableId})}}}const o=e[i+1];if((null==(n=s.groupIds)?void 0:n.includes(t))&&!(null==(r=null==o?void 0:o.groupIds)?void 0:r.includes(t)))return{isTable:!1,startIndex:i,endIndex:i}}return null}clearFillInfo(){this.fillRectMap.clear()}recordFillInfo(e,t,n,r,i){const s=e.groupIds;if(s)for(const o of s){const e=this.fillRectMap.get(o);e?e.width+=r:this.fillRectMap.set(o,{x:t,y:n,width:r,height:i})}}render(e){var t;if(!this.fillRectMap.size)return;const n=this.range.getRange(),r=this.draw.getElementList(),i=null==(t=r[n.endIndex])?void 0:t.groupIds,{group:{backgroundColor:s,opacity:o,activeOpacity:a,activeBackgroundColor:l}}=this.options;e.save(),this.fillRectMap.forEach((t,n)=>{const{x:r,y:c,width:u,height:h}=t;(null==i?void 0:i.includes(n))?(e.globalAlpha=a,e.fillStyle=l):(e.globalAlpha=o,e.fillStyle=s),e.fillRect(r,c,u,h)}),e.restore(),this.clearFillInfo()}}class ji{constructor(e){d(this,"draw"),d(this,"eventBus"),d(this,"pageContainer"),this.draw=e,this.eventBus=this.draw.getEventBus(),this.pageContainer=this.draw.getPageContainer(),this.pageContainer.addEventListener("mousemove",this._mousemove.bind(this)),this.pageContainer.addEventListener("mouseenter",this._mouseenter.bind(this)),this.pageContainer.addEventListener("mouseleave",this._mouseleave.bind(this))}_mousemove(e){this.eventBus.isSubscribe("mousemove")&&this.eventBus.emit("mousemove",e)}_mouseenter(e){this.eventBus.isSubscribe("mouseenter")&&this.eventBus.emit("mouseenter",e)}_mouseleave(e){this.eventBus.isSubscribe("mouseleave")&&this.eventBus.emit("mouseleave",e)}}class Zi{constructor(e){d(this,"draw"),d(this,"options"),this.draw=e,this.options=e.getOptions()}render(e,t){const{scale:n,lineNumber:{color:r,size:i,font:s,right:o,type:a}}=this.options,l=this.draw.getTextParticle(),c=this.draw.getMargins(),u=this.draw.getPosition().getOriginalMainPositionList(),h=this.draw.getPageRowList(),d=h[t];e.save(),e.fillStyle=r,e.font=`${i*n}px ${s}`;for(let m=0;m<d.length;m++){const t=d[m],{coordinate:{leftBottom:r}}=u[t.startIndex],i=a===Dt.PAGE?m+1:t.rowIndex+1,s=l.measureText(e,{value:""+i}),h=c[3]-(s.width+o)*n,g=r[1]-s.actualBoundingBoxAscent*n;e.fillText(""+i,h,g)}e.restore()}}class Qi{constructor(e){d(this,"draw"),d(this,"header"),d(this,"footer"),d(this,"options"),this.draw=e,this.header=e.getHeader(),this.footer=e.getFooter(),this.options=e.getOptions()}render(e){const{scale:t,pageBorder:{color:n,lineWidth:r,padding:i}}=this.options;e.save(),e.translate(.5,.5),e.strokeStyle=n,e.lineWidth=r*t;const s=this.draw.getMargins(),o=s[3]-i[3]*t,a=s[0]+this.header.getExtraHeight()-i[0]*t,l=this.draw.getInnerWidth()+(i[1]+i[3])*t,c=this.draw.getHeight()-a-this.footer.getExtraHeight()-s[2]+i[2]*t;e.rect(o,a,l,c),e.stroke(),e.restore()}}function Ki(e,t){const{value:n,oldValue:r}=t;r.isTable&&!n.isTable&&e.getTableTool().dispose()}class Gi{constructor(e){d(this,"draw"),d(this,"eventBus"),this.draw=e,this.eventBus=e.getEventBus(),this.execute()}execute(){this.eventBus.on("positionContextChange",e=>{Ki(this.draw,e)})}}class Bi{constructor(e){d(this,"draw"),d(this,"range"),d(this,"position"),d(this,"tableTool"),d(this,"tableParticle"),d(this,"options"),this.draw=e,this.range=e.getRange(),this.position=e.getPosition(),this.tableTool=e.getTableTool(),this.tableParticle=e.getTableParticle(),this.options=e.getOptions()}insertTable(e,t){var n;const{startIndex:r,endIndex:i}=this.range.getRange();if(!~r&&!~i)return;const{defaultTrMinHeight:s}=this.options.table,o=this.draw.getElementList();let a=0;if(null==(n=o[r])?void 0:n.listId){const e=this.position.getPositionList(),{rowIndex:t}=e[r],n=this.draw.getRowList(),i=n[t];a=(null==i?void 0:i.offsetX)||0}const l=this.draw.getContextInnerWidth()-a,c=[],u=l/t;for(let g=0;g<t;g++)c.push({width:u});const h=[];for(let g=0;g<e;g++){const e=[],n={height:s,tdList:e};for(let r=0;r<t;r++)e.push({colspan:1,rowspan:1,value:[]});h.push(n)}const d={type:de.TABLE,value:"",colgroup:c,trList:h};Gt([d],{editorOptions:this.options}),rn(o,[d],r,{editorOptions:this.options});const m=r+1;this.draw.spliceElementList(o,m,r===i?0:i-r,d),this.range.setRange(m,m),this.draw.render({curIndex:m,isSetCursor:!1})}insertTableTopRow(){const e=this.position.getPositionContext();if(!e.isTable)return;const{index:t,trIndex:n,tableId:r}=e,i=this.draw.getOriginalElementList(),s=i[t],o=s.trList,a=o[n];if(a.tdList.length<s.colgroup.length){const e=a.tdList[0].rowIndex;for(let t=0;t<n;t++){const n=o[t];for(let t=0;t<n.tdList.length;t++){const r=n.tdList[t];r.rowspan>1&&r.rowIndex+r.rowspan>=e+1&&(r.rowspan+=1)}}}const l=V(),c={height:a.height,id:l,tdList:[]};for(let u=0;u<a.tdList.length;u++){const e=a.tdList[u],t=V();c.tdList.push({id:t,rowspan:1,colspan:e.colspan,value:[{value:M,size:16,tableId:r,trId:l,tdId:t}]})}o.splice(n,0,c),this.position.setPositionContext({isTable:!0,index:t,trIndex:n,tdIndex:0,tdId:c.tdList[0].id,trId:c.id,tableId:r}),this.range.setRange(0,0),this.draw.render({curIndex:0}),this.tableTool.render()}insertTableBottomRow(){const e=this.position.getPositionContext();if(!e.isTable)return;const{index:t,trIndex:n,tableId:r}=e,i=this.draw.getOriginalElementList(),s=i[t],o=s.trList,a=o[n],l=o.length-1===n?a:o[n+1];if(l.tdList.length<s.colgroup.length){const e=l.tdList[0].rowIndex;for(let t=0;t<n+1;t++){const n=o[t];for(let t=0;t<n.tdList.length;t++){const r=n.tdList[t];r.rowspan>1&&r.rowIndex+r.rowspan>=e+1&&(r.rowspan+=1)}}}const c=V(),u={height:l.height,id:c,tdList:[]};for(let h=0;h<l.tdList.length;h++){const e=l.tdList[h],t=V();u.tdList.push({id:t,rowspan:1,colspan:e.colspan,value:[{value:M,size:16,tableId:r,trId:c,tdId:t}]})}o.splice(n+1,0,u),this.position.setPositionContext({isTable:!0,index:t,trIndex:n+1,tdIndex:0,tdId:u.tdList[0].id,trId:u.id,tableId:s.id}),this.range.setRange(0,0),this.draw.render({curIndex:0})}adjustColWidth(e){if(e.type!==de.TABLE)return;const{defaultColMinWidth:t}=this.options.table,n=e.colgroup,r=n.reduce((e,t)=>e+t.width,0),i=this.draw.getOriginalInnerWidth();if(r>i){const e=n.filter(e=>e.width>t),s=(r-i)/e.length;for(let r=0;r<n.length;r++){const e=n[r];e.width-s>=t&&(e.width-=s)}}}insertTableLeftCol(){const e=this.position.getPositionContext();if(!e.isTable)return;const{index:t,tdIndex:n,tableId:r}=e,i=this.draw.getOriginalElementList(),s=i[t],o=s.trList,a=n;for(let u=0;u<o.length;u++){const e=o[u],t=V();e.tdList.splice(a,0,{id:t,rowspan:1,colspan:1,value:[{value:M,size:16,tableId:r,trId:e.id,tdId:t}]})}const{defaultColMinWidth:l}=this.options.table,c=s.colgroup;c.splice(a,0,{width:l}),this.adjustColWidth(s),this.position.setPositionContext({isTable:!0,index:t,trIndex:0,tdIndex:a,tdId:o[0].tdList[a].id,trId:o[0].id,tableId:r}),this.range.setRange(0,0),this.draw.render({curIndex:0}),this.tableTool.render()}insertTableRightCol(){const e=this.position.getPositionContext();if(!e.isTable)return;const{index:t,tdIndex:n,tableId:r}=e,i=this.draw.getOriginalElementList(),s=i[t],o=s.trList,a=n+1;for(let u=0;u<o.length;u++){const e=o[u],t=V();e.tdList.splice(a,0,{id:t,rowspan:1,colspan:1,value:[{value:M,size:16,tableId:r,trId:e.id,tdId:t}]})}const{defaultColMinWidth:l}=this.options.table,c=s.colgroup;c.splice(a,0,{width:l}),this.adjustColWidth(s),this.position.setPositionContext({isTable:!0,index:t,trIndex:0,tdIndex:a,tdId:o[0].tdList[a].id,trId:o[0].id,tableId:s.id}),this.range.setRange(0,0),this.draw.render({curIndex:0})}deleteTableRow(){const e=this.position.getPositionContext();if(!e.isTable)return;const{index:t,trIndex:n,tdIndex:r}=e,i=this.draw.getOriginalElementList(),s=i[t],o=s.trList,a=o[n],l=a.tdList[r].rowIndex;if(o.length<=1)this.deleteTable();else{for(let e=0;e<l;e++){const t=o[e],n=t.tdList;for(let e=0;e<n.length;e++){const t=n[e];t.rowIndex+t.rowspan>l&&t.rowspan--}}for(let e=0;e<a.tdList.length;e++){const t=a.tdList[e];if(t.rowspan>1){const r=V(),i=o[n+1];i.tdList.splice(e,0,{id:r,rowspan:t.rowspan-1,colspan:t.colspan,value:[{value:M,size:16,tableId:s.id,trId:i.id,tdId:r}]})}}o.splice(n,1),this.position.setPositionContext({isTable:!1}),this.range.clearRange(),this.draw.render({curIndex:e.index}),this.tableTool.dispose()}}deleteTableCol(){var e;const t=this.position.getPositionContext();if(!t.isTable)return;const{index:n,tdIndex:r,trIndex:i}=t,s=this.draw.getOriginalElementList(),o=s[n],a=o.trList,l=a[i].tdList[r],c=l.colIndex,u=a.find(e=>e.tdList.length>1);if(u){for(let e=0;e<a.length;e++){const t=a[e];for(let e=0;e<t.tdList.length;e++){const n=t.tdList[e];n.colIndex<=c&&n.colIndex+n.colspan>c&&(n.colspan>1?n.colspan--:t.tdList.splice(e,1))}}null==(e=o.colgroup)||e.splice(c,1),this.position.setPositionContext({isTable:!1}),this.range.setRange(0,0),this.draw.render({curIndex:t.index}),this.tableTool.dispose()}else this.deleteTable()}deleteTable(){const e=this.position.getPositionContext();if(!e.isTable)return;const t=this.draw.getOriginalElementList();t.splice(e.index,1);const n=e.index-1;this.position.setPositionContext({isTable:!1,index:n}),this.range.setRange(n,n),this.draw.render({curIndex:n}),this.tableTool.dispose()}mergeTableCell(){const e=this.position.getPositionContext();if(!e.isTable)return;const{isCrossRowCol:t,startTdIndex:n,endTdIndex:r,startTrIndex:i,endTrIndex:s}=this.range.getRange();if(!t)return;const{index:o}=e,a=this.draw.getOriginalElementList(),l=a[o],c=l.trList;let d=c[i].tdList[n],m=c[s].tdList[r];(d.x>m.x||d.y>m.y)&&([d,m]=[m,d]);const g=d.colIndex,p=m.colIndex+(m.colspan-1),f=d.rowIndex,R=m.rowIndex+(m.rowspan-1),y=[];for(let u=0;u<c.length;u++){const e=c[u],t=[];for(let n=0;n<e.tdList.length;n++){const r=e.tdList[n],i=r.colIndex,s=r.rowIndex;i>=g&&i<=p&&s>=f&&s<=R&&t.push(r)}t.length&&y.push(t)}if(!y.length)return;const M=y[y.length-1],S=y[0][0],b=M[M.length-1],w=S.x,T=S.y,O=b.x+b.width,v=b.y+b.height;for(let u=0;u<y.length;u++){const e=y[u];for(let t=0;t<e.length;t++){const n=e[t],r=n.x,i=n.y,s=r+n.width,o=i+n.height;if(w>r||T>i||O<s||v<o)return}}const E=[],C=y[0][0];for(let u=0;u<y.length;u++){const e=y[u];for(let t=0;t<e.length;t++){const n=e[t],r=0===u&&0===t;r||E.push(n.id),0===u&&0!==t&&(C.colspan+=n.colspan),0!==u&&C.colIndex===n.colIndex&&(C.rowspan+=n.rowspan)}}for(let u=0;u<c.length;u++){const e=c[u];let t=0;while(t<e.tdList.length){const n=e.tdList[t];E.includes(n.id)&&(e.tdList.splice(t,1),t--),t++}}this.position.setPositionContext(h(u({},e),{trIndex:C.trIndex,tdIndex:C.tdIndex}));const L=C.value.length-1;this.range.setRange(L,L),this.draw.render(),this.tableTool.render()}cancelMergeTableCell(){const e=this.position.getPositionContext();if(!e.isTable)return;const{index:t,tdIndex:n,trIndex:r}=e,i=this.draw.getOriginalElementList(),s=i[t],o=s.trList,a=o[r],l=a.tdList[n];if(1===l.rowspan&&1===l.colspan)return;const c=l.colspan;if(l.colspan>1){for(let e=1;e<l.colspan;e++){const t=V();a.tdList.splice(n+e,0,{id:t,rowspan:1,colspan:1,value:[{value:M,size:16,tableId:s.id,trId:a.id,tdId:t}]})}l.colspan=1}if(l.rowspan>1){for(let e=1;e<l.rowspan;e++){const t=o[r+e];for(let e=0;e<c;e++){const e=V();t.tdList.splice(l.colIndex,0,{id:e,rowspan:1,colspan:1,value:[{value:M,size:16,tableId:s.id,trId:t.id,tdId:e}]})}}l.rowspan=1}const u=l.value.length-1;this.range.setRange(u,u),this.draw.render(),this.tableTool.render()}tableTdVerticalAlign(e){const t=this.tableParticle.getRangeRowCol();if(!t)return;for(let r=0;r<t.length;r++){const n=t[r];for(let t=0;t<n.length;t++){const r=n[t];r&&r.verticalAlign!==e&&(r.verticalAlign||e!==yt.TOP)&&(r.verticalAlign=e)}}const{endIndex:n}=this.range.getRange();this.draw.render({curIndex:n})}tableBorderType(e){const t=this.position.getPositionContext();if(!t.isTable)return;const{index:n}=t,r=this.draw.getOriginalElementList(),i=r[n];if(!i.borderType&&e===yr.ALL||i.borderType===e)return;i.borderType=e;const{endIndex:s}=this.range.getRange();this.draw.render({curIndex:s})}tableBorderColor(e){const t=this.position.getPositionContext();if(!t.isTable)return;const{index:n}=t,r=this.draw.getOriginalElementList(),i=r[n];if(!i.borderColor&&e===this.options.table.defaultBorderColor||i.borderColor===e)return;i.borderColor=e;const{endIndex:s}=this.range.getRange();this.draw.render({curIndex:s,isCompute:!1})}tableTdBorderType(e){const t=this.tableParticle.getRangeRowCol();if(!t)return;const n=t.flat(),r=n.some(t=>{var n;return!(null==(n=t.borderTypes)?void 0:n.includes(e))});n.forEach(t=>{t.borderTypes||(t.borderTypes=[]);const n=t.borderTypes.findIndex(t=>t===e);r?~n||t.borderTypes.push(e):~n&&t.borderTypes.splice(n,1),t.borderTypes.length||delete t.borderTypes});const{endIndex:i}=this.range.getRange();this.draw.render({curIndex:i})}tableTdSlashType(e){const t=this.tableParticle.getRangeRowCol();if(!t)return;const n=t.flat(),r=n.some(t=>{var n;return!(null==(n=t.slashTypes)?void 0:n.includes(e))});n.forEach(t=>{t.slashTypes||(t.slashTypes=[]);const n=t.slashTypes.findIndex(t=>t===e);r?~n||t.slashTypes.push(e):~n&&t.slashTypes.splice(n,1),t.slashTypes.length||delete t.slashTypes});const{endIndex:i}=this.range.getRange();this.draw.render({curIndex:i})}tableTdBackgroundColor(e){const t=this.tableParticle.getRangeRowCol();if(!t)return;for(let r=0;r<t.length;r++){const n=t[r];for(let t=0;t<n.length;t++){const r=n[t];r.backgroundColor=e}}const{endIndex:n}=this.range.getRange();this.range.setRange(n,n),this.draw.render({isCompute:!1})}tableSelectAll(){const e=this.position.getPositionContext(),{index:t,tableId:n,isTable:r}=e;if(!r||!n)return;const{startIndex:i,endIndex:s}=this.range.getRange(),o=this.draw.getOriginalElementList(),a=o[t].trList,l=a.length-1,c=a[l].tdList.length-1;this.range.replaceRange({startIndex:i,endIndex:s,tableId:n,startTdIndex:0,endTdIndex:c,startTrIndex:0,endTrIndex:l}),this.draw.render({isCompute:!1,isSubmitHistory:!1})}}var Ji;(function(e){e["EDIT"]="edit",e["READONLY"]="readonly",e["FORM"]="form"})(Ji||(Ji={}));class zi{constructor(e){d(this,"draw"),d(this,"zone"),d(this,"range"),d(this,"position"),d(this,"areaInfoMap",new Map),this.draw=e,this.zone=e.getZone(),this.range=e.getRange(),this.position=e.getPosition()}getAreaInfo(){return this.areaInfoMap}getActiveAreaId(){if(!this.areaInfoMap.size)return null;const{startIndex:e}=this.range.getRange(),t=this.draw.getElementList(),n=t[e];return(null==n?void 0:n.areaId)||null}getActiveAreaInfo(){const e=this.getActiveAreaId();return e&&this.areaInfoMap.get(e)||null}isReadonly(){const e=this.getActiveAreaInfo();if(!(null==e?void 0:e.area))return!1;switch(e.area.mode){case Ji.EDIT:return!1;case Ji.READONLY:return!0;case Ji.FORM:return!this.draw.getControl().getIsRangeWithinControl();default:return!1}}insertArea(e){this.zone.getZone()!==Vt.MAIN&&this.zone.setZone(Vt.MAIN),this.draw.getPosition().setPositionContext({isTable:!1});const{id:t,value:n,area:r,position:i}=e;if(i===R.BEFORE)this.range.setRange(0,0);else{const e=this.draw.getOriginalMainElementList(),t=e.length-1;this.range.setRange(t,t)}const s=t||V();return this.draw.insertElementList([{type:de.AREA,value:"",areaId:s,valueList:n,area:Y(r)}]),s}render(e,t){if(!this.areaInfoMap.size)return;e.save();const n=this.draw.getMargins(),r=this.draw.getInnerWidth();for(const i of this.areaInfoMap){const{area:s,positionList:o}=i[1];if(!(null==s?void 0:s.backgroundColor)&&!(null==s?void 0:s.borderColor))continue;const a=o.filter(e=>e.pageNo===t);if(!a.length)continue;e.translate(.5,.5);const l=a[0],c=a[a.length-1],u=n[3],h=Math.ceil(l.coordinate.leftTop[1]),d=Math.ceil(c.coordinate.rightBottom[1]-h);s.backgroundColor&&(e.fillStyle=s.backgroundColor,e.fillRect(u,h,r,d)),s.borderColor&&(e.strokeStyle=s.borderColor,e.strokeRect(u,h,r,d))}e.restore()}compute(){this.areaInfoMap.clear();const e=this.draw.getOriginalMainElementList(),t=this.position.getOriginalMainPositionList();for(let n=0;n<e.length;n++){const r=e[n],i=r.areaId;if(i){const e=this.areaInfoMap.get(i);e?(e.elementList.push(r),e.positionList.push(t[n])):this.areaInfoMap.set(i,{id:i,area:r.area,elementList:[r],positionList:[t[n]]})}}}getAreaValue(e={}){const t=e.id||this.getActiveAreaId();if(!t)return null;const n=this.areaInfoMap.get(t);return n?{area:n.area,id:n.id,startPageNo:n.positionList[0].pageNo,endPageNo:n.positionList[n.positionList.length-1].pageNo,value:zt(n.elementList)}:null}setAreaProperties(e){const t=e.id||this.getActiveAreaId();if(!t)return;const n=this.areaInfoMap.get(t);if(!n)return;n.area||(n.area={});let r=!1;e.properties.mode&&(n.area.mode=e.properties.mode),e.properties.borderColor&&(n.area.borderColor=e.properties.borderColor),e.properties.backgroundColor&&(n.area.backgroundColor=e.properties.backgroundColor),ie(e.properties.top)||(r=!0,n.area.top=e.properties.top),this.draw.render({isCompute:r,isSetCursor:!1})}}class $i{constructor(e){d(this,"draw"),d(this,"options"),d(this,"imageCache"),d(this,"mainBadge"),d(this,"areaBadgeMap"),this.draw=e,this.options=e.getOptions(),this.imageCache=new Map,this.mainBadge=null,this.areaBadgeMap=new Map}setMainBadge(e){this.mainBadge=e}setAreaBadgeMap(e){this.areaBadgeMap.clear(),e.forEach(e=>{this.areaBadgeMap.set(e.areaId,e.badge)})}_drawImage(e,t,n,r,i,s){if(this.imageCache.has(s)){const o=this.imageCache.get(s);e.drawImage(o,t,n,r,i)}else{const o=new Image;o.setAttribute("crossOrigin","Anonymous"),o.src=s,o.onload=()=>{this.imageCache.set(s,o),e.drawImage(o,t,n,r,i)}}}render(e,t){if(0===t&&this.mainBadge){const{scale:t,badge:n}=this.options,{left:r,top:i,width:s,height:o,value:a}=this.mainBadge,l=this.draw.getMargins()[0]+this.draw.getHeader().getExtraHeight(),c=(r||n.left)*t,u=(i||n.top)*t+l;this._drawImage(e,c,u,s*t,o*t,a)}if(this.areaBadgeMap.size){const n=this.draw.getArea().getAreaInfo();if(n.size){const{scale:r,badge:i}=this.options;for(const s of n){const{positionList:n}=s[1],o=n[0];if(o.pageNo!==t)continue;const a=this.areaBadgeMap.get(s[0]);if(!a)continue;const{left:l,top:c,width:u,height:h,value:d}=a,m=(l||i.left)*r,g=(c||i.top)*r+o.coordinate.leftTop[1];this._drawImage(e,m,g,u*r,h*r,d)}}}}}class qi{constructor(e,t,n,r,i,s){d(this,"container"),d(this,"pageContainer"),d(this,"pageList"),d(this,"ctxList"),d(this,"pageNo"),d(this,"pagePixelRatio"),d(this,"mode"),d(this,"options"),d(this,"position"),d(this,"zone"),d(this,"elementList"),d(this,"listener"),d(this,"eventBus"),d(this,"override"),d(this,"i18n"),d(this,"canvasEvent"),d(this,"globalEvent"),d(this,"cursor"),d(this,"range"),d(this,"margin"),d(this,"background"),d(this,"badge"),d(this,"search"),d(this,"group"),d(this,"area"),d(this,"underline"),d(this,"strikeout"),d(this,"highlight"),d(this,"historyManager"),d(this,"previewer"),d(this,"imageParticle"),d(this,"laTexParticle"),d(this,"textParticle"),d(this,"tableParticle"),d(this,"tableTool"),d(this,"tableOperate"),d(this,"pageNumber"),d(this,"lineNumber"),d(this,"waterMark"),d(this,"placeholder"),d(this,"header"),d(this,"footer"),d(this,"hyperlinkParticle"),d(this,"dateParticle"),d(this,"separatorParticle"),d(this,"pageBreakParticle"),d(this,"superscriptParticle"),d(this,"subscriptParticle"),d(this,"checkboxParticle"),d(this,"radioParticle"),d(this,"blockParticle"),d(this,"listParticle"),d(this,"lineBreakParticle"),d(this,"control"),d(this,"pageBorder"),d(this,"workerManager"),d(this,"scrollObserver"),d(this,"selectionObserver"),d(this,"imageObserver"),d(this,"LETTER_REG"),d(this,"WORD_LIKE_REG"),d(this,"rowList"),d(this,"pageRowList"),d(this,"painterStyle"),d(this,"painterOptions"),d(this,"visiblePageNoList"),d(this,"intersectionPageNo"),d(this,"lazyRenderIntersectionObserver"),d(this,"printModeData"),this.container=this._wrapContainer(e),this.pageList=[],this.ctxList=[],this.pageNo=0,this.pagePixelRatio=null,this.mode=t.mode,this.options=t,this.elementList=n.main,this.listener=r,this.eventBus=i,this.override=s,this._formatContainer(),this.pageContainer=this._createPageContainer(),this._createPage(0),this.i18n=new Di,this.historyManager=new vr(this),this.position=new Er(this),this.zone=new Yi(this),this.range=new Cr(this),this.margin=new Ir(this),this.background=new Lr(this),this.badge=new $i(this),this.search=new Pr(this),this.group=new Xi(this),this.area=new zi(this),this.underline=new Dr(this),this.strikeout=new xr(this),this.highlight=new _r(this),this.previewer=new gi(this),this.imageParticle=new _e(this),this.laTexParticle=new $e(this),this.textParticle=new Ar(this),this.tableParticle=new kr(this),this.tableTool=new Vr(this),this.tableOperate=new Bi(this),this.pageNumber=new Fr(this),this.lineNumber=new Zi(this),this.waterMark=new Kr(this),this.placeholder=new Wi(this),this.header=new Wr(this,n.header),this.footer=new Hi(this,n.footer),this.hyperlinkParticle=new Ur(this),this.dateParticle=new pi(this),this.separatorParticle=new Zr(this),this.pageBreakParticle=new Qr(this),this.superscriptParticle=new Xr,this.subscriptParticle=new jr,this.checkboxParticle=new ni(this),this.radioParticle=new ri(this),this.blockParticle=new bi(this),this.listParticle=new ki(this),this.lineBreakParticle=new Ui(this),this.control=new ti(this),this.pageBorder=new Qi(this),this.scrollObserver=new Yr(this),this.selectionObserver=new Hr(this),this.imageObserver=new Ai,new ji(this),this.canvasEvent=new Tr(this),this.cursor=new Nn(this,this.canvasEvent),this.canvasEvent.register(),this.globalEvent=new Or(this,this.canvasEvent),this.globalEvent.register(),this.workerManager=new mi(this),new Gi(this);const{letterClass:o}=t;this.LETTER_REG=new RegExp(`[${o.join("")}]`),this.WORD_LIKE_REG=new RegExp(""+o.map(e=>`[^${e}][${e}]`).join("|")),this.rowList=[],this.pageRowList=[],this.painterStyle=null,this.painterOptions=null,this.visiblePageNoList=[],this.intersectionPageNo=0,this.lazyRenderIntersectionObserver=null,this.printModeData=null,this.render({isInit:!0,isSetCursor:!1,isFirstRender:!0})}getLetterReg(){return this.LETTER_REG}getMode(){return this.mode}setMode(e){if(this.mode!==e){if(e===kt.PRINT){this.printModeData={header:this.header.getElementList(),main:this.elementList,footer:this.footer.getElementList()};const e=Y(this.printModeData),t=["header","main","footer"];t.forEach(t=>{e[t]=this.control.filterAssistElement(e[t])}),this.setEditorData(e)}this.mode===kt.PRINT&&this.printModeData&&(this.setEditorData(this.printModeData),this.printModeData=null),this.clearSideEffect(),this.range.clearRange(),this.mode=e,this.options.mode=e,this.render({isSetCursor:!1,isSubmitHistory:!1})}}isReadonly(){if(this.area.getActiveAreaId())return this.area.isReadonly();switch(this.mode){case kt.DESIGN:return!1;case kt.READONLY:case kt.PRINT:return!0;case kt.FORM:return!this.control.getIsRangeWithinControl();default:return!1}}isDisabled(){var e,t,n,r,i;if(this.mode===kt.DESIGN)return!1;const{startIndex:s,endIndex:o}=this.range.getRange(),a=this.getElementList();if(null==(e=this.getTd())?void 0:e.disabled)return!0;if(s===o){const e=a[s],o=a[s+1];return!!((null==(t=null==e?void 0:e.title)?void 0:t.disabled)&&(null==(n=null==o?void 0:o.title)?void 0:n.disabled)||(null==(r=null==e?void 0:e.control)?void 0:r.disabled)&&(null==(i=null==o?void 0:o.control)?void 0:i.disabled))}const l=a.slice(s+1,o+1);return l.some(e=>{var t,n;return(null==(t=e.title)?void 0:t.disabled)||(null==(n=e.control)?void 0:n.disabled)})}isDesignMode(){return this.mode===kt.DESIGN}getOriginalWidth(){const{paperDirection:e,width:t,height:n}=this.options;return e===Wt.VERTICAL?t:n}getOriginalHeight(){const{paperDirection:e,width:t,height:n}=this.options;return e===Wt.VERTICAL?n:t}getWidth(){return Math.floor(this.getOriginalWidth()*this.options.scale)}getHeight(){return Math.floor(this.getOriginalHeight()*this.options.scale)}getMainHeight(){const e=this.getHeight();return e-this.getMainOuterHeight()}getMainOuterHeight(){const e=this.getMargins(),t=this.header.getExtraHeight(),n=this.footer.getExtraHeight();return e[0]+e[2]+t+n}getCanvasWidth(e=-1){const t=this.getPage(e);return t.width}getCanvasHeight(e=-1){const t=this.getPage(e);return t.height}getInnerWidth(){const e=this.getWidth(),t=this.getMargins();return e-t[1]-t[3]}getOriginalInnerWidth(){const e=this.getOriginalWidth(),t=this.getOriginalMargins();return e-t[1]-t[3]}getContextInnerWidth(){const e=this.position.getPositionContext();if(e.isTable){const{index:t,trIndex:n,tdIndex:r}=e,i=this.getOriginalElementList(),s=i[t].trList[n].tdList[r],o=this.getTdPadding();return s.width-o[1]-o[3]}return this.getOriginalInnerWidth()}getMargins(){return this.getOriginalMargins().map(e=>e*this.options.scale)}getOriginalMargins(){const{margins:e,paperDirection:t}=this.options;return t===Wt.VERTICAL?e:[e[1],e[2],e[3],e[0]]}getPageGap(){return this.options.pageGap*this.options.scale}getOriginalPageGap(){return this.options.pageGap}getPageNumberBottom(){const{pageNumber:{bottom:e},scale:t}=this.options;return e*t}getMarginIndicatorSize(){return this.options.marginIndicatorSize*this.options.scale}getDefaultBasicRowMarginHeight(){return this.options.defaultBasicRowMarginHeight*this.options.scale}getTdPadding(){const{table:{tdPadding:e},scale:t}=this.options;return e.map(e=>e*t)}getContainer(){return this.container}getPageContainer(){return this.pageContainer}getVisiblePageNoList(){return this.visiblePageNoList}setVisiblePageNoList(e){this.visiblePageNoList=e,this.listener.visiblePageNoListChange&&this.listener.visiblePageNoListChange(this.visiblePageNoList),this.eventBus.isSubscribe("visiblePageNoListChange")&&this.eventBus.emit("visiblePageNoListChange",this.visiblePageNoList)}getIntersectionPageNo(){return this.intersectionPageNo}setIntersectionPageNo(e){this.intersectionPageNo=e,this.listener.intersectionPageNoChange&&this.listener.intersectionPageNoChange(this.intersectionPageNo),this.eventBus.isSubscribe("intersectionPageNoChange")&&this.eventBus.emit("intersectionPageNoChange",this.intersectionPageNo)}getPageNo(){return this.pageNo}setPageNo(e){this.pageNo=e}getPage(e=-1){return this.pageList[~e?e:this.pageNo]}getPageList(){return this.pageList}getPageCount(){return this.pageList.length}getTableRowList(e){const t=this.position.getPositionContext(),{index:n,trIndex:r,tdIndex:i}=t;return e[n].trList[r].tdList[i].rowList}getOriginalRowList(){const e=this.getZone();return e.isHeaderActive()?this.header.getRowList():e.isFooterActive()?this.footer.getRowList():this.rowList}getRowList(){const e=this.position.getPositionContext();return e.isTable?this.getTableRowList(this.getOriginalElementList()):this.getOriginalRowList()}getPageRowList(){return this.pageRowList}getCtx(){return this.ctxList[this.pageNo]}getOptions(){return this.options}getSearch(){return this.search}getGroup(){return this.group}getArea(){return this.area}getBadge(){return this.badge}getHistoryManager(){return this.historyManager}getPosition(){return this.position}getZone(){return this.zone}getRange(){return this.range}getLineBreakParticle(){return this.lineBreakParticle}getTextParticle(){return this.textParticle}getHeaderElementList(){return this.header.getElementList()}getTableElementList(e){var t;const n=this.position.getPositionContext(),{index:r,trIndex:i,tdIndex:s}=n;return(null==(t=e[r].trList)?void 0:t[i].tdList[s].value)||[]}getElementList(){const e=this.position.getPositionContext(),t=this.getOriginalElementList();return e.isTable?this.getTableElementList(t):t}getMainElementList(){const e=this.position.getPositionContext();return e.isTable?this.getTableElementList(this.elementList):this.elementList}getOriginalElementList(){const e=this.getZone();return e.isHeaderActive()?this.getHeaderElementList():e.isFooterActive()?this.getFooterElementList():this.elementList}getOriginalMainElementList(){return this.elementList}getFooterElementList(){return this.footer.getElementList()}getTd(){const e=this.position.getPositionContext(),{index:t,trIndex:n,tdIndex:r,isTable:i}=e;if(i){const e=this.getOriginalElementList();return e[t].trList[n].tdList[r]}return null}insertElementList(e){if(!e.length||!this.range.getIsCanInput())return;const{startIndex:t,endIndex:n}=this.range.getRange();if(!~t&&!~n)return;Gt(e,{isHandleFirstElement:!1,editorOptions:this.options});let r=-1,i=this.control.getActiveControl();if(!i&&this.control.getIsRangeWithinControl()&&(this.control.initControl(),i=this.control.getActiveControl()),i&&this.control.getIsRangeWithinControl())r=i.setValue(e,void 0,{isIgnoreDisabledRule:!0});else{const i=this.getElementList(),s=t===n,o=t+1;s||this.spliceElementList(i,o,n-t),this.spliceElementList(i,o,0,...e),r=t+e.length;const a=i[o-1];!e[0].listId||!a||a.listId||(null==a?void 0:a.value)!==M||a.type&&a.type!==de.TEXT||(i.splice(t,1),r-=1)}~r&&(this.range.setRange(r,r),this.render({curIndex:r}))}appendElementList(e,t={}){if(!e.length)return;let n;Gt(e,{isHandleFirstElement:!1,editorOptions:this.options});const{isPrepend:r}=t;r?(this.elementList.splice(1,0,...e),n=e.length):(this.elementList.push(...e),n=this.elementList.length-1),this.range.setRange(n,n),this.render({curIndex:n})}spliceElementList(e,t,n,...r){var i,s,o,a;const l=this.isDesignMode();if(n>0){const r=t+n,c=e[r],u=null==c?void 0:c.listId;if(u&&(null==(i=e[t-1])?void 0:i.listId)!==u){let t=r;while(t<e.length){const n=e[t];if(n.listId!==u||n.value===M)break;delete n.listId,delete n.listType,delete n.listStyle,t++}}if(this.control.getActiveControl())e.splice(t,n);else{const n=null==(s=this.getTd())?void 0:s.deletable;let i=r-1;while(i>=t){const t=e[i];(l||!1!==n&&!1!==(null==(o=null==t?void 0:t.control)?void 0:o.deletable)&&!1!==(null==(a=null==t?void 0:t.title)?void 0:a.deletable))&&e.splice(i,1),i--}}}for(let c=0;c<r.length;c++)e.splice(t+c,0,r[c])}getCanvasEvent(){return this.canvasEvent}getGlobalEvent(){return this.globalEvent}getListener(){return this.listener}getEventBus(){return this.eventBus}getOverride(){return this.override}getCursor(){return this.cursor}getPreviewer(){return this.previewer}getImageParticle(){return this.imageParticle}getTableTool(){return this.tableTool}getTableOperate(){return this.tableOperate}getTableParticle(){return this.tableParticle}getHeader(){return this.header}getFooter(){return this.footer}getHyperlinkParticle(){return this.hyperlinkParticle}getDateParticle(){return this.dateParticle}getListParticle(){return this.listParticle}getCheckboxParticle(){return this.checkboxParticle}getRadioParticle(){return this.radioParticle}getControl(){return this.control}getWorkerManager(){return this.workerManager}getImageObserver(){return this.imageObserver}getI18n(){return this.i18n}getRowCount(){return this.getRowList().length}async getDataURL(e={}){const{pixelRatio:t,mode:n}=e;t&&this.setPagePixelRatio(t);const r=this.mode,i=!!n&&r!==n;i&&this.setMode(n),this.render({isLazy:!1,isCompute:!1,isSetCursor:!1,isSubmitHistory:!1}),await this.imageObserver.allSettled();const s=this.pageList.map(e=>e.toDataURL());return t&&this.setPagePixelRatio(null),i&&this.setMode(r),s}getPainterStyle(){return this.painterStyle&&Object.keys(this.painterStyle).length?this.painterStyle:null}getPainterOptions(){return this.painterOptions}setPainterStyle(e,t){this.painterStyle=e,this.painterOptions=t||null,this.getPainterStyle()&&this.pageList.forEach(e=>e.style.cursor="copy")}setDefaultRange(){this.elementList.length&&setTimeout(()=>{const e=this.elementList.length-1;this.range.setRange(e,e),this.range.setRangeStyle()})}getIsPagingMode(){return this.options.pageMode===Ut.PAGING}setPageMode(e){if(!e||this.options.pageMode===e)return;if(this.options.pageMode=e,e===Ut.PAGING){const{height:e}=this.options,t=this.getPagePixelRatio(),n=this.pageList[0];n.style.height=e+"px",n.height=e*t,this._initPageContext(this.ctxList[0])}else this._disconnectLazyRender(),this.header.recovery(),this.footer.recovery(),this.zone.setZone(Vt.MAIN);const{startIndex:t}=this.range.getRange(),n=this.range.getIsCollapsed();this.render({isSetCursor:!0,curIndex:t,isSubmitHistory:!1}),n||this.cursor.drawCursor({isShow:!1}),setTimeout(()=>{this.listener.pageModeChange&&this.listener.pageModeChange(e),this.eventBus.isSubscribe("pageModeChange")&&this.eventBus.emit("pageModeChange",e)})}setPageScale(e){const t=this.getPagePixelRatio();this.options.scale=e;const n=this.getWidth(),r=this.getHeight();this.container.style.width=n+"px",this.pageList.forEach((e,i)=>{e.width=n*t,e.height=r*t,e.style.width=n+"px",e.style.height=r+"px",e.style.marginBottom=this.getPageGap()+"px",this._initPageContext(this.ctxList[i])});const i=this.position.getCursorPosition();this.render({isSubmitHistory:!1,isSetCursor:!!i,curIndex:null==i?void 0:i.index}),this.listener.pageScaleChange&&this.listener.pageScaleChange(e),this.eventBus.isSubscribe("pageScaleChange")&&this.eventBus.emit("pageScaleChange",e)}getPagePixelRatio(){return this.pagePixelRatio||window.devicePixelRatio}setPagePixelRatio(e){!this.pagePixelRatio&&e===window.devicePixelRatio||e===this.pagePixelRatio||(this.pagePixelRatio=e,this.setPageDevicePixel())}setPageDevicePixel(){const e=this.getPagePixelRatio(),t=this.getWidth(),n=this.getHeight();this.pageList.forEach((r,i)=>{r.width=t*e,r.height=n*e,this._initPageContext(this.ctxList[i])}),this.render({isSubmitHistory:!1,isSetCursor:!1})}setPaperSize(e,t){this.options.width=e,this.options.height=t;const n=this.getPagePixelRatio(),r=this.getWidth(),i=this.getHeight();this.container.style.width=r+"px",this.pageList.forEach((e,t)=>{e.width=r*n,e.height=i*n,e.style.width=r+"px",e.style.height=i+"px",this._initPageContext(this.ctxList[t])}),this.render({isSubmitHistory:!1,isSetCursor:!1})}setPaperDirection(e){const t=this.getPagePixelRatio();this.options.paperDirection=e;const n=this.getWidth(),r=this.getHeight();this.container.style.width=n+"px",this.pageList.forEach((e,i)=>{e.width=n*t,e.height=r*t,e.style.width=n+"px",e.style.height=r+"px",this._initPageContext(this.ctxList[i])}),this.render({isSubmitHistory:!1,isSetCursor:!1})}setPaperMargin(e){this.options.margins=e,this.render({isSubmitHistory:!1,isSetCursor:!1})}getValue(e={}){const{pageNo:t,extraPickAttrs:n}=e;let r=this.elementList;Number.isInteger(t)&&t>=0&&t<this.pageRowList.length&&(r=this.pageRowList[t].flatMap(e=>e.elementList));const i={header:zt(this.getHeaderElementList(),{extraPickAttrs:n}),main:zt(r,{extraPickAttrs:n,isClassifyArea:!0}),footer:zt(this.getFooterElementList(),{extraPickAttrs:n})};return{version:m,data:i,options:Y(this.options)}}setValue(e,t){const{header:n,main:r,footer:i}=Y(e);if(!n&&!r&&!i)return;const{isSetCursor:s=!1}=t||{},o=[n,r,i];o.forEach(e=>{e&&Gt(e,{editorOptions:this.options,isForceCompensation:!0})}),this.setEditorData({header:n,main:r,footer:i}),this.historyManager.recovery();const a=s?(null==r?void 0:r.length)?r.length-1:0:void 0;void 0!==a&&this.range.setRange(a,a),this.render({curIndex:a,isSetCursor:s,isFirstRender:!0})}setEditorData(e){const{header:t,main:n,footer:r}=e;t&&this.header.setElementList(t),n&&(this.elementList=n),r&&this.footer.setElementList(r)}_wrapContainer(e){const t=document.createElement("div");return e.append(t),t}_formatContainer(){this.container.style.position="relative",this.container.style.width=this.getWidth()+"px",this.container.setAttribute(le,Yt.MAIN)}_createPageContainer(){const e=document.createElement("div");return e.classList.add(ce+"-page-container"),this.container.append(e),e}_createPage(e){const t=this.getWidth(),n=this.getHeight(),r=document.createElement("canvas");r.style.width=t+"px",r.style.height=n+"px",r.style.display="block",r.style.backgroundColor="#ffffff",r.style.marginBottom=this.getPageGap()+"px",r.setAttribute("data-index",String(e)),this.pageContainer.append(r);const i=this.getPagePixelRatio();r.width=t*i,r.height=n*i,r.style.cursor="text";const s=r.getContext("2d");this._initPageContext(s),this.pageList.push(r),this.ctxList.push(s)}_initPageContext(e){const t=this.getPagePixelRatio();e.scale(t,t),e.letterSpacing="0px",e.wordSpacing="0px",e.direction="ltr"}getElementFont(e,t=1){const{defaultSize:n,defaultFont:r}=this.options,i=e.font||r,s=e.actualSize||e.size||n;return`${e.italic?"italic ":""}${e.bold?"bold ":""}${s*t}px ${i}`}getElementSize(e){return e.actualSize||e.size||this.options.defaultSize}getElementRowMargin(e){var t;const{defaultBasicRowMarginHeight:n,defaultRowMargin:r,scale:i}=this.options;return n*(null!=(t=e.rowMargin)?t:r)*i}computeRowList(e){var t,n,r,i,s,o,a,l,c,u,h,d,m,g,p,R;const{innerWidth:S,elementList:b,isPagingMode:w=!1,isFromTable:T=!1,startX:O=0,startY:v=0,pageHeight:E=0,mainOuterHeight:L=0,surroundElementList:N=[]}=e,{defaultSize:_,defaultRowMargin:I,scale:P,table:{tdPadding:x,defaultTrMinHeight:D},defaultTabWidth:A}=this.options,F=this.getDefaultBasicRowMarginHeight(),H=document.createElement("canvas"),k=H.getContext("2d"),U=this.listParticle.computeListStyle(k,b),W=[];b.length&&W.push({width:0,height:0,ascent:0,elementList:[],startIndex:0,rowIndex:0,rowFlex:(null==(t=null==b?void 0:b[0])?void 0:t.rowFlex)||(null==(n=null==b?void 0:b[1])?void 0:n.rowFlex)});let X,j=O,Z=v,Q=0,K=0,G=0;for(let B=0;B<b.length;B++){const e=W[W.length-1],t=b[B],n=F*(null!=(r=t.rowMargin)?r:I),H={width:0,height:0,boundingBoxAscent:0,boundingBoxDescent:0},J=e.offsetX||t.listId&&U.get(t.listId)||0,z=S-J,$=1===e.elementList.length;if(j+=$?J:0,Z+=$&&e.offsetY||0,t.type===de.IMAGE||t.type===de.LATEX){if(t.imgDisplay===f.SURROUND||t.imgDisplay===f.FLOAT_TOP||t.imgDisplay===f.FLOAT_BOTTOM)H.width=0,H.height=0,H.boundingBoxDescent=0;else{const e=t.width*P,n=t.height*P;if(e>z){const r=n*z/e;t.width=z/P,t.height=r/P,H.width=z,H.height=r,H.boundingBoxDescent=r}else H.width=e,H.height=n,H.boundingBoxDescent=n}H.boundingBoxAscent=0}else if(t.type===de.TABLE){const e=x[1]+x[3],r=x[0]+x[2];if(t.pagingId){let e=B+1,n=0;while(e<b.length){const r=b[e];if(r.pagingId!==t.pagingId)break;{const i=r.trList.filter(e=>!e.pagingRepeat);t.trList.push(...i),t.height+=r.height,e++,n++}}n&&b.splice(B+1,n)}t.pagingIndex=null!=(i=t.pagingIndex)?i:0;const l=t.trList;for(let t=0;t<l.length;t++){const e=l[t];e.height=e.minHeight||D}this.tableParticle.computeRowColInfo(t);for(let t=0;t<l.length;t++){const n=l[t];for(let i=0;i<n.tdList.length;i++){const s=n.tdList[i],o=this.computeRowList({innerWidth:(s.width-e)*P,elementList:s.value,isFromTable:!0,isPagingMode:w}),a=o.reduce((e,t)=>e+t.height,0);s.rowList=o;const c=a/P+r;if(s.height<c){const e=c-s.height,n=l[t+s.rowspan-1];n.height+=e,n.tdList.forEach(t=>{t.height+=e,t.realHeight?t.realHeight+=e:t.realHeight=t.height})}let u=0,h=0,d=0;while(d<s.rowspan){const e=l[d+t]||l[t];u+=e.minHeight,h+=e.height,d++}s.realMinHeight=u,s.realHeight=h,s.mainHeight=c}}const c=this.tableParticle.getTrListGroupByCol(l);for(let t=0;t<c.length;t++){const e=c[t];let n=-1;for(let t=0;t<e.tdList.length;t++){const r=e.tdList[t],i=r.realHeight,s=r.mainHeight,o=r.realMinHeight,a=s<o?i-o:i-s;(!~n||a<n)&&(n=a)}if(n>0){const e=l[t];e.height-=n,e.tdList.forEach(e=>{e.height-=n,e.realHeight-=n})}}this.tableParticle.computeRowColInfo(t);const u=this.tableParticle.getTableHeight(t),h=this.tableParticle.getTableWidth(t);t.width=h,t.height=u;const d=h*P,m=u*P;if(H.width=d,H.height=m,H.boundingBoxDescent=m,H.boundingBoxAscent=-n,(null==(s=b[B+1])?void 0:s.type)===de.TABLE&&(H.boundingBoxAscent-=n),w){const e=this.getHeight(),r=this.getMainOuterHeight();let i=r;for(let t=0;t<W.length;t++){const n=W[t],s=n.offsetY||0;n.height+i+s>e||(null==(o=W[t-1])?void 0:o.isPageBreak)?i=r+n.height+s:i+=n.height+s}const s=2*n*P,l=t.trList[0].height*P;if((i+l+s>e||0!==t.pagingIndex&&t.trList[0].pagingRepeat)&&(i=r),i+s+m>e){const n=t.trList;let r=0,o=0,l=0;if(n.length>1)for(let c=0;c<n.length;c++){const u=n[c],h=u.height*P;if(i+s+l+h>e){const e=u.tdList.reduce((e,t)=>e+t.colspan,0);(null==(a=t.colgroup)?void 0:a.length)!==e&&(o=0);break}r=c+1,o=n.length-r,l+=h}if(o){const e=n.splice(r,o),i=e.reduce((e,t)=>e+t.height,0),s=i*P,a=t.pagingId||V();t.pagingId=a,t.height-=i,H.height-=s,H.boundingBoxDescent-=s;const l=Y(t);l.pagingId=a,l.pagingIndex=t.pagingIndex+1;const c=n.filter(e=>e.pagingRepeat);if(c.length){const t=Y(c);t.forEach(e=>e.id=V()),e.unshift(...t)}l.trList=e,l.id=V(),this.spliceElementList(b,B+1,0,l)}}if(t.pagingId){const e=this.position.getPositionContext();if(e.isTable){let n=-1,r=-1,i=B;while(i<b.length){const s=b[i];if(s.pagingId!==t.pagingId)break;const o=s.trList.findIndex(t=>t.id===e.trId);if(~o){n=i,r=o;break}i++}~n&&(e.index=n,e.trIndex=r,this.position.setPositionContext(e))}}}}else if(t.type===de.SEPARATOR){const{separator:{lineWidth:e}}=this.options;t.width=z/P,H.width=z,H.height=e*P,H.boundingBoxAscent=-n,H.boundingBoxDescent=-n+H.height}else if(t.type===de.PAGE_BREAK)t.width=z/P,H.width=z,H.height=_;else if(t.type===de.RADIO||t.controlComponent===dt.RADIO){const{width:e,height:n,gap:r}=this.options.radio,i=e+2*r;t.width=i,H.width=i*P,H.height=n*P}else if(t.type===de.CHECKBOX||t.controlComponent===dt.CHECKBOX){const{width:e,height:n,gap:r}=this.options.checkbox,i=e+2*r;t.width=i,H.width=i*P,H.height=n*P}else if(t.type===de.TAB)H.width=A*P,H.height=_*P,H.boundingBoxDescent=0,H.boundingBoxAscent=H.height;else if(t.type===de.BLOCK){if(t.width){const e=t.width*P;H.width=Math.min(e,z)}else H.width=z;H.height=t.height*P,H.boundingBoxDescent=H.height,H.boundingBoxAscent=0}else{const e=t.size||_;t.type!==de.SUPERSCRIPT&&t.type!==de.SUBSCRIPT||(t.actualSize=Math.ceil(.6*e)),H.height=(t.actualSize||e)*P,k.font=this.getElementFont(t);const n=this.textParticle.measureText(k,t);H.width=n.width*P,t.letterSpacing&&(H.width+=t.letterSpacing*P),H.boundingBoxAscent=(t.value===M?t.size||_:n.actualBoundingBoxAscent)*P,H.boundingBoxDescent=n.actualBoundingBoxDescent*P,t.type===de.SUPERSCRIPT?H.boundingBoxAscent+=H.height/2:t.type===de.SUBSCRIPT&&(H.boundingBoxDescent+=H.height/2)}const q=t.imgDisplay!==f.INLINE&&t.type===de.IMAGE||t.type===de.LATEX?H.height+n:H.boundingBoxAscent+n,ee=n+H.boundingBoxAscent+H.boundingBoxDescent+n,te=Object.assign(t,{metrics:H,left:0,style:this.getElementFont(t,P)});(null==(l=te.control)?void 0:l.minWidth)&&(te.controlComponent&&(G+=H.width),te.controlComponent===dt.POSTFIX&&(this.control.setMinWidthControlInfo({row:e,rowElement:te,availableWidth:z,controlRealWidth:G}),G=0));const ne=b[B-1];let re=b[B+1],ie=e.width+H.width;if(this.options.wordBreak===Xt.BREAK_WORD&&(!(null==ne?void 0:ne.type)||(null==ne?void 0:ne.type)===de.TEXT)&&(!t.type||t.type===de.TEXT)){const e=`${(null==ne?void 0:ne.value)||""}${t.value}`;if(this.WORD_LIKE_REG.test(e)){const{width:e,endElement:t}=this.textParticle.measureWord(k,b,B),n=e*P;n<=z&&(ie+=n,re=t)}const n=this.textParticle.measurePunctuationWidth(k,re);ie+=n*P}t.listId&&(t.listId!==X?K=0:t.value!==M||t.listWrap||K++),X=t.listId;const se=this.position.setSurroundPosition({pageNo:Q,rowElement:te,row:e,rowElementRect:{x:j,y:Z,height:ee,width:H.width},availableWidth:z,surroundElementList:N});j=se.x,ie+=se.rowIncreaseWidth,j+=H.width;const oe=t.type===de.SEPARATOR||t.type===de.TABLE||(null==ne?void 0:ne.type)===de.TABLE||(null==ne?void 0:ne.type)===de.BLOCK||t.type===de.BLOCK||(null==ne?void 0:ne.imgDisplay)===f.INLINE||t.imgDisplay===f.INLINE||(null==ne?void 0:ne.listId)!==t.listId||(null==ne?void 0:ne.areaId)!==t.areaId||(null==(c=t.control)?void 0:c.flexDirection)===y.COLUMN&&(t.controlComponent===dt.CHECKBOX||t.controlComponent===dt.RADIO)&&(null==ne?void 0:ne.controlComponent)===dt.VALUE||0!==B&&t.value===M,ae=ie>z,le=oe||ae;if(le){const n={width:H.width,height:ee,startIndex:B,elementList:[te],ascent:q,rowIndex:e.rowIndex+1,rowFlex:(null==(u=b[B])?void 0:u.rowFlex)||(null==(h=b[B+1])?void 0:h.rowFlex),isPageBreak:t.type===de.PAGE_BREAK};if(te.controlComponent!==dt.PREFIX&&(null==(d=te.control)?void 0:d.indentation)===mt.VALUE_START){const t=e.elementList.findIndex(e=>e.controlId===te.controlId&&e.controlComponent!==dt.PREFIX);if(~t){const r=this.position.computeRowPosition({row:e,innerWidth:this.getInnerWidth()}),i=r[t];i&&(n.offsetX=i.coordinate.leftTop[0])}}t.listId&&(n.isList=!0,n.offsetX=U.get(t.listId),n.listIndex=K),n.offsetY=!T&&(null==(m=t.area)?void 0:m.top)&&t.areaId!==(null==(g=b[B-1])?void 0:g.areaId)?t.area.top*P:0,W.push(n)}else e.width+=H.width,0===B&&(mn(b[1])||(null==(p=b[1])?void 0:p.areaId))?(e.height=F,e.ascent=F):e.height<ee&&(e.height=ee,e.ascent=q),e.elementList.push(te);if((le||B===b.length-1)&&(e.isWidthNotEnough=ae&&!oe,!e.isSurround&&((null==ne?void 0:ne.rowFlex)===C.JUSTIFY||(null==ne?void 0:ne.rowFlex)===C.ALIGNMENT&&e.isWidthNotEnough))){const t=(null==(R=e.elementList[0])?void 0:R.value)===M?e.elementList.slice(1):e.elementList,n=(z-e.width)/(t.length-1);for(let e=0;e<t.length-1;e++){const r=t[e];r.metrics.width+=n}e.width=z}if(le){j=O,Z+=e.height,w&&!T&&E&&(Z-v+L+ee>E||t.type===de.PAGE_BREAK)&&(Z=v,fn(N,Q),Q+=1),te.left=0;const n=W[W.length-1],r=this.position.setSurroundPosition({pageNo:Q,rowElement:te,row:n,rowElementRect:{x:j,y:Z,height:ee,width:H.width},availableWidth:z,surroundElementList:N});j=r.x,j+=H.width}}return W}_computePageList(){var e;const t=[[]],{pageMode:n,pageNumber:{maxPageNo:r}}=this.options,i=this.getHeight(),s=this.getMainOuterHeight();let o=s,a=0;if(n===Ut.CONTINUITY){t[0]=this.rowList,o+=this.rowList.reduce((e,t)=>e+t.height+(t.offsetY||0),0);const e=this.getPagePixelRatio(),n=this.pageList[0],r=Number(n.style.height.replace("px",""));if(o>r)n.style.height=o+"px",n.height=o*e;else{const t=o<i?i:o;n.style.height=t+"px",n.height=t*e}this._initPageContext(this.ctxList[0])}else for(let l=0;l<this.rowList.length;l++){const n=this.rowList[l],c=n.offsetY||0;if(n.height+c+o>i||(null==(e=this.rowList[l-1])?void 0:e.isPageBreak)){if(Number.isInteger(r)&&a>=r){this.elementList=this.elementList.slice(0,n.startIndex);break}o=s+n.height+c,t.push([n]),a++}else o+=n.height+c,t[a].push(n)}return t}_drawHighlight(e,t){var n;const{control:{activeBackgroundColor:r}}=this.options,{rowList:i,positionList:s}=t,o=null==(n=this.control.getActiveControl())?void 0:n.getElement();for(let a=0;a<i.length;a++){const t=i[a];for(let n=0;n<t.elementList.length;n++){const i=t.elementList[n],a=t.elementList[n-1];if(i.highlight||r&&o&&i.controlId===o.controlId&&!this.control.getIsRangeInPostfix()){a&&a.highlight&&a.highlight!==i.highlight&&this.highlight.render(e);const{coordinate:{leftTop:[o,l]}}=s[t.startIndex+n],c=i.left||0;this.highlight.recordFillInfo(e,o-c,l,i.metrics.width+c,t.height,i.highlight||r)}else(null==a?void 0:a.highlight)&&this.highlight.render(e)}this.highlight.render(e)}}drawRow(e,t){var n,r,i,s,o,a,l;this._drawHighlight(e,t);const{scale:c,table:{tdPadding:u},group:h,lineBreak:d}=this.options,{rowList:m,pageNo:g,elementList:p,positionList:R,startIndex:y,zone:S,isDrawLineBreak:b=!d.disabled}=t,w=this.mode===kt.PRINT,{isCrossRowCol:T,tableId:O}=this.range.getRange();let v=y;for(let E=0;E<m.length;E++){const t=m[E],d={x:0,y:0,width:0,height:0};let y=null;for(let m=0;m<t.elementList.length;m++){const O=t.elementList[m],E=O.metrics,{ascent:L,coordinate:{leftTop:[N,_]}}=R[t.startIndex+m],I=t.elementList[m-1];if(O.type===de.IMAGE)this.textParticle.complete(),O.imgDisplay!==f.SURROUND&&O.imgDisplay!==f.FLOAT_TOP&&O.imgDisplay!==f.FLOAT_BOTTOM&&this.imageParticle.render(e,O,N,_+L);else if(O.type===de.LATEX)this.textParticle.complete(),this.laTexParticle.render(e,O,N,_+L);else if(O.type===de.TABLE)T&&(d.x=N,d.y=_,y=O),this.tableParticle.render(e,O,N,_);else if(O.type===de.HYPERLINK)this.textParticle.complete(),this.hyperlinkParticle.render(e,O,N,_+L);else if(O.type===de.DATE){const n=t.elementList[m+1];I&&I.dateId===O.dateId||this.textParticle.complete(),this.textParticle.record(e,O,N,_+L),n&&n.dateId===O.dateId||this.textParticle.complete()}else O.type===de.SUPERSCRIPT?(this.textParticle.complete(),this.superscriptParticle.render(e,O,N,_+L)):O.type===de.SUBSCRIPT?(this.underline.render(e),this.textParticle.complete(),this.subscriptParticle.render(e,O,N,_+L)):O.type===de.SEPARATOR?this.separatorParticle.render(e,O,N,_):O.type===de.PAGE_BREAK?this.mode===kt.CLEAN||w||this.pageBreakParticle.render(e,O,N,_):O.type===de.CHECKBOX||O.controlComponent===dt.CHECKBOX?(this.textParticle.complete(),this.checkboxParticle.render({ctx:e,x:N,y:_+L,index:m,row:t})):O.type===de.RADIO||O.controlComponent===dt.RADIO?(this.textParticle.complete(),this.radioParticle.render({ctx:e,x:N,y:_+L,index:m,row:t})):O.type===de.TAB?this.textParticle.complete():O.rowFlex===C.ALIGNMENT||O.rowFlex===C.JUSTIFY?(this.textParticle.record(e,O,N,_+L),this.textParticle.complete()):O.type===de.BLOCK?(this.textParticle.complete(),this.blockParticle.render(g,O,N,_)):(O.left&&this.textParticle.complete(),this.textParticle.record(e,O,N,_+L),(O.width||O.letterSpacing||P.test(O.value))&&this.textParticle.complete());if(!b||w||this.mode===kt.CLEAN||t.isWidthNotEnough||m!==t.elementList.length-1||this.lineBreakParticle.render(e,O,N,_+t.height/2),null==(n=O.control)?void 0:n.border){(null==(r=null==I?void 0:I.control)?void 0:r.border)&&I.controlId!==O.controlId&&this.control.drawBorder(e);const n=this.getElementRowMargin(O);this.control.recordBorderInfo(N,_+n,O.metrics.width,t.height-2*n)}else(null==(i=null==I?void 0:I.control)?void 0:i.border)&&this.control.drawBorder(e);if(O.underline||(null==(s=O.control)?void 0:s.underline)){(null==I?void 0:I.type)===de.SUBSCRIPT&&O.type!==de.SUBSCRIPT&&this.underline.render(e);const n=this.getElementRowMargin(O),r=O.left||0;let i=0;O.type===de.SUBSCRIPT&&(i=this.subscriptParticle.getOffsetY(O));const s=(null==(o=O.control)?void 0:o.underline)?this.options.underlineColor:O.color;this.underline.recordFillInfo(e,N-r,_+t.height-n+i,E.width+r,0,s,null==(a=O.textDecoration)?void 0:a.style)}else((null==I?void 0:I.underline)||(null==(l=null==I?void 0:I.control)?void 0:l.underline))&&this.underline.render(e);if(O.strikeout){if(!O.type||ve.includes(O.type)){I&&(I.type===de.SUBSCRIPT&&O.type!==de.SUBSCRIPT||I.type===de.SUPERSCRIPT&&O.type!==de.SUPERSCRIPT||this.getElementSize(I)!==this.getElementSize(O))&&this.strikeout.render(e);const t=this.textParticle.measureBasisWord(e,this.getElementFont(O));let n=_+L+t.actualBoundingBoxDescent*c-E.height/2;O.type===de.SUBSCRIPT?n+=this.subscriptParticle.getOffsetY(O):O.type===de.SUPERSCRIPT&&(n+=this.superscriptParticle.getOffsetY(O)),this.strikeout.recordFillInfo(e,N,n,E.width)}}else(null==I?void 0:I.strikeout)&&this.strikeout.render(e);const{zone:x,startIndex:D,endIndex:A}=this.range.getRange();if(x===S&&D!==A&&D<=v&&v<=A){const e=this.position.getPositionContext();if(!e.isTable&&!O.tdId||e.tdId===O.tdId)if(D===v){const e=p[D+1];e&&e.value===M&&(d.x=N+E.width,d.y=_,d.height=t.height,d.width+=this.options.rangeMinWidth)}else{let e=E.width;0===e&&1===t.elementList.length&&(e=this.options.rangeMinWidth),d.width||(d.x=N,d.y=_,d.height=t.height),d.width+=e}}if(!h.disabled&&O.groupIds&&this.group.recordFillInfo(O,N,_,E.width,t.height),v++,O.type===de.TABLE){const t=u[1]+u[3];for(let n=0;n<O.trList.length;n++){const r=O.trList[n];for(let n=0;n<r.tdList.length;n++){const i=r.tdList[n];this.drawRow(e,{elementList:i.value,positionList:i.positionList,rowList:i.rowList,pageNo:g,startIndex:0,innerWidth:(i.width-t)*c,zone:S,isDrawLineBreak:b})}}}}if(t.isList&&this.listParticle.drawListStyle(e,t,R[t.startIndex]),this.textParticle.complete(),this.control.drawBorder(e),this.underline.render(e),this.strikeout.render(e),this.group.render(e),!w){if(d.width&&d.height){const{x:t,y:n,width:r,height:i}=d;this.range.render(e,t,n,r,i)}if(T&&y&&y.id===O){const{coordinate:{leftTop:[n,r]}}=R[t.startIndex];this.tableParticle.drawRange(e,y,n,r)}}}}_drawFloat(e,t){const{scale:n}=this.options,r=this.position.getFloatPositionList(),{imgDisplays:i,pageNo:s}=t;for(let o=0;o<r.length;o++){const t=r[o],a=t.element;if((s===t.pageNo||t.zone===Vt.HEADER||t.zone==Vt.FOOTER)&&a.imgDisplay&&i.includes(a.imgDisplay)&&a.type===de.IMAGE){const t=a.imgFloatPosition;this.imageParticle.render(e,a,t.x*n,t.y*n)}}}_clearPage(e){const t=this.ctxList[e],n=this.pageList[e];t.clearRect(0,0,Math.max(n.width,this.getWidth()),Math.max(n.height,this.getHeight())),this.blockParticle.clear()}_drawPage(e){var t,n;const{elementList:r,positionList:i,rowList:s,pageNo:o}=e,{inactiveAlpha:a,pageMode:l,header:c,footer:u,pageNumber:h,lineNumber:d,pageBorder:m}=this.options,g=this.mode===kt.PRINT,p=this.getInnerWidth(),R=this.ctxList[o];R.globalAlpha=this.zone.isMainActive()?1:a,this._clearPage(o),this.background.render(R,o),g||this.area.render(R,o),g||this.margin.render(R,o),this._drawFloat(R,{pageNo:o,imgDisplays:[f.FLOAT_BOTTOM]}),g||this.control.renderHighlightList(R,o);const y=null==(t=s[0])?void 0:t.startIndex;this.drawRow(R,{elementList:r,positionList:i,rowList:s,pageNo:o,startIndex:y,innerWidth:p,zone:Vt.MAIN}),this.getIsPagingMode()&&(c.disabled||this.header.render(R,o),h.disabled||this.pageNumber.render(R,o),u.disabled||this.footer.render(R,o)),this._drawFloat(R,{pageNo:o,imgDisplays:[f.FLOAT_TOP,f.SURROUND]}),!g&&this.search.getSearchKeyword()&&this.search.render(R,o),l!==Ut.CONTINUITY&&this.options.watermark.data&&this.waterMark.render(R),this.elementList.length<=1&&!(null==(n=this.elementList[0])?void 0:n.listId)&&this.placeholder.render(R),d.disabled||this.lineNumber.render(R,o),m.disabled||this.pageBorder.render(R),this.badge.render(R,o)}_disconnectLazyRender(){var e;null==(e=this.lazyRenderIntersectionObserver)||e.disconnect()}_lazyRender(){const e=this.position.getOriginalMainPositionList(),t=this.getOriginalMainElementList();this._disconnectLazyRender(),this.lazyRenderIntersectionObserver=new IntersectionObserver(n=>{n.forEach(n=>{if(n.isIntersecting){const r=Number(n.target.dataset.index);this._drawPage({elementList:t,positionList:e,rowList:this.pageRowList[r],pageNo:r})}})}),this.pageList.forEach(e=>{this.lazyRenderIntersectionObserver.observe(e)})}_immediateRender(){const e=this.position.getOriginalMainPositionList(),t=this.getOriginalMainElementList();for(let n=0;n<this.pageRowList.length;n++)this._drawPage({elementList:t,positionList:e,rowList:this.pageRowList[n],pageNo:n})}render(e){const{header:t,footer:n}=this.options,{isSubmitHistory:r=!0,isSetCursor:i=!0,isCompute:s=!0,isLazy:o=!0,isInit:a=!1,isSourceHistory:l=!1,isFirstRender:c=!1}=e||{};let{curIndex:u}=e||{};const h=this.getInnerWidth(),d=this.getIsPagingMode(),m=this.pageRowList.length;if(s){this.position.setFloatPositionList([]),d&&(t.disabled||this.header.compute(),n.disabled||this.footer.compute());const e=this.getMargins(),r=this.getHeight(),i=this.header.getExtraHeight(),s=this.getMainOuterHeight(),o=e[3],a=e[0]+i,l=pn(this.elementList);if(this.rowList=this.computeRowList({startX:o,startY:a,pageHeight:r,mainOuterHeight:s,isPagingMode:d,innerWidth:h,surroundElementList:l,elementList:this.elementList}),this.pageRowList=this._computePageList(),this.position.computePositionList(),this.area.compute(),this.mode!==kt.PRINT){const e=this.search.getSearchKeyword();e&&this.search.compute(e),this.control.computeHighlightList()}}this.imageObserver.clearAll(),this.cursor.recoveryCursor();for(let f=0;f<this.pageRowList.length;f++)this.pageList[f]||this._createPage(f);const g=this.pageRowList.length,p=this.pageList.length;if(p>g){const e=p-g;this.ctxList.splice(g,e),this.pageList.splice(g,e).forEach(e=>e.remove())}o&&d?this._lazyRender():this._immediateRender(),i?u=this.setCursor(u):this.range.getIsSelection()&&this.cursor.focus(),(r&&!c||void 0!==u&&this.historyManager.isStackEmpty())&&this.submitHistory(u),G(()=>{s&&this.control.getActiveControl()&&this.control.reAwakeControl(),s&&!this.isReadonly()&&this.position.getPositionContext().isTable&&this.tableTool.render(),s&&!this.zone.isMainActive()&&this.zone.drawZoneIndicator(),m!==this.pageRowList.length&&(this.listener.pageSizeChange&&this.listener.pageSizeChange(this.pageRowList.length),this.eventBus.isSubscribe("pageSizeChange")&&this.eventBus.emit("pageSizeChange",this.pageRowList.length)),!r&&!l||a||(this.listener.contentChange&&this.listener.contentChange(),this.eventBus.isSubscribe("contentChange")&&this.eventBus.emit("contentChange"))})}setCursor(e){var t;const n=this.position.getPositionContext(),r=this.position.getPositionList();if(n.isTable){const{index:r,trIndex:i,tdIndex:s}=n,o=this.getOriginalElementList(),a=null==(t=o[r].trList)?void 0:t[i].tdList[s].positionList;void 0===e&&a&&(e=a.length-1);const l=null==a?void 0:a[e];this.position.setCursorPosition(l||null)}else this.position.setCursorPosition(void 0!==e?r[e]:null);let i=!0;if(void 0!==e&&n.isImage&&n.isDirectHit){const t=this.getElementList(),n=t[e];if(Ee.includes(n.type)){i=!1;const e=this.position.getCursorPosition();this.previewer.updateResizer(n,e)}}return this.cursor.drawCursor({isShow:i}),e}submitHistory(e){const t=this.position.getPositionContext(),n=dn(this.elementList),r=dn(this.header.getElementList()),i=dn(this.footer.getElementList()),s=Y(this.range.getRange()),o=this.pageNo,a=Y(t),l=this.zone.getZone();this.historyManager.execute(()=>{this.zone.setZone(l),this.setPageNo(o),this.position.setPositionContext(Y(a)),this.header.setElementList(Y(r)),this.footer.setElementList(Y(i)),this.elementList=Y(n),this.range.replaceRange(Y(s)),this.render({curIndex:e,isSubmitHistory:!1,isSourceHistory:!0})})}destroy(){this.container.remove(),this.globalEvent.removeEvent(),this.scrollObserver.removeEvent(),this.selectionObserver.removeEvent()}clearSideEffect(){this.getPreviewer().clearResizer(),this.getTableTool().dispose(),this.getHyperlinkParticle().clearHyperlinkPopup(),this.getDateParticle().clearDatePicker()}}class es{constructor(e){d(this,"executeMode"),d(this,"executeCut"),d(this,"executeCopy"),d(this,"executePaste"),d(this,"executeSelectAll"),d(this,"executeBackspace"),d(this,"executeSetRange"),d(this,"executeReplaceRange"),d(this,"executeSetPositionContext"),d(this,"executeForceUpdate"),d(this,"executeBlur"),d(this,"executeUndo"),d(this,"executeRedo"),d(this,"executePainter"),d(this,"executeApplyPainterStyle"),d(this,"executeFormat"),d(this,"executeFont"),d(this,"executeSize"),d(this,"executeSizeAdd"),d(this,"executeSizeMinus"),d(this,"executeBold"),d(this,"executeItalic"),d(this,"executeUnderline"),d(this,"executeStrikeout"),d(this,"executeSuperscript"),d(this,"executeSubscript"),d(this,"executeColor"),d(this,"executeHighlight"),d(this,"executeTitle"),d(this,"executeList"),d(this,"executeRowFlex"),d(this,"executeRowMargin"),d(this,"executeInsertTable"),d(this,"executeInsertTableTopRow"),d(this,"executeInsertTableBottomRow"),d(this,"executeInsertTableLeftCol"),d(this,"executeInsertTableRightCol"),d(this,"executeDeleteTableRow"),d(this,"executeDeleteTableCol"),d(this,"executeDeleteTable"),d(this,"executeMergeTableCell"),d(this,"executeCancelMergeTableCell"),d(this,"executeTableTdVerticalAlign"),d(this,"executeTableBorderType"),d(this,"executeTableBorderColor"),d(this,"executeTableTdBorderType"),d(this,"executeTableTdSlashType"),d(this,"executeTableTdBackgroundColor"),d(this,"executeTableSelectAll"),d(this,"executeImage"),d(this,"executeHyperlink"),d(this,"executeDeleteHyperlink"),d(this,"executeCancelHyperlink"),d(this,"executeEditHyperlink"),d(this,"executeSeparator"),d(this,"executePageBreak"),d(this,"executeAddWatermark"),d(this,"executeDeleteWatermark"),d(this,"executeSearch"),d(this,"executeSearchNavigatePre"),d(this,"executeSearchNavigateNext"),d(this,"executeReplace"),d(this,"executePrint"),d(this,"executeReplaceImageElement"),d(this,"executeSaveAsImageElement"),d(this,"executeChangeImageDisplay"),d(this,"executePageMode"),d(this,"executePageScale"),d(this,"executePageScaleRecovery"),d(this,"executePageScaleMinus"),d(this,"executePageScaleAdd"),d(this,"executePaperSize"),d(this,"executePaperDirection"),d(this,"executeSetPaperMargin"),d(this,"executeSetMainBadge"),d(this,"executeSetAreaBadge"),d(this,"executeInsertElementList"),d(this,"executeInsertArea"),d(this,"executeSetAreaProperties"),d(this,"executeAppendElementList"),d(this,"executeUpdateElementById"),d(this,"executeSetValue"),d(this,"executeRemoveControl"),d(this,"executeSetLocale"),d(this,"executeLocationCatalog"),d(this,"executeWordTool"),d(this,"executeSetHTML"),d(this,"executeSetGroup"),d(this,"executeDeleteGroup"),d(this,"executeLocationGroup"),d(this,"executeSetZone"),d(this,"executeSetControlValue"),d(this,"executeSetControlExtension"),d(this,"executeSetControlProperties"),d(this,"executeSetControlHighlight"),d(this,"executeLocationControl"),d(this,"executeInsertControl"),d(this,"executeUpdateOptions"),d(this,"executeInsertTitle"),d(this,"executeFocus"),d(this,"getCatalog"),d(this,"getImage"),d(this,"getOptions"),d(this,"getValue"),d(this,"getAreaValue"),d(this,"getHTML"),d(this,"getText"),d(this,"getWordCount"),d(this,"getCursorPosition"),d(this,"getRange"),d(this,"getRangeText"),d(this,"getRangeContext"),d(this,"getRangeRow"),d(this,"getRangeParagraph"),d(this,"getKeywordRangeList"),d(this,"getKeywordContext"),d(this,"getPaperMargin"),d(this,"getSearchNavigateInfo"),d(this,"getLocale"),d(this,"getGroupIds"),d(this,"getControlValue"),d(this,"getControlList"),d(this,"getContainer"),d(this,"getTitleValue"),d(this,"getPositionContextByEvent"),d(this,"getElementById"),this.executeMode=e.mode.bind(e),this.executeCut=e.cut.bind(e),this.executeCopy=e.copy.bind(e),this.executePaste=e.paste.bind(e),this.executeSelectAll=e.selectAll.bind(e),this.executeBackspace=e.backspace.bind(e),this.executeSetRange=e.setRange.bind(e),this.executeReplaceRange=e.replaceRange.bind(e),this.executeSetPositionContext=e.setPositionContext.bind(e),this.executeForceUpdate=e.forceUpdate.bind(e),this.executeBlur=e.blur.bind(e),this.executeUndo=e.undo.bind(e),this.executeRedo=e.redo.bind(e),this.executePainter=e.painter.bind(e),this.executeApplyPainterStyle=e.applyPainterStyle.bind(e),this.executeFormat=e.format.bind(e),this.executeFont=e.font.bind(e),this.executeSize=e.size.bind(e),this.executeSizeAdd=e.sizeAdd.bind(e),this.executeSizeMinus=e.sizeMinus.bind(e),this.executeBold=e.bold.bind(e),this.executeItalic=e.italic.bind(e),this.executeUnderline=e.underline.bind(e),this.executeStrikeout=e.strikeout.bind(e),this.executeSuperscript=e.superscript.bind(e),this.executeSubscript=e.subscript.bind(e),this.executeColor=e.color.bind(e),this.executeHighlight=e.highlight.bind(e),this.executeTitle=e.title.bind(e),this.executeList=e.list.bind(e),this.executeRowFlex=e.rowFlex.bind(e),this.executeRowMargin=e.rowMargin.bind(e),this.executeInsertTable=e.insertTable.bind(e),this.executeInsertTableTopRow=e.insertTableTopRow.bind(e),this.executeInsertTableBottomRow=e.insertTableBottomRow.bind(e),this.executeInsertTableLeftCol=e.insertTableLeftCol.bind(e),this.executeInsertTableRightCol=e.insertTableRightCol.bind(e),this.executeDeleteTableRow=e.deleteTableRow.bind(e),this.executeDeleteTableCol=e.deleteTableCol.bind(e),this.executeDeleteTable=e.deleteTable.bind(e),this.executeMergeTableCell=e.mergeTableCell.bind(e),this.executeCancelMergeTableCell=e.cancelMergeTableCell.bind(e),this.executeTableTdVerticalAlign=e.tableTdVerticalAlign.bind(e),this.executeTableBorderType=e.tableBorderType.bind(e),this.executeTableBorderColor=e.tableBorderColor.bind(e),this.executeTableTdBorderType=e.tableTdBorderType.bind(e),this.executeTableTdSlashType=e.tableTdSlashType.bind(e),this.executeTableTdBackgroundColor=e.tableTdBackgroundColor.bind(e),this.executeTableSelectAll=e.tableSelectAll.bind(e),this.executeImage=e.image.bind(e),this.executeHyperlink=e.hyperlink.bind(e),this.executeDeleteHyperlink=e.deleteHyperlink.bind(e),this.executeCancelHyperlink=e.cancelHyperlink.bind(e),this.executeEditHyperlink=e.editHyperlink.bind(e),this.executeSeparator=e.separator.bind(e),this.executePageBreak=e.pageBreak.bind(e),this.executeAddWatermark=e.addWatermark.bind(e),this.executeDeleteWatermark=e.deleteWatermark.bind(e),this.executeSearch=e.search.bind(e),this.executeSearchNavigatePre=e.searchNavigatePre.bind(e),this.executeSearchNavigateNext=e.searchNavigateNext.bind(e),this.executeReplace=e.replace.bind(e),this.executePrint=e.print.bind(e),this.executeReplaceImageElement=e.replaceImageElement.bind(e),this.executeSaveAsImageElement=e.saveAsImageElement.bind(e),this.executeChangeImageDisplay=e.changeImageDisplay.bind(e),this.executePageMode=e.pageMode.bind(e),this.executePageScale=e.pageScale.bind(e),this.executePageScaleRecovery=e.pageScaleRecovery.bind(e),this.executePageScaleMinus=e.pageScaleMinus.bind(e),this.executePageScaleAdd=e.pageScaleAdd.bind(e),this.executePaperSize=e.paperSize.bind(e),this.executePaperDirection=e.paperDirection.bind(e),this.executeSetPaperMargin=e.setPaperMargin.bind(e),this.executeSetMainBadge=e.setMainBadge.bind(e),this.executeSetAreaBadge=e.setAreaBadge.bind(e),this.getAreaValue=e.getAreaValue.bind(e),this.executeInsertArea=e.insertArea.bind(e),this.executeSetAreaProperties=e.setAreaProperties.bind(e),this.executeInsertElementList=e.insertElementList.bind(e),this.executeAppendElementList=e.appendElementList.bind(e),this.executeUpdateElementById=e.updateElementById.bind(e),this.executeSetValue=e.setValue.bind(e),this.executeRemoveControl=e.removeControl.bind(e),this.executeSetLocale=e.setLocale.bind(e),this.executeLocationCatalog=e.locationCatalog.bind(e),this.executeWordTool=e.wordTool.bind(e),this.executeSetHTML=e.setHTML.bind(e),this.executeSetGroup=e.setGroup.bind(e),this.executeDeleteGroup=e.deleteGroup.bind(e),this.executeLocationGroup=e.locationGroup.bind(e),this.executeSetZone=e.setZone.bind(e),this.executeUpdateOptions=e.updateOptions.bind(e),this.executeInsertTitle=e.insertTitle.bind(e),this.executeFocus=e.focus.bind(e),this.getImage=e.getImage.bind(e),this.getOptions=e.getOptions.bind(e),this.getValue=e.getValue.bind(e),this.getHTML=e.getHTML.bind(e),this.getText=e.getText.bind(e),this.getWordCount=e.getWordCount.bind(e),this.getCursorPosition=e.getCursorPosition.bind(e),this.getRange=e.getRange.bind(e),this.getRangeText=e.getRangeText.bind(e),this.getRangeContext=e.getRangeContext.bind(e),this.getRangeRow=e.getRangeRow.bind(e),this.getRangeParagraph=e.getRangeParagraph.bind(e),this.getKeywordRangeList=e.getKeywordRangeList.bind(e),this.getKeywordContext=e.getKeywordContext.bind(e),this.getCatalog=e.getCatalog.bind(e),this.getPaperMargin=e.getPaperMargin.bind(e),this.getSearchNavigateInfo=e.getSearchNavigateInfo.bind(e),this.getLocale=e.getLocale.bind(e),this.getGroupIds=e.getGroupIds.bind(e),this.getContainer=e.getContainer.bind(e),this.getTitleValue=e.getTitleValue.bind(e),this.getPositionContextByEvent=e.getPositionContextByEvent.bind(e),this.getElementById=e.getElementById.bind(e),this.executeSetControlValue=e.setControlValue.bind(e),this.executeSetControlExtension=e.setControlExtension.bind(e),this.executeSetControlProperties=e.setControlProperties.bind(e),this.executeSetControlHighlight=e.setControlHighlight.bind(e),this.getControlValue=e.getControlValue.bind(e),this.getControlList=e.getControlList.bind(e),this.executeLocationControl=e.locationControl.bind(e),this.executeInsertControl=e.insertControl.bind(e)}}function ts(e,t){return 1125===e&&1593===t?{size:"a3",width:"297mm",height:"420mm"}:794===e&&1123===t?{size:"a4",width:"210mm",height:"297mm"}:565===e&&796===t?{size:"a5",width:"148mm",height:"210mm"}:{size:"",width:e+"px",height:t+"px"}}function ns(e,t){const{width:n,height:r,direction:i=Wt.VERTICAL}=t,s=document.createElement("iframe");s.style.visibility="hidden",s.style.position="absolute",s.style.left="0",s.style.top="0",s.style.width="0",s.style.height="0",s.style.border="none",document.body.append(s);const o=s.contentWindow,a=o.document;a.open();const l=document.createElement("div"),c=ts(n,r);e.forEach(e=>{const t=document.createElement("img");t.style.width=i===Wt.HORIZONTAL?c.height:c.width,t.style.height=i===Wt.HORIZONTAL?c.width:c.height,t.src=e,l.append(t)});const u=document.createElement("style"),h=`\n * {\n margin: 0;\n padding: 0;\n }\n @page {\n margin: 0;\n size: ${c.size} ${i===Wt.HORIZONTAL?"landscape":"portrait"};\n }`;u.append(document.createTextNode(h)),setTimeout(()=>{a.write(`${u.outerHTML}${l.innerHTML}`),o.print(),a.close(),window.addEventListener("mouseover",()=>{null==s||s.remove()},{once:!0})})}class rs{constructor(e){d(this,"draw"),d(this,"range"),d(this,"position"),d(this,"historyManager"),d(this,"canvasEvent"),d(this,"options"),d(this,"control"),d(this,"workerManager"),d(this,"searchManager"),d(this,"i18n"),d(this,"zone"),d(this,"tableOperate"),this.draw=e,this.range=e.getRange(),this.position=e.getPosition(),this.historyManager=e.getHistoryManager(),this.canvasEvent=e.getCanvasEvent(),this.options=e.getOptions(),this.control=e.getControl(),this.workerManager=e.getWorkerManager(),this.searchManager=e.getSearch(),this.i18n=e.getI18n(),this.zone=e.getZone(),this.tableOperate=e.getTableOperate()}mode(e){this.draw.setMode(e)}cut(){const e=this.draw.isReadonly()||this.draw.isDisabled();e||this.canvasEvent.cut()}copy(e){this.canvasEvent.copy(e)}paste(e){const t=this.draw.isReadonly()||this.draw.isDisabled();t||Cn(this.canvasEvent,e)}selectAll(){this.canvasEvent.selectAll()}backspace(){const e=this.draw.isReadonly()||this.draw.isDisabled();if(e)return;const t=this.draw.getElementList(),{startIndex:n,endIndex:r}=this.range.getRange(),i=n===r;if(i&&t[n].value===M&&0===n)return;i?this.draw.spliceElementList(t,n,1):this.draw.spliceElementList(t,n+1,r-n);const s=i?n-1:n;this.range.setRange(s,s),this.draw.render({curIndex:s})}setRange(e,t,n,r,i,s,o){if(e<0||t<0||t<e)return;this.range.setRange(e,t,n,r,i,s,o);const a=e===t;this.draw.render({curIndex:a?e:void 0,isCompute:!1,isSubmitHistory:!1,isSetCursor:a})}replaceRange(e){this.setRange(e.startIndex,e.endIndex,e.tableId,e.startTdIndex,e.endTdIndex,e.startTrIndex,e.endTrIndex)}setPositionContext(e){const{tableId:t,startTrIndex:n,startTdIndex:r}=e,i=this.draw.getOriginalElementList();if(t){const e=i.findIndex(e=>e.id===t);if(!~e)return;const s=i[e],o=s.trList[n],a=o.tdList[r];this.position.setPositionContext({isTable:!0,index:e,trIndex:n,tdIndex:r,tdId:a.id,trId:o.id,tableId:t})}else this.position.setPositionContext({isTable:!1})}forceUpdate(e){const{isSubmitHistory:t=!1}=e||{};this.range.clearRange(),this.draw.render({isSubmitHistory:t,isSetCursor:!1})}blur(){this.range.clearRange(),this.draw.getCursor().recoveryCursor()}undo(){const e=this.draw.isReadonly();e||this.historyManager.undo()}redo(){const e=this.draw.isReadonly();e||this.historyManager.redo()}painter(e){if(!e.isDblclick&&this.draw.getPainterStyle())return void this.canvasEvent.clearPainterStyle();const t=this.range.getSelection();if(!t)return;const n={};t.forEach(e=>{const t=me;t.forEach(t=>{const r=t;void 0===n[r]&&(n[r]=e[r])})}),this.draw.setPainterStyle(n,e)}applyPainterStyle(){const e=this.draw.isReadonly()||this.draw.isDisabled();e||this.canvasEvent.applyPainterStyle()}format(){const e=this.draw.isReadonly()||this.draw.isDisabled();if(e)return;const t=this.range.getSelectionElementList();let n={},r=[];if(null==t?void 0:t.length)r=t,n={isSetCursor:!1};else{const{endIndex:e}=this.range.getRange(),t=this.draw.getElementList(),i=t[e];(null==i?void 0:i.value)===M&&(r.push(i),n={curIndex:e})}r.length&&(r.forEach(e=>{me.forEach(t=>{delete e[t]})}),this.draw.render(n))}font(e){const t=this.draw.isReadonly()||this.draw.isDisabled();if(t)return;const n=this.range.getSelectionElementList();if(null==n?void 0:n.length)n.forEach(t=>{t.font=e}),this.draw.render({isSetCursor:!1});else{let t=!0;const{endIndex:n}=this.range.getRange(),r=this.draw.getElementList(),i=r[n];(null==i?void 0:i.value)===M?i.font=e:(this.range.setDefaultStyle({font:e}),t=!1),this.draw.render({isSubmitHistory:t,curIndex:n,isCompute:!1})}}size(e){const{minSize:t,maxSize:n,defaultSize:r}=this.options;if(e<t||e>n)return;const i=this.draw.isReadonly()||this.draw.isDisabled();if(i)return;let s={},o=[];const a=this.range.getTextLikeSelectionElementList();if(null==a?void 0:a.length)o=a,s={isSetCursor:!1};else{const{endIndex:t}=this.range.getRange(),n=this.draw.getElementList(),r=n[t];(null==r?void 0:r.value)===M?(o.push(r),s={curIndex:t}):(this.range.setDefaultStyle({size:e}),this.draw.render({curIndex:t,isCompute:!1,isSubmitHistory:!1}))}if(!o.length)return;let l=!1;o.forEach(t=>{!t.size&&e===r||t.size&&t.size===e||(t.size=e,l=!0)}),l&&this.draw.render(s)}sizeAdd(){const e=this.draw.isReadonly()||this.draw.isDisabled();if(e)return;const{defaultSize:t,maxSize:n}=this.options,r=this.range.getTextLikeSelectionElementList();let i={},s=[];if(null==r?void 0:r.length)s=r,i={isSetCursor:!1};else{const{endIndex:e}=this.range.getRange(),r=this.draw.getElementList(),o=r[e];if((null==o?void 0:o.value)===M)s.push(o),i={curIndex:e};else{const r=this.range.getDefaultStyle(),i=(null==r?void 0:r.size)||o.size||t;this.range.setDefaultStyle({size:i+2>n?n:i+2}),this.draw.render({curIndex:e,isCompute:!1,isSubmitHistory:!1})}}if(!s.length)return;let o=!1;s.forEach(e=>{e.size||(e.size=t),e.size>=n||(e.size+2>n?e.size=n:e.size+=2,o=!0)}),o&&this.draw.render(i)}sizeMinus(){const e=this.draw.isReadonly()||this.draw.isDisabled();if(e)return;const{defaultSize:t,minSize:n}=this.options,r=this.range.getTextLikeSelectionElementList();let i={},s=[];if(null==r?void 0:r.length)s=r,i={isSetCursor:!1};else{const{endIndex:e}=this.range.getRange(),r=this.draw.getElementList(),o=r[e];if((null==o?void 0:o.value)===M)s.push(o),i={curIndex:e};else{const r=this.range.getDefaultStyle(),i=(null==r?void 0:r.size)||o.size||t;this.range.setDefaultStyle({size:i-2<n?n:i-2}),this.draw.render({curIndex:e,isCompute:!1,isSubmitHistory:!1})}}if(!s.length)return;let o=!1;s.forEach(e=>{e.size||(e.size=t),e.size<=n||(e.size-2<n?e.size=n:e.size-=2,o=!0)}),o&&this.draw.render(i)}bold(){var e;const t=this.draw.isReadonly()||this.draw.isDisabled();if(t)return;const n=this.range.getSelectionElementList();if(null==n?void 0:n.length){const e=n.findIndex(e=>!e.bold);n.forEach(t=>{t.bold=!!~e}),this.draw.render({isSetCursor:!1})}else{let t=!0;const{endIndex:n}=this.range.getRange(),r=this.draw.getElementList(),i=r[n];(null==i?void 0:i.value)===M?i.bold=!i.bold:(this.range.setDefaultStyle({bold:!i.bold&&!(null==(e=this.range.getDefaultStyle())?void 0:e.bold)}),t=!1),this.draw.render({isSubmitHistory:t,curIndex:n,isCompute:!1})}}italic(){var e;const t=this.draw.isReadonly()||this.draw.isDisabled();if(t)return;const n=this.range.getSelectionElementList();if(null==n?void 0:n.length){const e=n.findIndex(e=>!e.italic);n.forEach(t=>{t.italic=!!~e}),this.draw.render({isSetCursor:!1})}else{let t=!0;const{endIndex:n}=this.range.getRange(),r=this.draw.getElementList(),i=r[n];(null==i?void 0:i.value)===M?i.italic=!i.italic:(this.range.setDefaultStyle({italic:!i.italic&&!(null==(e=this.range.getDefaultStyle())?void 0:e.italic)}),t=!1),this.draw.render({isSubmitHistory:t,curIndex:n,isCompute:!1})}}underline(e){var t;const n=this.draw.isReadonly()||this.draw.isDisabled();if(n)return;const r=this.range.getSelectionElementList();if(null==r?void 0:r.length){const t=r.some(t=>!t.underline||!e&&t.textDecoration||e&&!t.textDecoration||e&&t.textDecoration&&!ne(t.textDecoration,e));r.forEach(n=>{n.underline=t,t&&e?n.textDecoration=e:delete n.textDecoration}),this.draw.render({isSetCursor:!1,isCompute:!1})}else{let e=!0;const{endIndex:n}=this.range.getRange(),r=this.draw.getElementList(),i=r[n];(null==i?void 0:i.value)===M?i.underline=!i.underline:(this.range.setDefaultStyle({underline:!(null==i?void 0:i.underline)&&!(null==(t=this.range.getDefaultStyle())?void 0:t.underline)}),e=!1),this.draw.render({isSubmitHistory:e,curIndex:n,isCompute:!1})}}strikeout(){var e;const t=this.draw.isReadonly()||this.draw.isDisabled();if(t)return;const n=this.range.getSelectionElementList();if(null==n?void 0:n.length){const e=n.findIndex(e=>!e.strikeout);n.forEach(t=>{t.strikeout=!!~e}),this.draw.render({isSetCursor:!1,isCompute:!1})}else{let t=!0;const{endIndex:n}=this.range.getRange(),r=this.draw.getElementList(),i=r[n];(null==i?void 0:i.value)===M?i.strikeout=!i.strikeout:(this.range.setDefaultStyle({strikeout:!i.strikeout&&!(null==(e=this.range.getDefaultStyle())?void 0:e.strikeout)}),t=!1),this.draw.render({isSubmitHistory:t,curIndex:n,isCompute:!1})}}superscript(){const e=this.draw.isReadonly()||this.draw.isDisabled();if(e)return;const t=this.range.getSelectionElementList();if(!t)return;const n=t.findIndex(e=>e.type===de.SUPERSCRIPT);t.forEach(e=>{~n?e.type===de.SUPERSCRIPT&&(e.type=de.TEXT,delete e.actualSize):e.type&&e.type!==de.TEXT&&e.type!==de.SUBSCRIPT||(e.type=de.SUPERSCRIPT)}),this.draw.render({isSetCursor:!1})}subscript(){const e=this.draw.isReadonly()||this.draw.isDisabled();if(e)return;const t=this.range.getSelectionElementList();if(!t)return;const n=t.findIndex(e=>e.type===de.SUBSCRIPT);t.forEach(e=>{~n?e.type===de.SUBSCRIPT&&(e.type=de.TEXT,delete e.actualSize):e.type&&e.type!==de.TEXT&&e.type!==de.SUPERSCRIPT||(e.type=de.SUBSCRIPT)}),this.draw.render({isSetCursor:!1})}color(e){const t=this.draw.isReadonly()||this.draw.isDisabled();if(t)return;const n=this.range.getSelectionElementList();if(null==n?void 0:n.length)n.forEach(t=>{e?t.color=e:delete t.color}),this.draw.render({isSetCursor:!1,isCompute:!1});else{let t=!0;const{endIndex:n}=this.range.getRange(),r=this.draw.getElementList(),i=r[n];(null==i?void 0:i.value)===M?e?i.color=e:delete i.color:(this.range.setDefaultStyle({color:e||void 0}),t=!1),this.draw.render({isSubmitHistory:t,curIndex:n,isCompute:!1})}}highlight(e){const t=this.draw.isReadonly()||this.draw.isDisabled();if(t)return;const n=this.range.getSelectionElementList();if(null==n?void 0:n.length)n.forEach(t=>{e?t.highlight=e:delete t.highlight}),this.draw.render({isSetCursor:!1,isCompute:!1});else{let t=!0;const{endIndex:n}=this.range.getRange(),r=this.draw.getElementList(),i=r[n];(null==i?void 0:i.value)===M?e?i.highlight=e:delete i.highlight:(this.range.setDefaultStyle({highlight:e||void 0}),t=!1),this.draw.render({isSubmitHistory:t,curIndex:n,isCompute:!1})}}title(e){const t=this.draw.isReadonly()||this.draw.isDisabled();if(t)return;const{startIndex:n,endIndex:r}=this.range.getRange();if(!~n&&!~r)return;const i=this.draw.getElementList(),s=n===r?this.range.getRangeParagraphElementList():i.slice(n+1,r+1);if(!s||!s.length)return;const o=V(),a=this.draw.getOptions().title;s.forEach(t=>{(t.type||t.value!==M)&&(e?(t.level=e,t.titleId=o,tn(t)&&(t.size=a[lt[e]],t.bold=!0)):t.titleId&&(delete t.titleId,delete t.title,delete t.level,delete t.size,delete t.bold))});const l=n===r,c=l?r:n;this.draw.render({curIndex:c,isSetCursor:l})}list(e,t){const n=this.draw.isReadonly();n||this.draw.getListParticle().setList(e,t)}rowFlex(e){const t=this.draw.isReadonly();if(t)return;const{startIndex:n,endIndex:r}=this.range.getRange();if(!~n&&!~r)return;const i=this.range.getRangeRowElementList();if(!i)return;i.forEach(t=>{t.rowFlex=e});const s=n===r,o=s?r:n;this.draw.render({curIndex:o,isSetCursor:s})}rowMargin(e){const t=this.draw.isReadonly();if(t)return;const{startIndex:n,endIndex:r}=this.range.getRange();if(!~n&&!~r)return;const i=this.range.getRangeRowElementList();if(!i)return;i.forEach(t=>{t.rowMargin=e});const s=n===r,o=s?r:n;this.draw.render({curIndex:o,isSetCursor:s})}insertTable(e,t){const n=this.draw.isReadonly()||this.draw.isDisabled();if(n)return;const r=this.control.getActiveControl();r||this.tableOperate.insertTable(e,t)}insertTableTopRow(){const e=this.draw.isReadonly();e||this.tableOperate.insertTableTopRow()}insertTableBottomRow(){const e=this.draw.isReadonly();e||this.tableOperate.insertTableBottomRow()}insertTableLeftCol(){const e=this.draw.isReadonly();e||this.tableOperate.insertTableLeftCol()}insertTableRightCol(){const e=this.draw.isReadonly();e||this.tableOperate.insertTableRightCol()}deleteTableRow(){const e=this.draw.isReadonly();e||this.tableOperate.deleteTableRow()}deleteTableCol(){const e=this.draw.isReadonly();e||this.tableOperate.deleteTableCol()}deleteTable(){const e=this.draw.isReadonly();e||this.tableOperate.deleteTable()}mergeTableCell(){const e=this.draw.isReadonly();e||this.tableOperate.mergeTableCell()}cancelMergeTableCell(){const e=this.draw.isReadonly();e||this.tableOperate.cancelMergeTableCell()}tableTdVerticalAlign(e){const t=this.draw.isReadonly();t||this.tableOperate.tableTdVerticalAlign(e)}tableBorderType(e){const t=this.draw.isReadonly();t||this.tableOperate.tableBorderType(e)}tableBorderColor(e){const t=this.draw.isReadonly();t||this.tableOperate.tableBorderColor(e)}tableTdBorderType(e){const t=this.draw.isReadonly();t||this.tableOperate.tableTdBorderType(e)}tableTdSlashType(e){const t=this.draw.isReadonly();t||this.tableOperate.tableTdSlashType(e)}tableTdBackgroundColor(e){const t=this.draw.isReadonly();t||this.tableOperate.tableTdBackgroundColor(e)}tableSelectAll(){this.tableOperate.tableSelectAll()}hyperlink(e){const t=this.draw.isReadonly()||this.draw.isDisabled();if(t)return;const n=this.control.getActiveControl();if(n)return;const{startIndex:r,endIndex:i}=this.range.getRange();if(!~r&&!~i)return;const s=this.draw.getElementList(),{valueList:o,url:a}=e,l=V(),c=null==o?void 0:o.map(e=>({url:a,hyperlinkId:l,value:e.value,type:de.HYPERLINK}));if(!c)return;const u=r+1;rn(s,c,r,{editorOptions:this.options}),this.draw.spliceElementList(s,u,r===i?0:i-r,...c);const h=u+c.length-1;this.range.setRange(h,h),this.draw.render({curIndex:h})}getHyperlinkRange(){let e=-1,t=-1;const{startIndex:n,endIndex:r}=this.range.getRange();if(!~n&&!~r)return null;const i=this.draw.getElementList(),s=i[n];if(s.type!==de.HYPERLINK)return null;let o=n;while(o>0){const t=i[o];if(t.hyperlinkId!==s.hyperlinkId){e=o+1;break}o--}let a=n+1;while(a<i.length){const e=i[a];if(e.hyperlinkId!==s.hyperlinkId){t=a-1;break}a++}return a===i.length&&(t=a-1),~e&&~t?[e,t]:null}deleteHyperlink(){const e=this.draw.isReadonly()||this.draw.isDisabled();if(e)return;const t=this.getHyperlinkRange();if(!t)return;const n=this.draw.getElementList(),[r,i]=t;this.draw.spliceElementList(n,r,i-r+1),this.draw.getHyperlinkParticle().clearHyperlinkPopup();const s=r-1;this.range.setRange(s,s),this.draw.render({curIndex:s})}cancelHyperlink(){const e=this.draw.isReadonly()||this.draw.isDisabled();if(e)return;const t=this.getHyperlinkRange();if(!t)return;const n=this.draw.getElementList(),[r,i]=t;for(let o=r;o<=i;o++){const e=n[o];delete e.type,delete e.url,delete e.hyperlinkId,delete e.underline}this.draw.getHyperlinkParticle().clearHyperlinkPopup();const{endIndex:s}=this.range.getRange();this.draw.render({curIndex:s,isCompute:!1})}editHyperlink(e){const t=this.draw.isReadonly()||this.draw.isDisabled();if(t)return;const n=this.getHyperlinkRange();if(!n)return;const r=this.draw.getElementList(),[i,s]=n;for(let a=i;a<=s;a++){const t=r[a];t.url=e}this.draw.getHyperlinkParticle().clearHyperlinkPopup();const{endIndex:o}=this.range.getRange();this.draw.render({curIndex:o,isCompute:!1})}separator(e){const t=this.draw.isReadonly()||this.draw.isDisabled();if(t)return;const n=this.control.getActiveControl();if(n)return;const{startIndex:r,endIndex:i}=this.range.getRange();if(!~r&&!~i)return;const s=this.draw.getElementList();let o=-1;const a=s[i+1];if(a&&a.type===de.SEPARATOR){if(a.dashArray&&a.dashArray.join()===e.join())return;o=i,a.dashArray=e}else{const t={value:S,type:de.SEPARATOR,dashArray:e};rn(s,[t],r,{editorOptions:this.options}),0!==r&&s[r].value===M?(this.draw.spliceElementList(s,r,1,t),o=r-1):(this.draw.spliceElementList(s,r+1,0,t),o=r)}this.range.setRange(o,o),this.draw.render({curIndex:o})}pageBreak(){const e=this.draw.isReadonly()||this.draw.isDisabled();if(e)return;const t=this.control.getActiveControl();t||this.insertElementList([{type:de.PAGE_BREAK,value:S}])}addWatermark(e){const t=this.draw.isReadonly();if(t)return;const n=this.draw.getOptions(),{color:r,size:i,opacity:s,font:o,gap:a}=Pt;n.watermark.data=e.data,n.watermark.color=e.color||r,n.watermark.size=e.size||i,n.watermark.opacity=e.opacity||s,n.watermark.font=e.font||o,n.watermark.repeat=!!e.repeat,n.watermark.gap=e.gap||a,this.draw.render({isSetCursor:!1,isSubmitHistory:!1,isCompute:!1})}deleteWatermark(){const e=this.draw.isReadonly();if(e)return;const t=this.draw.getOptions();t.watermark&&t.watermark.data&&(t.watermark=u({},Pt),this.draw.render({isSetCursor:!1,isSubmitHistory:!1,isCompute:!1}))}image(e){const t=this.draw.isReadonly()||this.draw.isDisabled();if(t)return;const{startIndex:n,endIndex:r}=this.range.getRange();if(!~n&&!~r)return;const{value:i,width:s,height:o,imgDisplay:a}=e;this.insertElementList([{value:i,width:s,height:o,id:V(),type:de.IMAGE,imgDisplay:a}])}search(e){this.searchManager.setSearchKeyword(e),this.draw.render({isSetCursor:!1,isSubmitHistory:!1})}searchNavigatePre(){const e=this.searchManager.searchNavigatePre();null!==e&&this.draw.render({isSetCursor:!1,isSubmitHistory:!1,isCompute:!1,isLazy:!1})}searchNavigateNext(){const e=this.searchManager.searchNavigateNext();null!==e&&this.draw.render({isSetCursor:!1,isSubmitHistory:!1,isCompute:!1,isLazy:!1})}getSearchNavigateInfo(){return this.searchManager.getSearchNavigateInfo()}replace(e){const t=this.draw.isReadonly();if(t)return;if(!e||new RegExp(""+M,"g").test(e))return;const n=this.draw.getSearch().getSearchMatchList();if(!n.length)return;let r=0,i=0,s="",o="",a=-1;const l=this.draw.getOriginalElementList();for(let m=0;m<n.length;m++){const t=n[m];if(t.type===Ht.TABLE){const{tableIndex:n,trIndex:a,tdIndex:c,index:d,tdId:m}=t;o&&m!==o&&(i=0),o=m;const g=n+r,p=l[g].trList[a].tdList[c].value,f=d+i,R=p[f];if(s===t.groupId){this.draw.spliceElementList(p,f,1),i--;continue}for(let t=0;t<e.length;t++){const n=e[t];0===t?R.value=n:(this.draw.spliceElementList(p,f+t,0,h(u({},R),{value:n})),i++)}}else{const n=t.index+r,i=l[n];if(i.type===de.CONTROL&&i.controlComponent!==dt.VALUE)continue;if(~a||(a=m),s===t.groupId){this.draw.spliceElementList(l,n,1),r--;continue}for(let t=0;t<e.length;t++){const s=e[t];0===t?i.value=s:(this.draw.spliceElementList(l,n+t,0,h(u({},i),{value:s})),r++)}}s=t.groupId}if(!~a)return;const c=n[a],d=c.index+(e.length-1);if(c.type===Ht.TABLE){const{tableIndex:e,trIndex:t,tdIndex:n,index:r}=c,i=l[e].trList[t].tdList[n].value[r];this.position.setPositionContext({isTable:!0,index:e,trIndex:t,tdIndex:n,tdId:i.tdId,trId:i.trId,tableId:i.tableId})}else this.position.setPositionContext({isTable:!1});this.range.setRange(d,d),this.draw.render({curIndex:d})}async print(){const{scale:e,printPixelRatio:t,paperDirection:n,width:r,height:i}=this.options;1!==e&&this.draw.setPageScale(1);const s=await this.draw.getDataURL({pixelRatio:t,mode:kt.PRINT});ns(s,{width:r,height:i,direction:n}),1!==e&&this.draw.setPageScale(e)}replaceImageElement(e){const{startIndex:t}=this.range.getRange(),n=this.draw.getElementList(),r=n[t];r&&r.type===de.IMAGE&&(r.value=e,this.draw.render({isSetCursor:!1}))}saveAsImageElement(){const{startIndex:e}=this.range.getRange(),t=this.draw.getElementList(),n=t[e];n&&n.type===de.IMAGE&&W(n.value,n.id+".png")}changeImageDisplay(e,t){if(e.imgDisplay===t)return;e.imgDisplay=t;const{startIndex:n,endIndex:r}=this.range.getRange();if(t===f.SURROUND||t===f.FLOAT_TOP||t===f.FLOAT_BOTTOM){const t=this.position.getPositionList(),{pageNo:r,coordinate:{leftTop:i}}=t[n];e.imgFloatPosition={pageNo:r,x:i[0],y:i[1]}}else delete e.imgFloatPosition;this.draw.getPreviewer().clearResizer(),this.draw.render({isSetCursor:!0,curIndex:r})}getImage(e){return this.draw.getDataURL(e)}getOptions(){return this.options}getValue(e){return this.draw.getValue(e)}getAreaValue(e){return this.draw.getArea().getAreaValue(e)}getHTML(){const e=this.options,t=this.draw.getHeaderElementList(),n=this.draw.getOriginalMainElementList(),r=this.draw.getFooterElementList();return{header:ln(t,e).innerHTML,main:ln(n,e).innerHTML,footer:ln(r,e).innerHTML}}getText(){const e=this.draw.getHeaderElementList(),t=this.draw.getOriginalMainElementList(),n=this.draw.getFooterElementList();return{header:hn(e),main:hn(t),footer:hn(n)}}getWordCount(){return this.workerManager.getWordCount()}getCursorPosition(){return this.position.getCursorPosition()}getRange(){return Y(this.range.getRange())}getRangeText(){return this.range.toString()}getRangeContext(){const e=this.range.getRange(),{startIndex:t,endIndex:n}=e;if(!~t&&!~n)return null;const r=t===n,i=this.range.toString(),s=zt(this.range.getSelectionElementList()||[]),o=this.draw.getElementList(),a=Jt(o[r?t:t+1],{extraPickAttrs:["id"]}),l=Jt(o[n],{extraPickAttrs:["id"]}),c=this.position.getPositionList(),u=c[t].pageNo,h=c[n].pageNo,d=[],m=this.draw.getOriginalHeight(),g=this.draw.getOriginalPageGap(),p=this.position.getSelectionPositionList();if(p){let e=null,t=0,n=null;for(let r=0;r<p.length;r++){const{rowNo:i,pageNo:s,coordinate:{leftTop:o,rightTop:a},lineHeight:l}=p[r];null===e||e!==i?(n&&d.push(n),n={x:o[0],y:o[1]+s*(m+g),width:a[0]-o[0],height:l},e=i,t=o[0]):n.width=a[0]-t,r===p.length-1&&n&&d.push(n)}}else{const e=this.position.getPositionList(),t=e[n],{coordinate:{rightTop:r},pageNo:i,lineHeight:s}=t;d.push({x:r[0],y:r[1]+i*(m+g),width:0,height:s})}const f=this.draw.getZone().getZone(),{isTable:R,trIndex:y,tdIndex:M,index:S}=this.position.getPositionContext();let b=null;if(R){const e=this.draw.getOriginalElementList(),t=e[S]||null;t&&(b=zt([t])[0])}let w=null,T=null,O=t-1;while(O>0){const e=o[O],t=o[O-1];if(e.titleId&&e.titleId!==(null==t?void 0:t.titleId)){w=e.titleId,T=c[O].pageNo;break}O--}return Y({isCollapsed:r,startElement:a,endElement:l,startPageNo:u,endPageNo:h,rangeRects:d,zone:f,isTable:R,trIndex:null!=y?y:null,tdIndex:null!=M?M:null,tableElement:b,selectionText:i,selectionElementList:s,titleId:w,titleStartPageNo:T})}getRangeRow(){const e=this.range.getRangeRowElementList();return e?zt(e):null}getRangeParagraph(){const e=this.range.getRangeParagraphElementList();return e?zt(e):null}getKeywordRangeList(e){return this.range.getKeywordRangeList(e)}getKeywordContext(e){var t,n,r,i;const s=this.getKeywordRangeList(e);if(!s.length)return null;const o=[],a=this.position.getOriginalMainPositionList(),l=this.draw.getOriginalMainElementList();for(let c=0;c<s.length;c++){const e=s[c],{startIndex:u,endIndex:h,tableId:d,startTrIndex:m,startTdIndex:g}=e;let p=a;if(e.tableId){const e=l.find(e=>e.id===d);e&&(p=(null==(i=null==(r=null==(n=null==(t=e.trList)?void 0:t[m])?void 0:n.tdList)?void 0:r[g])?void 0:i.positionList)||[])}const f=Y(p[u]),R=Y(p[h]);o.push({range:e,startPosition:f,endPosition:R})}return o}pageMode(e){this.draw.setPageMode(e)}pageScale(e){e!==this.options.scale&&this.draw.setPageScale(e)}pageScaleRecovery(){const{scale:e}=this.options;1!==e&&this.draw.setPageScale(1)}pageScaleMinus(){const{scale:e}=this.options,t=10*e-1;t>=5&&this.draw.setPageScale(t/10)}pageScaleAdd(){const{scale:e}=this.options,t=10*e+1;t<=30&&this.draw.setPageScale(t/10)}paperSize(e,t){this.draw.setPaperSize(e,t)}paperDirection(e){this.draw.setPaperDirection(e)}getPaperMargin(){return this.options.margins}setPaperMargin(e){return this.draw.setPaperMargin(e)}setMainBadge(e){this.draw.getBadge().setMainBadge(e),this.draw.render({isCompute:!1,isSubmitHistory:!1})}setAreaBadge(e){this.draw.getBadge().setAreaBadgeMap(e),this.draw.render({isCompute:!1,isSubmitHistory:!1})}insertElementList(e){if(!e.length)return;const t=this.draw.isReadonly()||this.draw.isDisabled();if(t)return;const n=Y(e),{startIndex:r}=this.range.getRange(),i=this.draw.getElementList();rn(i,n,r,{isBreakWhenWrap:!0,editorOptions:this.options}),this.draw.insertElementList(n)}appendElementList(e,t){if(!e.length)return;const n=this.draw.isReadonly();n||this.draw.appendElementList(Y(e),t)}updateElementById(e){const{id:t,conceptId:n}=e;if(!t&&!n)return;function r(e){for(let r=0;r<e.length;r++){const i=e[r];if(t&&i.id===t||n&&i.conceptId===n)return r}return-1}const i=[this.draw.getOriginalMainElementList,this.draw.getHeaderElementList,this.draw.getFooterElementList];for(const s of i){const t=s.call(this.draw),n=r(t);if(~n){t[n]=u(u({},t[n]),e.properties),Gt(zt([t[n]]),{isHandleFirstElement:!1,editorOptions:this.options}),this.draw.render({isSetCursor:!1});break}}}getElementById(e){const{id:t,conceptId:n}=e,r=[];if(!t&&!n)return r;const i=e=>{let i=0;while(i<e.length){const s=e[i];i++,t&&s.controlId!==t||n&&s.conceptId!==n||r.push(s)}},s=[this.draw.getHeaderElementList(),this.draw.getOriginalMainElementList(),this.draw.getFooterElementList()];for(const o of s)i(o);return zt(r,{extraPickAttrs:["id"]})}setValue(e,t){this.draw.setValue(e,t)}removeControl(e){if((null==e?void 0:e.id)||(null==e?void 0:e.conceptId)){const{id:t,conceptId:n}=e;let r=!1;const i=e=>{let s=e.length-1;while(s>=0){const o=e[s];if(o.type===de.TABLE){const e=o.trList;for(let t=0;t<e.length;t++){const n=e[t];for(let e=0;e<n.tdList.length;e++){const t=n.tdList[e];i(t.value)}}}s--,!o.control||t&&o.controlId!==t||n&&o.control.conceptId!==n||(r=!0,e.splice(s+1,1))}},s=[this.draw.getHeaderElementList(),this.draw.getOriginalMainElementList(),this.draw.getFooterElementList()];for(const e of s)i(e);r&&this.draw.render({isSetCursor:!1})}else{const{startIndex:e,endIndex:t}=this.range.getRange();if(e!==t)return;const n=this.draw.getElementList(),r=n[e];if(!r.controlId)return;const i=this.draw.getControl(),s=i.removeControl(e);if(null===s)return;this.range.setRange(s,s),this.draw.render({curIndex:s})}}setLocale(e){this.i18n.setLocale(e)}getLocale(){return this.i18n.getLocale()}getCatalog(){return this.workerManager.getCatalog()}locationCatalog(e){var t;const n=this.draw.getOriginalMainElementList();let r=-1;for(let i=0;i<n.length;i++){const s=n[i];if(s.titleId===e&&(null==(t=n[i+1])?void 0:t.titleId)!==e){r=i;break}}~r&&(this.position.setPositionContext({isTable:!1}),this.range.setRange(r,r),this.draw.render({curIndex:r,isCompute:!1,isSubmitHistory:!1}))}wordTool(){const e=this.draw.getMainElementList();let t=!1;for(let n=0;n<e.length;n++){const r=e[n];if(r.value===M)while(n+1<e.length){const r=e[n+1];if(r.value!==M&&r.value!==b)break;e.splice(n+1,1),t=!0}}if(t)this.draw.render({isSetCursor:!1});else{const e=this.range.getIsCollapsed();this.draw.getCursor().drawCursor({isShow:e})}}setHTML(e){const{header:t,main:n,footer:r}=e,i=this.draw.getOriginalInnerWidth(),s=e=>void 0!==e?un(e,{innerWidth:i}):void 0;this.setValue({header:s(t),main:s(n),footer:s(r)})}setGroup(){const e=this.draw.isReadonly();return e?null:this.draw.getGroup().setGroup()}deleteGroup(e){const t=this.draw.isReadonly();t||this.draw.getGroup().deleteGroup(e)}getGroupIds(){return this.draw.getWorkerManager().getGroupIds()}locationGroup(e){const t=this.draw.getOriginalMainElementList(),n=this.draw.getGroup().getContextByGroupId(t,e);if(!n)return;const{isTable:r,index:i,trIndex:s,tdIndex:o,tdId:a,trId:l,tableId:c,endIndex:u}=n;this.position.setPositionContext({isTable:r,index:i,trIndex:s,tdIndex:o,tdId:a,trId:l,tableId:c}),this.range.setRange(u,u),this.draw.render({curIndex:u,isCompute:!1,isSubmitHistory:!1})}setZone(e){this.draw.getZone().setZone(e)}getControlValue(e){return this.draw.getControl().getValueById(e)}setControlValue(e){this.draw.getControl().setValueById(e)}setControlExtension(e){this.draw.getControl().setExtensionById(e)}setControlProperties(e){this.draw.getControl().setPropertiesById(e)}setControlHighlight(e){this.draw.getControl().setHighlightList(e),this.draw.render({isSubmitHistory:!1})}updateOptions(e){const t=Qt(e);Object.entries(t).forEach(([e,t])=>{Reflect.set(this.options,e,t)}),this.forceUpdate()}getControlList(){return this.draw.getControl().getList()}locationControl(e,t){const n=(null==t?void 0:t.position)===R.AFTER;function r(t,i){var s,o;let a=0;while(a<t.length){const l=t[a];if(a++,l.type===de.TABLE){const e=l.trList;for(let t=0;t<e.length;t++){const n=e[t];for(let e=0;e<n.tdList.length;e++){const s=n.tdList[e],o=r(s.value,i);if(o)return h(u({},o),{positionContext:{isTable:!0,index:a-1,trIndex:t,tdIndex:e,tdId:l.tdId,trId:l.trId,tableId:l.tableId}})}}}if((null==l?void 0:l.controlId)!==e)continue;let c=a-1;if(n){if(c-=1,l.controlComponent!==dt.PLACEHOLDER&&l.controlComponent!==dt.POSTFIX&&l.controlComponent!==dt.POST_TEXT)continue}else if(l.controlComponent!==dt.PREFIX&&l.controlComponent!==dt.PRE_TEXT||(null==(s=t[a])?void 0:s.controlComponent)===dt.PREFIX||(null==(o=t[a])?void 0:o.controlComponent)===dt.PRE_TEXT)continue;return{zone:i,range:{startIndex:c,endIndex:c},positionContext:{isTable:!1}}}return null}const i=[{zone:Vt.HEADER,elementList:this.draw.getHeaderElementList()},{zone:Vt.MAIN,elementList:this.draw.getOriginalMainElementList()},{zone:Vt.FOOTER,elementList:this.draw.getFooterElementList()}];for(const s of i){const e=r(s.elementList,s.zone);if(e){this.setZone(e.zone),this.position.setPositionContext(e.positionContext),this.range.replaceRange(e.range),this.draw.render({curIndex:e.range.startIndex,isCompute:!1,isSubmitHistory:!1});break}}}insertControl(e){const t=this.draw.isReadonly()||this.draw.isDisabled();if(t)return;const n=Y(e),{startIndex:r}=this.range.getRange(),i=this.draw.getElementList(),s=nn(i,r);if(!s)return;const o=[...ye,...ge,...Se,...Te];J(o,s,n),this.draw.insertElementList([n])}getContainer(){return this.draw.getContainer()}getTitleValue(e){const{conceptId:t}=e,n=[],r=(e,i)=>{var s;let o=0;while(o<e.length){const a=e[o];if(o++,a.type===de.TABLE){const e=a.trList;for(let t=0;t<e.length;t++){const n=e[t];for(let e=0;e<n.tdList.length;e++){const t=n.tdList[e];r(t.value,i)}}}if((null==(s=null==a?void 0:a.title)?void 0:s.conceptId)!==t)continue;const l=[];let c=o;while(c<e.length){const t=e[c];if(c++,a.titleId!==t.titleId){if(t.level&&ct[t.level]<=ct[a.level])break;l.push(t)}}n.push(h(u({},a.title),{value:hn(l),elementList:zt(l),zone:i})),o=c}},i=[{zone:Vt.HEADER,elementList:this.draw.getHeaderElementList()},{zone:Vt.MAIN,elementList:this.draw.getOriginalMainElementList()},{zone:Vt.FOOTER,elementList:this.draw.getFooterElementList()}];for(const{zone:s,elementList:o}of i)r(o,s);return n}getPositionContextByEvent(e){var t,n,r;const i=null==(t=e.target)?void 0:t.dataset.index;if(!i)return null;const s=Number(i),o=this.position.getPositionByXY({x:e.offsetX,y:e.offsetY,pageNo:s}),{isDirectHit:a,isTable:l,index:c,trIndex:u,tdIndex:h,tdValueIndex:d,zone:m}=o;if(!a||m&&m!==this.zone.getZone())return null;let g=null;const p=this.draw.getOriginalElementList();let f=null;const R=this.position.getOriginalPositionList();if(l){const e=null==(n=p[c].trList)?void 0:n[u].tdList[h];g=(null==e?void 0:e.value[d])||null,f=(null==(r=null==e?void 0:e.positionList)?void 0:r[d])||null}else g=p[c]||null,f=R[c]||null;let y=null;if(f){const{pageNo:e,coordinate:{leftTop:t,rightTop:n},lineHeight:r}=f,i=this.draw.getOriginalHeight(),s=this.draw.getOriginalPageGap();y={x:t[0],y:t[1]+e*(i+s),width:n[0]-t[0],height:r}}return{pageNo:s,element:g,rangeRect:y}}insertTitle(e){var t;const n=this.draw.isReadonly()||this.draw.isDisabled();if(n)return;const r=Y(e),{startIndex:i}=this.range.getRange(),s=this.draw.getElementList(),o=nn(s,i);if(!o)return;const a=[...ye,...ge,...Se,...Te];null==(t=r.valueList)||t.forEach(e=>{J(a,o,e)}),this.draw.insertElementList([r])}focus(e){const{position:t=R.AFTER}=e||{},n=t===R.BEFORE?0:this.draw.getOriginalMainElementList().length-1;this.range.setRange(n,n),this.draw.render({curIndex:n,isCompute:!1,isSubmitHistory:!1});const r=this.draw.getPosition().getPositionList();this.draw.getCursor().moveCursorToVisible({cursorPosition:r[n],direction:he.DOWN})}insertArea(e){return this.draw.getArea().insertArea(e)}setAreaProperties(e){this.draw.getArea().setAreaProperties(e)}}class is{constructor(){d(this,"rangeStyleChange"),d(this,"visiblePageNoListChange"),d(this,"intersectionPageNoChange"),d(this,"pageSizeChange"),d(this,"pageScaleChange"),d(this,"saved"),d(this,"contentChange"),d(this,"controlChange"),d(this,"pageModeChange"),d(this,"zoneChange"),this.rangeStyleChange=null,this.visiblePageNoListChange=null,this.intersectionPageNoChange=null,this.pageSizeChange=null,this.pageScaleChange=null,this.saved=null,this.contentChange=null,this.controlChange=null,this.pageModeChange=null,this.zoneChange=null}}class ss{constructor(e){d(this,"contextMenuList"),d(this,"getContextMenuList"),d(this,"shortcutList"),d(this,"langMap");const{contextMenu:t,shortcut:n,i18n:r}=e;this.contextMenuList=t.registerContextMenuList.bind(t),this.getContextMenuList=t.getContextMenuList.bind(t),this.shortcutList=n.registerShortcutList.bind(n),this.langMap=r.registerLangMap.bind(r)}}const os={SELECTED_TEXT:"%s"},as={GLOBAL:{CUT:"globalCut",COPY:"globalCopy",PASTE:"globalPaste",SELECT_ALL:"globalSelectAll",PRINT:"globalPrint"},CONTROL:{DELETE:"controlDelete"},HYPERLINK:{DELETE:"hyperlinkDelete",CANCEL:"hyperlinkCancel",EDIT:"hyperlinkEdit"},IMAGE:{CHANGE:"imageChange",SAVE_AS:"imageSaveAs",TEXT_WRAP:"imageTextWrap",TEXT_WRAP_EMBED:"imageTextWrapEmbed",TEXT_WRAP_UP_DOWN:"imageTextWrapUpDown",TEXT_WRAP_SURROUND:"imageTextWrapSurround",TEXT_WRAP_FLOAT_TOP:"imageTextWrapFloatTop",TEXT_WRAP_FLOAT_BOTTOM:"imageTextWrapFloatBottom"},TABLE:{BORDER:"border",BORDER_ALL:"tableBorderAll",BORDER_EMPTY:"tableBorderEmpty",BORDER_DASH:"tableBorderDash",BORDER_EXTERNAL:"tableBorderExternal",BORDER_INTERNAL:"tableBorderInternal",BORDER_TD:"tableBorderTd",BORDER_TD_TOP:"tableBorderTdTop",BORDER_TD_RIGHT:"tableBorderTdRight",BORDER_TD_BOTTOM:"tableBorderTdBottom",BORDER_TD_LEFT:"tableBorderTdLeft",BORDER_TD_FORWARD:"tableBorderTdForward",BORDER_TD_BACK:"tableBorderTdBack",VERTICAL_ALIGN:"tableVerticalAlign",VERTICAL_ALIGN_TOP:"tableVerticalAlignTop",VERTICAL_ALIGN_MIDDLE:"tableVerticalAlignMiddle",VERTICAL_ALIGN_BOTTOM:"tableVerticalAlignBottom",INSERT_ROW_COL:"tableInsertRowCol",INSERT_TOP_ROW:"tableInsertTopRow",INSERT_BOTTOM_ROW:"tableInsertBottomRow",INSERT_LEFT_COL:"tableInsertLeftCol",INSERT_RIGHT_COL:"tableInsertRightCol",DELETE_ROW_COL:"tableDeleteRowCol",DELETE_ROW:"tableDeleteRow",DELETE_COL:"tableDeleteCol",DELETE_TABLE:"tableDeleteTable",MERGE_CELL:"tableMergeCell",CANCEL_MERGE_CELL:"tableCancelMergeCell"}},{CONTROL:{DELETE:ls}}=as,cs=[{key:ls,i18nPath:"contextmenu.control.delete",when:e=>{var t;return!e.isReadonly&&!e.editorHasSelection&&!!(null==(t=e.startElement)?void 0:t.controlId)&&e.options.mode!==kt.FORM},callback:e=>{e.executeRemoveControl()}}],{GLOBAL:{CUT:us,COPY:hs,PASTE:ds,SELECT_ALL:ms,PRINT:gs}}=as,ps=[{key:us,i18nPath:"contextmenu.global.cut",shortCut:(In?"⌘":"Ctrl")+" + X",when:e=>!e.isReadonly,callback:e=>{e.executeCut()}},{key:hs,i18nPath:"contextmenu.global.copy",shortCut:(In?"⌘":"Ctrl")+" + C",when:e=>e.editorHasSelection||e.isCrossRowCol,callback:e=>{e.executeCopy()}},{key:ds,i18nPath:"contextmenu.global.paste",shortCut:(In?"⌘":"Ctrl")+" + V",when:e=>!e.isReadonly&&e.editorTextFocus,callback:e=>{e.executePaste()}},{key:ms,i18nPath:"contextmenu.global.selectAll",shortCut:(In?"⌘":"Ctrl")+" + A",when:e=>e.editorTextFocus,callback:e=>{e.executeSelectAll()}},{isDivider:!0},{key:gs,i18nPath:"contextmenu.global.print",icon:"print",when:()=>!0,callback:e=>{e.executePrint()}}],{HYPERLINK:{DELETE:fs,CANCEL:Rs,EDIT:ys}}=as,Ms=[{key:fs,i18nPath:"contextmenu.hyperlink.delete",when:e=>{var t;return!e.isReadonly&&(null==(t=e.startElement)?void 0:t.type)===de.HYPERLINK},callback:e=>{e.executeDeleteHyperlink()}},{key:Rs,i18nPath:"contextmenu.hyperlink.cancel",when:e=>{var t;return!e.isReadonly&&(null==(t=e.startElement)?void 0:t.type)===de.HYPERLINK},callback:e=>{e.executeCancelHyperlink()}},{key:ys,i18nPath:"contextmenu.hyperlink.edit",when:e=>{var t;return!e.isReadonly&&(null==(t=e.startElement)?void 0:t.type)===de.HYPERLINK},callback:(e,t)=>{var n;const r=window.prompt("编辑链接",null==(n=t.startElement)?void 0:n.url);r&&e.executeEditHyperlink(r)}}],{IMAGE:{CHANGE:Ss,SAVE_AS:bs,TEXT_WRAP:ws,TEXT_WRAP_EMBED:Ts,TEXT_WRAP_UP_DOWN:Os,TEXT_WRAP_SURROUND:vs,TEXT_WRAP_FLOAT_TOP:Es,TEXT_WRAP_FLOAT_BOTTOM:Cs}}=as,Ls=[{key:Ss,i18nPath:"contextmenu.image.change",icon:"image-change",when:e=>{var t;return!e.isReadonly&&!e.editorHasSelection&&(null==(t=e.startElement)?void 0:t.type)===de.IMAGE},callback:e=>{const t=document.createElement("input");t.type="file",t.accept=".png, .jpg, .jpeg",t.onchange=()=>{const n=t.files[0],r=new FileReader;r.readAsDataURL(n),r.onload=()=>{const t=r.result;e.executeReplaceImageElement(t)}},t.click()}},{key:bs,i18nPath:"contextmenu.image.saveAs",icon:"image",when:e=>{var t;return!e.editorHasSelection&&(null==(t=e.startElement)?void 0:t.type)===de.IMAGE},callback:e=>{e.executeSaveAsImageElement()}},{key:ws,i18nPath:"contextmenu.image.textWrap",when:e=>{var t;return!e.isReadonly&&!e.editorHasSelection&&(null==(t=e.startElement)?void 0:t.type)===de.IMAGE},childMenus:[{key:Ts,i18nPath:"contextmenu.image.textWrapType.embed",when:()=>!0,callback:(e,t)=>{e.executeChangeImageDisplay(t.startElement,f.BLOCK)}},{key:Os,i18nPath:"contextmenu.image.textWrapType.upDown",when:()=>!0,callback:(e,t)=>{e.executeChangeImageDisplay(t.startElement,f.INLINE)}},{key:vs,i18nPath:"contextmenu.image.textWrapType.surround",when:()=>!0,callback:(e,t)=>{e.executeChangeImageDisplay(t.startElement,f.SURROUND)}},{key:Es,i18nPath:"contextmenu.image.textWrapType.floatTop",when:()=>!0,callback:(e,t)=>{e.executeChangeImageDisplay(t.startElement,f.FLOAT_TOP)}},{key:Cs,i18nPath:"contextmenu.image.textWrapType.floatBottom",when:()=>!0,callback:(e,t)=>{e.executeChangeImageDisplay(t.startElement,f.FLOAT_BOTTOM)}}]}],{TABLE:{BORDER:Ns,BORDER_ALL:_s,BORDER_EMPTY:Is,BORDER_DASH:Ps,BORDER_EXTERNAL:xs,BORDER_INTERNAL:Ds,BORDER_TD:As,BORDER_TD_TOP:Fs,BORDER_TD_LEFT:Ys,BORDER_TD_BOTTOM:Hs,BORDER_TD_RIGHT:ks,BORDER_TD_BACK:Vs,BORDER_TD_FORWARD:Us,VERTICAL_ALIGN:Ws,VERTICAL_ALIGN_TOP:Xs,VERTICAL_ALIGN_MIDDLE:js,VERTICAL_ALIGN_BOTTOM:Zs,INSERT_ROW_COL:Qs,INSERT_TOP_ROW:Ks,INSERT_BOTTOM_ROW:Gs,INSERT_LEFT_COL:Bs,INSERT_RIGHT_COL:Js,DELETE_ROW_COL:zs,DELETE_ROW:$s,DELETE_COL:qs,DELETE_TABLE:eo,MERGE_CELL:to,CANCEL_MERGE_CELL:no}}=as,ro=[{isDivider:!0},{key:Ns,i18nPath:"contextmenu.table.border",icon:"border-all",when:e=>!e.isReadonly&&e.isInTable&&e.options.mode!==kt.FORM,childMenus:[{key:_s,i18nPath:"contextmenu.table.borderAll",icon:"border-all",when:()=>!0,callback:e=>{e.executeTableBorderType(yr.ALL)}},{key:Is,i18nPath:"contextmenu.table.borderEmpty",icon:"border-empty",when:()=>!0,callback:e=>{e.executeTableBorderType(yr.EMPTY)}},{key:Ps,i18nPath:"contextmenu.table.borderDash",icon:"border-dash",when:()=>!0,callback:e=>{e.executeTableBorderType(yr.DASH)}},{key:xs,i18nPath:"contextmenu.table.borderExternal",icon:"border-external",when:()=>!0,callback:e=>{e.executeTableBorderType(yr.EXTERNAL)}},{key:Ds,i18nPath:"contextmenu.table.borderInternal",icon:"border-internal",when:()=>!0,callback:e=>{e.executeTableBorderType(yr.INTERNAL)}},{key:As,i18nPath:"contextmenu.table.borderTd",icon:"border-td",when:()=>!0,childMenus:[{key:Fs,i18nPath:"contextmenu.table.borderTdTop",icon:"border-td-top",when:()=>!0,callback:e=>{e.executeTableTdBorderType(Mr.TOP)}},{key:ks,i18nPath:"contextmenu.table.borderTdRight",icon:"border-td-right",when:()=>!0,callback:e=>{e.executeTableTdBorderType(Mr.RIGHT)}},{key:Hs,i18nPath:"contextmenu.table.borderTdBottom",icon:"border-td-bottom",when:()=>!0,callback:e=>{e.executeTableTdBorderType(Mr.BOTTOM)}},{key:Ys,i18nPath:"contextmenu.table.borderTdLeft",icon:"border-td-left",when:()=>!0,callback:e=>{e.executeTableTdBorderType(Mr.LEFT)}},{key:Us,i18nPath:"contextmenu.table.borderTdForward",icon:"border-td-forward",when:()=>!0,callback:e=>{e.executeTableTdSlashType(Sr.FORWARD)}},{key:Vs,i18nPath:"contextmenu.table.borderTdBack",icon:"border-td-back",when:()=>!0,callback:e=>{e.executeTableTdSlashType(Sr.BACK)}}]}]},{key:Ws,i18nPath:"contextmenu.table.verticalAlign",icon:"vertical-align",when:e=>!e.isReadonly&&e.isInTable&&e.options.mode!==kt.FORM,childMenus:[{key:Xs,i18nPath:"contextmenu.table.verticalAlignTop",icon:"vertical-align-top",when:()=>!0,callback:e=>{e.executeTableTdVerticalAlign(yt.TOP)}},{key:js,i18nPath:"contextmenu.table.verticalAlignMiddle",icon:"vertical-align-middle",when:()=>!0,callback:e=>{e.executeTableTdVerticalAlign(yt.MIDDLE)}},{key:Zs,i18nPath:"contextmenu.table.verticalAlignBottom",icon:"vertical-align-bottom",when:()=>!0,callback:e=>{e.executeTableTdVerticalAlign(yt.BOTTOM)}}]},{key:Qs,i18nPath:"contextmenu.table.insertRowCol",icon:"insert-row-col",when:e=>!e.isReadonly&&e.isInTable&&e.options.mode!==kt.FORM,childMenus:[{key:Ks,i18nPath:"contextmenu.table.insertTopRow",icon:"insert-top-row",when:()=>!0,callback:e=>{e.executeInsertTableTopRow()}},{key:Gs,i18nPath:"contextmenu.table.insertBottomRow",icon:"insert-bottom-row",when:()=>!0,callback:e=>{e.executeInsertTableBottomRow()}},{key:Bs,i18nPath:"contextmenu.table.insertLeftCol",icon:"insert-left-col",when:()=>!0,callback:e=>{e.executeInsertTableLeftCol()}},{key:Js,i18nPath:"contextmenu.table.insertRightCol",icon:"insert-right-col",when:()=>!0,callback:e=>{e.executeInsertTableRightCol()}}]},{key:zs,i18nPath:"contextmenu.table.deleteRowCol",icon:"delete-row-col",when:e=>!e.isReadonly&&e.isInTable&&e.options.mode!==kt.FORM,childMenus:[{key:$s,i18nPath:"contextmenu.table.deleteRow",icon:"delete-row",when:()=>!0,callback:e=>{e.executeDeleteTableRow()}},{key:qs,i18nPath:"contextmenu.table.deleteCol",icon:"delete-col",when:()=>!0,callback:e=>{e.executeDeleteTableCol()}},{key:eo,i18nPath:"contextmenu.table.deleteTable",icon:"delete-table",when:()=>!0,callback:e=>{e.executeDeleteTable()}}]},{key:to,i18nPath:"contextmenu.table.mergeCell",icon:"merge-cell",when:e=>!e.isReadonly&&e.isCrossRowCol&&e.options.mode!==kt.FORM,callback:e=>{e.executeMergeTableCell()}},{key:no,i18nPath:"contextmenu.table.mergeCancelCell",icon:"merge-cancel-cell",when:e=>!e.isReadonly&&e.isInTable&&e.options.mode!==kt.FORM,callback:e=>{e.executeCancelMergeTableCell()}}];class io{constructor(e,t){d(this,"options"),d(this,"draw"),d(this,"command"),d(this,"range"),d(this,"position"),d(this,"i18n"),d(this,"container"),d(this,"contextMenuList"),d(this,"contextMenuContainerList"),d(this,"contextMenuRelationShip"),d(this,"context"),d(this,"_proxyContextMenuEvent",e=>{this.context=this._getContext();const t=this._filterMenuList(this.contextMenuList),n=t.some(e=>!e.isDivider);n&&(this.dispose(),this._render({contextMenuList:t,left:e.x,top:e.y})),e.preventDefault()}),d(this,"_handleSideEffect",e=>{if(this.contextMenuContainerList.length){const t=(null==e?void 0:e.composedPath()[0])||e.target,n=k(t,e=>!!e&&1===e.nodeType&&e.getAttribute(le)===Yt.CONTEXTMENU,!0);n||this.dispose()}}),this.options=e.getOptions(),this.draw=e,this.command=t,this.range=e.getRange(),this.position=e.getPosition(),this.i18n=e.getI18n(),this.container=e.getContainer(),this.context=null,this.contextMenuList=[...ps,...ro,...Ls,...cs,...Ms],this.contextMenuContainerList=[],this.contextMenuRelationShip=new Map,this._addEvent()}getContextMenuList(){return this.contextMenuList}_addEvent(){this.container.addEventListener("contextmenu",this._proxyContextMenuEvent),document.addEventListener("mousedown",this._handleSideEffect)}removeEvent(){this.container.removeEventListener("contextmenu",this._proxyContextMenuEvent),document.removeEventListener("mousedown",this._handleSideEffect)}_filterMenuList(e){var t;const{contextMenuDisableKeys:n}=this.options,r=[];for(let i=0;i<e.length;i++){const s=e[i];s.disable||s.key&&n.includes(s.key)||(s.isDivider||(null==(t=s.when)?void 0:t.call(s,this.context)))&&r.push(s)}return r}_getContext(){const e=this.draw.isReadonly(),{isCrossRowCol:t,startIndex:n,endIndex:r}=this.range.getRange(),i=!(!~n&&!~r),s=i&&n!==r,{isTable:o,trIndex:a,tdIndex:l,index:c}=this.position.getPositionContext();let u=null;if(o){const e=this.draw.getOriginalElementList(),t=e[c]||null;t&&(u=zt([t],{extraPickAttrs:["id"]})[0])}const h=o&&!!t,d=this.draw.getElementList(),m=d[n]||null,g=d[r]||null,p=this.draw.getZone().getZone();return{startElement:m,endElement:g,isReadonly:e,editorHasSelection:s,editorTextFocus:i,isCrossRowCol:h,zone:p,isInTable:o,trIndex:null!=a?a:null,tdIndex:null!=l?l:null,tableElement:u,options:this.options}}_createContextMenuContainer(){const e=document.createElement("div");return e.classList.add(ce+"-contextmenu-container"),e.setAttribute(le,Yt.CONTEXTMENU),this.container.append(e),e}_render(e){var t;const{contextMenuList:n,left:r,top:i,parentMenuContainer:s}=e,o=this._createContextMenuContainer(),a=document.createElement("div");a.classList.add(ce+"-contextmenu-content");let l=null;s&&this.contextMenuRelationShip.set(s,o);for(let f=0;f<n.length;f++){const e=n[f];if(e.isDivider){if(0!==f&&f!==n.length-1&&!(null==(t=n[f-1])?void 0:t.isDivider)){const e=document.createElement("div");e.classList.add(ce+"-contextmenu-divider"),a.append(e)}}else{const t=document.createElement("div");if(t.classList.add(ce+"-contextmenu-item"),e.childMenus){const n=this._filterMenuList(e.childMenus),r=n.some(e=>!e.isDivider);r&&(t.classList.add(ce+"-contextmenu-sub-item"),t.onmouseenter=()=>{this._setHoverStatus(t,!0),this._removeSubMenu(o);const e=t.getBoundingClientRect(),r=e.left+e.width,i=e.top;l=this._render({contextMenuList:n,left:r,top:i,parentMenuContainer:o})},t.onmouseleave=e=>{l&&l.contains(e.relatedTarget)||this._setHoverStatus(t,!1)})}else t.onmouseenter=()=>{this._setHoverStatus(t,!0),this._removeSubMenu(o)},t.onmouseleave=()=>{this._setHoverStatus(t,!1)},t.onclick=()=>{e.callback&&this.context&&e.callback(this.command,this.context),this.dispose()};const n=document.createElement("i");t.append(n),e.icon&&n.classList.add(`${ce}-contextmenu-${e.icon}`);const r=document.createElement("span"),i=e.i18nPath?this._formatName(this.i18n.t(e.i18nPath)):this._formatName(e.name||"");if(r.append(document.createTextNode(i)),t.append(r),e.shortCut){const n=document.createElement("span");n.classList.add(ce+"-shortcut"),n.append(document.createTextNode(e.shortCut)),t.append(n)}a.append(t)}}o.append(a),o.style.display="block";const c=window.innerWidth,u=o.getBoundingClientRect(),h=u.width,d=r+h>c?r-h:r;o.style.left=d+"px";const m=window.innerHeight,g=u.height,p=i+g>m?i-g:i;return o.style.top=p+"px",this.contextMenuContainerList.push(o),o}_removeSubMenu(e){const t=this.contextMenuRelationShip.get(e);t&&(this._removeSubMenu(t),t.remove(),this.contextMenuRelationShip.delete(e))}_setHoverStatus(e,t){var n;t?(null==(n=e.parentNode)||n.querySelectorAll(ce+"-contextmenu-item").forEach(e=>e.classList.remove("hover")),e.classList.add("hover")):e.classList.remove("hover")}_formatName(e){const t=Object.values(os),n=new RegExp(""+t.join("|"));let r=e;if(n.test(r)){const e=new RegExp(os.SELECTED_TEXT,"g");if(e.test(r)){const t=this.range.toString();r=r.replace(e,t)}}return r}registerContextMenuList(e){this.contextMenuList.push(...e)}dispose(){this.contextMenuContainerList.forEach(e=>e.remove()),this.contextMenuContainerList=[],this.contextMenuRelationShip.clear()}}const so=[{key:Dn.X,ctrl:!0,shift:!0,callback:e=>{e.executeStrikeout()}},{key:Dn.LEFT_BRACKET,mod:!0,callback:e=>{e.executeSizeAdd()}},{key:Dn.RIGHT_BRACKET,mod:!0,callback:e=>{e.executeSizeMinus()}},{key:Dn.B,mod:!0,callback:e=>{e.executeBold()}},{key:Dn.I,mod:!0,callback:e=>{e.executeItalic()}},{key:Dn.U,mod:!0,callback:e=>{e.executeUnderline()}},{key:In?Dn.COMMA:Dn.RIGHT_ANGLE_BRACKET,mod:!0,shift:!0,callback:e=>{e.executeSuperscript()}},{key:In?Dn.PERIOD:Dn.LEFT_ANGLE_BRACKET,mod:!0,shift:!0,callback:e=>{e.executeSubscript()}},{key:Dn.L,mod:!0,callback:e=>{e.executeRowFlex(C.LEFT)}},{key:Dn.E,mod:!0,callback:e=>{e.executeRowFlex(C.CENTER)}},{key:Dn.R,mod:!0,callback:e=>{e.executeRowFlex(C.RIGHT)}},{key:Dn.J,mod:!0,callback:e=>{e.executeRowFlex(C.ALIGNMENT)}},{key:Dn.J,mod:!0,shift:!0,callback:e=>{e.executeRowFlex(C.JUSTIFY)}}],oo=[{key:Dn.ZERO,alt:!0,ctrl:!0,callback:e=>{e.executeTitle(null)}},{key:Dn.ONE,alt:!0,ctrl:!0,callback:e=>{e.executeTitle(ot.FIRST)}},{key:Dn.TWO,alt:!0,ctrl:!0,callback:e=>{e.executeTitle(ot.SECOND)}},{key:Dn.THREE,alt:!0,ctrl:!0,callback:e=>{e.executeTitle(ot.THIRD)}},{key:Dn.FOUR,alt:!0,ctrl:!0,callback:e=>{e.executeTitle(ot.FOURTH)}},{key:Dn.FIVE,alt:!0,ctrl:!0,callback:e=>{e.executeTitle(ot.FIFTH)}},{key:Dn.SIX,alt:!0,ctrl:!0,callback:e=>{e.executeTitle(ot.SIXTH)}}],ao=[{key:Dn.I,shift:!0,mod:!0,callback:e=>{e.executeList(qe.UL,nt.DISC)}},{key:Dn.U,shift:!0,mod:!0,callback:e=>{e.executeList(qe.OL)}}];class lo{constructor(e,t){d(this,"command"),d(this,"globalShortcutList"),d(this,"agentShortcutList"),d(this,"_globalKeydown",e=>{this.globalShortcutList.length&&this._execute(e,this.globalShortcutList)}),this.command=t,this.globalShortcutList=[],this.agentShortcutList=[],this._addShortcutList([...so,...oo,...ao]),this._addEvent();const n=e.getCursor().getAgentDom();n.addEventListener("keydown",this._agentKeydown.bind(this))}_addEvent(){document.addEventListener("keydown",this._globalKeydown)}removeEvent(){document.removeEventListener("keydown",this._globalKeydown)}_addShortcutList(e){for(let t=e.length-1;t>=0;t--){const n=e[t];n.isGlobal?this.globalShortcutList.unshift(n):this.agentShortcutList.unshift(n)}}registerShortcutList(e){this._addShortcutList(e)}_agentKeydown(e){this.agentShortcutList.length&&this._execute(e,this.agentShortcutList)}_execute(e,t){var n;for(let r=0;r<t.length;r++){const i=t[r];if((i.mod?xn(e)===!!i.mod:e.ctrlKey===!!i.ctrl&&e.metaKey===!!i.meta)&&e.shiftKey===!!i.shift&&e.altKey===!!i.alt&&e.key.toLowerCase()===i.key.toLowerCase()){i.disable||(null==(n=null==i?void 0:i.callback)||n.call(i,this.command),e.preventDefault());break}}}}class co{constructor(e){d(this,"editor"),this.editor=e}use(e,t){e(this.editor,t)}}class uo{constructor(){d(this,"eventHub"),this.eventHub=new Map}on(e,t){if(!e||"function"!==typeof t)return;const n=this.eventHub.get(e)||new Set;n.add(t),this.eventHub.set(e,n)}emit(e,t){if(!e)return;const n=this.eventHub.get(e);if(n){if(1===n.size){const e=[...n];return e[0](t)}n.forEach(e=>e(t))}}off(e,t){if(!e||"function"!==typeof t)return;const n=this.eventHub.get(e);n&&n.delete(t)}isSubscribe(e){const t=this.eventHub.get(e);return!!t&&t.size>0}}class ho{constructor(){d(this,"paste"),d(this,"copy"),d(this,"drop")}}class mo{constructor(e,t,n={}){d(this,"command"),d(this,"listener"),d(this,"eventBus"),d(this,"override"),d(this,"register"),d(this,"destroy"),d(this,"use");const r=Qt(n);t=Y(t);let i=[],s=[],o=[];Array.isArray(t)?s=t:(i=t.header||[],s=t.main,o=t.footer||[]);const a=[i,s,o];a.forEach(e=>{Gt(e,{editorOptions:r,isForceCompensation:!0})}),this.listener=new is,this.eventBus=new uo,this.override=new ho;const l=new qi(e,r,{header:i,main:s,footer:o},this.listener,this.eventBus,this.override);this.command=new es(new rs(l));const c=new io(l,this.command),u=new lo(l,this.command);this.register=new ss({contextMenu:c,shortcut:u,i18n:l.getI18n()}),this.destroy=()=>{l.destroy(),u.removeEvent(),c.removeEvent()};const h=new co(this);this.use=h.use.bind(h)}}},b29d:function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
  261. //! moment.js locale configuration
  262. var t=e.defineLocale("lo",{months:"ມັງກອນ_ກຸມພາ_ມີນາ_ເມສາ_ພຶດສະພາ_ມິຖຸນາ_ກໍລະກົດ_ສິງຫາ_ກັນຍາ_ຕຸລາ_ພະຈິກ_ທັນວາ".split("_"),monthsShort:"ມັງກອນ_ກຸມພາ_ມີນາ_ເມສາ_ພຶດສະພາ_ມິຖຸນາ_ກໍລະກົດ_ສິງຫາ_ກັນຍາ_ຕຸລາ_ພະຈິກ_ທັນວາ".split("_"),weekdays:"ອາທິດ_ຈັນ_ອັງຄານ_ພຸດ_ພະຫັດ_ສຸກ_ເສົາ".split("_"),weekdaysShort:"ທິດ_ຈັນ_ອັງຄານ_ພຸດ_ພະຫັດ_ສຸກ_ເສົາ".split("_"),weekdaysMin:"ທ_ຈ_ອຄ_ພ_ພຫ_ສກ_ສ".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"ວັນdddd D MMMM YYYY HH:mm"},meridiemParse:/ຕອນເຊົ້າ|ຕອນແລງ/,isPM:function(e){return"ຕອນແລງ"===e},meridiem:function(e,t,n){return e<12?"ຕອນເຊົ້າ":"ຕອນແລງ"},calendar:{sameDay:"[ມື້ນີ້ເວລາ] LT",nextDay:"[ມື້ອື່ນເວລາ] LT",nextWeek:"[ວັນ]dddd[ໜ້າເວລາ] LT",lastDay:"[ມື້ວານນີ້ເວລາ] LT",lastWeek:"[ວັນ]dddd[ແລ້ວນີ້ເວລາ] LT",sameElse:"L"},relativeTime:{future:"ອີກ %s",past:"%sຜ່ານມາ",s:"ບໍ່ເທົ່າໃດວິນາທີ",ss:"%d ວິນາທີ",m:"1 ນາທີ",mm:"%d ນາທີ",h:"1 ຊົ່ວໂມງ",hh:"%d ຊົ່ວໂມງ",d:"1 ມື້",dd:"%d ມື້",M:"1 ເດືອນ",MM:"%d ເດືອນ",y:"1 ປີ",yy:"%d ປີ"},dayOfMonthOrdinalParse:/(ທີ່)\d{1,2}/,ordinal:function(e){return"ທີ່"+e}});return t}))},b3eb:function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
  263. //! moment.js locale configuration
  264. function t(e,t,n,r){var i={m:["eine Minute","einer Minute"],h:["eine Stunde","einer Stunde"],d:["ein Tag","einem Tag"],dd:[e+" Tage",e+" Tagen"],w:["eine Woche","einer Woche"],M:["ein Monat","einem Monat"],MM:[e+" Monate",e+" Monaten"],y:["ein Jahr","einem Jahr"],yy:[e+" Jahre",e+" Jahren"]};return t?i[n][0]:i[n][1]}var n=e.defineLocale("de-at",{months:"Jänner_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember".split("_"),monthsShort:"Jän._Feb._März_Apr._Mai_Juni_Juli_Aug._Sep._Okt._Nov._Dez.".split("_"),monthsParseExact:!0,weekdays:"Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag".split("_"),weekdaysShort:"So._Mo._Di._Mi._Do._Fr._Sa.".split("_"),weekdaysMin:"So_Mo_Di_Mi_Do_Fr_Sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY HH:mm",LLLL:"dddd, D. MMMM YYYY HH:mm"},calendar:{sameDay:"[heute um] LT [Uhr]",sameElse:"L",nextDay:"[morgen um] LT [Uhr]",nextWeek:"dddd [um] LT [Uhr]",lastDay:"[gestern um] LT [Uhr]",lastWeek:"[letzten] dddd [um] LT [Uhr]"},relativeTime:{future:"in %s",past:"vor %s",s:"ein paar Sekunden",ss:"%d Sekunden",m:t,mm:"%d Minuten",h:t,hh:"%d Stunden",d:t,dd:t,w:t,ww:"%d Wochen",M:t,MM:t,y:t,yy:t},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}});return n}))},b469:function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
  265. //! moment.js locale configuration
  266. function t(e,t,n,r){var i={m:["eine Minute","einer Minute"],h:["eine Stunde","einer Stunde"],d:["ein Tag","einem Tag"],dd:[e+" Tage",e+" Tagen"],w:["eine Woche","einer Woche"],M:["ein Monat","einem Monat"],MM:[e+" Monate",e+" Monaten"],y:["ein Jahr","einem Jahr"],yy:[e+" Jahre",e+" Jahren"]};return t?i[n][0]:i[n][1]}var n=e.defineLocale("de",{months:"Januar_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember".split("_"),monthsShort:"Jan._Feb._März_Apr._Mai_Juni_Juli_Aug._Sep._Okt._Nov._Dez.".split("_"),monthsParseExact:!0,weekdays:"Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag".split("_"),weekdaysShort:"So._Mo._Di._Mi._Do._Fr._Sa.".split("_"),weekdaysMin:"So_Mo_Di_Mi_Do_Fr_Sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY HH:mm",LLLL:"dddd, D. MMMM YYYY HH:mm"},calendar:{sameDay:"[heute um] LT [Uhr]",sameElse:"L",nextDay:"[morgen um] LT [Uhr]",nextWeek:"dddd [um] LT [Uhr]",lastDay:"[gestern um] LT [Uhr]",lastWeek:"[letzten] dddd [um] LT [Uhr]"},relativeTime:{future:"in %s",past:"vor %s",s:"ein paar Sekunden",ss:"%d Sekunden",m:t,mm:"%d Minuten",h:t,hh:"%d Stunden",d:t,dd:t,w:t,ww:"%d Wochen",M:t,MM:t,y:t,yy:t},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}});return n}))},b4bc:function(e,t,n){"use strict";var r=n("dc19"),i=n("cb27").has,s=n("8e16"),o=n("7f65"),a=n("384f"),l=n("5388"),c=n("2a62");e.exports=function(e){var t=r(this),n=o(e);if(s(t)<=n.size)return!1!==a(t,(function(e){if(n.includes(e))return!1}),!0);var u=n.getIterator();return!1!==l(u,(function(e){if(i(t,e))return c(u,"normal",!1)}))}},b53d:function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
  267. //! moment.js locale configuration
  268. var t=e.defineLocale("tzm-latn",{months:"innayr_brˤayrˤ_marˤsˤ_ibrir_mayyw_ywnyw_ywlywz_ɣwšt_šwtanbir_ktˤwbrˤ_nwwanbir_dwjnbir".split("_"),monthsShort:"innayr_brˤayrˤ_marˤsˤ_ibrir_mayyw_ywnyw_ywlywz_ɣwšt_šwtanbir_ktˤwbrˤ_nwwanbir_dwjnbir".split("_"),weekdays:"asamas_aynas_asinas_akras_akwas_asimwas_asiḍyas".split("_"),weekdaysShort:"asamas_aynas_asinas_akras_akwas_asimwas_asiḍyas".split("_"),weekdaysMin:"asamas_aynas_asinas_akras_akwas_asimwas_asiḍyas".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[asdkh g] LT",nextDay:"[aska g] LT",nextWeek:"dddd [g] LT",lastDay:"[assant g] LT",lastWeek:"dddd [g] LT",sameElse:"L"},relativeTime:{future:"dadkh s yan %s",past:"yan %s",s:"imik",ss:"%d imik",m:"minuḍ",mm:"%d minuḍ",h:"saɛa",hh:"%d tassaɛin",d:"ass",dd:"%d ossan",M:"ayowr",MM:"%d iyyirn",y:"asgas",yy:"%d isgasn"},week:{dow:6,doy:12}});return t}))},b540:function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
  269. //! moment.js locale configuration
  270. var t=e.defineLocale("jv",{months:"Januari_Februari_Maret_April_Mei_Juni_Juli_Agustus_September_Oktober_Nopember_Desember".split("_"),monthsShort:"Jan_Feb_Mar_Apr_Mei_Jun_Jul_Ags_Sep_Okt_Nop_Des".split("_"),weekdays:"Minggu_Senen_Seloso_Rebu_Kemis_Jemuwah_Septu".split("_"),weekdaysShort:"Min_Sen_Sel_Reb_Kem_Jem_Sep".split("_"),weekdaysMin:"Mg_Sn_Sl_Rb_Km_Jm_Sp".split("_"),longDateFormat:{LT:"HH.mm",LTS:"HH.mm.ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY [pukul] HH.mm",LLLL:"dddd, D MMMM YYYY [pukul] HH.mm"},meridiemParse:/enjing|siyang|sonten|ndalu/,meridiemHour:function(e,t){return 12===e&&(e=0),"enjing"===t?e:"siyang"===t?e>=11?e:e+12:"sonten"===t||"ndalu"===t?e+12:void 0},meridiem:function(e,t,n){return e<11?"enjing":e<15?"siyang":e<19?"sonten":"ndalu"},calendar:{sameDay:"[Dinten puniko pukul] LT",nextDay:"[Mbenjang pukul] LT",nextWeek:"dddd [pukul] LT",lastDay:"[Kala wingi pukul] LT",lastWeek:"dddd [kepengker pukul] LT",sameElse:"L"},relativeTime:{future:"wonten ing %s",past:"%s ingkang kepengker",s:"sawetawis detik",ss:"%d detik",m:"setunggal menit",mm:"%d menit",h:"setunggal jam",hh:"%d jam",d:"sedinten",dd:"%d dinten",M:"sewulan",MM:"%d wulan",y:"setaun",yy:"%d taun"},week:{dow:1,doy:7}});return t}))},b5b7:function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
  271. //! moment.js locale configuration
  272. var t="ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.".split("_"),n="ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic".split("_"),r=[/^ene/i,/^feb/i,/^mar/i,/^abr/i,/^may/i,/^jun/i,/^jul/i,/^ago/i,/^sep/i,/^oct/i,/^nov/i,/^dic/i],i=/^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre|ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i,s=e.defineLocale("es-mx",{months:"enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre".split("_"),monthsShort:function(e,r){return e?/-MMM-/.test(r)?n[e.month()]:t[e.month()]:t},monthsRegex:i,monthsShortRegex:i,monthsStrictRegex:/^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i,monthsShortStrictRegex:/^(ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i,monthsParse:r,longMonthsParse:r,shortMonthsParse:r,weekdays:"domingo_lunes_martes_miércoles_jueves_viernes_sábado".split("_"),weekdaysShort:"dom._lun._mar._mié._jue._vie._sáb.".split("_"),weekdaysMin:"do_lu_ma_mi_ju_vi_sá".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD/MM/YYYY",LL:"D [de] MMMM [de] YYYY",LLL:"D [de] MMMM [de] YYYY H:mm",LLLL:"dddd, D [de] MMMM [de] YYYY H:mm"},calendar:{sameDay:function(){return"[hoy a la"+(1!==this.hours()?"s":"")+"] LT"},nextDay:function(){return"[mañana a la"+(1!==this.hours()?"s":"")+"] LT"},nextWeek:function(){return"dddd [a la"+(1!==this.hours()?"s":"")+"] LT"},lastDay:function(){return"[ayer a la"+(1!==this.hours()?"s":"")+"] LT"},lastWeek:function(){return"[el] dddd [pasado a la"+(1!==this.hours()?"s":"")+"] LT"},sameElse:"L"},relativeTime:{future:"en %s",past:"hace %s",s:"unos segundos",ss:"%d segundos",m:"un minuto",mm:"%d minutos",h:"una hora",hh:"%d horas",d:"un día",dd:"%d días",w:"una semana",ww:"%d semanas",M:"un mes",MM:"%d meses",y:"un año",yy:"%d años"},dayOfMonthOrdinalParse:/\d{1,2}º/,ordinal:"%dº",week:{dow:0,doy:4},invalidDate:"Fecha inválida"});return s}))},b7e9:function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
  273. //! moment.js locale configuration
  274. var t=e.defineLocale("en-sg",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(e){var t=e%10,n=1===~~(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th";return e+n},week:{dow:1,doy:4}});return t}))},b84c:function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
  275. //! moment.js locale configuration
  276. var t=e.defineLocale("nn",{months:"januar_februar_mars_april_mai_juni_juli_august_september_oktober_november_desember".split("_"),monthsShort:"jan._feb._mars_apr._mai_juni_juli_aug._sep._okt._nov._des.".split("_"),monthsParseExact:!0,weekdays:"sundag_måndag_tysdag_onsdag_torsdag_fredag_laurdag".split("_"),weekdaysShort:"su._må._ty._on._to._fr._lau.".split("_"),weekdaysMin:"su_må_ty_on_to_fr_la".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY [kl.] H:mm",LLLL:"dddd D. MMMM YYYY [kl.] HH:mm"},calendar:{sameDay:"[I dag klokka] LT",nextDay:"[I morgon klokka] LT",nextWeek:"dddd [klokka] LT",lastDay:"[I går klokka] LT",lastWeek:"[Føregåande] dddd [klokka] LT",sameElse:"L"},relativeTime:{future:"om %s",past:"%s sidan",s:"nokre sekund",ss:"%d sekund",m:"eit minutt",mm:"%d minutt",h:"ein time",hh:"%d timar",d:"ein dag",dd:"%d dagar",w:"ei veke",ww:"%d veker",M:"ein månad",MM:"%d månader",y:"eit år",yy:"%d år"},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}});return t}))},b97c:function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
  277. //! moment.js locale configuration
  278. var t={ss:"sekundes_sekundēm_sekunde_sekundes".split("_"),m:"minūtes_minūtēm_minūte_minūtes".split("_"),mm:"minūtes_minūtēm_minūte_minūtes".split("_"),h:"stundas_stundām_stunda_stundas".split("_"),hh:"stundas_stundām_stunda_stundas".split("_"),d:"dienas_dienām_diena_dienas".split("_"),dd:"dienas_dienām_diena_dienas".split("_"),M:"mēneša_mēnešiem_mēnesis_mēneši".split("_"),MM:"mēneša_mēnešiem_mēnesis_mēneši".split("_"),y:"gada_gadiem_gads_gadi".split("_"),yy:"gada_gadiem_gads_gadi".split("_")};function n(e,t,n){return n?t%10===1&&t%100!==11?e[2]:e[3]:t%10===1&&t%100!==11?e[0]:e[1]}function r(e,r,i){return e+" "+n(t[i],e,r)}function i(e,r,i){return n(t[i],e,r)}function s(e,t){return t?"dažas sekundes":"dažām sekundēm"}var o=e.defineLocale("lv",{months:"janvāris_februāris_marts_aprīlis_maijs_jūnijs_jūlijs_augusts_septembris_oktobris_novembris_decembris".split("_"),monthsShort:"jan_feb_mar_apr_mai_jūn_jūl_aug_sep_okt_nov_dec".split("_"),weekdays:"svētdiena_pirmdiena_otrdiena_trešdiena_ceturtdiena_piektdiena_sestdiena".split("_"),weekdaysShort:"Sv_P_O_T_C_Pk_S".split("_"),weekdaysMin:"Sv_P_O_T_C_Pk_S".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY.",LL:"YYYY. [gada] D. MMMM",LLL:"YYYY. [gada] D. MMMM, HH:mm",LLLL:"YYYY. [gada] D. MMMM, dddd, HH:mm"},calendar:{sameDay:"[Šodien pulksten] LT",nextDay:"[Rīt pulksten] LT",nextWeek:"dddd [pulksten] LT",lastDay:"[Vakar pulksten] LT",lastWeek:"[Pagājušā] dddd [pulksten] LT",sameElse:"L"},relativeTime:{future:"pēc %s",past:"pirms %s",s:s,ss:r,m:i,mm:r,h:i,hh:r,d:i,dd:r,M:i,MM:r,y:i,yy:r},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}});return o}))},bb71:function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
  279. //! moment.js locale configuration
  280. function t(e,t,n,r){var i={m:["eine Minute","einer Minute"],h:["eine Stunde","einer Stunde"],d:["ein Tag","einem Tag"],dd:[e+" Tage",e+" Tagen"],w:["eine Woche","einer Woche"],M:["ein Monat","einem Monat"],MM:[e+" Monate",e+" Monaten"],y:["ein Jahr","einem Jahr"],yy:[e+" Jahre",e+" Jahren"]};return t?i[n][0]:i[n][1]}var n=e.defineLocale("de-ch",{months:"Januar_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember".split("_"),monthsShort:"Jan._Feb._März_Apr._Mai_Juni_Juli_Aug._Sep._Okt._Nov._Dez.".split("_"),monthsParseExact:!0,weekdays:"Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag".split("_"),weekdaysShort:"So_Mo_Di_Mi_Do_Fr_Sa".split("_"),weekdaysMin:"So_Mo_Di_Mi_Do_Fr_Sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY HH:mm",LLLL:"dddd, D. MMMM YYYY HH:mm"},calendar:{sameDay:"[heute um] LT [Uhr]",sameElse:"L",nextDay:"[morgen um] LT [Uhr]",nextWeek:"dddd [um] LT [Uhr]",lastDay:"[gestern um] LT [Uhr]",lastWeek:"[letzten] dddd [um] LT [Uhr]"},relativeTime:{future:"in %s",past:"vor %s",s:"ein paar Sekunden",ss:"%d Sekunden",m:t,mm:"%d Minuten",h:t,hh:"%d Stunden",d:t,dd:t,w:t,ww:"%d Wochen",M:t,MM:t,y:t,yy:t},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}});return n}))},bd5e:function(e,t,n){"use strict";n.d(t,"b",(function(){return i})),n.d(t,"a",(function(){return s}));var r=n("7b9c");function i(){Object(r["isDefined"])(console)&&console.warn(...arguments)}function s(){Object(r["isDefined"])(console)&&console.error(...arguments)}},bdd7:function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));n("d9e2");var r=n("3d57"),i=n("e90f");const s=new Map([["indexesSequence",{getListWithInsertedItems:r["a"],getListWithRemovedItems:r["b"]}],["physicallyIndexed",{getListWithInsertedItems:i["a"],getListWithRemovedItems:i["b"]}]]),o=e=>{if(!1===s.has(e))throw new Error(`Alter strategy with ID '${e}' does not exist.`);return s.get(e)}},bf7d:function(e,t,n){"use strict";n("dfa2")},c0d8:function(e,t,n){"use strict";n("d9e2"),n("14d9"),n("1e70"),n("79a4"),n("c1a1"),n("8b00"),n("a4e7"),n("1e5a"),n("72c3"),n("130f");var r=n("5d7f"),i=n("97b9"),s=n("7b9c"),o=n("63d8"),a=n("f938"),l=n("de3b"),c=n("491c"),u=n("87d6");function h(e,t){d(e,t),t.add(e)}function d(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function m(e,t,n){return(t=g(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function g(e){var t=p(e,"string");return"symbol"==typeof t?t:t+""}function p(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function f(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}var R=new WeakSet;class y{constructor(e,t,n){h(this,R),m(this,"hot",void 0),m(this,"tableMeta",void 0),m(this,"selection",void 0),m(this,"eventManager",void 0),m(this,"destroyed",!1),m(this,"activeEditor",void 0),m(this,"cellProperties",void 0),this.hot=e,this.tableMeta=t,this.selection=n,this.eventManager=new u["a"](e),this.hot.addHook("afterDocumentKeyDown",e=>f(R,this,M).call(this,e)),this.eventManager.addEventListener(this.hot.rootDocument.documentElement,"compositionstart",e=>{!this.destroyed&&this.hot.isListening()&&this.openEditor("",e)}),this.hot.view._wt.update("onCellDblClick",(e,t,n)=>f(R,this,S).call(this,e,t,n))}getActiveEditor(){return this.activeEditor}prepareEditor(){var e;if(this.activeEditor&&this.activeEditor.isWaiting())return void this.closeEditor(!1,!1,e=>{e&&this.prepareEditor()});const t=null===(e=this.hot.getSelectedRangeLast())||void 0===e?void 0:e.highlight;if(!t||t.isHeader())return;const{row:n,col:r}=t,i=this.hot.runHooks("modifyGetCellCoords",n,r);let s=n,o=r;if(Array.isArray(i)&&([s,o]=i),this.cellProperties=this.hot.getCellMeta(s,o),!this.isCellEditable())return void this.clearActiveEditor();const a=this.hot.getCell(n,r,!0);if(a){const e=this.hot.getCellEditor(this.cellProperties),t=this.hot.colToProp(o),i=this.hot.getSourceDataAtCell(this.hot.toPhysicalRow(s),o);this.activeEditor=Object(c["b"])(e,this.hot),this.activeEditor.prepare(n,r,t,a,i,this.cellProperties)}}isEditorOpened(){return this.activeEditor&&this.activeEditor.isOpened()}openEditor(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(!this.isCellEditable())return void this.clearActiveEditor();const r=this.hot.getSelectedRangeLast();let i=this.hot.runHooks("beforeBeginEditing",r.highlight.row,r.highlight.col,e,t,n);t instanceof MouseEvent&&"boolean"!==typeof i&&(i=0===this.hot.selection.getLayerLevel()&&r.isSingle()),!1!==i?(this.activeEditor||(this.hot.scrollToFocusedCell(),this.prepareEditor()),this.activeEditor&&(n&&this.activeEditor.enableFullEditMode(),this.activeEditor.beginEditing(e,t))):this.clearActiveEditor()}closeEditor(e,t,n){this.activeEditor?this.activeEditor.finishEditing(e,t,n):n&&n(!1)}closeEditorAndSaveChanges(e){this.closeEditor(!1,e)}closeEditorAndRestoreOriginalValue(e){this.closeEditor(!0,e)}clearActiveEditor(){this.activeEditor=void 0}isCellEditable(){const e=this.hot.getSelectedRangeLast();if(!e)return!1;const t=this.hot.getCellEditor(this.cellProperties),{row:n,col:r}=e.highlight,{rowIndexMapper:i,columnIndexMapper:s}=this.hot,o=i.isHidden(this.hot.toPhysicalRow(n))||s.isHidden(this.hot.toPhysicalColumn(r));return!(this.cellProperties.readOnly||!t||o)}moveSelectionAfterEnter(e){const t={..."function"===typeof this.tableMeta.enterMoves?this.tableMeta.enterMoves(e):this.tableMeta.enterMoves};e.shiftKey&&(t.row=-t.row,t.col=-t.col),this.hot.selection.isMultiple()?this.selection.transformFocus(t.row,t.col):this.selection.transformStart(t.row,t.col,!0)}destroy(){this.destroyed=!0,this.eventManager.destroy()}}function M(e){const t=this.hot.getSelectedRangeLast();if(!this.hot.isListening()||!t||t.highlight.isHeader()||Object(l["isImmediatePropagationStopped"])(e))return;const{keyCode:n}=e,r=(e.ctrlKey||e.metaKey)&&!e.altKey;(!this.activeEditor||this.activeEditor&&!this.activeEditor.isWaiting())&&(Object(a["isFunctionKey"])(n)||Object(a["isCtrlMetaKey"])(n)||r||this.isEditorOpened()||this.openEditor("",e))}function S(e,t){t.isCell()&&this.openEditor(null,e,!0)}const b=new WeakMap;y.getInstance=function(e,t,n){let r=b.get(e);return r||(r=new y(e,t,n),b.set(e,r)),r};var w=y,T=n("351d"),O=n("bd5e");function v(e,t){C(e,t),t.add(e)}function E(e,t,n){C(e,t),t.set(e,n)}function C(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function L(e,t){return e.get(_(e,t))}function N(e,t,n){return e.set(_(e,t),n),n}function _(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}const I=Object.freeze({CELL:"cell",MIXED:"mixed"});var P=new WeakMap,x=new WeakMap,D=new WeakMap,A=new WeakMap,F=new WeakMap,Y=new WeakSet;class H{constructor(e){var t=this;v(this,Y),E(this,P,void 0),E(this,x,void 0),E(this,D,1),E(this,A,null),E(this,F,new Map);const n=e.getSettings();N(P,this,e),N(x,this,n.imeFastEdit?I.MIXED:I.CELL),L(P,this).addHook("afterUpdateSettings",(function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return _(Y,t,W).call(t,...n)})),L(P,this).addHook("afterSelection",(function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return _(Y,t,V).call(t,...n)})),L(P,this).addHook("afterSelectionFocusSet",(function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return _(Y,t,V).call(t,...n)})),L(P,this).addHook("afterSelectionEnd",(function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return _(Y,t,U).call(t,...n)}))}getFocusMode(){return L(x,this)}setFocusMode(e){Object.values(I).includes(e)?N(x,this,e):Object(O["b"])(`"${e}" is not a valid focus mode.`)}getRefocusDelay(){return L(D,this)}setRefocusDelay(e){N(D,this,e)}setRefocusElementGetter(e){N(A,this,e)}getRefocusElement(){return"function"===typeof L(A,this)?L(A,this).call(this):null===(e=L(P,this).getActiveEditor())||void 0===e?void 0:e.TEXTAREA;var e}focusOnHighlightedCell(e){const t=e=>{var t,n;const r=null===(t=L(P,this).getSelectedRangeLast())||void 0===t?void 0:t.highlight;if(!r)return;let i=L(P,this).runHooks("modifyFocusedElement",r.row,r.col,e);i instanceof HTMLElement||(i=e),!i||null!==(n=L(P,this).getActiveEditor())&&void 0!==n&&n.isOpened()||i.focus({preventScroll:!0})};e?t(e):_(Y,this,k).call(this,e=>t(e))}refocusToEditorTextarea(){var e;let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:L(D,this);const n=this.getRefocusElement();!L(P,this).getSettings().imeFastEdit||null!==(e=L(P,this).getActiveEditor())&&void 0!==e&&e.isOpened()||!n||(L(F,this).has(t)||L(F,this).set(t,Object(i["debounce"])(()=>{n.select()},t)),L(F,this).get(t)())}}function k(e){var t;const n=null===(t=L(P,this).getSelectedRangeLast())||void 0===t?void 0:t.highlight;if(!n||!L(P,this).selection.isCellVisible(n))return void e(null);const r=L(P,this).getCell(n.row,n.col,!0);null===r?L(P,this).addHookOnce("afterScroll",()=>{e(L(P,this).getCell(n.row,n.col,!0))}):e(r)}function V(){_(Y,this,k).call(this,e=>{const{activeElement:t}=L(P,this).rootDocument;t&&Object(r["isOutsideInput"])(t)&&t.blur(),this.focusOnHighlightedCell(e)})}function U(){_(Y,this,k).call(this,e=>{this.getFocusMode()===I.MIXED&&"TD"===e.nodeName&&this.refocusToEditorTextarea()})}function W(e){"boolean"===typeof e.imeFastEdit&&this.setFocusMode(e.imeFastEdit?I.MIXED:I.CELL)}var X=n("81ea"),j=n("a776"),Z=n("24b5"),Q=n("3d76"),K=n("169f"),G=n("29b0"),B=n("ffec"),J=n("7dd0");function z(e,t,n){$(e,t),t.set(e,n)}function $(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function q(e,t){return e.get(te(e,t))}function ee(e,t,n){return e.set(te(e,t),n),n}function te(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}var ne=new WeakMap,re=new WeakMap,ie=new WeakMap,se=new WeakMap,oe=new WeakMap,ae=new WeakMap,le=new WeakMap,ce=new WeakMap,ue=new WeakMap,he=new WeakMap;class de{constructor(e,t,n,r,i,s){let o=arguments.length>6&&void 0!==arguments[6]?arguments[6]:null;z(this,ne,void 0),z(this,re,void 0),z(this,ie,void 0),z(this,se,void 0),z(this,oe,void 0),z(this,ae,void 0),z(this,le,void 0),z(this,ce,void 0),z(this,ue,[null,null]),z(this,he,[null,null]),ee(ne,this,n),ee(re,this,t),ee(ie,this,i),ee(se,this,s),ee(oe,this,o),ee(ae,this,r),ee(le,this,e),this.registerEvents()}registerEvents(){q(ae,this).addEventListener(q(ie,this).holder,"contextmenu",e=>this.onContextMenu(e)),q(ae,this).addEventListener(q(ie,this).TABLE,"mouseover",e=>this.onMouseOver(e)),q(ae,this).addEventListener(q(ie,this).TABLE,"mouseout",e=>this.onMouseOut(e));const e=()=>{q(ae,this).addEventListener(q(ie,this).holder,"touchstart",e=>this.onTouchStart(e)),q(ae,this).addEventListener(q(ie,this).holder,"touchend",e=>this.onTouchEnd(e)),this.momentumScrolling||(this.momentumScrolling={}),q(ae,this).addEventListener(q(ie,this).holder,"scroll",()=>{clearTimeout(this.momentumScrolling._timeout),this.momentumScrolling.ongoing||q(ne,this).getSetting("onBeforeTouchScroll"),this.momentumScrolling.ongoing=!0,this.momentumScrolling._timeout=setTimeout(()=>{this.touchApplied||(this.momentumScrolling.ongoing=!1,q(ne,this).getSetting("onAfterMomentumScroll"))},200)})},t=()=>{q(ae,this).addEventListener(q(ie,this).holder,"mouseup",e=>this.onMouseUp(e)),q(ae,this).addEventListener(q(ie,this).holder,"mousedown",e=>this.onMouseDown(e))};Object(o["isMobileBrowser"])()?e():(Object(J["isTouchSupported"])()&&e(),t())}selectedCellWasTouched(e){const t=this.parentCell(e),n=t.coords;if(q(ce,this)&&n){const[e,t]=[n.row,q(ce,this).from.row],[r,i]=[n.col,q(ce,this).from.col];return e===t&&r===i}return!1}parentCell(e){const t={},n=q(ie,this).TABLE,i=Object(r["closestDown"])(e,["TD","TH"],n);return i?(t.coords=q(ie,this).getCoords(i),t.TD=i):Object(r["hasClass"])(e,"wtBorder")&&Object(r["hasClass"])(e,"current")?(t.coords=q(se,this).getFocusSelection().cellRange.highlight,t.TD=q(ie,this).getCell(t.coords)):Object(r["hasClass"])(e,"wtBorder")&&Object(r["hasClass"])(e,"area")&&q(se,this).getAreaSelection().cellRange&&(t.coords=q(se,this).getAreaSelection().cellRange.to,t.TD=q(ie,this).getCell(t.coords)),t}onMouseDown(e){const t=q(re,this).rootDocument.activeElement,n=Object(i["partial"])(r["getParent"],e.target),s=e.target;if(!["TD","TH"].includes(t.nodeName)&&(s===t||n(0)===t||n(1)===t))return;const o=this.parentCell(s);Object(r["hasClass"])(s,"corner")?q(ne,this).getSetting("onCellCornerMouseDown",e,s):o.TD&&q(ne,this).has("onCellMouseDown")&&this.callListener("onCellMouseDown",e,o.coords,o.TD),(0===e.button||this.touchApplied)&&o.TD&&(q(he,this)[0]=o.TD,clearTimeout(q(ue,this)[0]),q(ue,this)[0]=setTimeout(()=>{q(he,this)[0]=null},1e3))}onContextMenu(e){if(q(ne,this).has("onCellContextMenu")){const t=this.parentCell(e.target);t.TD&&this.callListener("onCellContextMenu",e,t.coords,t.TD)}}onMouseOver(e){if(!q(ne,this).has("onCellMouseOver"))return;const t=q(ie,this).TABLE,n=Object(r["closestDown"])(e.target,["TD","TH"],t),i=q(oe,this)||this;n&&n!==i.lastMouseOver&&Object(r["isChildOf"])(n,t)&&(i.lastMouseOver=n,this.callListener("onCellMouseOver",e,q(ie,this).getCoords(n),n))}onMouseOut(e){if(!q(ne,this).has("onCellMouseOut"))return;const t=q(ie,this).TABLE,n=Object(r["closestDown"])(e.target,["TD","TH"],t),i=Object(r["closestDown"])(e.relatedTarget,["TD","TH"],t),s=q(oe,this)||this;n&&n!==i&&Object(r["isChildOf"])(n,t)&&(this.callListener("onCellMouseOut",e,q(ie,this).getCoords(n),n),null===i&&(s.lastMouseOver=null))}onMouseUp(e){const t=this.parentCell(e.target);t.TD&&q(ne,this).has("onCellMouseUp")&&this.callListener("onCellMouseUp",e,t.coords,t.TD),(0===e.button||this.touchApplied)&&(t.TD===q(he,this)[0]&&t.TD===q(he,this)[1]?(Object(r["hasClass"])(e.target,"corner")?this.callListener("onCellCornerDblClick",e,t.coords,t.TD):this.callListener("onCellDblClick",e,t.coords,t.TD),q(he,this)[0]=null,q(he,this)[1]=null):t.TD===q(he,this)[0]&&(q(he,this)[1]=t.TD,clearTimeout(q(ue,this)[1]),q(ue,this)[1]=setTimeout(()=>{q(he,this)[1]=null},500)))}onTouchStart(e){ee(ce,this,q(se,this).getFocusSelection().cellRange),this.touchApplied=!0,this.onMouseDown(e)}onTouchEnd(e){var t;const n=e.target,r=null===(t=this.parentCell(n))||void 0===t?void 0:t.coords,i=Object(s["isDefined"])(r)&&r.row>=0&&r.col>=0,a=e.cancelable&&i&&q(ne,this).getSetting("isDataViewInstance");if(a){const t=["A","BUTTON","INPUT"];Object(o["isIOS"])()&&(Object(o["isChromeWebKit"])()||Object(o["isFirefoxWebKit"])())&&this.selectedCellWasTouched(n)&&!t.includes(n.tagName)?e.preventDefault():this.selectedCellWasTouched(n)||e.preventDefault()}this.onMouseUp(e),this.touchApplied=!1}callListener(e,t,n,r){const i=q(ne,this).getSettingPure(e);i&&i(t,n,r,q(le,this).call(this))}destroy(){clearTimeout(q(ue,this)[0]),clearTimeout(q(ue,this)[1]),q(ae,this).destroy()}}var me=de;function ge(e,t,n){return(t=pe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function pe(e){var t=fe(e,"string");return"symbol"==typeof t?t:t+""}function fe(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}class Re{constructor(e,t,n){ge(this,"offset",void 0),ge(this,"total",void 0),ge(this,"countTH",void 0),this.offset=e,this.total=t,this.countTH=n}offsetted(e){return e+this.offset}unOffsetted(e){return e-this.offset}renderedToSource(e){return this.offsetted(e)}sourceToRendered(e){return this.unOffsetted(e)}offsettedTH(e){return e-this.countTH}unOffsettedTH(e){return e+this.countTH}visibleRowHeadedColumnToSourceColumn(e){return this.renderedToSource(this.offsettedTH(e))}sourceColumnToVisibleRowHeadedColumn(e){return this.unOffsettedTH(this.sourceToRendered(e))}}var ye=Re;function Me(e,t,n){return(t=Se(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Se(e){var t=be(e,"string");return"symbol"==typeof t?t:t+""}function be(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}class we{constructor(e,t,n){Me(this,"offset",void 0),Me(this,"total",void 0),Me(this,"countTH",void 0),this.offset=e,this.total=t,this.countTH=n}offsetted(e){return e+this.offset}unOffsetted(e){return e-this.offset}renderedToSource(e){return this.offsetted(e)}sourceToRendered(e){return this.unOffsetted(e)}offsettedTH(e){return e-this.countTH}unOffsettedTH(e){return e+this.countTH}visibleColHeadedRowToSourceRow(e){return this.renderedToSource(this.offsettedTH(e))}sourceRowToVisibleColHeadedRow(e){return this.unOffsettedTH(this.sourceToRendered(e))}}var Te=we;const Oe=0,ve=1,Ee=2;function Ce(e,t,n){return(t=Le(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Le(e){var t=Ne(e,"string");return"symbol"==typeof t?t:t+""}function Ne(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}class _e{constructor(){Ce(this,"currentSize",0),Ce(this,"nextSize",0),Ce(this,"currentOffset",0),Ce(this,"nextOffset",0)}setSize(e){this.currentSize=this.nextSize,this.nextSize=e}setOffset(e){this.currentOffset=this.nextOffset,this.nextOffset=e}}function Ie(e,t,n){return(t=Pe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Pe(e){var t=xe(e,"string");return"symbol"==typeof t?t:t+""}function xe(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}class De{constructor(){Ie(this,"size",new _e),Ie(this,"workingSpace",Oe),Ie(this,"sharedSize",null)}setSize(e){this.size.setSize(e)}setOffset(e){this.size.setOffset(e)}getViewSize(){return this.size}isShared(){return this.sharedSize instanceof _e}isPlaceOn(e){return this.workingSpace===e}append(e){this.workingSpace=ve,e.workingSpace=Ee,this.sharedSize=e.getViewSize()}prepend(e){this.workingSpace=Ee,e.workingSpace=ve,this.sharedSize=e.getViewSize()}}function Ae(e,t,n){return(t=Fe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Fe(e){var t=Ye(e,"string");return"symbol"==typeof t?t:t+""}function Ye(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}class He{constructor(e,t,n){Ae(this,"rootNode",void 0),Ae(this,"nodesPool",void 0),Ae(this,"sizeSet",new De),Ae(this,"childNodeType",void 0),Ae(this,"visualIndex",0),Ae(this,"collectedNodes",[]),this.rootNode=e,this.nodesPool=t,this.childNodeType=n.toUpperCase()}setSize(e){return this.sizeSet.setSize(e),this}setOffset(e){return this.sizeSet.setOffset(e),this}isSharedViewSet(){return this.sizeSet.isShared()}getNode(e){return e<this.collectedNodes.length?this.collectedNodes[e]:null}getCurrentNode(){const e=this.collectedNodes.length;return e>0?this.collectedNodes[e-1]:null}getRenderedChildCount(){const{rootNode:e,sizeSet:t}=this;let n=0;if(this.isSharedViewSet()){let r=e.firstElementChild;while(r){if(r.tagName===this.childNodeType)n+=1;else if(t.isPlaceOn(ve))break;r=r.nextElementSibling}}else n=e.childElementCount;return n}start(){this.collectedNodes.length=0,this.visualIndex=0;const{rootNode:e,sizeSet:t}=this,n=this.isSharedViewSet(),{nextSize:r}=t.getViewSize();let i=this.getRenderedChildCount();while(i<r){const r=this.nodesPool();!n||n&&t.isPlaceOn(Ee)?e.appendChild(r):e.insertBefore(r,e.firstChild),i+=1}const s=n&&t.isPlaceOn(ve);while(i>r)e.removeChild(s?e.firstChild:e.lastChild),i-=1}render(){const{rootNode:e,sizeSet:t}=this;let n=this.visualIndex;this.isSharedViewSet()&&t.isPlaceOn(Ee)&&(n+=t.sharedSize.nextSize);let r=e.childNodes[n];if(r.tagName!==this.childNodeType){const t=this.nodesPool();e.replaceChild(t,r),r=t}this.collectedNodes.push(r),this.visualIndex+=1}end(){}}class ke extends He{prependView(e){return this.sizeSet.prepend(e.sizeSet),e.sizeSet.append(this.sizeSet),this}appendView(e){return this.sizeSet.append(e.sizeSet),e.sizeSet.prepend(this.sizeSet),this}}function Ve(e,t,n){return(t=Ue(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ue(e){var t=We(e,"string");return"symbol"==typeof t?t:t+""}function We(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}class Xe{constructor(e){Ve(this,"nodeType",void 0),this.nodeType=e.toUpperCase()}setRootDocument(e){this.rootDocument=e}obtain(){return this.rootDocument.createElement(this.nodeType)}}function je(e,t,n){return(t=Ze(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ze(e){var t=Qe(e,"string");return"symbol"==typeof t?t:t+""}function Qe(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}class Ke{constructor(e,t){je(this,"nodesPool",null),je(this,"nodeType",void 0),je(this,"rootNode",void 0),je(this,"table",null),je(this,"renderedNodes",0),this.nodesPool="string"===typeof e?new Xe(e):null,this.nodeType=e,this.rootNode=t}setTable(e){this.nodesPool&&this.nodesPool.setRootDocument(e.rootDocument),this.table=e}adjust(){}render(){}}var Ge=n("8828");function Be(e,t,n){return(t=Je(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Je(e){var t=ze(e,"string");return"symbol"==typeof t?t:t+""}function ze(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}class $e extends Ke{constructor(){super("TH"),Be(this,"orderViews",new WeakMap),Be(this,"sourceRowIndex",0)}obtainOrderView(e){let t;return this.orderViews.has(e)?t=this.orderViews.get(e):(t=new ke(e,e=>this.nodesPool.obtain(this.sourceRowIndex,e),this.nodeType),this.orderViews.set(e,t)),t}render(){const{rowsToRender:e,rowHeaderFunctions:t,rowHeadersCount:n,rows:i,cells:s}=this.table;for(let o=0;o<e;o++){const e=this.table.renderedRowToSource(o),a=i.getRenderedNode(o);this.sourceRowIndex=e;const l=this.obtainOrderView(a),c=s.obtainOrderView(a);l.appendView(c).setSize(n).setOffset(this.table.renderedColumnToSource(0)).start();for(let i=0;i<n;i++){l.render();const n=l.getCurrentNode();n.className="",n.removeAttribute("style"),Object(r["removeAttribute"])(n,[new RegExp("aria-(.*)"),new RegExp("role")]),this.table.isAriaEnabled()&&Object(r["setAttribute"])(n,[Object(Ge["E"])(),Object(Ge["H"])(),Object(Ge["f"])(i+1),Object(Ge["L"])(-1)]),t[i](e,n,i)}l.end()}}}class qe extends Ke{constructor(e){super(null,e)}adjust(){const{columnHeadersCount:e,rowHeadersCount:t}=this.table;let n=this.rootNode.firstChild;if(e){const{columnsToRender:r}=this.table,i=r+t;for(let t=0,o=e;t<o;t++){n=this.rootNode.childNodes[t],n||(n=this.table.rootDocument.createElement("tr"),this.rootNode.appendChild(n)),this.renderedNodes=n.childNodes.length;while(this.renderedNodes<i)n.appendChild(this.table.rootDocument.createElement("th")),this.renderedNodes+=1;while(this.renderedNodes>i)n.removeChild(n.lastChild),this.renderedNodes-=1}const s=this.rootNode.childNodes.length;if(s>e)for(let t=e;t<s;t++)this.rootNode.removeChild(this.rootNode.lastChild)}else n&&Object(r["empty"])(n)}render(){const{columnHeadersCount:e}=this.table;this.table.isAriaEnabled()&&Object(r["setAttribute"])(this.rootNode,[Object(Ge["D"])()]);for(let t=0;t<e;t+=1){const{columnHeaderFunctions:e,columnsToRender:n,rowHeadersCount:i}=this.table,s=this.rootNode.childNodes[t];this.table.isAriaEnabled()&&Object(r["setAttribute"])(s,[Object(Ge["B"])(),Object(Ge["F"])(t+1)]);for(let o=-1*i;o<n;o+=1){const n=this.table.renderedColumnToSource(o),a=s.childNodes[o+i];a.className="",a.removeAttribute("style"),Object(r["removeAttribute"])(a,[new RegExp("aria-(.*)"),new RegExp("role")]),this.table.isAriaEnabled()&&Object(r["setAttribute"])(a,[Object(Ge["f"])(o+1+this.table.rowHeadersCount),Object(Ge["L"])(-1),Object(Ge["g"])(),...o>=0?[Object(Ge["G"])()]:[Object(Ge["B"])()]]),e[t](n,a,t)}}}}var et=n("67a8");let tt=!1;class nt extends Ke{constructor(e){super(null,e)}adjust(){const{columnsToRender:e,rowHeadersCount:t}=this.table,n=e+t;while(this.renderedNodes<n)this.rootNode.appendChild(this.table.rootDocument.createElement("col")),this.renderedNodes+=1;while(this.renderedNodes>n)this.rootNode.removeChild(this.rootNode.lastChild),this.renderedNodes-=1}render(){this.adjust();const{columnsToRender:e,rowHeadersCount:t}=this.table;!tt&&e>1e3&&(tt=!0,Object(O["b"])(et["a"]`Performance tip: Handsontable rendered more than 1000 visible columns.\x20
  281. Consider limiting the number of rendered columns by specifying the table width and/or\x20
  282. turning off the "renderAllColumns" option.`));for(let r=0;r<t;r++){const e=this.table.renderedColumnToSource(r),t=this.table.columnUtils.getHeaderWidth(e);this.rootNode.childNodes[r].style.width=t+"px"}for(let r=0;r<e;r++){const e=this.table.renderedColumnToSource(r),n=this.table.columnUtils.getStretchedColumnWidth(e);this.rootNode.childNodes[r+t].style.width=n+"px"}const n=this.rootNode.firstChild;n&&Object(r["addClass"])(n,"rowHeader")}}function rt(e,t,n){return(t=it(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function it(e){var t=st(e,"string");return"symbol"==typeof t?t:t+""}function st(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}const ot={rowEven:"ht__row_even",rowOdd:"ht__row_odd"};let at=!1;class lt extends Ke{constructor(e){super("TR",e),rt(this,"orderView",void 0),this.orderView=new He(e,e=>this.nodesPool.obtain(e),this.nodeType)}getRenderedNode(e){return this.orderView.getNode(e)}render(){const{rowsToRender:e}=this.table;!at&&e>1e3&&(at=!0,Object(O["b"])(et["a"]`Performance tip: Handsontable rendered more than 1000 visible rows.\x20
  283. Consider limiting the number of rendered rows by specifying the table height and/or\x20
  284. turning off the "renderAllRows" option.`)),this.table.isAriaEnabled()&&Object(r["setAttribute"])(this.rootNode,[Object(Ge["D"])()]),this.orderView.setSize(e).setOffset(this.table.renderedRowToSource(0)).start();for(let i=0;i<e;i++){this.orderView.render();const e=this.orderView.getCurrentNode(),s=this.table.renderedRowToSource(i);var t,n;if(this.table.isAriaEnabled())Object(r["setAttribute"])(e,[Object(Ge["B"])(),Object(Ge["F"])(s+(null!==(t=null===(n=this.table.rowUtils)||void 0===n||null===(n=n.dataAccessObject)||void 0===n?void 0:n.columnHeaders.length)&&void 0!==t?t:0)+1)]);Object(r["removeClass"])(e,[ot.rowEven,ot.rowOdd]),(s+1)%2===0?Object(r["addClass"])(e,ot.rowEven):Object(r["addClass"])(e,ot.rowOdd)}this.orderView.end()}}function ct(e,t,n){return(t=ut(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ut(e){var t=ht(e,"string");return"symbol"==typeof t?t:t+""}function ht(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}class dt extends Ke{constructor(){super("TD"),ct(this,"orderViews",new WeakMap),ct(this,"sourceRowIndex",0)}obtainOrderView(e){let t;return this.orderViews.has(e)?t=this.orderViews.get(e):(t=new ke(e,e=>this.nodesPool.obtain(this.sourceRowIndex,e),this.nodeType),this.orderViews.set(e,t)),t}render(){const{rowsToRender:e,columnsToRender:t,rows:n,rowHeaders:i}=this.table;for(let a=0;a<e;a++){const e=this.table.renderedRowToSource(a),l=n.getRenderedNode(a);this.sourceRowIndex=e;const c=this.obtainOrderView(l),u=i.obtainOrderView(l);c.prependView(u).setSize(t).setOffset(this.table.renderedColumnToSource(0)).start();for(let n=0;n<t;n++){c.render();const t=c.getCurrentNode(),i=this.table.renderedColumnToSource(n);var s,o;if(Object(r["hasClass"])(t,"hide")||(t.className=""),t.removeAttribute("style"),t.removeAttribute("dir"),Object(r["removeAttribute"])(t,[new RegExp("aria-(.*)"),new RegExp("role")]),this.table.cellRenderer(e,i,t),this.table.isAriaEnabled())Object(r["setAttribute"])(t,[...t.hasAttribute("role")?[]:[Object(Ge["l"])()],Object(Ge["L"])(-1),Object(Ge["f"])(i+(null!==(s=null===(o=this.table.rowUtils)||void 0===o||null===(o=o.dataAccessObject)||void 0===o?void 0:o.rowHeaders.length)&&void 0!==s?s:0)+1)])}c.end()}}}function mt(e,t,n){return(t=gt(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function gt(e){var t=pt(e,"string");return"symbol"==typeof t?t:t+""}function pt(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}class ft{constructor(e){let{cellRenderer:t}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};mt(this,"rootNode",void 0),mt(this,"rootDocument",void 0),mt(this,"rowHeaders",null),mt(this,"columnHeaders",null),mt(this,"colGroup",null),mt(this,"rows",null),mt(this,"cells",null),mt(this,"rowFilter",null),mt(this,"columnFilter",null),mt(this,"rowUtils",null),mt(this,"columnUtils",null),mt(this,"rowsToRender",0),mt(this,"columnsToRender",0),mt(this,"rowHeaderFunctions",[]),mt(this,"rowHeadersCount",0),mt(this,"columnHeaderFunctions",[]),mt(this,"columnHeadersCount",0),mt(this,"cellRenderer",void 0),mt(this,"activeOverlayName",void 0),this.rootNode=e,this.rootDocument=this.rootNode.ownerDocument,this.cellRenderer=t}setActiveOverlayName(e){this.activeOverlayName=e}setAxisUtils(e,t){this.rowUtils=e,this.columnUtils=t}setViewportSize(e,t){this.rowsToRender=e,this.columnsToRender=t}setFilters(e,t){this.rowFilter=e,this.columnFilter=t}setHeaderContentRenderers(e,t){this.rowHeaderFunctions=e,this.rowHeadersCount=e.length,this.columnHeaderFunctions=t,this.columnHeadersCount=t.length}setRenderers(){let{rowHeaders:e,columnHeaders:t,colGroup:n,rows:r,cells:i}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};e.setTable(this),t.setTable(this),n.setTable(this),r.setTable(this),i.setTable(this),this.rowHeaders=e,this.columnHeaders=t,this.colGroup=n,this.rows=r,this.cells=i}renderedRowToSource(e){return this.rowFilter.renderedToSource(e)}renderedColumnToSource(e){return this.columnFilter.renderedToSource(e)}isAriaEnabled(){return this.rowUtils.wtSettings.getSetting("ariaTags")}render(){this.colGroup.adjust(),this.columnHeaders.adjust(),this.rows.adjust(),this.rowHeaders.adjust(),this.columnHeaders.render(),this.rows.render(),this.rowHeaders.render(),this.cells.render(),this.columnUtils.calculateWidths(),this.colGroup.render();const{rowsToRender:e,rows:t}=this;for(let n=0;n<e;n++){const e=t.getRenderedNode(n);if(e.firstChild){const t=this.renderedRowToSource(n),r=this.rowUtils.getHeightByOverlayName(t,this.activeOverlayName);e.firstChild.style.height=r?r-1+"px":""}}}}class Rt{constructor(){let{TABLE:e,THEAD:t,COLGROUP:n,TBODY:r,rowUtils:i,columnUtils:s,cellRenderer:o}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.renderer=new ft(e,{cellRenderer:o}),this.renderer.setRenderers({rowHeaders:new $e,columnHeaders:new qe(t),colGroup:new nt(n),rows:new lt(r),cells:new dt}),this.renderer.setAxisUtils(i,s)}setActiveOverlayName(e){return this.renderer.setActiveOverlayName(e),this}setFilters(e,t){return this.renderer.setFilters(e,t),this}setViewportSize(e,t){return this.renderer.setViewportSize(e,t),this}setHeaderContentRenderers(e,t){return this.renderer.setHeaderContentRenderers(e,t),this}adjust(){this.renderer.adjust()}render(){this.renderer.render()}}var yt=n("861dd");function Mt(e,t,n){St(e,t),t.set(e,n)}function St(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function bt(e,t,n){return(t=wt(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function wt(e){var t=Tt(e,"string");return"symbol"==typeof t?t:t+""}function Tt(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function Ot(e,t){return e.get(Et(e,t))}function vt(e,t,n){return e.set(Et(e,t),n),n}function Et(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}var Ct=new WeakMap,Lt=new WeakMap,Nt=new WeakMap,_t=new WeakMap,It=new WeakMap;class Pt{constructor(e){let{totalColumns:t,stretchMode:n,stretchingColumnWidthFn:r,columnWidthFn:i}=e;bt(this,"stretchAllRatio",0),bt(this,"stretchLastWidth",0),bt(this,"stretchAllColumnsWidth",[]),Mt(this,Ct,0),bt(this,"needVerifyLastColumnWidth",!0),Mt(this,Lt,()=>0),Mt(this,Nt,e=>e),Mt(this,_t,e=>e),Mt(this,It,()=>"none"),vt(Lt,this,t),vt(It,this,n),vt(Nt,this,null!==r&&void 0!==r?r:Ot(Nt,this)),vt(_t,this,null!==i&&void 0!==i?i:Ot(_t,this))}refreshStretching(e){if("none"===Ot(It,this).call(this))return;this.stretchAllRatio=0,this.stretchAllColumnsWidth=[],this.needVerifyLastColumnWidth=!0,this.stretchLastWidth=0,vt(Ct,this,e);let t=0;for(let r=0;r<Ot(Lt,this).call(this);r++){const n=this._getColumnWidth(r),i=Ot(Nt,this).call(this,void 0,r);"number"===typeof i?e-=i:t+=n}const n=e-t;if("all"===Ot(It,this).call(this)&&n>0)this.stretchAllRatio=e/t,this.stretchAllColumnsWidth=[],this.needVerifyLastColumnWidth=!0;else if("last"===Ot(It,this).call(this)&&e!==1/0){const e=this._getColumnWidth(Ot(Lt,this).call(this)-1),t=n+e;this.stretchLastWidth=t>=0?t:e}}getStretchedColumnWidth(e,t){let n=null;return"all"===Ot(It,this).call(this)&&0!==this.stretchAllRatio?n=this._getStretchedAllColumnWidth(e,t):"last"===Ot(It,this).call(this)&&0!==this.stretchLastWidth&&(n=this._getStretchedLastColumnWidth(e)),n}_getStretchedAllColumnWidth(e,t){let n=0;if(!this.stretchAllColumnsWidth[e]){const n=Math.round(t*this.stretchAllRatio),r=Ot(Nt,this).call(this,n,e);this.stretchAllColumnsWidth[e]=void 0===r?n:isNaN(r)?this._getColumnWidth(e):r}if(this.stretchAllColumnsWidth.length===Ot(Lt,this).call(this)&&this.needVerifyLastColumnWidth){this.needVerifyLastColumnWidth=!1;for(let e=0;e<this.stretchAllColumnsWidth.length;e++)n+=this.stretchAllColumnsWidth[e];n!==Ot(Ct,this)&&(this.stretchAllColumnsWidth[this.stretchAllColumnsWidth.length-1]+=Ot(Ct,this)-n)}return this.stretchAllColumnsWidth[e]}_getStretchedLastColumnWidth(e){return e===Ot(Lt,this).call(this)-1?this.stretchLastWidth:null}_getColumnWidth(e){let t=Ot(_t,this).call(this,e);return isNaN(t)&&(t=yt["a"]),t}}function xt(e,t,n){return(t=Dt(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Dt(e){var t=At(e,"string");return"symbol"==typeof t?t:t+""}function At(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}class Ft{constructor(e,t){xt(this,"dataAccessObject",void 0),xt(this,"wtSettings",void 0),xt(this,"headerWidths",new Map),xt(this,"stretching",void 0),this.dataAccessObject=e,this.wtSettings=t,this.stretching=new Pt({totalColumns:()=>this.wtSettings.getSetting("totalColumns"),stretchMode:()=>this.wtSettings.getSetting("stretchH"),stretchingColumnWidthFn:(e,t)=>this.wtSettings.getSetting("onBeforeStretchingColumnWidth",e,t),columnWidthFn:e=>this.dataAccessObject.wtTable.getColumnWidth(e)})}getWidth(e){const t=this.wtSettings.getSetting("columnWidth",e)||this.wtSettings.getSetting("defaultColumnWidth");return t}getStretchedColumnWidth(e){let t=this.getWidth(e);const n=this.stretching.getStretchedColumnWidth(e,t);return n&&(t=n),t}getHeaderHeight(e){let t=this.wtSettings.getSetting("defaultRowHeight");const n=this.dataAccessObject.wtViewport.oversizedColumnHeaders[e];return void 0!==n&&(t=t?Math.max(t,n):n),t}getHeaderWidth(e){return this.headerWidths.get(this.dataAccessObject.wtTable.columnFilter.sourceToRendered(e))}refreshStretching(){const{wtTable:e,wtViewport:t,cloneSource:n}=this.dataAccessObject,i=n?n.wtTable.holder:e.holder,s=i.offsetHeight<i.scrollHeight?Object(r["getScrollbarWidth"])():0;this.stretching.refreshStretching(t.getViewportWidth()-s)}calculateWidths(){const{wtSettings:e}=this;let t=e.getSetting("rowHeaderWidth");if(this.refreshStretching(),t=e.getSetting("onModifyRowHeaderWidth",t),null!==t&&void 0!==t){const n=e.getSetting("rowHeaders").length,r=e.getSetting("defaultColumnWidth");for(let e=0;e<n;e++){let n=Array.isArray(t)?t[e]:t;n=null===n||void 0===n?r:n,this.headerWidths.set(e,n)}}}}function Yt(e,t,n){return(t=Ht(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ht(e){var t=kt(e,"string");return"symbol"==typeof t?t:t+""}function kt(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}class Vt{constructor(e,t){Yt(this,"dataAccessObject",void 0),Yt(this,"wtSettings",void 0),this.dataAccessObject=e,this.wtSettings=t}getHeight(e){let t=this.wtSettings.getSetting("rowHeight",e);const n=this.dataAccessObject.wtViewport.oversizedRows[e];return void 0!==n&&(t=void 0===t?n:Math.max(t,n)),t}getHeightByOverlayName(e,t){let n=this.wtSettings.getSetting("rowHeightByOverlayName",e,t);const r=this.dataAccessObject.wtViewport.oversizedRows[e];return void 0!==r&&(n=void 0===n?r:Math.max(n,r)),n}}const Ut="top",Wt="bottom",Xt="inline_start",jt="top_inline_start_corner",Zt="bottom_inline_start_corner",Qt=[Ut,Wt,Xt,jt,Zt],Kt=new Map([[Ut,"ht_clone_"+Ut],[Wt,"ht_clone_"+Wt],[Xt,`ht_clone_${Xt} ht_clone_left`],[jt,`ht_clone_${jt} ht_clone_top_left_corner`],[Zt,`ht_clone_${Zt} ht_clone_bottom_left_corner`]]);function Gt(e,t,n){return(t=Bt(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Bt(e){var t=Jt(e,"string");return"symbol"==typeof t?t:t+""}function Jt(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}class zt{constructor(e,t,n,i,s){Gt(this,"wtSettings",null),Gt(this,"domBindings",void 0),Gt(this,"TBODY",null),Gt(this,"THEAD",null),Gt(this,"COLGROUP",null),Gt(this,"hasTableHeight",!0),Gt(this,"hasTableWidth",!0),Gt(this,"isTableVisible",!1),Gt(this,"tableOffset",0),Gt(this,"holderOffset",0),this.domBindings=n,this.isMaster="master"===s,this.name=s,this.dataAccessObject=e,this.facadeGetter=t,this.wtSettings=i,this.instance=this.dataAccessObject.wot,this.wot=this.dataAccessObject.wot,this.TABLE=n.rootTable,Object(r["removeTextNodes"])(this.TABLE),this.spreader=this.createSpreader(this.TABLE),this.hider=this.createHider(this.spreader),this.holder=this.createHolder(this.hider),this.wtRootElement=this.holder.parentNode,this.isMaster&&this.alignOverlaysWithTrimmingContainer(),this.fixTableDomTree(),this.rowFilter=null,this.columnFilter=null,this.correctHeaderWidth=!1;const o=this.wtSettings.getSettingPure("rowHeaderWidth");this.wtSettings.update("rowHeaderWidth",()=>this._modifyRowHeaderWidth(o)),this.rowUtils=new Vt(this.dataAccessObject,this.wtSettings),this.columnUtils=new Ft(this.dataAccessObject,this.wtSettings),this.tableRenderer=new Rt({TABLE:this.TABLE,THEAD:this.THEAD,COLGROUP:this.COLGROUP,TBODY:this.TBODY,rowUtils:this.rowUtils,columnUtils:this.columnUtils,cellRenderer:this.wtSettings.getSettingPure("cellRenderer")})}is(e){return this.name===e}fixTableDomTree(){const e=this.domBindings.rootDocument;this.TBODY=this.TABLE.querySelector("tbody"),this.TBODY||(this.TBODY=e.createElement("tbody"),this.TABLE.appendChild(this.TBODY)),this.THEAD=this.TABLE.querySelector("thead"),this.THEAD||(this.THEAD=e.createElement("thead"),this.TABLE.insertBefore(this.THEAD,this.TBODY)),this.COLGROUP=this.TABLE.querySelector("colgroup"),this.COLGROUP||(this.COLGROUP=e.createElement("colgroup"),this.TABLE.insertBefore(this.COLGROUP,this.THEAD))}createSpreader(e){const t=e.parentNode;let n;return t&&t.nodeType===Node.ELEMENT_NODE&&Object(r["hasClass"])(t,"wtHolder")||(n=this.domBindings.rootDocument.createElement("div"),n.className="wtSpreader",t&&t.insertBefore(n,e),n.appendChild(e)),n.style.position="relative",this.wtSettings.getSetting("ariaTags")&&Object(r["setAttribute"])(n,[Object(Ge["y"])()]),n}createHider(e){const t=e.parentNode;let n;return t&&t.nodeType===Node.ELEMENT_NODE&&Object(r["hasClass"])(t,"wtHolder")||(n=this.domBindings.rootDocument.createElement("div"),n.className="wtHider",t&&t.insertBefore(n,e),n.appendChild(e)),this.wtSettings.getSetting("ariaTags")&&Object(r["setAttribute"])(n,[Object(Ge["y"])()]),n}createHolder(e){const t=e.parentNode;let n;return t&&t.nodeType===Node.ELEMENT_NODE&&Object(r["hasClass"])(t,"wtHolder")||(n=this.domBindings.rootDocument.createElement("div"),n.style.position="relative",n.className="wtHolder",t&&t.insertBefore(n,e),this.isMaster&&(n.parentNode.className+="ht_master handsontable",n.parentNode.setAttribute("dir",this.wtSettings.getSettingPure("rtlMode")?"rtl":"ltr"),this.wtSettings.getSetting("ariaTags")&&Object(r["setAttribute"])(n.parentNode,[Object(Ge["y"])()])),n.appendChild(e)),this.wtSettings.getSetting("ariaTags")&&Object(r["setAttribute"])(n,[Object(Ge["y"])()]),n}draw(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];const{wtSettings:t}=this,{wtOverlays:n,wtViewport:i}=this.dataAccessObject,s=t.getSetting("totalRows"),o=t.getSetting("totalColumns"),a=t.getSetting("rowHeaders"),l=a.length,c=t.getSetting("columnHeaders"),u=c.length;let h=e;if(this.isMaster&&(n.beforeDraw(),this.holderOffset=Object(r["offset"])(this.holder),h=i.createCalculators(h),l&&!t.getSetting("fixedColumnsStart"))){const e=n.inlineStartOverlay.getScrollPosition(),t=this.correctHeaderWidth;this.correctHeaderWidth=0!==e,t!==this.correctHeaderWidth&&(h=!1)}if(h)this.isMaster&&n.refresh(!0);else{this.isMaster?this.tableOffset=Object(r["offset"])(this.TABLE):this.tableOffset=this.dataAccessObject.parentTableOffset;const e=s>0?this.getFirstRenderedRow():0,t=o>0?this.getFirstRenderedColumn():0;this.rowFilter=new Te(e,s,u),this.columnFilter=new ye(t,o,l);let h=!0;if(this.isMaster){this.alignOverlaysWithTrimmingContainer();const e={};this.wtSettings.getSetting("beforeDraw",!0,e),h=!0!==e.skipRender}if(h){let e;if(this.tableRenderer.setHeaderContentRenderers(a,c),(this.is(Wt)||this.is(Zt))&&this.tableRenderer.setHeaderContentRenderers(a,[]),this.resetOversizedRows(),this.tableRenderer.setActiveOverlayName(this.name).setViewportSize(this.getRenderedRowsCount(),this.getRenderedColumnsCount()).setFilters(this.rowFilter,this.columnFilter).render(),this.isMaster&&(e=this.dataAccessObject.workspaceWidth,i.containerWidth=null,this.markOversizedColumnHeaders()),this.adjustColumnHeaderHeights(),(this.isMaster||this.is(Wt))&&this.markOversizedRows(),this.isMaster){this.wtSettings.getSetting("externalRowCalculator")||i.createVisibleCalculators(),n.refresh(!1),n.applyToDOM();const t=Object(r["outerWidth"])(this.hider),s=Object(r["outerWidth"])(this.TABLE);0!==t&&s!==t&&(this.columnUtils.calculateWidths(),this.tableRenderer.renderer.colGroup.render()),e!==i.getWorkspaceWidth()&&(i.containerWidth=null,this.columnUtils.calculateWidths(),this.tableRenderer.renderer.colGroup.render()),this.wtSettings.getSetting("onDraw",!0)}else this.is(Wt)&&this.dataAccessObject.cloneSource.wtOverlays.adjustElementsSize()}}let d=!1;return this.isMaster&&(d=n.topOverlay.resetFixedPosition(),n.bottomOverlay.clone&&(d=n.bottomOverlay.resetFixedPosition()||d),d=n.inlineStartOverlay.resetFixedPosition()||d,n.topInlineStartCornerOverlay&&n.topInlineStartCornerOverlay.resetFixedPosition(),n.bottomInlineStartCornerOverlay&&n.bottomInlineStartCornerOverlay.clone&&n.bottomInlineStartCornerOverlay.resetFixedPosition()),d?(n.refreshAll(),n.adjustElementsSize()):this.dataAccessObject.selectionManager.setActiveOverlay(this.facadeGetter()).render(h),this.isMaster&&n.afterDraw(),this.dataAccessObject.drawn=!0,this}markIfOversizedColumnHeader(e){const t=this.columnFilter.renderedToSource(e);let n=this.wtSettings.getSetting("columnHeaders").length;const i=this.wtSettings.getSetting("defaultRowHeight");let s,o,a;const l=this.wtSettings.getSetting("columnHeaderHeight")||[];while(n)n-=1,s=this.getColumnHeaderHeight(n),o=this.getColumnHeader(t,n),o&&(a=Object(r["innerHeight"])(o),(!s&&i<a||s<a)&&(this.dataAccessObject.wtViewport.oversizedColumnHeaders[n]=a),Array.isArray(l)?null!==l[n]&&void 0!==l[n]&&(this.dataAccessObject.wtViewport.oversizedColumnHeaders[n]=l[n]):isNaN(l)||(this.dataAccessObject.wtViewport.oversizedColumnHeaders[n]=l),this.dataAccessObject.wtViewport.oversizedColumnHeaders[n]<(l[n]||l)&&(this.dataAccessObject.wtViewport.oversizedColumnHeaders[n]=l[n]||l))}adjustColumnHeaderHeights(){const{wtSettings:e}=this,t=this.THEAD.childNodes,n=this.dataAccessObject.wtViewport.oversizedColumnHeaders,r=e.getSetting("columnHeaders");for(let i=0,s=r.length;i<s;i++)if(n[i]){if(!t[i]||0===t[i].childNodes.length)return;t[i].childNodes[0].style.height=n[i]+"px"}}resetOversizedRows(){const{wtSettings:e}=this,{wtViewport:t}=this.dataAccessObject;if((this.isMaster||this.is(Wt))&&!e.getSetting("externalRowCalculator")){const e=this.getRenderedRowsCount();for(let n=0;n<e;n++){const e=this.rowFilter.renderedToSource(n);t.oversizedRows&&t.oversizedRows[e]&&(t.oversizedRows[e]=void 0)}}}getCell(e){let t=e.row,n=e.col;const r=this.wtSettings.getSetting("onModifyGetCellCoords",t,n);if(r&&Array.isArray(r)&&([t,n]=r),this.isRowBeforeRenderedRows(t))return-1;if(this.isRowAfterRenderedRows(t))return-2;if(this.isColumnBeforeRenderedColumns(n))return-3;if(this.isColumnAfterRenderedColumns(n))return-4;const i=this.getRow(t);if(!i&&t>=0)throw new Error("TR was expected to be rendered but is not");const s=i.childNodes[this.columnFilter.sourceColumnToVisibleRowHeadedColumn(n)];if(!s&&n>=0)throw new Error("TD or TH was expected to be rendered but is not");return s}getRow(e){let t=null,n=null;var r,i;e<0?(t=null===(r=this.rowFilter)||void 0===r?void 0:r.sourceRowToVisibleColHeadedRow(e),n=this.THEAD):(t=null===(i=this.rowFilter)||void 0===i?void 0:i.sourceToRendered(e),n=this.TBODY);return void 0!==t&&void 0!==n&&(!(n.childNodes.length<t+1)&&n.childNodes[t])}getColumnHeader(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;const n=this.THEAD.childNodes[t];return null===n||void 0===n?void 0:n.childNodes[this.columnFilter.sourceColumnToVisibleRowHeadedColumn(e)]}getColumnHeaders(e){const t=[],n=this.columnFilter.sourceColumnToVisibleRowHeadedColumn(e);return this.THEAD.childNodes.forEach(e=>{const r=e.childNodes[n];r&&t.push(r)}),t}getRowHeader(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;const n=this.wtSettings.getSetting("rowHeaders").length;if(t>=n)return;const r=this.rowFilter.sourceToRendered(e),i=r<0?this.rowFilter.sourceRowToVisibleColHeadedRow(e):r,s=r<0?this.THEAD:this.TBODY,o=s.childNodes[i];return null===o||void 0===o?void 0:o.childNodes[t]}getRowHeaders(e){const t=[],n=this.wtSettings.getSetting("rowHeaders").length;for(let r=0;r<n;r++){const n=this.TBODY.childNodes[this.rowFilter.sourceToRendered(e)],i=null===n||void 0===n?void 0:n.childNodes[r];i&&t.push(i)}return t}getCoords(e){let t=e;if("TD"!==t.nodeName&&"TH"!==t.nodeName&&(t=Object(r["closest"])(t,["TD","TH"])),null===t)return null;const n=t.parentNode,i=n.parentNode;let s=Object(r["index"])(n),o=t.cellIndex;if(Object(r["overlayContainsElement"])(jt,t,this.wtRootElement)||Object(r["overlayContainsElement"])(Ut,t,this.wtRootElement))"THEAD"===i.nodeName&&(s-=i.childNodes.length);else if(Object(r["overlayContainsElement"])(Zt,t,this.wtRootElement)||Object(r["overlayContainsElement"])(Wt,t,this.wtRootElement)){const e=this.wtSettings.getSetting("totalRows");s=e-i.childNodes.length+s}else s=i===this.THEAD?this.rowFilter.visibleColHeadedRowToSourceRow(s):this.rowFilter.renderedToSource(s);return o=Object(r["overlayContainsElement"])(jt,t,this.wtRootElement)||Object(r["overlayContainsElement"])(Xt,t,this.wtRootElement)||Object(r["overlayContainsElement"])(Zt,t,this.wtRootElement)?this.columnFilter.offsettedTH(o):this.columnFilter.visibleRowHeadedColumnToSourceColumn(o),this.wot.createCellCoords(s,o)}markOversizedRows(){if(this.wtSettings.getSetting("externalRowCalculator"))return;let e=this.TBODY.childNodes.length;const t=e*this.wtSettings.getSetting("defaultRowHeight"),n=Object(r["innerHeight"])(this.TBODY)-1;let i,s,o,a,l;if(t!==n||this.wtSettings.getSetting("fixedRowsBottom"))while(e)e-=1,o=this.rowFilter.renderedToSource(e),i=this.getRowHeight(o),a=this.getTrForRow(o),l=a.querySelector("th"),s=l?Object(r["innerHeight"])(l):Object(r["innerHeight"])(a)-1,(!i&&this.wtSettings.getSetting("defaultRowHeight")<s||i<s)&&(s+=1,this.dataAccessObject.wtViewport.oversizedRows[o]=s)}getTrForRow(e){return this.TBODY.childNodes[this.rowFilter.sourceToRendered(e)]}isColumnHeaderRendered(e){if(e>=0)return!1;const t=this.wtSettings.getSetting("rowHeaders"),n=t.length;return Math.abs(e)<=n}isRowHeaderRendered(e){if(e>=0)return!1;const t=this.wtSettings.getSetting("columnHeaders"),n=t.length;return Math.abs(e)<=n}isRowBeforeRenderedRows(e){const t=this.getFirstRenderedRow();return e<0&&t<=0?!this.isRowHeaderRendered(e):e<t}isRowAfterRenderedRows(e){return e>this.getLastRenderedRow()}isColumnBeforeRenderedColumns(e){const t=this.getFirstRenderedColumn();return e<0&&t<=0?!this.isColumnHeaderRendered(e):e<t}isColumnAfterRenderedColumns(e){return this.columnFilter&&e>this.getLastRenderedColumn()}isColumnAfterViewport(e){return this.columnFilter&&e>this.getLastVisibleColumn()}isRowAfterViewport(e){return this.rowFilter&&e>this.getLastVisibleRow()}isColumnBeforeViewport(e){return this.columnFilter&&this.columnFilter.sourceToRendered(e)<0&&e>=0}isLastRowFullyVisible(){return this.getLastVisibleRow()===this.getLastRenderedRow()}isLastColumnFullyVisible(){return this.getLastVisibleColumn()===this.getLastRenderedColumn()}allRowsInViewport(){return this.wtSettings.getSetting("totalRows")===this.getVisibleRowsCount()}allColumnsInViewport(){return this.wtSettings.getSetting("totalColumns")===this.getVisibleColumnsCount()}getRowHeight(e){return this.rowUtils.getHeight(e)}getColumnHeaderHeight(e){return this.columnUtils.getHeaderHeight(e)}getColumnWidth(e){return this.columnUtils.getWidth(e)}getStretchedColumnWidth(e){return this.columnUtils.getStretchedColumnWidth(e)}hasDefinedSize(){return this.hasTableHeight&&this.hasTableWidth}getWidth(){return Object(r["outerWidth"])(this.TABLE)}getHeight(){return Object(r["outerHeight"])(this.TABLE)}getTotalWidth(){const e=Object(r["outerWidth"])(this.hider);return 0!==e?e:this.getWidth()}getTotalHeight(){const e=Object(r["outerHeight"])(this.hider);return 0!==e?e:this.getHeight()}isVisible(){return Object(r["isVisible"])(this.TABLE)}_modifyRowHeaderWidth(e){let t=Object(i["isFunction"])(e)?e():null;return Array.isArray(t)?(t=[...t],t[t.length-1]=this._correctRowHeaderWidth(t[t.length-1])):t=this._correctRowHeaderWidth(t),t}_correctRowHeaderWidth(e){let t=e;return"number"!==typeof e&&(t=this.wtSettings.getSetting("defaultColumnWidth")),this.correctHeaderWidth&&(t+=1),t}}var $t=zt;const qt="stickyRowsTop",en={getFirstRenderedRow(){const e=this.wtSettings.getSetting("totalRows");return 0===e?-1:0},getFirstVisibleRow(){return this.getFirstRenderedRow()},getFirstPartiallyVisibleRow(){return this.getFirstRenderedRow()},getLastRenderedRow(){return this.getRenderedRowsCount()-1},getLastVisibleRow(){return this.getLastRenderedRow()},getLastPartiallyVisibleRow(){return this.getLastRenderedRow()},getRenderedRowsCount(){const e=this.wtSettings.getSetting("totalRows");return Math.min(this.wtSettings.getSetting("fixedRowsTop"),e)},getVisibleRowsCount(){return this.getRenderedRowsCount()},getColumnHeadersCount(){return this.dataAccessObject.columnHeaders.length}};Object(T["defineGetter"])(en,"MIXIN_NAME",qt,{writable:!1,enumerable:!1});var tn=en;const nn="calculatedColumns",rn={getFirstRenderedColumn(){const e=this.dataAccessObject.startColumnRendered;return null===e?-1:e},getFirstVisibleColumn(){const e=this.dataAccessObject.startColumnVisible;return null===e?-1:e},getFirstPartiallyVisibleColumn(){const e=this.dataAccessObject.startColumnPartiallyVisible;return null===e?-1:e},getLastRenderedColumn(){const e=this.dataAccessObject.endColumnRendered;return null===e?-1:e},getLastVisibleColumn(){const e=this.dataAccessObject.endColumnVisible;return null===e?-1:e},getLastPartiallyVisibleColumn(){const e=this.dataAccessObject.endColumnPartiallyVisible;return null===e?-1:e},getRenderedColumnsCount(){return this.dataAccessObject.countColumnsRendered},getVisibleColumnsCount(){return this.dataAccessObject.countColumnsVisible},getRowHeadersCount(){return this.dataAccessObject.rowHeaders.length}};Object(T["defineGetter"])(rn,"MIXIN_NAME",nn,{writable:!1,enumerable:!1});var sn=rn;class on extends $t{constructor(e,t,n,r){super(e,t,n,r,Ut)}}Object(T["mixin"])(on,tn),Object(T["mixin"])(on,sn);var an=on;function ln(e,t){cn(e,t),t.add(e)}function cn(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function un(e,t,n){return(t=hn(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function hn(e){var t=dn(e,"string");return"symbol"==typeof t?t:t+""}function dn(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function mn(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}var gn=new WeakSet;class pn{constructor(e){ln(this,gn),un(this,"dataAccessObject",void 0),this.dataAccessObject=e}scrollViewport(e,t,n,r,i){const s=this.scrollViewportHorizontally(e.col,n,i),o=this.scrollViewportVertically(e.row,t,r);return s||o}scrollViewportHorizontally(e,t,n){const{drawn:r,totalColumns:i}=this.dataAccessObject;if(!r||!Number.isInteger(e)||e<0||e>i)return!1;const s=void 0===t&&void 0===n,{fixedColumnsStart:o,inlineStartOverlay:a}=this.dataAccessObject;if(s&&e<o)return!1;if(e=this.dataAccessObject.wtSettings.getSetting("onBeforeViewportScrollHorizontally",e),!Number.isInteger(e)||e<0||e>i)return!1;const l=this.getFirstVisibleColumn(),c=this.getLastVisibleColumn();let u=!1;return(s&&(e<l||e>c)||!s)&&(u=a.scrollTo(e,s?e>=this.getLastPartiallyVisibleColumn():t)),u}scrollViewportVertically(e,t,n){const{drawn:r,totalRows:i}=this.dataAccessObject;if(!r||!Number.isInteger(e)||e<0||e>i)return!1;const s=void 0===t&&void 0===n,{fixedRowsBottom:o,fixedRowsTop:a,topOverlay:l}=this.dataAccessObject;if(s&&(e<a||e>i-o-1))return!1;if(e=this.dataAccessObject.wtSettings.getSetting("onBeforeViewportScrollVertically",e),!Number.isInteger(e)||e<0||e>i)return!1;const c=this.getFirstVisibleRow(),u=this.getLastVisibleRow();let h=!1;return(s&&(e<c||e>u)||!s)&&(h=l.scrollTo(e,s?e>=this.getLastPartiallyVisibleRow():n)),h}getFirstVisibleRow(){return this.dataAccessObject.wtTable.getFirstVisibleRow()}getLastVisibleRow(){return mn(gn,this,Rn).call(this,this.dataAccessObject.wtTable.getLastVisibleRow())}getFirstPartiallyVisibleRow(){return this.dataAccessObject.wtTable.getFirstPartiallyVisibleRow()}getLastPartiallyVisibleRow(){return mn(gn,this,Rn).call(this,this.dataAccessObject.wtTable.getLastPartiallyVisibleRow())}getFirstVisibleColumn(){return this.dataAccessObject.wtTable.getFirstVisibleColumn()}getLastVisibleColumn(){return mn(gn,this,fn).call(this,this.dataAccessObject.wtTable.getLastVisibleColumn())}getFirstPartiallyVisibleColumn(){return this.dataAccessObject.wtTable.getFirstPartiallyVisibleColumn()}getLastPartiallyVisibleColumn(){return mn(gn,this,fn).call(this,this.dataAccessObject.wtTable.getLastPartiallyVisibleColumn())}}function fn(e){const{wtSettings:t,inlineStartOverlay:n,wtTable:i,wtViewport:s,totalColumns:o,rootWindow:a}=this.dataAccessObject;if(n.mainTableScrollableElement===a){const l=t.getSetting("rtlMode");let c=null;if(l){const e=i.TABLE.getBoundingClientRect(),t=this.dataAccessObject.rootWindow.document,n=t.documentElement.offsetWidth;c=Math.abs(e.right-n)}else{const e=Object(r["offset"])(i.wtRootElement);c=e.left}const u=Math.abs(Object(r["getScrollLeft"])(a,a));if(c>u){const t=Object(r["innerWidth"])(a);let i=s.getRowHeaderWidth();for(let r=1;r<=o;r++)if(i+=n.sumCellSizes(r-1,r),c+i-u>=t){e=r-2;break}}}return e}function Rn(e){const{topOverlay:t,wtTable:n,wtViewport:i,totalRows:s,rootWindow:o}=this.dataAccessObject;if(t.mainTableScrollableElement===o){const a=Object(r["offset"])(n.wtRootElement),l=Object(r["getScrollTop"])(o,o);if(a.top>l){const n=Object(r["innerHeight"])(o);let c=i.getColumnHeaderHeight();for(let r=1;r<=s;r++)if(c+=t.sumCellSizes(r-1,r),a.top+c-l>=n){e=r-2;break}}}return e}var yn=pn,Mn=n("0716"),Sn=n("d852");function bn(e,t,n){return(t=wn(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function wn(e){var t=Tn(e,"string");return"symbol"==typeof t?t:t+""}function Tn(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}class On{get eventManager(){return new u["a"](this)}constructor(e,t){bn(this,"wtTable",void 0),bn(this,"wtScroll",void 0),bn(this,"wtViewport",void 0),bn(this,"wtOverlays",void 0),bn(this,"selectionManager",void 0),bn(this,"wtEvent",void 0),bn(this,"guid","wt_"+Object(G["randomString"])()),bn(this,"drawInterrupted",!1),bn(this,"drawn",!1),bn(this,"domBindings",void 0),bn(this,"wtSettings",void 0),this.domBindings={rootTable:e,rootDocument:e.ownerDocument,rootWindow:e.ownerDocument.defaultView},this.wtSettings=t,this.wtScroll=new yn(this.createScrollDao())}findOriginalHeaders(){const e=[];if(this.wtTable.THEAD.childNodes.length&&this.wtTable.THEAD.childNodes[0].childNodes.length){for(let t=0,n=this.wtTable.THEAD.childNodes[0].childNodes.length;t<n;t++)e.push(this.wtTable.THEAD.childNodes[0].childNodes[t].innerHTML);this.wtSettings.getSetting("columnHeaders").length||this.wtSettings.update("columnHeaders",[function(t,n){Object(r["fastInnerText"])(n,e[t])}])}}createCellCoords(e,t){return new Mn["a"](e,t,this.wtSettings.getSetting("rtlMode"))}createCellRange(e,t,n){return new Sn["a"](e,t,n,this.wtSettings.getSetting("rtlMode"))}draw(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return this.drawInterrupted=!1,this.wtTable.isVisible()?this.wtTable.draw(e):this.drawInterrupted=!0,this}getCell(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(!t)return this.wtTable.getCell(e);const n=this.wtSettings.getSetting("totalRows"),r=this.wtSettings.getSetting("fixedRowsTop"),i=this.wtSettings.getSetting("fixedRowsBottom"),s=this.wtSettings.getSetting("fixedColumnsStart");if(e.row<r&&e.col<s)return this.wtOverlays.topInlineStartCornerOverlay.clone.wtTable.getCell(e);if(e.row<r)return this.wtOverlays.topOverlay.clone.wtTable.getCell(e);if(e.col<s&&e.row>=n-i){if(this.wtOverlays.bottomInlineStartCornerOverlay&&this.wtOverlays.bottomInlineStartCornerOverlay.clone)return this.wtOverlays.bottomInlineStartCornerOverlay.clone.wtTable.getCell(e)}else{if(e.col<s)return this.wtOverlays.inlineStartOverlay.clone.wtTable.getCell(e);if(e.row<n&&e.row>=n-i&&this.wtOverlays.bottomOverlay&&this.wtOverlays.bottomOverlay.clone)return this.wtOverlays.bottomOverlay.clone.wtTable.getCell(e)}return this.wtTable.getCell(e)}scrollViewport(e,t,n,r,i){return!(e.col<0||e.row<0)&&this.wtScroll.scrollViewport(e,t,n,r,i)}scrollViewportHorizontally(e,t,n){return!(e<0)&&this.wtScroll.scrollViewportHorizontally(e,t,n)}scrollViewportVertically(e,t,n){return!(e<0)&&this.wtScroll.scrollViewportVertically(e,t,n)}getViewport(){return[this.wtTable.getFirstVisibleRow(),this.wtTable.getFirstVisibleColumn(),this.wtTable.getLastVisibleRow(),this.wtTable.getLastVisibleColumn()]}destroy(){this.wtOverlays.destroy(),this.wtEvent.destroy()}createScrollDao(){const e=this;return{get drawn(){return e.drawn},get topOverlay(){return e.wtOverlays.topOverlay},get inlineStartOverlay(){return e.wtOverlays.inlineStartOverlay},get wtTable(){return e.wtTable},get wtViewport(){return e.wtViewport},get wtSettings(){return e.wtSettings},get rootWindow(){return e.domBindings.rootWindow},get totalRows(){return e.wtSettings.getSetting("totalRows")},get totalColumns(){return e.wtSettings.getSetting("totalColumns")},get fixedRowsTop(){return e.wtSettings.getSetting("fixedRowsTop")},get fixedRowsBottom(){return e.wtSettings.getSetting("fixedRowsBottom")},get fixedColumnsStart(){return e.wtSettings.getSetting("fixedColumnsStart")}}}getTableDao(){const e=this;return{get wot(){return e},get parentTableOffset(){return e.cloneSource.wtTable.tableOffset},get cloneSource(){return e.cloneSource},get workspaceWidth(){return e.wtViewport.getWorkspaceWidth()},get wtViewport(){return e.wtViewport},get wtOverlays(){return e.wtOverlays},get selectionManager(){return e.selectionManager},get drawn(){return e.drawn},set drawn(t){e.drawn=t},get wtTable(){return e.wtTable},get startColumnRendered(){return e.wtViewport.columnsRenderCalculator.startColumn},get startColumnVisible(){return e.wtViewport.columnsVisibleCalculator.startColumn},get startColumnPartiallyVisible(){return e.wtViewport.columnsPartiallyVisibleCalculator.startColumn},get endColumnRendered(){return e.wtViewport.columnsRenderCalculator.endColumn},get endColumnVisible(){return e.wtViewport.columnsVisibleCalculator.endColumn},get endColumnPartiallyVisible(){return e.wtViewport.columnsPartiallyVisibleCalculator.endColumn},get countColumnsRendered(){return e.wtViewport.columnsRenderCalculator.count},get countColumnsVisible(){return e.wtViewport.columnsVisibleCalculator.count},get startRowRendered(){return e.wtViewport.rowsRenderCalculator.startRow},get startRowVisible(){return e.wtViewport.rowsVisibleCalculator.startRow},get startRowPartiallyVisible(){return e.wtViewport.rowsPartiallyVisibleCalculator.startRow},get endRowRendered(){return e.wtViewport.rowsRenderCalculator.endRow},get endRowVisible(){return e.wtViewport.rowsVisibleCalculator.endRow},get endRowPartiallyVisible(){return e.wtViewport.rowsPartiallyVisibleCalculator.endRow},get countRowsRendered(){return e.wtViewport.rowsRenderCalculator.count},get countRowsVisible(){return e.wtViewport.rowsVisibleCalculator.count},get columnHeaders(){return e.wtSettings.getSetting("columnHeaders")},get rowHeaders(){return e.wtSettings.getSetting("rowHeaders")}}}}function vn(e,t,n){return(t=En(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function En(e){var t=Cn(e,"string");return"symbol"==typeof t?t:t+""}function Cn(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}class Ln extends On{constructor(e,t,n){super(e,t),vn(this,"cloneSource",void 0),vn(this,"cloneOverlay",void 0);const r=this.wtSettings.getSetting("facade",this);this.cloneSource=n.source,this.cloneOverlay=n.overlay,this.wtTable=this.cloneOverlay.createTable(this.getTableDao(),r,this.domBindings,this.wtSettings),this.wtViewport=n.viewport,this.selectionManager=n.selectionManager,this.wtEvent=new me(r,this.domBindings,this.wtSettings,this.eventManager,this.wtTable,this.selectionManager,n.event),this.findOriginalHeaders()}}function Nn(e,t,n){return(t=_n(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function _n(e){var t=In(e,"string");return"symbol"==typeof t?t:t+""}function In(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}class Pn{constructor(e,t,n,i,s){Nn(this,"wtSettings",null),Object(T["defineGetter"])(this,"wot",e,{writable:!1}),this.domBindings=s,this.facadeGetter=t,this.wtSettings=i;const{TABLE:o,hider:a,spreader:l,holder:c,wtRootElement:u}=this.wot.wtTable;this.instance=this.wot,this.type=n,this.mainTableScrollableElement=null,this.TABLE=o,this.hider=a,this.spreader=l,this.holder=c,this.wtRootElement=u,this.trimmingContainer=Object(r["getTrimmingContainer"])(this.hider.parentNode.parentNode),this.needFullRender=this.shouldBeRendered(),this.clone=this.makeClone()}hasRenderingStateChanged(){return this.needFullRender!==this.shouldBeRendered()}updateStateOfRendering(e){"before"===e&&this.shouldBeRendered()?this.needFullRender=!0:"after"!==e||this.shouldBeRendered()||(this.needFullRender=!1)}shouldBeRendered(){return!0}updateTrimmingContainer(){this.trimmingContainer=Object(r["getTrimmingContainer"])(this.hider.parentNode.parentNode)}updateMainScrollableElement(){const{wtTable:e}=this.wot,{rootWindow:t}=this.domBindings;"hidden"===t.getComputedStyle(e.wtRootElement.parentNode).getPropertyValue("overflow")?this.mainTableScrollableElement=this.wot.wtTable.holder:this.mainTableScrollableElement=Object(r["getScrollableElement"])(e.TABLE)}getRelativeCellPosition(e,t,n){if(!1===this.clone.wtTable.holder.contains(e))return void Object(O["b"])(`The provided element is not a child of the ${this.type} overlay`);const r=this.mainTableScrollableElement===this.domBindings.rootWindow,i=n<this.wtSettings.getSetting("fixedColumnsStart"),s=t<this.wtSettings.getSetting("fixedRowsTop"),o=t>=this.wtSettings.getSetting("totalRows")-this.wtSettings.getSetting("fixedRowsBottom"),a=this.clone.wtTable.spreader,l={start:this.getRelativeStartPosition(a),top:a.offsetTop},c={start:this.getRelativeStartPosition(e),top:e.offsetTop};let u=null;return u=r?this.getRelativeCellPositionWithinWindow(s,i,c,l):this.getRelativeCellPositionWithinHolder(s,o,i,c,l),u}getRelativeStartPosition(e){return this.isRtl()?e.offsetParent.offsetWidth-e.offsetLeft-e.offsetWidth:e.offsetLeft}getRelativeCellPositionWithinWindow(e,t,n,i){const s=this.wot.wtTable.wtRootElement.getBoundingClientRect();let o=0,a=0;if(t){let e=s.left;this.isRtl()&&(e=this.domBindings.rootWindow.innerWidth-(s.left+s.width+Object(r["getScrollbarWidth"])())),o=e<=0?-1*e:0}else o=i.start;if(e){const e=this.clone.wtTable.TABLE.getBoundingClientRect();a=e.top-s.top}else a=i.top;return{start:n.start+o,top:n.top+a}}getRelativeCellPositionWithinHolder(e,t,n,r,i){const s={horizontal:this.wot.wtOverlays.inlineStartOverlay.getScrollPosition(),vertical:this.wot.wtOverlays.topOverlay.getScrollPosition()};let o=0,a=0;if(n||(o=s.horizontal-i.start),t){const e=this.wot.wtTable.wtRootElement.getBoundingClientRect(),t=this.clone.wtTable.TABLE.getBoundingClientRect();a=-1*t.top+e.top}else e||(a=s.vertical-i.top);return{start:r.start-o,top:r.top-a}}makeClone(){if(-1===Qt.indexOf(this.type))throw new Error(`Clone type "${this.type}" is not supported.`);const{wtTable:e,wtSettings:t}=this.wot,{rootDocument:n,rootWindow:i}=this.domBindings,s=n.createElement("div"),o=n.createElement("table"),a=e.wtRootElement.parentNode;s.className=Kt.get(this.type)+" handsontable",s.setAttribute("dir",this.isRtl()?"rtl":"ltr"),s.style.position="absolute",s.style.top=0,s.style.overflow="visible",this.isRtl()?s.style.right=0:s.style.left=0,t.getSetting("ariaTags")&&Object(r["setAttribute"])(s,[Object(Ge["y"])()]),o.className=e.TABLE.className;const l=e.TABLE.getAttribute("role");l&&o.setAttribute("role",e.TABLE.getAttribute("role")),s.appendChild(o),a.appendChild(s);const c=this.wtSettings.getSetting("preventOverflow");return!0===c||"horizontal"===c&&this.type===Ut||"vertical"===c&&this.type===Xt?this.mainTableScrollableElement=i:"hidden"===i.getComputedStyle(a).getPropertyValue("overflow")?this.mainTableScrollableElement=e.holder:this.mainTableScrollableElement=Object(r["getScrollableElement"])(e.TABLE),new Ln(o,this.wtSettings,{source:this.wot,overlay:this,viewport:this.wot.wtViewport,event:this.wot.wtEvent,selectionManager:this.wot.selectionManager})}refresh(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.needFullRender&&this.clone.draw(e)}reset(){const e=this.clone.wtTable.holder,t=this.clone.wtTable.hider,n=e.style,r=t.style,i=e.parentNode.style;[n,r,i].forEach(e=>{e.width="",e.height=""})}isRtl(){return this.wtSettings.getSetting("rtlMode")}destroy(){this.clone.eventManager.destroy()}}const xn=Object.freeze({width:"6px",height:"6px",borderWidth:"1px",borderStyle:"solid",borderColor:"#FFF"});function Dn(e,t,n){return(t=An(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function An(e){var t=Fn(e,"string");return"symbol"==typeof t?t:t+""}function Fn(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}class Yn extends Pn{constructor(e,t,n,r){super(e,t,Ut,n,r),Dn(this,"cachedFixedRowsTop",-1),this.cachedFixedRowsTop=this.wtSettings.getSetting("fixedRowsTop")}createTable(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new an(...t)}shouldBeRendered(){return this.wtSettings.getSetting("shouldRenderTopOverlay")}resetFixedPosition(){if(!this.needFullRender||!this.shouldBeRendered()||!this.wot.wtTable.holder.parentNode)return!1;const e=this.clone.wtTable.holder.parentNode,{rootWindow:t}=this.domBindings,n=this.wtSettings.getSetting("preventOverflow");let i=0,s=!1;if(this.trimmingContainer!==t||n&&"vertical"===n)i=this.getScrollPosition(),Object(r["resetCssTransform"])(e);else{const{wtTable:t}=this.wot,n=t.hider.getBoundingClientRect(),o=Math.ceil(n.bottom),a=e.offsetHeight;s=o===a,i=this.getOverlayOffset(),Object(r["setOverlayPosition"])(e,"0px",i+"px")}const o=this.adjustHeaderBordersPosition(i,s);return this.adjustElementsSize(),o}setScrollPosition(e){const t=this.domBindings.rootWindow;let n=!1;return this.mainTableScrollableElement===t&&t.scrollY!==e?(t.scrollTo(Object(r["getWindowScrollLeft"])(t),e),n=!0):this.mainTableScrollableElement.scrollTop!==e&&(this.mainTableScrollableElement.scrollTop=e,n=!0),n}onScroll(){this.wtSettings.getSetting("onScrollHorizontally")}sumCellSizes(e,t){const n=this.wtSettings.getSetting("defaultRowHeight");let r=e,i=0;while(r<t){const e=this.wot.wtTable.getRowHeight(r);i+=void 0===e?n:e,r+=1}return i}adjustElementsSize(){this.updateTrimmingContainer(),this.needFullRender&&(this.adjustRootElementSize(),this.adjustRootChildrenSize())}adjustRootElementSize(){const{wtTable:e}=this.wot,{rootDocument:t,rootWindow:n}=this.domBindings,i=Object(r["getScrollbarWidth"])(t),s=this.clone.wtTable.holder.parentNode,o=s.style,a=this.wtSettings.getSetting("preventOverflow");if(this.trimmingContainer!==n||"horizontal"===a){let t=this.wot.wtViewport.getWorkspaceWidth();this.wot.wtOverlays.hasScrollbarRight&&(t-=i),t=Math.min(t,e.wtRootElement.scrollWidth),o.width=t+"px"}else o.width="";this.clone.wtTable.holder.style.width=o.width;let l=Object(r["outerHeight"])(this.clone.wtTable.TABLE);this.wot.wtTable.hasDefinedSize()||(l=0),o.height=l+"px"}adjustRootChildrenSize(){const{holder:e}=this.clone.wtTable,t=this.wot.selectionManager.getFocusSelection()?parseInt(xn.height,10)/2:0;this.clone.wtTable.hider.style.width=this.hider.style.width,e.style.width=e.parentNode.style.width,e.style.height=parseInt(e.parentNode.style.height,10)+t+"px"}applyToDOM(){const e=this.wtSettings.getSetting("totalRows");if("number"===typeof this.wot.wtViewport.rowsRenderCalculator.startPosition)this.spreader.style.top=this.wot.wtViewport.rowsRenderCalculator.startPosition+"px";else{if(0!==e)throw new Error("Incorrect value of the rowsRenderCalculator");this.spreader.style.top="0"}this.spreader.style.bottom="",this.needFullRender&&this.syncOverlayOffset()}syncOverlayOffset(){const e=this.isRtl()?"right":"left",{spreader:t}=this.clone.wtTable;"number"===typeof this.wot.wtViewport.columnsRenderCalculator.startPosition?t.style[e]=this.wot.wtViewport.columnsRenderCalculator.startPosition+"px":t.style[e]=""}scrollTo(e,t){const{wot:n,wtSettings:i}=this,s=n.cloneSource?n.cloneSource:n,o=s.wtTable.holder,a=i.getSetting("columnHeaders"),l=i.getSetting("fixedRowsTop"),c=0===l&&a.length>0&&!Object(r["hasClass"])(o.parentNode,"innerBorderTop")?1:0;let u=this.getTableParentOffset(),h=0;if(t){const n=this.wot.wtTable.getRowHeight(e),r=this.wot.wtViewport.getViewportHeight();n>r&&(t=!1)}if(t&&o.offsetHeight!==o.clientHeight&&(h=Object(r["getScrollbarWidth"])(this.domBindings.rootDocument)),t){const t=i.getSetting("fixedRowsBottom"),r=i.getSetting("totalRows");u+=this.sumCellSizes(0,e+1),u-=n.wtViewport.getViewportHeight()-this.sumCellSizes(r-t,r),u+=1,u+=c}else u+=this.sumCellSizes(i.getSetting("fixedRowsTop"),e);return u+=h,Object(r["getMaximumScrollTop"])(this.mainTableScrollableElement)===u-c&&c>0&&this.wot.wtOverlays.expandHiderVerticallyBy(c),this.setScrollPosition(u)}getTableParentOffset(){return this.mainTableScrollableElement===this.domBindings.rootWindow?this.wot.wtTable.holderOffset.top:0}getScrollPosition(){return Object(r["getScrollTop"])(this.mainTableScrollableElement,this.domBindings.rootWindow)}getOverlayOffset(){const{rootWindow:e}=this.domBindings,t=this.wtSettings.getSetting("preventOverflow");let n=0;if(this.trimmingContainer===e&&(!t||"vertical"!==t)){const e=this.wot.wtTable.getTotalHeight(),t=this.clone.wtTable.getTotalHeight(),r=e-t;n=Math.max(this.getScrollPosition()-this.getTableParentOffset(),0),n>r&&(n=0)}return n}adjustHeaderBordersPosition(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const{wtSettings:n}=this,i=this.wot.wtTable.holder.parentNode,s=n.getSetting("totalColumns"),o="horizontal"===n.getSetting("preventOverflow");s?Object(r["removeClass"])(i,"emptyColumns"):Object(r["addClass"])(i,"emptyColumns");let a=!1;if(!t&&!o){const t=n.getSetting("fixedRowsTop"),s=this.cachedFixedRowsTop!==t,o=n.getSetting("columnHeaders");if((s||0===t)&&o.length>0){const t=Object(r["hasClass"])(i,"innerBorderTop");this.cachedFixedRowsTop=n.getSetting("fixedRowsTop"),e||0===n.getSetting("totalRows")?(Object(r["addClass"])(i,"innerBorderTop"),a=!t):(Object(r["removeClass"])(i,"innerBorderTop"),a=t)}}return a}}const Hn="stickyRowsBottom",kn={getFirstRenderedRow(){const e=this.wtSettings.getSetting("totalRows"),t=this.wtSettings.getSetting("fixedRowsBottom"),n=e-t;return 0===e||0===t?-1:n<0?0:n},getFirstVisibleRow(){return this.getFirstRenderedRow()},getFirstPartiallyVisibleRow(){return this.getFirstRenderedRow()},getLastRenderedRow(){return this.wtSettings.getSetting("totalRows")-1},getLastVisibleRow(){return this.getLastRenderedRow()},getLastPartiallyVisibleRow(){return this.getLastRenderedRow()},getRenderedRowsCount(){const e=this.wtSettings.getSetting("totalRows");return Math.min(this.wtSettings.getSetting("fixedRowsBottom"),e)},getVisibleRowsCount(){return this.getRenderedRowsCount()},getColumnHeadersCount(){return 0}};Object(T["defineGetter"])(kn,"MIXIN_NAME",Hn,{writable:!1,enumerable:!1});var Vn=kn;class Un extends $t{constructor(e,t,n,r){super(e,t,n,r,Wt)}}Object(T["mixin"])(Un,Vn),Object(T["mixin"])(Un,sn);var Wn=Un;function Xn(e,t,n){return(t=jn(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function jn(e){var t=Zn(e,"string");return"symbol"==typeof t?t:t+""}function Zn(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}class Qn extends Pn{constructor(e,t,n,r){super(e,t,Wt,n,r),Xn(this,"cachedFixedRowsBottom",-1),this.cachedFixedRowsBottom=this.wtSettings.getSetting("fixedRowsBottom")}createTable(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new Wn(...t)}shouldBeRendered(){return this.wtSettings.getSetting("shouldRenderBottomOverlay")}resetFixedPosition(){if(!this.needFullRender||!this.shouldBeRendered()||!this.wot.wtTable.holder.parentNode)return!1;const{rootWindow:e}=this.domBindings,t=this.clone.wtTable.holder.parentNode;t.style.top="";let n=0;const r=this.wtSettings.getSetting("preventOverflow");this.trimmingContainer!==e||r&&"vertical"===r?(n=this.getScrollPosition(),this.repositionOverlay()):(n=this.getOverlayOffset(),t.style.bottom=n+"px");const i=this.adjustHeaderBordersPosition(n);return this.adjustElementsSize(),i}repositionOverlay(){const{wtTable:e,wtViewport:t}=this.wot,{rootDocument:n}=this.domBindings,i=this.clone.wtTable.holder.parentNode;let s=0;t.hasVerticalScroll()||(s+=t.getWorkspaceHeight()-e.getTotalHeight()),t.hasVerticalScroll()&&t.hasHorizontalScroll()&&(s+=Object(r["getScrollbarWidth"])(n)),i.style.bottom=s+"px"}setScrollPosition(e){const{rootWindow:t}=this.domBindings;let n=!1;return this.mainTableScrollableElement===t?(t.scrollTo(Object(r["getWindowScrollLeft"])(t),e),n=!0):this.mainTableScrollableElement.scrollTop!==e&&(this.mainTableScrollableElement.scrollTop=e,n=!0),n}onScroll(){this.wtSettings.getSetting("onScrollHorizontally")}sumCellSizes(e,t){const{wtTable:n,wtSettings:r}=this.wot,i=r.getSetting("defaultRowHeight");let s=e,o=0;while(s<t){const e=n.getRowHeight(s);o+=void 0===e?i:e,s+=1}return o}adjustElementsSize(){this.updateTrimmingContainer(),this.needFullRender&&(this.adjustRootElementSize(),this.adjustRootChildrenSize())}adjustRootElementSize(){const{wtTable:e,wtViewport:t}=this.wot,{rootDocument:n,rootWindow:i}=this.domBindings,s=Object(r["getScrollbarWidth"])(n),o=this.clone.wtTable.holder.parentNode,a=o.style,l=this.wtSettings.getSetting("preventOverflow");if(this.trimmingContainer!==i||"horizontal"===l){let n=t.getWorkspaceWidth();this.wot.wtOverlays.hasScrollbarRight&&(n-=s),n=Math.min(n,e.wtRootElement.scrollWidth),a.width=n+"px"}else a.width="";this.clone.wtTable.holder.style.width=a.width;let c=Object(r["outerHeight"])(this.clone.wtTable.TABLE);this.wot.wtTable.hasDefinedSize()||(c=0),a.height=c+"px"}adjustRootChildrenSize(){const{holder:e}=this.clone.wtTable;this.clone.wtTable.hider.style.width=this.hider.style.width,e.style.width=e.parentNode.style.width,e.style.height=e.parentNode.style.height}applyToDOM(){const e=this.wtSettings.getSetting("totalRows");if("number"===typeof this.wot.wtViewport.rowsRenderCalculator.startPosition)this.spreader.style.top=this.wot.wtViewport.rowsRenderCalculator.startPosition+"px";else{if(0!==e)throw new Error("Incorrect value of the rowsRenderCalculator");this.spreader.style.top="0"}this.spreader.style.bottom="",this.needFullRender&&this.syncOverlayOffset()}syncOverlayOffset(){const e=this.isRtl()?"right":"left",{spreader:t}=this.clone.wtTable;"number"===typeof this.wot.wtViewport.columnsRenderCalculator.startPosition?t.style[e]=this.wot.wtViewport.columnsRenderCalculator.startPosition+"px":t.style[e]=""}scrollTo(e,t){let n=this.getTableParentOffset();const i=this.wot.cloneSource?this.wot.cloneSource:this.wot,s=i.wtTable.holder;let o=0;t&&s.offsetHeight!==s.clientHeight&&(o=Object(r["getScrollbarWidth"])(this.domBindings.rootDocument)),t?(n+=this.sumCellSizes(0,e+1),n-=this.wot.wtViewport.getViewportHeight(),n+=1):n+=this.sumCellSizes(this.wtSettings.getSetting("fixedRowsBottom"),e),n+=o,this.setScrollPosition(n)}getTableParentOffset(){return this.mainTableScrollableElement===this.domBindings.rootWindow?this.wot.wtTable.holderOffset.top:0}getScrollPosition(){return Object(r["getScrollTop"])(this.mainTableScrollableElement,this.domBindings.rootWindow)}getOverlayOffset(){const{rootWindow:e}=this.domBindings,t=this.wtSettings.getSetting("preventOverflow");let n=0;if(this.trimmingContainer===e&&(!t||"vertical"!==t)){const e=this.wot.wtTable.getTotalHeight(),t=this.clone.wtTable.getTotalHeight(),r=e-t,i=this.domBindings.rootDocument.documentElement.clientHeight;n=Math.max(this.getTableParentOffset()-this.getScrollPosition()-i+e,0),n>r&&(n=0)}return n}adjustHeaderBordersPosition(e){const t=this.wtSettings.getSetting("fixedRowsBottom"),n=this.cachedFixedRowsBottom!==t,i=this.wtSettings.getSetting("columnHeaders");let s=!1;if((n||0===t)&&i.length>0){const t=this.wot.wtTable.holder.parentNode,n=Object(r["hasClass"])(t,"innerBorderBottom");this.cachedFixedRowsBottom=this.wtSettings.getSetting("fixedRowsBottom"),e||0===this.wtSettings.getSetting("totalRows")?(Object(r["addClass"])(t,"innerBorderBottom"),s=!n):(Object(r["removeClass"])(t,"innerBorderBottom"),s=n)}return s}}const Kn="calculatedRows",Gn={getFirstRenderedRow(){const e=this.dataAccessObject.startRowRendered;return null===e?-1:e},getFirstVisibleRow(){const e=this.dataAccessObject.startRowVisible;return null===e?-1:e},getFirstPartiallyVisibleRow(){const e=this.dataAccessObject.startRowPartiallyVisible;return null===e?-1:e},getLastRenderedRow(){const e=this.dataAccessObject.endRowRendered;return null===e?-1:e},getLastVisibleRow(){const e=this.dataAccessObject.endRowVisible;return null===e?-1:e},getLastPartiallyVisibleRow(){const e=this.dataAccessObject.endRowPartiallyVisible;return null===e?-1:e},getRenderedRowsCount(){return this.dataAccessObject.countRowsRendered},getVisibleRowsCount(){return this.dataAccessObject.countRowsVisible},getColumnHeadersCount(){return this.dataAccessObject.columnHeaders.length}};Object(T["defineGetter"])(Gn,"MIXIN_NAME",Kn,{writable:!1,enumerable:!1});var Bn=Gn;const Jn="stickyColumnsStart",zn={getFirstRenderedColumn(){const e=this.wtSettings.getSetting("totalColumns");return 0===e?-1:0},getFirstVisibleColumn(){return this.getFirstRenderedColumn()},getFirstPartiallyVisibleColumn(){return this.getFirstRenderedColumn()},getLastRenderedColumn(){return this.getRenderedColumnsCount()-1},getLastVisibleColumn(){return this.getLastRenderedColumn()},getLastPartiallyVisibleColumn(){return this.getLastRenderedColumn()},getRenderedColumnsCount(){const e=this.wtSettings.getSetting("totalColumns");return Math.min(this.wtSettings.getSetting("fixedColumnsStart"),e)},getVisibleColumnsCount(){return this.getRenderedColumnsCount()},getRowHeadersCount(){return this.dataAccessObject.rowHeaders.length}};Object(T["defineGetter"])(zn,"MIXIN_NAME",Jn,{writable:!1,enumerable:!1});var $n=zn;class qn extends $t{constructor(e,t,n,r){super(e,t,n,r,Xt)}}Object(T["mixin"])(qn,Bn),Object(T["mixin"])(qn,$n);var er=qn;class tr extends Pn{constructor(e,t,n,r){super(e,t,Xt,n,r)}createTable(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new er(...t)}shouldBeRendered(){return this.wtSettings.getSetting("shouldRenderInlineStartOverlay")}resetFixedPosition(){const{wtTable:e}=this.wot;if(!this.needFullRender||!this.shouldBeRendered()||!e.holder.parentNode)return!1;const{rootWindow:t}=this.domBindings,n=this.clone.wtTable.holder.parentNode,i=this.wtSettings.getSetting("preventOverflow");let s=0;this.trimmingContainer!==t||i&&"horizontal"===i?(s=this.getScrollPosition(),Object(r["resetCssTransform"])(n)):(s=this.getOverlayOffset()*(this.isRtl()?-1:1),Object(r["setOverlayPosition"])(n,s+"px","0px"));const o=this.adjustHeaderBordersPosition(s);return this.adjustElementsSize(),o}setScrollPosition(e){const{rootWindow:t}=this.domBindings;let n=!1;return this.isRtl()&&(e=-e),this.mainTableScrollableElement===t&&t.scrollX!==e?(t.scrollTo(e,Object(r["getWindowScrollTop"])(t)),n=!0):this.mainTableScrollableElement.scrollLeft!==e&&(this.mainTableScrollableElement.scrollLeft=e,n=!0),n}onScroll(){this.wtSettings.getSetting("onScrollVertically")}sumCellSizes(e,t){const n=this.wtSettings.getSetting("defaultColumnWidth");let r=e,i=0;while(r<t)i+=this.wot.wtTable.getStretchedColumnWidth(r)||n,r+=1;return i}adjustElementsSize(){this.updateTrimmingContainer(),this.needFullRender&&(this.adjustRootElementSize(),this.adjustRootChildrenSize())}adjustRootElementSize(){const{wtTable:e}=this.wot,{rootDocument:t,rootWindow:n}=this.domBindings,i=Object(r["getScrollbarWidth"])(t),s=this.clone.wtTable.holder.parentNode,o=s.style,a=this.wtSettings.getSetting("preventOverflow");if(this.trimmingContainer!==n||"vertical"===a){let t=this.wot.wtViewport.getWorkspaceHeight();this.wot.wtOverlays.hasScrollbarBottom&&(t-=i),t=Math.min(t,e.wtRootElement.scrollHeight),o.height=t+"px"}else o.height="";this.clone.wtTable.holder.style.height=o.height;const l=Object(r["outerWidth"])(this.clone.wtTable.TABLE);o.width=l+"px"}adjustRootChildrenSize(){const{holder:e}=this.clone.wtTable,t=this.wot.selectionManager.getFocusSelection()?parseInt(xn.width,10)/2:0;this.clone.wtTable.hider.style.height=this.hider.style.height,e.style.height=e.parentNode.style.height,e.style.width=parseInt(e.parentNode.style.width,10)+t+"px"}applyToDOM(){const e=this.wtSettings.getSetting("totalColumns"),t=this.isRtl()?"right":"left";if("number"===typeof this.wot.wtViewport.columnsRenderCalculator.startPosition)this.spreader.style[t]=this.wot.wtViewport.columnsRenderCalculator.startPosition+"px";else{if(0!==e)throw new Error("Incorrect value of the columnsRenderCalculator");this.spreader.style[t]="0"}this.isRtl()?this.spreader.style.left="":this.spreader.style.right="",this.needFullRender&&this.syncOverlayOffset()}syncOverlayOffset(){"number"===typeof this.wot.wtViewport.rowsRenderCalculator.startPosition?this.clone.wtTable.spreader.style.top=this.wot.wtViewport.rowsRenderCalculator.startPosition+"px":this.clone.wtTable.spreader.style.top=""}scrollTo(e,t){const{wtSettings:n}=this,i=n.getSetting("rowHeaders"),s=n.getSetting("fixedColumnsStart"),o=this.wot.cloneSource?this.wot.cloneSource:this.wot,a=o.wtTable.holder,l=0===s&&i.length>0&&!Object(r["hasClass"])(a.parentNode,"innerBorderInlineStart")?1:0;let c=this.getTableParentOffset(),u=0;if(t){const n=this.wot.wtTable.getColumnWidth(e),r=this.wot.wtViewport.getViewportWidth();n>r&&(t=!1)}return t&&a.offsetWidth!==a.clientWidth&&(u=Object(r["getScrollbarWidth"])(this.domBindings.rootDocument)),t?(c+=this.sumCellSizes(0,e+1),c-=this.wot.wtViewport.getViewportWidth(),c+=l):c+=this.sumCellSizes(this.wtSettings.getSetting("fixedColumnsStart"),e),c+=u,Object(r["getMaximumScrollLeft"])(this.mainTableScrollableElement)===c-l&&l>0&&this.wot.wtOverlays.expandHiderHorizontallyBy(l),this.setScrollPosition(c)}getTableParentOffset(){const e=this.wtSettings.getSetting("preventOverflow");let t=0;return e||this.trimmingContainer!==this.domBindings.rootWindow||(t=this.wot.wtTable.holderOffset.left),t}getScrollPosition(){return Math.abs(Object(r["getScrollLeft"])(this.mainTableScrollableElement,this.domBindings.rootWindow))}getOverlayOffset(){const{rootWindow:e}=this.domBindings,t=this.wtSettings.getSetting("preventOverflow");let n=0;if(this.trimmingContainer===e&&(!t||"horizontal"!==t)){n=this.isRtl()?Math.abs(Math.min(this.getTableParentOffset()-this.getScrollPosition(),0)):Math.max(this.getScrollPosition()-this.getTableParentOffset(),0);const e=this.wot.wtTable.getTotalWidth(),t=this.clone.wtTable.getTotalWidth(),r=e-t;n>r&&(n=0)}return n}adjustHeaderBordersPosition(e){const{wtSettings:t}=this,n=this.wot.wtTable.holder.parentNode,i=t.getSetting("rowHeaders"),s=t.getSetting("fixedColumnsStart"),o=t.getSetting("totalRows"),a="vertical"===t.getSetting("preventOverflow");o?Object(r["removeClass"])(n,"emptyRows"):Object(r["addClass"])(n,"emptyRows");let l=!1;if(!a)if(s&&!i.length)Object(r["addClass"])(n,"innerBorderLeft innerBorderInlineStart");else if(!s&&i.length){const t=Object(r["hasClass"])(n,"innerBorderInlineStart");e?(Object(r["addClass"])(n,"innerBorderLeft innerBorderInlineStart"),l=!t):(Object(r["removeClass"])(n,"innerBorderLeft innerBorderInlineStart"),l=t)}return l}}class nr extends $t{constructor(e,t,n,r){super(e,t,n,r,jt)}}Object(T["mixin"])(nr,tn),Object(T["mixin"])(nr,$n);var rr=nr;function ir(e,t,n){return(t=sr(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function sr(e){var t=or(e,"string");return"symbol"==typeof t?t:t+""}function or(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}class ar extends Pn{constructor(e,t,n,r,i,s){super(e,t,jt,n,r),ir(this,"topOverlay",void 0),ir(this,"inlineStartOverlay",void 0),this.topOverlay=i,this.inlineStartOverlay=s}createTable(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new rr(...t)}shouldBeRendered(){return this.wtSettings.getSetting("shouldRenderTopOverlay")&&this.wtSettings.getSetting("shouldRenderInlineStartOverlay")}resetFixedPosition(){if(this.updateTrimmingContainer(),!this.wot.wtTable.holder.parentNode)return!1;const e=this.clone.wtTable.holder.parentNode;if(this.trimmingContainer===this.domBindings.rootWindow){const t=this.inlineStartOverlay.getOverlayOffset()*(this.isRtl()?-1:1),n=this.topOverlay.getOverlayOffset();Object(r["setOverlayPosition"])(e,t+"px",n+"px")}else Object(r["resetCssTransform"])(e);let t=Object(r["outerHeight"])(this.clone.wtTable.TABLE);const n=Object(r["outerWidth"])(this.clone.wtTable.TABLE);return this.wot.wtTable.hasDefinedSize()||(t=0),e.style.height=t+"px",e.style.width=n+"px",!1}}class lr extends $t{constructor(e,t,n,r){super(e,t,n,r,Zt)}}Object(T["mixin"])(lr,Vn),Object(T["mixin"])(lr,$n);var cr=lr;class ur extends Pn{constructor(e,t,n,r,i,s){super(e,t,Zt,n,r),this.bottomOverlay=i,this.inlineStartOverlay=s}createTable(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new cr(...t)}shouldBeRendered(){return this.wtSettings.getSetting("shouldRenderBottomOverlay")&&this.wtSettings.getSetting("shouldRenderInlineStartOverlay")}resetFixedPosition(){const{wot:e}=this;if(this.updateTrimmingContainer(),!e.wtTable.holder.parentNode)return!1;const t=this.clone.wtTable.holder.parentNode;if(t.style.top="",this.trimmingContainer===this.domBindings.rootWindow){const e=this.inlineStartOverlay.getOverlayOffset(),n=this.bottomOverlay.getOverlayOffset();t.style[this.isRtl()?"right":"left"]=e+"px",t.style.bottom=n+"px"}else Object(r["resetCssTransform"])(t),this.repositionOverlay();let n=Object(r["outerHeight"])(this.clone.wtTable.TABLE);const i=Object(r["outerWidth"])(this.clone.wtTable.TABLE);return this.wot.wtTable.hasDefinedSize()||(n=0),t.style.height=n+"px",t.style.width=i+"px",!1}repositionOverlay(){const{wtTable:e,wtViewport:t}=this.wot,{rootDocument:n}=this.domBindings,i=this.clone.wtTable.holder.parentNode;let s=0;t.hasVerticalScroll()||(s+=t.getWorkspaceHeight()-e.getTotalHeight()),t.hasVerticalScroll()&&t.hasHorizontalScroll()&&(s+=Object(r["getScrollbarWidth"])(n)),i.style.bottom=s+"px"}}function hr(e,t,n){dr(e,t),t.set(e,n)}function dr(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function mr(e,t,n){return(t=gr(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function gr(e){var t=pr(e,"string");return"symbol"==typeof t?t:t+""}function pr(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function fr(e,t,n){return e.set(yr(e,t),n),n}function Rr(e,t){return e.get(yr(e,t))}function yr(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}var Mr=new WeakMap,Sr=new WeakMap,br=new WeakMap,wr=new WeakMap;class Tr{constructor(e,t,n,i,s,o){mr(this,"wot",null),hr(this,Mr,[]),mr(this,"topOverlay",null),mr(this,"bottomOverlay",null),mr(this,"inlineStartOverlay",null),mr(this,"topInlineStartCornerOverlay",null),mr(this,"bottomInlineStartCornerOverlay",null),mr(this,"browserLineHeight",void 0),mr(this,"wtSettings",null),hr(this,Sr,!1),hr(this,br,0),hr(this,wr,null),mr(this,"resizeObserver",new ResizeObserver(e=>{Object(J["requestAnimationFrame"])(()=>{Array.isArray(e)&&e.length&&(fr(br,this,Rr(br,this)+1),100===Rr(br,this)&&(Object(O["b"])("The ResizeObserver callback was fired too many times in direct succession.\nThis may be due to an infinite loop caused by setting a dynamic height/width (for example, with the `dvh` units) to a Handsontable container's parent. \nThe observer will be disconnected."),this.resizeObserver.disconnect()),null!==Rr(wr,this)&&clearTimeout(Rr(wr,this)),fr(wr,this,setTimeout(()=>{fr(br,this,0)},100)),this.wtSettings.getSetting("onContainerElementResize"))})})),this.wot=e,this.wtSettings=i,this.domBindings=n,this.facadeGetter=t,this.wtTable=o;const{rootDocument:a,rootWindow:l}=this.domBindings;this.instance=this.wot,this.eventManager=s,this.scrollbarSize=Object(r["getScrollbarWidth"])(a);const c="hidden"===l.getComputedStyle(o.wtRootElement.parentNode).getPropertyValue("overflow");this.scrollableElement=c?o.holder:Object(r["getScrollableElement"])(o.TABLE),this.initOverlays(),this.hasScrollbarBottom=!1,this.hasScrollbarRight=!1,this.destroyed=!1,this.keyPressed=!1,this.spreaderLastSize={width:null,height:null},this.verticalScrolling=!1,this.horizontalScrolling=!1,this.initBrowserLineHeight(),this.registerListeners(),this.lastScrollX=l.scrollX,this.lastScrollY=l.scrollY}getOverlays(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];const t=[...Rr(Mr,this)];return e&&t.push(this.wtTable),t}initBrowserLineHeight(){const{rootWindow:e,rootDocument:t}=this.domBindings,n=e.getComputedStyle(t.body),r=parseInt(n.lineHeight,10),i=1.2*parseInt(n.fontSize,10);this.browserLineHeight=r||i}initOverlays(){const e=[this.wot,this.facadeGetter,this.wtSettings,this.domBindings];this.topOverlay=new Yn(...e),this.bottomOverlay=new Qn(...e),this.inlineStartOverlay=new tr(...e),this.topInlineStartCornerOverlay=new ar(...e,this.topOverlay,this.inlineStartOverlay),this.bottomInlineStartCornerOverlay=new ur(...e,this.bottomOverlay,this.inlineStartOverlay),fr(Mr,this,[this.topOverlay,this.bottomOverlay,this.inlineStartOverlay,this.topInlineStartCornerOverlay,this.bottomInlineStartCornerOverlay])}beforeDraw(){fr(Sr,this,Rr(Mr,this).reduce((e,t)=>t.hasRenderingStateChanged()||e,!1)),Rr(Mr,this).forEach(e=>e.updateStateOfRendering("before"))}afterDraw(){this.syncScrollWithMaster(),Rr(Mr,this).forEach(e=>{const t=e.hasRenderingStateChanged();e.updateStateOfRendering("after"),t&&!e.needFullRender&&e.reset()})}refreshAll(){this.wot.drawn&&(this.wtTable.holder.parentNode?(this.wot.draw(!0),this.verticalScrolling&&this.inlineStartOverlay.onScroll(),this.horizontalScrolling&&this.topOverlay.onScroll(),this.verticalScrolling=!1,this.horizontalScrolling=!1):this.destroy())}registerListeners(){const{rootDocument:e,rootWindow:t}=this.domBindings,{mainTableScrollableElement:n}=this.topOverlay,{mainTableScrollableElement:r}=this.inlineStartOverlay;this.eventManager.addEventListener(e.documentElement,"keydown",e=>this.onKeyDown(e)),this.eventManager.addEventListener(e.documentElement,"keyup",()=>this.onKeyUp()),this.eventManager.addEventListener(e,"visibilitychange",()=>this.onKeyUp()),this.eventManager.addEventListener(n,"scroll",e=>this.onTableScroll(e),{passive:!0}),n!==r&&this.eventManager.addEventListener(r,"scroll",e=>this.onTableScroll(e),{passive:!0});const i=t.devicePixelRatio&&t.devicePixelRatio>1,s=this.scrollableElement===t,a=this.wtSettings.getSetting("preventWheel"),l={passive:s};(a||i||!Object(o["isChrome"])())&&this.eventManager.addEventListener(this.wtTable.wtRootElement,"wheel",e=>this.onCloneWheel(e,a),l);const c=[this.topOverlay,this.bottomOverlay,this.inlineStartOverlay,this.topInlineStartCornerOverlay,this.bottomInlineStartCornerOverlay];let u;c.forEach(e=>{if(e&&e.needFullRender){const{holder:t}=e.clone.wtTable;this.eventManager.addEventListener(t,"wheel",e=>this.onCloneWheel(e,a),l)}}),this.eventManager.addEventListener(t,"resize",()=>{clearTimeout(u),u=setTimeout(()=>{this.wtSettings.getSetting("onWindowResize"),fr(br,this,0)},200)}),s||this.resizeObserver.observe(this.wtTable.wtRootElement.parentElement)}deregisterListeners(){this.eventManager.clearEvents(!0)}onTableScroll(e){const t=this.domBindings.rootWindow,n=this.inlineStartOverlay.mainTableScrollableElement,r=this.topOverlay.mainTableScrollableElement,i=e.target;this.keyPressed&&(r!==t&&i!==t&&!e.target.contains(r)||n!==t&&i!==t&&!e.target.contains(n))||this.syncScrollPositions(e)}onCloneWheel(e,t){const{rootWindow:n}=this.domBindings,r=this.inlineStartOverlay.mainTableScrollableElement,i=this.topOverlay.mainTableScrollableElement,s=e.target,o=i!==n&&s!==n&&!s.contains(i),a=r!==n&&s!==n&&!s.contains(r);if(this.keyPressed&&(o||a)||this.scrollableElement===n)return;const l=this.translateMouseWheelToScroll(e);(t||this.scrollableElement!==n&&l)&&e.preventDefault()}onKeyDown(e){this.keyPressed=Object(a["isKey"])(e.keyCode,"ARROW_UP|ARROW_RIGHT|ARROW_DOWN|ARROW_LEFT")}onKeyUp(){this.keyPressed=!1}translateMouseWheelToScroll(e){let t=isNaN(e.deltaY)?-1*e.wheelDeltaY:e.deltaY,n=isNaN(e.deltaX)?-1*e.wheelDeltaX:e.deltaX;1===e.deltaMode&&(n+=n*this.browserLineHeight,t+=t*this.browserLineHeight);const r=this.scrollVertically(t),i=this.scrollHorizontally(n);return r||i}scrollVertically(e){const t=this.scrollableElement.scrollTop;return this.scrollableElement.scrollTop+=e,t!==this.scrollableElement.scrollTop}scrollHorizontally(e){const t=this.scrollableElement.scrollLeft;return this.scrollableElement.scrollLeft+=e,t!==this.scrollableElement.scrollLeft}syncScrollPositions(){if(this.destroyed)return;const{rootWindow:e}=this.domBindings,t=this.topOverlay.clone.wtTable.holder,n=this.inlineStartOverlay.clone.wtTable.holder,[r,i]=[this.scrollableElement.scrollLeft,this.scrollableElement.scrollTop];if(this.horizontalScrolling=t.scrollLeft!==r||this.lastScrollX!==e.scrollX,this.verticalScrolling=n.scrollTop!==i||this.lastScrollY!==e.scrollY,this.lastScrollX=e.scrollX,this.lastScrollY=e.scrollY,this.horizontalScrolling){t.scrollLeft=r;const e=this.bottomOverlay.needFullRender?this.bottomOverlay.clone.wtTable.holder:null;e&&(e.scrollLeft=r)}this.verticalScrolling&&(n.scrollTop=i),this.refreshAll()}syncScrollWithMaster(){if(!Rr(Sr,this))return;const e=this.topOverlay.mainTableScrollableElement,{scrollLeft:t,scrollTop:n}=e;this.topOverlay.needFullRender&&(this.topOverlay.clone.wtTable.holder.scrollLeft=t),this.bottomOverlay.needFullRender&&(this.bottomOverlay.clone.wtTable.holder.scrollLeft=t),this.inlineStartOverlay.needFullRender&&(this.inlineStartOverlay.clone.wtTable.holder.scrollTop=n),fr(Sr,this,!1)}updateMainScrollableElements(){this.deregisterListeners(),this.inlineStartOverlay.updateMainScrollableElement(),this.topOverlay.updateMainScrollableElement(),this.bottomOverlay.needFullRender&&this.bottomOverlay.updateMainScrollableElement();const{wtTable:e}=this,{rootWindow:t}=this.domBindings;"hidden"===t.getComputedStyle(e.wtRootElement.parentNode).getPropertyValue("overflow")?this.scrollableElement=e.holder:this.scrollableElement=Object(r["getScrollableElement"])(e.TABLE),this.registerListeners()}destroy(){this.resizeObserver.disconnect(),this.eventManager.destroy(),this.topOverlay.destroy(),this.bottomOverlay.clone&&this.bottomOverlay.destroy(),this.inlineStartOverlay.destroy(),this.topInlineStartCornerOverlay&&this.topInlineStartCornerOverlay.destroy(),this.bottomInlineStartCornerOverlay&&this.bottomInlineStartCornerOverlay.clone&&this.bottomInlineStartCornerOverlay.destroy(),this.destroyed=!0}refresh(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];const t=this.updateLastSpreaderSize();t&&this.adjustElementsSize(),this.bottomOverlay.clone&&this.bottomOverlay.refresh(e),this.inlineStartOverlay.refresh(e),this.topOverlay.refresh(e),this.topInlineStartCornerOverlay&&this.topInlineStartCornerOverlay.refresh(e),this.bottomInlineStartCornerOverlay&&this.bottomInlineStartCornerOverlay.clone&&this.bottomInlineStartCornerOverlay.refresh(e)}updateLastSpreaderSize(){const e=this.wtTable.spreader,t=e.clientWidth,n=e.clientHeight,r=t!==this.spreaderLastSize.width||n!==this.spreaderLastSize.height;return r&&(this.spreaderLastSize.width=t,this.spreaderLastSize.height=n),r}adjustElementsSize(){const{wtViewport:e}=this.wot,{wtTable:t}=this,{rootWindow:n}=this.domBindings,r=this.scrollableElement===n,i=this.wtSettings.getSetting("totalColumns"),s=this.wtSettings.getSetting("totalRows"),o=e.getRowHeaderWidth(),a=e.getColumnHeaderHeight(),l=a+this.topOverlay.sumCellSizes(0,s)+1,c=o+this.inlineStartOverlay.sumCellSizes(0,i),u=t.hider,h=u.style,d=()=>!r&&this.scrollableElement.scrollTop>Math.max(0,l-t.holder.clientHeight),m=()=>!r&&this.scrollableElement.scrollLeft>Math.max(0,c-t.holder.clientWidth),g=d()?1:0,p=m()?1:0;if(h.width=c+p+"px",h.height=l+g+"px",this.scrollbarSize>0){const{scrollHeight:e,scrollWidth:n}=t.wtRootElement,{scrollHeight:r,scrollWidth:i}=t.holder;this.hasScrollbarRight=e<r,this.hasScrollbarBottom=n<i,this.hasScrollbarRight&&t.hider.scrollWidth+this.scrollbarSize>n?this.hasScrollbarBottom=!0:this.hasScrollbarBottom&&t.hider.scrollHeight+this.scrollbarSize>e&&(this.hasScrollbarRight=!0)}this.topOverlay.adjustElementsSize(),this.inlineStartOverlay.adjustElementsSize(),this.bottomOverlay.adjustElementsSize()}expandHiderVerticallyBy(e){const{wtTable:t}=this;t.hider.style.height=parseInt(t.hider.style.height,10)+e+"px"}expandHiderHorizontallyBy(e){const{wtTable:t}=this;t.hider.style.width=parseInt(t.hider.style.width,10)+e+"px"}applyToDOM(){this.wtTable.isVisible()&&(this.topOverlay.applyToDOM(),this.bottomOverlay.clone&&this.bottomOverlay.applyToDOM(),this.inlineStartOverlay.applyToDOM())}getParentOverlay(e){if(!e)return null;const t=[this.topOverlay,this.inlineStartOverlay,this.bottomOverlay,this.topInlineStartCornerOverlay,this.bottomInlineStartCornerOverlay];let n=null;return Object(X["arrayEach"])(t,t=>{t&&t.clone&&t.clone.wtTable.TABLE.contains(e)&&(n=t.clone)}),n}syncOverlayTableClassNames(){const e=this.wtTable.TABLE,t=[this.topOverlay,this.inlineStartOverlay,this.bottomOverlay,this.topInlineStartCornerOverlay,this.bottomInlineStartCornerOverlay];Object(X["arrayEach"])(t,t=>{t&&(t.clone.wtTable.TABLE.className=e.className)})}}var Or=Tr;function vr(e,t,n){return(t=Er(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Er(e){var t=Cr(e,"string");return"symbol"==typeof t?t:t+""}function Cr(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}class Lr{constructor(e){vr(this,"settings",{}),vr(this,"defaults",Object.freeze(this.getDefaults())),Object(T["objectEach"])(this.defaults,(t,n)=>{if(void 0!==e[n])this.settings[n]=e[n];else{if(void 0===t)throw new Error(`A required setting "${n}" was not provided`);this.settings[n]=t}})}getDefaults(){return{facade:void 0,table:void 0,isDataViewInstance:!0,externalRowCalculator:!1,stretchH:"none",currentRowClassName:null,currentColumnClassName:null,preventOverflow(){return!1},preventWheel:!1,data:void 0,freezeOverlays:!1,fixedColumnsStart:0,fixedRowsTop:0,fixedRowsBottom:0,shouldRenderInlineStartOverlay:()=>this.getSetting("fixedColumnsStart")>0||this.getSetting("rowHeaders").length>0,shouldRenderTopOverlay:()=>this.getSetting("fixedRowsTop")>0||this.getSetting("columnHeaders").length>0,shouldRenderBottomOverlay:()=>this.getSetting("fixedRowsBottom")>0,minSpareRows:0,rowHeaders(){return[]},columnHeaders(){return[]},totalRows:void 0,totalColumns:void 0,cellRenderer:(e,t,n)=>{const i=this.getSetting("data",e,t);Object(r["fastInnerText"])(n,void 0===i||null===i?"":i)},columnWidth(){},rowHeight(){},rowHeightByOverlayName(){},defaultRowHeight:23,defaultColumnWidth:50,selections:null,hideBorderOnMouseDownOver:!1,viewportRowCalculatorOverride:null,viewportColumnCalculatorOverride:null,onCellMouseDown:null,onCellContextMenu:null,onCellMouseOver:null,onCellMouseOut:null,onCellMouseUp:null,onCellDblClick:null,onCellCornerMouseDown:null,onCellCornerDblClick:null,beforeDraw:null,onDraw:null,onBeforeRemoveCellClassNames:null,onAfterDrawSelection:null,onBeforeDrawBorders:null,onBeforeViewportScrollHorizontally:e=>e,onBeforeViewportScrollVertically:e=>e,onScrollHorizontally:null,onScrollVertically:null,onBeforeTouchScroll:null,onAfterMomentumScroll:null,onBeforeStretchingColumnWidth:e=>e,onModifyRowHeaderWidth:null,onModifyGetCellCoords:null,onBeforeHighlightingRowHeader:e=>e,onBeforeHighlightingColumnHeader:e=>e,onWindowResize:null,onContainerElementResize:null,renderAllColumns:!1,renderAllRows:!1,groups:!1,rowHeaderWidth:null,columnHeaderHeight:null,headerClassName:null,rtlMode:!1,ariaTags:!0}}update(e,t){return void 0===t?Object(T["objectEach"])(e,(e,t)=>{this.settings[t]=e}):this.settings[e]=t,this}getSetting(e,t,n,r,i){return"function"===typeof this.settings[e]?this.settings[e](t,n,r,i):void 0!==t&&Array.isArray(this.settings[e])?this.settings[e][t]:this.settings[e]}getSettingPure(e){return this.settings[e]}has(e){return!!this.settings[e]}}class Nr extends $t{constructor(e,t,n,r){super(e,t,n,r,"master")}alignOverlaysWithTrimmingContainer(){const e=Object(r["getTrimmingContainer"])(this.wtRootElement),{rootWindow:t}=this.domBindings;if(e===t){const e=this.wtSettings.getSetting("preventOverflow");e||(this.holder.style.overflow="visible",this.wtRootElement.style.overflow="visible")}else{const n=e.parentElement,i=Object(r["getStyle"])(e,"height",t),s=Object(r["getStyle"])(e,"overflow",t),o=this.holder.style,{scrollWidth:a,scrollHeight:l}=e;let c=e.offsetWidth,u=e.offsetHeight;const h=["auto","hidden","scroll"];if(n&&h.includes(s)){const i=e.cloneNode(!1);i.style.overflow="auto",i.style.position="absolute",e.nextElementSibling?n.insertBefore(i,e.nextElementSibling):n.appendChild(i);const s=parseInt(Object(r["getComputedStyle"])(i,t).height,10);n.removeChild(i),0===s&&(u=0)}u=Math.min(u,l),o.height="auto"===i?"auto":u+"px",c=Math.min(c,a),o.width=c+"px",o.overflow="",this.hasTableHeight="auto"===o.height||u>0,this.hasTableWidth=c>0}this.isTableVisible=Object(r["isVisible"])(this.TABLE)}markOversizedColumnHeaders(){const{wtSettings:e}=this,{wtViewport:t}=this.dataAccessObject,n="master",r=e.getSetting("columnHeaders"),i=r.length;if(i&&!t.hasOversizedColumnHeadersMarked[n]){const r=e.getSetting("rowHeaders"),s=r.length,o=this.getRenderedColumnsCount();for(let e=0;e<i;e++)for(let t=-1*s;t<o;t++)this.markIfOversizedColumnHeader(t);t.hasOversizedColumnHeadersMarked[n]=!0}}}Object(T["mixin"])(Nr,Bn),Object(T["mixin"])(Nr,sn);var _r=Nr;function Ir(e,t,n){return(t=Pr(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Pr(e){var t=xr(e,"string");return"symbol"==typeof t?t:t+""}function xr(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}class Dr{constructor(){Ir(this,"count",0),Ir(this,"startRow",0),Ir(this,"endRow",0),Ir(this,"startPosition",0),Ir(this,"isVisibleInTrimmingContainer",!0)}initialize(e){let{totalRows:t}=e;this.count=t,this.endRow=this.count-1}process(){}finalize(){}}n("33d1"),n("ea98");function Ar(e,t,n){return(t=Fr(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Fr(e){var t=Yr(e,"string");return"symbol"==typeof t?t:t+""}function Yr(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}class Hr{constructor(){Ar(this,"count",0),Ar(this,"startRow",null),Ar(this,"endRow",null),Ar(this,"startPosition",null),Ar(this,"isVisibleInTrimmingContainer",!1)}initialize(){}process(e,t){const{totalCalculatedHeight:n,zeroBasedScrollOffset:r,innerViewportHeight:i}=t;n<=r&&(this.startRow=e),n>=r&&n<=i&&null===this.startRow&&(this.startRow=e),this.endRow=e}finalize(e){var t;const{scrollOffset:n,viewportHeight:r,horizontalScrollbarHeight:i,totalRows:s,needReverse:o,startPositions:a,rowHeight:l}=e;if(this.endRow===s-1&&o){this.startRow=this.endRow;while(this.startRow>0){const e=a[this.endRow]+l-a[this.startRow-1];if(this.startRow-=1,e>=r-i)break}}this.startPosition=null!==(t=a[this.startRow])&&void 0!==t?t:null;const c=n+r-i;c<0||n>a.at(-1)+l?this.isVisibleInTrimmingContainer=!1:this.isVisibleInTrimmingContainer=!0,s<this.endRow&&(this.endRow=s-1),null!==this.startRow&&(this.count=this.endRow-this.startRow+1)}}class kr extends Hr{finalize(e){var t;super.finalize(e);const{overrideFn:n,totalRows:r,startPositions:i}=e;null!==this.startRow&&"function"===typeof n&&n(this),this.startRow<0&&(this.startRow=0),this.startPosition=null!==(t=i[this.startRow])&&void 0!==t?t:null,r<this.endRow&&(this.endRow=r-1),null!==this.startRow&&(this.count=this.endRow-this.startRow+1)}}function Vr(e,t,n){return(t=Ur(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ur(e){var t=Wr(e,"string");return"symbol"==typeof t?t:t+""}function Wr(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}class Xr{constructor(){Vr(this,"count",0),Vr(this,"startRow",null),Vr(this,"endRow",null),Vr(this,"startPosition",null),Vr(this,"isVisibleInTrimmingContainer",!1)}initialize(){}process(e,t){const{totalCalculatedHeight:n,zeroBasedScrollOffset:r,innerViewportHeight:i,rowHeight:s}=t;n>=r&&n+s<=i&&(null===this.startRow&&(this.startRow=e),this.endRow=e)}finalize(e){var t;const{scrollOffset:n,viewportHeight:r,horizontalScrollbarHeight:i,totalRows:s,needReverse:o,startPositions:a,rowHeight:l}=e;if(this.endRow===s-1&&o){this.startRow=this.endRow;while(this.startRow>0){const e=a[this.endRow]+l-a[this.startRow-1];if(e<=r-i&&(this.startRow-=1),e>=r-i)break}}this.startPosition=null!==(t=a[this.startRow])&&void 0!==t?t:null;const c=n+r-i,u=null===this.startRow?0:e.getRowHeight(this.startRow);c<u||n>a.at(-1)?this.isVisibleInTrimmingContainer=!1:this.isVisibleInTrimmingContainer=!0,s<this.endRow&&(this.endRow=s-1),null!==this.startRow&&(this.count=this.endRow-this.startRow+1)}}function jr(e,t,n){return(t=Zr(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Zr(e){var t=Qr(e,"string");return"symbol"==typeof t?t:t+""}function Qr(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}class Kr{constructor(){jr(this,"count",0),jr(this,"startColumn",0),jr(this,"endColumn",0),jr(this,"startPosition",0),jr(this,"isVisibleInTrimmingContainer",!0)}initialize(e){let{totalColumns:t}=e;this.count=t,this.endColumn=this.count-1}process(){}finalize(){}}function Gr(e,t,n){return(t=Br(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Br(e){var t=Jr(e,"string");return"symbol"==typeof t?t:t+""}function Jr(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}class zr{constructor(){Gr(this,"count",0),Gr(this,"startColumn",null),Gr(this,"endColumn",null),Gr(this,"startPosition",null),Gr(this,"isVisibleInTrimmingContainer",!1)}initialize(){}process(e,t){const{totalCalculatedWidth:n,zeroBasedScrollOffset:r,viewportWidth:i}=t;n<=r&&(this.startColumn=e);const s=r>0?i+1:i;n>=r&&n<=r+s&&(null!==this.startColumn&&void 0!==this.startColumn||(this.startColumn=e)),this.endColumn=e}finalize(e){var t;const{scrollOffset:n,viewportWidth:r,inlineStartOffset:i,zeroBasedScrollOffset:s,totalColumns:o,needReverse:a,startPositions:l,columnWidth:c}=e;if(this.endColumn===o-1&&a){this.startColumn=this.endColumn;while(this.startColumn>0){const e=l[this.endColumn]+c-l[this.startColumn-1];if(this.startColumn-=1,e>r)break}}this.startPosition=null!==(t=l[this.startColumn])&&void 0!==t?t:null;const u=s>0?r+1:r,h=n+r-u;h<-1*i||n>l.at(-1)+c||-1*n-r>0?this.isVisibleInTrimmingContainer=!1:this.isVisibleInTrimmingContainer=!0,o<this.endColumn&&(this.endColumn=o-1),null!==this.startColumn&&(this.count=this.endColumn-this.startColumn+1)}}class $r extends zr{finalize(e){var t;super.finalize(e);const{overrideFn:n,totalColumns:r,startPositions:i}=e;null!==this.startColumn&&"function"===typeof n&&n(this),this.startColumn<0&&(this.startColumn=0),this.startPosition=null!==(t=i[this.startColumn])&&void 0!==t?t:null,r<this.endColumn&&(this.endColumn=r-1),null!==this.startColumn&&(this.count=this.endColumn-this.startColumn+1)}}function qr(e,t,n){return(t=ei(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ei(e){var t=ti(e,"string");return"symbol"==typeof t?t:t+""}function ti(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}class ni{constructor(){qr(this,"count",0),qr(this,"startColumn",null),qr(this,"endColumn",null),qr(this,"startPosition",null),qr(this,"isVisibleInTrimmingContainer",!1)}initialize(){}process(e,t){const{totalCalculatedWidth:n,zeroBasedScrollOffset:r,viewportWidth:i,columnWidth:s}=t,o=r>0?i+1:i;n>=r&&n+s<=r+o&&(null!==this.startColumn&&void 0!==this.startColumn||(this.startColumn=e),this.endColumn=e)}finalize(e){var t;const{scrollOffset:n,viewportWidth:r,inlineStartOffset:i,zeroBasedScrollOffset:s,totalColumns:o,needReverse:a,startPositions:l,columnWidth:c}=e;if(this.endColumn===o-1&&a){this.startColumn=this.endColumn;while(this.startColumn>0){const e=l[this.endColumn]+c-l[this.startColumn-1];if(e<=r&&(this.startColumn-=1),e>=r)break}}this.startPosition=null!==(t=l[this.startColumn])&&void 0!==t?t:null;const u=s>0?r+1:r,h=n+r-u,d=null===this.startColumn?0:e.getColumnWidth(this.startColumn);h<-1*i||n>l.at(-1)||-1*n-r>-1*d?this.isVisibleInTrimmingContainer=!1:this.isVisibleInTrimmingContainer=!0,o<this.endColumn&&(this.endColumn=o-1),null!==this.startColumn&&(this.count=this.endColumn-this.startColumn+1)}}var ri=n("eb36");class ii{constructor(e,t,n,r,i){this.dataAccessObject=e,this.wot=e.wot,this.instance=this.wot,this.domBindings=t,this.wtSettings=n,this.wtTable=i,this.oversizedRows=[],this.oversizedColumnHeaders=[],this.hasOversizedColumnHeadersMarked={},this.clientHeight=0,this.containerWidth=NaN,this.rowHeaderWidth=NaN,this.rowsVisibleCalculator=null,this.columnsVisibleCalculator=null,this.rowsCalculatorTypes=new Map([["rendered",()=>this.wtSettings.getSetting("renderAllRows")?new Dr:new kr],["fullyVisible",()=>new Xr],["partiallyVisible",()=>new Hr]]),this.columnsCalculatorTypes=new Map([["rendered",()=>this.wtSettings.getSetting("renderAllColumns")?new Kr:new $r],["fullyVisible",()=>new ni],["partiallyVisible",()=>new zr]]),this.eventManager=r,this.eventManager.addEventListener(this.domBindings.rootWindow,"resize",()=>{this.clientHeight=this.getWorkspaceHeight()})}getWorkspaceHeight(){const e=this.domBindings.rootDocument,t=this.dataAccessObject.topOverlayTrimmingContainer;let n=0;if(t===this.domBindings.rootWindow)n=e.documentElement.clientHeight;else{const e=Object(r["outerHeight"])(t);n=e>0&&t.clientHeight>0?t.clientHeight:1/0}return n}getWorkspaceWidth(){const{wtSettings:e}=this,{rootDocument:t,rootWindow:n}=this.domBindings,i=this.dataAccessObject.inlineStartOverlayTrimmingContainer,s=t.documentElement.offsetWidth,o=e.getSetting("totalColumns"),a=e.getSetting("preventOverflow"),l=e.getSetting("rtlMode"),c=this.wtTable.TABLE.getBoundingClientRect(),u=l?c.right-s:c.left,h=s-u;let d,m;if(a)return Object(r["outerWidth"])(this.wtTable.wtRootElement);if(d=e.getSetting("freezeOverlays")?Math.min(h,s):Math.min(this.getContainerFillWidth(),h,s),i===n&&o>0&&this.sumColumnWidths(0,o-1)>d)return t.documentElement.clientWidth;if(i!==n&&(m=Object(r["getStyle"])(this.dataAccessObject.inlineStartOverlayTrimmingContainer,"overflow",n),"scroll"===m||"hidden"===m||"auto"===m))return Math.max(d,i.clientWidth);const g=e.getSetting("stretchH");return"none"!==g&&g?d:Math.max(d,Object(r["outerWidth"])(this.wtTable.TABLE))}hasVerticalScroll(){return this.wtTable.hider.offsetHeight>this.getWorkspaceHeight()}hasHorizontalScroll(){return this.wtTable.hider.offsetWidth>this.getWorkspaceWidth()}sumColumnWidths(e,t){let n=0,r=e;while(r<t)n+=this.wtTable.getColumnWidth(r),r+=1;return n}getContainerFillWidth(){if(this.containerWidth)return this.containerWidth;const e=this.wtTable.holder,t=this.domBindings.rootDocument.createElement("div");t.style.width="100%",t.style.height="1px",e.appendChild(t);const n=t.offsetWidth;return this.containerWidth=n,e.removeChild(t),n}getWorkspaceOffset(){return Object(r["offset"])(this.wtTable.TABLE)}getColumnHeaderHeight(){const e=this.wtSettings.getSetting("columnHeaders");return e.length?isNaN(this.columnHeaderHeight)&&(this.columnHeaderHeight=Object(r["outerHeight"])(this.wtTable.THEAD)):this.columnHeaderHeight=0,this.columnHeaderHeight}getViewportHeight(){let e=this.getWorkspaceHeight();if(e===1/0)return e;const t=this.getColumnHeaderHeight();return t>0&&(e-=t),e}getRowHeaderWidth(){const e=this.wtSettings.getSetting("rowHeaderWidth"),t=this.wtSettings.getSetting("rowHeaders");if(e){this.rowHeaderWidth=0;for(let n=0,r=t.length;n<r;n++)this.rowHeaderWidth+=e[n]||e}if(isNaN(this.rowHeaderWidth))if(t.length){let e=this.wtTable.TABLE.querySelector("TH");this.rowHeaderWidth=0;for(let n=0,i=t.length;n<i;n++)e?(this.rowHeaderWidth+=Object(r["outerWidth"])(e),e=e.nextSibling):this.rowHeaderWidth+=50}else this.rowHeaderWidth=0;return this.rowHeaderWidth=this.wtSettings.getSetting("onModifyRowHeaderWidth",this.rowHeaderWidth)||this.rowHeaderWidth,this.rowHeaderWidth}getViewportWidth(){const e=this.getWorkspaceWidth();if(e===1/0)return e;const t=this.getRowHeaderWidth();return t>0?e-t:e}createRowsCalculator(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:["rendered","fullyVisible","partiallyVisible"];const{wtSettings:t,wtTable:n}=this;let i,s,o=this.getViewportHeight();this.rowHeaderWidth=NaN;let a=this.dataAccessObject.topScrollPosition-this.dataAccessObject.topParentOffset;const l=t.getSetting("fixedRowsTop"),c=t.getSetting("fixedRowsBottom"),u=t.getSetting("totalRows");return l&&a>=0&&(s=this.dataAccessObject.topOverlay.sumCellSizes(0,l),a+=s,o-=s),c&&this.dataAccessObject.bottomOverlay.clone&&(s=this.dataAccessObject.bottomOverlay.sumCellSizes(u-c,u),o-=s),i=n.holder.clientHeight===n.holder.offsetHeight?0:Object(r["getScrollbarWidth"])(this.domBindings.rootDocument),new ri["b"]({calculationTypes:e.map(e=>[e,this.rowsCalculatorTypes.get(e)()]),viewportHeight:o,scrollOffset:a,totalRows:t.getSetting("totalRows"),rowHeightFn:e=>n.getRowHeight(e),overrideFn:t.getSettingPure("viewportRowCalculatorOverride"),horizontalScrollbarHeight:i})}createColumnsCalculator(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:["rendered","fullyVisible","partiallyVisible"];const{wtSettings:t,wtTable:n}=this;let i=this.getViewportWidth(),s=Math.abs(this.dataAccessObject.inlineStartScrollPosition)-this.dataAccessObject.inlineStartParentOffset;this.columnHeaderHeight=NaN;const o=t.getSetting("fixedColumnsStart");if(o&&s>=0){const e=this.dataAccessObject.inlineStartOverlay.sumCellSizes(0,o);s+=e,i-=e}return n.holder.clientWidth!==n.holder.offsetWidth&&(i-=Object(r["getScrollbarWidth"])(this.domBindings.rootDocument)),new yt["b"]({calculationTypes:e.map(e=>[e,this.columnsCalculatorTypes.get(e)()]),viewportWidth:i,scrollOffset:s,totalColumns:t.getSetting("totalColumns"),columnWidthFn:e=>n.getColumnWidth(e),overrideFn:t.getSettingPure("viewportColumnCalculatorOverride"),inlineStartOffset:this.dataAccessObject.inlineStartParentOffset})}createCalculators(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];const{wtSettings:t}=this,n=this.createRowsCalculator(),r=this.createColumnsCalculator();if(e&&!t.getSetting("renderAllRows")){const t=n.getResultsFor("fullyVisible");e=this.areAllProposedVisibleRowsAlreadyRendered(t)}if(e&&!t.getSetting("renderAllColumns")){const t=r.getResultsFor("fullyVisible");e=this.areAllProposedVisibleColumnsAlreadyRendered(t)}return e||(this.rowsRenderCalculator=n.getResultsFor("rendered"),this.columnsRenderCalculator=r.getResultsFor("rendered")),this.rowsVisibleCalculator=n.getResultsFor("fullyVisible"),this.columnsVisibleCalculator=r.getResultsFor("fullyVisible"),this.rowsPartiallyVisibleCalculator=n.getResultsFor("partiallyVisible"),this.columnsPartiallyVisibleCalculator=r.getResultsFor("partiallyVisible"),e}createVisibleCalculators(){const e=this.createRowsCalculator(["fullyVisible","partiallyVisible"]),t=this.createColumnsCalculator(["fullyVisible","partiallyVisible"]);this.rowsVisibleCalculator=e.getResultsFor("fullyVisible"),this.columnsVisibleCalculator=t.getResultsFor("fullyVisible"),this.rowsPartiallyVisibleCalculator=e.getResultsFor("partiallyVisible"),this.columnsPartiallyVisibleCalculator=t.getResultsFor("partiallyVisible")}areAllProposedVisibleRowsAlreadyRendered(e){if(!this.rowsVisibleCalculator)return!1;let{startRow:t,endRow:n}=e;if(null===t&&null===n){if(!e.isVisibleInTrimmingContainer)return!0;t=this.rowsPartiallyVisibleCalculator.startRow,n=this.rowsPartiallyVisibleCalculator.endRow}const{startRow:r,endRow:i}=this.rowsRenderCalculator;return!(t<r||t===r&&t>0)&&!(n>i||n===i&&n<this.wtSettings.getSetting("totalRows")-1)}areAllProposedVisibleColumnsAlreadyRendered(e){if(!this.columnsVisibleCalculator)return!1;let{startColumn:t,endColumn:n}=e;if(null===t&&null===n){if(!e.isVisibleInTrimmingContainer)return!0;t=this.columnsPartiallyVisibleCalculator.startColumn,n=this.columnsPartiallyVisibleCalculator.endColumn}const{startColumn:r,endColumn:i}=this.columnsRenderCalculator;return!(t<r||t===r&&t>0)&&!(n>i||n===i&&n<this.wtSettings.getSetting("totalColumns")-1)}resetHasOversizedColumnHeadersMarked(){Object(T["objectEach"])(this.hasOversizedColumnHeadersMarked,(e,t,n)=>{n[t]=void 0})}}var si=ii;n("4069");function oi(e,t){li(e,t),t.add(e)}function ai(e,t,n){li(e,t),t.set(e,n)}function li(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function ci(e,t){return e.get(hi(e,t))}function ui(e,t,n){return e.set(hi(e,t),n),n}function hi(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}var di=new WeakMap,mi=new WeakMap,gi=new WeakSet;class pi{constructor(){oi(this,gi),ai(this,di,void 0),ai(this,mi,void 0)}setActiveOverlay(e){return ui(mi,this,e),this}setActiveSelection(e){return ui(di,this,e),this}scan(){const e=ci(di,this).settings.selectionType,t=new Set;return"active-header"===e?(this.scanColumnsInHeadersRange(e=>t.add(e)),this.scanRowsInHeadersRange(e=>t.add(e))):"area"===e?this.scanCellsRange(e=>t.add(e)):"focus"===e?(this.scanColumnsInHeadersRange(e=>t.add(e)),this.scanRowsInHeadersRange(e=>t.add(e)),this.scanCellsRange(e=>t.add(e))):"fill"===e?this.scanCellsRange(e=>t.add(e)):"header"===e?(this.scanColumnsInHeadersRange(e=>t.add(e)),this.scanRowsInHeadersRange(e=>t.add(e))):"row"===e?(this.scanRowsInHeadersRange(e=>t.add(e)),this.scanRowsInCellsRange(e=>t.add(e))):"column"===e&&(this.scanColumnsInHeadersRange(e=>t.add(e)),this.scanColumnsInCellsRange(e=>t.add(e))),t}scanColumnsInHeadersRange(e){const[t,n,r,i]=ci(di,this).getCorners(),{wtTable:s}=ci(mi,this),o=s.getRenderedColumnsCount(),a=s.getColumnHeadersCount();let l=0;for(let c=-s.getRowHeadersCount();c<o;c++){const o=s.columnFilter.renderedToSource(c);if(!(o<n||o>i)){for(let c=-a;c<0;c++){if(c<t||c>r)continue;const u=c+a;let h=s.getColumnHeader(o,u);const d=ci(mi,this).getSetting("onBeforeHighlightingColumnHeader",o,u,{selectionType:ci(di,this).settings.selectionType,columnCursor:l,selectionWidth:i-n+1});null!==d&&(d!==o&&(h=s.getColumnHeader(d,u)),e(h))}l+=1}}}scanRowsInHeadersRange(e){const[t,n,r,i]=ci(di,this).getCorners(),{wtTable:s}=ci(mi,this),o=s.getRenderedRowsCount(),a=s.getRowHeadersCount();let l=0;for(let c=-s.getColumnHeadersCount();c<o;c++){const o=s.rowFilter.renderedToSource(c);if(!(o<t||o>r)){for(let c=-a;c<0;c++){if(c<n||c>i)continue;const u=c+a;let h=s.getRowHeader(o,u);const d=ci(mi,this).getSetting("onBeforeHighlightingRowHeader",o,u,{selectionType:ci(di,this).settings.selectionType,rowCursor:l,selectionHeight:r-t+1});null!==d&&(d!==o&&(h=s.getRowHeader(d,u)),e(h))}l+=1}}}scanCellsRange(e){const[t,n,i,s]=ci(di,this).getCorners(),{wtTable:o}=ci(mi,this);hi(gi,this,fi).call(this,(a,l)=>{if(a>=t&&a<=i&&l>=n&&l<=s){const t=o.getCell(ci(mi,this).createCellCoords(a,l)),n=ci(mi,this).getSetting("onAfterDrawSelection",a,l,ci(di,this).settings.layerLevel);"string"===typeof n&&Object(r["addClass"])(t,n),e(t)}})}scanRowsInCellsRange(e){const[t,,n]=ci(di,this).getCorners(),{wtTable:r}=ci(mi,this);hi(gi,this,fi).call(this,(i,s)=>{if(i>=t&&i<=n){const t=r.getCell(ci(mi,this).createCellCoords(i,s));e(t)}})}scanColumnsInCellsRange(e){const[,t,,n]=ci(di,this).getCorners(),{wtTable:r}=ci(mi,this);hi(gi,this,fi).call(this,(i,s)=>{if(s>=t&&s<=n){const t=r.getCell(ci(mi,this).createCellCoords(i,s));e(t)}})}}function fi(e){const{wtTable:t}=ci(mi,this),n=t.getRenderedRowsCount(),r=t.getRenderedColumnsCount();for(let i=0;i<n;i+=1){const n=t.rowFilter.renderedToSource(i);for(let i=0;i<r;i+=1)e(n,t.columnFilter.renderedToSource(i))}}class Ri{constructor(e,t){t&&(this.eventManager=e.eventManager,this.instance=e,this.wot=e,this.settings=t,this.mouseDown=!1,this.main=null,this.top=null,this.bottom=null,this.start=null,this.end=null,this.topStyle=null,this.bottomStyle=null,this.startStyle=null,this.endStyle=null,this.cornerDefaultStyle=xn,this.cornerCenterPointOffset=-parseInt(this.cornerDefaultStyle.width,10)/2,this.corner=null,this.cornerStyle=null,this.createBorders(t),this.registerListeners())}registerListeners(){const e=this.wot.rootDocument.body;this.eventManager.addEventListener(e,"mousedown",()=>this.onMouseDown()),this.eventManager.addEventListener(e,"mouseup",()=>this.onMouseUp());for(let t=0,n=this.main.childNodes.length;t<n;t++){const e=this.main.childNodes[t];this.eventManager.addEventListener(e,"mouseenter",e=>this.onMouseEnter(e,this.main.childNodes[t]))}}onMouseDown(){this.mouseDown=!0}onMouseUp(){this.mouseDown=!1}onMouseEnter(e,t){if(!this.mouseDown||!this.wot.getSetting("hideBorderOnMouseDownOver"))return;e.preventDefault(),Object(l["stopImmediatePropagation"])(e);const n=this,r=this.wot.rootDocument.body,i=t.getBoundingClientRect();function s(e){return e.clientY<Math.floor(i.top)||(e.clientY>Math.ceil(i.top+i.height)||(e.clientX<Math.floor(i.left)||(e.clientX>Math.ceil(i.left+i.width)||void 0)))}function o(e){s(e)&&(n.eventManager.removeEventListener(r,"mousemove",o),t.style.display="block")}t.style.display="none",this.eventManager.addEventListener(r,"mousemove",o)}createBorders(e){const{rootDocument:t}=this.wot;this.main=t.createElement("div");const n=["top","start","bottom","end","corner"];let r=this.main.style;r.position="absolute",r.top=0,r.left=0;for(let o=0;o<5;o++){const i=n[o],s=t.createElement("div");s.className="wtBorder "+(this.settings.className||""),this.settings[i]&&this.settings[i].hide&&(s.className+=" hidden"),r=s.style,r.backgroundColor=this.settings[i]&&this.settings[i].color?this.settings[i].color:e.border.color,r.height=this.settings[i]&&this.settings[i].width?this.settings[i].width+"px":e.border.width+"px",r.width=this.settings[i]&&this.settings[i].width?this.settings[i].width+"px":e.border.width+"px",this.main.appendChild(s)}this.top=this.main.childNodes[0],this.start=this.main.childNodes[1],this.bottom=this.main.childNodes[2],this.end=this.main.childNodes[3],this.topStyle=this.top.style,this.startStyle=this.start.style,this.bottomStyle=this.bottom.style,this.endStyle=this.end.style,this.corner=this.main.childNodes[4],this.corner.className+=" corner",this.cornerStyle=this.corner.style,this.cornerStyle.width=this.cornerDefaultStyle.width,this.cornerStyle.height=this.cornerDefaultStyle.height,this.cornerStyle.border=[this.cornerDefaultStyle.borderWidth,this.cornerDefaultStyle.borderStyle,this.cornerDefaultStyle.borderColor].join(" "),Object(o["isMobileBrowser"])()&&this.instance.getSetting("isDataViewInstance")&&this.createMultipleSelectorHandles(),this.disappear();const{wtTable:i}=this.wot;let s=i.bordersHolder;s||(s=t.createElement("div"),s.className="htBorders",i.bordersHolder=s,i.spreader.appendChild(s)),s.appendChild(this.main)}createMultipleSelectorHandles(){const{rootDocument:e}=this.wot;this.selectionHandles={top:e.createElement("DIV"),topHitArea:e.createElement("DIV"),bottom:e.createElement("DIV"),bottomHitArea:e.createElement("DIV")};const t=10,n=40;this.selectionHandles.top.className="topSelectionHandle topLeftSelectionHandle",this.selectionHandles.topHitArea.className="topSelectionHandle-HitArea topLeftSelectionHandle-HitArea",this.selectionHandles.bottom.className="bottomSelectionHandle bottomRightSelectionHandle",this.selectionHandles.bottomHitArea.className="bottomSelectionHandle-HitArea bottomRightSelectionHandle-HitArea",this.selectionHandles.styles={top:this.selectionHandles.top.style,topHitArea:this.selectionHandles.topHitArea.style,bottom:this.selectionHandles.bottom.style,bottomHitArea:this.selectionHandles.bottomHitArea.style};const r={position:"absolute",height:n+"px",width:n+"px","border-radius":parseInt(n/1.5,10)+"px"};Object(T["objectEach"])(r,(e,t)=>{this.selectionHandles.styles.bottomHitArea[t]=e,this.selectionHandles.styles.topHitArea[t]=e});const i={position:"absolute",height:t+"px",width:t+"px","border-radius":parseInt(t/1.5,10)+"px",background:"#F5F5FF",border:"1px solid #4285c8"};Object(T["objectEach"])(i,(e,t)=>{this.selectionHandles.styles.bottom[t]=e,this.selectionHandles.styles.top[t]=e}),this.main.appendChild(this.selectionHandles.top),this.main.appendChild(this.selectionHandles.bottom),this.main.appendChild(this.selectionHandles.topHitArea),this.main.appendChild(this.selectionHandles.bottomHitArea)}isPartRange(e,t){const n=this.wot.selectionManager.getAreaSelection();return!(!n.cellRange||e===n.cellRange.to.row&&t===n.cellRange.to.col)}updateMultipleSelectionHandlesPosition(e,t,n,r,i,s){const o=this.wot.wtSettings.getSetting("rtlMode"),a=o?"right":"left",{top:l,topHitArea:c,bottom:u,bottomHitArea:h}=this.selectionHandles.styles,d=parseInt(l.borderWidth,10),m=parseInt(l.width,10),g=parseInt(c.width,10),p=this.wot.wtTable.getWidth(),f=this.wot.wtTable.getHeight();l.top=parseInt(n-m-1,10)+"px",l[a]=parseInt(r-m-1,10)+"px",c.top=parseInt(n-g/4*3,10)+"px",c[a]=parseInt(r-g/4*3,10)+"px";const R=Math.min(parseInt(r+i,10),p-m-2*d),y=Math.min(parseInt(r+i-g/4,10),p-g-2*d);u[a]=R+"px",h[a]=y+"px";const M=Math.min(parseInt(n+s,10),f-m-2*d),S=Math.min(parseInt(n+s-g/4,10),f-g-2*d);u.top=M+"px",h.top=S+"px",this.settings.border.cornerVisible&&this.settings.border.cornerVisible()?(l.display="block",c.display="block",this.isPartRange(e,t)?(u.display="none",h.display="none"):(u.display="block",h.display="block")):(l.display="none",u.display="none",c.display="none",h.display="none"),e===this.wot.wtSettings.getSetting("fixedRowsTop")||t===this.wot.wtSettings.getSetting("fixedColumnsStart")?(l.zIndex="9999",c.zIndex="9999"):(l.zIndex="",c.zIndex="")}appear(e){if(this.disabled)return;const{wtTable:t,rootDocument:n,rootWindow:i}=this.wot;let s,a,l,c,u,h;const d=t.getRenderedRowsCount();for(let r=0;r<d;r+=1){const n=t.rowFilter.renderedToSource(r);if(n>=e[0]&&n<=e[2]){s=n,u=e[0];break}}for(let r=d-1;r>=0;r-=1){const n=t.rowFilter.renderedToSource(r);if(n>=e[0]&&n<=e[2]){a=n;break}}const m=t.getRenderedColumnsCount();for(let r=0;r<m;r+=1){const n=t.columnFilter.renderedToSource(r);if(n>=e[1]&&n<=e[3]){l=n,h=e[1];break}}for(let r=m-1;r>=0;r-=1){const n=t.columnFilter.renderedToSource(r);if(n>=e[1]&&n<=e[3]){c=n;break}}if(void 0===s||void 0===l)return void this.disappear();let g=t.getCell(this.wot.createCellCoords(s,l));const p=s!==a||l!==c,f=p?t.getCell(this.wot.createCellCoords(a,c)):g,R=Object(r["offset"])(g),y=p?Object(r["offset"])(f):R,M=Object(r["offset"])(t.TABLE),S=Object(r["outerWidth"])(t.TABLE),b=R.top,w=R.left,T=this.wot.wtSettings.getSetting("rtlMode");let O=0,v=0;if(T){const e=Object(r["outerWidth"])(g),t=i.innerWidth-M.left-S;v=w+e-y.left,O=i.innerWidth-w-e-t-1}else v=y.left+Object(r["outerWidth"])(f)-w,O=w-M.left-1;if(this.isEntireColumnSelected(s,a)){const e=this.getDimensionsFromHeader("columns",l,c,u,M);let t=null;e&&([t,O,v]=e),t&&(g=t)}let E=b-M.top-1,C=y.top+Object(r["outerHeight"])(f)-b;if(this.isEntireRowSelected(l,c)){const e=this.getDimensionsFromHeader("rows",s,a,h,M);let t=null;e&&([t,E,C]=e),t&&(g=t)}const L=Object(r["getComputedStyle"])(g,i);parseInt(L.borderTopWidth,10)>0&&(E+=1,C=C>0?C-1:0),parseInt(L[T?"borderRightWidth":"borderLeftWidth"],10)>0&&(O+=1,v=v>0?v-1:0);const N=T?"right":"left";this.topStyle.top=E+"px",this.topStyle[N]=O+"px",this.topStyle.width=v+"px",this.topStyle.display="block",this.startStyle.top=E+"px",this.startStyle[N]=O+"px",this.startStyle.height=C+"px",this.startStyle.display="block";const _=Math.floor(this.settings.border.width/2);this.bottomStyle.top=E+C-_+"px",this.bottomStyle[N]=O+"px",this.bottomStyle.width=v+"px",this.bottomStyle.display="block",this.endStyle.top=E+"px",this.endStyle[N]=O+v-_+"px",this.endStyle.height=C+1+"px",this.endStyle.display="block";let I=this.settings.border.cornerVisible;I="function"===typeof I?I(this.settings.layerLevel):I;const P=this.wot.getSetting("onModifyGetCellCoords",a,c);let[x,D]=[a,c];if(P&&Array.isArray(P)&&([,,x,D]=P),Object(o["isMobileBrowser"])()||!I||this.isPartRange(x,D))this.cornerStyle.display="none";else{this.cornerStyle.top=E+C+this.cornerCenterPointOffset-1+"px",this.cornerStyle[N]=O+v+this.cornerCenterPointOffset-1+"px",this.cornerStyle.borderRightWidth=this.cornerDefaultStyle.borderWidth,this.cornerStyle.width=this.cornerDefaultStyle.width,this.cornerStyle.display="none";let e=Object(r["getTrimmingContainer"])(t.TABLE);const s=e===i;s&&(e=n.documentElement);const o=parseInt(this.cornerDefaultStyle.width,10)/2,l=parseInt(this.cornerDefaultStyle.height,10)/2;if(c===this.wot.getSetting("totalColumns")-1){const t=s?f.getBoundingClientRect().left:f.offsetLeft;let n=!1,i=0;T?(i=t-parseInt(this.cornerDefaultStyle.width,10)/2,n=i<0):(i=t+Object(r["outerWidth"])(f)+parseInt(this.cornerDefaultStyle.width,10)/2,n=i>=Object(r["innerWidth"])(e)),n&&(this.cornerStyle[N]=Math.floor(O+v+this.cornerCenterPointOffset-o)+"px",this.cornerStyle[T?"borderLeftWidth":"borderRightWidth"]=0)}if(a===this.wot.getSetting("totalRows")-1){const t=s?f.getBoundingClientRect().top:f.offsetTop,n=t+Object(r["outerHeight"])(f)+parseInt(this.cornerDefaultStyle.height,10)/2,i=n>=Object(r["innerHeight"])(e);i&&(this.cornerStyle.top=Math.floor(E+C+this.cornerCenterPointOffset-l)+"px",this.cornerStyle.borderBottomWidth=0)}this.cornerStyle.display="block"}Object(o["isMobileBrowser"])()&&this.instance.getSetting("isDataViewInstance")&&this.updateMultipleSelectionHandlesPosition(a,c,E,O,v,C)}isEntireColumnSelected(e,t){return e===this.wot.wtTable.getFirstRenderedRow()&&t===this.wot.wtTable.getLastRenderedRow()}isEntireRowSelected(e,t){return e===this.wot.wtTable.getFirstRenderedColumn()&&t===this.wot.wtTable.getLastRenderedColumn()}getDimensionsFromHeader(e,t,n,i,s){const{wtTable:o}=this.wot,a=o.wtRootElement.parentNode;let l=null,c=null,u=null,h=null,d=null,m=null,g=null,p=null;switch(e){case"rows":l=function(){return o.getRowHeader(...arguments)},c=function(){return Object(r["outerHeight"])(...arguments)},u="ht__selection--rows",m="top";break;case"columns":l=function(){return o.getColumnHeader(...arguments)},c=function(){return Object(r["outerWidth"])(...arguments)},u="ht__selection--columns",m="left";break;default:}if(a.classList.contains(u)){const e=this.wot.getSetting("columnHeaders").length;if(g=l(t,e-i),p=l(n,e-i),!g||!p)return!1;const o=Object(r["offset"])(g),a=Object(r["offset"])(p);return g&&p&&(h=o[m]-s[m]-1,d=a[m]+c(p)-o[m]),[g,h,d]}return!1}changeBorderStyle(e,t){const n=this[e].style,i=t[e];!i||i.hide?Object(r["addClass"])(this[e],"hidden"):(Object(r["hasClass"])(this[e],"hidden")&&Object(r["removeClass"])(this[e],"hidden"),n.backgroundColor=i.color,"top"!==e&&"bottom"!==e||(n.height=i.width+"px"),"start"!==e&&"end"!==e||(n.width=i.width+"px"))}changeBorderToDefaultStyle(e){const t={width:1,color:"#000"},n=this[e].style;n.backgroundColor=t.color,n.width=t.width+"px",n.height=t.width+"px"}toggleHiddenClass(e,t){this.changeBorderToDefaultStyle(e),t?Object(r["addClass"])(this[e],"hidden"):Object(r["removeClass"])(this[e],"hidden")}disappear(){this.topStyle.display="none",this.bottomStyle.display="none",this.startStyle.display="none",this.endStyle.display="none",this.cornerStyle.display="none",Object(o["isMobileBrowser"])()&&this.instance.getSetting("isDataViewInstance")&&(this.selectionHandles.styles.top.display="none",this.selectionHandles.styles.topHitArea.display="none",this.selectionHandles.styles.bottom.display="none",this.selectionHandles.styles.bottomHitArea.display="none")}destroy(){this.eventManager.destroyWithOwnEventsOnly(),this.main.parentNode.removeChild(this.main)}}var yi=Ri;function Mi(e,t){bi(e,t),t.add(e)}function Si(e,t,n){bi(e,t),t.set(e,n)}function bi(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function wi(e,t){return e.get(Oi(e,t))}function Ti(e,t,n){return e.set(Oi(e,t),n),n}function Oi(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}var vi=new WeakMap,Ei=new WeakMap,Ci=new WeakMap,Li=new WeakMap,Ni=new WeakMap,_i=new WeakMap,Ii=new WeakSet;class Pi{constructor(e){Mi(this,Ii),Si(this,vi,void 0),Si(this,Ei,void 0),Si(this,Ci,new pi),Si(this,Li,new WeakMap),Si(this,Ni,new WeakSet),Si(this,_i,new Map),Ti(Ei,this,e)}setActiveOverlay(e){return Ti(vi,this,e),wi(Ci,this).setActiveOverlay(wi(vi,this)),wi(Li,this).has(wi(vi,this))||wi(Li,this).set(wi(vi,this),new Set),this}getFocusSelection(){return null!==wi(Ei,this)?wi(Ei,this).getFocus():null}getAreaSelection(){return null!==wi(Ei,this)?wi(Ei,this).createLayeredArea():null}getBorderInstance(e){if(!e.settings.border)return null;if(wi(_i,this).has(e)){const t=wi(_i,this).get(e);if(t.has(wi(vi,this)))return t.get(wi(vi,this));const n=new yi(wi(vi,this),e.settings);return t.set(wi(vi,this),n),n}const t=new yi(wi(vi,this),e.settings);return wi(_i,this).set(e,new Map([[wi(vi,this),t]])),t}getBorderInstances(e){var t,n;return Array.from(null!==(t=null===(n=wi(_i,this).get(e))||void 0===n?void 0:n.values())&&void 0!==t?t:[])}destroyBorders(e){wi(_i,this).get(e).forEach(e=>e.destroy()),wi(_i,this).delete(e)}render(e){if(null===wi(Ei,this))return;e&&Oi(Ii,this,xi).call(this);const t=Array.from(wi(Ei,this)),n=new Map,i=new Map;for(let r=0;r<t.length;r++){const e=t[r],{className:s,headerAttributes:o,createLayers:a,selectionType:l}=e.settings;wi(Ni,this).has(e)||(wi(Ni,this).add(e),e.addLocalHook("destroy",()=>this.destroyBorders(e)));const c=this.getBorderInstance(e);if(e.isEmpty()){null===c||void 0===c||c.disappear();continue}if(s){const t=wi(Ci,this).setActiveSelection(e).scan();t.forEach(e=>{if(n.has(e)){const t=n.get(e);t.has(s)&&!0===a?t.set(s,t.get(s)+1):t.set(s,1)}else n.set(e,new Map([[s,1]]));o&&(i.has(e)||i.set(e,[]),"TH"===e.nodeName&&i.get(e).push(...o))})}const u=e.getCorners();wi(vi,this).getSetting("onBeforeDrawBorders",u,l),null===c||void 0===c||c.appear(u)}n.forEach((e,t)=>{var n;const i=Array.from(e).map(e=>{let[t,n]=e;return 1===n?t:[t,...Array.from({length:n-1},(e,n)=>`${t}-${n+1}`)]}).flat();i.forEach(e=>wi(Li,this).get(wi(vi,this)).add(e)),Object(r["addClass"])(t,i),"TD"===t.nodeName&&Array.isArray(null===(n=wi(Ei,this).options)||void 0===n?void 0:n.cellAttributes)&&Object(r["setAttribute"])(t,wi(Ei,this).options.cellAttributes)}),Array.from(i.keys()).forEach(e=>{Object(r["setAttribute"])(e,[...i.get(e)])})}}function xi(){const e=wi(Li,this).get(wi(vi,this)),t=wi(vi,this).wtSettings.getSetting("onBeforeRemoveCellClassNames");if(Array.isArray(t))for(let n=0;n<t.length;n++)e.add(t[n]);e.forEach(e=>{var t,n;const i=wi(vi,this).wtTable.TABLE.querySelectorAll("."+e);let s=[];Array.isArray(null===(t=wi(Ei,this).options)||void 0===t?void 0:t.cellAttributes)&&(s=wi(Ei,this).options.cellAttributes.map(e=>e[0])),Array.isArray(null===(n=wi(Ei,this).options)||void 0===n?void 0:n.headerAttributes)&&(s=[...s,...wi(Ei,this).options.headerAttributes.map(e=>e[0])]);for(let o=0,a=i.length;o<a;o++)Object(r["removeClass"])(i[o],e),Object(r["removeAttribute"])(i[o],s)}),e.clear()}class Di extends On{constructor(e,t){super(e,new Lr(t));const n=this.wtSettings.getSetting("facade",this);this.wtTable=new _r(this.getTableDao(),n,this.domBindings,this.wtSettings),this.wtViewport=new si(this.getViewportDao(),this.domBindings,this.wtSettings,this.eventManager,this.wtTable),this.selectionManager=new Pi(this.wtSettings.getSetting("selections")),this.wtEvent=new me(n,this.domBindings,this.wtSettings,this.eventManager,this.wtTable,this.selectionManager),this.wtOverlays=new Or(this,n,this.domBindings,this.wtSettings,this.eventManager,this.wtTable),this.exportSettingsAsClassNames(),this.findOriginalHeaders()}exportSettingsAsClassNames(){const e={rowHeaders:"htRowHeaders",columnHeaders:"htColumnHeaders"},t=[],n=[];Object(T["objectEach"])(e,(e,r)=>{this.wtSettings.getSetting(r).length&&n.push(e),t.push(e)}),Object(r["removeClass"])(this.wtTable.wtRootElement.parentNode,t),Object(r["addClass"])(this.wtTable.wtRootElement.parentNode,n)}getOverlayByName(e){var t;if(!Qt.includes(e))return null;const n=e.replace(/_([a-z])/g,e=>e[1].toUpperCase());return null!==(t=this.wtOverlays[n+"Overlay"])&&void 0!==t?t:null}getViewportDao(){const e=this;return{get wot(){return e},get topOverlayTrimmingContainer(){return e.wtOverlays.topOverlay.trimmingContainer},get inlineStartOverlayTrimmingContainer(){return e.wtOverlays.inlineStartOverlay.trimmingContainer},get topScrollPosition(){return e.wtOverlays.topOverlay.getScrollPosition()},get topParentOffset(){return e.wtOverlays.topOverlay.getTableParentOffset()},get inlineStartScrollPosition(){return e.wtOverlays.inlineStartOverlay.getScrollPosition()},get inlineStartParentOffset(){return e.wtOverlays.inlineStartOverlay.getTableParentOffset()},get topOverlay(){return e.wtOverlays.topOverlay},get inlineStartOverlay(){return e.wtOverlays.inlineStartOverlay},get bottomOverlay(){return e.wtOverlays.bottomOverlay}}}}class Ai{constructor(e){e instanceof On?this._wot=e:this._initFromSettings(e)}_initFromSettings(e){e.facade=e=>{const t=new Ai(e);return()=>t},this._wot=new Di(e.table,e)}get guid(){return this._wot.guid}get rootDocument(){return this._wot.domBindings.rootDocument}get rootWindow(){return this._wot.domBindings.rootWindow}get wtSettings(){return this._wot.wtSettings}get cloneSource(){return this._wot.cloneSource}get cloneOverlay(){return this._wot.cloneOverlay}get selectionManager(){return this._wot.selectionManager}get wtViewport(){return this._wot.wtViewport}get wtOverlays(){return this._wot.wtOverlays}get wtTable(){return this._wot.wtTable}get wtEvent(){return this._wot.wtEvent}get wtScroll(){return this._wot.wtScroll}get drawn(){return this._wot.drawn}set drawn(e){this._wot.drawn=e}get drawInterrupted(){return this._wot.drawInterrupted}set drawInterrupted(e){this._wot.drawInterrupted=e}get lastMouseOver(){return this._wot.lastMouseOver}set lastMouseOver(e){this._wot.lastMouseOver=e}get momentumScrolling(){return this._wot.momentumScrolling}set momentumScrolling(e){this._wot.momentumScrolling=e}get touchApplied(){return this._wot.touchApplied}set touchApplied(e){this._wot.touchApplied=e}get domBindings(){return this._wot.domBindings}get eventListeners(){return this._wot.eventListeners}set eventListeners(e){this._wot.eventListeners=e}get eventManager(){return this._wot.eventManager}createCellCoords(e,t){return this._wot.createCellCoords(e,t)}createCellRange(e,t,n){return this._wot.createCellRange(e,t,n)}draw(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return this._wot.draw(e),this}getCell(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return this._wot.getCell(e,t)}scrollViewport(e,t,n,r,i){return this._wot.scrollViewport(e,t,n,r,i)}scrollViewportHorizontally(e,t,n){return this._wot.scrollViewportHorizontally(e,t,n)}scrollViewportVertically(e,t,n){return this._wot.scrollViewportVertically(e,t,n)}getViewport(){return this._wot.getViewport()}getOverlayName(){return this._wot.cloneOverlay?this._wot.cloneOverlay.type:"master"}getOverlayByName(e){return this._wot.getOverlayByName(e)}exportSettingsAsClassNames(){return this._wot.exportSettingsAsClassNames()}update(e,t){return this._wot.wtSettings.update(e,t),this}getSetting(e,t,n,r,i){return this._wot.wtSettings.getSetting(e,t,n,r,i)}hasSetting(e){return this._wot.wtSettings.hasSetting(e)}destroy(){this._wot.destroy()}}function Fi(e){let{isShiftKey:t,isLeftClick:n,isRightClick:r,coords:i,selection:s,controller:o,cellCoordsFactory:a}=e;const l=s.isSelected()?s.getSelectedRange().current():null,c=s.isSelectedByCorner(),u=s.isSelectedByRowHeader();if(s.markSource("mouse"),t&&l)i.row>=0&&i.col>=0&&!o.cell?s.setRangeEnd(i):(c||u)&&i.row>=0&&i.col>=0&&!o.cell?s.setRangeEnd(a(i.row,i.col)):c&&i.row<0&&!o.column?s.setRangeEnd(a(l.to.row,i.col)):u&&i.col<0&&!o.row?s.setRangeEnd(a(i.row,l.to.col)):(!c&&!u&&i.col<0||c&&i.col<0)&&!o.row?s.selectRows(Math.max(l.from.row,0),i.row,i.col):(!c&&!u&&i.row<0||u&&i.row<0)&&!o.column&&s.selectColumns(Math.max(l.from.col,0),i.col,i.row);else{const e=!s.inInSelection(i),t=n||r&&e;i.row<0&&i.col>=0&&!o.column?t&&s.selectColumns(i.col,i.col,i.row):i.col<0&&i.row>=0&&!o.row?t&&s.selectRows(i.row,i.row,i.col):i.col>=0&&i.row>=0&&!o.cell?t&&s.setRangeStart(i):i.col<0&&i.row<0&&s.selectAll(!0,!0,{disableHeadersHighlight:!0,focusPosition:{row:0,col:0}})}s.markEndSource()}function Yi(e){let{isLeftClick:t,coords:n,selection:r,controller:i,cellCoordsFactory:s}=e;if(!t)return;const o=r.isSelectedByRowHeader(),a=r.isSelectedByColumnHeader(),l=r.tableProps.countCols(),c=r.tableProps.countRows();r.markSource("mouse"),a&&!i.column?r.setRangeEnd(s(c-1,n.col)):o&&!i.row?r.setRangeEnd(s(n.row,l-1)):i.cell||r.setRangeEnd(n),r.markEndSource()}const Hi=new Map([["mousedown",Fi],["mouseover",Yi],["touchstart",Fi]]);function ki(e,t){let{coords:n,selection:r,controller:i,cellCoordsFactory:s}=t;Hi.get(e.type)({coords:n,selection:r,controller:i,cellCoordsFactory:s,isShiftKey:e.shiftKey,isLeftClick:Object(l["isLeftClick"])(e)||"touchstart"===e.type,isRightClick:Object(l["isRightClick"])(e)})}const Vi=new WeakMap,Ui=Symbol("rootInstance");function Wi(e){Vi.set(e,!0)}function Xi(e){return e===Ui}function ji(e){return Vi.has(e)}function Zi(e,t){Ki(e,t),t.add(e)}function Qi(e,t,n){Ki(e,t),t.set(e,n)}function Ki(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Gi(e,t,n){return(t=Bi(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Bi(e){var t=Ji(e,"string");return"symbol"==typeof t?t:t+""}function Ji(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function zi(e,t){return e.get(qi(e,t))}function $i(e,t,n){return e.set(qi(e,t),n),n}function qi(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}var es=new WeakMap,ts=new WeakMap,ns=new WeakMap,rs=new WeakMap,is=new WeakMap,ss=new WeakMap,os=new WeakMap,as=new WeakSet;class ls{constructor(e){Zi(this,as),Gi(this,"hot",void 0),Gi(this,"eventManager",void 0),Gi(this,"settings",void 0),Gi(this,"THEAD",void 0),Gi(this,"TBODY",void 0),Gi(this,"_wt",void 0),Gi(this,"activeWt",void 0),Qi(this,es,0),Qi(this,ts,0),Gi(this,"postponedAdjustElementsSize",!1),Qi(this,ns,!1),Qi(this,rs,void 0),Qi(this,is,void 0),Qi(this,ss,0),Qi(this,os,0),this.hot=e,this.eventManager=new u["a"](this.hot),this.settings=this.hot.getSettings(),this.createElements(),this.registerEvents(),this.initializeWalkontable()}render(){this.hot.isRenderSuspended()||(this.hot.runHooks("beforeRender",this.hot.forceFullRender),this.postponedAdjustElementsSize&&(this.postponedAdjustElementsSize=!1,this.adjustElementsSize(!0)),this._wt.draw(!this.hot.forceFullRender),this.hot.runHooks("afterRender",this.hot.forceFullRender),this.hot.forceFullRender=!1,this.hot.renderCall=!1)}adjustElementsSize(){this.hot.isRenderSuspended()?this.postponedAdjustElementsSize=!0:this._wt.wtOverlays.adjustElementsSize()}getCellAtCoords(e,t){const n=this._wt.getCell(e,t);return n<0?null:n}scrollViewport(e,t,n,r,i){return this._wt.scrollViewport(e,t,n,r,i)}scrollViewportHorizontally(e,t,n){return this._wt.scrollViewportHorizontally(e,t,n)}scrollViewportVertically(e,t,n){return this._wt.scrollViewportVertically(e,t,n)}createElements(){const{rootElement:e,rootDocument:t}=this.hot,n=e.getAttribute("style");n&&e.setAttribute("data-originalstyle",n),Object(r["addClass"])(e,"handsontable"),$i(is,this,t.createElement("TABLE")),Object(r["addClass"])(zi(is,this),"htCore"),this.hot.getSettings().tableClassName&&Object(r["addClass"])(zi(is,this),this.hot.getSettings().tableClassName),this.settings.ariaTags&&(Object(r["setAttribute"])(zi(is,this),[Object(Ge["y"])()]),Object(r["setAttribute"])(e,[Object(Ge["N"])(),Object(Ge["C"])(-1),Object(Ge["e"])(this.hot.countCols()),Object(Ge["v"])()])),this.THEAD=t.createElement("THEAD"),zi(is,this).appendChild(this.THEAD),this.TBODY=t.createElement("TBODY"),zi(is,this).appendChild(this.TBODY),this.hot.table=zi(is,this),this.hot.container.insertBefore(zi(is,this),this.hot.container.firstChild)}registerEvents(){const{rootElement:e,rootDocument:t,selection:n,rootWindow:i}=this.hot,s=t.documentElement;this.eventManager.addEventListener(e,"mousedown",e=>{$i(ns,this,!0),this.isTextSelectionAllowed(e.target)||(Object(r["clearTextSelection"])(i),e.preventDefault(),i.focus())}),this.eventManager.addEventListener(e,"mouseup",()=>{$i(ns,this,!1)}),this.eventManager.addEventListener(e,"mousemove",e=>{zi(ns,this)&&!this.isTextSelectionAllowed(e.target)&&(this.settings.fragmentSelection&&Object(r["clearTextSelection"])(i),e.preventDefault())}),this.eventManager.addEventListener(s,"keyup",e=>{n.isInProgress()&&!e.shiftKey&&n.finish()}),this.eventManager.addEventListener(s,"mouseup",i=>{n.isInProgress()&&Object(l["isLeftClick"])(i)&&n.finish(),$i(rs,this,!1);const s=Object(r["isOutsideInput"])(t.activeElement);Object(r["isInput"])(t.activeElement)&&!s||!s&&(n.isSelected()||n.isSelectedByAnyHeader()||e.contains(i.target)||Object(l["isRightClick"])(i))||this.hot.unlisten()}),this.eventManager.addEventListener(s,"contextmenu",e=>{n.isInProgress()&&Object(l["isRightClick"])(e)&&(n.finish(),$i(rs,this,!1))}),this.eventManager.addEventListener(s,"touchend",()=>{n.isInProgress()&&n.finish(),$i(rs,this,!1)}),this.eventManager.addEventListener(s,"mousedown",n=>{const i=n.target,o=n.x||n.clientX,a=n.y||n.clientY;let l=n.target;if(zi(rs,this)||!e||!this.hot.view)return;const{holder:c}=this._wt.wtTable;if(l===c){const e=Object(r["getScrollbarWidth"])(t);if(t.elementFromPoint(o+e,a)!==c||t.elementFromPoint(o,a+e)!==c)return}else while(l!==s){if(null===l){if(n.isTargetWebComponent)break;return}if(l===e)return;l=l.parentNode}const u="function"===typeof this.settings.outsideClickDeselects?this.settings.outsideClickDeselects(i):this.settings.outsideClickDeselects;u?this.hot.deselectCell():this.hot.destroyEditor(!1,!1)});let o=Object(r["getParentWindow"])(i);while(null!==o)this.eventManager.addEventListener(o.document.documentElement,"click",()=>{this.hot.unlisten()}),o=Object(r["getParentWindow"])(o);this.eventManager.addEventListener(zi(is,this),"selectstart",e=>{this.settings.fragmentSelection||Object(r["isInput"])(e.target)||e.preventDefault()})}translateFromRenderableToVisualCoords(e){let{row:t,col:n}=e;return this.hot._createCellCoords(...this.translateFromRenderableToVisualIndex(t,n))}translateFromRenderableToVisualIndex(e,t){let n=e>=0?this.hot.rowIndexMapper.getVisualFromRenderableIndex(e):e,r=t>=0?this.hot.columnIndexMapper.getVisualFromRenderableIndex(t):t;return null===n&&(n=e),null===r&&(r=t),[n,r]}countRenderableIndexes(e,t){const n=Math.min(e.getNotTrimmedIndexesLength(),t),r=e.getNearestNotHiddenIndex(n-1,-1);return null===r?0:e.getRenderableFromVisualIndex(r)+1}countRenderableColumns(){return this.countRenderableIndexes(this.hot.columnIndexMapper,this.settings.maxCols)}countRenderableRows(){return this.countRenderableIndexes(this.hot.rowIndexMapper,this.settings.maxRows)}countNotHiddenRowIndexes(e,t){return this.countNotHiddenIndexes(e,t,this.hot.rowIndexMapper,this.countRenderableRows())}countNotHiddenColumnIndexes(e,t){return this.countNotHiddenIndexes(e,t,this.hot.columnIndexMapper,this.countRenderableColumns())}countNotHiddenIndexes(e,t,n,r){if(isNaN(e)||e<0)return 0;const i=n.getNearestNotHiddenIndex(e,t),s=n.getRenderableFromVisualIndex(i);if(!Number.isInteger(s))return 0;let o=0;return t<0?o=s+1:t>0&&(o=r-s),o}countNotHiddenFixedColumnsStart(){const e=this.hot.countCols(),t=Math.min(parseInt(this.settings.fixedColumnsStart,10),e)-1;return this.countNotHiddenColumnIndexes(t,-1)}countNotHiddenFixedRowsTop(){const e=this.hot.countRows(),t=Math.min(parseInt(this.settings.fixedRowsTop,10),e)-1;return this.countNotHiddenRowIndexes(t,-1)}countNotHiddenFixedRowsBottom(){const e=this.hot.countRows(),t=Math.max(e-parseInt(this.settings.fixedRowsBottom,10),0);return this.countNotHiddenRowIndexes(t,1)}countRenderableColumnsInRange(e,t){let n=0;for(let r=e;r<=t;r++)null!==this.hot.columnIndexMapper.getRenderableFromVisualIndex(r)&&(n+=1);return n}countRenderableRowsInRange(e,t){let n=0;for(let r=e;r<=t;r++)null!==this.hot.rowIndexMapper.getRenderableFromVisualIndex(r)&&(n+=1);return n}isMainTableNotFullyCoveredByOverlays(){const e=this.countNotHiddenFixedRowsTop()+this.countNotHiddenFixedRowsBottom(),t=this.countNotHiddenFixedColumnsStart();return this.hot.countRenderedRows()>e&&this.hot.countRenderedCols()>t}initializeWalkontable(){const e={ariaTags:this.settings.ariaTags,rtlMode:this.hot.isRtl(),externalRowCalculator:this.hot.getPlugin("autoRowSize")&&this.hot.getPlugin("autoRowSize").isEnabled(),table:zi(is,this),isDataViewInstance:()=>ji(this.hot),preventOverflow:()=>this.settings.preventOverflow,preventWheel:()=>this.settings.preventWheel,stretchH:()=>this.settings.stretchH,data:(e,t)=>this.hot.getDataAtCell(...this.translateFromRenderableToVisualIndex(e,t)),totalRows:()=>this.countRenderableRows(),totalColumns:()=>this.countRenderableColumns(),fixedColumnsStart:()=>this.countNotHiddenFixedColumnsStart(),fixedRowsTop:()=>this.countNotHiddenFixedRowsTop(),fixedRowsBottom:()=>this.countNotHiddenFixedRowsBottom(),shouldRenderInlineStartOverlay:()=>this.settings.fixedColumnsStart>0||e.rowHeaders().length>0,shouldRenderTopOverlay:()=>this.settings.fixedRowsTop>0||e.columnHeaders().length>0,shouldRenderBottomOverlay:()=>this.settings.fixedRowsBottom>0,minSpareRows:()=>this.settings.minSpareRows,renderAllRows:this.settings.renderAllRows,renderAllColumns:this.settings.renderAllColumns,rowHeaders:()=>{const e=[];return this.hot.hasRowHeaders()&&e.push((e,t)=>{const n=e>=0?this.hot.rowIndexMapper.getVisualFromRenderableIndex(e):e;this.appendRowHeader(n,t)}),this.hot.runHooks("afterGetRowHeaderRenderers",e),$i(ts,this,e.length),this.hot.getSettings().ariaTags&&qi(as,this,cs).call(this)===this.hot.countCols()&&qi(as,this,us).call(this,zi(ts,this)),e},columnHeaders:()=>{const e=[];return this.hot.hasColHeaders()&&e.push((e,t)=>{const n=e>=0?this.hot.columnIndexMapper.getVisualFromRenderableIndex(e):e;this.appendColHeader(n,t)}),this.hot.runHooks("afterGetColumnHeaderRenderers",e),$i(es,this,e.length),e},columnWidth:e=>{const t=this.hot.columnIndexMapper.getVisualFromRenderableIndex(e);return this.hot.getColWidth(null===t?e:t)},rowHeight:e=>{const t=this.hot.rowIndexMapper.getVisualFromRenderableIndex(e);return this.hot.getRowHeight(null===t?e:t)},rowHeightByOverlayName:(e,t)=>{const n=this.hot.rowIndexMapper.getVisualFromRenderableIndex(e),r=null===n?e:n;return this.hot.runHooks("modifyRowHeightByOverlayName",this.hot.getRowHeight(r),r,t)},cellRenderer:(e,t,n)=>{const[r,i]=this.translateFromRenderableToVisualIndex(e,t),s=this.hot.runHooks("modifyGetCellCoords",r,i);let o=r,a=i;Array.isArray(s)&&([o,a]=s);const l=this.hot.getCellMeta(o,a),c=this.hot.colToProp(a);let u=this.hot.getDataAtRowProp(o,c);this.hot.hasHook("beforeValueRender")&&(u=this.hot.runHooks("beforeValueRender",u,l)),this.hot.runHooks("beforeRenderer",n,r,i,c,u,l),this.hot.getCellRenderer(l)(this.hot,n,r,i,c,u,l),this.hot.runHooks("afterRenderer",n,r,i,c,u,l)},selections:this.hot.selection.highlight,hideBorderOnMouseDownOver:()=>this.settings.fragmentSelection,onWindowResize:()=>{this.hot&&!this.hot.isDestroyed&&this.hot.refreshDimensions()},onContainerElementResize:()=>{this.hot&&!this.hot.isDestroyed&&Object(r["isVisible"])(this.hot.rootElement)&&this.hot.refreshDimensions()},onCellMouseDown:(e,t,n,r)=>{const i=this.translateFromRenderableToVisualCoords(t),s={row:!1,column:!1,cell:!1};this.hot.listen(),this.activeWt=r,$i(rs,this,!0),this.hot.runHooks("beforeOnCellMouseDown",e,i,n,s),Object(l["isImmediatePropagationStopped"])(e)||(ki(e,{coords:i,selection:this.hot.selection,controller:s,cellCoordsFactory:(e,t)=>this.hot._createCellCoords(e,t)}),this.hot.runHooks("afterOnCellMouseDown",e,i,n),this.activeWt=this._wt)},onCellContextMenu:(e,t,n,r)=>{const i=this.translateFromRenderableToVisualCoords(t);this.activeWt=r,$i(rs,this,!1),this.hot.selection.isInProgress()&&this.hot.selection.finish(),this.hot.runHooks("beforeOnCellContextMenu",e,i,n),Object(l["isImmediatePropagationStopped"])(e)||(this.hot.runHooks("afterOnCellContextMenu",e,i,n),this.activeWt=this._wt)},onCellMouseOut:(e,t,n,r)=>{const i=this.translateFromRenderableToVisualCoords(t);this.activeWt=r,this.hot.runHooks("beforeOnCellMouseOut",e,i,n),Object(l["isImmediatePropagationStopped"])(e)||(this.hot.runHooks("afterOnCellMouseOut",e,i,n),this.activeWt=this._wt)},onCellMouseOver:(e,t,n,r)=>{const i=this.translateFromRenderableToVisualCoords(t),s={row:!1,column:!1,cell:!1};this.activeWt=r,this.hot.runHooks("beforeOnCellMouseOver",e,i,n,s),Object(l["isImmediatePropagationStopped"])(e)||(zi(rs,this)&&ki(e,{coords:i,selection:this.hot.selection,controller:s,cellCoordsFactory:(e,t)=>this.hot._createCellCoords(e,t)}),this.hot.runHooks("afterOnCellMouseOver",e,i,n),this.activeWt=this._wt)},onCellMouseUp:(e,t,n,r)=>{const i=this.translateFromRenderableToVisualCoords(t);this.activeWt=r,this.hot.runHooks("beforeOnCellMouseUp",e,i,n),Object(l["isImmediatePropagationStopped"])(e)||this.hot.isDestroyed||(this.hot.runHooks("afterOnCellMouseUp",e,i,n),this.activeWt=this._wt)},onCellCornerMouseDown:e=>{e.preventDefault(),this.hot.runHooks("afterOnCellCornerMouseDown",e)},onCellCornerDblClick:e=>{e.preventDefault(),this.hot.runHooks("afterOnCellCornerDblClick",e)},beforeDraw:(e,t)=>this.beforeRender(e,t),onDraw:e=>this.afterRender(e),onBeforeViewportScrollVertically:e=>{const t=this.hot.rowIndexMapper,n=e<0;let r=e;return n||(r=t.getVisualFromRenderableIndex(e),null!==r)?(r=this.hot.runHooks("beforeViewportScrollVertically",r),this.hot.runHooks("beforeViewportScroll"),n?r:t.getRenderableFromVisualIndex(r)):e},onBeforeViewportScrollHorizontally:e=>{const t=this.hot.columnIndexMapper,n=e<0;let r=e;return n||(r=t.getVisualFromRenderableIndex(e),null!==r)?(r=this.hot.runHooks("beforeViewportScrollHorizontally",r),this.hot.runHooks("beforeViewportScroll"),n?r:t.getRenderableFromVisualIndex(r)):e},onScrollVertically:()=>{this.hot.runHooks("afterScrollVertically"),this.hot.runHooks("afterScroll")},onScrollHorizontally:()=>{this.hot.runHooks("afterScrollHorizontally"),this.hot.runHooks("afterScroll")},onBeforeRemoveCellClassNames:()=>this.hot.runHooks("beforeRemoveCellClassNames"),onBeforeHighlightingRowHeader:(e,t,n)=>{const r=this.hot.rowIndexMapper,i=e<0;let s=e;i||(s=r.getVisualFromRenderableIndex(e));const o=this.hot.runHooks("beforeHighlightingRowHeader",s,t,n);return i?o:r.getRenderableFromVisualIndex(r.getNearestNotHiddenIndex(o,1))},onBeforeHighlightingColumnHeader:(e,t,n)=>{const r=this.hot.columnIndexMapper,i=e<0;let s=e;i||(s=r.getVisualFromRenderableIndex(e));const o=this.hot.runHooks("beforeHighlightingColumnHeader",s,t,n);return i?o:r.getRenderableFromVisualIndex(r.getNearestNotHiddenIndex(o,1))},onAfterDrawSelection:(e,t,n)=>{let r;const[i,s]=this.translateFromRenderableToVisualIndex(e,t),o=this.hot.selection.getSelectedRange(),a=o.size();if(a>0){const e=o.peekByIndex(null!==n&&void 0!==n?n:0);r=[e.from.row,e.from.col,e.to.row,e.to.col]}return this.hot.runHooks("afterDrawSelection",i,s,r,n)},onBeforeDrawBorders:(e,t)=>{const[n,r,i,s]=e,o=[this.hot.rowIndexMapper.getVisualFromRenderableIndex(n),this.hot.columnIndexMapper.getVisualFromRenderableIndex(r),this.hot.rowIndexMapper.getVisualFromRenderableIndex(i),this.hot.columnIndexMapper.getVisualFromRenderableIndex(s)];return this.hot.runHooks("beforeDrawBorders",o,t)},onBeforeTouchScroll:()=>this.hot.runHooks("beforeTouchScroll"),onAfterMomentumScroll:()=>this.hot.runHooks("afterMomentumScroll"),onBeforeStretchingColumnWidth:(e,t)=>{const n=this.hot.columnIndexMapper.getVisualFromRenderableIndex(t);return this.hot.runHooks("beforeStretchingColumnWidth",e,n)},onModifyRowHeaderWidth:e=>this.hot.runHooks("modifyRowHeaderWidth",e),onModifyGetCellCoords:(e,t,n)=>{const r=this.hot.rowIndexMapper,i=this.hot.columnIndexMapper,s=t>=0?i.getVisualFromRenderableIndex(t):t,o=e>=0?r.getVisualFromRenderableIndex(e):e,a=this.hot.runHooks("modifyGetCellCoords",o,s,n);if(Array.isArray(a)){const[e,t,n,s]=a;return[e>=0?r.getRenderableFromVisualIndex(r.getNearestNotHiddenIndex(e,1)):e,t>=0?i.getRenderableFromVisualIndex(i.getNearestNotHiddenIndex(t,1)):t,n>=0?r.getRenderableFromVisualIndex(r.getNearestNotHiddenIndex(n,-1)):n,s>=0?i.getRenderableFromVisualIndex(i.getNearestNotHiddenIndex(s,-1)):s]}},viewportRowCalculatorOverride:e=>{let t=this.settings.viewportRowRenderingOffset;if("auto"===t&&this.settings.fixedRowsTop&&(t=10),t>0||"auto"===t){const n=this.countRenderableRows(),r=e.startRow,i=e.endRow;if("number"===typeof t)e.startRow=Math.max(r-t,0),e.endRow=Math.min(i+t,n-1);else if("auto"===t){const t=Math.ceil(i/n*12);e.startRow=Math.max(r-t,0),e.endRow=Math.min(i+t,n-1)}}this.hot.runHooks("afterViewportRowCalculatorOverride",e)},viewportColumnCalculatorOverride:e=>{let t=this.settings.viewportColumnRenderingOffset;if("auto"===t&&this.settings.fixedColumnsStart&&(t=10),t>0||"auto"===t){const n=this.countRenderableColumns(),r=e.startColumn,i=e.endColumn;if("number"===typeof t&&(e.startColumn=Math.max(r-t,0),e.endColumn=Math.min(i+t,n-1)),"auto"===t){const t=Math.ceil(i/n*6);e.startColumn=Math.max(r-t,0),e.endColumn=Math.min(i+t,n-1)}}this.hot.runHooks("afterViewportColumnCalculatorOverride",e)},rowHeaderWidth:()=>this.settings.rowHeaderWidth,columnHeaderHeight:()=>{const e=this.hot.runHooks("modifyColumnHeaderHeight");return this.settings.columnHeaderHeight||e}};this.hot.runHooks("beforeInitWalkontable",e),this._wt=new Ai(e),this.activeWt=this._wt;const t=this._wt.wtTable.spreader,{width:n,height:i}=this.hot.rootElement.getBoundingClientRect();this.setLastSize(n,i),this.eventManager.addEventListener(t,"mousedown",e=>{e.target===t&&3===e.which&&e.stopPropagation()}),this.eventManager.addEventListener(t,"contextmenu",e=>{e.target===t&&3===e.which&&e.stopPropagation()}),this.eventManager.addEventListener(this.hot.rootDocument.documentElement,"click",()=>{this.settings.observeDOMVisibility&&this._wt.drawInterrupted&&(this.hot.forceFullRender=!0,this.render())})}isTextSelectionAllowed(e){if(Object(r["isInput"])(e))return!0;const t=Object(r["isChildOf"])(e,this._wt.wtTable.spreader);return!(!0!==this.settings.fragmentSelection||!t)||(!("cell"!==this.settings.fragmentSelection||!this.isSelectedOnlyCell()||!t)||!(this.settings.fragmentSelection||!this.isCellEdited()||!this.isSelectedOnlyCell()))}isMouseDown(){return zi(rs,this)}isSelectedOnlyCell(){var e,t;return null!==(e=null===(t=this.hot.getSelectedRangeLast())||void 0===t?void 0:t.isSingleCell())&&void 0!==e&&e}isCellEdited(){const e=this.hot.getActiveEditor();return e&&e.isOpened()}beforeRender(e,t){e&&this.hot.runHooks("beforeViewRender",this.hot.forceFullRender,t)}afterRender(e){e&&this.hot.runHooks("afterViewRender",this.hot.forceFullRender)}appendRowHeader(e,t){if(t.firstChild){const n=t.firstChild;if(!Object(r["hasClass"])(n,"relative"))return Object(r["empty"])(t),void this.appendRowHeader(e,t);this.updateCellHeader(n.querySelector(".rowHeader"),e,this.hot.getRowHeader)}else{const{rootDocument:n,getRowHeader:r}=this.hot,i=n.createElement("div"),s=n.createElement("span");i.className="relative",s.className="rowHeader",this.updateCellHeader(s,e,r),i.appendChild(s),t.appendChild(i)}this.hot.runHooks("afterGetRowHeader",e,t)}appendColHeader(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.hot.getColHeader,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;const s=()=>{const t=e>=0?this.hot.getColumnMeta(e).headerClassName:null;return t?t.split(" "):[]};if(t.firstChild){const o=t.firstChild;Object(r["hasClass"])(o,"relative")?(this.updateCellHeader(o.querySelector(".colHeader"),e,n,i),o.className="",Object(r["addClass"])(o,["relative",...s()])):(Object(r["empty"])(t),this.appendColHeader(e,t,n,i))}else{const{rootDocument:o}=this.hot,a=o.createElement("div"),l=o.createElement("span"),c=s();a.classList.add("relative",...c),l.className="colHeader",this.settings.ariaTags&&(Object(r["setAttribute"])(a,...Object(Ge["y"])()),Object(r["setAttribute"])(l,...Object(Ge["y"])())),this.updateCellHeader(l,e,n,i),a.appendChild(l),t.appendChild(a)}this.hot.runHooks("afterGetColHeader",e,t,i)}updateCellHeader(e,t,n){let i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,s=t;const o=this._wt.wtOverlays.getParentOverlay(e)||this._wt;e.parentNode&&(Object(r["hasClass"])(e,"colHeader")?s=o.wtTable.columnFilter.sourceToRendered(t):Object(r["hasClass"])(e,"rowHeader")&&(s=o.wtTable.rowFilter.sourceToRendered(t))),s>-1?Object(r["fastInnerHTML"])(e,n(t,i)):(Object(r["fastInnerText"])(e,String.fromCharCode(160)),Object(r["addClass"])(e,"cornerHeader"))}maximumVisibleElementWidth(e){const t=this._wt.wtViewport.getWorkspaceWidth(),n=t-e;return n>0?n:0}maximumVisibleElementHeight(e){const t=this._wt.wtViewport.getWorkspaceHeight(),n=t-e;return n>0?n:0}setLastSize(e,t){$i(ss,this,e),$i(os,this,t)}getLastSize(){return{width:zi(ss,this),height:zi(os,this)}}getFirstRenderedVisibleRow(){return this._wt.wtViewport.rowsRenderCalculator?this.hot.rowIndexMapper.getNearestNotHiddenIndex(this._wt.wtTable.getFirstRenderedRow(),1):null}getLastRenderedVisibleRow(){return this._wt.wtViewport.rowsRenderCalculator?this.hot.rowIndexMapper.getNearestNotHiddenIndex(this._wt.wtTable.getLastRenderedRow(),-1):null}getFirstRenderedVisibleColumn(){return this._wt.wtViewport.columnsRenderCalculator?this.hot.columnIndexMapper.getNearestNotHiddenIndex(this._wt.wtTable.getFirstRenderedColumn(),1):null}getLastRenderedVisibleColumn(){return this._wt.wtViewport.columnsRenderCalculator?this.hot.columnIndexMapper.getNearestNotHiddenIndex(this._wt.wtTable.getLastRenderedColumn(),-1):null}getFirstFullyVisibleRow(){return this.hot.rowIndexMapper.getVisualFromRenderableIndex(this._wt.wtScroll.getFirstVisibleRow())}getLastFullyVisibleRow(){return this.hot.rowIndexMapper.getVisualFromRenderableIndex(this._wt.wtScroll.getLastVisibleRow())}getFirstFullyVisibleColumn(){return this.hot.columnIndexMapper.getVisualFromRenderableIndex(this._wt.wtScroll.getFirstVisibleColumn())}getLastFullyVisibleColumn(){return this.hot.columnIndexMapper.getVisualFromRenderableIndex(this._wt.wtScroll.getLastVisibleColumn())}getFirstPartiallyVisibleRow(){return this.hot.rowIndexMapper.getVisualFromRenderableIndex(this._wt.wtScroll.getFirstPartiallyVisibleRow())}getLastPartiallyVisibleRow(){return this.hot.rowIndexMapper.getVisualFromRenderableIndex(this._wt.wtScroll.getLastPartiallyVisibleRow())}getFirstPartiallyVisibleColumn(){return this.hot.columnIndexMapper.getVisualFromRenderableIndex(this._wt.wtScroll.getFirstPartiallyVisibleColumn())}getLastPartiallyVisibleColumn(){return this.hot.columnIndexMapper.getVisualFromRenderableIndex(this._wt.wtScroll.getLastPartiallyVisibleColumn())}getColumnHeadersCount(){return zi(es,this)}getRowHeadersCount(){return zi(ts,this)}getViewportWidth(){return this._wt.wtViewport.getViewportWidth()}getWorkspaceWidth(){return this._wt.wtViewport.getWorkspaceWidth()}getViewportHeight(){return this._wt.wtViewport.getViewportHeight()}getWorkspaceHeight(){return this._wt.wtViewport.getWorkspaceHeight()}getElementOverlayName(e){var t;return(null!==(t=this._wt.wtOverlays.getParentOverlay(e))&&void 0!==t?t:this._wt).wtTable.name}getOverlayByName(e){return this._wt.getOverlayByName(e)}isVisible(){return this._wt.wtTable.isVisible()}destroy(){this._wt.destroy(),this.eventManager.destroy()}}function cs(){return parseInt(this.hot.rootElement.getAttribute(Object(Ge["e"])()[0]),10)}function us(e){const t=qi(as,this,cs).call(this)+e;Object(r["setAttribute"])(this.hot.rootElement,...Object(Ge["e"])(t))}var hs=ls,ds=n("480c");function ms(e,t,n){return(t=gs(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function gs(e){var t=ps(e,"string");return"symbol"==typeof t?t:t+""}function ps(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}class fs{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];ms(this,"hot",void 0),ms(this,"data",void 0),ms(this,"dataType","array"),ms(this,"colToProp",()=>{}),ms(this,"propToCol",()=>{}),this.hot=e,this.data=t}modifyRowData(e){let t;return this.hot.hasHook("modifyRowData")&&(t=this.hot.runHooks("modifyRowData",e)),void 0===t||Number.isInteger(t)?this.data[e]:t}getData(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return this.data&&0!==this.data.length?this.getByRange(null,null,e):this.data}setData(e){this.data=e}getAtColumn(e){const t=[];return Object(X["arrayEach"])(this.data,(n,r)=>{const i=this.getAtCell(r,e);t.push(i)}),t}getAtRow(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];const s=void 0===t&&void 0===n,{dataDotNotation:o}=this.hot.getSettings();let a=null,l=null;if(a=this.modifyRowData(e),Array.isArray(a))l=[],s?a.forEach((t,n)=>{l[n]=this.getAtPhysicalCell(e,n,a)}):Object(B["rangeEach"])(t,n,n=>{l[n-t]=this.getAtPhysicalCell(e,n,a)});else if(Object(T["isObject"])(a)||Object(i["isFunction"])(a))if(l=r?[]:{},!s||r){const i=0,s=this.countFirstRowKeys()-1;Object(B["rangeEach"])(i,s,c=>{const u=this.colToProp(c);if(c>=(t||i)&&c<=(n||s)&&!Number.isInteger(u)){const t=this.getAtPhysicalCell(e,u,a);r?l.push(t):o?Object(T["setProperty"])(l,u,t):l[u]=t}})}else Object(T["objectEach"])(a,(t,n)=>{const r=this.getAtPhysicalCell(e,n,a);o?Object(T["setProperty"])(l,n,r):l[n]=r});return l}setAtCell(e,t,n){if(!(e>=this.countRows()||t>=this.countFirstRowKeys())){if(this.hot.hasHook("modifySourceData")){const r=Object(T["createObjectPropListener"])(n);this.hot.runHooks("modifySourceData",e,t,r,"set"),r.isTouched()&&(n=r.value)}Number.isInteger(t)?this.data[e][t]=n:Object(T["setProperty"])(this.data[e],t,n)}}getAtPhysicalCell(e,t,n){let r=null;if(n)if("string"===typeof t){const{dataDotNotation:e}=this.hot.getSettings();r=e?Object(T["getProperty"])(n,t):n[t]}else r="function"===typeof t?t(n):n[t];if(this.hot.hasHook("modifySourceData")){const n=Object(T["createObjectPropListener"])(r);this.hot.runHooks("modifySourceData",e,t,n,"get"),n.isTouched()&&(r=n.value)}return r}getAtCell(e,t){const n=this.modifyRowData(e);return this.getAtPhysicalCell(e,this.colToProp(t),n)}getByRange(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=!1,i=null,s=null,o=null,a=null;null===e||null===t?(r=!0,i=0,o=this.countRows()-1):(i=Math.min(e.row,t.row),s=Math.min(e.col,t.col),o=Math.max(e.row,t.row),a=Math.max(e.col,t.col));const l=[];return Object(B["rangeEach"])(i,o,e=>{l.push(r?this.getAtRow(e,void 0,void 0,n):this.getAtRow(e,s,a,n))}),l}countRows(){if(this.hot.hasHook("modifySourceLength")){const e=this.hot.runHooks("modifySourceLength");if(Number.isInteger(e))return e}return this.data.length}countFirstRowKeys(){return Object(ds["countFirstRowKeys"])(this.data)}destroy(){this.data=null,this.hot=null}}var Rs=fs,ys=n("1b1a"),Ms=n("cef7"),Ss=n("1096"),bs=n("9056"),ws=n("9f10"),Ts=n("00fd");const Os=new Map([["hiding",Ms["a"]],["index",Ss["a"]],["linkedPhysicalIndexToValue",bs["a"]],["physicalIndexToValue",ws["a"]],["trimming",Ts["a"]]]);function vs(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(!Os.has(e))throw new Error(`The provided map type ("${e}") does not exist.`);return new(Os.get(e))(t)}var Es=n("3d57"),Cs=n("c5cd");function Ls(e,t,n){return(t=Ns(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ns(e){var t=_s(e,"string");return"symbol"==typeof t?t:t+""}function _s(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}class Is extends Cs["a"]{constructor(e,t){super(),Ls(this,"mergedValuesCache",[]),Ls(this,"aggregationFunction",void 0),Ls(this,"fallbackValue",void 0),this.aggregationFunction=e,this.fallbackValue=t}getMergedValues(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];if(!0===e)return this.mergedValuesCache;if(0===this.getLength())return[];const t=Object(X["arrayMap"])(this.get(),e=>e.getValues()),n=[],r=Object(s["isDefined"])(t[0])&&t[0].length||0;for(let i=0;i<r;i+=1){const e=[];for(let n=0;n<this.getLength();n+=1)e.push(t[n][i]);n.push(e)}return Object(X["arrayMap"])(n,this.aggregationFunction)}getMergedValueAtIndex(e,t){const n=this.getMergedValues(t)[e];return Object(s["isDefined"])(n)?n:this.fallbackValue}updateCache(){this.mergedValuesCache=this.getMergedValues(!1)}}var Ps=n("7ae0");function xs(e,t,n){Ds(e,t),t.set(e,n)}function Ds(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function As(e,t,n){return e.set(Ys(e,t),n),n}function Fs(e,t){return e.get(Ys(e,t))}function Ys(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}var Hs=new WeakMap;class ks{constructor(){xs(this,Hs,[])}subscribe(e){return this.addLocalHook("change",e),this._write(Fs(Hs,this)),this}unsubscribe(){return this.runLocalHooks("unsubscribe"),this.clearLocalHooks(),this}_write(e){return e.length>0&&this.runLocalHooks("change",e),this}_writeInitialChanges(e){As(Hs,this,e)}}function Vs(e,t){const n=[];let r=0,i=0;for(;r<e.length&&i<t.length;r++,i++)e[r]!==t[i]&&n.push({op:"replace",index:i,oldValue:e[r],newValue:t[i]});for(;r<t.length;r++)n.push({op:"insert",index:r,oldValue:void 0,newValue:t[r]});for(;i<e.length;i++)n.push({op:"remove",index:i,oldValue:e[i],newValue:void 0});return n}function Us(e,t,n){Ws(e,t),t.set(e,n)}function Ws(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Xs(e,t){return e.get(Zs(e,t))}function js(e,t,n){return e.set(Zs(e,t),n),n}function Zs(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}Object(T["mixin"])(ks,Ps["a"]);var Qs=new WeakMap,Ks=new WeakMap,Gs=new WeakMap,Bs=new WeakMap,Js=new WeakMap;class zs{constructor(){let{initialIndexValue:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};Us(this,Qs,new Set),Us(this,Ks,[]),Us(this,Gs,[]),Us(this,Bs,!1),Us(this,Js,!1),js(Js,this,null!==e&&void 0!==e&&e)}createObserver(){const e=new ks;return Xs(Qs,this).add(e),e.addLocalHook("unsubscribe",()=>{Xs(Qs,this).delete(e)}),e._writeInitialChanges(Vs(Xs(Ks,this),Xs(Gs,this))),e}emit(e){let t=Xs(Gs,this);Xs(Bs,this)&&Xs(Ks,this).length===e.length||(0===e.length?e=new Array(t.length).fill(Xs(Js,this)):js(Ks,this,new Array(e.length).fill(Xs(Js,this))),Xs(Bs,this)||(js(Bs,this,!0),t=Xs(Ks,this)));const n=Vs(t,e);Xs(Qs,this).forEach(e=>e._write(n)),js(Gs,this,e)}}function $s(e,t,n){return(t=qs(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function qs(e){var t=eo(e,"string");return"symbol"==typeof t?t:t+""}function eo(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}new Set;class to{constructor(){$s(this,"indexesSequence",new ys["a"]),$s(this,"trimmingMapsCollection",new Is(e=>e.some(e=>!0===e),!1)),$s(this,"hidingMapsCollection",new Is(e=>e.some(e=>!0===e),!1)),$s(this,"variousMapsCollection",new Cs["a"]),$s(this,"hidingChangesObservable",new zs({initialIndexValue:!1})),$s(this,"notTrimmedIndexesCache",[]),$s(this,"notHiddenIndexesCache",[]),$s(this,"isBatched",!1),$s(this,"indexesSequenceChanged",!1),$s(this,"indexesChangeSource",void 0),$s(this,"trimmedIndexesChanged",!1),$s(this,"hiddenIndexesChanged",!1),$s(this,"renderablePhysicalIndexesCache",[]),$s(this,"fromPhysicalToVisualIndexesCache",new Map),$s(this,"fromVisualToRenderableIndexesCache",new Map),this.indexesSequence.addLocalHook("change",()=>{this.indexesSequenceChanged=!0,this.updateCache(),this.runLocalHooks("indexesSequenceChange",this.indexesChangeSource),this.runLocalHooks("change",this.indexesSequence,null)}),this.trimmingMapsCollection.addLocalHook("change",e=>{this.trimmedIndexesChanged=!0,this.updateCache(),this.runLocalHooks("change",e,this.trimmingMapsCollection)}),this.hidingMapsCollection.addLocalHook("change",e=>{this.hiddenIndexesChanged=!0,this.updateCache(),this.runLocalHooks("change",e,this.hidingMapsCollection)}),this.variousMapsCollection.addLocalHook("change",e=>{this.runLocalHooks("change",e,this.variousMapsCollection)})}suspendOperations(){this.isBatched=!0}resumeOperations(){this.isBatched=!1,this.updateCache()}createChangesObserver(e){if("hiding"!==e)throw new Error(`Unsupported index map type "${e}".`);return this.hidingChangesObservable.createObserver()}createAndRegisterIndexMap(e,t,n){return this.registerMap(e,vs(t,n))}registerMap(e,t){if(this.trimmingMapsCollection.get(e)||this.hidingMapsCollection.get(e)||this.variousMapsCollection.get(e))throw Error(`Map with name "${e}" has been already registered.`);t instanceof Ts["a"]?this.trimmingMapsCollection.register(e,t):t instanceof Ms["a"]?this.hidingMapsCollection.register(e,t):this.variousMapsCollection.register(e,t);const n=this.getNumberOfIndexes();return n>0&&t.init(n),t}unregisterMap(e){this.trimmingMapsCollection.unregister(e),this.hidingMapsCollection.unregister(e),this.variousMapsCollection.unregister(e)}unregisterAll(){this.trimmingMapsCollection.unregisterAll(),this.hidingMapsCollection.unregisterAll(),this.variousMapsCollection.unregisterAll()}getPhysicalFromVisualIndex(e){const t=this.notTrimmedIndexesCache[e];return Object(s["isDefined"])(t)?t:null}getPhysicalFromRenderableIndex(e){const t=this.renderablePhysicalIndexesCache[e];return Object(s["isDefined"])(t)?t:null}getVisualFromPhysicalIndex(e){const t=this.fromPhysicalToVisualIndexesCache.get(e);return Object(s["isDefined"])(t)?t:null}getVisualFromRenderableIndex(e){return this.getVisualFromPhysicalIndex(this.getPhysicalFromRenderableIndex(e))}getRenderableFromVisualIndex(e){const t=this.fromVisualToRenderableIndexesCache.get(e);return Object(s["isDefined"])(t)?t:null}getNearestNotHiddenIndex(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const r=this.getPhysicalFromVisualIndex(e);if(null===r)return null;if(this.fromVisualToRenderableIndexesCache.has(e))return e;const i=Array.from(this.fromVisualToRenderableIndexesCache.keys());let s=-1;return s=t>0?i.findIndex(t=>t>e):i.reverse().findIndex(t=>t<e),-1===s?n?this.getNearestNotHiddenIndex(e,-t,!1):null:i[s]}initToLength(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.getNumberOfIndexes();this.notTrimmedIndexesCache=[...new Array(e).keys()],this.notHiddenIndexesCache=[...new Array(e).keys()],this.suspendOperations(),this.indexesChangeSource="init",this.indexesSequence.init(e),this.indexesChangeSource=void 0,this.trimmingMapsCollection.initEvery(e),this.resumeOperations(),this.suspendOperations(),this.hidingMapsCollection.initEvery(e),this.variousMapsCollection.initEvery(e),this.resumeOperations(),this.runLocalHooks("init")}fitToLength(e){const t=this.getNumberOfIndexes();if(e<t){const t=[...Array(this.getNumberOfIndexes()-e).keys()].map(t=>t+e);this.removeIndexes(t)}else this.insertIndexes(t,e-t)}getIndexesSequence(){return this.indexesSequence.getValues()}setIndexesSequence(e){void 0===this.indexesChangeSource&&(this.indexesChangeSource="update"),this.indexesSequence.setValues(e),"update"===this.indexesChangeSource&&(this.indexesChangeSource=void 0)}getNotTrimmedIndexes(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];if(!0===e)return this.notTrimmedIndexesCache;const t=this.getIndexesSequence();return t.filter(e=>!1===this.isTrimmed(e))}getNotTrimmedIndexesLength(){return this.getNotTrimmedIndexes().length}getNotHiddenIndexes(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];if(!0===e)return this.notHiddenIndexesCache;const t=this.getIndexesSequence();return t.filter(e=>!1===this.isHidden(e))}getNotHiddenIndexesLength(){return this.getNotHiddenIndexes().length}getRenderableIndexes(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];if(!0===e)return this.renderablePhysicalIndexesCache;const t=this.getNotTrimmedIndexes();return t.filter(e=>!1===this.isHidden(e))}getRenderableIndexesLength(){return this.getRenderableIndexes().length}getNumberOfIndexes(){return this.getIndexesSequence().length}moveIndexes(e,t){"number"===typeof e&&(e=[e]);const n=Object(X["arrayMap"])(e,e=>this.getPhysicalFromVisualIndex(e)),r=this.getNotTrimmedIndexesLength(),i=e.length,s=Object(Es["b"])(this.getIndexesSequence(),n),o=s.filter(e=>!1===this.isTrimmed(e));let a=s.indexOf(o[o.length-1])+1;if(t+i<r){const e=o[t];a=s.indexOf(e)}this.indexesChangeSource="move",this.setIndexesSequence(Object(Es["a"])(s,a,n)),this.indexesChangeSource=void 0}isTrimmed(e){return this.trimmingMapsCollection.getMergedValueAtIndex(e)}isHidden(e){return this.hidingMapsCollection.getMergedValueAtIndex(e)}insertIndexes(e,t){const n=this.getNotTrimmedIndexes()[e],r=Object(s["isDefined"])(n)?n:this.getNumberOfIndexes(),i=this.getIndexesSequence().includes(n)?this.getIndexesSequence().indexOf(n):this.getNumberOfIndexes(),o=Object(X["arrayMap"])(new Array(t).fill(r),(e,t)=>e+t);this.suspendOperations(),this.indexesChangeSource="insert",this.indexesSequence.insert(i,o),this.indexesChangeSource=void 0,this.trimmingMapsCollection.insertToEvery(i,o),this.hidingMapsCollection.insertToEvery(i,o),this.variousMapsCollection.insertToEvery(i,o),this.resumeOperations()}removeIndexes(e){this.suspendOperations(),this.indexesChangeSource="remove",this.indexesSequence.remove(e),this.indexesChangeSource=void 0,this.trimmingMapsCollection.removeFromEvery(e),this.hidingMapsCollection.removeFromEvery(e),this.variousMapsCollection.removeFromEvery(e),this.resumeOperations()}updateCache(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];const t=this.indexesSequenceChanged||this.trimmedIndexesChanged||this.hiddenIndexesChanged;(!0===e||!1===this.isBatched&&!0===t)&&(this.trimmingMapsCollection.updateCache(),this.hidingMapsCollection.updateCache(),this.notTrimmedIndexesCache=this.getNotTrimmedIndexes(!1),this.notHiddenIndexesCache=this.getNotHiddenIndexes(!1),this.renderablePhysicalIndexesCache=this.getRenderableIndexes(!1),this.cacheFromPhysicalToVisualIndexes(),this.cacheFromVisualToRenderableIndexes(),this.hiddenIndexesChanged&&this.hidingChangesObservable.emit(this.hidingMapsCollection.getMergedValues()),this.runLocalHooks("cacheUpdated",{indexesSequenceChanged:this.indexesSequenceChanged,trimmedIndexesChanged:this.trimmedIndexesChanged,hiddenIndexesChanged:this.hiddenIndexesChanged}),this.indexesSequenceChanged=!1,this.trimmedIndexesChanged=!1,this.hiddenIndexesChanged=!1)}cacheFromPhysicalToVisualIndexes(){const e=this.getNotTrimmedIndexesLength();this.fromPhysicalToVisualIndexesCache.clear();for(let t=0;t<e;t+=1){const e=this.getPhysicalFromVisualIndex(t);this.fromPhysicalToVisualIndexesCache.set(e,t)}}cacheFromVisualToRenderableIndexes(){const e=this.getRenderableIndexesLength();this.fromVisualToRenderableIndexesCache.clear();for(let t=0;t<e;t+=1){const e=this.getPhysicalFromRenderableIndex(t),n=this.getVisualFromPhysicalIndex(e);this.fromVisualToRenderableIndexesCache.set(n,t)}}}Object(T["mixin"])(to,Ps["a"]);var no=n("1004");function ro(e,t){return Object(T["objectEach"])(t,(t,n)=>{Object(s["isUndefined"])(e[n])&&(e[n]=t)}),e}function io(e){const t=/^([a-zA-Z]{2})-([a-zA-Z]{2})$/,n=t.exec(e);return n?`${n[1].toLowerCase()}-${n[2].toUpperCase()}`:e}function so(e){Object(s["isDefined"])(e)&&Object(O["a"])(et["a"]`Language with code "${e}" was not found. You should register particular language\x20
  285. before using it. Read more about this issue at: https://docs.handsontable.com/i18n/missing-language-code.`)}var oo=n("9acd");function ao(e,t){const n=Array.isArray(e)&&Number.isInteger(t);return n?e[t]:e}const{register:lo,getValues:co}=Object(oo["a"])("phraseFormatters");function uo(e,t){lo(e,t)}function ho(){return co()}uo("pluralize",ao);var mo=n("0283");
  286. /**
  287. * @preserve
  288. * Authors: Handsoncode
  289. * Last updated: Nov 15, 2017
  290. *
  291. * Description: Definition file for English - United States language-country.
  292. */const go={languageCode:"en-US",[mo["CONTEXTMENU_ITEMS_NO_ITEMS"]]:"No available options",[mo["CONTEXTMENU_ITEMS_ROW_ABOVE"]]:"Insert row above",[mo["CONTEXTMENU_ITEMS_ROW_BELOW"]]:"Insert row below",[mo["CONTEXTMENU_ITEMS_INSERT_LEFT"]]:"Insert column left",[mo["CONTEXTMENU_ITEMS_INSERT_RIGHT"]]:"Insert column right",[mo["CONTEXTMENU_ITEMS_REMOVE_ROW"]]:["Remove row","Remove rows"],[mo["CONTEXTMENU_ITEMS_REMOVE_COLUMN"]]:["Remove column","Remove columns"],[mo["CONTEXTMENU_ITEMS_UNDO"]]:"Undo",[mo["CONTEXTMENU_ITEMS_REDO"]]:"Redo",[mo["CONTEXTMENU_ITEMS_READ_ONLY"]]:"Read only",[mo["CONTEXTMENU_ITEMS_CLEAR_COLUMN"]]:"Clear column",[mo["CONTEXTMENU_ITEMS_ALIGNMENT"]]:"Alignment",[mo["CONTEXTMENU_ITEMS_ALIGNMENT_LEFT"]]:"Left",[mo["CONTEXTMENU_ITEMS_ALIGNMENT_CENTER"]]:"Center",[mo["CONTEXTMENU_ITEMS_ALIGNMENT_RIGHT"]]:"Right",[mo["CONTEXTMENU_ITEMS_ALIGNMENT_JUSTIFY"]]:"Justify",[mo["CONTEXTMENU_ITEMS_ALIGNMENT_TOP"]]:"Top",[mo["CONTEXTMENU_ITEMS_ALIGNMENT_MIDDLE"]]:"Middle",[mo["CONTEXTMENU_ITEMS_ALIGNMENT_BOTTOM"]]:"Bottom",[mo["CONTEXTMENU_ITEMS_FREEZE_COLUMN"]]:"Freeze column",[mo["CONTEXTMENU_ITEMS_UNFREEZE_COLUMN"]]:"Unfreeze column",[mo["CONTEXTMENU_ITEMS_BORDERS"]]:"Borders",[mo["CONTEXTMENU_ITEMS_BORDERS_TOP"]]:"Top",[mo["CONTEXTMENU_ITEMS_BORDERS_RIGHT"]]:"Right",[mo["CONTEXTMENU_ITEMS_BORDERS_BOTTOM"]]:"Bottom",[mo["CONTEXTMENU_ITEMS_BORDERS_LEFT"]]:"Left",[mo["CONTEXTMENU_ITEMS_REMOVE_BORDERS"]]:"Remove border(s)",[mo["CONTEXTMENU_ITEMS_ADD_COMMENT"]]:"Add comment",[mo["CONTEXTMENU_ITEMS_EDIT_COMMENT"]]:"Edit comment",[mo["CONTEXTMENU_ITEMS_REMOVE_COMMENT"]]:"Delete comment",[mo["CONTEXTMENU_ITEMS_READ_ONLY_COMMENT"]]:"Read-only comment",[mo["CONTEXTMENU_ITEMS_MERGE_CELLS"]]:"Merge cells",[mo["CONTEXTMENU_ITEMS_UNMERGE_CELLS"]]:"Unmerge cells",[mo["CONTEXTMENU_ITEMS_COPY"]]:"Copy",[mo["CONTEXTMENU_ITEMS_COPY_WITH_COLUMN_HEADERS"]]:["Copy with header","Copy with headers"],[mo["CONTEXTMENU_ITEMS_COPY_WITH_COLUMN_GROUP_HEADERS"]]:["Copy with group header","Copy with group headers"],[mo["CONTEXTMENU_ITEMS_COPY_COLUMN_HEADERS_ONLY"]]:["Copy header only","Copy headers only"],[mo["CONTEXTMENU_ITEMS_CUT"]]:"Cut",[mo["CONTEXTMENU_ITEMS_NESTED_ROWS_INSERT_CHILD"]]:"Insert child row",[mo["CONTEXTMENU_ITEMS_NESTED_ROWS_DETACH_CHILD"]]:"Detach from parent",[mo["CONTEXTMENU_ITEMS_HIDE_COLUMN"]]:["Hide column","Hide columns"],[mo["CONTEXTMENU_ITEMS_SHOW_COLUMN"]]:["Show column","Show columns"],[mo["CONTEXTMENU_ITEMS_HIDE_ROW"]]:["Hide row","Hide rows"],[mo["CONTEXTMENU_ITEMS_SHOW_ROW"]]:["Show row","Show rows"],[mo["FILTERS_CONDITIONS_NONE"]]:"None",[mo["FILTERS_CONDITIONS_EMPTY"]]:"Is empty",[mo["FILTERS_CONDITIONS_NOT_EMPTY"]]:"Is not empty",[mo["FILTERS_CONDITIONS_EQUAL"]]:"Is equal to",[mo["FILTERS_CONDITIONS_NOT_EQUAL"]]:"Is not equal to",[mo["FILTERS_CONDITIONS_BEGINS_WITH"]]:"Begins with",[mo["FILTERS_CONDITIONS_ENDS_WITH"]]:"Ends with",[mo["FILTERS_CONDITIONS_CONTAINS"]]:"Contains",[mo["FILTERS_CONDITIONS_NOT_CONTAIN"]]:"Does not contain",[mo["FILTERS_CONDITIONS_GREATER_THAN"]]:"Greater than",[mo["FILTERS_CONDITIONS_GREATER_THAN_OR_EQUAL"]]:"Greater than or equal to",[mo["FILTERS_CONDITIONS_LESS_THAN"]]:"Less than",[mo["FILTERS_CONDITIONS_LESS_THAN_OR_EQUAL"]]:"Less than or equal to",[mo["FILTERS_CONDITIONS_BETWEEN"]]:"Is between",[mo["FILTERS_CONDITIONS_NOT_BETWEEN"]]:"Is not between",[mo["FILTERS_CONDITIONS_AFTER"]]:"After",[mo["FILTERS_CONDITIONS_BEFORE"]]:"Before",[mo["FILTERS_CONDITIONS_TODAY"]]:"Today",[mo["FILTERS_CONDITIONS_TOMORROW"]]:"Tomorrow",[mo["FILTERS_CONDITIONS_YESTERDAY"]]:"Yesterday",[mo["FILTERS_VALUES_BLANK_CELLS"]]:"Blank cells",[mo["FILTERS_DIVS_FILTER_BY_CONDITION"]]:"Filter by condition",[mo["FILTERS_DIVS_FILTER_BY_VALUE"]]:"Filter by value",[mo["FILTERS_LABELS_CONJUNCTION"]]:"And",[mo["FILTERS_LABELS_DISJUNCTION"]]:"Or",[mo["FILTERS_BUTTONS_SELECT_ALL"]]:"Select all",[mo["FILTERS_BUTTONS_CLEAR"]]:"Clear",[mo["FILTERS_BUTTONS_OK"]]:"OK",[mo["FILTERS_BUTTONS_CANCEL"]]:"Cancel",[mo["FILTERS_BUTTONS_PLACEHOLDER_SEARCH"]]:"Search",[mo["FILTERS_BUTTONS_PLACEHOLDER_VALUE"]]:"Value",[mo["FILTERS_BUTTONS_PLACEHOLDER_SECOND_VALUE"]]:"Second value",[mo["CHECKBOX_CHECKED"]]:"Checked",[mo["CHECKBOX_UNCHECKED"]]:"Unchecked"};var po=go;const fo=mo,Ro=po.languageCode,{register:yo,getItem:Mo,hasItem:So,getValues:bo}=Object(oo["a"])("languagesDictionaries");function wo(e,t){let n=e,r=t;return Object(T["isObject"])(e)&&(r=e,n=r.languageCode),To(n,r),yo(n,Object(T["deepClone"])(r)),Object(T["deepClone"])(r)}function To(e,t){e!==Ro&&ro(t,Mo(Ro))}function Oo(e){return vo(e)?Object(T["deepClone"])(Mo(e)):null}function vo(e){return So(e)}function Eo(){return bo()}function Co(e,t,n){const r=Oo(e);if(null===r)return null;const i=r[t];if(Object(s["isUndefined"])(i))return null;const o=Lo(i,n);return Array.isArray(o)?o[0]:o}function Lo(e,t){let n=e;return Object(X["arrayEach"])(ho(),r=>{n=r(e,t)}),n}function No(e){let t=io(e);return vo(t)||(t=Ro,so(e)),t}wo(po);var _o=n("a309");class Io{constructor(e,t){this.settings=e,this.cellRange=t||null}isEmpty(){return null===this.cellRange}add(e){return this.isEmpty()?this.cellRange=this.settings.createCellRange(e):this.cellRange.expand(e),this}replace(e,t){if(!this.isEmpty()){if(this.cellRange.from.isEqual(e))return this.cellRange.from=t,!0;if(this.cellRange.to.isEqual(e))return this.cellRange.to=t,!0}return!1}clear(){return this.cellRange=null,this}getCorners(){const e=this.cellRange.getOuterTopStartCorner(),t=this.cellRange.getOuterBottomEndCorner();return[e.row,e.col,t.row,t.col]}destroy(){this.runLocalHooks("destroy")}}Object(T["mixin"])(Io,Ps["a"]);var Po=Io;function xo(e,t,n){return(t=Do(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Do(e){var t=Ao(e,"string");return"symbol"==typeof t?t:t+""}function Ao(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}class Fo extends Po{constructor(e,t){super(e,null),xo(this,"visualCellRange",null),this.visualCellRange=t||null,this.commit()}add(e){return null===this.visualCellRange?this.visualCellRange=this.settings.createCellRange(e):this.visualCellRange.expand(e),this}clear(){return this.visualCellRange=null,super.clear()}trimToVisibleCellsRangeOnly(e){let{from:t,to:n}=e,r=this.getNearestNotHiddenCoords(t,1),i=this.getNearestNotHiddenCoords(n,-1);return null===r||null===i?null:((r.row>i.row||r.col>i.col)&&(r=t,i=n),this.settings.createCellRange(r,r,i))}getNearestNotHiddenCoords(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t;const r=this.getNearestNotHiddenIndex(this.settings.rowIndexMapper,e.row,t);if(null===r)return null;const i=this.getNearestNotHiddenIndex(this.settings.columnIndexMapper,e.col,n);return null===i?null:this.settings.createCellCoords(r,i)}getNearestNotHiddenIndex(e,t,n){return t<0?t:e.getNearestNotHiddenIndex(t,n)}commit(){if(null===this.visualCellRange)return this;const e=this.trimToVisibleCellsRangeOnly(this.visualCellRange);return this.cellRange=null===e?null:this.createRenderableCellRange(e.from,e.to),this}syncWith(e){const t=e.from.clone().normalize(),n="N-S"===e.getVerticalDirection()?1:-1,r="W-E"===e.getHorizontalDirection()?1:-1,i=this.settings.visualToRenderableCoords(this.visualCellRange.highlight);let s=null;if(null!==i&&null!==i.col&&null!==i.row||(s=this.getNearestNotHiddenCoords(t,n,r)),null!==s&&e.overlaps(s)){const t=e.highlight.clone();if(t.row>=0&&(t.row=s.row),t.col>=0&&(t.col=s.col),null===this.cellRange){const e=this.settings.visualToRenderableCoords(t);this.cellRange=this.settings.createCellRange(e)}e.setHighlight(t)}return"focus"===this.settings.selectionType&&null!==i&&null===s&&e.setHighlight(this.visualCellRange.highlight),this}getCorners(){const{from:e,to:t}=this.cellRange;return[Math.min(e.row,t.row),Math.min(e.col,t.col),Math.max(e.row,t.row),Math.max(e.col,t.col)]}getVisualCorners(){const e=this.settings.renderableToVisualCoords(this.cellRange.getTopStartCorner()),t=this.settings.renderableToVisualCoords(this.cellRange.getBottomEndCorner());return[e.row,e.col,t.row,t.col]}createRenderableCellRange(e,t){const n=this.settings.visualToRenderableCoords(e),r=this.settings.visualToRenderableCoords(t);return null===n.row||null===n.col||null===r.row||null===r.col?null:this.settings.createCellRange(n,n,r)}}var Yo=Fo;function Ho(e){let{activeHeaderClassName:t,...n}=e;return new Yo({className:t,...n,selectionType:_o["a"]})}function ko(e){let{areaCornerVisible:t,...n}=e;return new Yo({className:"area",createLayers:!0,border:{width:1,color:"#4b89ff",cornerVisible:t},...n,selectionType:_o["b"]})}function Vo(e){let{...t}=e;return new Yo({className:"highlight",...t,selectionType:_o["b"]})}function Uo(e){let{columnClassName:t,...n}=e;return new Yo({className:t,...n,selectionType:_o["c"]})}function Wo(e){let{cellCornerVisible:t,...n}=e;return new Yo({className:"current",headerAttributes:[Object(Ge["I"])()],border:{width:2,color:"#4b89ff",cornerVisible:t},...n,selectionType:_o["f"]})}function Xo(e){let{border:t,visualCellRange:n,...r}=e;return new Yo({...t,...r,selectionType:_o["d"]},n)}function jo(e){let{...t}=e;return new Yo({className:"fill",border:{width:1,color:"#ff0000"},...t,selectionType:_o["e"]})}function Zo(e){let{headerClassName:t,...n}=e;return new Yo({className:t,...n,selectionType:_o["g"]})}function Qo(e){let{rowClassName:t,...n}=e;return new Yo({className:t,...n,selectionType:_o["h"]})}function Ko(e,t){Go(e,t),t.add(e)}function Go(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Bo(e,t,n){return(t=Jo(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Jo(e){var t=zo(e,"string");return"symbol"==typeof t?t:t+""}function zo(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function $o(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}var qo=new WeakSet;class ea{constructor(e){Ko(this,qo),Bo(this,"options",void 0),Bo(this,"layerLevel",0),Bo(this,"focus",void 0),Bo(this,"fill",void 0),Bo(this,"layeredAreas",new Map),Bo(this,"areas",new Map),Bo(this,"rowHeaders",new Map),Bo(this,"columnHeaders",new Map),Bo(this,"activeRowHeaders",new Map),Bo(this,"activeColumnHeaders",new Map),Bo(this,"activeCornerHeaders",new Map),Bo(this,"rowHighlights",new Map),Bo(this,"columnHighlights",new Map),Bo(this,"customSelections",[]),this.options=e,this.focus=Wo(e),this.fill=jo(e)}isEnabledFor(e,t){let n=e;e===_o["f"]&&(n="current");let r=this.options.disabledCellSelection(t.row,t.col);return"string"===typeof r&&(r=[r]),!1===r||Array.isArray(r)&&!r.includes(n)}useLayerLevel(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return this.layerLevel=e,this}getFocus(){return this.focus}getFill(){return this.fill}createLayeredArea(){return $o(qo,this,ta).call(this,this.layeredAreas,ko)}getLayeredAreas(){return[...this.layeredAreas.values()]}createArea(){return $o(qo,this,ta).call(this,this.areas,Vo)}getAreas(){return[...this.areas.values()]}createRowHeader(){return $o(qo,this,ta).call(this,this.rowHeaders,Zo)}getRowHeaders(){return[...this.rowHeaders.values()]}createColumnHeader(){return $o(qo,this,ta).call(this,this.columnHeaders,Zo)}getColumnHeaders(){return[...this.columnHeaders.values()]}createActiveRowHeader(){return $o(qo,this,ta).call(this,this.activeRowHeaders,Ho)}getActiveRowHeaders(){return[...this.activeRowHeaders.values()]}createActiveColumnHeader(){return $o(qo,this,ta).call(this,this.activeColumnHeaders,Ho)}getActiveColumnHeaders(){return[...this.activeColumnHeaders.values()]}createActiveCornerHeader(){return $o(qo,this,ta).call(this,this.activeCornerHeaders,Ho)}getActiveCornerHeaders(){return[...this.activeCornerHeaders.values()]}createRowHighlight(){return $o(qo,this,ta).call(this,this.rowHighlights,Qo)}getRowHighlights(){return[...this.rowHighlights.values()]}createColumnHighlight(){return $o(qo,this,ta).call(this,this.columnHighlights,Uo)}getColumnHighlights(){return[...this.columnHighlights.values()]}getCustomSelections(){return[...this.customSelections.values()]}addCustomSelection(e){this.customSelections.push(Xo({...this.options,...e}))}clear(){this.focus.clear(),this.fill.clear(),Object(X["arrayEach"])(this.areas.values(),e=>{e.clear()}),Object(X["arrayEach"])(this.layeredAreas.values(),e=>{e.clear()}),Object(X["arrayEach"])(this.rowHeaders.values(),e=>{e.clear()}),Object(X["arrayEach"])(this.columnHeaders.values(),e=>{e.clear()}),Object(X["arrayEach"])(this.activeRowHeaders.values(),e=>{e.clear()}),Object(X["arrayEach"])(this.activeColumnHeaders.values(),e=>{e.clear()}),Object(X["arrayEach"])(this.activeCornerHeaders.values(),e=>{e.clear()}),Object(X["arrayEach"])(this.rowHighlights.values(),e=>{e.clear()}),Object(X["arrayEach"])(this.columnHighlights.values(),e=>{e.clear()})}[Symbol.iterator](){return[this.focus,this.fill,...this.areas.values(),...this.layeredAreas.values(),...this.rowHeaders.values(),...this.columnHeaders.values(),...this.activeRowHeaders.values(),...this.activeColumnHeaders.values(),...this.activeCornerHeaders.values(),...this.rowHighlights.values(),...this.columnHighlights.values(),...this.customSelections][Symbol.iterator]()}}function ta(e,t){const n=this.layerLevel;if(e.has(n))return e.get(n);const r=t({layerLevel:n,...this.options});return e.set(n,r),r}var na=ea;function ra(e,t,n){return(t=ia(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ia(e){var t=sa(e,"string");return"symbol"==typeof t?t:t+""}function sa(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}class oa{constructor(e){ra(this,"ranges",[]),ra(this,"createCellRange",void 0),this.createCellRange=e}isEmpty(){return 0===this.size()}set(e){return this.clear(),this.ranges.push(this.createCellRange(e)),this}add(e){return this.ranges.push(this.createCellRange(e)),this}pop(){return this.ranges.pop(),this}current(){return this.peekByIndex(this.size()-1)}previous(){return this.peekByIndex(this.size()-2)}includes(e){return this.ranges.some(t=>t.includes(e))}clear(){return this.ranges.length=0,this}size(){return this.ranges.length}peekByIndex(){let e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return t>=0&&t<this.size()&&(e=this.ranges[t]),e}[Symbol.iterator](){return this.ranges[Symbol.iterator]()}}var aa=oa;function la(e,t){ua(e,t),t.add(e)}function ca(e,t,n){ua(e,t),t.set(e,n)}function ua(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function ha(e,t){return e.get(ma(e,t))}function da(e,t,n){return e.set(ma(e,t),n),n}function ma(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}var ga=new WeakMap,pa=new WeakMap,fa=new WeakMap,Ra=new WeakSet;class ya{constructor(e,t){la(this,Ra),ca(this,ga,void 0),ca(this,pa,void 0),ca(this,fa,{x:0,y:0}),da(ga,this,e),da(pa,this,t)}transformStart(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const r=ha(pa,this).createCellCoords(e,t);let i=ha(ga,this).current().highlight;const s=ha(pa,this).visualToRenderableCoords(i);let o=0,a=0;if(this.runLocalHooks("beforeTransformStart",r),null!==s.row&&null!==s.col){const{width:e,height:t}=ma(Ra,this,Sa).call(this),{row:s,col:l}=ma(Ra,this,Ta).call(this,i),c=ha(pa,this).fixedRowsBottom(),u=ha(pa,this).minSpareRows(),h=ha(pa,this).minSpareCols(),d=ha(pa,this).autoWrapRow(),m=ha(pa,this).autoWrapCol(),g=ha(pa,this).createCellCoords(s+r.row,l+r.col);if(g.row>=t){const r=Object(T["createObjectPropListener"])(n&&u>0&&0===c),i=g.col+1,s=ha(pa,this).createCellCoords(g.row-t,i>=e?i-e:i);this.runLocalHooks("beforeColumnWrap",r,ma(Ra,this,Oa).call(this,s),i>=e),r.value?this.runLocalHooks("insertRowRequire",ha(pa,this).countRenderableRows()):m&&g.assign(s)}else if(g.row<0){const n=Object(T["createObjectPropListener"])(m),r=g.col-1,i=ha(pa,this).createCellCoords(t+g.row,r<0?e+r:r);this.runLocalHooks("beforeColumnWrap",n,ma(Ra,this,Oa).call(this,i),r<0),m&&g.assign(i)}if(g.col>=e){const r=Object(T["createObjectPropListener"])(n&&h>0),i=g.row+1,s=ha(pa,this).createCellCoords(i>=t?i-t:i,g.col-e);this.runLocalHooks("beforeRowWrap",r,ma(Ra,this,Oa).call(this,s),i>=t),r.value?this.runLocalHooks("insertColRequire",ha(pa,this).countRenderableColumns()):d&&g.assign(s)}else if(g.col<0){const n=Object(T["createObjectPropListener"])(d),r=g.row-1,i=ha(pa,this).createCellCoords(r<0?t+r:r,e+g.col);this.runLocalHooks("beforeRowWrap",n,ma(Ra,this,Oa).call(this,i),r<0),d&&g.assign(i)}const{rowDir:p,colDir:f}=ma(Ra,this,Ma).call(this,g);o=p,a=f,i=ma(Ra,this,Oa).call(this,g)}return this.runLocalHooks("afterTransformStart",i,o,a),i}transformEnd(e,t){const n=ha(pa,this).createCellCoords(e,t),r=ha(ga,this).current(),i=ha(pa,this).visualToRenderableCoords(r.highlight),s=ma(Ra,this,ba).call(this,r.to.row,r.from.row),o=ma(Ra,this,wa).call(this,r.to.col,r.from.col),a=r.to.clone();let l=0,c=0;if(this.runLocalHooks("beforeTransformEnd",n),null!==i.row&&null!==i.col&&null!==s&&null!==o){const{row:e,col:t}=ma(Ra,this,Ta).call(this,r.highlight),i=ha(pa,this).createCellCoords(s+n.row,o+n.col),u=r.getTopStartCorner(),h=r.getTopEndCorner(),d=r.getBottomEndCorner();if(n.col<0&&o>=t&&i.col<t){const e=i.col-t;i.col=ma(Ra,this,wa).call(this,u.col,h.col)+e}else if(n.col>0&&o<=t&&i.col>t){const e=ma(Ra,this,wa).call(this,h.col,u.col),t=Math.max(i.col-e,1);i.col=e+t}if(n.row<0&&s>=e&&i.row<e){const t=i.row-e;i.row=ma(Ra,this,ba).call(this,u.row,d.row)+t}else if(n.row>0&&s<=e&&i.row>e){const e=ma(Ra,this,ba).call(this,d.row,u.row),t=Math.max(i.row-e,1);i.row=e+t}const{rowDir:m,colDir:g}=ma(Ra,this,Ma).call(this,i);l=m,c=g;const p=ma(Ra,this,Oa).call(this,i);0===n.row&&0!==n.col?a.col=p.col:0!==n.row&&0===n.col?a.row=p.row:(a.row=p.row,a.col=p.col)}return this.runLocalHooks("afterTransformEnd",a,l,c),a}setOffsetSize(e){let{x:t,y:n}=e;da(fa,this,{x:t,y:n})}resetOffsetSize(){da(fa,this,{x:0,y:0})}}function Ma(e){const{width:t,height:n}=ma(Ra,this,Sa).call(this);let r=0,i=0;return e.row<0?(r=-1,e.row=0):e.row>0&&e.row>=n&&(r=1,e.row=n-1),e.col<0?(i=-1,e.col=0):e.col>0&&e.col>=t&&(i=1,e.col=t-1),{rowDir:r,colDir:i}}function Sa(){return{width:ha(fa,this).x+ha(pa,this).countRenderableColumns(),height:ha(fa,this).y+ha(pa,this).countRenderableRows()}}function ba(e,t){const n=ha(pa,this).findFirstNonHiddenRenderableRow(e,t);return null===n?null:ha(fa,this).y+n}function wa(e,t){const n=ha(pa,this).findFirstNonHiddenRenderableColumn(e,t);return null===n?null:ha(fa,this).x+n}function Ta(e){const{row:t,col:n}=ha(pa,this).visualToRenderableCoords(e);if(null===t||null===n)throw new Error("Renderable coords are not visible.");return ha(pa,this).createCellCoords(ha(fa,this).y+t,ha(fa,this).x+n)}function Oa(e){const t=e.clone();return t.col=e.col-ha(fa,this).x,t.row=e.row-ha(fa,this).y,ha(pa,this).renderableToVisualCoords(t)}Object(T["mixin"])(ya,Ps["a"]);var va=ya,Ea=n("a952");function Ca(e,t,n){La(e,t),t.set(e,n)}function La(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Na(e,t,n){return(t=_a(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function _a(e){var t=Ia(e,"string");return"symbol"==typeof t?t:t+""}function Ia(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function Pa(e,t){return e.get(Da(e,t))}function xa(e,t,n){return e.set(Da(e,t),n),n}function Da(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}var Aa=new WeakMap,Fa=new WeakMap,Ya=new WeakMap,Ha=new WeakMap,ka=new WeakMap,Va=new WeakMap;class Ua{constructor(e,t){var n=this;Na(this,"settings",void 0),Na(this,"tableProps",void 0),Na(this,"inProgress",!1),Na(this,"selectedRange",new aa((e,t,n)=>this.tableProps.createCellRange(e,t,n))),Na(this,"highlight",void 0),Ca(this,Aa,void 0),Ca(this,Fa,void 0),Na(this,"selectedByRowHeader",new Set),Na(this,"selectedByColumnHeader",new Set),Ca(this,Ya,!1),Ca(this,Ha,!1),Ca(this,ka,"unknown"),Ca(this,Va,-1),this.settings=e,this.tableProps=t,this.highlight=new na({headerClassName:e.currentHeaderClassName,activeHeaderClassName:e.activeHeaderClassName,rowClassName:e.currentRowClassName,columnClassName:e.currentColClassName,cellAttributes:[Object(Ge["I"])()],rowIndexMapper:this.tableProps.rowIndexMapper,columnIndexMapper:this.tableProps.columnIndexMapper,disabledCellSelection:(e,t)=>this.tableProps.isDisabledCellSelection(e,t),cellCornerVisible:function(){return n.isCellCornerVisible(...arguments)},areaCornerVisible:function(){return n.isAreaCornerVisible(...arguments)},visualToRenderableCoords:e=>this.tableProps.visualToRenderableCoords(e),renderableToVisualCoords:e=>this.tableProps.renderableToVisualCoords(e),createCellCoords:(e,t)=>this.tableProps.createCellCoords(e,t),createCellRange:(e,t,n)=>this.tableProps.createCellRange(e,t,n)}),xa(Aa,this,new va(this.selectedRange,{rowIndexMapper:this.tableProps.rowIndexMapper,columnIndexMapper:this.tableProps.columnIndexMapper,countRenderableRows:()=>this.tableProps.countRenderableRows(),countRenderableColumns:()=>this.tableProps.countRenderableColumns(),visualToRenderableCoords:e=>this.tableProps.visualToRenderableCoords(e),renderableToVisualCoords:e=>this.tableProps.renderableToVisualCoords(e),findFirstNonHiddenRenderableRow:function(){return n.tableProps.findFirstNonHiddenRenderableRow(...arguments)},findFirstNonHiddenRenderableColumn:function(){return n.tableProps.findFirstNonHiddenRenderableColumn(...arguments)},createCellCoords:(e,t)=>this.tableProps.createCellCoords(e,t),fixedRowsBottom:()=>e.fixedRowsBottom,minSpareRows:()=>e.minSpareRows,minSpareCols:()=>e.minSpareCols,autoWrapRow:()=>e.autoWrapRow,autoWrapCol:()=>e.autoWrapCol})),xa(Fa,this,new va(this.selectedRange,{rowIndexMapper:this.tableProps.rowIndexMapper,columnIndexMapper:this.tableProps.columnIndexMapper,countRenderableRows:()=>{const e=this.selectedRange.current();return this.tableProps.countRenderableRowsInRange(0,e.getOuterBottomEndCorner().row)},countRenderableColumns:()=>{const e=this.selectedRange.current();return this.tableProps.countRenderableColumnsInRange(0,e.getOuterBottomEndCorner().col)},visualToRenderableCoords:e=>this.tableProps.visualToRenderableCoords(e),renderableToVisualCoords:e=>this.tableProps.renderableToVisualCoords(e),findFirstNonHiddenRenderableRow:function(){return n.tableProps.findFirstNonHiddenRenderableRow(...arguments)},findFirstNonHiddenRenderableColumn:function(){return n.tableProps.findFirstNonHiddenRenderableColumn(...arguments)},createCellCoords:(e,t)=>this.tableProps.createCellCoords(e,t),fixedRowsBottom:()=>0,minSpareRows:()=>0,minSpareCols:()=>0,autoWrapRow:()=>!0,autoWrapCol:()=>!0})),Pa(Aa,this).addLocalHook("beforeTransformStart",(function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return n.runLocalHooks("beforeModifyTransformStart",...t)})),Pa(Aa,this).addLocalHook("afterTransformStart",(function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return n.runLocalHooks("afterModifyTransformStart",...t)})),Pa(Aa,this).addLocalHook("beforeTransformEnd",(function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return n.runLocalHooks("beforeModifyTransformEnd",...t)})),Pa(Aa,this).addLocalHook("afterTransformEnd",(function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return n.runLocalHooks("afterModifyTransformEnd",...t)})),Pa(Aa,this).addLocalHook("insertRowRequire",(function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return n.runLocalHooks("insertRowRequire",...t)})),Pa(Aa,this).addLocalHook("insertColRequire",(function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return n.runLocalHooks("insertColRequire",...t)})),Pa(Aa,this).addLocalHook("beforeRowWrap",(function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return n.runLocalHooks("beforeRowWrap",...t)})),Pa(Aa,this).addLocalHook("beforeColumnWrap",(function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return n.runLocalHooks("beforeColumnWrap",...t)})),Pa(Fa,this).addLocalHook("beforeTransformStart",(function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return n.runLocalHooks("beforeModifyTransformFocus",...t)})),Pa(Fa,this).addLocalHook("afterTransformStart",(function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return n.runLocalHooks("afterModifyTransformFocus",...t)}))}getSelectedRange(){return this.selectedRange}markSource(e){xa(ka,this,e)}markEndSource(){xa(ka,this,"unknown")}getSelectionSource(){return Pa(ka,this)}setExpectedLayers(e){xa(Va,this,e)}begin(){this.inProgress=!0}finish(){this.runLocalHooks("afterSelectionFinished",Array.from(this.selectedRange)),this.inProgress=!1,xa(Va,this,-1)}isInProgress(){return this.inProgress}setRangeStart(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:e;const i="multiple"===this.settings.selectionMode,o=Object(s["isUndefined"])(t)?this.tableProps.getShortcutManager().isCtrlPressed():t,a=e.clone();xa(Ya,this,!1),this.runLocalHooks("beforeSetRangeStart"+(n?"Only":""),a),(!i||i&&!o&&Object(s["isUndefined"])(t))&&this.selectedRange.clear(),this.selectedRange.add(a).current().setHighlight(r.clone()),0===this.getLayerLevel()&&(this.selectedByRowHeader.clear(),this.selectedByColumnHeader.clear()),n||this.setRangeEnd(e)}setRangeStartOnly(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e;this.setRangeStart(e,t,!0,n)}setRangeEnd(e){if(this.selectedRange.isEmpty())return;const t=e.clone(),n=this.tableProps.countRows(),r=this.tableProps.countCols(),i=this.selectedRange.current().clone().setTo(e).isSingleHeader();if((n>0||r>0)&&(0===n&&t.col<0&&!i||0===r&&t.row<0&&!i))return;this.runLocalHooks("beforeSetRangeEnd",t),this.begin();const s=this.selectedRange.current();if(this.settings.navigableHeaders||s.highlight.normalize(),"single"===this.settings.selectionMode)s.setFrom(s.highlight),s.setTo(s.highlight);else{const e=s.getHorizontalDirection(),n=s.getVerticalDirection(),r=this.isMultiple();s.setTo(t),r&&(e!==s.getHorizontalDirection()||1===s.getWidth()&&!s.includes(s.highlight))&&s.from.assign({col:s.highlight.col}),r&&(n!==s.getVerticalDirection()||1===s.getHeight()&&!s.includes(s.highlight))&&s.from.assign({row:s.highlight.row})}n>0&&r>0&&(!this.settings.navigableHeaders||this.settings.navigableHeaders&&!s.isSingleHeader())&&s.to.normalize(),this.runLocalHooks("beforeHighlightSet"),this.setRangeFocus(this.selectedRange.current().highlight),this.applyAndCommit();const o=-1===Pa(Va,this)||this.selectedRange.size()===Pa(Va,this);this.runLocalHooks("afterSetRangeEnd",e,o)}applyAndCommit(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.selectedRange.current(),t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.getLayerLevel();const n=this.tableProps.countRows(),r=this.tableProps.countCols();t<this.highlight.layerLevel&&(Object(X["arrayEach"])(this.highlight.getAreas(),e=>{e.clear()}),Object(X["arrayEach"])(this.highlight.getLayeredAreas(),e=>{e.clear()}),Object(X["arrayEach"])(this.highlight.getRowHeaders(),e=>{e.clear()}),Object(X["arrayEach"])(this.highlight.getColumnHeaders(),e=>{e.clear()}),Object(X["arrayEach"])(this.highlight.getActiveRowHeaders(),e=>{e.clear()}),Object(X["arrayEach"])(this.highlight.getActiveColumnHeaders(),e=>{e.clear()}),Object(X["arrayEach"])(this.highlight.getActiveCornerHeaders(),e=>{e.clear()}),Object(X["arrayEach"])(this.highlight.getRowHighlights(),e=>{e.clear()}),Object(X["arrayEach"])(this.highlight.getColumnHighlights(),e=>{e.clear()})),this.highlight.useLayerLevel(t);const i=this.highlight.createArea(),s=this.highlight.createLayeredArea(),o=this.highlight.createRowHeader(),a=this.highlight.createColumnHeader(),l=this.highlight.createActiveRowHeader(),c=this.highlight.createActiveColumnHeader(),u=this.highlight.createActiveCornerHeader(),h=this.highlight.createRowHighlight(),d=this.highlight.createColumnHighlight();if(i.clear(),s.clear(),o.clear(),a.clear(),l.clear(),c.clear(),u.clear(),h.clear(),d.clear(),this.highlight.isEnabledFor(_o["b"],e.highlight)&&(this.isMultiple()||t>=1)&&(i.add(e.from).add(e.to).commit(),s.add(e.from).add(e.to).commit(),1===t)){const e=this.selectedRange.previous();this.highlight.useLayerLevel(t-1),this.highlight.createArea().add(e.from).commit().syncWith(e),this.highlight.createLayeredArea().add(e.from).commit().syncWith(e),this.highlight.useLayerLevel(t)}if(this.highlight.isEnabledFor(_o["g"],e.highlight)){if(!e.isSingleHeader()){const t=this.tableProps.createCellCoords(Math.max(e.from.row,0),-1),n=this.tableProps.createCellCoords(e.to.row,-1),r=this.tableProps.createCellCoords(-1,Math.max(e.from.col,0)),i=this.tableProps.createCellCoords(-1,e.to.col);"single"===this.settings.selectionMode?(o.add(t).commit(),a.add(r).commit(),h.add(t).commit(),d.add(r).commit()):(o.add(t).add(n).commit(),a.add(r).add(i).commit(),h.add(t).add(n).commit(),d.add(r).add(i).commit())}const t=!Pa(Ha,this)&&this.isEntireRowSelected()&&(r>0&&r===e.getWidth()||0===r&&this.isSelectedByRowHeader()),i=!Pa(Ha,this)&&this.isEntireColumnSelected()&&(n>0&&n===e.getHeight()||0===n&&this.isSelectedByColumnHeader());t&&l.add(this.tableProps.createCellCoords(Math.max(e.from.row,0),Math.min(-this.tableProps.countRowHeaders(),-1))).add(this.tableProps.createCellCoords(Math.max(e.to.row,0),-1)).commit(),i&&c.add(this.tableProps.createCellCoords(Math.min(-this.tableProps.countColHeaders(),-1),Math.max(e.from.col,0))).add(this.tableProps.createCellCoords(-1,Math.max(e.to.col,0))).commit(),t&&i&&u.add(this.tableProps.createCellCoords(-this.tableProps.countColHeaders(),-this.tableProps.countRowHeaders())).add(this.tableProps.createCellCoords(-1,-1)).commit()}}setRangeFocus(e){if(this.selectedRange.isEmpty())return;const t=this.selectedRange.current();this.inProgress||this.runLocalHooks("beforeSetFocus",e);const n=this.highlight.getFocus();n.clear(),t.setHighlight(e),this.inProgress||this.runLocalHooks("beforeHighlightSet"),this.highlight.isEnabledFor(_o["f"],t.highlight)&&n.add(t.highlight).commit().syncWith(t),this.inProgress||(xa(Ya,this,!0),this.runLocalHooks("afterSetFocus",t.highlight))}transformStart(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];this.settings.navigableHeaders?Pa(Aa,this).setOffsetSize({x:this.tableProps.countRowHeaders(),y:this.tableProps.countColHeaders()}):Pa(Aa,this).resetOffsetSize(),this.setRangeStart(Pa(Aa,this).transformStart(e,t,n))}transformEnd(e,t){this.settings.navigableHeaders?Pa(Aa,this).setOffsetSize({x:this.tableProps.countRowHeaders(),y:this.tableProps.countColHeaders()}):Pa(Aa,this).resetOffsetSize(),this.setRangeEnd(Pa(Aa,this).transformEnd(e,t))}transformFocus(e,t){const n=this.selectedRange.current(),{row:r,col:i}=n.getOuterTopStartCorner(),s=this.tableProps.countRenderableColumnsInRange(0,i-1),o=this.tableProps.countRenderableRowsInRange(0,r-1);n.highlight.isHeader()?Pa(Fa,this).setOffsetSize({x:i<0?Math.abs(i):-s,y:r<0?Math.abs(r):-o}):Pa(Fa,this).setOffsetSize({x:i<0?0:-s,y:r<0?0:-o});const a=Pa(Fa,this).transformStart(e,t);this.setRangeFocus(a.normalize())}shiftRows(e,t){if(!this.isSelected())return;const n=this.selectedRange.current();if(this.isSelectedByCorner())this.selectAll(!0,!0,{disableHeadersHighlight:!0});else if(this.isSelectedByColumnHeader()||n.getOuterTopStartCorner().row>=e){const{from:r,to:i,highlight:s}=n,o=this.tableProps.countRows(),a=this.isSelectedByRowHeader(),l=this.isSelectedByColumnHeader(),c=l?-1:0,u=l?0:t;this.getSelectedRange().pop();const h=this.tableProps.createCellCoords(Object(B["clamp"])(r.row+u,c,o-1),r.col),d=this.tableProps.createCellCoords(Object(B["clamp"])(i.row+t,c,o-1),i.col);this.markSource("shift"),s.row>=e?this.setRangeStartOnly(h,!0,this.tableProps.createCellCoords(Object(B["clamp"])(s.row+t,0,o-1),s.col)):this.setRangeStartOnly(h,!0),a&&this.selectedByRowHeader.add(this.getLayerLevel()),l&&this.selectedByColumnHeader.add(this.getLayerLevel()),this.setRangeEnd(d),this.markEndSource()}}shiftColumns(e,t){if(!this.isSelected())return;const n=this.selectedRange.current();if(this.isSelectedByCorner())this.selectAll(!0,!0,{disableHeadersHighlight:!0});else if(this.isSelectedByRowHeader()||n.getOuterTopStartCorner().col>=e){const{from:r,to:i,highlight:s}=n,o=this.tableProps.countCols(),a=this.isSelectedByRowHeader(),l=this.isSelectedByColumnHeader(),c=a?-1:0,u=a?0:t;this.getSelectedRange().pop();const h=this.tableProps.createCellCoords(r.row,Object(B["clamp"])(r.col+u,c,o-1)),d=this.tableProps.createCellCoords(i.row,Object(B["clamp"])(i.col+t,c,o-1));this.markSource("shift"),s.col>=e?this.setRangeStartOnly(h,!0,this.tableProps.createCellCoords(s.row,Object(B["clamp"])(s.col+t,0,o-1))):this.setRangeStartOnly(h,!0),a&&this.selectedByRowHeader.add(this.getLayerLevel()),l&&this.selectedByColumnHeader.add(this.getLayerLevel()),this.setRangeEnd(d),this.markEndSource()}}getLayerLevel(){return this.selectedRange.size()-1}isSelected(){return!this.selectedRange.isEmpty()}isMultiple(){if(!this.isSelected())return!1;const e=Object(T["createObjectPropListener"])(!this.selectedRange.current().isSingle());return this.runLocalHooks("afterIsMultipleSelection",e),e.value}isFocusSelectionChanged(){return this.isSelected()&&Pa(Ya,this)}isSelectedByRowHeader(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.getLayerLevel();return!this.isSelectedByCorner(e)&&(-1===e?this.selectedByRowHeader.size>0:this.selectedByRowHeader.has(e))}isEntireRowSelected(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.getLayerLevel();const t=e=>{const{col:t}=e.getOuterTopStartCorner(),n=this.tableProps.countRowHeaders(),r=this.tableProps.countCols();return(n>0&&t<0||0===n)&&e.getWidth()===r};if(-1===e)return Array.from(this.selectedRange).some(e=>t(e));const n=this.selectedRange.peekByIndex(e);return!!n&&t(n)}isSelectedByColumnHeader(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.getLayerLevel();return!this.isSelectedByCorner()&&(-1===e?this.selectedByColumnHeader.size>0:this.selectedByColumnHeader.has(e))}isEntireColumnSelected(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.getLayerLevel();const t=e=>{const{row:t}=e.getOuterTopStartCorner(),n=this.tableProps.countColHeaders(),r=this.tableProps.countRows();return(n>0&&t<0||0===n)&&e.getHeight()===r};if(-1===e)return Array.from(this.selectedRange).some(e=>t(e));const n=this.selectedRange.peekByIndex(e);return!!n&&t(n)}isSelectedByAnyHeader(){return this.isSelectedByRowHeader(-1)||this.isSelectedByColumnHeader(-1)||this.isSelectedByCorner()}isSelectedByCorner(){return this.selectedByColumnHeader.has(this.getLayerLevel())&&this.selectedByRowHeader.has(this.getLayerLevel())}inInSelection(e){return this.selectedRange.includes(e)}isCellCornerVisible(){return this.settings.fillHandle&&!this.tableProps.isEditorOpened()&&!this.isMultiple()}isCellVisible(e){const t=this.tableProps.visualToRenderableCoords(e);return null!==t.row&&null!==t.col}isAreaCornerVisible(e){return(!Number.isInteger(e)||e===this.getLayerLevel())&&(this.settings.fillHandle&&!this.tableProps.isEditorOpened()&&this.isMultiple())}clear(){this.selectedRange.clear(),this.highlight.clear()}deselect(){this.isSelected()&&(this.inProgress=!1,this.clear(),this.runLocalHooks("afterDeselect"))}selectAll(){var e;let t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{focusPosition:!1,disableHeadersHighlight:!1};const i=this.tableProps.countRows(),s=this.tableProps.countCols(),o=this.tableProps.countRowHeaders(),a=this.tableProps.countColHeaders(),l=n?-a:0,c=t?-o:0;if(0===l&&0===c&&(0===i||0===s))return;let u=null===(e=this.getSelectedRange().current())||void 0===e?void 0:e.highlight;const{focusPosition:h,disableHeadersHighlight:d}=r;xa(Ha,this,d),h&&Number.isInteger(null===h||void 0===h?void 0:h.row)&&Number.isInteger(null===h||void 0===h?void 0:h.col)&&(u=this.tableProps.createCellCoords(Object(B["clamp"])(h.row,l,i-1),Object(B["clamp"])(h.col,c,s-1)));const m=this.tableProps.createCellCoords(l,c),g=this.tableProps.createCellCoords(i-1,s-1);this.clear(),this.setRangeStartOnly(m,void 0,u),c<0&&this.selectedByRowHeader.add(this.getLayerLevel()),l<0&&this.selectedByColumnHeader.add(this.getLayerLevel()),this.setRangeEnd(g),this.finish(),xa(Ha,this,!1)}selectCells(e){var t=this;const n=Object(Ea["c"])(e);if(n===Ea["a"])return!1;if(n===Ea["b"])throw new Error(et["a"]`Unsupported format of the selection ranges was passed. To select cells pass\x20
  293. the coordinates as an array of arrays ([[rowStart, columnStart/columnPropStart, rowEnd,\x20
  294. columnEnd/columnPropEnd]]) or as an array of CellRange objects.`);const r=Object(Ea["d"])(n,{createCellCoords:function(){return t.tableProps.createCellCoords(...arguments)},createCellRange:function(){return t.tableProps.createCellRange(...arguments)},propToCol:e=>this.tableProps.propToCol(e),keepDirection:!0}),i=this.settings.navigableHeaders,s={countRows:this.tableProps.countRows(),countCols:this.tableProps.countCols(),countRowHeaders:i?this.tableProps.countRowHeaders():0,countColHeaders:i?this.tableProps.countColHeaders():0},o=!e.some(e=>{const t=r(e),n=t.isValid(s);return!(n&&!t.containsHeaders()||n&&t.containsHeaders()&&t.isSingleHeader())});return o&&(this.clear(),this.setExpectedLayers(e.length),Object(X["arrayEach"])(e,e=>{const{from:t,to:n}=r(e);this.setRangeStartOnly(t.clone(),!1),this.setRangeEnd(n.clone())}),this.finish()),o}selectColumns(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;const r="string"===typeof e?this.tableProps.propToCol(e):e,i="string"===typeof t?this.tableProps.propToCol(t):t,s=this.tableProps.countRows(),o=this.tableProps.countCols(),a=this.tableProps.countColHeaders(),l=0===a?0:-a,c=this.tableProps.createCellCoords(l,r),u=this.tableProps.createCellCoords(s-1,i),h=this.tableProps.createCellRange(c,c,u).isValid({countRows:s,countCols:o,countRowHeaders:0,countColHeaders:a});if(h){let e=0,t=0;Number.isInteger(null===n||void 0===n?void 0:n.row)&&Number.isInteger(null===n||void 0===n?void 0:n.col)?(e=Object(B["clamp"])(n.row,l,s-1),t=Object(B["clamp"])(n.col,Math.min(r,i),Math.max(r,i))):(e=Object(B["clamp"])(n,l,s-1),t=r);const o=this.tableProps.createCellCoords(e,t),c=0===a?0:Object(B["clamp"])(o.row,l,-1),u=s-1,h=this.tableProps.createCellCoords(c,r),d=this.tableProps.createCellCoords(u,i);this.runLocalHooks("beforeSelectColumns",h,d,o),h.row=c,d.row=u,this.setRangeStartOnly(h,void 0,o),this.selectedByColumnHeader.add(this.getLayerLevel()),this.setRangeEnd(d),this.runLocalHooks("afterSelectColumns",h,d,o),this.finish()}return h}selectRows(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;const r=this.tableProps.countRows(),i=this.tableProps.countCols(),s=this.tableProps.countRowHeaders(),o=0===s?0:-s,a=this.tableProps.createCellCoords(e,o),l=this.tableProps.createCellCoords(t,i-1),c=this.tableProps.createCellRange(a,a,l).isValid({countRows:r,countCols:i,countRowHeaders:s,countColHeaders:0});if(c){let r=0,a=0;Number.isInteger(null===n||void 0===n?void 0:n.row)&&Number.isInteger(null===n||void 0===n?void 0:n.col)?(r=Object(B["clamp"])(n.row,Math.min(e,t),Math.max(e,t)),a=Object(B["clamp"])(n.col,o,i-1)):(r=e,a=Object(B["clamp"])(n,o,i-1));const l=this.tableProps.createCellCoords(r,a),c=0===s?0:Object(B["clamp"])(l.col,o,-1),u=i-1,h=this.tableProps.createCellCoords(e,c),d=this.tableProps.createCellCoords(t,u);this.runLocalHooks("beforeSelectRows",h,d,l),h.col=c,d.col=u,this.setRangeStartOnly(h,void 0,l),this.selectedByRowHeader.add(this.getLayerLevel()),this.setRangeEnd(d),this.runLocalHooks("afterSelectRows",h,d,l),this.finish()}return c}refresh(){if(!this.isSelected())return;const e=this.tableProps.countRows(),t=this.tableProps.countCols();if(0===e||0===t)return void this.deselect();const n=this.selectedRange.peekByIndex(this.selectedRange.size()-1),{from:r,to:i,highlight:s}=n;this.clear(),s.assign({row:Object(B["clamp"])(s.row,-1/0,e-1),col:Object(B["clamp"])(s.col,-1/0,t-1)}),r.assign({row:Object(B["clamp"])(r.row,-1/0,e-1),col:Object(B["clamp"])(r.col,-1/0,t-1)}),i.assign({row:Object(B["clamp"])(i.row,0,e-1),col:Object(B["clamp"])(i.col,0,t-1)}),this.selectedRange.ranges.push(n),this.highlight.getFocus().add(s).commit().syncWith(n),this.applyAndCommit(n)}commit(){const e=this.highlight.getCustomSelections();if(e.forEach(e=>{e.commit()}),!this.isSelected())return;const t=this.highlight.getFocus(),n=this.getLayerLevel();t.commit().syncWith(this.selectedRange.current());for(let r=0;r<this.selectedRange.size();r+=1){this.highlight.useLayerLevel(r);const e=this.highlight.createArea(),t=this.highlight.createLayeredArea(),n=this.highlight.createRowHeader(),i=this.highlight.createColumnHeader(),s=this.highlight.createActiveRowHeader(),o=this.highlight.createActiveColumnHeader(),a=this.highlight.createActiveCornerHeader(),l=this.highlight.createRowHighlight(),c=this.highlight.createColumnHighlight();e.commit(),t.commit(),n.commit(),i.commit(),s.commit(),o.commit(),a.commit(),l.commit(),c.commit()}this.highlight.useLayerLevel(n)}}Object(T["mixin"])(Ua,Ps["a"]);var Wa=Ua,Xa=n("76ab");function ja(e,t){var n;return"CELL_TYPE"!==e&&((null===(n=t._automaticallyAssignedMetaProps)||void 0===n?void 0:n.has(e))||!Object(T["hasOwnProperty"])(t,e))}function Za(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e;const r="string"===typeof t.type?Object(Xa["a"])(t.type):t.type;if(e._automaticallyAssignedMetaProps&&Object(T["objectEach"])(t,(t,n)=>{e._automaticallyAssignedMetaProps.delete(n)}),!Object(T["isObject"])(r))return;n!==e||e._automaticallyAssignedMetaProps||(e._automaticallyAssignedMetaProps=new Set);const i={};Object(T["objectEach"])(r,(t,r)=>{var s;ja(r,n)&&(i[r]=t,null===(s=e._automaticallyAssignedMetaProps)||void 0===s||s.add(r))}),Object(T["extend"])(e,i)}function Qa(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];function n(){}Object(T["inherit"])(n,e);for(let r=0;r<t.length;r++)n.prototype[t[r]]=void 0;return n}function Ka(e){return Number.isInteger(e)&&e>=0}function Ga(e,t){if(!e())throw new Error("Assertion failed: "+t)}function Ba(e){return null===e||void 0===e}var Ja=()=>({_automaticallyAssignedMetaProps:void 0,activeHeaderClassName:"ht__active_highlight",allowEmpty:!0,allowHtml:!1,allowInsertColumn:!0,allowInsertRow:!0,allowInvalid:!0,allowRemoveColumn:!0,allowRemoveRow:!0,ariaTags:!0,autoColumnSize:void 0,autoRowSize:void 0,autoWrapCol:!1,autoWrapRow:!1,bindRowsWithHeaders:void 0,cell:[],cells:void 0,checkedTemplate:void 0,className:void 0,colHeaders:null,collapsibleColumns:void 0,columnHeaderHeight:void 0,columns:void 0,columnSorting:void 0,columnSummary:void 0,colWidths:void 0,commentedCellClassName:"htCommentCell",comments:!1,contextMenu:void 0,copyable:!0,copyPaste:!0,correctFormat:!1,currentColClassName:void 0,currentHeaderClassName:"ht__highlight",currentRowClassName:void 0,customBorders:!1,data:void 0,dataDotNotation:!0,dataSchema:void 0,dateFormat:"DD/MM/YYYY",timeFormat:"h:mm:ss a",datePickerConfig:void 0,defaultDate:void 0,disableVisualSelection:!1,dragToScroll:!0,dropdownMenu:void 0,editor:void 0,enterBeginsEditing:!0,enterMoves:{col:0,row:1},fillHandle:{autoInsertRow:!1},filter:!0,filteringCaseSensitive:!1,filters:void 0,fixedColumnsLeft:0,fixedColumnsStart:0,fixedRowsBottom:0,fixedRowsTop:0,formulas:void 0,fragmentSelection:!1,headerClassName:void 0,height:void 0,hiddenColumns:void 0,hiddenRows:void 0,invalidCellClassName:"htInvalid",imeFastEdit:!1,isEmptyCol(e){let t,n,r;for(t=0,n=this.countRows();t<n;t++)if(r=this.getDataAtCell(t,e),!1===Object(s["isEmpty"])(r))return!1;return!0},isEmptyRow(e){let t,n,r,i;for(t=0,n=this.countCols();t<n;t++)if(r=this.getDataAtCell(e,t),!1===Object(s["isEmpty"])(r))return"object"===typeof r&&(i=this.getCellMeta(e,t),Object(T["isObjectEqual"])(this.getSchema()[i.prop],r));return!0},label:void 0,language:"en-US",layoutDirection:"inherit",licenseKey:void 0,locale:"en-US",manualColumnFreeze:void 0,manualColumnMove:void 0,manualColumnResize:void 0,manualRowMove:void 0,manualRowResize:void 0,maxCols:1/0,maxRows:1/0,mergeCells:!1,minCols:0,minRows:0,minSpareCols:0,minSpareRows:0,multiColumnSorting:void 0,navigableHeaders:!1,tabNavigation:!0,nestedHeaders:void 0,nestedRows:void 0,noWordWrapClassName:"htNoWrap",numericFormat:void 0,observeDOMVisibility:!0,outsideClickDeselects:!0,persistentState:void 0,placeholder:void 0,placeholderCellClassName:"htPlaceholder",preventOverflow:!1,preventWheel:!1,readOnly:!1,readOnlyCellClassName:"htDimmed",renderAllRows:!1,renderAllColumns:!1,renderer:void 0,rowHeaders:void 0,rowHeaderWidth:void 0,rowHeights:void 0,search:!1,selectionMode:"multiple",selectOptions:void 0,skipColumnOnPaste:!1,skipRowOnPaste:!1,sortByRelevance:!0,source:void 0,startCols:5,startRows:5,stretchH:"none",strict:void 0,tableClassName:void 0,tabMoves:{row:0,col:1},title:void 0,trimDropdown:!0,trimRows:void 0,trimWhitespace:!0,type:"text",uncheckedTemplate:void 0,undo:void 0,validator:void 0,viewportColumnRenderingOffset:"auto",viewportRowRenderingOffset:"auto",visibleRows:10,width:void 0,wordWrap:!0});function za(e,t,n){return(t=$a(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function $a(e){var t=qa(e,"string");return"symbol"==typeof t?t:t+""}function qa(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function el(){return class{}}class tl{constructor(e){za(this,"metaCtor",el()),za(this,"meta",void 0),this.meta=this.metaCtor.prototype,Object(T["extend"])(this.meta,Ja()),this.meta.instance=e}getMetaConstructor(){return this.metaCtor}getMeta(){return this.meta}updateMeta(e){var t;Object(T["extend"])(this.meta,e),Za(this.meta,{...e,type:null!==(t=e.type)&&void 0!==t?t:this.meta.type},e)}}function nl(e,t,n){return(t=rl(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function rl(e){var t=il(e,"string");return"symbol"==typeof t?t:t+""}function il(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}class sl{constructor(e){nl(this,"meta",void 0);const t=e.getMetaConstructor();this.meta=new t}getMeta(){return this.meta}updateMeta(e){Object(T["extend"])(this.meta,e),Za(this.meta,e,e)}}function ol(e,t,n){return(t=al(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function al(e){var t=ll(e,"string");return"symbol"==typeof t?t:t+""}function ll(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}class cl{constructor(e){ol(this,"valueFactory",void 0),ol(this,"data",[]),ol(this,"index",[]),ol(this,"holes",new Set),this.valueFactory=e}obtain(e){Ga(()=>Ka(e),"Expecting an unsigned number.");const t=this._getStorageIndexByKey(e);let n;if(t>=0)n=this.data[t],void 0===n&&(n=this.valueFactory(e),this.data[t]=n);else if(n=this.valueFactory(e),this.holes.size>0){const t=this.holes.values().next().value;this.holes.delete(t),this.data[t]=n,this.index[e]=t}else this.data.push(n),this.index[e]=this.data.length-1;return n}insert(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;Ga(()=>Ka(e)||Ba(e),"Expecting an unsigned number or null/undefined argument.");const n=[],r=this.data.length;for(let s=0;s<t;s++)n.push(r+s),this.data.push(void 0);const i=Ba(e)?this.index.length:e;this.index=[...this.index.slice(0,i),...n,...this.index.slice(i)]}remove(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;Ga(()=>Ka(e)||Ba(e),"Expecting an unsigned number or null/undefined argument.");const n=this.index.splice(Ba(e)?this.index.length-t:e,t);for(let r=0;r<n.length;r++){const e=n[r];"number"===typeof e&&this.holes.add(e)}}size(){return this.data.length-this.holes.size}values(){return Object(X["arrayFilter"])(this.data,(e,t)=>!this.holes.has(t))[Symbol.iterator]()}entries(){const e=[];for(let n=0;n<this.data.length;n++){const t=this._getKeyByStorageIndex(n);-1!==t&&e.push([t,this.data[n]])}let t=0;return{next:()=>{if(t<e.length){const n=e[t];return t+=1,{value:n,done:!1}}return{done:!0}}}}clear(){this.data=[],this.index=[],this.holes.clear()}_getStorageIndexByKey(e){return this.index.length>e?this.index[e]:-1}_getKeyByStorageIndex(e){return this.index.indexOf(e)}[Symbol.iterator](){return this.entries()}}function ul(e,t,n){return(t=hl(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function hl(e){var t=dl(e,"string");return"symbol"==typeof t?t:t+""}function dl(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}const ml=["data","width"];class gl{constructor(e){ul(this,"globalMeta",void 0),ul(this,"metas",new cl(()=>this._createMeta())),this.globalMeta=e,this.metas=new cl(()=>this._createMeta())}updateMeta(e,t){const n=this.getMeta(e);Object(T["extend"])(n,t),Za(n,t)}createColumn(e,t){this.metas.insert(e,t)}removeColumn(e,t){this.metas.remove(e,t)}getMeta(e){return this.metas.obtain(e)}getMetaConstructor(e){return this.metas.obtain(e).constructor}clearCache(){this.metas.clear()}_createMeta(){return Qa(this.globalMeta.getMetaConstructor(),ml).prototype}}function pl(e,t,n){return(t=fl(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function fl(e){var t=Rl(e,"string");return"symbol"==typeof t?t:t+""}function Rl(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}class yl{constructor(e){pl(this,"columnMeta",void 0),pl(this,"metas",new cl(()=>this._createRow())),this.columnMeta=e}updateMeta(e,t,n){const r=this.getMeta(e,t);Object(T["extend"])(r,n),Za(r,n)}createRow(e,t){this.metas.insert(e,t)}createColumn(e,t){for(let n=0;n<this.metas.size();n++)this.metas.obtain(n).insert(e,t)}removeRow(e,t){this.metas.remove(e,t)}removeColumn(e,t){for(let n=0;n<this.metas.size();n++)this.metas.obtain(n).remove(e,t)}getMeta(e,t,n){const r=this.metas.obtain(e).obtain(t);return void 0===n?r:r[n]}setMeta(e,t,n,r){var i;const s=this.metas.obtain(e).obtain(t);null===(i=s._automaticallyAssignedMetaProps)||void 0===i||i.delete(n),s[n]=r}removeMeta(e,t,n){const r=this.metas.obtain(e).obtain(t);delete r[n]}getMetas(){const e=[],t=Array.from(this.metas.values());for(let n=0;n<t.length;n++)Object(s["isDefined"])(t[n])&&e.push(...t[n].values());return e}getMetasAtRow(e){Ga(()=>Ka(e),"Expecting an unsigned number.");const t=new Map(this.metas);return t.has(e)?Array.from(t.get(e).values()):[]}clearCache(){this.metas.clear()}_createRow(){return new cl(e=>this._createMeta(e))}_createMeta(e){const t=this.columnMeta.getMetaConstructor(e);return new t}}class Ml{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];this.hot=e,this.globalMeta=new tl(e),this.tableMeta=new sl(this.globalMeta),this.columnMeta=new gl(this.globalMeta),this.cellMeta=new yl(this.columnMeta),n.forEach(e=>new e(this)),this.globalMeta.updateMeta(t)}getGlobalMeta(){return this.globalMeta.getMeta()}updateGlobalMeta(e){this.globalMeta.updateMeta(e)}getTableMeta(){return this.tableMeta.getMeta()}updateTableMeta(e){this.tableMeta.updateMeta(e)}getColumnMeta(e){return this.columnMeta.getMeta(e)}updateColumnMeta(e,t){this.columnMeta.updateMeta(e,t)}getCellMeta(e,t,n){let{visualRow:r,visualColumn:i}=n;const s=this.cellMeta.getMeta(e,t);return s.visualRow=r,s.visualCol=i,s.row=e,s.col=t,this.runLocalHooks("afterGetCellMeta",s),s}getCellMetaKeyValue(e,t,n){if("string"!==typeof n)throw new Error("The passed cell meta object key is not a string");return this.cellMeta.getMeta(e,t,n)}setCellMeta(e,t,n,r){this.cellMeta.setMeta(e,t,n,r)}updateCellMeta(e,t,n){this.cellMeta.updateMeta(e,t,n)}removeCellMeta(e,t,n){this.cellMeta.removeMeta(e,t,n)}getCellsMeta(){return this.cellMeta.getMetas()}getCellsMetaAtRow(e){return this.cellMeta.getMetasAtRow(e)}createRow(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;this.cellMeta.createRow(e,t)}removeRow(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;this.cellMeta.removeRow(e,t)}createColumn(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;this.cellMeta.createColumn(e,t),this.columnMeta.createColumn(e,t)}removeColumn(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;this.cellMeta.removeColumn(e,t),this.columnMeta.removeColumn(e,t)}clearCellsCache(){this.cellMeta.clearCache()}clearCache(){this.cellMeta.clearCache(),this.columnMeta.clearCache()}}function Sl(e,t,n){return(t=bl(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function bl(e){var t=wl(e,"string");return"symbol"==typeof t?t:t+""}function wl(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}Object(T["mixin"])(Ml,Ps["a"]);class Tl{constructor(e){Sl(this,"metaManager",void 0),Sl(this,"metaSyncMemo",new Map),this.metaManager=e,e.addLocalHook("afterGetCellMeta",e=>this.extendCellMeta(e)),no["a"].getSingleton().add("beforeRender",e=>{e&&this.metaSyncMemo.clear()},this.metaManager.hot)}extendCellMeta(e){var t;const{row:n,col:r}=e;if(null!==(t=this.metaSyncMemo.get(n))&&void 0!==t&&t.has(r))return;const{visualRow:s,visualCol:o}=e,a=this.metaManager.hot,l=a.colToProp(o);e.prop=l,a.runHooks("beforeGetCellMeta",s,o,e);const c=Object(T["hasOwnProperty"])(e,"type")?e.type:null;let u=Object(i["isFunction"])(e.cells)?e.cells(n,r,l):null;var h;c&&(u?u.type=null!==(h=u.type)&&void 0!==h?h:c:u={type:c});u&&this.metaManager.updateCellMeta(n,r,u),a.runHooks("afterGetCellMeta",s,o,e),this.metaSyncMemo.has(n)||this.metaSyncMemo.set(n,new Set),this.metaSyncMemo.get(n).add(r)}}function Ol(e,t,n){vl(e,t),t.set(e,n)}function vl(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function El(e,t,n){return(t=Cl(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Cl(e){var t=Ll(e,"string");return"symbol"==typeof t?t:t+""}function Ll(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function Nl(e,t){return e.get(_l(e,t))}function _l(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}var Il=new WeakMap;class Pl{constructor(e){El(this,"metaManager",void 0),El(this,"usageTracker",new Set),El(this,"propDescriptors",new Map([["ariaTags",{initOnly:!0}],["fixedColumnsLeft",{target:"fixedColumnsStart",onChange(e){const t=this.metaManager.hot.isRtl();if(t&&"fixedColumnsLeft"===e)throw new Error("The `fixedColumnsLeft` is not supported for RTL. Please use option `fixedColumnsStart`.");if(this.usageTracker.has("fixedColumnsLeft")&&this.usageTracker.has("fixedColumnsStart"))throw new Error("The `fixedColumnsLeft` and `fixedColumnsStart` should not be used together. Please use only the option `fixedColumnsStart`.")}}],["layoutDirection",{initOnly:!0}],["renderAllColumns",{initOnly:!0}],["renderAllRows",{initOnly:!0}]])),Ol(this,Il,(e,t,n)=>{if(!n)throw new Error(`The \`${e}\` option can not be updated after the Handsontable is initialized.`)}),this.metaManager=e,this.extendMetaProps()}extendMetaProps(){this.propDescriptors.forEach((e,t)=>{const{initOnly:n,target:r,onChange:i}=e,s="string"===typeof r,o=s?r:t,a="_"+o;this.metaManager.globalMeta.meta[a]=this.metaManager.globalMeta.meta[o],i?(this.installPropWatcher(t,a,i),s&&this.installPropWatcher(r,a,i)):n&&(this.installPropWatcher(t,a,Nl(Il,this)),this.metaManager.globalMeta.meta._initOnlySettings||(this.metaManager.globalMeta.meta._initOnlySettings=[]),this.metaManager.globalMeta.meta._initOnlySettings.push(t))})}installPropWatcher(e,t,n){const r=this;Object.defineProperty(this.metaManager.globalMeta.meta,e,{get(){return this[t]},set(i){const s=!r.usageTracker.has(e);r.usageTracker.add(e),n.call(r,e,i,s),this[t]=i},enumerable:!0,configurable:!0})}}var xl=n("3bc4");function Dl(e,t,n){return(t=Al(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Al(e){var t=Fl(e,"string");return"symbol"==typeof t?t:t+""}function Fl(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}class Yl{static get DESTINATION_RENDERER(){return 1}static get DESTINATION_CLIPBOARD_GENERATOR(){return 2}constructor(e,t,n){Dl(this,"hot",void 0),Dl(this,"metaManager",void 0),Dl(this,"tableMeta",void 0),Dl(this,"dataSource",void 0),Dl(this,"duckSchema",void 0),Dl(this,"colToPropCache",void 0),Dl(this,"propToColCache",void 0),this.hot=e,this.metaManager=n,this.tableMeta=n.getTableMeta(),this.dataSource=t,this.duckSchema=this.createDuckSchema(),this.createMap()}createMap(){const e=this.getSchema();if("undefined"===typeof e)throw new Error("trying to create `columns` definition but you didn't provide `schema` nor `data`");const t=this.tableMeta.columns;let n;if(this.colToPropCache=[],this.propToColCache=new Map,t){let r=0,i=0,s=!1;if("function"===typeof t){const t=Object(T["deepObjectSize"])(e);r=t>0?t:this.countFirstRowKeys(),s=!0}else{const e=this.tableMeta.maxCols;r=Math.min(e,t.length)}for(n=0;n<r;n++){const e=s?t(n):t[n];if(Object(T["isObject"])(e)){if("undefined"!==typeof e.data){const t=s?i:n;this.colToPropCache[t]=e.data,this.propToColCache.set(e.data,t)}i+=1}}}else this.recursiveDuckColumns(e)}countFirstRowKeys(){return Object(ds["countFirstRowKeys"])(this.dataSource)}recursiveDuckColumns(e,t,n){let r,i=t,s=n;return"undefined"===typeof i&&(i=0,s=""),"object"!==typeof e||Array.isArray(e)||Object(T["objectEach"])(e,(e,t)=>{null===e?(r=s+t,this.colToPropCache.push(r),this.propToColCache.set(r,i),i+=1):i=this.recursiveDuckColumns(e,i,t+".")}),i}colToProp(e){if(!1===Number.isInteger(e))return e;const t=this.hot.toPhysicalColumn(e);return null===t?e:this.colToPropCache&&Object(s["isDefined"])(this.colToPropCache[t])?this.colToPropCache[t]:t}propToCol(e){const t=this.propToColCache.get(e);if(Object(s["isDefined"])(t))return this.hot.toVisualColumn(t);const n=this.hot.toVisualColumn(e);return null===n?e:n}getSchema(){const e=this.tableMeta.dataSchema;return e?"function"===typeof e?e():e:this.duckSchema}createDuckSchema(){return this.dataSource&&this.dataSource[0]?Object(T["duckSchema"])(this.dataSource[0]):{}}refreshDuckSchema(){this.duckSchema=this.createDuckSchema()}createRow(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,{source:n,mode:r="above"}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const i=this.hot.countSourceRows();let s=i,o=0,a=e;("number"!==typeof a||a>=i)&&(a=i),a<this.hot.countRows()&&(s=this.hot.toPhysicalRow(a));const l=this.hot.runHooks("beforeCreateRow",a,t,n);if(!1===l||null===s)return{delta:0};const c=this.tableMeta.maxRows,u=this.getSchema().length,h=[];while(o<t&&i+o<c){let e=null;"array"===this.hot.dataType?this.tableMeta.dataSchema?e=Object(T["deepClone"])(this.getSchema()):(e=[],Object(B["rangeEach"])(u-1,()=>e.push(null))):"function"===this.hot.dataType?e=this.tableMeta.dataSchema(a+o):(e={},Object(T["deepExtend"])(e,this.getSchema())),h.push(e),o+=1}this.hot.rowIndexMapper.insertIndexes(a,o),"below"===r&&(s=Math.min(s+1,i)),this.spliceData(s,0,h);const d=this.hot.toVisualRow(s);return this.hot.countSourceRows()===h.length&&this.hot.columnIndexMapper.initToLength(this.hot.getInitialColumnCount()),o>0&&(void 0===e||null===e?this.metaManager.createRow(null,o):"auto"!==n&&this.metaManager.createRow(s,t)),this.hot.runHooks("afterCreateRow",d,o,n),this.hot.forceFullRender=!0,{delta:o,startPhysicalIndex:s}}createCol(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,{source:n,mode:r="start"}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(!this.hot.isColumnModificationAllowed())throw new Error("Cannot create new column. When data source in an object, you can only have as much columns as defined in first data row, data schema or in the 'columns' setting.If you want to be able to add new columns, you have to use array datasource.");const i=this.dataSource,s=this.tableMeta.maxCols,o=this.hot.countSourceCols();let a=e;("number"!==typeof a||a>=o)&&(a=o);const l=this.hot.runHooks("beforeCreateCol",a,t,n);if(!1===l)return{delta:0};let c=o;a<this.hot.countCols()&&(c=this.hot.toPhysicalColumn(a));const u=this.hot.countSourceRows();let h=this.hot.countCols(),d=0,m=c;"end"===r&&(m=Math.min(m+1,o));const g=m;while(d<t&&h<s){if("number"!==typeof a||a>=h)if(u>0)for(let e=0;e<u;e+=1)"undefined"===typeof i[e]&&(i[e]=[]),i[e].push(null);else i.push([null]);else for(let e=0;e<u;e++)i[e].splice(m,0,null);d+=1,m+=1,h+=1}this.hot.columnIndexMapper.insertIndexes(a,d),d>0&&(void 0===e||null===e?this.metaManager.createColumn(null,d):"auto"!==n&&this.metaManager.createColumn(g,t));const p=this.hot.toVisualColumn(g);return this.hot.runHooks("afterCreateCol",p,d,n),this.hot.forceFullRender=!0,this.refreshDuckSchema(),{delta:d,startPhysicalIndex:g}}removeRow(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=arguments.length>2?arguments[2]:void 0,r=Number.isInteger(e)?e:-t;const i=this.visualRowsToPhysical(r,t),o=this.hot.countSourceRows();r=(o+r)%o;const a=this.hot.runHooks("beforeRemoveRow",r,i.length,i,n);if(!1===a)return!1;const l=i.length;if(this.filterData(r,l,i),r<this.hot.countRows()){this.hot.rowIndexMapper.removeIndexes(i);const e=Object(s["isDefined"])(this.tableMeta.columns)||Object(s["isDefined"])(this.tableMeta.dataSchema);0===this.hot.rowIndexMapper.getNotTrimmedIndexesLength()&&!1===e&&this.hot.columnIndexMapper.setIndexesSequence([])}const c=i.slice(0).sort((e,t)=>t-e);return c.forEach(e=>{this.metaManager.removeRow(e,1)}),this.hot.runHooks("afterRemoveRow",r,l,i,n),this.hot.forceFullRender=!0,!0}removeCol(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=arguments.length>2?arguments[2]:void 0;if("object"===this.hot.dataType||this.tableMeta.columns)throw new Error("cannot remove column with object data source or columns option specified");let r="number"!==typeof e?-t:e;r=(this.hot.countCols()+r)%this.hot.countCols();const i=this.visualColumnsToPhysical(r,t),s=i.slice(0).sort((e,t)=>t-e),o=this.hot.runHooks("beforeRemoveCol",r,t,i,n);if(!1===o)return!1;let a=!0;const l=s.length,c=this.dataSource;for(let u=0;u<l;u++)a&&i[0]!==i[u]-u&&(a=!1);if(a)for(let u=0,h=this.hot.countSourceRows();u<h;u++)c[u].splice(i[0],t),0===u&&this.metaManager.removeColumn(i[0],t);else for(let u=0,h=this.hot.countSourceRows();u<h;u++)for(let e=0;e<l;e++)c[u].splice(s[e],1),0===u&&this.metaManager.removeColumn(s[e],1);return r<this.hot.countCols()&&(this.hot.columnIndexMapper.removeIndexes(i),0===this.hot.columnIndexMapper.getNotTrimmedIndexesLength()&&this.hot.rowIndexMapper.setIndexesSequence([])),this.hot.runHooks("afterRemoveCol",r,t,i,n),this.hot.forceFullRender=!0,this.refreshDuckSchema(),!0}spliceCol(e,t,n){const r=this.hot.getDataAtCol(e),i=r.slice(t,t+n),s=r.slice(t+n);for(var o=arguments.length,a=new Array(o>3?o-3:0),l=3;l<o;l++)a[l-3]=arguments[l];Object(X["extendArray"])(a,s);let c=0;while(c<n)a.push(null),c+=1;return Object(X["to2dArray"])(a),this.hot.populateFromArray(t,e,a,null,null,"spliceCol"),i}spliceRow(e,t,n){const r=this.hot.getSourceDataAtRow(e),i=r.slice(t,t+n),s=r.slice(t+n);for(var o=arguments.length,a=new Array(o>3?o-3:0),l=3;l<o;l++)a[l-3]=arguments[l];Object(X["extendArray"])(a,s);let c=0;while(c<n)a.push(null),c+=1;return this.hot.populateFromArray(e,t,[a],null,null,"spliceRow"),i}spliceData(e,t,n){const r=this.hot.runHooks("beforeDataSplice",e,t,n);if(!1!==r){const t=[...this.dataSource.slice(0,e),...n,...this.dataSource.slice(e)];this.dataSource.length=0,t.forEach(e=>this.dataSource.push(e))}}filterData(e,t,n){let r=this.hot.runHooks("filterData",e,t,n);!1===Array.isArray(r)&&(r=this.dataSource.filter((e,t)=>-1===n.indexOf(t))),this.dataSource.length=0,Array.prototype.push.apply(this.dataSource,r)}get(e,t){const n=this.hot.toPhysicalRow(e);let r=this.dataSource[n];const i=this.hot.runHooks("modifyRowData",n);r=isNaN(i)?i:r;const{dataDotNotation:s}=this.hot.getSettings();let o=null;if(r&&r.hasOwnProperty&&Object(T["hasOwnProperty"])(r,t))o=r[t];else if(s&&"string"===typeof t&&t.indexOf(".")>-1){let e=r;if(!e)return null;const n=t.split(".");for(let t=0,r=n.length;t<r;t++)if(e=e[n[t]],"undefined"===typeof e)return null;o=e}else"function"===typeof t&&(o=t(this.dataSource.slice(n,n+1)[0]));if(this.hot.hasHook("modifyData")){const e=Object(T["createObjectPropListener"])(o);this.hot.runHooks("modifyData",n,this.propToCol(t),e,"get"),e.isTouched()&&(o=e.value)}return o}getCopyable(e,t){return this.hot.getCellMeta(e,this.propToCol(t)).copyable?this.get(e,t):""}set(e,t,n){const r=this.hot.toPhysicalRow(e);let i=n,s=this.dataSource[r];const o=this.hot.runHooks("modifyRowData",r);if(s=isNaN(o)?o:s,this.hot.hasHook("modifyData")){const e=Object(T["createObjectPropListener"])(i);this.hot.runHooks("modifyData",r,this.propToCol(t),e,"set"),e.isTouched()&&(i=e.value)}const{dataDotNotation:a}=this.hot.getSettings();if(s&&s.hasOwnProperty&&Object(T["hasOwnProperty"])(s,t))s[t]=i;else if(a&&"string"===typeof t&&t.indexOf(".")>-1){let e,n=s,r=0;const o=t.split(".");for(r=0,e=o.length-1;r<e;r++)"undefined"===typeof n[o[r]]&&(n[o[r]]={}),n=n[o[r]];n[o[r]]=i}else"function"===typeof t?t(this.dataSource.slice(r,r+1)[0],i):s[t]=i}visualRowsToPhysical(e,t){const n=this.hot.countSourceRows(),r=[];let i,s=(n+e)%n,o=t;while(s<n&&o)i=this.hot.toPhysicalRow(s),r.push(i),o-=1,s+=1;return r}visualColumnsToPhysical(e,t){const n=this.hot.countCols(),r=[];let i=(n+e)%n,s=t;while(i<n&&s){const e=this.hot.toPhysicalColumn(i);r.push(e),s-=1,i+=1}return r}clear(){for(let e=0;e<this.hot.countSourceRows();e++)for(let t=0;t<this.hot.countCols();t++)this.set(e,this.colToProp(t),"")}getLength(){const e=this.tableMeta.maxRows;let t;t=e<0||0===e?0:e||1/0;const n=this.hot.rowIndexMapper.getNotTrimmedIndexesLength();return Math.min(n,t)}getAll(){const e={row:0,col:0},t={row:Math.max(this.hot.countRows()-1,0),col:Math.max(this.hot.countCols()-1,0)};return e.row-t.row!==0||this.hot.countSourceRows()?this.getRange(e,t,Yl.DESTINATION_RENDERER):[]}countCachedColumns(){return this.colToPropCache.length}getRange(e,t,n){const r=[];let i,s,o;const a=this.tableMeta.maxRows,l=this.tableMeta.maxCols;if(0===a||0===l)return[];const c=n===Yl.DESTINATION_CLIPBOARD_GENERATOR?this.getCopyable:this.get,u=Math.min(Math.max(a-1,0),Math.max(e.row,t.row)),h=Math.min(Math.max(l-1,0),Math.max(e.col,t.col));for(i=Math.min(e.row,t.row);i<=u;i++){o=[];const n=i>=0?this.hot.toPhysicalRow(i):i;for(s=Math.min(e.col,t.col);s<=h;s++){if(null===n)break;o.push(c.call(this,i,this.colToProp(s)))}null!==n&&r.push(o)}return r}getText(e,t){return Object(xl["b"])(this.getRange(e,t,Yl.DESTINATION_RENDERER))}getCopyableText(e,t){return Object(xl["b"])(this.getRange(e,t,Yl.DESTINATION_CLIPBOARD_GENERATOR))}destroy(){this.hot=null,this.metaManager=null,this.dataSource=null,this.duckSchema=null,this.colToPropCache.length=0,this.propToColCache.clear(),this.propToColCache=void 0}}var Hl=Yl;function kl(e,t,n,s){const{hotInstance:o,dataMap:a,dataSource:l,internalSource:c,source:u,metaManager:h,firstRun:d}=s,m=Object(G["toUpperCaseFirst"])(c),g=o.getSettings();Array.isArray(g.dataSchema)?o.dataType="array":Object(i["isFunction"])(g.dataSchema)?o.dataType="function":o.dataType="object",a&&a.destroy(),e=o.runHooks("before"+m,e,d,u);const p=new Hl(o,e,h);if(t(p),"object"===typeof e&&null!==e)e.push&&e.splice||(e=[e]);else{if(null!==e)throw new Error(`${c} only accepts array of objects or array of arrays (${typeof e} given)`);{const t=p.getSchema();let n;e=[];let r=0,i=0;for(r=0,i=g.startRows;r<i;r++)if("object"!==o.dataType&&"function"!==o.dataType||!g.dataSchema)if("array"===o.dataType)n=Object(T["deepClone"])(t[0]),e.push(n);else{n=[];for(let e=0,t=g.startCols;e<t;e++)n.push(null);e.push(n)}else n=Object(T["deepClone"])(t),e.push(n)}}Array.isArray(e[0])&&(o.dataType="array"),g.data=e,p.dataSource=e,l.data=e,l.dataType=o.dataType,l.colToProp=p.colToProp.bind(p),l.propToCol=p.propToCol.bind(p),l.countCachedColumns=p.countCachedColumns.bind(p),n(p),o.runHooks("after"+m,e,d,u),d||(o.runHooks("afterChange",null,c),o.render()),o.getSettings().ariaTags&&Object(r["setAttribute"])(o.rootElement,[Object(Ge["C"])(-1),Object(Ge["e"])(o.countCols()+(o.view?o.countRowHeaders():0))])}function Vl(e){return t=>{let{col:n}=t;e.scrollViewportTo({col:n})}}function Ul(){return()=>{}}function Wl(e){return t=>{e.scrollViewportTo(t.toObject())}}function Xl(e){return t=>{e.scrollViewportTo(t.toObject())}}function jl(e){return t=>{e.scrollViewportTo(t.toObject())}}function Zl(e){return t=>{let{row:n}=t;e.scrollViewportTo({row:n})}}function Ql(e){return t=>{const n=e.selection.getSelectionSource(),{row:r,col:i}=t;if(r<0&&i>=0)e.scrollViewportTo({col:i});else if(i<0&&r>=0)e.scrollViewportTo({row:r});else{if("mouse"===n&&(i===e.view.getLastPartiallyVisibleColumn()||r===e.view.getLastPartiallyVisibleRow()))return;e.scrollViewportTo({row:r,col:i})}}}function Kl(e){const{selection:t}=e;let n=!1,r=!1;return{resume(){r=!1},suspend(){r=!0},skipNextScrollCycle(){n=!0},scrollTo(i){var s;if(n||r)return void(n=!1);let o;t.isFocusSelectionChanged()?o=Wl(e):t.isSelectedByCorner()?o=Ul(e):t.isSelectedByRowHeader()?o=Zl(e):t.isSelectedByColumnHeader()?o=Vl(e):1===t.getSelectedRange().size()&&t.isMultiple()?o=Xl(e):1!==t.getSelectedRange().size()||t.isMultiple()?t.getSelectedRange().size()>1&&(o=jl(e)):o=Ql(e),null===(s=o)||void 0===s||s(i)}}}var Gl=n("c4fa");function Bl(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=e.rootElement,r=Jl(e),i=Jl(e);return r.addEventListener("focus",()=>null===t||void 0===t?void 0:t.onFocusFromTop()),i.addEventListener("focus",()=>null===t||void 0===t?void 0:t.onFocusFromBottom()),n.firstChild.before(r),n.lastChild.after(i),{activate(){e._registerTimeout(()=>{r.tabIndex=0,i.tabIndex=0},10)},deactivate(){e._registerTimeout(()=>{r.tabIndex=-1,i.tabIndex=-1},10)}}}function Jl(e){const t=e.rootDocument,n=t.createElement("input");return n.type="text",n.classList.add("htFocusCatcher"),e.getSettings().ariaTags&&Object(r["setAttribute"])(n,[Object(Ge["y"])(),Object(Ge["n"])()]),n}function zl(e){const t=ec(e);let n;const{activate:r,deactivate:i}=Bl(e,{onFocusFromTop(){var r;const i=null!==(r=t(n))&&void 0!==r?r:$l(e);i&&(e.runHooks("modifyFocusOnTabNavigation","from_above",i),e.selectCell(i.row,i.col)),e.listen()},onFocusFromBottom(){var r;const i=null!==(r=t(n))&&void 0!==r?r:ql(e);i&&(e.runHooks("modifyFocusOnTabNavigation","from_below",i),e.selectCell(i.row,i.col)),e.listen()}}),s={wrapped:!1,flipped:!1};let o=!0,a=!1,l=!1;function c(){s.wrapped=!1,s.flipped=!1,e.deselectCell(),e.unlisten()}e.addHook("afterListen",()=>i()),e.addHook("afterUnlisten",()=>r()),e.addHook("afterSelection",(t,r,i,c,u)=>{var h;(a&&(s.wrapped&&s.flipped||l)&&(l=!1,u.value=!0),o)&&(n=null===(h=e.getSelectedRangeLast())||void 0===h?void 0:h.highlight)}),e.addHook("beforeRowWrap",(e,t,n)=>{s.wrapped=!0,s.flipped=n});const u={keys:[["Tab"],["Shift","Tab"]],preventDefault:!1,stopPropagation:!1,relativeToGroup:Gl["b"],group:"focusCatcher"};e.getShortcutManager().getContext("grid").addShortcuts([{...u,callback:()=>{const{tabNavigation:t}=e.getSettings();a=!0,e.getSelectedRangeLast()&&!t&&(o=!1),t||(l=!0)},position:"before"},{...u,callback:t=>{const{tabNavigation:r,autoWrapRow:i}=e.getSettings();if(a=!1,o=!0,!r||!e.selection.isSelected()||i&&s.wrapped&&s.flipped||!i&&s.wrapped)return i&&s.wrapped&&s.flipped&&(n=t.shiftKey?$l(e):ql(e)),c(),!1;t.preventDefault()},position:"after"}])}function $l(e){const{rowIndexMapper:t,columnIndexMapper:n}=e,{navigableHeaders:r}=e.getSettings();let i=r&&e.countColHeaders()>0?-e.countColHeaders():0,s=r&&e.countRowHeaders()>0?-e.countRowHeaders():0;return 0===i&&(i=t.getVisualFromRenderableIndex(i)),0===s&&(s=n.getVisualFromRenderableIndex(s)),null===i||null===s?null:e._createCellCoords(i,s)}function ql(e){var t,n;const{rowIndexMapper:r,columnIndexMapper:i}=e,{navigableHeaders:s}=e.getSettings();let o=r.getRenderableIndexesLength()-1,a=i.getRenderableIndexesLength()-1;if(o<0){if(!s||0===e.countColHeaders())return null;o=-1}if(a<0){if(!s||0===e.countColHeaders())return null;a=-1}return e._createCellCoords(null!==(t=r.getVisualFromRenderableIndex(o))&&void 0!==t?t:o,null!==(n=i.getVisualFromRenderableIndex(a))&&void 0!==n?n:a)}function ec(e){return t=>{if(!t)return null;const n=$l(e),r=ql(e);return t.col<n.col&&(t.col=n.col),t.col>r.col&&(t.col=r.col),t.row<n.row&&(t.row=n.row),t.row>r.row&&(t.row=r.row),t}}var tc=n("6906");const nc=new Map([[" ","space"],["spacebar","space"],["scroll","scrolllock"],["del","delete"],["esc","escape"],["medianexttrack","mediatracknext"],["mediaprevioustrack","mediatrackprevious"],["volumeup","audiovolumeup"],["volumedown","audiovolumedown"],["volumemute","audiovolumemute"],["multiply","*"],["add","+"],["divide","/"],["subtract","-"],["left","arrowleft"],["right","arrowright"],["up","arrowup"],["down","arrowdown"]]),rc=e=>e.map(e=>{const t=e.toLowerCase();return nc.has(t)?nc.get(t):t}).sort().join("+"),ic=e=>e.split("+"),sc=new Map([[96,"numpad0"],[97,"numpad1"],[98,"numpad2"],[99,"numpad3"],[100,"numpad4"],[101,"numpad5"],[102,"numpad6"],[103,"numpad7"],[104,"numpad8"],[105,"numpad9"],[106,"multiply"],[107,"add"],[108,"decimal"],[109,"subtract"],[110,"decimal"],[111,"divide"],[112,"f1"],[113,"f2"],[114,"f3"],[115,"f4"],[116,"f5"],[117,"f6"],[118,"f7"],[119,"f8"],[120,"f9"],[121,"f10"],[122,"f11"],[123,"f12"],[186,"semicolon"],[187,"equal"],[188,"comma"],[189,"minus"],[190,"period"],[191,"slash"],[192,"backquote"],[219,"bracketleft"],[220,"backslash"],[221,"bracketright"],[222,"quote"]]),oc=e=>{let{which:t,key:n}=e;if(sc.has(t))return sc.get(t);const r=String.fromCharCode(t).toLowerCase();return/^[a-z0-9]$/.test(r)?r:n.toLowerCase()},ac=Symbol("shortcut-context");function lc(e){return Object(T["isObject"])(e)&&e.__kindOf===ac}const cc=e=>{const t=Object(tc["a"])({errorIdExists:t=>`The "${t}" shortcut is already registered in the "${e}" context.`}),n=function(){let{keys:e,callback:n,group:r,runOnlyIf:o=(()=>!0),captureCtrl:a=!1,preventDefault:l=!0,stopPropagation:c=!1,relativeToGroup:u,position:h,forwardToContext:d}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(Object(s["isUndefined"])(r))throw new Error("You need to define the shortcut's group.");if(!1===Object(i["isFunction"])(n))throw new Error("The shortcut's callback needs to be a function.");if(!1===Array.isArray(e))throw new Error(et["a"]`Pass the shortcut\'s keys as an array of arrays,\x20
  295. using the KeyboardEvent.key properties:\x20
  296. https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/key/Key_Values.`);const m={callback:n,group:r,runOnlyIf:o,captureCtrl:a,preventDefault:l,stopPropagation:c};Object(s["isDefined"])(u)&&(m.relativeToGroup=u,m.position=h),lc(d)&&(m.forwardToContext=d),e.forEach(e=>{const n=rc(e),r=t.hasItem(n);if(r){const e=t.getItem(n);let r=e.findIndex(e=>e.group===u);-1!==r?"before"===h?r-=1:r+=1:r=e.length,e.splice(r,0,m)}else t.addItem(n,[m])})},r=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};e.forEach(e=>{Object(T["objectEach"])(t,(n,r)=>{!1===Object.prototype.hasOwnProperty.call(e,r)&&(e[r]=t[r])}),n(e)})},o=e=>{const n=rc(e);t.removeItem(n)},a=e=>{const n=t.getItems();n.forEach(t=>{let[n,r]=t;const i=r.filter(t=>t.group!==e);0===i.length?o(ic(n)):(r.length=0,r.push(...i))})},l=e=>{const n=rc(e),r=t.getItem(n);return Object(s["isDefined"])(r)?r.slice():[]},c=e=>{const n=rc(e);return t.hasItem(n)};return{__kindOf:ac,addShortcut:n,addShortcuts:r,getShortcuts:l,hasShortcut:c,removeShortcutsByKeys:o,removeShortcutsByGroup:a}};function uc(){const e=new Set;return{press(t){e.add(t)},release(t){e.delete(t)},releaseAll(){e.clear()},isPressed(t){return e.has(t)}}}const hc=["meta","alt","shift","control"],dc=uc(),mc=[];let gc=0;function pc(e,t,n,i,s){const a=e=>hc.includes(e),c=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const n=[];return e.altKey&&n.push("alt"),t&&(e.ctrlKey||e.metaKey)?n.push("control/meta"):(e.ctrlKey&&n.push("control"),e.metaKey&&n.push("meta")),e.shiftKey&&n.push("shift"),n},u=e=>{if(!1===t(e))return;const r=n(e);if(229===e.keyCode||!1===r||Object(l["isImmediatePropagationStopped"])(e))return;const u=oc(e);let h=[];a(u)||(h=c(e));const d=[u].concat(h),m=s(e,d);!m&&(Object(o["isMacOS"])()&&h.includes("meta")||!Object(o["isMacOS"])()&&h.includes("control"))&&s(e,[u].concat(c(e,!0))),i(e)},h=e=>{if(e.key){const t=oc(e);a(t)&&dc.press(t)}},d=e=>{if(e.key){const t=oc(e);a(t)&&dc.release(t)}},m=()=>{dc.releaseAll()},g=()=>{let t=e;gc+=1;while(t)1===gc&&(t.document.documentElement.addEventListener("keydown",h),mc.push({event:"keydown",listener:h}),t.document.documentElement.addEventListener("keyup",d),mc.push({event:"keyup",listener:d})),t.document.documentElement.addEventListener("keydown",u),t.document.documentElement.addEventListener("blur",m),t=Object(r["getParentWindow"])(t)},p=()=>{let t=e;gc-=1;while(t){if(0===gc){for(let e=0;e<mc.length;e++){const{event:n,listener:r}=mc[e];t.document.documentElement.removeEventListener(n,r)}mc.length=0}t.document.documentElement.removeEventListener("keydown",u),t.document.documentElement.removeEventListener("blur",m),t=Object(r["getParentWindow"])(t)}};return{mount:g,unmount:p,isPressed:e=>dc.isPressed(e),releasePressedKeys:()=>dc.releaseAll()}}const fc=e=>{let{ownerWindow:t,handleEvent:n,beforeKeyDown:r,afterKeyDown:i}=e;const s=Object(tc["a"])({errorIdExists:e=>`The "${e}" context name is already registered.`});let o="grid";const a=e=>{const t=cc(e);return s.addItem(e,t),t},c=()=>o,u=e=>s.getItem(e),h=e=>{if(!s.hasItem(e))throw new Error(et["a"]`You've tried to activate the "${e}" shortcut context\x20
  297. that does not exist. Before activation, register the context using the "addContext" method.`);o=e};let d=!1;const m=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:c();const r=lc(n)?n:u(n);let i=!1;if(!r.hasShortcut(t))return i;const s=r.getShortcuts(t);for(let o=0;o<s.length;o++){const{callback:n,runOnlyIf:r,preventDefault:a,stopPropagation:c,captureCtrl:u,forwardToContext:h}=s[o];if(!0===r(e)){if(d=u,i=!1===n(e,t),d=!1,a&&e.preventDefault(),c&&(Object(l["stopImmediatePropagation"])(e),e.stopPropagation()),i)break;h&&m(e,t,h)}}return i},g=pc(t,n,r,i,m);return g.mount(),{addContext:a,getActiveContextName:c,getContext:u,setActiveContextName:h,isCtrlPressed:()=>!d&&(g.isPressed("control")||g.isPressed("meta")),releasePressedKeys:()=>g.releasePressedKeys(),destroy:()=>g.unmount()}};var Rc=n("1e8c");let yc=null;const Mc=new Map;new Set;function Sc(e,t){var n,a=this;let l=arguments.length>2&&void 0!==arguments[2]&&arguments[2],h=this;const d=new u["a"](h);let m,g,p,f,R,y,M=!0;Xi(l)&&Wi(this),this.rootElement=e,this.rootDocument=e.ownerDocument,this.rootWindow=this.rootDocument.defaultView,this.isDestroyed=!1,this.renderSuspendedCounter=0,this.executionSuspendedCounter=0;const S=null!==(n=null===t||void 0===t?void 0:t.layoutDirection)&&void 0!==n?n:"inherit",b=["rtl","ltr"].includes(S)?S:this.rootWindow.getComputedStyle(this.rootElement).direction;this.rootElement.setAttribute("dir",b),this.isRtl=function(){return"rtl"===b},this.isLtr=function(){return!h.isRtl()},this.getDirectionFactor=function(){return h.isLtr()?1:-1},t.language=No(t.language);const O=new Ml(h,t,[Tl,Pl]),v=O.getTableMeta(),E=O.getGlobalMeta(),C=Object(tc["a"])();this.container=this.rootDocument.createElement("div"),this.renderCall=!1,e.insertBefore(this.container,e.firstChild),ji(this)&&Object(s["_injectProductInfo"])(t.licenseKey,e),this.guid="ht_"+Object(G["randomString"])(),Mc.set(this.guid,this),this.columnIndexMapper=new to,this.rowIndexMapper=new to,this.columnIndexMapper.addLocalHook("indexesSequenceChange",e=>{h.runHooks("afterColumnSequenceChange",e)}),this.rowIndexMapper.addLocalHook("indexesSequenceChange",e=>{h.runHooks("afterRowSequenceChange",e)}),g=new Rs(h),this.rootElement.id&&"ht_"!==this.rootElement.id.substring(0,3)||(this.rootElement.id=this.guid);const L=e=>{const{row:t,col:n}=e;return h._createCellCoords(t>=0?h.rowIndexMapper.getRenderableFromVisualIndex(t):t,n>=0?h.columnIndexMapper.getRenderableFromVisualIndex(n):n)},N=e=>{const{row:t,col:n}=e;return h._createCellCoords(t>=0?h.rowIndexMapper.getVisualFromRenderableIndex(t):t,n>=0?h.columnIndexMapper.getVisualFromRenderableIndex(n):n)},_=(e,t)=>{const n=t>e?1:-1,r=Math.min(e,t),i=Math.max(e,t),s=h.rowIndexMapper.getNearestNotHiddenIndex(e,n);return null===s||1===n&&s>i||-1===n&&s<r?null:s>=0?h.rowIndexMapper.getRenderableFromVisualIndex(s):s},I=(e,t)=>{const n=t>e?1:-1,r=Math.min(e,t),i=Math.max(e,t),s=h.columnIndexMapper.getNearestNotHiddenIndex(e,n);return null===s||1===n&&s>i||-1===n&&s<r?null:s>=0?h.columnIndexMapper.getRenderableFromVisualIndex(s):s};let P=new Wa(v,{rowIndexMapper:h.rowIndexMapper,columnIndexMapper:h.columnIndexMapper,countCols:()=>h.countCols(),countRows:()=>h.countRows(),propToCol:e=>m.propToCol(e),isEditorOpened:()=>!!h.getActiveEditor()&&h.getActiveEditor().isOpened(),countRenderableColumns:()=>this.view.countRenderableColumns(),countRenderableRows:()=>this.view.countRenderableRows(),countRowHeaders:()=>this.countRowHeaders(),countColHeaders:()=>this.countColHeaders(),countRenderableRowsInRange:function(){return a.view.countRenderableRowsInRange(...arguments)},countRenderableColumnsInRange:function(){return a.view.countRenderableColumnsInRange(...arguments)},getShortcutManager:()=>h.getShortcutManager(),createCellCoords:(e,t)=>h._createCellCoords(e,t),createCellRange:(e,t,n)=>h._createCellRange(e,t,n),visualToRenderableCoords:L,renderableToVisualCoords:N,findFirstNonHiddenRenderableRow:_,findFirstNonHiddenRenderableColumn:I,isDisabledCellSelection:(e,t)=>e<0||t<0?h.getSettings().disableVisualSelection:h.getCellMeta(e,t).disableVisualSelection});this.selection=P;const x=e=>{let{hiddenIndexesChanged:t}=e;t&&this.selection.commit()};function D(e){const t=io(e);vo(t)?(h.runHooks("beforeLanguageChange",t),E.language=t,h.runHooks("afterLanguageChange",t)):so(e)}function A(e,t){const n="className"===e?h.rootElement:h.table;if(M)Object(r["addClass"])(n,t);else{let i=[],s=[];E[e]&&(i=Array.isArray(E[e])?E[e]:Object(X["stringToArray"])(E[e])),t&&(s=Array.isArray(t)?t:Object(X["stringToArray"])(t));const o=Object(X["getDifferenceOfArrays"])(i,s),a=Object(X["getDifferenceOfArrays"])(s,i);o.length&&Object(r["removeClass"])(n,o),a.length&&Object(r["addClass"])(n,a)}E[e]=t}function F(){let e=!1;return{validatorsInQueue:0,valid:!0,addValidatorToQueue(){this.validatorsInQueue+=1,e=!1},removeValidatorFormQueue(){this.validatorsInQueue=this.validatorsInQueue-1<0?0:this.validatorsInQueue-1,this.checkIfQueueIsEmpty()},onQueueEmpty(){},checkIfQueueIsEmpty(){0===this.validatorsInQueue&&!1===e&&(e=!0,this.onQueueEmpty(this.valid))}}}function Y(e){const t=e.replace(",",".");return!1===isNaN(parseFloat(t))?parseFloat(t):e}function k(e,t,n){if(!e.length)return void n();const r=h.getActiveEditor(),i=new F;let s=!0;i.onQueueEmpty=()=>{r&&s&&r.cancelChanges(),n()};for(let o=e.length-1;o>=0;o--){const[n,r,,a]=e[o],l=m.propToCol(r);let c;c=Number.isInteger(l)?h.getCellMeta(n,l):{...Object.getPrototypeOf(v),...v},"numeric"===c.type&&"string"===typeof a&&Object(B["isNumericLike"])(a)&&(e[o][3]=Y(a)),h.getCellValidator(c)&&(i.addValidatorToQueue(),h.validateCell(e[o][3],c,function(t,n){return function(r){if("boolean"!==typeof r)throw new Error("Validation error: result is not boolean");!1===r&&!1===n.allowInvalid&&(s=!1,e.splice(t,1),n.valid=!0),i.removeValidatorFormQueue()}}(o,c),t))}i.checkIfQueueIsEmpty()}function V(e,t){for(let r=e.length-1;r>=0;r--){let n=!1;if(null!==e[r]){if(null!==e[r][2]&&void 0!==e[r][2]||null!==e[r][3]&&void 0!==e[r][3]){if(v.allowInsertRow)while(e[r][0]>h.countRows()-1){const{delta:e}=m.createRow(void 0,void 0,{source:t});if(0===e){n=!0;break}}if("array"===h.dataType&&(!v.columns||0===v.columns.length)&&v.allowInsertColumn)while(m.propToCol(e[r][1])>h.countCols()-1){const{delta:e}=m.createCol(void 0,void 0,{source:t});if(0===e){n=!0;break}}n||m.set(e[r][0],e[r][1],e[r][3])}}else e.splice(r,1)}const n=e.length>0;if(h.forceFullRender=!0,n){p.adjustRowsAndCols(),h.runHooks("beforeChangeRender",e,t),f.closeEditor(),h.view.render(),f.prepareEditor(),h.view.adjustElementsSize(),h.runHooks("afterChange",e,t||"edit");const n=h.getActiveEditor();n&&Object(s["isDefined"])(n.refreshValue)&&n.refreshValue()}else h.view.render()}function U(e,t,n){return Array.isArray(e)?e:[[e,t,n]]}function W(e,t){const n=h.getActiveEditor(),r=h.runHooks("beforeChange",e,t||"edit"),i=e.filter(e=>null!==e);return!1===r||0===i.length?(n&&n.cancelChanges(),[]):i}this.columnIndexMapper.addLocalHook("cacheUpdated",x),this.rowIndexMapper.addLocalHook("cacheUpdated",x),this.selection.addLocalHook("afterSetRangeEnd",(e,t)=>{const n=Object(T["createObjectPropListener"])(!1),i=this.selection.getSelectedRange(),{from:s,to:o}=i.current(),a=i.size()-1;this.runHooks("afterSelection",s.row,s.col,o.row,o.col,n,a),this.runHooks("afterSelectionByProp",s.row,h.colToProp(s.col),o.row,h.colToProp(o.col),n,a),t&&(!n.isTouched()||n.isTouched()&&!n.value)&&y.scrollTo(e);const l=P.isSelectedByRowHeader(),c=P.isSelectedByColumnHeader();l&&c?Object(r["addClass"])(this.rootElement,["ht__selection--rows","ht__selection--columns"]):l?(Object(r["removeClass"])(this.rootElement,"ht__selection--columns"),Object(r["addClass"])(this.rootElement,"ht__selection--rows")):c?(Object(r["removeClass"])(this.rootElement,"ht__selection--rows"),Object(r["addClass"])(this.rootElement,"ht__selection--columns")):Object(r["removeClass"])(this.rootElement,["ht__selection--rows","ht__selection--columns"]),"shift"!==P.getSelectionSource()&&f.closeEditor(null),h.view.render(),f.prepareEditor()}),this.selection.addLocalHook("beforeSetFocus",e=>{this.runHooks("beforeSelectionFocusSet",e.row,e.col)}),this.selection.addLocalHook("afterSetFocus",e=>{const t=Object(T["createObjectPropListener"])(!1);this.runHooks("afterSelectionFocusSet",e.row,e.col,t),(!t.isTouched()||t.isTouched()&&!t.value)&&y.scrollTo(e),f.closeEditor(),h.view.render(),f.prepareEditor()}),this.selection.addLocalHook("afterSelectionFinished",e=>{const t=e.length-1,{from:n,to:r}=e[t];this.runHooks("afterSelectionEnd",n.row,n.col,r.row,r.col,t),this.runHooks("afterSelectionEndByProp",n.row,h.colToProp(n.col),r.row,h.colToProp(r.col),t)}),this.selection.addLocalHook("afterIsMultipleSelection",e=>{const t=this.runHooks("afterIsMultipleSelection",e.value);e.value&&(e.value=t)}),this.selection.addLocalHook("afterDeselect",()=>{f.closeEditor(),h.view.render(),Object(r["removeClass"])(this.rootElement,["ht__selection--rows","ht__selection--columns"]),this.runHooks("afterDeselect")}),this.selection.addLocalHook("beforeHighlightSet",()=>this.runHooks("beforeSelectionHighlightSet")).addLocalHook("beforeSetRangeStart",(function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return a.runHooks("beforeSetRangeStart",...t)})).addLocalHook("beforeSetRangeStartOnly",(function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return a.runHooks("beforeSetRangeStartOnly",...t)})).addLocalHook("beforeSetRangeEnd",(function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return a.runHooks("beforeSetRangeEnd",...t)})).addLocalHook("beforeSelectColumns",(function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return a.runHooks("beforeSelectColumns",...t)})).addLocalHook("afterSelectColumns",(function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return a.runHooks("afterSelectColumns",...t)})).addLocalHook("beforeSelectRows",(function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return a.runHooks("beforeSelectRows",...t)})).addLocalHook("afterSelectRows",(function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return a.runHooks("afterSelectRows",...t)})).addLocalHook("beforeModifyTransformStart",(function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return a.runHooks("modifyTransformStart",...t)})).addLocalHook("afterModifyTransformStart",(function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return a.runHooks("afterModifyTransformStart",...t)})).addLocalHook("beforeModifyTransformFocus",(function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return a.runHooks("modifyTransformFocus",...t)})).addLocalHook("afterModifyTransformFocus",(function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return a.runHooks("afterModifyTransformFocus",...t)})).addLocalHook("beforeModifyTransformEnd",(function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return a.runHooks("modifyTransformEnd",...t)})).addLocalHook("afterModifyTransformEnd",(function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return a.runHooks("afterModifyTransformEnd",...t)})).addLocalHook("beforeRowWrap",(function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return a.runHooks("beforeRowWrap",...t)})).addLocalHook("beforeColumnWrap",(function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return a.runHooks("beforeColumnWrap",...t)})).addLocalHook("insertRowRequire",e=>this.alter("insert_row_above",e,1,"auto")).addLocalHook("insertColRequire",e=>this.alter("insert_col_start",e,1,"auto")),p={alter(e,t){var n,r;let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,o=arguments.length>3?arguments[3]:void 0,a=arguments.length>4?arguments[4]:void 0;const l=e=>{if(0===e.length)return[];const t=[...e];t.sort((e,t)=>{let[n]=e,[r]=t;return n===r?0:n>r?1:-1});const n=Object(X["arrayReduce"])(t,(e,t)=>{let[n,r]=t;const i=e[e.length-1],[s,o]=i,a=s+o;if(n<=a){const e=Math.max(r-(a-n),0);i[1]+=e}else e.push([n,r]);return e},[t[0]]);return n};switch(e){case"insert_row_below":case"insert_row_above":const a=h.countSourceRows();if(v.maxRows===a)return;const c="insert_row_below"===e?"below":"above";t=null!==(n=t)&&void 0!==n?n:"below"===c?a:0;const{delta:u,startPhysicalIndex:d}=m.createRow(t,i,{source:o,mode:c});P.shiftRows(h.toVisualRow(d),u);break;case"insert_col_start":case"insert_col_end":const g="insert_col_end"===e?"end":"start";t=null!==(r=t)&&void 0!==r?r:"end"===g?h.countSourceCols():0;const{delta:p,startPhysicalIndex:R}=m.createCol(t,i,{source:o,mode:g});if(p){if(Array.isArray(v.colHeaders)){const e=[h.toVisualColumn(R),0];e.length+=p,Array.prototype.splice.apply(v.colHeaders,e)}P.shiftColumns(h.toVisualColumn(R),p)}break;case"remove_row":const y=e=>{let t=0;Object(X["arrayEach"])(e,e=>{let[n,r]=e;const i=Object(s["isEmpty"])(n)?h.countRows()-1:Math.max(n-t,0);Number.isInteger(n)&&(n=Math.max(n-t,0));const a=m.removeRow(n,r,o);if(!a)return;if(P.isSelected()){const{row:e}=h.getSelectedRangeLast().highlight;e>=n&&e<=n+r-1&&f.closeEditor(!0)}const l=h.countRows();0===l?P.deselect():"ContextMenu.removeRow"===o?P.refresh():P.shiftRows(n,-r);const c=v.fixedRowsTop;c>=i+1&&(v.fixedRowsTop-=Math.min(r,c-i));const u=v.fixedRowsBottom;u&&i>=l-u&&(v.fixedRowsBottom-=Math.min(r,u)),t+=r})};Array.isArray(t)?y(l(t)):y([[t,i]]);break;case"remove_col":const M=e=>{let t=0;Object(X["arrayEach"])(e,e=>{let[n,r]=e;const i=Object(s["isEmpty"])(n)?h.countCols()-1:Math.max(n-t,0);let a=h.toPhysicalColumn(i);Number.isInteger(n)&&(n=Math.max(n-t,0));const l=m.removeCol(n,r,o);if(!l)return;if(P.isSelected()){const{col:e}=h.getSelectedRangeLast().highlight;e>=n&&e<=n+r-1&&f.closeEditor(!0)}const c=h.countCols();0===c?P.deselect():"ContextMenu.removeColumn"===o?P.refresh():P.shiftColumns(n,-r);const u=v.fixedColumnsStart;u>=i+1&&(v.fixedColumnsStart-=Math.min(r,u-i)),Array.isArray(v.colHeaders)&&("undefined"===typeof a&&(a=-1),v.colHeaders.splice(a,r)),t+=r})};Array.isArray(t)?M(l(t)):M([[t,i]]);break;default:throw new Error(`There is no such action "${e}"`)}h.view.render(),a||p.adjustRowsAndCols()},adjustRowsAndCols(){const e=v.minRows,t=v.minSpareRows,n=v.minCols,r=v.minSpareCols;if(e){const t=h.countRows();t<e&&m.createRow(t,e-t,{source:"auto"})}if(t){const e=h.countEmptyRows(!0);if(e<t){const n=t-e,r=Math.min(n,v.maxRows-h.countSourceRows());m.createRow(h.countRows(),r,{source:"auto"})}}{let e;(n||r)&&(e=h.countEmptyCols(!0));let t=h.countCols();if(n&&!v.columns&&t<n){const r=n-t;e+=r,m.createCol(t,r,{source:"auto"})}if(r&&!v.columns&&"array"===h.dataType&&e<r){t=h.countCols();const n=r-e,i=Math.min(n,v.maxCols-t);m.createCol(t,i,{source:"auto"})}}h.view&&h.view.adjustElementsSize()},populateFromArray(e,t,n,r,i){let s,o,a,l;const c=[],u={},d=[],m=e.row,g=e.col;if(o=t.length,0===o)return!1;let p=0,f=0;switch(Object(T["isObject"])(n)&&(p=n.col-g+1,f=n.row-m+1),i){case"shift_down":const i=Object(X["pivot"])(t),R=i.length,y=Math.max(R,p),M=h.getData().slice(m),S=Object(X["pivot"])(M).slice(g,g+y);for(a=0;a<y;a+=1)if(a<R){for(s=0,o=i[a].length;s<f-o;s+=1)i[a].push(i[a][s%o]);a<S.length?d.push(i[a].concat(S[a])):d.push(i[a].concat(new Array(M.length).fill(null)))}else d.push(i[a%R].concat(S[a]));h.populateFromArray(m,g,Object(X["pivot"])(d));break;case"shift_right":const b=t.length,w=Math.max(b,f),O=h.getData().slice(m).map(e=>e.slice(g));for(s=0;s<w;s+=1)if(s<b){for(a=0,l=t[s].length;a<p-l;a+=1)t[s].push(t[s][a%l]);if(s<O.length)for(let e=0;e<O[s].length;e+=1)t[s].push(O[s][e]);else t[s].push(...new Array(O[0].length).fill(null))}else t.push(t[s%o].slice(0,w).concat(O[s]));h.populateFromArray(m,g,t);break;case"overwrite":default:u.row=e.row,u.col=e.col;let E,C=0,L=0,N=!0;const _=function(e){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;const r=t[e%t.length];return null!==n?r[n%r.length]:r},I=t.length,P=n?n.row-e.row+1:0;for(o=n?P:Math.max(I,P),s=0;s<o;s++){if(n&&u.row>n.row&&P>I||!v.allowInsertRow&&u.row>h.countRows()-1||u.row>=v.maxRows)break;const t=s-C,i=_(t).length,d=n?n.col-e.col+1:0;if(l=n?d:Math.max(i,d),u.col=e.col,E=h.getCellMeta(u.row,u.col),"CopyPaste.paste"!==r&&"Autofill.fill"!==r||!E.skipRowOnPaste){for(L=0,a=0;a<l;a++){if(n&&u.col>n.col&&d>i||!v.allowInsertColumn&&u.col>h.countCols()-1||u.col>=v.maxCols)break;if(E=h.getCellMeta(u.row,u.col),("CopyPaste.paste"===r||"Autofill.fill"===r)&&E.skipColumnOnPaste){L+=1,u.col+=1,l+=1;continue}if(E.readOnly&&"UndoRedo.undo"!==r){u.col+=1;continue}const e=a-L;let s=_(t,e),o=h.getDataAtCell(u.row,u.col);if(null!==s&&"object"===typeof s)if(Array.isArray(s)&&null===o&&(o=[]),null===o||"object"!==typeof o)N=!1;else{const e=Object(T["duckSchema"])(Array.isArray(o)?o:o[0]||o),t=Object(T["duckSchema"])(Array.isArray(s)?s:s[0]||s);Object(T["isObjectEqual"])(e,t)||Array.isArray(e)&&Array.isArray(t)?s=Object(T["deepClone"])(s):N=!1}else null!==o&&"object"===typeof o&&(N=!1);N&&c.push([u.row,u.col,s]),N=!0,u.col+=1}u.row+=1}else C+=1,u.row+=1,o+=1}h.setDataAtCell(c,null,null,r||"populateFromArray");break}}},this.init=function(){g.setData(v.data),h.runHooks("beforeInit"),(Object(o["isMobileBrowser"])()||Object(o["isIpadOS"])())&&Object(r["addClass"])(h.rootElement,"mobile"),this.updateSettings(v,!0),this.view=new hs(this),f=w.getInstance(h,v,P),y=Kl(h),R=new H(h),ji(this)&&zl(h),h.runHooks("init"),this.forceFullRender=!0,this.view.render(),M&&null===h.rootElement.offsetParent&&Object(r["observeVisibilityChangeOnce"])(h.rootElement,()=>{h.view._wt.wtOverlays.updateLastSpreaderSize(),h.render(),h.view.adjustElementsSize()}),"object"===typeof M&&(h.runHooks("afterChange",M[0],M[1]),M=!1),h.runHooks("afterInit")},this._createCellCoords=function(e,t){return h.view._wt.createCellCoords(e,t)},this._createCellRange=function(e,t,n){return h.view._wt.createCellRange(e,t,n)},this.validateCell=function(e,t,n,r){let o=h.getCellValidator(t);function a(e){let r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(!r||!0===t.hidden)return void n(e);const i=t.visualCol,s=t.visualRow,o=h.getCell(s,i,!0);if(o&&"TH"!==o.nodeName){const e=h.rowIndexMapper.getRenderableFromVisualIndex(s),t=h.columnIndexMapper.getRenderableFromVisualIndex(i);h.view._wt.getSetting("cellRenderer",e,t,o)}n(e)}Object(s["isRegExp"])(o)&&(o=function(e){return function(t,n){n(e.test(t))}}(o)),Object(i["isFunction"])(o)?(e=h.runHooks("beforeValidate",e,t.visualRow,t.prop,r),h._registerImmediate(()=>{o.call(t,e,n=>{h&&(n=h.runHooks("afterValidate",n,e,t.visualRow,t.prop,r),t.valid=n,a(n),h.runHooks("postAfterValidate",n,e,t.visualRow,t.prop,r))})})):h._registerImmediate(()=>{t.valid=!0,a(t.valid,!1)})},this.setDataAtCell=function(e,t,n,r){const i=U(e,t,n),s=[];let o,a,l,c=r;for(o=0,a=i.length;o<a;o++){if("object"!==typeof i[o])throw new Error("Method `setDataAtCell` accepts row number or changes array of arrays as its first parameter");if("number"!==typeof i[o][1])throw new Error("Method `setDataAtCell` accepts row and column number as its parameters. If you want to use object property name, use method `setDataAtRowProp`");l=i[o][1]>=this.countCols()?i[o][1]:m.colToProp(i[o][1]),s.push([i[o][0],l,g.getAtCell(this.toPhysicalRow(i[o][0]),i[o][1]),i[o][2]])}c||"object"!==typeof e||(c=t);const u=W(s,r);h.runHooks("afterSetDataAtCell",u,c),k(u,c,()=>{V(u,c)})},this.setDataAtRowProp=function(e,t,n,r){const i=U(e,t,n),s=[];let o,a,l=r;for(o=0,a=i.length;o<a;o++)s.push([i[o][0],i[o][1],g.getAtCell(this.toPhysicalRow(i[o][0]),i[o][1]),i[o][2]]);l||"object"!==typeof e||(l=t);const c=W(s,r);h.runHooks("afterSetDataAtRowProp",c,l),k(c,l,()=>{V(c,l)})},this.listen=function(){h&&!h.isListening()&&(Mc.forEach(e=>{h!==e&&e.unlisten()}),yc=h.guid,h.runHooks("afterListen"))},this.unlisten=function(){this.isListening()&&(yc=null,h.runHooks("afterUnlisten"))},this.isListening=function(){return yc===h.guid},this.destroyEditor=function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];f.closeEditor(e),h.view.render(),t&&P.isSelected()&&f.prepareEditor()},this.populateFromArray=function(e,t,n,r,i,s,o){if("object"!==typeof n||"object"!==typeof n[0])throw new Error("populateFromArray parameter `input` must be an array of arrays");const a="number"===typeof r?h._createCellCoords(r,i):null;return p.populateFromArray(h._createCellCoords(e,t),n,a,s,o)},this.spliceCol=function(e,t,n){for(var r=arguments.length,i=new Array(r>3?r-3:0),s=3;s<r;s++)i[s-3]=arguments[s];return m.spliceCol(e,t,n,...i)},this.spliceRow=function(e,t,n){for(var r=arguments.length,i=new Array(r>3?r-3:0),s=3;s<r;s++)i[s-3]=arguments[s];return m.spliceRow(e,t,n,...i)},this.getSelected=function(){if(P.isSelected())return Object(X["arrayMap"])(P.getSelectedRange(),e=>{let{from:t,to:n}=e;return[t.row,t.col,n.row,n.col]})},this.getSelectedLast=function(){const e=this.getSelected();let t;return e&&e.length>0&&(t=e[e.length-1]),t},this.getSelectedRange=function(){if(P.isSelected())return Array.from(P.getSelectedRange())},this.getSelectedRangeLast=function(){const e=this.getSelectedRange();let t;return e&&e.length>0&&(t=e[e.length-1]),t},this.emptySelectedCells=function(e){if(!P.isSelected()||0===this.countRows()||0===this.countCols())return;const t=[];Object(X["arrayEach"])(P.getSelectedRange(),e=>{if(e.isSingleHeader())return;const n=e.getTopStartCorner(),r=e.getBottomEndCorner();Object(B["rangeEach"])(n.row,r.row,e=>{Object(B["rangeEach"])(n.col,r.col,n=>{this.getCellMeta(e,n).readOnly||t.push([e,n,null])})})}),t.length>0&&this.setDataAtCell(t,e)},this.isRenderSuspended=function(){return this.renderSuspendedCounter>0},this.suspendRender=function(){this.renderSuspendedCounter+=1},this.resumeRender=function(){const e=this.renderSuspendedCounter-1;this.renderSuspendedCounter=Math.max(e,0),this.isRenderSuspended()||e!==this.renderSuspendedCounter||(this.renderCall?this.render():h.view.render())},this.render=function(){this.view&&(this.renderCall=!0,this.forceFullRender=!0,this.isRenderSuspended()||h.view.render())},this.batchRender=function(e){this.suspendRender();const t=e();return this.resumeRender(),t},this.isExecutionSuspended=function(){return this.executionSuspendedCounter>0},this.suspendExecution=function(){this.executionSuspendedCounter+=1,this.columnIndexMapper.suspendOperations(),this.rowIndexMapper.suspendOperations()},this.resumeExecution=function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];const t=this.executionSuspendedCounter-1;this.executionSuspendedCounter=Math.max(t,0),(!this.isExecutionSuspended()&&t===this.executionSuspendedCounter||e)&&(this.columnIndexMapper.resumeOperations(),this.rowIndexMapper.resumeOperations())},this.batchExecution=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];this.suspendExecution();const n=e();return this.resumeExecution(t),n},this.batch=function(e){this.suspendRender(),this.suspendExecution();const t=e();return this.resumeExecution(),this.resumeRender(),t},this.refreshDimensions=function(){if(!h.view)return;const{width:e,height:t}=h.view.getLastSize(),{width:n,height:r}=h.rootElement.getBoundingClientRect(),i=n!==e||r!==t,s=!1===h.runHooks("beforeRefreshDimensions",{width:e,height:t},{width:n,height:r},i);s||((i||h.view._wt.wtOverlays.scrollableElement===h.rootWindow)&&(h.view.setLastSize(n,r),h.render()),h.runHooks("afterRefreshDimensions",{width:e,height:t},{width:n,height:r},i))},this.updateData=function(e,t){kl(e,e=>{m=e},e=>{m=e,h.columnIndexMapper.fitToLength(this.getInitialColumnCount()),h.rowIndexMapper.fitToLength(this.countSourceRows()),p.adjustRowsAndCols(),P.refresh()},{hotInstance:h,dataMap:m,dataSource:g,internalSource:"updateData",source:t,metaManager:O,firstRun:M})},this.loadData=function(e,t){kl(e,e=>{m=e},()=>{O.clearCellsCache(),h.initIndexMappers(),p.adjustRowsAndCols(),P.refresh(),M&&(M=[null,"loadData"])},{hotInstance:h,dataMap:m,dataSource:g,internalSource:"loadData",source:t,metaManager:O,firstRun:M})},this.getInitialColumnCount=function(){const e=v.columns;let t=0;if(Array.isArray(e))t=e.length;else if(Object(i["isFunction"])(e))if("array"===h.dataType){const n=this.countSourceCols();for(let r=0;r<n;r+=1)e(r)&&(t+=1)}else"object"!==h.dataType&&"function"!==h.dataType||(t=m.colToPropCache.length);else if(Object(s["isDefined"])(v.dataSchema)){const e=m.getSchema();t=Array.isArray(e)?e.length:Object(T["deepObjectSize"])(e)}else t=this.countSourceCols();return t},this.initIndexMappers=function(){this.columnIndexMapper.initToLength(this.getInitialColumnCount()),this.rowIndexMapper.initToLength(this.countSourceRows())},this.getData=function(e,t,n,r){return Object(s["isUndefined"])(e)?m.getAll():m.getRange(h._createCellCoords(e,t),h._createCellCoords(n,r),m.DESTINATION_RENDERER)},this.getCopyableText=function(e,t,n,r){return m.getCopyableText(h._createCellCoords(e,t),h._createCellCoords(n,r))},this.getCopyableData=function(e,t){return m.getCopyable(e,m.colToProp(t))},this.getSchema=function(){return m.getSchema()},this.updateSettings=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const n=(M?h.loadData:h.updateData).bind(this);let r,o,a=!1;if(Object(s["isDefined"])(e.rows))throw new Error('The "rows" setting is no longer supported. Do you mean startRows, minRows or maxRows?');if(Object(s["isDefined"])(e.cols))throw new Error('The "cols" setting is no longer supported. Do you mean startCols, minCols or maxCols?');if(Object(s["isDefined"])(e.ganttChart))throw new Error('Since 8.0.0 the "ganttChart" setting is no longer supported.');for(r in e)"data"===r||("language"===r?D(e.language):"className"===r?A("className",e.className):"tableClassName"===r&&h.table?(A("tableClassName",e.tableClassName),h.view._wt.wtOverlays.syncOverlayTableClassNames()):no["a"].getSingleton().isRegistered(r)||no["a"].getSingleton().isDeprecated(r)?(Object(i["isFunction"])(e[r])||Array.isArray(e[r]))&&(e[r].initialHook=!0,h.addHook(r,e[r])):!t&&Object(T["hasOwnProperty"])(e,r)&&(E[r]=e[r]));void 0===e.data&&void 0===v.data?n(null,"updateSettings"):void 0!==e.data?n(e.data,"updateSettings"):void 0!==e.columns&&(m.createMap(),h.initIndexMappers());const l=h.countCols(),c=v.columns;if(c&&Object(i["isFunction"])(c)&&(a=!0),void 0===e.cell&&void 0===e.cells&&void 0===e.columns||O.clearCache(),l>0)for(r=0,o=0;r<l;r++){if(c){const e=a?c(r):c[o];e&&O.updateColumnMeta(o,e)}o+=1}Object(s["isDefined"])(e.cell)&&Object(T["objectEach"])(e.cell,e=>{h.setCellMetaObject(e.row,e.col,e)}),h.runHooks("afterCellMetaReset");let u=h.rootElement.style.height;""!==u&&(u=parseInt(h.rootElement.style.height,10));let d=e.height;if(Object(i["isFunction"])(d)&&(d=d()),t){const e=h.rootElement.getAttribute("style");e&&h.rootElement.setAttribute("data-initialstyle",h.rootElement.getAttribute("style"))}if(null===d){const e=h.rootElement.getAttribute("data-initialstyle");e&&(e.indexOf("height")>-1||e.indexOf("overflow")>-1)?h.rootElement.setAttribute("style",e):(h.rootElement.style.height="",h.rootElement.style.overflow="")}else void 0!==d&&(h.rootElement.style.height=isNaN(d)?""+d:d+"px",h.rootElement.style.overflow="hidden");if("undefined"!==typeof e.width){let t=e.width;Object(i["isFunction"])(t)&&(t=t()),h.rootElement.style.width=isNaN(t)?""+t:t+"px"}t||(h.view&&(h.view._wt.wtViewport.resetHasOversizedColumnHeadersMarked(),h.view._wt.exportSettingsAsClassNames()),h.runHooks("afterUpdateSettings",e)),p.adjustRowsAndCols(),h.view&&!M&&(h.forceFullRender=!0,h.view.render(),h.view._wt.wtOverlays.adjustElementsSize()),t||!h.view||""!==u&&""!==d&&void 0!==d||u===d||h.view._wt.wtOverlays.updateMainScrollableElements()},this.getValue=function(){const e=h.getSelectedLast();if(v.getValue){if(Object(i["isFunction"])(v.getValue))return v.getValue.call(h);if(e)return h.getData()[e[0][0]][v.getValue]}else if(e)return h.getDataAtCell(e[0],e[1])},this.getSettings=function(){return v},this.clear=function(){this.selectAll(),this.emptySelectedCells()},this.alter=function(e,t,n,r,i){p.alter(e,t,n,r,i)},this.getCell=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=t,i=e;if(t>=0){if(this.columnIndexMapper.isHidden(this.toPhysicalColumn(t)))return null;r=this.columnIndexMapper.getRenderableFromVisualIndex(t)}if(e>=0){if(this.rowIndexMapper.isHidden(this.toPhysicalRow(e)))return null;i=this.rowIndexMapper.getRenderableFromVisualIndex(e)}return null===i||null===r||void 0===i||void 0===r?null:h.view.getCellAtCoords(h._createCellCoords(i,r),n)},this.getCoords=function(e){const t=this.view._wt.wtTable.getCoords(e);if(null===t)return null;const{row:n,col:r}=t;let i=n,s=r;return n>=0&&(i=this.rowIndexMapper.getVisualFromRenderableIndex(n)),r>=0&&(s=this.columnIndexMapper.getVisualFromRenderableIndex(r)),h._createCellCoords(i,s)},this.colToProp=function(e){return m.colToProp(e)},this.propToCol=function(e){return m.propToCol(e)},this.toVisualRow=e=>this.rowIndexMapper.getVisualFromPhysicalIndex(e),this.toVisualColumn=e=>this.columnIndexMapper.getVisualFromPhysicalIndex(e),this.toPhysicalRow=e=>this.rowIndexMapper.getPhysicalFromVisualIndex(e),this.toPhysicalColumn=e=>this.columnIndexMapper.getPhysicalFromVisualIndex(e),this.getDataAtCell=function(e,t){return m.get(e,m.colToProp(t))},this.getDataAtRowProp=function(e,t){return m.get(e,t)},this.getDataAtCol=function(e){const t=[],n=m.getRange(h._createCellCoords(0,e),h._createCellCoords(v.data.length-1,e),m.DESTINATION_RENDERER);for(let r=0;r<n.length;r+=1)for(let e=0;e<n[r].length;e+=1)t.push(n[r][e]);return t},this.getDataAtProp=function(e){const t=[],n=m.getRange(h._createCellCoords(0,m.propToCol(e)),h._createCellCoords(v.data.length-1,m.propToCol(e)),m.DESTINATION_RENDERER);for(let r=0;r<n.length;r+=1)for(let e=0;e<n[r].length;e+=1)t.push(n[r][e]);return t},this.getSourceData=function(e,t,n,r){let i;return i=void 0===e?g.getData():g.getByRange(h._createCellCoords(e,t),h._createCellCoords(n,r)),i},this.getSourceDataArray=function(e,t,n,r){let i;return i=void 0===e?g.getData(!0):g.getByRange(h._createCellCoords(e,t),h._createCellCoords(n,r),!0),i},this.getSourceDataAtCol=function(e){return g.getAtColumn(e)},this.setSourceDataAtCell=function(e,t,n,r){const i=U(e,t,n),o=this.hasHook("afterSetSourceDataAtCell"),a=[];o&&Object(X["arrayEach"])(i,e=>{let[t,n,r]=e;a.push([t,n,g.getAtCell(t,n),r])}),Object(X["arrayEach"])(i,e=>{let[t,n,r]=e;g.setAtCell(t,n,r)}),o&&this.runHooks("afterSetSourceDataAtCell",a,r),this.render();const l=h.getActiveEditor();l&&Object(s["isDefined"])(l.refreshValue)&&l.refreshValue()},this.getSourceDataAtRow=function(e){return g.getAtRow(e)},this.getSourceDataAtCell=function(e,t){return g.getAtCell(e,t)},this.getDataAtRow=function(e){const t=m.getRange(h._createCellCoords(e,0),h._createCellCoords(e,this.countCols()-1),m.DESTINATION_RENDERER);return t[0]||[]},this.getDataType=function(e,t,n,r){const i=void 0===e?[0,0,this.countRows(),this.countCols()]:[e,t,n,r],[s,o]=i;let[,,a,l]=i,c=null,u=null;void 0===a&&(a=s),void 0===l&&(l=o);let h="mixed";return Object(B["rangeEach"])(Math.max(Math.min(s,a),0),Math.max(s,a),e=>{let t=!0;return Object(B["rangeEach"])(Math.max(Math.min(o,l),0),Math.max(o,l),n=>{const r=this.getCellMeta(e,n);return u=r.type,c?t=c===u:c=u,t}),h=t?u:"mixed",t}),h},this.removeCellMeta=function(e,t,n){const[r,i]=[this.toPhysicalRow(e),this.toPhysicalColumn(t)];let s=O.getCellMetaKeyValue(r,i,n);const o=h.runHooks("beforeRemoveCellMeta",e,t,n,s);!1!==o&&(O.removeCellMeta(r,i,n),h.runHooks("afterRemoveCellMeta",e,t,n,s)),s=null},this.spliceCellsMeta=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;for(var n=arguments.length,r=new Array(n>2?n-2:0),i=2;i<n;i++)r[i-2]=arguments[i];if(r.length>0&&!Array.isArray(r[0]))throw new Error("The 3rd argument (cellMetaRows) has to be passed as an array of cell meta objects array.");t>0&&O.removeRow(this.toPhysicalRow(e),t),r.length>0&&Object(X["arrayEach"])(r.reverse(),t=>{O.createRow(this.toPhysicalRow(e)),Object(X["arrayEach"])(t,(t,n)=>this.setCellMetaObject(e,n,t))}),h.render()},this.setCellMetaObject=function(e,t,n){"object"===typeof n&&Object(T["objectEach"])(n,(n,r)=>{this.setCellMeta(e,t,r,n)})},this.setCellMeta=function(e,t,n,r){const i=h.runHooks("beforeSetCellMeta",e,t,n,r);if(!1===i)return;let s=e,o=t;e<this.countRows()&&(s=this.toPhysicalRow(e)),t<this.countCols()&&(o=this.toPhysicalColumn(t)),O.setCellMeta(s,o,n,r),h.runHooks("afterSetCellMeta",e,t,n,r)},this.getCellsMeta=function(){return O.getCellsMeta()},this.getCellMeta=function(e,t){let n=this.toPhysicalRow(e),r=this.toPhysicalColumn(t);return null===n&&(n=e),null===r&&(r=t),O.getCellMeta(n,r,{visualRow:e,visualColumn:t})},this.getColumnMeta=function(e){return O.getColumnMeta(this.toPhysicalColumn(e))},this.getCellMetaAtRow=function(e){return O.getCellsMetaAtRow(e)},this.isColumnModificationAllowed=function(){return!("object"===h.dataType||v.columns)},this.getCellRenderer=function(e,t){const n="number"===typeof e?h.getCellMeta(e,t).renderer:e.renderer;return"string"===typeof n?Object(Q["b"])(n):Object(s["isUndefined"])(n)?Object(Q["b"])("text"):n},this.getCellEditor=function(e,t){const n="number"===typeof e?h.getCellMeta(e,t).editor:e.editor;return"string"===typeof n?Object(c["a"])(n):Object(s["isUndefined"])(n)?Object(c["a"])("text"):n},this.getCellValidator=function(e,t){const n="number"===typeof e?h.getCellMeta(e,t).validator:e.validator;return"string"===typeof n?Object(K["b"])(n):n},this.validateCells=function(e){this._validateCells(e)},this.validateRows=function(e,t){if(!Array.isArray(e))throw new Error("validateRows parameter `rows` must be an array");this._validateCells(t,e)},this.validateColumns=function(e,t){if(!Array.isArray(e))throw new Error("validateColumns parameter `columns` must be an array");this._validateCells(t,void 0,e)},this._validateCells=function(e,t,n){const r=new F;e&&(r.onQueueEmpty=e);let i=h.countRows()-1;while(i>=0){if(void 0!==t&&-1===t.indexOf(i)){i-=1;continue}let e=h.countCols()-1;while(e>=0)void 0===n||-1!==n.indexOf(e)?(r.addValidatorToQueue(),h.validateCell(h.getDataAtCell(i,e),h.getCellMeta(i,e),e=>{if("boolean"!==typeof e)throw new Error("Validation error: result is not boolean");!1===e&&(r.valid=!1),r.removeValidatorFormQueue()},"validateCells"),e-=1):e-=1;i-=1}r.checkIfQueueIsEmpty()},this.getRowHeader=function(e){let t=v.rowHeaders,n=e;return void 0!==n&&(n=h.runHooks("modifyRowHeader",n)),void 0===n?(t=[],Object(B["rangeEach"])(h.countRows()-1,e=>{t.push(h.getRowHeader(e))})):Array.isArray(t)&&void 0!==t[n]?t=t[n]:Object(i["isFunction"])(t)?t=t(n):t&&"string"!==typeof t&&"number"!==typeof t&&(t=n+1),t},this.hasRowHeaders=function(){return!!v.rowHeaders},this.hasColHeaders=function(){if(void 0!==v.colHeaders&&null!==v.colHeaders)return!!v.colHeaders;for(let e=0,t=h.countCols();e<t;e++)if(h.getColHeader(e))return!0;return!1},this.getColHeader=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1;const n=h.runHooks("modifyColHeader",e);if(void 0===n){const e=[],t=h.countCols();for(let n=0;n<t;n++)e.push(h.getColHeader(n));return e}let r=v.colHeaders;const s=function(e){const t=[],n=h.countCols();let r=0;for(;r<n;r++)Object(i["isFunction"])(v.columns)&&v.columns(r)&&t.push(r);return t[e]},o=h.toPhysicalColumn(n),a=s(o);return!1===v.colHeaders?r=null:v.columns&&Object(i["isFunction"])(v.columns)&&v.columns(a)&&v.columns(a).title?r=v.columns(a).title:v.columns&&v.columns[o]&&v.columns[o].title?r=v.columns[o].title:Array.isArray(v.colHeaders)&&void 0!==v.colHeaders[o]?r=v.colHeaders[o]:Object(i["isFunction"])(v.colHeaders)?r=v.colHeaders(o):v.colHeaders&&"string"!==typeof v.colHeaders&&"number"!==typeof v.colHeaders&&(r=Object(ds["spreadsheetColumnLabel"])(n)),r=h.runHooks("modifyColumnHeaderValue",r,e,t),r},this._getColWidthFromSettings=function(e){let t;if(e>=0){const n=h.getCellMeta(0,e);t=n.width}if(void 0!==t&&t!==v.width||(t=v.colWidths),void 0!==t&&null!==t){switch(typeof t){case"object":t=t[e];break;case"function":t=t(e);break;default:break}"string"===typeof t&&(t=parseInt(t,10))}return t},this.getColWidth=function(e){let t=h._getColWidthFromSettings(e);return t=h.runHooks("modifyColWidth",t,e),void 0===t&&(t=yt["a"]),t},this._getRowHeightFromSettings=function(e){let t=v.rowHeights;if(void 0!==t&&null!==t){switch(typeof t){case"object":t=t[e];break;case"function":t=t(e);break;default:break}"string"===typeof t&&(t=parseInt(t,10))}return t},this.getRowHeight=function(e){let t=h._getRowHeightFromSettings(e);return t=h.runHooks("modifyRowHeight",t,e),t},this.countSourceRows=function(){return g.countRows()},this.countSourceCols=function(){return g.countFirstRowKeys()},this.countRows=function(){return m.getLength()},this.countCols=function(){const e=v.maxCols,t=this.columnIndexMapper.getNotTrimmedIndexesLength();return Math.min(e,t)},this.countRenderedRows=function(){return h.view._wt.drawn?h.view._wt.wtTable.getRenderedRowsCount():-1},this.countVisibleRows=function(){return h.view._wt.drawn?h.view._wt.wtTable.getVisibleRowsCount():-1},this.countRenderedCols=function(){return h.view._wt.drawn?h.view._wt.wtTable.getRenderedColumnsCount():-1},this.countVisibleCols=function(){return h.view._wt.drawn?h.view._wt.wtTable.getVisibleColumnsCount():-1},this.countRowHeaders=function(){return this.view.getRowHeadersCount()},this.countColHeaders=function(){return this.view.getColumnHeadersCount()},this.countEmptyRows=function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=0;return Object(B["rangeEachReverse"])(h.countRows()-1,n=>{if(h.isEmptyRow(n))t+=1;else if(!0===e)return!1}),t},this.countEmptyCols=function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=0;return Object(B["rangeEachReverse"])(h.countCols()-1,n=>{if(h.isEmptyCol(n))t+=1;else if(!0===e)return!1}),t},this.isEmptyRow=function(e){return v.isEmptyRow.call(h,e)},this.isEmptyCol=function(e){return v.isEmptyCol.call(h,e)},this.selectCell=function(e,t,n,r){let i=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],o=!(arguments.length>5&&void 0!==arguments[5])||arguments[5];return!Object(s["isUndefined"])(e)&&!Object(s["isUndefined"])(t)&&this.selectCells([[e,t,n,r]],i,o)},this.selectCells=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[[]],t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];!1===t&&y.suspend();const r=P.selectCells(e);return r&&n&&h.listen(),y.resume(),r},this.selectColumns=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e,n=arguments.length>2?arguments[2]:void 0;return P.selectColumns(e,t,n)},this.selectRows=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e,n=arguments.length>2?arguments[2]:void 0;return P.selectRows(e,t,n)},this.deselectCell=function(){P.deselect()},this.selectAll=function(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e,n=arguments.length>2?arguments[2]:void 0;y.skipNextScrollCycle(),P.selectAll(e,t,n)};const J=(e,t)=>e.getNearestNotHiddenIndex(t,1,!0);function z(e){return()=>{throw new Error(`The "${e}" method cannot be called because this Handsontable instance has been destroyed`)}}this.scrollViewportTo=function(e){var t,n;"number"===typeof e&&(e={row:arguments[0],col:arguments[1],verticalSnap:arguments[2]?"bottom":"top",horizontalSnap:arguments[3]?"end":"start",considerHiddenIndexes:null===(n=arguments[4])||void 0===n||n});const{row:r,col:i,verticalSnap:s,horizontalSnap:o,considerHiddenIndexes:a}=null!==(t=e)&&void 0!==t?t:{};let l,c,u,d;void 0!==s&&(l="top"===s,c=!l),void 0!==o&&(u="start"===o,d=!u);let m=r,g=i;if(void 0===a||a){const e=Number.isInteger(r)&&r>=0,t=Number.isInteger(i)&&i>=0,n=e?J(this.rowIndexMapper,r):void 0,s=t?J(this.columnIndexMapper,i):void 0;if(null===n||null===s)return!1;m=e?h.rowIndexMapper.getRenderableFromVisualIndex(n):r,g=t?h.columnIndexMapper.getRenderableFromVisualIndex(s):i}const p=Number.isInteger(m),f=Number.isInteger(g);return p&&m>=0&&f&&g>=0?h.view.scrollViewport(h._createCellCoords(m,g),l,d,c,u):p&&m>=0&&(f&&g<0||!f)?h.view.scrollViewportVertically(m,l,c):!!(f&&g>=0&&(p&&m<0||!p))&&h.view.scrollViewportHorizontally(g,d,u)},this.scrollToFocusedCell=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:()=>{};if(!this.selection.isSelected())return;this.addHookOnce("afterScroll",e);const{highlight:t}=this.getSelectedRangeLast(),n=this.scrollViewportTo(t.toObject());n?this.view.render():(this.removeHook("afterScroll",e),this._registerImmediate(()=>e()))},this.destroy=function(){if(h._clearTimeouts(),h._clearImmediates(),h.view&&h.view.destroy(),g&&g.destroy(),g=null,this.getShortcutManager().destroy(),O.clearCache(),Mc.delete(this.guid),ji(h)){const e=this.rootDocument.querySelector(".hot-display-license-info");e&&e.parentNode.removeChild(e)}Object(r["empty"])(h.rootElement),d.destroy(),f&&f.destroy(),h.batchExecution(()=>{h.rowIndexMapper.unregisterAll(),h.columnIndexMapper.unregisterAll(),C.getItems().forEach(e=>{let[,t]=e;t.destroy()}),C.clear(),h.runHooks("afterDestroy")},!0),no["a"].getSingleton().destroy(h),Object(T["objectEach"])(h,(e,t,n)=>{Object(i["isFunction"])(e)?n[t]=z(t):"guid"!==t&&(n[t]=null)}),h.isDestroyed=!0,m&&m.destroy(),m=null,p=null,P=null,f=null,h=null},this.getActiveEditor=function(){return f.getActiveEditor()},this.getFirstRenderedVisibleRow=function(){return h.view.getFirstRenderedVisibleRow()},this.getLastRenderedVisibleRow=function(){return h.view.getLastRenderedVisibleRow()},this.getFirstRenderedVisibleColumn=function(){return h.view.getFirstRenderedVisibleColumn()},this.getLastRenderedVisibleColumn=function(){return h.view.getLastRenderedVisibleColumn()},this.getFirstFullyVisibleRow=function(){return h.view.getFirstFullyVisibleRow()},this.getLastFullyVisibleRow=function(){return h.view.getLastFullyVisibleRow()},this.getFirstFullyVisibleColumn=function(){return h.view.getFirstFullyVisibleColumn()},this.getLastFullyVisibleColumn=function(){return h.view.getLastFullyVisibleColumn()},this.getFirstPartiallyVisibleRow=function(){return h.view.getFirstPartiallyVisibleRow()},this.getLastPartiallyVisibleRow=function(){return h.view.getLastPartiallyVisibleRow()},this.getFirstPartiallyVisibleColumn=function(){return h.view.getFirstPartiallyVisibleColumn()},this.getLastPartiallyVisibleColumn=function(){return h.view.getLastPartiallyVisibleColumn()},this.getPlugin=function(e){const t=Object(G["toUpperCaseFirst"])(e);return"UndoRedo"===t?this.undoRedo:C.getItem(t)},this.getPluginName=function(e){return e===this.undoRedo?this.undoRedo.constructor.PLUGIN_KEY:C.getId(e)},this.getInstance=function(){return h},this.addHook=function(e,t,n){no["a"].getSingleton().add(e,t,h,n)},this.hasHook=function(e){return no["a"].getSingleton().has(e,h)||no["a"].getSingleton().has(e)},this.addHookOnce=function(e,t,n){no["a"].getSingleton().once(e,t,h,n)},this.removeHook=function(e,t){no["a"].getSingleton().remove(e,t,h)},this.runHooks=function(e,t,n,r,i,s,o){return no["a"].getSingleton().run(h,e,t,n,r,i,s,o)},this.getTranslatedPhrase=function(e,t){return Co(v.language,e,t)},this.toHTML=()=>Object(j["instanceToHTML"])(this),this.toTableElement=()=>{const e=this.rootDocument.createElement("div");return e.insertAdjacentHTML("afterbegin",Object(j["instanceToHTML"])(this)),e.firstElementChild},this.timeouts=[],this._registerTimeout=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=e;"function"===typeof n&&(n=setTimeout(n,t)),this.timeouts.push(n)},this._clearTimeouts=function(){Object(X["arrayEach"])(this.timeouts,e=>{clearTimeout(e)})},this.immediates=[],this._registerImmediate=function(e){this.immediates.push(setImmediate(e))},this._clearImmediates=function(){Object(X["arrayEach"])(this.immediates,e=>{clearImmediate(e)})},this._getEditorManager=function(){return f},this.isRtl=function(){return"rtl"===h.rootWindow.getComputedStyle(h.rootElement).direction},this.isLtr=function(){return!h.isRtl()},this.getDirectionFactor=function(){return h.isLtr()?1:-1};const $=fc({handleEvent(){return h.isListening()},beforeKeyDown:e=>this.runHooks("beforeKeyDown",e),afterKeyDown:e=>{this.isDestroyed||h.runHooks("afterDocumentKeyDown",e)},ownerWindow:this.rootWindow});this.addHook("beforeOnCellMouseDown",e=>{!1===e.ctrlKey&&!1===e.metaKey&&$.releasePressedKeys()}),this.getShortcutManager=function(){return $},this.getFocusManager=function(){return R},Object(Z["b"])().forEach(e=>{const t=Object(Z["a"])(e);C.addItem(e,new t(this))}),Object(Rc["a"])(h),$.setActiveContextName("grid"),no["a"].getSingleton().run(h,"construct")}var bc=n("ef07"),wc=n("13e1");function Tc(e,t){const n=new Sc(e,t||{},Ui);return n.init(),n}Object(Xa["d"])(bc["a"]),Tc.editors={BaseEditor:wc["a"]},Tc.Core=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return new Sc(e,t,Ui)},Tc.DefaultSettings=Ja(),Tc.hooks=no["a"].getSingleton(),Tc.CellCoords=Mn["a"],Tc.CellRange=Sn["a"],Tc.packageName="handsontable",Tc.buildDate="17/10/2024 09:16:16",Tc.version="14.6.1",Tc.languages={dictionaryKeys:fo,getLanguageDictionary:Oo,getLanguagesDictionaries:Eo,registerLanguageDictionary:wo,getTranslatedPhrase:Co};t["a"]=Tc},c0e2:function(e,t){function n(){}n.prototype={on:function(e,t,n){var r=this.e||(this.e={});return(r[e]||(r[e]=[])).push({fn:t,ctx:n}),this},once:function(e,t,n){var r=this;function i(){r.off(e,i),t.apply(n,arguments)}return i._=t,this.on(e,i,n)},emit:function(e){var t=[].slice.call(arguments,1),n=((this.e||(this.e={}))[e]||[]).slice(),r=0,i=n.length;for(r;r<i;r++)n[r].fn.apply(n[r].ctx,t);return this},off:function(e,t){var n=this.e||(this.e={}),r=n[e],i=[];if(r&&t)for(var s=0,o=r.length;s<o;s++)r[s].fn!==t&&r[s].fn._!==t&&i.push(r[s]);return i.length?n[e]=i:delete n[e],this}},e.exports=n,e.exports.TinyEmitter=n},c109:function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
  298. //! moment.js locale configuration
  299. var t=e.defineLocale("tzm",{months:"ⵉⵏⵏⴰⵢⵔ_ⴱⵕⴰⵢⵕ_ⵎⴰⵕⵚ_ⵉⴱⵔⵉⵔ_ⵎⴰⵢⵢⵓ_ⵢⵓⵏⵢⵓ_ⵢⵓⵍⵢⵓⵣ_ⵖⵓⵛⵜ_ⵛⵓⵜⴰⵏⴱⵉⵔ_ⴽⵟⵓⴱⵕ_ⵏⵓⵡⴰⵏⴱⵉⵔ_ⴷⵓⵊⵏⴱⵉⵔ".split("_"),monthsShort:"ⵉⵏⵏⴰⵢⵔ_ⴱⵕⴰⵢⵕ_ⵎⴰⵕⵚ_ⵉⴱⵔⵉⵔ_ⵎⴰⵢⵢⵓ_ⵢⵓⵏⵢⵓ_ⵢⵓⵍⵢⵓⵣ_ⵖⵓⵛⵜ_ⵛⵓⵜⴰⵏⴱⵉⵔ_ⴽⵟⵓⴱⵕ_ⵏⵓⵡⴰⵏⴱⵉⵔ_ⴷⵓⵊⵏⴱⵉⵔ".split("_"),weekdays:"ⴰⵙⴰⵎⴰⵙ_ⴰⵢⵏⴰⵙ_ⴰⵙⵉⵏⴰⵙ_ⴰⴽⵔⴰⵙ_ⴰⴽⵡⴰⵙ_ⴰⵙⵉⵎⵡⴰⵙ_ⴰⵙⵉⴹⵢⴰⵙ".split("_"),weekdaysShort:"ⴰⵙⴰⵎⴰⵙ_ⴰⵢⵏⴰⵙ_ⴰⵙⵉⵏⴰⵙ_ⴰⴽⵔⴰⵙ_ⴰⴽⵡⴰⵙ_ⴰⵙⵉⵎⵡⴰⵙ_ⴰⵙⵉⴹⵢⴰⵙ".split("_"),weekdaysMin:"ⴰⵙⴰⵎⴰⵙ_ⴰⵢⵏⴰⵙ_ⴰⵙⵉⵏⴰⵙ_ⴰⴽⵔⴰⵙ_ⴰⴽⵡⴰⵙ_ⴰⵙⵉⵎⵡⴰⵙ_ⴰⵙⵉⴹⵢⴰⵙ".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[ⴰⵙⴷⵅ ⴴ] LT",nextDay:"[ⴰⵙⴽⴰ ⴴ] LT",nextWeek:"dddd [ⴴ] LT",lastDay:"[ⴰⵚⴰⵏⵜ ⴴ] LT",lastWeek:"dddd [ⴴ] LT",sameElse:"L"},relativeTime:{future:"ⴷⴰⴷⵅ ⵙ ⵢⴰⵏ %s",past:"ⵢⴰⵏ %s",s:"ⵉⵎⵉⴽ",ss:"%d ⵉⵎⵉⴽ",m:"ⵎⵉⵏⵓⴺ",mm:"%d ⵎⵉⵏⵓⴺ",h:"ⵙⴰⵄⴰ",hh:"%d ⵜⴰⵙⵙⴰⵄⵉⵏ",d:"ⴰⵙⵙ",dd:"%d oⵙⵙⴰⵏ",M:"ⴰⵢoⵓⵔ",MM:"%d ⵉⵢⵢⵉⵔⵏ",y:"ⴰⵙⴳⴰⵙ",yy:"%d ⵉⵙⴳⴰⵙⵏ"},week:{dow:6,doy:12}});return t}))},c1a1:function(e,t,n){"use strict";var r=n("23e7"),i=n("b4bc"),s=n("dad2");r({target:"Set",proto:!0,real:!0,forced:!s("isDisjointFrom")},{isDisjointFrom:i})},c1cf:function(e,t,n){"use strict";var r=n("e437");
  300. /**
  301. * @preserve
  302. * Authors: soakit, HChenZi
  303. * Last updated: Mar 09, 2023
  304. *
  305. * Description: Definition file for Chinese - China language-country.
  306. */const i=r["a"].languages.dictionaryKeys,s={languageCode:"zh-CN",[i.CONTEXTMENU_ITEMS_ROW_ABOVE]:"上方插入行",[i.CONTEXTMENU_ITEMS_ROW_BELOW]:"下方插入行",[i.CONTEXTMENU_ITEMS_INSERT_LEFT]:"左方插入列",[i.CONTEXTMENU_ITEMS_INSERT_RIGHT]:"右方插入列",[i.CONTEXTMENU_ITEMS_REMOVE_ROW]:["移除该行","移除多行"],[i.CONTEXTMENU_ITEMS_REMOVE_COLUMN]:["移除该列","移除多列"],[i.CONTEXTMENU_ITEMS_UNDO]:"撤销",[i.CONTEXTMENU_ITEMS_REDO]:"恢复",[i.CONTEXTMENU_ITEMS_READ_ONLY]:"只读",[i.CONTEXTMENU_ITEMS_CLEAR_COLUMN]:"清空该列",[i.CONTEXTMENU_ITEMS_ALIGNMENT]:"对齐",[i.CONTEXTMENU_ITEMS_ALIGNMENT_LEFT]:"左对齐",[i.CONTEXTMENU_ITEMS_ALIGNMENT_CENTER]:"水平居中",[i.CONTEXTMENU_ITEMS_ALIGNMENT_RIGHT]:"右对齐",[i.CONTEXTMENU_ITEMS_ALIGNMENT_JUSTIFY]:"两端对齐",[i.CONTEXTMENU_ITEMS_ALIGNMENT_TOP]:"顶端对齐",[i.CONTEXTMENU_ITEMS_ALIGNMENT_MIDDLE]:"垂直居中",[i.CONTEXTMENU_ITEMS_ALIGNMENT_BOTTOM]:"底端对齐",[i.CONTEXTMENU_ITEMS_FREEZE_COLUMN]:"冻结该列",[i.CONTEXTMENU_ITEMS_UNFREEZE_COLUMN]:"取消冻结",[i.CONTEXTMENU_ITEMS_BORDERS]:"边框",[i.CONTEXTMENU_ITEMS_BORDERS_TOP]:"上",[i.CONTEXTMENU_ITEMS_BORDERS_RIGHT]:"右",[i.CONTEXTMENU_ITEMS_BORDERS_BOTTOM]:"下",[i.CONTEXTMENU_ITEMS_BORDERS_LEFT]:"左",[i.CONTEXTMENU_ITEMS_REMOVE_BORDERS]:"移除边框",[i.CONTEXTMENU_ITEMS_ADD_COMMENT]:"插入批注",[i.CONTEXTMENU_ITEMS_EDIT_COMMENT]:"编辑批注",[i.CONTEXTMENU_ITEMS_REMOVE_COMMENT]:"删除批注",[i.CONTEXTMENU_ITEMS_READ_ONLY_COMMENT]:"只读批注",[i.CONTEXTMENU_ITEMS_MERGE_CELLS]:"合并",[i.CONTEXTMENU_ITEMS_UNMERGE_CELLS]:"取消合并",[i.CONTEXTMENU_ITEMS_COPY]:"复制",[i.CONTEXTMENU_ITEMS_COPY_WITH_COLUMN_HEADERS]:"带标题的复制",[i.CONTEXTMENU_ITEMS_COPY_WITH_COLUMN_GROUP_HEADERS]:"带标题组的复制",[i.CONTEXTMENU_ITEMS_COPY_COLUMN_HEADERS_ONLY]:"仅复制标题",[i.CONTEXTMENU_ITEMS_CUT]:"剪切",[i.CONTEXTMENU_ITEMS_NESTED_ROWS_INSERT_CHILD]:"插入子行",[i.CONTEXTMENU_ITEMS_NESTED_ROWS_DETACH_CHILD]:"与母行分离",[i.CONTEXTMENU_ITEMS_HIDE_COLUMN]:["隐藏该列","隐藏多列"],[i.CONTEXTMENU_ITEMS_SHOW_COLUMN]:["显示该列","显示多列"],[i.CONTEXTMENU_ITEMS_HIDE_ROW]:["隐藏该行","隐藏多行"],[i.CONTEXTMENU_ITEMS_SHOW_ROW]:["显示该行","显示多行"],[i.FILTERS_CONDITIONS_NONE]:"无",[i.FILTERS_CONDITIONS_EMPTY]:"为空",[i.FILTERS_CONDITIONS_NOT_EMPTY]:"不为空",[i.FILTERS_CONDITIONS_EQUAL]:"等于",[i.FILTERS_CONDITIONS_NOT_EQUAL]:"不等于",[i.FILTERS_CONDITIONS_BEGINS_WITH]:"开头是",[i.FILTERS_CONDITIONS_ENDS_WITH]:"结尾是",[i.FILTERS_CONDITIONS_CONTAINS]:"包含",[i.FILTERS_CONDITIONS_NOT_CONTAIN]:"不包含",[i.FILTERS_CONDITIONS_GREATER_THAN]:"大于",[i.FILTERS_CONDITIONS_GREATER_THAN_OR_EQUAL]:"大于或等于",[i.FILTERS_CONDITIONS_LESS_THAN]:"小于",[i.FILTERS_CONDITIONS_LESS_THAN_OR_EQUAL]:"小于或等于",[i.FILTERS_CONDITIONS_BETWEEN]:"在此范围",[i.FILTERS_CONDITIONS_NOT_BETWEEN]:"不在此范围",[i.FILTERS_CONDITIONS_AFTER]:"之后",[i.FILTERS_CONDITIONS_BEFORE]:"之前",[i.FILTERS_CONDITIONS_TODAY]:"今天",[i.FILTERS_CONDITIONS_TOMORROW]:"明天",[i.FILTERS_CONDITIONS_YESTERDAY]:"昨天",[i.FILTERS_VALUES_BLANK_CELLS]:"空白单元格",[i.FILTERS_DIVS_FILTER_BY_CONDITION]:"按条件过滤",[i.FILTERS_DIVS_FILTER_BY_VALUE]:"按值过滤",[i.FILTERS_LABELS_CONJUNCTION]:"且",[i.FILTERS_LABELS_DISJUNCTION]:"或",[i.FILTERS_BUTTONS_SELECT_ALL]:"全选",[i.FILTERS_BUTTONS_CLEAR]:"清除",[i.FILTERS_BUTTONS_OK]:"确认",[i.FILTERS_BUTTONS_CANCEL]:"取消",[i.FILTERS_BUTTONS_PLACEHOLDER_SEARCH]:"搜索",[i.FILTERS_BUTTONS_PLACEHOLDER_VALUE]:"值",[i.FILTERS_BUTTONS_PLACEHOLDER_SECOND_VALUE]:"第二值"};r["a"].languages.registerLanguageDictionary(s)},c1df:function(e,t,n){(function(e){var t;//! moment.js
  307. //! version : 2.30.1
  308. //! authors : Tim Wood, Iskren Chernev, Moment.js contributors
  309. //! license : MIT
  310. //! momentjs.com
  311. (function(t,n){e.exports=n()})(0,(function(){"use strict";var r,i;function s(){return r.apply(null,arguments)}function o(e){r=e}function a(e){return e instanceof Array||"[object Array]"===Object.prototype.toString.call(e)}function l(e){return null!=e&&"[object Object]"===Object.prototype.toString.call(e)}function c(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function u(e){if(Object.getOwnPropertyNames)return 0===Object.getOwnPropertyNames(e).length;var t;for(t in e)if(c(e,t))return!1;return!0}function h(e){return void 0===e}function d(e){return"number"===typeof e||"[object Number]"===Object.prototype.toString.call(e)}function m(e){return e instanceof Date||"[object Date]"===Object.prototype.toString.call(e)}function g(e,t){var n,r=[],i=e.length;for(n=0;n<i;++n)r.push(t(e[n],n));return r}function p(e,t){for(var n in t)c(t,n)&&(e[n]=t[n]);return c(t,"toString")&&(e.toString=t.toString),c(t,"valueOf")&&(e.valueOf=t.valueOf),e}function f(e,t,n,r){return Jn(e,t,n,r,!0).utc()}function R(){return{empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidEra:null,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1,parsedDateParts:[],era:null,meridiem:null,rfc2822:!1,weekdayMismatch:!1}}function y(e){return null==e._pf&&(e._pf=R()),e._pf}function M(e){var t=null,n=!1,r=e._d&&!isNaN(e._d.getTime());return r&&(t=y(e),n=i.call(t.parsedDateParts,(function(e){return null!=e})),r=t.overflow<0&&!t.empty&&!t.invalidEra&&!t.invalidMonth&&!t.invalidWeekday&&!t.weekdayMismatch&&!t.nullInput&&!t.invalidFormat&&!t.userInvalidated&&(!t.meridiem||t.meridiem&&n),e._strict&&(r=r&&0===t.charsLeftOver&&0===t.unusedTokens.length&&void 0===t.bigHour)),null!=Object.isFrozen&&Object.isFrozen(e)?r:(e._isValid=r,e._isValid)}function S(e){var t=f(NaN);return null!=e?p(y(t),e):y(t).userInvalidated=!0,t}i=Array.prototype.some?Array.prototype.some:function(e){var t,n=Object(this),r=n.length>>>0;for(t=0;t<r;t++)if(t in n&&e.call(this,n[t],t,n))return!0;return!1};var b=s.momentProperties=[],w=!1;function T(e,t){var n,r,i,s=b.length;if(h(t._isAMomentObject)||(e._isAMomentObject=t._isAMomentObject),h(t._i)||(e._i=t._i),h(t._f)||(e._f=t._f),h(t._l)||(e._l=t._l),h(t._strict)||(e._strict=t._strict),h(t._tzm)||(e._tzm=t._tzm),h(t._isUTC)||(e._isUTC=t._isUTC),h(t._offset)||(e._offset=t._offset),h(t._pf)||(e._pf=y(t)),h(t._locale)||(e._locale=t._locale),s>0)for(n=0;n<s;n++)r=b[n],i=t[r],h(i)||(e[r]=i);return e}function O(e){T(this,e),this._d=new Date(null!=e._d?e._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),!1===w&&(w=!0,s.updateOffset(this),w=!1)}function v(e){return e instanceof O||null!=e&&null!=e._isAMomentObject}function E(e){!1===s.suppressDeprecationWarnings&&"undefined"!==typeof console&&console.warn&&console.warn("Deprecation warning: "+e)}function C(e,t){var n=!0;return p((function(){if(null!=s.deprecationHandler&&s.deprecationHandler(null,e),n){var r,i,o,a=[],l=arguments.length;for(i=0;i<l;i++){if(r="","object"===typeof arguments[i]){for(o in r+="\n["+i+"] ",arguments[0])c(arguments[0],o)&&(r+=o+": "+arguments[0][o]+", ");r=r.slice(0,-2)}else r=arguments[i];a.push(r)}E(e+"\nArguments: "+Array.prototype.slice.call(a).join("")+"\n"+(new Error).stack),n=!1}return t.apply(this,arguments)}),t)}var L,N={};function _(e,t){null!=s.deprecationHandler&&s.deprecationHandler(e,t),N[e]||(E(t),N[e]=!0)}function I(e){return"undefined"!==typeof Function&&e instanceof Function||"[object Function]"===Object.prototype.toString.call(e)}function P(e){var t,n;for(n in e)c(e,n)&&(t=e[n],I(t)?this[n]=t:this["_"+n]=t);this._config=e,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)}function x(e,t){var n,r=p({},e);for(n in t)c(t,n)&&(l(e[n])&&l(t[n])?(r[n]={},p(r[n],e[n]),p(r[n],t[n])):null!=t[n]?r[n]=t[n]:delete r[n]);for(n in e)c(e,n)&&!c(t,n)&&l(e[n])&&(r[n]=p({},r[n]));return r}function D(e){null!=e&&this.set(e)}s.suppressDeprecationWarnings=!1,s.deprecationHandler=null,L=Object.keys?Object.keys:function(e){var t,n=[];for(t in e)c(e,t)&&n.push(t);return n};var A={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"};function F(e,t,n){var r=this._calendar[e]||this._calendar["sameElse"];return I(r)?r.call(t,n):r}function Y(e,t,n){var r=""+Math.abs(e),i=t-r.length,s=e>=0;return(s?n?"+":"":"-")+Math.pow(10,Math.max(0,i)).toString().substr(1)+r}var H=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,k=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,V={},U={};function W(e,t,n,r){var i=r;"string"===typeof r&&(i=function(){return this[r]()}),e&&(U[e]=i),t&&(U[t[0]]=function(){return Y(i.apply(this,arguments),t[1],t[2])}),n&&(U[n]=function(){return this.localeData().ordinal(i.apply(this,arguments),e)})}function X(e){return e.match(/\[[\s\S]/)?e.replace(/^\[|\]$/g,""):e.replace(/\\/g,"")}function j(e){var t,n,r=e.match(H);for(t=0,n=r.length;t<n;t++)U[r[t]]?r[t]=U[r[t]]:r[t]=X(r[t]);return function(t){var i,s="";for(i=0;i<n;i++)s+=I(r[i])?r[i].call(t,e):r[i];return s}}function Z(e,t){return e.isValid()?(t=Q(t,e.localeData()),V[t]=V[t]||j(t),V[t](e)):e.localeData().invalidDate()}function Q(e,t){var n=5;function r(e){return t.longDateFormat(e)||e}k.lastIndex=0;while(n>=0&&k.test(e))e=e.replace(k,r),k.lastIndex=0,n-=1;return e}var K={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};function G(e){var t=this._longDateFormat[e],n=this._longDateFormat[e.toUpperCase()];return t||!n?t:(this._longDateFormat[e]=n.match(H).map((function(e){return"MMMM"===e||"MM"===e||"DD"===e||"dddd"===e?e.slice(1):e})).join(""),this._longDateFormat[e])}var B="Invalid date";function J(){return this._invalidDate}var z="%d",$=/\d{1,2}/;function q(e){return this._ordinal.replace("%d",e)}var ee={future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function te(e,t,n,r){var i=this._relativeTime[n];return I(i)?i(e,t,n,r):i.replace(/%d/i,e)}function ne(e,t){var n=this._relativeTime[e>0?"future":"past"];return I(n)?n(t):n.replace(/%s/i,t)}var re={D:"date",dates:"date",date:"date",d:"day",days:"day",day:"day",e:"weekday",weekdays:"weekday",weekday:"weekday",E:"isoWeekday",isoweekdays:"isoWeekday",isoweekday:"isoWeekday",DDD:"dayOfYear",dayofyears:"dayOfYear",dayofyear:"dayOfYear",h:"hour",hours:"hour",hour:"hour",ms:"millisecond",milliseconds:"millisecond",millisecond:"millisecond",m:"minute",minutes:"minute",minute:"minute",M:"month",months:"month",month:"month",Q:"quarter",quarters:"quarter",quarter:"quarter",s:"second",seconds:"second",second:"second",gg:"weekYear",weekyears:"weekYear",weekyear:"weekYear",GG:"isoWeekYear",isoweekyears:"isoWeekYear",isoweekyear:"isoWeekYear",w:"week",weeks:"week",week:"week",W:"isoWeek",isoweeks:"isoWeek",isoweek:"isoWeek",y:"year",years:"year",year:"year"};function ie(e){return"string"===typeof e?re[e]||re[e.toLowerCase()]:void 0}function se(e){var t,n,r={};for(n in e)c(e,n)&&(t=ie(n),t&&(r[t]=e[n]));return r}var oe={date:9,day:11,weekday:11,isoWeekday:11,dayOfYear:4,hour:13,millisecond:16,minute:14,month:8,quarter:7,second:15,weekYear:1,isoWeekYear:1,week:5,isoWeek:5,year:1};function ae(e){var t,n=[];for(t in e)c(e,t)&&n.push({unit:t,priority:oe[t]});return n.sort((function(e,t){return e.priority-t.priority})),n}var le,ce=/\d/,ue=/\d\d/,he=/\d{3}/,de=/\d{4}/,me=/[+-]?\d{6}/,ge=/\d\d?/,pe=/\d\d\d\d?/,fe=/\d\d\d\d\d\d?/,Re=/\d{1,3}/,ye=/\d{1,4}/,Me=/[+-]?\d{1,6}/,Se=/\d+/,be=/[+-]?\d+/,we=/Z|[+-]\d\d:?\d\d/gi,Te=/Z|[+-]\d\d(?::?\d\d)?/gi,Oe=/[+-]?\d+(\.\d{1,3})?/,ve=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i,Ee=/^[1-9]\d?/,Ce=/^([1-9]\d|\d)/;function Le(e,t,n){le[e]=I(t)?t:function(e,r){return e&&n?n:t}}function Ne(e,t){return c(le,e)?le[e](t._strict,t._locale):new RegExp(_e(e))}function _e(e){return Ie(e.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,(function(e,t,n,r,i){return t||n||r||i})))}function Ie(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function Pe(e){return e<0?Math.ceil(e)||0:Math.floor(e)}function xe(e){var t=+e,n=0;return 0!==t&&isFinite(t)&&(n=Pe(t)),n}le={};var De={};function Ae(e,t){var n,r,i=t;for("string"===typeof e&&(e=[e]),d(t)&&(i=function(e,n){n[t]=xe(e)}),r=e.length,n=0;n<r;n++)De[e[n]]=i}function Fe(e,t){Ae(e,(function(e,n,r,i){r._w=r._w||{},t(e,r._w,r,i)}))}function Ye(e,t,n){null!=t&&c(De,e)&&De[e](t,n._a,n,e)}function He(e){return e%4===0&&e%100!==0||e%400===0}var ke=0,Ve=1,Ue=2,We=3,Xe=4,je=5,Ze=6,Qe=7,Ke=8;function Ge(e){return He(e)?366:365}W("Y",0,0,(function(){var e=this.year();return e<=9999?Y(e,4):"+"+e})),W(0,["YY",2],0,(function(){return this.year()%100})),W(0,["YYYY",4],0,"year"),W(0,["YYYYY",5],0,"year"),W(0,["YYYYYY",6,!0],0,"year"),Le("Y",be),Le("YY",ge,ue),Le("YYYY",ye,de),Le("YYYYY",Me,me),Le("YYYYYY",Me,me),Ae(["YYYYY","YYYYYY"],ke),Ae("YYYY",(function(e,t){t[ke]=2===e.length?s.parseTwoDigitYear(e):xe(e)})),Ae("YY",(function(e,t){t[ke]=s.parseTwoDigitYear(e)})),Ae("Y",(function(e,t){t[ke]=parseInt(e,10)})),s.parseTwoDigitYear=function(e){return xe(e)+(xe(e)>68?1900:2e3)};var Be,Je=$e("FullYear",!0);function ze(){return He(this.year())}function $e(e,t){return function(n){return null!=n?(et(this,e,n),s.updateOffset(this,t),this):qe(this,e)}}function qe(e,t){if(!e.isValid())return NaN;var n=e._d,r=e._isUTC;switch(t){case"Milliseconds":return r?n.getUTCMilliseconds():n.getMilliseconds();case"Seconds":return r?n.getUTCSeconds():n.getSeconds();case"Minutes":return r?n.getUTCMinutes():n.getMinutes();case"Hours":return r?n.getUTCHours():n.getHours();case"Date":return r?n.getUTCDate():n.getDate();case"Day":return r?n.getUTCDay():n.getDay();case"Month":return r?n.getUTCMonth():n.getMonth();case"FullYear":return r?n.getUTCFullYear():n.getFullYear();default:return NaN}}function et(e,t,n){var r,i,s,o,a;if(e.isValid()&&!isNaN(n)){switch(r=e._d,i=e._isUTC,t){case"Milliseconds":return void(i?r.setUTCMilliseconds(n):r.setMilliseconds(n));case"Seconds":return void(i?r.setUTCSeconds(n):r.setSeconds(n));case"Minutes":return void(i?r.setUTCMinutes(n):r.setMinutes(n));case"Hours":return void(i?r.setUTCHours(n):r.setHours(n));case"Date":return void(i?r.setUTCDate(n):r.setDate(n));case"FullYear":break;default:return}s=n,o=e.month(),a=e.date(),a=29!==a||1!==o||He(s)?a:28,i?r.setUTCFullYear(s,o,a):r.setFullYear(s,o,a)}}function tt(e){return e=ie(e),I(this[e])?this[e]():this}function nt(e,t){if("object"===typeof e){e=se(e);var n,r=ae(e),i=r.length;for(n=0;n<i;n++)this[r[n].unit](e[r[n].unit])}else if(e=ie(e),I(this[e]))return this[e](t);return this}function rt(e,t){return(e%t+t)%t}function it(e,t){if(isNaN(e)||isNaN(t))return NaN;var n=rt(t,12);return e+=(t-n)/12,1===n?He(e)?29:28:31-n%7%2}Be=Array.prototype.indexOf?Array.prototype.indexOf:function(e){var t;for(t=0;t<this.length;++t)if(this[t]===e)return t;return-1},W("M",["MM",2],"Mo",(function(){return this.month()+1})),W("MMM",0,0,(function(e){return this.localeData().monthsShort(this,e)})),W("MMMM",0,0,(function(e){return this.localeData().months(this,e)})),Le("M",ge,Ee),Le("MM",ge,ue),Le("MMM",(function(e,t){return t.monthsShortRegex(e)})),Le("MMMM",(function(e,t){return t.monthsRegex(e)})),Ae(["M","MM"],(function(e,t){t[Ve]=xe(e)-1})),Ae(["MMM","MMMM"],(function(e,t,n,r){var i=n._locale.monthsParse(e,r,n._strict);null!=i?t[Ve]=i:y(n).invalidMonth=e}));var st="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ot="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),at=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,lt=ve,ct=ve;function ut(e,t){return e?a(this._months)?this._months[e.month()]:this._months[(this._months.isFormat||at).test(t)?"format":"standalone"][e.month()]:a(this._months)?this._months:this._months["standalone"]}function ht(e,t){return e?a(this._monthsShort)?this._monthsShort[e.month()]:this._monthsShort[at.test(t)?"format":"standalone"][e.month()]:a(this._monthsShort)?this._monthsShort:this._monthsShort["standalone"]}function dt(e,t,n){var r,i,s,o=e.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],r=0;r<12;++r)s=f([2e3,r]),this._shortMonthsParse[r]=this.monthsShort(s,"").toLocaleLowerCase(),this._longMonthsParse[r]=this.months(s,"").toLocaleLowerCase();return n?"MMM"===t?(i=Be.call(this._shortMonthsParse,o),-1!==i?i:null):(i=Be.call(this._longMonthsParse,o),-1!==i?i:null):"MMM"===t?(i=Be.call(this._shortMonthsParse,o),-1!==i?i:(i=Be.call(this._longMonthsParse,o),-1!==i?i:null)):(i=Be.call(this._longMonthsParse,o),-1!==i?i:(i=Be.call(this._shortMonthsParse,o),-1!==i?i:null))}function mt(e,t,n){var r,i,s;if(this._monthsParseExact)return dt.call(this,e,t,n);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),r=0;r<12;r++){if(i=f([2e3,r]),n&&!this._longMonthsParse[r]&&(this._longMonthsParse[r]=new RegExp("^"+this.months(i,"").replace(".","")+"$","i"),this._shortMonthsParse[r]=new RegExp("^"+this.monthsShort(i,"").replace(".","")+"$","i")),n||this._monthsParse[r]||(s="^"+this.months(i,"")+"|^"+this.monthsShort(i,""),this._monthsParse[r]=new RegExp(s.replace(".",""),"i")),n&&"MMMM"===t&&this._longMonthsParse[r].test(e))return r;if(n&&"MMM"===t&&this._shortMonthsParse[r].test(e))return r;if(!n&&this._monthsParse[r].test(e))return r}}function gt(e,t){if(!e.isValid())return e;if("string"===typeof t)if(/^\d+$/.test(t))t=xe(t);else if(t=e.localeData().monthsParse(t),!d(t))return e;var n=t,r=e.date();return r=r<29?r:Math.min(r,it(e.year(),n)),e._isUTC?e._d.setUTCMonth(n,r):e._d.setMonth(n,r),e}function pt(e){return null!=e?(gt(this,e),s.updateOffset(this,!0),this):qe(this,"Month")}function ft(){return it(this.year(),this.month())}function Rt(e){return this._monthsParseExact?(c(this,"_monthsRegex")||Mt.call(this),e?this._monthsShortStrictRegex:this._monthsShortRegex):(c(this,"_monthsShortRegex")||(this._monthsShortRegex=lt),this._monthsShortStrictRegex&&e?this._monthsShortStrictRegex:this._monthsShortRegex)}function yt(e){return this._monthsParseExact?(c(this,"_monthsRegex")||Mt.call(this),e?this._monthsStrictRegex:this._monthsRegex):(c(this,"_monthsRegex")||(this._monthsRegex=ct),this._monthsStrictRegex&&e?this._monthsStrictRegex:this._monthsRegex)}function Mt(){function e(e,t){return t.length-e.length}var t,n,r,i,s=[],o=[],a=[];for(t=0;t<12;t++)n=f([2e3,t]),r=Ie(this.monthsShort(n,"")),i=Ie(this.months(n,"")),s.push(r),o.push(i),a.push(i),a.push(r);s.sort(e),o.sort(e),a.sort(e),this._monthsRegex=new RegExp("^("+a.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+o.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+s.join("|")+")","i")}function St(e,t,n,r,i,s,o){var a;return e<100&&e>=0?(a=new Date(e+400,t,n,r,i,s,o),isFinite(a.getFullYear())&&a.setFullYear(e)):a=new Date(e,t,n,r,i,s,o),a}function bt(e){var t,n;return e<100&&e>=0?(n=Array.prototype.slice.call(arguments),n[0]=e+400,t=new Date(Date.UTC.apply(null,n)),isFinite(t.getUTCFullYear())&&t.setUTCFullYear(e)):t=new Date(Date.UTC.apply(null,arguments)),t}function wt(e,t,n){var r=7+t-n,i=(7+bt(e,0,r).getUTCDay()-t)%7;return-i+r-1}function Tt(e,t,n,r,i){var s,o,a=(7+n-r)%7,l=wt(e,r,i),c=1+7*(t-1)+a+l;return c<=0?(s=e-1,o=Ge(s)+c):c>Ge(e)?(s=e+1,o=c-Ge(e)):(s=e,o=c),{year:s,dayOfYear:o}}function Ot(e,t,n){var r,i,s=wt(e.year(),t,n),o=Math.floor((e.dayOfYear()-s-1)/7)+1;return o<1?(i=e.year()-1,r=o+vt(i,t,n)):o>vt(e.year(),t,n)?(r=o-vt(e.year(),t,n),i=e.year()+1):(i=e.year(),r=o),{week:r,year:i}}function vt(e,t,n){var r=wt(e,t,n),i=wt(e+1,t,n);return(Ge(e)-r+i)/7}function Et(e){return Ot(e,this._week.dow,this._week.doy).week}W("w",["ww",2],"wo","week"),W("W",["WW",2],"Wo","isoWeek"),Le("w",ge,Ee),Le("ww",ge,ue),Le("W",ge,Ee),Le("WW",ge,ue),Fe(["w","ww","W","WW"],(function(e,t,n,r){t[r.substr(0,1)]=xe(e)}));var Ct={dow:0,doy:6};function Lt(){return this._week.dow}function Nt(){return this._week.doy}function _t(e){var t=this.localeData().week(this);return null==e?t:this.add(7*(e-t),"d")}function It(e){var t=Ot(this,1,4).week;return null==e?t:this.add(7*(e-t),"d")}function Pt(e,t){return"string"!==typeof e?e:isNaN(e)?(e=t.weekdaysParse(e),"number"===typeof e?e:null):parseInt(e,10)}function xt(e,t){return"string"===typeof e?t.weekdaysParse(e)%7||7:isNaN(e)?null:e}function Dt(e,t){return e.slice(t,7).concat(e.slice(0,t))}W("d",0,"do","day"),W("dd",0,0,(function(e){return this.localeData().weekdaysMin(this,e)})),W("ddd",0,0,(function(e){return this.localeData().weekdaysShort(this,e)})),W("dddd",0,0,(function(e){return this.localeData().weekdays(this,e)})),W("e",0,0,"weekday"),W("E",0,0,"isoWeekday"),Le("d",ge),Le("e",ge),Le("E",ge),Le("dd",(function(e,t){return t.weekdaysMinRegex(e)})),Le("ddd",(function(e,t){return t.weekdaysShortRegex(e)})),Le("dddd",(function(e,t){return t.weekdaysRegex(e)})),Fe(["dd","ddd","dddd"],(function(e,t,n,r){var i=n._locale.weekdaysParse(e,r,n._strict);null!=i?t.d=i:y(n).invalidWeekday=e})),Fe(["d","e","E"],(function(e,t,n,r){t[r]=xe(e)}));var At="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),Ft="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),Yt="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),Ht=ve,kt=ve,Vt=ve;function Ut(e,t){var n=a(this._weekdays)?this._weekdays:this._weekdays[e&&!0!==e&&this._weekdays.isFormat.test(t)?"format":"standalone"];return!0===e?Dt(n,this._week.dow):e?n[e.day()]:n}function Wt(e){return!0===e?Dt(this._weekdaysShort,this._week.dow):e?this._weekdaysShort[e.day()]:this._weekdaysShort}function Xt(e){return!0===e?Dt(this._weekdaysMin,this._week.dow):e?this._weekdaysMin[e.day()]:this._weekdaysMin}function jt(e,t,n){var r,i,s,o=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],r=0;r<7;++r)s=f([2e3,1]).day(r),this._minWeekdaysParse[r]=this.weekdaysMin(s,"").toLocaleLowerCase(),this._shortWeekdaysParse[r]=this.weekdaysShort(s,"").toLocaleLowerCase(),this._weekdaysParse[r]=this.weekdays(s,"").toLocaleLowerCase();return n?"dddd"===t?(i=Be.call(this._weekdaysParse,o),-1!==i?i:null):"ddd"===t?(i=Be.call(this._shortWeekdaysParse,o),-1!==i?i:null):(i=Be.call(this._minWeekdaysParse,o),-1!==i?i:null):"dddd"===t?(i=Be.call(this._weekdaysParse,o),-1!==i?i:(i=Be.call(this._shortWeekdaysParse,o),-1!==i?i:(i=Be.call(this._minWeekdaysParse,o),-1!==i?i:null))):"ddd"===t?(i=Be.call(this._shortWeekdaysParse,o),-1!==i?i:(i=Be.call(this._weekdaysParse,o),-1!==i?i:(i=Be.call(this._minWeekdaysParse,o),-1!==i?i:null))):(i=Be.call(this._minWeekdaysParse,o),-1!==i?i:(i=Be.call(this._weekdaysParse,o),-1!==i?i:(i=Be.call(this._shortWeekdaysParse,o),-1!==i?i:null)))}function Zt(e,t,n){var r,i,s;if(this._weekdaysParseExact)return jt.call(this,e,t,n);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),r=0;r<7;r++){if(i=f([2e3,1]).day(r),n&&!this._fullWeekdaysParse[r]&&(this._fullWeekdaysParse[r]=new RegExp("^"+this.weekdays(i,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[r]=new RegExp("^"+this.weekdaysShort(i,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[r]=new RegExp("^"+this.weekdaysMin(i,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[r]||(s="^"+this.weekdays(i,"")+"|^"+this.weekdaysShort(i,"")+"|^"+this.weekdaysMin(i,""),this._weekdaysParse[r]=new RegExp(s.replace(".",""),"i")),n&&"dddd"===t&&this._fullWeekdaysParse[r].test(e))return r;if(n&&"ddd"===t&&this._shortWeekdaysParse[r].test(e))return r;if(n&&"dd"===t&&this._minWeekdaysParse[r].test(e))return r;if(!n&&this._weekdaysParse[r].test(e))return r}}function Qt(e){if(!this.isValid())return null!=e?this:NaN;var t=qe(this,"Day");return null!=e?(e=Pt(e,this.localeData()),this.add(e-t,"d")):t}function Kt(e){if(!this.isValid())return null!=e?this:NaN;var t=(this.day()+7-this.localeData()._week.dow)%7;return null==e?t:this.add(e-t,"d")}function Gt(e){if(!this.isValid())return null!=e?this:NaN;if(null!=e){var t=xt(e,this.localeData());return this.day(this.day()%7?t:t-7)}return this.day()||7}function Bt(e){return this._weekdaysParseExact?(c(this,"_weekdaysRegex")||$t.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(c(this,"_weekdaysRegex")||(this._weekdaysRegex=Ht),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)}function Jt(e){return this._weekdaysParseExact?(c(this,"_weekdaysRegex")||$t.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(c(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=kt),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function zt(e){return this._weekdaysParseExact?(c(this,"_weekdaysRegex")||$t.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(c(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=Vt),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function $t(){function e(e,t){return t.length-e.length}var t,n,r,i,s,o=[],a=[],l=[],c=[];for(t=0;t<7;t++)n=f([2e3,1]).day(t),r=Ie(this.weekdaysMin(n,"")),i=Ie(this.weekdaysShort(n,"")),s=Ie(this.weekdays(n,"")),o.push(r),a.push(i),l.push(s),c.push(r),c.push(i),c.push(s);o.sort(e),a.sort(e),l.sort(e),c.sort(e),this._weekdaysRegex=new RegExp("^("+c.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+l.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+a.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+o.join("|")+")","i")}function qt(){return this.hours()%12||12}function en(){return this.hours()||24}function tn(e,t){W(e,0,0,(function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)}))}function nn(e,t){return t._meridiemParse}function rn(e){return"p"===(e+"").toLowerCase().charAt(0)}W("H",["HH",2],0,"hour"),W("h",["hh",2],0,qt),W("k",["kk",2],0,en),W("hmm",0,0,(function(){return""+qt.apply(this)+Y(this.minutes(),2)})),W("hmmss",0,0,(function(){return""+qt.apply(this)+Y(this.minutes(),2)+Y(this.seconds(),2)})),W("Hmm",0,0,(function(){return""+this.hours()+Y(this.minutes(),2)})),W("Hmmss",0,0,(function(){return""+this.hours()+Y(this.minutes(),2)+Y(this.seconds(),2)})),tn("a",!0),tn("A",!1),Le("a",nn),Le("A",nn),Le("H",ge,Ce),Le("h",ge,Ee),Le("k",ge,Ee),Le("HH",ge,ue),Le("hh",ge,ue),Le("kk",ge,ue),Le("hmm",pe),Le("hmmss",fe),Le("Hmm",pe),Le("Hmmss",fe),Ae(["H","HH"],We),Ae(["k","kk"],(function(e,t,n){var r=xe(e);t[We]=24===r?0:r})),Ae(["a","A"],(function(e,t,n){n._isPm=n._locale.isPM(e),n._meridiem=e})),Ae(["h","hh"],(function(e,t,n){t[We]=xe(e),y(n).bigHour=!0})),Ae("hmm",(function(e,t,n){var r=e.length-2;t[We]=xe(e.substr(0,r)),t[Xe]=xe(e.substr(r)),y(n).bigHour=!0})),Ae("hmmss",(function(e,t,n){var r=e.length-4,i=e.length-2;t[We]=xe(e.substr(0,r)),t[Xe]=xe(e.substr(r,2)),t[je]=xe(e.substr(i)),y(n).bigHour=!0})),Ae("Hmm",(function(e,t,n){var r=e.length-2;t[We]=xe(e.substr(0,r)),t[Xe]=xe(e.substr(r))})),Ae("Hmmss",(function(e,t,n){var r=e.length-4,i=e.length-2;t[We]=xe(e.substr(0,r)),t[Xe]=xe(e.substr(r,2)),t[je]=xe(e.substr(i))}));var sn=/[ap]\.?m?\.?/i,on=$e("Hours",!0);function an(e,t,n){return e>11?n?"pm":"PM":n?"am":"AM"}var ln,cn={calendar:A,longDateFormat:K,invalidDate:B,ordinal:z,dayOfMonthOrdinalParse:$,relativeTime:ee,months:st,monthsShort:ot,week:Ct,weekdays:At,weekdaysMin:Yt,weekdaysShort:Ft,meridiemParse:sn},un={},hn={};function dn(e,t){var n,r=Math.min(e.length,t.length);for(n=0;n<r;n+=1)if(e[n]!==t[n])return n;return r}function mn(e){return e?e.toLowerCase().replace("_","-"):e}function gn(e){var t,n,r,i,s=0;while(s<e.length){i=mn(e[s]).split("-"),t=i.length,n=mn(e[s+1]),n=n?n.split("-"):null;while(t>0){if(r=fn(i.slice(0,t).join("-")),r)return r;if(n&&n.length>=t&&dn(i,n)>=t-1)break;t--}s++}return ln}function pn(e){return!(!e||!e.match("^[^/\\\\]*$"))}function fn(r){var i=null;if(void 0===un[r]&&"undefined"!==typeof e&&e&&e.exports&&pn(r))try{i=ln._abbr,t,n("4678")("./"+r),Rn(i)}catch(s){un[r]=null}return un[r]}function Rn(e,t){var n;return e&&(n=h(t)?Sn(e):yn(e,t),n?ln=n:"undefined"!==typeof console&&console.warn&&console.warn("Locale "+e+" not found. Did you forget to load it?")),ln._abbr}function yn(e,t){if(null!==t){var n,r=cn;if(t.abbr=e,null!=un[e])_("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),r=un[e]._config;else if(null!=t.parentLocale)if(null!=un[t.parentLocale])r=un[t.parentLocale]._config;else{if(n=fn(t.parentLocale),null==n)return hn[t.parentLocale]||(hn[t.parentLocale]=[]),hn[t.parentLocale].push({name:e,config:t}),null;r=n._config}return un[e]=new D(x(r,t)),hn[e]&&hn[e].forEach((function(e){yn(e.name,e.config)})),Rn(e),un[e]}return delete un[e],null}function Mn(e,t){if(null!=t){var n,r,i=cn;null!=un[e]&&null!=un[e].parentLocale?un[e].set(x(un[e]._config,t)):(r=fn(e),null!=r&&(i=r._config),t=x(i,t),null==r&&(t.abbr=e),n=new D(t),n.parentLocale=un[e],un[e]=n),Rn(e)}else null!=un[e]&&(null!=un[e].parentLocale?(un[e]=un[e].parentLocale,e===Rn()&&Rn(e)):null!=un[e]&&delete un[e]);return un[e]}function Sn(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return ln;if(!a(e)){if(t=fn(e),t)return t;e=[e]}return gn(e)}function bn(){return L(un)}function wn(e){var t,n=e._a;return n&&-2===y(e).overflow&&(t=n[Ve]<0||n[Ve]>11?Ve:n[Ue]<1||n[Ue]>it(n[ke],n[Ve])?Ue:n[We]<0||n[We]>24||24===n[We]&&(0!==n[Xe]||0!==n[je]||0!==n[Ze])?We:n[Xe]<0||n[Xe]>59?Xe:n[je]<0||n[je]>59?je:n[Ze]<0||n[Ze]>999?Ze:-1,y(e)._overflowDayOfYear&&(t<ke||t>Ue)&&(t=Ue),y(e)._overflowWeeks&&-1===t&&(t=Qe),y(e)._overflowWeekday&&-1===t&&(t=Ke),y(e).overflow=t),e}var Tn=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,On=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,vn=/Z|[+-]\d\d(?::?\d\d)?/,En=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/],["YYYYMM",/\d{6}/,!1],["YYYY",/\d{4}/,!1]],Cn=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],Ln=/^\/?Date\((-?\d+)/i,Nn=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,_n={UT:0,GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function In(e){var t,n,r,i,s,o,a=e._i,l=Tn.exec(a)||On.exec(a),c=En.length,u=Cn.length;if(l){for(y(e).iso=!0,t=0,n=c;t<n;t++)if(En[t][1].exec(l[1])){i=En[t][0],r=!1!==En[t][2];break}if(null==i)return void(e._isValid=!1);if(l[3]){for(t=0,n=u;t<n;t++)if(Cn[t][1].exec(l[3])){s=(l[2]||" ")+Cn[t][0];break}if(null==s)return void(e._isValid=!1)}if(!r&&null!=s)return void(e._isValid=!1);if(l[4]){if(!vn.exec(l[4]))return void(e._isValid=!1);o="Z"}e._f=i+(s||"")+(o||""),Xn(e)}else e._isValid=!1}function Pn(e,t,n,r,i,s){var o=[xn(e),ot.indexOf(t),parseInt(n,10),parseInt(r,10),parseInt(i,10)];return s&&o.push(parseInt(s,10)),o}function xn(e){var t=parseInt(e,10);return t<=49?2e3+t:t<=999?1900+t:t}function Dn(e){return e.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,"")}function An(e,t,n){if(e){var r=Ft.indexOf(e),i=new Date(t[0],t[1],t[2]).getDay();if(r!==i)return y(n).weekdayMismatch=!0,n._isValid=!1,!1}return!0}function Fn(e,t,n){if(e)return _n[e];if(t)return 0;var r=parseInt(n,10),i=r%100,s=(r-i)/100;return 60*s+i}function Yn(e){var t,n=Nn.exec(Dn(e._i));if(n){if(t=Pn(n[4],n[3],n[2],n[5],n[6],n[7]),!An(n[1],t,e))return;e._a=t,e._tzm=Fn(n[8],n[9],n[10]),e._d=bt.apply(null,e._a),e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),y(e).rfc2822=!0}else e._isValid=!1}function Hn(e){var t=Ln.exec(e._i);null===t?(In(e),!1===e._isValid&&(delete e._isValid,Yn(e),!1===e._isValid&&(delete e._isValid,e._strict?e._isValid=!1:s.createFromInputFallback(e)))):e._d=new Date(+t[1])}function kn(e,t,n){return null!=e?e:null!=t?t:n}function Vn(e){var t=new Date(s.now());return e._useUTC?[t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()]:[t.getFullYear(),t.getMonth(),t.getDate()]}function Un(e){var t,n,r,i,s,o=[];if(!e._d){for(r=Vn(e),e._w&&null==e._a[Ue]&&null==e._a[Ve]&&Wn(e),null!=e._dayOfYear&&(s=kn(e._a[ke],r[ke]),(e._dayOfYear>Ge(s)||0===e._dayOfYear)&&(y(e)._overflowDayOfYear=!0),n=bt(s,0,e._dayOfYear),e._a[Ve]=n.getUTCMonth(),e._a[Ue]=n.getUTCDate()),t=0;t<3&&null==e._a[t];++t)e._a[t]=o[t]=r[t];for(;t<7;t++)e._a[t]=o[t]=null==e._a[t]?2===t?1:0:e._a[t];24===e._a[We]&&0===e._a[Xe]&&0===e._a[je]&&0===e._a[Ze]&&(e._nextDay=!0,e._a[We]=0),e._d=(e._useUTC?bt:St).apply(null,o),i=e._useUTC?e._d.getUTCDay():e._d.getDay(),null!=e._tzm&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[We]=24),e._w&&"undefined"!==typeof e._w.d&&e._w.d!==i&&(y(e).weekdayMismatch=!0)}}function Wn(e){var t,n,r,i,s,o,a,l,c;t=e._w,null!=t.GG||null!=t.W||null!=t.E?(s=1,o=4,n=kn(t.GG,e._a[ke],Ot(zn(),1,4).year),r=kn(t.W,1),i=kn(t.E,1),(i<1||i>7)&&(l=!0)):(s=e._locale._week.dow,o=e._locale._week.doy,c=Ot(zn(),s,o),n=kn(t.gg,e._a[ke],c.year),r=kn(t.w,c.week),null!=t.d?(i=t.d,(i<0||i>6)&&(l=!0)):null!=t.e?(i=t.e+s,(t.e<0||t.e>6)&&(l=!0)):i=s),r<1||r>vt(n,s,o)?y(e)._overflowWeeks=!0:null!=l?y(e)._overflowWeekday=!0:(a=Tt(n,r,i,s,o),e._a[ke]=a.year,e._dayOfYear=a.dayOfYear)}function Xn(e){if(e._f!==s.ISO_8601)if(e._f!==s.RFC_2822){e._a=[],y(e).empty=!0;var t,n,r,i,o,a,l,c=""+e._i,u=c.length,h=0;for(r=Q(e._f,e._locale).match(H)||[],l=r.length,t=0;t<l;t++)i=r[t],n=(c.match(Ne(i,e))||[])[0],n&&(o=c.substr(0,c.indexOf(n)),o.length>0&&y(e).unusedInput.push(o),c=c.slice(c.indexOf(n)+n.length),h+=n.length),U[i]?(n?y(e).empty=!1:y(e).unusedTokens.push(i),Ye(i,n,e)):e._strict&&!n&&y(e).unusedTokens.push(i);y(e).charsLeftOver=u-h,c.length>0&&y(e).unusedInput.push(c),e._a[We]<=12&&!0===y(e).bigHour&&e._a[We]>0&&(y(e).bigHour=void 0),y(e).parsedDateParts=e._a.slice(0),y(e).meridiem=e._meridiem,e._a[We]=jn(e._locale,e._a[We],e._meridiem),a=y(e).era,null!==a&&(e._a[ke]=e._locale.erasConvertYear(a,e._a[ke])),Un(e),wn(e)}else Yn(e);else In(e)}function jn(e,t,n){var r;return null==n?t:null!=e.meridiemHour?e.meridiemHour(t,n):null!=e.isPM?(r=e.isPM(n),r&&t<12&&(t+=12),r||12!==t||(t=0),t):t}function Zn(e){var t,n,r,i,s,o,a=!1,l=e._f.length;if(0===l)return y(e).invalidFormat=!0,void(e._d=new Date(NaN));for(i=0;i<l;i++)s=0,o=!1,t=T({},e),null!=e._useUTC&&(t._useUTC=e._useUTC),t._f=e._f[i],Xn(t),M(t)&&(o=!0),s+=y(t).charsLeftOver,s+=10*y(t).unusedTokens.length,y(t).score=s,a?s<r&&(r=s,n=t):(null==r||s<r||o)&&(r=s,n=t,o&&(a=!0));p(e,n||t)}function Qn(e){if(!e._d){var t=se(e._i),n=void 0===t.day?t.date:t.day;e._a=g([t.year,t.month,n,t.hour,t.minute,t.second,t.millisecond],(function(e){return e&&parseInt(e,10)})),Un(e)}}function Kn(e){var t=new O(wn(Gn(e)));return t._nextDay&&(t.add(1,"d"),t._nextDay=void 0),t}function Gn(e){var t=e._i,n=e._f;return e._locale=e._locale||Sn(e._l),null===t||void 0===n&&""===t?S({nullInput:!0}):("string"===typeof t&&(e._i=t=e._locale.preparse(t)),v(t)?new O(wn(t)):(m(t)?e._d=t:a(n)?Zn(e):n?Xn(e):Bn(e),M(e)||(e._d=null),e))}function Bn(e){var t=e._i;h(t)?e._d=new Date(s.now()):m(t)?e._d=new Date(t.valueOf()):"string"===typeof t?Hn(e):a(t)?(e._a=g(t.slice(0),(function(e){return parseInt(e,10)})),Un(e)):l(t)?Qn(e):d(t)?e._d=new Date(t):s.createFromInputFallback(e)}function Jn(e,t,n,r,i){var s={};return!0!==t&&!1!==t||(r=t,t=void 0),!0!==n&&!1!==n||(r=n,n=void 0),(l(e)&&u(e)||a(e)&&0===e.length)&&(e=void 0),s._isAMomentObject=!0,s._useUTC=s._isUTC=i,s._l=n,s._i=e,s._f=t,s._strict=r,Kn(s)}function zn(e,t,n,r){return Jn(e,t,n,r,!1)}s.createFromInputFallback=C("value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",(function(e){e._d=new Date(e._i+(e._useUTC?" UTC":""))})),s.ISO_8601=function(){},s.RFC_2822=function(){};var $n=C("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",(function(){var e=zn.apply(null,arguments);return this.isValid()&&e.isValid()?e<this?this:e:S()})),qn=C("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",(function(){var e=zn.apply(null,arguments);return this.isValid()&&e.isValid()?e>this?this:e:S()}));function er(e,t){var n,r;if(1===t.length&&a(t[0])&&(t=t[0]),!t.length)return zn();for(n=t[0],r=1;r<t.length;++r)t[r].isValid()&&!t[r][e](n)||(n=t[r]);return n}function tr(){var e=[].slice.call(arguments,0);return er("isBefore",e)}function nr(){var e=[].slice.call(arguments,0);return er("isAfter",e)}var rr=function(){return Date.now?Date.now():+new Date},ir=["year","quarter","month","week","day","hour","minute","second","millisecond"];function sr(e){var t,n,r=!1,i=ir.length;for(t in e)if(c(e,t)&&(-1===Be.call(ir,t)||null!=e[t]&&isNaN(e[t])))return!1;for(n=0;n<i;++n)if(e[ir[n]]){if(r)return!1;parseFloat(e[ir[n]])!==xe(e[ir[n]])&&(r=!0)}return!0}function or(){return this._isValid}function ar(){return _r(NaN)}function lr(e){var t=se(e),n=t.year||0,r=t.quarter||0,i=t.month||0,s=t.week||t.isoWeek||0,o=t.day||0,a=t.hour||0,l=t.minute||0,c=t.second||0,u=t.millisecond||0;this._isValid=sr(t),this._milliseconds=+u+1e3*c+6e4*l+1e3*a*60*60,this._days=+o+7*s,this._months=+i+3*r+12*n,this._data={},this._locale=Sn(),this._bubble()}function cr(e){return e instanceof lr}function ur(e){return e<0?-1*Math.round(-1*e):Math.round(e)}function hr(e,t,n){var r,i=Math.min(e.length,t.length),s=Math.abs(e.length-t.length),o=0;for(r=0;r<i;r++)(n&&e[r]!==t[r]||!n&&xe(e[r])!==xe(t[r]))&&o++;return o+s}function dr(e,t){W(e,0,0,(function(){var e=this.utcOffset(),n="+";return e<0&&(e=-e,n="-"),n+Y(~~(e/60),2)+t+Y(~~e%60,2)}))}dr("Z",":"),dr("ZZ",""),Le("Z",Te),Le("ZZ",Te),Ae(["Z","ZZ"],(function(e,t,n){n._useUTC=!0,n._tzm=gr(Te,e)}));var mr=/([\+\-]|\d\d)/gi;function gr(e,t){var n,r,i,s=(t||"").match(e);return null===s?null:(n=s[s.length-1]||[],r=(n+"").match(mr)||["-",0,0],i=60*r[1]+xe(r[2]),0===i?0:"+"===r[0]?i:-i)}function pr(e,t){var n,r;return t._isUTC?(n=t.clone(),r=(v(e)||m(e)?e.valueOf():zn(e).valueOf())-n.valueOf(),n._d.setTime(n._d.valueOf()+r),s.updateOffset(n,!1),n):zn(e).local()}function fr(e){return-Math.round(e._d.getTimezoneOffset())}function Rr(e,t,n){var r,i=this._offset||0;if(!this.isValid())return null!=e?this:NaN;if(null!=e){if("string"===typeof e){if(e=gr(Te,e),null===e)return this}else Math.abs(e)<16&&!n&&(e*=60);return!this._isUTC&&t&&(r=fr(this)),this._offset=e,this._isUTC=!0,null!=r&&this.add(r,"m"),i!==e&&(!t||this._changeInProgress?Ar(this,_r(e-i,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,s.updateOffset(this,!0),this._changeInProgress=null)),this}return this._isUTC?i:fr(this)}function yr(e,t){return null!=e?("string"!==typeof e&&(e=-e),this.utcOffset(e,t),this):-this.utcOffset()}function Mr(e){return this.utcOffset(0,e)}function Sr(e){return this._isUTC&&(this.utcOffset(0,e),this._isUTC=!1,e&&this.subtract(fr(this),"m")),this}function br(){if(null!=this._tzm)this.utcOffset(this._tzm,!1,!0);else if("string"===typeof this._i){var e=gr(we,this._i);null!=e?this.utcOffset(e):this.utcOffset(0,!0)}return this}function wr(e){return!!this.isValid()&&(e=e?zn(e).utcOffset():0,(this.utcOffset()-e)%60===0)}function Tr(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function Or(){if(!h(this._isDSTShifted))return this._isDSTShifted;var e,t={};return T(t,this),t=Gn(t),t._a?(e=t._isUTC?f(t._a):zn(t._a),this._isDSTShifted=this.isValid()&&hr(t._a,e.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted}function vr(){return!!this.isValid()&&!this._isUTC}function Er(){return!!this.isValid()&&this._isUTC}function Cr(){return!!this.isValid()&&(this._isUTC&&0===this._offset)}s.updateOffset=function(){};var Lr=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,Nr=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function _r(e,t){var n,r,i,s=e,o=null;return cr(e)?s={ms:e._milliseconds,d:e._days,M:e._months}:d(e)||!isNaN(+e)?(s={},t?s[t]=+e:s.milliseconds=+e):(o=Lr.exec(e))?(n="-"===o[1]?-1:1,s={y:0,d:xe(o[Ue])*n,h:xe(o[We])*n,m:xe(o[Xe])*n,s:xe(o[je])*n,ms:xe(ur(1e3*o[Ze]))*n}):(o=Nr.exec(e))?(n="-"===o[1]?-1:1,s={y:Ir(o[2],n),M:Ir(o[3],n),w:Ir(o[4],n),d:Ir(o[5],n),h:Ir(o[6],n),m:Ir(o[7],n),s:Ir(o[8],n)}):null==s?s={}:"object"===typeof s&&("from"in s||"to"in s)&&(i=xr(zn(s.from),zn(s.to)),s={},s.ms=i.milliseconds,s.M=i.months),r=new lr(s),cr(e)&&c(e,"_locale")&&(r._locale=e._locale),cr(e)&&c(e,"_isValid")&&(r._isValid=e._isValid),r}function Ir(e,t){var n=e&&parseFloat(e.replace(",","."));return(isNaN(n)?0:n)*t}function Pr(e,t){var n={};return n.months=t.month()-e.month()+12*(t.year()-e.year()),e.clone().add(n.months,"M").isAfter(t)&&--n.months,n.milliseconds=+t-+e.clone().add(n.months,"M"),n}function xr(e,t){var n;return e.isValid()&&t.isValid()?(t=pr(t,e),e.isBefore(t)?n=Pr(e,t):(n=Pr(t,e),n.milliseconds=-n.milliseconds,n.months=-n.months),n):{milliseconds:0,months:0}}function Dr(e,t){return function(n,r){var i,s;return null===r||isNaN(+r)||(_(t,"moment()."+t+"(period, number) is deprecated. Please use moment()."+t+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),s=n,n=r,r=s),i=_r(n,r),Ar(this,i,e),this}}function Ar(e,t,n,r){var i=t._milliseconds,o=ur(t._days),a=ur(t._months);e.isValid()&&(r=null==r||r,a&&gt(e,qe(e,"Month")+a*n),o&&et(e,"Date",qe(e,"Date")+o*n),i&&e._d.setTime(e._d.valueOf()+i*n),r&&s.updateOffset(e,o||a))}_r.fn=lr.prototype,_r.invalid=ar;var Fr=Dr(1,"add"),Yr=Dr(-1,"subtract");function Hr(e){return"string"===typeof e||e instanceof String}function kr(e){return v(e)||m(e)||Hr(e)||d(e)||Ur(e)||Vr(e)||null===e||void 0===e}function Vr(e){var t,n,r=l(e)&&!u(e),i=!1,s=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"],o=s.length;for(t=0;t<o;t+=1)n=s[t],i=i||c(e,n);return r&&i}function Ur(e){var t=a(e),n=!1;return t&&(n=0===e.filter((function(t){return!d(t)&&Hr(e)})).length),t&&n}function Wr(e){var t,n,r=l(e)&&!u(e),i=!1,s=["sameDay","nextDay","lastDay","nextWeek","lastWeek","sameElse"];for(t=0;t<s.length;t+=1)n=s[t],i=i||c(e,n);return r&&i}function Xr(e,t){var n=e.diff(t,"days",!0);return n<-6?"sameElse":n<-1?"lastWeek":n<0?"lastDay":n<1?"sameDay":n<2?"nextDay":n<7?"nextWeek":"sameElse"}function jr(e,t){1===arguments.length&&(arguments[0]?kr(arguments[0])?(e=arguments[0],t=void 0):Wr(arguments[0])&&(t=arguments[0],e=void 0):(e=void 0,t=void 0));var n=e||zn(),r=pr(n,this).startOf("day"),i=s.calendarFormat(this,r)||"sameElse",o=t&&(I(t[i])?t[i].call(this,n):t[i]);return this.format(o||this.localeData().calendar(i,this,zn(n)))}function Zr(){return new O(this)}function Qr(e,t){var n=v(e)?e:zn(e);return!(!this.isValid()||!n.isValid())&&(t=ie(t)||"millisecond","millisecond"===t?this.valueOf()>n.valueOf():n.valueOf()<this.clone().startOf(t).valueOf())}function Kr(e,t){var n=v(e)?e:zn(e);return!(!this.isValid()||!n.isValid())&&(t=ie(t)||"millisecond","millisecond"===t?this.valueOf()<n.valueOf():this.clone().endOf(t).valueOf()<n.valueOf())}function Gr(e,t,n,r){var i=v(e)?e:zn(e),s=v(t)?t:zn(t);return!!(this.isValid()&&i.isValid()&&s.isValid())&&(r=r||"()",("("===r[0]?this.isAfter(i,n):!this.isBefore(i,n))&&(")"===r[1]?this.isBefore(s,n):!this.isAfter(s,n)))}function Br(e,t){var n,r=v(e)?e:zn(e);return!(!this.isValid()||!r.isValid())&&(t=ie(t)||"millisecond","millisecond"===t?this.valueOf()===r.valueOf():(n=r.valueOf(),this.clone().startOf(t).valueOf()<=n&&n<=this.clone().endOf(t).valueOf()))}function Jr(e,t){return this.isSame(e,t)||this.isAfter(e,t)}function zr(e,t){return this.isSame(e,t)||this.isBefore(e,t)}function $r(e,t,n){var r,i,s;if(!this.isValid())return NaN;if(r=pr(e,this),!r.isValid())return NaN;switch(i=6e4*(r.utcOffset()-this.utcOffset()),t=ie(t),t){case"year":s=qr(this,r)/12;break;case"month":s=qr(this,r);break;case"quarter":s=qr(this,r)/3;break;case"second":s=(this-r)/1e3;break;case"minute":s=(this-r)/6e4;break;case"hour":s=(this-r)/36e5;break;case"day":s=(this-r-i)/864e5;break;case"week":s=(this-r-i)/6048e5;break;default:s=this-r}return n?s:Pe(s)}function qr(e,t){if(e.date()<t.date())return-qr(t,e);var n,r,i=12*(t.year()-e.year())+(t.month()-e.month()),s=e.clone().add(i,"months");return t-s<0?(n=e.clone().add(i-1,"months"),r=(t-s)/(s-n)):(n=e.clone().add(i+1,"months"),r=(t-s)/(n-s)),-(i+r)||0}function ei(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")}function ti(e){if(!this.isValid())return null;var t=!0!==e,n=t?this.clone().utc():this;return n.year()<0||n.year()>9999?Z(n,t?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):I(Date.prototype.toISOString)?t?this.toDate().toISOString():new Date(this.valueOf()+60*this.utcOffset()*1e3).toISOString().replace("Z",Z(n,"Z")):Z(n,t?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")}function ni(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var e,t,n,r,i="moment",s="";return this.isLocal()||(i=0===this.utcOffset()?"moment.utc":"moment.parseZone",s="Z"),e="["+i+'("]',t=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",n="-MM-DD[T]HH:mm:ss.SSS",r=s+'[")]',this.format(e+t+n+r)}function ri(e){e||(e=this.isUtc()?s.defaultFormatUtc:s.defaultFormat);var t=Z(this,e);return this.localeData().postformat(t)}function ii(e,t){return this.isValid()&&(v(e)&&e.isValid()||zn(e).isValid())?_r({to:this,from:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function si(e){return this.from(zn(),e)}function oi(e,t){return this.isValid()&&(v(e)&&e.isValid()||zn(e).isValid())?_r({from:this,to:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function ai(e){return this.to(zn(),e)}function li(e){var t;return void 0===e?this._locale._abbr:(t=Sn(e),null!=t&&(this._locale=t),this)}s.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",s.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";var ci=C("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",(function(e){return void 0===e?this.localeData():this.locale(e)}));function ui(){return this._locale}var hi=1e3,di=60*hi,mi=60*di,gi=3506328*mi;function pi(e,t){return(e%t+t)%t}function fi(e,t,n){return e<100&&e>=0?new Date(e+400,t,n)-gi:new Date(e,t,n).valueOf()}function Ri(e,t,n){return e<100&&e>=0?Date.UTC(e+400,t,n)-gi:Date.UTC(e,t,n)}function yi(e){var t,n;if(e=ie(e),void 0===e||"millisecond"===e||!this.isValid())return this;switch(n=this._isUTC?Ri:fi,e){case"year":t=n(this.year(),0,1);break;case"quarter":t=n(this.year(),this.month()-this.month()%3,1);break;case"month":t=n(this.year(),this.month(),1);break;case"week":t=n(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":t=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":t=n(this.year(),this.month(),this.date());break;case"hour":t=this._d.valueOf(),t-=pi(t+(this._isUTC?0:this.utcOffset()*di),mi);break;case"minute":t=this._d.valueOf(),t-=pi(t,di);break;case"second":t=this._d.valueOf(),t-=pi(t,hi);break}return this._d.setTime(t),s.updateOffset(this,!0),this}function Mi(e){var t,n;if(e=ie(e),void 0===e||"millisecond"===e||!this.isValid())return this;switch(n=this._isUTC?Ri:fi,e){case"year":t=n(this.year()+1,0,1)-1;break;case"quarter":t=n(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":t=n(this.year(),this.month()+1,1)-1;break;case"week":t=n(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":t=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":t=n(this.year(),this.month(),this.date()+1)-1;break;case"hour":t=this._d.valueOf(),t+=mi-pi(t+(this._isUTC?0:this.utcOffset()*di),mi)-1;break;case"minute":t=this._d.valueOf(),t+=di-pi(t,di)-1;break;case"second":t=this._d.valueOf(),t+=hi-pi(t,hi)-1;break}return this._d.setTime(t),s.updateOffset(this,!0),this}function Si(){return this._d.valueOf()-6e4*(this._offset||0)}function bi(){return Math.floor(this.valueOf()/1e3)}function wi(){return new Date(this.valueOf())}function Ti(){var e=this;return[e.year(),e.month(),e.date(),e.hour(),e.minute(),e.second(),e.millisecond()]}function Oi(){var e=this;return{years:e.year(),months:e.month(),date:e.date(),hours:e.hours(),minutes:e.minutes(),seconds:e.seconds(),milliseconds:e.milliseconds()}}function vi(){return this.isValid()?this.toISOString():null}function Ei(){return M(this)}function Ci(){return p({},y(this))}function Li(){return y(this).overflow}function Ni(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}function _i(e,t){var n,r,i,o=this._eras||Sn("en")._eras;for(n=0,r=o.length;n<r;++n){switch(typeof o[n].since){case"string":i=s(o[n].since).startOf("day"),o[n].since=i.valueOf();break}switch(typeof o[n].until){case"undefined":o[n].until=1/0;break;case"string":i=s(o[n].until).startOf("day").valueOf(),o[n].until=i.valueOf();break}}return o}function Ii(e,t,n){var r,i,s,o,a,l=this.eras();for(e=e.toUpperCase(),r=0,i=l.length;r<i;++r)if(s=l[r].name.toUpperCase(),o=l[r].abbr.toUpperCase(),a=l[r].narrow.toUpperCase(),n)switch(t){case"N":case"NN":case"NNN":if(o===e)return l[r];break;case"NNNN":if(s===e)return l[r];break;case"NNNNN":if(a===e)return l[r];break}else if([s,o,a].indexOf(e)>=0)return l[r]}function Pi(e,t){var n=e.since<=e.until?1:-1;return void 0===t?s(e.since).year():s(e.since).year()+(t-e.offset)*n}function xi(){var e,t,n,r=this.localeData().eras();for(e=0,t=r.length;e<t;++e){if(n=this.clone().startOf("day").valueOf(),r[e].since<=n&&n<=r[e].until)return r[e].name;if(r[e].until<=n&&n<=r[e].since)return r[e].name}return""}function Di(){var e,t,n,r=this.localeData().eras();for(e=0,t=r.length;e<t;++e){if(n=this.clone().startOf("day").valueOf(),r[e].since<=n&&n<=r[e].until)return r[e].narrow;if(r[e].until<=n&&n<=r[e].since)return r[e].narrow}return""}function Ai(){var e,t,n,r=this.localeData().eras();for(e=0,t=r.length;e<t;++e){if(n=this.clone().startOf("day").valueOf(),r[e].since<=n&&n<=r[e].until)return r[e].abbr;if(r[e].until<=n&&n<=r[e].since)return r[e].abbr}return""}function Fi(){var e,t,n,r,i=this.localeData().eras();for(e=0,t=i.length;e<t;++e)if(n=i[e].since<=i[e].until?1:-1,r=this.clone().startOf("day").valueOf(),i[e].since<=r&&r<=i[e].until||i[e].until<=r&&r<=i[e].since)return(this.year()-s(i[e].since).year())*n+i[e].offset;return this.year()}function Yi(e){return c(this,"_erasNameRegex")||ji.call(this),e?this._erasNameRegex:this._erasRegex}function Hi(e){return c(this,"_erasAbbrRegex")||ji.call(this),e?this._erasAbbrRegex:this._erasRegex}function ki(e){return c(this,"_erasNarrowRegex")||ji.call(this),e?this._erasNarrowRegex:this._erasRegex}function Vi(e,t){return t.erasAbbrRegex(e)}function Ui(e,t){return t.erasNameRegex(e)}function Wi(e,t){return t.erasNarrowRegex(e)}function Xi(e,t){return t._eraYearOrdinalRegex||Se}function ji(){var e,t,n,r,i,s=[],o=[],a=[],l=[],c=this.eras();for(e=0,t=c.length;e<t;++e)n=Ie(c[e].name),r=Ie(c[e].abbr),i=Ie(c[e].narrow),o.push(n),s.push(r),a.push(i),l.push(n),l.push(r),l.push(i);this._erasRegex=new RegExp("^("+l.join("|")+")","i"),this._erasNameRegex=new RegExp("^("+o.join("|")+")","i"),this._erasAbbrRegex=new RegExp("^("+s.join("|")+")","i"),this._erasNarrowRegex=new RegExp("^("+a.join("|")+")","i")}function Zi(e,t){W(0,[e,e.length],0,t)}function Qi(e){return $i.call(this,e,this.week(),this.weekday()+this.localeData()._week.dow,this.localeData()._week.dow,this.localeData()._week.doy)}function Ki(e){return $i.call(this,e,this.isoWeek(),this.isoWeekday(),1,4)}function Gi(){return vt(this.year(),1,4)}function Bi(){return vt(this.isoWeekYear(),1,4)}function Ji(){var e=this.localeData()._week;return vt(this.year(),e.dow,e.doy)}function zi(){var e=this.localeData()._week;return vt(this.weekYear(),e.dow,e.doy)}function $i(e,t,n,r,i){var s;return null==e?Ot(this,r,i).year:(s=vt(e,r,i),t>s&&(t=s),qi.call(this,e,t,n,r,i))}function qi(e,t,n,r,i){var s=Tt(e,t,n,r,i),o=bt(s.year,0,s.dayOfYear);return this.year(o.getUTCFullYear()),this.month(o.getUTCMonth()),this.date(o.getUTCDate()),this}function es(e){return null==e?Math.ceil((this.month()+1)/3):this.month(3*(e-1)+this.month()%3)}W("N",0,0,"eraAbbr"),W("NN",0,0,"eraAbbr"),W("NNN",0,0,"eraAbbr"),W("NNNN",0,0,"eraName"),W("NNNNN",0,0,"eraNarrow"),W("y",["y",1],"yo","eraYear"),W("y",["yy",2],0,"eraYear"),W("y",["yyy",3],0,"eraYear"),W("y",["yyyy",4],0,"eraYear"),Le("N",Vi),Le("NN",Vi),Le("NNN",Vi),Le("NNNN",Ui),Le("NNNNN",Wi),Ae(["N","NN","NNN","NNNN","NNNNN"],(function(e,t,n,r){var i=n._locale.erasParse(e,r,n._strict);i?y(n).era=i:y(n).invalidEra=e})),Le("y",Se),Le("yy",Se),Le("yyy",Se),Le("yyyy",Se),Le("yo",Xi),Ae(["y","yy","yyy","yyyy"],ke),Ae(["yo"],(function(e,t,n,r){var i;n._locale._eraYearOrdinalRegex&&(i=e.match(n._locale._eraYearOrdinalRegex)),n._locale.eraYearOrdinalParse?t[ke]=n._locale.eraYearOrdinalParse(e,i):t[ke]=parseInt(e,10)})),W(0,["gg",2],0,(function(){return this.weekYear()%100})),W(0,["GG",2],0,(function(){return this.isoWeekYear()%100})),Zi("gggg","weekYear"),Zi("ggggg","weekYear"),Zi("GGGG","isoWeekYear"),Zi("GGGGG","isoWeekYear"),Le("G",be),Le("g",be),Le("GG",ge,ue),Le("gg",ge,ue),Le("GGGG",ye,de),Le("gggg",ye,de),Le("GGGGG",Me,me),Le("ggggg",Me,me),Fe(["gggg","ggggg","GGGG","GGGGG"],(function(e,t,n,r){t[r.substr(0,2)]=xe(e)})),Fe(["gg","GG"],(function(e,t,n,r){t[r]=s.parseTwoDigitYear(e)})),W("Q",0,"Qo","quarter"),Le("Q",ce),Ae("Q",(function(e,t){t[Ve]=3*(xe(e)-1)})),W("D",["DD",2],"Do","date"),Le("D",ge,Ee),Le("DD",ge,ue),Le("Do",(function(e,t){return e?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient})),Ae(["D","DD"],Ue),Ae("Do",(function(e,t){t[Ue]=xe(e.match(ge)[0])}));var ts=$e("Date",!0);function ns(e){var t=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return null==e?t:this.add(e-t,"d")}W("DDD",["DDDD",3],"DDDo","dayOfYear"),Le("DDD",Re),Le("DDDD",he),Ae(["DDD","DDDD"],(function(e,t,n){n._dayOfYear=xe(e)})),W("m",["mm",2],0,"minute"),Le("m",ge,Ce),Le("mm",ge,ue),Ae(["m","mm"],Xe);var rs=$e("Minutes",!1);W("s",["ss",2],0,"second"),Le("s",ge,Ce),Le("ss",ge,ue),Ae(["s","ss"],je);var is,ss,os=$e("Seconds",!1);for(W("S",0,0,(function(){return~~(this.millisecond()/100)})),W(0,["SS",2],0,(function(){return~~(this.millisecond()/10)})),W(0,["SSS",3],0,"millisecond"),W(0,["SSSS",4],0,(function(){return 10*this.millisecond()})),W(0,["SSSSS",5],0,(function(){return 100*this.millisecond()})),W(0,["SSSSSS",6],0,(function(){return 1e3*this.millisecond()})),W(0,["SSSSSSS",7],0,(function(){return 1e4*this.millisecond()})),W(0,["SSSSSSSS",8],0,(function(){return 1e5*this.millisecond()})),W(0,["SSSSSSSSS",9],0,(function(){return 1e6*this.millisecond()})),Le("S",Re,ce),Le("SS",Re,ue),Le("SSS",Re,he),is="SSSS";is.length<=9;is+="S")Le(is,Se);function as(e,t){t[Ze]=xe(1e3*("0."+e))}for(is="S";is.length<=9;is+="S")Ae(is,as);function ls(){return this._isUTC?"UTC":""}function cs(){return this._isUTC?"Coordinated Universal Time":""}ss=$e("Milliseconds",!1),W("z",0,0,"zoneAbbr"),W("zz",0,0,"zoneName");var us=O.prototype;function hs(e){return zn(1e3*e)}function ds(){return zn.apply(null,arguments).parseZone()}function ms(e){return e}us.add=Fr,us.calendar=jr,us.clone=Zr,us.diff=$r,us.endOf=Mi,us.format=ri,us.from=ii,us.fromNow=si,us.to=oi,us.toNow=ai,us.get=tt,us.invalidAt=Li,us.isAfter=Qr,us.isBefore=Kr,us.isBetween=Gr,us.isSame=Br,us.isSameOrAfter=Jr,us.isSameOrBefore=zr,us.isValid=Ei,us.lang=ci,us.locale=li,us.localeData=ui,us.max=qn,us.min=$n,us.parsingFlags=Ci,us.set=nt,us.startOf=yi,us.subtract=Yr,us.toArray=Ti,us.toObject=Oi,us.toDate=wi,us.toISOString=ti,us.inspect=ni,"undefined"!==typeof Symbol&&null!=Symbol.for&&(us[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"}),us.toJSON=vi,us.toString=ei,us.unix=bi,us.valueOf=Si,us.creationData=Ni,us.eraName=xi,us.eraNarrow=Di,us.eraAbbr=Ai,us.eraYear=Fi,us.year=Je,us.isLeapYear=ze,us.weekYear=Qi,us.isoWeekYear=Ki,us.quarter=us.quarters=es,us.month=pt,us.daysInMonth=ft,us.week=us.weeks=_t,us.isoWeek=us.isoWeeks=It,us.weeksInYear=Ji,us.weeksInWeekYear=zi,us.isoWeeksInYear=Gi,us.isoWeeksInISOWeekYear=Bi,us.date=ts,us.day=us.days=Qt,us.weekday=Kt,us.isoWeekday=Gt,us.dayOfYear=ns,us.hour=us.hours=on,us.minute=us.minutes=rs,us.second=us.seconds=os,us.millisecond=us.milliseconds=ss,us.utcOffset=Rr,us.utc=Mr,us.local=Sr,us.parseZone=br,us.hasAlignedHourOffset=wr,us.isDST=Tr,us.isLocal=vr,us.isUtcOffset=Er,us.isUtc=Cr,us.isUTC=Cr,us.zoneAbbr=ls,us.zoneName=cs,us.dates=C("dates accessor is deprecated. Use date instead.",ts),us.months=C("months accessor is deprecated. Use month instead",pt),us.years=C("years accessor is deprecated. Use year instead",Je),us.zone=C("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",yr),us.isDSTShifted=C("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",Or);var gs=D.prototype;function ps(e,t,n,r){var i=Sn(),s=f().set(r,t);return i[n](s,e)}function fs(e,t,n){if(d(e)&&(t=e,e=void 0),e=e||"",null!=t)return ps(e,t,n,"month");var r,i=[];for(r=0;r<12;r++)i[r]=ps(e,r,n,"month");return i}function Rs(e,t,n,r){"boolean"===typeof e?(d(t)&&(n=t,t=void 0),t=t||""):(t=e,n=t,e=!1,d(t)&&(n=t,t=void 0),t=t||"");var i,s=Sn(),o=e?s._week.dow:0,a=[];if(null!=n)return ps(t,(n+o)%7,r,"day");for(i=0;i<7;i++)a[i]=ps(t,(i+o)%7,r,"day");return a}function ys(e,t){return fs(e,t,"months")}function Ms(e,t){return fs(e,t,"monthsShort")}function Ss(e,t,n){return Rs(e,t,n,"weekdays")}function bs(e,t,n){return Rs(e,t,n,"weekdaysShort")}function ws(e,t,n){return Rs(e,t,n,"weekdaysMin")}gs.calendar=F,gs.longDateFormat=G,gs.invalidDate=J,gs.ordinal=q,gs.preparse=ms,gs.postformat=ms,gs.relativeTime=te,gs.pastFuture=ne,gs.set=P,gs.eras=_i,gs.erasParse=Ii,gs.erasConvertYear=Pi,gs.erasAbbrRegex=Hi,gs.erasNameRegex=Yi,gs.erasNarrowRegex=ki,gs.months=ut,gs.monthsShort=ht,gs.monthsParse=mt,gs.monthsRegex=yt,gs.monthsShortRegex=Rt,gs.week=Et,gs.firstDayOfYear=Nt,gs.firstDayOfWeek=Lt,gs.weekdays=Ut,gs.weekdaysMin=Xt,gs.weekdaysShort=Wt,gs.weekdaysParse=Zt,gs.weekdaysRegex=Bt,gs.weekdaysShortRegex=Jt,gs.weekdaysMinRegex=zt,gs.isPM=rn,gs.meridiem=an,Rn("en",{eras:[{since:"0001-01-01",until:1/0,offset:1,name:"Anno Domini",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"Before Christ",narrow:"BC",abbr:"BC"}],dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10,n=1===xe(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th";return e+n}}),s.lang=C("moment.lang is deprecated. Use moment.locale instead.",Rn),s.langData=C("moment.langData is deprecated. Use moment.localeData instead.",Sn);var Ts=Math.abs;function Os(){var e=this._data;return this._milliseconds=Ts(this._milliseconds),this._days=Ts(this._days),this._months=Ts(this._months),e.milliseconds=Ts(e.milliseconds),e.seconds=Ts(e.seconds),e.minutes=Ts(e.minutes),e.hours=Ts(e.hours),e.months=Ts(e.months),e.years=Ts(e.years),this}function vs(e,t,n,r){var i=_r(t,n);return e._milliseconds+=r*i._milliseconds,e._days+=r*i._days,e._months+=r*i._months,e._bubble()}function Es(e,t){return vs(this,e,t,1)}function Cs(e,t){return vs(this,e,t,-1)}function Ls(e){return e<0?Math.floor(e):Math.ceil(e)}function Ns(){var e,t,n,r,i,s=this._milliseconds,o=this._days,a=this._months,l=this._data;return s>=0&&o>=0&&a>=0||s<=0&&o<=0&&a<=0||(s+=864e5*Ls(Is(a)+o),o=0,a=0),l.milliseconds=s%1e3,e=Pe(s/1e3),l.seconds=e%60,t=Pe(e/60),l.minutes=t%60,n=Pe(t/60),l.hours=n%24,o+=Pe(n/24),i=Pe(_s(o)),a+=i,o-=Ls(Is(i)),r=Pe(a/12),a%=12,l.days=o,l.months=a,l.years=r,this}function _s(e){return 4800*e/146097}function Is(e){return 146097*e/4800}function Ps(e){if(!this.isValid())return NaN;var t,n,r=this._milliseconds;if(e=ie(e),"month"===e||"quarter"===e||"year"===e)switch(t=this._days+r/864e5,n=this._months+_s(t),e){case"month":return n;case"quarter":return n/3;case"year":return n/12}else switch(t=this._days+Math.round(Is(this._months)),e){case"week":return t/7+r/6048e5;case"day":return t+r/864e5;case"hour":return 24*t+r/36e5;case"minute":return 1440*t+r/6e4;case"second":return 86400*t+r/1e3;case"millisecond":return Math.floor(864e5*t)+r;default:throw new Error("Unknown unit "+e)}}function xs(e){return function(){return this.as(e)}}var Ds=xs("ms"),As=xs("s"),Fs=xs("m"),Ys=xs("h"),Hs=xs("d"),ks=xs("w"),Vs=xs("M"),Us=xs("Q"),Ws=xs("y"),Xs=Ds;function js(){return _r(this)}function Zs(e){return e=ie(e),this.isValid()?this[e+"s"]():NaN}function Qs(e){return function(){return this.isValid()?this._data[e]:NaN}}var Ks=Qs("milliseconds"),Gs=Qs("seconds"),Bs=Qs("minutes"),Js=Qs("hours"),zs=Qs("days"),$s=Qs("months"),qs=Qs("years");function eo(){return Pe(this.days()/7)}var to=Math.round,no={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function ro(e,t,n,r,i){return i.relativeTime(t||1,!!n,e,r)}function io(e,t,n,r){var i=_r(e).abs(),s=to(i.as("s")),o=to(i.as("m")),a=to(i.as("h")),l=to(i.as("d")),c=to(i.as("M")),u=to(i.as("w")),h=to(i.as("y")),d=s<=n.ss&&["s",s]||s<n.s&&["ss",s]||o<=1&&["m"]||o<n.m&&["mm",o]||a<=1&&["h"]||a<n.h&&["hh",a]||l<=1&&["d"]||l<n.d&&["dd",l];return null!=n.w&&(d=d||u<=1&&["w"]||u<n.w&&["ww",u]),d=d||c<=1&&["M"]||c<n.M&&["MM",c]||h<=1&&["y"]||["yy",h],d[2]=t,d[3]=+e>0,d[4]=r,ro.apply(null,d)}function so(e){return void 0===e?to:"function"===typeof e&&(to=e,!0)}function oo(e,t){return void 0!==no[e]&&(void 0===t?no[e]:(no[e]=t,"s"===e&&(no.ss=t-1),!0))}function ao(e,t){if(!this.isValid())return this.localeData().invalidDate();var n,r,i=!1,s=no;return"object"===typeof e&&(t=e,e=!1),"boolean"===typeof e&&(i=e),"object"===typeof t&&(s=Object.assign({},no,t),null!=t.s&&null==t.ss&&(s.ss=t.s-1)),n=this.localeData(),r=io(this,!i,s,n),i&&(r=n.pastFuture(+this,r)),n.postformat(r)}var lo=Math.abs;function co(e){return(e>0)-(e<0)||+e}function uo(){if(!this.isValid())return this.localeData().invalidDate();var e,t,n,r,i,s,o,a,l=lo(this._milliseconds)/1e3,c=lo(this._days),u=lo(this._months),h=this.asSeconds();return h?(e=Pe(l/60),t=Pe(e/60),l%=60,e%=60,n=Pe(u/12),u%=12,r=l?l.toFixed(3).replace(/\.?0+$/,""):"",i=h<0?"-":"",s=co(this._months)!==co(h)?"-":"",o=co(this._days)!==co(h)?"-":"",a=co(this._milliseconds)!==co(h)?"-":"",i+"P"+(n?s+n+"Y":"")+(u?s+u+"M":"")+(c?o+c+"D":"")+(t||e||l?"T":"")+(t?a+t+"H":"")+(e?a+e+"M":"")+(l?a+r+"S":"")):"P0D"}var ho=lr.prototype;return ho.isValid=or,ho.abs=Os,ho.add=Es,ho.subtract=Cs,ho.as=Ps,ho.asMilliseconds=Ds,ho.asSeconds=As,ho.asMinutes=Fs,ho.asHours=Ys,ho.asDays=Hs,ho.asWeeks=ks,ho.asMonths=Vs,ho.asQuarters=Us,ho.asYears=Ws,ho.valueOf=Xs,ho._bubble=Ns,ho.clone=js,ho.get=Zs,ho.milliseconds=Ks,ho.seconds=Gs,ho.minutes=Bs,ho.hours=Js,ho.days=zs,ho.weeks=eo,ho.months=$s,ho.years=qs,ho.humanize=ao,ho.toISOString=uo,ho.toString=uo,ho.toJSON=uo,ho.locale=li,ho.localeData=ui,ho.toIsoString=C("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",uo),ho.lang=ci,W("X",0,0,"unix"),W("x",0,0,"valueOf"),Le("x",be),Le("X",Oe),Ae("X",(function(e,t,n){n._d=new Date(1e3*parseFloat(e))})),Ae("x",(function(e,t,n){n._d=new Date(xe(e))})),
  312. //! moment.js
  313. s.version="2.30.1",o(zn),s.fn=us,s.min=tr,s.max=nr,s.now=rr,s.utc=f,s.unix=hs,s.months=ys,s.isDate=m,s.locale=Rn,s.invalid=S,s.duration=_r,s.isMoment=v,s.weekdays=Ss,s.parseZone=ds,s.localeData=Sn,s.isDuration=cr,s.monthsShort=Ms,s.weekdaysMin=ws,s.defineLocale=yn,s.updateLocale=Mn,s.locales=bn,s.weekdaysShort=bs,s.normalizeUnits=ie,s.relativeTimeRounding=so,s.relativeTimeThreshold=oo,s.calendarFormat=Xr,s.prototype=us,s.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"},s}))}).call(this,n("62e4")(e))},c24d:function(e,t,n){"use strict";n.d(t,"a",(function(){return W}));var r=n("c0d8"),i=n("2b0e");function s(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function o(e,t,n){return t=h(t),f(e,m()?Reflect.construct(t,n||[],h(e).constructor):t.apply(e,n))}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function l(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,M(r.key),r)}}function c(e,t,n){return t&&l(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function u(e,t,n){return(t=M(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function h(e){return h=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},h(e)}function d(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&R(e,t)}function m(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(m=function(){return!!e})()}function g(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function p(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?g(Object(n),!0).forEach((function(t){u(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):g(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function f(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return s(e)}function R(e,t){return R=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},R(e,t)}function y(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function M(e){var t=y(e,"string");return"symbol"==typeof t?t:t+""}function S(e){return S="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},S(e)}var b=Symbol("unassigned"),w=null,T="The Handsontable instance bound to this component was destroyed and cannot be used properly.";function O(e){e.hotInstance&&(e.hotInstance.addHook("beforeChange",(function(){e.__internalEdit=!0})),e.hotInstance.addHook("beforeCreateRow",(function(){e.__internalEdit=!0})),e.hotInstance.addHook("beforeCreateCol",(function(){e.__internalEdit=!0})),e.hotInstance.addHook("beforeRemoveRow",(function(){e.__internalEdit=!0})),e.hotInstance.addHook("beforeRemoveCol",(function(){e.__internalEdit=!0})))}function v(e){var t=r["a"].hooks.getRegistered(),n={};for(var i in Object.assign(n,r["a"].DefaultSettings),n)n[i]={default:b};for(var s=0;s<t.length;s++)n[t[s]]={default:b};return n.settings={default:b},"HotTable"===e&&(n.id={type:String,default:"hot-"+Math.random().toString(36).substring(5)},n.wrapperRendererCacheSize={type:Number,default:3e3}),n}function E(e){var t={},n=e["settings"];if(n!==b)for(var r in n)n.hasOwnProperty(r)&&n[r]!==b&&(t[r]=n[r]);for(var i in e)e.hasOwnProperty(i)&&"settings"!==i&&e[i]!==b&&(t[i]=e[i]);return t}function C(e,t){var n=E(e),r=e.settings?e.settings:n,i=e.settings?n:null,s={};for(var o in r)!r.hasOwnProperty(o)||void 0===r[o]||t&&"data"!==o&&I(t[o],r[o])||(s[o]=r[o]);for(var a in i)!i.hasOwnProperty(a)||"id"===a||"settings"===a||"wrapperRendererCacheSize"===a||void 0===i[a]||t&&"data"!==a&&I(t[a],i[a])||(s[a]=i[a]);return s}function L(e,t){var n=null;return e.every((function(e,r){return!e.data||!e.data.attrs||void 0===e.data.attrs[t]||(n=e,!1)})),n}function N(e){return e.filter((function(e){return"HotColumn"===e.$options.name}))}function _(e,t,n,r){var i=t.$el?t.$el.ownerDocument:document,s={propsData:n,parent:t,data:r};w||(w=i.createElement("DIV"),w.id="vueHotComponents",i.body.appendChild(w));var o=i.createElement("DIV");return w.appendChild(o),new e.componentOptions.Ctor(s).$mount(o)}function I(e,t){var n=function(e){var t=function(){var e=new WeakSet;return function(t,n){if("object"===S(n)&&null!==n){if(e.has(n))return;e.add(n)}return n}}();return JSON.stringify(e,t)};return"function"===typeof e&&"function"===typeof t?e.toString()===t.toString():S(e)===S(t)&&n(e)===n(t)}var P="14.6.1",x=("undefined"!==typeof globalThis?globalThis:"undefined"!==typeof window?window:"undefined"!==typeof global?global:"undefined"!==typeof self&&self,{});(function(e){(function(t,n){var r=e;n(r)})(0,(function(e){var t=Symbol("newer"),n=Symbol("older");function r(e,t){"number"!==typeof e&&(t=e,e=0),this.size=0,this.limit=e,this.oldest=this.newest=void 0,this._keymap=new Map,t&&(this.assign(t),e<1&&(this.limit=this.size))}function i(e,r){this.key=e,this.value=r,this[t]=void 0,this[n]=void 0}e.LRUMap=r,r.prototype._markEntryAsUsed=function(e){e!==this.newest&&(e[t]&&(e===this.oldest&&(this.oldest=e[t]),e[t][n]=e[n]),e[n]&&(e[n][t]=e[t]),e[t]=void 0,e[n]=this.newest,this.newest&&(this.newest[t]=e),this.newest=e)},r.prototype.assign=function(e){var r,s=this.limit||Number.MAX_VALUE;this._keymap.clear();for(var o=e[Symbol.iterator](),a=o.next();!a.done;a=o.next()){var l=new i(a.value[0],a.value[1]);if(this._keymap.set(l.key,l),r?(r[t]=l,l[n]=r):this.oldest=l,r=l,0==s--)throw new Error("overflow")}this.newest=r,this.size=this._keymap.size},r.prototype.get=function(e){var t=this._keymap.get(e);if(t)return this._markEntryAsUsed(t),t.value},r.prototype.set=function(e,r){var s=this._keymap.get(e);return s?(s.value=r,this._markEntryAsUsed(s),this):(this._keymap.set(e,s=new i(e,r)),this.newest?(this.newest[t]=s,s[n]=this.newest):this.oldest=s,this.newest=s,++this.size,this.size>this.limit&&this.shift(),this)},r.prototype.shift=function(){var e=this.oldest;if(e)return this.oldest[t]?(this.oldest=this.oldest[t],this.oldest[n]=void 0):(this.oldest=void 0,this.newest=void 0),e[t]=e[n]=void 0,this._keymap["delete"](e.key),--this.size,[e.key,e.value]},r.prototype.has=function(e){return this._keymap.has(e)}}))})(x);var D={name:"HotTable",props:v("HotTable"),watch:{mergedHotSettings:function(e){this.hotInstance&&void 0!==e&&(e.data&&(this.hotInstance.isColumnModificationAllowed()||!this.hotInstance.isColumnModificationAllowed()&&this.hotInstance.countSourceCols()===this.miscCache.currentSourceColumns)&&(this.matchHotMappersSize(),delete e.data),Object.keys(e).length?this.hotInstance.updateSettings(e):this.hotInstance.render(),this.miscCache.currentSourceColumns=this.hotInstance.countSourceCols())}},data:function(){var e=this,t=new x.LRUMap(this.wrapperRendererCacheSize);return t.shift=function(){var e=x.LRUMap.prototype.shift.call(this);return e[1].component.$destroy(),e},{__internalEdit:!1,miscCache:{currentSourceColumns:null},__hotInstance:null,columnSettings:null,rendererCache:t,editorCache:new Map,get hotInstance(){return!e.__hotInstance||e.__hotInstance&&!e.__hotInstance.isDestroyed?e.__hotInstance:(console.warn(T),null)},set hotInstance(t){e.__hotInstance=t}}},computed:{mergedHotSettings:function(){return C(this.$props,this.hotInstance?this.hotInstance.getSettings():void 0)}},methods:{hotInit:function(){var e=this.getGlobalRendererVNode(),t=this.getGlobalEditorVNode(),n=C(this.$props);n.columns=this.columnSettings?this.columnSettings:n.columns,t&&(n.editor=this.getEditorClass(t,this),t.child.$destroy()),e&&(n.renderer=this.getRendererWrapper(e,this),e.child.$destroy()),this.hotInstance=new r["a"].Core(this.$el,n),this.hotInstance.init(),O(this),this.miscCache.currentSourceColumns=this.hotInstance.countSourceCols()},matchHotMappersSize:function(){var e=this;if(this.hotInstance){var t,n=this.hotInstance.getSourceData(),r=[],i=[],s=this.hotInstance.rowIndexMapper.getNumberOfIndexes(),o=this.hotInstance.isColumnModificationAllowed(),a=0;if(n&&n.length!==s&&n.length<s)for(var l=n.length;l<s;l++)r.push(l);if(o)if(a=this.hotInstance.columnIndexMapper.getNumberOfIndexes(),n&&n[0]&&(null===(t=n[0])||void 0===t?void 0:t.length)!==a&&n[0].length<a)for(var c=n[0].length;c<a;c++)i.push(c);this.hotInstance.batch((function(){r.length>0?e.hotInstance.rowIndexMapper.removeIndexes(r):e.hotInstance.rowIndexMapper.insertIndexes(s-1,n.length-s),o&&0!==n.length&&(i.length>0?e.hotInstance.columnIndexMapper.removeIndexes(i):e.hotInstance.columnIndexMapper.insertIndexes(a-1,n[0].length-a))}))}},getGlobalRendererVNode:function(){var e=this.$slots["default"]||[];return L(e,"hot-renderer")},getGlobalEditorVNode:function(){var e=this.$slots["default"]||[];return L(e,"hot-editor")},getColumnSettings:function(){var e=N(this.$children),t=!1,n=e.map((function(e){return e.usesRendererComponent&&(t=!0),p({},e.columnSettings)}));return t&&this.settings&&(!1!==this.settings.autoColumnSize||this.settings.autoRowSize)&&(!1!==this.autoColumnSize||this.autoRowSize)&&console.warn("Your `hot-table` configuration includes both `hot-column` and `autoRowSize`/`autoColumnSize`, which are not compatible with each other in this version of `@handsontable/vue`. Disable `autoRowSize` and `autoColumnSize` to prevent row and column misalignment."),n.length?n:void 0},getRendererWrapper:function(e,t){var n=this;return function(r,i,s,o,a,l,c){if(i&&!i.getAttribute("ghost-table")){var u=n.rendererCache,h={hotInstance:r,TD:i,row:s,col:o,prop:a,value:l,cellProperties:c,isRenderer:!0};if(u&&!u.has("".concat(s,"-").concat(o))){var d=_(e,t,e.componentOptions.propsData,h);u.set("".concat(s,"-").concat(o),{component:d,lastUsedTD:null})}var m=u.get("".concat(s,"-").concat(o)),g=m.component,p=m.lastUsedTD;if(Object.assign(g.$data,h),!g.$el.parentElement||p!==i){while(i.firstChild)i.removeChild(i.firstChild);i.appendChild(g.$el),m.lastUsedTD=i}}return i}},getEditorClass:function(e,t){var n=e.key?e.key.toString():null,r=e.componentOptions.Ctor.options.name,i=n?"".concat(r,":").concat(n):r,s=this.editorCache,o=null;return s.has(i)?o=s.get(i):(o=_(e,t,e.componentOptions.propsData,{isEditor:!0}),s.set(i,o)),o.$data.hotCustomEditorClass}},mounted:function(){return this.columnSettings=this.getColumnSettings(),this.hotInit()},beforeDestroy:function(){this.hotInstance&&this.hotInstance.destroy()},version:P};function A(e,t,n,r,i,s,o,a,l,c){const u="function"===typeof n?n.options:n;return e&&e.render&&(u.render=e.render,u.staticRenderFns=e.staticRenderFns,u._compiled=!0,i&&(u.functional=!0)),n}var F=D,Y=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{attrs:{id:e.id}},[e._t("default")],2)},H=[],k=void 0,V=void 0,U=!1,W=A({render:Y,staticRenderFns:H},k,F,V,U);v("HotColumn");function X(e,t,n,r){var i,s=arguments.length,o=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(o=(s<3?i(o):s>3?i(t,n,o):i(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o}function j(e){return j="function"===typeof Symbol&&"symbol"===S(Symbol.iterator)?function(e){return S(e)}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":S(e)},j(e)}function Z(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Q(e){return K(e)||G(e)||B()}function K(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t<e.length;t++)n[t]=e[t];return n}}function G(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}function B(){throw new TypeError("Invalid attempt to spread non-iterable instance")}function J(){return"undefined"!==typeof Reflect&&Reflect.defineMetadata&&Reflect.getOwnMetadataKeys}function z(e,t){$(e,t),Object.getOwnPropertyNames(t.prototype).forEach((function(n){$(e.prototype,t.prototype,n)})),Object.getOwnPropertyNames(t).forEach((function(n){$(e,t,n)}))}function $(e,t,n){var r=n?Reflect.getOwnMetadataKeys(t,n):Reflect.getOwnMetadataKeys(t);r.forEach((function(r){var i=n?Reflect.getOwnMetadata(r,t,n):Reflect.getOwnMetadata(r,t);n?Reflect.defineMetadata(r,i,e,n):Reflect.defineMetadata(r,i,e)}))}"function"===typeof SuppressedError&&SuppressedError;var q={__proto__:[]},ee=q instanceof Array;function te(e){var t=j(e);return null==e||"object"!==t&&"function"!==t}function ne(e,t){var n=t.prototype._init;t.prototype._init=function(){var t=this,n=Object.getOwnPropertyNames(e);if(e.$options.props)for(var r in e.$options.props)e.hasOwnProperty(r)||n.push(r);n.forEach((function(n){Object.defineProperty(t,n,{get:function(){return e[n]},set:function(t){e[n]=t},configurable:!0})}))};var r=new t;t.prototype._init=n;var i={};return Object.keys(r).forEach((function(e){void 0!==r[e]&&(i[e]=r[e])})),i}var re=["data","beforeCreate","created","beforeMount","mounted","beforeDestroy","destroyed","beforeUpdate","updated","activated","deactivated","render","errorCaptured","serverPrefetch"];function ie(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t.name=t.name||e._componentTag||e.name;var n=e.prototype;Object.getOwnPropertyNames(n).forEach((function(e){if("constructor"!==e)if(re.indexOf(e)>-1)t[e]=n[e];else{var r=Object.getOwnPropertyDescriptor(n,e);void 0!==r.value?"function"===typeof r.value?(t.methods||(t.methods={}))[e]=r.value:(t.mixins||(t.mixins=[])).push({data:function(){return Z({},e,r.value)}}):(r.get||r.set)&&((t.computed||(t.computed={}))[e]={get:r.get,set:r.set})}})),(t.mixins||(t.mixins=[])).push({data:function(){return ne(this,e)}});var r=e.__decorators__;r&&(r.forEach((function(e){return e(t)})),delete e.__decorators__);var s=Object.getPrototypeOf(e.prototype),o=s instanceof i["default"]?s.constructor:i["default"],a=o.extend(t);return oe(a,e,o),J()&&z(a,e),a}var se={prototype:!0,arguments:!0,callee:!0,caller:!0};function oe(e,t,n){Object.getOwnPropertyNames(t).forEach((function(r){if(!se[r]){var i=Object.getOwnPropertyDescriptor(e,r);if(!i||i.configurable){var s=Object.getOwnPropertyDescriptor(t,r);if(!ee){if("cid"===r)return;var o=Object.getOwnPropertyDescriptor(n,r);if(!te(s.value)&&o&&o.value===s.value)return}Object.defineProperty(e,r,s)}}}))}function ae(e){return"function"===typeof e?ie(e):function(t){return ie(t,e)}}ae.registerHooks=function(e){re.push.apply(re,Q(e))};var le=function(e){function t(){var e;return a(this,t),e=o(this,t,arguments),e.name="BaseEditorComponent",e.instance=null,e.row=null,e.col=null,e.prop=null,e.TD=null,e.originalValue=null,e.cellProperties=null,e.state=null,e.hot=null,e}return d(t,e),c(t,[{key:"mounted",value:function(){var e=this;this.$data.hotCustomEditorClass=function(){var t=function(t){function n(t){var r;return a(this,n),r=o(this,n,[t]),e.$data.hotCustomEditorInstance=r,r}return d(n,t),c(n,[{key:"focus",value:function(){}},{key:"getValue",value:function(){}},{key:"setValue",value:function(){}},{key:"open",value:function(){}},{key:"close",value:function(){}}])}(r["a"].editors.BaseEditor);return Object.getOwnPropertyNames(r["a"].editors.BaseEditor.prototype).forEach((function(n){"constructor"!==n&&(t.prototype[n]=function(){for(var t,r=arguments.length,i=new Array(r),s=0;s<r;s++)i[s]=arguments[s];return(t=e[n]).call.apply(t,[this].concat(i))})})),t}()}},{key:"_fireCallbacks",value:function(){for(var e,t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];(e=r["a"].editors.BaseEditor.prototype._fireCallbacks).call.apply(e,[this.$data.hotCustomEditorInstance].concat(n))}},{key:"beginEditing",value:function(){for(var e,t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];return(e=r["a"].editors.BaseEditor.prototype.beginEditing).call.apply(e,[this.$data.hotCustomEditorInstance].concat(n))}},{key:"cancelChanges",value:function(){for(var e,t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];return(e=r["a"].editors.BaseEditor.prototype.cancelChanges).call.apply(e,[this.$data.hotCustomEditorInstance].concat(n))}},{key:"checkEditorSection",value:function(){for(var e,t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];return(e=r["a"].editors.BaseEditor.prototype.checkEditorSection).call.apply(e,[this.$data.hotCustomEditorInstance].concat(n))}},{key:"close",value:function(){for(var e,t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];return(e=r["a"].editors.BaseEditor.prototype.close).call.apply(e,[this.$data.hotCustomEditorInstance].concat(n))}},{key:"discardEditor",value:function(){for(var e,t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];return(e=r["a"].editors.BaseEditor.prototype.discardEditor).call.apply(e,[this.$data.hotCustomEditorInstance].concat(n))}},{key:"enableFullEditMode",value:function(){for(var e,t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];return(e=r["a"].editors.BaseEditor.prototype.enableFullEditMode).call.apply(e,[this.$data.hotCustomEditorInstance].concat(n))}},{key:"extend",value:function(){for(var e,t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];return(e=r["a"].editors.BaseEditor.prototype.extend).call.apply(e,[this.$data.hotCustomEditorInstance].concat(n))}},{key:"finishEditing",value:function(){for(var e,t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];return(e=r["a"].editors.BaseEditor.prototype.finishEditing).call.apply(e,[this.$data.hotCustomEditorInstance].concat(n))}},{key:"focus",value:function(){for(var e,t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];return(e=r["a"].editors.BaseEditor.prototype.focus).call.apply(e,[this.$data.hotCustomEditorInstance].concat(n))}},{key:"getValue",value:function(){for(var e,t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];return(e=r["a"].editors.BaseEditor.prototype.getValue).call.apply(e,[this.$data.hotCustomEditorInstance].concat(n))}},{key:"init",value:function(){for(var e,t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];return(e=r["a"].editors.BaseEditor.prototype.init).call.apply(e,[this.$data.hotCustomEditorInstance].concat(n))}},{key:"isInFullEditMode",value:function(){for(var e,t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];return(e=r["a"].editors.BaseEditor.prototype.isInFullEditMode).call.apply(e,[this.$data.hotCustomEditorInstance].concat(n))}},{key:"isOpened",value:function(){for(var e,t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];return(e=r["a"].editors.BaseEditor.prototype.isOpened).call.apply(e,[this.$data.hotCustomEditorInstance].concat(n))}},{key:"isWaiting",value:function(){for(var e,t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];return(e=r["a"].editors.BaseEditor.prototype.isWaiting).call.apply(e,[this.$data.hotCustomEditorInstance].concat(n))}},{key:"open",value:function(){for(var e,t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];return(e=r["a"].editors.BaseEditor.prototype.open).call.apply(e,[this.$data.hotCustomEditorInstance].concat(n))}},{key:"prepare",value:function(e,t,n,i,s,o){return this.$data.hotInstance=o.instance,this.$data.row=e,this.$data.col=t,this.$data.prop=n,this.$data.TD=i,this.$data.originalValue=s,this.$data.cellProperties=o,r["a"].editors.BaseEditor.prototype.prepare.call(this.$data.hotCustomEditorInstance,e,t,n,i,s,o)}},{key:"saveValue",value:function(){for(var e,t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];return(e=r["a"].editors.BaseEditor.prototype.saveValue).call.apply(e,[this.$data.hotCustomEditorInstance].concat(n))}},{key:"setValue",value:function(){for(var e,t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];return(e=r["a"].editors.BaseEditor.prototype.setValue).call.apply(e,[this.$data.hotCustomEditorInstance].concat(n))}},{key:"addHook",value:function(){for(var e,t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];return(e=r["a"].editors.BaseEditor.prototype.addHook).call.apply(e,[this.$data.hotCustomEditorInstance].concat(n))}},{key:"removeHooksByKey",value:function(){for(var e,t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];return(e=r["a"].editors.BaseEditor.prototype.removeHooksByKey).call.apply(e,[this.$data.hotCustomEditorInstance].concat(n))}},{key:"clearHooks",value:function(){for(var e,t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];return(e=r["a"].editors.BaseEditor.prototype.clearHooks).call.apply(e,[this.$data.hotCustomEditorInstance].concat(n))}},{key:"getEditedCell",value:function(){for(var e,t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];return(e=r["a"].editors.BaseEditor.prototype.getEditedCell).call.apply(e,[this.$data.hotCustomEditorInstance].concat(n))}},{key:"getEditedCellRect",value:function(){for(var e,t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];return(e=r["a"].editors.BaseEditor.prototype.getEditedCellRect).call.apply(e,[this.$data.hotCustomEditorInstance].concat(n))}},{key:"getEditedCellsZIndex",value:function(){for(var e,t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];return(e=r["a"].editors.BaseEditor.prototype.getEditedCellsZIndex).call.apply(e,[this.$data.hotCustomEditorInstance].concat(n))}},{key:"getEditedCellsLayerClass",value:function(){for(var e,t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];return(e=r["a"].editors.BaseEditor.prototype.getEditedCellsLayerClass).call.apply(e,[this.$data.hotCustomEditorInstance].concat(n))}}])}(i["default"]);le=X([ae({})],le)},c40d:function(e,t,n){},c4e1:function(e,t,n){"use strict";n.r(t);var r=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"editor"},[n("draggable",{style:e.draggableStyle,attrs:{group:"itxst",animation:"300",handle:".drag-handle",scroll:!0,scrollSensitivity:100,scrollSpeed:20},on:{add:e.onAdd,update:e.onDragEnd,end:e.onDragComplete},model:{value:e.comList,callback:function(t){e.comList=t},expression:"comList"}},[n("transition-group",{staticStyle:{display:"block","min-height":"100vh"}},[e._l(e.comList,(function(t,r){return[n("div",{key:r,staticClass:"layers",class:e.comIndex==r?"active-layer":""},[n("div",{staticClass:"drag-handle",attrs:{draggable:""}},[n("svg-icon",{attrs:{"icon-class":"drag"}})],1),n("div",{staticStyle:{padding:"10px 0"}},[n("el-form",{staticClass:"inline-form",attrs:{"label-position":"left"}},[n("el-row",{staticStyle:{"margin-left":"0","margin-right":"0"},attrs:{gutter:24}},[n("el-col",{attrs:{xs:24,sm:24,md:12,lg:8,xl:8}},[n("el-form-item",{attrs:{label:"模块分类:"}},[n("span",{staticStyle:{cursor:"pointer"},on:{click:function(n){return e.enableSelect(t)}}},[e._v(e._s(e.getCategory(t.category_id)))])])],1),n("el-col",{attrs:{xs:24,sm:24,md:12,lg:8,xl:8}},[n("el-form-item",{attrs:{label:"模块名称:"}},[n("span",{staticStyle:{cursor:"pointer"},on:{click:function(n){return e.enableName(t)}}},[e._v(e._s(t.dcb_name))])])],1),n("el-col",{attrs:{xs:24,sm:24,md:12,lg:8,xl:8}},[n("el-form-item",[n("div",{staticClass:"btn-save"},["document"!==e.type?n("el-tooltip",{staticClass:"item",attrs:{effect:"dark",content:"保存模块",placement:"top"}},[n("el-button",{attrs:{icon:"el-icon-document-add",circle:""},on:{click:function(n){return e.onSaveTemplate(t)}}})],1):e._e(),1!==t.isEdit?n("el-button",{attrs:{circle:"",icon:"el-icon-edit"},on:{click:function(t){return e.onEdit(r,1)}}}):n("el-button",{attrs:{circle:"",icon:"el-icon-view"},on:{click:function(t){return e.onEdit(r,2)}}}),n("el-tooltip",{staticClass:"item",attrs:{effect:"dark",content:"删除",placement:"top"}},[n("el-button",{attrs:{circle:"",icon:"el-icon-delete"},on:{click:function(t){return e.onRemove(r)}}})],1)],1)])],1)],1)],1)],1),n("div",{staticClass:"main",on:{click:function(t){return e.onSetActive(r)}}},[n(t.type,{ref:"component_"+r,refInFor:!0,tag:"component",attrs:{com:t,coms:e.comList,currentIndex:r,isAdmin:e.isAdmin,insertCmd:e.insertCmd,isEdit:t.isEdit},on:{onUpdate:e.onUpdate,onUpdateAttr:e.onUpdateAttr,onUpdata:e.onUpdata,onUpdateProdAttr:e.onUpdateProdAttr,updateComContent:e.handleComContentUpdate}})],1)])]})),e.comList.length<=0?[n("div",{key:-1,staticClass:"editor-empty"},[n("el-empty",{attrs:{description:"请拖放组件至当前页面"}})],1)]:e._e()],2)],1)],1)},i=[],s=n("c7eb"),o=n("1da1"),a=n("b85c"),l=n("2909"),c=n("53ca"),u=n("5530"),h=(n("4de4"),n("caad"),n("a15b"),n("d81d"),n("14d9"),n("fb6a"),n("b0c0"),n("e9c4"),n("4ec9"),n("a9e3"),n("b64b"),n("d3b7"),n("ac1f"),n("2532"),n("3ca3"),n("466d"),n("2ca0"),n("498a"),n("0643"),n("2382"),n("4e3e"),n("a573"),n("159b"),n("ddb0"),n("b76a")),d=n.n(h),m=n("9fdb"),g=n("7cb9"),p=n("0fe1"),f=n("c621"),R={name:"editor",emits:["onSetActiveIndex","onDelete","onInsert","onLoadArticle","onRebuild","onSetComs"],components:{Table:m["default"],TextArea:g["default"],draggable:d.a,Empty:p["default"]},props:{coms:{type:Array,default:null},comIndex:{type:Number,default:0},templateCate:{type:Array,default:function(){return[]}},insertCmd:{type:Object,default:null},isAdmin:{type:Number,default:2}},watch:{coms:{handler:function(e){null!=e&&(this.comList=e.map((function(e){var t=Object(u["a"])(Object(u["a"])({},e),{},{dcb_attrs:Array.isArray(e.attrs)?e.attrs:JSON.parse(e.attrs||"[]"),content:e.content||e.dcb_nr||"",dcb_nr:e.content||e.dcb_nr||"",type:e.dcb_type||e.type,name:e.dcb_name||e.name});return console.log("processedItem:",t),t.content!==t.dcb_nr&&(t.dcb_nr=t.content),t})),this.$emit("onSetComs:",this.comList))},immediate:!0,deep:!0},comIndex:{handler:function(e){e<=0||(this.comList=this.comList.map((function(e){return e.isEdit=2,e.selDisabled=!0,e.valDisabled=!0,"string"===typeof e.category_id&&e.category_id.includes(" ")?e.category_id=e.category_id.split(" "):Array.isArray(e.category_id)||(e.category_id=[e.category_id].filter(Boolean)),e})))},immediate:!0,deep:!0}},data:function(){return{showEditor:!1,operation:"",id:0,comList:[],categoryList:[],props:{value:"id",label:"name",children:"children",checkStrictly:!0},saveAs:!1,draggableStyle:{width:"100%",overflowY:"auto"},type:""}},mounted:function(){var e=this;console.log(this.$store.state),this.initCategoryList(),this.type=this.$route.query.type,this.templateId=this.$route.query.templateId,this.$nextTick((function(){e.updateDirectoryNumbers()}))},methods:{onDragComplete:function(){var e=this;console.log("拖动结束"),this.$nextTick((function(){e.updateDirectoryNumbers(),e.$emit("onRebuild",e.comList)}))},updateDirectoryNumbers:function(){var e=this,t={};this.comList.forEach((function(n,r){n.attrs&&n.attrs.forEach((function(n){if("Directory"===n.type){var i=e.generateNumberedContent(r,n.level,t);n.hasOwnProperty("number")?n.number=i:e.$set(n,"number",i)}}))}))},generateNumberedContent:function(e,t,n){return this.generateLevelPrefix(e,t,n)},generateLevelPrefix:function(e,t,n){for(var r=[],i=1;i<=t;i++)1===i?r.push(e+1):(n[i]?n[i]++:n[i]=1,r.push(n[i]));return r.join(".")},carefulCopy:function(e){return e.map((function(e){var t=Object(u["a"])({},e);return Array.isArray(t.attrs)&&(t.attrs=t.attrs.map((function(e){return Object(u["a"])({},e)}))),"object"===Object(c["a"])(t.content)&&null!==t.content&&(t.content=JSON.parse(JSON.stringify(t.content))),"Table"===t.type&&(t.tableHeader=Object(l["a"])(t.tableHeader),t.tableData=t.tableData.map((function(e){return Object(u["a"])({},e)}))),t}))},handleComContentUpdate:function(e,t){this.$set(this.coms,e,t),this.$emit("onRebuild",this.coms)},showCategoryName:function(e){return"module"==this.type&&!e.valDisabled},enableName:function(e){e.valDisabled=!1,this.$forceUpdate()},showCategorySelect:function(e){return"module"===this.type&&!e.selDisabled},enableSelect:function(e){e.selDisabled=!0,console.log(e),this.$forceUpdate()},getCategory:function(e){var t=function(e,n){var r,i=Object(a["a"])(e);try{for(i.s();!(r=i.n()).done;){var s=r.value;if(s.id===n)return s.name;if(s.children){var o=t(s.children,n);if(o)return o}}}catch(l){i.e(l)}finally{i.f()}return null};return t(this.categoryList,e)||"请选择分类"},onSaveAs:function(e){this.saveAs=!0,this.onSaveTemplate(e)},onSaveTemplate:function(e){var t=this,n=this,r={};Object.keys(e).forEach((function(t){t.startsWith("dcb_")&&(r[t]=e[t])})),r.dcb_nr=e.content,r.dcb_attrs=JSON.stringify(e.attrs),r.dcb_type=e.type,r.dcb_name=e.name,Array.isArray(e.category_id)?r.category_id=e.category_id[e.category_id.length-1]:r.category_id=e.category_id,r.status=5,void 0==e.dcb_id||this.saveAs?Object(f["a"])(r).then((function(r){200==r.code&&(e.id=r.data,n.$alert("模块信息保存成功"),n.$emit("onRefresh"),t.saveAs=!1,e.selDisabled=!1,e.valDisabled=!1,t.$forceUpdate())})):Object(f["l"])(r).then((function(r){200==r.code&&(n.$alert("模块信息更新成功"),n.$emit("onRefresh"),e.selDisabled=!1,e.valDisabled=!1,t.$forceUpdate())}))},initCategoryList:function(){var e=this;return Object(o["a"])(Object(s["a"])().mark((function t(){var n;return Object(s["a"])().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return e,t.next=3,Object(f["k"])();case 3:n=t.sent,console.log(n),e.categoryList=n.data;case 6:case"end":return t.stop()}}),t)})))()},processDataForCascader:function(e){console.log("Raw data:",e);var t=new Map,n=[];return e.forEach((function(e){var n=Object(u["a"])(Object(u["a"])({},e),{},{children:[]});t.set(e.id,n)})),e.forEach((function(e){if("0"===e.parent_id||0===e.parent_id)n.push(t.get(e.id));else{var r=t.get(parseInt(e.parent_id));r?r.children.push(t.get(e.id)):(console.warn("Parent with id ".concat(e.parent_id," not found for item:"),e),n.push(t.get(e.id)))}})),console.log("Processed data:",n),n},onChangeCategory:function(e,t){var n=t[t.length-1];e.category_id=n},onUpdateProdAttr:function(e,t,n){this.comList[e].attrs[t].content=n;for(var r=this.comList[e].attrs[t].attrs.name,i=this.comList[e].attrs[t].attrs.type,s=0;s<this.comList.length;s++)for(var o=0;o<this.comList[s].attrs.length;o++)"ProductAttr"==this.comList[s].attrs[o].type&&this.comList[s].attrs[o].attrs.name==r&&this.comList[s].attrs[o].attrs.type==i&&(this.comList[s].attrs[o].content=n);this.$emit("onRebuild",this.comList)},onUpdateAttr:function(e,t,n){console.log(e,t,n),this.comList[e].attrs[t].content=n;for(var r=this.comList[e].attrs[t].type,i=this.comList[e].attrs[t].data,s=0;s<this.comList.length;s++)for(var o=0;o<this.comList[s].attrs.length;o++)this.comList[s].attrs[o].type==r&&this.comList[s].attrs[o].id==i&&(this.comList[s].attrs[o].content=n);this.$emit("onRebuild",this.comList)},onUpdata:function(e,t,n,r,i){var s=this,o=s.coms[e];if("variableNull"===i)o&&o.attrs&&o.attrs[t]&&o.attrs[t].id===n&&this.$set(o.attrs[t],"content",r);else for(var a=o.attrs[t].type,l=0;l<s.coms.length;l++)for(var c=0;c<s.coms[l].attrs.length;c++)s.coms[l].attrs[c].type==a&&s.coms[l].attrs[c].id==n&&(s.coms[l].attrs[c].content=r);s.$emit("onRebuild",s.coms)},onRemove:function(e){var t=this;this.$confirm("此操作将删除该模块, 是否继续?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){t.$emit("onDelete",e)})).catch((function(){t.$message({type:"info",message:"已取消删除"})}))},onEdit:function(e,t){var n=this;this.comList=this.comList.map((function(r,i){return r.isEdit=2,i===e&&2===t&&n.$nextTick((function(){console.log(111);var e=n.$refs["component_".concat(i)];e&&e.save&&e.save()})),i===e&&1===t&&n.filterAttrs(r),r})),1==t&&(this.comList[e].isEdit=1,this.onSetActive(e)),this.$emit("onRebuild",this.comList)},filterAttrs:function(e){var t=(e.dcb_nr.match(/{{([^}]+)}}/g)||[]).map((function(e){return e.slice(2,-2).trim()}));e.attrs=e.attrs.filter((function(e){return t.includes(e.id)}))},onAdd:function(e){e.preventDefault(),e.stopPropagation(),this.$emit("onRebuild",this.comList)},onDragEnd:function(e){e.preventDefault(),e.stopPropagation(),this.$emit("onRebuild",this.comList)},onUpdate:function(e,t){this.coms[e].content=t,this.$emit("onRebuild",this.coms)},onSetActive:function(e){this.$emit("onSetActiveIndex",e)}}},y=R,M=(n("e97c"),n("2877")),S=Object(M["a"])(y,r,i,!1,null,null,null);t["default"]=S.exports},c4fa:function(e,t,n){"use strict";n.d(t,"b",(function(){return r})),n.d(t,"a",(function(){return i}));const r="gridDefault",i="editorManager.handlingEditor"},c5cd:function(e,t,n){"use strict";n.d(t,"a",(function(){return u})),n.d(t,"b",(function(){return h}));n("d9e2");var r=n("7b9c"),i=n("351d"),s=n("7ae0");function o(e,t,n){return(t=a(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function a(e){var t=l(e,"string");return"symbol"==typeof t?t:t+""}function l(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}let c=0;class u{constructor(){o(this,"collection",new Map)}register(e,t){!1===this.collection.has(e)&&(this.collection.set(e,t),t.addLocalHook("change",()=>this.runLocalHooks("change",t)),c+=1)}unregister(e){const t=this.collection.get(e);Object(r["isDefined"])(t)&&(t.destroy(),this.collection.delete(e),this.runLocalHooks("change",t),c-=1)}unregisterAll(){this.collection.forEach((e,t)=>this.unregister(t)),this.collection.clear()}get(e){return Object(r["isUndefined"])(e)?Array.from(this.collection.values()):this.collection.get(e)}getLength(){return this.collection.size}removeFromEvery(e){this.collection.forEach(t=>{t.remove(e)})}insertToEvery(e,t){this.collection.forEach(n=>{n.insert(e,t)})}initEvery(e){this.collection.forEach(t=>{t.init(e)})}}function h(){return c}Object(i["mixin"])(u,s["a"])},c5d0:function(e,t,n){"use strict";var r=n("23e7"),i=n("857a"),s=n("af03");r({target:"String",proto:!0,forced:s("italics")},{italics:function(){return i(this,"i","","")}})},c621:function(e,t,n){"use strict";n.d(t,"j",(function(){return i})),n.d(t,"b",(function(){return s})),n.d(t,"m",(function(){return o})),n.d(t,"f",(function(){return a})),n.d(t,"d",(function(){return l})),n.d(t,"h",(function(){return c})),n.d(t,"i",(function(){return u})),n.d(t,"g",(function(){return h})),n.d(t,"c",(function(){return d})),n.d(t,"a",(function(){return m})),n.d(t,"l",(function(){return g})),n.d(t,"e",(function(){return p})),n.d(t,"k",(function(){return f}));var r=n("b775");function i(e){return Object(r["a"])({url:"/template/category/search",method:"post",data:e})}function s(e){return Object(r["a"])({url:"/template/category/create",method:"post",data:e})}function o(e){return Object(r["a"])({url:"/template/category/update",method:"post",data:e})}function a(e){return Object(r["a"])({url:"/template/category/info",method:"post",data:e})}function l(e){return Object(r["a"])({url:"/template/category/delete/".concat(e),method:"get"})}function c(e){return Object(r["a"])({url:"/document/block/list",method:"post",data:e})}function u(e){return Object(r["a"])({url:"/template/search",method:"post",data:e})}function h(e){return Object(r["a"])({url:"/document/block/info/".concat(e),method:"get"})}function d(e){return Object(r["a"])({url:"/document/block/dele/".concat(e),method:"get"})}function m(e){return Object(r["a"])({url:"/document/block/add",method:"post",data:e})}function g(e){return Object(r["a"])({url:"/document/block/edit",method:"post",data:e})}function p(e){return Object(r["a"])({url:"/template/category/allList",method:"post",data:e})}function f(e){return Object(r["a"])({url:"/template/category/treeCategory",method:"post",data:e})}},c62c:function(e,t,n){"use strict";n("20b7")},c6a7:function(e,t,n){"use strict";e.exports="function"==typeof Bun&&Bun&&"string"==typeof Bun.version},c7aa:function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
  314. //! moment.js locale configuration
  315. var t=e.defineLocale("he",{months:"ינואר_פברואר_מרץ_אפריל_מאי_יוני_יולי_אוגוסט_ספטמבר_אוקטובר_נובמבר_דצמבר".split("_"),monthsShort:"ינו׳_פבר׳_מרץ_אפר׳_מאי_יוני_יולי_אוג׳_ספט׳_אוק׳_נוב׳_דצמ׳".split("_"),weekdays:"ראשון_שני_שלישי_רביעי_חמישי_שישי_שבת".split("_"),weekdaysShort:"א׳_ב׳_ג׳_ד׳_ה׳_ו׳_ש׳".split("_"),weekdaysMin:"א_ב_ג_ד_ה_ו_ש".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D [ב]MMMM YYYY",LLL:"D [ב]MMMM YYYY HH:mm",LLLL:"dddd, D [ב]MMMM YYYY HH:mm",l:"D/M/YYYY",ll:"D MMM YYYY",lll:"D MMM YYYY HH:mm",llll:"ddd, D MMM YYYY HH:mm"},calendar:{sameDay:"[היום ב־]LT",nextDay:"[מחר ב־]LT",nextWeek:"dddd [בשעה] LT",lastDay:"[אתמול ב־]LT",lastWeek:"[ביום] dddd [האחרון בשעה] LT",sameElse:"L"},relativeTime:{future:"בעוד %s",past:"לפני %s",s:"מספר שניות",ss:"%d שניות",m:"דקה",mm:"%d דקות",h:"שעה",hh:function(e){return 2===e?"שעתיים":e+" שעות"},d:"יום",dd:function(e){return 2===e?"יומיים":e+" ימים"},M:"חודש",MM:function(e){return 2===e?"חודשיים":e+" חודשים"},y:"שנה",yy:function(e){return 2===e?"שנתיים":e%10===0&&10!==e?e+" שנה":e+" שנים"}},meridiemParse:/אחה"צ|לפנה"צ|אחרי הצהריים|לפני הצהריים|לפנות בוקר|בבוקר|בערב/i,isPM:function(e){return/^(אחה"צ|אחרי הצהריים|בערב)$/.test(e)},meridiem:function(e,t,n){return e<5?"לפנות בוקר":e<10?"בבוקר":e<12?n?'לפנה"צ':"לפני הצהריים":e<18?n?'אחה"צ':"אחרי הצהריים":"בערב"}});return t}))},c7cc:function(e,t,n){"use strict";n.r(t);var r=n("c88e"),i=n.n(r);for(var s in r)["default"].indexOf(s)<0&&function(e){n.d(t,e,(function(){return r[e]}))}(s);t["default"]=i.a},c88e:function(e,t){},c8f3:function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
  316. //! moment.js locale configuration
  317. var t=e.defineLocale("sq",{months:"Janar_Shkurt_Mars_Prill_Maj_Qershor_Korrik_Gusht_Shtator_Tetor_Nëntor_Dhjetor".split("_"),monthsShort:"Jan_Shk_Mar_Pri_Maj_Qer_Kor_Gus_Sht_Tet_Nën_Dhj".split("_"),weekdays:"E Diel_E Hënë_E Martë_E Mërkurë_E Enjte_E Premte_E Shtunë".split("_"),weekdaysShort:"Die_Hën_Mar_Mër_Enj_Pre_Sht".split("_"),weekdaysMin:"D_H_Ma_Më_E_P_Sh".split("_"),weekdaysParseExact:!0,meridiemParse:/PD|MD/,isPM:function(e){return"M"===e.charAt(0)},meridiem:function(e,t,n){return e<12?"PD":"MD"},longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Sot në] LT",nextDay:"[Nesër në] LT",nextWeek:"dddd [në] LT",lastDay:"[Dje në] LT",lastWeek:"dddd [e kaluar në] LT",sameElse:"L"},relativeTime:{future:"në %s",past:"%s më parë",s:"disa sekonda",ss:"%d sekonda",m:"një minutë",mm:"%d minuta",h:"një orë",hh:"%d orë",d:"një ditë",dd:"%d ditë",M:"një muaj",MM:"%d muaj",y:"një vit",yy:"%d vite"},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}});return t}))},cb27:function(e,t,n){"use strict";var r=n("e330"),i=Set.prototype;e.exports={Set:Set,add:r(i.add),has:r(i.has),remove:r(i["delete"]),proto:i}},cc6f:function(e,t,n){"use strict";n.d(t,"a",(function(){return ha})),n.d(t,"b",(function(){return Wt}));var r,i,s={};n.r(s),n.d(s,"AddressPlugin",(function(){return Ma})),n.d(s,"ArrayPlugin",(function(){return Sa})),n.d(s,"AbsPlugin",(function(){return ba})),n.d(s,"BitShiftPlugin",(function(){return va})),n.d(s,"BitwiseLogicOperationsPlugin",(function(){return Na})),n.d(s,"BooleanPlugin",(function(){return _a})),n.d(s,"CharPlugin",(function(){return Ia})),n.d(s,"CodePlugin",(function(){return Pa})),n.d(s,"CountBlankPlugin",(function(){return xa})),n.d(s,"CountUniquePlugin",(function(){return Da})),n.d(s,"DateTimePlugin",(function(){return Aa})),n.d(s,"DegreesPlugin",(function(){return Va})),n.d(s,"DeltaPlugin",(function(){return Ua})),n.d(s,"ExpPlugin",(function(){return Wa})),n.d(s,"FinancialPlugin",(function(){return Xa})),n.d(s,"FormulaTextPlugin",(function(){return Ba})),n.d(s,"HyperlinkPlugin",(function(){return Ja})),n.d(s,"InformationPlugin",(function(){return za})),n.d(s,"IsEvenPlugin",(function(){return $a})),n.d(s,"IsOddPlugin",(function(){return qa})),n.d(s,"LogarithmPlugin",(function(){return el})),n.d(s,"MathConstantsPlugin",(function(){return nl})),n.d(s,"MatrixPlugin",(function(){return sl})),n.d(s,"MedianPlugin",(function(){return ol})),n.d(s,"ModuloPlugin",(function(){return al})),n.d(s,"NumericAggregationPlugin",(function(){return ul})),n.d(s,"PowerPlugin",(function(){return ml})),n.d(s,"RadiansPlugin",(function(){return gl})),n.d(s,"RadixConversionPlugin",(function(){return Sl})),n.d(s,"RandomPlugin",(function(){return Ll})),n.d(s,"RoundingPlugin",(function(){return Il})),n.d(s,"SqrtPlugin",(function(){return Pl})),n.d(s,"ConditionalAggregationPlugin",(function(){return Zl})),n.d(s,"SumprodPlugin",(function(){return Ql})),n.d(s,"TextPlugin",(function(){return Kl})),n.d(s,"TrigonometryPlugin",(function(){return Gl})),n.d(s,"LookupPlugin",(function(){return Jl})),n.d(s,"RomanPlugin",(function(){return zl})),n.d(s,"SimpleArithmerticPlugin",(function(){return tc})),n.d(s,"StatisticalPlugin",(function(){return zc})),n.d(s,"MathPlugin",(function(){return $c})),n.d(s,"ComplexPlugin",(function(){return nu})),n.d(s,"StatisticalAggregationPlugin",(function(){return pu})),function(e){e["RELATIVE"]="RELATIVE",e["ABSOLUTE"]="ABSOLUTE"}(r||(r={}));class o{constructor(e,t,n){this.type=e,this.col=t,this.sheet=n}static absolute(e,t){return new o(r.ABSOLUTE,e,t)}static relative(e,t){return new o(r.RELATIVE,e,t)}static compareByAbsoluteAddress(e){return(t,n)=>t.toSimpleColumnAddress(e).col-n.toSimpleColumnAddress(e).col}isColumnAbsolute(){return this.type===r.ABSOLUTE}isColumnRelative(){return this.type===r.RELATIVE}isAbsolute(){return this.type===r.ABSOLUTE&&void 0!==this.sheet}moved(e,t,n){const r=void 0===this.sheet?void 0:e;return new o(this.type,this.col+t,r)}shiftedByColumns(e){return new o(this.type,this.col+e,this.sheet)}toSimpleColumnAddress(e){const t=yr(this,e);let n=this.col;return this.isColumnRelative()&&(n=e.col+this.col),hr(t,n)}shiftRelativeDimensions(e,t){const n=this.isColumnRelative()?this.col+e:this.col;return new o(this.type,n,this.sheet)}shiftAbsoluteDimensions(e,t){const n=this.isColumnAbsolute()?this.col+e:this.col;return new o(this.type,n,this.sheet)}withSheet(e){return new o(this.type,this.col,e)}isInvalid(e){return this.toSimpleColumnAddress(e).col<0}hash(e){const t=e&&void 0!==this.sheet?"#"+this.sheet:"";switch(this.type){case r.RELATIVE:return`${t}#COLR${this.col}`;case r.ABSOLUTE:return`${t}#COLA${this.col}`}}unparse(e){const t=this.toSimpleColumnAddress(e);if(dr(t))return;const n=H(t.col),i=this.type===r.ABSOLUTE?"$":"";return`${i}${n}`}exceedsSheetSizeLimits(e){return this.col>=e}}
  318. /**
  319. * @license
  320. * Copyright (c) 2024 Handsoncode. All rights reserved.
  321. */class a{constructor(e,t,n){this.type=e,this.row=t,this.sheet=n}static absolute(e,t){return new a(r.ABSOLUTE,e,t)}static relative(e,t){return new a(r.RELATIVE,e,t)}static compareByAbsoluteAddress(e){return(t,n)=>t.toSimpleRowAddress(e).row-n.toSimpleRowAddress(e).row}isRowAbsolute(){return this.type===r.ABSOLUTE}isRowRelative(){return this.type===r.RELATIVE}isAbsolute(){return this.type===r.ABSOLUTE&&void 0!==this.sheet}moved(e,t,n){const r=void 0===this.sheet?void 0:e;return new a(this.type,this.row+n,r)}shiftedByRows(e){return new a(this.type,this.row+e,this.sheet)}toSimpleRowAddress(e){const t=yr(this,e);let n=this.row;return this.isRowRelative()&&(n=e.row+this.row),cr(t,n)}shiftRelativeDimensions(e,t){const n=this.isRowRelative()?this.row+t:this.row;return new a(this.type,n,this.sheet)}shiftAbsoluteDimensions(e,t){const n=this.isRowAbsolute()?this.row+t:this.row;return new a(this.type,n,this.sheet)}withSheet(e){return new a(this.type,this.row,e)}isInvalid(e){return this.toSimpleRowAddress(e).row<0}hash(e){const t=e&&void 0!==this.sheet?"#"+this.sheet:"";switch(this.type){case r.RELATIVE:return`${t}#ROWR${this.row}`;case r.ABSOLUTE:return`${t}#ROWA${this.row}`}}unparse(e){const t=this.toSimpleRowAddress(e);if(ur(t))return;const n=this.type===r.ABSOLUTE?"$":"";return`${n}${t.row+1}`}exceedsSheetSizeLimits(e){return this.row>=e}}
  322. /**
  323. * @license
  324. * Copyright (c) 2024 Handsoncode. All rights reserved.
  325. */(function(e){e["CELL_REFERENCE_RELATIVE"]="CELL_REFERENCE",e["CELL_REFERENCE_ABSOLUTE"]="CELL_REFERENCE_ABSOLUTE",e["CELL_REFERENCE_ABSOLUTE_COL"]="CELL_REFERENCE_ABSOLUTE_COL",e["CELL_REFERENCE_ABSOLUTE_ROW"]="CELL_REFERENCE_ABSOLUTE_ROW"})(i||(i={}));class l{constructor(e,t,n,r){this.col=e,this.row=t,this.type=n,this.sheet=r}static fromColAndRow(e,t,n){const r=e.isColumnAbsolute()&&t.isRowAbsolute()?l.absolute.bind(this):e.isColumnAbsolute()?l.absoluteCol.bind(this):t.isRowAbsolute()?l.absoluteRow.bind(this):l.relative.bind(this);return r(e.col,t.row,n)}static relative(e,t,n){return new l(e,t,i.CELL_REFERENCE_RELATIVE,n)}static absolute(e,t,n){return new l(e,t,i.CELL_REFERENCE_ABSOLUTE,n)}static absoluteCol(e,t,n){return new l(e,t,i.CELL_REFERENCE_ABSOLUTE_COL,n)}static absoluteRow(e,t,n){return new l(e,t,i.CELL_REFERENCE_ABSOLUTE_ROW,n)}toSimpleCellAddress(e){const t=yr(this,e);return this.type===i.CELL_REFERENCE_ABSOLUTE?mr(t,this.col,this.row):this.type===i.CELL_REFERENCE_ABSOLUTE_ROW?mr(t,e.col+this.col,this.row):this.type===i.CELL_REFERENCE_ABSOLUTE_COL?mr(t,this.col,e.row+this.row):mr(t,e.col+this.col,e.row+this.row)}toColumnAddress(){const e=this.isColumnRelative()?r.RELATIVE:r.ABSOLUTE;return new o(e,this.col,this.sheet)}toRowAddress(){const e=this.isRowRelative()?r.RELATIVE:r.ABSOLUTE;return new a(e,this.row,this.sheet)}toSimpleColumnAddress(e){const t=yr(this,e);let n=this.col;return this.isColumnRelative()&&(n+=e.col),hr(t,n)}toSimpleRowAddress(e){const t=yr(this,e);let n=this.row;return this.isRowRelative()&&(n+=e.row),cr(t,n)}isRowAbsolute(){return this.type===i.CELL_REFERENCE_ABSOLUTE||this.type===i.CELL_REFERENCE_ABSOLUTE_ROW}isColumnAbsolute(){return this.type===i.CELL_REFERENCE_ABSOLUTE||this.type===i.CELL_REFERENCE_ABSOLUTE_COL}isColumnRelative(){return this.type===i.CELL_REFERENCE_RELATIVE||this.type===i.CELL_REFERENCE_ABSOLUTE_ROW}isRowRelative(){return this.type===i.CELL_REFERENCE_RELATIVE||this.type===i.CELL_REFERENCE_ABSOLUTE_COL}isAbsolute(){return this.type===i.CELL_REFERENCE_ABSOLUTE&&void 0!==this.sheet}shiftedByRows(e){return new l(this.col,this.row+e,this.type,this.sheet)}shiftedByColumns(e){return new l(this.col+e,this.row,this.type,this.sheet)}moved(e,t,n){const r=void 0===this.sheet?void 0:e;return new l(this.col+t,this.row+n,this.type,r)}withSheet(e){return new l(this.col,this.row,this.type,e)}isInvalid(e){return gr(this.toSimpleCellAddress(e))}shiftRelativeDimensions(e,t){const n=this.isColumnAbsolute()?this.col:this.col+e,r=this.isRowAbsolute()?this.row:this.row+t;return new l(n,r,this.type,this.sheet)}shiftAbsoluteDimensions(e,t){const n=this.isColumnRelative()?this.col:this.col+e,r=this.isRowRelative()?this.row:this.row+t;return new l(n,r,this.type,this.sheet)}hash(e){const t=e&&void 0!==this.sheet?"#"+this.sheet:"";switch(this.type){case i.CELL_REFERENCE_RELATIVE:return`${t}#${this.row}R${this.col}`;case i.CELL_REFERENCE_ABSOLUTE:return`${t}#${this.row}A${this.col}`;case i.CELL_REFERENCE_ABSOLUTE_COL:return`${t}#${this.row}AC${this.col}`;case i.CELL_REFERENCE_ABSOLUTE_ROW:return`${t}#${this.row}AR${this.col}`}}unparse(e){const t=this.toSimpleCellAddress(e);if(gr(t))return;const n=H(t.col),r=this.type===i.CELL_REFERENCE_ABSOLUTE||this.type===i.CELL_REFERENCE_ABSOLUTE_ROW?"$":"",s=this.type===i.CELL_REFERENCE_ABSOLUTE||this.type===i.CELL_REFERENCE_ABSOLUTE_COL?"$":"";return`${s}${n}${r}${t.row+1}`}exceedsSheetSizeLimits(e,t){return this.row>=t||this.col>=e}}
  326. /**
  327. * @license
  328. * Copyright (c) 2024 Handsoncode. All rights reserved.
  329. */const c=":",u="$",h="\\s+",d="[ \\t\\n\\r]+",m="A-Za-zÀ-ʯ",g=m+"0-9_.",p=`[${m}0-9_]+`,f="'(((?!').|'')*)'",R=`(${p}|${f})!`,y=`(${R})?\\${u}?[A-Za-z]+\\${u}?[0-9]+`,M=`(${R})?\\${u}?[A-Za-z]+`,S=`(${R})?\\${u}?[0-9]+`,b="[rR][0-9]*[cC][0-9]*",w=`(${y})[^${g}]`,T=`[${m}_][${g}]*`,O=["0","1","2","3","4","5","6","7","8","9"],v=[...Array.from(Array(26)).map((e,t)=>t+"A".charCodeAt(0)),...Array.from(Array(26)).map((e,t)=>t+"a".charCodeAt(0)),...Array.from(Array(496)).map((e,t)=>t+192)].map(e=>String.fromCharCode(e)),E=new RegExp(`^(${R})?(\\${u}?)([A-Za-z]+)(\\${u}?)([0-9]+)$`),C=new RegExp(`^(${R})?(\\${u}?)([A-Za-z]+)$`),L=new RegExp(`^(${R})?(\\${u}?)([0-9]+)$`),N=new RegExp(`^${p}$`),_=(e,t,n)=>{const r=E.exec(t),i=Y(r[6]);let s=V(r,e);if(void 0===s)return;null===s&&(s=void 0);const o=Number(r[8])-1;return r[5]===u&&r[7]===u?l.absolute(i,o,s):r[5]===u?l.absoluteCol(i,o-n.row,s):r[7]===u?l.absoluteRow(i-n.col,o,s):l.relative(i-n.col,o-n.row,s)},I=(e,t,n)=>{const r=C.exec(t);let i=V(r,e);if(void 0===i)return;null===i&&(i=void 0);const s=Y(r[6]);return r[5]===u?o.absolute(s,i):o.relative(s-n.col,i)},P=(e,t,n)=>{const r=L.exec(t);let i=V(r,e);if(void 0===i)return;null===i&&(i=void 0);const s=Number(r[6])-1;return r[5]===u?a.absolute(s,i):a.relative(s-n.row,i)},x=(e,t,n)=>{const r=E.exec(t);if(!r)return;const i=Y(r[6]);let s=V(r,e);if(void 0===s)return;null===s&&(s=n);const o=Number(r[8])-1;return mr(s,i,o)},D=(e,t,n)=>{const r=t.split(c);if(2!==r.length)return;const[i,s]=r,o=x(e,i,n);if(void 0===o)return;const a=x(e,s,o.sheet);return void 0!==a&&o.sheet===a.sheet?wr(o,a):void 0},A=(e,t,n)=>{const r=H(t.col),i=k(t.sheet,e);if(void 0!==i)return n!==t.sheet?`${i}!${r}${t.row+1}`:`${r}${t.row+1}`},F=(e,t,n)=>{const r=A(e,t.start,n),i=A(e,t.end,t.start.sheet);return void 0===r||void 0===i?void 0:`${r}${c}${i}`};function Y(e){return 1===e.length?e.toUpperCase().charCodeAt(0)-65:e.split("").reduce((e,t)=>26*e+(t.toUpperCase().charCodeAt(0)-64),0)-1}function H(e){let t="";while(e>=0)t=String.fromCharCode(e%26+97)+t,e=Math.floor(e/26)-1;return t.toUpperCase()}function k(e,t){let n=t(e);if(void 0!==n)return N.test(n)?n:(n=n.replace(/'/g,"''"),`'${n}'`)}function V(e,t){var n;let r=null!==(n=e[3])&&void 0!==n?n:e[2];return r?(r=r.replace(/''/g,"'"),t(r)):null}var U=n("fa83");
  330. /**
  331. * @license
  332. * Copyright (c) 2024 Handsoncode. All rights reserved.
  333. */const W=(e,t)=>({type:e,message:t});var X,j,Z;(function(e){e["LexingError"]="LexingError",e["ParserError"]="ParsingError",e["StaticOffsetError"]="StaticOffsetError",e["StaticOffsetOutOfRangeError"]="StaticOffsetOutOfRangeError",e["RangeOffsetNotAllowed"]="RangeOffsetNotAllowed",e["InvalidRangeSize"]="InvalidRangeSize"})(X||(X={})),function(e){e["EMPTY"]="EMPTY",e["NUMBER"]="NUMBER",e["STRING"]="STRING",e["MINUS_UNARY_OP"]="MINUS_UNARY_OP",e["PLUS_UNARY_OP"]="PLUS_UNARY_OP",e["PERCENT_OP"]="PERCENT_OP",e["CONCATENATE_OP"]="CONCATENATE_OP",e["EQUALS_OP"]="EQUALS_OP",e["NOT_EQUAL_OP"]="NOT_EQUAL_OP",e["GREATER_THAN_OP"]="GREATER_THAN_OP",e["LESS_THAN_OP"]="LESS_THAN_OP",e["GREATER_THAN_OR_EQUAL_OP"]="GREATER_THAN_OR_EQUAL_OP",e["LESS_THAN_OR_EQUAL_OP"]="LESS_THAN_OR_EQUAL_OP",e["PLUS_OP"]="PLUS_OP",e["MINUS_OP"]="MINUS_OP",e["TIMES_OP"]="TIMES_OP",e["DIV_OP"]="DIV_OP",e["POWER_OP"]="POWER_OP",e["FUNCTION_CALL"]="FUNCTION_CALL",e["NAMED_EXPRESSION"]="NAMED_EXPRESSION",e["PARENTHESIS"]="PARENTHESES",e["CELL_REFERENCE"]="CELL_REFERENCE",e["CELL_RANGE"]="CELL_RANGE",e["COLUMN_RANGE"]="COLUMN_RANGE",e["ROW_RANGE"]="ROW_RANGE",e["ERROR"]="ERROR",e["ERROR_WITH_RAW_INPUT"]="ERROR_WITH_RAW_INPUT",e["ARRAY"]="ARRAY"}(j||(j={})),function(e){e[e["RELATIVE"]=0]="RELATIVE",e[e["START_ABSOLUTE"]=1]="START_ABSOLUTE",e[e["BOTH_ABSOLUTE"]=2]="BOTH_ABSOLUTE"}(Z||(Z={}));const Q=e=>({type:j.EMPTY,leadingWhitespace:null===e||void 0===e?void 0:e.image}),K=(e,t)=>({type:j.NUMBER,value:e,leadingWhitespace:null===t||void 0===t?void 0:t.image}),G=e=>{var t;return{type:j.STRING,value:e.image.slice(1,-1),leadingWhitespace:null===(t=e.leadingWhitespace)||void 0===t?void 0:t.image}},B=(e,t)=>({type:j.CELL_REFERENCE,reference:e,leadingWhitespace:null===t||void 0===t?void 0:t.image}),J=(e,t,n,r)=>(be(e,t,n),{type:j.CELL_RANGE,start:e,end:t,sheetReferenceType:n,leadingWhitespace:r}),z=(e,t,n,r)=>(be(e,t,n),{type:j.COLUMN_RANGE,start:e,end:t,sheetReferenceType:n,leadingWhitespace:null===r||void 0===r?void 0:r.image}),$=(e,t,n,r)=>(be(e,t,n),{type:j.ROW_RANGE,start:e,end:t,sheetReferenceType:n,leadingWhitespace:null===r||void 0===r?void 0:r.image}),q=(e,t,n)=>({type:j.CONCATENATE_OP,left:e,right:t,leadingWhitespace:null===n||void 0===n?void 0:n.image}),ee=(e,t,n)=>({type:j.EQUALS_OP,left:e,right:t,leadingWhitespace:null===n||void 0===n?void 0:n.image}),te=(e,t,n)=>({type:j.NOT_EQUAL_OP,left:e,right:t,leadingWhitespace:null===n||void 0===n?void 0:n.image}),ne=(e,t,n)=>({type:j.GREATER_THAN_OP,left:e,right:t,leadingWhitespace:null===n||void 0===n?void 0:n.image}),re=(e,t,n)=>({type:j.LESS_THAN_OP,left:e,right:t,leadingWhitespace:null===n||void 0===n?void 0:n.image}),ie=(e,t,n)=>({type:j.GREATER_THAN_OR_EQUAL_OP,left:e,right:t,leadingWhitespace:null===n||void 0===n?void 0:n.image}),se=(e,t,n)=>({type:j.LESS_THAN_OR_EQUAL_OP,left:e,right:t,leadingWhitespace:null===n||void 0===n?void 0:n.image}),oe=(e,t,n)=>({type:j.PLUS_OP,left:e,right:t,leadingWhitespace:null===n||void 0===n?void 0:n.image}),ae=(e,t,n)=>({type:j.MINUS_OP,left:e,right:t,leadingWhitespace:null===n||void 0===n?void 0:n.image}),le=(e,t,n)=>({type:j.TIMES_OP,left:e,right:t,leadingWhitespace:null===n||void 0===n?void 0:n.image}),ce=(e,t,n)=>({type:j.DIV_OP,left:e,right:t,leadingWhitespace:null===n||void 0===n?void 0:n.image}),ue=(e,t,n)=>({type:j.POWER_OP,left:e,right:t,leadingWhitespace:null===n||void 0===n?void 0:n.image}),he=(e,t)=>({type:j.MINUS_UNARY_OP,value:e,leadingWhitespace:null===t||void 0===t?void 0:t.image}),de=(e,t)=>({type:j.PLUS_UNARY_OP,value:e,leadingWhitespace:null===t||void 0===t?void 0:t.image}),me=(e,t)=>({type:j.PERCENT_OP,value:e,leadingWhitespace:null===t||void 0===t?void 0:t.image}),ge=(e,t,n,r,i)=>({type:j.FUNCTION_CALL,procedureName:e,args:t,leadingWhitespace:null===n||void 0===n?void 0:n.image,internalWhitespace:null===r||void 0===r?void 0:r.image,hyperlink:i}),pe=(e,t,n)=>({type:j.ARRAY,args:e,leadingWhitespace:null===t||void 0===t?void 0:t.image,internalWhitespace:null===n||void 0===n?void 0:n.image}),fe=(e,t)=>({type:j.NAMED_EXPRESSION,expressionName:e,leadingWhitespace:null===t||void 0===t?void 0:t.image}),Re=(e,t,n)=>({type:j.PARENTHESIS,expression:e,leadingWhitespace:null===t||void 0===t?void 0:t.image,internalWhitespace:null===n||void 0===n?void 0:n.image}),ye=(e,t)=>({type:j.ERROR,error:e,leadingWhitespace:null===t||void 0===t?void 0:t.image}),Me=(e,t,n)=>({type:j.ERROR_WITH_RAW_INPUT,error:t,rawInput:e,leadingWhitespace:null===n||void 0===n?void 0:n.image}),Se=()=>({type:j.ERROR,error:lr.parsingError()});function be(e,t,n){if(void 0!==e.sheet&&void 0===t.sheet||void 0===e.sheet&&void 0!==t.sheet)throw new Error("Start address inconsistent with end address");if(void 0===e.sheet&&n!==Z.RELATIVE||void 0!==e.sheet&&n===Z.RELATIVE)throw new Error("Sheet address inconsistent with sheet reference type")}function we(e,t){return(null!==t&&void 0!==t?t:"")+e}
  334. /**
  335. * @license
  336. * Copyright (c) 2024 Handsoncode. All rights reserved.
  337. */const Te={[j.PLUS_OP]:"+",[j.MINUS_OP]:"-",[j.TIMES_OP]:"*",[j.DIV_OP]:"/",[j.CONCATENATE_OP]:"&",[j.POWER_OP]:"^",[j.EQUALS_OP]:"=",[j.NOT_EQUAL_OP]:"<>",[j.GREATER_THAN_OP]:">",[j.GREATER_THAN_OR_EQUAL_OP]:">=",[j.LESS_THAN_OP]:"<",[j.LESS_THAN_OR_EQUAL_OP]:"<="},Oe=(e,t,n,r)=>({ast:e,relativeDependencies:t,hasVolatileFunction:n,hasStructuralChangeFunction:r});
  338. /**
  339. * @license
  340. * Copyright (c) 2024 Handsoncode. All rights reserved.
  341. */class ve{constructor(e){this.functionRegistry=e,this.cache=new Map}set(e,t){const n=mt(t,this.functionRegistry),r=Oe(t,n,Ee(t,this.functionRegistry.isFunctionVolatile),Ee(t,this.functionRegistry.isFunctionDependentOnSheetStructureChange));return this.cache.set(e,r),r}get(e){return this.cache.get(e)}maybeSetAndThenGet(e,t){const n=this.cache.get(e);return void 0!==n?n.ast:(this.set(e,t),t)}}const Ee=(e,t)=>{switch(e.type){case j.EMPTY:case j.NUMBER:case j.STRING:case j.ERROR:case j.ERROR_WITH_RAW_INPUT:case j.CELL_REFERENCE:case j.CELL_RANGE:case j.COLUMN_RANGE:case j.ROW_RANGE:case j.NAMED_EXPRESSION:return!1;case j.PERCENT_OP:case j.PLUS_UNARY_OP:case j.MINUS_UNARY_OP:return Ee(e.value,t);case j.CONCATENATE_OP:case j.EQUALS_OP:case j.NOT_EQUAL_OP:case j.LESS_THAN_OP:case j.GREATER_THAN_OP:case j.LESS_THAN_OR_EQUAL_OP:case j.GREATER_THAN_OR_EQUAL_OP:case j.MINUS_OP:case j.PLUS_OP:case j.TIMES_OP:case j.DIV_OP:case j.POWER_OP:return Ee(e.left,t)||Ee(e.right,t);case j.PARENTHESIS:return Ee(e.expression,t);case j.FUNCTION_CALL:return!!t(e.procedureName)||e.args.some(e=>Ee(e,t));case j.ARRAY:return e.args.some(e=>e.some(e=>Ee(e,t)))}};
  342. /**
  343. * @license
  344. * Copyright (c) 2024 Handsoncode. All rights reserved.
  345. */class Ce{}Ce.DistinctSigns="Distinct signs.",Ce.WrongArgNumber="Wrong number of arguments.",Ce.EmptyArg="Empty function argument.",Ce.EmptyArray="Empty array not allowed.",Ce.ArrayDimensions="Array dimensions are not compatible.",Ce.NoSpaceForArrayResult="No space for array result.",Ce.ValueSmall="Value too small.",Ce.ValueLarge="Value too large.",Ce.BadCriterion="Incorrect criterion.",Ce.RangeManySheets="Range spans more than one sheet.",Ce.CellRangeExpected="Cell range expected.",Ce.WrongDimension="Wrong range dimension.",Ce.ScalarExpected="Cell range not allowed.",Ce.NumberCoercion="Value cannot be coerced to number.",Ce.NumberExpected="Number argument expected.",Ce.IntegerExpected="Value needs to be an integer.",Ce.BadMode="Mode not recognized.",Ce.DateBounds="Date outside of bounds.",Ce.OutOfSheet="Resulting reference is out of the sheet.",Ce.WrongType="Wrong type of argument.",Ce.NaN="NaN or infinite value encountered.",Ce.EqualLength="Ranges need to be of equal length.",Ce.Negative="Value cannot be negative.",Ce.NotBinary="String does not represent a binary number.",Ce.NotOctal="String does not represent an octal number.",Ce.NotHex="String does not represent a hexadecimal number.",Ce.EndStartPeriod="End period needs to be at least start period.",Ce.CellRefExpected="Cell reference expected.",Ce.EmptyRange="Empty range not allowed.",Ce.BadRef="Address is not correct.",Ce.NumberRange="Number-only range expected.",Ce.ValueNotFound="Value not found.",Ce.ValueBaseLarge="Value in base too large.",Ce.ValueBaseSmall="Value in base too small.",Ce.ValueBaseLong="Value in base too long.",Ce.NegativeLength="Length cannot be negative.",Ce.PatternNotFound="Pattern not found.",Ce.OneValue="Needs at least one value.",Ce.TwoValues="Range needs to contain at least two elements.",Ce.ThreeValues="Range needs to contain at least three elements.",Ce.IndexBounds="Index out of bounds.",Ce.IndexLarge="Index too large.",Ce.Formula="Expected formula.",Ce.NegativeCount="Count cannot be negative.",Ce.ParseError="Parsing error.",Ce.SheetRef="Sheet does not exist.",Ce.PeriodLong="Period number cannot exceed life length.",Ce.InvalidDate="Invalid date.",Ce.BitshiftLong="Result of bitshift is too long.",Ce.EmptyString="Empty-string argument not allowed.",Ce.LengthBounds="Length out of bounds.",Ce.NegativeTime="Time cannot be negative.",Ce.NoDefault="No default option.",Ce.NoConditionMet="None of the conditions were met.",Ce.Selector="Selector cannot exceed the number of arguments.",Ce.StartEndDate="Start date needs to be earlier than end date.",Ce.IncorrectDateTime="String does not represent correct DateTime.",Ce.CharacterCodeBounds="Character code out of bounds.",Ce.NonZero="Argument cannot be 0.",Ce.LessThanOne="Argument cannot be less than 1.",Ce.WeekendString="Incorrect weekend bitmask string.",Ce.InvalidRoman="Invalid roman numeral.",Ce.WrongOrder="Wrong order of values.",Ce.ComplexNumberExpected="Complex number expected.",Ce.ShouldBeIorJ="Should be 'i' or 'j'.",Ce.SizeMismatch="Array dimensions mismatched.",Ce.FunctionName=e=>`Function name ${e} not recognized.`,Ce.NamedExpressionName=e=>`Named expression ${e} not recognized.`,Ce.LicenseKey=e=>`License key is ${e}.`
  346. /**
  347. * @license
  348. * Copyright (c) 2024 Handsoncode. All rights reserved.
  349. */;class Le{constructor(){this.POSSIBLE_START_CHARACTERS=[...v,...O,u,"'","_"],this.cellReferenceRegexp=new RegExp(w,"y")}match(e,t){this.cellReferenceRegexp.lastIndex=t;const n=this.cellReferenceRegexp.exec(e+"@");return null==n||null==n[1]?null:(n[0]=n[1],n)}}
  350. /**
  351. * @license
  352. * Copyright (c) 2024 Handsoncode. All rights reserved.
  353. */class Ne{constructor(){this.POSSIBLE_START_CHARACTERS=[...v,"_"],this.namedExpressionRegexp=new RegExp(T,"y"),this.r1c1CellRefRegexp=new RegExp(`^${b}$`)}match(e,t){this.namedExpressionRegexp.lastIndex=t;const n=this.namedExpressionRegexp.exec(e);return null==n||null==n[0]||this.r1c1CellRefRegexp.test(n[0])?null:n}}
  354. /**
  355. * @license
  356. * Copyright (c) 2024 Handsoncode. All rights reserved.
  357. */const _e=Object(U["createToken"])({name:"AdditionOp",pattern:U["Lexer"].NA}),Ie=Object(U["createToken"])({name:"PlusOp",pattern:/\+/,categories:_e}),Pe=Object(U["createToken"])({name:"MinusOp",pattern:/-/,categories:_e}),xe=Object(U["createToken"])({name:"MultiplicationOp",pattern:U["Lexer"].NA}),De=Object(U["createToken"])({name:"TimesOp",pattern:/\*/,categories:xe}),Ae=Object(U["createToken"])({name:"DivOp",pattern:/\//,categories:xe}),Fe=Object(U["createToken"])({name:"PowerOp",pattern:/\^/}),Ye=Object(U["createToken"])({name:"PercentOp",pattern:/%/}),He=Object(U["createToken"])({name:"BooleanOp",pattern:U["Lexer"].NA}),ke=Object(U["createToken"])({name:"EqualsOp",pattern:/=/,categories:He}),Ve=Object(U["createToken"])({name:"NotEqualOp",pattern:/<>/,categories:He}),Ue=Object(U["createToken"])({name:"GreaterThanOp",pattern:/>/,categories:He}),We=Object(U["createToken"])({name:"LessThanOp",pattern:/</,categories:He}),Xe=Object(U["createToken"])({name:"GreaterThanOrEqualOp",pattern:/>=/,categories:He}),je=Object(U["createToken"])({name:"LessThanOrEqualOp",pattern:/<=/,categories:He}),Ze=Object(U["createToken"])({name:"ConcatenateOp",pattern:/&/}),Qe=Object(U["createToken"])({name:"LParen",pattern:/\(/}),Ke=Object(U["createToken"])({name:"RParen",pattern:/\)/}),Ge=Object(U["createToken"])({name:"ArrayLParen",pattern:/{/}),Be=Object(U["createToken"])({name:"ArrayRParen",pattern:/}/}),Je=Object(U["createToken"])({name:"StringLiteral",pattern:/"([^"\\]*(\\.[^"\\]*)*)"/}),ze=Object(U["createToken"])({name:"ErrorLiteral",pattern:/#[A-Za-z0-9\/]+[?!]?/}),$e=Object(U["createToken"])({name:"RangeSeparator",pattern:new RegExp(c)}),qe=Object(U["createToken"])({name:"ColumnRange",pattern:new RegExp(`${M}${c}${M}`)}),et=Object(U["createToken"])({name:"RowRange",pattern:new RegExp(`${S}${c}${S}`)}),tt=Object(U["createToken"])({name:"ProcedureName",pattern:new RegExp(`([${m}][${g}]*)\\(`)}),nt=new Le,rt=Object(U["createToken"])({name:"CellReference",pattern:nt.match.bind(nt),start_chars_hint:nt.POSSIBLE_START_CHARACTERS,line_breaks:!1}),it=new Ne,st=Object(U["createToken"])({name:"NamedExpression",pattern:it.match.bind(it),start_chars_hint:it.POSSIBLE_START_CHARACTERS,line_breaks:!1}),ot=e=>{const t=e.translationPackage.getFunctionTranslation("OFFSET"),n=e.errorMapping,r=e.translationPackage.buildFunctionMapping(),i=new RegExp("standard"===e.ignoreWhiteSpace?d:h),s=Object(U["createToken"])({name:"WhiteSpace",pattern:i}),o=Object(U["createToken"])({name:"ArrayRowSep",pattern:e.arrayRowSeparator}),a=Object(U["createToken"])({name:"ArrayColSep",pattern:e.arrayColumnSeparator}),l=Object(U["createToken"])({name:"NumberLiteral",pattern:new RegExp(`(([${e.decimalSeparator}]\\d+)|(\\d+([${e.decimalSeparator}]\\d*)?))(e[+-]?\\d+)?`)}),c=Object(U["createToken"])({name:"OffsetProcedureName",pattern:new RegExp(t,"i")});let u,m;e.functionArgSeparator===e.arrayColumnSeparator?(u=a,m=[]):e.functionArgSeparator===e.arrayRowSeparator?(u=o,m=[]):(u=Object(U["createToken"])({name:"ArgSeparator",pattern:e.functionArgSeparator}),m=[u]);const g=[s,Ie,Pe,De,Ae,Fe,ke,Ve,Ye,Xe,je,Ue,We,Qe,Ke,Ge,Be,c,tt,$e,...m,qe,et,l,Je,ze,Ze,He,_e,xe,rt,st,o,a];return{ArgSeparator:u,NumberLiteral:l,OffsetProcedureName:c,ArrayRowSeparator:o,ArrayColSeparator:a,WhiteSpace:s,allTokens:g,errorMapping:n,functionMapping:r,decimalSeparator:e.decimalSeparator,maxColumns:e.maxColumns,maxRows:e.maxRows}};
  358. /**
  359. * @license
  360. * Copyright (c) 2024 Handsoncode. All rights reserved.
  361. */
  362. class at extends U["EmbeddedActionsParser"]{constructor(e,t){super(e.allTokens,{outputCst:!1,maxLookahead:7}),this.booleanExpressionOrEmpty=this.RULE("booleanExpressionOrEmpty",()=>this.OR([{ALT:()=>this.SUBRULE(this.booleanExpression)},{ALT:Object(U["EMPTY_ALT"])(Q())}])),this.procedureExpression=this.RULE("procedureExpression",()=>{var e;const t=this.CONSUME(tt),n=t.image.toUpperCase().slice(0,-1),r=null!==(e=this.lexerConfig.functionMapping[n])&&void 0!==e?e:n,i=[];let s=this.SUBRULE(this.booleanExpressionOrEmpty);this.MANY(()=>{var e;const t=this.CONSUME(this.lexerConfig.ArgSeparator);s.type===j.EMPTY&&(s.leadingWhitespace=null===(e=t.leadingWhitespace)||void 0===e?void 0:e.image),i.push(s),s=this.SUBRULE2(this.booleanExpressionOrEmpty)}),i.push(s),1===i.length&&i[0].type===j.EMPTY&&(i.length=0);const o=this.CONSUME(Ke);return ge(r,i,t.leadingWhitespace,o.leadingWhitespace)}),this.namedExpressionExpression=this.RULE("namedExpressionExpression",()=>{const e=this.CONSUME(st);return fe(e.image,e.leadingWhitespace)}),this.offsetProcedureExpression=this.RULE("offsetProcedureExpression",()=>{const e=[];return this.CONSUME(this.lexerConfig.OffsetProcedureName),this.CONSUME(Qe),this.MANY_SEP({SEP:this.lexerConfig.ArgSeparator,DEF:()=>{e.push(this.SUBRULE(this.booleanExpression))}}),this.CONSUME(Ke),this.handleOffsetHeuristic(e)}),this.columnRangeExpression=this.RULE("columnRangeExpression",()=>{const e=this.CONSUME(qe),[t,n]=e.image.split(":"),r=this.ACTION(()=>I(this.sheetMapping,t,this.formulaAddress)),i=this.ACTION(()=>I(this.sheetMapping,n,this.formulaAddress));if(void 0===r||void 0===i)return ye(new lr(Wn.REF));if(r.exceedsSheetSizeLimits(this.lexerConfig.maxColumns)||i.exceedsSheetSizeLimits(this.lexerConfig.maxColumns))return Me(e.image,new lr(Wn.NAME),e.leadingWhitespace);if(void 0===r.sheet&&void 0!==i.sheet)return this.parsingError(X.ParserError,"Malformed range expression");const{firstEnd:s,secondEnd:o,sheetRefType:a}=at.fixSheetIdsForRangeEnds(r,i);return z(s,o,a,e.leadingWhitespace)}),this.rowRangeExpression=this.RULE("rowRangeExpression",()=>{const e=this.CONSUME(et),[t,n]=e.image.split(":"),r=this.ACTION(()=>P(this.sheetMapping,t,this.formulaAddress)),i=this.ACTION(()=>P(this.sheetMapping,n,this.formulaAddress));if(void 0===r||void 0===i)return ye(new lr(Wn.REF));if(r.exceedsSheetSizeLimits(this.lexerConfig.maxRows)||i.exceedsSheetSizeLimits(this.lexerConfig.maxRows))return Me(e.image,new lr(Wn.NAME),e.leadingWhitespace);if(void 0===r.sheet&&void 0!==i.sheet)return this.parsingError(X.ParserError,"Malformed range expression");const{firstEnd:s,secondEnd:o,sheetRefType:a}=at.fixSheetIdsForRangeEnds(r,i);return $(s,o,a,e.leadingWhitespace)}),this.cellReference=this.RULE("cellReference",()=>{const e=this.CONSUME(rt),t=this.ACTION(()=>_(this.sheetMapping,e.image,this.formulaAddress));return void 0===t?Me(e.image,new lr(Wn.REF),e.leadingWhitespace):t.exceedsSheetSizeLimits(this.lexerConfig.maxColumns,this.lexerConfig.maxRows)?Me(e.image,new lr(Wn.NAME),e.leadingWhitespace):B(t,e.leadingWhitespace)}),this.endRangeReference=this.RULE("endRangeReference",e=>{var t;const n=this.CONSUME(rt),r=this.ACTION(()=>_(this.sheetMapping,e.image,this.formulaAddress)),i=this.ACTION(()=>_(this.sheetMapping,n.image,this.formulaAddress));return void 0===r||void 0===i?this.ACTION(()=>Me(`${e.image}:${n.image}`,new lr(Wn.REF),e.leadingWhitespace)):r.exceedsSheetSizeLimits(this.lexerConfig.maxColumns,this.lexerConfig.maxRows)||i.exceedsSheetSizeLimits(this.lexerConfig.maxColumns,this.lexerConfig.maxRows)?this.ACTION(()=>Me(`${e.image}:${n.image}`,new lr(Wn.NAME),e.leadingWhitespace)):this.buildCellRange(r,i,null===(t=e.leadingWhitespace)||void 0===t?void 0:t.image)}),this.endOfRangeExpression=this.RULE("endOfRangeExpression",e=>this.OR([{ALT:()=>this.SUBRULE(this.endRangeReference,{ARGS:[e]})},{ALT:()=>{var t;const n=this.SUBRULE(this.offsetProcedureExpression),r=this.ACTION(()=>_(this.sheetMapping,e.image,this.formulaAddress));return void 0===r?ye(new lr(Wn.REF)):n.type===j.CELL_REFERENCE?this.buildCellRange(r,n.reference,null===(t=e.leadingWhitespace)||void 0===t?void 0:t.image):this.parsingError(X.RangeOffsetNotAllowed,"Range offset not allowed here")}}])),this.cellRangeExpression=this.RULE("cellRangeExpression",()=>{const e=this.CONSUME(rt);return this.CONSUME2($e),this.SUBRULE(this.endOfRangeExpression,{ARGS:[e]})}),this.endRangeWithOffsetStartReference=this.RULE("endRangeWithOffsetStartReference",e=>{const t=this.CONSUME(rt),n=this.ACTION(()=>_(this.sheetMapping,t.image,this.formulaAddress));return void 0===n?this.ACTION(()=>ye(new lr(Wn.REF))):this.buildCellRange(e.reference,n,e.leadingWhitespace)}),this.endOfRangeWithOffsetStartExpression=this.RULE("endOfRangeWithOffsetStartExpression",e=>this.OR([{ALT:()=>this.SUBRULE(this.endRangeWithOffsetStartReference,{ARGS:[e]})},{ALT:()=>{const t=this.SUBRULE(this.offsetProcedureExpression);return t.type===j.CELL_REFERENCE?this.buildCellRange(e.reference,t.reference,e.leadingWhitespace):this.parsingError(X.RangeOffsetNotAllowed,"Range offset not allowed here")}}])),this.offsetExpression=this.RULE("offsetExpression",()=>{const e=this.SUBRULE(this.offsetProcedureExpression);let t;return this.OPTION(()=>{this.CONSUME($e),t=e.type===j.CELL_RANGE?this.parsingError(X.RangeOffsetNotAllowed,"Range offset not allowed here"):this.SUBRULE(this.endOfRangeWithOffsetStartExpression,{ARGS:[e]})}),void 0!==t?t:e}),this.insideArrayExpression=this.RULE("insideArrayExpression",()=>{const e=[[]];return e[e.length-1].push(this.SUBRULE(this.booleanExpression)),this.MANY(()=>{this.OR([{ALT:()=>{this.CONSUME(this.lexerConfig.ArrayColSeparator),e[e.length-1].push(this.SUBRULE2(this.booleanExpression))}},{ALT:()=>{this.CONSUME(this.lexerConfig.ArrayRowSeparator),e.push([]),e[e.length-1].push(this.SUBRULE3(this.booleanExpression))}}])}),pe(e)}),this.parenthesisExpression=this.RULE("parenthesisExpression",()=>{const e=this.CONSUME(Qe),t=this.SUBRULE(this.booleanExpression),n=this.CONSUME(Ke);return Re(t,e.leadingWhitespace,n.leadingWhitespace)}),this.arrayExpression=this.RULE("arrayExpression",()=>this.OR([{ALT:()=>{const e=this.CONSUME(Ge),t=this.SUBRULE(this.insideArrayExpression),n=this.CONSUME(Be);return pe(t.args,e.leadingWhitespace,n.leadingWhitespace)}},{ALT:()=>this.SUBRULE(this.parenthesisExpression)}])),this.numericStringToNumber=e=>{const t=e.replace(this.lexerConfig.decimalSeparator,".");return Number(t)},this.positiveAtomicExpression=this.RULE("positiveAtomicExpression",()=>{var e;return this.OR(null!==(e=this.atomicExpCache)&&void 0!==e?e:this.atomicExpCache=[{ALT:()=>this.SUBRULE(this.arrayExpression)},{ALT:()=>this.SUBRULE(this.cellRangeExpression)},{ALT:()=>this.SUBRULE(this.columnRangeExpression)},{ALT:()=>this.SUBRULE(this.rowRangeExpression)},{ALT:()=>this.SUBRULE(this.offsetExpression)},{ALT:()=>this.SUBRULE(this.cellReference)},{ALT:()=>this.SUBRULE(this.procedureExpression)},{ALT:()=>this.SUBRULE(this.namedExpressionExpression)},{ALT:()=>{const e=this.CONSUME(this.lexerConfig.NumberLiteral);return K(this.numericStringToNumber(e.image),e.leadingWhitespace)}},{ALT:()=>{const e=this.CONSUME(Je);return G(e)}},{ALT:()=>{const e=this.CONSUME(ze),t=e.image.toUpperCase(),n=this.lexerConfig.errorMapping[t];return n?ye(new lr(n),e.leadingWhitespace):this.parsingError(X.ParserError,"Unknown error literal")}}])}),this.rightUnaryOpAtomicExpression=this.RULE("rightUnaryOpAtomicExpression",()=>{const e=this.SUBRULE(this.positiveAtomicExpression),t=this.OPTION(()=>this.CONSUME(Ye));return t?me(e,t.leadingWhitespace):e}),this.atomicExpression=this.RULE("atomicExpression",()=>this.OR([{ALT:()=>{const e=this.CONSUME(_e),t=this.SUBRULE(this.atomicExpression);return Object(U["tokenMatcher"])(e,Ie)?de(t,e.leadingWhitespace):Object(U["tokenMatcher"])(e,Pe)?he(t,e.leadingWhitespace):(this.customParsingError=W(X.ParserError,"Mismatched token type"),this.customParsingError)}},{ALT:()=>this.SUBRULE2(this.rightUnaryOpAtomicExpression)}])),this.powerExpression=this.RULE("powerExpression",()=>{let e=this.SUBRULE(this.atomicExpression);return this.MANY(()=>{const t=this.CONSUME(Fe),n=this.SUBRULE2(this.atomicExpression);Object(U["tokenMatcher"])(t,Fe)?e=ue(e,n,t.leadingWhitespace):this.ACTION(()=>{throw Error("Operator not supported")})}),e}),this.multiplicationExpression=this.RULE("multiplicationExpression",()=>{let e=this.SUBRULE(this.powerExpression);return this.MANY(()=>{const t=this.CONSUME(xe),n=this.SUBRULE2(this.powerExpression);Object(U["tokenMatcher"])(t,De)?e=le(e,n,t.leadingWhitespace):Object(U["tokenMatcher"])(t,Ae)?e=ce(e,n,t.leadingWhitespace):this.ACTION(()=>{throw Error("Operator not supported")})}),e}),this.additionExpression=this.RULE("additionExpression",()=>{let e=this.SUBRULE(this.multiplicationExpression);return this.MANY(()=>{const t=this.CONSUME(_e),n=this.SUBRULE2(this.multiplicationExpression);Object(U["tokenMatcher"])(t,Ie)?e=oe(e,n,t.leadingWhitespace):Object(U["tokenMatcher"])(t,Pe)?e=ae(e,n,t.leadingWhitespace):this.ACTION(()=>{throw Error("Operator not supported")})}),e}),this.concatenateExpression=this.RULE("concatenateExpression",()=>{let e=this.SUBRULE(this.additionExpression);return this.MANY(()=>{const t=this.CONSUME(Ze),n=this.SUBRULE2(this.additionExpression);e=q(e,n,t.leadingWhitespace)}),e}),this.booleanExpression=this.RULE("booleanExpression",()=>{let e=this.SUBRULE(this.concatenateExpression);return this.MANY(()=>{const t=this.CONSUME(He),n=this.SUBRULE2(this.concatenateExpression);Object(U["tokenMatcher"])(t,ke)?e=ee(e,n,t.leadingWhitespace):Object(U["tokenMatcher"])(t,Ve)?e=te(e,n,t.leadingWhitespace):Object(U["tokenMatcher"])(t,Ue)?e=ne(e,n,t.leadingWhitespace):Object(U["tokenMatcher"])(t,We)?e=re(e,n,t.leadingWhitespace):Object(U["tokenMatcher"])(t,Xe)?e=ie(e,n,t.leadingWhitespace):Object(U["tokenMatcher"])(t,je)?e=se(e,n,t.leadingWhitespace):this.ACTION(()=>{throw Error("Operator not supported")})}),e}),this.formula=this.RULE("formula",()=>(this.CONSUME(ke),this.SUBRULE(this.booleanExpression))),this.lexerConfig=e,this.sheetMapping=t,this.formulaAddress=mr(0,0,0),this.performSelfAnalysis()}parseFromTokens(e,t){this.input=e;let n=this.formulaWithContext(t),r=[];return this.customParsingError&&r.push(this.customParsingError),r=r.concat(this.errors.map(e=>({type:X.ParserError,message:e.message}))),r.length>0&&(n=Se()),{ast:n,errors:r}}reset(){super.reset(),this.customParsingError=void 0}formulaWithContext(e){return this.formulaAddress=e,this.formula()}buildCellRange(e,t,n){if(void 0===e.sheet&&void 0!==t.sheet)return this.parsingError(X.ParserError,"Malformed range expression");const{firstEnd:r,secondEnd:i,sheetRefType:s}=at.fixSheetIdsForRangeEnds(e,t);return J(r,i,s,n)}static fixSheetIdsForRangeEnds(e,t){const n=at.rangeSheetReferenceType(e.sheet,t.sheet),r=void 0!==e.sheet&&void 0===t.sheet?t.withSheet(e.sheet):t;return{firstEnd:e,secondEnd:r,sheetRefType:n}}handleOffsetHeuristic(e){const t=e[0];if(t.type!==j.CELL_REFERENCE)return this.parsingError(X.StaticOffsetError,"First argument to OFFSET is not a reference");const n=e[1];let r;if(n.type===j.NUMBER&&Number.isInteger(n.value))r=n.value;else if(n.type===j.PLUS_UNARY_OP&&n.value.type===j.NUMBER&&Number.isInteger(n.value.value))r=n.value.value;else{if(n.type!==j.MINUS_UNARY_OP||n.value.type!==j.NUMBER||!Number.isInteger(n.value.value))return this.parsingError(X.StaticOffsetError,"Second argument to OFFSET is not a static number");r=-n.value.value}const s=e[2];let o;if(s.type===j.NUMBER&&Number.isInteger(s.value))o=s.value;else if(s.type===j.PLUS_UNARY_OP&&s.value.type===j.NUMBER&&Number.isInteger(s.value.value))o=s.value.value;else{if(s.type!==j.MINUS_UNARY_OP||s.value.type!==j.NUMBER||!Number.isInteger(s.value.value))return this.parsingError(X.StaticOffsetError,"Third argument to OFFSET is not a static number");o=-s.value.value}const a=e[3];let c;if(void 0===a)c=1;else{if(a.type!==j.NUMBER)return this.parsingError(X.StaticOffsetError,"Fourth argument to OFFSET is not a static number");if(c=a.value,c<1)return this.parsingError(X.StaticOffsetError,"Fourth argument to OFFSET is too small number");if(!Number.isInteger(c))return this.parsingError(X.StaticOffsetError,"Fourth argument to OFFSET is not integer")}const u=e[4];let h;if(void 0===u)h=1;else{if(u.type!==j.NUMBER)return this.parsingError(X.StaticOffsetError,"Fifth argument to OFFSET is not a static number");if(h=u.value,h<1)return this.parsingError(X.StaticOffsetError,"Fifth argument to OFFSET is too small number");if(!Number.isInteger(h))return this.parsingError(X.StaticOffsetError,"Fifth argument to OFFSET is not integer")}const d=new l(t.reference.col+o,t.reference.row+r,t.reference.type);let m=d.col,g=d.row;if(t.reference.type!==i.CELL_REFERENCE_RELATIVE&&t.reference.type!==i.CELL_REFERENCE_ABSOLUTE_COL||(g+=this.formulaAddress.row),t.reference.type!==i.CELL_REFERENCE_RELATIVE&&t.reference.type!==i.CELL_REFERENCE_ABSOLUTE_ROW||(m+=this.formulaAddress.col),m<0||g<0)return ye(new lr(Wn.REF,Ce.OutOfSheet));if(1===h&&1===c)return B(d);{const e=new l(d.col+h-1,d.row+c-1,d.type);return J(d,e,Z.RELATIVE)}}parsingError(e,t){return this.customParsingError=W(e,t),Se()}static rangeSheetReferenceType(e,t){return void 0===e?Z.RELATIVE:void 0===t?Z.START_ABSOLUTE:Z.BOTH_ABSOLUTE}}class lt{constructor(e){this.lexerConfig=e,this.lexer=new U["Lexer"](e.allTokens,{ensureOptimizations:!0})}tokenizeFormula(e){const t=this.lexer.tokenize(e);let n=t.tokens;return n=this.trimTrailingWhitespaces(n),n=this.skipWhitespacesInsideRanges(n),n=this.skipWhitespacesBeforeArgSeparators(n),t.tokens=n,t}skipWhitespacesInsideRanges(e){return lt.filterTokensByNeighbors(e,(e,t,n)=>(Object(U["tokenMatcher"])(e,rt)||Object(U["tokenMatcher"])(e,$e))&&Object(U["tokenMatcher"])(t,this.lexerConfig.WhiteSpace)&&(Object(U["tokenMatcher"])(n,rt)||Object(U["tokenMatcher"])(n,$e)))}skipWhitespacesBeforeArgSeparators(e){return lt.filterTokensByNeighbors(e,(e,t,n)=>!Object(U["tokenMatcher"])(e,this.lexerConfig.ArgSeparator)&&Object(U["tokenMatcher"])(t,this.lexerConfig.WhiteSpace)&&Object(U["tokenMatcher"])(n,this.lexerConfig.ArgSeparator))}static filterTokensByNeighbors(e,t){if(e.length<3)return e;let n=0;const r=[e[n++]];while(n<e.length-1)t(e[n-1],e[n],e[n+1])||r.push(e[n]),++n;return r.push(e[n]),r}trimTrailingWhitespaces(e){return e.length>0&&Object(U["tokenMatcher"])(e[e.length-1],this.lexerConfig.WhiteSpace)&&e.pop(),e}}
  363. /**
  364. * @license
  365. * Copyright (c) 2024 Handsoncode. All rights reserved.
  366. */class ct{constructor(e,t,n,r){this.config=e,this.lexerConfig=t,this.sheetMappingFn=n,this.namedExpressions=r}unparse(e,t){return"="+this.unparseAst(e,t)}unparseAst(e,t){var n,r;switch(e.type){case j.EMPTY:return we("",e.leadingWhitespace);case j.NUMBER:return we(ut(e.value,this.config.decimalSeparator),e.leadingWhitespace);case j.STRING:return we('"'+e.value+'"',e.leadingWhitespace);case j.FUNCTION_CALL:{const n=e.args.map(e=>void 0!==e?this.unparseAst(e,t):"").join(this.config.functionArgSeparator),r=this.config.translationPackage.isFunctionTranslated(e.procedureName)?this.config.translationPackage.getFunctionTranslation(e.procedureName):e.procedureName,i=r+"("+n+we(")",e.internalWhitespace);return we(i,e.leadingWhitespace)}case j.NAMED_EXPRESSION:{const r=null===(n=this.namedExpressions.nearestNamedExpression(e.expressionName,t.sheet))||void 0===n?void 0:n.displayName;return we(r||e.expressionName,e.leadingWhitespace)}case j.CELL_REFERENCE:{let n;return n=void 0!==e.reference.sheet?this.unparseSheetName(e.reference.sheet)+"!":"",n+=null!==(r=e.reference.unparse(t))&&void 0!==r?r:this.config.translationPackage.getErrorTranslation(Wn.REF),we(n,e.leadingWhitespace)}case j.COLUMN_RANGE:case j.ROW_RANGE:case j.CELL_RANGE:return we(this.formatRange(e,t),e.leadingWhitespace);case j.PLUS_UNARY_OP:{const n=this.unparseAst(e.value,t);return we("+",e.leadingWhitespace)+n}case j.MINUS_UNARY_OP:{const n=this.unparseAst(e.value,t);return we("-",e.leadingWhitespace)+n}case j.PERCENT_OP:return this.unparseAst(e.value,t)+we("%",e.leadingWhitespace);case j.ERROR:{const t=this.config.translationPackage.getErrorTranslation(e.error?e.error.type:Wn.ERROR);return we(t,e.leadingWhitespace)}case j.ERROR_WITH_RAW_INPUT:return we(e.rawInput,e.leadingWhitespace);case j.PARENTHESIS:{const n=this.unparseAst(e.expression,t),r="("+n+we(")",e.internalWhitespace);return we(r,e.leadingWhitespace)}case j.ARRAY:{const n="{"+e.args.map(e=>e.map(e=>this.unparseAst(e,t)).join(this.config.arrayColumnSeparator)).join(this.config.arrayRowSeparator)+we("}",e.internalWhitespace);return we(n,e.leadingWhitespace)}default:{const n=this.unparseAst(e.left,t),r=this.unparseAst(e.right,t);return n+we(Te[e.type],e.leadingWhitespace)+r}}}unparseSheetName(e){const t=k(e,this.sheetMappingFn);if(void 0===t)throw new Wt(e);return t}formatRange(e,t){let n="",r="";void 0!==e.start.sheet&&e.sheetReferenceType!==Z.RELATIVE&&(n=this.unparseSheetName(e.start.sheet)+"!"),void 0!==e.end.sheet&&e.sheetReferenceType===Z.BOTH_ABSOLUTE&&(r=this.unparseSheetName(e.end.sheet)+"!");const i=e.start.unparse(t),s=e.end.unparse(t);return void 0===i||void 0===s?this.config.translationPackage.getErrorTranslation(Wn.REF):`${n}${i}:${r}${s}`}}function ut(e,t){const n=e.toString();return n.replace(".",t)}
  367. /**
  368. * @license
  369. * Copyright (c) 2024 Handsoncode. All rights reserved.
  370. */class ht{constructor(e,t,n){this.config=e,this.functionRegistry=t,this.sheetMapping=n,this.statsCacheUsed=0,this.lexerConfig=ot(e),this.lexer=new lt(this.lexerConfig),this.formulaParser=new at(this.lexerConfig,this.sheetMapping),this.cache=new ve(this.functionRegistry)}parse(e,t){this.formulaAddress=t;const n=this.tokenizeFormula(e);if(n.errors.length>0){const e=n.errors.map(e=>({type:X.LexingError,message:e.message}));return{ast:Se(),errors:e,hasVolatileFunction:!1,hasStructuralChangeFunction:!1,dependencies:[]}}const r=this.computeHashFromTokens(n.tokens,t);let i=this.cache.get(r);if(void 0!==i)++this.statsCacheUsed;else{const e=this.bindWhitespacesToTokens(n.tokens),s=this.formulaParser.parseFromTokens(e,t);if(s.errors.length>0)return Object.assign(Object.assign({},s),{hasVolatileFunction:!1,hasStructuralChangeFunction:!1,dependencies:[]});i=this.cache.set(r,s.ast)}const{ast:s,hasVolatileFunction:o,hasStructuralChangeFunction:a}=i,l=this.convertReversedRangesToRegularRanges(s),c=mt(l,this.functionRegistry);return{ast:l,errors:[],hasVolatileFunction:o,hasStructuralChangeFunction:a,dependencies:c}}convertReversedRangesToRegularRanges(e){switch(e.type){case j.EMPTY:case j.NUMBER:case j.STRING:case j.ERROR:case j.ERROR_WITH_RAW_INPUT:case j.CELL_REFERENCE:case j.NAMED_EXPRESSION:return e;case j.CELL_RANGE:{const{start:t,end:n}=e,r=this.orderCellRangeEnds(t,n);return Object.assign(Object.assign({},e),{start:r.start,end:r.end})}case j.COLUMN_RANGE:{const{start:t,end:n}=e,r=this.orderColumnRangeEnds(t,n);return Object.assign(Object.assign({},e),{start:r.start,end:r.end})}case j.ROW_RANGE:{const{start:t,end:n}=e,r=this.orderRowRangeEnds(t,n);return Object.assign(Object.assign({},e),{start:r.start,end:r.end})}case j.PERCENT_OP:case j.PLUS_UNARY_OP:case j.MINUS_UNARY_OP:{const t=this.convertReversedRangesToRegularRanges(e.value);return Object.assign(Object.assign({},e),{value:t})}case j.CONCATENATE_OP:case j.EQUALS_OP:case j.NOT_EQUAL_OP:case j.LESS_THAN_OP:case j.GREATER_THAN_OP:case j.LESS_THAN_OR_EQUAL_OP:case j.GREATER_THAN_OR_EQUAL_OP:case j.MINUS_OP:case j.PLUS_OP:case j.TIMES_OP:case j.DIV_OP:case j.POWER_OP:{const t=this.convertReversedRangesToRegularRanges(e.left),n=this.convertReversedRangesToRegularRanges(e.right);return Object.assign(Object.assign({},e),{left:t,right:n})}case j.PARENTHESIS:{const t=this.convertReversedRangesToRegularRanges(e.expression);return Object.assign(Object.assign({},e),{expression:t})}case j.FUNCTION_CALL:{const t=e.args.map(e=>this.convertReversedRangesToRegularRanges(e));return Object.assign(Object.assign({},e),{args:t})}case j.ARRAY:{const t=e.args.map(e=>e.map(e=>this.convertReversedRangesToRegularRanges(e)));return Object.assign(Object.assign({},e),{args:t})}}}orderCellRangeEnds(e,t){const n=[e,t],[r,i]=n.map(e=>e.toColumnAddress()).sort(o.compareByAbsoluteAddress(this.formulaAddress)),[s,c]=n.map(e=>e.toRowAddress()).sort(a.compareByAbsoluteAddress(this.formulaAddress)),[u,h]=n.map(e=>e.sheet).sort(ht.compareSheetIds.bind(this));return{start:l.fromColAndRow(r,s,u),end:l.fromColAndRow(i,c,h)}}orderColumnRangeEnds(e,t){const n=[e,t],[r,i]=n.sort(o.compareByAbsoluteAddress(this.formulaAddress)),[s,a]=n.map(e=>e.sheet).sort(ht.compareSheetIds.bind(this));return{start:new o(r.type,r.col,s),end:new o(i.type,i.col,a)}}orderRowRangeEnds(e,t){const n=[e,t],[r,i]=n.sort(a.compareByAbsoluteAddress(this.formulaAddress)),[s,o]=n.map(e=>e.sheet).sort(ht.compareSheetIds.bind(this));return{start:new a(r.type,r.row,s),end:new a(i.type,i.row,o)}}static compareSheetIds(e,t){return e=null!=e?e:1/0,t=null!=t?t:1/0,e-t}fetchCachedResultForAst(e){const t=this.computeHashFromAst(e);return this.fetchCachedResult(t)}fetchCachedResult(e){const t=this.cache.get(e);if(void 0===t)throw new Error("There is no AST with such key in the cache");{const{ast:e,hasVolatileFunction:n,hasStructuralChangeFunction:r,relativeDependencies:i}=t;return{ast:e,errors:[],hasVolatileFunction:n,hasStructuralChangeFunction:r,dependencies:i}}}computeHashFromTokens(e,t){var n;let r="",i=0;while(i<e.length){const s=e[i];if(Object(U["tokenMatcher"])(s,rt)){const e=_(this.sheetMapping,s.image,t);r=void 0===e?r.concat(s.image):r.concat(e.hash(!0))}else if(Object(U["tokenMatcher"])(s,tt)){const e=s.image.toUpperCase().slice(0,-1),t=null!==(n=this.lexerConfig.functionMapping[e])&&void 0!==n?n:e;r=r.concat(t,"(")}else if(Object(U["tokenMatcher"])(s,qe)){const[e,n]=s.image.split(":"),i=I(this.sheetMapping,e,t),o=I(this.sheetMapping,n,t);r=void 0===i||void 0===o?r.concat("!REF"):r.concat(i.hash(!0),":",o.hash(!0))}else if(Object(U["tokenMatcher"])(s,et)){const[e,n]=s.image.split(":"),i=P(this.sheetMapping,e,t),o=P(this.sheetMapping,n,t);r=void 0===i||void 0===o?r.concat("!REF"):r.concat(i.hash(!0),":",o.hash(!0))}else r=r.concat(s.image);i++}return r}rememberNewAst(e){const t=this.computeHashFromAst(e);return this.cache.maybeSetAndThenGet(t,e)}computeHashFromAst(e){return"="+this.computeHashOfAstNode(e)}computeHashOfAstNode(e){switch(e.type){case j.EMPTY:return e.leadingWhitespace||"";case j.NUMBER:return we(ut(e.value,this.config.decimalSeparator),e.leadingWhitespace);case j.STRING:return we('"'+e.value+'"',e.leadingWhitespace);case j.NAMED_EXPRESSION:return we(e.expressionName,e.leadingWhitespace);case j.FUNCTION_CALL:{const t=e.args.map(e=>this.computeHashOfAstNode(e)).join(this.config.functionArgSeparator),n=e.procedureName+"("+t+we(")",e.internalWhitespace);return we(n,e.leadingWhitespace)}case j.CELL_REFERENCE:return we(e.reference.hash(!0),e.leadingWhitespace);case j.COLUMN_RANGE:case j.ROW_RANGE:case j.CELL_RANGE:{const t=e.start.hash(e.sheetReferenceType!==Z.RELATIVE),n=e.end.hash(e.sheetReferenceType===Z.BOTH_ABSOLUTE);return we(t+":"+n,e.leadingWhitespace)}case j.MINUS_UNARY_OP:return we("-"+this.computeHashOfAstNode(e.value),e.leadingWhitespace);case j.PLUS_UNARY_OP:return we("+"+this.computeHashOfAstNode(e.value),e.leadingWhitespace);case j.PERCENT_OP:return this.computeHashOfAstNode(e.value)+we("%",e.leadingWhitespace);case j.ERROR:{const t=this.config.translationPackage.getErrorTranslation(e.error?e.error.type:Wn.ERROR);return we(t,e.leadingWhitespace)}case j.ERROR_WITH_RAW_INPUT:return we(e.rawInput,e.leadingWhitespace);case j.ARRAY:{const t=e.args.map(e=>e.map(e=>this.computeHashOfAstNode(e)).join(",")).join(";");return we("{"+t+we("}",e.internalWhitespace),e.leadingWhitespace)}case j.PARENTHESIS:{const t=this.computeHashOfAstNode(e.expression),n="("+t+we(")",e.internalWhitespace);return we(n,e.leadingWhitespace)}default:return this.computeHashOfAstNode(e.left)+we(Te[e.type],e.leadingWhitespace)+this.computeHashOfAstNode(e.right)}}bindWhitespacesToTokens(e){const t=[],n=e[0];Object(U["tokenMatcher"])(n,this.lexerConfig.WhiteSpace)||t.push(n);for(let r=1;r<e.length;++r){const n=e[r];if(Object(U["tokenMatcher"])(n,this.lexerConfig.WhiteSpace))continue;const i=e[r-1];Object(U["tokenMatcher"])(i,this.lexerConfig.WhiteSpace)&&(n.leadingWhitespace=i),t.push(n)}return t}tokenizeFormula(e){return this.lexer.tokenizeFormula(e)}}
  371. /**
  372. * @license
  373. * Copyright (c) 2024 Handsoncode. All rights reserved.
  374. */const dt=(e,t,n,r)=>{switch(e.type){case j.EMPTY:case j.NUMBER:case j.STRING:case j.ERROR:return;case j.NAMED_EXPRESSION:return void(r&&n.push(new yt(e.expressionName)));case j.CELL_REFERENCE:return void(r&&n.push(new gt(e.reference)));case j.CELL_RANGE:return void(r&&e.start.sheet===e.end.sheet&&n.push(new pt(e.start,e.end)));case j.COLUMN_RANGE:return void(r&&e.start.sheet===e.end.sheet&&n.push(new ft(e.start,e.end)));case j.ROW_RANGE:return void(r&&e.start.sheet===e.end.sheet&&n.push(new Rt(e.start,e.end)));case j.PERCENT_OP:case j.PLUS_UNARY_OP:case j.MINUS_UNARY_OP:return void dt(e.value,t,n,!0);case j.CONCATENATE_OP:case j.EQUALS_OP:case j.NOT_EQUAL_OP:case j.LESS_THAN_OP:case j.GREATER_THAN_OP:case j.LESS_THAN_OR_EQUAL_OP:case j.GREATER_THAN_OR_EQUAL_OP:case j.MINUS_OP:case j.PLUS_OP:case j.TIMES_OP:case j.DIV_OP:case j.POWER_OP:return dt(e.left,t,n,!0),void dt(e.right,t,n,!0);case j.PARENTHESIS:return void dt(e.expression,t,n,r);case j.FUNCTION_CALL:{const r=!t.doesFunctionNeedArgumentToBeComputed(e.procedureName);return void e.args.forEach(e=>dt(e,t,n,r))}}},mt=(e,t)=>{const n=new Array;return dt(e,t,n,!0),n};
  375. /**
  376. * @license
  377. * Copyright (c) 2024 Handsoncode. All rights reserved.
  378. */
  379. class gt{constructor(e){this.dependency=e}absolutize(e){return this.dependency.toSimpleCellAddress(e)}}class pt{constructor(e,t){this.start=e,this.end=t}absolutize(e){return new Tr(this.start.toSimpleCellAddress(e),this.end.toSimpleCellAddress(e))}}class ft{constructor(e,t){this.start=e,this.end=t}absolutize(e){const t=this.start.toSimpleColumnAddress(e),n=this.end.toSimpleColumnAddress(e);return new Or(t.sheet,t.col,n.col)}}class Rt{constructor(e,t){this.start=e,this.end=t}absolutize(e){const t=this.start.toSimpleRowAddress(e),n=this.end.toSimpleRowAddress(e);return new vr(t.sheet,t.row,n.row)}}class yt{constructor(e){this.name=e}absolutize(e){return this}}
  380. /**
  381. * @license
  382. * Copyright (c) 2024 Handsoncode. All rights reserved.
  383. */
  384. /**
  385. * @license
  386. * Copyright (c) 2024 Handsoncode. All rights reserved.
  387. */const Mt=(e,t)=>e.map(e=>e.absolutize(t)),St=e=>e.filter(e=>e instanceof yt||(e instanceof Tr?!(gr(e.start)||gr(e.end)):!gr(e))),bt=Symbol("Empty value");function wt(e){return e instanceof Tt?e.val:e}class Tt{constructor(e,t){this.val=e,this.format=t}fromNumber(e){return new this.constructor(e)}}function Ot(e,t){if("number"===typeof e)return t;{const n=e.fromNumber(t);return n.format=e.format,n}}class vt extends Tt{getDetailedType(){return It.NUMBER_DATE}}class Et extends Tt{getDetailedType(){return It.NUMBER_CURRENCY}}class Ct extends Tt{getDetailedType(){return It.NUMBER_TIME}}class Lt extends Tt{getDetailedType(){return It.NUMBER_DATETIME}}class Nt extends Tt{getDetailedType(){return It.NUMBER_PERCENT}}function _t(e){return"number"===typeof e||e instanceof Tt}var It,Pt;function xt(e){return e instanceof Tt?e.getDetailedType():It.NUMBER_RAW}function Dt(e){return e instanceof Tt?e.format:void 0}function At(e){return e instanceof Tt?{type:e.getDetailedType(),format:e.format}:{type:It.NUMBER_RAW}}
  388. /**
  389. * @license
  390. * Copyright (c) 2024 Handsoncode. All rights reserved.
  391. */(function(e){e["NUMBER_RAW"]="NUMBER_RAW",e["NUMBER_DATE"]="NUMBER_DATE",e["NUMBER_TIME"]="NUMBER_TIME",e["NUMBER_DATETIME"]="NUMBER_DATETIME",e["NUMBER_CURRENCY"]="NUMBER_CURRENCY",e["NUMBER_PERCENT"]="NUMBER_PERCENT"})(It||(It={}));class Ft{constructor(e,t,n,r){this._data=e,this.range=t,this.dependencyGraph=n,this._hasOnlyNumbers=r,this.size=void 0===e?new ei(t.effectiveWidth(n),t.effectiveHeight(n)):new ei(e[0].length,e.length)}get data(){return this.ensureThatComputed(),this._data}static fromRange(e,t,n){return new Ft(e,t,n,!0)}static onlyNumbers(e){return new Ft(e,void 0,void 0,!0)}static onlyValues(e){return new Ft(e,void 0,void 0,void 0)}static onlyRange(e,t){return new Ft(void 0,e,t,void 0)}static fromScalar(e){return new Ft([[e]],void 0,void 0,void 0)}isAdHoc(){return void 0===this.range}width(){return this.size.width}height(){return this.size.height}valuesFromTopLeftCorner(){this.ensureThatComputed();const e=[];for(let t=0;t<this._data.length;t++)for(let n=0;n<this._data[0].length;n++)e.push(this._data[t][n]);return e}*effectiveAddressesFromData(e){for(let t=0;t<this.data.length;++t){const n=this.data[t];for(let r=0;r<n.length;++r)yield mr(e.sheet,e.col+r,e.row+t)}}*entriesFromTopLeftCorner(e){this.ensureThatComputed();for(let t=0;t<this.size.height;++t)for(let n=0;n<this.size.width;++n)yield[this._data[t][n],mr(e.sheet,e.col+n,e.row+t)]}*iterateValuesFromTopLeftCorner(){yield*this.valuesFromTopLeftCorner()}numberOfElements(){return this.size.width*this.size.height}hasOnlyNumbers(){if(void 0===this._hasOnlyNumbers){this._hasOnlyNumbers=!0;for(const e of this.data)for(const t of e)if("number"!==typeof t)return this._hasOnlyNumbers=!1,!1}return this._hasOnlyNumbers}rawNumbers(){return this._data}rawData(){var e;return this.ensureThatComputed(),null!==(e=this._data)&&void 0!==e?e:[]}sameDimensionsAs(e){return this.width()===e.width()&&this.height()===e.height()}ensureThatComputed(){void 0===this._data&&(this._hasOnlyNumbers=!0,this._data=this.range.addressesArrayMap(this.dependencyGraph,e=>{const t=this.dependencyGraph.getCellValue(e);return t instanceof Ft?(this._hasOnlyNumbers=!1,new lr(Wn.VALUE,Ce.ScalarExpected)):(_t(t)||(this._hasOnlyNumbers=!1),t)}))}}
  392. /**
  393. * @license
  394. * Copyright (c) 2024 Handsoncode. All rights reserved.
  395. */class Yt{constructor(){this.changes=new Map}static empty(){return new Yt}addAll(e){for(const t of e.changes.values())this.add(t.address,t);return this}addChange(e,t,n){this.addInterpreterValue(e,t,n)}exportChanges(e){let t=[];return this.changes.forEach(n=>{const r=e.exportChange(n);Array.isArray(r)?t=t.concat(r):t.push(r)}),t}getChanges(){return Array.from(this.changes.values())}isEmpty(){return 0===this.changes.size}add(e,t){const n=t.value;if(n instanceof Ft)for(const r of n.effectiveAddressesFromData(e))this.changes.delete(fr(r));this.changes.set(fr(e),t)}addInterpreterValue(e,t,n){this.add(t,{address:t,value:e,oldValue:n})}}
  396. /**
  397. * @license
  398. * Copyright (c) 2024 Handsoncode. All rights reserved.
  399. */class Ht{constructor(e,t,n){if(this.sheet=e,this.rowStart=t,this.rowEnd=n,t<0)throw Error("Starting row cant be less than 0");if(n<t)throw Error("Row span cant end before start")}get numberOfRows(){return this.rowEnd-this.rowStart+1}get start(){return this.rowStart}get end(){return this.rowEnd}static fromNumberOfRows(e,t,n){return new Ht(e,t,t+n-1)}static fromRowStartAndEnd(e,t,n){return new Ht(e,t,n)}*rows(){for(let e=this.rowStart;e<=this.rowEnd;++e)yield e}intersect(e){if(this.sheet!==e.sheet)throw Error("Can't intersect spans from different sheets");const t=Math.max(this.rowStart,e.rowStart),n=Math.min(this.rowEnd,e.rowEnd);return t>n?null:new Ht(this.sheet,t,n)}firstRow(){return new Ht(this.sheet,this.rowStart,this.rowStart)}}class kt{constructor(e,t,n){if(this.sheet=e,this.columnStart=t,this.columnEnd=n,t<0)throw Error("Starting column cant be less than 0");if(n<t)throw Error("Column span cant end before start")}get numberOfColumns(){return this.columnEnd-this.columnStart+1}get start(){return this.columnStart}get end(){return this.columnEnd}static fromNumberOfColumns(e,t,n){return new kt(e,t,t+n-1)}static fromColumnStartAndEnd(e,t,n){return new kt(e,t,n)}*columns(){for(let e=this.columnStart;e<=this.columnEnd;++e)yield e}intersect(e){if(this.sheet!==e.sheet)throw Error("Can't intersect spans from different sheets");const t=Math.max(this.columnStart,e.columnStart),n=Math.min(this.columnEnd,e.columnEnd);return t>n?null:new kt(this.sheet,t,n)}firstColumn(){return new kt(this.sheet,this.columnStart,this.columnStart)}}
  400. /**
  401. * @license
  402. * Copyright (c) 2024 Handsoncode. All rights reserved.
  403. */(function(e){e["BUILD_ENGINE_TOTAL"]="BUILD_ENGINE_TOTAL",e["PARSER"]="PARSER",e["GRAPH_BUILD"]="GRAPH_BUILD",e["COLLECT_DEPENDENCIES"]="COLLECT_DEPENDENCIES",e["PROCESS_DEPENDENCIES"]="PROCESS_DEPENDENCIES",e["TOP_SORT"]="TOP_SORT",e["BUILD_COLUMN_INDEX"]="BUILD_COLUMN_INDEX",e["EVALUATION"]="EVALUATION",e["VLOOKUP"]="VLOOKUP",e["TRANSFORM_ASTS"]="TRANSFORM_ASTS",e["TRANSFORM_ASTS_POSTPONED"]="TRANSFORM_ASTS_POSTPONED",e["ADJUSTING_ADDRESS_MAPPING"]="ADJUSTING_ADDRESS_MAPPING",e["ADJUSTING_ARRAY_MAPPING"]="ADJUSTING_ARRAY_MAPPING",e["ADJUSTING_RANGES"]="ADJUSTING_RANGES",e["ADJUSTING_GRAPH"]="ADJUSTING_GRAPH",e["CRITERION_FUNCTION_FULL_CACHE_USED"]="CRITERION_FUNCTION_FULL_CACHE_USED",e["CRITERION_FUNCTION_PARTIAL_CACHE_USED"]="CRITERION_FUNCTION_PARTIAL_CACHE_USED"})(Pt||(Pt={}));
  404. /**
  405. * @license
  406. * Copyright (c) 2024 Handsoncode. All rights reserved.
  407. */
  408. class Vt{constructor(){this.stats=new Map([[Pt.CRITERION_FUNCTION_FULL_CACHE_USED,0],[Pt.CRITERION_FUNCTION_PARTIAL_CACHE_USED,0]]),this.startTimes=new Map}incrementCriterionFunctionFullCacheUsed(){var e;const t=(null!==(e=this.stats.get(Pt.CRITERION_FUNCTION_FULL_CACHE_USED))&&void 0!==e?e:0)+1;this.stats.set(Pt.CRITERION_FUNCTION_FULL_CACHE_USED,t)}incrementCriterionFunctionPartialCacheUsed(){var e;const t=(null!==(e=this.stats.get(Pt.CRITERION_FUNCTION_PARTIAL_CACHE_USED))&&void 0!==e?e:0)+1;this.stats.set(Pt.CRITERION_FUNCTION_PARTIAL_CACHE_USED,t)}reset(){this.stats.clear(),this.startTimes.clear(),this.stats.set(Pt.CRITERION_FUNCTION_FULL_CACHE_USED,0),this.stats.set(Pt.CRITERION_FUNCTION_PARTIAL_CACHE_USED,0)}start(e){if(this.startTimes.get(e))throw Error(`Statistics ${e} already started`);this.startTimes.set(e,Date.now())}end(e){var t;const n=Date.now(),r=this.startTimes.get(e);if(!r)throw Error(`Statistics ${e} not started`);{let i=null!==(t=this.stats.get(e))&&void 0!==t?t:0;i+=n-r,this.stats.set(e,i),this.startTimes.delete(e)}}measure(e,t){this.start(e);const n=t();return this.end(e),n}snapshot(){return new Map(this.stats)}}
  409. /**
  410. * @license
  411. * Copyright (c) 2024 Handsoncode. All rights reserved.
  412. */class Ut extends Vt{incrementCriterionFunctionFullCacheUsed(){}incrementCriterionFunctionPartialCacheUsed(){}start(e){}end(e){}}
  413. /**
  414. * @license
  415. * Copyright (c) 2024 Handsoncode. All rights reserved.
  416. */
  417. /**
  418. * @license
  419. * Copyright (c) 2024 Handsoncode. All rights reserved.
  420. */class Wt extends Error{constructor(e){super("There's no sheet with id = "+e)}}class Xt extends Error{constructor(e){super(`There's no sheet with name '${e}'`)}}class jt extends Error{constructor(e){super(`Sheet with name ${e} already exists`)}}class Zt extends Error{constructor(){super("Sheet size limit exceeded")}}class Qt extends Error{constructor(){super("This is not a formula")}}class Kt extends Error{constructor(e){super(`Address (row = ${e.row}, col = ${e.col}) is invalid`)}}class Gt extends Error{constructor(e){super("Invalid arguments, expected "+e)}}class Bt extends Error{constructor(e,t){super(`Sheets ${e} and ${t} are not equal.`)}}class Jt extends Error{constructor(e){super(`Name of Named Expression '${e}' is already present`)}}class zt extends Error{constructor(e){super(`Name of Named Expression '${e}' is invalid`)}}class $t extends Error{constructor(e){super(`Named Expression '${e}' does not exist`)}}class qt extends Error{constructor(){super("There is no operation to undo")}}class en extends Error{constructor(){super("There is no operation to redo")}}class tn extends Error{constructor(){super("There is nothing to paste")}}function nn(e,t){switch(typeof t){case"function":case"symbol":return t.toString();case"bigint":return"BigInt("+t.toString()+")";default:return t instanceof RegExp?"RegExp("+t.toString()+")":t}}class rn extends Error{constructor(e){super("Unable to parse value: "+JSON.stringify(e,nn,4))}}class sn extends Error{constructor(e,t){super(`Expected value of type: ${e} for config parameter: ${t}`)}}class on extends Error{constructor(e){super(`Config parameter ${e} cannot be empty.`)}}class an extends Error{constructor(e,t){super(`Config parameter ${e} should be at least ${t}`)}}class ln extends Error{constructor(e,t){super(`Config parameter ${e} should be at most ${t}`)}}class cn extends Error{constructor(e,t){super(`Expected one of ${e} for config parameter: ${t}`)}}class un extends Error{constructor(){super("Computations are suspended")}}class hn extends Error{constructor(e){super(`Translation for ${e} is missing in the translation package you're using.`)}}class dn extends Error{constructor(e){super("Cannot register translation for function with id: "+e)}}class mn extends Error{constructor(){super("Language not registered.")}}class gn extends Error{constructor(){super("Language already registered.")}}class pn extends Error{static functionNotDeclaredInPlugin(e,t){return new pn(`Function with id ${e} not declared in plugin ${t}`)}static functionMethodNotFound(e,t){return new pn(`Function method ${e} not found in plugin ${t}`)}}class fn extends Error{static cannotRegisterFunctionWithId(e){return new fn("Cannot register function with id "+e)}static cannotUnregisterFunctionWithId(e){return new fn("Cannot unregister function with id "+e)}static cannotUnregisterProtectedPlugin(){return new fn("Cannot unregister protected plugin")}}class Rn extends Error{constructor(){super("Cannot perform this operation, source location has an array inside.")}}class yn extends Error{constructor(){super("Cannot perform this operation, target location has an array inside.")}}class Mn extends Error{constructor(){super("Relative addresses not allowed in named expressions.")}}class Sn extends Error{constructor(e,t){super(`Alias id ${e} in plugin ${t} already defined as a function or alias.`)}}
  421. /**
  422. * @license
  423. * Copyright (c) 2024 Handsoncode. All rights reserved.
  424. */class bn{constructor(e){this.policy=e,this.mapping=new Map}getCell(e){const t=this.mapping.get(e.sheet);if(void 0===t)throw new Wt(e.sheet);return t.getCell(e)}fetchCell(e){const t=this.mapping.get(e.sheet);if(void 0===t)throw new Wt(e.sheet);const n=t.getCell(e);if(!n)throw Error("Vertex for address missing in AddressMapping");return n}strategyFor(e){const t=this.mapping.get(e);if(void 0===t)throw new Wt(e);return t}addSheet(e,t){if(this.mapping.has(e))throw Error("Sheet already added");this.mapping.set(e,t)}autoAddSheet(e,t){const{height:n,width:r,fill:i}=t,s=this.policy.call(i);this.addSheet(e,new s(r,n))}getCellValue(e){const t=this.getCell(e);return void 0===t?bt:t instanceof Cn?t.getArrayCellValue(e):t.getCellValue()}getRawValue(e){const t=this.getCell(e);return t instanceof Bn?t.getValues().rawValue:t instanceof Cn?t.getArrayCellRawValue(e):null}setCell(e,t){const n=this.mapping.get(e.sheet);if(!n)throw Error("Sheet not initialized");n.setCell(e,t)}moveCell(e,t){const n=this.mapping.get(e.sheet);if(!n)throw Error("Sheet not initialized.");if(e.sheet!==t.sheet)throw Error("Cannot move cells between sheets.");if(n.has(t))throw new Error("Cannot move cell. Destination already occupied.");const r=n.getCell(e);if(void 0===r)throw new Error("Cannot move cell. No cell with such address.");this.setCell(t,r),this.removeCell(e)}removeCell(e){const t=this.mapping.get(e.sheet);if(!t)throw Error("Sheet not initialized");t.removeCell(e)}has(e){const t=this.mapping.get(e.sheet);return void 0!==t&&t.has(e)}getHeight(e){const t=this.mapping.get(e);if(void 0===t)throw new Wt(e);return t.getHeight()}getWidth(e){const t=this.mapping.get(e);if(!t)throw new Wt(e);return t.getWidth()}addRows(e,t,n){const r=this.mapping.get(e);if(void 0===r)throw new Wt(e);r.addRows(t,n)}removeRows(e){const t=this.mapping.get(e.sheet);if(void 0===t)throw new Wt(e.sheet);t.removeRows(e)}removeSheet(e){this.mapping.delete(e)}addColumns(e,t,n){const r=this.mapping.get(e);if(void 0===r)throw new Wt(e);r.addColumns(t,n)}removeColumns(e){const t=this.mapping.get(e.sheet);if(void 0===t)throw new Wt(e.sheet);t.removeColumns(e)}*verticesFromRowsSpan(e){yield*this.mapping.get(e.sheet).verticesFromRowsSpan(e)}*verticesFromColumnsSpan(e){yield*this.mapping.get(e.sheet).verticesFromColumnsSpan(e)}*entriesFromRowsSpan(e){yield*this.mapping.get(e.sheet).entriesFromRowsSpan(e)}*entriesFromColumnsSpan(e){yield*this.mapping.get(e.sheet).entriesFromColumnsSpan(e)}*entries(){for(const[e,t]of this.mapping.entries())yield*t.getEntries(e)}*sheetEntries(e){const t=this.mapping.get(e);if(void 0===t)throw new Wt(e);yield*t.getEntries(e)}}
  425. /**
  426. * @license
  427. * Copyright (c) 2024 Handsoncode. All rights reserved.
  428. */class wn{constructor(){this.arrayMapping=new Map}getArray(e){const t=this.getArrayByCorner(e.start);if(null===t||void 0===t?void 0:t.getRange().sameAs(e))return t}getArrayByCorner(e){return this.arrayMapping.get(fr(e))}setArray(e,t){this.arrayMapping.set(fr(e.start),t)}removeArray(e){"string"===typeof e?this.arrayMapping.delete(e):this.arrayMapping.delete(fr(e.start))}count(){return this.arrayMapping.size}*arraysInRows(e){for(const[t,n]of this.arrayMapping.entries())n.spansThroughSheetRows(e.sheet,e.rowStart,e.rowEnd)&&(yield[t,n])}*arraysInCols(e){for(const[t,n]of this.arrayMapping.entries())n.spansThroughSheetColumn(e.sheet,e.columnStart,e.columnEnd)&&(yield[t,n])}isFormulaArrayInRow(e,t){for(const n of this.arrayMapping.values())if(n.spansThroughSheetRows(e,t))return!0;return!1}isFormulaArrayInAllRows(e){let t=!0;for(const n of e.rows())this.isFormulaArrayInRow(e.sheet,n)||(t=!1);return t}isFormulaArrayInColumn(e,t){for(const n of this.arrayMapping.values())if(n.spansThroughSheetColumn(e,t))return!0;return!1}isFormulaArrayInAllColumns(e){let t=!0;for(const n of e.columns())this.isFormulaArrayInColumn(e.sheet,n)||(t=!1);return t}isFormulaArrayInRange(e){for(const t of this.arrayMapping.values())if(t.getRange().doesOverlap(e))return!0;return!1}isFormulaArrayAtAddress(e){for(const t of this.arrayMapping.values())if(t.getRange().addressInRange(e))return!0;return!1}moveArrayVerticesAfterRowByRows(e,t,n){this.updateArrayVerticesInSheet(e,(e,r)=>{const i=r.getRange();return t<=i.start.row?[i.shifted(0,n),r]:void 0})}moveArrayVerticesAfterColumnByColumns(e,t,n){this.updateArrayVerticesInSheet(e,(e,r)=>{const i=r.getRange();return t<=i.start.col?[i.shifted(n,0),r]:void 0})}updateArrayVerticesInSheet(e,t){const n=Array();for(const[r,i]of this.arrayMapping.entries()){if(i.sheet!==e)continue;const s=t(r,i);void 0!==s&&(this.removeArray(r),n.push(s))}n.forEach(([e,t])=>{this.setArray(e,t)})}}
  429. /**
  430. * @license
  431. * Copyright (c) 2024 Handsoncode. All rights reserved.
  432. */class Tn{constructor(e){this.size=e}width(){return this.size.width}height(){return this.size.height}get(e,t){throw Error("Array not computed yet.")}simpleRangeValue(){throw Error("Array not computed yet.")}}class On{constructor(e){if(this.size=new ei(e.length>0?e[0].length:0,e.length),this.array=e,this.size.width<=0||this.size.height<=0)throw Error("Incorrect array size")}static fromInterpreterValue(e){return new On(e instanceof Ft?e.data:[[e]])}simpleRangeValue(){return Ft.onlyValues(this.array)}addRows(e,t){this.array.splice(e,0,...this.nullArrays(t,this.width())),this.size.height+=t}addColumns(e,t){for(let n=0;n<this.height();n++)this.array[n].splice(e,0,...new Array(t).fill(bt));this.size.width+=t}removeRows(e,t){if(this.outOfBound(0,e)||this.outOfBound(0,t))throw Error("Array index out of bound");const n=t-e+1;this.array.splice(e,n),this.size.height-=n}removeColumns(e,t){if(this.outOfBound(e,0)||this.outOfBound(t,0))throw Error("Array index out of bound");const n=t-e+1;for(const r of this.array)r.splice(e,n);this.size.width-=n}nullArrays(e,t){const n=[];for(let r=0;r<e;++r)n.push(new Array(t).fill(bt));return n}get(e,t){if(this.outOfBound(e,t))throw Error("Array index out of bound");return this.array[t][e]}set(e,t,n){if(this.outOfBound(e,t))throw Error("Array index out of bound");this.array[t][e]=n}width(){return this.size.width}height(){return this.size.height}raw(){return this.array}resize(e){if(this.height()<e.height&&isFinite(e.height)&&this.addRows(this.height(),e.height-this.height()),this.height()>e.height)throw Error("Resizing to smaller array");if(this.width()<e.width&&isFinite(e.width)&&this.addColumns(this.width(),e.width-this.width()),this.width()>e.width)throw Error("Resizing to smaller array")}outOfBound(e,t){return e<0||t<0||t>this.size.height-1||e>this.size.width-1}}class vn{constructor(e,t){this.error=e,this.size=t}get(e,t){return this.error}width(){return this.size.width}height(){return this.size.height}simpleRangeValue(){return this.error}}
  433. /**
  434. * @license
  435. * Copyright (c) 2024 Handsoncode. All rights reserved.
  436. */class En{constructor(e,t,n){this.formula=e,this.cellAddress=t,this.version=n}get width(){return 1}get height(){return 1}static fromAst(e,t,n,r){return n.isScalar()?new Ln(e,t,r):new Cn(e,t,n,r)}getFormula(e){return this.ensureRecentData(e),this.formula}ensureRecentData(e){if(this.version!=e.version()){const[t,n,r]=e.applyTransformations(this.formula,this.cellAddress,this.version);this.formula=t,this.cellAddress=n,this.version=r}}getAddress(e){return this.ensureRecentData(e),this.cellAddress}}class Cn extends En{constructor(e,t,n,r=0){super(e,t,r),n.isRef?this.array=new vn(new lr(Wn.REF,Ce.NoSpaceForArrayResult),ei.error()):this.array=new Tn(n)}get width(){return this.array.width()}get height(){return this.array.height()}get sheet(){return this.cellAddress.sheet}get leftCorner(){return this.cellAddress}setCellValue(e){if(e instanceof lr)return this.setErrorValue(e),e;const t=On.fromInterpreterValue(e);return t.resize(this.array.size),this.array=t,e}getCellValue(){if(this.array instanceof Tn)throw Error("Array not computed yet.");return this.array.simpleRangeValue()}valueOrUndef(){if(!(this.array instanceof Tn))return this.array.simpleRangeValue()}getArrayCellValue(e){const t=e.col-this.cellAddress.col,n=e.row-this.cellAddress.row;try{return this.array.get(t,n)}catch(r){return new lr(Wn.REF)}}getArrayCellRawValue(e){const t=this.getArrayCellValue(e);return t instanceof lr||t===bt?void 0:wt(t)}setArrayCellValue(e,t){const n=e.col-this.cellAddress.col,r=e.row-this.cellAddress.row;this.array instanceof On&&this.array.set(n,r,t)}setNoSpace(){return this.array=new vn(new lr(Wn.SPILL,Ce.NoSpaceForArrayResult),ei.error()),this.getCellValue()}getRange(){return Tr.spanFrom(this.cellAddress,this.width,this.height)}getRangeOrUndef(){return Tr.spanFromOrUndef(this.cellAddress,this.width,this.height)}setAddress(e){this.cellAddress=e}setFormula(e){this.formula=e}spansThroughSheetRows(e,t,n=t){return this.cellAddress.sheet===e&&this.cellAddress.row<=n&&t<this.cellAddress.row+this.height}spansThroughSheetColumn(e,t,n=t){return this.cellAddress.sheet===e&&this.cellAddress.col<=n&&t<this.cellAddress.col+this.width}isComputed(){return!(this.array instanceof Tn)}columnsFromArray(){return kt.fromNumberOfColumns(this.cellAddress.sheet,this.cellAddress.col,this.width)}rowsFromArray(){return Ht.fromNumberOfRows(this.cellAddress.sheet,this.cellAddress.row,this.height)}ensureRecentData(e){}isLeftCorner(e){return Mr(this.cellAddress,e)}setErrorValue(e){this.array=new vn(e,this.array.size)}}class Ln extends En{constructor(e,t,n){super(e,t,n)}valueOrUndef(){return this.cachedCellValue}setCellValue(e){return this.cachedCellValue=e,this.cachedCellValue}getCellValue(){if(void 0!==this.cachedCellValue)return this.cachedCellValue;throw Error("Value of the formula cell is not computed.")}isComputed(){return void 0!==this.cachedCellValue}}
  437. /**
  438. * @license
  439. * Copyright (c) 2024 Handsoncode. All rights reserved.
  440. */class Nn{constructor(e){this.range=e,this.functionCache=new Map,this.criterionFunctionCache=new Map,this.dependentCacheRanges=new Set,this.bruteForce=!1}get start(){return this.range.start}get end(){return this.range.end}get sheet(){return this.range.start.sheet}getFunctionValue(e){return this.functionCache.get(e)}setFunctionValue(e,t){this.functionCache.set(e,t)}getCriterionFunctionValue(e,t){var n;return null===(n=this.getCriterionFunctionValues(e).get(t))||void 0===n?void 0:n[0]}getCriterionFunctionValues(e){var t;return null!==(t=this.criterionFunctionCache.get(e))&&void 0!==t?t:new Map}setCriterionFunctionValues(e,t){this.criterionFunctionCache.set(e,t)}addDependentCacheRange(e){e!==this&&this.dependentCacheRanges.add(e)}clearCache(){this.functionCache.clear(),this.criterionFunctionCache.clear(),this.dependentCacheRanges.forEach(e=>e.criterionFunctionCache.clear()),this.dependentCacheRanges.clear()}getStart(){return this.start}getEnd(){return this.end}}
  441. /**
  442. * @license
  443. * Copyright (c) 2024 Handsoncode. All rights reserved.
  444. */const _n=(e,t,n,r,i)=>{if(t instanceof Nn){const e=t.range.intersectionWith(n);return void 0!==e?Array.from(e.addresses(i)):[]}let s,o;return t instanceof En?(s=t.getFormula(r),o=t.getAddress(r),mt(s,e).filter(e=>e instanceof gt).map(e=>e.dependency.toSimpleCellAddress(o)).filter(e=>n.addressInRange(e))):[]};
  445. /**
  446. * @license
  447. * Copyright (c) 2024 Handsoncode. All rights reserved.
  448. */var In;(function(e){e[e["ON_STACK"]=0]="ON_STACK",e[e["PROCESSED"]=1]="PROCESSED",e[e["POPPED"]=2]="POPPED"})(In||(In={}));class Pn{constructor(e=[],t=[]){this.nodesSparseArray=e,this.edgesSparseArray=t,this.entranceTime=[],this.low=[],this.parent=[],this.inSCC=[],this.nodeStatus=[],this.order=[],this.sccNonSingletons=[],this.timeCounter=0}getTopSortedWithSccSubgraphFrom(e,t,n){const r=e.reverse();return r.forEach(e=>this.runDFS(e)),this.postprocess(r,n,t)}getAdjacentNodeIds(e){return this.edgesSparseArray[e].filter(e=>void 0!==e&&this.nodesSparseArray[e])}runDFS(e){if(void 0!==this.nodeStatus[e])return;this.nodeStatus[e]=In.ON_STACK;const t=[e],n=[];while(t.length>0){const e=t[t.length-1];switch(this.nodeStatus[e]){case In.ON_STACK:this.handleOnStack(e,n,t);break;case In.PROCESSED:this.handleProcessed(e,n,t);break;case In.POPPED:t.pop();break}}}handleOnStack(e,t,n){this.entranceTime[e]=this.timeCounter,this.low[e]=this.timeCounter,this.timeCounter++,t.push(e),this.getAdjacentNodeIds(e).forEach(t=>{void 0===this.entranceTime[t]&&(n.push(t),this.parent[t]=e,this.nodeStatus[t]=In.ON_STACK)}),this.nodeStatus[e]=In.PROCESSED}handleProcessed(e,t,n){let r=this.entranceTime[e];if(this.getAdjacentNodeIds(e).forEach(t=>{this.inSCC[t]||(r=this.parent[t]===e?Math.min(r,this.low[t]):Math.min(r,this.entranceTime[t]))}),this.low[e]=r,r===this.entranceTime[e]){const n=[];do{n.push(t[t.length-1]),t.pop()}while(n[n.length-1]!==e);n.forEach(e=>{this.inSCC[e]=!0}),this.order.push(...n),n.length>1&&n.forEach(e=>{this.sccNonSingletons[e]=!0})}n.pop(),this.nodeStatus[e]=In.POPPED}postprocess(e,t,n){const r=[];e.forEach(e=>{r[e]=!0});const i=[],s=[];return this.order.reverse(),this.order.forEach(e=>{const o=this.getAdjacentNodeIds(e);this.sccNonSingletons[e]||o.includes(e)?(s.push(this.nodesSparseArray[e]),t(this.nodesSparseArray[e]),o.forEach(e=>r[e]=!0)):(i.push(this.nodesSparseArray[e]),r[e]&&n(this.nodesSparseArray[e])&&o.forEach(e=>r[e]=!0))}),{sorted:i,cycled:s}}}
  449. /**
  450. * @license
  451. * Copyright (c) 2024 Handsoncode. All rights reserved.
  452. */class xn{constructor(e,t){this.rawValue=e,this.processFn=t,this.processedValue=null}getProcessedValue(){return null===this.processedValue&&(this.processedValue=this.processFn(this.rawValue)),this.processedValue}markAsModified(){this.processedValue=null}}
  453. /**
  454. * @license
  455. * Copyright (c) 2024 Handsoncode. All rights reserved.
  456. */class Dn{constructor(e){this.dependencyQuery=e,this.nodesSparseArray=[],this.edgesSparseArray=[],this.nodesIds=new Map,this.dirtyAndVolatileNodeIds=new xn({dirty:[],volatile:[]},e=>this.processDirtyAndVolatileNodeIds(e)),this.infiniteRangeIds=new Set,this.changingWithStructureNodeIds=[],this.nextId=0}getNodes(){return this.nodesSparseArray.filter(e=>void 0!==e)}hasNode(e){return this.nodesIds.has(e)}existsEdge(e,t){const n=this.getNodeId(e),r=this.getNodeId(t);return void 0!==n&&void 0!==r&&this.edgesSparseArray[n].includes(r)}adjacentNodes(e){const t=this.getNodeId(e);if(void 0===t)throw this.missingNodeError(e);return new Set(this.edgesSparseArray[t].filter(e=>void 0!==e).map(e=>this.nodesSparseArray[e]))}adjacentNodesCount(e){const t=this.getNodeId(e);if(void 0===t)throw this.missingNodeError(e);return this.fixEdgesArrayForNode(t).length}addNodeAndReturnId(e){const t=this.nodesIds.get(e);if(void 0!==t)return t;const n=this.nextId;return this.nextId++,this.nodesSparseArray[n]=e,this.edgesSparseArray[n]=[],this.nodesIds.set(e,n),n}addEdge(e,t){const n=this.getNodeIdIfNotNumber(e),r=this.getNodeIdIfNotNumber(t);if(void 0===n)throw this.missingNodeError(e);if(void 0===r)throw this.missingNodeError(t);this.edgesSparseArray[n].includes(r)||this.edgesSparseArray[n].push(r)}removeNode(e){const t=this.getNodeId(e);if(void 0===t)throw this.missingNodeError(e);this.edgesSparseArray[t].length>0&&(this.edgesSparseArray[t].forEach(e=>this.dirtyAndVolatileNodeIds.rawValue.dirty.push(e)),this.dirtyAndVolatileNodeIds.markAsModified());const n=this.removeDependencies(e);return delete this.nodesSparseArray[t],delete this.edgesSparseArray[t],this.infiniteRangeIds.delete(t),this.nodesIds.delete(e),n}removeEdge(e,t){const n=this.getNodeIdIfNotNumber(e),r=this.getNodeIdIfNotNumber(t);if(void 0===n)throw this.missingNodeError(e);if(void 0===r)throw this.missingNodeError(t);const i=this.edgesSparseArray[n].indexOf(r);if(-1===i)throw new Error("Edge does not exist");delete this.edgesSparseArray[n][i]}removeEdgeIfExists(e,t){const n=this.getNodeId(e),r=this.getNodeId(t);if(void 0===n)return;if(void 0===r)return;const i=this.edgesSparseArray[n].indexOf(r);-1!==i&&delete this.edgesSparseArray[n][i]}topSortWithScc(){return this.getTopSortedWithSccSubgraphFrom(this.getNodes(),()=>!0,()=>{})}getTopSortedWithSccSubgraphFrom(e,t,n){const r=new Pn(this.nodesSparseArray,this.edgesSparseArray),i=e.map(e=>this.getNodeId(e)).filter(e=>void 0!==e);return r.getTopSortedWithSccSubgraphFrom(i,t,n)}markNodeAsVolatile(e){const t=this.getNodeId(e);void 0!==t&&(this.dirtyAndVolatileNodeIds.rawValue.volatile.push(t),this.dirtyAndVolatileNodeIds.markAsModified())}markNodeAsDirty(e){const t=this.getNodeId(e);void 0!==t&&(this.dirtyAndVolatileNodeIds.rawValue.dirty.push(t),this.dirtyAndVolatileNodeIds.markAsModified())}getDirtyAndVolatileNodes(){return this.dirtyAndVolatileNodeIds.getProcessedValue()}clearDirtyNodes(){this.dirtyAndVolatileNodeIds.rawValue.dirty=[],this.dirtyAndVolatileNodeIds.markAsModified()}markNodeAsChangingWithStructure(e){const t=this.getNodeId(e);void 0!==t&&this.changingWithStructureNodeIds.push(t)}markChangingWithStructureNodesAsDirty(){this.changingWithStructureNodeIds.length<=0||(this.dirtyAndVolatileNodeIds.rawValue.dirty=[...this.dirtyAndVolatileNodeIds.rawValue.dirty,...this.changingWithStructureNodeIds],this.dirtyAndVolatileNodeIds.markAsModified())}markNodeAsInfiniteRange(e){const t=this.getNodeIdIfNotNumber(e);void 0!==t&&this.infiniteRangeIds.add(t)}getInfiniteRanges(){return[...this.infiniteRangeIds].map(e=>({node:this.nodesSparseArray[e],id:e}))}getNodeId(e){return this.nodesIds.get(e)}getNodeIdIfNotNumber(e){return"number"===typeof e?e:this.nodesIds.get(e)}fixEdgesArrayForNode(e){const t=this.edgesSparseArray[e];return this.edgesSparseArray[e]=t.filter(e=>void 0!==e&&this.nodesSparseArray[e]),this.edgesSparseArray[e]}removeDependencies(e){const t=this.dependencyQuery(e);return t.forEach(([t,n])=>{this.removeEdgeIfExists(n,e)}),t}processDirtyAndVolatileNodeIds({dirty:e,volatile:t}){return[...new Set([...e,...t])].map(e=>this.nodesSparseArray[e]).filter(e=>void 0!==e)}missingNodeError(e){return new Error("Unknown node "+e)}}
  457. /**
  458. * @license
  459. * Copyright (c) 2024 Handsoncode. All rights reserved.
  460. */class An{constructor(){this.rangeMapping=new Map}getMappingSize(e){var t,n;return null!==(n=null===(t=this.rangeMapping.get(e))||void 0===t?void 0:t.size)&&void 0!==n?n:0}setRange(e){let t=this.rangeMapping.get(e.getStart().sheet);void 0===t&&(t=new Map,this.rangeMapping.set(e.getStart().sheet,t));const n=Fn(e.getStart(),e.getEnd());t.set(n,e)}removeRange(e){const t=e.getStart().sheet,n=this.rangeMapping.get(t);if(void 0===n)return;const r=Fn(e.getStart(),e.getEnd());n.delete(r),0===n.size&&this.rangeMapping.delete(t)}getRange(e,t){const n=this.rangeMapping.get(e.sheet),r=Fn(e,t);return null===n||void 0===n?void 0:n.get(r)}fetchRange(e,t){const n=this.getRange(e,t);if(!n)throw Error("Range does not exist");return n}truncateRanges(e,t){const n=Array(),r=Array(),i=Array(),s=e.sheet;for(const[a,l]of this.entriesFromSheet(e.sheet)){const o=l.range;e.start<=t(l.range.end)&&(o.removeSpan(e),o.shouldBeRemoved()?(this.removeByKey(s,a),n.push(l)):r.push([a,l]),i.push(l))}const o=[];r.sort((e,n)=>Hn(e[1],n[1],t));for(const[a,l]of r){const e=Yn(l.range);if(e===a)continue;const t=this.getByKey(s,e);this.removeByKey(s,a),void 0!==t&&l!=t?o.push([t,l]):this.setRange(l)}return{verticesToRemove:n,verticesToMerge:o,verticesWithChangedSize:i}}moveAllRangesInSheetAfterRowByRows(e,t,n){return this.updateVerticesFromSheet(e,(e,r)=>t<=r.start.row?(r.range.shiftByRows(n),{changedSize:!1,vertex:r}):t>r.start.row&&t<=r.end.row?(r.range.expandByRows(n),{changedSize:!0,vertex:r}):void 0)}moveAllRangesInSheetAfterColumnByColumns(e,t,n){return this.updateVerticesFromSheet(e,(e,r)=>t<=r.start.col?(r.range.shiftByColumns(n),{changedSize:!1,vertex:r}):t>r.start.col&&t<=r.end.col?(r.range.expandByColumns(n),{changedSize:!0,vertex:r}):void 0)}moveRangesInsideSourceRange(e,t,n,r){this.updateVerticesFromSheet(e.sheet,(i,s)=>e.containsRange(s.range)?(s.range.shiftByColumns(t),s.range.shiftByRows(n),s.range.moveToSheet(r),{changedSize:!1,vertex:s}):void 0)}removeRangesInSheet(e){if(this.rangeMapping.has(e)){const t=this.rangeMapping.get(e).values();return this.rangeMapping.delete(e),t}return[][Symbol.iterator]()}*rangesInSheet(e){const t=this.rangeMapping.get(e);t&&(yield*t.values())}*rangeVerticesContainedInRange(e){for(const t of this.rangesInSheet(e.sheet))e.containsRange(t.range)&&(yield t)}findSmallerRange(e){if(e.height()>1&&Number.isFinite(e.height())){const t=mr(e.end.sheet,e.end.col,e.end.row-1),n=this.getRange(e.start,t);if(void 0!==n){const t=Tr.fromSimpleCellAddresses(mr(e.start.sheet,e.start.col,e.end.row),e.end);return{smallerRangeVertex:n,restRange:t}}}return{restRange:e}}*entriesFromSheet(e){const t=this.rangeMapping.get(e);t&&(yield*t.entries())}removeByKey(e,t){this.rangeMapping.get(e).delete(t)}getByKey(e,t){var n;return null===(n=this.rangeMapping.get(e))||void 0===n?void 0:n.get(t)}updateVerticesFromSheet(e,t){const n=Array();for(const[r,i]of this.entriesFromSheet(e)){const s=t(r,i);void 0!==s&&(this.removeByKey(e,r),n.push(s))}return n.forEach(e=>{this.setRange(e.vertex)}),{verticesWithChangedSize:n.filter(e=>e.changedSize).map(e=>e.vertex)}}}function Fn(e,t){return`${e.col},${e.row},${t.col},${t.row}`}function Yn(e){return Fn(e.start,e.end)}const Hn=(e,t,n)=>{const r=n(e.range.start),i=n(e.range.start);if(r===i){const r=n(e.range.end),i=n(t.range.end);return r-i}return r-i};
  461. /**
  462. * @license
  463. * Copyright (c) 2024 Handsoncode. All rights reserved.
  464. */class kn{constructor(e,t,n){this.functions=e,this.errors=t,this.ui=n,this._protectedTranslations={VERSION:"VERSION"},this.checkUI(),this.checkErrors(),this.checkFunctionTranslations(this.functions),Object.assign(this.functions,this._protectedTranslations)}extendFunctions(e){this.checkFunctionTranslations(e),Object.assign(this.functions,e)}buildFunctionMapping(){return Object.keys(this.functions).reduce((e,t)=>(e[this.functions[t]]=t,e),{})}buildErrorMapping(){return Object.keys(this.errors).reduce((e,t)=>(e[this.errors[t]]=t,e),{})}isFunctionTranslated(e){return void 0!==this.functions[e]}getFunctionTranslations(e){const t=[];for(const n of e)this.isFunctionTranslated(n)&&t.push(this.functions[n]);return t}getFunctionTranslation(e){const t=this.functions[e];if(void 0===t)throw new hn("functions."+e);return t}getMaybeFunctionTranslation(e){return this.functions[e]}getErrorTranslation(e){if(e===Wn.LIC)return`#${Wn.LIC}!`;const t=this.errors[e];if(void 0===t)throw new hn("errors."+e);return t}getUITranslation(e){const t=this.ui[e];if(void 0===t)throw new hn("ui."+e);return t}checkUI(){for(const e of Object.values(Un))if(!(e in this.ui))throw new hn("ui."+e)}checkErrors(){for(const e of Object.values(Wn))if(!(e in this.errors)&&e!==Wn.LIC)throw new hn("errors."+e)}checkFunctionTranslations(e){const t=new Set(Object.getOwnPropertyNames(e));for(const n of Object.getOwnPropertyNames(this._protectedTranslations))if(t.has(n))throw new dn(n)}}function Vn(e){return new kn(Object.assign({},e.functions),Object.assign({},e.errors),Object.assign({},e.ui))}
  465. /**
  466. * @license
  467. * Copyright (c) 2024 Handsoncode. All rights reserved.
  468. */var Un,Wn,Xn;
  469. /**
  470. * @license
  471. * Copyright (c) 2024 Handsoncode. All rights reserved.
  472. */
  473. function jn(e){return e.toLowerCase()}(function(e){e["NEW_SHEET_PREFIX"]="NEW_SHEET_PREFIX"})(Un||(Un={}));class Zn{constructor(e,t){this.id=e,this.displayName=t}get canonicalName(){return jn(this.displayName)}}class Qn{constructor(e){this.languages=e,this.mappingFromCanonicalName=new Map,this.mappingFromId=new Map,this.lastSheetId=-1,this.fetch=e=>{const t=this.mappingFromCanonicalName.get(jn(e));if(void 0===t)throw new Xt(e);return t.id},this.get=e=>{var t;return null===(t=this.mappingFromCanonicalName.get(jn(e)))||void 0===t?void 0:t.id},this.fetchDisplayName=e=>this.fetchSheetById(e).displayName,this.sheetNamePrefix=e.getUITranslation(Un.NEW_SHEET_PREFIX)}addSheet(e=`${this.sheetNamePrefix}${this.lastSheetId+2}`){const t=jn(e);if(this.mappingFromCanonicalName.has(t))throw new jt(e);this.lastSheetId++;const n=new Zn(this.lastSheetId,e);return this.store(n),n.id}removeSheet(e){const t=this.fetchSheetById(e);e==this.lastSheetId&&--this.lastSheetId,this.mappingFromCanonicalName.delete(t.canonicalName),this.mappingFromId.delete(t.id)}getDisplayName(e){var t;return null===(t=this.mappingFromId.get(e))||void 0===t?void 0:t.displayName}*displayNames(){for(const e of this.mappingFromCanonicalName.values())yield e.displayName}numberOfSheets(){return this.mappingFromCanonicalName.size}hasSheetWithId(e){return this.mappingFromId.has(e)}hasSheetWithName(e){return this.mappingFromCanonicalName.has(jn(e))}renameSheet(e,t){const n=this.fetchSheetById(e),r=n.displayName;if(r===t)return;const i=this.mappingFromCanonicalName.get(jn(t));if(void 0!==i&&i.id!==n.id)throw new jt(t);const s=n.canonicalName;return this.mappingFromCanonicalName.delete(s),n.displayName=t,this.store(n),r}sheetNames(){return Array.from(this.mappingFromId.values()).map(e=>e.displayName)}store(e){this.mappingFromId.set(e.id,e),this.mappingFromCanonicalName.set(e.canonicalName,e)}fetchSheetById(e){const t=this.mappingFromId.get(e);if(void 0===t)throw new Wt(e);return t}}
  474. /**
  475. * @license
  476. * Copyright (c) 2024 Handsoncode. All rights reserved.
  477. */class Kn{constructor(e,t,n,r,i,s,o,a){this.addressMapping=e,this.rangeMapping=t,this.sheetMapping=n,this.arrayMapping=r,this.stats=i,this.lazilyTransformingAstService=s,this.functionRegistry=o,this.namedExpressions=a,this.changes=Yt.empty(),this.dependencyQueryAddresses=e=>{if(e instanceof Nn)return this.rangeDependencyQuery(e).map(([e,t])=>e);{const t=this.formulaDependencyQuery(e);if(void 0!==t){const[e,n]=t;return n.map(t=>t instanceof yt?this.namedExpressions.namedExpressionOrPlaceholder(t.name,e.sheet).address:Rr(t)?t:wr(t.start,t.end))}return[]}},this.dependencyQueryVertices=e=>{if(e instanceof Nn)return this.rangeDependencyQuery(e);{const t=this.formulaDependencyQuery(e);if(void 0!==t){const[e,n]=t;return n.map(t=>{if(t instanceof Tr)return[t.start,this.rangeMapping.fetchRange(t.start,t.end)];if(t instanceof yt){const n=this.namedExpressions.namedExpressionOrPlaceholder(t.name,e.sheet);return[n.address,this.addressMapping.fetchCell(n.address)]}return[t,this.addressMapping.fetchCell(t)]})}return[]}},this.rangeDependencyQuery=e=>{const t=[],{smallerRangeVertex:n,restRange:r}=this.rangeMapping.findSmallerRange(e.range);let i;void 0!==n&&this.graph.adjacentNodes(n).has(e)?(i=r,t.push([new Tr(n.start,n.end),n])):i=e.range;for(const s of i.addresses(this)){const e=this.addressMapping.getCell(s);void 0!==e&&t.push([s,e])}return t},this.formulaDependencyQuery=e=>{let t,n;if(!(e instanceof En))return;n=e.getAddress(this.lazilyTransformingAstService),t=e.getFormula(this.lazilyTransformingAstService);const r=mt(t,this.functionRegistry);return[n,Mt(r,n)]},this.graph=new Dn(this.dependencyQueryVertices)}static buildEmpty(e,t,n,r,i){return new Kn(new bn(t.chooseAddressMappingPolicy),new An,new Qn(t.translationPackage),new wn,i,e,n,r)}setFormulaToCell(e,t,n,r,i,s){const o=En.fromAst(t,e,r,this.lazilyTransformingAstService.version());return this.exchangeOrAddFormulaVertex(o),this.processCellDependencies(n,o),this.graph.markNodeAsDirty(o),i&&this.markAsVolatile(o),s&&this.markAsDependentOnStructureChange(o),this.correctInfiniteRangesDependency(e),this.getAndClearContentChanges()}setParsingErrorToCell(e,t){const n=this.shrinkPossibleArrayAndGetCell(e);return this.exchangeOrAddGraphNode(n,t),this.addressMapping.setCell(e,t),this.graph.markNodeAsDirty(t),this.correctInfiniteRangesDependency(e),this.getAndClearContentChanges()}setValueToCell(e,t){const n=this.shrinkPossibleArrayAndGetCell(e);if(n instanceof Cn&&this.arrayMapping.removeArray(n.getRange()),n instanceof Bn){const e=n.getValues();e.rawValue!==t.rawValue&&(n.setValues(t),this.graph.markNodeAsDirty(n))}else{const r=new Bn(t.parsedValue,t.rawValue);this.exchangeOrAddGraphNode(n,r),this.addressMapping.setCell(e,r),this.graph.markNodeAsDirty(r)}return this.correctInfiniteRangesDependency(e),this.getAndClearContentChanges()}setCellEmpty(e){const t=this.shrinkPossibleArrayAndGetCell(e);if(void 0===t)return Yt.empty();if(this.graph.adjacentNodes(t).size>0){const n=new Gn;this.exchangeGraphNode(t,n),0===this.graph.adjacentNodesCount(n)?(this.removeVertex(n),this.addressMapping.removeCell(e)):(this.graph.markNodeAsDirty(n),this.addressMapping.setCell(e,n))}else this.removeVertex(t),this.addressMapping.removeCell(e);return this.getAndClearContentChanges()}clearDirtyVertices(){this.graph.clearDirtyNodes()}verticesToRecompute(){return this.graph.getDirtyAndVolatileNodes()}processCellDependencies(e,t){const n=this.graph.getNodeId(t);e.forEach(e=>{if(e instanceof Tr){const t=e;let r=this.getRange(t.start,t.end);void 0===r&&(r=new Nn(t),this.rangeMapping.setRange(r)),this.graph.addNodeAndReturnId(r);const i=this.graph.getNodeId(r);t.isFinite()||this.graph.markNodeAsInfiniteRange(i);const{smallerRangeVertex:s,restRange:o}=this.rangeMapping.findSmallerRange(t);if(void 0!==s){if(this.graph.addEdge(s,i),r.bruteForce){r.bruteForce=!1;for(const e of t.addresses(this))this.graph.removeEdge(this.fetchCell(e),i)}}else r.bruteForce=!0;const a=this.arrayMapping.getArray(o);if(void 0!==a)this.graph.addEdge(a,i);else for(const e of o.addresses(this)){const{vertex:t,id:n}=this.fetchCellOrCreateEmpty(e);this.graph.addEdge(null!==n&&void 0!==n?n:t,i)}this.graph.addEdge(i,n),t.isFinite()&&this.correctInfiniteRangesDependenciesByRangeVertex(r)}else if(e instanceof yt){const r=t.getAddress(this.lazilyTransformingAstService).sheet,{vertex:i,id:s}=this.fetchNamedExpressionVertex(e.name,r);this.graph.addEdge(null!==s&&void 0!==s?s:i,n)}else{const{vertex:t,id:r}=this.fetchCellOrCreateEmpty(e);this.graph.addEdge(null!==r&&void 0!==r?r:t,n)}})}fetchNamedExpressionVertex(e,t){const n=this.namedExpressions.namedExpressionOrPlaceholder(e,t);return this.fetchCellOrCreateEmpty(n.address)}exchangeNode(e,t){const n=this.fetchCellOrCreateEmpty(e).vertex,r=this.fetchCellOrCreateEmpty(t).vertex;this.addressMapping.removeCell(e),this.exchangeGraphNode(n,r)}fetchCellOrCreateEmpty(e){const t=this.addressMapping.getCell(e);if(void 0!==t)return{vertex:t,id:void 0};const n=new Gn,r=this.graph.addNodeAndReturnId(n);return this.addressMapping.setCell(e,n),{vertex:n,id:r}}removeRows(e){this.stats.measure(Pt.ADJUSTING_GRAPH,()=>{for(const[t,n]of this.addressMapping.entriesFromRowsSpan(e)){for(const e of this.graph.adjacentNodes(n))this.graph.markNodeAsDirty(e);if(n instanceof Cn){if(!n.isLeftCorner(t))continue;this.shrinkArrayToCorner(n),this.arrayMapping.removeArray(n.getRange())}this.removeVertex(n)}}),this.stats.measure(Pt.ADJUSTING_ADDRESS_MAPPING,()=>{this.addressMapping.removeRows(e)});const t=this.stats.measure(Pt.ADJUSTING_RANGES,()=>{const t=this.truncateRanges(e,e=>e.row);return this.getArrayVerticesRelatedToRanges(t)});return this.stats.measure(Pt.ADJUSTING_ARRAY_MAPPING,()=>{this.fixArraysAfterRemovingRows(e.sheet,e.rowStart,e.numberOfRows)}),this.addStructuralNodesToChangeSet(),{affectedArrays:t,contentChanges:this.getAndClearContentChanges()}}removeSheet(e){this.clearSheet(e);for(const[t,n]of this.addressMapping.sheetEntries(e)){for(const e of this.graph.adjacentNodes(n))this.graph.markNodeAsDirty(e);this.removeVertex(n),this.addressMapping.removeCell(t)}this.stats.measure(Pt.ADJUSTING_RANGES,()=>{const t=this.rangeMapping.removeRangesInSheet(e);for(const e of t)this.removeVertex(e);this.stats.measure(Pt.ADJUSTING_ADDRESS_MAPPING,()=>{this.addressMapping.removeSheet(e)})})}clearSheet(e){const t=new Set;for(const[n,r]of this.addressMapping.sheetEntries(e))r instanceof Cn?t.add(r):this.setCellEmpty(n);for(const n of t.values())this.setArrayEmpty(n);this.addStructuralNodesToChangeSet()}removeColumns(e){this.stats.measure(Pt.ADJUSTING_GRAPH,()=>{for(const[t,n]of this.addressMapping.entriesFromColumnsSpan(e)){for(const e of this.graph.adjacentNodes(n))this.graph.markNodeAsDirty(e);if(n instanceof Cn){if(!n.isLeftCorner(t))continue;this.shrinkArrayToCorner(n),this.arrayMapping.removeArray(n.getRange())}this.removeVertex(n)}}),this.stats.measure(Pt.ADJUSTING_ADDRESS_MAPPING,()=>{this.addressMapping.removeColumns(e)});const t=this.stats.measure(Pt.ADJUSTING_RANGES,()=>{const t=this.truncateRanges(e,e=>e.col);return this.getArrayVerticesRelatedToRanges(t)});return this.stats.measure(Pt.ADJUSTING_ARRAY_MAPPING,()=>this.fixArraysAfterRemovingColumns(e.sheet,e.columnStart,e.numberOfColumns)),this.addStructuralNodesToChangeSet(),{affectedArrays:t,contentChanges:this.getAndClearContentChanges()}}addRows(e){this.stats.measure(Pt.ADJUSTING_ADDRESS_MAPPING,()=>{this.addressMapping.addRows(e.sheet,e.rowStart,e.numberOfRows)});const t=this.stats.measure(Pt.ADJUSTING_RANGES,()=>{const t=this.rangeMapping.moveAllRangesInSheetAfterRowByRows(e.sheet,e.rowStart,e.numberOfRows);return this.fixRangesWhenAddingRows(e.sheet,e.rowStart,e.numberOfRows),this.getArrayVerticesRelatedToRanges(t.verticesWithChangedSize)});this.stats.measure(Pt.ADJUSTING_ARRAY_MAPPING,()=>{this.fixArraysAfterAddingRow(e.sheet,e.rowStart,e.numberOfRows)});for(const n of this.addressMapping.verticesFromRowsSpan(e))this.graph.markNodeAsDirty(n);return this.addStructuralNodesToChangeSet(),{affectedArrays:t}}addColumns(e){this.stats.measure(Pt.ADJUSTING_ADDRESS_MAPPING,()=>{this.addressMapping.addColumns(e.sheet,e.columnStart,e.numberOfColumns)});const t=this.stats.measure(Pt.ADJUSTING_RANGES,()=>{const t=this.rangeMapping.moveAllRangesInSheetAfterColumnByColumns(e.sheet,e.columnStart,e.numberOfColumns);return this.fixRangesWhenAddingColumns(e.sheet,e.columnStart,e.numberOfColumns),this.getArrayVerticesRelatedToRanges(t.verticesWithChangedSize)});this.stats.measure(Pt.ADJUSTING_ARRAY_MAPPING,()=>this.fixArraysAfterAddingColumn(e.sheet,e.columnStart,e.numberOfColumns));for(const n of this.addressMapping.verticesFromColumnsSpan(e))this.graph.markNodeAsDirty(n);return this.addStructuralNodesToChangeSet(),{affectedArrays:t,contentChanges:this.getAndClearContentChanges()}}isThereSpaceForArray(e){const t=e.getRangeOrUndef();if(void 0===t)return!1;for(const n of t.addresses(this)){const t=this.addressMapping.getCell(n);if(void 0!==t&&!(t instanceof Gn)&&t!==e)return!1}return!0}moveCells(e,t,n,r){for(const i of e.addressesWithDirection(t,n,this)){const s=mr(r,i.col+t,i.row+n);let o=this.addressMapping.getCell(i);const a=this.addressMapping.getCell(s);if(this.addressMapping.removeCell(i),void 0!==o){this.graph.markNodeAsDirty(o),this.addressMapping.setCell(s,o);let t=void 0;for(const n of this.graph.adjacentNodes(o))n instanceof Nn&&!e.containsRange(n.range)&&(t=null!==t&&void 0!==t?t:this.fetchCellOrCreateEmpty(i).vertex,this.graph.addEdge(t,n),this.graph.removeEdge(o,n));t&&(this.graph.markNodeAsDirty(t),this.addressMapping.setCell(i,t))}if(void 0!==a){void 0===o&&this.addressMapping.removeCell(s);for(const e of this.graph.adjacentNodes(a))o=null!==o&&void 0!==o?o:this.fetchCellOrCreateEmpty(s).vertex,this.graph.addEdge(o,e),this.graph.markNodeAsDirty(o);this.removeVertex(a)}}for(const i of this.rangeMapping.rangeVerticesContainedInRange(e))for(const t of this.graph.adjacentNodes(i))if(t instanceof Nn&&!e.containsRange(t.range)){this.graph.removeEdge(i,t);for(const e of i.range.addresses(this)){const{vertex:n,id:r}=this.fetchCellOrCreateEmpty(e);this.graph.addEdge(null!==r&&void 0!==r?r:n,t),this.addressMapping.setCell(e,n),this.graph.markNodeAsDirty(n)}}this.rangeMapping.moveRangesInsideSourceRange(e,t,n,r)}setArrayEmpty(e){const t=Tr.spanFrom(e.getAddress(this.lazilyTransformingAstService),e.width,e.height),n=this.graph.adjacentNodes(e);for(const r of t.addresses(this))this.addressMapping.removeCell(r);for(const r of n.values()){const t=_n(this.functionRegistry,r,e.getRange(),this.lazilyTransformingAstService,this);for(const e of t){const{vertex:t,id:n}=this.fetchCellOrCreateEmpty(e);this.graph.addEdge(null!==n&&void 0!==n?n:t,r)}t.length>0&&this.graph.markNodeAsDirty(r)}this.removeVertex(e),this.arrayMapping.removeArray(e.getRange())}addVertex(e,t){this.graph.addNodeAndReturnId(t),this.addressMapping.setCell(e,t)}addArrayVertex(e,t){this.graph.addNodeAndReturnId(t),this.setAddressMappingForArrayVertex(t,e)}*arrayFormulaNodes(){for(const e of this.graph.getNodes())e instanceof Cn&&(yield e)}*entriesFromRowsSpan(e){yield*this.addressMapping.entriesFromRowsSpan(e)}*entriesFromColumnsSpan(e){yield*this.addressMapping.entriesFromColumnsSpan(e)}fetchCell(e){return this.addressMapping.fetchCell(e)}getCell(e){return this.addressMapping.getCell(e)}getCellValue(e){return this.addressMapping.getCellValue(e)}getRawValue(e){return this.addressMapping.getRawValue(e)}getScalarValue(e){const t=this.addressMapping.getCellValue(e);return t instanceof Ft?new lr(Wn.VALUE,Ce.ScalarExpected):t}existsEdge(e,t){return this.graph.existsEdge(e,t)}getSheetId(e){return this.sheetMapping.fetch(e)}getSheetHeight(e){return this.addressMapping.getHeight(e)}getSheetWidth(e){return this.addressMapping.getWidth(e)}getArray(e){return this.arrayMapping.getArray(e)}getRange(e,t){return this.rangeMapping.getRange(e,t)}topSortWithScc(){return this.graph.topSortWithScc()}markAsVolatile(e){this.graph.markNodeAsVolatile(e)}markAsDependentOnStructureChange(e){this.graph.markNodeAsChangingWithStructure(e)}forceApplyPostponedTransformations(){for(const e of this.graph.getNodes())e instanceof Ln&&e.ensureRecentData(this.lazilyTransformingAstService)}*rawValuesFromRange(e){for(const t of e.addresses(this)){const e=this.getScalarValue(t);e!==bt&&(yield[wt(e),t])}}computeListOfValuesInRange(e){const t=[];for(const n of e.addresses(this)){const e=this.getScalarValue(n);t.push(e)}return t}shrinkArrayToCorner(e){this.cleanAddressMappingUnderArray(e);for(const t of this.adjacentArrayVertices(e)){let n;n=t instanceof En?this.formulaDirectDependenciesToArray(t,e):this.rangeDirectDependenciesToArray(t,e);let r=!1;for(const[i,s]of n)e.isLeftCorner(i)&&(r=!0),this.graph.addEdge(s,t),this.graph.markNodeAsDirty(s);r||this.graph.removeEdge(e,t)}this.graph.markNodeAsDirty(e)}isArrayInternalCell(e){const t=this.getCell(e);return t instanceof Cn&&!t.isLeftCorner(e)}getAndClearContentChanges(){const e=this.changes;return this.changes=Yt.empty(),e}getAdjacentNodesAddresses(e){const t=this.graph.adjacentNodes(e),n=[];return t.forEach(e=>{const t=e;t instanceof Nn?n.push(wr(t.start,t.end)):n.push(t.getAddress(this.lazilyTransformingAstService))}),n}exchangeGraphNode(e,t){this.graph.addNodeAndReturnId(t);const n=this.graph.adjacentNodes(e);this.removeVertex(e),n.forEach(e=>{this.graph.hasNode(e)&&this.graph.addEdge(t,e)})}setArray(e,t){this.arrayMapping.setArray(e,t)}correctInfiniteRangesDependency(e){const t=this.graph.getInfiniteRanges().filter(({node:t})=>t.range.addressInRange(e));if(t.length<=0)return;const{vertex:n,id:r}=this.fetchCellOrCreateEmpty(e),i=null!==r&&void 0!==r?r:this.graph.getNodeId(n);t.forEach(({id:e})=>{this.graph.addEdge(i,e)})}exchangeOrAddGraphNode(e,t){e?this.exchangeGraphNode(e,t):this.graph.addNodeAndReturnId(t)}getArrayVerticesRelatedToRanges(e){const t=new Set;return e.forEach(e=>{this.graph.hasNode(e)&&this.graph.adjacentNodes(e).forEach(e=>{e instanceof Cn&&t.add(e)})}),t}correctInfiniteRangesDependenciesByRangeVertex(e){this.graph.getInfiniteRanges().forEach(({id:t,node:n})=>{const r=e.range.intersectionWith(n.range);void 0!==r&&r.addresses(this).forEach(e=>{const{vertex:n,id:r}=this.fetchCellOrCreateEmpty(e);this.graph.addEdge(null!==r&&void 0!==r?r:n,t)})})}cleanAddressMappingUnderArray(e){const t=e.getRange();for(const n of t.addresses(this)){const t=e.getArrayCellValue(n);this.getCell(n)===e?e.isLeftCorner(n)?this.changes.addChange(new lr(Wn.REF),n,t):(this.addressMapping.removeCell(n),this.changes.addChange(bt,n,t)):this.changes.addChange(bt,n,t)}}*formulaDirectDependenciesToArray(e,t){var n;const[,r]=null!==(n=this.formulaDependencyQuery(e))&&void 0!==n?n:[];if(void 0!==r)for(const i of r)if(!(i instanceof yt||i instanceof Tr)&&t.getRange().addressInRange(i)){const e=this.fetchCellOrCreateEmpty(i).vertex;yield[i,e]}}*rangeDirectDependenciesToArray(e,t){const{restRange:n}=this.rangeMapping.findSmallerRange(e.range);for(const r of n.addresses(this))if(t.getRange().addressInRange(r)){const e=this.fetchCellOrCreateEmpty(r).vertex;yield[r,e]}}*adjacentArrayVertices(e){const t=this.graph.adjacentNodes(e);for(const n of t)(n instanceof En||n instanceof Nn)&&(yield n)}addStructuralNodesToChangeSet(){this.graph.markChangingWithStructureNodesAsDirty()}fixRangesWhenAddingRows(e,t,n){const r=Array.from(this.rangeMapping.rangesInSheet(e));for(const i of r)if(i.range.includesRow(t+n))if(i.bruteForce){const e=i.range.rangeWithSameWidth(t,n);for(const t of e.addresses(this)){const{vertex:e,id:n}=this.fetchCellOrCreateEmpty(t);this.graph.addEdge(null!==n&&void 0!==n?n:e,i)}}else{let e=i,t=this.rangeMapping.findSmallerRange(e.range);if(void 0!==t.smallerRangeVertex)continue;while(void 0===t.smallerRangeVertex){const n=new Nn(Tr.spanFrom(e.range.start,e.range.width(),e.range.height()-1));this.rangeMapping.setRange(n),this.graph.addNodeAndReturnId(n);const r=new Tr(mr(e.range.start.sheet,e.range.start.col,e.range.end.row),e.range.end);this.addAllFromRange(r,e),this.graph.addEdge(n,e),e=n,t=this.rangeMapping.findSmallerRange(e.range)}this.graph.addEdge(t.smallerRangeVertex,e),this.addAllFromRange(t.restRange,e),this.graph.removeEdge(t.smallerRangeVertex,i)}}addAllFromRange(e,t){for(const n of e.addresses(this)){const{vertex:e,id:r}=this.fetchCellOrCreateEmpty(n);this.graph.addEdge(null!==r&&void 0!==r?r:e,t)}}fixRangesWhenAddingColumns(e,t,n){for(const r of this.rangeMapping.rangesInSheet(e))if(r.range.includesColumn(t+n)){let i;i=r.bruteForce?r.range.rangeWithSameHeight(t,n):Tr.spanFrom(mr(e,t,r.range.end.row),n,1);for(const e of i.addresses(this)){const{vertex:t,id:n}=this.fetchCellOrCreateEmpty(e);this.graph.addEdge(null!==n&&void 0!==n?n:t,r)}}}exchangeOrAddFormulaVertex(e){const t=e.getAddress(this.lazilyTransformingAstService),n=Tr.spanFrom(t,e.width,e.height),r=this.shrinkPossibleArrayAndGetCell(t);if(e instanceof Cn&&this.setArray(n,e),this.exchangeOrAddGraphNode(r,e),this.addressMapping.setCell(t,e),e instanceof Cn){if(!this.isThereSpaceForArray(e))return;for(const t of n.addresses(this)){if(e.isLeftCorner(t))continue;const n=this.getCell(t);this.exchangeOrAddGraphNode(n,e)}}for(const i of n.addresses(this))this.addressMapping.setCell(i,e)}setAddressMappingForArrayVertex(e,t){if(this.addressMapping.setCell(t,e),!(e instanceof Cn))return;const n=Tr.spanFromOrUndef(t,e.width,e.height);if(void 0!==n&&(this.setArray(n,e),this.isThereSpaceForArray(e)))for(const r of n.addresses(this))this.addressMapping.setCell(r,e)}truncateRanges(e,t){const{verticesToRemove:n,verticesToMerge:r,verticesWithChangedSize:i}=this.rangeMapping.truncateRanges(e,t);for(const[s,o]of r)this.mergeRangeVertices(s,o);for(const s of n)this.removeVertexAndCleanupDependencies(s);return i}fixArraysAfterAddingRow(e,t,n){if(this.arrayMapping.moveArrayVerticesAfterRowByRows(e,t,n),!(t<=0))for(const[,r]of this.arrayMapping.arraysInRows(Ht.fromRowStartAndEnd(e,t-1,t-1))){const i=r.getRange();for(let s=i.start.col;s<=i.end.col;++s)for(let o=t;o<=i.end.row;++o){const t=mr(e,s,o),i=mr(e,s,o+n),a=r.getArrayCellValue(t);this.addressMapping.moveCell(i,t),this.changes.addChange(bt,i,a)}}}fixArraysAfterRemovingRows(e,t,n){if(this.arrayMapping.moveArrayVerticesAfterRowByRows(e,t,-n),!(t<=0))for(const[,r]of this.arrayMapping.arraysInRows(Ht.fromRowStartAndEnd(e,t-1,t-1)))if(this.isThereSpaceForArray(r))for(const e of r.getRange().addresses(this))this.addressMapping.setCell(e,r);else this.setNoSpaceIfArray(r)}fixArraysAfterAddingColumn(e,t,n){if(this.arrayMapping.moveArrayVerticesAfterColumnByColumns(e,t,n),!(t<=0))for(const[,r]of this.arrayMapping.arraysInCols(kt.fromColumnStartAndEnd(e,t-1,t-1))){const i=r.getRange();for(let s=i.start.row;s<=i.end.row;++s)for(let o=t;o<=i.end.col;++o){const t=mr(e,o,s),i=mr(e,o+n,s),a=r.getArrayCellValue(t);this.addressMapping.moveCell(i,t),this.changes.addChange(bt,i,a)}}}fixArraysAfterRemovingColumns(e,t,n){if(this.arrayMapping.moveArrayVerticesAfterColumnByColumns(e,t,-n),!(t<=0))for(const[,r]of this.arrayMapping.arraysInCols(kt.fromColumnStartAndEnd(e,t-1,t-1)))if(this.isThereSpaceForArray(r))for(const e of r.getRange().addresses(this))this.addressMapping.setCell(e,r);else this.setNoSpaceIfArray(r)}shrinkPossibleArrayAndGetCell(e){const t=this.getCell(e);return t instanceof Cn?(this.setNoSpaceIfArray(t),this.getCell(e)):t}setNoSpaceIfArray(e){e instanceof Cn&&(this.shrinkArrayToCorner(e),e.setNoSpace())}removeVertex(e){this.removeVertexAndCleanupDependencies(e),e instanceof Nn&&this.rangeMapping.removeRange(e)}mergeRangeVertices(e,t){const n=this.graph.adjacentNodes(t);this.removeVertexAndCleanupDependencies(t),this.graph.removeEdgeIfExists(e,t),n.forEach(t=>{this.graph.hasNode(t)&&this.graph.addEdge(e,t)})}removeVertexAndCleanupDependencies(e){const t=new Set(this.graph.removeNode(e));while(t.size>0){const e=t.values().next().value;t.delete(e);const[n,r]=e;this.graph.hasNode(r)&&0===this.graph.adjacentNodesCount(r)&&((r instanceof Nn||r instanceof Gn)&&this.graph.removeNode(r).forEach(e=>t.add(e)),r instanceof Nn?this.rangeMapping.removeRange(r):r instanceof Gn&&this.addressMapping.removeCell(n))}}}
  478. /**
  479. * @license
  480. * Copyright (c) 2024 Handsoncode. All rights reserved.
  481. */class Gn{constructor(){}getCellValue(){return bt}}
  482. /**
  483. * @license
  484. * Copyright (c) 2024 Handsoncode. All rights reserved.
  485. */class Bn{constructor(e,t){this.parsedValue=e,this.rawValue=t}getValues(){return{parsedValue:this.parsedValue,rawValue:this.rawValue}}setValues(e){this.parsedValue=e.parsedValue,this.rawValue=e.rawValue}getCellValue(){return this.parsedValue}setCellValue(e){throw Error("SetCellValue is deprecated for ValueCellVertex")}}
  486. /**
  487. * @license
  488. * Copyright (c) 2024 Handsoncode. All rights reserved.
  489. */class Jn{constructor(e,t){this.errors=e,this.rawInput=t}getCellValue(){const e=this.errors.map(e=>e.message).find(e=>e);return lr.parsingError(e)}getFormula(){return this.rawInput}}
  490. /**
  491. * @license
  492. * Copyright (c) 2024 Handsoncode. All rights reserved.
  493. */class zn{constructor(e,t){this.width=e,this.height=t,this.mapping=new Map}getCell(e){var t;return null===(t=this.mapping.get(e.col))||void 0===t?void 0:t.get(e.row)}setCell(e,t){this.width=Math.max(this.width,e.col+1),this.height=Math.max(this.height,e.row+1);let n=this.mapping.get(e.col);n||(n=new Map,this.mapping.set(e.col,n)),n.set(e.row,t)}has(e){var t;return!!(null===(t=this.mapping.get(e.col))||void 0===t?void 0:t.get(e.row))}getHeight(){return this.height}getWidth(){return this.width}removeCell(e){var t;null===(t=this.mapping.get(e.col))||void 0===t||t.delete(e.row)}addRows(e,t){this.mapping.forEach(n=>{const r=new Map;n.forEach((i,s)=>{s>=e&&(r.set(s+t,i),n.delete(s))}),r.forEach((e,t)=>{n.set(t,e)})}),this.height+=t}addColumns(e,t){const n=new Map;this.mapping.forEach((r,i)=>{i>=e&&(n.set(i+t,r),this.mapping.delete(i))}),n.forEach((e,t)=>{this.mapping.set(t,e)}),this.width+=t}removeRows(e){this.mapping.forEach(t=>{const n=new Map;t.forEach((r,i)=>{i>=e.rowStart&&(t.delete(i),i>e.rowEnd&&n.set(i-e.numberOfRows,r))}),n.forEach((e,n)=>{t.set(n,e)})});const t=Math.min(this.height-1,e.rowEnd),n=Math.max(0,t-e.rowStart+1);this.height=Math.max(0,this.height-n)}removeColumns(e){const t=new Map;this.mapping.forEach((n,r)=>{r>=e.columnStart&&(this.mapping.delete(r),r>e.columnEnd&&t.set(r-e.numberOfColumns,n))}),t.forEach((e,t)=>{this.mapping.set(t,e)});const n=Math.min(this.width-1,e.columnEnd),r=Math.max(0,n-e.columnStart+1);this.width=Math.max(0,this.width-r)}*getEntries(e){for(const[t,n]of this.mapping)for(const[r,i]of n)yield[mr(e,t,r),i]}*verticesFromColumn(e){const t=this.mapping.get(e);if(void 0!==t)for(const[n,r]of t)yield r}*verticesFromRow(e){for(const t of this.mapping.values()){const n=t.get(e);void 0!==n&&(yield n)}}*verticesFromColumnsSpan(e){for(const t of e.columns()){const e=this.mapping.get(t);if(void 0!==e)for(const[t,n]of e)yield n}}*verticesFromRowsSpan(e){for(const t of this.mapping.values())for(const n of e.rows()){const e=t.get(n);void 0!==e&&(yield e)}}*entriesFromRowsSpan(e){for(const[t,n]of this.mapping.entries())for(const r of e.rows()){const i=n.get(r);void 0!==i&&(yield[mr(e.sheet,t,r),i])}}*entriesFromColumnsSpan(e){for(const t of e.columns()){const n=this.mapping.get(t);if(void 0!==n)for(const[r,i]of n.entries())yield[mr(e.sheet,t,r),i]}}*vertices(){for(const[e,t]of this.mapping)for(const[n,r]of t)void 0!==r&&(yield r)}}
  494. /**
  495. * @license
  496. * Copyright (c) 2024 Handsoncode. All rights reserved.
  497. */class $n{constructor(e,t){this.width=e,this.height=t,this.mapping=new Array(t);for(let n=0;n<t;n++)this.mapping[n]=new Array(e)}getCell(e){return this.getCellVertex(e.col,e.row)}setCell(e,t){this.width=Math.max(this.width,e.col+1),this.height=Math.max(this.height,e.row+1);const n=this.mapping[e.row];n||(this.mapping[e.row]=new Array(this.width)),this.mapping[e.row][e.col]=t}has(e){const t=this.mapping[e.row];return!!t&&!!t[e.col]}getHeight(){return this.height}getWidth(){return this.width}removeCell(e){void 0!==this.mapping[e.row]&&delete this.mapping[e.row][e.col]}addRows(e,t){const n=[];for(let r=0;r<t;r++)n.push(new Array(this.width));this.mapping.splice(e,0,...n),this.height+=t}addColumns(e,t){for(let n=0;n<this.height;n++)void 0!==this.mapping[n]&&this.mapping[n].splice(e,0,...new Array(t));this.width+=t}removeRows(e){this.mapping.splice(e.rowStart,e.numberOfRows);const t=Math.min(this.height-1,e.rowEnd),n=Math.max(0,t-e.rowStart+1);this.height=Math.max(0,this.height-n)}removeColumns(e){for(let r=0;r<this.height;r++)void 0!==this.mapping[r]&&this.mapping[r].splice(e.columnStart,e.numberOfColumns);const t=Math.min(this.width-1,e.columnEnd),n=Math.max(0,t-e.columnStart+1);this.width=Math.max(0,this.width-n)}*getEntries(e){for(let t=0;t<this.height;++t)for(let n=0;n<this.width;++n){const r=this.getCellVertex(n,t);r&&(yield[mr(e,n,t),r])}}*verticesFromColumn(e){for(let t=0;t<this.height;++t){const n=this.getCellVertex(e,t);n&&(yield n)}}*verticesFromRow(e){for(let t=0;t<this.width;++t){const n=this.getCellVertex(t,e);n&&(yield n)}}*verticesFromColumnsSpan(e){for(let t=e.columnStart;t<=e.columnEnd;++t)for(let e=0;e<this.height;++e){const n=this.getCellVertex(t,e);n&&(yield n)}}*verticesFromRowsSpan(e){for(let t=0;t<this.width;++t)for(let n=e.rowStart;n<=e.rowEnd;++n){const e=this.getCellVertex(t,n);e&&(yield e)}}*entriesFromRowsSpan(e){for(let t=0;t<this.width;++t)for(let n=e.rowStart;n<=e.rowEnd;++n){const r=this.getCellVertex(t,n);r&&(yield[mr(e.sheet,t,n),r])}}*entriesFromColumnsSpan(e){for(let t=e.columnStart;t<=e.columnEnd;++t)for(let n=0;n<this.height;++n){const r=this.getCellVertex(t,n);r&&(yield[mr(e.sheet,t,n),r])}}*vertices(){for(let e=0;e<this.height;++e)for(let t=0;t<this.width;++t){const n=this.getCellVertex(t,e);n&&(yield n)}}getCellVertex(e,t){var n;return null===(n=this.mapping[t])||void 0===n?void 0:n[e]}}
  498. /**
  499. * @license
  500. * Copyright (c) 2024 Handsoncode. All rights reserved.
  501. */
  502. /**
  503. * @license
  504. * Copyright (c) 2024 Handsoncode. All rights reserved.
  505. */(function(e){e["DIV_BY_ZERO"]="DIV_BY_ZERO",e["NAME"]="NAME",e["VALUE"]="VALUE",e["NUM"]="NUM",e["NA"]="NA",e["CYCLE"]="CYCLE",e["REF"]="REF",e["SPILL"]="SPILL",e["LIC"]="LIC",e["ERROR"]="ERROR"})(Wn||(Wn={})),function(e){e["FORMULA"]="FORMULA",e["VALUE"]="VALUE",e["ARRAY"]="ARRAY",e["EMPTY"]="EMPTY",e["ARRAYFORMULA"]="ARRAYFORMULA"}(Xn||(Xn={}));const qn=(e,t)=>e instanceof Cn?e.isLeftCorner(t)?Xn.ARRAYFORMULA:Xn.ARRAY:e instanceof Ln||e instanceof Jn?Xn.FORMULA:e instanceof Bn?Xn.VALUE:Xn.EMPTY;var er,tr;(function(e){e["EMPTY"]="EMPTY",e["NUMBER"]="NUMBER",e["STRING"]="STRING",e["BOOLEAN"]="BOOLEAN",e["ERROR"]="ERROR"})(er||(er={})),function(e){e["NUMBER"]="NUMBER"}(tr||(tr={}));const nr=Object.assign(Object.assign({},er),tr),rr=Object.assign(Object.assign({},er),It),ir=e=>{switch(e){case nr.EMPTY:return 0;case nr.NUMBER:return 1;case nr.STRING:return 2;case nr.BOOLEAN:return 3;case nr.ERROR:return 4}throw new Error("Cell value not computed")},sr=e=>{if(e===bt)return nr.EMPTY;if(e instanceof lr||e instanceof Ft)return nr.ERROR;if("string"===typeof e)return nr.STRING;if(_t(e))return nr.NUMBER;if("boolean"===typeof e)return nr.BOOLEAN;throw new Error("Cell value not computed")},or=e=>_t(e)?xt(e):sr(e),ar=e=>_t(e)?Dt(e):void 0;class lr{constructor(e,t,n){this.type=e,this.message=t,this.root=n}static parsingError(e){return new lr(Wn.ERROR,`${Ce.ParseError}${e?" "+e:""}`)}attachRootVertex(e){return void 0===this.root?new lr(this.type,this.message,e):this}}const cr=(e,t)=>({sheet:e,row:t}),ur=e=>e.row<0,hr=(e,t)=>({sheet:e,col:t}),dr=e=>e.col<0,mr=(e,t,n)=>({sheet:e,col:t,row:n}),gr=e=>e.col<0||e.row<0,pr=(e,t,n,r)=>mr(t,e.col+n,e.row+r),fr=e=>`${e.sheet},${e.row},${e.col}`;function Rr(e){var t,n,r;return e&&("object"===typeof e||"function"===typeof e)&&"number"===typeof(null===(t=e)||void 0===t?void 0:t.sheet)&&"number"===typeof(null===(n=e)||void 0===n?void 0:n.col)&&"number"===typeof(null===(r=e)||void 0===r?void 0:r.row)}const yr=(e,t)=>{var n;return null!==(n=e.sheet)&&void 0!==n?n:t.sheet},Mr=(e,t)=>e.sheet===t.sheet&&e.col===t.col&&e.row===t.row,Sr="AbsoluteCellRange: Wrong range size";function br(e){return!(!e||"object"!==typeof e&&"function"!==typeof e)&&("start"in e&&Rr(e.start)&&"end"in e&&Rr(e.end))}const wr=(e,t)=>({start:e,end:t});class Tr{constructor(e,t){if(e.sheet!==t.sheet)throw new Bt(e.sheet,t.sheet);this.start=mr(e.sheet,e.col,e.row),this.end=mr(t.sheet,t.col,t.row)}get sheet(){return this.start.sheet}static fromSimpleCellAddresses(e,t){if(e.sheet!==t.sheet)throw new Bt(e.sheet,t.sheet);const n=t.col-e.col,r=t.row-e.row;return Number.isFinite(r)&&Number.isFinite(n)?new Tr(e,t):Number.isFinite(r)?new vr(e.sheet,e.row,t.row):new Or(e.sheet,e.col,t.col)}static fromAst(e,t){return e.type===j.CELL_RANGE?Tr.fromCellRange(e,t):e.type===j.COLUMN_RANGE?Or.fromColumnRange(e,t):vr.fromRowRangeAst(e,t)}static fromAstOrUndef(e,t){try{return Tr.fromAst(e,t)}catch(n){return}}static fromCellRange(e,t){return new Tr(e.start.toSimpleCellAddress(t),e.end.toSimpleCellAddress(t))}static spanFrom(e,t,n){const r=Tr.spanFromOrUndef(e,t,n);if(void 0===r)throw new Error(Sr);return r}static spanFromOrUndef(e,t,n){if(!Number.isFinite(t)&&Number.isFinite(n)){if(0!==e.col)return;return new vr(e.sheet,e.row,e.row+n-1)}if(!Number.isFinite(n)&&Number.isFinite(t)){if(0!==e.row)return;return new Or(e.sheet,e.col,e.col+t-1)}if(Number.isFinite(n)&&Number.isFinite(t))return new Tr(e,mr(e.sheet,e.col+t-1,e.row+n-1))}static fromCoordinates(e,t,n,r,i){return new Tr(mr(e,t,n),mr(e,r,i))}isFinite(){return Number.isFinite(this.size())}doesOverlap(e){return this.start.sheet==e.start.sheet&&(!(this.end.row<e.start.row||this.start.row>e.end.row)&&!(this.end.col<e.start.col||this.start.col>e.end.col))}addressInRange(e){return this.sheet===e.sheet&&(this.start.row<=e.row&&this.end.row>=e.row&&this.start.col<=e.col&&this.end.col>=e.col)}columnInRange(e){return this.sheet===e.sheet&&(this.start.col<=e.col&&this.end.col>=e.col)}rowInRange(e){return this.sheet===e.sheet&&(this.start.row<=e.row&&this.end.row>=e.row)}containsRange(e){return this.addressInRange(e.start)&&this.addressInRange(e.end)}intersectionWith(e){if(this.sheet!==e.start.sheet)return;const t=Math.max(this.start.row,e.start.row),n=Math.min(this.end.row,e.end.row),r=Math.max(this.start.col,e.start.col),i=Math.min(this.end.col,e.end.col);return t>n||r>i?void 0:new Tr(mr(this.sheet,r,t),mr(this.sheet,i,n))}includesRow(e){return this.start.row<e&&this.end.row>=e}includesColumn(e){return this.start.col<e&&this.end.col>=e}shiftByRows(e){this.start.row+=e,this.end.row+=e}expandByRows(e){this.end.row+=e}shiftByColumns(e){this.start.col+=e,this.end.col+=e}shifted(e,t){return Tr.spanFrom(mr(this.sheet,this.start.col+e,this.start.row+t),this.width(),this.height())}expandByColumns(e){this.end.col+=e}moveToSheet(e){this.start.sheet=e,this.end.sheet=e}removeSpan(e){e instanceof Ht?this.removeRows(e.start,e.end):this.removeColumns(e.start,e.end)}shouldBeRemoved(){return this.width()<=0||this.height()<=0}rangeWithSameWidth(e,t){return Tr.spanFrom(mr(this.sheet,this.start.col,e),this.width(),t)}rangeWithSameHeight(e,t){return Tr.spanFrom(mr(this.sheet,e,this.start.row),t,this.height())}toString(){return`${this.start.sheet},${this.start.col},${this.start.row},${this.end.col},${this.end.row}`}width(){return this.end.col-this.start.col+1}height(){return this.end.row-this.start.row+1}size(){return this.height()*this.width()}arrayOfAddressesInRange(){const e=[];for(let t=0;t<this.height();++t){e[t]=[];for(let n=0;n<this.width();++n){const r=mr(this.sheet,this.start.col+n,this.start.row+t);e[t].push(r)}}return e}withStart(e){return new Tr(e,this.end)}sameDimensionsAs(e){return this.width()===e.width()&&this.height()===e.height()}sameAs(e){return Mr(this.start,e.start)&&Mr(this.end,e.end)}addressesArrayMap(e,t){const n=[];let r=this.start.row;while(r<=this.effectiveEndRow(e)){let i=this.start.col;const s=[];while(i<=this.effectiveEndColumn(e))s.push(t(mr(this.start.sheet,i,r))),i++;n.push(s),r++}return n}addresses(e){const t=[];let n=this.start.row;const r=this.effectiveEndRow(e),i=this.effectiveEndColumn(e);while(n<=r){let e=this.start.col;while(e<=i)t.push(mr(this.start.sheet,e,n)),e++;n++}return t}*addressesWithDirection(e,t,n){if(e>0)if(t>0){let e=this.effectiveEndRow(n);while(e>=this.start.row){let t=this.effectiveEndColumn(n);while(t>=this.start.col)yield mr(this.start.sheet,t,e),t-=1;e-=1}}else{let e=this.start.row;while(e<=this.effectiveEndRow(n)){let t=this.effectiveEndColumn(n);while(t>=this.start.col)yield mr(this.start.sheet,t,e),t-=1;e+=1}}else if(t>0){let e=this.effectiveEndRow(n);while(e>=this.start.row){let t=this.start.col;while(t<=this.effectiveEndColumn(n))yield mr(this.start.sheet,t,e),t+=1;e-=1}}else{let e=this.start.row;while(e<=this.effectiveEndRow(n)){let t=this.start.col;while(t<=this.effectiveEndColumn(n))yield mr(this.start.sheet,t,e),t+=1;e+=1}}}getAddress(e,t){if(e<0||t<0||t>this.height()-1||e>this.width()-1)throw Error("Index out of bound");return mr(this.start.sheet,this.start.col+e,this.start.row+t)}exceedsSheetSizeLimits(e,t){return this.end.col>=e||this.end.row>=t}effectiveEndColumn(e){return this.end.col}effectiveEndRow(e){return this.end.row}effectiveWidth(e){return this.width()}effectiveHeight(e){return this.height()}removeRows(e,t){if(!(e>this.end.row)){if(t<this.start.row){const n=t-e+1;return this.shiftByRows(-n)}e<=this.start.row&&(this.start.row=e),this.end.row-=Math.min(t,this.end.row)-e+1}}removeColumns(e,t){if(!(e>this.end.col)){if(t<this.start.col){const n=t-e+1;return this.shiftByColumns(-n)}e<=this.start.col&&(this.start.col=e),this.end.col-=Math.min(t,this.end.col)-e+1}}}class Or extends Tr{constructor(e,t,n){super(mr(e,t,0),mr(e,n,Number.POSITIVE_INFINITY))}static fromColumnRange(e,t){const n=e.start.toSimpleColumnAddress(t),r=e.end.toSimpleColumnAddress(t);if(n.sheet!==r.sheet)throw new Bt(n.sheet,r.sheet);return new Or(n.sheet,n.col,r.col)}shouldBeRemoved(){return this.width()<=0}shiftByRows(e){}expandByRows(e){}shifted(e,t){return new Or(this.sheet,this.start.col+e,this.end.col+e)}rangeWithSameHeight(e,t){return new Or(this.sheet,e,e+t-1)}exceedsSheetSizeLimits(e,t){return this.end.col>=e}effectiveEndRow(e){return this.effectiveHeight(e)-1}effectiveHeight(e){return e.getSheetHeight(this.sheet)}removeRows(e,t){}}class vr extends Tr{constructor(e,t,n){super(mr(e,0,t),mr(e,Number.POSITIVE_INFINITY,n))}static fromRowRangeAst(e,t){const n=e.start.toSimpleRowAddress(t),r=e.end.toSimpleRowAddress(t);if(n.sheet!==r.sheet)throw new Bt(n.sheet,r.sheet);return new vr(n.sheet,n.row,r.row)}shouldBeRemoved(){return this.height()<=0}shiftByColumns(e){}expandByColumns(e){}shifted(e,t){return new vr(this.sheet,this.start.row+t,this.end.row+t)}rangeWithSameWidth(e,t){return new vr(this.sheet,e,e+t-1)}exceedsSheetSizeLimits(e,t){return this.end.row>=t}effectiveEndColumn(e){return this.effectiveWidth(e)-1}effectiveWidth(e){return e.getSheetWidth(this.sheet)}removeColumns(e,t){}}
  506. /**
  507. * @license
  508. * Copyright (c) 2024 Handsoncode. All rights reserved.
  509. */class Er{constructor(e,t,n){this.formulaAddress=e,this.arraysFlag=t,this.formulaVertex=n}}
  510. /**
  511. * @license
  512. * Copyright (c) 2024 Handsoncode. All rights reserved.
  513. */function Cr(e){const t=e.caseSensitive?e.accentSensitive?"variant":"case":e.accentSensitive?"accent":"base",n=e.caseFirst,r=e.ignorePunctuation;return new Intl.Collator(e.localeLang,{sensitivity:t,caseFirst:n,ignorePunctuation:r})}
  514. /**
  515. * @license
  516. * Copyright (c) 2024 Handsoncode. All rights reserved.
  517. */const Lr="i",Nr=/^\s*([+-]?)\s*(([\d\.,]+(e[+-]?\d+)?)\s*([ij]?)|([ij]))\s*(([+-])\s*([+-]?)\s*(([\d\.,]+(e[+-]?\d+)?)\s*([ij]?)|([ij])))?$/;class _r{constructor(e,t,n){this.config=e,this.dateTimeHelper=t,this.numberLiteralsHelper=n,this.lt=(e,t)=>this.compare(e,t)<0,this.leq=(e,t)=>this.compare(e,t)<=0,this.gt=(e,t)=>this.compare(e,t)>0,this.geq=(e,t)=>this.compare(e,t)>=0,this.eq=(e,t)=>0===this.compare(e,t),this.neq=(e,t)=>0!==this.compare(e,t),this.pow=(e,t)=>Math.pow(wt(e),wt(t)),this.addWithEpsilonRaw=(e,t)=>{const n=e+t;return Math.abs(n)<this.actualEps*Math.abs(e)?0:n},this.addWithEpsilon=(e,t)=>{const n=Kr(e,t);return this.ExtendedNumberFactory(this.addWithEpsilonRaw(wt(e),wt(t)),n)},this.unaryMinus=e=>Ot(e,-wt(e)),this.unaryPlus=e=>e,this.unaryPercent=e=>new Nt(wt(e)/100),this.concat=(e,t)=>e.concat(t),this.nonstrictadd=(e,t)=>e instanceof lr?e:t instanceof lr?t:"number"===typeof e?"number"===typeof t?this.addWithEpsilonRaw(e,t):e:"number"===typeof t?t:0,this.subtract=(e,t)=>{const n=Kr(e,t),r=wt(e),i=wt(t);let s=r-i;return Math.abs(s)<this.actualEps*Math.abs(r)&&(s=0),this.ExtendedNumberFactory(s,n)},this.divide=(e,t)=>{const n=wt(e),r=wt(t);if(0===r)return new lr(Wn.DIV_BY_ZERO);{const i=Gr(e,t);return this.ExtendedNumberFactory(n/r,i)}},this.multiply=(e,t)=>{const n=Gr(e,t);return this.ExtendedNumberFactory(wt(e)*wt(t),n)},this.manyToExactComplex=e=>{const t=[];for(const n of e){if(n instanceof lr)return n;if(_t(n)||"string"===typeof n){const e=this.coerceScalarToComplex(n);e instanceof lr||t.push(e)}}return t},this.coerceNumbersExactRanges=e=>this.manyToNumbers(e,this.manyToExactNumbers),this.coerceNumbersCoerceRangesDropNulls=e=>this.manyToNumbers(e,this.manyToCoercedNumbersDropNulls),this.manyToExactNumbers=e=>{const t=[];for(const n of e){if(n instanceof lr)return n;_t(n)&&t.push(wt(n))}return t},this.manyToOnlyNumbersDropNulls=e=>{const t=[];for(const n of e){if(n instanceof lr)return n;if(_t(n))t.push(wt(n));else if(n!==bt)return new lr(Wn.VALUE,Ce.NumberExpected)}return t},this.manyToCoercedNumbersDropNulls=e=>{const t=[];for(const n of e){if(n instanceof lr)return n;if(n===bt)continue;const e=this.coerceScalarToNumberOrError(n);_t(e)&&t.push(wt(e))}return t},this.collator=Cr(e),this.actualEps=e.smartRounding?e.precisionEpsilon:0}eqMatcherFunction(e){const t=this.buildRegex(e);return e=>"string"===typeof e&&t.test(this.normalizeString(e))}neqMatcherFunction(e){const t=this.buildRegex(e);return e=>!("string"===typeof e)||!t.test(this.normalizeString(e))}searchString(e,t){var n;const r=this.buildRegex(e,!1),i=r.exec(t);return null!==(n=null===i||void 0===i?void 0:i.index)&&void 0!==n?n:-1}requiresRegex(e){if(!this.config.useRegularExpressions&&!this.config.useWildcards)return!this.config.matchWholeCell;for(let t=0;t<e.length;t++){const n=e.charAt(t);if(Ur(n)||this.config.useRegularExpressions&&Xr(n))return!0}return!1}floatCmp(e,t){const n=wt(e),r=wt(t),i=1+this.actualEps;return r>=0&&n*i>=r&&n<=r*i||r<=0&&n*i<=r&&n>=r*i?0:n>r?1:-1}coerceScalarToNumberOrError(e){var t;return e instanceof lr?e:null!==(t=this.coerceToMaybeNumber(e))&&void 0!==t?t:new lr(Wn.VALUE,Ce.NumberCoercion)}coerceToMaybeNumber(e){var t;return null!==(t=this.coerceNonDateScalarToMaybeNumber(e))&&void 0!==t?t:"string"===typeof e?this.dateTimeHelper.dateStringToDateNumber(e):void 0}coerceNonDateScalarToMaybeNumber(e){if(e===bt)return 0;if("string"===typeof e){if(""===e)return 0;const t=this.coerceStringToMaybePercentNumber(e);if(void 0!==t)return t;const n=this.coerceStringToMaybeCurrencyNumber(e);return void 0!==n?n:this.numberLiteralsHelper.numericStringToMaybeNumber(e.trim())}return _t(e)?e:"boolean"===typeof e?Number(e):void 0}coerceStringToMaybePercentNumber(e){const t=e.trim();if(t.endsWith("%")){const e=t.slice(0,t.length-1).trim(),n=this.numberLiteralsHelper.numericStringToMaybeNumber(e);if(void 0!==n)return new Nt(n/100)}}coerceStringToMaybeCurrencyNumber(e){const t=this.currencyMatcher(e.trim());if(void 0!==t){const[e,n]=t,r=this.numberLiteralsHelper.numericStringToMaybeNumber(n);if(void 0!==r)return new Et(r,e)}}currencyMatcher(e){for(const t of this.config.currencySymbol){if(e.startsWith(t))return[t,e.slice(t.length).trim()];if(e.endsWith(t))return[t,e.slice(0,e.length-t.length).trim()]}}coerceComplexExactRanges(e){const t=[];for(const r of e)if(r instanceof Ft)t.push(r);else if(r!==bt){const e=this.coerceScalarToComplex(r);if(e instanceof lr)return e;t.push(e)}const n=[];for(const r of t)if(r instanceof Ft){const e=this.manyToExactComplex(r.valuesFromTopLeftCorner());if(e instanceof lr)return e;n.push(...e)}else n.push(r);return n}coerceScalarToComplex(e){return e instanceof lr?e:e===bt?[0,0]:_t(e)?[wt(e),0]:"string"===typeof e?this.coerceStringToComplex(e):new lr(Wn.NUM,Ce.ComplexNumberExpected)}ExtendedNumberFactory(e,t){const{type:n,format:r}=t;switch(n){case It.NUMBER_RAW:return e;case It.NUMBER_CURRENCY:return new Et(e,null!==r&&void 0!==r?r:this.config.currencySymbol[0]);case It.NUMBER_DATE:return new vt(e,r);case It.NUMBER_DATETIME:return new Lt(e,r);case It.NUMBER_TIME:return new Ct(e,r);case It.NUMBER_PERCENT:return new Nt(e,r)}}buildRegex(e,t=!0){let n;e=this.normalizeString(e);let r=this.config.useWildcards,i=this.config.useRegularExpressions;if(i)try{RegExp(e)}catch(s){i=!1,r=!1}return n=i?Qr(e,this.config.caseSensitive):r?jr(e,this.config.caseSensitive):Zr(e,this.config.caseSensitive),this.config.matchWholeCell&&t?RegExp("^("+n+")$"):RegExp(n)}normalizeString(e){return this.config.caseSensitive||(e=e.toLowerCase()),this.config.accentSensitive||(e=zr(e,"nfd").replace(/[\u0300-\u036f]/g,"")),e}compare(e,t){if("string"===typeof e||"string"===typeof t){const n="string"===typeof e?this.dateTimeHelper.dateStringToDateNumber(e):e,r="string"===typeof t?this.dateTimeHelper.dateStringToDateNumber(t):t;if(_t(n)&&_t(r))return this.floatCmp(n,r)}return e===bt?e=Dr(t):t===bt&&(t=Dr(e)),"string"===typeof e&&"string"===typeof t?this.stringCmp(e,t):"boolean"===typeof e&&"boolean"===typeof t?Hr(xr(e),xr(t)):_t(e)&&_t(t)?this.floatCmp(e,t):e===bt&&t===bt?0:Hr(ir(sr(e)),ir(sr(t)))}stringCmp(e,t){return this.collator.compare(e,t)}manyToNumbers(e,t){const n=[];for(const i of e)if(i instanceof Ft)n.push(i);else{const e=wt(this.coerceScalarToNumberOrError(i));if(e instanceof lr)return e;n.push(e)}const r=[];for(const i of n)if(i instanceof Ft){const e=t(i.valuesFromTopLeftCorner());if(e instanceof lr)return e;r.push(...e)}else r.push(i);return r}coerceStringToComplex(e){const t=Nr.exec(e);if(null===t)return new lr(Wn.NUM,Ce.ComplexNumberExpected);let n,r;return n=void 0!==t[6]?"-"===t[1]?[0,-1]:[0,1]:this.parseComplexToken(t[1]+t[3],t[5]),n instanceof lr||void 0===t[8]?n:(r=void 0!==t[14]?"-"===t[9]?[0,-1]:[0,1]:this.parseComplexToken(t[9]+t[11],t[13]),r instanceof lr?r:""!==t[5]||""===t[13]?new lr(Wn.NUM,Ce.ComplexNumberExpected):"+"===t[8]?[n[0]+r[0],n[1]+r[1]]:[n[0]-r[0],n[1]-r[1]])}parseComplexToken(e,t){const n=wt(this.coerceNonDateScalarToMaybeNumber(e));return void 0===n?new lr(Wn.NUM,Ce.ComplexNumberExpected):""===t?[n,0]:[0,n]}}function Ir([e,t],n){if(!isFinite(e)||!isFinite(t))return new lr(Wn.NUM,Ce.NaN);if(n=null!==n&&void 0!==n?n:Lr,0===t)return""+e;const r=`${-1===t||1===t?"":Math.abs(t)}${n}`;return 0===e?`${t<0?"-":""}${r}`:`${e}${t<0?"-":"+"}${r}`}function Pr(e){return e instanceof Ft?e:Ft.fromScalar(e)}function xr(e){return Number(e)}function Dr(e){return"string"===typeof e?"":_t(e)?0:"boolean"!==typeof e&&bt}function Ar(e){if(e instanceof lr||"boolean"===typeof e)return e;if(e===bt)return!1;if(_t(e))return 0!==wt(e);{const t=e.toUpperCase();return"TRUE"===t||"FALSE"!==t&&(""!==t&&void 0)}}function Fr(e){return e instanceof lr||"string"===typeof e?e:e===bt?"":_t(e)?wt(e).toString():e?"TRUE":"FALSE"}function Yr(e){return e===bt?0:e}function Hr(e,t){const n=wt(e),r=wt(t);return n>r?1:n<r?-1:0}function kr(e){return isNaN(e)||e===1/0||e===-1/0}function Vr(e){return 0===e?0:e}function Ur(e){return["*","?"].includes(e)}const Wr=["{","}","[","]","(",")","<",">","=",".","+","-",",","\\","$","^","!"];function Xr(e){return Wr.includes(e)}function jr(e,t){let n="";for(let r=0;r<e.length;r++){const i=e.charAt(r);if("~"===i){if(r==e.length-1){n+="~";continue}const t=e.charAt(r+1);Ur(t)||Xr(t)?(n+="\\"+t,r++):(n+=t,r++)}else Ur(i)?n+="."+i:Xr(i)?n+="\\"+i:n+=t?i:i.toLowerCase()}return n}function Zr(e,t){let n="";for(let r=0;r<e.length;r++){const i=e.charAt(r);Ur(i)||Xr(i)?n+="\\"+i:n+=t?i:i.toLowerCase()}return n}function Qr(e,t){let n="";for(let r=0;r<e.length;r++){const i=e.charAt(r);Ur(i)||Xr(i)?n+=i:n+=t?i:i.toLowerCase()}return n}function Kr(e,t){const{type:n,format:r}=At(e),{type:i,format:s}=At(t);if(n===It.NUMBER_RAW)return{type:i,format:s};if(i===It.NUMBER_RAW)return{type:n,format:r};if((n===It.NUMBER_DATETIME||n===It.NUMBER_DATE)&&(i===It.NUMBER_DATETIME||i===It.NUMBER_DATE))return{type:It.NUMBER_RAW};if(n===It.NUMBER_TIME){if(i===It.NUMBER_DATE)return{type:It.NUMBER_DATETIME,format:`${s} ${r}`};if(i===It.NUMBER_DATETIME)return{type:It.NUMBER_DATETIME,format:s}}if(i===It.NUMBER_TIME){if(n===It.NUMBER_DATE)return{type:It.NUMBER_DATETIME,format:`${r} ${s}`};if(n===It.NUMBER_DATETIME)return{type:It.NUMBER_DATETIME,format:r}}return{type:n,format:r}}function Gr(e,t){let{type:n,format:r}=At(e),{type:i,format:s}=At(t);return n===It.NUMBER_PERCENT&&(n=It.NUMBER_RAW,r=void 0),i===It.NUMBER_PERCENT&&(i=It.NUMBER_RAW,s=void 0),n===It.NUMBER_RAW?{type:i,format:s}:i===It.NUMBER_RAW?{type:n,format:r}:{type:It.NUMBER_RAW}}function Br(e){return zr(e.toLowerCase(),"nfd").replace(/[\u0300-\u036f]/g,"")}function Jr(e,t){var n;if(e.isAdHoc())return null===(n=e.data[0])||void 0===n?void 0:n[0];const r=e.range;if(t.formulaAddress.sheet===r.sheet)if(1===r.width()){const n=t.formulaAddress.row-r.start.row;if(n>=0&&n<r.height())return e.data[n][0]}else if(1===r.height()){const n=t.formulaAddress.col-r.start.col;if(n>=0&&n<r.width())return e.data[0][n]}}function zr(e,t){return e.normalize(t.toUpperCase())}
  518. /**
  519. * @license
  520. * Copyright (c) 2024 Handsoncode. All rights reserved.
  521. */var $r;(function(e){e["STRING"]="STRING",e["NUMBER"]="NUMBER",e["BOOLEAN"]="BOOLEAN",e["SCALAR"]="SCALAR",e["NOERROR"]="NOERROR",e["RANGE"]="RANGE",e["INTEGER"]="INTEGER",e["COMPLEX"]="COMPLEX",e["ANY"]="ANY"})($r||($r={}));class qr{constructor(e){this.coerceScalarToNumberOrError=e=>this.arithmeticHelper.coerceScalarToNumberOrError(e),this.runFunction=(e,t,n,r)=>{const i=this.evaluateArguments(e,t,n),s=i.map(([e,t])=>e),o=i.map(([e,t])=>t),a=this.buildMetadataForEachArgumentValue(s.length,n),l=t.arraysFlag&&!n.vectorizationForbidden;if(!this.isNumberOfArgumentValuesValid(a,s.length))return new lr(Wn.NA,Ce.WrongArgNumber);const[c,u]=l?this.calculateSizeOfVectorizedResultArray(s,a):[1,1];if(1===c&&1===u){const e=this.vectorizeAndBroadcastArgumentsIfNecessary(l,s,a,0,0);return this.calculateSingleCellOfResultArray(t,e,a,o,r,n.returnNumberType)}const h=[...Array(c).keys()].map(e=>[...Array(u).keys()].map(i=>{const c=this.vectorizeAndBroadcastArgumentsIfNecessary(l,s,a,e,i),u=this.calculateSingleCellOfResultArray(t,c,a,o,r,n.returnNumberType);if(u instanceof Ft)throw new Error("Function returning array cannot be vectorized.");return u}));return Ft.onlyValues(h)},this.runFunctionWithReferenceArgument=(e,t,n,r,i,s=(()=>new lr(Wn.NA,Ce.CellRefExpected)))=>{if(0===e.length)return this.returnNumberWrapper(r(),n.returnNumberType);if(e.length>1)return new lr(Wn.NA,Ce.WrongArgNumber);let o,a=e[0];while(a.type===j.PARENTHESIS)a=a.expression;if(a.type===j.CELL_REFERENCE)o=a.reference.toSimpleCellAddress(t.formulaAddress);else if(a.type===j.CELL_RANGE||a.type===j.COLUMN_RANGE||a.type===j.ROW_RANGE)try{o=Tr.fromAst(a,t.formulaAddress).start}catch(l){return new lr(Wn.REF,Ce.CellRefExpected)}return void 0!==o?this.returnNumberWrapper(i(o),n.returnNumberType):this.runFunction(e,t,n,s)},this.interpreter=e,this.dependencyGraph=e.dependencyGraph,this.columnSearch=e.columnSearch,this.config=e.config,this.serialization=e.serialization,this.arraySizePredictor=e.arraySizePredictor,this.dateTimeHelper=e.dateTimeHelper,this.arithmeticHelper=e.arithmeticHelper}evaluateAst(e,t){return this.interpreter.evaluateAst(e,t)}arraySizeForAst(e,t){return this.arraySizePredictor.checkArraySizeForAst(e,t)}listOfScalarValues(e,t){const n=[];for(const r of e){const e=this.evaluateAst(r,t);if(e instanceof Ft)for(const t of e.valuesFromTopLeftCorner())n.push([t,!0]);else n.push([e,!1])}return n}coerceToType(e,t,n){let r;if(e instanceof Ft)switch(t.argumentType){case $r.RANGE:case $r.ANY:r=e;break;default:{const t=Jr(e,n);if(void 0===t)return;e=t}}if(!(e instanceof Ft))switch(t.argumentType){case $r.INTEGER:case $r.NUMBER:const n=this.coerceScalarToNumberOrError(e);if(!_t(n)){r=n;break}const i=wt(n);if(void 0!==t.maxValue&&i>t.maxValue)return new lr(Wn.NUM,Ce.ValueLarge);if(void 0!==t.minValue&&i<t.minValue)return new lr(Wn.NUM,Ce.ValueSmall);if(void 0!==t.lessThan&&i>=t.lessThan)return new lr(Wn.NUM,Ce.ValueLarge);if(void 0!==t.greaterThan&&i<=t.greaterThan)return new lr(Wn.NUM,Ce.ValueSmall);if(t.argumentType===$r.INTEGER&&!Number.isInteger(i))return new lr(Wn.NUM,Ce.IntegerExpected);r=n;break;case $r.STRING:r=Fr(e);break;case $r.BOOLEAN:r=Ar(e);break;case $r.SCALAR:case $r.NOERROR:case $r.ANY:r=e;break;case $r.RANGE:if(e instanceof lr)return e;r=Pr(e);break;case $r.COMPLEX:return this.arithmeticHelper.coerceScalarToComplex(wt(e))}return t.passSubtype||void 0===r?r:wt(r)}calculateSingleCellOfResultArray(e,t,n,r,i,s){const o=this.coerceArgumentsToRequiredTypes(e,t,n,r);if(o instanceof lr)return o;const a=i(...o);return this.returnNumberWrapper(a,s)}coerceArgumentsToRequiredTypes(e,t,n,r){const i=[];for(let s=0;s<n.length;s++){const o=n[s],a=void 0!==t[s]?t[s]:null===o||void 0===o?void 0:o.defaultValue;if(void 0===a){i.push(void 0);continue}const l=this.coerceToType(a,o,e);if(void 0===l&&!r[s])return new lr(Wn.VALUE,Ce.WrongType);if(l instanceof lr&&o.argumentType!==$r.SCALAR)return l;i.push(l)}return i}vectorizeAndBroadcastArgumentsIfNecessary(e,t,n,r,i){return t.map((t,s)=>e&&this.isRangePassedAsAScalarArgument(t,n[s])?this.vectorizeAndBroadcastRangeArgument(t,r,i):t)}vectorizeAndBroadcastRangeArgument(e,t,n){var r;const i=1===e.height()?0:t,s=1===e.width()?0:n;return null===(r=e.data[i])||void 0===r?void 0:r[s]}evaluateArguments(e,t,n){return n.expandRanges?this.listOfScalarValues(e,t):e.map(e=>[this.evaluateAst(e,t),!1])}buildMetadataForEachArgumentValue(e,t){const n=t.parameters?[...t.parameters]:[],r=void 0!==t.repeatLastArgs&&Number.isInteger(t.repeatLastArgs)&&t.repeatLastArgs>0;if(r)while(e>n.length)n.push(...n.slice(n.length-t.repeatLastArgs));return n}isNumberOfArgumentValuesValid(e,t){if(t>e.length)return!1;if(t<e.length){const n=e.slice(t),r=n.every(e=>(null===e||void 0===e?void 0:e.optionalArg)||void 0!==(null===e||void 0===e?void 0:e.defaultValue));return r}return!0}calculateSizeOfVectorizedResultArray(e,t){const n=e.filter((e,n)=>this.isRangePassedAsAScalarArgument(e,t[n])),r=Math.max(1,...n.map(e=>e.height())),i=Math.max(1,...n.map(e=>e.width()));return[r,i]}isRangePassedAsAScalarArgument(e,t){return null!=e&&null!=t&&(e instanceof Ft&&![$r.RANGE,$r.ANY].includes(t.argumentType))}metadata(e){const t=this.constructor.implementedFunctions[e];if(void 0!==t)return t;throw new Error(`No metadata for function ${e}.`)}returnNumberWrapper(e,t,n){return void 0!==t&&_t(e)?this.arithmeticHelper.ExtendedNumberFactory(wt(e),{type:t,format:n}):e}}
  522. /**
  523. * @license
  524. * Copyright (c) 2024 Handsoncode. All rights reserved.
  525. */
  526. /**
  527. * @license
  528. * Copyright (c) 2024 Handsoncode. All rights reserved.
  529. */class ei{constructor(e,t,n=!1){this.width=e,this.height=t,this.isRef=n}static error(){return new ei(1,1,!0)}static scalar(){return new ei(1,1,!1)}isScalar(){return 1===this.width&&1===this.height||this.isRef}}function ti(e,t){return new ei(Math.max(e.width,t.width),Math.max(e.height,t.height))}function ni(e){return new ei(e.width,e.height)}class ri{constructor(e,t){this.config=e,this.functionRegistry=t}checkArraySize(e,t){return this.checkArraySizeForAst(e,{formulaAddress:t,arraysFlag:this.config.useArrayArithmetic})}checkArraySizeForAst(e,t){switch(e.type){case j.FUNCTION_CALL:return this.checkArraySizeForFunction(e,t);case j.COLUMN_RANGE:case j.ROW_RANGE:case j.CELL_RANGE:{const n=Tr.fromAstOrUndef(e,t.formulaAddress);return void 0===n?ei.error():new ei(n.width(),n.height(),!0)}case j.ARRAY:{const n=[],r=[];for(const o of e.args){const e=o.map(e=>this.checkArraySizeForAst(e,t)),i=Math.min(...e.map(e=>e.height)),s=e.reduce((e,t)=>e+t.width,0);n.push(i),r.push(s)}const i=n.reduce((e,t)=>e+t,0),s=Math.min(...r);return new ei(s,i)}case j.STRING:case j.NUMBER:return ei.scalar();case j.CELL_REFERENCE:return new ei(1,1,!0);case j.DIV_OP:case j.CONCATENATE_OP:case j.EQUALS_OP:case j.GREATER_THAN_OP:case j.GREATER_THAN_OR_EQUAL_OP:case j.LESS_THAN_OP:case j.LESS_THAN_OR_EQUAL_OP:case j.MINUS_OP:case j.NOT_EQUAL_OP:case j.PLUS_OP:case j.POWER_OP:case j.TIMES_OP:{const n=this.checkArraySizeForAst(e.left,t),r=this.checkArraySizeForAst(e.right,t);return!t.arraysFlag&&(n.height>1||n.width>1||r.height>1||r.width>1)?ei.error():ti(n,r)}case j.MINUS_UNARY_OP:case j.PLUS_UNARY_OP:case j.PERCENT_OP:{const n=this.checkArraySizeForAst(e.value,t);return!t.arraysFlag&&(n.height>1||n.width>1)?ei.error():ni(n)}case j.PARENTHESIS:return this.checkArraySizeForAst(e.expression,t);case j.EMPTY:return ei.error();default:return ei.error()}}checkArraySizeForFunction(e,t){const n=this.functionRegistry.getArraySizeFunction(e.procedureName);if(void 0!==n)return n(e,t);const r=this.functionRegistry.getMetadata(e.procedureName);if(void 0===r||r.expandRanges||!t.arraysFlag||r.vectorizationForbidden||void 0===r.parameters)return new ei(1,1);const i=e.args.map(e=>{var n;return this.checkArraySizeForAst(e,new Er(t.formulaAddress,t.arraysFlag||null!==(n=null===r||void 0===r?void 0:r.arrayFunction)&&void 0!==n&&n))}),s=[...r.parameters];if(void 0!==r.repeatLastArgs&&s.length<i.length&&(i.length-s.length)%r.repeatLastArgs!==0)return ei.error();while(s.length<i.length){if(void 0===r.repeatLastArgs)return ei.error();s.push(...s.slice(s.length-r.repeatLastArgs))}let o=1,a=1;for(let l=0;l<i.length;l++)s[l].argumentType!==$r.RANGE&&s[l].argumentType!==$r.ANY&&(a=Math.max(a,i[l].height),o=Math.max(o,i[l].width));return new ei(o,a)}}
  530. /**
  531. * @license
  532. * Copyright (c) 2024 Handsoncode. All rights reserved.
  533. */class ii{constructor(e,t,n){var r;this.value=t,this.address=n,this.type=e.type,this.message=null!==(r=e.message)&&void 0!==r?r:""}toString(){return this.value}valueOf(){return this.value}}
  534. /**
  535. * @license
  536. * Copyright (c) 2024 Handsoncode. All rights reserved.
  537. */function si(e,t,n){if("undefined"===typeof e)return ma.defaultConfig[n];if("string"===typeof t){if(typeof e===t)return e;throw new sn(t,n)}if(t.includes(e))return e;throw new cn(t.map(e=>`'${e}'`).join(" "),n)}function oi(e,t,n){if(e<n)throw new an(t,n)}function ai(e,t,n){if(e>n)throw new ln(t,n)}function li(e,t,n,r){if(t(e))return e;if("undefined"===typeof e)return ma.defaultConfig[r];throw new sn(n,r)}function ci(...e){const t=new Map;e.forEach(e=>{const n=t.get(e.value)||[];n.push(e.name),t.set(e.value,n)});const n=[];for(const r of t.values())r.length>1&&n.push(r);if(n.length>0){n.forEach(e=>e.sort());const e=n.map(e=>`[${e}]`).join("; ");throw new Error("Config initialization failed. Parameters in conflict: "+e)}}function ui(e,t,n){if(typeof e!==t)throw new sn(t,n)}
  538. /**
  539. * @license
  540. * Copyright (c) 2024 Handsoncode. All rights reserved.
  541. */const hi=new RegExp("^ss(\\.(s+|0+))?$"),di=new RegExp("^[0-9/.\\-: ]+[ap]?m?$"),mi=new RegExp("\\s+"),gi=new RegExp("[ /.-]"),pi=":",fi=1e3,Ri=vi(wi),yi=vi(Ti);function Mi(e,t,n){if(void 0===t&&void 0===n)return;let r=e.replace(mi," ").trim().toLowerCase();if(!Oi(r))return;let i=r.substring(r.length-2);"am"===i||"pm"===i?r=r.substring(0,r.length-2).trim():(i=r.substring(r.length-1),"a"===i||"p"===i?r=r.substring(0,r.length-1).trim():i=void 0);const s=r.split(gi);s.length>=2&&s[s.length-2].includes(pi)&&(s[s.length-2]=s[s.length-2]+"."+s[s.length-1],s.pop());const o=s[s.length-1].split(pi);if(void 0!==i&&o.push(i),1===s.length)return Si(o,n);if(1===o.length)return bi(s,t);const a=bi(s.slice(0,s.length-1),t),l=Si(o,n);return void 0===a||void 0===l?void 0:Object.assign(Object.assign({},a),l)}function Si(e,t){var n,r,i;if(void 0===t)return;const{itemsCount:s,hourItem:o,minuteItem:a,secondItem:l}=Ri(t);let c=void 0;if("am"===e[e.length-1]||"a"===e[e.length-1]?(c=!1,e.pop()):"pm"!==e[e.length-1]&&"p"!==e[e.length-1]||(c=!0,e.pop()),e.length!==s)return;const u=Number(null!==(n=e[l])&&void 0!==n?n:"0");if(!Number.isFinite(u))return;const h=Math.round(u*fi)/fi,d=Number(null!==(r=e[a])&&void 0!==r?r:"0");if(!Number.isFinite(d)||!Number.isInteger(d))return;const m=Number(null!==(i=e[o])&&void 0!==i?i:"0");if(!Number.isFinite(m)||!Number.isInteger(m))return;if(void 0!==c&&(m<0||m>12))return;const g=void 0!==c?m%12+(c?12:0):m;return{hours:g,minutes:d,seconds:h}}function bi(e,t){var n;if(void 0===t)return;const{itemsCount:r,dayItem:i,monthItem:s,shortYearItem:o,longYearItem:a}=yi(t);if(e.length!==r)return;const l=Number(e[i]);if(!Number.isFinite(l)||!Number.isInteger(l))return;const c=Number(e[s]);if(!Number.isFinite(c)||!Number.isInteger(c))return;if(e[a]&&e[o])return;const u=Number(null!==(n=e[a])&&void 0!==n?n:e[o]);return!Number.isFinite(u)||!Number.isInteger(u)||e[a]&&(u<1e3||u>9999)||e[o]&&(u<0||u>99)?void 0:{year:u,month:c,day:l}}function wi(e){const t=e.toLowerCase().trim(),n=t.endsWith("am/pm")?t.substring(0,t.length-5):t.endsWith("a/p")?t.substring(0,e.length-3):t,r=n.trim().split(pi);return{itemsCount:r.length,hourItem:r.indexOf("hh"),minuteItem:r.indexOf("mm"),secondItem:r.findIndex(e=>hi.test(e))}}function Ti(e){const t=e.toLowerCase().trim().split(gi);return{itemsCount:t.length,dayItem:t.indexOf("dd"),monthItem:t.indexOf("mm"),shortYearItem:t.indexOf("yy"),longYearItem:t.indexOf("yyyy")}}function Oi(e){return di.test(e)}function vi(e){const t={};return n=>{const r=t[n];if(void 0!==r)return r;const i=e(n);return t[n]=i,i}}
  542. /**
  543. * @license
  544. * Copyright (c) 2024 Handsoncode. All rights reserved.
  545. */const Ei=[31,28,31,30,31,30,31,31,30,31,30,31],Ci=[0,31,59,90,120,151,181,212,243,273,304,334],Li=60,Ni=60,_i=24;function Ii(e){return!(!e||"object"!==typeof e&&"function"!==typeof e)&&("year"in e&&"number"===typeof e.year&&"month"in e&&"number"===typeof e.month&&"day"in e&&"number"===typeof e.day)}function Pi(e){return!(!e||"object"!==typeof e&&"function"!==typeof e)&&("hours"in e&&"number"===typeof e.hours&&"minutes"in e&&"number"===typeof e.minutes&&"seconds"in e&&"number"===typeof e.seconds)}const xi={year:9999,month:12,day:31};class Di{constructor(e){this.config=e,this.minDateAbsoluteValue=this.dateToNumberFromZero(e.nullDate),this.maxDateValue=this.dateToNumber(xi),this.leapYear1900=e.leapYear1900,!this.leapYear1900&&0<=this.dateToNumber({year:1900,month:2,day:28})?this.epochYearZero=this.numberToSimpleDate(2).year:this.epochYearZero=this.numberToSimpleDate(1).year,this.parseDateTime=e.parseDateTime}getWithinBounds(e){return e<=this.maxDateValue&&e>=0?e:void 0}dateStringToDateNumber(e){const{dateTime:t,dateFormat:n="",timeFormat:r=""}=this.parseDateTimeFromConfigFormats(e);if(void 0!==t)return Pi(t)?Ii(t)?new Lt(Ui(t)+this.dateToNumber(t),n+" "+r):new Ct(Ui(t),r):Ii(t)?new vt(this.dateToNumber(t),n):0}parseDateTimeFromConfigFormats(e){return this.parseDateTimeFromFormats(e,this.config.dateFormats,this.config.timeFormats)}getNullYear(){return this.config.nullYear}getEpochYearZero(){return this.epochYearZero}isValidDate(e){return!(isNaN(e.year)||isNaN(e.month)||isNaN(e.day))&&(e.day===Math.round(e.day)&&e.month===Math.round(e.month)&&e.year===Math.round(e.year)&&(!(e.year<1582)&&(!(e.month<1||e.month>12)&&(!(e.day<1)&&(this.isLeapYear(e.year)&&2===e.month?e.day<=29:e.day<=Ei[e.month-1])))))}dateToNumber(e){return this.dateToNumberFromZero(e)-this.minDateAbsoluteValue}relativeNumberToAbsoluteNumber(e){return e+this.minDateAbsoluteValue-(this.leapYear1900?1:0)}numberToSimpleDate(e){const t=Math.floor(e)+this.minDateAbsoluteValue;let n=Math.floor(t/365.2425);this.dateToNumberFromZero({year:n+1,month:1,day:1})<=t?n++:this.dateToNumberFromZero({year:n-1,month:1,day:1})>t&&n--;const r=t-this.dateToNumberFromZero({year:n,month:1,day:1}),i=Ai(r-(this.isLeapYear(n)&&r>=59?1:0)),s=r-Ci[i]-(this.isLeapYear(n)&&i>1?1:0);return{year:n,month:i+1,day:s+1}}numberToSimpleDateTime(e){const t=Vi(e%1),n=Math.floor(t.hours/_i);t.hours=t.hours%_i;const r=this.numberToSimpleDate(Math.floor(e)+n);return Object.assign(Object.assign({},r),t)}leapYearsCount(e){return Math.floor(e/4)-Math.floor(e/100)+Math.floor(e/400)+(this.config.leapYear1900&&e>=1900?1:0)}daysInMonth(e,t){return this.isLeapYear(e)&&2===t?29:Ei[t-1]}endOfMonth(e){return{year:e.year,month:e.month,day:this.daysInMonth(e.year,e.month)}}toBasisUS(e,t){return 31===e.day&&(e.day=30),30===e.day&&31===t.day&&(t.day=30),2===e.month&&e.day===this.daysInMonth(e.year,e.month)&&(e.day=30,2===t.month&&t.day===this.daysInMonth(t.year,t.month)&&(t.day=30)),[e,t]}yearLengthForBasis(e,t){return e.year!==t.year?e.year+1!==t.year||e.month<t.month||e.month===t.month&&e.day<t.day?(this.leapYearsCount(t.year)-this.leapYearsCount(e.year-1))/(t.year-e.year+1)+365:this.countLeapDays(t)!==this.countLeapDays({year:e.year,month:e.month,day:e.day-1})?366:365:this.isLeapYear(e.year)?366:365}parseSingleFormat(e,t,n){const r=this.parseDateTime(e,t,n);if(!Ii(r)||(r.year>=0&&r.year<100&&(r.year<this.getNullYear()?r.year+=2e3:r.year+=1900),this.isValidDate(r)))return r}parseDateTimeFromFormats(e,t,n){const r=0===t.length?[void 0]:t,i=0===n.length?[void 0]:n;for(const s of r)for(const t of i){const n=this.parseSingleFormat(e,s,t);if(void 0!==n)return{dateTime:n,timeFormat:t,dateFormat:s}}return{}}countLeapDays(e){return e.month>2||2===e.month&&e.day>=29?this.leapYearsCount(e.year):this.leapYearsCount(e.year-1)}dateToNumberFromZero(e){return 365*e.year+Ci[e.month-1]+e.day-1+(e.month<=2?this.leapYearsCount(e.year-1):this.leapYearsCount(e.year))}isLeapYear(e){return!(e%4)&&(!!(e%100)||(!(e%400)||1900===e&&this.config.leapYear1900))}}function Ai(e){let t=0;return Ci[t+6]<=e&&(t+=6),Ci[t+3]<=e&&(t+=3),Ci[t+2]<=e?t+=2:Ci[t+1]<=e&&(t+=1),t}function Fi(e,t){const n=12*e.year+e.month-1+t;return{year:Math.floor(n/12),month:n%12+1,day:e.day}}function Yi(e){return{year:e.year,month:e.month,day:Math.min(e.day,Ei[e.month-1])}}function Hi(e){return Math.round(3600*e*24)/86400}function ki(e,t=1){return Math.round(e*t)/t}function Vi(e){const t=e*_i*Ni*Li,n=ki(t%Li,1e5)%Li,r=(t-n)/Li,i=Math.round(r%Ni)%Ni,s=(r-i)/Ni,o=Math.round(s);return{hours:o,minutes:i,seconds:n}}function Ui(e){return((e.seconds/60+e.minutes)/60+e.hours)/24}function Wi(e){return{year:e.year,month:e.month,day:Math.min(30,e.day)}}
  546. /**
  547. * @license
  548. * Copyright (c) 2024 Handsoncode. All rights reserved.
  549. */class Xi{call(){return $n}}
  550. /**
  551. * @license
  552. * Copyright (c) 2024 Handsoncode. All rights reserved.
  553. */const ji=/(\\.|dd|DD|d|D|mm|MM|m|M|YYYY|YY|yyyy|yy|HH|hh|H|h|ss(\.(0+|s+))?|s|AM\/PM|am\/pm|A\/P|a\/p|\[mm]|\[MM]|\[hh]|\[HH])/g,Zi=/(\\.|[#0]+(\.[#0]*)?)/g;var Qi,Ki;function Gi(e,t){return{type:e,value:t}}function Bi(e){ji.lastIndex=0;const t=[];let n;do{n=ji.exec(e),null!==n&&t.push(n)}while(n);return t}function Ji(e){Zi.lastIndex=0;const t=Zi.exec(e);return null!==t?[t]:[]}function zi(e,t){const n=[];let r=0;for(let s=0;s<e.length;++s){const i=e[s];if(i.index!==r){const e=t.substr(r,i.index-r);n.push(Gi(Qi.FREE_TEXT,e))}i[0].startsWith("\\")?n.push(Gi(Qi.FREE_TEXT,i[0])):n.push(Gi(Qi.FORMAT,i[0])),r=i.index+i[0].length}const i=e[e.length-1];if(i.index+i[0].length<t.length){const e=t.substr(i.index+i[0].length,t.length);n.push(Gi(Qi.FREE_TEXT,e))}return n}function $i(e){const t=Bi(e);return t.every(e=>es(e))?void 0:{type:Ki.DATE,tokens:zi(t,e)}}function qi(e){const t=Ji(e);return t.every(e=>es(e))?void 0:{type:Ki.NUMBER,tokens:zi(t,e)}}function es(e){return e[0].startsWith("\\")}
  554. /**
  555. * @license
  556. * Copyright (c) 2024 Handsoncode. All rights reserved.
  557. */function ts(e,t,n,r){const i=n.stringifyDateTime(r.numberToSimpleDateTime(e),t);if(void 0!==i)return i;const s=n.stringifyDuration(Vi(e),t);if(void 0!==s)return s;const o=qi(t);return void 0!==o?ss(o.tokens,e):t}function ns(e,t){let n=""+e;while(n.length<t)n="0"+n;return n}function rs(e,t){let n=""+e;while(n.length<t)n+="0";return n}function is(e,t){return e.split(t).length-1}function ss(e,t){let n="";for(let r=0;r<e.length;++r){const i=e[r];if(i.type===Qi.FREE_TEXT){n+=i.value;continue}const s=i.value.split("."),o=s[0],a=s[1]||"",l=s[1]?".":"",c=Number(t.toFixed(a.length)).toString().split(".");let u=c[0]||"",h=c[1]||"";if(o.length>u.length){const e=is(o.substr(0,o.length-u.length),"0");u=ns(u,e+u.length)}const d=is(a.substr(h.length,a.length-h.length),"0");h=rs(h,d+h.length),n+=u+l+h}return n}function os(e,t){const n=$i(t);if(void 0===n)return;const r=n.tokens;let i="";for(const s of r)if(s.type!==Qi.FREE_TEXT)switch(s.value.toLowerCase()){case"h":case"hh":i+=ns(e.hours,s.value.length),e.hours=0;break;case"[hh]":i+=ns(e.hours,s.value.length-2),e.hours=0;break;case"m":case"mm":i+=ns(e.minutes,s.value.length),e.minutes=0;break;case"[mm]":i+=ns(e.minutes+60*e.hours,s.value.length-2),e.minutes=0,e.hours=0;break;case"s":case"ss":i+=ns(Math.floor(e.seconds),s.value.length);break;default:if(hi.test(s.value)){const t=Math.max(s.value.length-3,0);i+=`${e.seconds<10?"0":""}${Math.floor(e.seconds*Math.pow(10,t))/Math.pow(10,t)}`;continue}return}else i+=s.value;return i}function as(e,t){const n=$i(t);if(void 0===n)return;const r=n.tokens;let i="",s=!1;const o=r.some(e=>e.type===Qi.FORMAT&&("a/p"===e.value||"A/P"===e.value||"am/pm"===e.value||"AM/PM"===e.value));for(let a=0;a<r.length;a++){const t=r[a];if(t.type!==Qi.FREE_TEXT)switch(t.value.toLowerCase()){case"h":case"hh":s=!0,i+=ns(o?(e.hours+11)%12+1:e.hours,t.value.length);break;case"d":case"dd":i+=ns(e.day,t.value.length);break;case"s":case"ss":i+=ns(Math.floor(e.seconds),t.value.length);break;case"m":case"mm":a+1<r.length&&r[a+1].value.startsWith(":")&&(s=!0),i+=ns(s?e.minutes:e.month,t.value.length),s=!0;break;case"yy":i+=ns(e.year%100,t.value.length);break;case"yyyy":i+=e.year;break;case"am/pm":case"a/p":{const[n,r]=t.value.split("/");i+=e.hours<12?n:r;break}default:if(hi.test(t.value)){const n=t.value.length-3;i+=`${e.seconds<10?"0":""}${Math.floor(e.seconds*Math.pow(10,n))/Math.pow(10,n)}`;continue}return}else i+=t.value}return i}
  558. /**
  559. * @license
  560. * Copyright (c) 2024 Handsoncode. All rights reserved.
  561. */(function(e){e["FORMAT"]="FORMAT",e["FREE_TEXT"]="FREE_TEXT"})(Qi||(Qi={})),function(e){e["DATE"]="DATE",e["NUMBER"]="NUMBER",e["STRING"]="STRING"}(Ki||(Ki={}));const ls="length",cs=e=>parseInt(e,16),us=e=>parseInt(e,10),hs=e=>(e+"").replace(/\-/g,""),ds=(e,t,n)=>e["substr"](t,n),ms=e=>e["codePointAt"](0)-65;function gs(e){return 25===hs(e)[ls]?cs(ds(hs(e),cs("12"),ms("F")))/(cs(ds(hs(e),ms("C"),ms("Y")>>4))||1+(~~![][ls]<<3)):0}function ps(e){if(e=(e+"").replace(/\-/g,""),e[ls]!==ms("Z"))return!1;let t=0;return[[0,ms("G")+1],[ms("H"),ms("H")-1],[ms("G")+ms("H"),ms("G")]].reduce((n,[r,i],s)=>(n|=(us(""+us(cs(ds(e,t+r-(0===s?0:2),i+(s?2:0)))+(cs(ds(e,t+r+i,2))+[]).padStart(2,"0")))%97||2)>>1,t+=2,n),ms("A"))===[]+1>>1}
  562. /**
  563. * @license
  564. * Copyright (c) 2024 Handsoncode. All rights reserved.
  565. */const fs={invalid:()=>"The license key for HyperFormula is invalid.",expired:({keyValidityDate:e})=>`The license key for HyperFormula expired on ${e}, and is not valid for the installed version.`,missing:()=>"The license key for HyperFormula is missing."};let Rs=!1;function ys(e){const t={template:"missing",vars:{}};if("gpl-v3"===e||"internal-use-in-handsontable"===e)t.template="valid";else if("string"===typeof e&&ps(e)){const[n,r,i]="18/07/2024".split("/"),s=Math.floor(new Date(`${r}/${n}/${i}`).getTime()/864e5),o=gs(e);t.vars.keyValidityDate=Ms(new Date(864e5*(o+1))),t.template=s>o?"expired":"valid"}else""!==e&&(t.template="invalid");return Rs||"valid"===t.template||(console.warn(fs[t.template](t.vars)),Rs=!0),t.template}function Ms(e){const t=["January","February","March","April","May","June","July","August","September","October","November","December"],n=t[e.getMonth()],r=e.getDate(),i=e.getFullYear();return`${n} ${r}, ${i}`}
  566. /**
  567. * @license
  568. * Copyright (c) 2024 Handsoncode. All rights reserved.
  569. */var Ss,bs,ws;function Ts(e){return e.startsWith("=")}function Os(e){const t=e.toLowerCase();return"true"===t||"false"===t}function vs(e,t){const n=e.toUpperCase(),r=/#[A-Za-z0-9\/]+[?!]?/;return r.test(n)&&Object.prototype.hasOwnProperty.call(t,n)}(function(e){class t{constructor(e){this.value=e,this.value=Ot(this.value,Vr(wt(this.value)))}}e.Number=t;class n{constructor(e){this.value=e}}e.String=n;class r{constructor(e){this.value=e}}e.Boolean=r;class i{static getSingletonInstance(){return i.instance||(i.instance=new i),i.instance}}e.Empty=i;class s{constructor(e){this.formula=e}}e.Formula=s;class o{constructor(e,t){this.value=new lr(e,t)}}e.Error=o})(Ss||(Ss={}));class Es{constructor(e,t,n){this.config=e,this.dateHelper=t,this.numberLiteralsHelper=n}parse(e){if(void 0===e||null===e)return Ss.Empty.getSingletonInstance();if("number"===typeof e)return kr(e)?new Ss.Error(Wn.NUM,Ce.ValueLarge):new Ss.Number(e);if("boolean"===typeof e)return new Ss.Boolean(e);if(e instanceof Date){const t=this.dateHelper.dateToNumber({day:e.getDate(),month:e.getMonth()+1,year:e.getFullYear()}),n=Ui({hours:e.getHours(),minutes:e.getMinutes(),seconds:e.getSeconds()+e.getMilliseconds()/1e3}),r=t+n;return r<0?new Ss.Error(Wn.NUM,Ce.DateBounds):r%1===0?new Ss.Number(new vt(r,"Date()")):r<1?new Ss.Number(new Ct(r,"Date()")):new Ss.Number(new Lt(r,"Date()"))}if("string"===typeof e){if(Os(e))return new Ss.Boolean("true"===e.toLowerCase());if(Ts(e))return new Ss.Formula(e);if(vs(e,this.config.errorMapping))return new Ss.Error(this.config.errorMapping[e.toUpperCase()]);{let t,n=e.trim(),r=0;if(n.endsWith("%"))r=1,n=n.slice(0,n.length-1);else{const e=this.currencyMatcher(n);void 0!==e&&(r=2,[t,n]=e)}const i=this.numberLiteralsHelper.numericStringToMaybeNumber(n);if(void 0!==i){let e;return e=1===r?new Nt(i/100):2===r?new Et(i,t):i,new Ss.Number(e)}const s=this.dateHelper.dateStringToDateNumber(n);return void 0!==s?new Ss.Number(s):new Ss.String(e.startsWith("'")?e.slice(1):e)}}throw new rn(e)}currencyMatcher(e){for(const t of this.config.currencySymbol){if(e.startsWith(t))return[t,e.slice(t.length)];if(e.endsWith(t))return[t,e.slice(0,e.length-t.length)]}}}
  570. /**
  571. * @license
  572. * Copyright (c) 2024 Handsoncode. All rights reserved.
  573. */(function(e){e[e["COPY"]=0]="COPY",e[e["CUT"]=1]="CUT"})(bs||(bs={})),function(e){e[e["VALUE"]=0]="VALUE",e[e["EMPTY"]=1]="EMPTY",e[e["FORMULA"]=2]="FORMULA",e[e["PARSING_ERROR"]=3]="PARSING_ERROR"}(ws||(ws={}));class Cs{constructor(e,t,n,r,i){this.sourceLeftCorner=e,this.width=t,this.height=n,this.type=r,this.content=i}*getContent(e){if(void 0!==this.content)for(let t=0;t<this.height;++t)for(let n=0;n<this.width;++n)yield[mr(e.sheet,e.col+n,e.row+t),this.content[t][n]]}}class Ls{constructor(e,t,n){this.dependencyGraph=t,this.operations=n,this.maxRows=e.maxRows,this.maxColumns=e.maxColumns}cut(e,t,n){this.clipboard=new Cs(e,t,n,bs.CUT)}copy(e,t,n){const r=[];for(let i=0;i<n;++i){r[i]=[];for(let n=0;n<t;++n){const t=this.operations.getClipboardCell(mr(e.sheet,e.col+n,e.row+i));r[i].push(t)}}this.clipboard=new Cs(e,t,n,bs.COPY,r)}abortCut(){this.clipboard&&this.clipboard.type===bs.CUT&&this.clear()}clear(){this.clipboard=void 0}ensureItIsPossibleToCopyPaste(e){if(void 0===this.clipboard)return;if(gr(e)||!this.dependencyGraph.sheetMapping.hasSheetWithId(e.sheet))throw new Gt("a valid target address.");const t=Tr.spanFrom(e,this.clipboard.width,this.clipboard.height);if(t.exceedsSheetSizeLimits(this.maxColumns,this.maxRows))throw new Zt;if(this.dependencyGraph.arrayMapping.isFormulaArrayInRange(t))throw new Error("It is not possible to paste onto an array")}isCutClipboard(){return void 0!==this.clipboard&&this.clipboard.type===bs.CUT}isCopyClipboard(){return void 0!==this.clipboard&&this.clipboard.type===bs.COPY}}
  574. /**
  575. * @license
  576. * Copyright (c) 2024 Handsoncode. All rights reserved.
  577. */class Ns{constructor(e,t,n,r){this.displayName=e,this.address=t,this.added=n,this.options=r}normalizeExpressionName(){return this.displayName.toLowerCase()}copy(){return new Ns(this.displayName,this.address,this.added,this.options)}}class _s{constructor(){this.mapping=new Map}has(e){return this.mapping.has(this.normalizeExpressionName(e))}isNameAvailable(e){const t=this.normalizeExpressionName(e),n=this.mapping.get(t);return!(n&&n.added)}add(e){this.mapping.set(e.normalizeExpressionName(),e)}get(e){return this.mapping.get(this.normalizeExpressionName(e))}getExisting(e){const t=this.mapping.get(this.normalizeExpressionName(e));return t&&t.added?t:void 0}remove(e){const t=this.normalizeExpressionName(e),n=this.mapping.get(t);n&&(n.added=!1)}getAllNamedExpressions(){return Array.from(this.mapping.values()).filter(e=>e.added)}normalizeExpressionName(e){return e.toLowerCase()}}class Is{constructor(){this.mapping=new Map}add(e){this.mapping.set(this.normalizeExpressionName(e.displayName),e)}get(e){return this.mapping.get(this.normalizeExpressionName(e))}has(e){return this.mapping.has(this.normalizeExpressionName(e))}getAllNamedExpressions(){return Array.from(this.mapping.values()).filter(e=>e.added)}isNameAvailable(e){const t=this.normalizeExpressionName(e);return!this.mapping.has(t)}remove(e){const t=this.normalizeExpressionName(e),n=this.mapping.get(t);n&&this.mapping.delete(t)}normalizeExpressionName(e){return e.toLowerCase()}}class Ps{constructor(){this.nextNamedExpressionRow=0,this.workbookStore=new _s,this.worksheetStores=new Map,this.addressCache=new Map}isNameAvailable(e,t){var n,r;return void 0===t?this.workbookStore.isNameAvailable(e):null===(r=null===(n=this.worksheetStore(t))||void 0===n?void 0:n.isNameAvailable(e))||void 0===r||r}namedExpressionInAddress(e){const t=this.addressCache.get(e);return t&&t.added?t:void 0}namedExpressionForScope(e,t){var n;return void 0===t?this.workbookStore.getExisting(e):null===(n=this.worksheetStore(t))||void 0===n?void 0:n.get(e)}nearestNamedExpression(e,t){var n,r;return null!==(r=null===(n=this.worksheetStore(t))||void 0===n?void 0:n.get(e))&&void 0!==r?r:this.workbookStore.getExisting(e)}isExpressionInScope(e,t){var n,r;return null!==(r=null===(n=this.worksheetStore(t))||void 0===n?void 0:n.has(e))&&void 0!==r&&r}isNameValid(e){const t=new RegExp(`^${y}$`),n=new RegExp(`^${b}$`),r=new RegExp(`^${T}$`);return!t.test(e)&&!n.test(e)&&r.test(e)}addNamedExpression(e,t,n){const r=void 0===t?this.workbookStore:this.worksheetStoreOrCreate(t);let i=r.get(e);return void 0!==i?(i.added=!0,i.displayName=e,i.options=n):(i=new Ns(e,this.nextAddress(),!0,n),r.add(i)),this.addressCache.set(i.address.row,i),i}restoreNamedExpression(e,t){const n=void 0===t?this.workbookStore:this.worksheetStoreOrCreate(t);return e.added=!0,n.add(e),this.addressCache.set(e.address.row,e),e}namedExpressionOrPlaceholder(e,t){var n;return null!==(n=this.worksheetStoreOrCreate(t).get(e))&&void 0!==n?n:this.workbookNamedExpressionOrPlaceholder(e)}workbookNamedExpressionOrPlaceholder(e){let t=this.workbookStore.get(e);return void 0===t&&(t=new Ns(e,this.nextAddress(),!1),this.workbookStore.add(t)),t}remove(e,t){let n;n=void 0===t?this.workbookStore:this.worksheetStore(t);const r=null===n||void 0===n?void 0:n.get(e);if(void 0===n||void 0===r||!r.added)throw Error("Named expression does not exist");n.remove(e),n instanceof Is&&0===n.mapping.size&&this.worksheetStores.delete(t),this.addressCache.delete(r.address.row)}getAllNamedExpressionsNamesInScope(e){return this.getAllNamedExpressions().filter(({scope:t})=>t===e).map(e=>e.expression.displayName)}getAllNamedExpressionsNames(){return this.getAllNamedExpressions().map(e=>e.expression.displayName)}getAllNamedExpressions(){const e=[];return this.workbookStore.getAllNamedExpressions().forEach(t=>{e.push({expression:t,scope:void 0})}),this.worksheetStores.forEach((t,n)=>{t.getAllNamedExpressions().forEach(t=>{e.push({expression:t,scope:n})})}),e}getAllNamedExpressionsForScope(e){var t,n;return void 0===e?this.workbookStore.getAllNamedExpressions():null!==(n=null===(t=this.worksheetStores.get(e))||void 0===t?void 0:t.getAllNamedExpressions())&&void 0!==n?n:[]}worksheetStoreOrCreate(e){let t=this.worksheetStores.get(e);return t||(t=new Is,this.worksheetStores.set(e,t)),t}worksheetStore(e){return this.worksheetStores.get(e)}nextAddress(){return mr(Ps.SHEET_FOR_WORKBOOK_EXPRESSIONS,0,this.nextNamedExpressionRow++)}}Ps.SHEET_FOR_WORKBOOK_EXPRESSIONS=-1;const xs=e=>{switch(e.type){case j.EMPTY:case j.NUMBER:case j.STRING:case j.ERROR:case j.ERROR_WITH_RAW_INPUT:return!1;case j.CELL_REFERENCE:return!e.reference.isAbsolute();case j.CELL_RANGE:case j.COLUMN_RANGE:case j.ROW_RANGE:return!e.start.isAbsolute();case j.NAMED_EXPRESSION:return!1;case j.PERCENT_OP:case j.PLUS_UNARY_OP:case j.MINUS_UNARY_OP:return xs(e.value);case j.CONCATENATE_OP:case j.EQUALS_OP:case j.NOT_EQUAL_OP:case j.LESS_THAN_OP:case j.GREATER_THAN_OP:case j.LESS_THAN_OR_EQUAL_OP:case j.GREATER_THAN_OR_EQUAL_OP:case j.MINUS_OP:case j.PLUS_OP:case j.TIMES_OP:case j.DIV_OP:case j.POWER_OP:return xs(e.left)||xs(e.right);case j.PARENTHESIS:return xs(e.expression);case j.FUNCTION_CALL:return e.args.some(e=>xs(e));case j.ARRAY:return e.args.some(e=>e.some(e=>xs(e)))}};
  578. /**
  579. * @license
  580. * Copyright (c) 2024 Handsoncode. All rights reserved.
  581. */class Ds{performEagerTransformations(e,t){for(const n of e.arrayFormulaNodes()){const[r,i]=this.transformSingleAst(n.getFormula(e.lazilyTransformingAstService),n.getAddress(e.lazilyTransformingAstService)),s=t.rememberNewAst(r);n.setFormula(s),n.setAddress(i)}}transformSingleAst(e,t){const n=this.transformAst(e,t),r=this.fixNodeAddress(t);return[n,r]}transformAst(e,t){switch(e.type){case j.CELL_REFERENCE:return this.transformCellReferenceAst(e,t);case j.CELL_RANGE:return this.transformCellRangeAst(e,t);case j.COLUMN_RANGE:return this.transformColumnRangeAst(e,t);case j.ROW_RANGE:return this.transformRowRangeAst(e,t);case j.EMPTY:case j.ERROR:case j.NUMBER:case j.NAMED_EXPRESSION:case j.ERROR_WITH_RAW_INPUT:case j.STRING:return e;case j.PERCENT_OP:case j.MINUS_UNARY_OP:case j.PLUS_UNARY_OP:return Object.assign(Object.assign({},e),{value:this.transformAst(e.value,t)});case j.FUNCTION_CALL:return Object.assign(Object.assign({},e),{procedureName:e.procedureName,args:e.args.map(e=>this.transformAst(e,t))});case j.PARENTHESIS:return Object.assign(Object.assign({},e),{expression:this.transformAst(e.expression,t)});case j.ARRAY:return Object.assign(Object.assign({},e),{args:e.args.map(e=>e.map(e=>this.transformAst(e,t)))});default:return Object.assign(Object.assign({},e),{left:this.transformAst(e.left,t),right:this.transformAst(e.right,t)})}}transformCellReferenceAst(e,t){const n=this.transformCellAddress(e.reference,t);return n instanceof l?Object.assign(Object.assign({},e),{reference:n}):n===Wn.REF?ye(new lr(Wn.REF)):e}transformCellRangeAst(e,t){const n=this.transformCellRange(e.start,e.end,t);return Array.isArray(n)?Object.assign(Object.assign({},e),{start:n[0],end:n[1]}):n===Wn.REF?ye(new lr(Wn.REF)):e}transformColumnRangeAst(e,t){const n=this.transformColumnRange(e.start,e.end,t);return Array.isArray(n)?Object.assign(Object.assign({},e),{start:n[0],end:n[1]}):n===Wn.REF?ye(new lr(Wn.REF)):e}transformRowRangeAst(e,t){const n=this.transformRowRange(e.start,e.end,t);return Array.isArray(n)?Object.assign(Object.assign({},e),{start:n[0],end:n[1]}):n===Wn.REF?ye(new lr(Wn.REF)):e}}
  582. /**
  583. * @license
  584. * Copyright (c) 2024 Handsoncode. All rights reserved.
  585. */class As extends Ds{constructor(e){super(),this.columnsSpan=e}get sheet(){return this.columnsSpan.sheet}isIrreversible(){return!1}transformRowRangeAst(e,t){return e}transformCellRange(e,t,n){return this.transformRange(e,t,n)}transformRowRange(e,t,n){throw Error("Not implemented")}transformColumnRange(e,t,n){return this.transformRange(e,t,n)}transformCellAddress(e,t){const n=yr(e,t);if(n!==this.columnsSpan.sheet&&t.sheet!==this.columnsSpan.sheet)return!1;const r=e.toSimpleColumnAddress(t);if(n===this.columnsSpan.sheet&&t.sheet!==this.columnsSpan.sheet)return this.columnsSpan.columnStart<=r.col&&e.shiftedByColumns(this.columnsSpan.numberOfColumns);if(t.sheet===this.columnsSpan.sheet&&n!==this.columnsSpan.sheet)return!e.isColumnAbsolute()&&(!(t.col<this.columnsSpan.columnStart)&&e.shiftedByColumns(-this.columnsSpan.numberOfColumns));if(e.isColumnAbsolute())return!(e.col<this.columnsSpan.columnStart)&&e.shiftedByColumns(this.columnsSpan.numberOfColumns);{const n=e.toSimpleColumnAddress(t);return n.col<this.columnsSpan.columnStart?!(t.col<this.columnsSpan.columnStart)&&e.shiftedByColumns(-this.columnsSpan.numberOfColumns):t.col<this.columnsSpan.columnStart&&e.shiftedByColumns(this.columnsSpan.numberOfColumns)}}fixNodeAddress(e){return this.columnsSpan.sheet===e.sheet&&this.columnsSpan.columnStart<=e.col?Object.assign(Object.assign({},e),{col:e.col+this.columnsSpan.numberOfColumns}):e}transformRange(e,t,n){const r=this.transformCellAddress(e,n),i=this.transformCellAddress(t,n);return r===Wn.REF||i===Wn.REF?Wn.REF:!(!r&&!i)&&[r||e,i||t]}}
  586. /**
  587. * @license
  588. * Copyright (c) 2024 Handsoncode. All rights reserved.
  589. */class Fs extends Ds{constructor(e){super(),this.rowsSpan=e}get sheet(){return this.rowsSpan.sheet}isIrreversible(){return!1}transformColumnRangeAst(e,t){return e}transformCellRange(e,t,n){return this.transformRange(e,t,n)}transformRowRange(e,t,n){return this.transformRange(e,t,n)}transformColumnRange(e,t,n){throw Error("Not implemented")}transformCellAddress(e,t){const n=yr(e,t);if(n!==this.rowsSpan.sheet&&t.sheet!==this.rowsSpan.sheet)return!1;const r=e.toSimpleRowAddress(t);return n===this.rowsSpan.sheet&&t.sheet!==this.rowsSpan.sheet?this.rowsSpan.rowStart<=r.row&&e.shiftedByRows(this.rowsSpan.numberOfRows):t.sheet===this.rowsSpan.sheet&&n!==this.rowsSpan.sheet?!e.isRowAbsolute()&&(!(t.row<this.rowsSpan.rowStart)&&e.shiftedByRows(-this.rowsSpan.numberOfRows)):e.isRowAbsolute()?!(e.row<this.rowsSpan.rowStart)&&e.shiftedByRows(this.rowsSpan.numberOfRows):r.row<this.rowsSpan.rowStart?!(t.row<this.rowsSpan.rowStart)&&e.shiftedByRows(-this.rowsSpan.numberOfRows):t.row<this.rowsSpan.rowStart&&e.shiftedByRows(this.rowsSpan.numberOfRows)}fixNodeAddress(e){return this.rowsSpan.sheet===e.sheet&&this.rowsSpan.rowStart<=e.row?Object.assign(Object.assign({},e),{row:e.row+this.rowsSpan.numberOfRows}):e}transformRange(e,t,n){const r=this.transformCellAddress(e,n),i=this.transformCellAddress(t,n);return r===Wn.REF||i===Wn.REF?Wn.REF:!(!r&&!i)&&[r||e,i||t]}}
  590. /**
  591. * @license
  592. * Copyright (c) 2024 Handsoncode. All rights reserved.
  593. */class Ys extends Ds{constructor(e){super(),this.sheet=e}isIrreversible(){return!0}fixNodeAddress(e){return e}transformCellAddress(e,t){return!!e.isInvalid(t)&&Wn.REF}transformCellRange(e,t,n){return!(!e.isInvalid(n)&&!t.isInvalid(n))&&Wn.REF}transformColumnRange(e,t,n){return!(!e.isInvalid(n)&&!t.isInvalid(n))&&Wn.REF}transformRowRange(e,t,n){return!(!e.isInvalid(n)&&!t.isInvalid(n))&&Wn.REF}}
  594. /**
  595. * @license
  596. * Copyright (c) 2024 Handsoncode. All rights reserved.
  597. */class Hs extends Ds{constructor(e,t,n,r){super(),this.sourceRange=e,this.toRight=t,this.toBottom=n,this.toSheet=r,this.dependentFormulaTransformer=new ks(e,t,n,r)}get sheet(){return this.sourceRange.sheet}isIrreversible(){return!0}transformSingleAst(e,t){if(this.sourceRange.addressInRange(t)){const n=this.transformAst(e,t);return[n,this.fixNodeAddress(t)]}return this.dependentFormulaTransformer.transformSingleAst(e,t)}fixNodeAddress(e){return mr(this.toSheet,e.col+this.toRight,e.row+this.toBottom)}transformCellAddress(e,t){return this.transformAddress(e,t)}transformCellRange(e,t,n){return this.transformRange(e,t,n)}transformColumnRange(e,t,n){return this.transformRange(e,t,n)}transformRowRange(e,t,n){return this.transformRange(e,t,n)}transformAddress(e,t){const n=this.sourceRange;if(e instanceof l){const r=e.toSimpleCellAddress(t);if(n.addressInRange(r))return e.shiftAbsoluteDimensions(this.toRight,this.toBottom)}return e.shiftRelativeDimensions(-this.toRight,-this.toBottom)}transformRange(e,t,n){const r=this.sourceRange;if(e instanceof l&&t instanceof l){const i=e.toSimpleCellAddress(n),s=t.toSimpleCellAddress(n);if(r.addressInRange(i)&&r.addressInRange(s))return[e.shiftAbsoluteDimensions(this.toRight,this.toBottom),t.shiftAbsoluteDimensions(this.toRight,this.toBottom)]}return[e.shiftRelativeDimensions(-this.toRight,-this.toBottom),t.shiftRelativeDimensions(-this.toRight,-this.toBottom)]}}class ks extends Ds{constructor(e,t,n,r){super(),this.sourceRange=e,this.toRight=t,this.toBottom=n,this.toSheet=r}get sheet(){return this.sourceRange.sheet}isIrreversible(){return!0}fixNodeAddress(e){return e}transformCellAddress(e,t){return!!this.shouldMove(e,t)&&e.moved(this.toSheet,this.toRight,this.toBottom)}transformCellRange(e,t,n){return this.transformRange(e,t,n)}transformColumnRange(e,t,n){return this.transformRange(e,t,n)}transformRowRange(e,t,n){return this.transformRange(e,t,n)}shouldMove(e,t){return e instanceof l?this.sourceRange.addressInRange(e.toSimpleCellAddress(t)):e instanceof a?this.sourceRange.rowInRange(e.toSimpleRowAddress(t))&&!this.sourceRange.isFinite():this.sourceRange.columnInRange(e.toSimpleColumnAddress(t))&&!this.sourceRange.isFinite()}transformRange(e,t,n){const r=this.transformCellAddress(e,n),i=this.transformCellAddress(t,n);return!(!r||!i)&&[r,i]}}
  598. /**
  599. * @license
  600. * Copyright (c) 2024 Handsoncode. All rights reserved.
  601. */class Vs extends Ds{constructor(e){super(),this.columnsSpan=e}get sheet(){return this.columnsSpan.sheet}isIrreversible(){return!0}transformRowRangeAst(e,t){return e}transformCellRange(e,t,n){return this.transformRange(e,t,n)}transformRowRange(e,t,n){throw Error("Not implemented")}transformColumnRange(e,t,n){return this.transformRange(e,t,n)}transformCellAddress(e,t){const n=yr(e,t);if(this.columnsSpan.sheet!==t.sheet&&this.columnsSpan.sheet!==n)return!1;if(this.columnsSpan.sheet!==t.sheet&&this.columnsSpan.sheet===n){const n=e.toSimpleColumnAddress(t);if(n.col<this.columnsSpan.columnStart)return!1;if(n.col>this.columnsSpan.columnEnd)return e.shiftedByColumns(-this.columnsSpan.numberOfColumns)}if(this.columnsSpan.sheet===t.sheet&&this.columnsSpan.sheet!==n){if(e.isColumnAbsolute())return!1;if(t.col<this.columnsSpan.columnStart)return!1;if(t.col>this.columnsSpan.columnEnd)return e.shiftedByColumns(this.columnsSpan.numberOfColumns)}if(this.columnsSpan.sheet===t.sheet&&this.columnsSpan.sheet===n)if(e.isColumnAbsolute()){if(e.col<this.columnsSpan.columnStart)return!1;if(e.col>this.columnsSpan.columnEnd)return e.shiftedByColumns(-this.columnsSpan.numberOfColumns)}else{const n=e.toSimpleColumnAddress(t);if(n.col<this.columnsSpan.columnStart){if(t.col<this.columnsSpan.columnStart)return!1;if(t.col>this.columnsSpan.columnEnd)return e.shiftedByColumns(this.columnsSpan.numberOfColumns)}else if(n.col>this.columnsSpan.columnEnd){if(t.col<this.columnsSpan.columnStart)return e.shiftedByColumns(-this.columnsSpan.numberOfColumns);if(t.col>this.columnsSpan.columnEnd)return!1}}return Wn.REF}fixNodeAddress(e){return this.columnsSpan.sheet===e.sheet&&this.columnsSpan.columnStart<=e.col?Object.assign(Object.assign({},e),{col:e.col-this.columnsSpan.numberOfColumns}):e}transformRange(e,t,n){const r=yr(e,n);let i=e,s=t;if(this.columnsSpan.sheet===r){const r=e.toSimpleColumnAddress(n),o=t.toSimpleColumnAddress(n);if(this.columnsSpan.columnStart<=r.col&&this.columnsSpan.columnEnd>=o.col)return Wn.REF;r.col>=this.columnsSpan.columnStart&&r.col<=this.columnsSpan.columnEnd&&(i=e.shiftedByColumns(this.columnsSpan.columnEnd-r.col+1)),o.col>=this.columnsSpan.columnStart&&o.col<=this.columnsSpan.columnEnd&&(s=t.shiftedByColumns(-(o.col-this.columnsSpan.columnStart+1)))}const o=this.transformCellAddress(i,n),a=this.transformCellAddress(s,n);if(!1===o&&!1===a)return[i,s];if(o===Wn.REF||a===Wn.REF)throw Error("Cannot happen");return[o||i,a||s]}}
  602. /**
  603. * @license
  604. * Copyright (c) 2024 Handsoncode. All rights reserved.
  605. */class Us extends Ds{constructor(e){super(),this.rowsSpan=e}get sheet(){return this.rowsSpan.sheet}isIrreversible(){return!0}transformColumnRangeAst(e,t){return e}transformCellAddress(e,t){const n=yr(e,t);if(this.rowsSpan.sheet!==t.sheet&&this.rowsSpan.sheet!==n)return!1;if(this.rowsSpan.sheet!==t.sheet&&this.rowsSpan.sheet===n){const n=e.toSimpleRowAddress(t);if(n.row<this.rowsSpan.rowStart)return!1;if(n.row>this.rowsSpan.rowEnd)return e.shiftedByRows(-this.rowsSpan.numberOfRows)}if(this.rowsSpan.sheet===t.sheet&&this.rowsSpan.sheet!==n){if(e.isRowAbsolute())return!1;if(t.row<this.rowsSpan.rowStart)return!1;if(t.row>this.rowsSpan.rowEnd)return e.shiftedByRows(this.rowsSpan.numberOfRows)}if(this.rowsSpan.sheet===t.sheet&&this.rowsSpan.sheet===n)if(e.isRowAbsolute()){if(e.row<this.rowsSpan.rowStart)return!1;if(e.row>this.rowsSpan.rowEnd)return e.shiftedByRows(-this.rowsSpan.numberOfRows)}else{const n=e.toSimpleRowAddress(t);if(n.row<this.rowsSpan.rowStart){if(t.row<this.rowsSpan.rowStart)return!1;if(t.row>this.rowsSpan.rowEnd)return e.shiftedByRows(this.rowsSpan.numberOfRows)}else if(n.row>this.rowsSpan.rowEnd){if(t.row<this.rowsSpan.rowStart)return e.shiftedByRows(-this.rowsSpan.numberOfRows);if(t.row>this.rowsSpan.rowEnd)return!1}}return Wn.REF}transformCellRange(e,t,n){return this.transformRange(e,t,n)}transformRowRange(e,t,n){return this.transformRange(e,t,n)}transformColumnRange(e,t,n){throw Error("Not implemented")}fixNodeAddress(e){return this.rowsSpan.sheet===e.sheet&&this.rowsSpan.rowStart<=e.row?Object.assign(Object.assign({},e),{row:e.row-this.rowsSpan.numberOfRows}):e}transformRange(e,t,n){const r=yr(e,n);let i=e,s=t;if(this.rowsSpan.sheet===r){const r=e.toSimpleRowAddress(n),o=t.toSimpleRowAddress(n);if(this.rowsSpan.rowStart<=r.row&&this.rowsSpan.rowEnd>=o.row)return Wn.REF;r.row>=this.rowsSpan.rowStart&&r.row<=this.rowsSpan.rowEnd&&(i=e.shiftedByRows(this.rowsSpan.rowEnd-r.row+1)),o.row>=this.rowsSpan.rowStart&&o.row<=this.rowsSpan.rowEnd&&(s=t.shiftedByRows(-(o.row-this.rowsSpan.rowStart+1)))}const o=this.transformCellAddress(i,n),a=this.transformCellAddress(s,n);return!1===o&&!1===a?[i,s]:o===Wn.REF||a===Wn.REF?Wn.REF:[o||i,a||s]}}
  606. /**
  607. * @license
  608. * Copyright (c) 2024 Handsoncode. All rights reserved.
  609. */class Ws extends Ds{constructor(e){super(),this.sheet=e}isIrreversible(){return!0}performEagerTransformations(e,t){for(const n of e.arrayFormulaNodes()){const[t]=this.transformSingleAst(n.getFormula(e.lazilyTransformingAstService),n.getAddress(e.lazilyTransformingAstService));n.setFormula(t)}}fixNodeAddress(e){return e}transformCellAddress(e,t){return this.transformAddress(e)}transformCellRange(e,t,n){return this.transformAddress(e)}transformColumnRange(e,t,n){return this.transformAddress(e)}transformRowRange(e,t,n){return this.transformAddress(e)}transformAddress(e){return e.sheet===this.sheet&&Wn.REF}}
  610. /**
  611. * @license
  612. * Copyright (c) 2024 Handsoncode. All rights reserved.
  613. */function Xs(e){if(!Array.isArray(e))throw new Gt("an array of arrays.");for(let t=0;t<e.length;t++)if(!Array.isArray(e[t]))throw new Gt("an array of arrays.")}function js(e){let t=0,n=0,r=0;for(let s=0;s<e.length;s++){let i=0;for(let t=0;t<e[s].length;t++){const n=e[s][t];void 0!==n&&null!==n&&(i=t+1,++r)}t=Math.max(t,i),i>0&&(n=s+1)}const i=t*n;return{height:n,width:t,fill:0===i?0:r/i}}
  614. /**
  615. * @license
  616. * Copyright (c) 2024 Handsoncode. All rights reserved.
  617. */class Zs{constructor(e,t){this.sheet=e,this.indexes=t}normalizedIndexes(){return Js(this.indexes)}rowsSpans(){return this.normalizedIndexes().map(e=>Ht.fromNumberOfRows(this.sheet,e[0],e[1]))}}class Qs{constructor(e,t){this.sheet=e,this.indexes=t}normalizedIndexes(){return zs(this.indexes)}rowsSpans(){return this.normalizedIndexes().map(e=>Ht.fromNumberOfRows(this.sheet,e[0],e[1]))}}class Ks{constructor(e,t){this.sheet=e,this.indexes=t}normalizedIndexes(){return zs(this.indexes)}columnsSpans(){return this.normalizedIndexes().map(e=>kt.fromNumberOfColumns(this.sheet,e[0],e[1]))}}class Gs{constructor(e,t){this.sheet=e,this.indexes=t}normalizedIndexes(){return Js(this.indexes)}columnsSpans(){return this.normalizedIndexes().map(e=>kt.fromNumberOfColumns(this.sheet,e[0],e[1]))}}class Bs{constructor(e,t,n,r,i,s,o,a,l){this.dependencyGraph=t,this.columnSearch=n,this.cellContentParser=r,this.parser=i,this.stats=s,this.lazilyTransformingAstService=o,this.namedExpressions=a,this.arraySizePredictor=l,this.changes=Yt.empty(),this.allocateNamedExpressionAddressSpace(),this.maxColumns=e.maxColumns,this.maxRows=e.maxRows}get sheetMapping(){return this.dependencyGraph.sheetMapping}get addressMapping(){return this.dependencyGraph.addressMapping}removeRows(e){const t=[];for(const n of e.rowsSpans()){const e=this.doRemoveRows(n);e&&t.push(e)}return t}addRows(e){for(const t of e.rowsSpans())this.doAddRows(t)}addColumns(e){for(const t of e.columnsSpans())this.doAddColumns(t)}removeColumns(e){const t=[];for(const n of e.columnsSpans()){const e=this.doRemoveColumns(n);e&&t.push(e)}return t}removeSheet(e){this.dependencyGraph.removeSheet(e);let t=0;this.stats.measure(Pt.TRANSFORM_ASTS,()=>{const n=new Ws(e);n.performEagerTransformations(this.dependencyGraph,this.parser),t=this.lazilyTransformingAstService.addTransformation(n)}),this.sheetMapping.removeSheet(e),this.columnSearch.removeSheet(e);const n=this.namedExpressions.getAllNamedExpressionsForScope(e).map(t=>this.removeNamedExpression(t.normalizeExpressionName(),e));return{version:t,scopedNamedExpressions:n}}removeSheetByName(e){const t=this.sheetMapping.fetch(e);return this.removeSheet(t)}clearSheet(e){this.dependencyGraph.clearSheet(e),this.columnSearch.removeSheet(e)}addSheet(e){const t=this.sheetMapping.addSheet(e),n=[];return this.dependencyGraph.addressMapping.autoAddSheet(t,js(n)),this.sheetMapping.fetchDisplayName(t)}renameSheet(e,t){return this.sheetMapping.renameSheet(e,t)}moveRows(e,t,n,r){const i=Ht.fromNumberOfRows(e,r,n);this.lazilyTransformingAstService.beginCombinedMode(e),this.doAddRows(i),r<t&&(t+=n);const s=mr(e,0,t),o=mr(e,0,r);this.moveCells(s,Number.POSITIVE_INFINITY,n,o);const a=Ht.fromNumberOfRows(e,t,n);return this.doRemoveRows(a),this.lazilyTransformingAstService.commitCombinedMode()}moveColumns(e,t,n,r){const i=kt.fromNumberOfColumns(e,r,n);this.lazilyTransformingAstService.beginCombinedMode(e),this.doAddColumns(i),r<t&&(t+=n);const s=mr(e,t,0),o=mr(e,r,0);this.moveCells(s,n,Number.POSITIVE_INFINITY,o);const a=kt.fromNumberOfColumns(e,t,n);return this.doRemoveColumns(a),this.lazilyTransformingAstService.commitCombinedMode()}moveCells(e,t,n,r){this.ensureItIsPossibleToMoveCells(e,t,n,r);const i=Tr.spanFrom(e,t,n),s=Tr.spanFrom(r,t,n),o=r.col-e.col,a=r.row-e.row,l=r.sheet,c=this.getRangeClipboardCells(s),u=this.dependencyGraph.rawValuesFromRange(s);this.columnSearch.removeValues(u);const h=this.dependencyGraph.rawValuesFromRange(i);this.columnSearch.moveValues(h,o,a,l);let d=0;this.stats.measure(Pt.TRANSFORM_ASTS,()=>{const e=new Hs(i,o,a,l);e.performEagerTransformations(this.dependencyGraph,this.parser),d=this.lazilyTransformingAstService.addTransformation(e)}),this.dependencyGraph.moveCells(i,o,a,l);const m=this.updateNamedExpressionsForMovedCells(e,t,n,r);return{version:d,overwrittenCellsData:c,addedGlobalNamedExpressions:m}}setRowOrder(e,t){const n=[];let r=[];for(const[i,s]of t)if(i!==s){const t=Tr.spanFrom({sheet:e,col:0,row:i},1/0,1),o=this.getRangeClipboardCells(t);r=r.concat(o),n.push(o.map(([{sheet:e,col:t},n])=>[{sheet:e,col:t,row:s},n]))}return n.forEach(t=>this.restoreClipboardCells(e,t.values())),r}setColumnOrder(e,t){const n=[];let r=[];for(const[i,s]of t)if(i!==s){const t=Tr.spanFrom({sheet:e,col:i,row:0},1,1/0),o=this.getRangeClipboardCells(t);r=r.concat(o),n.push(o.map(([{sheet:e,col:t,row:n},r])=>[{sheet:e,col:s,row:n},r]))}return n.forEach(t=>this.restoreClipboardCells(e,t.values())),r}addNamedExpression(e,t,n,r){const i=this.namedExpressions.addNamedExpression(e,n,r);this.storeNamedExpressionInCell(i.address,t),this.adjustNamedExpressionEdges(i,e,n)}restoreNamedExpression(e,t,n){const r=e.displayName;this.restoreCell(e.address,t);const i=this.namedExpressions.restoreNamedExpression(e,n);this.adjustNamedExpressionEdges(i,r,n)}changeNamedExpressionExpression(e,t,n,r){const i=this.namedExpressions.namedExpressionForScope(e,n);if(!i)throw new $t(e);const s=i.copy();i.options=r;const o=this.getClipboardCell(i.address);return this.storeNamedExpressionInCell(i.address,t),[s,o]}removeNamedExpression(e,t){const n=this.namedExpressions.namedExpressionForScope(e,t);if(!n)throw new $t(e);this.namedExpressions.remove(n.displayName,t);const r=this.getClipboardCell(n.address);if(void 0!==t){const t=this.namedExpressions.workbookNamedExpressionOrPlaceholder(e);this.dependencyGraph.exchangeNode(n.address,t.address)}else this.dependencyGraph.setCellEmpty(n.address);return[n,r]}ensureItIsPossibleToMoveCells(e,t,n,r){if(gr(e)||!($s(t)&&$s(n)||qs(e,t,n))||gr(r)||!this.sheetMapping.hasSheetWithId(e.sheet)||!this.sheetMapping.hasSheetWithId(r.sheet))throw new Gt("a valid range of cells to move.");const i=Tr.spanFrom(e,t,n),s=Tr.spanFrom(r,t,n);if(s.exceedsSheetSizeLimits(this.maxColumns,this.maxRows))throw new Zt;if(this.dependencyGraph.arrayMapping.isFormulaArrayInRange(i))throw new Rn;if(this.dependencyGraph.arrayMapping.isFormulaArrayInRange(s))throw new yn}restoreClipboardCells(e,t){const n=[];for(const[r,i]of t)if(this.restoreCell(r,i),i.type===ws.FORMULA){const{dependencies:t}=this.parser.fetchCachedResult(i.hash);n.push(...this.updateNamedExpressionsForTargetAddress(e,r,t))}return n}restoreCell(e,t){switch(t.type){case ws.VALUE:this.setValueToCell(t,e);break;case ws.FORMULA:this.setFormulaToCellFromCache(t.hash,e);break;case ws.EMPTY:this.setCellEmpty(e);break;case ws.PARSING_ERROR:this.setParsingErrorToCell(t.rawInput,t.errors,e);break}}getOldContent(e){const t=this.dependencyGraph.getCell(e);if(void 0===t||t instanceof Gn)return[e,{type:ws.EMPTY}];if(t instanceof Bn)return[e,Object.assign({type:ws.VALUE},t.getValues())];if(t instanceof En)return[t.getAddress(this.lazilyTransformingAstService),{type:ws.FORMULA,hash:this.parser.computeHashFromAst(t.getFormula(this.lazilyTransformingAstService))}];if(t instanceof Jn)return[e,{type:ws.PARSING_ERROR,rawInput:t.rawInput,errors:t.errors}];throw Error("Trying to copy unsupported type")}getClipboardCell(e){const t=this.dependencyGraph.getCell(e);if(void 0===t||t instanceof Gn)return{type:ws.EMPTY};if(t instanceof Bn)return Object.assign({type:ws.VALUE},t.getValues());if(t instanceof Cn){const n=t.getArrayCellValue(e);return n===bt?{type:ws.EMPTY}:{type:ws.VALUE,parsedValue:n,rawValue:t.getArrayCellRawValue(e)}}if(t instanceof Ln)return{type:ws.FORMULA,hash:this.parser.computeHashFromAst(t.getFormula(this.lazilyTransformingAstService))};if(t instanceof Jn)return{type:ws.PARSING_ERROR,rawInput:t.rawInput,errors:t.errors};throw Error("Trying to copy unsupported type")}getSheetClipboardCells(e){const t=this.dependencyGraph.getSheetHeight(e),n=this.dependencyGraph.getSheetWidth(e),r=new Array(t);for(let i=0;i<t;i++){r[i]=new Array(n);for(let t=0;t<n;t++){const n=mr(e,t,i);r[i][t]=this.getClipboardCell(n)}}return r}getRangeClipboardCells(e){const t=[];for(const n of e.addresses(this.dependencyGraph))t.push([n,this.getClipboardCell(n)]);return t}setCellContent(e,t){const n=this.cellContentParser.parse(t),r=this.getOldContent(e);if(n instanceof Ss.Formula){const t=this.parser.parse(n.formula,e),{ast:r,errors:s}=t;if(s.length>0)this.setParsingErrorToCell(n.formula,s,e);else try{const n=this.arraySizePredictor.checkArraySize(r,e);if(n.width<=0||n.height<=0)throw Error("Incorrect array size");this.setFormulaToCell(e,n,t)}catch(i){if(!i.message)throw i;const t={type:X.InvalidRangeSize,message:"Invalid range size."};this.setParsingErrorToCell(n.formula,[t],e)}}else n instanceof Ss.Empty?this.setCellEmpty(e):this.setValueToCell({parsedValue:n.value,rawValue:t},e);return r}setSheetContent(e,t){this.clearSheet(e);for(let n=0;n<t.length;n++)for(let r=0;r<t[n].length;r++){const i=mr(e,r,n);this.setCellContent(i,t[n][r])}}setParsingErrorToCell(e,t,n){const r=this.dependencyGraph.getCellValue(n),i=new Jn(t,e),s=this.dependencyGraph.setParsingErrorToCell(n,i);this.columnSearch.remove(wt(r),n),this.columnSearch.applyChanges(s.getChanges()),this.changes.addAll(s),this.changes.addChange(i.getCellValue(),n)}setFormulaToCell(e,t,{ast:n,hasVolatileFunction:r,hasStructuralChangeFunction:i,dependencies:s}){const o=this.dependencyGraph.getCellValue(e),a=this.dependencyGraph.setFormulaToCell(e,n,Mt(s,e),t,r,i);this.columnSearch.remove(wt(o),e),this.columnSearch.applyChanges(a.getChanges()),this.changes.addAll(a)}setValueToCell(e,t){const n=this.dependencyGraph.getCellValue(t),r=this.dependencyGraph.setValueToCell(t,e);this.columnSearch.change(wt(n),wt(e.parsedValue),t),this.columnSearch.applyChanges(r.getChanges().filter(e=>!Mr(e.address,t))),this.changes.addAll(r),this.changes.addChange(e.parsedValue,t)}setCellEmpty(e){if(this.dependencyGraph.isArrayInternalCell(e))return;const t=this.dependencyGraph.getCellValue(e),n=this.dependencyGraph.setCellEmpty(e);this.columnSearch.remove(wt(t),e),this.columnSearch.applyChanges(n.getChanges()),this.changes.addAll(n),this.changes.addChange(bt,e)}setFormulaToCellFromCache(e,t){const{ast:n,hasVolatileFunction:r,hasStructuralChangeFunction:i,dependencies:s}=this.parser.fetchCachedResult(e),o=Mt(s,t),[a]=new Ys(t.sheet).transformSingleAst(n,t);this.parser.rememberNewAst(a);const l=St(o),c=this.arraySizePredictor.checkArraySize(n,t);this.dependencyGraph.setFormulaToCell(t,a,l,c,r,i)}rowEffectivelyNotInSheet(e,t){const n=this.dependencyGraph.addressMapping.getHeight(t);return e>=n}getAndClearContentChanges(){const e=this.changes;return this.changes=Yt.empty(),e}forceApplyPostponedTransformations(){this.dependencyGraph.forceApplyPostponedTransformations()}doRemoveRows(e){if(this.rowEffectivelyNotInSheet(e.rowStart,e.sheet))return;const t=[];for(const[s]of this.dependencyGraph.entriesFromRowsSpan(e))t.push({address:s,cellType:this.getClipboardCell(s)});const{affectedArrays:n,contentChanges:r}=this.dependencyGraph.removeRows(e);this.columnSearch.applyChanges(r.getChanges());let i=0;return this.stats.measure(Pt.TRANSFORM_ASTS,()=>{const t=new Us(e);t.performEagerTransformations(this.dependencyGraph,this.parser),i=this.lazilyTransformingAstService.addTransformation(t)}),this.rewriteAffectedArrays(n),{version:i,removedCells:t,rowFrom:e.rowStart,rowCount:e.numberOfRows}}doRemoveColumns(e){if(this.columnEffectivelyNotInSheet(e.columnStart,e.sheet))return;const t=[];for(const[s]of this.dependencyGraph.entriesFromColumnsSpan(e))t.push({address:s,cellType:this.getClipboardCell(s)});const{affectedArrays:n,contentChanges:r}=this.dependencyGraph.removeColumns(e);this.columnSearch.applyChanges(r.getChanges()),this.columnSearch.removeColumns(e);let i=0;return this.stats.measure(Pt.TRANSFORM_ASTS,()=>{const t=new Vs(e);t.performEagerTransformations(this.dependencyGraph,this.parser),i=this.lazilyTransformingAstService.addTransformation(t)}),this.rewriteAffectedArrays(n),{version:i,removedCells:t,columnFrom:e.columnStart,columnCount:e.numberOfColumns}}doAddRows(e){if(this.rowEffectivelyNotInSheet(e.rowStart,e.sheet))return;const{affectedArrays:t}=this.dependencyGraph.addRows(e);this.stats.measure(Pt.TRANSFORM_ASTS,()=>{const t=new Fs(e);t.performEagerTransformations(this.dependencyGraph,this.parser),this.lazilyTransformingAstService.addTransformation(t)}),this.rewriteAffectedArrays(t)}rewriteAffectedArrays(e){for(const t of e.values()){if(t.array.size.isRef)continue;const e=t.getFormula(this.lazilyTransformingAstService),n=t.getAddress(this.lazilyTransformingAstService),r=this.parser.computeHashFromAst(e);this.setFormulaToCellFromCache(r,n)}}doAddColumns(e){if(this.columnEffectivelyNotInSheet(e.columnStart,e.sheet))return;const{affectedArrays:t,contentChanges:n}=this.dependencyGraph.addColumns(e);this.columnSearch.addColumns(e),this.columnSearch.applyChanges(n.getChanges()),this.stats.measure(Pt.TRANSFORM_ASTS,()=>{const t=new As(e);t.performEagerTransformations(this.dependencyGraph,this.parser),this.lazilyTransformingAstService.addTransformation(t)}),this.rewriteAffectedArrays(t)}columnEffectivelyNotInSheet(e,t){const n=this.dependencyGraph.addressMapping.getWidth(t);return e>=n}adjustNamedExpressionEdges(e,t,n){if(void 0===n)return;const{vertex:r,id:i}=this.dependencyGraph.fetchCellOrCreateEmpty(e.address),s=null!==i&&void 0!==i?i:this.dependencyGraph.graph.getNodeId(r),o=this.namedExpressions.workbookNamedExpressionOrPlaceholder(t),{vertex:a,id:l}=this.dependencyGraph.fetchCellOrCreateEmpty(o.address),c=null!==l&&void 0!==l?l:this.dependencyGraph.graph.getNodeId(a);for(const u of this.dependencyGraph.graph.adjacentNodes(a))if(u instanceof Ln&&u.getAddress(this.lazilyTransformingAstService).sheet===n){const t=u.getFormula(this.lazilyTransformingAstService),n=u.getAddress(this.lazilyTransformingAstService),{dependencies:r}=this.parser.fetchCachedResultForAst(t);for(const i of Mt(r,n))i instanceof yt&&i.name.toLowerCase()===e.displayName.toLowerCase()&&(this.dependencyGraph.graph.removeEdge(c,u),this.dependencyGraph.graph.addEdge(s,u))}}storeNamedExpressionInCell(e,t){const n=this.cellContentParser.parse(t);if(n instanceof Ss.Formula){const t=this.parser.parse(n.formula,mr(-1,0,0));if(xs(t.ast))throw new Mn;const{ast:r,hasVolatileFunction:i,hasStructuralChangeFunction:s,dependencies:o}=t;this.dependencyGraph.setFormulaToCell(e,r,Mt(o,e),ei.scalar(),i,s)}else n instanceof Ss.Empty?this.setCellEmpty(e):this.setValueToCell({parsedValue:n.value,rawValue:t},e)}updateNamedExpressionsForMovedCells(e,t,n,r){if(e.sheet===r.sheet)return[];const i=[],s=Tr.spanFrom(r,t,n);for(const o of s.addresses(this.dependencyGraph)){const t=this.addressMapping.fetchCell(o);if(t instanceof Ln&&o.sheet!==e.sheet){const n=t.getFormula(this.lazilyTransformingAstService),{dependencies:r}=this.parser.fetchCachedResultForAst(n);i.push(...this.updateNamedExpressionsForTargetAddress(e.sheet,o,r))}}return i}updateNamedExpressionsForTargetAddress(e,t,n){if(e===t.sheet)return[];const r=[],i=this.addressMapping.fetchCell(t);for(const s of Mt(n,t)){if(!(s instanceof yt))continue;const n=s.name,o=this.dependencyGraph.fetchNamedExpressionVertex(n,e).vertex,a=this.namedExpressions.isExpressionInScope(n,t.sheet),l=a?this.dependencyGraph.fetchNamedExpressionVertex(n,t.sheet).vertex:this.copyOrFetchGlobalNamedExpressionVertex(n,o,r);l!==o&&(this.dependencyGraph.graph.removeEdgeIfExists(o,i),this.dependencyGraph.graph.addEdge(l,i))}return r}allocateNamedExpressionAddressSpace(){this.dependencyGraph.addressMapping.addSheet(Ps.SHEET_FOR_WORKBOOK_EXPRESSIONS,new zn(0,0))}copyOrFetchGlobalNamedExpressionVertex(e,t,n){let r=this.namedExpressions.namedExpressionForScope(e);if(void 0===r)if(r=this.namedExpressions.addNamedExpression(e),n.push(r.normalizeExpressionName()),t instanceof Ln){const e=this.parser.fetchCachedResultForAst(t.getFormula(this.lazilyTransformingAstService)),{ast:n,hasVolatileFunction:i,hasStructuralChangeFunction:s,dependencies:o}=e;this.dependencyGraph.setFormulaToCell(r.address,n,Mt(o,r.address),ei.scalar(),i,s)}else t instanceof Gn?this.setCellEmpty(r.address):t instanceof Bn&&this.setValueToCell(t.getValues(),r.address);return this.dependencyGraph.fetchCellOrCreateEmpty(r.address).vertex}}function Js(e){if(e.length<=1)return e;const t=[...e].sort(([e],[t])=>e-t),n=t.reduce((e,[t,n])=>{const r=e[e.length-1],i=r[0]+r[1];return t<=i?r[1]+=Math.max(0,n-(i-t)):e.push([t,n]),e},[t[0]]);let r=0;for(let i=0;i<n.length;++i)n[i][0]-=r,r+=n[i][1];return n}function zs(e){if(e.length<=1)return e;const t=[...e].sort(([e],[t])=>e-t),n=t.reduce((e,[t,n])=>{const r=e[e.length-1];return t===r[0]?r[1]=Math.max(r[1],n):e.push([t,n]),e},[t[0]]);let r=0;for(let i=0;i<n.length;++i)n[i][0]+=r,r+=n[i][1];return n}function $s(e){return Number.isInteger(e)&&e>0}function qs(e,t,n){return 0===e.row&&$s(t)&&n===Number.POSITIVE_INFINITY||0===e.col&&$s(n)&&t===Number.POSITIVE_INFINITY}
  618. /**
  619. * @license
  620. * Copyright (c) 2024 Handsoncode. All rights reserved.
  621. */class eo{}class to extends eo{constructor(e,t){super(),this.command=e,this.rowsRemovals=t}doUndo(e){e.undoRemoveRows(this)}doRedo(e){e.redoRemoveRows(this)}}class no extends eo{constructor(e,t,n,r,i,s,o){super(),this.sourceLeftCorner=e,this.width=t,this.height=n,this.destinationLeftCorner=r,this.overwrittenCellsData=i,this.addedGlobalNamedExpressions=s,this.version=o}doUndo(e){e.undoMoveCells(this)}doRedo(e){e.redoMoveCells(this)}}class ro extends eo{constructor(e){super(),this.command=e}doUndo(e){e.undoAddRows(this)}doRedo(e){e.redoAddRows(this)}}class io extends eo{constructor(e,t,n){super(),this.sheetId=e,this.rowMapping=t,this.oldContent=n}doUndo(e){e.undoSetRowOrder(this)}doRedo(e){e.redoSetRowOrder(this)}}class so extends eo{constructor(e,t,n){super(),this.sheetId=e,this.columnMapping=t,this.oldContent=n}doUndo(e){e.undoSetColumnOrder(this)}doRedo(e){e.redoSetColumnOrder(this)}}class oo extends eo{constructor(e,t,n){super(),this.sheetId=e,this.oldSheetContent=t,this.newSheetContent=n}doUndo(e){e.undoSetSheetContent(this)}doRedo(e){e.redoSetSheetContent(this)}}class ao extends eo{constructor(e,t,n,r,i){super(),this.sheet=e,this.startRow=t,this.numberOfRows=n,this.targetRow=r,this.version=i,this.undoStart=this.startRow<this.targetRow?this.targetRow-this.numberOfRows:this.targetRow,this.undoEnd=this.startRow>this.targetRow?this.startRow+this.numberOfRows:this.startRow}doUndo(e){e.undoMoveRows(this)}doRedo(e){e.redoMoveRows(this)}}class lo extends eo{constructor(e,t,n,r,i){super(),this.sheet=e,this.startColumn=t,this.numberOfColumns=n,this.targetColumn=r,this.version=i,this.undoStart=this.startColumn<this.targetColumn?this.targetColumn-this.numberOfColumns:this.targetColumn,this.undoEnd=this.startColumn>this.targetColumn?this.startColumn+this.numberOfColumns:this.startColumn}doUndo(e){e.undoMoveColumns(this)}doRedo(e){e.redoMoveColumns(this)}}class co extends eo{constructor(e){super(),this.command=e}doUndo(e){e.undoAddColumns(this)}doRedo(e){e.redoAddColumns(this)}}class uo extends eo{constructor(e,t){super(),this.command=e,this.columnsRemovals=t}doUndo(e){e.undoRemoveColumns(this)}doRedo(e){e.redoRemoveColumns(this)}}class ho extends eo{constructor(e){super(),this.sheetName=e}doUndo(e){e.undoAddSheet(this)}doRedo(e){e.redoAddSheet(this)}}class mo extends eo{constructor(e,t,n,r,i){super(),this.sheetName=e,this.sheetId=t,this.oldSheetContent=n,this.scopedNamedExpressions=r,this.version=i}doUndo(e){e.undoRemoveSheet(this)}doRedo(e){e.redoRemoveSheet(this)}}class go extends eo{constructor(e,t,n){super(),this.sheetId=e,this.oldName=t,this.newName=n}doUndo(e){e.undoRenameSheet(this)}doRedo(e){e.redoRenameSheet(this)}}class po extends eo{constructor(e,t){super(),this.sheetId=e,this.oldSheetContent=t}doUndo(e){e.undoClearSheet(this)}doRedo(e){e.redoClearSheet(this)}}class fo extends eo{constructor(e){super(),this.cellContents=e}doUndo(e){e.undoSetCellContents(this)}doRedo(e){e.redoSetCellContents(this)}}class Ro extends eo{constructor(e,t,n,r){super(),this.targetLeftCorner=e,this.oldContent=t,this.newContent=n,this.addedGlobalNamedExpressions=r}doUndo(e){e.undoPaste(this)}doRedo(e){e.redoPaste(this)}}class yo extends eo{constructor(e,t,n,r){super(),this.name=e,this.newContent=t,this.scope=n,this.options=r}doUndo(e){e.undoAddNamedExpression(this)}doRedo(e){e.redoAddNamedExpression(this)}}class Mo extends eo{constructor(e,t,n){super(),this.namedExpression=e,this.content=t,this.scope=n}doUndo(e){e.undoRemoveNamedExpression(this)}doRedo(e){e.redoRemoveNamedExpression(this)}}class So extends eo{constructor(e,t,n,r,i){super(),this.namedExpression=e,this.newContent=t,this.oldContent=n,this.scope=r,this.options=i}doUndo(e){e.undoChangeNamedExpression(this)}doRedo(e){e.redoChangeNamedExpression(this)}}class bo extends eo{constructor(){super(...arguments),this.operations=[]}add(e){this.operations.push(e)}*reversedOperations(){for(let e=this.operations.length-1;e>=0;e--)yield this.operations[e]}doUndo(e){e.undoBatch(this)}doRedo(e){e.redoBatch(this)}}class wo{constructor(e,t){this.operations=t,this.oldData=new Map,this.undoStack=[],this.redoStack=[],this.undoLimit=e.undoLimit}saveOperation(e){void 0!==this.batchUndoEntry?this.batchUndoEntry.add(e):this.addUndoEntry(e)}beginBatchMode(){this.batchUndoEntry=new bo}commitBatchMode(){if(void 0===this.batchUndoEntry)throw Error("Batch mode wasn't started");this.addUndoEntry(this.batchUndoEntry),this.batchUndoEntry=void 0}storeDataForVersion(e,t,n){this.oldData.has(e)||this.oldData.set(e,[]);const r=this.oldData.get(e);r.push([t,n])}clearRedoStack(){this.redoStack=[]}clearUndoStack(){this.undoStack=[]}isUndoStackEmpty(){return 0===this.undoStack.length}isRedoStackEmpty(){return 0===this.redoStack.length}undo(){const e=this.undoStack.pop();if(!e)throw Error("Attempted to undo without operation on stack");this.undoEntry(e),this.redoStack.push(e)}undoBatch(e){for(const t of e.reversedOperations())this.undoEntry(t)}undoRemoveRows(e){this.operations.forceApplyPostponedTransformations();const{command:{sheet:t},rowsRemovals:n}=e;for(let r=n.length-1;r>=0;--r){const e=n[r];this.operations.addRows(new Qs(t,[[e.rowFrom,e.rowCount]]));for(const{address:t,cellType:n}of e.removedCells)this.operations.restoreCell(t,n);this.restoreOldDataFromVersion(e.version-1)}}undoRemoveColumns(e){this.operations.forceApplyPostponedTransformations();const{command:{sheet:t},columnsRemovals:n}=e;for(let r=n.length-1;r>=0;--r){const e=n[r];this.operations.addColumns(new Ks(t,[[e.columnFrom,e.columnCount]]));for(const{address:t,cellType:n}of e.removedCells)this.operations.restoreCell(t,n);this.restoreOldDataFromVersion(e.version-1)}}undoAddRows(e){const t=e.command.rowsSpans();for(let n=t.length-1;n>=0;--n){const r=t[n];this.operations.removeRows(new Zs(e.command.sheet,[[r.rowStart,r.numberOfRows]]))}}undoAddColumns(e){const t=e.command.columnsSpans();for(let n=t.length-1;n>=0;--n){const r=t[n];this.operations.removeColumns(new Gs(e.command.sheet,[[r.columnStart,r.numberOfColumns]]))}}undoSetCellContents(e){for(const t of e.cellContents){const e=t.address,[n,r]=t.oldContent;Mr(e,n)||this.operations.setCellEmpty(e),this.operations.restoreCell(n,r)}}undoPaste(e){this.restoreOperationOldContent(e.oldContent);for(const t of e.addedGlobalNamedExpressions)this.operations.removeNamedExpression(t)}undoMoveRows(e){const{sheet:t}=e;this.operations.moveRows(t,e.undoStart,e.numberOfRows,e.undoEnd),this.restoreOldDataFromVersion(e.version-1)}undoMoveColumns(e){const{sheet:t}=e;this.operations.moveColumns(t,e.undoStart,e.numberOfColumns,e.undoEnd),this.restoreOldDataFromVersion(e.version-1)}undoMoveCells(e){this.operations.forceApplyPostponedTransformations(),this.operations.moveCells(e.destinationLeftCorner,e.width,e.height,e.sourceLeftCorner),this.restoreOperationOldContent(e.overwrittenCellsData),this.restoreOldDataFromVersion(e.version-1);for(const t of e.addedGlobalNamedExpressions)this.operations.removeNamedExpression(t)}undoAddSheet(e){const{sheetName:t}=e;this.operations.removeSheetByName(t)}undoRemoveSheet(e){this.operations.forceApplyPostponedTransformations();const{oldSheetContent:t,sheetId:n}=e;this.operations.addSheet(e.sheetName);for(let r=0;r<t.length;r++){const e=t[r];for(let t=0;t<e.length;t++){const i=e[t],s=mr(n,t,r);this.operations.restoreCell(s,i)}}for(const[r,i]of e.scopedNamedExpressions)this.operations.restoreNamedExpression(r,i,n);this.restoreOldDataFromVersion(e.version-1)}undoRenameSheet(e){this.operations.renameSheet(e.sheetId,e.oldName)}undoClearSheet(e){const{oldSheetContent:t,sheetId:n}=e;for(let r=0;r<t.length;r++){const e=t[r];for(let t=0;t<e.length;t++){const i=e[t],s=mr(n,t,r);this.operations.restoreCell(s,i)}}}undoSetSheetContent(e){const{oldSheetContent:t,sheetId:n}=e;this.operations.clearSheet(n);for(let r=0;r<t.length;r++){const e=t[r];for(let t=0;t<e.length;t++){const i=e[t],s=mr(n,t,r);this.operations.restoreCell(s,i)}}}undoAddNamedExpression(e){this.operations.removeNamedExpression(e.name,e.scope)}undoRemoveNamedExpression(e){this.operations.restoreNamedExpression(e.namedExpression,e.content,e.scope)}undoChangeNamedExpression(e){this.operations.restoreNamedExpression(e.namedExpression,e.oldContent,e.scope)}undoSetRowOrder(e){this.restoreOperationOldContent(e.oldContent)}undoSetColumnOrder(e){this.restoreOperationOldContent(e.oldContent)}redo(){const e=this.redoStack.pop();if(!e)throw Error("Attempted to redo without operation on stack");this.redoEntry(e),this.undoStack.push(e)}redoBatch(e){for(const t of e.operations)this.redoEntry(t)}redoRemoveRows(e){this.operations.removeRows(e.command)}redoMoveCells(e){this.operations.moveCells(e.sourceLeftCorner,e.width,e.height,e.destinationLeftCorner)}redoRemoveColumns(e){this.operations.removeColumns(e.command)}redoPaste(e){const{targetLeftCorner:t,newContent:n}=e,r=n.length,i=n[0].length;for(let s=0;s<r;++s)for(let e=0;e<i;++e){const r=mr(t.sheet,t.col+e,t.row+s);this.operations.restoreCell(r,n[s][e])}}redoSetCellContents(e){for(const t of e.cellContents)this.operations.setCellContent(t.address,t.newContent)}redoAddRows(e){this.operations.addRows(e.command)}redoAddColumns(e){this.operations.addColumns(e.command)}redoRemoveSheet(e){this.operations.removeSheetByName(e.sheetName)}redoAddSheet(e){this.operations.addSheet(e.sheetName)}redoRenameSheet(e){this.operations.renameSheet(e.sheetId,e.newName)}redoMoveRows(e){this.operations.moveRows(e.sheet,e.startRow,e.numberOfRows,e.targetRow)}redoMoveColumns(e){this.operations.moveColumns(e.sheet,e.startColumn,e.numberOfColumns,e.targetColumn)}redoClearSheet(e){this.operations.clearSheet(e.sheetId)}redoSetSheetContent(e){const{sheetId:t,newSheetContent:n}=e;this.operations.setSheetContent(t,n)}redoAddNamedExpression(e){this.operations.addNamedExpression(e.name,e.newContent,e.scope,e.options)}redoRemoveNamedExpression(e){this.operations.removeNamedExpression(e.namedExpression.displayName,e.scope)}redoChangeNamedExpression(e){this.operations.changeNamedExpressionExpression(e.namedExpression.displayName,e.newContent,e.scope,e.options)}redoSetRowOrder(e){this.operations.setRowOrder(e.sheetId,e.rowMapping)}redoSetColumnOrder(e){this.operations.setColumnOrder(e.sheetId,e.columnMapping)}addUndoEntry(e){this.undoStack.push(e),this.undoStack.splice(0,Math.max(0,this.undoStack.length-this.undoLimit))}undoEntry(e){e.doUndo(this)}restoreOperationOldContent(e){for(const[t,n]of e)this.operations.restoreCell(t,n)}redoEntry(e){e.doRedo(this)}restoreOldDataFromVersion(e){const t=this.oldData.get(e)||[];for(const n of t){const[e,t]=n;this.operations.setFormulaToCellFromCache(t,e)}}}
  622. /**
  623. * @license
  624. * Copyright (c) 2024 Handsoncode. All rights reserved.
  625. */class To{constructor(e,t,n,r,i,s,o,a,l,c){this.operations=t,this.undoRedo=n,this.clipboardOperations=r,this.dependencyGraph=i,this.columnSearch=s,this.parser=o,this.cellContentParser=a,this.lazilyTransformingAstService=l,this.namedExpressions=c,this.maxRows=e.maxRows,this.maxColumns=e.maxColumns}get sheetMapping(){return this.dependencyGraph.sheetMapping}addRows(e,...t){const n=new Qs(e,t);this.ensureItIsPossibleToAddRows(e,...t),this.undoRedo.clearRedoStack(),this.clipboardOperations.abortCut(),this.operations.addRows(n),this.undoRedo.saveOperation(new ro(n))}removeRows(e,...t){const n=new Zs(e,t);this.ensureItIsPossibleToRemoveRows(e,...t),this.undoRedo.clearRedoStack(),this.clipboardOperations.abortCut();const r=this.operations.removeRows(n);this.undoRedo.saveOperation(new to(n,r))}addColumns(e,...t){const n=new Ks(e,t);this.ensureItIsPossibleToAddColumns(e,...t),this.undoRedo.clearRedoStack(),this.clipboardOperations.abortCut(),this.operations.addColumns(n),this.undoRedo.saveOperation(new co(n))}removeColumns(e,...t){const n=new Gs(e,t);this.ensureItIsPossibleToRemoveColumns(e,...t),this.undoRedo.clearRedoStack(),this.clipboardOperations.abortCut();const r=this.operations.removeColumns(n);this.undoRedo.saveOperation(new uo(n,r))}moveCells(e,t,n,r){this.undoRedo.clearRedoStack(),this.clipboardOperations.abortCut();const{version:i,overwrittenCellsData:s,addedGlobalNamedExpressions:o}=this.operations.moveCells(e,t,n,r);this.undoRedo.saveOperation(new no(e,t,n,r,s,o,i))}moveRows(e,t,n,r){this.ensureItIsPossibleToMoveRows(e,t,n,r),this.undoRedo.clearRedoStack(),this.clipboardOperations.abortCut();const i=this.operations.moveRows(e,t,n,r);this.undoRedo.saveOperation(new ao(e,t,n,r,i))}moveColumns(e,t,n,r){this.ensureItIsPossibleToMoveColumns(e,t,n,r),this.undoRedo.clearRedoStack();const i=this.operations.moveColumns(e,t,n,r);this.undoRedo.saveOperation(new lo(e,t,n,r,i))}cut(e,t,n){this.clipboardOperations.cut(e,t,n)}ensureItIsPossibleToCopy(e,t,n){if(!Oo(t))throw new Gt("width to be positive integer.");if(!Oo(n))throw new Gt("height to be positive integer.")}copy(e,t,n){this.ensureItIsPossibleToCopy(e,t,n),this.clipboardOperations.copy(e,t,n)}paste(e){const t=this.clipboardOperations.clipboard;if(void 0===t)throw new tn;if(this.clipboardOperations.isCutClipboard())this.moveCells(t.sourceLeftCorner,t.width,t.height,e);else if(this.clipboardOperations.isCopyClipboard()){this.clipboardOperations.ensureItIsPossibleToCopyPaste(e);const n=Tr.spanFrom(e,t.width,t.height),r=this.operations.getRangeClipboardCells(n);this.undoRedo.clearRedoStack();const i=this.operations.restoreClipboardCells(t.sourceLeftCorner.sheet,t.getContent(e));this.undoRedo.saveOperation(new Ro(e,r,t.content,i))}}beginUndoRedoBatchMode(){this.undoRedo.beginBatchMode()}commitUndoRedoBatchMode(){this.undoRedo.commitBatchMode()}isClipboardEmpty(){return void 0===this.clipboardOperations.clipboard}clearClipboard(){this.clipboardOperations.clear()}addSheet(e){void 0!==e&&this.ensureItIsPossibleToAddSheet(e),this.undoRedo.clearRedoStack();const t=this.operations.addSheet(e);return this.undoRedo.saveOperation(new ho(t)),t}removeSheet(e){this.ensureScopeIdIsValid(e),this.undoRedo.clearRedoStack(),this.clipboardOperations.abortCut();const t=this.sheetMapping.fetchDisplayName(e),n=this.operations.getSheetClipboardCells(e),{version:r,scopedNamedExpressions:i}=this.operations.removeSheet(e);this.undoRedo.saveOperation(new mo(t,e,n,i,r))}renameSheet(e,t){this.ensureItIsPossibleToRenameSheet(e,t);const n=this.operations.renameSheet(e,t);return void 0!==n&&(this.undoRedo.clearRedoStack(),this.undoRedo.saveOperation(new go(e,n,t))),n}clearSheet(e){this.ensureScopeIdIsValid(e),this.undoRedo.clearRedoStack(),this.clipboardOperations.abortCut();const t=this.operations.getSheetClipboardCells(e);this.operations.clearSheet(e),this.undoRedo.saveOperation(new po(e,t))}setCellContents(e,t){if(t instanceof Array){for(let r=0;r<t.length;r++)if(!(t[r]instanceof Array))throw new Gt("an array of arrays or a raw cell value.")}else t=[[t]];this.ensureItIsPossibleToChangeCellContents(e,t),this.undoRedo.clearRedoStack();const n=[];for(let r=0;r<t.length;r++)for(let i=0;i<t[r].length;i++){const s={sheet:e.sheet,row:e.row+r,col:e.col+i},o=t[r][i];this.clipboardOperations.abortCut();const a=this.operations.setCellContent(s,o);n.push({address:s,newContent:o,oldContent:a})}this.undoRedo.saveOperation(new fo(n))}setSheetContent(e,t){this.ensureScopeIdIsValid(e),this.ensureItIsPossibleToChangeSheetContents(e,t),Xs(t),this.undoRedo.clearRedoStack(),this.clipboardOperations.abortCut();const n=this.operations.getSheetClipboardCells(e);this.operations.setSheetContent(e,t),this.undoRedo.saveOperation(new oo(e,n,t))}setRowOrder(e,t){this.validateSwapRowIndexes(e,t),this.testRowOrderForArrays(e,t),this.undoRedo.clearRedoStack(),this.clipboardOperations.abortCut();const n=this.operations.setRowOrder(e,t);this.undoRedo.saveOperation(new io(e,t,n))}validateSwapRowIndexes(e,t){if(!this.sheetMapping.hasSheetWithId(e))throw new Wt(e);this.validateRowOrColumnMapping(e,t,"row")}testColumnOrderForArrays(e,t){for(const[n,r]of t)if(n!==r){const t=Tr.spanFrom({sheet:e,col:n,row:0},1,1/0);if(this.dependencyGraph.arrayMapping.isFormulaArrayInRange(t))throw new Rn}}setColumnOrder(e,t){this.validateSwapColumnIndexes(e,t),this.testColumnOrderForArrays(e,t),this.undoRedo.clearRedoStack(),this.clipboardOperations.abortCut();const n=this.operations.setColumnOrder(e,t);this.undoRedo.saveOperation(new so(e,t,n))}validateSwapColumnIndexes(e,t){if(!this.sheetMapping.hasSheetWithId(e))throw new Wt(e);this.validateRowOrColumnMapping(e,t,"column")}testRowOrderForArrays(e,t){for(const[n,r]of t)if(n!==r){const t=Tr.spanFrom({sheet:e,col:0,row:n},1/0,1);if(this.dependencyGraph.arrayMapping.isFormulaArrayInRange(t))throw new Rn}}mappingFromOrder(e,t,n){if(!this.sheetMapping.hasSheetWithId(e))throw new Wt(e);const r="row"===n?this.dependencyGraph.getSheetHeight(e):this.dependencyGraph.getSheetWidth(e);if(t.length!==r)throw new Gt(`number of ${n}s provided to be sheet ${"row"===n?"height":"width"}.`);const i=[];for(let s=0;s<r;s++)t[s]!==s&&i.push([s,t[s]]);return i}undo(){if(this.undoRedo.isUndoStackEmpty())throw new qt;this.clipboardOperations.abortCut(),this.undoRedo.undo()}redo(){if(this.undoRedo.isRedoStackEmpty())throw new en;this.clipboardOperations.abortCut(),this.undoRedo.redo()}addNamedExpression(e,t,n,r){this.ensureItIsPossibleToAddNamedExpression(e,t,n),this.operations.addNamedExpression(e,t,n,r),this.undoRedo.clearRedoStack(),this.clipboardOperations.abortCut(),this.undoRedo.saveOperation(new yo(e,t,n,r))}changeNamedExpressionExpression(e,t,n,r){this.ensureItIsPossibleToChangeNamedExpression(e,n,t);const[i,s]=this.operations.changeNamedExpressionExpression(e,n,t,r);this.undoRedo.clearRedoStack(),this.clipboardOperations.abortCut(),this.undoRedo.saveOperation(new So(i,n,s,t,r))}removeNamedExpression(e,t){this.ensureScopeIdIsValid(t);const[n,r]=this.operations.removeNamedExpression(e,t);return this.undoRedo.clearRedoStack(),this.clipboardOperations.abortCut(),this.undoRedo.saveOperation(new Mo(n,r,t)),n}ensureItIsPossibleToAddNamedExpression(e,t,n){this.ensureScopeIdIsValid(n),this.ensureNamedExpressionNameIsValid(e,n),this.ensureNamedExpressionIsValid(t)}ensureItIsPossibleToChangeNamedExpression(e,t,n){if(this.ensureScopeIdIsValid(n),void 0===this.namedExpressions.namedExpressionForScope(e,n))throw new $t(e);this.ensureNamedExpressionIsValid(t)}isItPossibleToRemoveNamedExpression(e,t){if(this.ensureScopeIdIsValid(t),void 0===this.namedExpressions.namedExpressionForScope(e,t))throw new $t(e)}ensureItIsPossibleToAddRows(e,...t){if(!this.sheetMapping.hasSheetWithId(e))throw new Wt(e);const n=this.dependencyGraph.getSheetHeight(e),r=t.map(e=>e[1]).reduce((e,t)=>e+t,0);if(n+r>this.maxRows)throw new Zt;for(const[i,s]of t)if(!vo(i)||!Oo(s))throw new Gt("row number to be nonnegative and number of rows to add to be positive.")}ensureItIsPossibleToRemoveRows(e,...t){for(const[n,r]of t){const t=n+r-1;if(!vo(n)||!vo(t))throw new Gt("starting and ending row to be nonnegative.");if(t<n)throw new Gt("starting row to be smaller than the ending row.");if(!this.sheetMapping.hasSheetWithId(e))throw new Wt(e)}}ensureItIsPossibleToAddColumns(e,...t){if(!this.sheetMapping.hasSheetWithId(e))throw new Wt(e);const n=this.dependencyGraph.getSheetWidth(e),r=t.map(e=>e[1]).reduce((e,t)=>e+t,0);if(n+r>this.maxColumns)throw new Zt;for(const[i,s]of t)if(!vo(i)||!Oo(s))throw new Gt("column number to be nonnegative and number of columns to add to be positive.")}ensureItIsPossibleToRemoveColumns(e,...t){for(const[n,r]of t){const t=n+r-1;if(!vo(n)||!vo(t))throw new Gt("starting and ending column to be nonnegative.");if(t<n)throw new Gt("starting column to be smaller than the ending column.");if(!this.sheetMapping.hasSheetWithId(e))throw new Wt(e)}}ensureItIsPossibleToMoveRows(e,t,n,r){this.ensureItIsPossibleToAddRows(e,[r,n]);const i=mr(e,0,t),s=mr(e,0,r);if(!this.sheetMapping.hasSheetWithId(e)||gr(i)||gr(s)||!Oo(n)||r<=t+n&&r>=t)throw new Gt("a valid range of rows to move.");const o=this.dependencyGraph.getSheetWidth(e),a=Tr.spanFrom(i,o,n);if(this.dependencyGraph.arrayMapping.isFormulaArrayInRange(a))throw new Rn;if(r>0&&this.dependencyGraph.arrayMapping.isFormulaArrayInAllRows(Ht.fromNumberOfRows(e,r-1,2)))throw new yn}ensureItIsPossibleToMoveColumns(e,t,n,r){this.ensureItIsPossibleToAddColumns(e,[r,n]);const i=mr(e,t,0),s=mr(e,r,0);if(!this.sheetMapping.hasSheetWithId(e)||gr(i)||gr(s)||!Oo(n)||r<=t+n&&r>=t)throw new Gt("a valid range of columns to move.");const o=this.dependencyGraph.getSheetHeight(e),a=Tr.spanFrom(i,n,o);if(this.dependencyGraph.arrayMapping.isFormulaArrayInRange(a))throw new Rn;if(r>0&&this.dependencyGraph.arrayMapping.isFormulaArrayInAllColumns(kt.fromNumberOfColumns(e,r-1,2)))throw new yn}ensureItIsPossibleToAddSheet(e){if(this.sheetMapping.hasSheetWithName(e))throw new jt(e)}ensureItIsPossibleToRenameSheet(e,t){if(!this.sheetMapping.hasSheetWithId(e))throw new Wt(e);const n=this.sheetMapping.get(t);if(void 0!==n&&n!==e)throw new jt(t)}ensureItIsPossibleToChangeContent(e){if(gr(e))throw new Kt(e);if(!this.sheetMapping.hasSheetWithId(e.sheet))throw new Wt(e.sheet)}ensureItIsPossibleToChangeCellContents(e,t){const n=js(t),r=Tr.spanFrom(e,n.width,n.height);this.ensureRangeInSizeLimits(r);for(const i of r.addresses(this.dependencyGraph))this.ensureItIsPossibleToChangeContent(i)}ensureItIsPossibleToChangeSheetContents(e,t){const n=js(t),r=Tr.spanFrom(mr(e,0,0),n.width,n.height);this.ensureRangeInSizeLimits(r)}ensureRangeInSizeLimits(e){if(e.exceedsSheetSizeLimits(this.maxColumns,this.maxRows))throw new Zt}isThereSomethingToUndo(){return!this.undoRedo.isUndoStackEmpty()}isThereSomethingToRedo(){return!this.undoRedo.isRedoStackEmpty()}getAndClearContentChanges(){return this.operations.getAndClearContentChanges()}ensureScopeIdIsValid(e){if(void 0!==e&&!this.sheetMapping.hasSheetWithId(e))throw new Wt(e)}validateRowOrColumnMapping(e,t,n){const r="row"===n?this.dependencyGraph.getSheetHeight(e):this.dependencyGraph.getSheetWidth(e),i=t.map(([e,t])=>e).sort((e,t)=>e-t),s=t.map(([e,t])=>t).sort((e,t)=>e-t);for(let o=0;o<i.length;o++){if(!vo(i[o])||i[o]>=r)throw new Gt(`${n} numbers to be nonnegative integers and less than sheet ${"row"===n?"height":"width"}.`);if(i[o]===i[o+1])throw new Gt(`source ${n} numbers to be unique.`);if(i[o]!==s[o])throw new Gt(`target ${n} numbers to be permutation of source ${n} numbers.`)}}ensureNamedExpressionNameIsValid(e,t){if(!this.namedExpressions.isNameValid(e))throw new zt(e);if(!this.namedExpressions.isNameAvailable(e,t))throw new Jt(e)}ensureNamedExpressionIsValid(e){const t=this.cellContentParser.parse(e);if(t instanceof Ss.Formula){const e=this.parser.parse(t.formula,mr(-1,0,0));if(xs(e.ast))throw new Mn}}}function Oo(e){return Number.isInteger(e)&&e>0}function vo(e){return Number.isInteger(e)&&e>=0}
  626. /**
  627. * @license
  628. * Copyright (c) 2024 Handsoncode. All rights reserved.
  629. */class Eo{constructor(e,t,n,r,i,s){this.config=e,this.stats=t,this.interpreter=n,this.lazilyTransformingAstService=r,this.dependencyGraph=i,this.columnSearch=s}run(){this.stats.start(Pt.TOP_SORT);const{sorted:e,cycled:t}=this.dependencyGraph.topSortWithScc();this.stats.end(Pt.TOP_SORT),this.stats.measure(Pt.EVALUATION,()=>{this.recomputeFormulas(t,e)})}partialRun(e){const t=Yt.empty();return this.stats.measure(Pt.EVALUATION,()=>{this.dependencyGraph.graph.getTopSortedWithSccSubgraphFrom(e,e=>{if(e instanceof En){const n=e.isComputed()?e.getCellValue():void 0,r=this.recomputeFormulaVertexValue(e);if(r!==n){const i=e.getAddress(this.lazilyTransformingAstService);return t.addChange(r,i),this.columnSearch.change(wt(n),wt(r),i),!0}return!1}return!(e instanceof Nn)||(e.clearCache(),!0)},e=>{if(e instanceof Nn)e.clearCache();else if(e instanceof En){const n=e.getAddress(this.lazilyTransformingAstService);this.columnSearch.remove(wt(e.valueOrUndef()),n);const r=new lr(Wn.CYCLE,void 0,e);e.setCellValue(r),t.addChange(r,n)}})}),t}runAndForget(e,t,n){const r=[];for(const s of Mt(n,t))if(s instanceof Tr){const e=s;if(void 0===this.dependencyGraph.getRange(e.start,e.end)){const t=new Nn(e);this.dependencyGraph.rangeMapping.setRange(t),r.push(t)}}const i=this.evaluateAstToCellValue(e,new Er(t,this.config.useArrayArithmetic));return r.forEach(e=>{this.dependencyGraph.rangeMapping.removeRange(e)}),i}recomputeFormulas(e,t){e.forEach(e=>{e instanceof En&&e.setCellValue(new lr(Wn.CYCLE,void 0,e))}),t.forEach(e=>{if(e instanceof En){const t=this.recomputeFormulaVertexValue(e),n=e.getAddress(this.lazilyTransformingAstService);this.columnSearch.add(wt(t),n)}else e instanceof Nn&&e.clearCache()})}recomputeFormulaVertexValue(e){const t=e.getAddress(this.lazilyTransformingAstService);if(e instanceof Cn&&(e.array.size.isRef||!this.dependencyGraph.isThereSpaceForArray(e)))return e.setNoSpace();{const n=e.getFormula(this.lazilyTransformingAstService),r=this.evaluateAstToCellValue(n,new Er(t,this.config.useArrayArithmetic,e));return e.setCellValue(r)}}evaluateAstToCellValue(e,t){const n=this.interpreter.evaluateAst(e,t);return n instanceof Ft?n:n===bt&&this.config.evaluateNullToZero?0:n}}
  630. /**
  631. * @license
  632. * Copyright (c) 2024 Handsoncode. All rights reserved.
  633. */class Co{constructor(e,t){this.address=e,this.newValue=t}get col(){return this.address.col}get row(){return this.address.row}get sheet(){return this.address.sheet}get value(){return this.newValue}}class Lo{constructor(e,t){this.name=e,this.newValue=t}}class No{constructor(e,t,n,r){this.config=e,this.namedExpressions=t,this.sheetIndexMapping=n,this.lazilyTransformingService=r}exportChange(e){const t=e.value,n=e.address;if(n.sheet===Ps.SHEET_FOR_WORKBOOK_EXPRESSIONS){const e=this.namedExpressions.namedExpressionInAddress(n.row);if(!e)throw new Error("Missing named expression");return new Lo(e.displayName,this.exportScalarOrRange(t))}if(t instanceof Ft){const e=[];for(const[r,i]of t.entriesFromTopLeftCorner(n))e.push(new Co(i,this.exportValue(r)));return e}return new Co(n,this.exportValue(t))}exportValue(e){return e instanceof Ft?this.detailedError(new lr(Wn.VALUE,Ce.ScalarExpected)):this.config.smartRounding&&_t(e)?this.cellValueRounding(wt(e)):e instanceof lr?this.detailedError(e):e===bt?null:wt(e)}exportScalarOrRange(e){return e instanceof Ft?e.rawData().map(e=>e.map(e=>this.exportValue(e))):this.exportValue(e)}detailedError(e){var t,n;let r=void 0;const i=null===(t=e.root)||void 0===t?void 0:t.getAddress(this.lazilyTransformingService);return void 0!==i&&(r=i.sheet===Ps.SHEET_FOR_WORKBOOK_EXPRESSIONS?null===(n=this.namedExpressions.namedExpressionInAddress(i.row))||void 0===n?void 0:n.displayName:A(this.sheetIndexMapping,i,-1)),new ii(e,this.config.translationPackage.getErrorTranslation(e.type),r)}cellValueRounding(e){if(0===e)return e;const t=Math.floor(Math.log10(Math.abs(e))),n=Math.pow(10,this.config.precisionRounding-t);return e<0?-Math.round(-e*n)/n:Math.round(e*n)/n}}
  634. /**
  635. * @license
  636. * Copyright (c) 2024 Handsoncode. All rights reserved.
  637. */class _o{constructor(e,t,n,r,i,s){this.dependencyGraph=e,this.columnSearch=t,this.parser=n,this.cellContentParser=r,this.stats=i,this.arraySizePredictor=s,this.buildStrategy=new Io(e,t,n,i,r,s)}buildGraph(e,t){const n=t.measure(Pt.COLLECT_DEPENDENCIES,()=>this.buildStrategy.run(e));this.dependencyGraph.getAndClearContentChanges(),t.measure(Pt.PROCESS_DEPENDENCIES,()=>this.processDependencies(n))}processDependencies(e){e.forEach((e,t)=>{this.dependencyGraph.processCellDependencies(e,t)})}}class Io{constructor(e,t,n,r,i,s){this.dependencyGraph=e,this.columnIndex=t,this.parser=n,this.stats=r,this.cellContentParser=i,this.arraySizePredictor=s}run(e){const t=new Map;for(const n in e){const r=this.dependencyGraph.getSheetId(n),i=e[n];for(let e=0;e<i.length;++e){const n=i[e];for(let i=0;i<n.length;++i){const s=n[i],o=mr(r,i,e),a=this.cellContentParser.parse(s);if(a instanceof Ss.Formula){const e=this.stats.measure(Pt.PARSER,()=>this.parser.parse(a.formula,o));if(e.errors.length>0){this.shrinkArrayIfNeeded(o);const t=new Jn(e.errors,a.formula);this.dependencyGraph.addVertex(o,t)}else{this.shrinkArrayIfNeeded(o);const n=this.arraySizePredictor.checkArraySize(e.ast,o);if(n.isScalar()){const n=new Ln(e.ast,o,0);t.set(n,Mt(e.dependencies,o)),this.dependencyGraph.addVertex(o,n),e.hasVolatileFunction&&this.dependencyGraph.markAsVolatile(n),e.hasStructuralChangeFunction&&this.dependencyGraph.markAsDependentOnStructureChange(n)}else{const r=new Cn(e.ast,o,new ei(n.width,n.height));t.set(r,Mt(e.dependencies,o)),this.dependencyGraph.addArrayVertex(o,r)}}}else if(a instanceof Ss.Empty);else{this.shrinkArrayIfNeeded(o);const e=new Bn(a.value,s);this.columnIndex.add(wt(a.value),o),this.dependencyGraph.addVertex(o,e)}}}}return t}shrinkArrayIfNeeded(e){const t=this.dependencyGraph.getCell(e);t instanceof Cn&&this.dependencyGraph.shrinkArrayToCorner(t)}}
  638. /**
  639. * @license
  640. * Copyright (c) 2024 Handsoncode. All rights reserved.
  641. */const Po=new Map([["gpl-v3",1],["missing",2],["invalid",3],["expired",4]]);class xo extends qr{version(e,t){return this.runFunction(e.args,t,this.metadata("VERSION"),()=>{const{licenseKeyValidityState:e,licenseKey:t}=this.config;let n;return Po.has(t)?n=Po.get(t):Po.has(e)?n=Po.get(e):"valid"===e&&(n=t.slice(-5)),`HyperFormula v${ha.version}, ${n}`})}}
  642. /**
  643. * @license
  644. * Copyright (c) 2024 Handsoncode. All rights reserved.
  645. */
  646. function Do(e,t){var n;let r=t.implementedFunctions[e];const i=null===(n=t.aliases)||void 0===n?void 0:n[e];if(void 0!==i){if(void 0!==r)throw new Sn(e,t.name);r=t.implementedFunctions[i]}if(void 0===r)throw pn.functionNotDeclaredInPlugin(e,t.name);return r}xo.implementedFunctions={VERSION:{method:"version",parameters:[]}};class Ao{constructor(e){if(this.config=e,this.functions=new Map,this.arraySizeFunctions=new Map,this.volatileFunctions=new Set,this.arrayFunctions=new Set,this.structuralChangeFunctions=new Set,this.functionsWhichDoesNotNeedArgumentsToBeComputed=new Set,this.functionsMetadata=new Map,this.doesFunctionNeedArgumentToBeComputed=e=>this.functionsWhichDoesNotNeedArgumentsToBeComputed.has(e),this.isFunctionVolatile=e=>this.volatileFunctions.has(e),this.isArrayFunction=e=>this.arrayFunctions.has(e),this.isFunctionDependentOnSheetStructureChange=e=>this.structuralChangeFunctions.has(e),e.functionPlugins.length>0){this.instancePlugins=new Map;for(const t of e.functionPlugins)Ao.loadPluginFunctions(t,this.instancePlugins)}else this.instancePlugins=new Map(Ao.plugins);for(const[t,n]of Ao.protectedFunctions())Ao.loadFunctionUnprotected(n,t,this.instancePlugins);for(const[t,n]of this.instancePlugins.entries())this.categorizeFunction(t,Do(t,n))}static registerFunctionPlugin(e,t){this.loadPluginFunctions(e,this.plugins),void 0!==t&&this.loadTranslations(t)}static registerFunction(e,t,n){this.loadPluginFunction(t,e,this.plugins),void 0!==n&&this.loadTranslations(n)}static unregisterFunction(e){if(this.functionIsProtected(e))throw fn.cannotUnregisterFunctionWithId(e);this.plugins.delete(e)}static unregisterFunctionPlugin(e){for(const t of this.protectedPlugins())if(t===e)throw fn.cannotUnregisterProtectedPlugin();for(const[t,n]of this.plugins.entries())n===e&&this.plugins.delete(t)}static unregisterAll(){this.plugins.clear()}static getRegisteredFunctionIds(){return[...Array.from(this.plugins.keys()),...Array.from(this._protectedPlugins.keys())]}static getPlugins(){return Array.from(new Set(this.plugins.values()).values())}static getFunctionPlugin(e){return this.functionIsProtected(e)?void 0:this.plugins.get(e)}static functionIsProtected(e){return this._protectedPlugins.has(e)}static loadTranslations(e){const t=new Set(ha.getRegisteredLanguagesCodes());Object.keys(e).forEach(n=>{t.has(n)&&ha.getLanguage(n).extendFunctions(e[n])})}static loadPluginFunctions(e,t){Object.keys(e.implementedFunctions).forEach(n=>{this.loadPluginFunction(e,n,t)}),void 0!==e.aliases&&Object.keys(e.aliases).forEach(n=>{this.loadPluginFunction(e,n,t)})}static loadPluginFunction(e,t,n){if(this.functionIsProtected(t))throw fn.cannotRegisterFunctionWithId(t);this.loadFunctionUnprotected(e,t,n)}static loadFunctionUnprotected(e,t,n){const r=Do(t,e).method;if(!Object.prototype.hasOwnProperty.call(e.prototype,r))throw pn.functionMethodNotFound(r,e.name);n.set(t,e)}static*protectedFunctions(){for(const[e,t]of this._protectedPlugins)void 0!==t&&(yield[e,t])}static*protectedPlugins(){for(const[,e]of this._protectedPlugins)void 0!==e&&(yield e)}initializePlugins(e){const t=[];for(const[n,r]of this.instancePlugins.entries()){let i=t.find(e=>e instanceof r);void 0===i&&(i=new r(e),t.push(i));const s=Do(n,r),o=s.method;this.functions.set(n,[o,i]);const a=s.arraySizeMethod;void 0!==a&&this.arraySizeFunctions.set(n,[a,i])}}getFunctionPlugin(e){if(!Ao.functionIsProtected(e))return this.instancePlugins.get(e)}getFunction(e){const t=this.functions.get(e);if(void 0!==t&&this.config.translationPackage.isFunctionTranslated(e)){const[e,n]=t;return(t,r)=>n[e](t,r)}}getArraySizeFunction(e){const t=this.arraySizeFunctions.get(e);if(void 0!==t&&this.config.translationPackage.isFunctionTranslated(e)){const[e,n]=t;return(t,r)=>n[e](t,r)}}getMetadata(e){return this.functionsMetadata.get(e)}getPlugins(){const e=new Set;for(const[t,n]of this.instancePlugins)Ao.functionIsProtected(t)||e.add(n);return Array.from(e)}getRegisteredFunctionIds(){return Array.from(this.functions.keys())}categorizeFunction(e,t){t.isVolatile&&this.volatileFunctions.add(e),t.arrayFunction&&this.arrayFunctions.add(e),t.doesNotNeedArgumentsToBeComputed&&this.functionsWhichDoesNotNeedArgumentsToBeComputed.add(e),t.isDependentOnSheetStructureChange&&this.structuralChangeFunctions.add(e),this.functionsMetadata.set(e,t)}}
  647. /**
  648. * @license
  649. * Copyright (c) 2024 Handsoncode. All rights reserved.
  650. */
  651. var Fo;Ao.plugins=new Map,Ao._protectedPlugins=new Map([["VERSION",xo],["OFFSET",void 0]]),function(e){e["GREATER_THAN"]="GREATER_THAN",e["GREATER_THAN_OR_EQUAL"]="GREATER_THAN_OR_EQUAL",e["LESS_THAN"]="LESS_THAN",e["LESS_THAN_OR_EQUAL"]="LESS_THAN_OR_EQUAL",e["NOT_EQUAL"]="NOT_EQUAL",e["EQUAL"]="EQUAL"}(Fo||(Fo={}));const Yo=(e,t)=>({operator:e,value:t});class Ho{constructor(e){var t,n,r,i;this.trueString=null!==(n=null===(t=e.translationPackage.getMaybeFunctionTranslation("TRUE"))||void 0===t?void 0:t.toLowerCase())&&void 0!==n?n:"true",this.falseString=null!==(i=null===(r=e.translationPackage.getMaybeFunctionTranslation("FALSE"))||void 0===r?void 0:r.toLowerCase())&&void 0!==i?i:"false"}fromCellValue(e,t){if("string"!==typeof e&&"boolean"!==typeof e&&"number"!==typeof e)return;const n=this.parseCriterion(e,t);return void 0!==n?{raw:e,lambda:Uo(n,t)}:void 0}parseCriterion(e,t){if("number"===typeof e||"boolean"===typeof e)return Yo(Fo.EQUAL,e);if("string"===typeof e){const n=ko.exec(e);let r,i;n?(i=Vo(n[1]),r=n[2]):(i=Fo.EQUAL,r=e);const s=t.coerceToMaybeNumber(r),o=r.toLowerCase()===this.trueString||r.toLowerCase()!==this.falseString&&void 0;if(void 0===i)return;if(""===r)return Yo(i,null);if(void 0!==s)return Yo(i,wt(s));if(i===Fo.EQUAL||i===Fo.NOT_EQUAL)return Yo(i,null!==o&&void 0!==o?o:r)}}}const ko=/([<>=]+)(.*)/;function Vo(e){switch(e){case">":return Fo.GREATER_THAN;case">=":return Fo.GREATER_THAN_OR_EQUAL;case"<":return Fo.LESS_THAN;case"<=":return Fo.LESS_THAN_OR_EQUAL;case"<>":return Fo.NOT_EQUAL;case"=":return Fo.EQUAL;default:return}}const Uo=(e,t)=>{switch(e.operator){case Fo.GREATER_THAN:return"number"===typeof e.value?n=>"number"===typeof n&&t.floatCmp(n,e.value)>0:e=>!1;case Fo.GREATER_THAN_OR_EQUAL:return"number"===typeof e.value?n=>"number"===typeof n&&t.floatCmp(n,e.value)>=0:e=>!1;case Fo.LESS_THAN:return"number"===typeof e.value?n=>"number"===typeof n&&t.floatCmp(n,e.value)<0:e=>!1;case Fo.LESS_THAN_OR_EQUAL:return"number"===typeof e.value?n=>"number"===typeof n&&t.floatCmp(n,e.value)<=0:e=>!1;case Fo.EQUAL:return"number"===typeof e.value?n=>{if("number"===typeof n)return 0===t.floatCmp(n,e.value);if("string"===typeof n){if(""===n)return!1;const r=t.coerceToMaybeNumber(n);return void 0!==r&&0===t.floatCmp(r,e.value)}return!1}:"string"===typeof e.value?t.eqMatcherFunction(e.value):"boolean"===typeof e.value?t=>"boolean"===typeof t&&t===e.value:e=>e===bt;case Fo.NOT_EQUAL:return"number"===typeof e.value?n=>{if("number"===typeof n)return 0!==t.floatCmp(n,e.value);if("string"===typeof n){if(""===n)return!0;const r=t.coerceToMaybeNumber(n);return void 0===r||0!==t.floatCmp(r,e.value)}return!0}:"string"===typeof e.value?t.neqMatcherFunction(e.value):"boolean"===typeof e.value?t=>"boolean"!==typeof t||t!==e.value:e=>e!==bt}};
  652. /**
  653. * @license
  654. * Copyright (c) 2024 Handsoncode. All rights reserved.
  655. */class Wo{constructor(e,t,n,r,i,s,o,a,l,c){this.config=e,this.dependencyGraph=t,this.columnSearch=n,this.stats=r,this.arithmeticHelper=i,this.functionRegistry=s,this.namedExpressions=o,this.serialization=a,this.arraySizePredictor=l,this.dateTimeHelper=c,this.equalOp=(e,t)=>jo(this.arithmeticHelper.eq,e,t),this.notEqualOp=(e,t)=>jo(this.arithmeticHelper.neq,e,t),this.greaterThanOp=(e,t)=>jo(this.arithmeticHelper.gt,e,t),this.lessThanOp=(e,t)=>jo(this.arithmeticHelper.lt,e,t),this.greaterThanOrEqualOp=(e,t)=>jo(this.arithmeticHelper.geq,e,t),this.lessThanOrEqualOp=(e,t)=>jo(this.arithmeticHelper.leq,e,t),this.concatOp=(e,t)=>jo(this.arithmeticHelper.concat,Fr(e),Fr(t)),this.plusOp=(e,t)=>jo(this.arithmeticHelper.addWithEpsilon,this.arithmeticHelper.coerceScalarToNumberOrError(e),this.arithmeticHelper.coerceScalarToNumberOrError(t)),this.minusOp=(e,t)=>jo(this.arithmeticHelper.subtract,this.arithmeticHelper.coerceScalarToNumberOrError(e),this.arithmeticHelper.coerceScalarToNumberOrError(t)),this.timesOp=(e,t)=>jo(this.arithmeticHelper.multiply,this.arithmeticHelper.coerceScalarToNumberOrError(e),this.arithmeticHelper.coerceScalarToNumberOrError(t)),this.powerOp=(e,t)=>jo(this.arithmeticHelper.pow,this.arithmeticHelper.coerceScalarToNumberOrError(e),this.arithmeticHelper.coerceScalarToNumberOrError(t)),this.divOp=(e,t)=>jo(this.arithmeticHelper.divide,this.arithmeticHelper.coerceScalarToNumberOrError(e),this.arithmeticHelper.coerceScalarToNumberOrError(t)),this.unaryMinusOp=e=>Xo(this.arithmeticHelper.unaryMinus,this.arithmeticHelper.coerceScalarToNumberOrError(e)),this.percentOp=e=>Xo(this.arithmeticHelper.unaryPercent,this.arithmeticHelper.coerceScalarToNumberOrError(e)),this.unaryPlusOp=e=>this.arithmeticHelper.unaryPlus(e),this.functionRegistry.initializePlugins(this),this.criterionBuilder=new Ho(e)}evaluateAst(e,t){let n=this.evaluateAstWithoutPostprocessing(e,t);if(_t(n)){if(kr(wt(n)))return new lr(Wn.NUM,Ce.NaN);n=Ot(n,Vr(wt(n)))}return n instanceof Ft&&1===n.height()&&1===n.width()&&([[n]]=n.data),Zo(n,t.formulaVertex)}evaluateAstWithoutPostprocessing(e,t){switch(e.type){case j.EMPTY:return bt;case j.CELL_REFERENCE:{const n=e.reference.toSimpleCellAddress(t.formulaAddress);return gr(n)?new lr(Wn.REF,Ce.BadRef):this.dependencyGraph.getCellValue(n)}case j.NUMBER:case j.STRING:return e.value;case j.CONCATENATE_OP:{const n=this.evaluateAst(e.left,t),r=this.evaluateAst(e.right,t);return this.binaryRangeWrapper(this.concatOp,n,r,t)}case j.EQUALS_OP:{const n=this.evaluateAst(e.left,t),r=this.evaluateAst(e.right,t);return this.binaryRangeWrapper(this.equalOp,n,r,t)}case j.NOT_EQUAL_OP:{const n=this.evaluateAst(e.left,t),r=this.evaluateAst(e.right,t);return this.binaryRangeWrapper(this.notEqualOp,n,r,t)}case j.GREATER_THAN_OP:{const n=this.evaluateAst(e.left,t),r=this.evaluateAst(e.right,t);return this.binaryRangeWrapper(this.greaterThanOp,n,r,t)}case j.LESS_THAN_OP:{const n=this.evaluateAst(e.left,t),r=this.evaluateAst(e.right,t);return this.binaryRangeWrapper(this.lessThanOp,n,r,t)}case j.GREATER_THAN_OR_EQUAL_OP:{const n=this.evaluateAst(e.left,t),r=this.evaluateAst(e.right,t);return this.binaryRangeWrapper(this.greaterThanOrEqualOp,n,r,t)}case j.LESS_THAN_OR_EQUAL_OP:{const n=this.evaluateAst(e.left,t),r=this.evaluateAst(e.right,t);return this.binaryRangeWrapper(this.lessThanOrEqualOp,n,r,t)}case j.PLUS_OP:{const n=this.evaluateAst(e.left,t),r=this.evaluateAst(e.right,t);return this.binaryRangeWrapper(this.plusOp,n,r,t)}case j.MINUS_OP:{const n=this.evaluateAst(e.left,t),r=this.evaluateAst(e.right,t);return this.binaryRangeWrapper(this.minusOp,n,r,t)}case j.TIMES_OP:{const n=this.evaluateAst(e.left,t),r=this.evaluateAst(e.right,t);return this.binaryRangeWrapper(this.timesOp,n,r,t)}case j.POWER_OP:{const n=this.evaluateAst(e.left,t),r=this.evaluateAst(e.right,t);return this.binaryRangeWrapper(this.powerOp,n,r,t)}case j.DIV_OP:{const n=this.evaluateAst(e.left,t),r=this.evaluateAst(e.right,t);return this.binaryRangeWrapper(this.divOp,n,r,t)}case j.PLUS_UNARY_OP:{const n=this.evaluateAst(e.value,t);return this.unaryRangeWrapper(this.unaryPlusOp,n,t)}case j.MINUS_UNARY_OP:{const n=this.evaluateAst(e.value,t);return this.unaryRangeWrapper(this.unaryMinusOp,n,t)}case j.PERCENT_OP:{const n=this.evaluateAst(e.value,t);return this.unaryRangeWrapper(this.percentOp,n,t)}case j.FUNCTION_CALL:{if("valid"!==this.config.licenseKeyValidityState&&!Ao.functionIsProtected(e.procedureName))return new lr(Wn.LIC,Ce.LicenseKey(this.config.licenseKeyValidityState));const n=this.functionRegistry.getFunction(e.procedureName);return void 0!==n?n(e,new Er(t.formulaAddress,t.arraysFlag||this.functionRegistry.isArrayFunction(e.procedureName),t.formulaVertex)):new lr(Wn.NAME,Ce.FunctionName(e.procedureName))}case j.NAMED_EXPRESSION:{const n=this.namedExpressions.nearestNamedExpression(e.expressionName,t.formulaAddress.sheet);return n?this.dependencyGraph.getCellValue(n.address):new lr(Wn.NAME,Ce.NamedExpressionName(e.expressionName))}case j.CELL_RANGE:{if(!this.rangeSpansOneSheet(e))return new lr(Wn.REF,Ce.RangeManySheets);const n=Tr.fromCellRange(e,t.formulaAddress),r=this.dependencyGraph.getArray(n);if(r){const e=r.array;if(e instanceof Tn)throw new Error("Array should be already computed");if(e instanceof lr)return e;if(e instanceof On)return Ft.fromRange(e.raw(),n,this.dependencyGraph);throw new Error("Unknown array")}return Ft.onlyRange(n,this.dependencyGraph)}case j.COLUMN_RANGE:{if(!this.rangeSpansOneSheet(e))return new lr(Wn.REF,Ce.RangeManySheets);const n=Or.fromColumnRange(e,t.formulaAddress);return Ft.onlyRange(n,this.dependencyGraph)}case j.ROW_RANGE:{if(!this.rangeSpansOneSheet(e))return new lr(Wn.REF,Ce.RangeManySheets);const n=vr.fromRowRangeAst(e,t.formulaAddress);return Ft.onlyRange(n,this.dependencyGraph)}case j.PARENTHESIS:return this.evaluateAst(e.expression,t);case j.ARRAY:{let n=void 0;const r=[];for(const i of e.args){let e=void 0;const s=[];for(const n of i){const r=Pr(this.evaluateAst(n,t)),i=r.height();if(void 0===e)e=i,s.push(...r.data);else{if(e!==i)return new lr(Wn.REF,Ce.SizeMismatch);for(let e=0;e<i;e++)s[e].push(...r.data[e])}}const o=s[0].length;if(void 0===n)n=o,r.push(...s);else{if(n!==o)return new lr(Wn.REF,Ce.SizeMismatch);r.push(...s)}}return Ft.onlyValues(r)}case j.ERROR_WITH_RAW_INPUT:case j.ERROR:return e.error}}rangeSpansOneSheet(e){return e.start.sheet===e.end.sheet}unaryRangeWrapper(e,t,n){var r;if(t instanceof Ft&&!n.arraysFlag&&(t=null!==(r=Jr(t,n))&&void 0!==r?r:new lr(Wn.VALUE,Ce.ScalarExpected)),t instanceof lr)return t;if(t instanceof Ft){const n=t.data.map(t=>t.map(e));return Ft.onlyValues(n)}return e(t)}binaryRangeWrapper(e,t,n,r){var i,s;if(t instanceof Ft&&!r.arraysFlag&&(t=null!==(i=Jr(t,r))&&void 0!==i?i:new lr(Wn.VALUE,Ce.ScalarExpected)),t instanceof lr)return t;if(n instanceof Ft&&!r.arraysFlag&&(n=null!==(s=Jr(n,r))&&void 0!==s?s:new lr(Wn.VALUE,Ce.ScalarExpected)),n instanceof lr)return n;if(t instanceof Ft||n instanceof Ft){if(!(t instanceof Ft)){if(n.isAdHoc()){const r=n.data;for(let n=0;n<r.length;n++)for(let i=0;i<r[0].length;i++)r[n][i]=e(t,r[n][i]);return Ft.onlyValues(r)}t=Ft.fromScalar(t)}if(!(n instanceof Ft)){if(t.isAdHoc()){const r=t.data;for(let t=0;t<r.length;t++)for(let i=0;i<r[0].length;i++)r[t][i]=e(r[t][i],n);return Ft.onlyValues(r)}n=Ft.fromScalar(n)}if(t.width()===n.width()&&t.height()===n.height()){if(t.isAdHoc()){const r=t.data,i=n.data;for(let t=0;t<r.length;t++)for(let n=0;n<r[0].length;n++)r[t][n]=e(r[t][n],i[t][n]);return Ft.onlyValues(r)}if(n.isAdHoc()){const r=t.data,i=n.data;for(let t=0;t<r.length;t++)for(let n=0;n<r[0].length;n++)i[t][n]=e(r[t][n],i[t][n]);return Ft.onlyValues(i)}}const r=Math.max(t.width(),n.width()),i=Math.max(t.height(),n.height()),s=Array(i);for(let e=0;e<i;e++)s[e]=Array(r);for(let o=0;o<i;o++){const i=1!==t.height()?o:0,a=1!==n.height()?o:0;for(let l=0;l<r;l++){const r=1!==t.width()?l:0,c=1!==n.width()?l:0;i<t.height()&&a<n.height()&&r<t.width()&&c<n.width()?s[o][l]=e(t.data[i][r],n.data[a][c]):s[o][l]=new lr(Wn.NA)}}return Ft.onlyValues(s)}return e(t,n)}}function Xo(e,t){return t instanceof lr?t:e(t)}function jo(e,t,n){return t instanceof lr?t:n instanceof lr?n:e(t,n)}function Zo(e,t){return e instanceof lr&&void 0!==t?e.attachRootVertex(t):e}
  656. /**
  657. * @license
  658. * Copyright (c) 2024 Handsoncode. All rights reserved.
  659. */class Qo{constructor(e){this.sheet=e,this.transformations=[]}add(e){this.transformations.push(e)}performEagerTransformations(e,t){this.transformations.forEach(n=>n.performEagerTransformations(e,t))}transformSingleAst(e,t){let[n,r]=[e,t];return this.transformations.forEach(e=>{[n,r]=e.transformSingleAst(n,r)}),[n,r]}isIrreversible(){return!0}}
  660. /**
  661. * @license
  662. * Copyright (c) 2024 Handsoncode. All rights reserved.
  663. */class Ko{constructor(e){this.stats=e,this.transformations=[]}version(){return this.transformations.length}addTransformation(e){return void 0!==this.combinedTransformer?this.combinedTransformer.add(e):this.transformations.push(e),this.version()}beginCombinedMode(e){this.combinedTransformer=new Qo(e)}commitCombinedMode(){if(void 0===this.combinedTransformer)throw Error("Combined mode wasn't started");return this.transformations.push(this.combinedTransformer),this.combinedTransformer=void 0,this.version()}applyTransformations(e,t,n){this.stats.start(Pt.TRANSFORM_ASTS_POSTPONED);for(let i=n;i<this.transformations.length;i++){const n=this.transformations[i];n.isIrreversible()&&(this.undoRedo.storeDataForVersion(i,t,this.parser.computeHashFromAst(e)),this.parser.rememberNewAst(e));const[r,s]=n.transformSingleAst(e,t);e=r,t=s}const r=this.parser.rememberNewAst(e);return this.stats.end(Pt.TRANSFORM_ASTS_POSTPONED),[r,t,this.transformations.length]}*getTransformationsFrom(e,t){for(let n=e;n<this.transformations.length;n++){const e=this.transformations[n];t&&!t(e)||(yield e)}}}
  664. /**
  665. * @license
  666. * Copyright (c) 2024 Handsoncode. All rights reserved.
  667. */const Go=-1;function Bo(e,t,{searchCoordinate:n,orderingDirection:r,matchExactly:i},s){const o=t.start[n],a="col"===n?t.effectiveEndColumn(s):t.effectiveEndRow(s),l="col"===n?e=>wt(s.getCellValue(mr(t.sheet,e,t.start.row))):e=>wt(s.getCellValue(mr(t.sheet,t.start.col,e))),c="asc"===r?(e,t)=>zo(e,t):(e,t)=>-zo(e,t),u=Jo(t=>c(e,l(t))>=0,o,a),h=l(u);return u===Go||typeof h!==typeof e||i&&h!==e?Go:u-o}function Jo(e,t,n){let r=t,i=n;while(r<i){const t=Math.ceil((r+i)/2);e(t)?r=t:i=t-1}return r===i&&e(r)?r:Go}function zo(e,t){return typeof e===typeof t?e===bt?0:e<t?-1:e>t?1:0:e===bt?-1:t===bt?1:t instanceof lr||"number"===typeof e&&"string"===typeof t||"number"===typeof e&&"boolean"===typeof t?-1:"string"===typeof e&&"number"===typeof t?1:"string"===typeof e&&"boolean"===typeof t?-1:1}
  668. /**
  669. * @license
  670. * Copyright (c) 2024 Handsoncode. All rights reserved.
  671. */class $o{constructor(e){this.dependencyGraph=e}advancedFind(e,t){let n;const r=t.range;n=void 0===r?t.valuesFromTopLeftCorner():this.dependencyGraph.computeListOfValuesInRange(r);for(let i=0;i<n.length;i++)if(e(wt(n[i])))return i;return-1}basicFind(e,t,n,{ordering:r,matchExactly:i}){const s="string"===typeof e?Br(e):e,o=t.range;return void 0===o?this.findNormalizedValue(s,t.valuesFromTopLeftCorner()):"none"===r?this.findNormalizedValue(s,this.dependencyGraph.computeListOfValuesInRange(o)):Bo(s,o,{searchCoordinate:n,orderingDirection:r,matchExactly:i},this.dependencyGraph)}findNormalizedValue(e,t){return t.map(wt).map(e=>"string"===typeof e?Br(e):e).indexOf(e)}}
  672. /**
  673. * @license
  674. * Copyright (c) 2024 Handsoncode. All rights reserved.
  675. */class qo extends $o{constructor(e){super(e),this.dependencyGraph=e}add(e,t){}remove(e,t){}change(e,t,n){}applyChanges(e){}addColumns(e){}removeColumns(e){}removeSheet(e){}moveValues(e,t,n,r){}removeValues(e){}find(e,t,n){return this.basicFind(e,t,"row",n)}}
  676. /**
  677. * @license
  678. * Copyright (c) 2024 Handsoncode. All rights reserved.
  679. */class ea{constructor(e,t,n){this.dependencyGraph=e,this.config=t,this.stats=n,this.index=new Map,this.transformingService=this.dependencyGraph.lazilyTransformingAstService,this.binarySearchStrategy=new qo(e)}add(e,t){if(!(e===bt||e instanceof lr))if(e instanceof Ft)for(const[n,r]of e.entriesFromTopLeftCorner(t))this.addSingleCellValue(wt(n),r);else this.addSingleCellValue(e,t)}remove(e,t){if(void 0!==e)if(e instanceof Ft)for(const[n,r]of e.entriesFromTopLeftCorner(t))this.removeSingleValue(wt(n),r);else this.removeSingleValue(e,t)}change(e,t,n){e!==t&&(this.remove(e,n),this.add(t,n))}applyChanges(e){for(const t of e)void 0!==t.oldValue&&this.change(wt(t.oldValue),wt(t.value),t.address)}moveValues(e,t,n,r){for(const[i,s]of e){const e=pr(s,r,t,n);this.remove(i,s),this.add(i,e)}}removeValues(e){for(const[t,n]of e)this.remove(t,n)}find(e,t,{ordering:n,matchExactly:r}){const i=!0===r?"findFirst":"findLast",s=this.findUsingColumnIndex(e,t,i);return void 0!==s?s:this.binarySearchStrategy.find(e,t,{ordering:n,matchExactly:r})}findUsingColumnIndex(e,t,n){const r=t.range;if(void 0===r)return;this.ensureRecentData(r.sheet,r.start.col,e);const i=this.getColumnMap(r.sheet,r.start.col);if(!i)return-1;const s="string"===typeof e?Br(e):e,o=i.get(s);if(!o||!o.index||0===o.index.length)return;const a=ea.findRowBelongingToRange(o,r,n);return void 0!==a?a-r.start.row:void 0}static findRowBelongingToRange(e,t,n){const r=t.start.row,i=t.end.row,s="findFirst"===n?ta(r,e.index,"upperBound"):ta(i,e.index,"lowerBound");if(-1===s)return;const o=e.index[s],a=o>=r&&o<=i;return a?o:void 0}advancedFind(e,t){return this.binarySearchStrategy.advancedFind(e,t)}addColumns(e){const t=this.index.get(e.sheet);t&&t.splice(e.columnStart,0,...Array(e.numberOfColumns))}removeColumns(e){const t=this.index.get(e.sheet);t&&t.splice(e.columnStart,e.numberOfColumns)}removeSheet(e){this.index.delete(e)}getColumnMap(e,t){this.index.has(e)||this.index.set(e,[]);const n=this.index.get(e);let r=n[t];return r||(r=new Map,n[t]=r),r}getValueIndex(e,t,n){const r=this.getColumnMap(e,t);let i=this.getColumnMap(e,t).get(n);return i||(i={version:this.transformingService.version(),index:[]},r.set(n,i)),i}ensureRecentData(e,t,n){const r=this.getValueIndex(e,t,n),i=this.transformingService.version();if(r.version===i)return;const s=this.transformingService.getTransformationsFrom(r.version,t=>t.sheet===e&&(t instanceof Fs||t instanceof Us));for(const o of s)o instanceof Fs?this.addRows(t,o.rowsSpan,n):o instanceof Us&&this.removeRows(t,o.rowsSpan,n);r.version=i}addSingleCellValue(e,t){this.stats.measure(Pt.BUILD_COLUMN_INDEX,()=>{this.ensureRecentData(t.sheet,t.col,e),"string"===typeof e&&(e=Br(e));const n=this.getValueIndex(t.sheet,t.col,e);ea.addValue(n,t.row)})}removeSingleValue(e,t){this.stats.measure(Pt.BUILD_COLUMN_INDEX,()=>{this.ensureRecentData(t.sheet,t.col,e);const n=this.getColumnMap(t.sheet,t.col);"string"===typeof e&&(e=Br(e));const r=n.get(e);if(!r)return;const i=ta(t.row,r.index);i>-1&&r.index.splice(i,1),0===r.index.length&&n.delete(e),0===n.size&&delete this.index.get(t.sheet)[t.col]})}addRows(e,t,n){const r=this.getValueIndex(t.sheet,e,n);ea.shiftRows(r,t.rowStart,t.numberOfRows)}removeRows(e,t,n){const r=this.getValueIndex(t.sheet,e,n);ea.removeRowsFromValues(r,t),ea.shiftRows(r,t.rowEnd+1,-t.numberOfRows)}static addValue(e,t){const n=ta(t,e.index,"lowerBound"),r=e.index[n]===t;r||e.index.splice(n+1,0,t)}static removeRowsFromValues(e,t){const n=ta(t.rowStart,e.index,"upperBound"),r=ta(t.rowEnd,e.index,"lowerBound"),i=n>-1&&r>-1&&n<=r&&e.index[n]<=t.rowEnd;i&&e.index.splice(n,r-n+1)}static shiftRows(e,t,n){const r=ta(t,e.index,"upperBound");if(-1!==r)for(let i=r;i<e.index.length;++i)e.index[i]+=n}}function ta(e,t,n="upperBound"){let r=0,i=t.length-1;while(r<=i){const n=Math.floor((r+i)/2);if(e>t[n])r=n+1;else{if(!(e<t[n]))return n;i=n-1}}const s="lowerBound"===n?i:r,o=s>=0&&s<=t.length;return o?s:-1}
  680. /**
  681. * @license
  682. * Copyright (c) 2024 Handsoncode. All rights reserved.
  683. */function na(e,t,n){return t.useColumnIndex?new ea(e,t,n):new qo(e)}
  684. /**
  685. * @license
  686. * Copyright (c) 2024 Handsoncode. All rights reserved.
  687. */class ra{constructor(e){this.config=e;const t="."===this.config.thousandSeparator?"\\"+this.config.thousandSeparator:this.config.thousandSeparator,n="."===this.config.decimalSeparator?"\\"+this.config.decimalSeparator:this.config.decimalSeparator;this.numberPattern=new RegExp(`^([+-]?((${n}\\d+)|(\\d+(${t}\\d{3,})*(${n}\\d*)?)))(e[+-]?\\d+)?$`),this.allThousandSeparatorsRegex=new RegExp(""+t,"g")}numericStringToMaybeNumber(e){if(this.numberPattern.test(e)){const t=this.numericStringToNumber(e);if(isNaN(t))return;return t}}numericStringToNumber(e){const t=e.replace(this.allThousandSeparatorsRegex,"").replace(this.config.decimalSeparator,".");return Number(t)}}
  688. /**
  689. * @license
  690. * Copyright (c) 2024 Handsoncode. All rights reserved.
  691. */class ia{constructor(e,t,n){this.dependencyGraph=e,this.unparser=t,this.exporter=n}getCellHyperlink(e){const t=this.dependencyGraph.getCell(e);if(t instanceof Ln){const e=t.getFormula(this.dependencyGraph.lazilyTransformingAstService);if("HYPERLINK"===e.procedureName)return e.hyperlink}}getCellFormula(e,t){const n=this.dependencyGraph.getCell(e);if(n instanceof Ln){const r=n.getFormula(this.dependencyGraph.lazilyTransformingAstService);return t=null!==t&&void 0!==t?t:e,this.unparser.unparse(r,t)}if(n instanceof Cn){const r=n.getAddress(this.dependencyGraph.lazilyTransformingAstService);if(r.row!==e.row||r.col!==e.col||r.sheet!==e.sheet)return;t=null!==t&&void 0!==t?t:e;const i=n.getFormula(this.dependencyGraph.lazilyTransformingAstService);if(void 0!==i)return this.unparser.unparse(i,t)}else if(n instanceof Jn)return n.getFormula()}getCellSerialized(e,t){var n;return null!==(n=this.getCellFormula(e,t))&&void 0!==n?n:this.getRawValue(e)}getCellValue(e){return this.exporter.exportValue(this.dependencyGraph.getScalarValue(e))}getRawValue(e){return this.dependencyGraph.getRawValue(e)}getSheetValues(e){return this.genericSheetGetter(e,e=>this.getCellValue(e))}getSheetFormulas(e){return this.genericSheetGetter(e,e=>this.getCellFormula(e))}genericSheetGetter(e,t){const n=this.dependencyGraph.getSheetHeight(e),r=this.dependencyGraph.getSheetWidth(e),i=new Array(n);for(let s=0;s<n;s++){i[s]=new Array(r);for(let n=0;n<r;n++){const r=mr(e,n,s);i[s][n]=t(r)}for(let e=r-1;e>=0;e--){if(null!==i[s][e]&&void 0!==i[s][e])break;i[s].pop()}}for(let s=n-1;s>=0;s--){if(0!==i[s].length)break;i.pop()}return i}genericAllSheetsGetter(e){const t={};for(const n of this.dependencyGraph.sheetMapping.displayNames()){const r=this.dependencyGraph.sheetMapping.fetch(n);t[n]=e(r)}return t}getSheetSerialized(e){return this.genericSheetGetter(e,e=>this.getCellSerialized(e))}getAllSheetsValues(){return this.genericAllSheetsGetter(e=>this.getSheetValues(e))}getAllSheetsFormulas(){return this.genericAllSheetsGetter(e=>this.getSheetFormulas(e))}getAllSheetsSerialized(){return this.genericAllSheetsGetter(e=>this.getSheetSerialized(e))}getAllNamedExpressionsSerialized(){const e=[];let t=0;for(const n of this.dependencyGraph.sheetMapping.displayNames()){const r=this.dependencyGraph.sheetMapping.fetch(n);e[r]=t,t++}return this.dependencyGraph.namedExpressions.getAllNamedExpressions().map(t=>({name:t.expression.displayName,expression:this.getCellSerialized(t.expression.address),scope:void 0!==t.scope?e[t.scope]:void 0,options:t.expression.options}))}withNewConfig(e,t){const n=new ct(e,ot(e),this.dependencyGraph.sheetMapping.fetchDisplayName,t);return new ia(this.dependencyGraph,n,this.exporter)}}
  692. /**
  693. * @license
  694. * Copyright (c) 2024 Handsoncode. All rights reserved.
  695. */class sa{static buildFromSheets(e,t={},n=[]){const r=new ma(t);return this.buildEngine(r,e,n)}static buildFromSheet(e,t={},n=[]){const r=new ma(t),i=r.translationPackage.getUITranslation(Un.NEW_SHEET_PREFIX)+"1";return this.buildEngine(r,{[i]:e},n)}static buildEmpty(e={},t=[]){return this.buildEngine(new ma(e),{},t)}static rebuildWithConfig(e,t,n,r){return this.buildEngine(e,t,n,r)}static buildEngine(e,t={},n=[],r=(e.useStats?new Vt:new Ut)){r.start(Pt.BUILD_ENGINE_TOTAL);const i=new Ps,s=new Ao(e),o=new Ko(r),a=Kn.buildEmpty(o,e,s,i,r),l=na(a,e,r),c=a.sheetMapping,u=a.addressMapping;for(const E in t)if(Object.prototype.hasOwnProperty.call(t,E)){const n=t[E];Xs(n);const r=js(n);if(r.height>e.maxRows||r.width>e.maxColumns)throw new Zt;const i=c.addSheet(E);u.autoAddSheet(i,r)}const h=new ht(e,s,c.get);o.parser=h;const d=new ct(e,ot(e),c.fetchDisplayName,i),m=new Di(e),g=new ra(e),p=new _r(e,m,g),f=new Es(e,m,g),R=new ri(e,s),y=new Bs(e,a,l,f,h,r,o,i,R),M=new wo(e,y);o.undoRedo=M;const S=new Ls(e,a,y),b=new To(e,y,M,S,a,l,h,f,o,i);n.forEach(e=>{b.ensureItIsPossibleToAddNamedExpression(e.name,e.expression,e.scope),b.operations.addNamedExpression(e.name,e.expression,e.scope,e.options)});const w=new No(e,i,c.fetchDisplayName,o),T=new ia(a,d,w),O=new Wo(e,a,l,r,p,s,i,T,R,m);r.measure(Pt.GRAPH_BUILD,()=>{const e=new _o(a,l,h,f,r,R);e.buildGraph(t,r)});const v=new Eo(e,r,O,o,a,l);return v.run(),r.end(Pt.BUILD_ENGINE_TOTAL),{config:e,stats:r,dependencyGraph:a,columnSearch:l,parser:h,unparser:d,cellContentParser:f,evaluator:v,lazilyTransformingAstService:o,crudOperations:b,exporter:w,namedExpressions:i,serialization:T,functionRegistry:s}}}
  696. /**
  697. * @license
  698. * Copyright (c) 2024 Handsoncode. All rights reserved.
  699. */function oa(e){for(const[t,n]of Object.entries(e))n instanceof Function?e[t]=aa(n):delete e[t]}function aa(e){return()=>{throw new Error(`The "${e}" method cannot be called because this HyperFormula instance has been destroyed`)}}var la,ca=n("c0e2");
  700. /**
  701. * @license
  702. * Copyright (c) 2024 Handsoncode. All rights reserved.
  703. */(function(e){e["SheetAdded"]="sheetAdded",e["SheetRemoved"]="sheetRemoved",e["SheetRenamed"]="sheetRenamed",e["NamedExpressionAdded"]="namedExpressionAdded",e["NamedExpressionRemoved"]="namedExpressionRemoved",e["ValuesUpdated"]="valuesUpdated",e["EvaluationSuspended"]="evaluationSuspended",e["EvaluationResumed"]="evaluationResumed"})(la||(la={}));class ua extends ca["TinyEmitter"]{emit(e,...t){return super.emit(e,...t),this}}
  704. /**
  705. * @license
  706. * Copyright (c) 2024 Handsoncode. All rights reserved.
  707. */class ha{constructor(e,t,n,r,i,s,o,a,l,c,u,h,d,m){this._config=e,this._stats=t,this._dependencyGraph=n,this._columnSearch=r,this._parser=i,this._unparser=s,this._cellContentParser=o,this._evaluator=a,this._lazilyTransformingAstService=l,this._crudOperations=c,this._exporter=u,this._namedExpressions=h,this._serialization=d,this._functionRegistry=m,this._emitter=new ua,this._evaluationSuspended=!1}static get defaultConfig(){return pa()}get graph(){return this.dependencyGraph.graph}get rangeMapping(){return this.dependencyGraph.rangeMapping}get arrayMapping(){return this.dependencyGraph.arrayMapping}get sheetMapping(){return this.dependencyGraph.sheetMapping}get addressMapping(){return this.dependencyGraph.addressMapping}get dependencyGraph(){return this._dependencyGraph}get evaluator(){return this._evaluator}get columnSearch(){return this._columnSearch}get lazilyTransformingAstService(){return this._lazilyTransformingAstService}get licenseKeyValidityState(){return this._config.licenseKeyValidityState}static buildFromArray(e,t={},n=[]){return this.buildFromEngineState(sa.buildFromSheet(e,t,n))}static buildFromSheets(e,t={},n=[]){return this.buildFromEngineState(sa.buildFromSheets(e,t,n))}static buildEmpty(e={},t=[]){return this.buildFromEngineState(sa.buildEmpty(e,t))}static getLanguage(e){ui(e,"string","languageCode");const t=this.registeredLanguages.get(e);if(void 0===t)throw new mn;return t}static registerLanguage(e,t){if(ui(e,"string","languageCode"),this.registeredLanguages.has(e))throw new gn;this.registeredLanguages.set(e,Vn(t))}static unregisterLanguage(e){if(ui(e,"string","languageCode"),!this.registeredLanguages.has(e))throw new mn;this.registeredLanguages.delete(e)}static getRegisteredLanguagesCodes(){return Array.from(this.registeredLanguages.keys())}static registerFunctionPlugin(e,t){Ao.registerFunctionPlugin(e,t)}static unregisterFunctionPlugin(e){Ao.unregisterFunctionPlugin(e)}static registerFunction(e,t,n){ui(e,"string","functionId"),Ao.registerFunction(e,t,n)}static unregisterFunction(e){ui(e,"string","functionId"),Ao.unregisterFunction(e)}static unregisterAllFunctions(){Ao.unregisterAll()}static getRegisteredFunctionNames(e){ui(e,"string","code");const t=Ao.getRegisteredFunctionIds(),n=this.getLanguage(e);return n.getFunctionTranslations(t)}static getFunctionPlugin(e){return ui(e,"string","functionId"),Ao.getFunctionPlugin(e)}static getAllFunctionPlugins(){return Ao.getPlugins()}static buildFromEngineState(e){return new ha(e.config,e.stats,e.dependencyGraph,e.columnSearch,e.parser,e.unparser,e.cellContentParser,e.evaluator,e.lazilyTransformingAstService,e.crudOperations,e.exporter,e.namedExpressions,e.serialization,e.functionRegistry)}getCellValue(e){if(!Rr(e))throw new sn("SimpleCellAddress","cellAddress");return this.ensureEvaluationIsNotSuspended(),this._serialization.getCellValue(e)}getCellFormula(e){if(!Rr(e))throw new sn("SimpleCellAddress","cellAddress");return this._serialization.getCellFormula(e)}getCellHyperlink(e){if(!Rr(e))throw new sn("SimpleCellAddress","cellAddress");return this.ensureEvaluationIsNotSuspended(),this._serialization.getCellHyperlink(e)}getCellSerialized(e){if(!Rr(e))throw new sn("SimpleCellAddress","cellAddress");return this.ensureEvaluationIsNotSuspended(),this._serialization.getCellSerialized(e)}getSheetValues(e){return ui(e,"number","sheetId"),this.ensureEvaluationIsNotSuspended(),this._serialization.getSheetValues(e)}getSheetFormulas(e){return ui(e,"number","sheetId"),this._serialization.getSheetFormulas(e)}getSheetSerialized(e){return ui(e,"number","sheetId"),this.ensureEvaluationIsNotSuspended(),this._serialization.getSheetSerialized(e)}getAllSheetsDimensions(){return this._serialization.genericAllSheetsGetter(e=>this.getSheetDimensions(e))}getSheetDimensions(e){return ui(e,"number","sheetId"),{width:this.dependencyGraph.getSheetWidth(e),height:this.dependencyGraph.getSheetHeight(e)}}getAllSheetsValues(){return this.ensureEvaluationIsNotSuspended(),this._serialization.getAllSheetsValues()}getAllSheetsFormulas(){return this._serialization.getAllSheetsFormulas()}getAllSheetsSerialized(){return this.ensureEvaluationIsNotSuspended(),this._serialization.getAllSheetsSerialized()}updateConfig(e){const t=Object.entries(e).every(([e,t])=>this._config[e]===t);t||this.rebuildWithConfig(e)}getConfig(){return this._config.getConfig()}rebuildAndRecalculate(){this.rebuildWithConfig({})}getStats(){return this._stats.snapshot()}undo(){return this._crudOperations.undo(),this.recomputeIfDependencyGraphNeedsIt()}redo(){return this._crudOperations.redo(),this.recomputeIfDependencyGraphNeedsIt()}isThereSomethingToUndo(){return this._crudOperations.isThereSomethingToUndo()}isThereSomethingToRedo(){return this._crudOperations.isThereSomethingToRedo()}isItPossibleToSetCellContents(e){let t;if(Rr(e))t=new Tr(e,e);else{if(!br(e))throw new sn("SimpleCellAddress | SimpleCellRange","address");t=new Tr(e.start,e.end)}try{this._crudOperations.ensureRangeInSizeLimits(t);for(const e of t.addresses(this._dependencyGraph))this._crudOperations.ensureItIsPossibleToChangeContent(e)}catch(n){return!1}return!0}setCellContents(e,t){return this._crudOperations.setCellContents(e,t),this.recomputeIfDependencyGraphNeedsIt()}swapRowIndexes(e,t){return ui(e,"number","sheetId"),this._crudOperations.setRowOrder(e,t),this.recomputeIfDependencyGraphNeedsIt()}isItPossibleToSwapRowIndexes(e,t){ui(e,"number","sheetId");try{return this._crudOperations.validateSwapRowIndexes(e,t),this._crudOperations.testRowOrderForArrays(e,t),!0}catch(n){return!1}}setRowOrder(e,t){ui(e,"number","sheetId");const n=this._crudOperations.mappingFromOrder(e,t,"row");return this.swapRowIndexes(e,n)}isItPossibleToSetRowOrder(e,t){ui(e,"number","sheetId");try{const n=this._crudOperations.mappingFromOrder(e,t,"row");return this._crudOperations.validateSwapRowIndexes(e,n),this._crudOperations.testRowOrderForArrays(e,n),!0}catch(n){return!1}}swapColumnIndexes(e,t){return ui(e,"number","sheetId"),this._crudOperations.setColumnOrder(e,t),this.recomputeIfDependencyGraphNeedsIt()}isItPossibleToSwapColumnIndexes(e,t){ui(e,"number","sheetId");try{return this._crudOperations.validateSwapColumnIndexes(e,t),this._crudOperations.testColumnOrderForArrays(e,t),!0}catch(n){return!1}}setColumnOrder(e,t){ui(e,"number","sheetId");const n=this._crudOperations.mappingFromOrder(e,t,"column");return this.swapColumnIndexes(e,n)}isItPossibleToSetColumnOrder(e,t){ui(e,"number","sheetId");try{const n=this._crudOperations.mappingFromOrder(e,t,"column");return this._crudOperations.validateSwapColumnIndexes(e,n),this._crudOperations.testColumnOrderForArrays(e,n),!0}catch(n){return!1}}isItPossibleToAddRows(e,...t){ui(e,"number","sheetId");const n=zs(t);try{return this._crudOperations.ensureItIsPossibleToAddRows(e,...n),!0}catch(r){return!1}}addRows(e,...t){return ui(e,"number","sheetId"),this._crudOperations.addRows(e,...t),this.recomputeIfDependencyGraphNeedsIt()}isItPossibleToRemoveRows(e,...t){ui(e,"number","sheetId");const n=Js(t);try{return this._crudOperations.ensureItIsPossibleToRemoveRows(e,...n),!0}catch(r){return!1}}removeRows(e,...t){return ui(e,"number","sheetId"),this._crudOperations.removeRows(e,...t),this.recomputeIfDependencyGraphNeedsIt()}isItPossibleToAddColumns(e,...t){ui(e,"number","sheetId");const n=zs(t);try{return this._crudOperations.ensureItIsPossibleToAddColumns(e,...n),!0}catch(r){return!1}}addColumns(e,...t){return ui(e,"number","sheetId"),this._crudOperations.addColumns(e,...t),this.recomputeIfDependencyGraphNeedsIt()}isItPossibleToRemoveColumns(e,...t){ui(e,"number","sheetId");const n=Js(t);try{return this._crudOperations.ensureItIsPossibleToRemoveColumns(e,...n),!0}catch(r){return!1}}removeColumns(e,...t){return ui(e,"number","sheetId"),this._crudOperations.removeColumns(e,...t),this.recomputeIfDependencyGraphNeedsIt()}isItPossibleToMoveCells(e,t){if(!Rr(t))throw new sn("SimpleCellAddress","destinationLeftCorner");if(!br(e))throw new sn("SimpleCellRange","source");try{const n=new Tr(e.start,e.end);return this._crudOperations.operations.ensureItIsPossibleToMoveCells(n.start,n.width(),n.height(),t),!0}catch(n){return!1}}moveCells(e,t){if(!Rr(t))throw new sn("SimpleCellAddress","destinationLeftCorner");if(!br(e))throw new sn("SimpleCellRange","source");const n=new Tr(e.start,e.end);return this._crudOperations.moveCells(n.start,n.width(),n.height(),t),this.recomputeIfDependencyGraphNeedsIt()}isItPossibleToMoveRows(e,t,n,r){ui(e,"number","sheetId"),ui(t,"number","startRow"),ui(n,"number","numberOfRows"),ui(r,"number","targetRow");try{return this._crudOperations.ensureItIsPossibleToMoveRows(e,t,n,r),!0}catch(i){return!1}}moveRows(e,t,n,r){return ui(e,"number","sheetId"),ui(t,"number","startRow"),ui(n,"number","numberOfRows"),ui(r,"number","targetRow"),this._crudOperations.moveRows(e,t,n,r),this.recomputeIfDependencyGraphNeedsIt()}isItPossibleToMoveColumns(e,t,n,r){ui(e,"number","sheetId"),ui(t,"number","startColumn"),ui(n,"number","numberOfColumns"),ui(r,"number","targetColumn");try{return this._crudOperations.ensureItIsPossibleToMoveColumns(e,t,n,r),!0}catch(i){return!1}}moveColumns(e,t,n,r){return ui(e,"number","sheetId"),ui(t,"number","startColumn"),ui(n,"number","numberOfColumns"),ui(r,"number","targetColumn"),this._crudOperations.moveColumns(e,t,n,r),this.recomputeIfDependencyGraphNeedsIt()}copy(e){if(!br(e))throw new sn("SimpleCellRange","source");const t=new Tr(e.start,e.end);return this._crudOperations.copy(t.start,t.width(),t.height()),this.getRangeValues(e)}cut(e){if(!br(e))throw new sn("SimpleCellRange","source");const t=new Tr(e.start,e.end);return this._crudOperations.cut(t.start,t.width(),t.height()),this.getRangeValues(e)}paste(e){if(!Rr(e))throw new sn("SimpleCellAddress","targetLeftCorner");return this.ensureEvaluationIsNotSuspended(),this._crudOperations.paste(e),this.recomputeIfDependencyGraphNeedsIt()}isClipboardEmpty(){return this._crudOperations.isClipboardEmpty()}clearClipboard(){this._crudOperations.clearClipboard()}clearRedoStack(){this._crudOperations.undoRedo.clearRedoStack()}clearUndoStack(){this._crudOperations.undoRedo.clearUndoStack()}getRangeValues(e){if(!br(e))throw new sn("SimpleCellRange","source");const t=new Tr(e.start,e.end);return t.arrayOfAddressesInRange().map(e=>e.map(e=>this.getCellValue(e)))}getRangeFormulas(e){if(!br(e))throw new sn("SimpleCellRange","source");const t=new Tr(e.start,e.end);return t.arrayOfAddressesInRange().map(e=>e.map(e=>this.getCellFormula(e)))}getRangeSerialized(e){if(!br(e))throw new sn("SimpleCellRange","source");const t=new Tr(e.start,e.end);return t.arrayOfAddressesInRange().map(e=>e.map(e=>this.getCellSerialized(e)))}getFillRangeData(e,t,n=!1){if(!br(e))throw new sn("SimpleCellRange","source");if(!br(t))throw new sn("SimpleCellRange","target");const r=new Tr(e.start,e.end),i=new Tr(t.start,t.end);return this.ensureEvaluationIsNotSuspended(),i.arrayOfAddressesInRange().map(i=>i.map(i=>{const s=((i.row-(n?t:e).start.row)%r.height()+r.height())%r.height()+e.start.row,o=((i.col-(n?t:e).start.col)%r.width()+r.width())%r.width()+e.start.col;return this._serialization.getCellSerialized({row:s,col:o,sheet:r.sheet},i)}))}isItPossibleToAddSheet(e){ui(e,"string","sheetName");try{return this._crudOperations.ensureItIsPossibleToAddSheet(e),!0}catch(t){return!1}}addSheet(e){void 0!==e&&ui(e,"string","sheetName");const t=this._crudOperations.addSheet(e);return this._emitter.emit(la.SheetAdded,t),t}isItPossibleToRemoveSheet(e){ui(e,"number","sheetId");try{return this._crudOperations.ensureScopeIdIsValid(e),!0}catch(t){return!1}}removeSheet(e){ui(e,"number","sheetId");const t=this.sheetMapping.getDisplayName(e);this._crudOperations.removeSheet(e);const n=this.recomputeIfDependencyGraphNeedsIt();return this._emitter.emit(la.SheetRemoved,t,n),n}isItPossibleToClearSheet(e){ui(e,"number","sheetId");try{return this._crudOperations.ensureScopeIdIsValid(e),!0}catch(t){return!1}}clearSheet(e){return ui(e,"number","sheetId"),this._crudOperations.clearSheet(e),this.recomputeIfDependencyGraphNeedsIt()}isItPossibleToReplaceSheetContent(e,t){ui(e,"number","sheetId");try{return this._crudOperations.ensureScopeIdIsValid(e),this._crudOperations.ensureItIsPossibleToChangeSheetContents(e,t),!0}catch(n){return!1}}setSheetContent(e,t){return ui(e,"number","sheetId"),this._crudOperations.setSheetContent(e,t),this.recomputeIfDependencyGraphNeedsIt()}simpleCellAddressFromString(e,t){return ui(e,"string","cellAddress"),ui(t,"number","sheetId"),x(this.sheetMapping.get,e,t)}simpleCellRangeFromString(e,t){return ui(e,"string","cellRange"),ui(t,"number","sheetId"),D(this.sheetMapping.get,e,t)}simpleCellAddressToString(e,t){if(!Rr(e))throw new sn("SimpleCellAddress","cellAddress");return ui(t,"number","sheetId"),A(this.sheetMapping.fetchDisplayName,e,t)}simpleCellRangeToString(e,t){if(!br(e))throw new sn("SimpleCellRange","cellRange");return ui(t,"number","sheetId"),F(this.sheetMapping.fetchDisplayName,e,t)}getCellDependents(e){let t;if(Rr(e))t=this._dependencyGraph.addressMapping.getCell(e);else{if(!br(e))throw new sn("SimpleCellAddress | SimpleCellRange",e);t=this._dependencyGraph.rangeMapping.getRange(e.start,e.end)}return void 0===t?[]:this._dependencyGraph.getAdjacentNodesAddresses(t)}getCellPrecedents(e){let t;if(Rr(e))t=this._dependencyGraph.addressMapping.getCell(e);else{if(!br(e))throw new sn("SimpleCellAddress | SimpleCellRange",e);t=this._dependencyGraph.rangeMapping.getRange(e.start,e.end)}return void 0===t?[]:this._dependencyGraph.dependencyQueryAddresses(t)}getSheetName(e){return ui(e,"number","sheetId"),this.sheetMapping.getDisplayName(e)}getSheetNames(){return this.sheetMapping.sheetNames()}getSheetId(e){return ui(e,"string","sheetName"),this.sheetMapping.get(e)}doesSheetExist(e){return ui(e,"string","sheetName"),this.sheetMapping.hasSheetWithName(e)}getCellType(e){if(!Rr(e))throw new sn("SimpleCellAddress","cellAddress");const t=this.dependencyGraph.getCell(e);return qn(t,e)}doesCellHaveSimpleValue(e){if(!Rr(e))throw new sn("SimpleCellAddress","cellAddress");return this.getCellType(e)===Xn.VALUE}doesCellHaveFormula(e){if(!Rr(e))throw new sn("SimpleCellAddress","cellAddress");const t=this.getCellType(e);return t===Xn.FORMULA||t===Xn.ARRAYFORMULA}isCellEmpty(e){if(!Rr(e))throw new sn("SimpleCellAddress","cellAddress");return this.getCellType(e)===Xn.EMPTY}isCellPartOfArray(e){if(!Rr(e))throw new sn("SimpleCellAddress","cellAddress");const t=this.getCellType(e);return t===Xn.ARRAY||t===Xn.ARRAYFORMULA}getCellValueType(e){if(!Rr(e))throw new sn("SimpleCellAddress","cellAddress");this.ensureEvaluationIsNotSuspended();const t=this.dependencyGraph.getCellValue(e);return sr(t)}getCellValueDetailedType(e){if(!Rr(e))throw new sn("SimpleCellAddress","cellAddress");this.ensureEvaluationIsNotSuspended();const t=this.dependencyGraph.getCellValue(e);return or(t)}getCellValueFormat(e){if(!Rr(e))throw new sn("SimpleCellAddress","cellAddress");this.ensureEvaluationIsNotSuspended();const t=this.dependencyGraph.getCellValue(e);return ar(t)}countSheets(){return this.sheetMapping.numberOfSheets()}isItPossibleToRenameSheet(e,t){ui(e,"number","sheetId"),ui(t,"string","newName");try{return this._crudOperations.ensureItIsPossibleToRenameSheet(e,t),!0}catch(n){return!1}}renameSheet(e,t){ui(e,"number","sheetId"),ui(t,"string","newName");const n=this._crudOperations.renameSheet(e,t);void 0!==n&&this._emitter.emit(la.SheetRenamed,n,t)}batch(e){this.suspendEvaluation(),this._crudOperations.beginUndoRedoBatchMode();try{e()}catch(t){throw this._crudOperations.commitUndoRedoBatchMode(),this.resumeEvaluation(),t}return this._crudOperations.commitUndoRedoBatchMode(),this.resumeEvaluation()}suspendEvaluation(){this._evaluationSuspended=!0,this._emitter.emit(la.EvaluationSuspended)}resumeEvaluation(){this._evaluationSuspended=!1;const e=this.recomputeIfDependencyGraphNeedsIt();return this._emitter.emit(la.EvaluationResumed,e),e}isEvaluationSuspended(){return this._evaluationSuspended}isItPossibleToAddNamedExpression(e,t,n){ui(e,"string","expressionName"),void 0!==n&&ui(n,"number","scope");try{return this._crudOperations.ensureItIsPossibleToAddNamedExpression(e,t,n),!0}catch(r){return!1}}addNamedExpression(e,t,n,r){ui(e,"string","expressionName"),void 0!==n&&ui(n,"number","scope"),this._crudOperations.addNamedExpression(e,t,n,r);const i=this.recomputeIfDependencyGraphNeedsIt();return this._emitter.emit(la.NamedExpressionAdded,e,i),i}getNamedExpressionValue(e,t){ui(e,"string","expressionName"),void 0!==t&&ui(t,"number","scope"),this.ensureEvaluationIsNotSuspended(),this._crudOperations.ensureScopeIdIsValid(t);const n=this._namedExpressions.namedExpressionForScope(e,t);return n?this._serialization.getCellValue(n.address):void 0}getNamedExpressionFormula(e,t){ui(e,"string","expressionName"),void 0!==t&&ui(t,"number","scope"),this._crudOperations.ensureScopeIdIsValid(t);const n=this._namedExpressions.namedExpressionForScope(e,t);return void 0===n?void 0:this._serialization.getCellFormula(n.address)}getNamedExpression(e,t){ui(e,"string","expressionName"),void 0!==t&&ui(t,"number","scope");const n=this._namedExpressions.namedExpressionForScope(e,t);if(void 0===n)return;const r=this._serialization.getCellFormula(n.address);return{name:e,scope:t,expression:r,options:n.options}}isItPossibleToChangeNamedExpression(e,t,n){ui(e,"string","expressionName"),void 0!==n&&ui(n,"number","scope");try{return this._crudOperations.ensureItIsPossibleToChangeNamedExpression(e,t,n),!0}catch(r){return!1}}changeNamedExpression(e,t,n,r){return ui(e,"string","expressionName"),void 0!==n&&ui(n,"number","scope"),this._crudOperations.changeNamedExpressionExpression(e,n,t,r),this.recomputeIfDependencyGraphNeedsIt()}isItPossibleToRemoveNamedExpression(e,t){ui(e,"string","expressionName"),void 0!==t&&ui(t,"number","scope");try{return this._crudOperations.isItPossibleToRemoveNamedExpression(e,t),!0}catch(n){return!1}}removeNamedExpression(e,t){ui(e,"string","expressionName"),void 0!==t&&ui(t,"number","scope");const n=this._crudOperations.removeNamedExpression(e,t);if(n){const e=this.recomputeIfDependencyGraphNeedsIt();return this._emitter.emit(la.NamedExpressionRemoved,n.displayName,e),e}return[]}listNamedExpressions(e){return void 0!==e&&ui(e,"number","scope"),this._crudOperations.ensureScopeIdIsValid(e),this._namedExpressions.getAllNamedExpressionsNamesInScope(e)}getAllNamedExpressionsSerialized(){return this._serialization.getAllNamedExpressionsSerialized()}normalizeFormula(e){ui(e,"string","formulaString");const{ast:t,address:n}=this.extractTemporaryFormula(e);if(void 0===t)throw new Qt;return this._unparser.unparse(t,n)}calculateFormula(e,t){ui(e,"string","formulaString"),ui(t,"number","sheetId"),this._crudOperations.ensureScopeIdIsValid(t);const{ast:n,address:r,dependencies:i}=this.extractTemporaryFormula(e,t);if(void 0===n)throw new Qt;const s=this.evaluator.runAndForget(n,r,i);return this._exporter.exportScalarOrRange(s)}getNamedExpressionsFromFormula(e){ui(e,"string","formulaString");const{ast:t,dependencies:n}=this.extractTemporaryFormula(e);if(void 0===t)throw new Qt;const r=n.filter(e=>e instanceof yt).map(e=>e.name),i=[...new Set(r)];return i}validateFormula(e){ui(e,"string","formulaString");const{ast:t}=this.extractTemporaryFormula(e);return void 0!==t}getRegisteredFunctionNames(){const e=ha.getLanguage(this._config.language);return e.getFunctionTranslations(this._functionRegistry.getRegisteredFunctionIds())}getFunctionPlugin(e){return ui(e,"string","functionId"),this._functionRegistry.getFunctionPlugin(e)}getAllFunctionPlugins(){return this._functionRegistry.getPlugins()}numberToDateTime(e){return ui(e,"number","val"),this._evaluator.interpreter.dateTimeHelper.numberToSimpleDateTime(e)}numberToDate(e){return ui(e,"number","val"),this._evaluator.interpreter.dateTimeHelper.numberToSimpleDate(e)}numberToTime(e){return ui(e,"number","val"),Vi(e)}on(e,t){this._emitter.on(e,t)}once(e,t){this._emitter.once(e,t)}off(e,t){this._emitter.off(e,t)}destroy(){oa(this)}ensureEvaluationIsNotSuspended(){if(this._evaluationSuspended)throw new un}extractTemporaryFormula(e,t=1){const n=this._cellContentParser.parse(e),r={sheet:t,col:0,row:0};if(!(n instanceof Ss.Formula))return{address:r,dependencies:[]};const{ast:i,errors:s,dependencies:o}=this._parser.parse(n.formula,r);return s.length>0?{address:r,dependencies:[]}:{ast:i,address:r,dependencies:o}}rebuildWithConfig(e){const t=this._config.mergeConfig(e),n=this._config.mergeConfig({language:e.language}),r=this._serialization.withNewConfig(n,this._namedExpressions).getAllSheetsSerialized(),i=this._serialization.getAllNamedExpressionsSerialized(),s=sa.rebuildWithConfig(t,r,i,this._stats);this._config=s.config,this._stats=s.stats,this._dependencyGraph=s.dependencyGraph,this._columnSearch=s.columnSearch,this._parser=s.parser,this._unparser=s.unparser,this._cellContentParser=s.cellContentParser,this._evaluator=s.evaluator,this._lazilyTransformingAstService=s.lazilyTransformingAstService,this._crudOperations=s.crudOperations,this._exporter=s.exporter,this._namedExpressions=s.namedExpressions,this._serialization=s.serialization,this._functionRegistry=s.functionRegistry}recomputeIfDependencyGraphNeedsIt(){if(this._evaluationSuspended)return[];{const e=this._crudOperations.getAndClearContentChanges(),t=this.dependencyGraph.verticesToRecompute();this.dependencyGraph.clearDirtyVertices(),t.length>0&&e.addAll(this.evaluator.partialRun(t));const n=e.exportChanges(this._exporter);return e.isEmpty()||this._emitter.emit(la.ValuesUpdated,n),n}}}ha.version="2.7.1",ha.buildDate="18/07/2024 11:23:17",ha.releaseDate="18/07/2024",ha.languages={},ha.registeredLanguages=new Map;
  708. /**
  709. * @license
  710. * Copyright (c) 2024 Handsoncode. All rights reserved.
  711. */
  712. const da=new WeakMap;class ma{constructor(e={},t=!0){const{accentSensitive:n,binarySearchThreshold:r,caseSensitive:i,caseFirst:s,chooseAddressMappingPolicy:o,context:a,currencySymbol:l,dateFormats:c,decimalSeparator:u,evaluateNullToZero:h,functionArgSeparator:d,functionPlugins:m,ignorePunctuation:g,leapYear1900:p,localeLang:f,language:R,ignoreWhiteSpace:y,licenseKey:M,matchWholeCell:S,arrayColumnSeparator:b,arrayRowSeparator:w,maxRows:T,maxColumns:O,nullYear:v,nullDate:E,parseDateTime:C,precisionEpsilon:L,precisionRounding:N,stringifyDateTime:_,stringifyDuration:I,smartRounding:P,timeFormats:x,thousandSeparator:D,useArrayArithmetic:A,useStats:F,undoLimit:Y,useColumnIndex:H,useRegularExpressions:k,useWildcards:V}=e;t&&ma.warnDeprecatedOptions(e),this.useArrayArithmetic=si(A,"boolean","useArrayArithmetic"),this.accentSensitive=si(n,"boolean","accentSensitive"),this.caseSensitive=si(i,"boolean","caseSensitive"),this.caseFirst=si(s,["upper","lower","false"],"caseFirst"),this.ignorePunctuation=si(g,"boolean","ignorePunctuation"),this.chooseAddressMappingPolicy=null!==o&&void 0!==o?o:ma.defaultConfig.chooseAddressMappingPolicy,this.dateFormats=[...li(c,Array.isArray,"array","dateFormats")],this.timeFormats=[...li(x,Array.isArray,"array","timeFormats")],this.functionArgSeparator=si(d,"string","functionArgSeparator"),this.decimalSeparator=si(u,[".",","],"decimalSeparator"),this.language=si(R,"string","language"),this.ignoreWhiteSpace=si(y,["standard","any"],"ignoreWhiteSpace"),this.licenseKey=si(M,"string","licenseKey"),this.thousandSeparator=si(D,["",","," ","."],"thousandSeparator"),this.arrayColumnSeparator=si(b,[",",";"],"arrayColumnSeparator"),this.arrayRowSeparator=si(w,[";","|"],"arrayRowSeparator"),this.localeLang=si(f,"string","localeLang"),this.functionPlugins=[...null!==m&&void 0!==m?m:ma.defaultConfig.functionPlugins],this.smartRounding=si(P,"boolean","smartRounding"),this.evaluateNullToZero=si(h,"boolean","evaluateNullToZero"),this.nullYear=si(v,"number","nullYear"),oi(this.nullYear,"nullYear",0),ai(this.nullYear,"nullYear",100),this.precisionRounding=si(N,"number","precisionRounding"),oi(this.precisionRounding,"precisionRounding",0),this.precisionEpsilon=si(L,"number","precisionEpsilon"),oi(this.precisionEpsilon,"precisionEpsilon",0),this.useColumnIndex=si(H,"boolean","useColumnIndex"),this.useStats=si(F,"boolean","useStats"),this.binarySearchThreshold=null!==r&&void 0!==r?r:ma.defaultConfig.binarySearchThreshold,this.parseDateTime=si(C,"function","parseDateTime"),this.stringifyDateTime=si(_,"function","stringifyDateTime"),this.stringifyDuration=si(I,"function","stringifyDuration"),this.translationPackage=ha.getLanguage(this.language),this.errorMapping=this.translationPackage.buildErrorMapping(),this.nullDate=li(E,Ii,"IDate","nullDate"),this.leapYear1900=si(p,"boolean","leapYear1900"),this.undoLimit=si(Y,"number","undoLimit"),this.useRegularExpressions=si(k,"boolean","useRegularExpressions"),this.useWildcards=si(V,"boolean","useWildcards"),this.matchWholeCell=si(S,"boolean","matchWholeCell"),oi(this.undoLimit,"undoLimit",0),this.maxRows=si(T,"number","maxRows"),oi(this.maxRows,"maxRows",1),this.maxColumns=si(O,"number","maxColumns"),this.currencySymbol=this.setupCurrencySymbol(l),oi(this.maxColumns,"maxColumns",1),this.context=a,da.set(this,{licenseKeyValidityState:ys(this.licenseKey)}),ci({value:this.decimalSeparator,name:"decimalSeparator"},{value:this.functionArgSeparator,name:"functionArgSeparator"},{value:this.thousandSeparator,name:"thousandSeparator"}),ci({value:this.arrayRowSeparator,name:"arrayRowSeparator"},{value:this.arrayColumnSeparator,name:"arrayColumnSeparator"})}setupCurrencySymbol(e){const t=[...li(e,Array.isArray,"array","currencySymbol")];return t.forEach(e=>{if("string"!==typeof e)throw new sn("string[]","currencySymbol");if(""===e)throw new on("currencySymbol")}),t}get licenseKeyValidityState(){return da.get(this).licenseKeyValidityState}getConfig(){return ga(this)}mergeConfig(e){const t=Object.assign({},this.getConfig(),e);return ma.warnDeprecatedOptions(e),new ma(t,!1)}static warnDeprecatedOptions(e){ma.warnDeprecatedIfUsed(e.binarySearchThreshold,"binarySearchThreshold","1.1")}static warnDeprecatedIfUsed(e,t,n,r){void 0!==e&&(void 0===r?console.warn(`${t} option is deprecated since ${n}`):console.warn(`${t} option is deprecated since ${n}, please use ${r}`))}}function ga(e){var t;const n={};for(const r in ma.defaultConfig){const i=null!==(t=e[r])&&void 0!==t?t:ma.defaultConfig[r];Array.isArray(i)?n[r]=[...i]:n[r]=i}return n}function pa(){return ga({})}
  713. /**
  714. * @license
  715. * Copyright (c) 2024 Handsoncode. All rights reserved.
  716. */ma.defaultConfig={accentSensitive:!1,binarySearchThreshold:20,currencySymbol:["$"],caseSensitive:!1,caseFirst:"lower",context:void 0,chooseAddressMappingPolicy:new Xi,dateFormats:["DD/MM/YYYY","DD/MM/YY"],decimalSeparator:".",evaluateNullToZero:!1,functionArgSeparator:",",functionPlugins:[],ignorePunctuation:!1,language:"enGB",ignoreWhiteSpace:"standard",licenseKey:"",leapYear1900:!1,localeLang:"en",matchWholeCell:!0,arrayColumnSeparator:",",arrayRowSeparator:";",maxRows:4e4,maxColumns:18278,nullYear:30,nullDate:{year:1899,month:12,day:30},parseDateTime:Mi,precisionEpsilon:1e-13,precisionRounding:14,smartRounding:!0,stringifyDateTime:as,stringifyDuration:os,timeFormats:["hh:mm","hh:mm:ss.sss"],thousandSeparator:"",undoLimit:20,useRegularExpressions:!1,useWildcards:!0,useColumnIndex:!1,useStats:!1,useArrayArithmetic:!1};const fa={errors:{CYCLE:"#CYCLE!",DIV_BY_ZERO:"#DIV/0!",ERROR:"#ERROR!",NA:"#N/A",NAME:"#NAME?",NUM:"#NUM!",REF:"#REF!",SPILL:"#SPILL!",VALUE:"#VALUE!"},functions:{FILTER:"FILTER",ADDRESS:"ADDRESS",ARRAY_CONSTRAIN:"ARRAY_CONSTRAIN",ARRAYFORMULA:"ARRAYFORMULA",ABS:"ABS",ACOS:"ACOS",ACOSH:"ACOSH",ACOT:"ACOT",ACOTH:"ACOTH",AND:"AND",ARABIC:"ARABIC",ASIN:"ASIN",ASINH:"ASINH",ATAN2:"ATAN2",ATAN:"ATAN",ATANH:"ATANH",AVERAGE:"AVERAGE",AVERAGEA:"AVERAGEA",AVERAGEIF:"AVERAGEIF",BASE:"BASE",BIN2DEC:"BIN2DEC",BIN2HEX:"BIN2HEX",BIN2OCT:"BIN2OCT",BITAND:"BITAND",BITLSHIFT:"BITLSHIFT",BITOR:"BITOR",BITRSHIFT:"BITRSHIFT",BITXOR:"BITXOR",CEILING:"CEILING",CHAR:"CHAR",CHOOSE:"CHOOSE",CLEAN:"CLEAN",CODE:"CODE",COLUMN:"COLUMN",COLUMNS:"COLUMNS",CONCATENATE:"CONCATENATE",CORREL:"CORREL",COS:"COS",COSH:"COSH",COT:"COT",COTH:"COTH",COUNT:"COUNT",COUNTA:"COUNTA",COUNTBLANK:"COUNTBLANK",COUNTIF:"COUNTIF",COUNTIFS:"COUNTIFS",COUNTUNIQUE:"COUNTUNIQUE",CSC:"CSC",CSCH:"CSCH",CUMIPMT:"CUMIPMT",CUMPRINC:"CUMPRINC",DATE:"DATE",DATEDIF:"DATEDIF",DATEVALUE:"DATEVALUE",DAY:"DAY",DAYS360:"DAYS360",DAYS:"DAYS",DB:"DB",DDB:"DDB",DEC2BIN:"DEC2BIN",DEC2HEX:"DEC2HEX",DEC2OCT:"DEC2OCT",DECIMAL:"DECIMAL",DEGREES:"DEGREES",DELTA:"DELTA",DOLLARDE:"DOLLARDE",DOLLARFR:"DOLLARFR",EDATE:"EDATE",EFFECT:"EFFECT",EOMONTH:"EOMONTH",ERF:"ERF",ERFC:"ERFC",EVEN:"EVEN",EXACT:"EXACT",EXP:"EXP",FALSE:"FALSE",FIND:"FIND",FORMULATEXT:"FORMULATEXT",FV:"FV",FVSCHEDULE:"FVSCHEDULE",HEX2BIN:"HEX2BIN",HEX2DEC:"HEX2DEC",HEX2OCT:"HEX2OCT",HLOOKUP:"HLOOKUP",HOUR:"HOUR",HYPERLINK:"HYPERLINK",IF:"IF",IFERROR:"IFERROR",IFNA:"IFNA",IFS:"IFS",INDEX:"INDEX",INT:"INT",INTERVAL:"INTERVAL",IPMT:"IPMT",ISBINARY:"ISBINARY",ISBLANK:"ISBLANK",ISERR:"ISERR",ISERROR:"ISERROR",ISEVEN:"ISEVEN",ISFORMULA:"ISFORMULA",ISLOGICAL:"ISLOGICAL",ISNA:"ISNA",ISNONTEXT:"ISNONTEXT",ISNUMBER:"ISNUMBER",ISODD:"ISODD",ISOWEEKNUM:"ISOWEEKNUM",ISPMT:"ISPMT",ISREF:"ISREF",ISTEXT:"ISTEXT",LEFT:"LEFT",LEN:"LEN",LN:"LN",LOG10:"LOG10",LOG:"LOG",LOWER:"LOWER",MATCH:"MATCH",MAX:"MAX",MAXA:"MAXA",MAXIFS:"MAXIFS",MAXPOOL:"MAXPOOL",MEDIAN:"MEDIAN",MEDIANPOOL:"MEDIANPOOL",MID:"MID",MIN:"MIN",MINA:"MINA",MINIFS:"MINIFS",MINUTE:"MINUTE",MIRR:"MIRR",MMULT:"MMULT",MOD:"MOD",MONTH:"MONTH",NA:"NA",NETWORKDAYS:"NETWORKDAYS","NETWORKDAYS.INTL":"NETWORKDAYS.INTL",NOMINAL:"NOMINAL",NOT:"NOT",NOW:"NOW",NPER:"NPER",NPV:"NPV",OCT2BIN:"OCT2BIN",OCT2DEC:"OCT2DEC",OCT2HEX:"OCT2HEX",ODD:"ODD",OFFSET:"OFFSET",OR:"OR",PI:"PI",PMT:"PMT",PDURATION:"PDURATION",PRODUCT:"PRODUCT",POWER:"POWER",PPMT:"PPMT",PROPER:"PROPER",PV:"PV",RADIANS:"RADIANS",RAND:"RAND",RATE:"RATE",REPLACE:"REPLACE",REPT:"REPT",RIGHT:"RIGHT",ROMAN:"ROMAN",ROUND:"ROUND",ROUNDDOWN:"ROUNDDOWN",ROUNDUP:"ROUNDUP",ROW:"ROW",ROWS:"ROWS",RRI:"RRI",SEARCH:"SEARCH",SEC:"SEC",SECH:"SECH",SECOND:"SECOND",SHEET:"SHEET",SHEETS:"SHEETS",SIN:"SIN",SINH:"SINH",SLN:"SLN",SPLIT:"SPLIT",SQRT:"SQRT",STDEVA:"STDEVA","STDEV.P":"STDEV.P",STDEVPA:"STDEVPA","STDEV.S":"STDEV.S",SUBSTITUTE:"SUBSTITUTE",SUBTOTAL:"SUBTOTAL",SUM:"SUM",SUMIF:"SUMIF",SUMIFS:"SUMIFS",SUMPRODUCT:"SUMPRODUCT",SUMSQ:"SUMSQ",SWITCH:"SWITCH",SYD:"SYD",T:"T",TAN:"TAN",TANH:"TANH",TBILLEQ:"TBILLEQ",TBILLPRICE:"TBILLPRICE",TBILLYIELD:"TBILLYIELD",TEXT:"TEXT",TIME:"TIME",TIMEVALUE:"TIMEVALUE",TODAY:"TODAY",TRANSPOSE:"TRANSPOSE",TRIM:"TRIM",TRUE:"TRUE",TRUNC:"TRUNC",UNICHAR:"UNICHAR",UNICODE:"UNICODE",UPPER:"UPPER",VARA:"VARA","VAR.P":"VAR.P",VARPA:"VARPA","VAR.S":"VAR.S",VLOOKUP:"VLOOKUP",WEEKDAY:"WEEKDAY",WEEKNUM:"WEEKNUM",WORKDAY:"WORKDAY","WORKDAY.INTL":"WORKDAY.INTL",XNPV:"XNPV",XOR:"XOR",YEAR:"YEAR",YEARFRAC:"YEARFRAC","HF.ADD":"HF.ADD","HF.CONCAT":"HF.CONCAT","HF.DIVIDE":"HF.DIVIDE","HF.EQ":"HF.EQ","HF.GT":"HF.GT","HF.GTE":"HF.GTE","HF.LT":"HF.LT","HF.LTE":"HF.LTE","HF.MINUS":"HF.MINUS","HF.MULTIPLY":"HF.MULTIPLY","HF.NE":"HF.NE","HF.POW":"HF.POW","HF.UMINUS":"HF.UMINUS","HF.UNARY_PERCENT":"HF.UNARY_PERCENT","HF.UPLUS":"HF.UPLUS",VARP:"VARP",VAR:"VAR",STDEVP:"STDEVP",STDEV:"STDEV","EXPON.DIST":"EXPON.DIST",FISHER:"FISHER",FISHERINV:"FISHERINV",GAMMA:"GAMMA","GAMMA.DIST":"GAMMA.DIST",GAMMALN:"GAMMALN","GAMMALN.PRECISE":"GAMMALN.PRECISE","GAMMA.INV":"GAMMA.INV",GAUSS:"GAUSS",FACT:"FACT",FACTDOUBLE:"FACTDOUBLE",COMBIN:"COMBIN",COMBINA:"COMBINA",GCD:"GCD",LCM:"LCM",MROUND:"MROUND",MULTINOMIAL:"MULTINOMIAL",QUOTIENT:"QUOTIENT",RANDBETWEEN:"RANDBETWEEN",SERIESSUM:"SERIESSUM",SIGN:"SIGN",SQRTPI:"SQRTPI",SUMX2MY2:"SUMX2MY2",SUMX2PY2:"SUMX2PY2",SUMXMY2:"SUMXMY2",EXPONDIST:"EXPONDIST",GAMMADIST:"GAMMADIST",GAMMAINV:"GAMMAINV","BETA.DIST":"BETA.DIST",BETADIST:"BETADIST","BETA.INV":"BETA.INV",BETAINV:"BETAINV","BINOM.DIST":"BINOM.DIST",BINOMDIST:"BINOMDIST","BINOM.INV":"BINOM.INV",BESSELI:"BESSELI",BESSELJ:"BESSELJ",BESSELK:"BESSELK",BESSELY:"BESSELY","CHISQ.DIST":"CHISQ.DIST","CHISQ.DIST.RT":"CHISQ.DIST.RT","CHISQ.INV":"CHISQ.INV","CHISQ.INV.RT":"CHISQ.INV.RT",CHIDIST:"CHIDIST",CHIINV:"CHIINV","F.DIST":"F.DIST","F.DIST.RT":"F.DIST.RT","F.INV":"F.INV","F.INV.RT":"F.INV.RT",FDIST:"FDIST",FINV:"FINV",WEIBULL:"WEIBULL","WEIBULL.DIST":"WEIBULL.DIST",POISSON:"POISSON","POISSON.DIST":"POISSON.DIST","HYPGEOM.DIST":"HYPGEOM.DIST",HYPGEOMDIST:"HYPGEOMDIST","T.DIST":"T.DIST","T.DIST.2T":"T.DIST.2T","T.DIST.RT":"T.DIST.RT","T.INV":"T.INV","T.INV.2T":"T.INV.2T",TDIST:"TDIST",TINV:"TINV",LOGINV:"LOGINV","LOGNORM.DIST":"LOGNORM.DIST","LOGNORM.INV":"LOGNORM.INV",LOGNORMDIST:"LOGNORMDIST","NORM.DIST":"NORM.DIST","NORM.INV":"NORM.INV","NORM.S.DIST":"NORM.S.DIST","NORM.S.INV":"NORM.S.INV",NORMDIST:"NORMDIST",NORMINV:"NORMINV",NORMSDIST:"NORMSDIST",NORMSINV:"NORMSINV",PHI:"PHI","NEGBINOM.DIST":"NEGBINOM.DIST",NEGBINOMDIST:"NEGBINOMDIST",COMPLEX:"COMPLEX",IMABS:"IMABS",IMAGINARY:"IMAGINARY",IMARGUMENT:"IMARGUMENT",IMCONJUGATE:"IMCONJUGATE",IMCOS:"IMCOS",IMCOSH:"IMCOSH",IMCOT:"IMCOT",IMCSC:"IMCSC",IMCSCH:"IMCSCH",IMDIV:"IMDIV",IMEXP:"IMEXP",IMLN:"IMLN",IMLOG10:"IMLOG10",IMLOG2:"IMLOG2",IMPOWER:"IMPOWER",IMPRODUCT:"IMPRODUCT",IMREAL:"IMREAL",IMSEC:"IMSEC",IMSECH:"IMSECH",IMSIN:"IMSIN",IMSINH:"IMSINH",IMSQRT:"IMSQRT",IMSUB:"IMSUB",IMSUM:"IMSUM",IMTAN:"IMTAN",LARGE:"LARGE",SMALL:"SMALL",AVEDEV:"AVEDEV",CONFIDENCE:"CONFIDENCE","CONFIDENCE.NORM":"CONFIDENCE.NORM","CONFIDENCE.T":"CONFIDENCE.T",DEVSQ:"DEVSQ",GEOMEAN:"GEOMEAN",HARMEAN:"HARMEAN",CRITBINOM:"CRITBINOM","COVARIANCE.P":"COVARIANCE.P","COVARIANCE.S":"COVARIANCE.S",COVAR:"COVAR",PEARSON:"PEARSON",RSQ:"RSQ",STANDARDIZE:"STANDARDIZE","Z.TEST":"Z.TEST",ZTEST:"ZTEST","F.TEST":"F.TEST",FTEST:"FTEST",STEYX:"STEYX",SLOPE:"SLOPE","CHISQ.TEST":"CHISQ.TEST",CHITEST:"CHITEST","T.TEST":"T.TEST",TTEST:"TTEST",SKEW:"SKEW","SKEW.P":"SKEW.P",WEIBULLDIST:"WEIBULLDIST",VARS:"VARS",TINV2T:"TINV2T",TDISTRT:"TDISTRT",TDIST2T:"TDIST2T",STDEVS:"STDEVS",FINVRT:"FINVRT",FDISTRT:"FDISTRT",CHIDISTRT:"CHIDISTRT",CHIINVRT:"CHIINVRT",COVARIANCEP:"COVARIANCEP",COVARIANCES:"COVARIANCES",LOGNORMINV:"LOGNORMINV",POISSONDIST:"POISSONDIST",SKEWP:"SKEWP","CEILING.MATH":"CEILING.MATH",FLOOR:"FLOOR","FLOOR.MATH":"FLOOR.MATH","CEILING.PRECISE":"CEILING.PRECISE","FLOOR.PRECISE":"FLOOR.PRECISE","ISO.CEILING":"ISO.CEILING"},langCode:"enGB",ui:{NEW_SHEET_PREFIX:"Sheet"}};var Ra,ya=fa;
  717. /**
  718. * @license
  719. * Copyright (c) 2024 Handsoncode. All rights reserved.
  720. */(function(e){e[e["FullyAbsolute"]=1]="FullyAbsolute",e[e["RowAbsoluteColRelative"]=2]="RowAbsoluteColRelative",e[e["RowRelativeColAbsolute"]=3]="RowRelativeColAbsolute",e[e["FullyRelative"]=4]="FullyRelative"})(Ra||(Ra={}));class Ma extends qr{verifyAddressArguments(e,t,n,r){if(r){if(e<1||t<1)return new lr(Wn.VALUE,Ce.LessThanOne)}else if(Ra.FullyAbsolute==n){if(e<1||t<1)return new lr(Wn.VALUE,Ce.LessThanOne)}else if(Ra.RowAbsoluteColRelative==n){if(e<1)return new lr(Wn.VALUE,Ce.LessThanOne)}else if(Ra.RowRelativeColAbsolute==n&&t<1)return new lr(Wn.VALUE,Ce.LessThanOne)}address(e,t){return this.runFunction(e.args,t,this.metadata("ADDRESS"),(e,t,n,r,i)=>{const s=this.verifyAddressArguments(e,t,n,r);if(void 0!==s)return s;const o=H(t-1);let a="";void 0!==i&&null!==i&&(a=i+"!");const l=0==t?"C":`C[${t}]`,c=0==e?"R":`R[${e}]`;return Ra.FullyRelative==n?r?`${a}${o}${e}`:`${a}${c}${l}`:Ra.RowRelativeColAbsolute==n?r?`${a}$${o}${e}`:`${a}${c}C${t}`:Ra.RowAbsoluteColRelative==n?r?`${a}${o}$${e}`:`${a}R${e}${l}`:r?`${a}$${o}$${e}`:`${a}R${e}C${t}`})}}Ma.implementedFunctions={ADDRESS:{method:"address",parameters:[{argumentType:$r.NUMBER},{argumentType:$r.NUMBER},{argumentType:$r.NUMBER,optionalArg:!0,defaultValue:1,minValue:1,maxValue:4},{argumentType:$r.BOOLEAN,optionalArg:!0,defaultValue:!0},{argumentType:$r.STRING,optionalArg:!0}]}};
  721. /**
  722. * @license
  723. * Copyright (c) 2024 Handsoncode. All rights reserved.
  724. */
  725. class Sa extends qr{arrayformula(e,t){return this.runFunction(e.args,t,this.metadata("ARRAYFORMULA"),e=>e)}arrayformulaArraySize(e,t){if(1!==e.args.length)return ei.error();const n=this.metadata("ARRAYFORMULA"),r=e.args.map(e=>{var r;return this.arraySizeForAst(e,new Er(t.formulaAddress,t.arraysFlag||null!==(r=null===n||void 0===n?void 0:n.arrayFunction)&&void 0!==r&&r))});return r[0]}arrayconstrain(e,t){return this.runFunction(e.args,t,this.metadata("ARRAY_CONSTRAIN"),(e,t,n)=>{t=Math.min(t,e.height()),n=Math.min(n,e.width());const r=e.data,i=[];for(let s=0;s<t;s++)i.push(r[s].slice(0,n));return Ft.onlyValues(i)})}arrayconstrainArraySize(e,t){if(3!==e.args.length)return ei.error();const n=this.metadata("ARRAY_CONSTRAIN"),r=e.args.map(e=>{var r;return this.arraySizeForAst(e,new Er(t.formulaAddress,t.arraysFlag||null!==(r=null===n||void 0===n?void 0:n.arrayFunction)&&void 0!==r&&r))});let{height:i,width:s}=r[0];return e.args[1].type===j.NUMBER&&(i=Math.min(i,e.args[1].value)),e.args[2].type===j.NUMBER&&(s=Math.min(s,e.args[2].value)),i<1||s<1||!Number.isInteger(i)||!Number.isInteger(s)?ei.error():new ei(s,i)}filter(e,t){return this.runFunction(e.args,t,this.metadata("FILTER"),(e,...t)=>{for(const i of t)if(e.width()!==i.width()||e.height()!==i.height())return new lr(Wn.NA,Ce.EqualLength);if(e.width()>1&&e.height()>1)return new lr(Wn.NA,Ce.WrongDimension);const n=e.data,r=[];for(let i=0;i<e.height();i++){const s=[];for(let r=0;r<e.width();r++){let e=!0;for(const n of t){const t=Ar(n.data[i][r]);if(!0!==t){e=!1;break}}e&&s.push(n[i][r])}s.length>0&&r.push(s)}return r.length>0?Ft.onlyValues(r):new lr(Wn.NA,Ce.EmptyRange)})}filterArraySize(e,t){if(e.args.length<=1)return ei.error();const n=this.metadata("FILTER"),r=e.args.map(e=>{var r;return this.arraySizeForAst(e,new Er(t.formulaAddress,t.arraysFlag||null!==(r=null===n||void 0===n?void 0:n.arrayFunction)&&void 0!==r&&r))}),i=Math.max(...r.map(e=>e.width)),s=Math.max(...r.map(e=>e.height));return new ei(i,s)}}Sa.implementedFunctions={ARRAYFORMULA:{method:"arrayformula",arraySizeMethod:"arrayformulaArraySize",arrayFunction:!0,parameters:[{argumentType:$r.ANY}]},ARRAY_CONSTRAIN:{method:"arrayconstrain",arraySizeMethod:"arrayconstrainArraySize",parameters:[{argumentType:$r.RANGE},{argumentType:$r.INTEGER,minValue:1},{argumentType:$r.INTEGER,minValue:1}],vectorizationForbidden:!0},FILTER:{method:"filter",arraySizeMethod:"filterArraySize",arrayFunction:!0,parameters:[{argumentType:$r.RANGE},{argumentType:$r.RANGE}],repeatLastArgs:1}};
  726. /**
  727. * @license
  728. * Copyright (c) 2024 Handsoncode. All rights reserved.
  729. */
  730. class ba extends qr{abs(e,t){return this.runFunction(e.args,t,this.metadata("ABS"),Math.abs)}}ba.implementedFunctions={ABS:{method:"abs",parameters:[{argumentType:$r.NUMBER}]}};
  731. /**
  732. * @license
  733. * Copyright (c) 2024 Handsoncode. All rights reserved.
  734. */
  735. const wa=0xffffffffffff,Ta=-53,Oa=53;class va extends qr{bitlshift(e,t){return this.runFunction(e.args,t,this.metadata("BITLSHIFT"),Ea)}bitrshift(e,t){return this.runFunction(e.args,t,this.metadata("BITRSHIFT"),Ca)}}function Ea(e,t){return t<0?Ca(e,-t):La(e*Math.pow(2,t))}function Ca(e,t){return t<0?Ea(e,-t):La(Math.floor(e/Math.pow(2,t)))}function La(e){return e>wa?new lr(Wn.NUM,Ce.BitshiftLong):e}
  736. /**
  737. * @license
  738. * Copyright (c) 2024 Handsoncode. All rights reserved.
  739. */va.implementedFunctions={BITLSHIFT:{method:"bitlshift",parameters:[{argumentType:$r.INTEGER,minValue:0},{argumentType:$r.INTEGER,minValue:Ta,maxValue:Oa}]},BITRSHIFT:{method:"bitrshift",parameters:[{argumentType:$r.INTEGER,minValue:0},{argumentType:$r.INTEGER,minValue:Ta,maxValue:Oa}]}};class Na extends qr{bitand(e,t){return this.runFunction(e.args,t,this.metadata("BITAND"),(e,t)=>e&t)}bitor(e,t){return this.runFunction(e.args,t,this.metadata("BITOR"),(e,t)=>e|t)}bitxor(e,t){return this.runFunction(e.args,t,this.metadata("BITXOR"),(e,t)=>e^t)}}Na.implementedFunctions={BITAND:{method:"bitand",parameters:[{argumentType:$r.INTEGER,minValue:0},{argumentType:$r.INTEGER,minValue:0}]},BITOR:{method:"bitor",parameters:[{argumentType:$r.INTEGER,minValue:0},{argumentType:$r.INTEGER,minValue:0}]},BITXOR:{method:"bitxor",parameters:[{argumentType:$r.INTEGER,minValue:0},{argumentType:$r.INTEGER,minValue:0}]}};
  740. /**
  741. * @license
  742. * Copyright (c) 2024 Handsoncode. All rights reserved.
  743. */
  744. class _a extends qr{literalTrue(e,t){return this.runFunction(e.args,t,this.metadata("TRUE"),()=>!0)}literalFalse(e,t){return this.runFunction(e.args,t,this.metadata("FALSE"),()=>!1)}conditionalIf(e,t){return this.runFunction(e.args,t,this.metadata("IF"),(e,t,n)=>e?t:n)}ifs(e,t){return this.runFunction(e.args,t,this.metadata("IFS"),(...e)=>{for(let t=0;t<e.length;t+=2)if(e[t])return e[t+1];return new lr(Wn.NA,Ce.NoConditionMet)})}and(e,t){return this.runFunction(e.args,t,this.metadata("AND"),(...e)=>e.filter(e=>void 0!==e).every(e=>!!e))}or(e,t){return this.runFunction(e.args,t,this.metadata("OR"),(...e)=>e.filter(e=>void 0!==e).some(e=>e))}not(e,t){return this.runFunction(e.args,t,this.metadata("NOT"),e=>!e)}xor(e,t){return this.runFunction(e.args,t,this.metadata("XOR"),(...e)=>{let t=0;return e.filter(e=>void 0!==e).forEach(e=>{e&&t++}),t%2===1})}switch(e,t){return this.runFunction(e.args,t,this.metadata("SWITCH"),(e,...t)=>{const n=t.length;let r=0;for(;r+1<n;r+=2)if(!(t[r]instanceof lr)&&this.arithmeticHelper.eq(e,t[r]))return t[r+1];return r<n?t[r]:new lr(Wn.NA,Ce.NoDefault)})}iferror(e,t){return this.runFunction(e.args,t,this.metadata("IFERROR"),(e,t)=>e instanceof lr?t:e)}ifna(e,t){return this.runFunction(e.args,t,this.metadata("IFNA"),(e,t)=>e instanceof lr&&e.type===Wn.NA?t:e)}choose(e,t){return this.runFunction(e.args,t,this.metadata("CHOOSE"),(e,...t)=>e>t.length?new lr(Wn.NUM,Ce.Selector):t[e-1])}}_a.implementedFunctions={TRUE:{method:"literalTrue",parameters:[]},FALSE:{method:"literalFalse",parameters:[]},IF:{method:"conditionalIf",parameters:[{argumentType:$r.BOOLEAN},{argumentType:$r.SCALAR,passSubtype:!0},{argumentType:$r.SCALAR,defaultValue:!1,passSubtype:!0}]},IFS:{method:"ifs",parameters:[{argumentType:$r.BOOLEAN},{argumentType:$r.SCALAR,passSubtype:!0}],repeatLastArgs:2},AND:{method:"and",parameters:[{argumentType:$r.BOOLEAN}],repeatLastArgs:1,expandRanges:!0},OR:{method:"or",parameters:[{argumentType:$r.BOOLEAN}],repeatLastArgs:1,expandRanges:!0},XOR:{method:"xor",parameters:[{argumentType:$r.BOOLEAN}],repeatLastArgs:1,expandRanges:!0},NOT:{method:"not",parameters:[{argumentType:$r.BOOLEAN}]},SWITCH:{method:"switch",parameters:[{argumentType:$r.NOERROR},{argumentType:$r.SCALAR,passSubtype:!0},{argumentType:$r.SCALAR,passSubtype:!0}],repeatLastArgs:1},IFERROR:{method:"iferror",parameters:[{argumentType:$r.SCALAR,passSubtype:!0},{argumentType:$r.SCALAR,passSubtype:!0}]},IFNA:{method:"ifna",parameters:[{argumentType:$r.SCALAR,passSubtype:!0},{argumentType:$r.SCALAR,passSubtype:!0}]},CHOOSE:{method:"choose",parameters:[{argumentType:$r.INTEGER,minValue:1},{argumentType:$r.SCALAR,passSubtype:!0}],repeatLastArgs:1}};
  745. /**
  746. * @license
  747. * Copyright (c) 2024 Handsoncode. All rights reserved.
  748. */
  749. class Ia extends qr{char(e,t){return this.runFunction(e.args,t,this.metadata("CHAR"),e=>e<1||e>=256?new lr(Wn.VALUE,Ce.CharacterCodeBounds):String.fromCharCode(Math.trunc(e)))}unichar(e,t){return this.runFunction(e.args,t,this.metadata("CHAR"),e=>e<1||e>=1114112?new lr(Wn.VALUE,Ce.CharacterCodeBounds):String.fromCodePoint(Math.trunc(e)))}}Ia.implementedFunctions={CHAR:{method:"char",parameters:[{argumentType:$r.NUMBER}]},UNICHAR:{method:"unichar",parameters:[{argumentType:$r.NUMBER}]}};
  750. /**
  751. * @license
  752. * Copyright (c) 2024 Handsoncode. All rights reserved.
  753. */
  754. class Pa extends qr{code(e,t){return this.runFunction(e.args,t,this.metadata("CODE"),e=>0===e.length?new lr(Wn.VALUE,Ce.EmptyString):e.charCodeAt(0))}unicode(e,t){return this.runFunction(e.args,t,this.metadata("UNICODE"),e=>{var t;return null!==(t=e.codePointAt(0))&&void 0!==t?t:new lr(Wn.VALUE,Ce.EmptyString)})}}Pa.implementedFunctions={CODE:{method:"code",parameters:[{argumentType:$r.STRING}]},UNICODE:{method:"unicode",parameters:[{argumentType:$r.STRING}]}};
  755. /**
  756. * @license
  757. * Copyright (c) 2024 Handsoncode. All rights reserved.
  758. */
  759. class xa extends qr{countblank(e,t){return this.runFunction(e.args,t,this.metadata("COUNTBLANK"),(...e)=>{let t=0;return e.forEach(e=>{e===bt&&t++}),t})}}xa.implementedFunctions={COUNTBLANK:{method:"countblank",parameters:[{argumentType:$r.SCALAR}],repeatLastArgs:1,expandRanges:!0}};
  760. /**
  761. * @license
  762. * Copyright (c) 2024 Handsoncode. All rights reserved.
  763. */
  764. class Da extends qr{countunique(e,t){return this.runFunction(e.args,t,this.metadata("COUNTUNIQUE"),(...e)=>{const t=new Set,n=new Set;for(const r of e)r instanceof lr?n.add(r.type):""!==r&&t.add(r);return t.size+n.size})}}Da.implementedFunctions={COUNTUNIQUE:{method:"countunique",parameters:[{argumentType:$r.SCALAR}],repeatLastArgs:1,expandRanges:!0}};
  765. /**
  766. * @license
  767. * Copyright (c) 2024 Handsoncode. All rights reserved.
  768. */
  769. class Aa extends qr{constructor(){super(...arguments),this.isoweeknumCore=e=>{const t=Math.floor(this.dateTimeHelper.relativeNumberToAbsoluteNumber(e)),n=this.dateTimeHelper.numberToSimpleDate(e),r=this.dateTimeHelper.dateToNumber({year:n.year,month:1,day:1}),i=this.dateTimeHelper.relativeNumberToAbsoluteNumber(r),s=i+((4-i)%7+7)%7,o=Math.floor((t-1)/7)-Math.floor((s-1)/7)+1;return 0===o?this.isoweeknumCore(e-7)+1:o},this.days360Core=(e,t,n)=>{const r=this.dateTimeHelper.numberToSimpleDate(e),i=this.dateTimeHelper.numberToSimpleDate(t);let s,o;return n?(s=Wi(r),o=Wi(i)):[s,o]=this.dateTimeHelper.toBasisUS(r,i),360*(o.year-s.year)+30*(o.month-s.month)+o.day-s.day}}date(e,t){return this.runFunction(e.args,t,this.metadata("DATE"),(e,t,n)=>{const r=Math.trunc(n);let i=Math.trunc(t),s=Math.trunc(e);s<this.dateTimeHelper.getEpochYearZero()&&(s+=this.dateTimeHelper.getEpochYearZero());const o=Math.floor((i-1)/12);s+=o,i-=12*o;const a={year:s,month:i,day:1};if(this.dateTimeHelper.isValidDate(a)){let e=this.dateTimeHelper.dateToNumber(a)+(r-1);return e=this.dateTimeHelper.getWithinBounds(e),void 0===e?new lr(Wn.NUM,Ce.DateBounds):e}return new lr(Wn.VALUE,Ce.InvalidDate)})}time(e,t){return this.runFunction(e.args,t,this.metadata("TIME"),(e,t,n)=>{const r=Ui({hours:Math.trunc(e),minutes:Math.trunc(t),seconds:Math.trunc(n)});return r<0?new lr(Wn.NUM,Ce.NegativeTime):r%1})}eomonth(e,t){return this.runFunction(e.args,t,this.metadata("EOMONTH"),(e,t)=>{const n=this.dateTimeHelper.numberToSimpleDate(e);let r=this.dateTimeHelper.dateToNumber(this.dateTimeHelper.endOfMonth(Fi(n,t)));return r=this.dateTimeHelper.getWithinBounds(r),void 0===r?new lr(Wn.NUM,Ce.DateBounds):r})}day(e,t){return this.runFunction(e.args,t,this.metadata("DAY"),e=>this.dateTimeHelper.numberToSimpleDate(e).day)}days(e,t){return this.runFunction(e.args,t,this.metadata("DAYS"),(e,t)=>Math.trunc(e)-Math.trunc(t))}month(e,t){return this.runFunction(e.args,t,this.metadata("MONTH"),e=>this.dateTimeHelper.numberToSimpleDate(e).month)}year(e,t){return this.runFunction(e.args,t,this.metadata("YEAR"),e=>this.dateTimeHelper.numberToSimpleDate(e).year)}hour(e,t){return this.runFunction(e.args,t,this.metadata("HOUR"),e=>Vi(Hi(e)%1).hours)}minute(e,t){return this.runFunction(e.args,t,this.metadata("MINUTE"),e=>Vi(Hi(e)%1).minutes)}second(e,t){return this.runFunction(e.args,t,this.metadata("SECOND"),e=>Vi(Hi(e)%1).seconds)}text(e,t){return this.runFunction(e.args,t,this.metadata("TEXT"),(e,t)=>ts(e,t,this.config,this.dateTimeHelper))}weekday(e,t){return this.runFunction(e.args,t,this.metadata("WEEKDAY"),(e,t)=>{const n=Math.floor(this.dateTimeHelper.relativeNumberToAbsoluteNumber(e));if(3===t)return(n-1)%7;const r=Ha.get(t);return void 0===r?new lr(Wn.NUM,Ce.BadMode):(n-r)%7+1})}weeknum(e,t){return this.runFunction(e.args,t,this.metadata("WEEKNUM"),(e,t)=>{const n=Math.floor(this.dateTimeHelper.relativeNumberToAbsoluteNumber(e)),r=this.dateTimeHelper.numberToSimpleDate(e),i=this.dateTimeHelper.dateToNumber({year:r.year,month:1,day:1}),s=this.dateTimeHelper.relativeNumberToAbsoluteNumber(i);if(21===t)return this.isoweeknumCore(e);const o=Ha.get(t);return void 0===o?new lr(Wn.NUM,Ce.BadMode):Math.floor((n-o)/7)-Math.floor((s-o)/7)+1})}isoweeknum(e,t){return this.runFunction(e.args,t,this.metadata("ISOWEEKNUM"),this.isoweeknumCore)}datevalue(e,t){return this.runFunction(e.args,t,this.metadata("DATEVALUE"),e=>{const{dateTime:t}=this.dateTimeHelper.parseDateTimeFromConfigFormats(e);return void 0===t?new lr(Wn.VALUE,Ce.IncorrectDateTime):Ii(t)?(Pi(t)?Math.trunc(Ui(t)):0)+this.dateTimeHelper.dateToNumber(t):0})}timevalue(e,t){return this.runFunction(e.args,t,this.metadata("TIMEVALUE"),e=>{const t=this.dateTimeHelper.dateStringToDateNumber(e);return void 0===t?new lr(Wn.VALUE,Ce.IncorrectDateTime):wt(t)%1})}now(e,t){return this.runFunction(e.args,t,this.metadata("NOW"),()=>{const e=new Date(Date.now());return Ui({hours:e.getHours(),minutes:e.getMinutes(),seconds:e.getSeconds()})+this.dateTimeHelper.dateToNumber({year:e.getFullYear(),month:e.getMonth()+1,day:e.getDate()})})}today(e,t){return this.runFunction(e.args,t,this.metadata("TODAY"),()=>{const e=new Date(Date.now());return this.dateTimeHelper.dateToNumber({year:e.getFullYear(),month:e.getMonth()+1,day:e.getDate()})})}edate(e,t){return this.runFunction(e.args,t,this.metadata("EDATE"),(e,t)=>{const n=this.dateTimeHelper.numberToSimpleDate(e),r=Yi(Fi(n,t));let i=this.dateTimeHelper.dateToNumber(r);return i=this.dateTimeHelper.getWithinBounds(i),void 0===i?new lr(Wn.NUM,Ce.DateBounds):i})}datedif(e,t){return this.runFunction(e.args,t,this.metadata("DATEDIF"),(e,t,n)=>{if(e>t)return new lr(Wn.NUM,Ce.StartEndDate);if("D"===n)return Math.floor(t)-Math.floor(e);const r=this.dateTimeHelper.numberToSimpleDate(e),i=this.dateTimeHelper.numberToSimpleDate(t);switch(n){case"M":return 12*(i.year-r.year)+(i.month-r.month)-(i.day<r.day?1:0);case"YM":return(i.month-r.month+12-(i.day<r.day?1:0))%12;case"Y":return i.month>r.month||i.month===r.month&&i.day>=r.day?i.year-r.year:i.year-r.year-1;case"MD":if(i.day>=r.day)return i.day-r.day;{const e=1===i.month?12:i.month-1,t=1===i.month?i.year-1:i.year;return this.dateTimeHelper.daysInMonth(t,e)+i.day-r.day}case"YD":return i.month>r.month||i.month===r.month&&i.day>=r.day?Math.floor(t)-this.dateTimeHelper.dateToNumber({year:i.year,month:r.month,day:r.day}):Math.floor(t)-Math.floor(e)-365*(i.year-r.year-1)-this.dateTimeHelper.leapYearsCount(i.year-1)+this.dateTimeHelper.leapYearsCount(r.year);default:return new lr(Wn.NUM,Ce.BadMode)}})}days360(e,t){return this.runFunction(e.args,t,this.metadata("DAYS360"),this.days360Core)}yearfrac(e,t){return this.runFunction(e.args,t,this.metadata("YEARFRAC"),(e,t,n)=>{switch(e=Math.trunc(e),t=Math.trunc(t),e>t&&([e,t]=[t,e]),n){case 0:return this.days360Core(e,t,!1)/360;case 1:return(t-e)/this.dateTimeHelper.yearLengthForBasis(this.dateTimeHelper.numberToSimpleDate(e),this.dateTimeHelper.numberToSimpleDate(t));case 2:return(t-e)/360;case 3:return(t-e)/365;case 4:return this.days360Core(e,t,!0)/360}throw new Error("Should not be reachable.")})}interval(e,t){return this.runFunction(e.args,t,this.metadata("INTERVAL"),e=>{e=Math.trunc(e);const t=e%60;e=Math.trunc(e/60);const n=e%60;e=Math.trunc(e/60);const r=e%24;e=Math.trunc(e/24);const i=e%30;e=Math.trunc(e/30);const s=e%12,o=Math.trunc(e/12);return"P"+(o>0?o+"Y":"")+(s>0?s+"M":"")+(i>0?i+"D":"")+"T"+(r>0?r+"H":"")+(n>0?n+"M":"")+(t>0?t+"S":"")})}networkdays(e,t){return this.runFunction(e.args,t,this.metadata("NETWORKDAYS"),(e,t,n)=>this.networkdayscore(e,t,1,n))}networkdaysintl(e,t){return this.runFunction(e.args,t,this.metadata("NETWORKDAYS.INTL"),(e,t,n,r)=>this.networkdayscore(e,t,n,r))}workday(e,t){return this.runFunction(e.args,t,this.metadata("WORKDAY"),(e,t,n)=>this.workdaycore(e,t,1,n))}workdayintl(e,t){return this.runFunction(e.args,t,this.metadata("WORKDAY.INTL"),(e,t,n,r)=>this.workdaycore(e,t,n,r))}networkdayscore(e,t,n,r){e=Math.trunc(e),t=Math.trunc(t);let i=1;e>t&&([e,t]=[t,e],i=-1);const s=Ya(n);if(s instanceof lr)return s;const o=this.simpleRangeToFilteredHolidays(s,r);return o instanceof lr?o:i*this.countWorkdays(e,t,s,o)}workdaycore(e,t,n,r){e=Math.trunc(e),t=Math.trunc(t);const i=Ya(n);if(i instanceof lr)return i;const s=this.simpleRangeToFilteredHolidays(i,r);if(s instanceof lr)return s;if(t>0){let n=1;while(this.countWorkdays(e+1,e+n,i,s)<t)n*=2;let r=1;while(r+1<n){const o=Math.trunc((r+n)/2);this.countWorkdays(e+1,e+o,i,s)<t?r=o:n=o}return e+n}if(t<0){t*=-1;let n=1;while(this.countWorkdays(e-n,e-1,i,s)<t)n*=2;let r=1;while(r+1<n){const o=Math.trunc((r+n)/2);this.countWorkdays(e-o,e-1,i,s)<t?r=o:n=o}return e-n}return e}countWorkdays(e,t,n,r){const i=Math.floor(this.dateTimeHelper.relativeNumberToAbsoluteNumber(t)),s=Math.floor(this.dateTimeHelper.relativeNumberToAbsoluteNumber(e));let o=0;for(let a=0;a<7;a++)"0"===n.charAt(a)&&(o+=Math.floor((i+6-a)/7),o-=Math.floor((s-1+6-a)/7));return o-=Fa(t+1,r)-Fa(e,r),o}simpleRangeToFilteredHolidays(e,t){var n;const r=null!==(n=null===t||void 0===t?void 0:t.valuesFromTopLeftCorner())&&void 0!==n?n:[];for(const s of r)if(s instanceof lr)return s;const i=[];for(const s of r)if(s!==bt){if(!_t(s))return new lr(Wn.VALUE,Ce.WrongType);i.push(Math.trunc(wt(s)))}return[...new Set(i)].sort((e,t)=>e-t).filter(t=>{const n=this.dateTimeHelper.relativeNumberToAbsoluteNumber(t),r=(n-1)%7;return"0"===e.charAt(r)})}}function Fa(e,t){if(0===t.length)return 0;if(e<=t[0])return 0;if(t[t.length-1]<e)return t.length;let n=0,r=t.length-1;while(n+1<r){const i=Math.floor((r+n)/2);t[i]>=e?r=i:n=i}return r}function Ya(e){var t;return"number"!==typeof e&&"string"!==typeof e?new lr(Wn.VALUE,Ce.WrongType):"string"===typeof e?7===e.length&&/^(0|1)*$/.test(e)&&"1111111"!==e?e:new lr(Wn.NUM,Ce.WeekendString):null!==(t=ka.get(e))&&void 0!==t?t:new lr(Wn.NUM,Ce.BadMode)}Aa.implementedFunctions={DATE:{method:"date",parameters:[{argumentType:$r.NUMBER},{argumentType:$r.NUMBER},{argumentType:$r.NUMBER}],returnNumberType:It.NUMBER_DATE},TIME:{method:"time",parameters:[{argumentType:$r.NUMBER},{argumentType:$r.NUMBER},{argumentType:$r.NUMBER}],returnNumberType:It.NUMBER_TIME},MONTH:{method:"month",parameters:[{argumentType:$r.NUMBER,minValue:0}]},YEAR:{method:"year",parameters:[{argumentType:$r.NUMBER,minValue:0}]},HOUR:{method:"hour",parameters:[{argumentType:$r.NUMBER,minValue:0}]},MINUTE:{method:"minute",parameters:[{argumentType:$r.NUMBER,minValue:0}]},SECOND:{method:"second",parameters:[{argumentType:$r.NUMBER,minValue:0}]},TEXT:{method:"text",parameters:[{argumentType:$r.NUMBER},{argumentType:$r.STRING}]},EOMONTH:{method:"eomonth",parameters:[{argumentType:$r.NUMBER,minValue:0},{argumentType:$r.NUMBER}],returnNumberType:It.NUMBER_DATE},DAY:{method:"day",parameters:[{argumentType:$r.NUMBER,minValue:0}]},DAYS:{method:"days",parameters:[{argumentType:$r.NUMBER,minValue:0},{argumentType:$r.NUMBER,minValue:0}]},WEEKDAY:{method:"weekday",parameters:[{argumentType:$r.NUMBER,minValue:0},{argumentType:$r.NUMBER,defaultValue:1}]},WEEKNUM:{method:"weeknum",parameters:[{argumentType:$r.NUMBER,minValue:0},{argumentType:$r.NUMBER,defaultValue:1}]},ISOWEEKNUM:{method:"isoweeknum",parameters:[{argumentType:$r.NUMBER,minValue:0}]},DATEVALUE:{method:"datevalue",parameters:[{argumentType:$r.STRING}],returnNumberType:It.NUMBER_DATE},TIMEVALUE:{method:"timevalue",parameters:[{argumentType:$r.STRING}],returnNumberType:It.NUMBER_TIME},NOW:{method:"now",parameters:[],isVolatile:!0,returnNumberType:It.NUMBER_DATETIME},TODAY:{method:"today",parameters:[],isVolatile:!0,returnNumberType:It.NUMBER_DATE},EDATE:{method:"edate",parameters:[{argumentType:$r.NUMBER,minValue:0},{argumentType:$r.NUMBER}],returnNumberType:It.NUMBER_DATE},DAYS360:{method:"days360",parameters:[{argumentType:$r.NUMBER,minValue:0},{argumentType:$r.NUMBER,minValue:0},{argumentType:$r.BOOLEAN,defaultValue:!1}]},DATEDIF:{method:"datedif",parameters:[{argumentType:$r.NUMBER,minValue:0},{argumentType:$r.NUMBER,minValue:0},{argumentType:$r.STRING}]},YEARFRAC:{method:"yearfrac",parameters:[{argumentType:$r.NUMBER,minValue:0},{argumentType:$r.NUMBER,minValue:0},{argumentType:$r.INTEGER,defaultValue:0,minValue:0,maxValue:4}]},INTERVAL:{method:"interval",parameters:[{argumentType:$r.NUMBER,minValue:0}]},NETWORKDAYS:{method:"networkdays",parameters:[{argumentType:$r.NUMBER,minValue:0},{argumentType:$r.NUMBER,minValue:0},{argumentType:$r.RANGE,optionalArg:!0}]},"NETWORKDAYS.INTL":{method:"networkdaysintl",parameters:[{argumentType:$r.NUMBER,minValue:0},{argumentType:$r.NUMBER,minValue:0},{argumentType:$r.NOERROR,defaultValue:1},{argumentType:$r.RANGE,optionalArg:!0}]},WORKDAY:{method:"workday",parameters:[{argumentType:$r.NUMBER,minValue:0},{argumentType:$r.NUMBER},{argumentType:$r.RANGE,optionalArg:!0}]},"WORKDAY.INTL":{method:"workdayintl",parameters:[{argumentType:$r.NUMBER,minValue:0},{argumentType:$r.NUMBER},{argumentType:$r.NOERROR,defaultValue:1},{argumentType:$r.RANGE,optionalArg:!0}]}};const Ha=new Map([[1,0],[2,1],[11,1],[12,2],[13,3],[14,4],[15,5],[16,6],[17,0]]),ka=new Map([[1,"0000011"],[2,"1000001"],[3,"1100000"],[4,"0110000"],[5,"0011000"],[6,"0001100"],[7,"0000110"],[11,"0000001"],[12,"1000000"],[13,"0100000"],[14,"0010000"],[15,"0001000"],[16,"0000100"],[17,"0000010"]]);
  770. /**
  771. * @license
  772. * Copyright (c) 2024 Handsoncode. All rights reserved.
  773. */
  774. class Va extends qr{degrees(e,t){return this.runFunction(e.args,t,this.metadata("DEGREES"),e=>e*(180/Math.PI))}}Va.implementedFunctions={DEGREES:{method:"degrees",parameters:[{argumentType:$r.NUMBER}]}};
  775. /**
  776. * @license
  777. * Copyright (c) 2024 Handsoncode. All rights reserved.
  778. */
  779. class Ua extends qr{delta(e,t){return this.runFunction(e.args,t,this.metadata("DELTA"),(e,t)=>e===t?1:0)}}Ua.implementedFunctions={DELTA:{method:"delta",parameters:[{argumentType:$r.NUMBER},{argumentType:$r.NUMBER,defaultValue:0}]}};
  780. /**
  781. * @license
  782. * Copyright (c) 2024 Handsoncode. All rights reserved.
  783. */
  784. class Wa extends qr{exp(e,t){return this.runFunction(e.args,t,this.metadata("EXP"),Math.exp)}}Wa.implementedFunctions={EXP:{method:"exp",parameters:[{argumentType:$r.NUMBER}]}};
  785. /**
  786. * @license
  787. * Copyright (c) 2024 Handsoncode. All rights reserved.
  788. */
  789. class Xa extends qr{pmt(e,t){return this.runFunction(e.args,t,this.metadata("PMT"),ja)}ipmt(e,t){return this.runFunction(e.args,t,this.metadata("IPMT"),Za)}ppmt(e,t){return this.runFunction(e.args,t,this.metadata("PPMT"),Ka)}fv(e,t){return this.runFunction(e.args,t,this.metadata("FV"),Qa)}cumipmt(e,t){return this.runFunction(e.args,t,this.metadata("CUMIPMT"),(e,t,n,r,i,s)=>{if(r>i)return new lr(Wn.NUM,Ce.EndStartPeriod);let o=0;for(let a=r;a<=i;a++)o+=Za(e,a,t,n,0,s);return o})}cumprinc(e,t){return this.runFunction(e.args,t,this.metadata("CUMPRINC"),(e,t,n,r,i,s)=>{if(r>i)return new lr(Wn.NUM,Ce.EndStartPeriod);let o=0;for(let a=r;a<=i;a++)o+=Ka(e,a,t,n,0,s);return o})}db(e,t){return this.runFunction(e.args,t,this.metadata("DB"),(e,t,n,r,i)=>{if(12===i&&r>n||r>n+1)return new lr(Wn.NUM,Ce.PeriodLong);if(t>=e)return 0;const s=Math.round(1e3*(1-Math.pow(t/e,1/n)))/1e3,o=e*s*i/12;if(1===r)return o;let a=o;for(let l=0;l<r-2;l++)a+=(e-a)*s;return r===n+1?(e-a)*s*(12-i)/12:(e-a)*s})}ddb(e,t){return this.runFunction(e.args,t,this.metadata("DDB"),(e,t,n,r,i)=>{if(r>n)return new lr(Wn.NUM);let s,o=i/n;o>=1?(o=1,s=1===r?e:0):s=e*Math.pow(1-o,r-1);const a=e*Math.pow(1-o,r);return Math.max(s-Math.max(t,a),0)})}dollarde(e,t){return this.runFunction(e.args,t,this.metadata("DOLLARDE"),(e,t)=>{if(t<1)return new lr(Wn.DIV_BY_ZERO);t=Math.trunc(t);while(t>10)t/=10;return Math.trunc(e)+10*(e-Math.trunc(e))/t})}dollarfr(e,t){return this.runFunction(e.args,t,this.metadata("DOLLARFR"),(e,t)=>{if(t<1)return new lr(Wn.DIV_BY_ZERO);t=Math.trunc(t);while(t>10)t/=10;return Math.trunc(e)+(e-Math.trunc(e))*t/10})}effect(e,t){return this.runFunction(e.args,t,this.metadata("EFFECT"),(e,t)=>(t=Math.trunc(t),Math.pow(1+e/t,t)-1))}ispmt(e,t){return this.runFunction(e.args,t,this.metadata("ISPMT"),(e,t,n,r)=>0===n?new lr(Wn.DIV_BY_ZERO):r*e*(t/n-1))}nominal(e,t){return this.runFunction(e.args,t,this.metadata("NOMINAL"),(e,t)=>(t=Math.trunc(t),(Math.pow(e+1,1/t)-1)*t))}nper(e,t){return this.runFunction(e.args,t,this.metadata("NPER"),(e,t,n,r,i)=>0===e?0===t?new lr(Wn.DIV_BY_ZERO):(-n-r)/t:(i&&(t*=1+e),Math.log((t-r*e)/(n*e+t))/Math.log(1+e)))}rate(e,t){return this.runFunction(e.args,t,this.metadata("RATE"),(e,t,n,r,i,s)=>{if(s<=-1)return new lr(Wn.VALUE);const o=1e-7,a=50;let l=s;i=i?1:0;for(let c=0;c<a;c++){if(l<=-1)return new lr(Wn.NUM);let s,a;if(Math.abs(l)<o)s=n*(1+e*l)+t*(1+l*i)*e+r;else{const o=Math.pow(1+l,e);s=n*o+t*(1/l+i)*(o-1)+r}if(Math.abs(s)<o)return l;if(Math.abs(l)<o)a=n*e+t*i*e;else{const r=Math.pow(1+l,e),s=e*Math.pow(1+l,e-1);a=n*s+t*(1/l+i)*s+t*(-1/(l*l))*(r-1)}l-=s/a}return new lr(Wn.NUM)})}pv(e,t){return this.runFunction(e.args,t,this.metadata("PV"),(e,t,n,r,i)=>(i=i?1:0,-1===e?new lr(0===t?Wn.NUM:Wn.DIV_BY_ZERO):0===e?-n*t-r:((1-Math.pow(1+e,t))*n*(1+e*i)/e-r)/Math.pow(1+e,t)))}rri(e,t){return this.runFunction(e.args,t,this.metadata("RRI"),(e,t,n)=>0===t||n<0&&t>0||n>0&&t<0?new lr(Wn.NUM):Math.pow(n/t,1/e)-1)}sln(e,t){return this.runFunction(e.args,t,this.metadata("SLN"),(e,t,n)=>0===n?new lr(Wn.DIV_BY_ZERO):(e-t)/n)}syd(e,t){return this.runFunction(e.args,t,this.metadata("SYD"),(e,t,n,r)=>r>n?new lr(Wn.NUM):(e-t)*(n-r+1)*2/(n*(n+1)))}tbilleq(e,t){return this.runFunction(e.args,t,this.metadata("TBILLEQ"),(e,t,n)=>{if(e=Math.round(e),t=Math.round(t),e>=t)return new lr(Wn.NUM);const r=this.dateTimeHelper.numberToSimpleDate(e),i=this.dateTimeHelper.numberToSimpleDate(t);if(i.year>r.year+1||i.year===r.year+1&&(i.month>r.month||i.month===r.month&&i.day>r.day))return new lr(Wn.NUM);const s=360-n*(t-e);return 0===s?0:s<0?new lr(Wn.NUM):365*n/s})}tbillprice(e,t){return this.runFunction(e.args,t,this.metadata("TBILLPRICE"),(e,t,n)=>{if(e=Math.round(e),t=Math.round(t),e>=t)return new lr(Wn.NUM);const r=this.dateTimeHelper.numberToSimpleDate(e),i=this.dateTimeHelper.numberToSimpleDate(t);if(i.year>r.year+1||i.year===r.year+1&&(i.month>r.month||i.month===r.month&&i.day>r.day))return new lr(Wn.NUM);const s=360-n*(t-e);return 0===s?0:s<0?new lr(Wn.NUM):100*(1-n*(t-e)/360)})}tbillyield(e,t){return this.runFunction(e.args,t,this.metadata("TBILLYIELD"),(e,t,n)=>{if(e=Math.round(e),t=Math.round(t),e>=t)return new lr(Wn.NUM);const r=this.dateTimeHelper.numberToSimpleDate(e),i=this.dateTimeHelper.numberToSimpleDate(t);return i.year>r.year+1||i.year===r.year+1&&(i.month>r.month||i.month===r.month&&i.day>r.day)?new lr(Wn.NUM):360*(100-n)/(n*(t-e))})}fvschedule(e,t){return this.runFunction(e.args,t,this.metadata("FVSCHEDULE"),(e,t)=>{const n=t.valuesFromTopLeftCorner();for(const r of n)if(r instanceof lr)return r;for(const r of n)if(_t(r))e*=1+wt(r);else if(r!==bt)return new lr(Wn.VALUE,Ce.NumberExpected);return e})}npv(e,t){return this.runFunction(e.args,t,this.metadata("NPV"),(e,...t)=>{const n=this.arithmeticHelper.coerceNumbersExactRanges(t);return n instanceof lr?n:Ga(e,n)})}mirr(e,t){return this.runFunction(e.args,t,this.metadata("MIRR"),(e,t,n)=>{const r=this.arithmeticHelper.manyToExactNumbers(e.valuesFromTopLeftCorner());if(r instanceof lr)return r;let i=!1,s=!1;const o=[],a=[];for(const h of r)h>0?(i=!0,o.push(h),a.push(0)):h<0?(s=!0,a.push(h),o.push(0)):(a.push(0),o.push(0));if(!i||!s)return new lr(Wn.DIV_BY_ZERO);const l=r.length,c=Ga(n,o);if(c instanceof lr)return c;const u=Ga(t,a);return u instanceof lr?u:Math.pow(-c*Math.pow(1+n,l)/u/(1+t),1/(l-1))-1})}pduration(e,t){return this.runFunction(e.args,t,this.metadata("PDURATION"),(e,t,n)=>(Math.log(n)-Math.log(t))/Math.log(1+e))}xnpv(e,t){return this.runFunction(e.args,t,this.metadata("XNPV"),(e,t,n)=>{const r=t.valuesFromTopLeftCorner();for(const c of r)if("number"!==typeof c)return new lr(Wn.VALUE,Ce.NumberExpected);const i=r,s=n.valuesFromTopLeftCorner();for(const c of s)if("number"!==typeof c)return new lr(Wn.VALUE,Ce.NumberExpected);const o=s;if(o.length!==i.length)return new lr(Wn.NUM,Ce.EqualLength);const a=o.length;let l=0;if(o[0]<0)return new lr(Wn.NUM,Ce.ValueSmall);for(let c=0;c<a;c++){if(o[c]=Math.floor(o[c]),o[c]<o[0])return new lr(Wn.NUM,Ce.ValueSmall);l+=i[c]/Math.pow(1+e,(o[c]-o[0])/365)}return l})}}function ja(e,t,n,r,i){if(0===e)return(-n-r)/t;{const s=Math.pow(1+e,t);return(r*e+n*e*s)*(i?1/(1+e):1)/(1-s)}}function Za(e,t,n,r,i,s){const o=ja(e,n,r,i,s);return 1===t?e*(s?0:-r):e*(s?Qa(e,t-2,o,r,s)-o:Qa(e,t-1,o,r,s))}function Qa(e,t,n,r,i){if(0===e)return-r-n*t;{const s=Math.pow(1+e,t);return n*(i?1+e:1)*(1-s)/e-r*s}}function Ka(e,t,n,r,i,s){return ja(e,n,r,i,s)-Za(e,t,n,r,i,s)}function Ga(e,t){let n=0;for(let r=t.length-1;r>=0;r--){if(n+=t[r],-1===e){if(0===n)continue;return new lr(Wn.DIV_BY_ZERO)}n/=1+e}return n}
  790. /**
  791. * @license
  792. * Copyright (c) 2024 Handsoncode. All rights reserved.
  793. */Xa.implementedFunctions={PMT:{method:"pmt",parameters:[{argumentType:$r.NUMBER},{argumentType:$r.NUMBER},{argumentType:$r.NUMBER},{argumentType:$r.NUMBER,defaultValue:0},{argumentType:$r.NUMBER,defaultValue:0}],returnNumberType:It.NUMBER_CURRENCY},IPMT:{method:"ipmt",parameters:[{argumentType:$r.NUMBER},{argumentType:$r.NUMBER},{argumentType:$r.NUMBER},{argumentType:$r.NUMBER},{argumentType:$r.NUMBER,defaultValue:0},{argumentType:$r.NUMBER,defaultValue:0}],returnNumberType:It.NUMBER_CURRENCY},PPMT:{method:"ppmt",parameters:[{argumentType:$r.NUMBER},{argumentType:$r.NUMBER},{argumentType:$r.NUMBER},{argumentType:$r.NUMBER},{argumentType:$r.NUMBER,defaultValue:0},{argumentType:$r.NUMBER,defaultValue:0}],returnNumberType:It.NUMBER_CURRENCY},FV:{method:"fv",parameters:[{argumentType:$r.NUMBER},{argumentType:$r.NUMBER},{argumentType:$r.NUMBER},{argumentType:$r.NUMBER,defaultValue:0},{argumentType:$r.NUMBER,defaultValue:0}],returnNumberType:It.NUMBER_CURRENCY},CUMIPMT:{method:"cumipmt",parameters:[{argumentType:$r.NUMBER,greaterThan:0},{argumentType:$r.NUMBER,greaterThan:0},{argumentType:$r.NUMBER,greaterThan:0},{argumentType:$r.INTEGER,minValue:1},{argumentType:$r.INTEGER,minValue:1},{argumentType:$r.INTEGER,minValue:0,maxValue:1}],returnNumberType:It.NUMBER_CURRENCY},CUMPRINC:{method:"cumprinc",parameters:[{argumentType:$r.NUMBER,greaterThan:0},{argumentType:$r.NUMBER,greaterThan:0},{argumentType:$r.NUMBER,greaterThan:0},{argumentType:$r.INTEGER,minValue:1},{argumentType:$r.INTEGER,minValue:1},{argumentType:$r.INTEGER,minValue:0,maxValue:1}],returnNumberType:It.NUMBER_CURRENCY},DB:{method:"db",parameters:[{argumentType:$r.NUMBER,minValue:0},{argumentType:$r.NUMBER,minValue:0},{argumentType:$r.INTEGER,minValue:0},{argumentType:$r.INTEGER,minValue:0},{argumentType:$r.INTEGER,minValue:1,maxValue:12,defaultValue:12}],returnNumberType:It.NUMBER_CURRENCY},DDB:{method:"ddb",parameters:[{argumentType:$r.NUMBER,minValue:0},{argumentType:$r.NUMBER,minValue:0},{argumentType:$r.INTEGER,minValue:0},{argumentType:$r.NUMBER,minValue:0},{argumentType:$r.NUMBER,greaterThan:0,defaultValue:2}],returnNumberType:It.NUMBER_CURRENCY},DOLLARDE:{method:"dollarde",parameters:[{argumentType:$r.NUMBER},{argumentType:$r.NUMBER,minValue:0}]},DOLLARFR:{method:"dollarfr",parameters:[{argumentType:$r.NUMBER},{argumentType:$r.NUMBER,minValue:0}]},EFFECT:{method:"effect",parameters:[{argumentType:$r.NUMBER,minValue:0},{argumentType:$r.NUMBER,minValue:1}],returnNumberType:It.NUMBER_PERCENT},ISPMT:{method:"ispmt",parameters:[{argumentType:$r.NUMBER},{argumentType:$r.NUMBER},{argumentType:$r.NUMBER},{argumentType:$r.NUMBER}]},NOMINAL:{method:"nominal",parameters:[{argumentType:$r.NUMBER,minValue:0},{argumentType:$r.NUMBER,minValue:1}],returnNumberType:It.NUMBER_PERCENT},NPER:{method:"nper",parameters:[{argumentType:$r.NUMBER},{argumentType:$r.NUMBER},{argumentType:$r.NUMBER},{argumentType:$r.NUMBER,defaultValue:0},{argumentType:$r.NUMBER,defaultValue:0}]},PV:{method:"pv",parameters:[{argumentType:$r.NUMBER},{argumentType:$r.NUMBER},{argumentType:$r.NUMBER},{argumentType:$r.NUMBER,defaultValue:0},{argumentType:$r.NUMBER,defaultValue:0}],returnNumberType:It.NUMBER_CURRENCY},RATE:{method:"rate",parameters:[{argumentType:$r.NUMBER,greaterThan:0},{argumentType:$r.NUMBER},{argumentType:$r.NUMBER},{argumentType:$r.NUMBER,defaultValue:0},{argumentType:$r.NUMBER,defaultValue:0},{argumentType:$r.NUMBER,defaultValue:.1}],returnNumberType:It.NUMBER_PERCENT},RRI:{method:"rri",parameters:[{argumentType:$r.NUMBER,greaterThan:0},{argumentType:$r.NUMBER},{argumentType:$r.NUMBER}],returnNumberType:It.NUMBER_PERCENT},SLN:{method:"sln",parameters:[{argumentType:$r.NUMBER},{argumentType:$r.NUMBER},{argumentType:$r.NUMBER}],returnNumberType:It.NUMBER_CURRENCY},SYD:{method:"syd",parameters:[{argumentType:$r.NUMBER},{argumentType:$r.NUMBER},{argumentType:$r.NUMBER,greaterThan:0},{argumentType:$r.NUMBER,greaterThan:0}],returnNumberType:It.NUMBER_CURRENCY},TBILLEQ:{method:"tbilleq",parameters:[{argumentType:$r.NUMBER,minValue:0},{argumentType:$r.NUMBER,minValue:0},{argumentType:$r.NUMBER,greaterThan:0}],returnNumberType:It.NUMBER_PERCENT},TBILLPRICE:{method:"tbillprice",parameters:[{argumentType:$r.NUMBER,minValue:0},{argumentType:$r.NUMBER,minValue:0},{argumentType:$r.NUMBER,greaterThan:0}],returnNumberType:It.NUMBER_CURRENCY},TBILLYIELD:{method:"tbillyield",parameters:[{argumentType:$r.NUMBER,minValue:0},{argumentType:$r.NUMBER,minValue:0},{argumentType:$r.NUMBER,greaterThan:0}],returnNumberType:It.NUMBER_PERCENT},FVSCHEDULE:{method:"fvschedule",parameters:[{argumentType:$r.NUMBER},{argumentType:$r.RANGE}],returnNumberType:It.NUMBER_CURRENCY},NPV:{method:"npv",parameters:[{argumentType:$r.NUMBER},{argumentType:$r.ANY}],repeatLastArgs:1,returnNumberType:It.NUMBER_CURRENCY},MIRR:{method:"mirr",parameters:[{argumentType:$r.RANGE},{argumentType:$r.NUMBER},{argumentType:$r.NUMBER}],returnNumberType:It.NUMBER_PERCENT},PDURATION:{method:"pduration",parameters:[{argumentType:$r.NUMBER,greaterThan:0},{argumentType:$r.NUMBER,greaterThan:0},{argumentType:$r.NUMBER,greaterThan:0}]},XNPV:{method:"xnpv",parameters:[{argumentType:$r.NUMBER,greaterThan:-1},{argumentType:$r.RANGE},{argumentType:$r.RANGE}]}};class Ba extends qr{formulatext(e,t){return this.runFunctionWithReferenceArgument(e.args,t,this.metadata("FORMULATEXT"),()=>new lr(Wn.NA,Ce.WrongArgNumber),e=>{var t;return null!==(t=this.serialization.getCellFormula(e))&&void 0!==t?t:new lr(Wn.NA,Ce.Formula)})}}Ba.implementedFunctions={FORMULATEXT:{method:"formulatext",parameters:[{argumentType:$r.NOERROR}],doesNotNeedArgumentsToBeComputed:!0,isDependentOnSheetStructureChange:!0,vectorizationForbidden:!0}};
  794. /**
  795. * @license
  796. * Copyright (c) 2024 Handsoncode. All rights reserved.
  797. */
  798. class Ja extends qr{hyperlink(e,t){return this.runFunction(e.args,t,this.metadata("HYPERLINK"),(t,n)=>(e.hyperlink=t,null!==n&&void 0!==n?n:t))}}Ja.implementedFunctions={HYPERLINK:{method:"hyperlink",parameters:[{argumentType:$r.STRING},{argumentType:$r.STRING,optionalArg:!0}]}};
  799. /**
  800. * @license
  801. * Copyright (c) 2024 Handsoncode. All rights reserved.
  802. */
  803. class za extends qr{isbinary(e,t){return this.runFunction(e.args,t,this.metadata("ISBINARY"),e=>/^[01]{1,10}$/.test(e))}iserr(e,t){return this.runFunction(e.args,t,this.metadata("ISERR"),e=>e instanceof lr&&e.type!==Wn.NA)}iserror(e,t){return this.runFunction(e.args,t,this.metadata("ISERROR"),e=>e instanceof lr)}isformula(e,t){return this.runFunctionWithReferenceArgument(e.args,t,this.metadata("ISFORMULA"),()=>new lr(Wn.NA,Ce.WrongArgNumber),e=>{const t=this.dependencyGraph.addressMapping.getCell(e);return t instanceof En})}isblank(e,t){return this.runFunction(e.args,t,this.metadata("ISBLANK"),e=>e===bt)}isna(e,t){return this.runFunction(e.args,t,this.metadata("ISNA"),e=>e instanceof lr&&e.type==Wn.NA)}isnumber(e,t){return this.runFunction(e.args,t,this.metadata("ISNUMBER"),_t)}islogical(e,t){return this.runFunction(e.args,t,this.metadata("ISLOGICAL"),e=>"boolean"===typeof e)}isref(e,t){return this.runFunction(e.args,t,this.metadata("ISREF"),e=>e instanceof lr&&(e.type==Wn.REF||e.type==Wn.CYCLE))}istext(e,t){return this.runFunction(e.args,t,this.metadata("ISTEXT"),e=>"string"===typeof e)}isnontext(e,t){return this.runFunction(e.args,t,this.metadata("ISNONTEXT"),e=>!("string"===typeof e))}column(e,t){return this.runFunctionWithReferenceArgument(e.args,t,this.metadata("COLUMN"),()=>t.formulaAddress.col+1,e=>e.col+1)}columns(e,t){if(1!==e.args.length)return new lr(Wn.NA,Ce.WrongArgNumber);if(e.args.some(e=>e.type===j.EMPTY))return new lr(Wn.NUM,Ce.EmptyArg);let n=e.args[0];while(n.type===j.PARENTHESIS)n=n.expression;if(n.type===j.CELL_RANGE||n.type===j.COLUMN_RANGE)return n.end.col-n.start.col+1;if(n.type===j.CELL_REFERENCE)return 1;if(n.type===j.ROW_RANGE)return this.config.maxColumns;{const e=this.evaluateAst(n,t);return e instanceof Ft?e.width():e instanceof lr?e:1}}row(e,t){return this.runFunctionWithReferenceArgument(e.args,t,this.metadata("ROW"),()=>t.formulaAddress.row+1,e=>e.row+1)}rows(e,t){if(1!==e.args.length)return new lr(Wn.NA,Ce.WrongArgNumber);if(e.args.some(e=>e.type===j.EMPTY))return new lr(Wn.NUM,Ce.EmptyArg);let n=e.args[0];while(n.type===j.PARENTHESIS)n=n.expression;if(n.type===j.CELL_RANGE||n.type===j.ROW_RANGE)return n.end.row-n.start.row+1;if(n.type===j.CELL_REFERENCE)return 1;if(n.type===j.COLUMN_RANGE)return this.config.maxRows;{const e=this.evaluateAst(n,t);return e instanceof Ft?e.height():e instanceof lr?e:1}}index(e,t){return this.runFunction(e.args,t,this.metadata("INDEX"),(e,t,n)=>{var r,i,s,o,a,l;return n<1||t<1?new lr(Wn.VALUE,Ce.LessThanOne):n>e.width()||t>e.height()?new lr(Wn.NUM,Ce.ValueLarge):null!==(l=null!==(s=null===(i=null===(r=null===e||void 0===e?void 0:e.data)||void 0===r?void 0:r[t-1])||void 0===i?void 0:i[n-1])&&void 0!==s?s:null===(a=null===(o=null===e||void 0===e?void 0:e.data)||void 0===o?void 0:o[0])||void 0===a?void 0:a[0])&&void 0!==l?l:new lr(Wn.VALUE,Ce.CellRangeExpected)})}na(e,t){return new lr(Wn.NA)}sheet(e,t){return this.runFunctionWithReferenceArgument(e.args,t,this.metadata("SHEET"),()=>t.formulaAddress.sheet+1,e=>e.sheet+1,e=>{const t=this.dependencyGraph.sheetMapping.get(e);return void 0!==t?t+1:new lr(Wn.NA,Ce.SheetRef)})}sheets(e,t){return this.runFunctionWithReferenceArgument(e.args,t,this.metadata("SHEETS"),()=>this.dependencyGraph.sheetMapping.numberOfSheets(),()=>1,()=>new lr(Wn.VALUE,Ce.CellRefExpected))}}za.implementedFunctions={COLUMN:{method:"column",parameters:[{argumentType:$r.NOERROR,optionalArg:!0}],isDependentOnSheetStructureChange:!0,doesNotNeedArgumentsToBeComputed:!0,vectorizationForbidden:!0},COLUMNS:{method:"columns",parameters:[{argumentType:$r.RANGE}],isDependentOnSheetStructureChange:!0,doesNotNeedArgumentsToBeComputed:!0,vectorizationForbidden:!0},ISBINARY:{method:"isbinary",parameters:[{argumentType:$r.STRING}]},ISERR:{method:"iserr",parameters:[{argumentType:$r.SCALAR}]},ISFORMULA:{method:"isformula",parameters:[{argumentType:$r.NOERROR}],doesNotNeedArgumentsToBeComputed:!0,vectorizationForbidden:!0},ISNA:{method:"isna",parameters:[{argumentType:$r.SCALAR}]},ISREF:{method:"isref",parameters:[{argumentType:$r.SCALAR}],vectorizationForbidden:!0},ISERROR:{method:"iserror",parameters:[{argumentType:$r.SCALAR}]},ISBLANK:{method:"isblank",parameters:[{argumentType:$r.SCALAR}]},ISNUMBER:{method:"isnumber",parameters:[{argumentType:$r.SCALAR}]},ISLOGICAL:{method:"islogical",parameters:[{argumentType:$r.SCALAR}]},ISTEXT:{method:"istext",parameters:[{argumentType:$r.SCALAR}]},ISNONTEXT:{method:"isnontext",parameters:[{argumentType:$r.SCALAR}]},INDEX:{method:"index",parameters:[{argumentType:$r.RANGE},{argumentType:$r.NUMBER},{argumentType:$r.NUMBER,defaultValue:1}]},NA:{method:"na",parameters:[]},ROW:{method:"row",parameters:[{argumentType:$r.NOERROR,optionalArg:!0}],isDependentOnSheetStructureChange:!0,doesNotNeedArgumentsToBeComputed:!0,vectorizationForbidden:!0},ROWS:{method:"rows",parameters:[{argumentType:$r.RANGE}],isDependentOnSheetStructureChange:!0,doesNotNeedArgumentsToBeComputed:!0,vectorizationForbidden:!0},SHEET:{method:"sheet",parameters:[{argumentType:$r.STRING}],doesNotNeedArgumentsToBeComputed:!0,vectorizationForbidden:!0},SHEETS:{method:"sheets",parameters:[{argumentType:$r.STRING}],doesNotNeedArgumentsToBeComputed:!0,vectorizationForbidden:!0}};
  804. /**
  805. * @license
  806. * Copyright (c) 2024 Handsoncode. All rights reserved.
  807. */
  808. class $a extends qr{iseven(e,t){return this.runFunction(e.args,t,this.metadata("ISEVEN"),e=>e%2===0)}}$a.implementedFunctions={ISEVEN:{method:"iseven",parameters:[{argumentType:$r.NUMBER}]}};
  809. /**
  810. * @license
  811. * Copyright (c) 2024 Handsoncode. All rights reserved.
  812. */
  813. class qa extends qr{isodd(e,t){return this.runFunction(e.args,t,this.metadata("ISODD"),e=>e%2===1)}}qa.implementedFunctions={ISODD:{method:"isodd",parameters:[{argumentType:$r.NUMBER}]}};
  814. /**
  815. * @license
  816. * Copyright (c) 2024 Handsoncode. All rights reserved.
  817. */
  818. class el extends qr{log10(e,t){return this.runFunction(e.args,t,this.metadata("LOG10"),Math.log10)}log(e,t){return this.runFunction(e.args,t,this.metadata("LOG"),(e,t)=>Math.log(e)/Math.log(t))}ln(e,t){return this.runFunction(e.args,t,this.metadata("LN"),Math.log)}}el.implementedFunctions={LOG10:{method:"log10",parameters:[{argumentType:$r.NUMBER}]},LOG:{method:"log",parameters:[{argumentType:$r.NUMBER,greaterThan:0},{argumentType:$r.NUMBER,defaultValue:10,greaterThan:0}]},LN:{method:"ln",parameters:[{argumentType:$r.NUMBER}]}};
  819. /**
  820. * @license
  821. * Copyright (c) 2024 Handsoncode. All rights reserved.
  822. */
  823. const tl=parseFloat(Math.PI.toFixed(14));class nl extends qr{pi(e,t){return this.runFunction(e.args,t,this.metadata("PI"),()=>tl)}sqrtpi(e,t){return this.runFunction(e.args,t,this.metadata("SQRTPI"),e=>Math.sqrt(tl*e))}}
  824. /**
  825. * @license
  826. * Copyright (c) 2024 Handsoncode. All rights reserved.
  827. */
  828. function rl(e,t){return new ei(t.width,e.height)}function il(e,t,n){return new ei(1+(e.width-t)/n,1+(e.height-t)/n)}nl.implementedFunctions={PI:{method:"pi",parameters:[]},SQRTPI:{method:"sqrtpi",parameters:[{argumentType:$r.NUMBER,minValue:0}]}};class sl extends qr{mmult(e,t){return this.runFunction(e.args,t,this.metadata("MMULT"),(e,t)=>{if(!e.hasOnlyNumbers()||!t.hasOnlyNumbers())return new lr(Wn.VALUE,Ce.NumberRange);if(t.height()!==e.width())return new lr(Wn.VALUE,Ce.ArrayDimensions);const n=rl(e.size,t.size),r=this.createKernel((function(e,t,n){let r=0;for(let i=0;i<n;++i)r+=e[this.thread.y][i]*t[i][this.thread.x];return r}),n)(e.rawNumbers(),t.rawNumbers(),e.width());return Ft.onlyNumbers(r)})}mmultArraySize(e,t){if(2!==e.args.length)return ei.error();const n=this.metadata("MMULT"),r=e.args.map(e=>{var r;return this.arraySizeForAst(e,new Er(t.formulaAddress,t.arraysFlag||null!==(r=null===n||void 0===n?void 0:n.arrayFunction)&&void 0!==r&&r))}),[i,s]=r;return rl(i,s)}maxpool(e,t){return this.runFunction(e.args,t,this.metadata("MAXPOOL"),(e,t,n=t)=>{if(!e.hasOnlyNumbers())return new lr(Wn.VALUE,Ce.NumberRange);const r=il(e.size,t,n),i=this.createKernel((function(e,t,n){const r=this.thread.x*n,i=this.thread.y*n;let s=e[i][r];for(let o=0;o<t;o++)for(let n=0;n<t;n++)s=Math.max(s,e[i+o][r+n]);return s}),r)(e.rawNumbers(),t,n);return Ft.onlyNumbers(i)})}medianpool(e,t){return this.runFunction(e.args,t,this.metadata("MEDIANPOOL"),(e,t,n=t)=>{if(!e.hasOnlyNumbers())return new lr(Wn.VALUE,Ce.NumberRange);const r=il(e.size,t,n),i=this.createKernel((function(e,t,n){const r=this.thread.x*n,i=this.thread.y*n;let s=e[i][r];for(let h=0;h<t;h++)for(let n=0;n<t;n++)s=Math.max(s,e[i+h][r+n]);let o=e[i][r];for(let h=0;h<t;h++)for(let n=0;n<t;n++)o=Math.min(o,e[i+h][r+n]);const a=t*t;let l=o,c=s,u=42;for(let h=0;h<32;h++){const n=(l+c)/2;let s=0;for(let o=0;o<t;o++)for(let a=0;a<t;a++)e[i+o][r+a]>n&&s++;if(t%2===0){if(s===a/2){u=n;break}s>a/2?l=n:c=n}else{if(s===(a-1)/2){u=n;break}s>(a-1)/2?l=n:c=n}}return u}),r)(e.rawNumbers(),t,n);return Ft.onlyNumbers(i)})}maxpoolArraySize(e,t){if(e.args.length<2||e.args.length>3)return ei.error();const n=this.metadata("MAXPOOL"),r=e.args.map(e=>{var r;return this.arraySizeForAst(e,new Er(t.formulaAddress,t.arraysFlag||null!==(r=null===n||void 0===n?void 0:n.arrayFunction)&&void 0!==r&&r))}),i=r[0],s=e.args[1];let o;o=s.type===j.NUMBER?s.value:1;let a=o;if(3===e.args.length){const t=e.args[2];a=t.type===j.NUMBER?t.value:1}return o>i.width||o>i.height||a>o||(i.width-o)%a!==0||(i.height-o)%a!==0?ei.error():il(i,o,a)}medianpoolArraySize(e,t){return this.maxpoolArraySize(e,t)}transpose(e,t){return this.runFunction(e.args,t,this.metadata("TRANSPOSE"),e=>{const t=e.rawData(),n=e.size,r=[];for(let i=0;i<n.width;++i){r[i]=[];for(let e=0;e<n.height;++e)r[i][e]=t[e][i]}return Ft.onlyValues(r)})}transposeArraySize(e,t){if(1!==e.args.length)return ei.error();const n=this.metadata("TRANSPOSE"),r=e.args.map(e=>{var r;return this.arraySizeForAst(e,new Er(t.formulaAddress,t.arraysFlag||null!==(r=null===n||void 0===n?void 0:n.arrayFunction)&&void 0!==r&&r))}),[i]=r;return new ei(i.height,i.width)}createKernel(e,t){return function(...n){const r=[];for(let i=0;i<t.height;++i){r.push([]);for(let s=0;s<t.width;++s)r[i][s]=e.apply({thread:{x:s,y:i}},n)}return r}}}sl.implementedFunctions={MMULT:{method:"mmult",arraySizeMethod:"mmultArraySize",parameters:[{argumentType:$r.RANGE},{argumentType:$r.RANGE}],vectorizationForbidden:!0},TRANSPOSE:{method:"transpose",arraySizeMethod:"transposeArraySize",parameters:[{argumentType:$r.RANGE}],vectorizationForbidden:!0},MAXPOOL:{method:"maxpool",arraySizeMethod:"maxpoolArraySize",parameters:[{argumentType:$r.RANGE},{argumentType:$r.NUMBER},{argumentType:$r.NUMBER,optionalArg:!0}],vectorizationForbidden:!0},MEDIANPOOL:{method:"medianpool",arraySizeMethod:"medianpoolArraySize",parameters:[{argumentType:$r.RANGE},{argumentType:$r.NUMBER},{argumentType:$r.NUMBER,optionalArg:!0}],vectorizationForbidden:!0}};
  829. /**
  830. * @license
  831. * Copyright (c) 2024 Handsoncode. All rights reserved.
  832. */
  833. class ol extends qr{median(e,t){return this.runFunction(e.args,t,this.metadata("MEDIAN"),(...e)=>{const t=this.arithmeticHelper.coerceNumbersExactRanges(e);return t instanceof lr?t:0===t.length?new lr(Wn.NUM,Ce.OneValue):(t.sort((e,t)=>e-t),t.length%2===0?(t[t.length/2-1]+t[t.length/2])/2:t[Math.floor(t.length/2)])})}large(e,t){return this.runFunction(e.args,t,this.metadata("LARGE"),(e,t)=>{const n=this.arithmeticHelper.manyToExactNumbers(e.valuesFromTopLeftCorner());return n instanceof lr?n:(n.sort((e,t)=>e-t),t=Math.trunc(t),t>n.length?new lr(Wn.NUM,Ce.ValueLarge):n[n.length-t])})}small(e,t){return this.runFunction(e.args,t,this.metadata("SMALL"),(e,t)=>{const n=this.arithmeticHelper.manyToExactNumbers(e.valuesFromTopLeftCorner());return n instanceof lr?n:(n.sort((e,t)=>e-t),t=Math.trunc(t),t>n.length?new lr(Wn.NUM,Ce.ValueLarge):n[t-1])})}}ol.implementedFunctions={MEDIAN:{method:"median",parameters:[{argumentType:$r.ANY}],repeatLastArgs:1},LARGE:{method:"large",parameters:[{argumentType:$r.RANGE},{argumentType:$r.NUMBER,minValue:1}]},SMALL:{method:"small",parameters:[{argumentType:$r.RANGE},{argumentType:$r.NUMBER,minValue:1}]}};
  834. /**
  835. * @license
  836. * Copyright (c) 2024 Handsoncode. All rights reserved.
  837. */
  838. class al extends qr{mod(e,t){return this.runFunction(e.args,t,this.metadata("MOD"),(e,t)=>0===t?new lr(Wn.DIV_BY_ZERO):e%t)}}
  839. /**
  840. * @license
  841. * Copyright (c) 2024 Handsoncode. All rights reserved.
  842. */
  843. function ll(e){return _t(e)&&!Number.isFinite(wt(e))?0:e}al.implementedFunctions={MOD:{method:"mod",parameters:[{argumentType:$r.NUMBER},{argumentType:$r.NUMBER}]}};class cl{constructor(e,t,n){this.sumsq=e,this.sum=t,this.count=n}static single(e){return new cl(e*e,e,1)}compose(e){return new cl(this.sumsq+e.sumsq,this.sum+e.sum,this.count+e.count)}averageValue(){return this.count>0?this.sum/this.count:void 0}varSValue(){return this.count>1?(this.sumsq-this.sum*this.sum/this.count)/(this.count-1):void 0}varPValue(){return this.count>0?(this.sumsq-this.sum*this.sum/this.count)/this.count:void 0}}cl.empty=new cl(0,0,0);class ul extends qr{constructor(){super(...arguments),this.addWithEpsilonRaw=(e,t)=>this.arithmeticHelper.addWithEpsilonRaw(e,t)}sum(e,t){return this.doSum(e.args,t)}sumsq(e,t){return this.reduce(e.args,t,0,"SUMSQ",this.addWithEpsilonRaw,e=>Math.pow(wt(e),2),hl)}max(e,t){return this.doMax(e.args,t)}maxa(e,t){const n=this.reduce(e.args,t,Number.NEGATIVE_INFINITY,"MAXA",(e,t)=>Math.max(e,t),wt,dl);return ll(n)}min(e,t){return this.doMin(e.args,t)}mina(e,t){const n=this.reduce(e.args,t,Number.POSITIVE_INFINITY,"MINA",(e,t)=>Math.min(e,t),wt,dl);return ll(n)}count(e,t){return this.doCount(e.args,t)}counta(e,t){return this.doCounta(e.args,t)}average(e,t){return this.doAverage(e.args,t)}averagea(e,t){var n;const r=this.reduce(e.args,t,cl.empty,"_AGGREGATE_A",(e,t)=>e.compose(t),e=>cl.single(wt(e)),dl);return r instanceof lr?r:null!==(n=r.averageValue())&&void 0!==n?n:new lr(Wn.DIV_BY_ZERO)}vars(e,t){return this.doVarS(e.args,t)}varp(e,t){return this.doVarP(e.args,t)}vara(e,t){var n;const r=this.reduceAggregateA(e.args,t);return r instanceof lr?r:null!==(n=r.varSValue())&&void 0!==n?n:new lr(Wn.DIV_BY_ZERO)}varpa(e,t){var n;const r=this.reduceAggregateA(e.args,t);return r instanceof lr?r:null!==(n=r.varPValue())&&void 0!==n?n:new lr(Wn.DIV_BY_ZERO)}stdevs(e,t){return this.doStdevS(e.args,t)}stdevp(e,t){return this.doStdevP(e.args,t)}stdeva(e,t){const n=this.reduceAggregateA(e.args,t);if(n instanceof lr)return n;{const e=n.varSValue();return void 0===e?new lr(Wn.DIV_BY_ZERO):Math.sqrt(e)}}stdevpa(e,t){const n=this.reduceAggregateA(e.args,t);if(n instanceof lr)return n;{const e=n.varPValue();return void 0===e?new lr(Wn.DIV_BY_ZERO):Math.sqrt(e)}}product(e,t){return this.doProduct(e.args,t)}subtotal(e,t){if(e.args.length<2)return new lr(Wn.NA,Ce.WrongArgNumber);const n=this.coerceToType(this.evaluateAst(e.args[0],t),{argumentType:$r.NUMBER},t),r=e.args.slice(1);switch(n){case 1:case 101:return this.doAverage(r,t);case 2:case 102:return this.doCount(r,t);case 3:case 103:return this.doCounta(r,t);case 4:case 104:return this.doMax(r,t);case 5:case 105:return this.doMin(r,t);case 6:case 106:return this.doProduct(r,t);case 7:case 107:return this.doStdevS(r,t);case 8:case 108:return this.doStdevP(r,t);case 9:case 109:return this.doSum(r,t);case 10:case 110:return this.doVarS(r,t);case 11:case 111:return this.doVarP(r,t);default:return new lr(Wn.VALUE,Ce.BadMode)}}reduceAggregate(e,t){return this.reduce(e,t,cl.empty,"_AGGREGATE",(e,t)=>e.compose(t),e=>cl.single(wt(e)),hl)}reduceAggregateA(e,t){return this.reduce(e,t,cl.empty,"_AGGREGATE_A",(e,t)=>e.compose(t),e=>cl.single(wt(e)),dl)}doAverage(e,t){var n;const r=this.reduceAggregate(e,t);return r instanceof lr?r:null!==(n=r.averageValue())&&void 0!==n?n:new lr(Wn.DIV_BY_ZERO)}doVarS(e,t){var n;const r=this.reduceAggregate(e,t);return r instanceof lr?r:null!==(n=r.varSValue())&&void 0!==n?n:new lr(Wn.DIV_BY_ZERO)}doVarP(e,t){var n;const r=this.reduceAggregate(e,t);return r instanceof lr?r:null!==(n=r.varPValue())&&void 0!==n?n:new lr(Wn.DIV_BY_ZERO)}doStdevS(e,t){const n=this.reduceAggregate(e,t);if(n instanceof lr)return n;{const e=n.varSValue();return void 0===e?new lr(Wn.DIV_BY_ZERO):Math.sqrt(e)}}doStdevP(e,t){const n=this.reduceAggregate(e,t);if(n instanceof lr)return n;{const e=n.varPValue();return void 0===e?new lr(Wn.DIV_BY_ZERO):Math.sqrt(e)}}doCount(e,t){return this.reduce(e,t,0,"COUNT",(e,t)=>e+t,wt,e=>_t(e)?1:0)}doCounta(e,t){return this.reduce(e,t,0,"COUNTA",(e,t)=>e+t,wt,e=>e===bt?0:1)}doMax(e,t){const n=this.reduce(e,t,Number.NEGATIVE_INFINITY,"MAX",(e,t)=>Math.max(e,t),wt,hl);return ll(n)}doMin(e,t){const n=this.reduce(e,t,Number.POSITIVE_INFINITY,"MIN",(e,t)=>Math.min(e,t),wt,hl);return ll(n)}doSum(e,t){return this.reduce(e,t,0,"SUM",this.addWithEpsilonRaw,wt,hl)}doProduct(e,t){return this.reduce(e,t,1,"PRODUCT",(e,t)=>e*t,wt,hl)}reduce(e,t,n,r,i,s,o){return e.length<1?new lr(Wn.NA,Ce.WrongArgNumber):e.reduce((e,a)=>{if(e instanceof lr)return e;if(a.type===j.CELL_RANGE||a.type===j.COLUMN_RANGE||a.type===j.ROW_RANGE){const l=this.evaluateRange(a,t,n,r,i,s,o);return l instanceof lr?l:i(l,e)}let l;if(l=this.evaluateAst(a,t),l instanceof Ft){const t=Array.from(l.valuesFromTopLeftCorner()).map(o).filter(e=>void 0!==e);return t.map(e=>e instanceof lr?e:s(e)).reduce((e,t)=>e instanceof lr?e:t instanceof lr?t:i(e,t),e)}if(a.type===j.CELL_REFERENCE){if(l=o(l),void 0===l)return e}else if(l=this.coerceScalarToNumberOrError(l),l=o(l),void 0===l)return e;return l instanceof lr?l:i(e,s(l))},n)}evaluateRange(e,t,n,r,i,s,o){let a;try{a=Tr.fromAst(e,t.formulaAddress)}catch(u){if(u instanceof Bt)return new lr(Wn.REF,Ce.RangeManySheets);throw u}const l=this.dependencyGraph.getRange(a.start,a.end);if(void 0===l)throw new Error("Range does not exists in graph");let c=l.getFunctionValue(r);if(void 0===c){const e=this.getRangeValues(r,a,l,s,o);c=e.reduce((e,t)=>e instanceof lr?e:t instanceof lr?t:i(e,t),n),l.setFunctionValue(r,c)}return c}getRangeValues(e,t,n,r,i){const s=[],{smallerRangeVertex:o,restRange:a}=this.dependencyGraph.rangeMapping.findSmallerRange(t);let l;if(void 0!==o&&this.dependencyGraph.existsEdge(o,n)){const t=o.getFunctionValue(e);if(void 0!==t)s.push(t);else for(const e of o.range.addresses(this.dependencyGraph)){const t=i(this.dependencyGraph.getScalarValue(e));t instanceof lr?s.push(t):void 0!==t&&s.push(r(t))}l=a}else l=t;for(const c of l.addresses(this.dependencyGraph)){const e=i(this.dependencyGraph.getScalarValue(c));e instanceof lr?s.push(e):void 0!==e&&s.push(r(e))}return s}}function hl(e){return _t(e)||e instanceof lr?e:void 0}function dl(e){return"boolean"===typeof e?xr(e):_t(e)||e instanceof lr?e:"string"===typeof e?0:void 0}
  844. /**
  845. * @license
  846. * Copyright (c) 2024 Handsoncode. All rights reserved.
  847. */ul.implementedFunctions={SUM:{method:"sum",parameters:[{argumentType:$r.ANY}],repeatLastArgs:1},SUMSQ:{method:"sumsq",parameters:[{argumentType:$r.ANY}],repeatLastArgs:1},MAX:{method:"max",parameters:[{argumentType:$r.ANY}],repeatLastArgs:1},MIN:{method:"min",parameters:[{argumentType:$r.ANY}],repeatLastArgs:1},MAXA:{method:"maxa",parameters:[{argumentType:$r.ANY}],repeatLastArgs:1},MINA:{method:"mina",parameters:[{argumentType:$r.ANY}],repeatLastArgs:1},COUNT:{method:"count",parameters:[{argumentType:$r.ANY}],repeatLastArgs:1},COUNTA:{method:"counta",parameters:[{argumentType:$r.ANY}],repeatLastArgs:1},AVERAGE:{method:"average",parameters:[{argumentType:$r.ANY}],repeatLastArgs:1},AVERAGEA:{method:"averagea",parameters:[{argumentType:$r.ANY}],repeatLastArgs:1},PRODUCT:{method:"product",parameters:[{argumentType:$r.ANY}],repeatLastArgs:1},"VAR.S":{method:"vars",parameters:[{argumentType:$r.ANY}],repeatLastArgs:1},"VAR.P":{method:"varp",parameters:[{argumentType:$r.ANY}],repeatLastArgs:1},VARA:{method:"vara",parameters:[{argumentType:$r.ANY}],repeatLastArgs:1},VARPA:{method:"varpa",parameters:[{argumentType:$r.ANY}],repeatLastArgs:1},"STDEV.S":{method:"stdevs",parameters:[{argumentType:$r.ANY}],repeatLastArgs:1},"STDEV.P":{method:"stdevp",parameters:[{argumentType:$r.ANY}],repeatLastArgs:1},STDEVA:{method:"stdeva",parameters:[{argumentType:$r.ANY}],repeatLastArgs:1},STDEVPA:{method:"stdevpa",parameters:[{argumentType:$r.ANY}],repeatLastArgs:1},SUBTOTAL:{method:"subtotal",parameters:[{argumentType:$r.NUMBER},{argumentType:$r.ANY}],repeatLastArgs:1}},ul.aliases={VAR:"VAR.S",VARP:"VAR.P",STDEV:"STDEV.S",STDEVP:"STDEV.P",VARS:"VAR.S",STDEVS:"STDEV.S"};class ml extends qr{power(e,t){return this.runFunction(e.args,t,this.metadata("POWER"),Math.pow)}}ml.implementedFunctions={POWER:{method:"power",parameters:[{argumentType:$r.NUMBER},{argumentType:$r.NUMBER}]}};
  848. /**
  849. * @license
  850. * Copyright (c) 2024 Handsoncode. All rights reserved.
  851. */
  852. class gl extends qr{radians(e,t){return this.runFunction(e.args,t,this.metadata("RADIANS"),e=>e*(Math.PI/180))}}gl.implementedFunctions={RADIANS:{method:"radians",parameters:[{argumentType:$r.NUMBER}]}};
  853. /**
  854. * @license
  855. * Copyright (c) 2024 Handsoncode. All rights reserved.
  856. */
  857. const pl=10,fl=255,Rl=2,yl=36,Ml="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ";class Sl extends qr{dec2bin(e,t){return this.runFunction(e.args,t,this.metadata("DEC2BIN"),(e,t)=>wl(e,2,t))}dec2oct(e,t){return this.runFunction(e.args,t,this.metadata("DEC2OCT"),(e,t)=>wl(e,8,t))}dec2hex(e,t){return this.runFunction(e.args,t,this.metadata("DEC2HEX"),(e,t)=>wl(e,16,t))}bin2dec(e,t){return this.runFunction(e.args,t,this.metadata("BIN2DEC"),e=>{const t=bl(e,2,pl);return void 0===t?new lr(Wn.NUM,Ce.NotBinary):Cl(t,2)})}bin2oct(e,t){return this.runFunction(e.args,t,this.metadata("BIN2OCT"),(e,t)=>{const n=bl(e,2,pl);return void 0===n?new lr(Wn.NUM,Ce.NotBinary):wl(Cl(n,2),8,t)})}bin2hex(e,t){return this.runFunction(e.args,t,this.metadata("BIN2HEX"),(e,t)=>{const n=bl(e,2,pl);return void 0===n?new lr(Wn.NUM,Ce.NotBinary):wl(Cl(n,2),16,t)})}oct2dec(e,t){return this.runFunction(e.args,t,this.metadata("OCT2DEC"),e=>{const t=bl(e,8,pl);return void 0===t?new lr(Wn.NUM,Ce.NotOctal):Cl(t,8)})}oct2bin(e,t){return this.runFunction(e.args,t,this.metadata("OCT2BIN"),(e,t)=>{const n=bl(e,8,pl);return void 0===n?new lr(Wn.NUM,Ce.NotOctal):wl(Cl(n,8),2,t)})}oct2hex(e,t){return this.runFunction(e.args,t,this.metadata("OCT2HEX"),(e,t)=>{const n=bl(e,8,pl);return void 0===n?new lr(Wn.NUM,Ce.NotOctal):wl(Cl(n,8),16,t)})}hex2dec(e,t){return this.runFunction(e.args,t,this.metadata("HEX2DEC"),e=>{const t=bl(e,16,pl);return void 0===t?new lr(Wn.NUM,Ce.NotHex):Cl(t,16)})}hex2bin(e,t){return this.runFunction(e.args,t,this.metadata("HEX2BIN"),(e,t)=>{const n=bl(e,16,pl);return void 0===n?new lr(Wn.NUM,Ce.NotHex):wl(Cl(n,16),2,t)})}hex2oct(e,t){return this.runFunction(e.args,t,this.metadata("HEX2OCT"),(e,t)=>{const n=bl(e,16,pl);return void 0===n?new lr(Wn.NUM,Ce.NotHex):wl(Cl(n,16),8,t)})}base(e,t){return this.runFunction(e.args,t,this.metadata("BASE"),vl)}decimal(e,t){return this.runFunction(e.args,t,this.metadata("DECIMAL"),(e,t)=>{const n=bl(e,t,fl);return void 0===n?new lr(Wn.NUM,Ce.NotHex):parseInt(n,t)})}}function bl(e,t,n){const r=Ml.substr(0,t),i=new RegExp(`^[${r}]+$`);if(!(e.length>n)&&i.test(e))return e}function wl(e,t,n){if(e>Ol(t))return new lr(Wn.NUM,Ce.ValueBaseLarge);if(e<Tl(t))return new lr(Wn.NUM,Ce.ValueBaseSmall);const r=El(e,t);return void 0===n||e<0?r:r.length>n?new lr(Wn.NUM,Ce.ValueBaseLong):ns(r,n)}function Tl(e){return-Math.pow(e,pl)/2}function Ol(e){return-Tl(e)-1}function vl(e,t,n){const r=El(e,t);return void 0!==n&&n>r.length?ns(r,n):r}function El(e,t){const n=e<0?Math.pow(t,pl):0;return(e+n).toString(t).toUpperCase()}function Cl(e,t){const n=parseInt(e,t),r=Math.pow(t,pl);return n>=r/2?n-r:n}
  858. /**
  859. * @license
  860. * Copyright (c) 2024 Handsoncode. All rights reserved.
  861. */Sl.implementedFunctions={DEC2BIN:{method:"dec2bin",parameters:[{argumentType:$r.NUMBER},{argumentType:$r.NUMBER,optionalArg:!0,minValue:1,maxValue:10}]},DEC2OCT:{method:"dec2oct",parameters:[{argumentType:$r.NUMBER},{argumentType:$r.NUMBER,optionalArg:!0,minValue:1,maxValue:10}]},DEC2HEX:{method:"dec2hex",parameters:[{argumentType:$r.NUMBER},{argumentType:$r.NUMBER,optionalArg:!0,minValue:1,maxValue:10}]},BIN2DEC:{method:"bin2dec",parameters:[{argumentType:$r.STRING}]},BIN2OCT:{method:"bin2oct",parameters:[{argumentType:$r.STRING},{argumentType:$r.NUMBER,optionalArg:!0,minValue:0,maxValue:pl}]},BIN2HEX:{method:"bin2hex",parameters:[{argumentType:$r.STRING},{argumentType:$r.NUMBER,optionalArg:!0,minValue:0,maxValue:pl}]},OCT2DEC:{method:"oct2dec",parameters:[{argumentType:$r.STRING}]},OCT2BIN:{method:"oct2bin",parameters:[{argumentType:$r.STRING},{argumentType:$r.NUMBER,optionalArg:!0,minValue:0,maxValue:pl}]},OCT2HEX:{method:"oct2hex",parameters:[{argumentType:$r.STRING},{argumentType:$r.NUMBER,optionalArg:!0,minValue:0,maxValue:pl}]},HEX2DEC:{method:"hex2dec",parameters:[{argumentType:$r.STRING}]},HEX2BIN:{method:"hex2bin",parameters:[{argumentType:$r.STRING},{argumentType:$r.NUMBER,optionalArg:!0,minValue:0,maxValue:pl}]},HEX2OCT:{method:"hex2oct",parameters:[{argumentType:$r.STRING},{argumentType:$r.NUMBER,optionalArg:!0,minValue:0,maxValue:pl}]},DECIMAL:{method:"decimal",parameters:[{argumentType:$r.STRING},{argumentType:$r.NUMBER,minValue:Rl,maxValue:yl}]},BASE:{method:"base",parameters:[{argumentType:$r.NUMBER,minValue:0},{argumentType:$r.NUMBER,minValue:Rl,maxValue:yl},{argumentType:$r.NUMBER,optionalArg:!0,minValue:0,maxValue:fl}]}};class Ll extends qr{rand(e,t){return this.runFunction(e.args,t,this.metadata("RAND"),Math.random)}randbetween(e,t){return this.runFunction(e.args,t,this.metadata("RANDBETWEEN"),(e,t)=>t<e?new lr(Wn.NUM,Ce.WrongOrder):(e=Math.ceil(e),t=Math.floor(t)+1,e===t&&(t+=1),e+Math.floor(Math.random()*(t-e))))}}
  862. /**
  863. * @license
  864. * Copyright (c) 2024 Handsoncode. All rights reserved.
  865. */
  866. function Nl(e){const t=Math.ceil(e);return t%2===1?t:t+1}function _l(e){const t=Math.ceil(e);return t%2===0?t:t+1}Ll.implementedFunctions={RAND:{method:"rand",parameters:[],isVolatile:!0},RANDBETWEEN:{method:"randbetween",parameters:[{argumentType:$r.NUMBER},{argumentType:$r.NUMBER}],isVolatile:!0}};class Il extends qr{roundup(e,t){return this.runFunction(e.args,t,this.metadata("ROUNDDOWN"),(e,t)=>{const n=Math.pow(10,t);return e<0?-Math.ceil(-e*n)/n:Math.ceil(e*n)/n})}rounddown(e,t){return this.runFunction(e.args,t,this.metadata("ROUNDDOWN"),(e,t)=>{const n=Math.pow(10,t);return e<0?-Math.floor(-e*n)/n:Math.floor(e*n)/n})}round(e,t){return this.runFunction(e.args,t,this.metadata("ROUND"),(e,t)=>{const n=Math.pow(10,t);return e<0?-Math.round(-e*n)/n:Math.round(e*n)/n})}intFunc(e,t){return this.runFunction(e.args,t,this.metadata("INT"),e=>e<0?-Math.floor(-e):Math.floor(e))}even(e,t){return this.runFunction(e.args,t,this.metadata("EVEN"),e=>e<0?-_l(-e):_l(e))}odd(e,t){return this.runFunction(e.args,t,this.metadata("ODD"),e=>e<0?-Nl(-e):Nl(e))}ceilingmath(e,t){return this.runFunction(e.args,t,this.metadata("CEILING.MATH"),(e,t,n)=>0===t||0===e?0:(t=Math.abs(t),1===n&&e<0&&(t=-t),Math.ceil(e/t)*t))}ceiling(e,t){return this.runFunction(e.args,t,this.metadata("CEILING"),(e,t)=>0===e?0:0===t?new lr(Wn.DIV_BY_ZERO):e>0&&t<0?new lr(Wn.NUM,Ce.DistinctSigns):Math.ceil(e/t)*t)}ceilingprecise(e,t){return this.runFunction(e.args,t,this.metadata("CEILING.PRECISE"),(e,t)=>0===t||0===e?0:(t=Math.abs(t),Math.ceil(e/t)*t))}floormath(e,t){return this.runFunction(e.args,t,this.metadata("FLOOR.MATH"),(e,t,n)=>0===t||0===e?0:(t=Math.abs(t),1===n&&e<0&&(t*=-1),Math.floor(e/t)*t))}floor(e,t){return this.runFunction(e.args,t,this.metadata("FLOOR"),(e,t)=>0===e?0:0===t?new lr(Wn.DIV_BY_ZERO):e>0&&t<0?new lr(Wn.NUM,Ce.DistinctSigns):Math.floor(e/t)*t)}floorprecise(e,t){return this.runFunction(e.args,t,this.metadata("FLOOR.PRECISE"),(e,t)=>0===t||0===e?0:(t=Math.abs(t),Math.floor(e/t)*t))}}Il.implementedFunctions={ROUNDUP:{method:"roundup",parameters:[{argumentType:$r.NUMBER},{argumentType:$r.NUMBER,defaultValue:0}]},ROUNDDOWN:{method:"rounddown",parameters:[{argumentType:$r.NUMBER},{argumentType:$r.NUMBER,defaultValue:0}]},ROUND:{method:"round",parameters:[{argumentType:$r.NUMBER},{argumentType:$r.NUMBER,defaultValue:0}]},INT:{method:"intFunc",parameters:[{argumentType:$r.NUMBER}]},EVEN:{method:"even",parameters:[{argumentType:$r.NUMBER}]},ODD:{method:"odd",parameters:[{argumentType:$r.NUMBER}]},"CEILING.MATH":{method:"ceilingmath",parameters:[{argumentType:$r.NUMBER},{argumentType:$r.NUMBER,defaultValue:1},{argumentType:$r.NUMBER,defaultValue:0}]},CEILING:{method:"ceiling",parameters:[{argumentType:$r.NUMBER},{argumentType:$r.NUMBER}]},"CEILING.PRECISE":{method:"ceilingprecise",parameters:[{argumentType:$r.NUMBER},{argumentType:$r.NUMBER,defaultValue:1}]},"FLOOR.MATH":{method:"floormath",parameters:[{argumentType:$r.NUMBER},{argumentType:$r.NUMBER,defaultValue:1},{argumentType:$r.NUMBER,defaultValue:0}]},FLOOR:{method:"floor",parameters:[{argumentType:$r.NUMBER},{argumentType:$r.NUMBER}]},"FLOOR.PRECISE":{method:"floorprecise",parameters:[{argumentType:$r.NUMBER},{argumentType:$r.NUMBER,defaultValue:1}]}},Il.aliases={"ISO.CEILING":"CEILING.PRECISE",TRUNC:"ROUNDDOWN"};
  867. /**
  868. * @license
  869. * Copyright (c) 2024 Handsoncode. All rights reserved.
  870. */
  871. class Pl extends qr{sqrt(e,t){return this.runFunction(e.args,t,this.metadata("SQRT"),Math.sqrt)}}
  872. /**
  873. * @license
  874. * Copyright (c) 2024 Handsoncode. All rights reserved.
  875. */
  876. function*xl(){}function Dl(e){const t=e[Symbol.iterator](),{done:n,value:r}=t.next();return n?{rest:xl()}:{value:r,rest:t}}Pl.implementedFunctions={SQRT:{method:"sqrt",parameters:[{argumentType:$r.NUMBER}]}};
  877. /**
  878. * @license
  879. * Copyright (c) 2024 Handsoncode. All rights reserved.
  880. */
  881. const Al=(e,t,n)=>{if(n.end.row>n.start.row){const r=mr(n.end.sheet,n.end.col,n.end.row-1),i=e.getRange(n.start,r);if(void 0!==i)return{smallerRangeVertex:i,restValuesRange:n.withStart(mr(n.start.sheet,n.start.col,n.end.row)),restConditionRanges:t.map(e=>e.withStart(mr(e.start.sheet,e.start.col,e.end.row)))}}return{restValuesRange:n,restConditionRanges:t}};class Fl{constructor(e,t,n,r,i){this.interpreter=e,this.cacheKey=t,this.reduceInitialValue=n,this.composeFunction=r,this.mapFunction=i,this.dependencyGraph=this.interpreter.dependencyGraph}compute(e,t){for(const i of t)if(!i.conditionRange.sameDimensionsAs(e))return new lr(Wn.VALUE,Ce.EqualLength);const n=this.tryToGetRangeVertexForRangeValue(e),r=t.map(e=>this.tryToGetRangeVertexForRangeValue(e.conditionRange));if(n&&r.every(e=>void 0!==e)){const i=t.map(e=>e.criterionPackage.raw).join(","),s=this.findAlreadyComputedValueInCache(n,this.cacheKey(t),i);if(void 0!==s)return this.interpreter.stats.incrementCriterionFunctionFullCacheUsed(),s;const o=this.buildNewCriterionCache(this.cacheKey(t),t.map(e=>e.conditionRange.range),e.range);return o.has(i)||o.set(i,[this.evaluateRangeValue(e,t),t.map(e=>e.criterionPackage.lambda)]),n.setCriterionFunctionValues(this.cacheKey(t),o),r.forEach(e=>{void 0!==e&&e.addDependentCacheRange(n)}),o.get(i)[0]}return this.evaluateRangeValue(e,t)}tryToGetRangeVertexForRangeValue(e){const t=e.range;return void 0===t?void 0:this.dependencyGraph.getRange(t.start,t.end)}reduceFunction(e){let t=this.reduceInitialValue;for(const n of e)t=this.composeFunction(t,n);return t}findAlreadyComputedValueInCache(e,t,n){return e.getCriterionFunctionValue(t,n)}evaluateRangeValue(e,t){const n=t.map(e=>e.criterionPackage.lambda),r=Array.from(e.valuesFromTopLeftCorner()).map(this.mapFunction)[Symbol.iterator](),i=t.map(e=>e.conditionRange.iterateValuesFromTopLeftCorner()),s=kl(n,i,r);return this.reduceFunction(s)}buildNewCriterionCache(e,t,n){const r=this.dependencyGraph.getRange(n.start,n.end),{smallerRangeVertex:i,restConditionRanges:s,restValuesRange:o}=Al(this.dependencyGraph,t,n);let a;a=void 0!==i&&this.dependencyGraph.existsEdge(i,r)?i.getCriterionFunctionValues(e):new Map;const l=new Map;return a.forEach(([e,t],n)=>{const r=kl(t,s.map(e=>Hl(this.dependencyGraph,e)),Array.from(Hl(this.dependencyGraph,o)).map(this.mapFunction)[Symbol.iterator]()),i=this.composeFunction(e,this.reduceFunction(r));this.interpreter.stats.incrementCriterionFunctionPartialCacheUsed(),l.set(n,[i,t])}),l}}class Yl{constructor(e,t){this.conditionRange=e,this.criterionPackage=t}}function*Hl(e,t){for(const n of t.addresses(e))yield wt(e.getScalarValue(n))}function*kl(e,t,n){for(const r of n){const n=t.map(e=>Dl(e));if(!n.every(e=>Object.prototype.hasOwnProperty.call(e,"value")))return;const i=n.map(e=>wt(e.value));Vl(i,e).every(([e,t])=>t(e))&&(yield r),t=n.map(e=>e.rest)}}function Vl(e,t){const n=[];for(let r=0;r<Math.min(e.length,t.length);r++)n.push([e[r],t[r]]);return n}
  882. /**
  883. * @license
  884. * Copyright (c) 2024 Handsoncode. All rights reserved.
  885. */class Ul{constructor(e,t){this.sum=e,this.count=t}static single(e){return new Ul(e,1)}compose(e){return new Ul(this.sum+e.sum,this.count+e.count)}averageValue(){return this.count>0?this.sum/this.count:void 0}}function Wl(e){return t=>{const n=t.map(e=>`${e.conditionRange.range.sheet},${e.conditionRange.range.start.col},${e.conditionRange.range.start.row}`);return[e,...n].join(",")}}function Xl(e){return _t(e)&&!Number.isFinite(wt(e))?0:e}function jl(e){return e instanceof lr?e:_t(e)?wt(e):void 0}Ul.empty=new Ul(0,0);class Zl extends qr{sumif(e,t){const n="SUMIF",r=(e,t,r)=>this.computeConditionalAggregationFunction(null!==r&&void 0!==r?r:e,[e,t],n,0,(e,t)=>this.arithmeticHelper.nonstrictadd(e,t),jl);return this.runFunction(e.args,t,this.metadata(n),r)}sumifs(e,t){const n="SUMIFS",r=(e,...t)=>this.computeConditionalAggregationFunction(e,t,n,0,(e,t)=>this.arithmeticHelper.nonstrictadd(e,t),jl);return this.runFunction(e.args,t,this.metadata(n),r)}averageif(e,t){const n="AVERAGEIF",r=(e,t,r)=>{const i=this.computeConditionalAggregationFunction(null!==r&&void 0!==r?r:e,[e,t],n,Ul.empty,(e,t)=>e.compose(t),e=>_t(e)?Ul.single(wt(e)):Ul.empty);return i instanceof lr?i:i.averageValue()||new lr(Wn.DIV_BY_ZERO)};return this.runFunction(e.args,t,this.metadata(n),r)}countif(e,t){const n="COUNTIF",r=(e,t)=>this.computeConditionalAggregationFunction(e,[e,t],n,0,(e,t)=>e+t,()=>1);return this.runFunction(e.args,t,this.metadata(n),r)}countifs(e,t){const n="COUNTIFS",r=(...e)=>this.computeConditionalAggregationFunction(e[0],e,n,0,(e,t)=>e+t,()=>1);return this.runFunction(e.args,t,this.metadata(n),r)}minifs(e,t){const n="MINIFS",r=(e,t)=>void 0===t||void 0===e?void 0===t?e:t:Math.min(e,t),i=(e,...t)=>{const i=this.computeConditionalAggregationFunction(e,t,n,Number.POSITIVE_INFINITY,r,jl);return Xl(i)};return this.runFunction(e.args,t,this.metadata(n),i)}maxifs(e,t){const n="MAXIFS",r=(e,t)=>void 0===t||void 0===e?void 0===t?e:t:Math.max(e,t),i=(e,...t)=>{const i=this.computeConditionalAggregationFunction(e,t,n,Number.NEGATIVE_INFINITY,r,jl);return Xl(i)};return this.runFunction(e.args,t,this.metadata(n),i)}computeConditionalAggregationFunction(e,t,n,r,i,s){const o=[];for(let a=0;a<t.length;a+=2){const e=t[a],n=this.interpreter.criterionBuilder.fromCellValue(t[a+1],this.arithmeticHelper);if(void 0===n)return new lr(Wn.VALUE,Ce.BadCriterion);o.push(new Yl(e,n))}return new Fl(this.interpreter,Wl(n),r,i,s).compute(e,o)}}Zl.implementedFunctions={SUMIF:{method:"sumif",parameters:[{argumentType:$r.RANGE},{argumentType:$r.NOERROR},{argumentType:$r.RANGE,optionalArg:!0}]},COUNTIF:{method:"countif",parameters:[{argumentType:$r.RANGE},{argumentType:$r.NOERROR}]},AVERAGEIF:{method:"averageif",parameters:[{argumentType:$r.RANGE},{argumentType:$r.NOERROR},{argumentType:$r.RANGE,optionalArg:!0}]},SUMIFS:{method:"sumifs",parameters:[{argumentType:$r.RANGE},{argumentType:$r.RANGE},{argumentType:$r.NOERROR}],repeatLastArgs:2},COUNTIFS:{method:"countifs",parameters:[{argumentType:$r.RANGE},{argumentType:$r.NOERROR}],repeatLastArgs:2},MINIFS:{method:"minifs",parameters:[{argumentType:$r.RANGE},{argumentType:$r.RANGE},{argumentType:$r.NOERROR}],repeatLastArgs:2},MAXIFS:{method:"maxifs",parameters:[{argumentType:$r.RANGE},{argumentType:$r.RANGE},{argumentType:$r.NOERROR}],repeatLastArgs:2}};
  886. /**
  887. * @license
  888. * Copyright (c) 2024 Handsoncode. All rights reserved.
  889. */
  890. class Ql extends qr{sumproduct(e,t){return this.runFunction(e.args,t,this.metadata("SUMPRODUCT"),(...e)=>{const t=e[0].width(),n=e[0].height();for(const s of e)if(s.width()!==t||s.height()!==n)return new lr(Wn.VALUE,Ce.EqualLength);let r=0;const i=e.map(e=>e.iterateValuesFromTopLeftCorner());for(let s=0;s<t*n;s++){let e=1;for(const t of i){const n=t.next().value;if(n instanceof lr)return n;const r=this.coerceScalarToNumberOrError(n);_t(r)?e*=wt(r):e=0}r+=e}return r})}}Ql.implementedFunctions={SUMPRODUCT:{method:"sumproduct",parameters:[{argumentType:$r.RANGE}],repeatLastArgs:1}};
  891. /**
  892. * @license
  893. * Copyright (c) 2024 Handsoncode. All rights reserved.
  894. */
  895. class Kl extends qr{concatenate(e,t){return this.runFunction(e.args,t,this.metadata("CONCATENATE"),(...e)=>"".concat(...e))}split(e,t){return this.runFunction(e.args,t,this.metadata("SPLIT"),(e,t)=>{const n=e.split(" ");return t>=n.length||t<0?new lr(Wn.VALUE,Ce.IndexBounds):n[t]})}len(e,t){return this.runFunction(e.args,t,this.metadata("LEN"),e=>e.length)}lower(e,t){return this.runFunction(e.args,t,this.metadata("LOWER"),e=>e.toLowerCase())}trim(e,t){return this.runFunction(e.args,t,this.metadata("TRIM"),e=>e.replace(/^ +| +$/g,"").replace(/ +/g," "))}proper(e,t){return this.runFunction(e.args,t,this.metadata("PROPER"),e=>e.replace(/\p{L}+/gu,e=>e.charAt(0).toUpperCase()+e.substring(1).toLowerCase()))}clean(e,t){return this.runFunction(e.args,t,this.metadata("CLEAN"),e=>e.replace(/[\u0000-\u001F]/g,""))}exact(e,t){return this.runFunction(e.args,t,this.metadata("EXACT"),(e,t)=>e===t)}rept(e,t){return this.runFunction(e.args,t,this.metadata("REPT"),(e,t)=>t<0?new lr(Wn.VALUE,Ce.NegativeCount):e.repeat(t))}right(e,t){return this.runFunction(e.args,t,this.metadata("RIGHT"),(e,t)=>t<0?new lr(Wn.VALUE,Ce.NegativeLength):0===t?"":e.slice(-t))}left(e,t){return this.runFunction(e.args,t,this.metadata("LEFT"),(e,t)=>t<0?new lr(Wn.VALUE,Ce.NegativeLength):e.slice(0,t))}mid(e,t){return this.runFunction(e.args,t,this.metadata("MID"),(e,t,n)=>t<1?new lr(Wn.VALUE,Ce.LessThanOne):n<0?new lr(Wn.VALUE,Ce.NegativeLength):e.substring(t-1,t+n-1))}replace(e,t){return this.runFunction(e.args,t,this.metadata("REPLACE"),(e,t,n,r)=>t<1?new lr(Wn.VALUE,Ce.LessThanOne):n<0?new lr(Wn.VALUE,Ce.NegativeLength):e.substring(0,t-1)+r+e.substring(t+n-1))}search(e,t){return this.runFunction(e.args,t,this.metadata("SEARCH"),(e,t,n)=>{if(n<1||n>t.length)return new lr(Wn.VALUE,Ce.LengthBounds);const r=e.toLowerCase(),i=t.substring(n-1).toLowerCase(),s=this.arithmeticHelper.requiresRegex(r)?this.arithmeticHelper.searchString(r,i):i.indexOf(r);return s>-1?s+n:new lr(Wn.VALUE,Ce.PatternNotFound)})}substitute(e,t){return this.runFunction(e.args,t,this.metadata("SUBSTITUTE"),(e,t,n,r)=>{const i=this.escapeRegExpSpecialCharacters(t),s=new RegExp(i,"g");if(void 0===r)return e.replace(s,n);if(r<1)return new lr(Wn.VALUE,Ce.LessThanOne);let o,a=0;while(null!==(o=s.exec(e)))if(r===++a)return e.substring(0,o.index)+n+e.substring(s.lastIndex);return e})}find(e,t){return this.runFunction(e.args,t,this.metadata("FIND"),(e,t,n)=>{if(n<1||n>t.length)return new lr(Wn.VALUE,Ce.IndexBounds);const r=t.substring(n-1),i=r.indexOf(e)+n;return i>0?i:new lr(Wn.VALUE,Ce.PatternNotFound)})}t(e,t){return this.runFunction(e.args,t,this.metadata("T"),e=>e instanceof lr||"string"===typeof e?e:"")}upper(e,t){return this.runFunction(e.args,t,this.metadata("UPPER"),e=>e.toUpperCase())}escapeRegExpSpecialCharacters(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}}Kl.implementedFunctions={CONCATENATE:{method:"concatenate",parameters:[{argumentType:$r.STRING}],repeatLastArgs:1,expandRanges:!0},EXACT:{method:"exact",parameters:[{argumentType:$r.STRING},{argumentType:$r.STRING}]},SPLIT:{method:"split",parameters:[{argumentType:$r.STRING},{argumentType:$r.NUMBER}]},LEN:{method:"len",parameters:[{argumentType:$r.STRING}]},LOWER:{method:"lower",parameters:[{argumentType:$r.STRING}]},MID:{method:"mid",parameters:[{argumentType:$r.STRING},{argumentType:$r.NUMBER},{argumentType:$r.NUMBER}]},TRIM:{method:"trim",parameters:[{argumentType:$r.STRING}]},T:{method:"t",parameters:[{argumentType:$r.SCALAR}]},PROPER:{method:"proper",parameters:[{argumentType:$r.STRING}]},CLEAN:{method:"clean",parameters:[{argumentType:$r.STRING}]},REPT:{method:"rept",parameters:[{argumentType:$r.STRING},{argumentType:$r.NUMBER}]},RIGHT:{method:"right",parameters:[{argumentType:$r.STRING},{argumentType:$r.NUMBER,defaultValue:1}]},LEFT:{method:"left",parameters:[{argumentType:$r.STRING},{argumentType:$r.NUMBER,defaultValue:1}]},REPLACE:{method:"replace",parameters:[{argumentType:$r.STRING},{argumentType:$r.NUMBER},{argumentType:$r.NUMBER},{argumentType:$r.STRING}]},SEARCH:{method:"search",parameters:[{argumentType:$r.STRING},{argumentType:$r.STRING},{argumentType:$r.NUMBER,defaultValue:1}]},SUBSTITUTE:{method:"substitute",parameters:[{argumentType:$r.STRING},{argumentType:$r.STRING},{argumentType:$r.STRING},{argumentType:$r.NUMBER,optionalArg:!0}]},FIND:{method:"find",parameters:[{argumentType:$r.STRING},{argumentType:$r.STRING},{argumentType:$r.NUMBER,defaultValue:1}]},UPPER:{method:"upper",parameters:[{argumentType:$r.STRING}]}};
  896. /**
  897. * @license
  898. * Copyright (c) 2024 Handsoncode. All rights reserved.
  899. */
  900. class Gl extends qr{acos(e,t){return this.runFunction(e.args,t,this.metadata("ACOS"),Math.acos)}asin(e,t){return this.runFunction(e.args,t,this.metadata("ASIN"),Math.asin)}cos(e,t){return this.runFunction(e.args,t,this.metadata("COS"),Math.cos)}sin(e,t){return this.runFunction(e.args,t,this.metadata("SIN"),Math.sin)}tan(e,t){return this.runFunction(e.args,t,this.metadata("TAN"),Math.tan)}atan(e,t){return this.runFunction(e.args,t,this.metadata("ATAN"),Math.atan)}atan2(e,t){return this.runFunction(e.args,t,this.metadata("ATAN2"),(e,t)=>0===e&&0===t?new lr(Wn.DIV_BY_ZERO):Math.atan2(t,e))}cot(e,t){return this.runFunction(e.args,t,this.metadata("COT"),e=>0===e?new lr(Wn.DIV_BY_ZERO):1/Math.tan(e))}acot(e,t){return this.runFunction(e.args,t,this.metadata("ACOT"),e=>0===e?tl/2:Math.atan(1/e))}sec(e,t){return this.runFunction(e.args,t,this.metadata("SEC"),e=>1/Math.cos(e))}csc(e,t){return this.runFunction(e.args,t,this.metadata("CSC"),e=>0===e?new lr(Wn.DIV_BY_ZERO):1/Math.sin(e))}sinh(e,t){return this.runFunction(e.args,t,this.metadata("SINH"),Math.sinh)}asinh(e,t){return this.runFunction(e.args,t,this.metadata("ASINH"),Math.asinh)}cosh(e,t){return this.runFunction(e.args,t,this.metadata("COSH"),Math.cosh)}acosh(e,t){return this.runFunction(e.args,t,this.metadata("ACOSH"),Math.acosh)}tanh(e,t){return this.runFunction(e.args,t,this.metadata("TANH"),Math.tanh)}atanh(e,t){return this.runFunction(e.args,t,this.metadata("ATANH"),Math.atanh)}coth(e,t){return this.runFunction(e.args,t,this.metadata("COTH"),e=>0===e?new lr(Wn.DIV_BY_ZERO):1/Math.tanh(e))}acoth(e,t){return this.runFunction(e.args,t,this.metadata("ACOTH"),e=>0===e?new lr(Wn.NUM,Ce.NonZero):Math.atanh(1/e))}sech(e,t){return this.runFunction(e.args,t,this.metadata("SECH"),e=>1/Math.cosh(e))}csch(e,t){return this.runFunction(e.args,t,this.metadata("CSCH"),e=>0===e?new lr(Wn.DIV_BY_ZERO):1/Math.sinh(e))}}Gl.implementedFunctions={ACOS:{method:"acos",parameters:[{argumentType:$r.NUMBER}]},ASIN:{method:"asin",parameters:[{argumentType:$r.NUMBER}]},COS:{method:"cos",parameters:[{argumentType:$r.NUMBER}]},SIN:{method:"sin",parameters:[{argumentType:$r.NUMBER}]},TAN:{method:"tan",parameters:[{argumentType:$r.NUMBER}]},ATAN:{method:"atan",parameters:[{argumentType:$r.NUMBER}]},ATAN2:{method:"atan2",parameters:[{argumentType:$r.NUMBER},{argumentType:$r.NUMBER}]},COT:{method:"cot",parameters:[{argumentType:$r.NUMBER}]},SEC:{method:"sec",parameters:[{argumentType:$r.NUMBER}]},CSC:{method:"csc",parameters:[{argumentType:$r.NUMBER}]},SINH:{method:"sinh",parameters:[{argumentType:$r.NUMBER}]},COSH:{method:"cosh",parameters:[{argumentType:$r.NUMBER}]},TANH:{method:"tanh",parameters:[{argumentType:$r.NUMBER}]},COTH:{method:"coth",parameters:[{argumentType:$r.NUMBER}]},SECH:{method:"sech",parameters:[{argumentType:$r.NUMBER}]},CSCH:{method:"csch",parameters:[{argumentType:$r.NUMBER}]},ACOT:{method:"acot",parameters:[{argumentType:$r.NUMBER}]},ASINH:{method:"asinh",parameters:[{argumentType:$r.NUMBER}]},ACOSH:{method:"acosh",parameters:[{argumentType:$r.NUMBER}]},ATANH:{method:"atanh",parameters:[{argumentType:$r.NUMBER}]},ACOTH:{method:"acoth",parameters:[{argumentType:$r.NUMBER}]}};
  901. /**
  902. * @license
  903. * Copyright (c) 2024 Handsoncode. All rights reserved.
  904. */
  905. class Bl extends $o{constructor(e){super(e),this.dependencyGraph=e}find(e,t,n){return this.basicFind(e,t,"col",n)}}
  906. /**
  907. * @license
  908. * Copyright (c) 2024 Handsoncode. All rights reserved.
  909. */class Jl extends qr{constructor(){super(...arguments),this.rowSearch=new Bl(this.dependencyGraph)}vlookup(e,t){return this.runFunction(e.args,t,this.metadata("VLOOKUP"),(e,t,n,r)=>{const i=t.range;return void 0===i?new lr(Wn.VALUE,Ce.WrongType):n<1?new lr(Wn.VALUE,Ce.LessThanOne):n>i.width()?new lr(Wn.REF,Ce.IndexLarge):this.doVlookup(Yr(e),t,n-1,r)})}hlookup(e,t){return this.runFunction(e.args,t,this.metadata("HLOOKUP"),(e,t,n,r)=>{const i=t.range;return void 0===i?new lr(Wn.VALUE,Ce.WrongType):n<1?new lr(Wn.VALUE,Ce.LessThanOne):n>i.height()?new lr(Wn.REF,Ce.IndexLarge):this.doHlookup(Yr(e),t,n-1,r)})}match(e,t){return this.runFunction(e.args,t,this.metadata("MATCH"),(e,t,n)=>this.doMatch(Yr(e),t,n))}searchInRange(e,t,n,r){if(!n&&"string"===typeof e&&this.arithmeticHelper.requiresRegex(e))return r.advancedFind(this.arithmeticHelper.eqMatcherFunction(e),t);{const i=n?{ordering:"asc"}:{ordering:"none",matchExactly:!0};return r.find(e,t,i)}}doVlookup(e,t,n,r){this.dependencyGraph.stats.start(Pt.VLOOKUP);const i=t.range;let s;s=void 0===i?Ft.onlyValues(t.data.map(e=>[e[0]])):Ft.onlyRange(Tr.spanFrom(i.start,1,i.height()),this.dependencyGraph);const o=this.searchInRange(e,s,r,this.columnSearch);if(this.dependencyGraph.stats.end(Pt.VLOOKUP),-1===o)return new lr(Wn.NA,Ce.ValueNotFound);let a;if(void 0===i)a=t.data[o][n];else{const e=mr(i.sheet,i.start.col+n,i.start.row+o);a=this.dependencyGraph.getCellValue(e)}return a instanceof Ft?new lr(Wn.VALUE,Ce.WrongType):a}doHlookup(e,t,n,r){const i=t.range;let s;s=void 0===i?Ft.onlyValues([t.data[0]]):Ft.onlyRange(Tr.spanFrom(i.start,i.width(),1),this.dependencyGraph);const o=this.searchInRange(e,s,r,this.rowSearch);if(-1===o)return new lr(Wn.NA,Ce.ValueNotFound);let a;if(void 0===i)a=t.data[n][o];else{const e=mr(i.sheet,i.start.col+o,i.start.row+n);a=this.dependencyGraph.getCellValue(e)}return a instanceof Ft?new lr(Wn.VALUE,Ce.WrongType):a}doMatch(e,t,n){if(![-1,0,1].includes(n))return new lr(Wn.VALUE,Ce.BadMode);if(t.width()>1&&t.height()>1)return new lr(Wn.NA);const r=1===t.width()?this.columnSearch:this.rowSearch,i=0===n?{ordering:"none",matchExactly:!0}:{ordering:-1===n?"desc":"asc"},s=r.find(e,t,i);return-1===s?new lr(Wn.NA,Ce.ValueNotFound):s+1}}Jl.implementedFunctions={VLOOKUP:{method:"vlookup",parameters:[{argumentType:$r.NOERROR},{argumentType:$r.RANGE},{argumentType:$r.NUMBER},{argumentType:$r.BOOLEAN,defaultValue:!0}]},HLOOKUP:{method:"hlookup",parameters:[{argumentType:$r.NOERROR},{argumentType:$r.RANGE},{argumentType:$r.NUMBER},{argumentType:$r.BOOLEAN,defaultValue:!0}]},MATCH:{method:"match",parameters:[{argumentType:$r.NOERROR},{argumentType:$r.RANGE},{argumentType:$r.NUMBER,defaultValue:1}]}};
  910. /**
  911. * @license
  912. * Copyright (c) 2024 Handsoncode. All rights reserved.
  913. */
  914. class zl extends qr{roman(e,t){return this.runFunction(e.args,t,this.metadata("ROMAN"),(e,t)=>(e=Math.trunc(e),!1===t?t=4:!0===t&&(t=0),t=wt(this.coerceScalarToNumberOrError(t)),t instanceof lr?t:(t=Math.trunc(t),t<0?new lr(Wn.VALUE,Ce.ValueSmall):t>4?new lr(Wn.VALUE,Ce.ValueLarge):ql(e,t))))}arabic(e,t){return this.runFunction(e.args,t,this.metadata("ARABIC"),e=>{e=e.trim().toUpperCase();let t=!1;if(e.startsWith("-")&&(e=e.slice(1),t=!0,""===e))return new lr(Wn.VALUE,Ce.InvalidRoman);const n={input:e,acc:0};return $l(n,{token:"MMM",val:3e3},{token:"MM",val:2e3},{token:"M",val:1e3}),$l(n,{token:"IM",val:999},{token:"VM",val:995},{token:"XM",val:990},{token:"LM",val:950},{token:"CM",val:900}),$l(n,{token:"D",val:500},{token:"ID",val:499},{token:"VD",val:495},{token:"XD",val:490},{token:"LD",val:450},{token:"CD",val:400}),$l(n,{token:"CCC",val:300},{token:"CC",val:200},{token:"C",val:100}),$l(n,{token:"IC",val:99},{token:"VC",val:95},{token:"XC",val:90}),$l(n,{token:"L",val:50},{token:"IL",val:49},{token:"VL",val:45},{token:"XL",val:40}),$l(n,{token:"XXX",val:30},{token:"XX",val:20},{token:"X",val:10}),$l(n,{token:"IX",val:9}),$l(n,{token:"V",val:5},{token:"IV",val:4}),$l(n,{token:"III",val:3},{token:"II",val:2},{token:"I",val:1}),""!==n.input?new lr(Wn.VALUE,Ce.InvalidRoman):t?-n.acc:n.acc})}}function $l(e,...t){for(const n of t)if(e.input.startsWith(n.token)){e.input=e.input.slice(n.token.length),e.acc+=n.val;break}}function ql(e,t){const n={val:e%1e3,acc:"M".repeat(Math.floor(e/1e3))};return 4===t&&(ec(n,"IM",999,1e3),ec(n,"ID",499,500)),t>=3&&(ec(n,"VM",995,1e3),ec(n,"VD",495,500)),t>=2&&(ec(n,"XM",990,1e3),ec(n,"XD",490,500)),t>=1&&(ec(n,"LM",950,1e3),ec(n,"LD",450,500)),ec(n,"CM",900,1e3),ec(n,"CD",400,500),ec(n,"D",500,900),n.acc+="C".repeat(Math.floor(n.val/100)),n.val%=100,t>=2&&(ec(n,"IC",99,100),ec(n,"IL",49,50)),t>=1&&(ec(n,"VC",95,100),ec(n,"VL",45,50)),ec(n,"XC",90,100),ec(n,"XL",40,50),ec(n,"L",50,90),n.acc+="X".repeat(Math.floor(n.val/10)),n.val%=10,ec(n,"IX",9,10),ec(n,"IV",4,5),ec(n,"V",5,9),n.acc+="I".repeat(n.val),n.acc}function ec(e,t,n,r){e.val>=n&&e.val<r&&(e.val-=n,e.acc+=t)}
  915. /**
  916. * @license
  917. * Copyright (c) 2024 Handsoncode. All rights reserved.
  918. */zl.implementedFunctions={ROMAN:{method:"roman",parameters:[{argumentType:$r.NUMBER,minValue:1,lessThan:4e3},{argumentType:$r.NOERROR,optionalArg:!0,defaultValue:0}]},ARABIC:{method:"arabic",parameters:[{argumentType:$r.STRING}]}};class tc extends qr{add(e,t){return this.runFunction(e.args,t,this.metadata("HF.ADD"),this.arithmeticHelper.addWithEpsilon)}concat(e,t){return this.runFunction(e.args,t,this.metadata("HF.CONCAT"),this.arithmeticHelper.concat)}divide(e,t){return this.runFunction(e.args,t,this.metadata("HF.DIVIDE"),this.arithmeticHelper.divide)}eq(e,t){return this.runFunction(e.args,t,this.metadata("HF.EQ"),this.arithmeticHelper.eq)}gt(e,t){return this.runFunction(e.args,t,this.metadata("HF.GT"),this.arithmeticHelper.gt)}gte(e,t){return this.runFunction(e.args,t,this.metadata("HF.GTE"),this.arithmeticHelper.geq)}lt(e,t){return this.runFunction(e.args,t,this.metadata("HF.LT"),this.arithmeticHelper.lt)}lte(e,t){return this.runFunction(e.args,t,this.metadata("HF.LTE"),this.arithmeticHelper.leq)}minus(e,t){return this.runFunction(e.args,t,this.metadata("HF.MINUS"),this.arithmeticHelper.subtract)}multiply(e,t){return this.runFunction(e.args,t,this.metadata("HF.MULTIPLY"),this.arithmeticHelper.multiply)}ne(e,t){return this.runFunction(e.args,t,this.metadata("HF.NE"),this.arithmeticHelper.neq)}pow(e,t){return this.runFunction(e.args,t,this.metadata("HF.POW"),this.arithmeticHelper.pow)}uminus(e,t){return this.runFunction(e.args,t,this.metadata("HF.UMINUS"),this.arithmeticHelper.unaryMinus)}upercent(e,t){return this.runFunction(e.args,t,this.metadata("HF.UNARY_PERCENT"),this.arithmeticHelper.unaryPercent)}uplus(e,t){return this.runFunction(e.args,t,this.metadata("HF.UPLUS"),this.arithmeticHelper.unaryPlus)}}tc.implementedFunctions={"HF.ADD":{method:"add",parameters:[{argumentType:$r.NUMBER,passSubtype:!0},{argumentType:$r.NUMBER,passSubtype:!0}]},"HF.CONCAT":{method:"concat",parameters:[{argumentType:$r.STRING,passSubtype:!0},{argumentType:$r.STRING,passSubtype:!0}]},"HF.DIVIDE":{method:"divide",parameters:[{argumentType:$r.NUMBER,passSubtype:!0},{argumentType:$r.NUMBER,passSubtype:!0}]},"HF.EQ":{method:"eq",parameters:[{argumentType:$r.NOERROR,passSubtype:!0},{argumentType:$r.NOERROR,passSubtype:!0}]},"HF.GT":{method:"gt",parameters:[{argumentType:$r.NOERROR,passSubtype:!0},{argumentType:$r.NOERROR,passSubtype:!0}]},"HF.GTE":{method:"gte",parameters:[{argumentType:$r.NOERROR,passSubtype:!0},{argumentType:$r.NOERROR,passSubtype:!0}]},"HF.LT":{method:"lt",parameters:[{argumentType:$r.NOERROR,passSubtype:!0},{argumentType:$r.NOERROR,passSubtype:!0}]},"HF.LTE":{method:"lte",parameters:[{argumentType:$r.NOERROR,passSubtype:!0},{argumentType:$r.NOERROR,passSubtype:!0}]},"HF.MINUS":{method:"minus",parameters:[{argumentType:$r.NUMBER,passSubtype:!0},{argumentType:$r.NUMBER,passSubtype:!0}]},"HF.MULTIPLY":{method:"multiply",parameters:[{argumentType:$r.NUMBER,passSubtype:!0},{argumentType:$r.NUMBER,passSubtype:!0}]},"HF.NE":{method:"ne",parameters:[{argumentType:$r.NOERROR,passSubtype:!0},{argumentType:$r.NOERROR,passSubtype:!0}]},"HF.POW":{method:"pow",parameters:[{argumentType:$r.NUMBER,passSubtype:!0},{argumentType:$r.NUMBER,passSubtype:!0}]},"HF.UMINUS":{method:"uminus",parameters:[{argumentType:$r.NUMBER,passSubtype:!0}]},"HF.UNARY_PERCENT":{method:"upercent",parameters:[{argumentType:$r.NUMBER,passSubtype:!0}]},"HF.UPLUS":{method:"uplus",parameters:[{argumentType:$r.NUMBER,passSubtype:!0}]}};
  919. /**
  920. * @license
  921. bessel.js (C) 2013-present SheetJS -- http://sheetjs.com
  922. Apache License
  923. Version 2.0, January 2004
  924. http://www.apache.org/licenses/
  925. TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
  926. 1. Definitions.
  927. "License" shall mean the terms and conditions for use, reproduction,
  928. and distribution as defined by Sections 1 through 9 of this document.
  929. "Licensor" shall mean the copyright owner or entity authorized by
  930. the copyright owner that is granting the License.
  931. "Legal Entity" shall mean the union of the acting entity and all
  932. other entities that control, are controlled by, or are under common
  933. control with that entity. For the purposes of this definition,
  934. "control" means (i) the power, direct or indirect, to cause the
  935. direction or management of such entity, whether by contract or
  936. otherwise, or (ii) ownership of fifty percent (50%) or more of the
  937. outstanding shares, or (iii) beneficial ownership of such entity.
  938. "You" (or "Your") shall mean an individual or Legal Entity
  939. exercising permissions granted by this License.
  940. "Source" form shall mean the preferred form for making modifications,
  941. including but not limited to software source code, documentation
  942. source, and configuration files.
  943. "Object" form shall mean any form resulting from mechanical
  944. transformation or translation of a Source form, including but
  945. not limited to compiled object code, generated documentation,
  946. and conversions to other media types.
  947. "Work" shall mean the work of authorship, whether in Source or
  948. Object form, made available under the License, as indicated by a
  949. copyright notice that is included in or attached to the work
  950. (an example is provided in the Appendix below).
  951. "Derivative Works" shall mean any work, whether in Source or Object
  952. form, that is based on (or derived from) the Work and for which the
  953. editorial revisions, annotations, elaborations, or other modifications
  954. represent, as a whole, an original work of authorship. For the purposes
  955. of this License, Derivative Works shall not include works that remain
  956. separable from, or merely link (or bind by name) to the interfaces of,
  957. the Work and Derivative Works thereof.
  958. "Contribution" shall mean any work of authorship, including
  959. the original version of the Work and any modifications or additions
  960. to that Work or Derivative Works thereof, that is intentionally
  961. submitted to Licensor for inclusion in the Work by the copyright owner
  962. or by an individual or Legal Entity authorized to submit on behalf of
  963. the copyright owner. For the purposes of this definition, "submitted"
  964. means any form of electronic, verbal, or written communication sent
  965. to the Licensor or its representatives, including but not limited to
  966. communication on electronic mailing lists, source code control systems,
  967. and issue tracking systems that are managed by, or on behalf of, the
  968. Licensor for the purpose of discussing and improving the Work, but
  969. excluding communication that is conspicuously marked or otherwise
  970. designated in writing by the copyright owner as "Not a Contribution."
  971. "Contributor" shall mean Licensor and any individual or Legal Entity
  972. on behalf of whom a Contribution has been received by Licensor and
  973. subsequently incorporated within the Work.
  974. 2. Grant of Copyright License. Subject to the terms and conditions of
  975. this License, each Contributor hereby grants to You a perpetual,
  976. worldwide, non-exclusive, no-charge, royalty-free, irrevocable
  977. copyright license to reproduce, prepare Derivative Works of,
  978. publicly display, publicly perform, sublicense, and distribute the
  979. Work and such Derivative Works in Source or Object form.
  980. 3. Grant of Patent License. Subject to the terms and conditions of
  981. this License, each Contributor hereby grants to You a perpetual,
  982. worldwide, non-exclusive, no-charge, royalty-free, irrevocable
  983. (except as stated in this section) patent license to make, have made,
  984. use, offer to sell, sell, import, and otherwise transfer the Work,
  985. where such license applies only to those patent claims licensable
  986. by such Contributor that are necessarily infringed by their
  987. Contribution(s) alone or by combination of their Contribution(s)
  988. with the Work to which such Contribution(s) was submitted. If You
  989. institute patent litigation against any entity (including a
  990. cross-claim or counterclaim in a lawsuit) alleging that the Work
  991. or a Contribution incorporated within the Work constitutes direct
  992. or contributory patent infringement, then any patent licenses
  993. granted to You under this License for that Work shall terminate
  994. as of the date such litigation is filed.
  995. 4. Redistribution. You may reproduce and distribute copies of the
  996. Work or Derivative Works thereof in any medium, with or without
  997. modifications, and in Source or Object form, provided that You
  998. meet the following conditions:
  999. (a) You must give any other recipients of the Work or
  1000. Derivative Works a copy of this License; and
  1001. (b) You must cause any modified files to carry prominent notices
  1002. stating that You changed the files; and
  1003. (c) You must retain, in the Source form of any Derivative Works
  1004. that You distribute, all copyright, patent, trademark, and
  1005. attribution notices from the Source form of the Work,
  1006. excluding those notices that do not pertain to any part of
  1007. the Derivative Works; and
  1008. (d) If the Work includes a "NOTICE" text file as part of its
  1009. distribution, then any Derivative Works that You distribute must
  1010. include a readable copy of the attribution notices contained
  1011. within such NOTICE file, excluding those notices that do not
  1012. pertain to any part of the Derivative Works, in at least one
  1013. of the following places: within a NOTICE text file distributed
  1014. as part of the Derivative Works; within the Source form or
  1015. documentation, if provided along with the Derivative Works; or,
  1016. within a display generated by the Derivative Works, if and
  1017. wherever such third-party notices normally appear. The contents
  1018. of the NOTICE file are for informational purposes only and
  1019. do not modify the License. You may add Your own attribution
  1020. notices within Derivative Works that You distribute, alongside
  1021. or as an addendum to the NOTICE text from the Work, provided
  1022. that such additional attribution notices cannot be construed
  1023. as modifying the License.
  1024. You may add Your own copyright statement to Your modifications and
  1025. may provide additional or different license terms and conditions
  1026. for use, reproduction, or distribution of Your modifications, or
  1027. for any such Derivative Works as a whole, provided Your use,
  1028. reproduction, and distribution of the Work otherwise complies with
  1029. the conditions stated in this License.
  1030. 5. Submission of Contributions. Unless You explicitly state otherwise,
  1031. any Contribution intentionally submitted for inclusion in the Work
  1032. by You to the Licensor shall be under the terms and conditions of
  1033. this License, without any additional terms or conditions.
  1034. Notwithstanding the above, nothing herein shall supersede or modify
  1035. the terms of any separate license agreement you may have executed
  1036. with Licensor regarding such Contributions.
  1037. 6. Trademarks. This License does not grant permission to use the trade
  1038. names, trademarks, service marks, or product names of the Licensor,
  1039. except as required for reasonable and customary use in describing the
  1040. origin of the Work and reproducing the content of the NOTICE file.
  1041. 7. Disclaimer of Warranty. Unless required by applicable law or
  1042. agreed to in writing, Licensor provides the Work (and each
  1043. Contributor provides its Contributions) on an "AS IS" BASIS,
  1044. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
  1045. implied, including, without limitation, any warranties or conditions
  1046. of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
  1047. PARTICULAR PURPOSE. You are solely responsible for determining the
  1048. appropriateness of using or redistributing the Work and assume any
  1049. risks associated with Your exercise of permissions under this License.
  1050. 8. Limitation of Liability. In no event and under no legal theory,
  1051. whether in tort (including negligence), contract, or otherwise,
  1052. unless required by applicable law (such as deliberate and grossly
  1053. negligent acts) or agreed to in writing, shall any Contributor be
  1054. liable to You for damages, including any direct, indirect, special,
  1055. incidental, or consequential damages of any character arising as a
  1056. result of this License or out of the use or inability to use the
  1057. Work (including but not limited to damages for loss of goodwill,
  1058. work stoppage, computer failure or malfunction, or any and all
  1059. other commercial damages or losses), even if such Contributor
  1060. has been advised of the possibility of such damages.
  1061. 9. Accepting Warranty or Additional Liability. While redistributing
  1062. the Work or Derivative Works thereof, You may choose to offer,
  1063. and charge a fee for, acceptance of support, warranty, indemnity,
  1064. or other liability obligations and/or rights consistent with this
  1065. License. However, in accepting such obligations, You may act only
  1066. on Your own behalf and on Your sole responsibility, not on behalf
  1067. of any other Contributor, and only if You agree to indemnify,
  1068. defend, and hold each Contributor harmless for any liability
  1069. incurred by, or claims asserted against, such Contributor by reason
  1070. of your accepting any such warranty or additional liability.
  1071. END OF TERMS AND CONDITIONS
  1072. APPENDIX: How to apply the Apache License to your work.
  1073. To apply the Apache License to your work, attach the following
  1074. boilerplate notice, with the fields enclosed by brackets "{}"
  1075. replaced with your own identifying information. (Don't include
  1076. the brackets!) The text should be enclosed in the appropriate
  1077. comment syntax for the file format. We also recommend that a
  1078. file or class name and description of purpose be included on the
  1079. same "printed page" as the copyright notice for easier
  1080. identification within third-party archives.
  1081. Copyright (C) 2013-present SheetJS LLC
  1082. Licensed under the Apache License, Version 2.0 (the "License");
  1083. you may not use this file except in compliance with the License.
  1084. You may obtain a copy of the License at
  1085. http://www.apache.org/licenses/LICENSE-2.0
  1086. Unless required by applicable law or agreed to in writing, software
  1087. distributed under the License is distributed on an "AS IS" BASIS,
  1088. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  1089. See the License for the specific language governing permissions and
  1090. limitations under the License.
  1091. */
  1092. var nc=Math;function rc(e,t){for(var n=0,r=0;n<e.length;++n)r=t*r+e[n];return r}function ic(e,t,n,r,i){if(0===t)return n;if(1===t)return r;for(var s=2/e,o=r,a=1;a<t;++a)o=r*a*s+i*n,n=r,r=o;return o}function sc(e,t,n,r,i){return function(n,s){if(r){if(0===n)return 1==r?-1/0:1/0;if(n<0)return NaN}if(0===s)return e(n);if(1===s)return t(n);if(s<0)return NaN;s|=0;var o=e(n),a=t(n);return ic(n,s,o,a,i)}}var oc=function(){var e=.636619772,t=[57568490574,-13362590354,651619640.7,-11214424.18,77392.33017,-184.9052456].reverse(),n=[57568490411,1029532985,9494680.718,59272.64853,267.8532712,1].reverse(),r=[1,-.001098628627,2734510407e-14,-2073370639e-15,2.093887211e-7].reverse(),i=[-.01562499995,.0001430488765,-6911147651e-15,7.621095161e-7,-9.34935152e-8].reverse();function s(s){var o=0,a=0,l=0,c=s*s;if(s<8)a=rc(t,c),l=rc(n,c),o=a/l;else{var u=s-.785398164;c=64/c,a=rc(r,c),l=rc(i,c),o=nc.sqrt(e/s)*(nc.cos(u)*a-nc.sin(u)*l*8/s)}return o}var o=[72362614232,-7895059235,242396853.1,-2972611.439,15704.4826,-30.16036606].reverse(),a=[144725228442,2300535178,18583304.74,99447.43394,376.9991397,1].reverse(),l=[1,.00183105,-3516396496e-14,2457520174e-15,-2.40337019e-7].reverse(),c=[.04687499995,-.0002002690873,8449199096e-15,-8.8228987e-7,1.05787412e-7].reverse();function u(t){var n=0,r=0,i=0,s=t*t,u=nc.abs(t)-2.356194491;return Math.abs(t)<8?(r=t*rc(o,s),i=rc(a,s),n=r/i):(s=64/s,r=rc(l,s),i=rc(c,s),n=nc.sqrt(e/nc.abs(t))*(nc.cos(u)*r-nc.sin(u)*i*8/nc.abs(t)),t<0&&(n=-n)),n}return function e(t,n){if(n=Math.round(n),!isFinite(t))return isNaN(t)?t:0;if(n<0)return(n%2?-1:1)*e(t,-n);if(t<0)return(n%2?-1:1)*e(-t,n);if(0===n)return s(t);if(1===n)return u(t);if(0===t)return 0;var r=0;if(t>n)r=ic(t,n,s(t),u(t),-1);else{for(var i=2*nc.floor((n+nc.floor(nc.sqrt(40*n)))/2),o=!1,a=0,l=0,c=1,h=0,d=2/t,m=i;m>0;m--)h=m*d*c-a,a=c,c=h,nc.abs(c)>1e10&&(c*=1e-10,a*=1e-10,r*=1e-10,l*=1e-10),o&&(l+=c),o=!o,m==n&&(r=a);l=2*l-c,r/=l}return r}}(),ac=function(){var e=.636619772,t=[-2957821389,7062834065,-512359803.6,10879881.29,-86327.92757,228.4622733].reverse(),n=[40076544269,745249964.8,7189466.438,47447.2647,226.1030244,1].reverse(),r=[1,-.001098628627,2734510407e-14,-2073370639e-15,2.093887211e-7].reverse(),i=[-.01562499995,.0001430488765,-6911147651e-15,7.621095161e-7,-9.34945152e-8].reverse();function s(s){var o=0,a=0,l=0,c=s*s,u=s-.785398164;return s<8?(a=rc(t,c),l=rc(n,c),o=a/l+e*oc(s,0)*nc.log(s)):(c=64/c,a=rc(r,c),l=rc(i,c),o=nc.sqrt(e/s)*(nc.sin(u)*a+nc.cos(u)*l*8/s)),o}var o=[-4900604943e3,127527439e4,-51534381390,734926455.1,-4237922.726,8511.937935].reverse(),a=[249958057e5,424441966400,3733650367,22459040.02,102042.605,354.9632885,1].reverse(),l=[1,.00183105,-3516396496e-14,2457520174e-15,-2.40337019e-7].reverse(),c=[.04687499995,-.0002002690873,8449199096e-15,-8.8228987e-7,1.05787412e-7].reverse();function u(t){var n=0,r=0,i=0,s=t*t,u=t-2.356194491;return t<8?(r=t*rc(o,s),i=rc(a,s),n=r/i+e*(oc(t,1)*nc.log(t)-1/t)):(s=64/s,r=rc(l,s),i=rc(c,s),n=nc.sqrt(e/t)*(nc.sin(u)*r+nc.cos(u)*i*8/t)),n}return sc(s,u,"BESSELY",1,-1)}(),lc=function(){var e=[1,3.5156229,3.0899424,1.2067492,.2659732,.0360768,.0045813].reverse(),t=[.39894228,.01328592,.00225319,-.00157565,.00916281,-.02057706,.02635537,-.01647633,.00392377].reverse();function n(n){return n<=3.75?rc(e,n*n/14.0625):nc.exp(nc.abs(n))/nc.sqrt(nc.abs(n))*rc(t,3.75/nc.abs(n))}var r=[.5,.87890594,.51498869,.15084934,.02658733,.00301532,32411e-8].reverse(),i=[.39894228,-.03988024,-.00362018,.00163801,-.01031555,.02282967,-.02895312,.01787654,-.00420059].reverse();function s(e){return e<3.75?e*rc(r,e*e/14.0625):(e<0?-1:1)*nc.exp(nc.abs(e))/nc.sqrt(nc.abs(e))*rc(i,3.75/nc.abs(e))}return function e(t,r){if(r=Math.round(r),0===r)return n(t);if(1===r)return s(t);if(r<0)return NaN;if(0===nc.abs(t))return 0;if(t==1/0)return 1/0;var i,o=0,a=2/nc.abs(t),l=0,c=1,u=0,h=2*nc.round((r+nc.round(nc.sqrt(40*r)))/2);for(i=h;i>0;i--)u=i*a*c+l,l=c,c=u,nc.abs(c)>1e10&&(c*=1e-10,l*=1e-10,o*=1e-10),i==r&&(o=l);return o*=e(t,0)/c,t<0&&r%2?-o:o}}(),cc=function(){var e=[-.57721566,.4227842,.23069756,.0348859,.00262698,1075e-7,74e-7].reverse(),t=[1.25331414,-.07832358,.02189568,-.01062446,.00587872,-.0025154,53208e-8].reverse();function n(n){return n<=2?-nc.log(n/2)*lc(n,0)+rc(e,n*n/4):nc.exp(-n)/nc.sqrt(n)*rc(t,2/n)}var r=[1,.15443144,-.67278579,-.18156897,-.01919402,-.00110404,-4686e-8].reverse(),i=[1.25331414,.23498619,-.0365562,.01504268,-.00780353,.00325614,-68245e-8].reverse();function s(e){return e<=2?nc.log(e/2)*lc(e,1)+1/e*rc(r,e*e/4):nc.exp(-e)/nc.sqrt(e)*rc(i,2/e)}return sc(n,s,"BESSELK",2,1)}();
  1093. /**
  1094. * @license
  1095. Copyright (c) 2013 jStat
  1096. Permission is hereby granted, free of charge, to any person obtaining a copy
  1097. of this software and associated documentation files (the "Software"), to deal
  1098. in the Software without restriction, including without limitation the rights
  1099. to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
  1100. copies of the Software, and to permit persons to whom the Software is
  1101. furnished to do so, subject to the following conditions:
  1102. The above copyright notice and this permission notice shall be included in
  1103. all copies or substantial portions of the Software.
  1104. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  1105. IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  1106. FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  1107. AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  1108. LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  1109. OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
  1110. THE SOFTWARE.
  1111. */
  1112. function uc(e){const t=[-1.3026537197817094,.6419697923564902,.019476473204185836,-.00956151478680863,-.000946595344482036,.000366839497852761,42523324806907e-18,-20278578112534e-18,-1624290004647e-18,130365583558e-17,1.5626441722e-8,-8.5238095915e-8,6.529054439e-9,5.059343495e-9,-9.91364156e-10,-2.27365122e-10,96467911e-18,2394038e-18,-6886027e-18,894487e-18,313092e-18,-112708e-18,381e-18,7106e-18,-1523e-18,-94e-18,121e-18,-28e-18];let n,r,i,s,o=t.length-1,a=!1,l=0,c=0;if(0===e)return 0;for(e<0&&(e=-e,a=!0),n=2/(2+e),r=4*n-2;o>0;o--)i=l,l=r*l-c+t[o],c=i;return s=n*Math.exp(-e*e+.5*(t[0]+r*l)-c),a?s-1:1-s}function hc(e){return 1-uc(e)}function dc(e){let t,n,r,i,s=0;if(e>=2)return-100;if(e<=0)return 100;for(i=e<1?e:2-e,r=Math.sqrt(-2*Math.log(i/2)),t=-.70711*((2.30753+.27061*r)/(1+r*(.99229+.04481*r))-r);s<2;s++)n=hc(t)-i,t+=n/(1.1283791670955126*Math.exp(-t*t)-t*n);return e<1?t:-t}const mc={pdf:(e,t)=>e<0?0:t*Math.exp(-t*e),cdf:(e,t)=>e<0?0:1-Math.exp(-t*e)};function gc(e){const t=[-1.716185138865495,24.76565080557592,-379.80425647094563,629.3311553128184,866.9662027904133,-31451.272968848367,-36144.413418691176,66456.14382024054],n=[-30.8402300119739,315.35062697960416,-1015.1563674902192,-3107.771671572311,22538.11842098015,4755.846277527881,-134659.9598649693,-115132.2596755535];let r,i,s,o,a=!1,l=0,c=0,u=0,h=e;if(e>171.6243769536076)return 1/0;if(h<=0){if(o=h%1,!o)return 1/0;a=(1&h?-1:1)*Math.PI/Math.sin(Math.PI*o),h=1-h}for(s=h,i=h<1?h++:(h-=l=(0|h)-1)-1,r=0;r<8;++r)u=(u+t[r])*i,c=c*i+n[r];if(o=u/c+1,s<h)o/=s;else if(s>h)for(r=0;r<l;++r)o*=h,h++;return a&&(o=a/o),o}const pc={pdf:function(e,t,n){return e<0?0:0===e&&1===t?1/n:Math.exp((t-1)*Math.log(e)-e/n-fc(t)-t*Math.log(n))},cdf:function(e,t,n){return e<0?0:Rc(t,e/n)},inv:function(e,t,n){return yc(e,t)*n}};function fc(e){let t=0;const n=[76.18009172947146,-86.50532032941678,24.01409824083091,-1.231739572450155,.001208650973866179,-5395239384953e-18];let r,i,s,o=1.000000000190015;for(s=(i=r=e)+5.5,s-=(r+.5)*Math.log(s);t<6;t++)o+=n[t]/++i;return Math.log(2.5066282746310007*o/r)-s}function Rc(e,t){const n=fc(e);let r=e,i=1/e,s=i,o=t+1-e,a=1/1e-30,l=1/o,c=l,u=1;const h=-~(8.5*Math.log(e>=1?e:1/e)+.4*e+17);let d;if(t<0||e<=0)return NaN;if(t<e+1){for(;u<=h;u++)i+=s*=t/++r;return i*Math.exp(-t+e*Math.log(t)-n)}for(;u<=h;u++)d=-u*(u-e),o+=2,l=d*l+o,a=o+d/a,l=1/l,c*=l*a;return 1-c*Math.exp(-t+e*Math.log(t)-n)}function yc(e,t){let n=0;const r=t-1,i=1e-8,s=fc(t);let o,a,l,c,u,h,d;if(e>=1)return Math.max(100,t+100*Math.sqrt(t));if(e<=0)return 0;for(t>1?(h=Math.log(r),d=Math.exp(r*(h-1)-s),u=e<.5?e:1-e,l=Math.sqrt(-2*Math.log(u)),o=(2.30753+.27061*l)/(1+l*(.99229+.04481*l))-l,e<.5&&(o=-o),o=Math.max(.001,t*Math.pow(1-1/(9*t)-o/(3*Math.sqrt(t)),3))):(l=1-t*(.253+.12*t),o=e<l?Math.pow(e/l,1/t):1-Math.log(1-(e-l)/(1-l)));n<12;n++){if(o<=0)return 0;if(a=Rc(t,o)-e,l=t>1?d*Math.exp(-(o-r)+r*(Math.log(o)-h)):Math.exp(-o+r*Math.log(o)-s),c=a/l,o-=l=c/(1-.5*Math.min(1,c*((t-1)/o-1))),o<=0&&(o=.5*(o+l)),Math.abs(l)<i*o)break}return o}const Mc={pdf:function(e,t,n){return Math.exp(-.5*Math.log(2*Math.PI)-Math.log(n)-Math.pow(e-t,2)/(2*n*n))},cdf:function(e,t,n){return.5*(1+uc((e-t)/Math.sqrt(2*n*n)))},inv:function(e,t,n){return-1.4142135623730951*n*dc(2*e)+t}},Sc={pdf:function(e,t,n){return e>1||e<0?0:1==t&&1==n?1:t<512&&n<512?Math.pow(e,t-1)*Math.pow(1-e,n-1)/bc(t,n):Math.exp((t-1)*Math.log(e)+(n-1)*Math.log(1-e)-wc(t,n))},cdf:function(e,t,n){return e>1||e<0?+(e>1):Oc(e,t,n)},inv:function(e,t,n){return Tc(e,t,n)}};function bc(e,t){if(!(e<=0||t<=0))return e+t>170?Math.exp(wc(e,t)):gc(e)*gc(t)/gc(e+t)}function wc(e,t){return fc(e)+fc(t)-fc(e+t)}function Tc(e,t,n){var r,i,s,o,a,l,c,u,h,d,m,g=1e-8,p=t-1,f=n-1,R=0;if(e<=0)return 0;if(e>=1)return 1;for(t>=1&&n>=1?(s=e<.5?e:1-e,o=Math.sqrt(-2*Math.log(s)),c=(2.30753+.27061*o)/(1+o*(.99229+.04481*o))-o,e<.5&&(c=-c),u=(c*c-3)/6,h=2/(1/(2*t-1)+1/(2*n-1)),d=c*Math.sqrt(u+h)/h-(1/(2*n-1)-1/(2*t-1))*(u+5/6-2/(3*h)),c=t/(t+n*Math.exp(2*d))):(r=Math.log(t/(t+n)),i=Math.log(n/(t+n)),o=Math.exp(t*r)/t,a=Math.exp(n*i)/n,d=o+a,c=e<o/d?Math.pow(t*d*e,1/t):1-Math.pow(n*d*(1-e),1/n)),m=-fc(t)-fc(n)+fc(t+n);R<10;R++){if(0===c||1===c)return c;if(l=Oc(c,t,n)-e,o=Math.exp(p*Math.log(c)+f*Math.log(1-c)+m),a=l/o,c-=o=a/(1-.5*Math.min(1,a*(p/c-f/(1-c)))),c<=0&&(c=.5*(c+o)),c>=1&&(c=.5*(c+o+1)),Math.abs(o)<g*c&&R>0)break}return c}function Oc(e,t,n){var r=0===e||1===e?0:Math.exp(fc(t+n)-fc(t)-fc(n)+t*Math.log(e)+n*Math.log(1-e));return!(e<0||e>1)&&(e<(t+1)/(t+n+2)?r*vc(e,t,n)/t:1-r*vc(1-e,n,t)/n)}function vc(e,t,n){var r,i,s,o,a=1e-30,l=1,c=t+n,u=t+1,h=t-1,d=1,m=1-c*e/u;for(Math.abs(m)<a&&(m=a),m=1/m,o=m;l<=100;l++)if(r=2*l,i=l*(n-l)*e/((h+r)*(t+r)),m=1+i*m,Math.abs(m)<a&&(m=a),d=1+i/d,Math.abs(d)<a&&(d=a),m=1/m,o*=m*d,i=-(t+l)*(c+l)*e/((t+r)*(u+r)),m=1+i*m,Math.abs(m)<a&&(m=a),d=1+i/d,Math.abs(d)<a&&(d=a),m=1/m,s=m*d,o*=s,Math.abs(s-1)<3e-7)break;return o}const Ec={pdf:function(e,t,n){return 0===n||1===n?t*n===e?1:0:Lc(t,e)*Math.pow(n,e)*Math.pow(1-n,t-e)},cdf:function(e,t,n){var r,i=1e-10;if(e<0)return 0;if(e>=t)return 1;if(n<0||n>1||t<=0)return NaN;e=Math.floor(e);var s=n,o=e+1,a=t-e,l=o+a,c=Math.exp(fc(l)-fc(a)-fc(o)+o*Math.log(s)+a*Math.log(1-s));return r=s<(o+1)/(l+2)?c*Cc(s,o,a,i):1-c*Cc(1-s,a,o,i),Math.round(1/i*(1-r))/(1/i)}};function Cc(e,t,n,r){var i,s=0,o=1,a=1,l=1,c=0,u=0;while(Math.abs((a-u)/a)>r)u=a,i=-(t+c)*(t+n+c)*e/(t+2*c)/(t+2*c+1),s=a+i*s,o=l+i*o,c+=1,i=c*(n-c)*e/(t+2*c-1)/(t+2*c),a=s+i*a,l=o+i*l,s/=l,o/=l,a/=l,l=1;return a/t}function Lc(e,t){return e>170||t>170?Math.exp(Nc(e,t)):Ic(e)/Ic(t)/Ic(e-t)}function Nc(e,t){return _c(e)-_c(t)-_c(e-t)}function _c(e){return e<0?NaN:fc(e+1)}function Ic(e){return e<0?NaN:gc(e+1)}const Pc={pdf:function(e,t){return e<0?0:0===e&&2===t?.5:Math.exp((t/2-1)*Math.log(e)-e/2-t/2*Math.log(2)-fc(t/2))},cdf:function(e,t){return e<0?0:Rc(t/2,e/2)},inv:function(e,t){return 2*yc(e,.5*t)}},xc={pdf:function(e,t,n){var r,i,s;return e<0?0:t<=2?0===e&&t<2?1/0:0===e&&2===t?1:1/bc(t/2,n/2)*Math.pow(t/n,t/2)*Math.pow(e,t/2-1)*Math.pow(1+t/n*e,-(t+n)/2):(r=t*e/(n+e*t),i=n/(n+e*t),s=t*i/2,s*Ec.pdf((t-2)/2,(t+n-2)/2,r))},cdf:function(e,t,n){return e<0?0:Oc(t*e/(t*e+n),t/2,n/2)},inv:function(e,t,n){return n/(t*(1/Tc(e,t/2,n/2)-1))}},Dc={pdf:function(e,t,n){return e<0||t<0||n<0?0:n/t*Math.pow(e/t,n-1)*Math.exp(-Math.pow(e/t,n))},cdf:function(e,t,n){return e<0?0:1-Math.exp(-Math.pow(e/t,n))}},Ac={pdf:function(e,t){return t<0||e%1!==0||e<0?0:Math.pow(t,e)*Math.exp(-t)/Ic(e)},cdf:function(e,t){var n=0;if(e<0)return 0;for(var r=0;n<=e;n++)r+=Ac.pdf(n,t);return r}},Fc={pdf:function(e,t,n,r){if(e<0||e<n-(t-r))return 0;if(e>r||e>n)return 0;if(2*n>t)return 2*r>t?Fc.pdf(t-n-r+e,t,t-n,t-r):Fc.pdf(r-e,t,t-n,r);if(2*r>t)return Fc.pdf(n-e,t,n,t-r);if(n<r)return Fc.pdf(e,t,r,n);for(var i=1,s=0,o=0;o<e;o++){while(i>1&&s<r)i*=1-n/(t-s),s++;i*=(r-o)*(n-o)/((o+1)*(t-n-r+o+1))}for(;s<r;s++)i*=1-n/(t-s);return Math.min(1,Math.max(0,i))},cdf:function e(t,n,r,i){if(t<0||t<r-(n-i))return 0;if(t>=i||t>=r)return 1;if(2*r>n)return 2*i>n?e(n-r-i+t,n,n-r,n-i):1-Fc.cdf(i-t-1,n,n-r,i);if(2*i>n)return 1-Fc.cdf(r-t-1,n,r,n-i);if(r<i)return Fc.cdf(t,n,i,r);for(var s=1,o=1,a=0,l=0;l<t;l++){while(s>1&&a<i){var c=1-r/(n-a);o*=c,s*=c,a++}o*=(i-l)*(r-l)/((l+1)*(n-r-i+l+1)),s+=o}for(;a<i;a++)s*=1-r/(n-a);return Math.min(1,Math.max(0,s))}},Yc={pdf:function(e,t){return t=t>1e100?1e100:t,1/(Math.sqrt(t)*bc(.5,t/2))*Math.pow(1+e*e/t,-(t+1)/2)},cdf:function(e,t){var n=t/2;return Oc((e+Math.sqrt(e*e+t))/(2*Math.sqrt(e*e+t)),n,n)},inv:function(e,t){var n=Tc(2*Math.min(e,1-e),.5*t,.5);return n=Math.sqrt(t*(1-n)/n),e>.5?n:-n}},Hc={pdf:function(e,t,n){return e<=0?0:Math.exp(-Math.log(e)-.5*Math.log(2*Math.PI)-Math.log(n)-Math.pow(Math.log(e)-t,2)/(2*n*n))},cdf:function(e,t,n){return e<0?0:.5+.5*uc((Math.log(e)-t)/Math.sqrt(2*n*n))},inv:function(e,t,n){return Math.exp(-1.4142135623730951*n*dc(2*e)+t)}},kc={pdf:function(e,t,n){return e===e>>>0&&(e<0?0:Lc(e+t-1,t-1)*Math.pow(1-n,e)*Math.pow(n,t))},cdf:function(e,t,n){var r=0,i=0;if(e<0)return 0;for(;i<=e;i++)r+=kc.pdf(i,t,n);return r}};function Vc(e){var t=0,n=e.length;while(--n>=0)t+=e[n];return t}function Uc(e){return Vc(e)/e.length}function Wc(e){var t,n=Uc(e),r=0,i=e.length;while(--i>=0)t=e[i]-n,r+=t*t;return r}function Xc(e,t){return Wc(e)/(e.length-(t?1:0))}function jc(e,t){return Math.sqrt(Xc(e,t))}function Zc(){var e,t=[].slice.call(arguments),n=new Array(2);return e=4===t.length?Math.abs(Mc.inv(t[1]/2,0,1)*t[2]/Math.sqrt(t[3])):Math.abs(Mc.inv(t[1]/2,0,1)*jc(t[2])/Math.sqrt(t[2].length)),n[0]=t[0]-e,n[1]=t[0]+e,n}function Qc(){var e,t=[].slice.call(arguments),n=new Array(2);return e=4===t.length?Math.abs(Yc.inv(t[1]/2,t[3]-1)*t[2]/Math.sqrt(t[3])):Math.abs(Yc.inv(t[1]/2,t[2].length-1)*jc(t[2],!0)/Math.sqrt(t[2].length)),n[0]=t[0]-e,n[1]=t[0]+e,n}function Kc(e){var t=1,n=e.length;while(--n>=0)t*=e[n];return t}function Gc(e){return Math.pow(Kc(e),1/e.length)}function Bc(e,t){var n,r=Uc(e),i=Uc(t),s=e.length,o=new Array(s);for(n=0;n<s;n++)o[n]=(e[n]-r)*(t[n]-i);return Vc(o)/(s-1)}function Jc(e,t){return Bc(e,t)/jc(e,1)/jc(t,1)}
  1113. /**
  1114. * @license
  1115. * Copyright (c) 2024 Handsoncode. All rights reserved.
  1116. */class zc extends qr{erf(e,t){return this.runFunction(e.args,t,this.metadata("ERF"),(e,t)=>void 0===t?uc(e):uc(t)-uc(e))}erfc(e,t){return this.runFunction(e.args,t,this.metadata("ERFC"),hc)}expondist(e,t){return this.runFunction(e.args,t,this.metadata("EXPON.DIST"),(e,t,n)=>n?mc.cdf(e,t):mc.pdf(e,t))}fisher(e,t){return this.runFunction(e.args,t,this.metadata("FISHER"),e=>Math.log((1+e)/(1-e))/2)}fisherinv(e,t){return this.runFunction(e.args,t,this.metadata("FISHERINV"),e=>1-2/(Math.exp(2*e)+1))}gamma(e,t){return this.runFunction(e.args,t,this.metadata("GAMMA"),gc)}gammadist(e,t){return this.runFunction(e.args,t,this.metadata("GAMMA.DIST"),(e,t,n,r)=>r?pc.cdf(e,t,n):pc.pdf(e,t,n))}gammaln(e,t){return this.runFunction(e.args,t,this.metadata("GAMMALN"),fc)}gammainv(e,t){return this.runFunction(e.args,t,this.metadata("GAMMA.INV"),pc.inv)}gauss(e,t){return this.runFunction(e.args,t,this.metadata("GAUSS"),e=>Mc.cdf(e,0,1)-.5)}betadist(e,t){return this.runFunction(e.args,t,this.metadata("BETA.DIST"),(e,t,n,r,i,s)=>e<=i?new lr(Wn.NUM,Ce.ValueSmall):e>=s?new lr(Wn.NUM,Ce.ValueLarge):(e=(e-i)/(s-i),r?Sc.cdf(e,t,n):Sc.pdf(e,t,n)))}betainv(e,t){return this.runFunction(e.args,t,this.metadata("BETA.INV"),(e,t,n,r,i)=>r>=i?new lr(Wn.NUM,Ce.WrongOrder):Sc.inv(e,t,n)*(i-r)+r)}binomialdist(e,t){return this.runFunction(e.args,t,this.metadata("BINOM.DIST"),(e,t,n,r)=>e>t?new lr(Wn.NUM,Ce.WrongOrder):(e=Math.trunc(e),t=Math.trunc(t),r?Ec.cdf(e,t,n):Ec.pdf(e,t,n)))}binomialinv(e,t){return this.runFunction(e.args,t,this.metadata("BINOM.INV"),(e,t,n)=>{e=Math.trunc(e);let r=-1,i=e;while(i>r+1){const s=Math.trunc((r+i)/2);Ec.cdf(s,e,t)>=n?i=s:r=s}return i})}besselifn(e,t){return this.runFunction(e.args,t,this.metadata("BESSELI"),(e,t)=>lc(e,Math.trunc(t)))}besseljfn(e,t){return this.runFunction(e.args,t,this.metadata("BESSELJ"),(e,t)=>oc(e,Math.trunc(t)))}besselkfn(e,t){return this.runFunction(e.args,t,this.metadata("BESSELK"),(e,t)=>cc(e,Math.trunc(t)))}besselyfn(e,t){return this.runFunction(e.args,t,this.metadata("BESSELY"),(e,t)=>ac(e,Math.trunc(t)))}chisqdist(e,t){return this.runFunction(e.args,t,this.metadata("CHISQ.DIST"),(e,t,n)=>(t=Math.trunc(t),n?Pc.cdf(e,t):Pc.pdf(e,t)))}chisqdistrt(e,t){return this.runFunction(e.args,t,this.metadata("CHISQ.DIST.RT"),(e,t)=>1-Pc.cdf(e,Math.trunc(t)))}chisqinv(e,t){return this.runFunction(e.args,t,this.metadata("CHISQ.INV"),(e,t)=>Pc.inv(e,Math.trunc(t)))}chisqinvrt(e,t){return this.runFunction(e.args,t,this.metadata("CHISQ.INV.RT"),(e,t)=>Pc.inv(1-e,Math.trunc(t)))}fdist(e,t){return this.runFunction(e.args,t,this.metadata("F.DIST"),(e,t,n,r)=>(t=Math.trunc(t),n=Math.trunc(n),r?xc.cdf(e,t,n):xc.pdf(e,t,n)))}fdistrt(e,t){return this.runFunction(e.args,t,this.metadata("F.DIST.RT"),(e,t,n)=>1-xc.cdf(e,Math.trunc(t),Math.trunc(n)))}finv(e,t){return this.runFunction(e.args,t,this.metadata("F.INV"),(e,t,n)=>xc.inv(e,Math.trunc(t),Math.trunc(n)))}finvrt(e,t){return this.runFunction(e.args,t,this.metadata("F.INV.RT"),(e,t,n)=>xc.inv(1-e,Math.trunc(t),Math.trunc(n)))}weibulldist(e,t){return this.runFunction(e.args,t,this.metadata("WEIBULL.DIST"),(e,t,n,r)=>r?Dc.cdf(e,n,t):Dc.pdf(e,n,t))}poissondist(e,t){return this.runFunction(e.args,t,this.metadata("POISSON.DIST"),(e,t,n)=>(e=Math.trunc(e),n?Ac.cdf(e,t):Ac.pdf(e,t)))}hypgeomdist(e,t){return this.runFunction(e.args,t,this.metadata("HYPGEOM.DIST"),(e,t,n,r,i)=>e>t||e>n||t>r||n>r||e+r<n+t?new lr(Wn.NUM,Ce.ValueLarge):(e=Math.trunc(e),t=Math.trunc(t),n=Math.trunc(n),r=Math.trunc(r),i?Fc.cdf(e,r,n,t):Fc.pdf(e,r,n,t)))}tdist(e,t){return this.runFunction(e.args,t,this.metadata("T.DIST"),(e,t,n)=>(t=Math.trunc(t),n?Yc.cdf(e,t):Yc.pdf(e,t)))}tdist2t(e,t){return this.runFunction(e.args,t,this.metadata("T.DIST.2T"),(e,t)=>2*(1-Yc.cdf(e,Math.trunc(t))))}tdistrt(e,t){return this.runFunction(e.args,t,this.metadata("T.DIST.RT"),(e,t)=>1-Yc.cdf(e,Math.trunc(t)))}tdistold(e,t){return this.runFunction(e.args,t,this.metadata("TDIST"),(e,t,n)=>n*(1-Yc.cdf(e,Math.trunc(t))))}tinv(e,t){return this.runFunction(e.args,t,this.metadata("T.INV"),(e,t)=>Yc.inv(e,Math.trunc(t)))}tinv2t(e,t){return this.runFunction(e.args,t,this.metadata("T.INV.2T"),(e,t)=>Yc.inv(1-e/2,Math.trunc(t)))}lognormdist(e,t){return this.runFunction(e.args,t,this.metadata("LOGNORM.DIST"),(e,t,n,r)=>r?Hc.cdf(e,t,n):Hc.pdf(e,t,n))}lognorminv(e,t){return this.runFunction(e.args,t,this.metadata("LOGNORM.INV"),(e,t,n)=>Hc.inv(e,t,n))}normdist(e,t){return this.runFunction(e.args,t,this.metadata("NORM.DIST"),(e,t,n,r)=>r?Mc.cdf(e,t,n):Mc.pdf(e,t,n))}norminv(e,t){return this.runFunction(e.args,t,this.metadata("NORM.INV"),(e,t,n)=>Mc.inv(e,t,n))}normsdist(e,t){return this.runFunction(e.args,t,this.metadata("NORM.S.DIST"),(e,t)=>t?Mc.cdf(e,0,1):Mc.pdf(e,0,1))}normsinv(e,t){return this.runFunction(e.args,t,this.metadata("NORM.S.INV"),e=>Mc.inv(e,0,1))}phi(e,t){return this.runFunction(e.args,t,this.metadata("PHI"),e=>Mc.pdf(e,0,1))}negbinomdist(e,t){return this.runFunction(e.args,t,this.metadata("NEGBINOM.DIST"),(e,t,n,r)=>(e=Math.trunc(e),t=Math.trunc(t),r?kc.cdf(e,t,n):kc.pdf(e,t,n)))}confidencenorm(e,t){return this.runFunction(e.args,t,this.metadata("CONFIDENCE.NORM"),(e,t,n)=>Zc(1,e,t,Math.trunc(n))[1]-1)}confidencet(e,t){return this.runFunction(e.args,t,this.metadata("CONFIDENCE.T"),(e,t,n)=>(n=Math.trunc(n),1===n?new lr(Wn.DIV_BY_ZERO):Qc(1,e,t,n)[1]-1))}standardize(e,t){return this.runFunction(e.args,t,this.metadata("STANDARDIZE"),(e,t,n)=>(e-t)/n)}}zc.implementedFunctions={ERF:{method:"erf",parameters:[{argumentType:$r.NUMBER},{argumentType:$r.NUMBER,optionalArg:!0}]},ERFC:{method:"erfc",parameters:[{argumentType:$r.NUMBER}]},"EXPON.DIST":{method:"expondist",parameters:[{argumentType:$r.NUMBER,minValue:0},{argumentType:$r.NUMBER,greaterThan:0},{argumentType:$r.BOOLEAN}]},FISHER:{method:"fisher",parameters:[{argumentType:$r.NUMBER,greaterThan:-1,lessThan:1}]},FISHERINV:{method:"fisherinv",parameters:[{argumentType:$r.NUMBER}]},GAMMA:{method:"gamma",parameters:[{argumentType:$r.NUMBER}]},"GAMMA.DIST":{method:"gammadist",parameters:[{argumentType:$r.NUMBER,minValue:0},{argumentType:$r.NUMBER,greaterThan:0},{argumentType:$r.NUMBER,greaterThan:0},{argumentType:$r.BOOLEAN}]},GAMMALN:{method:"gammaln",parameters:[{argumentType:$r.NUMBER,greaterThan:0}]},"GAMMA.INV":{method:"gammainv",parameters:[{argumentType:$r.NUMBER,minValue:0,lessThan:1},{argumentType:$r.NUMBER,greaterThan:0},{argumentType:$r.NUMBER,greaterThan:0}]},GAUSS:{method:"gauss",parameters:[{argumentType:$r.NUMBER}]},"BETA.DIST":{method:"betadist",parameters:[{argumentType:$r.NUMBER},{argumentType:$r.NUMBER,greaterThan:0},{argumentType:$r.NUMBER,greaterThan:0},{argumentType:$r.BOOLEAN},{argumentType:$r.NUMBER,defaultValue:0},{argumentType:$r.NUMBER,defaultValue:1}]},"BETA.INV":{method:"betainv",parameters:[{argumentType:$r.NUMBER,greaterThan:0,maxValue:1},{argumentType:$r.NUMBER,greaterThan:0},{argumentType:$r.NUMBER,greaterThan:0},{argumentType:$r.NUMBER,defaultValue:0},{argumentType:$r.NUMBER,defaultValue:1}]},"BINOM.DIST":{method:"binomialdist",parameters:[{argumentType:$r.NUMBER,minValue:0},{argumentType:$r.NUMBER,minValue:0},{argumentType:$r.NUMBER,minValue:0,maxValue:1},{argumentType:$r.BOOLEAN}]},"BINOM.INV":{method:"binomialinv",parameters:[{argumentType:$r.NUMBER,minValue:0},{argumentType:$r.NUMBER,minValue:0,maxValue:1},{argumentType:$r.NUMBER,greaterThan:0,lessThan:1}]},BESSELI:{method:"besselifn",parameters:[{argumentType:$r.NUMBER},{argumentType:$r.NUMBER,minValue:0}]},BESSELJ:{method:"besseljfn",parameters:[{argumentType:$r.NUMBER},{argumentType:$r.NUMBER,minValue:0}]},BESSELK:{method:"besselkfn",parameters:[{argumentType:$r.NUMBER},{argumentType:$r.NUMBER,minValue:0}]},BESSELY:{method:"besselyfn",parameters:[{argumentType:$r.NUMBER},{argumentType:$r.NUMBER,minValue:0}]},"CHISQ.DIST":{method:"chisqdist",parameters:[{argumentType:$r.NUMBER},{argumentType:$r.NUMBER,minValue:1,maxValue:1e10},{argumentType:$r.BOOLEAN}]},"CHISQ.DIST.RT":{method:"chisqdistrt",parameters:[{argumentType:$r.NUMBER},{argumentType:$r.NUMBER,minValue:1,maxValue:1e10}]},"CHISQ.INV":{method:"chisqinv",parameters:[{argumentType:$r.NUMBER,minValue:0,maxValue:1},{argumentType:$r.NUMBER,minValue:1,maxValue:1e10}]},"CHISQ.INV.RT":{method:"chisqinvrt",parameters:[{argumentType:$r.NUMBER,minValue:0,maxValue:1},{argumentType:$r.NUMBER,minValue:1}]},"F.DIST":{method:"fdist",parameters:[{argumentType:$r.NUMBER,minValue:0},{argumentType:$r.NUMBER,minValue:1},{argumentType:$r.NUMBER,minValue:1},{argumentType:$r.BOOLEAN}]},"F.DIST.RT":{method:"fdistrt",parameters:[{argumentType:$r.NUMBER,minValue:0},{argumentType:$r.NUMBER,minValue:1},{argumentType:$r.NUMBER,minValue:1}]},"F.INV":{method:"finv",parameters:[{argumentType:$r.NUMBER,minValue:0,maxValue:1},{argumentType:$r.NUMBER,minValue:1},{argumentType:$r.NUMBER,minValue:1}]},"F.INV.RT":{method:"finvrt",parameters:[{argumentType:$r.NUMBER,minValue:0,maxValue:1},{argumentType:$r.NUMBER,minValue:1},{argumentType:$r.NUMBER,minValue:1}]},"WEIBULL.DIST":{method:"weibulldist",parameters:[{argumentType:$r.NUMBER,minValue:0},{argumentType:$r.NUMBER,greaterThan:0},{argumentType:$r.NUMBER,greaterThan:0},{argumentType:$r.BOOLEAN}]},"POISSON.DIST":{method:"poissondist",parameters:[{argumentType:$r.NUMBER,minValue:0},{argumentType:$r.NUMBER,minValue:0},{argumentType:$r.BOOLEAN}]},"HYPGEOM.DIST":{method:"hypgeomdist",parameters:[{argumentType:$r.NUMBER,minValue:0},{argumentType:$r.NUMBER,greaterThan:0},{argumentType:$r.NUMBER,greaterThan:0},{argumentType:$r.NUMBER,greaterThan:0},{argumentType:$r.BOOLEAN}]},"T.DIST":{method:"tdist",parameters:[{argumentType:$r.NUMBER},{argumentType:$r.NUMBER,minValue:1},{argumentType:$r.BOOLEAN}]},"T.DIST.2T":{method:"tdist2t",parameters:[{argumentType:$r.NUMBER,minValue:0},{argumentType:$r.NUMBER,minValue:1}]},"T.DIST.RT":{method:"tdistrt",parameters:[{argumentType:$r.NUMBER},{argumentType:$r.NUMBER,minValue:1}]},TDIST:{method:"tdistold",parameters:[{argumentType:$r.NUMBER,minValue:0},{argumentType:$r.NUMBER,minValue:1},{argumentType:$r.INTEGER,minValue:1,maxValue:2}]},"T.INV":{method:"tinv",parameters:[{argumentType:$r.NUMBER,greaterThan:0,lessThan:1},{argumentType:$r.NUMBER,minValue:1}]},"T.INV.2T":{method:"tinv2t",parameters:[{argumentType:$r.NUMBER,greaterThan:0,maxValue:1},{argumentType:$r.NUMBER,minValue:1}]},"LOGNORM.DIST":{method:"lognormdist",parameters:[{argumentType:$r.NUMBER,greaterThan:0},{argumentType:$r.NUMBER},{argumentType:$r.NUMBER,greaterThan:0},{argumentType:$r.BOOLEAN}]},"LOGNORM.INV":{method:"lognorminv",parameters:[{argumentType:$r.NUMBER,greaterThan:0,lessThan:1},{argumentType:$r.NUMBER},{argumentType:$r.NUMBER,greaterThan:0}]},"NORM.DIST":{method:"normdist",parameters:[{argumentType:$r.NUMBER},{argumentType:$r.NUMBER},{argumentType:$r.NUMBER,greaterThan:0},{argumentType:$r.BOOLEAN}]},"NORM.INV":{method:"norminv",parameters:[{argumentType:$r.NUMBER,greaterThan:0,lessThan:1},{argumentType:$r.NUMBER},{argumentType:$r.NUMBER,greaterThan:0}]},"NORM.S.DIST":{method:"normsdist",parameters:[{argumentType:$r.NUMBER},{argumentType:$r.BOOLEAN}]},"NORM.S.INV":{method:"normsinv",parameters:[{argumentType:$r.NUMBER,greaterThan:0,lessThan:1}]},PHI:{method:"phi",parameters:[{argumentType:$r.NUMBER}]},"NEGBINOM.DIST":{method:"negbinomdist",parameters:[{argumentType:$r.NUMBER,minValue:0},{argumentType:$r.NUMBER,minValue:1},{argumentType:$r.NUMBER,minValue:0,maxValue:1},{argumentType:$r.BOOLEAN}]},"CONFIDENCE.NORM":{method:"confidencenorm",parameters:[{argumentType:$r.NUMBER,greaterThan:0,lessThan:1},{argumentType:$r.NUMBER,greaterThan:0},{argumentType:$r.NUMBER,minValue:1}]},"CONFIDENCE.T":{method:"confidencet",parameters:[{argumentType:$r.NUMBER,greaterThan:0,lessThan:1},{argumentType:$r.NUMBER,greaterThan:0},{argumentType:$r.NUMBER,minValue:1}]},STANDARDIZE:{method:"standardize",parameters:[{argumentType:$r.NUMBER},{argumentType:$r.NUMBER},{argumentType:$r.NUMBER,greaterThan:0}]}},zc.aliases={NEGBINOMDIST:"NEGBINOM.DIST",EXPONDIST:"EXPON.DIST",BETADIST:"BETA.DIST",NORMDIST:"NORM.DIST",NORMINV:"NORM.INV",NORMSDIST:"NORM.S.DIST",NORMSINV:"NORM.S.INV",LOGNORMDIST:"LOGNORM.DIST",LOGINV:"LOGNORM.INV",TINV:"T.INV.2T",HYPGEOMDIST:"HYPGEOM.DIST",POISSON:"POISSON.DIST",WEIBULL:"WEIBULL.DIST",FINV:"F.INV.RT",FDIST:"F.DIST.RT",CHIDIST:"CHISQ.DIST.RT",CHIINV:"CHISQ.INV.RT",GAMMADIST:"GAMMA.DIST","GAMMALN.PRECISE":"GAMMALN",GAMMAINV:"GAMMA.INV",BETAINV:"BETA.INV",BINOMDIST:"BINOM.DIST",CONFIDENCE:"CONFIDENCE.NORM",CRITBINOM:"BINOM.INV",WEIBULLDIST:"WEIBULL.DIST",TINV2T:"T.INV.2T",TDISTRT:"T.DIST.RT",TDIST2T:"T.DIST.2T",FINVRT:"F.INV.RT",FDISTRT:"F.DIST.RT",CHIDISTRT:"CHISQ.DIST.RT",CHIINVRT:"CHISQ.INV.RT",LOGNORMINV:"LOGNORM.INV",POISSONDIST:"POISSON.DIST"};
  1117. /**
  1118. * @license
  1119. * Copyright (c) 2024 Handsoncode. All rights reserved.
  1120. */
  1121. class $c extends qr{fact(e,t){return this.runFunction(e.args,t,this.metadata("FACT"),e=>{e=Math.trunc(e);let t=1;for(let n=1;n<=e;n++)t*=n;return t})}factdouble(e,t){return this.runFunction(e.args,t,this.metadata("FACTDOUBLE"),e=>{e=Math.trunc(e);let t=1;for(let n=e;n>=1;n-=2)t*=n;return t})}combin(e,t){return this.runFunction(e.args,t,this.metadata("COMBIN"),(e,t)=>t>e?new lr(Wn.NUM,Ce.WrongOrder):(e=Math.trunc(e),t=Math.trunc(t),qc(e,t)))}combina(e,t){return this.runFunction(e.args,t,this.metadata("COMBINA"),(e,t)=>(e=Math.trunc(e),t=Math.trunc(t),e+t-1>=1030?new lr(Wn.NUM,Ce.ValueLarge):0===e&&0===t?1:qc(e+t-1,t)))}gcd(e,t){return this.runFunction(e.args,t,this.metadata("GCD"),(...e)=>{const t=this.arithmeticHelper.coerceNumbersCoerceRangesDropNulls(e);if(t instanceof lr)return t;let n=0;for(const r of t){if(r<0)return new lr(Wn.NUM,Ce.ValueSmall);n=eu(n,Math.trunc(r))}return n>Number.MAX_SAFE_INTEGER?new lr(Wn.NUM,Ce.ValueLarge):n})}lcm(e,t){return this.runFunction(e.args,t,this.metadata("LCM"),(...e)=>{const t=this.arithmeticHelper.coerceNumbersCoerceRangesDropNulls(e);if(t instanceof lr)return t;let n=1;for(const r of t){if(r<0)return new lr(Wn.NUM,Ce.ValueSmall);n=tu(n,Math.trunc(r))}return n>Number.MAX_SAFE_INTEGER?new lr(Wn.NUM,Ce.ValueLarge):n})}mround(e,t){return this.runFunction(e.args,t,this.metadata("MROUND"),(e,t)=>0===t?0:e>0&&t<0||e<0&&t>0?new lr(Wn.NUM,Ce.DistinctSigns):Math.round(e/t)*t)}multinomial(e,t){return this.runFunction(e.args,t,this.metadata("MULTINOMIAL"),(...e)=>{let t=0,n=1;for(let r of e){if(r<0)return new lr(Wn.NUM,Ce.ValueSmall);r=Math.trunc(r);for(let e=1;e<=r;e++)n*=(t+e)/e;t+=r}return Math.round(n)})}quotient(e,t){return this.runFunction(e.args,t,this.metadata("QUOTIENT"),(e,t)=>0===t?new lr(Wn.DIV_BY_ZERO):Math.trunc(e/t))}seriessum(e,t){return this.runFunction(e.args,t,this.metadata("SERIESSUM"),(e,t,n,r)=>{const i=this.arithmeticHelper.manyToOnlyNumbersDropNulls(r.valuesFromTopLeftCorner());if(i instanceof lr)return i;let s=0;i.reverse();for(const o of i)s*=Math.pow(e,n),s+=o;return s*Math.pow(e,t)})}sign(e,t){return this.runFunction(e.args,t,this.metadata("SIGN"),e=>e>0?1:e<0?-1:0)}sumx2my2(e,t){return this.runFunction(e.args,t,this.metadata("SUMX2MY2"),(e,t)=>{const n=e.valuesFromTopLeftCorner(),r=t.valuesFromTopLeftCorner();if(n.length!==r.length)return new lr(Wn.NA,Ce.EqualLength);const i=n.length;let s=0;for(let o=0;o<i;o++){const e=n[o],t=r[o];if(e instanceof lr)return e;if(t instanceof lr)return t;"number"===typeof e&&"number"===typeof t&&(s+=Math.pow(e,2)-Math.pow(t,2))}return s})}sumx2py2(e,t){return this.runFunction(e.args,t,this.metadata("SUMX2PY2"),(e,t)=>{const n=e.valuesFromTopLeftCorner(),r=t.valuesFromTopLeftCorner();if(n.length!==r.length)return new lr(Wn.NA,Ce.EqualLength);const i=n.length;let s=0;for(let o=0;o<i;o++){const e=n[o],t=r[o];if(e instanceof lr)return e;if(t instanceof lr)return t;"number"===typeof e&&"number"===typeof t&&(s+=Math.pow(e,2)+Math.pow(t,2))}return s})}sumxmy2(e,t){return this.runFunction(e.args,t,this.metadata("SUMXMY2"),(e,t)=>{const n=e.valuesFromTopLeftCorner(),r=t.valuesFromTopLeftCorner();if(n.length!==r.length)return new lr(Wn.NA,Ce.EqualLength);const i=n.length;let s=0;for(let o=0;o<i;o++){const e=n[o],t=r[o];if(e instanceof lr)return e;if(t instanceof lr)return t;"number"===typeof e&&"number"===typeof t&&(s+=Math.pow(e-t,2))}return s})}}function qc(e,t){2*t>e&&(t=e-t);let n=1;for(let r=1;r<=t;r++)n*=(e-t+r)/r;return Math.round(n)}function eu(e,t){e<t&&([e,t]=[t,e]);while(t>0)[e,t]=[t,e%t];return e}function tu(e,t){return 0===e||0===t?0:e*(t/eu(e,t))}
  1122. /**
  1123. * @license
  1124. * Copyright (c) 2024 Handsoncode. All rights reserved.
  1125. */$c.implementedFunctions={FACT:{method:"fact",parameters:[{argumentType:$r.NUMBER,minValue:0,maxValue:170}]},FACTDOUBLE:{method:"factdouble",parameters:[{argumentType:$r.NUMBER,minValue:0,maxValue:288}]},COMBIN:{method:"combin",parameters:[{argumentType:$r.NUMBER,minValue:0,lessThan:1030},{argumentType:$r.NUMBER,minValue:0}]},COMBINA:{method:"combina",parameters:[{argumentType:$r.NUMBER,minValue:0},{argumentType:$r.NUMBER,minValue:0}]},GCD:{method:"gcd",parameters:[{argumentType:$r.ANY}],repeatLastArgs:1},LCM:{method:"lcm",parameters:[{argumentType:$r.ANY}],repeatLastArgs:1},MROUND:{method:"mround",parameters:[{argumentType:$r.NUMBER},{argumentType:$r.NUMBER}]},MULTINOMIAL:{method:"multinomial",parameters:[{argumentType:$r.NUMBER}],repeatLastArgs:1,expandRanges:!0},QUOTIENT:{method:"quotient",parameters:[{argumentType:$r.NUMBER},{argumentType:$r.NUMBER}]},SERIESSUM:{method:"seriessum",parameters:[{argumentType:$r.NUMBER},{argumentType:$r.NUMBER},{argumentType:$r.NUMBER},{argumentType:$r.RANGE}]},SIGN:{method:"sign",parameters:[{argumentType:$r.NUMBER}]},SUMX2MY2:{method:"sumx2my2",parameters:[{argumentType:$r.RANGE},{argumentType:$r.RANGE}]},SUMX2PY2:{method:"sumx2py2",parameters:[{argumentType:$r.RANGE},{argumentType:$r.RANGE}]},SUMXMY2:{method:"sumxmy2",parameters:[{argumentType:$r.RANGE},{argumentType:$r.RANGE}]}};class nu extends qr{complex(e,t){return this.runFunction(e.args,t,this.metadata("COMPLEX"),(e,t,n)=>"i"!==n&&"j"!==n?new lr(Wn.VALUE,Ce.ShouldBeIorJ):Ir([e,t],n))}imabs(e,t){return this.runFunction(e.args,t,this.metadata("IMABS"),du)}imaginary(e,t){return this.runFunction(e.args,t,this.metadata("IMAGINARY"),([e,t])=>t)}imreal(e,t){return this.runFunction(e.args,t,this.metadata("IMREAL"),([e,t])=>e)}imargument(e,t){return this.runFunction(e.args,t,this.metadata("IMARGUMENT"),([e,t])=>0===e&&0===t?new lr(Wn.DIV_BY_ZERO):Math.atan2(t,e))}imconjugate(e,t){return this.runFunction(e.args,t,this.metadata("IMCONJUGATE"),([e,t])=>Ir([e,-t]))}imcos(e,t){return this.runFunction(e.args,t,this.metadata("IMCOS"),e=>Ir(au(e)))}imcosh(e,t){return this.runFunction(e.args,t,this.metadata("IMCOSH"),e=>Ir(lu(e)))}imcot(e,t){return this.runFunction(e.args,t,this.metadata("IMCOT"),e=>Ir(ou(au(e),cu(e))))}imcsc(e,t){return this.runFunction(e.args,t,this.metadata("IMCSC"),e=>Ir(ou([1,0],cu(e))))}imcsch(e,t){return this.runFunction(e.args,t,this.metadata("IMCSCH"),e=>Ir(ou([1,0],uu(e))))}imsec(e,t){return this.runFunction(e.args,t,this.metadata("IMSEC"),e=>Ir(ou([1,0],au(e))))}imsech(e,t){return this.runFunction(e.args,t,this.metadata("IMSECH"),e=>Ir(ou([1,0],lu(e))))}imsin(e,t){return this.runFunction(e.args,t,this.metadata("IMSIN"),e=>Ir(cu(e)))}imsinh(e,t){return this.runFunction(e.args,t,this.metadata("IMSINH"),e=>Ir(uu(e)))}imtan(e,t){return this.runFunction(e.args,t,this.metadata("IMTAN"),e=>Ir(ou(cu(e),au(e))))}imdiv(e,t){return this.runFunction(e.args,t,this.metadata("IMDIV"),(e,t)=>Ir(ou(e,t)))}improduct(e,t){return this.runFunction(e.args,t,this.metadata("IMPRODUCT"),(...e)=>{const t=this.arithmeticHelper.coerceComplexExactRanges(e);if(t instanceof lr)return t;let n=[1,0];for(const r of t)n=su(n,r);return Ir(n)})}imsum(e,t){return this.runFunction(e.args,t,this.metadata("IMSUM"),(...e)=>{const t=this.arithmeticHelper.coerceComplexExactRanges(e);if(t instanceof lr)return t;let n=[0,0];for(const r of t)n=ru(n,r);return Ir(n)})}imsub(e,t){return this.runFunction(e.args,t,this.metadata("IMSUB"),(e,t)=>Ir(iu(e,t)))}imexp(e,t){return this.runFunction(e.args,t,this.metadata("IMEXP"),e=>Ir(hu(e)))}imln(e,t){return this.runFunction(e.args,t,this.metadata("IMLN"),e=>Ir(mu(e)))}imlog10(e,t){return this.runFunction(e.args,t,this.metadata("IMLOG10"),e=>{const[t,n]=mu(e),r=Math.log(10);return Ir([t/r,n/r])})}imlog2(e,t){return this.runFunction(e.args,t,this.metadata("IMLOG2"),e=>{const[t,n]=mu(e),r=Math.log(2);return Ir([t/r,n/r])})}impower(e,t){return this.runFunction(e.args,t,this.metadata("IMPOWER"),(e,t)=>Ir(gu(e,t)))}imsqrt(e,t){return this.runFunction(e.args,t,this.metadata("IMSQRT"),e=>Ir(gu(e,.5)))}}function ru([e,t],[n,r]){return[e+n,t+r]}function iu([e,t],[n,r]){return[e-n,t-r]}function su([e,t],[n,r]){return[e*n-t*r,e*r+n*t]}function ou([e,t],[n,r]){const i=Math.pow(n,2)+Math.pow(r,2),[s,o]=su([e,t],[n,-r]);return[s/i,o/i]}function au([e,t]){return[Math.cos(e)*Math.cosh(t),-Math.sin(e)*Math.sinh(t)]}function lu([e,t]){return[Math.cosh(e)*Math.cos(t),Math.sinh(e)*Math.sin(t)]}function cu([e,t]){return[Math.sin(e)*Math.cosh(t),Math.cos(e)*Math.sinh(t)]}function uu([e,t]){return[Math.sinh(e)*Math.cos(t),Math.cosh(e)*Math.sin(t)]}function hu([e,t]){return[Math.exp(e)*Math.cos(t),Math.exp(e)*Math.sin(t)]}function du([e,t]){return Math.sqrt(e*e+t*t)}function mu([e,t]){return[Math.log(du([e,t])),Math.atan2(t,e)]}function gu(e,t){const[n,r]=mu(e);return hu([t*n,t*r])}
  1126. /**
  1127. * @license
  1128. * Copyright (c) 2024 Handsoncode. All rights reserved.
  1129. */nu.implementedFunctions={COMPLEX:{method:"complex",parameters:[{argumentType:$r.NUMBER},{argumentType:$r.NUMBER},{argumentType:$r.STRING,defaultValue:"i"}]},IMABS:{method:"imabs",parameters:[{argumentType:$r.COMPLEX}]},IMAGINARY:{method:"imaginary",parameters:[{argumentType:$r.COMPLEX}]},IMREAL:{method:"imreal",parameters:[{argumentType:$r.COMPLEX}]},IMARGUMENT:{method:"imargument",parameters:[{argumentType:$r.COMPLEX}]},IMCONJUGATE:{method:"imconjugate",parameters:[{argumentType:$r.COMPLEX}]},IMCOS:{method:"imcos",parameters:[{argumentType:$r.COMPLEX}]},IMCOSH:{method:"imcosh",parameters:[{argumentType:$r.COMPLEX}]},IMCOT:{method:"imcot",parameters:[{argumentType:$r.COMPLEX}]},IMCSC:{method:"imcsc",parameters:[{argumentType:$r.COMPLEX}]},IMCSCH:{method:"imcsch",parameters:[{argumentType:$r.COMPLEX}]},IMSEC:{method:"imsec",parameters:[{argumentType:$r.COMPLEX}]},IMSECH:{method:"imsech",parameters:[{argumentType:$r.COMPLEX}]},IMSIN:{method:"imsin",parameters:[{argumentType:$r.COMPLEX}]},IMSINH:{method:"imsinh",parameters:[{argumentType:$r.COMPLEX}]},IMTAN:{method:"imtan",parameters:[{argumentType:$r.COMPLEX}]},IMDIV:{method:"imdiv",parameters:[{argumentType:$r.COMPLEX},{argumentType:$r.COMPLEX}]},IMPRODUCT:{method:"improduct",parameters:[{argumentType:$r.ANY}],repeatLastArgs:1},IMSUM:{method:"imsum",parameters:[{argumentType:$r.ANY}],repeatLastArgs:1},IMSUB:{method:"imsub",parameters:[{argumentType:$r.COMPLEX},{argumentType:$r.COMPLEX}]},IMEXP:{method:"imexp",parameters:[{argumentType:$r.COMPLEX}]},IMLN:{method:"imln",parameters:[{argumentType:$r.COMPLEX}]},IMLOG10:{method:"imlog10",parameters:[{argumentType:$r.COMPLEX}]},IMLOG2:{method:"imlog2",parameters:[{argumentType:$r.COMPLEX}]},IMPOWER:{method:"impower",parameters:[{argumentType:$r.COMPLEX},{argumentType:$r.NUMBER}]},IMSQRT:{method:"imsqrt",parameters:[{argumentType:$r.COMPLEX}]}};class pu extends qr{avedev(e,t){return this.runFunction(e.args,t,this.metadata("AVEDEV"),(...e)=>{const t=this.arithmeticHelper.coerceNumbersExactRanges(e);if(t instanceof lr)return t;if(0===t.length)return new lr(Wn.DIV_BY_ZERO);const n=Uc(t);return t.reduce((e,t)=>e+Math.abs(t-n),0)/t.length})}devsq(e,t){return this.runFunction(e.args,t,this.metadata("DEVSQ"),(...e)=>{const t=this.arithmeticHelper.coerceNumbersExactRanges(e);return t instanceof lr?t:0===t.length?0:Wc(t)})}geomean(e,t){return this.runFunction(e.args,t,this.metadata("GEOMEAN"),(...e)=>{const t=this.arithmeticHelper.coerceNumbersExactRanges(e);if(t instanceof lr)return t;if(0===t.length)return new lr(Wn.NUM,Ce.OneValue);for(const n of t)if(n<=0)return new lr(Wn.NUM,Ce.ValueSmall);return Gc(t)})}harmean(e,t){return this.runFunction(e.args,t,this.metadata("HARMEAN"),(...e)=>{const t=this.arithmeticHelper.coerceNumbersExactRanges(e);if(t instanceof lr)return t;if(0===t.length)return new lr(Wn.NUM,Ce.OneValue);for(const n of t)if(n<=0)return new lr(Wn.NUM,Ce.ValueSmall);return t.length/t.reduce((e,t)=>e+1/t,0)})}correl(e,t){return this.runFunction(e.args,t,this.metadata("CORREL"),(e,t)=>{if(e.numberOfElements()!==t.numberOfElements())return new lr(Wn.NA,Ce.EqualLength);const n=fu(e,t);if(n instanceof lr)return n;const r=n[0].length;return r<=1?new lr(Wn.DIV_BY_ZERO,Ce.TwoValues):Jc(n[0],n[1])})}rsq(e,t){return this.runFunction(e.args,t,this.metadata("RSQ"),(e,t)=>{if(e.numberOfElements()!==t.numberOfElements())return new lr(Wn.NA,Ce.EqualLength);const n=fu(e,t);if(n instanceof lr)return n;const r=n[0].length;return r<=1?new lr(Wn.DIV_BY_ZERO,Ce.TwoValues):Math.pow(Jc(n[0],n[1]),2)})}covariancep(e,t){return this.runFunction(e.args,t,this.metadata("COVARIANCE.P"),(e,t)=>{if(e.numberOfElements()!==t.numberOfElements())return new lr(Wn.NA,Ce.EqualLength);const n=fu(e,t);if(n instanceof lr)return n;const r=n[0].length;return r<1?new lr(Wn.DIV_BY_ZERO,Ce.OneValue):1===r?0:Bc(n[0],n[1])*(r-1)/r})}covariances(e,t){return this.runFunction(e.args,t,this.metadata("COVARIANCE.S"),(e,t)=>{if(e.numberOfElements()!==t.numberOfElements())return new lr(Wn.NA,Ce.EqualLength);const n=fu(e,t);if(n instanceof lr)return n;const r=n[0].length;return r<=1?new lr(Wn.DIV_BY_ZERO,Ce.TwoValues):Bc(n[0],n[1])})}ztest(e,t){return this.runFunction(e.args,t,this.metadata("Z.TEST"),(e,t,n)=>{const r=this.arithmeticHelper.manyToExactNumbers(e.valuesFromTopLeftCorner());if(r instanceof lr)return r;const i=r.length;if(void 0===n){if(i<2)return new lr(Wn.DIV_BY_ZERO,Ce.TwoValues);n=jc(r,!0)}return i<1?new lr(Wn.NA,Ce.OneValue):0===n?new lr(Wn.DIV_BY_ZERO):1-Mc.cdf((Uc(r)-t)/(n/Math.sqrt(i)),0,1)})}ftest(e,t){return this.runFunction(e.args,t,this.metadata("F.TEST"),(e,t)=>{const n=this.arithmeticHelper.manyToExactNumbers(e.valuesFromTopLeftCorner()),r=this.arithmeticHelper.manyToExactNumbers(t.valuesFromTopLeftCorner());if(n instanceof lr)return n;if(r instanceof lr)return r;if(n.length<=1||r.length<=1)return new lr(Wn.DIV_BY_ZERO);const i=Xc(n,!0),s=Xc(r,!0);if(0===i||0===s)return new lr(Wn.DIV_BY_ZERO);const o=i/s,a=xc.cdf(o,n.length-1,r.length-1);return 2*Math.min(a,1-a)})}steyx(e,t){return this.runFunction(e.args,t,this.metadata("STEYX"),(e,t)=>{if(e.numberOfElements()!==t.numberOfElements())return new lr(Wn.NA,Ce.EqualLength);const n=fu(e,t);if(n instanceof lr)return n;const r=n[0].length;return r<=2?new lr(Wn.DIV_BY_ZERO,Ce.ThreeValues):Math.sqrt((Wc(n[0])-Math.pow(Bc(n[0],n[1])*(r-1),2)/Wc(n[1]))/(r-2))})}slope(e,t){return this.runFunction(e.args,t,this.metadata("SLOPE"),(e,t)=>{if(e.numberOfElements()!==t.numberOfElements())return new lr(Wn.NA,Ce.EqualLength);const n=fu(e,t);if(n instanceof lr)return n;const r=n[0].length;return r<=1?new lr(Wn.DIV_BY_ZERO,Ce.TwoValues):Bc(n[0],n[1])*(r-1)/Wc(n[1])})}chisqtest(e,t){return this.runFunction(e.args,t,this.metadata("CHISQ.TEST"),(e,t)=>{const n=e.height(),r=e.width();if(t.height()!==n||t.width()!==r)return new lr(Wn.NA,Ce.EqualLength);const i=fu(e,t);if(i instanceof lr)return i;if(i[0].length<=1)return new lr(Wn.DIV_BY_ZERO,Ce.TwoValues);let s=0;for(let o=0;o<i[0].length;o++){if(0===i[1][o])return new lr(Wn.DIV_BY_ZERO);s+=Math.pow(i[0][o]-i[1][o],2)/i[1][o]}return s<0?new lr(Wn.NUM,Ce.NaN):1-Pc.cdf(s,n>1&&r>1?(n-1)*(r-1):n*r-1)})}ttest(e,t){return this.runFunction(e.args,t,this.metadata("T.TEST"),(e,t,n,r)=>{const i=this.arithmeticHelper.manyToExactNumbers(e.valuesFromTopLeftCorner()),s=this.arithmeticHelper.manyToExactNumbers(t.valuesFromTopLeftCorner());if(i instanceof lr)return i;if(s instanceof lr)return s;const o=i.length,a=s.length;if(1===r){if(a!==o)return new lr(Wn.NA,Ce.EqualLength);if(o<=1)return new lr(Wn.DIV_BY_ZERO,Ce.TwoValues);const e=Array(o);for(let n=0;n<o;n++)e[n]=i[n]-s[n];const t=jc(e,!0);if(0===t)return new lr(Wn.DIV_BY_ZERO);const r=Math.abs(Math.sqrt(o)*Uc(e)/t);return n*(1-Yc.cdf(r,o-1))}if(2===r){if(o<=1||a<=1)return new lr(Wn.DIV_BY_ZERO,Ce.TwoValues);const e=(Wc(i)+Wc(s))/(o+a-2);if(0===e)return new lr(Wn.DIV_BY_ZERO);const t=Math.abs((Uc(i)-Uc(s))/Math.sqrt(e*(1/o+1/a)));return n*(1-Yc.cdf(t,o+a-2))}{if(o<=1||a<=1)return new lr(Wn.DIV_BY_ZERO,Ce.TwoValues);const e=Xc(i,!0),t=Xc(s,!0);if(0===e&&0===t)return new lr(Wn.DIV_BY_ZERO);const r=Math.abs((Uc(i)-Uc(s))/Math.sqrt(e/o+t/a)),l=Math.pow(e/o+t/a,2)/(Math.pow(e/o,2)/(o-1)+Math.pow(t/a,2)/(a-1));return n*(1-Yc.cdf(r,l))}})}skew(e,t){return this.runFunction(e.args,t,this.metadata("SKEW"),(...e)=>{const t=this.arithmeticHelper.coerceNumbersExactRanges(e);if(t instanceof lr)return t;const n=t.length;if(n<3)return new lr(Wn.DIV_BY_ZERO,Ce.ThreeValues);const r=Uc(t),i=jc(t,!0);return 0===i?new lr(Wn.DIV_BY_ZERO):t.reduce((e,t)=>e+Math.pow((t-r)/i,3),0)*n/(n-1)/(n-2)})}skewp(e,t){return this.runFunction(e.args,t,this.metadata("SKEW.P"),(...e)=>{const t=this.arithmeticHelper.coerceNumbersExactRanges(e);if(t instanceof lr)return t;const n=t.length;if(n<3)return new lr(Wn.DIV_BY_ZERO,Ce.ThreeValues);const r=Uc(t),i=jc(t,!1);return 0===i?new lr(Wn.DIV_BY_ZERO):t.reduce((e,t)=>e+Math.pow((t-r)/i,3),0)/n})}}function fu(e,t){const n=e.iterateValuesFromTopLeftCorner(),r=t.iterateValuesFromTopLeftCorner();let i,s;const o=[],a=[];while(i=n.next(),s=r.next(),!i.done&&!s.done){const e=i.value,t=s.value;if(e instanceof lr)return e;if(t instanceof lr)return t;_t(e)&&_t(t)&&(o.push(wt(e)),a.push(wt(t)))}return[o,a]}
  1130. /**
  1131. * @license
  1132. * Copyright (c) 2024 Handsoncode. All rights reserved.
  1133. */
  1134. /**
  1135. * @license
  1136. * Copyright (c) 2024 Handsoncode. All rights reserved.
  1137. */pu.implementedFunctions={AVEDEV:{method:"avedev",parameters:[{argumentType:$r.ANY}],repeatLastArgs:1},DEVSQ:{method:"devsq",parameters:[{argumentType:$r.ANY}],repeatLastArgs:1},GEOMEAN:{method:"geomean",parameters:[{argumentType:$r.ANY}],repeatLastArgs:1},HARMEAN:{method:"harmean",parameters:[{argumentType:$r.ANY}],repeatLastArgs:1},CORREL:{method:"correl",parameters:[{argumentType:$r.RANGE},{argumentType:$r.RANGE}]},RSQ:{method:"rsq",parameters:[{argumentType:$r.RANGE},{argumentType:$r.RANGE}]},"COVARIANCE.P":{method:"covariancep",parameters:[{argumentType:$r.RANGE},{argumentType:$r.RANGE}]},"COVARIANCE.S":{method:"covariances",parameters:[{argumentType:$r.RANGE},{argumentType:$r.RANGE}]},"Z.TEST":{method:"ztest",parameters:[{argumentType:$r.RANGE},{argumentType:$r.NUMBER},{argumentType:$r.NUMBER,optionalArg:!0}]},"F.TEST":{method:"ftest",parameters:[{argumentType:$r.RANGE},{argumentType:$r.RANGE}]},STEYX:{method:"steyx",parameters:[{argumentType:$r.RANGE},{argumentType:$r.RANGE}]},SLOPE:{method:"slope",parameters:[{argumentType:$r.RANGE},{argumentType:$r.RANGE}]},"CHISQ.TEST":{method:"chisqtest",parameters:[{argumentType:$r.RANGE},{argumentType:$r.RANGE}]},"T.TEST":{method:"ttest",parameters:[{argumentType:$r.RANGE},{argumentType:$r.RANGE},{argumentType:$r.INTEGER,minValue:1,maxValue:2},{argumentType:$r.INTEGER,minValue:1,maxValue:3}]},SKEW:{method:"skew",parameters:[{argumentType:$r.ANY}],repeatLastArgs:1},"SKEW.P":{method:"skewp",parameters:[{argumentType:$r.ANY}],repeatLastArgs:1}},pu.aliases={COVAR:"COVARIANCE.P",FTEST:"F.TEST",PEARSON:"CORREL",ZTEST:"Z.TEST",CHITEST:"CHISQ.TEST",TTEST:"T.TEST",COVARIANCEP:"COVARIANCE.P",COVARIANCES:"COVARIANCE.S",SKEWP:"SKEW.P"};class Ru extends ha{}Ru.HyperFormula=ha,Ru.ErrorType=Wn,Ru.CellError=lr,Ru.CellType=Xn,Ru.CellValueType=nr,Ru.CellValueDetailedType=rr,Ru.DetailedCellError=ii,Ru.ExportedCellChange=Co,Ru.ExportedNamedExpressionChange=Lo,Ru.ConfigValueTooBigError=ln,Ru.ConfigValueTooSmallError=an,Ru.EvaluationSuspendedError=un,Ru.ExpectedOneOfValuesError=cn,Ru.ExpectedValueOfTypeError=sn,Ru.ArraySize=ei,Ru.SimpleRangeValue=Ft,Ru.EmptyValue=bt,Ru.FunctionPlugin=qr,Ru.FunctionArgumentType=$r,Ru.FunctionPluginValidationError=pn,Ru.InvalidAddressError=Kt,Ru.InvalidArgumentsError=Gt,Ru.LanguageNotRegisteredError=mn,Ru.LanguageAlreadyRegisteredError=gn,Ru.MissingTranslationError=hn,Ru.NamedExpressionDoesNotExistError=$t,Ru.NamedExpressionNameIsAlreadyTakenError=Jt,Ru.NamedExpressionNameIsInvalidError=zt,Ru.NoOperationToRedoError=en,Ru.NoOperationToUndoError=qt,Ru.NoRelativeAddressesAllowedError=Mn,Ru.NoSheetWithIdError=Wt,Ru.NoSheetWithNameError=Xt,Ru.NotAFormulaError=Qt,Ru.NothingToPasteError=tn,Ru.ProtectedFunctionTranslationError=dn,Ru.SheetNameAlreadyTakenError=jt,Ru.SheetSizeLimitExceededError=Zt,Ru.SourceLocationHasArrayError=Rn,Ru.TargetLocationHasArrayError=yn,Ru.UnableToParseError=rn;const yu=ma.defaultConfig.language;ha.registerLanguage(yu,ya),ha.languages[ya.langCode]=ya;for(const Mu of Object.getOwnPropertyNames(s))Mu.startsWith("_")||ha.registerFunctionPlugin(s[Mu])},cc71:function(e,t,n){"use strict";var r=n("23e7"),i=n("857a"),s=n("af03");r({target:"String",proto:!0,forced:s("bold")},{bold:function(){return i(this,"b","","")}})},cef7:function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));n("14d9");var r=n("9f10"),i=n("81ea");class s extends r["a"]{constructor(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];super(e)}getHiddenIndexes(){return Object(i["arrayReduce"])(this.getValues(),(e,t,n)=>(t&&e.push(n),e),[])}}},cf1e:function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
  1138. //! moment.js locale configuration
  1139. var t={words:{ss:["sekunda","sekunde","sekundi"],m:["jedan minut","jednog minuta"],mm:["minut","minuta","minuta"],h:["jedan sat","jednog sata"],hh:["sat","sata","sati"],d:["jedan dan","jednog dana"],dd:["dan","dana","dana"],M:["jedan mesec","jednog meseca"],MM:["mesec","meseca","meseci"],y:["jednu godinu","jedne godine"],yy:["godinu","godine","godina"]},correctGrammaticalCase:function(e,t){return e%10>=1&&e%10<=4&&(e%100<10||e%100>=20)?e%10===1?t[0]:t[1]:t[2]},translate:function(e,n,r,i){var s,o=t.words[r];return 1===r.length?"y"===r&&n?"jedna godina":i||n?o[0]:o[1]:(s=t.correctGrammaticalCase(e,o),"yy"===r&&n&&"godinu"===s?e+" godina":e+" "+s)}},n=e.defineLocale("sr",{months:"januar_februar_mart_april_maj_jun_jul_avgust_septembar_oktobar_novembar_decembar".split("_"),monthsShort:"jan._feb._mar._apr._maj_jun_jul_avg._sep._okt._nov._dec.".split("_"),monthsParseExact:!0,weekdays:"nedelja_ponedeljak_utorak_sreda_četvrtak_petak_subota".split("_"),weekdaysShort:"ned._pon._uto._sre._čet._pet._sub.".split("_"),weekdaysMin:"ne_po_ut_sr_če_pe_su".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"D. M. YYYY.",LL:"D. MMMM YYYY.",LLL:"D. MMMM YYYY. H:mm",LLLL:"dddd, D. MMMM YYYY. H:mm"},calendar:{sameDay:"[danas u] LT",nextDay:"[sutra u] LT",nextWeek:function(){switch(this.day()){case 0:return"[u] [nedelju] [u] LT";case 3:return"[u] [sredu] [u] LT";case 6:return"[u] [subotu] [u] LT";case 1:case 2:case 4:case 5:return"[u] dddd [u] LT"}},lastDay:"[juče u] LT",lastWeek:function(){var e=["[prošle] [nedelje] [u] LT","[prošlog] [ponedeljka] [u] LT","[prošlog] [utorka] [u] LT","[prošle] [srede] [u] LT","[prošlog] [četvrtka] [u] LT","[prošlog] [petka] [u] LT","[prošle] [subote] [u] LT"];return e[this.day()]},sameElse:"L"},relativeTime:{future:"za %s",past:"pre %s",s:"nekoliko sekundi",ss:t.translate,m:t.translate,mm:t.translate,h:t.translate,hh:t.translate,d:t.translate,dd:t.translate,M:t.translate,MM:t.translate,y:t.translate,yy:t.translate},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:7}});return n}))},cf51:function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
  1140. //! moment.js locale configuration
  1141. var t=e.defineLocale("tzl",{months:"Januar_Fevraglh_Març_Avrïu_Mai_Gün_Julia_Guscht_Setemvar_Listopäts_Noemvar_Zecemvar".split("_"),monthsShort:"Jan_Fev_Mar_Avr_Mai_Gün_Jul_Gus_Set_Lis_Noe_Zec".split("_"),weekdays:"Súladi_Lúneçi_Maitzi_Márcuri_Xhúadi_Viénerçi_Sáturi".split("_"),weekdaysShort:"Súl_Lún_Mai_Már_Xhú_Vié_Sát".split("_"),weekdaysMin:"Sú_Lú_Ma_Má_Xh_Vi_Sá".split("_"),longDateFormat:{LT:"HH.mm",LTS:"HH.mm.ss",L:"DD.MM.YYYY",LL:"D. MMMM [dallas] YYYY",LLL:"D. MMMM [dallas] YYYY HH.mm",LLLL:"dddd, [li] D. MMMM [dallas] YYYY HH.mm"},meridiemParse:/d\'o|d\'a/i,isPM:function(e){return"d'o"===e.toLowerCase()},meridiem:function(e,t,n){return e>11?n?"d'o":"D'O":n?"d'a":"D'A"},calendar:{sameDay:"[oxhi à] LT",nextDay:"[demà à] LT",nextWeek:"dddd [à] LT",lastDay:"[ieiri à] LT",lastWeek:"[sür el] dddd [lasteu à] LT",sameElse:"L"},relativeTime:{future:"osprei %s",past:"ja%s",s:n,ss:n,m:n,mm:n,h:n,hh:n,d:n,dd:n,M:n,MM:n,y:n,yy:n},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}});function n(e,t,n,r){var i={s:["viensas secunds","'iensas secunds"],ss:[e+" secunds",e+" secunds"],m:["'n míut","'iens míut"],mm:[e+" míuts",e+" míuts"],h:["'n þora","'iensa þora"],hh:[e+" þoras",e+" þoras"],d:["'n ziua","'iensa ziua"],dd:[e+" ziuas",e+" ziuas"],M:["'n mes","'iens mes"],MM:[e+" mesen",e+" mesen"],y:["'n ar","'iens ar"],yy:[e+" ars",e+" ars"]};return r||t?i[n][0]:i[n][1]}return t}))},cf75:function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
  1142. //! moment.js locale configuration
  1143. var t="pagh_wa’_cha’_wej_loS_vagh_jav_Soch_chorgh_Hut".split("_");function n(e){var t=e;return t=-1!==e.indexOf("jaj")?t.slice(0,-3)+"leS":-1!==e.indexOf("jar")?t.slice(0,-3)+"waQ":-1!==e.indexOf("DIS")?t.slice(0,-3)+"nem":t+" pIq",t}function r(e){var t=e;return t=-1!==e.indexOf("jaj")?t.slice(0,-3)+"Hu’":-1!==e.indexOf("jar")?t.slice(0,-3)+"wen":-1!==e.indexOf("DIS")?t.slice(0,-3)+"ben":t+" ret",t}function i(e,t,n,r){var i=s(e);switch(n){case"ss":return i+" lup";case"mm":return i+" tup";case"hh":return i+" rep";case"dd":return i+" jaj";case"MM":return i+" jar";case"yy":return i+" DIS"}}function s(e){var n=Math.floor(e%1e3/100),r=Math.floor(e%100/10),i=e%10,s="";return n>0&&(s+=t[n]+"vatlh"),r>0&&(s+=(""!==s?" ":"")+t[r]+"maH"),i>0&&(s+=(""!==s?" ":"")+t[i]),""===s?"pagh":s}var o=e.defineLocale("tlh",{months:"tera’ jar wa’_tera’ jar cha’_tera’ jar wej_tera’ jar loS_tera’ jar vagh_tera’ jar jav_tera’ jar Soch_tera’ jar chorgh_tera’ jar Hut_tera’ jar wa’maH_tera’ jar wa’maH wa’_tera’ jar wa’maH cha’".split("_"),monthsShort:"jar wa’_jar cha’_jar wej_jar loS_jar vagh_jar jav_jar Soch_jar chorgh_jar Hut_jar wa’maH_jar wa’maH wa’_jar wa’maH cha’".split("_"),monthsParseExact:!0,weekdays:"lojmItjaj_DaSjaj_povjaj_ghItlhjaj_loghjaj_buqjaj_ghInjaj".split("_"),weekdaysShort:"lojmItjaj_DaSjaj_povjaj_ghItlhjaj_loghjaj_buqjaj_ghInjaj".split("_"),weekdaysMin:"lojmItjaj_DaSjaj_povjaj_ghItlhjaj_loghjaj_buqjaj_ghInjaj".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[DaHjaj] LT",nextDay:"[wa’leS] LT",nextWeek:"LLL",lastDay:"[wa’Hu’] LT",lastWeek:"LLL",sameElse:"L"},relativeTime:{future:n,past:r,s:"puS lup",ss:i,m:"wa’ tup",mm:i,h:"wa’ rep",hh:i,d:"wa’ jaj",dd:i,M:"wa’ jar",MM:i,y:"wa’ DIS",yy:i},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}});return o}))},d26a:function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
  1144. //! moment.js locale configuration
  1145. var t={1:"༡",2:"༢",3:"༣",4:"༤",5:"༥",6:"༦",7:"༧",8:"༨",9:"༩",0:"༠"},n={"༡":"1","༢":"2","༣":"3","༤":"4","༥":"5","༦":"6","༧":"7","༨":"8","༩":"9","༠":"0"},r=e.defineLocale("bo",{months:"ཟླ་བ་དང་པོ_ཟླ་བ་གཉིས་པ_ཟླ་བ་གསུམ་པ_ཟླ་བ་བཞི་པ_ཟླ་བ་ལྔ་པ_ཟླ་བ་དྲུག་པ_ཟླ་བ་བདུན་པ_ཟླ་བ་བརྒྱད་པ_ཟླ་བ་དགུ་པ_ཟླ་བ་བཅུ་པ_ཟླ་བ་བཅུ་གཅིག་པ_ཟླ་བ་བཅུ་གཉིས་པ".split("_"),monthsShort:"ཟླ་1_ཟླ་2_ཟླ་3_ཟླ་4_ཟླ་5_ཟླ་6_ཟླ་7_ཟླ་8_ཟླ་9_ཟླ་10_ཟླ་11_ཟླ་12".split("_"),monthsShortRegex:/^(ཟླ་\d{1,2})/,monthsParseExact:!0,weekdays:"གཟའ་ཉི་མ་_གཟའ་ཟླ་བ་_གཟའ་མིག་དམར་_གཟའ་ལྷག་པ་_གཟའ་ཕུར་བུ_གཟའ་པ་སངས་_གཟའ་སྤེན་པ་".split("_"),weekdaysShort:"ཉི་མ་_ཟླ་བ་_མིག་དམར་_ལྷག་པ་_ཕུར་བུ_པ་སངས་_སྤེན་པ་".split("_"),weekdaysMin:"ཉི_ཟླ_མིག_ལྷག_ཕུར_སངས_སྤེན".split("_"),longDateFormat:{LT:"A h:mm",LTS:"A h:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm",LLLL:"dddd, D MMMM YYYY, A h:mm"},calendar:{sameDay:"[དི་རིང] LT",nextDay:"[སང་ཉིན] LT",nextWeek:"[བདུན་ཕྲག་རྗེས་མ], LT",lastDay:"[ཁ་སང] LT",lastWeek:"[བདུན་ཕྲག་མཐའ་མ] dddd, LT",sameElse:"L"},relativeTime:{future:"%s ལ་",past:"%s སྔན་ལ",s:"ལམ་སང",ss:"%d སྐར་ཆ།",m:"སྐར་མ་གཅིག",mm:"%d སྐར་མ",h:"ཆུ་ཚོད་གཅིག",hh:"%d ཆུ་ཚོད",d:"ཉིན་གཅིག",dd:"%d ཉིན་",M:"ཟླ་བ་གཅིག",MM:"%d ཟླ་བ",y:"ལོ་གཅིག",yy:"%d ལོ"},preparse:function(e){return e.replace(/[༡༢༣༤༥༦༧༨༩༠]/g,(function(e){return n[e]}))},postformat:function(e){return e.replace(/\d/g,(function(e){return t[e]}))},meridiemParse:/མཚན་མོ|ཞོགས་ཀས|ཉིན་གུང|དགོང་དག|མཚན་མོ/,meridiemHour:function(e,t){return 12===e&&(e=0),"མཚན་མོ"===t&&e>=4||"ཉིན་གུང"===t&&e<5||"དགོང་དག"===t?e+12:e},meridiem:function(e,t,n){return e<4?"མཚན་མོ":e<10?"ཞོགས་ཀས":e<17?"ཉིན་གུང":e<20?"དགོང་དག":"མཚན་མོ"},week:{dow:0,doy:6}});return r}))},d2d4:function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
  1146. //! moment.js locale configuration
  1147. var t=e.defineLocale("pt-br",{months:"janeiro_fevereiro_março_abril_maio_junho_julho_agosto_setembro_outubro_novembro_dezembro".split("_"),monthsShort:"jan_fev_mar_abr_mai_jun_jul_ago_set_out_nov_dez".split("_"),weekdays:"domingo_segunda-feira_terça-feira_quarta-feira_quinta-feira_sexta-feira_sábado".split("_"),weekdaysShort:"dom_seg_ter_qua_qui_sex_sáb".split("_"),weekdaysMin:"do_2ª_3ª_4ª_5ª_6ª_sá".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D [de] MMMM [de] YYYY",LLL:"D [de] MMMM [de] YYYY [às] HH:mm",LLLL:"dddd, D [de] MMMM [de] YYYY [às] HH:mm"},calendar:{sameDay:"[Hoje às] LT",nextDay:"[Amanhã às] LT",nextWeek:"dddd [às] LT",lastDay:"[Ontem às] LT",lastWeek:function(){return 0===this.day()||6===this.day()?"[Último] dddd [às] LT":"[Última] dddd [às] LT"},sameElse:"L"},relativeTime:{future:"em %s",past:"há %s",s:"poucos segundos",ss:"%d segundos",m:"um minuto",mm:"%d minutos",h:"uma hora",hh:"%d horas",d:"um dia",dd:"%d dias",M:"um mês",MM:"%d meses",y:"um ano",yy:"%d anos"},dayOfMonthOrdinalParse:/\d{1,2}º/,ordinal:"%dº",invalidDate:"Data inválida"});return t}))},d3c5:function(e,t,n){"use strict";n.d(t,"a",(function(){return v}));n("d9e2"),n("14d9");var r=n("351d"),i=n("81ea"),s=n("24b5"),o=n("76ab"),a=n("491c"),l=n("3d76"),c=n("169f"),u=n("87d6");function h(e,t){m(e,t),t.add(e)}function d(e,t,n){m(e,t),t.set(e,n)}function m(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function g(e,t,n){return(t=p(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function p(e){var t=f(e,"string");return"symbol"==typeof t?t:t+""}function f(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function R(e,t){return e.get(y(e,t))}function y(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}const M=new Map([["plugin",s["c"]],["cell-type",o["c"]],["editor",a["d"]],["renderer",l["c"]],["validator",c["c"]]]),S="base",b=[];let w=null;var T=new WeakMap,O=new WeakSet;class v{static get PLUGIN_KEY(){return S}static get SETTING_KEYS(){return[this.PLUGIN_KEY]}constructor(e){h(this,O),g(this,"eventManager",new u["a"](this)),g(this,"pluginName",null),g(this,"pluginsInitializedCallbacks",[]),g(this,"isPluginsReady",!1),g(this,"enabled",!1),g(this,"initialized",!1),d(this,T,{}),Object(r["defineGetter"])(this,"hot",e,{writable:!1}),w=null,this.hot.addHook("afterPluginsInitialized",()=>this.onAfterPluginsInitialized()),this.hot.addHook("afterUpdateSettings",e=>this.onUpdateSettings(e)),this.hot.addHook("beforeInit",()=>this.init())}init(){this.pluginName=this.hot.getPluginName(this);const e=this.constructor.PLUGIN_DEPS,t=Array.isArray(e)?e:[];if(t.length>0){const e=[];if(t.forEach(t=>{const[n,r]=t.split(":");if(!M.has(n))throw new Error(`Unknown plugin dependency type "${n}" was found.`);M.get(n)(r)||e.push(` - ${r} (${n})`)}),e.length>0){const t=[`The ${this.pluginName} plugin requires the following modules:\n`,e.join("\n")+"\n"].join("");b.push(t)}}w||(w=Object(s["b"])()),w.indexOf("UndoRedo")>=0&&w.splice(w.indexOf("UndoRedo"),1),w.indexOf(this.pluginName)>=0&&w.splice(w.indexOf(this.pluginName),1),this.hot.addHookOnce("afterPluginsInitialized",()=>{this.isEnabled&&this.isEnabled()&&this.enablePlugin()});const n=0===w.length;if(n){if(b.length>0){const e=[b.join("\n")+"\n","You have to import and register them manually."].join("");throw new Error(e)}this.hot.runHooks("afterPluginsInitialized")}this.initialized=!0}enablePlugin(){this.enabled=!0}disablePlugin(){var e;null===(e=this.eventManager)||void 0===e||e.clear(),this.clearHooks(),this.enabled=!1}addHook(e,t,n){R(T,this)[e]=R(T,this)[e]||[];const r=R(T,this)[e];this.hot.addHook(e,t,n),r.push(t),R(T,this)[e]=r}removeHooks(e){Object(i["arrayEach"])(R(T,this)[e]||[],t=>{this.hot.removeHook(e,t)})}clearHooks(){const e=R(T,this);Object(r["objectEach"])(e,(e,t)=>this.removeHooks(t)),e.length=0}callOnPluginsReady(e){this.isPluginsReady?e():this.pluginsInitializedCallbacks.push(e)}onAfterPluginsInitialized(){Object(i["arrayEach"])(this.pluginsInitializedCallbacks,e=>e()),this.pluginsInitializedCallbacks.length=0,this.isPluginsReady=!0}onUpdateSettings(e){const t=y(O,this,E).call(this,e);this.isEnabled&&(this.enabled&&!this.isEnabled()&&this.disablePlugin(),!this.enabled&&this.isEnabled()&&this.enablePlugin(),this.enabled&&this.isEnabled()&&t&&this.updatePlugin(e))}updatePlugin(){}destroy(){var e;null===(e=this.eventManager)||void 0===e||e.destroy(),this.clearHooks(),Object(r["objectEach"])(this,(e,t)=>{"hot"!==t&&(this[t]=null)}),delete this.t,delete this.hot}}function E(e){if(!e)return!1;const t=this.constructor.SETTING_KEYS;if("boolean"===typeof t)return t;for(let n=0;n<t.length;n++)if(void 0!==e[t[n]])return!0;return!1}},d69a:function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
  1148. //! moment.js locale configuration
  1149. var t=e.defineLocale("fil",{months:"Enero_Pebrero_Marso_Abril_Mayo_Hunyo_Hulyo_Agosto_Setyembre_Oktubre_Nobyembre_Disyembre".split("_"),monthsShort:"Ene_Peb_Mar_Abr_May_Hun_Hul_Ago_Set_Okt_Nob_Dis".split("_"),weekdays:"Linggo_Lunes_Martes_Miyerkules_Huwebes_Biyernes_Sabado".split("_"),weekdaysShort:"Lin_Lun_Mar_Miy_Huw_Biy_Sab".split("_"),weekdaysMin:"Li_Lu_Ma_Mi_Hu_Bi_Sab".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"MM/D/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY HH:mm",LLLL:"dddd, MMMM DD, YYYY HH:mm"},calendar:{sameDay:"LT [ngayong araw]",nextDay:"[Bukas ng] LT",nextWeek:"LT [sa susunod na] dddd",lastDay:"LT [kahapon]",lastWeek:"LT [noong nakaraang] dddd",sameElse:"L"},relativeTime:{future:"sa loob ng %s",past:"%s ang nakalipas",s:"ilang segundo",ss:"%d segundo",m:"isang minuto",mm:"%d minuto",h:"isang oras",hh:"%d oras",d:"isang araw",dd:"%d araw",M:"isang buwan",MM:"%d buwan",y:"isang taon",yy:"%d taon"},dayOfMonthOrdinalParse:/\d{1,2}/,ordinal:function(e){return e},week:{dow:1,doy:4}});return t}))},d6b6:function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
  1150. //! moment.js locale configuration
  1151. var t=e.defineLocale("hy-am",{months:{format:"հունվարի_փետրվարի_մարտի_ապրիլի_մայիսի_հունիսի_հուլիսի_օգոստոսի_սեպտեմբերի_հոկտեմբերի_նոյեմբերի_դեկտեմբերի".split("_"),standalone:"հունվար_փետրվար_մարտ_ապրիլ_մայիս_հունիս_հուլիս_օգոստոս_սեպտեմբեր_հոկտեմբեր_նոյեմբեր_դեկտեմբեր".split("_")},monthsShort:"հնվ_փտր_մրտ_ապր_մյս_հնս_հլս_օգս_սպտ_հկտ_նմբ_դկտ".split("_"),weekdays:"կիրակի_երկուշաբթի_երեքշաբթի_չորեքշաբթի_հինգշաբթի_ուրբաթ_շաբաթ".split("_"),weekdaysShort:"կրկ_երկ_երք_չրք_հնգ_ուրբ_շբթ".split("_"),weekdaysMin:"կրկ_երկ_երք_չրք_հնգ_ուրբ_շբթ".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY թ.",LLL:"D MMMM YYYY թ., HH:mm",LLLL:"dddd, D MMMM YYYY թ., HH:mm"},calendar:{sameDay:"[այսօր] LT",nextDay:"[վաղը] LT",lastDay:"[երեկ] LT",nextWeek:function(){return"dddd [օրը ժամը] LT"},lastWeek:function(){return"[անցած] dddd [օրը ժամը] LT"},sameElse:"L"},relativeTime:{future:"%s հետո",past:"%s առաջ",s:"մի քանի վայրկյան",ss:"%d վայրկյան",m:"րոպե",mm:"%d րոպե",h:"ժամ",hh:"%d ժամ",d:"օր",dd:"%d օր",M:"ամիս",MM:"%d ամիս",y:"տարի",yy:"%d տարի"},meridiemParse:/գիշերվա|առավոտվա|ցերեկվա|երեկոյան/,isPM:function(e){return/^(ցերեկվա|երեկոյան)$/.test(e)},meridiem:function(e){return e<4?"գիշերվա":e<12?"առավոտվա":e<17?"ցերեկվա":"երեկոյան"},dayOfMonthOrdinalParse:/\d{1,2}|\d{1,2}-(ին|րդ)/,ordinal:function(e,t){switch(t){case"DDD":case"w":case"W":case"DDDo":return 1===e?e+"-ին":e+"-րդ";default:return e}},week:{dow:1,doy:7}});return t}))},d716:function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
  1152. //! moment.js locale configuration
  1153. var t=e.defineLocale("ca",{months:{standalone:"gener_febrer_març_abril_maig_juny_juliol_agost_setembre_octubre_novembre_desembre".split("_"),format:"de gener_de febrer_de març_d'abril_de maig_de juny_de juliol_d'agost_de setembre_d'octubre_de novembre_de desembre".split("_"),isFormat:/D[oD]?(\s)+MMMM/},monthsShort:"gen._febr._març_abr._maig_juny_jul._ag._set._oct._nov._des.".split("_"),monthsParseExact:!0,weekdays:"diumenge_dilluns_dimarts_dimecres_dijous_divendres_dissabte".split("_"),weekdaysShort:"dg._dl._dt._dc._dj._dv._ds.".split("_"),weekdaysMin:"dg_dl_dt_dc_dj_dv_ds".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM [de] YYYY",ll:"D MMM YYYY",LLL:"D MMMM [de] YYYY [a les] H:mm",lll:"D MMM YYYY, H:mm",LLLL:"dddd D MMMM [de] YYYY [a les] H:mm",llll:"ddd D MMM YYYY, H:mm"},calendar:{sameDay:function(){return"[avui a "+(1!==this.hours()?"les":"la")+"] LT"},nextDay:function(){return"[demà a "+(1!==this.hours()?"les":"la")+"] LT"},nextWeek:function(){return"dddd [a "+(1!==this.hours()?"les":"la")+"] LT"},lastDay:function(){return"[ahir a "+(1!==this.hours()?"les":"la")+"] LT"},lastWeek:function(){return"[el] dddd [passat a "+(1!==this.hours()?"les":"la")+"] LT"},sameElse:"L"},relativeTime:{future:"d'aquí %s",past:"fa %s",s:"uns segons",ss:"%d segons",m:"un minut",mm:"%d minuts",h:"una hora",hh:"%d hores",d:"un dia",dd:"%d dies",M:"un mes",MM:"%d mesos",y:"un any",yy:"%d anys"},dayOfMonthOrdinalParse:/\d{1,2}(r|n|t|è|a)/,ordinal:function(e,t){var n=1===e?"r":2===e?"n":3===e?"r":4===e?"t":"è";return"w"!==t&&"W"!==t||(n="a"),e+n},week:{dow:1,doy:4}});return t}))},d852:function(e,t,n){"use strict";n("d9e2"),n("14d9");var r=n("0716");function i(e,t,n){s(e,t),t.set(e,n)}function s(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function o(e,t,n){return(t=a(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function a(e){var t=l(e,"string");return"symbol"==typeof t?t:t+""}function l(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function c(e,t){return e.get(h(e,t))}function u(e,t,n){return e.set(h(e,t),n),n}function h(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}var d=new WeakMap;class m{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e,r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];o(this,"highlight",null),o(this,"from",null),o(this,"to",null),i(this,d,!1),this.highlight=e.clone(),this.from=t.clone(),this.to=n.clone(),u(d,this,r)}setHighlight(e){return this.highlight=e.clone(),this}setFrom(e){return this.from=e.clone(),this}setTo(e){return this.to=e.clone(),this}isValid(e){return this.from.isValid(e)&&this.to.isValid(e)}isSingle(){return this.isSingleCell()||this.isSingleHeader()}isSingleCell(){return this.from.row>=0&&this.from.row===this.to.row&&this.from.col>=0&&this.from.col===this.to.col}isSingleHeader(){return(this.from.row<0||this.from.col<0)&&this.from.row===this.to.row&&this.from.col===this.to.col}isHeader(){return!(!this.from.isHeader()||!this.to.isHeader())||(this.from.col<0&&this.to.col<0||this.from.row<0&&this.to.row<0)}containsHeaders(){return this.from.isHeader()||this.to.isHeader()}getOuterHeight(){return Math.max(this.from.row,this.to.row)-Math.min(this.from.row,this.to.row)+1}getOuterWidth(){return Math.max(this.from.col,this.to.col)-Math.min(this.from.col,this.to.col)+1}getHeight(){if(this.from.row<0&&this.to.row<0)return 0;const e=Math.max(this.from.row,0),t=Math.max(this.to.row,0);return Math.max(e,t)-Math.min(e,t)+1}getWidth(){if(this.from.col<0&&this.to.col<0)return 0;const e=Math.max(this.from.col,0),t=Math.max(this.to.col,0);return Math.max(e,t)-Math.min(e,t)+1}getCellsCount(){return this.getWidth()*this.getHeight()}includes(e){const{row:t,col:n}=e,r=this.getOuterTopStartCorner(),i=this.getOuterBottomEndCorner();return r.row<=t&&i.row>=t&&r.col<=n&&i.col>=n}includesRange(e){return this.includes(e.getOuterTopStartCorner())&&this.includes(e.getOuterBottomEndCorner())}isEqual(e){return Math.min(this.from.row,this.to.row)===Math.min(e.from.row,e.to.row)&&Math.max(this.from.row,this.to.row)===Math.max(e.from.row,e.to.row)&&Math.min(this.from.col,this.to.col)===Math.min(e.from.col,e.to.col)&&Math.max(this.from.col,this.to.col)===Math.max(e.from.col,e.to.col)}overlaps(e){return e.isSouthEastOf(this.getOuterTopLeftCorner())&&e.isNorthWestOf(this.getOuterBottomRightCorner())}isSouthEastOf(e){return this.getOuterTopLeftCorner().isSouthEastOf(e)||this.getOuterBottomRightCorner().isSouthEastOf(e)}isNorthWestOf(e){return this.getOuterTopLeftCorner().isNorthWestOf(e)||this.getOuterBottomRightCorner().isNorthWestOf(e)}isOverlappingHorizontally(e){return this.getOuterTopEndCorner().col>=e.getOuterTopStartCorner().col&&this.getOuterTopEndCorner().col<=e.getOuterTopEndCorner().col||this.getOuterTopStartCorner().col<=e.getOuterTopEndCorner().col&&this.getOuterTopStartCorner().col>=e.getOuterTopStartCorner().col}isOverlappingVertically(e){return this.getOuterBottomStartCorner().row>=e.getOuterTopRightCorner().row&&this.getOuterBottomStartCorner().row<=e.getOuterBottomStartCorner().row||this.getOuterTopEndCorner().row<=e.getOuterBottomStartCorner().row&&this.getOuterTopEndCorner().row>=e.getOuterTopRightCorner().row}expand(e){const t=this.getOuterTopStartCorner(),n=this.getOuterBottomEndCorner();return(e.row<t.row||e.col<t.col||e.row>n.row||e.col>n.col)&&(this.from=this._createCellCoords(Math.min(t.row,e.row),Math.min(t.col,e.col)),this.to=this._createCellCoords(Math.max(n.row,e.row),Math.max(n.col,e.col)),!0)}expandByRange(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(this.includesRange(e)||!this.overlaps(e))return!1;const n=this.getOuterTopStartCorner(),r=this.getOuterBottomEndCorner(),i=this.getDirection(),s=e.getOuterTopStartCorner(),o=e.getOuterBottomEndCorner(),a=Math.min(n.row,s.row),l=Math.min(n.col,s.col),c=Math.max(r.row,o.row),u=Math.max(r.col,o.col),h=this._createCellCoords(a,l),d=this._createCellCoords(c,u);return this.from=h,this.to=d,this.setDirection(i),t&&(this.highlight.row===this.getOuterBottomRightCorner().row&&"N-S"===this.getVerticalDirection()&&this.flipDirectionVertically(),this.highlight.col===this.getOuterTopRightCorner().col&&"W-E"===this.getHorizontalDirection()&&this.flipDirectionHorizontally()),!0}getDirection(){return this.from.isNorthWestOf(this.to)?"NW-SE":this.from.isNorthEastOf(this.to)?"NE-SW":this.from.isSouthEastOf(this.to)?"SE-NW":this.from.isSouthWestOf(this.to)?"SW-NE":void 0}setDirection(e){switch(e){case"NW-SE":[this.from,this.to]=[this.getOuterTopLeftCorner(),this.getOuterBottomRightCorner()];break;case"NE-SW":[this.from,this.to]=[this.getOuterTopRightCorner(),this.getOuterBottomLeftCorner()];break;case"SE-NW":[this.from,this.to]=[this.getOuterBottomRightCorner(),this.getOuterTopLeftCorner()];break;case"SW-NE":[this.from,this.to]=[this.getOuterBottomLeftCorner(),this.getOuterTopRightCorner()];break;default:break}}getVerticalDirection(){return["NE-SW","NW-SE"].indexOf(this.getDirection())>-1?"N-S":"S-N"}getHorizontalDirection(){return["NW-SE","SW-NE"].indexOf(this.getDirection())>-1?"W-E":"E-W"}flipDirectionVertically(){const e=this.getDirection();switch(e){case"NW-SE":this.setDirection("SW-NE");break;case"NE-SW":this.setDirection("SE-NW");break;case"SE-NW":this.setDirection("NE-SW");break;case"SW-NE":this.setDirection("NW-SE");break;default:break}}flipDirectionHorizontally(){const e=this.getDirection();switch(e){case"NW-SE":this.setDirection("NE-SW");break;case"NE-SW":this.setDirection("NW-SE");break;case"SE-NW":this.setDirection("SW-NE");break;case"SW-NE":this.setDirection("SE-NW");break;default:break}}getTopStartCorner(){return this._createCellCoords(Math.min(this.from.row,this.to.row),Math.min(this.from.col,this.to.col)).normalize()}getTopLeftCorner(){return c(d,this)?this.getTopEndCorner():this.getTopStartCorner()}getBottomEndCorner(){return this._createCellCoords(Math.max(this.from.row,this.to.row),Math.max(this.from.col,this.to.col)).normalize()}getBottomRightCorner(){return c(d,this)?this.getBottomStartCorner():this.getBottomEndCorner()}getTopEndCorner(){return this._createCellCoords(Math.min(this.from.row,this.to.row),Math.max(this.from.col,this.to.col)).normalize()}getTopRightCorner(){return c(d,this)?this.getTopStartCorner():this.getTopEndCorner()}getBottomStartCorner(){return this._createCellCoords(Math.max(this.from.row,this.to.row),Math.min(this.from.col,this.to.col)).normalize()}getBottomLeftCorner(){return c(d,this)?this.getBottomEndCorner():this.getBottomStartCorner()}getOuterTopStartCorner(){return this._createCellCoords(Math.min(this.from.row,this.to.row),Math.min(this.from.col,this.to.col))}getOuterTopLeftCorner(){return c(d,this)?this.getOuterTopEndCorner():this.getOuterTopStartCorner()}getOuterBottomEndCorner(){return this._createCellCoords(Math.max(this.from.row,this.to.row),Math.max(this.from.col,this.to.col))}getOuterBottomRightCorner(){return c(d,this)?this.getOuterBottomStartCorner():this.getOuterBottomEndCorner()}getOuterTopEndCorner(){return this._createCellCoords(Math.min(this.from.row,this.to.row),Math.max(this.from.col,this.to.col))}getOuterTopRightCorner(){return c(d,this)?this.getOuterTopStartCorner():this.getOuterTopEndCorner()}getOuterBottomStartCorner(){return this._createCellCoords(Math.max(this.from.row,this.to.row),Math.min(this.from.col,this.to.col))}getOuterBottomLeftCorner(){return c(d,this)?this.getOuterBottomEndCorner():this.getOuterBottomStartCorner()}isCorner(e){return e.isEqual(this.getOuterTopLeftCorner())||e.isEqual(this.getOuterTopRightCorner())||e.isEqual(this.getOuterBottomLeftCorner())||e.isEqual(this.getOuterBottomRightCorner())}getOppositeCorner(e){return e instanceof r["a"]&&(e.isEqual(this.getOuterBottomEndCorner())?this.getOuterTopStartCorner():e.isEqual(this.getOuterTopStartCorner())?this.getOuterBottomEndCorner():e.isEqual(this.getOuterTopEndCorner())?this.getOuterBottomStartCorner():e.isEqual(this.getOuterBottomStartCorner())?this.getOuterTopEndCorner():void 0)}getBordersSharedWith(e){if(!this.includesRange(e))return[];const t={top:Math.min(this.from.row,this.to.row),bottom:Math.max(this.from.row,this.to.row),left:Math.min(this.from.col,this.to.col),right:Math.max(this.from.col,this.to.col)},n={top:Math.min(e.from.row,e.to.row),bottom:Math.max(e.from.row,e.to.row),left:Math.min(e.from.col,e.to.col),right:Math.max(e.from.col,e.to.col)},r=[];return t.top===n.top&&r.push("top"),t.right===n.right&&r.push(c(d,this)?"left":"right"),t.bottom===n.bottom&&r.push("bottom"),t.left===n.left&&r.push(c(d,this)?"right":"left"),r}getInner(){const e=this.getOuterTopStartCorner(),t=this.getOuterBottomEndCorner(),n=[];for(let r=e.row;r<=t.row;r++)for(let i=e.col;i<=t.col;i++)this.from.row===r&&this.from.col===i||this.to.row===r&&this.to.col===i||n.push(this._createCellCoords(r,i));return n}getAll(){const e=this.getOuterTopStartCorner(),t=this.getOuterBottomEndCorner(),n=[];for(let r=e.row;r<=t.row;r++)for(let i=e.col;i<=t.col;i++)e.row===r&&e.col===i?n.push(e):t.row===r&&t.col===i?n.push(t):n.push(this._createCellCoords(r,i));return n}forAll(e){const t=this.getOuterTopStartCorner(),n=this.getOuterBottomEndCorner();for(let r=t.row;r<=n.row;r++)for(let i=t.col;i<=n.col;i++){const t=e(r,i);if(!1===t)return}}clone(){return new m(this.highlight,this.from,this.to,c(d,this))}toObject(){return{from:this.from.toObject(),to:this.to.toObject()}}_createCellCoords(e,t){return new r["a"](e,t,c(d,this))}}t["a"]=m},d9f8:function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
  1154. //! moment.js locale configuration
  1155. var t=e.defineLocale("fr-ca",{months:"janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre".split("_"),monthsShort:"janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.".split("_"),monthsParseExact:!0,weekdays:"dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi".split("_"),weekdaysShort:"dim._lun._mar._mer._jeu._ven._sam.".split("_"),weekdaysMin:"di_lu_ma_me_je_ve_sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY-MM-DD",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[Aujourd’hui à] LT",nextDay:"[Demain à] LT",nextWeek:"dddd [à] LT",lastDay:"[Hier à] LT",lastWeek:"dddd [dernier à] LT",sameElse:"L"},relativeTime:{future:"dans %s",past:"il y a %s",s:"quelques secondes",ss:"%d secondes",m:"une minute",mm:"%d minutes",h:"une heure",hh:"%d heures",d:"un jour",dd:"%d jours",M:"un mois",MM:"%d mois",y:"un an",yy:"%d ans"},dayOfMonthOrdinalParse:/\d{1,2}(er|e)/,ordinal:function(e,t){switch(t){default:case"M":case"Q":case"D":case"DDD":case"d":return e+(1===e?"er":"e");case"w":case"W":return e+(1===e?"re":"e")}}});return t}))},dad2:function(e,t,n){"use strict";var r=n("d066"),i=function(e){return{size:e,has:function(){return!1},keys:function(){return{next:function(){return{done:!0}}}}}};e.exports=function(e){var t=r("Set");try{(new t)[e](i(0));try{return(new t)[e](i(-1)),!1}catch(n){return!0}}catch(s){return!1}}},db29:function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
  1156. //! moment.js locale configuration
  1157. var t="jan._feb._mrt._apr._mei_jun._jul._aug._sep._okt._nov._dec.".split("_"),n="jan_feb_mrt_apr_mei_jun_jul_aug_sep_okt_nov_dec".split("_"),r=[/^jan/i,/^feb/i,/^(maart|mrt\.?)$/i,/^apr/i,/^mei$/i,/^jun[i.]?$/i,/^jul[i.]?$/i,/^aug/i,/^sep/i,/^okt/i,/^nov/i,/^dec/i],i=/^(januari|februari|maart|april|mei|ju[nl]i|augustus|september|oktober|november|december|jan\.?|feb\.?|mrt\.?|apr\.?|ju[nl]\.?|aug\.?|sep\.?|okt\.?|nov\.?|dec\.?)/i,s=e.defineLocale("nl-be",{months:"januari_februari_maart_april_mei_juni_juli_augustus_september_oktober_november_december".split("_"),monthsShort:function(e,r){return e?/-MMM-/.test(r)?n[e.month()]:t[e.month()]:t},monthsRegex:i,monthsShortRegex:i,monthsStrictRegex:/^(januari|februari|maart|april|mei|ju[nl]i|augustus|september|oktober|november|december)/i,monthsShortStrictRegex:/^(jan\.?|feb\.?|mrt\.?|apr\.?|mei|ju[nl]\.?|aug\.?|sep\.?|okt\.?|nov\.?|dec\.?)/i,monthsParse:r,longMonthsParse:r,shortMonthsParse:r,weekdays:"zondag_maandag_dinsdag_woensdag_donderdag_vrijdag_zaterdag".split("_"),weekdaysShort:"zo._ma._di._wo._do._vr._za.".split("_"),weekdaysMin:"zo_ma_di_wo_do_vr_za".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[vandaag om] LT",nextDay:"[morgen om] LT",nextWeek:"dddd [om] LT",lastDay:"[gisteren om] LT",lastWeek:"[afgelopen] dddd [om] LT",sameElse:"L"},relativeTime:{future:"over %s",past:"%s geleden",s:"een paar seconden",ss:"%d seconden",m:"één minuut",mm:"%d minuten",h:"één uur",hh:"%d uur",d:"één dag",dd:"%d dagen",M:"één maand",MM:"%d maanden",y:"één jaar",yy:"%d jaar"},dayOfMonthOrdinalParse:/\d{1,2}(ste|de)/,ordinal:function(e){return e+(1===e||8===e||e>=20?"ste":"de")},week:{dow:1,doy:4}});return s}))},dc19:function(e,t,n){"use strict";var r=n("cb27").has;e.exports=function(e){return r(e),e}},dc4d:function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
  1158. //! moment.js locale configuration
  1159. var t={1:"१",2:"२",3:"३",4:"४",5:"५",6:"६",7:"७",8:"८",9:"९",0:"०"},n={"१":"1","२":"2","३":"3","४":"4","५":"5","६":"6","७":"7","८":"8","९":"9","०":"0"},r=[/^जन/i,/^फ़र|फर/i,/^मार्च/i,/^अप्रै/i,/^मई/i,/^जून/i,/^जुल/i,/^अग/i,/^सितं|सित/i,/^अक्टू/i,/^नव|नवं/i,/^दिसं|दिस/i],i=[/^जन/i,/^फ़र/i,/^मार्च/i,/^अप्रै/i,/^मई/i,/^जून/i,/^जुल/i,/^अग/i,/^सित/i,/^अक्टू/i,/^नव/i,/^दिस/i],s=e.defineLocale("hi",{months:{format:"जनवरी_फ़रवरी_मार्च_अप्रैल_मई_जून_जुलाई_अगस्त_सितम्बर_अक्टूबर_नवम्बर_दिसम्बर".split("_"),standalone:"जनवरी_फरवरी_मार्च_अप्रैल_मई_जून_जुलाई_अगस्त_सितंबर_अक्टूबर_नवंबर_दिसंबर".split("_")},monthsShort:"जन._फ़र._मार्च_अप्रै._मई_जून_जुल._अग._सित._अक्टू._नव._दिस.".split("_"),weekdays:"रविवार_सोमवार_मंगलवार_बुधवार_गुरूवार_शुक्रवार_शनिवार".split("_"),weekdaysShort:"रवि_सोम_मंगल_बुध_गुरू_शुक्र_शनि".split("_"),weekdaysMin:"र_सो_मं_बु_गु_शु_श".split("_"),longDateFormat:{LT:"A h:mm बजे",LTS:"A h:mm:ss बजे",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm बजे",LLLL:"dddd, D MMMM YYYY, A h:mm बजे"},monthsParse:r,longMonthsParse:r,shortMonthsParse:i,monthsRegex:/^(जनवरी|जन\.?|फ़रवरी|फरवरी|फ़र\.?|मार्च?|अप्रैल|अप्रै\.?|मई?|जून?|जुलाई|जुल\.?|अगस्त|अग\.?|सितम्बर|सितंबर|सित\.?|अक्टूबर|अक्टू\.?|नवम्बर|नवंबर|नव\.?|दिसम्बर|दिसंबर|दिस\.?)/i,monthsShortRegex:/^(जनवरी|जन\.?|फ़रवरी|फरवरी|फ़र\.?|मार्च?|अप्रैल|अप्रै\.?|मई?|जून?|जुलाई|जुल\.?|अगस्त|अग\.?|सितम्बर|सितंबर|सित\.?|अक्टूबर|अक्टू\.?|नवम्बर|नवंबर|नव\.?|दिसम्बर|दिसंबर|दिस\.?)/i,monthsStrictRegex:/^(जनवरी?|फ़रवरी|फरवरी?|मार्च?|अप्रैल?|मई?|जून?|जुलाई?|अगस्त?|सितम्बर|सितंबर|सित?\.?|अक्टूबर|अक्टू\.?|नवम्बर|नवंबर?|दिसम्बर|दिसंबर?)/i,monthsShortStrictRegex:/^(जन\.?|फ़र\.?|मार्च?|अप्रै\.?|मई?|जून?|जुल\.?|अग\.?|सित\.?|अक्टू\.?|नव\.?|दिस\.?)/i,calendar:{sameDay:"[आज] LT",nextDay:"[कल] LT",nextWeek:"dddd, LT",lastDay:"[कल] LT",lastWeek:"[पिछले] dddd, LT",sameElse:"L"},relativeTime:{future:"%s में",past:"%s पहले",s:"कुछ ही क्षण",ss:"%d सेकंड",m:"एक मिनट",mm:"%d मिनट",h:"एक घंटा",hh:"%d घंटे",d:"एक दिन",dd:"%d दिन",M:"एक महीने",MM:"%d महीने",y:"एक वर्ष",yy:"%d वर्ष"},preparse:function(e){return e.replace(/[१२३४५६७८९०]/g,(function(e){return n[e]}))},postformat:function(e){return e.replace(/\d/g,(function(e){return t[e]}))},meridiemParse:/रात|सुबह|दोपहर|शाम/,meridiemHour:function(e,t){return 12===e&&(e=0),"रात"===t?e<4?e:e+12:"सुबह"===t?e:"दोपहर"===t?e>=10?e:e+12:"शाम"===t?e+12:void 0},meridiem:function(e,t,n){return e<4?"रात":e<10?"सुबह":e<17?"दोपहर":e<20?"शाम":"रात"},week:{dow:0,doy:6}});return s}))},dd49:function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n("a357"),i=n("5d7f"),s=n("7b9c");const o="text";function a(e,t,n,o,a,l,c){r["a"].apply(this,[e,t,n,o,a,l,c]);let u=l;if(!u&&c.placeholder&&(u=c.placeholder),u=Object(s["stringify"])(u),c.trimWhitespace&&(u=u.trim()),c.rendererTemplate){Object(i["empty"])(t);const r=e.rootDocument.createElement("TEMPLATE");r.setAttribute("bind","{{}}"),r.innerHTML=c.rendererTemplate,HTMLTemplateElement.decorate(r),r.model=e.getSourceDataAtRow(n),t.appendChild(r)}else Object(i["fastInnerText"])(t,u)}a.RENDERER_TYPE=o},de3b:function(e,t,n){"use strict";function r(e){e.isImmediatePropagationEnabled=!1,e.cancelBubble=!0}function i(e){return!1===e.isImmediatePropagationEnabled}function s(e){return 2===e.button}function o(e){return 0===e.button}function a(e){return e instanceof TouchEvent}function l(e,t){const n={x:e.offsetX,y:e.offsetY};let r=e.target;if(!(t instanceof HTMLElement)||r!==t&&r.contains(t))return n;while(r!==t)n.x+=r.offsetLeft,n.y+=r.offsetTop,r=r.offsetParent;return n}n.r(t),n.d(t,"stopImmediatePropagation",(function(){return r})),n.d(t,"isImmediatePropagationStopped",(function(){return i})),n.d(t,"isRightClick",(function(){return s})),n.d(t,"isLeftClick",(function(){return o})),n.d(t,"isTouchEvent",(function(){return a})),n.d(t,"offsetRelativeTo",(function(){return l}))},dfa2:function(e,t,n){},e0c5:function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
  1160. //! moment.js locale configuration
  1161. var t={1:"૧",2:"૨",3:"૩",4:"૪",5:"૫",6:"૬",7:"૭",8:"૮",9:"૯",0:"૦"},n={"૧":"1","૨":"2","૩":"3","૪":"4","૫":"5","૬":"6","૭":"7","૮":"8","૯":"9","૦":"0"},r=e.defineLocale("gu",{months:"જાન્યુઆરી_ફેબ્રુઆરી_માર્ચ_એપ્રિલ_મે_જૂન_જુલાઈ_ઑગસ્ટ_સપ્ટેમ્બર_ઑક્ટ્બર_નવેમ્બર_ડિસેમ્બર".split("_"),monthsShort:"જાન્યુ._ફેબ્રુ._માર્ચ_એપ્રિ._મે_જૂન_જુલા._ઑગ._સપ્ટે._ઑક્ટ્._નવે._ડિસે.".split("_"),monthsParseExact:!0,weekdays:"રવિવાર_સોમવાર_મંગળવાર_બુધ્વાર_ગુરુવાર_શુક્રવાર_શનિવાર".split("_"),weekdaysShort:"રવિ_સોમ_મંગળ_બુધ્_ગુરુ_શુક્ર_શનિ".split("_"),weekdaysMin:"ર_સો_મં_બુ_ગુ_શુ_શ".split("_"),longDateFormat:{LT:"A h:mm વાગ્યે",LTS:"A h:mm:ss વાગ્યે",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm વાગ્યે",LLLL:"dddd, D MMMM YYYY, A h:mm વાગ્યે"},calendar:{sameDay:"[આજ] LT",nextDay:"[કાલે] LT",nextWeek:"dddd, LT",lastDay:"[ગઇકાલે] LT",lastWeek:"[પાછલા] dddd, LT",sameElse:"L"},relativeTime:{future:"%s મા",past:"%s પહેલા",s:"અમુક પળો",ss:"%d સેકંડ",m:"એક મિનિટ",mm:"%d મિનિટ",h:"એક કલાક",hh:"%d કલાક",d:"એક દિવસ",dd:"%d દિવસ",M:"એક મહિનો",MM:"%d મહિનો",y:"એક વર્ષ",yy:"%d વર્ષ"},preparse:function(e){return e.replace(/[૧૨૩૪૫૬૭૮૯૦]/g,(function(e){return n[e]}))},postformat:function(e){return e.replace(/\d/g,(function(e){return t[e]}))},meridiemParse:/રાત|બપોર|સવાર|સાંજ/,meridiemHour:function(e,t){return 12===e&&(e=0),"રાત"===t?e<4?e:e+12:"સવાર"===t?e:"બપોર"===t?e>=10?e:e+12:"સાંજ"===t?e+12:void 0},meridiem:function(e,t,n){return e<4?"રાત":e<10?"સવાર":e<17?"બપોર":e<20?"સાંજ":"રાત"},week:{dow:0,doy:6}});return r}))},e1d3:function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
  1162. //! moment.js locale configuration
  1163. var t=e.defineLocale("en-ie",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(e){var t=e%10,n=1===~~(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th";return e+n},week:{dow:1,doy:4}});return t}))},e20c:function(e,t,n){"use strict";var r=n("23e7"),i=n("da84"),s=n("2cf4").clear;r({global:!0,bind:!0,enumerable:!0,forced:i.clearImmediate!==s},{clearImmediate:s})},e437:function(e,t,n){"use strict";var r=n("c0d8"),i=n("8c7e"),s=n("87d6"),o=n("c5cd");n("d9e2");function a(e){const t="undefined"!==typeof window&&window.jQuery;t&&(t.fn.handsontable=function(t){const n=this.first();let r,i=n.data("handsontable");if("string"!==typeof t){const r=t||{};return i?i.updateSettings(r):(i=new e.Core(n[0],r),n.data("handsontable",i),i.init()),n}if(i){if("undefined"===typeof i[t])throw new Error("Handsontable do not provide action: "+t);for(var s=arguments.length,o=new Array(s>1?s-1:0),a=1;a<s;a++)o[a-1]=arguments[a];r=i[t].call(i,...o),"destroy"===t&&n.removeData()}return r})}var l,c,u,h,d,m=n("220a"),g=n("a776"),p=n("81ea"),f=n("63d8"),R=n("480c"),y=n("3eb5"),M=n("7dd0"),S=n("97b9"),b=n("7b9c"),w=n("ffec"),T=n("351d"),O=n("29b0"),v=n("f938"),E=n("5d7f"),C=n("de3b"),L=n("491c"),N=n("3d76"),_=n("169f"),I=n("76ab"),P=n("24b5"),x=n("d3c5");Object(i["a"])(),a(r["a"]),r["a"].__GhostTable=m["a"],r["a"]._getListenersCounter=s["b"],r["a"]._getRegisteredMapsCounter=o["b"],r["a"].EventManager=s["a"];const D=[p,f,R,y,M,S,b,w,T,O,v,g],A=[E,C];r["a"].helper={},r["a"].dom={},p["arrayEach"](D,e=>{p["arrayEach"](Object.getOwnPropertyNames(e),t=>{"_"!==t.charAt(0)&&(r["a"].helper[t]=e[t])})}),p["arrayEach"](A,e=>{p["arrayEach"](Object.getOwnPropertyNames(e),t=>{"_"!==t.charAt(0)&&(r["a"].dom[t]=e[t])})}),r["a"].cellTypes=null!==(l=r["a"].cellTypes)&&void 0!==l?l:{},p["arrayEach"](Object(I["b"])(),e=>{r["a"].cellTypes[e]=Object(I["a"])(e)}),r["a"].cellTypes.registerCellType=I["d"],r["a"].cellTypes.getCellType=I["a"],r["a"].editors=null!==(c=r["a"].editors)&&void 0!==c?c:{},p["arrayEach"](Object(L["c"])(),e=>{r["a"].editors[O["toUpperCaseFirst"](e)+"Editor"]=Object(L["a"])(e)}),r["a"].editors.registerEditor=L["e"],r["a"].editors.getEditor=L["a"],r["a"].renderers=null!==(u=r["a"].renderers)&&void 0!==u?u:{},p["arrayEach"](Object(N["a"])(),e=>{const t=Object(N["b"])(e);"base"===e&&(r["a"].renderers.cellDecorator=t),r["a"].renderers[O["toUpperCaseFirst"](e)+"Renderer"]=t}),r["a"].renderers.registerRenderer=N["d"],r["a"].renderers.getRenderer=N["b"],r["a"].validators=null!==(h=r["a"].validators)&&void 0!==h?h:{},p["arrayEach"](Object(_["a"])(),e=>{r["a"].validators[O["toUpperCaseFirst"](e)+"Validator"]=Object(_["b"])(e)}),r["a"].validators.registerValidator=_["d"],r["a"].validators.getValidator=_["b"],r["a"].plugins=null!==(d=r["a"].plugins)&&void 0!==d?d:{},p["arrayEach"](Object(P["b"])(),e=>{r["a"].plugins[e]=Object(P["a"])(e)}),r["a"].plugins[O["toUpperCaseFirst"](x["a"].PLUGIN_KEY)+"Plugin"]=x["a"],r["a"].plugins.registerPlugin=P["d"],r["a"].plugins.getPlugin=P["a"];t["a"]=r["a"]},e81d:function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
  1164. //! moment.js locale configuration
  1165. var t={1:"១",2:"២",3:"៣",4:"៤",5:"៥",6:"៦",7:"៧",8:"៨",9:"៩",0:"០"},n={"១":"1","២":"2","៣":"3","៤":"4","៥":"5","៦":"6","៧":"7","៨":"8","៩":"9","០":"0"},r=e.defineLocale("km",{months:"មករា_កុម្ភៈ_មីនា_មេសា_ឧសភា_មិថុនា_កក្កដា_សីហា_កញ្ញា_តុលា_វិច្ឆិកា_ធ្នូ".split("_"),monthsShort:"មករា_កុម្ភៈ_មីនា_មេសា_ឧសភា_មិថុនា_កក្កដា_សីហា_កញ្ញា_តុលា_វិច្ឆិកា_ធ្នូ".split("_"),weekdays:"អាទិត្យ_ច័ន្ទ_អង្គារ_ពុធ_ព្រហស្បតិ៍_សុក្រ_សៅរ៍".split("_"),weekdaysShort:"អា_ច_អ_ព_ព្រ_សុ_ស".split("_"),weekdaysMin:"អា_ច_អ_ព_ព្រ_សុ_ស".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},meridiemParse:/ព្រឹក|ល្ងាច/,isPM:function(e){return"ល្ងាច"===e},meridiem:function(e,t,n){return e<12?"ព្រឹក":"ល្ងាច"},calendar:{sameDay:"[ថ្ងៃនេះ ម៉ោង] LT",nextDay:"[ស្អែក ម៉ោង] LT",nextWeek:"dddd [ម៉ោង] LT",lastDay:"[ម្សិលមិញ ម៉ោង] LT",lastWeek:"dddd [សប្តាហ៍មុន] [ម៉ោង] LT",sameElse:"L"},relativeTime:{future:"%sទៀត",past:"%sមុន",s:"ប៉ុន្មានវិនាទី",ss:"%d វិនាទី",m:"មួយនាទី",mm:"%d នាទី",h:"មួយម៉ោង",hh:"%d ម៉ោង",d:"មួយថ្ងៃ",dd:"%d ថ្ងៃ",M:"មួយខែ",MM:"%d ខែ",y:"មួយឆ្នាំ",yy:"%d ឆ្នាំ"},dayOfMonthOrdinalParse:/ទី\d{1,2}/,ordinal:"ទី%d",preparse:function(e){return e.replace(/[១២៣៤៥៦៧៨៩០]/g,(function(e){return n[e]}))},postformat:function(e){return e.replace(/\d/g,(function(e){return t[e]}))},week:{dow:1,doy:4}});return r}))},e90f:function(e,t,n){"use strict";n.d(t,"a",(function(){return s})),n.d(t,"b",(function(){return o}));var r=n("97b9"),i=n("81ea");function s(e,t,n,i){const s=n.length?n[0]:void 0;return[...e.slice(0,s),...n.map((e,t)=>Object(r["isFunction"])(i)?i(e,t):i),...void 0===s?[]:e.slice(s)]}function o(e,t){return Object(i["arrayFilter"])(e,(e,n)=>!1===t.includes(n))}},e97c:function(e,t,n){"use strict";n("c40d")},e9bc:function(e,t,n){"use strict";var r=n("dc19"),i=n("cb27").add,s=n("83b9e"),o=n("7f65"),a=n("5388");e.exports=function(e){var t=r(this),n=o(e).getIterator(),l=s(t);return a(n,(function(e){i(l,e)})),l}},eb36:function(e,t,n){"use strict";n.d(t,"a",(function(){return a})),n.d(t,"b",(function(){return l}));n("d9e2"),n("14d9");var r=n("5714");function i(e,t,n){return(t=s(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function s(e){var t=o(e,"string");return"symbol"==typeof t?t:t+""}function o(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}const a=23;class l extends r["a"]{constructor(e){let{calculationTypes:t,viewportHeight:n,scrollOffset:r,totalRows:s,rowHeightFn:o,overrideFn:a,horizontalScrollbarHeight:l}=e;super(t),i(this,"viewportHeight",0),i(this,"scrollOffset",0),i(this,"zeroBasedScrollOffset",0),i(this,"totalRows",0),i(this,"rowHeightFn",null),i(this,"rowHeight",0),i(this,"overrideFn",null),i(this,"horizontalScrollbarHeight",0),i(this,"innerViewportHeight",0),i(this,"totalCalculatedHeight",0),i(this,"startPositions",[]),i(this,"needReverse",!0),this.viewportHeight=n,this.scrollOffset=r,this.zeroBasedScrollOffset=Math.max(r,0),this.totalRows=s,this.rowHeightFn=o,this.overrideFn=a,this.horizontalScrollbarHeight=null!==l&&void 0!==l?l:0,this.innerViewportHeight=this.zeroBasedScrollOffset+this.viewportHeight-this.horizontalScrollbarHeight,this.calculate()}calculate(){this._initialize(this);for(let e=0;e<this.totalRows;e++)if(this.rowHeight=this.getRowHeight(e),this._process(e,this),this.startPositions.push(this.totalCalculatedHeight),this.totalCalculatedHeight+=this.rowHeight,this.totalCalculatedHeight>=this.innerViewportHeight){this.needReverse=!1;break}this._finalize(this)}getRowHeight(e){const t=this.rowHeightFn(e);return isNaN(t)?a:t}}},ebe4:function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
  1166. //! moment.js locale configuration
  1167. var t=e.defineLocale("ms",{months:"Januari_Februari_Mac_April_Mei_Jun_Julai_Ogos_September_Oktober_November_Disember".split("_"),monthsShort:"Jan_Feb_Mac_Apr_Mei_Jun_Jul_Ogs_Sep_Okt_Nov_Dis".split("_"),weekdays:"Ahad_Isnin_Selasa_Rabu_Khamis_Jumaat_Sabtu".split("_"),weekdaysShort:"Ahd_Isn_Sel_Rab_Kha_Jum_Sab".split("_"),weekdaysMin:"Ah_Is_Sl_Rb_Km_Jm_Sb".split("_"),longDateFormat:{LT:"HH.mm",LTS:"HH.mm.ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY [pukul] HH.mm",LLLL:"dddd, D MMMM YYYY [pukul] HH.mm"},meridiemParse:/pagi|tengahari|petang|malam/,meridiemHour:function(e,t){return 12===e&&(e=0),"pagi"===t?e:"tengahari"===t?e>=11?e:e+12:"petang"===t||"malam"===t?e+12:void 0},meridiem:function(e,t,n){return e<11?"pagi":e<15?"tengahari":e<19?"petang":"malam"},calendar:{sameDay:"[Hari ini pukul] LT",nextDay:"[Esok pukul] LT",nextWeek:"dddd [pukul] LT",lastDay:"[Kelmarin pukul] LT",lastWeek:"dddd [lepas pukul] LT",sameElse:"L"},relativeTime:{future:"dalam %s",past:"%s yang lepas",s:"beberapa saat",ss:"%d saat",m:"seminit",mm:"%d minit",h:"sejam",hh:"%d jam",d:"sehari",dd:"%d hari",M:"sebulan",MM:"%d bulan",y:"setahun",yy:"%d tahun"},week:{dow:1,doy:7}});return t}))},ec18:function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
  1168. //! moment.js locale configuration
  1169. function t(e,t,n,r){var i={s:["mõne sekundi","mõni sekund","paar sekundit"],ss:[e+"sekundi",e+"sekundit"],m:["ühe minuti","üks minut"],mm:[e+" minuti",e+" minutit"],h:["ühe tunni","tund aega","üks tund"],hh:[e+" tunni",e+" tundi"],d:["ühe päeva","üks päev"],M:["kuu aja","kuu aega","üks kuu"],MM:[e+" kuu",e+" kuud"],y:["ühe aasta","aasta","üks aasta"],yy:[e+" aasta",e+" aastat"]};return t?i[n][2]?i[n][2]:i[n][1]:r?i[n][0]:i[n][1]}var n=e.defineLocale("et",{months:"jaanuar_veebruar_märts_aprill_mai_juuni_juuli_august_september_oktoober_november_detsember".split("_"),monthsShort:"jaan_veebr_märts_apr_mai_juuni_juuli_aug_sept_okt_nov_dets".split("_"),weekdays:"pühapäev_esmaspäev_teisipäev_kolmapäev_neljapäev_reede_laupäev".split("_"),weekdaysShort:"P_E_T_K_N_R_L".split("_"),weekdaysMin:"P_E_T_K_N_R_L".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm",LLLL:"dddd, D. MMMM YYYY H:mm"},calendar:{sameDay:"[Täna,] LT",nextDay:"[Homme,] LT",nextWeek:"[Järgmine] dddd LT",lastDay:"[Eile,] LT",lastWeek:"[Eelmine] dddd LT",sameElse:"L"},relativeTime:{future:"%s pärast",past:"%s tagasi",s:t,ss:t,m:t,mm:t,h:t,hh:t,d:t,dd:"%d päeva",M:t,MM:t,y:t,yy:t},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}});return n}))},ec2e:function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
  1170. //! moment.js locale configuration
  1171. var t=e.defineLocale("en-in",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY h:mm A",LLLL:"dddd, D MMMM YYYY h:mm A"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(e){var t=e%10,n=1===~~(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th";return e+n},week:{dow:0,doy:6}});return t}))},eda5:function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
  1172. //! moment.js locale configuration
  1173. var t=e.defineLocale("si",{months:"ජනවාරි_පෙබරවාරි_මාර්තු_අප්‍රේල්_මැයි_ජූනි_ජූලි_අගෝස්තු_සැප්තැම්බර්_ඔක්තෝබර්_නොවැම්බර්_දෙසැම්බර්".split("_"),monthsShort:"ජන_පෙබ_මාර්_අප්_මැයි_ජූනි_ජූලි_අගෝ_සැප්_ඔක්_නොවැ_දෙසැ".split("_"),weekdays:"ඉරිදා_සඳුදා_අඟහරුවාදා_බදාදා_බ්‍රහස්පතින්දා_සිකුරාදා_සෙනසුරාදා".split("_"),weekdaysShort:"ඉරි_සඳු_අඟ_බදා_බ්‍රහ_සිකු_සෙන".split("_"),weekdaysMin:"ඉ_ස_අ_බ_බ්‍ර_සි_සෙ".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"a h:mm",LTS:"a h:mm:ss",L:"YYYY/MM/DD",LL:"YYYY MMMM D",LLL:"YYYY MMMM D, a h:mm",LLLL:"YYYY MMMM D [වැනි] dddd, a h:mm:ss"},calendar:{sameDay:"[අද] LT[ට]",nextDay:"[හෙට] LT[ට]",nextWeek:"dddd LT[ට]",lastDay:"[ඊයේ] LT[ට]",lastWeek:"[පසුගිය] dddd LT[ට]",sameElse:"L"},relativeTime:{future:"%sකින්",past:"%sකට පෙර",s:"තත්පර කිහිපය",ss:"තත්පර %d",m:"මිනිත්තුව",mm:"මිනිත්තු %d",h:"පැය",hh:"පැය %d",d:"දිනය",dd:"දින %d",M:"මාසය",MM:"මාස %d",y:"වසර",yy:"වසර %d"},dayOfMonthOrdinalParse:/\d{1,2} වැනි/,ordinal:function(e){return e+" වැනි"},meridiemParse:/පෙර වරු|පස් වරු|පෙ.ව|ප.ව./,isPM:function(e){return"ප.ව."===e||"පස් වරු"===e},meridiem:function(e,t,n){return e>11?n?"ප.ව.":"පස් වරු":n?"පෙ.ව.":"පෙර වරු"}});return t}))},ef07:function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n("0352"),i=n("dd49");const s="text",o={CELL_TYPE:s,editor:r["a"],renderer:i["a"]}},f260:function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
  1174. //! moment.js locale configuration
  1175. var t=e.defineLocale("pt",{months:"janeiro_fevereiro_março_abril_maio_junho_julho_agosto_setembro_outubro_novembro_dezembro".split("_"),monthsShort:"jan_fev_mar_abr_mai_jun_jul_ago_set_out_nov_dez".split("_"),weekdays:"Domingo_Segunda-feira_Terça-feira_Quarta-feira_Quinta-feira_Sexta-feira_Sábado".split("_"),weekdaysShort:"Dom_Seg_Ter_Qua_Qui_Sex_Sáb".split("_"),weekdaysMin:"Do_2ª_3ª_4ª_5ª_6ª_Sá".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D [de] MMMM [de] YYYY",LLL:"D [de] MMMM [de] YYYY HH:mm",LLLL:"dddd, D [de] MMMM [de] YYYY HH:mm"},calendar:{sameDay:"[Hoje às] LT",nextDay:"[Amanhã às] LT",nextWeek:"dddd [às] LT",lastDay:"[Ontem às] LT",lastWeek:function(){return 0===this.day()||6===this.day()?"[Último] dddd [às] LT":"[Última] dddd [às] LT"},sameElse:"L"},relativeTime:{future:"em %s",past:"há %s",s:"segundos",ss:"%d segundos",m:"um minuto",mm:"%d minutos",h:"uma hora",hh:"%d horas",d:"um dia",dd:"%d dias",w:"uma semana",ww:"%d semanas",M:"um mês",MM:"%d meses",y:"um ano",yy:"%d anos"},dayOfMonthOrdinalParse:/\d{1,2}º/,ordinal:"%dº",week:{dow:1,doy:4}});return t}))},f3ff:function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
  1176. //! moment.js locale configuration
  1177. var t={1:"੧",2:"੨",3:"੩",4:"੪",5:"੫",6:"੬",7:"੭",8:"੮",9:"੯",0:"੦"},n={"੧":"1","੨":"2","੩":"3","੪":"4","੫":"5","੬":"6","੭":"7","੮":"8","੯":"9","੦":"0"},r=e.defineLocale("pa-in",{months:"ਜਨਵਰੀ_ਫ਼ਰਵਰੀ_ਮਾਰਚ_ਅਪ੍ਰੈਲ_ਮਈ_ਜੂਨ_ਜੁਲਾਈ_ਅਗਸਤ_ਸਤੰਬਰ_ਅਕਤੂਬਰ_ਨਵੰਬਰ_ਦਸੰਬਰ".split("_"),monthsShort:"ਜਨਵਰੀ_ਫ਼ਰਵਰੀ_ਮਾਰਚ_ਅਪ੍ਰੈਲ_ਮਈ_ਜੂਨ_ਜੁਲਾਈ_ਅਗਸਤ_ਸਤੰਬਰ_ਅਕਤੂਬਰ_ਨਵੰਬਰ_ਦਸੰਬਰ".split("_"),weekdays:"ਐਤਵਾਰ_ਸੋਮਵਾਰ_ਮੰਗਲਵਾਰ_ਬੁਧਵਾਰ_ਵੀਰਵਾਰ_ਸ਼ੁੱਕਰਵਾਰ_ਸ਼ਨੀਚਰਵਾਰ".split("_"),weekdaysShort:"ਐਤ_ਸੋਮ_ਮੰਗਲ_ਬੁਧ_ਵੀਰ_ਸ਼ੁਕਰ_ਸ਼ਨੀ".split("_"),weekdaysMin:"ਐਤ_ਸੋਮ_ਮੰਗਲ_ਬੁਧ_ਵੀਰ_ਸ਼ੁਕਰ_ਸ਼ਨੀ".split("_"),longDateFormat:{LT:"A h:mm ਵਜੇ",LTS:"A h:mm:ss ਵਜੇ",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm ਵਜੇ",LLLL:"dddd, D MMMM YYYY, A h:mm ਵਜੇ"},calendar:{sameDay:"[ਅਜ] LT",nextDay:"[ਕਲ] LT",nextWeek:"[ਅਗਲਾ] dddd, LT",lastDay:"[ਕਲ] LT",lastWeek:"[ਪਿਛਲੇ] dddd, LT",sameElse:"L"},relativeTime:{future:"%s ਵਿੱਚ",past:"%s ਪਿਛਲੇ",s:"ਕੁਝ ਸਕਿੰਟ",ss:"%d ਸਕਿੰਟ",m:"ਇਕ ਮਿੰਟ",mm:"%d ਮਿੰਟ",h:"ਇੱਕ ਘੰਟਾ",hh:"%d ਘੰਟੇ",d:"ਇੱਕ ਦਿਨ",dd:"%d ਦਿਨ",M:"ਇੱਕ ਮਹੀਨਾ",MM:"%d ਮਹੀਨੇ",y:"ਇੱਕ ਸਾਲ",yy:"%d ਸਾਲ"},preparse:function(e){return e.replace(/[੧੨੩੪੫੬੭੮੯੦]/g,(function(e){return n[e]}))},postformat:function(e){return e.replace(/\d/g,(function(e){return t[e]}))},meridiemParse:/ਰਾਤ|ਸਵੇਰ|ਦੁਪਹਿਰ|ਸ਼ਾਮ/,meridiemHour:function(e,t){return 12===e&&(e=0),"ਰਾਤ"===t?e<4?e:e+12:"ਸਵੇਰ"===t?e:"ਦੁਪਹਿਰ"===t?e>=10?e:e+12:"ਸ਼ਾਮ"===t?e+12:void 0},meridiem:function(e,t,n){return e<4?"ਰਾਤ":e<10?"ਸਵੇਰ":e<17?"ਦੁਪਹਿਰ":e<20?"ਸ਼ਾਮ":"ਰਾਤ"},week:{dow:0,doy:6}});return r}))},f6b46:function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
  1178. //! moment.js locale configuration
  1179. var t=["Am Faoilleach","An Gearran","Am Màrt","An Giblean","An Cèitean","An t-Ògmhios","An t-Iuchar","An Lùnastal","An t-Sultain","An Dàmhair","An t-Samhain","An Dùbhlachd"],n=["Faoi","Gear","Màrt","Gibl","Cèit","Ògmh","Iuch","Lùn","Sult","Dàmh","Samh","Dùbh"],r=["Didòmhnaich","Diluain","Dimàirt","Diciadain","Diardaoin","Dihaoine","Disathairne"],i=["Did","Dil","Dim","Dic","Dia","Dih","Dis"],s=["Dò","Lu","Mà","Ci","Ar","Ha","Sa"],o=e.defineLocale("gd",{months:t,monthsShort:n,monthsParseExact:!0,weekdays:r,weekdaysShort:i,weekdaysMin:s,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[An-diugh aig] LT",nextDay:"[A-màireach aig] LT",nextWeek:"dddd [aig] LT",lastDay:"[An-dè aig] LT",lastWeek:"dddd [seo chaidh] [aig] LT",sameElse:"L"},relativeTime:{future:"ann an %s",past:"bho chionn %s",s:"beagan diogan",ss:"%d diogan",m:"mionaid",mm:"%d mionaidean",h:"uair",hh:"%d uairean",d:"latha",dd:"%d latha",M:"mìos",MM:"%d mìosan",y:"bliadhna",yy:"%d bliadhna"},dayOfMonthOrdinalParse:/\d{1,2}(d|na|mh)/,ordinal:function(e){var t=1===e?"d":e%10===2?"na":"mh";return e+t},week:{dow:1,doy:4}});return o}))},f938:function(e,t,n){"use strict";n.r(t),n.d(t,"KEY_CODES",(function(){return s})),n.d(t,"isPrintableChar",(function(){return a})),n.d(t,"isFunctionKey",(function(){return l})),n.d(t,"isCtrlKey",(function(){return c})),n.d(t,"isCtrlMetaKey",(function(){return u})),n.d(t,"isKey",(function(){return h}));n("14d9");var r=n("81ea"),i=n("63d8");const s={ALT:18,ARROW_DOWN:40,ARROW_LEFT:37,ARROW_RIGHT:39,ARROW_UP:38,AUDIO_DOWN:Object(i["isFirefox"])()?182:174,AUDIO_MUTE:Object(i["isFirefox"])()?181:173,AUDIO_UP:Object(i["isFirefox"])()?183:175,BACKSPACE:8,CAPS_LOCK:20,COMMA:188,COMMAND_LEFT:91,COMMAND_RIGHT:93,COMMAND_FIREFOX:224,CONTROL:17,DELETE:46,END:35,ENTER:13,ESCAPE:27,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,F13:124,F14:125,F15:126,F16:127,F17:128,F18:129,F19:130,HOME:36,INSERT:45,MEDIA_NEXT:176,MEDIA_PLAY_PAUSE:179,MEDIA_PREV:177,MEDIA_STOP:178,NULL:0,NUM_LOCK:144,PAGE_DOWN:34,PAGE_UP:33,PAUSE:19,PERIOD:190,SCROLL_LOCK:145,SHIFT:16,SPACE:32,TAB:9,A:65,C:67,D:68,F:70,L:76,O:79,P:80,S:83,V:86,X:88,Y:89,Z:90},o=[s.ALT,s.ARROW_DOWN,s.ARROW_LEFT,s.ARROW_RIGHT,s.ARROW_UP,s.AUDIO_DOWN,s.AUDIO_MUTE,s.AUDIO_UP,s.BACKSPACE,s.CAPS_LOCK,s.DELETE,s.END,s.ENTER,s.ESCAPE,s.F1,s.F2,s.F3,s.F4,s.F5,s.F6,s.F7,s.F8,s.F9,s.F10,s.F11,s.F12,s.F13,s.F14,s.F15,s.F16,s.F17,s.F18,s.F19,s.HOME,s.INSERT,s.MEDIA_NEXT,s.MEDIA_PLAY_PAUSE,s.MEDIA_PREV,s.MEDIA_STOP,s.NULL,s.NUM_LOCK,s.PAGE_DOWN,s.PAGE_UP,s.PAUSE,s.SCROLL_LOCK,s.SHIFT,s.TAB];function a(e){return 32===e||e>=48&&e<=57||e>=96&&e<=111||e>=186&&e<=192||e>=219&&e<=222||e>=226||e>=65&&e<=90}function l(e){return o.includes(e)}function c(e){const t=[];return Object(i["isMacOS"])()?t.push(s.COMMAND_LEFT,s.COMMAND_RIGHT,s.COMMAND_FIREFOX):t.push(s.CONTROL),t.includes(e)}function u(e){return[s.CONTROL,s.COMMAND_LEFT,s.COMMAND_RIGHT,s.COMMAND_FIREFOX].includes(e)}function h(e,t){const n=t.split("|");let i=!1;return Object(r["arrayEach"])(n,t=>{if(e===s[t])return i=!0,!1}),i}},f955:function(e,t,n){},fa83:function(e,t,n){"use strict";n.r(t),n.d(t,"VERSION",(function(){return r})),n.d(t,"Parser",(function(){return Jr})),n.d(t,"CstParser",(function(){return zr})),n.d(t,"EmbeddedActionsParser",(function(){return $r})),n.d(t,"ParserDefinitionErrorType",(function(){return Qr})),n.d(t,"EMPTY_ALT",(function(){return Br})),n.d(t,"Lexer",(function(){return Te})),n.d(t,"LexerDefinitionErrorType",(function(){return Se})),n.d(t,"createToken",(function(){return Fe})),n.d(t,"createTokenInstance",(function(){return ke})),n.d(t,"EOF",(function(){return He})),n.d(t,"tokenLabel",(function(){return Oe})),n.d(t,"tokenMatcher",(function(){return Ve})),n.d(t,"tokenName",(function(){return ve})),n.d(t,"defaultGrammarResolverErrorProvider",(function(){return Xn})),n.d(t,"defaultGrammarValidatorErrorProvider",(function(){return jn})),n.d(t,"defaultParserErrorProvider",(function(){return Wn})),n.d(t,"EarlyExitException",(function(){return or})),n.d(t,"isRecognitionException",(function(){return nr})),n.d(t,"MismatchedTokenException",(function(){return rr})),n.d(t,"NotAllInputParsedException",(function(){return sr})),n.d(t,"NoViableAltException",(function(){return ir})),n.d(t,"defaultLexerErrorProvider",(function(){return be})),n.d(t,"Alternation",(function(){return ze})),n.d(t,"Flat",(function(){return Ze})),n.d(t,"NonTerminal",(function(){return Xe})),n.d(t,"Option",(function(){return Qe})),n.d(t,"Repetition",(function(){return Be})),n.d(t,"RepetitionMandatory",(function(){return Ke})),n.d(t,"RepetitionMandatoryWithSeparator",(function(){return Ge})),n.d(t,"RepetitionWithSeparator",(function(){return Je})),n.d(t,"Rule",(function(){return je})),n.d(t,"Terminal",(function(){return $e})),n.d(t,"serializeGrammar",(function(){return qe})),n.d(t,"serializeProduction",(function(){return et})),n.d(t,"GAstVisitor",(function(){return rt})),n.d(t,"assignOccurrenceIndices",(function(){return Jn})),n.d(t,"resolveGrammar",(function(){return Gn})),n.d(t,"validateGrammar",(function(){return Bn})),n.d(t,"clearCache",(function(){return Ri})),n.d(t,"createSyntaxDiagramsCode",(function(){return qr})),n.d(t,"generateParserFactory",(function(){return pi})),n.d(t,"generateParserModule",(function(){return fi}));var r="6.5.0",i=n("77aa"),s=n("890f"),o={},a=new s["RegExpParser"];function l(e){var t=e.toString();if(o.hasOwnProperty(t))return o[t];var n=a.pattern(t);return o[t]=n,n}function c(){o={}}var u=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),h="Complement Sets are not supported for first char optimization",d='Unable to use "first char" lexer optimizations:\n';function m(e,t){void 0===t&&(t=!1);try{var n=l(e),r=g(n.value,{},n.flags.ignoreCase);return r}catch(a){if(a.message===h)t&&Object(i["d"])(d+"\tUnable to optimize: < "+e.toString()+" >\n\tComplement Sets cannot be automatically optimized.\n\tThis will disable the lexer's first char optimizations.\n\tSee: https://sap.github.io/chevrotain/docs/guide/resolving_lexer_errors.html#COMPLEMENT for details.");else{var o="";t&&(o="\n\tThis will disable the lexer's first char optimizations.\n\tSee: https://sap.github.io/chevrotain/docs/guide/resolving_lexer_errors.html#REGEXP_PARSING for details."),Object(i["c"])(d+"\n\tFailed parsing: < "+e.toString()+" >\n\tUsing the regexp-to-ast library version: "+s["VERSION"]+"\n\tPlease open an issue at: https://github.com/bd82/regexp-to-ast/issues"+o)}}return[]}function g(e,t,n){switch(e.type){case"Disjunction":for(var r=0;r<e.value.length;r++)g(e.value[r],t,n);break;case"Alternative":var s=e.value;for(r=0;r<s.length;r++){var o=s[r];switch(o.type){case"EndAnchor":case"GroupBackReference":case"Lookahead":case"NegativeLookahead":case"StartAnchor":case"WordBoundary":case"NonWordBoundary":continue}var a=o;switch(a.type){case"Character":p(a.value,t,n);break;case"Set":if(!0===a.complement)throw Error(h);Object(i["u"])(a.value,(function(e){if("number"===typeof e)p(e,t,n);else{var r=e;if(!0===n)for(var i=r.from;i<=r.to;i++)p(i,t,n);else{for(i=r.from;i<=r.to&&i<te;i++)p(i,t,n);if(r.to>=te)for(var s=r.from>=te?r.from:te,o=r.to,a=ne(s),l=ne(o),c=a;c<=l;c++)t[c]=c}}}));break;case"Group":g(a.value,t,n);break;default:throw Error("Non Exhaustive Match")}var l=void 0!==a.quantifier&&0===a.quantifier.atLeast;if("Group"===a.type&&!1===y(a)||"Group"!==a.type&&!1===l)break}break;default:throw Error("non exhaustive match!")}return Object(i["U"])(t)}function p(e,t,n){var r=ne(e);t[r]=r,!0===n&&f(e,t)}function f(e,t){var n=String.fromCharCode(e),r=n.toUpperCase();if(r!==n){var i=ne(r.charCodeAt(0));t[i]=i}else{var s=n.toLowerCase();if(s!==n){i=ne(s.charCodeAt(0));t[i]=i}}}function R(e,t){return Object(i["q"])(e.value,(function(e){if("number"===typeof e)return Object(i["j"])(t,e);var n=e;return void 0!==Object(i["q"])(t,(function(e){return n.from<=e&&e<=n.to}))}))}function y(e){return!(!e.quantifier||0!==e.quantifier.atLeast)||!!e.value&&(Object(i["y"])(e.value)?Object(i["o"])(e.value,y):y(e.value))}var M=function(e){function t(t){var n=e.call(this)||this;return n.targetCharCodes=t,n.found=!1,n}return u(t,e),t.prototype.visitChildren=function(t){if(!0!==this.found){switch(t.type){case"Lookahead":return void this.visitLookahead(t);case"NegativeLookahead":return void this.visitNegativeLookahead(t)}e.prototype.visitChildren.call(this,t)}},t.prototype.visitCharacter=function(e){Object(i["j"])(this.targetCharCodes,e.value)&&(this.found=!0)},t.prototype.visitSet=function(e){e.complement?void 0===R(e,this.targetCharCodes)&&(this.found=!0):void 0!==R(e,this.targetCharCodes)&&(this.found=!0)},t}(s["BaseRegExpVisitor"]);function S(e,t){if(t instanceof RegExp){var n=l(t),r=new M(e);return r.visit(n),r.found}return void 0!==Object(i["q"])(t,(function(t){return Object(i["j"])(e,t.charCodeAt(0))}))}var b=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),w="PATTERN",T="defaultMode",O="modes",v="boolean"===typeof new RegExp("(?:)").sticky;function E(e,t){t=Object(i["k"])(t,{useSticky:v,debug:!1,safeMode:!1,positionTracking:"full",lineTerminatorCharacters:["\r","\n"],tracer:function(e,t){return t()}});var n,r=t.tracer;r("initCharCodeToOptimizedIndexMap",(function(){ie()})),r("Reject Lexer.NA",(function(){n=Object(i["P"])(e,(function(e){return e[w]===Te.NA}))}));var s,o,a,l,c,u,h,g,p,f,R,y=!1;r("Transform Patterns",(function(){y=!1,s=Object(i["I"])(n,(function(e){var n=e[w];if(Object(i["D"])(n)){var r=n.source;return 1===r.length&&"^"!==r&&"$"!==r&&"."!==r?r:2!==r.length||"\\"!==r[0]||Object(i["j"])(["d","D","s","S","t","r","n","t","0","c","b","B","f","v","w","W"],r[1])?t.useSticky?j(n):X(n):r[1]}if(Object(i["B"])(n))return y=!0,{exec:n};if(Object(i["w"])(n,"exec"))return y=!0,n;if("string"===typeof n){if(1===n.length)return n;var s=n.replace(/[\\^$.*+?()[\]{}|]/g,"\\$&"),o=new RegExp(s);return t.useSticky?j(o):X(o)}throw Error("non exhaustive match")}))})),r("misc mapping",(function(){o=Object(i["I"])(n,(function(e){return e.tokenTypeIdx})),a=Object(i["I"])(n,(function(e){var t=e.GROUP;if(t!==Te.SKIPPED){if(Object(i["E"])(t))return t;if(Object(i["F"])(t))return!1;throw Error("non exhaustive match")}})),l=Object(i["I"])(n,(function(e){var t=e.LONGER_ALT;if(t){var r=Object(i["x"])(n,t);return r}})),c=Object(i["I"])(n,(function(e){return e.PUSH_MODE})),u=Object(i["I"])(n,(function(e){return Object(i["w"])(e,"POP_MODE")}))})),r("Line Terminator Handling",(function(){var e=q(t.lineTerminatorCharacters);h=Object(i["I"])(n,(function(e){return!1})),"onlyOffset"!==t.positionTracking&&(h=Object(i["I"])(n,(function(t){return Object(i["w"])(t,"LINE_BREAKS")?t.LINE_BREAKS:!1===z(t,e)?S(e,t.PATTERN):void 0})))})),r("Misc Mapping #2",(function(){g=Object(i["I"])(n,G),p=Object(i["I"])(s,B),f=Object(i["O"])(n,(function(e,t){var n=t.GROUP;return Object(i["E"])(n)&&n!==Te.SKIPPED&&(e[n]=[]),e}),{}),R=Object(i["I"])(s,(function(e,t){return{pattern:s[t],longerAlt:l[t],canLineTerminator:h[t],isCustom:g[t],short:p[t],group:a[t],push:c[t],pop:u[t],tokenTypeIdx:o[t],tokenType:n[t]}}))}));var M=!0,b=[];return t.safeMode||r("First Char Optimization",(function(){b=Object(i["O"])(n,(function(e,n,r){if("string"===typeof n.PATTERN){var s=n.PATTERN.charCodeAt(0),o=ne(s);ee(e,o,R[r])}else if(Object(i["y"])(n.START_CHARS_HINT)){var a;Object(i["u"])(n.START_CHARS_HINT,(function(t){var n="string"===typeof t?t.charCodeAt(0):t,i=ne(n);a!==i&&(a=i,ee(e,i,R[r]))}))}else if(Object(i["D"])(n.PATTERN))if(n.PATTERN.unicode)M=!1,t.ensureOptimizations&&Object(i["c"])(d+"\tUnable to analyze < "+n.PATTERN.toString()+" > pattern.\n\tThe regexp unicode flag is not currently supported by the regexp-to-ast library.\n\tThis will disable the lexer's first char optimizations.\n\tFor details See: https://sap.github.io/chevrotain/docs/guide/resolving_lexer_errors.html#UNICODE_OPTIMIZE");else{var l=m(n.PATTERN,t.ensureOptimizations);Object(i["A"])(l)&&(M=!1),Object(i["u"])(l,(function(t){ee(e,t,R[r])}))}else t.ensureOptimizations&&Object(i["c"])(d+"\tTokenType: <"+n.name+"> is using a custom token pattern without providing <start_chars_hint> parameter.\n\tThis will disable the lexer's first char optimizations.\n\tFor details See: https://sap.github.io/chevrotain/docs/guide/resolving_lexer_errors.html#CUSTOM_OPTIMIZE"),M=!1;return e}),[])})),r("ArrayPacking",(function(){b=Object(i["L"])(b)})),{emptyGroups:f,patternIdxToConfig:R,charCodeToPatternIdxToConfig:b,hasCustom:y,canBeOptimized:M}}function C(e,t){var n=[],r=N(e);n=n.concat(r.errors);var i=_(r.valid),s=i.valid;return n=n.concat(i.errors),n=n.concat(L(s)),n=n.concat(H(s)),n=n.concat(k(s,t)),n=n.concat(V(s)),n}function L(e){var t=[],n=Object(i["p"])(e,(function(e){return Object(i["D"])(e[w])}));return t=t.concat(P(n)),t=t.concat(A(n)),t=t.concat(F(n)),t=t.concat(Y(n)),t=t.concat(x(n)),t}function N(e){var t=Object(i["p"])(e,(function(e){return!Object(i["w"])(e,w)})),n=Object(i["I"])(t,(function(e){return{message:"Token Type: ->"+e.name+"<- missing static 'PATTERN' property",type:Se.MISSING_PATTERN,tokenTypes:[e]}})),r=Object(i["l"])(e,t);return{errors:n,valid:r}}function _(e){var t=Object(i["p"])(e,(function(e){var t=e[w];return!Object(i["D"])(t)&&!Object(i["B"])(t)&&!Object(i["w"])(t,"exec")&&!Object(i["E"])(t)})),n=Object(i["I"])(t,(function(e){return{message:"Token Type: ->"+e.name+"<- static 'PATTERN' can only be a RegExp, a Function matching the {CustomPatternMatcherFunc} type or an Object matching the {ICustomPattern} interface.",type:Se.INVALID_PATTERN,tokenTypes:[e]}})),r=Object(i["l"])(e,t);return{errors:n,valid:r}}var I=/[^\\][\$]/;function P(e){var t=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.found=!1,t}return b(t,e),t.prototype.visitEndAnchor=function(e){this.found=!0},t}(s["BaseRegExpVisitor"]),n=Object(i["p"])(e,(function(e){var n=e[w];try{var r=l(n),i=new t;return i.visit(r),i.found}catch(s){return I.test(n.source)}})),r=Object(i["I"])(n,(function(e){return{message:"Unexpected RegExp Anchor Error:\n\tToken Type: ->"+e.name+"<- static 'PATTERN' cannot contain end of input anchor '$'\n\tSee sap.github.io/chevrotain/docs/guide/resolving_lexer_errors.html#ANCHORS\tfor details.",type:Se.EOI_ANCHOR_FOUND,tokenTypes:[e]}}));return r}function x(e){var t=Object(i["p"])(e,(function(e){var t=e[w];return t.test("")})),n=Object(i["I"])(t,(function(e){return{message:"Token Type: ->"+e.name+"<- static 'PATTERN' must not match an empty string",type:Se.EMPTY_MATCH_PATTERN,tokenTypes:[e]}}));return n}var D=/[^\\[][\^]|^\^/;function A(e){var t=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.found=!1,t}return b(t,e),t.prototype.visitStartAnchor=function(e){this.found=!0},t}(s["BaseRegExpVisitor"]),n=Object(i["p"])(e,(function(e){var n=e[w];try{var r=l(n),i=new t;return i.visit(r),i.found}catch(s){return D.test(n.source)}})),r=Object(i["I"])(n,(function(e){return{message:"Unexpected RegExp Anchor Error:\n\tToken Type: ->"+e.name+"<- static 'PATTERN' cannot contain start of input anchor '^'\n\tSee https://sap.github.io/chevrotain/docs/guide/resolving_lexer_errors.html#ANCHORS\tfor details.",type:Se.SOI_ANCHOR_FOUND,tokenTypes:[e]}}));return r}function F(e){var t=Object(i["p"])(e,(function(e){var t=e[w];return t instanceof RegExp&&(t.multiline||t.global)})),n=Object(i["I"])(t,(function(e){return{message:"Token Type: ->"+e.name+"<- static 'PATTERN' may NOT contain global('g') or multiline('m')",type:Se.UNSUPPORTED_FLAGS_FOUND,tokenTypes:[e]}}));return n}function Y(e){var t=[],n=Object(i["I"])(e,(function(n){return Object(i["O"])(e,(function(e,r){return n.PATTERN.source!==r.PATTERN.source||Object(i["j"])(t,r)||r.PATTERN===Te.NA||(t.push(r),e.push(r)),e}),[])}));n=Object(i["i"])(n);var r=Object(i["p"])(n,(function(e){return e.length>1})),s=Object(i["I"])(r,(function(e){var t=Object(i["I"])(e,(function(e){return e.name})),n=Object(i["s"])(e).PATTERN;return{message:"The same RegExp pattern ->"+n+"<-has been used in all of the following Token Types: "+t.join(", ")+" <-",type:Se.DUPLICATE_PATTERNS_FOUND,tokenTypes:e}}));return s}function H(e){var t=Object(i["p"])(e,(function(e){if(!Object(i["w"])(e,"GROUP"))return!1;var t=e.GROUP;return t!==Te.SKIPPED&&t!==Te.NA&&!Object(i["E"])(t)})),n=Object(i["I"])(t,(function(e){return{message:"Token Type: ->"+e.name+"<- static 'GROUP' can only be Lexer.SKIPPED/Lexer.NA/A String",type:Se.INVALID_GROUP_TYPE_FOUND,tokenTypes:[e]}}));return n}function k(e,t){var n=Object(i["p"])(e,(function(e){return void 0!==e.PUSH_MODE&&!Object(i["j"])(t,e.PUSH_MODE)})),r=Object(i["I"])(n,(function(e){var t="Token Type: ->"+e.name+"<- static 'PUSH_MODE' value cannot refer to a Lexer Mode ->"+e.PUSH_MODE+"<-which does not exist";return{message:t,type:Se.PUSH_MODE_DOES_NOT_EXIST,tokenTypes:[e]}}));return r}function V(e){var t=[],n=Object(i["O"])(e,(function(e,t,n){var r=t.PATTERN;return r===Te.NA||(Object(i["E"])(r)?e.push({str:r,idx:n,tokenType:t}):Object(i["D"])(r)&&W(r)&&e.push({str:r.source,idx:n,tokenType:t})),e}),[]);return Object(i["u"])(e,(function(e,r){Object(i["u"])(n,(function(n){var i=n.str,s=n.idx,o=n.tokenType;if(r<s&&U(i,e.PATTERN)){var a="Token: ->"+o.name+"<- can never be matched.\nBecause it appears AFTER the Token Type ->"+e.name+"<-in the lexer's definition.\nSee https://sap.github.io/chevrotain/docs/guide/resolving_lexer_errors.html#UNREACHABLE";t.push({message:a,type:Se.UNREACHABLE_PATTERN,tokenTypes:[e,o]})}}))})),t}function U(e,t){if(Object(i["D"])(t)){var n=t.exec(e);return null!==n&&0===n.index}if(Object(i["B"])(t))return t(e,0,[],{});if(Object(i["w"])(t,"exec"))return t.exec(e,0,[],{});if("string"===typeof t)return t===e;throw Error("non exhaustive match")}function W(e){var t=[".","\\","[","]","|","^","$","(",")","?","*","+","{"];return void 0===Object(i["q"])(t,(function(t){return-1!==e.source.indexOf(t)}))}function X(e){var t=e.ignoreCase?"i":"";return new RegExp("^(?:"+e.source+")",t)}function j(e){var t=e.ignoreCase?"iy":"y";return new RegExp(""+e.source,t)}function Z(e,t,n){var r=[];return Object(i["w"])(e,T)||r.push({message:"A MultiMode Lexer cannot be initialized without a <"+T+"> property in its definition\n",type:Se.MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE}),Object(i["w"])(e,O)||r.push({message:"A MultiMode Lexer cannot be initialized without a <"+O+"> property in its definition\n",type:Se.MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY}),Object(i["w"])(e,O)&&Object(i["w"])(e,T)&&!Object(i["w"])(e.modes,e.defaultMode)&&r.push({message:"A MultiMode Lexer cannot be initialized with a "+T+": <"+e.defaultMode+">which does not exist\n",type:Se.MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST}),Object(i["w"])(e,O)&&Object(i["u"])(e.modes,(function(e,t){Object(i["u"])(e,(function(e,n){Object(i["F"])(e)&&r.push({message:"A Lexer cannot be initialized using an undefined Token Type. Mode:<"+t+"> at index: <"+n+">\n",type:Se.LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED})}))})),r}function Q(e,t,n){var r=[],s=!1,o=Object(i["i"])(Object(i["t"])(Object(i["J"])(e.modes,(function(e){return e})))),a=Object(i["P"])(o,(function(e){return e[w]===Te.NA})),l=q(n);return t&&Object(i["u"])(a,(function(e){var t=z(e,l);if(!1!==t){var n=$(e,t),o={message:n,type:t.issue,tokenType:e};r.push(o)}else Object(i["w"])(e,"LINE_BREAKS")?!0===e.LINE_BREAKS&&(s=!0):S(l,e.PATTERN)&&(s=!0)})),t&&!s&&r.push({message:"Warning: No LINE_BREAKS Found.\n\tThis Lexer has been defined to track line and column information,\n\tBut none of the Token Types can be identified as matching a line terminator.\n\tSee https://sap.github.io/chevrotain/docs/guide/resolving_lexer_errors.html#LINE_BREAKS \n\tfor details.",type:Se.NO_LINE_BREAKS_FLAGS}),r}function K(e){var t={},n=Object(i["G"])(e);return Object(i["u"])(n,(function(n){var r=e[n];if(!Object(i["y"])(r))throw Error("non exhaustive match");t[n]=[]})),t}function G(e){var t=e.PATTERN;if(Object(i["D"])(t))return!1;if(Object(i["B"])(t))return!0;if(Object(i["w"])(t,"exec"))return!0;if(Object(i["E"])(t))return!1;throw Error("non exhaustive match")}function B(e){return!(!Object(i["E"])(e)||1!==e.length)&&e.charCodeAt(0)}var J={test:function(e){for(var t=e.length,n=this.lastIndex;n<t;n++){var r=e.charCodeAt(n);if(10===r)return this.lastIndex=n+1,!0;if(13===r)return 10===e.charCodeAt(n+1)?this.lastIndex=n+2:this.lastIndex=n+1,!0}return!1},lastIndex:0};function z(e,t){if(Object(i["w"])(e,"LINE_BREAKS"))return!1;if(Object(i["D"])(e.PATTERN)){try{S(t,e.PATTERN)}catch(n){return{issue:Se.IDENTIFY_TERMINATOR,errMsg:n.message}}return!1}if(Object(i["E"])(e.PATTERN))return!1;if(G(e))return{issue:Se.CUSTOM_LINE_BREAK};throw Error("non exhaustive match")}function $(e,t){if(t.issue===Se.IDENTIFY_TERMINATOR)return"Warning: unable to identify line terminator usage in pattern.\n\tThe problem is in the <"+e.name+"> Token Type\n\t Root cause: "+t.errMsg+".\n\tFor details See: https://sap.github.io/chevrotain/docs/guide/resolving_lexer_errors.html#IDENTIFY_TERMINATOR";if(t.issue===Se.CUSTOM_LINE_BREAK)return"Warning: A Custom Token Pattern should specify the <line_breaks> option.\n\tThe problem is in the <"+e.name+"> Token Type\n\tFor details See: https://sap.github.io/chevrotain/docs/guide/resolving_lexer_errors.html#CUSTOM_LINE_BREAK";throw Error("non exhaustive match")}function q(e){var t=Object(i["I"])(e,(function(e){return Object(i["E"])(e)&&e.length>0?e.charCodeAt(0):e}));return t}function ee(e,t,n){void 0===e[t]?e[t]=[n]:e[t].push(n)}var te=256;function ne(e){return e<te?e:re[e]}var re=[];function ie(){if(Object(i["A"])(re)){re=new Array(65536);for(var e=0;e<65536;e++)re[e]=e>255?255+~~(e/255):e}}function se(e,t){var n=e.tokenTypeIdx;return n===t.tokenTypeIdx||!0===t.isParent&&!0===t.categoryMatchesMap[n]}function oe(e,t){return e.tokenTypeIdx===t.tokenTypeIdx}var ae=1,le={};function ce(e){var t=ue(e);he(t),me(t),de(t),Object(i["u"])(t,(function(e){e.isParent=e.categoryMatches.length>0}))}function ue(e){var t=Object(i["g"])(e),n=e,r=!0;while(r){n=Object(i["i"])(Object(i["t"])(Object(i["I"])(n,(function(e){return e.CATEGORIES}))));var s=Object(i["l"])(n,t);t=t.concat(s),Object(i["A"])(s)?r=!1:n=s}return t}function he(e){Object(i["u"])(e,(function(e){pe(e)||(le[ae]=e,e.tokenTypeIdx=ae++),fe(e)&&!Object(i["y"])(e.CATEGORIES)&&(e.CATEGORIES=[e.CATEGORIES]),fe(e)||(e.CATEGORIES=[]),Re(e)||(e.categoryMatches=[]),ye(e)||(e.categoryMatchesMap={})}))}function de(e){Object(i["u"])(e,(function(e){e.categoryMatches=[],Object(i["u"])(e.categoryMatchesMap,(function(t,n){e.categoryMatches.push(le[n].tokenTypeIdx)}))}))}function me(e){Object(i["u"])(e,(function(e){ge([],e)}))}function ge(e,t){Object(i["u"])(e,(function(e){t.categoryMatchesMap[e.tokenTypeIdx]=!0})),Object(i["u"])(t.CATEGORIES,(function(n){var r=e.concat(t);Object(i["j"])(r,n)||ge(r,n)}))}function pe(e){return Object(i["w"])(e,"tokenTypeIdx")}function fe(e){return Object(i["w"])(e,"CATEGORIES")}function Re(e){return Object(i["w"])(e,"categoryMatches")}function ye(e){return Object(i["w"])(e,"categoryMatchesMap")}function Me(e){return Object(i["w"])(e,"tokenTypeIdx")}var Se,be={buildUnableToPopLexerModeMessage:function(e){return"Unable to pop Lexer Mode after encountering Token ->"+e.image+"<- The Mode Stack is empty"},buildUnexpectedCharactersMessage:function(e,t,n,r,i){return"unexpected character: ->"+e.charAt(t)+"<- at offset: "+t+", skipped "+n+" characters."}};(function(e){e[e["MISSING_PATTERN"]=0]="MISSING_PATTERN",e[e["INVALID_PATTERN"]=1]="INVALID_PATTERN",e[e["EOI_ANCHOR_FOUND"]=2]="EOI_ANCHOR_FOUND",e[e["UNSUPPORTED_FLAGS_FOUND"]=3]="UNSUPPORTED_FLAGS_FOUND",e[e["DUPLICATE_PATTERNS_FOUND"]=4]="DUPLICATE_PATTERNS_FOUND",e[e["INVALID_GROUP_TYPE_FOUND"]=5]="INVALID_GROUP_TYPE_FOUND",e[e["PUSH_MODE_DOES_NOT_EXIST"]=6]="PUSH_MODE_DOES_NOT_EXIST",e[e["MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE"]=7]="MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE",e[e["MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY"]=8]="MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY",e[e["MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST"]=9]="MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST",e[e["LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED"]=10]="LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED",e[e["SOI_ANCHOR_FOUND"]=11]="SOI_ANCHOR_FOUND",e[e["EMPTY_MATCH_PATTERN"]=12]="EMPTY_MATCH_PATTERN",e[e["NO_LINE_BREAKS_FLAGS"]=13]="NO_LINE_BREAKS_FLAGS",e[e["UNREACHABLE_PATTERN"]=14]="UNREACHABLE_PATTERN",e[e["IDENTIFY_TERMINATOR"]=15]="IDENTIFY_TERMINATOR",e[e["CUSTOM_LINE_BREAK"]=16]="CUSTOM_LINE_BREAK"})(Se||(Se={}));var we={deferDefinitionErrorsHandling:!1,positionTracking:"full",lineTerminatorsPattern:/\n|\r\n?/g,lineTerminatorCharacters:["\n","\r"],ensureOptimizations:!1,safeMode:!1,errorMessageProvider:be,traceInitPerf:!1,skipValidations:!1};Object.freeze(we);var Te=function(){function e(e,t){var n=this;if(void 0===t&&(t=we),this.lexerDefinition=e,this.lexerDefinitionErrors=[],this.lexerDefinitionWarning=[],this.patternIdxToConfig={},this.charCodeToPatternIdxToConfig={},this.modes=[],this.emptyGroups={},this.config=void 0,this.trackStartLines=!0,this.trackEndLines=!0,this.hasCustom=!1,this.canModeBeOptimized={},"boolean"===typeof t)throw Error("The second argument to the Lexer constructor is now an ILexerConfig Object.\na boolean 2nd argument is no longer supported");this.config=Object(i["K"])(we,t);var r=this.config.traceInitPerf;!0===r?(this.traceInitMaxIdent=1/0,this.traceInitPerf=!0):"number"===typeof r&&(this.traceInitMaxIdent=r,this.traceInitPerf=!0),this.traceInitIndent=-1,this.TRACE_INIT("Lexer Constructor",(function(){var r,s=!0;n.TRACE_INIT("Lexer Config handling",(function(){if(n.config.lineTerminatorsPattern===we.lineTerminatorsPattern)n.config.lineTerminatorsPattern=J;else if(n.config.lineTerminatorCharacters===we.lineTerminatorCharacters)throw Error("Error: Missing <lineTerminatorCharacters> property on the Lexer config.\n\tFor details See: https://sap.github.io/chevrotain/docs/guide/resolving_lexer_errors.html#MISSING_LINE_TERM_CHARS");if(t.safeMode&&t.ensureOptimizations)throw Error('"safeMode" and "ensureOptimizations" flags are mutually exclusive.');n.trackStartLines=/full|onlyStart/i.test(n.config.positionTracking),n.trackEndLines=/full/i.test(n.config.positionTracking),Object(i["y"])(e)?(r={modes:{}},r.modes[T]=Object(i["g"])(e),r[T]=T):(s=!1,r=Object(i["h"])(e))})),!1===n.config.skipValidations&&(n.TRACE_INIT("performRuntimeChecks",(function(){n.lexerDefinitionErrors=n.lexerDefinitionErrors.concat(Z(r,n.trackStartLines,n.config.lineTerminatorCharacters))})),n.TRACE_INIT("performWarningRuntimeChecks",(function(){n.lexerDefinitionWarning=n.lexerDefinitionWarning.concat(Q(r,n.trackStartLines,n.config.lineTerminatorCharacters))}))),r.modes=r.modes?r.modes:{},Object(i["u"])(r.modes,(function(e,t){r.modes[t]=Object(i["P"])(e,(function(e){return Object(i["F"])(e)}))}));var o=Object(i["G"])(r.modes);if(Object(i["u"])(r.modes,(function(e,r){n.TRACE_INIT("Mode: <"+r+"> processing",(function(){var s;(n.modes.push(r),!1===n.config.skipValidations&&n.TRACE_INIT("validatePatterns",(function(){n.lexerDefinitionErrors=n.lexerDefinitionErrors.concat(C(e,o))})),Object(i["A"])(n.lexerDefinitionErrors))&&(ce(e),n.TRACE_INIT("analyzeTokenTypes",(function(){s=E(e,{lineTerminatorCharacters:n.config.lineTerminatorCharacters,positionTracking:t.positionTracking,ensureOptimizations:t.ensureOptimizations,safeMode:t.safeMode,tracer:n.TRACE_INIT.bind(n)})})),n.patternIdxToConfig[r]=s.patternIdxToConfig,n.charCodeToPatternIdxToConfig[r]=s.charCodeToPatternIdxToConfig,n.emptyGroups=Object(i["K"])(n.emptyGroups,s.emptyGroups),n.hasCustom=s.hasCustom||n.hasCustom,n.canModeBeOptimized[r]=s.canBeOptimized)}))})),n.defaultMode=r.defaultMode,!Object(i["A"])(n.lexerDefinitionErrors)&&!n.config.deferDefinitionErrorsHandling){var a=Object(i["I"])(n.lexerDefinitionErrors,(function(e){return e.message})),l=a.join("-----------------------\n");throw new Error("Errors detected in definition of Lexer:\n"+l)}Object(i["u"])(n.lexerDefinitionWarning,(function(e){Object(i["d"])(e.message)})),n.TRACE_INIT("Choosing sub-methods implementations",(function(){if(v?(n.chopInput=i["a"],n.match=n.matchWithTest):(n.updateLastIndex=i["b"],n.match=n.matchWithExec),s&&(n.handleModes=i["b"]),!1===n.trackStartLines&&(n.computeNewColumn=i["a"]),!1===n.trackEndLines&&(n.updateTokenEndLineColumnLocation=i["b"]),/full/i.test(n.config.positionTracking))n.createTokenInstance=n.createFullToken;else if(/onlyStart/i.test(n.config.positionTracking))n.createTokenInstance=n.createStartOnlyToken;else{if(!/onlyOffset/i.test(n.config.positionTracking))throw Error('Invalid <positionTracking> config option: "'+n.config.positionTracking+'"');n.createTokenInstance=n.createOffsetOnlyToken}n.hasCustom?(n.addToken=n.addTokenUsingPush,n.handlePayload=n.handlePayloadWithCustom):(n.addToken=n.addTokenUsingMemberAccess,n.handlePayload=n.handlePayloadNoCustom)})),n.TRACE_INIT("Failed Optimization Warnings",(function(){var e=Object(i["O"])(n.canModeBeOptimized,(function(e,t,n){return!1===t&&e.push(n),e}),[]);if(t.ensureOptimizations&&!Object(i["A"])(e))throw Error("Lexer Modes: < "+e.join(", ")+' > cannot be optimized.\n\t Disable the "ensureOptimizations" lexer config flag to silently ignore this and run the lexer in an un-optimized mode.\n\t Or inspect the console log for details on how to resolve these issues.')})),n.TRACE_INIT("clearRegExpParserCache",(function(){c()})),n.TRACE_INIT("toFastProperties",(function(){Object(i["S"])(n)}))}))}return e.prototype.tokenize=function(e,t){if(void 0===t&&(t=this.defaultMode),!Object(i["A"])(this.lexerDefinitionErrors)){var n=Object(i["I"])(this.lexerDefinitionErrors,(function(e){return e.message})),r=n.join("-----------------------\n");throw new Error("Unable to Tokenize because Errors detected in definition of Lexer:\n"+r)}var s=this.tokenizeInternal(e,t);return s},e.prototype.tokenizeInternal=function(e,t){var n,r,s,o,a,l,c,u,h,d,m,g,p,f,R=this,y=e,M=y.length,S=0,b=0,w=this.hasCustom?0:Math.floor(e.length/10),T=new Array(w),O=[],v=this.trackStartLines?1:void 0,E=this.trackStartLines?1:void 0,C=K(this.emptyGroups),L=this.trackStartLines,N=this.config.lineTerminatorsPattern,_=0,I=[],P=[],x=[],D=[];Object.freeze(D);var A=void 0;function F(){return I}function Y(e){var t=ne(e),n=P[t];return void 0===n?D:n}var H,k=function(e){if(1===x.length&&void 0===e.tokenType.PUSH_MODE){var t=R.config.errorMessageProvider.buildUnableToPopLexerModeMessage(e);O.push({offset:e.startOffset,line:void 0!==e.startLine?e.startLine:void 0,column:void 0!==e.startColumn?e.startColumn:void 0,length:e.image.length,message:t})}else{x.pop();var n=Object(i["H"])(x);I=R.patternIdxToConfig[n],P=R.charCodeToPatternIdxToConfig[n],_=I.length;var r=R.canModeBeOptimized[n]&&!1===R.config.safeMode;A=P&&r?Y:F}};function V(e){x.push(e),P=this.charCodeToPatternIdxToConfig[e],I=this.patternIdxToConfig[e],_=I.length,_=I.length;var t=this.canModeBeOptimized[e]&&!1===this.config.safeMode;A=P&&t?Y:F}V.call(this,t);while(S<M){a=null;var U=y.charCodeAt(S),W=A(U),X=W.length;for(n=0;n<X;n++){H=W[n];var j=H.pattern;l=null;var Z=H.short;if(!1!==Z?U===Z&&(a=j):!0===H.isCustom?(f=j.exec(y,S,T,C),null!==f?(a=f[0],void 0!==f.payload&&(l=f.payload)):a=null):(this.updateLastIndex(j,S),a=this.match(j,e,S)),null!==a){if(o=H.longerAlt,void 0!==o){var Q=I[o],G=Q.pattern;c=null,!0===Q.isCustom?(f=G.exec(y,S,T,C),null!==f?(s=f[0],void 0!==f.payload&&(c=f.payload)):s=null):(this.updateLastIndex(G,S),s=this.match(G,e,S)),s&&s.length>a.length&&(a=s,l=c,H=Q)}break}}if(null!==a){if(u=a.length,h=H.group,void 0!==h&&(d=H.tokenTypeIdx,m=this.createTokenInstance(a,S,d,H.tokenType,v,E,u),this.handlePayload(m,l),!1===h?b=this.addToken(T,b,m):C[h].push(m)),e=this.chopInput(e,u),S+=u,E=this.computeNewColumn(E,u),!0===L&&!0===H.canLineTerminator){var B=0,J=void 0,z=void 0;N.lastIndex=0;do{J=N.test(a),!0===J&&(z=N.lastIndex-1,B++)}while(!0===J);0!==B&&(v+=B,E=u-z,this.updateTokenEndLineColumnLocation(m,h,z,B,v,E,u))}this.handleModes(H,k,V,m)}else{var $=S,q=v,ee=E,te=!1;while(!te&&S<M)for(y.charCodeAt(S),e=this.chopInput(e,1),S++,r=0;r<_;r++){var re=I[r];j=re.pattern,Z=re.short;if(!1!==Z?y.charCodeAt(S)===Z&&(te=!0):!0===re.isCustom?te=null!==j.exec(y,S,T,C):(this.updateLastIndex(j,S),te=null!==j.exec(e)),!0===te)break}g=S-$,p=this.config.errorMessageProvider.buildUnexpectedCharactersMessage(y,$,g,q,ee),O.push({offset:$,line:q,column:ee,length:g,message:p})}}return this.hasCustom||(T.length=b),{tokens:T,groups:C,errors:O}},e.prototype.handleModes=function(e,t,n,r){if(!0===e.pop){var i=e.push;t(r),void 0!==i&&n.call(this,i)}else void 0!==e.push&&n.call(this,e.push)},e.prototype.chopInput=function(e,t){return e.substring(t)},e.prototype.updateLastIndex=function(e,t){e.lastIndex=t},e.prototype.updateTokenEndLineColumnLocation=function(e,t,n,r,i,s,o){var a,l;void 0!==t&&(a=n===o-1,l=a?-1:0,1===r&&!0===a||(e.endLine=i+l,e.endColumn=s-1-l))},e.prototype.computeNewColumn=function(e,t){return e+t},e.prototype.createTokenInstance=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return null},e.prototype.createOffsetOnlyToken=function(e,t,n,r){return{image:e,startOffset:t,tokenTypeIdx:n,tokenType:r}},e.prototype.createStartOnlyToken=function(e,t,n,r,i,s){return{image:e,startOffset:t,startLine:i,startColumn:s,tokenTypeIdx:n,tokenType:r}},e.prototype.createFullToken=function(e,t,n,r,i,s,o){return{image:e,startOffset:t,endOffset:t+o-1,startLine:i,endLine:i,startColumn:s,endColumn:s+o-1,tokenTypeIdx:n,tokenType:r}},e.prototype.addToken=function(e,t,n){return 666},e.prototype.addTokenUsingPush=function(e,t,n){return e.push(n),t},e.prototype.addTokenUsingMemberAccess=function(e,t,n){return e[t]=n,t++,t},e.prototype.handlePayload=function(e,t){},e.prototype.handlePayloadNoCustom=function(e,t){},e.prototype.handlePayloadWithCustom=function(e,t){null!==t&&(e.payload=t)},e.prototype.match=function(e,t,n){return null},e.prototype.matchWithTest=function(e,t,n){var r=e.test(t);return!0===r?t.substring(n,e.lastIndex):null},e.prototype.matchWithExec=function(e,t){var n=e.exec(t);return null!==n?n[0]:n},e.prototype.TRACE_INIT=function(e,t){if(!0===this.traceInitPerf){this.traceInitIndent++;var n=new Array(this.traceInitIndent+1).join("\t");this.traceInitIndent<this.traceInitMaxIdent&&console.log(n+"--\x3e <"+e+">");var r=Object(i["R"])(t),s=r.time,o=r.value,a=s>10?console.warn:console.log;return this.traceInitIndent<this.traceInitMaxIdent&&a(n+"<-- <"+e+"> time: "+s+"ms"),this.traceInitIndent--,o}return t()},e.SKIPPED="This marks a skipped Token pattern, this means each token identified by it willbe consumed and then thrown into oblivion, this can be used to for example to completely ignore whitespace.",e.NA=/NOT_APPLICABLE/,e}();function Oe(e){return Ee(e)?e.LABEL:e.name}function ve(e){return e.name}function Ee(e){return Object(i["E"])(e.LABEL)&&""!==e.LABEL}var Ce="parent",Le="categories",Ne="label",_e="group",Ie="push_mode",Pe="pop_mode",xe="longer_alt",De="line_breaks",Ae="start_chars_hint";function Fe(e){return Ye(e)}function Ye(e){var t=e.pattern,n={};if(n.name=e.name,Object(i["F"])(t)||(n.PATTERN=t),Object(i["w"])(e,Ce))throw"The parent property is no longer supported.\nSee: https://github.com/SAP/chevrotain/issues/564#issuecomment-349062346 for details.";return Object(i["w"])(e,Le)&&(n.CATEGORIES=e[Le]),ce([n]),Object(i["w"])(e,Ne)&&(n.LABEL=e[Ne]),Object(i["w"])(e,_e)&&(n.GROUP=e[_e]),Object(i["w"])(e,Pe)&&(n.POP_MODE=e[Pe]),Object(i["w"])(e,Ie)&&(n.PUSH_MODE=e[Ie]),Object(i["w"])(e,xe)&&(n.LONGER_ALT=e[xe]),Object(i["w"])(e,De)&&(n.LINE_BREAKS=e[De]),Object(i["w"])(e,Ae)&&(n.START_CHARS_HINT=e[Ae]),n}var He=Fe({name:"EOF",pattern:Te.NA});function ke(e,t,n,r,i,s,o,a){return{image:t,startOffset:n,endOffset:r,startLine:i,endLine:s,startColumn:o,endColumn:a,tokenTypeIdx:e.tokenTypeIdx,tokenType:e}}function Ve(e,t){return se(e,t)}ce([He]);var Ue=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),We=function(){function e(e){this.definition=e}return e.prototype.accept=function(e){e.visit(this),Object(i["u"])(this.definition,(function(t){t.accept(e)}))},e}(),Xe=function(e){function t(t){var n=e.call(this,[])||this;return n.idx=1,Object(i["f"])(n,Object(i["N"])(t,(function(e){return void 0!==e}))),n}return Ue(t,e),Object.defineProperty(t.prototype,"definition",{get:function(){return void 0!==this.referencedRule?this.referencedRule.definition:[]},set:function(e){},enumerable:!0,configurable:!0}),t.prototype.accept=function(e){e.visit(this)},t}(We),je=function(e){function t(t){var n=e.call(this,t.definition)||this;return n.orgText="",Object(i["f"])(n,Object(i["N"])(t,(function(e){return void 0!==e}))),n}return Ue(t,e),t}(We),Ze=function(e){function t(t){var n=e.call(this,t.definition)||this;return n.ignoreAmbiguities=!1,Object(i["f"])(n,Object(i["N"])(t,(function(e){return void 0!==e}))),n}return Ue(t,e),t}(We),Qe=function(e){function t(t){var n=e.call(this,t.definition)||this;return n.idx=1,Object(i["f"])(n,Object(i["N"])(t,(function(e){return void 0!==e}))),n}return Ue(t,e),t}(We),Ke=function(e){function t(t){var n=e.call(this,t.definition)||this;return n.idx=1,Object(i["f"])(n,Object(i["N"])(t,(function(e){return void 0!==e}))),n}return Ue(t,e),t}(We),Ge=function(e){function t(t){var n=e.call(this,t.definition)||this;return n.idx=1,Object(i["f"])(n,Object(i["N"])(t,(function(e){return void 0!==e}))),n}return Ue(t,e),t}(We),Be=function(e){function t(t){var n=e.call(this,t.definition)||this;return n.idx=1,Object(i["f"])(n,Object(i["N"])(t,(function(e){return void 0!==e}))),n}return Ue(t,e),t}(We),Je=function(e){function t(t){var n=e.call(this,t.definition)||this;return n.idx=1,Object(i["f"])(n,Object(i["N"])(t,(function(e){return void 0!==e}))),n}return Ue(t,e),t}(We),ze=function(e){function t(t){var n=e.call(this,t.definition)||this;return n.idx=1,n.ignoreAmbiguities=!1,n.hasPredicates=!1,Object(i["f"])(n,Object(i["N"])(t,(function(e){return void 0!==e}))),n}return Ue(t,e),t}(We),$e=function(){function e(e){this.idx=1,Object(i["f"])(this,Object(i["N"])(e,(function(e){return void 0!==e})))}return e.prototype.accept=function(e){e.visit(this)},e}();function qe(e){return Object(i["I"])(e,et)}function et(e){function t(e){return Object(i["I"])(e,et)}if(e instanceof Xe)return{type:"NonTerminal",name:e.nonTerminalName,idx:e.idx};if(e instanceof Ze)return{type:"Flat",definition:t(e.definition)};if(e instanceof Qe)return{type:"Option",idx:e.idx,definition:t(e.definition)};if(e instanceof Ke)return{type:"RepetitionMandatory",name:e.name,idx:e.idx,definition:t(e.definition)};if(e instanceof Ge)return{type:"RepetitionMandatoryWithSeparator",name:e.name,idx:e.idx,separator:et(new $e({terminalType:e.separator})),definition:t(e.definition)};if(e instanceof Je)return{type:"RepetitionWithSeparator",name:e.name,idx:e.idx,separator:et(new $e({terminalType:e.separator})),definition:t(e.definition)};if(e instanceof Be)return{type:"Repetition",name:e.name,idx:e.idx,definition:t(e.definition)};if(e instanceof ze)return{type:"Alternation",name:e.name,idx:e.idx,definition:t(e.definition)};if(e instanceof $e){var n={type:"Terminal",name:e.terminalType.name,label:Oe(e.terminalType),idx:e.idx},r=e.terminalType.PATTERN;return e.terminalType.PATTERN&&(n.pattern=Object(i["D"])(r)?r.source:r),n}if(e instanceof je)return{type:"Rule",name:e.name,orgText:e.orgText,definition:t(e.definition)};throw Error("non exhaustive match")}var tt=function(){function e(){}return e.prototype.walk=function(e,t){var n=this;void 0===t&&(t=[]),Object(i["u"])(e.definition,(function(r,s){var o=Object(i["m"])(e.definition,s+1);if(r instanceof Xe)n.walkProdRef(r,o,t);else if(r instanceof $e)n.walkTerminal(r,o,t);else if(r instanceof Ze)n.walkFlat(r,o,t);else if(r instanceof Qe)n.walkOption(r,o,t);else if(r instanceof Ke)n.walkAtLeastOne(r,o,t);else if(r instanceof Ge)n.walkAtLeastOneSep(r,o,t);else if(r instanceof Je)n.walkManySep(r,o,t);else if(r instanceof Be)n.walkMany(r,o,t);else{if(!(r instanceof ze))throw Error("non exhaustive match");n.walkOr(r,o,t)}}))},e.prototype.walkTerminal=function(e,t,n){},e.prototype.walkProdRef=function(e,t,n){},e.prototype.walkFlat=function(e,t,n){var r=t.concat(n);this.walk(e,r)},e.prototype.walkOption=function(e,t,n){var r=t.concat(n);this.walk(e,r)},e.prototype.walkAtLeastOne=function(e,t,n){var r=[new Qe({definition:e.definition})].concat(t,n);this.walk(e,r)},e.prototype.walkAtLeastOneSep=function(e,t,n){var r=nt(e,t,n);this.walk(e,r)},e.prototype.walkMany=function(e,t,n){var r=[new Qe({definition:e.definition})].concat(t,n);this.walk(e,r)},e.prototype.walkManySep=function(e,t,n){var r=nt(e,t,n);this.walk(e,r)},e.prototype.walkOr=function(e,t,n){var r=this,s=t.concat(n);Object(i["u"])(e.definition,(function(e){var t=new Ze({definition:[e]});r.walk(t,s)}))},e}();function nt(e,t,n){var r=[new Qe({definition:[new $e({terminalType:e.separator})].concat(e.definition)})],i=r.concat(t,n);return i}var rt=function(){function e(){}return e.prototype.visit=function(e){var t=e;switch(t.constructor){case Xe:return this.visitNonTerminal(t);case Ze:return this.visitFlat(t);case Qe:return this.visitOption(t);case Ke:return this.visitRepetitionMandatory(t);case Ge:return this.visitRepetitionMandatoryWithSeparator(t);case Je:return this.visitRepetitionWithSeparator(t);case Be:return this.visitRepetition(t);case ze:return this.visitAlternation(t);case $e:return this.visitTerminal(t);case je:return this.visitRule(t);default:throw Error("non exhaustive match")}},e.prototype.visitNonTerminal=function(e){},e.prototype.visitFlat=function(e){},e.prototype.visitOption=function(e){},e.prototype.visitRepetition=function(e){},e.prototype.visitRepetitionMandatory=function(e){},e.prototype.visitRepetitionMandatoryWithSeparator=function(e){},e.prototype.visitRepetitionWithSeparator=function(e){},e.prototype.visitAlternation=function(e){},e.prototype.visitTerminal=function(e){},e.prototype.visitRule=function(e){},e}(),it=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();function st(e){return e instanceof Ze||e instanceof Qe||e instanceof Be||e instanceof Ke||e instanceof Ge||e instanceof Je||e instanceof $e||e instanceof je}function ot(e,t){void 0===t&&(t=[]);var n=e instanceof Qe||e instanceof Be||e instanceof Je;return!!n||(e instanceof ze?Object(i["Q"])(e.definition,(function(e){return ot(e,t)})):!(e instanceof Xe&&Object(i["j"])(t,e))&&(e instanceof We&&(e instanceof Xe&&t.push(e),Object(i["o"])(e.definition,(function(e){return ot(e,t)})))))}function at(e){return e instanceof ze}function lt(e){if(e instanceof Xe)return"SUBRULE";if(e instanceof Qe)return"OPTION";if(e instanceof ze)return"OR";if(e instanceof Ke)return"AT_LEAST_ONE";if(e instanceof Ge)return"AT_LEAST_ONE_SEP";if(e instanceof Je)return"MANY_SEP";if(e instanceof Be)return"MANY";if(e instanceof $e)return"CONSUME";throw Error("non exhaustive match")}var ct=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.separator="-",t.dslMethods={option:[],alternation:[],repetition:[],repetitionWithSeparator:[],repetitionMandatory:[],repetitionMandatoryWithSeparator:[]},t}return it(t,e),t.prototype.reset=function(){this.dslMethods={option:[],alternation:[],repetition:[],repetitionWithSeparator:[],repetitionMandatory:[],repetitionMandatoryWithSeparator:[]}},t.prototype.visitTerminal=function(e){var t=e.terminalType.name+this.separator+"Terminal";Object(i["w"])(this.dslMethods,t)||(this.dslMethods[t]=[]),this.dslMethods[t].push(e)},t.prototype.visitNonTerminal=function(e){var t=e.nonTerminalName+this.separator+"Terminal";Object(i["w"])(this.dslMethods,t)||(this.dslMethods[t]=[]),this.dslMethods[t].push(e)},t.prototype.visitOption=function(e){this.dslMethods.option.push(e)},t.prototype.visitRepetitionWithSeparator=function(e){this.dslMethods.repetitionWithSeparator.push(e)},t.prototype.visitRepetitionMandatory=function(e){this.dslMethods.repetitionMandatory.push(e)},t.prototype.visitRepetitionMandatoryWithSeparator=function(e){this.dslMethods.repetitionMandatoryWithSeparator.push(e)},t.prototype.visitRepetition=function(e){this.dslMethods.repetition.push(e)},t.prototype.visitAlternation=function(e){this.dslMethods.alternation.push(e)},t}(rt),ut=new ct;function ht(e){ut.reset(),e.accept(ut);var t=ut.dslMethods;return ut.reset(),t}function dt(e){if(e instanceof Xe)return dt(e.referencedRule);if(e instanceof $e)return pt(e);if(st(e))return mt(e);if(at(e))return gt(e);throw Error("non exhaustive match")}function mt(e){var t,n=[],r=e.definition,s=0,o=r.length>s,a=!0;while(o&&a)t=r[s],a=ot(t),n=n.concat(dt(t)),s+=1,o=r.length>s;return Object(i["T"])(n)}function gt(e){var t=Object(i["I"])(e.definition,(function(e){return dt(e)}));return Object(i["T"])(Object(i["t"])(t))}function pt(e){return[e.terminalType]}var ft="_~IN~_",Rt=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),yt=function(e){function t(t){var n=e.call(this)||this;return n.topProd=t,n.follows={},n}return Rt(t,e),t.prototype.startWalking=function(){return this.walk(this.topProd),this.follows},t.prototype.walkTerminal=function(e,t,n){},t.prototype.walkProdRef=function(e,t,n){var r=St(e.referencedRule,e.idx)+this.topProd.name,i=t.concat(n),s=new Ze({definition:i}),o=dt(s);this.follows[r]=o},t}(tt);function Mt(e){var t={};return Object(i["u"])(e,(function(e){var n=new yt(e).startWalking();Object(i["f"])(t,n)})),t}function St(e,t){return e.name+t+ft}var bt=4,wt=8,Tt=8,Ot=1<<wt,vt=2<<wt,Et=3<<wt,Ct=4<<wt,Lt=5<<wt,Nt=6<<wt;function _t(e,t,n){return n|t|e}var It=32-Tt;function Pt(e,t,n,r){var i=r+1<<It;return _t(e,t,n)|i}var xt=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();function Dt(e,t){!0===isNaN(e.startOffset)?(e.startOffset=t.startOffset,e.endOffset=t.endOffset):e.endOffset<t.endOffset===!0&&(e.endOffset=t.endOffset)}function At(e,t){!0===isNaN(e.startOffset)?(e.startOffset=t.startOffset,e.startColumn=t.startColumn,e.startLine=t.startLine,e.endOffset=t.endOffset,e.endColumn=t.endColumn,e.endLine=t.endLine):e.endOffset<t.endOffset===!0&&(e.endOffset=t.endOffset,e.endColumn=t.endColumn,e.endLine=t.endLine)}function Ft(e,t,n){void 0===e.children[n]?e.children[n]=[t]:e.children[n].push(t)}function Yt(e,t,n){void 0===e.children[t]?e.children[t]=[n]:e.children[t].push(n)}var Ht=function(e){function t(t){var n=e.call(this)||this;return n.result=[],n.ruleIdx=t,n}return xt(t,e),t.prototype.collectNamedDSLMethod=function(e,t,n){if(!Object(i["F"])(e.name)){var r=void 0;if(e instanceof Qe||e instanceof Be||e instanceof Ke||e instanceof ze)r=new t({definition:e.definition,idx:e.idx});else{if(!(e instanceof Ge||e instanceof Je))throw Error("non exhaustive match");r=new t({definition:e.definition,idx:e.idx,separator:e.separator})}var s=[r],o=_t(this.ruleIdx,n,e.idx);this.result.push({def:s,key:o,name:e.name,orgProd:e})}},t.prototype.visitOption=function(e){this.collectNamedDSLMethod(e,Qe,vt)},t.prototype.visitRepetition=function(e){this.collectNamedDSLMethod(e,Be,Et)},t.prototype.visitRepetitionMandatory=function(e){this.collectNamedDSLMethod(e,Ke,Ct)},t.prototype.visitRepetitionMandatoryWithSeparator=function(e){this.collectNamedDSLMethod(e,Ge,Nt)},t.prototype.visitRepetitionWithSeparator=function(e){this.collectNamedDSLMethod(e,Je,Lt)},t.prototype.visitAlternation=function(e){var t=this;this.collectNamedDSLMethod(e,ze,Ot);var n=e.definition.length>1;Object(i["u"])(e.definition,(function(r,s){if(!Object(i["F"])(r.name)){var o=r.definition;o=n?[new Qe({definition:r.definition})]:r.definition;var a=Pt(t.ruleIdx,Ot,e.idx,s);t.result.push({def:o,key:a,name:r.name,orgProd:r})}}))},t}(rt);function kt(e,t){var n={allRuleNames:[]};return Object(i["u"])(e,(function(e){var r=t[e.name];n.allRuleNames.push(e.name);var s=new Ht(r);e.accept(s),Object(i["u"])(s.result,(function(t){t.def,t.key;var r=t.name;n.allRuleNames.push(e.name+r)}))})),n}var Vt=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Ut=function(e){function t(t,n){var r=e.call(this)||this;return r.topProd=t,r.path=n,r.possibleTokTypes=[],r.nextProductionName="",r.nextProductionOccurrence=0,r.found=!1,r.isAtEndOfPath=!1,r}return Vt(t,e),t.prototype.startWalking=function(){if(this.found=!1,this.path.ruleStack[0]!==this.topProd.name)throw Error("The path does not start with the walker's top Rule!");return this.ruleStack=Object(i["g"])(this.path.ruleStack).reverse(),this.occurrenceStack=Object(i["g"])(this.path.occurrenceStack).reverse(),this.ruleStack.pop(),this.occurrenceStack.pop(),this.updateExpectedNext(),this.walk(this.topProd),this.possibleTokTypes},t.prototype.walk=function(t,n){void 0===n&&(n=[]),this.found||e.prototype.walk.call(this,t,n)},t.prototype.walkProdRef=function(e,t,n){if(e.referencedRule.name===this.nextProductionName&&e.idx===this.nextProductionOccurrence){var r=t.concat(n);this.updateExpectedNext(),this.walk(e.referencedRule,r)}},t.prototype.updateExpectedNext=function(){Object(i["A"])(this.ruleStack)?(this.nextProductionName="",this.nextProductionOccurrence=0,this.isAtEndOfPath=!0):(this.nextProductionName=this.ruleStack.pop(),this.nextProductionOccurrence=this.occurrenceStack.pop())},t}(tt),Wt=function(e){function t(t,n){var r=e.call(this,t,n)||this;return r.path=n,r.nextTerminalName="",r.nextTerminalOccurrence=0,r.nextTerminalName=r.path.lastTok.name,r.nextTerminalOccurrence=r.path.lastTokOccurrence,r}return Vt(t,e),t.prototype.walkTerminal=function(e,t,n){if(this.isAtEndOfPath&&e.terminalType.name===this.nextTerminalName&&e.idx===this.nextTerminalOccurrence&&!this.found){var r=t.concat(n),i=new Ze({definition:r});this.possibleTokTypes=dt(i),this.found=!0}},t}(Ut),Xt=function(e){function t(t,n){var r=e.call(this)||this;return r.topRule=t,r.occurrence=n,r.result={token:void 0,occurrence:void 0,isEndOfRule:void 0},r}return Vt(t,e),t.prototype.startWalking=function(){return this.walk(this.topRule),this.result},t}(tt),jt=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Vt(t,e),t.prototype.walkMany=function(t,n,r){if(t.idx===this.occurrence){var s=Object(i["s"])(n.concat(r));this.result.isEndOfRule=void 0===s,s instanceof $e&&(this.result.token=s.terminalType,this.result.occurrence=s.idx)}else e.prototype.walkMany.call(this,t,n,r)},t}(Xt),Zt=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Vt(t,e),t.prototype.walkManySep=function(t,n,r){if(t.idx===this.occurrence){var s=Object(i["s"])(n.concat(r));this.result.isEndOfRule=void 0===s,s instanceof $e&&(this.result.token=s.terminalType,this.result.occurrence=s.idx)}else e.prototype.walkManySep.call(this,t,n,r)},t}(Xt),Qt=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Vt(t,e),t.prototype.walkAtLeastOne=function(t,n,r){if(t.idx===this.occurrence){var s=Object(i["s"])(n.concat(r));this.result.isEndOfRule=void 0===s,s instanceof $e&&(this.result.token=s.terminalType,this.result.occurrence=s.idx)}else e.prototype.walkAtLeastOne.call(this,t,n,r)},t}(Xt),Kt=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Vt(t,e),t.prototype.walkAtLeastOneSep=function(t,n,r){if(t.idx===this.occurrence){var s=Object(i["s"])(n.concat(r));this.result.isEndOfRule=void 0===s,s instanceof $e&&(this.result.token=s.terminalType,this.result.occurrence=s.idx)}else e.prototype.walkAtLeastOneSep.call(this,t,n,r)},t}(Xt);function Gt(e,t,n){void 0===n&&(n=[]),n=Object(i["g"])(n);var r=[],s=0;function o(t){return t.concat(Object(i["m"])(e,s+1))}function a(e){var i=Gt(o(e),t,n);return r.concat(i)}while(n.length<t&&s<e.length){var l=e[s];if(l instanceof Ze)return a(l.definition);if(l instanceof Xe)return a(l.definition);if(l instanceof Qe)r=a(l.definition);else{if(l instanceof Ke){var c=l.definition.concat([new Be({definition:l.definition})]);return a(c)}if(l instanceof Ge){c=[new Ze({definition:l.definition}),new Be({definition:[new $e({terminalType:l.separator})].concat(l.definition)})];return a(c)}if(l instanceof Je){c=l.definition.concat([new Be({definition:[new $e({terminalType:l.separator})].concat(l.definition)})]);r=a(c)}else if(l instanceof Be){c=l.definition.concat([new Be({definition:l.definition})]);r=a(c)}else{if(l instanceof ze)return Object(i["u"])(l.definition,(function(e){r=a(e.definition)})),r;if(!(l instanceof $e))throw Error("non exhaustive match");n.push(l.terminalType)}}s++}return r.push({partialPath:n,suffixDef:Object(i["m"])(e,s)}),r}function Bt(e,t,n,r){var s="EXIT_NONE_TERMINAL",o=[s],a="EXIT_ALTERNATIVE",l=!1,c=t.length,u=c-r-1,h=[],d=[];d.push({idx:-1,def:e,ruleStack:[],occurrenceStack:[]});while(!Object(i["A"])(d)){var m=d.pop();if(m!==a){var g=m.def,p=m.idx,f=m.ruleStack,R=m.occurrenceStack;if(!Object(i["A"])(g)){var y=g[0];if(y===s){var M={idx:p,def:Object(i["m"])(g),ruleStack:Object(i["n"])(f),occurrenceStack:Object(i["n"])(R)};d.push(M)}else if(y instanceof $e)if(p<c-1){var S=p+1,b=t[S];if(n(b,y.terminalType)){M={idx:S,def:Object(i["m"])(g),ruleStack:f,occurrenceStack:R};d.push(M)}}else{if(p!==c-1)throw Error("non exhaustive match");h.push({nextTokenType:y.terminalType,nextTokenOccurrence:y.idx,ruleStack:f,occurrenceStack:R}),l=!0}else if(y instanceof Xe){var w=Object(i["g"])(f);w.push(y.nonTerminalName);var T=Object(i["g"])(R);T.push(y.idx);M={idx:p,def:y.definition.concat(o,Object(i["m"])(g)),ruleStack:w,occurrenceStack:T};d.push(M)}else if(y instanceof Qe){var O={idx:p,def:Object(i["m"])(g),ruleStack:f,occurrenceStack:R};d.push(O),d.push(a);var v={idx:p,def:y.definition.concat(Object(i["m"])(g)),ruleStack:f,occurrenceStack:R};d.push(v)}else if(y instanceof Ke){var E=new Be({definition:y.definition,idx:y.idx}),C=y.definition.concat([E],Object(i["m"])(g));M={idx:p,def:C,ruleStack:f,occurrenceStack:R};d.push(M)}else if(y instanceof Ge){var L=new $e({terminalType:y.separator});E=new Be({definition:[L].concat(y.definition),idx:y.idx}),C=y.definition.concat([E],Object(i["m"])(g)),M={idx:p,def:C,ruleStack:f,occurrenceStack:R};d.push(M)}else if(y instanceof Je){O={idx:p,def:Object(i["m"])(g),ruleStack:f,occurrenceStack:R};d.push(O),d.push(a);L=new $e({terminalType:y.separator});var N=new Be({definition:[L].concat(y.definition),idx:y.idx});C=y.definition.concat([N],Object(i["m"])(g)),v={idx:p,def:C,ruleStack:f,occurrenceStack:R};d.push(v)}else if(y instanceof Be){O={idx:p,def:Object(i["m"])(g),ruleStack:f,occurrenceStack:R};d.push(O),d.push(a);N=new Be({definition:y.definition,idx:y.idx}),C=y.definition.concat([N],Object(i["m"])(g)),v={idx:p,def:C,ruleStack:f,occurrenceStack:R};d.push(v)}else if(y instanceof ze)for(var _=y.definition.length-1;_>=0;_--){var I=y.definition[_],P={idx:p,def:I.definition.concat(Object(i["m"])(g)),ruleStack:f,occurrenceStack:R};d.push(P),d.push(a)}else if(y instanceof Ze)d.push({idx:p,def:y.definition.concat(Object(i["m"])(g)),ruleStack:f,occurrenceStack:R});else{if(!(y instanceof je))throw Error("non exhaustive match");d.push(Jt(y,p,f,R))}}}else l&&Object(i["H"])(d).idx<=u&&d.pop()}return h}function Jt(e,t,n,r){var s=Object(i["g"])(n);s.push(e.name);var o=Object(i["g"])(r);return o.push(1),{idx:t,def:e.definition,ruleStack:s,occurrenceStack:o}}var zt,$t=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();function qt(e){if(e instanceof Qe)return zt.OPTION;if(e instanceof Be)return zt.REPETITION;if(e instanceof Ke)return zt.REPETITION_MANDATORY;if(e instanceof Ge)return zt.REPETITION_MANDATORY_WITH_SEPARATOR;if(e instanceof Je)return zt.REPETITION_WITH_SEPARATOR;if(e instanceof ze)return zt.ALTERNATION;throw Error("non exhaustive match")}function en(e,t,n,r,i,s){var o=hn(e,t,n),a=pn(o)?oe:se;return s(o,r,a,i)}function tn(e,t,n,r,i,s){var o=dn(e,t,i,n),a=pn(o)?oe:se;return s(o[0],a,r)}function nn(e,t,n,r){var s=e.length,o=Object(i["o"])(e,(function(e){return Object(i["o"])(e,(function(e){return 1===e.length}))}));if(t)return function(t){for(var r=Object(i["I"])(t,(function(e){return e.GATE})),o=0;o<s;o++){var a=e[o],l=a.length,c=r[o];if(void 0===c||!1!==c.call(this))e:for(var u=0;u<l;u++){for(var h=a[u],d=h.length,m=0;m<d;m++){var g=this.LA(m+1);if(!1===n(g,h[m]))continue e}return o}}};if(o&&!r){var a=Object(i["I"])(e,(function(e){return Object(i["t"])(e)})),l=Object(i["O"])(a,(function(e,t,n){return Object(i["u"])(t,(function(t){Object(i["w"])(e,t.tokenTypeIdx)||(e[t.tokenTypeIdx]=n),Object(i["u"])(t.categoryMatches,(function(t){Object(i["w"])(e,t)||(e[t]=n)}))})),e}),[]);return function(){var e=this.LA(1);return l[e.tokenTypeIdx]}}return function(){for(var t=0;t<s;t++){var r=e[t],i=r.length;e:for(var o=0;o<i;o++){for(var a=r[o],l=a.length,c=0;c<l;c++){var u=this.LA(c+1);if(!1===n(u,a[c]))continue e}return t}}}}function rn(e,t,n){var r=Object(i["o"])(e,(function(e){return 1===e.length})),s=e.length;if(r&&!n){var o=Object(i["t"])(e);if(1===o.length&&Object(i["A"])(o[0].categoryMatches)){var a=o[0],l=a.tokenTypeIdx;return function(){return this.LA(1).tokenTypeIdx===l}}var c=Object(i["O"])(o,(function(e,t,n){return e[t.tokenTypeIdx]=!0,Object(i["u"])(t.categoryMatches,(function(t){e[t]=!0})),e}),[]);return function(){var e=this.LA(1);return!0===c[e.tokenTypeIdx]}}return function(){e:for(var n=0;n<s;n++){for(var r=e[n],i=r.length,o=0;o<i;o++){var a=this.LA(o+1);if(!1===t(a,r[o]))continue e}return!0}return!1}}(function(e){e[e["OPTION"]=0]="OPTION",e[e["REPETITION"]=1]="REPETITION",e[e["REPETITION_MANDATORY"]=2]="REPETITION_MANDATORY",e[e["REPETITION_MANDATORY_WITH_SEPARATOR"]=3]="REPETITION_MANDATORY_WITH_SEPARATOR",e[e["REPETITION_WITH_SEPARATOR"]=4]="REPETITION_WITH_SEPARATOR",e[e["ALTERNATION"]=5]="ALTERNATION"})(zt||(zt={}));var sn=function(e){function t(t,n,r){var i=e.call(this)||this;return i.topProd=t,i.targetOccurrence=n,i.targetProdType=r,i}return $t(t,e),t.prototype.startWalking=function(){return this.walk(this.topProd),this.restDef},t.prototype.checkIsTarget=function(e,t,n,r){return e.idx===this.targetOccurrence&&this.targetProdType===t&&(this.restDef=n.concat(r),!0)},t.prototype.walkOption=function(t,n,r){this.checkIsTarget(t,zt.OPTION,n,r)||e.prototype.walkOption.call(this,t,n,r)},t.prototype.walkAtLeastOne=function(t,n,r){this.checkIsTarget(t,zt.REPETITION_MANDATORY,n,r)||e.prototype.walkOption.call(this,t,n,r)},t.prototype.walkAtLeastOneSep=function(t,n,r){this.checkIsTarget(t,zt.REPETITION_MANDATORY_WITH_SEPARATOR,n,r)||e.prototype.walkOption.call(this,t,n,r)},t.prototype.walkMany=function(t,n,r){this.checkIsTarget(t,zt.REPETITION,n,r)||e.prototype.walkOption.call(this,t,n,r)},t.prototype.walkManySep=function(t,n,r){this.checkIsTarget(t,zt.REPETITION_WITH_SEPARATOR,n,r)||e.prototype.walkOption.call(this,t,n,r)},t}(tt),on=function(e){function t(t,n,r){var i=e.call(this)||this;return i.targetOccurrence=t,i.targetProdType=n,i.targetRef=r,i.result=[],i}return $t(t,e),t.prototype.checkIsTarget=function(e,t){e.idx!==this.targetOccurrence||this.targetProdType!==t||void 0!==this.targetRef&&e!==this.targetRef||(this.result=e.definition)},t.prototype.visitOption=function(e){this.checkIsTarget(e,zt.OPTION)},t.prototype.visitRepetition=function(e){this.checkIsTarget(e,zt.REPETITION)},t.prototype.visitRepetitionMandatory=function(e){this.checkIsTarget(e,zt.REPETITION_MANDATORY)},t.prototype.visitRepetitionMandatoryWithSeparator=function(e){this.checkIsTarget(e,zt.REPETITION_MANDATORY_WITH_SEPARATOR)},t.prototype.visitRepetitionWithSeparator=function(e){this.checkIsTarget(e,zt.REPETITION_WITH_SEPARATOR)},t.prototype.visitAlternation=function(e){this.checkIsTarget(e,zt.ALTERNATION)},t}(rt);function an(e){for(var t=new Array(e),n=0;n<e;n++)t[n]=[];return t}function ln(e){for(var t=[""],n=0;n<e.length;n++){for(var r=e[n],i=[],s=0;s<t.length;s++){var o=t[s];i.push(o+"_"+r.tokenTypeIdx);for(var a=0;a<r.categoryMatches.length;a++){var l="_"+r.categoryMatches[a];i.push(o+l)}}t=i}return t}function cn(e,t,n){for(var r=0;r<e.length;r++)if(r!==n)for(var i=e[r],s=0;s<t.length;s++){var o=t[s];if(!0===i[o])return!1}return!0}function un(e,t){for(var n=Object(i["I"])(e,(function(e){return Gt([e],1)})),r=an(n.length),s=Object(i["I"])(n,(function(e){var t={};return Object(i["u"])(e,(function(e){var n=ln(e.partialPath);Object(i["u"])(n,(function(e){t[e]=!0}))})),t})),o=n,a=1;a<=t;a++){var l=o;o=an(l.length);for(var c=function(e){for(var n=l[e],c=0;c<n.length;c++){var u=n[c].partialPath,h=n[c].suffixDef,d=ln(u),m=cn(s,d,e);if(m||Object(i["A"])(h)||u.length===t){var g=r[e];if(!1===mn(g,u)){g.push(u);for(var p=0;p<d.length;p++){var f=d[p];s[e][f]=!0}}}else{var R=Gt(h,a+1,u);o[e]=o[e].concat(R),Object(i["u"])(R,(function(t){var n=ln(t.partialPath);Object(i["u"])(n,(function(t){s[e][t]=!0}))}))}}},u=0;u<l.length;u++)c(u)}return r}function hn(e,t,n,r){var i=new on(e,zt.ALTERNATION,r);return t.accept(i),un(i.result,n)}function dn(e,t,n,r){var i=new on(e,n);t.accept(i);var s=i.result,o=new sn(t,e,n),a=o.startWalking(),l=new Ze({definition:s}),c=new Ze({definition:a});return un([l,c],r)}function mn(e,t){e:for(var n=0;n<e.length;n++){var r=e[n];if(r.length===t.length){for(var i=0;i<r.length;i++){var s=t[i],o=r[i],a=s===o||void 0!==o.categoryMatchesMap[s.tokenTypeIdx];if(!1===a)continue e}return!0}}return!1}function gn(e,t){return e.length<t.length&&Object(i["o"])(e,(function(e,n){var r=t[n];return e===r||r.categoryMatchesMap[e.tokenTypeIdx]}))}function pn(e){return Object(i["o"])(e,(function(e){return Object(i["o"])(e,(function(e){return Object(i["o"])(e,(function(e){return Object(i["A"])(e.categoryMatches)}))}))}))}var fn=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();function Rn(e,t,n,r,s,o){var a=i["I"](e,(function(e){return Mn(e,s)})),l=i["I"](e,(function(e){return _n(e,e,s)})),c=[],u=[],h=[];Object(i["o"])(l,i["A"])&&(c=Object(i["I"])(e,(function(e){return xn(e,s)})),u=Object(i["I"])(e,(function(e){return Dn(e,t,r,s)})),h=Yn(e,t,s));var d=Vn(e,n,s),m=i["I"](n,(function(e){return Cn(e,s)})),g=yn(e,s),p=Un(e,s),f=Object(i["I"])(e,(function(e){return Fn(e,s)})),R=Object(i["I"])(e,(function(e){return vn(e,s)})),y=Object(i["I"])(e,(function(t){return Ln(t,e,o,s)}));return i["t"](a.concat(m,g,p,h,l,c,u,d,f,R,y))}function yn(e,t){var n=[];return Object(i["u"])(e,(function(e){var r=new Ht("");e.accept(r);var s=Object(i["I"])(r.result,(function(e){return e.orgProd}));n.push(Object(i["I"])(s,(function(n){return En(e,n,t)})))})),Object(i["t"])(n)}function Mn(e,t){var n=new wn;e.accept(n);var r=n.allProductions,s=i["v"](r,Sn),o=i["N"](s,(function(e){return e.length>1})),a=i["I"](i["U"](o),(function(n){var r=i["s"](n),s=t.buildDuplicateFoundError(e,n),o=lt(r),a={message:s,type:Qr.DUPLICATE_PRODUCTIONS,ruleName:e.name,dslName:o,occurrence:r.idx},l=bn(r);return l&&(a.parameter=l),a}));return a}function Sn(e){return lt(e)+"_#_"+e.idx+"_#_"+bn(e)}function bn(e){return e instanceof $e?e.terminalType.name:e instanceof Xe?e.nonTerminalName:""}var wn=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.allProductions=[],t}return fn(t,e),t.prototype.visitNonTerminal=function(e){this.allProductions.push(e)},t.prototype.visitOption=function(e){this.allProductions.push(e)},t.prototype.visitRepetitionWithSeparator=function(e){this.allProductions.push(e)},t.prototype.visitRepetitionMandatory=function(e){this.allProductions.push(e)},t.prototype.visitRepetitionMandatoryWithSeparator=function(e){this.allProductions.push(e)},t.prototype.visitRepetition=function(e){this.allProductions.push(e)},t.prototype.visitAlternation=function(e){this.allProductions.push(e)},t.prototype.visitTerminal=function(e){this.allProductions.push(e)},t}(rt),Tn=/^[a-zA-Z_]\w*$/,On=new RegExp(Tn.source.replace("^","^\\$"));function vn(e,t){var n=[],r=e.name;return r.match(Tn)||n.push({message:t.buildInvalidRuleNameError({topLevelRule:e,expectedPattern:Tn}),type:Qr.INVALID_RULE_NAME,ruleName:r}),n}function En(e,t,n){var r,i=[];return t.name.match(On)||(r=n.buildInvalidNestedRuleNameError(e,t),i.push({message:r,type:Qr.INVALID_NESTED_RULE_NAME,ruleName:e.name})),i}function Cn(e,t){var n=[],r=e.name;return r.match(Tn)||n.push({message:t.buildTokenNameError({tokenType:e,expectedPattern:Tn}),type:Qr.INVALID_TOKEN_NAME}),n}function Ln(e,t,n,r){var s=[],o=Object(i["O"])(t,(function(t,n){return n.name===e.name?t+1:t}),0);if(o>1){var a=r.buildDuplicateRuleNameError({topLevelRule:e,grammarName:n});s.push({message:a,type:Qr.DUPLICATE_RULE_NAME,ruleName:e.name})}return s}function Nn(e,t,n){var r,s=[];return i["j"](t,e)||(r="Invalid rule override, rule: ->"+e+"<- cannot be overridden in the grammar: ->"+n+"<-as it is not defined in any of the super grammars ",s.push({message:r,type:Qr.INVALID_RULE_OVERRIDE,ruleName:e})),s}function _n(e,t,n,r){void 0===r&&(r=[]);var s=[],o=In(t.definition);if(i["A"](o))return[];var a=e.name,l=i["j"](o,e);l&&s.push({message:n.buildLeftRecursionError({topLevelRule:e,leftRecursionPath:r}),type:Qr.LEFT_RECURSION,ruleName:a});var c=i["l"](o,r.concat([e])),u=i["I"](c,(function(t){var s=i["g"](r);return s.push(t),_n(e,t,n,s)}));return s.concat(i["t"](u))}function In(e){var t=[];if(i["A"](e))return t;var n=i["s"](e);if(n instanceof Xe)t.push(n.referencedRule);else if(n instanceof Ze||n instanceof Qe||n instanceof Ke||n instanceof Ge||n instanceof Je||n instanceof Be)t=t.concat(In(n.definition));else if(n instanceof ze)t=i["t"](i["I"](n.definition,(function(e){return In(e.definition)})));else if(!(n instanceof $e))throw Error("non exhaustive match");var r=ot(n),s=e.length>1;if(r&&s){var o=i["m"](e);return t.concat(In(o))}return t}var Pn=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.alternations=[],t}return fn(t,e),t.prototype.visitAlternation=function(e){this.alternations.push(e)},t}(rt);function xn(e,t){var n=new Pn;e.accept(n);var r=n.alternations,s=i["O"](r,(function(n,r){var s=i["n"](r.definition),o=i["I"](s,(function(n,s){var o=Bt([n],[],null,1);return i["A"](o)?{message:t.buildEmptyAlternationError({topLevelRule:e,alternation:r,emptyChoiceIdx:s}),type:Qr.NONE_LAST_EMPTY_ALT,ruleName:e.name,occurrence:r.idx,alternative:s+1}:null}));return n.concat(i["i"](o))}),[]);return s}function Dn(e,t,n,r){var s=new Pn;e.accept(s);var o=s.alternations,a=n[e.name];a&&(o=Object(i["P"])(o,(function(e){return a[lt(e)+(0===e.idx?"":e.idx)]}))),o=Object(i["P"])(o,(function(e){return!0===e.ignoreAmbiguities}));var l=i["O"](o,(function(n,i){var s=i.idx,o=i.maxLookahead||t,a=hn(s,e,o,i),l=Hn(a,i,e,r),c=kn(a,i,e,r);return n.concat(l,c)}),[]);return l}var An=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.allProductions=[],t}return fn(t,e),t.prototype.visitRepetitionWithSeparator=function(e){this.allProductions.push(e)},t.prototype.visitRepetitionMandatory=function(e){this.allProductions.push(e)},t.prototype.visitRepetitionMandatoryWithSeparator=function(e){this.allProductions.push(e)},t.prototype.visitRepetition=function(e){this.allProductions.push(e)},t}(rt);function Fn(e,t){var n=new Pn;e.accept(n);var r=n.alternations,s=i["O"](r,(function(n,r){return r.definition.length>255&&n.push({message:t.buildTooManyAlternativesError({topLevelRule:e,alternation:r}),type:Qr.TOO_MANY_ALTS,ruleName:e.name,occurrence:r.idx}),n}),[]);return s}function Yn(e,t,n){var r=[];return Object(i["u"])(e,(function(e){var s=new An;e.accept(s);var o=s.allProductions;Object(i["u"])(o,(function(s){var o=qt(s),a=s.maxLookahead||t,l=s.idx,c=dn(l,e,o,a),u=c[0];if(Object(i["A"])(Object(i["t"])(u))){var h=n.buildEmptyRepetitionError({topLevelRule:e,repetition:s});r.push({message:h,type:Qr.NO_NON_EMPTY_LOOKAHEAD,ruleName:e.name})}}))})),r}function Hn(e,t,n,r){var s=[],o=Object(i["O"])(e,(function(n,r,o){return!0===t.definition[o].ignoreAmbiguities||Object(i["u"])(r,(function(r){var a=[o];Object(i["u"])(e,(function(e,n){o!==n&&mn(e,r)&&!0!==t.definition[n].ignoreAmbiguities&&a.push(n)})),a.length>1&&!mn(s,r)&&(s.push(r),n.push({alts:a,path:r}))})),n}),[]),a=i["I"](o,(function(e){var s=Object(i["I"])(e.alts,(function(e){return e+1})),o=r.buildAlternationAmbiguityError({topLevelRule:n,alternation:t,ambiguityIndices:s,prefixPath:e.path});return{message:o,type:Qr.AMBIGUOUS_ALTS,ruleName:n.name,occurrence:t.idx,alternatives:[e.alts]}}));return a}function kn(e,t,n,r){var s=[],o=Object(i["O"])(e,(function(e,t,n){var r=Object(i["I"])(t,(function(e){return{idx:n,path:e}}));return e.concat(r)}),[]);return Object(i["u"])(o,(function(e){var a=t.definition[e.idx];if(!0!==a.ignoreAmbiguities){var l=e.idx,c=e.path,u=Object(i["r"])(o,(function(e){return!0!==t.definition[e.idx].ignoreAmbiguities&&e.idx<l&&gn(e.path,c)})),h=Object(i["I"])(u,(function(e){var i=[e.idx+1,l+1],s=0===t.idx?"":t.idx,o=r.buildAlternationPrefixAmbiguityError({topLevelRule:n,alternation:t,ambiguityIndices:i,prefixPath:e.path});return{message:o,type:Qr.AMBIGUOUS_PREFIX_ALTS,ruleName:n.name,occurrence:s,alternatives:i}}));s=s.concat(h)}})),s}function Vn(e,t,n){var r=[],s=Object(i["I"])(t,(function(e){return e.name}));return Object(i["u"])(e,(function(e){var t=e.name;if(Object(i["j"])(s,t)){var o=n.buildNamespaceConflictError(e);r.push({message:o,type:Qr.CONFLICT_TOKENS_RULES_NAMESPACE,ruleName:t})}})),r}function Un(e,t){var n=[];return Object(i["u"])(e,(function(e){var r=new Ht("");e.accept(r);var s=Object(i["v"])(r.result,(function(e){return e.name})),o=Object(i["N"])(s,(function(e){return e.length>1}));Object(i["u"])(Object(i["U"])(o),(function(r){var s=Object(i["I"])(r,(function(e){return e.orgProd})),o=t.buildDuplicateNestedRuleNameError(e,s);n.push({message:o,type:Qr.DUPLICATE_NESTED_NAME,ruleName:e.name})}))})),n}var Wn={buildMismatchTokenMessage:function(e){var t=e.expected,n=e.actual,r=(e.previous,e.ruleName,Ee(t)),i=r?"--\x3e "+Oe(t)+" <--":"token of type --\x3e "+t.name+" <--",s="Expecting "+i+" but found --\x3e '"+n.image+"' <--";return s},buildNotAllInputParsedMessage:function(e){var t=e.firstRedundant;e.ruleName;return"Redundant input, expecting EOF but found: "+t.image},buildNoViableAltMessage:function(e){var t=e.expectedPathsPerAlt,n=e.actual,r=(e.previous,e.customUserDescription),s=(e.ruleName,"Expecting: "),o=Object(i["s"])(n).image,a="\nbut found: '"+o+"'";if(r)return s+r+a;var l=Object(i["O"])(t,(function(e,t){return e.concat(t)}),[]),c=Object(i["I"])(l,(function(e){return"["+Object(i["I"])(e,(function(e){return Oe(e)})).join(", ")+"]"})),u=Object(i["I"])(c,(function(e,t){return" "+(t+1)+". "+e})),h="one of these possible Token sequences:\n"+u.join("\n");return s+h+a},buildEarlyExitMessage:function(e){var t=e.expectedIterationPaths,n=e.actual,r=e.customUserDescription,s=(e.ruleName,"Expecting: "),o=Object(i["s"])(n).image,a="\nbut found: '"+o+"'";if(r)return s+r+a;var l=Object(i["I"])(t,(function(e){return"["+Object(i["I"])(e,(function(e){return Oe(e)})).join(",")+"]"})),c="expecting at least one iteration which starts with one of these possible Token sequences::\n <"+l.join(" ,")+">";return s+c+a}};Object.freeze(Wn);var Xn={buildRuleNotFoundError:function(e,t){var n="Invalid grammar, reference to a rule which is not defined: ->"+t.nonTerminalName+"<-\ninside top level rule: ->"+e.name+"<-";return n}},jn={buildDuplicateFoundError:function(e,t){function n(e){return e instanceof $e?e.terminalType.name:e instanceof Xe?e.nonTerminalName:""}var r=e.name,s=Object(i["s"])(t),o=s.idx,a=lt(s),l=n(s),c=o>0,u="->"+a+(c?o:"")+"<- "+(l?"with argument: ->"+l+"<-":"")+"\n appears more than once ("+t.length+" times) in the top level rule: ->"+r+"<-. \n For further details see: https://sap.github.io/chevrotain/docs/FAQ.html#NUMERICAL_SUFFIXES \n ";return u=u.replace(/[ \t]+/g," "),u=u.replace(/\s\s+/g,"\n"),u},buildInvalidNestedRuleNameError:function(e,t){var n="Invalid nested rule name: ->"+t.name+"<- inside rule: ->"+e.name+"<-\nit must match the pattern: ->"+On.toString()+"<-.\nNote that this means a nested rule name must start with the '$'(dollar) sign.";return n},buildDuplicateNestedRuleNameError:function(e,t){var n=Object(i["s"])(t).name,r="Duplicate nested rule name: ->"+n+"<- inside rule: ->"+e.name+"<-\nA nested name must be unique in the scope of a top level grammar rule.";return r},buildNamespaceConflictError:function(e){var t="Namespace conflict found in grammar.\nThe grammar has both a Terminal(Token) and a Non-Terminal(Rule) named: <"+e.name+">.\nTo resolve this make sure each Terminal and Non-Terminal names are unique\nThis is easy to accomplish by using the convention that Terminal names start with an uppercase letter\nand Non-Terminal names start with a lower case letter.";return t},buildAlternationPrefixAmbiguityError:function(e){var t=Object(i["I"])(e.prefixPath,(function(e){return Oe(e)})).join(", "),n=0===e.alternation.idx?"":e.alternation.idx,r="Ambiguous alternatives: <"+e.ambiguityIndices.join(" ,")+"> due to common lookahead prefix\nin <OR"+n+"> inside <"+e.topLevelRule.name+"> Rule,\n<"+t+"> may appears as a prefix path in all these alternatives.\nSee: https://sap.github.io/chevrotain/docs/guide/resolving_grammar_errors.html#COMMON_PREFIX\nFor Further details.";return r},buildAlternationAmbiguityError:function(e){var t=Object(i["I"])(e.prefixPath,(function(e){return Oe(e)})).join(", "),n=0===e.alternation.idx?"":e.alternation.idx,r="Ambiguous Alternatives Detected: <"+e.ambiguityIndices.join(" ,")+"> in <OR"+n+"> inside <"+e.topLevelRule.name+"> Rule,\n<"+t+"> may appears as a prefix path in all these alternatives.\n";return r+="See: https://sap.github.io/chevrotain/docs/guide/resolving_grammar_errors.html#AMBIGUOUS_ALTERNATIVES\nFor Further details.",r},buildEmptyRepetitionError:function(e){var t=lt(e.repetition);0!==e.repetition.idx&&(t+=e.repetition.idx);var n="The repetition <"+t+"> within Rule <"+e.topLevelRule.name+"> can never consume any tokens.\nThis could lead to an infinite loop.";return n},buildTokenNameError:function(e){var t=e.tokenType.name,n="Invalid Grammar Token name: ->"+t+"<- it must match the pattern: ->"+e.expectedPattern.toString()+"<-";return n},buildEmptyAlternationError:function(e){var t="Ambiguous empty alternative: <"+(e.emptyChoiceIdx+1)+"> in <OR"+e.alternation.idx+"> inside <"+e.topLevelRule.name+"> Rule.\nOnly the last alternative may be an empty alternative.";return t},buildTooManyAlternativesError:function(e){var t="An Alternation cannot have more than 256 alternatives:\n<OR"+e.alternation.idx+"> inside <"+e.topLevelRule.name+"> Rule.\n has "+(e.alternation.definition.length+1)+" alternatives.";return t},buildLeftRecursionError:function(e){var t=e.topLevelRule.name,n=i["I"](e.leftRecursionPath,(function(e){return e.name})),r=t+" --\x3e "+n.concat([t]).join(" --\x3e "),s="Left Recursion found in grammar.\nrule: <"+t+"> can be invoked from itself (directly or indirectly)\nwithout consuming any Tokens. The grammar path that causes this is: \n "+r+"\n To fix this refactor your grammar to remove the left recursion.\nsee: https://en.wikipedia.org/wiki/LL_parser#Left_Factoring.";return s},buildInvalidRuleNameError:function(e){var t=e.topLevelRule.name,n=e.expectedPattern.toString(),r="Invalid grammar rule name: ->"+t+"<- it must match the pattern: ->"+n+"<-";return r},buildDuplicateRuleNameError:function(e){var t;t=e.topLevelRule instanceof je?e.topLevelRule.name:e.topLevelRule;var n="Duplicate definition, rule: ->"+t+"<- is already defined in the grammar: ->"+e.grammarName+"<-";return n}},Zn=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();function Qn(e,t){var n=new Kn(e,t);return n.resolveRefs(),n.errors}var Kn=function(e){function t(t,n){var r=e.call(this)||this;return r.nameToTopRule=t,r.errMsgProvider=n,r.errors=[],r}return Zn(t,e),t.prototype.resolveRefs=function(){var e=this;Object(i["u"])(Object(i["U"])(this.nameToTopRule),(function(t){e.currTopLevel=t,t.accept(e)}))},t.prototype.visitNonTerminal=function(e){var t=this.nameToTopRule[e.nonTerminalName];if(t)e.referencedRule=t;else{var n=this.errMsgProvider.buildRuleNotFoundError(this.currTopLevel,e);this.errors.push({message:n,type:Qr.UNRESOLVED_SUBRULE_REF,ruleName:this.currTopLevel.name,unresolvedRefName:e.nonTerminalName})}},t}(rt);function Gn(e){e=Object(i["k"])(e,{errMsgProvider:Xn});var t={};return Object(i["u"])(e.rules,(function(e){t[e.name]=e})),Qn(t,e.errMsgProvider)}function Bn(e){return e=Object(i["k"])(e,{errMsgProvider:jn,ignoredIssues:{}}),Rn(e.rules,e.maxLookahead,e.tokenTypes,e.ignoredIssues,e.errMsgProvider,e.grammarName)}function Jn(e){Object(i["u"])(e.rules,(function(e){var t=new ct;e.accept(t),Object(i["u"])(t.dslMethods,(function(e){Object(i["u"])(e,(function(e,t){e.idx=t+1}))}))}))}var zn="MismatchedTokenException",$n="NoViableAltException",qn="EarlyExitException",er="NotAllInputParsedException",tr=[zn,$n,qn,er];function nr(e){return Object(i["j"])(tr,e.name)}function rr(e,t,n){this.name=zn,this.message=e,this.token=t,this.previousToken=n,this.resyncedTokens=[]}function ir(e,t,n){this.name=$n,this.message=e,this.token=t,this.previousToken=n,this.resyncedTokens=[]}function sr(e,t){this.name=er,this.message=e,this.token=t,this.resyncedTokens=[]}function or(e,t,n){this.name=qn,this.message=e,this.token=t,this.previousToken=n,this.resyncedTokens=[]}Object.freeze(tr),rr.prototype=Error.prototype,ir.prototype=Error.prototype,sr.prototype=Error.prototype,or.prototype=Error.prototype;var ar={},lr="InRuleRecoveryException";function cr(e){this.name=lr,this.message=e}cr.prototype=Error.prototype;var ur=function(){function e(){}return e.prototype.initRecoverable=function(e){this.firstAfterRepMap={},this.resyncFollows={},this.recoveryEnabled=Object(i["w"])(e,"recoveryEnabled")?e.recoveryEnabled:Kr.recoveryEnabled,this.recoveryEnabled&&(this.attemptInRepetitionRecovery=hr)},e.prototype.getTokenToInsert=function(e){var t=ke(e,"",NaN,NaN,NaN,NaN,NaN,NaN);return t.isInsertedInRecovery=!0,t},e.prototype.canTokenTypeBeInsertedInRecovery=function(e){return!0},e.prototype.tryInRepetitionRecovery=function(e,t,n,r){var s=this,o=this.findReSyncTokenType(),a=this.exportLexerState(),l=[],c=!1,u=this.LA(1),h=this.LA(1),d=function(){var e=s.LA(0),t=s.errorMessageProvider.buildMismatchTokenMessage({expected:r,actual:u,previous:e,ruleName:s.getCurrRuleFullName()}),n=new rr(t,u,s.LA(0));n.resyncedTokens=Object(i["n"])(l),s.SAVE_ERROR(n)};while(!c){if(this.tokenMatcher(h,r))return void d();if(n.call(this))return d(),void e.apply(this,t);this.tokenMatcher(h,o)?c=!0:(h=this.SKIP_TOKEN(),this.addToResyncTokens(h,l))}this.importLexerState(a)},e.prototype.shouldInRepetitionRecoveryBeTried=function(e,t,n){return!1!==n&&(void 0!==e&&void 0!==t&&(!this.tokenMatcher(this.LA(1),e)&&(!this.isBackTracking()&&!this.canPerformInRuleRecovery(e,this.getFollowsForInRuleRecovery(e,t)))))},e.prototype.getFollowsForInRuleRecovery=function(e,t){var n=this.getCurrentGrammarPath(e,t),r=this.getNextPossibleTokenTypes(n);return r},e.prototype.tryInRuleRecovery=function(e,t){if(this.canRecoverWithSingleTokenInsertion(e,t)){var n=this.getTokenToInsert(e);return n}if(this.canRecoverWithSingleTokenDeletion(e)){var r=this.SKIP_TOKEN();return this.consumeToken(),r}throw new cr("sad sad panda")},e.prototype.canPerformInRuleRecovery=function(e,t){return this.canRecoverWithSingleTokenInsertion(e,t)||this.canRecoverWithSingleTokenDeletion(e)},e.prototype.canRecoverWithSingleTokenInsertion=function(e,t){var n=this;if(!this.canTokenTypeBeInsertedInRecovery(e))return!1;if(Object(i["A"])(t))return!1;var r=this.LA(1),s=void 0!==Object(i["q"])(t,(function(e){return n.tokenMatcher(r,e)}));return s},e.prototype.canRecoverWithSingleTokenDeletion=function(e){var t=this.tokenMatcher(this.LA(2),e);return t},e.prototype.isInCurrentRuleReSyncSet=function(e){var t=this.getCurrFollowKey(),n=this.getFollowSetFromFollowKey(t);return Object(i["j"])(n,e)},e.prototype.findReSyncTokenType=function(){var e=this.flattenFollowSet(),t=this.LA(1),n=2;while(1){var r=t.tokenType;if(Object(i["j"])(e,r))return r;t=this.LA(n),n++}},e.prototype.getCurrFollowKey=function(){if(1===this.RULE_STACK.length)return ar;var e=this.getLastExplicitRuleShortName(),t=this.getLastExplicitRuleOccurrenceIndex(),n=this.getPreviousExplicitRuleShortName();return{ruleName:this.shortRuleNameToFullName(e),idxInCallingRule:t,inRule:this.shortRuleNameToFullName(n)}},e.prototype.buildFullFollowKeyStack=function(){var e=this,t=this.RULE_STACK,n=this.RULE_OCCURRENCE_STACK;return Object(i["A"])(this.LAST_EXPLICIT_RULE_STACK)||(t=Object(i["I"])(this.LAST_EXPLICIT_RULE_STACK,(function(t){return e.RULE_STACK[t]})),n=Object(i["I"])(this.LAST_EXPLICIT_RULE_STACK,(function(t){return e.RULE_OCCURRENCE_STACK[t]}))),Object(i["I"])(t,(function(r,i){return 0===i?ar:{ruleName:e.shortRuleNameToFullName(r),idxInCallingRule:n[i],inRule:e.shortRuleNameToFullName(t[i-1])}}))},e.prototype.flattenFollowSet=function(){var e=this,t=Object(i["I"])(this.buildFullFollowKeyStack(),(function(t){return e.getFollowSetFromFollowKey(t)}));return Object(i["t"])(t)},e.prototype.getFollowSetFromFollowKey=function(e){if(e===ar)return[He];var t=e.ruleName+e.idxInCallingRule+ft+e.inRule;return this.resyncFollows[t]},e.prototype.addToResyncTokens=function(e,t){return this.tokenMatcher(e,He)||t.push(e),t},e.prototype.reSyncTo=function(e){var t=[],n=this.LA(1);while(!1===this.tokenMatcher(n,e))n=this.SKIP_TOKEN(),this.addToResyncTokens(n,t);return Object(i["n"])(t)},e.prototype.attemptInRepetitionRecovery=function(e,t,n,r,i,s,o){},e.prototype.getCurrentGrammarPath=function(e,t){var n=this.getHumanReadableRuleStack(),r=Object(i["g"])(this.RULE_OCCURRENCE_STACK),s={ruleStack:n,occurrenceStack:r,lastTok:e,lastTokOccurrence:t};return s},e.prototype.getHumanReadableRuleStack=function(){var e=this;return Object(i["A"])(this.LAST_EXPLICIT_RULE_STACK)?Object(i["I"])(this.RULE_STACK,(function(t){return e.shortRuleNameToFullName(t)})):Object(i["I"])(this.LAST_EXPLICIT_RULE_STACK,(function(t){return e.shortRuleNameToFullName(e.RULE_STACK[t])}))},e}();function hr(e,t,n,r,i,s,o){var a=this.getKeyForAutomaticLookahead(r,i),l=this.firstAfterRepMap[a];if(void 0===l){var c=this.getCurrRuleFullName(),u=this.getGAstProductions()[c],h=new s(u,i);l=h.startWalking(),this.firstAfterRepMap[a]=l}var d=l.token,m=l.occurrence,g=l.isEndOfRule;1===this.RULE_STACK.length&&g&&void 0===d&&(d=He,m=1),this.shouldInRepetitionRecoveryBeTried(d,m,o)&&this.tryInRepetitionRecovery(e,t,n,d)}var dr=function(){function e(){}return e.prototype.initLooksAhead=function(e){this.dynamicTokensEnabled=Object(i["w"])(e,"dynamicTokensEnabled")?e.dynamicTokensEnabled:Kr.dynamicTokensEnabled,this.maxLookahead=Object(i["w"])(e,"maxLookahead")?e.maxLookahead:Kr.maxLookahead,this.lookAheadFuncsCache=Object(i["z"])()?new Map:[],Object(i["z"])()?(this.getLaFuncFromCache=this.getLaFuncFromMap,this.setLaFuncCache=this.setLaFuncCacheUsingMap):(this.getLaFuncFromCache=this.getLaFuncFromObj,this.setLaFuncCache=this.setLaFuncUsingObj)},e.prototype.preComputeLookaheadFunctions=function(e){var t=this;Object(i["u"])(e,(function(e){t.TRACE_INIT(e.name+" Rule Lookahead",(function(){var n=ht(e),r=n.alternation,s=n.repetition,o=n.option,a=n.repetitionMandatory,l=n.repetitionMandatoryWithSeparator,c=n.repetitionWithSeparator;Object(i["u"])(r,(function(n){var r=0===n.idx?"":n.idx;t.TRACE_INIT(""+lt(n)+r,(function(){var r=en(n.idx,e,n.maxLookahead||t.maxLookahead,n.hasPredicates,t.dynamicTokensEnabled,t.lookAheadBuilderForAlternatives),i=_t(t.fullRuleNameToShort[e.name],Ot,n.idx);t.setLaFuncCache(i,r)}))})),Object(i["u"])(s,(function(n){t.computeLookaheadFunc(e,n.idx,Et,zt.REPETITION,n.maxLookahead,lt(n))})),Object(i["u"])(o,(function(n){t.computeLookaheadFunc(e,n.idx,vt,zt.OPTION,n.maxLookahead,lt(n))})),Object(i["u"])(a,(function(n){t.computeLookaheadFunc(e,n.idx,Ct,zt.REPETITION_MANDATORY,n.maxLookahead,lt(n))})),Object(i["u"])(l,(function(n){t.computeLookaheadFunc(e,n.idx,Nt,zt.REPETITION_MANDATORY_WITH_SEPARATOR,n.maxLookahead,lt(n))})),Object(i["u"])(c,(function(n){t.computeLookaheadFunc(e,n.idx,Lt,zt.REPETITION_WITH_SEPARATOR,n.maxLookahead,lt(n))}))}))}))},e.prototype.computeLookaheadFunc=function(e,t,n,r,i,s){var o=this;this.TRACE_INIT(""+s+(0===t?"":t),(function(){var s=tn(t,e,i||o.maxLookahead,o.dynamicTokensEnabled,r,o.lookAheadBuilderForOptional),a=_t(o.fullRuleNameToShort[e.name],n,t);o.setLaFuncCache(a,s)}))},e.prototype.lookAheadBuilderForOptional=function(e,t,n){return rn(e,t,n)},e.prototype.lookAheadBuilderForAlternatives=function(e,t,n,r){return nn(e,t,n,r)},e.prototype.getKeyForAutomaticLookahead=function(e,t){var n=this.getLastExplicitRuleShortName();return _t(n,e,t)},e.prototype.getLaFuncFromCache=function(e){},e.prototype.getLaFuncFromMap=function(e){return this.lookAheadFuncsCache.get(e)},e.prototype.getLaFuncFromObj=function(e){return this.lookAheadFuncsCache[e]},e.prototype.setLaFuncCache=function(e,t){},e.prototype.setLaFuncCacheUsingMap=function(e,t){this.lookAheadFuncsCache.set(e,t)},e.prototype.setLaFuncUsingObj=function(e,t){this.lookAheadFuncsCache[e]=t},e}();function mr(e){return Rr(e.constructor)}var gr,pr=/^\s*function\s*(\S*)\s*\(/,fr="name";function Rr(e){var t=e.name;if(t)return t;var n=e.toString().match(pr)[1];return n}function yr(e,t){var n=Object.getOwnPropertyDescriptor(e,fr);return!(!Object(i["F"])(n)&&!n.configurable)&&(Object.defineProperty(e,fr,{enumerable:!1,configurable:!0,writable:!1,value:t}),!0)}function Mr(e,t){for(var n=Object(i["G"])(e),r=n.length,s=0;s<r;s++)for(var o=n[s],a=e[o],l=a.length,c=0;c<l;c++){var u=a[c];void 0===u.tokenTypeIdx&&(void 0!==u.fullName?this[u.fullName](u.children,t):this[u.name](u.children,t))}}function Sr(e,t){var n=function(){};yr(n,e+"BaseSemantics");var r={visit:function(e,t){if(Object(i["y"])(e)&&(e=e[0]),!Object(i["F"])(e))return void 0!==e.fullName?this[e.fullName](e.children,t):this[e.name](e.children,t)},validateVisitor:function(){var e=wr(this,t);if(!Object(i["A"])(e)){var n=Object(i["I"])(e,(function(e){return e.msg}));throw Error("Errors Detected in CST Visitor <"+Rr(this.constructor)+">:\n\t"+n.join("\n\n").replace(/\n/g,"\n\t"))}}};return n.prototype=r,n.prototype.constructor=n,n._RULE_NAMES=t,n}function br(e,t,n){var r=function(){};yr(r,e+"BaseSemanticsWithDefaults");var s=Object.create(n.prototype);return Object(i["u"])(t,(function(e){s[e]=Mr})),r.prototype=s,r.prototype.constructor=r,r}function wr(e,t){var n=Tr(e,t),r=vr(e,t);return n.concat(r)}function Tr(e,t){var n=Object(i["I"])(t,(function(t){if(!Object(i["B"])(e[t]))return{msg:"Missing visitor method: <"+t+"> on "+Rr(e.constructor)+" CST Visitor.",type:gr.MISSING_METHOD,methodName:t}}));return Object(i["i"])(n)}(function(e){e[e["REDUNDANT_METHOD"]=0]="REDUNDANT_METHOD",e[e["MISSING_METHOD"]=1]="MISSING_METHOD"})(gr||(gr={}));var Or=["constructor","visit","validateVisitor"];function vr(e,t){var n=[];for(var r in e)Tn.test(r)&&Object(i["B"])(e[r])&&!Object(i["j"])(Or,r)&&!Object(i["j"])(t,r)&&n.push({msg:"Redundant visitor method: <"+r+"> on "+Rr(e.constructor)+" CST Visitor\nThere is no Grammar Rule corresponding to this method's name.\nFor utility methods on visitor classes use methods names that do not match /"+Tn.source+"/.",type:gr.REDUNDANT_METHOD,methodName:r});return n}var Er=function(){function e(){}return e.prototype.initTreeBuilder=function(e){if(this.LAST_EXPLICIT_RULE_STACK=[],this.CST_STACK=[],this.outputCst=Object(i["w"])(e,"outputCst")?e.outputCst:Kr.outputCst,this.nodeLocationTracking=Object(i["w"])(e,"nodeLocationTracking")?e.nodeLocationTracking:Kr.nodeLocationTracking,this.outputCst)if(/full/i.test(this.nodeLocationTracking))this.recoveryEnabled?(this.setNodeLocationFromToken=At,this.setNodeLocationFromNode=At,this.cstPostRule=i["b"],this.setInitialNodeLocation=this.setInitialNodeLocationFullRecovery):(this.setNodeLocationFromToken=i["b"],this.setNodeLocationFromNode=i["b"],this.cstPostRule=this.cstPostRuleFull,this.setInitialNodeLocation=this.setInitialNodeLocationFullRegular);else if(/onlyOffset/i.test(this.nodeLocationTracking))this.recoveryEnabled?(this.setNodeLocationFromToken=Dt,this.setNodeLocationFromNode=Dt,this.cstPostRule=i["b"],this.setInitialNodeLocation=this.setInitialNodeLocationOnlyOffsetRecovery):(this.setNodeLocationFromToken=i["b"],this.setNodeLocationFromNode=i["b"],this.cstPostRule=this.cstPostRuleOnlyOffset,this.setInitialNodeLocation=this.setInitialNodeLocationOnlyOffsetRegular);else{if(!/none/i.test(this.nodeLocationTracking))throw Error('Invalid <nodeLocationTracking> config option: "'+e.nodeLocationTracking+'"');this.setNodeLocationFromToken=i["b"],this.setNodeLocationFromNode=i["b"],this.cstPostRule=i["b"],this.setInitialNodeLocation=i["b"]}else this.cstInvocationStateUpdate=i["b"],this.cstFinallyStateUpdate=i["b"],this.cstPostTerminal=i["b"],this.cstPostNonTerminal=i["b"],this.cstPostRule=i["b"],this.getLastExplicitRuleShortName=this.getLastExplicitRuleShortNameNoCst,this.getPreviousExplicitRuleShortName=this.getPreviousExplicitRuleShortNameNoCst,this.getLastExplicitRuleOccurrenceIndex=this.getLastExplicitRuleOccurrenceIndexNoCst,this.manyInternal=this.manyInternalNoCst,this.orInternal=this.orInternalNoCst,this.optionInternal=this.optionInternalNoCst,this.atLeastOneInternal=this.atLeastOneInternalNoCst,this.manySepFirstInternal=this.manySepFirstInternalNoCst,this.atLeastOneSepFirstInternal=this.atLeastOneSepFirstInternalNoCst},e.prototype.setInitialNodeLocationOnlyOffsetRecovery=function(e){e.location={startOffset:NaN,endOffset:NaN}},e.prototype.setInitialNodeLocationOnlyOffsetRegular=function(e){e.location={startOffset:this.LA(1).startOffset,endOffset:NaN}},e.prototype.setInitialNodeLocationFullRecovery=function(e){e.location={startOffset:NaN,startLine:NaN,startColumn:NaN,endOffset:NaN,endLine:NaN,endColumn:NaN}},e.prototype.setInitialNodeLocationFullRegular=function(e){var t=this.LA(1);e.location={startOffset:t.startOffset,startLine:t.startLine,startColumn:t.startColumn,endOffset:NaN,endLine:NaN,endColumn:NaN}},e.prototype.cstNestedInvocationStateUpdate=function(e,t){var n={name:e,fullName:this.shortRuleNameToFull[this.getLastExplicitRuleShortName()]+e,children:{}};this.setInitialNodeLocation(n),this.CST_STACK.push(n)},e.prototype.cstInvocationStateUpdate=function(e,t){this.LAST_EXPLICIT_RULE_STACK.push(this.RULE_STACK.length-1);var n={name:e,children:{}};this.setInitialNodeLocation(n),this.CST_STACK.push(n)},e.prototype.cstFinallyStateUpdate=function(){this.LAST_EXPLICIT_RULE_STACK.pop(),this.CST_STACK.pop()},e.prototype.cstNestedFinallyStateUpdate=function(){var e=this.CST_STACK.pop();this.cstPostRule(e)},e.prototype.cstPostRuleFull=function(e){var t=this.LA(0),n=e.location;n.startOffset<=t.startOffset===!0?(n.endOffset=t.endOffset,n.endLine=t.endLine,n.endColumn=t.endColumn):(n.startOffset=NaN,n.startLine=NaN,n.startColumn=NaN)},e.prototype.cstPostRuleOnlyOffset=function(e){var t=this.LA(0),n=e.location;n.startOffset<=t.startOffset===!0?n.endOffset=t.endOffset:n.startOffset=NaN},e.prototype.cstPostTerminal=function(e,t){var n=this.CST_STACK[this.CST_STACK.length-1];Ft(n,t,e),this.setNodeLocationFromToken(n.location,t)},e.prototype.cstPostNonTerminal=function(e,t){if(!0!==this.isBackTracking()){var n=this.CST_STACK[this.CST_STACK.length-1];Yt(n,t,e),this.setNodeLocationFromNode(n.location,e.location)}},e.prototype.getBaseCstVisitorConstructor=function(){if(Object(i["F"])(this.baseCstVisitorConstructor)){var e=Sr(this.className,this.allRuleNames);return this.baseCstVisitorConstructor=e,e}return this.baseCstVisitorConstructor},e.prototype.getBaseCstVisitorConstructorWithDefaults=function(){if(Object(i["F"])(this.baseCstVisitorWithDefaultsConstructor)){var e=br(this.className,this.allRuleNames,this.getBaseCstVisitorConstructor());return this.baseCstVisitorWithDefaultsConstructor=e,e}return this.baseCstVisitorWithDefaultsConstructor},e.prototype.nestedRuleBeforeClause=function(e,t){var n;return void 0!==e.NAME?(n=e.NAME,this.nestedRuleInvocationStateUpdate(n,t),n):void 0},e.prototype.nestedAltBeforeClause=function(e,t,n,r){var i,s=this.getLastExplicitRuleShortName(),o=Pt(s,n,t,r);return void 0!==e.NAME?(i=e.NAME,this.nestedRuleInvocationStateUpdate(i,o),{shortName:o,nestedName:i}):void 0},e.prototype.nestedRuleFinallyClause=function(e,t){var n=this.CST_STACK,r=n[n.length-1];this.nestedRuleFinallyStateUpdate();var i=n[n.length-1];Yt(i,t,r),this.setNodeLocationFromNode(i.location,r.location)},e.prototype.getLastExplicitRuleShortName=function(){var e=this.LAST_EXPLICIT_RULE_STACK[this.LAST_EXPLICIT_RULE_STACK.length-1];return this.RULE_STACK[e]},e.prototype.getLastExplicitRuleShortNameNoCst=function(){var e=this.RULE_STACK;return e[e.length-1]},e.prototype.getPreviousExplicitRuleShortName=function(){var e=this.LAST_EXPLICIT_RULE_STACK[this.LAST_EXPLICIT_RULE_STACK.length-2];return this.RULE_STACK[e]},e.prototype.getPreviousExplicitRuleShortNameNoCst=function(){var e=this.RULE_STACK;return e[e.length-2]},e.prototype.getLastExplicitRuleOccurrenceIndex=function(){var e=this.LAST_EXPLICIT_RULE_STACK[this.LAST_EXPLICIT_RULE_STACK.length-1];return this.RULE_OCCURRENCE_STACK[e]},e.prototype.getLastExplicitRuleOccurrenceIndexNoCst=function(){var e=this.RULE_OCCURRENCE_STACK;return e[e.length-1]},e.prototype.nestedRuleInvocationStateUpdate=function(e,t){this.RULE_OCCURRENCE_STACK.push(1),this.RULE_STACK.push(t),this.cstNestedInvocationStateUpdate(e,t)},e.prototype.nestedRuleFinallyStateUpdate=function(){this.RULE_STACK.pop(),this.RULE_OCCURRENCE_STACK.pop(),this.cstNestedFinallyStateUpdate()},e}(),Cr=function(){function e(){}return e.prototype.initLexerAdapter=function(){this.tokVector=[],this.tokVectorLength=0,this.currIdx=-1},Object.defineProperty(e.prototype,"input",{get:function(){return this.tokVector},set:function(e){if(!0!==this.selfAnalysisDone)throw Error("Missing <performSelfAnalysis> invocation at the end of the Parser's constructor.");this.reset(),this.tokVector=e,this.tokVectorLength=e.length},enumerable:!0,configurable:!0}),e.prototype.SKIP_TOKEN=function(){return this.currIdx<=this.tokVector.length-2?(this.consumeToken(),this.LA(1)):Zr},e.prototype.LA=function(e){var t=this.currIdx+e;return t<0||this.tokVectorLength<=t?Zr:this.tokVector[t]},e.prototype.consumeToken=function(){this.currIdx++},e.prototype.exportLexerState=function(){return this.currIdx},e.prototype.importLexerState=function(e){this.currIdx=e},e.prototype.resetLexerState=function(){this.currIdx=-1},e.prototype.moveToTerminatedState=function(){this.currIdx=this.tokVector.length-1},e.prototype.getLexerPosition=function(){return this.exportLexerState()},e}(),Lr=function(){function e(){}return e.prototype.ACTION=function(e){return e.call(this)},e.prototype.consume=function(e,t,n){return this.consumeInternal(t,e,n)},e.prototype.subrule=function(e,t,n){return this.subruleInternal(t,e,n)},e.prototype.option=function(e,t){return this.optionInternal(t,e)},e.prototype.or=function(e,t){return this.orInternal(t,e)},e.prototype.many=function(e,t){return this.manyInternal(e,t)},e.prototype.atLeastOne=function(e,t){return this.atLeastOneInternal(e,t)},e.prototype.CONSUME=function(e,t){return this.consumeInternal(e,0,t)},e.prototype.CONSUME1=function(e,t){return this.consumeInternal(e,1,t)},e.prototype.CONSUME2=function(e,t){return this.consumeInternal(e,2,t)},e.prototype.CONSUME3=function(e,t){return this.consumeInternal(e,3,t)},e.prototype.CONSUME4=function(e,t){return this.consumeInternal(e,4,t)},e.prototype.CONSUME5=function(e,t){return this.consumeInternal(e,5,t)},e.prototype.CONSUME6=function(e,t){return this.consumeInternal(e,6,t)},e.prototype.CONSUME7=function(e,t){return this.consumeInternal(e,7,t)},e.prototype.CONSUME8=function(e,t){return this.consumeInternal(e,8,t)},e.prototype.CONSUME9=function(e,t){return this.consumeInternal(e,9,t)},e.prototype.SUBRULE=function(e,t){return this.subruleInternal(e,0,t)},e.prototype.SUBRULE1=function(e,t){return this.subruleInternal(e,1,t)},e.prototype.SUBRULE2=function(e,t){return this.subruleInternal(e,2,t)},e.prototype.SUBRULE3=function(e,t){return this.subruleInternal(e,3,t)},e.prototype.SUBRULE4=function(e,t){return this.subruleInternal(e,4,t)},e.prototype.SUBRULE5=function(e,t){return this.subruleInternal(e,5,t)},e.prototype.SUBRULE6=function(e,t){return this.subruleInternal(e,6,t)},e.prototype.SUBRULE7=function(e,t){return this.subruleInternal(e,7,t)},e.prototype.SUBRULE8=function(e,t){return this.subruleInternal(e,8,t)},e.prototype.SUBRULE9=function(e,t){return this.subruleInternal(e,9,t)},e.prototype.OPTION=function(e){return this.optionInternal(e,0)},e.prototype.OPTION1=function(e){return this.optionInternal(e,1)},e.prototype.OPTION2=function(e){return this.optionInternal(e,2)},e.prototype.OPTION3=function(e){return this.optionInternal(e,3)},e.prototype.OPTION4=function(e){return this.optionInternal(e,4)},e.prototype.OPTION5=function(e){return this.optionInternal(e,5)},e.prototype.OPTION6=function(e){return this.optionInternal(e,6)},e.prototype.OPTION7=function(e){return this.optionInternal(e,7)},e.prototype.OPTION8=function(e){return this.optionInternal(e,8)},e.prototype.OPTION9=function(e){return this.optionInternal(e,9)},e.prototype.OR=function(e){return this.orInternal(e,0)},e.prototype.OR1=function(e){return this.orInternal(e,1)},e.prototype.OR2=function(e){return this.orInternal(e,2)},e.prototype.OR3=function(e){return this.orInternal(e,3)},e.prototype.OR4=function(e){return this.orInternal(e,4)},e.prototype.OR5=function(e){return this.orInternal(e,5)},e.prototype.OR6=function(e){return this.orInternal(e,6)},e.prototype.OR7=function(e){return this.orInternal(e,7)},e.prototype.OR8=function(e){return this.orInternal(e,8)},e.prototype.OR9=function(e){return this.orInternal(e,9)},e.prototype.MANY=function(e){this.manyInternal(0,e)},e.prototype.MANY1=function(e){this.manyInternal(1,e)},e.prototype.MANY2=function(e){this.manyInternal(2,e)},e.prototype.MANY3=function(e){this.manyInternal(3,e)},e.prototype.MANY4=function(e){this.manyInternal(4,e)},e.prototype.MANY5=function(e){this.manyInternal(5,e)},e.prototype.MANY6=function(e){this.manyInternal(6,e)},e.prototype.MANY7=function(e){this.manyInternal(7,e)},e.prototype.MANY8=function(e){this.manyInternal(8,e)},e.prototype.MANY9=function(e){this.manyInternal(9,e)},e.prototype.MANY_SEP=function(e){this.manySepFirstInternal(0,e)},e.prototype.MANY_SEP1=function(e){this.manySepFirstInternal(1,e)},e.prototype.MANY_SEP2=function(e){this.manySepFirstInternal(2,e)},e.prototype.MANY_SEP3=function(e){this.manySepFirstInternal(3,e)},e.prototype.MANY_SEP4=function(e){this.manySepFirstInternal(4,e)},e.prototype.MANY_SEP5=function(e){this.manySepFirstInternal(5,e)},e.prototype.MANY_SEP6=function(e){this.manySepFirstInternal(6,e)},e.prototype.MANY_SEP7=function(e){this.manySepFirstInternal(7,e)},e.prototype.MANY_SEP8=function(e){this.manySepFirstInternal(8,e)},e.prototype.MANY_SEP9=function(e){this.manySepFirstInternal(9,e)},e.prototype.AT_LEAST_ONE=function(e){this.atLeastOneInternal(0,e)},e.prototype.AT_LEAST_ONE1=function(e){return this.atLeastOneInternal(1,e)},e.prototype.AT_LEAST_ONE2=function(e){this.atLeastOneInternal(2,e)},e.prototype.AT_LEAST_ONE3=function(e){this.atLeastOneInternal(3,e)},e.prototype.AT_LEAST_ONE4=function(e){this.atLeastOneInternal(4,e)},e.prototype.AT_LEAST_ONE5=function(e){this.atLeastOneInternal(5,e)},e.prototype.AT_LEAST_ONE6=function(e){this.atLeastOneInternal(6,e)},e.prototype.AT_LEAST_ONE7=function(e){this.atLeastOneInternal(7,e)},e.prototype.AT_LEAST_ONE8=function(e){this.atLeastOneInternal(8,e)},e.prototype.AT_LEAST_ONE9=function(e){this.atLeastOneInternal(9,e)},e.prototype.AT_LEAST_ONE_SEP=function(e){this.atLeastOneSepFirstInternal(0,e)},e.prototype.AT_LEAST_ONE_SEP1=function(e){this.atLeastOneSepFirstInternal(1,e)},e.prototype.AT_LEAST_ONE_SEP2=function(e){this.atLeastOneSepFirstInternal(2,e)},e.prototype.AT_LEAST_ONE_SEP3=function(e){this.atLeastOneSepFirstInternal(3,e)},e.prototype.AT_LEAST_ONE_SEP4=function(e){this.atLeastOneSepFirstInternal(4,e)},e.prototype.AT_LEAST_ONE_SEP5=function(e){this.atLeastOneSepFirstInternal(5,e)},e.prototype.AT_LEAST_ONE_SEP6=function(e){this.atLeastOneSepFirstInternal(6,e)},e.prototype.AT_LEAST_ONE_SEP7=function(e){this.atLeastOneSepFirstInternal(7,e)},e.prototype.AT_LEAST_ONE_SEP8=function(e){this.atLeastOneSepFirstInternal(8,e)},e.prototype.AT_LEAST_ONE_SEP9=function(e){this.atLeastOneSepFirstInternal(9,e)},e.prototype.RULE=function(e,t,n){if(void 0===n&&(n=Gr),Object(i["j"])(this.definedRulesNames,e)){var r=jn.buildDuplicateRuleNameError({topLevelRule:e,grammarName:this.className}),s={message:r,type:Qr.DUPLICATE_RULE_NAME,ruleName:e};this.definitionErrors.push(s)}this.definedRulesNames.push(e);var o=this.defineRule(e,t,n);return this[e]=o,o},e.prototype.OVERRIDE_RULE=function(e,t,n){void 0===n&&(n=Gr);var r=[];r=r.concat(Nn(e,this.definedRulesNames,this.className)),this.definitionErrors.push.apply(this.definitionErrors,r);var i=this.defineRule(e,t,n);return this[e]=i,i},e.prototype.BACKTRACK=function(e,t){return function(){this.isBackTrackingStack.push(1);var n=this.saveRecogState();try{return e.apply(this,t),!0}catch(r){if(nr(r))return!1;throw r}finally{this.reloadRecogState(n),this.isBackTrackingStack.pop()}}},e.prototype.getGAstProductions=function(){return this.gastProductionsCache},e.prototype.getSerializedGastProductions=function(){return qe(Object(i["U"])(this.gastProductionsCache))},e}(),Nr=function(){function e(){}return e.prototype.initRecognizerEngine=function(e,t){if(this.className=mr(this),this.shortRuleNameToFull={},this.fullRuleNameToShort={},this.ruleShortNameIdx=256,this.tokenMatcher=oe,this.definedRulesNames=[],this.tokensMap={},this.allRuleNames=[],this.isBackTrackingStack=[],this.RULE_STACK=[],this.RULE_OCCURRENCE_STACK=[],this.gastProductionsCache={},Object(i["w"])(t,"serializedGrammar"))throw Error("The Parser's configuration can no longer contain a <serializedGrammar> property.\n\tSee: https://sap.github.io/chevrotain/docs/changes/BREAKING_CHANGES.html#_6-0-0\n\tFor Further details.");if(Object(i["y"])(e)){if(Object(i["A"])(e))throw Error("A Token Vocabulary cannot be empty.\n\tNote that the first argument for the parser constructor\n\tis no longer a Token vector (since v4.0).");if("number"===typeof e[0].startOffset)throw Error("The Parser constructor no longer accepts a token vector as the first argument.\n\tSee: https://sap.github.io/chevrotain/docs/changes/BREAKING_CHANGES.html#_4-0-0\n\tFor Further details.")}if(Object(i["y"])(e))this.tokensMap=Object(i["O"])(e,(function(e,t){return e[t.name]=t,e}),{});else if(Object(i["w"])(e,"modes")&&Object(i["o"])(Object(i["t"])(Object(i["U"])(e.modes)),Me)){var n=Object(i["t"])(Object(i["U"])(e.modes)),r=Object(i["T"])(n);this.tokensMap=Object(i["O"])(r,(function(e,t){return e[t.name]=t,e}),{})}else{if(!Object(i["C"])(e))throw new Error("<tokensDictionary> argument must be An Array of Token constructors, A dictionary of Token constructors or an IMultiModeLexerDefinition");this.tokensMap=Object(i["h"])(e)}this.tokensMap["EOF"]=He;var s=Object(i["o"])(Object(i["U"])(e),(function(e){return Object(i["A"])(e.categoryMatches)}));this.tokenMatcher=s?oe:se,ce(Object(i["U"])(this.tokensMap))},e.prototype.defineRule=function(e,t,n){if(this.selfAnalysisDone)throw Error("Grammar rule <"+e+"> may not be defined after the 'performSelfAnalysis' method has been called'\nMake sure that all grammar rule definitions are done before 'performSelfAnalysis' is called.");var r,s=Object(i["w"])(n,"resyncEnabled")?n.resyncEnabled:Gr.resyncEnabled,o=Object(i["w"])(n,"recoveryValueFunc")?n.recoveryValueFunc:Gr.recoveryValueFunc,a=this.ruleShortNameIdx<<bt+wt;function l(e){try{if(!0===this.outputCst){t.apply(this,e);var n=this.CST_STACK[this.CST_STACK.length-1];return this.cstPostRule(n),n}return t.apply(this,e)}catch(r){return this.invokeRuleCatch(r,s,o)}finally{this.ruleFinallyStateUpdate()}}this.ruleShortNameIdx++,this.shortRuleNameToFull[a]=e,this.fullRuleNameToShort[e]=a,r=function(t,n){return void 0===t&&(t=0),this.ruleInvocationStateUpdate(a,e,t),l.call(this,n)};var c="ruleName";return r[c]=e,r["originalGrammarAction"]=t,r},e.prototype.invokeRuleCatch=function(e,t,n){var r=1===this.RULE_STACK.length,i=t&&!this.isBackTracking()&&this.recoveryEnabled;if(nr(e)){var s=e;if(i){var o=this.findReSyncTokenType();if(this.isInCurrentRuleReSyncSet(o)){if(s.resyncedTokens=this.reSyncTo(o),this.outputCst){var a=this.CST_STACK[this.CST_STACK.length-1];return a.recoveredNode=!0,a}return n()}if(this.outputCst){a=this.CST_STACK[this.CST_STACK.length-1];a.recoveredNode=!0,s.partialCstResult=a}throw s}if(r)return this.moveToTerminatedState(),n();throw s}throw e},e.prototype.optionInternal=function(e,t){var n=this.getKeyForAutomaticLookahead(vt,t),r=this.nestedRuleBeforeClause(e,n);try{return this.optionInternalLogic(e,t,n)}finally{void 0!==r&&this.nestedRuleFinallyClause(n,r)}},e.prototype.optionInternalNoCst=function(e,t){var n=this.getKeyForAutomaticLookahead(vt,t);return this.optionInternalLogic(e,t,n)},e.prototype.optionInternalLogic=function(e,t,n){var r,i,s=this,o=this.getLaFuncFromCache(n);if(void 0!==e.DEF){if(r=e.DEF,i=e.GATE,void 0!==i){var a=o;o=function(){return i.call(s)&&a.call(s)}}}else r=e;if(!0===o.call(this))return r.call(this)},e.prototype.atLeastOneInternal=function(e,t){var n=this.getKeyForAutomaticLookahead(Ct,e),r=this.nestedRuleBeforeClause(t,n);try{return this.atLeastOneInternalLogic(e,t,n)}finally{void 0!==r&&this.nestedRuleFinallyClause(n,r)}},e.prototype.atLeastOneInternalNoCst=function(e,t){var n=this.getKeyForAutomaticLookahead(Ct,e);this.atLeastOneInternalLogic(e,t,n)},e.prototype.atLeastOneInternalLogic=function(e,t,n){var r,i,s=this,o=this.getLaFuncFromCache(n);if(void 0!==t.DEF){if(r=t.DEF,i=t.GATE,void 0!==i){var a=o;o=function(){return i.call(s)&&a.call(s)}}}else r=t;if(!0!==o.call(this))throw this.raiseEarlyExitException(e,zt.REPETITION_MANDATORY,t.ERR_MSG);var l=this.doSingleRepetition(r);while(!0===o.call(this)&&!0===l)l=this.doSingleRepetition(r);this.attemptInRepetitionRecovery(this.atLeastOneInternal,[e,t],o,Ct,e,Qt)},e.prototype.atLeastOneSepFirstInternal=function(e,t){var n=this.getKeyForAutomaticLookahead(Nt,e),r=this.nestedRuleBeforeClause(t,n);try{this.atLeastOneSepFirstInternalLogic(e,t,n)}finally{void 0!==r&&this.nestedRuleFinallyClause(n,r)}},e.prototype.atLeastOneSepFirstInternalNoCst=function(e,t){var n=this.getKeyForAutomaticLookahead(Nt,e);this.atLeastOneSepFirstInternalLogic(e,t,n)},e.prototype.atLeastOneSepFirstInternalLogic=function(e,t,n){var r=this,i=t.DEF,s=t.SEP,o=this.getLaFuncFromCache(n);if(!0!==o.call(this))throw this.raiseEarlyExitException(e,zt.REPETITION_MANDATORY_WITH_SEPARATOR,t.ERR_MSG);i.call(this);var a=function(){return r.tokenMatcher(r.LA(1),s)};while(!0===this.tokenMatcher(this.LA(1),s))this.CONSUME(s),i.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[e,s,a,i,Kt],a,Nt,e,Kt)},e.prototype.manyInternal=function(e,t){var n=this.getKeyForAutomaticLookahead(Et,e),r=this.nestedRuleBeforeClause(t,n);try{return this.manyInternalLogic(e,t,n)}finally{void 0!==r&&this.nestedRuleFinallyClause(n,r)}},e.prototype.manyInternalNoCst=function(e,t){var n=this.getKeyForAutomaticLookahead(Et,e);return this.manyInternalLogic(e,t,n)},e.prototype.manyInternalLogic=function(e,t,n){var r,i,s=this,o=this.getLaFuncFromCache(n);if(void 0!==t.DEF){if(r=t.DEF,i=t.GATE,void 0!==i){var a=o;o=function(){return i.call(s)&&a.call(s)}}}else r=t;var l=!0;while(!0===o.call(this)&&!0===l)l=this.doSingleRepetition(r);this.attemptInRepetitionRecovery(this.manyInternal,[e,t],o,Et,e,jt,l)},e.prototype.manySepFirstInternal=function(e,t){var n=this.getKeyForAutomaticLookahead(Lt,e),r=this.nestedRuleBeforeClause(t,n);try{this.manySepFirstInternalLogic(e,t,n)}finally{void 0!==r&&this.nestedRuleFinallyClause(n,r)}},e.prototype.manySepFirstInternalNoCst=function(e,t){var n=this.getKeyForAutomaticLookahead(Lt,e);this.manySepFirstInternalLogic(e,t,n)},e.prototype.manySepFirstInternalLogic=function(e,t,n){var r=this,i=t.DEF,s=t.SEP,o=this.getLaFuncFromCache(n);if(!0===o.call(this)){i.call(this);var a=function(){return r.tokenMatcher(r.LA(1),s)};while(!0===this.tokenMatcher(this.LA(1),s))this.CONSUME(s),i.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[e,s,a,i,Zt],a,Lt,e,Zt)}},e.prototype.repetitionSepSecondInternal=function(e,t,n,r,i){while(n())this.CONSUME(t),r.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[e,t,n,r,i],n,Nt,e,i)},e.prototype.doSingleRepetition=function(e){var t=this.getLexerPosition();e.call(this);var n=this.getLexerPosition();return n>t},e.prototype.orInternalNoCst=function(e,t){var n=Object(i["y"])(e)?e:e.DEF,r=this.getKeyForAutomaticLookahead(Ot,t),s=this.getLaFuncFromCache(r),o=s.call(this,n);if(void 0!==o){var a=n[o];return a.ALT.call(this)}this.raiseNoAltException(t,e.ERR_MSG)},e.prototype.orInternal=function(e,t){var n=this.getKeyForAutomaticLookahead(Ot,t),r=this.nestedRuleBeforeClause(e,n);try{var s=Object(i["y"])(e)?e:e.DEF,o=this.getLaFuncFromCache(n),a=o.call(this,s);if(void 0!==a){var l=s[a],c=this.nestedAltBeforeClause(l,t,Ot,a);try{return l.ALT.call(this)}finally{void 0!==c&&this.nestedRuleFinallyClause(c.shortName,c.nestedName)}}this.raiseNoAltException(t,e.ERR_MSG)}finally{void 0!==r&&this.nestedRuleFinallyClause(n,r)}},e.prototype.ruleFinallyStateUpdate=function(){if(this.RULE_STACK.pop(),this.RULE_OCCURRENCE_STACK.pop(),this.cstFinallyStateUpdate(),0===this.RULE_STACK.length&&!1===this.isAtEndOfInput()){var e=this.LA(1),t=this.errorMessageProvider.buildNotAllInputParsedMessage({firstRedundant:e,ruleName:this.getCurrRuleFullName()});this.SAVE_ERROR(new sr(t,e))}},e.prototype.subruleInternal=function(e,t,n){var r;try{var i=void 0!==n?n.ARGS:void 0;return r=e.call(this,t,i),this.cstPostNonTerminal(r,void 0!==n&&void 0!==n.LABEL?n.LABEL:e.ruleName),r}catch(s){this.subruleInternalError(s,n,e.ruleName)}},e.prototype.subruleInternalError=function(e,t,n){throw nr(e)&&void 0!==e.partialCstResult&&(this.cstPostNonTerminal(e.partialCstResult,void 0!==t&&void 0!==t.LABEL?t.LABEL:n),delete e.partialCstResult),e},e.prototype.consumeInternal=function(e,t,n){var r;try{var i=this.LA(1);!0===this.tokenMatcher(i,e)?(this.consumeToken(),r=i):this.consumeInternalError(e,i,n)}catch(s){r=this.consumeInternalRecovery(e,t,s)}return this.cstPostTerminal(void 0!==n&&void 0!==n.LABEL?n.LABEL:e.name,r),r},e.prototype.consumeInternalError=function(e,t,n){var r,i=this.LA(0);throw r=void 0!==n&&n.ERR_MSG?n.ERR_MSG:this.errorMessageProvider.buildMismatchTokenMessage({expected:e,actual:t,previous:i,ruleName:this.getCurrRuleFullName()}),this.SAVE_ERROR(new rr(r,t,i))},e.prototype.consumeInternalRecovery=function(e,t,n){if(!this.recoveryEnabled||"MismatchedTokenException"!==n.name||this.isBackTracking())throw n;var r=this.getFollowsForInRuleRecovery(e,t);try{return this.tryInRuleRecovery(e,r)}catch(i){throw i.name===lr?n:i}},e.prototype.saveRecogState=function(){var e=this.errors,t=Object(i["g"])(this.RULE_STACK);return{errors:e,lexerState:this.exportLexerState(),RULE_STACK:t,CST_STACK:this.CST_STACK,LAST_EXPLICIT_RULE_STACK:this.LAST_EXPLICIT_RULE_STACK}},e.prototype.reloadRecogState=function(e){this.errors=e.errors,this.importLexerState(e.lexerState),this.RULE_STACK=e.RULE_STACK},e.prototype.ruleInvocationStateUpdate=function(e,t,n){this.RULE_OCCURRENCE_STACK.push(n),this.RULE_STACK.push(e),this.cstInvocationStateUpdate(t,e)},e.prototype.isBackTracking=function(){return 0!==this.isBackTrackingStack.length},e.prototype.getCurrRuleFullName=function(){var e=this.getLastExplicitRuleShortName();return this.shortRuleNameToFull[e]},e.prototype.shortRuleNameToFullName=function(e){return this.shortRuleNameToFull[e]},e.prototype.isAtEndOfInput=function(){return this.tokenMatcher(this.LA(1),He)},e.prototype.reset=function(){this.resetLexerState(),this.isBackTrackingStack=[],this.errors=[],this.RULE_STACK=[],this.LAST_EXPLICIT_RULE_STACK=[],this.CST_STACK=[],this.RULE_OCCURRENCE_STACK=[]},e}(),_r=function(){function e(){}return e.prototype.initErrorHandler=function(e){this._errors=[],this.errorMessageProvider=Object(i["k"])(e.errorMessageProvider,Kr.errorMessageProvider)},e.prototype.SAVE_ERROR=function(e){if(nr(e))return e.context={ruleStack:this.getHumanReadableRuleStack(),ruleOccurrenceStack:Object(i["g"])(this.RULE_OCCURRENCE_STACK)},this._errors.push(e),e;throw Error("Trying to save an Error which is not a RecognitionException")},Object.defineProperty(e.prototype,"errors",{get:function(){return Object(i["g"])(this._errors)},set:function(e){this._errors=e},enumerable:!0,configurable:!0}),e.prototype.raiseEarlyExitException=function(e,t,n){for(var r=this.getCurrRuleFullName(),i=this.getGAstProductions()[r],s=dn(e,i,t,this.maxLookahead),o=s[0],a=[],l=1;l<=this.maxLookahead;l++)a.push(this.LA(l));var c=this.errorMessageProvider.buildEarlyExitMessage({expectedIterationPaths:o,actual:a,previous:this.LA(0),customUserDescription:n,ruleName:r});throw this.SAVE_ERROR(new or(c,this.LA(1),this.LA(0)))},e.prototype.raiseNoAltException=function(e,t){for(var n=this.getCurrRuleFullName(),r=this.getGAstProductions()[n],i=hn(e,r,this.maxLookahead),s=[],o=1;o<=this.maxLookahead;o++)s.push(this.LA(o));var a=this.LA(0),l=this.errorMessageProvider.buildNoViableAltMessage({expectedPathsPerAlt:i,actual:s,previous:a,customUserDescription:t,ruleName:this.getCurrRuleFullName()});throw this.SAVE_ERROR(new ir(l,this.LA(1),a))},e}(),Ir=function(){function e(){}return e.prototype.initContentAssist=function(){},e.prototype.computeContentAssist=function(e,t){var n=this.gastProductionsCache[e];if(Object(i["F"])(n))throw Error("Rule ->"+e+"<- does not exist in this grammar.");return Bt([n],t,this.tokenMatcher,this.maxLookahead)},e.prototype.getNextPossibleTokenTypes=function(e){var t=Object(i["s"])(e.ruleStack),n=this.getGAstProductions(),r=n[t],s=new Wt(r,e).startWalking();return s},e}(),Pr={description:"This Object indicates the Parser is during Recording Phase"};Object.freeze(Pr);var xr=!0,Dr=Math.pow(2,wt)-1,Ar=Fe({name:"RECORDING_PHASE_TOKEN",pattern:Te.NA});ce([Ar]);var Fr=ke(Ar,"This IToken indicates the Parser is in Recording Phase\n\tSee: https://sap.github.io/chevrotain/docs/guide/internals.html#grammar-recording for details",-1,-1,-1,-1,-1,-1);Object.freeze(Fr);var Yr={name:"This CSTNode indicates the Parser is in Recording Phase\n\tSee: https://sap.github.io/chevrotain/docs/guide/internals.html#grammar-recording for details",children:{}},Hr=function(){function e(){}return e.prototype.initGastRecorder=function(e){this.recordingProdStack=[],this.RECORDING_PHASE=!1},e.prototype.enableRecording=function(){var e=this;this.RECORDING_PHASE=!0,this.TRACE_INIT("Enable Recording",(function(){for(var t=function(t){var n=t>0?t:"";e["CONSUME"+n]=function(e,n){return this.consumeInternalRecord(e,t,n)},e["SUBRULE"+n]=function(e,n){return this.subruleInternalRecord(e,t,n)},e["OPTION"+n]=function(e){return this.optionInternalRecord(e,t)},e["OR"+n]=function(e){return this.orInternalRecord(e,t)},e["MANY"+n]=function(e){this.manyInternalRecord(t,e)},e["MANY_SEP"+n]=function(e){this.manySepFirstInternalRecord(t,e)},e["AT_LEAST_ONE"+n]=function(e){this.atLeastOneInternalRecord(t,e)},e["AT_LEAST_ONE_SEP"+n]=function(e){this.atLeastOneSepFirstInternalRecord(t,e)}},n=0;n<10;n++)t(n);e["consume"]=function(e,t,n){return this.consumeInternalRecord(t,e,n)},e["subrule"]=function(e,t,n){return this.subruleInternalRecord(t,e,n)},e["option"]=function(e,t){return this.optionInternalRecord(t,e)},e["or"]=function(e,t){return this.orInternalRecord(t,e)},e["many"]=function(e,t){this.manyInternalRecord(e,t)},e["atLeastOne"]=function(e,t){this.atLeastOneInternalRecord(e,t)},e.ACTION=e.ACTION_RECORD,e.BACKTRACK=e.BACKTRACK_RECORD,e.LA=e.LA_RECORD}))},e.prototype.disableRecording=function(){var e=this;this.RECORDING_PHASE=!1,this.TRACE_INIT("Deleting Recording methods",(function(){for(var t=0;t<10;t++){var n=t>0?t:"";delete e["CONSUME"+n],delete e["SUBRULE"+n],delete e["OPTION"+n],delete e["OR"+n],delete e["MANY"+n],delete e["MANY_SEP"+n],delete e["AT_LEAST_ONE"+n],delete e["AT_LEAST_ONE_SEP"+n]}delete e["consume"],delete e["subrule"],delete e["option"],delete e["or"],delete e["many"],delete e["atLeastOne"],delete e.ACTION,delete e.BACKTRACK,delete e.LA}))},e.prototype.ACTION_RECORD=function(e){},e.prototype.BACKTRACK_RECORD=function(e,t){return function(){return!0}},e.prototype.LA_RECORD=function(e){return Zr},e.prototype.topLevelRuleRecord=function(e,t){try{var n=new je({definition:[],name:e});return n.name=e,this.recordingProdStack.push(n),t.call(this),this.recordingProdStack.pop(),n}catch(r){if(!0!==r.KNOWN_RECORDER_ERROR)try{r.message=r.message+'\n\t This error was thrown during the "grammar recording phase" For more info see:\n\thttps://sap.github.io/chevrotain/docs/guide/internals.html#grammar-recording'}catch(i){throw r}throw r}},e.prototype.optionInternalRecord=function(e,t){return kr.call(this,Qe,e,t)},e.prototype.atLeastOneInternalRecord=function(e,t){kr.call(this,Ke,t,e)},e.prototype.atLeastOneSepFirstInternalRecord=function(e,t){kr.call(this,Ge,t,e,xr)},e.prototype.manyInternalRecord=function(e,t){kr.call(this,Be,t,e)},e.prototype.manySepFirstInternalRecord=function(e,t){kr.call(this,Je,t,e,xr)},e.prototype.orInternalRecord=function(e,t){return Vr.call(this,e,t)},e.prototype.subruleInternalRecord=function(e,t,n){if(Wr(t),!e||!1===Object(i["w"])(e,"ruleName")){var r=new Error("<SUBRULE"+Ur(t)+"> argument is invalid expecting a Parser method reference but got: <"+JSON.stringify(e)+">\n inside top level rule: <"+this.recordingProdStack[0].name+">");throw r.KNOWN_RECORDER_ERROR=!0,r}var s=Object(i["M"])(this.recordingProdStack),o=e["ruleName"],a=new Xe({idx:t,nonTerminalName:o,referencedRule:void 0});return s.definition.push(a),this.outputCst?Yr:Pr},e.prototype.consumeInternalRecord=function(e,t,n){if(Wr(t),!pe(e)){var r=new Error("<CONSUME"+Ur(t)+"> argument is invalid expecting a TokenType reference but got: <"+JSON.stringify(e)+">\n inside top level rule: <"+this.recordingProdStack[0].name+">");throw r.KNOWN_RECORDER_ERROR=!0,r}var s=Object(i["M"])(this.recordingProdStack),o=new $e({idx:t,terminalType:e});return s.definition.push(o),Fr},e}();function kr(e,t,n,r){void 0===r&&(r=!1),Wr(n);var s=Object(i["M"])(this.recordingProdStack),o=Object(i["B"])(t)?t:t.DEF,a=new e({definition:[],idx:n});return Object(i["w"])(t,"NAME")&&(a.name=t.NAME),r&&(a.separator=t.SEP),Object(i["w"])(t,"MAX_LOOKAHEAD")&&(a.maxLookahead=t.MAX_LOOKAHEAD),this.recordingProdStack.push(a),o.call(this),s.definition.push(a),this.recordingProdStack.pop(),Pr}function Vr(e,t){var n=this;Wr(t);var r=Object(i["M"])(this.recordingProdStack),s=!1===Object(i["y"])(e),o=!1===s?e:e.DEF,a=new ze({definition:[],idx:t,ignoreAmbiguities:s&&!0===e.IGNORE_AMBIGUITIES});Object(i["w"])(e,"NAME")&&(a.name=e.NAME),Object(i["w"])(e,"MAX_LOOKAHEAD")&&(a.maxLookahead=e.MAX_LOOKAHEAD);var l=Object(i["Q"])(o,(function(e){return Object(i["B"])(e.GATE)}));return a.hasPredicates=l,r.definition.push(a),Object(i["u"])(o,(function(e){var t=new Ze({definition:[]});a.definition.push(t),Object(i["w"])(e,"NAME")&&(t.name=e.NAME),Object(i["w"])(e,"IGNORE_AMBIGUITIES")?t.ignoreAmbiguities=e.IGNORE_AMBIGUITIES:Object(i["w"])(e,"GATE")&&(t.ignoreAmbiguities=!0),n.recordingProdStack.push(t),e.ALT.call(n),n.recordingProdStack.pop()})),Pr}function Ur(e){return 0===e?"":""+e}function Wr(e){if(e<0||e>Dr){var t=new Error("Invalid DSL Method idx value: <"+e+">\n\tIdx value must be a none negative value smaller than "+(Dr+1));throw t.KNOWN_RECORDER_ERROR=!0,t}}var Xr=function(){function e(){}return e.prototype.initPerformanceTracer=function(e){if(Object(i["w"])(e,"traceInitPerf")){var t=e.traceInitPerf,n="number"===typeof t;this.traceInitMaxIdent=n?t:1/0,this.traceInitPerf=n?t>0:t}else this.traceInitMaxIdent=0,this.traceInitPerf=Kr.traceInitPerf;this.traceInitIndent=-1},e.prototype.TRACE_INIT=function(e,t){if(!0===this.traceInitPerf){this.traceInitIndent++;var n=new Array(this.traceInitIndent+1).join("\t");this.traceInitIndent<this.traceInitMaxIdent&&console.log(n+"--\x3e <"+e+">");var r=Object(i["R"])(t),s=r.time,o=r.value,a=s>10?console.warn:console.log;return this.traceInitIndent<this.traceInitMaxIdent&&a(n+"<-- <"+e+"> time: "+s+"ms"),this.traceInitIndent--,o}return t()},e}(),jr=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Zr=ke(He,"",NaN,NaN,NaN,NaN,NaN,NaN);Object.freeze(Zr);var Qr,Kr=Object.freeze({recoveryEnabled:!1,maxLookahead:4,ignoredIssues:{},dynamicTokensEnabled:!1,outputCst:!0,errorMessageProvider:Wn,nodeLocationTracking:"none",traceInitPerf:!1,skipValidations:!1}),Gr=Object.freeze({recoveryValueFunc:function(){},resyncEnabled:!0});function Br(e){return void 0===e&&(e=void 0),function(){return e}}(function(e){e[e["INVALID_RULE_NAME"]=0]="INVALID_RULE_NAME",e[e["DUPLICATE_RULE_NAME"]=1]="DUPLICATE_RULE_NAME",e[e["INVALID_RULE_OVERRIDE"]=2]="INVALID_RULE_OVERRIDE",e[e["DUPLICATE_PRODUCTIONS"]=3]="DUPLICATE_PRODUCTIONS",e[e["UNRESOLVED_SUBRULE_REF"]=4]="UNRESOLVED_SUBRULE_REF",e[e["LEFT_RECURSION"]=5]="LEFT_RECURSION",e[e["NONE_LAST_EMPTY_ALT"]=6]="NONE_LAST_EMPTY_ALT",e[e["AMBIGUOUS_ALTS"]=7]="AMBIGUOUS_ALTS",e[e["CONFLICT_TOKENS_RULES_NAMESPACE"]=8]="CONFLICT_TOKENS_RULES_NAMESPACE",e[e["INVALID_TOKEN_NAME"]=9]="INVALID_TOKEN_NAME",e[e["INVALID_NESTED_RULE_NAME"]=10]="INVALID_NESTED_RULE_NAME",e[e["DUPLICATE_NESTED_NAME"]=11]="DUPLICATE_NESTED_NAME",e[e["NO_NON_EMPTY_LOOKAHEAD"]=12]="NO_NON_EMPTY_LOOKAHEAD",e[e["AMBIGUOUS_PREFIX_ALTS"]=13]="AMBIGUOUS_PREFIX_ALTS",e[e["TOO_MANY_ALTS"]=14]="TOO_MANY_ALTS"})(Qr||(Qr={}));var Jr=function(){function e(e,t){void 0===t&&(t=Kr),this.ignoredIssues=Kr.ignoredIssues,this.definitionErrors=[],this.selfAnalysisDone=!1;var n=this;n.initErrorHandler(t),n.initLexerAdapter(),n.initLooksAhead(t),n.initRecognizerEngine(e,t),n.initRecoverable(t),n.initTreeBuilder(t),n.initContentAssist(),n.initGastRecorder(t),n.initPerformanceTracer(t),Object(i["w"])(t,"ignoredIssues")&&t.ignoredIssues!==Kr.ignoredIssues&&Object(i["d"])("The <ignoredIssues> IParserConfig property is soft-deprecated and will be removed in future versions.\n\tPlease use the <IGNORE_AMBIGUITIES> flag on the relevant DSL method instead."),this.ignoredIssues=Object(i["w"])(t,"ignoredIssues")?t.ignoredIssues:Kr.ignoredIssues,this.skipValidations=Object(i["w"])(t,"skipValidations")?t.skipValidations:Kr.skipValidations}return e.performSelfAnalysis=function(e){e.performSelfAnalysis()},e.prototype.performSelfAnalysis=function(){var t=this;this.TRACE_INIT("performSelfAnalysis",(function(){var n;t.selfAnalysisDone=!0;var r=t.className;t.TRACE_INIT("toFastProps",(function(){Object(i["S"])(t)})),t.TRACE_INIT("Grammar Recording",(function(){try{t.enableRecording(),Object(i["u"])(t.definedRulesNames,(function(e){var n=t[e],r=n["originalGrammarAction"],i=void 0;t.TRACE_INIT(e+" Rule",(function(){i=t.topLevelRuleRecord(e,r)})),t.gastProductionsCache[e]=i}))}finally{t.disableRecording()}}));var s=[];if(t.TRACE_INIT("Grammar Resolving",(function(){s=Gn({rules:Object(i["U"])(t.gastProductionsCache)}),t.definitionErrors.push.apply(t.definitionErrors,s)})),t.TRACE_INIT("Grammar Validations",(function(){if(Object(i["A"])(s)&&!1===t.skipValidations){var e=Bn({rules:Object(i["U"])(t.gastProductionsCache),maxLookahead:t.maxLookahead,tokenTypes:Object(i["U"])(t.tokensMap),ignoredIssues:t.ignoredIssues,errMsgProvider:jn,grammarName:r});t.definitionErrors.push.apply(t.definitionErrors,e)}})),Object(i["A"])(t.definitionErrors)&&(t.recoveryEnabled&&t.TRACE_INIT("computeAllProdsFollows",(function(){var e=Mt(Object(i["U"])(t.gastProductionsCache));t.resyncFollows=e})),t.TRACE_INIT("ComputeLookaheadFunctions",(function(){t.preComputeLookaheadFunctions(Object(i["U"])(t.gastProductionsCache))}))),t.TRACE_INIT("expandAllNestedRuleNames",(function(){var e=kt(Object(i["U"])(t.gastProductionsCache),t.fullRuleNameToShort);t.allRuleNames=e.allRuleNames})),!e.DEFER_DEFINITION_ERRORS_HANDLING&&!Object(i["A"])(t.definitionErrors))throw n=Object(i["I"])(t.definitionErrors,(function(e){return e.message})),new Error("Parser Definition Errors detected:\n "+n.join("\n-------------------------------\n"))}))},e.DEFER_DEFINITION_ERRORS_HANDLING=!1,e}();Object(i["e"])(Jr,[ur,dr,Er,Cr,Nr,Lr,_r,Ir,Hr,Xr]);var zr=function(e){function t(t,n){void 0===n&&(n=Kr);var r=this,s=Object(i["h"])(n);return s.outputCst=!0,r=e.call(this,t,s)||this,r}return jr(t,e),t}(Jr),$r=function(e){function t(t,n){void 0===n&&(n=Kr);var r=this,s=Object(i["h"])(n);return s.outputCst=!1,r=e.call(this,t,s)||this,r}return jr(t,e),t}(Jr);function qr(e,t){var n=void 0===t?{}:t,i=n.resourceBase,s=void 0===i?"https://unpkg.com/chevrotain@"+r+"/diagrams/":i,o=n.css,a=void 0===o?"https://unpkg.com/chevrotain@"+r+"/diagrams/diagrams.css":o,l='\n\x3c!-- This is a generated file --\x3e\n<!DOCTYPE html>\n<meta charset="utf-8">\n<style>\n body {\n background-color: hsl(30, 20%, 95%)\n }\n</style>\n\n',c="\n<link rel='stylesheet' href='"+a+"'>\n",u="\n<script src='"+s+"vendor/railroad-diagrams.js'><\/script>\n<script src='"+s+"src/diagrams_builder.js'><\/script>\n<script src='"+s+"src/diagrams_behavior.js'><\/script>\n<script src='"+s+"src/main.js'><\/script>\n",h='\n<div id="diagrams" align="center"></div> \n',d="\n<script>\n window.serializedGrammar = "+JSON.stringify(e,null," ")+";\n<\/script>\n",m='\n<script>\n var diagramsDiv = document.getElementById("diagrams");\n main.drawDiagramsFromSerializedGrammar(serializedGrammar, diagramsDiv);\n<\/script>\n';return l+c+u+h+d+m}var ei="\n";function ti(e){return"\n(function (root, factory) {\n if (typeof define === 'function' && define.amd) {\n // AMD. Register as an anonymous module.\n define(['chevrotain'], factory);\n } else if (typeof module === 'object' && module.exports) {\n // Node. Does not work with strict CommonJS, but\n // only CommonJS-like environments that support module.exports,\n // like Node.\n module.exports = factory(require('chevrotain'));\n } else {\n // Browser globals (root is window)\n root.returnExports = factory(root.b);\n }\n}(typeof self !== 'undefined' ? self : this, function (chevrotain) {\n\n"+ri(e)+"\n \nreturn {\n "+e.name+": "+e.name+" \n}\n}));\n"}function ni(e){return" \n"+ri(e)+"\nreturn new "+e.name+"(tokenVocabulary, config) \n"}function ri(e){var t="\nfunction "+e.name+"(tokenVocabulary, config) {\n // invoke super constructor\n // No support for embedded actions currently, so we can 'hardcode'\n // The use of CstParser.\n chevrotain.CstParser.call(this, tokenVocabulary, config)\n\n const $ = this\n\n "+ii(e.rules)+"\n\n // very important to call this after all the rules have been defined.\n // otherwise the parser may not work correctly as it will lack information\n // derived during the self analysis phase.\n this.performSelfAnalysis(this)\n}\n\n// inheritance as implemented in javascript in the previous decade... :(\n"+e.name+".prototype = Object.create(chevrotain.CstParser.prototype)\n"+e.name+".prototype.constructor = "+e.name+" \n ";return t}function ii(e){var t=Object(i["I"])(e,(function(e){return si(e,1)}));return t.join("\n")}function si(e,t){var n=gi(t,'$.RULE("'+e.name+'", function() {')+ei;return n+=mi(e.definition,t+1),n+=gi(t+1,"})")+ei,n}function oi(e,t){var n=e.terminalType.name;return gi(t,"$.CONSUME"+e.idx+"(this.tokensMap."+n+")"+ei)}function ai(e,t){return gi(t,"$.SUBRULE"+e.idx+"($."+e.nonTerminalName+")"+ei)}function li(e,t){var n=gi(t,"$.OR"+e.idx+"([")+ei,r=Object(i["I"])(e.definition,(function(e){return ci(e,t+1)}));return n+=r.join(","+ei),n+=ei+gi(t,"])"+ei),n}function ci(e,t){var n=gi(t,"{")+ei;return e.name&&(n+=gi(t+1,'NAME: "'+e.name+'",')+ei),n+=gi(t+1,"ALT: function() {")+ei,n+=mi(e.definition,t+1),n+=gi(t+1,"}")+ei,n+=gi(t,"}"),n}function ui(e,t){if(e instanceof Xe)return ai(e,t);if(e instanceof Qe)return hi("OPTION",e,t);if(e instanceof Ke)return hi("AT_LEAST_ONE",e,t);if(e instanceof Ge)return hi("AT_LEAST_ONE_SEP",e,t);if(e instanceof Je)return hi("MANY_SEP",e,t);if(e instanceof Be)return hi("MANY",e,t);if(e instanceof ze)return li(e,t);if(e instanceof $e)return oi(e,t);if(e instanceof Ze)return mi(e.definition,t);throw Error("non exhaustive match")}function hi(e,t,n){var r=gi(n,"$."+(e+t.idx)+"(");return t.name||t.separator?(r+="{"+ei,t.name&&(r+=gi(n+1,'NAME: "'+t.name+'"')+","+ei),t.separator&&(r+=gi(n+1,"SEP: this.tokensMap."+t.separator.name)+","+ei),r+="DEF: "+di(t.definition,n+2)+ei,r+=gi(n,"}")+ei):r+=di(t.definition,n+1),r+=gi(n,")")+ei,r}function di(e,t){var n="function() {"+ei;return n+=mi(e,t),n+=gi(t,"}")+ei,n}function mi(e,t){var n="";return Object(i["u"])(e,(function(e){n+=ui(e,t+1)})),n}function gi(e,t){var n=Array(4*e+1).join(" ");return n+t}function pi(e){var t=ni({name:e.name,rules:e.rules}),r=new Function("tokenVocabulary","config","chevrotain",t);return function(t){return r(e.tokenVocabulary,t,n("fa83"))}}function fi(e){return ti({name:e.name,rules:e.rules})}function Ri(){console.warn("The clearCache function was 'soft' removed from the Chevrotain API.\n\t It performs no action other than printing this message.\n\t Please avoid using it as it will be completely removed in the future")}},facd:function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
  1180. //! moment.js locale configuration
  1181. var t="jan._feb._mrt._apr._mei_jun._jul._aug._sep._okt._nov._dec.".split("_"),n="jan_feb_mrt_apr_mei_jun_jul_aug_sep_okt_nov_dec".split("_"),r=[/^jan/i,/^feb/i,/^(maart|mrt\.?)$/i,/^apr/i,/^mei$/i,/^jun[i.]?$/i,/^jul[i.]?$/i,/^aug/i,/^sep/i,/^okt/i,/^nov/i,/^dec/i],i=/^(januari|februari|maart|april|mei|ju[nl]i|augustus|september|oktober|november|december|jan\.?|feb\.?|mrt\.?|apr\.?|ju[nl]\.?|aug\.?|sep\.?|okt\.?|nov\.?|dec\.?)/i,s=e.defineLocale("nl",{months:"januari_februari_maart_april_mei_juni_juli_augustus_september_oktober_november_december".split("_"),monthsShort:function(e,r){return e?/-MMM-/.test(r)?n[e.month()]:t[e.month()]:t},monthsRegex:i,monthsShortRegex:i,monthsStrictRegex:/^(januari|februari|maart|april|mei|ju[nl]i|augustus|september|oktober|november|december)/i,monthsShortStrictRegex:/^(jan\.?|feb\.?|mrt\.?|apr\.?|mei|ju[nl]\.?|aug\.?|sep\.?|okt\.?|nov\.?|dec\.?)/i,monthsParse:r,longMonthsParse:r,shortMonthsParse:r,weekdays:"zondag_maandag_dinsdag_woensdag_donderdag_vrijdag_zaterdag".split("_"),weekdaysShort:"zo._ma._di._wo._do._vr._za.".split("_"),weekdaysMin:"zo_ma_di_wo_do_vr_za".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD-MM-YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[vandaag om] LT",nextDay:"[morgen om] LT",nextWeek:"dddd [om] LT",lastDay:"[gisteren om] LT",lastWeek:"[afgelopen] dddd [om] LT",sameElse:"L"},relativeTime:{future:"over %s",past:"%s geleden",s:"een paar seconden",ss:"%d seconden",m:"één minuut",mm:"%d minuten",h:"één uur",hh:"%d uur",d:"één dag",dd:"%d dagen",w:"één week",ww:"%d weken",M:"één maand",MM:"%d maanden",y:"één jaar",yy:"%d jaar"},dayOfMonthOrdinalParse:/\d{1,2}(ste|de)/,ordinal:function(e){return e+(1===e||8===e||e>=20?"ste":"de")},week:{dow:1,doy:4}});return s}))},fd7e:function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
  1182. //! moment.js locale configuration
  1183. var t=e.defineLocale("x-pseudo",{months:"J~áñúá~rý_F~ébrú~árý_~Márc~h_Áp~ríl_~Máý_~Júñé~_Júl~ý_Áú~gúst~_Sép~témb~ér_Ó~ctób~ér_Ñ~óvém~bér_~Décé~mbér".split("_"),monthsShort:"J~áñ_~Féb_~Már_~Ápr_~Máý_~Júñ_~Júl_~Áúg_~Sép_~Óct_~Ñóv_~Déc".split("_"),monthsParseExact:!0,weekdays:"S~úñdá~ý_Mó~ñdáý~_Túé~sdáý~_Wéd~ñésd~áý_T~húrs~dáý_~Fríd~áý_S~átúr~dáý".split("_"),weekdaysShort:"S~úñ_~Móñ_~Túé_~Wéd_~Thú_~Frí_~Sát".split("_"),weekdaysMin:"S~ú_Mó~_Tú_~Wé_T~h_Fr~_Sá".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[T~ódá~ý át] LT",nextDay:"[T~ómó~rró~w át] LT",nextWeek:"dddd [át] LT",lastDay:"[Ý~ést~érdá~ý át] LT",lastWeek:"[L~ást] dddd [át] LT",sameElse:"L"},relativeTime:{future:"í~ñ %s",past:"%s á~gó",s:"á ~féw ~sécó~ñds",ss:"%d s~écóñ~ds",m:"á ~míñ~úté",mm:"%d m~íñú~tés",h:"á~ñ hó~úr",hh:"%d h~óúrs",d:"á ~dáý",dd:"%d d~áýs",M:"á ~móñ~th",MM:"%d m~óñt~hs",y:"á ~ýéár",yy:"%d ý~éárs"},dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10,n=1===~~(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th";return e+n},week:{dow:1,doy:4}});return t}))},ffec:function(e,t,n){"use strict";n.r(t),n.d(t,"isNumeric",(function(){return r})),n.d(t,"isNumericLike",(function(){return i})),n.d(t,"rangeEach",(function(){return s})),n.d(t,"rangeEachReverse",(function(){return o})),n.d(t,"valueAccordingPercent",(function(){return a})),n.d(t,"clamp",(function(){return l}));n("1e70"),n("79a4"),n("c1a1"),n("8b00"),n("a4e7"),n("1e5a"),n("72c3");function r(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];const n=typeof e;if("number"===n)return!isNaN(e)&&isFinite(e);if("string"===n){if(0===e.length)return!1;if(1===e.length)return/\d/.test(e);const n=Array.from(new Set([".",...t])).map(e=>"\\"+e).join("|");return new RegExp(`^[+-]?(((${n})?\\d+((${n})\\d+)?(e[+-]?\\d+)?)|(0x[a-f\\d]+))$`,"i").test(e.trim())}return"object"===n&&(!!e&&"number"===typeof e.valueOf()&&!(e instanceof Date))}function i(e){return r(e,[","])}function s(e,t,n){let r=-1;"function"===typeof t?(n=t,t=e):r=e-1;while(++r<=t)if(!1===n(r))break}function o(e,t,n){let r=e+1;"function"===typeof t&&(n=t,t=0);while(--r>=t)if(!1===n(r))break}function a(e,t){return t=parseInt(t.toString().replace("%",""),10),t=isNaN(t)?0:t,parseInt(e*t/100,10)}function l(e,t,n){return Math.min(e,t)===e?t:Math.max(e,n)===e?n:e}},ffff:function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
  1184. //! moment.js locale configuration
  1185. var t=e.defineLocale("se",{months:"ođđajagemánnu_guovvamánnu_njukčamánnu_cuoŋománnu_miessemánnu_geassemánnu_suoidnemánnu_borgemánnu_čakčamánnu_golggotmánnu_skábmamánnu_juovlamánnu".split("_"),monthsShort:"ođđj_guov_njuk_cuo_mies_geas_suoi_borg_čakč_golg_skáb_juov".split("_"),weekdays:"sotnabeaivi_vuossárga_maŋŋebárga_gaskavahkku_duorastat_bearjadat_lávvardat".split("_"),weekdaysShort:"sotn_vuos_maŋ_gask_duor_bear_láv".split("_"),weekdaysMin:"s_v_m_g_d_b_L".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"MMMM D. [b.] YYYY",LLL:"MMMM D. [b.] YYYY [ti.] HH:mm",LLLL:"dddd, MMMM D. [b.] YYYY [ti.] HH:mm"},calendar:{sameDay:"[otne ti] LT",nextDay:"[ihttin ti] LT",nextWeek:"dddd [ti] LT",lastDay:"[ikte ti] LT",lastWeek:"[ovddit] dddd [ti] LT",sameElse:"L"},relativeTime:{future:"%s geažes",past:"maŋit %s",s:"moadde sekunddat",ss:"%d sekunddat",m:"okta minuhta",mm:"%d minuhtat",h:"okta diimmu",hh:"%d diimmut",d:"okta beaivi",dd:"%d beaivvit",M:"okta mánnu",MM:"%d mánut",y:"okta jahki",yy:"%d jagit"},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}});return t}))}}]);