| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758 |
- /*! For license information please see vendors2.bundle.js.LICENSE.txt */
- "use strict";(self.webpackChunkfront=self.webpackChunkfront||[]).push([[354],{34:(t,e,o)=>{var n=o(4901);t.exports=function(t){return"object"==typeof t?null!==t:n(t)}},81:(t,e,o)=>{var n=o(9565),i=o(9306),r=o(8551),s=o(6823),l=o(851),a=TypeError;t.exports=function(t,e){var o=arguments.length<2?l(t):e;if(i(o))return r(n(o,t));throw new a(s(t)+" is not iterable")}},91:(t,e,o)=>{o.d(e,{$w:()=>tt,Bq:()=>v,C0:()=>it,D1:()=>X,DK:()=>F,De:()=>y,E3:()=>Z,Gq:()=>V,I6:()=>et,Ie:()=>S,JC:()=>z,K7:()=>_,LL:()=>U,Ly:()=>l,Mv:()=>E,ON:()=>K,Oe:()=>c,PA:()=>r,Pe:()=>u,Sx:()=>M,Vp:()=>O,XJ:()=>Y,Xu:()=>j,Xy:()=>J,ZK:()=>Q,aM:()=>ot,aO:()=>d,c6:()=>T,cY:()=>I,cr:()=>h,eU:()=>B,fX:()=>L,gd:()=>D,gj:()=>nt,h$:()=>P,hY:()=>A,iQ:()=>w,kp:()=>a,nB:()=>m,p6:()=>N,sb:()=>rt,v1:()=>H,vZ:()=>$,v_:()=>k,vg:()=>C,vy:()=>b,xM:()=>W,yn:()=>g,yq:()=>s,zN:()=>x,zO:()=>q}),o(6280),o(4114),o(8992),o(4520),o(3949);var n=o(4360),i=o(6422);function r(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,o=-1,n=null,i=t;for(;null!==i;){if(o===e){n=i;break}i.host&&i.nodeType===Node.DOCUMENT_FRAGMENT_NODE?i=i.host:(o+=1,i=i.parentNode)}return n}function s(t,e){const o=t.closest(".handsontable");return!!o&&(o.parentNode===e||o===e)}function l(t){return function(t){return Object.getPrototypeOf(t.parent)&&t.frameElement}(t)&&t.parent}function a(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],o=arguments.length>2?arguments[2]:void 0;const{ELEMENT_NODE:n,DOCUMENT_FRAGMENT_NODE:i}=Node;let r=t;for(;null!=r&&r!==o;){const{nodeType:t,nodeName:o}=r;if(t===n&&(e.includes(o)||e.includes(r)))return r;const{host:s}=r;r=s&&t===i?s:r.parentNode}return null}function h(t,e,o){const n=[];let i=t;for(;i&&(i=a(i,e,o),i&&(!o||o.contains(i)));)n.push(i),i=i.host&&i.nodeType===Node.DOCUMENT_FRAGMENT_NODE?i.host:i.parentNode;const r=n.length;return r?n[r-1]:null}function c(t,e){const o={element:void 0,classNames:[]};let n=t;for(;null!==n&&n!==t.ownerDocument.documentElement&&!o.element;){if("string"==typeof e&&n.classList.contains(e))o.element=n,o.classNames.push(e);else if(e instanceof RegExp){const t=Array.from(n.classList).filter((t=>e.test(t)));t.length&&(o.element=n,o.classNames.push(...t))}n=n.parentElement}return o}function d(t,e){let o=t.parentNode,n=[];for("string"==typeof e?n=t.defaultView?Array.prototype.slice.call(t.querySelectorAll(e),0):Array.prototype.slice.call(t.ownerDocument.querySelectorAll(e),0):n.push(e);null!==o;){if(n.indexOf(o)>-1)return!0;o=o.parentNode}return!1}function u(t){let e=0,o=t;if(o.previousSibling)for(;o=o.previousSibling;)e+=1;return e}function g(t,e,o){const n=o.parentElement.querySelector(`.ht_clone_${t}`);return n?n.contains(e):null}function f(t){return t&&t.length?t.filter((t=>!!t)):[]}function p(t,e){if(!t||!t.length)return e?{regexFree:[],regexes:[]}:[];const o=[],n=[];return n.push(...t.filter((t=>{const n=t instanceof RegExp;return n&&e&&o.push(t),!n}))),e?{regexFree:n,regexes:o}:n}function m(t,e){return void 0!==t.classList&&"string"==typeof e&&""!==e&&t.classList.contains(e)}function w(t,e){"string"==typeof e&&(e=e.split(" ")),(e=f(e)).length>0&&t.classList.add(...e)}function b(t,e){"string"==typeof e?e=e.split(" "):e instanceof RegExp&&(e=[e]);let{regexFree:o,regexes:n}=p(e,!0);o=f(o),o.length>0&&t.classList.remove(...o),n.forEach((e=>{t.classList.forEach((o=>{e.test(o)&&t.classList.remove(o)}))}))}function v(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],o=arguments.length>2?arguments[2]:void 0;Array.isArray(e)||(e=[[e,o]]),e.forEach((e=>{Array.isArray(e)&&""!==e[0]&&t.setAttribute(...e)}))}function y(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];"string"==typeof e?e=e.split(" "):e instanceof RegExp&&(e=[e]);const{regexFree:o,regexes:n}=p(e,!0);o.forEach((e=>{""!==e&&t.removeAttribute(e)})),n.forEach((e=>{t.getAttributeNames().forEach((o=>{e.test(o)&&t.removeAttribute(o)}))}))}function C(t){if(3===t.nodeType)t.parentNode.removeChild(t);else if(["TABLE","THEAD","TBODY","TFOOT","TR"].indexOf(t.nodeName)>-1){const e=t.childNodes;for(let t=e.length-1;t>=0;t--)C(e[t])}}function S(t){let e;for(;e=t.lastChild;)t.removeChild(e)}const R=/(<(.*)>|&(.*);)/;function E(t,e){let o=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];R.test(e)?t.innerHTML=o?(0,n.aj)(e):e:T(t,e)}function T(t,e){const o=t.firstChild;o&&3===o.nodeType&&null===o.nextSibling?o.textContent=e:(S(t),t.appendChild(t.ownerDocument.createTextNode(e)))}function x(t){const e=t.ownerDocument.documentElement,o=t.ownerDocument.defaultView;let n=t;for(;n!==e;){if(null===n)return!1;if(n.nodeType===Node.DOCUMENT_FRAGMENT_NODE){if(n.host){if(n.host.impl)return x(n.host.impl);if(n.host)return x(n.host);throw new Error("Lost in Web Components world")}return!1}if("none"===o.getComputedStyle(n).display)return!1;n=n.parentNode}return!0}function M(t){const e=t.ownerDocument.defaultView;let o=t;for(;o.parentNode;){if("0px"===o.style.height||"0"===o.style.height)return"hidden"===e.getComputedStyle(o).overflow;o=o.parentNode}return!1}function I(t){const e=t.ownerDocument,o=e.defaultView,n=e.documentElement;let i,r,s,l=t;for(i=l.offsetLeft,r=l.offsetTop,s=l;(l=l.offsetParent)&&l!==e.body&&"offsetLeft"in l;)i+=l.offsetLeft,r+=l.offsetTop,s=l;return s&&"fixed"===s.style.position&&(i+=o.pageXOffset||n.scrollLeft,r+=o.pageYOffset||n.scrollTop),{left:i,top:r}}function H(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:window).scrollY}function O(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:window).scrollX}function A(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:window;return t===e?H(e):t.scrollTop}function k(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:window;return t===e?O(e):t.scrollLeft}function _(t){let e=t.ownerDocument,o=e?e.defaultView:void 0;e||(e=t.document?t.document:t,o=e.defaultView);const n=["auto","scroll"];let i=t.parentNode;for(;i&&i.style&&e.body!==i;){let{overflow:t,overflowX:e,overflowY:r}=i.style;if([t,e,r].includes("scroll"))return i;if(({overflow:t,overflowX:e,overflowY:r}=o.getComputedStyle(i)),n.includes(t)||n.includes(e)||n.includes(r))return i;if(i.clientHeight<=i.scrollHeight+1&&(n.includes(r)||n.includes(t)))return i;if(i.clientWidth<=i.scrollWidth+1&&(n.includes(e)||n.includes(t)))return i;i=i.parentNode}return o}function N(t){return t.scrollHeight-t.clientHeight}function P(t){return t.scrollWidth-t.clientWidth}function L(t){const e=t.ownerDocument,o=e.defaultView;let n=t.parentNode;for(;n&&n.style&&e.body!==n;){if("visible"!==n.style.overflow&&""!==n.style.overflow)return n;const t=o.getComputedStyle(n),e=["scroll","hidden","auto"],i=t.getPropertyValue("overflow"),r=t.getPropertyValue("overflow-y"),s=t.getPropertyValue("overflow-x");if(e.includes(i)||e.includes(r)||e.includes(s))return n;n=n.parentNode}return o}function D(t,e){let o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:window;if(!t)return;if(t===o)return"width"===e?`${o.innerWidth}px`:"height"===e?`${o.innerHeight}px`:void 0;const n=t.style[e];if(""!==n&&void 0!==n)return n;const i=o.getComputedStyle(t);return""!==i[e]&&void 0!==i[e]?i[e]:void 0}function V(t){return t.offsetWidth}function F(t){return t.offsetHeight}function B(t){return t.clientHeight||t.innerHeight}function W(t){return t.clientWidth||t.innerWidth}function z(t){return t.selectionStart?t.selectionStart:0}function j(t){return t.selectionEnd?t.selectionEnd:0}function U(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window;t.getSelection&&(t.getSelection().empty?t.getSelection().empty():t.getSelection().removeAllRanges&&t.getSelection().removeAllRanges())}function $(t,e,o){if(void 0===o&&(o=e),t.setSelectionRange){t.focus();try{t.setSelectionRange(e,o)}catch(n){const i=t.parentNode,r=i.style.display;i.style.display="block",t.setSelectionRange(e,o),i.style.display=r}}}let G;function Y(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document;return void 0===G&&(G=function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document;const e=t.createElement("div");e.style.height="200px",e.style.width="100%";const o=t.createElement("div");o.style.boxSizing="content-box",o.style.height="150px",o.style.left="0px",o.style.overflow="hidden",o.style.position="absolute",o.style.top="0px",o.style.width="200px",o.style.visibility="hidden",o.appendChild(e),(t.body||t.documentElement).appendChild(o);const n=e.offsetWidth;o.style.overflow="scroll";let i=e.offsetWidth;return n===i&&(i=o.clientWidth),(t.body||t.documentElement).removeChild(o),n-i}(t)),G}function X(t){return t instanceof Window?t.document.body.scrollHeight>t.innerHeight:t.offsetWidth!==t.clientWidth}function q(t){return t instanceof Window?t.document.body.scrollWidth>t.innerWidth:t.offsetHeight!==t.clientHeight}function K(t,e,o){t.style.transform=`translate3d(${e},${o},0)`}function Q(t){t.style.transform&&""!==t.style.transform&&(t.style.transform="")}function J(t){return t&&(["INPUT","SELECT","TEXTAREA"].indexOf(t.nodeName)>-1||"true"===t.contentEditable)}function Z(t){return J(t)&&!1===t.hasAttribute("data-hot-input")}function tt(t){return!t.parentNode}function et(t,e){new IntersectionObserver(((o,n)=>{o.forEach((o=>{o.isIntersecting&&null!==t.offsetParent&&(e(),n.unobserve(t))}))}),{root:t.ownerDocument.body}).observe(t)}function ot(t){let e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],o=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];const n=t.ownerDocument,r=n.createRange(),s=n.defaultView.getSelection();v(t,"contenteditable",!0),o&&v(t,...(0,i.MG)()),e&&w(t,"invisibleSelection"),r.selectNodeContents(t),s.removeAllRanges(),s.addRange(r)}function nt(t){let e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];const o=t.ownerDocument.defaultView.getSelection();t.hasAttribute("aria-hidden")&&t.removeAttribute("aria-hidden"),o.removeAllRanges(),e&&b(t,"invisibleSelection"),t.removeAttribute("contenteditable")}function it(t,e){let o=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];ot(t,o),e(),nt(t,o)}function rt(t){var e;const o=null==t||null===(e=t.ownerDocument)||void 0===e?void 0:e.defaultView.Element;return!!(o&&null!==o&&t instanceof o)}},116:(t,e,o)=>{var n=o(6518),i=o(9565),r=o(2652),s=o(9306),l=o(8551),a=o(1767),h=o(9539),c=o(4549)("find",TypeError);n({target:"Iterator",proto:!0,real:!0,forced:c},{find:function(t){l(this);try{s(t)}catch(t){h(this,"throw",t)}if(c)return i(c,this,t);var e=a(this),o=0;return r(e,(function(e,n){if(t(e,o++))return n(e)}),{IS_RECORD:!0,INTERRUPTED:!0}).result}})},192:(t,e,o)=>{o.d(e,{E6:()=>n,Hb:()=>l,LX:()=>r,OS:()=>c,PP:()=>i,QP:()=>h,Yt:()=>s,_8:()=>a});const n="active-header",i="header",r="area",s="focus",l="fill",a="row",h="column",c="custom-selection"},237:(t,e,o)=>{o(6469)("flatMap")},283:(t,e,o)=>{var n=o(9504),i=o(9039),r=o(4901),s=o(9297),l=o(3724),a=o(350).CONFIGURABLE,h=o(3706),c=o(1181),d=c.enforce,u=c.get,g=String,f=Object.defineProperty,p=n("".slice),m=n("".replace),w=n([].join),b=l&&!i((function(){return 8!==f((function(){}),"length",{value:8}).length})),v=String(String).split("String"),y=t.exports=function(t,e,o){"Symbol("===p(g(e),0,7)&&(e="["+m(g(e),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),o&&o.getter&&(e="get "+e),o&&o.setter&&(e="set "+e),(!s(t,"name")||a&&t.name!==e)&&(l?f(t,"name",{value:e,configurable:!0}):t.name=e),b&&o&&s(o,"arity")&&t.length!==o.arity&&f(t,"length",{value:o.arity});try{o&&s(o,"constructor")&&o.constructor?l&&f(t,"prototype",{writable:!1}):t.prototype&&(t.prototype=void 0)}catch(t){}var n=d(t);return s(n,"source")||(n.source=w(v,"string"==typeof e?e:"")),t};Function.prototype.toString=y((function(){return r(this)&&u(this).source||h(this)}),"toString")},350:(t,e,o)=>{var n=o(3724),i=o(9297),r=Function.prototype,s=n&&Object.getOwnPropertyDescriptor,l=i(r,"name"),a=l&&"something"===function(){}.name,h=l&&(!n||n&&s(r,"name").configurable);t.exports={EXISTS:l,PROPER:a,CONFIGURABLE:h}},360:(t,e,o)=>{o.d(e,{Gk:()=>g,L4:()=>h,r0:()=>u}),o(6280);var n=o(4647),i=o(1080),r=o(4950),s=o(2993);const{register:l,getItem:a,hasItem:h,getNames:c,getValues:d}=(0,n.A)("cellTypes");function u(t){if(!h(t))throw Error(`You declared cell type "${t}" 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 a(t)}function g(t,e){"string"!=typeof t&&(t=(e=t).CELL_TYPE);const{editor:o,renderer:n,validator:a}=e;o&&(0,i.VA)(t,o),n&&(0,r.TS)(t,n),a&&(0,s.qV)(t,a),l(t,e)}},397:(t,e,o)=>{var n=o(7751);t.exports=n("document","documentElement")},421:t=>{t.exports={}},507:(t,e,o)=>{var n=o(9565);t.exports=function(t,e,o){for(var i,r,s=o?t:t.iterator,l=t.next;!(i=n(l,s)).done;)if(void 0!==(r=e(i.value)))return r}},531:(t,e,o)=>{var n=o(6518),i=o(9565),r=o(9306),s=o(8551),l=o(1767),a=o(8646),h=o(9462),c=o(9539),d=o(6395),u=o(4549),g=!d&&u("flatMap",TypeError),f=h((function(){for(var t,e,o=this.iterator,n=this.mapper;;){if(e=this.inner)try{if(!(t=s(i(e.next,e.iterator))).done)return t.value;this.inner=null}catch(t){c(o,"throw",t)}if(t=s(i(this.next,o)),this.done=!!t.done)return;try{this.inner=a(n(t.value,this.counter++),!1)}catch(t){c(o,"throw",t)}}}));n({target:"Iterator",proto:!0,real:!0,forced:d||g},{flatMap:function(t){s(this);try{r(t)}catch(t){c(this,"throw",t)}return g?i(g,this,t):new f(l(this),{mapper:t,inner:null})}})},616:(t,e,o)=>{var n=o(9039);t.exports=!n((function(){var t=function(){}.bind();return"function"!=typeof t||t.hasOwnProperty("prototype")}))},655:(t,e,o)=>{var n=o(6955),i=String;t.exports=function(t){if("Symbol"===n(t))throw new TypeError("Cannot convert a Symbol value to a string");return i(t)}},670:(t,e,o)=>{o(531)},679:(t,e,o)=>{var n=o(1625),i=TypeError;t.exports=function(t,e){if(n(e,t))return t;throw new i("Incorrect invocation")}},741:t=>{var e=Math.ceil,o=Math.floor;t.exports=Math.trunc||function(t){var n=+t;return(n>0?o:e)(n)}},747:(t,e,o)=>{var n=o(6699),i=o(6193),r=o(4659),s=Error.captureStackTrace;t.exports=function(t,e,o,l){r&&(s?s(t,e):n(t,"stack",i(o,l)))}},757:(t,e,o)=>{var n=o(7751),i=o(4901),r=o(1625),s=o(7040),l=Object;t.exports=s?function(t){return"symbol"==typeof t}:function(t){var e=n("Symbol");return i(e)&&r(e.prototype,l(t))}},788:(t,e,o)=>{var n=o(34),i=o(2195),r=o(8227)("match");t.exports=function(t){var e;return n(t)&&(void 0!==(e=t[r])?!!e:"RegExp"===i(t))}},851:(t,e,o)=>{var n=o(6955),i=o(5966),r=o(4117),s=o(6269),l=o(8227)("iterator");t.exports=function(t){if(!r(t))return i(t,l)||i(t,"@@iterator")||s[n(t)]}},1034:(t,e,o)=>{var n=o(9565),i=o(9297),r=o(1625),s=o(7979),l=RegExp.prototype;t.exports=function(t){var e=t.flags;return void 0!==e||"flags"in l||i(t,"flags")||!r(l,t)?e:n(s,t)}},1056:(t,e,o)=>{var n=o(4913).f;t.exports=function(t,e,o){o in t||n(t,o,{configurable:!0,get:function(){return e[o]},set:function(t){e[o]=t}})}},1072:(t,e,o)=>{var n=o(1828),i=o(8727);t.exports=Object.keys||function(t){return n(t,i)}},1080:(t,e,o)=>{o.d(e,{L3:()=>u,M8:()=>g,VA:()=>f,aZ:()=>a}),o(6280);var n=o(3487),i=o(4647);const r=new WeakMap,{register:s,getItem:l,hasItem:a,getNames:h,getValues:c}=(0,i.A)("editors");function d(t){const e={},o=t;this.getConstructor=function(){return t},this.getInstance=function(t){return t.guid in e||(e[t.guid]=new o(t)),e[t.guid]},n.R.getSingleton().add("afterDestroy",(function(){e[this.guid]=null}))}function u(t,e){let o;if("function"==typeof t)r.get(t)||f(null,t),o=r.get(t);else{if("string"!=typeof t)throw Error('Only strings and functions can be passed as "editor" parameter');o=l(t)}if(!o)throw Error(`No editor registered under name "${t}"`);return o.getInstance(e)}function g(t){if("function"==typeof t)return t;if(!a(t))throw Error(`No registered editor found under "${t}" name`);return l(t).getConstructor()}function f(t,e){t&&"string"!=typeof t&&(t=(e=t).EDITOR_TYPE);const o=new d(e);"string"==typeof t&&s(t,o),r.set(e,o)}},1148:(t,e,o)=>{var n=o(6518),i=o(9565),r=o(2652),s=o(9306),l=o(8551),a=o(1767),h=o(9539),c=o(4549)("every",TypeError);n({target:"Iterator",proto:!0,real:!0,forced:c},{every:function(t){l(this);try{s(t)}catch(t){h(this,"throw",t)}if(c)return i(c,this,t);var e=a(this),o=0;return!r(e,(function(e,n){if(!t(e,o++))return n()}),{IS_RECORD:!0,INTERRUPTED:!0}).stopped}})},1181:(t,e,o)=>{var n,i,r,s=o(8622),l=o(4576),a=o(34),h=o(6699),c=o(9297),d=o(7629),u=o(6119),g=o(421),f="Object already initialized",p=l.TypeError,m=l.WeakMap;if(s||d.state){var w=d.state||(d.state=new m);w.get=w.get,w.has=w.has,w.set=w.set,n=function(t,e){if(w.has(t))throw new p(f);return e.facade=t,w.set(t,e),e},i=function(t){return w.get(t)||{}},r=function(t){return w.has(t)}}else{var b=u("state");g[b]=!0,n=function(t,e){if(c(t,b))throw new p(f);return e.facade=t,h(t,b,e),e},i=function(t){return c(t,b)?t[b]:{}},r=function(t){return c(t,b)}}t.exports={set:n,get:i,has:r,enforce:function(t){return r(t)?i(t):n(t,{})},getterFor:function(t){return function(e){var o;if(!a(e)||(o=i(e)).type!==t)throw new p("Incompatible receiver, "+t+" required");return o}}}},1291:(t,e,o)=>{var n=o(741);t.exports=function(t){var e=+t;return e!=e||0===e?0:n(e)}},1409:(t,e,o)=>{function n(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];const o=typeof t;if("number"===o)return!isNaN(t)&&isFinite(t);if("string"===o){if(0===t.length)return!1;if(1===t.length)return/\d/.test(t);const o=Array.from(new Set([".",...e])).map((t=>`\\${t}`)).join("|");return new RegExp(`^[+-]?(((${o})?\\d+((${o})\\d+)?(e[+-]?\\d+)?)|(0x[a-f\\d]+))$`,"i").test(t.trim())}return"object"===o&&!(!t||"number"!=typeof t.valueOf()||t instanceof Date)}function i(t){return n(t,[","])}function r(t,e,o){let n=-1;for("function"==typeof e?(o=e,e=t):n=t-1;++n<=e&&!1!==o(n););}function s(t,e,o){let n=t+1;for("function"==typeof e&&(o=e,e=0);--n>=e&&!1!==o(n););}function l(t,e){return e=parseInt(e.toString().replace("%",""),10),e=isNaN(e)?0:e,parseInt(t*e/100,10)}function a(t,e,o){return Math.min(t,e)===t?e:Math.max(t,o)===t?o:t}o.d(e,{B5:()=>l,LA:()=>i,Ti:()=>r,fk:()=>s,kf:()=>n,qE:()=>a}),o(7642),o(8004),o(3853),o(5876),o(2475),o(5024),o(1698),o(8992),o(1454)},1454:(t,e,o)=>{o(1701)},1496:(t,e,o)=>{o.d(e,{q:()=>r}),o(4114);var n=o(8386),i=o(7325);class r extends n._{constructor(){super(arguments.length>0&&void 0!==arguments[0]&&arguments[0])}getTrimmedIndexes(){return(0,i.mu)(this.getValues(),((t,e,o)=>(e&&t.push(o),t)),[])}}},1601:t=>{t.exports=function(t){return t[1]}},1625:(t,e,o)=>{var n=o(9504);t.exports=n({}.isPrototypeOf)},1698:(t,e,o)=>{var n=o(6518),i=o(4204);n({target:"Set",proto:!0,real:!0,forced:!o(4916)("union")},{union:i})},1701:(t,e,o)=>{var n=o(6518),i=o(9565),r=o(9306),s=o(8551),l=o(1767),a=o(9462),h=o(6319),c=o(9539),d=o(4549),u=o(6395),g=!u&&d("map",TypeError),f=a((function(){var t=this.iterator,e=s(i(this.next,t));if(!(this.done=!!e.done))return h(t,this.mapper,[e.value,this.counter++],!0)}));n({target:"Iterator",proto:!0,real:!0,forced:u||g},{map:function(t){s(this);try{r(t)}catch(t){c(this,"throw",t)}return g?i(g,this,t):new f(l(this),{mapper:t})}})},1767:t=>{t.exports=function(t){return{iterator:t,next:t.next,done:!1}}},1803:(t,e,o)=>{o.d(e,{z:()=>a}),o(6280),o(8992),o(1454);var n=o(1895),i=o(7792),r=o(8046),s=o(3317),l=o(3986);class a extends n.n{constructor(){var t,e,o;super(...arguments),t=this,o=[],(e=function(t){var e=function(t){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var o=e.call(t,"string");if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:e+""}(e="orderOfIndexes"))in t?Object.defineProperty(t,e,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[e]=o}getValues(){return this.orderOfIndexes.map((t=>this.indexedValues[t]))}setValues(t){this.orderOfIndexes=[...Array(t.length).keys()],super.setValues(t)}setValueAtIndex(t,e){let o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.orderOfIndexes.length;return t<this.indexedValues.length&&(this.indexedValues[t]=e,!1===this.orderOfIndexes.includes(t)&&this.orderOfIndexes.splice(o,0,t),this.runLocalHooks("change"),!0)}clearValue(t){this.orderOfIndexes=(0,r.H)(this.orderOfIndexes,[t]),(0,l.Tn)(this.initValueOrFn)?super.setValueAtIndex(t,this.initValueOrFn(t)):super.setValueAtIndex(t,this.initValueOrFn)}getLength(){return this.orderOfIndexes.length}setDefaultValues(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.indexedValues.length;this.orderOfIndexes.length=0,super.setDefaultValues(t)}insert(t,e){this.indexedValues=(0,i.N)(this.indexedValues,t,e,this.initValueOrFn),this.orderOfIndexes=(0,s.z)(this.orderOfIndexes,e),super.insert(t,e)}remove(t){this.indexedValues=(0,i.H)(this.indexedValues,t),this.orderOfIndexes=(0,r.H)(this.orderOfIndexes,t),this.orderOfIndexes=(0,s.v)(this.orderOfIndexes,t),super.remove(t)}getEntries(){return this.orderOfIndexes.map((t=>[t,this.getValueAtIndex(t)]))}}},1828:(t,e,o)=>{var n=o(9504),i=o(9297),r=o(5397),s=o(9617).indexOf,l=o(421),a=n([].push);t.exports=function(t,e){var o,n=r(t),h=0,c=[];for(o in n)!i(l,o)&&i(n,o)&&a(c,o);for(;e.length>h;)i(n,o=e[h++])&&(~s(c,o)||a(c,o));return c}},1895:(t,e,o)=>{o.d(e,{n:()=>a}),o(6280),o(4114);var n=o(1409),i=o(2919),r=o(3986),s=o(7710);function l(t,e,o){return(e=function(t){var e=function(t){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var o=e.call(t,"string");if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[e]=o,t}class a{constructor(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;l(this,"indexedValues",[]),l(this,"initValueOrFn",void 0),this.initValueOrFn=t}getValues(){return this.indexedValues}getValueAtIndex(t){const e=this.indexedValues;if(t<e.length)return e[t]}setValues(t){this.indexedValues=t.slice(),this.runLocalHooks("change")}setValueAtIndex(t,e){return t<this.indexedValues.length&&(this.indexedValues[t]=e,this.runLocalHooks("change"),!0)}clear(){this.setDefaultValues()}getLength(){return this.getValues().length}setDefaultValues(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.indexedValues.length;this.indexedValues.length=0,(0,r.Tn)(this.initValueOrFn)?(0,n.Ti)(t-1,(t=>this.indexedValues.push(this.initValueOrFn(t)))):(0,n.Ti)(t-1,(()=>this.indexedValues.push(this.initValueOrFn))),this.runLocalHooks("change")}init(t){return this.setDefaultValues(t),this.runLocalHooks("init"),this}insert(){this.runLocalHooks("change")}remove(){this.runLocalHooks("change")}destroy(){this.clearLocalHooks(),this.indexedValues=null,this.initValueOrFn=null}}(0,i.co)(a,s.A)},2106:(t,e,o)=>{var n=o(283),i=o(4913);t.exports=function(t,e,o){return o.get&&n(o.get,e,{getter:!0}),o.set&&n(o.set,e,{setter:!0}),i.f(t,e,o)}},2140:(t,e,o)=>{var n={};n[o(8227)("toStringTag")]="z",t.exports="[object z]"===String(n)},2182:(t,e,o)=>{o.d(e,{F:()=>s});var n=o(9478),i=o(91),r=o(5615);function s(t,e,o,s,l,a,h){n.j.apply(this,[t,e,o,s,l,a,h]);let c=a;!c&&h.placeholder&&(c=h.placeholder),c=(0,r.As)(c),h.trimWhitespace&&(c=c.trim()),(0,i.c6)(e,c)}s.RENDERER_TYPE="text"},2195:(t,e,o)=>{var n=o(9504),i=n({}.toString),r=n("".slice);t.exports=function(t){return r(i(t),8,-1)}},2211:(t,e,o)=>{var n=o(9039);t.exports=!n((function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype}))},2246:(t,e,o)=>{o.d(e,{o:()=>r}),o(4114);var n=o(8386),i=o(7325);class r extends n._{constructor(){super(arguments.length>0&&void 0!==arguments[0]&&arguments[0])}getHiddenIndexes(){return(0,i.mu)(this.getValues(),((t,e,o)=>(e&&t.push(o),t)),[])}}},2257:(t,e,o)=>{o.d(e,{KN:()=>s,oh:()=>a,ub:()=>l}),o(4114),o(9978),o(8992),o(4520),o(1454),o(8872);var n=o(5615);const i={" ":" ","&":"&","<":"<",">":">"},r=new RegExp(Object.keys(i).map((t=>`(${t})`)).join("|"),"gi");function s(t){const e=t.hasColHeaders(),o=t.hasRowHeaders(),i=[e?-1:0,o?-1:0,t.countRows()-1,t.countCols()-1],r=t.getData(...i),s=r.length,l=s>0?r[0].length:0,a=["<table>","</table>"],h=e?["<thead>","</thead>"]:[],c=["<tbody>","</tbody>"],d=o?1:0,u=e?1:0;for(let i=0;i<s;i+=1){const s=e&&0===i,a=[];for(let e=0;e<l;e+=1){const l=!s&&o&&0===e;let h="";if(s)h=`<th>${t.getColHeader(e-d)}</th>`;else if(l)h=`<th>${t.getRowHeader(i-u)}</th>`;else{const o=r[i][e],{hidden:s,rowspan:l,colspan:a}=t.getCellMeta(i-u,e-d);if(!s){const t=[];if(l&&t.push(`rowspan="${l}"`),a&&t.push(`colspan="${a}"`),(0,n.Im)(o))h=`<td ${t.join(" ")}></td>`;else{const e=o.toString().replace(/</g,"<").replace(/>/g,">").replace(/(<br(\s*|\/)>(\r\n|\n)?|\r\n|\n)/g,"<br>\r\n").replace(/\x20/gi," ").replace(/\t/gi,"	");h=`<td ${t.join(" ")}>${e}</td>`}}}a.push(h)}const g=["<tr>",...a,"</tr>"].join("");s?h.splice(1,0,g):c.splice(-1,0,g)}return a.splice(1,0,h.join(""),c.join("")),a.join("")}function l(t){const e=t.length,o=["<table>"];for(let i=0;i<e;i+=1){const r=t[i],s=r.length,l=[];0===i&&o.push("<tbody>");for(let t=0;t<s;t+=1){const e=r[t],o=(0,n.Im)(e)?"":e.toString().replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/(<br(\s*|\/)>(\r\n|\n)?|\r\n|\n)/g,"<br>\r\n").replace(/\x20{2,}/gi,(t=>`<span style="mso-spacerun: yes">${" ".repeat(t.length-1)} </span>`)).replace(/\t/gi,"	");l.push(`<td>${o}</td>`)}o.push("<tr>",...l,"</tr>"),i+1===e&&o.push("</tbody>")}return o.push("</table>"),o.join("")}function a(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:document;const o={},n=e.createDocumentFragment(),s=e.createElement("div");n.appendChild(s);let l=t;if("string"==typeof l){const t=l.replace(/<td\b[^>]*?>([\s\S]*?)<\/\s*td>/g,(t=>{const e=t.match(/<td\b[^>]*?>/g)[0];return`${e}${t.substring(e.length,t.lastIndexOf("<")).trim().replaceAll(/\n\s+/g," ").replaceAll(/<p.*?>/g,"\n").replace("\n","").replaceAll(/<\/(.*)>\s+$/gm,"</$1>").replace(/(<(?!br)([^>]+)>)/gi,"").replaceAll(/^ $/gm,"")}</td>`}));s.insertAdjacentHTML("afterbegin",`${t}`),l=s.querySelector("table")}if(!l||!function(t){return"TABLE"===(t&&t.nodeName||"")}(l))return;const a=s.querySelector('meta[name$="enerator"]'),h=null!==l.querySelector("tbody th"),c=l.querySelector("tr"),d=c?Array.from(c.cells).reduce(((t,e)=>t+e.colSpan),0)-(h?1:0):0,u=l.tFoot&&Array.from(l.tFoot.rows)||[],g=[];let f=!1,p=0,m=0;if(l.tHead){const t=Array.from(l.tHead.rows).filter((t=>{const e=null!==t.querySelector("td");return e&&g.push(t),!e}));p=t.length,f=p>0,p>1?o.nestedHeaders=Array.from(t).reduce(((t,e)=>{const o=Array.from(e.cells).reduce(((t,e,o)=>{if(h&&0===o)return t;const{colSpan:n,innerHTML:i}=e,r=n>1?{label:i,colspan:n}:i;return t.push(r),t}),[]);return t.push(o),t}),[]):f&&(o.colHeaders=Array.from(t[0].children).reduce(((t,e,o)=>(h&&0===o||t.push(e.innerHTML),t)),[]))}g.length&&(o.fixedRowsTop=g.length),u.length&&(o.fixedRowsBottom=u.length);const w=[...g,...Array.from(l.tBodies).reduce(((t,e)=>(t.push(...Array.from(e.rows)),t)),[]),...u];m=w.length;const b=new Array(m);for(let t=0;t<m;t++)b[t]=new Array(d);const v=[],y=[];for(let t=0;t<m;t++){const e=w[t],o=Array.from(e.cells),n=o.length;for(let e=0;e<n;e++){const n=o[e],{nodeName:s,innerHTML:l,rowSpan:h,colSpan:c}=n,d=b[t].findIndex((t=>void 0===t));if("TD"===s){if(h>1||c>1){for(let e=t;e<t+h;e++)if(e<m)for(let t=d;t<d+c;t++)b[e][t]=null;const e=n.getAttribute("style");e&&e.includes("mso-ignore:colspan")||v.push({col:d,row:t,rowspan:h,colspan:c})}let e="";e=a&&/excel/gi.test(a.content)?l.replace(/[\r\n][\x20]{0,2}/g," ").replace(/<br(\s*|\/)>[\r\n]?[\x20]{0,3}/gim,"\r\n"):l.replace(/<br(\s*|\/)>[\r\n]?/gim,"\r\n"),b[t][d]=e.replace(r,(t=>i[t]))}else y.push(l)}}return v.length&&(o.mergeCells=v),y.length&&(o.rowHeaders=y),b.length&&(o.data=b),o}},2278:(t,e,o)=>{var n=o(3724),i=o(4913),r=o(6980);t.exports=function(t,e,o){n?i.f(t,e,r(0,o)):t[e]=o}},2360:(t,e,o)=>{var n,i=o(8551),r=o(6801),s=o(8727),l=o(421),a=o(397),h=o(4055),c=o(6119),d="prototype",u="script",g=c("IE_PROTO"),f=function(){},p=function(t){return"<"+u+">"+t+"</"+u+">"},m=function(t){t.write(p("")),t.close();var e=t.parentWindow.Object;return t=null,e},w=function(){try{n=new ActiveXObject("htmlfile")}catch(t){}var t,e,o;w="undefined"!=typeof document?document.domain&&n?m(n):(e=h("iframe"),o="java"+u+":",e.style.display="none",a.appendChild(e),e.src=String(o),(t=e.contentWindow.document).open(),t.write(p("document.F=Object")),t.close(),t.F):m(n);for(var i=s.length;i--;)delete w[d][s[i]];return w()};l[g]=!0,t.exports=Object.create||function(t,e){var o;return null!==t?(f[d]=i(t),o=new f,f[d]=null,o[g]=t):o=w(),void 0===e?o:r.f(o,e)}},2475:(t,e,o)=>{var n=o(6518),i=o(8527);n({target:"Set",proto:!0,real:!0,forced:!o(4916)("isSupersetOf",(function(t){return!t}))},{isSupersetOf:i})},2478:(t,e,o)=>{var n=o(9504),i=o(8981),r=Math.floor,s=n("".charAt),l=n("".replace),a=n("".slice),h=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,c=/\$([$&'`]|\d{1,2})/g;t.exports=function(t,e,o,n,d,u){var g=o+t.length,f=n.length,p=c;return void 0!==d&&(d=i(d),p=h),l(u,p,(function(i,l){var h;switch(s(l,0)){case"$":return"$";case"&":return t;case"`":return a(e,0,o);case"'":return a(e,g);case"<":h=d[a(l,1,-1)];break;default:var c=+l;if(0===c)return i;if(c>f){var u=r(c/10);return 0===u?i:u<=f?void 0===n[u-1]?s(l,1):n[u-1]+s(l,1):i}h=n[c-1]}return void 0===h?"":h}))}},2489:(t,e,o)=>{var n=o(6518),i=o(9565),r=o(9306),s=o(8551),l=o(1767),a=o(9462),h=o(6319),c=o(6395),d=o(9539),u=o(4549),g=!c&&u("filter",TypeError),f=a((function(){for(var t,e,o=this.iterator,n=this.predicate,r=this.next;;){if(t=s(i(r,o)),this.done=!!t.done)return;if(e=t.value,h(o,n,[e,this.counter++],!0))return e}}));n({target:"Iterator",proto:!0,real:!0,forced:c||g},{filter:function(t){s(this);try{r(t)}catch(t){d(this,"throw",t)}return g?i(g,this,t):new f(l(this),{predicate:t})}})},2529:t=>{t.exports=function(t,e){return{value:t,done:e}}},2564:(t,e,o)=>{o.d(e,{b7:()=>d,_T:()=>c}),o(6280);var n=o(5615),i=o(2919),r=(o(4114),o(7325));const s={_hooksStorage:Object.create(null),addHook(t,e){return this._hooksStorage[t]||(this._hooksStorage[t]=[]),this.hot.addHook(t,e),this._hooksStorage[t].push(e),this},removeHooksByKey(t){(0,r.z0)(this._hooksStorage[t]||[],(e=>{this.hot.removeHook(t,e)}))},clearHooks(){(0,i.v4)(this._hooksStorage,((t,e)=>this.removeHooksByKey(e))),this._hooksStorage={}}};(0,i.LH)(s,"MIXIN_NAME","hooksRefRegisterer",{writable:!1,enumerable:!1});const l=s;var a=o(91);function h(t,e,o){return(e=function(t){var e=function(t){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var o=e.call(t,"string");if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[e]=o,t}const c=Object.freeze({VIRGIN:"STATE_VIRGIN",EDITING:"STATE_EDITING",WAITING:"STATE_WAITING",FINISHED:"STATE_FINISHED"});class d{static get EDITOR_TYPE(){return"base"}constructor(t){h(this,"hot",void 0),h(this,"state",c.VIRGIN),h(this,"_opened",!1),h(this,"_fullEditMode",!1),h(this,"_closeCallback",null),h(this,"TD",null),h(this,"row",null),h(this,"col",null),h(this,"prop",null),h(this,"originalValue",null),h(this,"cellProperties",null),this.hot=t,this.init()}_fireCallbacks(t){this._closeCallback&&(this._closeCallback(t),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(t,e,o,n,i,r){this.TD=n,this.row=t,this.col=e,this.prop=o,this.originalValue=i,this.cellProperties=r,this.state=this.isOpened()?this.state:c.VIRGIN}extend(){return class extends this.constructor{}}saveValue(t,e){let o,n,i,r;if(e){const t=this.hot.getSelectedLast();o=Math.max(Math.min(t[0],t[2]),0),n=Math.max(Math.min(t[1],t[3]),0),i=Math.max(t[0],t[2]),r=Math.max(t[1],t[3])}else[o,n,i,r]=[this.row,this.col,null,null];const s=this.hot.runHooks("modifyGetCellCoords",o,n,!1,"meta");Array.isArray(s)&&([o,n]=s),this.hot.populateFromArray(o,n,t,i,r,"edit")}beginEditing(t,e){if(this.state!==c.VIRGIN)return;const o=this.hot,i=o.rowIndexMapper.getRenderableFromVisualIndex(this.row),r=o.columnIndexMapper.getRenderableFromVisualIndex(this.col),s=()=>{if(this.state=c.EDITING,this.isInFullEditMode()){const e="string"==typeof t?t:(0,n.As)(this.originalValue);this.setValue(e)}this.open(e),this._opened=!0,this.focus(),o.view.render(),o.runHooks("afterBeginEditing",this.row,this.col)};this.hot.addHookOnce("afterScroll",s),o.view.scrollViewport(o._createCellCoords(i,r))||(this.hot.removeHook("afterScroll",s),s())}finishEditing(t,e,o){let n;if(o){const t=this._closeCallback;this._closeCallback=e=>{t&&t(e),o(e),this.hot.view.render()}}if(!this.isWaiting())if(this.state!==c.VIRGIN){if(this.state===c.EDITING){if(t)return this.cancelChanges(),void this.hot.view.render();const o=this.getValue();n=this.cellProperties.trimWhitespace?[["string"==typeof o?String.prototype.trim.call(o||""):o]]:[[o]],this.state=c.WAITING,this.saveValue(n,e),this.hot.getCellValidator(this.cellProperties)?this.hot.addHookOnce("postAfterValidate",(t=>{this.state=c.FINISHED,this.discardEditor(t)})):(this.state=c.FINISHED,this.discardEditor(!0))}}else this.hot._registerTimeout((()=>{this._fireCallbacks(!0)}))}cancelChanges(){this.state=c.FINISHED,this.discardEditor()}discardEditor(t){this.state===c.FINISHED&&(!1===t&&!0!==this.cellProperties.allowInvalid?(this.hot.selectCell(this.row,this.col),this.focus(),this.state=c.EDITING,this._fireCallbacks(!1)):(this.close(),this._opened=!1,this._fullEditMode=!1,this.state=c.VIRGIN,this._fireCallbacks(!0),this.hot.getShortcutManager().setActiveContextName("grid")))}enableFullEditMode(){this._fullEditMode=!0}isInFullEditMode(){return this._fullEditMode}isOpened(){return this._opened}isWaiting(){return this.state===c.WAITING}getEditedCellRect(){var t;const e=this.getEditedCell();if(!e)return;const{wtOverlays:o,wtViewport:n}=this.hot.view._wt,i=this.hot.rootWindow,r=(0,a.cY)(e),s=(0,a.Gq)(e),l=(0,a.cY)(this.hot.rootElement),h=(0,a.Gq)(this.hot.rootElement),c=o.topOverlay.holder,d=o.inlineStartOverlay.holder,u=c!==i?c.scrollTop:0,g=d!==i?d.scrollLeft:0,f=i.innerWidth-l.left-h,{wtTable:p}=null!==(t=o.getParentOverlay(e))&&void 0!==t?t:this.hot.view._wt,m=p.name,w=["master","inline_start"].includes(m)?u:0,b=["master","top","bottom"].includes(m)?g:0,v=r.top===l.top?0:1;let y=r.top-l.top-v-w,C=0;C=this.hot.isRtl()?i.innerWidth-r.left-s-f-1+b:r.left-l.left-1-b,["top","top_inline_start_corner"].includes(m)&&(y+=o.topOverlay.getOverlayOffset()),["inline_start","top_inline_start_corner"].includes(m)&&(C+=Math.abs(o.inlineStartOverlay.getOverlayOffset()));const S=this.hot.hasColHeaders(),R=this.hot.rowIndexMapper.getRenderableFromVisualIndex(this.row),E=this.hot.columnIndexMapper.getRenderableFromVisualIndex(this.col),T=this.hot.rowIndexMapper.getRenderableIndexesLength()-this.hot.view._wt.getSetting("fixedRowsBottom");(S&&R<=0||R===T)&&(y+=1),E<=0&&(C+=1);const x=n.rowsRenderCalculator.startPosition,M=n.columnsRenderCalculator.startPosition,I=Math.abs(o.inlineStartOverlay.getScrollPosition()),H=o.topOverlay.getScrollPosition(),O=(0,a.XJ)(this.hot.rootDocument);let A=e.offsetTop;if(["inline_start","master"].includes(m)&&(A+=x-H),["bottom","bottom_inline_start_corner"].includes(m)){const{wtViewport:t,wtTable:e}=o.bottomOverlay.clone;A+=t.getWorkspaceHeight()-e.getHeight()-O}let k=e.offsetLeft;this.hot.isRtl()?(k=k>=0?p.getWidth()-e.offsetLeft:Math.abs(k),k+=M-I-s):["top","master","bottom"].includes(m)&&(k+=M-I);const _=i.getComputedStyle(this.TD),N=this.hot.isRtl()?"borderRightWidth":"borderLeftWidth",P=parseInt(_[N],10)>0?0:1,L=parseInt(_.borderTopWidth,10)>0?0:1,D=(0,a.Gq)(e)+P,V=(0,a.DK)(e)+L,F=(0,a.D1)(c)?O:0,B=(0,a.zO)(d)?O:0,W=this.hot.view.maximumVisibleElementWidth(k)-F+P;return{top:y,start:C,height:V,maxHeight:Math.max(this.hot.view.maximumVisibleElementHeight(A)-B+L,this.hot.view.getDefaultRowHeight()),width:D,maxWidth:W}}getEditedCellsLayerClass(){switch(this.checkEditorSection()){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 t=this.hot.countRows();let e="";return this.row<this.hot.getSettings().fixedRowsTop?e=this.col<this.hot.getSettings().fixedColumnsStart?"top-inline-start-corner":"top":this.hot.getSettings().fixedRowsBottom&&this.row>=t-this.hot.getSettings().fixedRowsBottom?e=this.col<this.hot.getSettings().fixedColumnsStart?"bottom-inline-start-corner":"bottom":this.col<this.hot.getSettings().fixedColumnsStart&&(e="inline-start"),e}}(0,i.co)(d,l)},2577:(t,e,o)=>{o(116)},2603:(t,e,o)=>{var n=o(655);t.exports=function(t,e){return void 0===t?arguments.length<2?"":e:n(t)}},2617:(t,e,o)=>{o.d(e,{R8:()=>i,z3:()=>r});var n=o(5615);function i(){(0,n.O9)(console)&&console.warn(...arguments)}function r(){(0,n.O9)(console)&&console.error(...arguments)}},2652:(t,e,o)=>{var n=o(6080),i=o(9565),r=o(8551),s=o(6823),l=o(4209),a=o(6198),h=o(1625),c=o(81),d=o(851),u=o(9539),g=TypeError,f=function(t,e){this.stopped=t,this.result=e},p=f.prototype;t.exports=function(t,e,o){var m,w,b,v,y,C,S,R=o&&o.that,E=!(!o||!o.AS_ENTRIES),T=!(!o||!o.IS_RECORD),x=!(!o||!o.IS_ITERATOR),M=!(!o||!o.INTERRUPTED),I=n(e,R),H=function(t){return m&&u(m,"normal",t),new f(!0,t)},O=function(t){return E?(r(t),M?I(t[0],t[1],H):I(t[0],t[1])):M?I(t,H):I(t)};if(T)m=t.iterator;else if(x)m=t;else{if(!(w=d(t)))throw new g(s(t)+" is not iterable");if(l(w)){for(b=0,v=a(t);v>b;b++)if((y=O(t[b]))&&h(p,y))return y;return new f(!1)}m=c(t,w)}for(C=T?t.next:m.next;!(S=i(C,m)).done;){try{y=O(S.value)}catch(t){u(m,"throw",t)}if("object"==typeof y&&y&&h(p,y))return y}return new f(!1)}},2777:(t,e,o)=>{var n=o(9565),i=o(34),r=o(757),s=o(5966),l=o(4270),a=o(8227),h=TypeError,c=a("toPrimitive");t.exports=function(t,e){if(!i(t)||r(t))return t;var o,a=s(t,c);if(a){if(void 0===e&&(e="default"),o=n(a,t,e),!i(o)||r(o))return o;throw new h("Can't convert object to primitive value")}return void 0===e&&(e="number"),l(t,e)}},2787:(t,e,o)=>{var n=o(9297),i=o(4901),r=o(8981),s=o(6119),l=o(2211),a=s("IE_PROTO"),h=Object,c=h.prototype;t.exports=l?h.getPrototypeOf:function(t){var e=r(t);if(n(e,a))return e[a];var o=e.constructor;return i(o)&&e instanceof o?o.prototype:e instanceof h?c:null}},2796:(t,e,o)=>{var n=o(9039),i=o(4901),r=/#|\.prototype\./,s=function(t,e){var o=a[l(t)];return o===c||o!==h&&(i(e)?n(e):!!e)},l=s.normalize=function(t){return String(t).replace(r,".").toLowerCase()},a=s.data={},h=s.NATIVE="N",c=s.POLYFILL="P";t.exports=s},2812:t=>{var e=TypeError;t.exports=function(t,o){if(t<o)throw new e("Not enough arguments");return t}},2839:(t,e,o)=>{var n=o(4576).navigator,i=n&&n.userAgent;t.exports=i?String(i):""},2919:(t,e,o)=>{o.d(e,{$3:()=>w,Go:()=>a,Gv:()=>u,IL:()=>r,LH:()=>g,Nl:()=>i,UU:()=>p,X$:()=>s,co:()=>c,mQ:()=>v,nA:()=>b,o8:()=>h,oq:()=>m,v4:()=>f,wU:()=>d,zw:()=>l}),o(6280),o(4114),o(3110),o(8992),o(3949);var n=o(7325);function i(t){let e;return Array.isArray(t)?e=t.length?new Array(t.length).fill(null):[]:(e={},f(t,((t,o)=>{"__children"!==o&&(t&&"object"==typeof t&&!Array.isArray(t)?e[o]=i(t):Array.isArray(t)?t.length&&"object"==typeof t[0]&&!Array.isArray(t[0])?e[o]=[i(t[0])]:e[o]=[]:e[o]=null)}))),e}function r(t,e){return e.prototype.constructor=e,t.prototype=new e,t.prototype.constructor=t,t}function s(t,e,o){const n=Array.isArray(o);return f(e,((e,i)=>{(!1===n||o.includes(i))&&(t[i]=e)})),t}function l(t,e){f(e,((o,n)=>{e[n]&&"object"==typeof e[n]?(t[n]||(Array.isArray(e[n])?t[n]=[]:"[object Date]"===Object.prototype.toString.call(e[n])?t[n]=e[n]:t[n]={}),l(t[n],e[n])):t[n]=e[n]}))}function a(t){return"object"==typeof t?JSON.parse(JSON.stringify(t)):t}function h(t){const e={};return f(t,((t,o)=>{e[o]=t})),e}function c(t){t.MIXINS||(t.MIXINS=[]);for(var e=arguments.length,o=new Array(e>1?e-1:0),i=1;i<e;i++)o[i-1]=arguments[i];return(0,n.z0)(o,(e=>{t.MIXINS.push(e.MIXIN_NAME),f(e,((e,o)=>{if(void 0!==t.prototype[o])throw new Error(`Mixin conflict. Property '${o}' already exist and cannot be overwritten.`);if("function"==typeof e)t.prototype[o]=e;else{const n=function(t,e){const o=`_${t}`;return function(){return void 0===this[o]&&(this[o]=(t=>{let e=t;return(Array.isArray(e)||u(e))&&(e=a(e)),e})(e)),this[o]}},i=function(t){const e=`_${t}`;return function(t){this[e]=t}};Object.defineProperty(t.prototype,o,{get:n(o,e),set:i(o),configurable:!0})}}))})),t}function d(t,e){return JSON.stringify(t)===JSON.stringify(e)}function u(t){return"[object Object]"===Object.prototype.toString.call(t)}function g(t,e,o,n){n.value=o,n.writable=!1!==n.writable,n.enumerable=!1!==n.enumerable,n.configurable=!1!==n.configurable,Object.defineProperty(t,e,n)}function f(t,e){for(const o in t)if((!t.hasOwnProperty||t.hasOwnProperty&&Object.prototype.hasOwnProperty.call(t,o))&&!1===e(t[o],o,t))break;return t}function p(t,e){const o=e.split(".");let n=t;return f(o,(t=>{if(n=n[t],void 0===n)return n=void 0,!1})),n}function m(t,e,o){if("string"!=typeof e)return;const n=e.split(".");let i=t;n.forEach(((t,e)=>{"__proto__"!==t&&"constructor"!==t&&"prototype"!==t&&(e!==n.length-1?(v(i,t)||(i[t]={}),i=i[t]):i[t]=o)}))}function w(t){if(!u(t))return 0;const e=function(t){let o=0;return u(t)?f(t,((t,n)=>{"__children"!==n&&(o+=e(t))})):o+=1,o};return e(t)}function b(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"value";const o=`_${e}`,n={_touched:!1,[o]:t,isTouched(){return this._touched}};return Object.defineProperty(n,e,{get(){return this[o]},set(t){this._touched=!0,this[o]=t},enumerable:!0,configurable:!0}),n}function v(t,e){return Object.prototype.hasOwnProperty.call(t,e)}},2967:(t,e,o)=>{var n=o(6706),i=o(34),r=o(7750),s=o(3506);t.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var t,e=!1,o={};try{(t=n(Object.prototype,"__proto__","set"))(o,[]),e=o instanceof Array}catch(t){}return function(o,n){return r(o),s(n),i(o)?(e?t(o,n):o.__proto__=n,o):o}}():void 0)},2969:(t,e,o)=>{var n=o(5072),i=o.n(n),r=o(7825),s=o.n(r),l=o(7659),a=o.n(l),h=o(5056),c=o.n(h),d=o(540),u=o.n(d),g=o(1113),f=o.n(g),p=o(7400),m={};m.styleTagTransform=f(),m.setAttributes=c(),m.insert=a().bind(null,"head"),m.domAPI=s(),m.insertStyleElement=u(),i()(p.A,m),p.A&&p.A.locals&&p.A.locals},2993:(t,e,o)=>{o.d(e,{by:()=>h,qV:()=>c,tR:()=>s}),o(6280);var n=o(4647);const{register:i,getItem:r,hasItem:s,getNames:l,getValues:a}=(0,n.A)("validators");function h(t){if("function"==typeof t)return t;if(!s(t))throw Error(`No registered validator found under "${t}" name`);return r(t)}function c(t,e){"string"!=typeof t&&(t=(e=t).VALIDATOR_TYPE),i(t,e)}},3023:(t,e,o)=>{function n(t,e,o){t.addEventListener(e,o,!1)}function i(t,e,o){t.removeEventListener(e,o,!1)}function r(t){return t.ownerDocument.defaultView.getComputedStyle(t)}function s(t){const e={minHeight:200,maxHeight:300,minWidth:100,maxWidth:300,textContent:t=>t.value,...arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}},o=t.body,s=t.createTextNode(""),l=t.createElement("span");let a;function h(){var t,n;s.textContent=e.textContent(a),l.style.position="absolute",l.style.fontSize=r(a).fontSize,l.style.fontFamily=r(a).fontFamily,l.style.whiteSpace="pre",o.appendChild(l);const i=parseInt((null===(t=r(a))||void 0===t?void 0:t.paddingInlineStart)||0,10),h=parseInt((null===(n=r(a))||void 0===n?void 0:n.paddingInlineEnd)||0,10),c=l.clientWidth+i+h+1;o.removeChild(l);const d=a.style;d.height=`${e.minHeight}px`,e.minWidth>c?d.width=`${e.minWidth}px`:c>e.maxWidth?d.width=`${e.maxWidth}px`:d.width=`${c}px`;const u=a.scrollHeight?a.scrollHeight-1:0;e.minHeight>u?d.height=`${e.minHeight}px`:e.maxHeight<u?(d.height=`${e.maxHeight}px`,d.overflowY="visible"):d.height=`${u}px`}function c(){t.defaultView.setTimeout(h,0)}return{init:function(t,o){let i=arguments.length>2&&void 0!==arguments[2]&&arguments[2];a=t,function(t){if(t&&t.minHeight)if("inherit"===t.minHeight)e.minHeight=a.clientHeight;else{const o=parseInt(t.minHeight,10);isNaN(o)||(e.minHeight=o)}if(t&&t.maxHeight)if("inherit"===t.maxHeight)e.maxHeight=a.clientHeight;else{const o=parseInt(t.maxHeight,10);isNaN(o)||(e.maxHeight=o)}if(t&&t.minWidth)if("inherit"===t.minWidth)e.minWidth=a.clientWidth;else{const o=parseInt(t.minWidth,10);isNaN(o)||(e.minWidth=o)}if(t&&t.maxWidth)if("inherit"===t.maxWidth)e.maxWidth=a.clientWidth;else{const o=parseInt(t.maxWidth,10);isNaN(o)||(e.maxWidth=o)}l.firstChild||(l.className="autoResize",l.style.display="inline-block",l.appendChild(s))}(o),"TEXTAREA"===a.nodeName&&(a.style.resize="none",a.style.height=`${e.minHeight}px`,a.style.minWidth=`${e.minWidth}px`,a.style.maxWidth=`${e.maxWidth}px`,a.style.overflowY="hidden"),i&&(n(a,"input",h),n(a,"keydown",c)),h()},resize:h,unObserve(){i(a,"input",h),i(a,"keydown",c)}}}o.d(e,{j:()=>s})},3072:(t,e)=>{var o="function"==typeof Symbol&&Symbol.for,n=o?Symbol.for("react.element"):60103,i=o?Symbol.for("react.portal"):60106,r=o?Symbol.for("react.fragment"):60107,s=o?Symbol.for("react.strict_mode"):60108,l=o?Symbol.for("react.profiler"):60114,a=o?Symbol.for("react.provider"):60109,h=o?Symbol.for("react.context"):60110,c=o?Symbol.for("react.async_mode"):60111,d=o?Symbol.for("react.concurrent_mode"):60111,u=o?Symbol.for("react.forward_ref"):60112,g=o?Symbol.for("react.suspense"):60113,f=o?Symbol.for("react.suspense_list"):60120,p=o?Symbol.for("react.memo"):60115,m=o?Symbol.for("react.lazy"):60116,w=o?Symbol.for("react.block"):60121,b=o?Symbol.for("react.fundamental"):60117,v=o?Symbol.for("react.responder"):60118,y=o?Symbol.for("react.scope"):60119;function C(t){if("object"==typeof t&&null!==t){var e=t.$$typeof;switch(e){case n:switch(t=t.type){case c:case d:case r:case l:case s:case g:return t;default:switch(t=t&&t.$$typeof){case h:case u:case m:case p:case a:return t;default:return e}}case i:return e}}}function S(t){return C(t)===d}e.AsyncMode=c,e.ConcurrentMode=d,e.ContextConsumer=h,e.ContextProvider=a,e.Element=n,e.ForwardRef=u,e.Fragment=r,e.Lazy=m,e.Memo=p,e.Portal=i,e.Profiler=l,e.StrictMode=s,e.Suspense=g,e.isAsyncMode=function(t){return S(t)||C(t)===c},e.isConcurrentMode=S,e.isContextConsumer=function(t){return C(t)===h},e.isContextProvider=function(t){return C(t)===a},e.isElement=function(t){return"object"==typeof t&&null!==t&&t.$$typeof===n},e.isForwardRef=function(t){return C(t)===u},e.isFragment=function(t){return C(t)===r},e.isLazy=function(t){return C(t)===m},e.isMemo=function(t){return C(t)===p},e.isPortal=function(t){return C(t)===i},e.isProfiler=function(t){return C(t)===l},e.isStrictMode=function(t){return C(t)===s},e.isSuspense=function(t){return C(t)===g},e.isValidElementType=function(t){return"string"==typeof t||"function"==typeof t||t===r||t===d||t===l||t===s||t===g||t===f||"object"==typeof t&&null!==t&&(t.$$typeof===m||t.$$typeof===p||t.$$typeof===a||t.$$typeof===h||t.$$typeof===u||t.$$typeof===b||t.$$typeof===v||t.$$typeof===y||t.$$typeof===w)},e.typeOf=C},3110:(t,e,o)=>{var n=o(6518),i=o(7751),r=o(8745),s=o(9565),l=o(9504),a=o(9039),h=o(4901),c=o(757),d=o(7680),u=o(6933),g=o(4495),f=String,p=i("JSON","stringify"),m=l(/./.exec),w=l("".charAt),b=l("".charCodeAt),v=l("".replace),y=l(1..toString),C=/[\uD800-\uDFFF]/g,S=/^[\uD800-\uDBFF]$/,R=/^[\uDC00-\uDFFF]$/,E=!g||a((function(){var t=i("Symbol")("stringify detection");return"[null]"!==p([t])||"{}"!==p({a:t})||"{}"!==p(Object(t))})),T=a((function(){return'"\\udf06\\ud834"'!==p("\udf06\ud834")||'"\\udead"'!==p("\udead")})),x=function(t,e){var o=d(arguments),n=u(e);if(h(n)||void 0!==t&&!c(t))return o[1]=function(t,e){if(h(n)&&(e=s(n,this,f(t),e)),!c(e))return e},r(p,null,o)},M=function(t,e,o){var n=w(o,e-1),i=w(o,e+1);return m(S,t)&&!m(R,i)||m(R,t)&&!m(S,n)?"\\u"+y(b(t,0),16):t};p&&n({target:"JSON",stat:!0,arity:3,forced:E||T},{stringify:function(t,e,o){var n=d(arguments),i=r(E?x:p,null,n);return T&&"string"==typeof i?v(i,C,M):i}})},3167:(t,e,o)=>{var n=o(4901),i=o(34),r=o(2967);t.exports=function(t,e,o){var s,l;return r&&n(s=e.constructor)&&s!==o&&i(l=s.prototype)&&l!==o.prototype&&r(t,l),t}},3215:(t,e,o)=>{o(1148)},3317:(t,e,o)=>{o.d(e,{v:()=>i,z:()=>r}),o(8992),o(4520);var n=o(7325);function i(t,e){return(0,n.YD)(t,(t=>t-e.filter((e=>e<t)).length))}function r(t,e){const o=e[0],i=e.length;return(0,n.YD)(t,(t=>t>=o?t+i:t))}},3392:(t,e,o)=>{var n=o(9504),i=0,r=Math.random(),s=n(1..toString);t.exports=function(t){return"Symbol("+(void 0===t?"":t)+")_"+s(++i+r,36)}},3404:(t,e,o)=>{t.exports=o(3072)},3431:(t,e,o)=>{o.d(e,{A:()=>l,q:()=>s});const n=/^(\r\n|\n\r|\r|\n)/,i=/^[^\t\r\n]+/,r=/^\t/;function s(t){const e=[[""]];if(0===t.length)return e;let o,s=0,l=0;for(;t.length>0&&o!==t.length;)if(o=t.length,t.match(r))t=t.replace(r,""),s+=1,e[l][s]="";else if(t.match(n))t=t.replace(n,""),s=0,l+=1,e[l]=[""];else{let o="";if(t.startsWith('"')){let e=0,n=!0;for(;n;){const i=t.slice(0,1);'"'===i&&(e+=1),o+=i,(0===(t=t.slice(1)).length||t.match(/^[\t\r\n]/)&&e%2==0)&&(n=!1)}o=o.replace(/^"/,"").replace(/"$/,"").replace(/["]*/g,(t=>new Array(Math.floor(t.length/2)).fill('"').join("")))}else{const e=t.match(i);o=e?e[0]:"",t=t.slice(o.length)}e[l][s]=o}return e}function l(t){let e,o,n,i,r,s="";for(e=0,o=t.length;e<o;e+=1){for(i=t[e].length,n=0;n<i;n+=1)n>0&&(s+="\t"),r=t[e][n],"string"==typeof r?r.indexOf("\n")>-1?s+=`"${r.replace(/"/g,'""')}"`:s+=r:s+=null==r?"":r;e!==o-1&&(s+="\n")}return s}},3440:(t,e,o)=>{var n=o(7080),i=o(4402),r=o(9286),s=o(5170),l=o(3789),a=o(8469),h=o(507),c=i.has,d=i.remove;t.exports=function(t){var e=n(this),o=l(t),i=r(e);return s(e)<=o.size?a(e,(function(t){o.includes(t)&&d(i,t)})):h(o.getIterator(),(function(t){c(e,t)&&d(i,t)})),i}},3487:(t,e,o)=>{o.d(e,{R:()=>R}),o(6280),o(4114);var n=o(7325),i=o(4360),r=o(2617),s=o(5975),l=o(3986);const a=["afterCellMetaReset","afterChange","afterContextMenuDefaultOptions","beforeContextMenuSetItems","afterDropdownMenuDefaultOptions","beforeDropdownMenuSetItems","afterContextMenuHide","beforeContextMenuShow","afterContextMenuShow","afterCopyLimit","beforeCreateCol","afterColumnSequenceChange","afterCreateCol","beforeCreateRow","afterCreateRow","afterDeselect","afterDestroy","afterDocumentKeyDown","afterDrawSelection","beforeRemoveCellClassNames","beforeCompositionStart","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","afterSetTheme","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","modifyGetCoordsElement","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"],h=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"]]),c=new Map([[]]);function d(t,e,o){u(t,e),e.set(t,o)}function u(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function g(t,e,o){return t.set(p(t,e),o),o}function f(t,e){return t.get(p(t,e))}function p(t,e,o){if("function"==typeof t?t===e:t.has(e))return arguments.length<3?e:o;throw new TypeError("Private element is not present on this object")}o(7145),o(7642),o(8004),o(3853),o(5876),o(2475),o(5024),o(1698),o(8992),o(4520),o(2577),o(3949);var m=new WeakMap,w=new WeakMap,b=new WeakMap,v=new WeakSet;class y{constructor(){var t;u(this,t=v),t.add(this),d(this,m,new Map),d(this,w,new Map),d(this,b,new Set),a.forEach((t=>p(v,this,C).call(this,t)))}getHooks(t){var e;return null!==(e=f(m,this).get(t))&&void 0!==e?e:[]}add(t,e){let o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};f(m,this).has(t)||(p(v,this,C).call(this,t),a.push(t));const n=f(m,this).get(t);if(n.find((t=>t.callback===e)))return;const i=Number.isInteger(o.orderIndex)?o.orderIndex:0,r=!!o.runOnce,s=!!o.initialHook;let l=!1;if(s){const t=n.find((t=>t.initialHook));t&&(t.callback=e,l=!0)}if(!l){n.push({callback:e,orderIndex:i,runOnce:r,initialHook:s,skip:!1});let o=f(b,this).has(t);o||0===i||(o=!0,f(b,this).add(t)),o&&n.length>1&&f(m,this).set(t,n.toSorted(((t,e)=>t.orderIndex-e.orderIndex)))}}has(t){return f(m,this).has(t)&&f(m,this).get(t).length>0}remove(t,e){if(!f(m,this).has(t))return!1;const o=f(m,this).get(t),n=o.find((t=>t.callback===e));if(n){let e=f(w,this).get(t);return n.skip=!0,e+=1,e>100&&(f(m,this).set(t,o.filter((t=>!t.skip))),e=0),f(w,this).set(t,e),!0}return!1}destroy(){f(m,this).clear(),f(w,this).clear(),g(m,this,null),g(w,this,null)}}function C(t){f(m,this).set(t,[]),f(w,this).set(t,0)}const S=s.O`The plugin hook "[hookName]" was removed in Handsontable [removedInVersion].\x20
- Please consult release notes https://github.com/handsontable/handsontable/releases/tag/[removedInVersion] to\x20
- learn about the migration path.`;class R{constructor(){var t,e,o;t=this,e="globalBucket",o=new y,(e=function(t){var e=function(t){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var o=e.call(t,"string");if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[e]=o}static getSingleton(){return E}getBucket(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return t?(t.pluginHookBucket||(t.pluginHookBucket=new y),t.pluginHookBucket):this.globalBucket}add(t,e){let o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,s=arguments.length>3?arguments[3]:void 0;return Array.isArray(e)?(0,n.z0)(e,(e=>this.add(t,e,o))):(h.has(t)&&(0,r.R8)((0,i.V2)(S,{hookName:t,removedInVersion:h.get(t)})),c.has(t)&&(0,r.R8)(c.get(t)),this.getBucket(o).add(t,e,{orderIndex:s,runOnce:!1})),this}once(t,e){let o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,i=arguments.length>3?arguments[3]:void 0;return Array.isArray(e)?(0,n.z0)(e,(e=>this.once(t,e,o))):this.getBucket(o).add(t,e,{orderIndex:i,runOnce:!0}),this}addAsFixed(t,e){let o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return Array.isArray(e)?(0,n.z0)(e,(e=>this.addAsFixed(t,e,o))):this.getBucket(o).add(t,e,{initialHook:!0}),this}remove(t,e){let o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return this.getBucket(o).remove(t,e)}has(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return this.getBucket(e).has(t)}run(t,e,o,n,i,r,s,a){{const h=this.getBucket().getHooks(e),c=h?h.length:0;let d=0;if(c)for(;d<c;){if(!h[d]||h[d].skip){d+=1;continue}const c=(0,l.Ty)(h[d].callback,t,o,n,i,r,s,a);void 0!==c&&(o=c),h[d]&&h[d].runOnce&&this.remove(e,h[d].callback),d+=1}}{const h=this.getBucket(t).getHooks(e),c=h?h.length:0;let d=0;if(c)for(;d<c;){if(!h[d]||h[d].skip){d+=1;continue}const c=(0,l.Ty)(h[d].callback,t,o,n,i,r,s,a);void 0!==c&&(o=c),h[d]&&h[d].runOnce&&this.remove(e,h[d].callback,t),d+=1}}return o}destroy(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;this.getBucket(t).destroy()}register(t){this.isRegistered(t)||a.push(t)}deregister(t){this.isRegistered(t)&&a.splice(a.indexOf(t),1)}isDeprecated(t){return c.has(t)||h.has(t)}isRegistered(t){return a.indexOf(t)>=0}getRegistered(){return a}}const E=new R},3506:(t,e,o)=>{var n=o(3925),i=String,r=TypeError;t.exports=function(t){if(n(t))return t;throw new r("Can't set "+i(t)+" as a prototype")}},3514:(t,e,o)=>{o(6469)("flat")},3579:(t,e,o)=>{var n=o(6518),i=o(9565),r=o(2652),s=o(9306),l=o(8551),a=o(1767),h=o(9539),c=o(4549)("some",TypeError);n({target:"Iterator",proto:!0,real:!0,forced:c},{some:function(t){l(this);try{s(t)}catch(t){h(this,"throw",t)}if(c)return i(c,this,t);var e=a(this),o=0;return r(e,(function(e,n){if(t(e,o++))return n()}),{IS_RECORD:!0,INTERRUPTED:!0}).stopped}})},3609:(t,e,o)=>{var n=o(6518),i=o(8981),r=o(6198),s=o(4527),l=o(4606),a=o(6837);n({target:"Array",proto:!0,arity:1,forced:1!==[].unshift(0)||!function(){try{Object.defineProperty([],"length",{writable:!1}).unshift()}catch(t){return t instanceof TypeError}}()},{unshift:function(t){var e=i(this),o=r(e),n=arguments.length;if(n){a(o+n);for(var h=o;h--;){var c=h+n;h in e?e[c]=e[h]:l(e,c)}for(var d=0;d<n;d++)e[d]=arguments[d]}return s(e,o+n)}})},3650:(t,e,o)=>{var n=o(7080),i=o(4402),r=o(9286),s=o(3789),l=o(507),a=i.add,h=i.has,c=i.remove;t.exports=function(t){var e=n(this),o=s(t).getIterator(),i=r(e);return l(o,(function(t){h(e,t)?c(i,t):a(i,t)})),i}},3706:(t,e,o)=>{var n=o(9504),i=o(4901),r=o(7629),s=n(Function.toString);i(r.inspectSource)||(r.inspectSource=function(t){return s(t)}),t.exports=r.inspectSource},3709:(t,e,o)=>{function n(t,e,o){return(e=function(t){var e=function(t){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var o=e.call(t,"string");if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[e]=o,t}function i(t,e){return t.get(s(t,e))}function r(t,e,o){return t.set(s(t,e),o),o}function s(t,e,o){if("function"==typeof t?t===e:t.has(e))return arguments.length<3?e:o;throw new TypeError("Private element is not present on this object")}o.d(e,{A:()=>h}),o(6280);var l=new WeakMap;class a{constructor(t,e){let o=arguments.length>2&&void 0!==arguments[2]&&arguments[2];var i,s,a;n(this,"row",null),n(this,"col",null),a=!1,function(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}(i=this,s=l),s.set(i,a),r(l,this,o),void 0!==t&&void 0!==e&&(this.row=t,this.col=e)}isValid(t){const{countRows:e,countCols:o,countRowHeaders:n,countColHeaders:i}={countRows:0,countCols:0,countRowHeaders:0,countColHeaders:0,...t};return!(!Number.isInteger(this.row)||!Number.isInteger(this.col)||this.row<-i||this.col<-n||this.row>=e||this.col>=o)}isEqual(t){return t===this||this.row===t.row&&this.col===t.col}isHeader(){return!this.isCell()}isCell(){return this.row>=0&&this.col>=0}isRtl(){return i(l,this)}isSouthEastOf(t){return this.row>=t.row&&(i(l,this)?this.col<=t.col:this.col>=t.col)}isNorthWestOf(t){return this.row<=t.row&&(i(l,this)?this.col>=t.col:this.col<=t.col)}isSouthWestOf(t){return this.row>=t.row&&(i(l,this)?this.col>=t.col:this.col<=t.col)}isNorthEastOf(t){return this.row<=t.row&&(i(l,this)?this.col<=t.col:this.col>=t.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(t){return Number.isInteger(null==t?void 0:t.row)&&(this.row=t.row),Number.isInteger(null==t?void 0:t.col)&&(this.col=t.col),t instanceof a&&r(l,this,t.isRtl()),this}clone(){return new a(this.row,this.col,i(l,this))}toObject(){return{row:this.row,col:this.col}}}const h=a},3717:(t,e)=>{e.f=Object.getOwnPropertySymbols},3724:(t,e,o)=>{var n=o(9039);t.exports=!n((function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]}))},3789:(t,e,o)=>{var n=o(9306),i=o(8551),r=o(9565),s=o(1291),l=o(1767),a="Invalid size",h=RangeError,c=TypeError,d=Math.max,u=function(t,e){this.set=t,this.size=d(e,0),this.has=n(t.has),this.keys=n(t.keys)};u.prototype={getIterator:function(){return l(i(r(this.keys,this.set)))},includes:function(t){return r(this.has,this.set,t)}},t.exports=function(t){i(t);var e=+t.size;if(e!=e)throw new c(a);var o=s(e);if(o<0)throw new h(a);return new u(t,o)}},3838:(t,e,o)=>{var n=o(7080),i=o(5170),r=o(8469),s=o(3789);t.exports=function(t){var e=n(this),o=s(t);return!(i(e)>o.size)&&!1!==r(e,(function(t){if(!o.includes(t))return!1}),!0)}},3853:(t,e,o)=>{var n=o(6518),i=o(4449);n({target:"Set",proto:!0,real:!0,forced:!o(4916)("isDisjointFrom",(function(t){return!t}))},{isDisjointFrom:i})},3921:(t,e,o)=>{var n=o(6518),i=o(2652),r=o(2278);n({target:"Object",stat:!0},{fromEntries:function(t){var e={};return i(t,(function(t,o){r(e,t,o)}),{AS_ENTRIES:!0}),e}})},3925:(t,e,o)=>{var n=o(34);t.exports=function(t){return n(t)||null===t}},3949:(t,e,o)=>{o(7588)},3968:(t,e,o)=>{function n(t){return window.requestAnimationFrame(t)}function i(t){window.cancelAnimationFrame(t)}function r(){return"ontouchstart"in window}function s(){return"undefined"!=typeof window}let l;function a(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return l||(l="object"==typeof Intl?new Intl.Collator(t,e).compare:"function"==typeof String.prototype.localeCompare?(t,e)=>`${t}`.localeCompare(e):(t,e)=>t===e?0:t>e?-1:1,l)}o.d(e,{II:()=>a,Nt:()=>s,uU:()=>i,xi:()=>n,yd:()=>r})},3986:(t,e,o)=>{o.d(e,{OH:()=>s,Tn:()=>i,Ty:()=>a,cF:()=>l,sg:()=>r});var n=o(5615);function i(t){return"function"==typeof t}function r(t){let e,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:200,n=null;return function(){for(var i=arguments.length,r=new Array(i),s=0;s<i;s++)r[s]=arguments[s];return n&&clearTimeout(n),n=setTimeout((()=>{e=t.apply(this,r)}),o),e}}function s(t){for(var e=arguments.length,o=new Array(e>1?e-1:0),n=1;n<e;n++)o[n-1]=arguments[n];return function(){for(var e=arguments.length,n=new Array(e),i=0;i<e;i++)n[i]=arguments[i];return t.apply(this,o.concat(n))}}function l(t){const e=t.length;return function o(n){return function(){for(var i=arguments.length,r=new Array(i),s=0;s<i;s++)r[s]=arguments[s];const l=n.concat(r);let a;return a=l.length>=e?t.apply(this,l):o(l),a}}([])}function a(t,e,o,i,r,s,l,a){return(0,n.O9)(a)?t.call(e,o,i,r,s,l,a):(0,n.O9)(l)?t.call(e,o,i,r,s,l):(0,n.O9)(s)?t.call(e,o,i,r,s):(0,n.O9)(r)?t.call(e,o,i,r):(0,n.O9)(i)?t.call(e,o,i):(0,n.O9)(o)?t.call(e,o):t.call(e)}},4055:(t,e,o)=>{var n=o(4576),i=o(34),r=n.document,s=i(r)&&i(r.createElement);t.exports=function(t){return s?r.createElement(t):{}}},4114:(t,e,o)=>{var n=o(6518),i=o(8981),r=o(6198),s=o(4527),l=o(6837);n({target:"Array",proto:!0,arity:1,forced:o(9039)((function(){return 4294967297!==[].push.call({length:4294967296},1)}))||!function(){try{Object.defineProperty([],"length",{writable:!1}).push()}catch(t){return t instanceof TypeError}}()},{push:function(t){var e=i(this),o=r(e),n=arguments.length;l(o+n);for(var a=0;a<n;a++)e[o]=arguments[a],o++;return s(e,o),o}})},4117:t=>{t.exports=function(t){return null==t}},4124:(t,e,o)=>{var n=o(4576);t.exports=function(t,e){var o=n[t],i=o&&o.prototype;return i&&i[e]}},4146:(t,e,o)=>{var n=o(3404),i={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},r={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},s={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},l={};function a(t){return n.isMemo(t)?s:l[t.$$typeof]||i}l[n.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},l[n.Memo]=s;var h=Object.defineProperty,c=Object.getOwnPropertyNames,d=Object.getOwnPropertySymbols,u=Object.getOwnPropertyDescriptor,g=Object.getPrototypeOf,f=Object.prototype;t.exports=function t(e,o,n){if("string"!=typeof o){if(f){var i=g(o);i&&i!==f&&t(e,i,n)}var s=c(o);d&&(s=s.concat(d(o)));for(var l=a(e),p=a(o),m=0;m<s.length;++m){var w=s[m];if(!(r[w]||n&&n[w]||p&&p[w]||l&&l[w])){var b=u(o,w);try{h(e,w,b)}catch(t){}}}}return e}},4164:(t,e,o)=>{function n(t){var e,o,i="";if("string"==typeof t||"number"==typeof t)i+=t;else if("object"==typeof t)if(Array.isArray(t)){var r=t.length;for(e=0;e<r;e++)t[e]&&(o=n(t[e]))&&(i&&(i+=" "),i+=o)}else for(o in t)t[o]&&(i&&(i+=" "),i+=o);return i}o.d(e,{A:()=>i});const i=function(){for(var t,e,o=0,i="",r=arguments.length;o<r;o++)(t=arguments[o])&&(e=n(t))&&(i&&(i+=" "),i+=e);return i}},4204:(t,e,o)=>{var n=o(7080),i=o(4402).add,r=o(9286),s=o(3789),l=o(507);t.exports=function(t){var e=n(this),o=s(t).getIterator(),a=r(e);return l(o,(function(t){i(a,t)})),a}},4209:(t,e,o)=>{var n=o(8227),i=o(6269),r=n("iterator"),s=Array.prototype;t.exports=function(t){return void 0!==t&&(i.Array===t||s[r]===t)}},4215:(t,e,o)=>{var n=o(4576),i=o(2839),r=o(2195),s=function(t){return i.slice(0,t.length)===t};t.exports=s("Bun/")?"BUN":s("Cloudflare-Workers")?"CLOUDFLARE":s("Deno/")?"DENO":s("Node.js/")?"NODE":n.Bun&&"string"==typeof Bun.version?"BUN":n.Deno&&"object"==typeof Deno.version?"DENO":"process"===r(n.process)?"NODE":n.window&&n.document?"BROWSER":"REST"},4270:(t,e,o)=>{var n=o(9565),i=o(4901),r=o(34),s=TypeError;t.exports=function(t,e){var o,l;if("string"===e&&i(o=t.toString)&&!r(l=n(o,t)))return l;if(i(o=t.valueOf)&&!r(l=n(o,t)))return l;if("string"!==e&&i(o=t.toString)&&!r(l=n(o,t)))return l;throw new s("Can't convert object to primitive value")}},4360:(t,e,o)=>{o.d(e,{Pi:()=>rt,DU:()=>it,aj:()=>at,Kq:()=>lt,V2:()=>st,Ob:()=>nt}),o(4114);const{entries:n,setPrototypeOf:i,isFrozen:r,getPrototypeOf:s,getOwnPropertyDescriptor:l}=Object;let{freeze:a,seal:h,create:c}=Object,{apply:d,construct:u}="undefined"!=typeof Reflect&&Reflect;a||(a=function(t){return t}),h||(h=function(t){return t}),d||(d=function(t,e,o){return t.apply(e,o)}),u||(u=function(t,e){return new t(...e)});const g=I(Array.prototype.forEach),f=I(Array.prototype.lastIndexOf),p=I(Array.prototype.pop),m=I(Array.prototype.push),w=I(Array.prototype.splice),b=I(String.prototype.toLowerCase),v=I(String.prototype.toString),y=I(String.prototype.match),C=I(String.prototype.replace),S=I(String.prototype.indexOf),R=I(String.prototype.trim),E=I(Object.prototype.hasOwnProperty),T=I(RegExp.prototype.test),x=(M=TypeError,function(){for(var t=arguments.length,e=new Array(t),o=0;o<t;o++)e[o]=arguments[o];return u(M,e)});var M;function I(t){return function(e){e instanceof RegExp&&(e.lastIndex=0);for(var o=arguments.length,n=new Array(o>1?o-1:0),i=1;i<o;i++)n[i-1]=arguments[i];return d(t,e,n)}}function H(t,e){let o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:b;i&&i(t,null);let n=e.length;for(;n--;){let i=e[n];if("string"==typeof i){const t=o(i);t!==i&&(r(e)||(e[n]=t),i=t)}t[i]=!0}return t}function O(t){for(let e=0;e<t.length;e++)E(t,e)||(t[e]=null);return t}function A(t){const e=c(null);for(const[o,i]of n(t))E(t,o)&&(Array.isArray(i)?e[o]=O(i):i&&"object"==typeof i&&i.constructor===Object?e[o]=A(i):e[o]=i);return e}function k(t,e){for(;null!==t;){const o=l(t,e);if(o){if(o.get)return I(o.get);if("function"==typeof o.value)return I(o.value)}t=s(t)}return function(){return null}}const _=a(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),N=a(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),P=a(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),L=a(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),D=a(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),V=a(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),F=a(["#text"]),B=a(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),W=a(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),z=a(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),j=a(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),U=h(/\{\{[\w\W]*|[\w\W]*\}\}/gm),$=h(/<%[\w\W]*|[\w\W]*%>/gm),G=h(/\$\{[\w\W]*/gm),Y=h(/^data-[\-\w.\u00B7-\uFFFF]+$/),X=h(/^aria-[\-\w]+$/),q=h(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),K=h(/^(?:\w+script|data):/i),Q=h(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),J=h(/^html$/i),Z=h(/^[a-z][.\w]*(-[.\w]+)+$/i);var tt=Object.freeze({__proto__:null,ARIA_ATTR:X,ATTR_WHITESPACE:Q,CUSTOM_ELEMENT:Z,DATA_ATTR:Y,DOCTYPE_NAME:J,ERB_EXPR:$,IS_ALLOWED_URI:q,IS_SCRIPT_OR_DATA:K,MUSTACHE_EXPR:U,TMPLIT_EXPR:G});const et=function(){return"undefined"==typeof window?null:window};var ot=function t(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:et();const o=e=>t(e);if(o.version="3.2.6",o.removed=[],!e||!e.document||9!==e.document.nodeType||!e.Element)return o.isSupported=!1,o;let{document:i}=e;const r=i,s=r.currentScript,{DocumentFragment:l,HTMLTemplateElement:h,Node:d,Element:u,NodeFilter:M,NamedNodeMap:I=e.NamedNodeMap||e.MozNamedAttrMap,HTMLFormElement:O,DOMParser:U,trustedTypes:$}=e,G=u.prototype,Y=k(G,"cloneNode"),X=k(G,"remove"),K=k(G,"nextSibling"),Q=k(G,"childNodes"),Z=k(G,"parentNode");if("function"==typeof h){const t=i.createElement("template");t.content&&t.content.ownerDocument&&(i=t.content.ownerDocument)}let ot,nt="";const{implementation:it,createNodeIterator:rt,createDocumentFragment:st,getElementsByTagName:lt}=i,{importNode:at}=r;let ht={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]};o.isSupported="function"==typeof n&&"function"==typeof Z&&it&&void 0!==it.createHTMLDocument;const{MUSTACHE_EXPR:ct,ERB_EXPR:dt,TMPLIT_EXPR:ut,DATA_ATTR:gt,ARIA_ATTR:ft,IS_SCRIPT_OR_DATA:pt,ATTR_WHITESPACE:mt,CUSTOM_ELEMENT:wt}=tt;let{IS_ALLOWED_URI:bt}=tt,vt=null;const yt=H({},[..._,...N,...P,...D,...F]);let Ct=null;const St=H({},[...B,...W,...z,...j]);let Rt=Object.seal(c(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),Et=null,Tt=null,xt=!0,Mt=!0,It=!1,Ht=!0,Ot=!1,At=!0,kt=!1,_t=!1,Nt=!1,Pt=!1,Lt=!1,Dt=!1,Vt=!0,Ft=!1,Bt=!0,Wt=!1,zt={},jt=null;const Ut=H({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let $t=null;const Gt=H({},["audio","video","img","source","image","track"]);let Yt=null;const Xt=H({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),qt="http://www.w3.org/1998/Math/MathML",Kt="http://www.w3.org/2000/svg",Qt="http://www.w3.org/1999/xhtml";let Jt=Qt,Zt=!1,te=null;const ee=H({},[qt,Kt,Qt],v);let oe=H({},["mi","mo","mn","ms","mtext"]),ne=H({},["annotation-xml"]);const ie=H({},["title","style","font","a","script"]);let re=null;const se=["application/xhtml+xml","text/html"];let le=null,ae=null;const he=i.createElement("form"),ce=function(t){return t instanceof RegExp||t instanceof Function},de=function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!ae||ae!==t){if(t&&"object"==typeof t||(t={}),t=A(t),re=-1===se.indexOf(t.PARSER_MEDIA_TYPE)?"text/html":t.PARSER_MEDIA_TYPE,le="application/xhtml+xml"===re?v:b,vt=E(t,"ALLOWED_TAGS")?H({},t.ALLOWED_TAGS,le):yt,Ct=E(t,"ALLOWED_ATTR")?H({},t.ALLOWED_ATTR,le):St,te=E(t,"ALLOWED_NAMESPACES")?H({},t.ALLOWED_NAMESPACES,v):ee,Yt=E(t,"ADD_URI_SAFE_ATTR")?H(A(Xt),t.ADD_URI_SAFE_ATTR,le):Xt,$t=E(t,"ADD_DATA_URI_TAGS")?H(A(Gt),t.ADD_DATA_URI_TAGS,le):Gt,jt=E(t,"FORBID_CONTENTS")?H({},t.FORBID_CONTENTS,le):Ut,Et=E(t,"FORBID_TAGS")?H({},t.FORBID_TAGS,le):A({}),Tt=E(t,"FORBID_ATTR")?H({},t.FORBID_ATTR,le):A({}),zt=!!E(t,"USE_PROFILES")&&t.USE_PROFILES,xt=!1!==t.ALLOW_ARIA_ATTR,Mt=!1!==t.ALLOW_DATA_ATTR,It=t.ALLOW_UNKNOWN_PROTOCOLS||!1,Ht=!1!==t.ALLOW_SELF_CLOSE_IN_ATTR,Ot=t.SAFE_FOR_TEMPLATES||!1,At=!1!==t.SAFE_FOR_XML,kt=t.WHOLE_DOCUMENT||!1,Pt=t.RETURN_DOM||!1,Lt=t.RETURN_DOM_FRAGMENT||!1,Dt=t.RETURN_TRUSTED_TYPE||!1,Nt=t.FORCE_BODY||!1,Vt=!1!==t.SANITIZE_DOM,Ft=t.SANITIZE_NAMED_PROPS||!1,Bt=!1!==t.KEEP_CONTENT,Wt=t.IN_PLACE||!1,bt=t.ALLOWED_URI_REGEXP||q,Jt=t.NAMESPACE||Qt,oe=t.MATHML_TEXT_INTEGRATION_POINTS||oe,ne=t.HTML_INTEGRATION_POINTS||ne,Rt=t.CUSTOM_ELEMENT_HANDLING||{},t.CUSTOM_ELEMENT_HANDLING&&ce(t.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(Rt.tagNameCheck=t.CUSTOM_ELEMENT_HANDLING.tagNameCheck),t.CUSTOM_ELEMENT_HANDLING&&ce(t.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(Rt.attributeNameCheck=t.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),t.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof t.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(Rt.allowCustomizedBuiltInElements=t.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Ot&&(Mt=!1),Lt&&(Pt=!0),zt&&(vt=H({},F),Ct=[],!0===zt.html&&(H(vt,_),H(Ct,B)),!0===zt.svg&&(H(vt,N),H(Ct,W),H(Ct,j)),!0===zt.svgFilters&&(H(vt,P),H(Ct,W),H(Ct,j)),!0===zt.mathMl&&(H(vt,D),H(Ct,z),H(Ct,j))),t.ADD_TAGS&&(vt===yt&&(vt=A(vt)),H(vt,t.ADD_TAGS,le)),t.ADD_ATTR&&(Ct===St&&(Ct=A(Ct)),H(Ct,t.ADD_ATTR,le)),t.ADD_URI_SAFE_ATTR&&H(Yt,t.ADD_URI_SAFE_ATTR,le),t.FORBID_CONTENTS&&(jt===Ut&&(jt=A(jt)),H(jt,t.FORBID_CONTENTS,le)),Bt&&(vt["#text"]=!0),kt&&H(vt,["html","head","body"]),vt.table&&(H(vt,["tbody"]),delete Et.tbody),t.TRUSTED_TYPES_POLICY){if("function"!=typeof t.TRUSTED_TYPES_POLICY.createHTML)throw x('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof t.TRUSTED_TYPES_POLICY.createScriptURL)throw x('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');ot=t.TRUSTED_TYPES_POLICY,nt=ot.createHTML("")}else void 0===ot&&(ot=function(t,e){if("object"!=typeof t||"function"!=typeof t.createPolicy)return null;let o=null;const n="data-tt-policy-suffix";e&&e.hasAttribute(n)&&(o=e.getAttribute(n));const i="dompurify"+(o?"#"+o:"");try{return t.createPolicy(i,{createHTML:t=>t,createScriptURL:t=>t})}catch(t){return console.warn("TrustedTypes policy "+i+" could not be created."),null}}($,s)),null!==ot&&"string"==typeof nt&&(nt=ot.createHTML(""));a&&a(t),ae=t}},ue=H({},[...N,...P,...L]),ge=H({},[...D,...V]),fe=function(t){m(o.removed,{element:t});try{Z(t).removeChild(t)}catch(e){X(t)}},pe=function(t,e){try{m(o.removed,{attribute:e.getAttributeNode(t),from:e})}catch(t){m(o.removed,{attribute:null,from:e})}if(e.removeAttribute(t),"is"===t)if(Pt||Lt)try{fe(e)}catch(t){}else try{e.setAttribute(t,"")}catch(t){}},me=function(t){let e=null,o=null;if(Nt)t="<remove></remove>"+t;else{const e=y(t,/^[\r\n\t ]+/);o=e&&e[0]}"application/xhtml+xml"===re&&Jt===Qt&&(t='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+t+"</body></html>");const n=ot?ot.createHTML(t):t;if(Jt===Qt)try{e=(new U).parseFromString(n,re)}catch(t){}if(!e||!e.documentElement){e=it.createDocument(Jt,"template",null);try{e.documentElement.innerHTML=Zt?nt:n}catch(t){}}const r=e.body||e.documentElement;return t&&o&&r.insertBefore(i.createTextNode(o),r.childNodes[0]||null),Jt===Qt?lt.call(e,kt?"html":"body")[0]:kt?e.documentElement:r},we=function(t){return rt.call(t.ownerDocument||t,t,M.SHOW_ELEMENT|M.SHOW_COMMENT|M.SHOW_TEXT|M.SHOW_PROCESSING_INSTRUCTION|M.SHOW_CDATA_SECTION,null)},be=function(t){return t instanceof O&&("string"!=typeof t.nodeName||"string"!=typeof t.textContent||"function"!=typeof t.removeChild||!(t.attributes instanceof I)||"function"!=typeof t.removeAttribute||"function"!=typeof t.setAttribute||"string"!=typeof t.namespaceURI||"function"!=typeof t.insertBefore||"function"!=typeof t.hasChildNodes)},ve=function(t){return"function"==typeof d&&t instanceof d};function ye(t,e,n){g(t,(t=>{t.call(o,e,n,ae)}))}const Ce=function(t){let e=null;if(ye(ht.beforeSanitizeElements,t,null),be(t))return fe(t),!0;const n=le(t.nodeName);if(ye(ht.uponSanitizeElement,t,{tagName:n,allowedTags:vt}),At&&t.hasChildNodes()&&!ve(t.firstElementChild)&&T(/<[/\w!]/g,t.innerHTML)&&T(/<[/\w!]/g,t.textContent))return fe(t),!0;if(7===t.nodeType)return fe(t),!0;if(At&&8===t.nodeType&&T(/<[/\w]/g,t.data))return fe(t),!0;if(!vt[n]||Et[n]){if(!Et[n]&&Re(n)){if(Rt.tagNameCheck instanceof RegExp&&T(Rt.tagNameCheck,n))return!1;if(Rt.tagNameCheck instanceof Function&&Rt.tagNameCheck(n))return!1}if(Bt&&!jt[n]){const e=Z(t)||t.parentNode,o=Q(t)||t.childNodes;if(o&&e)for(let n=o.length-1;n>=0;--n){const i=Y(o[n],!0);i.__removalCount=(t.__removalCount||0)+1,e.insertBefore(i,K(t))}}return fe(t),!0}return t instanceof u&&!function(t){let e=Z(t);e&&e.tagName||(e={namespaceURI:Jt,tagName:"template"});const o=b(t.tagName),n=b(e.tagName);return!!te[t.namespaceURI]&&(t.namespaceURI===Kt?e.namespaceURI===Qt?"svg"===o:e.namespaceURI===qt?"svg"===o&&("annotation-xml"===n||oe[n]):Boolean(ue[o]):t.namespaceURI===qt?e.namespaceURI===Qt?"math"===o:e.namespaceURI===Kt?"math"===o&&ne[n]:Boolean(ge[o]):t.namespaceURI===Qt?!(e.namespaceURI===Kt&&!ne[n])&&!(e.namespaceURI===qt&&!oe[n])&&!ge[o]&&(ie[o]||!ue[o]):!("application/xhtml+xml"!==re||!te[t.namespaceURI]))}(t)?(fe(t),!0):"noscript"!==n&&"noembed"!==n&&"noframes"!==n||!T(/<\/no(script|embed|frames)/i,t.innerHTML)?(Ot&&3===t.nodeType&&(e=t.textContent,g([ct,dt,ut],(t=>{e=C(e,t," ")})),t.textContent!==e&&(m(o.removed,{element:t.cloneNode()}),t.textContent=e)),ye(ht.afterSanitizeElements,t,null),!1):(fe(t),!0)},Se=function(t,e,o){if(Vt&&("id"===e||"name"===e)&&(o in i||o in he))return!1;if(Mt&&!Tt[e]&&T(gt,e));else if(xt&&T(ft,e));else if(!Ct[e]||Tt[e]){if(!(Re(t)&&(Rt.tagNameCheck instanceof RegExp&&T(Rt.tagNameCheck,t)||Rt.tagNameCheck instanceof Function&&Rt.tagNameCheck(t))&&(Rt.attributeNameCheck instanceof RegExp&&T(Rt.attributeNameCheck,e)||Rt.attributeNameCheck instanceof Function&&Rt.attributeNameCheck(e))||"is"===e&&Rt.allowCustomizedBuiltInElements&&(Rt.tagNameCheck instanceof RegExp&&T(Rt.tagNameCheck,o)||Rt.tagNameCheck instanceof Function&&Rt.tagNameCheck(o))))return!1}else if(Yt[e]);else if(T(bt,C(o,mt,"")));else if("src"!==e&&"xlink:href"!==e&&"href"!==e||"script"===t||0!==S(o,"data:")||!$t[t])if(It&&!T(pt,C(o,mt,"")));else if(o)return!1;return!0},Re=function(t){return"annotation-xml"!==t&&y(t,wt)},Ee=function(t){ye(ht.beforeSanitizeAttributes,t,null);const{attributes:e}=t;if(!e||be(t))return;const n={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:Ct,forceKeepAttr:void 0};let i=e.length;for(;i--;){const r=e[i],{name:s,namespaceURI:l,value:a}=r,h=le(s),c=a;let d="value"===s?c:R(c);if(n.attrName=h,n.attrValue=d,n.keepAttr=!0,n.forceKeepAttr=void 0,ye(ht.uponSanitizeAttribute,t,n),d=n.attrValue,!Ft||"id"!==h&&"name"!==h||(pe(s,t),d="user-content-"+d),At&&T(/((--!?|])>)|<\/(style|title)/i,d)){pe(s,t);continue}if(n.forceKeepAttr)continue;if(!n.keepAttr){pe(s,t);continue}if(!Ht&&T(/\/>/i,d)){pe(s,t);continue}Ot&&g([ct,dt,ut],(t=>{d=C(d,t," ")}));const u=le(t.nodeName);if(Se(u,h,d)){if(ot&&"object"==typeof $&&"function"==typeof $.getAttributeType)if(l);else switch($.getAttributeType(u,h)){case"TrustedHTML":d=ot.createHTML(d);break;case"TrustedScriptURL":d=ot.createScriptURL(d)}if(d!==c)try{l?t.setAttributeNS(l,s,d):t.setAttribute(s,d),be(t)?fe(t):p(o.removed)}catch(e){pe(s,t)}}else pe(s,t)}ye(ht.afterSanitizeAttributes,t,null)},Te=function t(e){let o=null;const n=we(e);for(ye(ht.beforeSanitizeShadowDOM,e,null);o=n.nextNode();)ye(ht.uponSanitizeShadowNode,o,null),Ce(o),Ee(o),o.content instanceof l&&t(o.content);ye(ht.afterSanitizeShadowDOM,e,null)};return o.sanitize=function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=null,i=null,s=null,a=null;if(Zt=!t,Zt&&(t="\x3c!--\x3e"),"string"!=typeof t&&!ve(t)){if("function"!=typeof t.toString)throw x("toString is not a function");if("string"!=typeof(t=t.toString()))throw x("dirty is not a string, aborting")}if(!o.isSupported)return t;if(_t||de(e),o.removed=[],"string"==typeof t&&(Wt=!1),Wt){if(t.nodeName){const e=le(t.nodeName);if(!vt[e]||Et[e])throw x("root node is forbidden and cannot be sanitized in-place")}}else if(t instanceof d)n=me("\x3c!----\x3e"),i=n.ownerDocument.importNode(t,!0),1===i.nodeType&&"BODY"===i.nodeName||"HTML"===i.nodeName?n=i:n.appendChild(i);else{if(!Pt&&!Ot&&!kt&&-1===t.indexOf("<"))return ot&&Dt?ot.createHTML(t):t;if(n=me(t),!n)return Pt?null:Dt?nt:""}n&&Nt&&fe(n.firstChild);const h=we(Wt?t:n);for(;s=h.nextNode();)Ce(s),Ee(s),s.content instanceof l&&Te(s.content);if(Wt)return t;if(Pt){if(Lt)for(a=st.call(n.ownerDocument);n.firstChild;)a.appendChild(n.firstChild);else a=n;return(Ct.shadowroot||Ct.shadowrootmode)&&(a=at.call(r,a,!0)),a}let c=kt?n.outerHTML:n.innerHTML;return kt&&vt["!doctype"]&&n.ownerDocument&&n.ownerDocument.doctype&&n.ownerDocument.doctype.name&&T(J,n.ownerDocument.doctype.name)&&(c="<!DOCTYPE "+n.ownerDocument.doctype.name+">\n"+c),Ot&&g([ct,dt,ut],(t=>{c=C(c,t," ")})),ot&&Dt?ot.createHTML(c):c},o.setConfig=function(){de(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),_t=!0},o.clearConfig=function(){ae=null,_t=!1},o.isValidAttribute=function(t,e,o){ae||de({});const n=le(t),i=le(e);return Se(n,i,o)},o.addHook=function(t,e){"function"==typeof e&&m(ht[t],e)},o.removeHook=function(t,e){if(void 0!==e){const o=f(ht[t],e);return-1===o?void 0:w(ht[t],o,1)[0]}return p(ht[t])},o.removeHooks=function(t){ht[t]=[]},o.removeAllHooks=function(){ht={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},o}();function nt(t){return t[0].toUpperCase()+t.substr(1)}function it(){function t(){return Math.floor(65536*(1+Math.random())).toString(16).substring(1)}return t()+t()+t()+t()}function rt(t){return/^([0-9][0-9]?%$)|(^100%$)/.test(t)}function st(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return`${t}`.replace(/(?:\\)?\[([^[\]]+)]/g,((t,o)=>"\\"===t.charAt(0)?t.substr(1,t.length-1):void 0===e[o]?"":e[o]))}function lt(t){return at(`${t}`,{ALLOWED_TAGS:[]})}function at(t,e){return ot.sanitize(t,e)}},4376:(t,e,o)=>{var n=o(2195);t.exports=Array.isArray||function(t){return"Array"===n(t)}},4389:(t,e,o)=>{o.d(e,{Ay:()=>Sl}),o(6280),o(4114),o(3921),o(7642),o(8004),o(3853),o(5876),o(2475),o(5024),o(1698),o(8992),o(4520),o(3949),o(1454),o(9848);var n=o(91),i=o(3986),r=o(5615),s=o(8002),l=o(8419),a=o(5155),h=o(1080),c=o(8061);function d(t,e,o){return(e=function(t){var e=function(t){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var o=e.call(t,"string");if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[e]=o,t}function u(t,e,o){if("function"==typeof t?t===e:t.has(e))return arguments.length<3?e:o;throw new TypeError("Private element is not present on this object")}var g=new WeakSet;class f{constructor(t,e,o){var n,i;(function(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")})(n=this,i=g),i.add(n),d(this,"hot",void 0),d(this,"tableMeta",void 0),d(this,"selection",void 0),d(this,"eventManager",void 0),d(this,"destroyed",!1),d(this,"activeEditor",void 0),d(this,"cellProperties",void 0),this.hot=t,this.tableMeta=e,this.selection=o,this.eventManager=new c.A(t),this.hot.addHook("afterDocumentKeyDown",(t=>u(g,this,p).call(this,t))),this.hot.addHook("beforeCompositionStart",(t=>u(g,this,p).call(this,t))),this.hot.view._wt.update("onCellDblClick",((t,e,o)=>u(g,this,m).call(this,t,e,o)))}getActiveEditor(){return this.activeEditor}prepareEditor(){var t;if(this.activeEditor&&this.activeEditor.isWaiting())return void this.closeEditor(!1,!1,(t=>{t&&this.prepareEditor()}));const e=null===(t=this.hot.getSelectedRangeLast())||void 0===t?void 0:t.highlight;if(!e||e.isHeader())return;const{row:o,col:n}=e,i=this.hot.runHooks("modifyGetCellCoords",o,n,!1,"meta");let r=o,s=n;if(Array.isArray(i)&&([r,s]=i),this.cellProperties=this.hot.getCellMeta(r,s),!this.isCellEditable())return void this.clearActiveEditor();const l=this.hot.getCell(o,n,!0);if(l){const t=this.hot.getCellEditor(this.cellProperties),e=this.hot.colToProp(s),i=this.hot.getSourceDataAtCell(this.hot.toPhysicalRow(r),s);this.activeEditor=(0,h.L3)(t,this.hot),this.activeEditor.prepare(o,n,e,l,i,this.cellProperties)}}isEditorOpened(){return this.activeEditor&&this.activeEditor.isOpened()}openEditor(t,e){let o=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(!this.isCellEditable())return void this.clearActiveEditor();const n=this.hot.getSelectedRangeLast();let i=this.hot.runHooks("beforeBeginEditing",n.highlight.row,n.highlight.col,t,e,o);e instanceof MouseEvent&&"boolean"!=typeof i&&(i=0===this.hot.selection.getLayerLevel()&&n.isSingle()),!1!==i?(this.activeEditor||(this.hot.scrollToFocusedCell(),this.prepareEditor()),this.activeEditor&&(o&&this.activeEditor.enableFullEditMode(),this.activeEditor.beginEditing(t,e))):this.clearActiveEditor()}closeEditor(t,e,o){this.activeEditor?this.activeEditor.finishEditing(t,e,o):o&&o(!1)}closeEditorAndSaveChanges(t){this.closeEditor(!1,t)}closeEditorAndRestoreOriginalValue(t){this.closeEditor(!0,t)}clearActiveEditor(){this.activeEditor=void 0}isCellEditable(){const t=this.hot.getSelectedRangeLast();if(!t)return!1;const e=this.hot.getCellEditor(this.cellProperties),{row:o,col:n}=t.highlight,{rowIndexMapper:i,columnIndexMapper:r}=this.hot,s=i.isHidden(this.hot.toPhysicalRow(o))||r.isHidden(this.hot.toPhysicalColumn(n));return!(this.cellProperties.readOnly||!e||s)}moveSelectionAfterEnter(t){const e={..."function"==typeof this.tableMeta.enterMoves?this.tableMeta.enterMoves(t):this.tableMeta.enterMoves};t.shiftKey&&(e.row=-e.row,e.col=-e.col),this.hot.selection.isMultiple()?this.selection.transformFocus(e.row,e.col):this.selection.transformStart(e.row,e.col,!0)}destroy(){this.destroyed=!0,this.eventManager.destroy()}}function p(t){const e=this.hot.getSelectedRangeLast();if(!this.hot.isListening()||!e||e.highlight.isHeader()||(0,a.d)(t))return;const{keyCode:o}=t,n=(t.ctrlKey||t.metaKey)&&!t.altKey;(!this.activeEditor||this.activeEditor&&!this.activeEditor.isWaiting())&&((0,l.Yf)(o)||(0,l.SI)(o)||n||this.isEditorOpened()||this.openEditor("",t))}function m(t,e){e.isCell()&&this.openEditor(null,t,!0)}const w=new WeakMap;f.getInstance=function(t,e,o){let n=w.get(t);return n||(n=new f(t,e,o),w.set(t,n)),n};const b=f;var v=o(2919),y=o(2617);function C(t,e,o){S(t,e),e.set(t,o)}function S(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function R(t,e){return t.get(T(t,e))}function E(t,e,o){return t.set(T(t,e),o),o}function T(t,e,o){if("function"==typeof t?t===e:t.has(e))return arguments.length<3?e:o;throw new TypeError("Private element is not present on this object")}const x=Object.freeze({CELL:"cell",MIXED:"mixed"});var M=new WeakMap,I=new WeakMap,H=new WeakMap,O=new WeakMap,A=new WeakMap,k=new WeakSet;class _{constructor(t){var e,o=this;S(this,e=k),e.add(this),C(this,M,void 0),C(this,I,void 0),C(this,H,1),C(this,O,null),C(this,A,new Map);const n=t.getSettings();E(M,this,t),E(I,this,n.imeFastEdit?x.MIXED:x.CELL),R(M,this).addHook("afterUpdateSettings",(function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return T(k,o,D).call(o,...e)})),R(M,this).addHook("afterSelection",(function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return T(k,o,P).call(o,...e)})),R(M,this).addHook("afterSelectionFocusSet",(function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return T(k,o,P).call(o,...e)})),R(M,this).addHook("afterSelectionEnd",(function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return T(k,o,L).call(o,...e)}))}getFocusMode(){return R(I,this)}setFocusMode(t){Object.values(x).includes(t)?E(I,this,t):(0,y.R8)(`"${t}" is not a valid focus mode.`)}getRefocusDelay(){return R(H,this)}setRefocusDelay(t){E(H,this,t)}setRefocusElementGetter(t){E(O,this,t)}getRefocusElement(){var t;return"function"==typeof R(O,this)?R(O,this).call(this):null===(t=R(M,this).getActiveEditor())||void 0===t?void 0:t.TEXTAREA}focusOnHighlightedCell(t){const e=t=>{var e,o;const i=null===(e=R(M,this).getSelectedRangeLast())||void 0===e?void 0:e.highlight;if(!i)return;let r=R(M,this).runHooks("modifyFocusedElement",i.row,i.col,t);(0,n.sb)(r)||(r=t),!r||null!==(o=R(M,this).getActiveEditor())&&void 0!==o&&o.isOpened()||r.focus({preventScroll:!0})};t?e(t):T(k,this,N).call(this,(t=>e(t)))}refocusToEditorTextarea(){var t;let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:R(H,this);var o,n;!R(M,this).getSettings().imeFastEdit||null!==(t=R(M,this).getActiveEditor())&&void 0!==t&&t.isOpened()||(null===(o=R(M,this).getActiveEditor())||void 0===o||null===(n=o.refreshValue)||void 0===n||n.call(o),R(A,this).has(e)||R(A,this).set(e,(0,i.sg)((()=>{var t;R(M,this).isDestroyed||null===(t=this.getRefocusElement())||void 0===t||t.select()}),e)),R(A,this).get(e)())}}function N(t){var e;const o=null===(e=R(M,this).getSelectedRangeLast())||void 0===e?void 0:e.highlight;if(!o||!R(M,this).selection.isCellVisible(o))return void t(null);const n=R(M,this).getCell(o.row,o.col,!0);null===n?R(M,this).addHookOnce("afterScroll",(()=>{t(R(M,this).getCell(o.row,o.col,!0))})):t(n)}function P(){T(k,this,N).call(this,(t=>{const{activeElement:e}=R(M,this).rootDocument;e&&(0,n.E3)(e)&&e.blur(),this.focusOnHighlightedCell(t)}))}function L(){T(k,this,N).call(this,(t=>{this.getFocusMode()===x.MIXED&&"TD"===(null==t?void 0:t.nodeName)&&this.refocusToEditorTextarea()}))}function D(t){"boolean"==typeof t.imeFastEdit&&this.setFocusMode(t.imeFastEdit?x.MIXED:x.CELL)}var V=o(7325),F=o(2257),B=o(6833),W=o(4950),z=o(2993),j=o(4360),U=o(1409),$=o(3968);function G(t,e,o){(function(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")})(t,e),e.set(t,o)}function Y(t,e){return t.get(q(t,e))}function X(t,e,o){return t.set(q(t,e),o),o}function q(t,e,o){if("function"==typeof t?t===e:t.has(e))return arguments.length<3?e:o;throw new TypeError("Private element is not present on this object")}var K=new WeakMap,Q=new WeakMap,J=new WeakMap,Z=new WeakMap,tt=new WeakMap,et=new WeakMap,ot=new WeakMap,nt=new WeakMap,it=new WeakMap,rt=new WeakMap;const st=class{constructor(t,e,o,n,i,r){let s=arguments.length>6&&void 0!==arguments[6]?arguments[6]:null;G(this,K,void 0),G(this,Q,void 0),G(this,J,void 0),G(this,Z,void 0),G(this,tt,void 0),G(this,et,void 0),G(this,ot,void 0),G(this,nt,void 0),G(this,it,[null,null]),G(this,rt,[null,null]),X(K,this,o),X(Q,this,e),X(J,this,i),X(Z,this,r),X(tt,this,s),X(et,this,n),X(ot,this,t),this.registerEvents()}registerEvents(){Y(et,this).addEventListener(Y(J,this).holder,"contextmenu",(t=>this.onContextMenu(t))),Y(et,this).addEventListener(Y(J,this).TABLE,"mouseover",(t=>this.onMouseOver(t))),Y(et,this).addEventListener(Y(J,this).TABLE,"mouseout",(t=>this.onMouseOut(t)));const t=()=>{Y(et,this).addEventListener(Y(J,this).holder,"touchstart",(t=>this.onTouchStart(t))),Y(et,this).addEventListener(Y(J,this).holder,"touchend",(t=>this.onTouchEnd(t))),this.momentumScrolling||(this.momentumScrolling={}),Y(et,this).addEventListener(Y(J,this).holder,"scroll",(()=>{clearTimeout(this.momentumScrolling._timeout),this.momentumScrolling.ongoing||Y(K,this).getSetting("onBeforeTouchScroll"),this.momentumScrolling.ongoing=!0,this.momentumScrolling._timeout=setTimeout((()=>{this.touchApplied||(this.momentumScrolling.ongoing=!1,Y(K,this).getSetting("onAfterMomentumScroll"))}),200)}))};(0,s.rr)()?t():((0,$.yd)()&&t(),(()=>{Y(et,this).addEventListener(Y(J,this).holder,"mouseup",(t=>this.onMouseUp(t))),Y(et,this).addEventListener(Y(J,this).holder,"mousedown",(t=>this.onMouseDown(t)))})())}selectedCellWasTouched(t){const e=this.parentCell(t).coords;if(Y(nt,this)&&e){const[t,o]=[e.row,Y(nt,this).from.row],[n,i]=[e.col,Y(nt,this).from.col];return t===o&&n===i}return!1}parentCell(t){const e={},o=Y(J,this).TABLE,i=(0,n.cr)(t,["TD","TH"],o);return i?(e.coords=Y(J,this).getCoords(i),e.TD=i):(0,n.nB)(t,"wtBorder")&&(0,n.nB)(t,"current")?(e.coords=Y(Z,this).getFocusSelection().cellRange.highlight,e.TD=Y(J,this).getCell(e.coords)):(0,n.nB)(t,"wtBorder")&&(0,n.nB)(t,"area")&&Y(Z,this).getAreaSelection().cellRange&&(e.coords=Y(Z,this).getAreaSelection().cellRange.to,e.TD=Y(J,this).getCell(e.coords)),e}onMouseDown(t){const e=Y(Q,this).rootDocument.activeElement,o=(0,i.OH)(n.PA,t.target),r=t.target;if(!["TD","TH"].includes(e.nodeName)&&(r===e||o(0)===e||o(1)===e))return;const s=this.parentCell(r);(0,n.nB)(r,"corner")?Y(K,this).getSetting("onCellCornerMouseDown",t,r):s.TD&&Y(K,this).has("onCellMouseDown")&&this.callListener("onCellMouseDown",t,s.coords,s.TD),(0===t.button||this.touchApplied)&&s.TD&&(Y(rt,this)[0]=s.TD,clearTimeout(Y(it,this)[0]),Y(it,this)[0]=setTimeout((()=>{Y(rt,this)[0]=null}),1e3))}onContextMenu(t){if(Y(K,this).has("onCellContextMenu")){const e=this.parentCell(t.target);e.TD&&this.callListener("onCellContextMenu",t,e.coords,e.TD)}}onMouseOver(t){if(!Y(K,this).has("onCellMouseOver"))return;const e=Y(J,this).TABLE,o=(0,n.cr)(t.target,["TD","TH"],e),i=Y(tt,this)||this;o&&o!==i.lastMouseOver&&(0,n.aO)(o,e)&&(i.lastMouseOver=o,this.callListener("onCellMouseOver",t,Y(J,this).getCoords(o),o))}onMouseOut(t){if(!Y(K,this).has("onCellMouseOut"))return;const e=Y(J,this).TABLE,o=(0,n.cr)(t.target,["TD","TH"],e),i=(0,n.cr)(t.relatedTarget,["TD","TH"],e),r=Y(tt,this)||this;o&&o!==i&&(0,n.aO)(o,e)&&(this.callListener("onCellMouseOut",t,Y(J,this).getCoords(o),o),null===i&&(r.lastMouseOver=null))}onMouseUp(t){const e=this.parentCell(t.target);e.TD&&Y(K,this).has("onCellMouseUp")&&this.callListener("onCellMouseUp",t,e.coords,e.TD),(0===t.button||this.touchApplied)&&(e.TD===Y(rt,this)[0]&&e.TD===Y(rt,this)[1]?((0,n.nB)(t.target,"corner")?this.callListener("onCellCornerDblClick",t,e.coords,e.TD):this.callListener("onCellDblClick",t,e.coords,e.TD),Y(rt,this)[0]=null,Y(rt,this)[1]=null):e.TD===Y(rt,this)[0]&&(Y(rt,this)[1]=e.TD,clearTimeout(Y(it,this)[1]),Y(it,this)[1]=setTimeout((()=>{Y(rt,this)[1]=null}),500)))}onTouchStart(t){X(nt,this,Y(Z,this).getFocusSelection().cellRange),this.touchApplied=!0,this.onMouseDown(t)}onTouchEnd(t){var e;const o=t.target,n=null===(e=this.parentCell(o))||void 0===e?void 0:e.coords,i=(0,r.O9)(n)&&n.row>=0&&n.col>=0;if(t.cancelable&&i&&Y(K,this).getSetting("isDataViewInstance")){const e=["A","BUTTON","INPUT"];(0,s.un)()&&((0,s.B6)()||(0,s.wF)())&&this.selectedCellWasTouched(o)&&!e.includes(o.tagName)?t.preventDefault():this.selectedCellWasTouched(o)||t.preventDefault()}this.onMouseUp(t),this.touchApplied=!1}callListener(t,e,o,n){const i=Y(K,this).getSettingPure(t);i&&i(e,o,n,Y(ot,this).call(this))}destroy(){clearTimeout(Y(it,this)[0]),clearTimeout(Y(it,this)[1]),Y(et,this).destroy()}};function lt(t,e,o){return(e=function(t){var e=function(t){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var o=e.call(t,"string");if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[e]=o,t}o(8872);const at=class{constructor(t,e,o){lt(this,"offset",void 0),lt(this,"total",void 0),lt(this,"countTH",void 0),this.offset=t,this.total=e,this.countTH=o}offsetted(t){return t+this.offset}unOffsetted(t){return t-this.offset}renderedToSource(t){return this.offsetted(t)}sourceToRendered(t){return this.unOffsetted(t)}offsettedTH(t){return t-this.countTH}unOffsettedTH(t){return t+this.countTH}visibleRowHeadedColumnToSourceColumn(t){return this.renderedToSource(this.offsettedTH(t))}sourceColumnToVisibleRowHeadedColumn(t){return this.unOffsettedTH(this.sourceToRendered(t))}};function ht(t,e,o){return(e=function(t){var e=function(t){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var o=e.call(t,"string");if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[e]=o,t}const ct=class{constructor(t,e,o){ht(this,"offset",void 0),ht(this,"total",void 0),ht(this,"countTH",void 0),this.offset=t,this.total=e,this.countTH=o}offsetted(t){return t+this.offset}unOffsetted(t){return t-this.offset}renderedToSource(t){return this.offsetted(t)}sourceToRendered(t){return this.unOffsetted(t)}offsettedTH(t){return t-this.countTH}unOffsettedTH(t){return t+this.countTH}visibleColHeadedRowToSourceRow(t){return this.renderedToSource(this.offsettedTH(t))}sourceRowToVisibleColHeadedRow(t){return this.unOffsettedTH(this.sourceToRendered(t))}};function dt(t,e,o){return(e=function(t){var e=function(t){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var o=e.call(t,"string");if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[e]=o,t}class ut{constructor(){dt(this,"currentSize",0),dt(this,"nextSize",0),dt(this,"currentOffset",0),dt(this,"nextOffset",0)}setSize(t){this.currentSize=this.nextSize,this.nextSize=t}setOffset(t){this.currentOffset=this.nextOffset,this.nextOffset=t}}function gt(t,e,o){return(e=function(t){var e=function(t){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var o=e.call(t,"string");if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[e]=o,t}class ft{constructor(){gt(this,"size",new ut),gt(this,"workingSpace",0),gt(this,"sharedSize",null)}setSize(t){this.size.setSize(t)}setOffset(t){this.size.setOffset(t)}getViewSize(){return this.size}isShared(){return null!==this.sharedSize}isPlaceOn(t){return this.workingSpace===t}append(t){this.workingSpace=1,t.workingSpace=2,this.sharedSize=t.getViewSize()}prepend(t){this.workingSpace=2,t.workingSpace=1,this.sharedSize=t.getViewSize()}}o(3609);class pt{constructor(t,e){var o,n,i;o=this,i=[],(n=function(t){var e=function(t){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var o=e.call(t,"string");if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:e+""}(n="order"))in o?Object.defineProperty(o,n,{value:i,enumerable:!0,configurable:!0,writable:!0}):o[n]=i,this.order=[...Array(e).keys()].map((e=>t+e))}get length(){return this.order.length}has(t){return this.order.indexOf(t)>-1}get(t){return t<this.order.length?this.order[t]:-1}remove(t){this.order.splice(this.order.indexOf(t),1)}prepend(t){return this.order.unshift(t),this.order.pop()}}class mt{constructor(t){var e,o,n;e=this,n=void 0,(o=function(t){var e=function(t){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var o=e.call(t,"string");if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:e+""}(o="sizeSet"))in e?Object.defineProperty(e,o,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[o]=n,this.sizeSet=t}diff(){const{sizeSet:t}=this,{currentSize:e,nextSize:o}=t.getViewSize();let n=Math.max(o,e);if(0===n)return[];const{currentOffset:i,nextOffset:r}=t.getViewSize(),s=new pt(i,e),l=new pt(r,o),a=[];for(let e=0;e<n;e++){const i=s.get(e),r=l.get(e);if(-1===r)a.push(["remove",i]);else if(-1===i)!t.isShared()||t.isShared()&&t.isPlaceOn(2)?a.push(["append",r]):a.push(["prepend",r]);else if(r>i)s.has(r)&&(s.remove(r),o<=s.length&&(n-=1)),a.push(["replace",r,i]);else if(r<i){const t=s.prepend(r);a.push(["insert_before",r,i,t])}else a.push(["none",r])}return a}}function wt(t,e,o){return(e=function(t){var e=function(t){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var o=e.call(t,"string");if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[e]=o,t}class bt{constructor(t,e){wt(this,"rootNode",void 0),wt(this,"nodesPool",void 0),wt(this,"sizeSet",new ft),wt(this,"collectedNodes",[]),wt(this,"viewDiffer",new mt(this.sizeSet)),wt(this,"leads",[]),this.rootNode=t,this.nodesPool=e}setSize(t){return this.sizeSet.setSize(t),this}setOffset(t){return this.sizeSet.setOffset(t),this}isSharedViewSet(){return this.sizeSet.isShared()}getNode(t){return t<this.collectedNodes.length?this.collectedNodes[t]:null}getCurrentNode(){const t=this.collectedNodes.length;return t>0?this.collectedNodes[t-1]:null}applyCommand(t){const{rootNode:e}=this,[o,n,i,r]=t,s=this.nodesPool(n);switch(this.collectedNodes.push(s),o){case"prepend":e.insertBefore(s,e.firstChild);break;case"append":e.appendChild(s);break;case"insert_before":e.insertBefore(s,this.nodesPool(i)),e.removeChild(this.nodesPool(r));break;case"replace":e.replaceChild(s,this.nodesPool(i));break;case"remove":e.removeChild(s)}}start(){this.collectedNodes.length=0,this.leads=this.viewDiffer.diff()}render(){this.leads.length>0&&this.applyCommand(this.leads.shift())}end(){for(;this.leads.length>0;)this.applyCommand(this.leads.shift())}}class vt extends bt{prependView(t){return this.sizeSet.prepend(t.sizeSet),t.sizeSet.append(this.sizeSet),this}appendView(t){return this.sizeSet.append(t.sizeSet),t.sizeSet.prepend(this.sizeSet),this}}function yt(t,e,o){return(e=function(t){var e=function(t){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var o=e.call(t,"string");if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[e]=o,t}class Ct{constructor(t){yt(this,"nodeType",void 0),yt(this,"pool",new Map),this.nodeType=t.toUpperCase()}setRootDocument(t){this.rootDocument=t}obtain(t,e){const o="number"==typeof e?`${t}x${e}`:t.toString();if(this.pool.has(o))return this.pool.get(o);const n=this.rootDocument.createElement(this.nodeType);return this.pool.set(o,n),n}}function St(t,e,o){return(e=function(t){var e=function(t){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var o=e.call(t,"string");if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[e]=o,t}class Rt{constructor(t,e){St(this,"nodesPool",null),St(this,"nodeType",void 0),St(this,"rootNode",void 0),St(this,"table",null),St(this,"renderedNodes",0),this.nodesPool="string"==typeof t?new Ct(t):null,this.nodeType=t,this.rootNode=e}setTable(t){this.nodesPool&&this.nodesPool.setRootDocument(t.rootDocument),this.table=t}adjust(){}render(){}}var Et=o(6422);function Tt(t,e,o){return(e=function(t){var e=function(t){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var o=e.call(t,"string");if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[e]=o,t}class xt extends Rt{constructor(){super("TH"),Tt(this,"orderViews",new WeakMap),Tt(this,"sourceRowIndex",0)}obtainOrderView(t){let e;return this.orderViews.has(t)?e=this.orderViews.get(t):(e=new vt(t,(t=>this.nodesPool.obtain(this.sourceRowIndex,t))),this.orderViews.set(t,e)),e}render(){const{rowsToRender:t,rowHeaderFunctions:e,rowHeadersCount:o,rows:i,cells:r}=this.table;for(let s=0;s<t;s++){const t=this.table.renderedRowToSource(s),l=i.getRenderedNode(s);this.sourceRowIndex=t;const a=this.obtainOrderView(l),h=r.obtainOrderView(l);a.appendView(h).setSize(o).setOffset(0).start();for(let i=o-1;i>=0;i--){a.render();const o=a.getCurrentNode();o.className="",o.removeAttribute("style"),(0,n.De)(o,[new RegExp("aria-(.*)"),new RegExp("role")]),this.table.isAriaEnabled()&&(0,n.Bq)(o,[(0,Et.Nf)(),(0,Et.D9)(),(0,Et.wD)(i+1),(0,Et.vC)(-1)]),e[i](t,o,i)}a.end()}}}class Mt extends Rt{constructor(t){super(null,t)}adjust(){const{columnHeadersCount:t,rowHeadersCount:e}=this.table;let o=this.rootNode.firstChild;if(t){const{columnsToRender:n}=this.table,i=n+e;for(let e=0,n=t;e<n;e++){for(o=this.rootNode.childNodes[e],o||(o=this.table.rootDocument.createElement("tr"),this.rootNode.appendChild(o)),this.renderedNodes=o.childNodes.length;this.renderedNodes<i;)o.appendChild(this.table.rootDocument.createElement("th")),this.renderedNodes+=1;for(;this.renderedNodes>i;)o.removeChild(o.lastChild),this.renderedNodes-=1}const r=this.rootNode.childNodes.length;if(r>t)for(let e=t;e<r;e++)this.rootNode.removeChild(this.rootNode.lastChild)}else o&&(0,n.Ie)(o)}render(){const{columnHeadersCount:t}=this.table;this.table.isAriaEnabled()&&(0,n.Bq)(this.rootNode,[(0,Et.t0)()]);for(let e=0;e<t;e+=1){const{columnHeaderFunctions:t,columnsToRender:o,rowHeadersCount:i}=this.table,r=this.rootNode.childNodes[e];this.table.isAriaEnabled()&&(0,n.Bq)(r,[(0,Et.Sb)(),(0,Et.Qg)(e+1)]);for(let s=-1*i;s<o;s+=1){const o=this.table.renderedColumnToSource(s),l=r.childNodes[s+i];l.className="",l.removeAttribute("style"),(0,n.De)(l,[new RegExp("aria-(.*)"),new RegExp("role")]),this.table.isAriaEnabled()&&(0,n.Bq)(l,[(0,Et.wD)(s+1+this.table.rowHeadersCount),(0,Et.vC)(-1),(0,Et.Jg)(),...s>=0?[(0,Et.L2)()]:[(0,Et.Sb)()]]),t[e](o,l,e)}}}}var It=o(5975);let Ht=!1;class Ot extends Rt{constructor(t){super(null,t)}adjust(){const{columnsToRender:t,rowHeadersCount:e}=this.table,o=t+e;for(;this.renderedNodes<o;)this.rootNode.appendChild(this.table.rootDocument.createElement("col")),this.renderedNodes+=1;for(;this.renderedNodes>o;)this.rootNode.removeChild(this.rootNode.lastChild),this.renderedNodes-=1}render(){this.adjust();const{columnsToRender:t,rowHeadersCount:e}=this.table;!Ht&&t>1e3&&(Ht=!0,(0,y.R8)(It.O`Performance tip: Handsontable rendered more than 1000 visible columns.\x20
- Consider limiting the number of rendered columns by specifying the table width and/or\x20
- turning off the "renderAllColumns" option.`));for(let t=0;t<e;t++){const e=this.table.renderedColumnToSource(t),o=this.table.columnUtils.getHeaderWidth(e);this.rootNode.childNodes[t].style.width=`${o}px`}for(let o=0;o<t;o++){const t=this.table.renderedColumnToSource(o),n=this.table.columnUtils.getWidth(t);this.rootNode.childNodes[o+e].style.width=`${n}px`}const o=this.rootNode.firstChild;o&&(0,n.iQ)(o,"rowHeader")}}const At="ht__row_even",kt="ht__row_odd";let _t=!1;class Nt extends Rt{constructor(t){var e,o,n;super("TR",t),e=this,n=void 0,(o=function(t){var e=function(t){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var o=e.call(t,"string");if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:e+""}(o="orderView"))in e?Object.defineProperty(e,o,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[o]=n,this.orderView=new bt(t,(t=>this.nodesPool.obtain(t)))}getRenderedNode(t){return this.orderView.getNode(t)}hasStaleContent(t){return this.orderView.hasStaleContent(t)}render(){const{rowsToRender:t}=this.table;!_t&&t>1e3&&(_t=!0,(0,y.R8)(It.O`Performance tip: Handsontable rendered more than 1000 visible rows.\x20
- Consider limiting the number of rendered rows by specifying the table height and/or\x20
- turning off the "renderAllRows" option.`)),this.table.isAriaEnabled()&&(0,n.Bq)(this.rootNode,[(0,Et.t0)()]),this.orderView.setSize(t).setOffset(this.table.renderedRowToSource(0)).start();for(let i=0;i<t;i++){this.orderView.render();const t=this.orderView.getCurrentNode(),r=this.table.renderedRowToSource(i);var e,o;this.table.isAriaEnabled()&&(0,n.Bq)(t,[(0,Et.Sb)(),(0,Et.Qg)(r+(null!==(e=null===(o=this.table.rowUtils)||void 0===o||null===(o=o.dataAccessObject)||void 0===o?void 0:o.columnHeaders.length)&&void 0!==e?e:0)+1)]),(r+1)%2==0?(0,n.nB)(t,At)||((0,n.vy)(t,kt),(0,n.iQ)(t,At)):(0,n.nB)(t,kt)||((0,n.vy)(t,At),(0,n.iQ)(t,kt))}this.orderView.end()}}function Pt(t,e,o){return(e=function(t){var e=function(t){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var o=e.call(t,"string");if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[e]=o,t}class Lt extends Rt{constructor(){super("TD"),Pt(this,"orderViews",new WeakMap),Pt(this,"sourceRowIndex",0)}obtainOrderView(t){let e;return this.orderViews.has(t)?e=this.orderViews.get(t):(e=new vt(t,(t=>this.nodesPool.obtain(this.sourceRowIndex,t)),this.nodeType),this.orderViews.set(t,e)),e}render(){const{rowsToRender:t,columnsToRender:e,rows:o,rowHeaders:i}=this.table;for(let l=0;l<t;l++){const t=this.table.renderedRowToSource(l),a=o.getRenderedNode(l);this.sourceRowIndex=t;const h=this.obtainOrderView(a),c=i.obtainOrderView(a);h.prependView(c).setSize(e).setOffset(0).start();for(let o=0;o<e;o++){h.render();const e=this.table.renderedColumnToSource(o),i=h.getCurrentNode();var r,s;(0,n.nB)(i,"hide")||(i.className=""),i.removeAttribute("style"),i.removeAttribute("dir"),(0,n.De)(i,[new RegExp("aria-(.*)"),new RegExp("role")]),this.table.cellRenderer(t,e,i),this.table.isAriaEnabled()&&(0,n.Bq)(i,[...i.hasAttribute("role")?[]:[(0,Et.g)()],(0,Et.vC)(-1),(0,Et.wD)(e+(null!==(r=null===(s=this.table.rowUtils)||void 0===s||null===(s=s.dataAccessObject)||void 0===s?void 0:s.rowHeaders.length)&&void 0!==r?r:0)+1)])}h.end()}}}function Dt(t,e,o){return(e=function(t){var e=function(t){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var o=e.call(t,"string");if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[e]=o,t}class Vt{constructor(t){let{cellRenderer:e,stylesHandler:o}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Dt(this,"rootNode",void 0),Dt(this,"rootDocument",void 0),Dt(this,"rowHeaders",null),Dt(this,"columnHeaders",null),Dt(this,"colGroup",null),Dt(this,"rows",null),Dt(this,"cells",null),Dt(this,"rowFilter",null),Dt(this,"columnFilter",null),Dt(this,"rowUtils",null),Dt(this,"columnUtils",null),Dt(this,"rowsToRender",0),Dt(this,"columnsToRender",0),Dt(this,"rowHeaderFunctions",[]),Dt(this,"rowHeadersCount",0),Dt(this,"columnHeaderFunctions",[]),Dt(this,"columnHeadersCount",0),Dt(this,"cellRenderer",void 0),Dt(this,"activeOverlayName",void 0),Dt(this,"stylesHandler",void 0),this.rootNode=t,this.rootDocument=this.rootNode.ownerDocument,this.cellRenderer=e,this.stylesHandler=o}setActiveOverlayName(t){this.activeOverlayName=t}setAxisUtils(t,e){this.rowUtils=t,this.columnUtils=e}setViewportSize(t,e){this.rowsToRender=t,this.columnsToRender=e}setFilters(t,e){this.rowFilter=t,this.columnFilter=e}setHeaderContentRenderers(t,e){this.rowHeaderFunctions=t,this.rowHeadersCount=t.length,this.columnHeaderFunctions=e,this.columnHeadersCount=e.length}setRenderers(){let{rowHeaders:t,columnHeaders:e,colGroup:o,rows:n,cells:i}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};t.setTable(this),e.setTable(this),o.setTable(this),n.setTable(this),i.setTable(this),this.rowHeaders=t,this.columnHeaders=e,this.colGroup=o,this.rows=n,this.cells=i}renderedRowToSource(t){return this.rowFilter.renderedToSource(t)}renderedColumnToSource(t){return this.columnFilter.renderedToSource(t)}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:t,rows:e}=this;for(let o=0;o<t;o++){const t=e.getRenderedNode(o),n=this.rowUtils;if(t.firstChild){const e=this.renderedRowToSource(o),i=n.getHeightByOverlayName(e,this.activeOverlayName),r=this.stylesHandler.areCellsBorderBox()?0:1;t.firstChild.style.height=i?i-r+"px":""}}}}class Ft{constructor(){let{TABLE:t,THEAD:e,COLGROUP:o,TBODY:n,rowUtils:i,columnUtils:r,cellRenderer:s,stylesHandler:l}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.renderer=new Vt(t,{cellRenderer:s,stylesHandler:l}),this.renderer.setRenderers({rowHeaders:new xt,columnHeaders:new Mt(e),colGroup:new Ot(o),rows:new Nt(n),cells:new Lt}),this.renderer.setAxisUtils(i,r)}setActiveOverlayName(t){return this.renderer.setActiveOverlayName(t),this}setFilters(t,e){return this.renderer.setFilters(t,e),this}setViewportSize(t,e){return this.renderer.setViewportSize(t,e),this}setHeaderContentRenderers(t,e){return this.renderer.setHeaderContentRenderers(t,e),this}adjust(){this.renderer.adjust()}render(){this.renderer.render()}}function Bt(t,e,o){return(e=function(t){var e=function(t){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var o=e.call(t,"string");if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[e]=o,t}class Wt{constructor(t,e){Bt(this,"dataAccessObject",void 0),Bt(this,"wtSettings",void 0),Bt(this,"headerWidths",new Map),this.dataAccessObject=t,this.wtSettings=e}getWidth(t){return this.wtSettings.getSetting("columnWidth",t)||this.wtSettings.getSetting("defaultColumnWidth")}getHeaderHeight(t){let e=this.dataAccessObject.stylesHandler.getDefaultRowHeight();const o=this.dataAccessObject.wtViewport.oversizedColumnHeaders[t];return void 0!==o&&(e=e?Math.max(e,o):o),e}getHeaderWidth(t){return this.headerWidths.get(this.dataAccessObject.wtTable.columnFilter.sourceToRendered(t))}calculateWidths(){const{wtSettings:t}=this;let e=t.getSetting("rowHeaderWidth");if(e=t.getSetting("onModifyRowHeaderWidth",e),null!=e){const o=t.getSetting("rowHeaders").length,n=t.getSetting("defaultColumnWidth");for(let t=0;t<o;t++){let o=Array.isArray(e)?e[t]:e;o=null==o?n:o,this.headerWidths.set(t,o)}}}}function zt(t,e,o){return(e=function(t){var e=function(t){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var o=e.call(t,"string");if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[e]=o,t}class jt{constructor(t,e){zt(this,"dataAccessObject",void 0),zt(this,"wtSettings",void 0),this.dataAccessObject=t,this.wtSettings=e}getHeight(t){let e=this.wtSettings.getSetting("rowHeight",t);const o=this.dataAccessObject.wtViewport.oversizedRows[t];return void 0!==o&&(e=void 0===e?o:Math.max(e,o)),e}getHeightByOverlayName(t,e){let o=this.wtSettings.getSetting("rowHeightByOverlayName",t,e);const n=this.dataAccessObject.wtViewport.oversizedRows[t];return void 0!==n&&(o=void 0===o?n:Math.max(o,n)),o}}const Ut="top",$t="bottom",Gt="inline_start",Yt="top_inline_start_corner",Xt="bottom_inline_start_corner",qt=[Ut,$t,Gt,Yt,Xt],Kt=new Map([[Ut,`ht_clone_${Ut}`],[$t,`ht_clone_${$t}`],[Gt,`ht_clone_${Gt} ht_clone_left`],[Yt,`ht_clone_${Yt} ht_clone_top_left_corner`],[Xt,`ht_clone_${Xt} ht_clone_bottom_left_corner`]]);function Qt(t,e,o){return(e=function(t){var e=function(t){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var o=e.call(t,"string");if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[e]=o,t}const Jt=class{constructor(t,e,o,i,r){Qt(this,"wtSettings",null),Qt(this,"domBindings",void 0),Qt(this,"TBODY",null),Qt(this,"THEAD",null),Qt(this,"COLGROUP",null),Qt(this,"hasTableHeight",!0),Qt(this,"hasTableWidth",!0),Qt(this,"isTableVisible",!1),Qt(this,"tableOffset",0),Qt(this,"holderOffset",0),this.domBindings=o,this.isMaster="master"===r,this.name=r,this.dataAccessObject=t,this.facadeGetter=e,this.wtSettings=i,this.instance=this.dataAccessObject.wot,this.wot=this.dataAccessObject.wot,this.TABLE=o.rootTable,(0,n.vg)(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 s=this.wtSettings.getSettingPure("rowHeaderWidth");this.wtSettings.update("rowHeaderWidth",(()=>this._modifyRowHeaderWidth(s))),this.rowUtils=new jt(this.dataAccessObject,this.wtSettings),this.columnUtils=new Wt(this.dataAccessObject,this.wtSettings),this.tableRenderer=new Ft({TABLE:this.TABLE,THEAD:this.THEAD,COLGROUP:this.COLGROUP,TBODY:this.TBODY,rowUtils:this.rowUtils,columnUtils:this.columnUtils,cellRenderer:this.wtSettings.getSettingPure("cellRenderer"),stylesHandler:this.dataAccessObject.stylesHandler})}is(t){return this.name===t}fixTableDomTree(){const t=this.domBindings.rootDocument;this.TBODY=this.TABLE.querySelector("tbody"),this.TBODY||(this.TBODY=t.createElement("tbody"),this.TABLE.appendChild(this.TBODY)),this.THEAD=this.TABLE.querySelector("thead"),this.THEAD||(this.THEAD=t.createElement("thead"),this.TABLE.insertBefore(this.THEAD,this.TBODY)),this.COLGROUP=this.TABLE.querySelector("colgroup"),this.COLGROUP||(this.COLGROUP=t.createElement("colgroup"),this.TABLE.insertBefore(this.COLGROUP,this.THEAD))}createSpreader(t){const e=t.parentNode;let o;return e&&e.nodeType===Node.ELEMENT_NODE&&(0,n.nB)(e,"wtHolder")||(o=this.domBindings.rootDocument.createElement("div"),o.className="wtSpreader",e&&e.insertBefore(o,t),o.appendChild(t)),o.style.position="relative",this.wtSettings.getSetting("ariaTags")&&(0,n.Bq)(o,[(0,Et.gg)()]),o}createHider(t){const e=t.parentNode;let o;return e&&e.nodeType===Node.ELEMENT_NODE&&(0,n.nB)(e,"wtHolder")||(o=this.domBindings.rootDocument.createElement("div"),o.className="wtHider",e&&e.insertBefore(o,t),o.appendChild(t)),this.wtSettings.getSetting("ariaTags")&&(0,n.Bq)(o,[(0,Et.gg)()]),o}createHolder(t){const e=t.parentNode;let o;return e&&e.nodeType===Node.ELEMENT_NODE&&(0,n.nB)(e,"wtHolder")||(o=this.domBindings.rootDocument.createElement("div"),o.style.position="relative",o.className="wtHolder",(0,n.Bq)(o,[(0,Et.vC)(-1)]),e&&e.insertBefore(o,t),this.isMaster&&(o.parentNode.className+="ht_master handsontable",o.parentNode.setAttribute("dir",this.wtSettings.getSettingPure("rtlMode")?"rtl":"ltr"),this.wtSettings.getSetting("ariaTags")&&(0,n.Bq)(o.parentNode,[(0,Et.gg)()])),o.appendChild(t)),this.wtSettings.getSetting("ariaTags")&&(0,n.Bq)(o,[(0,Et.gg)()]),o}draw(){let t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];const{wtSettings:e}=this,{wtOverlays:o,wtViewport:i}=this.dataAccessObject,r=e.getSetting("totalRows"),s=e.getSetting("totalColumns"),l=e.getSetting("rowHeaders"),a=l.length,h=e.getSetting("columnHeaders"),c=h.length;let d=t;if(this.isMaster&&(o.beforeDraw(),this.holderOffset=(0,n.cY)(this.holder),d=i.createCalculators(d),a&&!e.getSetting("fixedColumnsStart"))){const t=o.inlineStartOverlay.getScrollPosition(),e=this.correctHeaderWidth;this.correctHeaderWidth=0!==t,e!==this.correctHeaderWidth&&(d=!1)}if(d)this.isMaster&&o.refresh(!0);else{this.isMaster?this.tableOffset=(0,n.cY)(this.TABLE):this.tableOffset=this.dataAccessObject.parentTableOffset;const t=Math.max(this.getFirstRenderedRow(),0),e=Math.max(this.getFirstRenderedColumn(),0);this.rowFilter=new ct(t,r,c),this.columnFilter=new at(e,s,a);let d=!0;if(this.isMaster){this.alignOverlaysWithTrimmingContainer();const t={};this.wtSettings.getSetting("beforeDraw",!0,t),d=!0!==t.skipRender}d&&(this.tableRenderer.setHeaderContentRenderers(l,h),(this.is($t)||this.is(Xt))&&this.tableRenderer.setHeaderContentRenderers(l,[]),this.resetOversizedRows(),this.tableRenderer.setActiveOverlayName(this.name).setViewportSize(this.getRenderedRowsCount(),this.getRenderedColumnsCount()).setFilters(this.rowFilter,this.columnFilter).render(),this.isMaster&&this.markOversizedColumnHeaders(),this.adjustColumnHeaderHeights(),(this.isMaster||this.is($t))&&this.markOversizedRows(),this.isMaster?(this.wtSettings.getSetting("externalRowCalculator")||i.createVisibleCalculators(),o.refresh(!1),o.applyToDOM(),this.wtSettings.getSetting("onDraw",!0)):this.is($t)&&this.dataAccessObject.cloneSource.wtOverlays.adjustElementsSize())}let u=!1;return this.isMaster&&(u=o.topOverlay.resetFixedPosition(),o.bottomOverlay.clone&&(u=o.bottomOverlay.resetFixedPosition()||u),u=o.inlineStartOverlay.resetFixedPosition()||u,o.topInlineStartCornerOverlay&&o.topInlineStartCornerOverlay.resetFixedPosition(),o.bottomInlineStartCornerOverlay&&o.bottomInlineStartCornerOverlay.clone&&o.bottomInlineStartCornerOverlay.resetFixedPosition()),u?(o.refreshAll(),o.adjustElementsSize()):this.dataAccessObject.selectionManager.setActiveOverlay(this.facadeGetter()).render(d),this.isMaster&&o.afterDraw(),this.dataAccessObject.drawn=!0,this}markIfOversizedColumnHeader(t){const e=this.columnFilter.renderedToSource(t);let o=this.wtSettings.getSetting("columnHeaders").length;const i=this.dataAccessObject.stylesHandler.getDefaultRowHeight();let r,s,l;const a=this.wtSettings.getSetting("columnHeaderHeight")||[];for(;o;)o-=1,r=this.getColumnHeaderHeight(o),s=this.getColumnHeader(e,o),s&&(l=(0,n.eU)(s),(!r&&i<l||r<l)&&(this.dataAccessObject.wtViewport.oversizedColumnHeaders[o]=l),Array.isArray(a)?null!==a[o]&&void 0!==a[o]&&(this.dataAccessObject.wtViewport.oversizedColumnHeaders[o]=a[o]):isNaN(a)||(this.dataAccessObject.wtViewport.oversizedColumnHeaders[o]=a),this.dataAccessObject.wtViewport.oversizedColumnHeaders[o]<(a[o]||a)&&(this.dataAccessObject.wtViewport.oversizedColumnHeaders[o]=a[o]||a))}adjustColumnHeaderHeights(){const{wtSettings:t}=this,e=this.THEAD.childNodes,o=this.dataAccessObject.wtViewport.oversizedColumnHeaders;for(let n=0,i=t.getSetting("columnHeaders").length;n<i;n++)if(o[n]){if(!e[n]||0===e[n].childNodes.length)return;e[n].childNodes[0].style.height=`${o[n]}px`}}resetOversizedRows(){const{wtSettings:t}=this,{wtViewport:e}=this.dataAccessObject;if((this.isMaster||this.is($t))&&!t.getSetting("externalRowCalculator")){const t=this.getRenderedRowsCount();for(let o=0;o<t;o++){const t=this.rowFilter.renderedToSource(o);e.oversizedRows&&e.oversizedRows[t]&&(e.oversizedRows[t]=void 0)}}}getCell(t){let e=t.row,o=t.col;const n=this.wtSettings.getSetting("onModifyGetCellCoords",e,o,!this.isMaster,"render");if(n&&Array.isArray(n)&&([e,o]=n),this.isRowBeforeRenderedRows(e))return-1;if(this.isRowAfterRenderedRows(e))return-2;if(this.isColumnBeforeRenderedColumns(o))return-3;if(this.isColumnAfterRenderedColumns(o))return-4;const i=this.getRow(e);if(!i&&e>=0)throw new Error("TR was expected to be rendered but is not");const r=i.childNodes[this.columnFilter.sourceColumnToVisibleRowHeadedColumn(o)];if(!r&&o>=0)throw new Error("TD or TH was expected to be rendered but is not");return r}getRow(t){let e=null,o=null;var n,i;return t<0?(e=null===(n=this.rowFilter)||void 0===n?void 0:n.sourceRowToVisibleColHeadedRow(t),o=this.THEAD):(e=null===(i=this.rowFilter)||void 0===i?void 0:i.sourceToRendered(t),o=this.TBODY),void 0!==e&&void 0!==o&&!(o.childNodes.length<e+1)&&o.childNodes[e]}getColumnHeader(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;const o=this.THEAD.childNodes[e];return null==o?void 0:o.childNodes[this.columnFilter.sourceColumnToVisibleRowHeadedColumn(t)]}getColumnHeaders(t){const e=[],o=this.columnFilter.sourceColumnToVisibleRowHeadedColumn(t);return this.THEAD.childNodes.forEach((t=>{const n=t.childNodes[o];n&&e.push(n)})),e}getRowHeader(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;if(e>=this.wtSettings.getSetting("rowHeaders").length)return;const o=this.rowFilter.sourceToRendered(t),n=o<0?this.rowFilter.sourceRowToVisibleColHeadedRow(t):o,i=(o<0?this.THEAD:this.TBODY).childNodes[n];return null==i?void 0:i.childNodes[e]}getRowHeaders(t){const e=[],o=this.wtSettings.getSetting("rowHeaders").length;for(let n=0;n<o;n++){const o=this.TBODY.childNodes[this.rowFilter.sourceToRendered(t)],i=null==o?void 0:o.childNodes[n];i&&e.push(i)}return e}getCoords(t){let e=t;if("TD"!==e.nodeName&&"TH"!==e.nodeName&&(e=(0,n.kp)(e,["TD","TH"])),null===e)return null;const o=e.parentNode;if(!o)return null;const i=o.parentNode;let r=(0,n.Pe)(o),s=e.cellIndex;(0,n.yn)(Yt,e,this.wtRootElement)||(0,n.yn)(Ut,e,this.wtRootElement)?"THEAD"===i.nodeName&&(r-=i.childNodes.length):(0,n.yn)(Xt,e,this.wtRootElement)||(0,n.yn)($t,e,this.wtRootElement)?r=this.wtSettings.getSetting("totalRows")-i.childNodes.length+r:i===this.THEAD?r=this.rowFilter.visibleColHeadedRowToSourceRow(r):this.rowFilter&&(r=this.rowFilter.renderedToSource(r)),(0,n.yn)(Yt,e,this.wtRootElement)||(0,n.yn)(Gt,e,this.wtRootElement)||(0,n.yn)(Xt,e,this.wtRootElement)?s=this.columnFilter.offsettedTH(s):this.columnFilter&&(s=this.columnFilter.visibleRowHeadedColumnToSourceColumn(s));const l=this.wtSettings.getSetting("onModifyGetCoordsElement",r,s);return l&&Array.isArray(l)&&([r,s]=l),this.wot.createCellCoords(r,s)}markOversizedRows(){if(this.wtSettings.getSetting("externalRowCalculator"))return;let t=this.TBODY.childNodes.length;const e=t*this.dataAccessObject.stylesHandler.getDefaultRowHeight(),o=(0,n.eU)(this.TBODY)-1,i=this.wot.stylesHandler.areCellsBorderBox(),r=i?n.DK:n.eU,s=i?0:1,l=i?1:0;let a,h,c,d,u;if(e!==o||this.wtSettings.getSetting("fixedRowsBottom"))for(;t;){t-=1,c=this.rowFilter.renderedToSource(t),a=this.getRowHeight(c),d=this.getTrForRow(c),u=d.querySelector("th");const e=0===c?l:0;h=u?r(u):r(d)-s,(!a&&this.dataAccessObject.stylesHandler.getDefaultRowHeight()<h-e||a<h)&&(i||(h+=1),this.dataAccessObject.wtViewport.oversizedRows[c]=h)}}getTrForRow(t){return this.TBODY.childNodes[this.rowFilter.sourceToRendered(t)]}isColumnHeaderRendered(t){if(t>=0)return!1;const e=this.wtSettings.getSetting("rowHeaders").length;return Math.abs(t)<=e}isRowHeaderRendered(t){if(t>=0)return!1;const e=this.wtSettings.getSetting("columnHeaders").length;return Math.abs(t)<=e}isRowBeforeRenderedRows(t){const e=this.getFirstRenderedRow();return t<0&&e<=0?!this.isRowHeaderRendered(t):t<e}isRowAfterRenderedRows(t){return t>this.getLastRenderedRow()}isColumnBeforeRenderedColumns(t){const e=this.getFirstRenderedColumn();return t<0&&e<=0?!this.isColumnHeaderRendered(t):t<e}isColumnAfterRenderedColumns(t){return this.columnFilter&&t>this.getLastRenderedColumn()}isColumnAfterViewport(t){return this.columnFilter&&t>this.getLastVisibleColumn()}isRowAfterViewport(t){return this.rowFilter&&t>this.getLastVisibleRow()}isColumnBeforeViewport(t){return this.columnFilter&&this.columnFilter.sourceToRendered(t)<0&&t>=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(t){return this.rowUtils.getHeight(t)}getColumnHeaderHeight(t){return this.columnUtils.getHeaderHeight(t)}getColumnWidth(t){return this.columnUtils.getWidth(t)}hasDefinedSize(){return this.hasTableHeight&&this.hasTableWidth}getWidth(){return(0,n.Gq)(this.TABLE)}getHeight(){return(0,n.DK)(this.TABLE)}getTotalWidth(){const t=(0,n.Gq)(this.hider);return 0!==t?t:this.getWidth()}getTotalHeight(){const t=(0,n.DK)(this.hider);return 0!==t?t:this.getHeight()}isVisible(){return(0,n.zN)(this.TABLE)}_modifyRowHeaderWidth(t){let e=(0,i.Tn)(t)?t():null;return Array.isArray(e)?(e=[...e],e[e.length-1]=this._correctRowHeaderWidth(e[e.length-1])):e=this._correctRowHeaderWidth(e),e}_correctRowHeaderWidth(t){let e=t;return"number"!=typeof t&&(e=this.wtSettings.getSetting("defaultColumnWidth")),this.correctHeaderWidth&&(e+=1),e}},Zt={getFirstRenderedRow(){return 0===this.getRenderedRowsCount()?-1:0},getFirstVisibleRow(){return this.getFirstRenderedRow()},getFirstPartiallyVisibleRow(){return this.getFirstRenderedRow()},getLastRenderedRow(){return this.getRenderedRowsCount()-1},getLastVisibleRow(){return this.getLastRenderedRow()},getLastPartiallyVisibleRow(){return this.getLastRenderedRow()},getRenderedRowsCount(){return Math.min(this.wtSettings.getSetting("totalRows"),this.wtSettings.getSetting("fixedRowsTop"))},getVisibleRowsCount(){return this.getRenderedRowsCount()},getColumnHeadersCount(){return this.dataAccessObject.columnHeaders.length}};(0,v.LH)(Zt,"MIXIN_NAME","stickyRowsTop",{writable:!1,enumerable:!1});const te=Zt,ee={getFirstRenderedColumn(){const t=this.dataAccessObject.startColumnRendered;return null===t?-1:t},getFirstVisibleColumn(){const t=this.dataAccessObject.startColumnVisible;return null===t?-1:t},getFirstPartiallyVisibleColumn(){const t=this.dataAccessObject.startColumnPartiallyVisible;return null===t?-1:t},getLastRenderedColumn(){const t=this.dataAccessObject.endColumnRendered;return null===t?-1:t},getLastVisibleColumn(){const t=this.dataAccessObject.endColumnVisible;return null===t?-1:t},getLastPartiallyVisibleColumn(){const t=this.dataAccessObject.endColumnPartiallyVisible;return null===t?-1:t},getRenderedColumnsCount(){return this.dataAccessObject.countColumnsRendered},getVisibleColumnsCount(){return this.dataAccessObject.countColumnsVisible},getRowHeadersCount(){return this.dataAccessObject.rowHeaders.length}};(0,v.LH)(ee,"MIXIN_NAME","calculatedColumns",{writable:!1,enumerable:!1});const oe=ee;class ne extends Jt{constructor(t,e,o,n){super(t,e,o,n,Ut)}}(0,v.co)(ne,te),(0,v.co)(ne,oe);const ie=ne;function re(t,e,o){if("function"==typeof t?t===e:t.has(e))return arguments.length<3?e:o;throw new TypeError("Private element is not present on this object")}var se=new WeakSet;function le(t){const{wtSettings:e,inlineStartOverlay:o,wtTable:i,wtViewport:r,totalColumns:s,rootWindow:l}=this.dataAccessObject;if(o.mainTableScrollableElement===l){let a=null;if(e.getSetting("rtlMode")){const t=i.TABLE.getBoundingClientRect(),e=this.dataAccessObject.rootWindow.document.documentElement.offsetWidth;a=Math.abs(t.right-e)}else a=(0,n.cY)(i.wtRootElement).left;const h=Math.abs((0,n.v_)(l,l));if(a>h){const e=(0,n.xM)(l);let i=r.getRowHeaderWidth();for(let n=1;n<=s;n++)if(i+=o.sumCellSizes(n-1,n),a+i-h>=e){t=n-2;break}}}return t}function ae(t){const{topOverlay:e,wtTable:o,wtViewport:i,totalRows:r,rootWindow:s}=this.dataAccessObject;if(e.mainTableScrollableElement===s){const l=(0,n.cY)(o.wtRootElement),a=(0,n.hY)(s,s);if(l.top>a){const o=(0,n.eU)(s);let h=i.getColumnHeaderHeight();for(let n=1;n<=r;n++)if(h+=e.sumCellSizes(n-1,n),l.top+h-a>=o){t=n-2;break}}}return t}const he=class{constructor(t){var e,o;(function(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")})(e=this,o=se),o.add(e),function(t,e,o){(e=function(t){var e=function(t){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var o=e.call(t,"string");if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[e]=o}(this,"dataAccessObject",void 0),this.dataAccessObject=t}scrollViewport(t,e,o){if(t.col<0||t.row<0)return!1;const n=this.scrollViewportHorizontally(t.col,e),i=this.scrollViewportVertically(t.row,o);return n||i}scrollViewportHorizontally(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"auto";const{drawn:o,totalColumns:n}=this.dataAccessObject;if(!o)return!1;const i=(0,v.nA)(e);if(t=this.dataAccessObject.wtSettings.getSetting("onBeforeViewportScrollHorizontally",t,i),!Number.isInteger(t)||t<0||t>n)return!1;e=i.value;const{fixedColumnsStart:r,inlineStartOverlay:s}=this.dataAccessObject,l="auto"===e;if(l&&t<r)return!1;const a=this.getFirstVisibleColumn(),h=this.getLastVisibleColumn();let c=!1;return(l&&(t<a||t>h)||!l)&&(c=s.scrollTo(t,l?t>=this.getLastPartiallyVisibleColumn():"end"===e)),c}scrollViewportVertically(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"auto";const{drawn:o,totalRows:n}=this.dataAccessObject;if(!o)return!1;const i=(0,v.nA)(e);if(t=this.dataAccessObject.wtSettings.getSetting("onBeforeViewportScrollVertically",t,i),!Number.isInteger(t)||t<0||t>n)return!1;e=i.value;const{fixedRowsBottom:r,fixedRowsTop:s,topOverlay:l}=this.dataAccessObject,a="auto"===e;if(a&&(t<s||t>n-r-1))return!1;const h=this.getFirstVisibleRow(),c=this.getLastVisibleRow();let d=!1;return(a&&(t<h||t>c)||!a)&&(d=l.scrollTo(t,a?t>=this.getLastPartiallyVisibleRow():"bottom"===e)),d}getFirstVisibleRow(){return this.dataAccessObject.wtTable.getFirstVisibleRow()}getLastVisibleRow(){return re(se,this,ae).call(this,this.dataAccessObject.wtTable.getLastVisibleRow())}getFirstPartiallyVisibleRow(){return this.dataAccessObject.wtTable.getFirstPartiallyVisibleRow()}getLastPartiallyVisibleRow(){return re(se,this,ae).call(this,this.dataAccessObject.wtTable.getLastPartiallyVisibleRow())}getFirstVisibleColumn(){return this.dataAccessObject.wtTable.getFirstVisibleColumn()}getLastVisibleColumn(){return re(se,this,le).call(this,this.dataAccessObject.wtTable.getLastVisibleColumn())}getFirstPartiallyVisibleColumn(){return this.dataAccessObject.wtTable.getFirstPartiallyVisibleColumn()}getLastPartiallyVisibleColumn(){return re(se,this,le).call(this,this.dataAccessObject.wtTable.getLastPartiallyVisibleColumn())}};var ce=o(3709),de=o(4814);function ue(t,e,o){return(e=function(t){var e=function(t){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var o=e.call(t,"string");if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[e]=o,t}class ge{get eventManager(){return new c.A(this)}constructor(t,e){ue(this,"wtTable",void 0),ue(this,"wtScroll",void 0),ue(this,"wtViewport",void 0),ue(this,"wtOverlays",void 0),ue(this,"selectionManager",void 0),ue(this,"wtEvent",void 0),ue(this,"guid",`wt_${(0,j.DU)()}`),ue(this,"drawInterrupted",!1),ue(this,"drawn",!1),ue(this,"activeOverlayName","master"),ue(this,"domBindings",void 0),ue(this,"wtSettings",void 0),this.domBindings={rootTable:t,rootDocument:t.ownerDocument,rootWindow:t.ownerDocument.defaultView},this.wtSettings=e,this.wtScroll=new he(this.createScrollDao())}findOriginalHeaders(){const t=[];if(this.wtTable.THEAD.childNodes.length&&this.wtTable.THEAD.childNodes[0].childNodes.length){for(let e=0,o=this.wtTable.THEAD.childNodes[0].childNodes.length;e<o;e++)t.push(this.wtTable.THEAD.childNodes[0].childNodes[e].innerHTML);this.wtSettings.getSetting("columnHeaders").length||this.wtSettings.update("columnHeaders",[function(e,o){(0,n.c6)(o,t[e])}])}}createCellCoords(t,e){return new ce.A(t,e,this.wtSettings.getSetting("rtlMode"))}createCellRange(t,e,o){return new de.A(t,e,o,this.wtSettings.getSetting("rtlMode"))}draw(){let t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return this.drawInterrupted=!1,!this.wtTable.isVisible()||(0,n.Sx)(this.wtTable.wtRootElement.parentNode)?this.drawInterrupted=!0:this.wtTable.draw(t),this}getCell(t){if(!(arguments.length>1&&void 0!==arguments[1]&&arguments[1]))return this.wtTable.getCell(t);const e=this.wtSettings.getSetting("totalRows"),o=this.wtSettings.getSetting("fixedRowsTop"),n=this.wtSettings.getSetting("fixedRowsBottom"),i=this.wtSettings.getSetting("fixedColumnsStart");if(t.row<o&&t.col<i)return this.wtOverlays.topInlineStartCornerOverlay.clone.wtTable.getCell(t);if(t.row<o)return this.wtOverlays.topOverlay.clone.wtTable.getCell(t);if(t.col<i&&t.row>=e-n){if(this.wtOverlays.bottomInlineStartCornerOverlay&&this.wtOverlays.bottomInlineStartCornerOverlay.clone)return this.wtOverlays.bottomInlineStartCornerOverlay.clone.wtTable.getCell(t)}else{if(t.col<i)return this.wtOverlays.inlineStartOverlay.clone.wtTable.getCell(t);if(t.row<e&&t.row>=e-n&&this.wtOverlays.bottomOverlay&&this.wtOverlays.bottomOverlay.clone)return this.wtOverlays.bottomOverlay.clone.wtTable.getCell(t)}return this.wtTable.getCell(t)}scrollViewport(t,e,o){return this.wtScroll.scrollViewport(t,e,o)}scrollViewportHorizontally(t,e){return this.wtScroll.scrollViewportHorizontally(t,e)}scrollViewportVertically(t,e){return this.wtScroll.scrollViewportVertically(t,e)}getViewport(){return[this.wtTable.getFirstVisibleRow(),this.wtTable.getFirstVisibleColumn(),this.wtTable.getLastVisibleRow(),this.wtTable.getLastVisibleColumn()]}destroy(){this.wtOverlays.destroy(),this.wtEvent.destroy()}createScrollDao(){const t=this;return{get drawn(){return t.drawn},get topOverlay(){return t.wtOverlays.topOverlay},get inlineStartOverlay(){return t.wtOverlays.inlineStartOverlay},get wtTable(){return t.wtTable},get wtViewport(){return t.wtViewport},get wtSettings(){return t.wtSettings},get rootWindow(){return t.domBindings.rootWindow},get totalRows(){return t.wtSettings.getSetting("totalRows")},get totalColumns(){return t.wtSettings.getSetting("totalColumns")},get fixedRowsTop(){return t.wtSettings.getSetting("fixedRowsTop")},get fixedRowsBottom(){return t.wtSettings.getSetting("fixedRowsBottom")},get fixedColumnsStart(){return t.wtSettings.getSetting("fixedColumnsStart")}}}getTableDao(){const t=this;return{get wot(){return t},get parentTableOffset(){return t.cloneSource.wtTable.tableOffset},get cloneSource(){return t.cloneSource},get workspaceWidth(){return t.wtViewport.getWorkspaceWidth()},get wtViewport(){return t.wtViewport},get wtOverlays(){return t.wtOverlays},get selectionManager(){return t.selectionManager},get stylesHandler(){return t.stylesHandler},get drawn(){return t.drawn},set drawn(e){t.drawn=e},get wtTable(){return t.wtTable},get startColumnRendered(){return t.wtViewport.columnsRenderCalculator.startColumn},get startColumnVisible(){return t.wtViewport.columnsVisibleCalculator.startColumn},get startColumnPartiallyVisible(){return t.wtViewport.columnsPartiallyVisibleCalculator.startColumn},get endColumnRendered(){return t.wtViewport.columnsRenderCalculator.endColumn},get endColumnVisible(){return t.wtViewport.columnsVisibleCalculator.endColumn},get endColumnPartiallyVisible(){return t.wtViewport.columnsPartiallyVisibleCalculator.endColumn},get countColumnsRendered(){return t.wtViewport.columnsRenderCalculator.count},get countColumnsVisible(){return t.wtViewport.columnsVisibleCalculator.count},get startRowRendered(){return t.wtViewport.rowsRenderCalculator.startRow},get startRowVisible(){return t.wtViewport.rowsVisibleCalculator.startRow},get startRowPartiallyVisible(){return t.wtViewport.rowsPartiallyVisibleCalculator.startRow},get endRowRendered(){return t.wtViewport.rowsRenderCalculator.endRow},get endRowVisible(){return t.wtViewport.rowsVisibleCalculator.endRow},get endRowPartiallyVisible(){return t.wtViewport.rowsPartiallyVisibleCalculator.endRow},get countRowsRendered(){return t.wtViewport.rowsRenderCalculator.count},get countRowsVisible(){return t.wtViewport.rowsVisibleCalculator.count},get columnHeaders(){return t.wtSettings.getSetting("columnHeaders")},get rowHeaders(){return t.wtSettings.getSetting("rowHeaders")}}}}function fe(t,e,o){return(e=function(t){var e=function(t){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var o=e.call(t,"string");if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[e]=o,t}class pe extends ge{constructor(t,e,o){super(t,e),fe(this,"cloneSource",void 0),fe(this,"cloneOverlay",void 0);const n=this.wtSettings.getSetting("facade",this);this.cloneSource=o.source,this.cloneOverlay=o.overlay,this.stylesHandler=o.stylesHandler,this.wtTable=this.cloneOverlay.createTable(this.getTableDao(),n,this.domBindings,this.wtSettings),this.wtViewport=o.viewport,this.selectionManager=o.selectionManager,this.wtEvent=new st(n,this.domBindings,this.wtSettings,this.eventManager,this.wtTable,this.selectionManager,o.event),this.findOriginalHeaders()}}class me{constructor(t,e,o,i,r){var s,l,a;s=this,a=null,(l=function(t){var e=function(t){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var o=e.call(t,"string");if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:e+""}(l="wtSettings"))in s?Object.defineProperty(s,l,{value:a,enumerable:!0,configurable:!0,writable:!0}):s[l]=a,(0,v.LH)(this,"wot",t,{writable:!1}),this.domBindings=r,this.facadeGetter=e,this.wtSettings=i;const{TABLE:h,hider:c,spreader:d,holder:u,wtRootElement:g}=this.wot.wtTable;this.instance=this.wot,this.type=o,this.mainTableScrollableElement=null,this.TABLE=h,this.hider=c,this.spreader=d,this.holder=u,this.wtRootElement=g,this.trimmingContainer=(0,n.fX)(this.hider.parentNode.parentNode),this.needFullRender=this.shouldBeRendered(),this.clone=this.makeClone()}hasRenderingStateChanged(){return this.needFullRender!==this.shouldBeRendered()}updateStateOfRendering(t){"before"===t&&this.shouldBeRendered()?this.needFullRender=!0:"after"!==t||this.shouldBeRendered()||(this.needFullRender=!1)}shouldBeRendered(){return!0}updateTrimmingContainer(){this.trimmingContainer=(0,n.fX)(this.hider.parentNode.parentNode)}updateMainScrollableElement(){const{wtTable:t}=this.wot,{rootWindow:e}=this.domBindings;"hidden"===e.getComputedStyle(t.wtRootElement.parentNode).getPropertyValue("overflow")?this.mainTableScrollableElement=this.wot.wtTable.holder:this.mainTableScrollableElement=(0,n.K7)(t.TABLE)}getRelativeCellPosition(t,e,o){if(!1===this.clone.wtTable.holder.contains(t))return void(0,y.R8)(`The provided element is not a child of the ${this.type} overlay`);const n=this.mainTableScrollableElement===this.domBindings.rootWindow,i=o<this.wtSettings.getSetting("fixedColumnsStart"),r=e<this.wtSettings.getSetting("fixedRowsTop"),s=e>=this.wtSettings.getSetting("totalRows")-this.wtSettings.getSetting("fixedRowsBottom"),l=this.clone.wtTable.spreader,a={start:this.getRelativeStartPosition(l),top:l.offsetTop},h={start:this.getRelativeStartPosition(t),top:t.offsetTop};let c=null;return c=n?this.getRelativeCellPositionWithinWindow(r,i,h,a):this.getRelativeCellPositionWithinHolder(r,s,i,h,a),c}getRelativeStartPosition(t){return this.isRtl()?t.offsetParent.offsetWidth-t.offsetLeft-t.offsetWidth:t.offsetLeft}getRelativeCellPositionWithinWindow(t,e,o,i){const r=this.wot.wtTable.wtRootElement.getBoundingClientRect();let s=0,l=0;if(e){let t=r.left;this.isRtl()&&(t=this.domBindings.rootWindow.innerWidth-(r.left+r.width+(0,n.XJ)())),s=t<=0?-1*t:0}else s=i.start;return l=t?this.clone.wtTable.TABLE.getBoundingClientRect().top-r.top:i.top,{start:o.start+s,top:o.top+l}}getRelativeCellPositionWithinHolder(t,e,o,n,i){const r=this.wot.wtOverlays.inlineStartOverlay.getScrollPosition(),s=this.wot.wtOverlays.topOverlay.getScrollPosition();let l=0,a=0;if(o||(l=r-i.start),e){const t=this.wot.wtTable.wtRootElement.getBoundingClientRect();a=-1*this.clone.wtTable.TABLE.getBoundingClientRect().top+t.top}else t||(a=s-i.top);return{start:n.start-l,top:n.top-a}}makeClone(){if(-1===qt.indexOf(this.type))throw new Error(`Clone type "${this.type}" is not supported.`);const{wtTable:t,wtSettings:e}=this.wot,{rootDocument:o,rootWindow:i}=this.domBindings,r=o.createElement("div"),s=o.createElement("table"),l=t.wtRootElement.parentNode;r.className=`${Kt.get(this.type)} handsontable`,r.setAttribute("dir",this.isRtl()?"rtl":"ltr"),r.style.position="absolute",r.style.top=0,r.style.overflow="visible",this.isRtl()?r.style.right=0:r.style.left=0,e.getSetting("ariaTags")&&(0,n.Bq)(r,[(0,Et.gg)()]),s.className=t.TABLE.className,t.TABLE.getAttribute("role")&&s.setAttribute("role",t.TABLE.getAttribute("role")),r.appendChild(s),l.appendChild(r);const a=this.wtSettings.getSetting("preventOverflow");return!0===a||"horizontal"===a&&this.type===Ut||"vertical"===a&&this.type===Gt?this.mainTableScrollableElement=i:"hidden"===i.getComputedStyle(l).getPropertyValue("overflow")?this.mainTableScrollableElement=t.holder:this.mainTableScrollableElement=(0,n.K7)(t.TABLE),new pe(s,this.wtSettings,{source:this.wot,overlay:this,viewport:this.wot.wtViewport,event:this.wot.wtEvent,selectionManager:this.wot.selectionManager,stylesHandler:this.wot.stylesHandler})}refresh(){let t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(this.needFullRender){const e=this.clone.cloneSource;e.activeOverlayName=this.clone.wtTable.name,this.clone.draw(t),e.activeOverlayName="master"}}reset(){const t=this.clone.wtTable.holder,e=this.clone.wtTable.hider;[t.style,e.style,t.parentNode.style].forEach((t=>{t.width="",t.height=""}))}isRtl(){return this.wtSettings.getSetting("rtlMode")}destroy(){this.clone.eventManager.destroy()}}const we=t=>{const e=t.stylesHandler;if(e.isClassicTheme())return Object.freeze({width:6,height:6,borderWidth:1,borderStyle:"solid",borderColor:"#FFF"});const o=e.getCSSVariableValue("cell-autofill-size"),n=e.getCSSVariableValue("cell-autofill-border-width"),i=e.getCSSVariableValue("cell-autofill-border-color");return Object.freeze({width:o,height:o,borderWidth:n,borderStyle:"solid",borderColor:i})};class be extends me{constructor(t,e,o,n){var i,r,s;super(t,e,Ut,o,n),i=this,s=-1,(r=function(t){var e=function(t){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var o=e.call(t,"string");if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:e+""}(r="cachedFixedRowsTop"))in i?Object.defineProperty(i,r,{value:s,enumerable:!0,configurable:!0,writable:!0}):i[r]=s,this.cachedFixedRowsTop=this.wtSettings.getSetting("fixedRowsTop")}createTable(){for(var t=arguments.length,e=new Array(t),o=0;o<t;o++)e[o]=arguments[o];return new ie(...e)}shouldBeRendered(){return this.wtSettings.getSetting("shouldRenderTopOverlay")}resetFixedPosition(){if(!this.needFullRender||!this.shouldBeRendered()||!this.wot.wtTable.holder.parentNode)return!1;const t=this.clone.wtTable.holder.parentNode,{rootWindow:e}=this.domBindings,o=this.wtSettings.getSetting("preventOverflow");let i=0,r=!1;if(this.trimmingContainer!==e||o&&"vertical"===o)i=this.getScrollPosition(),(0,n.ZK)(t);else{const{wtTable:e}=this.wot,o=e.hider.getBoundingClientRect();r=Math.ceil(o.bottom)===t.offsetHeight,i=this.getOverlayOffset(),(0,n.ON)(t,"0px",`${i}px`)}const s=this.adjustHeaderBordersPosition(i,r);return this.adjustElementsSize(),s}setScrollPosition(t){const{rootWindow:e}=this.domBindings,o=this.mainTableScrollableElement;let i=!1;if(o===e&&t!==e.scrollY){const o=e.scrollY;e.scrollTo((0,n.Vp)(e),t),i=o!==e.scrollY}else if(t!==o.scrollTop){const e=o.scrollTop;o.scrollTop=t,i=e!==o.scrollTop}return i}onScroll(){this.wtSettings.getSetting("onScrollHorizontally")}sumCellSizes(t,e){const o=this.wot.stylesHandler.getDefaultRowHeight();let n=t,i=0;for(;n<e;){const t=this.wot.wtTable.getRowHeight(n);i+=void 0===t?o:t,n+=1}return i}adjustElementsSize(){this.updateTrimmingContainer(),this.needFullRender&&(this.adjustRootElementSize(),this.adjustRootChildrenSize())}adjustRootElementSize(){const{wtTable:t,wtViewport:e}=this.wot,{rootDocument:o,rootWindow:i}=this.domBindings,r=this.clone.wtTable.holder.parentNode.style,s=this.wtSettings.getSetting("preventOverflow");if(this.trimmingContainer!==i||"horizontal"===s){let i=e.getWorkspaceWidth();e.hasVerticalScroll()&&(i-=(0,n.XJ)(o)),i=Math.min(i,t.wtRootElement.scrollWidth),r.width=`${i}px`}else r.width="";this.clone.wtTable.holder.style.width=r.width;let l=(0,n.DK)(this.clone.wtTable.TABLE);t.hasDefinedSize()||(l=0),r.height=`${l}px`}adjustRootChildrenSize(){const{holder:t}=this.clone.wtTable,e=we(this.wot),o=this.wot.selectionManager.getFocusSelection()?parseInt(e.height,10)/2:0;this.clone.wtTable.hider.style.width=this.hider.style.width,t.style.width=t.parentNode.style.width,t.style.height=`${parseInt(t.parentNode.style.height,10)+o}px`}applyToDOM(){const t=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!==t)throw new Error("Incorrect value of the rowsRenderCalculator");this.spreader.style.top="0"}this.spreader.style.bottom="",this.needFullRender&&this.syncOverlayOffset()}syncOverlayOffset(){const t=this.isRtl()?"right":"left",{spreader:e}=this.clone.wtTable;"number"==typeof this.wot.wtViewport.columnsRenderCalculator.startPosition?e.style[t]=`${this.wot.wtViewport.columnsRenderCalculator.startPosition}px`:e.style[t]=""}scrollTo(t,e){const{wot:o,wtSettings:i}=this,r=(o.cloneSource?o.cloneSource:o).wtTable.holder,s=i.getSetting("columnHeaders"),l=0===i.getSetting("fixedRowsTop")&&s.length>0&&!(0,n.nB)(r.parentNode,"innerBorderTop")?1:0;let a=this.getTableParentOffset(),h=0;if(e&&this.wot.wtTable.getRowHeight(t)>this.wot.wtViewport.getViewportHeight()&&(e=!1),e&&r.offsetHeight!==r.clientHeight&&(h=(0,n.XJ)(this.domBindings.rootDocument)),e){const e=i.getSetting("fixedRowsBottom"),n=i.getSetting("totalRows");a+=this.sumCellSizes(0,t+1),a-=o.wtViewport.getViewportHeight()-this.sumCellSizes(n-e,n),a+=1,a+=l}else a+=this.sumCellSizes(i.getSetting("fixedRowsTop"),t);return a+=h,(0,n.p6)(this.mainTableScrollableElement)===a-l&&l>0&&this.wot.wtOverlays.expandHiderVerticallyBy(l),this.setScrollPosition(a)}getTableParentOffset(){return this.mainTableScrollableElement===this.domBindings.rootWindow?this.wot.wtTable.holderOffset.top:0}getScrollPosition(){return(0,n.hY)(this.mainTableScrollableElement,this.domBindings.rootWindow)}getOverlayOffset(){const{rootWindow:t}=this.domBindings,e=this.wtSettings.getSetting("preventOverflow");let o=0;if(this.trimmingContainer===t&&(!e||"vertical"!==e)){const t=this.wot.wtTable.getTotalHeight()-this.clone.wtTable.getTotalHeight();o=Math.max(this.getScrollPosition()-this.getTableParentOffset(),0),o>t&&(o=0)}return o}adjustHeaderBordersPosition(t){let e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const{wtSettings:o}=this,i=this.wot.wtTable.holder.parentNode,r=o.getSetting("totalColumns"),s="horizontal"===o.getSetting("preventOverflow");r?(0,n.vy)(i,"emptyColumns"):(0,n.iQ)(i,"emptyColumns");let l=!1;if(!e&&!s){const e=o.getSetting("fixedRowsTop"),r=this.cachedFixedRowsTop!==e,s=o.getSetting("columnHeaders");if((r||0===e)&&s.length>0){const e=(0,n.nB)(i,"innerBorderTop");this.cachedFixedRowsTop=o.getSetting("fixedRowsTop"),t||0===o.getSetting("totalRows")?((0,n.iQ)(i,"innerBorderTop"),l=!e):((0,n.vy)(i,"innerBorderTop"),l=e)}}return l}}const ve={getFirstRenderedRow(){const t=this.getRenderedRowsCount();return 0===t?-1:this.wtSettings.getSetting("totalRows")-t},getFirstVisibleRow(){return this.getFirstRenderedRow()},getFirstPartiallyVisibleRow(){return this.getFirstRenderedRow()},getLastRenderedRow(){return 0===this.getRenderedRowsCount()?-1:this.wtSettings.getSetting("totalRows")-1},getLastVisibleRow(){return this.getLastRenderedRow()},getLastPartiallyVisibleRow(){return this.getLastRenderedRow()},getRenderedRowsCount(){return Math.min(this.wtSettings.getSetting("totalRows"),this.wtSettings.getSetting("fixedRowsBottom"))},getVisibleRowsCount(){return this.getRenderedRowsCount()},getColumnHeadersCount:()=>0};(0,v.LH)(ve,"MIXIN_NAME","stickyRowsBottom",{writable:!1,enumerable:!1});const ye=ve;class Ce extends Jt{constructor(t,e,o,n){super(t,e,o,n,$t)}}(0,v.co)(Ce,ye),(0,v.co)(Ce,oe);const Se=Ce;class Re extends me{constructor(t,e,o,n){var i,r,s;super(t,e,$t,o,n),i=this,s=-1,(r=function(t){var e=function(t){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var o=e.call(t,"string");if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:e+""}(r="cachedFixedRowsBottom"))in i?Object.defineProperty(i,r,{value:s,enumerable:!0,configurable:!0,writable:!0}):i[r]=s,this.cachedFixedRowsBottom=this.wtSettings.getSetting("fixedRowsBottom")}createTable(){for(var t=arguments.length,e=new Array(t),o=0;o<t;o++)e[o]=arguments[o];return new Se(...e)}shouldBeRendered(){return this.wtSettings.getSetting("shouldRenderBottomOverlay")}resetFixedPosition(){if(!this.needFullRender||!this.shouldBeRendered()||!this.wot.wtTable.holder.parentNode)return!1;const{rootWindow:t}=this.domBindings,e=this.clone.wtTable.holder.parentNode;e.style.top="";let o=0;const n=this.wtSettings.getSetting("preventOverflow");this.trimmingContainer!==t||n&&"vertical"===n?(o=this.getScrollPosition(),this.repositionOverlay()):(o=this.getOverlayOffset(),e.style.bottom=`${o}px`);const i=this.adjustHeaderBordersPosition(o);return this.adjustElementsSize(),i}repositionOverlay(){const{wtTable:t,wtViewport:e}=this.wot,{rootDocument:o}=this.domBindings,i=this.clone.wtTable.holder.parentNode;let r=0;e.hasVerticalScroll()||(r+=e.getWorkspaceHeight()-t.getTotalHeight()),e.hasVerticalScroll()&&e.hasHorizontalScroll()&&(r+=(0,n.XJ)(o)),i.style.bottom=`${r}px`}setScrollPosition(t){const{rootWindow:e}=this.domBindings,o=this.mainTableScrollableElement;let i=!1;if(o===e&&t!==e.scrollY){const t=e.scrollY;e.scrollTo((0,n.Vp)(e),top),i=t!==e.scrollY}else if(t!==o.scrollTop){const e=o.scrollTop;o.scrollTop=t,i=e!==o.scrollTop}return i}onScroll(){this.wtSettings.getSetting("onScrollHorizontally")}sumCellSizes(t,e){const{wtTable:o,stylesHandler:n}=this.wot,i=n.getDefaultRowHeight();let r=t,s=0;for(;r<e;){const t=o.getRowHeight(r);s+=void 0===t?i:t,r+=1}return s}adjustElementsSize(){this.updateTrimmingContainer(),this.needFullRender&&(this.adjustRootElementSize(),this.adjustRootChildrenSize())}adjustRootElementSize(){const{wtTable:t,wtViewport:e}=this.wot,{rootDocument:o,rootWindow:i}=this.domBindings,r=this.clone.wtTable.holder.parentNode.style,s=this.wtSettings.getSetting("preventOverflow");if(this.trimmingContainer!==i||"horizontal"===s){let i=e.getWorkspaceWidth();e.hasVerticalScroll()&&(i-=(0,n.XJ)(o)),i=Math.min(i,t.wtRootElement.scrollWidth),r.width=`${i}px`}else r.width="";this.clone.wtTable.holder.style.width=r.width;let l=(0,n.DK)(this.clone.wtTable.TABLE);t.hasDefinedSize()||(l=0),r.height=`${l}px`}adjustRootChildrenSize(){const{holder:t}=this.clone.wtTable;this.clone.wtTable.hider.style.width=this.hider.style.width,t.style.width=t.parentNode.style.width,t.style.height=t.parentNode.style.height}applyToDOM(){const t=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!==t)throw new Error("Incorrect value of the rowsRenderCalculator");this.spreader.style.top="0"}this.spreader.style.bottom="",this.needFullRender&&this.syncOverlayOffset()}syncOverlayOffset(){const t=this.isRtl()?"right":"left",{spreader:e}=this.clone.wtTable;"number"==typeof this.wot.wtViewport.columnsRenderCalculator.startPosition?e.style[t]=`${this.wot.wtViewport.columnsRenderCalculator.startPosition}px`:e.style[t]=""}scrollTo(t,e){let o=this.getTableParentOffset();const i=(this.wot.cloneSource?this.wot.cloneSource:this.wot).wtTable.holder;let r=0;e&&i.offsetHeight!==i.clientHeight&&(r=(0,n.XJ)(this.domBindings.rootDocument)),e?(o+=this.sumCellSizes(0,t+1),o-=this.wot.wtViewport.getViewportHeight(),o+=1):o+=this.sumCellSizes(this.wtSettings.getSetting("fixedRowsBottom"),t),o+=r,this.setScrollPosition(o)}getTableParentOffset(){return this.mainTableScrollableElement===this.domBindings.rootWindow?this.wot.wtTable.holderOffset.top:0}getScrollPosition(){return(0,n.hY)(this.mainTableScrollableElement,this.domBindings.rootWindow)}getOverlayOffset(){const{rootWindow:t}=this.domBindings,e=this.wtSettings.getSetting("preventOverflow");let o=0;if(this.trimmingContainer===t&&(!e||"vertical"!==e)){const t=this.wot.wtTable.getTotalHeight(),e=t-this.clone.wtTable.getTotalHeight(),n=this.domBindings.rootDocument.documentElement.clientHeight;o=Math.max(this.getTableParentOffset()-this.getScrollPosition()-n+t,0),o>e&&(o=0)}return o}adjustHeaderBordersPosition(t){const e=this.wtSettings.getSetting("fixedRowsBottom"),o=this.cachedFixedRowsBottom!==e,i=this.wtSettings.getSetting("columnHeaders");let r=!1;if((o||0===e)&&i.length>0){const e=this.wot.wtTable.holder.parentNode,o=(0,n.nB)(e,"innerBorderBottom");this.cachedFixedRowsBottom=this.wtSettings.getSetting("fixedRowsBottom"),t||0===this.wtSettings.getSetting("totalRows")?((0,n.iQ)(e,"innerBorderBottom"),r=!o):((0,n.vy)(e,"innerBorderBottom"),r=o)}return r}}const Ee={getFirstRenderedRow(){const t=this.dataAccessObject.startRowRendered;return null===t?-1:t},getFirstVisibleRow(){const t=this.dataAccessObject.startRowVisible;return null===t?-1:t},getFirstPartiallyVisibleRow(){const t=this.dataAccessObject.startRowPartiallyVisible;return null===t?-1:t},getLastRenderedRow(){const t=this.dataAccessObject.endRowRendered;return null===t?-1:t},getLastVisibleRow(){const t=this.dataAccessObject.endRowVisible;return null===t?-1:t},getLastPartiallyVisibleRow(){const t=this.dataAccessObject.endRowPartiallyVisible;return null===t?-1:t},getRenderedRowsCount(){return this.dataAccessObject.countRowsRendered},getVisibleRowsCount(){return this.dataAccessObject.countRowsVisible},getColumnHeadersCount(){return this.dataAccessObject.columnHeaders.length}};(0,v.LH)(Ee,"MIXIN_NAME","calculatedRows",{writable:!1,enumerable:!1});const Te=Ee,xe={getFirstRenderedColumn(){return 0===this.getRenderedColumnsCount()?-1:0},getFirstVisibleColumn(){return this.getFirstRenderedColumn()},getFirstPartiallyVisibleColumn(){return this.getFirstRenderedColumn()},getLastRenderedColumn(){return this.getRenderedColumnsCount()-1},getLastVisibleColumn(){return this.getLastRenderedColumn()},getLastPartiallyVisibleColumn(){return this.getLastRenderedColumn()},getRenderedColumnsCount(){return Math.min(this.wtSettings.getSetting("totalColumns"),this.wtSettings.getSetting("fixedColumnsStart"))},getVisibleColumnsCount(){return this.getRenderedColumnsCount()},getRowHeadersCount(){return this.dataAccessObject.rowHeaders.length}};(0,v.LH)(xe,"MIXIN_NAME","stickyColumnsStart",{writable:!1,enumerable:!1});const Me=xe;class Ie extends Jt{constructor(t,e,o,n){super(t,e,o,n,Gt)}}(0,v.co)(Ie,Te),(0,v.co)(Ie,Me);const He=Ie;class Oe extends me{constructor(t,e,o,n){super(t,e,Gt,o,n)}createTable(){for(var t=arguments.length,e=new Array(t),o=0;o<t;o++)e[o]=arguments[o];return new He(...e)}shouldBeRendered(){return this.wtSettings.getSetting("shouldRenderInlineStartOverlay")}resetFixedPosition(){const{wtTable:t}=this.wot;if(!this.needFullRender||!this.shouldBeRendered()||!t.holder.parentNode)return!1;const{rootWindow:e}=this.domBindings,o=this.clone.wtTable.holder.parentNode,i=this.wtSettings.getSetting("preventOverflow");let r=0;this.trimmingContainer!==e||i&&"horizontal"===i?(r=this.getScrollPosition(),(0,n.ZK)(o)):(r=this.getOverlayOffset()*(this.isRtl()?-1:1),(0,n.ON)(o,`${r}px`,"0px"));const s=this.adjustHeaderBordersPosition(r);return this.adjustElementsSize(),s}setScrollPosition(t){const{rootWindow:e}=this.domBindings;let o=!1;this.isRtl()&&(t=-t);const i=this.mainTableScrollableElement;if(i===e&&t!==e.scrollX){const i=e.scrollX;e.scrollTo(t,(0,n.v1)(e)),o=i!==e.scrollX}else if(t!==i.scrollLeft){const e=i.scrollLeft;i.scrollLeft=t,o=e!==i.scrollLeft}return o}onScroll(){this.wtSettings.getSetting("onScrollVertically")}sumCellSizes(t,e){const o=this.wtSettings.getSetting("defaultColumnWidth");let n=t,i=0;for(;n<e;)i+=this.wot.wtTable.getColumnWidth(n)||o,n+=1;return i}adjustElementsSize(){this.updateTrimmingContainer(),this.needFullRender&&(this.adjustRootElementSize(),this.adjustRootChildrenSize())}adjustRootElementSize(){const{wtTable:t,wtViewport:e}=this.wot,{rootDocument:o,rootWindow:i}=this.domBindings,r=this.clone.wtTable.holder.parentNode.style,s=this.wtSettings.getSetting("preventOverflow");if(this.trimmingContainer!==i||"vertical"===s){let i=e.getWorkspaceHeight();e.hasHorizontalScroll()&&(i-=(0,n.XJ)(o)),i=Math.min(i,t.wtRootElement.scrollHeight),r.height=`${i}px`}else r.height="";this.clone.wtTable.holder.style.height=r.height;const l=(0,n.Gq)(this.clone.wtTable.TABLE);r.width=`${l}px`}adjustRootChildrenSize(){const{holder:t}=this.clone.wtTable,e=we(this.wot),o=this.wot.selectionManager.getFocusSelection()?parseInt(e.width,10)/2:0;this.clone.wtTable.hider.style.height=this.hider.style.height,t.style.height=t.parentNode.style.height,t.style.width=`${parseInt(t.parentNode.style.width,10)+o}px`}applyToDOM(){const t=this.wtSettings.getSetting("totalColumns"),e=this.isRtl()?"right":"left";if("number"==typeof this.wot.wtViewport.columnsRenderCalculator.startPosition)this.spreader.style[e]=`${this.wot.wtViewport.columnsRenderCalculator.startPosition}px`;else{if(0!==t)throw new Error("Incorrect value of the columnsRenderCalculator");this.spreader.style[e]="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(t,e){const{wtSettings:o}=this,i=o.getSetting("rowHeaders"),r=o.getSetting("fixedColumnsStart"),s=(this.wot.cloneSource?this.wot.cloneSource:this.wot).wtTable.holder,l=0===r&&i.length>0&&!(0,n.nB)(s.parentNode,"innerBorderInlineStart")?1:0;let a=this.getTableParentOffset(),h=0;return e&&this.wot.wtTable.getColumnWidth(t)>this.wot.wtViewport.getViewportWidth()&&(e=!1),e&&s.offsetWidth!==s.clientWidth&&(h=(0,n.XJ)(this.domBindings.rootDocument)),e?(a+=this.sumCellSizes(0,t+1),a-=this.wot.wtViewport.getViewportWidth(),a+=l):a+=this.sumCellSizes(this.wtSettings.getSetting("fixedColumnsStart"),t),a+=h,(0,n.h$)(this.mainTableScrollableElement)===a-l&&l>0&&this.wot.wtOverlays.expandHiderHorizontallyBy(l),this.setScrollPosition(a)}getTableParentOffset(){let t=0;return this.wtSettings.getSetting("preventOverflow")||this.trimmingContainer!==this.domBindings.rootWindow||(t=this.wot.wtTable.holderOffset.left),t}getScrollPosition(){return Math.abs((0,n.v_)(this.mainTableScrollableElement,this.domBindings.rootWindow))}getOverlayOffset(){const{rootWindow:t}=this.domBindings,e=this.wtSettings.getSetting("preventOverflow");let o=0;return this.trimmingContainer!==t||e&&"horizontal"===e||(o=this.isRtl()?Math.abs(Math.min(this.getTableParentOffset()-this.getScrollPosition(),0)):Math.max(this.getScrollPosition()-this.getTableParentOffset(),0),o>this.wot.wtTable.getTotalWidth()-this.clone.wtTable.getTotalWidth()&&(o=0)),o}adjustHeaderBordersPosition(t){const{wtSettings:e}=this,o=this.wot.wtTable.holder.parentNode,i=e.getSetting("rowHeaders"),r=e.getSetting("fixedColumnsStart"),s=e.getSetting("totalRows"),l="vertical"===e.getSetting("preventOverflow");s?(0,n.vy)(o,"emptyRows"):(0,n.iQ)(o,"emptyRows");let a=!1;if(!l)if(r&&!i.length)(0,n.iQ)(o,"innerBorderLeft innerBorderInlineStart");else if(!r&&i.length){const e=(0,n.nB)(o,"innerBorderInlineStart");t?((0,n.iQ)(o,"innerBorderLeft innerBorderInlineStart"),a=!e):((0,n.vy)(o,"innerBorderLeft innerBorderInlineStart"),a=e)}return a}}class Ae extends Jt{constructor(t,e,o,n){super(t,e,o,n,Yt)}}(0,v.co)(Ae,te),(0,v.co)(Ae,Me);const ke=Ae;function _e(t,e,o){return(e=function(t){var e=function(t){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var o=e.call(t,"string");if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[e]=o,t}class Ne extends me{constructor(t,e,o,n,i,r){super(t,e,Yt,o,n),_e(this,"topOverlay",void 0),_e(this,"inlineStartOverlay",void 0),this.topOverlay=i,this.inlineStartOverlay=r}createTable(){for(var t=arguments.length,e=new Array(t),o=0;o<t;o++)e[o]=arguments[o];return new ke(...e)}shouldBeRendered(){return this.wtSettings.getSetting("shouldRenderTopOverlay")&&this.wtSettings.getSetting("shouldRenderInlineStartOverlay")}resetFixedPosition(){if(this.updateTrimmingContainer(),!this.wot.wtTable.holder.parentNode)return!1;const t=this.clone.wtTable.holder.parentNode;if(this.trimmingContainer===this.domBindings.rootWindow){const e=this.inlineStartOverlay.getOverlayOffset()*(this.isRtl()?-1:1),o=this.topOverlay.getOverlayOffset();(0,n.ON)(t,`${e}px`,`${o}px`)}else(0,n.ZK)(t);let e=(0,n.DK)(this.clone.wtTable.TABLE);const o=(0,n.Gq)(this.clone.wtTable.TABLE);return this.wot.wtTable.hasDefinedSize()||(e=0),t.style.height=`${e}px`,t.style.width=`${o}px`,!1}}class Pe extends Jt{constructor(t,e,o,n){super(t,e,o,n,Xt)}}(0,v.co)(Pe,ye),(0,v.co)(Pe,Me);const Le=Pe;class De extends me{constructor(t,e,o,n,i,r){super(t,e,Xt,o,n),this.bottomOverlay=i,this.inlineStartOverlay=r}createTable(){for(var t=arguments.length,e=new Array(t),o=0;o<t;o++)e[o]=arguments[o];return new Le(...e)}shouldBeRendered(){return this.wtSettings.getSetting("shouldRenderBottomOverlay")&&this.wtSettings.getSetting("shouldRenderInlineStartOverlay")}resetFixedPosition(){const{wot:t}=this;if(this.updateTrimmingContainer(),!t.wtTable.holder.parentNode)return!1;const e=this.clone.wtTable.holder.parentNode;if(e.style.top="",this.trimmingContainer===this.domBindings.rootWindow){const t=this.inlineStartOverlay.getOverlayOffset(),o=this.bottomOverlay.getOverlayOffset();e.style[this.isRtl()?"right":"left"]=`${t}px`,e.style.bottom=`${o}px`}else(0,n.ZK)(e),this.repositionOverlay();let o=(0,n.DK)(this.clone.wtTable.TABLE);const i=(0,n.Gq)(this.clone.wtTable.TABLE);return this.wot.wtTable.hasDefinedSize()||(o=0),e.style.height=`${o}px`,e.style.width=`${i}px`,!1}repositionOverlay(){const{wtTable:t,wtViewport:e}=this.wot,{rootDocument:o}=this.domBindings,i=this.clone.wtTable.holder.parentNode;let r=0;e.hasVerticalScroll()||(r+=e.getWorkspaceHeight()-t.getTotalHeight()),e.hasVerticalScroll()&&e.hasHorizontalScroll()&&(r+=(0,n.XJ)(o)),i.style.bottom=`${r}px`}}function Ve(t,e,o){(function(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")})(t,e),e.set(t,o)}function Fe(t,e,o){return(e=function(t){var e=function(t){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var o=e.call(t,"string");if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[e]=o,t}function Be(t,e,o){return t.set(ze(t,e),o),o}function We(t,e){return t.get(ze(t,e))}function ze(t,e,o){if("function"==typeof t?t===e:t.has(e))return arguments.length<3?e:o;throw new TypeError("Private element is not present on this object")}var je=new WeakMap,Ue=new WeakMap,$e=new WeakMap,Ge=new WeakMap;const Ye=class{constructor(t,e,o,i,r,s){Fe(this,"wot",null),Ve(this,je,[]),Fe(this,"topOverlay",null),Fe(this,"bottomOverlay",null),Fe(this,"inlineStartOverlay",null),Fe(this,"topInlineStartCornerOverlay",null),Fe(this,"bottomInlineStartCornerOverlay",null),Fe(this,"browserLineHeight",void 0),Fe(this,"wtSettings",null),Ve(this,Ue,!1),Ve(this,$e,0),Ve(this,Ge,null),Fe(this,"resizeObserver",new ResizeObserver((t=>{(0,$.xi)((()=>{Array.isArray(t)&&t.length&&(Be($e,this,We($e,this)+1),100===We($e,this)&&((0,y.R8)("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!==We(Ge,this)&&clearTimeout(We(Ge,this)),Be(Ge,this,setTimeout((()=>{Be($e,this,0)}),100)),this.wtSettings.getSetting("onContainerElementResize"))}))}))),this.wot=t,this.wtSettings=i,this.domBindings=o,this.facadeGetter=e,this.wtTable=s;const{rootDocument:l,rootWindow:a}=this.domBindings;this.instance=this.wot,this.eventManager=r,this.scrollbarSize=(0,n.XJ)(l);const h="hidden"===a.getComputedStyle(s.wtRootElement.parentNode).getPropertyValue("overflow");this.scrollableElement=h?s.holder:(0,n.K7)(s.TABLE),this.initOverlays(),this.destroyed=!1,this.keyPressed=!1,this.spreaderLastSize={width:null,height:null},this.verticalScrolling=!1,this.horizontalScrolling=!1,this.initBrowserLineHeight(),this.registerListeners(),this.lastScrollX=a.scrollX,this.lastScrollY=a.scrollY}getOverlays(){let t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];const e=[...We(je,this)];return t&&e.push(this.wtTable),e}initBrowserLineHeight(){const{rootWindow:t,rootDocument:e}=this.domBindings,o=t.getComputedStyle(e.body),n=parseInt(o.lineHeight,10),i=1.2*parseInt(o.fontSize,10);this.browserLineHeight=n||i}initOverlays(){const t=[this.wot,this.facadeGetter,this.wtSettings,this.domBindings];this.topOverlay=new be(...t),this.bottomOverlay=new Re(...t),this.inlineStartOverlay=new Oe(...t),this.topInlineStartCornerOverlay=new Ne(...t,this.topOverlay,this.inlineStartOverlay),this.bottomInlineStartCornerOverlay=new De(...t,this.bottomOverlay,this.inlineStartOverlay),Be(je,this,[this.topOverlay,this.bottomOverlay,this.inlineStartOverlay,this.topInlineStartCornerOverlay,this.bottomInlineStartCornerOverlay])}beforeDraw(){Be(Ue,this,We(je,this).reduce(((t,e)=>e.hasRenderingStateChanged()||t),!1)),We(je,this).forEach((t=>t.updateStateOfRendering("before")))}afterDraw(){this.syncScrollWithMaster(),We(je,this).forEach((t=>{const e=t.hasRenderingStateChanged();t.updateStateOfRendering("after"),e&&!t.needFullRender&&t.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:t,rootWindow:e}=this.domBindings,{mainTableScrollableElement:o}=this.topOverlay,{mainTableScrollableElement:n}=this.inlineStartOverlay;this.eventManager.addEventListener(t.documentElement,"keydown",(t=>this.onKeyDown(t))),this.eventManager.addEventListener(t.documentElement,"keyup",(()=>this.onKeyUp())),this.eventManager.addEventListener(t,"visibilitychange",(()=>this.onKeyUp())),this.eventManager.addEventListener(o,"scroll",(t=>this.onTableScroll(t)),{passive:!0}),o!==n&&this.eventManager.addEventListener(n,"scroll",(t=>this.onTableScroll(t)),{passive:!0});const i=e.devicePixelRatio&&e.devicePixelRatio>1,r=this.scrollableElement===e,l=this.wtSettings.getSetting("preventWheel"),a={passive:r};let h;(l||i||!(0,s.H8)())&&this.eventManager.addEventListener(this.wtTable.wtRootElement,"wheel",(t=>this.onCloneWheel(t,l)),a),[this.topOverlay,this.bottomOverlay,this.inlineStartOverlay,this.topInlineStartCornerOverlay,this.bottomInlineStartCornerOverlay].forEach((t=>{this.eventManager.addEventListener(t.clone.wtTable.holder,"wheel",(t=>this.onCloneWheel(t,l)),a)})),this.eventManager.addEventListener(e,"resize",(()=>{(0,$.xi)((()=>{clearTimeout(h),this.wtSettings.getSetting("onWindowResize"),h=setTimeout((()=>{Be($e,this,0)}),200)}))})),r||this.resizeObserver.observe(this.wtTable.wtRootElement.parentElement)}onTableScroll(t){const e=this.domBindings.rootWindow,o=this.inlineStartOverlay.mainTableScrollableElement,n=this.topOverlay.mainTableScrollableElement,i=t.target;this.keyPressed&&(n!==e&&i!==e&&!t.target.contains(n)||o!==e&&i!==e&&!t.target.contains(o))||this.syncScrollPositions(t)}onCloneWheel(t,e){const{rootWindow:o}=this.domBindings,n=this.inlineStartOverlay.mainTableScrollableElement,i=this.topOverlay.mainTableScrollableElement,r=t.target,s=i!==o&&r!==o&&!r.contains(i),l=n!==o&&r!==o&&!r.contains(n);if(this.keyPressed&&(s||l)||this.scrollableElement===o)return;const a=this.translateMouseWheelToScroll(t);(e||this.scrollableElement!==o&&a)&&t.preventDefault()}onKeyDown(t){this.keyPressed=(0,l.m0)(t.keyCode,"ARROW_UP|ARROW_RIGHT|ARROW_DOWN|ARROW_LEFT")}onKeyUp(){this.keyPressed=!1}translateMouseWheelToScroll(t){let e=isNaN(t.deltaY)?-1*t.wheelDeltaY:t.deltaY,o=isNaN(t.deltaX)?-1*t.wheelDeltaX:t.deltaX;1===t.deltaMode&&(o+=o*this.browserLineHeight,e+=e*this.browserLineHeight);const n=this.scrollVertically(e),i=this.scrollHorizontally(o);return n||i}scrollVertically(t){const e=this.scrollableElement.scrollTop;return this.scrollableElement.scrollTop+=t,e!==this.scrollableElement.scrollTop}scrollHorizontally(t){const e=this.scrollableElement.scrollLeft;return this.scrollableElement.scrollLeft+=t,e!==this.scrollableElement.scrollLeft}syncScrollPositions(){if(this.destroyed)return;const t=this.topOverlay.clone.wtTable.holder,e=this.inlineStartOverlay.clone.wtTable.holder;let o=this.scrollableElement.scrollLeft,n=this.scrollableElement.scrollTop;if(this.wot.wtViewport.isHorizontallyScrollableByWindow()&&(o=this.scrollableElement.scrollX),this.wot.wtViewport.isVerticallyScrollableByWindow()&&(n=this.scrollableElement.scrollY),this.horizontalScrolling=this.lastScrollX!==o,this.verticalScrolling=this.lastScrollY!==n,this.lastScrollX=o,this.lastScrollY=n,this.horizontalScrolling){t.scrollLeft=o;const e=this.bottomOverlay.needFullRender?this.bottomOverlay.clone.wtTable.holder:null;e&&(e.scrollLeft=o)}this.verticalScrolling&&(e.scrollTop=n),this.refreshAll()}syncScrollWithMaster(){if(!We(Ue,this))return;const t=this.topOverlay.mainTableScrollableElement,{scrollLeft:e,scrollTop:o}=t;this.topOverlay.needFullRender&&(this.topOverlay.clone.wtTable.holder.scrollLeft=e),this.bottomOverlay.needFullRender&&(this.bottomOverlay.clone.wtTable.holder.scrollLeft=e),this.inlineStartOverlay.needFullRender&&(this.inlineStartOverlay.clone.wtTable.holder.scrollTop=o),Be(Ue,this,!1)}updateMainScrollableElements(){this.eventManager.clearEvents(!0),this.inlineStartOverlay.updateMainScrollableElement(),this.topOverlay.updateMainScrollableElement(),this.bottomOverlay.needFullRender&&this.bottomOverlay.updateMainScrollableElement();const{wtTable:t}=this,{rootWindow:e}=this.domBindings;"hidden"===e.getComputedStyle(t.wtRootElement.parentNode).getPropertyValue("overflow")?this.scrollableElement=t.holder:this.scrollableElement=(0,n.K7)(t.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 t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.updateLastSpreaderSize()&&this.adjustElementsSize(),this.bottomOverlay.clone&&this.bottomOverlay.refresh(t),this.inlineStartOverlay.refresh(t),this.topOverlay.refresh(t),this.topInlineStartCornerOverlay&&this.topInlineStartCornerOverlay.refresh(t),this.bottomInlineStartCornerOverlay&&this.bottomInlineStartCornerOverlay.clone&&this.bottomInlineStartCornerOverlay.refresh(t)}updateLastSpreaderSize(){const t=this.wtTable.spreader,e=t.clientWidth,o=t.clientHeight,n=e!==this.spreaderLastSize.width||o!==this.spreaderLastSize.height;return n&&(this.spreaderLastSize.width=e,this.spreaderLastSize.height=o),n}adjustElementsSize(){const{wtViewport:t}=this.wot,{wtTable:e}=this,{rootWindow:o}=this.domBindings,n=this.scrollableElement===o,i=this.wtSettings.getSetting("totalColumns"),r=this.wtSettings.getSetting("totalRows"),s=t.getRowHeaderWidth(),l=t.getColumnHeaderHeight()+this.topOverlay.sumCellSizes(0,r)+1,a=s+this.inlineStartOverlay.sumCellSizes(0,i),h=e.hider.style,c=(()=>!n&&this.scrollableElement.scrollTop>Math.max(0,l-e.holder.clientHeight))()?1:0,d=(()=>!n&&this.scrollableElement.scrollLeft>Math.max(0,a-e.holder.clientWidth))()?1:0;h.width=`${a+d}px`,h.height=`${l+c}px`,this.topOverlay.adjustElementsSize(),this.inlineStartOverlay.adjustElementsSize(),this.bottomOverlay.adjustElementsSize()}expandHiderVerticallyBy(t){const{wtTable:e}=this;e.hider.style.height=`${parseInt(e.hider.style.height,10)+t}px`}expandHiderHorizontallyBy(t){const{wtTable:e}=this;e.hider.style.width=`${parseInt(e.hider.style.width,10)+t}px`}applyToDOM(){this.wtTable.isVisible()&&(this.topOverlay.applyToDOM(),this.bottomOverlay.clone&&this.bottomOverlay.applyToDOM(),this.inlineStartOverlay.applyToDOM())}getParentOverlay(t){if(!t)return null;const e=[this.topOverlay,this.inlineStartOverlay,this.bottomOverlay,this.topInlineStartCornerOverlay,this.bottomInlineStartCornerOverlay];let o=null;return(0,V.z0)(e,(e=>{e&&e.clone&&e.clone.wtTable.TABLE.contains(t)&&(o=e.clone)})),o}syncOverlayTableClassNames(){const t=this.wtTable.TABLE,e=[this.topOverlay,this.inlineStartOverlay,this.bottomOverlay,this.topInlineStartCornerOverlay,this.bottomInlineStartCornerOverlay];(0,V.z0)(e,(e=>{e&&(e.clone.wtTable.TABLE.className=t.className)}))}};function Xe(t,e,o){return(e=function(t){var e=function(t){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var o=e.call(t,"string");if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[e]=o,t}class qe{constructor(t){Xe(this,"settings",{}),Xe(this,"defaults",Object.freeze(this.getDefaults())),(0,v.v4)(this.defaults,((e,o)=>{if(void 0!==t[o])this.settings[o]=t[o];else{if(void 0===e)throw new Error(`A required setting "${o}" was not provided`);this.settings[o]=e}}))}getDefaults(){return{facade:void 0,table:void 0,isDataViewInstance:!0,externalRowCalculator:!1,currentRowClassName:null,currentColumnClassName:null,preventOverflow:()=>!1,preventWheel:!1,data:void 0,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:()=>[],columnHeaders:()=>[],totalRows:void 0,totalColumns:void 0,cellRenderer:(t,e,o)=>{const i=this.getSetting("data",t,e);(0,n.c6)(o,null==i?"":i)},columnWidth(){},rowHeight(){},rowHeightByOverlayName(){},defaultColumnWidth:50,selections:null,hideBorderOnMouseDownOver:!1,viewportRowCalculatorOverride:null,viewportColumnCalculatorOverride:null,viewportRowRenderingThreshold:null,viewportColumnRenderingThreshold: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:t=>t,onBeforeViewportScrollVertically:t=>t,onScrollHorizontally:null,onScrollVertically:null,onBeforeTouchScroll:null,onAfterMomentumScroll:null,onModifyRowHeaderWidth:null,onModifyGetCellCoords:null,onModifyGetCoordsElement:null,onModifyGetCoords:null,onBeforeHighlightingRowHeader:t=>t,onBeforeHighlightingColumnHeader:t=>t,onWindowResize:null,onContainerElementResize:null,renderAllColumns:!1,renderAllRows:!1,groups:!1,rowHeaderWidth:null,columnHeaderHeight:null,headerClassName:null,rtlMode:!1,ariaTags:!0}}update(t,e){return void 0===e?(0,v.v4)(t,((t,e)=>{this.settings[e]=t})):this.settings[t]=e,this}getSetting(t,e,o,n,i){return"function"==typeof this.settings[t]?this.settings[t](e,o,n,i):void 0!==e&&Array.isArray(this.settings[t])?this.settings[t][e]:this.settings[t]}getSettingPure(t){return this.settings[t]}has(t){return!!this.settings[t]}}class Ke extends Jt{constructor(t,e,o,n){super(t,e,o,n,"master")}alignOverlaysWithTrimmingContainer(){const t=(0,n.fX)(this.wtRootElement),{rootWindow:e}=this.domBindings;if(t===e)this.wtSettings.getSetting("preventOverflow")||(this.holder.style.overflow="visible",this.wtRootElement.style.overflow="visible");else{const o=t.parentElement,i=(0,n.gd)(t,"height",e),r=(0,n.gd)(t,"overflow",e),s=this.holder.style,{scrollWidth:l,scrollHeight:a}=t;let h=t.offsetWidth,c=t.offsetHeight;if(o&&["auto","hidden","scroll"].includes(r)){const n=t.cloneNode(!1);n.style.overflow="auto",n.style.position="absolute",t.nextElementSibling?o.insertBefore(n,t.nextElementSibling):o.appendChild(n);const i=parseInt(e.getComputedStyle(n).height,10);o.removeChild(n),0===i&&(c=0)}c=Math.min(c,a),s.height="auto"===i?"auto":`${c}px`,h=Math.min(h,l),s.width=`${h}px`,s.overflow="",this.hasTableHeight="auto"===s.height||c>0,this.hasTableWidth=h>0}this.isTableVisible=(0,n.zN)(this.TABLE)}markOversizedColumnHeaders(){const{wtSettings:t}=this,{wtViewport:e}=this.dataAccessObject,o="master",n=t.getSetting("columnHeaders").length;if(n&&!e.hasOversizedColumnHeadersMarked[o]){const i=t.getSetting("rowHeaders").length,r=this.getRenderedColumnsCount();for(let t=0;t<n;t++)for(let t=-1*i;t<r;t++)this.markIfOversizedColumnHeader(t);e.hasOversizedColumnHeadersMarked[o]=!0}}}(0,v.co)(Ke,Te),(0,v.co)(Ke,oe);const Qe=Ke;function Je(t,e,o){return(e=function(t){var e=function(t){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var o=e.call(t,"string");if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[e]=o,t}class Ze{constructor(){Je(this,"count",0),Je(this,"startRow",0),Je(this,"endRow",0),Je(this,"startPosition",0),Je(this,"isVisibleInTrimmingContainer",!0)}initialize(t){let{totalRows:e}=t;this.count=e,this.endRow=this.count-1}process(){}finalize(){}}function to(t,e,o){return(e=function(t){var e=function(t){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var o=e.call(t,"string");if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[e]=o,t}o(8107),o(9738);class eo{constructor(){to(this,"count",0),to(this,"startRow",null),to(this,"endRow",null),to(this,"startPosition",null),to(this,"isVisibleInTrimmingContainer",!1)}initialize(){}process(t,e){const{totalCalculatedHeight:o,zeroBasedScrollOffset:n,innerViewportHeight:i}=e;o<=n&&(this.startRow=t),o>=n&&o<=i&&null===this.startRow&&(this.startRow=t),this.endRow=t}finalize(t){var e;const{scrollOffset:o,viewportHeight:n,horizontalScrollbarHeight:i,totalRows:r,needReverse:s,startPositions:l,rowHeight:a}=t;if(this.endRow===r-1&&s)for(this.startRow=this.endRow;this.startRow>0;){const t=l[this.endRow]+a-l[this.startRow-1];if(this.startRow-=1,t>=n-i)break}this.startPosition=null!==(e=l[this.startRow])&&void 0!==e?e:null,o+n-i<0||o>l.at(-1)+a?this.isVisibleInTrimmingContainer=!1:this.isVisibleInTrimmingContainer=!0,r<this.endRow&&(this.endRow=r-1),null!==this.startRow&&(this.count=this.endRow-this.startRow+1)}}function oo(t,e,o){return(e=function(t){var e=function(t){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var o=e.call(t,"string");if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[e]=o,t}class no extends eo{constructor(){super(...arguments),oo(this,"rowStartOffset",0),oo(this,"rowEndOffset",0)}finalize(t){var e;super.finalize(t);const{overrideFn:o,totalRows:n,startPositions:i}=t;if(null!==this.startRow&&"function"==typeof o){const t=this.startRow,e=this.endRow;o(this),this.rowStartOffset=t-this.startRow,this.rowEndOffset=this.endRow-e}this.startRow<0&&(this.startRow=0),this.startPosition=null!==(e=i[this.startRow])&&void 0!==e?e:null,n<this.endRow&&(this.endRow=n-1),null!==this.startRow&&(this.count=this.endRow-this.startRow+1)}}function io(t,e,o){return(e=function(t){var e=function(t){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var o=e.call(t,"string");if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[e]=o,t}class ro{constructor(){io(this,"count",0),io(this,"startRow",null),io(this,"endRow",null),io(this,"startPosition",null),io(this,"isVisibleInTrimmingContainer",!1)}initialize(){}process(t,e){const{totalCalculatedHeight:o,zeroBasedScrollOffset:n,innerViewportHeight:i,rowHeight:r}=e;o>=n&&o+r<=i&&(null===this.startRow&&(this.startRow=t),this.endRow=t)}finalize(t){var e;const{scrollOffset:o,viewportHeight:n,horizontalScrollbarHeight:i,totalRows:r,needReverse:s,startPositions:l,rowHeight:a}=t;if(this.endRow===r-1&&s)for(this.startRow=this.endRow;this.startRow>0;){const t=l[this.endRow]+a-l[this.startRow-1];if(t<=n-i&&(this.startRow-=1),t>=n-i)break}this.startPosition=null!==(e=l[this.startRow])&&void 0!==e?e:null,o+n-i<(null===this.startRow?0:t.getRowHeight(this.startRow))||o>l.at(-1)?this.isVisibleInTrimmingContainer=!1:this.isVisibleInTrimmingContainer=!0,r<this.endRow&&(this.endRow=r-1),null!==this.startRow&&(this.count=this.endRow-this.startRow+1)}}function so(t,e,o){return(e=function(t){var e=function(t){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var o=e.call(t,"string");if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[e]=o,t}class lo{constructor(){so(this,"count",0),so(this,"startColumn",0),so(this,"endColumn",0),so(this,"startPosition",0),so(this,"isVisibleInTrimmingContainer",!0)}initialize(t){let{totalColumns:e}=t;this.count=e,this.endColumn=this.count-1}process(){}finalize(){}}function ao(t,e,o){return(e=function(t){var e=function(t){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var o=e.call(t,"string");if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[e]=o,t}class ho{constructor(){ao(this,"count",0),ao(this,"startColumn",null),ao(this,"endColumn",null),ao(this,"startPosition",null),ao(this,"isVisibleInTrimmingContainer",!1)}initialize(){}process(t,e){const{totalCalculatedWidth:o,zeroBasedScrollOffset:n,viewportWidth:i}=e;o<=n&&(this.startColumn=t),o>=n&&o<=n+(n>0?i+1:i)&&(null!==this.startColumn&&void 0!==this.startColumn||(this.startColumn=t)),this.endColumn=t}finalize(t){var e;const{scrollOffset:o,viewportWidth:n,inlineStartOffset:i,zeroBasedScrollOffset:r,totalColumns:s,needReverse:l,startPositions:a,columnWidth:h}=t;if(this.endColumn===s-1&&l)for(this.startColumn=this.endColumn;this.startColumn>0;){const t=a[this.endColumn]+h-a[this.startColumn-1];if(this.startColumn-=1,t>n)break}this.startPosition=null!==(e=a[this.startColumn])&&void 0!==e?e:null,o+n-(r>0?n+1:n)<-1*i||o>a.at(-1)+h||-1*o-n>0?this.isVisibleInTrimmingContainer=!1:this.isVisibleInTrimmingContainer=!0,s<this.endColumn&&(this.endColumn=s-1),null!==this.startColumn&&(this.count=this.endColumn-this.startColumn+1)}}function co(t,e,o){return(e=function(t){var e=function(t){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var o=e.call(t,"string");if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[e]=o,t}class uo extends ho{constructor(){super(...arguments),co(this,"columnStartOffset",0),co(this,"columnEndOffset",0)}finalize(t){var e;super.finalize(t);const{overrideFn:o,totalColumns:n,startPositions:i}=t;if(null!==this.startColumn&&"function"==typeof o){const t=this.startColumn,e=this.endColumn;o(this),this.columnStartOffset=t-this.startColumn,this.columnEndOffset=this.endColumn-e}this.startColumn<0&&(this.startColumn=0),this.startPosition=null!==(e=i[this.startColumn])&&void 0!==e?e:null,n<this.endColumn&&(this.endColumn=n-1),null!==this.startColumn&&(this.count=this.endColumn-this.startColumn+1)}}function go(t,e,o){return(e=function(t){var e=function(t){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var o=e.call(t,"string");if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[e]=o,t}class fo{constructor(){go(this,"count",0),go(this,"startColumn",null),go(this,"endColumn",null),go(this,"startPosition",null),go(this,"isVisibleInTrimmingContainer",!1)}initialize(){}process(t,e){const{totalCalculatedWidth:o,zeroBasedScrollOffset:n,viewportWidth:i,columnWidth:r}=e;o>=n&&o+r<=n+(n>0?i+1:i)&&(null!==this.startColumn&&void 0!==this.startColumn||(this.startColumn=t),this.endColumn=t)}finalize(t){var e;const{scrollOffset:o,viewportWidth:n,inlineStartOffset:i,zeroBasedScrollOffset:r,totalColumns:s,needReverse:l,startPositions:a,columnWidth:h}=t;if(this.endColumn===s-1&&l)for(this.startColumn=this.endColumn;this.startColumn>0;){const t=a[this.endColumn]+h-a[this.startColumn-1];if(t<=n&&(this.startColumn-=1),t>=n)break}this.startPosition=null!==(e=a[this.startColumn])&&void 0!==e?e:null;const c=o+n-(r>0?n+1:n),d=null===this.startColumn?0:t.getColumnWidth(this.startColumn);c<-1*i||o>a.at(-1)||-1*o-n>-1*d?this.isVisibleInTrimmingContainer=!1:this.isVisibleInTrimmingContainer=!0,s<this.endColumn&&(this.endColumn=s-1),null!==this.startColumn&&(this.count=this.endColumn-this.startColumn+1)}}var po=o(8514);function mo(t,e,o){return(e=function(t){var e=function(t){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var o=e.call(t,"string");if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[e]=o,t}class wo extends po.C{constructor(t){let{calculationTypes:e,viewportHeight:o,scrollOffset:n,totalRows:i,defaultRowHeight:r,rowHeightFn:s,overrideFn:l,horizontalScrollbarHeight:a}=t;super(e),mo(this,"viewportHeight",0),mo(this,"scrollOffset",0),mo(this,"zeroBasedScrollOffset",0),mo(this,"totalRows",0),mo(this,"rowHeightFn",null),mo(this,"rowHeight",0),mo(this,"overrideFn",null),mo(this,"horizontalScrollbarHeight",0),mo(this,"innerViewportHeight",0),mo(this,"totalCalculatedHeight",0),mo(this,"startPositions",[]),mo(this,"needReverse",!0),this.defaultHeight=r,this.viewportHeight=o,this.scrollOffset=n,this.zeroBasedScrollOffset=Math.max(n,0),this.totalRows=i,this.rowHeightFn=s,this.overrideFn=l,this.horizontalScrollbarHeight=null!=a?a:0,this.innerViewportHeight=this.zeroBasedScrollOffset+this.viewportHeight-this.horizontalScrollbarHeight,this.calculate()}calculate(){this._initialize(this);for(let t=0;t<this.totalRows;t++)if(this.rowHeight=this.getRowHeight(t),this._process(t,this),this.startPositions.push(this.totalCalculatedHeight),this.totalCalculatedHeight+=this.rowHeight,this.totalCalculatedHeight>=this.innerViewportHeight){this.needReverse=!1;break}this._finalize(this)}getRowHeight(t){const e=this.rowHeightFn(t);return isNaN(e)?this.defaultHeight:e}}var bo=o(4726);const vo=class{constructor(t,e,o,n,i){this.dataAccessObject=t,this.wot=t.wot,this.instance=this.wot,this.domBindings=e,this.wtSettings=o,this.wtTable=i,this.oversizedRows=[],this.oversizedColumnHeaders=[],this.hasOversizedColumnHeadersMarked={},this.clientHeight=0,this.rowHeaderWidth=NaN,this.rowsVisibleCalculator=null,this.columnsVisibleCalculator=null,this.rowsCalculatorTypes=new Map([["rendered",()=>this.wtSettings.getSetting("renderAllRows")?new Ze:new no],["fullyVisible",()=>new ro],["partiallyVisible",()=>new eo]]),this.columnsCalculatorTypes=new Map([["rendered",()=>this.wtSettings.getSetting("renderAllColumns")?new lo:new uo],["fullyVisible",()=>new fo],["partiallyVisible",()=>new ho]]),this.eventManager=n,this.eventManager.addEventListener(this.domBindings.rootWindow,"resize",(()=>{this.clientHeight=this.getWorkspaceHeight()}))}getWorkspaceHeight(){const t=this.domBindings.rootDocument,e=this.dataAccessObject.topOverlayTrimmingContainer;let o=0;return o=e===this.domBindings.rootWindow?t.documentElement.clientHeight:(0,n.DK)(e)>0&&e.clientHeight>0?e.clientHeight:1/0,o}getViewportHeight(){let t=this.getWorkspaceHeight();if(t===1/0)return t;const e=this.getColumnHeaderHeight();return e>0&&(t-=e),t}getWorkspaceWidth(){const{rootDocument:t,rootWindow:e}=this.domBindings,o=this.dataAccessObject.inlineStartOverlayTrimmingContainer;let n;if(o===e){const e=this.wtSettings.getSetting("totalColumns");n=this.wtTable.holder.offsetWidth,this.getRowHeaderWidth()+this.sumColumnWidths(0,e)>n&&(n=t.documentElement.clientWidth)}else n=o.clientWidth;return n}getViewportWidth(){const t=this.getWorkspaceWidth();if(t===1/0)return t;const e=this.getRowHeaderWidth();return e>0?t-e:t}hasVerticalScroll(){if(this.isVerticallyScrollableByWindow()){const t=this.domBindings.rootDocument.documentElement;return t.scrollHeight>t.clientHeight}const{holder:t,hider:e}=this.wtTable,o=t.clientHeight,n=e.offsetHeight;return o<n||n>this.getWorkspaceHeight()}hasHorizontalScroll(){if(this.isVerticallyScrollableByWindow()){const t=this.domBindings.rootDocument.documentElement;return t.scrollWidth>t.clientWidth}const{holder:t,hider:e}=this.wtTable,o=t.clientWidth,n=e.offsetWidth;return o<n||n>this.getWorkspaceWidth()}isVerticallyScrollableByWindow(){return this.dataAccessObject.topOverlayTrimmingContainer===this.domBindings.rootWindow}isHorizontallyScrollableByWindow(){return this.dataAccessObject.inlineStartOverlayTrimmingContainer===this.domBindings.rootWindow}sumColumnWidths(t,e){let o=0,n=t;for(;n<e;)o+=this.wtTable.getColumnWidth(n),n+=1;return o}getWorkspaceOffset(){return(0,n.cY)(this.wtTable.holder)}getColumnHeaderHeight(){return this.wtSettings.getSetting("columnHeaders").length?isNaN(this.columnHeaderHeight)&&(this.columnHeaderHeight=(0,n.DK)(this.wtTable.THEAD)):this.columnHeaderHeight=0,this.columnHeaderHeight}getRowHeaderWidth(){const t=this.wtSettings.getSetting("rowHeaderWidth"),e=this.wtSettings.getSetting("rowHeaders");if(t){this.rowHeaderWidth=0;for(let o=0,n=e.length;o<n;o++)this.rowHeaderWidth+=t[o]||t}if(isNaN(this.rowHeaderWidth))if(e.length){let t=this.wtTable.TABLE.querySelector("TH");this.rowHeaderWidth=0;for(let o=0,i=e.length;o<i;o++)t?(this.rowHeaderWidth+=(0,n.Gq)(t),t=t.nextSibling):this.rowHeaderWidth+=50}else this.rowHeaderWidth=0;return this.rowHeaderWidth=this.wtSettings.getSetting("onModifyRowHeaderWidth",this.rowHeaderWidth)||this.rowHeaderWidth,this.rowHeaderWidth}createRowsCalculator(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:["rendered","fullyVisible","partiallyVisible"];const{wtSettings:e,wtTable:o}=this;let i,r,s=this.getViewportHeight();this.rowHeaderWidth=NaN;let l=this.dataAccessObject.topScrollPosition-this.dataAccessObject.topParentOffset;const a=e.getSetting("fixedRowsTop"),h=e.getSetting("fixedRowsBottom"),c=e.getSetting("totalRows");return a&&l>=0&&(r=this.dataAccessObject.topOverlay.sumCellSizes(0,a),l+=r,s-=r),h&&this.dataAccessObject.bottomOverlay.clone&&(r=this.dataAccessObject.bottomOverlay.sumCellSizes(c-h,c),s-=r),i=o.holder.clientHeight===o.holder.offsetHeight?0:(0,n.XJ)(this.domBindings.rootDocument),new wo({calculationTypes:t.map((t=>[t,this.rowsCalculatorTypes.get(t)()])),viewportHeight:s,scrollOffset:l,totalRows:e.getSetting("totalRows"),defaultRowHeight:this.instance.stylesHandler.getDefaultRowHeight(),rowHeightFn:t=>o.getRowHeight(t),overrideFn:e.getSettingPure("viewportRowCalculatorOverride"),horizontalScrollbarHeight:i})}createColumnsCalculator(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:["rendered","fullyVisible","partiallyVisible"];const{wtSettings:e,wtTable:o}=this;let i=this.getViewportWidth(),r=Math.abs(this.dataAccessObject.inlineStartScrollPosition)-this.dataAccessObject.inlineStartParentOffset;this.columnHeaderHeight=NaN;const s=e.getSetting("fixedColumnsStart");if(s&&r>=0){const t=this.dataAccessObject.inlineStartOverlay.sumCellSizes(0,s);r+=t,i-=t}return o.holder.clientWidth!==o.holder.offsetWidth&&(i-=(0,n.XJ)(this.domBindings.rootDocument)),new bo.U({calculationTypes:t.map((t=>[t,this.columnsCalculatorTypes.get(t)()])),viewportWidth:i,scrollOffset:r,totalColumns:e.getSetting("totalColumns"),columnWidthFn:t=>o.getColumnWidth(t),overrideFn:e.getSettingPure("viewportColumnCalculatorOverride"),inlineStartOffset:this.dataAccessObject.inlineStartParentOffset})}createCalculators(){let t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];const{wtSettings:e}=this,o=this.createRowsCalculator(),n=this.createColumnsCalculator();if(t&&!e.getSetting("renderAllRows")){const e=o.getResultsFor("fullyVisible");t=this.areAllProposedVisibleRowsAlreadyRendered(e)}if(t&&!e.getSetting("renderAllColumns")){const e=n.getResultsFor("fullyVisible");t=this.areAllProposedVisibleColumnsAlreadyRendered(e)}return t||(this.rowsRenderCalculator=o.getResultsFor("rendered"),this.columnsRenderCalculator=n.getResultsFor("rendered")),this.rowsVisibleCalculator=o.getResultsFor("fullyVisible"),this.columnsVisibleCalculator=n.getResultsFor("fullyVisible"),this.rowsPartiallyVisibleCalculator=o.getResultsFor("partiallyVisible"),this.columnsPartiallyVisibleCalculator=n.getResultsFor("partiallyVisible"),t}createVisibleCalculators(){const t=this.createRowsCalculator(["fullyVisible","partiallyVisible"]),e=this.createColumnsCalculator(["fullyVisible","partiallyVisible"]);this.rowsVisibleCalculator=t.getResultsFor("fullyVisible"),this.columnsVisibleCalculator=e.getResultsFor("fullyVisible"),this.rowsPartiallyVisibleCalculator=t.getResultsFor("partiallyVisible"),this.columnsPartiallyVisibleCalculator=e.getResultsFor("partiallyVisible")}areAllProposedVisibleRowsAlreadyRendered(t){if(!this.rowsVisibleCalculator)return!1;let{startRow:e,endRow:o}=t;if(null===e&&null===o){if(!t.isVisibleInTrimmingContainer)return!0;e=this.rowsPartiallyVisibleCalculator.startRow,o=this.rowsPartiallyVisibleCalculator.endRow}const{startRow:n,endRow:i,rowStartOffset:r,rowEndOffset:s}=this.rowsRenderCalculator,l=this.wtSettings.getSetting("totalRows")-1,a=this.wtSettings.getSetting("viewportRowRenderingThreshold");return Number.isInteger(a)&&a>0?(e=Math.max(0,e-Math.min(r,a)),o=Math.min(l,o+Math.min(s,a))):"auto"===a&&(e=Math.max(0,e-Math.ceil(r/2)),o=Math.min(l,o+Math.ceil(s/2))),!(e<n||e===n&&e>0||o>i||o===i&&o<l)}areAllProposedVisibleColumnsAlreadyRendered(t){if(!this.columnsVisibleCalculator)return!1;let{startColumn:e,endColumn:o}=t;if(null===e&&null===o){if(!t.isVisibleInTrimmingContainer)return!0;e=this.columnsPartiallyVisibleCalculator.startColumn,o=this.columnsPartiallyVisibleCalculator.endColumn}const{startColumn:n,endColumn:i,columnStartOffset:r,columnEndOffset:s}=this.columnsRenderCalculator,l=this.wtSettings.getSetting("totalColumns")-1,a=this.wtSettings.getSetting("viewportColumnRenderingThreshold");return Number.isInteger(a)&&a>0?(e=Math.max(0,e-Math.min(r,a)),o=Math.min(l,o+Math.min(s,a))):"auto"===a&&(e=Math.max(0,e-Math.ceil(r/2)),o=Math.min(l,o+Math.ceil(s/2))),!(e<n||e===n&&e>0||o>i||o===i&&o<l)}resetHasOversizedColumnHeadersMarked(){(0,v.v4)(this.hasOversizedColumnHeadersMarked,((t,e,o)=>{o[e]=void 0}))}};function yo(t,e,o){Co(t,e),e.set(t,o)}function Co(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function So(t,e){return t.get(Eo(t,e))}function Ro(t,e,o){return t.set(Eo(t,e),o),o}function Eo(t,e,o){if("function"==typeof t?t===e:t.has(e))return arguments.length<3?e:o;throw new TypeError("Private element is not present on this object")}o(3514);var To=new WeakMap,xo=new WeakMap,Mo=new WeakSet;class Io{constructor(){var t;Co(this,t=Mo),t.add(this),yo(this,To,void 0),yo(this,xo,void 0)}setActiveOverlay(t){return Ro(xo,this,t),this}setActiveSelection(t){return Ro(To,this,t),this}scan(){const t=So(To,this).settings.selectionType,e=new Set;return"active-header"===t?(this.scanColumnsInHeadersRange((t=>e.add(t))),this.scanRowsInHeadersRange((t=>e.add(t)))):"area"===t?this.scanCellsRange((t=>e.add(t))):"focus"===t?(this.scanColumnsInHeadersRange((t=>e.add(t))),this.scanRowsInHeadersRange((t=>e.add(t))),this.scanCellsRange((t=>e.add(t)))):"fill"===t?this.scanCellsRange((t=>e.add(t))):"header"===t?(this.scanColumnsInHeadersRange((t=>e.add(t))),this.scanRowsInHeadersRange((t=>e.add(t)))):"row"===t?(this.scanRowsInHeadersRange((t=>e.add(t))),this.scanRowsInCellsRange((t=>e.add(t)))):"column"===t&&(this.scanColumnsInHeadersRange((t=>e.add(t))),this.scanColumnsInCellsRange((t=>e.add(t)))),e}scanColumnsInHeadersRange(t){const[e,o,n,i]=So(To,this).getCorners(),{wtTable:r}=So(xo,this),s=r.getRenderedColumnsCount(),l=r.getColumnHeadersCount();let a=0;for(let h=-r.getRowHeadersCount();h<s;h++){const s=r.columnFilter.renderedToSource(h);if(!(s<o||s>i)){for(let h=-l;h<0;h++){if(h<e||h>n)continue;const c=h+l;let d=r.getColumnHeader(s,c);const u=So(xo,this).getSetting("onBeforeHighlightingColumnHeader",s,c,{selectionType:So(To,this).settings.selectionType,columnCursor:a,selectionWidth:i-o+1});null!==u&&(u!==s&&(d=r.getColumnHeader(u,c)),t(d))}a+=1}}}scanRowsInHeadersRange(t){const[e,o,n,i]=So(To,this).getCorners(),{wtTable:r}=So(xo,this),s=r.getRenderedRowsCount(),l=r.getRowHeadersCount();let a=0;for(let h=-r.getColumnHeadersCount();h<s;h++){const s=r.rowFilter.renderedToSource(h);if(!(s<e||s>n)){for(let h=-l;h<0;h++){if(h<o||h>i)continue;const c=h+l;let d=r.getRowHeader(s,c);const u=So(xo,this).getSetting("onBeforeHighlightingRowHeader",s,c,{selectionType:So(To,this).settings.selectionType,rowCursor:a,selectionHeight:n-e+1});null!==u&&(u!==s&&(d=r.getRowHeader(u,c)),t(d))}a+=1}}}scanCellsRange(t){const{wtTable:e}=So(xo,this);Eo(Mo,this,Ho).call(this,((o,i)=>{const r=e.getCell(So(xo,this).createCellCoords(o,i)),s=So(xo,this).getSetting("onAfterDrawSelection",o,i,So(To,this).settings.layerLevel);"string"==typeof s&&(0,n.iQ)(r,s),t(r)}))}scanRowsInCellsRange(t){const[e,,o]=So(To,this).getCorners(),{wtTable:n}=So(xo,this);Eo(Mo,this,Oo).call(this,((i,r)=>{if(i>=e&&i<=o){const e=n.getCell(So(xo,this).createCellCoords(i,r));t(e)}}))}scanColumnsInCellsRange(t){const[,e,,o]=So(To,this).getCorners(),{wtTable:n}=So(xo,this);Eo(Mo,this,Oo).call(this,((i,r)=>{if(r>=e&&r<=o){const e=n.getCell(So(xo,this).createCellCoords(i,r));t(e)}}))}}function Ho(t){let[e,o,i,r]=So(To,this).getCorners();if(e<0&&i<0||o<0&&r<0)return;const{wtTable:s}=So(xo,this),l=e!==i||o!==r;if(o=Math.max(o,0),r=Math.max(r,0),e=Math.max(e,0),i=Math.max(i,0),l){if(o=Math.max(o,s.getFirstRenderedColumn()),r=Math.min(r,s.getLastRenderedColumn()),e=Math.max(e,s.getFirstRenderedRow()),i=Math.min(i,s.getLastRenderedRow()),r<o||i<e)return}else{const t=s.getCell(So(xo,this).createCellCoords(e,o));if(!(0,n.sb)(t))return}for(let n=e;n<=i;n+=1)for(let e=o;e<=r;e+=1)t(n,e)}function Oo(t){const{wtTable:e}=So(xo,this),o=e.getRenderedRowsCount(),n=e.getRenderedColumnsCount();for(let i=0;i<o;i+=1){const o=e.rowFilter.renderedToSource(i);for(let i=0;i<n;i+=1)t(o,e.columnFilter.renderedToSource(i))}}const Ao=class{constructor(t,e){e&&(this.eventManager=t.eventManager,this.instance=t,this.wot=t,this.settings=e,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=we(this.instance),this.cornerCenterPointOffset=-Math.ceil(parseInt(this.cornerDefaultStyle.width,10)/2),this.corner=null,this.cornerStyle=null,this.createBorders(e),this.registerListeners())}registerListeners(){const t=this.wot.rootDocument.body;this.eventManager.addEventListener(t,"mousedown",(()=>this.onMouseDown())),this.eventManager.addEventListener(t,"mouseup",(()=>this.onMouseUp()));for(let t=0,e=this.main.childNodes.length;t<e;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(t,e){if(!this.mouseDown||!this.wot.getSetting("hideBorderOnMouseDownOver"))return;t.preventDefault(),(0,a.CA)(t);const o=this,n=this.wot.rootDocument.body,i=e.getBoundingClientRect();e.style.display="none",this.eventManager.addEventListener(n,"mousemove",(function t(r){var s;((s=r).clientY<Math.floor(i.top)||s.clientY>Math.ceil(i.top+i.height)||s.clientX<Math.floor(i.left)||s.clientX>Math.ceil(i.left+i.width))&&(o.eventManager.removeEventListener(n,"mousemove",t),e.style.display="block")}))}createBorders(t){const{rootDocument:e}=this.wot;this.main=e.createElement("div");const o=["top","start","bottom","end","corner"];let n=this.main.style;n.position="absolute",n.top=0,n.left=0;for(let i=0;i<5;i++){const r=o[i],s=e.createElement("div");s.className=`wtBorder ${this.settings.className||""}`,this.settings[r]&&this.settings[r].hide&&(s.className+=" hidden"),n=s.style,n.backgroundColor=this.settings[r]&&this.settings[r].color?this.settings[r].color:t.border.color,n.height=this.settings[r]&&this.settings[r].width?`${this.settings[r].width}px`:`${t.border.width}px`,n.width=this.settings[r]&&this.settings[r].width?`${this.settings[r].width}px`:`${t.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}px`,this.cornerStyle.height=`${this.cornerDefaultStyle.height}px`,this.cornerStyle.border=[`${this.cornerDefaultStyle.borderWidth}px`,this.cornerDefaultStyle.borderStyle,this.cornerDefaultStyle.borderColor].join(" "),(0,s.rr)()&&this.instance.getSetting("isDataViewInstance")&&this.createMultipleSelectorHandles(),this.disappear();const{wtTable:i}=this.wot;let r=i.bordersHolder;r||(r=e.createElement("div"),r.className="htBorders",i.bordersHolder=r,i.spreader.appendChild(r)),r.appendChild(this.main)}createMultipleSelectorHandles(){const{rootDocument:t,stylesHandler:e}=this.wot,o=e.getCSSVariableValue("cell-mobile-handle-size"),n=e.getCSSVariableValue("cell-mobile-handle-border-radius"),i=e.getCSSVariableValue("cell-mobile-handle-background-color"),r=e.getCSSVariableValue("cell-mobile-handle-border-width"),s=e.getCSSVariableValue("cell-mobile-handle-border-color");this.selectionHandles={top:t.createElement("DIV"),topHitArea:t.createElement("DIV"),bottom:t.createElement("DIV"),bottomHitArea:t.createElement("DIV")},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 l={position:"absolute",height:"40px",width:"40px","border-radius":`${parseInt(40/1.5,10)}px`};(0,v.v4)(l,((t,e)=>{this.selectionHandles.styles.bottomHitArea[e]=t,this.selectionHandles.styles.topHitArea[e]=t}));const a=e.isClassicTheme()?{position:"absolute",height:"10px",width:"10px","border-radius":`${parseInt(10/1.5,10)}px`,background:"#F5F5FF",border:"1px solid #4285c8"}:{position:"absolute",height:`${o}px`,width:`${o}px`,"border-radius":`${n}px`,background:`${i}`,border:`${r}px solid ${s}`};(0,v.v4)(a,((t,e)=>{this.selectionHandles.styles.bottom[e]=t,this.selectionHandles.styles.top[e]=t})),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(t,e){const o=this.wot.selectionManager.getAreaSelection();return!(!o.cellRange||t===o.cellRange.to.row&&e===o.cellRange.to.col)}updateMultipleSelectionHandlesPosition(t,e,o,n,i,r){const s=this.wot.wtSettings.getSetting("rtlMode")?"right":"left",{top:l,topHitArea:a,bottom:h,bottomHitArea:c}=this.selectionHandles.styles,d=parseInt(l.borderWidth,10),u=parseInt(l.width,10),g=parseInt(a.width,10),f=this.wot.wtTable.getWidth(),p=this.wot.wtTable.getHeight();l.top=`${parseInt(o-u-1,10)}px`,l[s]=`${parseInt(n-u-1,10)}px`,a.top=`${parseInt(o-g/4*3,10)}px`,a[s]=`${parseInt(n-g/4*3,10)}px`;const m=Math.min(parseInt(n+i,10),f-u-2*d),w=Math.min(parseInt(n+i-g/4,10),f-g-2*d);h[s]=`${m}px`,c[s]=`${w}px`;const b=Math.min(parseInt(o+r,10),p-u-2*d),v=Math.min(parseInt(o+r-g/4,10),p-g-2*d);h.top=`${b}px`,c.top=`${v}px`,this.settings.border.cornerVisible&&this.settings.border.cornerVisible()?(l.display="block",a.display="block",this.isPartRange(t,e)?(h.display="none",c.display="none"):(h.display="block",c.display="block")):(l.display="none",h.display="none",a.display="none",c.display="none"),t===this.wot.wtSettings.getSetting("fixedRowsTop")||e===this.wot.wtSettings.getSetting("fixedColumnsStart")?(l.zIndex="9999",a.zIndex="9999"):(l.zIndex="",a.zIndex="")}appear(t){if(this.disabled)return;let[e,o,i,r]=t;if(e<0&&i<0||o<0&&r<0)return void this.disappear();const{wtTable:l,rootDocument:a,rootWindow:h}=this.wot,c=e!==i||o!==r,d=l.getFirstRenderedRow(),u=l.getLastRenderedRow(),g=l.getFirstRenderedColumn(),f=l.getLastRenderedColumn();if(g<0&&f<0||d<0&&u<0)return void this.disappear();let p;if(c){if(o=Math.max(o,g),r=Math.min(r,f),e=Math.max(e,d),i=Math.min(i,u),r<o||i<e)return void this.disappear();p=l.getCell(this.wot.createCellCoords(e,o))}else if(p=l.getCell(this.wot.createCellCoords(e,o)),!(0,n.sb)(p))return void this.disappear();const m=c?l.getCell(this.wot.createCellCoords(i,r)):p,w=(0,n.cY)(p),b=c?(0,n.cY)(m):w,v=(0,n.cY)(l.TABLE),y=w.top,C=w.left,S=this.wot.wtSettings.getSetting("rtlMode");let R=0,E=0;if(S){const t=(0,n.Gq)(l.TABLE),e=(0,n.Gq)(p),o=h.innerWidth-v.left-t;E=C+e-b.left,R=h.innerWidth-C-e-o-1}else E=b.left+(0,n.Gq)(m)-C,R=C-v.left-1;if(this.isEntireColumnSelected(e,i)){const t=e,n=this.getDimensionsFromHeader("columns",o,r,t,v);let i=null;n&&([i,R,E]=n),i&&(p=i)}let T=y-v.top-1,x=b.top+(0,n.DK)(m)-y;if(this.isEntireRowSelected(o,r)){const t=o,n=this.getDimensionsFromHeader("rows",e,i,t,v);let r=null;n&&([r,T,x]=n),r&&(p=r)}const M=h.getComputedStyle(p);parseInt(M.borderTopWidth,10)>0&&(T+=1,x=x>0?x-1:0),parseInt(M[S?"borderRightWidth":"borderLeftWidth"],10)>0&&(R+=1,E=E>0?E-1:0);const I=S?"right":"left";this.topStyle.top=`${T}px`,this.topStyle[I]=`${R}px`,this.topStyle.width=`${E}px`,this.topStyle.display="block",this.startStyle.top=`${T}px`,this.startStyle[I]=`${R}px`,this.startStyle.height=`${x}px`,this.startStyle.display="block";const H=Math.floor(this.settings.border.width/2);this.bottomStyle.top=T+x-H+"px",this.bottomStyle[I]=`${R}px`,this.bottomStyle.width=`${E}px`,this.bottomStyle.display="block",this.endStyle.top=`${T}px`,this.endStyle[I]=R+E-H+"px",this.endStyle.height=`${x+1}px`,this.endStyle.display="block";let O=this.settings.border.cornerVisible;O="function"==typeof O?O(this.settings.layerLevel):O;const A=this.wot.getSetting("onModifyGetCellCoords",i,r,!1,"render");let[k,_]=[i,r];if(A&&Array.isArray(A)&&([,,k,_]=A),(0,s.rr)()||!O||this.isPartRange(k,_))this.cornerStyle.display="none";else{this.cornerStyle.top=T+x+this.cornerCenterPointOffset-this.cornerDefaultStyle.borderWidth+"px",this.cornerStyle[I]=R+E+this.cornerCenterPointOffset-this.cornerDefaultStyle.borderWidth+"px",this.cornerStyle.borderRightWidth=`${this.cornerDefaultStyle.borderWidth}px`,this.cornerStyle.borderLeftWidth=`${this.cornerDefaultStyle.borderWidth}px`,this.cornerStyle.borderBottomWidth=`${this.cornerDefaultStyle.borderWidth}px`,this.cornerStyle.width=this.cornerDefaultStyle.width,this.cornerStyle.display="none";let t=(0,n.fX)(l.TABLE);const e=t===h;e&&(t=a.documentElement);const o=parseInt(this.cornerDefaultStyle.borderWidth,10)-1,s=Math.ceil(parseInt(this.cornerDefaultStyle.width,10)/2),c=Math.ceil(parseInt(this.cornerDefaultStyle.height,10)/2);if(r===this.wot.getSetting("totalColumns")-1){const i=e?m.getBoundingClientRect().left:m.offsetLeft;let r=!1,l=0;S?(l=i-parseInt(this.cornerDefaultStyle.width,10)/2,r=l<0):(l=i+(0,n.Gq)(m)+parseInt(this.cornerDefaultStyle.width,10)/2,r=l>=(0,n.xM)(t)),r&&(this.cornerStyle[I]=`${Math.floor(R+E+this.cornerCenterPointOffset-s-o)}px`,this.cornerStyle[S?"borderLeftWidth":"borderRightWidth"]=0)}if(i===this.wot.getSetting("totalRows")-1){const i=(e?m.getBoundingClientRect().top:m.offsetTop)+(0,n.DK)(m)+parseInt(this.cornerDefaultStyle.height,10)/2>=(0,n.eU)(t),r=this.wot.stylesHandler.isClassicTheme();if(i){const t=Math.floor(T+x+this.cornerCenterPointOffset-c-o);r?(this.cornerStyle.top=`${t}px`,this.cornerStyle.borderBottomWidth=0):this.cornerStyle.top=t-1+"px"}}this.cornerStyle.display="block"}(0,s.rr)()&&this.instance.getSetting("isDataViewInstance")&&this.updateMultipleSelectionHandlesPosition(i,r,T,R,E,x)}isEntireColumnSelected(t,e){return t===this.wot.wtTable.getFirstRenderedRow()&&e===this.wot.wtTable.getLastRenderedRow()}isEntireRowSelected(t,e){return t===this.wot.wtTable.getFirstRenderedColumn()&&e===this.wot.wtTable.getLastRenderedColumn()}getDimensionsFromHeader(t,e,o,i,r){const{wtTable:s}=this.wot,l=s.wtRootElement.parentNode;let a=null,h=null,c=null,d=null,u=null,g=null,f=null,p=null;switch(t){case"rows":a=function(){return s.getRowHeader(...arguments)},h=function(){return(0,n.DK)(...arguments)},c="ht__selection--rows",g="top";break;case"columns":a=function(){return s.getColumnHeader(...arguments)},h=function(){return(0,n.Gq)(...arguments)},c="ht__selection--columns",g="left"}if(l.classList.contains(c)){const t=this.wot.getSetting("columnHeaders").length;if(f=a(e,t-i),p=a(o,t-i),!f||!p)return!1;const s=(0,n.cY)(f),l=(0,n.cY)(p);return f&&p&&(d=s[g]-r[g]-1,u=l[g]+h(p)-s[g]),[f,d,u]}return!1}changeBorderStyle(t,e){const o=this[t].style,i=e[t];!i||i.hide?(0,n.iQ)(this[t],"hidden"):((0,n.nB)(this[t],"hidden")&&(0,n.vy)(this[t],"hidden"),o.backgroundColor=i.color,"top"!==t&&"bottom"!==t||(o.height=`${i.width}px`),"start"!==t&&"end"!==t||(o.width=`${i.width}px`))}changeBorderToDefaultStyle(t){const e=this[t].style;e.backgroundColor="#000",e.width="1px",e.height="1px"}toggleHiddenClass(t,e){this.changeBorderToDefaultStyle(t),e?(0,n.iQ)(this[t],"hidden"):(0,n.vy)(this[t],"hidden")}disappear(){this.topStyle.display="none",this.bottomStyle.display="none",this.startStyle.display="none",this.endStyle.display="none",this.cornerStyle.display="none",(0,s.rr)()&&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)}};function ko(t,e,o){_o(t,e),e.set(t,o)}function _o(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function No(t,e){return t.get(Lo(t,e))}function Po(t,e,o){return t.set(Lo(t,e),o),o}function Lo(t,e,o){if("function"==typeof t?t===e:t.has(e))return arguments.length<3?e:o;throw new TypeError("Private element is not present on this object")}var Do=new WeakMap,Vo=new WeakMap,Fo=new WeakMap,Bo=new WeakMap,Wo=new WeakMap,zo=new WeakMap,jo=new WeakSet;class Uo{constructor(t){var e;_o(this,e=jo),e.add(this),ko(this,Do,void 0),ko(this,Vo,void 0),ko(this,Fo,new Io),ko(this,Bo,new WeakMap),ko(this,Wo,new WeakSet),ko(this,zo,new Map),Po(Vo,this,t)}setActiveOverlay(t){return Po(Do,this,t),No(Fo,this).setActiveOverlay(No(Do,this)),No(Bo,this).has(No(Do,this))||No(Bo,this).set(No(Do,this),new Set),this}getFocusSelection(){return null!==No(Vo,this)?No(Vo,this).getFocus():null}getAreaSelection(){return null!==No(Vo,this)?No(Vo,this).createLayeredArea():null}getBorderInstance(t){if(!t.settings.border)return null;if(No(zo,this).has(t)){const e=No(zo,this).get(t);if(e.has(No(Do,this)))return e.get(No(Do,this));const o=new Ao(No(Do,this),t.settings);return e.set(No(Do,this),o),o}const e=new Ao(No(Do,this),t.settings);return No(zo,this).set(t,new Map([[No(Do,this),e]])),e}getBorderInstances(t){var e,o;return Array.from(null!==(e=null===(o=No(zo,this).get(t))||void 0===o?void 0:o.values())&&void 0!==e?e:[])}destroyBorders(t){No(zo,this).get(t).forEach((t=>t.destroy())),No(zo,this).delete(t)}render(t){if(null===No(Vo,this))return;t&&Lo(jo,this,$o).call(this);const e=Array.from(No(Vo,this)),o=new Map,i=new Map;for(let t=0;t<e.length;t++){const n=e[t],{className:r,headerAttributes:s,createLayers:l,selectionType:a}=n.settings;No(Wo,this).has(n)||(No(Wo,this).add(n),n.addLocalHook("destroy",(()=>this.destroyBorders(n))));const h=this.getBorderInstance(n);if(n.isEmpty()){null==h||h.disappear();continue}r&&No(Fo,this).setActiveSelection(n).scan().forEach((t=>{if(o.has(t)){const e=o.get(t);e.has(r)&&!0===l?e.set(r,e.get(r)+1):e.set(r,1)}else o.set(t,new Map([[r,1]]));s&&(i.has(t)||i.set(t,[]),"TH"===t.nodeName&&i.get(t).push(...s))}));const c=n.getCorners();No(Do,this).getSetting("onBeforeDrawBorders",c,a),null==h||h.appear(c)}o.forEach(((t,e)=>{var o;const i=Array.from(t).map((t=>{let[e,o]=t;return 1===o?e:[e,...Array.from({length:o-1},((t,o)=>`${e}-${o+1}`))]})).flat();i.forEach((t=>No(Bo,this).get(No(Do,this)).add(t))),(0,n.iQ)(e,i),"TD"===e.nodeName&&Array.isArray(null===(o=No(Vo,this).options)||void 0===o?void 0:o.cellAttributes)&&(0,n.Bq)(e,No(Vo,this).options.cellAttributes)})),Array.from(i.keys()).forEach((t=>{(0,n.Bq)(t,[...i.get(t)])}))}}function $o(){const t=No(Bo,this).get(No(Do,this)),e=No(Do,this).wtSettings.getSetting("onBeforeRemoveCellClassNames");if(Array.isArray(e))for(let o=0;o<e.length;o++)t.add(e[o]);t.forEach((t=>{var e,o;const i=No(Do,this).wtTable.TABLE.querySelectorAll(`.${t}`);let r=[];Array.isArray(null===(e=No(Vo,this).options)||void 0===e?void 0:e.cellAttributes)&&(r=No(Vo,this).options.cellAttributes.map((t=>t[0]))),Array.isArray(null===(o=No(Vo,this).options)||void 0===o?void 0:o.headerAttributes)&&(r=[...r,...No(Vo,this).options.headerAttributes.map((t=>t[0]))]);for(let e=0,o=i.length;e<o;e++)(0,n.vy)(i[e],t),(0,n.De)(i[e],r)})),t.clear()}function Go(t,e,o){Yo(t,e),e.set(t,o)}function Yo(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Xo(t,e){return t.get(Ko(t,e))}function qo(t,e,o){return t.set(Ko(t,e),o),o}function Ko(t,e,o){if("function"==typeof t?t===e:t.has(e))return arguments.length<3?e:o;throw new TypeError("Private element is not present on this object")}var Qo=new WeakMap,Jo=new WeakMap,Zo=new WeakMap,tn=new WeakMap,en=new WeakMap,on=new WeakMap,nn=new WeakMap,rn=new WeakSet;class sn{constructor(t){var e;Yo(this,e=rn),e.add(this),Go(this,Qo,void 0),Go(this,Jo,void 0),Go(this,Zo,void 0),Go(this,tn,void 0),Go(this,en,!0),Go(this,on,{}),Go(this,nn,{}),qo(Jo,this,t.rootTable.parentElement.parentElement),qo(tn,this,t.rootDocument)}isClassicTheme(){return Xo(en,this)}getCSSVariableValue(t){var e;if(Xo(en,this))return null;if(Xo(on,this)[`--ht-${t}`])return Xo(on,this)[`--ht-${t}`];const o=null!==(e=Ko(rn,this,dn).call(this,`--ht-${t}`))&&void 0!==e?e:Ko(rn,this,un).call(this,`--ht-${t}`);return null!==o?(Xo(on,this)[`--ht-${t}`]=o,o):void 0}getStyleForTD(t){var e;return null===(e=Xo(nn,this))||void 0===e?void 0:e.td[t]}getDefaultRowHeight(){if(Xo(en,this))return 23;const t=Ko(rn,this,ln).call(this);return!t&&(0,n.nB)(Xo(Jo,this),"ht-wrapper")?((0,y.R8)(`The "${Xo(Qo,this)}" theme is enabled, but its stylesheets are missing or not imported correctly. Import the correct CSS files in order to use that theme.`),qo(en,this,!0),this.useTheme(),23):t}areCellsBorderBox(){return"border-box"===this.getStyleForTD("box-sizing")}useTheme(t){if(!t)return Ko(rn,this,hn).call(this),qo(en,this,!0),void qo(Qo,this,t||void 0);t&&t!==Xo(Qo,this)&&(Xo(Qo,this)&&Ko(rn,this,gn).call(this),qo(Qo,this,t),qo(en,this,!1),Ko(rn,this,an).call(this),Ko(rn,this,hn).call(this))}getThemeName(){return Xo(Qo,this)}removeClassNames(){(0,n.nB)(Xo(Jo,this),Xo(Qo,this))&&(0,n.vy)(Xo(Jo,this),Xo(Qo,this))}}function ln(){const t=this.getCSSVariableValue("line-height"),e=this.getCSSVariableValue("cell-vertical-padding"),o=Math.ceil(parseFloat(this.getStyleForTD("border-bottom-width")));return null===t||null===e||isNaN(o)?null:t+2*e+o}function an(){(0,n.vy)(Xo(Jo,this),/ht-theme-.*/g),(0,n.iQ)(Xo(Jo,this),Xo(Qo,this))}function hn(){this.isClassicTheme()||qo(Zo,this,getComputedStyle(Xo(Jo,this)));const t=Ko(rn,this,cn).call(this,["box-sizing","border-bottom-width"]);Xo(nn,this).td={...Xo(nn,this).td,"box-sizing":t["box-sizing"],"border-bottom-width":t["border-bottom-width"]}}function cn(t){const e=Xo(tn,this),o=Xo(Jo,this),n=e.createElement("table"),i=e.createElement("tbody"),r=e.createElement("tr"),s=e.createElement("tr"),l=e.createElement("td");s.appendChild(l),i.appendChild(r),i.appendChild(s),n.appendChild(i),o.appendChild(n);const a=getComputedStyle(l),h={};return t.forEach((t=>{h[t]=a.getPropertyValue(t)})),o.removeChild(n),h}function dn(t){const e=Math.ceil(parseFloat(Ko(rn,this,un).call(this,t)));return Number.isNaN(e)?null:e}function un(t){const e=Xo(Zo,this).getPropertyValue(t);return""===e?null:e}function gn(){qo(nn,this,{}),qo(on,this,{}),qo(en,this,!0)}class fn extends ge{constructor(t,e){super(t,new qe(e)),this.stylesHandler=new sn(this.domBindings);const o=this.wtSettings.getSetting("facade",this);this.wtTable=new Qe(this.getTableDao(),o,this.domBindings,this.wtSettings),this.wtViewport=new vo(this.getViewportDao(),this.domBindings,this.wtSettings,this.eventManager,this.wtTable),this.selectionManager=new Uo(this.wtSettings.getSetting("selections")),this.wtEvent=new st(o,this.domBindings,this.wtSettings,this.eventManager,this.wtTable,this.selectionManager),this.wtOverlays=new Ye(this,o,this.domBindings,this.wtSettings,this.eventManager,this.wtTable),this.exportSettingsAsClassNames(),this.findOriginalHeaders()}exportSettingsAsClassNames(){const t=[],e=[];(0,v.v4)({rowHeaders:"htRowHeaders",columnHeaders:"htColumnHeaders"},((o,n)=>{this.wtSettings.getSetting(n).length&&e.push(o),t.push(o)})),(0,n.vy)(this.wtTable.wtRootElement.parentNode,t),(0,n.iQ)(this.wtTable.wtRootElement.parentNode,e)}getOverlayByName(t){var e;if(!qt.includes(t))return null;const o=t.replace(/_([a-z])/g,(t=>t[1].toUpperCase()));return null!==(e=this.wtOverlays[`${o}Overlay`])&&void 0!==e?e:null}getViewportDao(){const t=this;return{get wot(){return t},get topOverlayTrimmingContainer(){return t.wtOverlays.topOverlay.trimmingContainer},get inlineStartOverlayTrimmingContainer(){return t.wtOverlays.inlineStartOverlay.trimmingContainer},get topScrollPosition(){return t.wtOverlays.topOverlay.getScrollPosition()},get topParentOffset(){return t.wtOverlays.topOverlay.getTableParentOffset()},get inlineStartScrollPosition(){return t.wtOverlays.inlineStartOverlay.getScrollPosition()},get inlineStartParentOffset(){return t.wtOverlays.inlineStartOverlay.getTableParentOffset()},get topOverlay(){return t.wtOverlays.topOverlay},get inlineStartOverlay(){return t.wtOverlays.inlineStartOverlay},get bottomOverlay(){return t.wtOverlays.bottomOverlay}}}}class pn{constructor(t){t instanceof ge?this._wot=t:this._initFromSettings(t)}_initFromSettings(t){t.facade=t=>{const e=new pn(t);return()=>e},this._wot=new fn(t.table,t)}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(t){this._wot.drawn=t}get activeOverlayName(){return this._wot.activeOverlayName}get drawInterrupted(){return this._wot.drawInterrupted}set drawInterrupted(t){this._wot.drawInterrupted=t}get lastMouseOver(){return this._wot.lastMouseOver}set lastMouseOver(t){this._wot.lastMouseOver=t}get momentumScrolling(){return this._wot.momentumScrolling}set momentumScrolling(t){this._wot.momentumScrolling=t}get touchApplied(){return this._wot.touchApplied}set touchApplied(t){this._wot.touchApplied=t}get domBindings(){return this._wot.domBindings}get eventListeners(){return this._wot.eventListeners}set eventListeners(t){this._wot.eventListeners=t}get eventManager(){return this._wot.eventManager}get stylesHandler(){return this._wot.stylesHandler}createCellCoords(t,e){return this._wot.createCellCoords(t,e)}createCellRange(t,e,o){return this._wot.createCellRange(t,e,o)}draw(){let t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return this._wot.draw(t),this}getCell(t){let e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return this._wot.getCell(t,e)}scrollViewport(t,e,o){return this._wot.scrollViewport(t,e,o)}scrollViewportHorizontally(t,e){return this._wot.scrollViewportHorizontally(t,e)}scrollViewportVertically(t,e){return this._wot.scrollViewportVertically(t,e)}getViewport(){return this._wot.getViewport()}getOverlayName(){return this._wot.cloneOverlay?this._wot.cloneOverlay.type:"master"}getOverlayByName(t){return this._wot.getOverlayByName(t)}exportSettingsAsClassNames(){return this._wot.exportSettingsAsClassNames()}update(t,e){return this._wot.wtSettings.update(t,e),this}getSetting(t,e,o,n,i){return this._wot.wtSettings.getSetting(t,e,o,n,i)}hasSetting(t){return this._wot.wtSettings.hasSetting(t)}destroy(){this._wot.destroy()}}function mn(t){let{isShiftKey:e,isLeftClick:o,isRightClick:n,coords:i,selection:r,controller:s,cellCoordsFactory:l}=t;const a=r.isSelected()?r.getSelectedRange().current():null,h=r.isSelectedByCorner(),c=r.isSelectedByRowHeader();if(r.markSource("mouse"),e&&a)i.row>=0&&i.col>=0&&!s.cell?r.setRangeEnd(i):(h||c)&&i.row>=0&&i.col>=0&&!s.cell?r.setRangeEnd(l(i.row,i.col)):h&&i.row<0&&!s.column?r.setRangeEnd(l(a.to.row,i.col)):c&&i.col<0&&!s.row?r.setRangeEnd(l(i.row,a.to.col)):(!h&&!c&&i.col<0||h&&i.col<0)&&!s.row?r.selectRows(Math.max(a.from.row,0),i.row,i.col):(!h&&!c&&i.row<0||c&&i.row<0)&&!s.column&&r.selectColumns(Math.max(a.from.col,0),i.col,i.row);else{const t=!r.inInSelection(i),e=o||n&&t;i.row<0&&i.col>=0&&!s.column?e&&r.selectColumns(i.col,i.col,i.row):i.col<0&&i.row>=0&&!s.row?e&&r.selectRows(i.row,i.row,i.col):i.col>=0&&i.row>=0&&!s.cell?e&&r.setRangeStart(i):i.col<0&&i.row<0&&r.selectAll(!0,!0,{disableHeadersHighlight:!0,focusPosition:{row:0,col:0}})}r.markEndSource()}const wn=new Map([["mousedown",mn],["mouseover",function(t){let{isLeftClick:e,coords:o,selection:n,controller:i,cellCoordsFactory:r}=t;if(!e)return;const s=n.isSelectedByRowHeader(),l=n.isSelectedByColumnHeader(),a=n.tableProps.countCols(),h=n.tableProps.countRows();n.markSource("mouse"),l&&!i.column?n.setRangeEnd(r(h-1,o.col)):s&&!i.row?n.setRangeEnd(r(o.row,a-1)):i.cell||n.setRangeEnd(o),n.markEndSource()}],["touchstart",mn]]);function bn(t,e){let{coords:o,selection:n,controller:i,cellCoordsFactory:r}=e;wn.get(t.type)({coords:o,selection:n,controller:i,cellCoordsFactory:r,isShiftKey:t.shiftKey,isLeftClick:(0,a.Ml)(t)||"touchstart"===t.type,isRightClick:(0,a.nO)(t)})}const vn=new WeakMap,yn=Symbol("rootInstance");function Cn(t){return t===yn}function Sn(t){return vn.has(t)}function Rn(t,e,o){En(t,e),e.set(t,o)}function En(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Tn(t,e,o){return(e=function(t){var e=function(t){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var o=e.call(t,"string");if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[e]=o,t}function xn(t,e){return t.get(In(t,e))}function Mn(t,e,o){return t.set(In(t,e),o),o}function In(t,e,o){if("function"==typeof t?t===e:t.has(e))return arguments.length<3?e:o;throw new TypeError("Private element is not present on this object")}var Hn=new WeakMap,On=new WeakMap,An=new WeakMap,kn=new WeakMap,_n=new WeakMap,Nn=new WeakMap,Pn=new WeakMap,Ln=new WeakMap,Dn=new WeakSet;function Vn(){return parseInt(this.hot.rootElement.getAttribute((0,Et.Nb)()[0]),10)}function Fn(t){const e=In(Dn,this,Vn).call(this)+t;(0,n.Bq)(this.hot.rootElement,...(0,Et.Nb)(e))}function Bn(){const t=this.hot.rootElement;this.hasVerticalScroll()?(0,n.iQ)(t,"htHasScrollY"):(0,n.vy)(t,"htHasScrollY"),this.hasHorizontalScroll()?(0,n.iQ)(t,"htHasScrollX"):(0,n.vy)(t,"htHasScrollX")}const Wn=class{constructor(t){var e;En(this,e=Dn),e.add(this),Tn(this,"hot",void 0),Tn(this,"eventManager",void 0),Tn(this,"settings",void 0),Tn(this,"THEAD",void 0),Tn(this,"TBODY",void 0),Tn(this,"_wt",void 0),Tn(this,"activeWt",void 0),Rn(this,Hn,0),Rn(this,On,0),Tn(this,"postponedAdjustElementsSize",!1),Rn(this,An,!1),Rn(this,kn,void 0),Rn(this,_n,void 0),Rn(this,Nn,0),Rn(this,Pn,0),Rn(this,Ln,null),this.hot=t,this.eventManager=new c.A(this.hot),this.settings=this.hot.getSettings(),this.createElements(),this.registerEvents(),this.initializeWalkontable()}render(){if(!this.hot.isRenderSuspended()){const t=this.hot.forceFullRender;this.hot.runHooks("beforeRender",t),this.postponedAdjustElementsSize&&(this.postponedAdjustElementsSize=!1,this.adjustElementsSize()),this._wt.draw(!t),In(Dn,this,Bn).call(this),this.hot.runHooks("afterRender",t),this.hot.forceFullRender=!1}}adjustElementsSize(){this.hot.isRenderSuspended()?this.postponedAdjustElementsSize=!0:this._wt.wtOverlays.adjustElementsSize()}getCellAtCoords(t,e){const o=this._wt.getCell(t,e);return o<0?null:o}scrollViewport(t,e,o){return this._wt.scrollViewport(t,e,o)}scrollViewportHorizontally(t,e){return this._wt.scrollViewportHorizontally(t,e)}scrollViewportVertically(t,e){return this._wt.scrollViewportVertically(t,e)}createElements(){const{rootElement:t,rootDocument:e}=this.hot,o=t.getAttribute("style");o&&t.setAttribute("data-originalstyle",o),(0,n.iQ)(t,"handsontable"),Mn(_n,this,e.createElement("TABLE")),(0,n.iQ)(xn(_n,this),"htCore"),this.hot.getSettings().tableClassName&&(0,n.iQ)(xn(_n,this),this.hot.getSettings().tableClassName),this.settings.ariaTags&&((0,n.Bq)(xn(_n,this),[(0,Et.gg)()]),(0,n.Bq)(t,[(0,Et.ax)(),(0,Et.DZ)(-1),(0,Et.Nb)(this.hot.countCols()),(0,Et.L4)()])),this.THEAD=e.createElement("THEAD"),xn(_n,this).appendChild(this.THEAD),this.TBODY=e.createElement("TBODY"),xn(_n,this).appendChild(this.TBODY),this.hot.table=xn(_n,this),this.hot.container.insertBefore(xn(_n,this),this.hot.container.firstChild)}registerEvents(){const{rootElement:t,rootDocument:e,selection:o,rootWindow:i}=this.hot,r=e.documentElement;this.eventManager.addEventListener(t,"mousedown",(t=>{Mn(An,this,!0),this.isTextSelectionAllowed(t.target)||((0,n.LL)(i),t.preventDefault(),i.focus())})),this.eventManager.addEventListener(t,"mouseup",(()=>{Mn(An,this,!1)})),this.eventManager.addEventListener(t,"mousemove",(t=>{xn(An,this)&&!this.isTextSelectionAllowed(t.target)&&(this.settings.fragmentSelection&&(0,n.LL)(i),t.preventDefault())})),this.eventManager.addEventListener(r,"keyup",(t=>{o.isInProgress()&&!t.shiftKey&&o.finish()})),this.eventManager.addEventListener(r,"mouseup",(i=>{o.isInProgress()&&(0,a.Ml)(i)&&o.finish(),Mn(kn,this,!1);const r=(0,n.E3)(e.activeElement);(0,n.Xy)(e.activeElement)&&!r||!r&&(o.isSelected()||o.isSelectedByAnyHeader()||t.contains(i.target)||(0,a.nO)(i))||this.hot.unlisten()})),this.eventManager.addEventListener(r,"contextmenu",(t=>{o.isInProgress()&&(0,a.nO)(t)&&(o.finish(),Mn(kn,this,!1))})),this.eventManager.addEventListener(r,"touchend",(()=>{o.isInProgress()&&o.finish(),Mn(kn,this,!1)})),this.eventManager.addEventListener(r,"mousedown",(o=>{const i=o.target,s=o.x||o.clientX,l=o.y||o.clientY;let a=o.target;if(xn(kn,this)||!t||!this.hot.view)return;const{holder:h}=this._wt.wtTable;if(a===h){const t=(0,n.XJ)(e);if(e.elementFromPoint(s+t,l)!==h||e.elementFromPoint(s,l+t)!==h)return}else for(;a!==r;){if(null===a){if(o.isTargetWebComponent)break;return}if(a===t)return;a=a.parentNode}("function"==typeof this.settings.outsideClickDeselects?this.settings.outsideClickDeselects(i):this.settings.outsideClickDeselects)?this.hot.deselectCell():this.hot.destroyEditor(!1,!1)}));let s=(0,n.Ly)(i);for(;null!==s;)this.eventManager.addEventListener(s.document.documentElement,"click",(()=>{this.hot.unlisten()})),s=(0,n.Ly)(s);this.eventManager.addEventListener(xn(_n,this),"selectstart",(t=>{this.settings.fragmentSelection||(0,n.Xy)(t.target)||t.preventDefault()}))}translateFromRenderableToVisualCoords(t){let{row:e,col:o}=t;return this.hot._createCellCoords(...this.translateFromRenderableToVisualIndex(e,o))}translateFromRenderableToVisualIndex(t,e){let o=t>=0?this.hot.rowIndexMapper.getVisualFromRenderableIndex(t):t,n=e>=0?this.hot.columnIndexMapper.getVisualFromRenderableIndex(e):e;return null===o&&(o=t),null===n&&(n=e),[o,n]}countRenderableIndexes(t,e){const o=Math.min(t.getNotTrimmedIndexesLength(),e),n=t.getNearestNotHiddenIndex(o-1,-1);return null===n?0:t.getRenderableFromVisualIndex(n)+1}countRenderableColumns(){return this.countRenderableIndexes(this.hot.columnIndexMapper,this.settings.maxCols)}countRenderableRows(){return this.countRenderableIndexes(this.hot.rowIndexMapper,this.settings.maxRows)}countNotHiddenRowIndexes(t,e){return this.countNotHiddenIndexes(t,e,this.hot.rowIndexMapper,this.countRenderableRows())}countNotHiddenColumnIndexes(t,e){return this.countNotHiddenIndexes(t,e,this.hot.columnIndexMapper,this.countRenderableColumns())}countNotHiddenIndexes(t,e,o,n){if(isNaN(t)||t<0)return 0;const i=o.getNearestNotHiddenIndex(t,e),r=o.getRenderableFromVisualIndex(i);if(!Number.isInteger(r))return 0;let s=0;return e<0?s=r+1:e>0&&(s=n-r),s}countNotHiddenFixedColumnsStart(){const t=this.hot.countCols(),e=Math.min(parseInt(this.settings.fixedColumnsStart,10),t)-1;return this.countNotHiddenColumnIndexes(e,-1)}countNotHiddenFixedRowsTop(){const t=this.hot.countRows(),e=Math.min(parseInt(this.settings.fixedRowsTop,10),t)-1;return this.countNotHiddenRowIndexes(e,-1)}countNotHiddenFixedRowsBottom(){const t=this.hot.countRows(),e=Math.max(t-parseInt(this.settings.fixedRowsBottom,10),0);return this.countNotHiddenRowIndexes(e,1)}countRenderableColumnsInRange(t,e){let o=0;for(let n=t;n<=e;n++)null!==this.hot.columnIndexMapper.getRenderableFromVisualIndex(n)&&(o+=1);return o}countRenderableRowsInRange(t,e){let o=0;for(let n=t;n<=e;n++)null!==this.hot.rowIndexMapper.getRenderableFromVisualIndex(n)&&(o+=1);return o}getStylesHandler(){return this._wt.stylesHandler}getDefaultRowHeight(){return this._wt.stylesHandler.getDefaultRowHeight()}addClassNameToLicenseElement(t){var e;const o=null===(e=this.hot.rootElement.parentNode)||void 0===e?void 0:e.querySelector(".hot-display-license-info");o&&(0,n.iQ)(o,t)}removeClassNameFromLicenseElement(t){var e;const o=null===(e=this.hot.rootElement.parentNode)||void 0===e?void 0:e.querySelector(".hot-display-license-info");o&&(0,n.vy)(o,t)}isMainTableNotFullyCoveredByOverlays(){const t=this.countNotHiddenFixedRowsTop()+this.countNotHiddenFixedRowsBottom(),e=this.countNotHiddenFixedColumnsStart();return this.hot.countRenderedRows()>t&&this.hot.countRenderedCols()>e}initializeWalkontable(){const t={ariaTags:this.settings.ariaTags,rtlMode:this.hot.isRtl(),externalRowCalculator:this.hot.getPlugin("autoRowSize")&&this.hot.getPlugin("autoRowSize").isEnabled(),table:xn(_n,this),isDataViewInstance:()=>Sn(this.hot),preventOverflow:()=>this.settings.preventOverflow,preventWheel:()=>this.settings.preventWheel,viewportColumnRenderingThreshold:()=>this.settings.viewportColumnRenderingThreshold,viewportRowRenderingThreshold:()=>this.settings.viewportRowRenderingThreshold,data:(t,e)=>this.hot.getDataAtCell(...this.translateFromRenderableToVisualIndex(t,e)),totalRows:()=>this.countRenderableRows(),totalColumns:()=>this.countRenderableColumns(),fixedColumnsStart:()=>this.countNotHiddenFixedColumnsStart(),fixedRowsTop:()=>this.countNotHiddenFixedRowsTop(),fixedRowsBottom:()=>this.countNotHiddenFixedRowsBottom(),shouldRenderInlineStartOverlay:()=>this.settings.fixedColumnsStart>0||t.rowHeaders().length>0,shouldRenderTopOverlay:()=>this.settings.fixedRowsTop>0||t.columnHeaders().length>0,shouldRenderBottomOverlay:()=>this.settings.fixedRowsBottom>0,minSpareRows:()=>this.settings.minSpareRows,renderAllRows:this.settings.renderAllRows,renderAllColumns:this.settings.renderAllColumns,rowHeaders:()=>{const t=[];return this.hot.hasRowHeaders()&&t.push(((t,e)=>{const o=t>=0?this.hot.rowIndexMapper.getVisualFromRenderableIndex(t):t;this.appendRowHeader(o,e)})),this.hot.runHooks("afterGetRowHeaderRenderers",t),Mn(On,this,t.length),this.hot.getSettings().ariaTags&&In(Dn,this,Vn).call(this)===this.hot.countCols()&&In(Dn,this,Fn).call(this,xn(On,this)),t},columnHeaders:()=>{const t=[];return this.hot.hasColHeaders()&&t.push(((t,e)=>{const o=t>=0?this.hot.columnIndexMapper.getVisualFromRenderableIndex(t):t;this.appendColHeader(o,e)})),this.hot.runHooks("afterGetColumnHeaderRenderers",t),Mn(Hn,this,t.length),t},columnWidth:t=>{const e=this.hot.columnIndexMapper.getVisualFromRenderableIndex(t);return this.hot.getColWidth(null===e?t:e)},rowHeight:t=>{const e=this.hot.rowIndexMapper.getVisualFromRenderableIndex(t);return this.hot.getRowHeight(null===e?t:e)},rowHeightByOverlayName:(t,e)=>{const o=this.hot.rowIndexMapper.getVisualFromRenderableIndex(t),n=null===o?t:o;return this.hot.runHooks("modifyRowHeightByOverlayName",this.hot.getRowHeight(n),n,e)},cellRenderer:(t,e,o)=>{const[n,i]=this.translateFromRenderableToVisualIndex(t,e),r=this.hot.runHooks("modifyGetCellCoords",n,i,!1,"meta");let s=n,l=i;Array.isArray(r)&&([s,l]=r);const a=this.hot.getCellMeta(s,l),h=this.hot.colToProp(l);let c=this.hot.getDataAtRowProp(s,h);this.hot.hasHook("beforeValueRender")&&(c=this.hot.runHooks("beforeValueRender",c,a)),this.hot.runHooks("beforeRenderer",o,n,i,h,c,a),this.hot.getCellRenderer(a)(this.hot,o,n,i,h,c,a),this.hot.runHooks("afterRenderer",o,n,i,h,c,a)},selections:this.hot.selection.highlight,hideBorderOnMouseDownOver:()=>this.settings.fragmentSelection,onWindowResize:()=>{this.hot&&!this.hot.isDestroyed&&this.hot.refreshDimensions()},onContainerElementResize:()=>{this.hot&&!this.hot.isDestroyed&&(0,n.zN)(this.hot.rootElement)&&this.hot.refreshDimensions()},onCellMouseDown:(t,e,o,n)=>{const i=this.translateFromRenderableToVisualCoords(e),r={row:!1,column:!1,cell:!1};this.hot.listen(),this.activeWt=n,Mn(kn,this,!0),Mn(Ln,this,{x:t.clientX,y:t.clientY}),this.hot.runHooks("beforeOnCellMouseDown",t,i,o,r),(0,a.d)(t)||(bn(t,{coords:i,selection:this.hot.selection,controller:r,cellCoordsFactory:(t,e)=>this.hot._createCellCoords(t,e)}),this.hot.runHooks("afterOnCellMouseDown",t,i,o),this.activeWt=this._wt)},onCellContextMenu:(t,e,o,n)=>{const i=this.translateFromRenderableToVisualCoords(e);this.activeWt=n,Mn(kn,this,!1),this.hot.selection.isInProgress()&&this.hot.selection.finish(),this.hot.runHooks("beforeOnCellContextMenu",t,i,o),(0,a.d)(t)||(this.hot.runHooks("afterOnCellContextMenu",t,i,o),this.activeWt=this._wt)},onCellMouseOut:(t,e,o,n)=>{const i=this.translateFromRenderableToVisualCoords(e);this.activeWt=n,this.hot.runHooks("beforeOnCellMouseOut",t,i,o),(0,a.d)(t)||(this.hot.runHooks("afterOnCellMouseOut",t,i,o),this.activeWt=this._wt)},onCellMouseOver:(t,e,o,n)=>{const i=this.translateFromRenderableToVisualCoords(e),r={row:!1,column:!1,cell:!1};this.activeWt=n,this.hot.runHooks("beforeOnCellMouseOver",t,i,o,r),(0,a.d)(t)||(!xn(kn,this)||xn(Ln,this)&&xn(Ln,this).x===t.clientX&&xn(Ln,this).y===t.clientY||bn(t,{coords:i,selection:this.hot.selection,controller:r,cellCoordsFactory:(t,e)=>this.hot._createCellCoords(t,e)}),this.hot.runHooks("afterOnCellMouseOver",t,i,o),this.activeWt=this._wt,Mn(Ln,this,null))},onCellMouseUp:(t,e,o,n)=>{const i=this.translateFromRenderableToVisualCoords(e);this.activeWt=n,this.hot.runHooks("beforeOnCellMouseUp",t,i,o),(0,a.d)(t)||this.hot.isDestroyed||(this.hot.runHooks("afterOnCellMouseUp",t,i,o),this.activeWt=this._wt)},onCellCornerMouseDown:t=>{t.preventDefault(),this.hot.runHooks("afterOnCellCornerMouseDown",t)},onCellCornerDblClick:t=>{t.preventDefault(),this.hot.runHooks("afterOnCellCornerDblClick",t)},beforeDraw:(t,e)=>this.beforeRender(t,e),onDraw:t=>this.afterRender(t),onBeforeViewportScrollVertically:(t,e)=>{const o=this.hot.rowIndexMapper,n=t<0;let i=t;return n||(i=o.getVisualFromRenderableIndex(t),null!==i)?(i=this.hot.runHooks("beforeViewportScrollVertically",i,e),this.hot.runHooks("beforeViewportScroll"),n?i:o.getRenderableFromVisualIndex(i)):t},onBeforeViewportScrollHorizontally:(t,e)=>{const o=this.hot.columnIndexMapper,n=t<0;let i=t;return n||(i=o.getVisualFromRenderableIndex(t),null!==i)?(i=this.hot.runHooks("beforeViewportScrollHorizontally",i,e),this.hot.runHooks("beforeViewportScroll"),n?i:o.getRenderableFromVisualIndex(i)):t},onScrollVertically:()=>{this.hot.runHooks("afterScrollVertically"),this.hot.runHooks("afterScroll")},onScrollHorizontally:()=>{this.hot.runHooks("afterScrollHorizontally"),this.hot.runHooks("afterScroll")},onBeforeRemoveCellClassNames:()=>this.hot.runHooks("beforeRemoveCellClassNames"),onBeforeHighlightingRowHeader:(t,e,o)=>{const n=this.hot.rowIndexMapper,i=t<0;let r=t;i||(r=n.getVisualFromRenderableIndex(t));const s=this.hot.runHooks("beforeHighlightingRowHeader",r,e,o);return i?s:n.getRenderableFromVisualIndex(n.getNearestNotHiddenIndex(s,1))},onBeforeHighlightingColumnHeader:(t,e,o)=>{const n=this.hot.columnIndexMapper,i=t<0;let r=t;i||(r=n.getVisualFromRenderableIndex(t));const s=this.hot.runHooks("beforeHighlightingColumnHeader",r,e,o);return i?s:n.getRenderableFromVisualIndex(n.getNearestNotHiddenIndex(s,1))},onAfterDrawSelection:(t,e,o)=>{let n;const[i,r]=this.translateFromRenderableToVisualIndex(t,e),s=this.hot.selection.getSelectedRange();if(s.size()>0){const t=s.peekByIndex(null!=o?o:0);n=[t.from.row,t.from.col,t.to.row,t.to.col]}return this.hot.runHooks("afterDrawSelection",i,r,n,o)},onBeforeDrawBorders:(t,e)=>{const[o,n,i,r]=t,s=[this.hot.rowIndexMapper.getVisualFromRenderableIndex(o),this.hot.columnIndexMapper.getVisualFromRenderableIndex(n),this.hot.rowIndexMapper.getVisualFromRenderableIndex(i),this.hot.columnIndexMapper.getVisualFromRenderableIndex(r)];return this.hot.runHooks("beforeDrawBorders",s,e)},onBeforeTouchScroll:()=>this.hot.runHooks("beforeTouchScroll"),onAfterMomentumScroll:()=>this.hot.runHooks("afterMomentumScroll"),onModifyRowHeaderWidth:t=>this.hot.runHooks("modifyRowHeaderWidth",t),onModifyGetCellCoords:(t,e,o,n)=>{const i=this.hot.rowIndexMapper,r=this.hot.columnIndexMapper,s=e>=0?r.getVisualFromRenderableIndex(e):e,l=t>=0?i.getVisualFromRenderableIndex(t):t,a=this.hot.runHooks("modifyGetCellCoords",l,s,o,n);if(Array.isArray(a)){const[t,e,o,n]=a;return[t>=0?i.getRenderableFromVisualIndex(i.getNearestNotHiddenIndex(t,1)):t,e>=0?r.getRenderableFromVisualIndex(r.getNearestNotHiddenIndex(e,1)):e,o>=0?i.getRenderableFromVisualIndex(i.getNearestNotHiddenIndex(o,-1)):o,n>=0?r.getRenderableFromVisualIndex(r.getNearestNotHiddenIndex(n,-1)):n]}},onModifyGetCoordsElement:(t,e)=>{const o=this.hot.rowIndexMapper,n=this.hot.columnIndexMapper,i=e>=0?n.getVisualFromRenderableIndex(e):e,r=t>=0?o.getVisualFromRenderableIndex(t):t,s=this.hot.runHooks("modifyGetCoordsElement",r,i);if(Array.isArray(s)){const[t,e]=s;return[t>=0?o.getRenderableFromVisualIndex(o.getNearestNotHiddenIndex(t,1)):t,e>=0?n.getRenderableFromVisualIndex(n.getNearestNotHiddenIndex(e,1)):e]}},viewportRowCalculatorOverride:t=>{let e=this.settings.viewportRowRenderingOffset;if("auto"===e&&this.settings.fixedRowsTop&&(e=10),e>0||"auto"===e){const o=this.countRenderableRows(),n=t.startRow,i=t.endRow;if("number"==typeof e)t.startRow=Math.max(n-e,0),t.endRow=Math.min(i+e,o-1);else if("auto"===e){const e=Math.max(1,Math.ceil(i/o*12));t.startRow=Math.max(n-e,0),t.endRow=Math.min(i+e,o-1)}}this.hot.runHooks("afterViewportRowCalculatorOverride",t)},viewportColumnCalculatorOverride:t=>{let e=this.settings.viewportColumnRenderingOffset;if("auto"===e&&this.settings.fixedColumnsStart&&(e=10),e>0||"auto"===e){const o=this.countRenderableColumns(),n=t.startColumn,i=t.endColumn;if("number"==typeof e&&(t.startColumn=Math.max(n-e,0),t.endColumn=Math.min(i+e,o-1)),"auto"===e){const e=Math.max(1,Math.ceil(i/o*6));t.startColumn=Math.max(n-e,0),t.endColumn=Math.min(i+e,o-1)}}this.hot.runHooks("afterViewportColumnCalculatorOverride",t)},rowHeaderWidth:()=>this.settings.rowHeaderWidth,columnHeaderHeight:()=>{const t=this.hot.runHooks("modifyColumnHeaderHeight");return this.settings.columnHeaderHeight||t}};this.hot.runHooks("beforeInitWalkontable",t),this._wt=new pn(t),this.activeWt=this._wt;const e=this._wt.wtTable.spreader,{width:o,height:i}=this.hot.rootElement.getBoundingClientRect();this.setLastSize(o,i),this.eventManager.addEventListener(e,"mousedown",(t=>{t.target===e&&3===t.which&&t.stopPropagation()})),this.eventManager.addEventListener(e,"contextmenu",(t=>{t.target===e&&3===t.which&&t.stopPropagation()})),this.eventManager.addEventListener(this.hot.rootDocument.documentElement,"click",(()=>{this.settings.observeDOMVisibility&&this._wt.drawInterrupted&&this.hot.render()}))}isTextSelectionAllowed(t){if((0,n.Xy)(t))return!0;const e=(0,n.aO)(t,this._wt.wtTable.spreader);return!(!0!==this.settings.fragmentSelection||!e)||!("cell"!==this.settings.fragmentSelection||!this.isSelectedOnlyCell()||!e)||!(this.settings.fragmentSelection||!this.isCellEdited()||!this.isSelectedOnlyCell())}isMouseDown(){return xn(kn,this)}isSelectedOnlyCell(){var t,e;return null!==(t=null===(e=this.hot.getSelectedRangeLast())||void 0===e?void 0:e.isSingleCell())&&void 0!==t&&t}isCellEdited(){const t=this.hot.getActiveEditor();return t&&t.isOpened()}beforeRender(t,e){t&&this.hot.runHooks("beforeViewRender",this.hot.forceFullRender,e)}afterRender(t){t&&this.hot.runHooks("afterViewRender",this.hot.forceFullRender)}appendRowHeader(t,e){if(e.firstChild){const o=e.firstChild;if(!(0,n.nB)(o,"relative"))return(0,n.Ie)(e),void this.appendRowHeader(t,e);this.updateCellHeader(o.querySelector(".rowHeader"),t,this.hot.getRowHeader)}else{const{rootDocument:o,getRowHeader:n}=this.hot,i=o.createElement("div"),r=o.createElement("span");i.className="relative",r.className="rowHeader",this.updateCellHeader(r,t,n),i.appendChild(r),e.appendChild(i)}this.hot.runHooks("afterGetRowHeader",t,e)}appendColHeader(t,e){let o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.hot.getColHeader,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;const r=()=>{const e=t>=0?this.hot.getColumnMeta(t).headerClassName:null;return e?e.split(" "):[]};if(e.firstChild){const s=e.firstChild;(0,n.nB)(s,"relative")?(this.updateCellHeader(s.querySelector(".colHeader"),t,o,i),s.className="",(0,n.iQ)(s,["relative",...r()])):((0,n.Ie)(e),this.appendColHeader(t,e,o,i))}else{const{rootDocument:s}=this.hot,l=s.createElement("div"),a=s.createElement("span"),h=r();l.classList.add("relative",...h),a.className="colHeader",this.settings.ariaTags&&((0,n.Bq)(l,...(0,Et.gg)()),(0,n.Bq)(a,...(0,Et.gg)())),this.updateCellHeader(a,t,o,i),l.appendChild(a),e.appendChild(l)}this.hot.runHooks("afterGetColHeader",t,e,i)}updateCellHeader(t,e,o){let i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,r=e;const s=this._wt.wtOverlays.getParentOverlay(t)||this._wt;t.parentNode&&((0,n.nB)(t,"colHeader")?r=s.wtTable.columnFilter.sourceToRendered(e):(0,n.nB)(t,"rowHeader")&&(r=s.wtTable.rowFilter.sourceToRendered(e))),r>-1?(0,n.Mv)(t,o(e,i)):((0,n.c6)(t,String.fromCharCode(160)),(0,n.iQ)(t,"cornerHeader"))}maximumVisibleElementWidth(t){const e=this._wt.wtViewport.getWorkspaceWidth()-t;return e>0?e:0}maximumVisibleElementHeight(t){const e=this._wt.wtViewport.getWorkspaceHeight()-t;return e>0?e:0}setLastSize(t,e){Mn(Nn,this,t),Mn(Pn,this,e)}getLastSize(){return{width:xn(Nn,this),height:xn(Pn,this)}}getFirstRenderedVisibleRow(){if(!this._wt.wtViewport.rowsRenderCalculator)return null;const t=this.hot.rowIndexMapper,e=t.getVisualFromRenderableIndex(this._wt.wtTable.getFirstRenderedRow());return t.getNearestNotHiddenIndex(null!=e?e:0,1)}getLastRenderedVisibleRow(){if(!this._wt.wtViewport.rowsRenderCalculator)return null;const t=this.hot.rowIndexMapper,e=t.getVisualFromRenderableIndex(this._wt.wtTable.getLastRenderedRow());return t.getNearestNotHiddenIndex(null!=e?e:this.hot.countRows()-1,-1)}getFirstRenderedVisibleColumn(){if(!this._wt.wtViewport.columnsRenderCalculator)return null;const t=this.hot.columnIndexMapper,e=t.getVisualFromRenderableIndex(this._wt.wtTable.getFirstRenderedColumn());return t.getNearestNotHiddenIndex(null!=e?e:0,1)}getLastRenderedVisibleColumn(){if(!this._wt.wtViewport.columnsRenderCalculator)return null;const t=this.hot.columnIndexMapper,e=t.getVisualFromRenderableIndex(this._wt.wtTable.getLastRenderedColumn());return t.getNearestNotHiddenIndex(null!=e?e:this.hot.countCols()-1,-1)}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 xn(Hn,this)}getRowHeadersCount(){return xn(On,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(t){var e;return(null!==(e=this._wt.wtOverlays.getParentOverlay(t))&&void 0!==e?e:this._wt).wtTable.name}getOverlayByName(t){return this._wt.getOverlayByName(t)}getActiveOverlayName(){return this._wt.activeOverlayName}isVisible(){return this._wt.wtTable.isVisible()}hasVerticalScroll(){return this._wt.wtViewport.hasVerticalScroll()}hasHorizontalScroll(){return this._wt.wtViewport.hasHorizontalScroll()}getTableWidth(){return this._wt.wtTable.getWidth()}getTableHeight(){return this._wt.wtTable.getHeight()}getTableOffset(){return this._wt.wtViewport.getWorkspaceOffset()}getRowHeaderWidth(){return this._wt.wtViewport.getRowHeaderWidth()}getColumnHeaderHeight(){return this._wt.wtViewport.getColumnHeaderHeight()}isVerticallyScrollableByWindow(){return this._wt.wtViewport.isVerticallyScrollableByWindow()}isHorizontallyScrollableByWindow(){return this._wt.wtViewport.isHorizontallyScrollableByWindow()}destroy(){this._wt.destroy(),this.eventManager.destroy()}};var zn=o(5874);function jn(t,e,o){return(e=function(t){var e=function(t){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var o=e.call(t,"string");if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[e]=o,t}const Un=class{constructor(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];jn(this,"hot",void 0),jn(this,"data",void 0),jn(this,"dataType","array"),jn(this,"colToProp",(()=>{})),jn(this,"propToCol",(()=>{})),this.hot=t,this.data=e}modifyRowData(t){let e;return this.hot.hasHook("modifyRowData")&&(e=this.hot.runHooks("modifyRowData",t)),void 0===e||Number.isInteger(e)?this.data[t]:e}getData(){let t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return this.data&&0!==this.data.length?this.getByRange(null,null,t):this.data}setData(t){this.data=t}getAtColumn(t){const e=[];return(0,V.z0)(this.data,((o,n)=>{const i=this.getAtCell(n,t);e.push(i)})),e}getAtRow(t,e,o){let n=arguments.length>3&&void 0!==arguments[3]&&arguments[3];const r=void 0===e&&void 0===o,{dataDotNotation:s}=this.hot.getSettings();let l=null,a=null;if(l=this.modifyRowData(t),Array.isArray(l))a=[],r?l.forEach(((e,o)=>{a[o]=this.getAtPhysicalCell(t,o,l)})):(0,U.Ti)(e,o,(o=>{a[o-e]=this.getAtPhysicalCell(t,o,l)}));else if((0,v.Gv)(l)||(0,i.Tn)(l))if(a=n?[]:{},!r||n){const i=0,r=this.countFirstRowKeys()-1;(0,U.Ti)(i,r,(h=>{const c=this.colToProp(h);if(h>=(e||i)&&h<=(o||r)&&!Number.isInteger(c)){const e=this.getAtPhysicalCell(t,c,l);n?a.push(e):s?(0,v.oq)(a,c,e):a[c]=e}}))}else(0,v.v4)(l,((e,o)=>{const n=this.getAtPhysicalCell(t,o,l);s?(0,v.oq)(a,o,n):a[o]=n}));return a}setAtCell(t,e,o){if(!(t>=this.countRows()||e>=this.countFirstRowKeys())){if(this.hot.hasHook("modifySourceData")){const n=(0,v.nA)(o);this.hot.runHooks("modifySourceData",t,e,n,"set"),n.isTouched()&&(o=n.value)}["__proto__","constructor","prototype"].includes(t)||(Number.isInteger(e)?this.data[t][e]=o:(0,v.oq)(this.data[t],e,o))}}getAtPhysicalCell(t,e,o){let n=null;if(o)if("string"==typeof e){const{dataDotNotation:t}=this.hot.getSettings();n=t?(0,v.UU)(o,e):o[e]}else n="function"==typeof e?e(o):o[e];if(this.hot.hasHook("modifySourceData")){const o=(0,v.nA)(n);this.hot.runHooks("modifySourceData",t,e,o,"get"),o.isTouched()&&(n=o.value)}return n}getAtCell(t,e){const o=this.modifyRowData(t);return this.getAtPhysicalCell(t,this.colToProp(e),o)}getByRange(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,o=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=!1,i=null,r=null,s=null,l=null;null===t||null===e?(n=!0,i=0,s=this.countRows()-1):(i=Math.min(t.row,e.row),r=Math.min(t.col,e.col),s=Math.max(t.row,e.row),l=Math.max(t.col,e.col));const a=[];return(0,U.Ti)(i,s,(t=>{a.push(n?this.getAtRow(t,void 0,void 0,o):this.getAtRow(t,r,l,o))})),a}countRows(){if(this.hot.hasHook("modifySourceLength")){const t=this.hot.runHooks("modifySourceLength");if(Number.isInteger(t))return t}return this.data.length}countFirstRowKeys(){return(0,zn.E)(this.data)}destroy(){this.data=null,this.hot=null}};o(7550);var $n=o(5408),Gn=o(2246),Yn=o(1895),Xn=o(1803),qn=o(8386),Kn=o(1496);const Qn=new Map([["hiding",Gn.o],["index",Yn.n],["linkedPhysicalIndexToValue",Xn.z],["physicalIndexToValue",qn._],["trimming",Kn.q]]);var Jn=o(8046),Zn=o(7710);let ti=0;class ei{constructor(){var t,e,o;t=this,e="collection",o=new Map,(e=function(t){var e=function(t){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var o=e.call(t,"string");if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[e]=o}register(t,e){!1===this.collection.has(t)&&(this.collection.set(t,e),e.addLocalHook("change",(()=>this.runLocalHooks("change",e))),ti+=1)}unregister(t){const e=this.collection.get(t);(0,r.O9)(e)&&(e.destroy(),this.collection.delete(t),this.runLocalHooks("change",e),ti-=1)}unregisterAll(){this.collection.forEach(((t,e)=>this.unregister(e))),this.collection.clear()}get(t){return(0,r.b0)(t)?Array.from(this.collection.values()):this.collection.get(t)}getLength(){return this.collection.size}removeFromEvery(t){this.collection.forEach((e=>{e.remove(t)}))}insertToEvery(t,e){this.collection.forEach((o=>{o.insert(t,e)}))}initEvery(t){this.collection.forEach((e=>{e.init(t)}))}}function oi(t,e,o){return(e=function(t){var e=function(t){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var o=e.call(t,"string");if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[e]=o,t}(0,v.co)(ei,Zn.A);class ni extends ei{constructor(t,e){super(),oi(this,"mergedValuesCache",[]),oi(this,"aggregationFunction",void 0),oi(this,"fallbackValue",void 0),this.aggregationFunction=t,this.fallbackValue=e}getMergedValues(){if(!0===(!(arguments.length>0&&void 0!==arguments[0])||arguments[0]))return this.mergedValuesCache;if(0===this.getLength())return[];const t=(0,V.YD)(this.get(),(t=>t.getValues())),e=[],o=(0,r.O9)(t[0])&&t[0].length||0;for(let n=0;n<o;n+=1){const o=[];for(let e=0;e<this.getLength();e+=1)o.push(t[e][n]);e.push(o)}return(0,V.YD)(e,this.aggregationFunction)}getMergedValueAtIndex(t,e){const o=this.getMergedValues(e)[t];return(0,r.O9)(o)?o:this.fallbackValue}updateCache(){this.mergedValuesCache=this.getMergedValues(!1)}}function ii(t,e,o){if("function"==typeof t?t===e:t.has(e))return arguments.length<3?e:o;throw new TypeError("Private element is not present on this object")}var ri=new WeakMap;class si{constructor(){var t,e,o;o=[],function(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}(t=this,e=ri),e.set(t,o)}subscribe(t){var e;return this.addLocalHook("change",t),this._write((e=ri).get(ii(e,this))),this}unsubscribe(){return this.runLocalHooks("unsubscribe"),this.clearLocalHooks(),this}_write(t){return t.length>0&&this.runLocalHooks("change",t),this}_writeInitialChanges(t){var e,o;o=t,(e=ri).set(ii(e,this),o)}}function li(t,e){const o=[];let n=0,i=0;for(;n<t.length&&i<e.length;n++,i++)t[n]!==e[i]&&o.push({op:"replace",index:i,oldValue:t[n],newValue:e[i]});for(;n<e.length;n++)o.push({op:"insert",index:n,oldValue:void 0,newValue:e[n]});for(;i<t.length;i++)o.push({op:"remove",index:i,oldValue:t[i],newValue:void 0});return o}function ai(t,e,o){(function(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")})(t,e),e.set(t,o)}function hi(t,e){return t.get(di(t,e))}function ci(t,e,o){return t.set(di(t,e),o),o}function di(t,e,o){if("function"==typeof t?t===e:t.has(e))return arguments.length<3?e:o;throw new TypeError("Private element is not present on this object")}(0,v.co)(si,Zn.A);var ui=new WeakMap,gi=new WeakMap,fi=new WeakMap,pi=new WeakMap,mi=new WeakMap;class wi{constructor(){let{initialIndexValue:t}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};ai(this,ui,new Set),ai(this,gi,[]),ai(this,fi,[]),ai(this,pi,!1),ai(this,mi,!1),ci(mi,this,null!=t&&t)}createObserver(){const t=new si;return hi(ui,this).add(t),t.addLocalHook("unsubscribe",(()=>{hi(ui,this).delete(t)})),t._writeInitialChanges(li(hi(gi,this),hi(fi,this))),t}emit(t){let e=hi(fi,this);hi(pi,this)&&hi(gi,this).length===t.length||(0===t.length?t=new Array(e.length).fill(hi(mi,this)):ci(gi,this,new Array(t.length).fill(hi(mi,this))),hi(pi,this)||(ci(pi,this,!0),e=hi(gi,this)));const o=li(e,t);hi(ui,this).forEach((t=>t._write(o))),ci(fi,this,t)}}function bi(t,e,o){return(e=function(t){var e=function(t){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var o=e.call(t,"string");if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[e]=o,t}new Set;class vi{constructor(){bi(this,"indexesSequence",new $n.K),bi(this,"trimmingMapsCollection",new ni((t=>t.some((t=>!0===t))),!1)),bi(this,"hidingMapsCollection",new ni((t=>t.some((t=>!0===t))),!1)),bi(this,"variousMapsCollection",new ei),bi(this,"hidingChangesObservable",new wi({initialIndexValue:!1})),bi(this,"notTrimmedIndexesCache",[]),bi(this,"notHiddenIndexesCache",[]),bi(this,"isBatched",!1),bi(this,"indexesSequenceChanged",!1),bi(this,"indexesChangeSource",void 0),bi(this,"trimmedIndexesChanged",!1),bi(this,"hiddenIndexesChanged",!1),bi(this,"renderablePhysicalIndexesCache",[]),bi(this,"fromPhysicalToVisualIndexesCache",new Map),bi(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",(t=>{this.trimmedIndexesChanged=!0,this.updateCache(),this.runLocalHooks("change",t,this.trimmingMapsCollection)})),this.hidingMapsCollection.addLocalHook("change",(t=>{this.hiddenIndexesChanged=!0,this.updateCache(),this.runLocalHooks("change",t,this.hidingMapsCollection)})),this.variousMapsCollection.addLocalHook("change",(t=>{this.runLocalHooks("change",t,this.variousMapsCollection)}))}suspendOperations(){this.isBatched=!0}resumeOperations(){this.isBatched=!1,this.updateCache()}createChangesObserver(t){if("hiding"!==t)throw new Error(`Unsupported index map type "${t}".`);return this.hidingChangesObservable.createObserver()}createAndRegisterIndexMap(t,e,o){return this.registerMap(t,function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(!Qn.has(t))throw new Error(`The provided map type ("${t}") does not exist.`);return new(Qn.get(t))(e)}(e,o))}registerMap(t,e){if(this.trimmingMapsCollection.get(t)||this.hidingMapsCollection.get(t)||this.variousMapsCollection.get(t))throw Error(`Map with name "${t}" has been already registered.`);e instanceof Kn.q?this.trimmingMapsCollection.register(t,e):e instanceof Gn.o?this.hidingMapsCollection.register(t,e):this.variousMapsCollection.register(t,e);const o=this.getNumberOfIndexes();return o>0&&e.init(o),e}unregisterMap(t){this.trimmingMapsCollection.unregister(t),this.hidingMapsCollection.unregister(t),this.variousMapsCollection.unregister(t)}unregisterAll(){this.trimmingMapsCollection.unregisterAll(),this.hidingMapsCollection.unregisterAll(),this.variousMapsCollection.unregisterAll()}getPhysicalFromVisualIndex(t){const e=this.notTrimmedIndexesCache[t];return(0,r.O9)(e)?e:null}getPhysicalFromRenderableIndex(t){const e=this.renderablePhysicalIndexesCache[t];return(0,r.O9)(e)?e:null}getVisualFromPhysicalIndex(t){const e=this.fromPhysicalToVisualIndexesCache.get(t);return(0,r.O9)(e)?e:null}getVisualFromRenderableIndex(t){return this.getVisualFromPhysicalIndex(this.getPhysicalFromRenderableIndex(t))}getRenderableFromVisualIndex(t){const e=this.fromVisualToRenderableIndexesCache.get(t);return(0,r.O9)(e)?e:null}getNearestNotHiddenIndex(t,e){let o=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(null===this.getPhysicalFromVisualIndex(t))return null;if(this.fromVisualToRenderableIndexesCache.has(t))return t;const n=Array.from(this.fromVisualToRenderableIndexesCache.keys());let i=-1;return i=e>0?n.findIndex((e=>e>t)):n.reverse().findIndex((e=>e<t)),-1===i?o?this.getNearestNotHiddenIndex(t,-e,!1):null:n[i]}initToLength(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.getNumberOfIndexes();this.notTrimmedIndexesCache=[...new Array(t).keys()],this.notHiddenIndexesCache=[...new Array(t).keys()],this.suspendOperations(),this.indexesChangeSource="init",this.indexesSequence.init(t),this.indexesChangeSource=void 0,this.trimmingMapsCollection.initEvery(t),this.resumeOperations(),this.suspendOperations(),this.hidingMapsCollection.initEvery(t),this.variousMapsCollection.initEvery(t),this.resumeOperations(),this.runLocalHooks("init")}fitToLength(t){const e=this.getNumberOfIndexes();if(t<e){const e=[...Array(this.getNumberOfIndexes()-t).keys()].map((e=>e+t));this.removeIndexes(e)}else this.insertIndexes(e,t-e)}getIndexesSequence(){return this.indexesSequence.getValues()}setIndexesSequence(t){void 0===this.indexesChangeSource&&(this.indexesChangeSource="update"),this.indexesSequence.setValues(t),"update"===this.indexesChangeSource&&(this.indexesChangeSource=void 0)}getNotTrimmedIndexes(){return!0===(!(arguments.length>0&&void 0!==arguments[0])||arguments[0])?this.notTrimmedIndexesCache:this.getIndexesSequence().filter((t=>!1===this.isTrimmed(t)))}getNotTrimmedIndexesLength(){return this.getNotTrimmedIndexes().length}getNotHiddenIndexes(){return!0===(!(arguments.length>0&&void 0!==arguments[0])||arguments[0])?this.notHiddenIndexesCache:this.getIndexesSequence().filter((t=>!1===this.isHidden(t)))}getNotHiddenIndexesLength(){return this.getNotHiddenIndexes().length}getRenderableIndexes(){return!0===(!(arguments.length>0&&void 0!==arguments[0])||arguments[0])?this.renderablePhysicalIndexesCache:this.getNotTrimmedIndexes().filter((t=>!1===this.isHidden(t)))}getRenderableIndexesLength(){return this.getRenderableIndexes().length}getNumberOfIndexes(){return this.getIndexesSequence().length}moveIndexes(t,e){"number"==typeof t&&(t=[t]);const o=(0,V.YD)(t,(t=>this.getPhysicalFromVisualIndex(t))),n=this.getNotTrimmedIndexesLength(),i=t.length,r=(0,Jn.H)(this.getIndexesSequence(),o),s=r.filter((t=>!1===this.isTrimmed(t)));let l=r.indexOf(s[s.length-1])+1;if(e+i<n){const t=s[e];l=r.indexOf(t)}this.indexesChangeSource="move",this.setIndexesSequence((0,Jn.N)(r,l,o)),this.indexesChangeSource=void 0}isTrimmed(t){return this.trimmingMapsCollection.getMergedValueAtIndex(t)}isHidden(t){return this.hidingMapsCollection.getMergedValueAtIndex(t)}insertIndexes(t,e){const o=this.getNotTrimmedIndexes()[t],n=(0,r.O9)(o)?o:this.getNumberOfIndexes(),i=this.getIndexesSequence().includes(o)?this.getIndexesSequence().indexOf(o):this.getNumberOfIndexes(),s=(0,V.YD)(new Array(e).fill(n),((t,e)=>t+e));this.suspendOperations(),this.indexesChangeSource="insert",this.indexesSequence.insert(i,s),this.indexesChangeSource=void 0,this.trimmingMapsCollection.insertToEvery(i,s),this.hidingMapsCollection.insertToEvery(i,s),this.variousMapsCollection.insertToEvery(i,s),this.resumeOperations()}removeIndexes(t){this.suspendOperations(),this.indexesChangeSource="remove",this.indexesSequence.remove(t),this.indexesChangeSource=void 0,this.trimmingMapsCollection.removeFromEvery(t),this.hidingMapsCollection.removeFromEvery(t),this.variousMapsCollection.removeFromEvery(t),this.resumeOperations()}updateCache(){let t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];const e=this.indexesSequenceChanged||this.trimmedIndexesChanged||this.hiddenIndexesChanged;(!0===t||!1===this.isBatched&&!0===e)&&(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 t=this.getNotTrimmedIndexesLength();this.fromPhysicalToVisualIndexesCache.clear();for(let e=0;e<t;e+=1){const t=this.getPhysicalFromVisualIndex(e);this.fromPhysicalToVisualIndexesCache.set(t,e)}}cacheFromVisualToRenderableIndexes(){const t=this.getRenderableIndexesLength();this.fromVisualToRenderableIndexesCache.clear();for(let e=0;e<t;e+=1){const t=this.getPhysicalFromRenderableIndex(e),o=this.getVisualFromPhysicalIndex(t);this.fromVisualToRenderableIndexesCache.set(o,e)}}}(0,v.co)(vi,Zn.A);var yi=o(3487);function Ci(t){const e=/^([a-zA-Z]{2})-([a-zA-Z]{2})$/.exec(t);return e?`${e[1].toLowerCase()}-${e[2].toUpperCase()}`:t}function Si(t){(0,r.O9)(t)&&(0,y.z3)(It.O`Language with code "${t}" was not found. You should register particular language\x20
- before using it. Read more about this issue at: https://docs.handsontable.com/i18n/missing-language-code.`)}var Ri=o(4647);const{register:Ei,getValues:Ti}=(0,Ri.A)("phraseFormatters");Ei("pluralize",(function(t,e){return Array.isArray(t)&&Number.isInteger(e)?t[e]:t}));var xi=o(9138);const Mi={languageCode:"en-US",[xi.CONTEXTMENU_ITEMS_NO_ITEMS]:"No available options",[xi.CONTEXTMENU_ITEMS_ROW_ABOVE]:"Insert row above",[xi.CONTEXTMENU_ITEMS_ROW_BELOW]:"Insert row below",[xi.CONTEXTMENU_ITEMS_INSERT_LEFT]:"Insert column left",[xi.CONTEXTMENU_ITEMS_INSERT_RIGHT]:"Insert column right",[xi.CONTEXTMENU_ITEMS_REMOVE_ROW]:["Remove row","Remove rows"],[xi.CONTEXTMENU_ITEMS_REMOVE_COLUMN]:["Remove column","Remove columns"],[xi.CONTEXTMENU_ITEMS_UNDO]:"Undo",[xi.CONTEXTMENU_ITEMS_REDO]:"Redo",[xi.CONTEXTMENU_ITEMS_READ_ONLY]:"Read only",[xi.CONTEXTMENU_ITEMS_CLEAR_COLUMN]:"Clear column",[xi.CONTEXTMENU_ITEMS_ALIGNMENT]:"Alignment",[xi.CONTEXTMENU_ITEMS_ALIGNMENT_LEFT]:"Left",[xi.CONTEXTMENU_ITEMS_ALIGNMENT_CENTER]:"Center",[xi.CONTEXTMENU_ITEMS_ALIGNMENT_RIGHT]:"Right",[xi.CONTEXTMENU_ITEMS_ALIGNMENT_JUSTIFY]:"Justify",[xi.CONTEXTMENU_ITEMS_ALIGNMENT_TOP]:"Top",[xi.CONTEXTMENU_ITEMS_ALIGNMENT_MIDDLE]:"Middle",[xi.CONTEXTMENU_ITEMS_ALIGNMENT_BOTTOM]:"Bottom",[xi.CONTEXTMENU_ITEMS_FREEZE_COLUMN]:"Freeze column",[xi.CONTEXTMENU_ITEMS_UNFREEZE_COLUMN]:"Unfreeze column",[xi.CONTEXTMENU_ITEMS_BORDERS]:"Borders",[xi.CONTEXTMENU_ITEMS_BORDERS_TOP]:"Top",[xi.CONTEXTMENU_ITEMS_BORDERS_RIGHT]:"Right",[xi.CONTEXTMENU_ITEMS_BORDERS_BOTTOM]:"Bottom",[xi.CONTEXTMENU_ITEMS_BORDERS_LEFT]:"Left",[xi.CONTEXTMENU_ITEMS_REMOVE_BORDERS]:"Remove border(s)",[xi.CONTEXTMENU_ITEMS_ADD_COMMENT]:"Add comment",[xi.CONTEXTMENU_ITEMS_EDIT_COMMENT]:"Edit comment",[xi.CONTEXTMENU_ITEMS_REMOVE_COMMENT]:"Delete comment",[xi.CONTEXTMENU_ITEMS_READ_ONLY_COMMENT]:"Read-only comment",[xi.CONTEXTMENU_ITEMS_MERGE_CELLS]:"Merge cells",[xi.CONTEXTMENU_ITEMS_UNMERGE_CELLS]:"Unmerge cells",[xi.CONTEXTMENU_ITEMS_COPY]:"Copy",[xi.CONTEXTMENU_ITEMS_COPY_WITH_COLUMN_HEADERS]:["Copy with header","Copy with headers"],[xi.CONTEXTMENU_ITEMS_COPY_WITH_COLUMN_GROUP_HEADERS]:["Copy with group header","Copy with group headers"],[xi.CONTEXTMENU_ITEMS_COPY_COLUMN_HEADERS_ONLY]:["Copy header only","Copy headers only"],[xi.CONTEXTMENU_ITEMS_CUT]:"Cut",[xi.CONTEXTMENU_ITEMS_NESTED_ROWS_INSERT_CHILD]:"Insert child row",[xi.CONTEXTMENU_ITEMS_NESTED_ROWS_DETACH_CHILD]:"Detach from parent",[xi.CONTEXTMENU_ITEMS_HIDE_COLUMN]:["Hide column","Hide columns"],[xi.CONTEXTMENU_ITEMS_SHOW_COLUMN]:["Show column","Show columns"],[xi.CONTEXTMENU_ITEMS_HIDE_ROW]:["Hide row","Hide rows"],[xi.CONTEXTMENU_ITEMS_SHOW_ROW]:["Show row","Show rows"],[xi.FILTERS_CONDITIONS_NONE]:"None",[xi.FILTERS_CONDITIONS_EMPTY]:"Is empty",[xi.FILTERS_CONDITIONS_NOT_EMPTY]:"Is not empty",[xi.FILTERS_CONDITIONS_EQUAL]:"Is equal to",[xi.FILTERS_CONDITIONS_NOT_EQUAL]:"Is not equal to",[xi.FILTERS_CONDITIONS_BEGINS_WITH]:"Begins with",[xi.FILTERS_CONDITIONS_ENDS_WITH]:"Ends with",[xi.FILTERS_CONDITIONS_CONTAINS]:"Contains",[xi.FILTERS_CONDITIONS_NOT_CONTAIN]:"Does not contain",[xi.FILTERS_CONDITIONS_GREATER_THAN]:"Greater than",[xi.FILTERS_CONDITIONS_GREATER_THAN_OR_EQUAL]:"Greater than or equal to",[xi.FILTERS_CONDITIONS_LESS_THAN]:"Less than",[xi.FILTERS_CONDITIONS_LESS_THAN_OR_EQUAL]:"Less than or equal to",[xi.FILTERS_CONDITIONS_BETWEEN]:"Is between",[xi.FILTERS_CONDITIONS_NOT_BETWEEN]:"Is not between",[xi.FILTERS_CONDITIONS_AFTER]:"After",[xi.FILTERS_CONDITIONS_BEFORE]:"Before",[xi.FILTERS_CONDITIONS_TODAY]:"Today",[xi.FILTERS_CONDITIONS_TOMORROW]:"Tomorrow",[xi.FILTERS_CONDITIONS_YESTERDAY]:"Yesterday",[xi.FILTERS_VALUES_BLANK_CELLS]:"Blank cells",[xi.FILTERS_DIVS_FILTER_BY_CONDITION]:"Filter by condition",[xi.FILTERS_DIVS_FILTER_BY_VALUE]:"Filter by value",[xi.FILTERS_LABELS_CONJUNCTION]:"And",[xi.FILTERS_LABELS_DISJUNCTION]:"Or",[xi.FILTERS_BUTTONS_SELECT_ALL]:"Select all",[xi.FILTERS_BUTTONS_CLEAR]:"Clear",[xi.FILTERS_BUTTONS_OK]:"OK",[xi.FILTERS_BUTTONS_CANCEL]:"Cancel",[xi.FILTERS_BUTTONS_PLACEHOLDER_SEARCH]:"Search",[xi.FILTERS_BUTTONS_PLACEHOLDER_VALUE]:"Value",[xi.FILTERS_BUTTONS_PLACEHOLDER_SECOND_VALUE]:"Second value",[xi.CHECKBOX_CHECKED]:"Checked",[xi.CHECKBOX_UNCHECKED]:"Unchecked"},Ii=xi,Hi=Mi.languageCode,{register:Oi,getItem:Ai,hasItem:ki,getValues:_i}=(0,Ri.A)("languagesDictionaries");function Ni(t,e){let o=t,n=e;return(0,v.Gv)(t)&&(n=t,o=n.languageCode),function(t,e){var o,n;t!==Hi&&(o=e,n=Ai(Hi),(0,v.v4)(n,((t,e)=>{(0,r.b0)(o[e])&&(o[e]=t)})))}(o,n),Oi(o,(0,v.Go)(n)),(0,v.Go)(n)}function Pi(t){return Li(t)?(0,v.Go)(Ai(t)):null}function Li(t){return ki(t)}function Di(t,e,o){const n=Pi(t);if(null===n)return null;const i=n[e];if((0,r.b0)(i))return null;const s=function(t,e){let o=t;return(0,V.z0)(Ti(),(n=>{o=n(t,e)})),o}(i,o);return Array.isArray(s)?s[0]:s}Ni(Mi);var Vi=o(192);class Fi{constructor(t,e){this.settings=t,this.cellRange=e||null}isEmpty(){return null===this.cellRange}add(t){return this.isEmpty()?this.cellRange=this.settings.createCellRange(t):this.cellRange.expand(t),this}replace(t,e){if(!this.isEmpty()){if(this.cellRange.from.isEqual(t))return this.cellRange.from=e,!0;if(this.cellRange.to.isEqual(t))return this.cellRange.to=e,!0}return!1}clear(){return this.cellRange=null,this}getCorners(){const t=this.cellRange.getOuterTopStartCorner(),e=this.cellRange.getOuterBottomEndCorner();return[t.row,t.col,e.row,e.col]}destroy(){this.runLocalHooks("destroy")}}(0,v.co)(Fi,Zn.A);const Bi=Fi;const Wi=class extends Bi{constructor(t,e){var o,n,i;super(t,null),o=this,i=null,(n=function(t){var e=function(t){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var o=e.call(t,"string");if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:e+""}(n="visualCellRange"))in o?Object.defineProperty(o,n,{value:i,enumerable:!0,configurable:!0,writable:!0}):o[n]=i,this.visualCellRange=e||null,this.commit()}add(t){return null===this.visualCellRange?this.visualCellRange=this.settings.createCellRange(t):this.visualCellRange.expand(t),this}clear(){return this.visualCellRange=null,super.clear()}trimToVisibleCellsRangeOnly(t){let{from:e,to:o}=t,n=this.getNearestNotHiddenCoords(e,1),i=this.getNearestNotHiddenCoords(o,-1);return null===n||null===i?null:((n.row>i.row||n.col>i.col)&&(n=e,i=o),this.settings.createCellRange(n,n,i))}getNearestNotHiddenCoords(t,e){let o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e;const n=this.getNearestNotHiddenIndex(this.settings.rowIndexMapper,t.row,e);if(null===n)return null;const i=this.getNearestNotHiddenIndex(this.settings.columnIndexMapper,t.col,o);return null===i?null:this.settings.createCellCoords(n,i)}getNearestNotHiddenIndex(t,e,o){return e<0?e:t.getNearestNotHiddenIndex(e,o)}commit(){if(null===this.visualCellRange)return this;const t=this.trimToVisibleCellsRangeOnly(this.visualCellRange);return this.cellRange=null===t?null:this.createRenderableCellRange(t.from,t.to),this}syncWith(t){const e=t.from.clone().normalize(),o="N-S"===t.getVerticalDirection()?1:-1,n="W-E"===t.getHorizontalDirection()?1:-1,i=this.settings.visualToRenderableCoords(this.visualCellRange.highlight);let r=null;if(null!==i&&null!==i.col&&null!==i.row||(r=this.getNearestNotHiddenCoords(e,o,n)),null!==r&&t.overlaps(r)){const e=t.highlight.clone();if(e.row>=0&&(e.row=r.row),e.col>=0&&(e.col=r.col),null===this.cellRange){const t=this.settings.visualToRenderableCoords(e);this.cellRange=this.settings.createCellRange(t)}t.setHighlight(e)}return"focus"===this.settings.selectionType&&null!==i&&null===r&&t.setHighlight(this.visualCellRange.highlight),this}getCorners(){const{from:t,to:e}=this.cellRange;return[Math.min(t.row,e.row),Math.min(t.col,e.col),Math.max(t.row,e.row),Math.max(t.col,e.col)]}getVisualCorners(){const t=this.settings.renderableToVisualCoords(this.cellRange.getTopStartCorner()),e=this.settings.renderableToVisualCoords(this.cellRange.getBottomEndCorner());return[t.row,t.col,e.row,e.col]}createRenderableCellRange(t,e){const o=this.settings.visualToRenderableCoords(t),n=this.settings.visualToRenderableCoords(e);return null===o.row||null===o.col||null===n.row||null===n.col?null:this.settings.createCellRange(o,o,n)}};function zi(t){let{activeHeaderClassName:e,...o}=t;return new Wi({className:e,...o,selectionType:Vi.E6})}function ji(t){let{areaCornerVisible:e,...o}=t;return new Wi({className:"area",createLayers:!0,border:{width:1,color:"#4b89ff",cornerVisible:e},...o,selectionType:Vi.LX})}function Ui(t){let{...e}=t;return new Wi({className:"highlight",...e,selectionType:Vi.LX})}function $i(t){let{columnClassName:e,...o}=t;return new Wi({className:e,...o,selectionType:Vi.QP})}function Gi(t){let{headerClassName:e,...o}=t;return new Wi({className:e,...o,selectionType:Vi.PP})}function Yi(t){let{rowClassName:e,...o}=t;return new Wi({className:e,...o,selectionType:Vi._8})}function Xi(t,e,o){return(e=function(t){var e=function(t){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var o=e.call(t,"string");if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[e]=o,t}function qi(t,e,o){if("function"==typeof t?t===e:t.has(e))return arguments.length<3?e:o;throw new TypeError("Private element is not present on this object")}var Ki=new WeakSet;class Qi{constructor(t){var e,o;(function(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")})(e=this,o=Ki),o.add(e),Xi(this,"options",void 0),Xi(this,"layerLevel",0),Xi(this,"focus",void 0),Xi(this,"fill",void 0),Xi(this,"layeredAreas",new Map),Xi(this,"areas",new Map),Xi(this,"rowHeaders",new Map),Xi(this,"columnHeaders",new Map),Xi(this,"activeRowHeaders",new Map),Xi(this,"activeColumnHeaders",new Map),Xi(this,"activeCornerHeaders",new Map),Xi(this,"rowHighlights",new Map),Xi(this,"columnHighlights",new Map),Xi(this,"customSelections",[]),this.options=t,this.focus=function(t){let{cellCornerVisible:e,...o}=t;return new Wi({className:"current",headerAttributes:[(0,Et.H0)()],border:{width:2,color:"#4b89ff",cornerVisible:e},...o,selectionType:Vi.Yt})}(t),this.fill=function(t){let{...e}=t;return new Wi({className:"fill",border:{width:1,color:"#ff0000"},...e,selectionType:Vi.Hb})}(t)}isEnabledFor(t,e){let o=t;t===Vi.Yt&&(o="current");let n=this.options.disabledCellSelection(e.row,e.col);return"string"==typeof n&&(n=[n]),!1===n||Array.isArray(n)&&!n.includes(o)}useLayerLevel(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return this.layerLevel=t,this}getFocus(){return this.focus}getFill(){return this.fill}createLayeredArea(){return qi(Ki,this,Ji).call(this,this.layeredAreas,ji)}getLayeredAreas(){return[...this.layeredAreas.values()]}createArea(){return qi(Ki,this,Ji).call(this,this.areas,Ui)}getAreas(){return[...this.areas.values()]}createRowHeader(){return qi(Ki,this,Ji).call(this,this.rowHeaders,Gi)}getRowHeaders(){return[...this.rowHeaders.values()]}createColumnHeader(){return qi(Ki,this,Ji).call(this,this.columnHeaders,Gi)}getColumnHeaders(){return[...this.columnHeaders.values()]}createActiveRowHeader(){return qi(Ki,this,Ji).call(this,this.activeRowHeaders,zi)}getActiveRowHeaders(){return[...this.activeRowHeaders.values()]}createActiveColumnHeader(){return qi(Ki,this,Ji).call(this,this.activeColumnHeaders,zi)}getActiveColumnHeaders(){return[...this.activeColumnHeaders.values()]}createActiveCornerHeader(){return qi(Ki,this,Ji).call(this,this.activeCornerHeaders,zi)}getActiveCornerHeaders(){return[...this.activeCornerHeaders.values()]}createRowHighlight(){return qi(Ki,this,Ji).call(this,this.rowHighlights,Yi)}getRowHighlights(){return[...this.rowHighlights.values()]}createColumnHighlight(){return qi(Ki,this,Ji).call(this,this.columnHighlights,$i)}getColumnHighlights(){return[...this.columnHighlights.values()]}getCustomSelections(){return[...this.customSelections.values()]}addCustomSelection(t){this.customSelections.push(function(t){let{border:e,visualCellRange:o,...n}=t;return new Wi({...e,...n,selectionType:Vi.OS},o)}({...this.options,...t}))}clear(){this.focus.clear(),this.fill.clear(),(0,V.z0)(this.areas.values(),(t=>{t.clear()})),(0,V.z0)(this.layeredAreas.values(),(t=>{t.clear()})),(0,V.z0)(this.rowHeaders.values(),(t=>{t.clear()})),(0,V.z0)(this.columnHeaders.values(),(t=>{t.clear()})),(0,V.z0)(this.activeRowHeaders.values(),(t=>{t.clear()})),(0,V.z0)(this.activeColumnHeaders.values(),(t=>{t.clear()})),(0,V.z0)(this.activeCornerHeaders.values(),(t=>{t.clear()})),(0,V.z0)(this.rowHighlights.values(),(t=>{t.clear()})),(0,V.z0)(this.columnHighlights.values(),(t=>{t.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 Ji(t,e){const o=this.layerLevel;if(t.has(o))return t.get(o);const n=e({layerLevel:o,...this.options});return t.set(o,n),n}const Zi=Qi;function tr(t,e,o){return(e=function(t){var e=function(t){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var o=e.call(t,"string");if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[e]=o,t}class er{constructor(t){tr(this,"ranges",[]),tr(this,"createCellRange",void 0),this.createCellRange=t}isEmpty(){return 0===this.size()}set(t){return this.clear(),this.ranges.push(this.createCellRange(t)),this}add(t){return this.ranges.push(this.createCellRange(t)),this}pop(){return this.ranges.pop(),this}current(){return this.peekByIndex(this.size()-1)}previous(){return this.peekByIndex(this.size()-2)}includes(t){return this.ranges.some((e=>e.includes(t)))}clear(){return this.ranges.length=0,this}size(){return this.ranges.length}peekByIndex(){let t,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return e>=0&&e<this.size()&&(t=this.ranges[e]),t}[Symbol.iterator](){return this.ranges[Symbol.iterator]()}}const or=er;function nr(t,e,o){ir(t,e),e.set(t,o)}function ir(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function rr(t,e){return t.get(lr(t,e))}function sr(t,e,o){return t.set(lr(t,e),o),o}function lr(t,e,o){if("function"==typeof t?t===e:t.has(e))return arguments.length<3?e:o;throw new TypeError("Private element is not present on this object")}var ar=new WeakMap,hr=new WeakMap,cr=new WeakMap,dr=new WeakSet;class ur{constructor(t,e){var o;ir(this,o=dr),o.add(this),nr(this,ar,void 0),nr(this,hr,void 0),nr(this,cr,{x:0,y:0}),sr(ar,this,t),sr(hr,this,e)}transformStart(t,e){let o=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const n=rr(hr,this).createCellCoords(t,e);let i=rr(ar,this).current().highlight;const r=rr(hr,this).visualToRenderableCoords(i);let s=0,l=0;if(this.runLocalHooks("beforeTransformStart",n),null!==r.row&&null!==r.col){const{width:t,height:e}=lr(dr,this,fr).call(this),{row:r,col:a}=lr(dr,this,wr).call(this,i),h=rr(hr,this).fixedRowsBottom(),c=rr(hr,this).minSpareRows(),d=rr(hr,this).minSpareCols(),u=rr(hr,this).autoWrapRow(),g=rr(hr,this).autoWrapCol(),f=rr(hr,this).createCellCoords(r+n.row,a+n.col);if(f.row>=e){const n=(0,v.nA)(o&&c>0&&0===h),i=f.col+1,r=rr(hr,this).createCellCoords(f.row-e,i>=t?i-t:i);this.runLocalHooks("beforeColumnWrap",n,lr(dr,this,br).call(this,r),i>=t),n.value?this.runLocalHooks("insertRowRequire",rr(hr,this).countRenderableRows()):g&&f.assign(r)}else if(f.row<0){const o=(0,v.nA)(g),n=f.col-1,i=rr(hr,this).createCellCoords(e+f.row,n<0?t+n:n);this.runLocalHooks("beforeColumnWrap",o,lr(dr,this,br).call(this,i),n<0),g&&f.assign(i)}if(f.col>=t){const n=(0,v.nA)(o&&d>0),i=f.row+1,r=rr(hr,this).createCellCoords(i>=e?i-e:i,f.col-t);this.runLocalHooks("beforeRowWrap",n,lr(dr,this,br).call(this,r),i>=e),n.value?this.runLocalHooks("insertColRequire",rr(hr,this).countRenderableColumns()):u&&f.assign(r)}else if(f.col<0){const o=(0,v.nA)(u),n=f.row-1,i=rr(hr,this).createCellCoords(n<0?e+n:n,t+f.col);this.runLocalHooks("beforeRowWrap",o,lr(dr,this,br).call(this,i),n<0),u&&f.assign(i)}const{rowDir:p,colDir:m}=lr(dr,this,gr).call(this,f);s=p,l=m,i=lr(dr,this,br).call(this,f)}return this.runLocalHooks("afterTransformStart",i,s,l),i}transformEnd(t,e){const o=rr(hr,this).createCellCoords(t,e),n=rr(ar,this).current(),i=rr(hr,this).visualToRenderableCoords(n.highlight),r=lr(dr,this,pr).call(this,n.to.row,n.from.row),s=lr(dr,this,mr).call(this,n.to.col,n.from.col),l=n.to.clone();let a=0,h=0;if(this.runLocalHooks("beforeTransformEnd",o),null!==i.row&&null!==i.col&&null!==r&&null!==s){const{row:t,col:e}=lr(dr,this,wr).call(this,n.highlight),i=rr(hr,this).createCellCoords(r+o.row,s+o.col),c=n.getTopStartCorner(),d=n.getTopEndCorner(),u=n.getBottomEndCorner();if(o.col<0&&s>=e&&i.col<e){const t=i.col-e;i.col=lr(dr,this,mr).call(this,c.col,d.col)+t}else if(o.col>0&&s<=e&&i.col>e){const t=lr(dr,this,mr).call(this,d.col,c.col),e=Math.max(i.col-t,1);i.col=t+e}if(o.row<0&&r>=t&&i.row<t){const e=i.row-t;i.row=lr(dr,this,pr).call(this,c.row,u.row)+e}else if(o.row>0&&r<=t&&i.row>t){const t=lr(dr,this,pr).call(this,u.row,c.row),e=Math.max(i.row-t,1);i.row=t+e}const{rowDir:g,colDir:f}=lr(dr,this,gr).call(this,i);a=g,h=f;const p=lr(dr,this,br).call(this,i);0===o.row&&0!==o.col?l.col=p.col:0!==o.row&&0===o.col?l.row=p.row:(l.row=p.row,l.col=p.col)}return this.runLocalHooks("afterTransformEnd",l,a,h),l}setOffsetSize(t){let{x:e,y:o}=t;sr(cr,this,{x:e,y:o})}resetOffsetSize(){sr(cr,this,{x:0,y:0})}}function gr(t){const{width:e,height:o}=lr(dr,this,fr).call(this);let n=0,i=0;return t.row<0?(n=-1,t.row=0):t.row>0&&t.row>=o&&(n=1,t.row=o-1),t.col<0?(i=-1,t.col=0):t.col>0&&t.col>=e&&(i=1,t.col=e-1),{rowDir:n,colDir:i}}function fr(){return{width:rr(cr,this).x+rr(hr,this).countRenderableColumns(),height:rr(cr,this).y+rr(hr,this).countRenderableRows()}}function pr(t,e){const o=rr(hr,this).findFirstNonHiddenRenderableRow(t,e);return null===o?null:rr(cr,this).y+o}function mr(t,e){const o=rr(hr,this).findFirstNonHiddenRenderableColumn(t,e);return null===o?null:rr(cr,this).x+o}function wr(t){const{row:e,col:o}=rr(hr,this).visualToRenderableCoords(t);if(null===e||null===o)throw new Error("Renderable coords are not visible.");return rr(hr,this).createCellCoords(rr(cr,this).y+e,rr(cr,this).x+o)}function br(t){const e=t.clone();return e.col=t.col-rr(cr,this).x,e.row=t.row-rr(cr,this).y,rr(hr,this).renderableToVisualCoords(e)}(0,v.co)(ur,Zn.A);const vr=ur;var yr=o(6396);function Cr(t,e,o){(function(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")})(t,e),e.set(t,o)}function Sr(t,e,o){return(e=function(t){var e=function(t){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var o=e.call(t,"string");if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[e]=o,t}function Rr(t,e){return t.get(Tr(t,e))}function Er(t,e,o){return t.set(Tr(t,e),o),o}function Tr(t,e,o){if("function"==typeof t?t===e:t.has(e))return arguments.length<3?e:o;throw new TypeError("Private element is not present on this object")}var xr=new WeakMap,Mr=new WeakMap,Ir=new WeakMap,Hr=new WeakMap,Or=new WeakMap,Ar=new WeakMap;class kr{constructor(t,e){var o=this;Sr(this,"settings",void 0),Sr(this,"tableProps",void 0),Sr(this,"inProgress",!1),Sr(this,"selectedRange",new or(((t,e,o)=>this.tableProps.createCellRange(t,e,o)))),Sr(this,"highlight",void 0),Cr(this,xr,void 0),Cr(this,Mr,void 0),Sr(this,"selectedByRowHeader",new Set),Sr(this,"selectedByColumnHeader",new Set),Cr(this,Ir,!1),Cr(this,Hr,!1),Cr(this,Or,"unknown"),Cr(this,Ar,-1),this.settings=t,this.tableProps=e,this.highlight=new Zi({headerClassName:t.currentHeaderClassName,activeHeaderClassName:t.activeHeaderClassName,rowClassName:t.currentRowClassName,columnClassName:t.currentColClassName,cellAttributes:[(0,Et.H0)()],rowIndexMapper:this.tableProps.rowIndexMapper,columnIndexMapper:this.tableProps.columnIndexMapper,disabledCellSelection:(t,e)=>this.tableProps.isDisabledCellSelection(t,e),cellCornerVisible:function(){return o.isCellCornerVisible(...arguments)},areaCornerVisible:function(){return o.isAreaCornerVisible(...arguments)},visualToRenderableCoords:t=>this.tableProps.visualToRenderableCoords(t),renderableToVisualCoords:t=>this.tableProps.renderableToVisualCoords(t),createCellCoords:(t,e)=>this.tableProps.createCellCoords(t,e),createCellRange:(t,e,o)=>this.tableProps.createCellRange(t,e,o)}),Er(xr,this,new vr(this.selectedRange,{rowIndexMapper:this.tableProps.rowIndexMapper,columnIndexMapper:this.tableProps.columnIndexMapper,countRenderableRows:()=>this.tableProps.countRenderableRows(),countRenderableColumns:()=>this.tableProps.countRenderableColumns(),visualToRenderableCoords:t=>this.tableProps.visualToRenderableCoords(t),renderableToVisualCoords:t=>this.tableProps.renderableToVisualCoords(t),findFirstNonHiddenRenderableRow:function(){return o.tableProps.findFirstNonHiddenRenderableRow(...arguments)},findFirstNonHiddenRenderableColumn:function(){return o.tableProps.findFirstNonHiddenRenderableColumn(...arguments)},createCellCoords:(t,e)=>this.tableProps.createCellCoords(t,e),fixedRowsBottom:()=>t.fixedRowsBottom,minSpareRows:()=>t.minSpareRows,minSpareCols:()=>t.minSpareCols,autoWrapRow:()=>t.autoWrapRow,autoWrapCol:()=>t.autoWrapCol})),Er(Mr,this,new vr(this.selectedRange,{rowIndexMapper:this.tableProps.rowIndexMapper,columnIndexMapper:this.tableProps.columnIndexMapper,countRenderableRows:()=>{const t=this.selectedRange.current();return this.tableProps.countRenderableRowsInRange(0,t.getOuterBottomEndCorner().row)},countRenderableColumns:()=>{const t=this.selectedRange.current();return this.tableProps.countRenderableColumnsInRange(0,t.getOuterBottomEndCorner().col)},visualToRenderableCoords:t=>this.tableProps.visualToRenderableCoords(t),renderableToVisualCoords:t=>this.tableProps.renderableToVisualCoords(t),findFirstNonHiddenRenderableRow:function(){return o.tableProps.findFirstNonHiddenRenderableRow(...arguments)},findFirstNonHiddenRenderableColumn:function(){return o.tableProps.findFirstNonHiddenRenderableColumn(...arguments)},createCellCoords:(t,e)=>this.tableProps.createCellCoords(t,e),fixedRowsBottom:()=>0,minSpareRows:()=>0,minSpareCols:()=>0,autoWrapRow:()=>!0,autoWrapCol:()=>!0})),Rr(xr,this).addLocalHook("beforeTransformStart",(function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return o.runLocalHooks("beforeModifyTransformStart",...e)})),Rr(xr,this).addLocalHook("afterTransformStart",(function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return o.runLocalHooks("afterModifyTransformStart",...e)})),Rr(xr,this).addLocalHook("beforeTransformEnd",(function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return o.runLocalHooks("beforeModifyTransformEnd",...e)})),Rr(xr,this).addLocalHook("afterTransformEnd",(function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return o.runLocalHooks("afterModifyTransformEnd",...e)})),Rr(xr,this).addLocalHook("insertRowRequire",(function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return o.runLocalHooks("insertRowRequire",...e)})),Rr(xr,this).addLocalHook("insertColRequire",(function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return o.runLocalHooks("insertColRequire",...e)})),Rr(xr,this).addLocalHook("beforeRowWrap",(function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return o.runLocalHooks("beforeRowWrap",...e)})),Rr(xr,this).addLocalHook("beforeColumnWrap",(function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return o.runLocalHooks("beforeColumnWrap",...e)})),Rr(Mr,this).addLocalHook("beforeTransformStart",(function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return o.runLocalHooks("beforeModifyTransformFocus",...e)})),Rr(Mr,this).addLocalHook("afterTransformStart",(function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return o.runLocalHooks("afterModifyTransformFocus",...e)}))}getSelectedRange(){return this.selectedRange}markSource(t){Er(Or,this,t)}markEndSource(){Er(Or,this,"unknown")}getSelectionSource(){return Rr(Or,this)}setExpectedLayers(t){Er(Ar,this,t)}begin(){this.inProgress=!0}finish(){this.runLocalHooks("afterSelectionFinished",Array.from(this.selectedRange)),this.inProgress=!1,Er(Ar,this,-1)}isInProgress(){return this.inProgress}setRangeStart(t,e){let o=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:t;const i="multiple"===this.settings.selectionMode,s=(0,r.b0)(e)?this.tableProps.getShortcutManager().isCtrlPressed():e,l=t.clone();Er(Ir,this,!1),this.runLocalHooks("beforeSetRangeStart"+(o?"Only":""),l),(!i||i&&!s&&(0,r.b0)(e))&&this.selectedRange.clear(),this.selectedRange.add(l).current().setHighlight(n.clone()),0===this.getLayerLevel()&&(this.selectedByRowHeader.clear(),this.selectedByColumnHeader.clear()),o||this.setRangeEnd(t)}setRangeStartOnly(t,e){let o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t;this.setRangeStart(t,e,!0,o)}setRangeEnd(t){if(this.selectedRange.isEmpty())return;const e=t.clone(),o=this.tableProps.countRows(),n=this.tableProps.countCols(),i=this.selectedRange.current().clone().setTo(t).isSingleHeader();if((o>0||n>0)&&(0===o&&e.col<0&&!i||0===n&&e.row<0&&!i))return;this.runLocalHooks("beforeSetRangeEnd",e),this.begin();const r=this.selectedRange.current();if(this.settings.navigableHeaders||r.highlight.normalize(),"single"===this.settings.selectionMode)r.setFrom(r.highlight),r.setTo(r.highlight);else{const t=r.getHorizontalDirection(),o=r.getVerticalDirection(),n=this.isMultiple();r.setTo(e),n&&(t!==r.getHorizontalDirection()||1===r.getWidth()&&!r.includes(r.highlight))&&r.from.assign({col:r.highlight.col}),n&&(o!==r.getVerticalDirection()||1===r.getHeight()&&!r.includes(r.highlight))&&r.from.assign({row:r.highlight.row})}o>0&&n>0&&(!this.settings.navigableHeaders||this.settings.navigableHeaders&&!r.isSingleHeader())&&r.to.normalize(),this.runLocalHooks("beforeHighlightSet"),this.setRangeFocus(this.selectedRange.current().highlight),this.applyAndCommit();const s=-1===Rr(Ar,this)||this.selectedRange.size()===Rr(Ar,this);this.runLocalHooks("afterSetRangeEnd",t,s)}applyAndCommit(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.selectedRange.current(),e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.getLayerLevel();const o=this.tableProps.countRows(),n=this.tableProps.countCols();e<this.highlight.layerLevel&&((0,V.z0)(this.highlight.getAreas(),(t=>{t.clear()})),(0,V.z0)(this.highlight.getLayeredAreas(),(t=>{t.clear()})),(0,V.z0)(this.highlight.getRowHeaders(),(t=>{t.clear()})),(0,V.z0)(this.highlight.getColumnHeaders(),(t=>{t.clear()})),(0,V.z0)(this.highlight.getActiveRowHeaders(),(t=>{t.clear()})),(0,V.z0)(this.highlight.getActiveColumnHeaders(),(t=>{t.clear()})),(0,V.z0)(this.highlight.getActiveCornerHeaders(),(t=>{t.clear()})),(0,V.z0)(this.highlight.getRowHighlights(),(t=>{t.clear()})),(0,V.z0)(this.highlight.getColumnHighlights(),(t=>{t.clear()}))),this.highlight.useLayerLevel(e);const i=this.highlight.createArea(),r=this.highlight.createLayeredArea(),s=this.highlight.createRowHeader(),l=this.highlight.createColumnHeader(),a=this.highlight.createActiveRowHeader(),h=this.highlight.createActiveColumnHeader(),c=this.highlight.createActiveCornerHeader(),d=this.highlight.createRowHighlight(),u=this.highlight.createColumnHighlight();if(i.clear(),r.clear(),s.clear(),l.clear(),a.clear(),h.clear(),c.clear(),d.clear(),u.clear(),this.highlight.isEnabledFor(Vi.LX,t.highlight)&&(this.isMultiple()||e>=1)&&(i.add(t.from).add(t.to).commit(),r.add(t.from).add(t.to).commit(),1===e)){const t=this.selectedRange.previous();this.highlight.useLayerLevel(e-1),this.highlight.createArea().add(t.from).commit().syncWith(t),this.highlight.createLayeredArea().add(t.from).commit().syncWith(t),this.highlight.useLayerLevel(e)}if(this.highlight.isEnabledFor(Vi.PP,t.highlight)){if(!t.isSingleHeader()){const e=this.tableProps.createCellCoords(Math.max(t.from.row,0),-1),o=this.tableProps.createCellCoords(t.to.row,-1),n=this.tableProps.createCellCoords(-1,Math.max(t.from.col,0)),i=this.tableProps.createCellCoords(-1,t.to.col);"single"===this.settings.selectionMode?(s.add(e).commit(),l.add(n).commit(),d.add(e).commit(),u.add(n).commit()):(s.add(e).add(o).commit(),l.add(n).add(i).commit(),d.add(e).add(o).commit(),u.add(n).add(i).commit())}const e=!Rr(Hr,this)&&this.isEntireRowSelected()&&(n>0&&n===t.getWidth()||0===n&&this.isSelectedByRowHeader()),i=!Rr(Hr,this)&&this.isEntireColumnSelected()&&(o>0&&o===t.getHeight()||0===o&&this.isSelectedByColumnHeader());e&&a.add(this.tableProps.createCellCoords(Math.max(t.from.row,0),Math.min(-this.tableProps.countRowHeaders(),-1))).add(this.tableProps.createCellCoords(Math.max(t.to.row,0),-1)).commit(),i&&h.add(this.tableProps.createCellCoords(Math.min(-this.tableProps.countColHeaders(),-1),Math.max(t.from.col,0))).add(this.tableProps.createCellCoords(-1,Math.max(t.to.col,0))).commit(),e&&i&&c.add(this.tableProps.createCellCoords(-this.tableProps.countColHeaders(),-this.tableProps.countRowHeaders())).add(this.tableProps.createCellCoords(-1,-1)).commit()}}setRangeFocus(t){if(this.selectedRange.isEmpty())return;const e=this.selectedRange.current();this.inProgress||this.runLocalHooks("beforeSetFocus",t);const o=this.highlight.getFocus();o.clear(),e.setHighlight(t),this.inProgress||this.runLocalHooks("beforeHighlightSet"),this.highlight.isEnabledFor(Vi.Yt,e.highlight)&&o.add(e.highlight).commit().syncWith(e),this.inProgress||(Er(Ir,this,!0),this.runLocalHooks("afterSetFocus",e.highlight))}transformStart(t,e){let o=arguments.length>2&&void 0!==arguments[2]&&arguments[2];this.settings.navigableHeaders?Rr(xr,this).setOffsetSize({x:this.tableProps.countRowHeaders(),y:this.tableProps.countColHeaders()}):Rr(xr,this).resetOffsetSize(),this.setRangeStart(Rr(xr,this).transformStart(t,e,o))}transformEnd(t,e){this.settings.navigableHeaders?Rr(xr,this).setOffsetSize({x:this.tableProps.countRowHeaders(),y:this.tableProps.countColHeaders()}):Rr(xr,this).resetOffsetSize(),this.setRangeEnd(Rr(xr,this).transformEnd(t,e))}transformFocus(t,e){const o=this.selectedRange.current(),{row:n,col:i}=o.getOuterTopStartCorner(),r=this.tableProps.countRenderableColumnsInRange(0,i-1),s=this.tableProps.countRenderableRowsInRange(0,n-1);o.highlight.isHeader()?Rr(Mr,this).setOffsetSize({x:i<0?Math.abs(i):-r,y:n<0?Math.abs(n):-s}):Rr(Mr,this).setOffsetSize({x:i<0?0:-r,y:n<0?0:-s});const l=Rr(Mr,this).transformStart(t,e);this.setRangeFocus(l.normalize())}shiftRows(t,e){if(!this.isSelected())return;const o=this.selectedRange.current();if(this.isSelectedByCorner())this.selectAll(!0,!0,{disableHeadersHighlight:!0});else if(this.isSelectedByColumnHeader()||o.getOuterTopStartCorner().row>=t){const{from:n,to:i,highlight:r}=o,s=this.tableProps.countRows(),l=this.isSelectedByRowHeader(),a=this.isSelectedByColumnHeader(),h=a?-1:0,c=a?0:e;this.getSelectedRange().pop();const d=this.tableProps.createCellCoords((0,U.qE)(n.row+c,h,s-1),n.col),u=this.tableProps.createCellCoords((0,U.qE)(i.row+e,h,s-1),i.col);this.markSource("shift"),r.row>=t?this.setRangeStartOnly(d,!0,this.tableProps.createCellCoords((0,U.qE)(r.row+e,0,s-1),r.col)):this.setRangeStartOnly(d,!0),l&&this.selectedByRowHeader.add(this.getLayerLevel()),a&&this.selectedByColumnHeader.add(this.getLayerLevel()),this.setRangeEnd(u),this.markEndSource()}}shiftColumns(t,e){if(!this.isSelected())return;const o=this.selectedRange.current();if(this.isSelectedByCorner())this.selectAll(!0,!0,{disableHeadersHighlight:!0});else if(this.isSelectedByRowHeader()||o.getOuterTopStartCorner().col>=t){const{from:n,to:i,highlight:r}=o,s=this.tableProps.countCols(),l=this.isSelectedByRowHeader(),a=this.isSelectedByColumnHeader(),h=l?-1:0,c=l?0:e;this.getSelectedRange().pop();const d=this.tableProps.createCellCoords(n.row,(0,U.qE)(n.col+c,h,s-1)),u=this.tableProps.createCellCoords(i.row,(0,U.qE)(i.col+e,h,s-1));this.markSource("shift"),r.col>=t?this.setRangeStartOnly(d,!0,this.tableProps.createCellCoords(r.row,(0,U.qE)(r.col+e,0,s-1))):this.setRangeStartOnly(d,!0),l&&this.selectedByRowHeader.add(this.getLayerLevel()),a&&this.selectedByColumnHeader.add(this.getLayerLevel()),this.setRangeEnd(u),this.markEndSource()}}getLayerLevel(){return this.selectedRange.size()-1}isSelected(){return!this.selectedRange.isEmpty()}isMultiple(){if(!this.isSelected())return!1;const t=(0,v.nA)(!this.selectedRange.current().isSingle());return this.runLocalHooks("afterIsMultipleSelection",t),t.value}isFocusSelectionChanged(){return this.isSelected()&&Rr(Ir,this)}isSelectedByRowHeader(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.getLayerLevel();return!this.isSelectedByCorner(t)&&(-1===t?this.selectedByRowHeader.size>0:this.selectedByRowHeader.has(t))}isEntireRowSelected(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.getLayerLevel();const e=t=>{const{col:e}=t.getOuterTopStartCorner(),o=this.tableProps.countRowHeaders(),n=this.tableProps.countCols();return(o>0&&e<0||0===o)&&t.getWidth()===n};if(-1===t)return Array.from(this.selectedRange).some((t=>e(t)));const o=this.selectedRange.peekByIndex(t);return!!o&&e(o)}isSelectedByColumnHeader(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.getLayerLevel();return!this.isSelectedByCorner()&&(-1===t?this.selectedByColumnHeader.size>0:this.selectedByColumnHeader.has(t))}isEntireColumnSelected(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.getLayerLevel();const e=t=>{const{row:e}=t.getOuterTopStartCorner(),o=this.tableProps.countColHeaders(),n=this.tableProps.countRows();return(o>0&&e<0||0===o)&&t.getHeight()===n};if(-1===t)return Array.from(this.selectedRange).some((t=>e(t)));const o=this.selectedRange.peekByIndex(t);return!!o&&e(o)}isSelectedByAnyHeader(){return this.isSelectedByRowHeader(-1)||this.isSelectedByColumnHeader(-1)||this.isSelectedByCorner()}isSelectedByCorner(){return this.selectedByColumnHeader.has(this.getLayerLevel())&&this.selectedByRowHeader.has(this.getLayerLevel())}inInSelection(t){return this.selectedRange.includes(t)}isCellCornerVisible(){return this.settings.fillHandle&&!this.tableProps.isEditorOpened()&&!this.isMultiple()}isCellVisible(t){const e=this.tableProps.visualToRenderableCoords(t);return null!==e.row&&null!==e.col}isAreaCornerVisible(t){return(!Number.isInteger(t)||t===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 t;let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],o=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{focusPosition:!1,disableHeadersHighlight:!1};const i=this.tableProps.countRows(),r=this.tableProps.countCols(),s=this.tableProps.countRowHeaders(),l=this.tableProps.countColHeaders(),a=o?-l:0,h=e?-s:0;if(0===a&&0===h&&(0===i||0===r))return;let c=null===(t=this.getSelectedRange().current())||void 0===t?void 0:t.highlight;const{focusPosition:d,disableHeadersHighlight:u}=n;Er(Hr,this,u),d&&Number.isInteger(null==d?void 0:d.row)&&Number.isInteger(null==d?void 0:d.col)&&(c=this.tableProps.createCellCoords((0,U.qE)(d.row,a,i-1),(0,U.qE)(d.col,h,r-1)));const g=this.tableProps.createCellCoords(a,h),f=this.tableProps.createCellCoords(i-1,r-1);this.clear(),this.setRangeStartOnly(g,void 0,c),h<0&&this.selectedByRowHeader.add(this.getLayerLevel()),a<0&&this.selectedByColumnHeader.add(this.getLayerLevel()),this.setRangeEnd(f),this.finish(),Er(Hr,this,!1)}selectCells(t){var e=this;const o=(0,yr.ML)(t);if(o===yr.Qz)return!1;if(o===yr.ay)throw new Error(It.O`Unsupported format of the selection ranges was passed. To select cells pass\x20
- the coordinates as an array of arrays ([[rowStart, columnStart/columnPropStart, rowEnd,\x20
- columnEnd/columnPropEnd]]) or as an array of CellRange objects.`);const n=(0,yr._e)(o,{createCellCoords:function(){return e.tableProps.createCellCoords(...arguments)},createCellRange:function(){return e.tableProps.createCellRange(...arguments)},propToCol:t=>this.tableProps.propToCol(t),keepDirection:!0}),i=this.settings.navigableHeaders,r={countRows:this.tableProps.countRows(),countCols:this.tableProps.countCols(),countRowHeaders:i?this.tableProps.countRowHeaders():0,countColHeaders:i?this.tableProps.countColHeaders():0},s=!t.some((t=>{const e=n(t),o=e.isValid(r);return!(o&&!e.containsHeaders()||o&&e.containsHeaders()&&e.isSingleHeader())}));return s&&(this.clear(),this.setExpectedLayers(t.length),(0,V.z0)(t,(t=>{const{from:e,to:o}=n(t);this.setRangeStartOnly(e.clone(),!1),this.setRangeEnd(o.clone())})),this.finish()),s}selectColumns(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;const n="string"==typeof t?this.tableProps.propToCol(t):t,i="string"==typeof e?this.tableProps.propToCol(e):e,r=this.tableProps.countRows(),s=this.tableProps.countCols(),l=this.tableProps.countColHeaders(),a=0===l?0:-l,h=this.tableProps.createCellCoords(a,n),c=this.tableProps.createCellCoords(r-1,i),d=this.tableProps.createCellRange(h,h,c).isValid({countRows:r,countCols:s,countRowHeaders:0,countColHeaders:l});if(d){let t=0,e=0;Number.isInteger(null==o?void 0:o.row)&&Number.isInteger(null==o?void 0:o.col)?(t=(0,U.qE)(o.row,a,r-1),e=(0,U.qE)(o.col,Math.min(n,i),Math.max(n,i))):(t=(0,U.qE)(o,a,r-1),e=n);const s=this.tableProps.createCellCoords(t,e),h=0===l?0:(0,U.qE)(s.row,a,-1),c=r-1,d=this.tableProps.createCellCoords(h,n),u=this.tableProps.createCellCoords(c,i);this.runLocalHooks("beforeSelectColumns",d,u,s),d.row=h,u.row=c,this.setRangeStartOnly(d,void 0,s),this.selectedByColumnHeader.add(this.getLayerLevel()),this.setRangeEnd(u),this.runLocalHooks("afterSelectColumns",d,u,s),this.finish()}return d}selectRows(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;const n=this.tableProps.countRows(),i=this.tableProps.countCols(),r=this.tableProps.countRowHeaders(),s=0===r?0:-r,l=this.tableProps.createCellCoords(t,s),a=this.tableProps.createCellCoords(e,i-1),h=this.tableProps.createCellRange(l,l,a).isValid({countRows:n,countCols:i,countRowHeaders:r,countColHeaders:0});if(h){let n=0,l=0;Number.isInteger(null==o?void 0:o.row)&&Number.isInteger(null==o?void 0:o.col)?(n=(0,U.qE)(o.row,Math.min(t,e),Math.max(t,e)),l=(0,U.qE)(o.col,s,i-1)):(n=t,l=(0,U.qE)(o,s,i-1));const a=this.tableProps.createCellCoords(n,l),h=0===r?0:(0,U.qE)(a.col,s,-1),c=i-1,d=this.tableProps.createCellCoords(t,h),u=this.tableProps.createCellCoords(e,c);this.runLocalHooks("beforeSelectRows",d,u,a),d.col=h,u.col=c,this.setRangeStartOnly(d,void 0,a),this.selectedByRowHeader.add(this.getLayerLevel()),this.setRangeEnd(u),this.runLocalHooks("afterSelectRows",d,u,a),this.finish()}return h}refresh(){if(!this.isSelected())return;const t=this.tableProps.countRows(),e=this.tableProps.countCols();if(0===t||0===e)return void this.deselect();const o=this.selectedRange.peekByIndex(this.selectedRange.size()-1),{from:n,to:i,highlight:r}=o;this.clear(),r.assign({row:(0,U.qE)(r.row,-1/0,t-1),col:(0,U.qE)(r.col,-1/0,e-1)}),n.assign({row:(0,U.qE)(n.row,-1/0,t-1),col:(0,U.qE)(n.col,-1/0,e-1)}),i.assign({row:(0,U.qE)(i.row,0,t-1),col:(0,U.qE)(i.col,0,e-1)}),this.selectedRange.ranges.push(o),this.highlight.isEnabledFor(Vi.Yt,this.selectedRange.current().highlight)&&this.highlight.getFocus().add(r).commit().syncWith(o),this.applyAndCommit(o)}commit(){if(this.highlight.getCustomSelections().forEach((t=>{t.commit()})),!this.isSelected())return;const t=this.getLayerLevel(),e=this.selectedRange.current();this.highlight.isEnabledFor(Vi.Yt,e.highlight)&&this.highlight.getFocus().commit().syncWith(e);for(let t=0;t<this.selectedRange.size();t+=1){this.highlight.useLayerLevel(t);const e=this.highlight.createArea(),o=this.highlight.createLayeredArea(),n=this.highlight.createRowHeader(),i=this.highlight.createColumnHeader(),r=this.highlight.createActiveRowHeader(),s=this.highlight.createActiveColumnHeader(),l=this.highlight.createActiveCornerHeader(),a=this.highlight.createRowHighlight(),h=this.highlight.createColumnHighlight();e.commit(),o.commit(),n.commit(),i.commit(),r.commit(),s.commit(),l.commit(),a.commit(),h.commit()}this.highlight.useLayerLevel(t)}}(0,v.co)(kr,Zn.A);const _r=kr;var Nr=o(360);function Pr(t,e){let o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t;const n="string"==typeof e.type?(0,Nr.r0)(e.type):e.type;if(t._automaticallyAssignedMetaProps&&(0,v.v4)(e,((e,o)=>{t._automaticallyAssignedMetaProps.delete(o)})),!(0,v.Gv)(n))return;o!==t||t._automaticallyAssignedMetaProps||(t._automaticallyAssignedMetaProps=new Set);const i={};(0,v.v4)(n,((e,n)=>{var r;(function(t,e){var o;return"CELL_TYPE"!==t&&((null===(o=e._automaticallyAssignedMetaProps)||void 0===o?void 0:o.has(t))||!(0,v.mQ)(e,t))})(n,o)&&(i[n]=e,null===(r=t._automaticallyAssignedMetaProps)||void 0===r||r.add(n))})),(0,v.X$)(t,i)}function Lr(t){return Number.isInteger(t)&&t>=0}function Dr(t,e){if(!t())throw new Error(`Assertion failed: ${e}`)}function Vr(t){return null==t}const Fr=()=>({_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(t){let e,o,n;for(e=0,o=this.countRows();e<o;e++)if(n=this.getDataAtCell(e,t),!1===(0,r.Im)(n))return!1;return!0},isEmptyRow(t){let e,o,n,i;for(e=0,o=this.countCols();e<o;e++)if(n=this.getDataAtCell(t,e),!1===(0,r.Im)(n))return"object"==typeof n&&(i=this.getCellMeta(t,e),(0,v.wU)(this.getSchema()[i.prop],n));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,themeName:void 0,tabMoves:{row:0,col:1},title:void 0,trimDropdown:!0,trimRows:void 0,trimWhitespace:!0,type:"text",uncheckedTemplate:void 0,undo:!0,validator:void 0,viewportColumnRenderingOffset:"auto",viewportRowRenderingOffset:"auto",viewportColumnRenderingThreshold:0,viewportRowRenderingThreshold:0,visibleRows:10,width:void 0,wordWrap:!0});function Br(t,e,o){return(e=function(t){var e=function(t){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var o=e.call(t,"string");if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[e]=o,t}class Wr{constructor(t){Br(this,"metaCtor",class{}),Br(this,"meta",void 0),this.meta=this.metaCtor.prototype,(0,v.X$)(this.meta,Fr()),this.meta.instance=t}getMetaConstructor(){return this.metaCtor}getMeta(){return this.meta}updateMeta(t){var e;(0,v.X$)(this.meta,t),Pr(this.meta,{...t,type:null!==(e=t.type)&&void 0!==e?e:this.meta.type},t)}}class zr{constructor(t){var e,o,n;e=this,n=void 0,(o=function(t){var e=function(t){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var o=e.call(t,"string");if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:e+""}(o="meta"))in e?Object.defineProperty(e,o,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[o]=n;const i=t.getMetaConstructor();this.meta=new i}getMeta(){return this.meta}updateMeta(t){(0,v.X$)(this.meta,t),Pr(this.meta,t,t)}}function jr(t,e,o){return(e=function(t){var e=function(t){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var o=e.call(t,"string");if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[e]=o,t}class Ur{constructor(t){jr(this,"valueFactory",void 0),jr(this,"data",[]),jr(this,"index",[]),jr(this,"holes",new Set),this.valueFactory=t}obtain(t){Dr((()=>Lr(t)),"Expecting an unsigned number.");const e=this._getStorageIndexByKey(t);let o;if(e>=0)o=this.data[e],void 0===o&&(o=this.valueFactory(t),this.data[e]=o);else if(o=this.valueFactory(t),this.holes.size>0){const e=this.holes.values().next().value;this.holes.delete(e),this.data[e]=o,this.index[t]=e}else this.data.push(o),this.index[t]=this.data.length-1;return o}insert(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;Dr((()=>Lr(t)||Vr(t)),"Expecting an unsigned number or null/undefined argument.");const o=[],n=this.data.length;for(let t=0;t<e;t++)o.push(n+t),this.data.push(void 0);const i=Vr(t)?this.index.length:t;this.index=[...this.index.slice(0,i),...o,...this.index.slice(i)]}remove(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;Dr((()=>Lr(t)||Vr(t)),"Expecting an unsigned number or null/undefined argument.");const o=this.index.splice(Vr(t)?this.index.length-e:t,e);for(let t=0;t<o.length;t++){const e=o[t];"number"==typeof e&&this.holes.add(e)}}size(){return this.data.length-this.holes.size}values(){return this.data.filter(((t,e)=>void 0!==t&&!this.holes.has(e)))[Symbol.iterator]()}entries(){const t=[];for(let e=0;e<this.data.length;e++){const o=this._getKeyByStorageIndex(e);-1!==o&&void 0!==this.data[e]&&t.push([o,this.data[e]])}let e=0;return{next:()=>{if(e<t.length){const o=t[e];return e+=1,{value:o,done:!1}}return{done:!0}}}}clear(){this.data=[],this.index=[],this.holes.clear()}_getStorageIndexByKey(t){return this.index.length>t?this.index[t]:-1}_getKeyByStorageIndex(t){return this.index.indexOf(t)}[Symbol.iterator](){return this.entries()}}function $r(t,e,o){return(e=function(t){var e=function(t){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var o=e.call(t,"string");if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[e]=o,t}const Gr=["data","width"];class Yr{constructor(t){$r(this,"globalMeta",void 0),$r(this,"metas",new Ur((()=>this._createMeta()))),this.globalMeta=t,this.metas=new Ur((()=>this._createMeta()))}updateMeta(t,e){const o=this.getMeta(t);(0,v.X$)(o,e),Pr(o,e)}createColumn(t,e){this.metas.insert(t,e)}removeColumn(t,e){this.metas.remove(t,e)}getMeta(t){return this.metas.obtain(t)}getMetaConstructor(t){return this.metas.obtain(t).constructor}clearCache(){this.metas.clear()}_createMeta(){return function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];function o(){}(0,v.IL)(o,t);for(let t=0;t<e.length;t++)o.prototype[e[t]]=void 0;return o}(this.globalMeta.getMetaConstructor(),Gr).prototype}}function Xr(t,e,o){return(e=function(t){var e=function(t){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var o=e.call(t,"string");if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[e]=o,t}class qr{constructor(t){Xr(this,"columnMeta",void 0),Xr(this,"metas",new Ur((()=>this._createRow()))),this.columnMeta=t}updateMeta(t,e,o){const n=this.getMeta(t,e);(0,v.X$)(n,o),Pr(n,o)}createRow(t,e){this.metas.insert(t,e)}createColumn(t,e){for(let o=0;o<this.metas.size();o++)this.metas.obtain(o).insert(t,e)}removeRow(t,e){this.metas.remove(t,e)}removeColumn(t,e){for(let o=0;o<this.metas.size();o++)this.metas.obtain(o).remove(t,e)}getMeta(t,e,o){const n=this.metas.obtain(t).obtain(e);return void 0===o?n:n[o]}setMeta(t,e,o,n){var i;const r=this.metas.obtain(t).obtain(e);null===(i=r._automaticallyAssignedMetaProps)||void 0===i||i.delete(o),r[o]=n}removeMeta(t,e,o){delete this.metas.obtain(t).obtain(e)[o]}getMetas(){const t=[],e=Array.from(this.metas.values());for(let o=0;o<e.length;o++)(0,r.O9)(e[o])&&t.push(...e[o].values());return t}getMetasAtRow(t){Dr((()=>Lr(t)),"Expecting an unsigned number.");const e=new Map(this.metas);return e.has(t)?Array.from(e.get(t).values()):[]}clearCache(){this.metas.clear()}_createRow(){return new Ur((t=>this._createMeta(t)))}_createMeta(t){return new(this.columnMeta.getMetaConstructor(t))}}class Kr{constructor(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];this.hot=t,this.globalMeta=new Wr(t),this.tableMeta=new zr(this.globalMeta),this.columnMeta=new Yr(this.globalMeta),this.cellMeta=new qr(this.columnMeta),o.forEach((t=>new t(this))),this.globalMeta.updateMeta(e)}getGlobalMeta(){return this.globalMeta.getMeta()}updateGlobalMeta(t){this.globalMeta.updateMeta(t)}getTableMeta(){return this.tableMeta.getMeta()}updateTableMeta(t){this.tableMeta.updateMeta(t)}getColumnMeta(t){return this.columnMeta.getMeta(t)}updateColumnMeta(t,e){this.columnMeta.updateMeta(t,e)}getCellMeta(t,e,o){const n=this.cellMeta.getMeta(t,e);return n.visualRow=o.visualRow,n.visualCol=o.visualColumn,n.row=t,n.col=e,o.skipMetaExtension||this.runLocalHooks("afterGetCellMeta",n),n}getCellMetaKeyValue(t,e,o){if("string"!=typeof o)throw new Error("The passed cell meta object key is not a string");return this.cellMeta.getMeta(t,e,o)}setCellMeta(t,e,o,n){this.cellMeta.setMeta(t,e,o,n)}updateCellMeta(t,e,o){this.cellMeta.updateMeta(t,e,o)}removeCellMeta(t,e,o){this.cellMeta.removeMeta(t,e,o)}getCellsMeta(){return this.cellMeta.getMetas()}getCellsMetaAtRow(t){return this.cellMeta.getMetasAtRow(t)}createRow(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;this.cellMeta.createRow(t,e)}removeRow(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;this.cellMeta.removeRow(t,e)}createColumn(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;this.cellMeta.createColumn(t,e),this.columnMeta.createColumn(t,e)}removeColumn(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;this.cellMeta.removeColumn(t,e),this.columnMeta.removeColumn(t,e)}clearCellsCache(){this.cellMeta.clearCache()}clearCache(){this.cellMeta.clearCache(),this.columnMeta.clearCache()}}function Qr(t,e,o){return(e=function(t){var e=function(t){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var o=e.call(t,"string");if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[e]=o,t}(0,v.co)(Kr,Zn.A);class Jr{constructor(t){var e=this;Qr(this,"metaManager",void 0),Qr(this,"metaSyncMemo",new Map),this.metaManager=t,t.addLocalHook("afterGetCellMeta",(function(){return e.extendCellMeta(...arguments)})),yi.R.getSingleton().add("beforeRender",(t=>{t&&this.metaSyncMemo.clear()}),this.metaManager.hot)}extendCellMeta(t){var e;const{row:o,col:n}=t;if(null!==(e=this.metaSyncMemo.get(o))&&void 0!==e&&e.has(n))return;const{visualRow:r,visualCol:s}=t,l=this.metaManager.hot,a=l.colToProp(s);t.prop=a,l.runHooks("beforeGetCellMeta",r,s,t);const h=(0,v.mQ)(t,"type")?t.type:null;let c=(0,i.Tn)(t.cells)?t.cells(o,n,a):null;var d;h&&(c?c.type=null!==(d=c.type)&&void 0!==d?d:h:c={type:h}),c&&this.metaManager.updateCellMeta(o,n,c),l.runHooks("afterGetCellMeta",r,s,t),this.metaSyncMemo.has(o)||this.metaSyncMemo.set(o,new Set),this.metaSyncMemo.get(o).add(n)}}function Zr(t,e,o){return(e=function(t){var e=function(t){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var o=e.call(t,"string");if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[e]=o,t}var ts=new WeakMap;class es{constructor(t){var e,o,n;Zr(this,"metaManager",void 0),Zr(this,"usageTracker",new Set),Zr(this,"propDescriptors",new Map([["ariaTags",{initOnly:!0}],["fixedColumnsLeft",{target:"fixedColumnsStart",onChange(t){if(this.metaManager.hot.isRtl()&&"fixedColumnsLeft"===t)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}]])),n=(t,e,o)=>{if(!o)throw new Error(`The \`${t}\` option can not be updated after the Handsontable is initialized.`)},function(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e=this,o=ts),o.set(e,n),this.metaManager=t,this.extendMetaProps()}extendMetaProps(){this.propDescriptors.forEach(((t,e)=>{const{initOnly:o,target:n,onChange:i}=t,r="string"==typeof n,s=r?n:e,l=`_${s}`;var a,h;this.metaManager.globalMeta.meta[l]=this.metaManager.globalMeta.meta[s],i?(this.installPropWatcher(e,l,i),r&&this.installPropWatcher(n,l,i)):o&&(this.installPropWatcher(e,l,(h=this,(a=ts).get(function(t,e,o){if("function"==typeof t?t===e:t.has(e))return arguments.length<3?e:o;throw new TypeError("Private element is not present on this object")}(a,h)))),this.metaManager.globalMeta.meta._initOnlySettings||(this.metaManager.globalMeta.meta._initOnlySettings=[]),this.metaManager.globalMeta.meta._initOnlySettings.push(e))}))}installPropWatcher(t,e,o){const n=this;Object.defineProperty(this.metaManager.globalMeta.meta,t,{get(){return this[e]},set(i){const r=!n.usageTracker.has(t);n.usageTracker.add(t),o.call(n,t,i,r),this[e]=i},enumerable:!0,configurable:!0})}}var os=o(3431);function ns(t,e,o){return(e=function(t){var e=function(t){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var o=e.call(t,"string");if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[e]=o,t}class is{static get DESTINATION_RENDERER(){return 1}static get DESTINATION_CLIPBOARD_GENERATOR(){return 2}constructor(t,e,o){ns(this,"hot",void 0),ns(this,"metaManager",void 0),ns(this,"tableMeta",void 0),ns(this,"dataSource",void 0),ns(this,"duckSchema",void 0),ns(this,"colToPropCache",void 0),ns(this,"propToColCache",void 0),this.hot=t,this.metaManager=o,this.tableMeta=o.getTableMeta(),this.dataSource=e,this.refreshDuckSchema(),this.createMap()}createMap(){const t=this.getSchema();if(void 0===t)throw new Error("trying to create `columns` definition but you didn't provide `schema` nor `data`");const e=this.tableMeta.columns;let o;if(this.colToPropCache=[],this.propToColCache=new Map,e){let n=0,i=0,r=!1;if("function"==typeof e){const e=(0,v.$3)(t);n=e>0?e:this.countFirstRowKeys(),r=!0}else{const t=this.tableMeta.maxCols;n=Math.min(t,e.length)}for(o=0;o<n;o++){const t=r?e(o):e[o];if((0,v.Gv)(t)){if(void 0!==t.data){const e=r?i:o;this.colToPropCache[e]=t.data,this.propToColCache.set(t.data,e)}i+=1}}}else this.recursiveDuckColumns(t)}countFirstRowKeys(){return(0,zn.E)(this.dataSource)}recursiveDuckColumns(t,e,o){let n,i=e,r=o;return void 0===i&&(i=0,r=""),"object"!=typeof t||Array.isArray(t)||(0,v.v4)(t,((t,e)=>{null===t?(n=r+e,this.colToPropCache.push(n),this.propToColCache.set(n,i),i+=1):i=this.recursiveDuckColumns(t,i,`${e}.`)})),i}colToProp(t){if(!1===Number.isInteger(t))return t;const e=this.hot.toPhysicalColumn(t);return null===e?t:this.colToPropCache&&(0,r.O9)(this.colToPropCache[e])?this.colToPropCache[e]:e}propToCol(t){const e=this.propToColCache.get(t);if((0,r.O9)(e))return this.hot.toVisualColumn(e);const o=this.hot.toVisualColumn(t);return null===o?t:o}getSchema(){const t=this.tableMeta.dataSchema;return t?"function"==typeof t?t():t:this.duckSchema}createDuckSchema(){return this.dataSource&&this.dataSource[0]?(0,v.Nl)(this.dataSource[0]):{}}refreshDuckSchema(){this.duckSchema=this.createDuckSchema()}createRow(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,{source:o,mode:n="above"}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const i=this.hot.countSourceRows();let r=i,s=0,l=t;if(("number"!=typeof l||l>=i)&&(l=i),l<this.hot.countRows()&&(r=this.hot.toPhysicalRow(l)),!1===this.hot.runHooks("beforeCreateRow",l,e,o)||null===r)return{delta:0};const a=this.tableMeta.maxRows,h=this.getSchema().length,c=[];for(;s<e&&i+s<a;){let t=null;"array"===this.hot.dataType?this.tableMeta.dataSchema?t=(0,v.Go)(this.getSchema()):(t=[],(0,U.Ti)(h-1,(()=>t.push(null)))):"function"===this.hot.dataType?t=this.tableMeta.dataSchema(l+s):(t={},(0,v.zw)(t,this.getSchema())),c.push(t),s+=1}this.hot.rowIndexMapper.insertIndexes(l,s),"below"===n&&(r=Math.min(r+1,i)),this.spliceData(r,0,c);const d=this.hot.toVisualRow(r);return this.hot.countSourceRows()===c.length&&this.hot.columnIndexMapper.initToLength(this.hot.getInitialColumnCount()),s>0&&(null==t?this.metaManager.createRow(null,s):"auto"!==o&&this.metaManager.createRow(r,e)),this.hot.runHooks("afterCreateRow",d,s,o),{delta:s,startPhysicalIndex:r}}createCol(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,{source:o,mode:n="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,r=this.tableMeta.maxCols,s=this.hot.countSourceCols();let l=t;if(("number"!=typeof l||l>=s)&&(l=s),!1===this.hot.runHooks("beforeCreateCol",l,e,o))return{delta:0};let a=s;l<this.hot.countCols()&&(a=this.hot.toPhysicalColumn(l));const h=this.hot.countSourceRows();let c=this.hot.countCols(),d=0,u=a;"end"===n&&(u=Math.min(u+1,s));const g=u;for(;d<e&&c<r;){if("number"!=typeof l||l>=c)if(h>0)for(let t=0;t<h;t+=1)void 0===i[t]&&(i[t]=[]),i[t].push(null);else i.push([null]);else for(let t=0;t<h;t++)i[t].splice(u,0,null);d+=1,u+=1,c+=1}this.hot.columnIndexMapper.insertIndexes(l,d),d>0&&(null==t?this.metaManager.createColumn(null,d):"auto"!==o&&this.metaManager.createColumn(g,e));const f=this.hot.toVisualColumn(g);return this.hot.runHooks("afterCreateCol",f,d,o),this.refreshDuckSchema(),{delta:d,startPhysicalIndex:g}}removeRow(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,o=arguments.length>2?arguments[2]:void 0,n=Number.isInteger(t)?t:-e;const i=this.visualRowsToPhysical(n,e),s=this.hot.countSourceRows();if(n=(s+n)%s,!1===this.hot.runHooks("beforeRemoveRow",n,i.length,i,o))return!1;const l=i.length;if(this.filterData(n,l,i),n<this.hot.countRows()){this.hot.rowIndexMapper.removeIndexes(i);const t=(0,r.O9)(this.tableMeta.columns)||(0,r.O9)(this.tableMeta.dataSchema)||this.tableMeta.colHeaders;0!==this.hot.rowIndexMapper.getNotTrimmedIndexesLength()||t||this.hot.columnIndexMapper.setIndexesSequence([])}return i.slice(0).sort(((t,e)=>e-t)).forEach((t=>{this.metaManager.removeRow(t,1)})),this.hot.runHooks("afterRemoveRow",n,l,i,o),!0}removeCol(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,o=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 n="number"!=typeof t?-e:t;n=(this.hot.countCols()+n)%this.hot.countCols();const i=this.visualColumnsToPhysical(n,e),r=i.slice(0).sort(((t,e)=>e-t));if(!1===this.hot.runHooks("beforeRemoveCol",n,e,i,o))return!1;let s=!0;const l=r.length,a=this.dataSource;for(let t=0;t<l;t++)s&&i[0]!==i[t]-t&&(s=!1);if(s)for(let t=0,o=this.hot.countSourceRows();t<o;t++)a[t].splice(i[0],e),0===t&&this.metaManager.removeColumn(i[0],e);else for(let t=0,e=this.hot.countSourceRows();t<e;t++)for(let e=0;e<l;e++)a[t].splice(r[e],1),0===t&&this.metaManager.removeColumn(r[e],1);return n<this.hot.countCols()&&(this.hot.columnIndexMapper.removeIndexes(i),this.tableMeta.rowHeaders||0!==this.hot.columnIndexMapper.getNotTrimmedIndexesLength()||this.hot.rowIndexMapper.setIndexesSequence([])),this.hot.runHooks("afterRemoveCol",n,e,i,o),this.refreshDuckSchema(),!0}spliceCol(t,e,o){const n=this.hot.getDataAtCol(t),i=n.slice(e,e+o),r=n.slice(e+o);for(var s=arguments.length,l=new Array(s>3?s-3:0),a=3;a<s;a++)l[a-3]=arguments[a];(0,V.Sh)(l,r);let h=0;for(;h<o;)l.push(null),h+=1;return(0,V.Zz)(l),this.hot.populateFromArray(e,t,l,null,null,"spliceCol"),i}spliceRow(t,e,o){const n=this.hot.getSourceDataAtRow(t),i=n.slice(e,e+o),r=n.slice(e+o);for(var s=arguments.length,l=new Array(s>3?s-3:0),a=3;a<s;a++)l[a-3]=arguments[a];(0,V.Sh)(l,r);let h=0;for(;h<o;)l.push(null),h+=1;return this.hot.populateFromArray(t,e,[l],null,null,"spliceRow"),i}spliceData(t,e,o){if(!1!==this.hot.runHooks("beforeDataSplice",t,e,o)){const e=[...this.dataSource.slice(0,t),...o,...this.dataSource.slice(t)];this.dataSource.length=0,e.forEach((t=>this.dataSource.push(t)))}}filterData(t,e,o){let n=this.hot.runHooks("filterData",t,e,o);!1===Array.isArray(n)&&(n=this.dataSource.filter(((t,e)=>-1===o.indexOf(e)))),this.dataSource.length=0,Array.prototype.push.apply(this.dataSource,n)}get(t,e){const o=this.hot.toPhysicalRow(t);let n=this.dataSource[o];const i=this.hot.runHooks("modifyRowData",o);n=isNaN(i)?i:n;const{dataDotNotation:r}=this.hot.getSettings();let s=null;if(n&&n.hasOwnProperty&&(0,v.mQ)(n,e))s=n[e];else if(r&&"string"==typeof e&&e.indexOf(".")>-1){let t=n;if(!t)return null;const o=e.split(".");for(let e=0,n=o.length;e<n;e++)if(t=t[o[e]],void 0===t)return null;s=t}else"function"==typeof e&&(s=e(this.dataSource.slice(o,o+1)[0]));if(this.hot.hasHook("modifyData")){const t=(0,v.nA)(s);this.hot.runHooks("modifyData",o,this.propToCol(e),t,"get"),t.isTouched()&&(s=t.value)}return s}getCopyable(t,e){return this.hot.getCellMeta(t,this.propToCol(e)).copyable?this.get(t,e):""}set(t,e,o){const n=this.hot.toPhysicalRow(t);let i=o,r=this.dataSource[n];const s=this.hot.runHooks("modifyRowData",n);if(r=isNaN(s)?s:r,this.hot.hasHook("modifyData")){const t=(0,v.nA)(i);this.hot.runHooks("modifyData",n,this.propToCol(e),t,"set"),t.isTouched()&&(i=t.value)}const{dataDotNotation:l}=this.hot.getSettings();if(r&&r.hasOwnProperty&&(0,v.mQ)(r,e))r[e]=i;else if(l&&"string"==typeof e&&e.indexOf(".")>-1){let t,o=r,n=0;const s=e.split(".");for(n=0,t=s.length-1;n<t;n++){if("__proto__"===s[n]||"constructor"===s[n]||"prototype"===s[n])return;void 0===o[s[n]]&&(o[s[n]]={}),o=o[s[n]]}o[s[n]]=i}else if("function"==typeof e)e(this.dataSource.slice(n,n+1)[0],i);else{if("__proto__"===e||"constructor"===e||"prototype"===e)return;r[e]=i}}visualRowsToPhysical(t,e){const o=this.hot.countSourceRows(),n=[];let i,r=(o+t)%o,s=e;for(;r<o&&s;)i=this.hot.toPhysicalRow(r),n.push(i),s-=1,r+=1;return n}visualColumnsToPhysical(t,e){const o=this.hot.countCols(),n=[];let i=(o+t)%o,r=e;for(;i<o&&r;){const t=this.hot.toPhysicalColumn(i);n.push(t),r-=1,i+=1}return n}clear(){for(let t=0;t<this.hot.countSourceRows();t++)for(let e=0;e<this.hot.countCols();e++)this.set(t,this.colToProp(e),"")}getLength(){const t=this.tableMeta.maxRows;let e;e=t<0||0===t?0:t||1/0;const o=this.hot.rowIndexMapper.getNotTrimmedIndexesLength();return Math.min(o,e)}getAll(){const t={row:0,col:0},e={row:Math.max(this.hot.countRows()-1,0),col:Math.max(this.hot.countCols()-1,0)};return t.row-e.row!==0||this.hot.countSourceRows()?this.getRange(t,e,is.DESTINATION_RENDERER):[]}countCachedColumns(){return this.colToPropCache.length}getRange(t,e,o){const n=[];let i,r,s;const l=this.tableMeta.maxRows,a=this.tableMeta.maxCols;if(0===l||0===a)return[];const h=o===is.DESTINATION_CLIPBOARD_GENERATOR?this.getCopyable:this.get,c=Math.min(Math.max(l-1,0),Math.max(t.row,e.row)),d=Math.min(Math.max(a-1,0),Math.max(t.col,e.col));for(i=Math.min(t.row,e.row);i<=c;i++){s=[];const o=i>=0?this.hot.toPhysicalRow(i):i;for(r=Math.min(t.col,e.col);r<=d&&null!==o;r++)s.push(h.call(this,i,this.colToProp(r)));null!==o&&n.push(s)}return n}getText(t,e){return(0,os.A)(this.getRange(t,e,is.DESTINATION_RENDERER))}getCopyableText(t,e){return(0,os.A)(this.getRange(t,e,is.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}}const rs=is;function ss(t,e,o,r){const{hotInstance:s,dataMap:l,dataSource:a,internalSource:h,source:c,metaManager:d,firstRun:u}=r,g=(0,j.Ob)(h),f=s.getSettings();Array.isArray(f.dataSchema)?s.dataType="array":(0,i.Tn)(f.dataSchema)?s.dataType="function":s.dataType="object",l&&l.destroy(),t=s.runHooks(`before${g}`,t,u,c);const p=new rs(s,t,d);if(e(p),"object"==typeof t&&null!==t)t.push&&t.splice||(t=[t]);else{if(null!==t)throw new Error(`${h} only accepts array of objects or array of arrays (${typeof t} given)`);{const e=p.getSchema();let o;t=[];let n=0,i=0;for(n=0,i=f.startRows;n<i;n++)if("object"!==s.dataType&&"function"!==s.dataType||!f.dataSchema)if("array"===s.dataType)o=(0,v.Go)(e[0]),t.push(o);else{o=[];for(let t=0,e=f.startCols;t<e;t++)o.push(null);t.push(o)}else o=(0,v.Go)(e),t.push(o)}}Array.isArray(t[0])&&(s.dataType="array"),f.data=t,p.dataSource=t,a.data=t,a.dataType=s.dataType,a.colToProp=p.colToProp.bind(p),a.propToCol=p.propToCol.bind(p),a.countCachedColumns=p.countCachedColumns.bind(p),o(p),s.runHooks(`after${g}`,t,u,c),u||(s.runHooks("afterChange",null,h),s.render()),s.getSettings().ariaTags&&(0,n.Bq)(s.rootElement,[(0,Et.DZ)(-1),(0,Et.Nb)(s.countCols()+(s.view?s.countRowHeaders():0))])}function ls(t){(0,n.sb)(t)&&t.scrollIntoView({block:"nearest",inline:"nearest"})}function as(t){const{selection:e,view:o}=t,n=t.getSelectedRangeLast(),i=e.getSelectionSource(),r=o.getFirstFullyVisibleColumn(),s=o.getLastFullyVisibleColumn(),l=n.getTopStartCorner().col,a=n.getBottomEndCorner().col,h=l<=r,c=a>=s,d=o.getFirstFullyVisibleRow(),u=o.getLastFullyVisibleRow(),g=n.getTopStartCorner().row,f=n.getBottomEndCorner().row,p=g<=d,m=f>=u;return{getComputedColumnTarget:t=>"mouse"===i||"keyboard"===i?t.col:h&&c?n.highlight.col:h?l:c?a:t.col,getComputedRowTarget:t=>"mouse"===i||"keyboard"===i?t.row:p&&m?n.highlight.row:p?g:m?f:t.row}}var hs=o(9720);function cs(t){const e=t.rootDocument.createElement("input");return e.type="text",e.name="__htFocusCatcher",e.classList.add("htFocusCatcher"),t.getSettings().ariaTags&&(0,n.Bq)(e,[(0,Et.SM)("Focus catcher")]),e}function ds(t){const{rowIndexMapper:e,columnIndexMapper:o}=t,{navigableHeaders:n}=t.getSettings();let i=n&&t.countColHeaders()>0?-t.countColHeaders():0,r=n&&t.countRowHeaders()>0?-t.countRowHeaders():0;return 0===i&&(i=e.getVisualFromRenderableIndex(i)),0===r&&(r=o.getVisualFromRenderableIndex(r)),null===i||null===r?null:t._createCellCoords(i,r)}function us(t){var e,o;const{rowIndexMapper:n,columnIndexMapper:i}=t,{navigableHeaders:r}=t.getSettings();let s=n.getRenderableIndexesLength()-1,l=i.getRenderableIndexesLength()-1;if(s<0){if(!r||0===t.countColHeaders())return null;s=-1}if(l<0){if(!r||0===t.countColHeaders())return null;l=-1}return t._createCellCoords(null!==(e=n.getVisualFromRenderableIndex(s))&&void 0!==e?e:s,null!==(o=i.getVisualFromRenderableIndex(l))&&void 0!==o?o:l)}var gs=o(5428);const fs=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"]]),ps=t=>t.map((t=>{const e=t.toLowerCase();return fs.has(e)?fs.get(e):e})).sort().join("+"),ms=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"]]),ws=t=>{let{which:e,key:o}=t;if(ms.has(e))return ms.get(e);const n=String.fromCharCode(e).toLowerCase();return/^[a-z0-9]$/.test(n)?n:o.toLowerCase()},bs=Symbol("shortcut-context");function vs(t){return(0,v.Gv)(t)&&t.__kindOf===bs}const ys=["meta","alt","shift","control"],Cs=function(){const t=new Set;return{press(e){t.add(e)},release(e){t.delete(e)},releaseAll(){t.clear()},isPressed:e=>t.has(e)}}(),Ss=[];let Rs=0;const Es={name:"editorCloseAndSave",callback(t){t._getEditorManager().closeEditorAndSaveChanges()}};var Ts=o(2564);const xs={name:"editorCloseAndSaveByArrowKeys",callback(t,e,o){const n=t._getEditorManager(),i=n.getActiveEditor();i.isInFullEditMode()&&i.state===Ts._T.EDITING||(n.closeEditorAndSaveChanges(),t.getSelected()&&(o.includes("arrowdown")?t.selection.transformStart(1,0):o.includes("arrowup")?t.selection.transformStart(-1,0):o.includes("arrowleft")?t.selection.transformStart(0,-1*t.getDirectionFactor()):o.includes("arrowright")&&t.selection.transformStart(0,t.getDirectionFactor())),e.preventDefault())}},Ms={name:"editorCloseAndSaveByEnter",callback(t,e){const o=t._getEditorManager();o.closeEditorAndSaveChanges(e.ctrlKey||e.metaKey),o.moveSelectionAfterEnter(e)}},Is={name:"editorCloseWithoutSaving",callback(t){const e=t._getEditorManager();e.closeEditorAndRestoreOriginalValue(t.getShortcutManager().isCtrlPressed()),e.activeEditor.focus()}},Hs={name:"editorFastOpen",callback(t,e){const{highlight:o}=t.getSelectedRangeLast();o.isHeader()||t._getEditorManager().openEditor(null,e,!0)}},Os={name:"editorOpen",callback(t,e,o){const n=t._getEditorManager(),i=t.getSelectedRangeLast(),{highlight:r}=i;if(t.selection.isMultiple()&&!i.isHeader()&&t.countRenderedCols()>0&&t.countRenderedRows()>0){const n=t.getSettings(),i="function"==typeof n.enterMoves?n.enterMoves(e):n.enterMoves;o.includes("shift")?t.selection.transformFocus(-i.row,-i.col):t.selection.transformFocus(i.row,i.col)}else r.isHeader()||(t.getSettings().enterBeginsEditing?n.cellProperties.readOnly?n.moveSelectionAfterEnter(e):n.openEditor(null,e,!0):n.moveSelectionAfterEnter(e),(0,a.CA)(e))}},As={name:"extendCellsSelectionDown",callback(t){const{selection:e}=t,{highlight:o}=t.getSelectedRangeLast();e.isSelectedByColumnHeader()||e.isSelectedByCorner()||!(o.isCell()||o.isHeader()&&e.isSelectedByRowHeader())||(e.markSource("keyboard"),e.transformEnd(1,0),e.markEndSource())}},ks={name:"extendCellsSelectionDownByViewportHeight",callback(t){const{selection:e,rowIndexMapper:o}=t,{to:n}=t.getSelectedRangeLast(),i=Math.min(n.row+t.countVisibleRows(),t.countRows()-1),r=o.getNearestNotHiddenIndex(i,-1);if(null!==r){const o=t._createCellCoords(r,n.col),i=n.row-t.getFirstFullyVisibleRow(),s=Math.min(o.row-i,t.countRows()-1);e.markSource("keyboard"),e.setRangeEnd(o),e.markEndSource(),t.scrollViewportTo({row:s,verticalSnap:"top",horizontalSnap:"start"})}}},_s={name:"extendCellsSelectionLeft",callback(t){const{selection:e}=t,{highlight:o}=t.getSelectedRangeLast();e.isSelectedByRowHeader()||e.isSelectedByCorner()||!(o.isCell()||o.isHeader()&&e.isSelectedByColumnHeader())||(e.markSource("keyboard"),e.transformEnd(0,-1*t.getDirectionFactor()),e.markEndSource())}},Ns={name:"extendCellsSelectionRight",callback(t){const{selection:e}=t,{highlight:o}=t.getSelectedRangeLast();e.isSelectedByRowHeader()||e.isSelectedByCorner()||!(o.isCell()||o.isHeader()&&e.isSelectedByColumnHeader())||(e.markSource("keyboard"),e.transformEnd(0,t.getDirectionFactor()),e.markEndSource())}},Ps={name:"extendCellsSelectionToColumns",callback(t){const{selection:e}=t,{highlight:o,from:n,to:i}=t.getSelectedRangeLast();e.markSource("keyboard"),e.isSelectedByRowHeader()?e.selectAll(!0,!0):t.selectColumns(n.col,i.col,o),e.markEndSource()}},Ls={name:"extendCellsSelectionToMostBottom",callback(t){const{selection:e,rowIndexMapper:o}=t,{highlight:n,from:i,to:r}=t.getSelectedRangeLast(),s=n.isHeader()&&e.isSelectedByRowHeader();if(n.isCell()||s){const l=o.getNearestNotHiddenIndex(t.countRows()-1,-1),a=i.clone();a.row=n.row,e.markSource("keyboard"),e.setRangeStart(a,void 0,!1,n.clone()),s&&e.selectedByRowHeader.add(e.getLayerLevel()),e.setRangeEnd(t._createCellCoords(l,r.col)),e.markEndSource()}}},Ds={name:"extendCellsSelectionToMostInlineEnd",callback(t){const{selection:e,columnIndexMapper:o}=t,{highlight:n,from:i,to:r}=t.getSelectedRangeLast();if(!e.isSelectedByRowHeader()&&!e.isSelectedByCorner()&&n.isCell()){const s=o.getNearestNotHiddenIndex(t.countCols()-1,-1),l=i.clone();l.col=n.col,e.markSource("keyboard"),e.setRangeStart(l,void 0,!1,n.clone()),e.setRangeEnd(t._createCellCoords(r.row,s)),e.markEndSource()}}},Vs={name:"extendCellsSelectionToMostInlineStart",callback(t){const{selection:e,columnIndexMapper:o}=t,{highlight:n,from:i,to:r}=t.getSelectedRangeLast();if(!e.isSelectedByRowHeader()&&!e.isSelectedByCorner()&&n.isCell()){const s=parseInt(t.getSettings().fixedColumnsStart,10),l=o.getNearestNotHiddenIndex(s,1),a=i.clone();a.col=n.col,e.markSource("keyboard"),e.setRangeStart(a,void 0,!1,n.clone()),e.setRangeEnd(t._createCellCoords(r.row,l)),e.markEndSource()}}},Fs={name:"extendCellsSelectionToMostLeft",callback(t){const{selection:e,columnIndexMapper:o}=t,{highlight:n,from:i,to:r}=t.getSelectedRangeLast(),s=n.isHeader()&&e.isSelectedByColumnHeader();if(n.isCell()||s){const l=o.getNearestNotHiddenIndex(...t.isRtl()?[t.countCols()-1,-1]:[0,1]),a=i.clone();a.col=n.col,e.markSource("keyboard"),e.setRangeStart(a,void 0,!1,n.clone()),s&&e.selectedByColumnHeader.add(e.getLayerLevel()),e.setRangeEnd(t._createCellCoords(r.row,l)),e.markEndSource()}}},Bs={name:"extendCellsSelectionToMostRight",callback(t){const{selection:e,columnIndexMapper:o}=t,{highlight:n,from:i,to:r}=t.getSelectedRangeLast(),s=n.isHeader()&&e.isSelectedByColumnHeader();if(n.isCell()||s){const l=o.getNearestNotHiddenIndex(...t.isRtl()?[0,1]:[t.countCols()-1,-1]),a=i.clone();a.col=n.col,e.markSource("keyboard"),e.setRangeStart(a,void 0,!1,n.clone()),s&&e.selectedByColumnHeader.add(e.getLayerLevel()),e.setRangeEnd(t._createCellCoords(r.row,l)),e.markEndSource()}}},Ws={name:"extendCellsSelectionToMostTop",callback(t){const{selection:e,rowIndexMapper:o}=t,{highlight:n,from:i,to:r}=t.getSelectedRangeLast(),s=n.isHeader()&&e.isSelectedByRowHeader();if(n.isCell()||s){const l=o.getNearestNotHiddenIndex(0,1),a=i.clone();a.row=n.row,e.markSource("keyboard"),e.setRangeStart(a,void 0,!1,n.clone()),s&&e.selectedByRowHeader.add(e.getLayerLevel()),e.setRangeEnd(t._createCellCoords(l,r.col)),e.markEndSource()}}},zs={name:"extendCellsSelectionToRows",callback(t){const{selection:e}=t,{highlight:o,from:n,to:i}=t.getSelectedRangeLast();e.markSource("keyboard"),e.isSelectedByColumnHeader()?e.selectAll(!0,!0):t.selectRows(n.row,i.row,o),e.markEndSource()}},js={name:"extendCellsSelectionUp",callback(t){const{selection:e}=t,{highlight:o}=t.getSelectedRangeLast();e.isSelectedByColumnHeader()||e.isSelectedByCorner()||!(o.isCell()||o.isHeader()&&e.isSelectedByRowHeader())||(e.markSource("keyboard"),e.transformEnd(-1,0),e.markEndSource())}},Us={name:"extendCellsSelectionUpByViewportHeight",callback(t){const{selection:e,rowIndexMapper:o}=t,{to:n}=t.getSelectedRangeLast(),i=Math.max(n.row-t.countVisibleRows(),0),r=o.getNearestNotHiddenIndex(i,1);if(null!==r){const o=t._createCellCoords(r,n.col),i=n.row-t.getFirstFullyVisibleRow(),s=Math.max(o.row-i,0);e.markSource("keyboard"),e.setRangeEnd(o),e.markEndSource(),t.scrollViewportTo({row:s,verticalSnap:"top",horizontalSnap:"start"})}}},$s={name:"moveCellSelectionDown",callback(t){let{selection:e}=t;e.markSource("keyboard"),e.transformStart(1,0),e.markEndSource()}},Gs={name:"moveCellSelectionDownByViewportHeight",callback(t){const{selection:e}=t,{navigableHeaders:o}=t.getSettings(),n=o?t.countColHeaders():0,{row:i}=t.getSelectedRangeLast().highlight;let r=t.countVisibleRows()+n;r=0===r?1:r,i===t.countRows()-1?r=1:i+r>t.countRows()&&(r=t.countRows()-i-1),e.markSource("keyboard"),e.transformStart(r,0),e.markEndSource(),t.getSelectedRangeLast().highlight.row<0&&t.scrollViewportTo({row:0})}},Ys={name:"moveCellSelectionInlineEnd",callback(t,e){const{selection:o}=t,n=t.getSettings(),i=t.getSelectedRangeLast(),r="function"==typeof n.tabMoves?n.tabMoves(e):n.tabMoves;o.markSource("keyboard"),o.isMultiple()&&!i.isHeader()&&t.countRenderedCols()>0&&t.countRenderedRows()>0?o.transformFocus(-r.row,-r.col):o.transformStart(-r.row,-r.col),o.markEndSource()}},Xs={name:"moveCellSelectionInlineStart",callback(t,e){const{selection:o}=t,n=t.getSettings(),i=t.getSelectedRangeLast(),r="function"==typeof n.tabMoves?n.tabMoves(e):n.tabMoves;o.markSource("keyboard"),o.isMultiple()&&!i.isHeader()&&t.countRenderedCols()>0&&t.countRenderedRows()>0?o.transformFocus(r.row,r.col):o.transformStart(r.row,r.col),o.markEndSource()}},qs={name:"moveCellSelectionLeft",callback(t){const{selection:e}=t;e.markSource("keyboard"),e.transformStart(0,-1*t.getDirectionFactor()),e.markEndSource()}},Ks={name:"moveCellSelectionRight",callback(t){const{selection:e}=t;e.markSource("keyboard"),e.transformStart(0,t.getDirectionFactor()),e.markEndSource()}},Qs={name:"moveCellSelectionToMostBottom",callback(t){const{selection:e}=t,{col:o}=t.getSelectedRangeLast().highlight;let n=t.rowIndexMapper.getNearestNotHiddenIndex(t.countRows()-1,-1);null===n&&(n=-1),e.setRangeStart(t._createCellCoords(n,o))}},Js={name:"moveCellSelectionToMostBottomInlineEnd",callback(t){const{selection:e,rowIndexMapper:o,columnIndexMapper:n}=t,i=parseInt(t.getSettings().fixedRowsBottom,10),r=o.getNearestNotHiddenIndex(t.countRows()-i-1,-1),s=n.getNearestNotHiddenIndex(t.countCols()-1,-1);e.markSource("keyboard"),e.setRangeStart(t._createCellCoords(r,s)),e.markEndSource()}},Zs={name:"moveCellSelectionToMostInlineEnd",callback(t){const{selection:e,columnIndexMapper:o}=t;e.markSource("keyboard"),e.setRangeStart(t._createCellCoords(t.getSelectedRangeLast().highlight.row,o.getNearestNotHiddenIndex(t.countCols()-1,-1))),e.markEndSource()}},tl={name:"moveCellSelectionToMostInlineStart",callback(t){const{selection:e,columnIndexMapper:o}=t,n=parseInt(t.getSettings().fixedColumnsStart,10),i=t.getSelectedRangeLast().highlight.row,r=o.getNearestNotHiddenIndex(n,1);e.markSource("keyboard"),e.setRangeStart(t._createCellCoords(i,r)),e.markEndSource()}},el={name:"moveCellSelectionToMostLeft",callback(t){const{selection:e,columnIndexMapper:o}=t,n=t.getSelectedRangeLast().highlight.row;let i=o.getNearestNotHiddenIndex(...t.isRtl()?[t.countCols()-1,-1]:[0,1]);null===i&&(i=t.isRtl()?-1:-t.countRowHeaders()),e.markSource("keyboard"),e.setRangeStart(t._createCellCoords(n,i)),e.markEndSource()}},ol={name:"moveCellSelectionToMostRight",callback(t){const{selection:e,columnIndexMapper:o}=t,{row:n}=t.getSelectedRangeLast().highlight;let i=o.getNearestNotHiddenIndex(...t.isRtl()?[0,1]:[t.countCols()-1,-1]);null===i&&(i=t.isRtl()?-t.countRowHeaders():-1),e.markSource("keyboard"),e.setRangeStart(t._createCellCoords(n,i)),e.markEndSource()}},nl={name:"moveCellSelectionToMostTop",callback(t){const{selection:e}=t,{col:o}=t.getSelectedRangeLast().highlight;let n=t.rowIndexMapper.getNearestNotHiddenIndex(0,1);null===n&&(n=-t.countColHeaders()),e.markSource("keyboard"),e.setRangeStart(t._createCellCoords(n,o)),e.markEndSource()}},il={name:"moveCellSelectionToMostTopInlineStart",callback(t){const{selection:e,rowIndexMapper:o,columnIndexMapper:n}=t,i=parseInt(t.getSettings().fixedRowsTop,10),r=parseInt(t.getSettings().fixedColumnsStart,10),s=o.getNearestNotHiddenIndex(i,1),l=n.getNearestNotHiddenIndex(r,1);e.markSource("keyboard"),e.setRangeStart(t._createCellCoords(s,l)),e.markEndSource()}},rl={name:"moveCellSelectionUp",callback(t){let{selection:e}=t;e.markSource("keyboard"),e.transformStart(-1,0),e.markEndSource()}},sl={name:"moveCellSelectionUpByViewportHight",callback(t){const{selection:e}=t,{navigableHeaders:o}=t.getSettings(),n=o?t.countColHeaders():0,{row:i}=t.getSelectedRangeLast().highlight;let r=t.countVisibleRows()+n;r=0===r?-1:-r,i===-n?r=-1:i+r<n&&(r=-(i+n)),e.markSource("keyboard"),e.transformStart(r,0),e.markEndSource(),t.getSelectedRangeLast().highlight.row<0&&t.scrollViewportTo({row:0})}},ll={name:"emptySelectedCells",callback(t){t.emptySelectedCells(),t._getEditorManager().prepareEditor()}},al={name:"scrollToFocusedCell",callback(t){const{highlight:e}=t.getSelectedRangeLast(),o=t.getFirstFullyVisibleRow()-1,n=t.getFirstFullyVisibleColumn()-1,i=t.getLastFullyVisibleRow()+1,r=t.getLastFullyVisibleColumn()+1,s=t._createCellCoords(o,n),l=t._createCellCoords(i,r);if(!t._createCellRange(s,s,l).includes(e)&&(e.row>=0||e.col>=0)){const o={};if(e.col>=0){const n=Math.floor(t.countVisibleCols()/2);o.col=Math.max(e.col-n,0)}if(e.row>=0){const n=Math.floor(t.countVisibleRows()/2);o.row=Math.max(e.row-n,0)}t.scrollViewportTo({...o,verticalSnap:"top",horizontalSnap:"start"})}}},hl={name:"selectAllCells",callback(t){let{selection:e}=t;e.markSource("keyboard"),e.selectAll(!0,!0,{disableHeadersHighlight:!0}),e.markEndSource()}},cl={name:"selectAllCellsAndHeaders",callback(t){let{selection:e}=t;e.markSource("keyboard"),e.selectAll(!0,!0,{disableHeadersHighlight:!1}),e.markEndSource()}},dl={name:"populateSelectedCellsData",callback(t){const e=t.getSelectedRange(),{row:o,col:n}=e[e.length-1].highlight.normalize(),i=t.getDataAtCell(o,n),r=new Map;for(let s=0;s<e.length;s++)e[s].forAll(((e,s)=>{if(e>=0&&s>=0&&(e!==o||s!==n)){const{readOnly:o}=t.getCellMeta(e,s);o||r.set(`${e}x${s}`,[e,s,i])}}));t.setDataAtCell(Array.from(r.values()))}},ul=[Es,xs,Ms,Is,Hs,Os,As,ks,_s,Ns,Ps,Ls,Ds,Vs,Fs,Bs,Ws,zs,js,Us,$s,Gs,Ys,Xs,qs,Ks,Qs,Js,Zs,tl,el,ol,nl,il,rl,sl,ll,al,hl,cl,dl];function gl(t){const e={};return ul.forEach((o=>{let{name:n,callback:i}=o;e[n]=function(){for(var e=arguments.length,o=new Array(e),n=0;n<e;n++)o[n]=arguments[n];return i(t,...o)}})),e}function fl(t){const e=t.getShortcutManager().addContext("editor"),o=gl(t),n={group:hs.b};e.addShortcuts([{keys:[["Enter"],["Enter","Shift"]],callback:(t,e)=>o.editorCloseAndSaveByEnter(t,e)},{keys:[["Enter","Control/Meta"],["Enter","Control/Meta","Shift"]],captureCtrl:!0,callback:(t,e)=>o.editorCloseAndSaveByEnter(t,e)},{keys:[["Tab"],["Tab","Shift"],["PageDown"],["PageUp"]],forwardToContext:t.getShortcutManager().getContext("grid"),callback:(t,e)=>o.editorCloseAndSave(t,e)},{keys:[["ArrowDown"],["ArrowUp"],["ArrowLeft"],["ArrowRight"]],preventDefault:!1,callback:(t,e)=>o.editorCloseAndSaveByArrowKeys(t,e)},{keys:[["Escape"],["Escape","Control/Meta"]],callback:()=>o.editorCloseWithoutSaving()}],n)}function pl(t){const e=t.getShortcutManager().addContext("grid"),o=gl(t),n={runOnlyIf:()=>{const{navigableHeaders:e}=t.getSettings();return(0,r.O9)(t.getSelected())&&(e||!e&&t.countRenderedRows()>0&&t.countRenderedCols()>0)},group:hs.B};e.addShortcuts([{keys:[["F2"]],callback:t=>o.editorFastOpen(t)},{keys:[["Enter"],["Enter","Shift"]],callback:(t,e)=>o.editorOpen(t,e)},{keys:[["Backspace"],["Delete"]],callback:()=>o.emptySelectedCells()}],{group:hs.b,runOnlyIf:()=>(0,r.O9)(t.getSelected())}),e.addShortcuts([{keys:[["Control/Meta","A"]],callback:()=>o.selectAllCells(),runOnlyIf:()=>{var e;return!(null!==(e=t.getSelectedRangeLast())&&void 0!==e&&e.highlight.isHeader())}},{keys:[["Control/Meta","A"]],callback:()=>{},runOnlyIf:()=>{var e;return null===(e=t.getSelectedRangeLast())||void 0===e?void 0:e.highlight.isHeader()},preventDefault:!0},{keys:[["Control/Meta","Shift","Space"]],callback:()=>o.selectAllCellsAndHeaders()},{keys:[["Control/Meta","Enter"]],callback:()=>o.populateSelectedCellsData(),runOnlyIf:()=>{var e,o;return!(null!==(e=t.getSelectedRangeLast())&&void 0!==e&&e.highlight.isHeader())&&(null===(o=t.getSelectedRangeLast())||void 0===o?void 0:o.getCellsCount())>1}},{keys:[["Control","Space"]],captureCtrl:!0,callback:()=>o.extendCellsSelectionToColumns()},{keys:[["Shift","Space"]],stopPropagation:!0,callback:()=>o.extendCellsSelectionToRows()},{keys:[["ArrowUp"]],callback:()=>o.moveCellSelectionUp()},{keys:[["ArrowUp","Control/Meta"]],captureCtrl:!0,callback:()=>o.moveCellSelectionToMostTop()},{keys:[["ArrowUp","Shift"]],callback:()=>o.extendCellsSelectionUp()},{keys:[["ArrowUp","Shift","Control/Meta"]],captureCtrl:!0,callback:()=>o.extendCellsSelectionToMostTop(),runOnlyIf:()=>!(t.selection.isSelectedByCorner()||t.selection.isSelectedByColumnHeader())},{keys:[["ArrowDown"]],callback:()=>o.moveCellSelectionDown()},{keys:[["ArrowDown","Control/Meta"]],captureCtrl:!0,callback:()=>o.moveCellSelectionToMostBottom()},{keys:[["ArrowDown","Shift"]],callback:()=>o.extendCellsSelectionDown()},{keys:[["ArrowDown","Shift","Control/Meta"]],captureCtrl:!0,callback:()=>o.extendCellsSelectionToMostBottom(),runOnlyIf:()=>!(t.selection.isSelectedByCorner()||t.selection.isSelectedByColumnHeader())},{keys:[["ArrowLeft"]],callback:()=>o.moveCellSelectionLeft()},{keys:[["ArrowLeft","Control/Meta"]],captureCtrl:!0,callback:()=>o.moveCellSelectionToMostLeft()},{keys:[["ArrowLeft","Shift"]],callback:()=>o.extendCellsSelectionLeft()},{keys:[["ArrowLeft","Shift","Control/Meta"]],captureCtrl:!0,callback:()=>o.extendCellsSelectionToMostLeft(),runOnlyIf:()=>!(t.selection.isSelectedByCorner()||t.selection.isSelectedByRowHeader())},{keys:[["ArrowRight"]],callback:()=>o.moveCellSelectionRight()},{keys:[["ArrowRight","Control/Meta"]],captureCtrl:!0,callback:()=>o.moveCellSelectionToMostRight()},{keys:[["ArrowRight","Shift"]],callback:()=>o.extendCellsSelectionRight()},{keys:[["ArrowRight","Shift","Control/Meta"]],captureCtrl:!0,callback:()=>o.extendCellsSelectionToMostRight(),runOnlyIf:()=>!(t.selection.isSelectedByCorner()||t.selection.isSelectedByRowHeader())},{keys:[["Home"]],captureCtrl:!0,callback:()=>o.moveCellSelectionToMostInlineStart(),runOnlyIf:()=>t.view.isMainTableNotFullyCoveredByOverlays()},{keys:[["Home","Shift"]],callback:()=>o.extendCellsSelectionToMostInlineStart()},{keys:[["Home","Control/Meta"]],captureCtrl:!0,callback:()=>o.moveCellSelectionToMostTopInlineStart(),runOnlyIf:()=>t.view.isMainTableNotFullyCoveredByOverlays()},{keys:[["End"]],captureCtrl:!0,callback:()=>o.moveCellSelectionToMostInlineEnd(),runOnlyIf:()=>t.view.isMainTableNotFullyCoveredByOverlays()},{keys:[["End","Shift"]],callback:()=>o.extendCellsSelectionToMostInlineEnd()},{keys:[["End","Control/Meta"]],captureCtrl:!0,callback:()=>o.moveCellSelectionToMostBottomInlineEnd(),runOnlyIf:()=>t.view.isMainTableNotFullyCoveredByOverlays()},{keys:[["PageUp"]],callback:()=>o.moveCellSelectionUpByViewportHight()},{keys:[["PageUp","Shift"]],callback:()=>o.extendCellsSelectionUpByViewportHeight()},{keys:[["PageDown"]],callback:()=>o.moveCellSelectionDownByViewportHeight()},{keys:[["PageDown","Shift"]],callback:()=>o.extendCellsSelectionDownByViewportHeight()},{keys:[["Tab"]],preventDefault:!1,callback:t=>o.moveCellSelectionInlineStart(t)},{keys:[["Shift","Tab"]],preventDefault:!1,callback:t=>o.moveCellSelectionInlineEnd(t)},{keys:[["Control/Meta","Backspace"]],callback:()=>o.scrollToFocusedCell()}],n)}function ml(t){const{classNames:e}=(0,n.Oe)(t,/ht-theme-[a-zA-Z0-9_-]+/);return e.pop()}let wl=null;const bl=new Map;function vl(t,e){var o,l=this;let d=arguments.length>2&&void 0!==arguments[2]&&arguments[2],u=this;const g=new c.A(u);let f,p,m,w,y,C,S=!0;Cn(d)&&function(t){vn.set(t,!0)}(this),this.rootElement=t,this.rootDocument=t.ownerDocument,this.rootWindow=this.rootDocument.defaultView,this.isDestroyed=!1,this.renderSuspendedCounter=0,this.executionSuspendedCounter=0;const R=null!==(o=null==e?void 0:e.layoutDirection)&&void 0!==o?o:"inherit",E=["rtl","ltr"].includes(R)?R:this.rootWindow.getComputedStyle(this.rootElement).direction;this.rootElement.setAttribute("dir",E),this.isRtl=function(){return"rtl"===E},this.isLtr=function(){return!u.isRtl()},this.getDirectionFactor=function(){return u.isLtr()?1:-1},e.language=function(t){let e=Ci(t);return Li(e)||(e=Hi,Si(t)),e}(e.language);const T=Object.fromEntries(Object.entries(e).filter((t=>{let[e]=t;return!(yi.R.getSingleton().isRegistered(e)||yi.R.getSingleton().isDeprecated(e))}))),x=new Kr(u,T,[Jr,es]),M=x.getTableMeta(),I=x.getGlobalMeta(),H=(0,gs.u)();this.container=this.rootDocument.createElement("div"),t.insertBefore(this.container,t.firstChild),Sn(this)&&((0,r.k_)(e.licenseKey,t),(0,n.iQ)(t,"ht-wrapper")),this.guid=`ht_${(0,j.DU)()}`,bl.set(this.guid,this),this.columnIndexMapper=new vi,this.rowIndexMapper=new vi,this.columnIndexMapper.addLocalHook("indexesSequenceChange",(t=>{u.runHooks("afterColumnSequenceChange",t)})),this.rowIndexMapper.addLocalHook("indexesSequenceChange",(t=>{u.runHooks("afterRowSequenceChange",t)})),g.addEventListener(this.rootDocument.documentElement,"compositionstart",(t=>{u.runHooks("beforeCompositionStart",t)})),p=new Un(u),this.rootElement.id&&"ht_"!==this.rootElement.id.substring(0,3)||(this.rootElement.id=this.guid);let O=new _r(M,{rowIndexMapper:u.rowIndexMapper,columnIndexMapper:u.columnIndexMapper,countCols:()=>u.countCols(),countRows:()=>u.countRows(),propToCol:t=>f.propToCol(t),isEditorOpened:()=>!!u.getActiveEditor()&&u.getActiveEditor().isOpened(),countRenderableColumns:()=>this.view.countRenderableColumns(),countRenderableRows:()=>this.view.countRenderableRows(),countRowHeaders:()=>this.countRowHeaders(),countColHeaders:()=>this.countColHeaders(),countRenderableRowsInRange:function(){return l.view.countRenderableRowsInRange(...arguments)},countRenderableColumnsInRange:function(){return l.view.countRenderableColumnsInRange(...arguments)},getShortcutManager:()=>u.getShortcutManager(),createCellCoords:(t,e)=>u._createCellCoords(t,e),createCellRange:(t,e,o)=>u._createCellRange(t,e,o),visualToRenderableCoords:t=>{const{row:e,col:o}=t;return u._createCellCoords(e>=0?u.rowIndexMapper.getRenderableFromVisualIndex(e):e,o>=0?u.columnIndexMapper.getRenderableFromVisualIndex(o):o)},renderableToVisualCoords:t=>{const{row:e,col:o}=t;return u._createCellCoords(e>=0?u.rowIndexMapper.getVisualFromRenderableIndex(e):e,o>=0?u.columnIndexMapper.getVisualFromRenderableIndex(o):o)},findFirstNonHiddenRenderableRow:(t,e)=>{const o=e>t?1:-1,n=Math.min(t,e),i=Math.max(t,e),r=u.rowIndexMapper.getNearestNotHiddenIndex(t,o);return null===r||1===o&&r>i||-1===o&&r<n?null:r>=0?u.rowIndexMapper.getRenderableFromVisualIndex(r):r},findFirstNonHiddenRenderableColumn:(t,e)=>{const o=e>t?1:-1,n=Math.min(t,e),i=Math.max(t,e),r=u.columnIndexMapper.getNearestNotHiddenIndex(t,o);return null===r||1===o&&r>i||-1===o&&r<n?null:r>=0?u.columnIndexMapper.getRenderableFromVisualIndex(r):r},isDisabledCellSelection:(t,e)=>t<0||e<0?u.getSettings().disableVisualSelection:u.getCellMeta(t,e).disableVisualSelection});this.selection=O;const A=t=>{let{hiddenIndexesChanged:e}=t;this.forceFullRender=!0,e&&this.selection.commit()};function k(t,e){const o="className"===t?u.rootElement:u.table;if(S)(0,n.iQ)(o,e);else{let i=[],r=[];I[t]&&(i=Array.isArray(I[t])?I[t]:(0,V.Gn)(I[t])),e&&(r=Array.isArray(e)?e:(0,V.Gn)(e));const s=(0,V.fg)(i,r),l=(0,V.fg)(r,i);s.length&&(0,n.vy)(o,s),l.length&&(0,n.iQ)(o,l)}I[t]=e}function N(){let t=!1;return{validatorsInQueue:0,valid:!0,addValidatorToQueue(){this.validatorsInQueue+=1,t=!1},removeValidatorFormQueue(){this.validatorsInQueue=this.validatorsInQueue-1<0?0:this.validatorsInQueue-1,this.checkIfQueueIsEmpty()},onQueueEmpty(){},checkIfQueueIsEmpty(){0===this.validatorsInQueue&&!1===t&&(t=!0,this.onQueueEmpty(this.valid))}}}function P(t){const e=t.replace(",",".");return!1===isNaN(parseFloat(e))?parseFloat(e):t}function L(t,e,o){if(!t.length)return void o();const n=u.getActiveEditor(),i=new N;let r=!0;i.onQueueEmpty=()=>{n&&r&&n.cancelChanges(),o()};for(let o=t.length-1;o>=0;o--){const[n,s]=t[o],l=f.propToCol(s);let a;a=Number.isInteger(l)?u.getCellMeta(n,l):{...Object.getPrototypeOf(M),...M},u.getCellValidator(a)&&(i.addValidatorToQueue(),u.validateCell(t[o][3],a,function(e,o){return function(n){if("boolean"!=typeof n)throw new Error("Validation error: result is not boolean");!1===n&&!1===o.allowInvalid&&(r=!1,t.splice(e,1),o.valid=!0),i.removeValidatorFormQueue()}}(o,a),e))}i.checkIfQueueIsEmpty()}function D(t,e){for(let e=t.length-1;e>=0;e--){let o=!1;if(null!==t[e]){if(null!==t[e][2]&&void 0!==t[e][2]||null!==t[e][3]&&void 0!==t[e][3]){if(M.allowInsertRow)for(;t[e][0]>u.countRows()-1;){const{delta:t}=f.createRow(void 0,void 0,{source:"auto"});if(0===t){o=!0;break}}if("array"===u.dataType&&(!M.columns||0===M.columns.length)&&M.allowInsertColumn)for(;f.propToCol(t[e][1])>u.countCols()-1;){const{delta:t}=f.createCol(void 0,void 0,{source:"auto"});if(0===t){o=!0;break}}o||f.set(t[e][0],t[e][1],t[e][3])}}else t.splice(e,1)}if(t.length>0){m.adjustRowsAndCols(),u.runHooks("beforeChangeRender",t,e),w.closeEditor(),u.render(),w.prepareEditor(),u.view.adjustElementsSize(),u.runHooks("afterChange",t,e||"edit");const o=u.getActiveEditor();o&&(0,r.O9)(o.refreshValue)&&o.refreshValue()}else u.render()}function $(t,e,o){return Array.isArray(t)?t:[[t,e,o]]}function G(t,e){const o=u.runHooks("beforeChange",t,e||"edit"),n=t.filter((t=>null!==t));var i;if(!1===o||0===n.length)return null===(i=u.getActiveEditor())||void 0===i||i.cancelChanges(),[];for(let t=n.length-1;t>=0;t--){const[e,o,,i]=n[t],s=f.propToCol(o);let l;l=Number.isInteger(s)?u.getCellMeta(e,s):{...Object.getPrototypeOf(M),...M};const{type:a,checkedTemplate:h,uncheckedTemplate:c}=l;if("numeric"===a&&"string"==typeof i&&(0,U.LA)(i)&&(n[t][3]=P(i)),"checkbox"===a){const e=(0,r.As)(i),o=e===(0,r.As)(h),s=e===(0,r.As)(c);(o||s)&&(n[t][3]=o?h:c)}}return n}this.columnIndexMapper.addLocalHook("cacheUpdated",A),this.rowIndexMapper.addLocalHook("cacheUpdated",A),this.selection.addLocalHook("afterSetRangeEnd",((t,e)=>{const o=(0,v.nA)(!1),i=this.selection.getSelectedRange(),{from:r,to:s}=i.current(),l=i.size()-1;this.runHooks("afterSelection",r.row,r.col,s.row,s.col,o,l),this.runHooks("afterSelectionByProp",r.row,u.colToProp(r.col),s.row,u.colToProp(s.col),o,l),e&&(!o.isTouched()||o.isTouched()&&!o.value)&&C.scrollTo(t);const a=O.isSelectedByRowHeader(),h=O.isSelectedByColumnHeader();a&&h?(0,n.iQ)(this.rootElement,["ht__selection--rows","ht__selection--columns"]):a?((0,n.vy)(this.rootElement,"ht__selection--columns"),(0,n.iQ)(this.rootElement,"ht__selection--rows")):h?((0,n.vy)(this.rootElement,"ht__selection--rows"),(0,n.iQ)(this.rootElement,"ht__selection--columns")):(0,n.vy)(this.rootElement,["ht__selection--rows","ht__selection--columns"]),"shift"!==O.getSelectionSource()&&w.closeEditor(null),u.view.render(),w.prepareEditor()})),this.selection.addLocalHook("beforeSetFocus",(t=>{this.runHooks("beforeSelectionFocusSet",t.row,t.col)})),this.selection.addLocalHook("afterSetFocus",(t=>{const e=(0,v.nA)(!1);this.runHooks("afterSelectionFocusSet",t.row,t.col,e),(!e.isTouched()||e.isTouched()&&!e.value)&&C.scrollTo(t),w.closeEditor(),u.view.render(),w.prepareEditor()})),this.selection.addLocalHook("afterSelectionFinished",(t=>{const e=t.length-1,{from:o,to:n}=t[e];this.runHooks("afterSelectionEnd",o.row,o.col,n.row,n.col,e),this.runHooks("afterSelectionEndByProp",o.row,u.colToProp(o.col),n.row,u.colToProp(n.col),e)})),this.selection.addLocalHook("afterIsMultipleSelection",(t=>{const e=this.runHooks("afterIsMultipleSelection",t.value);t.value&&(t.value=e)})),this.selection.addLocalHook("afterDeselect",(()=>{w.closeEditor(),u.view.render(),(0,n.vy)(this.rootElement,["ht__selection--rows","ht__selection--columns"]),this.runHooks("afterDeselect")})),this.selection.addLocalHook("beforeHighlightSet",(()=>this.runHooks("beforeSelectionHighlightSet"))).addLocalHook("beforeSetRangeStart",(function(){for(var t=arguments.length,e=new Array(t),o=0;o<t;o++)e[o]=arguments[o];return l.runHooks("beforeSetRangeStart",...e)})).addLocalHook("beforeSetRangeStartOnly",(function(){for(var t=arguments.length,e=new Array(t),o=0;o<t;o++)e[o]=arguments[o];return l.runHooks("beforeSetRangeStartOnly",...e)})).addLocalHook("beforeSetRangeEnd",(function(){for(var t=arguments.length,e=new Array(t),o=0;o<t;o++)e[o]=arguments[o];return l.runHooks("beforeSetRangeEnd",...e)})).addLocalHook("beforeSelectColumns",(function(){for(var t=arguments.length,e=new Array(t),o=0;o<t;o++)e[o]=arguments[o];return l.runHooks("beforeSelectColumns",...e)})).addLocalHook("afterSelectColumns",(function(){for(var t=arguments.length,e=new Array(t),o=0;o<t;o++)e[o]=arguments[o];return l.runHooks("afterSelectColumns",...e)})).addLocalHook("beforeSelectRows",(function(){for(var t=arguments.length,e=new Array(t),o=0;o<t;o++)e[o]=arguments[o];return l.runHooks("beforeSelectRows",...e)})).addLocalHook("afterSelectRows",(function(){for(var t=arguments.length,e=new Array(t),o=0;o<t;o++)e[o]=arguments[o];return l.runHooks("afterSelectRows",...e)})).addLocalHook("beforeModifyTransformStart",(function(){for(var t=arguments.length,e=new Array(t),o=0;o<t;o++)e[o]=arguments[o];return l.runHooks("modifyTransformStart",...e)})).addLocalHook("afterModifyTransformStart",(function(){for(var t=arguments.length,e=new Array(t),o=0;o<t;o++)e[o]=arguments[o];return l.runHooks("afterModifyTransformStart",...e)})).addLocalHook("beforeModifyTransformFocus",(function(){for(var t=arguments.length,e=new Array(t),o=0;o<t;o++)e[o]=arguments[o];return l.runHooks("modifyTransformFocus",...e)})).addLocalHook("afterModifyTransformFocus",(function(){for(var t=arguments.length,e=new Array(t),o=0;o<t;o++)e[o]=arguments[o];return l.runHooks("afterModifyTransformFocus",...e)})).addLocalHook("beforeModifyTransformEnd",(function(){for(var t=arguments.length,e=new Array(t),o=0;o<t;o++)e[o]=arguments[o];return l.runHooks("modifyTransformEnd",...e)})).addLocalHook("afterModifyTransformEnd",(function(){for(var t=arguments.length,e=new Array(t),o=0;o<t;o++)e[o]=arguments[o];return l.runHooks("afterModifyTransformEnd",...e)})).addLocalHook("beforeRowWrap",(function(){for(var t=arguments.length,e=new Array(t),o=0;o<t;o++)e[o]=arguments[o];return l.runHooks("beforeRowWrap",...e)})).addLocalHook("beforeColumnWrap",(function(){for(var t=arguments.length,e=new Array(t),o=0;o<t;o++)e[o]=arguments[o];return l.runHooks("beforeColumnWrap",...e)})).addLocalHook("insertRowRequire",(t=>this.alter("insert_row_above",t,1,"auto"))).addLocalHook("insertColRequire",(t=>this.alter("insert_col_start",t,1,"auto"))),m={alter(t,e){let o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,n=arguments.length>3?arguments[3]:void 0,i=arguments.length>4?arguments[4]:void 0;const s=t=>{if(0===t.length)return[];const e=[...t];return e.sort(((t,e)=>{let[o]=t,[n]=e;return o===n?0:o>n?1:-1})),(0,V.mu)(e,((t,e)=>{let[o,n]=e;const i=t[t.length-1],[r,s]=i,l=r+s;if(o<=l){const t=Math.max(n-(l-o),0);i[1]+=t}else t.push([o,n]);return t}),[e[0]])};switch(t){case"insert_row_below":case"insert_row_above":const i=u.countSourceRows();if(M.maxRows===i)return;const l="insert_row_below"===t?"below":"above";e=null!=e?e:"below"===l?i:0;const{delta:a,startPhysicalIndex:h}=f.createRow(e,o,{source:n,mode:l});O.shiftRows(u.toVisualRow(h),a);break;case"insert_col_start":case"insert_col_end":const c="insert_col_end"===t?"end":"start";e=null!=e?e:"end"===c?u.countSourceCols():0;const{delta:d,startPhysicalIndex:g}=f.createCol(e,o,{source:n,mode:c});if(d){if(Array.isArray(M.colHeaders)){const t=[u.toVisualColumn(g),0];t.length+=d,Array.prototype.splice.apply(M.colHeaders,t)}O.shiftColumns(u.toVisualColumn(g),d)}break;case"remove_row":const p=t=>{let e=0;(0,V.z0)(t,(t=>{let[o,i]=t;const s=(0,r.Im)(o)?u.countRows()-1:Math.max(o-e,0);if(Number.isInteger(o)&&(o=Math.max(o-e,0)),!f.removeRow(o,i,n))return;if(O.isSelected()){const{row:t}=u.getSelectedRangeLast().highlight;t>=o&&t<=o+i-1&&w.closeEditor(!0)}const l=u.countRows(),a=M.fixedRowsTop;a>=s+1&&(M.fixedRowsTop-=Math.min(i,a-s));const h=M.fixedRowsBottom;h&&s>=l-h&&(M.fixedRowsBottom-=Math.min(i,h)),0===l?O.deselect():"ContextMenu.removeRow"===n?O.refresh():O.shiftRows(o,-i),e+=i}))};Array.isArray(e)?p(s(e)):p([[e,o]]);break;case"remove_col":const m=t=>{let e=0;(0,V.z0)(t,(t=>{let[o,i]=t;const s=(0,r.Im)(o)?u.countCols()-1:Math.max(o-e,0);let l=u.toPhysicalColumn(s);if(Number.isInteger(o)&&(o=Math.max(o-e,0)),!f.removeCol(o,i,n))return;if(O.isSelected()){const{col:t}=u.getSelectedRangeLast().highlight;t>=o&&t<=o+i-1&&w.closeEditor(!0)}0===u.countCols()?O.deselect():"ContextMenu.removeColumn"===n?O.refresh():O.shiftColumns(o,-i);const a=M.fixedColumnsStart;a>=s+1&&(M.fixedColumnsStart-=Math.min(i,a-s)),Array.isArray(M.colHeaders)&&(void 0===l&&(l=-1),M.colHeaders.splice(l,i)),e+=i}))};Array.isArray(e)?m(s(e)):m([[e,o]]);break;default:throw new Error(`There is no such action "${t}"`)}i||m.adjustRowsAndCols(),u.view.render(),u.view.adjustElementsSize()},adjustRowsAndCols(){const t=M.minRows,e=M.minSpareRows,o=M.minCols,n=M.minSpareCols;if(t){const e=u.countRows();e<t&&f.createRow(e,t-e,{source:"auto"})}if(e){const t=u.countEmptyRows(!0);if(t<e){const o=e-t,n=Math.min(o,M.maxRows-u.countSourceRows());f.createRow(u.countRows(),n,{source:"auto"})}}{let t;(o||n)&&(t=u.countEmptyCols(!0));let e=u.countCols();if(o&&!M.columns&&e<o){const n=o-e;t+=n,f.createCol(e,n,{source:"auto"})}if(n&&!M.columns&&"array"===u.dataType&&t<n){e=u.countCols();const o=n-t,i=Math.min(o,M.maxCols-e);f.createCol(e,i,{source:"auto"})}}},populateFromArray(t,e,o,n,i){let r,s,l,a;const h=[],c={},d=[],g=t.row,f=t.col;if(s=e.length,0===s)return!1;let p=0,m=0;switch((0,v.Gv)(o)&&(p=o.col-f+1,m=o.row-g+1),i){case"shift_down":const i=(0,V.h9)(e),w=i.length,b=Math.max(w,p),y=u.getData().slice(g),C=(0,V.h9)(y).slice(f,f+b);for(l=0;l<b;l+=1)if(l<w){for(r=0,s=i[l].length;r<m-s;r+=1)i[l].push(i[l][r%s]);l<C.length?d.push(i[l].concat(C[l])):d.push(i[l].concat(new Array(y.length).fill(null)))}else d.push(i[l%w].concat(C[l]));u.populateFromArray(g,f,(0,V.h9)(d));break;case"shift_right":const S=e.length,R=Math.max(S,m),E=u.getData().slice(g).map((t=>t.slice(f)));for(r=0;r<R;r+=1)if(r<S){for(l=0,a=e[r].length;l<p-a;l+=1)e[r].push(e[r][l%a]);if(r<E.length)for(let t=0;t<E[r].length;t+=1)e[r].push(E[r][t]);else e[r].push(...new Array(E[0].length).fill(null))}else e.push(e[r%s].slice(0,R).concat(E[r]));u.populateFromArray(g,f,e);break;default:c.row=t.row,c.col=t.col;let T,x=0,I=0,H=!0;const O=function(t){let o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;const n=e[t%e.length];return null!==o?n[o%n.length]:n},A=e.length,k=o?o.row-t.row+1:0;for(s=o?k:Math.max(A,k),r=0;r<s&&!(o&&c.row>o.row&&k>A||!M.allowInsertRow&&c.row>u.countRows()-1||c.row>=M.maxRows);r++){const e=r-x,i=O(e).length,d=o?o.col-t.col+1:0;if(a=o?d:Math.max(i,d),c.col=t.col,T=u.getCellMeta(c.row,c.col),"CopyPaste.paste"!==n&&"Autofill.fill"!==n||!T.skipRowOnPaste){for(I=0,l=0;l<a&&!(o&&c.col>o.col&&d>i||!M.allowInsertColumn&&c.col>u.countCols()-1||c.col>=M.maxCols);l++){if(T=u.getCellMeta(c.row,c.col),("CopyPaste.paste"===n||"Autofill.fill"===n)&&T.skipColumnOnPaste){I+=1,c.col+=1,a+=1;continue}if(T.readOnly&&"UndoRedo.undo"!==n){c.col+=1;continue}let t=O(e,l-I),o=u.getDataAtCell(c.row,c.col);if(null!==t&&"object"==typeof t)if(Array.isArray(t)&&null===o&&(o=[]),null===o||"object"!=typeof o)H=!1;else{const e=(0,v.Nl)(Array.isArray(o)?o:o[0]||o),n=(0,v.Nl)(Array.isArray(t)?t:t[0]||t);(0,v.wU)(e,n)||Array.isArray(e)&&Array.isArray(n)?t=(0,v.Go)(t):H=!1}else null!==o&&"object"==typeof o&&(H=!1);H&&h.push([c.row,c.col,t]),H=!0,c.col+=1}c.row+=1}else x+=1,c.row+=1,s+=1}u.setDataAtCell(h,null,null,n||"populateFromArray")}}},this.init=function(){p.setData(M.data),u.runHooks("beforeInit"),((0,s.rr)()||(0,s.zG)())&&(0,n.iQ)(u.rootElement,"mobile"),this.updateSettings(e,!0),this.view=new Wn(this);const t=M.themeName||ml(u.rootElement);u.useTheme(t),u.view.addClassNameToLicenseElement(u.getCurrentThemeName()),w=b.getInstance(u,M,O),C=function(t){const{selection:e}=t;let o=!1,n=!1;return{resume(){n=!1},suspend(){n=!0},skipNextScrollCycle(){o=!0},scrollTo(i){var r;if(o||n)return void(o=!1);let s;e.isFocusSelectionChanged()?s=function(t){return e=>{t.scrollViewportTo(e.toObject(),(()=>{const{row:e,col:o}=t.getSelectedRangeLast().highlight;ls(t.getCell(e,o,!0))}))}}(t):e.isSelectedByCorner()?s=()=>{}:e.isSelectedByRowHeader()?s=function(t){return e=>{const o=as(t).getComputedRowTarget(e);t.scrollViewportTo({row:o},(()=>{const e=!!t.getSettings().rowHeaders;ls(t.getCell(o,e?-1:0,!0))}))}}(t):e.isSelectedByColumnHeader()?s=function(t){return e=>{const o=as(t).getComputedColumnTarget(e);t.scrollViewportTo({col:o},(()=>{const e=!!t.getSettings().colHeaders;ls(t.getCell(e?-1:0,o,!0))}))}}(t):1===e.getSelectedRange().size()&&e.isMultiple()?s=function(t){return e=>{const o=as(t),n={row:o.getComputedRowTarget(e),col:o.getComputedColumnTarget(e)};t.scrollViewportTo(n,(()=>{const{row:e,col:o}=n;ls(t.getCell(e,o,!0))}))}}(t):1!==e.getSelectedRange().size()||e.isMultiple()?e.getSelectedRange().size()>1&&(s=function(t){return e=>{const o=as(t),n={row:o.getComputedRowTarget(e),col:o.getComputedColumnTarget(e)};t.scrollViewportTo(n,(()=>{const{row:e,col:o}=n;ls(t.getCell(e,o,!0))}))}}(t)):s=function(t){return e=>{const o=t.selection.getSelectionSource(),{row:n,col:i}=e,r=()=>{ls(t.getCell(n,i,!0))};if(n<0&&i>=0)t.scrollViewportTo({col:i},r);else if(i<0&&n>=0)t.scrollViewportTo({row:n},r);else{if("mouse"===o&&(i===t.view.getLastPartiallyVisibleColumn()||n===t.view.getLastPartiallyVisibleRow()))return;t.scrollViewportTo({row:n,col:i},r)}}}(t),null===(r=s)||void 0===r||r(i)}}}(u),y=new _(u),Sn(this)&&function(t){const e=function(t){return e=>{if(!e)return null;const o=ds(t),n=us(t);return e.col<o.col&&(e.col=o.col),e.col>n.col&&(e.col=n.col),e.row<o.row&&(e.row=o.row),e.row>n.row&&(e.row=n.row),e}}(t);let o;const{activate:n,deactivate:i}=function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const o=t.rootElement,n=cs(t),i=cs(t);return n.addEventListener("focus",(()=>null==e?void 0:e.onFocusFromTop())),i.addEventListener("focus",(()=>null==e?void 0:e.onFocusFromBottom())),o.firstChild.before(n),o.lastChild.after(i),{activate(){t._registerTimeout((()=>{n.tabIndex=0,i.tabIndex=0}),10)},deactivate(){t._registerTimeout((()=>{n.tabIndex=-1,i.tabIndex=-1}),10)}}}(t,{onFocusFromTop(){var n;const i=null!==(n=e(o))&&void 0!==n?n:ds(t);i&&(t.runHooks("modifyFocusOnTabNavigation","from_above",i),t.selectCell(i.row,i.col)),t.listen()},onFocusFromBottom(){var n;const i=null!==(n=e(o))&&void 0!==n?n:us(t);i&&(t.runHooks("modifyFocusOnTabNavigation","from_below",i),t.selectCell(i.row,i.col)),t.listen()}}),r={wrapped:!1,flipped:!1};let s=!0,l=!1,a=!1;t.addHook("afterListen",(()=>i())),t.addHook("afterUnlisten",(()=>n())),t.addHook("afterSelection",((e,n,i,h,c)=>{var d;l&&(r.wrapped&&r.flipped||a)&&(a=!1,c.value=!0),s&&(o=null===(d=t.getSelectedRangeLast())||void 0===d?void 0:d.highlight)})),t.addHook("beforeRowWrap",((t,e,o)=>{r.wrapped=!0,r.flipped=o}));const h={keys:[["Tab"],["Shift","Tab"]],preventDefault:!1,stopPropagation:!1,relativeToGroup:hs.B,group:"focusCatcher"};t.getShortcutManager().getContext("grid").addShortcuts([{...h,callback:()=>{const{tabNavigation:e}=t.getSettings();l=!0,t.getSelectedRangeLast()&&!e&&(s=!1),e||(a=!0)},position:"before"},{...h,callback:e=>{const{tabNavigation:n,autoWrapRow:i}=t.getSettings();if(l=!1,s=!0,!n||!t.selection.isSelected()||i&&r.wrapped&&r.flipped||!i&&r.wrapped)return i&&r.wrapped&&r.flipped&&(o=e.shiftKey?ds(t):us(t)),r.wrapped=!1,r.flipped=!1,t.deselectCell(),t.unlisten(),!1;e.preventDefault()},position:"after"}])}(u),u.runHooks("init"),this.render(),S&&null===u.rootElement.offsetParent&&(0,n.I6)(u.rootElement,(()=>{u.view._wt.wtOverlays.updateLastSpreaderSize(),u.render(),u.view.adjustElementsSize()})),"object"==typeof S&&(u.runHooks("afterChange",S[0],S[1]),S=!1),u.runHooks("afterInit")},this._createCellCoords=function(t,e){return u.view._wt.createCellCoords(t,e)},this._createCellRange=function(t,e,o){return u.view._wt.createCellRange(t,e,o)},this.validateCell=function(t,e,o,n){let s=u.getCellValidator(e);function l(t){if(arguments.length>1&&void 0!==arguments[1]&&!arguments[1]||!0===e.hidden)return void o(t);const n=e.visualCol,i=e.visualRow,r=u.getCell(i,n,!0);if(r&&"TH"!==r.nodeName){const t=u.rowIndexMapper.getRenderableFromVisualIndex(i),e=u.columnIndexMapper.getRenderableFromVisualIndex(n);u.view._wt.getSetting("cellRenderer",t,e,r)}o(t)}var a;(0,r.gd)(s)&&(a=s,s=function(t,e){e(a.test(t))}),(0,i.Tn)(s)?(t=u.runHooks("beforeValidate",t,e.visualRow,e.prop,n),u._registerImmediate((()=>{s.call(e,t,(o=>{u&&(o=u.runHooks("afterValidate",o,t,e.visualRow,e.prop,n),e.valid=o,l(o),u.runHooks("postAfterValidate",o,t,e.visualRow,e.prop,n))}))}))):u._registerImmediate((()=>{e.valid=!0,l(e.valid,!1)}))},this.setDataAtCell=function(t,e,o,n){const i=$(t,e,o),r=[];let s,l,a,h=n;for(s=0,l=i.length;s<l;s++){if("object"!=typeof i[s])throw new Error("Method `setDataAtCell` accepts row number or changes array of arrays as its first parameter");if("number"!=typeof i[s][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`");a=i[s][1]>=this.countCols()?i[s][1]:f.colToProp(i[s][1]),r.push([i[s][0],a,p.getAtCell(this.toPhysicalRow(i[s][0]),i[s][1]),i[s][2]])}h||"object"!=typeof t||(h=e);const c=G(r,h);u.runHooks("afterSetDataAtCell",c,h),L(c,h,(()=>{D(c,h)}))},this.setDataAtRowProp=function(t,e,o,n){const i=$(t,e,o),r=[];let s,l,a=n;for(s=0,l=i.length;s<l;s++)r.push([i[s][0],i[s][1],p.getAtCell(this.toPhysicalRow(i[s][0]),i[s][1]),i[s][2]]);a||"object"!=typeof t||(a=e);const h=G(r,n);u.runHooks("afterSetDataAtRowProp",h,a),L(h,a,(()=>{D(h,a)}))},this.listen=function(){u&&!u.isListening()&&(bl.forEach((t=>{u!==t&&t.unlisten()})),wl=u.guid,u.runHooks("afterListen"))},this.unlisten=function(){this.isListening()&&(wl=null,u.runHooks("afterUnlisten"))},this.isListening=function(){return wl===u.guid},this.destroyEditor=function(){let t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];w.closeEditor(t),u.view.render(),e&&O.isSelected()&&w.prepareEditor()},this.populateFromArray=function(t,e,o,n,i,r,s){if("object"!=typeof o||"object"!=typeof o[0])throw new Error("populateFromArray parameter `input` must be an array of arrays");const l="number"==typeof n?u._createCellCoords(n,i):null;return m.populateFromArray(u._createCellCoords(t,e),o,l,r,s)},this.spliceCol=function(t,e,o){for(var n=arguments.length,i=new Array(n>3?n-3:0),r=3;r<n;r++)i[r-3]=arguments[r];return f.spliceCol(t,e,o,...i)},this.spliceRow=function(t,e,o){for(var n=arguments.length,i=new Array(n>3?n-3:0),r=3;r<n;r++)i[r-3]=arguments[r];return f.spliceRow(t,e,o,...i)},this.getSelected=function(){if(O.isSelected())return(0,V.YD)(O.getSelectedRange(),(t=>{let{from:e,to:o}=t;return[e.row,e.col,o.row,o.col]}))},this.getSelectedLast=function(){const t=this.getSelected();let e;return t&&t.length>0&&(e=t[t.length-1]),e},this.getSelectedRange=function(){if(O.isSelected())return Array.from(O.getSelectedRange())},this.getSelectedRangeLast=function(){const t=this.getSelectedRange();let e;return t&&t.length>0&&(e=t[t.length-1]),e},this.emptySelectedCells=function(t){if(!O.isSelected()||0===this.countRows()||0===this.countCols())return;const e=[];(0,V.z0)(O.getSelectedRange(),(t=>{if(t.isSingleHeader())return;const o=t.getTopStartCorner(),n=t.getBottomEndCorner();(0,U.Ti)(o.row,n.row,(t=>{(0,U.Ti)(o.col,n.col,(o=>{this.getCellMeta(t,o).readOnly||e.push([t,o,null])}))}))})),e.length>0&&this.setDataAtCell(e,t)},this.isRenderSuspended=function(){return this.renderSuspendedCounter>0},this.suspendRender=function(){this.renderSuspendedCounter+=1},this.resumeRender=function(){const t=this.renderSuspendedCounter-1;this.renderSuspendedCounter=Math.max(t,0),this.isRenderSuspended()||t!==this.renderSuspendedCounter||u.view.render()},this.render=function(){this.view&&(this.forceFullRender=!0,this.isRenderSuspended()||u.view.render())},this.batchRender=function(t){this.suspendRender();const e=t();return this.resumeRender(),e},this.isExecutionSuspended=function(){return this.executionSuspendedCounter>0},this.suspendExecution=function(){this.executionSuspendedCounter+=1,this.columnIndexMapper.suspendOperations(),this.rowIndexMapper.suspendOperations()},this.resumeExecution=function(){let t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];const e=this.executionSuspendedCounter-1;this.executionSuspendedCounter=Math.max(e,0),(!this.isExecutionSuspended()&&e===this.executionSuspendedCounter||t)&&(this.columnIndexMapper.resumeOperations(),this.rowIndexMapper.resumeOperations())},this.batchExecution=function(t){let e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];this.suspendExecution();const o=t();return this.resumeExecution(e),o},this.batch=function(t){this.suspendRender(),this.suspendExecution();const e=t();return this.resumeExecution(),this.resumeRender(),e},this.refreshDimensions=function(){if(!u.view)return;const t=u.view,{width:e,height:o}=t.getLastSize(),{width:n,height:i}=u.rootElement.getBoundingClientRect(),r=n!==e||i!==o;!1===u.runHooks("beforeRefreshDimensions",{width:e,height:o},{width:n,height:i},r)||((r||t._wt.wtOverlays.scrollableElement===u.rootWindow)&&(t.setLastSize(n,i),u.render(),t.adjustElementsSize()),u.runHooks("afterRefreshDimensions",{width:e,height:o},{width:n,height:i},r))},this.updateData=function(t,e){ss(t,(t=>{f=t}),(t=>{f=t,u.columnIndexMapper.fitToLength(this.getInitialColumnCount()),u.rowIndexMapper.fitToLength(this.countSourceRows()),m.adjustRowsAndCols(),O.refresh()}),{hotInstance:u,dataMap:f,dataSource:p,internalSource:"updateData",source:e,metaManager:x,firstRun:S})},this.loadData=function(t,e){ss(t,(t=>{f=t}),(()=>{x.clearCellsCache(),u.initIndexMappers(),m.adjustRowsAndCols(),O.refresh(),S&&(S=[null,"loadData"])}),{hotInstance:u,dataMap:f,dataSource:p,internalSource:"loadData",source:e,metaManager:x,firstRun:S})},this.getInitialColumnCount=function(){const t=M.columns;let e=0;if(Array.isArray(t))e=t.length;else if((0,i.Tn)(t))if("array"===u.dataType){const o=this.countSourceCols();for(let n=0;n<o;n+=1)t(n)&&(e+=1)}else"object"!==u.dataType&&"function"!==u.dataType||(e=f.colToPropCache.length);else if((0,r.O9)(M.dataSchema)){const t=f.getSchema();e=Array.isArray(t)?t.length:(0,v.$3)(t)}else e=this.countSourceCols();return e},this.initIndexMappers=function(){this.columnIndexMapper.initToLength(this.getInitialColumnCount()),this.rowIndexMapper.initToLength(this.countSourceRows())},this.getData=function(t,e,o,n){return(0,r.b0)(t)?f.getAll():f.getRange(u._createCellCoords(t,e),u._createCellCoords(o,n),f.DESTINATION_RENDERER)},this.getCopyableText=function(t,e,o,n){return f.getCopyableText(u._createCellCoords(t,e),u._createCellCoords(o,n))},this.getCopyableData=function(t,e){return f.getCopyable(t,f.colToProp(e))},this.getSchema=function(){return f.getSchema()},this.updateSettings=function(t){let e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const o=(S?u.loadData:u.updateData).bind(this);let n,s,l=!1;if((0,r.O9)(t.rows))throw new Error('The "rows" setting is no longer supported. Do you mean startRows, minRows or maxRows?');if((0,r.O9)(t.cols))throw new Error('The "cols" setting is no longer supported. Do you mean startCols, minCols or maxCols?');if((0,r.O9)(t.ganttChart))throw new Error('Since 8.0.0 the "ganttChart" setting is no longer supported.');for(n in t.language&&function(t){const e=Ci(t);Li(e)?(u.runHooks("beforeLanguageChange",e),I.language=e,u.runHooks("afterLanguageChange",e)):Si(t)}(t.language),t)if("data"===n||"language"===n);else if("className"===n)k("className",t.className);else if("tableClassName"===n&&u.table)k("tableClassName",t.tableClassName),u.view._wt.wtOverlays.syncOverlayTableClassNames();else if(yi.R.getSingleton().isRegistered(n)||yi.R.getSingleton().isDeprecated(n)){const e=t[n];(0,i.Tn)(e)?(yi.R.getSingleton().addAsFixed(n,e,u),M[n]=e):Array.isArray(e)&&(yi.R.getSingleton().add(n,e,u),M[n]=e)}else!e&&(0,v.mQ)(t,n)&&(I[n]=t[n]);void 0===t.data&&void 0===M.data?o(null,"updateSettings"):void 0!==t.data?o(t.data,"updateSettings"):void 0!==t.columns&&(f.createMap(),u.initIndexMappers());const a=u.countCols(),h=M.columns;if(h&&(0,i.Tn)(h)&&(l=!0),void 0===t.cell&&void 0===t.cells&&void 0===t.columns||x.clearCache(),a>0)for(n=0,s=0;n<a;n++){if(h){const t=l?h(n):h[s];t&&x.updateColumnMeta(s,t)}s+=1}(0,r.O9)(t.cell)&&(0,v.v4)(t.cell,(t=>{u.setCellMetaObject(t.row,t.col,t)})),u.runHooks("afterCellMetaReset");let c=u.rootElement.style.height;""!==c&&(c=parseInt(u.rootElement.style.height,10));let d=t.height;if((0,i.Tn)(d)&&(d=d()),e&&u.rootElement.getAttribute("style")&&u.rootElement.setAttribute("data-initialstyle",u.rootElement.getAttribute("style")),null===d){const t=u.rootElement.getAttribute("data-initialstyle");t&&(t.indexOf("height")>-1||t.indexOf("overflow")>-1)?u.rootElement.setAttribute("style",t):(u.rootElement.style.height="",u.rootElement.style.overflow="")}else void 0!==d&&(u.rootElement.style.height=isNaN(d)?`${d}`:`${d}px`,u.rootElement.style.overflow="hidden");if(void 0!==t.width){let e=t.width;(0,i.Tn)(e)&&(e=e()),u.rootElement.style.width=isNaN(e)?`${e}`:`${e}px`}if(!e){if(u.view){u.view._wt.wtViewport.resetHasOversizedColumnHeadersMarked(),u.view._wt.exportSettingsAsClassNames();const e=u.getCurrentThemeName(),o=(0,v.mQ)(t,"themeName");e&&o&&e!==t.themeName&&(u.view.getStylesHandler().removeClassNames(),u.view.removeClassNameFromLicenseElement(e));const n=o&&t.themeName||ml(u.rootElement);u.useTheme(n),u.view.addClassNameToLicenseElement(u.getCurrentThemeName())}u.runHooks("afterUpdateSettings",t)}m.adjustRowsAndCols(),u.view&&!S&&(u.render(),u.view._wt.wtOverlays.adjustElementsSize()),e||!u.view||""!==c&&""!==d&&void 0!==d||c===d||u.view._wt.wtOverlays.updateMainScrollableElements()},this.getValue=function(){const t=u.getSelectedLast();if(M.getValue){if((0,i.Tn)(M.getValue))return M.getValue.call(u);if(t)return u.getData()[t[0][0]][M.getValue]}else if(t)return u.getDataAtCell(t[0],t[1])},this.getSettings=function(){return M},this.clear=function(){this.selectAll(),this.emptySelectedCells()},this.alter=function(t,e,o,n,i){m.alter(t,e,o,n,i)},this.getCell=function(t,e){let o=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=e,i=t;if(e>=0){if(this.columnIndexMapper.isHidden(this.toPhysicalColumn(e)))return null;n=this.columnIndexMapper.getRenderableFromVisualIndex(e)}if(t>=0){if(this.rowIndexMapper.isHidden(this.toPhysicalRow(t)))return null;i=this.rowIndexMapper.getRenderableFromVisualIndex(t)}return null===i||null===n||void 0===i||void 0===n?null:u.view.getCellAtCoords(u._createCellCoords(i,n),o)},this.getCoords=function(t){const e=this.view._wt.wtTable.getCoords(t);if(null===e)return null;const{row:o,col:n}=e;let i=o,r=n;return o>=0&&(i=this.rowIndexMapper.getVisualFromRenderableIndex(o)),n>=0&&(r=this.columnIndexMapper.getVisualFromRenderableIndex(n)),u._createCellCoords(i,r)},this.colToProp=function(t){return f.colToProp(t)},this.propToCol=function(t){return f.propToCol(t)},this.toVisualRow=t=>this.rowIndexMapper.getVisualFromPhysicalIndex(t),this.toVisualColumn=t=>this.columnIndexMapper.getVisualFromPhysicalIndex(t),this.toPhysicalRow=t=>this.rowIndexMapper.getPhysicalFromVisualIndex(t),this.toPhysicalColumn=t=>this.columnIndexMapper.getPhysicalFromVisualIndex(t),this.getDataAtCell=function(t,e){return f.get(t,f.colToProp(e))},this.getDataAtRowProp=function(t,e){return f.get(t,e)},this.getDataAtCol=function(t){const e=[],o=f.getRange(u._createCellCoords(0,t),u._createCellCoords(M.data.length-1,t),f.DESTINATION_RENDERER);for(let t=0;t<o.length;t+=1)for(let n=0;n<o[t].length;n+=1)e.push(o[t][n]);return e},this.getDataAtProp=function(t){const e=[],o=f.getRange(u._createCellCoords(0,f.propToCol(t)),u._createCellCoords(M.data.length-1,f.propToCol(t)),f.DESTINATION_RENDERER);for(let t=0;t<o.length;t+=1)for(let n=0;n<o[t].length;n+=1)e.push(o[t][n]);return e},this.getSourceData=function(t,e,o,n){let i;return i=void 0===t?p.getData():p.getByRange(u._createCellCoords(t,e),u._createCellCoords(o,n)),i},this.getSourceDataArray=function(t,e,o,n){let i;return i=void 0===t?p.getData(!0):p.getByRange(u._createCellCoords(t,e),u._createCellCoords(o,n),!0),i},this.getSourceDataAtCol=function(t){return p.getAtColumn(t)},this.setSourceDataAtCell=function(t,e,o,n){const i=$(t,e,o),s=this.hasHook("afterSetSourceDataAtCell"),l=[];s&&(0,V.z0)(i,(t=>{let[e,o,n]=t;l.push([e,o,p.getAtCell(e,o),n])})),(0,V.z0)(i,(t=>{let[e,o,n]=t;p.setAtCell(e,o,n)})),s&&this.runHooks("afterSetSourceDataAtCell",l,n),this.render();const a=u.getActiveEditor();a&&(0,r.O9)(a.refreshValue)&&a.refreshValue()},this.getSourceDataAtRow=function(t){return p.getAtRow(t)},this.getSourceDataAtCell=function(t,e){return p.getAtCell(t,e)},this.getDataAtRow=function(t){return f.getRange(u._createCellCoords(t,0),u._createCellCoords(t,this.countCols()-1),f.DESTINATION_RENDERER)[0]||[]},this.getDataType=function(t,e,o,n){const i=void 0===t?[0,0,this.countRows(),this.countCols()]:[t,e,o,n],[r,s]=i;let[,,l,a]=i,h=null,c=null;void 0===l&&(l=r),void 0===a&&(a=s);let d="mixed";return(0,U.Ti)(Math.max(Math.min(r,l),0),Math.max(r,l),(t=>{let e=!0;return(0,U.Ti)(Math.max(Math.min(s,a),0),Math.max(s,a),(o=>{const n=this.getCellMeta(t,o);return c=n.type,h?e=h===c:h=c,e})),d=e?c:"mixed",e})),d},this.removeCellMeta=function(t,e,o){const[n,i]=[this.toPhysicalRow(t),this.toPhysicalColumn(e)];let r=x.getCellMetaKeyValue(n,i,o);!1!==u.runHooks("beforeRemoveCellMeta",t,e,o,r)&&(x.removeCellMeta(n,i,o),u.runHooks("afterRemoveCellMeta",t,e,o,r)),r=null},this.spliceCellsMeta=function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;for(var o=arguments.length,n=new Array(o>2?o-2:0),i=2;i<o;i++)n[i-2]=arguments[i];if(n.length>0&&!Array.isArray(n[0]))throw new Error("The 3rd argument (cellMetaRows) has to be passed as an array of cell meta objects array.");e>0&&x.removeRow(this.toPhysicalRow(t),e),n.length>0&&(0,V.z0)(n.reverse(),(e=>{x.createRow(this.toPhysicalRow(t)),(0,V.z0)(e,((e,o)=>this.setCellMetaObject(t,o,e)))})),u.render()},this.setCellMetaObject=function(t,e,o){"object"==typeof o&&(0,v.v4)(o,((o,n)=>{this.setCellMeta(t,e,n,o)}))},this.setCellMeta=function(t,e,o,n){if(!1===u.runHooks("beforeSetCellMeta",t,e,o,n))return;let i=t,r=e;t<this.countRows()&&(i=this.toPhysicalRow(t)),e<this.countCols()&&(r=this.toPhysicalColumn(e)),x.setCellMeta(i,r,o,n),u.runHooks("afterSetCellMeta",t,e,o,n)},this.getCellsMeta=function(){return x.getCellsMeta()},this.getCellMeta=function(t,e){let o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{skipMetaExtension:!1},n=this.toPhysicalRow(t),i=this.toPhysicalColumn(e);return null===n&&(n=t),null===i&&(i=e),x.getCellMeta(n,i,{visualRow:t,visualColumn:e,...o})},this.getColumnMeta=function(t){return x.getColumnMeta(this.toPhysicalColumn(t))},this.getCellMetaAtRow=function(t){return x.getCellsMetaAtRow(t)},this.isColumnModificationAllowed=function(){return!("object"===u.dataType||M.columns)},this.getCellRenderer=function(t,e){const o="number"==typeof t?u.getCellMeta(t,e).renderer:t.renderer;return"string"==typeof o?(0,W.gB)(o):(0,r.b0)(o)?(0,W.gB)("text"):o},this.getCellEditor=function(t,e){const o="number"==typeof t?u.getCellMeta(t,e).editor:t.editor;return"string"==typeof o?(0,h.M8)(o):(0,r.b0)(o)?(0,h.M8)("text"):o},this.getCellValidator=function(t,e){const o="number"==typeof t?u.getCellMeta(t,e).validator:t.validator;return"string"==typeof o?(0,z.by)(o):o},this.validateCells=function(t){this._validateCells(t)},this.validateRows=function(t,e){if(!Array.isArray(t))throw new Error("validateRows parameter `rows` must be an array");this._validateCells(e,t)},this.validateColumns=function(t,e){if(!Array.isArray(t))throw new Error("validateColumns parameter `columns` must be an array");this._validateCells(e,void 0,t)},this._validateCells=function(t,e,o){const n=new N;t&&(n.onQueueEmpty=t);let i=u.countRows()-1;for(;i>=0;){if(void 0!==e&&-1===e.indexOf(i)){i-=1;continue}let t=u.countCols()-1;for(;t>=0;)void 0===o||-1!==o.indexOf(t)?(n.addValidatorToQueue(),u.validateCell(u.getDataAtCell(i,t),u.getCellMeta(i,t),(t=>{if("boolean"!=typeof t)throw new Error("Validation error: result is not boolean");!1===t&&(n.valid=!1),n.removeValidatorFormQueue()}),"validateCells"),t-=1):t-=1;i-=1}n.checkIfQueueIsEmpty()},this.getRowHeader=function(t){let e=M.rowHeaders,o=t;return void 0!==o&&(o=u.runHooks("modifyRowHeader",o)),void 0===o?(e=[],(0,U.Ti)(u.countRows()-1,(t=>{e.push(u.getRowHeader(t))}))):Array.isArray(e)&&void 0!==e[o]?e=e[o]:(0,i.Tn)(e)?e=e(o):e&&"string"!=typeof e&&"number"!=typeof e&&(e=o+1),e},this.hasRowHeaders=function(){return!!M.rowHeaders},this.hasColHeaders=function(){if(void 0!==M.colHeaders&&null!==M.colHeaders)return!!M.colHeaders;for(let t=0,e=u.countCols();t<e;t++)if(u.getColHeader(t))return!0;return!1},this.getColHeader=function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1;const o=u.runHooks("modifyColHeader",t);if(void 0===o){const t=[],e=u.countCols();for(let o=0;o<e;o++)t.push(u.getColHeader(o));return t}let n=M.colHeaders;const r=u.toPhysicalColumn(o),s=function(t){const e=[],o=u.countCols();let n=0;for(;n<o;n++)(0,i.Tn)(M.columns)&&M.columns(n)&&e.push(n);return e[t]}(r);return!1===M.colHeaders?n=null:M.columns&&(0,i.Tn)(M.columns)&&M.columns(s)&&M.columns(s).title?n=M.columns(s).title:M.columns&&M.columns[r]&&M.columns[r].title?n=M.columns[r].title:Array.isArray(M.colHeaders)&&void 0!==M.colHeaders[r]?n=M.colHeaders[r]:(0,i.Tn)(M.colHeaders)?n=M.colHeaders(r):M.colHeaders&&"string"!=typeof M.colHeaders&&"number"!=typeof M.colHeaders&&(n=(0,zn.$I)(o)),n=u.runHooks("modifyColumnHeaderValue",n,t,e),n},this._getColWidthFromSettings=function(t){let e;if(t>=0&&(e=u.getCellMeta(0,t).width),void 0!==e&&e!==M.width||(e=M.colWidths),null!=e){switch(typeof e){case"object":e=e[t];break;case"function":e=e(t)}"string"==typeof e&&(e=parseInt(e,10))}return e},this.getColWidth=function(t,e){let o=u._getColWidthFromSettings(t);return o=u.runHooks("modifyColWidth",o,t,e),void 0===o&&(o=bo.j),o},this._getRowHeightFromSettings=function(t){const e=this.view.getDefaultRowHeight();let o=M.rowHeights;if(null!=o){switch(typeof o){case"object":o=o[t];break;case"function":o=o(t)}"string"==typeof o&&(o=parseInt(o,10))}return null!=o&&o<e?e:o},this.getRowHeight=function(t,e){let o=u._getRowHeightFromSettings(t);return o=u.runHooks("modifyRowHeight",o,t,e),o},this.countSourceRows=function(){return p.countRows()},this.countSourceCols=function(){return p.countFirstRowKeys()},this.countRows=function(){return f.getLength()},this.countCols=function(){const t=M.maxCols,e=this.columnIndexMapper.getNotTrimmedIndexesLength();return Math.min(t,e)},this.countRenderedRows=function(){return u.view._wt.drawn?u.view._wt.wtTable.getRenderedRowsCount():-1},this.countVisibleRows=function(){return u.view._wt.drawn?u.view._wt.wtTable.getVisibleRowsCount():-1},this.countRenderedCols=function(){return u.view._wt.drawn?u.view._wt.wtTable.getRenderedColumnsCount():-1},this.countVisibleCols=function(){return u.view._wt.drawn?u.view._wt.wtTable.getVisibleColumnsCount():-1},this.countRowHeaders=function(){return this.view.getRowHeadersCount()},this.countColHeaders=function(){return this.view.getColumnHeadersCount()},this.countEmptyRows=function(){let t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],e=0;return(0,U.fk)(u.countRows()-1,(o=>{if(u.isEmptyRow(o))e+=1;else if(!0===t)return!1})),e},this.countEmptyCols=function(){let t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],e=0;return(0,U.fk)(u.countCols()-1,(o=>{if(u.isEmptyCol(o))e+=1;else if(!0===t)return!1})),e},this.isEmptyRow=function(t){return M.isEmptyRow.call(u,t)},this.isEmptyCol=function(t){return M.isEmptyCol.call(u,t)},this.selectCell=function(t,e,o,n){let i=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],s=!(arguments.length>5&&void 0!==arguments[5])||arguments[5];return!(0,r.b0)(t)&&!(0,r.b0)(e)&&this.selectCells([[t,e,o,n]],i,s)},this.selectCells=function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[[]],e=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];!1===(!(arguments.length>1&&void 0!==arguments[1])||arguments[1])&&C.suspend();const o=O.selectCells(t);return o&&e&&u.listen(),C.resume(),o},this.selectColumns=function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t,o=arguments.length>2?arguments[2]:void 0;return O.selectColumns(t,e,o)},this.selectRows=function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t,o=arguments.length>2?arguments[2]:void 0;return O.selectRows(t,e,o)},this.deselectCell=function(){O.deselect()},this.selectAll=function(){let t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t,o=arguments.length>2?arguments[2]:void 0;C.skipNextScrollCycle(),O.selectAll(t,e,o)};const Y=(t,e)=>t.getNearestNotHiddenIndex(e,1,!0);this.scrollViewportTo=function(t,e){var o;"number"==typeof t&&(t={row:arguments[0],col:arguments[1],verticalSnap:arguments[2]?"bottom":"top",horizontalSnap:arguments[3]?"end":"start",considerHiddenIndexes:null===(o=arguments[4])||void 0===o||o});const{row:n,col:r,considerHiddenIndexes:s}=null!=t?t:{};let l=n,a=r;if((0,i.Tn)(e)&&this.addHookOnce("afterScroll",e),void 0===s||s){const t=Number.isInteger(n)&&n>=0,e=Number.isInteger(r)&&r>=0,o=t?Y(this.rowIndexMapper,n):void 0,i=e?Y(this.columnIndexMapper,r):void 0;if(null===o||null===i)return!1;l=t?u.rowIndexMapper.getRenderableFromVisualIndex(o):n,a=e?u.columnIndexMapper.getRenderableFromVisualIndex(i):r}const h=Number.isInteger(l),c=Number.isInteger(a);let d=!1;return h&&l>=0&&c&&a>=0?d=u.view.scrollViewport(u._createCellCoords(l,a),t.horizontalSnap,t.verticalSnap):h&&l>=0&&(c&&a<0||!c)?d=u.view.scrollViewportVertically(l,t.verticalSnap):c&&a>=0&&(h&&l<0||!h)&&(d=u.view.scrollViewportHorizontally(a,t.horizontalSnap)),(0,i.Tn)(e)&&(d?this.view.render():(this.removeHook("afterScroll",e),this._registerMicrotask((()=>e())))),d},this.scrollToFocusedCell=function(t){if(!this.selection.isSelected())return!1;(0,i.Tn)(t)&&this.addHookOnce("afterScroll",t);const{highlight:e}=this.getSelectedRangeLast(),o=this.scrollViewportTo(e.toObject());return o?this.view.render():(0,i.Tn)(t)&&(this.removeHook("afterScroll",t),this._registerMicrotask((()=>t()))),o},this.destroy=function(){if(u._clearTimeouts(),u._clearImmediates(),u.view&&u.view.destroy(),p&&p.destroy(),p=null,this.getShortcutManager().destroy(),x.clearCache(),bl.delete(this.guid),Sn(u)){const t=this.rootDocument.querySelector(".hot-display-license-info");t&&t.parentNode.removeChild(t)}(0,n.Ie)(u.rootElement),g.destroy(),w&&w.destroy(),u.batchExecution((()=>{u.rowIndexMapper.unregisterAll(),u.columnIndexMapper.unregisterAll(),H.getItems().forEach((t=>{let[,e]=t;e.destroy()})),H.clear(),u.runHooks("afterDestroy")}),!0),yi.R.getSingleton().destroy(u),(0,v.v4)(u,((t,e,o)=>{var n;(0,i.Tn)(t)?o[e]=(n=e,()=>{throw new Error(`The "${n}" method cannot be called because this Handsontable instance has been destroyed`)}):"guid"!==e&&(o[e]=null)})),u.isDestroyed=!0,f&&f.destroy(),f=null,m=null,O=null,w=null,u=null},this.getActiveEditor=function(){return w.getActiveEditor()},this.getFirstRenderedVisibleRow=function(){return u.view.getFirstRenderedVisibleRow()},this.getLastRenderedVisibleRow=function(){return u.view.getLastRenderedVisibleRow()},this.getFirstRenderedVisibleColumn=function(){return u.view.getFirstRenderedVisibleColumn()},this.getLastRenderedVisibleColumn=function(){return u.view.getLastRenderedVisibleColumn()},this.getFirstFullyVisibleRow=function(){return u.view.getFirstFullyVisibleRow()},this.getLastFullyVisibleRow=function(){return u.view.getLastFullyVisibleRow()},this.getFirstFullyVisibleColumn=function(){return u.view.getFirstFullyVisibleColumn()},this.getLastFullyVisibleColumn=function(){return u.view.getLastFullyVisibleColumn()},this.getFirstPartiallyVisibleRow=function(){return u.view.getFirstPartiallyVisibleRow()},this.getLastPartiallyVisibleRow=function(){return u.view.getLastPartiallyVisibleRow()},this.getFirstPartiallyVisibleColumn=function(){return u.view.getFirstPartiallyVisibleColumn()},this.getLastPartiallyVisibleColumn=function(){return u.view.getLastPartiallyVisibleColumn()},this.getPlugin=function(t){return H.getItem((0,j.Ob)(t))},this.getPluginName=function(t){return t===this.undoRedo?this.undoRedo.constructor.PLUGIN_KEY:H.getId(t)},this.getInstance=function(){return u},this.addHook=function(t,e,o){yi.R.getSingleton().add(t,e,u,o)},this.hasHook=function(t){return yi.R.getSingleton().has(t,u)||yi.R.getSingleton().has(t)},this.addHookOnce=function(t,e,o){yi.R.getSingleton().once(t,e,u,o)},this.removeHook=function(t,e){yi.R.getSingleton().remove(t,e,u)},this.runHooks=function(t,e,o,n,i,r,s){return yi.R.getSingleton().run(u,t,e,o,n,i,r,s)},this.getTranslatedPhrase=function(t,e){return Di(M.language,t,e)},this.toHTML=()=>(0,F.KN)(this),this.toTableElement=()=>{const t=this.rootDocument.createElement("div");return t.insertAdjacentHTML("afterbegin",(0,F.KN)(this)),t.firstElementChild},this.timeouts=[],this.useTheme=t=>{this.view.getStylesHandler().useTheme(t),this.runHooks("afterSetTheme",t,!!S)},this.getCurrentThemeName=()=>this.view.getStylesHandler().getThemeName(),this._registerTimeout=function(t){let e=t;"function"==typeof e&&(e=setTimeout(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0)),this.timeouts.push(e)},this._clearTimeouts=function(){(0,V.z0)(this.timeouts,(t=>{clearTimeout(t)}))},this.immediates=[],this._registerImmediate=function(t){this.immediates.push(setImmediate(t))},this._clearImmediates=function(){(0,V.z0)(this.immediates,(t=>{clearImmediate(t)}))},this._registerMicrotask=function(t){this.rootWindow.queueMicrotask((()=>{this.isDestroyed||t()}))},this._getEditorManager=function(){return w};const X=(t=>{let{ownerWindow:e,handleEvent:o,beforeKeyDown:l,afterKeyDown:h}=t;const c=(0,gs.u)({errorIdExists:t=>`The "${t}" context name is already registered.`});let d="grid";const u=()=>d,g=t=>c.getItem(t);let f=!1;const p=function(t,e){let o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:u();const n=vs(o)?o:g(o);let i=!1;if(!n.hasShortcut(e))return i;const r=n.getShortcuts(e);for(let o=0;o<r.length;o++){const{callback:n,runOnlyIf:s,preventDefault:l,stopPropagation:h,captureCtrl:c,forwardToContext:d}=r[o];if(!0===s(t)){if(f=c,i=!1===n(t,e),f=!1,l&&t.preventDefault(),h&&((0,a.CA)(t),t.stopPropagation()),i)break;d&&p(t,e,d)}}return i},m=function(t,e,o,i,r){const l=t=>ys.includes(t),h=function(t){let e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const o=[];return t.altKey&&o.push("alt"),e&&(t.ctrlKey||t.metaKey)?o.push("control/meta"):(t.ctrlKey&&o.push("control"),t.metaKey&&o.push("meta")),t.shiftKey&&o.push("shift"),o},c=t=>{if(!1===e(t))return;if(!1===o(t)||229===t.keyCode||"string"!=typeof t.key||(0,a.d)(t))return;const n=ws(t);let c=[];l(n)||(c=h(t));const d=[n].concat(c);!r(t,d)&&((0,s.U0)()&&c.includes("meta")||!(0,s.U0)()&&c.includes("control"))&&r(t,[n].concat(h(t,!0))),i(t)},d=t=>{if("string"==typeof t.key){const e=ws(t);l(e)&&Cs.press(e)}},u=t=>{if("string"==typeof t.key){const e=ws(t);l(e)&&Cs.release(e)}},g=()=>{Cs.releaseAll()};return{mount:()=>{let e=t;for(Rs+=1;e;)1===Rs&&(e.document.documentElement.addEventListener("keydown",d),Ss.push({event:"keydown",listener:d}),e.document.documentElement.addEventListener("keyup",u),Ss.push({event:"keyup",listener:u})),e.document.documentElement.addEventListener("keydown",c),e.document.documentElement.addEventListener("blur",g),e=(0,n.Ly)(e)},unmount:()=>{let e=t;for(Rs-=1;e;){if(0===Rs){for(let t=0;t<Ss.length;t++){const{event:o,listener:n}=Ss[t];e.document.documentElement.removeEventListener(o,n)}Ss.length=0}e.document.documentElement.removeEventListener("keydown",c),e.document.documentElement.removeEventListener("blur",g),e=(0,n.Ly)(e)}},isPressed:t=>Cs.isPressed(t),releasePressedKeys:()=>Cs.releaseAll()}}(e,o,l,h,p);return m.mount(),{addContext:t=>{const e=(t=>{const e=(0,gs.u)({errorIdExists:e=>`The "${e}" shortcut is already registered in the "${t}" context.`}),o=function(){let{keys:t,callback:o,group:n,runOnlyIf:s=()=>!0,captureCtrl:l=!1,preventDefault:a=!0,stopPropagation:h=!1,relativeToGroup:c,position:d,forwardToContext:u}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if((0,r.b0)(n))throw new Error("You need to define the shortcut's group.");if(!1===(0,i.Tn)(o))throw new Error("The shortcut's callback needs to be a function.");if(!1===Array.isArray(t))throw new Error(It.O`Pass the shortcut\'s keys as an array of arrays,\x20
- using the KeyboardEvent.key properties:\x20
- https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/key/Key_Values.`);const g={callback:o,group:n,runOnlyIf:s,captureCtrl:l,preventDefault:a,stopPropagation:h};(0,r.O9)(c)&&(g.relativeToGroup=c,g.position=d),vs(u)&&(g.forwardToContext=u),t.forEach((t=>{const o=ps(t);if(e.hasItem(o)){const t=e.getItem(o);let n=t.findIndex((t=>t.group===c));-1!==n?"before"===d?n-=1:n+=1:n=t.length,t.splice(n,0,g)}else e.addItem(o,[g])}))},n=t=>{const o=ps(t);e.removeItem(o)};return{__kindOf:bs,addShortcut:o,addShortcuts:function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t.forEach((t=>{(0,v.v4)(e,((o,n)=>{!1===Object.prototype.hasOwnProperty.call(t,n)&&(t[n]=e[n])})),o(t)}))},getShortcuts:t=>{const o=ps(t),n=e.getItem(o);return(0,r.O9)(n)?n.slice():[]},hasShortcut:t=>{const o=ps(t);return e.hasItem(o)},removeShortcutsByKeys:n,removeShortcutsByGroup:t=>{e.getItems().forEach((e=>{let[o,i]=e;const r=i.filter((e=>e.group!==t));0===r.length?n((t=>t.split("+"))(o)):(i.length=0,i.push(...r))}))}}})(t);return c.addItem(t,e),e},getActiveContextName:u,getContext:g,setActiveContextName:t=>{if(!c.hasItem(t))throw new Error(It.O`You've tried to activate the "${t}" shortcut context\x20
- that does not exist. Before activation, register the context using the "addContext" method.`);d=t},isCtrlPressed:()=>!f&&(m.isPressed("control")||m.isPressed("meta")),releasePressedKeys:()=>m.releasePressedKeys(),destroy:()=>m.unmount()}})({handleEvent:()=>u.isListening(),beforeKeyDown:t=>this.runHooks("beforeKeyDown",t),afterKeyDown:t=>{this.isDestroyed||u.runHooks("afterDocumentKeyDown",t)},ownerWindow:this.rootWindow});var q;this.addHook("beforeOnCellMouseDown",(t=>{!1===t.ctrlKey&&!1===t.metaKey&&X.releasePressedKeys()})),this.getShortcutManager=function(){return X},this.getFocusManager=function(){return y},(0,B.f4)().forEach((t=>{const e=(0,B.sd)(t);H.addItem(t,new e(this))})),q=u,[pl,fl].forEach((t=>t(q))),X.setActiveContextName("grid"),yi.R.getSingleton().run(u,"construct")}new Set;var yl=o(4675);function Cl(t,e){const o=new vl(t,e||{},yn);return o.init(),o}(0,Nr.Gk)(yl.Y),Cl.editors={BaseEditor:Ts.b7},Cl.Core=function(t){return new vl(t,arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},yn)},Cl.DefaultSettings=Fr(),Cl.hooks=yi.R.getSingleton(),Cl.CellCoords=ce.A,Cl.CellRange=de.A,Cl.packageName="handsontable",Cl.buildDate="24/04/2025 10:59:00",Cl.version="15.3.0",Cl.languages={dictionaryKeys:Ii,getLanguageDictionary:Pi,getLanguagesDictionaries:function(){return _i()},registerLanguageDictionary:Ni,getTranslatedPhrase:Di};const Sl=Cl},4402:(t,e,o)=>{var n=o(9504),i=Set.prototype;t.exports={Set,add:n(i.add),has:n(i.has),remove:n(i.delete),proto:i}},4417:t=>{t.exports=function(t,e){return e||(e={}),t?(t=String(t.__esModule?t.default:t),/^['"].*['"]$/.test(t)&&(t=t.slice(1,-1)),e.hash&&(t+=e.hash),/["'() \t\n]|(%20)/.test(t)||e.needQuotes?'"'.concat(t.replace(/"/g,'\\"').replace(/\n/g,"\\n"),'"'):t):t}},4449:(t,e,o)=>{var n=o(7080),i=o(4402).has,r=o(5170),s=o(3789),l=o(8469),a=o(507),h=o(9539);t.exports=function(t){var e=n(this),o=s(t);if(r(e)<=o.size)return!1!==l(e,(function(t){if(o.includes(t))return!1}),!0);var c=o.getIterator();return!1!==a(c,(function(t){if(i(e,t))return h(c,"normal",!1)}))}},4495:(t,e,o)=>{var n=o(9519),i=o(9039),r=o(4576).String;t.exports=!!Object.getOwnPropertySymbols&&!i((function(){var t=Symbol("symbol detection");return!r(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&n&&n<41}))},4520:(t,e,o)=>{o(2489)},4527:(t,e,o)=>{var n=o(3724),i=o(4376),r=TypeError,s=Object.getOwnPropertyDescriptor,l=n&&!function(){if(void 0!==this)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(t){return t instanceof TypeError}}();t.exports=l?function(t,e){if(i(t)&&!s(t,"length").writable)throw new r("Cannot set read only .length");return t.length=e}:function(t,e){return t.length=e}},4549:(t,e,o)=>{var n=o(4576);t.exports=function(t,e){var o=n.Iterator,i=o&&o.prototype,r=i&&i[t],s=!1;if(r)try{r.call({next:function(){return{done:!0}},return:function(){s=!0}},-1)}catch(t){t instanceof e||(s=!1)}if(!s)return r}},4576:function(t,e,o){var n=function(t){return t&&t.Math===Math&&t};t.exports=n("object"==typeof globalThis&&globalThis)||n("object"==typeof window&&window)||n("object"==typeof self&&self)||n("object"==typeof o.g&&o.g)||n("object"==typeof this&&this)||function(){return this}()||Function("return this")()},4601:(t,e,o)=>{var n=o(7751),i=o(9297),r=o(6699),s=o(1625),l=o(2967),a=o(7740),h=o(1056),c=o(3167),d=o(2603),u=o(7584),g=o(747),f=o(3724),p=o(6395);t.exports=function(t,e,o,m){var w="stackTraceLimit",b=m?2:1,v=t.split("."),y=v[v.length-1],C=n.apply(null,v);if(C){var S=C.prototype;if(!p&&i(S,"cause")&&delete S.cause,!o)return C;var R=n("Error"),E=e((function(t,e){var o=d(m?e:t,void 0),n=m?new C(t):new C;return void 0!==o&&r(n,"message",o),g(n,E,n.stack,2),this&&s(S,this)&&c(n,this,E),arguments.length>b&&u(n,arguments[b]),n}));if(E.prototype=S,"Error"!==y?l?l(E,R):a(E,R,{name:!0}):f&&w in C&&(h(E,C,w),h(E,C,"prepareStackTrace")),a(E,C),!p)try{S.name!==y&&r(S,"name",y),S.constructor=E}catch(t){}return E}}},4606:(t,e,o)=>{var n=o(6823),i=TypeError;t.exports=function(t,e){if(!delete t[e])throw new i("Cannot delete property "+n(e)+" of "+n(t))}},4647:(t,e,o)=>{o.d(e,{A:()=>i});const n=new Map;function i(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"common";n.has(t)||n.set(t,new Map);const e=n.get(t);return{register:function(t,o){e.set(t,o)},getItem:function(t){return e.get(t)},hasItem:function(t){return e.has(t)},getNames:function(){return[...e.keys()]},getValues:function(){return[...e.values()]}}}},4659:(t,e,o)=>{var n=o(9039),i=o(6980);t.exports=!n((function(){var t=new Error("a");return!("stack"in t)||(Object.defineProperty(t,"stack",i(1,7)),7!==t.stack)}))},4675:(t,e,o)=>{o.d(e,{Y:()=>r});var n=o(5239),i=o(2182);const r={CELL_TYPE:"text",editor:n.t,renderer:i.F}},4726:(t,e,o)=>{o.d(e,{U:()=>s,j:()=>r}),o(6280),o(4114);var n=o(8514);function i(t,e,o){return(e=function(t){var e=function(t){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var o=e.call(t,"string");if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[e]=o,t}const r=50;class s extends n.C{constructor(t){let{calculationTypes:e,viewportWidth:o,scrollOffset:n,totalColumns:r,columnWidthFn:s,overrideFn:l,inlineStartOffset:a}=t;super(e),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=o,this.scrollOffset=n,this.zeroBasedScrollOffset=Math.max(n,0),this.totalColumns=r,this.columnWidthFn=s,this.overrideFn=l,this.inlineStartOffset=a,this.calculate()}calculate(){this._initialize(this);for(let t=0;t<this.totalColumns;t++)if(this.columnWidth=this.getColumnWidth(t),this._process(t,this),this.startPositions.push(this.totalCalculatedWidth),this.totalCalculatedWidth+=this.columnWidth,this.totalCalculatedWidth>=this.zeroBasedScrollOffset+this.viewportWidth){this.needReverse=!1;break}this._finalize(this)}getColumnWidth(t){const e=this.columnWidthFn(t);return isNaN(e)?r:e}}},4814:(t,e,o)=>{o.d(e,{A:()=>h}),o(6280),o(4114);var n=o(3709);function i(t,e,o){return(e=function(t){var e=function(t){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var o=e.call(t,"string");if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[e]=o,t}function r(t,e){return t.get(s(t,e))}function s(t,e,o){if("function"==typeof t?t===e:t.has(e))return arguments.length<3?e:o;throw new TypeError("Private element is not present on this object")}var l=new WeakMap;class a{constructor(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t,n=arguments.length>3&&void 0!==arguments[3]&&arguments[3];var r,a;i(this,"highlight",null),i(this,"from",null),i(this,"to",null),function(t,e,o){(function(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")})(t,e),e.set(t,o)}(this,l,!1),this.highlight=t.clone(),this.from=e.clone(),this.to=o.clone(),a=n,(r=l).set(s(r,this),a)}setHighlight(t){return this.highlight=t.clone(),this}setFrom(t){return this.from=t.clone(),this}setTo(t){return this.to=t.clone(),this}normalize(){return this.highlight.normalize(),this.from.normalize(),this.to.normalize(),this}isValid(t){return this.from.isValid(t)&&this.to.isValid(t)}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 t=Math.max(this.from.row,0),e=Math.max(this.to.row,0);return Math.max(t,e)-Math.min(t,e)+1}getWidth(){if(this.from.col<0&&this.to.col<0)return 0;const t=Math.max(this.from.col,0),e=Math.max(this.to.col,0);return Math.max(t,e)-Math.min(t,e)+1}getCellsCount(){return this.getWidth()*this.getHeight()}includes(t){const{row:e,col:o}=t,n=this.getOuterTopStartCorner(),i=this.getOuterBottomEndCorner();return n.row<=e&&i.row>=e&&n.col<=o&&i.col>=o}includesRange(t){return this.includes(t.getOuterTopStartCorner())&&this.includes(t.getOuterBottomEndCorner())}isEqual(t){return Math.min(this.from.row,this.to.row)===Math.min(t.from.row,t.to.row)&&Math.max(this.from.row,this.to.row)===Math.max(t.from.row,t.to.row)&&Math.min(this.from.col,this.to.col)===Math.min(t.from.col,t.to.col)&&Math.max(this.from.col,this.to.col)===Math.max(t.from.col,t.to.col)}overlaps(t){return t.isSouthEastOf(this.getOuterTopLeftCorner())&&t.isNorthWestOf(this.getOuterBottomRightCorner())}isSouthEastOf(t){return this.getOuterTopLeftCorner().isSouthEastOf(t)||this.getOuterBottomRightCorner().isSouthEastOf(t)}isNorthWestOf(t){return this.getOuterTopLeftCorner().isNorthWestOf(t)||this.getOuterBottomRightCorner().isNorthWestOf(t)}isOverlappingHorizontally(t){return this.getOuterTopEndCorner().col>=t.getOuterTopStartCorner().col&&this.getOuterTopEndCorner().col<=t.getOuterTopEndCorner().col||this.getOuterTopStartCorner().col<=t.getOuterTopEndCorner().col&&this.getOuterTopStartCorner().col>=t.getOuterTopStartCorner().col}isOverlappingVertically(t){return this.getOuterBottomStartCorner().row>=t.getOuterTopRightCorner().row&&this.getOuterBottomStartCorner().row<=t.getOuterBottomStartCorner().row||this.getOuterTopEndCorner().row<=t.getOuterBottomStartCorner().row&&this.getOuterTopEndCorner().row>=t.getOuterTopRightCorner().row}expand(t){const e=this.getOuterTopStartCorner(),o=this.getOuterBottomEndCorner();return(t.row<e.row||t.col<e.col||t.row>o.row||t.col>o.col)&&(this.from=this._createCellCoords(Math.min(e.row,t.row),Math.min(e.col,t.col)),this.to=this._createCellCoords(Math.max(o.row,t.row),Math.max(o.col,t.col)),!0)}expandByRange(t){let e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(this.includesRange(t)||!this.overlaps(t))return!1;const o=this.getOuterTopStartCorner(),n=this.getOuterBottomEndCorner(),i=this.getDirection(),r=t.getOuterTopStartCorner(),s=t.getOuterBottomEndCorner(),l=Math.min(o.row,r.row),a=Math.min(o.col,r.col),h=Math.max(n.row,s.row),c=Math.max(n.col,s.col),d=this._createCellCoords(l,a),u=this._createCellCoords(h,c);return this.from=d,this.to=u,this.setDirection(i),e&&(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(t){switch(t){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()]}}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(){switch(this.getDirection()){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")}}flipDirectionHorizontally(){switch(this.getDirection()){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")}}getTopStartCorner(){return this._createCellCoords(Math.min(this.from.row,this.to.row),Math.min(this.from.col,this.to.col)).normalize()}getTopLeftCorner(){return r(l,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 r(l,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 r(l,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 r(l,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 r(l,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 r(l,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 r(l,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 r(l,this)?this.getOuterBottomEndCorner():this.getOuterBottomStartCorner()}isCorner(t){return t.isEqual(this.getOuterTopLeftCorner())||t.isEqual(this.getOuterTopRightCorner())||t.isEqual(this.getOuterBottomLeftCorner())||t.isEqual(this.getOuterBottomRightCorner())}getOppositeCorner(t){return t instanceof n.A&&(t.isEqual(this.getOuterBottomEndCorner())?this.getOuterTopStartCorner():t.isEqual(this.getOuterTopStartCorner())?this.getOuterBottomEndCorner():t.isEqual(this.getOuterTopEndCorner())?this.getOuterBottomStartCorner():t.isEqual(this.getOuterBottomStartCorner())?this.getOuterTopEndCorner():void 0)}getBordersSharedWith(t){if(!this.includesRange(t))return[];const e=Math.min(this.from.row,this.to.row),o=Math.max(this.from.row,this.to.row),n=Math.min(this.from.col,this.to.col),i=Math.max(this.from.col,this.to.col),s=Math.min(t.from.row,t.to.row),a=Math.max(t.from.row,t.to.row),h=Math.min(t.from.col,t.to.col),c=Math.max(t.from.col,t.to.col),d=[];return e===s&&d.push("top"),i===c&&d.push(r(l,this)?"left":"right"),o===a&&d.push("bottom"),n===h&&d.push(r(l,this)?"right":"left"),d}getInner(){const t=this.getOuterTopStartCorner(),e=this.getOuterBottomEndCorner(),o=[];for(let n=t.row;n<=e.row;n++)for(let i=t.col;i<=e.col;i++)this.from.row===n&&this.from.col===i||this.to.row===n&&this.to.col===i||o.push(this._createCellCoords(n,i));return o}getAll(){const t=this.getOuterTopStartCorner(),e=this.getOuterBottomEndCorner(),o=[];for(let n=t.row;n<=e.row;n++)for(let i=t.col;i<=e.col;i++)t.row===n&&t.col===i?o.push(t):e.row===n&&e.col===i?o.push(e):o.push(this._createCellCoords(n,i));return o}forAll(t){const e=this.getOuterTopStartCorner(),o=this.getOuterBottomEndCorner();for(let n=e.row;n<=o.row;n++)for(let i=e.col;i<=o.col;i++)if(!1===t(n,i))return}clone(){return new a(this.highlight,this.from,this.to,r(l,this))}toObject(){return{from:this.from.toObject(),to:this.to.toObject()}}_createCellCoords(t,e){return new n.A(t,e,r(l,this))}}const h=a},4901:t=>{var e="object"==typeof document&&document.all;t.exports=void 0===e&&void 0!==e?function(t){return"function"==typeof t||t===e}:function(t){return"function"==typeof t}},4913:(t,e,o)=>{var n=o(3724),i=o(5917),r=o(8686),s=o(8551),l=o(6969),a=TypeError,h=Object.defineProperty,c=Object.getOwnPropertyDescriptor,d="enumerable",u="configurable",g="writable";e.f=n?r?function(t,e,o){if(s(t),e=l(e),s(o),"function"==typeof t&&"prototype"===e&&"value"in o&&g in o&&!o[g]){var n=c(t,e);n&&n[g]&&(t[e]=o.value,o={configurable:u in o?o[u]:n[u],enumerable:d in o?o[d]:n[d],writable:!1})}return h(t,e,o)}:h:function(t,e,o){if(s(t),e=l(e),s(o),i)try{return h(t,e,o)}catch(t){}if("get"in o||"set"in o)throw new a("Accessors not supported");return"value"in o&&(t[e]=o.value),t}},4916:(t,e,o)=>{var n=o(7751),i=function(t){return{size:t,has:function(){return!1},keys:function(){return{next:function(){return{done:!0}}}}}},r=function(t){return{size:t,has:function(){return!0},keys:function(){throw new Error("e")}}};t.exports=function(t,e){var o=n("Set");try{(new o)[t](i(0));try{return(new o)[t](i(-1)),!1}catch(n){if(!e)return!0;try{return(new o)[t](r(-1/0)),!1}catch(n){var s=new o;return s.add(1),s.add(2),e(s[t](r(1/0)))}}}catch(t){return!1}}},4950:(t,e,o)=>{o.d(e,{TS:()=>c,gB:()=>h,sl:()=>s}),o(6280);var n=o(4647);const{register:i,getItem:r,hasItem:s,getNames:l,getValues:a}=(0,n.A)("renderers");function h(t){if("function"==typeof t)return t;if(!s(t))throw Error(`No registered renderer found under "${t}" name`);return r(t)}function c(t,e){"string"!=typeof t&&(t=(e=t).RENDERER_TYPE),i(t,e)}},5024:(t,e,o)=>{var n=o(6518),i=o(3650);n({target:"Set",proto:!0,real:!0,forced:!o(4916)("symmetricDifference")},{symmetricDifference:i})},5031:(t,e,o)=>{var n=o(7751),i=o(9504),r=o(8480),s=o(3717),l=o(8551),a=i([].concat);t.exports=n("Reflect","ownKeys")||function(t){var e=r.f(l(t)),o=s.f;return o?a(e,o(t)):e}},5155:(t,e,o)=>{o.d(e,{CA:()=>i,Ml:()=>l,d:()=>r,kH:()=>a,nO:()=>s,zg:()=>h});var n=o(91);function i(t){t.isImmediatePropagationEnabled=!1,t.cancelBubble=!0}function r(t){return!1===t.isImmediatePropagationEnabled}function s(t){return 2===t.button}function l(t){return 0===t.button}function a(t){return t instanceof TouchEvent}function h(t,e){const o={x:t.offsetX,y:t.offsetY};let i=t.target;if(!(0,n.sb)(e)||i!==e&&i.contains(e))return o;for(;i!==e;)o.x+=i.offsetLeft,o.y+=i.offsetTop,i=i.offsetParent;return o}},5170:(t,e,o)=>{var n=o(6706),i=o(4402);t.exports=n(i.proto,"size","get")||function(t){return t.size}},5239:(t,e,o)=>{o.d(e,{t:()=>p}),o(6280);var n=o(2564),i=o(8061),r=o(8002),s=o(91),l=o(1409),a=o(3023),h=o(5615);function c(t,e){const o=(0,s.JC)(e),n=e.value.split("\n");let i=o,r=0;for(let e=0;e<n.length;e++){const s=n[e];0!==e&&(r+=n[e-1].length+1);const l=r+s.length;if("home"===t?i=r:"end"===t&&(i=l),o<=l)break}(0,s.vZ)(e,i)}var d=o(6422);function u(t,e,o){return(e=function(t){var e=function(t){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var o=e.call(t,"string");if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[e]=o,t}const g="ht_editor_hidden",f="textEditor";class p extends n.b7{static get EDITOR_TYPE(){return"text"}constructor(t){super(t),u(this,"eventManager",new i.A(this)),u(this,"autoResize",(0,a.j)(this.hot.rootDocument)),u(this,"TEXTAREA",void 0),u(this,"textareaStyle",void 0),u(this,"TEXTAREA_PARENT",void 0),u(this,"textareaParentStyle",void 0),u(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(t){this.TEXTAREA.value=t}open(){this.refreshDimensions(),this.showEditableElement(),this.hot.getShortcutManager().setActiveContextName("editor"),this.registerShortcuts()}close(){this.autoResize.unObserve(),(0,s.yq)(this.hot.rootDocument.activeElement,this.hot.rootElement)&&this.hot.listen(),this.hideEditableElement(),this.unregisterShortcuts()}prepare(t,e,o,i,r,s){const l=this.state;if(super.prepare(t,e,o,i,r,s),!s.readOnly){this.refreshDimensions(!0);const{allowInvalid:t}=s;t&&!this.isOpened()&&(this.TEXTAREA.value=""),l===n._T.FINISHED||this.isOpened()||this.hideEditableElement()}}beginEditing(t,e){this.state===n._T.VIRGIN&&(this.TEXTAREA.value="",super.beginEditing(t,e))}focus(){this.TEXTAREA.select(),(0,s.vZ)(this.TEXTAREA,this.TEXTAREA.value.length)}createElements(){const{rootDocument:t}=this.hot;this.TEXTAREA=t.createElement("TEXTAREA"),(0,s.Bq)(this.TEXTAREA,[["data-hot-input",""],(0,d.vC)(-1)]),(0,s.iQ)(this.TEXTAREA,"handsontableInput"),this.textareaStyle=this.TEXTAREA.style,this.textareaStyle.width=0,this.textareaStyle.height=0,this.textareaStyle.overflowY="visible",this.TEXTAREA_PARENT=t.createElement("DIV"),(0,s.iQ)(this.TEXTAREA_PARENT,"handsontableInputHolder"),(0,s.nB)(this.TEXTAREA_PARENT,this.layerClass)&&(0,s.vy)(this.TEXTAREA_PARENT,this.layerClass),(0,s.iQ)(this.TEXTAREA_PARENT,g),this.textareaParentStyle=this.TEXTAREA_PARENT.style,this.TEXTAREA_PARENT.appendChild(this.TEXTAREA),this.hot.rootElement.appendChild(this.TEXTAREA_PARENT)}hideEditableElement(){(0,r.UP)()&&(this.textareaStyle.textIndent="-99999px"),this.textareaStyle.overflowY="visible",this.textareaParentStyle.opacity="0",this.textareaParentStyle.height="1px",(0,s.vy)(this.TEXTAREA_PARENT,this.layerClass),(0,s.iQ)(this.TEXTAREA_PARENT,g)}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 t=this.TEXTAREA_PARENT.childNodes;let e=!1;(0,l.Ti)(t.length-1,(o=>{const n=t[o];if((0,s.nB)(n,"handsontableEditor"))return e=!0,!1})),(0,s.nB)(this.TEXTAREA_PARENT,g)&&(0,s.vy)(this.TEXTAREA_PARENT,g),e?(this.layerClass="ht_editor_visible",(0,s.iQ)(this.TEXTAREA_PARENT,this.layerClass)):(this.layerClass=this.getEditedCellsLayerClass(),(0,s.iQ)(this.TEXTAREA_PARENT,this.layerClass))}refreshValue(){const t=this.hot.toPhysicalRow(this.row),e=this.hot.getSourceDataAtCell(t,this.col);this.originalValue=e,this.setValue(e),this.refreshDimensions()}refreshDimensions(){let t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(this.state!==n._T.EDITING&&!t)return;if(this.TD=this.getEditedCell(),!this.TD)return void(t||this.close());const{top:e,start:o,width:i,maxWidth:r,height:s,maxHeight:l}=this.getEditedCellRect();this.textareaParentStyle.top=`${e}px`,this.textareaParentStyle[this.hot.isRtl()?"right":"left"]=`${o}px`,this.showEditableElement();const a=this.hot.rootWindow.getComputedStyle(this.TD);this.TEXTAREA.style.fontSize=a.fontSize,this.TEXTAREA.style.fontFamily=a.fontFamily,this.TEXTAREA.style.backgroundColor=this.TD.style.backgroundColor,this.autoResize.init(this.TEXTAREA,{minWidth:Math.min(i,r),minHeight:Math.min(s,l),maxWidth:r,maxHeight:l},!0)}bindEvents(){(0,r.un)()&&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===n._T.EDITING&&this.focus()})),this.addHook("afterRowResize",(()=>{this.refreshDimensions(),this.state===n._T.EDITING&&this.focus()}))}allowKeyEventPropagation(){}destroy(){this.eventManager.destroy(),this.clearHooks()}registerShortcuts(){const t=this.hot.getShortcutManager().getContext("editor"),e={runOnlyIf:()=>(0,h.O9)(this.hot.getSelected()),group:f},o=()=>{this.hot.rootDocument.execCommand("insertText",!1,"\n")};t.addShortcuts([{keys:[["Control","Enter"]],callback:()=>(o(),!1),runOnlyIf:t=>!this.hot.selection.isMultiple()&&!t.altKey},{keys:[["Meta","Enter"]],callback:()=>(o(),!1),runOnlyIf:()=>!this.hot.selection.isMultiple()},{keys:[["Alt","Enter"]],callback:()=>(o(),!1)},{keys:[["Home"]],callback:(t,e)=>{let[o]=e;c(o,this.TEXTAREA)}},{keys:[["End"]],callback:(t,e)=>{let[o]=e;c(o,this.TEXTAREA)}}],e)}unregisterShortcuts(){this.hot.getShortcutManager().getContext("editor").removeShortcutsByGroup(f)}}},5370:(t,e,o)=>{var n=o(6198);t.exports=function(t,e,o){for(var i=0,r=arguments.length>2?o:n(e),s=new t(r);r>i;)s[i]=e[i++];return s}},5397:(t,e,o)=>{var n=o(7055),i=o(7750);t.exports=function(t){return n(i(t))}},5408:(t,e,o)=>{o.d(e,{K:()=>s});var n=o(1895),i=o(8046),r=o(3317);class s extends n.n{constructor(){super((t=>t))}insert(t,e){const o=(0,r.z)(this.indexedValues,e);this.indexedValues=(0,i.N)(o,t,e),super.insert(t,e)}remove(t){const e=(0,i.H)(this.indexedValues,t);this.indexedValues=(0,r.v)(e,t),super.remove(t)}}},5428:(t,e,o)=>{o.d(e,{u:()=>r}),o(6280),o(8992),o(2577);var n=o(3986);const i=t=>`The id '${t}' is already declared in a map.`;function r(){let{errorIdExists:t}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const e=new Map;function o(){return[...e]}function r(t){return e.has(t)}return t=(0,n.Tn)(t)?t:i,{addItem:function(o,n){if(r(o))throw new Error(t(o));e.set(o,n)},clear:function(){e.clear()},getId:function(t){const[e]=o().find((e=>{let[o,n]=e;return t===n&&o}))||[null];return e},getItem:function(t){return e.get(t)},getItems:o,hasItem:r,removeItem:function(t){return e.delete(t)}}}},5610:(t,e,o)=>{var n=o(1291),i=Math.max,r=Math.min;t.exports=function(t,e){var o=n(t);return o<0?i(o+e,0):r(o,e)}},5615:(t,e,o)=>{o.d(e,{As:()=>r,Im:()=>a,O9:()=>s,b0:()=>l,gd:()=>h,k_:()=>C});var n=o(5093),i=o(5975);function r(t){let e;switch(typeof t){case"string":case"number":e=`${t}`;break;case"object":e=null===t?"":t.toString();break;case"undefined":e="";break;default:e=t.toString()}return e}function s(t){return void 0!==t}function l(t){return void 0===t}function a(t){return null===t||""===t||l(t)}function h(t){return"[object RegExp]"===Object.prototype.toString.call(t)}const c="length",d=t=>parseInt(t,16),u=t=>parseInt(t,10),g=(t,e,o)=>t.substr(e,o),f=t=>t.codePointAt(0)-65,p=t=>`${t}`.replace(/\-/g,""),m=t=>d(g(p(t),d("12"),f("F")))/(d(g(p(t),f("B"),~~![][c]))||9),w=()=>"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 b=!1;const v={invalid:()=>i.O`
- The license key for Handsontable is invalid.\x20
- If you need any help, contact us at support@handsontable.com.`,expired:t=>{let{keyValidityDate:e,hotVersion:o}=t;return i.O`
- The license key for Handsontable expired on ${e}, and is not valid for the installed\x20
- version ${o}. Renew your license key at handsontable.com or downgrade to a version released prior\x20
- to ${e}. If you need any help, contact us at sales@handsontable.com.`},missing:()=>i.O`
- The license key for Handsontable is missing. Use your purchased key to activate the product.\x20
- Alternatively, you can activate Handsontable to use for non-commercial purposes by\x20
- passing the key: 'non-commercial-and-evaluation'. If you need any help, contact\x20
- us at support@handsontable.com.`,non_commercial:()=>""},y={invalid:()=>i.O`
- The license key for Handsontable is invalid.\x20
- <a href="https://handsontable.com/docs/tutorial-license-key.html" target="_blank">Read more</a> on how to\x20
- install it properly or contact us at <a href="mailto:support@handsontable.com">support@handsontable.com</a>.`,expired:t=>{let{keyValidityDate:e,hotVersion:o}=t;return i.O`
- The license key for Handsontable expired on ${e}, and is not valid for the installed\x20
- version ${o}. <a href="https://handsontable.com/pricing" target="_blank">Renew</a> your\x20
- license key or downgrade to a version released prior to ${e}. If you need any\x20
- help, contact us at <a href="mailto:sales@handsontable.com">sales@handsontable.com</a>.`},missing:()=>i.O`
- The license key for Handsontable is missing. Use your purchased key to activate the product.\x20
- Alternatively, you can activate Handsontable to use for non-commercial purposes by\x20
- passing the key: 'non-commercial-and-evaluation'.\x20
- <a href="https://handsontable.com/docs/tutorial-license-key.html" target="_blank">Read more</a> about it in\x20
- the documentation or contact us at <a href="mailto:support@handsontable.com">support@handsontable.com</a>.`,non_commercial:()=>""};function C(t,e){const o=!a(t),i="string"==typeof t&&"non-commercial-and-evaluation"===t.toLowerCase(),r="15.3.0";let s,l="invalid",h="invalid";const C=function(t){let e=[][c],o=e;if(t[c]!==f("Z"))return!1;for(let e="",n="B<H4P+".split(""),i=f(n.shift());i;i=f(n.shift()||"A"))--i<""[c]?o|=(u(`${u(d(e)+(d(g(t,Math.abs(i),2))+[]).padStart(2,"0"))}`)%97||2)>>1:e=g(t,i,i?1===n[c]?9:8:6);return o===e}(t=p(t||""));if(o||i||C)if(C){const e=n("29/04/2025","DD/MM/YYYY"),o=Math.floor(e.toDate().getTime()/864e5),i=m(t);s=n(864e5*(i+1),"x").format("MMMM DD, YYYY"),o>i?(l="expired",h="expired"):(l="valid",h="valid")}else i?(l="non_commercial",h="valid"):(l="invalid",h="invalid");else l="missing",h="missing";if(w()&&(l="valid",h="valid"),b||"valid"===l||(v[l]({keyValidityDate:s,hotVersion:r})&&console["non_commercial"===l?"info":"warn"](v[l]({keyValidityDate:s,hotVersion:r})),b=!0),"valid"!==h&&e.parentNode&&y[h]({keyValidityDate:s,hotVersion:r})){const t=document.createElement("div");t.className="handsontable hot-display-license-info",t.innerHTML=y[h]({keyValidityDate:s,hotVersion:r}),e.parentNode.insertBefore(t,e.nextSibling)}}},5745:(t,e,o)=>{var n=o(7629);t.exports=function(t,e){return n[t]||(n[t]=e||{})}},5874:(t,e,o)=>{o.d(e,{$I:()=>r,DJ:()=>h,E:()=>l,Wm:()=>s,ZI:()=>a}),o(4114),o(8992),o(3215),o(3949);var n=o(2919);const i=26;function r(t){let e,o=t+1,n="";for(;o>0;)e=(o-1)%i,n=String.fromCharCode(65+e)+n,o=parseInt((o-e)/i,10);return n}function s(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,o=t;const n=[];return Array.isArray(t)&&Array.isArray(t[0])||(o=[t]),o.forEach(((t,o)=>{Array.isArray(t)?t.forEach(((t,i)=>{n.push([o+e,i,t])})):Object.keys(t).forEach((i=>{n.push([o+e,i,t[i]])}))})),n}function l(t){let e=0;return Array.isArray(t)&&(t[0]&&Array.isArray(t[0])?e=t[0].length:t[0]&&(0,n.Gv)(t[0])&&(e=(0,n.$3)(t[0]))),e}function a(t){return!!(Array.isArray(t)&&t.length&&t.every((t=>Array.isArray(t))))}function h(t){return!!(Array.isArray(t)&&t.length&&t.every((t=>"object"==typeof t&&!Array.isArray(t)&&null!==t)))}},5876:(t,e,o)=>{var n=o(6518),i=o(3838);n({target:"Set",proto:!0,real:!0,forced:!o(4916)("isSubsetOf",(function(t){return t}))},{isSubsetOf:i})},5917:(t,e,o)=>{var n=o(3724),i=o(9039),r=o(4055);t.exports=!n&&!i((function(){return 7!==Object.defineProperty(r("div"),"a",{get:function(){return 7}}).a}))},5966:(t,e,o)=>{var n=o(9306),i=o(4117);t.exports=function(t,e){var o=t[e];return i(o)?void 0:n(o)}},5975:(t,e,o)=>{o.d(e,{O:()=>i});var n=o(7325);function i(t){for(var e=arguments.length,o=new Array(e>1?e-1:0),i=1;i<e;i++)o[i-1]=arguments[i];return(0,n.mu)(t,((t,e,n)=>t+e.replace(/\r?\n\s*/g,"")+(o[n]?o[n]:"")),"").trim()}},6018:(t,e,o)=>{o.d(e,{um:()=>Uy}),o(6280),o(4114),o(8992),o(4520),o(2577),o(8872);var n=o(5239),i=o(91),r=o(5155),s=o(2919),l=o(9720);const a="handsontableEditor";class h extends n.t{static get EDITOR_TYPE(){return"handsontable"}open(){super.open();const t=this.htContainer.style;this.htEditor&&(this.htEditor.destroy(),t.width="",t.height="",t.overflow=""),"none"===t.display&&(t.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(),(0,i.vZ)(this.TEXTAREA,0,this.TEXTAREA.value.length),this.htEditor.updateSettings({width:this.getWidth(),height:this.getHeight()}),this.refreshDimensions()}close(){this.htEditor&&(this.htEditor.rootElement.style.display="none"),this.removeHooksByKey("beforeKeyDown"),super.close()}prepare(t,e,o,n,i,r){super.prepare(t,e,o,n,i,r);const l=this,a={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,themeName:this.hot.getCurrentThemeName(),afterOnCellMouseDown(t,e){const o=this.getSourceData(e.row,e.col);void 0!==o&&l.setValue(o),l.hot.destroyEditor()},preventWheel:!0,layoutDirection:this.hot.isRtl()?"rtl":"ltr"};this.cellProperties.handsontable&&(0,s.X$)(a,r.handsontable),this.htOptions=a}beginEditing(t,e){const o=this.hot.getSettings().onBeginEditing;o&&!1===o()||super.beginEditing(t,e)}createElements(){super.createElements();const t=this.hot.rootDocument.createElement("DIV");t.className="handsontableEditor",this.TEXTAREA_PARENT.appendChild(t),this.htContainer=t,this.assignHooks()}finishEditing(t,e,o){if(this.htEditor&&this.htEditor.isListening()&&this.hot.listen(),this.htEditor&&this.htEditor.getSelectedLast()){const t=this.htEditor.getValue();void 0!==t&&this.setValue(t)}super.finishEditing(t,e,o)}getHeight(){return this.htEditor.view.getTableHeight()+1}getWidth(){return this.htEditor.view.getTableWidth()}assignHooks(){this.hot.addHook("afterDestroy",(()=>{var t;null===(t=this.htEditor)||void 0===t||t.destroy()})),this.hot.addHook("afterSetTheme",((t,e)=>{var o;e||null===(o=this.htEditor)||void 0===o||o.useTheme(t)}))}registerShortcuts(){const t=this.hot.getShortcutManager().getContext("editor");super.registerShortcuts();const e={group:a,relativeToGroup:l.b,position:"before"},o=(t,e)=>{const o=this.htEditor;if(void 0!==t&&(t<0||o.flipped&&t>o.countRows()-1?o.deselectCell():o.selectCell(t,0),o.getData().length))return e.preventDefault(),(0,r.CA)(e),this.hot.listen(),this.TEXTAREA.focus(),!1};t.addShortcuts([{keys:[["ArrowUp"]],callback:t=>{const e=this.htEditor;let n,i;return!e.getSelectedLast()&&e.flipped?n=e.countRows()-1:e.getSelectedLast()&&(e.flipped?(i=e.getSelectedLast()[0],n=Math.max(0,i-1)):(i=e.getSelectedLast()[0],n=i-1)),o(n,t)},preventDefault:!1},{keys:[["ArrowDown"]],callback:t=>{const e=this.htEditor;let n,i;if(e.getSelectedLast()||e.flipped){if(e.getSelectedLast())if(e.flipped)n=e.getSelectedLast()[0]+1;else if(!e.flipped){const t=e.countRows()-1;i=e.getSelectedLast()[0],n=Math.min(t,i+1)}}else n=0;return o(n,t)},preventDefault:!1}],e)}unregisterShortcuts(){super.unregisterShortcuts(),this.hot.getShortcutManager().getContext("editor").removeShortcutsByGroup(a)}}var c=o(7325),d=o(5615),u=o(4360),g=o(8419),f=o(2182),p=o(6422),m=o(3986);function w(t,e,o){b(t,e),e.set(t,o)}function b(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function v(t,e,o){return(e=function(t){var e=function(t){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var o=e.call(t,"string");if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[e]=o,t}function y(t,e){return t.get(C(t,e))}function C(t,e,o){if("function"==typeof t?t===e:t.has(e))return arguments.length<3?e:o;throw new TypeError("Private element is not present on this object")}var S=new WeakMap,R=new WeakMap,E=new WeakSet;class T extends h{constructor(){var t;super(...arguments),b(this,t=E),t.add(this),v(this,"query",null),v(this,"strippedChoices",[]),v(this,"rawChoices",[]),w(this,S,this.hot.guid.slice(0,9)),w(this,R,(0,m.sg)((()=>{this.focus()}),100)),v(this,"sortByRelevance",(function(t,e,o){const n=[],i=[],r=t.length;let s,l,a,h,c=e.length;if(0===r){for(a=0;a<c;a++)i.push(a);return i}for(a=0;a<c;a++){if(l=(0,u.Kq)((0,d.As)(e[a])),o)h=l.indexOf(t);else{const e=this.cellProperties.locale;h=l.toLocaleLowerCase(e).indexOf(t.toLocaleLowerCase(e))}-1!==h&&(s=l.length-h-r,n.push({baseIndex:a,index:h,charsLeft:s,value:l}))}for(n.sort(((t,e)=>{if(-1===e.index)return-1;if(-1===t.index)return 1;if(t.index<e.index)return-1;if(e.index<t.index)return 1;if(t.index===e.index){if(t.charsLeft<e.charsLeft)return-1;if(t.charsLeft>e.charsLeft)return 1}return 0})),a=0,c=n.length;a<c;a++)i.push(n[a].baseIndex);return i}))}static get EDITOR_TYPE(){return"autocomplete"}getValue(){const t=this.rawChoices.find((t=>this.stripValueIfNeeded(t)===this.TEXTAREA.value));return(0,d.O9)(t)?t:this.TEXTAREA.value}createElements(){super.createElements(),(0,i.iQ)(this.htContainer,"autocompleteEditor"),(0,i.iQ)(this.htContainer,-1===this.hot.rootWindow.navigator.platform.indexOf("Mac")?"":"htMacScroll"),this.hot.getSettings().ariaTags&&(0,i.Bq)(this.TEXTAREA,[(0,p.ZW)(),(0,p.B6)(),(0,p.wP)("listbox"),(0,p.gq)()])}prepare(t,e,o,n,r,s){super.prepare(t,e,o,n,r,s),this.hot.getSettings().ariaTags&&(0,i.Bq)(this.TEXTAREA,[(0,p.dV)("false"),(0,p.Ku)(`${y(S,this)}-listbox-${t}-${e}`)])}open(){super.open();const t=void 0===this.cellProperties.trimDropdown||this.cellProperties.trimDropdown,e=this.hot.getSettings().ariaTags,o=Array.isArray(this.cellProperties.source)?this.cellProperties.source:null,n=null==o?void 0:o.length,{row:r,col:s}=this;this.showEditableElement(),this.focus(),this.addHook("beforeKeyDown",(t=>this.onBeforeKeyDown(t))),this.htEditor.addHook("afterScroll",y(R,this)),this.htEditor.updateSettings({colWidths:t?[(0,i.Gq)(this.TEXTAREA)-2]:void 0,autoColumnSize:!0,renderer:(t,r,s,l,a,h,c)=>{(0,f.F)(t,r,s,l,a,h,c);const{filteringCaseSensitive:u,allowHtml:g,locale:m}=this.cellProperties,w=this.query;let b,v,y=(0,d.As)(h);y&&!g&&(b=!0===u?y.indexOf(w):y.toLocaleLowerCase(m).indexOf(w.toLocaleLowerCase(m)),-1!==b&&(v=y.substr(b,w.length),y=y.replace(v,`<strong>${v}</strong>`))),e&&(0,i.Bq)(r,[(0,p.n)(),...o?[(0,p.DY)(n)]:[],...o?[(0,p.Vy)(o.indexOf(h)+1)]:[],["id",`${this.htEditor.rootElement.id}_${s}-${l}`]]),r.innerHTML=y},afterSelectionEnd:(t,o)=>{if(e){const e=t=>{(0,i.Bq)(t,[(0,p.H0)()]),(0,i.Bq)(this.TEXTAREA,...(0,p.VN)(t.id))},n=this.htEditor.getCell(t,o,!0);null!==n?e(n):this.htEditor.addHookOnce("afterScrollVertically",(()=>{const n=this.htEditor.getCell(t,o,!0);e(n)}))}}}),e&&((0,i.Bq)(this.htEditor.view._wt.wtOverlays.wtTable.TABLE,...(0,p.gg)()),(0,i.Bq)(this.htEditor.rootElement,[(0,p.$o)(),(0,p.S2)("polite"),(0,p.rE)("text"),["id",`${y(S,this)}-listbox-${r}-${s}`]]),(0,i.Bq)(this.TEXTAREA,...(0,p.dV)("true"))),this.hot._registerTimeout((()=>{this.queryChoices(this.TEXTAREA.value)}))}close(){this.removeHooksByKey("beforeKeyDown"),super.close(),this.hot.getSettings().ariaTags&&(0,i.Bq)(this.TEXTAREA,[(0,p.dV)("false")])}discardEditor(t){super.discardEditor(t),this.hot.view.render()}queryChoices(t){const e=this.cellProperties.source;this.query=t,"function"==typeof e?e.call(this.cellProperties,t,(t=>{this.rawChoices=t,this.updateChoicesList(this.stripValuesIfNeeded(t))})):Array.isArray(e)?(this.rawChoices=e,this.updateChoicesList(this.stripValuesIfNeeded(e))):this.updateChoicesList([])}updateChoicesList(t){const e=(0,i.JC)(this.TEXTAREA),o=(0,i.Xu)(this.TEXTAREA),n=this.cellProperties.sortByRelevance,r=this.cellProperties.filter;let s=null,l=null,a=t;n&&(s=this.sortByRelevance(this.stripValueIfNeeded(this.getValue()),a,this.cellProperties.filteringCaseSensitive));const h=Array.isArray(s)?s.length:0;if(!1===r)h&&(l=s[0]);else{const t=[];for(let e=0,o=a.length;e<o&&!(n&&h<=e);e++)h?t.push(a[s[e]]):t.push(a[e]);l=0,a=t}this.strippedChoices=a,0===a.length?this.htEditor.rootElement.style.display="none":this.htEditor.rootElement.style.display="",this.htEditor.loadData((0,c.h9)([a])),a.length>0&&(this.updateDropdownDimensions(),this.flipDropdownIfNeeded(),!0===this.cellProperties.strict&&this.highlightBestMatchingChoice(l)),this.hot.listen(),(0,i.vZ)(this.TEXTAREA,e,e===o?void 0:o)}flipDropdownIfNeeded(){const t=this.getEditedCellRect(),e=t.height;let o=t.top;if(this.hot.view.isVerticallyScrollableByWindow()){const t=this.hot.view.getTableOffset().top-this.hot.rootWindow.scrollY;o=Math.max(o+t,0)}const n=this.getHeight(),i=this.hot.view.getWorkspaceHeight()-o-e,r=n>i&&o>i+e;return r?this.flipDropdown(n):this.unflipDropdown(),this.limitDropdownIfNeeded(r?o:i,n),r}limitDropdownIfNeeded(t,e){if(e>t){let o=0,n=0,i=0,r=null;do{i=this.htEditor.getRowHeight(n)||this.htEditor.view.getDefaultRowHeight(),o+=i,n+=1}while(o<t);r=o-i,this.htEditor.flipped&&(this.htEditor.rootElement.style.top=parseInt(this.htEditor.rootElement.style.top,10)+e-r+"px"),this.setDropdownHeight(o-i)}}flipDropdown(t){const e=this.htEditor.rootElement.style;e.position="absolute",e.top=-t+"px",this.htEditor.flipped=!0}unflipDropdown(){const t=this.htEditor.rootElement.style;t.position="absolute",t.top="",this.htEditor.flipped=void 0}updateDropdownDimensions(){this.htEditor.updateSettings({width:this.getWidth(),height:this.getHeight()}),C(E,this,x).call(this),this.htEditor.view._wt.wtTable.alignOverlaysWithTrimmingContainer()}setDropdownHeight(t){this.htEditor.updateSettings({height:t}),C(E,this,x).call(this),this.htEditor.view._wt.wtTable.alignOverlaysWithTrimmingContainer()}highlightBestMatchingChoice(t){"number"==typeof t?this.htEditor.selectCell(t,0,void 0,void 0,void 0,!1):this.htEditor.deselectCell()}getHeight(){const t=this.hot.rootWindow.getComputedStyle(this.htContainer.querySelector(".htCore")),e=parseInt(t.borderTopWidth,10)+parseInt(t.borderBottomWidth,10),o=Math.min(this.cellProperties.visibleRows,this.strippedChoices.length);return Array.from({length:o},((t,e)=>e)).reduce(((t,e)=>t+(this.htEditor.getRowHeight(e)||this.htEditor.view.getDefaultRowHeight())),0)+e+1}getWidth(){const t=this.hot.rootWindow.getComputedStyle(this.htContainer.querySelector(".htCore")),e=parseInt(t.borderInlineStartWidth,10)+parseInt(t.borderInlineEndWidth,10);return this.htEditor.getColWidth(0)+e}stripValueIfNeeded(t){return this.stripValuesIfNeeded([t])[0]}stripValuesIfNeeded(t){const{allowHtml:e}=this.cellProperties,o=(0,c.YD)(t,(t=>(0,d.As)(t)));return(0,c.YD)(o,(t=>e?t:(0,u.Kq)(t)))}allowKeyEventPropagation(t){const e=this.htEditor.getSelectedRangeLast(),o=e?e.from.row:-1;let n=!1;return t===g.Lb.ARROW_DOWN&&o>0&&o<this.htEditor.countRows()-1&&(n=!0),t===g.Lb.ARROW_UP&&o>-1&&(n=!0),n}onBeforeKeyDown(t){if((0,g.aE)(t.keyCode)||t.keyCode===g.Lb.BACKSPACE||t.keyCode===g.Lb.DELETE||t.keyCode===g.Lb.INSERT){let e=10;if(t.keyCode===g.Lb.C&&(t.ctrlKey||t.metaKey))return;this.isOpened()||(e+=10),this.htEditor&&this.hot._registerTimeout((()=>{this.queryChoices(this.TEXTAREA.value)}),e)}}}function x(){this.htEditor.view.hasVerticalScroll()&&this.htEditor.updateSettings({width:this.getWidth()+(0,i.XJ)(this.hot.rootDocument)})}var M=o(2564);class I extends M.b7{static get EDITOR_TYPE(){return"checkbox"}beginEditing(t,e){if(e&&"mouseup"===e.type&&"TD"===e.target.nodeName){const t=this.TD.querySelector('input[type="checkbox"]');(0,i.nB)(t,"htBadValue")||t.click()}}finishEditing(){}init(){}open(){}close(){}getValue(){}setValue(){}focus(){}}var H=o(5093),O=o(9214),A=o(8002);function k(t,e,o){return(e=function(t){var e=function(t){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var o=e.call(t,"string");if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[e]=o,t}function _(t,e,o){if("function"==typeof t?t===e:t.has(e))return arguments.length<3?e:o;throw new TypeError("Private element is not present on this object")}const N="date",P="dateEditor";var L=new WeakSet;class D extends n.t{constructor(){var t,e;super(...arguments),function(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}(t=this,e=L),e.add(t),k(this,"parentDestroyed",!1),k(this,"$datePicker",null)}static get EDITOR_TYPE(){return N}init(){if("function"!=typeof H)throw new Error("You need to include moment.js to your project.");if("function"!=typeof O.A)throw new Error("You need to include Pikaday to your project.");super.init(),this.hot.addHook("afterDestroy",(()=>{this.parentDestroyed=!0,this.destroyElements()})),this.hot.addHook("afterSetTheme",((t,e)=>{e||((0,i.vy)(this.datePicker,/ht-theme-.*/g),(0,i.iQ)(this.datePicker,t))}))}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"),(0,i.iQ)(this.datePicker,"htDatepickerHolder");const t=this.hot.getCurrentThemeName();(0,i.vy)(this.datePicker,/ht-theme-.*/g),(0,i.iQ)(this.datePicker,t),this.hot.rootDocument.body.appendChild(this.datePicker),this.eventManager.addEventListener(this.datePicker,"mousedown",(t=>{(0,i.nB)(t.target,"pika-day")&&this.hideDatepicker(),t.stopPropagation()}))}destroyElements(){const t=this.datePicker.parentNode;this.$datePicker&&this.$datePicker.destroy(),t&&t.removeChild(this.datePicker)}prepare(t,e,o,n,i,r){super.prepare(t,e,o,n,i,r)}open(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;const e=this.hot.getShortcutManager().getContext("editor");this.showDatepicker(t),super.open(),e.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:P})}close(){var t;this._opened=!1,null!==(t=this.$datePicker)&&void 0!==t&&t.destroy&&this.$datePicker.destroy(),this.hot._registerTimeout((()=>{const t=this.hot._getEditorManager();t.closeEditor(),this.hot.view.render(),t.prepareEditor()})),this.hot.getShortcutManager().getContext("editor").removeShortcutsByGroup(P),super.close()}finishEditing(){let t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];super.finishEditing(t,e)}showDatepicker(t){const e=_(L,this,V).call(this),o=this.hot.view.isMouseDown(),n=!!t&&(0,g.Yf)(t.keyCode);let i;this.datePicker.style.display="block",this.$datePicker=new O.A(this.getDatePickerConfig()),"function"==typeof this.$datePicker.useMoment&&this.$datePicker.useMoment(H),this.$datePicker._onInputFocus=function(){},this.originalValue?(i=this.originalValue,H(i,e,!0).isValid()&&this.$datePicker.setMoment(H(i,e),!0),this.getValue()!==this.originalValue&&this.setValue(this.originalValue),n||o||this.setValue("")):this.cellProperties.defaultDate?(i=this.cellProperties.defaultDate,H(i,e,!0).isValid()&&this.$datePicker.setMoment(H(i,e),!0),n||o||this.setValue("")):this.$datePicker.gotoToday()}hideDatepicker(){this.datePickerStyle.display="none",this.$datePicker.hide()}getDatePickerConfig(){var t;const e=this.TEXTAREA,o={};this.cellProperties&&this.cellProperties.datePickerConfig&&(0,s.zw)(o,this.cellProperties.datePickerConfig);const n=o.onSelect,i=o.onClose;return o.field=e,o.trigger=e,o.container=this.datePicker,o.bound=!1,o.keyboardInput=!1,o.format=null!==(t=o.format)&&void 0!==t?t:_(L,this,V).call(this),o.reposition=o.reposition||!1,o.isRTL=!1,o.onSelect=t=>{let e=t;isNaN(e.getTime())||(e=H(e).format(_(L,this,V).call(this))),this.setValue(e),n&&n(),(0,A.rr)()&&this.hideDatepicker()},o.onClose=()=>{this.parentDestroyed||this.finishEditing(!1),i&&i()},o}refreshDimensions(t){var e;if(super.refreshDimensions(t),this.state!==M._T.EDITING)return;if(this.TD=this.getEditedCell(),!this.TD)return void this.hideDatepicker();const{rowIndexMapper:o,columnIndexMapper:n}=this.hot,{wtOverlays:r}=this.hot.view._wt,{wtTable:s}=null!==(e=r.getParentOverlay(this.TD))&&void 0!==e?e:this.hot.view._wt,l=o.getVisualFromRenderableIndex(s.getFirstPartiallyVisibleRow()),a=o.getVisualFromRenderableIndex(s.getLastPartiallyVisibleRow()),h=n.getVisualFromRenderableIndex(s.getFirstPartiallyVisibleColumn()),c=n.getVisualFromRenderableIndex(s.getLastPartiallyVisibleColumn());if(this.row>=l&&this.row<=a&&this.col>=h&&this.col<=c){const t=this.TD.getBoundingClientRect();this.datePickerStyle.top=`${this.hot.rootWindow.pageYOffset+t.top+(0,i.DK)(this.TD)}px`;let e=this.hot.rootWindow.pageXOffset;this.hot.isRtl()?e+=t.right-(0,i.Gq)(this.datePicker):e+=t.left,this.datePickerStyle.left=`${e}px`}else this.hideDatepicker()}}function V(){var t;return null!==(t=this.cellProperties.dateFormat)&&void 0!==t?t:"DD/MM/YYYY"}class F extends T{static get EDITOR_TYPE(){return"dropdown"}prepare(t,e,o,n,i,r){r.filter=!1,r.strict=!0,super.prepare(t,e,o,n,i,r)}}class B extends n.t{static get EDITOR_TYPE(){return"numeric"}}var W=o(3023);class z extends n.t{constructor(){var t,e,o;super(...arguments),t=this,e="autoResize",o=(0,W.j)(this.hot.rootDocument,{textContent:t=>"•".repeat(t.value.length)}),(e=function(t){var e=function(t){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var o=e.call(t,"string");if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[e]=o}static get EDITOR_TYPE(){return"password"}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,(0,i.Ie)(this.TEXTAREA_PARENT),this.TEXTAREA_PARENT.appendChild(this.TEXTAREA)}}const j="ht_editor_visible",U="selectEditor";class $ extends M.b7{static get EDITOR_TYPE(){return"select"}init(){this.selectWrapper=this.hot.rootDocument.createElement("div"),this.select=this.hot.rootDocument.createElement("select"),this.select.setAttribute("data-hot-input","true"),this.selectWrapper.style.display="none";const t=this.hot.rootDocument.createElement("DIV"),e=this.hot.getSettings().ariaTags;t.className="htAutocompleteArrow",e&&t.setAttribute(...(0,p.MG)()),t.appendChild(this.hot.rootDocument.createTextNode(String.fromCharCode(9660))),(0,i.iQ)(this.selectWrapper,"htSelectEditor"),this.selectWrapper.appendChild(this.select),this.selectWrapper.insertBefore(t,this.selectWrapper.firstChild),this.hot.rootElement.appendChild(this.selectWrapper),this.registerHooks()}getValue(){return this.select.value}setValue(t){this.select.value=t}open(){this._opened=!0,this.refreshDimensions(),this.selectWrapper.style.display="",this.hot.getShortcutManager().setActiveContextName("editor"),this.registerShortcuts()}close(){this._opened=!1,this.selectWrapper.style.display="none",(0,i.nB)(this.selectWrapper,j)&&(0,i.vy)(this.selectWrapper,j),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(t,e,o,n,r,l){super.prepare(t,e,o,n,r,l);const a=this.cellProperties.selectOptions;let h;h="function"==typeof a?this.prepareOptions(a(this.row,this.col,this.prop)):this.prepareOptions(a),(0,i.Ie)(this.select),(0,s.v4)(h,((t,e)=>{const o=this.hot.rootDocument.createElement("OPTION");o.value=e,(0,i.Mv)(o,t),this.select.appendChild(o)}))}prepareOptions(t){let e={};if(Array.isArray(t))for(let o=0,n=t.length;o<n;o++)e[t[o]]=t[o];else"object"==typeof t&&(e=t);return e}refreshValue(){const t=this.hot.getSourceDataAtCell(this.row,this.prop);this.originalValue=t,this.setValue(t),this.refreshDimensions()}refreshDimensions(){if(this.state!==M._T.EDITING)return;if(this.TD=this.getEditedCell(),!this.TD)return void this.close();const{top:t,start:e,width:o,height:n}=this.getEditedCellRect(),r=this.selectWrapper.style;r.height=`${n}px`,r.width=`${o}px`,r.top=`${t}px`,r[this.hot.isRtl()?"right":"left"]=`${e}px`,r.margin="0px",(0,i.iQ)(this.selectWrapper,j)}registerShortcuts(){const t=this.hot.getShortcutManager().getContext("editor"),e={group:U};this.isInFullEditMode()&&t.addShortcuts([{keys:[["ArrowUp"]],callback:()=>{const t=this.select.selectedIndex-1;t>=0&&(this.select[t].selected=!0)}},{keys:[["ArrowDown"]],callback:()=>{const t=this.select.selectedIndex+1;t<=this.select.length-1&&(this.select[t].selected=!0)}}],e)}unregisterShortcuts(){this.hot.getShortcutManager().getContext("editor").removeShortcutsByGroup(U)}}class G extends n.t{static get EDITOR_TYPE(){return"time"}prepare(t,e,o,n,i,r){super.prepare(t,e,o,n,i,r),this.TEXTAREA.dir="ltr"}}var Y=o(1080),X=o(9478);function q(t,e,o,n,r,s,l){X.j.apply(this,[t,e,o,n,r,s,l]),(0,i.Mv)(e,null==s?"":s,!1)}q.RENDERER_TYPE="html";var K=o(8061);function Q(t,e,o,n,r,s,l){const{rootDocument:a}=t,h=l.allowHtml?q:f.F,c=a.createElement("DIV"),d=t.getSettings().ariaTags;if(c.className="htAutocompleteArrow",d&&c.setAttribute(...(0,p.MG)()),c.appendChild(a.createTextNode(String.fromCharCode(9660))),h.apply(this,[t,e,o,n,r,s,l]),e.firstChild||e.appendChild(a.createTextNode(String.fromCharCode(160))),e.insertBefore(c,e.firstChild),(0,i.iQ)(e,"htAutocomplete"),!t.acArrowListener){const r=new K.A(t);t.acArrowListener=function(r){(0,i.nB)(r.target,"htAutocompleteArrow")&&t.view._wt.getSetting("onCellDblClick",null,t._createCellCoords(o,n),e)},r.addEventListener(t.rootElement,"mousedown",t.acArrowListener),t.addHookOnce("afterDestroy",(()=>{r.destroy()}))}}function J(t,e,o,n,i,r,s){Q.apply(this,[t,e,o,n,i,r,s])}Q.RENDERER_TYPE="autocomplete",J.RENDERER_TYPE="dropdown",o(3215),o(1454);var Z=o(3487),tt=o(9138);const et=new WeakMap,ot=new WeakMap,nt="htBadValue",it="data-row",rt="data-col",st="checkboxRenderer",lt="checkbox";function at(t,e,o,n,r,s,a){const{rootDocument:h}=t,c=t.getSettings().ariaTags;X.j.apply(this,[t,e,o,n,r,s,a]),function(t){let e=ot.get(t);if(!e){const{rootElement:o}=t;e=new K.A(t),e.addEventListener(o,"click",(e=>function(t,e){const{target:o}=t;if(!ht(o))return;if(!o.hasAttribute(it)||!o.hasAttribute(rt))return;const n=parseInt(o.getAttribute(it),10),i=parseInt(o.getAttribute(rt),10);e.getCellMeta(n,i).readOnly&&t.preventDefault()}(e,t))),e.addEventListener(o,"mouseup",(e=>function(t,e){const{target:o}=t;ht(o)&&o.hasAttribute(it)&&o.hasAttribute(rt)&&setTimeout(e.listen,10)}(e,t))),e.addEventListener(o,"change",(e=>function(t,e){const{target:o}=t;if(!ht(o))return;if(!o.hasAttribute(it)||!o.hasAttribute(rt))return;const n=parseInt(o.getAttribute(it),10),i=parseInt(o.getAttribute(rt),10),r=e.getCellMeta(n,i);if(!r.readOnly){let o=null;o=t.target.checked?void 0===r.uncheckedTemplate||r.checkedTemplate:void 0!==r.uncheckedTemplate&&r.uncheckedTemplate,e.setDataAtCell(n,i,o)}}(e,t))),ot.set(t,e)}}(t);let u=function(t){const e=t.createElement("input");return e.className="htCheckboxRendererInput",e.type="checkbox",e.setAttribute("tabindex","-1"),e.cloneNode(!1)}(h);const g=a.label;let f=!1;if(void 0===a.checkedTemplate&&(a.checkedTemplate=!0),void 0===a.uncheckedTemplate&&(a.uncheckedTemplate=!1),(0,i.Ie)(e),s===a.checkedTemplate||(0,d.As)(s).toLocaleLowerCase(a.locale)===(0,d.As)(a.checkedTemplate).toLocaleLowerCase(a.locale)?u.checked=!0:s===a.uncheckedTemplate||(0,d.As)(s).toLocaleLowerCase(a.locale)===(0,d.As)(a.uncheckedTemplate).toLocaleLowerCase(a.locale)?u.checked=!1:(0,d.Im)(s)?(0,i.iQ)(u,"noValue"):(u.style.display="none",(0,i.iQ)(u,nt),f=!0),(0,i.Bq)(u,[[it,o],[rt,n]]),c&&(0,i.Bq)(u,[(0,p.SM)(u.checked?t.getTranslatedPhrase(tt.CHECKBOX_CHECKED):t.getTranslatedPhrase(tt.CHECKBOX_UNCHECKED)),(0,p.Xq)(u.checked),(0,p.Pk)()]),!f&&g){let i="";if(g.value)i="function"==typeof g.value?g.value.call(this,o,n,r,s):g.value;else if(g.property){const e=t.getDataAtRowProp(o,g.property);i=null!==e?e:""}const l=function(t,e,o){const n=t.createElement("label");n.className="htCheckboxRendererLabel "+(o?"fullWidth":"");const i=t.createTextNode(e);if(o){const e=t.createElement("span");e.appendChild(i),n.appendChild(e)}else n.appendChild(i);return n.cloneNode(!0)}(h,i,!0!==g.separated);"before"===g.position?g.separated?(e.appendChild(l),e.appendChild(u)):(l.appendChild(u),u=l):g.position&&"after"!==g.position||(g.separated?(e.appendChild(u),e.appendChild(l)):(l.insertBefore(u,l.firstChild),u=l))}function m(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];const o=t.getSelectedRange(),n=[],i=new Map;let r=[],s=0;if(o){for(let l=0;l<o.length;l++){const{row:a,col:h}=o[l].getTopStartCorner(),{row:c,col:d}=o[l].getBottomEndCorner();for(let o=a;o<=c;o+=1)for(let l=h;l<=d;l+=1){const a=t.getCellMeta(o,l);if(a.hidden)continue;const h={checkedTemplate:a.checkedTemplate,uncheckedTemplate:a.uncheckedTemplate};if("checkbox"!==a.type){!0!==e||a.readOnly||(i.has(n.length)?i.set(n.length,[...i.get(n.length),[o,l,null]]):i.set(n.length,[[o,l,null]]));continue}if(!0===a.readOnly)continue;void 0===a.checkedTemplate&&(a.checkedTemplate=!0),void 0===a.uncheckedTemplate&&(a.uncheckedTemplate=!1);const c=t.getDataAtCell(o,l);!1===e?[a.checkedTemplate,a.checkedTemplate.toString()].includes(c)?r.push([o,l,a.uncheckedTemplate,h]):[a.uncheckedTemplate,a.uncheckedTemplate.toString(),null,void 0].includes(c)&&r.push([o,l,a.checkedTemplate,h]):r.push([o,l,a.uncheckedTemplate,h]),s+=1}n.push(s),s=0}r=r.every((t=>{let[,,e]=t;return e===r[0][2]}))?r.map((t=>{let[e,o,n]=t;return[e,o,n]})):r.map((t=>{let[e,o,,n]=t;return[e,o,n.checkedTemplate]})),r.length>0&&n.forEach(((e,o)=>{let n=r.splice(0,e);i.size&&i.has(o)&&(n=[...n,...i.get(o)]),t.setDataAtCell(n)}))}}function w(){const e=t.getSelectedRange();if(e){for(let o=0;o<e.length;o++){const n=e[o].getTopStartCorner(),r=e[o].getBottomEndCorner();for(let e=n.row;e<=r.row;e++)for(let o=n.col;o<=r.col;o++){if(t.getCellMeta(e,o).readOnly)continue;const n=t.getCell(e,o);if((0,i.sb)(n)&&n.querySelectorAll("input[type=checkbox]").length>0)return!0}}return!1}}(!g||g&&!g.separated)&&e.appendChild(u),f&&e.appendChild(h.createTextNode("#bad-value#")),et.has(t)||(et.set(t,!0),function(){const e=t.getShortcutManager().getContext("grid"),o={group:st,relativeToGroup:l.b,position:"before"};e.addShortcuts([{keys:[["space"]],callback:()=>(m(),!w()),runOnlyIf:()=>{var e;return null===(e=t.getSelectedRangeLast())||void 0===e?void 0:e.highlight.isCell()}},{keys:[["enter"]],callback:()=>(m(),!w()),runOnlyIf:()=>{const e=t.getSelectedRangeLast();return t.getSettings().enterBeginsEditing&&(null==e?void 0:e.highlight.isCell())&&!t.selection.isMultiple()}},{keys:[["delete"],["backspace"]],callback:()=>(m(!0),!w()),runOnlyIf:()=>{var e;return null===(e=t.getSelectedRangeLast())||void 0===e?void 0:e.highlight.isCell()}}],o)}())}function ht(t){return"INPUT"===t.tagName&&"checkbox"===t.getAttribute("type")}function ct(t,e,o,n,i,r,s){Q.apply(this,[t,e,o,n,i,r,s])}Z.R.getSingleton().add("modifyAutoColumnSizeSeed",(function(t,e,o){const{label:n,type:i,row:r,column:s,prop:l}=e;if(i===lt){if(n){const{value:e,property:i}=n;let a=o;if(e)a="function"==typeof e?e(r,s,l,o):e;else if(i){const t=this.getDataAtRowProp(r,i);a=null!==t?t:o}t=a}return t}})),at.RENDERER_TYPE=lt,ct.RENDERER_TYPE="handsontable";var dt=o(3333),ut=o(1409);function gt(t,e){if((0,ut.kf)(t)){const o=e.numericFormat,n=o&&o.culture||"-",i=o&&o.pattern;if(void 0!==n&&!dt.A.languages()[n]){const t=n.replace("-",""),e=dt.A.allLanguages?dt.A.allLanguages[n]:dt.A[t];e&&dt.A.registerLanguage(e)}dt.A.setLanguage(n),t=(0,dt.A)(t).format(i||"0")}return t}function ft(t,e,o,n,i,r,s){let l=r;if((0,ut.kf)(l)){let t=[];if(Array.isArray(s.className))t=s.className;else{var a;const e=null!==(a=s.className)&&void 0!==a?a:"";e.length&&(t=e.split(" "))}l=gt(l,s),t.indexOf("htLeft")<0&&t.indexOf("htCenter")<0&&t.indexOf("htRight")<0&&t.indexOf("htJustify")<0&&t.push("htRight"),t.indexOf("htNumeric")<0&&t.push("htNumeric"),s.className=t.join(" "),e.dir="ltr"}(0,f.F)(t,e,o,n,i,l,s)}function pt(t,e,o,n,r,s,l){f.F.apply(this,[t,e,o,n,r,s,l]);const a=l.hashLength||e.innerHTML.length,h=l.hashSymbol||"*";let c="";(0,ut.Ti)(a-1,(()=>{c+=h})),(0,i.Mv)(e,c)}function mt(t,e,o,n,i,r,s){f.F.apply(this,[t,e,o,n,i,r,s])}function wt(t,e,o,n,i,r,s){f.F.apply(this,[t,e,o,n,i,r,s]),e.dir="ltr"}ft.RENDERER_TYPE="numeric",pt.RENDERER_TYPE="password",mt.RENDERER_TYPE="select",wt.RENDERER_TYPE="time";var bt=o(4950);function vt(t,e){let o=t;null==o&&(o=""),this.allowEmpty&&""===o?e(!0):this.strict&&this.source?"function"==typeof this.source?this.source(o,yt(o,e)):yt(o,e)(this.source):e(!0)}function yt(t,e){const o=t;return function(t){let n=!1;for(let e=0,i=t.length;e<i;e++)if(o===t[e]){n=!0;break}e(n)}}function Ct(t,e){const o=(0,Y.L3)(N,this.instance);let n=t,i=!0;null==n&&(n="");let r=H(n,this.dateFormat||o.defaultDateFormat,!0).isValid(),s=H(new Date(n)).isValid()||r;if(this.allowEmpty&&""===n&&(s=!0,r=!0),s||(i=!1),!s&&r&&(i=!0),s&&!r)if(!0===this.correctFormat){const t=function(t,e){const o=H(function(t){const e=new Date(t);return isNaN(new Date(`${t}T00:00`).getDate())?e:new Date(e.getTime()+6e4*e.getTimezoneOffset())}(t)),n=H(t,e),i=t.search(/[A-Za-z]/g)>-1;let r;return r=o.isValid()&&o.format("x")===n.format("x")||!n.isValid()||i?o:n,r.format(e)}(n,this.dateFormat);this.instance.setDataAtCell(this.visualRow,this.visualCol,t,"dateValidator"),i=!0}else i=!1;e(i)}function St(t,e){vt.apply(this,[t,e])}function Rt(t,e){let o=t;null==o&&(o=""),this.allowEmpty&&""===o?e(!0):e(""!==o&&(0,ut.kf)(t))}vt.VALIDATOR_TYPE="autocomplete",Ct.VALIDATOR_TYPE="date",St.VALIDATOR_TYPE="dropdown",Rt.VALIDATOR_TYPE="numeric";const Et=["YYYY-MM-DDTHH:mm:ss.SSSZ","X","x"];function Tt(t,e){const o=this.timeFormat||"h:mm:ss a";let n=!0,i=t;null===i&&(i=""),i=/^\d{3,}$/.test(i)?parseInt(i,10):i;const r=/^\d{1,2}$/.test(i);r&&(i+=":00");const s=H(i,Et,!0).isValid()?H(i):H(i,o);let l=s.isValid(),a=H(i,o,!0).isValid()&&!r;if(this.allowEmpty&&""===i&&(l=!0,a=!0),l||(n=!1),!l&&a&&(n=!0),l&&!a)if(!0===this.correctFormat){const t=s.format(o);this.instance.setDataAtCell(this.visualRow,this.visualCol,t,"timeValidator"),n=!0}else n=!1;e(n)}Tt.VALIDATOR_TYPE="time";var xt=o(2993);const Mt={CELL_TYPE:"autocomplete",editor:T,renderer:Q,validator:vt},It={CELL_TYPE:"checkbox",editor:I,renderer:at};function Ht(t,e,o,n,i,r,s){Q.apply(this,[t,e,o,n,i,r,s])}Ht.RENDERER_TYPE="date";const Ot={CELL_TYPE:"date",editor:D,renderer:Ht,validator:Ct},At={CELL_TYPE:"dropdown",editor:F,renderer:J,validator:St,filter:!1,strict:!0},kt={CELL_TYPE:"handsontable",editor:h,renderer:ct},_t={CELL_TYPE:"numeric",editor:B,renderer:ft,validator:Rt,dataType:"number"},Nt={CELL_TYPE:"password",editor:z,renderer:pt,copyable:!1},Pt={CELL_TYPE:"select",editor:$,renderer:mt};var Lt=o(4675);const Dt={CELL_TYPE:"time",editor:G,renderer:wt,validator:Tt};var Vt=o(360);o(3949);var Ft=o(6833);function Bt(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Wt(t,e,o){return(e=function(t){var e=function(t){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var o=e.call(t,"string");if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[e]=o,t}function zt(t,e){return t.get(jt(t,e))}function jt(t,e,o){if("function"==typeof t?t===e:t.has(e))return arguments.length<3?e:o;throw new TypeError("Private element is not present on this object")}const Ut=new Map([["plugin",Ft.Mt],["cell-type",Vt.L4],["editor",Y.aZ],["renderer",bt.sl],["validator",xt.tR]]),$t=Symbol("mainSetting"),Gt=[];let Yt=null;var Xt=new WeakMap,qt=new WeakSet;class Kt{static get PLUGIN_KEY(){return"base"}static get SETTING_KEYS(){return[this.PLUGIN_KEY]}static get DEFAULT_SETTINGS(){return{}}constructor(t){var e;Bt(this,e=qt),e.add(this),Wt(this,"eventManager",new K.A(this)),Wt(this,"pluginName",null),Wt(this,"pluginsInitializedCallbacks",[]),Wt(this,"isPluginsReady",!1),Wt(this,"enabled",!1),Wt(this,"initialized",!1),function(t,e){Bt(t,e),e.set(t,{})}(this,Xt),(0,s.LH)(this,"hot",t,{writable:!1}),Yt=null,this.hot.addHook("afterPluginsInitialized",(()=>this.onAfterPluginsInitialized())),this.hot.addHook("afterUpdateSettings",(t=>this.onUpdateSettings(t))),this.hot.addHook("beforeInit",(()=>this.init()))}init(){this.pluginName=this.hot.getPluginName(this);const t=this.constructor.PLUGIN_DEPS,e=Array.isArray(t)?t:[];if(e.length>0){const t=[];if(e.forEach((e=>{const[o,n]=e.split(":");if(!Ut.has(o))throw new Error(`Unknown plugin dependency type "${o}" was found.`);Ut.get(o)(n)||t.push(` - ${n} (${o})`)})),t.length>0){const e=[`The ${this.pluginName} plugin requires the following modules:\n`,`${t.join("\n")}\n`].join("");Gt.push(e)}}if(Yt||(Yt=(0,Ft.f4)()),Yt.indexOf(this.pluginName)>=0&&Yt.splice(Yt.indexOf(this.pluginName),1),this.hot.addHookOnce("afterPluginsInitialized",(()=>{this.isEnabled&&this.isEnabled()&&this.enablePlugin()})),0===Yt.length){if(Gt.length>0){const t=[`${Gt.join("\n")}\n`,"You have to import and register them manually."].join("");throw Gt.length=0,new Error(t)}this.hot.runHooks("afterPluginsInitialized")}this.initialized=!0}enablePlugin(){this.enabled=!0}disablePlugin(){var t;null===(t=this.eventManager)||void 0===t||t.clear(),this.clearHooks(),this.enabled=!1}getSetting(t){const e=this.hot.getSettings()[this.constructor.PLUGIN_KEY];if(void 0===t)return e;const o=this.constructor.DEFAULT_SETTINGS;var n,i;return(Array.isArray(e)||(0,s.Gv)(e))&&o[$t]===t?Array.isArray(e)?e:null!==(n=e[t])&&void 0!==n?n:o[t]:(0,s.Gv)(e)&&null!==(i=e[t])&&void 0!==i?i:o[t]}addHook(t,e,o){zt(Xt,this)[t]=zt(Xt,this)[t]||[];const n=zt(Xt,this)[t];this.hot.addHook(t,e,o),n.push(e),zt(Xt,this)[t]=n}removeHooks(t){(0,c.z0)(zt(Xt,this)[t]||[],(e=>{this.hot.removeHook(t,e)}))}clearHooks(){const t=zt(Xt,this);(0,s.v4)(t,((t,e)=>this.removeHooks(e))),t.length=0}callOnPluginsReady(t){this.isPluginsReady?t():this.pluginsInitializedCallbacks.push(t)}onAfterPluginsInitialized(){(0,c.z0)(this.pluginsInitializedCallbacks,(t=>t())),this.pluginsInitializedCallbacks.length=0,this.isPluginsReady=!0}onUpdateSettings(t){const e=jt(qt,this,Qt).call(this,t);this.isEnabled&&(this.enabled&&!this.isEnabled()&&this.disablePlugin(),!this.enabled&&this.isEnabled()&&this.enablePlugin(),this.enabled&&this.isEnabled()&&e&&this.updatePlugin(t))}updatePlugin(){}destroy(){var t;null===(t=this.eventManager)||void 0===t||t.destroy(),this.clearHooks(),(0,s.v4)(this,((t,e)=>{"hot"!==e&&(this[e]=null)})),delete this.t,delete this.hot}}function Qt(t){if(!t)return!1;const e=this.constructor.SETTING_KEYS;if("boolean"==typeof e)return e;for(let o=0;o<e.length;o++)if(void 0!==t[e[o]])return!0;return!1}var Jt=o(3968);function Zt(t,e,o){return(e=function(t){var e=function(t){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var o=e.call(t,"string");if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[e]=o,t}const te=class{constructor(t){Zt(this,"hot",null),Zt(this,"container",null),Zt(this,"injected",!1),Zt(this,"rows",[]),Zt(this,"columns",[]),Zt(this,"samples",null),Zt(this,"settings",{useHeaders:!0}),this.hot=t}addRow(t,e){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 o={row:t};this.rows.push(o),this.samples=e,this.table=this.createTable(this.hot.table.className),this.table.colGroup.appendChild(this.createColGroupsCol(t)),this.table.tr.appendChild(this.createRow(t)),0===t&&(0,i.iQ)(this.table.table,"htGhostTableFirstRow"),this.container.container.appendChild(this.table.fragment),o.table=this.table.table}addColumnHeadersRow(t){if(null!=this.hot.getColHeader(0)){const e={row:-1};this.rows.push(e),this.container=this.createContainer(this.hot.rootElement.className),this.samples=t,this.table=this.createTable(this.hot.table.className),this.table.colGroup.appendChild(this.createColGroupsCol()),this.appendColumnHeadersRow(),this.container.container.appendChild(this.table.fragment),e.table=this.table.table}}addColumn(t,e){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 o={col:t};this.columns.push(o),this.samples=e,this.table=this.createTable(this.hot.table.className),this.getSetting("useHeaders")&&null!==this.hot.getColHeader(t)&&this.hot.view.appendColHeader(t,this.table.th,void 0,-1),this.table.tBody.appendChild(this.createCol(t)),this.container.container.appendChild(this.table.fragment),o.table=this.table.table}getHeights(t){this.injected||this.injectTable(),(0,c.z0)(this.rows,(e=>{const{height:o}=e.table.getBoundingClientRect();t(e.row,Math.ceil(o))}))}getWidths(t){this.injected||this.injectTable(),(0,c.z0)(this.columns,(e=>{const{width:o}=e.table.getBoundingClientRect();t(e.col,Math.ceil(o))}))}setSettings(t){this.settings=t}setSetting(t,e){this.settings||(this.settings={}),this.settings[t]=e}getSettings(){return this.settings}getSetting(t){return this.settings?this.settings[t]:null}createColGroupsCol(t){const e=this.hot.rootDocument.createDocumentFragment();return this.hot.hasRowHeaders()&&e.appendChild(this.createColElement(-1,-1)),this.samples.forEach((o=>{(0,c.z0)(o.strings,(o=>{e.appendChild(this.createColElement(o.col,t))}))})),e}createRow(t){const{rootDocument:e}=this.hot,o=e.createDocumentFragment(),n=e.createElement("th");return this.hot.hasRowHeaders()&&(this.hot.view.appendRowHeader(t,n),o.appendChild(n)),this.samples.forEach((n=>{(0,c.z0)(n.strings,(n=>{const i=n.col,r=this.hot.getCellMeta(t,i),s=this.hot.getCellRenderer(r),l=e.createElement("td");l.setAttribute("ghost-table",1),s(this.hot,l,t,i,this.hot.colToProp(i),n.value,r),o.appendChild(l)}))})),o}appendColumnHeadersRow(){const{rootDocument:t}=this.hot,e=t.createDocumentFragment(),o=[];if(this.hot.hasRowHeaders()){const n=t.createElement("th");o.push([-1,n]),e.appendChild(n)}this.samples.forEach((n=>{(0,c.z0)(n.strings,(n=>{const i=n.col,r=t.createElement("th");o.push([i,r]),e.appendChild(r)}))})),this.table.tHead.appendChild(e),(0,c.z0)(o,(t=>{const[e,o]=t;this.hot.view.appendColHeader(e,o)}))}createCol(t){const{rootDocument:e}=this.hot,o=e.createDocumentFragment();return this.samples.forEach((n=>{(0,c.z0)(n.strings,(n=>{const i=n.row,r=this.hot.getCellMeta(i,t),s=this.hot.getCellRenderer(r),l=e.createElement("td"),a=e.createElement("tr");l.setAttribute("ghost-table",1),s(this.hot,l,i,t,this.hot.colToProp(t),n.value,r),a.appendChild(l),o.appendChild(a)}))})),o}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 t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;this.injected||((t||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(t,e){const o=this.hot.rootDocument.createElement("col");let n=0;e>=0&&t>=0&&(n=this.hot.getCellMeta(e,t).colspan);let i=this.hot.getColWidth(t);if(n>1)for(let e=t+1;e<t+n;e++)i+=this.hot.getColWidth(e);return o.style.width=`${i}px`,o}createTable(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";const{rootDocument:e}=this.hot,o=e.createDocumentFragment(),n=e.createElement("table"),r=e.createElement("thead"),s=e.createElement("tbody"),l=e.createElement("colgroup"),a=e.createElement("tr"),h=e.createElement("th");return this.isVertical()&&n.appendChild(l),this.isHorizontal()&&(a.appendChild(h),r.appendChild(a),n.style.tableLayout="auto",n.style.width="auto"),n.appendChild(r),this.isVertical()&&s.appendChild(a),n.appendChild(s),(0,i.iQ)(n,t),o.appendChild(n),{fragment:o,table:n,tHead:r,tBody:s,colGroup:l,tr:a,th:h}}createContainer(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";const{rootDocument:e}=this.hot,o=e.createDocumentFragment(),n=e.createElement("div"),r=`htGhostTable htAutoSize ${t.trim()}`;return(0,i.iQ)(n,r),o.appendChild(n),{fragment:o,container:n}}isVertical(){return!(!this.rows.length||this.columns.length)}isHorizontal(){return!(!this.columns.length||this.rows.length)}};function ee(t,e,o){return(e=function(t){var e=function(t){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var o=e.call(t,"string");if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[e]=o,t}class oe{static get SAMPLE_COUNT(){return 3}constructor(t){ee(this,"samples",null),ee(this,"dataFactory",null),ee(this,"customSampleCount",null),ee(this,"allowDuplicates",!1),this.dataFactory=t}getSampleCount(){return this.customSampleCount?this.customSampleCount:oe.SAMPLE_COUNT}setSampleCount(t){this.customSampleCount=t}setAllowDuplicates(t){this.allowDuplicates=t}generateRowSamples(t,e){return this.generateSamples("row",e,t)}generateColumnSamples(t,e){return this.generateSamples("col",e,t)}generateSamples(t,e,o){const n=new Map,{from:i,to:r}="number"==typeof o?{from:o,to:o}:o;return(0,ut.Ti)(i,r,(o=>{const i=this.generateSample(t,e,o);n.set(o,i)})),n}generateSample(t,e,o){if("row"!==t&&"col"!==t)throw new Error("Unsupported sample type");const n=new Map,i="row"===t?"col":"row",r=[];return(0,ut.Ti)(e.from,e.to,(e=>{const l="row"===t?this.dataFactory(o,e):this.dataFactory(e,o);if(!1===l)return;const{value:a,bundleSeed:h}=l,c="string"==typeof h&&h.length>0;let u;u=c?h:(0,s.Gv)(a)?`${Object.keys(a).length}`:Array.isArray(a)?`${a.length}`:`${(0,d.As)(a).length}`,n.has(u)||n.set(u,{needed:this.getSampleCount(),strings:[]});const g=n.get(u);g.needed&&(!(r.indexOf(a)>-1)||this.allowDuplicates||c)&&(g.strings.push({value:a,[i]:e}),r.push(a),g.needed-=1)})),n}}const ne=oe;var ie=o(4726),re=o(8386);function se(t,e,o){le(t,e),e.set(t,o)}function le(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function ae(t,e,o){return(e=function(t){var e=function(t){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var o=e.call(t,"string");if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[e]=o,t}function he(t,e){return t.get(de(t,e))}function ce(t,e,o){return t.set(de(t,e),o),o}function de(t,e,o){if("function"==typeof t?t===e:t.has(e))return arguments.length<3?e:o;throw new TypeError("Private element is not present on this object")}Z.R.getSingleton().register("modifyAutoColumnSizeSeed");const ue="autoColumnSize";var ge=new WeakMap,fe=new WeakMap,pe=new WeakMap,me=new WeakSet;class we extends Kt{static get PLUGIN_KEY(){return ue}static get PLUGIN_PRIORITY(){return 10}static get SETTING_KEYS(){return!0}static get DEFAULT_SETTINGS(){return{useHeaders:!0,samplingRatio:null,allowSampleDuplicates:!1}}static get CALCULATION_STEP(){return 50}static get SYNC_CALCULATION_LIMIT(){return 50}constructor(t){var e;super(t),le(this,e=me),e.add(this),ae(this,"ghostTable",new te(this.hot)),ae(this,"samplesGenerator",new ne(((t,e)=>{const o=this.hot.toPhysicalRow(t),n=this.hot.toPhysicalColumn(e);if(this.hot.rowIndexMapper.isHidden(o)||this.hot.columnIndexMapper.isHidden(n))return!1;const i=this.hot.getCellMeta(t,e);let r="";i.spanned||(r=this.hot.getDataAtCell(t,e));let s="";return this.hot.hasHook("modifyAutoColumnSizeSeed")&&(s=this.hot.runHooks("modifyAutoColumnSizeSeed",s,i,r)),{value:r,bundleSeed:s}}))),ae(this,"inProgress",!1),ae(this,"measuredColumns",0),ae(this,"columnWidthsMap",new re._),se(this,ge,!1),se(this,fe,[]),se(this,pe,[]),this.hot.columnIndexMapper.registerMap("autoColumnSize",this.columnWidthsMap),this.addHook("beforeColumnResize",((t,e,o)=>de(me,this,Ee).call(this,t,e,o)))}isEnabled(){return!1!==this.hot.getSettings()[ue]&&!this.hot.getSettings().colWidths}enablePlugin(){var t=this;if(this.enabled)return;this.ghostTable.setSetting("useHeaders",this.getSetting("useHeaders")),this.samplesGenerator.setAllowDuplicates(this.getSetting("allowSampleDuplicates"));const e=this.getSetting("samplingRatio");e&&!isNaN(e)&&this.samplesGenerator.setSampleCount(parseInt(e,10)),this.addHook("afterLoadData",(function(){for(var e=arguments.length,o=new Array(e),n=0;n<e;n++)o[n]=arguments[n];return de(me,t,Se).call(t,...o)})),this.addHook("beforeChangeRender",(function(){for(var e=arguments.length,o=new Array(e),n=0;n<e;n++)o[n]=arguments[n];return de(me,t,Re).call(t,...o)})),this.addHook("afterFormulasValuesUpdate",(function(){for(var e=arguments.length,o=new Array(e),n=0;n<e;n++)o[n]=arguments[n];return de(me,t,xe).call(t,...o)})),this.addHook("beforeRender",(()=>de(me,this,Ce).call(this))),this.addHook("modifyColWidth",((t,e)=>this.getColumnWidth(e,t))),this.addHook("init",(()=>de(me,this,Te).call(this))),super.enablePlugin()}updatePlugin(){ce(pe,this,this.findColumnsWhereHeaderWasChanged()),super.updatePlugin()}disablePlugin(){super.disablePlugin(),this.addHook("beforeColumnResize",((t,e,o)=>de(me,this,Ee).call(this,t,e,o)))}calculateVisibleColumnsWidth(){if(!this.hot.countRows())return;const t=this.getFirstVisibleColumn(),e=this.getLastVisibleColumn();if(-1===t||-1===e)return;const o=this.hot.forceFullRender;this.calculateColumnsWidth({from:t,to:e},void 0,o)}calculateColumnsWidth(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{from:0,to:this.hot.countCols()-1},e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{from:0,to:this.hot.countRows()-1},o=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const n="number"==typeof t?{from:t,to:t}:t,i="number"==typeof e?{from:e,to:e}:e;(0,ut.Ti)(n.from,n.to,(t=>{let e=this.hot.toPhysicalColumn(t);null===e&&(e=t),(o||null===this.columnWidthsMap.getValueAtIndex(e)&&!this.hot._getColWidthFromSettings(e))&&de(me,this,ve).call(this,t,i)})),this.ghostTable.columns.length&&(de(me,this,ye).call(this),this.measuredColumns=n.to+1,this.ghostTable.clean())}calculateAllColumnsWidth(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{from:0,to:this.hot.countRows()-1},e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],o=0;const n=this.hot.countCols()-1;let i=null;this.inProgress=!0;const r=()=>{if(!this.hot)return(0,Jt.uU)(i),void(this.inProgress=!1);this.calculateColumnsWidth({from:o,to:Math.min(o+we.CALCULATION_STEP,n)},t,e),o=o+we.CALCULATION_STEP+1,o<n?i=(0,Jt.xi)(r):((0,Jt.uU)(i),this.inProgress=!1,this.hot.view.adjustElementsSize())},s=this.getSyncCalculationLimit();s>=0&&(this.calculateColumnsWidth({from:0,to:s},t,e),o=s+1),o<n?r():this.inProgress=!1}recalculateAllColumnsWidth(){this.hot.view.isVisible()&&this.calculateAllColumnsWidth({from:0,to:this.hot.countRows()-1},!0)}getSyncCalculationLimit(){const t=this.hot.getSettings()[ue];let e=we.SYNC_CALCULATION_LIMIT;const o=this.hot.countCols()-1;return(0,s.Gv)(t)&&(e=t.syncLimit,(0,u.Pi)(e)?e=(0,ut.B5)(o,e):e>>=0),Math.min(e,o)}getColumnWidth(t,e){let o=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],n=e;return void 0===n&&(n=this.columnWidthsMap.getValueAtIndex(this.hot.toPhysicalColumn(t)),o&&"number"==typeof n&&(n=Math.max(n,ie.j))),n}getFirstVisibleColumn(){var t;return null!==(t=this.hot.getFirstRenderedVisibleColumn())&&void 0!==t?t:-1}getLastVisibleColumn(){var t;return null!==(t=this.hot.getLastRenderedVisibleColumn())&&void 0!==t?t:-1}findColumnsWhereHeaderWasChanged(){return this.hot.getColHeader().reduce(((t,e,o)=>{const n=he(fe,this).length;return(n-1<o||he(fe,this)[o]!==e)&&t.push(this.hot.toVisualColumn(o)),n-1<o?he(fe,this).push(e):he(fe,this)[o]=e,t}),[])}clearCache(t){Array.isArray(t)?this.hot.batchExecution((()=>{t.forEach((t=>{this.columnWidthsMap.setValueAtIndex(t,null)}))}),!0):this.columnWidthsMap.clear()}isNeedRecalculate(){return!!this.columnWidthsMap.getValues().slice(0,this.measuredColumns).filter((t=>null===t)).length}destroy(){this.ghostTable.clean(),super.destroy()}}function be(t){const e={from:0,to:this.hot.countRows()-1};t.forEach((t=>{const o=this.hot.toPhysicalColumn(t);null!==o&&(this.hot._getColWidthFromSettings(o)||de(me,this,ve).call(this,t,e))})),this.ghostTable.columns.length&&(de(me,this,ye).call(this),this.ghostTable.clean())}function ve(t,e){this.samplesGenerator.generateColumnSamples(t,e).forEach(((t,e)=>this.ghostTable.addColumn(e,t)))}function ye(){this.hot.batchExecution((()=>{this.ghostTable.getWidths(((t,e)=>{const o=this.hot.toPhysicalColumn(t);this.columnWidthsMap.setValueAtIndex(o,e)}))}),!0)}function Ce(){this.calculateVisibleColumnsWidth(),this.inProgress||(de(me,this,be).call(this,he(pe,this)),ce(pe,this,[]))}function Se(t,e){e||this.recalculateAllColumnsWidth()}function Re(t){const e=t.reduce(((t,e)=>{let[,o]=e;const n=this.hot.propToCol(o);return Number.isInteger(n)&&-1===t.indexOf(n)&&t.push(n),t}),[]);he(pe,this).push(...e)}function Ee(t,e,o){let n=t;return o&&(this.calculateColumnsWidth(e,void 0,!0),n=this.getColumnWidth(e,void 0,!1)),n}function Te(){ce(fe,this,this.hot.getColHeader()),this.recalculateAllColumnsWidth(),ce(ge,this,!0)}function xe(t){if(!he(ge,this))return;const e=t.reduce(((t,e)=>{var o;const n=null===(o=e.address)||void 0===o?void 0:o.col;if(Number.isInteger(n)){const e=this.hot.toVisualColumn(n);-1===t.indexOf(e)&&t.push(e)}return t}),[]);he(pe,this).push(...e)}const Me={horizontal:"horizontal",vertical:"vertical"};function Ie(t,e,o){return(e=function(t){var e=function(t){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var o=e.call(t,"string");if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[e]=o,t}function He(t,e,o){if("function"==typeof t?t===e:t.has(e))return arguments.length<3?e:o;throw new TypeError("Private element is not present on this object")}Z.R.getSingleton().register("modifyAutofillRange"),Z.R.getSingleton().register("beforeAutofill"),Z.R.getSingleton().register("afterAutofill");const Oe="autofill",Ae=["fillHandle"];var ke=new WeakSet;class _e extends Kt{constructor(){var t,e;super(...arguments),function(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}(t=this,e=ke),e.add(t),Ie(this,"addingStarted",!1),Ie(this,"mouseDownOnCellCorner",!1),Ie(this,"mouseDragOutside",!1),Ie(this,"handleDraggedCells",0),Ie(this,"directions",[]),Ie(this,"autoInsertRow",!1)}static get PLUGIN_KEY(){return Oe}static get PLUGIN_PRIORITY(){return 20}static get SETTING_KEYS(){return[Oe,...Ae]}isEnabled(){return this.hot.getSettings().fillHandle}enablePlugin(){this.enabled||(this.mapSettings(),this.registerEvents(),this.addHook("afterOnCellCornerMouseDown",(t=>He(ke,this,Pe).call(this,t))),this.addHook("afterOnCellCornerDblClick",(t=>He(ke,this,Ne).call(this,t))),this.addHook("beforeOnCellMouseOver",((t,e)=>He(ke,this,Le).call(this,e))),super.enablePlugin())}updatePlugin(){this.disablePlugin(),this.enablePlugin(),super.updatePlugin()}disablePlugin(){this.clearMappedSettings(),super.disablePlugin()}getSelectionData(){const t=this.hot.getSelectedRangeLast(),{row:e,col:o}=t.getTopStartCorner(),{row:n,col:i}=t.getBottomEndCorner(),r=this.hot.runHooks("modifyCopyableRange",[{startRow:e,startCol:o,endRow:n,endCol:i}]),s=[],l=[],a=[];return(0,c.z0)(r,(t=>{for(let e=t.startRow;e<=t.endRow;e+=1)-1===s.indexOf(e)&&s.push(e);for(let e=t.startCol;e<=t.endCol;e+=1)-1===l.indexOf(e)&&l.push(e)})),(0,c.z0)(s,(t=>{const e=[];(0,c.z0)(l,(o=>{e.push(this.hot.getCopyableData(t,o))})),a.push(e)})),a}fillIn(){if(this.hot.selection.highlight.getFill().isEmpty())return!1;const[t,e,o,n]=this.hot.selection.highlight.getFill().getVisualCorners(),i=this.hot.getSelectedRangeLast(),r=i.getTopStartCorner(),s=i.getBottomEndCorner();this.resetSelectionOfDraggedArea();const l=[r.row,r.col,s.row,s.col],a=this.hot.runHooks("modifyAutofillRange",[Math.min(r.row,t),Math.min(r.col,e),Math.max(s.row,o),Math.max(s.col,n)],l),{directionOfDrag:h,startOfDragCoords:c,endOfDragCoords:d}=function(t,e,o){let n,i,r;return e[0]===t[0]&&e[1]<t[1]?(r="left",n=o(e[0],e[1]),i=o(e[2],t[1]-1)):e[2]===t[2]&&e[0]===t[0]&&e[3]>t[3]?(r="right",n=o(e[0],t[3]+1),i=o(e[2],e[3])):e[0]<t[0]&&e[1]===t[1]?(r="up",n=o(e[0],e[1]),i=o(t[0]-1,e[3])):e[2]>t[2]&&e[1]===t[1]&&(r="down",n=o(t[2]+1,e[1]),i=o(e[2],e[3])),n&&n.normalize(),i&&i.normalize(),{directionOfDrag:r,startOfDragCoords:n,endOfDragCoords:i}}(l,a,((t,e)=>this.hot._createCellCoords(t,e)));if(c&&c.row>-1&&c.col>-1){const t=this.getSelectionData(),e=i.clone(),o=this.hot._createCellRange(c,c,d),n=this.hot.runHooks("beforeAutofill",t,e,o,h);if(!1===n)return this.hot.selection.highlight.getFill().clear(),this.hot.render(),!1;let r=n;const s=n;if(["up","left"].indexOf(h)>-1&&(1!==s.length||0!==s[0].length))if(r=[],"up"===h){const t=d.row-c.row+1,e=t%s.length;for(let o=0;o<t;o++)r.push(s[(o+(s.length-e))%s.length])}else{const t=d.col-c.col+1,e=t%s[0].length;for(let o=0;o<s.length;o++){r.push([]);for(let n=0;n<t;n++)r[o].push(s[o][(n+(s[o].length-e))%s[o].length])}}this.hot.populateFromArray(c.row,c.col,r,d.row,d.col,`${this.pluginName}.fill`,null),this.setSelection(a),this.hot.runHooks("afterAutofill",r,e,o,h),this.hot.render()}else this.hot.view.render();return!0}reduceSelectionAreaIfNeeded(t){return t.row<0&&(t.row=0),t.col<0&&(t.col=0),t}getCoordsOfDragAndDropBorders(t){const e=this.hot.getSelectedRangeLast(),o=e.getBottomEndCorner();let n=t;if(this.directions.includes(Me.vertical)&&this.directions.includes(Me.horizontal)){const i=e.getTopStartCorner();(o.col<=t.col||i.col>=t.col)&&(n=this.hot._createCellCoords(o.row,t.col)),(o.row<t.row||i.row>t.row)&&(n=this.hot._createCellCoords(t.row,o.col))}else if(this.directions.includes(Me.vertical))n=this.hot._createCellCoords(t.row,o.col);else{if(!this.directions.includes(Me.horizontal))return;n=this.hot._createCellCoords(o.row,t.col)}return this.reduceSelectionAreaIfNeeded(n)}showBorder(t){const e=this.getCoordsOfDragAndDropBorders(t);e&&this.redrawBorders(e)}addRow(){this.hot._registerTimeout((()=>{this.hot.alter("insert_row_below",void 0,1,`${this.pluginName}.fill`),this.addingStarted=!1}),200)}addNewRowIfNeeded(){if(!this.hot.selection.highlight.getFill().isEmpty()&&!1===this.addingStarted&&this.autoInsertRow){const t=this.hot.getSelectedLast(),e=this.hot.selection.highlight.getFill().getVisualCorners(),o=this.hot.countRows();t[2]<o-1&&e[2]===o-1&&(this.addingStarted=!0,this.addRow())}}getIndexOfLastAdjacentFilledInRow(t){const e=this.hot.getData(),o=this.hot.countRows();let n;for(let i=t[2]+1;i<o;i++){for(let o=t[1];o<=t[3];o++){const t=e[i][o];if(!(0,d.Im)(t))return-1}const o=e[i][t[1]-1],r=e[i][t[3]+1];(0,d.Im)(o)&&(0,d.Im)(r)||(n=i)}return n}addSelectionFromStartAreaToSpecificRowIndex(t,e){this.hot.selection.highlight.getFill().clear().add(this.hot._createCellCoords(t[0],t[1])).add(this.hot._createCellCoords(e,t[3])).commit()}setSelection(t){this.hot.selectCell(...(0,c.YD)(t,(t=>Math.max(t,0))),!1,!1)}selectAdjacent(){const t=this.hot.getSelectedLast(),e=this.getIndexOfLastAdjacentFilledInRow(t);return-1!==e&&void 0!==e&&(this.addSelectionFromStartAreaToSpecificRowIndex(t,e),!0)}resetSelectionOfDraggedArea(){this.handleDraggedCells=0,this.hot.selection.highlight.getFill().clear()}redrawBorders(t){this.hot.selection.highlight.getFill().clear().add(this.hot.getSelectedRangeLast().from).add(this.hot.getSelectedRangeLast().to).add(t).commit(),this.hot.view.render()}getIfMouseWasDraggedOutside(t){const{documentElement:e}=this.hot.rootDocument,o=(0,i.cY)(this.hot.table).top-(this.hot.rootWindow.pageYOffset||e.scrollTop)+(0,i.DK)(this.hot.table),n=(0,i.cY)(this.hot.table).left-(this.hot.rootWindow.pageXOffset||e.scrollLeft)+(0,i.Gq)(this.hot.table);return t.clientY>o&&t.clientX<=n}registerEvents(){const{documentElement:t}=this.hot.rootDocument;this.eventManager.addEventListener(t,"mouseup",(()=>He(ke,this,De).call(this))),this.eventManager.addEventListener(t,"mousemove",(t=>He(ke,this,Ve).call(this,t)))}clearMappedSettings(){this.directions.length=0,this.autoInsertRow=!1}mapSettings(){const t=function(t){const e={};return!0===t?(e.directions=Object.keys(Me),e.autoInsertRow=!0):(0,s.Gv)(t)?((0,d.O9)(t.autoInsertRow)?t.direction===Me.horizontal?e.autoInsertRow=!1:e.autoInsertRow=t.autoInsertRow:e.autoInsertRow=!1,(0,d.O9)(t.direction)?e.directions=[t.direction]:e.directions=Object.keys(Me)):"string"==typeof t?(e.directions=[t],e.autoInsertRow=!0):(e.directions=[],e.autoInsertRow=!1),e}(this.hot.getSettings().fillHandle);this.directions=t.directions,this.autoInsertRow=t.autoInsertRow}destroy(){super.destroy()}}function Ne(){this.selectAdjacent()&&this.fillIn()}function Pe(){this.handleDraggedCells=1,this.mouseDownOnCellCorner=!0}function Le(t){this.mouseDownOnCellCorner&&!this.hot.view.isMouseDown()&&this.handleDraggedCells&&(this.handleDraggedCells+=1,this.showBorder(t),this.addNewRowIfNeeded())}function De(){this.handleDraggedCells&&(this.handleDraggedCells>1&&this.fillIn(),this.handleDraggedCells=0,this.mouseDownOnCellCorner=!1)}function Ve(t){const e=this.getIfMouseWasDraggedOutside(t);!1===this.addingStarted&&this.handleDraggedCells>0&&e?(this.mouseDragOutside=!0,this.addingStarted=!0):this.mouseDragOutside=!1,this.mouseDragOutside&&this.autoInsertRow&&this.addRow()}function Fe(t,e,o){Be(t,e),e.set(t,o)}function Be(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function We(t,e,o){return(e=function(t){var e=function(t){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var o=e.call(t,"string");if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[e]=o,t}function ze(t,e,o){return t.set(Ue(t,e),o),o}function je(t,e){return t.get(Ue(t,e))}function Ue(t,e,o){if("function"==typeof t?t===e:t.has(e))return arguments.length<3?e:o;throw new TypeError("Private element is not present on this object")}const $e="autoRowSize";var Ge=new WeakMap,Ye=new WeakMap,Xe=new WeakSet;class qe extends Kt{static get PLUGIN_KEY(){return $e}static get PLUGIN_PRIORITY(){return 40}static get SETTING_KEYS(){return!0}static get DEFAULT_SETTINGS(){return{useHeaders:!0,samplingRatio:null,allowSampleDuplicates:!1}}static get CALCULATION_STEP(){return 50}static get SYNC_CALCULATION_LIMIT(){return 500}constructor(t){var e;super(t),Be(this,e=Xe),e.add(this),We(this,"headerHeight",null),We(this,"ghostTable",new te(this.hot)),We(this,"samplesGenerator",new ne(((t,e)=>{const o=this.hot.toPhysicalRow(t),n=this.hot.toPhysicalColumn(e);if(this.hot.rowIndexMapper.isHidden(o)||this.hot.columnIndexMapper.isHidden(n))return!1;if(t>=0&&e>=0&&this.hot.getCellMeta(t,e).hidden)return!1;let i;return t>=0?i=this.hot.getDataAtCell(t,e):-1===t&&(i=this.hot.getColHeader(e)),{value:i}}))),We(this,"inProgress",!1),We(this,"measuredRows",0),We(this,"rowHeightsMap",new re._),Fe(this,Ge,[]),Fe(this,Ye,!1),this.hot.rowIndexMapper.registerMap("autoRowSize",this.rowHeightsMap),this.addHook("beforeRowResize",((t,e,o)=>Ue(Xe,this,Je).call(this,t,e,o)))}isEnabled(){const t=this.hot.getSettings()[$e];return!0===t||(0,s.Gv)(t)}enablePlugin(){var t=this;if(this.enabled)return;this.samplesGenerator.setAllowDuplicates(this.getSetting("allowSampleDuplicates"));const e=this.getSetting("samplingRatio");e&&!isNaN(e)&&this.samplesGenerator.setSampleCount(parseInt(e,10)),this.addHook("afterLoadData",(function(){for(var e=arguments.length,o=new Array(e),n=0;n<e;n++)o[n]=arguments[n];return Ue(Xe,t,Ze).call(t,...o)})),this.addHook("beforeChangeRender",(function(){for(var e=arguments.length,o=new Array(e),n=0;n<e;n++)o[n]=arguments[n];return Ue(Xe,t,to).call(t,...o)})),this.addHook("beforeColumnResize",(()=>this.recalculateAllRowsHeight())),this.addHook("afterFormulasValuesUpdate",(function(){for(var e=arguments.length,o=new Array(e),n=0;n<e;n++)o[n]=arguments[n];return Ue(Xe,t,oo).call(t,...o)})),this.addHook("beforeRender",(()=>Ue(Xe,this,Qe).call(this))),this.addHook("modifyRowHeight",((t,e)=>this.getRowHeight(e,t))),this.addHook("init",(()=>Ue(Xe,this,eo).call(this))),this.addHook("modifyColumnHeaderHeight",(()=>this.getColumnHeaderHeight())),super.enablePlugin()}disablePlugin(){this.headerHeight=null,super.disablePlugin(),this.addHook("beforeRowResize",((t,e,o)=>Ue(Xe,this,Je).call(this,t,e,o)))}calculateVisibleRowsHeight(){if(!this.hot.countCols())return;const t=this.getFirstVisibleRow(),e=this.getLastVisibleRow();if(-1===t||-1===e)return;const o=this.hot.forceFullRender;this.calculateRowsHeight({from:t,to:e},void 0,o)}calculateRowsHeight(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{from:0,to:this.hot.countRows()-1},e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{from:0,to:this.hot.countCols()-1},o=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const n="number"==typeof t?{from:t,to:t}:t,i="number"==typeof e?{from:e,to:e}:e;if(null!==this.hot.getColHeader(0)){const t=this.samplesGenerator.generateRowSamples(-1,i);this.ghostTable.addColumnHeadersRow(t.get(-1))}(0,ut.Ti)(n.from,n.to,(t=>{let e=this.hot.toPhysicalRow(t);null===e&&(e=t),(o||null===this.rowHeightsMap.getValueAtIndex(e))&&this.samplesGenerator.generateRowSamples(t,i).forEach(((t,e)=>this.ghostTable.addRow(e,t)))})),this.ghostTable.rows.length&&(this.hot.batchExecution((()=>{this.ghostTable.getHeights(((t,e)=>{t<0?this.headerHeight=e:this.rowHeightsMap.setValueAtIndex(this.hot.toPhysicalRow(t),e)}))}),!0),this.measuredRows=n.to+1,this.ghostTable.clean())}calculateAllRowsHeight(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{from:0,to:this.hot.countCols()-1},e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],o=0;const n=this.hot.countRows()-1;let i=null;this.inProgress=!0;const r=()=>{if(!this.hot)return(0,Jt.uU)(i),void(this.inProgress=!1);this.calculateRowsHeight({from:o,to:Math.min(o+qe.CALCULATION_STEP,n)},t,e),o=o+qe.CALCULATION_STEP+1,o<n?i=(0,Jt.xi)(r):((0,Jt.uU)(i),this.inProgress=!1,this.hot.view.adjustElementsSize())},s=this.getSyncCalculationLimit();s>=0&&(this.calculateRowsHeight({from:0,to:s},t,e),o=s+1),o<n?r():(this.inProgress=!1,this.hot.view.adjustElementsSize())}recalculateAllRowsHeight(){this.hot.view.isVisible()&&this.calculateAllRowsHeight({from:0,to:this.hot.countCols()-1},!0)}getSyncCalculationLimit(){const t=this.hot.getSettings()[$e];let e=qe.SYNC_CALCULATION_LIMIT;const o=this.hot.countRows()-1;return(0,s.Gv)(t)&&(e=t.syncLimit,(0,u.Pi)(e)?e=(0,ut.B5)(o,e):e>>=0),Math.min(e,o)}getRowHeight(t,e){const o=t<0?this.headerHeight:this.rowHeightsMap.getValueAtIndex(this.hot.toPhysicalRow(t));let n=e;return null!==o&&o>(e||0)&&(n=o),n}getColumnHeaderHeight(){return this.headerHeight}getFirstVisibleRow(){var t;return null!==(t=this.hot.getFirstRenderedVisibleRow())&&void 0!==t?t:-1}getLastVisibleRow(){var t;return null!==(t=this.hot.getLastRenderedVisibleRow())&&void 0!==t?t:-1}clearCache(t){this.headerHeight=null,Array.isArray(t)?this.hot.batchExecution((()=>{t.forEach((t=>{this.rowHeightsMap.setValueAtIndex(t,null)}))}),!0):this.rowHeightsMap.clear()}clearCacheByRange(t){const{from:e,to:o}="number"==typeof t?{from:t,to:t}:t;this.hot.batchExecution((()=>{(0,ut.Ti)(Math.min(e,o),Math.max(e,o),(t=>{this.rowHeightsMap.setValueAtIndex(t,null)}))}),!0)}isNeedRecalculate(){return!!this.rowHeightsMap.getValues().slice(0,this.measuredRows).filter((t=>null===t)).length}destroy(){this.ghostTable.clean(),super.destroy()}}function Ke(t){const e={from:0,to:this.hot.countCols()-1};t.forEach((t=>{this.samplesGenerator.generateRowSamples(t,e).forEach(((t,e)=>this.ghostTable.addRow(e,t)))})),this.ghostTable.rows.length&&(this.hot.batchExecution((()=>{this.ghostTable.getHeights(((t,e)=>{const o=this.hot.toPhysicalRow(t);this.rowHeightsMap.setValueAtIndex(o,e)}))}),!0),this.ghostTable.clean())}function Qe(){this.calculateVisibleRowsHeight(),this.inProgress||(Ue(Xe,this,Ke).call(this,je(Ge,this)),ze(Ge,this,[]))}function Je(t,e,o){let n=t;return o&&(this.calculateRowsHeight(e,void 0,!0),n=this.getRowHeight(e)),n}function Ze(t,e){e||this.recalculateAllRowsHeight()}function to(t){const e=t.reduce(((t,e)=>{let[o]=e;return-1===t.indexOf(o)&&t.push(o),t}),[]);je(Ge,this).push(...e)}function eo(){this.recalculateAllRowsHeight(),ze(Ye,this,!0)}function oo(t){if(!je(Ye,this))return;const e=t.reduce(((t,e)=>{var o;const n=null===(o=e.address)||void 0===o?void 0:o.row;if(Number.isInteger(n)){const e=this.hot.toVisualRow(n);-1===t.indexOf(e)&&t.push(e)}return t}),[]);je(Ge,this).push(...e)}var no=o(8046),io=o(7792);const ro=new Map([["indexesSequence",{getListWithInsertedItems:no.N,getListWithRemovedItems:no.H}],["physicallyIndexed",{getListWithInsertedItems:io.N,getListWithRemovedItems:io.H}]]),so=t=>{if(!1===ro.has(t))throw new Error(`Alter strategy with ID '${t}' does not exist.`);return ro.get(t)};var lo=o(1895),ao=o(3317);const{getListWithInsertedItems:ho,getListWithRemovedItems:co}=so("physicallyIndexed");class uo extends lo.n{constructor(){super((t=>t))}insert(t,e){const o=(0,ao.z)(this.indexedValues,e);this.indexedValues=ho(o,t,e,this.initValueOrFn),super.insert(t,e)}remove(t){const e=co(this.indexedValues,t);this.indexedValues=(0,ao.v)(e,t),super.remove(t)}}const go=uo,{getListWithInsertedItems:fo,getListWithRemovedItems:po}=so("physicallyIndexed");class mo extends lo.n{constructor(){super((t=>t))}insert(t,e){this.indexedValues=fo(this.indexedValues,t,e,((t,e)=>this.getNextValue(e))),super.insert(t,e)}remove(t){this.indexedValues=po(this.indexedValues,t),super.remove(t)}getNextValue(t){return Math.max(...this.getValues())+1+t}}const wo="bindRowsWithHeaders",bo=new Map([["loose",go],["strict",mo]]);var vo=new WeakSet;class yo extends Kt{constructor(){var t,e;super(...arguments),function(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}(t=this,e=vo),e.add(t),function(t,e,o){(e=function(t){var e=function(t){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var o=e.call(t,"string");if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[e]=o}(this,"headerIndexes",null)}static get PLUGIN_KEY(){return wo}static get PLUGIN_PRIORITY(){return 210}isEnabled(){return!!this.hot.getSettings()[wo]}enablePlugin(){var t;if(this.enabled)return;const e=null!==(t=bo.get(this.getSetting()))&&void 0!==t?t:bo.get("loose");this.headerIndexes=this.hot.rowIndexMapper.registerMap("bindRowsWithHeaders",new e),this.addHook("modifyRowHeader",(t=>function(t,e,o){if("function"==typeof t?t===e:t.has(e))return arguments.length<3?e:o;throw new TypeError("Private element is not present on this object")}(vo,this,Co).call(this,t))),super.enablePlugin()}disablePlugin(){this.hot.rowIndexMapper.unregisterMap("bindRowsWithHeaders"),super.disablePlugin()}destroy(){super.destroy()}}function Co(t){return this.headerIndexes.getValueAtIndex(this.hot.toPhysicalRow(t))}var So=o(2617);function Ro(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Eo(t,e,o){return(e=function(t){var e=function(t){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var o=e.call(t,"string");if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[e]=o,t}function To(t,e){return t.get(Mo(t,e))}function xo(t,e,o){return t.set(Mo(t,e),o),o}function Mo(t,e,o){if("function"==typeof t?t===e:t.has(e))return arguments.length<3?e:o;throw new TypeError("Private element is not present on this object")}const Io="collapsibleColumns",Ho=["nestedHeaders"],Oo="collapsibleIndicator",Ao=Io,ko=new Map([["collapse",{hideColumn:!0,beforeHook:"beforeColumnCollapse",afterHook:"afterColumnCollapse"}],["expand",{hideColumn:!1,beforeHook:"beforeColumnExpand",afterHook:"afterColumnExpand"}]]);var _o=new WeakMap,No=new WeakSet;class Po extends Kt{constructor(){var t;super(...arguments),Ro(this,t=No),t.add(this),Eo(this,"nestedHeadersPlugin",null),Eo(this,"headerStateManager",null),function(t,e){Ro(t,e),e.set(t,null)}(this,_o)}static get PLUGIN_KEY(){return Io}static get PLUGIN_PRIORITY(){return 290}static get PLUGIN_DEPS(){return["plugin:NestedHeaders"]}static get SETTING_KEYS(){return[Io,...Ho]}isEnabled(){return!!this.hot.getSettings()[Io]}enablePlugin(){var t=this;if(this.enabled)return;const{nestedHeaders:e}=this.hot.getSettings();e||(0,So.R8)("You need to configure the Nested Headers plugin in order to use collapsible headers."),xo(_o,this,this.hot.columnIndexMapper.createAndRegisterIndexMap(this.pluginName,"hiding")),this.nestedHeadersPlugin=this.hot.getPlugin("nestedHeaders"),this.headerStateManager=this.nestedHeadersPlugin.getStateManager(),this.addHook("init",(()=>Mo(No,this,Vo).call(this))),this.addHook("afterLoadData",(function(){for(var e=arguments.length,o=new Array(e),n=0;n<e;n++)o[n]=arguments[n];return Mo(No,t,Fo).call(t,...o)})),this.addHook("afterGetColHeader",(function(){for(var e=arguments.length,o=new Array(e),n=0;n<e;n++)o[n]=arguments[n];return Mo(No,t,Lo).call(t,...o)})),this.addHook("beforeOnCellMouseDown",((t,e,o)=>Mo(No,this,Do).call(this,t,e,o))),this.registerShortcuts(),super.enablePlugin(),this.updatePlugin()}updatePlugin(){if(this.hot.view){if(!this.nestedHeadersPlugin.detectedOverlappedHeaders){const{collapsibleColumns:t}=this.hot.getSettings();"boolean"==typeof t?this.headerStateManager.mapState((t=>({collapsible:t.origColspan>1}))):Array.isArray(t)&&(this.headerStateManager.mapState((()=>({collapsible:!1}))),this.headerStateManager.mergeStateWith(t))}super.updatePlugin()}}disablePlugin(){this.hot.columnIndexMapper.unregisterMap(this.pluginName),xo(_o,this,null),this.nestedHeadersPlugin=null,this.unregisterShortcuts(),this.clearButtons(),super.disablePlugin()}registerShortcuts(){this.hot.getShortcutManager().getContext("grid").addShortcut({keys:[["Enter"]],callback:()=>{var t;const{row:e,col:o}=this.hot.getSelectedRangeLast().highlight,{collapsible:n,isCollapsed:i,columnIndex:r}=null!==(t=this.headerStateManager.getHeaderTreeNodeData(e,o))&&void 0!==t?t:{};if(n)return i?this.expandSection({row:e,col:r}):this.collapseSection({row:e,col:r}),!1},runOnlyIf:()=>{var t,e;return(null===(t=this.hot.getSelectedRangeLast())||void 0===t?void 0:t.isSingle())&&(null===(e=this.hot.getSelectedRangeLast())||void 0===e?void 0:e.highlight.isHeader())},group:Ao,relativeToGroup:l.b,position:"before"})}unregisterShortcuts(){this.hot.getShortcutManager().getContext("grid").removeShortcutsByGroup(Ao)}clearButtons(){if(!this.hot.view)return;const t=this.hot.view._wt.getSetting("columnHeaders").length,e=this.hot.view._wt.wtTable.THEAD,o=this.hot.view._wt.wtOverlays.topOverlay.clone.wtTable.THEAD,n=this.hot.view._wt.wtOverlays.topInlineStartCornerOverlay?this.hot.view._wt.wtOverlays.topInlineStartCornerOverlay.clone.wtTable.THEAD:null,i=function(t){t&&t.parentNode.removeChild(t)};(0,ut.Ti)(0,t-1,(t=>{const r=e.childNodes[t],s=o.childNodes[t],l=n?n.childNodes[t]:null;(0,ut.Ti)(0,r.childNodes.length-1,(t=>{let e=r.childNodes[t].querySelector(`.${Oo}`);i(e),s&&s.childNodes[t]&&(e=s.childNodes[t].querySelector(`.${Oo}`),i(e)),n&&l&&l.childNodes[t]&&(e=l.childNodes[t].querySelector(`.${Oo}`),i(e))}))}),!0)}expandSection(t){this.toggleCollapsibleSection([t],"expand")}collapseSection(t){this.toggleCollapsibleSection([t],"collapse")}toggleAllCollapsibleSections(t){const e=this.headerStateManager.mapNodes((e=>{const{collapsible:o,origColspan:n,headerLevel:i,columnIndex:r,isCollapsed:s}=e;if(!0===o&&n>1&&(s&&"expand"===t||!s&&"collapse"===t))return{row:this.headerStateManager.levelToRowCoords(i),col:r}}));this.toggleCollapsibleSection(e,t)}collapseAll(){this.toggleAllCollapsibleSections("collapse")}expandAll(){this.toggleAllCollapsibleSections("expand")}toggleCollapsibleSection(t,e){if(!ko.has(e))throw new Error(`Unsupported action is passed (${e}).`);if(!Array.isArray(t))return;const o=(0,c.y0)(t,(t=>{let{row:e}=t;return e<0}));let n=o.length>0;(0,c.z0)(o,(t=>{var o;let{row:i,col:r}=t;const{collapsible:s,isCollapsed:l}=null!==(o=this.headerStateManager.getHeaderSettings(i,r))&&void 0!==o?o:{};if(!s||l&&"collapse"===e||!l&&"expand"===e)return n=!1,!1}));const i=[],r=[];n&&(0,c.z0)(o,(t=>{let{row:o,col:n}=t;const{colspanCompensation:s,affectedColumns:l,rollbackModification:a}=this.headerStateManager.triggerNodeModification(e,o,n);s>0&&(r.push(...l),i.push(a))}));const s=this.getCollapsedColumns();let l=[];"collapse"===e?l=(0,c.jF)([...s,...r]):"expand"===e&&(l=(0,c.y0)(s,(t=>!r.includes(t))));const a=ko.get(e);if(!1===this.hot.runHooks(a.beforeHook,s,l,n))return void(0,c.z0)(i,(t=>{t()}));this.hot.batchExecution((()=>{(0,c.z0)(r,(t=>{To(_o,this).setValueAtIndex(this.hot.toPhysicalColumn(t),a.hideColumn)}))}),!0);const h=this.getCollapsedColumns().length!==s.length,d=this.hot.getSelectedRangeLast();if("collapse"===e&&h&&d){const{row:t,col:e}=d.highlight;if((this.hot.rowIndexMapper.isHidden(t)||this.hot.columnIndexMapper.isHidden(e))&&r.includes(e)){const o=t>=0?this.hot.rowIndexMapper.getNearestNotHiddenIndex(t,1,!0):t,n=e>=0?this.hot.columnIndexMapper.getNearestNotHiddenIndex(e,1,!0):e;null!==o&&null!==n&&this.hot.selectCell(o,n)}}this.hot.runHooks(a.afterHook,s,l,n,h),this.hot.render(),this.hot.view.adjustElementsSize()}getCollapsedColumns(){return To(_o,this).getHiddenIndexes()}destroy(){xo(_o,this,null),super.destroy()}}function Lo(t,e,o){var n;const{collapsible:r,origColspan:s,isCollapsed:l}=null!==(n=this.headerStateManager.getHeaderSettings(o,t))&&void 0!==n?n:{},a=r&&s>1&&t>=this.hot.getSettings().fixedColumnsStart,h=this.hot.getSettings().ariaTags;let c=e.querySelector(`.${Oo}`);var d;(0,i.De)(e,[(0,p.dV)("")[0]]),a?(c||(c=this.hot.rootDocument.createElement("div"),(0,i.iQ)(c,Oo),e.querySelector("div:first-child").appendChild(c)),(0,i.vy)(c,["collapsed","expanded"]),l?((0,i.iQ)(c,"collapsed"),(0,i.c6)(c,"+"),h&&(0,i.Bq)(e,...(0,p.dV)(!1))):((0,i.iQ)(c,"expanded"),(0,i.c6)(c,"-"),h&&(0,i.Bq)(e,...(0,p.dV)(!0))),h&&(0,i.Bq)(c,...(0,p.MG)())):null===(d=c)||void 0===d||d.remove()}function Do(t,e){(0,i.nB)(t.target,Oo)&&((0,i.nB)(t.target,"expanded")?(this.eventManager.fireEvent(t.target,"mouseup"),this.toggleCollapsibleSection([e],"collapse")):(0,i.nB)(t.target,"collapsed")&&(this.eventManager.fireEvent(t.target,"mouseup"),this.toggleCollapsibleSection([e],"expand")),(0,r.CA)(t))}function Vo(){this.updatePlugin()}function Fo(t,e){e||this.updatePlugin()}var Bo=o(5408),Wo=o(1803);function zo(t,e,o){return(e=function(t){var e=function(t){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var o=e.call(t,"string");if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[e]=o,t}const jo=["sortEmptyCells","indicator","headerAction","compareFunctionFactory"];class Uo{constructor(t,e){zo(this,"hot",void 0),zo(this,"sortingStates",new Wo.z),zo(this,"sortEmptyCells",!1),zo(this,"indicator",!0),zo(this,"headerAction",!0),zo(this,"compareFunctionFactory",void 0),zo(this,"mapName",void 0),this.hot=t,this.mapName=e,this.hot.columnIndexMapper.registerMap(e,this.sortingStates)}updateAllColumnsProperties(t){(0,s.Gv)(t)&&(0,s.v4)(t,((t,e)=>{jo.includes(e)&&(this[e]=t)}))}getAllColumnsProperties(){const t={sortEmptyCells:this.sortEmptyCells,indicator:this.indicator,headerAction:this.headerAction};return"function"==typeof this.compareFunctionFactory&&(t.compareFunctionFactory=this.compareFunctionFactory),t}getSortOrderOfColumn(t){var e;return null===(e=this.sortingStates.getValueAtIndex(this.hot.toPhysicalColumn(t)))||void 0===e?void 0:e.sortOrder}getIndexOfColumnInSortQueue(t){return t=this.hot.toPhysicalColumn(t),this.sortingStates.getEntries().findIndex((e=>{let[o]=e;return o===t}))}getNumberOfSortedColumns(){return this.sortingStates.getLength()}isListOfSortedColumnsEmpty(){return 0===this.getNumberOfSortedColumns()}isColumnSorted(t){return(0,s.Gv)(this.sortingStates.getValueAtIndex(this.hot.toPhysicalColumn(t)))}getSortStates(){return null===this.sortingStates?[]:this.sortingStates.getEntries().map((t=>{let[e,o]=t;return{column:this.hot.toVisualColumn(e),...o}}))}getColumnSortState(t){const e=this.getSortOrderOfColumn(t);if((0,d.O9)(e))return{column:t,sortOrder:e}}setSortStates(t){this.sortingStates.clear();for(let e=0;e<t.length;e+=1)this.sortingStates.setValueAtIndex(this.hot.toPhysicalColumn(t[e].column),{sortOrder:t[e].sortOrder})}destroy(){this.hot.columnIndexMapper.unregisterMap(this.mapName),this.sortingStates=null}}function $o(t,e,o){const n=e.locale;return function(e,i){const{sortEmptyCells:r}=o;return"string"==typeof e&&(e=e.toLocaleLowerCase(n)),"string"==typeof i&&(i=i.toLocaleLowerCase(n)),e===i?tn:(0,d.Im)(e)?(0,d.Im)(i)?tn:r&&"asc"===t?en:on:(0,d.Im)(i)?r&&"asc"===t?on:en:isNaN(e)&&!isNaN(i)?"asc"===t?on:en:!isNaN(e)&&isNaN(i)?"asc"===t?en:on:(isNaN(e)||isNaN(i)||(e=parseFloat(e),i=parseFloat(i)),e<i?"asc"===t?en:on:e>i?"asc"===t?on:en:tn)}}o(7642),o(8004),o(3853),o(5876),o(2475),o(5024),o(1698),o(7550);const Go="default";var Yo=o(4647);const{register:Xo,getItem:qo,hasItem:Ko}=(0,Yo.A)("sorting.compareFunctionFactory"),{register:Qo,getItem:Jo}=(0,Yo.A)("sorting.mainSortComparator");function Zo(t){return Ko(t)?qo(t):qo(Go)}Xo("checkbox",(function(t,e,o){const n=e.checkedTemplate,i=e.uncheckedTemplate,{sortEmptyCells:r}=o;return function(s,l){const a=(0,d.Im)(s),h=(0,d.Im)(l),c=a?i:s,u=h?i:l,g=c===i||c===n,f=u===i||u===n;if(!1===r){if(a&&!1===h)return on;if(!1===a&&h)return en}return!1===g&&f?"asc"===t?en:on:g&&!1===f?"asc"===t?on:en:!1===g&&!1===f?$o(t,e,o)(s,l):c===i&&u===n?"asc"===t?en:on:c===n&&u===i?"asc"===t?on:en:tn}})),Xo("date",(function(t,e,o){return un(t,e.dateFormat,o)})),Xo(Go,$o),Xo("numeric",(function(t,e,o){return function(e,n){const i=parseFloat(e),r=parseFloat(n),{sortEmptyCells:s}=o;if(i===r||isNaN(i)&&isNaN(r))return tn;if(s){if((0,d.Im)(e))return"asc"===t?en:on;if((0,d.Im)(n))return"asc"===t?on:en}return isNaN(i)?on:isNaN(r)?en:i<r?"asc"===t?en:on:i>r?"asc"===t?on:en:tn}})),Xo("time",(function(t,e,o){return un(t,e.timeFormat,o)}));const tn=0,en=-1,on=1;var nn=o(5975);const rn="asc",sn="desc",ln="colHeader";function an(t){if(t!==sn)return t===rn?sn:rn}function hn(t){return t.querySelector(`.${ln}`)}function cn(t,e){if(t<0||!e.parentNode)return!1;const o=e.parentNode.parentNode.childNodes;return-1===Array.from(o).indexOf(e.parentNode)-o.length}function dn(t,e,o){return-1===t&&e>=0&&!1===(0,r.nO)(o)}function un(t,e,o){return function(n,i){const{sortEmptyCells:r}=o;if(n===i)return tn;if((0,d.Im)(n))return(0,d.Im)(i)?tn:r&&"asc"===t?en:on;if((0,d.Im)(i))return r&&"asc"===t?on:en;const s=H(n,e),l=H(i,e);return s.isValid()?l.isValid()?l.isAfter(s)?"asc"===t?en:on:l.isBefore(s)?"asc"===t?on:en:tn:en:on}}const gn="indicatorDisabled",fn="columnSorting",pn="sortAction",mn=new Map([[rn,"ascending"],[sn,"descending"]]);function wn(t,e,o){return(e=function(t){var e=function(t){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var o=e.call(t,"string");if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[e]=o,t}function bn(t,e,o){if("function"==typeof t?t===e:t.has(e))return arguments.length<3?e:o;throw new TypeError("Private element is not present on this object")}const vn="columnSorting",yn="append",Cn=vn;Qo(vn,(function(t,e){return function(o,n){const[,...i]=o,[,...r]=n;return function(){const o=t[0],n=e[0],s=i[0],l=r[0],a=n.columnSorting;return(a.compareFunctionFactory?a.compareFunctionFactory:Zo(n.type))(o,n,a)(s,l)}()}})),Z.R.getSingleton().register("beforeColumnSort"),Z.R.getSingleton().register("afterColumnSort");const Sn=new WeakMap;var Rn=new WeakSet;class En extends Kt{constructor(){var t,e;super(...arguments),function(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}(t=this,e=Rn),e.add(t),wn(this,"columnStatesManager",null),wn(this,"columnMetaCache",null),wn(this,"pluginKey",vn),wn(this,"indexesSequenceCache",null)}static get PLUGIN_KEY(){return vn}static get PLUGIN_PRIORITY(){return 50}isEnabled(){return!!this.hot.getSettings()[this.pluginKey]}enablePlugin(){var t,e,o=this;if(Sn.has(this.hot)&&Sn.get(this.hot)!==this.pluginKey)return this.hot.updateSettings({[this.pluginKey]:!1}),t=Sn.get(this.hot),e=this.pluginKey,void(0,So.R8)(nn.O`Plugins \`columnSorting\` and \`multiColumnSorting\` should not be enabled simultaneously.\x20
- Only \`${t}\` will work. The \`${e}\` plugin will remain disabled.`);this.enabled||(Sn.set(this.hot,this.pluginKey),this.columnStatesManager=new Uo(this.hot,`${this.pluginKey}.sortingStates`),this.columnMetaCache=new re._((t=>{let e=this.hot.toVisualColumn(t);return null===e&&(e=t),this.getMergedPluginSettings(e)})),this.hot.columnIndexMapper.registerMap(`${this.pluginKey}.columnMeta`,this.columnMetaCache),this.addHook("afterGetColHeader",((t,e)=>bn(Rn,this,xn).call(this,t,e))),this.addHook("beforeOnCellMouseDown",(function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return bn(Rn,o,In).call(o,...e)})),this.addHook("afterOnCellMouseDown",((t,e)=>this.onAfterOnCellMouseDown(t,e))),this.addHook("afterInit",(()=>bn(Rn,this,Tn).call(this))),this.addHook("afterLoadData",(function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return bn(Rn,o,Mn).call(o,...e)})),this.hot.view&&bn(Rn,this,Tn).call(this),this.registerShortcuts(),super.enablePlugin())}disablePlugin(){const t=(t,e)=>{const o=hn(e);!1!==cn(t,e)&&null!==o&&this.updateHeaderClasses(o)};Sn.delete(this.hot),this.hot.addHook("afterGetColHeader",t),this.hot.addHookOnce("afterViewRender",(()=>{this.hot.removeHook("afterGetColHeader",t)})),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:t}=this.hot.getSelectedRangeLast();return this.sort(this.getColumnNextConfig(t.col)),!1},runOnlyIf:()=>{var t,e;const o=null===(t=this.hot.getSelectedRangeLast())||void 0===t?void 0:t.highlight;return o&&(null===(e=this.hot.getSelectedRangeLast())||void 0===e?void 0:e.isSingle())&&this.hot.selection.isCellVisible(o)&&-1===o.row&&o.col>=0},relativeToGroup:l.b,position:"before",group:Cn})}unregisterShortcuts(){this.hot.getShortcutManager().getContext("grid").removeShortcutsByGroup(Cn)}sort(t){const e=this.getSortConfig(),o=this.getNormalizedSortConfigs(t),n=this.areValidSortConfigs(o);!1!==this.hot.runHooks("beforeColumnSort",e,o,n)&&(0===e.length&&null===this.indexesSequenceCache&&(this.indexesSequenceCache=this.hot.rowIndexMapper.registerMap(this.pluginKey,new Bo.K),this.indexesSequenceCache.setValues(this.hot.rowIndexMapper.getIndexesSequence())),n&&(this.columnStatesManager.setSortStates(o),this.sortByPresetSortStates(o),this.saveAllSortSettings(o)),this.hot.runHooks("afterColumnSort",e,n?o:e,n),n&&this.hot.render())}clearSort(){this.sort([])}isSorted(){return this.enabled&&!this.columnStatesManager.isListOfSortedColumnsEmpty()}getSortConfig(t){return(0,d.O9)(t)?this.columnStatesManager.getColumnSortState(t):this.columnStatesManager.getSortStates()}setSortConfig(t){const e=this.getNormalizedSortConfigs(t);this.areValidSortConfigs(e)&&this.columnStatesManager.setSortStates(e)}getNormalizedSortConfigs(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return Array.isArray(t)?t.slice(0,1):[t]}areValidSortConfigs(t){const e=this.hot.countCols();return function(t){if(t.some((t=>!1===function(t){if(!1===(0,s.Gv)(t))return!1;const{column:e,sortOrder:o}=t;return Number.isInteger(e)&&[rn,sn].includes(o)}(t))))return!1;const e=t.map((t=>{let{column:e}=t;return e}));return new Set(e).size===e.length}(t)&&t.every((t=>{let{column:o}=t;return o<=e&&o>=0}))}saveAllSortSettings(t){const e=this.columnStatesManager.getAllColumnsProperties();e.initialConfig=(0,c.YD)(t,(t=>{let{column:e,...o}=t;return{column:this.hot.toPhysicalColumn(e),...o}})),this.hot.runHooks("persistentStateSave","columnSorting",e)}getAllSavedSortSettings(){const t={};this.hot.runHooks("persistentStateLoad","columnSorting",t);const e=t.value;return(0,d.O9)(e)&&Array.isArray(e.initialConfig)&&(e.initialConfig=(0,c.YD)(e.initialConfig,(t=>{let{column:e,...o}=t;return{column:this.hot.toVisualColumn(e),...o}}))),e}getColumnNextConfig(t){const e=this.columnStatesManager.getSortOrderOfColumn(t);if((0,d.O9)(e)){const o=an(e);return(0,d.O9)(o)?{column:t,sortOrder:o}:void 0}const o=this.hot.countCols();if(Number.isInteger(t)&&t>=0&&t<o)return{column:t,sortOrder:an()}}getNextSortConfig(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:yn;const o=this.columnStatesManager.getIndexOfColumnInSortQueue(t),n=-1!==o,i=this.getSortConfig(),r=this.getColumnNextConfig(t);if(n){if((0,d.b0)(r))return[...i.slice(0,o),...i.slice(o+1)];if(e===yn)return[...i.slice(0,o),...i.slice(o+1),r];if("replace"===e)return[...i.slice(0,o),r,...i.slice(o+1)]}return(0,d.O9)(r)?i.concat(r):i}getPluginColumnConfig(t){if((0,s.Gv)(t)){const e=t[this.pluginKey];if((0,s.Gv)(e))return e}return{}}getMergedPluginSettings(t){const e=this.hot.getSettings()[this.pluginKey],o=this.columnStatesManager.getAllColumnsProperties(),n=this.hot.getCellMeta(0,t),i=Object.getPrototypeOf(n);return Array.isArray(i.columns)?Object.assign(o,e,this.getPluginColumnConfig(i.columns[t])):(0,m.Tn)(i.columns)?Object.assign(o,e,this.getPluginColumnConfig(i.columns(t))):Object.assign(o,e)}getFirstCellSettings(t){const e=this.hot.getCellMeta(0,t),o=Object.create(e);return o[this.pluginKey]=this.columnMetaCache.getValueAtIndex(this.hot.toPhysicalColumn(t)),o}getNumberOfRowsToSort(t){const e=this.hot.getSettings();return e.maxRows<=t?e.maxRows:t-e.minSpareRows}sortByPresetSortStates(t){if(this.hot.rowIndexMapper.setIndexesSequence(this.indexesSequenceCache.getValues()),0===t.length)return;const e=[],o=this.hot.countRows(),n=e=>(0,c.YD)(t,(t=>this.hot.getDataAtCell(e,t.column)));for(let t=0;t<this.getNumberOfRowsToSort(o);t+=1)e.push([this.hot.toPhysicalRow(t)].concat(n(t)));const i=(0,c.YD)(e,(t=>t[0]));!function(t,e){const o=Jo(e);for(var n=arguments.length,i=new Array(n>2?n-2:0),r=2;r<n;r++)i[r-2]=arguments[r];t.sort(o(...i))}(e,this.pluginKey,(0,c.YD)(t,(t=>t.sortOrder)),(0,c.YD)(t,(t=>this.getFirstCellSettings(t.column))));for(let t=e.length;t<o;t+=1)e.push([t].concat(n(t)));const r=(0,c.YD)(e,(t=>t[0])),s=new Map((0,c.YD)(i,((t,e)=>[t,r[e]]))),l=(0,c.YD)(this.hot.rowIndexMapper.getIndexesSequence(),(t=>s.has(t)?s.get(t):t));this.hot.rowIndexMapper.setIndexesSequence(l)}sortBySettings(t){if((0,s.Gv)(t)){this.columnStatesManager.updateAllColumnsProperties(t);const e=t.initialConfig;(Array.isArray(e)||(0,s.Gv)(e))&&this.sort(e)}else this.hot.render()}updateHeaderClasses(t){if((0,i.vy)(t,Array.from(mn.values()).concat(pn,gn,fn)),!1!==this.enabled){for(var e=arguments.length,o=new Array(e>1?e-1:0),n=1;n<e;n++)o[n-1]=arguments[n];(0,i.iQ)(t,function(t,e,o,n){const i=[fn];if(n&&i.push(pn),!1===o)return i.push(gn),i;const r=t.getSortOrderOfColumn(e);return(0,d.O9)(r)&&i.push(mn.get(r)),i}(...o))}}onUpdateSettings(t){super.onUpdateSettings(t),null!==this.columnMetaCache&&this.columnMetaCache.init(this.hot.columnIndexMapper.getNumberOfIndexes()),(0,d.O9)(t[this.pluginKey])&&this.sortBySettings(t[this.pluginKey])}wasClickableHeaderClicked(t,e){return this.getFirstCellSettings(e)[this.pluginKey].headerAction&&(0,i.nB)(t.target,ln)}onAfterOnCellMouseDown(t,e){if(!1!==dn(e.row,e.col,t)&&this.wasClickableHeaderClicked(t,e.col)){this.hot.getShortcutManager().isCtrlPressed()&&(this.hot.deselectCell(),this.hot.selectColumns(e.col));const t=this.hot.getActiveEditor(),o=this.getColumnNextConfig(e.col);null!=t&&t.isOpened()&&this.hot.getCellValidator(t.row,t.col)?this.hot.addHookOnce("postAfterValidate",(()=>{this.sort(o)})):this.sort(o)}}destroy(){var t;null===(t=this.columnStatesManager)||void 0===t||t.destroy(),super.destroy()}}function Tn(){const t=this.getAllSavedSortSettings();if((0,s.Gv)(t))this.sortBySettings(t);else{const t=this.hot.getSettings()[this.pluginKey];this.sortBySettings(t)}}function xn(t,e){const o=hn(e);if(!1===cn(t,e)||null===o)return;const n=this.getFirstCellSettings(t)[this.pluginKey],r=n.indicator,s=n.headerAction;if(this.updateHeaderClasses(o,this.columnStatesManager,t,r,s),this.hot.getSettings().ariaTags){const o=this.columnStatesManager.getSortOrderOfColumn(t);(0,i.Bq)(e,...(0,p._h)(o?`${o}ending`:"none"))}}function Mn(t){!0===t&&this.hot.view&&bn(Rn,this,Tn).call(this)}function In(t,e,o,n){!1!==dn(e.row,e.col,t)&&this.wasClickableHeaderClicked(t,e.col)&&this.hot.getShortcutManager().isCtrlPressed()&&(n.column=!0)}function Hn(t,e,o){return(e=function(t){var e=function(t){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var o=e.call(t,"string");if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[e]=o,t}const On=class{constructor(t,e){Hn(this,"plugin",void 0),Hn(this,"hot",void 0),Hn(this,"endpoints",[]),Hn(this,"settings",void 0),Hn(this,"settingsType","array"),Hn(this,"currentEndpoint",null),Hn(this,"cellsToSetCache",[]),this.plugin=t,this.hot=this.plugin.hot,this.settings=e}initEndpoints(){this.endpoints=this.parseSettings(),this.refreshAllEndpoints()}getEndpoint(t){return"function"===this.settingsType?this.fillMissingEndpointData(this.settings)[t]:this.endpoints[t]}getAllEndpoints(){return"function"===this.settingsType?this.fillMissingEndpointData(this.settings):this.endpoints}fillMissingEndpointData(t){return this.parseSettings(t.call(this))}parseSettings(t){const e=[];let o=t;if(o||"function"!=typeof this.settings)return o||(o=this.settings),(0,c.z0)(o,(t=>{const o={};this.assignSetting(t,o,"ranges",[[0,this.hot.countRows()-1]]),this.assignSetting(t,o,"reversedRowCoords",!1),this.assignSetting(t,o,"destinationRow",new Error("\n You must provide a destination row for the Column Summary plugin in order to work properly!\n ")),this.assignSetting(t,o,"destinationColumn",new Error("\n You must provide a destination column for the Column Summary plugin in order to work properly!\n ")),this.assignSetting(t,o,"sourceColumn",t.destinationColumn),this.assignSetting(t,o,"type","sum"),this.assignSetting(t,o,"forceNumeric",!1),this.assignSetting(t,o,"suppressDataTypeErrors",!0),this.assignSetting(t,o,"customFunction",null),this.assignSetting(t,o,"readOnly",!0),this.assignSetting(t,o,"roundFloat",!1),e.push(o)})),e;this.settingsType="function"}assignSetting(t,e,o,n){if("ranges"!==o||void 0!==t[o]){if("ranges"!==o||0!==t[o].length)if(void 0===t[o]){if(n instanceof Error)throw n;e[o]=n}else"destinationRow"===o&&e.reversedRowCoords?e[o]=this.hot.countRows()-t[o]-1:e[o]=t[o]}else e[o]=n}resetSetupBeforeStructureAlteration(t,e,o){if("function"!==this.settingsType)return;const n=t.indexOf("row")>-1?"row":"col",i=this.getAllEndpoints();(0,c.z0)(i,(i=>{"row"===n&&i.destinationRow>=e&&("insert_row"===t?i.alterRowOffset=o:"remove_row"===t&&(i.alterRowOffset=-1*o)),"col"===n&&i.destinationColumn>=e&&("insert_col"===t?i.alterColumnOffset=o:"remove_col"===t&&(i.alterColumnOffset=-1*o))})),this.resetAllEndpoints(i,!1)}resetSetupAfterStructureAlteration(t,e,o,n,i){let r=!(arguments.length>5&&void 0!==arguments[5])||arguments[5];if("function"===this.settingsType){const t=()=>(this.hot.removeHook("beforeViewRender",t),this.refreshAllEndpoints());return void this.hot.addHookOnce("beforeViewRender",t)}const s=t.indexOf("row")>-1?"row":"col",l=t.indexOf("remove")>-1?-1:1,a=this.getAllEndpoints(),h=0===t.indexOf("move_row"),d=e;(0,c.z0)(a,(t=>{"row"===s&&t.destinationRow>=d&&(t.alterRowOffset=l*o),"col"===s&&t.destinationColumn>=d&&(t.alterColumnOffset=l*o)})),this.resetAllEndpoints(a,!h),h?(0,c.z0)(a,(t=>{this.extendEndpointRanges(t,d,n[0],n.length),this.recreatePhysicalRanges(t),this.clearOffsetInformation(t)})):(0,c.z0)(a,(t=>{this.shiftEndpointCoordinates(t,d)})),r&&this.refreshAllEndpoints()}clearOffsetInformation(t){t.alterRowOffset=void 0,t.alterColumnOffset=void 0}extendEndpointRanges(t,e,o,n){(0,c.z0)(t.ranges,(t=>{t[1]&&(e>=t[0]&&e<=t[1]?o>t[1]?t[1]+=n:o<t[0]&&(t[0]-=n):o>=t[0]&&o<=t[1]&&(t[1]-=n,e<=t[0]&&(t[0]+=1,t[1]+=1)))}))}recreatePhysicalRanges(t){const e=t.ranges,o=[],n=[];(0,c.z0)(e,(t=>{const e=[];if(t[1])for(let o=t[0];o<=t[1];o++)e.push(this.hot.toPhysicalRow(o));else e.push(this.hot.toPhysicalRow(t[0]));n.push(e)})),(0,c.z0)(n,(t=>{let e=[];(0,c.z0)(t,((n,i)=>{0===i?e.push(n):t[i]!==t[i-1]+1&&(e.push(t[i-1]),o.push(e),e=[],e.push(n)),i===t.length-1&&(e.push(n),o.push(e))}))})),t.ranges=o}shiftEndpointCoordinates(t,e){t.alterRowOffset&&0!==t.alterRowOffset?(t.destinationRow+=t.alterRowOffset||0,(0,c.z0)(t.ranges,(o=>{(0,c.z0)(o,((n,i)=>{n>=e&&(o[i]+=t.alterRowOffset||0)}))}))):t.alterColumnOffset&&0!==t.alterColumnOffset&&(t.destinationColumn+=t.alterColumnOffset||0,t.sourceColumn+=t.alterColumnOffset||0)}resetAllEndpoints(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.getAllEndpoints(),e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];t.some((t=>{const e=t.alterRowOffset||0,o=t.alterColumnOffset||0;return t.destinationRow+e>=this.hot.countRows()||t.destinationColumn+o>=this.hot.countCols()}))||(this.cellsToSetCache=[],(0,c.z0)(t,(t=>{this.resetEndpointValue(t,e)})),this.hot.setDataAtCell(this.cellsToSetCache,"ColumnSummary.reset"),this.cellsToSetCache=[])}refreshAllEndpoints(){this.cellsToSetCache=[],(0,c.z0)(this.getAllEndpoints(),(t=>{this.currentEndpoint=t,this.plugin.calculate(t),this.setEndpointValue(t,"init")})),this.currentEndpoint=null,this.hot.setDataAtCell(this.cellsToSetCache,"ColumnSummary.reset"),this.cellsToSetCache=[]}refreshChangedEndpoints(t){const e=[];this.cellsToSetCache=[],(0,c.z0)(t,((t,o,n)=>{`${t[2]||""}`!=`${t[3]}`&&(0,c.z0)(this.getAllEndpoints(),((t,i)=>{this.hot.propToCol(n[o][1])===t.sourceColumn&&-1===e.indexOf(i)&&e.push(i)}))})),(0,c.z0)(e,(t=>{this.refreshEndpoint(this.getEndpoint(t))})),this.hot.setDataAtCell(this.cellsToSetCache,"ColumnSummary.reset"),this.cellsToSetCache=[]}refreshCellMetas(){this.endpoints.forEach((t=>{const e=this.hot.toVisualRow(t.destinationRow);if(null!==e){const o=this.hot.getCellMeta(e,t.destinationColumn);o.readOnly=t.readOnly,o.className="columnSummaryResult"}}))}refreshEndpoint(t){this.currentEndpoint=t,this.plugin.calculate(t),this.setEndpointValue(t),this.currentEndpoint=null}resetEndpointValue(t){let e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];const o=t.alterRowOffset||0,n=t.alterColumnOffset||0;this.cellsToSetCache.push([this.hot.toVisualRow(t.destinationRow+(e?o:0)),this.hot.toVisualColumn(t.destinationColumn+(e?n:0)),""])}setEndpointValue(t,e){let o=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const n=this.hot.toVisualRow(t.destinationRow);if(t.destinationRow>=this.hot.countRows()||t.destinationColumn>=this.hot.countCols())return void this.throwOutOfBoundsWarning();const i=this.hot.toVisualRow(t.destinationRow);if(null!==i){const o=this.hot.getCellMeta(i,t.destinationColumn);"init"!==e&&o.readOnly===t.readOnly||(o.readOnly=t.readOnly,o.className="columnSummaryResult")}if((!0===t.roundFloat||Number.isInteger(t.roundFloat))&&!isNaN(t.result)){const e=t.roundFloat;let o=0;Number.isInteger(e)&&(o=Math.min(Math.max(0,e),100)),t.result=t.result.toFixed(o)}o?this.hot.setDataAtCell(n,t.destinationColumn,t.result,"ColumnSummary.set"):this.cellsToSetCache.push([n,t.destinationColumn,t.result]),t.alterRowOffset=void 0,t.alterColumnOffset=void 0}throwOutOfBoundsWarning(){(0,So.R8)("One of the Column Summary plugins' destination points you provided is beyond the table boundaries!")}};function An(t){return null==t||isNaN(t)}function kn(t,e,o){if("function"==typeof t?t===e:t.has(e))return arguments.length<3?e:o;throw new TypeError("Private element is not present on this object")}const _n="columnSummary";var Nn=new WeakSet;class Pn extends Kt{constructor(){var t,e;super(...arguments),function(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}(t=this,e=Nn),e.add(t),function(t,e,o){(e=function(t){var e=function(t){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var o=e.call(t,"string");if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[e]=o}(this,"endpoints",null)}static get PLUGIN_KEY(){return _n}static get PLUGIN_PRIORITY(){return 220}isEnabled(){return!!this.hot.getSettings()[_n]}enablePlugin(){var t=this;this.enabled||(this.settings=this.hot.getSettings()[_n],this.endpoints=new On(this,this.settings),this.addHook("afterInit",(function(){for(var e=arguments.length,o=new Array(e),n=0;n<e;n++)o[n]=arguments[n];return kn(Nn,t,Ln).call(t,...o)})),this.addHook("afterChange",(function(){for(var e=arguments.length,o=new Array(e),n=0;n<e;n++)o[n]=arguments[n];return kn(Nn,t,Vn).call(t,...o)})),this.addHook("afterUpdateSettings",(function(){for(var e=arguments.length,o=new Array(e),n=0;n<e;n++)o[n]=arguments[n];return kn(Nn,t,Dn).call(t,...o)})),this.addHook("beforeCreateRow",((t,e,o)=>this.endpoints.resetSetupBeforeStructureAlteration("insert_row",t,e,null,o))),this.addHook("beforeCreateCol",((t,e,o)=>this.endpoints.resetSetupBeforeStructureAlteration("insert_col",t,e,null,o))),this.addHook("beforeRemoveRow",(function(){for(var e=arguments.length,o=new Array(e),n=0;n<e;n++)o[n]=arguments[n];return t.endpoints.resetSetupBeforeStructureAlteration("remove_row",...o)})),this.addHook("beforeRemoveCol",(function(){for(var e=arguments.length,o=new Array(e),n=0;n<e;n++)o[n]=arguments[n];return t.endpoints.resetSetupBeforeStructureAlteration("remove_col",...o)})),this.addHook("afterCreateRow",((t,e,o)=>this.endpoints.resetSetupAfterStructureAlteration("insert_row",t,e,null,o))),this.addHook("afterCreateCol",((t,e,o)=>this.endpoints.resetSetupAfterStructureAlteration("insert_col",t,e,null,o))),this.addHook("afterRemoveRow",(function(){for(var e=arguments.length,o=new Array(e),n=0;n<e;n++)o[n]=arguments[n];return t.endpoints.resetSetupAfterStructureAlteration("remove_row",...o)})),this.addHook("afterRemoveCol",(function(){for(var e=arguments.length,o=new Array(e),n=0;n<e;n++)o[n]=arguments[n];return t.endpoints.resetSetupAfterStructureAlteration("remove_col",...o)})),this.addHook("afterRowMove",(function(){for(var e=arguments.length,o=new Array(e),n=0;n<e;n++)o[n]=arguments[n];return kn(Nn,t,Fn).call(t,...o)})),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(t){switch(t.type.toLowerCase()){case"sum":t.result=this.calculateSum(t);break;case"min":case"max":t.result=this.calculateMinMax(t,t.type);break;case"count":t.result=this.countEntries(t);break;case"average":t.result=this.calculateAverage(t);break;case"custom":t.result=t.customFunction.call(this,t)}}calculateSum(t){let e=0;return(0,s.v4)(t.ranges,(o=>{e+=this.getPartialSum(o,t.sourceColumn)})),e}getPartialSum(t,e){let o=0,n=t[1]||t[0],i=null,r=0;do{if(i=this.getCellValue(n,e),i=An(i)?null:i,null!==i){const t=(`${i}`.split(".")[1]||[]).length||1;t>r&&(r=t)}o+=i||0,n-=1}while(n>=t[0]);return Math.round(o*10**r)/10**r}calculateMinMax(t,e){let o=null;return(0,s.v4)(t.ranges,(n=>{const i=this.getPartialMinMax(n,t.sourceColumn,e);if(null===o&&null!==i&&(o=i),null!==i)switch(e){case"min":o=Math.min(o,i);break;case"max":o=Math.max(o,i)}})),null===o?"Not enough data":o}getPartialMinMax(t,e,o){let n,i=null,r=t[1]||t[0];do{if(n=this.getCellValue(r,e),n=An(n)?null:n,null===i)i=n;else if(null!==n)switch(o){case"min":i=Math.min(i,n);break;case"max":i=Math.max(i,n)}r-=1}while(r>=t[0]);return i}countEmpty(t,e){let o,n=0,i=t[1]||t[0];do{o=this.getCellValue(i,e),o=An(o)?null:o,null===o&&(n+=1),i-=1}while(i>=t[0]);return n}countEntries(t){let e=0;const o=t.ranges;return(0,s.v4)(o,(o=>{const n=void 0===o[1]?1:o[1]-o[0]+1,i=this.countEmpty(o,t.sourceColumn);e+=n,e-=i})),e}calculateAverage(t){return this.calculateSum(t)/this.countEntries(t)}getCellValue(t,e){const o=this.hot.toVisualRow(t),n=this.hot.toVisualColumn(e);let i=this.hot.getSourceDataAtCell(t,e),r="";if(null!==o&&null!==n&&(r=this.hot.getCellMeta(o,n).className||""),r.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(nn.O`ColumnSummary plugin: cell at (${t}, ${e}) is not in a\x20
- numeric format. Cannot do the calculation.`);return i}}function Ln(){this.endpoints.initEndpoints()}function Dn(t){void 0!==t.columns&&this.endpoints.refreshCellMetas()}function Vn(t,e){t&&"ColumnSummary.reset"!==e&&"ColumnSummary.set"!==e&&"loadData"!==e&&this.endpoints.refreshChangedEndpoints(t)}function Fn(t,e){this.endpoints.resetSetupBeforeStructureAlteration("move_row",t[0],t.length,t,this.pluginName),this.endpoints.resetSetupAfterStructureAlteration("move_row",e,t.length,t,this.pluginName)}var Bn=o(7710);function Wn(t,e,o){zn(t,e),e.set(t,o)}function zn(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function jn(t,e){return t.get($n(t,e))}function Un(t,e,o){return t.set($n(t,e),o),o}function $n(t,e,o){if("function"==typeof t?t===e:t.has(e))return arguments.length<3?e:o;throw new TypeError("Private element is not present on this object")}var Gn=new WeakMap,Yn=new WeakMap,Xn=new WeakMap,qn=new WeakSet;class Kn{constructor(){var t;zn(this,t=qn),t.add(this),Wn(this,Gn,!0),Wn(this,Yn,null),Wn(this,Xn,new ResizeObserver((t=>$n(qn,this,Qn).call(this,t))))}setObservedElement(t){Un(Yn,this,t)}unobserve(){jn(Xn,this).unobserve(jn(Yn,this))}observe(){Un(Gn,this,!0),jn(Xn,this).observe(jn(Yn,this))}destroy(){jn(Xn,this).disconnect()}}function Qn(t){!jn(Gn,this)&&Array.isArray(t)&&t.length?t.forEach((t=>{let{borderBoxSize:e}=t;const{inlineSize:o,blockSize:n}=e[0];this.runLocalHooks("resize",o,n)})):Un(Gn,this,!1)}function Jn(t,e,o){(function(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")})(t,e),e.set(t,o)}function Zn(t,e){return t.get(ei(t,e))}function ti(t,e,o){return t.set(ei(t,e),o),o}function ei(t,e,o){if("function"==typeof t?t===e:t.has(e))return arguments.length<3?e:o;throw new TypeError("Private element is not present on this object")}(0,s.co)(Kn,Bn.A);var oi=new WeakMap,ni=new WeakMap,ii=new WeakMap,ri=new WeakMap,si=new WeakMap,li=new WeakMap,ai=new WeakMap;class hi{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(t,e){var o=this;Jn(this,oi,void 0),Jn(this,ni,!1),Jn(this,ii,null),Jn(this,ri,void 0),Jn(this,si,void 0),Jn(this,li,!0),Jn(this,ai,new Kn),ti(oi,this,t),ti(ni,this,e),ti(ri,this,this.createEditor()),ti(si,this,Zn(ri,this).style),Zn(ai,this).setObservedElement(this.getInputElement()),Zn(ai,this).addLocalHook("resize",(function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return o.runLocalHooks("resize",...e)})),this.hide()}setPosition(t,e){Zn(si,this).left=`${t}px`,Zn(si,this).top=`${e}px`}setSize(t,e){if(t&&e){const o=this.getInputElement();o.style.width=`${t}px`,o.style.height=`${e}px`}}getSize(){return{width:(0,i.Gq)(this.getInputElement()),height:(0,i.DK)(this.getInputElement())}}observeSize(){Zn(ai,this).observe()}resetSize(){const t=this.getInputElement();t.style.width="",t.style.height=""}setReadOnlyState(t){this.getInputElement().readOnly=t}show(){Zn(si,this).display="block",ti(li,this,!1)}hide(){Zn(ai,this).unobserve(),Zn(li,this)||(Zn(si,this).display="none"),ti(li,this,!0)}isVisible(){return"block"===Zn(si,this).display}setValue(){const t=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"")||"";this.getInputElement().value=t}getValue(){return this.getInputElement().value}isFocused(){return Zn(oi,this).activeElement===this.getInputElement()}focus(){this.getInputElement().focus()}createEditor(){const t=Zn(oi,this).createElement("div"),e=Zn(oi,this).createElement("textarea");return t.style.display="none",ti(ii,this,Zn(oi,this).createElement("div")),Zn(ii,this).setAttribute("dir",Zn(ni,this)?"rtl":"ltr"),(0,i.iQ)(Zn(ii,this),hi.CLASS_EDITOR_CONTAINER),Zn(oi,this).body.appendChild(Zn(ii,this)),(0,i.iQ)(t,hi.CLASS_EDITOR),(0,i.iQ)(e,hi.CLASS_INPUT),e.setAttribute("data-hot-input",!0),t.appendChild(e),Zn(ii,this).appendChild(t),t}getInputElement(){return Zn(ri,this).querySelector(`.${hi.CLASS_INPUT}`)}getEditorElement(){return Zn(ri,this)}destroy(){const t=Zn(ii,this)?Zn(ii,this).parentNode:null;Zn(ri,this).parentNode.removeChild(Zn(ri,this)),ti(ri,this,null),ti(si,this,null),Zn(ai,this).destroy(),t&&t.removeChild(Zn(ii,this))}}(0,s.co)(hi,Bn.A);const ci=hi;function di(t,e,o){return(e=function(t){var e=function(t){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var o=e.call(t,"string");if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[e]=o,t}class ui{constructor(t){di(this,"wasLastActionShow",!0),di(this,"showDebounced",null),di(this,"hidingTimer",null),this.updateDelay(t)}hide(){this.wasLastActionShow=!1,this.hidingTimer=setTimeout((()=>{!1===this.wasLastActionShow&&this.runLocalHooks("hide")}),250)}show(t){this.wasLastActionShow=!0,this.showDebounced(t)}cancelHiding(){this.wasLastActionShow=!0,clearTimeout(this.hidingTimer),this.hidingTimer=null}updateDelay(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:250;this.showDebounced=(0,m.sg)((t=>{this.wasLastActionShow&&this.runLocalHooks("show",t.from.row,t.from.col)}),t)}destroy(){this.clearLocalHooks()}}(0,s.co)(ui,Bn.A);const gi=ui,fi="---------";function pi(t,e){const o={};return(0,c.z0)(t,(t=>{t.forAll(((t,n)=>{t>=0&&n>=0&&(o[t]||(o[t]=[]),o[t][n]=e(t,n))}))})),o}function mi(t,e,o,n,i){(0,c.z0)(t,(t=>{t.forAll(((t,r)=>{t>=0&&r>=0&&function(t,e,o,n,i,r){const s=i(t,e);let l=n;s.className&&(l="vertical"===o?function(t,e){return-1!==t.indexOf(e)?t:`${t.replace("htTop","").replace("htMiddle","").replace("htBottom","").replace(" ","")} ${e}`}(s.className,n):function(t,e){return-1!==t.indexOf(e)?t:`${t.replace("htLeft","").replace("htCenter","").replace("htRight","").replace("htJustify","").replace(" ","")} ${e}`}(s.className,n)),r(t,e,"className",l)}(t,r,e,o,n,i)}))}))}function wi(t){return`<span class="selected">${String.fromCharCode(10003)}</span>${t}`}function bi(t,e){let o=!1;return Array.isArray(t)&&(0,c.z0)(t,(t=>(t.forAll(((t,n)=>{if(t>=0&&n>=0&&e(t,n))return o=!0,!1})),o))),o}function vi(t,e){const o={top:0,left:0};if(e!==t.ownerDocument){const{frameElement:t}=e.defaultView,{top:n,left:i}=t.getBoundingClientRect();o.top=n,o.left=i}return o}function yi(t,e,o){Ci(t,e),e.set(t,o)}function Ci(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Si(t,e,o){return t.set(Ei(t,e),o),o}function Ri(t,e){return t.get(Ei(t,e))}function Ei(t,e,o){if("function"==typeof t?t===e:t.has(e))return arguments.length<3?e:o;throw new TypeError("Private element is not present on this object")}const Ti="comments",xi="comment",Mi="value",Ii="style",Hi="readOnly",Oi=Ti,Ai=`plugin:${Ti}`;var ki=new WeakMap,_i=new WeakMap,Ni=new WeakMap,Pi=new WeakMap,Li=new WeakMap,Di=new WeakMap,Vi=new WeakSet;class Fi extends Kt{constructor(){var t;super(...arguments),Ci(this,t=Vi),t.add(this),function(t,e,o){(e=function(t){var e=function(t){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var o=e.call(t,"string");if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[e]=o}(this,"range",{}),yi(this,ki,null),yi(this,_i,null),yi(this,Ni,!1),yi(this,Pi,!1),yi(this,Li,null),yi(this,Di,"")}static get PLUGIN_KEY(){return Ti}static get PLUGIN_PRIORITY(){return 60}static get DEFAULT_SETTINGS(){return{displayDelay:250}}isEnabled(){return!!this.hot.getSettings()[Ti]}enablePlugin(){var t=this;this.enabled||(Ri(ki,this)||(Si(ki,this,new ci(this.hot.rootDocument,this.hot.isRtl())),Ri(ki,this).addLocalHook("resize",(function(){for(var e=arguments.length,o=new Array(e),n=0;n<e;n++)o[n]=arguments[n];return Ei(Vi,t,Yi).call(t,...o)}))),Ri(_i,this)||Si(_i,this,new gi(this.getSetting("displayDelay"))),this.addHook("afterContextMenuDefaultOptions",(t=>this.addToContextMenu(t))),this.addHook("afterRenderer",((t,e,o,n,i,r)=>Ei(Vi,this,Ui).call(this,t,r))),this.addHook("afterScroll",(()=>Ei(Vi,this,qi).call(this))),this.addHook("afterBeginEditing",(()=>this.hide())),this.addHook("afterDocumentKeyDown",(t=>Ei(Vi,this,Xi).call(this,t))),this.addHook("beforeCompositionStart",(t=>Ei(Vi,this,Xi).call(this,t))),this.addHook("afterSetTheme",(function(){for(var e=arguments.length,o=new Array(e),n=0;n<e;n++)o[n]=arguments[n];return Ei(Vi,t,Ki).call(t,...o)})),Ri(_i,this).addLocalHook("hide",(()=>this.hide())),Ri(_i,this).addLocalHook("show",((t,e)=>this.showAtCell(t,e))),this.registerShortcuts(),this.registerListeners(),super.enablePlugin())}updatePlugin(){Ri(_i,this).updateDelay(this.getSetting("displayDelay")),super.updatePlugin()}disablePlugin(){this.unregisterShortcuts(),super.disablePlugin()}registerShortcuts(){const t=this.hot.getShortcutManager(),e=t.getContext("grid"),o=t.addContext(Ai);e.addShortcut({keys:[["Control","Alt","M"]],callback:()=>{const e=this.hot.getSelectedRangeLast();Si(Pi,this,!0),this.hot.scrollToFocusedCell((()=>{this.setRange(e),this.show(),this.focusEditor(),t.setActiveContextName(Ai),this.hot._registerTimeout((()=>{Si(Pi,this,!1)}))}))},stopPropagation:!0,runOnlyIf:()=>{var t;return null===(t=this.hot.getSelectedRangeLast())||void 0===t?void 0:t.highlight.isCell()},group:Oi}),o.addShortcut({keys:[["Escape"]],callback:()=>{Ri(ki,this).setValue(Ri(Di,this)),this.hide(),t.setActiveContextName("grid")},runOnlyIf:()=>Ri(ki,this).isVisible()&&Ri(ki,this).isFocused(),group:Oi}),o.addShortcut({keys:[["Control/Meta","Enter"]],callback:()=>{this.hide(),t.setActiveContextName("grid")},runOnlyIf:()=>Ri(ki,this).isVisible()&&Ri(ki,this).isFocused(),group:Oi}),o.addShortcut({keys:[["Shift","Tab"],["Tab"]],forwardToContext:t.getContext("grid"),callback:()=>{Ri(ki,this).setValue(Ri(ki,this).getValue()),this.hide(),t.setActiveContextName("grid")},group:Oi})}unregisterShortcuts(){this.hot.getShortcutManager().getContext("grid").removeShortcutsByGroup(Oi)}registerListeners(){const{rootDocument:t}=this.hot,e=this.getEditorInputElement();this.eventManager.addEventListener(t,"mouseover",(t=>Ei(Vi,this,zi).call(this,t))),this.eventManager.addEventListener(t,"mousedown",(t=>Ei(Vi,this,Bi).call(this,t))),this.eventManager.addEventListener(t,"mouseup",(()=>Ei(Vi,this,ji).call(this))),this.eventManager.addEventListener(e,"focus",(()=>Ei(Vi,this,Gi).call(this))),this.eventManager.addEventListener(e,"blur",(()=>Ei(Vi,this,$i).call(this))),this.eventManager.addEventListener(this.getEditorInputElement(),"mousedown",(t=>Ei(Vi,this,Wi).call(this,t)))}setRange(t){this.range=t}clearRange(){this.range={}}targetIsCellWithComment(t){const e=(0,i.kp)(t.target,"TD","TBODY");return!!(e&&(0,i.nB)(e,"htCommentCell")&&(0,i.kp)(e,[this.hot.rootElement]))}targetIsCommentTextArea(t){return this.getEditorInputElement()===t.target}setComment(t){if(!this.range.from)throw new Error('Before using this method, first set cell range (hot.getPlugin("comment").setRange())');const e=Ri(ki,this).getValue();let o="";null!=t?o=t:null!=e&&(o=e);const n=this.range.from.row,i=this.range.from.col;this.updateCommentMeta(n,i,{[Mi]:o}),this.hot.render()}setCommentAtCell(t,e,o){this.setRange({from:this.hot._createCellCoords(t,e)}),this.setComment(o)}removeComment(){let t=!(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,xi),t&&this.hot.render(),this.hide()}removeCommentAtCell(t,e){let o=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];this.setRange({from:this.hot._createCellCoords(t,e)}),this.removeComment(o)}getComment(){const t=this.range.from.row,e=this.range.from.col;return this.getCommentMeta(t,e,Mi)}getCommentAtCell(t,e){return this.getCommentMeta(t,e,Mi)}show(){var t;if(!this.range.from)throw new Error('Before using this method, first set cell range (hot.getPlugin("comment").setRange())');const{from:{row:e,col:o}}=this.range;if(e<0||e>this.hot.countSourceRows()-1||o<0||o>this.hot.countSourceCols()-1)return!1;const n=this.hot.getCellMeta(this.range.from.row,this.range.from.col);return Ri(_i,this).cancelHiding(),Ri(ki,this).setValue(null!==(t=n[xi]?n[xi][Mi]:null)&&void 0!==t?t:""),Ri(ki,this).show(),this.refreshEditor(!0),!0}showAtCell(t,e){return this.setRange({from:this.hot._createCellCoords(t,e)}),this.show()}hide(){Ri(ki,this).hide()}refreshEditor(){if(!(arguments.length>0&&void 0!==arguments[0]&&arguments[0]||this.range.from&&Ri(ki,this).isVisible()))return;const{rowIndexMapper:t,columnIndexMapper:e}=this.hot,{row:o,col:n}=this.range.from;let r=t.getRenderableFromVisualIndex(o),s=e.getRenderableFromVisualIndex(n);const l=null===r;Ri(ki,this).setPosition(0,0),null===r&&(r=t.getRenderableFromVisualIndex(t.getNearestNotHiddenIndex(o,-1))),null===s&&(s=e.getRenderableFromVisualIndex(e.getNearestNotHiddenIndex(n,-1)));const a=null===r,h=null===s;r=null!=r?r:0,s=null!=s?s:0;const{rootWindow:c,view:{_wt:d}}=this.hot,{wtTable:u}=d,g=d.getCell({row:r,col:s},!0),f=this.getCommentMeta(o,n,Ii);f?Ri(ki,this).setSize(f.width,f.height):Ri(ki,this).resetSize();const p=h?0:u.getColumnWidth(s),m=l&&!a?(0,i.DK)(g):0,{left:w,top:b,width:v,height:y}=g.getBoundingClientRect(),{width:C,height:S}=Ri(ki,this).getSize(),{innerWidth:R,innerHeight:E}=this.hot.rootWindow,T=this.hot.rootDocument.documentElement,x=(0,i.XJ)(this.hot.rootDocument),M=(0,i.D1)(this.hot.rootWindow)?x:0,I=(0,i.zO)(this.hot.rootWindow)?x:0;let H=w+c.scrollX+p,O=b+c.scrollY+m;this.hot.isRtl()&&(H-=C+p),this.hot.isLtr()&&w+v+C>R-M?H=w+c.scrollX-C-1:this.hot.isRtl()&&H<-(T.scrollWidth-T.clientWidth)&&(H=w+c.scrollX+p+1),b+S>E-I&&(O-=S-y+1),Ri(ki,this).setPosition(H,O),Ri(ki,this).setReadOnlyState(this.getCommentMeta(o,n,Hi)),Ri(ki,this).observeSize()}focusEditor(){Ri(ki,this).focus()}updateCommentMeta(t,e,o){const n=this.hot.getCellMeta(t,e)[xi];let i;n?(i=(0,s.Go)(n),(0,s.zw)(i,o)):i=o,this.hot.setCellMeta(t,e,xi,i)}getCommentMeta(t,e,o){const n=this.hot.getCellMeta(t,e);if(n[xi])return n[xi][o]}addToContextMenu(t){var e;t.items.push({name:fi},(e=this,{key:"commentsAddEdit",name(){var t;const o=null===(t=this.getSelectedRangeLast())||void 0===t?void 0:t.highlight;return null!=o&&o.isCell()&&e.getCommentAtCell(o.row,o.col)?this.getTranslatedPhrase(tt.CONTEXTMENU_ITEMS_EDIT_COMMENT):this.getTranslatedPhrase(tt.CONTEXTMENU_ITEMS_ADD_COMMENT)},callback(){const t=this.getSelectedRangeLast();e.setRange(t),e.show(),e.focusEditor()},disabled(){const t=this.getSelectedRangeLast();return!!(!t||t.highlight.isHeader()||this.selection.isEntireRowSelected()&&this.selection.isEntireColumnSelected()||0===this.countRenderedRows()||0===this.countRenderedCols())}}),function(t){return{key:"commentsRemove",name(){return this.getTranslatedPhrase(tt.CONTEXTMENU_ITEMS_REMOVE_COMMENT)},callback(){this.getSelectedRangeLast().forAll(((e,o)=>{e>=0&&o>=0&&t.removeCommentAtCell(e,o,!1)})),this.render()},disabled(){const t=this.getSelectedRangeLast();return!!(!t||t.highlight.isHeader()||this.selection.isEntireRowSelected()&&this.selection.isEntireColumnSelected()||0===this.countRenderedRows()||0===this.countRenderedCols())}}}(this),function(t){return{key:"commentsReadOnly",name(){const e=this.getTranslatedPhrase(tt.CONTEXTMENU_ITEMS_READ_ONLY_COMMENT);return bi(this.getSelectedRange(),((e,o)=>t.getCommentMeta(e,o,Hi)))?wi(e):e},callback(){this.getSelectedRangeLast().forAll(((e,o)=>{if(e>=0&&o>=0){const n=!!t.getCommentMeta(e,o,Hi);t.updateCommentMeta(e,o,{[Hi]:!n})}}))},disabled(){const e=this.getSelectedRangeLast();return!!(!e||e.highlight.isHeader()||!t.getCommentAtCell(e.highlight.row,e.highlight.col)||this.selection.isEntireRowSelected()&&this.selection.isEntireColumnSelected()||0===this.countRenderedRows()||0===this.countRenderedCols())}}}(this))}getEditorInputElement(){return Ri(ki,this).getInputElement()}destroy(){var t,e;null===(t=Ri(ki,this))||void 0===t||t.destroy(),null===(e=Ri(_i,this))||void 0===e||e.destroy(),super.destroy()}}function Bi(t){if(this.hot.view&&this.hot.view._wt&&!Ri(Ni,this)&&!this.targetIsCommentTextArea(t)){const e=(0,i.kp)(t.target,"TD","TBODY");let o=null;e&&(o=this.hot.getCoords(e)),(!e||this.range.from&&o&&(this.range.from.row!==o.row||this.range.from.col!==o.col))&&this.hide()}}function Wi(t){t.stopPropagation()}function zi(t){const{rootDocument:e}=this.hot;if(!(Ri(Ni,this)||Ri(ki,this).isFocused()||(0,i.nB)(t.target,"wtBorder")||Ri(Li,this)===t.target)&&Ri(ki,this))if(Si(Li,this,e.elementFromPoint(t.clientX,t.clientY)),this.targetIsCellWithComment(t)){const e=this.hot._createCellRange(this.hot.getCoords(t.target));Ri(_i,this).show(e)}else(0,i.aO)(t.target,e)&&!this.targetIsCommentTextArea(t)&&Ri(_i,this).hide()}function ji(){Si(Ni,this,!1)}function Ui(t,e){e[xi]&&e[xi][Mi]&&(0,i.iQ)(t,e.commentedCellClassName)}function $i(){Si(Di,this,""),this.hot.getShortcutManager().setActiveContextName("grid"),this.setComment()}function Gi(){Si(Di,this,this.getComment()),this.hot.listen(),this.hot.getShortcutManager().setActiveContextName(Ai)}function Yi(t,e){this.updateCommentMeta(this.range.from.row,this.range.from.col,{[Ii]:{width:t,height:e}})}function Xi(t){Ri(ki,this).isFocused()&&(0,r.CA)(t)}function qi(){Ri(Pi,this)||this.hide()}function Ki(){const t=Ri(ki,this).getEditorElement();(0,i.vy)(t,/ht-theme-.*/g),(0,i.iQ)(t,this.hot.getCurrentThemeName())}function Qi(t,e,o){return(e=function(t){var e=function(t){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var o=e.call(t,"string");if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[e]=o,t}o(3609);class Ji{constructor(t){Qi(this,"hot",void 0),Qi(this,"commands",{}),Qi(this,"commonCallback",null),this.hot=t}registerCommand(t,e){this.commands[t]=e}setCommonCallback(t){this.commonCallback=t}execute(t){for(var e=arguments.length,o=new Array(e>1?e-1:0),n=1;n<e;n++)o[n-1]=arguments[n];const i=t.split(":"),r=i[0],l=2===i.length?i[1]:null;let a=this.commands[r];if(!a)throw new Error(`Menu command '${r}' not exists.`);if(l&&a.submenu&&(a=function(t,e){let o;return(0,c.z0)(e,(e=>{const n=e.key?e.key.split(":"):null;if(Array.isArray(n)&&n[1]===t)return o=e,!1})),o}(l,a.submenu.items)),!0===a.disabled)return;if("function"==typeof a.disabled&&!0===a.disabled.call(this.hot))return;if((0,s.mQ)(a,"submenu"))return;const h=[];"function"==typeof a.callback&&h.push(a.callback),"function"==typeof this.commonCallback&&h.push(this.commonCallback),o.unshift(i.join(":")),(0,c.z0)(h,(t=>t.apply(this.hot,o)))}}const Zi="alignment",tr="clear_column",er="col_left",or="col_right",nr="make_read_only",ir="redo";var rr=o(6396);const sr="remove_col",lr="remove_row",ar="row_above",hr="row_below",cr="no_items",dr="undo",ur=[ar,hr,er,or,tr,lr,sr,dr,ir,nr,Zi,fi,cr],gr={[fi]:function(){return{name:fi}},[cr]:function(){return{key:cr,name(){return this.getTranslatedPhrase(tt.CONTEXTMENU_ITEMS_NO_ITEMS)},disabled:!0,isCommand:!1}},[ar]:function(){return{key:ar,name(){return this.getTranslatedPhrase(tt.CONTEXTMENU_ITEMS_ROW_ABOVE)},callback(){const t=this.getSelectedRangeLast().getTopLeftCorner();this.alter("insert_row_above",t.row,1,"ContextMenu.rowAbove")},disabled(){const t=this.getSelectedRangeLast();return!!(!t||this.selection.isSelectedByColumnHeader()||t.isSingleHeader()&&t.highlight.row<0||this.countSourceRows()>=this.getSettings().maxRows)||!!this.selection.isSelectedByCorner()&&0===this.countRows()},hidden(){return!this.getSettings().allowInsertRow}}},[hr]:function(){return{key:hr,name(){return this.getTranslatedPhrase(tt.CONTEXTMENU_ITEMS_ROW_BELOW)},callback(){const t=this.getSelectedRangeLast().getBottomRightCorner();this.alter("insert_row_below",t.row,1,"ContextMenu.rowBelow")},disabled(){const t=this.getSelectedRangeLast();return!!(!t||this.selection.isSelectedByColumnHeader()||t.isSingleHeader()&&t.highlight.row<0||this.countSourceRows()>=this.getSettings().maxRows)},hidden(){return!this.getSettings().allowInsertRow}}},[er]:function(){return{key:er,name(){return this.getTranslatedPhrase(tt.CONTEXTMENU_ITEMS_INSERT_LEFT)},callback(){const t=this.getSelectedRangeLast().getTopLeftCorner(),e=this.isRtl()?"insert_col_end":"insert_col_start";this.alter(e,t.col,1,"ContextMenu.columnLeft")},disabled(){if(!this.isColumnModificationAllowed())return!0;const t=this.getSelectedRangeLast();return!!(!t||this.selection.isSelectedByRowHeader()||t.isSingleHeader()&&t.highlight.col<0||this.countSourceCols()>=this.getSettings().maxCols)||!!this.selection.isSelectedByCorner()&&0===this.countCols()},hidden(){return!this.getSettings().allowInsertColumn}}},[or]:function(){return{key:or,name(){return this.getTranslatedPhrase(tt.CONTEXTMENU_ITEMS_INSERT_RIGHT)},callback(){const t=this.getSelectedRangeLast().getTopRightCorner(),e=this.isRtl()?"insert_col_start":"insert_col_end";this.alter(e,t.col,1,"ContextMenu.columnRight")},disabled(){if(!this.isColumnModificationAllowed())return!0;const t=this.getSelectedRangeLast();return!!(!t||this.selection.isSelectedByRowHeader()||t.isSingleHeader()&&t.highlight.col<0||this.countSourceCols()>=this.getSettings().maxCols)},hidden(){return!this.getSettings().allowInsertColumn}}},[tr]:function(){return{key:tr,name(){return this.getTranslatedPhrase(tt.CONTEXTMENU_ITEMS_CLEAR_COLUMN)},callback(t,e){const o=e[0].start.col,n=e[0].end.col;this.countRows()&&this.populateFromArray(0,o,[[null]],Math.max(e[0].start.row,e[0].end.row),n,"ContextMenu.clearColumn")},disabled(){const t=this.getSelectedRangeLast();if(!t||t.isSingleHeader()&&t.highlight.col<0||!this.selection.isSelectedByColumnHeader())return!0;let e=!1;return t.forAll(((t,o)=>{if(t<0||o<0)return!0;const{readOnly:n}=this.getCellMeta(t,o);return!!n||(e=!0,!1)})),!e}}},[lr]:function(){return{key:lr,name(){const t=this.getSelected();let e=0;if(t)if(t.length>1)e=1;else{const[o,,n]=t[0];o-n!==0&&(e=1)}return this.getTranslatedPhrase(tt.CONTEXTMENU_ITEMS_REMOVE_ROW,e)},callback(){this.alter("remove_row",(0,rr.f7)(this),1,"ContextMenu.removeRow")},disabled(){const t=this.getSelectedRangeLast();if(!t)return!0;if(t.isSingleHeader()&&t.highlight.row<0)return!0;const e=this.countRows();return this.selection.isSelectedByCorner()?0===e:this.selection.isSelectedByColumnHeader()||0===e},hidden(){return!this.getSettings().allowRemoveRow}}},[sr]:function(){return{key:sr,name(){const t=this.getSelected();let e=0;if(t)if(t.length>1)e=1;else{const[,o,,n]=t[0];o-n!==0&&(e=1)}return this.getTranslatedPhrase(tt.CONTEXTMENU_ITEMS_REMOVE_COLUMN,e)},callback(){this.alter("remove_col",(0,rr.NB)(this),null,"ContextMenu.removeColumn")},disabled(){if(!this.isColumnModificationAllowed())return!0;const t=this.getSelectedRangeLast();if(!t)return!0;if(t.isSingleHeader()&&t.highlight.col<0)return!0;const e=this.countCols();return this.selection.isSelectedByCorner()?0===e:this.selection.isSelectedByRowHeader()||0===e},hidden(){return!this.getSettings().allowRemoveColumn}}},[dr]:function(){return{key:dr,name(){return this.getTranslatedPhrase(tt.CONTEXTMENU_ITEMS_UNDO)},callback(){this.getPlugin("undoRedo").undo()},hidden(){const t=this.getPlugin("undoRedo");return!t||!t.isEnabled()},disabled(){return!this.getPlugin("undoRedo").isUndoAvailable()}}},[ir]:function(){return{key:ir,name(){return this.getTranslatedPhrase(tt.CONTEXTMENU_ITEMS_REDO)},callback(){this.getPlugin("undoRedo").redo()},hidden(){const t=this.getPlugin("undoRedo");return!t||!t.isEnabled()},disabled(){return!this.getPlugin("undoRedo").isRedoAvailable()}}},[nr]:function(){return{key:nr,checkable:!0,ariaChecked(){return bi(this.getSelectedRange(),((t,e)=>this.getCellMeta(t,e).readOnly))},ariaLabel(){return this.getTranslatedPhrase(tt.CONTEXTMENU_ITEMS_READ_ONLY)},name(){let t=this.getTranslatedPhrase(tt.CONTEXTMENU_ITEMS_READ_ONLY);return bi(this.getSelectedRange(),((t,e)=>this.getCellMeta(t,e).readOnly))&&(t=wi(t)),t},callback(){const t=this.getSelectedRange(),e=bi(t,((t,e)=>this.getCellMeta(t,e).readOnly));(0,c.z0)(t,(t=>{t.forAll(((t,o)=>{t>=0&&o>=0&&this.setCellMeta(t,o,"readOnly",!e)}))})),this.render()},disabled(){const t=this.getSelectedRangeLast();return!(t&&!t.isSingleHeader()&&!this.selection.isSelectedByCorner()&&0!==this.countRows()&&0!==this.countCols()&&this.getSelectedRange()&&0!==this.getSelectedRange().length)}}},[Zi]:function(){return{key:Zi,name(){return this.getTranslatedPhrase(tt.CONTEXTMENU_ITEMS_ALIGNMENT)},disabled(){if(0===this.countRows()||0===this.countCols())return!0;const t=this.getSelectedRangeLast();return!t||!!t.isSingleHeader()||!(this.getSelectedRange()&&!this.selection.isSelectedByCorner())},submenu:{items:[{key:`${Zi}:left`,name(){return this.getTranslatedPhrase(tt.CONTEXTMENU_ITEMS_ALIGNMENT_LEFT)},callback(){const t=this.getSelectedRange(),e=pi(t,((t,e)=>this.getCellMeta(t,e).className)),o="horizontal",n="htLeft";this.runHooks("beforeCellAlignment",e,t,o,n),mi(t,o,n,((t,e)=>this.getCellMeta(t,e)),((t,e,o,n)=>this.setCellMeta(t,e,o,n))),this.render()},disabled:!1},{key:`${Zi}:center`,name(){return this.getTranslatedPhrase(tt.CONTEXTMENU_ITEMS_ALIGNMENT_CENTER)},callback(){const t=this.getSelectedRange(),e=pi(t,((t,e)=>this.getCellMeta(t,e).className)),o="horizontal",n="htCenter";this.runHooks("beforeCellAlignment",e,t,o,n),mi(t,o,n,((t,e)=>this.getCellMeta(t,e)),((t,e,o,n)=>this.setCellMeta(t,e,o,n))),this.render()},disabled:!1},{key:`${Zi}:right`,name(){return this.getTranslatedPhrase(tt.CONTEXTMENU_ITEMS_ALIGNMENT_RIGHT)},callback(){const t=this.getSelectedRange(),e=pi(t,((t,e)=>this.getCellMeta(t,e).className)),o="horizontal",n="htRight";this.runHooks("beforeCellAlignment",e,t,o,n),mi(t,o,n,((t,e)=>this.getCellMeta(t,e)),((t,e,o,n)=>this.setCellMeta(t,e,o,n))),this.render()},disabled:!1},{key:`${Zi}:justify`,name(){return this.getTranslatedPhrase(tt.CONTEXTMENU_ITEMS_ALIGNMENT_JUSTIFY)},callback(){const t=this.getSelectedRange(),e=pi(t,((t,e)=>this.getCellMeta(t,e).className)),o="horizontal",n="htJustify";this.runHooks("beforeCellAlignment",e,t,o,n),mi(t,o,n,((t,e)=>this.getCellMeta(t,e)),((t,e,o,n)=>this.setCellMeta(t,e,o,n))),this.render()},disabled:!1},{name:fi},{key:`${Zi}:top`,name(){return this.getTranslatedPhrase(tt.CONTEXTMENU_ITEMS_ALIGNMENT_TOP)},callback(){const t=this.getSelectedRange(),e=pi(t,((t,e)=>this.getCellMeta(t,e).className)),o="vertical",n="htTop";this.runHooks("beforeCellAlignment",e,t,o,n),mi(t,o,n,((t,e)=>this.getCellMeta(t,e)),((t,e,o,n)=>this.setCellMeta(t,e,o,n))),this.render()},disabled:!1},{key:`${Zi}:middle`,name(){return this.getTranslatedPhrase(tt.CONTEXTMENU_ITEMS_ALIGNMENT_MIDDLE)},callback(){const t=this.getSelectedRange(),e=pi(t,((t,e)=>this.getCellMeta(t,e).className)),o="vertical",n="htMiddle";this.runHooks("beforeCellAlignment",e,t,o,n),mi(t,o,n,((t,e)=>this.getCellMeta(t,e)),((t,e,o,n)=>this.setCellMeta(t,e,o,n))),this.render()},disabled:!1},{key:`${Zi}:bottom`,name(){return this.getTranslatedPhrase(tt.CONTEXTMENU_ITEMS_ALIGNMENT_BOTTOM)},callback(){const t=this.getSelectedRange(),e=pi(t,((t,e)=>this.getCellMeta(t,e).className)),o="vertical",n="htBottom";this.runHooks("beforeCellAlignment",e,t,o,n),mi(t,o,n,((t,e)=>this.getCellMeta(t,e)),((t,e,o,n)=>this.setCellMeta(t,e,o,n))),this.render()},disabled:!1}]}}}};function fr(){const t={};return(0,s.v4)(gr,((e,o)=>{t[o]=e()})),t}function pr(t,e,o){return(e=function(t){var e=function(t){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var o=e.call(t,"string");if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[e]=o,t}class mr{constructor(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;pr(this,"hot",void 0),pr(this,"predefinedItems",fr()),pr(this,"defaultOrderPattern",void 0),this.hot=t,this.defaultOrderPattern=e}setPredefinedItems(t){const e={};this.defaultOrderPattern.length=0,(0,s.v4)(t,((t,o)=>{let n="";t.name===fi?(e[fi]=t,n=fi):isNaN(parseInt(o,10))?(t.key=void 0===t.key?o:t.key,e[o]=t,n=t.key):(e[t.key]=t,n=t.key),this.defaultOrderPattern.push(n)})),this.predefinedItems=e}getItems(){return function(){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const o=[];let n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return n&&n.items?n=n.items:Array.isArray(n)||(n=t),(0,s.Gv)(n)?(0,s.v4)(n,((t,n)=>{let i=e["string"==typeof t?t:n];i||(i=t),(0,s.Gv)(t)?(0,s.X$)(i,t):"string"==typeof i&&(i={name:i}),void 0===i.key&&(i.key=n),o.push(i)})):(0,c.z0)(n,((t,n)=>{let i=e[t];!i&&ur.indexOf(t)>=0||(i||(i={name:t,key:`${n}`}),(0,s.Gv)(t)&&(0,s.X$)(i,t),void 0===i.key&&(i.key=n),o.push(i))})),o}(arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,this.defaultOrderPattern,this.predefinedItems)}}function wr(t,e,o){return(e=function(t){var e=function(t){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var o=e.call(t,"string");if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[e]=o,t}class br{constructor(t,e){wr(this,"top",void 0),wr(this,"topRelative",void 0),wr(this,"left",void 0),wr(this,"leftRelative",void 0),wr(this,"scrollTop",void 0),wr(this,"scrollLeft",void 0),wr(this,"cellHeight",void 0),wr(this,"cellWidth",void 0);const o=e.scrollY,n=e.scrollX;let i,r,s,l,a,h;this.rootWindow=e,this.type=this.getSourceType(t),"literal"===this.type?(i=parseInt(t.top,10),s=parseInt(t.left,10),a=t.height||0,h=t.width||0,r=i,l=s,i+=o,s+=n):"event"===this.type&&(i=parseInt(t.pageY,10),s=parseInt(t.pageX,10),a=t.target.clientHeight,h=t.target.clientWidth,r=i-o,l=s-n),this.top=i,this.topRelative=r,this.left=s,this.leftRelative=l,this.scrollTop=o,this.scrollLeft=n,this.cellHeight=a,this.cellWidth=h}getSourceType(t){let e="literal";return t instanceof Event&&(e="event"),e}fitsAbove(t){return this.topRelative>=t.offsetHeight}fitsBelow(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.rootWindow.innerHeight;return this.topRelative+t.offsetHeight<=e}fitsOnRight(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.rootWindow.innerWidth;return this.leftRelative+this.cellWidth+t.offsetWidth<=e}fitsOnLeft(t){return this.leftRelative>=t.offsetWidth}}function vr(t,e,o){(function(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")})(t,e),e.set(t,o)}function yr(t,e){return t.get(Sr(t,e))}function Cr(t,e,o){return t.set(Sr(t,e),o),o}function Sr(t,e,o){if("function"==typeof t?t===e:t.has(e))return arguments.length<3?e:o;throw new TypeError("Private element is not present on this object")}var Rr=new WeakMap,Er=new WeakMap,Tr=new WeakMap,xr=new WeakMap,Mr=new WeakMap;class Ir{constructor(t){vr(this,Rr,void 0),vr(this,Er,void 0),vr(this,Tr,void 0),vr(this,xr,!1),vr(this,Mr,{above:0,below:0,left:0,right:0}),Cr(xr,this,t)}setOffset(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return yr(Mr,this)[t]=e,this}setElement(t){return Cr(Rr,this,t),this}setParentElement(t){return Cr(Er,this,t),this}updatePosition(t){Cr(Tr,this,new br(t,yr(Rr,this).ownerDocument.defaultView)),yr(xr,this)?(yr(Tr,this).fitsBelow(yr(Rr,this))?this.setPositionBelowCursor():yr(Tr,this).fitsAbove(yr(Rr,this))?this.setPositionAboveCursor():this.setPositionBelowCursor(),this.updateHorizontalPosition()):(this.setPositionBelowCursor(),this.setPositionOnRightOfCursor())}updateHorizontalPosition(){"rtl"===yr(Rr,this).dir?yr(Tr,this).fitsOnLeft(yr(Rr,this))?this.setPositionOnLeftOfCursor():this.setPositionOnRightOfCursor():yr(Tr,this).fitsOnRight(yr(Rr,this))?this.setPositionOnRightOfCursor():this.setPositionOnLeftOfCursor()}setPositionAboveCursor(){let t=yr(Mr,this).above+yr(Tr,this).top-yr(Rr,this).offsetHeight;if(yr(Er,this)){const e=yr(Er,this).ownerDocument.defaultView.getComputedStyle(yr(Er,this).querySelector(".ht_master")),o=Number.parseInt(e.paddingTop,10),n=Number.parseInt(e.borderTop,10);t=yr(Tr,this).top+yr(Tr,this).cellHeight-yr(Rr,this).scrollHeight+o+n}yr(Rr,this).style.top=`${t}px`}setPositionBelowCursor(){let t=yr(Mr,this).below+yr(Tr,this).top+1;if(yr(Er,this)){const e=yr(Er,this).ownerDocument.defaultView.getComputedStyle(yr(Er,this).querySelector(".ht_master")),o=Number.parseInt(e.paddingTop,10),n=Number.parseInt(e.borderTop,10);t=yr(Tr,this).top-o-n-1}yr(Rr,this).style.top=`${t}px`}setPositionOnRightOfCursor(){let t=yr(Tr,this).left;if(yr(Er,this)){const e=yr(Er,this).ownerDocument.defaultView,o=Number.parseInt(e.getComputedStyle(yr(Er,this).querySelector(".htCore")).borderRightWidth,10);t+=yr(Tr,this).cellWidth+o}else t+=yr(Mr,this).right;yr(Rr,this).style.left=`${t}px`}setPositionOnLeftOfCursor(){let t=yr(Mr,this).left+yr(Tr,this).left-yr(Rr,this).offsetWidth;if(yr(Er,this)){const e=yr(Er,this).ownerDocument.defaultView;t-=Number.parseInt(e.getComputedStyle(yr(Er,this).querySelector(".htCore")).borderLeftWidth,10)}yr(Rr,this).style.left=`${t}px`}}function Hr(t){let{initialPage:e=-1,size:o=()=>0,onItemSelect:n=()=>{},onClear:i=()=>{}}=t;const r=new Set;let s=(0,ut.qE)(e,-1,a()-1);function l(t,e){const o=a()-1;return t<0&&(t=o),t>o&&(t=0),r.has(t)?-1:(r.add(t),!1===n(t,!1)&&(t=l(1===e?++t:--t,e)),t)}function a(){return Math.max(o(),0)}return{setCurrentPage:function(t){t>-1&&t<a()&&!1!==n(t,!0)&&(s=t)},getCurrentPage:function(){return s},toFirstItem:function(){a()>0&&(r.clear(),s=l(0,1))},toLastItem:function(){a()>0&&(r.clear(),s=l(a()-1,-1))},toNextItem:function(){a()>0&&(r.clear(),s=l(++s,1))},toPreviousItem:function(){a()>0&&(r.clear(),s=l(--s,-1))},getSize:a,clear:function(){r.clear(),s=e,i()}}}function Or(t){return(0,s.mQ)(t,"submenu")}function Ar(t){return new RegExp(fi,"i").test(t.name)}function kr(t,e){return!0===t.disabled||"function"==typeof t.disabled&&!0===t.disabled.call(e)}function _r(t){return(0,s.mQ)(t,"disableSelection")}function Nr(t,e){const o=t.slice(0);for(let t=0;t<o.length&&o[t].name===e;)o.shift();return o}const Pr="menu",Lr=Pr;function Dr(t,e,o){(function(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")})(t,e),e.set(t,o)}function Vr(t,e,o){return(e=function(t){var e=function(t){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var o=e.call(t,"string");if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[e]=o,t}function Fr(t,e,o){return t.set(Wr(t,e),o),o}function Br(t,e){return t.get(Wr(t,e))}function Wr(t,e,o){if("function"==typeof t?t===e:t.has(e))return arguments.length<3?e:o;throw new TypeError("Private element is not present on this object")}var zr=new WeakMap,jr=new WeakMap,Ur=new WeakMap;class $r{get tableBorderWidth(){return void 0===Br(Ur,this)&&this.hotMenu&&Fr(Ur,this,parseInt(this.hotMenu.rootWindow.getComputedStyle(this.hotMenu.view._wt.wtTable.TABLE).borderWidth,10)),Br(Ur,this)}constructor(t,e){var o=this;Vr(this,"hot",void 0),Vr(this,"options",void 0),Vr(this,"eventManager",new K.A(this)),Vr(this,"container",void 0),Vr(this,"positioner",void 0),Vr(this,"hotMenu",null),Vr(this,"hotSubMenus",{}),Vr(this,"parentMenu",void 0),Vr(this,"menuItems",null),Vr(this,"origOutsideClickDeselects",null),Dr(this,zr,void 0),Dr(this,jr,void 0),Dr(this,Ur,void 0),this.hot=t,this.options=e||{parent:null,name:null,className:"",keepInViewport:!0,standalone:!1,minWidth:215,container:this.hot.rootDocument.documentElement},this.container=this.createContainer(this.options.name),this.positioner=new Ir(this.options.keepInViewport),this.parentMenu=this.options.parent||null,this.registerEvents(),this.isSubMenu()&&this.addLocalHook("afterSelectionChange",(function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return o.parentMenu.runLocalHooks("afterSelectionChange",...e)})),this.hot.addHook("afterSetTheme",((t,e)=>{var o;e||null===(o=this.hotMenu)||void 0===o||o.useTheme(t)}))}registerEvents(){let t=this.hot.rootWindow;for(;t;)this.eventManager.addEventListener(t.document,"mousedown",(t=>this.onDocumentMouseDown(t))),this.eventManager.addEventListener(t.document,"touchstart",(t=>this.onDocumentMouseDown(t))),this.eventManager.addEventListener(t.document,"contextmenu",(t=>this.onDocumentContextMenu(t))),t=(0,i.Ly)(t)}setMenuItems(t){this.menuItems=t}getNavigator(){return Br(zr,this)}getKeyboardShortcutsCtrl(){return Br(jr,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 t=(0,m.sg)((t=>this.openSubMenu(t)),300),e=this.options.minWidth||215;let o=!1,n=(0,c.y0)(this.menuItems,(t=>(t.key===cr&&(o=!0),function(t,e){return!t.hidden||!("function"==typeof t.hidden&&t.hidden.call(e))}(t,this.hot))));if(n.length<1&&!o)n.push(fr()[cr]);else if(0===n.length)return;n=function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:fi,o=t.slice(0);return o=Nr(o,e),o=function(t,e){let o=t.slice(0);return o.reverse(),o=Nr(o,e),o.reverse(),o}(o,e),o=function(t){const e=[];return(0,c.z0)(t,((t,o)=>{o>0?e[e.length-1].name!==t.name&&e.push(t):e.push(t)})),e}(o),o}(n,fi);let s=!1;const l={data:n,colHeaders:!1,autoColumnSize:!0,autoWrapRow:!1,modifyColWidth:t=>(0,d.O9)(t)&&t<e?e:t,autoRowSize:!1,readOnly:!0,editor:!1,copyPaste:!1,hiddenRows:!0,maxCols:1,columns:[{data:"name",renderer:(a=this.hot,(t,e,o,n,r,s)=>{const l=t.getSourceDataAtRow(o),h=a.rootDocument.createElement("div"),c="function"==typeof s?s.call(a):s,d="function"==typeof l.ariaLabel?l.ariaLabel.call(a):l.ariaLabel,u="function"==typeof l.ariaChecked?l.ariaChecked.call(a):l.ariaChecked;if((0,i.Ie)(e),(0,i.iQ)(h,"htItemWrapper"),a.getSettings().ariaTags){const t=!kr(l,a)&&!_r(l)&&!Ar(l);(0,i.Bq)(e,[...(g=l,!0===g.checkable?[(0,p.pt)(),(0,p.SM)(d),(0,p.Xq)(u)]:[(0,p.ZA)(),(0,p.SM)(c)]),...t?[(0,p.vC)(-1)]:[],...kr(l,a)?[(0,p._R)()]:[],...Or(l)?[(0,p.dV)(!1)]:[]])}var g;e.className="",e.appendChild(h),Ar(l)?(0,i.iQ)(e,"htSeparator"):"function"==typeof l.renderer?((0,i.iQ)(e,"htCustomMenuRenderer"),e.appendChild(l.renderer(t,h,o,n,r,c))):(0,i.Mv)(h,c),kr(l,a)?(0,i.iQ)(e,"htDisabled"):_r(l)?(0,i.iQ)(e,"htSelectionDisabled"):Or(l)&&(0,i.iQ)(e,"htSubmenu")})}],renderAllRows:!0,fragmentSelection:!1,outsideClickDeselects:!1,disableVisualSelection:"area",layoutDirection:this.hot.isRtl()?"rtl":"ltr",ariaTags:!1,themeName:this.hot.getCurrentThemeName(),beforeRefreshDimensions:()=>!1,beforeOnCellMouseOver:(t,e)=>{Br(zr,this).setCurrentPage(e.row)},afterOnCellMouseOver:(e,o)=>{this.isAllSubMenusClosed()?t(o.row):this.openSubMenu(o.row)},afterOnCellContextMenu:t=>{t.preventDefault(),(0,A.Yh)()&&s&&this.hasSelectedItem()&&this.close(!0)},afterSelection:(t,e,o,n,i)=>{this.hotMenu.view.isMouseDown()&&(i.value=!0),this.runLocalHooks("afterSelectionChange",this.getSelectedItem())},beforeOnCellMouseUp:t=>{this.hasSelectedItem()&&(s=!this.isCommandPassive(this.getSelectedItem()),this.executeCommand(t))},afterOnCellMouseUp:t=>{(0,A.Yh)()&&(0,r.nO)(t)||!s||!this.hasSelectedItem()||((0,A.rr)()||(0,A.zG)()?this.hot._registerTimeout((()=>this.close(!0)),325):this.close(!0))},afterUnlisten:()=>{!this.hasSelectedItem()&&this.isOpened()&&this.hotMenu.listen()}};var a,h;this.origOutsideClickDeselects=this.hot.getSettings().outsideClickDeselects,this.hot.getSettings().outsideClickDeselects=!1,this.hotMenu=new this.hot.constructor(this.container,l),this.hotMenu.addHook("afterInit",(()=>this.onAfterInit())),this.hotMenu.init(),Fr(zr,this,(h=this.hotMenu,Hr({size:()=>h.countRows(),onItemSelect(t,e){const o=h.getCell(t,0);if(!o||function(t){return(0,i.nB)(t,"htSeparator")}(o)||function(t){return(0,i.nB)(t,"htDisabled")}(o)||function(t){return(0,i.nB)(t,"htSelectionDisabled")}(o))return!1;h.selectCell(t,0,...e?[t,0,!1,!1]:[])},onClear(){h.deselectCell()}}))),Fr(jr,this,function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];const o=[];function n(t,e){s(e).addShortcuts(t,{group:Pr})}function i(t,e){const i=s(e);t.forEach((t=>{let{keys:e}=t;e.forEach((t=>i.removeShortcutsByKeys(t)))})),o.push({shortcuts:t,contextName:e}),n(t,e)}function r(t){return t?`${Lr}:${t}`:Lr}function s(e){var o;const n=t.hotMenu.getShortcutManager(),i=r(e);return null!==(o=n.getContext(i))&&void 0!==o?o:n.addContext(i)}return n(function(t){const{hot:e,hotMenu:o}=t;return[{keys:[["Control/Meta","A"]],forwardToContext:e.getShortcutManager().getContext("grid"),callback:()=>t.close(!0)},{keys:[["Tab"],["Shift","Tab"]],callback:(o,n)=>{const i=e.getSettings(),r="function"==typeof i.tabMoves?i.tabMoves(o):i.tabMoves;n.includes("shift")?e.selection.transformStart(-r.row,-r.col):e.selection.transformStart(r.row,r.col),t.close(!0)}},{keys:[["Escape"]],callback:()=>t.close()},{keys:[["ArrowDown"]],callback:()=>t.getNavigator().toNextItem()},{keys:[["ArrowUp"]],callback:()=>t.getNavigator().toPreviousItem()},{keys:[[e.isRtl()?"ArrowLeft":"ArrowRight"]],callback:()=>{const e=o.getSelectedLast();if(e){const o=t.openSubMenu(e[0]);o&&o.getNavigator().toFirstItem()}}},{keys:[[e.isRtl()?"ArrowRight":"ArrowLeft"]],callback:()=>{o.getSelectedLast()&&t.isSubMenu()&&(t.close(),t.isSubMenu()&&t.parentMenu.hotMenu.listen())}},{keys:[["Control/Meta","ArrowUp"],["Home"]],callback:()=>t.getNavigator().toFirstItem()},{keys:[["Control/Meta","ArrowDown"],["End"]],callback:()=>t.getNavigator().toLastItem()},{keys:[["Enter"],["Space"]],callback:e=>{const n=o.getSelectedLast();n&&(o.getSourceDataAtRow(n[0]).submenu?t.openSubMenu(n[0]).getNavigator().toFirstItem():(t.executeCommand(e),t.close(!0)))}},{keys:[["PageUp"]],callback:()=>{o.getSelectedLast()?o.selection.transformStart(-o.countVisibleRows(),0):t.getNavigator().toFirstItem()}},{keys:[["PageDown"]],callback:()=>{o.getSelectedLast()?o.selection.transformStart(o.countVisibleRows(),0):t.getNavigator().toLastItem()}}]}(t)),e.forEach((t=>{let{shortcuts:e,contextName:o}=t;i(e,o)})),{addCustomShortcuts:i,getCustomShortcuts:function(){return[...o]},getContext:s,listen:function(e){t.hotMenu.getShortcutManager().setActiveContextName(r(e))}}}(this)),Br(jr,this).listen(),this.focus(),this.isSubMenu()&&this.addLocalHook("afterOpen",(()=>this.parentMenu.runLocalHooks("afterSubmenuOpen",this))),this.runLocalHooks("afterOpen",this)}close(){let t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(this.isOpened())if(t&&this.isSubMenu())this.parentMenu.close();else if(Br(zr,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 t=this.parentMenu.hotMenu.getSelectedLast();if(t){const e=this.parentMenu.hotMenu.getCell(t[0],0);(0,i.Bq)(e,[(0,p.dV)(!1)])}}this.parentMenu.hotMenu.listen()}}openSubMenu(t){if(!this.hotMenu)return!1;const e=this.hotMenu.getCell(t,0);if(this.closeAllSubMenus(),!e||!function(t){return(0,i.nB)(t,"htSubmenu")}(e))return!1;const o=this.hotMenu.getSourceDataAtRow(t),n=new $r(this.hot,{parent:this,name:o.name,className:this.options.className,keepInViewport:!0,container:this.options.container});return n.setMenuItems(o.submenu.items),n.open(),n.setPosition(e.getBoundingClientRect()),this.hotSubMenus[o.key]=n,this.hot.getSettings().ariaTags&&(0,i.Bq)(e,[(0,p.dV)(!0)]),n}closeSubMenu(t){const e=this.hotMenu.getSourceDataAtRow(t),o=this.hotSubMenus[e.key];if(o){o.destroy(),delete this.hotSubMenus[e.key];const n=this.hotMenu.getCell(t,0);this.hot.getSettings().ariaTags&&(0,i.Bq)(n,[(0,p.dV)(!1)])}}closeAllSubMenus(){(0,c.z0)(this.hotMenu.getData(),((t,e)=>this.closeSubMenu(e)))}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 t=this.container.parentNode;this.clearLocalHooks(),this.close(),this.parentMenu=null,this.eventManager.destroy(),t&&t.removeChild(this.container)}isOpened(){return null!==this.hotMenu}executeCommand(t){if(!this.isOpened()||!this.hasSelectedItem())return;const e=this.getSelectedItem();if(this.runLocalHooks("select",e,t),this.isCommandPassive(e))return;const o=this.hot.getSelectedRange(),n=o?function(t){return(0,c.YD)(t,(t=>({start:t.getTopStartCorner(),end:t.getBottomEndCorner()})))}(o):[];this.runLocalHooks("executeCommand",e.key,n,t),this.isSubMenu()&&this.parentMenu.runLocalHooks("executeCommand",e.key,n,t)}isCommandPassive(t){return!1===t.isCommand||Ar(t)||kr(t,this.hot)||Or(t)}setOffset(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;this.positioner.setOffset(t,e)}setPosition(t){this.isSubMenu()&&this.positioner.setParentElement(this.parentMenu.container),this.positioner.setElement(this.container).updatePosition(t)}updateMenuDimensions(){const t=this.hotMenu.view.getStylesHandler(),{wtTable:e}=this.hotMenu.view._wt,o=this.hotMenu.getSettings().data,n=e.hider.style,r=e.holder.style,s=parseInt(n.width,10),l=(0,c.mu)(o,((t,e,o)=>{const n=this.hotMenu.getCell(o,0)?(0,i.DK)(this.hotMenu.getCell(o,0)):0;return t+(e.name===fi?1:n)}),0);t.isClassicTheme()?(r.width=`${s+3}px`,r.height=`${l+3}px`):(r.width=`${s}px`,r.height=`${l}px`),n.height=r.height}createContainer(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;const e=this.options.container.ownerDocument;let o,n=t;return n&&((0,m.Tn)(n)&&(n=n.call(this.hot),n=null===n||(0,d.b0)(n)?"":n.toString()),n=n.replace(/[^A-Za-z0-9]/g,"_"),n=`${this.options.className}Sub_${n}`,o=e.querySelector(`.${this.options.className}.${n}`)),o||(o=e.createElement("div"),(0,i.iQ)(o,`htMenu handsontable ${this.options.className}`),n&&(0,i.iQ)(o,n),this.options.container.appendChild(o)),o}onAfterInit(){this.updateMenuDimensions(),this.hot.getSettings().ariaTags&&(0,i.Bq)(this.hotMenu.rootElement,[(0,p.nF)(),(0,p.vC)(-1)])}onDocumentMouseDown(t){this.isOpened()&&(this.options.standalone&&this.hotMenu&&!(0,i.aO)(t.target,this.hotMenu.rootElement)?this.close(!0):!this.isAllSubMenusClosed()&&!this.isSubMenu()||(0,i.aO)(t.target,".htMenu")||this.close(!0))}onDocumentContextMenu(t){this.isOpened()&&(0,i.nB)(t.target,"htCore")&&(0,i.aO)(t.target,this.hotMenu.rootElement)&&t.preventDefault()}}function Gr(t,e,o){return(e=function(t){var e=function(t){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var o=e.call(t,"string");if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[e]=o,t}function Yr(t,e,o){if("function"==typeof t?t===e:t.has(e))return arguments.length<3?e:o;throw new TypeError("Private element is not present on this object")}(0,s.co)($r,Bn.A);const Xr="contextMenu",qr=Xr;Z.R.getSingleton().register("afterContextMenuDefaultOptions"),Z.R.getSingleton().register("beforeContextMenuShow"),Z.R.getSingleton().register("afterContextMenuShow"),Z.R.getSingleton().register("afterContextMenuHide"),Z.R.getSingleton().register("afterContextMenuExecute");var Kr=new WeakSet;class Qr extends Kt{constructor(){var t,e;super(...arguments),function(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}(t=this,e=Kr),e.add(t),Gr(this,"commandExecutor",new Ji(this.hot)),Gr(this,"itemsFactory",null),Gr(this,"menu",null)}static get PLUGIN_KEY(){return Xr}static get PLUGIN_PRIORITY(){return 70}static get PLUGIN_DEPS(){return["plugin:AutoColumnSize"]}static get DEFAULT_ITEMS(){return[ar,hr,fi,er,or,fi,lr,sr,fi,dr,ir,fi,nr,fi,Zi]}isEnabled(){return!!this.hot.getSettings()[Xr]}enablePlugin(){var t=this;if(this.enabled)return;const e=this.hot.getSettings()[Xr];"function"==typeof e.callback&&this.commandExecutor.setCommonCallback(e.callback),this.menu=new $r(this.hot,{className:"htContextMenu",keepInViewport:!0,container:e.uiContainer||this.hot.rootDocument.body}),this.menu.addLocalHook("beforeOpen",(()=>Yr(Kr,this,Zr).call(this))),this.menu.addLocalHook("afterOpen",(()=>Yr(Kr,this,ts).call(this))),this.menu.addLocalHook("afterClose",(()=>Yr(Kr,this,es).call(this))),this.menu.addLocalHook("executeCommand",(function(){for(var e=arguments.length,o=new Array(e),n=0;n<e;n++)o[n]=arguments[n];return t.executeCommand.call(t,...o)})),this.addHook("afterOnCellContextMenu",(t=>Yr(Kr,this,Jr).call(this,t))),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:t}=this.hot.getSelectedRangeLast();this.hot.scrollToFocusedCell();const e=this.hot.getCell(t.row,t.col,!0).getBoundingClientRect(),o=vi(this.menu.container,this.hot.rootDocument);this.open({left:e.left+o.left,top:e.top+o.top-1+e.height},{left:e.width,above:-e.height}),this.menu.getNavigator().toFirstItem()},runOnlyIf:()=>{var t;const e=null===(t=this.hot.getSelectedRangeLast())||void 0===t?void 0:t.highlight;return e&&this.hot.selection.isCellVisible(e)&&!this.menu.isOpened()},group:qr})}unregisterShortcuts(){this.hot.getShortcutManager().getContext("grid").removeShortcutsByGroup(qr)}open(t){var e;let o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{above:0,below:0,left:0,right:0};if(null!==(e=this.menu)&&void 0!==e&&e.isOpened())return;this.prepareMenuItems(),this.menu.open();const n=this.menu.tableBorderWidth>0;(0,s.v4)(o,((t,e)=>{const o=["below","right"].includes(e)?t+1:t-1;this.menu.setOffset(e,n?t:o)})),this.menu.setPosition(t)}close(){var t;null===(t=this.menu)||void 0===t||t.close(),this.itemsFactory=null}executeCommand(t){null===this.itemsFactory&&this.prepareMenuItems();for(var e=arguments.length,o=new Array(e>1?e-1:0),n=1;n<e;n++)o[n-1]=arguments[n];this.commandExecutor.execute(t,...o)}prepareMenuItems(){this.itemsFactory=new mr(this.hot,Qr.DEFAULT_ITEMS);const t=this.hot.getSettings()[Xr],e={items:this.itemsFactory.getItems(t)};this.hot.runHooks("afterContextMenuDefaultOptions",e),this.itemsFactory.setPredefinedItems(e.items);const o=this.itemsFactory.getItems(t);this.hot.runHooks("beforeContextMenuSetItems",o),this.menu.setMenuItems(o),(0,c.z0)(o,(t=>this.commandExecutor.registerCommand(t.key,t)))}destroy(){this.close(),this.menu&&this.menu.destroy(),super.destroy()}}function Jr(t){const e=this.hot.getSettings(),o=e.rowHeaders,n=e.colHeaders,r=t.target;if(this.close(),(0,i.nB)(r,"handsontableInput"))return;if(t.preventDefault(),t.stopPropagation(),!o&&!n&&!(function(t){return"TD"===t.nodeName||"TD"===t.parentNode.nodeName}(r)||(0,i.nB)(r,"current")&&(0,i.nB)(r,"wtBorder")))return;const s=vi(this.menu.container,this.hot.rootDocument);this.open({top:t.clientY+s.top,left:t.clientX+s.left})}function Zr(){this.hot.runHooks("beforeContextMenuShow",this)}function ts(){this.hot.runHooks("afterContextMenuShow",this)}function es(){this.hot.listen(),this.hot.runHooks("afterContextMenuHide",this)}Qr.SEPARATOR={name:fi};var os=o(3431);class ns{constructor(){this.data={}}setData(t,e){this.data[t]=e}getData(t){return this.data[t]||void 0}}class is{constructor(){this.clipboardData=new ns}preventDefault(){}composedPath(){return[]}}function rs(t,e,o){ss(t,e),e.set(t,o)}function ss(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function ls(t,e){return t.get(hs(t,e))}function as(t,e,o){return t.set(hs(t,e),o),o}function hs(t,e,o){if("function"==typeof t?t===e:t.has(e))return arguments.length<3?e:o;throw new TypeError("Private element is not present on this object")}var cs=new WeakMap,ds=new WeakMap,us=new WeakMap,gs=new WeakMap,fs=new WeakMap,ps=new WeakMap,ms=new WeakSet;class ws{constructor(t){let{countRows:e,countColumns:o,rowsLimit:n,columnsLimit:i,countColumnHeaders:r}=t;var s;ss(this,s=ms),s.add(this),rs(this,cs,void 0),rs(this,ds,void 0),rs(this,us,void 0),rs(this,gs,void 0),rs(this,fs,void 0),rs(this,ps,void 0),as(ds,this,e),as(us,this,o),as(gs,this,n),as(fs,this,i),as(ps,this,r)}setSelectedRange(t){as(cs,this,t)}getCellsRange(){if(0===ls(ds,this).call(this)||0===ls(us,this).call(this))return null;const{row:t,col:e}=ls(cs,this).getTopStartCorner(),{row:o,col:n}=ls(cs,this).getBottomEndCorner(),i=hs(ms,this,vs).call(this,t,o),r=hs(ms,this,bs).call(this,e,n);return{isRangeTrimmed:o!==i||n!==r,startRow:t,startCol:e,endRow:i,endCol:r}}getMostBottomColumnHeadersRange(){if(0===ls(us,this).call(this)||0===ls(ps,this).call(this))return null;const{col:t}=ls(cs,this).getTopStartCorner(),{col:e}=ls(cs,this).getBottomEndCorner(),o=hs(ms,this,bs).call(this,t,e);return{isRangeTrimmed:e!==o,startRow:-1,startCol:t,endRow:-1,endCol:o}}getAllColumnHeadersRange(){if(0===ls(us,this).call(this)||0===ls(ps,this).call(this))return null;const{col:t}=ls(cs,this).getTopStartCorner(),{col:e}=ls(cs,this).getBottomEndCorner(),o=hs(ms,this,bs).call(this,t,e);return{isRangeTrimmed:e!==o,startRow:-ls(ps,this).call(this),startCol:t,endRow:-1,endCol:o}}}function bs(t,e){return Math.min(e,Math.max(t+ls(fs,this).call(this)-1,t))}function vs(t,e){return Math.min(e,Math.max(t+ls(gs,this).call(this)-1,t))}function ys(t){const e=[],o=[];return(0,c.z0)(t,(t=>{const n=Math.min(t.startRow,t.endRow),i=Math.max(t.startRow,t.endRow);(0,ut.Ti)(n,i,(t=>{-1===e.indexOf(t)&&e.push(t)}));const r=Math.min(t.startCol,t.endCol),s=Math.max(t.startCol,t.endCol);(0,ut.Ti)(r,s,(t=>{-1===o.indexOf(t)&&o.push(t)}))})),{rows:e,columns:o}}var Cs=o(2257);function Ss(t,e,o){Rs(t,e),e.set(t,o)}function Rs(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Es(t,e,o){return(e=function(t){var e=function(t){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var o=e.call(t,"string");if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[e]=o,t}function Ts(t,e){return t.get(Ms(t,e))}function xs(t,e,o){return t.set(Ms(t,e),o),o}function Ms(t,e,o){if("function"==typeof t?t===e:t.has(e))return arguments.length<3?e:o;throw new TypeError("Private element is not present on this object")}Z.R.getSingleton().register("afterCopyLimit"),Z.R.getSingleton().register("modifyCopyableRange"),Z.R.getSingleton().register("beforeCut"),Z.R.getSingleton().register("afterCut"),Z.R.getSingleton().register("beforePaste"),Z.R.getSingleton().register("afterPaste"),Z.R.getSingleton().register("beforeCopy"),Z.R.getSingleton().register("afterCopy");const Is="copyPaste",Hs=["fragmentSelection"],Os=['<meta name="generator" content="Handsontable"/>','<style type="text/css">td{white-space:normal}br{mso-data-placement:same-cell}</style>'].join("");var As=new WeakMap,ks=new WeakMap,_s=new WeakMap,Ns=new WeakMap,Ps=new WeakMap,Ls=new WeakMap,Ds=new WeakMap,Vs=new WeakMap,Fs=new WeakSet;class Bs extends Kt{constructor(){var t;super(...arguments),Rs(this,t=Fs),t.add(this),Es(this,"columnsLimit",1/0),Es(this,"rowsLimit",1/0),Es(this,"pasteMode","overwrite"),Es(this,"uiContainer",this.hot.rootDocument.body),Ss(this,As,!1),Ss(this,ks,!1),Ss(this,_s,!1),Ss(this,Ns,"cells-only"),Ss(this,Ps,!1),Ss(this,Ls,!1),Ss(this,Ds,new ws({countRows:()=>this.hot.countRows(),countColumns:()=>this.hot.countCols(),rowsLimit:()=>this.rowsLimit,columnsLimit:()=>this.columnsLimit,countColumnHeaders:()=>this.hot.view.getColumnHeadersCount()})),Ss(this,Vs,!1),Es(this,"copyableRanges",[])}static get PLUGIN_KEY(){return Is}static get SETTING_KEYS(){return[Is,...Hs]}static get PLUGIN_PRIORITY(){return 80}static get DEFAULT_SETTINGS(){return{pasteMode:"overwrite",rowsLimit:1/0,columnsLimit:1/0,copyColumnHeaders:!1,copyColumnGroupHeaders:!1,copyColumnHeadersOnly:!1}}isEnabled(){return!!this.hot.getSettings()[Is]}enablePlugin(){var t,e,o=this;this.enabled||(this.pasteMode=null!==(t=this.getSetting("pasteMode"))&&void 0!==t?t:this.pasteMode,this.rowsLimit=isNaN(this.getSetting("rowsLimit"))?this.rowsLimit:this.getSetting("rowsLimit"),this.columnsLimit=isNaN(this.getSetting("columnsLimit"))?this.columnsLimit:this.getSetting("columnsLimit"),xs(As,this,this.getSetting("copyColumnHeaders")),xs(ks,this,this.getSetting("copyColumnGroupHeaders")),xs(_s,this,this.getSetting("copyColumnHeadersOnly")),this.uiContainer=null!==(e=this.getSetting("uiContainer"))&&void 0!==e?e:this.uiContainer,this.addHook("afterContextMenuDefaultOptions",(t=>Ms(Fs,this,$s).call(this,t))),this.addHook("afterSelection",(function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return Ms(Fs,o,Gs).call(o,...e)})),this.addHook("afterSelectionEnd",(()=>Ms(Fs,this,Ys).call(this))),this.eventManager.addEventListener(this.hot.rootDocument,"copy",(function(){return o.onCopy(...arguments)})),this.eventManager.addEventListener(this.hot.rootDocument,"cut",(function(){return o.onCut(...arguments)})),this.eventManager.addEventListener(this.hot.rootDocument,"paste",(function(){return o.onPaste(...arguments)})),(0,A.nr)()&&(this.eventManager.addEventListener(this.hot.rootDocument.body,"mouseenter",(function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return Ms(Fs,o,Xs).call(o,...e)})),this.eventManager.addEventListener(this.hot.rootDocument.body,"mouseleave",(function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return Ms(Fs,o,qs).call(o,...e)})),this.addHook("afterSelection",(()=>Ms(Fs,this,Ks).call(this)))),super.enablePlugin())}updatePlugin(){this.disablePlugin(),this.enablePlugin(),super.updatePlugin()}disablePlugin(){super.disablePlugin()}copy(){xs(Ns,this,arguments.length>0&&void 0!==arguments[0]?arguments[0]:"cells-only"),xs(Ps,this,!0),Ms(Fs,this,Ws).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(){xs(Ls,this,!0),Ms(Fs,this,Ws).call(this,"cut")}getRangedCopyableData(t){return(0,os.A)(this.getRangedData(t))}getRangedData(t){const e=[],{rows:o,columns:n}=ys(t);return(0,c.z0)(o,(t=>{const o=[];(0,c.z0)(n,(e=>{t<0?o.push(this.hot.getColHeader(e,t)):o.push(this.hot.getCopyableData(t,e))})),e.push(o)})),e}paste(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t;if(!t&&!e)return;const o=new is;t&&o.clipboardData.setData("text/plain",t),e&&o.clipboardData.setData("text/html",e),this.onPaste(o)}setCopyableText(){const t=this.hot.getSelectedRangeLast();if(!t)return;if(t.isSingleHeader())return void(this.copyableRanges=[]);Ts(Ds,this).setSelectedRange(t);const e=new Map([["headers",null],["cells",null]]);"column-headers-only"===Ts(Ns,this)?e.set("headers",Ts(Ds,this).getMostBottomColumnHeadersRange()):("with-column-headers"===Ts(Ns,this)?e.set("headers",Ts(Ds,this).getMostBottomColumnHeadersRange()):"with-column-group-headers"===Ts(Ns,this)&&e.set("headers",Ts(Ds,this).getAllColumnHeadersRange()),e.set("cells",Ts(Ds,this).getCellsRange())),this.copyableRanges=Array.from(e.values()).filter((t=>null!==t)).map((t=>{let{startRow:e,startCol:o,endRow:n,endCol:i}=t;return{startRow:e,startCol:o,endRow:n,endCol:i}})),this.copyableRanges=this.hot.runHooks("modifyCopyableRange",this.copyableRanges);const o=e.get("cells");if(null!==o&&o.isRangeTrimmed){const{startRow:t,startCol:e,endRow:n,endCol:i}=o;this.hot.runHooks("afterCopyLimit",n-t+1,i-e+1,this.rowsLimit,this.columnsLimit)}}isEditorOpened(){var t;return null===(t=this.hot.getActiveEditor())||void 0===t?void 0:t.isOpened()}populateValues(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.hot.getSelectedRangeLast();if(!t.length)return;const o=t.length,n=t[0].length,i=[],{row:r,col:s}=e.getTopStartCorner(),{row:l,col:a}=e.getBottomEndCorner();let h=r,c=s,d=r,u=s;for(;i.length<o||h<=l;){const{skipRowOnPaste:e,visualRow:l}=this.hot.getCellMeta(h,s);if(h=l+1,!0===e)continue;d=l,c=s;const g=[],f=i.length%o;for(;g.length<n||c<=a;){const{skipColumnOnPaste:e,visualCol:o}=this.hot.getCellMeta(r,c);if(c=o+1,!0===e)continue;u=o;const i=g.length%n;g.push(t[f][i])}i.push(g)}return xs(Vs,this,!0),this.hot.populateFromArray(r,s,i,void 0,void 0,"CopyPaste.paste",this.pasteMode),[r,s,d,u]}onCopy(t){const e=t.composedPath()[0],o=this.hot.getFocusManager().getRefocusElement(),n=null==e?void 0:e.hasAttribute("data-hot-input");if(!this.hot.isListening()&&!Ts(Ps,this)||this.isEditorOpened()||(0,i.sb)(e)&&(n&&e!==o||!n&&e!==this.hot.rootDocument.body&&!(0,i.yq)(e,this.hot.rootElement)))return;t.preventDefault(),this.setCopyableText(),xs(Ps,this,!1);const r=this.getRangedData(this.copyableRanges),s=Ms(Fs,this,zs).call(this,this.copyableRanges);if(this.hot.runHooks("beforeCopy",r,this.copyableRanges,s)){const e=(0,os.A)(r);if(t&&t.clipboardData){const o=(0,Cs.ub)(r,this.hot.rootDocument);t.clipboardData.setData("text/plain",e),t.clipboardData.setData("text/html",[Os,o].join(""))}else"undefined"==typeof ClipboardEvent&&this.hot.rootWindow.clipboardData.setData("Text",e);this.hot.runHooks("afterCopy",r,this.copyableRanges,s)}xs(Ns,this,"cells-only")}onCut(t){const e=t.composedPath()[0],o=this.hot.getFocusManager().getRefocusElement(),n=null==e?void 0:e.hasAttribute("data-hot-input");if(!this.hot.isListening()&&!Ts(Ls,this)||this.isEditorOpened()||(0,i.sb)(e)&&(n&&e!==o||!n&&e!==this.hot.rootDocument.body&&!(0,i.yq)(e,this.hot.rootElement)))return;t.preventDefault(),this.setCopyableText(),xs(Ls,this,!1);const r=this.getRangedData(this.copyableRanges);if(this.hot.runHooks("beforeCut",r,this.copyableRanges)){const e=(0,os.A)(r);if(t&&t.clipboardData){const o=(0,Cs.ub)(r,this.hot.rootDocument);t.clipboardData.setData("text/plain",e),t.clipboardData.setData("text/html",[Os,o].join(""))}else"undefined"==typeof ClipboardEvent&&this.hot.rootWindow.clipboardData.setData("Text",e);this.hot.emptySelectedCells("CopyPaste.cut"),this.hot.runHooks("afterCut",r,this.copyableRanges)}}onPaste(t){const e=t.composedPath()[0],o=this.hot.getFocusManager().getRefocusElement(),n=null==e?void 0:e.hasAttribute("data-hot-input");if(!this.hot.isListening()||this.isEditorOpened()||!this.hot.getSelected()||(0,i.sb)(e)&&(n&&e!==o||!n&&e!==this.hot.rootDocument.body&&!(0,i.yq)(e,this.hot.rootElement)))return;let r;if(t.preventDefault(),t&&void 0!==t.clipboardData){const e=(0,u.aj)(t.clipboardData.getData("text/html"),{ADD_TAGS:["meta"],ADD_ATTR:["content"],FORCE_BODY:!0});r=e&&/(<table)|(<TABLE)/g.test(e)?(0,Cs.oh)(e,this.hot.rootDocument).data:t.clipboardData.getData("text/plain")}else"undefined"==typeof ClipboardEvent&&void 0!==this.hot.rootWindow.clipboardData&&(r=this.hot.rootWindow.clipboardData.getData("Text"));if("string"==typeof r&&(r=(0,os.q)(r)),void 0===r||r&&0===r.length)return;if(!1===this.hot.runHooks("beforePaste",r,this.copyableRanges))return;const[s,l,a,h]=this.populateValues(r);this.hot.selectCell(s,l,Math.min(this.hot.countRows()-1,a),Math.min(this.hot.countCols()-1,h)),this.hot.runHooks("afterPaste",r,this.copyableRanges)}destroy(){super.destroy()}}function Ws(t){if((0,A.nr)()){const e=this.hot.getSelectedRangeLast();if(e){const{row:o,col:n}=e.highlight,r=this.hot.getCell(o,n,!0);r&&(0,i.C0)(r,(()=>{this.hot.rootDocument.execCommand(t)}))}}else this.hot.rootDocument.execCommand(t)}function zs(t){const{rows:e}=ys(t);let o=0;for(let t=0;t<e.length&&!(e[t]>=0);t++)o+=1;return{columnHeadersCount:o}}function js(){if(this.hot.isListening()){const t=this.hot.getSelectedRangeLast();if(t){const{row:e,col:o}=t.highlight,n=this.hot.getCell(e,o,!0);n&&(0,i.aM)(n)}}}function Us(){if(this.hot.isListening()){const t=this.hot.getSelectedRangeLast();if(t){const{row:e,col:o}=t.highlight,n=this.hot.getCell(e,o,!0);null!=n&&n.hasAttribute("contenteditable")&&(0,i.gj)(n)}}}function $s(t){var e;t.items.push({name:"---------"},(e=this,{key:"copy",name(){return this.getTranslatedPhrase(tt.CONTEXTMENU_ITEMS_COPY)},callback(){e.copyCellsOnly()},disabled(){if(0===this.countRows()||0===this.countCols())return!0;const t=this.getSelectedRangeLast();if(!t)return!0;if(t.isSingleHeader())return!0;const e=this.getSelected();return!e||e.length>1},hidden:!1})),Ts(As,this)&&t.items.push(function(t){return{key:"copy_with_column_headers",name(){const t=this.getSelectedRangeLast(),e=t?(0,ut.qE)(t.getWidth()-1,0,1):0;return this.getTranslatedPhrase(tt.CONTEXTMENU_ITEMS_COPY_WITH_COLUMN_HEADERS,e)},callback(){t.copyWithColumnHeaders()},disabled(){if(!this.hasColHeaders())return!0;const t=this.getSelectedRangeLast();if(!t)return!0;if(t.isSingleHeader())return!0;const e=this.getSelected();return!e||e.length>1},hidden:!1}}(this)),Ts(ks,this)&&t.items.push(function(t){return{key:"copy_with_column_group_headers",name(){const t=this.getSelectedRangeLast(),e=t?(0,ut.qE)(t.getWidth()-1,0,1):0;return this.getTranslatedPhrase(tt.CONTEXTMENU_ITEMS_COPY_WITH_COLUMN_GROUP_HEADERS,e)},callback(){t.copyWithAllColumnHeaders()},disabled(){if(!this.hasColHeaders()||!this.getSettings().nestedHeaders)return!0;const t=this.getSelectedRangeLast();if(!t)return!0;if(t.isSingleHeader())return!0;const e=this.getSelected();return!e||e.length>1},hidden:!1}}(this)),Ts(_s,this)&&t.items.push(function(t){return{key:"copy_column_headers_only",name(){const t=this.getSelectedRangeLast(),e=t?(0,ut.qE)(t.getWidth()-1,0,1):0;return this.getTranslatedPhrase(tt.CONTEXTMENU_ITEMS_COPY_COLUMN_HEADERS_ONLY,e)},callback(){t.copyColumnHeadersOnly()},disabled(){if(!this.hasColHeaders())return!0;const t=this.getSelectedRangeLast();if(!t)return!0;if(t.isSingleHeader())return!0;const e=this.getSelected();return!e||e.length>1},hidden:!1}}(this)),t.items.push(function(t){return{key:"cut",name(){return this.getTranslatedPhrase(tt.CONTEXTMENU_ITEMS_CUT)},callback(){t.cut()},disabled(){if(0===this.countRows()||0===this.countCols())return!0;const t=this.getSelectedRangeLast();if(!t)return!0;if(t.isSingleHeader())return!0;const e=this.getSelected();return!e||e.length>1},hidden:!1}}(this))}function Gs(t,e,o,n,i){Ts(Vs,this)&&(i.value=!0),xs(Vs,this,!1)}function Ys(){this.isEditorOpened()||this.hot.getSettings().fragmentSelection||this.setCopyableText()}function Xs(){Ms(Fs,this,Us).call(this)}function qs(){Ms(Fs,this,js).call(this)}function Ks(){Ms(Fs,this,Us).call(this)}function Qs(t,e){return`border_row${t}col${e}`}function Js(t){var e,o;return((0,d.O9)(t.start)||(0,d.O9)(t.left))&&(t.start=null!==(e=t.start)&&void 0!==e?e:t.left),((0,d.O9)(t.end)||(0,d.O9)(t.right))&&(t.end=null!==(o=t.end)&&void 0!==o?o:t.right),delete t.left,delete t.right,t}function Zs(t){return(0,d.O9)(t.start)&&(t.left=t.start),(0,d.O9)(t.end)&&(t.right=t.end),t}function tl(t,e){return{id:Qs(t,e),border:{width:1,color:"#000",cornerVisible:!1},row:t,col:e,top:{hide:!0},bottom:{hide:!0},start:{hide:!0},end:{hide:!0}}}function el(t,e){let o=!1;return(0,c.z0)(t.getSelectedRange(),(n=>{n.forAll(((n,i)=>{if(n<0||i<0)return;const r=t.getCellMeta(n,i).borders;if(r){if(!e)return o=!0,!1;if(!(0,s.mQ)(r[e],"hide")||!1===r[e].hide)return o=!0,!1}}))})),o}function ol(t){return`<span class="selected">${String.fromCharCode(10003)}</span>${t}`}const nl=new Map([["left","start"],["right","end"]]);function il(t){const e=t.hot.isRtl()?"start":"end";return{key:"borders:right",name(){let t=this.getTranslatedPhrase(tt.CONTEXTMENU_ITEMS_BORDERS_RIGHT);return el(this,e)&&(t=ol(t)),t},callback(o,n){const i=el(this,e);t.prepareBorder(n,e,i)}}}function rl(t){return{key:"borders:bottom",name(){let t=this.getTranslatedPhrase(tt.CONTEXTMENU_ITEMS_BORDERS_BOTTOM);return el(this,"bottom")&&(t=ol(t)),t},callback(e,o){const n=el(this,"bottom");t.prepareBorder(o,"bottom",n)}}}function sl(t){const e=t.hot.isRtl()?"end":"start";return{key:"borders:left",name(){let t=this.getTranslatedPhrase(tt.CONTEXTMENU_ITEMS_BORDERS_LEFT);return el(this,e)&&(t=ol(t)),t},callback(o,n){const i=el(this,e);t.prepareBorder(n,e,i)}}}function ll(t){return{key:"borders:no_borders",name(){return this.getTranslatedPhrase(tt.CONTEXTMENU_ITEMS_REMOVE_BORDERS)},callback(e,o){t.prepareBorder(o,"noBorders")},disabled(){return!el(this)}}}function al(t,e,o){if("function"==typeof t?t===e:t.has(e))return arguments.length<3?e:o;throw new TypeError("Private element is not present on this object")}const hl="customBorders";var cl=new WeakSet;class dl extends Kt{constructor(){var t,e;super(...arguments),function(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}(t=this,e=cl),e.add(t),function(t,e,o){(e=function(t){var e=function(t){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var o=e.call(t,"string");if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[e]=o}(this,"savedBorders",[])}static get PLUGIN_KEY(){return hl}static get PLUGIN_PRIORITY(){return 90}isEnabled(){return!!this.hot.getSettings()[hl]}enablePlugin(){this.enabled||(this.addHook("afterContextMenuDefaultOptions",(t=>al(cl,this,ul).call(this,t))),this.addHook("init",(()=>al(cl,this,gl).call(this))),super.enablePlugin())}disablePlugin(){this.hideBorders(),super.disablePlugin()}updatePlugin(){this.disablePlugin(),this.enablePlugin(),this.changeBorderSettings(),super.updatePlugin()}setBorders(t,e){let o=["top","bottom","start","end"],n=null;e&&(this.checkSettingsCohesion([e]),o=Object.keys(e),n=Js(e));const i=(0,rr.ML)(t),r=(0,rr._e)(i,{createCellCoords:this.hot._createCellCoords.bind(this.hot),createCellRange:this.hot._createCellRange.bind(this.hot)});(0,c.z0)(t,(t=>{r(t).forAll(((t,e)=>{(0,c.z0)(o,(o=>{var i,r;this.prepareBorderFromCustomAdded(t,e,n,(i=o,null!==(r=nl.get(i))&&void 0!==r?r:i))}))}))})),this.hot.view.render()}getBorders(t){if(!Array.isArray(t))return this.savedBorders;const e=(0,rr.ML)(t),o=(0,rr._e)(e,{createCellCoords:this.hot._createCellCoords.bind(this.hot),createCellRange:this.hot._createCellRange.bind(this.hot)}),n=[];return(0,c.z0)(t,(t=>{o(t).forAll(((t,e)=>{(0,c.z0)(this.savedBorders,(o=>{o.row===t&&o.col===e&&n.push(Zs(o))}))}))})),n}clearBorders(t){t?this.setBorders(t):((0,c.z0)(this.savedBorders,(t=>{this.clearBordersFromSelectionSettings(t.id),this.clearNullCellRange(),this.hot.removeCellMeta(t.row,t.col,"borders")})),this.savedBorders.length=0)}insertBorderIntoSettings(t,e){this.checkSavedBorders(t)||this.savedBorders.push(t);const o=this.hot._createCellRange(this.hot._createCellCoords(t.row,t.col));this.checkCustomSelections(t,o,e)||this.hot.selection.highlight.addCustomSelection({border:t,visualCellRange:o})}prepareBorderFromCustomAdded(t,e,o,n){const i=this.hot.countRows(),r=this.hot.countCols();if(t>=i||e>=r)return;let l=tl(t,e);var a,h;o&&(a=l,h=o,(0,s.mQ)(h,"border")&&h.border&&(a.border=h.border),(0,s.mQ)(h,"top")&&(0,d.O9)(h.top)&&(h.top?((0,s.Gv)(h.top)||(h.top={width:1,color:"#000"}),a.top=h.top):(h.top={hide:!0},a.top=h.top)),(0,s.mQ)(h,"bottom")&&(0,d.O9)(h.bottom)&&(h.bottom?((0,s.Gv)(h.bottom)||(h.bottom={width:1,color:"#000"}),a.bottom=h.bottom):(h.bottom={hide:!0},a.bottom=h.bottom)),(0,s.mQ)(h,"start")&&(0,d.O9)(h.start)&&(h.start?((0,s.Gv)(h.start)||(h.start={width:1,color:"#000"}),a.start=h.start):(h.start={hide:!0},a.start=h.start)),(0,s.mQ)(h,"end")&&(0,d.O9)(h.end)&&(h.end?((0,s.Gv)(h.end)||(h.end={width:1,color:"#000"}),a.end=h.end):(h.end={hide:!0},a.end=h.end)),l=a,(0,c.z0)(this.hot.selection.highlight.customSelections,(t=>{if(l.id===t.settings.id)return Object.assign(t.settings,o),l.id=t.settings.id,l.top=t.settings.top,l.bottom=t.settings.bottom,l.start=t.settings.start,l.end=t.settings.end,!1}))),this.hot.setCellMeta(t,e,"borders",Zs(l)),this.insertBorderIntoSettings(l,n)}prepareBorderFromCustomAddedRange(t,e){const o=Math.min(t.to.row,this.hot.countRows()-1),n=Math.min(t.to.col,this.hot.countCols()-1);(0,ut.Ti)(t.from.row,o,(o=>{(0,ut.Ti)(t.from.col,n,(n=>{const i=tl(o,n);let r=0;o===t.from.row&&(0,s.mQ)(e,"top")&&(r+=1,i.top=e.top),o===t.to.row&&(0,s.mQ)(e,"bottom")&&(r+=1,i.bottom=e.bottom),n===t.from.col&&(0,s.mQ)(e,"start")&&(r+=1,i.start=e.start),n===t.to.col&&(0,s.mQ)(e,"end")&&(r+=1,i.end=e.end),r>0&&(this.hot.setCellMeta(o,n,"borders",Zs(i)),this.insertBorderIntoSettings(i))}))}))}removeAllBorders(t,e){const o=Qs(t,e);this.spliceBorder(o),this.clearBordersFromSelectionSettings(o),this.clearNullCellRange(),this.hot.removeCellMeta(t,e,"borders")}setBorder(t,e,o,n){let i=this.hot.getCellMeta(t,e).borders;i=i&&void 0!==i.border?Js(i):tl(t,e),n?(i[o]={hide:!0},4===this.countHide(i)?this.removeAllBorders(t,e):(this.checkCustomSelectionsFromContextMenu(i,o,n)||this.insertBorderIntoSettings(i),this.hot.setCellMeta(t,e,"borders",Zs(i)))):(i[o]={width:1,color:"#000"},this.checkCustomSelectionsFromContextMenu(i,o,n)||this.insertBorderIntoSettings(i),this.hot.setCellMeta(t,e,"borders",Zs(i)))}prepareBorder(t,e,o){(0,c.z0)(t,(t=>{let{start:n,end:i}=t;if(n.row===i.row&&n.col===i.col)"noBorders"===e?this.removeAllBorders(n.row,n.col):this.setBorder(n.row,n.col,e,o);else switch(e){case"noBorders":(0,ut.Ti)(n.col,i.col,(t=>{(0,ut.Ti)(n.row,i.row,(e=>{this.removeAllBorders(e,t)}))}));break;case"top":(0,ut.Ti)(n.col,i.col,(t=>{this.setBorder(n.row,t,e,o)}));break;case"bottom":(0,ut.Ti)(n.col,i.col,(t=>{this.setBorder(i.row,t,e,o)}));break;case"start":(0,ut.Ti)(n.row,i.row,(t=>{this.setBorder(t,n.col,e,o)}));break;case"end":(0,ut.Ti)(n.row,i.row,(t=>{this.setBorder(t,i.col,e,o)}))}}))}createCustomBorders(t){(0,c.z0)(t,(t=>{const e=Js(t);t.range?this.prepareBorderFromCustomAddedRange(t.range,e):this.prepareBorderFromCustomAdded(t.row,t.col,e)}))}countHide(t){const{top:e,bottom:o,start:n,end:i}=t,r=[e,o,n,i];return(0,c.mu)(r,((t,e)=>{let o=t;return e&&e.hide&&(o+=1),o}),0)}clearBordersFromSelectionSettings(t){const e=(0,c.YD)(this.hot.selection.highlight.customSelections,(t=>t.settings.id)).indexOf(t);e>-1&&this.hot.selection.highlight.customSelections[e].clear()}clearNullCellRange(){(0,c.z0)(this.hot.selection.highlight.customSelections,((t,e)=>{if(null===t.cellRange)return this.hot.selection.highlight.customSelections[e].destroy(),this.hot.selection.highlight.customSelections.splice(e,1),!1}))}hideBorders(){(0,c.z0)(this.savedBorders,(t=>{this.clearBordersFromSelectionSettings(t.id),this.clearNullCellRange()}))}spliceBorder(t){const e=(0,c.YD)(this.savedBorders,(t=>t.id)).indexOf(t);e>-1&&this.savedBorders.splice(e,1)}checkSavedBorders(t){let e=!1;return 4===this.countHide(t)?(this.spliceBorder(t.id),e=!0):(0,c.z0)(this.savedBorders,((o,n)=>{if(t.id===o.id)return this.savedBorders[n]=t,e=!0,!1})),e}checkCustomSelectionsFromContextMenu(t,e,o){let n=!1;return(0,c.z0)(this.hot.selection.highlight.customSelections,(i=>{if(t.id===i.settings.id){const t=this.hot.view._wt.selectionManager.getBorderInstances(i);return(0,c.z0)(t,(t=>{t.toggleHiddenClass(e,o)})),n=!0,!1}})),n}checkCustomSelections(t,e,o){const n=this.countHide(t);let i=!1;return 4===n?(this.removeAllBorders(t.row,t.col),i=!0):(0,c.z0)(this.hot.selection.highlight.customSelections,(n=>{if(t.id===n.settings.id){if(n.visualCellRange=e,n.commit(),o){const e=this.hot.view._wt.selectionManager.getBorderInstances(n);(0,c.z0)(e,(e=>{e.changeBorderStyle(o,t)}))}return i=!0,!1}})),i}changeBorderSettings(){const t=this.hot.getSettings()[hl];if(Array.isArray(t)){const e=(0,s.Go)(t);this.checkSettingsCohesion(e),e.length||(this.savedBorders=e),this.createCustomBorders(e)}else void 0!==t&&this.createCustomBorders(this.savedBorders)}checkSettingsCohesion(t){const e=t.some((t=>(0,d.O9)(t.left)||(0,d.O9)(t.right))),o=t.some((t=>(0,d.O9)(t.start)||(0,d.O9)(t.end)));if(e&&o)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()&&e)throw new Error('The "left"/"right" properties are not supported for RTL. Please use option "start"/"end".')}destroy(){super.destroy()}}function ul(t){var e;this.hot.getSettings()[hl]&&t.items.push({name:"---------"},{key:"borders",name(){return this.getTranslatedPhrase(tt.CONTEXTMENU_ITEMS_BORDERS)},disabled(){const t=this.getSelectedRangeLast();return!t||!!t.isSingleHeader()||this.selection.isSelectedByCorner()},submenu:{items:[(e=this,{key:"borders:top",name(){let t=this.getTranslatedPhrase(tt.CONTEXTMENU_ITEMS_BORDERS_TOP);return el(this,"top")&&(t=ol(t)),t},callback(t,o){const n=el(this,"top");e.prepareBorder(o,"top",n)}}),il(this),rl(this),sl(this),ll(this)]}})}function gl(){this.changeBorderSettings()}function fl(t,e,o){return(e=function(t){var e=function(t){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var o=e.call(t,"string");if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[e]=o,t}function pl(t,e,o){if("function"==typeof t?t===e:t.has(e))return arguments.length<3?e:o;throw new TypeError("Private element is not present on this object")}const ml="dragToScroll";var wl=new WeakSet;class bl extends Kt{constructor(){var t,e;super(...arguments),function(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}(t=this,e=wl),e.add(t),fl(this,"boundaries",null),fl(this,"callback",null),fl(this,"listening",!1)}static get PLUGIN_KEY(){return ml}static get PLUGIN_PRIORITY(){return 100}isEnabled(){return!!this.hot.getSettings()[ml]}enablePlugin(){this.enabled||(this.addHook("afterOnCellMouseDown",(t=>pl(wl,this,vl).call(this,t))),this.addHook("afterOnCellCornerMouseDown",(t=>pl(wl,this,vl).call(this,t))),this.registerEvents(),super.enablePlugin())}updatePlugin(){this.disablePlugin(),this.enablePlugin(),super.updatePlugin()}disablePlugin(){this.unregisterEvents(),super.disablePlugin()}setBoundaries(){let t=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=t}setCallback(t){this.callback=t}check(t,e){let o=0,n=0;e<this.boundaries.top?n=e-this.boundaries.top:e>this.boundaries.bottom&&(n=e-this.boundaries.bottom),t<this.boundaries.left?o=t-this.boundaries.left:t>this.boundaries.right&&(o=t-this.boundaries.right),this.callback(o,n)}listen(){this.listening=!0}unlisten(){this.listening=!1}isListening(){return this.listening}registerEvents(){const{rootWindow:t}=this.hot;let e=t;for(;e;)this.eventManager.addEventListener(e.document,"contextmenu",(()=>this.unlisten())),this.eventManager.addEventListener(e.document,"mouseup",(()=>this.unlisten())),this.eventManager.addEventListener(e.document,"mousemove",(t=>this.onMouseMove(t))),e=(0,i.Ly)(e)}unregisterEvents(){this.eventManager.clear()}onMouseMove(t){this.isListening()&&this.check(t.clientX,t.clientY)}destroy(){super.destroy()}}function vl(t){if((0,r.nO)(t))return;const e=this.hot.view._wt.wtOverlays.topOverlay.mainTableScrollableElement;this.setBoundaries(e!==this.hot.rootWindow?e.getBoundingClientRect():void 0),this.setCallback(((t,o)=>{var n,i;const r=null!==(n=e.scrollLeft)&&void 0!==n?n:e.scrollX,s=null!==(i=e.scrollTop)&&void 0!==i?i:e.scrollY;e.scroll(r+50*Math.sign(t),s+20*Math.sign(o))})),this.listen()}function yl(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Cl(t,e,o){return(e=function(t){var e=function(t){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var o=e.call(t,"string");if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[e]=o,t}function Sl(t,e,o){return t.set(Rl(t,e),o),o}function Rl(t,e,o){if("function"==typeof t?t===e:t.has(e))return arguments.length<3?e:o;throw new TypeError("Private element is not present on this object")}Z.R.getSingleton().register("afterDropdownMenuDefaultOptions"),Z.R.getSingleton().register("beforeDropdownMenuShow"),Z.R.getSingleton().register("afterDropdownMenuShow"),Z.R.getSingleton().register("afterDropdownMenuHide"),Z.R.getSingleton().register("afterDropdownMenuExecute");const El="dropdownMenu",Tl="changeType",xl=El;var Ml=new WeakMap,Il=new WeakSet;class Hl extends Kt{static get PLUGIN_KEY(){return El}static get PLUGIN_PRIORITY(){return 230}static get PLUGIN_DEPS(){return["plugin:AutoColumnSize"]}static get DEFAULT_ITEMS(){return[er,or,fi,sr,fi,tr,fi,nr,fi,Zi]}constructor(t){var e;super(t),yl(this,e=Il),e.add(this),Cl(this,"commandExecutor",new Ji(this.hot)),Cl(this,"itemsFactory",null),Cl(this,"menu",null),function(t,e){yl(t,e),e.set(t,!1)}(this,Ml),this.hot.addHook("afterGetColHeader",((t,e)=>Rl(Il,this,kl).call(this,t,e)))}isEnabled(){return this.hot.getSettings()[El]}enablePlugin(){var t=this;if(this.enabled)return;this.itemsFactory=new mr(this.hot,Hl.DEFAULT_ITEMS),this.addHook("beforeOnCellMouseDown",(function(){for(var e=arguments.length,o=new Array(e),n=0;n<e;n++)o[n]=arguments[n];return Rl(Il,t,Vl).call(t,...o)})),this.addHook("beforeViewportScrollHorizontally",(function(){for(var e=arguments.length,o=new Array(e),n=0;n<e;n++)o[n]=arguments[n];return Rl(Il,t,Dl).call(t,...o)}));const e=this.hot.getSettings()[El],o={items:this.itemsFactory.getItems(e)};this.registerEvents(),"function"==typeof e.callback&&this.commandExecutor.setCommonCallback(e.callback),this.registerShortcuts(),super.enablePlugin(),this.callOnPluginsReady((()=>{this.hot.runHooks("afterDropdownMenuDefaultOptions",o),this.itemsFactory.setPredefinedItems(o.items);const n=this.itemsFactory.getItems(e);this.menu&&this.menu.destroy(),this.menu=new $r(this.hot,{className:"htDropdownMenu",keepInViewport:!0,container:e.uiContainer||this.hot.rootDocument.body}),this.hot.runHooks("beforeDropdownMenuSetItems",n),this.menu.setMenuItems(n),this.menu.addLocalHook("beforeOpen",(()=>Rl(Il,this,_l).call(this))),this.menu.addLocalHook("afterOpen",(()=>Rl(Il,this,Nl).call(this))),this.menu.addLocalHook("afterSubmenuOpen",(t=>Rl(Il,this,Pl).call(this,t))),this.menu.addLocalHook("afterClose",(()=>Rl(Il,this,Ll).call(this))),this.menu.addLocalHook("executeCommand",(function(){for(var e=arguments.length,o=new Array(e),n=0;n<e;n++)o[n]=arguments[n];return t.executeCommand.call(t,...o)})),(0,c.z0)(n,(t=>this.commandExecutor.registerCommand(t.key,t)))}))}updatePlugin(){this.disablePlugin(),this.enablePlugin(),super.updatePlugin()}disablePlugin(){this.close(),this.menu&&this.menu.destroy(),this.unregisterShortcuts(),super.disablePlugin()}registerShortcuts(){const t=()=>{const{highlight:t}=this.hot.getSelectedRangeLast();if((t.isHeader()&&-1===t.row||t.isCell())&&t.col>=0){this.hot.selectColumns(t.col,t.col,-1);const{from:e}=this.hot.getSelectedRangeLast(),o=vi(this.menu.container,this.hot.rootDocument),n=this.hot.getCell(-1,e.col,!0).querySelector(`.${Tl}`),i=n.getBoundingClientRect();this.open({left:i.left+o.left,top:i.top+n.offsetHeight+o.top},{left:i.width,right:0,above:0,below:3}),this.menu.getNavigator().toFirstItem()}};this.hot.getShortcutManager().getContext("grid").addShortcuts([{keys:[["Shift","Alt","ArrowDown"],["Control/Meta","Enter"]],callback:t,runOnlyIf:()=>{var t;const e=null===(t=this.hot.getSelectedRangeLast())||void 0===t?void 0:t.highlight;return e&&this.hot.selection.isCellVisible(e)&&e.isHeader()&&!this.menu.isOpened()},captureCtrl:!0,group:xl},{keys:[["Shift","Alt","ArrowDown"]],callback:t,runOnlyIf:()=>{var t;const e=null===(t=this.hot.getSelectedRangeLast())||void 0===t?void 0:t.highlight;return e&&this.hot.selection.isCellVisible(e)&&e.isCell()&&!this.menu.isOpened()},group:xl}])}unregisterShortcuts(){this.hot.getShortcutManager().getContext("grid").removeShortcutsByGroup(xl)}registerEvents(){this.eventManager.addEventListener(this.hot.rootElement,"click",(t=>Rl(Il,this,Al).call(this,t)))}open(t){var e;let o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{above:0,below:0,left:0,right:0};null!==(e=this.menu)&&void 0!==e&&e.isOpened()||(this.menu.open(),(0,s.v4)(o,((t,e)=>{this.menu.setOffset(e,t)})),this.menu.setPosition(t))}close(){var t;null===(t=this.menu)||void 0===t||t.close()}executeCommand(t){for(var e=arguments.length,o=new Array(e>1?e-1:0),n=1;n<e;n++)o[n-1]=arguments[n];this.commandExecutor.execute(t,...o)}setListening(){let t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.menu.isOpened()&&(t?this.menu.hotMenu.listen():this.menu.hotMenu.unlisten())}destroy(){this.close(),this.menu&&this.menu.destroy(),super.destroy()}}function Ol(t){t.getKeyboardShortcutsCtrl().addCustomShortcuts([{keys:[["Control/Meta","A"]],callback:()=>!1}])}function Al(t){if((0,i.nB)(t.target,Tl)){const e=vi(this.menu.container,this.hot.rootDocument),o=t.target.getBoundingClientRect();t.stopPropagation(),Sl(Ml,this,!1),this.open({left:o.left+e.left,top:o.top+t.target.offsetHeight+e.top},{left:o.width,right:0,above:0,below:3})}}function kl(t,e){const o=e.parentNode;if(!o)return;const n=o.parentNode.childNodes,r=Array.prototype.indexOf.call(n,o);if(t<0||r!==n.length-1)return;const s=e.querySelector(`.${Tl}`);if(this.enabled&&s)return;if(!this.enabled)return void(s&&s.parentNode.removeChild(s));const l=this.hot.rootDocument.createElement("button");l.className=Tl,l.type="button",l.tabIndex=-1,this.hot.getSettings().ariaTags&&((0,i.Bq)(l,[(0,p.MG)(),(0,p.SM)(" ")]),(0,i.Bq)(e,[(0,p.wP)("menu")])),l.onclick=function(){return!1},e.firstChild.insertBefore(l,e.firstChild.firstChild)}function _l(){this.hot.runHooks("beforeDropdownMenuShow",this)}function Nl(){this.hot.runHooks("afterDropdownMenuShow",this),Rl(Il,this,Ol).call(this,this.menu)}function Pl(t){Rl(Il,this,Ol).call(this,t)}function Ll(){this.hot.listen(),this.hot.runHooks("afterDropdownMenuHide",this)}function Dl(t){return(e=Ml).get(Rl(e,this))?null:t;var e}function Vl(t){(0,i.nB)(t.target,Tl)&&Sl(Ml,this,!0)}function Fl(t,e,o){return(e=function(t){var e=function(t){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var o=e.call(t,"string");if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[e]=o,t}Hl.SEPARATOR={name:fi};const Bl=class{constructor(t){Fl(this,"hot",void 0),Fl(this,"options",{}),this.hot=t}setOptions(t){this.options=t}getData(){const{startRow:t,startCol:e,endRow:o,endCol:n}=this._getDataRange(),i=this.options,r=[];return(0,ut.Ti)(t,o,(t=>{const o=[];!i.exportHiddenRows&&this._isHiddenRow(t)||((0,ut.Ti)(e,n,(e=>{!i.exportHiddenColumns&&this._isHiddenColumn(e)||o.push(this.hot.getDataAtCell(t,e))})),r.push(o))})),r}getRowHeaders(){const t=[];if(this.options.rowHeaders){const{startRow:e,endRow:o}=this._getDataRange(),n=this.hot.getRowHeader();(0,ut.Ti)(e,o,(e=>{!this.options.exportHiddenRows&&this._isHiddenRow(e)||t.push(n[e])}))}return t}getColumnHeaders(){const t=[];if(this.options.columnHeaders){const{startCol:e,endCol:o}=this._getDataRange(),n=this.hot.getColHeader();(0,ut.Ti)(e,o,(e=>{!this.options.exportHiddenColumns&&this._isHiddenColumn(e)||t.push(n[e])}))}return t}_getDataRange(){const t=this.hot.countCols()-1,e=this.hot.countRows()-1;let[o=0,n=0,i=e,r=t]=this.options.range;return o=Math.max(o,0),n=Math.max(n,0),i=Math.min(i,e),r=Math.min(r,t),{startRow:o,startCol:n,endRow:i,endCol:r}}_isHiddenRow(t){return this.hot.rowIndexMapper.isHidden(this.hot.toPhysicalRow(t))}_isHiddenColumn(t){return this.hot.columnIndexMapper.isHidden(this.hot.toPhysicalColumn(t))}};function Wl(t,e,o){return(e=function(t){var e=function(t){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var o=e.call(t,"string");if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[e]=o,t}class zl{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(t,e){Wl(this,"dataProvider",void 0),Wl(this,"options",void 0),this.dataProvider=t,this.options=this._mergeOptions(e),this.dataProvider.setOptions(this.options)}_mergeOptions(t){let e=(0,s.o8)(this.constructor.DEFAULT_OPTIONS);const o=new Date;return e=(0,s.X$)((0,s.o8)(zl.DEFAULT_OPTIONS),e),e=(0,s.X$)(e,t),e.filename=(0,u.V2)(e.filename,{YYYY:o.getFullYear(),MM:`${o.getMonth()+1}`.padStart(2,"0"),DD:`${o.getDate()}`.padStart(2,"0")}),e}}const jl=zl;function Ul(t,e,o){if("function"==typeof t?t===e:t.has(e))return arguments.length<3?e:o;throw new TypeError("Private element is not present on this object")}const $l=String.fromCharCode(13),Gl=String.fromCharCode(34),Yl=String.fromCharCode(10),Xl=String.fromCharCode(61),ql=String.fromCharCode(43),Kl=String.fromCharCode(45),Ql=String.fromCharCode(64),Jl=String.fromCharCode(9);var Zl=new WeakSet;function ta(t){return t.startsWith(Xl)||t.startsWith(ql)||t.startsWith(Kl)||t.startsWith(Ql)||t.startsWith(Jl)||t.startsWith($l)?`'${t}`:t}function ea(t,e){return e.test(t)?`'${t}`:t}const oa="csv",na={[oa]:class extends jl{constructor(){var t,e;super(...arguments),function(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}(t=this,e=Zl),e.add(t)}static get DEFAULT_OPTIONS(){return{mimeType:"text/csv",fileExtension:"csv",bom:!0,columnDelimiter:",",rowDelimiter:"\r\n",sanitizeValues:!1}}export(){const t=this.options,e=this.dataProvider.getData();let o=this.dataProvider.getColumnHeaders();const n=o.length>0,i=this.dataProvider.getRowHeaders(),r=i.length>0;let s=t.bom?String.fromCharCode(65279):"";return n&&(o=(0,c.YD)(o,(e=>this._escapeCell(e,{force:!0,sanitizeValue:t.sanitizeValues}))),r&&(s+=t.columnDelimiter),s+=o.join(t.columnDelimiter),s+=t.rowDelimiter),(0,c.z0)(e,((e,o)=>{o>0&&(s+=t.rowDelimiter),r&&(s+=this._escapeCell(i[o],{sanitizeValue:t.sanitizeValues}),s+=t.columnDelimiter);const n=e.map((e=>this._escapeCell(e,{sanitizeValue:t.sanitizeValues}))).join(t.columnDelimiter);s+=n})),s}_escapeCell(t){let{force:e=!1,sanitizeValue:o=!1}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=(0,d.As)(t);return""===n||(o&&(e=!0),o instanceof RegExp?n=Ul(Zl,this,ea).call(this,n,o):"function"==typeof o?n=o(n):o&&(n=Ul(Zl,this,ta).call(this,n)),(e||n.indexOf($l)>=0||n.indexOf(Gl)>=0||n.indexOf(Yl)>=0||n.indexOf(this.options.columnDelimiter)>=0)&&(n=n.replace(new RegExp('"',"g"),'""'),n=`"${n}"`)),n}}};class ia extends Kt{static get PLUGIN_KEY(){return"exportFile"}static get PLUGIN_PRIORITY(){return 240}isEnabled(){return!0}exportAsString(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this._createTypeFormatter(t,e).export()}exportAsBlob(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this._createBlob(this._createTypeFormatter(t,e))}downloadFile(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{rootDocument:o,rootWindow:n}=this.hot,i=this._createTypeFormatter(t,e),r=this._createBlob(i),s=n.URL||n.webkitURL,l=o.createElement("a"),a=`${i.options.filename}.${i.options.fileExtension}`;if(void 0!==l.download){const t=s.createObjectURL(r);l.style.display="none",l.setAttribute("href",t),l.setAttribute("download",a),o.body.appendChild(l),l.dispatchEvent(new MouseEvent("click")),o.body.removeChild(l),setTimeout((()=>{s.revokeObjectURL(t)}),100)}else navigator.msSaveOrOpenBlob&&navigator.msSaveOrOpenBlob(r,a)}_createTypeFormatter(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!na[t])throw new Error(`Export format type "${t}" is not supported.`);return function(t,e,o){return"function"==typeof na[t]?new na[t](e,o):null}(t,new Bl(this.hot),e)}_createBlob(t){let e=null;return"undefined"!=typeof Blob&&(e=new Blob([t.export()],{type:`${t.options.mimeType};charset=${t.options.encoding}`})),e}}function ra(t,e,o){return(e=function(t){var e=function(t){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var o=e.call(t,"string");if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[e]=o,t}o(3514);class sa{constructor(t,e){let{id:o,stateless:n=!0}=e;ra(this,"hot",void 0),ra(this,"id",void 0),ra(this,"elements",[]),ra(this,"hidden",!1),ra(this,"stateId",""),ra(this,"state",void 0),this.hot=t,this.id=o,this.stateId=`Filters.component.${this.id}`,this.state=n?null:this.hot.columnIndexMapper.registerMap(this.stateId,new Wo.z)}getElements(){return this.elements}reset(){(0,c.z0)(this.elements,(t=>t.reset()))}hide(){this.hidden=!0}show(){this.hidden=!1}isHidden(){return null===this.hot||this.hidden}restoreState(t){this.state&&this.setState(this.state.getValueAtIndex(t))}setState(){throw new Error("The state setting logic is not implemented")}saveState(t){this.state&&this.state.setValueAtIndex(t,this.getState())}getState(){throw new Error("The state gathering logic is not implemented")}destroy(){this.hot.columnIndexMapper.unregisterMap(this.stateId),this.clearLocalHooks(),(0,c.z0)(this.elements,(t=>t.destroy())),this.state=null,this.elements=null,this.hot=null}}(0,s.co)(sa,Bn.A);const la={};function aa(t,e){if(!la[t])throw Error(`Filter condition "${t}" does not exist.`);const{condition:o,descriptor:n}=la[t];let i=e;return n.inputValuesDecorator&&(i=n.inputValuesDecorator(i)),function(t){return o.apply(t.meta.instance,[].concat([t],[i]))}}function ha(t){if(!la[t])throw Error(`Filter condition "${t}" does not exist.`);return la[t].descriptor}function ca(t,e,o){o.key=t,la[t]={condition:e,descriptor:o}}const da="none";ca(da,(function(){return!0}),{name:tt.FILTERS_CONDITIONS_NONE,inputsCount:0,showOperators:!1});const ua="empty";ca(ua,(function(t){return(0,d.Im)(t.value)}),{name:tt.FILTERS_CONDITIONS_EMPTY,inputsCount:0,showOperators:!0});const ga="not_empty";ca(ga,(function(t,e){return!aa(ua,e)(t)}),{name:tt.FILTERS_CONDITIONS_NOT_EMPTY,inputsCount:0,showOperators:!0});const fa="eq";ca(fa,(function(t,e){let[o]=e;return(0,d.As)(t.value).toLocaleLowerCase(t.meta.locale)===(0,d.As)(o)}),{name:tt.FILTERS_CONDITIONS_EQUAL,inputsCount:1,showOperators:!0});const pa="neq";ca(pa,(function(t,e){return!aa(fa,e)(t)}),{name:tt.FILTERS_CONDITIONS_NOT_EQUAL,inputsCount:1,showOperators:!0}),ca("gt",(function(t,e){let[o]=e,n=o;return"numeric"===t.meta.type&&(n=parseFloat(n,10)),t.value>n}),{name:tt.FILTERS_CONDITIONS_GREATER_THAN,inputsCount:1,showOperators:!0}),ca("gte",(function(t,e){let[o]=e,n=o;return"numeric"===t.meta.type&&(n=parseFloat(n,10)),t.value>=n}),{name:tt.FILTERS_CONDITIONS_GREATER_THAN_OR_EQUAL,inputsCount:1,showOperators:!0}),ca("lt",(function(t,e){let[o]=e,n=o;return"numeric"===t.meta.type&&(n=parseFloat(n,10)),t.value<n}),{name:tt.FILTERS_CONDITIONS_LESS_THAN,inputsCount:1,showOperators:!0}),ca("lte",(function(t,e){let[o]=e,n=o;return"numeric"===t.meta.type&&(n=parseFloat(n,10)),t.value<=n}),{name:tt.FILTERS_CONDITIONS_LESS_THAN_OR_EQUAL,inputsCount:1,showOperators:!0});const ma="date_after";ca(ma,(function(t,e){let[o]=e;const n=H(t.value,t.meta.dateFormat),i=H(o,t.meta.dateFormat);return!(!n.isValid()||!i.isValid())&&n.diff(i)>=0}),{name:tt.FILTERS_CONDITIONS_AFTER,inputsCount:1,showOperators:!0});const wa="date_before";ca(wa,(function(t,e){let[o]=e;const n=H(t.value,t.meta.dateFormat),i=H(o,t.meta.dateFormat);return!(!n.isValid()||!i.isValid())&&n.diff(i)<=0}),{name:tt.FILTERS_CONDITIONS_BEFORE,inputsCount:1,showOperators:!0});const ba="between";ca(ba,(function(t,e){let[o,n]=e,i=o,r=n;if("numeric"===t.meta.type){const t=parseFloat(i,10),e=parseFloat(r,10);i=Math.min(t,e),r=Math.max(t,e)}else if("date"===t.meta.type){const e=aa(wa,[r]),o=aa(ma,[i]);return e(t)&&o(t)}return t.value>=i&&t.value<=r}),{name:tt.FILTERS_CONDITIONS_BETWEEN,inputsCount:2,showOperators:!0});const va="not_between";ca(va,(function(t,e){return!aa(ba,e)(t)}),{name:tt.FILTERS_CONDITIONS_NOT_BETWEEN,inputsCount:2,showOperators:!0});const ya="begins_with";ca(ya,(function(t,e){let[o]=e;return(0,d.As)(t.value).toLocaleLowerCase(t.meta.locale).startsWith((0,d.As)(o))}),{name:tt.FILTERS_CONDITIONS_BEGINS_WITH,inputsCount:1,showOperators:!0});const Ca="ends_with";ca(Ca,(function(t,e){let[o]=e;return(0,d.As)(t.value).toLocaleLowerCase(t.meta.locale).endsWith((0,d.As)(o))}),{name:tt.FILTERS_CONDITIONS_ENDS_WITH,inputsCount:1,showOperators:!0});const Sa="contains";ca(Sa,(function(t,e){let[o]=e;return(0,d.As)(t.value).toLocaleLowerCase(t.meta.locale).indexOf((0,d.As)(o))>=0}),{name:tt.FILTERS_CONDITIONS_CONTAINS,inputsCount:1,showOperators:!0});const Ra="not_contains";ca(Ra,(function(t,e){return!aa(Sa,e)(t)}),{name:tt.FILTERS_CONDITIONS_NOT_CONTAIN,inputsCount:1,showOperators:!0});const Ea="date_tomorrow";ca(Ea,(function(t){const e=H(t.value,t.meta.dateFormat);return!!e.isValid()&&e.isSame(H().subtract(-1,"days").startOf("day"),"d")}),{name:tt.FILTERS_CONDITIONS_TOMORROW,inputsCount:0});const Ta="date_today";ca(Ta,(function(t){const e=H(t.value,t.meta.dateFormat);return!!e.isValid()&&e.isSame(H().startOf("day"),"d")}),{name:tt.FILTERS_CONDITIONS_TODAY,inputsCount:0});const xa="date_yesterday";ca(xa,(function(t){const e=H(t.value,t.meta.dateFormat);return!!e.isValid()&&e.isSame(H().subtract(1,"days").startOf("day"),"d")}),{name:tt.FILTERS_CONDITIONS_YESTERDAY,inputsCount:0});const Ma="numeric",Ia="text",Ha="date",Oa={[Ma]:[da,fi,ua,ga,fi,fa,pa,fi,"gt","gte","lt","lte",ba,va],[Ia]:[da,fi,ua,ga,fi,fa,pa,fi,ya,Ca,fi,Sa,Ra],[Ha]:[da,fi,ua,ga,fi,fa,pa,fi,wa,ma,ba,fi,Ea,Ta,xa]};function Aa(t,e,o){return(e=function(t){var e=function(t){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var o=e.call(t,"string");if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[e]=o,t}const ka="built",_a="building",Na=["click","input","keydown","keypress","keyup","focus","blur","change"];class Pa{static get DEFAULTS(){return(0,s.o8)({className:"",value:"",tagName:"div",children:[],wrapIt:!0})}constructor(t,e){Aa(this,"hot",void 0),Aa(this,"eventManager",new K.A(this)),Aa(this,"options",void 0),Aa(this,"_element",void 0),Aa(this,"buildState",void 0),this.hot=t,this.options=(0,s.X$)(Pa.DEFAULTS,e),this._element=this.hot.rootDocument.createElement(this.options.wrapIt?"div":this.options.tagName)}setValue(t){this.options.value=t,this.update()}getValue(){return this.options.value}get element(){return this.buildState===_a?this._element:this.buildState===ka?(this.update(),this._element):(this.buildState=_a,this.build(),this.buildState=ka,this._element)}isBuilt(){return this.buildState===ka}translateIfPossible(t){return"string"==typeof t&&t.startsWith(tt.FILTERS_NAMESPACE)?this.hot.getTranslatedPhrase(t):t}build(){const t=(t,e)=>{this.eventManager.addEventListener(t,e,(t=>this.runLocalHooks(e,t,this)))};if(this.buildState||(this.buildState=_a),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&&(0,i.iQ)(this._element,this.options.className),this.options.children.length)(0,c.z0)(this.options.children,(t=>this._element.appendChild(t.element)));else if(this.options.wrapIt){const e=this.hot.rootDocument.createElement(this.options.tagName);e.setAttribute("data-hot-input",!0),(0,s.v4)(this.options,((t,o)=>{void 0!==e[o]&&"className"!==o&&"tagName"!==o&&"children"!==o&&(e[o]=this.translateIfPossible(t))})),this._element.appendChild(e),(0,c.z0)(Na,(o=>t(e,o)))}else(0,c.z0)(Na,(e=>t(this._element,e)))}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 La(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Da(t,e){return t.get(Va(t,e))}function Va(t,e,o){if("function"==typeof t?t===e:t.has(e))return arguments.length<3?e:o;throw new TypeError("Private element is not present on this object")}(0,s.co)(Pa,Bn.A);var Fa=new WeakMap,Ba=new WeakSet;class Wa extends Pa{static get DEFAULTS(){return(0,s.o8)({placeholder:"",type:"text",tagName:"input",tabIndex:-1})}constructor(t,e){var o;super(t,(0,s.X$)(Wa.DEFAULTS,e)),La(this,o=Ba),o.add(this),function(t,e){La(t,e),e.set(t,void 0)}(this,Fa),this.registerHooks()}registerHooks(){this.addLocalHook("keyup",(t=>Va(Ba,this,za).call(this,t)))}build(){super.build();const t=this.hot.rootDocument.createElement("div");var e,o;e=Fa,o=this._element.firstChild,e.set(Va(e,this),o),(0,i.iQ)(this._element,"htUIInput"),(0,i.iQ)(t,"htUIInputIcon"),this._element.appendChild(t),this.update()}update(){this.isBuilt()&&(Da(Fa,this).type=this.options.type,Da(Fa,this).placeholder=this.translateIfPossible(this.options.placeholder),Da(Fa,this).value=this.translateIfPossible(this.options.value))}focus(){this.isBuilt()&&Da(Fa,this).focus()}}function za(t){this.options.value=t.target.value}function ja(t,e,o){Ua(t,e),e.set(t,o)}function Ua(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function $a(t,e,o){return t.set(Ya(t,e),o),o}function Ga(t,e){return t.get(Ya(t,e))}function Ya(t,e,o){if("function"==typeof t?t===e:t.has(e))return arguments.length<3?e:o;throw new TypeError("Private element is not present on this object")}var Xa=new WeakMap,qa=new WeakMap,Ka=new WeakMap,Qa=new WeakMap,Ja=new WeakMap,Za=new WeakSet;class th extends Pa{static get DEFAULTS(){return(0,s.o8)({className:"htUISelect",wrapIt:!1,tabIndex:-1})}constructor(t,e){var o;super(t,(0,s.X$)(th.DEFAULTS,e)),Ua(this,o=Za),o.add(this),ja(this,Xa,null),ja(this,qa,[]),ja(this,Ka,void 0),ja(this,Qa,void 0),ja(this,Ja,void 0),this.registerHooks()}getMenu(){return Ga(Xa,this)}registerHooks(){this.addLocalHook("click",(()=>Ya(Za,this,nh).call(this)))}setItems(t){$a(qa,this,this.translateNames(t)),Ga(Xa,this)&&Ga(Xa,this).setMenuItems(Ga(qa,this))}translateNames(t){return(0,c.z0)(t,(t=>{t.name=this.translateIfPossible(t.name)})),t}build(){super.build(),$a(Xa,this,new $r(this.hot,{className:"htSelectUI htFiltersConditionsMenu",keepInViewport:!1,standalone:!0,container:this.options.menuContainer})),Ga(Xa,this).setMenuItems(Ga(qa,this));const t=new Pa(this.hot,{className:"htUISelectCaption"}),e=new Pa(this.hot,{className:"htUISelectDropdown"});$a(Ka,this,t),$a(Qa,this,t.element),$a(Ja,this,e),this.hot.getSettings().ariaTags&&((0,i.Bq)(e.element,[(0,p.MG)()]),(0,i.Bq)(this._element,[(0,p.$o)()])),(0,c.z0)([t,e],(t=>this._element.appendChild(t.element))),Ga(Xa,this).addLocalHook("select",(t=>Ya(Za,this,eh).call(this,t))),Ga(Xa,this).addLocalHook("afterClose",(()=>Ya(Za,this,oh).call(this))),this.update()}update(){if(!this.isBuilt())return;let t;t=this.options.value?this.options.value.name:Ga(Xa,this).hot.getTranslatedPhrase(tt.FILTERS_CONDITIONS_NONE),Ga(Qa,this).textContent=t,super.update()}openOptions(){const t=this.element.getBoundingClientRect();Ga(Xa,this)&&(Ga(Xa,this).open(),Ga(Xa,this).setPosition({left:this.hot.isLtr()?t.left-5:t.left-31,top:t.top-1,width:t.width,height:t.height}),Ga(Xa,this).getNavigator().toFirstItem(),Ga(Xa,this).getKeyboardShortcutsCtrl().addCustomShortcuts([{keys:[["Tab"],["Shift","Tab"]],callback:t=>{this.closeOptions(),this.runLocalHooks("tabKeydown",t)}},{keys:[["Control/Meta","A"]],callback:()=>!1}]))}closeOptions(){Ga(Xa,this)&&Ga(Xa,this).close()}focus(){this.isBuilt()&&this.element.focus()}destroy(){Ga(Xa,this)&&(Ga(Xa,this).destroy(),$a(Xa,this,null)),Ga(Ka,this)&&Ga(Ka,this).destroy(),Ga(Ja,this)&&Ga(Ja,this).destroy(),super.destroy()}}function eh(t){t.name!==fi&&(this.options.value=t,this.update(),this.runLocalHooks("select",this.options.value))}function oh(){this.runLocalHooks("afterClose")}function nh(){this.openOptions()}function ih(t,e,o){return(e=function(t){var e=function(t){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var o=e.call(t,"string");if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[e]=o,t}function rh(t,e,o){if("function"==typeof t?t===e:t.has(e))return arguments.length<3?e:o;throw new TypeError("Private element is not present on this object")}var sh=new WeakSet;class lh extends sa{constructor(t,e){var o,n;super(t,{id:e.id,stateless:!1}),function(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}(o=this,n=sh),n.add(o),ih(this,"name",""),ih(this,"addSeparator",!1),this.name=e.name,this.addSeparator=e.addSeparator,this.elements.push(new th(this.hot,{menuContainer:e.menuContainer})),this.elements.push(new Wa(this.hot,{placeholder:tt.FILTERS_BUTTONS_PLACEHOLDER_VALUE})),this.elements.push(new Wa(this.hot,{placeholder:tt.FILTERS_BUTTONS_PLACEHOLDER_SECOND_VALUE})),this.registerHooks()}registerHooks(){this.getSelectElement().addLocalHook("select",(t=>rh(sh,this,ah).call(this,t))).addLocalHook("afterClose",(()=>this.runLocalHooks("afterClose"))).addLocalHook("tabKeydown",(t=>this.runLocalHooks("selectTabKeydown",t))),(0,c.z0)(this.getInputElements(),(t=>{t.addLocalHook("keydown",(t=>rh(sh,this,hh).call(this,t)))}))}setState(t){if(this.reset(),!t)return;const e=(0,s.o8)(t.command);e.name.startsWith(tt.FILTERS_CONDITIONS_NAMESPACE)&&(e.name=this.hot.getTranslatedPhrase(e.name)),this.getSelectElement().setValue(e),(0,c.z0)(t.args,((t,o)=>{if(o>e.inputsCount-1)return!1;const n=this.getInputElement(o);n.setValue(t),n[e.inputsCount>o?"show":"hide"](),o||this.hot._registerTimeout((()=>n.focus()),10)}))}getState(){const t=this.getSelectElement().getValue()||ha(da),e=[];return(0,c.z0)(this.getInputElements(),((o,n)=>{t.inputsCount>n&&e.push(o.getValue())})),{command:t,args:e}}updateState(t,e){const o=ha(t?t.name:da);this.state.setValueAtIndex(e,{command:o,args:t?t.args:[]}),t||(0,c.z0)(this.getInputElements(),(t=>t.setValue(null)))}getSelectElement(){return this.elements.filter((t=>t instanceof th))[0]}getInputElement(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return this.getInputElements()[t]}getInputElements(){return this.elements.filter((t=>t instanceof Wa))}getMenuItemDescriptor(){return{key:this.id,name:this.name,isCommand:!1,disableSelection:!0,hidden:()=>this.isHidden(),renderer:(t,e,o,n,r,s)=>{(0,i.iQ)(e.parentNode,"htFiltersMenuCondition"),this.addSeparator&&(0,i.iQ)(e.parentNode,"border");const l=this.hot.rootDocument.createElement("div");return(0,i.iQ)(l,"htFiltersMenuLabel"),l.textContent=s,e.appendChild(l),e.parentElement.hasAttribute("ghost-table")||(0,c.z0)(this.elements,(t=>e.appendChild(t.element))),e}}}reset(){const t=this.hot.getPlugin("filters").getSelectedColumn();let e=[ha(da)];if(null!==t){const{visualIndex:o}=t;e=function(t){const e=[];let o=t;return Oa[o]||(o=Ia),(0,c.z0)(Oa[o],(t=>{let o;o=t===fi?{name:fi}:(0,s.o8)(ha(t)),e.push(o)})),e}(this.hot.getDataType(0,o,this.hot.countRows(),o))}(0,c.z0)(this.getInputElements(),(t=>t.hide())),this.getSelectElement().setItems(e),super.reset(),this.getSelectElement().setValue(e[0])}}function ah(t){(0,c.z0)(this.getInputElements(),((e,o)=>{e[t.inputsCount>o?"show":"hide"](),0===o&&this.hot._registerTimeout((()=>e.focus()),10)})),this.runLocalHooks("change",t)}function hh(t){(0,g.m0)(t.keyCode,"ESCAPE")&&(this.runLocalHooks("cancel"),(0,r.CA)(t))}const ch={};function dh(t,e,o){ch[t]={name:e,func:o}}const uh="conjunction",gh=tt.FILTERS_LABELS_CONJUNCTION;dh(uh,gh,(function(t,e){return t.every((t=>t.func(e)))}));const fh="disjunction",ph=tt.FILTERS_LABELS_DISJUNCTION;dh(fh,ph,(function(t,e){return t.some((t=>t.func(e)))}));const mh="disjunctionWithExtraCondition",wh=tt.FILTERS_LABELS_DISJUNCTION;function bh(t,e,o){(function(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")})(t,e),e.set(t,o)}function vh(t,e){return t.get(Ch(t,e))}function yh(t,e,o){return t.set(Ch(t,e),o),o}function Ch(t,e,o){if("function"==typeof t?t===e:t.has(e))return arguments.length<3?e:o;throw new TypeError("Private element is not present on this object")}dh(mh,wh,(function(t,e){if(t.length<3)throw Error("Operation doesn't work on less then three conditions.");return t.slice(0,t.length-1).some((t=>t.func(e)))&&t[t.length-1].func(e)}));var Sh=new WeakMap,Rh=new WeakMap;class Eh extends Pa{static get DEFAULTS(){return(0,s.o8)({type:"radio",tagName:"input",className:"htUIRadio",label:{}})}constructor(t,e){super(t,(0,s.X$)(Eh.DEFAULTS,e)),bh(this,Sh,void 0),bh(this,Rh,void 0)}build(){super.build();const t=this.hot.rootDocument.createElement("label");t.textContent=this.translateIfPossible(this.options.label.textContent),t.htmlFor=this.translateIfPossible(this.options.label.htmlFor),yh(Rh,this,t),yh(Sh,this,this._element.firstChild),vh(Sh,this).checked=this.options.checked,this._element.appendChild(t),this.update()}update(){this.isBuilt()&&(vh(Rh,this).textContent=this.translateIfPossible(this.options.label.textContent))}isChecked(){return!!this.isBuilt()&&vh(Sh,this).checked}setChecked(){let t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.isBuilt()&&(vh(Sh,this).checked=t)}focus(){this.isBuilt()&&vh(Sh,this).focus()}}var Th=new WeakSet;class xh extends sa{constructor(t,e){var o,n;super(t,{id:e.id,stateless:!1}),function(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}(o=this,n=Th),n.add(o),function(t,e,o){(e=function(t){var e=function(t){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var o=e.call(t,"string");if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[e]=o}(this,"name",""),this.name=e.name,this.buildOperatorsElement()}getMenuItemDescriptor(){return{key:this.id,name:this.name,isCommand:!1,disableSelection:!0,hidden:()=>this.isHidden(),renderer:(t,e)=>((0,i.iQ)(e.parentNode,"htFiltersMenuOperators"),(0,c.z0)(this.elements,(t=>e.appendChild(t.element))),e)}}buildOperatorsElement(){const t=[uh,fh];(0,c.z0)(t,(e=>{const o=new Eh(this.hot,{name:"operator",label:{htmlFor:e,textContent:(n=e,ch[n].name)},value:e,checked:e===t[0],id:e});var n;o.addLocalHook("change",(t=>function(t,e,o){if("function"==typeof t?t===e:t.has(e))return arguments.length<3?e:o;throw new TypeError("Private element is not present on this object")}(Th,this,Mh).call(this,t))),this.elements.push(o)}))}setChecked(t){if(this.elements.length<t)throw Error(nn.O`Radio button with index ${t} doesn't exist.`);(0,c.z0)(this.elements,((e,o)=>{e.setChecked(o===t)}))}getActiveOperationId(){const t=this.elements.find((t=>t instanceof Eh&&t.isChecked()));return t?t.getValue():uh}getState(){return this.getActiveOperationId()}setState(t){this.reset(),t&&this.getActiveOperationId()!==t&&(0,c.z0)(this.elements,(e=>{e.setChecked(e.getValue()===t)}))}updateState(){let t=arguments.length>1?arguments[1]:void 0,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:uh;e===mh&&(e=fh),this.state.setValueAtIndex(t,e)}reset(){this.setChecked(0)}}function Mh(t){this.setState(t.target.value)}function Ih(t,e){let o=t;return""===o&&(o=`(${e})`),o}function Hh(t){const e=new Set(t);return function(t){return e.has(t)}}function Oh(t){return null==t?"":t}function Ah(t){return Array.from(new Set(t)).map((t=>Oh(t))).sort(((t,e)=>"number"==typeof t&&"number"==typeof e?t-e:t===e?0:t>e?1:-1))}function kh(t,e,o,n){const i=[],r=t===e;let s;return r||(s=Hh(e)),t.forEach((t=>{let e=!1;(r||s(t))&&(e=!0);const l={checked:e,value:t,visualValue:Ih(t,o)};n&&n(l),i.push(l)})),i}(0,Jt.II)();var _h=o(5874);function Nh(t,e){return t.get(Ph(t,e))}function Ph(t,e,o){if("function"==typeof t?t===e:t.has(e))return arguments.length<3?e:o;throw new TypeError("Private element is not present on this object")}var Lh=new WeakMap;class Dh extends Pa{static get DEFAULTS(){return(0,s.o8)({href:"#",tagName:"a",tabIndex:-1,role:"button"})}constructor(t,e){var o,n,i;super(t,(0,s.X$)(Dh.DEFAULTS,e)),i=void 0,function(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}(o=this,n=Lh),n.set(o,i)}build(){var t,e;super.build(),t=Lh,e=this._element.firstChild,t.set(Ph(t,this),e)}update(){this.isBuilt()&&(Nh(Lh,this).textContent=this.translateIfPossible(this.options.textContent))}focus(){this.isBuilt()&&Nh(Lh,this).focus()}activate(){Nh(Lh,this).click()}}function Vh(t,e,o){Fh(t,e),e.set(t,o)}function Fh(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Bh(t,e){return t.get(zh(t,e))}function Wh(t,e,o){return t.set(zh(t,e),o),o}function zh(t,e,o){if("function"==typeof t?t===e:t.has(e))return arguments.length<3?e:o;throw new TypeError("Private element is not present on this object")}const jh="multipleSelect.itemBox";var Uh=new WeakMap,$h=new WeakMap,Gh=new WeakMap,Yh=new WeakMap,Xh=new WeakMap,qh=new WeakMap,Kh=new WeakSet;class Qh extends Pa{static get DEFAULTS(){return(0,s.o8)({className:"htUIMultipleSelect",value:[]})}constructor(t,e){var o;super(t,(0,s.X$)(Qh.DEFAULTS,e)),Fh(this,o=Kh),o.add(this),Vh(this,Uh,[]),Vh(this,$h,void 0),Vh(this,Gh,void 0),Vh(this,Yh,void 0),Vh(this,Xh,void 0),Vh(this,qh,void 0),Wh(Yh,this,new Wa(this.hot,{placeholder:tt.FILTERS_BUTTONS_PLACEHOLDER_SEARCH,className:"htUIMultipleSelectSearch"})),Wh(Xh,this,new Dh(this.hot,{textContent:tt.FILTERS_BUTTONS_SELECT_ALL,className:"htUISelectAll"})),Wh(qh,this,new Dh(this.hot,{textContent:tt.FILTERS_BUTTONS_CLEAR,className:"htUIClearAll"})),this.registerHooks()}getItemsBox(){return Bh($h,this)}registerHooks(){Bh(Yh,this).addLocalHook("keydown",(t=>zh(Kh,this,Zh).call(this,t))),Bh(Yh,this).addLocalHook("input",(t=>zh(Kh,this,Jh).call(this,t))),Bh(Xh,this).addLocalHook("click",(t=>zh(Kh,this,tc).call(this,t))),Bh(qh,this).addLocalHook("click",(t=>zh(Kh,this,ec).call(this,t)))}setItems(t){var e;Wh(Uh,this,t),null===(e=Bh($h,this))||void 0===e||e.loadData(Bh(Uh,this))}setLocale(t){Wh(Gh,this,t)}getLocale(){return Bh(Gh,this)}getItems(){return[...Bh(Uh,this)]}getValue(){return function(t){const e=[];return t.forEach((t=>{t.checked&&e.push(t.value)})),e}(Bh(Uh,this))}getSearchInputElement(){return Bh(Yh,this)}getSelectAllElement(){return Bh(Xh,this)}getClearAllElement(){return Bh(qh,this)}isSelectedAllValues(){return Bh(Uh,this).length===this.getValue().length}build(){super.build();const{rootDocument:t}=this.hot,e=t.createElement("div"),o=new Pa(this.hot,{className:"htUISelectionControls",children:[Bh(Xh,this),Bh(qh,this)]});this._element.appendChild(Bh(Yh,this).element),this._element.appendChild(o.element),this._element.appendChild(e);const n=e=>{var o;if(!this._element)return;null===(o=Bh($h,this))||void 0===o||o.destroy(),(0,i.iQ)(e,"htUIMultipleSelectHot"),Wh($h,this,new this.hot.constructor(e,{data:Bh(Uh,this),columns:[{data:"checked",type:"checkbox",label:{property:"visualValue",position:"after"}}],beforeRenderer:(t,e,o,n,i,r)=>{t.title=r.instance.getDataAtRowProp(e,r.label.property)},afterListen:()=>{this.runLocalHooks("focus",this)},beforeOnCellMouseUp:()=>{Bh($h,this).listen()},modifyColWidth:e=>{const o=Bh($h,this).container.scrollWidth-(0,i.XJ)(t);return void 0!==e&&e<o?o:e},maxCols:1,autoWrapCol:!0,height:110,copyPaste:!1,disableVisualSelection:"area",fillHandle:!1,fragmentSelection:"cell",tabMoves:{row:1,col:0},themeName:this.hot.getCurrentThemeName(),layoutDirection:this.hot.isRtl()?"rtl":"ltr"})),Bh($h,this).init(),this.hot.addHook("afterSetTheme",((t,e)=>{e||Bh($h,this).useTheme(t)}));const n=Bh($h,this).getShortcutManager().getContext("grid");n.removeShortcutsByKeys(["Tab"]),n.removeShortcutsByKeys(["Shift","Tab"]),n.addShortcut({keys:[["Escape"]],callback:t=>{this.runLocalHooks("keydown",t,this)},group:jh}),n.addShortcut({keys:[["Tab"],["Shift","Tab"]],callback:t=>{Bh($h,this).deselectCell(),this.runLocalHooks("keydown",t,this),this.runLocalHooks("listTabKeydown",t,this)},group:jh})};n(e),this.hot._registerTimeout((()=>n(e)),100)}focus(){this.isBuilt()&&Bh($h,this).listen()}reset(){Bh(Yh,this).reset(),Bh(Xh,this).reset(),Bh(qh,this).reset()}update(){this.isBuilt()&&(Bh($h,this).loadData(function(t,e){const o=Hh(e);return t.map((t=>(t.checked=o(t.value),t)))}(Bh(Uh,this),this.options.value)),super.update())}destroy(){var t;null===(t=Bh($h,this))||void 0===t||t.destroy(),Bh(Yh,this).destroy(),Bh(qh,this).destroy(),Bh(Xh,this).destroy(),Wh(Yh,this,null),Wh(qh,this,null),Wh(Xh,this,null),Wh($h,this,null),Wh(Uh,this,null),super.destroy()}}function Jh(t){const e=t.target.value.toLocaleLowerCase(this.getLocale());let o;o=""===e?[...Bh(Uh,this)]:Bh(Uh,this).filter((t=>`${t.value}`.toLocaleLowerCase(this.getLocale()).indexOf(e)>=0)),Bh($h,this).loadData(o)}function Zh(t){this.runLocalHooks("keydown",t,this),(0,m.OH)(g.m0,t.keyCode)("ARROW_DOWN")&&(t.preventDefault(),(0,r.CA)(t),Bh($h,this).listen(),Bh($h,this).selectCell(0,0))}function tc(t){const e=[];t.preventDefault(),Bh($h,this).getSourceData().forEach(((t,o)=>{t.checked=!0,e.push((0,_h.Wm)(t,o)[0])})),Bh($h,this).setSourceDataAtCell(e)}function ec(t){const e=[];t.preventDefault(),Bh($h,this).getSourceData().forEach(((t,o)=>{t.checked=!1,e.push((0,_h.Wm)(t,o)[0])})),Bh($h,this).setSourceDataAtCell(e)}const oc="by_value";function nc(t,e,o){if("function"==typeof t?t===e:t.has(e))return arguments.length<3?e:o;throw new TypeError("Private element is not present on this object")}ca(oc,(function(t,e){let[o]=e;return o(t.value)}),{name:"By value",inputsCount:0,inputValuesDecorator(t){let[e]=t;return[Hh(e)]},showOperators:!1});var ic,rc=new WeakSet;class sc extends sa{constructor(t,e){var o,n;super(t,{id:e.id,stateless:!1}),function(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}(o=this,n=rc),n.add(o),function(t,e,o){(e=function(t){var e=function(t){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var o=e.call(t,"string");if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[e]=o}(this,"name",""),this.name=e.name,this.elements.push(new Qh(this.hot)),this.registerHooks()}registerHooks(){this.getMultipleSelectElement().addLocalHook("keydown",(t=>nc(rc,this,lc).call(this,t))).addLocalHook("listTabKeydown",(t=>this.runLocalHooks("listTabKeydown",t))),this.hot.addHook("modifyFiltersMultiSelectValue",((t,e)=>nc(rc,this,hc).call(this,t,e)))}getElements(){const t=this.getMultipleSelectElement();return[t.getSearchInputElement(),t.getSelectAllElement(),t.getClearAllElement(),this.getMultipleSelectElement()]}setState(t){if(this.reset(),t&&t.command.key===oc){const e=this.getMultipleSelectElement();e.setItems(t.itemsSnapshot),e.setValue(t.args[0]),e.setLocale(t.locale)}}getState(){const t=this.getMultipleSelectElement(),e=t.getItems();return{command:{key:t.isSelectedAllValues()||!e.length?da:oc},args:[t.getValue()],itemsSnapshot:e}}updateState(t){const e=(e,o,n,i,r)=>{const[s]=(0,c.y0)(o,(t=>t.name===oc)),l={},a=this.hot.getTranslatedPhrase(tt.FILTERS_VALUES_BLANK_CELLS);if(s){const o=i(e,r),h=(0,c.YD)(o,(t=>t.value)),d=new Map(o.map((t=>[t.value,this.hot.getCellMeta(t.meta.visualRow,t.meta.visualCol)]))),u=Ah(h);n&&(s.args[0]=n);const g=[],f=kh(u,s.args[0],a,(t=>{t.checked&&g.push(t.value),nc(rc,this,ac).call(this,t,d)})),p=t.editedConditionStack.column;l.locale=this.hot.getCellMeta(0,p).locale,l.args=[g],l.command=ha(oc),l.itemsSnapshot=f}else l.args=[],l.command=ha(da);this.state.setValueAtIndex(e,l)};e(t.editedConditionStack.column,t.editedConditionStack.conditions,t.conditionArgsChange,t.filteredRowsFactory),t.dependentConditionStacks.length&&e(t.dependentConditionStacks[0].column,t.dependentConditionStacks[0].conditions,t.conditionArgsChange,t.filteredRowsFactory,t.editedConditionStack)}getMultipleSelectElement(){return this.elements.filter((t=>t instanceof Qh))[0]}getMenuItemDescriptor(){return{key:this.id,name:this.name,isCommand:!1,disableSelection:!0,hidden:()=>this.isHidden(),renderer:(t,e,o,n,r,s)=>{(0,i.iQ)(e.parentNode,"htFiltersMenuValue");const l=this.hot.rootDocument.createElement("div");return(0,i.iQ)(l,"htFiltersMenuLabel"),l.textContent=s,e.appendChild(l),e.parentElement.hasAttribute("ghost-table")||(0,c.z0)(this.elements,(t=>e.appendChild(t.element))),e}}}reset(){const t=this.hot.getTranslatedPhrase(tt.FILTERS_VALUES_BLANK_CELLS),e=this._getColumnVisibleValues(),o=e.map((t=>t.value)),n=new Map(e.map((t=>[t.value,t.meta]))),i=Ah(o),r=kh(i,i,t,(t=>{nc(rc,this,ac).call(this,t,n)}));this.getMultipleSelectElement().setItems(r),super.reset(),this.getMultipleSelectElement().setValue(i);const s=this.hot.getPlugin("filters").getSelectedColumn();null!==s&&this.getMultipleSelectElement().setLocale(this.hot.getCellMeta(0,s.visualIndex).locale)}_getColumnVisibleValues(){const t=this.hot.getPlugin("filters").getSelectedColumn();return null===t?[]:(0,c.YD)(this.hot.getDataAtCol(t.visualIndex),((e,o)=>({value:Oh(e),meta:this.hot.getCellMeta(o,t.visualIndex)})))}}function lc(t){(0,g.m0)(t.keyCode,"ESCAPE")&&(this.runLocalHooks("cancel"),(0,r.CA)(t))}function ac(t,e){this.hot.hasHook("modifyFiltersMultiSelectValue")&&(t.visualValue=this.hot.runHooks("modifyFiltersMultiSelectValue",t.visualValue,e.get(t.value)))}function hc(t,e){return"numeric"===e.type?gt(t,e):t}var cc=new WeakSet;class dc extends sa{static get BUTTON_OK(){return"ok"}static get BUTTON_CANCEL(){return"cancel"}constructor(t,e){var o,n;super(t,{id:e.id,stateless:!0}),function(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}(o=this,n=cc),n.add(o),function(t,e,o){(e=function(t){var e=function(t){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var o=e.call(t,"string");if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[e]=o}(this,"name",""),this.name=e.name,this.elements.push(new Wa(this.hot,{type:"button",value:tt.FILTERS_BUTTONS_OK,className:"htUIButton htUIButtonOK",identifier:dc.BUTTON_OK})),this.elements.push(new Wa(this.hot,{type:"button",value:tt.FILTERS_BUTTONS_CANCEL,className:"htUIButton htUIButtonCancel",identifier:dc.BUTTON_CANCEL})),this.registerHooks()}registerHooks(){(0,c.z0)(this.elements,(t=>{t.addLocalHook("click",((t,e)=>function(t,e,o){if("function"==typeof t?t===e:t.has(e))return arguments.length<3?e:o;throw new TypeError("Private element is not present on this object")}(cc,this,uc).call(this,t,e)))}))}getMenuItemDescriptor(){return{key:this.id,name:this.name,isCommand:!1,disableSelection:!0,hidden:()=>this.isHidden(),renderer:(t,e)=>((0,i.iQ)(e.parentNode,"htFiltersMenuActionBar"),(0,c.z0)(this.elements,(t=>e.appendChild(t.element))),e)}}accept(){this.runLocalHooks("accept")}cancel(){this.runLocalHooks("cancel")}}function uc(t,e){e.options.identifier===ic.BUTTON_OK?this.accept():this.cancel()}function gc(t,e,o){return(e=function(t){var e=function(t){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var o=e.call(t,"string");if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[e]=o,t}ic=dc;const fc="ConditionCollection.filteringStates";class pc{constructor(t){let e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];gc(this,"hot",void 0),gc(this,"isMapRegistrable",void 0),gc(this,"filteringStates",new Wo.z),this.hot=t,this.isMapRegistrable=e,!0===this.isMapRegistrable?this.hot.columnIndexMapper.registerMap(fc,this.filteringStates):this.filteringStates.init(this.hot.columnIndexMapper.getNumberOfIndexes())}isEmpty(){return 0===this.getFilteredColumns().length}isMatch(t,e){var o;const n=this.filteringStates.getValueAtIndex(e),i=null!==(o=null==n?void 0:n.conditions)&&void 0!==o?o:[],r=null==n?void 0:n.operation;return this.isMatchInConditions(i,t,r)}isMatchInConditions(t,e){let o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:uh;return!t.length||function(t){if(!ch[t])throw Error(`Operation with id "${t}" does not exist.`);const e=ch[t].func;return function(t,o){return e(t,o)}}(o)(t,e)}addCondition(t,e){let o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:uh,n=arguments.length>3?arguments[3]:void 0;const i=this.hot.getCellMeta(0,t).locale,r=e.args.map((t=>"string"==typeof t?t.toLocaleLowerCase(i):t)),s=e.name||e.command.key;this.runLocalHooks("beforeAdd",t);const l=this.getOperation(t);if(l){if(l!==o)throw Error(nn.O`The column of index ${t} has been already applied with a \`${l}\`\x20
- filter operation. Use \`removeConditions\` to clear the current conditions and then add new ones.\x20
- Mind that you cannot mix different types of operations (for instance, if you use \`conjunction\`,\x20
- use it consequently for a particular column).`)}else if((0,d.b0)(ch[o]))throw new Error(nn.O`Unexpected operation named \`${o}\`. Possible ones are\x20
- \`disjunction\` and \`conjunction\`.`);const a=this.getConditions(t);0===a.length?this.filteringStates.setValueAtIndex(t,{operation:o,conditions:[{name:s,args:r,func:aa(s,r)}]},n):a.push({name:s,args:r,func:aa(s,r)}),this.runLocalHooks("afterAdd",t)}getConditions(t){var e,o;return null!==(e=null===(o=this.filteringStates.getValueAtIndex(t))||void 0===o?void 0:o.conditions)&&void 0!==e?e:[]}getOperation(t){var e;return null===(e=this.filteringStates.getValueAtIndex(t))||void 0===e?void 0:e.operation}getFilteredColumns(){return this.filteringStates.getEntries().map((t=>{let[e]=t;return e}))}getColumnStackPosition(t){return this.getFilteredColumns().indexOf(t)}exportAllConditions(){return this.filteringStates.getEntries().reduce(((t,e)=>{let[o,{operation:n,conditions:i}]=e;return t.push({column:o,operation:n,conditions:i.map((t=>{let{name:e,args:o}=t;return{name:e,args:[...o]}}))}),t}),[])}importAllConditions(t){this.clean(),t.forEach((t=>{t.conditions.forEach((e=>this.addCondition(t.column,e)))}))}removeConditions(t){this.runLocalHooks("beforeRemove",t),this.filteringStates.clearValue(t),this.runLocalHooks("afterRemove",t)}clean(){this.runLocalHooks("beforeClean"),this.filteringStates.clear(),this.runLocalHooks("afterClean")}hasConditions(t,e){const o=this.getConditions(t);return e?o.some((t=>t.name===e)):o.length>0}destroy(){this.isMapRegistrable&&this.hot.columnIndexMapper.unregisterMap(fc),this.filteringStates=null,this.clearLocalHooks()}}(0,s.co)(pc,Bn.A);const mc=pc;function wc(t,e,o){return(e=function(t){var e=function(t){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var o=e.call(t,"string");if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[e]=o,t}const bc=class{constructor(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:()=>[];wc(this,"conditionCollection",void 0),wc(this,"columnDataFactory",void 0),this.conditionCollection=t,this.columnDataFactory=e}filter(){let t=[];return(0,c.z0)(this.conditionCollection.getFilteredColumns(),((e,o)=>{let n=this.columnDataFactory(e);o&&(n=this._getIntersectData(n,t)),t=this.filterByColumn(e,n)})),t}filterByColumn(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];const o=[];return(0,c.z0)(e,(e=>{void 0!==e&&this.conditionCollection.isMatch(e,t)&&o.push(e)})),o}_getIntersectData(t,e){const o=[];return(0,c.z0)(e,(e=>{const n=e.meta.visualRow;void 0!==t[n]&&(o[n]=t[n])})),o}};function vc(t,e,o){return(e=function(t){var e=function(t){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var o=e.call(t,"string");if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[e]=o,t}function yc(t,e,o){if("function"==typeof t?t===e:t.has(e))return arguments.length<3?e:o;throw new TypeError("Private element is not present on this object")}var Cc=new WeakSet;class Sc{constructor(t,e){let o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:()=>[];var n,i;(function(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")})(n=this,i=Cc),i.add(n),vc(this,"hot",void 0),vc(this,"conditionCollection",void 0),vc(this,"columnDataFactory",void 0),vc(this,"changes",[]),vc(this,"grouping",!1),vc(this,"latestEditedColumnPosition",-1),vc(this,"latestOrderStack",[]),this.hot=t,this.conditionCollection=e,this.columnDataFactory=o,this.conditionCollection.addLocalHook("beforeRemove",(t=>yc(Cc,this,Rc).call(this,t))),this.conditionCollection.addLocalHook("afterRemove",(t=>this.updateStatesAtColumn(t))),this.conditionCollection.addLocalHook("afterAdd",(t=>this.updateStatesAtColumn(t))),this.conditionCollection.addLocalHook("beforeClean",(()=>yc(Cc,this,Ec).call(this))),this.conditionCollection.addLocalHook("afterClean",(()=>yc(Cc,this,Tc).call(this)))}groupChanges(){this.grouping=!0}flush(){this.grouping=!1,(0,c.z0)(this.changes,(t=>{this.updateStatesAtColumn(t)})),this.changes.length=0}updateStatesAtColumn(t,e){var o=this;if(this.grouping)return void(-1===this.changes.indexOf(t)&&this.changes.push(t));const n=this.conditionCollection.exportAllConditions();let i=this.conditionCollection.getColumnStackPosition(t);-1===i&&(i=this.latestEditedColumnPosition);const r=n.slice(0,i),s=n.slice(i);s.length&&s[0].column===t&&s.shift();const l=(0,m.cF)((function(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];const i=new mc(o.hot,!1),r=[].concat(t,n);i.importAllConditions(r);const s=o.columnDataFactory(e);let l;l=i.isEmpty()?s:new bc(i,(t=>o.columnDataFactory(t))).filter(),l=(0,c.YD)(l,(t=>t.meta.visualRow));const a=Hh(l);return i.destroy(),(0,c.y0)(s,(t=>a(t.meta.visualRow)))}))(r),a=[].concat(this.conditionCollection.getConditions(t));this.runLocalHooks("update",{editedConditionStack:{column:t,conditions:a},dependentConditionStacks:s,filteredRowsFactory:l,conditionArgsChange:e})}destroy(){this.clearLocalHooks(),(0,s.v4)(this,((t,e)=>{this[e]=null}))}}function Rc(t){this.latestEditedColumnPosition=this.conditionCollection.getColumnStackPosition(t)}function Ec(){this.latestOrderStack=this.conditionCollection.getFilteredColumns()}function Tc(){(0,c.z0)(this.latestOrderStack,(t=>{this.updateStatesAtColumn(t)}))}(0,s.co)(Sc,Bn.A);const xc=Sc,Mc="filters";var Ic=o(1496);function Hc(t,e,o){Oc(t,e),e.set(t,o)}function Oc(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Ac(t,e,o){return(e=function(t){var e=function(t){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var o=e.call(t,"string");if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[e]=o,t}function kc(t,e,o){return t.set(Nc(t,e),o),o}function _c(t,e){return t.get(Nc(t,e))}function Nc(t,e,o){if("function"==typeof t?t===e:t.has(e))return arguments.length<3?e:o;throw new TypeError("Private element is not present on this object")}const Pc="filters",Lc=Pc;var Dc=new WeakMap,Vc=new WeakMap,Fc=new WeakMap,Bc=new WeakSet;class Wc extends Kt{static get PLUGIN_KEY(){return Pc}static get PLUGIN_PRIORITY(){return 250}static get PLUGIN_DEPS(){return["plugin:DropdownMenu","plugin:HiddenRows","cell-type:checkbox"]}constructor(t){var e,o;super(t),e=this,Oc(this,o=Bc),o.add(this),Ac(this,"dropdownMenuPlugin",null),Ac(this,"conditionCollection",null),Ac(this,"conditionUpdateObserver",null),Ac(this,"components",new Map([["filter_by_condition",null],["filter_operators",null],["filter_by_condition2",null],["filter_by_value",null],["filter_action_bar",null]])),Ac(this,"filtersRowsMap",null),Hc(this,Dc,void 0),Hc(this,Vc,new WeakSet),Hc(this,Fc,[]),this.hot.addHook("afterGetColHeader",(function(){for(var t=arguments.length,o=new Array(t),n=0;n<t;n++)o[n]=arguments[n];return Nc(Bc,e,Kc).call(e,...o)}))}isEnabled(){return!!this.hot.getSettings()[Pc]}enablePlugin(){var t=this;if(this.enabled)return;this.filtersRowsMap=this.hot.rowIndexMapper.registerMap(this.pluginName,new Ic.q),this.dropdownMenuPlugin=this.hot.getPlugin("dropdownMenu");const e=this.hot.getSettings().dropdownMenu,o=e&&e.uiContainer||this.hot.rootDocument.body,n=t=>(t.addLocalHook("accept",(()=>Nc(Bc,this,Yc).call(this,"accept"))),t.addLocalHook("cancel",(()=>Nc(Bc,this,Yc).call(this,"cancel"))),t.addLocalHook("change",(e=>Nc(Bc,this,Xc).call(this,t,e))),t),r=()=>`${this.hot.getTranslatedPhrase(tt.FILTERS_DIVS_FILTER_BY_CONDITION)}:`;if(!this.components.get("filter_by_condition")){const t=new lh(this.hot,{id:"filter_by_condition",name:r,addSeparator:!1,menuContainer:o});t.addLocalHook("afterClose",(()=>Nc(Bc,this,qc).call(this))),this.components.set("filter_by_condition",n(t))}if(this.components.get("filter_operators")||this.components.set("filter_operators",new xh(this.hot,{id:"filter_operators",name:"Operators"})),!this.components.get("filter_by_condition2")){const t=new lh(this.hot,{id:"filter_by_condition2",name:"",addSeparator:!0,menuContainer:o});t.addLocalHook("afterClose",(()=>Nc(Bc,this,qc).call(this))),this.components.set("filter_by_condition2",n(t))}if(this.components.get("filter_by_value")||this.components.set("filter_by_value",n(new sc(this.hot,{id:"filter_by_value",name:()=>`${this.hot.getTranslatedPhrase(tt.FILTERS_DIVS_FILTER_BY_VALUE)}:`}))),this.components.get("filter_action_bar")||this.components.set("filter_action_bar",n(new dc(this.hot,{id:"filter_action_bar",name:"Action bar"}))),this.conditionCollection||(this.conditionCollection=new mc(this.hot)),this.conditionUpdateObserver||(this.conditionUpdateObserver=new xc(this.hot,this.conditionCollection,(t=>this.getDataMapAtColumn(t))),this.conditionUpdateObserver.addLocalHook("update",(t=>Nc(Bc,this,Qc).call(this,t)))),this.components.forEach((t=>t.show())),this.addHook("afterDropdownMenuDefaultOptions",(function(){for(var e=arguments.length,o=new Array(e),n=0;n<e;n++)o[n]=arguments[n];return Nc(Bc,t,Gc).call(t,...o)})),this.addHook("beforeDropdownMenuShow",(()=>Nc(Bc,this,$c).call(this))),this.addHook("afterDropdownMenuShow",(()=>Nc(Bc,this,jc).call(this))),this.addHook("afterDropdownMenuHide",(()=>Nc(Bc,this,Uc).call(this))),this.addHook("afterChange",(t=>Nc(Bc,this,zc).call(this,t))),this.hot.getSettings().dropdownMenu&&this.dropdownMenuPlugin&&(this.dropdownMenuPlugin.disablePlugin(),this.dropdownMenuPlugin.enablePlugin()),!_c(Dc,this)&&this.dropdownMenuPlugin.enabled){const t=[{focus:()=>{const t=_c(Dc,this).getMenu(),e=t.getNavigator(),o=_c(Dc,this).getLastMenuPage();t.focus(),o>0?e.setCurrentPage(o):e.toFirstItem()}},...Array.from(this.components).map((t=>{let[,e]=t;return e.getElements()})).flat()];kc(Dc,this,function(t,e){let o,n=-1;const r=(s=e,Hr({initialPage:0,size:()=>s.length,onItemSelect:(t,e)=>{const o=s[t];return o instanceof Qh?e:!(o.element&&!(0,i.zN)(o.element))&&void o.focus()}}));var s;const l=t=>()=>{o.isOpened()&&o.getKeyboardShortcutsCtrl().listen(Mc),r.setCurrentPage(e.indexOf(t))};function a(t){const i=o.getKeyboardShortcutsCtrl(),s=t.getKeyboardShortcutsCtrl();r.clear(),s.addCustomShortcuts([{keys:[["Tab"],["Shift","Tab"]],forwardToContext:i.getContext(Mc),callback:()=>{t.isSubMenu()&&t.close(),i.listen(Mc)}}]),t.isSubMenu()||i.addCustomShortcuts([{keys:[["Tab"],["Shift","Tab"]],callback:t=>{const e=o.getNavigator();e.getCurrentPage()>-1&&(n=e.getCurrentPage()),e.clear(),t.shiftKey?r.toPreviousItem():r.toNextItem()}},{keys:[["Escape"]],callback:()=>{o.close()}},{keys:[["Enter"],["Space"]],preventDefault:!1,callback:t=>{const o=e[r.getCurrentPage()];o instanceof th&&(o.openOptions(),t.preventDefault()),o instanceof Dh&&(o.activate(),t.preventDefault()),o instanceof Pa||t.preventDefault()}}],Mc)}function h(t){t.addLocalHook("afterSelectionChange",(t=>{t.key.startsWith("filter_")||r.clear()})),t.addLocalHook("afterSubmenuOpen",a),t.addLocalHook("afterOpen",a),o=t}return e.forEach((t=>{t instanceof Pa&&(t.addLocalHook("click",l(t)),t.addLocalHook("focus",l(t)),t.addLocalHook("afterClose",l(t)))})),h(t),{...r,listen:function(){o.focus(),o.getKeyboardShortcutsCtrl().listen(Mc)},setMenu:h,getMenu:function(){return o},getLastMenuPage:function(){return n}}}(this.dropdownMenuPlugin.menu,t));const e=t=>{_c(Dc,this).listen(),t.preventDefault(),(0,g.m0)(t.keyCode,"TAB")&&(t.shiftKey?_c(Dc,this).toPreviousItem():_c(Dc,this).toNextItem())};this.components.get("filter_by_value").addLocalHook("listTabKeydown",e),this.components.get("filter_by_condition").addLocalHook("selectTabKeydown",e)}this.registerShortcuts(),super.enablePlugin()}disablePlugin(){var t;this.enabled&&(null!==(t=this.dropdownMenuPlugin)&&void 0!==t&&t.enabled&&this.dropdownMenuPlugin.menu.clearLocalHooks(),this.components.forEach(((t,e)=>{t.destroy(),this.components.set(e,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 t=this.hot.getSelected();this.clearConditions(),this.filter(),t&&this.hot.selectCells(t)},group:Lc})}unregisterShortcuts(){this.hot.getShortcutManager().getContext("grid").removeShortcutsByGroup(Lc)}addCondition(t,e,o){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:uh;const i=this.hot.toPhysicalColumn(t);this.conditionCollection.addCondition(i,{command:{key:e},args:o},n)}removeConditions(t){const e=this.hot.toPhysicalColumn(t);this.conditionCollection.removeConditions(e)}clearConditions(t){if(void 0===t)this.conditionCollection.clean();else{const e=this.hot.toPhysicalColumn(t);this.conditionCollection.removeConditions(e)}}importConditions(t){this.conditionCollection.importAllConditions(t)}exportConditions(){return this.conditionCollection.exportAllConditions()}filter(){const{navigableHeaders:t}=this.hot.getSettings(),e=this._createDataFilter(),o=!this.conditionCollection.isEmpty();let n=[];const i=this.exportConditions(),r=this.hot.runHooks("beforeFilter",i,_c(Fc,this));if(!1!==r&&o){const o=[];this.hot.batchExecution((()=>{this.filtersRowsMap.clear(),n=(0,c.YD)(e.filter(),(t=>t.meta.visualRow));const t=Hh(n);(0,ut.Ti)(this.hot.countSourceRows()-1,(e=>{t(e)||o.push(e)})),(0,c.z0)(o,(t=>{this.filtersRowsMap.setValueAtIndex(t,!0)}))}),!0),t||n.length||this.hot.deselectCell(),kc(Fc,this,this.exportConditions())}else!1===r||o?this.importConditions(_c(Fc,this)):(kc(Fc,this,this.exportConditions()),this.filtersRowsMap.clear());this.hot.selection.isSelected()&&this.hot.selectCell(t?-1:0,this.hot.getSelectedRangeLast().highlight.col),!1!==r&&(this.hot.runHooks("afterFilter",i),this.hot.view.adjustElementsSize(),this.hot.render())}getSelectedColumn(){var t;const e=null===(t=this.hot.getSelectedRangeLast())||void 0===t?void 0:t.highlight;return e?{visualIndex:e.col,physicalIndex:this.hot.toPhysicalColumn(e.col)}:null}getDataMapAtColumn(t){const e=this.hot.toVisualColumn(t),o=[];return(0,c.z0)(this.hot.getSourceDataAtCol(e),((t,n)=>{var i;const{row:r,col:s,visualCol:l,visualRow:a,type:h,instance:c,dateFormat:d,locale:u}=this.hot.getCellMeta(n,e),g=null!==(i=this.hot.getDataAtCell(this.hot.toVisualRow(n),e))&&void 0!==i?i:t;o.push({meta:{row:r,col:s,visualCol:l,visualRow:a,type:h,instance:c,dateFormat:d,locale:u},value:Oh(g)})})),o}updateValueComponentCondition(t){const e=Ah(this.hot.getDataAtCol(t));this.conditionUpdateObserver.updateStatesAtColumn(t,e)}restoreComponents(t){var e;const o=null===(e=this.getSelectedColumn())||void 0===e?void 0:e.physicalIndex;t.forEach((t=>{t.isHidden()||t.restoreState(o)})),this.updateDependentComponentsVisibility()}getOperationBasedOnArguments(t,e,o,n){let i=t;return i===fh&&e.command.key!==da&&o.command.key!==da&&n.command.key!==da?i=mh:n.command.key!==da&&(e.command.key!==da&&o.command.key!==da||(i=uh)),i}setListeningDropdownMenu(){this.dropdownMenuPlugin&&this.dropdownMenuPlugin.setListening()}updateDependentComponentsVisibility(){const t=this.components.get("filter_by_condition"),{command:e}=t.getState(),o=[this.components.get("filter_by_condition2"),this.components.get("filter_operators")];e.showOperators?this.showComponents(...o):this.hideComponents(...o)}_createDataFilter(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.conditionCollection;return new bc(t,(t=>this.getDataMapAtColumn(t)))}getIndexesOfComponents(){const t=[];if(!this.dropdownMenuPlugin)return t;const e=this.dropdownMenuPlugin.menu;for(var o=arguments.length,n=new Array(o),i=0;i<o;i++)n[i]=arguments[i];return(0,c.z0)(n,(o=>{(0,c.z0)(e.menuItems,((e,n)=>{e.key===o.getMenuItemDescriptor().key&&t.push(n)}))})),t}changeComponentsVisibility(){let t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];if(!this.dropdownMenuPlugin)return;const e=this.dropdownMenuPlugin.menu.hotMenu,o=e.getPlugin("hiddenRows");for(var n=arguments.length,i=new Array(n>1?n-1:0),r=1;r<n;r++)i[r-1]=arguments[r];const s=this.getIndexesOfComponents(...i);t?o.showRows(s):o.hideRows(s),e.render()}hideComponents(){for(var t=arguments.length,e=new Array(t),o=0;o<t;o++)e[o]=arguments[o];this.changeComponentsVisibility(!1,...e)}showComponents(){for(var t=arguments.length,e=new Array(t),o=0;o<t;o++)e[o]=arguments[o];this.changeComponentsVisibility(!0,...e)}destroy(){this.enabled&&(this.components.forEach(((t,e)=>{null!==t&&(t.destroy(),this.components.set(e,null))})),this.conditionCollection.destroy(),this.conditionUpdateObserver.destroy(),this.hot.rowIndexMapper.unregisterMap(this.pluginName)),super.destroy()}}function zc(t){t&&(0,c.z0)(t,(t=>{const[,e]=t,o=this.hot.propToCol(e);this.conditionCollection.hasConditions(o)&&this.updateValueComponentCondition(o)}))}function jc(){const t=this.dropdownMenuPlugin.menu;this.restoreComponents(Array.from(this.components.values())),t.updateMenuDimensions()}function Uc(){this.components.get("filter_by_condition").getSelectElement().closeOptions(),this.components.get("filter_by_condition2").getSelectElement().closeOptions()}function $c(){const t=this.dropdownMenuPlugin.menu;_c(Vc,this).has(t)||_c(Dc,this).setMenu(t),_c(Vc,this).add(t)}function Gc(t){t.items.push({name:fi}),this.components.forEach((e=>{t.items.push(e.getMenuItemDescriptor())}))}function Yc(t){var e;if("accept"===t){const t=this.getSelectedColumn();var o;if(null===t)return void(null===(o=this.dropdownMenuPlugin)||void 0===o||o.close());const{physicalIndex:e}=t,n=this.components.get("filter_by_condition").getState(),i=this.components.get("filter_by_condition2").getState(),r=this.components.get("filter_by_value").getState(),s=this.getOperationBasedOnArguments(this.components.get("filter_operators").getActiveOperationId(),n,i,r);this.conditionUpdateObserver.groupChanges();let l=this.conditionCollection.getColumnStackPosition(e);-1===l&&(l=void 0),this.conditionCollection.removeConditions(e),n.command.key!==da&&(this.conditionCollection.addCondition(e,n,s,l),i.command.key!==da&&this.conditionCollection.addCondition(e,i,s,l)),r.command.key!==da&&this.conditionCollection.addCondition(e,r,s,l),this.conditionUpdateObserver.flush(),this.components.forEach((t=>t.saveState(e))),this.filter()}null===(e=this.dropdownMenuPlugin)||void 0===e||e.close()}function Xc(t,e){const o=this.dropdownMenuPlugin.menu;this.updateDependentComponentsVisibility(),t.constructor!==lh||e.inputsCount||this.setListeningDropdownMenu(),o.updateMenuDimensions()}function qc(){this.setListeningDropdownMenu()}function Kc(t,e,o){const n=this.hot.toPhysicalColumn(t);this.enabled&&this.conditionCollection.hasConditions(n)&&o===this.hot.view.getColumnHeadersCount()-1?(0,i.iQ)(e,"htFiltersActive"):(0,i.vy)(e,"htFiltersActive")}function Qc(t){var e;if(null===(e=this.dropdownMenuPlugin)||void 0===e||!e.enabled)return;const{editedConditionStack:{conditions:o,column:n},conditionArgsChange:i}=t;Array.isArray(i)&&kc(Fc,this,_c(Fc,this).map((t=>(t.column===n&&o.length>0&&t.conditions.forEach((t=>{"by_value"===t.name&&(t.args=[[...i]])})),t))));const r=o.filter((t=>t.name===oc)),s=o.filter((t=>t.name!==oc));if(r.length>=2||s.length>=3)(0,So.R8)(nn.O`The filter conditions have been applied properly, but couldn’t be displayed visually.\x20
- The overall amount of conditions exceed the capability of the dropdown menu.\x20
- For more details see the documentation.`);else{const e=this.conditionCollection.getOperation(n);this.components.get("filter_by_condition").updateState(s[0],n),this.components.get("filter_by_condition2").updateState(s[1],n),this.components.get("filter_operators").updateState(e,n),this.components.get("filter_by_value").updateState(t)}}o(3110);const Jc="internal-use-in-handsontable",Zc={licenseKey:Jc,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 td(t){var e;return{maxColumns:t.maxColumns,maxRows:t.maxRows,language:null===(e=t[zd])||void 0===e||null===(e=e.language)||void 0===e?void 0:e.langCode}}function ed(t){return Object.keys(t).reduce(((e,o)=>("hyperformula"!==o&&(e[o]=t[o]),e)),{})}function od(){const t="engine_relationship",e=(0,Yo.A)(zd);return e.hasItem(t)||e.register(t,new Map),e.getItem(t)}function nd(){const t="shared_engine_usage",e=(0,Yo.A)(zd);return e.hasItem(t)||e.register(t,new Map),e.getItem(t)}function id(t){var e;const o=od(),n=0===o.size?[]:Array.from(null!==(e=o.get(t))&&void 0!==e?e:[]);return new Map(n.map((t=>[t.getPlugin("formulas").sheetId,t])))}function rd(t,e){if(t){const o=od(),n=o.get(t),i=nd(),r=i.get(t);n&&n.includes(e)&&(n.splice(n.indexOf(e),1),0===n.length&&o.delete(t)),r&&r.includes(e.guid)&&(r.splice(r.indexOf(e.guid),1),0===r.length&&(i.delete(t),t.destroy()))}}const sd="DD/MM/YYYY";function ld(t,e){return"string"==typeof t&&"date"===e}function ad(t,e){return H(t,e,!0).isValid()}function hd(t,e){return H(t,e,!0).format(sd)}function cd(t,e){const o=new Date(Date.UTC(0,0,t+-1));return H(o).format(e)}function dd(t,e,o){const n=function(t,e){const o=[];return t.forEach((t=>{const n={from:t,to:e};o.forEach((t=>{const e=t.from>t.to,o=t.to<=n.from;t.from>n.from&&o&&e&&(n.from+=1)})),n.from>=e&&(e+=1),o.push(n)})),o}(t,function(t,e,o){const n=Array.from(Array(o).keys()).filter((e=>!1===t.includes(e)));var i;return 0===e?null!==(i=n[e])&&void 0!==i?i:0:n[e-1]+1}(t,e,o));return function(t){return t.forEach(((e,o)=>{t.slice(o+1).forEach((t=>{const o=t.from<t.to;t.from>e.from&&o&&(t.from-=1)}))})),t}(n)}function ud(t,e,o){(function(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")})(t,e),e.set(t,o)}function gd(t,e){return t.get(pd(t,e))}function fd(t,e,o){return t.set(pd(t,e),o),o}function pd(t,e,o){if("function"==typeof t?t===e:t.has(e))return arguments.length<3?e:o;throw new TypeError("Private element is not present on this object")}var md=new WeakMap,wd=new WeakMap,bd=new WeakMap,vd=new WeakMap,yd=new WeakMap,Cd=new WeakMap,Sd=new WeakMap;const Rd=class{constructor(t,e,o){ud(this,md,void 0),ud(this,wd,void 0),ud(this,bd,void 0),ud(this,vd,[]),ud(this,yd,[]),ud(this,Cd,void 0),ud(this,Sd,[]),fd(md,this,t),fd(wd,this,e),fd(bd,this,o)}setRemovedHfIndexes(t){return fd(Sd,this,t.map((t=>{const e=gd(wd,this).getVisualFromPhysicalIndex(t);return this.getHfIndexFromVisualIndex(e)}))),gd(Sd,this)}getRemovedHfIndexes(){return gd(Sd,this)}getHfIndexFromVisualIndex(t){const e=gd(wd,this).getIndexesSequence(),o=gd(wd,this).getNotTrimmedIndexes();return e.indexOf(o[t],t)}syncMoves(t){const e=`move${(0,u.Ob)(gd(md,this))}s`;gd(bd,this).getEngine().batch((()=>{t.forEach((t=>{const o=t.from!==t.to,n=t.from+1!==t.to;o&&n&&gd(bd,this).getEngine()[e](gd(bd,this).getSheetId(),t.from,1,t.to)}))}))}storeMovesInformation(t,e,o){!1!==o&&(fd(yd,this,t.map((t=>this.getHfIndexFromVisualIndex(t)))),fd(Cd,this,this.getHfIndexFromVisualIndex(e)))}calculateAndSyncMoves(t,e){if(gd(bd,this).isPerformingUndoRedo())return;if(!1===t||!1===e)return;const o=dd(gd(yd,this),gd(Cd,this),gd(wd,this).getNumberOfIndexes());null===gd(bd,this).getSheetId()?gd(bd,this).getPostponeAction((()=>this.syncMoves(o))):this.syncMoves(o)}getIndexesChangeSyncMethod(){const t=`set${(0,u.Ob)(gd(md,this))}Order`;return e=>{if(gd(bd,this).isPerformingUndoRedo())return;const o=gd(wd,this).getIndexesSequence();if("update"===e&&o.length>0){const e=gd(vd,this).map((t=>o.indexOf(t))),n=gd(bd,this).getEngine().getSheetDimensions(gd(bd,this).getSheetId());let i;i="row"===gd(md,this)?n.height:n.width;for(let t=e.length;t<i;t+=1)e.push(t);gd(bd,this).getEngine()[t](gd(bd,this).getSheetId(),e)}fd(vd,this,o)}}init(){fd(vd,this,gd(wd,this).getIndexesSequence())}};function Ed(t,e,o){(function(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")})(t,e),e.set(t,o)}function Td(t,e){return t.get(Md(t,e))}function xd(t,e,o){return t.set(Md(t,e),o),o}function Md(t,e,o){if("function"==typeof t?t===e:t.has(e))return arguments.length<3?e:o;throw new TypeError("Private element is not present on this object")}var Id=new WeakMap,Hd=new WeakMap,Od=new WeakMap,Ad=new WeakMap,kd=new WeakMap,_d=new WeakMap,Nd=new WeakMap;const Pd=class{constructor(t,e,o){Ed(this,Id,void 0),Ed(this,Hd,void 0),Ed(this,Od,void 0),Ed(this,Ad,!1),Ed(this,kd,!1),Ed(this,_d,null),Ed(this,Nd,null),xd(Id,this,new Rd("row",t,this)),xd(Hd,this,new Rd("column",e,this)),xd(Od,this,o)}getForAxis(t){return Td("row"===t?Id:Hd,this)}setPerformUndo(t){xd(Ad,this,t)}setPerformRedo(t){xd(kd,this,t)}isPerformingUndoRedo(){return Td(Ad,this)||Td(kd,this)}getSheetId(){return Td(Nd,this)}getEngine(){return Td(_d,this)}getPostponeAction(){return Td(Od,this)}setupSyncEndpoint(t,e){xd(_d,this,t),xd(Nd,this,e),Td(Id,this).init(),Td(Hd,this).init()}};function Ld(t,e,o){return(e=function(t){var e=function(t){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var o=e.call(t,"string");if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[e]=o,t}function Dd(t,e,o){Vd(t,e),e.set(t,o)}function Vd(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Fd(t,e,o){return t.set(Wd(t,e),o),o}function Bd(t,e){return t.get(Wd(t,e))}function Wd(t,e,o){if("function"==typeof t?t===e:t.has(e))return arguments.length<3?e:o;throw new TypeError("Private element is not present on this object")}const zd="formulas",jd=["maxRows","maxColumns","language"];Z.R.getSingleton().register("afterNamedExpressionAdded"),Z.R.getSingleton().register("afterNamedExpressionRemoved"),Z.R.getSingleton().register("afterSheetAdded"),Z.R.getSingleton().register("afterSheetRemoved"),Z.R.getSingleton().register("afterSheetRenamed"),Z.R.getSingleton().register("afterFormulasValuesUpdate");const Ud=t=>"UndoRedo.undo"===t||"UndoRedo.redo"===t||"auto"===t;var $d=new WeakMap,Gd=new WeakMap,Yd=new WeakMap,Xd=new WeakSet;class qd extends Kt{constructor(){var t,e;super(...arguments),t=this,Vd(this,e=Xd),e.add(this),Dd(this,$d,!1),Dd(this,Gd,!1),Dd(this,Yd,[["valuesUpdated",function(){for(var e=arguments.length,o=new Array(e),n=0;n<e;n++)o[n]=arguments[n];return Wd(Xd,t,pu).call(t,...o)}],["namedExpressionAdded",function(){for(var e=arguments.length,o=new Array(e),n=0;n<e;n++)o[n]=arguments[n];return Wd(Xd,t,mu).call(t,...o)}],["namedExpressionRemoved",function(){for(var e=arguments.length,o=new Array(e),n=0;n<e;n++)o[n]=arguments[n];return Wd(Xd,t,wu).call(t,...o)}],["sheetAdded",function(){for(var e=arguments.length,o=new Array(e),n=0;n<e;n++)o[n]=arguments[n];return Wd(Xd,t,bu).call(t,...o)}],["sheetRenamed",function(){for(var e=arguments.length,o=new Array(e),n=0;n<e;n++)o[n]=arguments[n];return Wd(Xd,t,vu).call(t,...o)}],["sheetRemoved",function(){for(var e=arguments.length,o=new Array(e),n=0;n<e;n++)o[n]=arguments[n];return Wd(Xd,t,yu).call(t,...o)}]]),Ld(this,"staticRegister",(0,Yo.A)("formulas")),Ld(this,"engine",null),Ld(this,"sheetId",null),Ld(this,"sheetName",null),Ld(this,"indexSyncer",null),Ld(this,"rowAxisSyncer",null),Ld(this,"columnAxisSyncer",null)}static get PLUGIN_KEY(){return zd}static get PLUGIN_PRIORITY(){return 260}static get SETTING_KEYS(){return[zd,...jd]}isEnabled(){return!!this.hot.getSettings()[zd]}enablePlugin(){var t,e=this;if(!this.enabled)if(this.engine=null!==(t=function(t){const e=t.getSettings(),o=e[zd],n=null==o?void 0:o.engine;if(!0===o)return null;if((0,d.b0)(n))return null;var i;if("function"==typeof n.hyperformula||"function"==typeof n)return function(t,e,o){const n=e[zd],i=function(t){var e;const o=t[zd],n=ed(null!=o&&null!==(e=o.engine)&&void 0!==e&&e.hyperformula?o.engine:{}),i=td(t);return{...Zc,...n,...i}}(e),r=od(),s=nd();(function(t,e){e&&e.forEach((e=>{const{name:o,plugin:n,translations:i}=e;try{t.registerFunction(o,n,i)}catch(t){(0,So.R8)(t.message)}}))})(t,n.functions),function(t,e){if(e){const{langCode:o}=e;try{t.registerLanguage(o,e)}catch(t){(0,So.R8)(t.message)}}}(t,n.language);const l=t.buildEmpty(i);return r.set(l,[o]),s.set(l,[o.guid]),function(t,e){e&&(t.suspendEvaluation(),e.forEach((e=>{const{name:o,expression:n,scope:i,options:r}=e;try{t.addNamedExpression(o,n,i,r)}catch(t){(0,So.R8)(t.message)}})),t.resumeEvaluation())}(l,n.namedExpressions),l.on("sheetAdded",(()=>{l.rebuildAndRecalculate()})),l.on("sheetRemoved",(()=>{l.rebuildAndRecalculate()})),l}(null!==(i=n.hyperformula)&&void 0!==i?i:n,e,t);if("object"==typeof n&&(0,d.b0)(n.hyperformula)){const e=od(),o=nd().get(n);return e.has(n)||e.set(n,[]),e.get(n).push(t),o&&o.push(t.guid),n.getConfig().licenseKey||n.updateConfig({licenseKey:Jc}),n.getConfig().leapYear1900===Zc.leapYear1900&&!1!==(0,s.wU)(n.getConfig().nullDate,Zc.nullDate)||(0,So.R8)(nn.O`If you use HyperFormula with Handsontable, keep the default \`leapYear1900\` and \`nullDate\`
- settings. Otherwise, HyperFormula's dates may not sync correctly with Handsontable's dates.`),n}return null}(this.hot))&&void 0!==t?t:this.engine,this.engine){if(null!==this.sheetName&&!this.engine.doesSheetExist(this.sheetName)){const t=this.addSheet(this.sheetName,this.hot.getSourceDataArray());!1!==t&&Wd(Xd,this,Kd).call(this,t)}this.addHook("beforeLoadData",(function(){for(var t=arguments.length,o=new Array(t),n=0;n<t;n++)o[n]=arguments[n];return Wd(Xd,e,Zd).call(e,...o)})),this.addHook("afterLoadData",(function(){for(var t=arguments.length,o=new Array(t),n=0;n<t;n++)o[n]=arguments[n];return Wd(Xd,e,eu).call(e,...o)})),this.addHook("beforeUpdateData",(function(){for(var t=arguments.length,o=new Array(t),n=0;n<t;n++)o[n]=arguments[n];return Wd(Xd,e,Zd).call(e,...o)})),this.addHook("afterUpdateData",(function(){for(var t=arguments.length,o=new Array(t),n=0;n<t;n++)o[n]=arguments[n];return Wd(Xd,e,eu).call(e,...o)})),this.addHook("modifyData",(function(){for(var t=arguments.length,o=new Array(t),n=0;n<t;n++)o[n]=arguments[n];return Wd(Xd,e,ou).call(e,...o)})),this.addHook("modifySourceData",(function(){for(var t=arguments.length,o=new Array(t),n=0;n<t;n++)o[n]=arguments[n];return Wd(Xd,e,nu).call(e,...o)})),this.addHook("beforeValidate",(function(){for(var t=arguments.length,o=new Array(t),n=0;n<t;n++)o[n]=arguments[n];return Wd(Xd,e,Qd).call(e,...o)})),this.addHook("afterSetSourceDataAtCell",(function(){for(var t=arguments.length,o=new Array(t),n=0;n<t;n++)o[n]=arguments[n];return Wd(Xd,e,ru).call(e,...o)})),this.addHook("afterSetDataAtCell",(function(){for(var t=arguments.length,o=new Array(t),n=0;n<t;n++)o[n]=arguments[n];return Wd(Xd,e,iu).call(e,...o)})),this.addHook("afterSetDataAtRowProp",(function(){for(var t=arguments.length,o=new Array(t),n=0;n<t;n++)o[n]=arguments[n];return Wd(Xd,e,iu).call(e,...o)})),this.addHook("beforeCreateRow",(function(){for(var t=arguments.length,o=new Array(t),n=0;n<t;n++)o[n]=arguments[n];return Wd(Xd,e,su).call(e,...o)})),this.addHook("beforeCreateCol",(function(){for(var t=arguments.length,o=new Array(t),n=0;n<t;n++)o[n]=arguments[n];return Wd(Xd,e,lu).call(e,...o)})),this.addHook("afterCreateRow",(function(){for(var t=arguments.length,o=new Array(t),n=0;n<t;n++)o[n]=arguments[n];return Wd(Xd,e,cu).call(e,...o)})),this.addHook("afterCreateCol",(function(){for(var t=arguments.length,o=new Array(t),n=0;n<t;n++)o[n]=arguments[n];return Wd(Xd,e,du).call(e,...o)})),this.addHook("beforeRemoveRow",(function(){for(var t=arguments.length,o=new Array(t),n=0;n<t;n++)o[n]=arguments[n];return Wd(Xd,e,au).call(e,...o)})),this.addHook("beforeRemoveCol",(function(){for(var t=arguments.length,o=new Array(t),n=0;n<t;n++)o[n]=arguments[n];return Wd(Xd,e,hu).call(e,...o)})),this.addHook("afterRemoveRow",(function(){for(var t=arguments.length,o=new Array(t),n=0;n<t;n++)o[n]=arguments[n];return Wd(Xd,e,uu).call(e,...o)})),this.addHook("afterRemoveCol",(function(){for(var t=arguments.length,o=new Array(t),n=0;n<t;n++)o[n]=arguments[n];return Wd(Xd,e,gu).call(e,...o)})),this.indexSyncer=new Pd(this.hot.rowIndexMapper,this.hot.columnIndexMapper,(t=>{this.hot.addHookOnce("init",(()=>{t()}))})),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",((t,e,o,n)=>{this.rowAxisSyncer.storeMovesInformation(t,e,n)})),this.hot.addHook("beforeColumnMove",((t,e,o,n)=>{this.columnAxisSyncer.storeMovesInformation(t,e,n)})),this.hot.addHook("afterRowMove",((t,e,o,n,i)=>{this.rowAxisSyncer.calculateAndSyncMoves(n,i)})),this.hot.addHook("afterColumnMove",((t,e,o,n,i)=>{this.columnAxisSyncer.calculateAndSyncMoves(n,i)})),this.hot.addHook("beforeColumnFreeze",((t,e)=>{this.columnAxisSyncer.storeMovesInformation([t],this.hot.getSettings().fixedColumnsStart,e)})),this.hot.addHook("afterColumnFreeze",((t,e)=>{this.columnAxisSyncer.calculateAndSyncMoves(e,e)})),this.hot.addHook("beforeColumnUnfreeze",((t,e)=>{this.columnAxisSyncer.storeMovesInformation([t],this.hot.getSettings().fixedColumnsStart-1,e)})),this.hot.addHook("afterColumnUnfreeze",((t,e)=>{this.columnAxisSyncer.calculateAndSyncMoves(e,e)})),this.addHook("afterCellMetaReset",(function(){for(var t=arguments.length,o=new Array(t),n=0;n<t;n++)o[n]=arguments[n];return Wd(Xd,e,tu).call(e,...o)})),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 t=arguments.length,o=new Array(t),n=0;n<t;n++)o[n]=arguments[n];return Wd(Xd,e,fu).call(e,...o)})),this.addHook("beforeAutofill",(function(){for(var t=arguments.length,o=new Array(t),n=0;n<t;n++)o[n]=arguments[n];return Wd(Xd,e,Jd).call(e,...o)})),Bd(Yd,this).forEach((t=>{let[e,o]=t;return this.engine.on(e,o)})),super.enablePlugin()}else(0,So.R8)("Missing the required `engine` key in the Formulas settings. Please fill it with either an engine class or an engine instance.")}disablePlugin(){Bd(Yd,this).forEach((t=>{let[e,o]=t;return this.engine.off(e,o)})),rd(this.engine,this.hot),this.engine=null,super.disablePlugin()}updatePlugin(t){const e=function(t){var e;const o=t[zd];return{...ed(null!=o&&null!==(e=o.engine)&&void 0!==e&&e.hyperformula?o.engine:{}),...td(t)}}(this.hot.getSettings());(function(t,e){return Object.keys(e).some((o=>void 0!==e[o]&&e[o]!==t[o]))})(this.engine.getConfig(),e)&&this.engine.updateConfig(e);const o=this.hot.getSettings()[zd];if((0,d.O9)(o)&&(0,d.O9)(o.sheetName)&&o.sheetName!==this.sheetName&&this.switchSheet(o.sheetName),!t.data&&null===this.sheetName){const t=this.hot.getSettings()[zd].sheetName;if(t&&this.engine.doesSheetExist(t))this.switchSheet(this.sheetName);else{const e=this.addSheet(null!=t?t:void 0,this.hot.getSourceDataArray());Wd(Xd,this,Kd).call(this,e)}}super.updatePlugin(t)}destroy(){Bd(Yd,this).forEach((t=>{var e;let[o,n]=t;return null===(e=this.engine)||void 0===e?void 0:e.off(o,n)})),Fd(Yd,this,null),rd(this.engine,this.hot),this.engine=null,super.destroy()}addSheet(t,e){if((0,d.O9)(e)&&!(0,_h.ZI)(e))return(0,So.R8)("The provided data should be an array of arrays."),!1;if(null!=t&&this.engine.doesSheetExist(t))return(0,So.R8)("Sheet with the provided name already exists."),!1;try{const o=this.engine.addSheet(null!=t?t:void 0);return e&&this.engine.setSheetContent(this.engine.getSheetId(o),e),o}catch(t){return(0,So.R8)(t.message),!1}}switchSheet(t){if(!this.engine.doesSheetExist(t))return void(0,So.z3)(`The sheet named \`${t}\` does not exist, switch aborted.`);Wd(Xd,this,Kd).call(this,t);const e=this.engine.getSheetSerialized(this.sheetId);e.length>0&&this.hot.loadData(e,`${(0,u.Ob)(zd)}.switchSheet`)}getCellType(t,e){let o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.sheetId;const n=this.hot.toPhysicalRow(t),i=this.hot.toPhysicalColumn(e);return null!==n&&null!==i?this.engine.getCellType({sheet:o,row:this.rowAxisSyncer.getHfIndexFromVisualIndex(t),col:this.columnAxisSyncer.getHfIndexFromVisualIndex(e)}):"EMPTY"}isFormulaCellType(t,e){let o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.sheetId;return this.engine.doesCellHaveFormula({sheet:o,row:this.rowAxisSyncer.getHfIndexFromVisualIndex(t),col:this.columnAxisSyncer.getHfIndexFromVisualIndex(e)})}renderDependentSheets(t){let e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const o=new Set;t.forEach((t=>{var e;const n=null==t||null===(e=t.address)||void 0===e?void 0:e.sheet;void 0!==n&&(o.has(n)||o.add(n))})),id(this.engine).forEach(((t,n)=>{var i;(e||n!==this.sheetId)&&o.has(n)&&(t.render(),null===(i=t.view)||void 0===i||i.adjustElementsSize())}))}validateDependentCells(t){const e=t=>{var e;const{row:o,col:n,sheet:i}=null!==(e=null==t?void 0:t.address)&&void 0!==e?e:{};return(0,d.O9)(i)?`${i}:${o}x${n}`:""},o=new Set((arguments.length>1&&void 0!==arguments[1]?arguments[1]:[]).map((t=>e(t))));t.forEach((t=>{var n,i;const{row:r,col:s}=null!==(n=t.address)&&void 0!==n?n:{};if(!1===(0,d.O9)(r)||!1===(0,d.O9)(s)||r>=this.hot.countRows()||s>=this.hot.countCols())return;const l=null==t||null===(i=t.address)||void 0===i?void 0:i.sheet,a=e(t);if(void 0!==l&&!o.has(a)){const t=id(this.engine).get(l);if(!t)return;t.validateCell(t.getDataAtCell(r,s),t.getCellMeta(r,s),(()=>{}))}}))}syncChangeWithEngine(t,e,o){const n={row:this.rowAxisSyncer.getHfIndexFromVisualIndex(t),col:this.columnAxisSyncer.getHfIndexFromVisualIndex(e),sheet:this.sheetId};if(!this.engine.isItPossibleToSetCellContents(n))return void(0,So.R8)(`Not possible to set cell data at ${JSON.stringify(n)}`);const i=this.hot.getCellMeta(t,e);var r;return ld(o,i.type)&&(ad(o,i.dateFormat)?o=hd(o,i.dateFormat):!1===("string"==typeof(r=o)&&r.startsWith("="))&&(o=`'${o}`)),this.engine.setCellContents(n,o)}}function Kd(t){this.sheetName=t,this.sheetId=this.engine.getSheetId(this.sheetName)}function Qd(t,e,o){const n=this.hot.propToCol(o);if(this.isFormulaCellType(e,n)){const t={row:this.rowAxisSyncer.getHfIndexFromVisualIndex(e),col:this.columnAxisSyncer.getHfIndexFromVisualIndex(n),sheet:this.sheetId},o=this.hot.getCellMeta(e,n);let i=this.engine.getCellValue(t);return"date"===o.type&&(0,ut.kf)(i)&&(i=cd(i,o.dateFormat)),"object"==typeof i&&null!==i?i.value:i}return t}function Jd(t,e,o){const{row:n,col:i}=e.getTopStartCorner(),{row:r,col:s}=e.getBottomEndCorner(),{row:l,col:a}=o.getTopStartCorner(),{row:h,col:c}=o.getBottomEndCorner(),d={start:{row:this.rowAxisSyncer.getHfIndexFromVisualIndex(n),col:this.columnAxisSyncer.getHfIndexFromVisualIndex(i),sheet:this.sheetId},end:{row:this.rowAxisSyncer.getHfIndexFromVisualIndex(r),col:this.columnAxisSyncer.getHfIndexFromVisualIndex(s),sheet:this.sheetId}},u={start:{row:this.rowAxisSyncer.getHfIndexFromVisualIndex(l),col:this.columnAxisSyncer.getHfIndexFromVisualIndex(a),sheet:this.sheetId},end:{row:this.rowAxisSyncer.getHfIndexFromVisualIndex(h),col:this.columnAxisSyncer.getHfIndexFromVisualIndex(c),sheet:this.sheetId}};if(!1===this.engine.isItPossibleToSetCellContents(u))return!1;const g=this.engine.getFillRangeData(d,u),{row:f,col:p}=d.start,{row:m,col:w}=d.end,b=m-f+1,v=w-p+1;for(let t=0;t<g.length;t+=1)for(let e=0;e<g[t].length;e+=1){const o=g[t][e],n=f+t%b,i=p+e%v,r=this.hot.getCellMeta(n,i);ld(o,r.type)&&(o.startsWith("'")?g[t][e]=o.slice(1):!1===this.isFormulaCellType(n,i,this.sheetId)&&(g[t][e]=(y=o,C=r.dateFormat,H(y,sd,!0).format(C))))}var y,C;return g}function Zd(t,e){(arguments.length>2&&void 0!==arguments[2]?arguments[2]:"").includes((0,u.Ob)(zd))||Fd(Gd,this,(0,d.b0)(this.hot.getSettings().data))}function tu(){if(Bd(Gd,this))return void this.switchSheet(this.sheetName);const t=this.hot.getSourceDataArray();t.forEach(((e,o)=>{e.forEach(((e,n)=>{const i=this.hot.getCellMeta(o,n,{skipMetaExtension:!0}),r=i.dateFormat;ld(e,i.type)&&(ad(e,r)?t[o][n]=hd(e,r):e.startsWith("=")||(t[o][n]=`'${e}`))}))})),Fd($d,this,!0);const e=this.engine.setSheetContent(this.sheetId,t);this.indexSyncer.setupSyncEndpoint(this.engine,this.sheetId),this.renderDependentSheets(e),Fd($d,this,!1)}function eu(t,e){let o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";if(o.includes((0,u.Ob)(zd)))return;const n=function(t,e){return!(0,d.b0)(e)&&t.doesSheetExist(e)||(e=t.addSheet(e)),e}(this.engine,this.hot.getSettings()[zd].sheetName);if(Wd(Xd,this,Kd).call(this,n),"updateSettings"!==o)if(Bd(Gd,this))this.switchSheet(this.sheetName);else{const t=this.hot.getSourceDataArray();if(this.engine.isItPossibleToReplaceSheetContent(this.sheetId,t)){Fd($d,this,!0);const e=this.engine.setSheetContent(this.sheetId,t);this.indexSyncer.setupSyncEndpoint(this.engine,this.sheetId),this.renderDependentSheets(e),Fd($d,this,!1)}}}function ou(t,e,o,n){if("get"!==n||Bd($d,this)||null===this.sheetName||!this.engine.doesSheetExist(this.sheetName))return;const i=this.hot.toVisualRow(t);if(null===i||null===e)return;const r=this.getCellType(i,e);if("VALUE"===r||"EMPTY"===r)return void(o.value=(s=o.value,function(t){return"string"==typeof t&&"'"===t.charAt(0)&&"="===t.charAt(1)}(s)?s.substr(1):s));var s;const l={row:this.rowAxisSyncer.getHfIndexFromVisualIndex(i),col:this.columnAxisSyncer.getHfIndexFromVisualIndex(e),sheet:this.sheetId};let a=this.engine.getCellValue(l);const h=this.hot.getCellMeta(i,e,{skipMetaExtension:!0});"date"===h.type&&(0,ut.kf)(a)&&(a=cd(a,h.dateFormat)),o.value="object"==typeof a&&null!==a?a.value:a}function nu(t,e,o,n){if("get"!==n||Bd($d,this)||null===this.sheetName||!this.engine.doesSheetExist(this.sheetName))return;const i=this.hot.toVisualRow(t),r=this.hot.propToCol(e);if(null===i||null===r)return;const s=this.getCellType(i,r);if("VALUE"===s||"EMPTY"===s)return;const l=this.engine.getSheetDimensions(this.engine.getSheetId(this.sheetName));if(0===l.width&&0===l.height)return;const a={row:this.rowAxisSyncer.getHfIndexFromVisualIndex(i),col:this.columnAxisSyncer.getHfIndexFromVisualIndex(r),sheet:this.sheetId};o.value=this.engine.getCellSerialized(a)}function iu(t,e){if(Ud(e))return;const o=[],n=[],i=this.engine.batch((()=>{t.forEach((t=>{let[e,i,,r]=t;const s=this.hot.propToCol(i),l=this.hot.toPhysicalRow(e),a=this.hot.toPhysicalColumn(s),h={row:this.rowAxisSyncer.getHfIndexFromVisualIndex(e),col:this.columnAxisSyncer.getHfIndexFromVisualIndex(s),sheet:this.sheetId};null!==l&&null!==a?this.syncChangeWithEngine(e,s,r):o.push([e,s,r]),n.push({address:h})}))}));o.length&&this.hot.addHookOnce("afterChange",(()=>{const t=this.engine.batch((()=>{o.forEach((t=>{let[e,o,n]=t;this.syncChangeWithEngine(e,o,n)}))}));this.renderDependentSheets(t,!0)})),this.renderDependentSheets(i),this.validateDependentCells(i,n)}function ru(t,e){if(Ud(e))return;const o=[],n=[];t.forEach((t=>{let[e,i,,r]=t;const s=this.hot.propToCol(i);if(!(0,ut.kf)(s))return;const l={row:this.rowAxisSyncer.getHfIndexFromVisualIndex(e),col:this.columnAxisSyncer.getHfIndexFromVisualIndex(s),sheet:this.sheetId};this.engine.isItPossibleToSetCellContents(l)?(n.push({address:l}),o.push(...this.engine.setCellContents(l,r))):(0,So.R8)(`Not possible to set source cell data at ${JSON.stringify(l)}`)})),this.renderDependentSheets(o),this.validateDependentCells(o,n)}function su(t,e){let o=this.rowAxisSyncer.getHfIndexFromVisualIndex(t);if(t>=this.hot.countRows()&&(o=t),null===this.sheetId||!this.engine.doesSheetExist(this.sheetName)||!this.engine.isItPossibleToAddRows(this.sheetId,[o,e]))return!1}function lu(t,e){let o=this.columnAxisSyncer.getHfIndexFromVisualIndex(t);if(t>=this.hot.countCols()&&(o=t),null===this.sheetId||!this.engine.doesSheetExist(this.sheetName)||!this.engine.isItPossibleToAddColumns(this.sheetId,[o,e]))return!1}function au(t,e,o){return!1!==this.rowAxisSyncer.setRemovedHfIndexes(o).every((t=>this.engine.isItPossibleToRemoveRows(this.sheetId,[t,1])))&&void 0}function hu(t,e,o){return!1!==this.columnAxisSyncer.setRemovedHfIndexes(o).every((t=>this.engine.isItPossibleToRemoveColumns(this.sheetId,[t,1])))&&void 0}function cu(t,e,o){if(Ud(o))return;const n=this.engine.addRows(this.sheetId,[this.rowAxisSyncer.getHfIndexFromVisualIndex(t),e]);this.renderDependentSheets(n)}function du(t,e,o){if(Ud(o))return;const n=this.engine.addColumns(this.sheetId,[this.columnAxisSyncer.getHfIndexFromVisualIndex(t),e]);this.renderDependentSheets(n)}function uu(t,e,o,n){if(Ud(n))return;const i=this.rowAxisSyncer.getRemovedHfIndexes().sort(((t,e)=>e-t)),r=this.engine.batch((()=>{i.forEach((t=>{this.engine.removeRows(this.sheetId,[t,1])}))}));this.renderDependentSheets(r)}function gu(t,e,o,n){if(Ud(n))return;const i=this.columnAxisSyncer.getRemovedHfIndexes().sort(((t,e)=>e-t)),r=this.engine.batch((()=>{i.forEach((t=>{this.engine.removeColumns(this.sheetId,[t,1])}))}));this.renderDependentSheets(r)}function fu(t,e,o){var n;Fd($d,this,!0);const i=this.hot.getSourceDataArray(o,0,o+((null===(n=e.__children)||void 0===n?void 0:n.length)||0),this.hot.countSourceCols());Fd($d,this,!1),i.forEach(((t,e)=>{t.forEach(((t,n)=>{this.engine.setCellContents({col:n,row:o+e,sheet:this.sheetId},[[t]])}))}))}function pu(t){this.hot.runHooks("afterFormulasValuesUpdate",t)}function mu(t,e){this.hot.runHooks("afterNamedExpressionAdded",t,e)}function wu(t,e){this.hot.runHooks("afterNamedExpressionRemoved",t,e)}function bu(t){this.hot.runHooks("afterSheetAdded",t)}function vu(t,e){Wd(Xd,this,Kd).call(this,e),this.hot.runHooks("afterSheetRenamed",t,e)}function yu(t,e){this.hot.runHooks("afterSheetRemoved",t,e)}var Cu=o(2246);function Su(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Ru(t,e){return t.get(Tu(t,e))}function Eu(t,e,o){return t.set(Tu(t,e),o),o}function Tu(t,e,o){if("function"==typeof t?t===e:t.has(e))return arguments.length<3?e:o;throw new TypeError("Private element is not present on this object")}Z.R.getSingleton().register("beforeHideColumns"),Z.R.getSingleton().register("afterHideColumns"),Z.R.getSingleton().register("beforeUnhideColumns"),Z.R.getSingleton().register("afterUnhideColumns");const xu="hiddenColumns";var Mu=new WeakMap,Iu=new WeakSet;class Hu extends Kt{constructor(){var t;super(...arguments),Su(this,t=Iu),t.add(this),function(t,e){Su(t,e),e.set(t,null)}(this,Mu)}static get PLUGIN_KEY(){return xu}static get PLUGIN_PRIORITY(){return 310}static get DEFAULT_SETTINGS(){return{copyPasteEnabled:!0,indicators:!1,columns:[]}}isEnabled(){return!!this.hot.getSettings()[xu]}enablePlugin(){var t=this;this.enabled||(Eu(Mu,this,new Cu.o),Ru(Mu,this).addLocalHook("init",(()=>Tu(Iu,this,Pu).call(this))),this.hot.columnIndexMapper.registerMap(this.pluginName,Ru(Mu,this)),this.addHook("afterContextMenuDefaultOptions",(function(){for(var e=arguments.length,o=new Array(e),n=0;n<e;n++)o[n]=arguments[n];return Tu(Iu,t,Nu).call(t,...o)})),this.addHook("afterGetCellMeta",((t,e,o)=>Tu(Iu,this,Au).call(this,t,e,o))),this.addHook("modifyColWidth",((t,e)=>Tu(Iu,this,Ou).call(this,t,e)),2),this.addHook("afterGetColHeader",(function(){for(var e=arguments.length,o=new Array(e),n=0;n<e;n++)o[n]=arguments[n];return Tu(Iu,t,_u).call(t,...o)})),this.addHook("modifyCopyableRange",(t=>Tu(Iu,this,ku).call(this,t))),super.enablePlugin())}updatePlugin(){this.disablePlugin(),this.enablePlugin(),super.updatePlugin()}disablePlugin(){super.disablePlugin(),this.hot.columnIndexMapper.unregisterMap(this.pluginName),this.resetCellsMeta()}showColumns(t){const e=this.getHiddenColumns(),o=this.isValidConfig(t);let n=e;const i=Ru(Mu,this).getValues().slice(),r=t.length>0;if(o&&r){const e=t.map((t=>this.hot.toPhysicalColumn(t)));(0,c.z0)(e,(t=>{i[t]=!1})),n=(0,c.mu)(i,((t,e,o)=>(e&&t.push(this.hot.toVisualColumn(o)),t)),[])}!1!==this.hot.runHooks("beforeUnhideColumns",e,n,o&&r)&&(o&&r&&Ru(Mu,this).setValues(i),this.hot.view.adjustElementsSize(),this.hot.runHooks("afterUnhideColumns",e,n,o&&r,o&&n.length<e.length))}showColumn(){for(var t=arguments.length,e=new Array(t),o=0;o<t;o++)e[o]=arguments[o];this.showColumns(e)}hideColumns(t){const e=this.getHiddenColumns(),o=this.isValidConfig(t);let n=e;o&&(n=Array.from(new Set(e.concat(t)))),!1!==this.hot.runHooks("beforeHideColumns",e,n,o)&&(o&&this.hot.batchExecution((()=>{(0,c.z0)(t,(t=>{Ru(Mu,this).setValueAtIndex(this.hot.toPhysicalColumn(t),!0)}))}),!0),this.hot.runHooks("afterHideColumns",e,n,o,o&&n.length>e.length))}hideColumn(){for(var t=arguments.length,e=new Array(t),o=0;o<t;o++)e[o]=arguments[o];this.hideColumns(e)}getHiddenColumns(){return(0,c.YD)(Ru(Mu,this).getHiddenIndexes(),(t=>this.hot.toVisualColumn(t)))}isHidden(t){return Ru(Mu,this).getValueAtIndex(this.hot.toPhysicalColumn(t))||!1}isValidConfig(t){const e=this.hot.countCols();return!!(Array.isArray(t)&&t.length>0)&&t.every((t=>Number.isInteger(t)&&t>=0&&t<e))}resetCellsMeta(){(0,c.z0)(this.hot.getCellsMeta(),(t=>{t.skipColumnOnPaste=!1}))}destroy(){Eu(Mu,this,null),super.destroy()}}function Ou(t,e){return this.isHidden(e)?0:this.getSetting("indicators")&&(this.isHidden(e+1)||this.isHidden(e-1))&&"number"==typeof t&&this.hot.hasColHeaders()?t+15:void 0}function Au(t,e,o){if(!1===this.getSetting("copyPasteEnabled")&&this.isHidden(e)&&(o.skipColumnOnPaste=!0),this.isHidden(e-1))o.className=o.className||"",-1===o.className.indexOf("afterHiddenColumn")&&(o.className+=" afterHiddenColumn");else if(o.className){const t=o.className.split(" ");if(t.length>0){const e=t.indexOf("afterHiddenColumn");e>-1&&t.splice(e,1),o.className=t.join(" ")}}}function ku(t){if(this.getSetting("copyPasteEnabled"))return t;const e=[],o=(t,o,n,i)=>{e.push({startRow:t,endRow:o,startCol:n,endCol:i})};return(0,c.z0)(t,(t=>{let e=!0,n=0;(0,ut.Ti)(t.startCol,t.endCol,(i=>{this.isHidden(i)?(e||o(t.startRow,t.endRow,n,i-1),e=!0):(e&&(n=i),i===t.endCol&&o(t.startRow,t.endRow,n,i),e=!1)}))})),e}function _u(t,e){if(!this.getSetting("indicators")||t<0)return;const o=[];t>=1&&this.isHidden(t-1)&&o.push("afterHiddenColumn"),t<this.hot.countCols()-1&&this.isHidden(t+1)&&o.push("beforeHiddenColumn"),(0,i.iQ)(e,o)}function Nu(t){var e;t.items.push({name:fi},(e=this,{key:"hidden_columns_hide",name(){const t=this.getSelectedLast();let e=0;if(Array.isArray(t)){const[,o,,n]=t;o-n!==0&&(e=1)}return this.getTranslatedPhrase(tt.CONTEXTMENU_ITEMS_HIDE_COLUMN,e)},callback(){const{from:t,to:o}=this.getSelectedRangeLast(),n=Math.max(Math.min(t.col,o.col),0),i=Math.max(t.col,o.col),r=[];for(let t=n;t<=i;t+=1)r.push(t);e.hideColumns(r);const s=r[r.length-1],l=this.columnIndexMapper.getNearestNotHiddenIndex(s,1,!0);Number.isInteger(l)&&l>=0?this.selectColumns(l):this.deselectCell(),this.render(),this.view.adjustElementsSize()},disabled:!1,hidden(){return!(this.selection.isSelectedByColumnHeader()||this.selection.isSelectedByCorner())}}),function(t){const e=[];return{key:"hidden_columns_show",name(){const t=e.length>1?1:0;return this.getTranslatedPhrase(tt.CONTEXTMENU_ITEMS_SHOW_COLUMN,t)},callback(){var o,n;if(0===e.length)return;let i=e[0],r=e[e.length-1];i=null!==(o=this.columnIndexMapper.getNearestNotHiddenIndex(i-1,-1))&&void 0!==o?o:0,r=null!==(n=this.columnIndexMapper.getNearestNotHiddenIndex(r+1,1))&&void 0!==n?n:this.countCols()-1,t.showColumns(e),this.render(),this.view.adjustElementsSize(),r-i+1===this.countCols()||this.selectColumns(i,r)},disabled:!1,hidden(){const o=(0,c.YD)(t.getHiddenColumns(),(t=>this.toPhysicalColumn(t)));if(!this.selection.isSelectedByColumnHeader()&&!this.selection.isSelectedByCorner()||o.length<1)return!0;e.length=0;const n=this.getSelectedRangeLast(),i=n.getTopStartCorner().col,r=n.getBottomEndCorner().col,s=this.columnIndexMapper,l=s.getRenderableFromVisualIndex(i),a=s.getRenderableFromVisualIndex(r),h=s.getNotTrimmedIndexes(),d=[];if(i!==r){if(r-i+1>a-l+1){const t=h.slice(i,r+1);d.push(...t.filter((t=>o.includes(t))))}}else if(0===l&&l<i)d.push(...h.slice(0,i));else if(null===l)d.push(...h.slice(0,this.countCols()));else{const t=this.countCols()-1;a===s.getRenderableFromVisualIndex(s.getNearestNotHiddenIndex(t,-1))&&t>r&&d.push(...h.slice(r+1))}return(0,c.z0)(d,(t=>{e.push(this.toVisualColumn(t))})),0===e.length}}}(this))}function Pu(){const t=this.getSetting("columns");Array.isArray(t)&&this.hideColumns(t)}function Lu(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Du(t,e){return t.get(Fu(t,e))}function Vu(t,e,o){return t.set(Fu(t,e),o),o}function Fu(t,e,o){if("function"==typeof t?t===e:t.has(e))return arguments.length<3?e:o;throw new TypeError("Private element is not present on this object")}Z.R.getSingleton().register("beforeHideRows"),Z.R.getSingleton().register("afterHideRows"),Z.R.getSingleton().register("beforeUnhideRows"),Z.R.getSingleton().register("afterUnhideRows");const Bu="hiddenRows";var Wu=new WeakMap,zu=new WeakSet;class ju extends Kt{constructor(){var t;super(...arguments),Lu(this,t=zu),t.add(this),function(t,e){Lu(t,e),e.set(t,null)}(this,Wu)}static get PLUGIN_KEY(){return Bu}static get PLUGIN_PRIORITY(){return 320}static get DEFAULT_SETTINGS(){return{copyPasteEnabled:!0,indicators:!1,rows:[]}}isEnabled(){return!!this.hot.getSettings()[Bu]}enablePlugin(){var t=this;this.enabled||(Vu(Wu,this,new Cu.o),Du(Wu,this).addLocalHook("init",(()=>Fu(zu,this,qu).call(this))),this.hot.rowIndexMapper.registerMap(this.pluginName,Du(Wu,this)),this.addHook("afterContextMenuDefaultOptions",(function(){for(var e=arguments.length,o=new Array(e),n=0;n<e;n++)o[n]=arguments[n];return Fu(zu,t,Xu).call(t,...o)})),this.addHook("afterGetCellMeta",((t,e,o)=>Fu(zu,this,$u).call(this,t,e,o))),this.addHook("modifyRowHeight",((t,e)=>Fu(zu,this,Uu).call(this,t,e))),this.addHook("afterGetRowHeader",(function(){for(var e=arguments.length,o=new Array(e),n=0;n<e;n++)o[n]=arguments[n];return Fu(zu,t,Yu).call(t,...o)})),this.addHook("modifyCopyableRange",(t=>Fu(zu,this,Gu).call(this,t))),super.enablePlugin())}updatePlugin(){this.disablePlugin(),this.enablePlugin(),super.updatePlugin()}disablePlugin(){super.disablePlugin(),this.hot.rowIndexMapper.unregisterMap(this.pluginName),this.resetCellsMeta()}showRows(t){const e=this.getHiddenRows(),o=this.isValidConfig(t);let n=e;const i=Du(Wu,this).getValues().slice(),r=t.length>0;if(o&&r){const e=t.map((t=>this.hot.toPhysicalRow(t)));(0,c.z0)(e,(t=>{i[t]=!1})),n=(0,c.mu)(i,((t,e,o)=>(e&&t.push(this.hot.toVisualRow(o)),t)),[])}!1!==this.hot.runHooks("beforeUnhideRows",e,n,o&&r)&&(o&&r&&Du(Wu,this).setValues(i),this.hot.runHooks("afterUnhideRows",e,n,o&&r,o&&n.length<e.length))}showRow(){for(var t=arguments.length,e=new Array(t),o=0;o<t;o++)e[o]=arguments[o];this.showRows(e)}hideRows(t){const e=this.getHiddenRows(),o=this.isValidConfig(t);let n=e;o&&(n=Array.from(new Set(e.concat(t)))),!1!==this.hot.runHooks("beforeHideRows",e,n,o)&&(o&&this.hot.batchExecution((()=>{(0,c.z0)(t,(t=>{Du(Wu,this).setValueAtIndex(this.hot.toPhysicalRow(t),!0)}))}),!0),this.hot.runHooks("afterHideRows",e,n,o,o&&n.length>e.length))}hideRow(){for(var t=arguments.length,e=new Array(t),o=0;o<t;o++)e[o]=arguments[o];this.hideRows(e)}getHiddenRows(){return(0,c.YD)(Du(Wu,this).getHiddenIndexes(),(t=>this.hot.toVisualRow(t)))}isHidden(t){return Du(Wu,this).getValueAtIndex(this.hot.toPhysicalRow(t))||!1}isValidConfig(t){const e=this.hot.countRows();return!!(Array.isArray(t)&&t.length>0)&&t.every((t=>Number.isInteger(t)&&t>=0&&t<e))}resetCellsMeta(){(0,c.z0)(this.hot.getCellsMeta(),(t=>{t.skipRowOnPaste=!1}))}destroy(){Vu(Wu,this,null),super.destroy()}}function Uu(t,e){return this.isHidden(e)?0:t}function $u(t,e,o){if(!1===this.getSetting("copyPasteEnabled")&&this.isHidden(t)&&(o.skipRowOnPaste=!0),this.isHidden(t-1))o.className=o.className||"",-1===o.className.indexOf("afterHiddenRow")&&(o.className+=" afterHiddenRow");else if(o.className){const t=o.className.split(" ");if(t.length>0){const e=t.indexOf("afterHiddenRow");e>-1&&t.splice(e,1),o.className=t.join(" ")}}}function Gu(t){if(this.getSetting("copyPasteEnabled"))return t;const e=[],o=(t,o,n,i)=>{e.push({startRow:t,endRow:o,startCol:n,endCol:i})};return(0,c.z0)(t,(t=>{let e=!0,n=0;(0,ut.Ti)(t.startRow,t.endRow,(i=>{this.isHidden(i)?(e||o(n,i-1,t.startCol,t.endCol),e=!0):(e&&(n=i),i===t.endRow&&o(n,i,t.startCol,t.endCol),e=!1)}))})),e}function Yu(t,e){if(!this.getSetting("indicators")||t<0)return;const o=[];t>=1&&this.isHidden(t-1)&&o.push("afterHiddenRow"),t<this.hot.countRows()-1&&this.isHidden(t+1)&&o.push("beforeHiddenRow"),(0,i.iQ)(e,o)}function Xu(t){var e;t.items.push({name:fi},(e=this,{key:"hidden_rows_hide",name(){const t=this.getSelectedLast();let e=0;if(Array.isArray(t)){const[o,,n]=t;o-n!==0&&(e=1)}return this.getTranslatedPhrase(tt.CONTEXTMENU_ITEMS_HIDE_ROW,e)},callback(){const{from:t,to:o}=this.getSelectedRangeLast(),n=Math.max(Math.min(t.row,o.row),0),i=Math.max(t.row,o.row),r=[];for(let t=n;t<=i;t+=1)r.push(t);e.hideRows(r);const s=r[r.length-1],l=this.rowIndexMapper.getNearestNotHiddenIndex(s,1,!0);Number.isInteger(l)&&l>=0?this.selectRows(l):this.deselectCell(),this.render(),this.view.adjustElementsSize()},disabled:!1,hidden(){return!(this.selection.isSelectedByRowHeader()||this.selection.isSelectedByCorner())}}),function(t){const e=[];return{key:"hidden_rows_show",name(){const t=e.length>1?1:0;return this.getTranslatedPhrase(tt.CONTEXTMENU_ITEMS_SHOW_ROW,t)},callback(){var o,n;if(0===e.length)return;let i=e[0],r=e[e.length-1];i=null!==(o=this.rowIndexMapper.getNearestNotHiddenIndex(i-1,-1))&&void 0!==o?o:0,r=null!==(n=this.rowIndexMapper.getNearestNotHiddenIndex(r+1,1))&&void 0!==n?n:this.countRows()-1,t.showRows(e),this.render(),this.view.adjustElementsSize(),r-i+1===this.countRows()||this.selectRows(i,r)},disabled:!1,hidden(){const o=(0,c.YD)(t.getHiddenRows(),(t=>this.toPhysicalRow(t)));if(!this.selection.isSelectedByRowHeader()&&!this.selection.isSelectedByCorner()||o.length<1)return!0;e.length=0;const n=this.getSelectedRangeLast(),i=n.getTopStartCorner().row,r=n.getBottomEndCorner().row,s=this.rowIndexMapper,l=s.getRenderableFromVisualIndex(i),a=s.getRenderableFromVisualIndex(r),h=s.getNotTrimmedIndexes(),d=[];if(i!==r){if(r-i+1>a-l+1){const t=h.slice(i,r+1);d.push(...t.filter((t=>o.includes(t))))}}else if(0===l&&l<i)d.push(...h.slice(0,i));else if(null===l)d.push(...h.slice(0,this.countRows()));else{const t=this.countRows()-1;a===s.getRenderableFromVisualIndex(s.getNearestNotHiddenIndex(t,-1))&&t>r&&d.push(...h.slice(r+1))}return(0,c.z0)(d,(t=>{e.push(this.toVisualRow(t))})),0===e.length}}}(this))}function qu(){const t=this.getSetting("rows");Array.isArray(t)&&this.hideRows(t)}function Ku(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Qu(t,e){return t.get(Zu(t,e))}function Ju(t,e,o){return t.set(Zu(t,e),o),o}function Zu(t,e,o){if("function"==typeof t?t===e:t.has(e))return arguments.length<3?e:o;throw new TypeError("Private element is not present on this object")}Z.R.getSingleton().register("beforeColumnFreeze"),Z.R.getSingleton().register("afterColumnFreeze"),Z.R.getSingleton().register("beforeColumnUnfreeze"),Z.R.getSingleton().register("afterColumnUnfreeze");const tg="manualColumnFreeze";var eg=new WeakMap,og=new WeakSet;class ng extends Kt{constructor(){var t;super(...arguments),Ku(this,t=og),t.add(this),function(t,e){Ku(t,e),e.set(t,!1)}(this,eg)}static get PLUGIN_KEY(){return tg}static get PLUGIN_PRIORITY(){return 110}isEnabled(){return!!this.hot.getSettings()[tg]}enablePlugin(){this.enabled||(this.addHook("afterContextMenuDefaultOptions",(t=>Zu(og,this,ig).call(this,t))),this.addHook("beforeColumnMove",((t,e)=>Zu(og,this,rg).call(this,t,e))),super.enablePlugin())}disablePlugin(){Ju(eg,this,!1),super.disablePlugin()}updatePlugin(){this.disablePlugin(),this.enablePlugin(),super.updatePlugin()}freezeColumn(t){const e=this.hot.getSettings(),o=e.fixedColumnsStart<this.hot.countCols()&&t>e.fixedColumnsStart-1;Qu(eg,this)||Ju(eg,this,!0),!1!==this.hot.runHooks("beforeColumnFreeze",t,o)&&(o&&(this.hot.columnIndexMapper.moveIndexes(t,e.fixedColumnsStart),e._fixedColumnsStart+=1),this.hot.runHooks("afterColumnFreeze",t,o))}unfreezeColumn(t){const e=this.hot.getSettings(),o=e.fixedColumnsStart>0&&t<=e.fixedColumnsStart-1;Qu(eg,this)||Ju(eg,this,!0),!1!==this.hot.runHooks("beforeColumnUnfreeze",t,o)&&(o&&(e._fixedColumnsStart-=1,this.hot.columnIndexMapper.moveIndexes(t,e.fixedColumnsStart)),this.hot.runHooks("afterColumnUnfreeze",t,o))}}function ig(t){var e;t.items.push({name:"---------"},(e=this,{key:"freeze_column",name(){return this.getTranslatedPhrase(tt.CONTEXTMENU_ITEMS_FREEZE_COLUMN)},callback(t,o){const[{start:{col:n}}]=o;e.freezeColumn(n),this.render(),this.view.adjustElementsSize()},hidden(){const t=this.getSelectedRange();let e=!1;return(void 0===t||t.length>1||t[0].from.col!==t[0].to.col||t[0].from.col<=this.getSettings().fixedColumnsStart-1)&&(e=!0),e}}),function(t){return{key:"unfreeze_column",name(){return this.getTranslatedPhrase(tt.CONTEXTMENU_ITEMS_UNFREEZE_COLUMN)},callback(e,o){const[{start:{col:n}}]=o;t.unfreezeColumn(n),this.render(),this.view.adjustElementsSize()},hidden(){const t=this.getSelectedRange();let e=!1;return(void 0===t||t.length>1||t[0].from.col!==t[0].to.col||t[0].from.col>=this.getSettings().fixedColumnsStart)&&(e=!0),e}}}(this))}function rg(t,e){if(Qu(eg,this)){const o=this.hot.getSettings().fixedColumnsStart;if(e<o)return!1;if(t.some((t=>t<o)))return!1}}function sg(t,e,o){return(e=function(t){var e=function(t){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var o=e.call(t,"string");if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[e]=o,t}const lg="px",ag=class{constructor(t){sg(this,"hot",void 0),sg(this,"_element",null),sg(this,"state",0),sg(this,"inlineProperty",void 0),this.hot=t,this.inlineProperty=t.isRtl()?"right":"left"}appendTo(t){t.appendChild(this._element),this.state=2}build(){0===this.state&&(this._element=this.hot.rootDocument.createElement("div"),this.state=1)}destroy(){this.isAppended()&&this._element.parentElement.removeChild(this._element),this._element=null,this.state=0}isAppended(){return 2===this.state}isBuilt(){return this.state>=1}setPosition(t,e){(0,ut.kf)(t)&&(this._element.style.top=t+lg),(0,ut.kf)(e)&&(this._element.style[this.inlineProperty]=e+lg)}getPosition(){const t=this._element.style;return{top:t.top?parseInt(t.top,10):0,start:t[this.inlineProperty]?parseInt(t[this.inlineProperty],10):0}}setSize(t,e){(0,ut.kf)(t)&&(this._element.style.width=t+lg),(0,ut.kf)(e)&&(this._element.style.height=e+lg)}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(t,e){(0,ut.kf)(t)&&(this._element.style.marginTop=t+lg),(0,ut.kf)(e)&&(this._element.style[`margin${(0,u.Ob)(this.inlineProperty)}`]=e+lg)}getOffset(){const t=this._element.style,e=`margin${(0,u.Ob)(this.inlineProperty)}`;return{top:t.marginTop?parseInt(t.marginTop,10):0,start:t[e]?parseInt(t[e],10):0}}},hg=class extends ag{build(){super.build(),(0,i.iQ)(this._element,"ht__manualColumnMove--backlight")}},cg=class extends ag{build(){super.build(),(0,i.iQ)(this._element,"ht__manualColumnMove--guideline")}};function dg(t,e,o){ug(t,e),e.set(t,o)}function ug(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function gg(t,e,o){return t.set(pg(t,e),o),o}function fg(t,e){return t.get(pg(t,e))}function pg(t,e,o){if("function"==typeof t?t===e:t.has(e))return arguments.length<3?e:o;throw new TypeError("Private element is not present on this object")}Z.R.getSingleton().register("beforeColumnMove"),Z.R.getSingleton().register("afterColumnMove");const mg="manualColumnMove",wg="ht__manualColumnMove",bg="show-ui",vg="on-moving--columns",yg="after-selection--columns";var Cg=new WeakMap,Sg=new WeakMap,Rg=new WeakMap,Eg=new WeakMap,Tg=new WeakMap,xg=new WeakMap,Mg=new WeakMap,Ig=new WeakMap,Hg=new WeakMap,Og=new WeakMap,Ag=new WeakMap,kg=new WeakSet;class _g extends Kt{constructor(){var t;super(...arguments),ug(this,t=kg),t.add(this),dg(this,Cg,new hg(this.hot)),dg(this,Sg,new cg(this.hot)),dg(this,Rg,[]),dg(this,Eg,0),dg(this,Tg,!1),dg(this,xg,{}),dg(this,Mg,void 0),dg(this,Ig,void 0),dg(this,Hg,void 0),dg(this,Og,void 0),dg(this,Ag,void 0)}static get PLUGIN_KEY(){return mg}static get PLUGIN_PRIORITY(){return 120}isEnabled(){return!!this.hot.getSettings()[mg]}enablePlugin(){var t=this;this.enabled||(this.addHook("beforeOnCellMouseDown",(function(){for(var e=arguments.length,o=new Array(e),n=0;n<e;n++)o[n]=arguments[n];return pg(kg,t,Ng).call(t,...o)})),this.addHook("beforeOnCellMouseOver",(function(){for(var e=arguments.length,o=new Array(e),n=0;n<e;n++)o[n]=arguments[n];return pg(kg,t,Lg).call(t,...o)})),this.addHook("afterScrollVertically",(()=>pg(kg,this,Vg).call(this))),this.addHook("afterLoadData",(function(){for(var e=arguments.length,o=new Array(e),n=0;n<e;n++)o[n]=arguments[n];return pg(kg,t,Fg).call(t,...o)})),this.buildPluginUI(),this.registerEvents(),(0,i.iQ)(this.hot.rootElement,wg),super.enablePlugin())}updatePlugin(){this.disablePlugin(),this.enablePlugin(),this.moveBySettingsOrLoad(),super.updatePlugin()}disablePlugin(){(0,i.vy)(this.hot.rootElement,wg),this.unregisterEvents(),fg(Cg,this).destroy(),fg(Sg,this).destroy(),super.disablePlugin()}moveColumn(t,e){return this.moveColumns([t],e)}moveColumns(t,e){const o=fg(Mg,this),n=this.isMovePossible(t,e),i=this.hot.runHooks("beforeColumnMove",t,e,o,n);if(gg(Mg,this,void 0),!1===i)return;n&&this.hot.columnIndexMapper.moveIndexes(t,e);const r=n&&this.isColumnOrderChanged(t,e);return this.hot.runHooks("afterColumnMove",t,e,o,n,r),r}dragColumn(t,e){return this.dragColumns([t],e)}dragColumns(t,e){const o=this.countFinalIndex(t,e);return gg(Mg,this,e),this.moveColumns(t,o)}isMovePossible(t,e){const o=this.hot.columnIndexMapper.getNotTrimmedIndexesLength(),n=t.length+e>o,i=e<0,r=t.some((t=>t<0)),s=t.some((t=>t>=o));return!(n||i||r||s)}isColumnOrderChanged(t,e){return t.some(((t,o)=>t-o!==e))}countFinalIndex(t,e){const o=(0,c.mu)(t,((t,o)=>(o<e&&(t+=1),t)),0);return e-o}getColumnsWidth(t,e){const o=this.hot.columnIndexMapper;let n=0;for(let i=t;i<=e;i+=1){const t=o.getRenderableFromVisualIndex(i);i<0?n+=this.hot.view._wt.wtViewport.getRowHeaderWidth()||0:null!==t&&(n+=this.hot.view._wt.wtTable.getColumnWidth(t)||0)}return n}moveBySettingsOrLoad(){const t=this.hot.getSettings()[mg];if(Array.isArray(t))this.moveColumns(t,0);else if(void 0!==t){const t=this.persistentStateLoad();t.length&&this.moveColumns(t,0)}}isFixedColumnsStart(t){return t<this.hot.getSettings().fixedColumnsStart}persistentStateSave(){this.hot.runHooks("persistentStateSave","manualColumnMove",this.hot.columnIndexMapper.getIndexesSequence())}persistentStateLoad(){const t={};return this.hot.runHooks("persistentStateLoad","manualColumnMove",t),t.value?t.value:[]}prepareColumnsToMoving(t,e){const o=[];return(0,ut.Ti)(t,e,(t=>{o.push(t)})),o}refreshPositions(){const t=this.hot.view.getFirstFullyVisibleColumn();this.isFixedColumnsStart(fg(Ig,this))&&t>0&&this.hot.scrollViewportTo({col:this.hot.columnIndexMapper.getNearestNotHiddenIndex(t-1,-1)});const e=this.hot.view._wt.wtTable,o=this.hot.view._wt.wtOverlays.scrollableElement,n="number"==typeof o.scrollX?o.scrollX:o.scrollLeft;let r=this.hot.view.THEAD.offsetLeft+this.getColumnsWidth(0,fg(Ig,this)-1);const s=e.hider.offsetWidth,l=e.TBODY.offsetLeft,a=fg(Cg,this).getOffset().start,h=fg(Cg,this).getSize().width;let c=0,d=0;if(this.hot.isRtl()){const t=this.hot.rootWindow,e=(0,i.Gq)(this.hot.rootElement),r=t.innerWidth-fg(Hg,this)-e;d=t.innerWidth-fg(xg,this).eventPageX-r-(void 0===o.scrollX?n:0)}else d=fg(xg,this).eventPageX-(fg(Hg,this)-(void 0===o.scrollX?n:0));if(fg(Og,this)&&(c=this.hot.view._wt.wtOverlays.inlineStartOverlay.clone.wtTable.getColumnHeader(-1).offsetWidth),this.isFixedColumnsStart(fg(Ig,this))&&(r+=n),r+=c,fg(Ig,this)<0)fg(Ag,this)>0?fg(xg,this).col=0:fg(xg,this).col=t>0?t-1:t;else if(fg(xg,this).TD.offsetWidth/2+r<=d){const t=fg(Ig,this)>=fg(Eg,this)?fg(Eg,this)-1:fg(Ig,this);fg(xg,this).col=t+1,r+=fg(xg,this).TD.offsetWidth}else fg(xg,this).col=fg(Ig,this);let u=d,g=r;d+h+a>=s?u=s-h-a:d+a<l+c&&(u=l+c+Math.abs(a)),r>=s-1?g=s-1:0===g?g=1:void 0!==o.scrollX&&fg(Ig,this)<fg(Ag,this)&&(g-=fg(Hg,this)<=o.scrollX?fg(Hg,this):0),fg(Cg,this).setPosition(null,u),fg(Sg,this).setPosition(null,g)}registerEvents(){const{documentElement:t}=this.hot.rootDocument;this.eventManager.addEventListener(t,"mousemove",(t=>pg(kg,this,Pg).call(this,t))),this.eventManager.addEventListener(t,"mouseup",(()=>pg(kg,this,Dg).call(this)))}unregisterEvents(){this.eventManager.clear()}buildPluginUI(){fg(Cg,this).build(),fg(Sg,this).build()}destroy(){fg(Cg,this).destroy(),fg(Sg,this).destroy(),super.destroy()}}function Ng(t,e,o,n){const s=this.hot.view._wt.wtTable,l=this.hot.selection.isSelectedByColumnHeader(),a=this.hot.getSelectedRangeLast(),h=(0,i.nB)(t.target,"sortAction");if(!a||!l||fg(Tg,this)||0!==t.button||h)return gg(Tg,this,!1),fg(Rg,this).length=0,void(0,i.vy)(this.hot.rootElement,[vg,bg]);const c=fg(Sg,this).isBuilt()&&!fg(Sg,this).isAppended(),d=fg(Cg,this).isBuilt()&&!fg(Cg,this).isAppended();c&&d&&(fg(Sg,this).appendTo(s.hider),fg(Cg,this).appendTo(s.hider));const{from:u,to:g}=a,f=Math.min(u.col,g.col),p=Math.max(u.col,g.col);if(e.row<0&&e.col>=f&&e.col<=p){n.column=!0,gg(Tg,this,!0);const l=o.firstChild?(0,r.zg)(t,o.firstChild).x:t.offsetX;fg(xg,this).eventPageX=t.pageX,gg(Ig,this,e.col),fg(xg,this).TD=o,fg(xg,this).col=e.col,gg(Rg,this,this.prepareColumnsToMoving(f,p)),gg(Og,this,!!this.hot.getSettings().rowHeaders),gg(Eg,this,this.hot.countCols()),gg(Ag,this,this.hot.getSettings().fixedColumnsStart),gg(Hg,this,(0,i.cY)(this.hot.rootElement).left);const a=fg(Og,this)?-1:0,h=s.holder.scrollTop+s.getColumnHeaderHeight(0)+1,c=e.col<fg(Ag,this),d=this.hot.view._wt.wtOverlays.inlineStartOverlay.getOverlayOffset(),u=Math.abs(l-(this.hot.isRtl()?o.offsetWidth:0)),g=this.getColumnsWidth(f,e.col-1)+u,m=this.getColumnsWidth(a,f-1)+(c?d:0)+g;fg(Cg,this).setPosition(h,m),fg(Cg,this).setSize(this.getColumnsWidth(f,p),s.hider.offsetHeight-h),fg(Cg,this).setOffset(null,-g),(0,i.iQ)(this.hot.rootElement,vg)}else(0,i.vy)(this.hot.rootElement,yg),gg(Tg,this,!1),fg(Rg,this).length=0}function Pg(t){fg(Tg,this)&&(fg(xg,this).eventPageX=t.pageX,this.refreshPositions())}function Lg(t,e,o,n){this.hot.getSelectedRangeLast()&&fg(Tg,this)&&(fg(Rg,this).indexOf(e.col)>-1?(0,i.vy)(this.hot.rootElement,bg):(0,i.iQ)(this.hot.rootElement,bg),n.row=!0,n.column=!0,n.cell=!0,gg(Ig,this,e.col),fg(xg,this).TD=o)}function Dg(){const t=fg(xg,this).col,e=fg(Rg,this).length;if(gg(Ig,this,void 0),gg(Tg,this,!1),(0,i.vy)(this.hot.rootElement,[vg,bg,yg]),this.hot.selection.isSelectedByColumnHeader()&&(0,i.iQ)(this.hot.rootElement,yg),e<1||void 0===t)return;const o=fg(Rg,this)[0],n=this.hot.toPhysicalColumn(o),r=this.dragColumns(fg(Rg,this),t);if(fg(Rg,this).length=0,!0===r){this.persistentStateSave(),this.hot.render(),this.hot.view.adjustElementsSize();const t=this.hot.toVisualColumn(n),o=t+e-1;this.hot.selectColumns(t,o)}}function Vg(){const t=this.hot.view._wt.wtTable,e=t.getColumnHeaderHeight(0)+1+t.holder.scrollTop;fg(Cg,this).setPosition(e),fg(Cg,this).setSize(null,t.hider.offsetHeight-e)}function Fg(){this.moveBySettingsOrLoad()}function Bg(t,e,o){Wg(t,e),e.set(t,o)}function Wg(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function zg(t,e,o){return t.set(Ug(t,e),o),o}function jg(t,e){return t.get(Ug(t,e))}function Ug(t,e,o){if("function"==typeof t?t===e:t.has(e))return arguments.length<3?e:o;throw new TypeError("Private element is not present on this object")}const $g="manualColumnResize",Gg="manualColumnWidths";var Yg=new WeakMap,Xg=new WeakMap,qg=new WeakMap,Kg=new WeakMap,Qg=new WeakMap,Jg=new WeakMap,Zg=new WeakMap,tf=new WeakMap,ef=new WeakMap,of=new WeakMap,nf=new WeakMap,rf=new WeakMap,sf=new WeakMap,lf=new WeakMap,af=new WeakMap,hf=new WeakMap,cf=new WeakSet;class df extends Kt{static get PLUGIN_KEY(){return $g}static get PLUGIN_PRIORITY(){return 130}constructor(t){var e;super(t),Wg(this,e=cf),e.add(this),Bg(this,Yg,null),Bg(this,Xg,null),Bg(this,qg,[]),Bg(this,Kg,null),Bg(this,Qg,null),Bg(this,Jg,null),Bg(this,Zg,null),Bg(this,tf,null),Bg(this,ef,this.hot.rootDocument.createElement("DIV")),Bg(this,of,this.hot.rootDocument.createElement("DIV")),Bg(this,nf,null),Bg(this,rf,!1),Bg(this,sf,0),Bg(this,lf,null),Bg(this,af,void 0),Bg(this,hf,void 0),(0,i.iQ)(jg(ef,this),"manualColumnResizer"),(0,i.iQ)(jg(of,this),"manualColumnResizerGuide")}get inlineDir(){return this.hot.isRtl()?"right":"left"}isEnabled(){return this.hot.getSettings()[$g]}enablePlugin(){var t=this;this.enabled||(zg(af,this,new re._),jg(af,this).addLocalHook("init",(()=>Ug(cf,this,uf).call(this))),this.hot.columnIndexMapper.registerMap(this.pluginName,jg(af,this)),this.addHook("modifyColWidth",(function(){for(var e=arguments.length,o=new Array(e),n=0;n<e;n++)o[n]=arguments[n];return Ug(cf,t,bf).call(t,...o)}),1),this.addHook("beforeStretchingColumnWidth",(function(){for(var e=arguments.length,o=new Array(e),n=0;n<e;n++)o[n]=arguments[n];return Ug(cf,t,vf).call(t,...o)}),1),this.addHook("beforeColumnResize",(function(){for(var e=arguments.length,o=new Array(e),n=0;n<e;n++)o[n]=arguments[n];return Ug(cf,t,yf).call(t,...o)})),this.bindEvents(),super.enablePlugin())}updatePlugin(){this.disablePlugin(),this.enablePlugin(),super.updatePlugin()}disablePlugin(){zg(hf,this,jg(af,this).getValues()),this.hot.columnIndexMapper.unregisterMap(this.pluginName),super.disablePlugin()}saveManualColumnWidths(){this.hot.runHooks("persistentStateSave",Gg,jg(af,this).getValues())}loadManualColumnWidths(){const t={};return this.hot.runHooks("persistentStateLoad",Gg,t),t.value}setManualSize(t,e){const o=Math.max(e,20),n=this.hot.toPhysicalColumn(t);return jg(af,this).setValueAtIndex(n,o),o}clearManualSize(t){const e=this.hot.toPhysicalColumn(t);jg(af,this).setValueAtIndex(e,null)}setupHandlePosition(t){if(!t.parentNode)return;zg(Yg,this,t);const{_wt:e}=this.hot.view,o=e.wtTable.getCoords(jg(Yg,this)),n=o.col;if(n<0)return;const r=(0,i.DK)(jg(Yg,this)),s=jg(Yg,this).getBoundingClientRect();let l;n<e.getSetting("fixedColumnsStart")&&(l=e.wtOverlays.topInlineStartCornerOverlay.getRelativeCellPosition(jg(Yg,this),o.row,o.col)),l||(l=e.wtOverlays.topOverlay.getRelativeCellPosition(jg(Yg,this),o.row,o.col)),zg(Xg,this,this.hot.columnIndexMapper.getVisualFromRenderableIndex(n)),zg(qg,this,[]);const a=this.hot.selection.isSelectedByCorner()||this.hot.selection.isSelectedByColumnHeader();if(this.hot.selection.isSelected()&&a){const t=this.hot.getSelectedRange();(0,c.z0)(t,(t=>{const e=t.getTopStartCorner().col,o=t.getBottomEndCorner().col;(0,ut.Ti)(e,o,(t=>{jg(qg,this).includes(t)||jg(qg,this).push(t)}))}))}jg(qg,this).includes(jg(Xg,this))||zg(qg,this,[jg(Xg,this)]),zg(tf,this,l.start-6),zg(Zg,this,parseInt(s.width,10)),jg(ef,this).style.top=`${l.top}px`,jg(ef,this).style[this.inlineDir]=`${jg(tf,this)+jg(Zg,this)}px`,jg(ef,this).style.height=`${r}px`,this.hot.rootElement.appendChild(jg(ef,this))}refreshHandlePosition(){jg(ef,this).style[this.inlineDir]=`${jg(tf,this)+jg(Kg,this)}px`}setupGuidePosition(){const t=parseInt((0,i.DK)(jg(ef,this)),10),e=parseInt(jg(ef,this).style.top,10)+t,o=this.hot.view.getTableHeight();(0,i.iQ)(jg(ef,this),"active"),(0,i.iQ)(jg(of,this),"active"),jg(of,this).style.top=`${e}px`,this.refreshGuidePosition(),jg(of,this).style.height=o-t+"px",this.hot.rootElement.appendChild(jg(of,this))}refreshGuidePosition(){jg(of,this).style[this.inlineDir]=jg(ef,this).style[this.inlineDir]}hideHandleAndGuide(){(0,i.vy)(jg(ef,this),"active"),(0,i.vy)(jg(of,this),"active")}checkIfColumnHeader(t){const e=(0,i.kp)(t,["THEAD"],this.hot.rootElement),{topOverlay:o,topInlineStartCornerOverlay:n}=this.hot.view._wt.wtOverlays;return[o.clone.wtTable.THEAD,n.clone.wtTable.THEAD].includes(e)}getClosestTHParent(t){return"TABLE"!==t.tagName?"TH"===t.tagName?t:this.getClosestTHParent(t.parentNode):null}afterMouseDownTimeout(){const t=()=>{this.hot.render(),this.hot.view.adjustElementsSize()},e=(e,o)=>{const n=this.hot.runHooks("beforeColumnResize",jg(Qg,this),e,!0);void 0!==n&&zg(Qg,this,n),this.setManualSize(e,jg(Qg,this)),this.saveManualColumnWidths(),this.hot.runHooks("afterColumnResize",jg(Qg,this),e,!0),o&&t()};jg(sf,this)>=2&&(jg(qg,this).length>1?((0,c.z0)(jg(qg,this),(t=>{e(t)})),t()):(0,c.z0)(jg(qg,this),(t=>{e(t,!0)}))),zg(sf,this,0),zg(lf,this,null)}bindEvents(){const{rootWindow:t,rootElement:e}=this.hot;this.eventManager.addEventListener(e,"mouseover",(t=>Ug(cf,this,gf).call(this,t))),this.eventManager.addEventListener(e,"mousedown",(t=>Ug(cf,this,ff).call(this,t))),this.eventManager.addEventListener(t,"mousemove",(t=>Ug(cf,this,pf).call(this,t))),this.eventManager.addEventListener(t,"mouseup",(()=>Ug(cf,this,mf).call(this))),this.eventManager.addEventListener(jg(ef,this),"contextmenu",(()=>Ug(cf,this,wf).call(this)))}destroy(){super.destroy()}}function uf(){const t=this.hot.getSettings()[$g],e=this.loadManualColumnWidths();void 0!==e?this.hot.batchExecution((()=>{e.forEach(((t,e)=>{jg(af,this).setValueAtIndex(e,t)}))}),!0):Array.isArray(t)?(this.hot.batchExecution((()=>{t.forEach(((t,e)=>{jg(af,this).setValueAtIndex(e,t)}))}),!0),zg(hf,this,t)):!0===t&&Array.isArray(jg(hf,this))&&this.hot.batchExecution((()=>{jg(hf,this).forEach(((t,e)=>{jg(af,this).setValueAtIndex(e,t)}))}),!0)}function gf(t){if(!(0,i.$w)(t.target)&&!0!==jg(rf,this)&&this.checkIfColumnHeader(t.target)){const e=this.getClosestTHParent(t.target);if(!e)return;const o=e.getAttribute("colspan");!e||null!==o&&"1"!==o||jg(nf,this)||this.setupHandlePosition(e)}}function ff(t){t.target.parentNode===this.hot.rootElement&&(0,i.nB)(t.target,"manualColumnResizer")&&(this.setupHandlePosition(jg(Yg,this)),this.setupGuidePosition(),zg(nf,this,!0),null===jg(lf,this)&&(zg(lf,this,setTimeout((()=>this.afterMouseDownTimeout()),500)),this.hot._registerTimeout(jg(lf,this))),zg(sf,this,jg(sf,this)+1),this.startX=t.pageX,zg(Qg,this,jg(Zg,this)))}function pf(t){if(jg(nf,this)){const e=(t.pageX-this.startX)*this.hot.getDirectionFactor();zg(Kg,this,jg(Zg,this)+e),(0,c.z0)(jg(qg,this),(t=>{zg(Qg,this,this.setManualSize(t,jg(Kg,this)))})),this.refreshHandlePosition(),this.refreshGuidePosition()}}function mf(){const t=()=>{this.hot.render(),this.hot.view.adjustElementsSize()},e=(e,o)=>{this.hot.runHooks("beforeColumnResize",jg(Qg,this),e,!1),o&&t(),this.saveManualColumnWidths(),this.hot.runHooks("afterColumnResize",jg(Qg,this),e,!1)};jg(nf,this)&&(this.hideHandleAndGuide(),zg(nf,this,!1),jg(Qg,this)!==jg(Zg,this)&&(jg(qg,this).length>1?((0,c.z0)(jg(qg,this),(t=>{e(t)})),t()):(0,c.z0)(jg(qg,this),(t=>{e(t,!0)}))),this.setupHandlePosition(jg(Yg,this)))}function wf(){this.hideHandleAndGuide(),this.hot.rootElement.removeChild(jg(ef,this)),this.hot.rootElement.removeChild(jg(of,this)),zg(nf,this,!1),zg(rf,this,!0),this.hot._registerImmediate((()=>{zg(rf,this,!1)}))}function bf(t,e){let o=t;if(this.enabled){const t=this.hot.toPhysicalColumn(e),n=jg(af,this).getValueAtIndex(t);this.hot.getSettings()[$g]&&n&&(o=n)}return o}function vf(t,e){const o=jg(af,this).getValueAtIndex(this.hot.toPhysicalColumn(e));return"number"==typeof o?o:t}function yf(){this.hot.view._wt.wtViewport.resetHasOversizedColumnHeadersMarked()}function Cf(t,e,o){return(e=function(t){var e=function(t){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var o=e.call(t,"string");if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[e]=o,t}const Sf="px",Rf=class{constructor(t){Cf(this,"hot",void 0),Cf(this,"_element",null),Cf(this,"state",0),this.hot=t}appendTo(t){t.appendChild(this._element),this.state=2}build(){0===this.state&&(this._element=this.hot.rootDocument.createElement("div"),this.state=1)}destroy(){this.isAppended()&&this._element.parentElement.removeChild(this._element),this._element=null,this.state=0}isAppended(){return 2===this.state}isBuilt(){return this.state>=1}setPosition(t,e){void 0!==t&&(this._element.style.top=t+Sf),void 0!==e&&(this._element.style.left=e+Sf)}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(t,e){t&&(this._element.style.width=t+Sf),e&&(this._element.style.height=e+Sf)}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(t,e){t&&(this._element.style.marginTop=t+Sf),e&&(this._element.style.marginLeft=e+Sf)}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}}},Ef=class extends Rf{build(){super.build(),(0,i.iQ)(this._element,"ht__manualRowMove--backlight")}},Tf=class extends Rf{build(){super.build(),(0,i.iQ)(this._element,"ht__manualRowMove--guideline")}};function xf(t,e,o){Mf(t,e),e.set(t,o)}function Mf(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function If(t,e,o){return t.set(Of(t,e),o),o}function Hf(t,e){return t.get(Of(t,e))}function Of(t,e,o){if("function"==typeof t?t===e:t.has(e))return arguments.length<3?e:o;throw new TypeError("Private element is not present on this object")}Z.R.getSingleton().register("beforeRowMove"),Z.R.getSingleton().register("afterRowMove");const Af="manualRowMove",kf="ht__manualRowMove",_f="show-ui",Nf="on-moving--rows",Pf="after-selection--rows";var Lf=new WeakMap,Df=new WeakMap,Vf=new WeakMap,Ff=new WeakMap,Bf=new WeakMap,Wf=new WeakMap,zf=new WeakSet;class jf extends Kt{constructor(){var t;super(...arguments),Mf(this,t=zf),t.add(this),xf(this,Lf,new Ef(this.hot)),xf(this,Df,new Tf(this.hot)),xf(this,Vf,[]),xf(this,Ff,void 0),xf(this,Bf,{}),xf(this,Wf,void 0)}static get PLUGIN_KEY(){return Af}static get PLUGIN_PRIORITY(){return 140}isEnabled(){return!!this.hot.getSettings()[Af]}enablePlugin(){var t=this;this.enabled||(this.addHook("beforeOnCellMouseDown",(function(){for(var e=arguments.length,o=new Array(e),n=0;n<e;n++)o[n]=arguments[n];return Of(zf,t,Uf).call(t,...o)})),this.addHook("beforeOnCellMouseOver",(function(){for(var e=arguments.length,o=new Array(e),n=0;n<e;n++)o[n]=arguments[n];return Of(zf,t,Gf).call(t,...o)})),this.addHook("afterScrollHorizontally",(()=>Of(zf,this,Xf).call(this))),this.addHook("afterLoadData",(function(){for(var e=arguments.length,o=new Array(e),n=0;n<e;n++)o[n]=arguments[n];return Of(zf,t,qf).call(t,...o)})),this.buildPluginUI(),this.registerEvents(),(0,i.iQ)(this.hot.rootElement,kf),super.enablePlugin())}updatePlugin(){this.disablePlugin(),this.enablePlugin(),this.moveBySettingsOrLoad(),super.updatePlugin()}disablePlugin(){(0,i.vy)(this.hot.rootElement,kf),this.unregisterEvents(),Hf(Lf,this).destroy(),Hf(Df,this).destroy(),super.disablePlugin()}moveRow(t,e){return this.moveRows([t],e)}moveRows(t,e){const o=Hf(Wf,this),n=this.isMovePossible(t,e),i=this.hot.runHooks("beforeRowMove",t,e,o,n);if(If(Wf,this,void 0),!1===i)return;n&&this.hot.rowIndexMapper.moveIndexes(t,e);const r=n&&this.isRowOrderChanged(t,e);return this.hot.runHooks("afterRowMove",t,e,o,n,r),r}dragRow(t,e){return this.dragRows([t],e)}dragRows(t,e){const o=this.countFinalIndex(t,e);return If(Wf,this,e),this.moveRows(t,o)}isMovePossible(t,e){const o=this.hot.rowIndexMapper.getNotTrimmedIndexesLength(),n=t.length+e>o,i=e<0,r=t.some((t=>t<0)),s=t.some((t=>t>=o));return!(n||i||r||s)}isRowOrderChanged(t,e){return t.some(((t,o)=>t-o!==e))}countFinalIndex(t,e){const o=(0,c.mu)(t,((t,o)=>(o<e&&(t+=1),t)),0);return e-o}getRowsHeight(t,e){const o=this.hot.rowIndexMapper;let n=0;for(let i=t;i<=e;i++){const t=o.getRenderableFromVisualIndex(i);null!==t&&(n+=this.hot.view._wt.wtTable.getRowHeight(t)||this.hot.view.getDefaultRowHeight())}return n}moveBySettingsOrLoad(){const t=this.hot.getSettings()[Af];if(Array.isArray(t))this.moveRows(t,0);else if(void 0!==t){const t=this.persistentStateLoad();t.length&&this.moveRows(t,0)}}isFixedRowTop(t){return t<this.hot.getSettings().fixedRowsTop}isFixedRowBottom(t){return t>this.hot.countRows()-1-this.hot.getSettings().fixedRowsBottom}persistentStateSave(){this.hot.runHooks("persistentStateSave","manualRowMove",this.hot.rowIndexMapper.getIndexesSequence())}persistentStateLoad(){const t={};return this.hot.runHooks("persistentStateLoad","manualRowMove",t),t.value?t.value:[]}prepareRowsToMoving(){const t=this.hot.getSelectedRangeLast(),e=[];if(!t)return e;const{from:o,to:n}=t,i=Math.min(o.row,n.row),r=Math.max(o.row,n.row);return(0,ut.Ti)(i,r,(t=>{e.push(t)})),e}refreshPositions(){const t=Hf(Bf,this).coords,e=this.hot.getFirstFullyVisibleRow(),o=this.hot.getLastFullyVisibleRow(),n=this.hot.countRows();this.isFixedRowTop(t.row)&&e>0&&this.hot.scrollViewportTo(this.hot.rowIndexMapper.getNearestNotHiddenIndex(e-1,-1)),this.isFixedRowBottom(t.row)&&o<n&&this.hot.scrollViewportTo(this.hot.rowIndexMapper.getNearestNotHiddenIndex(o+1,1),void 0,!0);const r=this.hot.view._wt.wtTable,s=Hf(Bf,this).TD,l=this.hot.rootElement,a=(0,i.cY)(l),h=(0,i.fX)(l),c=r.holder.scrollTop,d=this.hot.rootWindow!==h?h.scrollTop:0,u=a.top-d,g=Hf(Bf,this).eventPageY-u+c,f=r.hider.offsetHeight,p=r.TBODY.offsetTop,m=Hf(Lf,this).getOffset().top,w=Hf(Lf,this).getSize().height,b=s.offsetHeight/2,v=s.offsetHeight;let y=this.hot.view.THEAD.offsetHeight+this.getRowsHeight(0,t.row-1);const C=g>=y+b;this.isFixedRowTop(t.row)&&(y+=this.hot.view._wt.wtOverlays.topOverlay.getOverlayOffset()),t.row<0?Hf(Bf,this).row=e>0?e-1:e:C?(Hf(Bf,this).row=t.row+1,y+=0===t.row?v-1:v):Hf(Bf,this).row=t.row;let S=g,R=y;g+w+m>=f?S=f-w-m:g+m<p&&(S=p+Math.abs(m)),y>=f-1&&(R=f-1),Hf(Lf,this).setPosition(S),Hf(Df,this).setPosition(R)}registerEvents(){const{documentElement:t}=this.hot.rootDocument;this.eventManager.addEventListener(t,"mousemove",(t=>Of(zf,this,$f).call(this,t))),this.eventManager.addEventListener(t,"mouseup",(()=>Of(zf,this,Yf).call(this)))}unregisterEvents(){this.eventManager.clear()}buildPluginUI(){Hf(Lf,this).build(),Hf(Df,this).build()}destroy(){Hf(Lf,this).destroy(),Hf(Df,this).destroy(),super.destroy()}}function Uf(t,e,o,n){const{wtTable:r,wtViewport:s}=this.hot.view._wt,l=this.hot.selection.isSelectedByRowHeader(),a=this.hot.getSelectedRangeLast();if(!a||!l||Hf(Ff,this)||0!==t.button)return If(Ff,this,!1),Hf(Vf,this).length=0,void(0,i.vy)(this.hot.rootElement,[Nf,_f]);const h=Hf(Df,this).isBuilt()&&!Hf(Df,this).isAppended(),c=Hf(Lf,this).isBuilt()&&!Hf(Lf,this).isAppended();h&&c&&(Hf(Df,this).appendTo(r.hider),Hf(Lf,this).appendTo(r.hider));const{from:d,to:u}=a,g=Math.min(d.row,u.row),f=Math.max(d.row,u.row);if(e.col<0&&e.row>=g&&e.row<=f){n.row=!0,If(Ff,this,!0),Hf(Bf,this).eventPageY=t.pageY,Hf(Bf,this).coords=e,Hf(Bf,this).TD=o,If(Vf,this,this.prepareRowsToMoving());const l=r.holder.scrollLeft+s.getRowHeaderWidth(),a=this.getRowsHeight(g,e.row-1)+(t.clientY-o.getBoundingClientRect().top);Hf(Lf,this).setPosition(null,l),Hf(Lf,this).setSize(r.hider.offsetWidth-l,this.getRowsHeight(g,f)),Hf(Lf,this).setOffset(-a,null),(0,i.iQ)(this.hot.rootElement,Nf),this.refreshPositions()}else(0,i.vy)(this.hot.rootElement,Pf),If(Ff,this,!1),Hf(Vf,this).length=0}function $f(t){Hf(Ff,this)&&(Hf(Bf,this).eventPageY=t.pageY,this.refreshPositions())}function Gf(t,e,o,n){this.hot.getSelectedRangeLast()&&Hf(Ff,this)&&(Hf(Vf,this).indexOf(e.row)>-1?(0,i.vy)(this.hot.rootElement,_f):(0,i.iQ)(this.hot.rootElement,_f),n.row=!0,n.column=!0,n.cell=!0,Hf(Bf,this).coords=e,Hf(Bf,this).TD=o)}function Yf(){const t=Hf(Bf,this).row,e=Hf(Vf,this).length;if(If(Ff,this,!1),(0,i.vy)(this.hot.rootElement,[Nf,_f,Pf]),this.hot.selection.isSelectedByRowHeader()&&(0,i.iQ)(this.hot.rootElement,Pf),e<1||void 0===t)return;const o=Hf(Vf,this)[0],n=this.hot.toPhysicalRow(o),r=this.dragRows(Hf(Vf,this),t);if(Hf(Vf,this).length=0,!0===r){this.persistentStateSave(),this.hot.render(),this.hot.view.adjustElementsSize();const t=this.hot.toVisualRow(n),o=t+e-1;this.hot.selectRows(t,o)}}function Xf(){const t=this.hot.view._wt.wtTable,e=this.hot.view._wt.wtViewport.getRowHeaderWidth()+t.holder.scrollLeft;Hf(Lf,this).setPosition(null,e),Hf(Lf,this).setSize(t.hider.offsetWidth-e)}function qf(){this.moveBySettingsOrLoad()}function Kf(t,e,o){Qf(t,e),e.set(t,o)}function Qf(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Jf(t,e,o){return t.set(tp(t,e),o),o}function Zf(t,e){return t.get(tp(t,e))}function tp(t,e,o){if("function"==typeof t?t===e:t.has(e))return arguments.length<3?e:o;throw new TypeError("Private element is not present on this object")}const ep="manualRowResize",op="manualRowHeights";var np=new WeakMap,ip=new WeakMap,rp=new WeakMap,sp=new WeakMap,lp=new WeakMap,ap=new WeakMap,hp=new WeakMap,cp=new WeakMap,dp=new WeakMap,up=new WeakMap,gp=new WeakMap,fp=new WeakMap,pp=new WeakMap,mp=new WeakMap,wp=new WeakMap,bp=new WeakMap,vp=new WeakSet;class yp extends Kt{static get PLUGIN_KEY(){return ep}static get PLUGIN_PRIORITY(){return 30}constructor(t){var e;super(t),Qf(this,e=vp),e.add(this),Kf(this,np,null),Kf(this,ip,null),Kf(this,rp,[]),Kf(this,sp,null),Kf(this,lp,null),Kf(this,ap,null),Kf(this,hp,null),Kf(this,cp,null),Kf(this,dp,this.hot.rootDocument.createElement("DIV")),Kf(this,up,this.hot.rootDocument.createElement("DIV")),Kf(this,gp,!1),Kf(this,fp,!1),Kf(this,pp,0),Kf(this,mp,null),Kf(this,wp,void 0),Kf(this,bp,void 0),(0,i.iQ)(Zf(dp,this),"manualRowResizer"),(0,i.iQ)(Zf(up,this),"manualRowResizerGuide")}get inlineDir(){return this.hot.isRtl()?"right":"left"}isEnabled(){return this.hot.getSettings()[ep]}enablePlugin(){this.enabled||(Jf(wp,this,new re._),Zf(wp,this).addLocalHook("init",(()=>tp(vp,this,Mp).call(this))),this.hot.rowIndexMapper.registerMap(this.pluginName,Zf(wp,this)),this.addHook("modifyRowHeight",((t,e)=>tp(vp,this,xp).call(this,t,e))),this.bindEvents(),super.enablePlugin())}updatePlugin(){this.disablePlugin(),this.enablePlugin(),super.updatePlugin()}disablePlugin(){Jf(bp,this,Zf(wp,this).getValues()),this.hot.rowIndexMapper.unregisterMap(this.pluginName),super.disablePlugin()}saveManualRowHeights(){this.hot.runHooks("persistentStateSave",op,Zf(wp,this).getValues())}loadManualRowHeights(){const t={};return this.hot.runHooks("persistentStateLoad",op,t),t.value}setManualSize(t,e){const o=this.hot.toPhysicalRow(t),n=Math.max(e,this.hot.view.getDefaultRowHeight());return Zf(wp,this).setValueAtIndex(o,n),n}getLastDesiredRowHeight(){return Zf(sp,this)}setupHandlePosition(t){Jf(np,this,t);const{view:e}=this.hot,{_wt:o}=e,n=o.wtTable.getCoords(Zf(np,this)),r=n.row;if(r<0)return;const s=(0,i.Gq)(Zf(np,this)),l=Zf(np,this).getBoundingClientRect(),a=r<o.getSetting("fixedRowsTop"),h=r>=e.countNotHiddenRowIndexes(0,1)-o.getSetting("fixedRowsBottom");let d;a?d=o.wtOverlays.topInlineStartCornerOverlay.getRelativeCellPosition(Zf(np,this),n.row,n.col):h&&(d=o.wtOverlays.bottomInlineStartCornerOverlay.getRelativeCellPosition(Zf(np,this),n.row,n.col)),d||(d=o.wtOverlays.inlineStartOverlay.getRelativeCellPosition(Zf(np,this),n.row,n.col)),Jf(ip,this,this.hot.rowIndexMapper.getVisualFromRenderableIndex(r)),Jf(rp,this,[]);const u=this.hot.selection.isSelectedByCorner()||this.hot.selection.isSelectedByRowHeader();if(this.hot.selection.isSelected()&&u){const t=this.hot.getSelectedRange();(0,c.z0)(t,(t=>{const e=t.getTopStartCorner().row,o=t.getBottomStartCorner().row;(0,ut.Ti)(e,o,(t=>{Zf(rp,this).includes(t)||Zf(rp,this).push(t)}))}))}Zf(rp,this).includes(Zf(ip,this))||Jf(rp,this,[Zf(ip,this)]),Jf(cp,this,d.top-6),Jf(hp,this,parseInt(l.height,10)),Zf(dp,this).style.top=`${Zf(cp,this)+Zf(hp,this)}px`,Zf(dp,this).style[this.inlineDir]=`${d.start}px`,Zf(dp,this).style.width=`${s}px`,this.hot.rootElement.appendChild(Zf(dp,this))}refreshHandlePosition(){Zf(dp,this).style.top=`${Zf(cp,this)+Zf(sp,this)}px`}setupGuidePosition(){const t=parseInt((0,i.Gq)(Zf(dp,this)),10),e=parseInt(Zf(dp,this).style[this.inlineDir],10)+t,o=this.hot.view.getTableWidth();(0,i.iQ)(Zf(dp,this),"active"),(0,i.iQ)(Zf(up,this),"active"),Zf(up,this).style.top=Zf(dp,this).style.top,Zf(up,this).style[this.inlineDir]=`${e}px`,Zf(up,this).style.width=o-t+"px",this.hot.rootElement.appendChild(Zf(up,this))}refreshGuidePosition(){Zf(up,this).style.top=Zf(dp,this).style.top}hideHandleAndGuide(){(0,i.vy)(Zf(dp,this),"active"),(0,i.vy)(Zf(up,this),"active")}checkIfRowHeader(t){const e=(0,i.kp)(t,["TBODY"],this.hot.rootElement),{inlineStartOverlay:o,topInlineStartCornerOverlay:n,bottomInlineStartCornerOverlay:r}=this.hot.view._wt.wtOverlays;return[o.clone.wtTable.TBODY,n.clone.wtTable.TBODY,r.clone.wtTable.TBODY].includes(e)}getClosestTHParent(t){return"TABLE"!==t.tagName?"TH"===t.tagName?t:this.getClosestTHParent(t.parentNode):null}getActualRowHeight(t){const e=this.hot.view._wt.wtTable.getRowHeight(t);return void 0!==e&&Zf(lp,this)<e?e:Zf(lp,this)}afterMouseDownTimeout(){const t=()=>{this.hot.render(),this.hot.view.adjustElementsSize()},e=(e,o)=>{const n=this.hot.runHooks("beforeRowResize",this.getActualRowHeight(e),e,!0);void 0!==n&&Jf(lp,this,n),this.setManualSize(e,Zf(lp,this)),this.hot.runHooks("afterRowResize",this.getActualRowHeight(e),e,!0),o&&t()};Zf(pp,this)>=2&&(Zf(rp,this).length>1?((0,c.z0)(Zf(rp,this),(t=>{e(t)})),t()):(0,c.z0)(Zf(rp,this),(t=>{e(t,!0)}))),Jf(pp,this,0),Jf(mp,this,null)}bindEvents(){const{rootElement:t,rootWindow:e}=this.hot;this.eventManager.addEventListener(t,"mouseover",(t=>tp(vp,this,Cp).call(this,t))),this.eventManager.addEventListener(t,"mousedown",(t=>tp(vp,this,Sp).call(this,t))),this.eventManager.addEventListener(e,"mousemove",(t=>tp(vp,this,Rp).call(this,t))),this.eventManager.addEventListener(e,"mouseup",(()=>tp(vp,this,Ep).call(this))),this.eventManager.addEventListener(Zf(dp,this),"contextmenu",(()=>tp(vp,this,Tp).call(this)))}destroy(){super.destroy()}}function Cp(t){if(!(0,i.$w)(t.target)&&!0!==Zf(fp,this)&&this.checkIfRowHeader(t.target)){const e=this.getClosestTHParent(t.target);e&&(Zf(gp,this)||this.setupHandlePosition(e))}}function Sp(t){(0,i.nB)(t.target,"manualRowResizer")&&(this.setupHandlePosition(Zf(np,this)),this.setupGuidePosition(),Jf(gp,this,!0),null===Zf(mp,this)&&(Jf(mp,this,setTimeout((()=>this.afterMouseDownTimeout()),500)),this.hot._registerTimeout(Zf(mp,this))),Jf(pp,this,Zf(pp,this)+1),Jf(ap,this,t.pageY),Jf(lp,this,Zf(hp,this)))}function Rp(t){Zf(gp,this)&&(Jf(sp,this,Zf(hp,this)+(t.pageY-Zf(ap,this))),(0,c.z0)(Zf(rp,this),(t=>{Jf(lp,this,this.setManualSize(t,Zf(sp,this)))})),this.refreshHandlePosition(),this.refreshGuidePosition())}function Ep(){const t=()=>{this.hot.render(),this.hot.view.adjustElementsSize()},e=(e,o)=>{this.hot.runHooks("beforeRowResize",this.getActualRowHeight(e),e,!1),o&&t(),this.saveManualRowHeights(),this.hot.runHooks("afterRowResize",this.getActualRowHeight(e),e,!1)};Zf(gp,this)&&(this.hideHandleAndGuide(),Jf(gp,this,!1),Zf(lp,this)!==Zf(hp,this)&&(Zf(rp,this).length>1?((0,c.z0)(Zf(rp,this),(t=>{e(t)})),t()):(0,c.z0)(Zf(rp,this),(t=>{e(t,!0)}))),this.setupHandlePosition(Zf(np,this)))}function Tp(){this.hideHandleAndGuide(),this.hot.rootElement.removeChild(Zf(dp,this)),this.hot.rootElement.removeChild(Zf(up,this)),Jf(gp,this,!1),Jf(fp,this,!0),this.hot._registerImmediate((()=>{Jf(fp,this,!1)}))}function xp(t,e){let o=t;if(this.enabled){const t=this.hot.toPhysicalRow(e),n=Zf(wp,this).getValueAtIndex(t);this.hot.getSettings()[ep]&&n&&(o=n)}return o}function Mp(){const t=this.hot.getSettings()[ep],e=this.loadManualRowHeights();this.hot.batchExecution((()=>{void 0!==e?e.forEach(((t,e)=>{Zf(wp,this).setValueAtIndex(e,t)})):Array.isArray(t)?(t.forEach(((t,e)=>{Zf(wp,this).setValueAtIndex(e,t)})),Jf(bp,this,t)):!0===t&&Array.isArray(Zf(bp,this))&&Zf(bp,this).forEach(((t,e)=>{Zf(wp,this).setValueAtIndex(e,t)}))}),!0)}function Ip(t,e,o){return(e=function(t){var e=function(t){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var o=e.call(t,"string");if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[e]=o,t}function Hp(t,e){return t.get(Ap(t,e))}function Op(t,e,o){return t.set(Ap(t,e),o),o}function Ap(t,e,o){if("function"==typeof t?t===e:t.has(e))return arguments.length<3?e:o;throw new TypeError("Private element is not present on this object")}o(237),o(670);var kp=new WeakMap;const _p=class{constructor(t,e,o,n,i,r){var s,l,a;Ip(this,"row",void 0),Ip(this,"col",void 0),Ip(this,"rowspan",void 0),Ip(this,"colspan",void 0),Ip(this,"removed",!1),Ip(this,"cellCoordsFactory",void 0),Ip(this,"cellRangeFactory",void 0),a=null,function(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}(s=this,l=kp),l.set(s,a),this.row=t,this.col=e,this.rowspan=o,this.colspan=n,this.cellCoordsFactory=i,this.cellRangeFactory=r}static NEGATIVE_VALUES_WARNING(t){let{row:e,col:o,rowspan:n,colspan:i}=t;return nn.O`The merged cell declared with {row: ${e}, col: ${o},\x20
- rowspan: ${n}, colspan: ${i}} contains negative values, which is\x20
- not supported. It will not be added to the collection.`}static IS_OUT_OF_BOUNDS_WARNING(t){let{row:e,col:o}=t;return nn.O`The merged cell declared at [${e}, ${o}] is positioned\x20
- (or positioned partially) outside of the table range. It was not added to the table, please fix your setup.`}static IS_SINGLE_CELL(t){let{row:e,col:o}=t;return nn.O`The merged cell declared at [${e}, ${o}] has both "rowspan"\x20
- and "colspan" declared as "1", which makes it a single cell. It cannot be added to the collection.`}static ZERO_SPAN_WARNING(t){let{row:e,col:o}=t;return nn.O`The merged cell declared at [${e}, ${o}] has "rowspan"\x20
- or "colspan" declared as "0", which is not supported. It cannot be added to the collection.`}static containsNegativeValues(t){let{row:e,col:o,rowspan:n,colspan:i}=t;return e<0||o<0||n<0||i<0}static isSingleCell(t){let{rowspan:e,colspan:o}=t;return 1===o&&1===e}static containsZeroSpan(t){let{rowspan:e,colspan:o}=t;return 0===o||0===e}static isOutOfBounds(t,e,o){return t.row<0||t.col<0||t.row>=e||t.row+t.rowspan-1>=e||t.col>=o||t.col+t.colspan-1>=o}normalize(t){const e=t.countRows(),o=t.countCols();this.row<0?this.row=0:this.row>e-1&&(this.row=e-1),this.col<0?this.col=0:this.col>o-1&&(this.col=o-1),this.row+this.rowspan>e-1&&(this.rowspan=e-this.row),this.col+this.colspan>o-1&&(this.colspan=o-this.col),Op(kp,this,null)}includes(t,e){return this.row<=t&&this.col<=e&&this.row+this.rowspan-1>=t&&this.col+this.colspan-1>=e}includesHorizontally(t){return this.col<=t&&this.col+this.colspan-1>=t}includesVertically(t){return this.row<=t&&this.row+this.rowspan-1>=t}shift(t,e){const o=t[0]||t[1],n=e+Math.abs(t[0]||t[1])-1,i=t[0]?"colspan":"rowspan",r=t[0]?"col":"row",s=Math.min(e,n),l=Math.max(e,n),a=this[r],h=this[r]+this[i]-1;if(a>=e&&(this[r]+=o),o>0)e<=h&&e>a&&(this[i]+=o);else if(o<0){if(s<=a&&l>=h)return this.removed=!0,Op(kp,this,null),!1;if(a>=s&&a<=l){const t=l-a+1,e=Math.abs(o)-t;this[r]-=e+o,this[i]-=t}else if(a<=s&&h>=l)this[i]+=o;else if(a<=s&&h>=s&&h<l){const t=h-s+1;this[i]-=t}}return Op(kp,this,null),!0}isFarther(t,e){return!t||("down"===e?t.row+t.rowspan-1<this.row+this.rowspan-1:"up"===e?t.row>this.row:"right"===e?t.col+t.colspan-1<this.col+this.colspan-1:"left"===e?t.col>this.col:null)}getLastRow(){return this.row+this.rowspan-1}getLastColumn(){return this.col+this.colspan-1}getRange(){return Hp(kp,this)||Op(kp,this,this.cellRangeFactory(this.cellCoordsFactory(this.row,this.col),this.cellCoordsFactory(this.row,this.col),this.cellCoordsFactory(this.getLastRow(),this.getLastColumn()))),Hp(kp,this)}};function Np(t,e,o){return(e=function(t){var e=function(t){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var o=e.call(t,"string");if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[e]=o,t}function Pp(t,e,o){if("function"==typeof t?t===e:t.has(e))return arguments.length<3?e:o;throw new TypeError("Private element is not present on this object")}var Lp=new WeakSet;class Dp{constructor(t){var e,o;(function(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")})(e=this,o=Lp),o.add(e),Np(this,"plugin",void 0),Np(this,"mergedCells",[]),Np(this,"mergedCellsMatrix",new Map),Np(this,"hot",void 0),this.plugin=t,this.hot=t.hot}static IS_OVERLAPPING_WARNING(t){let{row:e,col:o}=t;return nn.O`The merged cell declared at [${e}, ${o}], overlaps\x20
- with the other declared merged cell. The overlapping merged cell was not added to the table, please\x20
- fix your setup.`}get(t,e){var o;return!!this.mergedCellsMatrix.has(t)&&null!==(o=this.mergedCellsMatrix.get(t).get(e))&&void 0!==o&&o}getByRange(t){const{row:e,col:o}=t.getTopStartCorner(),{row:n,col:i}=t.getBottomEndCorner(),r=this.mergedCells.length;let s=!1;for(let t=0;t<r;t++){const r=this.mergedCells[t],{row:l,col:a,rowspan:h,colspan:c}=r;if(l>=e&&l+h-1<=n&&a>=o&&a+c-1<=i){s=r;break}}return s}filterOverlappingMergeCells(t){const e=new Set;return this.mergedCells.forEach((t=>{const{row:o,col:n,colspan:i,rowspan:r}=t;for(let t=o;t<o+r;t++)for(let o=n;o<n+i;o++)e.add(`r${t},c${o}`)})),t.filter((t=>{const{row:o,col:n,colspan:i,rowspan:r}=t,s=new Set;let l=!1;for(let a=o;a<o+r;a++){for(let o=n;o<n+i;o++){const n=`r${a},c${o}`;if(e.has(n)){(0,So.R8)(Dp.IS_OVERLAPPING_WARNING(t)),l=!0;break}s.add(n)}if(l)break}return l||e.add(...s),!l}))}getWithinRange(t){let e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const{row:o,col:n}=t.getTopStartCorner(),{row:i,col:r}=t.getBottomEndCorner(),s=[];for(let t=o;t<=i;t++)for(let o=n;o<=r;o++){const n=this.get(t,o);n&&(e||!e&&n.row===t&&n.col===o)&&s.push(n)}return s}add(t){let e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const o=t.row,n=t.col,i=t.rowspan,r=t.colspan,s=new _p(o,n,i,r,this.hot._createCellCoords,this.hot._createCellRange),l=this.get(o,n),a=!e&&this.isOverlapping(s);return l||a?(a&&(0,So.R8)(Dp.IS_OVERLAPPING_WARNING(s)),!1):(this.hot&&s.normalize(this.hot),this.mergedCells.push(s),Pp(Lp,this,Fp).call(this,s),s)}remove(t,e){const o=this.get(t,e),n=o?this.mergedCells.indexOf(o):-1;return!(!o||-1===n)&&(this.mergedCells.splice(n,1),Pp(Lp,this,Bp).call(this,o),o)}clear(){(0,c.z0)(this.mergedCells,(t=>{let{row:e,col:o,rowspan:n,colspan:i}=t;(0,ut.Ti)(e,e+n,(t=>{(0,ut.Ti)(o,o+i,(e=>{const o=this.hot.getCell(t,e);o&&(o.removeAttribute("rowspan"),o.removeAttribute("colspan"),o.style.display="")}))}))})),this.mergedCells.length=0,this.mergedCellsMatrix=new Map}isOverlapping(t){const e=t.getRange();for(let t=0;t<this.mergedCells.length;t++)if(this.mergedCells[t].getRange().overlaps(e))return!0;return!1}isFirstRenderableMergedCell(t,e){const o=this.get(t,e);if(!o)return!1;const{row:n,col:i,rowspan:r,colspan:s}=o,l=this.hot.view.getActiveOverlayName(),a=["top","top_inline_start_corner"].includes(l)?0:this.hot.getFirstRenderedVisibleRow(),h=["inline_start","top_inline_start_corner","bottom_inline_start_corner"].includes(l)?0:this.hot.getFirstRenderedVisibleColumn(),c=(0,ut.qE)(a,n,n+r-1),d=(0,ut.qE)(h,i,i+s-1);return this.hot.rowIndexMapper.getNearestNotHiddenIndex(c,1)===t&&this.hot.columnIndexMapper.getNearestNotHiddenIndex(d,1)===e}getFirstRenderableCoords(t,e){const o=this.get(t,e);if(!o||this.isFirstRenderableMergedCell(t,e))return this.hot._createCellCoords(t,e);const n=this.hot.rowIndexMapper.getNearestNotHiddenIndex(o.row,1),i=this.hot.columnIndexMapper.getNearestNotHiddenIndex(o.col,1);return this.hot._createCellCoords(n,i)}getStartMostColumnIndex(t,e){const o=Pp(Lp,this,Vp).call(this,t,"col",-1);let n=e;for(let t=0;t<o.length;t++)if(o[t]<=e){n=o[t];break}return n}getEndMostColumnIndex(t,e){const o=Pp(Lp,this,Vp).call(this,t,"col",1);let n=e;for(let t=0;t<o.length;t++)if(o[t]>=e){n=o[t];break}return n}getTopMostRowIndex(t,e){const o=Pp(Lp,this,Vp).call(this,t,"row",-1);let n=e;for(let t=0;t<o.length;t++)if(o[t]<=e){n=o[t];break}return n}getBottomMostRowIndex(t,e){const o=Pp(Lp,this,Vp).call(this,t,"row",1);let n=e;for(let t=0;t<o.length;t++)if(o[t]>=e){n=o[t];break}return n}shiftCollections(t,e,o){const n=[0,0];switch(t){case"right":n[0]+=o;break;case"left":n[0]-=o;break;case"down":n[1]+=o;break;case"up":n[1]-=o}const i=[];this.mergedCells.forEach((t=>{t.shift(n,e),t.removed&&i.push(t)})),i.forEach((t=>{this.mergedCells.splice(this.mergedCells.indexOf(t),1)})),this.mergedCellsMatrix.clear(),this.mergedCells.forEach((t=>{Pp(Lp,this,Fp).call(this,t)}))}}function Vp(t,e){let o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;const n=new Map,i=1===o?t.getTopStartCorner():t.getBottomEndCorner(),r=1===o?t.getBottomEndCorner():t.getTopStartCorner();for(let t=i.row;1===o?t<=r.row:t>=r.row;t+=o)for(let s=i.col;1===o?s<=r.col:s>=r.col;s+=o){const i="row"===e?t:s,r=this.get(t,s);let l=i;r&&(l=1===o?r[e]+r[`${e}span`]-1:r[e]),n.has(i)||n.set(i,new Set),n.get(i).add(l)}return Array.from(new Set(Array.from(n.entries()).filter((t=>{let[,e]=t;return 1===e.size})).flatMap((t=>{let[,e]=t;return Array.from(e)}))))}function Fp(t){for(let e=t.row;e<t.row+t.rowspan;e++)for(let o=t.col;o<t.col+t.colspan;o++)this.mergedCellsMatrix.has(e)||this.mergedCellsMatrix.set(e,new Map),this.mergedCellsMatrix.get(e).set(o,t)}function Bp(t){for(let e=t.row;e<t.row+t.rowspan;e++)for(let o=t.col;o<t.col+t.colspan;o++)this.mergedCellsMatrix.get(e).delete(o)}const Wp=Dp;function zp(t,e,o){return(e=function(t){var e=function(t){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var o=e.call(t,"string");if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[e]=o,t}const jp=class{constructor(t){zp(this,"plugin",void 0),zp(this,"mergedCellsCollection",void 0),zp(this,"currentFillData",null),this.plugin=t,this.mergedCellsCollection=this.plugin.mergedCellsCollection}getDirection(t,e){let o=null;return o=e[0]===t[0]&&e[1]===t[1]&&e[3]===t[3]?"down":e[2]===t[2]&&e[1]===t[1]&&e[3]===t[3]?"up":e[1]===t[1]&&e[2]===t[2]?"right":"left",o}snapDragArea(t,e,o,n){const i=e.slice(0),r=this.getAutofillSize(t,e,o),[s,l,a,h]=t,c=["up","down"].indexOf(o)>-1?a-s+1:h-l+1,d=r-Math.floor(r/c)*c,u=this.getFarthestCollection(t,e,o,n);if(u)if("down"===o){const t=u.row+u.rowspan-s-d;i[2]+t>=this.plugin.hot.countRows()?i[2]-=d:i[2]+=d?t:0}else if("right"===o){const t=u.col+u.colspan-l-d;i[3]+t>=this.plugin.hot.countCols()?i[3]-=d:i[3]+=d?t:0}else if("up"===o){const t=a-d-u.row+1;i[0]+t<0?i[0]+=d:i[0]-=d?t:0}else if("left"===o){const t=h-d-u.col+1;i[1]+t<0?i[1]+=d:i[1]-=d?t:0}return this.updateCurrentFillCache({baseArea:t,dragDirection:o,foundMergedCells:n,fillSize:r,dragArea:i,cycleLength:c}),i}updateCurrentFillCache(t){this.currentFillData||(this.currentFillData={}),(0,s.X$)(this.currentFillData,t)}getAutofillSize(t,e,o){const[n,i,r,s]=t,[l,a,h,c]=e;switch(o){case"up":return n-l;case"down":return h-r;case"left":return i-a;case"right":return c-s;default:return null}}getDragArea(t,e,o){const[n,i,r,s]=t,[l,a,h,c]=e;switch(o){case"up":return[l,a,n-1,s];case"down":{const t=this.mergedCellsCollection.get(h,s);return[r+1,i,h+(t?t.rowspan-1:0),s]}case"left":return[l,a,r,i-1];case"right":{const t=this.mergedCellsCollection.get(h,s);return[n,s+(t?t.colspan-1:0),h,c]}default:return null}}getFarthestCollection(t,e,o,n){const[i,r,s,l]=t,a=["up","down"].indexOf(o)>-1,h=a?s:l,d=a?i:r,u=this.getAutofillSize(t,e,o),g=a?s-i+1:l-r+1,f=u-Math.floor(u/g)*g;let p=null,m=null,w=null;switch(o){case"up":p="includesVertically",w=h-f+1;break;case"left":p="includesHorizontally",w=h-f+1;break;case"down":p="includesVertically",w=d+f-1;break;case"right":p="includesHorizontally",w=d+f-1}return(0,c.z0)(n,(t=>{t[p](w)&&t.isFarther(m,o)&&(m=t)})),m}recreateAfterDataPopulation(t){if(!this.currentFillData)return;const e=this.getRangeFromChanges(t),o=this.currentFillData.foundMergedCells,n=this.currentFillData.dragDirection,i=(t,o)=>{switch(n){case"up":return t.row-o>=e.from.row;case"down":return t.row+t.rowspan-1+o<=e.to.row;case"left":return t.col-o>=e.from.column;case"right":return t.col+t.colspan-1+o<=e.to.column;default:return null}};let r=0,s=null,l=1;do{for(let t=0;t<o.length;t+=1){if(s=o[t],r=l*this.currentFillData.cycleLength,i(s,r))switch(n){case"up":this.plugin.mergedCellsCollection.add({row:s.row-r,rowspan:s.rowspan,col:s.col,colspan:s.colspan},!0);break;case"down":this.plugin.mergedCellsCollection.add({row:s.row+r,rowspan:s.rowspan,col:s.col,colspan:s.colspan},!0);break;case"left":this.plugin.mergedCellsCollection.add({row:s.row,rowspan:s.rowspan,col:s.col-r,colspan:s.colspan},!0);break;case"right":this.plugin.mergedCellsCollection.add({row:s.row,rowspan:s.rowspan,col:s.col+r,colspan:s.colspan},!0)}t===o.length-1&&(l+=1)}}while(i(s,r));this.currentFillData=null,this.plugin.hot.render(),o.length>0&&this.plugin.ifChromeForceRepaint()}getRangeFromChanges(t){const e={min:null,max:null},o={min:null,max:null};return(0,c.z0)(t,(t=>{const n=t[0],i=this.plugin.hot.propToCol(t[1]);(null===e.min||n<e.min)&&(e.min=n),(null===e.max||n>e.max)&&(e.max=n),(null===o.min||i<o.min)&&(o.min=i),(null===o.max||i>o.max)&&(o.max=i)})),{from:{row:e.min,column:o.min},to:{row:e.max,column:o.max}}}dragAreaOverlapsCollections(t,e,o){const n=this.getDragArea(t,e,o),[i,r,s,l]=n,a=this.plugin.hot._createCellCoords(i,r),h=this.plugin.hot._createCellCoords(s,l),c=this.plugin.hot._createCellRange(a,a,h);if(0===this.mergedCellsCollection.getWithinRange(c,!0).length)return!1;const d=this.mergedCellsCollection.getWithinRange(c,!1);return 0===d.length||("up"===o||"down"===o?!d.every((t=>{let{colspan:e}=t;return e===c.getWidth()})):!d.every((t=>{let{rowspan:e}=t;return e===c.getHeight()})))}};function Up(t,e,o){return(e=function(t){var e=function(t){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var o=e.call(t,"string");if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[e]=o,t}const $p=class{constructor(t){Up(this,"plugin",void 0),Up(this,"hot",void 0),Up(this,"fullySelectedMergedCellClassName","fullySelectedMergedCell"),this.plugin=t,this.hot=t.hot}getSelectedMergedCellClassName(t,e,o,n){const i=Math.min(o[0],o[2]),r=Math.min(o[1],o[3]),s=Math.max(o[0],o[2]),l=Math.max(o[1],o[3]);if(void 0===n)return;if(!this.plugin.mergedCellsCollection.isFirstRenderableMergedCell(t,e))return;const a=this.plugin.mergedCellsCollection.get(t,e);if(!a)return;const h=a.getLastRow(),c=a.getLastColumn();return i<=a.row&&r<=a.col&&s>=h&&l>=c?`${this.fullySelectedMergedCellClassName}-${n}`:this.isMergeCellFullySelected(a,this.plugin.hot.getSelectedRange())?`${this.fullySelectedMergedCellClassName}-multiple`:void 0}isMergeCellFullySelected(t,e){const o=[];if(!e||!t)return!1;for(let e=0;e<t.rowspan;e+=1)for(let n=0;n<t.colspan;n+=1)o.push(this.hot._createCellCoords(t.row+e,t.col+n));for(let t=0;t<o.length;t+=1){const n=[];for(let i=0;i<e.length;i+=1)n[i]=e[i].includes(o[t]);if(!n.includes(!0))return!1}return!0}getSelectedMergedCellClassNameToRemove(){const t=[];for(let e=0;e<=7;e+=1)t.push(`${this.fullySelectedMergedCellClassName}-${e}`);return t.push(`${this.fullySelectedMergedCellClassName}-multiple`),t}};function Gp(t,e,o){return(e=function(t){var e=function(t){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var o=e.call(t,"string");if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[e]=o,t}class Yp{constructor(t){Gp(this,"data",void 0),Gp(this,"next",null),Gp(this,"prev",null),this.data=t}}const Xp=class{constructor(){Gp(this,"first",null),Gp(this,"last",null)}push(t){const e=new Yp(t);if(null===this.first)this.first=e,this.last=e;else{const t=this.last;this.last=e,e.prev=t,t.next=e}return e}unshift(t){const e=new Yp(t);if(null===this.first)this.first=e,this.last=e;else{const t=this.first;this.first=e,e.next=t,t.prev=e}}inorder(t){let e=this.first;for(;e;){const o=t(e);if(e===this.last||!0===o)break;e=e.next}}remove(t){if(null===this.first)return!1;let e,o,n=this.first;for(;n;){if(n.data===t)return e=n.next,o=n.prev,e&&(e.prev=o),o&&(o.next=e),n===this.first&&(this.first=e),n===this.last&&(this.last=o),!0;n=n.next}return!1}hasCycle(){let t=this.first,e=this.first;for(;;){if(null===t)return!1;if(t=t.next,null===t)return!1;if(t=t.next,e=e.next,t===e)return!0}}pop(){if(null===this.last)return null;const t=this.last;return this.last=this.last.prev,t}shift(){if(null===this.first)return null;const t=this.first;return this.first=this.first.next,t}recursiveReverse(){if(!this.first)return;!function t(e,o){o&&(t(o,o.next),o.next=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 t,e=this.first.next,o=this.first;for(;e;)t=e.next,e.next=o,o.prev=e,o=e,e=t;this.first.next=null,this.last.prev=null,t=this.first,this.first=o,this.last=t}};function qp(t,e,o){Kp(t,e),e.set(t,o)}function Kp(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Qp(t,e){return t.get(Zp(t,e))}function Jp(t,e,o){return t.set(Zp(t,e),o),o}function Zp(t,e,o){if("function"==typeof t?t===e:t.has(e))return arguments.length<3?e:o;throw new TypeError("Private element is not present on this object")}var tm=new WeakMap,em=new WeakMap,om=new WeakMap,nm=new WeakMap,im=new WeakMap,rm=new WeakMap,sm=new WeakMap,lm=new WeakSet;class am{constructor(t){let{mergedCellsGetter:e,rowIndexMapper:o,columnIndexMapper:n}=t;var i;Kp(this,i=lm),i.add(this),qp(this,tm,new Xp),qp(this,em,new Xp),qp(this,om,null),qp(this,nm,null),qp(this,im,null),qp(this,rm,null),qp(this,sm,null),Jp(im,this,e),Jp(rm,this,o),Jp(sm,this,n)}getCurrentVerticalNode(){return Qp(nm,this).data}getFirstVerticalNode(){return Qp(em,this).first.data}getNextVerticalNode(){return Qp(nm,this).next.data}getPrevVerticalNode(){return Qp(nm,this).prev.data}getCurrentHorizontalNode(){return Qp(om,this).data}getFirstHorizontalNode(){return Qp(tm,this).first.data}getNextHorizontalNode(){return Qp(om,this).next.data}getPrevHorizontalNode(){return Qp(om,this).prev.data}setPrevNodeAsActive(){Jp(nm,this,Qp(nm,this).prev),Jp(om,this,Qp(om,this).prev)}setNextNodeAsActive(){Jp(nm,this,Qp(nm,this).next),Jp(om,this,Qp(om,this).next)}buildFocusOrder(t){const e=t.getTopStartCorner(),o=t.getBottomEndCorner(),n=new WeakSet;Jp(tm,this,new Xp);for(let i=e.row;i<=o.row;i++)if(!Qp(rm,this).isHidden(i))for(let r=e.col;r<=o.col;r++){if(Qp(sm,this).isHidden(r))continue;const e=Zp(lm,this,hm).call(this,t,Qp(tm,this),n,i,r);e&&Jp(om,this,e)}Qp(tm,this).first&&(Qp(tm,this).first.prev=Qp(tm,this).last,Qp(tm,this).last.next=Qp(tm,this).first);const i=new WeakSet;Jp(em,this,new Xp);for(let n=e.col;n<=o.col;n++)if(!Qp(sm,this).isHidden(n))for(let r=e.row;r<=o.row;r++){if(Qp(rm,this).isHidden(r))continue;const e=Zp(lm,this,hm).call(this,t,Qp(em,this),i,r,n);e&&Jp(nm,this,e)}Qp(em,this).first&&(Qp(em,this).first.prev=Qp(em,this).last,Qp(em,this).last.next=Qp(em,this).first)}setActiveNode(t,e){return Qp(tm,this).inorder((o=>{const{rowStart:n,rowEnd:i,colStart:r,colEnd:s}=o.data;if(t>=n&&t<=i&&e>=r&&e<=s)return Jp(om,this,o),!1})),Qp(em,this).inorder((o=>{const{rowStart:n,rowEnd:i,colStart:r,colEnd:s}=o.data;if(t>=n&&t<=i&&e>=r&&e<=s)return Jp(nm,this,o),!1})),this}}function hm(t,e,o,n,i){const r=t.getTopStartCorner(),s=t.getBottomEndCorner(),l=t.highlight.clone().normalize(),a=Qp(im,this).call(this,n,i);if(a&&o.has(a))return null;const h={colStart:i,colEnd:i,rowStart:n,rowEnd:n};if(a){if(o.add(a),a.row<r.row||a.row+a.rowspan-1>s.row||a.col<r.col||a.col+a.colspan-1>s.col)return null;h.colStart=a.col,h.colEnd=a.col+a.colspan-1,h.rowStart=a.row,h.rowEnd=a.row+a.rowspan-1}const c=e.push(h);return n===l.row&&i===l.col||a&&l.row>=a.row&&l.row<=a.row+a.rowspan-1&&l.col>=a.col&&l.col<=a.col+a.colspan-1?c:null}function cm(t,e,o){const{view:n,rowIndexMapper:i}=t,r=n.getStylesHandler(),s=n.getDefaultRowHeight();let l=0;for(let n=e;n<e+o;n++){var a;i.isHidden(n)||(l+=null!==(a=t.getRowHeight(n))&&void 0!==a?a:s,0!==n||r.isClassicTheme()||(l+=1))}return l}function dm(t,e,o){um(t,e),e.set(t,o)}function um(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function gm(t,e,o){return(e=function(t){var e=function(t){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var o=e.call(t,"string");if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[e]=o,t}function fm(t,e,o){return t.set(mm(t,e),o),o}function pm(t,e){return t.get(mm(t,e))}function mm(t,e,o){if("function"==typeof t?t===e:t.has(e))return arguments.length<3?e:o;throw new TypeError("Private element is not present on this object")}Z.R.getSingleton().register("beforeMergeCells"),Z.R.getSingleton().register("afterMergeCells"),Z.R.getSingleton().register("beforeUnmergeCells"),Z.R.getSingleton().register("afterUnmergeCells");const wm="mergeCells",bm=wm;var vm=new WeakMap,ym=new WeakMap,Cm=new WeakMap,Sm=new WeakMap,Rm=new WeakSet;class Em extends Kt{constructor(){var t;super(...arguments),um(this,t=Rm),t.add(this),gm(this,"mergedCellsCollection",null),gm(this,"autofillCalculations",null),gm(this,"selectionCalculations",null),dm(this,vm,null),dm(this,ym,{row:0,col:0}),dm(this,Cm,new am({mergedCellsGetter:(t,e)=>this.mergedCellsCollection.get(t,e),rowIndexMapper:this.hot.rowIndexMapper,columnIndexMapper:this.hot.columnIndexMapper})),dm(this,Sm,function(t){const{hot:e}=t,{rowIndexMapper:o,columnIndexMapper:n}=e,i=new Map;return{before:function(){},after:function(r,l,a){const h=t.mergedCellsCollection.get(l,a);if(!(0,s.Gv)(h))return r.removeAttribute("rowspan"),r.removeAttribute("colspan"),(0,A.nr)()&&i.has(l)&&!e.getSettings().rowHeaders&&(r.style.height=`${i.get(l)}px`,i.delete(l)),void(r.style.display="");const{row:c,col:d,colspan:u,rowspan:g}=h,[f,p]=t.translateMergedCellToRenderable(c,g,d,u),m=t.getSetting("virtualized");if((0,A.nr)()&&0===d&&!e.getSettings().rowHeaders){const t=cm(e,c,g);i.set(l,t/g)}const w=f-o.getRenderableFromVisualIndex(l)+1,b=p-n.getRenderableFromVisualIndex(a)+1;let v=o.getNearestNotHiddenIndex(c,1),y=n.getNearestNotHiddenIndex(d,1);if(m){const t=e.view.getActiveOverlayName();["top","top_inline_start_corner"].includes(t)||(v=Math.max(v,e.getFirstRenderedVisibleRow())),["inline_start","top_inline_start_corner","bottom_inline_start_corner"].includes(t)||(y=Math.max(y,e.getFirstRenderedVisibleColumn()))}const C=Math.min(g,w),S=Math.min(u,b);v===l&&y===a?(r.setAttribute("rowspan",C),r.setAttribute("colspan",S)):(r.removeAttribute("rowspan"),r.removeAttribute("colspan"),r.style.display="none")}}}(this))}static get PLUGIN_KEY(){return wm}static get PLUGIN_PRIORITY(){return 150}static get DEFAULT_SETTINGS(){return{[$t]:"cells",virtualized:!1,cells:[]}}isEnabled(){return!!this.hot.getSettings()[wm]}enablePlugin(){var t=this;this.enabled||(this.mergedCellsCollection=new Wp(this),this.autofillCalculations=new jp(this),this.selectionCalculations=new $p(this),this.addHook("afterInit",(function(){for(var e=arguments.length,o=new Array(e),n=0;n<e;n++)o[n]=arguments[n];return mm(Rm,t,Tm).call(t,...o)})),this.addHook("modifyTransformFocus",(function(){for(var e=arguments.length,o=new Array(e),n=0;n<e;n++)o[n]=arguments[n];return mm(Rm,t,Mm).call(t,...o)})),this.addHook("modifyTransformStart",(function(){for(var e=arguments.length,o=new Array(e),n=0;n<e;n++)o[n]=arguments[n];return mm(Rm,t,Im).call(t,...o)})),this.addHook("modifyTransformEnd",(function(){for(var e=arguments.length,o=new Array(e),n=0;n<e;n++)o[n]=arguments[n];return mm(Rm,t,Hm).call(t,...o)})),this.addHook("beforeSelectionHighlightSet",(function(){for(var e=arguments.length,o=new Array(e),n=0;n<e;n++)o[n]=arguments[n];return mm(Rm,t,Om).call(t,...o)})),this.addHook("beforeSetRangeStart",(function(){for(var e=arguments.length,o=new Array(e),n=0;n<e;n++)o[n]=arguments[n];return mm(Rm,t,_m).call(t,...o)})),this.addHook("beforeSetRangeStartOnly",(function(){for(var e=arguments.length,o=new Array(e),n=0;n<e;n++)o[n]=arguments[n];return mm(Rm,t,_m).call(t,...o)})),this.addHook("beforeSelectionFocusSet",(function(){for(var e=arguments.length,o=new Array(e),n=0;n<e;n++)o[n]=arguments[n];return mm(Rm,t,Nm).call(t,...o)})),this.addHook("afterSelectionFocusSet",(function(){for(var e=arguments.length,o=new Array(e),n=0;n<e;n++)o[n]=arguments[n];return mm(Rm,t,Pm).call(t,...o)})),this.addHook("afterSelectionEnd",(function(){for(var e=arguments.length,o=new Array(e),n=0;n<e;n++)o[n]=arguments[n];return mm(Rm,t,Lm).call(t,...o)})),this.addHook("modifyGetCellCoords",(function(){for(var e=arguments.length,o=new Array(e),n=0;n<e;n++)o[n]=arguments[n];return mm(Rm,t,Am).call(t,...o)})),this.addHook("modifyGetCoordsElement",(function(){for(var e=arguments.length,o=new Array(e),n=0;n<e;n++)o[n]=arguments[n];return mm(Rm,t,Am).call(t,...o)})),this.addHook("afterIsMultipleSelection",(function(){for(var e=arguments.length,o=new Array(e),n=0;n<e;n++)o[n]=arguments[n];return mm(Rm,t,xm).call(t,...o)})),this.addHook("afterRenderer",(function(){return pm(Sm,t).after(...arguments)})),this.addHook("afterContextMenuDefaultOptions",(function(){for(var e=arguments.length,o=new Array(e),n=0;n<e;n++)o[n]=arguments[n];return mm(Rm,t,km).call(t,...o)})),this.addHook("afterGetCellMeta",(function(){for(var e=arguments.length,o=new Array(e),n=0;n<e;n++)o[n]=arguments[n];return mm(Rm,t,Dm).call(t,...o)})),this.addHook("afterViewportRowCalculatorOverride",(function(){for(var e=arguments.length,o=new Array(e),n=0;n<e;n++)o[n]=arguments[n];return mm(Rm,t,Vm).call(t,...o)})),this.addHook("afterViewportColumnCalculatorOverride",(function(){for(var e=arguments.length,o=new Array(e),n=0;n<e;n++)o[n]=arguments[n];return mm(Rm,t,Fm).call(t,...o)})),this.addHook("modifyAutofillRange",(function(){for(var e=arguments.length,o=new Array(e),n=0;n<e;n++)o[n]=arguments[n];return mm(Rm,t,Bm).call(t,...o)})),this.addHook("afterCreateCol",(function(){for(var e=arguments.length,o=new Array(e),n=0;n<e;n++)o[n]=arguments[n];return mm(Rm,t,Wm).call(t,...o)})),this.addHook("afterRemoveCol",(function(){for(var e=arguments.length,o=new Array(e),n=0;n<e;n++)o[n]=arguments[n];return mm(Rm,t,zm).call(t,...o)})),this.addHook("afterCreateRow",(function(){for(var e=arguments.length,o=new Array(e),n=0;n<e;n++)o[n]=arguments[n];return mm(Rm,t,jm).call(t,...o)})),this.addHook("afterRemoveRow",(function(){for(var e=arguments.length,o=new Array(e),n=0;n<e;n++)o[n]=arguments[n];return mm(Rm,t,Um).call(t,...o)})),this.addHook("afterChange",(function(){for(var e=arguments.length,o=new Array(e),n=0;n<e;n++)o[n]=arguments[n];return mm(Rm,t,$m).call(t,...o)})),this.addHook("beforeDrawBorders",(function(){for(var e=arguments.length,o=new Array(e),n=0;n<e;n++)o[n]=arguments[n];return mm(Rm,t,Gm).call(t,...o)})),this.addHook("afterDrawSelection",(function(){for(var e=arguments.length,o=new Array(e),n=0;n<e;n++)o[n]=arguments[n];return mm(Rm,t,Ym).call(t,...o)})),this.addHook("beforeRemoveCellClassNames",(function(){for(var e=arguments.length,o=new Array(e),n=0;n<e;n++)o[n]=arguments[n];return mm(Rm,t,Xm).call(t,...o)})),this.addHook("beforeBeginEditing",(function(){for(var e=arguments.length,o=new Array(e),n=0;n<e;n++)o[n]=arguments[n];return mm(Rm,t,qm).call(t,...o)})),this.addHook("modifyRowHeightByOverlayName",(function(){for(var e=arguments.length,o=new Array(e),n=0;n<e;n++)o[n]=arguments[n];return mm(Rm,t,Km).call(t,...o)})),this.addHook("beforeUndoStackChange",((t,e)=>{if("MergeCells"===e)return!1})),this.registerShortcuts(),super.enablePlugin())}disablePlugin(){this.clearCollections(),this.unregisterShortcuts(),this.hot.render(),super.disablePlugin()}updatePlugin(){this.disablePlugin(),this.enablePlugin(),this.generateFromSettings(),super.updatePlugin()}ifChromeForceRepaint(){if(!(0,A.H8)())return;const t=[];let e=[];this.mergedCellsCollection.mergedCells.forEach((t=>{const{row:o,rowspan:n}=t;for(let t=o+1;t<o+n;t++)e.push(t)})),e=[...new Set(e)],e.forEach((e=>{const o=this.hot.rowIndexMapper.getRenderableFromVisualIndex(e);this.hot.view._wt.wtOverlays.getOverlays(!0).map((t=>"master"===(null==t?void 0:t.name)?t:t.clone.wtTable)).forEach((e=>{const n=e.getRow(o);n&&(n.style.background=(0,i.gd)(n,"backgroundColor").replace(")",", 0.99)"),t.push(n))}))})),this.hot._registerTimeout((()=>{t.forEach((t=>{var e;t.style.background=null===(e=(0,i.gd)(t,"backgroundColor"))||void 0===e?void 0:e.replace(", 0.99)",")")}))}),1)}validateSetting(t){return!(!t||(_p.containsNegativeValues(t)?((0,So.R8)(_p.NEGATIVE_VALUES_WARNING(t)),1):_p.isOutOfBounds(t,this.hot.countRows(),this.hot.countCols())?((0,So.R8)(_p.IS_OUT_OF_BOUNDS_WARNING(t)),1):_p.isSingleCell(t)?((0,So.R8)(_p.IS_SINGLE_CELL(t)),1):_p.containsZeroSpan(t)&&((0,So.R8)(_p.ZERO_SPAN_WARNING(t)),1)))}generateFromSettings(){const t=this.getSetting("cells").filter((t=>this.validateSetting(t))),e=this.mergedCellsCollection.filterOverlappingMergeCells(t),o=[];e.forEach((t=>{const{row:e,col:n,rowspan:i,colspan:r}=t,s=this.hot._createCellCoords(e,n),l=this.hot._createCellCoords(e+i-1,n+r-1),a=this.hot._createCellRange(s,s,l);this.mergeRange(a,!0,!0);for(let t=e;t<e+i;t++)for(let i=n;i<n+r;i++)t===e&&i===n||o.push([t,i,null])})),0!==o.length&&this.hot.setDataAtCell(o,void 0,void 0,this.pluginName)}clearCollections(){this.mergedCellsCollection.clear()}canMergeRange(t){return!!(arguments.length>1&&void 0!==arguments[1]&&arguments[1])||this.validateSetting(t)}mergeSelection(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.hot.getSelectedRangeLast();if(!t)return;t.setDirection(this.hot.isRtl()?"NE-SW":"NW-SE");const{from:e,to:o}=t;this.unmergeRange(t,!0),this.mergeRange(t),this.hot.selectCell(e.row,e.col,o.row,o.col,!1)}unmergeSelection(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.hot.getSelectedRangeLast();if(!t)return;const{from:e,to:o}=t;this.unmergeRange(t,!0),this.hot.selectCell(e.row,e.col,o.row,o.col,!1)}mergeRange(t){let e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],o=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const n=t.getTopStartCorner(),i=t.getBottomEndCorner(),r={row:n.row,col:n.col,rowspan:i.row-n.row+1,colspan:i.col-n.col+1},s=[];let l=null;return!!this.canMergeRange(r,e)&&(this.hot.runHooks("beforeMergeCells",t,e),(0,ut.Ti)(0,r.rowspan-1,(t=>{(0,ut.Ti)(0,r.colspan-1,(e=>{let o=null;s[t]||(s[t]=[]),0===t&&0===e?o=this.hot.getSourceDataAtCell(this.hot.toPhysicalRow(r.row),this.hot.toPhysicalColumn(r.col)):this.hot.setCellMeta(r.row+t,r.col+e,"hidden",!0),s[t][e]=o}))})),this.hot.setCellMeta(r.row,r.col,"spanned",!0),!this.mergedCellsCollection.add(r,e)||(o?l=[r.row,r.col,s]:this.hot.populateFromArray(r.row,r.col,s,void 0,void 0,this.pluginName),e||this.ifChromeForceRepaint(),this.hot.runHooks("afterMergeCells",t,r,e),l))}unmergeRange(t){let e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const o=this.mergedCellsCollection.getWithinRange(t);0!==o.length&&(this.hot.runHooks("beforeUnmergeCells",t,e),(0,c.z0)(o,(t=>{this.mergedCellsCollection.remove(t.row,t.col),(0,ut.Ti)(0,t.rowspan-1,(e=>{(0,ut.Ti)(0,t.colspan-1,(o=>{this.hot.removeCellMeta(t.row+e,t.col+o,"hidden"),this.hot.removeCellMeta(t.row+e,t.col+o,"copyable")}))})),this.hot.removeCellMeta(t.row,t.col,"spanned")})),this.hot.runHooks("afterUnmergeCells",t,e),this.hot.render())}toggleMerge(t){const{from:e,to:o}=t.clone().normalize(),n=this.mergedCellsCollection.get(e.row,e.col);n.row===e.row&&n.col===e.col&&n.row+n.rowspan-1===o.row&&n.col+n.colspan-1===o.col?this.unmergeRange(t):this.mergeSelection(t)}merge(t,e,o,n){const i=this.hot._createCellCoords(t,e),r=this.hot._createCellCoords(o,n);this.mergeRange(this.hot._createCellRange(i,i,r))}unmerge(t,e,o,n){const i=this.hot._createCellCoords(t,e),r=this.hot._createCellCoords(o,n);this.unmergeRange(this.hot._createCellRange(i,i,r))}registerShortcuts(){this.hot.getShortcutManager().getContext("grid").addShortcut({keys:[["Control","m"]],callback:()=>{const t=this.hot.getSelectedRangeLast();t&&!t.isSingleHeader()&&(this.toggleMerge(t),this.hot.render())},runOnlyIf:t=>!t.altKey,group:bm})}unregisterShortcuts(){this.hot.getShortcutManager().getContext("grid").removeShortcutsByGroup(bm)}modifyViewportRowStart(t,e){const o=this.hot.rowIndexMapper,n=o.getVisualFromRenderableIndex(t.startRow);for(let i=0;i<e;i+=1){const r=this.mergedCellsCollection.get(n,i);if((0,s.Gv)(r)){const n=o.getRenderableFromVisualIndex(o.getNearestNotHiddenIndex(r.row,1));if(n<t.startRow)return t.startRow=n,void this.modifyViewportRowStart(t,e)}}}modifyViewportRowEnd(t,e){const o=this.hot.rowIndexMapper,n=o.getVisualFromRenderableIndex(t.endRow);for(let i=0;i<e;i+=1){const r=this.mergedCellsCollection.get(n,i);if((0,s.Gv)(r)){const n=r.row+r.rowspan-1,i=o.getRenderableFromVisualIndex(o.getNearestNotHiddenIndex(n,-1));if(i>t.endRow)return t.endRow=i,void this.modifyViewportRowEnd(t,e)}}}modifyViewportColumnStart(t,e){const o=this.hot.columnIndexMapper,n=o.getVisualFromRenderableIndex(t.startColumn);for(let i=0;i<e;i+=1){const r=this.mergedCellsCollection.get(i,n);if((0,s.Gv)(r)){const n=o.getRenderableFromVisualIndex(o.getNearestNotHiddenIndex(r.col,1));if(n<t.startColumn)return t.startColumn=n,void this.modifyViewportColumnStart(t,e)}}}modifyViewportColumnEnd(t,e){const o=this.hot.columnIndexMapper,n=o.getVisualFromRenderableIndex(t.endColumn);for(let i=0;i<e;i+=1){const r=this.mergedCellsCollection.get(i,n);if((0,s.Gv)(r)){const n=r.col+r.colspan-1,i=o.getRenderableFromVisualIndex(o.getNearestNotHiddenIndex(n,-1));if(i>t.endColumn)return t.endColumn=i,void this.modifyViewportColumnEnd(t,e)}}}translateMergedCellToRenderable(t,e,o,n){const{rowIndexMapper:i,columnIndexMapper:r}=this.hot;let s,l;return s=0===e?i.getNearestNotHiddenIndex(t,1):i.getNearestNotHiddenIndex(t+e-1,-1),l=0===n?r.getNearestNotHiddenIndex(o,1):r.getNearestNotHiddenIndex(o+n-1,-1),[t>=0?i.getRenderableFromVisualIndex(s):t,o>=0?r.getRenderableFromVisualIndex(l):o]}}function Tm(){this.generateFromSettings(),this.hot.render()}function xm(t){if(t){const t=this.mergedCellsCollection.mergedCells,e=this.hot.getSelectedRangeLast(),o=e.getTopStartCorner(),n=e.getBottomEndCorner();for(let e=0;e<t.length;e+=1)if(o.row===t[e].row&&o.col===t[e].col&&n.row===t[e].row+t[e].rowspan-1&&n.col===t[e].col+t[e].colspan-1)return!1}return t}function Mm(t){pm(ym,this).row=t.row,pm(ym,this).col=t.col}function Im(t){const e=this.hot.getSelectedRangeLast(),{highlight:o}=e,{columnIndexMapper:n,rowIndexMapper:i}=this.hot;pm(vm,this)&&(null!==i.getRenderableFromVisualIndex(pm(vm,this).row)&&(o.row=pm(vm,this).row),null!==n.getRenderableFromVisualIndex(pm(vm,this).col)&&(o.col=pm(vm,this).col),fm(vm,this,null));const r=this.mergedCellsCollection.get(o.row,o.col);if(!r)return;const s=r.col,l=r.col+r.colspan-1;if(t.col<0){const e=o.col>=s&&o.col<=l?s-1:l,i=n.getNearestNotHiddenIndex(e,-1);t.col=null===i?-this.hot.view.countRenderableColumnsInRange(0,o.col):-Math.max(this.hot.view.countRenderableColumnsInRange(i,o.col)-1,1)}else if(t.col>0){const e=o.col>=s&&o.col<=l?l+1:s,i=n.getNearestNotHiddenIndex(e,1);t.col=null===i?this.hot.view.countRenderableColumnsInRange(o.col,this.hot.countCols()):Math.max(this.hot.view.countRenderableColumnsInRange(o.col,i)-1,1)}const a=r.row,h=r.row+r.rowspan-1;if(t.row<0){const e=o.row>=a&&o.row<=h?a-1:h,n=i.getNearestNotHiddenIndex(e,-1);t.row=null===n?-this.hot.view.countRenderableRowsInRange(0,o.row):-Math.max(this.hot.view.countRenderableRowsInRange(n,o.row)-1,1)}else if(t.row>0){const e=o.row>=a&&o.row<=h?h+1:a,n=i.getNearestNotHiddenIndex(e,1);t.row=null===n?this.hot.view.countRenderableRowsInRange(o.row,this.hot.countRows()):Math.max(this.hot.view.countRenderableRowsInRange(o.row,n)-1,1)}}function Hm(t){const e=this.hot.getSelectedRangeLast(),o=e.clone(),{to:n}=e,{columnIndexMapper:i,rowIndexMapper:r}=this.hot,s=(t,e)=>{o.expand(this.hot._createCellCoords(t,e));for(let t=0;t<this.mergedCellsCollection.mergedCells.length;t+=1)o.expandByRange(this.mergedCellsCollection.mergedCells[t].getRange())};if(t.col<0){let r=this.mergedCellsCollection.getStartMostColumnIndex(e,n.col)+t.col;s(n.row,r),"E-W"===e.getHorizontalDirection()&&"E-W"===o.getHorizontalDirection()&&(r=o.getTopStartCorner().col);const l=i.getNearestNotHiddenIndex(r,1);null!==l&&(t.col=-Math.max(this.hot.view.countRenderableColumnsInRange(l,n.col)-1,1))}else if(t.col>0){let r=this.mergedCellsCollection.getEndMostColumnIndex(e,n.col)+t.col;s(n.row,r),"W-E"===e.getHorizontalDirection()&&"W-E"===o.getHorizontalDirection()&&(r=o.getBottomEndCorner().col);const l=i.getNearestNotHiddenIndex(r,-1);null!==l&&(t.col=Math.max(this.hot.view.countRenderableColumnsInRange(n.col,l)-1,1))}if(t.row<0){let i=this.mergedCellsCollection.getTopMostRowIndex(e,n.row)+t.row;s(i,n.col),"S-N"===e.getVerticalDirection()&&"S-N"===o.getVerticalDirection()&&(i=o.getTopStartCorner().row);const l=r.getNearestNotHiddenIndex(i,1);null!==l&&(t.row=-Math.max(this.hot.view.countRenderableRowsInRange(l,n.row)-1,1))}else if(t.row>0){let i=this.mergedCellsCollection.getBottomMostRowIndex(e,n.row)+t.row;s(i,n.col),"N-S"===e.getVerticalDirection()&&"N-S"===o.getVerticalDirection()&&(i=o.getBottomStartCorner().row);const l=r.getNearestNotHiddenIndex(i,-1);null!==l&&(t.row=Math.max(this.hot.view.countRenderableRowsInRange(n.row,l)-1,1))}}function Om(){const t=this.hot.getSelectedRangeLast(),{highlight:e}=t;if(this.hot.selection.isSelectedByColumnHeader()||this.hot.selection.isSelectedByRowHeader())return void fm(vm,this,e.clone());for(let e=0;e<this.mergedCellsCollection.mergedCells.length;e+=1)t.expandByRange(this.mergedCellsCollection.mergedCells[e].getRange(),!1);for(let e=0;e<this.mergedCellsCollection.mergedCells.length;e+=1)t.expandByRange(this.mergedCellsCollection.mergedCells[e].getRange(),!1);const o=this.mergedCellsCollection.get(e.row,e.col);fm(vm,this,e.clone()),o&&e.assign(o)}function Am(t,e,o,n){if(t<0||e<0)return;const i=this.mergedCellsCollection.get(t,e);if(!i)return;const{row:r,col:s,colspan:l,rowspan:a}=i,h=r,c=s,d=r+a-1,u=s+l-1;if("render"===n&&this.getSetting("virtualized")){const t=this.hot.view.getActiveOverlayName(),e=["top","top_inline_start_corner"].includes(t)?0:this.hot.getFirstRenderedVisibleRow(),o=["inline_start","top_inline_start_corner","bottom_inline_start_corner"].includes(t)?0:this.hot.getFirstRenderedVisibleColumn();return[(0,ut.qE)(e,h,d),(0,ut.qE)(o,c,u),(0,ut.qE)(this.hot.getLastRenderedVisibleRow(),h,d),(0,ut.qE)(this.hot.getLastRenderedVisibleColumn(),c,u)]}return[h,c,d,u]}function km(t){var e;t.items.push({name:"---------"},(e=this,{key:"mergeCells",name(){const t=this.getSelectedLast();if(t){const o=e.mergedCellsCollection.get(t[0],t[1]);if(o.row===t[0]&&o.col===t[1]&&o.row+o.rowspan-1===t[2]&&o.col+o.colspan-1===t[3])return this.getTranslatedPhrase(tt.CONTEXTMENU_ITEMS_UNMERGE_CELLS)}return this.getTranslatedPhrase(tt.CONTEXTMENU_ITEMS_MERGE_CELLS)},callback(){const t=this.getSelectedRangeLast();if(!t)return;t.setDirection(this.isRtl()?"NE-SW":"NW-SE");const{from:o,to:n}=t;e.toggleMerge(t),this.selectCell(o.row,o.col,n.row,n.col,!1)},disabled(){const t=this.getSelectedLast();return!t||_p.isSingleCell({row:t[0],col:t[1],rowspan:t[2]-t[0]+1,colspan:t[3]-t[1]+1})||this.selection.isSelectedByCorner()},hidden:!1}))}function _m(){fm(vm,this,null)}function Nm(){if(pm(vm,this).isCell())return;const t=this.hot.getSelectedRangeLast(),e=t.getVerticalDirection(),o=t.getHorizontalDirection(),n=pm(vm,this).clone().normalize();pm(Cm,this).setActiveNode(n.row,n.col),pm(ym,this).row>0||pm(ym,this).col>0?pm(Cm,this).setPrevNodeAsActive():("E-W"===o&&pm(ym,this).col<0||"S-N"===e&&pm(ym,this).row<0)&&pm(Cm,this).setNextNodeAsActive()}function Pm(t,e){const o=this.hot.getSelectedRangeLast(),{columnIndexMapper:n,rowIndexMapper:i}=this.hot;let r=null,s=null;if(pm(ym,this).col<0){const{rowEnd:t,colEnd:e}=pm(Cm,this).getPrevHorizontalNode();s=n.getNearestNotHiddenIndex(e,-1),r=i.getNearestNotHiddenIndex(t,-1)}else if(pm(ym,this).col>0){const{rowStart:t,colStart:e}=pm(Cm,this).getNextHorizontalNode();s=n.getNearestNotHiddenIndex(e,1),r=i.getNearestNotHiddenIndex(t,1)}else if(pm(ym,this).row<0){const{rowEnd:t,colEnd:e}=pm(Cm,this).getPrevVerticalNode();s=n.getNearestNotHiddenIndex(e,-1),r=i.getNearestNotHiddenIndex(t,-1)}else if(pm(ym,this).row>0){const{rowStart:t,colStart:e}=pm(Cm,this).getNextVerticalNode();s=n.getNearestNotHiddenIndex(e,1),r=i.getNearestNotHiddenIndex(t,1)}if(null!==r||null!==s){const n=this.hot._createCellCoords(r,s),i=this.mergedCellsCollection.get(n.row,n.col),l=this.hot.selection.highlight.getFocus();t=n.row,e=n.col,i?o.highlight.assign({row:this.hot.rowIndexMapper.getNearestNotHiddenIndex(i.row,1),col:this.hot.columnIndexMapper.getNearestNotHiddenIndex(i.col,1)}):o.highlight.assign(n),l.clear(),l.add(n).commit()}pm(Cm,this).setActiveNode(t,e),fm(ym,this,{row:0,col:0})}function Lm(){this.hot.getSelectedRangeLast().isHeader()||pm(Cm,this).buildFocusOrder(this.hot.getSelectedRangeLast())}function Dm(t,e,o){const n=this.mergedCellsCollection.get(t,e);n&&(n.row!==t||n.col!==e?o.copyable=!1:(o.rowspan=n.rowspan,o.colspan=n.colspan))}function Vm(t){if(this.getSetting("virtualized"))return;const e=this.hot.countCols();this.modifyViewportRowStart(t,e),this.modifyViewportRowEnd(t,e)}function Fm(t){if(this.getSetting("virtualized"))return;const e=this.hot.countRows();this.modifyViewportColumnStart(t,e),this.modifyViewportColumnEnd(t,e)}function Bm(t,e){const o=this.autofillCalculations.getDirection(e,t);if(this.autofillCalculations.dragAreaOverlapsCollections(e,t,o))return e;const n=this.hot._createCellCoords(e[0],e[1]),i=this.hot._createCellCoords(e[2],e[3]),r=this.hot._createCellRange(n,n,i),s=this.mergedCellsCollection.getWithinRange(r);return 0===s.length?t:this.autofillCalculations.snapDragArea(e,t,o,s)}function Wm(t,e){this.mergedCellsCollection.shiftCollections("right",t,e)}function zm(t,e){this.mergedCellsCollection.shiftCollections("left",t,e)}function jm(t,e,o){"auto"!==o&&this.mergedCellsCollection.shiftCollections("down",t,e)}function Um(t,e){this.mergedCellsCollection.shiftCollections("up",t,e)}function $m(t,e){"Autofill.fill"===e&&this.autofillCalculations.recreateAfterDataPopulation(t)}function Gm(t,e){if(e&&"area"===e){const e=this.hot.getSelectedRangeLast(),o=this.mergedCellsCollection.getWithinRange(e);(0,c.z0)(o,(o=>{e.getBottomEndCorner().row===o.getLastRow()&&e.getBottomEndCorner().col===o.getLastColumn()&&(t[2]=o.row,t[3]=o.col)}))}}function Ym(t,e,o,n){if(o)return this.selectionCalculations.getSelectedMergedCellClassName(t,e,o,n)}function Xm(){return this.selectionCalculations.getSelectedMergedCellClassNameToRemove()}function qm(t,e,o,n){if(!(n instanceof MouseEvent))return;const i=this.hot.getSelectedRangeLast(),r=this.mergedCellsCollection.getByRange(i);if(!r)return;const s=this.hot._createCellCoords(r.row,r.col),l=this.hot._createCellCoords(r.row+r.rowspan-1,r.col+r.colspan-1);return 0===this.hot.selection.getLayerLevel()&&i.isEqual(this.hot._createCellRange(s,s,l))}function Km(t,e,o){if(this.hot.getSettings().rowHeaders||"bottom"===o||"bottom_inline_start_corner"===o)return t;let n,i;if("master"===o)n=this.hot.getFirstRenderedVisibleColumn(),i=this.hot.getLastRenderedVisibleColumn();else{const t=this.hot.view.getOverlayByName(o);n=this.hot.columnIndexMapper.getVisualFromRenderableIndex(t.clone.wtTable.getFirstRenderedColumn()),i=this.hot.columnIndexMapper.getVisualFromRenderableIndex(t.clone.wtTable.getLastRenderedColumn())}if(!this.mergedCellsCollection.get(e,n))return t;const r=this.hot._createCellCoords(e,n),s=this.hot._createCellCoords(e,i),l=this.hot._createCellRange(r,r,s),a=this.mergedCellsCollection.getWithinRange(l,!0),h=a.reduce(((t,e)=>{let{rowspan:o}=e;return Math.max(t,o)}),1);let c=0;return a.length>1&&a[0].rowspan<h&&(c=h-a[0].rowspan),a.forEach((n=>{let{rowspan:i}=n,r=0;r="top"===o||"top_inline_start_corner"===o?Math.min(h,this.hot.view.countNotHiddenFixedRowsTop()-e):i-c,t=Math.max(null!=t?t:0,cm(this.hot,e,r))})),t}const Qm="sort";const Jm="multiColumnSorting",Zm=Jm;Qo(Jm,(function(t,e){return function(o,n){const[,...i]=o,[,...r]=n;return function o(n){const s=t[n],l=e[n],a=i[n],h=r[n],c=l.multiColumnSorting,d=(c.compareFunctionFactory?c.compareFunctionFactory:Zo(l.type))(s,l,c)(a,h);if(d===tn){const t=n+1;if(void 0!==e[t])return o(t)}return d}(0)}}));class tw extends En{constructor(){var t,e,o;super(...arguments),t=this,o=Jm,(e=function(t){var e=function(t){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var o=e.call(t,"string");if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:e+""}(e="pluginKey"))in t?Object.defineProperty(t,e,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[e]=o}static get PLUGIN_KEY(){return Jm}static get PLUGIN_PRIORITY(){return 170}isEnabled(){return!!this.hot.getSettings()[this.pluginKey]}enablePlugin(){super.enablePlugin()}disablePlugin(){super.disablePlugin()}registerShortcuts(){super.registerShortcuts(),this.hot.getShortcutManager().getContext("grid").addShortcut({keys:[["Shift","Enter"]],callback:()=>{const{highlight:t}=this.hot.getSelectedRangeLast();return-1===t.row&&t.col>=0&&this.sort(this.getNextSortConfig(t.col,yn)),!1},runOnlyIf:()=>{var t,e;const o=null===(t=this.hot.getSelectedRangeLast())||void 0===t?void 0:t.highlight;return o&&(null===(e=this.hot.getSelectedRangeLast())||void 0===e?void 0:e.isSingle())&&this.hot.selection.isCellVisible(o)&&o.isHeader()},relativeToGroup:l.b,position:"before",group:Zm})}unregisterShortcuts(){super.unregisterShortcuts(),this.hot.getShortcutManager().getContext("grid").removeShortcutsByGroup(Zm)}sort(t){super.sort(t)}clearSort(){super.clearSort()}isSorted(){return super.isSorted()}getSortConfig(t){return super.getSortConfig(t)}setSortConfig(t){super.setSortConfig(t)}getNormalizedSortConfigs(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return Array.isArray(t)?t:[t]}updateHeaderClasses(t){for(var e=arguments.length,o=new Array(e>1?e-1:0),n=1;n<e;n++)o[n-1]=arguments[n];super.updateHeaderClasses(t,...o),(0,i.vy)(t,function(t){const e=t.className.split(" "),o=new RegExp(`^${Qm}-[0-9]{1,2}$`);return e.filter((t=>o.test(t)))}(t)),!1!==this.enabled&&(0,i.iQ)(t,function(t,e,o){const n=[];return!1===o||t.isColumnSorted(e)&&t.getNumberOfSortedColumns()>1&&n.push(`${Qm}-${t.getIndexOfColumnInSortQueue(e)+1}`),n}(...o))}onAfterOnCellMouseDown(t,e){!1!==dn(e.row,e.col,t)&&this.wasClickableHeaderClicked(t,e.col)&&(this.hot.getShortcutManager().isCtrlPressed()?(this.hot.deselectCell(),this.hot.selectColumns(e.col),this.sort(this.getNextSortConfig(e.col,yn))):this.sort(this.getColumnNextConfig(e.col)))}}function ew(t,e,o){return(e=function(t){var e=function(t){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var o=e.call(t,"string");if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[e]=o,t}class ow extends Kt{constructor(){super(...arguments),ew(this,"dragged",[]),ew(this,"lastSetCell",null)}static get PLUGIN_KEY(){return"multipleSelectionHandles"}static get PLUGIN_PRIORITY(){return 160}isEnabled(){return(0,A.rr)()}enablePlugin(){this.enabled||(this.registerListeners(),super.enablePlugin())}registerListeners(){const t=this,{rootElement:e}=this.hot;function o(e){if(1===t.dragged.length)return t.dragged.splice(0,t.dragged.length),!0;const o=t.dragged.indexOf(e);if(-1===o)return!1;0===o?t.dragged=t.dragged.slice(0,1):1===o&&(t.dragged=t.dragged.slice(-1))}this.eventManager.addEventListener(e,"touchstart",(e=>{let o;return(0,i.nB)(e.target,"topSelectionHandle-HitArea")?(o=t.hot.getSelectedRangeLast(),t.dragged.push("top"),t.touchStartRange={width:o.getWidth(),height:o.getHeight(),direction:o.getDirection()},e.preventDefault(),!1):(0,i.nB)(e.target,"bottomSelectionHandle-HitArea")?(o=t.hot.getSelectedRangeLast(),t.dragged.push("bottom"),t.touchStartRange={width:o.getWidth(),height:o.getHeight(),direction:o.getDirection()},e.preventDefault(),!1):void 0})),this.eventManager.addEventListener(e,"touchend",(e=>(0,i.nB)(e.target,"topSelectionHandle-HitArea")?(o.call(t,"top"),t.touchStartRange=void 0,e.preventDefault(),!1):(0,i.nB)(e.target,"bottomSelectionHandle-HitArea")?(o.call(t,"bottom"),t.touchStartRange=void 0,e.preventDefault(),!1):void 0)),this.eventManager.addEventListener(e,"touchmove",(e=>{const{rootDocument:o}=this.hot;let n,i,r,s,l,a;if(0===t.dragged.length)return;const h=o.elementFromPoint(e.touches[0].clientX,e.touches[0].clientY);h&&h!==t.lastSetCell&&("TD"!==h.nodeName&&"TH"!==h.nodeName||(n=t.hot.getCoords(h),-1===n.col&&(n.col=0),i=t.hot.getSelectedRangeLast(),r=i.getWidth(),s=i.getHeight(),l=i.getDirection(),1===r&&1===s&&t.hot.selection.setRangeEnd(n),a=t.getCurrentRangeCoords(i,n,t.touchStartRange.direction,l,t.dragged[0]),null!==a.start&&t.hot.selection.setRangeStart(a.start),t.hot.selection.setRangeEnd(a.end),t.lastSetCell=h),e.preventDefault())}))}getCurrentRangeCoords(t,e,o,n,i){const r=t.getTopStartCorner(),s=t.getBottomEndCorner(),l=t.getBottomStartCorner(),a=t.getTopEndCorner();let h={start:null,end:null};switch(o){case"NE-SW":switch(n){case"NE-SW":case"NW-SE":h="top"===i?{start:this.hot._createCellCoords(e.row,t.highlight.col),end:this.hot._createCellCoords(l.row,e.col)}:{start:this.hot._createCellCoords(t.highlight.row,e.col),end:this.hot._createCellCoords(e.row,r.col)};break;case"SE-NW":"bottom"===i&&(h={start:this.hot._createCellCoords(s.row,e.col),end:this.hot._createCellCoords(e.row,r.col)})}break;case"NW-SE":switch(n){case"NE-SW":"top"===i?h={start:e,end:l}:h.end=e;break;case"NW-SE":"top"===i?h={start:e,end:s}:h.end=e;break;case"SE-NW":"top"===i?h={start:e,end:r}:h.end=e;break;case"SW-NE":"top"===i?h={start:e,end:a}:h.end=e}break;case"SW-NE":switch(n){case"NW-SE":h="bottom"===i?{start:this.hot._createCellCoords(e.row,r.col),end:this.hot._createCellCoords(l.row,e.col)}:{start:this.hot._createCellCoords(r.row,e.col),end:this.hot._createCellCoords(e.row,s.col)};break;case"SW-NE":h="top"===i?{start:this.hot._createCellCoords(t.highlight.row,e.col),end:this.hot._createCellCoords(e.row,s.col)}:{start:this.hot._createCellCoords(e.row,r.col),end:this.hot._createCellCoords(r.row,e.col)};break;case"SE-NW":"bottom"===i?h={start:this.hot._createCellCoords(e.row,a.col),end:this.hot._createCellCoords(r.row,e.col)}:"top"===i&&(h={start:l,end:e})}break;case"SE-NW":switch(n){case"NW-SE":case"NE-SW":case"SW-NE":"top"===i&&(h.end=e);break;case"SE-NW":"top"===i?h.end=e:h={start:e,end:r}}}return h}isDragged(){return this.dragged.length>0}}var nw=o(192);function iw(){let{label:t="",colspan:e=1,origColspan:o=1,collapsible:n=!1,crossHiddenColumns:i=[],isCollapsed:r=!1,isHidden:s=!1,isRoot:l=!1,isPlaceholder:a=!1,headerClassNames:h=[]}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{label:t,colspan:e,origColspan:o,collapsible:n,isCollapsed:r,crossHiddenColumns:i,isHidden:s,isRoot:l,isPlaceholder:a,headerClassNames:h}}function rw(t,e,o){(function(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")})(t,e),e.set(t,o)}function sw(t,e){return t.get(aw(t,e))}function lw(t,e,o){return t.set(aw(t,e),o),o}function aw(t,e,o){if("function"==typeof t?t===e:t.has(e))return arguments.length<3?e:o;throw new TypeError("Private element is not present on this object")}const hw=["label","collapsible"];var cw=new WeakMap,dw=new WeakMap,uw=new WeakMap;class gw{constructor(){rw(this,cw,[]),rw(this,dw,0),rw(this,uw,1/0)}setColumnsLimit(t){lw(uw,this,t)}setData(){lw(cw,this,function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1/0;const o=[];if(0===e)return o;(0,c.z0)(t,(t=>{const n=[];let i=0;o.push(n),(0,c.z0)(t,(t=>{const o=iw();if((0,s.Gv)(t)){const{label:e,colspan:n,headerClassName:i}=t;o.label=(0,d.As)(e),"number"==typeof n&&n>1&&(o.colspan=n,o.origColspan=n),"string"==typeof i&&(o.headerClassNames=[...i.split(" ")])}else o.label=(0,d.As)(t);i+=o.origColspan;let r=!1;if(i>=e&&(o.colspan=o.origColspan-(i-e),o.origColspan=o.colspan,r=!0),n.push(o),o.colspan>1)for(let t=0;t<o.colspan-1;t++)n.push({label:"",isPlaceholder:!0});return!r}))}));const n=Math.max(...(0,c.YD)(o,(t=>t.length)));return(0,c.z0)(o,(t=>{if(t.length<n){const e=(0,c.YD)(new Array(n-t.length),(()=>iw()));t.splice(t.length,0,...e)}})),o}(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],sw(uw,this))),lw(dw,this,sw(cw,this).length)}getData(){return sw(cw,this)}mergeWith(t){(0,c.z0)(t,(t=>{let{row:e,col:o,...n}=t;const i=this.getHeaderSettings(e,o);null!==i&&(0,s.X$)(i,n,hw)}))}map(t){(0,c.z0)(sw(cw,this),(e=>{(0,c.z0)(e,(e=>{const o=t({...e});(0,s.Gv)(o)&&(0,s.X$)(e,o,hw)}))}))}getHeaderSettings(t,e){var o;if(t>=sw(dw,this)||t<0)return null;const n=sw(cw,this)[t];return!1===Array.isArray(n)||e>=n.length?null:null!==(o=n[e])&&void 0!==o?o:null}getHeadersSettings(t,e){let o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;const n=[];if(t>=sw(dw,this)||t<0)return n;const i=sw(cw,this)[t];let r=0;for(let t=e;t<i.length;t++){const e=i[t];if(e.isPlaceholder)throw new Error("The first column settings cannot overlap the other header layers");if(r+=e.colspan,n.push(e),e.colspan>1&&(t+=e.colspan-1),r===o)break;if(r>o)throw new Error("The last column settings cannot overlap the other header layers")}return n}getLayersCount(){return sw(dw,this)}getColumnsCount(){return sw(dw,this)>0?sw(cw,this)[0].length:0}clear(){lw(cw,this,[]),lw(dw,this,0)}}function fw(t,e,o){return(e=function(t){var e=function(t){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var o=e.call(t,"string");if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[e]=o,t}const pw="DF-pre-order",mw=new Map([[pw,function t(e,o){let n=e.call(o,this);for(let i=0;i<this.childs.length;i++){if(!1===n)return!1;n=t.call(this.childs[i],e,o)}return n}],["DF-post-order",function t(e,o){for(let n=0;n<this.childs.length;n++)if(!1===t.call(this.childs[n],e,o))return!1;return e.call(o,this)}],["BF",function(t,e){const o=[this];!function n(){if(0===o.length)return;const i=o.shift();o.push(...i.childs),!1!==t.call(e,i)&&n()}()}]]);class ww{constructor(t){fw(this,"data",{}),fw(this,"parent",null),fw(this,"childs",[]),this.data=t}addChild(t){t.parent=this,this.childs.push(t)}cloneTree(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this;const e=new ww({...t.data});for(let o=0;o<t.childs.length;o++)e.addChild(this.cloneTree(t.childs[o]));return e}replaceTreeWith(t){this.data={...t.data},this.childs=[];for(let e=0;e<t.childs.length;e++)this.addChild(t.childs[e])}walkDown(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"BF";if(!mw.has(e))throw new Error(`Traversal strategy "${e}" does not exist`);mw.get(e).call(this,t,this)}walkUp(t){const e=this,o=n=>{!1!==t.call(e,n)&&null!==n.parent&&o(n.parent)};o(this)}}function bw(t,e,o){(function(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")})(t,e),e.set(t,o)}function vw(t,e){return t.get(yw(t,e))}function yw(t,e,o){if("function"==typeof t?t===e:t.has(e))return arguments.length<3?e:o;throw new TypeError("Private element is not present on this object")}var Cw=new WeakMap,Sw=new WeakMap,Rw=new WeakMap;class Ew{constructor(t){var e,o;bw(this,Cw,new Map),bw(this,Sw,new Map),bw(this,Rw,null),o=t,(e=Rw).set(yw(e,this),o)}getRoots(){return Array.from(vw(Cw,this).values())}getRootByColumn(t){let e;return vw(Sw,this).has(t)&&(e=vw(Cw,this).get(vw(Sw,this).get(t))),e}getNode(t,e){const o=this.getRootByColumn(e);if(!o)return;const n=e-vw(Sw,this).get(e);let i,r=0;return o.walkDown((o=>{const{data:{origColspan:s,headerLevel:l}}=o;if(t===l){if(n>=r&&n<=r+s-1)return i=o,i.data.isRoot=e===i.data.columnIndex,!1;r+=s}})),i}rebuildTreeIndex(){let t=0;vw(Sw,this).clear(),(0,c.z0)(vw(Cw,this),(e=>{let[,{data:{colspan:o}}]=e;for(let e=t;e<t+o;e++)vw(Sw,this).set(e,t);t+=o}))}buildTree(){this.clear();const t=vw(Rw,this).getColumnsCount();let e=0;for(;e<t;){const t=vw(Rw,this).getHeaderSettings(0,e),o=new ww;vw(Cw,this).set(e,o),this.buildLeaves(o,e,0,t.origColspan),e+=t.origColspan}this.rebuildTreeIndex()}buildLeaves(t,e,o){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1;const i=vw(Rw,this).getHeadersSettings(o,e,n);o+=1,(0,c.z0)(i,(n=>{const i={...n,headerLevel:o-1,columnIndex:e};let r;1===o?(t.data=i,r=t):(r=new ww(i),t.addChild(r)),o<vw(Rw,this).getLayersCount()&&this.buildLeaves(r,e,o,n.origColspan),e+=n.origColspan}))}clear(){vw(Cw,this).clear(),vw(Sw,this).clear()}}function Tw(t,e){t.walkDown((t=>{let{data:o,childs:n}=t;if(!o.isHidden&&(e(o.columnIndex),0===n.length))for(let t=1;t<o.colspan;t++)e(o.columnIndex+t)}))}function xw(t,e){let{childs:o}=t;if(0!==o.length)return o[0].data[e]}function Mw(t){return xw(t,"origColspan")===t.data.origColspan}function Iw(t){const{data:e,childs:o}=t;if(!e.isCollapsed||e.isHidden||e.origColspan<=1)return{rollbackModification:()=>{},affectedColumns:[],colspanCompensation:0};if(Mw(t))return Iw(o[0]);e.isCollapsed=!1;const n=o.slice(1),i=new Set;let r=0;if(n.length>0)(0,c.z0)(n,(t=>{t.replaceTreeWith(t.data.clonedTree),t.data.clonedTree=null;const e=t.data;r+=e.colspan,Tw(t,(t=>{i.add(t)}))}));else{const{colspan:t,origColspan:o,columnIndex:n}=e;r=o-t;for(let t=1;t<o;t++)i.add(n+t)}return t.walkUp((t=>{const{data:e}=t;e.colspan+=r,e.colspan>=e.origColspan?(e.colspan=e.origColspan,e.isCollapsed=!1):Mw(t)&&(e.isCollapsed=xw(t,"isCollapsed"))})),{rollbackModification:()=>Hw(t),affectedColumns:Array.from(i),colspanCompensation:r}}function Hw(t){var e;const{data:o,childs:n}=t;if(o.isCollapsed||o.isHidden||o.origColspan<=1)return{rollbackModification:()=>{},affectedColumns:[],colspanCompensation:0};if(Mw(t))return Hw(n[0]);o.isCollapsed=!0;const i=n.slice(1),r=new Set;if(i.length>0)(0,c.z0)(i,(t=>{Tw(t,(t=>{r.add(t)})),t.data.clonedTree=t.cloneTree(),t.walkDown((t=>{let{data:e}=t;e.isHidden=!0}))}));else{const{origColspan:t,columnIndex:e}=o;for(let o=1;o<t;o++){const t=e+o;r.add(t)}}const s=o.colspan-(null!==(e=xw(t,"colspan"))&&void 0!==e?e:1);return t.walkUp((t=>{const{data:e}=t;e.colspan-=s,e.colspan<=1?(e.colspan=1,e.isCollapsed=!0):Mw(t)&&(e.isCollapsed=xw(t,"isCollapsed"))})),{rollbackModification:()=>Iw(t),affectedColumns:Array.from(r),colspanCompensation:s}}const Ow=new Map([["collapse",Hw],["expand",Iw],["hide-column",function(t,e){if(!Number.isInteger(e))throw new Error("The passed gridColumnIndex argument has invalid type.");if(t.childs.length>0)throw new Error(nn.O`The passed node is not the last node on the tree. Only for\x20
- the last node, the hide column modification can be applied.`);const{crossHiddenColumns:o}=t.data;if(o.includes(e))return;let n=!1;t.walkUp((t=>{const{data:{collapsible:e}}=t;if(e)return n=!0,!1})),n||t.walkUp((t=>{const{data:o}=t;o.crossHiddenColumns.push(e),o.colspan>1?o.colspan-=1:o.isHidden=!0}))}],["show-column",function(t,e){if(!Number.isInteger(e))throw new Error("The passed gridColumnIndex argument has invalid type.");if(t.childs.length>0)throw new Error(nn.O`The passed node is not the last node on the tree. Only for\x20
- the last node, the show column modification can be applied.`);const{crossHiddenColumns:o}=t.data;if(!o.includes(e))return;let n=!1;t.walkUp((t=>{const{data:{collapsible:e}}=t;if(e)return n=!0,!1})),n||t.walkUp((t=>{const{data:o}=t;o.crossHiddenColumns.splice(o.crossHiddenColumns.indexOf(e),1),!o.isHidden&&o.colspan<o.origColspan&&(o.colspan+=1),o.isHidden=!1}))}]]);function Aw(t){const e=[];return(0,c.z0)(t,(t=>{t.walkDown((t=>{const o=t.data,{origColspan:n,columnIndex:i,headerLevel:r,crossHiddenColumns:s}=o,l=function(t,e){let o;return Array.isArray(t[e])?o=t[e]:(o=[],t[e]=o),o}(e,r);let a=!1;for(let t=i;t<i+n;t++)if(s.includes(t)||a)l.push({label:"",isPlaceholder:!0});else{const t=kw(o);t.isRoot=!0,l.push(t),a=!0}}))})),e}function kw(t){const{crossHiddenColumns:e,...o}=iw(t);return o}function _w(t,e,o){(function(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")})(t,e),e.set(t,o)}function Nw(t,e,o){return t.set(Lw(t,e),o),o}function Pw(t,e){return t.get(Lw(t,e))}function Lw(t,e,o){if("function"==typeof t?t===e:t.has(e))return arguments.length<3?e:o;throw new TypeError("Private element is not present on this object")}var Dw=new WeakMap,Vw=new WeakMap,Fw=new WeakMap;class Bw{constructor(){_w(this,Dw,new gw),_w(this,Vw,new Ew(Pw(Dw,this))),_w(this,Fw,[[]])}setState(t){Pw(Dw,this).setData(t);let e=!1;try{Pw(Vw,this).buildTree()}catch(t){Pw(Vw,this).clear(),Pw(Dw,this).clear(),e=!0}return Nw(Fw,this,Aw(Pw(Vw,this).getRoots())),e}setColumnsLimit(t){Pw(Dw,this).setColumnsLimit(t)}mergeStateWith(t){const e=(0,c.YD)(t,(t=>{let{row:e,...o}=t;return{row:e<0?this.rowCoordsToLevel(e):e,...o}}));Pw(Dw,this).mergeWith(e),Pw(Vw,this).buildTree(),Nw(Fw,this,Aw(Pw(Vw,this).getRoots()))}mapState(t){Pw(Dw,this).map(t),Pw(Vw,this).buildTree(),Nw(Fw,this,Aw(Pw(Vw,this).getRoots()))}mapNodes(t){return(0,c.mu)(Pw(Vw,this).getRoots(),((e,o)=>(o.walkDown((o=>{const n=t(o.data);void 0!==n&&e.push(n)})),e)),[])}triggerNodeModification(t,e,o){e<0&&(e=this.rowCoordsToLevel(e));const n=Pw(Vw,this).getNode(e,o);let i;return n&&(i=function(t,e,o){if(!Ow.has(t))throw new Error(`The node modifier action ("${t}") does not exist.`);return Ow.get(t)(e,o)}(t,n,o),Nw(Fw,this,Aw(Pw(Vw,this).getRoots()))),i}triggerColumnModification(t,e){return this.triggerNodeModification(t,-1,e)}rowCoordsToLevel(t){if(t>=0)return null;const e=t+Math.max(this.getLayersCount(),1);return e<0?null:e}levelToRowCoords(t){if(t<0)return null;const e=t-Math.max(this.getLayersCount(),1);return e>=0?null:e}getHeaderSettings(t,e){var o,n;return t<0&&(t=this.rowCoordsToLevel(t)),null===t||t>=this.getLayersCount()?null:null!==(o=null===(n=Pw(Fw,this)[t])||void 0===n?void 0:n[e])&&void 0!==o?o:null}getHeaderTreeNodeData(t,e){const o=this.getHeaderTreeNode(t,e);return o?{...o.data}:null}getHeaderTreeNode(t,e){if(t<0&&(t=this.rowCoordsToLevel(t)),null===t||t>=this.getLayersCount())return null;return Pw(Vw,this).getNode(t,e)||null}findTopMostEntireHeaderLevel(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t;const o=e-t+1;let n=!1,i=null;for(let r=t;r<=e;r++){const s=Pw(Vw,this).getRootByColumn(r);if(!s)break;n=!0,s.walkDown((n=>{const{columnIndex:r,headerLevel:s,origColspan:l,isHidden:a}=n.data;a||l<=o&&r>=t&&r+l-1<=e&&(null===i||s<i)&&(i=s)}),pw)}return n&&null===i?-1:this.levelToRowCoords(null!=i?i:0)}findLeftMostColumnIndex(t,e){var o;const{isRoot:n}=null!==(o=this.getHeaderSettings(t,e))&&void 0!==o?o:{isRoot:!0};if(n)return e;let i=e-1;for(;i>=0;){var r;const{isRoot:e}=null!==(r=this.getHeaderSettings(t,i))&&void 0!==r?r:{isRoot:!0};if(e)break;i-=1}return i}findRightMostColumnIndex(t,e){var o;const{isRoot:n,origColspan:i}=null!==(o=this.getHeaderSettings(t,e))&&void 0!==o?o:{isRoot:!0,origColspan:1};if(n)return e+i-1;let r=e+1;for(;r<this.getColumnsCount();){var s;const{isRoot:e}=null!==(s=this.getHeaderSettings(t,r))&&void 0!==s?s:{isRoot:!0};if(e)break;r+=1}return r-1}getLayersCount(){return Pw(Dw,this).getLayersCount()}getColumnsCount(){return Pw(Dw,this).getColumnsCount()}clear(){Nw(Fw,this,[]),Pw(Dw,this).clear(),Pw(Vw,this).clear()}}function Ww(t,e,o){return(e=function(t){var e=function(t){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var o=e.call(t,"string");if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[e]=o,t}const zw=class{constructor(t,e){Ww(this,"hot",void 0),Ww(this,"nestedHeaderSettingsGetter",void 0),Ww(this,"layersCount",0),Ww(this,"container",void 0),Ww(this,"widthsMap",void 0),this.hot=t,this.nestedHeaderSettingsGetter=e,this.widthsMap=this.hot.columnIndexMapper.createAndRegisterIndexMap("nestedHeaders.widthsMap","physicalIndexToValue")}setLayersCount(t){return this.layersCount=t,this}getWidth(t){return this.widthsMap.getValueAtIndex(this.hot.toPhysicalColumn(t))}buildWidthsMap(){const t=this.hot.getCurrentThemeName();this.container=this.hot.rootDocument.createElement("div"),this.container.classList.add("handsontable","htGhostTable","htAutoSize"),t&&this.container.classList.add(t),this._buildGhostTable(this.container),this.hot.rootDocument.body.appendChild(this.container);const e=this.container.querySelectorAll("tr:last-of-type th"),o=e.length;this.widthsMap.clear();for(let t=0;t<o;t++){const o=this.hot.columnIndexMapper.getVisualFromRenderableIndex(t),n=this.hot.toPhysicalColumn(o);this.widthsMap.setValueAtIndex(n,e[t].offsetWidth)}this.container.parentNode.removeChild(this.container),this.container=null}_buildGhostTable(t){const{rootDocument:e,columnIndexMapper:o}=this.hot,n=e.createDocumentFragment(),r=e.createElement("table"),s=!!this.hot.getSettings().dropdownMenu,l=o.getRenderableIndexesLength();for(let t=0;t<this.layersCount;t++){const n=e.createElement("tr");for(let r=0;r<l;r++){let l=o.getVisualFromRenderableIndex(r);null===l&&(l=r);const a=e.createElement("th"),h=this.nestedHeaderSettingsGetter(t,l);if(h&&(!h.isPlaceholder||h.isHidden)){let t=h.label;s&&(t+='<button class="changeType"></button>'),(0,i.Mv)(a,t),a.colSpan=h.colspan,n.appendChild(a)}}r.appendChild(n)}n.appendChild(r),t.appendChild(n)}clear(){this.widthsMap.clear(),this.container=null}};function jw(t,e,o){return(e=function(t){var e=function(t){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var o=e.call(t,"string");if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[e]=o,t}function Uw(t,e,o){$w(t,e),e.set(t,o)}function $w(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Gw(t,e,o){return t.set(Xw(t,e),o),o}function Yw(t,e){return t.get(Xw(t,e))}function Xw(t,e,o){if("function"==typeof t?t===e:t.has(e))return arguments.length<3?e:o;throw new TypeError("Private element is not present on this object")}const qw="nestedHeaders";var Kw=new WeakMap,Qw=new WeakMap,Jw=new WeakMap,Zw=new WeakMap,tb=new WeakMap,eb=new WeakSet;class ob extends Kt{constructor(){var t;super(...arguments),$w(this,t=eb),t.add(this),Uw(this,Kw,new Bw),Uw(this,Qw,null),Uw(this,Jw,null),Uw(this,Zw,!1),Uw(this,tb,null),jw(this,"ghostTable",new zw(this.hot,((t,e)=>this.getHeaderSettings(t,e)))),jw(this,"detectedOverlappedHeaders",!1)}static get PLUGIN_KEY(){return qw}static get PLUGIN_PRIORITY(){return 280}isEnabled(){return!!this.hot.getSettings()[qw]}enablePlugin(){var t=this;if(this.enabled)return;const{nestedHeaders:e}=this.hot.getSettings();Array.isArray(e)&&Array.isArray(e[0])||(0,So.R8)(nn.O`Your Nested Headers plugin configuration is invalid. The settings has to be\x20
- passed as an array of arrays e.q. [['A1', { label: 'A2', colspan: 2 }]]`),this.addHook("init",(()=>Xw(eb,this,vb).call(this))),this.addHook("afterLoadData",(function(){for(var e=arguments.length,o=new Array(e),n=0;n<e;n++)o[n]=arguments[n];return Xw(eb,t,yb).call(t,...o)})),this.addHook("beforeOnCellMouseDown",(function(){for(var e=arguments.length,o=new Array(e),n=0;n<e;n++)o[n]=arguments[n];return Xw(eb,t,lb).call(t,...o)})),this.addHook("afterOnCellMouseDown",(function(){for(var e=arguments.length,o=new Array(e),n=0;n<e;n++)o[n]=arguments[n];return Xw(eb,t,ab).call(t,...o)})),this.addHook("beforeOnCellMouseOver",(function(){for(var e=arguments.length,o=new Array(e),n=0;n<e;n++)o[n]=arguments[n];return Xw(eb,t,hb).call(t,...o)})),this.addHook("beforeOnCellMouseUp",(function(){for(var e=arguments.length,o=new Array(e),n=0;n<e;n++)o[n]=arguments[n];return Xw(eb,t,cb).call(t,...o)})),this.addHook("beforeSelectionHighlightSet",(function(){for(var e=arguments.length,o=new Array(e),n=0;n<e;n++)o[n]=arguments[n];return Xw(eb,t,db).call(t,...o)})),this.addHook("modifyTransformStart",(function(){for(var e=arguments.length,o=new Array(e),n=0;n<e;n++)o[n]=arguments[n];return Xw(eb,t,ub).call(t,...o)})),this.addHook("afterSelection",(()=>Xw(eb,this,nb).call(this))),this.addHook("afterSelectionFocusSet",(()=>Xw(eb,this,nb).call(this))),this.addHook("beforeViewportScrollHorizontally",(function(){for(var e=arguments.length,o=new Array(e),n=0;n<e;n++)o[n]=arguments[n];return Xw(eb,t,ib).call(t,...o)})),this.addHook("afterGetColumnHeaderRenderers",(t=>Xw(eb,this,fb).call(this,t))),this.addHook("modifyColWidth",(function(){for(var e=arguments.length,o=new Array(e),n=0;n<e;n++)o[n]=arguments[n];return Xw(eb,t,mb).call(t,...o)})),this.addHook("modifyColumnHeaderValue",(function(){for(var e=arguments.length,o=new Array(e),n=0;n<e;n++)o[n]=arguments[n];return Xw(eb,t,wb).call(t,...o)})),this.addHook("beforeHighlightingColumnHeader",(function(){for(var e=arguments.length,o=new Array(e),n=0;n<e;n++)o[n]=arguments[n];return Xw(eb,t,rb).call(t,...o)})),this.addHook("beforeCopy",(function(){for(var e=arguments.length,o=new Array(e),n=0;n<e;n++)o[n]=arguments[n];return Xw(eb,t,sb).call(t,...o)})),this.addHook("beforeSelectColumns",(function(){for(var e=arguments.length,o=new Array(e),n=0;n<e;n++)o[n]=arguments[n];return Xw(eb,t,gb).call(t,...o)})),this.addHook("afterViewportColumnCalculatorOverride",(function(){for(var e=arguments.length,o=new Array(e),n=0;n<e;n++)o[n]=arguments[n];return Xw(eb,t,pb).call(t,...o)})),this.addHook("modifyFocusedElement",(function(){for(var e=arguments.length,o=new Array(e),n=0;n<e;n++)o[n]=arguments[n];return Xw(eb,t,bb).call(t,...o)})),this.hot.columnIndexMapper.addLocalHook("cacheUpdated",(()=>Xw(eb,this,nb).call(this))),this.hot.rowIndexMapper.addLocalHook("cacheUpdated",(()=>Xw(eb,this,nb).call(this))),super.enablePlugin(),this.updatePlugin()}updatePlugin(){if(!this.hot.view)return;const{nestedHeaders:t}=this.hot.getSettings();Yw(Kw,this).setColumnsLimit(this.hot.countCols()),Array.isArray(t)&&(this.detectedOverlappedHeaders=Yw(Kw,this).setState(t)),this.detectedOverlappedHeaders&&(0,So.R8)(nn.O`Your Nested Headers plugin setup contains overlapping headers. This kind of configuration\x20
- is currently not supported.`),this.enabled&&this.hot.columnIndexMapper.hidingMapsCollection.getMergedValues().forEach(((t,e)=>{const o=!0===t?"hide-column":"show-column";Yw(Kw,this).triggerColumnModification(o,e)})),!Yw(Qw,this)&&this.enabled&&Gw(Qw,this,this.hot.columnIndexMapper.createChangesObserver("hiding").subscribe((t=>{t.forEach((t=>{let{op:e,index:o,newValue:n}=t;if("replace"===e){const t=!0===n?"hide-column":"show-column";Yw(Kw,this).triggerColumnModification(t,o)}})),this.ghostTable.buildWidthsMap()}))),this.ghostTable.setLayersCount(this.getLayersCount()).buildWidthsMap(),super.updatePlugin()}disablePlugin(){this.clearColspans(),Yw(Kw,this).clear(),Yw(Qw,this).unsubscribe(),Gw(Qw,this,null),this.ghostTable.clear(),super.disablePlugin()}getStateManager(){return Yw(Kw,this)}getLayersCount(){return Yw(Kw,this).getLayersCount()}getHeaderSettings(t,e){return Yw(Kw,this).getHeaderSettings(t,e)}clearColspans(){if(!this.hot.view)return;const{_wt:t}=this.hot.view,e=t.getSetting("columnHeaders").length,o=t.wtTable.THEAD,n=t.wtOverlays.topOverlay.clone.wtTable.THEAD,r=t.wtOverlays.topInlineStartCornerOverlay?t.wtOverlays.topInlineStartCornerOverlay.clone.wtTable.THEAD:null;for(let t=0;t<e;t++){const e=o.childNodes[t];if(!e)break;const s=n.childNodes[t],l=r?r.childNodes[t]:null;for(let t=0,o=e.childNodes.length;t<o;t++)e.childNodes[t].removeAttribute("colspan"),(0,i.vy)(e.childNodes[t],"hiddenHeader"),s&&s.childNodes[t]&&(s.childNodes[t].removeAttribute("colspan"),(0,i.vy)(s.childNodes[t],"hiddenHeader")),r&&l&&l.childNodes[t]&&(l.childNodes[t].removeAttribute("colspan"),(0,i.vy)(l.childNodes[t],"hiddenHeader"))}}headerRendererFactory(t){var e=this;const o=this.hot.view._wt.getSetting("fixedColumnsStart");return(n,r)=>{var s;const{columnIndexMapper:l,view:a}=this.hot;let h=l.getVisualFromRenderableIndex(n);null===h&&(h=n),r.removeAttribute("colspan"),(0,i.vy)(r,"hiddenHeader"),(0,i.vy)(r,"hiddenHeaderText");const{colspan:c,isHidden:d,isPlaceholder:u,headerClassNames:g}=null!==(s=Yw(Kw,this).getHeaderSettings(t,h))&&void 0!==s?s:{label:""};if(u||d)(0,i.iQ)(r,"hiddenHeader");else if(c>1){var f,p,m;const{wtOverlays:t}=a._wt,e=null===(f=t.topInlineStartCornerOverlay)||void 0===f?void 0:f.clone.wtTable.THEAD.contains(r),s=null===(p=t.inlineStartOverlay)||void 0===p?void 0:p.clone.wtTable.THEAD.contains(r);(null===(m=t.topOverlay)||void 0===m?void 0:m.clone.wtTable.THEAD.contains(r))&&h<o&&(0,i.iQ)(r,"hiddenHeaderText");const l=e||s?Math.min(c,o-n):c;l>1&&r.setAttribute("colspan",l)}if(this.hot.view.appendColHeader(h,r,(function(){return e.getColumnHeaderValue(...arguments)}),t),!u&&!d){const t=r.querySelector("div.relative");t&&g&&g.length>0&&((0,i.vy)(t,this.hot.getColumnMeta(h).headerClassName),(0,i.iQ)(t,g))}}}getColumnHeaderValue(t,e){var o;const{isHidden:n,isPlaceholder:i}=null!==(o=Yw(Kw,this).getHeaderSettings(e,t))&&void 0!==o?o:{};return i||n?"":this.hot.getColHeader(t,e)}destroy(){Gw(Kw,this,null),null!==Yw(Qw,this)&&(Yw(Qw,this).unsubscribe(),Gw(Qw,this,null)),super.destroy()}_getHeaderTreeNodeDataByCoords(t){if(!(t.row>=0||t.col<0))return Yw(Kw,this).getHeaderTreeNodeData(t.row,t.col)}}function nb(){var t;const e=null===(t=this.hot)||void 0===t?void 0:t.getSelectedRangeLast();if(!e)return;const{highlight:o}=e;if(o.isHeader()&&o.col>=0){const t=Yw(Kw,this).findLeftMostColumnIndex(o.row,o.col),e=this.hot.selection.highlight.getFocus();e.visualCellRange.highlight.col=t,e.visualCellRange.from.col=t,e.visualCellRange.to.col=t,e.commit()}}function ib(t,e){var o;const n=this.hot.getSelectedRangeLast();if(!n)return t;const{highlight:i}=n,{navigableHeaders:r}=this.hot.getSettings(),s=this.hot.selection.isSelectedByColumnHeader(),l=r?i.row:null===(o=Yw(tb,this))||void 0===o?void 0:o.row,a=s?t:i.col,h=l<0&&a>=0;if(Gw(tb,this,null),!h)return t;const c=this.hot.getFirstFullyVisibleColumn(),d=this.hot.getLastFullyVisibleColumn(),u=d-c+1,g=Yw(Kw,this).findLeftMostColumnIndex(l,a),f=Yw(Kw,this).findRightMostColumnIndex(l,a),p=f-g+1;if(g<c&&f>d)return g;if(s){let t=null;return g>=c&&f>d?p>u?(e.value="start",t=g):(e.value="end",t=f):g<c&&f<=d&&(p>u?(e.value="end",t=f):(e.value="start",t=g)),t}return g<=c?g:f}function rb(t,e,o){const n=Yw(Kw,this).getHeaderTreeNodeData(e,t);if(!n)return t;const{columnCursor:i,selectionType:r,selectionWidth:s}=o,{isRoot:l,colspan:a}=Yw(Kw,this).getHeaderSettings(e,t);if(r===nw.PP){if(!l)return n.columnIndex}else if(r===nw.E6&&(a>s-i||!l))return null;return t}function sb(t,e,o){let{columnHeadersCount:n}=o;if(0!==n)for(let o=0;o<e.length;o++){const{startRow:n,startCol:r,endRow:s,endCol:l}=e[o],a=s-n+1;if(n>=0||1==r-l+1)break;for(let e=r;e<=l;e++)for(let o=n;o<=s;o++){var i;const n=a+o,s=e-r;0!==s&&(!1===(null===(i=Yw(Kw,this).getHeaderTreeNodeData(o,e))||void 0===i?void 0:i.isRoot)&&(t[n][s]=""))}}}function lb(t,e,o,n){this._getHeaderTreeNodeDataByCoords(e)&&(n.column=!0)}function ab(t,e){const o=this._getHeaderTreeNodeDataByCoords(e);if(!o)return;Gw(Jw,this,e.clone()),Gw(Zw,this,!0);const{selection:n}=this.hot,i=n.isSelected()?n.getSelectedRange().current():null,s=[],{columnIndex:l,origColspan:a}=o,h=!n.inInSelection(e);t.shiftKey&&i?e.col<i.from.col?s.push(i.getTopEndCorner().col,l,e.row):e.col>i.from.col?s.push(i.getTopStartCorner().col,l+a-1,e.row):s.push(l,l+a-1,e.row):((0,r.Ml)(t)||(0,r.nO)(t)&&h||(0,r.kH)(t))&&s.push(l,l+a-1,e.row),n.selectColumns(...s)}function hb(t,e,o,n){if(!this.hot.view.isMouseDown()||n.column)return;const i=this._getHeaderTreeNodeDataByCoords(e);if(!i)return;const{columnIndex:r,origColspan:s}=i,l=this.hot.getSelectedRangeLast(),a=l.getTopStartCorner(),h=l.getBottomEndCorner(),{from:c}=l;n.column=!0,n.cell=!0;const d=[],u=(0,ut.qE)(e.row,-1/0,-1);e.col<c.col?d.push(h.col,r,u):e.col>c.col?d.push(a.col,r+s-1,u):d.push(r,r+s-1,u),this.hot.selection.selectColumns(...d)}function cb(){Gw(Zw,this,!1)}function db(){const{navigableHeaders:t}=this.hot.getSettings();if(!this.hot.view.isMouseDown()||!Yw(Zw,this)||!t)return;const e=this.hot.getSelectedRangeLast(),o=e.getTopStartCorner().col,n=e.getBottomEndCorner().col,{columnIndex:i,origColspan:r}=Yw(Kw,this).getHeaderTreeNodeData(Yw(Jw,this).row,Yw(Jw,this).col);if(e.setHighlight(Yw(Jw,this)),r>e.getWidth()||i<o||i+r-1>n){const t=Yw(Kw,this).findTopMostEntireHeaderLevel((0,ut.qE)(o,i,i+r-1),(0,ut.qE)(n,i,i+r-1));e.highlight.row=t,e.highlight.col=e.from.col}}function ub(t){const{highlight:e}=this.hot.getSelectedRangeLast(),o=this.hot._createCellCoords(e.row+t.row,e.col+t.col);if(!(o.isHeader()&&o.col>=0))return;const n=Yw(Kw,this).findLeftMostColumnIndex(o.row,o.col),i=Yw(Kw,this).findRightMostColumnIndex(o.row,o.col);if(t.col<0){const o=e.col>=n&&e.col<=i?n-1:i,r=this.hot.columnIndexMapper.getNearestNotHiddenIndex(o,-1);t.col=null===r?-this.hot.view.countRenderableColumnsInRange(0,e.col):-Math.max(this.hot.view.countRenderableColumnsInRange(r,e.col)-1,1)}else if(t.col>0){const o=e.col>=n&&e.col<=i?i+1:n,r=this.hot.columnIndexMapper.getNearestNotHiddenIndex(o,1);t.col=null===r?this.hot.view.countRenderableColumnsInRange(e.col,this.hot.countCols()):Math.max(this.hot.view.countRenderableColumnsInRange(e.col,r)-1,1)}}function gb(t,e,o){const n=t.row,i=this._getHeaderTreeNodeDataByCoords({row:n,col:t.col}),r=this._getHeaderTreeNodeDataByCoords({row:n,col:e.col});Gw(tb,this,o.clone()),e.col<t.col?(i&&(t.col=i.columnIndex+i.origColspan-1),r&&(e.col=r.columnIndex)):e.col>=t.col&&(i&&(t.col=i.columnIndex),r&&(e.col=r.columnIndex+r.origColspan-1))}function fb(t){if(Yw(Kw,this).getLayersCount()>0){t.length=0;for(let e=0;e<Yw(Kw,this).getLayersCount();e++)t.push(this.headerRendererFactory(e))}}function pb(t){const e=Yw(Kw,this).getLayersCount();let o=t.startColumn,n=!!e;for(let i=0;i<e;i++){const e=Yw(Kw,this).findLeftMostColumnIndex(i,t.startColumn),r=this.hot.columnIndexMapper.getRenderableFromVisualIndex(e);if(e>=0&&(n=!1),(0,ut.kf)(r)&&r<t.startColumn){o=r;break}}t.startColumn=n?Yw(Kw,this).getHeaderTreeNodeData(0,o).columnIndex:o}function mb(t,e){const o=this.ghostTable.getWidth(e);return t>o?t:o}function wb(t,e,o){var n;const{label:i}=null!==(n=Yw(Kw,this).getHeaderTreeNodeData(o,e))&&void 0!==n?n:{label:""};return i}function bb(t,e){if(t<0)return this.hot.getCell(t,Yw(Kw,this).findLeftMostColumnIndex(t,e),!0)}function vb(){this.updatePlugin()}function yb(t,e){e||this.updatePlugin()}function Cb(t,e,o){return(e=function(t){var e=function(t){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var o=e.call(t,"string");if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[e]=o,t}const Sb=class{constructor(t,e){Cb(this,"hot",void 0),Cb(this,"data",null),Cb(this,"plugin",void 0),Cb(this,"parentReference",new WeakMap),Cb(this,"cache",{levels:[],levelCount:0,rows:[],nodeInfo:new WeakMap}),this.hot=e,this.plugin=t}setData(t){this.data=t}getData(){return this.data}getRawSourceData(){let t=null;return this.plugin.disableCoreAPIModifiers(),t=this.hot.getSourceData(),this.plugin.enableCoreAPIModifiers(),t}updateWithData(t){this.setData(t),this.rewriteCache()}rewriteCache(){this.cache={levels:[],levelCount:0,rows:[],nodeInfo:new WeakMap},(0,ut.Ti)(0,this.data.length-1,(t=>{this.cacheNode(this.data[t],0,null)}))}cacheNode(t,e,o){this.cache.levels[e]||(this.cache.levels[e]=[],this.cache.levelCount+=1),this.cache.levels[e].push(t),this.cache.rows.push(t),this.cache.nodeInfo.set(t,{parent:o,row:this.cache.rows.length-1,level:e}),this.hasChildren(t)&&(0,c.z0)(t.__children,(o=>{this.cacheNode(o,e+1,t)}))}getDataObject(t){return null==t?null:this.cache.rows[t]}readTreeNodes(t,e,o,n){let i=!1,r=e;if(isNaN(r)&&r.end)return r;let s=t;return s||(s={__children:this.data},i=!0,r-=1),null!=o&&r===o?{result:s,end:!0}:null!=n&&s===n?{result:r,end:!0}:(r+=1,s.__children&&(0,c.z0)(s.__children,(t=>{if(this.parentReference.set(t,i?null:s),r=this.readTreeNodes(t,r,o,n),isNaN(r)&&r.end)return!1})),r)}mockParent(){const t=this.mockNode();return t.__children=this.data,t}mockNode(){const t={};return(0,s.v4)(this.data[0],((e,o)=>{t[o]=null})),t}getRowIndex(t){return null==t?null:this.cache.nodeInfo.get(t).row}getRowIndexWithinParent(t){let e=null;e=isNaN(t)?t:this.getDataObject(t);const o=this.getRowParent(t);return null==o?this.data.indexOf(e):o.__children.indexOf(e)}countAllRows(){const t={__children:this.data};return this.countChildren(t)}countChildren(t){let e=0,o=t;return isNaN(o)||(o=this.getDataObject(o)),o&&o.__children?((0,c.z0)(o.__children,(t=>{e+=1,t.__children&&(e+=this.countChildren(t))})),e):0}getRowParent(t){let e;return e=isNaN(t)?t:this.getDataObject(t),this.getRowObjectParent(e)}getRowObjectParent(t){return t&&"object"==typeof t?this.cache.nodeInfo.get(t).parent:null}getRowLevel(t){let e=null;return e=isNaN(t)?t:this.getDataObject(t),e?this.getRowObjectLevel(e):null}getRowObjectLevel(t){return null==t?null:this.cache.nodeInfo.get(t).level}hasChildren(t){let e=t;return isNaN(e)||(e=this.getDataObject(e)),!(!e.__children||!e.__children.length)}isChild(t){return null!==this.getRowParent(t)}getChild(t,e){var o;return(null===(o=t.__children)||void 0===o?void 0:o[e])||null}isRowHighestLevel(t){return!this.isChild(t)}isParent(t){var e;let o=t;return isNaN(o)||(o=this.getDataObject(o)),o&&!!o.__children&&0!==(null===(e=o.__children)||void 0===e?void 0:e.length)}addChild(t,e){let o=e;this.hot.runHooks("beforeAddChild",t,o);let n=null;t&&(n=this.getRowIndex(t)),this.hot.runHooks("beforeCreateRow",n+this.countChildren(t)+1,1);let i=t;t||(i=this.mockParent()),i.__children||(i.__children=[]),o||(o=this.mockNode()),i.__children.push(o),this.rewriteCache();const r=this.getRowIndex(o);this.hot.rowIndexMapper.insertIndexes(r,1),this.hot.runHooks("afterCreateRow",r,1),this.hot.runHooks("afterAddChild",t,o)}addChildAtIndex(t,e,o){let n,i=o;if(i||(i=this.mockNode()),this.hot.runHooks("beforeAddChild",t,i,e),t){const o=this.getRowIndex(t)+e+1;this.hot.runHooks("beforeCreateRow",o,1),t.__children.splice(e,null,i),this.rewriteCache(),this.plugin.disableCoreAPIModifiers(),this.hot.setSourceDataAtCell(this.getRowIndexWithinParent(t),"__children",t.__children,"NestedRows.addChildAtIndex"),this.hot.rowIndexMapper.insertIndexes(o,1),this.plugin.enableCoreAPIModifiers(),this.hot.runHooks("afterCreateRow",o,1),n=o}else this.plugin.disableCoreAPIModifiers(),this.hot.alter("insert_row_above",e,1,"NestedRows.addChildAtIndex"),this.plugin.enableCoreAPIModifiers(),n=this.getRowIndex(this.data[e]);i=this.getDataObject(n),this.hot.runHooks("afterAddChild",t,i,e)}addSibling(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"below";const o=this.translateTrimmedRow(t),n=this.getRowParent(o),i=this.getRowIndexWithinParent(o);switch(e){case"below":this.addChildAtIndex(n,i+1,null);break;case"above":this.addChildAtIndex(n,i,null)}}detachFromParent(t){let e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],o=null;const n=[];Array.isArray(t)?((0,ut.Ti)(t[0],t[2],(t=>{const e=this.translateTrimmedRow(t);n.push(this.getDataObject(e))})),(0,ut.Ti)(0,n.length-2,(t=>{this.detachFromParent(n[t],!1)})),o=n[n.length-1]):o=t;const i=this.getRowIndex(o),r=this.countChildren(o),s=this.getRowIndexWithinParent(o),l=this.getRowParent(o),a=this.getRowParent(l),h=this.getRowIndex(a);let c=null;if(this.hot.runHooks("beforeDetachChild",l,o),null!=s){const t=Array.from(new Array(i+r+1).keys()).splice(-1*(r+1));if(this.hot.runHooks("beforeRemoveRow",i,r+1,t,this.plugin.pluginName),l.__children.splice(s,1),this.rewriteCache(),this.hot.runHooks("afterRemoveRow",i,r+1,t,this.plugin.pluginName),a){c=h+this.countChildren(a);const t=this.getChild(a,this.countChildren(a)-1),e=this.getRowIndex(t);this.hot.runHooks("beforeCreateRow",e+1,r+1,this.plugin.pluginName),a.__children.push(o)}else c=this.hot.countRows()+1,this.hot.runHooks("beforeCreateRow",c-2,r+1,this.plugin.pluginName),this.data.push(o)}this.rewriteCache(),this.hot.runHooks("afterCreateRow",c-2,r+1,this.plugin.pluginName),this.hot.runHooks("afterDetachChild",l,o,this.getRowIndex(o)),e&&this.hot.render()}filterData(t,e,o){const n=[];(0,c.z0)(o,(t=>{n.push(this.getDataObject(t))})),(0,c.z0)(n,(t=>{const e=this.getRowIndexWithinParent(t),o=this.getRowParent(t);null===o?this.data.splice(e,1):o.__children.splice(e,1)})),this.rewriteCache()}spliceData(t,e,o){const n=this.getDataObject(t-1);let i=null,r=t;n&&n.__children&&0===n.__children.length?(i=n,r=0):t<this.countAllRows()&&(i=this.getRowParent(t),r=this.getRowIndexWithinParent(t)),i?o?i.__children.splice(r,e,...o):i.__children.splice(r,e):o?this.data.splice(r,e,...o):this.data.splice(r,e),this.rewriteCache()}syncRowWithRawSource(t){let e=t,o=e;do{o=this.getRowParent(o),null!==o&&(e=o)}while(null!==o);this.plugin.disableCoreAPIModifiers(),this.hot.setSourceDataAtCell(this.getRowIndexWithinParent(e),"__children",e.__children,"NestedRows.syncRowWithRawSource"),this.plugin.enableCoreAPIModifiers()}moveRow(t,e,o,n){const i=e===this.hot.countRows(),r=this.getRowParent(t),s=this.getRowIndexWithinParent(t),l=r.__children.slice(s,s+1),a=t>e;let h=i?this.getRowParent(e-1):this.getRowParent(e);null==h&&(h=this.getRowParent(e-1)),null==h&&(h=this.getDataObject(e-1)),h?h.__children||(h.__children=[]):(h=this.getDataObject(e),h.__children=[]);const c=i||o||n?h.__children.length:this.getRowIndexWithinParent(e),d=r===h;h.__children.splice(c,0,l[0]),r.__children.splice(s+(a&&d?1:0),1),this.syncRowWithRawSource(r),d||this.syncRowWithRawSource(h)}translateTrimmedRow(t){return this.plugin.collapsingUI?this.plugin.collapsingUI.translateTrimmedRow(t):t}untranslateTrimmedRow(t){return this.plugin.collapsingUI?this.plugin.collapsingUI.untranslateTrimmedRow(t):t}};function Rb(t,e,o){return(e=function(t){var e=function(t){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var o=e.call(t,"string");if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[e]=o,t}const Eb=class{constructor(t,e){Rb(this,"hot",void 0),Rb(this,"plugin",void 0),this.hot=e,this.plugin=t}};class Tb extends Eb{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(t,e){super(t,e),this.dataManager=this.plugin.dataManager,this.collapsingUI=this.plugin.collapsingUI,this.rowHeaderWidthCache=null}appendLevelIndicators(t,e){const o=this.hot.toPhysicalRow(t),n=this.dataManager.getRowLevel(o),r=this.dataManager.getDataObject(o),s=e.getElementsByTagName("DIV")[0],l=s.querySelector("span.rowHeader"),a=s.querySelectorAll('[class^="ht_nesting"]'),h=this.hot.getSettings().ariaTags;if((0,c.z0)(a,(t=>{t&&s.removeChild(t)})),(0,i.iQ)(e,Tb.CSS_CLASSES.indicatorContainer),n){const{rootDocument:t}=this.hot,e=l.cloneNode(!0);s.innerHTML="",(0,ut.Ti)(0,n-1,(()=>{const e=t.createElement("SPAN");(0,i.iQ)(e,Tb.CSS_CLASSES.emptyIndicator),s.appendChild(e)})),s.appendChild(e)}if(this.dataManager.hasChildren(r)){const t=this.hot.rootDocument.createElement("DIV");h&&(0,i.Bq)(t,[(0,p.MG)()]),(0,i.iQ)(e,Tb.CSS_CLASSES.parent),this.collapsingUI.areChildrenCollapsed(o)?((0,i.iQ)(t,`${Tb.CSS_CLASSES.button} ${Tb.CSS_CLASSES.expandButton}`),h&&(0,i.Bq)(e,[(0,p.dV)(!1)])):((0,i.iQ)(t,`${Tb.CSS_CLASSES.button} ${Tb.CSS_CLASSES.collapseButton}`),h&&(0,i.Bq)(e,[(0,p.dV)(!0)])),s.appendChild(t)}}updateRowHeaderWidth(t){let e=t;e||(e=this.dataManager.cache.levelCount);const o=this.hot.view.getStylesHandler();let n=11;o.isClassicTheme()||(n=2*o.getCSSVariableValue("cell-horizontal-padding")),this.rowHeaderWidthCache=Math.max(50,n+10*e+25),this.hot.render()}}const xb=Tb,Mb=class extends Eb{constructor(t,e){var o;super(t,e),o=this,this.dataManager=this.plugin.dataManager,this.collapsedRows=[],this.collapsedRowsStash={stash:function(){let t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];o.lastCollapsedRows=o.collapsedRows.slice(0),o.expandMultipleChildren(o.lastCollapsedRows,t)},shiftStash:function(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;null==e&&(e=1/0),(0,c.z0)(o.lastCollapsedRows,((i,r)=>{i>=t&&i<e&&(o.lastCollapsedRows[r]=i+n)}))},applyStash:function(){let t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];o.collapseMultipleChildren(o.lastCollapsedRows,t),o.lastCollapsedRows=void 0},trimStash:(t,e)=>{(0,ut.Ti)(t,t+e-1,(t=>{const e=this.lastCollapsedRows.indexOf(t);e>-1&&this.lastCollapsedRows.splice(e,1)}))}}}collapseChildren(t){let e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],o=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];const n=[];let i=null,r=null,s=null;return isNaN(t)?(i=t,r=this.dataManager.getRowIndex(i)):(i=this.dataManager.getDataObject(t),r=t),this.dataManager.hasChildren(i)&&(0,c.z0)(i.__children,(t=>{n.push(this.dataManager.getRowIndex(t))})),s=this.collapseRows(n,!0,!1),o&&this.trimRows(s),e&&this.renderAndAdjust(),-1===this.collapsedRows.indexOf(r)&&this.collapsedRows.push(r),s}collapseMultipleChildren(t){let e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],o=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];const n=[];(0,c.z0)(t,(t=>{n.push(...this.collapseChildren(t,!1,!1))})),o&&this.trimRows(n),e&&this.renderAndAdjust()}collapseRow(t){let e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];this.collapseRows([t],e)}collapseRows(t){let e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],o=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const n=[];return(0,c.z0)(t,(t=>{n.push(t),e&&this.collapseChildRows(t,n)})),o&&this.trimRows(n),n}collapseChildRows(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],o=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if(this.dataManager.hasChildren(t)){const o=this.dataManager.getDataObject(t);(0,c.z0)(o.__children,(t=>{const o=this.dataManager.getRowIndex(t);e.push(o),this.collapseChildRows(o,e)}))}o&&this.trimRows(e)}expandRow(t){let e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];this.expandRows([t],e)}expandRows(t){let e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],o=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const n=[];return(0,c.z0)(t,(t=>{n.push(t),e&&this.expandChildRows(t,n)})),o&&this.untrimRows(n),n}expandChildRows(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],o=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if(this.dataManager.hasChildren(t)){const o=this.dataManager.getDataObject(t);(0,c.z0)(o.__children,(t=>{if(!this.isAnyParentCollapsed(t)){const o=this.dataManager.getRowIndex(t);e.push(o),this.expandChildRows(o,e)}}))}o&&this.untrimRows(e)}expandChildren(t){let e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],o=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];const n=[];let i=null,r=null,s=null;return isNaN(t)?(i=t,r=this.dataManager.getRowIndex(t)):(i=this.dataManager.getDataObject(t),r=t),this.collapsedRows.splice(this.collapsedRows.indexOf(r),1),this.dataManager.hasChildren(i)&&(0,c.z0)(i.__children,(t=>{const e=this.dataManager.getRowIndex(t);n.push(e)})),s=this.expandRows(n,!0,!1),o&&this.untrimRows(s),e&&this.renderAndAdjust(),s}expandMultipleChildren(t){let e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],o=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];const n=[];(0,c.z0)(t,(t=>{n.push(...this.expandChildren(t,!1,!1))})),o&&this.untrimRows(n),e&&this.renderAndAdjust()}collapseAll(){const t=this.dataManager.getData(),e=[];(0,c.z0)(t,(t=>{this.dataManager.hasChildren(t)&&e.push(t)})),this.collapseMultipleChildren(e),this.renderAndAdjust()}expandAll(){const t=this.dataManager.getData(),e=[];(0,c.z0)(t,(t=>{this.dataManager.hasChildren(t)&&e.push(t)})),this.expandMultipleChildren(e),this.renderAndAdjust()}trimRows(t){this.hot.batchExecution((()=>{(0,c.z0)(t,(t=>{this.plugin.collapsedRowsMap.setValueAtIndex(t,!0)}))}),!0)}untrimRows(t){this.hot.batchExecution((()=>{(0,c.z0)(t,(t=>{this.plugin.collapsedRowsMap.setValueAtIndex(t,!1)}))}),!0)}areChildrenCollapsed(t){let e=isNaN(t)?t:this.dataManager.getDataObject(t),o=!0;return null===e&&(e={__children:this.dataManager.data}),this.dataManager.hasChildren(e)&&(0,c.z0)(e.__children,(t=>{const e=this.dataManager.getRowIndex(t);if(!this.plugin.collapsedRowsMap.getValueAtIndex(e))return o=!1,!1})),o}isAnyParentCollapsed(t){let e=t;for(;null!==e;){e=this.dataManager.getRowParent(e);const t=this.dataManager.getRowIndex(e);if(this.collapsedRows.indexOf(t)>-1)return!0}return!1}toggleState(t,e){if(e.col>=0)return;const o=this.translateTrimmedRow(e.row);(0,i.nB)(t.target,xb.CSS_CLASSES.button)&&(this.areChildrenCollapsed(o)?this.expandChildren(o):this.collapseChildren(o),(0,r.CA)(t))}translateTrimmedRow(t){return this.hot.toPhysicalRow(t)}untranslateTrimmedRow(t){return this.hot.toVisualRow(t)}renderAndAdjust(){this.hot.render(),this.hot.view.adjustElementsSize()}};var Ib=new WeakMap;const Hb=class extends Eb{constructor(){var t,e,o;super(...arguments),t=this,e="dataManager",o=this.plugin.dataManager,(e=function(t){var e=function(t){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var o=e.call(t,"string");if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[e]=o,function(t,e,o){(function(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")})(t,e),e.set(t,o)}(this,Ib,{row_above:(t,e)=>{const o=e[e.length-1];this.dataManager.addSibling(o.start.row,"above")},row_below:(t,e)=>{const o=e[e.length-1];this.dataManager.addSibling(o.start.row,"below")}})}appendOptions(t){const e=[{key:"add_child",name(){return this.getTranslatedPhrase(tt.CONTEXTMENU_ITEMS_NESTED_ROWS_INSERT_CHILD)},callback:()=>{const t=this.dataManager.translateTrimmedRow(this.hot.getSelectedLast()[0]),e=this.dataManager.getDataObject(t);this.dataManager.addChild(e)},disabled:()=>{const t=this.hot.getSelectedLast();return!t||t[0]<0||this.hot.selection.isSelectedByColumnHeader()||this.hot.countRows()>=this.hot.getSettings().maxRows}},{key:"detach_from_parent",name(){return this.getTranslatedPhrase(tt.CONTEXTMENU_ITEMS_NESTED_ROWS_DETACH_CHILD)},callback:()=>{this.dataManager.detachFromParent(this.hot.getSelectedLast())},disabled:()=>{const t=this.hot.getSelectedLast(),e=this.dataManager.translateTrimmedRow(t[0]);return!this.dataManager.getRowParent(e)||!t||t[0]<0||this.hot.selection.isSelectedByColumnHeader()||this.hot.countRows()>=this.hot.getSettings().maxRows}},{name:"---------"}];return(0,ut.Ti)(0,t.items.length-1,(o=>{if(0===o)return(0,c.z0)(e,((e,n)=>{t.items.splice(o+n,0,e)})),!1})),this.modifyRowInsertingOptions(t)}modifyRowInsertingOptions(t){return(0,ut.Ti)(0,t.items.length-1,(e=>{const o=(n=Ib,i=this,n.get(function(t,e,o){if("function"==typeof t?t===e:t.has(e))return arguments.length<3?e:o;throw new TypeError("Private element is not present on this object")}(n,i)))[t.items[e].key];var n,i;null!=o&&(t.items[e].callback=o)})),t}};function Ob(t,e,o){return(e=function(t){var e=function(t){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var o=e.call(t,"string");if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[e]=o,t}class Ab{constructor(t){Ob(this,"plugin",void 0),Ob(this,"hot",void 0),Ob(this,"dataManager",void 0),Ob(this,"collapsingUI",void 0),this.plugin=t,this.hot=t.hot,this.dataManager=t.dataManager,this.collapsingUI=t.collapsingUI}onBeforeRowMove(t,e,o,n){if(this.displayAPICompatibilityWarning({rows:t,finalIndex:e,dropIndex:o,movePossible:n}))return!1;this.movedToCollapsed=!1;const i=o===this.hot.countRows(),r=i?this.hot.countSourceRows():this.dataManager.translateTrimmedRow(o);let s=!0;const l=t.map((t=>{if(!s)return!1;const e=this.dataManager.translateTrimmedRow(t);return s=this.shouldAllowMoving(e,r),e})),a=-1===l.indexOf(r);if(!s||!a)return!1;const h=this.getBaseParent(l),c=this.getTargetParent(i,r),d=h===c;return this.movedToCollapsed=this.collapsingUI.areChildrenCollapsed(c),this.collapsingUI.collapsedRowsStash.stash(),this.shiftCollapsibleParentsLocations(l,r,d),this.moveRows(l,r,c),this.dataManager.rewriteCache(),this.moveCellsMeta(l,r),this.collapsingUI.collapsedRowsStash.applyStash(!1),this.hot.runHooks("afterRowMove",t,e,o,n,n&&this.isRowOrderChanged(t,e)),this.hot.render(),this.selectCells(t,o),!1}displayAPICompatibilityWarning(t){const{rows:e,finalIndex:o,dropIndex:n,movePossible:i}=t;let r=!1;return(0,d.b0)(n)&&((0,So.R8)(nn.O`Since version 8.0.0 of the Handsontable the 'moveRows' method isn't used for moving rows\x20
- when the NestedRows plugin is enabled. Please use the 'dragRows' method instead.`),this.hot.runHooks("afterRowMove",e,o,n,i,!1),r=!0),r}shouldAllowMoving(t,e){return!(this.dataManager.isParent(t)||this.dataManager.isRowHighestLevel(t)||t===e||0===e)}getBaseParent(t){return this.dataManager.getRowParent(t[0])}getTargetParent(t,e){let o=this.dataManager.getRowParent(t?e-1:e);return null==o&&(o=this.dataManager.getRowParent(e-1)),o}shiftCollapsibleParentsLocations(t,e,o){o||(Math.max(...t)<=e?this.collapsingUI.collapsedRowsStash.shiftStash(t[0],e,-1*t.length):this.collapsingUI.collapsedRowsStash.shiftStash(e,t[0],t.length))}moveRows(t,e,o){const n=e===this.dataManager.getRowIndex(o)+this.dataManager.countChildren(o)+1;this.hot.batchRender((()=>{t.forEach((t=>{this.dataManager.moveRow(t,e,this.movedToCollapsed,n)}))}))}moveCellsMeta(t,e){const o=[],n=Math.max(...t)<e;t.forEach((t=>{o.push(this.hot.getCellMetaAtRow(t))})),this.hot.spliceCellsMeta(t[0],t.length),this.hot.spliceCellsMeta(e-(n?o.length:0),0,...o)}selectCells(t,e){const o=t.length;let n=0,i=0;if(this.movedToCollapsed){let r=null;r=t[o-1]<e?this.dataManager.translateTrimmedRow(e-o):this.dataManager.translateTrimmedRow(e);const s=this.dataManager.getRowParent(null===r?this.hot.countSourceRows()-1:r-1),l=this.dataManager.getRowIndex(s);n=this.dataManager.untranslateTrimmedRow(l),i=n}else t[o-1]<e?(i=e-1,n=i-o+1):(n=e,i=n+o-1);this.hot.selectCells([[n,0,i,this.hot.countCols()-1]],!1)}isRowOrderChanged(t,e){return t.some(((t,o)=>t-o!==e))}}function kb(t,e,o){_b(t,e),e.set(t,o)}function _b(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Nb(t,e,o){return(e=function(t){var e=function(t){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var o=e.call(t,"string");if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[e]=o,t}function Pb(t,e){return t.get(Db(t,e))}function Lb(t,e,o){return t.set(Db(t,e),o),o}function Db(t,e,o){if("function"==typeof t?t===e:t.has(e))return arguments.length<3?e:o;throw new TypeError("Private element is not present on this object")}const Vb="nestedRows",Fb=Vb;var Bb=new WeakMap,Wb=new WeakMap,zb=new WeakSet;class jb extends Kt{constructor(){var t;super(...arguments),_b(this,t=zb),t.add(this),Nb(this,"dataManager",null),Nb(this,"headersUI",null),Nb(this,"collapsedRowsMap",null),kb(this,Bb,!1),kb(this,Wb,!1)}static get PLUGIN_KEY(){return Vb}static get PLUGIN_PRIORITY(){return 300}isEnabled(){return!!this.hot.getSettings()[Vb]}enablePlugin(){var t=this;this.enabled||(this.collapsedRowsMap=this.hot.rowIndexMapper.registerMap("nestedRows",new Ic.q),this.dataManager=new Sb(this,this.hot),this.collapsingUI=new Mb(this,this.hot),this.headersUI=new xb(this,this.hot),this.contextMenuUI=new Hb(this,this.hot),this.rowMoveController=new Ab(this),this.addHook("afterInit",(function(){for(var e=arguments.length,o=new Array(e),n=0;n<e;n++)o[n]=arguments[n];return Db(zb,t,nv).call(t,...o)})),this.addHook("beforeViewRender",(function(){for(var e=arguments.length,o=new Array(e),n=0;n<e;n++)o[n]=arguments[n];return Db(zb,t,iv).call(t,...o)})),this.addHook("modifyRowData",(function(){return t.onModifyRowData(...arguments)})),this.addHook("modifySourceLength",(function(){return t.onModifySourceLength(...arguments)})),this.addHook("beforeDataSplice",(function(){return t.onBeforeDataSplice(...arguments)})),this.addHook("filterData",(function(){for(var e=arguments.length,o=new Array(e),n=0;n<e;n++)o[n]=arguments[n];return Db(zb,t,Gb).call(t,...o)})),this.addHook("afterContextMenuDefaultOptions",(function(){for(var e=arguments.length,o=new Array(e),n=0;n<e;n++)o[n]=arguments[n];return Db(zb,t,Yb).call(t,...o)})),this.addHook("afterGetRowHeader",(function(){for(var e=arguments.length,o=new Array(e),n=0;n<e;n++)o[n]=arguments[n];return Db(zb,t,Xb).call(t,...o)})),this.addHook("beforeOnCellMouseDown",(function(){for(var e=arguments.length,o=new Array(e),n=0;n<e;n++)o[n]=arguments[n];return Db(zb,t,$b).call(t,...o)})),this.addHook("beforeRemoveRow",(function(){for(var e=arguments.length,o=new Array(e),n=0;n<e;n++)o[n]=arguments[n];return Db(zb,t,Qb).call(t,...o)})),this.addHook("afterRemoveRow",(function(){for(var e=arguments.length,o=new Array(e),n=0;n<e;n++)o[n]=arguments[n];return Db(zb,t,Kb).call(t,...o)})),this.addHook("beforeAddChild",(function(){for(var e=arguments.length,o=new Array(e),n=0;n<e;n++)o[n]=arguments[n];return Db(zb,t,Jb).call(t,...o)})),this.addHook("afterAddChild",(function(){for(var e=arguments.length,o=new Array(e),n=0;n<e;n++)o[n]=arguments[n];return Db(zb,t,Zb).call(t,...o)})),this.addHook("beforeDetachChild",(function(){for(var e=arguments.length,o=new Array(e),n=0;n<e;n++)o[n]=arguments[n];return Db(zb,t,tv).call(t,...o)})),this.addHook("afterDetachChild",(function(){for(var e=arguments.length,o=new Array(e),n=0;n<e;n++)o[n]=arguments[n];return Db(zb,t,ev).call(t,...o)})),this.addHook("modifyRowHeaderWidth",(function(){for(var e=arguments.length,o=new Array(e),n=0;n<e;n++)o[n]=arguments[n];return Db(zb,t,qb).call(t,...o)})),this.addHook("afterCreateRow",(function(){for(var e=arguments.length,o=new Array(e),n=0;n<e;n++)o[n]=arguments[n];return Db(zb,t,ov).call(t,...o)})),this.addHook("beforeRowMove",(function(){for(var e=arguments.length,o=new Array(e),n=0;n<e;n++)o[n]=arguments[n];return Db(zb,t,Ub).call(t,...o)})),this.addHook("beforeLoadData",(t=>Db(zb,this,rv).call(this,t))),this.addHook("beforeUpdateData",(t=>Db(zb,this,rv).call(this,t))),this.registerShortcuts(),super.enablePlugin())}disablePlugin(){this.hot.rowIndexMapper.unregisterMap("nestedRows"),this.unregisterShortcuts(),super.disablePlugin()}updatePlugin(){this.disablePlugin();const t=this.dataManager.getData();this.enablePlugin(),this.dataManager.updateWithData(t),super.updatePlugin()}registerShortcuts(){this.hot.getShortcutManager().getContext("grid").addShortcut({keys:[["Enter"]],callback:()=>{const{highlight:t}=this.hot.getSelectedRangeLast(),e=this.collapsingUI.translateTrimmedRow(t.row);return this.collapsingUI.areChildrenCollapsed(e)?this.collapsingUI.expandChildren(e):this.collapsingUI.collapseChildren(e),!1},runOnlyIf:()=>{var t,e;const o=null===(t=this.hot.getSelectedRangeLast())||void 0===t?void 0:t.highlight;return o&&(null===(e=this.hot.getSelectedRangeLast())||void 0===e?void 0:e.isSingle())&&this.hot.selection.isCellVisible(o)&&-1===o.col&&o.row>=0},group:Fb,relativeToGroup:l.b,position:"before"})}unregisterShortcuts(){this.hot.getShortcutManager().getContext("grid").removeShortcutsByGroup(Fb)}disableCoreAPIModifiers(){Lb(Wb,this,!0)}enableCoreAPIModifiers(){Lb(Wb,this,!1)}onModifyRowData(t){if(!Pb(Wb,this))return this.dataManager.getDataObject(t)}onModifySourceLength(){if(!Pb(Wb,this))return this.dataManager.countAllRows()}onBeforeDataSplice(t,e,o){return!(!Pb(Wb,this)&&!this.dataManager.isRowHighestLevel(t)&&(this.dataManager.spliceData(t,e,o),1))}destroy(){super.destroy()}}function Ub(t,e,o,n){return this.rowMoveController.onBeforeRowMove(t,e,o,n)}function $b(t,e,o){this.collapsingUI.toggleState(t,e,o)}function Gb(t,e,o){return this.collapsingUI.collapsedRowsStash.stash(),this.collapsingUI.collapsedRowsStash.trimStash(o[0],e),this.collapsingUI.collapsedRowsStash.shiftStash(o[0],null,-1*e),this.dataManager.filterData(t,e,o),Lb(Bb,this,!0),this.dataManager.getData().slice()}function Yb(t){return this.contextMenuUI.appendOptions(t)}function Xb(t,e){this.headersUI.appendLevelIndicators(t,e)}function qb(t){return Math.max(this.headersUI.rowHeaderWidthCache,t)}function Kb(t,e,o,n){n!==this.pluginName&&this.hot._registerTimeout((()=>{Lb(Bb,this,!1),this.headersUI.updateRowHeaderWidth(),this.collapsingUI.collapsedRowsStash.applyStash()}))}function Qb(t,e,o){const n=Array.from(o.reduce(((t,e)=>{if(this.dataManager.isParent(e)){const o=this.dataManager.getDataObject(e).__children;return t.add(e),Array.isArray(o)&&o.forEach((e=>t.add(this.dataManager.getRowIndex(e)))),t}return t.add(e)}),new Set));o.length=0,o.push(...n)}function Jb(){this.collapsingUI.collapsedRowsStash.stash()}function Zb(t,e){this.collapsingUI.collapsedRowsStash.shiftStash(this.dataManager.getRowIndex(e)),this.collapsingUI.collapsedRowsStash.applyStash(),this.headersUI.updateRowHeaderWidth()}function tv(){this.collapsingUI.collapsedRowsStash.stash()}function ev(t,e,o){this.collapsingUI.collapsedRowsStash.shiftStash(o,null,-1),this.collapsingUI.collapsedRowsStash.applyStash(),this.headersUI.updateRowHeaderWidth()}function ov(){this.dataManager.rewriteCache()}function nv(){this.headersUI.updateRowHeaderWidth()}function iv(t,e){Pb(Bb,this)&&(e.skipRender=!0)}function rv(t){if(!(0,_h.DJ)(t))return(0,So.z3)("The Nested Rows plugin requires an Array of Objects as a dataset to be provided. The plugin has been disabled."),this.hot.getSettings()[Vb]=!1,void this.disablePlugin();this.dataManager.setData(t),this.dataManager.rewriteCache()}function sv(t,e,o){return(e=function(t){var e=function(t){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var o=e.call(t,"string");if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[e]=o,t}const lv=class{constructor(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:window;sv(this,"rootWindow",void 0),sv(this,"prefix",void 0),sv(this,"savedKeys",[]),this.rootWindow=e,this.prefix=t,this.loadSavedKeys()}saveValue(t,e){this.rootWindow.localStorage.setItem(`${this.prefix}_${t}`,JSON.stringify(e)),-1===this.savedKeys.indexOf(t)&&(this.savedKeys.push(t),this.saveSavedKeys())}loadValue(t,e){const o=void 0===t?e:t,n=this.rootWindow.localStorage.getItem(`${this.prefix}_${o}`);return null===n?void 0:JSON.parse(n)}reset(t){this.rootWindow.localStorage.removeItem(`${this.prefix}_${t}`)}resetAll(){(0,c.z0)(this.savedKeys,((t,e)=>{this.rootWindow.localStorage.removeItem(`${this.prefix}_${this.savedKeys[e]}`)})),this.clearSavedKeys()}loadSavedKeys(){const t=this.rootWindow.localStorage.getItem(`${this.prefix}__persistentStateKeys`),e="string"==typeof t?JSON.parse(t):void 0;this.savedKeys=e||[]}saveSavedKeys(){this.rootWindow.localStorage.setItem(`${this.prefix}__persistentStateKeys`,JSON.stringify(this.savedKeys))}clearSavedKeys(){this.savedKeys.length=0,this.saveSavedKeys()}};Z.R.getSingleton().register("persistentStateSave"),Z.R.getSingleton().register("persistentStateLoad"),Z.R.getSingleton().register("persistentStateReset");const av="persistentState";class hv extends Kt{constructor(){var t,e,o;super(...arguments),t=this,o=void 0,(e=function(t){var e=function(t){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var o=e.call(t,"string");if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:e+""}(e="storage"))in t?Object.defineProperty(t,e,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[e]=o}static get PLUGIN_KEY(){return av}static get PLUGIN_PRIORITY(){return 0}isEnabled(){return!!this.hot.getSettings()[av]}enablePlugin(){this.enabled||(this.storage||(this.storage=new lv(this.hot.rootElement.id,this.hot.rootWindow)),this.addHook("persistentStateSave",((t,e)=>this.saveValue(t,e))),this.addHook("persistentStateLoad",((t,e)=>this.loadValue(t,e))),this.addHook("persistentStateReset",(()=>this.resetValue())),super.enablePlugin())}disablePlugin(){this.storage=void 0,super.disablePlugin()}updatePlugin(){this.disablePlugin(),this.enablePlugin(),super.updatePlugin()}loadValue(t,e){e.value=this.storage.loadValue(t)}saveValue(t,e){this.storage.saveValue(t,e)}resetValue(t){void 0===t?this.storage.resetAll():this.storage.reset(t)}destroy(){super.destroy()}}function cv(t,e,o){return(e=function(t){var e=function(t){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var o=e.call(t,"string");if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[e]=o,t}function dv(t,e,o){if("function"==typeof t?t===e:t.has(e))return arguments.length<3?e:o;throw new TypeError("Private element is not present on this object")}const uv="search",gv=function(t,e,o,n,i){t.getCellMeta(e,o).isSearchResult=i},fv=function(t,e,o){return!((0,d.b0)(t)||null===t||!t.toLocaleLowerCase||0===t.length||(0,d.b0)(e)||null===e||-1===e.toString().toLocaleLowerCase(o.locale).indexOf(t.toLocaleLowerCase(o.locale)))};var pv=new WeakSet;class mv extends Kt{constructor(){var t,e;super(...arguments),function(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}(t=this,e=pv),e.add(t),cv(this,"callback",gv),cv(this,"queryMethod",fv),cv(this,"searchResultClass","htSearchResult")}static get PLUGIN_KEY(){return uv}static get PLUGIN_PRIORITY(){return 190}isEnabled(){return this.hot.getSettings()[uv]}enablePlugin(){var t=this;if(this.enabled)return;const e=this.hot.getSettings()[uv];this.updatePluginSettings(e),this.addHook("beforeRenderer",(function(){for(var e=arguments.length,o=new Array(e),n=0;n<e;n++)o[n]=arguments[n];return dv(pv,t,wv).call(t,...o)})),super.enablePlugin()}disablePlugin(){var t=this;const e=function(){for(var e=arguments.length,o=new Array(e),n=0;n<e;n++)o[n]=arguments[n];return dv(pv,t,wv).call(t,...o)};this.hot.addHook("beforeRenderer",e),this.hot.addHookOnce("afterViewRender",(()=>{this.hot.removeHook("beforeRenderer",e)})),super.disablePlugin()}updatePlugin(){this.disablePlugin(),this.enablePlugin(),super.updatePlugin()}query(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.getCallback(),o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.getQueryMethod();const n=this.hot.countRows(),i=this.hot.countCols(),r=[],s=this.hot;return(0,ut.Ti)(0,n-1,(n=>{(0,ut.Ti)(0,i-1,(i=>{const l=this.hot.getDataAtCell(n,i),a=this.hot.getCellMeta(n,i),h=a.search.callback||e,c=(a.search.queryMethod||o)(t,l,a);if(c){const t={row:n,col:i,data:l};r.push(t)}h&&h(s,n,i,l,c)}))})),r}getCallback(){return this.callback}setCallback(t){this.callback=t}getQueryMethod(){return this.queryMethod}setQueryMethod(t){this.queryMethod=t}getSearchResultClass(){return this.searchResultClass}setSearchResultClass(t){this.searchResultClass=t}updatePluginSettings(t){(0,s.Gv)(t)&&(t.searchResultClass&&this.setSearchResultClass(t.searchResultClass),t.queryMethod&&this.setQueryMethod(t.queryMethod),t.callback&&this.setCallback(t.callback))}destroy(){super.destroy()}}function wv(t,e,o,n,i,r){const s=r.className||[];let l=[];"string"==typeof s?l=s.split(" "):l.push(...s),this.isEnabled()&&r.isSearchResult?l.includes(this.searchResultClass)||l.push(`${this.searchResultClass}`):l.includes(this.searchResultClass)&&l.splice(l.indexOf(this.searchResultClass),1),r.className=l.join(" ")}function bv(t,e,o){return(e=function(t){var e=function(t){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var o=e.call(t,"string");if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[e]=o,t}class vv{constructor(t){bv(this,"viewportWidth",void 0),bv(this,"overwriteColumnWidthFn",void 0),bv(this,"baseWidths",new Map),bv(this,"stretchedWidths",new Map),this.overwriteColumnWidthFn=t}prepare(t){let{viewportWidth:e}=t;this.viewportWidth=e,this.baseWidths.clear(),this.stretchedWidths.clear()}setColumnBaseWidth(t,e){this.baseWidths.set(t,e)}calculate(){}getWidths(){return Array.from(this.stretchedWidths)}}class yv extends vv{calculate(){const t=Array.from(this.baseWidths).reduce(((t,e)=>{let[,o]=e;return t+o}),0);if(this.viewportWidth-t<0)return void this.stretchedWidths.clear();const e=this.viewportWidth/t,o=[],n=[];let i=this.viewportWidth,r=0;if(this.baseWidths.forEach(((t,s)=>{const l=Math.round(t*e),a=this.overwriteColumnWidthFn(l,s);l===a&&l>=ie.j?(o.push([s,a]),r+=a):l!==a&&(o.push([s,a]),n.push(s),i-=a)})),i<=ie.j)return void this.stretchedWidths.clear();const s=i/r;let l=-1,a=0;o.forEach(((t,e)=>{let[i,r]=t,h=r;n.includes(i)||(h=Math.round(r*s)),this.stretchedWidths.set(i,h),l=i,e<o.length-1&&(a+=h)})),this.stretchedWidths.size>1&&this.stretchedWidths.set(l,Math.round(this.viewportWidth-a))}}function Cv(t,e,o){(function(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")})(t,e),e.set(t,o)}function Sv(t,e){return t.get(Ev(t,e))}function Rv(t,e,o){return t.set(Ev(t,e),o),o}function Ev(t,e,o){if("function"==typeof t?t===e:t.has(e))return arguments.length<3?e:o;throw new TypeError("Private element is not present on this object")}var Tv=new WeakMap,xv=new WeakMap;class Mv extends vv{constructor(){super(...arguments),Cv(this,Tv,0),Cv(this,xv,-1)}prepare(t){super.prepare(t),Rv(Tv,this,0),Rv(xv,this,-1)}setColumnBaseWidth(t,e){super.setColumnBaseWidth(t,e),Rv(xv,this,t),Rv(Tv,this,e)}calculate(){if(-1===Sv(xv,this))return;const t=Array.from(this.baseWidths).reduce(((t,e)=>{let[,o]=e;return t+o}),0),e=Math.max(this.viewportWidth-t+Sv(Tv,this),0);this.stretchedWidths.set(Sv(xv,this),e)}}function Iv(t,e,o){Hv(t,e),e.set(t,o)}function Hv(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Ov(t,e){return t.get(kv(t,e))}function Av(t,e,o){return t.set(kv(t,e),o),o}function kv(t,e,o){if("function"==typeof t?t===e:t.has(e))return arguments.length<3?e:o;throw new TypeError("Private element is not present on this object")}var _v=new WeakMap,Nv=new WeakMap,Pv=new WeakMap,Lv=new WeakMap,Dv=new WeakSet;class Vv{constructor(t){var e;Hv(this,e=Dv),e.add(this),Iv(this,_v,void 0),Iv(this,Nv,void 0),Iv(this,Pv,new Map([["all",new yv(kv(Dv,this,Wv).bind(this))],["last",new Mv(kv(Dv,this,Wv).bind(this))]])),Iv(this,Lv,"none"),Av(_v,this,t),Av(Nv,this,Ov(_v,this).columnIndexMapper.createAndRegisterIndexMap("stretchColumns","physicalIndexToValue"))}useStrategy(t){Av(Lv,this,Ov(Pv,this).has(t)?t:"none")}refreshStretching(){"none"!==Ov(Lv,this)?Ov(_v,this).batchExecution((()=>{Ov(Nv,this).clear();const t=Ov(Pv,this).get(Ov(Lv,this));let e=Ov(_v,this).view.getViewportWidth();kv(Dv,this,Fv).call(this)&&(e-=(0,i.XJ)(Ov(_v,this).rootDocument)),t.prepare({viewportWidth:e});for(let e=0;e<Ov(_v,this).countCols();e++)Ov(_v,this).columnIndexMapper.isHidden(Ov(_v,this).toPhysicalColumn(e))||t.setColumnBaseWidth(e,kv(Dv,this,Bv).call(this,e));t.calculate(),t.getWidths().forEach((t=>{let[e,o]=t;Ov(Nv,this).setValueAtIndex(Ov(_v,this).toPhysicalColumn(e),o)}))}),!0):Ov(Nv,this).clear()}getStretchedWidth(t){return Ov(Nv,this).getValueAtIndex(Ov(_v,this).toPhysicalColumn(t))}}function Fv(){const{view:t}=Ov(_v,this);if(t.isVerticallyScrollableByWindow())return!1;const e=t.getViewportHeight(),o=Ov(_v,this).countRows(),n=t.getStylesHandler().getDefaultRowHeight();let i=0,r=!1;for(let t=0;t<o;t++){var s;if(i+=(null!==(s=Ov(_v,this).getRowHeight(t))&&void 0!==s?s:n)+(0===t?1:0),i>e){r=!0;break}}return r}function Bv(t){var e;return null!==(e=Ov(_v,this).getColWidth(t,"StretchColumns"))&&void 0!==e?e:ie.j}function Wv(t,e){return Ov(_v,this).runHooks("beforeStretchingColumnWidth",t,e)}function zv(t,e,o){jv(t,e),e.set(t,o)}function jv(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Uv(t,e,o){return t.set(Gv(t,e),o),o}function $v(t,e){return t.get(Gv(t,e))}function Gv(t,e,o){if("function"==typeof t?t===e:t.has(e))return arguments.length<3?e:o;throw new TypeError("Private element is not present on this object")}var Yv=new WeakMap,Xv=new WeakMap,qv=new WeakMap,Kv=new WeakSet;class Qv extends Kt{constructor(){var t;super(...arguments),jv(this,t=Kv),t.add(this),zv(this,Yv,new Vv(this.hot)),zv(this,Xv,null),zv(this,qv,new ResizeObserver((t=>{requestAnimationFrame((()=>{var e;null!==(e=this.hot)&&void 0!==e&&e.view.isHorizontallyScrollableByWindow()&&t.forEach((t=>{let{contentRect:e}=t;null!==$v(Xv,this)&&$v(Xv,this)!==e.width&&(this.hot.refreshDimensions(),this.hot.view.adjustElementsSize()),Uv(Xv,this,e.width)}))}))})))}static get PLUGIN_KEY(){return"stretchColumns"}static get PLUGIN_PRIORITY(){return 155}static get SETTING_KEYS(){return!0}isEnabled(){return["all","last"].includes(this.hot.getSettings().stretchH)}enablePlugin(){var t=this;this.enabled||($v(Yv,this).useStrategy(this.hot.getSettings().stretchH),$v(qv,this).observe(this.hot.rootElement),this.addHook("beforeRender",(function(){for(var e=arguments.length,o=new Array(e),n=0;n<e;n++)o[n]=arguments[n];return Gv(Kv,t,Zv).call(t,...o)})),this.addHook("modifyColWidth",(function(){for(var e=arguments.length,o=new Array(e),n=0;n<e;n++)o[n]=arguments[n];return Gv(Kv,t,Jv).call(t,...o)}),10),super.enablePlugin())}updatePlugin(){$v(Yv,this).useStrategy(this.hot.getSettings().stretchH),super.updatePlugin()}disablePlugin(){super.disablePlugin(),$v(qv,this).unobserve(this.hot.rootElement)}getColumnWidth(t){return $v(Yv,this).getStretchedWidth(t)}destroy(){$v(qv,this).disconnect(),Uv(qv,this,null),Uv(Yv,this,null),super.destroy()}}function Jv(t,e,o){if(o===this.pluginName)return;const n=this.getColumnWidth(e);return"number"==typeof n?n:t}function Zv(t){t&&$v(Yv,this).refreshStretching()}function ty(t,e,o){return(e=function(t){var e=function(t){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var o=e.call(t,"string");if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[e]=o,t}function ey(t,e,o){if("function"==typeof t?t===e:t.has(e))return arguments.length<3?e:o;throw new TypeError("Private element is not present on this object")}var oy=new WeakSet;class ny extends Kt{constructor(){var t,e;super(...arguments),function(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}(t=this,e=oy),e.add(t),ty(this,"scrollbars",[]),ty(this,"clones",[]),ty(this,"lockedCollection",!1),ty(this,"freezeOverlays",!1)}static get PLUGIN_KEY(){return"touchScroll"}static get PLUGIN_PRIORITY(){return 200}static get SETTING_KEYS(){return!0}isEnabled(){return(0,Jt.yd)()}enablePlugin(){this.enabled||(this.addHook("afterViewRender",(()=>ey(oy,this,iy).call(this))),this.registerEvents(),super.enablePlugin())}updatePlugin(){this.lockedCollection=!1,super.updatePlugin()}disablePlugin(){super.disablePlugin()}registerEvents(){this.addHook("beforeTouchScroll",(()=>ey(oy,this,ry).call(this))),this.addHook("afterMomentumScroll",(()=>ey(oy,this,sy).call(this)))}}function iy(){if(this.lockedCollection)return;const{topOverlay:t,bottomOverlay:e,inlineStartOverlay:o,topInlineStartCornerOverlay:n,bottomInlineStartCornerOverlay:i}=this.hot.view._wt.wtOverlays;this.lockedCollection=!0,this.scrollbars.length=0,this.scrollbars.push(t),e.clone&&this.scrollbars.push(e),this.scrollbars.push(o),n&&this.scrollbars.push(n),i&&i.clone&&this.scrollbars.push(i),this.clones=[],t.needFullRender&&this.clones.push(t.clone.wtTable.holder.parentNode),e.needFullRender&&this.clones.push(e.clone.wtTable.holder.parentNode),o.needFullRender&&this.clones.push(o.clone.wtTable.holder.parentNode),n&&this.clones.push(n.clone.wtTable.holder.parentNode),i&&i.clone&&this.clones.push(i.clone.wtTable.holder.parentNode)}function ry(){this.freezeOverlays=!0,(0,c.z0)(this.clones,(t=>{(0,i.iQ)(t,"hide-tween")}))}function sy(){this.freezeOverlays=!1,(0,c.z0)(this.clones,(t=>{(0,i.vy)(t,"hide-tween"),(0,i.iQ)(t,"show-tween")})),this.hot._registerTimeout((()=>{(0,c.z0)(this.clones,(t=>{(0,i.vy)(t,"show-tween")}))}),400),(0,c.z0)(this.scrollbars,(t=>{t.refresh(),t.resetFixedPosition()})),this.hot.view._wt.wtOverlays.syncScrollWithMaster()}const ly="trimRows";var ay=new WeakSet;class hy extends Kt{constructor(){var t,e;super(...arguments),function(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}(t=this,e=ay),e.add(t),function(t,e,o){(e=function(t){var e=function(t){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var o=e.call(t,"string");if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[e]=o}(this,"trimmedRowsMap",null)}static get PLUGIN_KEY(){return ly}static get PLUGIN_PRIORITY(){return 330}isEnabled(){return!!this.hot.getSettings()[ly]}enablePlugin(){this.enabled||(this.trimmedRowsMap=this.hot.rowIndexMapper.registerMap("trimRows",new Ic.q),this.trimmedRowsMap.addLocalHook("init",(()=>function(t,e,o){if("function"==typeof t?t===e:t.has(e))return arguments.length<3?e:o;throw new TypeError("Private element is not present on this object")}(ay,this,cy).call(this))),super.enablePlugin())}updatePlugin(){const t=this.hot.getSettings()[ly];Array.isArray(t)&&this.hot.batchExecution((()=>{this.trimmedRowsMap.clear(),(0,c.z0)(t,(t=>{this.trimmedRowsMap.setValueAtIndex(t,!0)}))}),!0),super.updatePlugin()}disablePlugin(){this.hot.rowIndexMapper.unregisterMap("trimRows"),super.disablePlugin()}getTrimmedRows(){return this.trimmedRowsMap.getTrimmedIndexes()}trimRows(t){const e=this.getTrimmedRows(),o=this.isValidConfig(t);let n=e;o&&(n=Array.from(new Set(e.concat(t)))),!1!==this.hot.runHooks("beforeTrimRow",e,n,o)&&(o&&this.hot.batchExecution((()=>{(0,c.z0)(t,(t=>{this.trimmedRowsMap.setValueAtIndex(t,!0)}))}),!0),this.hot.runHooks("afterTrimRow",e,n,o,o&&n.length>e.length))}trimRow(){for(var t=arguments.length,e=new Array(t),o=0;o<t;o++)e[o]=arguments[o];this.trimRows(e)}untrimRows(t){const e=this.getTrimmedRows(),o=this.isValidConfig(t);let n=e;const i=this.trimmedRowsMap.getValues().slice(),r=t.length>0;o&&r&&((0,c.z0)(t,(t=>{i[t]=!1})),n=(0,c.mu)(i,((t,e,o)=>(e&&t.push(o),t)),[])),!1!==this.hot.runHooks("beforeUntrimRow",e,n,o&&r)&&(o&&r&&this.trimmedRowsMap.setValues(i),this.hot.runHooks("afterUntrimRow",e,n,o&&r,o&&n.length<e.length))}untrimRow(){for(var t=arguments.length,e=new Array(t),o=0;o<t;o++)e[o]=arguments[o];this.untrimRows(e)}isTrimmed(t){return this.trimmedRowsMap.getValueAtIndex(t)||!1}untrimAll(){this.untrimRows(this.getTrimmedRows())}isValidConfig(t){const e=this.hot.countSourceRows();return t.every((t=>Number.isInteger(t)&&t>=0&&t<e))}destroy(){super.destroy()}}function cy(){const t=this.hot.getSettings()[ly];Array.isArray(t)&&this.hot.batchExecution((()=>{(0,c.z0)(t,(t=>{this.trimmedRowsMap.setValueAtIndex(t,!0)}))}),!0)}class dy{constructor(t){var e,o,n;e=this,n="",(o=function(t){var e=function(t){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var o=e.call(t,"string");if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:e+""}(o="actionType"))in e?Object.defineProperty(e,o,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[o]=n,this.actionType=t}undo(){throw new Error("Not implemented")}redo(){throw new Error("Not implemented")}}function uy(t,e,o){return(e=function(t){var e=function(t){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var o=e.call(t,"string");if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[e]=o,t}class gy extends dy{constructor(t){let{stateBefore:e,range:o,type:n,alignment:i}=t;super("cell_alignment"),uy(this,"stateBefore",void 0),uy(this,"range",void 0),uy(this,"type",void 0),uy(this,"alignment",void 0),this.stateBefore=e,this.range=o,this.type=n,this.alignment=i}static startRegisteringEvents(t,e){t.addHook("beforeCellAlignment",((t,o,n,i)=>{e.done((()=>new gy({stateBefore:t,range:o,type:n,alignment:i})))}))}undo(t,e){(0,c.z0)(this.range,(e=>{e.forAll(((e,o)=>{e>=0&&o>=0&&t.setCellMeta(e,o,"className",this.stateBefore[e][o]||" htLeft")}))})),t.addHookOnce("afterViewRender",e),t.render()}redo(t,e){mi(this.range,this.type,this.alignment,((e,o)=>t.getCellMeta(e,o)),((e,o,n,i)=>t.setCellMeta(e,o,n,i))),t.addHookOnce("afterViewRender",e),t.render()}}function fy(t,e,o){return(e=function(t){var e=function(t){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var o=e.call(t,"string");if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[e]=o,t}class py extends dy{constructor(t){let{columns:e,finalIndex:o}=t;super("col_move"),fy(this,"columns",void 0),fy(this,"finalColumnIndex",void 0),this.columns=e.slice(),this.finalColumnIndex=o}static startRegisteringEvents(t,e){t.addHook("beforeColumnMove",((t,o)=>{!1!==t&&e.done((()=>new py({columns:t,finalIndex:o})))}))}undo(t,e){const o=t.getPlugin("manualColumnMove");t.addHookOnce("afterViewRender",e),dd(this.columns,this.finalColumnIndex,t.columnIndexMapper.getNumberOfIndexes()).reverse().forEach((t=>{let{from:e,to:n}=t;e<n&&(n-=1),o.moveColumn(n,e)})),t.render(),t.deselectCell(),t.selectColumns(this.columns[0],this.columns[0]+this.columns.length-1)}redo(t,e){const o=t.getPlugin("manualColumnMove");t.addHookOnce("afterViewRender",e),o.moveColumns(this.columns.slice(),this.finalColumnIndex),t.render(),t.deselectCell(),t.selectColumns(this.finalColumnIndex,this.finalColumnIndex+this.columns.length-1)}}function my(t,e,o){return(e=function(t){var e=function(t){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var o=e.call(t,"string");if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[e]=o,t}class wy extends dy{constructor(t){let{currentSortState:e,newSortState:o}=t;super("col_sort"),my(this,"previousSortState",void 0),my(this,"nextSortState",void 0),this.previousSortState=e,this.nextSortState=o}static startRegisteringEvents(t,e){t.addHook("beforeColumnSort",((t,o,n)=>{n&&e.done((()=>new wy({currentSortState:t,newSortState:o})))}))}undo(t,e){const o=t.getPlugin("columnSorting"),n=t.getPlugin("multiColumnSorting"),i=n.isEnabled()?n:o;this.previousSortState.length?i.sort(this.previousSortState):i.clearSort(),e()}redo(t,e){const o=t.getPlugin("columnSorting"),n=t.getPlugin("multiColumnSorting");(n.isEnabled()?n:o).sort(this.nextSortState),e()}}function by(t,e,o){return(e=function(t){var e=function(t){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var o=e.call(t,"string");if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[e]=o,t}class vy extends dy{constructor(t){let{index:e,amount:o}=t;super("insert_col"),by(this,"index",void 0),by(this,"amount",void 0),this.index=e,this.amount=o}static startRegisteringEvents(t,e){t.addHook("afterCreateCol",((t,o,n)=>{e.done((()=>new vy({index:t,amount:o})),n)}))}undo(t,e){t.addHookOnce("afterRemoveCol",e),t.alter("remove_col",this.index,this.amount,"UndoRedo.undo")}redo(t,e){t.addHookOnce("afterCreateCol",e),t.alter("insert_col_start",this.index,this.amount,"UndoRedo.redo")}}function yy(t,e,o){return(e=function(t){var e=function(t){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var o=e.call(t,"string");if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[e]=o,t}class Cy extends dy{constructor(t){let{index:e,amount:o}=t;super("insert_row"),yy(this,"index",void 0),yy(this,"amount",void 0),this.index=e,this.amount=o}static startRegisteringEvents(t,e){t.addHook("afterCreateRow",((t,o,n)=>{e.done((()=>new Cy({index:t,amount:o})),n)}))}undo(t,e){const o=t.countRows(),n=t.getSettings().minSpareRows;this.index>=o&&this.index-n<o&&(this.index-=n),t.addHookOnce("afterRemoveRow",e),t.alter("remove_row",this.index,this.amount,"UndoRedo.undo")}redo(t,e){t.addHookOnce("afterCreateRow",e),t.alter("insert_row_above",this.index,this.amount,"UndoRedo.redo")}}function Sy(t,e,o){return(e=function(t){var e=function(t){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var o=e.call(t,"string");if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[e]=o,t}class Ry extends dy{constructor(t){let{changes:e,selected:o,countCols:n,countRows:i}=t;super("change"),Sy(this,"changes",void 0),Sy(this,"selected",void 0),Sy(this,"countCols",void 0),Sy(this,"countRows",void 0),this.changes=e,this.selected=o,this.countCols=n,this.countRows=i}static startRegisteringEvents(t,e){t.addHook("beforeChange",(function(o,n){const i=o&&o.length;i&&o.find((t=>{const[,,e,o]=t;return e!==o}))&&e.done((()=>{const e=o.reduce(((t,e)=>(t.push([...e]),t)),[]);e.forEach((e=>{e[1]=t.propToCol(e[1])}));const n=i>1?this.getSelected():[[e[0][0],e[0][1]]];return new Ry({changes:e,selected:n,countCols:t.countCols(),countRows:t.countRows()})}),n)}))}undo(t,e){const o=(0,s.Go)(this.changes);for(let t=0,e=o.length;t<e;t++)o[t].splice(3,1);t.addHookOnce("afterChange",e),t.setDataAtCell(o,null,null,"UndoRedo.undo");const n=t.countRows()-this.countRows;n>0&&t.alter("remove_row",null,n,"UndoRedo.undo");const i=t.countCols()-this.countCols;i>0&&t.isColumnModificationAllowed()&&t.alter("remove_col",null,i,"UndoRedo.undo"),t.scrollToFocusedCell(),t.selectCells(this.selected,!1,!1)}redo(t,e){const o=(0,s.Go)(this.changes);for(let t=0,e=o.length;t<e;t++)o[t].splice(2,1);t.addHookOnce("afterChange",e),t.setDataAtCell(o,null,null,"UndoRedo.redo"),this.selected&&t.selectCells(this.selected,!1,!1)}}function Ey(t,e,o){return(e=function(t){var e=function(t){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var o=e.call(t,"string");if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[e]=o,t}class Ty extends dy{constructor(t){let{conditionsStack:e,previousConditionsStack:o}=t;super("filter"),Ey(this,"conditionsStack",void 0),Ey(this,"previousConditionsStack",void 0),this.conditionsStack=e,this.previousConditionsStack=o}static startRegisteringEvents(t,e){t.addHook("beforeFilter",((t,o)=>{e.done((()=>new Ty({conditionsStack:t,previousConditionsStack:o})))}))}undo(t,e){const o=t.getPlugin("filters");t.addHookOnce("afterViewRender",e),o.importConditions(this.previousConditionsStack),o.filter()}redo(t,e){const o=t.getPlugin("filters");t.addHookOnce("afterViewRender",e),o.importConditions(this.conditionsStack),o.filter()}}class xy extends dy{constructor(t){let{data:e,cellRange:o}=t;var n,i,r;super("merge_cells"),n=this,r=void 0,(i=function(t){var e=function(t){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var o=e.call(t,"string");if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:e+""}(i="cellRange"))in n?Object.defineProperty(n,i,{value:r,enumerable:!0,configurable:!0,writable:!0}):n[i]=r,this.cellRange=o,this.data=e}static startRegisteringEvents(t,e){t.addHook("beforeMergeCells",((o,n)=>{if(n)return;const i=o.getTopStartCorner(),r=o.getBottomEndCorner(),s=t.getData(i.row,i.col,r.row,r.col);e.done((()=>new xy({data:s,cellRange:o})))}))}undo(t,e){const o=t.getPlugin("mergeCells");t.addHookOnce("afterViewRender",e),o.unmergeRange(this.cellRange,!0);const n=this.cellRange.getTopStartCorner();t.populateFromArray(n.row,n.col,this.data,void 0,void 0,"MergeCells")}redo(t,e){const o=t.getPlugin("mergeCells");t.addHookOnce("afterViewRender",e),o.mergeRange(this.cellRange)}}function My(t,e,o,n,i){const r=["visualRow","visualCol","row","col","prop"],s=r.length,l=[];return(0,ut.Ti)(n,i,(n=>{(0,ut.Ti)(e,o,(e=>{const o=t.getCellMeta(e,n);if(Object.keys(o).length!==s){const t=Object.fromEntries(Object.entries(o).filter((t=>{let[e]=t;return!1===r.includes(e)})));l.push([o.visualRow,o.visualCol,t])}}))})),l}function Iy(t,e,o){return(e=function(t){var e=function(t){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var o=e.call(t,"string");if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[e]=o,t}o(3921);class Hy extends dy{constructor(t){let{index:e,indexes:o,data:n,amount:i,headers:r,columnPositions:s,rowPositions:l,fixedColumnsStart:a,removedCellMetas:h}=t;super("remove_col"),Iy(this,"index",void 0),Iy(this,"indexes",void 0),Iy(this,"data",void 0),Iy(this,"amount",void 0),Iy(this,"headers",void 0),Iy(this,"columnPositions",void 0),Iy(this,"rowPositions",void 0),Iy(this,"fixedColumnsStart",void 0),Iy(this,"removedCellMetas",void 0),this.index=e,this.indexes=o,this.data=n,this.amount=i,this.headers=r,this.columnPositions=s.slice(0),this.rowPositions=l.slice(0),this.fixedColumnsStart=a,this.removedCellMetas=h}static startRegisteringEvents(t,e){t.addHook("beforeRemoveCol",((o,n,i,r)=>{e.done((()=>{const e=t.getSourceDataArray(),i=(t.countCols()+o)%t.countCols(),r=i+n-1,s=[],l=[],a=[];return(0,ut.Ti)(e.length-1,(o=>{const n=[],l=e[o];(0,ut.Ti)(i,r,(e=>{n.push(l[t.toPhysicalColumn(e)])})),s.push(n)})),(0,ut.Ti)(n-1,(e=>{a.push(t.toPhysicalColumn(i+e))})),Array.isArray(t.getSettings().colHeaders)&&(0,ut.Ti)(n-1,(e=>{l.push(t.getSettings().colHeaders[t.toPhysicalColumn(i+e)]||null)})),new Hy({index:i,indexes:a,data:s,amount:n,headers:l,columnPositions:t.columnIndexMapper.getIndexesSequence(),rowPositions:t.rowIndexMapper.getIndexesSequence(),fixedColumnsStart:t.getSettings().fixedColumnsStart,removedCellMetas:My(t,0,t.countRows(),i,r)})}),r)}))}undo(t,e){t.getSettings().fixedColumnsStart=this.fixedColumnsStart;const o=this.indexes.slice(0).sort(),n=(t,e,n)=>n[this.indexes.indexOf(o[e])],i=this.data.length,r=[];for(let t=0;t<i;t++)r.push((0,c.YD)(this.data[t],n));const s=(0,c.YD)(this.headers,n),l=[];t.columnIndexMapper.setIndexesSequence(this.columnPositions),t.alter("insert_col_start",t.toVisualColumn(this.indexes[0]),this.indexes.length,"UndoRedo.undo"),t.batchExecution((()=>{t.rowIndexMapper.setIndexesSequence(this.rowPositions),t.columnIndexMapper.setIndexesSequence(this.columnPositions)}),!0),(0,c.z0)(t.getSourceDataArray(),((t,e)=>{(0,c.z0)(o,((o,n)=>{t[o]=r[e][n],l.push([e,o,t[o]])}))})),void 0!==this.headers&&(0,c.z0)(s,((e,n)=>{t.getSettings().colHeaders[o[n]]=e})),this.removedCellMetas.forEach((e=>{let[o,n,i]=e;t.setCellMetaObject(o,n,i)})),t.addHookOnce("afterViewRender",e),t.setSourceDataAtCell(l,null,null,"UndoRedo.undo")}redo(t,e){t.addHookOnce("afterRemoveCol",e),t.alter("remove_col",this.index,this.amount,"UndoRedo.redo")}}function Oy(t,e,o){return(e=function(t){var e=function(t){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var o=e.call(t,"string");if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[e]=o,t}class Ay extends dy{constructor(t){let{index:e,data:o,fixedRowsBottom:n,fixedRowsTop:i,rowIndexesSequence:r,removedCellMetas:s}=t;super("remove_row"),Oy(this,"index",void 0),Oy(this,"data",void 0),Oy(this,"fixedRowsBottom",void 0),Oy(this,"fixedRowsTop",void 0),Oy(this,"rowIndexesSequence",void 0),Oy(this,"removedCellMetas",void 0),this.index=e,this.data=o,this.fixedRowsBottom=n,this.fixedRowsTop=i,this.rowIndexesSequence=r,this.removedCellMetas=s}static startRegisteringEvents(t,e){t.addHook("beforeRemoveRow",((o,n,i,r)=>{e.done((()=>{const e=t.toPhysicalRow(o),i=e+n-1,r=(0,s.Go)(t.getSourceData(e,0,e+n-1,t.countSourceCols()-1));return new Ay({index:e,data:r,fixedRowsBottom:t.getSettings().fixedRowsBottom,fixedRowsTop:t.getSettings().fixedRowsTop,rowIndexesSequence:t.rowIndexMapper.getIndexesSequence(),removedCellMetas:My(t,e,i,0,t.countCols()-1)})}),r)}))}undo(t,e){const o=t.getSettings(),n=[];o.fixedRowsBottom=this.fixedRowsBottom,o.fixedRowsTop=this.fixedRowsTop,this.data.forEach(((t,e)=>{Object.keys(t).forEach((o=>{const i=parseInt(o,10);n.push([this.index+e,isNaN(i)?o:i,t[o]])}))})),t.rowIndexMapper.setIndexesSequence(this.rowIndexesSequence),t.alter("insert_row_above",t.toVisualRow(this.index),this.data.length,"UndoRedo.undo"),t.rowIndexMapper.setIndexesSequence(this.rowIndexesSequence),this.removedCellMetas.forEach((e=>{let[o,n,i]=e;t.setCellMetaObject(o,n,i)})),t.addHookOnce("afterViewRender",e),t.setSourceDataAtCell(n,null,null,"UndoRedo.undo")}redo(t,e){t.addHookOnce("afterRemoveRow",e),t.alter("remove_row",t.toVisualRow(this.index),this.data.length,"UndoRedo.redo")}}function ky(t,e,o){return(e=function(t){var e=function(t){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var o=e.call(t,"string");if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[e]=o,t}class _y extends dy{constructor(t){let{rows:e,finalIndex:o}=t;super("row_move"),ky(this,"rows",void 0),ky(this,"finalRowIndex",void 0),this.rows=e.slice(),this.finalRowIndex=o}static startRegisteringEvents(t,e){t.addHook("beforeRowMove",((t,o)=>{!1!==t&&e.done((()=>new _y({rows:t,finalIndex:o})))}))}undo(t,e){const o=t.getPlugin("manualRowMove");t.addHookOnce("afterViewRender",e),dd(this.rows,this.finalRowIndex,t.rowIndexMapper.getNumberOfIndexes()).reverse().forEach((t=>{let{from:e,to:n}=t;e<n&&(n-=1),o.moveRow(n,e)})),t.render(),t.deselectCell(),t.selectRows(this.rows[0],this.rows[0]+this.rows.length-1)}redo(t,e){const o=t.getPlugin("manualRowMove");t.addHookOnce("afterViewRender",e),o.moveRows(this.rows.slice(),this.finalRowIndex),t.render(),t.deselectCell(),t.selectRows(this.finalRowIndex,this.finalRowIndex+this.rows.length-1)}}class Ny extends dy{constructor(t){let{cellRange:e}=t;var o,n,i;super("unmerge_cells"),o=this,i=void 0,(n=function(t){var e=function(t){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var o=e.call(t,"string");if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:e+""}(n="cellRange"))in o?Object.defineProperty(o,n,{value:i,enumerable:!0,configurable:!0,writable:!0}):o[n]=i,this.cellRange=e}static startRegisteringEvents(t,e){t.addHook("afterUnmergeCells",((t,o)=>{o||e.done((()=>new Ny({cellRange:t})))}))}undo(t,e){const o=t.getPlugin("mergeCells");t.addHookOnce("afterViewRender",e),o.mergeRange(this.cellRange,!0)}redo(t,e){const o=t.getPlugin("mergeCells");t.addHookOnce("afterViewRender",e),o.unmergeRange(this.cellRange,!0),t.render()}}function Py(t,e,o){return(e=function(t){var e=function(t){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var o=e.call(t,"string");if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[e]=o,t}function Ly(t,e,o){if("function"==typeof t?t===e:t.has(e))return arguments.length<3?e:o;throw new TypeError("Private element is not present on this object")}const Dy="undoRedo";Z.R.getSingleton().register("beforeUndo"),Z.R.getSingleton().register("afterUndo"),Z.R.getSingleton().register("beforeRedo"),Z.R.getSingleton().register("afterRedo");const Vy=new Set;var Fy=new WeakSet;class By extends Kt{static get PLUGIN_KEY(){return"undoRedo"}static get PLUGIN_PRIORITY(){return 1e3}static get SETTING_KEYS(){return!0}constructor(t){var e,o,n,i;super(t),function(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}(n=this,i=Fy),i.add(n),Py(this,"doneActions",[]),Py(this,"undoneActions",[]),Py(this,"ignoreNewActions",!1),e=t,o=this,[gy,py,wy,vy,Cy,Ry,Ty,xy,Hy,Ay,_y,Ny].forEach((t=>t.startRegisteringEvents(e,o)))}isEnabled(){return!!this.hot.getSettings().undo}enablePlugin(){var t=this;this.enabled||(this.addHook("afterChange",(function(){for(var e=arguments.length,o=new Array(e),n=0;n<e;n++)o[n]=arguments[n];return Ly(Fy,t,Wy).call(t,...o)})),this.registerShortcuts(),Ly(Fy,this,zy).call(this),super.enablePlugin())}disablePlugin(){super.disablePlugin(),this.clear(),this.unregisterShortcuts(),Ly(Fy,this,jy).call(this)}registerShortcuts(){const t=this.hot.getShortcutManager().getContext("grid"),e={runOnlyIf:t=>!t.altKey,group:Dy};t.addShortcuts([{keys:[["Control/Meta","z"]],callback:()=>{this.undo()}},{keys:[["Control/Meta","y"],["Control/Meta","Shift","z"]],callback:()=>{this.redo()}}],e)}unregisterShortcuts(){this.hot.getShortcutManager().getContext("grid").removeShortcutsByGroup(Dy)}done(t,e){if(this.ignoreNewActions)return;if("UndoRedo.undo"===e||"UndoRedo.redo"===e||"auto"===e)return;const o=this.doneActions.slice();if(!1===this.hot.runHooks("beforeUndoStackChange",o,e))return;const n=t(),i=this.undoneActions.slice();this.doneActions.push(n),this.hot.runHooks("afterUndoStackChange",o,this.doneActions.slice()),this.hot.runHooks("beforeRedoStackChange",i),this.undoneActions.length=0,this.hot.runHooks("afterRedoStackChange",i,this.undoneActions.slice())}undo(){if(!this.isUndoAvailable())return;const t=this.doneActions.slice();this.hot.runHooks("beforeUndoStackChange",t);const e=this.doneActions.pop();this.hot.runHooks("afterUndoStackChange",t,this.doneActions.slice());const o=(0,s.Go)(e);if(!1===this.hot.runHooks("beforeUndo",o))return;this.ignoreNewActions=!0;const n=this.undoneActions.slice();this.hot.runHooks("beforeRedoStackChange",n),e.undo(this.hot,(()=>{this.ignoreNewActions=!1,this.undoneActions.push(e)})),this.hot.runHooks("afterRedoStackChange",n,this.undoneActions.slice()),this.hot.runHooks("afterUndo",o)}redo(){if(!this.isRedoAvailable())return;const t=this.undoneActions.slice();this.hot.runHooks("beforeRedoStackChange",t);const e=this.undoneActions.pop();this.hot.runHooks("afterRedoStackChange",t,this.undoneActions.slice());const o=(0,s.Go)(e);if(!1===this.hot.runHooks("beforeRedo",o))return;this.ignoreNewActions=!0;const n=this.doneActions.slice();this.hot.runHooks("beforeUndoStackChange",n),e.redo(this.hot,(()=>{this.ignoreNewActions=!1,this.doneActions.push(e)})),this.hot.runHooks("afterUndoStackChange",n,this.doneActions.slice()),this.hot.runHooks("afterRedo",o)}isUndoAvailable(){return this.doneActions.length>0}isRedoAvailable(){return this.undoneActions.length>0}clear(){this.doneActions.length=0,this.undoneActions.length=0}destroy(){this.clear(),this.doneActions=null,this.undoneActions=null,super.destroy()}}function Wy(t,e){"loadData"===e&&this.clear()}function zy(){const t=t=>{Vy.has(t)||((0,So.R8)(nn.O`The "${t}" method is deprecated and it will be removed\x20
- from the Core API in the future. Please use the method from the UndoRedo plugin\x20
- (e.g. \`hotInstance.getPlugin("undoRedo").${t}()\`).`),Vy.add(t))};this.hot.undo=()=>{t("undo"),this.undo()},this.hot.redo=()=>{t("redo"),this.redo()},this.hot.isUndoAvailable=()=>(t("isUndoAvailable"),this.isUndoAvailable()),this.hot.isRedoAvailable=()=>(t("isRedoAvailable"),this.isRedoAvailable()),this.hot.clearUndo=()=>{t("clear"),this.clear()},this.hot.undoRedo=this}function jy(){delete this.hot.undo,delete this.hot.redo,delete this.hot.isUndoAvailable,delete this.hot.isRedoAvailable,delete this.hot.clearUndo,delete this.hot.undoRedo}function Uy(){(0,Y.VA)(M.b7),(0,Y.VA)(T),(0,Y.VA)(I),(0,Y.VA)(D),(0,Y.VA)(F),(0,Y.VA)(h),(0,Y.VA)(B),(0,Y.VA)(z),(0,Y.VA)($),(0,Y.VA)(n.t),(0,Y.VA)(G),(0,bt.TS)(Q),(0,bt.TS)(X.j),(0,bt.TS)(at),(0,bt.TS)(J),(0,bt.TS)(ct),(0,bt.TS)(q),(0,bt.TS)(ft),(0,bt.TS)(pt),(0,bt.TS)(mt),(0,bt.TS)(f.F),(0,bt.TS)(wt),(0,xt.qV)(vt),(0,xt.qV)(St),(0,xt.qV)(Ct),(0,xt.qV)(Rt),(0,xt.qV)(Tt),(0,Vt.Gk)(Mt),(0,Vt.Gk)(It),(0,Vt.Gk)(Ot),(0,Vt.Gk)(At),(0,Vt.Gk)(kt),(0,Vt.Gk)(_t),(0,Vt.Gk)(Nt),(0,Vt.Gk)(Pt),(0,Vt.Gk)(Lt.Y),(0,Vt.Gk)(Dt),(0,Ft.F3)(we),(0,Ft.F3)(_e),(0,Ft.F3)(qe),(0,Ft.F3)(yo),(0,Ft.F3)(Po),(0,Ft.F3)(En),(0,Ft.F3)(Pn),(0,Ft.F3)(Fi),(0,Ft.F3)(Qr),(0,Ft.F3)(Bs),(0,Ft.F3)(dl),(0,Ft.F3)(bl),(0,Ft.F3)(Hl),(0,Ft.F3)(ia),(0,Ft.F3)(Wc),(0,Ft.F3)(qd),(0,Ft.F3)(Hu),(0,Ft.F3)(ju),(0,Ft.F3)(ng),(0,Ft.F3)(_g),(0,Ft.F3)(df),(0,Ft.F3)(jf),(0,Ft.F3)(yp),(0,Ft.F3)(Em),(0,Ft.F3)(tw),(0,Ft.F3)(ow),(0,Ft.F3)(ob),(0,Ft.F3)(jb),(0,Ft.F3)(hv),(0,Ft.F3)(mv),(0,Ft.F3)(Qv),(0,Ft.F3)(ny),(0,Ft.F3)(hy),(0,Ft.F3)(By)}},6069:(t,e)=>{Object.prototype.toString},6080:(t,e,o)=>{var n=o(7476),i=o(9306),r=o(616),s=n(n.bind);t.exports=function(t,e){return i(t),void 0===e?t:r?s(t,e):function(){return t.apply(e,arguments)}}},6119:(t,e,o)=>{var n=o(5745),i=o(3392),r=n("keys");t.exports=function(t){return r[t]||(r[t]=i(t))}},6193:(t,e,o)=>{var n=o(9504),i=Error,r=n("".replace),s=String(new i("zxcasd").stack),l=/\n\s*at [^:]*:[^\n]*/,a=l.test(s);t.exports=function(t,e){if(a&&"string"==typeof t&&!i.prepareStackTrace)for(;e--;)t=r(t,l,"");return t}},6198:(t,e,o)=>{var n=o(8014);t.exports=function(t){return n(t.length)}},6269:t=>{t.exports={}},6279:(t,e,o)=>{var n=o(6840);t.exports=function(t,e,o){for(var i in e)n(t,i,e[i],o);return t}},6280:(t,e,o)=>{var n=o(6518),i=o(4576),r=o(8745),s=o(4601),l="WebAssembly",a=i[l],h=7!==new Error("e",{cause:7}).cause,c=function(t,e){var o={};o[t]=s(t,e,h),n({global:!0,constructor:!0,arity:1,forced:h},o)},d=function(t,e){if(a&&a[t]){var o={};o[t]=s(l+"."+t,e,h),n({target:l,stat:!0,constructor:!0,arity:1,forced:h},o)}};c("Error",(function(t){return function(e){return r(t,this,arguments)}})),c("EvalError",(function(t){return function(e){return r(t,this,arguments)}})),c("RangeError",(function(t){return function(e){return r(t,this,arguments)}})),c("ReferenceError",(function(t){return function(e){return r(t,this,arguments)}})),c("SyntaxError",(function(t){return function(e){return r(t,this,arguments)}})),c("TypeError",(function(t){return function(e){return r(t,this,arguments)}})),c("URIError",(function(t){return function(e){return r(t,this,arguments)}})),d("CompileError",(function(t){return function(e){return r(t,this,arguments)}})),d("LinkError",(function(t){return function(e){return r(t,this,arguments)}})),d("RuntimeError",(function(t){return function(e){return r(t,this,arguments)}}))},6314:t=>{t.exports=function(t){var e=[];return e.toString=function(){return this.map((function(e){var o="",n=void 0!==e[5];return e[4]&&(o+="@supports (".concat(e[4],") {")),e[2]&&(o+="@media ".concat(e[2]," {")),n&&(o+="@layer".concat(e[5].length>0?" ".concat(e[5]):""," {")),o+=t(e),n&&(o+="}"),e[2]&&(o+="}"),e[4]&&(o+="}"),o})).join("")},e.i=function(t,o,n,i,r){"string"==typeof t&&(t=[[null,t,void 0]]);var s={};if(n)for(var l=0;l<this.length;l++){var a=this[l][0];null!=a&&(s[a]=!0)}for(var h=0;h<t.length;h++){var c=[].concat(t[h]);n&&s[c[0]]||(void 0!==r&&(void 0===c[5]||(c[1]="@layer".concat(c[5].length>0?" ".concat(c[5]):""," {").concat(c[1],"}")),c[5]=r),o&&(c[2]?(c[1]="@media ".concat(c[2]," {").concat(c[1],"}"),c[2]=o):c[2]=o),i&&(c[4]?(c[1]="@supports (".concat(c[4],") {").concat(c[1],"}"),c[4]=i):c[4]="".concat(i)),e.push(c))}},e}},6319:(t,e,o)=>{var n=o(8551),i=o(9539);t.exports=function(t,e,o,r){try{return r?e(n(o)[0],o[1]):e(o)}catch(e){i(t,"throw",e)}}},6368:(t,e,o)=>{var n=o(6518),i=o(4576),r=o(9225).clear;n({global:!0,bind:!0,enumerable:!0,forced:i.clearImmediate!==r},{clearImmediate:r})},6395:t=>{t.exports=!1},6396:(t,e,o)=>{o.d(e,{ML:()=>f,NB:()=>m,Qz:()=>l,_e:()=>p,ay:()=>s,f7:()=>w}),o(6280),o(4114),o(7642),o(8004),o(3853),o(5876),o(2475),o(5024),o(1698),o(8992),o(7550);var n=o(4814),i=o(7325),r=o(5615);const s=0,l=1,a=2,h=3,c=[h,a],d=[["number"],["number","string"],["number","undefined"],["number","string","undefined"]],u=Symbol("root"),g=Symbol("child");function f(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:u;if(e!==u&&e!==g)throw new Error("The second argument is used internally only and cannot be overwritten.");const o=Array.isArray(t),i=e===u;let r=s;if(o){const e=t[0];0===t.length?r=l:i&&e instanceof n.A?r=h:i&&Array.isArray(e)?r=f(e,g):t.length>=2&&t.length<=4&&!t.some(((t,e)=>!d[e].includes(typeof t)))&&(r=a)}return r}function p(t){let{createCellCoords:e,createCellRange:o,keepDirection:n=!1,propToCol:i}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!c.includes(t))throw new Error("Unsupported selection ranges schema type was provided.");return function(s){const l=t===h;let a=l?s.from.row:s[0],c=l?s.from.col:s[1],d=l?s.to.row:s[2],u=l?s.to.col:s[3];if("function"==typeof i&&("string"==typeof c&&(c=i(c)),"string"==typeof u&&(u=i(u))),(0,r.b0)(d)&&(d=a),(0,r.b0)(u)&&(u=c),!n){const t=a,e=c,o=d,n=u;a=Math.min(t,o),c=Math.min(e,n),d=Math.max(t,o),u=Math.max(e,n)}const g=e(a,c),f=e(d,u);return o(g,g,f)}}function m(t){const e=f(t.getSelected());if(e===s||e===l)return[];const o=p(e,{createCellCoords:t._createCellCoords.bind(t),createCellRange:t._createCellRange.bind(t)}),n=new Set;(0,i.z0)(t.getSelected(),(t=>{const{from:e,to:r}=o(t),s=Math.max(e.col,0),l=r.col-s+1;(0,i.z0)(Array.from(new Array(l),((t,e)=>s+e)),(t=>{n.has(t)||n.add(t)}))}));const r=Array.from(n).sort(((t,e)=>t-e));return(0,i.mu)(r,((t,e,o,n)=>(0!==o&&e===n[o-1]+1?t[t.length-1][1]+=1:t.push([e,1]),t)),[])}function w(t){const e=f(t.getSelected());if(e===s||e===l)return[];const o=p(e,{createCellCoords:t._createCellCoords.bind(t),createCellRange:t._createCellRange.bind(t)}),n=new Set;(0,i.z0)(t.getSelected(),(t=>{const{from:e,to:r}=o(t),s=Math.max(e.row,0),l=r.row-s+1;(0,i.z0)(Array.from(new Array(l),((t,e)=>s+e)),(t=>{n.has(t)||n.add(t)}))}));const r=Array.from(n).sort(((t,e)=>t-e));return(0,i.mu)(r,((t,e,o,n)=>(0!==o&&e===n[o-1]+1?t[t.length-1][1]+=1:t.push([e,1]),t)),[])}},6422:(t,e,o)=>{o.d(e,{$o:()=>p,B6:()=>f,D9:()=>v,DY:()=>W,DZ:()=>x,H0:()=>P,Jg:()=>h,Ku:()=>D,L2:()=>b,L4:()=>E,MG:()=>S,Nb:()=>M,Nf:()=>l,PF:()=>_,Pk:()=>w,Qg:()=>I,S2:()=>F,SM:()=>C,Sb:()=>c,VN:()=>V,Vy:()=>z,Xq:()=>N,ZA:()=>u,ZW:()=>y,_R:()=>R,_h:()=>A,ax:()=>i,dV:()=>O,g:()=>s,gg:()=>r,gq:()=>L,n:()=>m,nF:()=>d,pt:()=>g,rE:()=>B,t0:()=>a,u8:()=>k,vC:()=>n,wD:()=>H,wP:()=>T});const n=t=>["tabindex",t],i=()=>["role","treegrid"],r=()=>["role","presentation"],s=()=>["role","gridcell"],l=()=>["role","rowheader"],a=()=>["role","rowgroup"],h=()=>["role","columnheader"],c=()=>["role","row"],d=()=>["role","menu"],u=()=>["role","menuitem"],g=()=>["role","menuitemcheckbox"],f=()=>["role","combobox"],p=()=>["role","listbox"],m=()=>["role","option"],w=()=>["role","checkbox"],b=()=>["scope","col"],v=()=>["scope","row"],y=()=>["type","text"],C=t=>["aria-label",t],S=()=>["aria-hidden","true"],R=()=>["aria-disabled","true"],E=()=>["aria-multiselectable","true"],T=t=>["aria-haspopup",t],x=t=>["aria-rowcount",t],M=t=>["aria-colcount",t],I=t=>["aria-rowindex",t],H=t=>["aria-colindex",t],O=t=>["aria-expanded",t],A=t=>["aria-sort",t],k=()=>["aria-readonly","true"],_=()=>["aria-invalid","true"],N=t=>["aria-checked",t],P=()=>["aria-selected","true"],L=()=>["aria-autocomplete","list"],D=t=>["aria-controls",t],V=t=>["aria-activedescendant",t],F=t=>["aria-live",t],B=t=>["aria-relevant",t],W=t=>["aria-setsize",t],z=t=>["aria-posinset",t]},6469:(t,e,o)=>{var n=o(8227),i=o(2360),r=o(4913).f,s=n("unscopables"),l=Array.prototype;void 0===l[s]&&r(l,s,{configurable:!0,value:i(null)}),t.exports=function(t){l[s][t]=!0}},6518:(t,e,o)=>{var n=o(4576),i=o(7347).f,r=o(6699),s=o(6840),l=o(9433),a=o(7740),h=o(2796);t.exports=function(t,e){var o,c,d,u,g,f=t.target,p=t.global,m=t.stat;if(o=p?n:m?n[f]||l(f,{}):n[f]&&n[f].prototype)for(c in e){if(u=e[c],d=t.dontCallGetSet?(g=i(o,c))&&g.value:o[c],!h(p?c:f+(m?".":"#")+c,t.forced)&&void 0!==d){if(typeof u==typeof d)continue;a(u,d)}(t.sham||d&&d.sham)&&r(u,"sham",!0),s(o,c,u,t)}}},6699:(t,e,o)=>{var n=o(3724),i=o(4913),r=o(6980);t.exports=n?function(t,e,o){return i.f(t,e,r(1,o))}:function(t,e,o){return t[e]=o,t}},6706:(t,e,o)=>{var n=o(9504),i=o(9306);t.exports=function(t,e,o){try{return n(i(Object.getOwnPropertyDescriptor(t,e)[o]))}catch(t){}}},6801:(t,e,o)=>{var n=o(3724),i=o(8686),r=o(4913),s=o(8551),l=o(5397),a=o(1072);e.f=n&&!i?Object.defineProperties:function(t,e){s(t);for(var o,n=l(e),i=a(e),h=i.length,c=0;h>c;)r.f(t,o=i[c++],n[o]);return t}},6823:t=>{var e=String;t.exports=function(t){try{return e(t)}catch(t){return"Object"}}},6833:(t,e,o)=>{o.d(e,{sd:()=>w,f4:()=>m,Mt:()=>b,F3:()=>v}),o(6280);var n=o(4360),i=(o(8992),o(1454),o(1409)),r=o(3986);const s="asc",l=new Map([[s,[-1,1]],["desc",[1,-1]]]),a=t=>`The priority '${t}' is already declared in a map.`,h=t=>`The priority '${t}' is not a number.`;var c=o(5428);o(7642),o(8004),o(3853),o(5876),o(2475),o(5024),o(1698);const d=t=>`'${t}' value is already declared in a unique set.`,u=t=>`There is already registered "${t}" plugin.`,g=function(){let{errorPriorityExists:t,errorPriorityNaN:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const o=new Map;return t=(0,r.Tn)(t)?t:a,e=(0,r.Tn)(e)?e:h,{addItem:function(n,r){if(!(0,i.kf)(n))throw new Error(e(n));if(o.has(n))throw new Error(t(n));o.set(n,r)},getItems:function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:s;const[e,n]=l.get(t)||l.get(s);return[...o].sort(((t,o)=>t[0]<o[0]?e:n)).map((t=>t[1]))}}}({errorPriorityExists:t=>`There is already registered plugin on priority "${t}".`,errorPriorityNaN:t=>`The priority "${t}" is not a number.`}),f=function(){let{errorItemExists:t}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const e=new Set;return t=(0,r.Tn)(t)?t:d,{addItem:function(o){if(e.has(o))throw new Error(t(o));e.add(o)},clear:function(){e.clear()},getItems:function(){return[...e]}}}({errorItemExists:u}),p=(0,c.u)({errorIdExists:u});function m(){return[...g.getItems(),...f.getItems()]}function w(t){const e=(0,n.Ob)(t);return p.getItem(e)}function b(t){return!!w(t)}function v(t,e,o){[t,e,o]=function(t,e,o){return"function"==typeof t&&(t=(e=t).PLUGIN_KEY,o=e.PLUGIN_PRIORITY),[t,e,o]}(t,e,o),void 0===w(t)&&function(t,e,o){const i=(0,n.Ob)(t);if(p.hasItem(i))throw new Error(u(i));void 0===o?f.addItem(i):g.addItem(o,i),p.addItem(i,e)}(t,e,o)}},6837:t=>{var e=TypeError;t.exports=function(t){if(t>9007199254740991)throw e("Maximum allowed index exceeded");return t}},6840:(t,e,o)=>{var n=o(4901),i=o(4913),r=o(283),s=o(9433);t.exports=function(t,e,o,l){l||(l={});var a=l.enumerable,h=void 0!==l.name?l.name:e;if(n(o)&&r(o,h,l),l.global)a?t[e]=o:s(e,o);else{try{l.unsafe?t[e]&&(a=!0):delete t[e]}catch(t){}a?t[e]=o:i.f(t,e,{value:o,enumerable:!1,configurable:!l.nonConfigurable,writable:!l.nonWritable})}return t}},6933:(t,e,o)=>{var n=o(9504),i=o(4376),r=o(4901),s=o(2195),l=o(655),a=n([].push);t.exports=function(t){if(r(t))return t;if(i(t)){for(var e=t.length,o=[],n=0;n<e;n++){var h=t[n];"string"==typeof h?a(o,h):"number"!=typeof h&&"Number"!==s(h)&&"String"!==s(h)||a(o,l(h))}var c=o.length,d=!0;return function(t,e){if(d)return d=!1,e;if(i(this))return e;for(var n=0;n<c;n++)if(o[n]===t)return e}}}},6955:(t,e,o)=>{var n=o(2140),i=o(4901),r=o(2195),s=o(8227)("toStringTag"),l=Object,a="Arguments"===r(function(){return arguments}());t.exports=n?r:function(t){var e,o,n;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(o=function(t,e){try{return t[e]}catch(t){}}(e=l(t),s))?o:a?r(e):"Object"===(n=r(e))&&i(e.callee)?"Arguments":n}},6969:(t,e,o)=>{var n=o(2777),i=o(757);t.exports=function(t){var e=n(t,"string");return i(e)?e:e+""}},6980:t=>{t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},7040:(t,e,o)=>{var n=o(4495);t.exports=n&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},7055:(t,e,o)=>{var n=o(9504),i=o(9039),r=o(2195),s=Object,l=n("".split);t.exports=i((function(){return!s("z").propertyIsEnumerable(0)}))?function(t){return"String"===r(t)?l(t,""):s(t)}:s},7080:(t,e,o)=>{var n=o(4402).has;t.exports=function(t){return n(t),t}},7145:(t,e,o)=>{var n=o(6518),i=o(9504),r=o(9306),s=o(5397),l=o(5370),a=o(4124),h=o(6469),c=Array,d=i(a("Array","sort"));n({target:"Array",proto:!0},{toSorted:function(t){void 0!==t&&r(t);var e=s(this),o=l(c,e);return d(o,t)}}),h("toSorted")},7325:(t,e,o)=>{function n(t){const e=t.length;let o=0;for(;o<e;)t[o]=[t[o]],o+=1}function i(t,e){const o=e.length;let n=0;for(;n<o;)t.push(e[n]),n+=1}function r(t){const e=[];if(!t||0===t.length||!t[0]||0===t[0].length)return e;const o=t.length,n=t[0].length;for(let i=0;i<o;i++)for(let o=0;o<n;o++)e[o]||(e[o]=[]),e[o][i]=t[i][o];return e}function s(t,e,o,n){let i=-1,r=t,s=o;Array.isArray(t)||(r=Array.from(t));const l=r.length;for(n&&l&&(i+=1,s=r[i]),i+=1;i<l;)s=e(s,r[i],i,r),i+=1;return s}function l(t,e){let o=0,n=t;Array.isArray(t)||(n=Array.from(t));const i=n.length,r=[];let s=-1;for(;o<i;){const t=n[o];e(t,o,n)&&(s+=1,r[s]=t),o+=1}return r}function a(t,e){let o=0,n=t;Array.isArray(t)||(n=Array.from(t));const i=n.length,r=[];let s=-1;for(;o<i;){const t=n[o];s+=1,r[s]=e(t,o,n),o+=1}return r}function h(t,e){let o=0,n=t;Array.isArray(t)||(n=Array.from(t));const i=n.length;for(;o<i&&!1!==e(n[o],o,n);)o+=1;return t}function c(t){const e=[];return h(t,(t=>{-1===e.indexOf(t)&&e.push(t)})),e}function d(){for(var t=arguments.length,e=new Array(t),o=0;o<t;o++)e[o]=arguments[o];const[n,...i]=[...e];let r=n;return h(i,(t=>{r=r.filter((e=>!t.includes(e)))})),r}function u(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:" ";return t.split(e)}o.d(e,{Gn:()=>u,Sh:()=>i,YD:()=>a,Zz:()=>n,fg:()=>d,h9:()=>r,jF:()=>c,mu:()=>s,y0:()=>l,z0:()=>h}),o(4114),o(7642),o(8004),o(3853),o(5876),o(2475),o(5024),o(1698),o(8992),o(4520)},7347:(t,e,o)=>{var n=o(3724),i=o(9565),r=o(8773),s=o(6980),l=o(5397),a=o(6969),h=o(9297),c=o(5917),d=Object.getOwnPropertyDescriptor;e.f=n?d:function(t,e){if(t=l(t),e=a(e),c)try{return d(t,e)}catch(t){}if(h(t,e))return s(!i(r.f,t,e),t[e])}},7400:(t,e,o)=>{o.d(e,{A:()=>b});var n=o(1601),i=o.n(n),r=o(6314),s=o.n(r),l=o(4417),a=o.n(l),h=new URL(o(7026),o.b),c=new URL(o(2608),o.b),d=new URL(o(500),o.b),u=new URL(o(7698),o.b),g=s()(i()),f=a()(h),p=a()(c),m=a()(d),w=a()(u);g.push([t.id,`@charset "UTF-8";\n /*!\n * Copyright (c) HANDSONCODE sp. z o. o.\n *\n * HANDSONTABLE is a software distributed by HANDSONCODE sp. z o. o., a Polish corporation based in\n * Gdynia, Poland, at Aleja Zwyciestwa 96-98, registered by the District Court in Gdansk under number\n * 538651, EU tax ID number: PL5862294002, share capital: PLN 62,800.00.\n *\n * This software is protected by applicable copyright laws, including international treaties, and dual-\n * licensed - depending on whether your use for commercial purposes, meaning intended for or\n * resulting in commercial advantage or monetary compensation, or not.\n *\n * If your use is strictly personal or solely for evaluation purposes, meaning for the purposes of testing\n * the suitability, performance, and usefulness of this software outside the production environment,\n * you agree to be bound by the terms included in the "handsontable-non-commercial-license.pdf" file.\n *\n * Your use of this software for commercial purposes is subject to the terms included in an applicable\n * license agreement.\n *\n * In any case, you must not make any such use of this software as to develop software which may be\n * considered competitive with this software.\n *\n * UNLESS EXPRESSLY AGREED OTHERWISE, HANDSONCODE PROVIDES THIS SOFTWARE ON AN "AS IS"\n * BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, AND IN NO EVENT AND UNDER NO\n * LEGAL THEORY, SHALL HANDSONCODE BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY DIRECT,\n * INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY CHARACTER ARISING FROM\n * USE OR INABILITY TO USE THIS SOFTWARE.\n *\n * Version: 15.3.0\n * Release date: 29/04/2025 (built at 24/04/2025 10:59:25)\n */.handsontable .table td,.handsontable .table th{border-top:none}.handsontable tr{background:#fff}.handsontable td{background-color:inherit}.handsontable .table caption+thead tr:first-child td,.handsontable .table caption+thead tr:first-child th,.handsontable .table colgroup+thead tr:first-child td,.handsontable .table colgroup+thead tr:first-child th,.handsontable .table thead:first-child tr:first-child td,.handsontable .table thead:first-child tr:first-child th{border-top:1px solid #ccc}.handsontable .table-bordered{border:0;border-collapse:separate}.handsontable .table-bordered td,.handsontable .table-bordered th{border-left:none}.handsontable .table-bordered td:first-child,.handsontable .table-bordered th:first-child{border-left:1px solid #ccc}.handsontable .table>tbody>tr>td,.handsontable .table>tbody>tr>th,.handsontable .table>tfoot>tr>td,.handsontable .table>tfoot>tr>th,.handsontable .table>thead>tr>td,.handsontable .table>thead>tr>th{line-height:21px;padding:0}.col-lg-1.handsontable,.col-lg-10.handsontable,.col-lg-11.handsontable,.col-lg-12.handsontable,.col-lg-2.handsontable,.col-lg-3.handsontable,.col-lg-4.handsontable,.col-lg-5.handsontable,.col-lg-6.handsontable,.col-lg-7.handsontable,.col-lg-8.handsontable,.col-lg-9.handsontable,.col-md-1.handsontable,.col-md-10.handsontable,.col-md-11.handsontable,.col-md-12.handsontable,.col-md-2.handsontable,.col-md-3.handsontable,.col-md-4.handsontable,.col-md-5.handsontable,.col-md-6.handsontable,.col-md-7.handsontable,.col-md-8.handsontable,.col-md-9.handsontable .col-sm-1.handsontable,.col-sm-10.handsontable,.col-sm-11.handsontable,.col-sm-12.handsontable,.col-sm-2.handsontable,.col-sm-3.handsontable,.col-sm-4.handsontable,.col-sm-5.handsontable,.col-sm-6.handsontable,.col-sm-7.handsontable,.col-sm-8.handsontable,.col-sm-9.handsontable .col-xs-1.handsontable,.col-xs-10.handsontable,.col-xs-11.handsontable,.col-xs-12.handsontable,.col-xs-2.handsontable,.col-xs-3.handsontable,.col-xs-4.handsontable,.col-xs-5.handsontable,.col-xs-6.handsontable,.col-xs-7.handsontable,.col-xs-8.handsontable,.col-xs-9.handsontable{padding-left:0;padding-right:0}.handsontable .table-striped>tbody>tr:nth-of-type(2n){background-color:#fff}.handsontable .hide{display:none}.handsontable .relative{position:relative}.handsontable .wtHider{position:relative;width:0}.handsontable .wtSpreader{height:auto;position:relative;width:0}.handsontable div,.handsontable input,.handsontable table,.handsontable tbody,.handsontable td,.handsontable textarea,.handsontable th,.handsontable thead{box-sizing:content-box;-webkit-box-sizing:content-box;-moz-box-sizing:content-box}.handsontable input,.handsontable textarea{min-height:auto}.handsontable table.htCore{border-collapse:separate;border-spacing:0;border-width:0;cursor:default;margin:0;max-height:none;max-width:none;outline-width:0;table-layout:fixed;width:0}.handsontable col,.handsontable col.rowHeader{width:50px}.handsontable td,.handsontable th{background-color:#fff;border-bottom:1px solid #ccc;border-left-width:0;border-right:1px solid #ccc;border-top-width:0;empty-cells:show;height:22px;line-height:21px;outline:none;outline-width:0;overflow:hidden;padding:0 4px;vertical-align:top;white-space:pre-wrap}[dir=rtl].handsontable td,[dir=rtl].handsontable th{border-left:1px solid #ccc;border-right-width:0}.handsontable th:last-child{border-bottom:1px solid #ccc;border-left:none;border-right:1px solid #ccc}[dir=rtl].handsontable th:last-child{border-left:1px solid #ccc;border-right:none}.handsontable td:first-of-type,.handsontable th:first-child{border-left:1px solid #ccc}[dir=rtl].handsontable td:first-of-type,[dir=rtl].handsontable th:first-child{border-right:1px solid #ccc}.handsontable .ht_clone_top th:nth-child(2){border-left-width:0;border-right:1px solid #ccc}[dir=rtl].handsontable .ht_clone_top th:nth-child(2){border-left:1px solid #ccc;border-right-width:0}.handsontable.htRowHeaders thead tr th:nth-child(2){border-left:1px solid #ccc}[dir=rtl].handsontable.htRowHeaders thead tr th:nth-child(2){border-right:1px solid #ccc}.handsontable tr:first-child td,.handsontable tr:first-child th{border-top:1px solid #ccc}.ht_master:not(.innerBorderInlineStart):not(.emptyColumns) tbody tr th,.ht_master:not(.innerBorderInlineStart):not(.emptyColumns) thead tr th:first-child,.ht_master:not(.innerBorderInlineStart):not(.emptyColumns)~.handsontable:not(.htGhostTable) tbody tr th,.ht_master:not(.innerBorderInlineStart):not(.emptyColumns)~.handsontable:not(.ht_clone_top):not(.htGhostTable) thead tr th:first-child{border-left:1px solid #ccc;border-right-width:0}[dir=rtl].ht_master:not(.innerBorderInlineStart):not(.emptyColumns) tbody tr th,[dir=rtl].ht_master:not(.innerBorderInlineStart):not(.emptyColumns) thead tr th:first-child,[dir=rtl].ht_master:not(.innerBorderInlineStart):not(.emptyColumns)~.handsontable:not(.htGhostTable) tbody tr th,[dir=rtl].ht_master:not(.innerBorderInlineStart):not(.emptyColumns)~.handsontable:not(.ht_clone_top):not(.htGhostTable) thead tr th:first-child{border-left-width:0;border-right:1px solid #ccc}.ht_master:not(.innerBorderTop):not(.innerBorderBottom) thead tr.lastChild th,.ht_master:not(.innerBorderTop):not(.innerBorderBottom) thead tr:last-child th,.ht_master:not(.innerBorderTop):not(.innerBorderBottom)~.handsontable thead tr.lastChild th,.ht_master:not(.innerBorderTop):not(.innerBorderBottom)~.handsontable thead tr:last-child th{border-bottom-width:0}.handsontable th{background-color:#f0f0f0;color:#222;font-weight:400;text-align:center;white-space:nowrap}.handsontable thead th{padding:0}.handsontable th.active{background-color:#ccc}.handsontable thead th .relative{padding:2px 4px}.handsontable span.colHeader{display:inline-block;line-height:1.1}.handsontable .wtBorder{font-size:0;position:absolute}.handsontable .wtBorder.hidden{display:none!important}.handsontable .wtBorder.current{z-index:10}.handsontable .wtBorder.area{z-index:8}.handsontable .wtBorder.fill{z-index:6}.handsontable .wtBorder.corner{cursor:crosshair;font-size:0}.ht_clone_master{z-index:100}.ht_clone_inline_start{z-index:120}.ht_clone_bottom{z-index:130}.ht_clone_bottom_inline_start_corner{z-index:150}.ht_clone_top{z-index:160}.ht_clone_top_inline_start_corner{z-index:180}.handsontable col.hidden{width:0!important}.handsontable tr.hidden,.handsontable tr.hidden td,.handsontable tr.hidden th{display:none}.ht_clone_bottom,.ht_clone_inline_start,.ht_clone_top,.ht_master{overflow:hidden}.ht_master .wtHolder{overflow:auto}.handsontable .ht_clone_inline_start table.htCore>thead,.handsontable .ht_master table.htCore>tbody>tr>th,.handsontable .ht_master table.htCore>thead{visibility:hidden}.ht_clone_bottom .wtHolder,.ht_clone_inline_start .wtHolder,.ht_clone_top .wtHolder{overflow:hidden}.handsontable{color:#373737;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Helvetica Neue,Arial,sans-serif;font-size:13px;font-weight:400;position:relative;touch-action:manipulation}.handsontable a{color:#104acc}.handsontable.htAutoSize{left:-99000px;position:absolute;top:-99000px;visibility:hidden}.handsontable td.htInvalid{background-color:#ffbeba!important}.handsontable td.htNoWrap{white-space:nowrap}.handsontable td.invisibleSelection,.handsontable th.invisibleSelection{outline:none}.handsontable td.invisibleSelection::selection,.handsontable th.invisibleSelection::selection{background:hsla(0,0%,100%,0)}.hot-display-license-info{color:#373737;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Helvetica Neue,Arial,sans-serif;font-size:10px;font-weight:400;padding:5px 0 3px;text-align:left}.hot-display-license-info a{color:#104acc;font-size:10px}.handsontable .htFocusCatcher{border:0;height:0;margin:0;opacity:0;padding:0;position:absolute;width:0;z-index:-1}.handsontable .manualColumnResizer{cursor:col-resize;height:25px;position:absolute;top:0;width:5px;z-index:210}.handsontable .manualRowResizer{cursor:row-resize;height:5px;left:0;position:absolute;width:50px;z-index:210}.handsontable .manualColumnResizer.active,.handsontable .manualColumnResizer:hover,.handsontable .manualRowResizer.active,.handsontable .manualRowResizer:hover{background-color:#34a9db}.handsontable .manualColumnResizerGuide{background-color:#34a9db;border-left:none;border-right:1px dashed #777;display:none;margin-left:5px;margin-right:unset;position:absolute;right:unset;top:0;width:0}[dir=rtl].handsontable .manualColumnResizerGuide{border-left:1px dashed #777;border-right:none;left:unset;margin-left:unset;margin-right:5px}.handsontable .manualRowResizerGuide{background-color:#34a9db;border-bottom:1px dashed #777;bottom:0;display:none;height:0;left:0;margin-top:5px;position:absolute}.handsontable .manualColumnResizerGuide.active,.handsontable .manualRowResizerGuide.active{display:block;z-index:209}.handsontable td.area,.handsontable td.area-1,.handsontable td.area-2,.handsontable td.area-3,.handsontable td.area-4,.handsontable td.area-5,.handsontable td.area-6,.handsontable td.area-7{position:relative}.handsontable td.area-1:before,.handsontable td.area-2:before,.handsontable td.area-3:before,.handsontable td.area-4:before,.handsontable td.area-5:before,.handsontable td.area-6:before,.handsontable td.area-7:before,.handsontable td.area:before{background:#005eff;bottom:0;content:"";left:0;position:absolute;right:0;top:0}.handsontable td.area:before{opacity:.1}.handsontable td.area-1:before{opacity:.2}.handsontable td.area-2:before{opacity:.27}.handsontable td.area-3:before{opacity:.35}.handsontable td.area-4:before{opacity:.41}.handsontable td.area-5:before{opacity:.47}.handsontable td.area-6:before{opacity:.54}.handsontable td.area-7:before{opacity:.58}.handsontable tbody th.current,.handsontable thead th.current{box-shadow:inset 0 0 0 2px #4b89ff}.handsontable tbody th.ht__highlight,.handsontable thead th.ht__highlight{background-color:#dcdcdc}.handsontable tbody th.ht__active_highlight,.handsontable thead th.ht__active_highlight{background-color:#8eb0e7;color:#000}.handsontableInput{background-color:#fff;border:none;border-radius:0;box-shadow:inset 0 0 0 2px #5292f7;box-sizing:border-box!important;color:#000;display:block;font-family:inherit;font-size:inherit;line-height:21px;margin:0;outline-width:0;padding:1px 5px 0;resize:none}.handsontableInput:focus{outline:none}.handsontableInputHolder{left:0;position:absolute;top:0}.htSelectEditor{position:absolute;select{-webkit-appearance:menulist-button!important;border:2px solid #4b89ff;box-sizing:border-box!important;height:100%;width:100%}}.htSelectEditor select:focus{outline:none}.htSelectEditor .htAutocompleteArrow{display:none}.handsontable .htDimmed{color:#777}.handsontable .htSubmenu{position:relative}.handsontable .htSubmenu :after{color:#777;content:"▶";font-size:9px;position:absolute;right:5px}[dir=rtl].handsontable .htSubmenu :after{content:""}[dir=rtl].handsontable .htSubmenu :before{color:#777;content:"◀";font-size:9px;left:5px;position:absolute}.handsontable .htLeft{text-align:left}.handsontable .htCenter{text-align:center}.handsontable .htRight{text-align:right}.handsontable .htJustify{text-align:justify}.handsontable .htTop{vertical-align:top}.handsontable .htMiddle{vertical-align:middle}.handsontable .htBottom{vertical-align:bottom}.handsontable .htPlaceholder{color:#999}.handsontable.listbox{margin:0}.handsontable.listbox .ht_master table{background:#fff;border:1px solid #ccc;border-collapse:separate}.handsontable.listbox td,.handsontable.listbox th,.handsontable.listbox tr:first-child td,.handsontable.listbox tr:first-child th,.handsontable.listbox tr:last-child th{border-color:transparent!important}.handsontable.listbox td,.handsontable.listbox th{text-overflow:ellipsis;white-space:nowrap}.handsontable.listbox td.htDimmed{color:inherit;cursor:default;font-style:inherit}.handsontable.listbox .wtBorder{visibility:hidden}.handsontable.listbox tr td.current,.handsontable.listbox tr:hover td{background:#eee}.ht_editor_hidden{z-index:-1}.ht_editor_visible{z-index:200}.handsontable td.htSearchResult{background:#fcedd9;color:#583707}.handsontable.mobile,.handsontable.mobile .wtHolder{-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-tap-highlight-color:rgba(0,0,0,0);-webkit-overflow-scrolling:touch}.handsontable.mobile .handsontableInput:focus{-webkit-appearance:none;-webkit-box-shadow:inset 0 0 0 2px #5292f7;-moz-box-shadow:inset 0 0 0 2px #5292f7;box-shadow:inset 0 0 0 2px #5292f7}.handsontable .bottomSelectionHandle,.handsontable .bottomSelectionHandle-HitArea,.handsontable .topSelectionHandle,.handsontable .topSelectionHandle-HitArea{left:-10000px;right:unset;top:-10000px;z-index:9999}[dir=rtl].handsontable .bottomSelectionHandle,[dir=rtl].handsontable .bottomSelectionHandle-HitArea,[dir=rtl].handsontable .topSelectionHandle,[dir=rtl].handsontable .topSelectionHandle-HitArea{left:unset;right:-10000px}.handsontable.hide-tween{-webkit-animation:opacity-hide .3s;animation:opacity-hide .3s;animation-fill-mode:forwards;-webkit-animation-fill-mode:forwards}.handsontable.show-tween{-webkit-animation:opacity-show .3s;animation:opacity-show .3s;animation-fill-mode:forwards;-webkit-animation-fill-mode:forwards}.handsontable .htAutocompleteArrow{color:#bbb;cursor:default;float:right;font-size:10px;text-align:center;width:16px}[dir=rtl].handsontable .htAutocompleteArrow{float:left}.handsontable td.htInvalid .htAutocompleteArrow{color:#555}.handsontable td.htInvalid .htAutocompleteArrow:hover{color:#1a1a1a}.handsontable td .htAutocompleteArrow:hover{color:#777}.handsontable td.area .htAutocompleteArrow{color:#d3d3d3}.handsontable .htCheckboxRendererInput.noValue{opacity:.5}.handsontable .htCheckboxRendererLabel{cursor:pointer;display:inline-block;font-size:inherit;vertical-align:middle}.handsontable .htCheckboxRendererLabel.fullWidth{width:100%}.handsontable .collapsibleIndicator{background:#eee;border:1px solid #a6a6a6;border-radius:10px;-webkit-box-shadow:0 0 0 6px #eee;-moz-box-shadow:0 0 0 6px #eee;box-shadow:0 0 0 3px #eee;color:#222;cursor:pointer;font-size:10px;height:10px;left:unset;line-height:8px;position:absolute;right:5px;text-align:center;top:50%;transform:translateY(-50%);width:10px}[dir=rtl].handsontable .collapsibleIndicator{left:5px;right:unset}.handsontable[dir=ltr] thead th:has(.collapsibleIndicator) div.htRight span.colHeader{margin-right:20px}.handsontable[dir=rtl] thead th:has(.collapsibleIndicator) div.htLeft span.colHeader{margin-left:20px}.handsontable .columnSorting{position:relative}.handsontable[dir=ltr] div.htRight span[class*=ascending],.handsontable[dir=ltr] div.htRight span[class*=descending]{margin-left:-10px;margin-right:10px}.handsontable[dir=rtl] div.htLeft span[class*=ascending],.handsontable[dir=rtl] div.htLeft span[class*=descending]{margin-left:10px;margin-right:-10px}.handsontable[dir=ltr] div.htRight span[class*=ascending]:only-child,.handsontable[dir=ltr] div.htRight span[class*=descending]:only-child{margin-left:-15px;margin-right:15px}.handsontable[dir=rtl] div.htLeft span[class*=ascending]:only-child,.handsontable[dir=rtl] div.htLeft span[class*=descending]:only-child{margin-left:15px;margin-right:-15px}.handsontable .columnSorting.sortAction:hover{cursor:pointer;text-decoration:underline}.handsontable span.colHeader.columnSorting:before{background-position-x:right;background-repeat:no-repeat;background-size:contain;content:"";height:10px;left:unset;margin-top:-6px;padding-left:8px;padding-right:0;position:absolute;right:-9px;top:50%;width:5px}[dir=rtl].handsontable span.colHeader.columnSorting:before{background-position-x:left;left:-9px;padding-left:0;padding-right:8px;right:unset}.handsontable span.colHeader.columnSorting.ascending:before{background-image:url(${f})}.handsontable span.colHeader.columnSorting.descending:before{background-image:url(${p})}.htGhostTable .htCore span.colHeader.columnSorting:not(.indicatorDisabled):before{content:"*";display:inline-block;padding-right:20px;position:relative}.handsontable.htGhostTable table thead th{border-bottom-width:0}.handsontable.htGhostTable table tbody tr td,.handsontable.htGhostTable table tbody tr th{border-top-width:0}.handsontable .htCommentCell{position:relative}.handsontable .htCommentCell:after{border-left:6px solid transparent;border-right:none;border-top:6px solid #000;content:"";left:unset;position:absolute;right:0;top:0}[dir=rtl].handsontable .htCommentCell:after{border-left:none;border-right:6px solid transparent;left:0;right:unset}.htCommentsContainer .htComments{display:none;position:absolute;z-index:1059}.htCommentsContainer .htCommentTextArea{-webkit-appearance:none;background-color:#fff;border:none;border-left:3px solid #ccc;box-shadow:0 1px 3px rgba(0,0,0,.118),0 1px 2px rgba(0,0,0,.239);-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;font-size:12px;height:90px;outline:0!important;padding:5px;width:215px}[dir=rtl].htCommentsContainer .htCommentTextArea{border-left:none;border-right:3px solid #ccc}.htCommentsContainer .htCommentTextArea:focus{border-left:3px solid #5292f7;border-right:none;box-shadow:0 1px 3px rgba(0,0,0,.118),0 1px 2px rgba(0,0,0,.239),inset 0 0 0 1px #5292f7}[dir=rtl].htCommentsContainer .htCommentTextArea:focus{border-left:none;border-right:3px solid #5292f7}\n/*!\n * Handsontable ContextMenu\n */.htContextMenu:not(.htGhostTable){display:none;position:absolute;z-index:1060}.htContextMenu .ht_clone_bottom,.htContextMenu .ht_clone_bottom_inline_start_corner,.htContextMenu .ht_clone_inline_start,.htContextMenu .ht_clone_top,.htContextMenu .ht_clone_top_inline_start_corner{display:none}.htContextMenu .ht_master table.htCore{border-color:#ccc;border-style:solid;border-width:1px 2px 2px 1px}[dir=rtl].htContextMenu .ht_master table.htCore{border-left-width:2px;border-right-width:1px}.htContextMenu.handsontable:focus{outline:none}.htContextMenu .wtBorder{visibility:hidden}.htContextMenu table tbody tr td{background:#fff;border-width:0;cursor:pointer;overflow:hidden;padding:4px 6px 0;text-overflow:ellipsis;white-space:nowrap}.htContextMenu table tbody tr td:first-child{border-width:0}[dir=rtl].htContextMenu table tbody tr td:first-child{border-left-width:0;border-right-width:0}.htContextMenu table tbody tr td.htDimmed{color:#323232;font-style:normal}.htContextMenu table tbody tr td.current{background:#f3f3f3}.htContextMenu table tbody tr td.htSeparator{border-top:1px solid #e6e6e6;cursor:default;height:0;padding:0}.htContextMenu table tbody tr td.htDisabled{color:#999;cursor:default}.htContextMenu table tbody tr td.htDisabled:hover{background:#fff;color:#999;cursor:default}.htContextMenu table tbody tr.htHidden{display:none}.htContextMenu table tbody tr td .htItemWrapper{margin-left:10px;margin-right:6px}[dir=rtl].htContextMenu table tbody tr td .htItemWrapper{margin-left:6px;margin-right:10px}.htContextMenu table tbody tr td div span.selected{left:4px;margin-top:-2px;position:absolute;right:0}[dir=rtl].htContextMenu table tbody tr td div span.selected{left:0;right:4px}.htContextMenu .ht_master .wtHolder{overflow:hidden}textarea.HandsontableCopyPaste{opacity:0;outline:0 none!important;overflow:hidden;position:fixed!important;right:100%!important;top:0!important}\n\n/*!\n * Handsontable DropdownMenu\n */.handsontable .changeType{background:#eee;border:1px solid #bbb;border-radius:2px;color:#bbb;float:right;font-size:9px;line-height:9px;margin:3px 1px 0 5px;padding:2px}[dir=rtl].handsontable .changeType{float:left}.handsontable[dir=rtl] .changeType{margin:3px 5px 0 1px}.handsontable .changeType:before{content:"▼ "}.handsontable .changeType:hover{border:1px solid #777;color:#777;cursor:pointer}.htDropdownMenu:not(.htGhostTable){display:none;position:absolute;z-index:1060}.htDropdownMenu .ht_clone_bottom,.htDropdownMenu .ht_clone_bottom_inline_start_corner,.htDropdownMenu .ht_clone_inline_start,.htDropdownMenu .ht_clone_top,.htDropdownMenu .ht_clone_top_inline_start_corner{display:none}.htDropdownMenu table.htCore{border-color:#ccc;border-style:solid;border-width:1px 2px 2px 1px}[dir=rtl].htDropdownMenu table.htCore{border-left-width:2px;border-right-width:1px}.htDropdownMenu.handsontable:focus{outline:none}.htDropdownMenu .wtBorder{visibility:hidden}.htDropdownMenu table tbody tr td{background:#fff;border-width:0;cursor:pointer;overflow:hidden;padding:4px 6px 0;text-overflow:ellipsis;white-space:nowrap}.htDropdownMenu table tbody tr td:first-child{border-width:0}[dir=rtl].htDropdownMenu table tbody tr td:first-child{border-left-width:0;border-right-width:0}.htDropdownMenu table tbody tr td.htDimmed{color:#323232;font-style:normal}.htDropdownMenu table tbody tr td.current{background:#e9e9e9}.htDropdownMenu table tbody tr td.htSeparator{border-top:1px solid #e6e6e6;cursor:default;height:0;padding:0}.htDropdownMenu table tbody tr td.htDisabled{color:#999}.htDropdownMenu table tbody tr td.htDisabled:hover{background:#fff;color:#999;cursor:default}.htDropdownMenu:not(.htGhostTable) table tbody tr.htHidden{display:none}.htDropdownMenu table tbody tr td .htItemWrapper,[dir=rtl].htDropdownMenu table tbody tr td .htItemWrapper{margin-left:10px;margin-right:10px}.htDropdownMenu table tbody tr td div span.selected{left:4px;margin-top:-2px;position:absolute;right:0}[dir=rtl].htDropdownMenu table tbody tr td div span.selected{left:0;right:4px}.htDropdownMenu .ht_master .wtHolder{overflow:hidden}\n\n/*!\n * Handsontable Filters\n */.htFiltersConditionsMenu:not(.htGhostTable){display:none;position:absolute;z-index:1070}.htFiltersConditionsMenu .ht_clone_bottom,.htFiltersConditionsMenu .ht_clone_bottom_inline_start_corner,.htFiltersConditionsMenu .ht_clone_inline_start,.htFiltersConditionsMenu .ht_clone_top,.htFiltersConditionsMenu .ht_clone_top_inline_start_corner{display:none}.htFiltersConditionsMenu table.htCore{border-color:#bbb;border-style:solid;border-width:1px 2px 2px 1px}.htFiltersConditionsMenu .wtBorder{visibility:hidden}.htFiltersConditionsMenu table tbody tr td{background:#fff;border-width:0;cursor:pointer;overflow:hidden;padding:4px 6px 0;text-overflow:ellipsis;white-space:nowrap}.htFiltersConditionsMenu table tbody tr td:first-child{border-width:0}[dir=rtl].htFiltersConditionsMenu table tbody tr td:first-child{border-left-width:0;border-right-width:0}.htFiltersConditionsMenu table tbody tr td.htDimmed{color:#323232;font-style:normal}.htFiltersConditionsMenu table tbody tr td.current{background:#e9e9e9}.htFiltersConditionsMenu table tbody tr td.htSeparator{border-top:1px solid #e6e6e6;height:0;padding:0}.htFiltersConditionsMenu table tbody tr td.htDisabled{color:#999}.htFiltersConditionsMenu table tbody tr td.htDisabled:hover{background:#fff;color:#999;cursor:default}.htFiltersConditionsMenu table tbody tr td .htItemWrapper{margin-left:10px;margin-right:10px}.htFiltersConditionsMenu table tbody tr td div span.selected{left:4px;margin-top:-2px;position:absolute}.htFiltersConditionsMenu .ht_master .wtHolder{overflow:hidden}.handsontable .htMenuFiltering{border-bottom:1px dotted #ccc;height:135px;overflow:hidden}.handsontable .ht_master table td.htCustomMenuRenderer{background-color:#fff;cursor:auto}.handsontable .htFiltersMenuLabel{font-size:.75em}.handsontable .htFiltersMenuActionBar{padding-bottom:3px;padding-top:10px;text-align:center}.handsontable .htFiltersMenuCondition.border{border-bottom:1px dotted #ccc!important}.handsontable .htFiltersMenuCondition .htUIInput{padding:0 0 5px}.handsontable .htFiltersMenuValue{border-bottom:1px dotted #ccc!important}.handsontable .htFiltersMenuValue .htUIMultipleSelectSearch{padding:0}.handsontable .htFiltersMenuCondition .htUIInput input,.handsontable .htFiltersMenuValue .htUIMultipleSelectSearch input{box-sizing:border-box;font-family:inherit;font-size:.75em;padding:4px;width:100%}.htUIMultipleSelect .ht_master .wtHolder{overflow:auto}.handsontable .htFiltersActive .changeType{background-color:#d2e0d9;border:1px solid #509272;color:#18804e}.handsontable .htUISelectAll{margin-left:0;margin-right:10px}[dir=rtl].handsontable .htUISelectAll{margin-left:10px;margin-right:0}.handsontable .htUIClearAll,.handsontable .htUISelectAll{display:inline-block}.handsontable .htUIClearAll a,.handsontable .htUISelectAll a{font-size:.75em}.handsontable .htUISelectionControls{text-align:right}[dir=rtl].handsontable .htUISelectionControls{text-align:left}.handsontable .htCheckboxRendererInput{display:inline-block;height:1em;margin:0 5px 0 0;vertical-align:middle}[dir=rtl].handsontable .htCheckboxRendererInput{margin-left:5px;margin-right:0}.handsontable .htUIInput{padding:3px 0 7px;position:relative;text-align:center}.handsontable .htUIInput input{border:1px solid #d2d1d1;border-radius:2px}.handsontable .htUIInputIcon{position:absolute}.handsontable .htUIInput.htUIButton{cursor:pointer;display:inline-block}.handsontable .htUIInput.htUIButton input{background-color:#eee;color:#000;cursor:pointer;font-family:inherit;font-size:.75em;font-weight:700;height:19px;min-width:64px}.handsontable .htUIInput.htUIButton input:hover{border-color:#b9b9b9}.handsontable .htUIInput.htUIButtonOK{margin-left:0;margin-right:10px}[dir=rtl].handsontable .htUIInput.htUIButtonOK{margin-left:10px;margin-right:0}.handsontable .htUIInput.htUIButtonOK input{background-color:#0f9d58;border-color:#18804e;color:#fff}.handsontable .htUIInput.htUIButtonOK input:focus-visible{background-color:#92dd8d;border-color:#7cb878;color:#000}.handsontable .htUIInput.htUIButtonOK input:hover{border-color:#1a6f46}.handsontable .htUISelect{cursor:pointer;margin-bottom:7px;position:relative}.handsontable .htUISelectCaption{background-color:#e8e8e8;border:1px solid #d2d1d1;border-radius:2px;font-family:inherit;font-size:.75em;font-weight:700;overflow:hidden;padding:3px 20px 3px 10px;text-overflow:ellipsis;white-space:nowrap}.handsontable .htUISelectCaption:hover{background-color:#e8e8e8;border:1px solid #b9b9b9}.handsontable .htUISelectDropdown:after{content:"▲";font-size:7px;position:absolute;right:10px;top:0}.handsontable .htUISelectDropdown:before{content:"▼";font-size:7px;position:absolute;right:10px;top:8px}.handsontable .htUIMultipleSelect .handsontable .htCore{border:none}.handsontable .htUIMultipleSelect .handsontable .htCore td:hover{background-color:#f5f5f5}.handsontable .htUIMultipleSelectSearch input{border:1px solid #d2d1d1;border-radius:2px;padding:3px}.handsontable .htUIRadio{display:inline-block;height:100%;margin-left:0;margin-right:5px}[dir=rtl].handsontable .htUIRadio{margin-left:5px;margin-right:0}.handsontable .htUIRadio:last-child{margin-right:0}.handsontable .htUIRadio>input[type=radio]{margin-left:0;margin-right:.5ex}[dir=rtl].handsontable .htUIRadio>input[type=radio]{margin-left:.5ex;margin-right:0}.handsontable .htUIRadio label{vertical-align:middle}.handsontable .htFiltersMenuOperators{padding-bottom:5px}.handsontable th.beforeHiddenColumn{position:relative}.handsontable th.afterHiddenColumn:before,.handsontable th.beforeHiddenColumn:after{color:#bbb;font-size:5pt;position:absolute;top:50%;transform:translateY(-50%)}.handsontable th.afterHiddenColumn{position:relative}.handsontable[dir=ltr] th.afterHiddenColumn div.htLeft{margin-left:10px}.handsontable[dir=ltr] th.beforeHiddenColumn div.htRight,.handsontable[dir=rtl] th.afterHiddenColumn div.htRight{margin-right:10px}.handsontable[dir=rtl] th.beforeHiddenColumn div.htLeft{margin-left:10px}.handsontable th.beforeHiddenColumn:after{content:"◀";right:1px}[dir=rtl].handsontable th.beforeHiddenColumn:after{content:"▶";left:1px;right:auto}.handsontable th.afterHiddenColumn:before{content:"▶";left:1px}[dir=rtl].handsontable th.afterHiddenColumn:before{content:"◀";left:auto;right:1px}\n\n/*!\n * Handsontable HiddenRows\n */.handsontable th.afterHiddenRow:after,.handsontable th.beforeHiddenRow:before{color:#bbb;font-size:6pt;left:2px;line-height:6pt;position:absolute}.handsontable th.afterHiddenRow,.handsontable th.beforeHiddenRow{position:relative}.handsontable th.beforeHiddenRow:before{bottom:2px;content:"▲"}.handsontable th.afterHiddenRow:after{content:"▼";top:2px}.handsontable.ht__selection--rows tbody th.afterHiddenRow.ht__highlight:after,.handsontable.ht__selection--rows tbody th.beforeHiddenRow.ht__highlight:before{color:#eee}.handsontable td.afterHiddenRow.firstVisibleRow,.handsontable th.afterHiddenRow.firstVisibleRow{border-top:1px solid #ccc}.htRowHeaders .ht_master.innerBorderInlineStart~.ht_clone_inline_start td:first-of-type,.htRowHeaders .ht_master.innerBorderInlineStart~.ht_clone_top_inline_start_corner th:nth-child(2){border-left:0}.handsontable.ht__manualColumnMove.after-selection--columns thead th.ht__highlight{cursor:move;cursor:-moz-grab;cursor:-webkit-grab;cursor:grab}.handsontable.ht__manualColumnMove.on-moving--columns *,.handsontable.ht__manualColumnMove.on-moving--columns thead th.ht__highlight{cursor:move;cursor:-moz-grabbing;cursor:-webkit-grabbing;cursor:grabbing}.handsontable.ht__manualColumnMove.on-moving--columns .manualColumnResizer{display:none}.handsontable .ht__manualColumnMove--backlight,.handsontable .ht__manualColumnMove--guideline{display:none;height:100%;position:absolute}.handsontable .ht__manualColumnMove--guideline{background:#757575;margin-inline-end:0;margin-inline-start:-1px;top:0;width:2px;z-index:205}.handsontable .ht__manualColumnMove--backlight{background:#343434;background:rgba(52,52,52,.25);display:none;pointer-events:none;z-index:205}.handsontable.on-moving--columns .ht__manualColumnMove--backlight,.handsontable.on-moving--columns.show-ui .ht__manualColumnMove--guideline{display:block}.handsontable.ht__manualRowMove.after-selection--rows tbody th.ht__highlight{cursor:move;cursor:-moz-grab;cursor:-webkit-grab;cursor:grab}.handsontable.ht__manualRowMove.on-moving--rows *,.handsontable.ht__manualRowMove.on-moving--rows tbody th.ht__highlight{cursor:move;cursor:-moz-grabbing;cursor:-webkit-grabbing;cursor:grabbing}.handsontable.ht__manualRowMove.on-moving--rows .manualRowResizer{display:none}.handsontable .ht__manualRowMove--backlight,.handsontable .ht__manualRowMove--guideline{display:none;position:absolute;width:100%}.handsontable .ht__manualRowMove--guideline{background:#757575;height:2px;left:0;margin-top:-1px;z-index:205}.handsontable .ht__manualRowMove--backlight{background:#343434;background:rgba(52,52,52,.25);display:none;pointer-events:none;z-index:205}.handsontable.on-moving--rows .ht__manualRowMove--backlight,.handsontable.on-moving--rows.show-ui .ht__manualRowMove--guideline{display:block}.handsontable tbody td[rowspan][class*=area][class*=highlight]:not([class*=fullySelectedMergedCell]):before{opacity:0}.handsontable tbody td[rowspan][class*=area][class*=highlight][class*=fullySelectedMergedCell-0]:before,.handsontable tbody td[rowspan][class*=area][class*=highlight][class*=fullySelectedMergedCell-multiple]:before{opacity:.1}.handsontable tbody td[rowspan][class*=area][class*=highlight][class*=fullySelectedMergedCell-1]:before{opacity:.2}.handsontable tbody td[rowspan][class*=area][class*=highlight][class*=fullySelectedMergedCell-2]:before{opacity:.27}.handsontable tbody td[rowspan][class*=area][class*=highlight][class*=fullySelectedMergedCell-3]:before{opacity:.35}.handsontable tbody td[rowspan][class*=area][class*=highlight][class*=fullySelectedMergedCell-4]:before{opacity:.41}.handsontable tbody td[rowspan][class*=area][class*=highlight][class*=fullySelectedMergedCell-5]:before{opacity:.47}.handsontable tbody td[rowspan][class*=area][class*=highlight][class*=fullySelectedMergedCell-6]:before{opacity:.54}.handsontable tbody td[rowspan][class*=area][class*=highlight][class*=fullySelectedMergedCell-7]:before{opacity:.58}.handsontable[dir=ltr] div.htRight span[class*=sort-]{margin-left:-15px;margin-right:15px}.handsontable[dir=rtl] div.htLeft span[class*=sort-]{margin-left:15px;margin-right:-15px}.handsontable[dir=ltr] div.htRight span[class*=sort-]:only-child{margin-left:-20px;margin-right:20px}.handsontable[dir=rtl] div.htLeft span[class*=sort-]:only-child{margin-left:20px;margin-right:-20px}.handsontable span.colHeader.columnSorting:after{font-size:8px;height:8px;left:unset;line-height:1.1;margin-top:-2px;padding-left:5px;padding-right:unset;position:absolute;right:-15px;top:50%}[dir=rtl].handsontable span.colHeader.columnSorting:after{left:-15px;padding-left:unset;padding-right:5px;right:unset}.handsontable span.colHeader.columnSorting[class*=" sort-"]:after,.handsontable span.colHeader.columnSorting[class^=sort-]:after{content:"+"}.handsontable span.colHeader.columnSorting.sort-1:after{content:"1"}.handsontable span.colHeader.columnSorting.sort-2:after{content:"2"}.handsontable span.colHeader.columnSorting.sort-3:after{content:"3"}.handsontable span.colHeader.columnSorting.sort-4:after{content:"4"}.handsontable span.colHeader.columnSorting.sort-5:after{content:"5"}.handsontable span.colHeader.columnSorting.sort-6:after{content:"6"}.handsontable span.colHeader.columnSorting.sort-7:after{content:"7"}.htGhostTable th div button.changeType+span.colHeader.columnSorting:not(.indicatorDisabled){padding-right:5px}.handsontable thead th.hiddenHeader:not(:first-of-type){display:none}thead th.hiddenHeaderText .colHeader{opacity:0}.handsontable th.ht_nestingLevels{padding-left:7px;text-align:left}[dir=rtl].handsontable th.ht_nestingLevels{padding-right:7px;text-align:right}.handsontable th div.ht_nestingLevels{display:inline-block;left:11px;position:absolute;right:unset}[dir=rtl].handsontable th div.ht_nestingLevels{left:unset;right:11px}.handsontable.innerBorderInlineStart th div.ht_nestingLevels,.handsontable.innerBorderInlineStart~.handsontable th div.ht_nestingLevels{left:unset;right:10px}[dir=rtl].handsontable.innerBorderInlineStart th div.ht_nestingLevels,[dir=rtl].handsontable.innerBorderInlineStart~.handsontable th div.ht_nestingLevels{left:10px;right:unset}.handsontable th span.ht_nestingLevel{display:inline-block}.handsontable th span.ht_nestingLevel_empty{display:inline-block;float:left;height:1px;width:10px}[dir=rtl].handsontable th span.ht_nestingLevel_empty{float:right}.handsontable th span.ht_nestingLevel:after{bottom:3px;content:"┐";display:inline-block;font-size:9px;position:relative}.handsontable th div.ht_nestingButton{cursor:pointer;display:inline-block;left:unset;position:absolute;right:-2px}[dir=rtl].handsontable th div.ht_nestingButton{left:-2px;right:unset}.handsontable th div.ht_nestingButton.ht_nestingExpand:after{content:"+"}.handsontable th div.ht_nestingButton.ht_nestingCollapse:after{content:"-"}.handsontable.innerBorderInlineStart th div.ht_nestingButton,.handsontable.innerBorderInlineStart~.handsontable th div.ht_nestingButton{left:unset;right:0}[dir=rtl].handsontable.innerBorderInlineStart th div.ht_nestingButton,[dir=rtl].handsontable.innerBorderInlineStart~.handsontable th div.ht_nestingButton{left:0;right:unset}\n\n/*!\n * Pikaday\n * Copyright © 2014 David Bushell | BSD & MIT license | https://dbushell.com/\n */.pika-single{background:#fff;border:1px solid;border-color:#ccc #ccc #bbb;color:#333;display:block;font-family:Helvetica Neue,Helvetica,Arial,sans-serif;position:relative;z-index:9999}.pika-single:after,.pika-single:before{content:" ";display:table}.pika-single:after{clear:both}.pika-single.is-hidden{display:none}.pika-single.is-bound{box-shadow:0 5px 15px -5px rgba(0,0,0,.5);position:absolute}.pika-lendar{float:left;margin:8px;width:240px}.pika-title{position:relative;text-align:center}.pika-label{background-color:#fff;display:inline-block;font-size:14px;font-weight:700;line-height:20px;margin:0;overflow:hidden;padding:5px 3px;position:relative;z-index:9999}.pika-title select{cursor:pointer;left:0;margin:0;opacity:0;position:absolute;top:5px;z-index:9998}.pika-next,.pika-prev{background-color:transparent;background-position:50%;background-repeat:no-repeat;background-size:75% 75%;border:0;cursor:pointer;display:block;height:30px;opacity:.5;outline:none;overflow:hidden;padding:0;position:relative;text-indent:20px;white-space:nowrap;width:20px}.pika-next:hover,.pika-prev:hover{opacity:1}.is-rtl .pika-next,.pika-prev{background-image:url(${m});float:left}.is-rtl .pika-prev,.pika-next{background-image:url(${w});float:right}.pika-next.is-disabled,.pika-prev.is-disabled{cursor:default;opacity:.2}.pika-select{display:inline-block}.pika-table{border:0;border-collapse:collapse;border-spacing:0;width:100%}.pika-table td,.pika-table th{padding:0;width:14.285714285714286%}.pika-table th{color:#999;font-weight:700;line-height:25px}.pika-button,.pika-table th{font-size:12px;text-align:center}.pika-button{background:#f5f5f5;border:0;box-sizing:border-box;-moz-box-sizing:border-box;color:#666;cursor:pointer;display:block;height:auto;line-height:15px;margin:0;outline:none;padding:5px;width:100%}.pika-week{color:#999;font-size:11px}.is-today .pika-button{color:#3af;font-weight:700}.has-event .pika-button,.is-selected .pika-button{background:#3af;border-radius:3px;box-shadow:inset 0 1px 3px #178fe5;color:#fff;font-weight:700}.has-event .pika-button{background:#005da9;box-shadow:inset 0 1px 3px #0076c9}.is-disabled .pika-button,.is-inrange .pika-button{background:#d5e9f7}.is-startrange .pika-button{background:#6cb31d;border-radius:3px;box-shadow:none;color:#fff}.is-endrange .pika-button{background:#3af;border-radius:3px;box-shadow:none;color:#fff}.is-disabled .pika-button{color:#999;cursor:default;opacity:.3;pointer-events:none}.is-outside-current-month .pika-button{color:#999;opacity:.3}.is-selection-disabled{cursor:default;pointer-events:none}.pika-button:hover,.pika-row.pick-whole-week:hover .pika-button{background:#ff8000;border-radius:3px;box-shadow:none;color:#fff}.pika-table abbr{border-bottom:none;cursor:help}`,""]);const b=g},7476:(t,e,o)=>{var n=o(2195),i=o(9504);t.exports=function(t){if("Function"===n(t))return i(t)}},7550:(t,e,o)=>{o(3579)},7584:(t,e,o)=>{var n=o(34),i=o(6699);t.exports=function(t,e){n(e)&&"cause"in e&&i(t,"cause",e.cause)}},7588:(t,e,o)=>{var n=o(6518),i=o(9565),r=o(2652),s=o(9306),l=o(8551),a=o(1767),h=o(9539),c=o(4549)("forEach",TypeError);n({target:"Iterator",proto:!0,real:!0,forced:c},{forEach:function(t){l(this);try{s(t)}catch(t){h(this,"throw",t)}if(c)return i(c,this,t);var e=a(this),o=0;r(e,(function(e){t(e,o++)}),{IS_RECORD:!0})}})},7629:(t,e,o)=>{var n=o(6395),i=o(4576),r=o(9433),s="__core-js_shared__",l=t.exports=i[s]||r(s,{});(l.versions||(l.versions=[])).push({version:"3.42.0",mode:n?"pure":"global",copyright:"© 2014-2025 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.42.0/LICENSE",source:"https://github.com/zloirock/core-js"})},7642:(t,e,o)=>{var n=o(6518),i=o(3440);n({target:"Set",proto:!0,real:!0,forced:!o(4916)("difference",(function(t){return 0===t.size}))},{difference:i})},7657:(t,e,o)=>{var n,i,r,s=o(9039),l=o(4901),a=o(34),h=o(2360),c=o(2787),d=o(6840),u=o(8227),g=o(6395),f=u("iterator"),p=!1;[].keys&&("next"in(r=[].keys())?(i=c(c(r)))!==Object.prototype&&(n=i):p=!0),!a(n)||s((function(){var t={};return n[f].call(t)!==t}))?n={}:g&&(n=h(n)),l(n[f])||d(n,f,(function(){return this})),t.exports={IteratorPrototype:n,BUGGY_SAFARI_ITERATORS:p}},7680:(t,e,o)=>{var n=o(9504);t.exports=n([].slice)},7710:(t,e,o)=>{o.d(e,{A:()=>s}),o(4114);var n=o(2919),i=o(3986);const r={_localHooks:Object.create(null),addLocalHook(t,e){return this._localHooks[t]||(this._localHooks[t]=[]),this._localHooks[t].push(e),this},runLocalHooks(t,e,o,n,r,s,l){if(this._localHooks[t]){const a=this._localHooks[t].length;for(let h=0;h<a;h++)(0,i.Ty)(this._localHooks[t][h],this,e,o,n,r,s,l)}},clearLocalHooks(){return this._localHooks={},this}};(0,n.LH)(r,"MIXIN_NAME","localHooks",{writable:!1,enumerable:!1});const s=r},7740:(t,e,o)=>{var n=o(9297),i=o(5031),r=o(7347),s=o(4913);t.exports=function(t,e,o){for(var l=i(e),a=s.f,h=r.f,c=0;c<l.length;c++){var d=l[c];n(t,d)||o&&n(o,d)||a(t,d,h(e,d))}}},7750:(t,e,o)=>{var n=o(4117),i=TypeError;t.exports=function(t){if(n(t))throw new i("Can't call method on "+t);return t}},7751:(t,e,o)=>{var n=o(4576),i=o(4901);t.exports=function(t,e){return arguments.length<2?(o=n[t],i(o)?o:void 0):n[t]&&n[t][e];var o}},7792:(t,e,o)=>{o.d(e,{H:()=>s,N:()=>r}),o(8992),o(1454);var n=o(3986),i=o(7325);function r(t,e,o,i){const r=o.length?o[0]:void 0;return[...t.slice(0,r),...o.map(((t,e)=>(0,n.Tn)(i)?i(t,e):i)),...void 0===r?[]:t.slice(r)]}function s(t,e){return(0,i.y0)(t,((t,o)=>!1===e.includes(o)))}},7979:(t,e,o)=>{var n=o(8551);t.exports=function(){var t=n(this),e="";return t.hasIndices&&(e+="d"),t.global&&(e+="g"),t.ignoreCase&&(e+="i"),t.multiline&&(e+="m"),t.dotAll&&(e+="s"),t.unicode&&(e+="u"),t.unicodeSets&&(e+="v"),t.sticky&&(e+="y"),e}},8002:(t,e,o)=>{o.d(e,{B6:()=>h,H8:()=>a,U0:()=>b,UP:()=>g,Yh:()=>w,gm:()=>c,nr:()=>u,rr:()=>f,un:()=>p,wF:()=>d,zG:()=>m});var n=o(2919),i=o(3968);const r=t=>{const e={value:!1,test:(o,n)=>{e.value=t(o,n)}};return e},s={chrome:r(((t,e)=>/Chrome/.test(t)&&/Google/.test(e))),chromeWebKit:r((t=>/CriOS/.test(t))),edge:r((t=>/Edge/.test(t))),edgeWebKit:r((t=>/EdgiOS/.test(t))),firefox:r((t=>/Firefox/.test(t))),firefoxWebKit:r((t=>/FxiOS/.test(t))),mobile:r((t=>/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(t))),safari:r(((t,e)=>/Safari/.test(t)&&/Apple Computer/.test(e)))},l={mac:r((t=>/^Mac/.test(t))),win:r((t=>/^Win/.test(t))),linux:r((t=>/^Linux/.test(t))),ios:r((t=>/iPhone|iPad|iPod/i.test(t)))};function a(){return s.chrome.value}function h(){return s.chromeWebKit.value}function c(){return s.firefox.value}function d(){return s.firefoxWebKit.value}function u(){return s.safari.value}function g(){return s.edge.value}function f(){return s.mobile.value}function p(){return l.ios.value}function m(){let{maxTouchPoints:t}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:navigator;return t>2&&l.mac.value}function w(){return l.win.value}function b(){return l.mac.value}(0,i.Nt)()&&(function(){let{userAgent:t=navigator.userAgent,vendor:e=navigator.vendor}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};(0,n.v4)(s,(o=>{let{test:n}=o;n(t,e)}))}(),function(){let{platform:t=navigator.platform}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};(0,n.v4)(l,(e=>{let{test:o}=e;o(t)}))}())},8004:(t,e,o)=>{var n=o(6518),i=o(9039),r=o(8750);n({target:"Set",proto:!0,real:!0,forced:!o(4916)("intersection",(function(t){return 2===t.size&&t.has(1)&&t.has(2)}))||i((function(){return"3,2"!==String(Array.from(new Set([1,2,3]).intersection(new Set([3,2]))))}))},{intersection:r})},8014:(t,e,o)=>{var n=o(1291),i=Math.min;t.exports=function(t){var e=n(t);return e>0?i(e,9007199254740991):0}},8046:(t,e,o)=>{o.d(e,{H:()=>r,N:()=>i});var n=o(7325);function i(t,e,o){return[...t.slice(0,e),...o,...t.slice(e)]}function r(t,e){return(0,n.y0)(t,(t=>!1===e.includes(t)))}},8061:(t,e,o)=>{o.d(e,{A:()=>r}),o(6280),o(4114);var n=o(5155);let i=0;const r=class{constructor(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;var e,o,n;e=this,n=void 0,(o=function(t){var e=function(t){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var o=e.call(t,"string");if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:e+""}(o="context"))in e?Object.defineProperty(e,o,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[o]=n,this.context=t||this,this.context.eventListeners||(this.context.eventListeners=[])}addEventListener(t,e,o){let r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];function s(t){o.call(this,function(t){const e=t.stopImmediatePropagation;return t.stopImmediatePropagation=function(){e.apply(this),(0,n.CA)(this)},t}(t))}return this.context.eventListeners.push({element:t,event:e,callback:o,callbackProxy:s,options:r,eventManager:this}),t.addEventListener(e,s,r),i+=1,()=>{this.removeEventListener(t,e,o)}}removeEventListener(t,e,o){let n,r=arguments.length>3&&void 0!==arguments[3]&&arguments[3],s=this.context.eventListeners.length;for(;s;)if(s-=1,n=this.context.eventListeners[s],n.event===e&&n.element===t){if(o&&o!==n.callback)continue;if(r&&n.eventManager!==this)continue;this.context.eventListeners.splice(s,1),n.element.removeEventListener(n.event,n.callbackProxy,n.options),i-=1}}clearEvents(){let t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(!this.context)return;let e=this.context.eventListeners.length;for(;e;){e-=1;const o=this.context.eventListeners[e];t&&o.eventManager!==this||(this.context.eventListeners.splice(e,1),o.element.removeEventListener(o.event,o.callbackProxy,o.options),i-=1)}}clear(){this.clearEvents()}destroy(){this.clearEvents(),this.context=null}destroyWithOwnEventsOnly(){this.clearEvents(!0),this.context=null}fireEvent(t,e){let o=t.document,n=t;o||(o=t.ownerDocument?t.ownerDocument:t,n=o.defaultView);const i={bubbles:!0,cancelable:"mousemove"!==e,view:n,detail:0,screenX:0,screenY:0,clientX:1,clientY:1,ctrlKey:!1,altKey:!1,shiftKey:!1,metaKey:!1,button:0,relatedTarget:void 0};let r;o.createEvent?(r=o.createEvent("MouseEvents"),r.initMouseEvent(e,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||o.body.parentNode)):r=o.createEventObject(),t.dispatchEvent?t.dispatchEvent(r):t.fireEvent(`on${e}`,r)}}},8107:(t,e,o)=>{var n=o(6518),i=o(8981),r=o(6198),s=o(1291),l=o(6469);n({target:"Array",proto:!0},{at:function(t){var e=i(this),o=r(e),n=s(t),l=n>=0?n:o+n;return l<0||l>=o?void 0:e[l]}}),l("at")},8111:(t,e,o)=>{var n=o(6518),i=o(4576),r=o(679),s=o(8551),l=o(4901),a=o(2787),h=o(2106),c=o(2278),d=o(9039),u=o(9297),g=o(8227),f=o(7657).IteratorPrototype,p=o(3724),m=o(6395),w="constructor",b="Iterator",v=g("toStringTag"),y=TypeError,C=i[b],S=m||!l(C)||C.prototype!==f||!d((function(){C({})})),R=function(){if(r(this,f),a(this)===f)throw new y("Abstract class Iterator not directly constructable")},E=function(t,e){p?h(f,t,{configurable:!0,get:function(){return e},set:function(e){if(s(this),this===f)throw new y("You can't redefine this property");u(this,t)?this[t]=e:c(this,t,e)}}):f[t]=e};u(f,v)||E(v,b),!S&&u(f,w)&&f[w]!==Object||E(w,R),R.prototype=f,n({global:!0,constructor:!0,forced:S},{Iterator:R})},8227:(t,e,o)=>{var n=o(4576),i=o(5745),r=o(9297),s=o(3392),l=o(4495),a=o(7040),h=n.Symbol,c=i("wks"),d=a?h.for||h:h&&h.withoutSetter||s;t.exports=function(t){return r(c,t)||(c[t]=l&&r(h,t)?h[t]:d("Symbol."+t)),c[t]}},8237:(t,e,o)=>{var n=o(6518),i=o(2652),r=o(9306),s=o(8551),l=o(1767),a=o(9539),h=o(4549),c=o(8745),d=o(9039),u=TypeError,g=d((function(){[].keys().reduce((function(){}),void 0)})),f=!g&&h("reduce",u);n({target:"Iterator",proto:!0,real:!0,forced:g||f},{reduce:function(t){s(this);try{r(t)}catch(t){a(this,"throw",t)}var e=arguments.length<2,o=e?void 0:arguments[1];if(f)return c(f,this,e?[t]:[t,o]);var n=l(this),h=0;if(i(n,(function(n){e?(e=!1,o=n):o=t(o,n,h),h++}),{IS_RECORD:!0}),e)throw new u("Reduce of empty iterator with no initial value");return o}})},8386:(t,e,o)=>{o.d(e,{_:()=>r});var n=o(1895),i=o(7792);class r extends n.n{insert(t,e){this.indexedValues=(0,i.N)(this.indexedValues,t,e,this.initValueOrFn),super.insert(t,e)}remove(t){this.indexedValues=(0,i.H)(this.indexedValues,t),super.remove(t)}}},8419:(t,e,o)=>{o.d(e,{Lb:()=>r,SI:()=>h,Yf:()=>a,aE:()=>l,m0:()=>c}),o(4114);var n=o(7325),i=o(8002);const r={ALT:18,ARROW_DOWN:40,ARROW_LEFT:37,ARROW_RIGHT:39,ARROW_UP:38,AUDIO_DOWN:(0,i.gm)()?182:174,AUDIO_MUTE:(0,i.gm)()?181:173,AUDIO_UP:(0,i.gm)()?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},s=[r.ALT,r.ARROW_DOWN,r.ARROW_LEFT,r.ARROW_RIGHT,r.ARROW_UP,r.AUDIO_DOWN,r.AUDIO_MUTE,r.AUDIO_UP,r.BACKSPACE,r.CAPS_LOCK,r.DELETE,r.END,r.ENTER,r.ESCAPE,r.F1,r.F2,r.F3,r.F4,r.F5,r.F6,r.F7,r.F8,r.F9,r.F10,r.F11,r.F12,r.F13,r.F14,r.F15,r.F16,r.F17,r.F18,r.F19,r.HOME,r.INSERT,r.MEDIA_NEXT,r.MEDIA_PLAY_PAUSE,r.MEDIA_PREV,r.MEDIA_STOP,r.NULL,r.NUM_LOCK,r.PAGE_DOWN,r.PAGE_UP,r.PAUSE,r.SCROLL_LOCK,r.SHIFT,r.TAB];function l(t){return 32===t||t>=48&&t<=57||t>=96&&t<=111||t>=186&&t<=192||t>=219&&t<=222||t>=226||t>=65&&t<=90}function a(t){return s.includes(t)}function h(t){return[r.CONTROL,r.COMMAND_LEFT,r.COMMAND_RIGHT,r.COMMAND_FIREFOX].includes(t)}function c(t,e){const o=e.split("|");let i=!1;return(0,n.z0)(o,(e=>{if(t===r[e])return i=!0,!1})),i}},8469:(t,e,o)=>{var n=o(9504),i=o(507),r=o(4402),s=r.Set,l=r.proto,a=n(l.forEach),h=n(l.keys),c=h(new s).next;t.exports=function(t,e,o){return o?i({iterator:h(t),next:c},e):a(t,e)}},8480:(t,e,o)=>{var n=o(1828),i=o(8727).concat("length","prototype");e.f=Object.getOwnPropertyNames||function(t){return n(t,i)}},8514:(t,e,o)=>{function n(t,e,o){return(e=function(t){var e=function(t){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var o=e.call(t,"string");if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[e]=o,t}o.d(e,{C:()=>i}),o(6280),o(8992),o(3949);class i{constructor(t){n(this,"calculationTypes",[]),n(this,"calculationResults",new Map),this.calculationTypes=t}_initialize(t){this.calculationTypes.forEach((e=>{let[o,n]=e;this.calculationResults.set(o,n),n.initialize(t)}))}_process(t,e){this.calculationTypes.forEach((o=>{let[,n]=o;return n.process(t,e)}))}_finalize(t){this.calculationTypes.forEach((e=>{let[,o]=e;return o.finalize(t)}))}getResultsFor(t){return this.calculationResults.get(t)}}},8527:(t,e,o)=>{var n=o(7080),i=o(4402).has,r=o(5170),s=o(3789),l=o(507),a=o(9539);t.exports=function(t){var e=n(this),o=s(t);if(r(e)<o.size)return!1;var h=o.getIterator();return!1!==l(h,(function(t){if(!i(e,t))return a(h,"normal",!1)}))}},8551:(t,e,o)=>{var n=o(34),i=String,r=TypeError;t.exports=function(t){if(n(t))return t;throw new r(i(t)+" is not an object")}},8574:(t,e,o)=>{var n=o(4215);t.exports="NODE"===n},8622:(t,e,o)=>{var n=o(4576),i=o(4901),r=n.WeakMap;t.exports=i(r)&&/native code/.test(String(r))},8646:(t,e,o)=>{var n=o(9565),i=o(8551),r=o(1767),s=o(851);t.exports=function(t,e){e&&"string"==typeof t||i(t);var o=s(t);return r(i(void 0!==o?n(o,t):t))}},8686:(t,e,o)=>{var n=o(3724),i=o(9039);t.exports=n&&i((function(){return 42!==Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype}))},8727:t=>{t.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},8745:(t,e,o)=>{var n=o(616),i=Function.prototype,r=i.apply,s=i.call;t.exports="object"==typeof Reflect&&Reflect.apply||(n?s.bind(r):function(){return s.apply(r,arguments)})},8750:(t,e,o)=>{var n=o(7080),i=o(4402),r=o(5170),s=o(3789),l=o(8469),a=o(507),h=i.Set,c=i.add,d=i.has;t.exports=function(t){var e=n(this),o=s(t),i=new h;return r(e)>o.size?a(o.getIterator(),(function(t){d(e,t)&&c(i,t)})):l(e,(function(t){o.includes(t)&&c(i,t)})),i}},8773:(t,e)=>{var o={}.propertyIsEnumerable,n=Object.getOwnPropertyDescriptor,i=n&&!o.call({1:2},1);e.f=i?function(t){var e=n(this,t);return!!e&&e.enumerable}:o},8872:(t,e,o)=>{o(8237)},8981:(t,e,o)=>{var n=o(7750),i=Object;t.exports=function(t){return i(n(t))}},8992:(t,e,o)=>{o(8111)},9039:t=>{t.exports=function(t){try{return!!t()}catch(t){return!0}}},9138:(t,e,o)=>{o.r(e),o.d(e,{CHECKBOX_CHECKED:()=>Ot,CHECKBOX_RENDERER_NAMESPACE:()=>Ht,CHECKBOX_UNCHECKED:()=>At,CONTEXTMENU_ITEMS_ADD_COMMENT:()=>E,CONTEXTMENU_ITEMS_ALIGNMENT:()=>I,CONTEXTMENU_ITEMS_ALIGNMENT_BOTTOM:()=>P,CONTEXTMENU_ITEMS_ALIGNMENT_CENTER:()=>O,CONTEXTMENU_ITEMS_ALIGNMENT_JUSTIFY:()=>k,CONTEXTMENU_ITEMS_ALIGNMENT_LEFT:()=>H,CONTEXTMENU_ITEMS_ALIGNMENT_MIDDLE:()=>N,CONTEXTMENU_ITEMS_ALIGNMENT_RIGHT:()=>A,CONTEXTMENU_ITEMS_ALIGNMENT_TOP:()=>_,CONTEXTMENU_ITEMS_BORDERS:()=>L,CONTEXTMENU_ITEMS_BORDERS_BOTTOM:()=>F,CONTEXTMENU_ITEMS_BORDERS_LEFT:()=>B,CONTEXTMENU_ITEMS_BORDERS_RIGHT:()=>V,CONTEXTMENU_ITEMS_BORDERS_TOP:()=>D,CONTEXTMENU_ITEMS_CLEAR_COLUMN:()=>f,CONTEXTMENU_ITEMS_COPY:()=>p,CONTEXTMENU_ITEMS_COPY_COLUMN_HEADERS_ONLY:()=>b,CONTEXTMENU_ITEMS_COPY_WITH_COLUMN_GROUP_HEADERS:()=>w,CONTEXTMENU_ITEMS_COPY_WITH_COLUMN_HEADERS:()=>m,CONTEXTMENU_ITEMS_CUT:()=>v,CONTEXTMENU_ITEMS_EDIT_COMMENT:()=>T,CONTEXTMENU_ITEMS_FREEZE_COLUMN:()=>y,CONTEXTMENU_ITEMS_HIDE_COLUMN:()=>U,CONTEXTMENU_ITEMS_HIDE_ROW:()=>G,CONTEXTMENU_ITEMS_INSERT_LEFT:()=>l,CONTEXTMENU_ITEMS_INSERT_RIGHT:()=>a,CONTEXTMENU_ITEMS_MERGE_CELLS:()=>S,CONTEXTMENU_ITEMS_NESTED_ROWS_DETACH_CHILD:()=>j,CONTEXTMENU_ITEMS_NESTED_ROWS_INSERT_CHILD:()=>z,CONTEXTMENU_ITEMS_NO_ITEMS:()=>i,CONTEXTMENU_ITEMS_READ_ONLY:()=>g,CONTEXTMENU_ITEMS_READ_ONLY_COMMENT:()=>M,CONTEXTMENU_ITEMS_REDO:()=>u,CONTEXTMENU_ITEMS_REMOVE_BORDERS:()=>W,CONTEXTMENU_ITEMS_REMOVE_COLUMN:()=>c,CONTEXTMENU_ITEMS_REMOVE_COMMENT:()=>x,CONTEXTMENU_ITEMS_REMOVE_ROW:()=>h,CONTEXTMENU_ITEMS_ROW_ABOVE:()=>r,CONTEXTMENU_ITEMS_ROW_BELOW:()=>s,CONTEXTMENU_ITEMS_SHOW_COLUMN:()=>$,CONTEXTMENU_ITEMS_SHOW_ROW:()=>Y,CONTEXTMENU_ITEMS_UNDO:()=>d,CONTEXTMENU_ITEMS_UNFREEZE_COLUMN:()=>C,CONTEXTMENU_ITEMS_UNMERGE_CELLS:()=>R,CONTEXT_MENU_ITEMS_NAMESPACE:()=>n,FILTERS_BUTTONS_CANCEL:()=>Tt,FILTERS_BUTTONS_CLEAR:()=>Rt,FILTERS_BUTTONS_OK:()=>Et,FILTERS_BUTTONS_PLACEHOLDER_SEARCH:()=>xt,FILTERS_BUTTONS_PLACEHOLDER_SECOND_VALUE:()=>It,FILTERS_BUTTONS_PLACEHOLDER_VALUE:()=>Mt,FILTERS_BUTTONS_SELECT_ALL:()=>St,FILTERS_CONDITIONS_AFTER:()=>ut,FILTERS_CONDITIONS_BEFORE:()=>gt,FILTERS_CONDITIONS_BEGINS_WITH:()=>et,FILTERS_CONDITIONS_BETWEEN:()=>ct,FILTERS_CONDITIONS_BY_VALUE:()=>rt,FILTERS_CONDITIONS_CONTAINS:()=>nt,FILTERS_CONDITIONS_EMPTY:()=>Q,FILTERS_CONDITIONS_ENDS_WITH:()=>ot,FILTERS_CONDITIONS_EQUAL:()=>Z,FILTERS_CONDITIONS_GREATER_THAN:()=>st,FILTERS_CONDITIONS_GREATER_THAN_OR_EQUAL:()=>lt,FILTERS_CONDITIONS_LESS_THAN:()=>at,FILTERS_CONDITIONS_LESS_THAN_OR_EQUAL:()=>ht,FILTERS_CONDITIONS_NAMESPACE:()=>q,FILTERS_CONDITIONS_NONE:()=>K,FILTERS_CONDITIONS_NOT_BETWEEN:()=>dt,FILTERS_CONDITIONS_NOT_CONTAIN:()=>it,FILTERS_CONDITIONS_NOT_EMPTY:()=>J,FILTERS_CONDITIONS_NOT_EQUAL:()=>tt,FILTERS_CONDITIONS_TODAY:()=>ft,FILTERS_CONDITIONS_TOMORROW:()=>pt,FILTERS_CONDITIONS_YESTERDAY:()=>mt,FILTERS_DIVS_FILTER_BY_CONDITION:()=>wt,FILTERS_DIVS_FILTER_BY_VALUE:()=>bt,FILTERS_LABELS_CONJUNCTION:()=>vt,FILTERS_LABELS_DISJUNCTION:()=>yt,FILTERS_NAMESPACE:()=>X,FILTERS_VALUES_BLANK_CELLS:()=>Ct});const n="ContextMenu:items",i=`${n}.noItems`,r=`${n}.insertRowAbove`,s=`${n}.insertRowBelow`,l=`${n}.insertColumnOnTheLeft`,a=`${n}.insertColumnOnTheRight`,h=`${n}.removeRow`,c=`${n}.removeColumn`,d=`${n}.undo`,u=`${n}.redo`,g=`${n}.readOnly`,f=`${n}.clearColumn`,p=`${n}.copy`,m=`${n}.copyWithHeaders`,w=`${n}.copyWithGroupHeaders`,b=`${n}.copyHeadersOnly`,v=`${n}.cut`,y=`${n}.freezeColumn`,C=`${n}.unfreezeColumn`,S=`${n}.mergeCells`,R=`${n}.unmergeCells`,E=`${n}.addComment`,T=`${n}.editComment`,x=`${n}.removeComment`,M=`${n}.readOnlyComment`,I=`${n}.align`,H=`${n}.align.left`,O=`${n}.align.center`,A=`${n}.align.right`,k=`${n}.align.justify`,_=`${n}.align.top`,N=`${n}.align.middle`,P=`${n}.align.bottom`,L=`${n}.borders`,D=`${n}.borders.top`,V=`${n}.borders.right`,F=`${n}.borders.bottom`,B=`${n}.borders.left`,W=`${n}.borders.remove`,z=`${n}.nestedHeaders.insertChildRow`,j=`${n}.nestedHeaders.detachFromParent`,U=`${n}.hideColumn`,$=`${n}.showColumn`,G=`${n}.hideRow`,Y=`${n}.showRow`,X="Filters:",q=`${X}conditions`,K=`${q}.none`,Q=`${q}.isEmpty`,J=`${q}.isNotEmpty`,Z=`${q}.isEqualTo`,tt=`${q}.isNotEqualTo`,et=`${q}.beginsWith`,ot=`${q}.endsWith`,nt=`${q}.contains`,it=`${q}.doesNotContain`,rt=`${q}.byValue`,st=`${q}.greaterThan`,lt=`${q}.greaterThanOrEqualTo`,at=`${q}.lessThan`,ht=`${q}.lessThanOrEqualTo`,ct=`${q}.isBetween`,dt=`${q}.isNotBetween`,ut=`${q}.after`,gt=`${q}.before`,ft=`${q}.today`,pt=`${q}.tomorrow`,mt=`${q}.yesterday`,wt=`${X}labels.filterByCondition`,bt=`${X}labels.filterByValue`,vt=`${X}labels.conjunction`,yt=`${X}labels.disjunction`,Ct=`${X}values.blankCells`,St=`${X}buttons.selectAll`,Rt=`${X}buttons.clear`,Et=`${X}buttons.ok`,Tt=`${X}buttons.cancel`,xt=`${X}buttons.placeholder.search`,Mt=`${X}buttons.placeholder.value`,It=`${X}buttons.placeholder.secondValue`,Ht="CheckboxRenderer:",Ot=`${Ht}checked`,At=`${Ht}unchecked`},9225:(t,e,o)=>{var n,i,r,s,l=o(4576),a=o(8745),h=o(6080),c=o(4901),d=o(9297),u=o(9039),g=o(397),f=o(7680),p=o(4055),m=o(2812),w=o(9544),b=o(8574),v=l.setImmediate,y=l.clearImmediate,C=l.process,S=l.Dispatch,R=l.Function,E=l.MessageChannel,T=l.String,x=0,M={},I="onreadystatechange";u((function(){n=l.location}));var H=function(t){if(d(M,t)){var e=M[t];delete M[t],e()}},O=function(t){return function(){H(t)}},A=function(t){H(t.data)},k=function(t){l.postMessage(T(t),n.protocol+"//"+n.host)};v&&y||(v=function(t){m(arguments.length,1);var e=c(t)?t:R(t),o=f(arguments,1);return M[++x]=function(){a(e,void 0,o)},i(x),x},y=function(t){delete M[t]},b?i=function(t){C.nextTick(O(t))}:S&&S.now?i=function(t){S.now(O(t))}:E&&!w?(s=(r=new E).port2,r.port1.onmessage=A,i=h(s.postMessage,s)):l.addEventListener&&c(l.postMessage)&&!l.importScripts&&n&&"file:"!==n.protocol&&!u(k)?(i=k,l.addEventListener("message",A,!1)):i=I in p("script")?function(t){g.appendChild(p("script"))[I]=function(){g.removeChild(this),H(t)}}:function(t){setTimeout(O(t),0)}),t.exports={set:v,clear:y}},9286:(t,e,o)=>{var n=o(4402),i=o(8469),r=n.Set,s=n.add;t.exports=function(t){var e=new r;return i(t,(function(t){s(e,t)})),e}},9297:(t,e,o)=>{var n=o(9504),i=o(8981),r=n({}.hasOwnProperty);t.exports=Object.hasOwn||function(t,e){return r(i(t),e)}},9306:(t,e,o)=>{var n=o(4901),i=o(6823),r=TypeError;t.exports=function(t){if(n(t))return t;throw new r(i(t)+" is not a function")}},9309:(t,e,o)=>{var n=o(6518),i=o(4576),r=o(9225).set,s=o(9472),l=i.setImmediate?s(r,!1):r;n({global:!0,bind:!0,enumerable:!0,forced:i.setImmediate!==l},{setImmediate:l})},9433:(t,e,o)=>{var n=o(4576),i=Object.defineProperty;t.exports=function(t,e){try{i(n,t,{value:e,configurable:!0,writable:!0})}catch(o){n[t]=e}return e}},9462:(t,e,o)=>{var n=o(9565),i=o(2360),r=o(6699),s=o(6279),l=o(8227),a=o(1181),h=o(5966),c=o(7657).IteratorPrototype,d=o(2529),u=o(9539),g=l("toStringTag"),f="IteratorHelper",p="WrapForValidIterator",m=a.set,w=function(t){var e=a.getterFor(t?p:f);return s(i(c),{next:function(){var o=e(this);if(t)return o.nextHandler();if(o.done)return d(void 0,!0);try{var n=o.nextHandler();return o.returnHandlerResult?n:d(n,o.done)}catch(t){throw o.done=!0,t}},return:function(){var o=e(this),i=o.iterator;if(o.done=!0,t){var r=h(i,"return");return r?n(r,i):d(void 0,!0)}if(o.inner)try{u(o.inner.iterator,"normal")}catch(t){return u(i,"throw",t)}return i&&u(i,"normal"),d(void 0,!0)}})},b=w(!0),v=w(!1);r(v,g,"Iterator Helper"),t.exports=function(t,e,o){var n=function(n,i){i?(i.iterator=n.iterator,i.next=n.next):i=n,i.type=e?p:f,i.returnHandlerResult=!!o,i.nextHandler=t,i.counter=0,i.done=!1,m(this,i)};return n.prototype=e?b:v,n}},9472:(t,e,o)=>{var n,i=o(4576),r=o(8745),s=o(4901),l=o(4215),a=o(2839),h=o(7680),c=o(2812),d=i.Function,u=/MSIE .\./.test(a)||"BUN"===l&&((n=i.Bun.version.split(".")).length<3||"0"===n[0]&&(n[1]<3||"3"===n[1]&&"0"===n[2]));t.exports=function(t,e){var o=e?2:1;return u?function(n,i){var l=c(arguments.length,1)>o,a=s(n)?n:d(n),u=l?h(arguments,o):[],g=l?function(){r(a,this,u)}:a;return e?t(g,i):t(g)}:t}},9478:(t,e,o)=>{o.d(e,{j:()=>r}),o(4114);var n=o(91),i=o(6422);function r(t,e,o,r,s,l,a){const h=a.ariaTags,c=[],d=[],u=[],g=[];a.className&&(0,n.iQ)(e,a.className),a.readOnly?(c.push(a.readOnlyCellClassName),h&&g.push((0,i.u8)())):h&&u.push((0,i.u8)()[0]),!1===a.valid&&a.invalidCellClassName?(c.push(a.invalidCellClassName),h&&g.push((0,i.PF)())):(d.push(a.invalidCellClassName),h&&u.push((0,i.PF)()[0])),!1===a.wordWrap&&a.noWordWrapClassName&&c.push(a.noWordWrapClassName),!l&&a.placeholder&&c.push(a.placeholderCellClassName),(0,n.vy)(e,d),(0,n.iQ)(e,c),(0,n.De)(e,u),(0,n.Bq)(e,g)}r.RENDERER_TYPE="base"},9504:(t,e,o)=>{var n=o(616),i=Function.prototype,r=i.call,s=n&&i.bind.bind(r,r);t.exports=n?s:function(t){return function(){return r.apply(t,arguments)}}},9519:(t,e,o)=>{var n,i,r=o(4576),s=o(2839),l=r.process,a=r.Deno,h=l&&l.versions||a&&a.version,c=h&&h.v8;c&&(i=(n=c.split("."))[0]>0&&n[0]<4?1:+(n[0]+n[1])),!i&&s&&(!(n=s.match(/Edge\/(\d+)/))||n[1]>=74)&&(n=s.match(/Chrome\/(\d+)/))&&(i=+n[1]),t.exports=i},9539:(t,e,o)=>{var n=o(9565),i=o(8551),r=o(5966);t.exports=function(t,e,o){var s,l;i(t);try{if(!(s=r(t,"return"))){if("throw"===e)throw o;return o}s=n(s,t)}catch(t){l=!0,s=t}if("throw"===e)throw o;if(l)throw s;return i(s),o}},9544:(t,e,o)=>{var n=o(2839);t.exports=/(?:ipad|iphone|ipod).*applewebkit/i.test(n)},9565:(t,e,o)=>{var n=o(616),i=Function.prototype.call;t.exports=n?i.bind(i):function(){return i.apply(i,arguments)}},9617:(t,e,o)=>{var n=o(5397),i=o(5610),r=o(6198),s=function(t){return function(e,o,s){var l=n(e),a=r(l);if(0===a)return!t&&-1;var h,c=i(s,a);if(t&&o!=o){for(;a>c;)if((h=l[c++])!=h)return!0}else for(;a>c;c++)if((t||c in l)&&l[c]===o)return t||c||0;return!t&&-1}};t.exports={includes:s(!0),indexOf:s(!1)}},9720:(t,e,o)=>{o.d(e,{B:()=>n,b:()=>i});const n="gridDefault",i="editorManager.handlingEditor"},9738:(t,e,o)=>{var n=o(6518),i=o(9504),r=o(7750),s=o(1291),l=o(655),a=o(9039),h=i("".charAt);n({target:"String",proto:!0,forced:a((function(){return"\ud842"!=="𠮷".at(-2)}))},{at:function(t){var e=l(r(this)),o=e.length,n=s(t),i=n>=0?n:o+n;return i<0||i>=o?void 0:h(e,i)}})},9848:(t,e,o)=>{o(6368),o(9309)},9978:(t,e,o)=>{var n=o(6518),i=o(9565),r=o(9504),s=o(7750),l=o(4901),a=o(34),h=o(788),c=o(655),d=o(5966),u=o(1034),g=o(2478),f=o(8227),p=o(6395),m=f("replace"),w=TypeError,b=r("".indexOf),v=r("".replace),y=r("".slice),C=Math.max;n({target:"String",proto:!0},{replaceAll:function(t,e){var o,n,r,f,S,R,E,T,x,M,I=s(this),H=0,O="";if(a(t)){if((o=h(t))&&(n=c(s(u(t))),!~b(n,"g")))throw new w("`.replaceAll` does not allow non-global regexes");if(r=d(t,m))return i(r,t,I,e);if(p&&o)return v(c(I),t,e)}for(f=c(I),S=c(t),(R=l(e))||(e=c(e)),E=S.length,T=C(1,E),x=b(f,S);-1!==x;)M=R?c(e(S,x,f)):g(S,f,x,[],void 0,e),O+=y(f,H,x)+M,H=x+E,x=x+T>f.length?-1:b(f,S,x+T);return H<f.length&&(O+=y(f,H)),O}})}}]);
|