handsontable 19.0.0-rc2 → 19.0.0-rc4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +7 -2
- package/base.js +2 -2
- package/base.mjs +2 -2
- package/core/license.js +2 -2
- package/core/license.mjs +2 -2
- package/core.js +7 -8
- package/core.mjs +7 -8
- package/dist/handsontable.full.js +21 -22
- package/dist/handsontable.full.min.js +7 -7
- package/dist/handsontable.js +21 -22
- package/dist/handsontable.min.js +7 -7
- package/dist/handsontable.settings-schema.js +7 -7
- package/dist/handsontable.settings-schema.min.js +2 -2
- package/dist/manifest.json +1 -1
- package/dist/themes/classic.js +2 -2
- package/dist/themes/classic.min.js +2 -2
- package/dist/themes/horizon.js +2 -2
- package/dist/themes/horizon.min.js +2 -2
- package/dist/themes/main.js +2 -2
- package/dist/themes/main.min.js +2 -2
- package/dist/themes/static/variables/colors/ant.js +2 -2
- package/dist/themes/static/variables/colors/ant.min.js +2 -2
- package/dist/themes/static/variables/colors/classic.js +2 -2
- package/dist/themes/static/variables/colors/classic.min.js +2 -2
- package/dist/themes/static/variables/colors/horizon.js +2 -2
- package/dist/themes/static/variables/colors/horizon.min.js +2 -2
- package/dist/themes/static/variables/colors/main.js +2 -2
- package/dist/themes/static/variables/colors/main.min.js +2 -2
- package/dist/themes/static/variables/colors/material.js +2 -2
- package/dist/themes/static/variables/colors/material.min.js +2 -2
- package/dist/themes/static/variables/colors/shadcn.js +2 -2
- package/dist/themes/static/variables/colors/shadcn.min.js +2 -2
- package/dist/themes/static/variables/density.js +2 -2
- package/dist/themes/static/variables/density.min.js +2 -2
- package/dist/themes/static/variables/helpers/iconStyles.js +2 -2
- package/dist/themes/static/variables/helpers/iconStyles.min.js +2 -2
- package/dist/themes/static/variables/helpers/iconsMap.js +2 -2
- package/dist/themes/static/variables/helpers/iconsMap.min.js +2 -2
- package/dist/themes/static/variables/icons/horizon.js +2 -2
- package/dist/themes/static/variables/icons/horizon.min.js +2 -2
- package/dist/themes/static/variables/icons/main.js +2 -2
- package/dist/themes/static/variables/icons/main.min.js +2 -2
- package/dist/themes/static/variables/sizing.js +2 -2
- package/dist/themes/static/variables/sizing.min.js +2 -2
- package/dist/themes/static/variables/tokens/classic.js +2 -2
- package/dist/themes/static/variables/tokens/classic.min.js +2 -2
- package/dist/themes/static/variables/tokens/horizon.js +2 -2
- package/dist/themes/static/variables/tokens/horizon.min.js +2 -2
- package/dist/themes/static/variables/tokens/main.js +2 -2
- package/dist/themes/static/variables/tokens/main.min.js +2 -2
- package/helpers/mixed.js +5 -5
- package/helpers/mixed.mjs +5 -5
- package/package.json +1 -1
- package/plugins/formulas/formulas.d.ts +2 -2
- package/plugins/formulas/formulas.js +2 -2
- package/plugins/formulas/formulas.mjs +2 -2
- package/styles/handsontable.css +2 -2
- package/styles/handsontable.min.css +2 -2
- package/styles/handsontableStyles.d.ts +1 -1
- package/styles/handsontableStyles.js +1 -1
- package/styles/handsontableStyles.mjs +1 -1
- package/styles/ht-icons-horizon.min.css +2 -2
- package/styles/ht-icons-main.min.css +2 -2
- package/styles/ht-theme-classic-no-icons.min.css +2 -2
- package/styles/ht-theme-classic.min.css +2 -2
- package/styles/ht-theme-horizon-no-icons.min.css +2 -2
- package/styles/ht-theme-horizon.min.css +2 -2
- package/styles/ht-theme-main-no-icons.min.css +2 -2
- package/styles/ht-theme-main.min.css +2 -2
- package/utils/licenseNotification.js +2 -2
- package/utils/licenseNotification.mjs +2 -2
|
@@ -25,8 +25,8 @@
|
|
|
25
25
|
* INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY CHARACTER ARISING FROM
|
|
26
26
|
* USE OR INABILITY TO USE THIS SOFTWARE.
|
|
27
27
|
*
|
|
28
|
-
* Version: 19.0.0-
|
|
29
|
-
* Release date:
|
|
28
|
+
* Version: 19.0.0-rc4
|
|
29
|
+
* Release date: 20/11/2026 (built at 20/11/2026 12:42:43)
|
|
30
30
|
*/
|
|
31
31
|
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define("Handsontable",[],t):"object"==typeof exports?exports.Handsontable=t():e.Handsontable=t()}("u">typeof self?self:this,()=>(()=>{var e={603(e,t,r){"use strict";r.r(t),r.d(t,{EOF:()=>ev,LexerDefinitionErrorType:()=>y,NoViableAltException:()=>t_,Parser:()=>rs,resolveGrammar:()=>tE,defaultParserErrorProvider:()=>tb,EarlyExitException:()=>tD,CstParser:()=>rl,Option:()=>eN,createSyntaxDiagramsCode:()=>rh,Alternation:()=>eP,assignOccurrenceIndices:()=>tx,ParserDefinitionErrorType:()=>S,GAstVisitor:()=>ez,Rule:()=>eM,defaultGrammarValidatorErrorProvider:()=>tS,defaultGrammarResolverErrorProvider:()=>tC,tokenMatcher:()=>eE,clearCache:()=>rw,RepetitionMandatory:()=>eO,Terminal:()=>eD,RepetitionMandatoryWithSeparator:()=>ek,createTokenInstance:()=>eR,RepetitionWithSeparator:()=>e_,defaultLexerErrorProvider:()=>es,MismatchedTokenException:()=>tH,Repetition:()=>eH,tokenLabel:()=>eh,validateGrammar:()=>tT,NotAllInputParsedException:()=>tP,tokenName:()=>ed,Lexer:()=>ea,generateParserModule:()=>rf,NonTerminal:()=>eA,EMPTY_ALT:()=>ro,generateParserFactory:()=>rm,EmbeddedActionsParser:()=>ra,isRecognitionException:()=>tk,createToken:()=>eC,serializeGrammar:()=>eL,Flat:()=>eI,serializeProduction:()=>eF,VERSION:()=>v});var i,n,o,s,l,a,h,d,u,c,g,p,m,f,w,y,b,C,S,v="6.5.0",R=r(642),E=r(713),T={},x=new E.RegExpParser;function A(e){var t=e.toString();if(T.hasOwnProperty(t))return T[t];var r=x.pattern(t);return T[t]=r,r}var M=(i=function(e,t){return(i=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),I="Complement Sets are not supported for first char optimization",N='Unable to use "first char" lexer optimizations:\n';function O(e,t,r){var i=X(e);t[i]=i,!0===r&&function(e,t){var r=String.fromCharCode(e),i=r.toUpperCase();if(i!==r){var n=X(i.charCodeAt(0));t[n]=n}else{var o=r.toLowerCase();if(o!==r){var n=X(o.charCodeAt(0));t[n]=n}}}(e,t)}function k(e,t){return(0,R.I6)(e.value,function(e){return"number"==typeof e?(0,R.gR)(t,e):void 0!==(0,R.I6)(t,function(t){return e.from<=t&&t<=e.to})})}var H=function(e){function t(t){var r=e.call(this)||this;return r.targetCharCodes=t,r.found=!1,r}return M(t,e),t.prototype.visitChildren=function(t){if(!0!==this.found){switch(t.type){case"Lookahead":this.visitLookahead(t);return;case"NegativeLookahead":this.visitNegativeLookahead(t);return}e.prototype.visitChildren.call(this,t)}},t.prototype.visitCharacter=function(e){(0,R.gR)(this.targetCharCodes,e.value)&&(this.found=!0)},t.prototype.visitSet=function(e){e.complement?void 0===k(e,this.targetCharCodes)&&(this.found=!0):void 0!==k(e,this.targetCharCodes)&&(this.found=!0)},t}(E.BaseRegExpVisitor);function _(e,t){if(!(t instanceof RegExp))return void 0!==(0,R.I6)(t,function(t){return(0,R.gR)(e,t.charCodeAt(0))});var r=A(t),i=new H(e);return i.visit(r),i.found}var P=(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),D="PATTERN",L="defaultMode",F="modes",B="boolean"==typeof RegExp("(?:)").sticky,V=/[^\\][\$]/,z=/[^\\[][\^]|^\^/;function U(e){var t=e.ignoreCase?"i":"";return RegExp("^(?:"+e.source+")",t)}function W(e){var t=e.ignoreCase?"iy":"y";return RegExp(""+e.source,t)}function $(e){var t=e.PATTERN;if((0,R.gd)(t))return!1;if((0,R.Tn)(t))return!0;if((0,R.zy)(t,"exec"))return!0;if((0,R.Kg)(t))return!1;throw Error("non exhaustive match")}function G(e){return!!(0,R.Kg)(e)&&1===e.length&&e.charCodeAt(0)}var j={test:function(e){for(var t=e.length,r=this.lastIndex;r<t;r++){var i=e.charCodeAt(r);if(10===i)return this.lastIndex=r+1,!0;if(13===i)return 10===e.charCodeAt(r+1)?this.lastIndex=r+2:this.lastIndex=r+1,!0}return!1},lastIndex:0};function Y(e,t){if((0,R.zy)(e,"LINE_BREAKS"))return!1;if((0,R.gd)(e.PATTERN)){try{_(t,e.PATTERN)}catch(e){return{issue:y.IDENTIFY_TERMINATOR,errMsg:e.message}}return!1}if((0,R.Kg)(e.PATTERN))return!1;if($(e))return{issue:y.CUSTOM_LINE_BREAK};throw Error("non exhaustive match")}function K(e){return(0,R.Tj)(e,function(e){return(0,R.Kg)(e)&&e.length>0?e.charCodeAt(0):e})}function q(e,t,r){void 0===e[t]?e[t]=[r]:e[t].push(r)}function X(e){return e<256?e:Q[e]}var Q=[];function Z(e,t){var r=e.tokenTypeIdx;return r===t.tokenTypeIdx||!0===t.isParent&&!0===t.categoryMatchesMap[r]}function J(e,t){return e.tokenTypeIdx===t.tokenTypeIdx}var ee=1,et={};function er(e){var t,r,i,n=function(e){for(var t=(0,R.T9)(e),r=e,i=!0;i;){r=(0,R.oE)((0,R.Bq)((0,R.Tj)(r,function(e){return e.CATEGORIES})));var n=(0,R.iv)(r,t);t=t.concat(n),(0,R.Im)(n)?i=!1:r=n}return t}(e);t=n,(0,R.jJ)(t,function(e){var t,r;ei(e)||(et[ee]=e,e.tokenTypeIdx=ee++),en(e)&&!(0,R.cy)(e.CATEGORIES)&&(e.CATEGORIES=[e.CATEGORIES]),en(e)||(e.CATEGORIES=[]),t=e,(0,R.zy)(t,"categoryMatches")||(e.categoryMatches=[]),r=e,(0,R.zy)(r,"categoryMatchesMap")||(e.categoryMatchesMap={})}),r=n,(0,R.jJ)(r,function(e){!function e(t,r){(0,R.jJ)(t,function(e){r.categoryMatchesMap[e.tokenTypeIdx]=!0}),(0,R.jJ)(r.CATEGORIES,function(i){var n=t.concat(r);(0,R.gR)(n,i)||e(n,i)})}([],e)}),i=n,(0,R.jJ)(i,function(e){e.categoryMatches=[],(0,R.jJ)(e.categoryMatchesMap,function(t,r){e.categoryMatches.push(et[r].tokenTypeIdx)})}),(0,R.jJ)(n,function(e){e.isParent=e.categoryMatches.length>0})}function ei(e){return(0,R.zy)(e,"tokenTypeIdx")}function en(e){return(0,R.zy)(e,"CATEGORIES")}function eo(e){return(0,R.zy)(e,"tokenTypeIdx")}var es={buildUnableToPopLexerModeMessage:function(e){return"Unable to pop Lexer Mode after encountering Token ->"+e.image+"<- The Mode Stack is empty"},buildUnexpectedCharactersMessage:function(e,t,r,i,n){return"unexpected character: ->"+e.charAt(t)+"<- at offset: "+t+", skipped "+r+" characters."}};(o=y||(y={}))[o.MISSING_PATTERN=0]="MISSING_PATTERN",o[o.INVALID_PATTERN=1]="INVALID_PATTERN",o[o.EOI_ANCHOR_FOUND=2]="EOI_ANCHOR_FOUND",o[o.UNSUPPORTED_FLAGS_FOUND=3]="UNSUPPORTED_FLAGS_FOUND",o[o.DUPLICATE_PATTERNS_FOUND=4]="DUPLICATE_PATTERNS_FOUND",o[o.INVALID_GROUP_TYPE_FOUND=5]="INVALID_GROUP_TYPE_FOUND",o[o.PUSH_MODE_DOES_NOT_EXIST=6]="PUSH_MODE_DOES_NOT_EXIST",o[o.MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE=7]="MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE",o[o.MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY=8]="MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY",o[o.MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST=9]="MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST",o[o.LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED=10]="LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED",o[o.SOI_ANCHOR_FOUND=11]="SOI_ANCHOR_FOUND",o[o.EMPTY_MATCH_PATTERN=12]="EMPTY_MATCH_PATTERN",o[o.NO_LINE_BREAKS_FLAGS=13]="NO_LINE_BREAKS_FLAGS",o[o.UNREACHABLE_PATTERN=14]="UNREACHABLE_PATTERN",o[o.IDENTIFY_TERMINATOR=15]="IDENTIFY_TERMINATOR",o[o.CUSTOM_LINE_BREAK=16]="CUSTOM_LINE_BREAK";var el={deferDefinitionErrorsHandling:!1,positionTracking:"full",lineTerminatorsPattern:/\n|\r\n?/g,lineTerminatorCharacters:["\n","\r"],ensureOptimizations:!1,safeMode:!1,errorMessageProvider:es,traceInitPerf:!1,skipValidations:!1};Object.freeze(el);var ea=function(){function e(e,t){var r=this;if(void 0===t&&(t=el),this.lexerDefinition=e,this.lexerDefinitionErrors=[],this.lexerDefinitionWarning=[],this.patternIdxToConfig={},this.charCodeToPatternIdxToConfig={},this.modes=[],this.emptyGroups={},this.config=void 0,this.trackStartLines=!0,this.trackEndLines=!0,this.hasCustom=!1,this.canModeBeOptimized={},"boolean"==typeof t)throw Error("The second argument to the Lexer constructor is now an ILexerConfig Object.\na boolean 2nd argument is no longer supported");this.config=(0,R.h1)(el,t);var i=this.config.traceInitPerf;!0===i?(this.traceInitMaxIdent=1/0,this.traceInitPerf=!0):"number"==typeof i&&(this.traceInitMaxIdent=i,this.traceInitPerf=!0),this.traceInitIndent=-1,this.TRACE_INIT("Lexer Constructor",function(){var i,n=!0;r.TRACE_INIT("Lexer Config handling",function(){if(r.config.lineTerminatorsPattern===el.lineTerminatorsPattern)r.config.lineTerminatorsPattern=j;else if(r.config.lineTerminatorCharacters===el.lineTerminatorCharacters)throw Error("Error: Missing <lineTerminatorCharacters> property on the Lexer config.\n For details See: https://sap.github.io/chevrotain/docs/guide/resolving_lexer_errors.html#MISSING_LINE_TERM_CHARS");if(t.safeMode&&t.ensureOptimizations)throw Error('"safeMode" and "ensureOptimizations" flags are mutually exclusive.');r.trackStartLines=/full|onlyStart/i.test(r.config.positionTracking),r.trackEndLines=/full/i.test(r.config.positionTracking),(0,R.cy)(e)?((i={modes:{}}).modes[L]=(0,R.T9)(e),i[L]=L):(n=!1,i=(0,R.lR)(e))}),!1===r.config.skipValidations&&(r.TRACE_INIT("performRuntimeChecks",function(){var e,t;r.lexerDefinitionErrors=r.lexerDefinitionErrors.concat((e=i,r.trackStartLines,r.config.lineTerminatorCharacters,t=[],(0,R.zy)(e,L)||t.push({message:"A MultiMode Lexer cannot be initialized without a <"+L+"> property in its definition\n",type:y.MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE}),(0,R.zy)(e,F)||t.push({message:"A MultiMode Lexer cannot be initialized without a <"+F+"> property in its definition\n",type:y.MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY}),(0,R.zy)(e,F)&&(0,R.zy)(e,L)&&!(0,R.zy)(e.modes,e.defaultMode)&&t.push({message:"A MultiMode Lexer cannot be initialized with a "+L+": <"+e.defaultMode+">which does not exist\n",type:y.MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST}),(0,R.zy)(e,F)&&(0,R.jJ)(e.modes,function(e,r){(0,R.jJ)(e,function(e,i){(0,R.b0)(e)&&t.push({message:"A Lexer cannot be initialized using an undefined Token Type. Mode:"+("<"+r+"> at index: <")+i+">\n",type:y.LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED})})}),t))}),r.TRACE_INIT("performWarningRuntimeChecks",function(){var e,t,n,o,s,l,a,h;r.lexerDefinitionWarning=r.lexerDefinitionWarning.concat((e=i,t=r.trackStartLines,n=r.config.lineTerminatorCharacters,o=[],s=!1,l=(0,R.oE)((0,R.Bq)((0,R.LG)(e.modes,function(e){return e}))),a=(0,R.ku)(l,function(e){return e[D]===ea.NA}),h=K(n),t&&(0,R.jJ)(a,function(e){var t=Y(e,h);if(!1!==t){var r={message:function(e,t){if(t.issue===y.IDENTIFY_TERMINATOR)return"Warning: unable to identify line terminator usage in pattern.\n The problem is in the <"+e.name+"> Token Type\n Root cause: "+t.errMsg+".\n For details See: https://sap.github.io/chevrotain/docs/guide/resolving_lexer_errors.html#IDENTIFY_TERMINATOR";if(t.issue===y.CUSTOM_LINE_BREAK)return"Warning: A Custom Token Pattern should specify the <line_breaks> option.\n The problem is in the <"+e.name+"> Token Type\n For details See: https://sap.github.io/chevrotain/docs/guide/resolving_lexer_errors.html#CUSTOM_LINE_BREAK";throw Error("non exhaustive match")}(e,t),type:t.issue,tokenType:e};o.push(r)}else(0,R.zy)(e,"LINE_BREAKS")?!0===e.LINE_BREAKS&&(s=!0):_(h,e.PATTERN)&&(s=!0)}),t&&!s&&o.push({message:"Warning: No LINE_BREAKS Found.\n This Lexer has been defined to track line and column information,\n But none of the Token Types can be identified as matching a line terminator.\n See https://sap.github.io/chevrotain/docs/guide/resolving_lexer_errors.html#LINE_BREAKS \n for details.",type:y.NO_LINE_BREAKS_FLAGS}),o))})),i.modes=i.modes?i.modes:{},(0,R.jJ)(i.modes,function(e,t){i.modes[t]=(0,R.ku)(e,function(e){return(0,R.b0)(e)})});var o=(0,R.HP)(i.modes);if((0,R.jJ)(i.modes,function(e,i){r.TRACE_INIT("Mode: <"+i+"> processing",function(){if(r.modes.push(i),!1===r.config.skipValidations&&r.TRACE_INIT("validatePatterns",function(){var t,i,n,s,l,a,h,d,u,c,g,p,m,f,w,b,C,S,v,T,x,M,I,N,O,k,H,_,L,F,B,U,W;r.lexerDefinitionErrors=r.lexerDefinitionErrors.concat((t=[],l=e,a=(0,R.pb)(l,function(e){return!(0,R.zy)(e,D)}),i={errors:(0,R.Tj)(a,function(e){return{message:"Token Type: ->"+e.name+"<- missing static 'PATTERN' property",type:y.MISSING_PATTERN,tokenTypes:[e]}}),valid:(0,R.iv)(l,a)},t=t.concat(i.errors),s=(h=i.valid,d=(0,R.pb)(h,function(e){var t=e[D];return!(0,R.gd)(t)&&!(0,R.Tn)(t)&&!(0,R.zy)(t,"exec")&&!(0,R.Kg)(t)}),n={errors:(0,R.Tj)(d,function(e){return{message:"Token Type: ->"+e.name+"<- static 'PATTERN' can only be a RegExp, a Function matching the {CustomPatternMatcherFunc} type or an Object matching the {ICustomPattern} interface.",type:y.INVALID_PATTERN,tokenTypes:[e]}}),valid:(0,R.iv)(h,d)}).valid,t=(t=(t=(t=(t=t.concat(n.errors)).concat((u=s,c=[],g=(0,R.pb)(u,function(e){return(0,R.gd)(e[D])}),(c=(c=(c=(c=c.concat((p=g,m=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.found=!1,t}return P(t,e),t.prototype.visitEndAnchor=function(e){this.found=!0},t}(E.BaseRegExpVisitor),f=(0,R.pb)(p,function(e){var t=e[D];try{var r=A(t),i=new m;return i.visit(r),i.found}catch(e){return V.test(t.source)}}),(0,R.Tj)(f,function(e){return{message:"Unexpected RegExp Anchor Error:\n Token Type: ->"+e.name+"<- static 'PATTERN' cannot contain end of input anchor '$'\n See sap.github.io/chevrotain/docs/guide/resolving_lexer_errors.html#ANCHORS for details.",type:y.EOI_ANCHOR_FOUND,tokenTypes:[e]}})))).concat((w=g,b=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.found=!1,t}return P(t,e),t.prototype.visitStartAnchor=function(e){this.found=!0},t}(E.BaseRegExpVisitor),C=(0,R.pb)(w,function(e){var t=e[D];try{var r=A(t),i=new b;return i.visit(r),i.found}catch(e){return z.test(t.source)}}),(0,R.Tj)(C,function(e){return{message:"Unexpected RegExp Anchor Error:\n Token Type: ->"+e.name+"<- static 'PATTERN' cannot contain start of input anchor '^'\n See https://sap.github.io/chevrotain/docs/guide/resolving_lexer_errors.html#ANCHORS for details.",type:y.SOI_ANCHOR_FOUND,tokenTypes:[e]}})))).concat((S=g,v=(0,R.pb)(S,function(e){var t=e[D];return t instanceof RegExp&&(t.multiline||t.global)}),(0,R.Tj)(v,function(e){return{message:"Token Type: ->"+e.name+"<- static 'PATTERN' may NOT contain global('g') or multiline('m')",type:y.UNSUPPORTED_FLAGS_FOUND,tokenTypes:[e]}})))).concat((T=g,x=[],M=(0,R.Tj)(T,function(e){return(0,R.TS)(T,function(t,r){return e.PATTERN.source!==r.PATTERN.source||(0,R.gR)(x,r)||r.PATTERN===ea.NA||(x.push(r),t.push(r)),t},[])}),M=(0,R.oE)(M),I=(0,R.pb)(M,function(e){return e.length>1}),(0,R.Tj)(I,function(e){var t=(0,R.Tj)(e,function(e){return e.name});return{message:"The same RegExp pattern ->"+(0,R.$1)(e).PATTERN+"<-has been used in all of the following Token Types: "+t.join(", ")+" <-",type:y.DUPLICATE_PATTERNS_FOUND,tokenTypes:e}})))).concat((N=g,O=(0,R.pb)(N,function(e){return e[D].test("")}),(0,R.Tj)(O,function(e){return{message:"Token Type: ->"+e.name+"<- static 'PATTERN' must not match an empty string",type:y.EMPTY_MATCH_PATTERN,tokenTypes:[e]}})))))).concat((k=s,H=(0,R.pb)(k,function(e){if(!(0,R.zy)(e,"GROUP"))return!1;var t=e.GROUP;return t!==ea.SKIPPED&&t!==ea.NA&&!(0,R.Kg)(t)}),(0,R.Tj)(H,function(e){return{message:"Token Type: ->"+e.name+"<- static 'GROUP' can only be Lexer.SKIPPED/Lexer.NA/A String",type:y.INVALID_GROUP_TYPE_FOUND,tokenTypes:[e]}})))).concat((_=s,L=o,F=(0,R.pb)(_,function(e){return void 0!==e.PUSH_MODE&&!(0,R.gR)(L,e.PUSH_MODE)}),(0,R.Tj)(F,function(e){return{message:"Token Type: ->"+e.name+"<- static 'PUSH_MODE' value cannot refer to a Lexer Mode ->"+e.PUSH_MODE+"<-which does not exist",type:y.PUSH_MODE_DOES_NOT_EXIST,tokenTypes:[e]}})))).concat((B=s,U=[],W=(0,R.TS)(B,function(e,t,r){var i,n=t.PATTERN;return n===ea.NA||((0,R.Kg)(n)?e.push({str:n,idx:r,tokenType:t}):(0,R.gd)(n)&&(i=n,void 0===(0,R.I6)([".","\\","[","]","|","^","$","(",")","?","*","+","{"],function(e){return -1!==i.source.indexOf(e)}))&&e.push({str:n.source,idx:r,tokenType:t})),e},[]),(0,R.jJ)(B,function(e,t){(0,R.jJ)(W,function(r){var i=r.str,n=r.idx,o=r.tokenType;if(t<n&&function(e,t){if((0,R.gd)(t)){var r=t.exec(e);return null!==r&&0===r.index}if((0,R.Tn)(t))return t(e,0,[],{});if((0,R.zy)(t,"exec"))return t.exec(e,0,[],{});if("string"==typeof t)return t===e;throw Error("non exhaustive match")}(i,e.PATTERN)){var s="Token: ->"+o.name+"<- can never be matched.\nBecause it appears AFTER the Token Type ->"+e.name+"<-in the lexer's definition.\nSee https://sap.github.io/chevrotain/docs/guide/resolving_lexer_errors.html#UNREACHABLE";U.push({message:s,type:y.UNREACHABLE_PATTERN,tokenTypes:[e,o]})}})}),U))))}),(0,R.Im)(r.lexerDefinitionErrors)){var n;er(e),r.TRACE_INIT("analyzeTokenTypes",function(){var i,o,s,l,a,h,d,u,c,g,p,m,f,w,y,b,C;i={lineTerminatorCharacters:r.config.lineTerminatorCharacters,positionTracking:t.positionTracking,ensureOptimizations:t.ensureOptimizations,safeMode:t.safeMode,tracer:r.TRACE_INIT.bind(r)},(w=(i=(0,R.NT)(i,{useSticky:B,debug:!1,safeMode:!1,positionTracking:"full",lineTerminatorCharacters:["\r","\n"],tracer:function(e,t){return t()}})).tracer)("initCharCodeToOptimizedIndexMap",function(){if((0,R.Im)(Q)){Q=Array(65536);for(var e=0;e<65536;e++)Q[e]=e>255?255+~~(e/255):e}}),w("Reject Lexer.NA",function(){o=(0,R.ku)(e,function(e){return e[D]===ea.NA})}),y=!1,w("Transform Patterns",function(){y=!1,s=(0,R.Tj)(o,function(e){var t=e[D];if((0,R.gd)(t)){var r=t.source;return 1===r.length&&"^"!==r&&"$"!==r&&"."!==r?r:2!==r.length||"\\"!==r[0]||(0,R.gR)(["d","D","s","S","t","r","n","t","0","c","b","B","f","v","w","W"],r[1])?i.useSticky?W(t):U(t):r[1]}if((0,R.Tn)(t))return y=!0,{exec:t};if((0,R.zy)(t,"exec"))return y=!0,t;if("string"==typeof t)if(1===t.length)return t;else{var n=new RegExp(t.replace(/[\\^$.*+?()[\]{}|]/g,"\\$&"));return i.useSticky?W(n):U(n)}throw Error("non exhaustive match")})}),w("misc mapping",function(){l=(0,R.Tj)(o,function(e){return e.tokenTypeIdx}),a=(0,R.Tj)(o,function(e){var t=e.GROUP;if(t!==ea.SKIPPED){if((0,R.Kg)(t))return t;if((0,R.b0)(t))return!1;throw Error("non exhaustive match")}}),h=(0,R.Tj)(o,function(e){var t=e.LONGER_ALT;if(t)return(0,R.qh)(o,t)}),d=(0,R.Tj)(o,function(e){return e.PUSH_MODE}),u=(0,R.Tj)(o,function(e){return(0,R.zy)(e,"POP_MODE")})}),w("Line Terminator Handling",function(){var e=K(i.lineTerminatorCharacters);c=(0,R.Tj)(o,function(e){return!1}),"onlyOffset"!==i.positionTracking&&(c=(0,R.Tj)(o,function(t){return(0,R.zy)(t,"LINE_BREAKS")?t.LINE_BREAKS:!1===Y(t,e)?_(e,t.PATTERN):void 0}))}),w("Misc Mapping #2",function(){g=(0,R.Tj)(o,$),p=(0,R.Tj)(s,G),m=(0,R.TS)(o,function(e,t){var r=t.GROUP;return(0,R.Kg)(r)&&r!==ea.SKIPPED&&(e[r]=[]),e},{}),f=(0,R.Tj)(s,function(e,t){return{pattern:s[t],longerAlt:h[t],canLineTerminator:c[t],isCustom:g[t],short:p[t],group:a[t],push:d[t],pop:u[t],tokenTypeIdx:l[t],tokenType:o[t]}})}),b=!0,C=[],i.safeMode||w("First Char Optimization",function(){C=(0,R.TS)(o,function(e,t,r){if("string"==typeof t.PATTERN){var n;q(e,X(t.PATTERN.charCodeAt(0)),f[r])}else if((0,R.cy)(t.START_CHARS_HINT))(0,R.jJ)(t.START_CHARS_HINT,function(t){var i=X("string"==typeof t?t.charCodeAt(0):t);n!==i&&(n=i,q(e,i,f[r]))});else if((0,R.gd)(t.PATTERN))if(t.PATTERN.unicode)b=!1,i.ensureOptimizations&&(0,R.Zi)(""+N+" Unable to analyze < "+t.PATTERN.toString()+" > pattern.\n The regexp unicode flag is not currently supported by the regexp-to-ast library.\n This will disable the lexer's first char optimizations.\n For details See: https://sap.github.io/chevrotain/docs/guide/resolving_lexer_errors.html#UNICODE_OPTIMIZE");else{var o=function(e,t){void 0===t&&(t=!1);try{var r=A(e);return function e(t,r,i){switch(t.type){case"Disjunction":for(var n=0;n<t.value.length;n++)e(t.value[n],r,i);break;case"Alternative":for(var o=t.value,n=0;n<o.length;n++){var s=o[n];switch(s.type){case"EndAnchor":case"GroupBackReference":case"Lookahead":case"NegativeLookahead":case"StartAnchor":case"WordBoundary":case"NonWordBoundary":continue}switch(s.type){case"Character":O(s.value,r,i);break;case"Set":if(!0===s.complement)throw Error(I);(0,R.jJ)(s.value,function(e){if("number"==typeof e)O(e,r,i);else if(!0===i)for(var t=e.from;t<=e.to;t++)O(t,r,i);else{for(var t=e.from;t<=e.to&&t<256;t++)O(t,r,i);if(e.to>=256)for(var n=e.from>=256?e.from:256,o=e.to,s=X(n),l=X(o),a=s;a<=l;a++)r[a]=a}});break;case"Group":e(s.value,r,i);break;default:throw Error("Non Exhaustive Match")}var l=void 0!==s.quantifier&&0===s.quantifier.atLeast;if("Group"===s.type&&!1===function e(t){return!!t.quantifier&&0===t.quantifier.atLeast||!!t.value&&((0,R.cy)(t.value)?(0,R.Si)(t.value,e):e(t.value))}(s)||"Group"!==s.type&&!1===l)break}break;default:throw Error("non exhaustive match!")}return(0,R.zu)(r)}(r.value,{},r.flags.ignoreCase)}catch(r){if(r.message===I)t&&(0,R.x5)(""+N+" Unable to optimize: < "+e.toString()+" >\n Complement Sets cannot be automatically optimized.\n This will disable the lexer's first char optimizations.\n See: https://sap.github.io/chevrotain/docs/guide/resolving_lexer_errors.html#COMPLEMENT for details.");else{var i="";t&&(i="\n This will disable the lexer's first char optimizations.\n See: https://sap.github.io/chevrotain/docs/guide/resolving_lexer_errors.html#REGEXP_PARSING for details."),(0,R.Zi)(N+"\n Failed parsing: < "+e.toString()+" >\n Using the regexp-to-ast library version: "+E.VERSION+"\n Please open an issue at: https://github.com/bd82/regexp-to-ast/issues"+i)}}return[]}(t.PATTERN,i.ensureOptimizations);(0,R.Im)(o)&&(b=!1),(0,R.jJ)(o,function(t){q(e,t,f[r])})}else i.ensureOptimizations&&(0,R.Zi)(""+N+" TokenType: <"+t.name+"> is using a custom token pattern without providing <start_chars_hint> parameter.\n This will disable the lexer's first char optimizations.\n For details See: https://sap.github.io/chevrotain/docs/guide/resolving_lexer_errors.html#CUSTOM_OPTIMIZE"),b=!1;return e},[])}),w("ArrayPacking",function(){C=(0,R.VS)(C)}),n={emptyGroups:m,patternIdxToConfig:f,charCodeToPatternIdxToConfig:C,hasCustom:y,canBeOptimized:b}}),r.patternIdxToConfig[i]=n.patternIdxToConfig,r.charCodeToPatternIdxToConfig[i]=n.charCodeToPatternIdxToConfig,r.emptyGroups=(0,R.h1)(r.emptyGroups,n.emptyGroups),r.hasCustom=n.hasCustom||r.hasCustom,r.canModeBeOptimized[i]=n.canBeOptimized}})}),r.defaultMode=i.defaultMode,!(0,R.Im)(r.lexerDefinitionErrors)&&!r.config.deferDefinitionErrorsHandling)throw Error("Errors detected in definition of Lexer:\n"+(0,R.Tj)(r.lexerDefinitionErrors,function(e){return e.message}).join("-----------------------\n"));(0,R.jJ)(r.lexerDefinitionWarning,function(e){(0,R.x5)(e.message)}),r.TRACE_INIT("Choosing sub-methods implementations",function(){if(B?(r.chopInput=R.zK,r.match=r.matchWithTest):(r.updateLastIndex=R.tE,r.match=r.matchWithExec),n&&(r.handleModes=R.tE),!1===r.trackStartLines&&(r.computeNewColumn=R.zK),!1===r.trackEndLines&&(r.updateTokenEndLineColumnLocation=R.tE),/full/i.test(r.config.positionTracking))r.createTokenInstance=r.createFullToken;else if(/onlyStart/i.test(r.config.positionTracking))r.createTokenInstance=r.createStartOnlyToken;else if(/onlyOffset/i.test(r.config.positionTracking))r.createTokenInstance=r.createOffsetOnlyToken;else throw Error('Invalid <positionTracking> config option: "'+r.config.positionTracking+'"');r.hasCustom?(r.addToken=r.addTokenUsingPush,r.handlePayload=r.handlePayloadWithCustom):(r.addToken=r.addTokenUsingMemberAccess,r.handlePayload=r.handlePayloadNoCustom)}),r.TRACE_INIT("Failed Optimization Warnings",function(){var e=(0,R.TS)(r.canModeBeOptimized,function(e,t,r){return!1===t&&e.push(r),e},[]);if(t.ensureOptimizations&&!(0,R.Im)(e))throw Error("Lexer Modes: < "+e.join(", ")+' > cannot be optimized.\n Disable the "ensureOptimizations" lexer config flag to silently ignore this and run the lexer in an un-optimized mode.\n Or inspect the console log for details on how to resolve these issues.')}),r.TRACE_INIT("clearRegExpParserCache",function(){T={}}),r.TRACE_INIT("toFastProperties",function(){(0,R.Bl)(r)})})}return e.prototype.tokenize=function(e,t){if(void 0===t&&(t=this.defaultMode),!(0,R.Im)(this.lexerDefinitionErrors))throw Error("Unable to Tokenize because Errors detected in definition of Lexer:\n"+(0,R.Tj)(this.lexerDefinitionErrors,function(e){return e.message}).join("-----------------------\n"));return this.tokenizeInternal(e,t)},e.prototype.tokenizeInternal=function(e,t){var r,i,n,o,s,l,a,h,d,u,c,g,p,m,f,w,y,b,C=this,S=e,v=S.length,E=0,T=0,x=Array(this.hasCustom?0:Math.floor(e.length/10)),A=[],M=this.trackStartLines?1:void 0,I=this.trackStartLines?1:void 0,N=(r=this.emptyGroups,i={},n=(0,R.HP)(r),(0,R.jJ)(n,function(e){var t=r[e];if((0,R.cy)(t))i[e]=[];else throw Error("non exhaustive match")}),i),O=this.trackStartLines,k=this.config.lineTerminatorsPattern,H=0,_=[],P=[],D=[],L=[];Object.freeze(L);var F=void 0;function B(){return _}function V(e){var t=P[X(e)];return void 0===t?L:t}var z=function(e){if(1===D.length&&void 0===e.tokenType.PUSH_MODE){var t=C.config.errorMessageProvider.buildUnableToPopLexerModeMessage(e);A.push({offset:e.startOffset,line:void 0!==e.startLine?e.startLine:void 0,column:void 0!==e.startColumn?e.startColumn:void 0,length:e.image.length,message:t})}else{D.pop();var r=(0,R.HV)(D);_=C.patternIdxToConfig[r],P=C.charCodeToPatternIdxToConfig[r],H=_.length;var i=C.canModeBeOptimized[r]&&!1===C.config.safeMode;F=P&&i?V:B}};function U(e){D.push(e),P=this.charCodeToPatternIdxToConfig[e],H=(_=this.patternIdxToConfig[e]).length,H=_.length;var t=this.canModeBeOptimized[e]&&!1===this.config.safeMode;F=P&&t?V:B}for(U.call(this,t);E<v;){h=null;var W=S.charCodeAt(E),$=F(W),G=$.length;for(o=0;o<G;o++){var j=(b=$[o]).pattern;d=null;var Y=b.short;if(!1!==Y?W===Y&&(h=j):!0===b.isCustom?null!==(y=j.exec(S,E,x,N))?(h=y[0],void 0!==y.payload&&(d=y.payload)):h=null:(this.updateLastIndex(j,E),h=this.match(j,e,E)),null!==h){if(void 0!==(a=b.longerAlt)){var K=_[a],q=K.pattern;u=null,!0===K.isCustom?null!==(y=q.exec(S,E,x,N))?(l=y[0],void 0!==y.payload&&(u=y.payload)):l=null:(this.updateLastIndex(q,E),l=this.match(q,e,E)),l&&l.length>h.length&&(h=l,d=u,b=K)}break}}if(null!==h){if(c=h.length,void 0!==(g=b.group)&&(p=b.tokenTypeIdx,m=this.createTokenInstance(h,E,p,b.tokenType,M,I,c),this.handlePayload(m,d),!1===g?T=this.addToken(x,T,m):N[g].push(m)),e=this.chopInput(e,c),E+=c,I=this.computeNewColumn(I,c),!0===O&&!0===b.canLineTerminator){var Q=0,Z=void 0,J=void 0;k.lastIndex=0;do!0===(Z=k.test(h))&&(J=k.lastIndex-1,Q++);while(!0===Z);0!==Q&&(M+=Q,I=c-J,this.updateTokenEndLineColumnLocation(m,g,J,Q,M,I,c))}this.handleModes(b,z,U,m)}else{for(var ee=E,et=M,er=I,ei=!1;!ei&&E<v;)for(S.charCodeAt(E),e=this.chopInput(e,1),E++,s=0;s<H;s++){var en=_[s],j=en.pattern,Y=en.short;if(!1!==Y?S.charCodeAt(E)===Y&&(ei=!0):!0===en.isCustom?ei=null!==j.exec(S,E,x,N):(this.updateLastIndex(j,E),ei=null!==j.exec(e)),!0===ei)break}f=E-ee,w=this.config.errorMessageProvider.buildUnexpectedCharactersMessage(S,ee,f,et,er),A.push({offset:ee,line:et,column:er,length:f,message:w})}}return this.hasCustom||(x.length=T),{tokens:x,groups:N,errors:A}},e.prototype.handleModes=function(e,t,r,i){if(!0===e.pop){var n=e.push;t(i),void 0!==n&&r.call(this,n)}else void 0!==e.push&&r.call(this,e.push)},e.prototype.chopInput=function(e,t){return e.substring(t)},e.prototype.updateLastIndex=function(e,t){e.lastIndex=t},e.prototype.updateTokenEndLineColumnLocation=function(e,t,r,i,n,o,s){var l,a;void 0!==t&&(a=(l=r===s-1)?-1:0,(1!==i||!0!==l)&&(e.endLine=n+a,e.endColumn=o-1+-a))},e.prototype.computeNewColumn=function(e,t){return e+t},e.prototype.createTokenInstance=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return null},e.prototype.createOffsetOnlyToken=function(e,t,r,i){return{image:e,startOffset:t,tokenTypeIdx:r,tokenType:i}},e.prototype.createStartOnlyToken=function(e,t,r,i,n,o){return{image:e,startOffset:t,startLine:n,startColumn:o,tokenTypeIdx:r,tokenType:i}},e.prototype.createFullToken=function(e,t,r,i,n,o,s){return{image:e,startOffset:t,endOffset:t+s-1,startLine:n,endLine:n,startColumn:o,endColumn:o+s-1,tokenTypeIdx:r,tokenType:i}},e.prototype.addToken=function(e,t,r){return 666},e.prototype.addTokenUsingPush=function(e,t,r){return e.push(r),t},e.prototype.addTokenUsingMemberAccess=function(e,t,r){return e[t]=r,++t},e.prototype.handlePayload=function(e,t){},e.prototype.handlePayloadNoCustom=function(e,t){},e.prototype.handlePayloadWithCustom=function(e,t){null!==t&&(e.payload=t)},e.prototype.match=function(e,t,r){return null},e.prototype.matchWithTest=function(e,t,r){return!0===e.test(t)?t.substring(r,e.lastIndex):null},e.prototype.matchWithExec=function(e,t){var r=e.exec(t);return null!==r?r[0]:r},e.prototype.TRACE_INIT=function(e,t){if(!0!==this.traceInitPerf)return t();this.traceInitIndent++;var r=Array(this.traceInitIndent+1).join(" ");this.traceInitIndent<this.traceInitMaxIdent&&console.log(r+"--\x3e <"+e+">");var i=(0,R.O1)(t),n=i.time,o=i.value,s=n>10?console.warn:console.log;return this.traceInitIndent<this.traceInitMaxIdent&&s(r+"<-- <"+e+"> time: "+n+"ms"),this.traceInitIndent--,o},e.SKIPPED="This marks a skipped Token pattern, this means each token identified by it willbe consumed and then thrown into oblivion, this can be used to for example to completely ignore whitespace.",e.NA=/NOT_APPLICABLE/,e}();function eh(e){return eu(e)?e.LABEL:e.name}function ed(e){return e.name}function eu(e){return(0,R.Kg)(e.LABEL)&&""!==e.LABEL}var ec="categories",eg="label",ep="group",em="push_mode",ef="pop_mode",ew="longer_alt",ey="line_breaks",eb="start_chars_hint";function eC(e){return eS(e)}function eS(e){var t=e.pattern,r={};if(r.name=e.name,(0,R.b0)(t)||(r.PATTERN=t),(0,R.zy)(e,"parent"))throw"The parent property is no longer supported.\nSee: https://github.com/SAP/chevrotain/issues/564#issuecomment-349062346 for details.";return(0,R.zy)(e,ec)&&(r.CATEGORIES=e[ec]),er([r]),(0,R.zy)(e,eg)&&(r.LABEL=e[eg]),(0,R.zy)(e,ep)&&(r.GROUP=e[ep]),(0,R.zy)(e,ef)&&(r.POP_MODE=e[ef]),(0,R.zy)(e,em)&&(r.PUSH_MODE=e[em]),(0,R.zy)(e,ew)&&(r.LONGER_ALT=e[ew]),(0,R.zy)(e,ey)&&(r.LINE_BREAKS=e[ey]),(0,R.zy)(e,eb)&&(r.START_CHARS_HINT=e[eb]),r}var ev=eS({name:"EOF",pattern:ea.NA});function eR(e,t,r,i,n,o,s,l){return{image:t,startOffset:r,endOffset:i,startLine:n,endLine:o,startColumn:s,endColumn:l,tokenTypeIdx:e.tokenTypeIdx,tokenType:e}}function eE(e,t){return Z(e,t)}er([ev]);var eT=(s=function(e,t){return(s=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}s(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),ex=function(){function e(e){this.definition=e}return e.prototype.accept=function(e){e.visit(this),(0,R.jJ)(this.definition,function(t){t.accept(e)})},e}(),eA=function(e){function t(t){var r=e.call(this,[])||this;return r.idx=1,(0,R.kp)(r,(0,R.Up)(t,function(e){return void 0!==e})),r}return eT(t,e),Object.defineProperty(t.prototype,"definition",{get:function(){return void 0!==this.referencedRule?this.referencedRule.definition:[]},set:function(e){},enumerable:!0,configurable:!0}),t.prototype.accept=function(e){e.visit(this)},t}(ex),eM=function(e){function t(t){var r=e.call(this,t.definition)||this;return r.orgText="",(0,R.kp)(r,(0,R.Up)(t,function(e){return void 0!==e})),r}return eT(t,e),t}(ex),eI=function(e){function t(t){var r=e.call(this,t.definition)||this;return r.ignoreAmbiguities=!1,(0,R.kp)(r,(0,R.Up)(t,function(e){return void 0!==e})),r}return eT(t,e),t}(ex),eN=function(e){function t(t){var r=e.call(this,t.definition)||this;return r.idx=1,(0,R.kp)(r,(0,R.Up)(t,function(e){return void 0!==e})),r}return eT(t,e),t}(ex),eO=function(e){function t(t){var r=e.call(this,t.definition)||this;return r.idx=1,(0,R.kp)(r,(0,R.Up)(t,function(e){return void 0!==e})),r}return eT(t,e),t}(ex),ek=function(e){function t(t){var r=e.call(this,t.definition)||this;return r.idx=1,(0,R.kp)(r,(0,R.Up)(t,function(e){return void 0!==e})),r}return eT(t,e),t}(ex),eH=function(e){function t(t){var r=e.call(this,t.definition)||this;return r.idx=1,(0,R.kp)(r,(0,R.Up)(t,function(e){return void 0!==e})),r}return eT(t,e),t}(ex),e_=function(e){function t(t){var r=e.call(this,t.definition)||this;return r.idx=1,(0,R.kp)(r,(0,R.Up)(t,function(e){return void 0!==e})),r}return eT(t,e),t}(ex),eP=function(e){function t(t){var r=e.call(this,t.definition)||this;return r.idx=1,r.ignoreAmbiguities=!1,r.hasPredicates=!1,(0,R.kp)(r,(0,R.Up)(t,function(e){return void 0!==e})),r}return eT(t,e),t}(ex),eD=function(){function e(e){this.idx=1,(0,R.kp)(this,(0,R.Up)(e,function(e){return void 0!==e}))}return e.prototype.accept=function(e){e.visit(this)},e}();function eL(e){return(0,R.Tj)(e,eF)}function eF(e){function t(e){return(0,R.Tj)(e,eF)}if(e instanceof eA)return{type:"NonTerminal",name:e.nonTerminalName,idx:e.idx};if(e instanceof eI)return{type:"Flat",definition:t(e.definition)};if(e instanceof eN)return{type:"Option",idx:e.idx,definition:t(e.definition)};if(e instanceof eO)return{type:"RepetitionMandatory",name:e.name,idx:e.idx,definition:t(e.definition)};if(e instanceof ek)return{type:"RepetitionMandatoryWithSeparator",name:e.name,idx:e.idx,separator:eF(new eD({terminalType:e.separator})),definition:t(e.definition)};else if(e instanceof e_)return{type:"RepetitionWithSeparator",name:e.name,idx:e.idx,separator:eF(new eD({terminalType:e.separator})),definition:t(e.definition)};else if(e instanceof eH)return{type:"Repetition",name:e.name,idx:e.idx,definition:t(e.definition)};else if(e instanceof eP)return{type:"Alternation",name:e.name,idx:e.idx,definition:t(e.definition)};else if(e instanceof eD){var r={type:"Terminal",name:e.terminalType.name,label:eh(e.terminalType),idx:e.idx},i=e.terminalType.PATTERN;return e.terminalType.PATTERN&&(r.pattern=(0,R.gd)(i)?i.source:i),r}else if(e instanceof eM)return{type:"Rule",name:e.name,orgText:e.orgText,definition:t(e.definition)};else throw Error("non exhaustive match")}var eB=function(){function e(){}return e.prototype.walk=function(e,t){var r=this;void 0===t&&(t=[]),(0,R.jJ)(e.definition,function(i,n){var o=(0,R.gv)(e.definition,n+1);if(i instanceof eA)r.walkProdRef(i,o,t);else if(i instanceof eD)r.walkTerminal(i,o,t);else if(i instanceof eI)r.walkFlat(i,o,t);else if(i instanceof eN)r.walkOption(i,o,t);else if(i instanceof eO)r.walkAtLeastOne(i,o,t);else if(i instanceof ek)r.walkAtLeastOneSep(i,o,t);else if(i instanceof e_)r.walkManySep(i,o,t);else if(i instanceof eH)r.walkMany(i,o,t);else if(i instanceof eP)r.walkOr(i,o,t);else throw Error("non exhaustive match")})},e.prototype.walkTerminal=function(e,t,r){},e.prototype.walkProdRef=function(e,t,r){},e.prototype.walkFlat=function(e,t,r){var i=t.concat(r);this.walk(e,i)},e.prototype.walkOption=function(e,t,r){var i=t.concat(r);this.walk(e,i)},e.prototype.walkAtLeastOne=function(e,t,r){var i=[new eN({definition:e.definition})].concat(t,r);this.walk(e,i)},e.prototype.walkAtLeastOneSep=function(e,t,r){var i=eV(e,t,r);this.walk(e,i)},e.prototype.walkMany=function(e,t,r){var i=[new eN({definition:e.definition})].concat(t,r);this.walk(e,i)},e.prototype.walkManySep=function(e,t,r){var i=eV(e,t,r);this.walk(e,i)},e.prototype.walkOr=function(e,t,r){var i=this,n=t.concat(r);(0,R.jJ)(e.definition,function(e){var t=new eI({definition:[e]});i.walk(t,n)})},e}();function eV(e,t,r){return[new eN({definition:[new eD({terminalType:e.separator})].concat(e.definition)})].concat(t,r)}var ez=function(){function e(){}return e.prototype.visit=function(e){switch(e.constructor){case eA:return this.visitNonTerminal(e);case eI:return this.visitFlat(e);case eN:return this.visitOption(e);case eO:return this.visitRepetitionMandatory(e);case ek:return this.visitRepetitionMandatoryWithSeparator(e);case e_:return this.visitRepetitionWithSeparator(e);case eH:return this.visitRepetition(e);case eP:return this.visitAlternation(e);case eD:return this.visitTerminal(e);case eM:return this.visitRule(e);default:throw Error("non exhaustive match")}},e.prototype.visitNonTerminal=function(e){},e.prototype.visitFlat=function(e){},e.prototype.visitOption=function(e){},e.prototype.visitRepetition=function(e){},e.prototype.visitRepetitionMandatory=function(e){},e.prototype.visitRepetitionMandatoryWithSeparator=function(e){},e.prototype.visitRepetitionWithSeparator=function(e){},e.prototype.visitAlternation=function(e){},e.prototype.visitTerminal=function(e){},e.prototype.visitRule=function(e){},e}(),eU=(l=function(e,t){return(l=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}l(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});function eW(e,t){return void 0===t&&(t=[]),e instanceof eN||e instanceof eH||e instanceof e_||(e instanceof eP?(0,R.zN)(e.definition,function(e){return eW(e,t)}):!(e instanceof eA&&(0,R.gR)(t,e))&&e instanceof ex&&(e instanceof eA&&t.push(e),(0,R.Si)(e.definition,function(e){return eW(e,t)})))}function e$(e){if(e instanceof eA)return"SUBRULE";if(e instanceof eN)return"OPTION";if(e instanceof eP)return"OR";if(e instanceof eO)return"AT_LEAST_ONE";if(e instanceof ek)return"AT_LEAST_ONE_SEP";else if(e instanceof e_)return"MANY_SEP";else if(e instanceof eH)return"MANY";else if(e instanceof eD)return"CONSUME";else throw Error("non exhaustive match")}var eG=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.separator="-",t.dslMethods={option:[],alternation:[],repetition:[],repetitionWithSeparator:[],repetitionMandatory:[],repetitionMandatoryWithSeparator:[]},t}return eU(t,e),t.prototype.reset=function(){this.dslMethods={option:[],alternation:[],repetition:[],repetitionWithSeparator:[],repetitionMandatory:[],repetitionMandatoryWithSeparator:[]}},t.prototype.visitTerminal=function(e){var t=e.terminalType.name+this.separator+"Terminal";(0,R.zy)(this.dslMethods,t)||(this.dslMethods[t]=[]),this.dslMethods[t].push(e)},t.prototype.visitNonTerminal=function(e){var t=e.nonTerminalName+this.separator+"Terminal";(0,R.zy)(this.dslMethods,t)||(this.dslMethods[t]=[]),this.dslMethods[t].push(e)},t.prototype.visitOption=function(e){this.dslMethods.option.push(e)},t.prototype.visitRepetitionWithSeparator=function(e){this.dslMethods.repetitionWithSeparator.push(e)},t.prototype.visitRepetitionMandatory=function(e){this.dslMethods.repetitionMandatory.push(e)},t.prototype.visitRepetitionMandatoryWithSeparator=function(e){this.dslMethods.repetitionMandatoryWithSeparator.push(e)},t.prototype.visitRepetition=function(e){this.dslMethods.repetition.push(e)},t.prototype.visitAlternation=function(e){this.dslMethods.alternation.push(e)},t}(ez),ej=new eG;function eY(e){if(e instanceof eA)return eY(e.referencedRule);if(e instanceof eD)return[e.terminalType];if(e instanceof eI||e instanceof eN||e instanceof eH||e instanceof eO||e instanceof ek||e instanceof e_||e instanceof eD||e instanceof eM)return function(e){for(var t,r=[],i=e.definition,n=0,o=i.length>n,s=!0;o&&s;)s=eW(t=i[n]),r=r.concat(eY(t)),n+=1,o=i.length>n;return(0,R.sb)(r)}(e);if(e instanceof eP){var t,r;return t=e,r=(0,R.Tj)(t.definition,function(e){return eY(e)}),(0,R.sb)((0,R.Bq)(r))}throw Error("non exhaustive match")}var eK="_~IN~_",eq=(a=function(e,t){return(a=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}a(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),eX=function(e){function t(t){var r=e.call(this)||this;return r.topProd=t,r.follows={},r}return eq(t,e),t.prototype.startWalking=function(){return this.walk(this.topProd),this.follows},t.prototype.walkTerminal=function(e,t,r){},t.prototype.walkProdRef=function(e,t,r){var i,n,o=(i=e.referencedRule,n=e.idx,i.name+n+eK+this.topProd.name),s=eY(new eI({definition:t.concat(r)}));this.follows[o]=s},t}(eB),eQ=(h=function(e,t){return(h=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}h(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});function eZ(e,t){!0===isNaN(e.startOffset)?(e.startOffset=t.startOffset,e.endOffset=t.endOffset):e.endOffset<t.endOffset==!0&&(e.endOffset=t.endOffset)}function eJ(e,t){!0===isNaN(e.startOffset)?(e.startOffset=t.startOffset,e.startColumn=t.startColumn,e.startLine=t.startLine,e.endOffset=t.endOffset,e.endColumn=t.endColumn,e.endLine=t.endLine):e.endOffset<t.endOffset==!0&&(e.endOffset=t.endOffset,e.endColumn=t.endColumn,e.endLine=t.endLine)}function e0(e,t,r){void 0===e.children[t]?e.children[t]=[r]:e.children[t].push(r)}var e1=function(e){function t(t){var r=e.call(this)||this;return r.result=[],r.ruleIdx=t,r}return eQ(t,e),t.prototype.collectNamedDSLMethod=function(e,t,r){if(!(0,R.b0)(e.name)){var i,n=void 0;if(e instanceof eN||e instanceof eH||e instanceof eO||e instanceof eP)n=new t({definition:e.definition,idx:e.idx});else if(e instanceof ek||e instanceof e_)n=new t({definition:e.definition,idx:e.idx,separator:e.separator});else throw Error("non exhaustive match");var o=[n],s=(i=this.ruleIdx,e.idx|r|i);this.result.push({def:o,key:s,name:e.name,orgProd:e})}},t.prototype.visitOption=function(e){this.collectNamedDSLMethod(e,eN,512)},t.prototype.visitRepetition=function(e){this.collectNamedDSLMethod(e,eH,768)},t.prototype.visitRepetitionMandatory=function(e){this.collectNamedDSLMethod(e,eO,1024)},t.prototype.visitRepetitionMandatoryWithSeparator=function(e){this.collectNamedDSLMethod(e,ek,1536)},t.prototype.visitRepetitionWithSeparator=function(e){this.collectNamedDSLMethod(e,e_,1280)},t.prototype.visitAlternation=function(e){var t=this;this.collectNamedDSLMethod(e,eP,256);var r=e.definition.length>1;(0,R.jJ)(e.definition,function(i,n){if(!(0,R.b0)(i.name)){var o,s,l=i.definition;l=r?[new eN({definition:i.definition})]:i.definition;var a=(o=t.ruleIdx,s=e.idx,256|s|o|n+1<<24);t.result.push({def:l,key:a,name:i.name,orgProd:i})}})},t}(ez),e2=(d=function(e,t){return(d=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}d(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),e3=function(e){function t(t,r){var i=e.call(this,t,r)||this;return i.path=r,i.nextTerminalName="",i.nextTerminalOccurrence=0,i.nextTerminalName=i.path.lastTok.name,i.nextTerminalOccurrence=i.path.lastTokOccurrence,i}return e2(t,e),t.prototype.walkTerminal=function(e,t,r){if(this.isAtEndOfPath&&e.terminalType.name===this.nextTerminalName&&e.idx===this.nextTerminalOccurrence&&!this.found){var i=new eI({definition:t.concat(r)});this.possibleTokTypes=eY(i),this.found=!0}},t}(function(e){function t(t,r){var i=e.call(this)||this;return i.topProd=t,i.path=r,i.possibleTokTypes=[],i.nextProductionName="",i.nextProductionOccurrence=0,i.found=!1,i.isAtEndOfPath=!1,i}return e2(t,e),t.prototype.startWalking=function(){if(this.found=!1,this.path.ruleStack[0]!==this.topProd.name)throw Error("The path does not start with the walker's top Rule!");return this.ruleStack=(0,R.T9)(this.path.ruleStack).reverse(),this.occurrenceStack=(0,R.T9)(this.path.occurrenceStack).reverse(),this.ruleStack.pop(),this.occurrenceStack.pop(),this.updateExpectedNext(),this.walk(this.topProd),this.possibleTokTypes},t.prototype.walk=function(t,r){void 0===r&&(r=[]),this.found||e.prototype.walk.call(this,t,r)},t.prototype.walkProdRef=function(e,t,r){if(e.referencedRule.name===this.nextProductionName&&e.idx===this.nextProductionOccurrence){var i=t.concat(r);this.updateExpectedNext(),this.walk(e.referencedRule,i)}},t.prototype.updateExpectedNext=function(){(0,R.Im)(this.ruleStack)?(this.nextProductionName="",this.nextProductionOccurrence=0,this.isAtEndOfPath=!0):(this.nextProductionName=this.ruleStack.pop(),this.nextProductionOccurrence=this.occurrenceStack.pop())},t}(eB)),e6=function(e){function t(t,r){var i=e.call(this)||this;return i.topRule=t,i.occurrence=r,i.result={token:void 0,occurrence:void 0,isEndOfRule:void 0},i}return e2(t,e),t.prototype.startWalking=function(){return this.walk(this.topRule),this.result},t}(eB),e5=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return e2(t,e),t.prototype.walkMany=function(t,r,i){if(t.idx===this.occurrence){var n=(0,R.$1)(r.concat(i));this.result.isEndOfRule=void 0===n,n instanceof eD&&(this.result.token=n.terminalType,this.result.occurrence=n.idx)}else e.prototype.walkMany.call(this,t,r,i)},t}(e6),e4=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return e2(t,e),t.prototype.walkManySep=function(t,r,i){if(t.idx===this.occurrence){var n=(0,R.$1)(r.concat(i));this.result.isEndOfRule=void 0===n,n instanceof eD&&(this.result.token=n.terminalType,this.result.occurrence=n.idx)}else e.prototype.walkManySep.call(this,t,r,i)},t}(e6),e8=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return e2(t,e),t.prototype.walkAtLeastOne=function(t,r,i){if(t.idx===this.occurrence){var n=(0,R.$1)(r.concat(i));this.result.isEndOfRule=void 0===n,n instanceof eD&&(this.result.token=n.terminalType,this.result.occurrence=n.idx)}else e.prototype.walkAtLeastOne.call(this,t,r,i)},t}(e6),e9=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return e2(t,e),t.prototype.walkAtLeastOneSep=function(t,r,i){if(t.idx===this.occurrence){var n=(0,R.$1)(r.concat(i));this.result.isEndOfRule=void 0===n,n instanceof eD&&(this.result.token=n.terminalType,this.result.occurrence=n.idx)}else e.prototype.walkAtLeastOneSep.call(this,t,r,i)},t}(e6);function e7(e,t,r){void 0===r&&(r=[]),r=(0,R.T9)(r);var i=[],n=0;function o(o){var s=e7(o.concat((0,R.gv)(e,n+1)),t,r);return i.concat(s)}for(;r.length<t&&n<e.length;){var s=e[n];if(s instanceof eI)return o(s.definition);if(s instanceof eA)return o(s.definition);if(s instanceof eN)i=o(s.definition);else if(s instanceof eO){var l=s.definition.concat([new eH({definition:s.definition})]);return o(l)}else if(s instanceof ek){var l=[new eI({definition:s.definition}),new eH({definition:[new eD({terminalType:s.separator})].concat(s.definition)})];return o(l)}else if(s instanceof e_){var l=s.definition.concat([new eH({definition:[new eD({terminalType:s.separator})].concat(s.definition)})]);i=o(l)}else if(s instanceof eH){var l=s.definition.concat([new eH({definition:s.definition})]);i=o(l)}else if(s instanceof eP)return(0,R.jJ)(s.definition,function(e){i=o(e.definition)}),i;else if(s instanceof eD)r.push(s.terminalType);else throw Error("non exhaustive match");n++}return i.push({partialPath:r,suffixDef:(0,R.gv)(e,n)}),i}function te(e,t,r,i){var n="EXIT_NONE_TERMINAL",o=[n],s="EXIT_ALTERNATIVE",l=!1,a=t.length,h=a-i-1,d=[],u=[];for(u.push({idx:-1,def:e,ruleStack:[],occurrenceStack:[]});!(0,R.Im)(u);){var c=u.pop();if(c===s){l&&(0,R.HV)(u).idx<=h&&u.pop();continue}var g=c.def,p=c.idx,m=c.ruleStack,f=c.occurrenceStack;if(!(0,R.Im)(g)){var w=g[0];if(w===n){var y={idx:p,def:(0,R.gv)(g),ruleStack:(0,R.gc)(m),occurrenceStack:(0,R.gc)(f)};u.push(y)}else if(w instanceof eD)if(p<a-1){var b=p+1;if(r(t[b],w.terminalType)){var y={idx:b,def:(0,R.gv)(g),ruleStack:m,occurrenceStack:f};u.push(y)}}else if(p===a-1)d.push({nextTokenType:w.terminalType,nextTokenOccurrence:w.idx,ruleStack:m,occurrenceStack:f}),l=!0;else throw Error("non exhaustive match");else if(w instanceof eA){var C=(0,R.T9)(m);C.push(w.nonTerminalName);var S=(0,R.T9)(f);S.push(w.idx);var y={idx:p,def:w.definition.concat(o,(0,R.gv)(g)),ruleStack:C,occurrenceStack:S};u.push(y)}else if(w instanceof eN){var v={idx:p,def:(0,R.gv)(g),ruleStack:m,occurrenceStack:f};u.push(v),u.push(s);var E={idx:p,def:w.definition.concat((0,R.gv)(g)),ruleStack:m,occurrenceStack:f};u.push(E)}else if(w instanceof eO){var T=new eH({definition:w.definition,idx:w.idx}),x=w.definition.concat([T],(0,R.gv)(g)),y={idx:p,def:x,ruleStack:m,occurrenceStack:f};u.push(y)}else if(w instanceof ek){var A=new eD({terminalType:w.separator}),T=new eH({definition:[A].concat(w.definition),idx:w.idx}),x=w.definition.concat([T],(0,R.gv)(g)),y={idx:p,def:x,ruleStack:m,occurrenceStack:f};u.push(y)}else if(w instanceof e_){var v={idx:p,def:(0,R.gv)(g),ruleStack:m,occurrenceStack:f};u.push(v),u.push(s);var A=new eD({terminalType:w.separator}),M=new eH({definition:[A].concat(w.definition),idx:w.idx}),x=w.definition.concat([M],(0,R.gv)(g)),E={idx:p,def:x,ruleStack:m,occurrenceStack:f};u.push(E)}else if(w instanceof eH){var v={idx:p,def:(0,R.gv)(g),ruleStack:m,occurrenceStack:f};u.push(v),u.push(s);var M=new eH({definition:w.definition,idx:w.idx}),x=w.definition.concat([M],(0,R.gv)(g)),E={idx:p,def:x,ruleStack:m,occurrenceStack:f};u.push(E)}else if(w instanceof eP)for(var I=w.definition.length-1;I>=0;I--){var N={idx:p,def:w.definition[I].definition.concat((0,R.gv)(g)),ruleStack:m,occurrenceStack:f};u.push(N),u.push(s)}else if(w instanceof eI)u.push({idx:p,def:w.definition.concat((0,R.gv)(g)),ruleStack:m,occurrenceStack:f});else if(w instanceof eM)u.push(function(e,t,r,i){var n=(0,R.T9)(r);n.push(e.name);var o=(0,R.T9)(i);return o.push(1),{idx:t,def:e.definition,ruleStack:n,occurrenceStack:o}}(w,p,m,f));else throw Error("non exhaustive match")}}return d}var tt=(u=function(e,t){return(u=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}u(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});(c=b||(b={}))[c.OPTION=0]="OPTION",c[c.REPETITION=1]="REPETITION",c[c.REPETITION_MANDATORY=2]="REPETITION_MANDATORY",c[c.REPETITION_MANDATORY_WITH_SEPARATOR=3]="REPETITION_MANDATORY_WITH_SEPARATOR",c[c.REPETITION_WITH_SEPARATOR=4]="REPETITION_WITH_SEPARATOR",c[c.ALTERNATION=5]="ALTERNATION";var tr=function(e){function t(t,r,i){var n=e.call(this)||this;return n.topProd=t,n.targetOccurrence=r,n.targetProdType=i,n}return tt(t,e),t.prototype.startWalking=function(){return this.walk(this.topProd),this.restDef},t.prototype.checkIsTarget=function(e,t,r,i){return e.idx===this.targetOccurrence&&this.targetProdType===t&&(this.restDef=r.concat(i),!0)},t.prototype.walkOption=function(t,r,i){this.checkIsTarget(t,b.OPTION,r,i)||e.prototype.walkOption.call(this,t,r,i)},t.prototype.walkAtLeastOne=function(t,r,i){this.checkIsTarget(t,b.REPETITION_MANDATORY,r,i)||e.prototype.walkOption.call(this,t,r,i)},t.prototype.walkAtLeastOneSep=function(t,r,i){this.checkIsTarget(t,b.REPETITION_MANDATORY_WITH_SEPARATOR,r,i)||e.prototype.walkOption.call(this,t,r,i)},t.prototype.walkMany=function(t,r,i){this.checkIsTarget(t,b.REPETITION,r,i)||e.prototype.walkOption.call(this,t,r,i)},t.prototype.walkManySep=function(t,r,i){this.checkIsTarget(t,b.REPETITION_WITH_SEPARATOR,r,i)||e.prototype.walkOption.call(this,t,r,i)},t}(eB),ti=function(e){function t(t,r,i){var n=e.call(this)||this;return n.targetOccurrence=t,n.targetProdType=r,n.targetRef=i,n.result=[],n}return tt(t,e),t.prototype.checkIsTarget=function(e,t){e.idx===this.targetOccurrence&&this.targetProdType===t&&(void 0===this.targetRef||e===this.targetRef)&&(this.result=e.definition)},t.prototype.visitOption=function(e){this.checkIsTarget(e,b.OPTION)},t.prototype.visitRepetition=function(e){this.checkIsTarget(e,b.REPETITION)},t.prototype.visitRepetitionMandatory=function(e){this.checkIsTarget(e,b.REPETITION_MANDATORY)},t.prototype.visitRepetitionMandatoryWithSeparator=function(e){this.checkIsTarget(e,b.REPETITION_MANDATORY_WITH_SEPARATOR)},t.prototype.visitRepetitionWithSeparator=function(e){this.checkIsTarget(e,b.REPETITION_WITH_SEPARATOR)},t.prototype.visitAlternation=function(e){this.checkIsTarget(e,b.ALTERNATION)},t}(ez);function tn(e){for(var t=Array(e),r=0;r<e;r++)t[r]=[];return t}function to(e){for(var t=[""],r=0;r<e.length;r++){for(var i=e[r],n=[],o=0;o<t.length;o++){var s=t[o];n.push(s+"_"+i.tokenTypeIdx);for(var l=0;l<i.categoryMatches.length;l++){var a="_"+i.categoryMatches[l];n.push(s+a)}}t=n}return t}function ts(e,t){for(var r=(0,R.Tj)(e,function(e){return e7([e],1)}),i=tn(r.length),n=(0,R.Tj)(r,function(e){var t={};return(0,R.jJ)(e,function(e){var r=to(e.partialPath);(0,R.jJ)(r,function(e){t[e]=!0})}),t}),o=r,s=1;s<=t;s++){var l=o;o=tn(l.length);for(var a=function(e){for(var r=l[e],a=0;a<r.length;a++){var h=r[a].partialPath,d=r[a].suffixDef,u=to(h);if(function(e,t,r){for(var i=0;i<e.length;i++)if(i!==r){for(var n=e[i],o=0;o<t.length;o++)if(!0===n[t[o]])return!1}return!0}(n,u,e)||(0,R.Im)(d)||h.length===t){var c=i[e];if(!1===th(c,h)){c.push(h);for(var g=0;g<u.length;g++){var p=u[g];n[e][p]=!0}}}else{var m=e7(d,s+1,h);o[e]=o[e].concat(m),(0,R.jJ)(m,function(t){var r=to(t.partialPath);(0,R.jJ)(r,function(t){n[e][t]=!0})})}}},h=0;h<l.length;h++)a(h)}return i}function tl(e,t,r,i){var n=new ti(e,b.ALTERNATION,i);return t.accept(n),ts(n.result,r)}function ta(e,t,r,i){var n=new ti(e,r);t.accept(n);var o=n.result,s=new tr(t,e,r).startWalking();return ts([new eI({definition:o}),new eI({definition:s})],i)}function th(e,t){e:for(var r=0;r<e.length;r++){var i=e[r];if(i.length===t.length){for(var n=0;n<i.length;n++){var o=t[n],s=i[n];if(!1==(o===s||void 0!==s.categoryMatchesMap[o.tokenTypeIdx]))continue e}return!0}}return!1}function td(e){return(0,R.Si)(e,function(e){return(0,R.Si)(e,function(e){return(0,R.Si)(e,function(e){return(0,R.Im)(e.categoryMatches)})})})}var tu=(g=function(e,t){return(g=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}g(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});function tc(e){return e$(e)+"_#_"+e.idx+"_#_"+tg(e)}function tg(e){return e instanceof eD?e.terminalType.name:e instanceof eA?e.nonTerminalName:""}var tp=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.allProductions=[],t}return tu(t,e),t.prototype.visitNonTerminal=function(e){this.allProductions.push(e)},t.prototype.visitOption=function(e){this.allProductions.push(e)},t.prototype.visitRepetitionWithSeparator=function(e){this.allProductions.push(e)},t.prototype.visitRepetitionMandatory=function(e){this.allProductions.push(e)},t.prototype.visitRepetitionMandatoryWithSeparator=function(e){this.allProductions.push(e)},t.prototype.visitRepetition=function(e){this.allProductions.push(e)},t.prototype.visitAlternation=function(e){this.allProductions.push(e)},t.prototype.visitTerminal=function(e){this.allProductions.push(e)},t}(ez),tm=/^[a-zA-Z_]\w*$/,tf=new RegExp(tm.source.replace("^","^\\$")),tw=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.alternations=[],t}return tu(t,e),t.prototype.visitAlternation=function(e){this.alternations.push(e)},t}(ez),ty=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.allProductions=[],t}return tu(t,e),t.prototype.visitRepetitionWithSeparator=function(e){this.allProductions.push(e)},t.prototype.visitRepetitionMandatory=function(e){this.allProductions.push(e)},t.prototype.visitRepetitionMandatoryWithSeparator=function(e){this.allProductions.push(e)},t.prototype.visitRepetition=function(e){this.allProductions.push(e)},t}(ez),tb={buildMismatchTokenMessage:function(e){var t=e.expected,r=e.actual;return e.previous,e.ruleName,"Expecting "+(eu(t)?"--\x3e "+eh(t)+" <--":"token of type --\x3e "+t.name+" <--")+" but found --\x3e '"+r.image+"' <--"},buildNotAllInputParsedMessage:function(e){var t=e.firstRedundant;return e.ruleName,"Redundant input, expecting EOF but found: "+t.image},buildNoViableAltMessage:function(e){var t=e.expectedPathsPerAlt,r=e.actual,i=(e.previous,e.customUserDescription);e.ruleName;var n="Expecting: ",o="\nbut found: '"+(0,R.$1)(r).image+"'";if(i)return n+i+o;var s=(0,R.TS)(t,function(e,t){return e.concat(t)},[]),l=(0,R.Tj)(s,function(e){return"["+(0,R.Tj)(e,function(e){return eh(e)}).join(", ")+"]"});return n+"one of these possible Token sequences:\n"+(0,R.Tj)(l,function(e,t){return" "+(t+1)+". "+e}).join("\n")+o},buildEarlyExitMessage:function(e){var t=e.expectedIterationPaths,r=e.actual,i=e.customUserDescription;e.ruleName;var n="Expecting: ",o="\nbut found: '"+(0,R.$1)(r).image+"'";return i?n+i+o:n+("expecting at least one iteration which starts with one of these possible Token sequences::\n <"+(0,R.Tj)(t,function(e){return"["+(0,R.Tj)(e,function(e){return eh(e)}).join(",")+"]"}).join(" ,"))+">"+o}};Object.freeze(tb);var tC={buildRuleNotFoundError:function(e,t){return"Invalid grammar, reference to a rule which is not defined: ->"+t.nonTerminalName+"<-\ninside top level rule: ->"+e.name+"<-"}},tS={buildDuplicateFoundError:function(e,t){var r=e.name,i=(0,R.$1)(t),n=i.idx,o=e$(i),s=i instanceof eD?i.terminalType.name:i instanceof eA?i.nonTerminalName:"",l="->"+o+(n>0?n:"")+"<- "+(s?"with argument: ->"+s+"<-":"")+"\n appears more than once ("+t.length+" times) in the top level rule: ->"+r+"<-. \n For further details see: https://sap.github.io/chevrotain/docs/FAQ.html#NUMERICAL_SUFFIXES \n ";return(l=l.replace(/[ \t]+/g," ")).replace(/\s\s+/g,"\n")},buildInvalidNestedRuleNameError:function(e,t){return"Invalid nested rule name: ->"+t.name+"<- inside rule: ->"+e.name+"<-\nit must match the pattern: ->"+tf.toString()+"<-.\nNote that this means a nested rule name must start with the '$'(dollar) sign."},buildDuplicateNestedRuleNameError:function(e,t){return"Duplicate nested rule name: ->"+(0,R.$1)(t).name+"<- inside rule: ->"+e.name+"<-\nA nested name must be unique in the scope of a top level grammar rule."},buildNamespaceConflictError:function(e){return"Namespace conflict found in grammar.\nThe grammar has both a Terminal(Token) and a Non-Terminal(Rule) named: <"+e.name+">.\nTo resolve this make sure each Terminal and Non-Terminal names are unique\nThis is easy to accomplish by using the convention that Terminal names start with an uppercase letter\nand Non-Terminal names start with a lower case letter."},buildAlternationPrefixAmbiguityError:function(e){var t=(0,R.Tj)(e.prefixPath,function(e){return eh(e)}).join(", "),r=0===e.alternation.idx?"":e.alternation.idx;return"Ambiguous alternatives: <"+e.ambiguityIndices.join(" ,")+"> due to common lookahead prefix\n"+("in <OR"+r+"> inside <")+e.topLevelRule.name+"> Rule,\n<"+t+"> may appears as a prefix path in all these alternatives.\nSee: https://sap.github.io/chevrotain/docs/guide/resolving_grammar_errors.html#COMMON_PREFIX\nFor Further details."},buildAlternationAmbiguityError:function(e){var t=(0,R.Tj)(e.prefixPath,function(e){return eh(e)}).join(", "),r=0===e.alternation.idx?"":e.alternation.idx,i="Ambiguous Alternatives Detected: <"+e.ambiguityIndices.join(" ,")+"> in <OR"+r+"> inside <"+e.topLevelRule.name+"> Rule,\n<"+t+"> may appears as a prefix path in all these alternatives.\n";return i+"See: https://sap.github.io/chevrotain/docs/guide/resolving_grammar_errors.html#AMBIGUOUS_ALTERNATIVES\nFor Further details."},buildEmptyRepetitionError:function(e){var t=e$(e.repetition);return 0!==e.repetition.idx&&(t+=e.repetition.idx),"The repetition <"+t+"> within Rule <"+e.topLevelRule.name+"> can never consume any tokens.\nThis could lead to an infinite loop."},buildTokenNameError:function(e){return"Invalid Grammar Token name: ->"+e.tokenType.name+"<- it must match the pattern: ->"+e.expectedPattern.toString()+"<-"},buildEmptyAlternationError:function(e){return"Ambiguous empty alternative: <"+(e.emptyChoiceIdx+1)+">"+(" in <OR"+e.alternation.idx+"> inside <")+e.topLevelRule.name+"> Rule.\nOnly the last alternative may be an empty alternative."},buildTooManyAlternativesError:function(e){return"An Alternation cannot have more than 256 alternatives:\n"+("<OR"+e.alternation.idx+"> inside <"+e.topLevelRule.name+"> Rule.\n has ")+(e.alternation.definition.length+1)+" alternatives."},buildLeftRecursionError:function(e){var t=e.topLevelRule.name,r=t+" --\x3e "+R.Tj(e.leftRecursionPath,function(e){return e.name}).concat([t]).join(" --\x3e ");return"Left Recursion found in grammar.\nrule: <"+t+"> can be invoked from itself (directly or indirectly)\nwithout consuming any Tokens. The grammar path that causes this is: \n "+r+"\n To fix this refactor your grammar to remove the left recursion.\nsee: https://en.wikipedia.org/wiki/LL_parser#Left_Factoring."},buildInvalidRuleNameError:function(e){return"Invalid grammar rule name: ->"+e.topLevelRule.name+"<- it must match the pattern: ->"+e.expectedPattern.toString()+"<-"},buildDuplicateRuleNameError:function(e){return"Duplicate definition, rule: ->"+(e.topLevelRule instanceof eM?e.topLevelRule.name:e.topLevelRule)+"<- is already defined in the grammar: ->"+e.grammarName+"<-"}},tv=(p=function(e,t){return(p=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}p(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),tR=function(e){function t(t,r){var i=e.call(this)||this;return i.nameToTopRule=t,i.errMsgProvider=r,i.errors=[],i}return tv(t,e),t.prototype.resolveRefs=function(){var e=this;(0,R.jJ)((0,R.zu)(this.nameToTopRule),function(t){e.currTopLevel=t,t.accept(e)})},t.prototype.visitNonTerminal=function(e){var t=this.nameToTopRule[e.nonTerminalName];if(t)e.referencedRule=t;else{var r=this.errMsgProvider.buildRuleNotFoundError(this.currTopLevel,e);this.errors.push({message:r,type:S.UNRESOLVED_SUBRULE_REF,ruleName:this.currTopLevel.name,unresolvedRefName:e.nonTerminalName})}},t}(ez);function tE(e){e=(0,R.NT)(e,{errMsgProvider:tC});var t,r={};return(0,R.jJ)(e.rules,function(e){r[e.name]=e}),(t=new tR(r,e.errMsgProvider)).resolveRefs(),t.errors}function tT(e){var t,r,i,n,o,s,l,a,h,d,u,c,g,p,m,f,w,y,C,v,E,T,x,A,M,I,N,O,k,H,_,P,D;return t=(e=(0,R.NT)(e,{errMsgProvider:tS,ignoredIssues:{}})).rules,r=e.maxLookahead,i=e.tokenTypes,n=e.ignoredIssues,o=e.errMsgProvider,s=e.grammarName,l=R.Tj(t,function(e){var t,r,i,n,s,l;return t=e,r=o,i=new tp,t.accept(i),n=i.allProductions,s=R.$z(n,tc),l=R.Up(s,function(e){return e.length>1}),R.Tj(R.zu(l),function(e){var i=R.$1(e),n=r.buildDuplicateFoundError(t,e),o=e$(i),s={message:n,type:S.DUPLICATE_PRODUCTIONS,ruleName:t.name,dslName:o,occurrence:i.idx},l=tg(i);return l&&(s.parameter=l),s})}),a=R.Tj(t,function(e){return function e(t,r,i,n){void 0===n&&(n=[]);var o=[],s=function e(t){var r=[];if(R.Im(t))return r;var i=R.$1(t);if(i instanceof eA)r.push(i.referencedRule);else if(i instanceof eI||i instanceof eN||i instanceof eO||i instanceof ek||i instanceof e_||i instanceof eH)r=r.concat(e(i.definition));else if(i instanceof eP)r=R.Bq(R.Tj(i.definition,function(t){return e(t.definition)}));else if(i instanceof eD);else throw Error("non exhaustive match");var n=eW(i),o=t.length>1;if(!n||!o)return r;var s=R.gv(t);return r.concat(e(s))}(r.definition);if(R.Im(s))return[];var l=t.name;R.gR(s,t)&&o.push({message:i.buildLeftRecursionError({topLevelRule:t,leftRecursionPath:n}),type:S.LEFT_RECURSION,ruleName:l});var a=R.iv(s,n.concat([t])),h=R.Tj(a,function(r){var o=R.T9(n);return o.push(r),e(t,r,i,o)});return o.concat(R.Bq(h))}(e,e,o)}),h=[],d=[],u=[],(0,R.Si)(a,R.Im)&&(h=(0,R.Tj)(t,function(e){var t,r,i,n;return t=e,r=o,i=new tw,t.accept(i),n=i.alternations,R.TS(n,function(e,i){var n=R.gc(i.definition),o=R.Tj(n,function(e,n){var o=te([e],[],null,1);return R.Im(o)?{message:r.buildEmptyAlternationError({topLevelRule:t,alternation:i,emptyChoiceIdx:n}),type:S.NONE_LAST_EMPTY_ALT,ruleName:t.name,occurrence:i.idx,alternative:n+1}:null});return e.concat(R.oE(o))},[])}),d=(0,R.Tj)(t,function(e){var t,i,s,l,a,h,d;return t=e,i=r,s=n,l=o,a=new tw,t.accept(a),h=a.alternations,(d=s[t.name])&&(h=(0,R.ku)(h,function(e){return d[e$(e)+(0===e.idx?"":e.idx)]})),h=(0,R.ku)(h,function(e){return!0===e.ignoreAmbiguities}),R.TS(h,function(e,r){var n,o,s,a,h,d,u,c,g,p,m,f,w=tl(r.idx,t,r.maxLookahead||i,r),y=(n=w,o=r,s=t,a=l,h=[],d=(0,R.TS)(n,function(e,t,r){return!0===o.definition[r].ignoreAmbiguities||(0,R.jJ)(t,function(t){var i=[r];(0,R.jJ)(n,function(e,n){r!==n&&th(e,t)&&!0!==o.definition[n].ignoreAmbiguities&&i.push(n)}),i.length>1&&!th(h,t)&&(h.push(t),e.push({alts:i,path:t}))}),e},[]),R.Tj(d,function(e){var t=(0,R.Tj)(e.alts,function(e){return e+1});return{message:a.buildAlternationAmbiguityError({topLevelRule:s,alternation:o,ambiguityIndices:t,prefixPath:e.path}),type:S.AMBIGUOUS_ALTS,ruleName:s.name,occurrence:o.idx,alternatives:[e.alts]}})),b=(u=w,c=r,g=t,p=l,m=[],f=(0,R.TS)(u,function(e,t,r){var i=(0,R.Tj)(t,function(e){return{idx:r,path:e}});return e.concat(i)},[]),(0,R.jJ)(f,function(e){if(!0!==c.definition[e.idx].ignoreAmbiguities){var t=e.idx,r=e.path,i=(0,R.JW)(f,function(e){var i;return!0!==c.definition[e.idx].ignoreAmbiguities&&e.idx<t&&(i=e.path,i.length<r.length&&(0,R.Si)(i,function(e,t){var i=r[t];return e===i||i.categoryMatchesMap[e.tokenTypeIdx]}))}),n=(0,R.Tj)(i,function(e){var r=[e.idx+1,t+1],i=0===c.idx?"":c.idx;return{message:p.buildAlternationPrefixAmbiguityError({topLevelRule:g,alternation:c,ambiguityIndices:r,prefixPath:e.path}),type:S.AMBIGUOUS_PREFIX_ALTS,ruleName:g.name,occurrence:i,alternatives:r}});m=m.concat(n)}}),m);return e.concat(y,b)},[])}),C=t,v=r,E=o,T=[],(0,R.jJ)(C,function(e){var t=new ty;e.accept(t);var r=t.allProductions;(0,R.jJ)(r,function(t){var r=function(e){if(e instanceof eN)return b.OPTION;if(e instanceof eH)return b.REPETITION;if(e instanceof eO)return b.REPETITION_MANDATORY;if(e instanceof ek)return b.REPETITION_MANDATORY_WITH_SEPARATOR;if(e instanceof e_)return b.REPETITION_WITH_SEPARATOR;else if(e instanceof eP)return b.ALTERNATION;else throw Error("non exhaustive match")}(t),i=t.maxLookahead||v,n=ta(t.idx,e,r,i)[0];if((0,R.Im)((0,R.Bq)(n))){var o=E.buildEmptyRepetitionError({topLevelRule:e,repetition:t});T.push({message:o,type:S.NO_NON_EMPTY_LOOKAHEAD,ruleName:e.name})}})}),u=T),x=t,A=i,M=o,I=[],N=(0,R.Tj)(A,function(e){return e.name}),(0,R.jJ)(x,function(e){var t=e.name;if((0,R.gR)(N,t)){var r=M.buildNamespaceConflictError(e);I.push({message:r,type:S.CONFLICT_TOKENS_RULES_NAMESPACE,ruleName:t})}}),c=I,g=R.Tj(i,function(e){var t,r,i;return t=e,r=o,i=[],t.name.match(tm)||i.push({message:r.buildTokenNameError({tokenType:t,expectedPattern:tm}),type:S.INVALID_TOKEN_NAME}),i}),O=t,k=o,H=[],(0,R.jJ)(O,function(e){var t=new e1("");e.accept(t);var r=(0,R.Tj)(t.result,function(e){return e.orgProd});H.push((0,R.Tj)(r,function(t){var r,i,n,o;return r=e,i=t,n=k,o=[],i.name.match(tf)||o.push({message:n.buildInvalidNestedRuleNameError(r,i),type:S.INVALID_NESTED_RULE_NAME,ruleName:r.name}),o}))}),p=(0,R.Bq)(H),_=t,P=o,D=[],(0,R.jJ)(_,function(e){var t=new e1("");e.accept(t);var r=(0,R.$z)(t.result,function(e){return e.name}),i=(0,R.Up)(r,function(e){return e.length>1});(0,R.jJ)((0,R.zu)(i),function(t){var r=(0,R.Tj)(t,function(e){return e.orgProd}),i=P.buildDuplicateNestedRuleNameError(e,r);D.push({message:i,type:S.DUPLICATE_NESTED_NAME,ruleName:e.name})})}),m=D,f=(0,R.Tj)(t,function(e){var t,r,i,n;return t=e,r=o,i=new tw,t.accept(i),n=i.alternations,R.TS(n,function(e,i){return i.definition.length>255&&e.push({message:r.buildTooManyAlternativesError({topLevelRule:t,alternation:i}),type:S.TOO_MANY_ALTS,ruleName:t.name,occurrence:i.idx}),e},[])}),w=(0,R.Tj)(t,function(e){var t,r,i,n;return t=e,r=o,i=[],(n=t.name).match(tm)||i.push({message:r.buildInvalidRuleNameError({topLevelRule:t,expectedPattern:tm}),type:S.INVALID_RULE_NAME,ruleName:n}),i}),y=(0,R.Tj)(t,function(e){var r=e,i=t,n=s,l=o,a=[];if((0,R.TS)(i,function(e,t){return t.name===r.name?e+1:e},0)>1){var h=l.buildDuplicateRuleNameError({topLevelRule:r,grammarName:n});a.push({message:h,type:S.DUPLICATE_RULE_NAME,ruleName:r.name})}return a}),R.Bq(l.concat(g,p,m,u,a,h,d,c,f,w,y))}function tx(e){(0,R.jJ)(e.rules,function(e){var t=new eG;e.accept(t),(0,R.jJ)(t.dslMethods,function(e){(0,R.jJ)(e,function(e,t){e.idx=t+1})})})}var tA="MismatchedTokenException",tM="NoViableAltException",tI="EarlyExitException",tN="NotAllInputParsedException",tO=[tA,tM,tI,tN];function tk(e){return(0,R.gR)(tO,e.name)}function tH(e,t,r){this.name=tA,this.message=e,this.token=t,this.previousToken=r,this.resyncedTokens=[]}function t_(e,t,r){this.name=tM,this.message=e,this.token=t,this.previousToken=r,this.resyncedTokens=[]}function tP(e,t){this.name=tN,this.message=e,this.token=t,this.resyncedTokens=[]}function tD(e,t,r){this.name=tI,this.message=e,this.token=t,this.previousToken=r,this.resyncedTokens=[]}Object.freeze(tO),tH.prototype=Error.prototype,t_.prototype=Error.prototype,tP.prototype=Error.prototype,tD.prototype=Error.prototype;var tL={},tF="InRuleRecoveryException";function tB(e){this.name=tF,this.message=e}tB.prototype=Error.prototype;var tV=function(){function e(){}return e.prototype.initRecoverable=function(e){this.firstAfterRepMap={},this.resyncFollows={},this.recoveryEnabled=(0,R.zy)(e,"recoveryEnabled")?e.recoveryEnabled:ri.recoveryEnabled,this.recoveryEnabled&&(this.attemptInRepetitionRecovery=tz)},e.prototype.getTokenToInsert=function(e){var t=eR(e,"",NaN,NaN,NaN,NaN,NaN,NaN);return t.isInsertedInRecovery=!0,t},e.prototype.canTokenTypeBeInsertedInRecovery=function(e){return!0},e.prototype.tryInRepetitionRecovery=function(e,t,r,i){for(var n=this,o=this.findReSyncTokenType(),s=this.exportLexerState(),l=[],a=!1,h=this.LA(1),d=this.LA(1),u=function(){var e=n.LA(0),t=new tH(n.errorMessageProvider.buildMismatchTokenMessage({expected:i,actual:h,previous:e,ruleName:n.getCurrRuleFullName()}),h,n.LA(0));t.resyncedTokens=(0,R.gc)(l),n.SAVE_ERROR(t)};!a;)if(this.tokenMatcher(d,i))return void u();else if(r.call(this)){u(),e.apply(this,t);return}else this.tokenMatcher(d,o)?a=!0:(d=this.SKIP_TOKEN(),this.addToResyncTokens(d,l));this.importLexerState(s)},e.prototype.shouldInRepetitionRecoveryBeTried=function(e,t,r){return!(!1===r||void 0===e||void 0===t||this.tokenMatcher(this.LA(1),e)||this.isBackTracking()||this.canPerformInRuleRecovery(e,this.getFollowsForInRuleRecovery(e,t)))},e.prototype.getFollowsForInRuleRecovery=function(e,t){var r=this.getCurrentGrammarPath(e,t);return this.getNextPossibleTokenTypes(r)},e.prototype.tryInRuleRecovery=function(e,t){if(this.canRecoverWithSingleTokenInsertion(e,t))return this.getTokenToInsert(e);if(this.canRecoverWithSingleTokenDeletion(e)){var r=this.SKIP_TOKEN();return this.consumeToken(),r}throw new tB("sad sad panda")},e.prototype.canPerformInRuleRecovery=function(e,t){return this.canRecoverWithSingleTokenInsertion(e,t)||this.canRecoverWithSingleTokenDeletion(e)},e.prototype.canRecoverWithSingleTokenInsertion=function(e,t){var r=this;if(!this.canTokenTypeBeInsertedInRecovery(e)||(0,R.Im)(t))return!1;var i=this.LA(1);return void 0!==(0,R.I6)(t,function(e){return r.tokenMatcher(i,e)})},e.prototype.canRecoverWithSingleTokenDeletion=function(e){return this.tokenMatcher(this.LA(2),e)},e.prototype.isInCurrentRuleReSyncSet=function(e){var t=this.getCurrFollowKey(),r=this.getFollowSetFromFollowKey(t);return(0,R.gR)(r,e)},e.prototype.findReSyncTokenType=function(){for(var e=this.flattenFollowSet(),t=this.LA(1),r=2;;){var i=t.tokenType;if((0,R.gR)(e,i))return i;t=this.LA(r),r++}},e.prototype.getCurrFollowKey=function(){if(1===this.RULE_STACK.length)return tL;var e=this.getLastExplicitRuleShortName(),t=this.getLastExplicitRuleOccurrenceIndex(),r=this.getPreviousExplicitRuleShortName();return{ruleName:this.shortRuleNameToFullName(e),idxInCallingRule:t,inRule:this.shortRuleNameToFullName(r)}},e.prototype.buildFullFollowKeyStack=function(){var e=this,t=this.RULE_STACK,r=this.RULE_OCCURRENCE_STACK;return(0,R.Im)(this.LAST_EXPLICIT_RULE_STACK)||(t=(0,R.Tj)(this.LAST_EXPLICIT_RULE_STACK,function(t){return e.RULE_STACK[t]}),r=(0,R.Tj)(this.LAST_EXPLICIT_RULE_STACK,function(t){return e.RULE_OCCURRENCE_STACK[t]})),(0,R.Tj)(t,function(i,n){return 0===n?tL:{ruleName:e.shortRuleNameToFullName(i),idxInCallingRule:r[n],inRule:e.shortRuleNameToFullName(t[n-1])}})},e.prototype.flattenFollowSet=function(){var e=this,t=(0,R.Tj)(this.buildFullFollowKeyStack(),function(t){return e.getFollowSetFromFollowKey(t)});return(0,R.Bq)(t)},e.prototype.getFollowSetFromFollowKey=function(e){if(e===tL)return[ev];var t=e.ruleName+e.idxInCallingRule+eK+e.inRule;return this.resyncFollows[t]},e.prototype.addToResyncTokens=function(e,t){return this.tokenMatcher(e,ev)||t.push(e),t},e.prototype.reSyncTo=function(e){for(var t=[],r=this.LA(1);!1===this.tokenMatcher(r,e);)r=this.SKIP_TOKEN(),this.addToResyncTokens(r,t);return(0,R.gc)(t)},e.prototype.attemptInRepetitionRecovery=function(e,t,r,i,n,o,s){},e.prototype.getCurrentGrammarPath=function(e,t){return{ruleStack:this.getHumanReadableRuleStack(),occurrenceStack:(0,R.T9)(this.RULE_OCCURRENCE_STACK),lastTok:e,lastTokOccurrence:t}},e.prototype.getHumanReadableRuleStack=function(){var e=this;return(0,R.Im)(this.LAST_EXPLICIT_RULE_STACK)?(0,R.Tj)(this.RULE_STACK,function(t){return e.shortRuleNameToFullName(t)}):(0,R.Tj)(this.LAST_EXPLICIT_RULE_STACK,function(t){return e.shortRuleNameToFullName(e.RULE_STACK[t])})},e}();function tz(e,t,r,i,n,o,s){var l=this.getKeyForAutomaticLookahead(i,n),a=this.firstAfterRepMap[l];if(void 0===a){var h=this.getCurrRuleFullName();a=new o(this.getGAstProductions()[h],n).startWalking(),this.firstAfterRepMap[l]=a}var d=a.token,u=a.occurrence,c=a.isEndOfRule;1===this.RULE_STACK.length&&c&&void 0===d&&(d=ev,u=1),this.shouldInRepetitionRecoveryBeTried(d,u,s)&&this.tryInRepetitionRecovery(e,t,r,d)}var tU=function(){function e(){}return e.prototype.initLooksAhead=function(e){this.dynamicTokensEnabled=(0,R.zy)(e,"dynamicTokensEnabled")?e.dynamicTokensEnabled:ri.dynamicTokensEnabled,this.maxLookahead=(0,R.zy)(e,"maxLookahead")?e.maxLookahead:ri.maxLookahead,this.lookAheadFuncsCache=(0,R.rF)()?new Map:[],(0,R.rF)()?(this.getLaFuncFromCache=this.getLaFuncFromMap,this.setLaFuncCache=this.setLaFuncCacheUsingMap):(this.getLaFuncFromCache=this.getLaFuncFromObj,this.setLaFuncCache=this.setLaFuncUsingObj)},e.prototype.preComputeLookaheadFunctions=function(e){var t=this;(0,R.jJ)(e,function(e){t.TRACE_INIT(e.name+" Rule Lookahead",function(){var r,i=(ej.reset(),e.accept(ej),r=ej.dslMethods,ej.reset(),r),n=i.alternation,o=i.repetition,s=i.option,l=i.repetitionMandatory,a=i.repetitionMandatoryWithSeparator,h=i.repetitionWithSeparator;(0,R.jJ)(n,function(r){var i=0===r.idx?"":r.idx;t.TRACE_INIT(""+e$(r)+i,function(){var i,n,o,s,l,a,h,d,u=(i=r.idx,n=r.maxLookahead||t.maxLookahead,o=r.hasPredicates,s=t.dynamicTokensEnabled,l=t.lookAheadBuilderForAlternatives,h=td(a=tl(i,e,n))?J:Z,l(a,o,h,s)),c=(d=t.fullRuleNameToShort[e.name],256|r.idx|d);t.setLaFuncCache(c,u)})}),(0,R.jJ)(o,function(r){t.computeLookaheadFunc(e,r.idx,768,b.REPETITION,r.maxLookahead,e$(r))}),(0,R.jJ)(s,function(r){t.computeLookaheadFunc(e,r.idx,512,b.OPTION,r.maxLookahead,e$(r))}),(0,R.jJ)(l,function(r){t.computeLookaheadFunc(e,r.idx,1024,b.REPETITION_MANDATORY,r.maxLookahead,e$(r))}),(0,R.jJ)(a,function(r){t.computeLookaheadFunc(e,r.idx,1536,b.REPETITION_MANDATORY_WITH_SEPARATOR,r.maxLookahead,e$(r))}),(0,R.jJ)(h,function(r){t.computeLookaheadFunc(e,r.idx,1280,b.REPETITION_WITH_SEPARATOR,r.maxLookahead,e$(r))})})})},e.prototype.computeLookaheadFunc=function(e,t,r,i,n,o){var s=this;this.TRACE_INIT(""+o+(0===t?"":t),function(){var o,l,a,h,d,u=(o=n||s.maxLookahead,l=s.dynamicTokensEnabled,a=s.lookAheadBuilderForOptional,d=td(h=ta(t,e,i,o))?J:Z,a(h[0],d,l)),c=t|r|s.fullRuleNameToShort[e.name];s.setLaFuncCache(c,u)})},e.prototype.lookAheadBuilderForOptional=function(e,t,r){return function(e,t,r){var i=(0,R.Si)(e,function(e){return 1===e.length}),n=e.length;if(!i||r)return function(){t:for(var r=0;r<n;r++){for(var i=e[r],o=i.length,s=0;s<o;s++)if(!1===t(this.LA(s+1),i[s]))continue t;return!0}return!1};var o=(0,R.Bq)(e);if(1===o.length&&(0,R.Im)(o[0].categoryMatches)){var s=o[0].tokenTypeIdx;return function(){return this.LA(1).tokenTypeIdx===s}}var l=(0,R.TS)(o,function(e,t,r){return e[t.tokenTypeIdx]=!0,(0,R.jJ)(t.categoryMatches,function(t){e[t]=!0}),e},[]);return function(){return!0===l[this.LA(1).tokenTypeIdx]}}(e,t,r)},e.prototype.lookAheadBuilderForAlternatives=function(e,t,r,i){var n=e.length,o=(0,R.Si)(e,function(e){return(0,R.Si)(e,function(e){return 1===e.length})});if(t)return function(t){for(var i=(0,R.Tj)(t,function(e){return e.GATE}),o=0;o<n;o++){var s=e[o],l=s.length,a=i[o];if(void 0===a||!1!==a.call(this))t:for(var h=0;h<l;h++){for(var d=s[h],u=d.length,c=0;c<u;c++)if(!1===r(this.LA(c+1),d[c]))continue t;return o}}};if(!o||i)return function(){for(var t=0;t<n;t++){var i=e[t],o=i.length;t:for(var s=0;s<o;s++){for(var l=i[s],a=l.length,h=0;h<a;h++)if(!1===r(this.LA(h+1),l[h]))continue t;return t}}};var s=(0,R.Tj)(e,function(e){return(0,R.Bq)(e)}),l=(0,R.TS)(s,function(e,t,r){return(0,R.jJ)(t,function(t){(0,R.zy)(e,t.tokenTypeIdx)||(e[t.tokenTypeIdx]=r),(0,R.jJ)(t.categoryMatches,function(t){(0,R.zy)(e,t)||(e[t]=r)})}),e},[]);return function(){return l[this.LA(1).tokenTypeIdx]}},e.prototype.getKeyForAutomaticLookahead=function(e,t){return t|e|this.getLastExplicitRuleShortName()},e.prototype.getLaFuncFromCache=function(e){},e.prototype.getLaFuncFromMap=function(e){return this.lookAheadFuncsCache.get(e)},e.prototype.getLaFuncFromObj=function(e){return this.lookAheadFuncsCache[e]},e.prototype.setLaFuncCache=function(e,t){},e.prototype.setLaFuncCacheUsingMap=function(e,t){this.lookAheadFuncsCache.set(e,t)},e.prototype.setLaFuncUsingObj=function(e,t){this.lookAheadFuncsCache[e]=t},e}(),tW=/^\s*function\s*(\S*)\s*\(/,t$="name";function tG(e){var t=e.name;return t||e.toString().match(tW)[1]}function tj(e,t){var r=Object.getOwnPropertyDescriptor(e,t$);return(!!(0,R.b0)(r)||!!r.configurable)&&(Object.defineProperty(e,t$,{enumerable:!1,configurable:!0,writable:!1,value:t}),!0)}function tY(e,t){for(var r=(0,R.HP)(e),i=r.length,n=0;n<i;n++)for(var o=e[r[n]],s=o.length,l=0;l<s;l++){var a=o[l];void 0===a.tokenTypeIdx&&(void 0!==a.fullName?this[a.fullName](a.children,t):this[a.name](a.children,t))}}(m=C||(C={}))[m.REDUNDANT_METHOD=0]="REDUNDANT_METHOD",m[m.MISSING_METHOD=1]="MISSING_METHOD";var tK=["constructor","visit","validateVisitor"],tq=function(){function e(){}return e.prototype.initTreeBuilder=function(e){if(this.LAST_EXPLICIT_RULE_STACK=[],this.CST_STACK=[],this.outputCst=(0,R.zy)(e,"outputCst")?e.outputCst:ri.outputCst,this.nodeLocationTracking=(0,R.zy)(e,"nodeLocationTracking")?e.nodeLocationTracking:ri.nodeLocationTracking,this.outputCst)if(/full/i.test(this.nodeLocationTracking))this.recoveryEnabled?(this.setNodeLocationFromToken=eJ,this.setNodeLocationFromNode=eJ,this.cstPostRule=R.tE,this.setInitialNodeLocation=this.setInitialNodeLocationFullRecovery):(this.setNodeLocationFromToken=R.tE,this.setNodeLocationFromNode=R.tE,this.cstPostRule=this.cstPostRuleFull,this.setInitialNodeLocation=this.setInitialNodeLocationFullRegular);else if(/onlyOffset/i.test(this.nodeLocationTracking))this.recoveryEnabled?(this.setNodeLocationFromToken=eZ,this.setNodeLocationFromNode=eZ,this.cstPostRule=R.tE,this.setInitialNodeLocation=this.setInitialNodeLocationOnlyOffsetRecovery):(this.setNodeLocationFromToken=R.tE,this.setNodeLocationFromNode=R.tE,this.cstPostRule=this.cstPostRuleOnlyOffset,this.setInitialNodeLocation=this.setInitialNodeLocationOnlyOffsetRegular);else if(/none/i.test(this.nodeLocationTracking))this.setNodeLocationFromToken=R.tE,this.setNodeLocationFromNode=R.tE,this.cstPostRule=R.tE,this.setInitialNodeLocation=R.tE;else throw Error('Invalid <nodeLocationTracking> config option: "'+e.nodeLocationTracking+'"');else this.cstInvocationStateUpdate=R.tE,this.cstFinallyStateUpdate=R.tE,this.cstPostTerminal=R.tE,this.cstPostNonTerminal=R.tE,this.cstPostRule=R.tE,this.getLastExplicitRuleShortName=this.getLastExplicitRuleShortNameNoCst,this.getPreviousExplicitRuleShortName=this.getPreviousExplicitRuleShortNameNoCst,this.getLastExplicitRuleOccurrenceIndex=this.getLastExplicitRuleOccurrenceIndexNoCst,this.manyInternal=this.manyInternalNoCst,this.orInternal=this.orInternalNoCst,this.optionInternal=this.optionInternalNoCst,this.atLeastOneInternal=this.atLeastOneInternalNoCst,this.manySepFirstInternal=this.manySepFirstInternalNoCst,this.atLeastOneSepFirstInternal=this.atLeastOneSepFirstInternalNoCst},e.prototype.setInitialNodeLocationOnlyOffsetRecovery=function(e){e.location={startOffset:NaN,endOffset:NaN}},e.prototype.setInitialNodeLocationOnlyOffsetRegular=function(e){e.location={startOffset:this.LA(1).startOffset,endOffset:NaN}},e.prototype.setInitialNodeLocationFullRecovery=function(e){e.location={startOffset:NaN,startLine:NaN,startColumn:NaN,endOffset:NaN,endLine:NaN,endColumn:NaN}},e.prototype.setInitialNodeLocationFullRegular=function(e){var t=this.LA(1);e.location={startOffset:t.startOffset,startLine:t.startLine,startColumn:t.startColumn,endOffset:NaN,endLine:NaN,endColumn:NaN}},e.prototype.cstNestedInvocationStateUpdate=function(e,t){var r={name:e,fullName:this.shortRuleNameToFull[this.getLastExplicitRuleShortName()]+e,children:{}};this.setInitialNodeLocation(r),this.CST_STACK.push(r)},e.prototype.cstInvocationStateUpdate=function(e,t){this.LAST_EXPLICIT_RULE_STACK.push(this.RULE_STACK.length-1);var r={name:e,children:{}};this.setInitialNodeLocation(r),this.CST_STACK.push(r)},e.prototype.cstFinallyStateUpdate=function(){this.LAST_EXPLICIT_RULE_STACK.pop(),this.CST_STACK.pop()},e.prototype.cstNestedFinallyStateUpdate=function(){var e=this.CST_STACK.pop();this.cstPostRule(e)},e.prototype.cstPostRuleFull=function(e){var t=this.LA(0),r=e.location;r.startOffset<=t.startOffset==!0?(r.endOffset=t.endOffset,r.endLine=t.endLine,r.endColumn=t.endColumn):(r.startOffset=NaN,r.startLine=NaN,r.startColumn=NaN)},e.prototype.cstPostRuleOnlyOffset=function(e){var t=this.LA(0),r=e.location;r.startOffset<=t.startOffset==!0?r.endOffset=t.endOffset:r.startOffset=NaN},e.prototype.cstPostTerminal=function(e,t){var r=this.CST_STACK[this.CST_STACK.length-1];void 0===r.children[e]?r.children[e]=[t]:r.children[e].push(t),this.setNodeLocationFromToken(r.location,t)},e.prototype.cstPostNonTerminal=function(e,t){if(!0!==this.isBackTracking()){var r=this.CST_STACK[this.CST_STACK.length-1];e0(r,t,e),this.setNodeLocationFromNode(r.location,e.location)}},e.prototype.getBaseCstVisitorConstructor=function(){if((0,R.b0)(this.baseCstVisitorConstructor)){var e,t,r,i=(e=this.className,t=this.allRuleNames,tj(r=function(){},e+"BaseSemantics"),r.prototype={visit:function(e,t){if((0,R.cy)(e)&&(e=e[0]),!(0,R.b0)(e))if(void 0!==e.fullName)return this[e.fullName](e.children,t);else return this[e.name](e.children,t)},validateVisitor:function(){var e,r,i,n,o,s,l,a=(e=this,r=t,s=(i=e,n=r,o=(0,R.Tj)(n,function(e){if(!(0,R.Tn)(i[e]))return{msg:"Missing visitor method: <"+e+"> on "+tG(i.constructor)+" CST Visitor.",type:C.MISSING_METHOD,methodName:e}}),(0,R.oE)(o)),l=function(e,t){var r=[];for(var i in e)tm.test(i)&&(0,R.Tn)(e[i])&&!(0,R.gR)(tK,i)&&!(0,R.gR)(t,i)&&r.push({msg:"Redundant visitor method: <"+i+"> on "+tG(e.constructor)+" CST Visitor\nThere is no Grammar Rule corresponding to this method's name.\nFor utility methods on visitor classes use methods names that do not match /"+tm.source+"/.",type:C.REDUNDANT_METHOD,methodName:i});return r}(e,r),s.concat(l));if(!(0,R.Im)(a)){var h=(0,R.Tj)(a,function(e){return e.msg});throw Error("Errors Detected in CST Visitor <"+tG(this.constructor)+">:\n "+h.join("\n\n").replace(/\n/g,"\n "))}}},r.prototype.constructor=r,r._RULE_NAMES=t,r);return this.baseCstVisitorConstructor=i,i}return this.baseCstVisitorConstructor},e.prototype.getBaseCstVisitorConstructorWithDefaults=function(){if((0,R.b0)(this.baseCstVisitorWithDefaultsConstructor)){var e,t,r,i,n,o=(e=this.className,t=this.allRuleNames,r=this.getBaseCstVisitorConstructor(),tj(i=function(){},e+"BaseSemanticsWithDefaults"),n=Object.create(r.prototype),(0,R.jJ)(t,function(e){n[e]=tY}),i.prototype=n,i.prototype.constructor=i,i);return this.baseCstVisitorWithDefaultsConstructor=o,o}return this.baseCstVisitorWithDefaultsConstructor},e.prototype.nestedRuleBeforeClause=function(e,t){var r;return void 0!==e.NAME?(r=e.NAME,this.nestedRuleInvocationStateUpdate(r,t),r):void 0},e.prototype.nestedAltBeforeClause=function(e,t,r,i){var n,o,s=(n=this.getLastExplicitRuleShortName(),t|r|n|i+1<<24);return void 0!==e.NAME?(o=e.NAME,this.nestedRuleInvocationStateUpdate(o,s),{shortName:s,nestedName:o}):void 0},e.prototype.nestedRuleFinallyClause=function(e,t){var r=this.CST_STACK,i=r[r.length-1];this.nestedRuleFinallyStateUpdate();var n=r[r.length-1];e0(n,t,i),this.setNodeLocationFromNode(n.location,i.location)},e.prototype.getLastExplicitRuleShortName=function(){var e=this.LAST_EXPLICIT_RULE_STACK[this.LAST_EXPLICIT_RULE_STACK.length-1];return this.RULE_STACK[e]},e.prototype.getLastExplicitRuleShortNameNoCst=function(){var e=this.RULE_STACK;return e[e.length-1]},e.prototype.getPreviousExplicitRuleShortName=function(){var e=this.LAST_EXPLICIT_RULE_STACK[this.LAST_EXPLICIT_RULE_STACK.length-2];return this.RULE_STACK[e]},e.prototype.getPreviousExplicitRuleShortNameNoCst=function(){var e=this.RULE_STACK;return e[e.length-2]},e.prototype.getLastExplicitRuleOccurrenceIndex=function(){var e=this.LAST_EXPLICIT_RULE_STACK[this.LAST_EXPLICIT_RULE_STACK.length-1];return this.RULE_OCCURRENCE_STACK[e]},e.prototype.getLastExplicitRuleOccurrenceIndexNoCst=function(){var e=this.RULE_OCCURRENCE_STACK;return e[e.length-1]},e.prototype.nestedRuleInvocationStateUpdate=function(e,t){this.RULE_OCCURRENCE_STACK.push(1),this.RULE_STACK.push(t),this.cstNestedInvocationStateUpdate(e,t)},e.prototype.nestedRuleFinallyStateUpdate=function(){this.RULE_STACK.pop(),this.RULE_OCCURRENCE_STACK.pop(),this.cstNestedFinallyStateUpdate()},e}(),tX=function(){function e(){}return e.prototype.initLexerAdapter=function(){this.tokVector=[],this.tokVectorLength=0,this.currIdx=-1},Object.defineProperty(e.prototype,"input",{get:function(){return this.tokVector},set:function(e){if(!0!==this.selfAnalysisDone)throw Error("Missing <performSelfAnalysis> invocation at the end of the Parser's constructor.");this.reset(),this.tokVector=e,this.tokVectorLength=e.length},enumerable:!0,configurable:!0}),e.prototype.SKIP_TOKEN=function(){return this.currIdx<=this.tokVector.length-2?(this.consumeToken(),this.LA(1)):rr},e.prototype.LA=function(e){var t=this.currIdx+e;return t<0||this.tokVectorLength<=t?rr:this.tokVector[t]},e.prototype.consumeToken=function(){this.currIdx++},e.prototype.exportLexerState=function(){return this.currIdx},e.prototype.importLexerState=function(e){this.currIdx=e},e.prototype.resetLexerState=function(){this.currIdx=-1},e.prototype.moveToTerminatedState=function(){this.currIdx=this.tokVector.length-1},e.prototype.getLexerPosition=function(){return this.exportLexerState()},e}(),tQ=function(){function e(){}return e.prototype.ACTION=function(e){return e.call(this)},e.prototype.consume=function(e,t,r){return this.consumeInternal(t,e,r)},e.prototype.subrule=function(e,t,r){return this.subruleInternal(t,e,r)},e.prototype.option=function(e,t){return this.optionInternal(t,e)},e.prototype.or=function(e,t){return this.orInternal(t,e)},e.prototype.many=function(e,t){return this.manyInternal(e,t)},e.prototype.atLeastOne=function(e,t){return this.atLeastOneInternal(e,t)},e.prototype.CONSUME=function(e,t){return this.consumeInternal(e,0,t)},e.prototype.CONSUME1=function(e,t){return this.consumeInternal(e,1,t)},e.prototype.CONSUME2=function(e,t){return this.consumeInternal(e,2,t)},e.prototype.CONSUME3=function(e,t){return this.consumeInternal(e,3,t)},e.prototype.CONSUME4=function(e,t){return this.consumeInternal(e,4,t)},e.prototype.CONSUME5=function(e,t){return this.consumeInternal(e,5,t)},e.prototype.CONSUME6=function(e,t){return this.consumeInternal(e,6,t)},e.prototype.CONSUME7=function(e,t){return this.consumeInternal(e,7,t)},e.prototype.CONSUME8=function(e,t){return this.consumeInternal(e,8,t)},e.prototype.CONSUME9=function(e,t){return this.consumeInternal(e,9,t)},e.prototype.SUBRULE=function(e,t){return this.subruleInternal(e,0,t)},e.prototype.SUBRULE1=function(e,t){return this.subruleInternal(e,1,t)},e.prototype.SUBRULE2=function(e,t){return this.subruleInternal(e,2,t)},e.prototype.SUBRULE3=function(e,t){return this.subruleInternal(e,3,t)},e.prototype.SUBRULE4=function(e,t){return this.subruleInternal(e,4,t)},e.prototype.SUBRULE5=function(e,t){return this.subruleInternal(e,5,t)},e.prototype.SUBRULE6=function(e,t){return this.subruleInternal(e,6,t)},e.prototype.SUBRULE7=function(e,t){return this.subruleInternal(e,7,t)},e.prototype.SUBRULE8=function(e,t){return this.subruleInternal(e,8,t)},e.prototype.SUBRULE9=function(e,t){return this.subruleInternal(e,9,t)},e.prototype.OPTION=function(e){return this.optionInternal(e,0)},e.prototype.OPTION1=function(e){return this.optionInternal(e,1)},e.prototype.OPTION2=function(e){return this.optionInternal(e,2)},e.prototype.OPTION3=function(e){return this.optionInternal(e,3)},e.prototype.OPTION4=function(e){return this.optionInternal(e,4)},e.prototype.OPTION5=function(e){return this.optionInternal(e,5)},e.prototype.OPTION6=function(e){return this.optionInternal(e,6)},e.prototype.OPTION7=function(e){return this.optionInternal(e,7)},e.prototype.OPTION8=function(e){return this.optionInternal(e,8)},e.prototype.OPTION9=function(e){return this.optionInternal(e,9)},e.prototype.OR=function(e){return this.orInternal(e,0)},e.prototype.OR1=function(e){return this.orInternal(e,1)},e.prototype.OR2=function(e){return this.orInternal(e,2)},e.prototype.OR3=function(e){return this.orInternal(e,3)},e.prototype.OR4=function(e){return this.orInternal(e,4)},e.prototype.OR5=function(e){return this.orInternal(e,5)},e.prototype.OR6=function(e){return this.orInternal(e,6)},e.prototype.OR7=function(e){return this.orInternal(e,7)},e.prototype.OR8=function(e){return this.orInternal(e,8)},e.prototype.OR9=function(e){return this.orInternal(e,9)},e.prototype.MANY=function(e){this.manyInternal(0,e)},e.prototype.MANY1=function(e){this.manyInternal(1,e)},e.prototype.MANY2=function(e){this.manyInternal(2,e)},e.prototype.MANY3=function(e){this.manyInternal(3,e)},e.prototype.MANY4=function(e){this.manyInternal(4,e)},e.prototype.MANY5=function(e){this.manyInternal(5,e)},e.prototype.MANY6=function(e){this.manyInternal(6,e)},e.prototype.MANY7=function(e){this.manyInternal(7,e)},e.prototype.MANY8=function(e){this.manyInternal(8,e)},e.prototype.MANY9=function(e){this.manyInternal(9,e)},e.prototype.MANY_SEP=function(e){this.manySepFirstInternal(0,e)},e.prototype.MANY_SEP1=function(e){this.manySepFirstInternal(1,e)},e.prototype.MANY_SEP2=function(e){this.manySepFirstInternal(2,e)},e.prototype.MANY_SEP3=function(e){this.manySepFirstInternal(3,e)},e.prototype.MANY_SEP4=function(e){this.manySepFirstInternal(4,e)},e.prototype.MANY_SEP5=function(e){this.manySepFirstInternal(5,e)},e.prototype.MANY_SEP6=function(e){this.manySepFirstInternal(6,e)},e.prototype.MANY_SEP7=function(e){this.manySepFirstInternal(7,e)},e.prototype.MANY_SEP8=function(e){this.manySepFirstInternal(8,e)},e.prototype.MANY_SEP9=function(e){this.manySepFirstInternal(9,e)},e.prototype.AT_LEAST_ONE=function(e){this.atLeastOneInternal(0,e)},e.prototype.AT_LEAST_ONE1=function(e){return this.atLeastOneInternal(1,e)},e.prototype.AT_LEAST_ONE2=function(e){this.atLeastOneInternal(2,e)},e.prototype.AT_LEAST_ONE3=function(e){this.atLeastOneInternal(3,e)},e.prototype.AT_LEAST_ONE4=function(e){this.atLeastOneInternal(4,e)},e.prototype.AT_LEAST_ONE5=function(e){this.atLeastOneInternal(5,e)},e.prototype.AT_LEAST_ONE6=function(e){this.atLeastOneInternal(6,e)},e.prototype.AT_LEAST_ONE7=function(e){this.atLeastOneInternal(7,e)},e.prototype.AT_LEAST_ONE8=function(e){this.atLeastOneInternal(8,e)},e.prototype.AT_LEAST_ONE9=function(e){this.atLeastOneInternal(9,e)},e.prototype.AT_LEAST_ONE_SEP=function(e){this.atLeastOneSepFirstInternal(0,e)},e.prototype.AT_LEAST_ONE_SEP1=function(e){this.atLeastOneSepFirstInternal(1,e)},e.prototype.AT_LEAST_ONE_SEP2=function(e){this.atLeastOneSepFirstInternal(2,e)},e.prototype.AT_LEAST_ONE_SEP3=function(e){this.atLeastOneSepFirstInternal(3,e)},e.prototype.AT_LEAST_ONE_SEP4=function(e){this.atLeastOneSepFirstInternal(4,e)},e.prototype.AT_LEAST_ONE_SEP5=function(e){this.atLeastOneSepFirstInternal(5,e)},e.prototype.AT_LEAST_ONE_SEP6=function(e){this.atLeastOneSepFirstInternal(6,e)},e.prototype.AT_LEAST_ONE_SEP7=function(e){this.atLeastOneSepFirstInternal(7,e)},e.prototype.AT_LEAST_ONE_SEP8=function(e){this.atLeastOneSepFirstInternal(8,e)},e.prototype.AT_LEAST_ONE_SEP9=function(e){this.atLeastOneSepFirstInternal(9,e)},e.prototype.RULE=function(e,t,r){if(void 0===r&&(r=rn),(0,R.gR)(this.definedRulesNames,e)){var i={message:tS.buildDuplicateRuleNameError({topLevelRule:e,grammarName:this.className}),type:S.DUPLICATE_RULE_NAME,ruleName:e};this.definitionErrors.push(i)}this.definedRulesNames.push(e);var n=this.defineRule(e,t,r);return this[e]=n,n},e.prototype.OVERRIDE_RULE=function(e,t,r){void 0===r&&(r=rn);var i,n,o,s=[];s=s.concat((i=this.definedRulesNames,n=this.className,o=[],R.gR(i,e)||o.push({message:"Invalid rule override, rule: ->"+e+"<- cannot be overridden in the grammar: ->"+n+"<-as it is not defined in any of the super grammars ",type:S.INVALID_RULE_OVERRIDE,ruleName:e}),o)),this.definitionErrors.push.apply(this.definitionErrors,s);var l=this.defineRule(e,t,r);return this[e]=l,l},e.prototype.BACKTRACK=function(e,t){return function(){this.isBackTrackingStack.push(1);var r=this.saveRecogState();try{return e.apply(this,t),!0}catch(e){if(tk(e))return!1;throw e}finally{this.reloadRecogState(r),this.isBackTrackingStack.pop()}}},e.prototype.getGAstProductions=function(){return this.gastProductionsCache},e.prototype.getSerializedGastProductions=function(){return eL((0,R.zu)(this.gastProductionsCache))},e}(),tZ=function(){function e(){}return e.prototype.initRecognizerEngine=function(e,t){if(this.className=tG(this.constructor),this.shortRuleNameToFull={},this.fullRuleNameToShort={},this.ruleShortNameIdx=256,this.tokenMatcher=J,this.definedRulesNames=[],this.tokensMap={},this.allRuleNames=[],this.isBackTrackingStack=[],this.RULE_STACK=[],this.RULE_OCCURRENCE_STACK=[],this.gastProductionsCache={},(0,R.zy)(t,"serializedGrammar"))throw Error("The Parser's configuration can no longer contain a <serializedGrammar> property.\n See: https://sap.github.io/chevrotain/docs/changes/BREAKING_CHANGES.html#_6-0-0\n For Further details.");if((0,R.cy)(e)){if((0,R.Im)(e))throw Error("A Token Vocabulary cannot be empty.\n Note that the first argument for the parser constructor\n is no longer a Token vector (since v4.0).");if("number"==typeof e[0].startOffset)throw Error("The Parser constructor no longer accepts a token vector as the first argument.\n See: https://sap.github.io/chevrotain/docs/changes/BREAKING_CHANGES.html#_4-0-0\n For Further details.")}if((0,R.cy)(e))this.tokensMap=(0,R.TS)(e,function(e,t){return e[t.name]=t,e},{});else if((0,R.zy)(e,"modes")&&(0,R.Si)((0,R.Bq)((0,R.zu)(e.modes)),eo)){var r=(0,R.Bq)((0,R.zu)(e.modes)),i=(0,R.sb)(r);this.tokensMap=(0,R.TS)(i,function(e,t){return e[t.name]=t,e},{})}else if((0,R.Gv)(e))this.tokensMap=(0,R.lR)(e);else throw Error("<tokensDictionary> argument must be An Array of Token constructors, A dictionary of Token constructors or an IMultiModeLexerDefinition");this.tokensMap.EOF=ev;var n=(0,R.Si)((0,R.zu)(e),function(e){return(0,R.Im)(e.categoryMatches)});this.tokenMatcher=n?J:Z,er((0,R.zu)(this.tokensMap))},e.prototype.defineRule=function(e,t,r){if(this.selfAnalysisDone)throw Error("Grammar rule <"+e+"> may not be defined after the 'performSelfAnalysis' method has been called'\nMake sure that all grammar rule definitions are done before 'performSelfAnalysis' is called.");var i,n=(0,R.zy)(r,"resyncEnabled")?r.resyncEnabled:rn.resyncEnabled,o=(0,R.zy)(r,"recoveryValueFunc")?r.recoveryValueFunc:rn.recoveryValueFunc,s=this.ruleShortNameIdx<<12;function l(e){try{if(!0!==this.outputCst)return t.apply(this,e);t.apply(this,e);var r=this.CST_STACK[this.CST_STACK.length-1];return this.cstPostRule(r),r}catch(e){return this.invokeRuleCatch(e,n,o)}finally{this.ruleFinallyStateUpdate()}}return this.ruleShortNameIdx++,this.shortRuleNameToFull[s]=e,this.fullRuleNameToShort[e]=s,(i=function(t,r){return void 0===t&&(t=0),this.ruleInvocationStateUpdate(s,e,t),l.call(this,r)}).ruleName=e,i.originalGrammarAction=t,i},e.prototype.invokeRuleCatch=function(e,t,r){var i=1===this.RULE_STACK.length,n=t&&!this.isBackTracking()&&this.recoveryEnabled;if(tk(e)){if(n){var o=this.findReSyncTokenType();if(this.isInCurrentRuleReSyncSet(o)){if(e.resyncedTokens=this.reSyncTo(o),!this.outputCst)return r();var s=this.CST_STACK[this.CST_STACK.length-1];return s.recoveredNode=!0,s}if(this.outputCst){var s=this.CST_STACK[this.CST_STACK.length-1];s.recoveredNode=!0,e.partialCstResult=s}throw e}if(i)return this.moveToTerminatedState(),r()}throw e},e.prototype.optionInternal=function(e,t){var r=this.getKeyForAutomaticLookahead(512,t),i=this.nestedRuleBeforeClause(e,r);try{return this.optionInternalLogic(e,t,r)}finally{void 0!==i&&this.nestedRuleFinallyClause(r,i)}},e.prototype.optionInternalNoCst=function(e,t){var r=this.getKeyForAutomaticLookahead(512,t);return this.optionInternalLogic(e,t,r)},e.prototype.optionInternalLogic=function(e,t,r){var i,n,o=this,s=this.getLaFuncFromCache(r);if(void 0!==e.DEF){if(i=e.DEF,void 0!==(n=e.GATE)){var l=s;s=function(){return n.call(o)&&l.call(o)}}}else i=e;if(!0===s.call(this))return i.call(this)},e.prototype.atLeastOneInternal=function(e,t){var r=this.getKeyForAutomaticLookahead(1024,e),i=this.nestedRuleBeforeClause(t,r);try{return this.atLeastOneInternalLogic(e,t,r)}finally{void 0!==i&&this.nestedRuleFinallyClause(r,i)}},e.prototype.atLeastOneInternalNoCst=function(e,t){var r=this.getKeyForAutomaticLookahead(1024,e);this.atLeastOneInternalLogic(e,t,r)},e.prototype.atLeastOneInternalLogic=function(e,t,r){var i,n,o=this,s=this.getLaFuncFromCache(r);if(void 0!==t.DEF){if(i=t.DEF,void 0!==(n=t.GATE)){var l=s;s=function(){return n.call(o)&&l.call(o)}}}else i=t;if(!0===s.call(this))for(var a=this.doSingleRepetition(i);!0===s.call(this)&&!0===a;)a=this.doSingleRepetition(i);else throw this.raiseEarlyExitException(e,b.REPETITION_MANDATORY,t.ERR_MSG);this.attemptInRepetitionRecovery(this.atLeastOneInternal,[e,t],s,1024,e,e8)},e.prototype.atLeastOneSepFirstInternal=function(e,t){var r=this.getKeyForAutomaticLookahead(1536,e),i=this.nestedRuleBeforeClause(t,r);try{this.atLeastOneSepFirstInternalLogic(e,t,r)}finally{void 0!==i&&this.nestedRuleFinallyClause(r,i)}},e.prototype.atLeastOneSepFirstInternalNoCst=function(e,t){var r=this.getKeyForAutomaticLookahead(1536,e);this.atLeastOneSepFirstInternalLogic(e,t,r)},e.prototype.atLeastOneSepFirstInternalLogic=function(e,t,r){var i=this,n=t.DEF,o=t.SEP;if(!0===this.getLaFuncFromCache(r).call(this)){n.call(this);for(var s=function(){return i.tokenMatcher(i.LA(1),o)};!0===this.tokenMatcher(this.LA(1),o);)this.CONSUME(o),n.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[e,o,s,n,e9],s,1536,e,e9)}else throw this.raiseEarlyExitException(e,b.REPETITION_MANDATORY_WITH_SEPARATOR,t.ERR_MSG)},e.prototype.manyInternal=function(e,t){var r=this.getKeyForAutomaticLookahead(768,e),i=this.nestedRuleBeforeClause(t,r);try{return this.manyInternalLogic(e,t,r)}finally{void 0!==i&&this.nestedRuleFinallyClause(r,i)}},e.prototype.manyInternalNoCst=function(e,t){var r=this.getKeyForAutomaticLookahead(768,e);return this.manyInternalLogic(e,t,r)},e.prototype.manyInternalLogic=function(e,t,r){var i,n,o=this,s=this.getLaFuncFromCache(r);if(void 0!==t.DEF){if(i=t.DEF,void 0!==(n=t.GATE)){var l=s;s=function(){return n.call(o)&&l.call(o)}}}else i=t;for(var a=!0;!0===s.call(this)&&!0===a;)a=this.doSingleRepetition(i);this.attemptInRepetitionRecovery(this.manyInternal,[e,t],s,768,e,e5,a)},e.prototype.manySepFirstInternal=function(e,t){var r=this.getKeyForAutomaticLookahead(1280,e),i=this.nestedRuleBeforeClause(t,r);try{this.manySepFirstInternalLogic(e,t,r)}finally{void 0!==i&&this.nestedRuleFinallyClause(r,i)}},e.prototype.manySepFirstInternalNoCst=function(e,t){var r=this.getKeyForAutomaticLookahead(1280,e);this.manySepFirstInternalLogic(e,t,r)},e.prototype.manySepFirstInternalLogic=function(e,t,r){var i=this,n=t.DEF,o=t.SEP;if(!0===this.getLaFuncFromCache(r).call(this)){n.call(this);for(var s=function(){return i.tokenMatcher(i.LA(1),o)};!0===this.tokenMatcher(this.LA(1),o);)this.CONSUME(o),n.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[e,o,s,n,e4],s,1280,e,e4)}},e.prototype.repetitionSepSecondInternal=function(e,t,r,i,n){for(;r();)this.CONSUME(t),i.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[e,t,r,i,n],r,1536,e,n)},e.prototype.doSingleRepetition=function(e){var t=this.getLexerPosition();return e.call(this),this.getLexerPosition()>t},e.prototype.orInternalNoCst=function(e,t){var r=(0,R.cy)(e)?e:e.DEF,i=this.getKeyForAutomaticLookahead(256,t),n=this.getLaFuncFromCache(i).call(this,r);if(void 0!==n)return r[n].ALT.call(this);this.raiseNoAltException(t,e.ERR_MSG)},e.prototype.orInternal=function(e,t){var r=this.getKeyForAutomaticLookahead(256,t),i=this.nestedRuleBeforeClause(e,r);try{var n=(0,R.cy)(e)?e:e.DEF,o=this.getLaFuncFromCache(r).call(this,n);if(void 0!==o){var s=n[o],l=this.nestedAltBeforeClause(s,t,256,o);try{return s.ALT.call(this)}finally{void 0!==l&&this.nestedRuleFinallyClause(l.shortName,l.nestedName)}}this.raiseNoAltException(t,e.ERR_MSG)}finally{void 0!==i&&this.nestedRuleFinallyClause(r,i)}},e.prototype.ruleFinallyStateUpdate=function(){if(this.RULE_STACK.pop(),this.RULE_OCCURRENCE_STACK.pop(),this.cstFinallyStateUpdate(),0===this.RULE_STACK.length&&!1===this.isAtEndOfInput()){var e=this.LA(1),t=this.errorMessageProvider.buildNotAllInputParsedMessage({firstRedundant:e,ruleName:this.getCurrRuleFullName()});this.SAVE_ERROR(new tP(t,e))}},e.prototype.subruleInternal=function(e,t,r){var i;try{var n=void 0!==r?r.ARGS:void 0;return i=e.call(this,t,n),this.cstPostNonTerminal(i,void 0!==r&&void 0!==r.LABEL?r.LABEL:e.ruleName),i}catch(t){this.subruleInternalError(t,r,e.ruleName)}},e.prototype.subruleInternalError=function(e,t,r){throw tk(e)&&void 0!==e.partialCstResult&&(this.cstPostNonTerminal(e.partialCstResult,void 0!==t&&void 0!==t.LABEL?t.LABEL:r),delete e.partialCstResult),e},e.prototype.consumeInternal=function(e,t,r){var i;try{var n=this.LA(1);!0===this.tokenMatcher(n,e)?(this.consumeToken(),i=n):this.consumeInternalError(e,n,r)}catch(r){i=this.consumeInternalRecovery(e,t,r)}return this.cstPostTerminal(void 0!==r&&void 0!==r.LABEL?r.LABEL:e.name,i),i},e.prototype.consumeInternalError=function(e,t,r){var i,n=this.LA(0);throw i=void 0!==r&&r.ERR_MSG?r.ERR_MSG:this.errorMessageProvider.buildMismatchTokenMessage({expected:e,actual:t,previous:n,ruleName:this.getCurrRuleFullName()}),this.SAVE_ERROR(new tH(i,t,n))},e.prototype.consumeInternalRecovery=function(e,t,r){if(this.recoveryEnabled&&"MismatchedTokenException"===r.name&&!this.isBackTracking()){var i=this.getFollowsForInRuleRecovery(e,t);try{return this.tryInRuleRecovery(e,i)}catch(e){if(e.name===tF)throw r;throw e}}throw r},e.prototype.saveRecogState=function(){var e=this.errors,t=(0,R.T9)(this.RULE_STACK);return{errors:e,lexerState:this.exportLexerState(),RULE_STACK:t,CST_STACK:this.CST_STACK,LAST_EXPLICIT_RULE_STACK:this.LAST_EXPLICIT_RULE_STACK}},e.prototype.reloadRecogState=function(e){this.errors=e.errors,this.importLexerState(e.lexerState),this.RULE_STACK=e.RULE_STACK},e.prototype.ruleInvocationStateUpdate=function(e,t,r){this.RULE_OCCURRENCE_STACK.push(r),this.RULE_STACK.push(e),this.cstInvocationStateUpdate(t,e)},e.prototype.isBackTracking=function(){return 0!==this.isBackTrackingStack.length},e.prototype.getCurrRuleFullName=function(){var e=this.getLastExplicitRuleShortName();return this.shortRuleNameToFull[e]},e.prototype.shortRuleNameToFullName=function(e){return this.shortRuleNameToFull[e]},e.prototype.isAtEndOfInput=function(){return this.tokenMatcher(this.LA(1),ev)},e.prototype.reset=function(){this.resetLexerState(),this.isBackTrackingStack=[],this.errors=[],this.RULE_STACK=[],this.LAST_EXPLICIT_RULE_STACK=[],this.CST_STACK=[],this.RULE_OCCURRENCE_STACK=[]},e}(),tJ=function(){function e(){}return e.prototype.initErrorHandler=function(e){this._errors=[],this.errorMessageProvider=(0,R.NT)(e.errorMessageProvider,ri.errorMessageProvider)},e.prototype.SAVE_ERROR=function(e){if(tk(e))return e.context={ruleStack:this.getHumanReadableRuleStack(),ruleOccurrenceStack:(0,R.T9)(this.RULE_OCCURRENCE_STACK)},this._errors.push(e),e;throw Error("Trying to save an Error which is not a RecognitionException")},Object.defineProperty(e.prototype,"errors",{get:function(){return(0,R.T9)(this._errors)},set:function(e){this._errors=e},enumerable:!0,configurable:!0}),e.prototype.raiseEarlyExitException=function(e,t,r){for(var i=this.getCurrRuleFullName(),n=ta(e,this.getGAstProductions()[i],t,this.maxLookahead)[0],o=[],s=1;s<=this.maxLookahead;s++)o.push(this.LA(s));var l=this.errorMessageProvider.buildEarlyExitMessage({expectedIterationPaths:n,actual:o,previous:this.LA(0),customUserDescription:r,ruleName:i});throw this.SAVE_ERROR(new tD(l,this.LA(1),this.LA(0)))},e.prototype.raiseNoAltException=function(e,t){for(var r=this.getCurrRuleFullName(),i=tl(e,this.getGAstProductions()[r],this.maxLookahead),n=[],o=1;o<=this.maxLookahead;o++)n.push(this.LA(o));var s=this.LA(0),l=this.errorMessageProvider.buildNoViableAltMessage({expectedPathsPerAlt:i,actual:n,previous:s,customUserDescription:t,ruleName:this.getCurrRuleFullName()});throw this.SAVE_ERROR(new t_(l,this.LA(1),s))},e}(),t0=function(){function e(){}return e.prototype.initContentAssist=function(){},e.prototype.computeContentAssist=function(e,t){var r=this.gastProductionsCache[e];if((0,R.b0)(r))throw Error("Rule ->"+e+"<- does not exist in this grammar.");return te([r],t,this.tokenMatcher,this.maxLookahead)},e.prototype.getNextPossibleTokenTypes=function(e){var t=(0,R.$1)(e.ruleStack);return new e3(this.getGAstProductions()[t],e).startWalking()},e}(),t1={description:"This Object indicates the Parser is during Recording Phase"};Object.freeze(t1);var t2=eS({name:"RECORDING_PHASE_TOKEN",pattern:ea.NA});er([t2]);var t3=eR(t2,"This IToken indicates the Parser is in Recording Phase\n See: https://sap.github.io/chevrotain/docs/guide/internals.html#grammar-recording for details",-1,-1,-1,-1,-1,-1);Object.freeze(t3);var t6={name:"This CSTNode indicates the Parser is in Recording Phase\n See: https://sap.github.io/chevrotain/docs/guide/internals.html#grammar-recording for details",children:{}},t5=function(){function e(){}return e.prototype.initGastRecorder=function(e){this.recordingProdStack=[],this.RECORDING_PHASE=!1},e.prototype.enableRecording=function(){var e=this;this.RECORDING_PHASE=!0,this.TRACE_INIT("Enable Recording",function(){for(var t=function(t){var r=t>0?t:"";e["CONSUME"+r]=function(e,r){return this.consumeInternalRecord(e,t,r)},e["SUBRULE"+r]=function(e,r){return this.subruleInternalRecord(e,t,r)},e["OPTION"+r]=function(e){return this.optionInternalRecord(e,t)},e["OR"+r]=function(e){return this.orInternalRecord(e,t)},e["MANY"+r]=function(e){this.manyInternalRecord(t,e)},e["MANY_SEP"+r]=function(e){this.manySepFirstInternalRecord(t,e)},e["AT_LEAST_ONE"+r]=function(e){this.atLeastOneInternalRecord(t,e)},e["AT_LEAST_ONE_SEP"+r]=function(e){this.atLeastOneSepFirstInternalRecord(t,e)}},r=0;r<10;r++)t(r);e.consume=function(e,t,r){return this.consumeInternalRecord(t,e,r)},e.subrule=function(e,t,r){return this.subruleInternalRecord(t,e,r)},e.option=function(e,t){return this.optionInternalRecord(t,e)},e.or=function(e,t){return this.orInternalRecord(t,e)},e.many=function(e,t){this.manyInternalRecord(e,t)},e.atLeastOne=function(e,t){this.atLeastOneInternalRecord(e,t)},e.ACTION=e.ACTION_RECORD,e.BACKTRACK=e.BACKTRACK_RECORD,e.LA=e.LA_RECORD})},e.prototype.disableRecording=function(){var e=this;this.RECORDING_PHASE=!1,this.TRACE_INIT("Deleting Recording methods",function(){for(var t=0;t<10;t++){var r=t>0?t:"";delete e["CONSUME"+r],delete e["SUBRULE"+r],delete e["OPTION"+r],delete e["OR"+r],delete e["MANY"+r],delete e["MANY_SEP"+r],delete e["AT_LEAST_ONE"+r],delete e["AT_LEAST_ONE_SEP"+r]}delete e.consume,delete e.subrule,delete e.option,delete e.or,delete e.many,delete e.atLeastOne,delete e.ACTION,delete e.BACKTRACK,delete e.LA})},e.prototype.ACTION_RECORD=function(e){},e.prototype.BACKTRACK_RECORD=function(e,t){return function(){return!0}},e.prototype.LA_RECORD=function(e){return rr},e.prototype.topLevelRuleRecord=function(e,t){try{var r=new eM({definition:[],name:e});return r.name=e,this.recordingProdStack.push(r),t.call(this),this.recordingProdStack.pop(),r}catch(e){if(!0!==e.KNOWN_RECORDER_ERROR)try{e.message=e.message+'\n This error was thrown during the "grammar recording phase" For more info see:\n https://sap.github.io/chevrotain/docs/guide/internals.html#grammar-recording'}catch(e){}throw e}},e.prototype.optionInternalRecord=function(e,t){return t4.call(this,eN,e,t)},e.prototype.atLeastOneInternalRecord=function(e,t){t4.call(this,eO,t,e)},e.prototype.atLeastOneSepFirstInternalRecord=function(e,t){t4.call(this,ek,t,e,!0)},e.prototype.manyInternalRecord=function(e,t){t4.call(this,eH,t,e)},e.prototype.manySepFirstInternalRecord=function(e,t){t4.call(this,e_,t,e,!0)},e.prototype.orInternalRecord=function(e,t){return t8.call(this,e,t)},e.prototype.subruleInternalRecord=function(e,t,r){if(t7(t),!e||!1===(0,R.zy)(e,"ruleName")){var i=Error("<SUBRULE"+t9(t)+"> argument is invalid expecting a Parser method reference but got: <"+JSON.stringify(e)+">\n inside top level rule: <"+this.recordingProdStack[0].name+">");throw i.KNOWN_RECORDER_ERROR=!0,i}var n=(0,R.se)(this.recordingProdStack),o=new eA({idx:t,nonTerminalName:e.ruleName,referencedRule:void 0});return n.definition.push(o),this.outputCst?t6:t1},e.prototype.consumeInternalRecord=function(e,t,r){if(t7(t),!ei(e)){var i=Error("<CONSUME"+t9(t)+"> argument is invalid expecting a TokenType reference but got: <"+JSON.stringify(e)+">\n inside top level rule: <"+this.recordingProdStack[0].name+">");throw i.KNOWN_RECORDER_ERROR=!0,i}var n=(0,R.se)(this.recordingProdStack),o=new eD({idx:t,terminalType:e});return n.definition.push(o),t3},e}();function t4(e,t,r,i){void 0===i&&(i=!1),t7(r);var n=(0,R.se)(this.recordingProdStack),o=(0,R.Tn)(t)?t:t.DEF,s=new e({definition:[],idx:r});return(0,R.zy)(t,"NAME")&&(s.name=t.NAME),i&&(s.separator=t.SEP),(0,R.zy)(t,"MAX_LOOKAHEAD")&&(s.maxLookahead=t.MAX_LOOKAHEAD),this.recordingProdStack.push(s),o.call(this),n.definition.push(s),this.recordingProdStack.pop(),t1}function t8(e,t){var r=this;t7(t);var i=(0,R.se)(this.recordingProdStack),n=!1===(0,R.cy)(e),o=!1===n?e:e.DEF,s=new eP({definition:[],idx:t,ignoreAmbiguities:n&&!0===e.IGNORE_AMBIGUITIES});return(0,R.zy)(e,"NAME")&&(s.name=e.NAME),(0,R.zy)(e,"MAX_LOOKAHEAD")&&(s.maxLookahead=e.MAX_LOOKAHEAD),s.hasPredicates=(0,R.zN)(o,function(e){return(0,R.Tn)(e.GATE)}),i.definition.push(s),(0,R.jJ)(o,function(e){var t=new eI({definition:[]});s.definition.push(t),(0,R.zy)(e,"NAME")&&(t.name=e.NAME),(0,R.zy)(e,"IGNORE_AMBIGUITIES")?t.ignoreAmbiguities=e.IGNORE_AMBIGUITIES:(0,R.zy)(e,"GATE")&&(t.ignoreAmbiguities=!0),r.recordingProdStack.push(t),e.ALT.call(r),r.recordingProdStack.pop()}),t1}function t9(e){return 0===e?"":""+e}function t7(e){if(e<0||e>255){var t=Error("Invalid DSL Method idx value: <"+e+">\n Idx value must be a none negative value smaller than "+256);throw t.KNOWN_RECORDER_ERROR=!0,t}}var re=function(){function e(){}return e.prototype.initPerformanceTracer=function(e){if((0,R.zy)(e,"traceInitPerf")){var t=e.traceInitPerf,r="number"==typeof t;this.traceInitMaxIdent=r?t:1/0,this.traceInitPerf=r?t>0:t}else this.traceInitMaxIdent=0,this.traceInitPerf=ri.traceInitPerf;this.traceInitIndent=-1},e.prototype.TRACE_INIT=function(e,t){if(!0!==this.traceInitPerf)return t();this.traceInitIndent++;var r=Array(this.traceInitIndent+1).join(" ");this.traceInitIndent<this.traceInitMaxIdent&&console.log(r+"--\x3e <"+e+">");var i=(0,R.O1)(t),n=i.time,o=i.value,s=n>10?console.warn:console.log;return this.traceInitIndent<this.traceInitMaxIdent&&s(r+"<-- <"+e+"> time: "+n+"ms"),this.traceInitIndent--,o},e}(),rt=(f=function(e,t){return(f=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}f(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),rr=eR(ev,"",NaN,NaN,NaN,NaN,NaN,NaN);Object.freeze(rr);var ri=Object.freeze({recoveryEnabled:!1,maxLookahead:4,ignoredIssues:{},dynamicTokensEnabled:!1,outputCst:!0,errorMessageProvider:tb,nodeLocationTracking:"none",traceInitPerf:!1,skipValidations:!1}),rn=Object.freeze({recoveryValueFunc:function(){},resyncEnabled:!0});function ro(e){return void 0===e&&(e=void 0),function(){return e}}(w=S||(S={}))[w.INVALID_RULE_NAME=0]="INVALID_RULE_NAME",w[w.DUPLICATE_RULE_NAME=1]="DUPLICATE_RULE_NAME",w[w.INVALID_RULE_OVERRIDE=2]="INVALID_RULE_OVERRIDE",w[w.DUPLICATE_PRODUCTIONS=3]="DUPLICATE_PRODUCTIONS",w[w.UNRESOLVED_SUBRULE_REF=4]="UNRESOLVED_SUBRULE_REF",w[w.LEFT_RECURSION=5]="LEFT_RECURSION",w[w.NONE_LAST_EMPTY_ALT=6]="NONE_LAST_EMPTY_ALT",w[w.AMBIGUOUS_ALTS=7]="AMBIGUOUS_ALTS",w[w.CONFLICT_TOKENS_RULES_NAMESPACE=8]="CONFLICT_TOKENS_RULES_NAMESPACE",w[w.INVALID_TOKEN_NAME=9]="INVALID_TOKEN_NAME",w[w.INVALID_NESTED_RULE_NAME=10]="INVALID_NESTED_RULE_NAME",w[w.DUPLICATE_NESTED_NAME=11]="DUPLICATE_NESTED_NAME",w[w.NO_NON_EMPTY_LOOKAHEAD=12]="NO_NON_EMPTY_LOOKAHEAD",w[w.AMBIGUOUS_PREFIX_ALTS=13]="AMBIGUOUS_PREFIX_ALTS",w[w.TOO_MANY_ALTS=14]="TOO_MANY_ALTS";var rs=function(){function e(e,t){void 0===t&&(t=ri),this.ignoredIssues=ri.ignoredIssues,this.definitionErrors=[],this.selfAnalysisDone=!1,this.initErrorHandler(t),this.initLexerAdapter(),this.initLooksAhead(t),this.initRecognizerEngine(e,t),this.initRecoverable(t),this.initTreeBuilder(t),this.initContentAssist(),this.initGastRecorder(t),this.initPerformanceTracer(t),(0,R.zy)(t,"ignoredIssues")&&t.ignoredIssues!==ri.ignoredIssues&&(0,R.x5)("The <ignoredIssues> IParserConfig property is soft-deprecated and will be removed in future versions.\n Please use the <IGNORE_AMBIGUITIES> flag on the relevant DSL method instead."),this.ignoredIssues=(0,R.zy)(t,"ignoredIssues")?t.ignoredIssues:ri.ignoredIssues,this.skipValidations=(0,R.zy)(t,"skipValidations")?t.skipValidations:ri.skipValidations}return e.performSelfAnalysis=function(e){e.performSelfAnalysis()},e.prototype.performSelfAnalysis=function(){var t=this;this.TRACE_INIT("performSelfAnalysis",function(){t.selfAnalysisDone=!0;var r=t.className;t.TRACE_INIT("toFastProps",function(){(0,R.Bl)(t)}),t.TRACE_INIT("Grammar Recording",function(){try{t.enableRecording(),(0,R.jJ)(t.definedRulesNames,function(e){var r=t[e].originalGrammarAction,i=void 0;t.TRACE_INIT(e+" Rule",function(){i=t.topLevelRuleRecord(e,r)}),t.gastProductionsCache[e]=i})}finally{t.disableRecording()}});var i=[];if(t.TRACE_INIT("Grammar Resolving",function(){i=tE({rules:(0,R.zu)(t.gastProductionsCache)}),t.definitionErrors.push.apply(t.definitionErrors,i)}),t.TRACE_INIT("Grammar Validations",function(){if((0,R.Im)(i)&&!1===t.skipValidations){var e=tT({rules:(0,R.zu)(t.gastProductionsCache),maxLookahead:t.maxLookahead,tokenTypes:(0,R.zu)(t.tokensMap),ignoredIssues:t.ignoredIssues,errMsgProvider:tS,grammarName:r});t.definitionErrors.push.apply(t.definitionErrors,e)}}),(0,R.Im)(t.definitionErrors)&&(t.recoveryEnabled&&t.TRACE_INIT("computeAllProdsFollows",function(){var e,r,i=(e=(0,R.zu)(t.gastProductionsCache),r={},(0,R.jJ)(e,function(e){var t=new eX(e).startWalking();(0,R.kp)(r,t)}),r);t.resyncFollows=i}),t.TRACE_INIT("ComputeLookaheadFunctions",function(){t.preComputeLookaheadFunctions((0,R.zu)(t.gastProductionsCache))})),t.TRACE_INIT("expandAllNestedRuleNames",function(){var e,r,i,n=(e=(0,R.zu)(t.gastProductionsCache),r=t.fullRuleNameToShort,i={allRuleNames:[]},(0,R.jJ)(e,function(e){var t=r[e.name];i.allRuleNames.push(e.name);var n=new e1(t);e.accept(n),(0,R.jJ)(n.result,function(t){t.def,t.key;var r=t.name;i.allRuleNames.push(e.name+r)})}),i);t.allRuleNames=n.allRuleNames}),!e.DEFER_DEFINITION_ERRORS_HANDLING&&!(0,R.Im)(t.definitionErrors))throw Error("Parser Definition Errors detected:\n "+(0,R.Tj)(t.definitionErrors,function(e){return e.message}).join("\n-------------------------------\n"))})},e.DEFER_DEFINITION_ERRORS_HANDLING=!1,e}();(0,R.XJ)(rs,[tV,tU,tq,tX,tZ,tQ,tJ,t0,t5,re]);var rl=function(e){function t(t,r){void 0===r&&(r=ri);var i=(0,R.lR)(r);return i.outputCst=!0,e.call(this,t,i)||this}return rt(t,e),t}(rs),ra=function(e){function t(t,r){void 0===r&&(r=ri);var i=(0,R.lR)(r);return i.outputCst=!1,e.call(this,t,i)||this}return rt(t,e),t}(rs);function rh(e,t){var r=void 0===t?{}:t,i=r.resourceBase,n=void 0===i?"https://unpkg.com/chevrotain@"+v+"/diagrams/":i,o=r.css;return"\n\x3c!-- This is a generated file --\x3e\n<!DOCTYPE html>\n<meta charset=\"utf-8\">\n<style>\n body {\n background-color: hsl(30, 20%, 95%)\n }\n</style>\n\n\n<link rel='stylesheet' href='"+(void 0===o?"https://unpkg.com/chevrotain@"+v+"/diagrams/diagrams.css":o)+"'>\n"+("\n<script src='"+n+"vendor/railroad-diagrams.js'><\/script>\n<script src='"+n+"src/diagrams_builder.js'><\/script>\n<script src='"+n+"src/diagrams_behavior.js'><\/script>\n<script src='"+n+"src/main.js'><\/script>\n")+'\n<div id="diagrams" align="center"></div> \n'+("\n<script>\n window.serializedGrammar = "+JSON.stringify(e,null," ")+";\n<\/script>\n")+'\n<script>\n var diagramsDiv = document.getElementById("diagrams");\n main.drawDiagramsFromSerializedGrammar(serializedGrammar, diagramsDiv);\n<\/script>\n'}function rd(e){var t;return"\nfunction "+e.name+"(tokenVocabulary, config) {\n // invoke super constructor\n // No support for embedded actions currently, so we can 'hardcode'\n // The use of CstParser.\n chevrotain.CstParser.call(this, tokenVocabulary, config)\n\n const $ = this\n\n "+(t=e.rules,(0,R.Tj)(t,function(e){var t;return rp(1,'$.RULE("'+(t=e).name+'", function() {')+"\n"+rg(t.definition,2)+(rp(2,"})")+"\n")}).join("\n"))+"\n\n // very important to call this after all the rules have been defined.\n // otherwise the parser may not work correctly as it will lack information\n // derived during the self analysis phase.\n this.performSelfAnalysis(this)\n}\n\n// inheritance as implemented in javascript in the previous decade... :(\n"+e.name+".prototype = Object.create(chevrotain.CstParser.prototype)\n"+e.name+".prototype.constructor = "+e.name+" \n "}function ru(e,t,r){var i=rp(r,"$."+(e+t.idx)+"(");return t.name||t.separator?(i+="{\n",t.name&&(i+=rp(r+1,'NAME: "'+t.name+'"')+",\n"),t.separator&&(i+=rp(r+1,"SEP: this.tokensMap."+t.separator.name)+",\n"),i+="DEF: "+rc(t.definition,r+2)+"\n",i+=rp(r,"}")+"\n"):i+=rc(t.definition,r+1),i+=rp(r,")")+"\n"}function rc(e,t){var r="function() {\n";return r+=rg(e,t),r+=rp(t,"}")+"\n"}function rg(e,t){var r="";return(0,R.jJ)(e,function(e){r+=function(e,t){var r;if(e instanceof eA)return rp(t,"$.SUBRULE"+e.idx+"($."+e.nonTerminalName+")\n");if(e instanceof eN)return ru("OPTION",e,t);if(e instanceof eO)return ru("AT_LEAST_ONE",e,t);if(e instanceof ek)return ru("AT_LEAST_ONE_SEP",e,t);if(e instanceof e_)return ru("MANY_SEP",e,t);else if(e instanceof eH)return ru("MANY",e,t);else if(e instanceof eP)return rp(t,"$.OR"+e.idx+"([")+"\n"+(0,R.Tj)(e.definition,function(e){var r,i,n;return r=e,n=rp(i=t+1,"{")+"\n",r.name&&(n+=rp(i+1,'NAME: "'+r.name+'",')+"\n"),n+=rp(i+1,"ALT: function() {")+"\n",n+=rg(r.definition,i+1),n+=rp(i+1,"}")+"\n",n+=rp(i,"}")}).join(",\n")+"\n"+rp(t,"])\n");else if(e instanceof eD)return r=e.terminalType.name,rp(t,"$.CONSUME"+e.idx+"(this.tokensMap."+r+")\n");else if(e instanceof eI)return rg(e.definition,t);else throw Error("non exhaustive match")}(e,t+1)}),r}function rp(e,t){return Array(4*e+1).join(" ")+t}function rm(e){var t,i=Function("tokenVocabulary","config","chevrotain"," \n"+rd(t={name:e.name,rules:e.rules})+"\nreturn new "+t.name+"(tokenVocabulary, config) \n");return function(t){return i(e.tokenVocabulary,t,r(603))}}function rf(e){var t;return"\n(function (root, factory) {\n if (typeof define === 'function' && define.amd) {\n // AMD. Register as an anonymous module.\n define(['chevrotain'], factory);\n } else if (typeof module === 'object' && module.exports) {\n // Node. Does not work with strict CommonJS, but\n // only CommonJS-like environments that support module.exports,\n // like Node.\n module.exports = factory(require('chevrotain'));\n } else {\n // Browser globals (root is window)\n root.returnExports = factory(root.b);\n }\n}(typeof self !== 'undefined' ? self : this, function (chevrotain) {\n\n"+rd(t={name:e.name,rules:e.rules})+"\n \nreturn {\n "+t.name+": "+t.name+" \n}\n}));\n"}function rw(){console.warn("The clearCache function was 'soft' removed from the Chevrotain API.\n It performs no action other than printing this message.\n Please avoid using it as it will be completely removed in the future")}},642(e,t,r){"use strict";function i(e){return e&&0===e.length}function n(e){return null==e?[]:Object.keys(e)}function o(e){for(var t=[],r=Object.keys(e),i=0;i<r.length;i++)t.push(e[r[i]]);return t}function s(e,t){for(var r=[],i=n(e),o=0;o<i.length;o++){var s=i[o];r.push(t.call(null,e[s],s))}return r}function l(e,t){for(var r=[],i=0;i<e.length;i++)r.push(t.call(null,e[i],i));return r}function a(e){return i(e)?void 0:e[0]}function h(e){var t=e&&e.length;return t?e[t-1]:void 0}function d(e,t){if(Array.isArray(e))for(var r=0;r<e.length;r++)t.call(null,e[r],r);else if(N(e))for(var i=n(e),r=0;r<i.length;r++){var o=i[r],s=e[o];t.call(null,s,o)}else throw Error("non exhaustive match")}function u(e){return"string"==typeof e}function c(e){return void 0===e}function g(e){return e instanceof Function}function p(e,t){return void 0===t&&(t=1),e.slice(t,e.length)}function m(e,t){return void 0===t&&(t=1),e.slice(0,e.length-t)}function f(e,t){var r=[];if(Array.isArray(e))for(var i=0;i<e.length;i++){var n=e[i];t.call(null,n)&&r.push(n)}return r}function w(e,t){return f(e,function(e){return!t(e)})}function y(e,t){for(var r=Object.keys(e),i={},n=0;n<r.length;n++){var o=r[n],s=e[o];t(s)&&(i[o]=s)}return i}function b(e,t){return!!N(e)&&e.hasOwnProperty(t)}function C(e,t){return void 0!==R(e,function(e){return e===t})}function S(e){for(var t=[],r=0;r<e.length;r++)t.push(e[r]);return t}function v(e){var t={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}function R(e,t){for(var r=0;r<e.length;r++){var i=e[r];if(t.call(null,i))return i}}function E(e,t){for(var r=[],i=0;i<e.length;i++){var n=e[i];t.call(null,n)&&r.push(n)}return r}function T(e,t,r){for(var i=Array.isArray(e),s=i?e:o(e),l=i?[]:n(e),a=r,h=0;h<s.length;h++)a=t.call(null,a,s[h],i?h:l[h]);return a}function x(e){return w(e,function(e){return null==e})}function A(e,t){void 0===t&&(t=function(e){return e});var r=[];return T(e,function(e,i){var n=t(i);return C(r,n)?e:(r.push(n),e.concat(i))},[])}function M(e){return Array.isArray(e)}function I(e){return e instanceof RegExp}function N(e){return e instanceof Object}function O(e,t){for(var r=0;r<e.length;r++)if(!t(e[r],r))return!1;return!0}function k(e,t){return w(e,function(e){return C(t,e)})}function H(e,t){for(var r=0;r<e.length;r++)if(t(e[r]))return!0;return!1}function _(e,t){for(var r=0;r<e.length;r++)if(e[r]===t)return r;return -1}function P(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];for(var i=0;i<t.length;i++)for(var o=t[i],s=n(o),l=0;l<s.length;l++){var a=s[l];e[a]=o[a]}return e}function D(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];for(var i=0;i<t.length;i++){var o=t[i];if(!c(o))for(var s=n(o),l=0;l<s.length;l++){var a=s[l];b(e,a)||(e[a]=o[a])}}return e}function L(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return D.apply(null,[{}].concat(e))}function F(e,t){var r={};return d(e,function(e){var i=t(e),n=r[i];n?n.push(e):r[i]=[e]}),r}function B(e,t){for(var r=v(e),i=n(t),o=0;o<i.length;o++){var s=i[o],l=t[s];r[s]=l}return r}function V(){}function z(e){return e}function U(e){for(var t=[],r=0;r<e.length;r++){var i=e[r];t.push(void 0!==i?i:void 0)}return t}function W(e){console&&console.error&&console.error("Error: "+e)}function $(e){console&&console.warn&&console.warn("Warning: "+e)}function G(){return"function"==typeof Map}function j(e,t){t.forEach(function(t){var r=t.prototype;Object.getOwnPropertyNames(r).forEach(function(i){if("constructor"!==i){var n=Object.getOwnPropertyDescriptor(r,i);n&&(n.get||n.set)?Object.defineProperty(e.prototype,i,n):e.prototype[i]=t.prototype[i]}})})}function Y(e){function t(){}t.prototype=e;var r=new t;function i(){return typeof r.bar}return i(),i(),e}function K(e){return e[e.length-1]}function q(e){var t=new Date().getTime(),r=e();return{time:new Date().getTime()-t,value:r}}r.d(t,{$1:()=>a,$z:()=>F,Bl:()=>Y,Bq:()=>function e(t){for(var r=[],i=0;i<t.length;i++){var n=t[i];Array.isArray(n)?r=r.concat(e(n)):r.push(n)}return r},Gv:()=>N,HP:()=>n,HV:()=>h,I6:()=>R,Im:()=>i,JW:()=>E,Kg:()=>u,LG:()=>s,NT:()=>L,O1:()=>q,Si:()=>O,T9:()=>S,TS:()=>T,Tj:()=>l,Tn:()=>g,Up:()=>y,VS:()=>U,XJ:()=>j,Zi:()=>W,b0:()=>c,cy:()=>M,gR:()=>C,gc:()=>m,gd:()=>I,gv:()=>p,h1:()=>B,iv:()=>k,jJ:()=>d,kp:()=>P,ku:()=>w,lR:()=>v,oE:()=>x,pb:()=>f,qh:()=>_,rF:()=>G,sb:()=>A,se:()=>K,tE:()=>V,x5:()=>$,zK:()=>z,zN:()=>H,zu:()=>o,zy:()=>b})},713(e,t){var r,i;"u">typeof self&&self,void 0===(i="function"==typeof(r=function(){function e(){}e.prototype.saveState=function(){return{idx:this.idx,input:this.input,groupIdx:this.groupIdx}},e.prototype.restoreState=function(e){this.idx=e.idx,this.input=e.input,this.groupIdx=e.groupIdx},e.prototype.pattern=function(e){this.idx=0,this.input=e,this.groupIdx=0,this.consumeChar("/");var t=this.disjunction();this.consumeChar("/");for(var r={type:"Flags",global:!1,ignoreCase:!1,multiLine:!1,unicode:!1,sticky:!1};this.isRegExpFlag();)switch(this.popChar()){case"g":l(r,"global");break;case"i":l(r,"ignoreCase");break;case"m":l(r,"multiLine");break;case"u":l(r,"unicode");break;case"y":l(r,"sticky")}if(this.idx!==this.input.length)throw Error("Redundant input: "+this.input.substring(this.idx));return{type:"Pattern",flags:r,value:t}},e.prototype.disjunction=function(){var e=[];for(e.push(this.alternative());"|"===this.peekChar();)this.consumeChar("|"),e.push(this.alternative());return{type:"Disjunction",value:e}},e.prototype.alternative=function(){for(var e=[];this.isTerm();)e.push(this.term());return{type:"Alternative",value:e}},e.prototype.term=function(){return this.isAssertion()?this.assertion():this.atom()},e.prototype.assertion=function(){switch(this.popChar()){case"^":return{type:"StartAnchor"};case"$":return{type:"EndAnchor"};case"\\":switch(this.popChar()){case"b":return{type:"WordBoundary"};case"B":return{type:"NonWordBoundary"}}throw Error("Invalid Assertion Escape");case"(":switch(this.consumeChar("?"),this.popChar()){case"=":e="Lookahead";break;case"!":e="NegativeLookahead"}a(e);var e,t=this.disjunction();return this.consumeChar(")"),{type:e,value:t}}throw Error("Internal Error - Should never get here!")},e.prototype.quantifier=function(e){var t;switch(this.popChar()){case"*":t={atLeast:0,atMost:1/0};break;case"+":t={atLeast:1,atMost:1/0};break;case"?":t={atLeast:0,atMost:1};break;case"{":var r=this.integerIncludingZero();switch(this.popChar()){case"}":t={atLeast:r,atMost:r};break;case",":t=this.isDigit()?{atLeast:r,atMost:this.integerIncludingZero()}:{atLeast:r,atMost:1/0},this.consumeChar("}")}if(!0===e&&void 0===t)return;a(t)}if(!0!==e||void 0!==t)return a(t),"?"===this.peekChar(0)?(this.consumeChar("?"),t.greedy=!1):t.greedy=!0,t.type="Quantifier",t},e.prototype.atom=function(){var e;switch(this.peekChar()){case".":e=this.dotAll();break;case"\\":e=this.atomEscape();break;case"[":e=this.characterClass();break;case"(":e=this.group()}return void 0===e&&this.isPatternCharacter()&&(e=this.patternCharacter()),a(e),this.isQuantifier()&&(e.quantifier=this.quantifier()),e},e.prototype.dotAll=function(){return this.consumeChar("."),{type:"Set",complement:!0,value:[o("\n"),o("\r"),o("\u2028"),o("\u2029")]}},e.prototype.atomEscape=function(){switch(this.consumeChar("\\"),this.peekChar()){case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":return this.decimalEscapeAtom();case"d":case"D":case"s":case"S":case"w":case"W":return this.characterClassEscape();case"f":case"n":case"r":case"t":case"v":return this.controlEscapeAtom();case"c":return this.controlLetterEscapeAtom();case"0":return this.nulCharacterAtom();case"x":return this.hexEscapeSequenceAtom();case"u":return this.regExpUnicodeEscapeSequenceAtom();default:return this.identityEscapeAtom()}},e.prototype.decimalEscapeAtom=function(){return{type:"GroupBackReference",value:this.positiveInteger()}},e.prototype.characterClassEscape=function(){var e,t=!1;switch(this.popChar()){case"d":e=h;break;case"D":e=h,t=!0;break;case"s":e=u;break;case"S":e=u,t=!0;break;case"w":e=d;break;case"W":e=d,t=!0}return a(e),{type:"Set",value:e,complement:t}},e.prototype.controlEscapeAtom=function(){var e;switch(this.popChar()){case"f":e=o("\f");break;case"n":e=o("\n");break;case"r":e=o("\r");break;case"t":e=o(" ");break;case"v":e=o("\v")}return a(e),{type:"Character",value:e}},e.prototype.controlLetterEscapeAtom=function(){this.consumeChar("c");var e=this.popChar();if(!1===/[a-zA-Z]/.test(e))throw Error("Invalid ");return{type:"Character",value:e.toUpperCase().charCodeAt(0)-64}},e.prototype.nulCharacterAtom=function(){return this.consumeChar("0"),{type:"Character",value:o("\0")}},e.prototype.hexEscapeSequenceAtom=function(){return this.consumeChar("x"),this.parseHexDigits(2)},e.prototype.regExpUnicodeEscapeSequenceAtom=function(){return this.consumeChar("u"),this.parseHexDigits(4)},e.prototype.identityEscapeAtom=function(){return{type:"Character",value:o(this.popChar())}},e.prototype.classPatternCharacterAtom=function(){switch(this.peekChar()){case"\n":case"\r":case"\u2028":case"\u2029":case"\\":case"]":throw Error("TBD");default:return{type:"Character",value:o(this.popChar())}}},e.prototype.characterClass=function(){var e=[],t=!1;for(this.consumeChar("["),"^"===this.peekChar(0)&&(this.consumeChar("^"),t=!0);this.isClassAtom();){var r=this.classAtom();if("Character"===r.type&&this.isRangeDash()){this.consumeChar("-");var i=this.classAtom();if("Character"===i.type){if(i.value<r.value)throw Error("Range out of order in character class");e.push({from:r.value,to:i.value})}else s(r.value,e),e.push(o("-")),s(i.value,e)}else s(r.value,e)}return this.consumeChar("]"),{type:"Set",complement:t,value:e}},e.prototype.classAtom=function(){switch(this.peekChar()){case"]":case"\n":case"\r":case"\u2028":case"\u2029":throw Error("TBD");case"\\":return this.classEscape();default:return this.classPatternCharacterAtom()}},e.prototype.classEscape=function(){switch(this.consumeChar("\\"),this.peekChar()){case"b":return this.consumeChar("b"),{type:"Character",value:o("\b")};case"d":case"D":case"s":case"S":case"w":case"W":return this.characterClassEscape();case"f":case"n":case"r":case"t":case"v":return this.controlEscapeAtom();case"c":return this.controlLetterEscapeAtom();case"0":return this.nulCharacterAtom();case"x":return this.hexEscapeSequenceAtom();case"u":return this.regExpUnicodeEscapeSequenceAtom();default:return this.identityEscapeAtom()}},e.prototype.group=function(){var e=!0;this.consumeChar("("),"?"===this.peekChar(0)?(this.consumeChar("?"),this.consumeChar(":"),e=!1):this.groupIdx++;var t=this.disjunction();this.consumeChar(")");var r={type:"Group",capturing:e,value:t};return e&&(r.idx=this.groupIdx),r},e.prototype.positiveInteger=function(){var e=this.popChar();if(!1===n.test(e))throw Error("Expecting a positive integer");for(;i.test(this.peekChar(0));)e+=this.popChar();return parseInt(e,10)},e.prototype.integerIncludingZero=function(){var e=this.popChar();if(!1===i.test(e))throw Error("Expecting an integer");for(;i.test(this.peekChar(0));)e+=this.popChar();return parseInt(e,10)},e.prototype.patternCharacter=function(){var e=this.popChar();switch(e){case"\n":case"\r":case"\u2028":case"\u2029":case"^":case"$":case"\\":case".":case"*":case"+":case"?":case"(":case")":case"[":case"|":throw Error("TBD");default:return{type:"Character",value:o(e)}}},e.prototype.isRegExpFlag=function(){switch(this.peekChar(0)){case"g":case"i":case"m":case"u":case"y":return!0;default:return!1}},e.prototype.isRangeDash=function(){return"-"===this.peekChar()&&this.isClassAtom(1)},e.prototype.isDigit=function(){return i.test(this.peekChar(0))},e.prototype.isClassAtom=function(e){switch(void 0===e&&(e=0),this.peekChar(e)){case"]":case"\n":case"\r":case"\u2028":case"\u2029":return!1;default:return!0}},e.prototype.isTerm=function(){return this.isAtom()||this.isAssertion()},e.prototype.isAtom=function(){if(this.isPatternCharacter())return!0;switch(this.peekChar(0)){case".":case"\\":case"[":case"(":return!0;default:return!1}},e.prototype.isAssertion=function(){switch(this.peekChar(0)){case"^":case"$":return!0;case"\\":switch(this.peekChar(1)){case"b":case"B":return!0;default:return!1}case"(":return"?"===this.peekChar(1)&&("="===this.peekChar(2)||"!"===this.peekChar(2));default:return!1}},e.prototype.isQuantifier=function(){var e=this.saveState();try{return void 0!==this.quantifier(!0)}catch(e){return!1}finally{this.restoreState(e)}},e.prototype.isPatternCharacter=function(){switch(this.peekChar()){case"^":case"$":case"\\":case".":case"*":case"+":case"?":case"(":case")":case"[":case"|":case"/":case"\n":case"\r":case"\u2028":case"\u2029":return!1;default:return!0}},e.prototype.parseHexDigits=function(e){for(var t="",i=0;i<e;i++){var n=this.popChar();if(!1===r.test(n))throw Error("Expecting a HexDecimal digits");t+=n}return{type:"Character",value:parseInt(t,16)}},e.prototype.peekChar=function(e){return void 0===e&&(e=0),this.input[this.idx+e]},e.prototype.popChar=function(){var e=this.peekChar(0);return this.consumeChar(),e},e.prototype.consumeChar=function(e){if(void 0!==e&&this.input[this.idx]!==e)throw Error("Expected: '"+e+"' but found: '"+this.input[this.idx]+"' at offset: "+this.idx);if(this.idx>=this.input.length)throw Error("Unexpected end of input");this.idx++};var t,r=/[0-9a-fA-F]/,i=/[0-9]/,n=/[1-9]/;function o(e){return e.charCodeAt(0)}function s(e,t){void 0!==e.length?e.forEach(function(e){t.push(e)}):t.push(e)}function l(e,t){if(!0===e[t])throw"duplicate flag "+t;e[t]=!0}function a(e){if(void 0===e)throw Error("Internal Error - Should never get here!")}var h=[];for(t=o("0");t<=o("9");t++)h.push(t);var d=[o("_")].concat(h);for(t=o("a");t<=o("z");t++)d.push(t);for(t=o("A");t<=o("Z");t++)d.push(t);var u=[o(" "),o("\f"),o("\n"),o("\r"),o(" "),o("\v"),o(" "),o("\xa0"),o("\u1680"),o("\u2000"),o("\u2001"),o("\u2002"),o("\u2003"),o("\u2004"),o("\u2005"),o("\u2006"),o("\u2007"),o("\u2008"),o("\u2009"),o("\u200A"),o("\u2028"),o("\u2029"),o("\u202F"),o("\u205F"),o("\u3000"),o("\uFEFF")];function c(){}return c.prototype.visitChildren=function(e){for(var t in e){var r=e[t];e.hasOwnProperty(t)&&(void 0!==r.type?this.visit(r):Array.isArray(r)&&r.forEach(function(e){this.visit(e)},this))}},c.prototype.visit=function(e){switch(e.type){case"Pattern":this.visitPattern(e);break;case"Flags":this.visitFlags(e);break;case"Disjunction":this.visitDisjunction(e);break;case"Alternative":this.visitAlternative(e);break;case"StartAnchor":this.visitStartAnchor(e);break;case"EndAnchor":this.visitEndAnchor(e);break;case"WordBoundary":this.visitWordBoundary(e);break;case"NonWordBoundary":this.visitNonWordBoundary(e);break;case"Lookahead":this.visitLookahead(e);break;case"NegativeLookahead":this.visitNegativeLookahead(e);break;case"Character":this.visitCharacter(e);break;case"Set":this.visitSet(e);break;case"Group":this.visitGroup(e);break;case"GroupBackReference":this.visitGroupBackReference(e);break;case"Quantifier":this.visitQuantifier(e)}this.visitChildren(e)},c.prototype.visitPattern=function(e){},c.prototype.visitFlags=function(e){},c.prototype.visitDisjunction=function(e){},c.prototype.visitAlternative=function(e){},c.prototype.visitStartAnchor=function(e){},c.prototype.visitEndAnchor=function(e){},c.prototype.visitWordBoundary=function(e){},c.prototype.visitNonWordBoundary=function(e){},c.prototype.visitLookahead=function(e){},c.prototype.visitNegativeLookahead=function(e){},c.prototype.visitCharacter=function(e){},c.prototype.visitSet=function(e){},c.prototype.visitGroup=function(e){},c.prototype.visitGroupBackReference=function(e){},c.prototype.visitQuantifier=function(e){},{RegExpParser:e,BaseRegExpVisitor:c,VERSION:"0.4.0"}})?r.apply(t,[]):r)||(e.exports=i)},732(e){function t(){}t.prototype={on:function(e,t,r){var i=this.e||(this.e={});return(i[e]||(i[e]=[])).push({fn:t,ctx:r}),this},once:function(e,t,r){var i=this;function n(){i.off(e,n),t.apply(r,arguments)}return n._=t,this.on(e,n,r)},emit:function(e){for(var t=[].slice.call(arguments,1),r=((this.e||(this.e={}))[e]||[]).slice(),i=0,n=r.length;i<n;i++)r[i].fn.apply(r[i].ctx,t);return this},off:function(e,t){var r=this.e||(this.e={}),i=r[e],n=[];if(i&&t)for(var o=0,s=i.length;o<s;o++)i[o].fn!==t&&i[o].fn._!==t&&n.push(i[o]);return n.length?r[e]=n:delete r[e],this}},e.exports=t,e.exports.TinyEmitter=t}},t={};function r(i){var n=t[i];if(void 0!==n)return n.exports;var o=t[i]={exports:{}};return e[i].call(o.exports,o,o.exports,r),o.exports}r.d=(e,t)=>{for(var i in t)r.o(t,i)&&!r.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"u">typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var i={};return(()=>{"use strict";r.d({},{iz:()=>tq,f1:()=>op});var e,t,i,n,o,s,l,a,h,d,u,c,g,p,m,f,w,y,b,C,S,v,R,E,T,x,A,M,I,N,O,k,H,_,P,D,L,F,B,V,z,U,W,$,G,j,Y,K,q,X,Q,Z,J,ee,et,er,ei,en={};r.r(en),r.d(en,{AbsPlugin:()=>oS,AddressPlugin:()=>ob,ArrayPlugin:()=>oC,BitShiftPlugin:()=>ov,BitwiseLogicOperationsPlugin:()=>ox,BooleanPlugin:()=>oA,CharPlugin:()=>oM,CodePlugin:()=>oI,ComplexPlugin:()=>lR,ConditionalAggregationPlugin:()=>sA,CountBlankPlugin:()=>oN,CountUniquePlugin:()=>oO,DatabasePlugin:()=>oH,DateTimePlugin:()=>o_,DegreesPlugin:()=>oB,DeltaPlugin:()=>oV,ExpPlugin:()=>oz,FinancialPlugin:()=>oU,FormulaTextPlugin:()=>oK,HyperlinkPlugin:()=>oq,InformationPlugin:()=>oX,IsEvenPlugin:()=>oQ,IsOddPlugin:()=>oZ,LogarithmPlugin:()=>oJ,LookupPlugin:()=>sk,MathConstantsPlugin:()=>o1,MathPlugin:()=>lC,MatrixPlugin:()=>o6,MedianPlugin:()=>o5,ModuloPlugin:()=>o4,NumericAggregationPlugin:()=>sr,PercentilePlugin:()=>o7,PowerPlugin:()=>so,RadiansPlugin:()=>ss,RadixConversionPlugin:()=>sl,RandomPlugin:()=>sp,RomanPlugin:()=>sH,RoundingPlugin:()=>sy,SequencePlugin:()=>sm,SimpleArithmerticPlugin:()=>sD,SqrtPlugin:()=>sb,StatisticalAggregationPlugin:()=>l_,StatisticalPlugin:()=>lb,SumprodPlugin:()=>sM,TextPlugin:()=>sI,TrigonometryPlugin:()=>sN}),(R=e||(e={})).RELATIVE="RELATIVE",R.ABSOLUTE="ABSOLUTE";class eo{constructor(e,t,r){this.type=e,this.col=t,this.sheet=r}static absolute(t,r){return new eo(e.ABSOLUTE,t,r)}static relative(t,r){return new eo(e.RELATIVE,t,r)}static compareByAbsoluteAddress(e){return(t,r)=>t.toSimpleColumnAddress(e).col-r.toSimpleColumnAddress(e).col}isColumnAbsolute(){return this.type===e.ABSOLUTE}isColumnRelative(){return this.type===e.RELATIVE}isAbsolute(){return this.type===e.ABSOLUTE&&void 0!==this.sheet}moved(e,t,r){let i=void 0===this.sheet?void 0:e;return new eo(this.type,this.col+t,i)}shiftedByColumns(e){return new eo(this.type,this.col+e,this.sheet)}toSimpleColumnAddress(e){let t=r5(this,e),r=this.col;return this.isColumnRelative()&&(r=e.col+this.col),rZ(t,r)}shiftRelativeDimensions(e,t){let r=this.isColumnRelative()?this.col+e:this.col;return new eo(this.type,r,this.sheet)}shiftAbsoluteDimensions(e,t){let r=this.isColumnAbsolute()?this.col+e:this.col;return new eo(this.type,r,this.sheet)}withSheet(e){return new eo(this.type,this.col,e)}isInvalid(e){return this.toSimpleColumnAddress(e).col<0}hash(t){let r=t&&void 0!==this.sheet?`#${this.sheet}`:"";switch(this.type){case e.RELATIVE:return`${r}#COLR${this.col}`;case e.ABSOLUTE:return`${r}#COLA${this.col}`}}unparse(t){let r=this.toSimpleColumnAddress(t);if(rJ(r))return;let i=eN(r.col),n=this.type===e.ABSOLUTE?"$":"";return`${n}${i}`}exceedsSheetSizeLimits(e){return this.col>=e}}class es{constructor(e,t,r){this.type=e,this.row=t,this.sheet=r}static absolute(t,r){return new es(e.ABSOLUTE,t,r)}static relative(t,r){return new es(e.RELATIVE,t,r)}static compareByAbsoluteAddress(e){return(t,r)=>t.toSimpleRowAddress(e).row-r.toSimpleRowAddress(e).row}isRowAbsolute(){return this.type===e.ABSOLUTE}isRowRelative(){return this.type===e.RELATIVE}isAbsolute(){return this.type===e.ABSOLUTE&&void 0!==this.sheet}moved(e,t,r){let i=void 0===this.sheet?void 0:e;return new es(this.type,this.row+r,i)}shiftedByRows(e){return new es(this.type,this.row+e,this.sheet)}toSimpleRowAddress(e){let t=r5(this,e),r=this.row;return this.isRowRelative()&&(r=e.row+this.row),rX(t,r)}shiftRelativeDimensions(e,t){let r=this.isRowRelative()?this.row+t:this.row;return new es(this.type,r,this.sheet)}shiftAbsoluteDimensions(e,t){let r=this.isRowAbsolute()?this.row+t:this.row;return new es(this.type,r,this.sheet)}withSheet(e){return new es(this.type,this.row,e)}isInvalid(e){return this.toSimpleRowAddress(e).row<0}hash(t){let r=t&&void 0!==this.sheet?`#${this.sheet}`:"";switch(this.type){case e.RELATIVE:return`${r}#ROWR${this.row}`;case e.ABSOLUTE:return`${r}#ROWA${this.row}`}}unparse(t){let r=this.toSimpleRowAddress(t);if(rQ(r))return;let i=this.type===e.ABSOLUTE?"$":"";return`${i}${r.row+1}`}exceedsSheetSizeLimits(e){return this.row>=e}}(E=t||(t={})).CELL_REFERENCE_RELATIVE="CELL_REFERENCE",E.CELL_REFERENCE_ABSOLUTE="CELL_REFERENCE_ABSOLUTE",E.CELL_REFERENCE_ABSOLUTE_COL="CELL_REFERENCE_ABSOLUTE_COL",E.CELL_REFERENCE_ABSOLUTE_ROW="CELL_REFERENCE_ABSOLUTE_ROW";class el{constructor(e,t,r,i){this.col=e,this.row=t,this.type=r,this.sheet=i}static fromColAndRow(e,t,r){return(e.isColumnAbsolute()&&t.isRowAbsolute()?el.absolute.bind(this):e.isColumnAbsolute()?el.absoluteCol.bind(this):t.isRowAbsolute()?el.absoluteRow.bind(this):el.relative.bind(this))(e.col,t.row,r)}static relative(e,r,i){return new el(e,r,t.CELL_REFERENCE_RELATIVE,i)}static absolute(e,r,i){return new el(e,r,t.CELL_REFERENCE_ABSOLUTE,i)}static absoluteCol(e,r,i){return new el(e,r,t.CELL_REFERENCE_ABSOLUTE_COL,i)}static absoluteRow(e,r,i){return new el(e,r,t.CELL_REFERENCE_ABSOLUTE_ROW,i)}toSimpleCellAddress(e){let r=r5(this,e);return this.type===t.CELL_REFERENCE_ABSOLUTE?r0(r,this.col,this.row):this.type===t.CELL_REFERENCE_ABSOLUTE_ROW?r0(r,e.col+this.col,this.row):this.type===t.CELL_REFERENCE_ABSOLUTE_COL?r0(r,this.col,e.row+this.row):r0(r,e.col+this.col,e.row+this.row)}toColumnAddress(){return new eo(this.isColumnRelative()?e.RELATIVE:e.ABSOLUTE,this.col,this.sheet)}toRowAddress(){return new es(this.isRowRelative()?e.RELATIVE:e.ABSOLUTE,this.row,this.sheet)}toSimpleColumnAddress(e){let t=r5(this,e),r=this.col;return this.isColumnRelative()&&(r+=e.col),rZ(t,r)}toSimpleRowAddress(e){let t=r5(this,e),r=this.row;return this.isRowRelative()&&(r+=e.row),rX(t,r)}isRowAbsolute(){return this.type===t.CELL_REFERENCE_ABSOLUTE||this.type===t.CELL_REFERENCE_ABSOLUTE_ROW}isColumnAbsolute(){return this.type===t.CELL_REFERENCE_ABSOLUTE||this.type===t.CELL_REFERENCE_ABSOLUTE_COL}isColumnRelative(){return this.type===t.CELL_REFERENCE_RELATIVE||this.type===t.CELL_REFERENCE_ABSOLUTE_ROW}isRowRelative(){return this.type===t.CELL_REFERENCE_RELATIVE||this.type===t.CELL_REFERENCE_ABSOLUTE_COL}isAbsolute(){return this.type===t.CELL_REFERENCE_ABSOLUTE&&void 0!==this.sheet}shiftedByRows(e){return new el(this.col,this.row+e,this.type,this.sheet)}shiftedByColumns(e){return new el(this.col+e,this.row,this.type,this.sheet)}moved(e,t,r){let i=void 0===this.sheet?void 0:e;return new el(this.col+t,this.row+r,this.type,i)}withSheet(e){return new el(this.col,this.row,this.type,e)}isInvalid(e){return r1(this.toSimpleCellAddress(e))}shiftRelativeDimensions(e,t){return new el(this.isColumnAbsolute()?this.col:this.col+e,this.isRowAbsolute()?this.row:this.row+t,this.type,this.sheet)}shiftAbsoluteDimensions(e,t){return new el(this.isColumnRelative()?this.col:this.col+e,this.isRowRelative()?this.row:this.row+t,this.type,this.sheet)}hash(e){let r=e&&void 0!==this.sheet?`#${this.sheet}`:"";switch(this.type){case t.CELL_REFERENCE_RELATIVE:return`${r}#${this.row}R${this.col}`;case t.CELL_REFERENCE_ABSOLUTE:return`${r}#${this.row}A${this.col}`;case t.CELL_REFERENCE_ABSOLUTE_COL:return`${r}#${this.row}AC${this.col}`;case t.CELL_REFERENCE_ABSOLUTE_ROW:return`${r}#${this.row}AR${this.col}`}}unparse(e){let r=this.toSimpleCellAddress(e);if(r1(r))return;let i=eN(r.col),n=this.type===t.CELL_REFERENCE_ABSOLUTE||this.type===t.CELL_REFERENCE_ABSOLUTE_ROW?"$":"",o=this.type===t.CELL_REFERENCE_ABSOLUTE||this.type===t.CELL_REFERENCE_ABSOLUTE_COL?"$":"";return`${o}${i}${n}${r.row+1}`}exceedsSheetSizeLimits(e,t){return this.row>=t||this.col>=e}}let ea="A-Za-z\xc0-\u02AF",eh=`${ea}0-9_.`,ed=`[${ea}0-9_]+`,eu=`(${ed}|'(((?!').|'')*)')!`,ec=`(${eu})?\\$?[A-Za-z]+\\$?[0-9]+`,eg=`(${eu})?\\$?[A-Za-z]+`,ep=`(${eu})?\\$?[0-9]+`,em="[rR][0-9]*[cC][0-9]*",ef=`(${ec})[^${eh}]`,ew=`[${ea}_][${eh}]*`,ey=["0","1","2","3","4","5","6","7","8","9"],eb=[...Array.from(Array(26)).map((e,t)=>t+65),...Array.from(Array(26)).map((e,t)=>t+97),...Array.from(Array(496)).map((e,t)=>t+192)].map(e=>String.fromCharCode(e)),eC=RegExp(`^(${eu})?(\\$?)([A-Za-z]+)(\\$?)([0-9]+)$`),eS=RegExp(`^(${eu})?(\\$?)([A-Za-z]+)$`),ev=RegExp(`^(${eu})?(\\$?)([0-9]+)$`),eR=RegExp(`^${ed}$`),eE=(e,t,r)=>{let i=eC.exec(e);if(!i)return;let n=eI(i[6]),o=Number(i[8])-1,s=eH(ek(i),r);if(null!==s)if("$"===i[5]&&"$"===i[7])return el.absolute(n,o,s);else if("$"===i[5])return el.absoluteCol(n,o-t.row,s);else if("$"===i[7])return el.absoluteRow(n-t.col,o,s);else return el.relative(n-t.col,o-t.row,s)},eT=(e,t,r)=>{let i=eS.exec(e);if(!i)return;let n=eI(i[6]),o=eH(ek(i),r);if(null!==o)if("$"===i[5])return eo.absolute(n,o);else return eo.relative(n-t.col,o)},ex=(e,t,r)=>{let i=ev.exec(e);if(!i)return;let n=Number(i[6])-1,o=eH(ek(i),r);if(null!==o)if("$"===i[5])return es.absolute(n,o);else return es.relative(n-t.row,o)},eA=(e,t,r)=>{let i=eC.exec(t);if(!i)return;let n=eI(i[6]),o=Number(i[8])-1,s=eH(ek(i),e);if(null!==s)return r0(void 0===s?r:s,n,o)},eM=(e,t,r)=>{let i=eN(t.col),n=eO(t.sheet,e);if(void 0!==n)if(r!==t.sheet)return`${n}!${i}${t.row+1}`;else return`${i}${t.row+1}`};function eI(e){return 1===e.length?e.toUpperCase().charCodeAt(0)-65:e.split("").reduce((e,t)=>26*e+(t.toUpperCase().charCodeAt(0)-64),0)-1}function eN(e){let t="";for(;e>=0;)t=String.fromCharCode(e%26+97)+t,e=Math.floor(e/26)-1;return t.toUpperCase()}function eO(e,t){let r=t(e);if(void 0!==r)if(eR.test(r))return r;else return r=r.replace(/'/g,"''"),`'${r}'`}function ek(e){var t;let r=null!=(t=e[3])?t:e[2];return r?r.replace(/''/g,"'"):null}function eH(e,t){if(!e)return;let r=t(e);return void 0===r?null:r}var e_=r(603);let eP=(e,t)=>({type:e,message:t});(T=i||(i={})).LexingError="LexingError",T.ParserError="ParsingError",T.StaticOffsetError="StaticOffsetError",T.StaticOffsetOutOfRangeError="StaticOffsetOutOfRangeError",T.RangeOffsetNotAllowed="RangeOffsetNotAllowed",T.InvalidRangeSize="InvalidRangeSize",(x=n||(n={})).EMPTY="EMPTY",x.NUMBER="NUMBER",x.STRING="STRING",x.MINUS_UNARY_OP="MINUS_UNARY_OP",x.PLUS_UNARY_OP="PLUS_UNARY_OP",x.PERCENT_OP="PERCENT_OP",x.CONCATENATE_OP="CONCATENATE_OP",x.EQUALS_OP="EQUALS_OP",x.NOT_EQUAL_OP="NOT_EQUAL_OP",x.GREATER_THAN_OP="GREATER_THAN_OP",x.LESS_THAN_OP="LESS_THAN_OP",x.GREATER_THAN_OR_EQUAL_OP="GREATER_THAN_OR_EQUAL_OP",x.LESS_THAN_OR_EQUAL_OP="LESS_THAN_OR_EQUAL_OP",x.PLUS_OP="PLUS_OP",x.MINUS_OP="MINUS_OP",x.TIMES_OP="TIMES_OP",x.DIV_OP="DIV_OP",x.POWER_OP="POWER_OP",x.FUNCTION_CALL="FUNCTION_CALL",x.NAMED_EXPRESSION="NAMED_EXPRESSION",x.PARENTHESIS="PARENTHESES",x.CELL_REFERENCE="CELL_REFERENCE",x.CELL_RANGE="CELL_RANGE",x.COLUMN_RANGE="COLUMN_RANGE",x.ROW_RANGE="ROW_RANGE",x.ERROR="ERROR",x.ERROR_WITH_RAW_INPUT="ERROR_WITH_RAW_INPUT",x.ARRAY="ARRAY",(A=o||(o={}))[A.RELATIVE=0]="RELATIVE",A[A.START_ABSOLUTE=1]="START_ABSOLUTE",A[A.BOTH_ABSOLUTE=2]="BOTH_ABSOLUTE";let eD=(e,t)=>({type:n.CELL_REFERENCE,reference:e,leadingWhitespace:null==t?void 0:t.image}),eL=(e,t,r,i)=>(eU(e,t,r),{type:n.CELL_RANGE,start:e,end:t,sheetReferenceType:r,leadingWhitespace:i}),eF=(e,t,r)=>({type:n.ARRAY,args:e,leadingWhitespace:null==t?void 0:t.image,internalWhitespace:null==r?void 0:r.image}),eB=(e,t)=>({type:n.ERROR,error:e,leadingWhitespace:null==t?void 0:t.image}),eV=(e,t,r)=>({type:n.ERROR_WITH_RAW_INPUT,error:t,rawInput:e,leadingWhitespace:null==r?void 0:r.image}),ez=()=>({type:n.ERROR,error:rq.parsingError()});function eU(e,t,r){if(void 0!==e.sheet&&void 0===t.sheet||void 0===e.sheet&&void 0!==t.sheet)throw Error("Start address inconsistent with end address");if(void 0===e.sheet&&r!==o.RELATIVE||void 0!==e.sheet&&r===o.RELATIVE)throw Error("Sheet address inconsistent with sheet reference type")}function eW(e,t){return(null!=t?t:"")+e}let e$={[n.PLUS_OP]:"+",[n.MINUS_OP]:"-",[n.TIMES_OP]:"*",[n.DIV_OP]:"/",[n.CONCATENATE_OP]:"&",[n.POWER_OP]:"^",[n.EQUALS_OP]:"=",[n.NOT_EQUAL_OP]:"<>",[n.GREATER_THAN_OP]:">",[n.GREATER_THAN_OR_EQUAL_OP]:">=",[n.LESS_THAN_OP]:"<",[n.LESS_THAN_OR_EQUAL_OP]:"<="};class eG{constructor(e){this.functionRegistry=e,this.cache=new Map}set(e,t){let r=tC(t,this.functionRegistry),i={ast:t,relativeDependencies:r,hasVolatileFunction:ej(t,this.functionRegistry.isFunctionVolatile),hasStructuralChangeFunction:ej(t,this.functionRegistry.isFunctionDependentOnSheetStructureChange)};return this.cache.set(e,i),i}get(e){return this.cache.get(e)}maybeSetAndThenGet(e,t){let r=this.cache.get(e);return void 0!==r?r.ast:(this.set(e,t),t)}}let ej=(e,t)=>{switch(e.type){case n.EMPTY:case n.NUMBER:case n.STRING:case n.ERROR:case n.ERROR_WITH_RAW_INPUT:case n.CELL_REFERENCE:case n.CELL_RANGE:case n.COLUMN_RANGE:case n.ROW_RANGE:case n.NAMED_EXPRESSION:return!1;case n.PERCENT_OP:case n.PLUS_UNARY_OP:case n.MINUS_UNARY_OP:return ej(e.value,t);case n.CONCATENATE_OP:case n.EQUALS_OP:case n.NOT_EQUAL_OP:case n.LESS_THAN_OP:case n.GREATER_THAN_OP:case n.LESS_THAN_OR_EQUAL_OP:case n.GREATER_THAN_OR_EQUAL_OP:case n.MINUS_OP:case n.PLUS_OP:case n.TIMES_OP:case n.DIV_OP:case n.POWER_OP:return ej(e.left,t)||ej(e.right,t);case n.PARENTHESIS:return ej(e.expression,t);case n.FUNCTION_CALL:if(t(e.procedureName))return!0;return e.args.some(e=>ej(e,t));case n.ARRAY:return e.args.some(e=>e.some(e=>ej(e,t)))}};class eY{}eY.DistinctSigns="Distinct signs.",eY.WrongArgNumber="Wrong number of arguments.",eY.EmptyArg="Empty function argument.",eY.EmptyArray="Empty array not allowed.",eY.ArrayDimensions="Array dimensions are not compatible.",eY.NoSpaceForArrayResult="No space for array result.",eY.ValueSmall="Value too small.",eY.ValueLarge="Value too large.",eY.BadCriterion="Incorrect criterion.",eY.RangeManySheets="Range spans more than one sheet.",eY.CellRangeExpected="Cell range expected.",eY.WrongDimension="Wrong range dimension.",eY.ScalarExpected="Cell range not allowed.",eY.NumberCoercion="Value cannot be coerced to number.",eY.NumberExpected="Number argument expected.",eY.IntegerExpected="Value needs to be an integer.",eY.BadMode="Mode not recognized.",eY.DateBounds="Date outside of bounds.",eY.OutOfSheet="Resulting reference is out of the sheet.",eY.WrongType="Wrong type of argument.",eY.NaN="NaN or infinite value encountered.",eY.EqualLength="Ranges need to be of equal length.",eY.Negative="Value cannot be negative.",eY.NotBinary="String does not represent a binary number.",eY.NotOctal="String does not represent an octal number.",eY.NotHex="String does not represent a hexadecimal number.",eY.EndStartPeriod="End period needs to be at least start period.",eY.CellRefExpected="Cell reference expected.",eY.EmptyRange="Empty range not allowed.",eY.BadRef="Address is not correct.",eY.NumberRange="Number-only range expected.",eY.ValueNotFound="Value not found.",eY.ValueBaseLarge="Value in base too large.",eY.ValueBaseSmall="Value in base too small.",eY.ValueBaseLong="Value in base too long.",eY.NegativeLength="Length cannot be negative.",eY.PatternNotFound="Pattern not found.",eY.OneValue="Needs at least one value.",eY.TwoValues="Range needs to contain at least two elements.",eY.ThreeValues="Range needs to contain at least three elements.",eY.IndexBounds="Index out of bounds.",eY.IndexLarge="Index too large.",eY.Formula="Expected formula.",eY.NegativeCount="Count cannot be negative.",eY.ParseError="Parsing error.",eY.SheetRef="Sheet does not exist.",eY.PeriodLong="Period number cannot exceed life length.",eY.InvalidDate="Invalid date.",eY.BitshiftLong="Result of bitshift is too long.",eY.EmptyString="Empty-string argument not allowed.",eY.LengthBounds="Length out of bounds.",eY.NegativeTime="Time cannot be negative.",eY.NoDefault="No default option.",eY.NoConditionMet="None of the conditions were met.",eY.Selector="Selector cannot exceed the number of arguments.",eY.StartEndDate="Start date needs to be earlier than end date.",eY.IncorrectDateTime="String does not represent correct DateTime.",eY.CharacterCodeBounds="Character code out of bounds.",eY.NonZero="Argument cannot be 0.",eY.LessThanOne="Argument cannot be less than 1.",eY.WeekendString="Incorrect weekend bitmask string.",eY.InvalidRoman="Invalid roman numeral.",eY.WrongOrder="Wrong order of values.",eY.ComplexNumberExpected="Complex number expected.",eY.ShouldBeIorJ="Should be 'i' or 'j'.",eY.SizeMismatch="Array dimensions mismatched.",eY.ResultTooLong="Result exceeds the maximum allowed length.",eY.FunctionName=e=>`Function name ${e} not recognized.`,eY.NamedExpressionName=e=>`Named expression ${e} not recognized.`,eY.LicenseKey=e=>`License key is ${e}.`;let eK=(0,e_.createToken)({name:"AdditionOp",pattern:e_.Lexer.NA}),eq=(0,e_.createToken)({name:"PlusOp",pattern:/\+/,categories:eK}),eX=(0,e_.createToken)({name:"MinusOp",pattern:/-/,categories:eK}),eQ=(0,e_.createToken)({name:"MultiplicationOp",pattern:e_.Lexer.NA}),eZ=(0,e_.createToken)({name:"TimesOp",pattern:/\*/,categories:eQ}),eJ=(0,e_.createToken)({name:"DivOp",pattern:/\//,categories:eQ}),e0=(0,e_.createToken)({name:"PowerOp",pattern:/\^/}),e1=(0,e_.createToken)({name:"PercentOp",pattern:/%/}),e2=(0,e_.createToken)({name:"BooleanOp",pattern:e_.Lexer.NA}),e3=(0,e_.createToken)({name:"EqualsOp",pattern:/=/,categories:e2}),e6=(0,e_.createToken)({name:"NotEqualOp",pattern:/<>/,categories:e2}),e5=(0,e_.createToken)({name:"GreaterThanOp",pattern:/>/,categories:e2}),e4=(0,e_.createToken)({name:"LessThanOp",pattern:/</,categories:e2}),e8=(0,e_.createToken)({name:"GreaterThanOrEqualOp",pattern:/>=/,categories:e2}),e9=(0,e_.createToken)({name:"LessThanOrEqualOp",pattern:/<=/,categories:e2}),e7=(0,e_.createToken)({name:"ConcatenateOp",pattern:/&/}),te=(0,e_.createToken)({name:"LParen",pattern:/\(/}),tt=(0,e_.createToken)({name:"RParen",pattern:/\)/}),tr=(0,e_.createToken)({name:"ArrayLParen",pattern:/{/}),ti=(0,e_.createToken)({name:"ArrayRParen",pattern:/}/}),tn=(0,e_.createToken)({name:"StringLiteral",pattern:/"([^"\\]*(\\.[^"\\]*)*)"/}),to=(0,e_.createToken)({name:"ErrorLiteral",pattern:/#[A-Za-z0-9\/]+[?!]?/}),ts=(0,e_.createToken)({name:"RangeSeparator",pattern:RegExp(":")}),tl=(0,e_.createToken)({name:"ColumnRange",pattern:RegExp(`${eg}:${eg}`)}),ta=(0,e_.createToken)({name:"RowRange",pattern:RegExp(`${ep}:${ep}`)}),th=(0,e_.createToken)({name:"ProcedureName",pattern:RegExp(`([${ea}][${eh}]*)\\(`)}),td=new class{constructor(){this.POSSIBLE_START_CHARACTERS=[...eb,...ey,"$","'","_"],this.cellReferenceRegexp=RegExp(ef,"y")}match(e,t){this.cellReferenceRegexp.lastIndex=t;let r=this.cellReferenceRegexp.exec(e+"@");return null==r||null==r[1]?null:(r[0]=r[1],r)}},tu=(0,e_.createToken)({name:"CellReference",pattern:td.match.bind(td),start_chars_hint:td.POSSIBLE_START_CHARACTERS,line_breaks:!1}),tc=new class{constructor(){this.POSSIBLE_START_CHARACTERS=[...eb,"_"],this.namedExpressionRegexp=RegExp(ew,"y"),this.r1c1CellRefRegexp=RegExp(`^${em}$`)}match(e,t){this.namedExpressionRegexp.lastIndex=t;let r=this.namedExpressionRegexp.exec(e);return null==r||null==r[0]||this.r1c1CellRefRegexp.test(r[0])?null:r}},tg=(0,e_.createToken)({name:"NamedExpression",pattern:tc.match.bind(tc),start_chars_hint:tc.POSSIBLE_START_CHARACTERS,line_breaks:!1});class tp extends e_.EmbeddedActionsParser{constructor(e,t){super(e.allTokens,{outputCst:!1,maxLookahead:7}),this.resolveSheetReference=t,this.booleanExpressionOrEmpty=this.RULE("booleanExpressionOrEmpty",()=>{let e;return this.OR([{ALT:()=>this.SUBRULE(this.booleanExpression)},{ALT:(0,e_.EMPTY_ALT)({type:n.EMPTY,leadingWhitespace:null==e?void 0:e.image})}])}),this.procedureExpression=this.RULE("procedureExpression",()=>{var e;let t,r,i,o=this.CONSUME(th),s=o.image.toUpperCase().slice(0,-1),l=null!=(e=this.lexerConfig.functionMapping[s])?e:s,a=[],h=this.SUBRULE(this.booleanExpressionOrEmpty);this.MANY(()=>{var e;let t=this.CONSUME(this.lexerConfig.ArgSeparator);h.type===n.EMPTY&&(h.leadingWhitespace=null==(e=t.leadingWhitespace)?void 0:e.image),a.push(h),h=this.SUBRULE2(this.booleanExpressionOrEmpty)}),a.push(h),1===a.length&&a[0].type===n.EMPTY&&(a.length=0);let d=this.CONSUME(tt);return t=o.leadingWhitespace,r=d.leadingWhitespace,{type:n.FUNCTION_CALL,procedureName:l,args:a,leadingWhitespace:null==t?void 0:t.image,internalWhitespace:null==r?void 0:r.image,hyperlink:i}}),this.namedExpressionExpression=this.RULE("namedExpressionExpression",()=>{let e,t,r=this.CONSUME(tg);return e=r.image,t=r.leadingWhitespace,{type:n.NAMED_EXPRESSION,expressionName:e,leadingWhitespace:null==t?void 0:t.image}}),this.offsetProcedureExpression=this.RULE("offsetProcedureExpression",()=>{let e=[];return this.CONSUME(this.lexerConfig.OffsetProcedureName),this.CONSUME(te),this.MANY_SEP({SEP:this.lexerConfig.ArgSeparator,DEF:()=>{e.push(this.SUBRULE(this.booleanExpression))}}),this.CONSUME(tt),this.handleOffsetHeuristic(e)}),this.columnRangeExpression=this.RULE("columnRangeExpression",()=>{var e;let t=this.CONSUME(tl),[r,o]=t.image.split(":"),s=this.ACTION(()=>eT(r,this.formulaAddress,this.resolveSheetReference)),l=this.ACTION(()=>eT(o,this.formulaAddress,this.resolveSheetReference));if(void 0===s||void 0===l)return eB(new rq(d.REF));if(s.exceedsSheetSizeLimits(this.lexerConfig.maxColumns)||l.exceedsSheetSizeLimits(this.lexerConfig.maxColumns))return eV(t.image,new rq(d.NAME),t.leadingWhitespace);if(void 0===s.sheet&&void 0!==l.sheet)return this.parsingError(i.ParserError,"Malformed range expression");let{firstEnd:a,secondEnd:h,sheetRefType:u}=tp.fixSheetIdsForRangeEnds(s,l);return e=t.leadingWhitespace,eU(a,h,u),{type:n.COLUMN_RANGE,start:a,end:h,sheetReferenceType:u,leadingWhitespace:null==e?void 0:e.image}}),this.rowRangeExpression=this.RULE("rowRangeExpression",()=>{var e;let t=this.CONSUME(ta),[r,o]=t.image.split(":"),s=this.ACTION(()=>ex(r,this.formulaAddress,this.resolveSheetReference)),l=this.ACTION(()=>ex(o,this.formulaAddress,this.resolveSheetReference));if(void 0===s||void 0===l)return eB(new rq(d.REF));if(s.exceedsSheetSizeLimits(this.lexerConfig.maxRows)||l.exceedsSheetSizeLimits(this.lexerConfig.maxRows))return eV(t.image,new rq(d.NAME),t.leadingWhitespace);if(void 0===s.sheet&&void 0!==l.sheet)return this.parsingError(i.ParserError,"Malformed range expression");let{firstEnd:a,secondEnd:h,sheetRefType:u}=tp.fixSheetIdsForRangeEnds(s,l);return e=t.leadingWhitespace,eU(a,h,u),{type:n.ROW_RANGE,start:a,end:h,sheetReferenceType:u,leadingWhitespace:null==e?void 0:e.image}}),this.cellReference=this.RULE("cellReference",()=>{let e=this.CONSUME(tu),t=this.ACTION(()=>eE(e.image,this.formulaAddress,this.resolveSheetReference));return void 0===t?eV(e.image,new rq(d.REF),e.leadingWhitespace):t.exceedsSheetSizeLimits(this.lexerConfig.maxColumns,this.lexerConfig.maxRows)?eV(e.image,new rq(d.NAME),e.leadingWhitespace):eD(t,e.leadingWhitespace)}),this.endRangeReference=this.RULE("endRangeReference",e=>{var t;let r=this.CONSUME(tu),i=this.ACTION(()=>eE(e.image,this.formulaAddress,this.resolveSheetReference)),n=this.ACTION(()=>eE(r.image,this.formulaAddress,this.resolveSheetReference));return void 0===i||void 0===n?this.ACTION(()=>eV(`${e.image}:${r.image}`,new rq(d.REF),e.leadingWhitespace)):i.exceedsSheetSizeLimits(this.lexerConfig.maxColumns,this.lexerConfig.maxRows)||n.exceedsSheetSizeLimits(this.lexerConfig.maxColumns,this.lexerConfig.maxRows)?this.ACTION(()=>eV(`${e.image}:${r.image}`,new rq(d.NAME),e.leadingWhitespace)):this.buildCellRange(i,n,null==(t=e.leadingWhitespace)?void 0:t.image)}),this.endOfRangeExpression=this.RULE("endOfRangeExpression",e=>this.OR([{ALT:()=>this.SUBRULE(this.endRangeReference,{ARGS:[e]})},{ALT:()=>{var t;let r=this.SUBRULE(this.offsetProcedureExpression),o=this.ACTION(()=>eE(e.image,this.formulaAddress,this.resolveSheetReference));return void 0===o?eB(new rq(d.REF)):r.type===n.CELL_REFERENCE?this.buildCellRange(o,r.reference,null==(t=e.leadingWhitespace)?void 0:t.image):this.parsingError(i.RangeOffsetNotAllowed,"Range offset not allowed here")}}])),this.cellRangeExpression=this.RULE("cellRangeExpression",()=>{let e=this.CONSUME(tu);return this.CONSUME2(ts),this.SUBRULE(this.endOfRangeExpression,{ARGS:[e]})}),this.endRangeWithOffsetStartReference=this.RULE("endRangeWithOffsetStartReference",e=>{let t=this.CONSUME(tu),r=this.ACTION(()=>eE(t.image,this.formulaAddress,this.resolveSheetReference));return void 0===r?this.ACTION(()=>eB(new rq(d.REF))):this.buildCellRange(e.reference,r,e.leadingWhitespace)}),this.endOfRangeWithOffsetStartExpression=this.RULE("endOfRangeWithOffsetStartExpression",e=>this.OR([{ALT:()=>this.SUBRULE(this.endRangeWithOffsetStartReference,{ARGS:[e]})},{ALT:()=>{let t=this.SUBRULE(this.offsetProcedureExpression);return t.type===n.CELL_REFERENCE?this.buildCellRange(e.reference,t.reference,e.leadingWhitespace):this.parsingError(i.RangeOffsetNotAllowed,"Range offset not allowed here")}}])),this.offsetExpression=this.RULE("offsetExpression",()=>{let e,t=this.SUBRULE(this.offsetProcedureExpression);return(this.OPTION(()=>{this.CONSUME(ts),e=t.type===n.CELL_RANGE?this.parsingError(i.RangeOffsetNotAllowed,"Range offset not allowed here"):this.SUBRULE(this.endOfRangeWithOffsetStartExpression,{ARGS:[t]})}),void 0!==e)?e:t}),this.insideArrayExpression=this.RULE("insideArrayExpression",()=>{let e=[[]];return e[e.length-1].push(this.SUBRULE(this.booleanExpression)),this.MANY(()=>{this.OR([{ALT:()=>{this.CONSUME(this.lexerConfig.ArrayColSeparator),e[e.length-1].push(this.SUBRULE2(this.booleanExpression))}},{ALT:()=>{this.CONSUME(this.lexerConfig.ArrayRowSeparator),e.push([]),e[e.length-1].push(this.SUBRULE3(this.booleanExpression))}}])}),eF(e)}),this.parenthesisExpression=this.RULE("parenthesisExpression",()=>{let e,t,r=this.CONSUME(te),i=this.SUBRULE(this.booleanExpression),o=this.CONSUME(tt);return e=r.leadingWhitespace,t=o.leadingWhitespace,{type:n.PARENTHESIS,expression:i,leadingWhitespace:null==e?void 0:e.image,internalWhitespace:null==t?void 0:t.image}}),this.arrayExpression=this.RULE("arrayExpression",()=>this.OR([{ALT:()=>{let e=this.CONSUME(tr),t=this.SUBRULE(this.insideArrayExpression),r=this.CONSUME(ti);return eF(t.args,e.leadingWhitespace,r.leadingWhitespace)}},{ALT:()=>this.SUBRULE(this.parenthesisExpression)}])),this.numericStringToNumber=e=>Number(e.replace(this.lexerConfig.decimalSeparator,".")),this.positiveAtomicExpression=this.RULE("positiveAtomicExpression",()=>{var e;return this.OR(null!=(e=this.atomicExpCache)?e:this.atomicExpCache=[{ALT:()=>this.SUBRULE(this.arrayExpression)},{ALT:()=>this.SUBRULE(this.cellRangeExpression)},{ALT:()=>this.SUBRULE(this.columnRangeExpression)},{ALT:()=>this.SUBRULE(this.rowRangeExpression)},{ALT:()=>this.SUBRULE(this.offsetExpression)},{ALT:()=>this.SUBRULE(this.cellReference)},{ALT:()=>this.SUBRULE(this.procedureExpression)},{ALT:()=>this.SUBRULE(this.namedExpressionExpression)},{ALT:()=>{let e,t,r=this.CONSUME(this.lexerConfig.NumberLiteral);return e=this.numericStringToNumber(r.image),t=r.leadingWhitespace,{type:n.NUMBER,value:e,leadingWhitespace:null==t?void 0:t.image}}},{ALT:()=>{var e,t;return e=this.CONSUME(tn),{type:n.STRING,value:e.image.slice(1,-1),leadingWhitespace:null==(t=e.leadingWhitespace)?void 0:t.image}}},{ALT:()=>{let e=this.CONSUME(to),t=e.image.toUpperCase(),r=this.lexerConfig.errorMapping[t];return r?eB(new rq(r),e.leadingWhitespace):this.parsingError(i.ParserError,"Unknown error literal")}}])}),this.rightUnaryOpAtomicExpression=this.RULE("rightUnaryOpAtomicExpression",()=>{let e=this.SUBRULE(this.positiveAtomicExpression),t=this.OPTION(()=>this.CONSUME(e1));if(t){let r;return r=t.leadingWhitespace,{type:n.PERCENT_OP,value:e,leadingWhitespace:null==r?void 0:r.image}}return e}),this.atomicExpression=this.RULE("atomicExpression",()=>this.OR([{ALT:()=>{let e=this.CONSUME(eK),t=this.SUBRULE(this.atomicExpression);if((0,e_.tokenMatcher)(e,eq)){let r;return r=e.leadingWhitespace,{type:n.PLUS_UNARY_OP,value:t,leadingWhitespace:null==r?void 0:r.image}}if((0,e_.tokenMatcher)(e,eX)){let r;return r=e.leadingWhitespace,{type:n.MINUS_UNARY_OP,value:t,leadingWhitespace:null==r?void 0:r.image}}return this.customParsingError=eP(i.ParserError,"Mismatched token type"),this.customParsingError}},{ALT:()=>this.SUBRULE2(this.rightUnaryOpAtomicExpression)}])),this.powerExpression=this.RULE("powerExpression",()=>{let e=this.SUBRULE(this.atomicExpression);return this.MANY(()=>{let t=this.CONSUME(e0),r=this.SUBRULE2(this.atomicExpression);if((0,e_.tokenMatcher)(t,e0)){let i,o;i=e,o=t.leadingWhitespace,e={type:n.POWER_OP,left:i,right:r,leadingWhitespace:null==o?void 0:o.image}}else this.ACTION(()=>{throw Error("Operator not supported")})}),e}),this.multiplicationExpression=this.RULE("multiplicationExpression",()=>{let e=this.SUBRULE(this.powerExpression);return this.MANY(()=>{let t=this.CONSUME(eQ),r=this.SUBRULE2(this.powerExpression);if((0,e_.tokenMatcher)(t,eZ)){let i,o;i=e,o=t.leadingWhitespace,e={type:n.TIMES_OP,left:i,right:r,leadingWhitespace:null==o?void 0:o.image}}else if((0,e_.tokenMatcher)(t,eJ)){let i,o;i=e,o=t.leadingWhitespace,e={type:n.DIV_OP,left:i,right:r,leadingWhitespace:null==o?void 0:o.image}}else this.ACTION(()=>{throw Error("Operator not supported")})}),e}),this.additionExpression=this.RULE("additionExpression",()=>{let e=this.SUBRULE(this.multiplicationExpression);return this.MANY(()=>{let t=this.CONSUME(eK),r=this.SUBRULE2(this.multiplicationExpression);if((0,e_.tokenMatcher)(t,eq)){let i,o;i=e,o=t.leadingWhitespace,e={type:n.PLUS_OP,left:i,right:r,leadingWhitespace:null==o?void 0:o.image}}else if((0,e_.tokenMatcher)(t,eX)){let i,o;i=e,o=t.leadingWhitespace,e={type:n.MINUS_OP,left:i,right:r,leadingWhitespace:null==o?void 0:o.image}}else this.ACTION(()=>{throw Error("Operator not supported")})}),e}),this.concatenateExpression=this.RULE("concatenateExpression",()=>{let e=this.SUBRULE(this.additionExpression);return this.MANY(()=>{let t,r,i=this.CONSUME(e7),o=this.SUBRULE2(this.additionExpression);t=e,r=i.leadingWhitespace,e={type:n.CONCATENATE_OP,left:t,right:o,leadingWhitespace:null==r?void 0:r.image}}),e}),this.booleanExpression=this.RULE("booleanExpression",()=>{let e=this.SUBRULE(this.concatenateExpression);return this.MANY(()=>{let t=this.CONSUME(e2),r=this.SUBRULE2(this.concatenateExpression);if((0,e_.tokenMatcher)(t,e3)){let i,o;i=e,o=t.leadingWhitespace,e={type:n.EQUALS_OP,left:i,right:r,leadingWhitespace:null==o?void 0:o.image}}else if((0,e_.tokenMatcher)(t,e6)){let i,o;i=e,o=t.leadingWhitespace,e={type:n.NOT_EQUAL_OP,left:i,right:r,leadingWhitespace:null==o?void 0:o.image}}else if((0,e_.tokenMatcher)(t,e5)){let i,o;i=e,o=t.leadingWhitespace,e={type:n.GREATER_THAN_OP,left:i,right:r,leadingWhitespace:null==o?void 0:o.image}}else if((0,e_.tokenMatcher)(t,e4)){let i,o;i=e,o=t.leadingWhitespace,e={type:n.LESS_THAN_OP,left:i,right:r,leadingWhitespace:null==o?void 0:o.image}}else if((0,e_.tokenMatcher)(t,e8)){let i,o;i=e,o=t.leadingWhitespace,e={type:n.GREATER_THAN_OR_EQUAL_OP,left:i,right:r,leadingWhitespace:null==o?void 0:o.image}}else if((0,e_.tokenMatcher)(t,e9)){let i,o;i=e,o=t.leadingWhitespace,e={type:n.LESS_THAN_OR_EQUAL_OP,left:i,right:r,leadingWhitespace:null==o?void 0:o.image}}else this.ACTION(()=>{throw Error("Operator not supported")})}),e}),this.formula=this.RULE("formula",()=>(this.CONSUME(e3),this.SUBRULE(this.booleanExpression))),this.lexerConfig=e,this.formulaAddress=r0(0,0,0),this.performSelfAnalysis()}parseFromTokens(e,t){this.input=e;let r=this.formulaWithContext(t),n=[];return this.customParsingError&&n.push(this.customParsingError),(n=n.concat(this.errors.map(e=>({type:i.ParserError,message:e.message})))).length>0&&(r=ez()),{ast:r,errors:n}}reset(){super.reset(),this.customParsingError=void 0}formulaWithContext(e){return this.formulaAddress=e,this.formula()}buildCellRange(e,t,r){if(void 0===e.sheet&&void 0!==t.sheet)return this.parsingError(i.ParserError,"Malformed range expression");let{firstEnd:n,secondEnd:o,sheetRefType:s}=tp.fixSheetIdsForRangeEnds(e,t);return eL(n,o,s,r)}static fixSheetIdsForRangeEnds(e,t){let r=tp.rangeSheetReferenceType(e.sheet,t.sheet),i=void 0!==e.sheet&&void 0===t.sheet?t.withSheet(e.sheet):t;return{firstEnd:e,secondEnd:i,sheetRefType:r}}handleOffsetHeuristic(e){var r;let s,l,a,h,u=e[0];if(u.type!==n.CELL_REFERENCE)return this.parsingError(i.StaticOffsetError,"First argument to OFFSET is not a reference");let c=e[1];if(c.type===n.NUMBER&&Number.isInteger(c.value))s=c.value;else if(c.type===n.PLUS_UNARY_OP&&c.value.type===n.NUMBER&&Number.isInteger(c.value.value))s=c.value.value;else{if(!(c.type===n.MINUS_UNARY_OP&&c.value.type===n.NUMBER&&Number.isInteger(c.value.value)))return this.parsingError(i.StaticOffsetError,"Second argument to OFFSET is not a static number");s=-c.value.value}let g=e[2];if(g.type===n.NUMBER&&Number.isInteger(g.value))l=g.value;else if(g.type===n.PLUS_UNARY_OP&&g.value.type===n.NUMBER&&Number.isInteger(g.value.value))l=g.value.value;else{if(!(g.type===n.MINUS_UNARY_OP&&g.value.type===n.NUMBER&&Number.isInteger(g.value.value)))return this.parsingError(i.StaticOffsetError,"Third argument to OFFSET is not a static number");l=-g.value.value}let p=e[3];if(void 0===p)a=1;else{if(p.type!==n.NUMBER)return this.parsingError(i.StaticOffsetError,"Fourth argument to OFFSET is not a static number");if((a=p.value)<1)return this.parsingError(i.StaticOffsetError,"Fourth argument to OFFSET is too small number");if(!Number.isInteger(a))return this.parsingError(i.StaticOffsetError,"Fourth argument to OFFSET is not integer")}let m=e[4];if(void 0===m)h=1;else{if(m.type!==n.NUMBER)return this.parsingError(i.StaticOffsetError,"Fifth argument to OFFSET is not a static number");if((h=m.value)<1)return this.parsingError(i.StaticOffsetError,"Fifth argument to OFFSET is too small number");if(!Number.isInteger(h))return this.parsingError(i.StaticOffsetError,"Fifth argument to OFFSET is not integer")}let f=new el(u.reference.col+l,u.reference.row+s,u.reference.type,null!=(r=u.reference.sheet)?r:void 0),w=f.col,y=f.row;if((u.reference.type===t.CELL_REFERENCE_RELATIVE||u.reference.type===t.CELL_REFERENCE_ABSOLUTE_COL)&&(y+=this.formulaAddress.row),(u.reference.type===t.CELL_REFERENCE_RELATIVE||u.reference.type===t.CELL_REFERENCE_ABSOLUTE_ROW)&&(w+=this.formulaAddress.col),w<0||y<0)return eB(new rq(d.REF,eY.OutOfSheet));if(1===h&&1===a)return eD(f);{let e=new el(f.col+h-1,f.row+a-1,f.type,f.sheet);return eL(f,e,null==u.reference.sheet?o.RELATIVE:o.BOTH_ABSOLUTE)}}parsingError(e,t){return this.customParsingError=eP(e,t),ez()}static rangeSheetReferenceType(e,t){return void 0===e?o.RELATIVE:void 0===t?o.START_ABSOLUTE:o.BOTH_ABSOLUTE}}class tm{constructor(e){this.lexerConfig=e,this.lexer=new e_.Lexer(e.allTokens,{ensureOptimizations:!0})}tokenizeFormula(e){let t=this.lexer.tokenize(e),r=t.tokens;return r=this.trimTrailingWhitespaces(r),r=this.skipWhitespacesInsideRanges(r),t.tokens=r=this.skipWhitespacesBeforeArgSeparators(r),t}skipWhitespacesInsideRanges(e){return tm.filterTokensByNeighbors(e,(e,t,r)=>((0,e_.tokenMatcher)(e,tu)||(0,e_.tokenMatcher)(e,ts))&&(0,e_.tokenMatcher)(t,this.lexerConfig.WhiteSpace)&&((0,e_.tokenMatcher)(r,tu)||(0,e_.tokenMatcher)(r,ts)))}skipWhitespacesBeforeArgSeparators(e){return tm.filterTokensByNeighbors(e,(e,t,r)=>!(0,e_.tokenMatcher)(e,this.lexerConfig.ArgSeparator)&&(0,e_.tokenMatcher)(t,this.lexerConfig.WhiteSpace)&&(0,e_.tokenMatcher)(r,this.lexerConfig.ArgSeparator))}static filterTokensByNeighbors(e,t){if(e.length<3)return e;let r=0,i=[e[r++]];for(;r<e.length-1;)t(e[r-1],e[r],e[r+1])||i.push(e[r]),++r;return i.push(e[r]),i}trimTrailingWhitespaces(e){return e.length>0&&(0,e_.tokenMatcher)(e[e.length-1],this.lexerConfig.WhiteSpace)&&e.pop(),e}}class tf{constructor(e,t,r){this.config=e,this.sheetMapping=t,this.namedExpressions=r}unparse(e,t){return"="+this.unparseAst(e,t)}unparseAst(e,t){var r,i;switch(e.type){case n.EMPTY:return eW("",e.leadingWhitespace);case n.NUMBER:return eW(tw(e.value,this.config.decimalSeparator),e.leadingWhitespace);case n.STRING:return eW('"'+e.value+'"',e.leadingWhitespace);case n.FUNCTION_CALL:{let r=e.args.map(e=>void 0!==e?this.unparseAst(e,t):"").join(this.config.functionArgSeparator),i=(this.config.translationPackage.isFunctionTranslated(e.procedureName)?this.config.translationPackage.getFunctionTranslation(e.procedureName):e.procedureName)+"("+r+eW(")",e.internalWhitespace);return eW(i,e.leadingWhitespace)}case n.NAMED_EXPRESSION:return eW((null==(r=this.namedExpressions.nearestNamedExpression(e.expressionName,t.sheet))?void 0:r.displayName)||e.expressionName,e.leadingWhitespace);case n.CELL_REFERENCE:return eW((void 0!==e.reference.sheet?this.unparseSheetName(e.reference.sheet)+"!":"")+(null!=(i=e.reference.unparse(t))?i:this.config.translationPackage.getErrorTranslation(d.REF)),e.leadingWhitespace);case n.COLUMN_RANGE:case n.ROW_RANGE:case n.CELL_RANGE:return eW(this.formatRange(e,t),e.leadingWhitespace);case n.PLUS_UNARY_OP:{let r=this.unparseAst(e.value,t);return eW("+",e.leadingWhitespace)+r}case n.MINUS_UNARY_OP:{let r=this.unparseAst(e.value,t);return eW("-",e.leadingWhitespace)+r}case n.PERCENT_OP:return this.unparseAst(e.value,t)+eW("%",e.leadingWhitespace);case n.ERROR:return eW(this.config.translationPackage.getErrorTranslation(e.error?e.error.type:d.ERROR),e.leadingWhitespace);case n.ERROR_WITH_RAW_INPUT:return eW(e.rawInput,e.leadingWhitespace);case n.PARENTHESIS:{let r="("+this.unparseAst(e.expression,t)+eW(")",e.internalWhitespace);return eW(r,e.leadingWhitespace)}case n.ARRAY:{let r="{"+e.args.map(e=>e.map(e=>this.unparseAst(e,t)).join(this.config.arrayColumnSeparator)).join(this.config.arrayRowSeparator)+eW("}",e.internalWhitespace);return eW(r,e.leadingWhitespace)}default:{let r=this.unparseAst(e.left,t),i=this.unparseAst(e.right,t);return r+eW(e$[e.type],e.leadingWhitespace)+i}}}unparseSheetName(e){let t=eO(e,e=>this.sheetMapping.getSheetNameOrThrowError(e,{includePlaceholders:!0}));if(void 0===t)throw new tq(e);return t}formatRange(e,t){let r="",i="";void 0!==e.start.sheet&&e.sheetReferenceType!==o.RELATIVE&&(r=this.unparseSheetName(e.start.sheet)+"!"),void 0!==e.end.sheet&&e.sheetReferenceType===o.BOTH_ABSOLUTE&&(i=this.unparseSheetName(e.end.sheet)+"!");let n=e.start.unparse(t),s=e.end.unparse(t);return void 0===n||void 0===s?this.config.translationPackage.getErrorTranslation(d.REF):`${r}${n}:${i}${s}`}}function tw(e,t){return e.toString().replace(".",t)}class ty{constructor(e,t,r){this.config=e,this.functionRegistry=t,this.resolveSheetReference=r,this.statsCacheUsed=0,this.lexerConfig=(e=>{let t,r,i=e.translationPackage.getFunctionTranslation("OFFSET"),n=e.errorMapping,o=e.translationPackage.buildFunctionMapping(),s=new RegExp("standard"===e.ignoreWhiteSpace?"[ \\t\\n\\r]+":"\\s+"),l=(0,e_.createToken)({name:"WhiteSpace",pattern:s}),a=(0,e_.createToken)({name:"ArrayRowSep",pattern:e.arrayRowSeparator}),h=(0,e_.createToken)({name:"ArrayColSep",pattern:e.arrayColumnSeparator}),d=(0,e_.createToken)({name:"NumberLiteral",pattern:RegExp(`(([${e.decimalSeparator}]\\d+)|(\\d+([${e.decimalSeparator}]\\d*)?))(e[+-]?\\d+)?`)}),u=(0,e_.createToken)({name:"OffsetProcedureName",pattern:RegExp(i,"i")});e.functionArgSeparator===e.arrayColumnSeparator?(t=h,r=[]):e.functionArgSeparator===e.arrayRowSeparator?(t=a,r=[]):r=[t=(0,e_.createToken)({name:"ArgSeparator",pattern:e.functionArgSeparator})];let c=[l,eq,eX,eZ,eJ,e0,e3,e6,e1,e8,e9,e5,e4,te,tt,tr,ti,u,th,ts,...r,tl,ta,d,tn,to,e7,e2,eK,eQ,tu,tg,a,h];return{ArgSeparator:t,NumberLiteral:d,OffsetProcedureName:u,ArrayRowSeparator:a,ArrayColSeparator:h,WhiteSpace:l,allTokens:c,errorMapping:n,functionMapping:o,decimalSeparator:e.decimalSeparator,maxColumns:e.maxColumns,maxRows:e.maxRows}})(e),this.lexer=new tm(this.lexerConfig),this.formulaParser=new tp(this.lexerConfig,this.resolveSheetReference),this.cache=new eG(this.functionRegistry)}parse(e,t){this.formulaAddress=t;let r=this.tokenizeFormula(e);if(r.errors.length>0){let e=r.errors.map(e=>({type:i.LexingError,message:e.message}));return{ast:ez(),errors:e,hasVolatileFunction:!1,hasStructuralChangeFunction:!1,dependencies:[]}}let n=this.computeHashFromTokens(r.tokens,t),o=this.cache.get(n);if(void 0!==o)++this.statsCacheUsed;else{let e=this.bindWhitespacesToTokens(r.tokens),i=this.formulaParser.parseFromTokens(e,t);if(i.errors.length>0)return Object.assign(Object.assign({},i),{hasVolatileFunction:!1,hasStructuralChangeFunction:!1,dependencies:[]});o=this.cache.set(n,i.ast)}let{ast:s,hasVolatileFunction:l,hasStructuralChangeFunction:a}=o,h=this.convertReversedRangesToRegularRanges(s),d=tC(h,this.functionRegistry);return{ast:h,errors:[],hasVolatileFunction:l,hasStructuralChangeFunction:a,dependencies:d}}convertReversedRangesToRegularRanges(e){switch(e.type){case n.EMPTY:case n.NUMBER:case n.STRING:case n.ERROR:case n.ERROR_WITH_RAW_INPUT:case n.CELL_REFERENCE:case n.NAMED_EXPRESSION:return e;case n.CELL_RANGE:{let{start:t,end:r}=e,i=this.orderCellRangeEnds(t,r);return Object.assign(Object.assign({},e),{start:i.start,end:i.end})}case n.COLUMN_RANGE:{let{start:t,end:r}=e,i=this.orderColumnRangeEnds(t,r);return Object.assign(Object.assign({},e),{start:i.start,end:i.end})}case n.ROW_RANGE:{let{start:t,end:r}=e,i=this.orderRowRangeEnds(t,r);return Object.assign(Object.assign({},e),{start:i.start,end:i.end})}case n.PERCENT_OP:case n.PLUS_UNARY_OP:case n.MINUS_UNARY_OP:{let t=this.convertReversedRangesToRegularRanges(e.value);return Object.assign(Object.assign({},e),{value:t})}case n.CONCATENATE_OP:case n.EQUALS_OP:case n.NOT_EQUAL_OP:case n.LESS_THAN_OP:case n.GREATER_THAN_OP:case n.LESS_THAN_OR_EQUAL_OP:case n.GREATER_THAN_OR_EQUAL_OP:case n.MINUS_OP:case n.PLUS_OP:case n.TIMES_OP:case n.DIV_OP:case n.POWER_OP:{let t=this.convertReversedRangesToRegularRanges(e.left),r=this.convertReversedRangesToRegularRanges(e.right);return Object.assign(Object.assign({},e),{left:t,right:r})}case n.PARENTHESIS:{let t=this.convertReversedRangesToRegularRanges(e.expression);return Object.assign(Object.assign({},e),{expression:t})}case n.FUNCTION_CALL:{let t=e.args.map(e=>this.convertReversedRangesToRegularRanges(e));return Object.assign(Object.assign({},e),{args:t})}case n.ARRAY:{let t=e.args.map(e=>e.map(e=>this.convertReversedRangesToRegularRanges(e)));return Object.assign(Object.assign({},e),{args:t})}}}orderCellRangeEnds(e,t){let r=[e,t],[i,n]=r.map(e=>e.toColumnAddress()).sort(eo.compareByAbsoluteAddress(this.formulaAddress)),[o,s]=r.map(e=>e.toRowAddress()).sort(es.compareByAbsoluteAddress(this.formulaAddress)),[l,a]=r.map(e=>e.sheet).sort(ty.compareSheetIds.bind(this));return{start:el.fromColAndRow(i,o,l),end:el.fromColAndRow(n,s,a)}}orderColumnRangeEnds(e,t){let r=[e,t],[i,n]=r.sort(eo.compareByAbsoluteAddress(this.formulaAddress)),[o,s]=r.map(e=>e.sheet).sort(ty.compareSheetIds.bind(this));return{start:new eo(i.type,i.col,o),end:new eo(n.type,n.col,s)}}orderRowRangeEnds(e,t){let r=[e,t],[i,n]=r.sort(es.compareByAbsoluteAddress(this.formulaAddress)),[o,s]=r.map(e=>e.sheet).sort(ty.compareSheetIds.bind(this));return{start:new es(i.type,i.row,o),end:new es(n.type,n.row,s)}}static compareSheetIds(e,t){return(e=null!=e?e:1/0)-(t=null!=t?t:1/0)}fetchCachedResultForAst(e){let t=this.computeHashFromAst(e);return this.fetchCachedResult(t)}fetchCachedResult(e){let t=this.cache.get(e);if(void 0===t)throw Error("There is no AST with such key in the cache");{let{ast:e,hasVolatileFunction:r,hasStructuralChangeFunction:i,relativeDependencies:n}=t;return{ast:e,errors:[],hasVolatileFunction:r,hasStructuralChangeFunction:i,dependencies:n}}}computeHashFromTokens(e,t){var r;let i="",n=0;for(;n<e.length;){let o=e[n];if((0,e_.tokenMatcher)(o,tu)){let e=eE(o.image,t,this.resolveSheetReference);i=void 0===e?i.concat(o.image):i.concat(e.hash(!0))}else if((0,e_.tokenMatcher)(o,th)){let e=o.image.toUpperCase().slice(0,-1),t=null!=(r=this.lexerConfig.functionMapping[e])?r:e;i=i.concat(t,"(")}else if((0,e_.tokenMatcher)(o,tl)){let[e,r]=o.image.split(":"),n=eT(e,t,this.resolveSheetReference),s=eT(r,t,this.resolveSheetReference);i=void 0===n||void 0===s?i.concat("!REF"):i.concat(n.hash(!0),":",s.hash(!0))}else if((0,e_.tokenMatcher)(o,ta)){let[e,r]=o.image.split(":"),n=ex(e,t,this.resolveSheetReference),s=ex(r,t,this.resolveSheetReference);i=void 0===n||void 0===s?i.concat("!REF"):i.concat(n.hash(!0),":",s.hash(!0))}else i=i.concat(o.image);n++}return i}rememberNewAst(e){let t=this.computeHashFromAst(e);return this.cache.maybeSetAndThenGet(t,e)}computeHashFromAst(e){return"="+this.computeHashOfAstNode(e)}computeHashOfAstNode(e){switch(e.type){case n.EMPTY:return e.leadingWhitespace||"";case n.NUMBER:return eW(tw(e.value,this.config.decimalSeparator),e.leadingWhitespace);case n.STRING:return eW('"'+e.value+'"',e.leadingWhitespace);case n.NAMED_EXPRESSION:return eW(e.expressionName,e.leadingWhitespace);case n.FUNCTION_CALL:{let t=e.args.map(e=>this.computeHashOfAstNode(e)).join(this.config.functionArgSeparator),r=e.procedureName+"("+t+eW(")",e.internalWhitespace);return eW(r,e.leadingWhitespace)}case n.CELL_REFERENCE:return eW(e.reference.hash(!0),e.leadingWhitespace);case n.COLUMN_RANGE:case n.ROW_RANGE:case n.CELL_RANGE:return eW(e.start.hash(e.sheetReferenceType!==o.RELATIVE)+":"+e.end.hash(e.sheetReferenceType===o.BOTH_ABSOLUTE),e.leadingWhitespace);case n.MINUS_UNARY_OP:return eW("-"+this.computeHashOfAstNode(e.value),e.leadingWhitespace);case n.PLUS_UNARY_OP:return eW("+"+this.computeHashOfAstNode(e.value),e.leadingWhitespace);case n.PERCENT_OP:return this.computeHashOfAstNode(e.value)+eW("%",e.leadingWhitespace);case n.ERROR:return eW(this.config.translationPackage.getErrorTranslation(e.error?e.error.type:d.ERROR),e.leadingWhitespace);case n.ERROR_WITH_RAW_INPUT:return eW(e.rawInput,e.leadingWhitespace);case n.ARRAY:return eW("{"+e.args.map(e=>e.map(e=>this.computeHashOfAstNode(e)).join(",")).join(";")+eW("}",e.internalWhitespace),e.leadingWhitespace);case n.PARENTHESIS:{let t="("+this.computeHashOfAstNode(e.expression)+eW(")",e.internalWhitespace);return eW(t,e.leadingWhitespace)}default:return this.computeHashOfAstNode(e.left)+eW(e$[e.type],e.leadingWhitespace)+this.computeHashOfAstNode(e.right)}}bindWhitespacesToTokens(e){let t=[],r=e[0];(0,e_.tokenMatcher)(r,this.lexerConfig.WhiteSpace)||t.push(r);for(let r=1;r<e.length;++r){let i=e[r];if((0,e_.tokenMatcher)(i,this.lexerConfig.WhiteSpace))continue;let n=e[r-1];(0,e_.tokenMatcher)(n,this.lexerConfig.WhiteSpace)&&(i.leadingWhitespace=n),t.push(i)}return t}tokenizeFormula(e){return this.lexer.tokenizeFormula(e)}}let tb=(e,t,r,i)=>{switch(e.type){case n.EMPTY:case n.NUMBER:case n.STRING:case n.ERROR:return;case n.NAMED_EXPRESSION:i&&r.push(new tT(e.expressionName));return;case n.CELL_REFERENCE:i&&r.push(new tS(e.reference));return;case n.CELL_RANGE:i&&e.start.sheet===e.end.sheet&&r.push(new tv(e.start,e.end));return;case n.COLUMN_RANGE:i&&e.start.sheet===e.end.sheet&&r.push(new tR(e.start,e.end));return;case n.ROW_RANGE:i&&e.start.sheet===e.end.sheet&&r.push(new tE(e.start,e.end));return;case n.PERCENT_OP:case n.PLUS_UNARY_OP:case n.MINUS_UNARY_OP:return void tb(e.value,t,r,!0);case n.CONCATENATE_OP:case n.EQUALS_OP:case n.NOT_EQUAL_OP:case n.LESS_THAN_OP:case n.GREATER_THAN_OP:case n.LESS_THAN_OR_EQUAL_OP:case n.GREATER_THAN_OR_EQUAL_OP:case n.MINUS_OP:case n.PLUS_OP:case n.TIMES_OP:case n.DIV_OP:case n.POWER_OP:tb(e.left,t,r,!0),tb(e.right,t,r,!0);return;case n.PARENTHESIS:tb(e.expression,t,r,i);return;case n.FUNCTION_CALL:{let i=!t.doesFunctionNeedArgumentToBeComputed(e.procedureName);e.args.forEach(e=>tb(e,t,r,i));return}}},tC=(e,t)=>{let r=[];return tb(e,t,r,!0),r};class tS{constructor(e){this.dependency=e}absolutize(e){return this.dependency.toSimpleCellAddress(e)}}class tv{constructor(e,t){this.start=e,this.end=t}absolutize(e){return new r7(this.start.toSimpleCellAddress(e),this.end.toSimpleCellAddress(e))}}class tR{constructor(e,t){this.start=e,this.end=t}absolutize(e){let t=this.start.toSimpleColumnAddress(e),r=this.end.toSimpleColumnAddress(e);return new ie(t.sheet,t.col,r.col)}}class tE{constructor(e,t){this.start=e,this.end=t}absolutize(e){let t=this.start.toSimpleRowAddress(e),r=this.end.toSimpleRowAddress(e);return new it(t.sheet,t.row,r.row)}}class tT{constructor(e){this.name=e}absolutize(e){return this}}let tx=(e,t)=>e.map(e=>e.absolutize(t)),tA=Symbol("Empty value");function tM(e){return e instanceof tI?e.val:e}class tI{constructor(e,t){this.val=e,this.format=t}fromNumber(e){return new this.constructor(e)}}function tN(e,t){if("number"==typeof e)return t;{let r=e.fromNumber(t);return r.format=e.format,r}}class tO extends tI{getDetailedType(){return s.NUMBER_DATE}}class tk extends tI{getDetailedType(){return s.NUMBER_CURRENCY}}class tH extends tI{getDetailedType(){return s.NUMBER_TIME}}class t_ extends tI{getDetailedType(){return s.NUMBER_DATETIME}}class tP extends tI{getDetailedType(){return s.NUMBER_PERCENT}}function tD(e){return"number"==typeof e||e instanceof tI}function tL(e){return e instanceof tI?{type:e.getDetailedType(),format:e.format}:{type:s.NUMBER_RAW}}(M=s||(s={})).NUMBER_RAW="NUMBER_RAW",M.NUMBER_DATE="NUMBER_DATE",M.NUMBER_TIME="NUMBER_TIME",M.NUMBER_DATETIME="NUMBER_DATETIME",M.NUMBER_CURRENCY="NUMBER_CURRENCY",M.NUMBER_PERCENT="NUMBER_PERCENT";class tF{constructor(e,t,r,i){this._data=e,this.range=t,this.dependencyGraph=r,this._hasOnlyNumbers=i,this.size=void 0===e?new iT(t.effectiveWidth(r),t.effectiveHeight(r)):new iT(e[0].length,e.length)}get data(){return this.ensureThatComputed(),this._data}static fromRange(e,t,r){return new tF(e,t,r,!0)}static onlyNumbers(e){return new tF(e,void 0,void 0,!0)}static onlyValues(e){return new tF(e,void 0,void 0,void 0)}static onlyRange(e,t){return new tF(void 0,e,t,void 0)}static fromScalar(e){return new tF([[e]],void 0,void 0,void 0)}isAdHoc(){return void 0===this.range}width(){return this.size.width}height(){return this.size.height}valuesFromTopLeftCorner(){this.ensureThatComputed();let e=[];for(let t=0;t<this._data.length;t++)for(let r=0;r<this._data[0].length;r++)e.push(this._data[t][r]);return e}*effectiveAddressesFromData(e){for(let t=0;t<this.data.length;++t){let r=this.data[t];for(let i=0;i<r.length;++i)yield r0(e.sheet,e.col+i,e.row+t)}}*entriesFromTopLeftCorner(e){this.ensureThatComputed();for(let t=0;t<this.size.height;++t)for(let r=0;r<this.size.width;++r)yield[this._data[t][r],r0(e.sheet,e.col+r,e.row+t)]}*iterateValuesFromTopLeftCorner(){yield*this.valuesFromTopLeftCorner()}numberOfElements(){return this.size.width*this.size.height}hasOnlyNumbers(){if(void 0===this._hasOnlyNumbers){for(let e of(this._hasOnlyNumbers=!0,this.data))for(let t of e)if("number"!=typeof t)return this._hasOnlyNumbers=!1,!1}return this._hasOnlyNumbers}rawNumbers(){return this._data}rawData(){var e;return this.ensureThatComputed(),null!=(e=this._data)?e:[]}sameDimensionsAs(e){return this.width()===e.width()&&this.height()===e.height()}ensureThatComputed(){void 0===this._data&&(this._hasOnlyNumbers=!0,this._data=this.range.addressesArrayMap(this.dependencyGraph,e=>{let t=this.dependencyGraph.getCellValue(e);return t instanceof tF?(this._hasOnlyNumbers=!1,new rq(d.VALUE,eY.ScalarExpected)):(tD(t)||(this._hasOnlyNumbers=!1),t)}))}}class tB{constructor(){this.changes=new Map}static empty(){return new tB}addAll(e){for(let t of e.changes.values())this.add(t.address,t);return this}addChange(e,t,r){this.addInterpreterValue(e,t,r)}exportChanges(e){let t=[];return this.changes.forEach(r=>{let i=e.exportChange(r);Array.isArray(i)?t=t.concat(i):t.push(i)}),t}getChanges(){return Array.from(this.changes.values())}isEmpty(){return 0===this.changes.size}add(e,t){let r=t.value;if(r instanceof tF)for(let t of r.effectiveAddressesFromData(e))this.changes.delete(r3(t));this.changes.set(r3(e),t)}addInterpreterValue(e,t,r){this.add(t,{address:t,value:e,oldValue:r})}}class tV{constructor(e,t,r,i){this.displayName=e,this.address=t,this.added=r,this.options=i}normalizeExpressionName(){return this.displayName.toLowerCase()}copy(){return new tV(this.displayName,this.address,this.added,this.options)}}class tz{constructor(){this.mapping=new Map}has(e){return this.mapping.has(this.normalizeExpressionName(e))}isNameAvailable(e){let t=this.normalizeExpressionName(e),r=this.mapping.get(t);return!(r&&r.added)}add(e){this.mapping.set(e.normalizeExpressionName(),e)}get(e){return this.mapping.get(this.normalizeExpressionName(e))}getExisting(e){let t=this.mapping.get(this.normalizeExpressionName(e));return t&&t.added?t:void 0}remove(e){let t=this.normalizeExpressionName(e),r=this.mapping.get(t);r&&(r.added=!1)}getAllNamedExpressions(){return Array.from(this.mapping.values()).filter(e=>e.added)}normalizeExpressionName(e){return e.toLowerCase()}}class tU{constructor(){this.mapping=new Map}add(e){this.mapping.set(this.normalizeExpressionName(e.displayName),e)}get(e){return this.mapping.get(this.normalizeExpressionName(e))}has(e){return this.mapping.has(this.normalizeExpressionName(e))}getAllNamedExpressions(){return Array.from(this.mapping.values()).filter(e=>e.added)}isNameAvailable(e){let t=this.normalizeExpressionName(e);return!this.mapping.has(t)}remove(e){let t=this.normalizeExpressionName(e);this.mapping.get(t)&&this.mapping.delete(t)}normalizeExpressionName(e){return e.toLowerCase()}}class tW{constructor(){this.nextNamedExpressionRow=0,this.workbookStore=new tz,this.worksheetStores=new Map,this.addressCache=new Map}isNameAvailable(e,t){var r,i;return void 0===t?this.workbookStore.isNameAvailable(e):null==(i=null==(r=this.worksheetStore(t))?void 0:r.isNameAvailable(e))||i}namedExpressionInAddress(e){let t=this.addressCache.get(e);return t&&t.added?t:void 0}namedExpressionForScope(e,t){var r;return void 0===t?this.workbookStore.getExisting(e):null==(r=this.worksheetStore(t))?void 0:r.get(e)}nearestNamedExpression(e,t){var r,i;return null!=(i=null==(r=this.worksheetStore(t))?void 0:r.get(e))?i:this.workbookStore.getExisting(e)}isExpressionInScope(e,t){var r,i;return null!=(i=null==(r=this.worksheetStore(t))?void 0:r.has(e))&&i}isNameValid(e){let t=RegExp(`^${ec}$`),r=RegExp(`^${em}$`),i=RegExp(`^${ew}$`);return!(t.test(e)||r.test(e))&&i.test(e)}addNamedExpression(e,t,r){let i=void 0===t?this.workbookStore:this.worksheetStoreOrCreate(t),n=i.get(e);return void 0!==n?(n.added=!0,n.displayName=e,n.options=r):(n=new tV(e,this.nextAddress(),!0,r),i.add(n)),this.addressCache.set(n.address.row,n),n}restoreNamedExpression(e,t){let r=void 0===t?this.workbookStore:this.worksheetStoreOrCreate(t);return e.added=!0,r.add(e),this.addressCache.set(e.address.row,e),e}namedExpressionOrPlaceholder(e,t){var r;return null!=(r=this.worksheetStoreOrCreate(t).get(e))?r:this.workbookNamedExpressionOrPlaceholder(e)}workbookNamedExpressionOrPlaceholder(e){let t=this.workbookStore.get(e);return void 0===t&&(t=new tV(e,this.nextAddress(),!1),this.workbookStore.add(t)),t}remove(e,t){let r,i=null==(r=void 0===t?this.workbookStore:this.worksheetStore(t))?void 0:r.get(e);if(void 0===r||void 0===i||!i.added)throw Error("Named expression does not exist");r.remove(e),r instanceof tU&&0===r.mapping.size&&this.worksheetStores.delete(t),this.addressCache.delete(i.address.row)}getAllNamedExpressionsNamesInScope(e){return this.getAllNamedExpressions().filter(({scope:t})=>t===e).map(e=>e.expression.displayName)}getAllNamedExpressionsNames(){return this.getAllNamedExpressions().map(e=>e.expression.displayName)}getAllNamedExpressions(){let e=[];return this.workbookStore.getAllNamedExpressions().forEach(t=>{e.push({expression:t,scope:void 0})}),this.worksheetStores.forEach((t,r)=>{t.getAllNamedExpressions().forEach(t=>{e.push({expression:t,scope:r})})}),e}getAllNamedExpressionsForScope(e){var t,r;return void 0===e?this.workbookStore.getAllNamedExpressions():null!=(r=null==(t=this.worksheetStores.get(e))?void 0:t.getAllNamedExpressions())?r:[]}worksheetStoreOrCreate(e){let t=this.worksheetStores.get(e);return t||(t=new tU,this.worksheetStores.set(e,t)),t}worksheetStore(e){return this.worksheetStores.get(e)}nextAddress(){return r0(tW.SHEET_FOR_WORKBOOK_EXPRESSIONS,0,this.nextNamedExpressionRow++)}}tW.SHEET_FOR_WORKBOOK_EXPRESSIONS=-1;let t$=e=>{switch(e.type){case n.EMPTY:case n.NUMBER:case n.STRING:case n.ERROR:case n.ERROR_WITH_RAW_INPUT:return!1;case n.CELL_REFERENCE:return!e.reference.isAbsolute();case n.CELL_RANGE:case n.COLUMN_RANGE:case n.ROW_RANGE:return!e.start.isAbsolute();case n.NAMED_EXPRESSION:return!1;case n.PERCENT_OP:case n.PLUS_UNARY_OP:case n.MINUS_UNARY_OP:return t$(e.value);case n.CONCATENATE_OP:case n.EQUALS_OP:case n.NOT_EQUAL_OP:case n.LESS_THAN_OP:case n.GREATER_THAN_OP:case n.LESS_THAN_OR_EQUAL_OP:case n.GREATER_THAN_OR_EQUAL_OP:case n.MINUS_OP:case n.PLUS_OP:case n.TIMES_OP:case n.DIV_OP:case n.POWER_OP:return t$(e.left)||t$(e.right);case n.PARENTHESIS:return t$(e.expression);case n.FUNCTION_CALL:return e.args.some(e=>t$(e));case n.ARRAY:return e.args.some(e=>e.some(e=>t$(e)))}};class tG{constructor(e,t,r){if(this.sheet=e,this.rowStart=t,this.rowEnd=r,t<0)throw Error("Starting row cant be less than 0");if(r<t)throw Error("Row span cant end before start")}get numberOfRows(){return this.rowEnd-this.rowStart+1}get start(){return this.rowStart}get end(){return this.rowEnd}static fromNumberOfRows(e,t,r){return new tG(e,t,t+r-1)}static fromRowStartAndEnd(e,t,r){return new tG(e,t,r)}*rows(){for(let e=this.rowStart;e<=this.rowEnd;++e)yield e}intersect(e){if(this.sheet!==e.sheet)throw Error("Can't intersect spans from different sheets");let t=Math.max(this.rowStart,e.rowStart),r=Math.min(this.rowEnd,e.rowEnd);return t>r?null:new tG(this.sheet,t,r)}firstRow(){return new tG(this.sheet,this.rowStart,this.rowStart)}}class tj{constructor(e,t,r){if(this.sheet=e,this.columnStart=t,this.columnEnd=r,t<0)throw Error("Starting column cant be less than 0");if(r<t)throw Error("Column span cant end before start")}get numberOfColumns(){return this.columnEnd-this.columnStart+1}get start(){return this.columnStart}get end(){return this.columnEnd}static fromNumberOfColumns(e,t,r){return new tj(e,t,t+r-1)}static fromColumnStartAndEnd(e,t,r){return new tj(e,t,r)}*columns(){for(let e=this.columnStart;e<=this.columnEnd;++e)yield e}intersect(e){if(this.sheet!==e.sheet)throw Error("Can't intersect spans from different sheets");let t=Math.max(this.columnStart,e.columnStart),r=Math.min(this.columnEnd,e.columnEnd);return t>r?null:new tj(this.sheet,t,r)}firstColumn(){return new tj(this.sheet,this.columnStart,this.columnStart)}}(I=l||(l={})).BUILD_ENGINE_TOTAL="BUILD_ENGINE_TOTAL",I.PARSER="PARSER",I.GRAPH_BUILD="GRAPH_BUILD",I.COLLECT_DEPENDENCIES="COLLECT_DEPENDENCIES",I.PROCESS_DEPENDENCIES="PROCESS_DEPENDENCIES",I.TOP_SORT="TOP_SORT",I.BUILD_COLUMN_INDEX="BUILD_COLUMN_INDEX",I.EVALUATION="EVALUATION",I.VLOOKUP="VLOOKUP",I.TRANSFORM_ASTS="TRANSFORM_ASTS",I.TRANSFORM_ASTS_POSTPONED="TRANSFORM_ASTS_POSTPONED",I.ADJUSTING_ADDRESS_MAPPING="ADJUSTING_ADDRESS_MAPPING",I.ADJUSTING_ARRAY_MAPPING="ADJUSTING_ARRAY_MAPPING",I.ADJUSTING_RANGES="ADJUSTING_RANGES",I.ADJUSTING_GRAPH="ADJUSTING_GRAPH",I.CRITERION_FUNCTION_FULL_CACHE_USED="CRITERION_FUNCTION_FULL_CACHE_USED",I.CRITERION_FUNCTION_PARTIAL_CACHE_USED="CRITERION_FUNCTION_PARTIAL_CACHE_USED";class tY{constructor(){this.stats=new Map([[l.CRITERION_FUNCTION_FULL_CACHE_USED,0],[l.CRITERION_FUNCTION_PARTIAL_CACHE_USED,0]]),this.startTimes=new Map}incrementCriterionFunctionFullCacheUsed(){var e;let t=(null!=(e=this.stats.get(l.CRITERION_FUNCTION_FULL_CACHE_USED))?e:0)+1;this.stats.set(l.CRITERION_FUNCTION_FULL_CACHE_USED,t)}incrementCriterionFunctionPartialCacheUsed(){var e;let t=(null!=(e=this.stats.get(l.CRITERION_FUNCTION_PARTIAL_CACHE_USED))?e:0)+1;this.stats.set(l.CRITERION_FUNCTION_PARTIAL_CACHE_USED,t)}reset(){this.stats.clear(),this.startTimes.clear(),this.stats.set(l.CRITERION_FUNCTION_FULL_CACHE_USED,0),this.stats.set(l.CRITERION_FUNCTION_PARTIAL_CACHE_USED,0)}start(e){if(this.startTimes.get(e))throw Error(`Statistics ${e} already started`);this.startTimes.set(e,Date.now())}end(e){var t;let r=Date.now(),i=this.startTimes.get(e);if(i){let n=null!=(t=this.stats.get(e))?t:0;n+=r-i,this.stats.set(e,n),this.startTimes.delete(e)}else throw Error(`Statistics ${e} not started`)}measure(e,t){this.start(e);let r=t();return this.end(e),r}snapshot(){return new Map(this.stats)}}class tK extends tY{incrementCriterionFunctionFullCacheUsed(){}incrementCriterionFunctionPartialCacheUsed(){}start(e){}end(e){}}class tq extends Error{constructor(e){super(`There's no sheet with id = ${e}`)}}class tX extends Error{constructor(e){super(`There's no sheet with name '${e}'`)}}class tQ extends Error{constructor(e){super(`Sheet with name ${e} already exists`)}}class tZ extends Error{constructor(){super("Sheet size limit exceeded")}}class tJ extends Error{constructor(){super("This is not a formula")}}class t0 extends Error{constructor(e){super(`Address (row = ${e.row}, col = ${e.col}) is invalid`)}}class t1 extends Error{constructor(e){super(`Invalid arguments, expected ${e}`)}}class t2 extends Error{constructor(e,t){super(`Sheets ${e} and ${t} are not equal.`)}}class t3 extends Error{constructor(e){super(`Name of Named Expression '${e}' is already present`)}}class t6 extends Error{constructor(e){super(`Name of Named Expression '${e}' is invalid`)}}class t5 extends Error{constructor(e){super(`Named Expression '${e}' does not exist`)}}class t4 extends Error{constructor(){super("There is no operation to undo")}}class t8 extends Error{constructor(){super("There is no operation to redo")}}class t9 extends Error{constructor(){super("There is nothing to paste")}}function t7(e,t){switch(typeof t){case"function":case"symbol":return t.toString();case"bigint":return"BigInt("+t.toString()+")";default:if(t instanceof RegExp)return"RegExp("+t.toString()+")";return t}}class re extends Error{constructor(e){super(`Unable to parse value: ${JSON.stringify(e,t7,4)}`)}}class rt extends Error{constructor(e,t){super(`Expected value of type: ${e} for config parameter: ${t}`)}}class rr extends Error{constructor(e){super(`Config parameter ${e} cannot be empty.`)}}class ri extends Error{constructor(e,t){super(`Config parameter ${e} should be at least ${t}`)}}class rn extends Error{constructor(e,t){super(`Config parameter ${e} should be at most ${t}`)}}class ro extends Error{constructor(e,t){super(`Expected one of ${e} for config parameter: ${t}`)}}class rs extends Error{constructor(){super("Computations are suspended")}}class rl extends Error{constructor(e){super(`Translation for ${e} is missing in the translation package you're using.`)}}class ra extends Error{constructor(e){super(`Cannot register translation for function with id: ${e}`)}}class rh extends Error{constructor(){super("Language not registered.")}}class rd extends Error{constructor(){super("Language already registered.")}}class ru extends Error{static functionNotDeclaredInPlugin(e,t){return new ru(`Function with id ${e} not declared in plugin ${t}`)}static functionMethodNotFound(e,t){return new ru(`Function method ${e} not found in plugin ${t}`)}}class rc extends Error{static cannotRegisterFunctionWithId(e){return new rc(`Cannot register function with id ${e}`)}static cannotUnregisterFunctionWithId(e){return new rc(`Cannot unregister function with id ${e}`)}static cannotUnregisterProtectedPlugin(){return new rc("Cannot unregister protected plugin")}}class rg extends Error{constructor(){super("Cannot perform this operation, source location has an array inside.")}}class rp extends Error{constructor(){super("Cannot perform this operation, target location has an array inside.")}}class rm extends Error{constructor(){super("Relative addresses not allowed in named expressions.")}}class rf extends Error{constructor(e,t){super(`Alias id ${e} in plugin ${t} already defined as a function or alias.`)}}class rw{constructor(e){this.policy=e,this.mapping=new Map}getCell(e,t={}){let r=this.mapping.get(e.sheet);if(!r){if(t.throwIfSheetNotExists)throw new tq(e.sheet);return}let i=r.getCell(e);if(!i&&t.throwIfCellNotExists)throw Error("Vertex for address missing in AddressMapping");return i}getCellOrThrow(e){let t=this.mapping.get(e.sheet);if(!t)throw new tq(e.sheet);let r=t.getCell(e);if(!r)throw Error("Vertex for address missing in AddressMapping");return r}getStrategyForSheetOrThrow(e){let t=this.mapping.get(e);if(void 0===t)throw new tq(e);return t}addSheetWithStrategy(e,t,r={throwIfSheetAlreadyExists:!0}){let i=this.mapping.get(e);if(i){if(r.throwIfSheetAlreadyExists)throw Error("Sheet already added");return i}return this.mapping.set(e,t),t}addSheetOrChangeStrategy(e,t){let r=this.createStrategyBasedOnBoundaries(t),i=this.mapping.get(e);return i?r instanceof r$?i:(this.moveStrategyContent(i,r,e),this.mapping.set(e,r),r):(this.mapping.set(e,r),r)}moveStrategyContent(e,t,r){for(let[i,n]of e.getEntries(r))t.setCell(i,n)}addSheetAndSetStrategyBasedOnBoundaries(e,t,r={throwIfSheetAlreadyExists:!0}){this.addSheetWithStrategy(e,this.createStrategyBasedOnBoundaries(t),r)}createStrategyBasedOnBoundaries(e){let{height:t,width:r,fill:i}=e;return new(this.policy.call(i))(r,t)}addSheetStrategyPlaceholderIfNotExists(e){this.mapping.has(e)||this.mapping.set(e,new r$(0,0))}removeSheetIfExists(e){return this.mapping.delete(e)}getCellValue(e){let t=this.getCell(e);return void 0===t?tA:t instanceof rT?t.getArrayCellValue(e):t.getCellValue()}getRawValue(e){let t=this.getCell(e);return t instanceof rz?t.getValues().rawValue:t instanceof rT?t.getArrayCellRawValue(e):null}setCell(e,t){let r=this.mapping.get(e.sheet);if(!r)throw Error("Sheet not initialized");r.setCell(e,t)}moveCell(e,t){let r=this.mapping.get(e.sheet);if(!r)throw Error("Sheet not initialized.");if(this.has(t))throw Error("Cannot move cell. Destination already occupied.");let i=r.getCell(e);if(void 0===i)throw Error("Cannot move cell. No cell with such address.");this.setCell(t,i),this.removeCell(e)}removeCell(e){let t=this.mapping.get(e.sheet);if(!t)throw Error("Sheet not initialized");t.removeCell(e)}has(e){let t=this.mapping.get(e.sheet);return void 0!==t&&t.has(e)}getSheetHeight(e){return this.getStrategyForSheetOrThrow(e).getHeight()}getSheetWidth(e){return this.getStrategyForSheetOrThrow(e).getWidth()}addRows(e,t,r){this.getStrategyForSheetOrThrow(e).addRows(t,r)}removeRows(e){this.getStrategyForSheetOrThrow(e.sheet).removeRows(e)}addColumns(e,t,r){this.getStrategyForSheetOrThrow(e).addColumns(t,r)}removeColumns(e){this.getStrategyForSheetOrThrow(e.sheet).removeColumns(e)}*verticesFromRowsSpan(e){yield*this.mapping.get(e.sheet).verticesFromRowsSpan(e)}*verticesFromColumnsSpan(e){yield*this.mapping.get(e.sheet).verticesFromColumnsSpan(e)}*entriesFromRowsSpan(e){let t=this.getStrategyForSheetOrThrow(e.sheet);yield*t.entriesFromRowsSpan(e)}*entriesFromColumnsSpan(e){let t=this.getStrategyForSheetOrThrow(e.sheet);yield*t.entriesFromColumnsSpan(e)}*entries(){for(let[e,t]of this.mapping.entries())yield*t.getEntries(e)}*sheetEntries(e){let t=this.getStrategyForSheetOrThrow(e);yield*t.getEntries(e)}hasAnyEntries(e){return!this.sheetEntries(e).next().done}}class ry{constructor(){this.arrayMapping=new Map}getArray(e){let t=this.getArrayByCorner(e.start);if(null==t?void 0:t.getRange().sameAs(e))return t}getArrayByCorner(e){return this.arrayMapping.get(r3(e))}setArray(e,t){this.arrayMapping.set(r3(e.start),t)}removeArray(e){"string"==typeof e?this.arrayMapping.delete(e):this.arrayMapping.delete(r3(e.start))}count(){return this.arrayMapping.size}*arraysInRows(e){for(let[t,r]of this.arrayMapping.entries())r.spansThroughSheetRows(e.sheet,e.rowStart,e.rowEnd)&&(yield[t,r])}*arraysInCols(e){for(let[t,r]of this.arrayMapping.entries())r.spansThroughSheetColumn(e.sheet,e.columnStart,e.columnEnd)&&(yield[t,r])}isFormulaArrayInRow(e,t){for(let r of this.arrayMapping.values())if(r.spansThroughSheetRows(e,t))return!0;return!1}isFormulaArrayInAllRows(e){let t=!0;for(let r of e.rows())this.isFormulaArrayInRow(e.sheet,r)||(t=!1);return t}isFormulaArrayInColumn(e,t){for(let r of this.arrayMapping.values())if(r.spansThroughSheetColumn(e,t))return!0;return!1}isFormulaArrayInAllColumns(e){let t=!0;for(let r of e.columns())this.isFormulaArrayInColumn(e.sheet,r)||(t=!1);return t}isFormulaArrayInRange(e){for(let t of this.arrayMapping.values())if(t.getRange().doesOverlap(e))return!0;return!1}isFormulaArrayAtAddress(e){for(let t of this.arrayMapping.values())if(t.getRange().addressInRange(e))return!0;return!1}moveArrayVerticesAfterRowByRows(e,t,r){this.updateArrayVerticesInSheet(e,(e,i)=>{let n=i.getRange();return t<=n.start.row?[n.shifted(0,r),i]:void 0})}moveArrayVerticesAfterColumnByColumns(e,t,r){this.updateArrayVerticesInSheet(e,(e,i)=>{let n=i.getRange();return t<=n.start.col?[n.shifted(r,0),i]:void 0})}updateArrayVerticesInSheet(e,t){let r=[];for(let[i,n]of this.arrayMapping.entries()){if(n.sheet!==e)continue;let o=t(i,n);void 0!==o&&(this.removeArray(i),r.push(o))}r.forEach(([e,t])=>{this.setArray(e,t)})}}class rb{constructor(e){this.size=e}width(){return this.size.width}height(){return this.size.height}get(e,t){throw Error("Array not computed yet.")}simpleRangeValue(){throw Error("Array not computed yet.")}}class rC{constructor(e){if(this.size=new iT(e.length>0?e[0].length:0,e.length),this.array=e,this.size.width<=0||this.size.height<=0)throw Error("Incorrect array size")}static fromInterpreterValue(e){return new rC(e instanceof tF?e.data:[[e]])}simpleRangeValue(){return tF.onlyValues(this.array)}addRows(e,t){this.array.splice(e,0,...this.nullArrays(t,this.width())),this.size.height+=t}addColumns(e,t){for(let r=0;r<this.height();r++)this.array[r].splice(e,0,...Array(t).fill(tA));this.size.width+=t}removeRows(e,t){if(this.outOfBound(0,e)||this.outOfBound(0,t))throw Error("Array index out of bound");let r=t-e+1;this.array.splice(e,r),this.size.height-=r}removeColumns(e,t){if(this.outOfBound(e,0)||this.outOfBound(t,0))throw Error("Array index out of bound");let r=t-e+1;for(let t of this.array)t.splice(e,r);this.size.width-=r}nullArrays(e,t){let r=[];for(let i=0;i<e;++i)r.push(Array(t).fill(tA));return r}get(e,t){if(this.outOfBound(e,t))throw Error("Array index out of bound");return this.array[t][e]}set(e,t,r){if(this.outOfBound(e,t))throw Error("Array index out of bound");this.array[t][e]=r}width(){return this.size.width}height(){return this.size.height}raw(){return this.array}resize(e){if(this.height()<e.height&&isFinite(e.height)&&this.addRows(this.height(),e.height-this.height()),this.height()>e.height||(this.width()<e.width&&isFinite(e.width)&&this.addColumns(this.width(),e.width-this.width()),this.width()>e.width))throw Error("Resizing to smaller array")}outOfBound(e,t){return e<0||t<0||t>this.size.height-1||e>this.size.width-1}}class rS{constructor(e,t){this.error=e,this.size=t}get(e,t){return this.error}width(){return this.size.width}height(){return this.size.height}simpleRangeValue(){return this.error}}class rv{}class rR extends rv{constructor(){super()}}class rE extends rR{constructor(e,t,r){super(),this.formula=e,this.cellAddress=t,this.version=r}get width(){return 1}get height(){return 1}static fromAst(e,t,r,i){return r.isScalar()?new rx(e,t,i):new rT(e,t,r,i)}getFormula(e){return this.ensureRecentData(e),this.formula}ensureRecentData(e){if(this.version!=e.version()){let[t,r,i]=e.applyTransformations(this.formula,this.cellAddress,this.version);this.formula=t,this.cellAddress=r,this.version=i}}getAddress(e){return this.ensureRecentData(e),this.cellAddress}}class rT extends rE{constructor(e,t,r,i=0){super(e,t,i),r.isRef?this.array=new rS(new rq(d.REF,eY.NoSpaceForArrayResult),iT.error()):this.array=new rb(r)}get width(){return this.array.width()}get height(){return this.array.height()}get sheet(){return this.cellAddress.sheet}get leftCorner(){return this.cellAddress}setCellValue(e){if(e instanceof rq)return this.setErrorValue(e),e;let t=rC.fromInterpreterValue(e);return t.resize(this.array.size),this.array=t,e}getCellValue(){if(this.array instanceof rb)throw Error("Array not computed yet.");return this.array.simpleRangeValue()}valueOrUndef(){if(!(this.array instanceof rb))return this.array.simpleRangeValue()}getArrayCellValue(e){let t=e.col-this.cellAddress.col,r=e.row-this.cellAddress.row;try{return this.array.get(t,r)}catch(e){return new rq(d.REF)}}getArrayCellRawValue(e){let t=this.getArrayCellValue(e);if(!(t instanceof rq)&&t!==tA)return tM(t)}setArrayCellValue(e,t){let r=e.col-this.cellAddress.col,i=e.row-this.cellAddress.row;this.array instanceof rC&&this.array.set(r,i,t)}setNoSpace(){return this.array=new rS(new rq(d.SPILL,eY.NoSpaceForArrayResult),iT.error()),this.getCellValue()}getRange(){return r7.spanFrom(this.cellAddress,this.width,this.height)}getRangeOrUndef(){return r7.spanFromOrUndef(this.cellAddress,this.width,this.height)}setAddress(e){this.cellAddress=e}setFormula(e){this.formula=e}spansThroughSheetRows(e,t,r=t){return this.cellAddress.sheet===e&&this.cellAddress.row<=r&&t<this.cellAddress.row+this.height}spansThroughSheetColumn(e,t,r=t){return this.cellAddress.sheet===e&&this.cellAddress.col<=r&&t<this.cellAddress.col+this.width}isComputed(){return!(this.array instanceof rb)}columnsFromArray(){return tj.fromNumberOfColumns(this.cellAddress.sheet,this.cellAddress.col,this.width)}rowsFromArray(){return tG.fromNumberOfRows(this.cellAddress.sheet,this.cellAddress.row,this.height)}ensureRecentData(e){}isLeftCorner(e){return r4(this.cellAddress,e)}setErrorValue(e){this.array=new rS(e,this.array.size)}}class rx extends rE{constructor(e,t,r){super(e,t,r)}valueOrUndef(){return this.cachedCellValue}setCellValue(e){return this.cachedCellValue=e,this.cachedCellValue}getCellValue(){if(void 0!==this.cachedCellValue)return this.cachedCellValue;throw Error("Value of the formula cell is not computed.")}isComputed(){return void 0!==this.cachedCellValue}}class rA extends rv{constructor(e){super(),this.range=e,this.functionCache=new Map,this.criterionFunctionCache=new Map,this.dependentCacheRanges=new Set,this.bruteForce=!1}get start(){return this.range.start}get end(){return this.range.end}get sheet(){return this.range.start.sheet}getFunctionValue(e){return this.functionCache.get(e)}setFunctionValue(e,t){this.functionCache.set(e,t)}getCriterionFunctionValue(e,t){var r;return null==(r=this.getCriterionFunctionValues(e).get(t))?void 0:r[0]}getCriterionFunctionValues(e){var t;return null!=(t=this.criterionFunctionCache.get(e))?t:new Map}setCriterionFunctionValues(e,t){this.criterionFunctionCache.set(e,t)}addDependentCacheRange(e){e!==this&&this.dependentCacheRanges.add(e)}clearCache(){this.functionCache.clear(),this.criterionFunctionCache.clear(),this.dependentCacheRanges.forEach(e=>e.criterionFunctionCache.clear()),this.dependentCacheRanges.clear()}}let rM=(e,t,r,i,n)=>{let o,s;if(t instanceof rA){let e=t.range.intersectionWith(r);return void 0!==e?Array.from(e.addresses(n)):[]}return t instanceof rE?(o=t.getFormula(i),s=t.getAddress(i),tC(o,e).filter(e=>e instanceof tS).map(e=>e.dependency.toSimpleCellAddress(s)).filter(e=>r.addressInRange(e))):[]};(N=a||(a={}))[N.ON_STACK=0]="ON_STACK",N[N.PROCESSED=1]="PROCESSED",N[N.POPPED=2]="POPPED";class rI{constructor(e=[],t=[]){this.nodesSparseArray=e,this.edgesSparseArray=t,this.entranceTime=[],this.low=[],this.parent=[],this.inSCC=[],this.nodeStatus=[],this.order=[],this.sccNonSingletons=[],this.timeCounter=0}getTopSortedWithSccSubgraphFrom(e,t,r){let i=e.reverse();return i.forEach(e=>this.runDFS(e)),this.postprocess(i,r,t)}getAdjacentNodeIds(e){return this.edgesSparseArray[e].filter(e=>void 0!==e&&this.nodesSparseArray[e])}runDFS(e){if(void 0!==this.nodeStatus[e])return;this.nodeStatus[e]=a.ON_STACK;let t=[e],r=[];for(;t.length>0;){let e=t[t.length-1];switch(this.nodeStatus[e]){case a.ON_STACK:this.handleOnStack(e,r,t);break;case a.PROCESSED:this.handleProcessed(e,r,t);break;case a.POPPED:t.pop()}}}handleOnStack(e,t,r){this.entranceTime[e]=this.timeCounter,this.low[e]=this.timeCounter,this.timeCounter++,t.push(e),this.getAdjacentNodeIds(e).forEach(t=>{void 0===this.entranceTime[t]&&(r.push(t),this.parent[t]=e,this.nodeStatus[t]=a.ON_STACK)}),this.nodeStatus[e]=a.PROCESSED}handleProcessed(e,t,r){let i=this.entranceTime[e];if(this.getAdjacentNodeIds(e).forEach(t=>{this.inSCC[t]||(i=this.parent[t]===e?Math.min(i,this.low[t]):Math.min(i,this.entranceTime[t]))}),this.low[e]=i,i===this.entranceTime[e]){let r=[];do r.push(t[t.length-1]),t.pop();while(r[r.length-1]!==e);r.forEach(e=>{this.inSCC[e]=!0}),this.order.push(...r),r.length>1&&r.forEach(e=>{this.sccNonSingletons[e]=!0})}r.pop(),this.nodeStatus[e]=a.POPPED}postprocess(e,t,r){let i=[];e.forEach(e=>{i[e]=!0});let n=[],o=[];return this.order.reverse(),this.order.forEach(e=>{let s=this.getAdjacentNodeIds(e);this.sccNonSingletons[e]||s.includes(e)?(o.push(this.nodesSparseArray[e]),t(this.nodesSparseArray[e]),s.forEach(e=>i[e]=!0)):(n.push(this.nodesSparseArray[e]),i[e]&&r(this.nodesSparseArray[e])&&s.forEach(e=>i[e]=!0))}),{sorted:n,cycled:o}}}class rN{constructor(e,t){this.rawValue=e,this.processFn=t,this.processedValue=null}getProcessedValue(){return null===this.processedValue&&(this.processedValue=this.processFn(this.rawValue)),this.processedValue}markAsModified(){this.processedValue=null}}class rO{constructor(e){this.dependencyQuery=e,this.nodesSparseArray=[],this.edgesSparseArray=[],this.dirtyAndVolatileNodeIds=new rN({dirty:[],volatile:[]},e=>this.processDirtyAndVolatileNodeIds(e)),this.infiniteRangeIds=new Set,this.changingWithStructureNodeIds=[],this.nextId=0}getNodes(){return this.nodesSparseArray.filter(e=>void 0!==e)}hasNode(e){return null!=e.idInGraph}existsEdge(e,t){let r=e.idInGraph,i=t.idInGraph;return void 0!==r&&void 0!==i&&this.edgesSparseArray[r].includes(i)}adjacentNodes(e){let t=e.idInGraph;if(void 0===t)throw this.missingNodeError(e);return new Set(this.edgesSparseArray[t].filter(e=>void 0!==e).map(e=>this.nodesSparseArray[e]).filter(e=>void 0!==e))}adjacentNodesCount(e){let t=e.idInGraph;if(void 0===t)throw this.missingNodeError(e);return this.fixEdgesArrayForNode(t).length}addNodeIfNotExists(e){let t=e.idInGraph;if(void 0!==t)return t;let r=this.nextId;return this.nextId++,this.nodesSparseArray[r]=e,this.edgesSparseArray[r]=[],e.idInGraph=r,r}addEdge(e,t){let r=this.getNodeIdIfNotNumber(e),i=this.getNodeIdIfNotNumber(t);if(void 0===r)throw this.missingNodeError(e);if(void 0===i)throw this.missingNodeError(t);this.edgesSparseArray[r].includes(i)||this.edgesSparseArray[r].push(i)}removeNode(e){let t=e.idInGraph;if(void 0===t)throw this.missingNodeError(e);this.edgesSparseArray[t].length>0&&(this.edgesSparseArray[t].forEach(e=>this.dirtyAndVolatileNodeIds.rawValue.dirty.push(e)),this.dirtyAndVolatileNodeIds.markAsModified());let r=this.removeDependencies(e);return delete this.nodesSparseArray[t],delete this.edgesSparseArray[t],this.infiniteRangeIds.delete(t),e.idInGraph=void 0,r}removeEdge(e,t){let r=this.getNodeIdIfNotNumber(e),i=this.getNodeIdIfNotNumber(t);if(void 0===r)throw this.missingNodeError(e);if(void 0===i)throw this.missingNodeError(t);let n=this.edgesSparseArray[r].indexOf(i);if(-1===n)throw Error("Edge does not exist");delete this.edgesSparseArray[r][n]}removeEdgeIfExists(e,t){let r=this.getNodeIdIfNotNumber(e),i=this.getNodeIdIfNotNumber(t);if(void 0===r||void 0===i)return;let n=this.edgesSparseArray[r].indexOf(i);-1!==n&&delete this.edgesSparseArray[r][n]}topSortWithScc(){return this.getTopSortedWithSccSubgraphFrom(this.getNodes(),()=>!0,()=>{})}getTopSortedWithSccSubgraphFrom(e,t,r){let i=new rI(this.nodesSparseArray,this.edgesSparseArray),n=e.map(e=>e.idInGraph).filter(e=>void 0!==e);return i.getTopSortedWithSccSubgraphFrom(n,t,r)}markNodeAsVolatile(e){let t=e.idInGraph;void 0!==t&&(this.dirtyAndVolatileNodeIds.rawValue.volatile.push(t),this.dirtyAndVolatileNodeIds.markAsModified())}markNodeAsDirty(e){let t=e.idInGraph;void 0!==t&&(this.dirtyAndVolatileNodeIds.rawValue.dirty.push(t),this.dirtyAndVolatileNodeIds.markAsModified())}getDirtyAndVolatileNodes(){return this.dirtyAndVolatileNodeIds.getProcessedValue()}clearDirtyNodes(){this.dirtyAndVolatileNodeIds.rawValue.dirty=[],this.dirtyAndVolatileNodeIds.markAsModified()}markNodeAsChangingWithStructure(e){let t=e.idInGraph;void 0!==t&&this.changingWithStructureNodeIds.push(t)}markChangingWithStructureNodesAsDirty(){this.changingWithStructureNodeIds.length<=0||(this.dirtyAndVolatileNodeIds.rawValue.dirty=[...this.dirtyAndVolatileNodeIds.rawValue.dirty,...this.changingWithStructureNodeIds],this.dirtyAndVolatileNodeIds.markAsModified())}markNodeAsInfiniteRange(e){let t=this.getNodeIdIfNotNumber(e);void 0!==t&&this.infiniteRangeIds.add(t)}getInfiniteRanges(){return[...this.infiniteRangeIds].map(e=>this.nodesSparseArray[e])}getNodeIdIfNotNumber(e){return"number"==typeof e?e:e.idInGraph}fixEdgesArrayForNode(e){let t=this.edgesSparseArray[e];return this.edgesSparseArray[e]=t.filter(e=>void 0!==e&&this.nodesSparseArray[e]),this.edgesSparseArray[e]}removeDependencies(e){let t=this.dependencyQuery(e);return t.forEach(([t,r])=>{this.removeEdgeIfExists(r,e)}),t}processDirtyAndVolatileNodeIds({dirty:e,volatile:t}){return[...new Set([...e,...t])].map(e=>this.nodesSparseArray[e]).filter(e=>void 0!==e)}missingNodeError(e){return Error(`Unknown node ${JSON.stringify(e)}`)}}class rk{constructor(){this.rangeMapping=new Map}getNumberOfRangesInSheet(e){var t,r;return null!=(r=null==(t=this.rangeMapping.get(e))?void 0:t.size)?r:0}addOrUpdateVertex(e){let t=this.rangeMapping.get(e.sheet);void 0===t&&(t=new Map,this.rangeMapping.set(e.sheet,t));let r=rk.calculateRangeKey(e.start,e.end);t.set(r,e)}removeVertexIfExists(e){let t=e.sheet,r=this.rangeMapping.get(t);if(void 0===r)return;let i=rk.calculateRangeKey(e.start,e.end);r.delete(i),0===r.size&&this.rangeMapping.delete(t)}getRangeVertex(e,t){let r=this.rangeMapping.get(e.sheet),i=rk.calculateRangeKey(e,t);return null==r?void 0:r.get(i)}getVertexOrThrow(e,t){let r=this.getRangeVertex(e,t);if(!r)throw Error("Range does not exist");return r}truncateRanges(e,t){let r=[],i=[],n=[],o=e.sheet;for(let[s,l]of this.entriesFromSheet(e.sheet)){let a=l.range;e.start<=t(l.range.end)&&(a.removeSpan(e),a.shouldBeRemoved()?(this.removeByKey(o,s),r.push(l)):i.push([s,l]),n.push(l))}let s=[];for(let[e,r]of(i.sort((e,r)=>rk.compareBy(e[1],r[1],t)),i)){let t=rk.calculateRangeKey(r.range.start,r.range.end);if(t===e)continue;let i=this.getByKey(o,t);this.removeByKey(o,e),void 0!==i&&r!=i?s.push([i,r]):this.addOrUpdateVertex(r)}return{verticesToRemove:r,verticesToMerge:s,verticesWithChangedSize:n}}moveAllRangesInSheetAfterAddingRows(e,t,r){return this.updateVerticesFromSheet(e,(e,i)=>t<=i.start.row?(i.range.shiftByRows(r),{changedSize:!1,vertex:i}):t>i.start.row&&t<=i.end.row?(i.range.expandByRows(r),{changedSize:!0,vertex:i}):void 0)}moveAllRangesInSheetAfterAddingColumns(e,t,r){return this.updateVerticesFromSheet(e,(e,i)=>t<=i.start.col?(i.range.shiftByColumns(r),{changedSize:!1,vertex:i}):t>i.start.col&&t<=i.end.col?(i.range.expandByColumns(r),{changedSize:!0,vertex:i}):void 0)}moveRangesInsideSourceRange(e,t,r,i){this.updateVerticesFromSheet(e.sheet,(n,o)=>e.containsRange(o.range)?(o.range.shiftByColumns(t),o.range.shiftByRows(r),o.range.moveToSheet(i),{changedSize:!1,vertex:o}):void 0)}*rangesInSheet(e){let t=this.rangeMapping.get(e);t&&(yield*t.values())}*rangeVerticesContainedInRange(e){for(let t of this.rangesInSheet(e.sheet))e.containsRange(t.range)&&(yield t)}findSmallerRange(e){if(e.height()>1&&Number.isFinite(e.height())){let t=r0(e.end.sheet,e.end.col,e.end.row-1),r=this.getRangeVertex(e.start,t);if(void 0!==r)return{smallerRangeVertex:r,restRange:r7.fromSimpleCellAddresses(r0(e.start.sheet,e.start.col,e.end.row),e.end)}}return{restRange:e}}static calculateRangeKey(e,t){return`${e.col},${e.row},${t.col},${t.row}`}static compareBy(e,t,r){let i=r(e.range.start),n=r(t.range.start);return i!==n?i-n:r(e.range.end)-r(t.range.end)}*entriesFromSheet(e){let t=this.rangeMapping.get(e);t&&(yield*t.entries())}removeByKey(e,t){let r=this.rangeMapping.get(e);if(!r)throw Error(`Sheet ${e} not found`);r.delete(t)}getByKey(e,t){var r;return null==(r=this.rangeMapping.get(e))?void 0:r.get(t)}updateVerticesFromSheet(e,t){let r=[];for(let[i,n]of this.entriesFromSheet(e)){let o=t(i,n);void 0!==o&&(this.removeByKey(e,i),r.push(o))}return r.forEach(e=>{this.addOrUpdateVertex(e.vertex)}),{verticesWithChangedSize:r.filter(e=>e.changedSize).map(e=>e.vertex)}}}class rH{constructor(e,t,r){this.functions=e,this.errors=t,this.ui=r,this._protectedTranslations={VERSION:"VERSION"},this.checkUI(),this.checkErrors(),this.checkFunctionTranslations(this.functions),Object.assign(this.functions,this._protectedTranslations)}extendFunctions(e){this.checkFunctionTranslations(e),Object.assign(this.functions,e)}buildFunctionMapping(){return Object.keys(this.functions).reduce((e,t)=>(e[this.functions[t]]=t,e),{})}buildErrorMapping(){return Object.keys(this.errors).reduce((e,t)=>(e[this.errors[t]]=t,e),{})}isFunctionTranslated(e){return void 0!==this.functions[e]}getFunctionTranslations(e){let t=[];for(let r of e)this.isFunctionTranslated(r)&&t.push(this.functions[r]);return t}getFunctionTranslation(e){let t=this.functions[e];if(void 0!==t)return t;throw new rl(`functions.${e}`)}getMaybeFunctionTranslation(e){return this.functions[e]}getErrorTranslation(e){if(e===d.LIC)return`#${d.LIC}!`;let t=this.errors[e];if(void 0!==t)return t;throw new rl(`errors.${e}`)}getUITranslation(e){let t=this.ui[e];if(void 0!==t)return t;throw new rl(`ui.${e}`)}checkUI(){for(let e of Object.values(h))if(!(e in this.ui))throw new rl(`ui.${e}`)}checkErrors(){for(let e of Object.values(d))if(!(e in this.errors)&&e!==d.LIC)throw new rl(`errors.${e}`)}checkFunctionTranslations(e){let t=new Set(Object.getOwnPropertyNames(e));for(let e of Object.getOwnPropertyNames(this._protectedTranslations))if(t.has(e))throw new ra(e)}}(h||(h={})).NEW_SHEET_PREFIX="NEW_SHEET_PREFIX";class r_{constructor(e,t,r=!1){this.id=e,this.displayName=t,this.isPlaceholder=r}get canonicalName(){return rP.canonicalizeSheetName(this.displayName)}}class rP{constructor(e){this.lastSheetId=-1,this.mappingFromCanonicalNameToId=new Map,this.allSheets=new Map,this.sheetNamePrefix=e.getUITranslation(h.NEW_SHEET_PREFIX)}static canonicalizeSheetName(e){return e.toLowerCase()}getSheetId(e,t={}){var r;return null==(r=this._getSheetByName(e,t))?void 0:r.id}getSheetIdOrThrowError(e){let t=this._getSheetByName(e,{});if(void 0===t)throw new tX(e);return t.id}getSheetName(e){var t;return null==(t=this._getSheet(e,{}))?void 0:t.displayName}getSheetNameOrThrowError(e,t={}){return this._getSheetOrThrowError(e,t).displayName}*iterateSheetNames(e={}){for(let t of this.allSheets.values())(e.includePlaceholders||!t.isPlaceholder)&&(yield t.displayName)}getSheetNames(e={}){return Array.from(this.iterateSheetNames(e))}numberOfSheets(e={}){return this.getSheetNames(e).length}hasSheetWithId(e,t={}){return void 0!==this._getSheet(e,t)}hasSheetWithName(e){return void 0!==this._getSheetByName(e,{})}addSheet(e=`${this.sheetNamePrefix}${this.lastSheetId+2}`){let t=this._getSheetByName(e,{includePlaceholders:!0});if(t){if(!t.isPlaceholder)throw new tQ(e);return t.isPlaceholder=!1,t.id}this.lastSheetId++;let r=new r_(this.lastSheetId,e);return this._storeSheetInMappings(r),r.id}addSheetWithId(e,t){let r=this._getSheetByName(t,{includePlaceholders:!0});if(r){if(r.id!==e||!r.isPlaceholder)throw new tQ(t);r.isPlaceholder=!1;return}e>this.lastSheetId&&(this.lastSheetId=e);let i=new r_(e,t);this._storeSheetInMappings(i)}addPlaceholderIfNotExists(e){let t=this._getSheetByName(e,{includePlaceholders:!0});if(t)return t.id;this.lastSheetId++;let r=new r_(this.lastSheetId,e,!0);return this._storeSheetInMappings(r),r.id}addPlaceholderWithId(e,t){if(this._getSheetByName(t,{includePlaceholders:!0}))throw new tQ(t);if(this.hasSheetWithId(e,{includePlaceholders:!0}))throw Error(`Sheet with id ${e} already exists`);e>this.lastSheetId&&(this.lastSheetId=e);let r=new r_(e,t,!0);this._storeSheetInMappings(r)}removeSheetIfExists(e,t={}){let r=this._getSheet(e,t);return!!r&&(this.allSheets.delete(e),this.mappingFromCanonicalNameToId.delete(r.canonicalName),e===this.lastSheetId&&this.lastSheetId--,!0)}markSheetAsPlaceholder(e){this._getSheetOrThrowError(e,{}).isPlaceholder=!0}renameSheet(e,t){let r,i=this._getSheetOrThrowError(e,{}),n=i.displayName;if(n===t)return{previousDisplayName:void 0};let o=this._getSheetByName(t,{includePlaceholders:!0});if(void 0!==o&&o.id!==i.id)if(o.isPlaceholder)this.mappingFromCanonicalNameToId.delete(o.canonicalName),this.allSheets.delete(o.id),o.id===this.lastSheetId&&this.lastSheetId--,r=o.id;else throw new tQ(t);let s=i.canonicalName;return this.mappingFromCanonicalNameToId.delete(s),i.displayName=t,this._storeSheetInMappings(i),{previousDisplayName:n,mergedWithPlaceholderSheet:r}}_storeSheetInMappings(e){this.allSheets.set(e.id,e),this.mappingFromCanonicalNameToId.set(e.canonicalName,e.id)}_getSheet(e,t){let r=this.allSheets.get(e);if(void 0!==r)return t.includePlaceholders||!r.isPlaceholder?r:void 0}_getSheetByName(e,t){let r=this.mappingFromCanonicalNameToId.get(rP.canonicalizeSheetName(e));if(void 0!==r)return this._getSheet(r,t)}_getSheetOrThrowError(e,t){let r=this._getSheet(e,t);if(void 0===r)throw new tq(e);return r}}class rD{constructor(e,t){this.sheetMapping=e,this.addressMapping=t}ensureSheetRegistered(e){let t=this.sheetMapping.addPlaceholderIfNotExists(e);return this.addressMapping.addSheetStrategyPlaceholderIfNotExists(t),t}}function rL(e){if(!Array.isArray(e))throw new t1("an array of arrays.");for(let t=0;t<e.length;t++)if(!Array.isArray(e[t]))throw new t1("an array of arrays.")}function rF(e){let t=0,r=0,i=0;for(let n=0;n<e.length;n++){let o=0;for(let t=0;t<e[n].length;t++)null!=e[n][t]&&(o=t+1,++i);t=Math.max(t,o),o>0&&(r=n+1)}let n=t*r;return{height:r,width:t,fill:0===n?0:i/n}}class rB{constructor(e,t,r,i,n,o,s,l){this.addressMapping=e,this.rangeMapping=t,this.sheetMapping=r,this.arrayMapping=i,this.stats=n,this.lazilyTransformingAstService=o,this.functionRegistry=s,this.namedExpressions=l,this.changes=tB.empty(),this.dependencyQueryAddresses=e=>{if(e instanceof rA)return this.rangeDependencyQuery(e).map(([e,t])=>e);{let t=this.formulaDependencyQuery(e);if(void 0===t)return[];{let[e,r]=t;return r.map(t=>t instanceof tT?this.namedExpressions.namedExpressionOrPlaceholder(t.name,e.sheet).address:r6(t)?t:r9(t.start,t.end))}}},this.dependencyQueryVertices=e=>{if(e instanceof rA)return this.rangeDependencyQuery(e);{let t=this.formulaDependencyQuery(e);if(void 0===t)return[];{let[e,r]=t;return r.map(t=>{if(t instanceof r7)return[t.start,this.rangeMapping.getVertexOrThrow(t.start,t.end)];if(!(t instanceof tT))return[t,this.addressMapping.getCellOrThrow(t)];{let r=this.namedExpressions.namedExpressionOrPlaceholder(t.name,e.sheet);return[r.address,this.addressMapping.getCellOrThrow(r.address)]}})}}},this.rangeDependencyQuery=e=>{let t,r=[],{smallerRangeVertex:i,restRange:n}=this.rangeMapping.findSmallerRange(e.range);for(let o of(void 0!==i&&this.graph.adjacentNodes(i).has(e)?(t=n,r.push([new r7(i.start,i.end),i])):t=e.range,t.addresses(this))){let e=this.addressMapping.getCell(o);void 0!==e&&r.push([o,e])}return r},this.formulaDependencyQuery=e=>{let t;return e instanceof rE?(t=e.getAddress(this.lazilyTransformingAstService),[t,tx(tC(e.getFormula(this.lazilyTransformingAstService),this.functionRegistry),t)]):void 0},this.graph=new rO(this.dependencyQueryVertices),this.sheetReferenceRegistrar=new rD(r,e)}static buildEmpty(e,t,r,i,n){return new rB(new rw(t.chooseAddressMappingPolicy),new rk,new rP(t.translationPackage),new ry,n,e,r,i)}setFormulaToCell(e,t,r,i,n,o){let s=rE.fromAst(t,e,i,this.lazilyTransformingAstService.version());return this.exchangeOrAddFormulaVertex(s),this.processCellDependencies(r,s),this.graph.markNodeAsDirty(s),n&&this.markAsVolatile(s),o&&this.markAsDependentOnStructureChange(s),this.correctInfiniteRangesDependency(e),this.getAndClearContentChanges()}setParsingErrorToCell(e,t){let r=this.shrinkPossibleArrayAndGetCell(e);return this.exchangeOrAddGraphNode(r,t),this.addressMapping.setCell(e,t),this.graph.markNodeAsDirty(t),this.correctInfiniteRangesDependency(e),this.getAndClearContentChanges()}setValueToCell(e,t){let r=this.shrinkPossibleArrayAndGetCell(e);if(r instanceof rT&&this.arrayMapping.removeArray(r.getRange()),r instanceof rz)r.getValues().rawValue!==t.rawValue&&(r.setValues(t),this.graph.markNodeAsDirty(r));else{let i=new rz(t.parsedValue,t.rawValue);this.exchangeOrAddGraphNode(r,i),this.addressMapping.setCell(e,i),this.graph.markNodeAsDirty(i)}return this.correctInfiniteRangesDependency(e),this.getAndClearContentChanges()}setCellEmpty(e){let t=this.shrinkPossibleArrayAndGetCell(e);if(void 0===t)return tB.empty();if(this.graph.adjacentNodes(t).size>0){let r=new rV;this.exchangeGraphNode(t,r),0===this.graph.adjacentNodesCount(r)?(this.removeVertex(r),this.addressMapping.removeCell(e)):(this.graph.markNodeAsDirty(r),this.addressMapping.setCell(e,r))}else this.removeVertex(t),this.addressMapping.removeCell(e);return this.getAndClearContentChanges()}clearDirtyVertices(){this.graph.clearDirtyNodes()}verticesToRecompute(){return this.graph.getDirtyAndVolatileNodes()}processCellDependencies(e,t){let r=t.idInGraph;if(void 0===r)throw Error("End vertex not found");e.forEach(e=>{if(e instanceof r7){let t=this.getRange(e.start,e.end);void 0===t&&(t=new rA(e),this.rangeMapping.addOrUpdateVertex(t)),this.graph.addNodeIfNotExists(t);let i=t.idInGraph;if(void 0===i)throw Error("Range vertex not found");e.isFinite()||this.graph.markNodeAsInfiniteRange(i);let{smallerRangeVertex:n,restRange:o}=this.rangeMapping.findSmallerRange(e);if(void 0!==n){if(this.graph.addEdge(n,i),t.bruteForce)for(let r of(t.bruteForce=!1,e.addresses(this)))this.graph.removeEdge(this.fetchCell(r),i)}else t.bruteForce=!0;let s=this.arrayMapping.getArray(o);if(void 0!==s)this.graph.addEdge(s,i);else for(let e of o.addresses(this)){let{vertex:t,id:r}=this.fetchCellOrCreateEmpty(e);this.graph.addEdge(null!=r?r:t,i)}this.graph.addEdge(i,r),e.isFinite()&&this.correctInfiniteRangesDependenciesByRangeVertex(t)}else if(e instanceof tT){let i=t.getAddress(this.lazilyTransformingAstService).sheet,{vertex:n,id:o}=this.fetchNamedExpressionVertex(e.name,i);this.graph.addEdge(null!=o?o:n,r)}else{let{vertex:t,id:i}=this.fetchCellOrCreateEmpty(e);this.graph.addEdge(null!=i?i:t,r)}})}fetchNamedExpressionVertex(e,t){let r=this.namedExpressions.namedExpressionOrPlaceholder(e,t);return this.fetchCellOrCreateEmpty(r.address)}exchangeNode(e,t){let r=this.fetchCellOrCreateEmpty(e).vertex,i=this.fetchCellOrCreateEmpty(t).vertex;this.addressMapping.removeCell(e),this.exchangeGraphNode(r,i)}fetchCellOrCreateEmpty(e){let t=this.addressMapping.getCell(e);if(void 0!==t)return{vertex:t,id:void 0};let r=new rV,i=this.graph.addNodeIfNotExists(r);return this.addressMapping.setCell(e,r),{vertex:r,id:i}}removeRows(e){this.stats.measure(l.ADJUSTING_GRAPH,()=>{for(let[t,r]of this.addressMapping.entriesFromRowsSpan(e)){for(let e of this.graph.adjacentNodes(r))this.graph.markNodeAsDirty(e);if(r instanceof rT)if(!r.isLeftCorner(t))continue;else this.shrinkArrayToCorner(r),this.arrayMapping.removeArray(r.getRange());this.removeVertex(r)}}),this.stats.measure(l.ADJUSTING_ADDRESS_MAPPING,()=>{this.addressMapping.removeRows(e)});let t=this.stats.measure(l.ADJUSTING_RANGES,()=>{let t=this.truncateRanges(e,e=>e.row);return this.getArrayVerticesRelatedToRanges(t)});return this.stats.measure(l.ADJUSTING_ARRAY_MAPPING,()=>{this.fixArraysAfterRemovingRows(e.sheet,e.rowStart,e.numberOfRows)}),this.addStructuralNodesToChangeSet(),{affectedArrays:t,contentChanges:this.getAndClearContentChanges()}}addSheet(e){this.addressMapping.addSheetOrChangeStrategy(e,rF([])),this.stats.measure(l.ADJUSTING_ADDRESS_MAPPING,()=>{this.markAllCellsAsDirtyInSheet(e)}),this.stats.measure(l.ADJUSTING_RANGES,()=>{this.markAllRangesAsDirtyInSheet(e)})}removeSheet(e){this.clearSheet(e);let t=!this.addressMapping.hasAnyEntries(e),r=0===this.rangeMapping.getNumberOfRangesInSheet(e);t&&r?(this.sheetMapping.removeSheetIfExists(e),this.addressMapping.removeSheetIfExists(e)):this.sheetMapping.markSheetAsPlaceholder(e)}mergeSheets(e,t){if(!this.isPlaceholder(t))throw Error(`Cannot merge sheets: sheet ${t} is not a placeholder`);this.mergeRangeVertices(e,t),this.mergeCellVertices(e,t),this.addressMapping.removeSheetIfExists(t),this.addStructuralNodesToChangeSet()}clearSheet(e){let t=new Set;for(let[r,i]of this.addressMapping.sheetEntries(e))i instanceof rT?t.add(i):this.setCellEmpty(r);for(let e of t.values())this.setArrayEmpty(e);this.addStructuralNodesToChangeSet()}removeColumns(e){this.stats.measure(l.ADJUSTING_GRAPH,()=>{for(let[t,r]of this.addressMapping.entriesFromColumnsSpan(e)){for(let e of this.graph.adjacentNodes(r))this.graph.markNodeAsDirty(e);if(r instanceof rT)if(!r.isLeftCorner(t))continue;else this.shrinkArrayToCorner(r),this.arrayMapping.removeArray(r.getRange());this.removeVertex(r)}}),this.stats.measure(l.ADJUSTING_ADDRESS_MAPPING,()=>{this.addressMapping.removeColumns(e)});let t=this.stats.measure(l.ADJUSTING_RANGES,()=>{let t=this.truncateRanges(e,e=>e.col);return this.getArrayVerticesRelatedToRanges(t)});return this.stats.measure(l.ADJUSTING_ARRAY_MAPPING,()=>this.fixArraysAfterRemovingColumns(e.sheet,e.columnStart,e.numberOfColumns)),this.addStructuralNodesToChangeSet(),{affectedArrays:t,contentChanges:this.getAndClearContentChanges()}}addRows(e){this.stats.measure(l.ADJUSTING_ADDRESS_MAPPING,()=>{this.addressMapping.addRows(e.sheet,e.rowStart,e.numberOfRows)});let t=this.stats.measure(l.ADJUSTING_RANGES,()=>{let t=this.rangeMapping.moveAllRangesInSheetAfterAddingRows(e.sheet,e.rowStart,e.numberOfRows);return this.fixRangesWhenAddingRows(e.sheet,e.rowStart,e.numberOfRows),this.getArrayVerticesRelatedToRanges(t.verticesWithChangedSize)});for(let t of(this.stats.measure(l.ADJUSTING_ARRAY_MAPPING,()=>{this.fixArraysAfterAddingRow(e.sheet,e.rowStart,e.numberOfRows)}),this.addressMapping.verticesFromRowsSpan(e)))this.graph.markNodeAsDirty(t);return this.addStructuralNodesToChangeSet(),{affectedArrays:t}}addColumns(e){this.stats.measure(l.ADJUSTING_ADDRESS_MAPPING,()=>{this.addressMapping.addColumns(e.sheet,e.columnStart,e.numberOfColumns)});let t=this.stats.measure(l.ADJUSTING_RANGES,()=>{let t=this.rangeMapping.moveAllRangesInSheetAfterAddingColumns(e.sheet,e.columnStart,e.numberOfColumns);return this.fixRangesWhenAddingColumns(e.sheet,e.columnStart,e.numberOfColumns),this.getArrayVerticesRelatedToRanges(t.verticesWithChangedSize)});for(let t of(this.stats.measure(l.ADJUSTING_ARRAY_MAPPING,()=>this.fixArraysAfterAddingColumn(e.sheet,e.columnStart,e.numberOfColumns)),this.addressMapping.verticesFromColumnsSpan(e)))this.graph.markNodeAsDirty(t);return this.addStructuralNodesToChangeSet(),{affectedArrays:t,contentChanges:this.getAndClearContentChanges()}}isThereSpaceForArray(e){let t=e.getRangeOrUndef();if(void 0===t)return!1;for(let r of t.addresses(this)){let t=this.addressMapping.getCell(r);if(void 0!==t&&!(t instanceof rV)&&t!==e)return!1}return!0}moveCells(e,t,r,i){for(let n of e.addressesWithDirection(t,r,this)){let o=r0(i,n.col+t,n.row+r),s=this.addressMapping.getCell(n),l=this.addressMapping.getCell(o);if(this.addressMapping.removeCell(n),void 0!==s){let t;for(let r of(this.graph.markNodeAsDirty(s),this.addressMapping.setCell(o,s),this.graph.adjacentNodes(s)))r instanceof rA&&!e.containsRange(r.range)&&(t=null!=t?t:this.fetchCellOrCreateEmpty(n).vertex,this.graph.addEdge(t,r),this.graph.removeEdge(s,r));t&&(this.graph.markNodeAsDirty(t),this.addressMapping.setCell(n,t))}if(void 0!==l){for(let e of(void 0===s&&this.addressMapping.removeCell(o),this.graph.adjacentNodes(l)))s=null!=s?s:this.fetchCellOrCreateEmpty(o).vertex,this.graph.addEdge(s,e),this.graph.markNodeAsDirty(s);this.removeVertex(l)}}for(let t of this.rangeMapping.rangeVerticesContainedInRange(e))for(let r of this.graph.adjacentNodes(t))if(r instanceof rA&&!e.containsRange(r.range))for(let e of(this.graph.removeEdge(t,r),t.range.addresses(this))){let{vertex:t,id:i}=this.fetchCellOrCreateEmpty(e);this.graph.addEdge(null!=i?i:t,r),this.addressMapping.setCell(e,t),this.graph.markNodeAsDirty(t)}this.rangeMapping.moveRangesInsideSourceRange(e,t,r,i)}setArrayEmpty(e){let t=r7.spanFrom(e.getAddress(this.lazilyTransformingAstService),e.width,e.height),r=this.graph.adjacentNodes(e);for(let e of t.addresses(this))this.addressMapping.removeCell(e);for(let t of r.values()){let r=rM(this.functionRegistry,t,e.getRange(),this.lazilyTransformingAstService,this);for(let e of r){let{vertex:r,id:i}=this.fetchCellOrCreateEmpty(e);this.graph.addEdge(null!=i?i:r,t)}r.length>0&&this.graph.markNodeAsDirty(t)}this.removeVertex(e),this.arrayMapping.removeArray(e.getRange())}addVertex(e,t){this.graph.addNodeIfNotExists(t),this.addressMapping.setCell(e,t)}addArrayVertex(e,t){this.graph.addNodeIfNotExists(t),this.setAddressMappingForArrayVertex(t,e)}*arrayFormulaNodes(){for(let e of this.graph.getNodes())e instanceof rT&&(yield e)}*entriesFromRowsSpan(e){yield*this.addressMapping.entriesFromRowsSpan(e)}*entriesFromColumnsSpan(e){yield*this.addressMapping.entriesFromColumnsSpan(e)}fetchCell(e){return this.addressMapping.getCellOrThrow(e)}getCell(e){return this.addressMapping.getCell(e,{throwIfSheetNotExists:!0})}getCellValue(e){return this.isPlaceholder(e.sheet)?new rq(d.REF,eY.SheetRef):this.addressMapping.getCellValue(e)}getRawValue(e){return this.isPlaceholder(e.sheet)?null:this.addressMapping.getRawValue(e)}getScalarValue(e){if(this.isPlaceholder(e.sheet))return new rq(d.REF,eY.SheetRef);let t=this.addressMapping.getCellValue(e);return t instanceof tF?new rq(d.VALUE,eY.ScalarExpected):t}existsEdge(e,t){return this.graph.existsEdge(e,t)}getSheetId(e){return this.sheetMapping.getSheetIdOrThrowError(e)}getSheetHeight(e){return this.addressMapping.getSheetHeight(e)}getSheetWidth(e){return this.addressMapping.getSheetWidth(e)}getArray(e){return this.arrayMapping.getArray(e)}getRange(e,t){return this.rangeMapping.getRangeVertex(e,t)}topSortWithScc(){return this.graph.topSortWithScc()}markAsVolatile(e){this.graph.markNodeAsVolatile(e)}markAsDependentOnStructureChange(e){this.graph.markNodeAsChangingWithStructure(e)}forceApplyPostponedTransformations(){for(let e of this.graph.getNodes())e instanceof rx&&e.ensureRecentData(this.lazilyTransformingAstService)}*rawValuesFromRange(e){for(let t of e.addresses(this)){let e=this.getScalarValue(t);e!==tA&&(yield[tM(e),t])}}computeListOfValuesInRange(e){let t=[];for(let r of e.addresses(this)){let e=this.getScalarValue(r);t.push(e)}return t}shrinkArrayToCorner(e){for(let t of(this.cleanAddressMappingUnderArray(e),this.adjacentArrayVertices(e))){let r;r=t instanceof rE?this.formulaDirectDependenciesToArray(t,e):this.rangeDirectDependenciesToArray(t,e);let i=!1;for(let[n,o]of r)e.isLeftCorner(n)&&(i=!0),this.graph.addEdge(o,t),this.graph.markNodeAsDirty(o);i||this.graph.removeEdge(e,t)}this.graph.markNodeAsDirty(e)}isArrayInternalCell(e){let t=this.getCell(e);return t instanceof rT&&!t.isLeftCorner(e)}getAndClearContentChanges(){let e=this.changes;return this.changes=tB.empty(),e}getAdjacentNodesAddresses(e){let t=this.graph.adjacentNodes(e),r=[];return t.forEach(e=>{e instanceof rA?r.push(r9(e.start,e.end)):e instanceof rE&&r.push(e.getAddress(this.lazilyTransformingAstService))}),r}markAllCellsAsDirtyInSheet(e){for(let[,t]of this.addressMapping.sheetEntries(e))this.graph.markNodeAsDirty(t)}markAllRangesAsDirtyInSheet(e){for(let t of this.rangeMapping.rangesInSheet(e))this.graph.markNodeAsDirty(t)}mergeRangeVertices(e,t){for(let r of Array.from(this.rangeMapping.rangesInSheet(t))){if(!this.graph.hasNode(r))continue;let i=r.start,n=r.end;if(i.sheet!==t&&n.sheet!==t)continue;let o=r0(e,i.col,i.row),s=r0(e,n.col,n.row),l=this.rangeMapping.getRangeVertex(o,s);l?(this.rerouteDependents(r,l),this.removeVertexAndRerouteDependencies(r,l),this.rangeMapping.removeVertexIfExists(r),this.graph.markNodeAsDirty(l)):(this.rangeMapping.removeVertexIfExists(r),r.range.moveToSheet(e),this.rangeMapping.addOrUpdateVertex(r),this.graph.markNodeAsDirty(r))}}mergeCellVertices(e,t){for(let[r,i]of Array.from(this.addressMapping.sheetEntries(t))){let t=r0(e,r.col,r.row),n=this.getCell(t);n?(this.rerouteDependents(i,n),this.removeVertexAndCleanupDependencies(i),this.addressMapping.removeCell(r),this.graph.markNodeAsDirty(n)):(this.addressMapping.moveCell(r,t),this.graph.markNodeAsDirty(i))}}isPlaceholder(e){return e!==tW.SHEET_FOR_WORKBOOK_EXPRESSIONS&&!this.sheetMapping.hasSheetWithId(e,{includePlaceholders:!1})}exchangeGraphNode(e,t){this.graph.addNodeIfNotExists(t);let r=this.graph.adjacentNodes(e);this.removeVertex(e),r.forEach(e=>{this.graph.hasNode(e)&&this.graph.addEdge(t,e)})}setArray(e,t){this.arrayMapping.setArray(e,t)}correctInfiniteRangesDependency(e){let t=this.graph.getInfiniteRanges().filter(t=>t.range.addressInRange(e));if(t.length<=0)return;let{vertex:r,id:i}=this.fetchCellOrCreateEmpty(e),n=null!=i?i:r.idInGraph;if(void 0===n)throw Error("Vertex not found");t.forEach(e=>{this.graph.addEdge(n,e)})}exchangeOrAddGraphNode(e,t){e?this.exchangeGraphNode(e,t):this.graph.addNodeIfNotExists(t)}getArrayVerticesRelatedToRanges(e){let t=new Set;return e.forEach(e=>{this.graph.hasNode(e)&&this.graph.adjacentNodes(e).forEach(e=>{e instanceof rT&&t.add(e)})}),t}correctInfiniteRangesDependenciesByRangeVertex(e){this.graph.getInfiniteRanges().forEach(t=>{let r=e.range.intersectionWith(t.range);void 0!==r&&r.addresses(this).forEach(e=>{let{vertex:r,id:i}=this.fetchCellOrCreateEmpty(e);this.graph.addEdge(null!=i?i:r,t)})})}cleanAddressMappingUnderArray(e){for(let t of e.getRange().addresses(this)){let r=e.getArrayCellValue(t);this.getCell(t)===e?e.isLeftCorner(t)?this.changes.addChange(new rq(d.REF),t,r):(this.addressMapping.removeCell(t),this.changes.addChange(tA,t,r)):this.changes.addChange(tA,t,r)}}*formulaDirectDependenciesToArray(e,t){var r;let[,i]=null!=(r=this.formulaDependencyQuery(e))?r:[];if(void 0!==i){for(let e of i)if(!(e instanceof tT)&&!(e instanceof r7)&&t.getRange().addressInRange(e)){let t=this.fetchCellOrCreateEmpty(e).vertex;yield[e,t]}}}*rangeDirectDependenciesToArray(e,t){let{restRange:r}=this.rangeMapping.findSmallerRange(e.range);for(let e of r.addresses(this))if(t.getRange().addressInRange(e)){let t=this.fetchCellOrCreateEmpty(e).vertex;yield[e,t]}}*adjacentArrayVertices(e){for(let t of this.graph.adjacentNodes(e))(t instanceof rE||t instanceof rA)&&(yield t)}addStructuralNodesToChangeSet(){this.graph.markChangingWithStructureNodesAsDirty()}fixRangesWhenAddingRows(e,t,r){for(let i of Array.from(this.rangeMapping.rangesInSheet(e)))if(i.range.includesRow(t+r))if(i.bruteForce)for(let e of i.range.rangeWithSameWidth(t,r).addresses(this)){let{vertex:t,id:r}=this.fetchCellOrCreateEmpty(e);this.graph.addEdge(null!=r?r:t,i)}else{let e=i,t=this.rangeMapping.findSmallerRange(e.range);if(void 0!==t.smallerRangeVertex)continue;for(;void 0===t.smallerRangeVertex;){let r=new rA(r7.spanFrom(e.range.start,e.range.width(),e.range.height()-1));this.rangeMapping.addOrUpdateVertex(r),this.graph.addNodeIfNotExists(r);let i=new r7(r0(e.range.start.sheet,e.range.start.col,e.range.end.row),e.range.end);this.addAllFromRange(i,e),this.graph.addEdge(r,e),e=r,t=this.rangeMapping.findSmallerRange(e.range)}this.graph.addEdge(t.smallerRangeVertex,e),this.addAllFromRange(t.restRange,e),this.graph.removeEdge(t.smallerRangeVertex,i)}}addAllFromRange(e,t){for(let r of e.addresses(this)){let{vertex:e,id:i}=this.fetchCellOrCreateEmpty(r);this.graph.addEdge(null!=i?i:e,t)}}fixRangesWhenAddingColumns(e,t,r){for(let i of this.rangeMapping.rangesInSheet(e))if(i.range.includesColumn(t+r)){for(let n of(i.bruteForce?i.range.rangeWithSameHeight(t,r):r7.spanFrom(r0(e,t,i.range.end.row),r,1)).addresses(this)){let{vertex:e,id:t}=this.fetchCellOrCreateEmpty(n);this.graph.addEdge(null!=t?t:e,i)}}}exchangeOrAddFormulaVertex(e){let t=e.getAddress(this.lazilyTransformingAstService),r=r7.spanFrom(t,e.width,e.height),i=this.shrinkPossibleArrayAndGetCell(t);if(e instanceof rT&&this.setArray(r,e),this.exchangeOrAddGraphNode(i,e),this.addressMapping.setCell(t,e),e instanceof rT){if(!this.isThereSpaceForArray(e))return;for(let t of r.addresses(this)){if(e.isLeftCorner(t))continue;let r=this.getCell(t);this.exchangeOrAddGraphNode(r,e)}}for(let t of r.addresses(this))this.addressMapping.setCell(t,e)}setAddressMappingForArrayVertex(e,t){if(this.addressMapping.setCell(t,e),!(e instanceof rT))return;let r=r7.spanFromOrUndef(t,e.width,e.height);if(void 0!==r&&(this.setArray(r,e),this.isThereSpaceForArray(e)))for(let t of r.addresses(this))this.addressMapping.setCell(t,e)}truncateRanges(e,t){let{verticesToRemove:r,verticesToMerge:i,verticesWithChangedSize:n}=this.rangeMapping.truncateRanges(e,t);for(let[e,t]of i)this.rerouteDependents(t,e),this.removeVertexAndCleanupDependencies(t);for(let e of r)this.removeVertexAndCleanupDependencies(e);return n}fixArraysAfterAddingRow(e,t,r){if(this.arrayMapping.moveArrayVerticesAfterRowByRows(e,t,r),!(t<=0))for(let[,i]of this.arrayMapping.arraysInRows(tG.fromRowStartAndEnd(e,t-1,t-1))){let n=i.getRange();for(let o=n.start.col;o<=n.end.col;++o)for(let s=t;s<=n.end.row;++s){let t=r0(e,o,s),n=r0(e,o,s+r),l=i.getArrayCellValue(t);this.addressMapping.moveCell(n,t),this.changes.addChange(tA,n,l)}}}fixArraysAfterRemovingRows(e,t,r){if(this.arrayMapping.moveArrayVerticesAfterRowByRows(e,t,-r),!(t<=0))for(let[,r]of this.arrayMapping.arraysInRows(tG.fromRowStartAndEnd(e,t-1,t-1)))if(this.isThereSpaceForArray(r))for(let e of r.getRange().addresses(this))this.addressMapping.setCell(e,r);else this.setNoSpaceIfArray(r)}fixArraysAfterAddingColumn(e,t,r){if(this.arrayMapping.moveArrayVerticesAfterColumnByColumns(e,t,r),!(t<=0))for(let[,i]of this.arrayMapping.arraysInCols(tj.fromColumnStartAndEnd(e,t-1,t-1))){let n=i.getRange();for(let o=n.start.row;o<=n.end.row;++o)for(let s=t;s<=n.end.col;++s){let t=r0(e,s,o),n=r0(e,s+r,o),l=i.getArrayCellValue(t);this.addressMapping.moveCell(n,t),this.changes.addChange(tA,n,l)}}}fixArraysAfterRemovingColumns(e,t,r){if(this.arrayMapping.moveArrayVerticesAfterColumnByColumns(e,t,-r),!(t<=0))for(let[,r]of this.arrayMapping.arraysInCols(tj.fromColumnStartAndEnd(e,t-1,t-1)))if(this.isThereSpaceForArray(r))for(let e of r.getRange().addresses(this))this.addressMapping.setCell(e,r);else this.setNoSpaceIfArray(r)}shrinkPossibleArrayAndGetCell(e){let t=this.getCell(e);return t instanceof rT?(this.setNoSpaceIfArray(t),this.getCell(e)):t}setNoSpaceIfArray(e){e instanceof rT&&(this.shrinkArrayToCorner(e),e.setNoSpace())}removeVertex(e){this.removeVertexAndCleanupDependencies(e),e instanceof rA&&this.rangeMapping.removeVertexIfExists(e)}rerouteDependents(e,t){let r=this.graph.adjacentNodes(e);this.graph.removeEdgeIfExists(t,e),r.forEach(e=>{this.graph.hasNode(e)&&this.graph.addEdge(t,e)})}removeVertexAndRerouteDependencies(e,t){let r=this.graph.removeNode(e);this.graph.removeEdgeIfExists(t,e),r.forEach(([e,r])=>{this.graph.hasNode(r)&&this.graph.addEdge(r,t)})}removeVertexAndCleanupDependencies(e){let t=new Set(this.graph.removeNode(e)),r=new Set;for(;t.size>0;){let e=t.values().next().value;t.delete(e);let[i,n]=e;this.graph.hasNode(n)&&0===this.graph.adjacentNodesCount(n)&&((n instanceof rA||n instanceof rV)&&this.graph.removeNode(n).forEach(e=>t.add(e)),n instanceof rA?(this.rangeMapping.removeVertexIfExists(n),r.add(n.sheet)):n instanceof rV&&r6(i)&&(this.addressMapping.removeCell(i),r.add(i.sheet)))}this.cleanupPlaceholderSheets(r)}cleanupPlaceholderSheets(e){for(let t of e)this.isPlaceholder(t)&&!this.addressMapping.hasAnyEntries(t)&&0===this.rangeMapping.getNumberOfRangesInSheet(t)&&(this.sheetMapping.removeSheetIfExists(t,{includePlaceholders:!0}),this.addressMapping.removeSheetIfExists(t))}}class rV extends rR{constructor(){super()}getCellValue(){return tA}}class rz extends rR{constructor(e,t){super(),this.parsedValue=e,this.rawValue=t}getValues(){return{parsedValue:this.parsedValue,rawValue:this.rawValue}}setValues(e){this.parsedValue=e.parsedValue,this.rawValue=e.rawValue}getCellValue(){return this.parsedValue}}class rU extends rR{constructor(e,t){super(),this.errors=e,this.rawInput=t}getCellValue(){let e=this.errors.map(e=>e.message).find(e=>e);return rq.parsingError(e)}getFormula(){return this.rawInput}}class rW{constructor(e,t){this.width=e,this.height=t,this.mapping=new Map}getCell(e){var t;return null==(t=this.mapping.get(e.col))?void 0:t.get(e.row)}setCell(e,t){this.width=Math.max(this.width,e.col+1),this.height=Math.max(this.height,e.row+1);let r=this.mapping.get(e.col);r||(r=new Map,this.mapping.set(e.col,r)),r.set(e.row,t)}has(e){var t;return!!(null==(t=this.mapping.get(e.col))?void 0:t.get(e.row))}getHeight(){return this.height}getWidth(){return this.width}removeCell(e){var t;null==(t=this.mapping.get(e.col))||t.delete(e.row)}addRows(e,t){this.mapping.forEach(r=>{let i=new Map;r.forEach((n,o)=>{o>=e&&(i.set(o+t,n),r.delete(o))}),i.forEach((e,t)=>{r.set(t,e)})}),this.height+=t}addColumns(e,t){let r=new Map;this.mapping.forEach((i,n)=>{n>=e&&(r.set(n+t,i),this.mapping.delete(n))}),r.forEach((e,t)=>{this.mapping.set(t,e)}),this.width+=t}removeRows(e){this.mapping.forEach(t=>{let r=new Map;t.forEach((i,n)=>{n>=e.rowStart&&(t.delete(n),n>e.rowEnd&&r.set(n-e.numberOfRows,i))}),r.forEach((e,r)=>{t.set(r,e)})});let t=Math.max(0,Math.min(this.height-1,e.rowEnd)-e.rowStart+1);this.height=Math.max(0,this.height-t)}removeColumns(e){let t=new Map;this.mapping.forEach((r,i)=>{i>=e.columnStart&&(this.mapping.delete(i),i>e.columnEnd&&t.set(i-e.numberOfColumns,r))}),t.forEach((e,t)=>{this.mapping.set(t,e)});let r=Math.max(0,Math.min(this.width-1,e.columnEnd)-e.columnStart+1);this.width=Math.max(0,this.width-r)}*getEntries(e){for(let[t,r]of this.mapping)for(let[i,n]of r)yield[r0(e,t,i),n]}*verticesFromColumn(e){let t=this.mapping.get(e);if(void 0!==t)for(let[e,r]of t)yield r}*verticesFromRow(e){for(let t of this.mapping.values()){let r=t.get(e);void 0!==r&&(yield r)}}*verticesFromColumnsSpan(e){for(let t of e.columns()){let e=this.mapping.get(t);if(void 0!==e)for(let[t,r]of e)yield r}}*verticesFromRowsSpan(e){for(let t of this.mapping.values())for(let r of e.rows()){let e=t.get(r);void 0!==e&&(yield e)}}*entriesFromRowsSpan(e){for(let[t,r]of this.mapping.entries())for(let i of e.rows()){let n=r.get(i);void 0!==n&&(yield[r0(e.sheet,t,i),n])}}*entriesFromColumnsSpan(e){for(let t of e.columns()){let r=this.mapping.get(t);if(void 0!==r)for(let[i,n]of r.entries())yield[r0(e.sheet,t,i),n]}}*vertices(){for(let[e,t]of this.mapping)for(let[e,r]of t)void 0!==r&&(yield r)}}class r${constructor(e,t){this.width=e,this.height=t,this.mapping=Array(t);for(let r=0;r<t;r++)this.mapping[r]=Array(e)}getCell(e){return this.getCellVertex(e.col,e.row)}setCell(e,t){this.width=Math.max(this.width,e.col+1),this.height=Math.max(this.height,e.row+1),this.mapping[e.row]||(this.mapping[e.row]=Array(this.width)),this.mapping[e.row][e.col]=t}has(e){let t=this.mapping[e.row];return!!t&&!!t[e.col]}getHeight(){return this.height}getWidth(){return this.width}removeCell(e){void 0!==this.mapping[e.row]&&delete this.mapping[e.row][e.col]}addRows(e,t){let r=[];for(let e=0;e<t;e++)r.push(Array(this.width));this.mapping.splice(e,0,...r),this.height+=t}addColumns(e,t){for(let r=0;r<this.height;r++)void 0!==this.mapping[r]&&this.mapping[r].splice(e,0,...Array(t));this.width+=t}removeRows(e){this.mapping.splice(e.rowStart,e.numberOfRows);let t=Math.max(0,Math.min(this.height-1,e.rowEnd)-e.rowStart+1);this.height=Math.max(0,this.height-t)}removeColumns(e){for(let t=0;t<this.height;t++)void 0!==this.mapping[t]&&this.mapping[t].splice(e.columnStart,e.numberOfColumns);let t=Math.max(0,Math.min(this.width-1,e.columnEnd)-e.columnStart+1);this.width=Math.max(0,this.width-t)}*getEntries(e){for(let t=0;t<this.height;++t)for(let r=0;r<this.width;++r){let i=this.getCellVertex(r,t);i&&(yield[r0(e,r,t),i])}}*verticesFromColumn(e){for(let t=0;t<this.height;++t){let r=this.getCellVertex(e,t);r&&(yield r)}}*verticesFromRow(e){for(let t=0;t<this.width;++t){let r=this.getCellVertex(t,e);r&&(yield r)}}*verticesFromColumnsSpan(e){for(let t=e.columnStart;t<=e.columnEnd;++t)for(let e=0;e<this.height;++e){let r=this.getCellVertex(t,e);r&&(yield r)}}*verticesFromRowsSpan(e){for(let t=0;t<this.width;++t)for(let r=e.rowStart;r<=e.rowEnd;++r){let e=this.getCellVertex(t,r);e&&(yield e)}}*entriesFromRowsSpan(e){for(let t=0;t<this.width;++t)for(let r=e.rowStart;r<=e.rowEnd;++r){let i=this.getCellVertex(t,r);i&&(yield[r0(e.sheet,t,r),i])}}*entriesFromColumnsSpan(e){for(let t=e.columnStart;t<=e.columnEnd;++t)for(let r=0;r<this.height;++r){let i=this.getCellVertex(t,r);i&&(yield[r0(e.sheet,t,r),i])}}*vertices(){for(let e=0;e<this.height;++e)for(let t=0;t<this.width;++t){let r=this.getCellVertex(t,e);r&&(yield r)}}getCellVertex(e,t){var r;return null==(r=this.mapping[t])?void 0:r[e]}}(O=d||(d={})).DIV_BY_ZERO="DIV_BY_ZERO",O.NAME="NAME",O.VALUE="VALUE",O.NUM="NUM",O.NA="NA",O.CYCLE="CYCLE",O.REF="REF",O.SPILL="SPILL",O.LIC="LIC",O.ERROR="ERROR",(k=u||(u={})).FORMULA="FORMULA",k.VALUE="VALUE",k.ARRAY="ARRAY",k.EMPTY="EMPTY",k.ARRAYFORMULA="ARRAYFORMULA",(H=c||(c={})).EMPTY="EMPTY",H.NUMBER="NUMBER",H.STRING="STRING",H.BOOLEAN="BOOLEAN",H.ERROR="ERROR",(g||(g={})).NUMBER="NUMBER";let rG=Object.assign(Object.assign({},c),g),rj=Object.assign(Object.assign({},c),s),rY=e=>{switch(e){case rG.EMPTY:return 0;case rG.NUMBER:return 1;case rG.STRING:return 2;case rG.BOOLEAN:return 3;case rG.ERROR:return 4}throw Error("Cell value not computed")},rK=e=>{if(e===tA)return rG.EMPTY;if(e instanceof rq||e instanceof tF)return rG.ERROR;if("string"==typeof e)return rG.STRING;if(tD(e))return rG.NUMBER;if("boolean"==typeof e)return rG.BOOLEAN;throw Error("Cell value not computed")};class rq{constructor(e,t,r){this.type=e,this.message=t,this.root=r}static parsingError(e){return new rq(d.ERROR,`${eY.ParseError}${e?" "+e:""}`)}attachRootVertex(e){return void 0===this.root?new rq(this.type,this.message,e):this}}let rX=(e,t)=>({sheet:e,row:t}),rQ=e=>e.row<0,rZ=(e,t)=>({sheet:e,col:t}),rJ=e=>e.col<0,r0=(e,t,r)=>({sheet:e,col:t,row:r}),r1=e=>e.col<0||e.row<0,r2=(e,t,r,i)=>r0(t,e.col+r,e.row+i),r3=e=>`${e.sheet},${e.row},${e.col}`;function r6(e){return e&&("object"==typeof e||"function"==typeof e)&&"number"==typeof(null==e?void 0:e.sheet)&&"number"==typeof(null==e?void 0:e.col)&&"number"==typeof(null==e?void 0:e.row)}let r5=(e,t)=>{var r;return null!=(r=e.sheet)?r:t.sheet},r4=(e,t)=>e.sheet===t.sheet&&e.col===t.col&&e.row===t.row;function r8(e){return!!e&&("object"==typeof e||"function"==typeof e)&&"start"in e&&r6(e.start)&&"end"in e&&r6(e.end)}let r9=(e,t)=>({start:e,end:t});class r7{constructor(e,t){if(e.sheet!==t.sheet)throw new t2(e.sheet,t.sheet);this.start=r0(e.sheet,e.col,e.row),this.end=r0(t.sheet,t.col,t.row)}get sheet(){return this.start.sheet}static fromSimpleCellAddresses(e,t){if(e.sheet!==t.sheet)throw new t2(e.sheet,t.sheet);let r=t.col-e.col,i=t.row-e.row;return Number.isFinite(i)&&Number.isFinite(r)?new r7(e,t):Number.isFinite(i)?new it(e.sheet,e.row,t.row):new ie(e.sheet,e.col,t.col)}static fromAst(e,t){return e.type===n.CELL_RANGE?r7.fromCellRange(e,t):e.type===n.COLUMN_RANGE?ie.fromColumnRange(e,t):it.fromRowRangeAst(e,t)}static fromAstOrUndef(e,t){try{return r7.fromAst(e,t)}catch(e){return}}static fromCellRange(e,t){return new r7(e.start.toSimpleCellAddress(t),e.end.toSimpleCellAddress(t))}static spanFrom(e,t,r){let i=r7.spanFromOrUndef(e,t,r);if(void 0===i)throw Error("AbsoluteCellRange: Wrong range size");return i}static spanFromOrUndef(e,t,r){if(!Number.isFinite(t)&&Number.isFinite(r)){if(0===e.col)return new it(e.sheet,e.row,e.row+r-1)}else if(!Number.isFinite(r)&&Number.isFinite(t)){if(0!==e.row)return;return new ie(e.sheet,e.col,e.col+t-1)}else if(Number.isFinite(r)&&Number.isFinite(t))return new r7(e,r0(e.sheet,e.col+t-1,e.row+r-1))}static fromCoordinates(e,t,r,i,n){return new r7(r0(e,t,r),r0(e,i,n))}isFinite(){return Number.isFinite(this.size())}doesOverlap(e){return this.start.sheet==e.start.sheet&&!(this.end.row<e.start.row)&&!(this.start.row>e.end.row)&&!(this.end.col<e.start.col)&&!(this.start.col>e.end.col)}addressInRange(e){return this.sheet===e.sheet&&this.start.row<=e.row&&this.end.row>=e.row&&this.start.col<=e.col&&this.end.col>=e.col}columnInRange(e){return this.sheet===e.sheet&&this.start.col<=e.col&&this.end.col>=e.col}rowInRange(e){return this.sheet===e.sheet&&this.start.row<=e.row&&this.end.row>=e.row}containsRange(e){return this.addressInRange(e.start)&&this.addressInRange(e.end)}intersectionWith(e){if(this.sheet!==e.start.sheet)return;let t=Math.max(this.start.row,e.start.row),r=Math.min(this.end.row,e.end.row),i=Math.max(this.start.col,e.start.col),n=Math.min(this.end.col,e.end.col);if(!(t>r)&&!(i>n))return new r7(r0(this.sheet,i,t),r0(this.sheet,n,r))}includesRow(e){return this.start.row<e&&this.end.row>=e}includesColumn(e){return this.start.col<e&&this.end.col>=e}shiftByRows(e){this.start.row+=e,this.end.row+=e}expandByRows(e){this.end.row+=e}shiftByColumns(e){this.start.col+=e,this.end.col+=e}shifted(e,t){return r7.spanFrom(r0(this.sheet,this.start.col+e,this.start.row+t),this.width(),this.height())}expandByColumns(e){this.end.col+=e}moveToSheet(e){this.start.sheet=e,this.end.sheet=e}removeSpan(e){e instanceof tG?this.removeRows(e.start,e.end):this.removeColumns(e.start,e.end)}shouldBeRemoved(){return 0>=this.width()||0>=this.height()}rangeWithSameWidth(e,t){return r7.spanFrom(r0(this.sheet,this.start.col,e),this.width(),t)}rangeWithSameHeight(e,t){return r7.spanFrom(r0(this.sheet,e,this.start.row),t,this.height())}toString(){return`${this.start.sheet},${this.start.col},${this.start.row},${this.end.col},${this.end.row}`}width(){return this.end.col-this.start.col+1}height(){return this.end.row-this.start.row+1}size(){return this.height()*this.width()}arrayOfAddressesInRange(){let e=[];for(let t=0;t<this.height();++t){e[t]=[];for(let r=0;r<this.width();++r){let i=r0(this.sheet,this.start.col+r,this.start.row+t);e[t].push(i)}}return e}withStart(e){return new r7(e,this.end)}sameDimensionsAs(e){return this.width()===e.width()&&this.height()===e.height()}sameAs(e){return r4(this.start,e.start)&&r4(this.end,e.end)}addressesArrayMap(e,t){let r=[],i=this.start.row;for(;i<=this.effectiveEndRow(e);){let n=this.start.col,o=[];for(;n<=this.effectiveEndColumn(e);)o.push(t(r0(this.start.sheet,n,i))),n++;r.push(o),i++}return r}addresses(e){let t=[],r=this.start.row,i=this.effectiveEndRow(e),n=this.effectiveEndColumn(e);for(;r<=i;){let e=this.start.col;for(;e<=n;)t.push(r0(this.start.sheet,e,r)),e++;r++}return t}*addressesWithDirection(e,t,r){if(e>0)if(t>0){let e=this.effectiveEndRow(r);for(;e>=this.start.row;){let t=this.effectiveEndColumn(r);for(;t>=this.start.col;)yield r0(this.start.sheet,t,e),t-=1;e-=1}}else{let e=this.start.row;for(;e<=this.effectiveEndRow(r);){let t=this.effectiveEndColumn(r);for(;t>=this.start.col;)yield r0(this.start.sheet,t,e),t-=1;e+=1}}else if(t>0){let e=this.effectiveEndRow(r);for(;e>=this.start.row;){let t=this.start.col;for(;t<=this.effectiveEndColumn(r);)yield r0(this.start.sheet,t,e),t+=1;e-=1}}else{let e=this.start.row;for(;e<=this.effectiveEndRow(r);){let t=this.start.col;for(;t<=this.effectiveEndColumn(r);)yield r0(this.start.sheet,t,e),t+=1;e+=1}}}getAddress(e,t){if(e<0||t<0||t>this.height()-1||e>this.width()-1)throw Error("Index out of bound");return r0(this.start.sheet,this.start.col+e,this.start.row+t)}exceedsSheetSizeLimits(e,t){return this.end.col>=e||this.end.row>=t}effectiveEndColumn(e){return this.end.col}effectiveEndRow(e){return this.end.row}effectiveWidth(e){return this.width()}effectiveHeight(e){return this.height()}removeRows(e,t){if(!(e>this.end.row)){if(t<this.start.row)return this.shiftByRows(-(t-e+1));e<=this.start.row&&(this.start.row=e),this.end.row-=Math.min(t,this.end.row)-e+1}}removeColumns(e,t){if(!(e>this.end.col)){if(t<this.start.col)return this.shiftByColumns(-(t-e+1));e<=this.start.col&&(this.start.col=e),this.end.col-=Math.min(t,this.end.col)-e+1}}}class ie extends r7{constructor(e,t,r){super(r0(e,t,0),r0(e,r,1/0))}static fromColumnRange(e,t){let r=e.start.toSimpleColumnAddress(t),i=e.end.toSimpleColumnAddress(t);if(r.sheet!==i.sheet)throw new t2(r.sheet,i.sheet);return new ie(r.sheet,r.col,i.col)}shouldBeRemoved(){return 0>=this.width()}shiftByRows(e){}expandByRows(e){}shifted(e,t){return new ie(this.sheet,this.start.col+e,this.end.col+e)}rangeWithSameHeight(e,t){return new ie(this.sheet,e,e+t-1)}exceedsSheetSizeLimits(e,t){return this.end.col>=e}effectiveEndRow(e){return this.effectiveHeight(e)-1}effectiveHeight(e){return e.getSheetHeight(this.sheet)}removeRows(e,t){}}class it extends r7{constructor(e,t,r){super(r0(e,0,t),r0(e,1/0,r))}static fromRowRangeAst(e,t){let r=e.start.toSimpleRowAddress(t),i=e.end.toSimpleRowAddress(t);if(r.sheet!==i.sheet)throw new t2(r.sheet,i.sheet);return new it(r.sheet,r.row,i.row)}shouldBeRemoved(){return 0>=this.height()}shiftByColumns(e){}expandByColumns(e){}shifted(e,t){return new it(this.sheet,this.start.row+t,this.end.row+t)}rangeWithSameWidth(e,t){return new it(this.sheet,e,e+t-1)}exceedsSheetSizeLimits(e,t){return this.end.row>=t}effectiveEndColumn(e){return this.effectiveWidth(e)-1}effectiveWidth(e){return e.getSheetWidth(this.sheet)}removeColumns(e,t){}}class ir{constructor(e,t,r){this.formulaAddress=e,this.arraysFlag=t,this.formulaVertex=r}}let ii=/^\s*([+-]?)\s*(([\d\.,]+(e[+-]?\d+)?)\s*([ij]?)|([ij]))\s*(([+-])\s*([+-]?)\s*(([\d\.,]+(e[+-]?\d+)?)\s*([ij]?)|([ij])))?$/;class io{constructor(e,t,r){this.config=e,this.dateTimeHelper=t,this.numberLiteralsHelper=r,this.lt=(e,t)=>0>this.compare(e,t),this.leq=(e,t)=>0>=this.compare(e,t),this.gt=(e,t)=>this.compare(e,t)>0,this.geq=(e,t)=>this.compare(e,t)>=0,this.eq=(e,t)=>0===this.compare(e,t),this.neq=(e,t)=>0!==this.compare(e,t),this.pow=(e,t)=>Math.pow(tM(e),tM(t)),this.addWithEpsilonRaw=(e,t)=>{let r=e+t;return Math.abs(r)<this.actualEps*Math.abs(e)?0:r},this.addWithEpsilon=(e,t)=>{let r=ib(e,t);return this.ExtendedNumberFactory(this.addWithEpsilonRaw(tM(e),tM(t)),r)},this.unaryMinus=e=>tN(e,-tM(e)),this.unaryPlus=e=>e,this.unaryPercent=e=>new tP(tM(e)/100),this.concat=(e,t)=>e.concat(t),this.nonstrictadd=(e,t)=>{if(e instanceof rq)return e;if(t instanceof rq)return t;if("number"==typeof e)if("number"==typeof t)return this.addWithEpsilonRaw(e,t);else return e;if("number"==typeof t)return t;return 0},this.subtract=(e,t)=>{let r=ib(e,t),i=tM(e),n=i-tM(t);return Math.abs(n)<this.actualEps*Math.abs(i)&&(n=0),this.ExtendedNumberFactory(n,r)},this.divide=(e,t)=>{let r=tM(e),i=tM(t);if(0===i)return new rq(d.DIV_BY_ZERO);{let n=iC(e,t);return this.ExtendedNumberFactory(r/i,n)}},this.multiply=(e,t)=>{let r=iC(e,t);return this.ExtendedNumberFactory(tM(e)*tM(t),r)},this.manyToExactComplex=e=>{let t=[];for(let r of e)if(r instanceof rq)return r;else if(tD(r)||"string"==typeof r){let e=this.coerceScalarToComplex(r);e instanceof rq||t.push(e)}return t},this.coerceNumbersExactRanges=e=>this.manyToNumbers(e,this.manyToExactNumbers),this.coerceNumbersCoerceRangesDropNulls=e=>this.manyToNumbers(e,this.manyToCoercedNumbersDropNulls),this.manyToExactNumbers=e=>{let t=[];for(let r of e)if(r instanceof rq)return r;else tD(r)&&t.push(tM(r));return t},this.manyToOnlyNumbersDropNulls=e=>{let t=[];for(let r of e)if(r instanceof rq)return r;else if(tD(r))t.push(tM(r));else if(r!==tA)return new rq(d.VALUE,eY.NumberExpected);return t},this.manyToCoercedNumbersDropNulls=e=>{let t=[];for(let r of e){if(r instanceof rq)return r;if(r===tA)continue;let e=this.coerceScalarToNumberOrError(r);tD(e)&&t.push(tM(e))}return t},this.collator=function(e){let t=e.caseSensitive?e.accentSensitive?"variant":"case":e.accentSensitive?"accent":"base",r=e.caseFirst,i=e.ignorePunctuation;return new Intl.Collator(e.localeLang,{sensitivity:t,caseFirst:r,ignorePunctuation:i})}(e),this.actualEps=e.smartRounding?e.precisionEpsilon:0}eqMatcherFunction(e){let t=this.buildRegex(e);return e=>"string"==typeof e&&t.test(this.normalizeString(e))}neqMatcherFunction(e){let t=this.buildRegex(e);return e=>"string"!=typeof e||!t.test(this.normalizeString(e))}searchString(e,t){var r;let i=this.buildRegex(e,!1).exec(t);return null!=(r=null==i?void 0:i.index)?r:-1}requiresRegex(e){if(!this.config.useRegularExpressions&&!this.config.useWildcards)return!this.config.matchWholeCell;for(let t=0;t<e.length;t++){let r=e.charAt(t);if(im(r)||this.config.useRegularExpressions&&iy(r))return!0}return!1}floatCmp(e,t){let r=tM(e),i=tM(t),n=1+this.actualEps;return i>=0&&r*n>=i&&r<=i*n||i<=0&&r*n<=i&&r>=i*n?0:r>i?1:-1}coerceScalarToNumberOrError(e){var t;return e instanceof rq?e:null!=(t=this.coerceToMaybeNumber(e))?t:new rq(d.VALUE,eY.NumberCoercion)}coerceToMaybeNumber(e){var t;return null!=(t=this.coerceNonDateScalarToMaybeNumber(e))?t:"string"==typeof e?this.dateTimeHelper.dateStringToDateNumber(e):void 0}coerceNonDateScalarToMaybeNumber(e){if(e===tA)return 0;if("string"==typeof e){if(""===e)return 0;let t=this.coerceStringToMaybePercentNumber(e);if(void 0!==t)return t;let r=this.coerceStringToMaybeCurrencyNumber(e);return void 0!==r?r:this.numberLiteralsHelper.numericStringToMaybeNumber(e.trim())}return tD(e)?e:"boolean"==typeof e?Number(e):void 0}coerceStringToMaybePercentNumber(e){let t=e.trim();if(t.endsWith("%")){let e=t.slice(0,t.length-1).trim(),r=this.numberLiteralsHelper.numericStringToMaybeNumber(e);if(void 0!==r)return new tP(r/100)}}coerceStringToMaybeCurrencyNumber(e){let t=this.currencyMatcher(e.trim());if(void 0!==t){let[e,r]=t,i=this.numberLiteralsHelper.numericStringToMaybeNumber(r);if(void 0!==i)return new tk(i,e)}}currencyMatcher(e){for(let t of this.config.currencySymbol){if(e.startsWith(t))return[t,e.slice(t.length).trim()];if(e.endsWith(t))return[t,e.slice(0,e.length-t.length).trim()]}}coerceComplexExactRanges(e){let t=[];for(let r of e)if(r instanceof tF)t.push(r);else if(r!==tA){let e=this.coerceScalarToComplex(r);if(e instanceof rq)return e;t.push(e)}let r=[];for(let e of t)if(e instanceof tF){let t=this.manyToExactComplex(e.valuesFromTopLeftCorner());if(t instanceof rq)return t;r.push(...t)}else r.push(e);return r}coerceScalarToComplex(e){return e instanceof rq?e:e===tA?[0,0]:tD(e)?[tM(e),0]:"string"==typeof e?this.coerceStringToComplex(e):new rq(d.NUM,eY.ComplexNumberExpected)}ExtendedNumberFactory(e,t){let{type:r,format:i}=t;switch(r){case s.NUMBER_RAW:return e;case s.NUMBER_CURRENCY:return new tk(e,null!=i?i:this.config.currencySymbol[0]);case s.NUMBER_DATE:return new tO(e,i);case s.NUMBER_DATETIME:return new t_(e,i);case s.NUMBER_TIME:return new tH(e,i);case s.NUMBER_PERCENT:return new tP(e,i)}}buildRegex(e,t=!0){let r;e=this.normalizeString(e);let i=this.config.useWildcards,n=this.config.useRegularExpressions;if(n)try{RegExp(e)}catch(e){n=!1,i=!1}return(r=n?function(e,t){let r="";for(let i=0;i<e.length;i++){let n=e.charAt(i);im(n)||iy(n)||t?r+=n:r+=n.toLowerCase()}return r}(e,this.config.caseSensitive):i?function(e,t){let r="";for(let i=0;i<e.length;i++){let n=e.charAt(i);if("~"===n){if(i==e.length-1){r+="~";continue}let t=e.charAt(i+1);im(t)||iy(t)?r+="\\"+t:r+=t,i++}else im(n)?r+="."+n:iy(n)?r+="\\"+n:t?r+=n:r+=n.toLowerCase()}return r}(e,this.config.caseSensitive):function(e,t){let r="";for(let i=0;i<e.length;i++){let n=e.charAt(i);im(n)||iy(n)?r+="\\"+n:t?r+=n:r+=n.toLowerCase()}return r}(e,this.config.caseSensitive),this.config.matchWholeCell&&t)?RegExp("^("+r+")$"):RegExp(r)}normalizeString(e){return this.config.caseSensitive||(e=e.toLowerCase()),this.config.accentSensitive||(e=iR(e,"nfd").replace(/[\u0300-\u036f]/g,"")),e}compare(e,t){if("string"==typeof e||"string"==typeof t){let r="string"==typeof e?this.dateTimeHelper.dateStringToDateNumber(e):e,i="string"==typeof t?this.dateTimeHelper.dateStringToDateNumber(t):t;if(tD(r)&&tD(i))return this.floatCmp(r,i)}return(e===tA?e=ih(t):t===tA&&(t=ih(e)),"string"==typeof e&&"string"==typeof t)?this.stringCmp(e,t):"boolean"==typeof e&&"boolean"==typeof t?ig(ia(e),ia(t)):tD(e)&&tD(t)?this.floatCmp(e,t):e===tA&&t===tA?0:ig(rY(rK(e)),rY(rK(t)))}stringCmp(e,t){return this.collator.compare(e,t)}manyToNumbers(e,t){let r=[];for(let t of e)if(t instanceof tF)r.push(t);else{let e=tM(this.coerceScalarToNumberOrError(t));if(e instanceof rq)return e;r.push(e)}let i=[];for(let e of r)if(e instanceof tF){let r=t(e.valuesFromTopLeftCorner());if(r instanceof rq)return r;i.push(...r)}else i.push(e);return i}coerceStringToComplex(e){let t,r,i=ii.exec(e);return null===i?new rq(d.NUM,eY.ComplexNumberExpected):(t=void 0!==i[6]?"-"===i[1]?[0,-1]:[0,1]:this.parseComplexToken(i[1]+i[3],i[5]))instanceof rq||void 0===i[8]?t:(r=void 0!==i[14]?"-"===i[9]?[0,-1]:[0,1]:this.parseComplexToken(i[9]+i[11],i[13]))instanceof rq?r:""!==i[5]||""===i[13]?new rq(d.NUM,eY.ComplexNumberExpected):"+"===i[8]?[t[0]+r[0],t[1]+r[1]]:[t[0]-r[0],t[1]-r[1]]}parseComplexToken(e,t){let r=tM(this.coerceNonDateScalarToMaybeNumber(e));return void 0===r?new rq(d.NUM,eY.ComplexNumberExpected):""===t?[r,0]:[0,r]}}function is([e,t],r){if(!isFinite(e)||!isFinite(t))return new rq(d.NUM,eY.NaN);if(r=null!=r?r:"i",0===t)return`${e}`;let i=`${-1===t||1===t?"":Math.abs(t)}${r}`;return 0===e?`${t<0?"-":""}${i}`:`${e}${t<0?"-":"+"}${i}`}function il(e){return e instanceof tF?e:tF.fromScalar(e)}function ia(e){return Number(e)}function ih(e){return"string"==typeof e?"":tD(e)?0:"boolean"!=typeof e&&tA}function id(e){if(e instanceof rq||"boolean"==typeof e)return e;{if(e===tA)return!1;if(tD(e))return 0!==tM(e);let t=e.toUpperCase();return"TRUE"===t||"FALSE"!==t&&""!==t&&void 0}}function iu(e){return e instanceof rq||"string"==typeof e?e:e===tA?"":tD(e)?tM(e).toString():e?"TRUE":"FALSE"}function ic(e){return e===tA?0:e}function ig(e,t){let r=tM(e),i=tM(t);return r>i?1:r<i?-1:0}function ip(e){return isNaN(e)||e===1/0||e===-1/0}function im(e){return["*","?"].includes(e)}let iw=["{","}","[","]","(",")","<",">","=",".","+","-",",","\\","$","^","!"];function iy(e){return iw.includes(e)}function ib(e,t){let{type:r,format:i}=tL(e),{type:n,format:o}=tL(t);if(r===s.NUMBER_RAW)return{type:n,format:o};if(n===s.NUMBER_RAW)return{type:r,format:i};if((r===s.NUMBER_DATETIME||r===s.NUMBER_DATE)&&(n===s.NUMBER_DATETIME||n===s.NUMBER_DATE))return{type:s.NUMBER_RAW};if(r===s.NUMBER_TIME){if(n===s.NUMBER_DATE)return{type:s.NUMBER_DATETIME,format:`${o} ${i}`};if(n===s.NUMBER_DATETIME)return{type:s.NUMBER_DATETIME,format:o}}if(n===s.NUMBER_TIME){if(r===s.NUMBER_DATE)return{type:s.NUMBER_DATETIME,format:`${i} ${o}`};if(r===s.NUMBER_DATETIME)return{type:s.NUMBER_DATETIME,format:i}}return{type:r,format:i}}function iC(e,t){let{type:r,format:i}=tL(e),{type:n,format:o}=tL(t);return(r===s.NUMBER_PERCENT&&(r=s.NUMBER_RAW,i=void 0),n===s.NUMBER_PERCENT&&(n=s.NUMBER_RAW,o=void 0),r===s.NUMBER_RAW)?{type:n,format:o}:n===s.NUMBER_RAW?{type:r,format:i}:{type:s.NUMBER_RAW}}function iS(e){return iR(e.toLowerCase(),"nfd").replace(/[\u0300-\u036f]/g,"")}function iv(e,t){var r;if(e.isAdHoc())return null==(r=e.data[0])?void 0:r[0];let i=e.range;if(t.formulaAddress.sheet===i.sheet){if(1===i.width()){let r=t.formulaAddress.row-i.start.row;if(r>=0&&r<i.height())return e.data[r][0]}else if(1===i.height()){let r=t.formulaAddress.col-i.start.col;if(r>=0&&r<i.width())return e.data[0][r]}}}function iR(e,t){return e.normalize(t.toUpperCase())}(_=p||(p={})).STRING="STRING",_.NUMBER="NUMBER",_.BOOLEAN="BOOLEAN",_.SCALAR="SCALAR",_.NOERROR="NOERROR",_.RANGE="RANGE",_.INTEGER="INTEGER",_.COMPLEX="COMPLEX",_.ANY="ANY";class iE{constructor(e){this.coerceScalarToNumberOrError=e=>this.arithmeticHelper.coerceScalarToNumberOrError(e),this.runFunction=(e,t,r,i)=>{let n=this.evaluateArguments(e,t,r),o=n.map(([e])=>e),s=n.map(([,e])=>e),l=n.map(([,,e])=>e),a=this.buildMetadataForEachArgumentValue(o.length,r),h=t.arraysFlag&&!r.vectorizationForbidden;if(!this.isNumberOfArgumentValuesValid(a,o.length))return new rq(d.NA,eY.WrongArgNumber);let[u,c]=h?this.calculateSizeOfVectorizedResultArray(o,a):[1,1];if(1===u&&1===c){let e=this.vectorizeAndBroadcastArgumentsIfNecessary(h,o,a,0,0);return this.calculateSingleCellOfResultArray(t,e,a,s,l,i,r.returnNumberType)}let g=[...Array(u).keys()].map(e=>[...Array(c).keys()].map(n=>{let d=this.vectorizeAndBroadcastArgumentsIfNecessary(h,o,a,e,n),u=this.calculateSingleCellOfResultArray(t,d,a,s,l,i,r.returnNumberType);if(u instanceof tF)throw Error("Function returning array cannot be vectorized.");return u}));return tF.onlyValues(g)},this.runFunctionWithReferenceArgument=(e,t,r,i,o,s=()=>new rq(d.NA,eY.CellRefExpected))=>{let l;if(0===e.length)return this.returnNumberWrapper(i(),r.returnNumberType);if(e.length>1)return new rq(d.NA,eY.WrongArgNumber);let a=e[0];for(;a.type===n.PARENTHESIS;)a=a.expression;if(a.type===n.CELL_REFERENCE)l=a.reference.toSimpleCellAddress(t.formulaAddress);else if(a.type===n.CELL_RANGE||a.type===n.COLUMN_RANGE||a.type===n.ROW_RANGE)try{l=r7.fromAst(a,t.formulaAddress).start}catch(e){return new rq(d.REF,eY.CellRefExpected)}return void 0!==l?this.returnNumberWrapper(o(l),r.returnNumberType):this.runFunction(e,t,r,s)},this.interpreter=e,this.dependencyGraph=e.dependencyGraph,this.columnSearch=e.columnSearch,this.config=e.config,this.serialization=e.serialization,this.arraySizePredictor=e.arraySizePredictor,this.dateTimeHelper=e.dateTimeHelper,this.arithmeticHelper=e.arithmeticHelper}evaluateAst(e,t){return this.interpreter.evaluateAst(e,t)}arraySizeForAst(e,t){return this.arraySizePredictor.checkArraySizeForAst(e,t)}listOfScalarValues(e,t){let r=[];for(let i of e){let e=i.type===n.EMPTY,o=this.evaluateAst(i,t);if(o instanceof tF)for(let t of o.valuesFromTopLeftCorner())r.push([t,!0,e]);else r.push([o,!1,e])}return r}coerceToType(e,t,r){let i;if(e instanceof tF)switch(t.argumentType){case p.RANGE:case p.ANY:i=e;break;default:{let t=iv(e,r);if(void 0===t)return;e=t}}if(!(e instanceof tF))switch(t.argumentType){case p.INTEGER:case p.NUMBER:let n=this.coerceScalarToNumberOrError(e);if(!tD(n)){i=n;break}let o=tM(n);if(void 0!==t.maxValue&&o>t.maxValue)return new rq(d.NUM,eY.ValueLarge);if(void 0!==t.minValue&&o<t.minValue)return new rq(d.NUM,eY.ValueSmall);if(void 0!==t.lessThan&&o>=t.lessThan)return new rq(d.NUM,eY.ValueLarge);if(void 0!==t.greaterThan&&o<=t.greaterThan)return new rq(d.NUM,eY.ValueSmall);if(t.argumentType===p.INTEGER&&!Number.isInteger(o))return new rq(d.NUM,eY.IntegerExpected);i=n;break;case p.STRING:i=iu(e);break;case p.BOOLEAN:i=id(e);break;case p.SCALAR:case p.NOERROR:case p.ANY:i=e;break;case p.RANGE:if(e instanceof rq)return e;i=il(e);break;case p.COMPLEX:return this.arithmeticHelper.coerceScalarToComplex(tM(e))}return t.passSubtype||void 0===i?i:tM(i)}calculateSingleCellOfResultArray(e,t,r,i,n,o,s){let l=this.coerceArgumentsToRequiredTypes(e,t,r,i,n);if(l instanceof rq)return l;let a=o(...l);return this.returnNumberWrapper(a,s)}coerceArgumentsToRequiredTypes(e,t,r,i,n){let o=[];for(let s=0;s<r.length;s++){let l=r[s],a=t[s],h=void 0===a?null==l?void 0:l.defaultValue:n[s]&&(null==l?void 0:l.emptyAsDefault)&&(null==l?void 0:l.defaultValue)!==void 0?l.defaultValue:a;if(void 0===h){o.push(void 0);continue}let u=this.coerceToType(h,l,e);if(void 0===u&&!i[s])return new rq(d.VALUE,eY.WrongType);if(u instanceof rq&&l.argumentType!==p.SCALAR)return u;o.push(u)}return o}vectorizeAndBroadcastArgumentsIfNecessary(e,t,r,i,n){return t.map((t,o)=>e&&this.isRangePassedAsAScalarArgument(t,r[o])?this.vectorizeAndBroadcastRangeArgument(t,i,n):t)}vectorizeAndBroadcastRangeArgument(e,t,r){var i;let n=1===e.height()?0:t,o=1===e.width()?0:r;return null==(i=e.data[n])?void 0:i[o]}evaluateArguments(e,t,r){return r.expandRanges?this.listOfScalarValues(e,t):e.map(e=>[this.evaluateAst(e,t),!1,e.type===n.EMPTY])}buildMetadataForEachArgumentValue(e,t){let r=t.parameters?[...t.parameters]:[];if(void 0!==t.repeatLastArgs&&Number.isInteger(t.repeatLastArgs)&&t.repeatLastArgs>0)for(;e>r.length;)r.push(...r.slice(r.length-t.repeatLastArgs));return r}isNumberOfArgumentValuesValid(e,t){return!(t>e.length)&&(!(t<e.length)||e.slice(t).every(e=>(null==e?void 0:e.optionalArg)||(null==e?void 0:e.defaultValue)!==void 0))}calculateSizeOfVectorizedResultArray(e,t){let r=e.filter((e,r)=>this.isRangePassedAsAScalarArgument(e,t[r]));return[Math.max(1,...r.map(e=>e.height())),Math.max(1,...r.map(e=>e.width()))]}isRangePassedAsAScalarArgument(e,t){return null!=e&&null!=t&&e instanceof tF&&![p.RANGE,p.ANY].includes(t.argumentType)}metadata(e){let t=this.constructor.implementedFunctions[e];if(void 0!==t)return t;throw Error(`No metadata for function ${e}.`)}returnNumberWrapper(e,t,r){return void 0!==t&&tD(e)?this.arithmeticHelper.ExtendedNumberFactory(tM(e),{type:t,format:r}):e}}class iT{constructor(e,t,r=!1){this.width=e,this.height=t,this.isRef=r}static error(){return new iT(1,1,!0)}static scalar(){return new iT(1,1,!1)}isScalar(){return 1===this.width&&1===this.height||this.isRef}}class ix{constructor(e,t){this.config=e,this.functionRegistry=t}checkArraySize(e,t){return this.checkArraySizeForAst(e,{formulaAddress:t,arraysFlag:this.config.useArrayArithmetic})}checkArraySizeForAst(e,t){switch(e.type){case n.FUNCTION_CALL:return this.checkArraySizeForFunction(e,t);case n.COLUMN_RANGE:case n.ROW_RANGE:case n.CELL_RANGE:{let r=r7.fromAstOrUndef(e,t.formulaAddress);if(void 0===r)return iT.error();return new iT(r.width(),r.height(),!0)}case n.ARRAY:{let r=[],i=[];for(let n of e.args){let e=n.map(e=>this.checkArraySizeForAst(e,t)),o=Math.min(...e.map(e=>e.height)),s=e.reduce((e,t)=>e+t.width,0);r.push(o),i.push(s)}return new iT(Math.min(...i),r.reduce((e,t)=>e+t,0))}case n.STRING:case n.NUMBER:return iT.scalar();case n.CELL_REFERENCE:return new iT(1,1,!0);case n.DIV_OP:case n.CONCATENATE_OP:case n.EQUALS_OP:case n.GREATER_THAN_OP:case n.GREATER_THAN_OR_EQUAL_OP:case n.LESS_THAN_OP:case n.LESS_THAN_OR_EQUAL_OP:case n.MINUS_OP:case n.NOT_EQUAL_OP:case n.PLUS_OP:case n.POWER_OP:case n.TIMES_OP:{let r=this.checkArraySizeForAst(e.left,t),i=this.checkArraySizeForAst(e.right,t);if(!t.arraysFlag&&(r.height>1||r.width>1||i.height>1||i.width>1))return iT.error();return new iT(Math.max(r.width,i.width),Math.max(r.height,i.height))}case n.MINUS_UNARY_OP:case n.PLUS_UNARY_OP:case n.PERCENT_OP:{let r=this.checkArraySizeForAst(e.value,t);if(!t.arraysFlag&&(r.height>1||r.width>1))return iT.error();return new iT(r.width,r.height)}case n.PARENTHESIS:return this.checkArraySizeForAst(e.expression,t);case n.EMPTY:default:return iT.error()}}checkArraySizeForFunction(e,t){let r=this.functionRegistry.getArraySizeFunction(e.procedureName);if(void 0!==r)return r(e,t);let i=this.functionRegistry.getMetadata(e.procedureName);if(void 0===i||i.expandRanges||!t.arraysFlag||i.vectorizationForbidden||void 0===i.parameters)return new iT(1,1);let n=e.args.map(e=>{var r;return this.checkArraySizeForAst(e,new ir(t.formulaAddress,t.arraysFlag||null!=(r=null==i?void 0:i.enableArrayArithmeticForArguments)&&r))}),o=[...i.parameters];if(void 0!==i.repeatLastArgs&&o.length<n.length&&(n.length-o.length)%i.repeatLastArgs!=0)return iT.error();for(;o.length<n.length;){if(void 0===i.repeatLastArgs)return iT.error();o.push(...o.slice(o.length-i.repeatLastArgs))}let s=1,l=1;for(let e=0;e<n.length;e++)o[e].argumentType!==p.RANGE&&o[e].argumentType!==p.ANY&&(l=Math.max(l,n[e].height),s=Math.max(s,n[e].width));return new iT(s,l)}}class iA{constructor(e,t,r){var i;this.value=t,this.address=r,this.type=e.type,this.message=null!=(i=e.message)?i:""}toString(){return this.value}valueOf(){return this.value}}function iM(e,t,r){if(void 0===e)return of.defaultConfig[r];if("string"==typeof t)if(typeof e===t)return e;else throw new rt(t,r);if(t.includes(e))return e;throw new ro(t.map(e=>`'${e}'`).join(" "),r)}function iI(e,t,r){if(e<r)throw new ri(t,r)}function iN(e,t,r,i){if(t(e))return e;if(void 0===e)return of.defaultConfig[i];throw new rt(r,i)}function iO(...e){let t=new Map;e.forEach(e=>{let r=t.get(e.value)||[];r.push(e.name),t.set(e.value,r)});let r=[];for(let e of t.values())e.length>1&&r.push(e);if(r.length>0){r.forEach(e=>e.sort());let e=r.map(e=>`[${e}]`).join("; ");throw Error(`Config initialization failed. Parameters in conflict: ${e}`)}}function ik(e,t,r){if(typeof e!==t)throw new rt(t,r)}let iH=RegExp("^ss(\\.(s+|0+))?$"),i_=RegExp("^[0-9/.\\-: ]+[ap]?m?$"),iP=RegExp("\\s+"),iD=RegExp("[ /.-]"),iL=iz(function(e){let t=e.toLowerCase().trim(),r=(t.endsWith("am/pm")?t.substring(0,t.length-5):t.endsWith("a/p")?t.substring(0,e.length-3):t).trim().split(":");return{itemsCount:r.length,hourItem:r.indexOf("hh"),minuteItem:r.indexOf("mm"),secondItem:r.findIndex(e=>iH.test(e))}}),iF=iz(function(e){let t=e.toLowerCase().trim().split(iD);return{itemsCount:t.length,dayItem:t.indexOf("dd"),monthItem:t.indexOf("mm"),shortYearItem:t.indexOf("yy"),longYearItem:t.indexOf("yyyy")}});function iB(e,t){var r,i,n;let o;if(void 0===t)return;let{itemsCount:s,hourItem:l,minuteItem:a,secondItem:h}=iL(t);if("am"===e[e.length-1]||"a"===e[e.length-1]?(o=!1,e.pop()):("pm"===e[e.length-1]||"p"===e[e.length-1])&&(o=!0,e.pop()),e.length!==s)return;let d=Number(null!=(r=e[h])?r:"0");if(!Number.isFinite(d))return;let u=Math.round(1e3*d)/1e3,c=Number(null!=(i=e[a])?i:"0");if(!(Number.isFinite(c)&&Number.isInteger(c)))return;let g=Number(null!=(n=e[l])?n:"0");if(Number.isFinite(g)&&Number.isInteger(g)&&(void 0===o||!(g<0)&&!(g>12)))return{hours:void 0!==o?g%12+12*!!o:g,minutes:c,seconds:u}}function iV(e,t){var r;if(void 0===t)return;let{itemsCount:i,dayItem:n,monthItem:o,shortYearItem:s,longYearItem:l}=iF(t);if(e.length!==i)return;let a=Number(e[n]);if(!(Number.isFinite(a)&&Number.isInteger(a)))return;let h=Number(e[o]);if(!(Number.isFinite(h)&&Number.isInteger(h))||e[l]&&e[s])return;let d=Number(null!=(r=e[l])?r:e[s]);if(Number.isFinite(d)&&Number.isInteger(d)&&(!e[l]||!(d<1e3)&&!(d>9999))&&(!e[s]||!(d<0)&&!(d>99)))return{year:d,month:h,day:a}}function iz(e){let t={};return r=>{let i=t[r];if(void 0!==i)return i;let n=e(r);return t[r]=n,n}}let iU=[31,28,31,30,31,30,31,31,30,31,30,31],iW=[0,31,59,90,120,151,181,212,243,273,304,334];function i$(e){return!!e&&("object"==typeof e||"function"==typeof e)&&"year"in e&&"number"==typeof e.year&&"month"in e&&"number"==typeof e.month&&"day"in e&&"number"==typeof e.day}function iG(e){return!!e&&("object"==typeof e||"function"==typeof e)&&"hours"in e&&"number"==typeof e.hours&&"minutes"in e&&"number"==typeof e.minutes&&"seconds"in e&&"number"==typeof e.seconds}let ij={year:9999,month:12,day:31};class iY{constructor(e){this.config=e,this.minDateAbsoluteValue=this.dateToNumberFromZero(e.nullDate),this.maxDateValue=this.dateToNumber(ij),this.leapYear1900=e.leapYear1900,!this.leapYear1900&&0<=this.dateToNumber({year:1900,month:2,day:28})?this.epochYearZero=this.numberToSimpleDate(2).year:this.epochYearZero=this.numberToSimpleDate(1).year,this.parseDateTime=e.parseDateTime}getWithinBounds(e){return e<=this.maxDateValue&&e>=0?e:void 0}dateStringToDateNumber(e){let{dateTime:t,dateFormat:r="",timeFormat:i=""}=this.parseDateTimeFromConfigFormats(e);if(void 0!==t)if(iG(t))if(i$(t))return new t_(iQ(t)+this.dateToNumber(t),r+" "+i);else return new tH(iQ(t),i);else if(i$(t))return new tO(this.dateToNumber(t),r);else return 0}parseDateTimeFromConfigFormats(e){return this.parseDateTimeFromFormats(e,this.config.dateFormats,this.config.timeFormats)}getNullYear(){return this.config.nullYear}getEpochYearZero(){return this.epochYearZero}isValidDate(e){if(isNaN(e.year)||isNaN(e.month)||isNaN(e.day)||e.day!==Math.round(e.day)||e.month!==Math.round(e.month)||e.year!==Math.round(e.year))return!1;if(e.year<1582)return!1;if(e.month<1||e.month>12)return!1;if(e.day<1)return!1;else if(this.isLeapYear(e.year)&&2===e.month)return e.day<=29;else return e.day<=iU[e.month-1]}dateToNumber(e){return this.dateToNumberFromZero(e)-this.minDateAbsoluteValue}relativeNumberToAbsoluteNumber(e){return e+this.minDateAbsoluteValue-!!this.leapYear1900}numberToSimpleDate(e){var t;let r,i=Math.floor(e)+this.minDateAbsoluteValue,n=Math.floor(i/365.2425);this.dateToNumberFromZero({year:n+1,month:1,day:1})<=i?n++:this.dateToNumberFromZero({year:n-1,month:1,day:1})>i&&n--;let o=i-this.dateToNumberFromZero({year:n,month:1,day:1}),s=(t=o-(this.isLeapYear(n)&&o>=59?1:0),r=0,iW[6]<=t&&(r+=6),iW[r+3]<=t&&(r+=3),iW[r+2]<=t?r+=2:iW[r+1]<=t&&(r+=1),r),l=o-iW[s]-(this.isLeapYear(n)&&s>1?1:0);return{year:n,month:s+1,day:l+1}}numberToSimpleDateTime(e){let t=iX(e%1),r=Math.floor(t.hours/24);return t.hours=t.hours%24,Object.assign(Object.assign({},this.numberToSimpleDate(Math.floor(e)+r)),t)}leapYearsCount(e){return Math.floor(e/4)-Math.floor(e/100)+Math.floor(e/400)+(this.config.leapYear1900&&e>=1900?1:0)}daysInMonth(e,t){return this.isLeapYear(e)&&2===t?29:iU[t-1]}endOfMonth(e){return{year:e.year,month:e.month,day:this.daysInMonth(e.year,e.month)}}toBasisUS(e,t){return 31===e.day&&(e.day=30),30===e.day&&31===t.day&&(t.day=30),2===e.month&&e.day===this.daysInMonth(e.year,e.month)&&(e.day=30,2===t.month&&t.day===this.daysInMonth(t.year,t.month)&&(t.day=30)),[e,t]}yearLengthForBasis(e,t){return e.year!==t.year?e.year+1!==t.year||e.month<t.month||e.month===t.month&&e.day<t.day?(this.leapYearsCount(t.year)-this.leapYearsCount(e.year-1))/(t.year-e.year+1)+365:this.countLeapDays(t)!==this.countLeapDays({year:e.year,month:e.month,day:e.day-1})?366:365:this.isLeapYear(e.year)?366:365}parseSingleFormat(e,t,r){let i=this.parseDateTime(e,t,r);if(!i$(i)||(i.year>=0&&i.year<100&&(i.year<this.getNullYear()?i.year+=2e3:i.year+=1900),this.isValidDate(i)))return i}parseDateTimeFromFormats(e,t,r){let i=0===t.length?[void 0]:t,n=0===r.length?[void 0]:r;for(let t of i)for(let r of n){let i=this.parseSingleFormat(e,t,r);if(void 0!==i)return{dateTime:i,timeFormat:r,dateFormat:t}}return{}}countLeapDays(e){return e.month>2||2===e.month&&e.day>=29?this.leapYearsCount(e.year):this.leapYearsCount(e.year-1)}dateToNumberFromZero(e){return 365*e.year+iW[e.month-1]+e.day-1+(e.month<=2?this.leapYearsCount(e.year-1):this.leapYearsCount(e.year))}isLeapYear(e){return!(e%4)&&(!!(e%100)||!(e%400)||1900===e&&this.config.leapYear1900)}}function iK(e,t){let r=12*e.year+e.month-1+t;return{year:Math.floor(r/12),month:r%12+1,day:e.day}}function iq(e){return Math.round(3600*e*24)/86400}function iX(e){let t=24*e*3600,r=function(e,t=1){return Math.round(e*t)/t}(t%60,1e5)%60,i=(t-r)/60,n=Math.round(i%60)%60;return{hours:Math.round((i-n)/60),minutes:n,seconds:r}}function iQ(e){return((e.seconds/60+e.minutes)/60+e.hours)/24}function iZ(e){return{year:e.year,month:e.month,day:Math.min(30,e.day)}}let iJ=/(\\.|dd|DD|d|D|mm|MM|m|M|YYYY|YY|yyyy|yy|HH|hh|H|h|ss(\.(0+|s+))?|s|AM\/PM|am\/pm|A\/P|a\/p|\[mm]|\[MM]|\[hh]|\[HH])/g,i0=/(\\.|[#0]+(\.[#0]*)?)/g;function i1(e,t){return{type:e,value:t}}function i2(e,t){let r=[],i=0;for(let n=0;n<e.length;++n){let o=e[n];if(o.index!==i){let e=t.substr(i,o.index-i);r.push(i1(m.FREE_TEXT,e))}o[0].startsWith("\\")?r.push(i1(m.FREE_TEXT,o[0])):r.push(i1(m.FORMAT,o[0])),i=o.index+o[0].length}let n=e[e.length-1];if(n.index+n[0].length<t.length){let e=t.substr(n.index+n[0].length,t.length);r.push(i1(m.FREE_TEXT,e))}return r}function i3(e){let t=function(e){let t;iJ.lastIndex=0;let r=[];do null!==(t=iJ.exec(e))&&r.push(t);while(t);return r}(e);if(!t.every(e=>i6(e)))return{type:f.DATE,tokens:i2(t,e)}}(P=m||(m={})).FORMAT="FORMAT",P.FREE_TEXT="FREE_TEXT",(D=f||(f={})).DATE="DATE",D.NUMBER="NUMBER",D.STRING="STRING";function i6(e){return e[0].startsWith("\\")}function i5(e,t){let r=`${e}`;for(;r.length<t;)r="0"+r;return r}function i4(e,t){return e.split(t).length-1}let i8="length",i9=e=>(e+"").replace(/\-/g,""),i7=e=>e.codePointAt(0)-65,ne={invalid:()=>"The license key for HyperFormula is invalid.",expired:({keyValidityDate:e})=>`The license key for HyperFormula expired on ${e}, and is not valid for the installed version.`,missing:()=>"The license key for HyperFormula is missing."},nt=!1;var nr=w||(w={});nr.Number=class{constructor(e){var t;this.value=e,this.value=tN(this.value,0===(t=tM(this.value))?0:t)}},nr.String=class{constructor(e){this.value=e}},nr.Boolean=class{constructor(e){this.value=e}};class ni{static getSingletonInstance(){return ni.instance||(ni.instance=new ni),ni.instance}}nr.Empty=ni,nr.Formula=class{constructor(e){this.formula=e}},nr.Error=class{constructor(e,t){this.value=new rq(e,t)}};class nn{constructor(e,t,r){this.config=e,this.dateHelper=t,this.numberLiteralsHelper=r}parse(e){if(null==e)return w.Empty.getSingletonInstance();if("number"==typeof e)if(ip(e))return new w.Error(d.NUM,eY.ValueLarge);else return new w.Number(e);if("boolean"==typeof e)return new w.Boolean(e);if(e instanceof Date){let t=this.dateHelper.dateToNumber({day:e.getDate(),month:e.getMonth()+1,year:e.getFullYear()})+iQ({hours:e.getHours(),minutes:e.getMinutes(),seconds:e.getSeconds()+e.getMilliseconds()/1e3});return t<0?new w.Error(d.NUM,eY.DateBounds):new w.Number(t%1==0?new tO(t,"Date()"):t<1?new tH(t,"Date()"):new t_(t,"Date()"))}if("string"==typeof e){let r;if("true"===(r=e.toLowerCase())||"false"===r)return new w.Boolean("true"===e.toLowerCase());{var t;let r;if(e.startsWith("="))return new w.Formula(e);if(t=this.config.errorMapping,r=e.toUpperCase(),/#[A-Za-z0-9\/]+[?!]?/.test(r)&&Object.prototype.hasOwnProperty.call(t,r))return new w.Error(this.config.errorMapping[e.toUpperCase()]);let i,n=e.trim(),o=0;if(n.endsWith("%"))o=1,n=n.slice(0,n.length-1);else{let e=this.currencyMatcher(n);void 0!==e&&(o=2,[i,n]=e)}let s=this.numberLiteralsHelper.numericStringToMaybeNumber(n);if(void 0!==s){let e;return e=1===o?new tP(s/100):2===o?new tk(s,i):s,new w.Number(e)}let l=this.dateHelper.dateStringToDateNumber(n);return void 0!==l?new w.Number(l):new w.String(e.startsWith("'")?e.slice(1):e)}}else throw new re(e)}currencyMatcher(e){for(let t of this.config.currencySymbol){if(e.startsWith(t))return[t,e.slice(t.length)];if(e.endsWith(t))return[t,e.slice(0,e.length-t.length)]}}}(L=y||(y={}))[L.COPY=0]="COPY",L[L.CUT=1]="CUT",(F=b||(b={}))[F.VALUE=0]="VALUE",F[F.EMPTY=1]="EMPTY",F[F.FORMULA=2]="FORMULA",F[F.PARSING_ERROR=3]="PARSING_ERROR";class no{constructor(e,t,r,i,n){this.sourceLeftCorner=e,this.width=t,this.height=r,this.type=i,this.content=n}*getContent(e){if(void 0!==this.content)for(let t=0;t<this.height;++t)for(let r=0;r<this.width;++r)yield[r0(e.sheet,e.col+r,e.row+t),this.content[t][r]]}}class ns{constructor(e,t,r){this.dependencyGraph=t,this.operations=r,this.maxRows=e.maxRows,this.maxColumns=e.maxColumns}cut(e,t,r){this.clipboard=new no(e,t,r,y.CUT)}copy(e,t,r){let i=[];for(let n=0;n<r;++n){i[n]=[];for(let r=0;r<t;++r){let t=this.operations.getClipboardCell(r0(e.sheet,e.col+r,e.row+n));i[n].push(t)}}this.clipboard=new no(e,t,r,y.COPY,i)}abortCut(){this.clipboard&&this.clipboard.type===y.CUT&&this.clear()}clear(){this.clipboard=void 0}ensureItIsPossibleToCopyPaste(e){if(void 0===this.clipboard)return;if(r1(e)||!this.dependencyGraph.sheetMapping.hasSheetWithId(e.sheet))throw new t1("a valid target address.");let t=r7.spanFrom(e,this.clipboard.width,this.clipboard.height);if(t.exceedsSheetSizeLimits(this.maxColumns,this.maxRows))throw new tZ;if(this.dependencyGraph.arrayMapping.isFormulaArrayInRange(t))throw Error("It is not possible to paste onto an array")}isCutClipboard(){return void 0!==this.clipboard&&this.clipboard.type===y.CUT}isCopyClipboard(){return void 0!==this.clipboard&&this.clipboard.type===y.COPY}}class nl{performEagerTransformations(e,t){for(let r of e.arrayFormulaNodes()){let[i,n]=this.transformSingleAst(r.getFormula(e.lazilyTransformingAstService),r.getAddress(e.lazilyTransformingAstService)),o=t.rememberNewAst(i);r.setFormula(o),r.setAddress(n)}}transformSingleAst(e,t){return[this.transformAst(e,t),this.fixNodeAddress(t)]}transformAst(e,t){switch(e.type){case n.CELL_REFERENCE:return this.transformCellReferenceAst(e,t);case n.CELL_RANGE:return this.transformCellRangeAst(e,t);case n.COLUMN_RANGE:return this.transformColumnRangeAst(e,t);case n.ROW_RANGE:return this.transformRowRangeAst(e,t);case n.EMPTY:case n.ERROR:case n.NUMBER:case n.NAMED_EXPRESSION:case n.ERROR_WITH_RAW_INPUT:case n.STRING:return e;case n.PERCENT_OP:case n.MINUS_UNARY_OP:case n.PLUS_UNARY_OP:return Object.assign(Object.assign({},e),{value:this.transformAst(e.value,t)});case n.FUNCTION_CALL:return Object.assign(Object.assign({},e),{procedureName:e.procedureName,args:e.args.map(e=>this.transformAst(e,t))});case n.PARENTHESIS:return Object.assign(Object.assign({},e),{expression:this.transformAst(e.expression,t)});case n.ARRAY:return Object.assign(Object.assign({},e),{args:e.args.map(e=>e.map(e=>this.transformAst(e,t)))});default:return Object.assign(Object.assign({},e),{left:this.transformAst(e.left,t),right:this.transformAst(e.right,t)})}}transformCellReferenceAst(e,t){let r=this.transformCellAddress(e.reference,t);return r instanceof el?Object.assign(Object.assign({},e),{reference:r}):r===d.REF?eB(new rq(d.REF)):e}transformCellRangeAst(e,t){let r=this.transformCellRange(e.start,e.end,t);return Array.isArray(r)?Object.assign(Object.assign({},e),{start:r[0],end:r[1]}):r===d.REF?eB(new rq(d.REF)):e}transformColumnRangeAst(e,t){let r=this.transformColumnRange(e.start,e.end,t);return Array.isArray(r)?Object.assign(Object.assign({},e),{start:r[0],end:r[1]}):r===d.REF?eB(new rq(d.REF)):e}transformRowRangeAst(e,t){let r=this.transformRowRange(e.start,e.end,t);return Array.isArray(r)?Object.assign(Object.assign({},e),{start:r[0],end:r[1]}):r===d.REF?eB(new rq(d.REF)):e}}class na extends nl{constructor(e){super(),this.columnsSpan=e}get sheet(){return this.columnsSpan.sheet}isIrreversible(){return!1}transformRowRangeAst(e,t){return e}transformCellRange(e,t,r){return this.transformRange(e,t,r)}transformRowRange(e,t,r){throw Error("Not implemented")}transformColumnRange(e,t,r){return this.transformRange(e,t,r)}transformCellAddress(e,t){let r=r5(e,t);if(r!==this.columnsSpan.sheet&&t.sheet!==this.columnsSpan.sheet)return!1;let i=e.toSimpleColumnAddress(t);if(r===this.columnsSpan.sheet&&t.sheet!==this.columnsSpan.sheet)if(this.columnsSpan.columnStart<=i.col)return e.shiftedByColumns(this.columnsSpan.numberOfColumns);else return!1;if(t.sheet===this.columnsSpan.sheet&&r!==this.columnsSpan.sheet)return!e.isColumnAbsolute()&&!(t.col<this.columnsSpan.columnStart)&&e.shiftedByColumns(-this.columnsSpan.numberOfColumns);if(e.isColumnAbsolute())if(e.col<this.columnsSpan.columnStart)return!1;else return e.shiftedByColumns(this.columnsSpan.numberOfColumns);if(e.toSimpleColumnAddress(t).col<this.columnsSpan.columnStart)if(t.col<this.columnsSpan.columnStart)return!1;else return e.shiftedByColumns(-this.columnsSpan.numberOfColumns);return!!(t.col<this.columnsSpan.columnStart)&&e.shiftedByColumns(this.columnsSpan.numberOfColumns)}fixNodeAddress(e){return this.columnsSpan.sheet===e.sheet&&this.columnsSpan.columnStart<=e.col?Object.assign(Object.assign({},e),{col:e.col+this.columnsSpan.numberOfColumns}):e}transformRange(e,t,r){let i=this.transformCellAddress(e,r),n=this.transformCellAddress(t,r);return i===d.REF||n===d.REF?d.REF:(!!i||!!n)&&[i||e,n||t]}}class nh extends nl{constructor(e){super(),this.rowsSpan=e}get sheet(){return this.rowsSpan.sheet}isIrreversible(){return!1}transformColumnRangeAst(e,t){return e}transformCellRange(e,t,r){return this.transformRange(e,t,r)}transformRowRange(e,t,r){return this.transformRange(e,t,r)}transformColumnRange(e,t,r){throw Error("Not implemented")}transformCellAddress(e,t){let r=r5(e,t);if(r!==this.rowsSpan.sheet&&t.sheet!==this.rowsSpan.sheet)return!1;let i=e.toSimpleRowAddress(t);if(r===this.rowsSpan.sheet&&t.sheet!==this.rowsSpan.sheet)if(this.rowsSpan.rowStart<=i.row)return e.shiftedByRows(this.rowsSpan.numberOfRows);else return!1;if(t.sheet===this.rowsSpan.sheet&&r!==this.rowsSpan.sheet)return!e.isRowAbsolute()&&!(t.row<this.rowsSpan.rowStart)&&e.shiftedByRows(-this.rowsSpan.numberOfRows);if(e.isRowAbsolute())if(e.row<this.rowsSpan.rowStart)return!1;else return e.shiftedByRows(this.rowsSpan.numberOfRows);if(i.row<this.rowsSpan.rowStart)if(t.row<this.rowsSpan.rowStart)return!1;else return e.shiftedByRows(-this.rowsSpan.numberOfRows);return!!(t.row<this.rowsSpan.rowStart)&&e.shiftedByRows(this.rowsSpan.numberOfRows)}fixNodeAddress(e){return this.rowsSpan.sheet===e.sheet&&this.rowsSpan.rowStart<=e.row?Object.assign(Object.assign({},e),{row:e.row+this.rowsSpan.numberOfRows}):e}transformRange(e,t,r){let i=this.transformCellAddress(e,r),n=this.transformCellAddress(t,r);return i===d.REF||n===d.REF?d.REF:(!!i||!!n)&&[i||e,n||t]}}class nd extends nl{constructor(e){super(),this.sheet=e}isIrreversible(){return!0}fixNodeAddress(e){return e}transformCellAddress(e,t){return!!e.isInvalid(t)&&d.REF}transformCellRange(e,t,r){return!!(e.isInvalid(r)||t.isInvalid(r))&&d.REF}transformColumnRange(e,t,r){return!!(e.isInvalid(r)||t.isInvalid(r))&&d.REF}transformRowRange(e,t,r){return!!(e.isInvalid(r)||t.isInvalid(r))&&d.REF}}class nu extends nl{constructor(e,t,r,i){super(),this.sourceRange=e,this.toRight=t,this.toBottom=r,this.toSheet=i,this.dependentFormulaTransformer=new nc(e,t,r,i)}get sheet(){return this.sourceRange.sheet}isIrreversible(){return!0}transformSingleAst(e,t){return this.sourceRange.addressInRange(t)?[this.transformAst(e,t),this.fixNodeAddress(t)]:this.dependentFormulaTransformer.transformSingleAst(e,t)}fixNodeAddress(e){return r0(this.toSheet,e.col+this.toRight,e.row+this.toBottom)}transformCellAddress(e,t){return this.transformAddress(e,t)}transformCellRange(e,t,r){return this.transformRange(e,t,r)}transformColumnRange(e,t,r){return this.transformRange(e,t,r)}transformRowRange(e,t,r){return this.transformRange(e,t,r)}transformAddress(e,t){let r=this.sourceRange;if(e instanceof el){let i=e.toSimpleCellAddress(t);if(r.addressInRange(i))return e.shiftAbsoluteDimensions(this.toRight,this.toBottom)}return e.shiftRelativeDimensions(-this.toRight,-this.toBottom)}transformRange(e,t,r){let i=this.sourceRange;if(e instanceof el&&t instanceof el){let n=e.toSimpleCellAddress(r),o=t.toSimpleCellAddress(r);if(i.addressInRange(n)&&i.addressInRange(o))return[e.shiftAbsoluteDimensions(this.toRight,this.toBottom),t.shiftAbsoluteDimensions(this.toRight,this.toBottom)]}return[e.shiftRelativeDimensions(-this.toRight,-this.toBottom),t.shiftRelativeDimensions(-this.toRight,-this.toBottom)]}}class nc extends nl{constructor(e,t,r,i){super(),this.sourceRange=e,this.toRight=t,this.toBottom=r,this.toSheet=i}get sheet(){return this.sourceRange.sheet}isIrreversible(){return!0}fixNodeAddress(e){return e}transformCellAddress(e,t){return!!this.shouldMove(e,t)&&e.moved(this.toSheet,this.toRight,this.toBottom)}transformCellRange(e,t,r){return this.transformRange(e,t,r)}transformColumnRange(e,t,r){return this.transformRange(e,t,r)}transformRowRange(e,t,r){return this.transformRange(e,t,r)}shouldMove(e,t){return e instanceof el?this.sourceRange.addressInRange(e.toSimpleCellAddress(t)):e instanceof es?this.sourceRange.rowInRange(e.toSimpleRowAddress(t))&&!this.sourceRange.isFinite():this.sourceRange.columnInRange(e.toSimpleColumnAddress(t))&&!this.sourceRange.isFinite()}transformRange(e,t,r){let i=this.transformCellAddress(e,r),n=this.transformCellAddress(t,r);return!!i&&!!n&&[i,n]}}class ng extends nl{constructor(e){super(),this.columnsSpan=e}get sheet(){return this.columnsSpan.sheet}isIrreversible(){return!0}transformRowRangeAst(e,t){return e}transformCellRange(e,t,r){return this.transformRange(e,t,r)}transformRowRange(e,t,r){throw Error("Not implemented")}transformColumnRange(e,t,r){return this.transformRange(e,t,r)}transformCellAddress(e,t){let r=r5(e,t);if(this.columnsSpan.sheet!==t.sheet&&this.columnsSpan.sheet!==r)return!1;if(this.columnsSpan.sheet!==t.sheet&&this.columnsSpan.sheet===r){let r=e.toSimpleColumnAddress(t);if(r.col<this.columnsSpan.columnStart)return!1;if(r.col>this.columnsSpan.columnEnd)return e.shiftedByColumns(-this.columnsSpan.numberOfColumns)}if(this.columnsSpan.sheet===t.sheet&&this.columnsSpan.sheet!==r){if(e.isColumnAbsolute())return!1;else if(t.col<this.columnsSpan.columnStart)return!1;else if(t.col>this.columnsSpan.columnEnd)return e.shiftedByColumns(this.columnsSpan.numberOfColumns)}if(this.columnsSpan.sheet===t.sheet&&this.columnsSpan.sheet===r)if(e.isColumnAbsolute()){if(e.col<this.columnsSpan.columnStart)return!1;else if(e.col>this.columnsSpan.columnEnd)return e.shiftedByColumns(-this.columnsSpan.numberOfColumns)}else{let r=e.toSimpleColumnAddress(t);if(r.col<this.columnsSpan.columnStart){if(t.col<this.columnsSpan.columnStart)return!1;else if(t.col>this.columnsSpan.columnEnd)return e.shiftedByColumns(this.columnsSpan.numberOfColumns)}else if(r.col>this.columnsSpan.columnEnd){if(t.col<this.columnsSpan.columnStart)return e.shiftedByColumns(-this.columnsSpan.numberOfColumns);else if(t.col>this.columnsSpan.columnEnd)return!1}}return d.REF}fixNodeAddress(e){return this.columnsSpan.sheet===e.sheet&&this.columnsSpan.columnStart<=e.col?Object.assign(Object.assign({},e),{col:e.col-this.columnsSpan.numberOfColumns}):e}transformRange(e,t,r){let i=r5(e,r),n=e,o=t;if(this.columnsSpan.sheet===i){let i=e.toSimpleColumnAddress(r),s=t.toSimpleColumnAddress(r);if(this.columnsSpan.columnStart<=i.col&&this.columnsSpan.columnEnd>=s.col)return d.REF;i.col>=this.columnsSpan.columnStart&&i.col<=this.columnsSpan.columnEnd&&(n=e.shiftedByColumns(this.columnsSpan.columnEnd-i.col+1)),s.col>=this.columnsSpan.columnStart&&s.col<=this.columnsSpan.columnEnd&&(o=t.shiftedByColumns(-(s.col-this.columnsSpan.columnStart+1)))}let s=this.transformCellAddress(n,r),l=this.transformCellAddress(o,r);if(!1===s&&!1===l)return[n,o];if(s!==d.REF&&l!==d.REF)return[s||n,l||o];throw Error("Cannot happen")}}class np extends nl{constructor(e){super(),this.rowsSpan=e}get sheet(){return this.rowsSpan.sheet}isIrreversible(){return!0}transformColumnRangeAst(e,t){return e}transformCellAddress(e,t){let r=r5(e,t);if(this.rowsSpan.sheet!==t.sheet&&this.rowsSpan.sheet!==r)return!1;if(this.rowsSpan.sheet!==t.sheet&&this.rowsSpan.sheet===r){let r=e.toSimpleRowAddress(t);if(r.row<this.rowsSpan.rowStart)return!1;if(r.row>this.rowsSpan.rowEnd)return e.shiftedByRows(-this.rowsSpan.numberOfRows)}if(this.rowsSpan.sheet===t.sheet&&this.rowsSpan.sheet!==r){if(e.isRowAbsolute())return!1;else if(t.row<this.rowsSpan.rowStart)return!1;else if(t.row>this.rowsSpan.rowEnd)return e.shiftedByRows(this.rowsSpan.numberOfRows)}if(this.rowsSpan.sheet===t.sheet&&this.rowsSpan.sheet===r)if(e.isRowAbsolute()){if(e.row<this.rowsSpan.rowStart)return!1;else if(e.row>this.rowsSpan.rowEnd)return e.shiftedByRows(-this.rowsSpan.numberOfRows)}else{let r=e.toSimpleRowAddress(t);if(r.row<this.rowsSpan.rowStart){if(t.row<this.rowsSpan.rowStart)return!1;else if(t.row>this.rowsSpan.rowEnd)return e.shiftedByRows(this.rowsSpan.numberOfRows)}else if(r.row>this.rowsSpan.rowEnd){if(t.row<this.rowsSpan.rowStart)return e.shiftedByRows(-this.rowsSpan.numberOfRows);else if(t.row>this.rowsSpan.rowEnd)return!1}}return d.REF}transformCellRange(e,t,r){return this.transformRange(e,t,r)}transformRowRange(e,t,r){return this.transformRange(e,t,r)}transformColumnRange(e,t,r){throw Error("Not implemented")}fixNodeAddress(e){return this.rowsSpan.sheet===e.sheet&&this.rowsSpan.rowStart<=e.row?Object.assign(Object.assign({},e),{row:e.row-this.rowsSpan.numberOfRows}):e}transformRange(e,t,r){let i=r5(e,r),n=e,o=t;if(this.rowsSpan.sheet===i){let i=e.toSimpleRowAddress(r),s=t.toSimpleRowAddress(r);if(this.rowsSpan.rowStart<=i.row&&this.rowsSpan.rowEnd>=s.row)return d.REF;i.row>=this.rowsSpan.rowStart&&i.row<=this.rowsSpan.rowEnd&&(n=e.shiftedByRows(this.rowsSpan.rowEnd-i.row+1)),s.row>=this.rowsSpan.rowStart&&s.row<=this.rowsSpan.rowEnd&&(o=t.shiftedByRows(-(s.row-this.rowsSpan.rowStart+1)))}let s=this.transformCellAddress(n,r),l=this.transformCellAddress(o,r);return!1===s&&!1===l?[n,o]:s===d.REF||l===d.REF?d.REF:[s||n,l||o]}}class nm extends nl{constructor(e,t){super(),this.sheetIdToKeep=e,this.sheetBeingMerged=t}get sheet(){return this.sheetIdToKeep}isIrreversible(){return!0}transformCellAddress(e,t){return this.updateSheetInAddress(e)}transformCellRange(e,t,r){return this.transformRange(e,t)}transformColumnRange(e,t,r){return this.transformRange(e,t)}transformRowRange(e,t,r){return this.transformRange(e,t)}fixNodeAddress(e){return e}transformRange(e,t){let r=this.updateSheetInAddress(e),i=this.updateSheetInAddress(t);return(!!r||!!i)&&[r||e,i||t]}updateSheetInAddress(e){return e.sheet===this.sheetBeingMerged&&e.withSheet(this.sheetIdToKeep)}}class nf{constructor(e,t){this.sheet=e,this.indexes=t}normalizedIndexes(){return nS(this.indexes)}rowsSpans(){return this.normalizedIndexes().map(e=>tG.fromNumberOfRows(this.sheet,e[0],e[1]))}}class nw{constructor(e,t){this.sheet=e,this.indexes=t}normalizedIndexes(){return nv(this.indexes)}rowsSpans(){return this.normalizedIndexes().map(e=>tG.fromNumberOfRows(this.sheet,e[0],e[1]))}}class ny{constructor(e,t){this.sheet=e,this.indexes=t}normalizedIndexes(){return nv(this.indexes)}columnsSpans(){return this.normalizedIndexes().map(e=>tj.fromNumberOfColumns(this.sheet,e[0],e[1]))}}class nb{constructor(e,t){this.sheet=e,this.indexes=t}normalizedIndexes(){return nS(this.indexes)}columnsSpans(){return this.normalizedIndexes().map(e=>tj.fromNumberOfColumns(this.sheet,e[0],e[1]))}}class nC{constructor(e,t,r,i,n,o,s,l,a){this.dependencyGraph=t,this.columnSearch=r,this.cellContentParser=i,this.parser=n,this.stats=o,this.lazilyTransformingAstService=s,this.namedExpressions=l,this.arraySizePredictor=a,this.changes=tB.empty(),this.allocateNamedExpressionAddressSpace(),this.maxColumns=e.maxColumns,this.maxRows=e.maxRows}get sheetMapping(){return this.dependencyGraph.sheetMapping}get addressMapping(){return this.dependencyGraph.addressMapping}removeRows(e){let t=[];for(let r of e.rowsSpans()){let e=this.doRemoveRows(r);e&&t.push(e)}return t}addRows(e){for(let t of e.rowsSpans())this.doAddRows(t)}addColumns(e){for(let t of e.columnsSpans())this.doAddColumns(t)}removeColumns(e){let t=[];for(let r of e.columnsSpans()){let e=this.doRemoveColumns(r);e&&t.push(e)}return t}clearSheet(e){this.dependencyGraph.clearSheet(e),this.columnSearch.removeSheet(e)}addSheet(e){let t=this.sheetMapping.addSheet(e);return this.dependencyGraph.addSheet(t),{sheetName:this.sheetMapping.getSheetNameOrThrowError(t),sheetId:t}}addSheetWithId(e,t){this.sheetMapping.addSheetWithId(e,t),this.dependencyGraph.addSheet(e)}addPlaceholderSheetWithId(e,t){this.sheetMapping.addPlaceholderWithId(e,t),this.addressMapping.addSheetStrategyPlaceholderIfNotExists(e)}removeSheet(e){return this.dependencyGraph.removeSheet(e),this.columnSearch.removeSheet(e),this.namedExpressions.getAllNamedExpressionsForScope(e).map(t=>this.removeNamedExpression(t.normalizeExpressionName(),e))}removeSheetByName(e){let t=this.sheetMapping.getSheetIdOrThrowError(e);return this.removeSheet(t)}renameSheet(e,t){let r,{previousDisplayName:i,mergedWithPlaceholderSheet:n}=this.sheetMapping.renameSheet(e,t);return void 0!==n&&(this.dependencyGraph.mergeSheets(e,n),this.stats.measure(l.TRANSFORM_ASTS,()=>{let t=new nm(e,n);t.performEagerTransformations(this.dependencyGraph,this.parser),r=this.lazilyTransformingAstService.addTransformation(t)})),{previousDisplayName:i,version:r,mergedPlaceholderSheetId:n}}moveRows(e,t,r,i){let n=tG.fromNumberOfRows(e,i,r);this.lazilyTransformingAstService.beginCombinedMode(e),this.doAddRows(n),i<t&&(t+=r);let o=r0(e,0,t),s=r0(e,0,i);this.moveCells(o,1/0,r,s);let l=tG.fromNumberOfRows(e,t,r);return this.doRemoveRows(l),this.lazilyTransformingAstService.commitCombinedMode()}moveColumns(e,t,r,i){let n=tj.fromNumberOfColumns(e,i,r);this.lazilyTransformingAstService.beginCombinedMode(e),this.doAddColumns(n),i<t&&(t+=r);let o=r0(e,t,0),s=r0(e,i,0);this.moveCells(o,r,1/0,s);let l=tj.fromNumberOfColumns(e,t,r);return this.doRemoveColumns(l),this.lazilyTransformingAstService.commitCombinedMode()}moveCells(e,t,r,i){this.ensureItIsPossibleToMoveCells(e,t,r,i);let n=r7.spanFrom(e,t,r),o=r7.spanFrom(i,t,r),s=i.col-e.col,a=i.row-e.row,h=i.sheet,d=this.getRangeClipboardCells(o),u=this.dependencyGraph.rawValuesFromRange(o);this.columnSearch.removeValues(u);let c=this.dependencyGraph.rawValuesFromRange(n);this.columnSearch.moveValues(c,s,a,h);let g=0;this.stats.measure(l.TRANSFORM_ASTS,()=>{let e=new nu(n,s,a,h);e.performEagerTransformations(this.dependencyGraph,this.parser),g=this.lazilyTransformingAstService.addTransformation(e)}),this.dependencyGraph.moveCells(n,s,a,h);let p=this.updateNamedExpressionsForMovedCells(e,t,r,i);return{version:g,overwrittenCellsData:d,addedGlobalNamedExpressions:p}}setRowOrder(e,t){let r=[],i=[];for(let[n,o]of t)if(n!==o){let t=r7.spanFrom({sheet:e,col:0,row:n},1/0,1),s=this.getRangeClipboardCells(t);i=i.concat(s),r.push(s.map(([{sheet:e,col:t},r])=>[{sheet:e,col:t,row:o},r]))}return r.forEach(t=>this.restoreClipboardCells(e,t.values())),i}setColumnOrder(e,t){let r=[],i=[];for(let[n,o]of t)if(n!==o){let t=r7.spanFrom({sheet:e,col:n,row:0},1,1/0),s=this.getRangeClipboardCells(t);i=i.concat(s),r.push(s.map(([{sheet:e,col:t,row:r},i])=>[{sheet:e,col:o,row:r},i]))}return r.forEach(t=>this.restoreClipboardCells(e,t.values())),i}addNamedExpression(e,t,r,i){let n=this.namedExpressions.addNamedExpression(e,r,i);this.storeNamedExpressionInCell(n.address,t),this.adjustNamedExpressionEdges(n,e,r)}restoreNamedExpression(e,t,r){let i=e.displayName;this.restoreCell(e.address,t);let n=this.namedExpressions.restoreNamedExpression(e,r);this.adjustNamedExpressionEdges(n,i,r)}changeNamedExpressionExpression(e,t,r,i){let n=this.namedExpressions.namedExpressionForScope(e,r);if(!n)throw new t5(e);let o=n.copy();n.options=i;let s=this.getClipboardCell(n.address);return this.storeNamedExpressionInCell(n.address,t),[o,s]}removeNamedExpression(e,t){let r=this.namedExpressions.namedExpressionForScope(e,t);if(!r)throw new t5(e);this.namedExpressions.remove(r.displayName,t);let i=this.getClipboardCell(r.address);if(void 0!==t){let t=this.namedExpressions.workbookNamedExpressionOrPlaceholder(e);this.dependencyGraph.exchangeNode(r.address,t.address)}else this.dependencyGraph.setCellEmpty(r.address);return[r,i]}ensureItIsPossibleToMoveCells(e,t,r,i){var n,o,s;if(r1(e)||!(nR(t)&&nR(r)||(n=e,o=t,s=r,0===n.row&&nR(o)&&s===1/0||0===n.col&&nR(s)&&o===1/0))||r1(i)||!this.sheetMapping.hasSheetWithId(e.sheet)||!this.sheetMapping.hasSheetWithId(i.sheet))throw new t1("a valid range of cells to move.");let l=r7.spanFrom(e,t,r),a=r7.spanFrom(i,t,r);if(a.exceedsSheetSizeLimits(this.maxColumns,this.maxRows))throw new tZ;if(this.dependencyGraph.arrayMapping.isFormulaArrayInRange(l))throw new rg;if(this.dependencyGraph.arrayMapping.isFormulaArrayInRange(a))throw new rp}restoreClipboardCells(e,t){let r=[];for(let[i,n]of t)if(this.restoreCell(i,n),n.type===b.FORMULA){let{dependencies:t}=this.parser.fetchCachedResult(n.hash);r.push(...this.updateNamedExpressionsForTargetAddress(e,i,t))}return r}restoreCell(e,t){switch(t.type){case b.VALUE:this.setValueToCell(t,e);break;case b.FORMULA:this.setFormulaToCellFromCache(t.hash,e);break;case b.EMPTY:this.setCellEmpty(e);break;case b.PARSING_ERROR:this.setParsingErrorToCell(t.rawInput,t.errors,e)}}getOldContent(e){let t=this.dependencyGraph.getCell(e);if(void 0===t||t instanceof rV)return[e,{type:b.EMPTY}];if(t instanceof rz)return[e,Object.assign({type:b.VALUE},t.getValues())];if(t instanceof rE)return[t.getAddress(this.lazilyTransformingAstService),{type:b.FORMULA,hash:this.parser.computeHashFromAst(t.getFormula(this.lazilyTransformingAstService))}];if(t instanceof rU)return[e,{type:b.PARSING_ERROR,rawInput:t.rawInput,errors:t.errors}];throw Error("Trying to copy unsupported type")}getClipboardCell(e){let t=this.dependencyGraph.getCell(e);if(void 0===t||t instanceof rV)return{type:b.EMPTY};if(t instanceof rz)return Object.assign({type:b.VALUE},t.getValues());if(t instanceof rT){let r=t.getArrayCellValue(e);return r===tA?{type:b.EMPTY}:{type:b.VALUE,parsedValue:r,rawValue:t.getArrayCellRawValue(e)}}if(t instanceof rx)return{type:b.FORMULA,hash:this.parser.computeHashFromAst(t.getFormula(this.lazilyTransformingAstService))};if(t instanceof rU)return{type:b.PARSING_ERROR,rawInput:t.rawInput,errors:t.errors};throw Error("Trying to copy unsupported type")}getSheetClipboardCells(e){let t=this.dependencyGraph.getSheetHeight(e),r=this.dependencyGraph.getSheetWidth(e),i=Array(t);for(let n=0;n<t;n++){i[n]=Array(r);for(let t=0;t<r;t++){let r=r0(e,t,n);i[n][t]=this.getClipboardCell(r)}}return i}getRangeClipboardCells(e){let t=[];for(let r of e.addresses(this.dependencyGraph))t.push([r,this.getClipboardCell(r)]);return t}setCellContent(e,t){let r=this.cellContentParser.parse(t),n=this.getOldContent(e);if(r instanceof w.Formula){let t=this.parser.parse(r.formula,e),{ast:n,errors:o}=t;if(o.length>0)this.setParsingErrorToCell(r.formula,o,e);else try{let r=this.arraySizePredictor.checkArraySize(n,e);if(r.width<=0||r.height<=0)throw Error("Incorrect array size");this.setFormulaToCell(e,r,t)}catch(n){if(!n.message)throw n;let t={type:i.InvalidRangeSize,message:"Invalid range size."};this.setParsingErrorToCell(r.formula,[t],e)}}else r instanceof w.Empty?this.setCellEmpty(e):this.setValueToCell({parsedValue:r.value,rawValue:t},e);return n}setSheetContent(e,t){this.clearSheet(e);for(let r=0;r<t.length;r++)for(let i=0;i<t[r].length;i++){let n=r0(e,i,r);this.setCellContent(n,t[r][i])}}setParsingErrorToCell(e,t,r){this.removeCellValueFromColumnSearch(r);let i=new rU(t,e),n=this.dependencyGraph.setParsingErrorToCell(r,i);this.columnSearch.applyChanges(n.getChanges()),this.changes.addAll(n),this.changes.addChange(i.getCellValue(),r)}setFormulaToCell(e,t,{ast:r,hasVolatileFunction:i,hasStructuralChangeFunction:n,dependencies:o}){this.removeCellValueFromColumnSearch(e);let s=this.dependencyGraph.setFormulaToCell(e,r,tx(o,e),t,i,n);this.columnSearch.applyChanges(s.getChanges()),this.changes.addAll(s)}setValueToCell(e,t){this.changeCellValueInColumnSearch(t,e.parsedValue);let r=this.dependencyGraph.setValueToCell(t,e);this.columnSearch.applyChanges(r.getChanges().filter(e=>!r4(e.address,t))),this.changes.addAll(r),this.changes.addChange(e.parsedValue,t)}setCellEmpty(e){if(this.dependencyGraph.isArrayInternalCell(e))return;this.removeCellValueFromColumnSearch(e);let t=this.dependencyGraph.setCellEmpty(e);this.columnSearch.applyChanges(t.getChanges()),this.changes.addAll(t),this.changes.addChange(tA,e)}setFormulaToCellFromCache(e,t){let{ast:r,hasVolatileFunction:i,hasStructuralChangeFunction:n,dependencies:o}=this.parser.fetchCachedResult(e),s=tx(o,t),[l]=new nd(t.sheet).transformSingleAst(r,t);this.parser.rememberNewAst(l);let a=s.filter(e=>e instanceof tT||(e instanceof r7?!(r1(e.start)||r1(e.end)):!r1(e))),h=this.arraySizePredictor.checkArraySize(r,t);this.dependencyGraph.setFormulaToCell(t,l,a,h,i,n)}rowEffectivelyNotInSheet(e,t){return e>=this.dependencyGraph.addressMapping.getSheetHeight(t)}getAndClearContentChanges(){let e=this.changes;return this.changes=tB.empty(),e}forceApplyPostponedTransformations(){this.dependencyGraph.forceApplyPostponedTransformations(),this.columnSearch.forceApplyPostponedTransformations()}doRemoveRows(e){if(this.rowEffectivelyNotInSheet(e.rowStart,e.sheet))return;let t=[];for(let[r]of this.dependencyGraph.entriesFromRowsSpan(e))t.push({address:r,cellType:this.getClipboardCell(r)});let{affectedArrays:r,contentChanges:i}=this.dependencyGraph.removeRows(e);this.columnSearch.applyChanges(i.getChanges());let n=0;return this.stats.measure(l.TRANSFORM_ASTS,()=>{let t=new np(e);t.performEagerTransformations(this.dependencyGraph,this.parser),n=this.lazilyTransformingAstService.addTransformation(t)}),this.rewriteAffectedArrays(r),{version:n,removedCells:t,rowFrom:e.rowStart,rowCount:e.numberOfRows}}doRemoveColumns(e){if(this.columnEffectivelyNotInSheet(e.columnStart,e.sheet))return;let t=[];for(let[r]of this.dependencyGraph.entriesFromColumnsSpan(e))t.push({address:r,cellType:this.getClipboardCell(r)});let{affectedArrays:r,contentChanges:i}=this.dependencyGraph.removeColumns(e);this.columnSearch.applyChanges(i.getChanges()),this.columnSearch.removeColumns(e);let n=0;return this.stats.measure(l.TRANSFORM_ASTS,()=>{let t=new ng(e);t.performEagerTransformations(this.dependencyGraph,this.parser),n=this.lazilyTransformingAstService.addTransformation(t)}),this.rewriteAffectedArrays(r),{version:n,removedCells:t,columnFrom:e.columnStart,columnCount:e.numberOfColumns}}doAddRows(e){if(this.rowEffectivelyNotInSheet(e.rowStart,e.sheet))return;let{affectedArrays:t}=this.dependencyGraph.addRows(e);this.stats.measure(l.TRANSFORM_ASTS,()=>{let t=new nh(e);t.performEagerTransformations(this.dependencyGraph,this.parser),this.lazilyTransformingAstService.addTransformation(t)}),this.rewriteAffectedArrays(t)}rewriteAffectedArrays(e){for(let t of e.values()){if(t.array.size.isRef)continue;let e=t.getFormula(this.lazilyTransformingAstService),r=t.getAddress(this.lazilyTransformingAstService),i=this.parser.computeHashFromAst(e);this.setFormulaToCellFromCache(i,r)}}doAddColumns(e){if(this.columnEffectivelyNotInSheet(e.columnStart,e.sheet))return;let{affectedArrays:t,contentChanges:r}=this.dependencyGraph.addColumns(e);this.columnSearch.addColumns(e),this.columnSearch.applyChanges(r.getChanges()),this.stats.measure(l.TRANSFORM_ASTS,()=>{let t=new na(e);t.performEagerTransformations(this.dependencyGraph,this.parser),this.lazilyTransformingAstService.addTransformation(t)}),this.rewriteAffectedArrays(t)}columnEffectivelyNotInSheet(e,t){return e>=this.dependencyGraph.addressMapping.getSheetWidth(t)}adjustNamedExpressionEdges(e,t,r){if(void 0===r)return;let{vertex:i,id:n}=this.dependencyGraph.fetchCellOrCreateEmpty(e.address),o=null!=n?n:i.idInGraph,s=this.namedExpressions.workbookNamedExpressionOrPlaceholder(t),{vertex:l,id:a}=this.dependencyGraph.fetchCellOrCreateEmpty(s.address),h=null!=a?a:l.idInGraph;for(let t of this.dependencyGraph.graph.adjacentNodes(l))if(t instanceof rx&&t.getAddress(this.lazilyTransformingAstService).sheet===r){let r=t.getFormula(this.lazilyTransformingAstService),i=t.getAddress(this.lazilyTransformingAstService),{dependencies:n}=this.parser.fetchCachedResultForAst(r);for(let r of tx(n,i))r instanceof tT&&r.name.toLowerCase()===e.displayName.toLowerCase()&&(this.dependencyGraph.graph.removeEdgeIfExists(h,t),this.dependencyGraph.graph.addEdge(o,t))}}storeNamedExpressionInCell(e,t){let r=this.cellContentParser.parse(t);if(r instanceof w.Formula){let t=this.parser.parse(r.formula,r0(-1,0,0));if(t$(t.ast))throw new rm;let{ast:i,hasVolatileFunction:n,hasStructuralChangeFunction:o,dependencies:s}=t;this.dependencyGraph.setFormulaToCell(e,i,tx(s,e),iT.scalar(),n,o)}else r instanceof w.Empty?this.setCellEmpty(e):this.setValueToCell({parsedValue:r.value,rawValue:t},e)}updateNamedExpressionsForMovedCells(e,t,r,i){if(e.sheet===i.sheet)return[];let n=[];for(let o of r7.spanFrom(i,t,r).addresses(this.dependencyGraph)){let t=this.addressMapping.getCell(o,{throwIfCellNotExists:!0});if(t instanceof rx&&o.sheet!==e.sheet){let r=t.getFormula(this.lazilyTransformingAstService),{dependencies:i}=this.parser.fetchCachedResultForAst(r);n.push(...this.updateNamedExpressionsForTargetAddress(e.sheet,o,i))}}return n}updateNamedExpressionsForTargetAddress(e,t,r){if(e===t.sheet)return[];let i=[],n=this.addressMapping.getCellOrThrow(t);for(let o of tx(r,t)){if(!(o instanceof tT))continue;let r=o.name,s=this.dependencyGraph.fetchNamedExpressionVertex(r,e).vertex,l=this.namedExpressions.isExpressionInScope(r,t.sheet)?this.dependencyGraph.fetchNamedExpressionVertex(r,t.sheet).vertex:this.copyOrFetchGlobalNamedExpressionVertex(r,s,i);l!==s&&(this.dependencyGraph.graph.removeEdgeIfExists(s,n),this.dependencyGraph.graph.addEdge(l,n))}return i}allocateNamedExpressionAddressSpace(){this.dependencyGraph.addressMapping.addSheetWithStrategy(tW.SHEET_FOR_WORKBOOK_EXPRESSIONS,new rW(0,0))}copyOrFetchGlobalNamedExpressionVertex(e,t,r){let i=this.namedExpressions.namedExpressionForScope(e);if(void 0===i)if(i=this.namedExpressions.addNamedExpression(e),r.push(i.normalizeExpressionName()),t instanceof rx){let{ast:e,hasVolatileFunction:r,hasStructuralChangeFunction:n,dependencies:o}=this.parser.fetchCachedResultForAst(t.getFormula(this.lazilyTransformingAstService));this.dependencyGraph.setFormulaToCell(i.address,e,tx(o,i.address),iT.scalar(),r,n)}else t instanceof rV?this.setCellEmpty(i.address):t instanceof rz&&this.setValueToCell(t.getValues(),i.address);return this.dependencyGraph.fetchCellOrCreateEmpty(i.address).vertex}removeCellValueFromColumnSearch(e){if(this.isNotComputed(e))return;let t=this.dependencyGraph.getCellValue(e);this.columnSearch.remove(tM(t),e)}changeCellValueInColumnSearch(e,t){if(this.isNotComputed(e))return;let r=this.dependencyGraph.getCellValue(e);this.columnSearch.change(tM(r),tM(t),e)}isNotComputed(e){let t=this.dependencyGraph.getCell(e);return!!t&&t instanceof rE&&!t.isComputed()}}function nS(e){if(e.length<=1)return e;let t=[...e].sort(([e],[t])=>e-t),r=t.reduce((e,[t,r])=>{let i=e[e.length-1],n=i[0]+i[1];return t<=n?i[1]+=Math.max(0,r-(n-t)):e.push([t,r]),e},[t[0]]),i=0;for(let e=0;e<r.length;++e)r[e][0]-=i,i+=r[e][1];return r}function nv(e){if(e.length<=1)return e;let t=[...e].sort(([e],[t])=>e-t),r=t.reduce((e,[t,r])=>{let i=e[e.length-1];return t===i[0]?i[1]=Math.max(i[1],r):e.push([t,r]),e},[t[0]]),i=0;for(let e=0;e<r.length;++e)r[e][0]+=i,i+=r[e][1];return r}function nR(e){return Number.isInteger(e)&&e>0}class nE{getReferencedOldDataVersions(){return[]}}class nT extends nE{constructor(e,t){super(),this.command=e,this.rowsRemovals=t}doUndo(e){e.undoRemoveRows(this)}doRedo(e){e.redoRemoveRows(this)}getReferencedOldDataVersions(){return this.rowsRemovals.filter(e=>e.version>0).map(e=>e.version-1)}}class nx extends nE{constructor(e,t,r,i,n,o,s){super(),this.sourceLeftCorner=e,this.width=t,this.height=r,this.destinationLeftCorner=i,this.overwrittenCellsData=n,this.addedGlobalNamedExpressions=o,this.version=s}doUndo(e){e.undoMoveCells(this)}doRedo(e){e.redoMoveCells(this)}getReferencedOldDataVersions(){return this.version>0?[this.version-1]:[]}}class nA extends nE{constructor(e){super(),this.command=e}doUndo(e){e.undoAddRows(this)}doRedo(e){e.redoAddRows(this)}}class nM extends nE{constructor(e,t,r){super(),this.sheetId=e,this.rowMapping=t,this.oldContent=r}doUndo(e){e.undoSetRowOrder(this)}doRedo(e){e.redoSetRowOrder(this)}}class nI extends nE{constructor(e,t,r){super(),this.sheetId=e,this.columnMapping=t,this.oldContent=r}doUndo(e){e.undoSetColumnOrder(this)}doRedo(e){e.redoSetColumnOrder(this)}}class nN extends nE{constructor(e,t,r){super(),this.sheetId=e,this.oldSheetContent=t,this.newSheetContent=r}doUndo(e){e.undoSetSheetContent(this)}doRedo(e){e.redoSetSheetContent(this)}}class nO extends nE{constructor(e,t,r,i,n){super(),this.sheet=e,this.startRow=t,this.numberOfRows=r,this.targetRow=i,this.version=n,this.undoStart=this.startRow<this.targetRow?this.targetRow-this.numberOfRows:this.targetRow,this.undoEnd=this.startRow>this.targetRow?this.startRow+this.numberOfRows:this.startRow}doUndo(e){e.undoMoveRows(this)}doRedo(e){e.redoMoveRows(this)}getReferencedOldDataVersions(){return this.version>0?[this.version-1]:[]}}class nk extends nE{constructor(e,t,r,i,n){super(),this.sheet=e,this.startColumn=t,this.numberOfColumns=r,this.targetColumn=i,this.version=n,this.undoStart=this.startColumn<this.targetColumn?this.targetColumn-this.numberOfColumns:this.targetColumn,this.undoEnd=this.startColumn>this.targetColumn?this.startColumn+this.numberOfColumns:this.startColumn}doUndo(e){e.undoMoveColumns(this)}doRedo(e){e.redoMoveColumns(this)}getReferencedOldDataVersions(){return this.version>0?[this.version-1]:[]}}class nH extends nE{constructor(e){super(),this.command=e}doUndo(e){e.undoAddColumns(this)}doRedo(e){e.redoAddColumns(this)}}class n_ extends nE{constructor(e,t){super(),this.command=e,this.columnsRemovals=t}doUndo(e){e.undoRemoveColumns(this)}doRedo(e){e.redoRemoveColumns(this)}getReferencedOldDataVersions(){return this.columnsRemovals.filter(e=>e.version>0).map(e=>e.version-1)}}class nP extends nE{constructor(e,t){super(),this.sheetName=e,this.sheetId=t}doUndo(e){e.undoAddSheet(this)}doRedo(e){e.redoAddSheet(this)}}class nD extends nE{constructor(e,t,r,i){super(),this.sheetName=e,this.sheetId=t,this.oldSheetContent=r,this.scopedNamedExpressions=i}doUndo(e){e.undoRemoveSheet(this)}doRedo(e){e.redoRemoveSheet(this)}}class nL extends nE{constructor(e,t,r,i,n){super(),this.sheetId=e,this.oldName=t,this.newName=r,this.version=i,this.mergedPlaceholderSheetId=n}doUndo(e){e.undoRenameSheet(this)}doRedo(e){e.redoRenameSheet(this)}getReferencedOldDataVersions(){return void 0!==this.version&&this.version>0?[this.version-1]:[]}}class nF extends nE{constructor(e,t){super(),this.sheetId=e,this.oldSheetContent=t}doUndo(e){e.undoClearSheet(this)}doRedo(e){e.redoClearSheet(this)}}class nB extends nE{constructor(e){super(),this.cellContents=e}doUndo(e){e.undoSetCellContents(this)}doRedo(e){e.redoSetCellContents(this)}}class nV extends nE{constructor(e,t,r,i){super(),this.targetLeftCorner=e,this.oldContent=t,this.newContent=r,this.addedGlobalNamedExpressions=i}doUndo(e){e.undoPaste(this)}doRedo(e){e.redoPaste(this)}}class nz extends nE{constructor(e,t,r,i){super(),this.name=e,this.newContent=t,this.scope=r,this.options=i}doUndo(e){e.undoAddNamedExpression(this)}doRedo(e){e.redoAddNamedExpression(this)}}class nU extends nE{constructor(e,t,r){super(),this.namedExpression=e,this.content=t,this.scope=r}doUndo(e){e.undoRemoveNamedExpression(this)}doRedo(e){e.redoRemoveNamedExpression(this)}}class nW extends nE{constructor(e,t,r,i,n){super(),this.namedExpression=e,this.newContent=t,this.oldContent=r,this.scope=i,this.options=n}doUndo(e){e.undoChangeNamedExpression(this)}doRedo(e){e.redoChangeNamedExpression(this)}}class n$ extends nE{constructor(){super(...arguments),this.operations=[]}add(e){this.operations.push(e)}*reversedOperations(){for(let e=this.operations.length-1;e>=0;e--)yield this.operations[e]}doUndo(e){e.undoBatch(this)}doRedo(e){e.redoBatch(this)}getReferencedOldDataVersions(){return this.operations.flatMap(e=>e.getReferencedOldDataVersions())}}class nG{constructor(e,t){this.operations=t,this.oldData=new Map,this.undoStack=[],this.redoStack=[],this.undoLimit=e.undoLimit}saveOperation(e){void 0!==this.batchUndoEntry?this.batchUndoEntry.add(e):this.addUndoEntry(e)}beginBatchMode(){this.batchUndoEntry=new n$}commitBatchMode(){if(void 0===this.batchUndoEntry)throw Error("Batch mode wasn't started");this.addUndoEntry(this.batchUndoEntry),this.batchUndoEntry=void 0}storeDataForVersion(e,t,r){0===this.undoLimit||(this.oldData.has(e)||this.oldData.set(e,[]),this.oldData.get(e).push([t,r]))}clearRedoStack(){this.cleanupOldDataForEntries(this.redoStack,this.undoStack),this.redoStack=[]}clearUndoStack(){this.cleanupOldDataForEntries(this.undoStack,this.redoStack),this.undoStack=[]}isUndoStackEmpty(){return 0===this.undoStack.length}isRedoStackEmpty(){return 0===this.redoStack.length}undo(){let e=this.undoStack.pop();if(!e)throw Error("Attempted to undo without operation on stack");this.undoEntry(e),this.redoStack.push(e)}undoBatch(e){for(let t of e.reversedOperations())this.undoEntry(t)}undoRemoveRows(e){this.operations.forceApplyPostponedTransformations();let{command:{sheet:t},rowsRemovals:r}=e;for(let e=r.length-1;e>=0;--e){let i=r[e];for(let{address:e,cellType:r}of(this.operations.addRows(new nw(t,[[i.rowFrom,i.rowCount]])),i.removedCells))this.operations.restoreCell(e,r);this.restoreOldDataFromVersion(i.version-1)}}undoRemoveColumns(e){this.operations.forceApplyPostponedTransformations();let{command:{sheet:t},columnsRemovals:r}=e;for(let e=r.length-1;e>=0;--e){let i=r[e];for(let{address:e,cellType:r}of(this.operations.addColumns(new ny(t,[[i.columnFrom,i.columnCount]])),i.removedCells))this.operations.restoreCell(e,r);this.restoreOldDataFromVersion(i.version-1)}}undoAddRows(e){let t=e.command.rowsSpans();for(let r=t.length-1;r>=0;--r){let i=t[r];this.operations.removeRows(new nf(e.command.sheet,[[i.rowStart,i.numberOfRows]]))}}undoAddColumns(e){let t=e.command.columnsSpans();for(let r=t.length-1;r>=0;--r){let i=t[r];this.operations.removeColumns(new nb(e.command.sheet,[[i.columnStart,i.numberOfColumns]]))}}undoSetCellContents(e){for(let t of e.cellContents){let e=t.address,[r,i]=t.oldContent;r4(e,r)||this.operations.setCellEmpty(e),this.operations.restoreCell(r,i)}}undoPaste(e){for(let t of(this.restoreOperationOldContent(e.oldContent),e.addedGlobalNamedExpressions))this.operations.removeNamedExpression(t)}undoMoveRows(e){this.operations.forceApplyPostponedTransformations();let{sheet:t}=e;this.operations.moveRows(t,e.undoStart,e.numberOfRows,e.undoEnd),this.restoreOldDataFromVersion(e.version-1)}undoMoveColumns(e){this.operations.forceApplyPostponedTransformations();let{sheet:t}=e;this.operations.moveColumns(t,e.undoStart,e.numberOfColumns,e.undoEnd),this.restoreOldDataFromVersion(e.version-1)}undoMoveCells(e){for(let t of(this.operations.forceApplyPostponedTransformations(),this.operations.moveCells(e.destinationLeftCorner,e.width,e.height,e.sourceLeftCorner),this.restoreOperationOldContent(e.overwrittenCellsData),this.restoreOldDataFromVersion(e.version-1),e.addedGlobalNamedExpressions))this.operations.removeNamedExpression(t)}undoAddSheet(e){let{sheetName:t}=e;this.operations.removeSheetByName(t)}undoRemoveSheet(e){this.operations.forceApplyPostponedTransformations();let{oldSheetContent:t,sheetId:r,scopedNamedExpressions:i,sheetName:n}=e;this.operations.addSheetWithId(r,n);for(let e=0;e<t.length;e++){let i=t[e];for(let t=0;t<i.length;t++){let n=i[t],o=r0(r,t,e);this.operations.restoreCell(o,n)}}for(let[e,t]of i)this.operations.restoreNamedExpression(e,t,r)}undoRenameSheet(e){this.operations.forceApplyPostponedTransformations(),this.operations.renameSheet(e.sheetId,e.oldName),void 0!==e.mergedPlaceholderSheetId&&void 0!==e.version&&(this.operations.addPlaceholderSheetWithId(e.mergedPlaceholderSheetId,e.newName),this.restoreOldDataFromVersion(e.version-1))}undoClearSheet(e){let{oldSheetContent:t,sheetId:r}=e;for(let e=0;e<t.length;e++){let i=t[e];for(let t=0;t<i.length;t++){let n=i[t],o=r0(r,t,e);this.operations.restoreCell(o,n)}}}undoSetSheetContent(e){let{oldSheetContent:t,sheetId:r}=e;this.operations.clearSheet(r);for(let e=0;e<t.length;e++){let i=t[e];for(let t=0;t<i.length;t++){let n=i[t],o=r0(r,t,e);this.operations.restoreCell(o,n)}}}undoAddNamedExpression(e){this.operations.removeNamedExpression(e.name,e.scope)}undoRemoveNamedExpression(e){this.operations.restoreNamedExpression(e.namedExpression,e.content,e.scope)}undoChangeNamedExpression(e){this.operations.restoreNamedExpression(e.namedExpression,e.oldContent,e.scope)}undoSetRowOrder(e){this.restoreOperationOldContent(e.oldContent)}undoSetColumnOrder(e){this.restoreOperationOldContent(e.oldContent)}redo(){let e=this.redoStack.pop();if(!e)throw Error("Attempted to redo without operation on stack");this.redoEntry(e),this.undoStack.push(e)}redoBatch(e){for(let t of e.operations)this.redoEntry(t)}redoRemoveRows(e){this.operations.removeRows(e.command)}redoMoveCells(e){this.operations.moveCells(e.sourceLeftCorner,e.width,e.height,e.destinationLeftCorner)}redoRemoveColumns(e){this.operations.removeColumns(e.command)}redoPaste(e){let{targetLeftCorner:t,newContent:r}=e,i=r.length,n=r[0].length;for(let e=0;e<i;++e)for(let i=0;i<n;++i){let n=r0(t.sheet,t.col+i,t.row+e);this.operations.restoreCell(n,r[e][i])}}redoSetCellContents(e){for(let t of e.cellContents)this.operations.setCellContent(t.address,t.newContent)}redoAddRows(e){this.operations.addRows(e.command)}redoAddColumns(e){this.operations.addColumns(e.command)}redoRemoveSheet(e){this.operations.removeSheetByName(e.sheetName)}redoAddSheet(e){this.operations.addSheetWithId(e.sheetId,e.sheetName)}redoRenameSheet(e){this.operations.renameSheet(e.sheetId,e.newName)}redoMoveRows(e){this.operations.moveRows(e.sheet,e.startRow,e.numberOfRows,e.targetRow)}redoMoveColumns(e){this.operations.moveColumns(e.sheet,e.startColumn,e.numberOfColumns,e.targetColumn)}redoClearSheet(e){this.operations.clearSheet(e.sheetId)}redoSetSheetContent(e){let{sheetId:t,newSheetContent:r}=e;this.operations.setSheetContent(t,r)}redoAddNamedExpression(e){this.operations.addNamedExpression(e.name,e.newContent,e.scope,e.options)}redoRemoveNamedExpression(e){this.operations.removeNamedExpression(e.namedExpression.displayName,e.scope)}redoChangeNamedExpression(e){this.operations.changeNamedExpressionExpression(e.namedExpression.displayName,e.newContent,e.scope,e.options)}redoSetRowOrder(e){this.operations.setRowOrder(e.sheetId,e.rowMapping)}redoSetColumnOrder(e){this.operations.setColumnOrder(e.sheetId,e.columnMapping)}addUndoEntry(e){this.undoStack.push(e);let t=Math.max(0,this.undoStack.length-this.undoLimit);if(t>0){let e=this.undoStack.splice(0,t);this.cleanupOldDataForEntries(e,[...this.undoStack,...this.redoStack])}}cleanupOrphanedOldData(){let e=this.collectReferencedOldDataVersions(this.undoStack,this.redoStack);for(let t of this.oldData.keys())e.has(t)||this.oldData.delete(t)}cleanupOldDataForEntries(e,t){let r=this.collectReferencedOldDataVersions(t);for(let t of e)for(let e of t.getReferencedOldDataVersions())r.has(e)||this.oldData.delete(e)}collectReferencedOldDataVersions(...e){var t,r;return new Set([...e.flatMap(e=>e.flatMap(e=>e.getReferencedOldDataVersions())),...null!=(r=null==(t=this.batchUndoEntry)?void 0:t.getReferencedOldDataVersions())?r:[]])}undoEntry(e){e.doUndo(this)}restoreOperationOldContent(e){for(let[t,r]of e)this.operations.restoreCell(t,r)}redoEntry(e){e.doRedo(this)}restoreOldDataFromVersion(e){for(let t of this.oldData.get(e)||[]){let[e,r]=t;this.operations.setFormulaToCellFromCache(r,e)}}}class nj{constructor(e,t,r,i,n,o,s,l,a,h){this.operations=t,this.undoRedo=r,this.clipboardOperations=i,this.dependencyGraph=n,this.columnSearch=o,this.parser=s,this.cellContentParser=l,this.lazilyTransformingAstService=a,this.namedExpressions=h,this.maxRows=e.maxRows,this.maxColumns=e.maxColumns}get sheetMapping(){return this.dependencyGraph.sheetMapping}addRows(e,...t){let r=new nw(e,t);this.ensureItIsPossibleToAddRows(e,...t),this.undoRedo.clearRedoStack(),this.clipboardOperations.abortCut(),this.operations.addRows(r),this.undoRedo.saveOperation(new nA(r))}removeRows(e,...t){let r=new nf(e,t);this.ensureItIsPossibleToRemoveRows(e,...t),this.undoRedo.clearRedoStack(),this.clipboardOperations.abortCut();let i=this.operations.removeRows(r);this.undoRedo.saveOperation(new nT(r,i))}addColumns(e,...t){let r=new ny(e,t);this.ensureItIsPossibleToAddColumns(e,...t),this.undoRedo.clearRedoStack(),this.clipboardOperations.abortCut(),this.operations.addColumns(r),this.undoRedo.saveOperation(new nH(r))}removeColumns(e,...t){let r=new nb(e,t);this.ensureItIsPossibleToRemoveColumns(e,...t),this.undoRedo.clearRedoStack(),this.clipboardOperations.abortCut();let i=this.operations.removeColumns(r);this.undoRedo.saveOperation(new n_(r,i))}moveCells(e,t,r,i){this.undoRedo.clearRedoStack(),this.clipboardOperations.abortCut();let{version:n,overwrittenCellsData:o,addedGlobalNamedExpressions:s}=this.operations.moveCells(e,t,r,i);this.undoRedo.saveOperation(new nx(e,t,r,i,o,s,n))}moveRows(e,t,r,i){this.ensureItIsPossibleToMoveRows(e,t,r,i),this.undoRedo.clearRedoStack(),this.clipboardOperations.abortCut();let n=this.operations.moveRows(e,t,r,i);this.undoRedo.saveOperation(new nO(e,t,r,i,n))}moveColumns(e,t,r,i){this.ensureItIsPossibleToMoveColumns(e,t,r,i),this.undoRedo.clearRedoStack();let n=this.operations.moveColumns(e,t,r,i);this.undoRedo.saveOperation(new nk(e,t,r,i,n))}cut(e,t,r){this.clipboardOperations.cut(e,t,r)}ensureItIsPossibleToCopy(e,t,r){if(!nY(t))throw new t1("width to be positive integer.");if(!nY(r))throw new t1("height to be positive integer.")}copy(e,t,r){this.ensureItIsPossibleToCopy(e,t,r),this.clipboardOperations.copy(e,t,r)}paste(e){let t=this.clipboardOperations.clipboard;if(void 0===t)throw new t9;if(this.clipboardOperations.isCutClipboard())this.moveCells(t.sourceLeftCorner,t.width,t.height,e);else if(this.clipboardOperations.isCopyClipboard()){this.clipboardOperations.ensureItIsPossibleToCopyPaste(e);let r=r7.spanFrom(e,t.width,t.height),i=this.operations.getRangeClipboardCells(r);this.undoRedo.clearRedoStack();let n=this.operations.restoreClipboardCells(t.sourceLeftCorner.sheet,t.getContent(e));this.undoRedo.saveOperation(new nV(e,i,t.content,n))}}beginUndoRedoBatchMode(){this.undoRedo.beginBatchMode()}commitUndoRedoBatchMode(){this.undoRedo.commitBatchMode()}isClipboardEmpty(){return void 0===this.clipboardOperations.clipboard}clearClipboard(){this.clipboardOperations.clear()}addSheet(e){void 0!==e&&this.ensureItIsPossibleToAddSheet(e),this.undoRedo.clearRedoStack();let{sheetName:t,sheetId:r}=this.operations.addSheet(e);return this.undoRedo.saveOperation(new nP(t,r)),t}removeSheet(e){this.ensureScopeIdIsValid(e),this.undoRedo.clearRedoStack(),this.clipboardOperations.abortCut();let t=this.sheetMapping.getSheetNameOrThrowError(e),r=this.operations.getSheetClipboardCells(e),i=this.operations.removeSheet(e);this.undoRedo.saveOperation(new nD(t,e,r,i))}renameSheet(e,t){this.ensureItIsPossibleToRenameSheet(e,t);let{previousDisplayName:r,version:i,mergedPlaceholderSheetId:n}=this.operations.renameSheet(e,t);return void 0!==r&&(this.undoRedo.clearRedoStack(),this.undoRedo.saveOperation(new nL(e,r,t,i,n))),r}clearSheet(e){this.ensureScopeIdIsValid(e),this.undoRedo.clearRedoStack(),this.clipboardOperations.abortCut();let t=this.operations.getSheetClipboardCells(e);this.operations.clearSheet(e),this.undoRedo.saveOperation(new nF(e,t))}setCellContents(e,t){if(t instanceof Array){for(let e=0;e<t.length;e++)if(!(t[e]instanceof Array))throw new t1("an array of arrays or a raw cell value.")}else t=[[t]];this.ensureItIsPossibleToChangeCellContents(e,t),this.undoRedo.clearRedoStack();let r=[];for(let i=0;i<t.length;i++)for(let n=0;n<t[i].length;n++){let o={sheet:e.sheet,row:e.row+i,col:e.col+n},s=t[i][n];this.clipboardOperations.abortCut();let l=this.operations.setCellContent(o,s);r.push({address:o,newContent:s,oldContent:l})}this.undoRedo.saveOperation(new nB(r))}setSheetContent(e,t){this.ensureScopeIdIsValid(e),this.ensureItIsPossibleToChangeSheetContents(e,t),rL(t),this.undoRedo.clearRedoStack(),this.clipboardOperations.abortCut();let r=this.operations.getSheetClipboardCells(e);this.operations.setSheetContent(e,t),this.undoRedo.saveOperation(new nN(e,r,t))}setRowOrder(e,t){this.validateSwapRowIndexes(e,t),this.testRowOrderForArrays(e,t),this.undoRedo.clearRedoStack(),this.clipboardOperations.abortCut();let r=this.operations.setRowOrder(e,t);this.undoRedo.saveOperation(new nM(e,t,r))}validateSwapRowIndexes(e,t){if(!this.sheetMapping.hasSheetWithId(e))throw new tq(e);this.validateRowOrColumnMapping(e,t,"row")}testColumnOrderForArrays(e,t){for(let[r,i]of t)if(r!==i){let t=r7.spanFrom({sheet:e,col:r,row:0},1,1/0);if(this.dependencyGraph.arrayMapping.isFormulaArrayInRange(t))throw new rg}}setColumnOrder(e,t){this.validateSwapColumnIndexes(e,t),this.testColumnOrderForArrays(e,t),this.undoRedo.clearRedoStack(),this.clipboardOperations.abortCut();let r=this.operations.setColumnOrder(e,t);this.undoRedo.saveOperation(new nI(e,t,r))}validateSwapColumnIndexes(e,t){if(!this.sheetMapping.hasSheetWithId(e))throw new tq(e);this.validateRowOrColumnMapping(e,t,"column")}testRowOrderForArrays(e,t){for(let[r,i]of t)if(r!==i){let t=r7.spanFrom({sheet:e,col:0,row:r},1/0,1);if(this.dependencyGraph.arrayMapping.isFormulaArrayInRange(t))throw new rg}}mappingFromOrder(e,t,r){if(!this.sheetMapping.hasSheetWithId(e))throw new tq(e);let i="row"===r?this.dependencyGraph.getSheetHeight(e):this.dependencyGraph.getSheetWidth(e);if(t.length!==i)throw new t1(`number of ${r}s provided to be sheet ${"row"===r?"height":"width"}.`);let n=[];for(let e=0;e<i;e++)t[e]!==e&&n.push([e,t[e]]);return n}undo(){if(this.undoRedo.isUndoStackEmpty())throw new t4;this.clipboardOperations.abortCut(),this.undoRedo.undo()}redo(){if(this.undoRedo.isRedoStackEmpty())throw new t8;this.clipboardOperations.abortCut(),this.undoRedo.redo()}addNamedExpression(e,t,r,i){this.ensureItIsPossibleToAddNamedExpression(e,t,r),this.operations.addNamedExpression(e,t,r,i),this.undoRedo.clearRedoStack(),this.clipboardOperations.abortCut(),this.undoRedo.saveOperation(new nz(e,t,r,i))}changeNamedExpressionExpression(e,t,r,i){this.ensureItIsPossibleToChangeNamedExpression(e,r,t);let[n,o]=this.operations.changeNamedExpressionExpression(e,r,t,i);this.undoRedo.clearRedoStack(),this.clipboardOperations.abortCut(),this.undoRedo.saveOperation(new nW(n,r,o,t,i))}removeNamedExpression(e,t){this.ensureScopeIdIsValid(t);let[r,i]=this.operations.removeNamedExpression(e,t);return this.undoRedo.clearRedoStack(),this.clipboardOperations.abortCut(),this.undoRedo.saveOperation(new nU(r,i,t)),r}ensureItIsPossibleToAddNamedExpression(e,t,r){this.ensureScopeIdIsValid(r),this.ensureNamedExpressionNameIsValid(e,r),this.ensureNamedExpressionIsValid(t)}ensureItIsPossibleToChangeNamedExpression(e,t,r){if(this.ensureScopeIdIsValid(r),void 0===this.namedExpressions.namedExpressionForScope(e,r))throw new t5(e);this.ensureNamedExpressionIsValid(t)}isItPossibleToRemoveNamedExpression(e,t){if(this.ensureScopeIdIsValid(t),void 0===this.namedExpressions.namedExpressionForScope(e,t))throw new t5(e)}ensureItIsPossibleToAddRows(e,...t){if(!this.sheetMapping.hasSheetWithId(e))throw new tq(e);if(this.dependencyGraph.getSheetHeight(e)+t.map(e=>e[1]).reduce((e,t)=>e+t,0)>this.maxRows)throw new tZ;for(let[e,r]of t)if(!nK(e)||!nY(r))throw new t1("row number to be nonnegative and number of rows to add to be positive.")}ensureItIsPossibleToRemoveRows(e,...t){for(let[r,i]of t){let t=r+i-1;if(!nK(r)||!nK(t))throw new t1("starting and ending row to be nonnegative.");if(t<r)throw new t1("starting row to be smaller than the ending row.");if(!this.sheetMapping.hasSheetWithId(e))throw new tq(e)}}ensureItIsPossibleToAddColumns(e,...t){if(!this.sheetMapping.hasSheetWithId(e))throw new tq(e);if(this.dependencyGraph.getSheetWidth(e)+t.map(e=>e[1]).reduce((e,t)=>e+t,0)>this.maxColumns)throw new tZ;for(let[e,r]of t)if(!nK(e)||!nY(r))throw new t1("column number to be nonnegative and number of columns to add to be positive.")}ensureItIsPossibleToRemoveColumns(e,...t){for(let[r,i]of t){let t=r+i-1;if(!nK(r)||!nK(t))throw new t1("starting and ending column to be nonnegative.");if(t<r)throw new t1("starting column to be smaller than the ending column.");if(!this.sheetMapping.hasSheetWithId(e))throw new tq(e)}}ensureItIsPossibleToMoveRows(e,t,r,i){this.ensureItIsPossibleToAddRows(e,[i,r]);let n=r0(e,0,t),o=r0(e,0,i);if(!this.sheetMapping.hasSheetWithId(e)||r1(n)||r1(o)||!nY(r)||i<=t+r&&i>=t)throw new t1("a valid range of rows to move.");let s=this.dependencyGraph.getSheetWidth(e),l=r7.spanFrom(n,s,r);if(this.dependencyGraph.arrayMapping.isFormulaArrayInRange(l))throw new rg;if(i>0&&this.dependencyGraph.arrayMapping.isFormulaArrayInAllRows(tG.fromNumberOfRows(e,i-1,2)))throw new rp}ensureItIsPossibleToMoveColumns(e,t,r,i){this.ensureItIsPossibleToAddColumns(e,[i,r]);let n=r0(e,t,0),o=r0(e,i,0);if(!this.sheetMapping.hasSheetWithId(e)||r1(n)||r1(o)||!nY(r)||i<=t+r&&i>=t)throw new t1("a valid range of columns to move.");let s=this.dependencyGraph.getSheetHeight(e),l=r7.spanFrom(n,r,s);if(this.dependencyGraph.arrayMapping.isFormulaArrayInRange(l))throw new rg;if(i>0&&this.dependencyGraph.arrayMapping.isFormulaArrayInAllColumns(tj.fromNumberOfColumns(e,i-1,2)))throw new rp}ensureItIsPossibleToAddSheet(e){if(this.sheetMapping.hasSheetWithName(e))throw new tQ(e)}ensureItIsPossibleToRenameSheet(e,t){if(!this.sheetMapping.hasSheetWithId(e))throw new tq(e);let r=this.sheetMapping.getSheetId(t);if(void 0!==r&&r!==e)throw new tQ(t)}ensureItIsPossibleToChangeContent(e){if(r1(e))throw new t0(e);if(!this.sheetMapping.hasSheetWithId(e.sheet))throw new tq(e.sheet)}ensureItIsPossibleToChangeCellContents(e,t){let r=rF(t),i=r7.spanFrom(e,r.width,r.height);for(let e of(this.ensureRangeInSizeLimits(i),i.addresses(this.dependencyGraph)))this.ensureItIsPossibleToChangeContent(e)}ensureItIsPossibleToChangeSheetContents(e,t){let r=rF(t),i=r7.spanFrom(r0(e,0,0),r.width,r.height);this.ensureRangeInSizeLimits(i)}ensureRangeInSizeLimits(e){if(e.exceedsSheetSizeLimits(this.maxColumns,this.maxRows))throw new tZ}isThereSomethingToUndo(){return!this.undoRedo.isUndoStackEmpty()}isThereSomethingToRedo(){return!this.undoRedo.isRedoStackEmpty()}getAndClearContentChanges(){return this.operations.getAndClearContentChanges()}ensureScopeIdIsValid(e){if(void 0!==e&&!this.sheetMapping.hasSheetWithId(e))throw new tq(e)}validateRowOrColumnMapping(e,t,r){let i="row"===r?this.dependencyGraph.getSheetHeight(e):this.dependencyGraph.getSheetWidth(e),n=t.map(([e,t])=>e).sort((e,t)=>e-t),o=t.map(([e,t])=>t).sort((e,t)=>e-t);for(let e=0;e<n.length;e++){if(!nK(n[e])||n[e]>=i)throw new t1(`${r} numbers to be nonnegative integers and less than sheet ${"row"===r?"height":"width"}.`);if(n[e]===n[e+1])throw new t1(`source ${r} numbers to be unique.`);if(n[e]!==o[e])throw new t1(`target ${r} numbers to be permutation of source ${r} numbers.`)}}ensureNamedExpressionNameIsValid(e,t){if(!this.namedExpressions.isNameValid(e))throw new t6(e);if(!this.namedExpressions.isNameAvailable(e,t))throw new t3(e)}ensureNamedExpressionIsValid(e){let t=this.cellContentParser.parse(e);if(t instanceof w.Formula&&t$(this.parser.parse(t.formula,r0(-1,0,0)).ast))throw new rm}}function nY(e){return Number.isInteger(e)&&e>0}function nK(e){return Number.isInteger(e)&&e>=0}class nq{constructor(e,t,r,i,n,o){this.config=e,this.stats=t,this.interpreter=r,this.lazilyTransformingAstService=i,this.dependencyGraph=n,this.columnSearch=o}run(){this.stats.start(l.TOP_SORT);let{sorted:e,cycled:t}=this.dependencyGraph.topSortWithScc();this.stats.end(l.TOP_SORT),this.stats.measure(l.EVALUATION,()=>{this.recomputeFormulas(t,e)})}partialRun(e){let t=tB.empty();return this.stats.measure(l.EVALUATION,()=>{this.dependencyGraph.graph.getTopSortedWithSccSubgraphFrom(e,e=>this.recomputeVertex(e,t),e=>this.processVertexOnCycle(e,t))}),t}runAndForget(e,t,r){let i=[];for(let e of tx(r,t))if(e instanceof r7&&void 0===this.dependencyGraph.getRange(e.start,e.end)){let t=new rA(e);this.dependencyGraph.rangeMapping.addOrUpdateVertex(t),i.push(t)}let n=this.evaluateAstToCellValue(e,new ir(t,this.config.useArrayArithmetic));return i.forEach(e=>{this.dependencyGraph.rangeMapping.removeVertexIfExists(e)}),n}recomputeVertex(e,t){if(e instanceof rE){let r=e.isComputed()?e.getCellValue():void 0,i=this.recomputeFormulaVertexValue(e);if(i!==r){let n=e.getAddress(this.lazilyTransformingAstService);return t.addChange(i,n),this.columnSearch.change(tM(r),tM(i),n),!0}return!1}return!(e instanceof rA)||(e.clearCache(),!0)}processVertexOnCycle(e,t){if(e instanceof rA)e.clearCache();else if(e instanceof rE){let r=e.getAddress(this.lazilyTransformingAstService);this.columnSearch.remove(tM(e.valueOrUndef()),r);let i=new rq(d.CYCLE,void 0,e);e.setCellValue(i),t.addChange(i,r)}}recomputeFormulas(e,t){e.forEach(e=>{e instanceof rE&&e.setCellValue(new rq(d.CYCLE,void 0,e))}),t.forEach(e=>{if(e instanceof rE){let t=this.recomputeFormulaVertexValue(e),r=e.getAddress(this.lazilyTransformingAstService);this.columnSearch.add(tM(t),r)}else e instanceof rA&&e.clearCache()})}recomputeFormulaVertexValue(e){let t=e.getAddress(this.lazilyTransformingAstService);if(e instanceof rT&&(e.array.size.isRef||!this.dependencyGraph.isThereSpaceForArray(e)))return e.setNoSpace();{let r=e.getFormula(this.lazilyTransformingAstService),i=this.evaluateAstToCellValue(r,new ir(t,this.config.useArrayArithmetic,e));return e.setCellValue(i)}}evaluateAstToCellValue(e,t){let r=this.interpreter.evaluateAst(e,t);return r instanceof tF?r:r===tA&&this.config.evaluateNullToZero?0:r}}class nX{constructor(e,t){this.address=e,this.newValue=t}get col(){return this.address.col}get row(){return this.address.row}get sheet(){return this.address.sheet}get value(){return this.newValue}}class nQ{constructor(e,t){this.name=e,this.newValue=t}}class nZ{constructor(e,t,r,i){this.config=e,this.namedExpressions=t,this.sheetMapping=r,this.lazilyTransformingService=i}exportChange(e){let t=e.value,r=e.address;if(r.sheet===tW.SHEET_FOR_WORKBOOK_EXPRESSIONS){let e=this.namedExpressions.namedExpressionInAddress(r.row);if(!e)throw Error("Missing named expression");return new nQ(e.displayName,this.exportScalarOrRange(t))}if(!(t instanceof tF))return new nX(r,this.exportValue(t));{let e=[];for(let[i,n]of t.entriesFromTopLeftCorner(r))e.push(new nX(n,this.exportValue(i)));return e}}exportValue(e){return e instanceof tF?this.detailedError(new rq(d.VALUE,eY.ScalarExpected)):this.config.smartRounding&&tD(e)?this.cellValueRounding(tM(e)):e instanceof rq?this.detailedError(e):e===tA?null:tM(e)}exportScalarOrRange(e){return e instanceof tF?e.rawData().map(e=>e.map(e=>this.exportValue(e))):this.exportValue(e)}detailedError(e){var t,r;let i,n=null==(t=e.root)?void 0:t.getAddress(this.lazilyTransformingService);return void 0!==n&&(i=n.sheet===tW.SHEET_FOR_WORKBOOK_EXPRESSIONS?null==(r=this.namedExpressions.namedExpressionInAddress(n.row))?void 0:r.displayName:eM(this.sheetMapping.getSheetNameOrThrowError.bind(this.sheetMapping),n,-1)),new iA(e,this.config.translationPackage.getErrorTranslation(e.type),i)}cellValueRounding(e){if(0===e)return e;let t=Math.floor(Math.log10(Math.abs(e))),r=Math.pow(10,this.config.precisionRounding-t);return e<0?-Math.round(-e*r)/r:Math.round(e*r)/r}}class nJ{constructor(e,t,r,i,n,o){this.dependencyGraph=e,this.columnSearch=t,this.parser=r,this.cellContentParser=i,this.stats=n,this.arraySizePredictor=o,this.buildStrategy=new n0(e,t,r,n,i,o)}buildGraph(e,t){let r=t.measure(l.COLLECT_DEPENDENCIES,()=>this.buildStrategy.run(e));this.dependencyGraph.getAndClearContentChanges(),t.measure(l.PROCESS_DEPENDENCIES,()=>this.processDependencies(r))}processDependencies(e){e.forEach((e,t)=>{this.dependencyGraph.processCellDependencies(e,t)})}}class n0{constructor(e,t,r,i,n,o){this.dependencyGraph=e,this.columnIndex=t,this.parser=r,this.stats=i,this.cellContentParser=n,this.arraySizePredictor=o}run(e){let t=new Map;for(let r in e){let i=this.dependencyGraph.getSheetId(r),n=e[r];for(let e=0;e<n.length;++e){let r=n[e];for(let n=0;n<r.length;++n){let o=r[n],s=r0(i,n,e),a=this.cellContentParser.parse(o);if(a instanceof w.Formula){let e=this.stats.measure(l.PARSER,()=>this.parser.parse(a.formula,s));if(e.errors.length>0){this.shrinkArrayIfNeeded(s);let t=new rU(e.errors,a.formula);this.dependencyGraph.addVertex(s,t)}else{this.shrinkArrayIfNeeded(s);let r=this.arraySizePredictor.checkArraySize(e.ast,s);if(r.isScalar()){let r=new rx(e.ast,s,0);t.set(r,tx(e.dependencies,s)),this.dependencyGraph.addVertex(s,r),e.hasVolatileFunction&&this.dependencyGraph.markAsVolatile(r),e.hasStructuralChangeFunction&&this.dependencyGraph.markAsDependentOnStructureChange(r)}else{let i=new rT(e.ast,s,new iT(r.width,r.height));t.set(i,tx(e.dependencies,s)),this.dependencyGraph.addArrayVertex(s,i)}}}else if(a instanceof w.Empty);else{this.shrinkArrayIfNeeded(s);let e=new rz(a.value,o);this.columnIndex.add(tM(a.value),s),this.dependencyGraph.addVertex(s,e)}}}}return t}shrinkArrayIfNeeded(e){let t=this.dependencyGraph.getCell(e);t instanceof rT&&this.dependencyGraph.shrinkArrayToCorner(t)}}let n1=new Map([["gpl-v3",1],["missing",2],["invalid",3],["expired",4]]);class n2 extends iE{version(e,t){return this.runFunction(e.args,t,this.metadata("VERSION"),()=>{let e,{licenseKeyValidityState:t,licenseKey:r}=this.config;return n1.has(r)?e=n1.get(r):n1.has(t)?e=n1.get(t):"valid"===t&&(e=r.slice(-5)),`HyperFormula v${op.version}, ${e}`})}}function n3(e,t){var r;let i=t.implementedFunctions[e],n=null==(r=t.aliases)?void 0:r[e];if(void 0!==n){if(void 0!==i)throw new rf(e,t.name);i=t.implementedFunctions[n]}if(void 0===i)throw ru.functionNotDeclaredInPlugin(e,t.name);return i}n2.implementedFunctions={VERSION:{method:"version",parameters:[]}};class n6{constructor(e){if(this.config=e,this.functions=new Map,this.arraySizeFunctions=new Map,this.volatileFunctions=new Set,this.arrayFunctions=new Set,this.structuralChangeFunctions=new Set,this.functionsWhichDoesNotNeedArgumentsToBeComputed=new Set,this.functionsMetadata=new Map,this.doesFunctionNeedArgumentToBeComputed=e=>this.functionsWhichDoesNotNeedArgumentsToBeComputed.has(e),this.isFunctionVolatile=e=>this.volatileFunctions.has(e),this.isArrayFunction=e=>this.arrayFunctions.has(e),this.isFunctionDependentOnSheetStructureChange=e=>this.structuralChangeFunctions.has(e),e.functionPlugins.length>0)for(const t of(this.instancePlugins=new Map,e.functionPlugins))n6.loadPluginFunctions(t,this.instancePlugins);else this.instancePlugins=new Map(n6.plugins);for(const[e,t]of n6.protectedFunctions())n6.loadFunctionUnprotected(t,e,this.instancePlugins);for(const[e,t]of this.instancePlugins.entries())this.categorizeFunction(e,n3(e,t))}static registerFunctionPlugin(e,t){this.loadPluginFunctions(e,this.plugins),void 0!==t&&this.loadTranslations(t)}static registerFunction(e,t,r){this.loadPluginFunction(t,e,this.plugins),void 0!==r&&this.loadTranslations(r)}static unregisterFunction(e){if(this.functionIsProtected(e))throw rc.cannotUnregisterFunctionWithId(e);this.plugins.delete(e)}static unregisterFunctionPlugin(e){for(let t of this.protectedPlugins())if(t===e)throw rc.cannotUnregisterProtectedPlugin();for(let[t,r]of this.plugins.entries())r===e&&this.plugins.delete(t)}static unregisterAll(){this.plugins.clear()}static getRegisteredFunctionIds(){return[...Array.from(this.plugins.keys()),...Array.from(this._protectedPlugins.keys())]}static getPlugins(){return Array.from(new Set(this.plugins.values()).values())}static getFunctionPlugin(e){if(!this.functionIsProtected(e))return this.plugins.get(e)}static functionIsProtected(e){return this._protectedPlugins.has(e)}static loadTranslations(e){let t=new Set(op.getRegisteredLanguagesCodes());Object.keys(e).forEach(r=>{t.has(r)&&op.getLanguage(r).extendFunctions(e[r])})}static loadPluginFunctions(e,t){Object.keys(e.implementedFunctions).forEach(r=>{this.loadPluginFunction(e,r,t)}),void 0!==e.aliases&&Object.keys(e.aliases).forEach(r=>{this.loadPluginFunction(e,r,t)})}static loadPluginFunction(e,t,r){if(this.functionIsProtected(t))throw rc.cannotRegisterFunctionWithId(t);this.loadFunctionUnprotected(e,t,r)}static handleDeprecatedMetadata(e,t){t&&void 0!==t.arrayFunction&&(console.warn(`${e}: 'arrayFunction' parameter is deprecated since 3.1.0; Use 'enableArrayArithmeticForArguments' instead.`),t.enableArrayArithmeticForArguments=t.arrayFunction),t&&void 0!==t.arraySizeMethod&&(console.warn(`${e}: 'arraySizeMethod' parameter is deprecated since 3.1.0; Use 'sizeOfResultArrayMethod' instead.`),t.sizeOfResultArrayMethod=t.arraySizeMethod)}static loadFunctionUnprotected(e,t,r){let i=n3(t,e),n=i.method;if(this.handleDeprecatedMetadata(t,i),Object.prototype.hasOwnProperty.call(e.prototype,n))r.set(t,e);else throw ru.functionMethodNotFound(n,e.name)}static*protectedFunctions(){for(let[e,t]of this._protectedPlugins)void 0!==t&&(yield[e,t])}static*protectedPlugins(){for(let[,e]of this._protectedPlugins)void 0!==e&&(yield e)}initializePlugins(e){let t=[];for(let[r,i]of this.instancePlugins.entries()){let n=t.find(e=>e instanceof i);void 0===n&&(n=new i(e),t.push(n));let o=n3(r,i),s=o.method;this.functions.set(r,[s,n]);let l=o.sizeOfResultArrayMethod;void 0!==l&&this.arraySizeFunctions.set(r,[l,n])}}getFunctionPlugin(e){if(!n6.functionIsProtected(e))return this.instancePlugins.get(e)}getFunction(e){let t=this.functions.get(e);if(void 0!==t&&this.config.translationPackage.isFunctionTranslated(e)){let[e,r]=t;return(t,i)=>r[e](t,i)}}getArraySizeFunction(e){let t=this.arraySizeFunctions.get(e);if(void 0!==t&&this.config.translationPackage.isFunctionTranslated(e)){let[e,r]=t;return(t,i)=>r[e](t,i)}}getMetadata(e){return this.functionsMetadata.get(e)}getPlugins(){let e=new Set;for(let[t,r]of this.instancePlugins)n6.functionIsProtected(t)||e.add(r);return Array.from(e)}getRegisteredFunctionIds(){return Array.from(this.functions.keys())}categorizeFunction(e,t){t.isVolatile&&this.volatileFunctions.add(e),t.enableArrayArithmeticForArguments&&this.arrayFunctions.add(e),t.doesNotNeedArgumentsToBeComputed&&this.functionsWhichDoesNotNeedArgumentsToBeComputed.add(e),t.isDependentOnSheetStructureChange&&this.structuralChangeFunctions.add(e),this.functionsMetadata.set(e,t)}}n6.plugins=new Map,n6._protectedPlugins=new Map([["VERSION",n2],["OFFSET",void 0]]),(B=C||(C={})).GREATER_THAN="GREATER_THAN",B.GREATER_THAN_OR_EQUAL="GREATER_THAN_OR_EQUAL",B.LESS_THAN="LESS_THAN",B.LESS_THAN_OR_EQUAL="LESS_THAN_OR_EQUAL",B.NOT_EQUAL="NOT_EQUAL",B.EQUAL="EQUAL";let n5=(e,t)=>({operator:e,value:t});class n4{constructor(e){var t,r,i,n;this.trueString=null!=(r=null==(t=e.translationPackage.getMaybeFunctionTranslation("TRUE"))?void 0:t.toLowerCase())?r:"true",this.falseString=null!=(n=null==(i=e.translationPackage.getMaybeFunctionTranslation("FALSE"))?void 0:i.toLowerCase())?n:"false"}fromCellValue(e,t){if("string"!=typeof e&&"boolean"!=typeof e&&"number"!=typeof e)return;let r=this.parseCriterion(e,t);if(void 0!==r)return{raw:e,lambda:n9(r,t)}}parseCriterion(e,t){if("number"==typeof e||"boolean"==typeof e)return n5(C.EQUAL,e);if("string"==typeof e){let r,i,n=n8.exec(e);n?(i=function(e){switch(e){case">":return C.GREATER_THAN;case">=":return C.GREATER_THAN_OR_EQUAL;case"<":return C.LESS_THAN;case"<=":return C.LESS_THAN_OR_EQUAL;case"<>":return C.NOT_EQUAL;case"=":return C.EQUAL;default:return}}(n[1]),r=n[2]):(i=C.EQUAL,r=e);let o=t.coerceToMaybeNumber(r),s=r.toLowerCase()===this.trueString||r.toLowerCase()!==this.falseString&&void 0;if(void 0===i)return;if(""===r)return n5(i,null);if(void 0!==o)return n5(i,tM(o));if(i===C.EQUAL||i===C.NOT_EQUAL)return n5(i,null!=s?s:r)}}}let n8=/([<>=]+)(.*)/,n9=(e,t)=>{switch(e.operator){case C.GREATER_THAN:if("number"==typeof e.value)return r=>"number"==typeof r&&t.floatCmp(r,e.value)>0;return e=>!1;case C.GREATER_THAN_OR_EQUAL:if("number"==typeof e.value)return r=>"number"==typeof r&&t.floatCmp(r,e.value)>=0;return e=>!1;case C.LESS_THAN:if("number"==typeof e.value)return r=>"number"==typeof r&&0>t.floatCmp(r,e.value);return e=>!1;case C.LESS_THAN_OR_EQUAL:if("number"==typeof e.value)return r=>"number"==typeof r&&0>=t.floatCmp(r,e.value);return e=>!1;case C.EQUAL:if("number"==typeof e.value)return r=>{if("number"==typeof r)return 0===t.floatCmp(r,e.value);if("string"!=typeof r)return!1;{if(""===r)return!1;let i=t.coerceToMaybeNumber(r);return void 0!==i&&0===t.floatCmp(i,e.value)}};if("string"==typeof e.value)return t.eqMatcherFunction(e.value);if("boolean"==typeof e.value)return t=>"boolean"==typeof t&&t===e.value;else return e=>e===tA;case C.NOT_EQUAL:if("number"==typeof e.value)return r=>{if("number"==typeof r)return 0!==t.floatCmp(r,e.value);if("string"!=typeof r)return!0;{if(""===r)return!0;let i=t.coerceToMaybeNumber(r);return void 0===i||0!==t.floatCmp(i,e.value)}};if("string"==typeof e.value)return t.neqMatcherFunction(e.value);if("boolean"==typeof e.value)return t=>"boolean"!=typeof t||t!==e.value;else return e=>e!==tA}};class n7{constructor(e,t,r,i,n,o,s,l,a,h){this.config=e,this.dependencyGraph=t,this.columnSearch=r,this.stats=i,this.arithmeticHelper=n,this.functionRegistry=o,this.namedExpressions=s,this.serialization=l,this.arraySizePredictor=a,this.dateTimeHelper=h,this.equalOp=(e,t)=>ot(this.arithmeticHelper.eq,e,t),this.notEqualOp=(e,t)=>ot(this.arithmeticHelper.neq,e,t),this.greaterThanOp=(e,t)=>ot(this.arithmeticHelper.gt,e,t),this.lessThanOp=(e,t)=>ot(this.arithmeticHelper.lt,e,t),this.greaterThanOrEqualOp=(e,t)=>ot(this.arithmeticHelper.geq,e,t),this.lessThanOrEqualOp=(e,t)=>ot(this.arithmeticHelper.leq,e,t),this.concatOp=(e,t)=>ot(this.arithmeticHelper.concat,iu(e),iu(t)),this.plusOp=(e,t)=>ot(this.arithmeticHelper.addWithEpsilon,this.arithmeticHelper.coerceScalarToNumberOrError(e),this.arithmeticHelper.coerceScalarToNumberOrError(t)),this.minusOp=(e,t)=>ot(this.arithmeticHelper.subtract,this.arithmeticHelper.coerceScalarToNumberOrError(e),this.arithmeticHelper.coerceScalarToNumberOrError(t)),this.timesOp=(e,t)=>ot(this.arithmeticHelper.multiply,this.arithmeticHelper.coerceScalarToNumberOrError(e),this.arithmeticHelper.coerceScalarToNumberOrError(t)),this.powerOp=(e,t)=>ot(this.arithmeticHelper.pow,this.arithmeticHelper.coerceScalarToNumberOrError(e),this.arithmeticHelper.coerceScalarToNumberOrError(t)),this.divOp=(e,t)=>ot(this.arithmeticHelper.divide,this.arithmeticHelper.coerceScalarToNumberOrError(e),this.arithmeticHelper.coerceScalarToNumberOrError(t)),this.unaryMinusOp=e=>oe(this.arithmeticHelper.unaryMinus,this.arithmeticHelper.coerceScalarToNumberOrError(e)),this.percentOp=e=>oe(this.arithmeticHelper.unaryPercent,this.arithmeticHelper.coerceScalarToNumberOrError(e)),this.unaryPlusOp=e=>this.arithmeticHelper.unaryPlus(e),this.functionRegistry.initializePlugins(this),this.criterionBuilder=new n4(e)}evaluateAst(e,t){var r,i,n;let o=this.evaluateAstWithoutPostprocessing(e,t);if(tD(o))if(ip(tM(o)))return new rq(d.NUM,eY.NaN);else{o=tN(o,0===(r=tM(o))?0:r)}return o instanceof tF&&1===o.height()&&1===o.width()&&([[o]]=o.data),i=o,n=t.formulaVertex,i instanceof rq&&void 0!==n?i.attachRootVertex(n):i}evaluateAstWithoutPostprocessing(e,t){switch(e.type){case n.EMPTY:return tA;case n.CELL_REFERENCE:{let r=e.reference.toSimpleCellAddress(t.formulaAddress);if(r1(r))return new rq(d.REF,eY.BadRef);if(!this.isSheetValid(e.reference))return new rq(d.REF,eY.SheetRef);return this.dependencyGraph.getCellValue(r)}case n.NUMBER:case n.STRING:return e.value;case n.CONCATENATE_OP:{let r=this.evaluateAst(e.left,t),i=this.evaluateAst(e.right,t);return this.binaryRangeWrapper(this.concatOp,r,i,t)}case n.EQUALS_OP:{let r=this.evaluateAst(e.left,t),i=this.evaluateAst(e.right,t);return this.binaryRangeWrapper(this.equalOp,r,i,t)}case n.NOT_EQUAL_OP:{let r=this.evaluateAst(e.left,t),i=this.evaluateAst(e.right,t);return this.binaryRangeWrapper(this.notEqualOp,r,i,t)}case n.GREATER_THAN_OP:{let r=this.evaluateAst(e.left,t),i=this.evaluateAst(e.right,t);return this.binaryRangeWrapper(this.greaterThanOp,r,i,t)}case n.LESS_THAN_OP:{let r=this.evaluateAst(e.left,t),i=this.evaluateAst(e.right,t);return this.binaryRangeWrapper(this.lessThanOp,r,i,t)}case n.GREATER_THAN_OR_EQUAL_OP:{let r=this.evaluateAst(e.left,t),i=this.evaluateAst(e.right,t);return this.binaryRangeWrapper(this.greaterThanOrEqualOp,r,i,t)}case n.LESS_THAN_OR_EQUAL_OP:{let r=this.evaluateAst(e.left,t),i=this.evaluateAst(e.right,t);return this.binaryRangeWrapper(this.lessThanOrEqualOp,r,i,t)}case n.PLUS_OP:{let r=this.evaluateAst(e.left,t),i=this.evaluateAst(e.right,t);return this.binaryRangeWrapper(this.plusOp,r,i,t)}case n.MINUS_OP:{let r=this.evaluateAst(e.left,t),i=this.evaluateAst(e.right,t);return this.binaryRangeWrapper(this.minusOp,r,i,t)}case n.TIMES_OP:{let r=this.evaluateAst(e.left,t),i=this.evaluateAst(e.right,t);return this.binaryRangeWrapper(this.timesOp,r,i,t)}case n.POWER_OP:{let r=this.evaluateAst(e.left,t),i=this.evaluateAst(e.right,t);return this.binaryRangeWrapper(this.powerOp,r,i,t)}case n.DIV_OP:{let r=this.evaluateAst(e.left,t),i=this.evaluateAst(e.right,t);return this.binaryRangeWrapper(this.divOp,r,i,t)}case n.PLUS_UNARY_OP:{let r=this.evaluateAst(e.value,t);return this.unaryRangeWrapper(this.unaryPlusOp,r,t)}case n.MINUS_UNARY_OP:{let r=this.evaluateAst(e.value,t);return this.unaryRangeWrapper(this.unaryMinusOp,r,t)}case n.PERCENT_OP:{let r=this.evaluateAst(e.value,t);return this.unaryRangeWrapper(this.percentOp,r,t)}case n.FUNCTION_CALL:{if("valid"!==this.config.licenseKeyValidityState&&!n6.functionIsProtected(e.procedureName))return new rq(d.LIC,eY.LicenseKey(this.config.licenseKeyValidityState));let r=this.functionRegistry.getFunction(e.procedureName);if(void 0!==r)return r(e,new ir(t.formulaAddress,t.arraysFlag||this.functionRegistry.isArrayFunction(e.procedureName),t.formulaVertex));return new rq(d.NAME,eY.FunctionName(e.procedureName))}case n.NAMED_EXPRESSION:{let r=this.namedExpressions.nearestNamedExpression(e.expressionName,t.formulaAddress.sheet);if(r)return this.dependencyGraph.getCellValue(r.address);return new rq(d.NAME,eY.NamedExpressionName(e.expressionName))}case n.CELL_RANGE:{if(!this.isSheetValid(e.start)||!this.isSheetValid(e.end))return new rq(d.REF,eY.SheetRef);if(!this.rangeSpansOneSheet(e))return new rq(d.REF,eY.RangeManySheets);let r=r7.fromCellRange(e,t.formulaAddress),i=this.dependencyGraph.getArray(r);if(i){let e=i.array;if(e instanceof rb)throw Error("Array should be already computed");if(e instanceof rq)return e;if(e instanceof rC)return tF.fromRange(e.raw(),r,this.dependencyGraph);else throw Error("Unknown array")}return tF.onlyRange(r,this.dependencyGraph)}case n.COLUMN_RANGE:{if(!this.isSheetValid(e.start)||!this.isSheetValid(e.end))return new rq(d.REF,eY.SheetRef);if(!this.rangeSpansOneSheet(e))return new rq(d.REF,eY.RangeManySheets);let r=ie.fromColumnRange(e,t.formulaAddress);return tF.onlyRange(r,this.dependencyGraph)}case n.ROW_RANGE:{if(!this.isSheetValid(e.start)||!this.isSheetValid(e.end))return new rq(d.REF,eY.SheetRef);if(!this.rangeSpansOneSheet(e))return new rq(d.REF,eY.RangeManySheets);let r=it.fromRowRangeAst(e,t.formulaAddress);return tF.onlyRange(r,this.dependencyGraph)}case n.PARENTHESIS:return this.evaluateAst(e.expression,t);case n.ARRAY:{let r,i=[];for(let n of e.args){let e,o=[];for(let r of n){let i=il(this.evaluateAst(r,t)),n=i.height();if(void 0===e)e=n,o.push(...i.data);else if(e!==n)return new rq(d.REF,eY.SizeMismatch);else for(let e=0;e<n;e++)o[e].push(...i.data[e])}let s=o[0].length;if(void 0===r)r=s,i.push(...o);else{if(r!==s)return new rq(d.REF,eY.SizeMismatch);i.push(...o)}}return tF.onlyValues(i)}case n.ERROR_WITH_RAW_INPUT:case n.ERROR:return e.error}}isSheetValid(e){return void 0===e.sheet||e.sheet===tW.SHEET_FOR_WORKBOOK_EXPRESSIONS||this.dependencyGraph.sheetMapping.hasSheetWithId(e.sheet,{includePlaceholders:!1})}rangeSpansOneSheet(e){return e.start.sheet===e.end.sheet}unaryRangeWrapper(e,t,r){var i;if(t instanceof tF&&!r.arraysFlag&&(t=null!=(i=iv(t,r))?i:new rq(d.VALUE,eY.ScalarExpected)),t instanceof rq)return t;if(t instanceof tF){let r=t.data.map(t=>t.map(e));return tF.onlyValues(r)}return e(t)}binaryRangeWrapper(e,t,r,i){var n,o;if(t instanceof tF&&!i.arraysFlag&&(t=null!=(n=iv(t,i))?n:new rq(d.VALUE,eY.ScalarExpected)),t instanceof rq)return t;if(r instanceof tF&&!i.arraysFlag&&(r=null!=(o=iv(r,i))?o:new rq(d.VALUE,eY.ScalarExpected)),r instanceof rq)return r;if(t instanceof tF||r instanceof tF){if(!(t instanceof tF))if(r.isAdHoc()){let i=r.data;for(let r=0;r<i.length;r++)for(let n=0;n<i[0].length;n++)i[r][n]=e(t,i[r][n]);return tF.onlyValues(i)}else t=tF.fromScalar(t);if(!(r instanceof tF))if(t.isAdHoc()){let i=t.data;for(let t=0;t<i.length;t++)for(let n=0;n<i[0].length;n++)i[t][n]=e(i[t][n],r);return tF.onlyValues(i)}else r=tF.fromScalar(r);if(t.width()===r.width()&&t.height()===r.height()){if(t.isAdHoc()){let i=t.data,n=r.data;for(let t=0;t<i.length;t++)for(let r=0;r<i[0].length;r++)i[t][r]=e(i[t][r],n[t][r]);return tF.onlyValues(i)}if(r.isAdHoc()){let i=t.data,n=r.data;for(let t=0;t<i.length;t++)for(let r=0;r<i[0].length;r++)n[t][r]=e(i[t][r],n[t][r]);return tF.onlyValues(n)}}let i=Math.max(t.width(),r.width()),n=Math.max(t.height(),r.height()),o=Array(n);for(let e=0;e<n;e++)o[e]=Array(i);for(let s=0;s<n;s++){let n=1!==t.height()?s:0,l=1!==r.height()?s:0;for(let a=0;a<i;a++){let i=1!==t.width()?a:0,h=1!==r.width()?a:0;n<t.height()&&l<r.height()&&i<t.width()&&h<r.width()?o[s][a]=e(t.data[n][i],r.data[l][h]):o[s][a]=new rq(d.NA)}}return tF.onlyValues(o)}return e(t,r)}}function oe(e,t){return t instanceof rq?t:e(t)}function ot(e,t,r){return t instanceof rq?t:r instanceof rq?r:e(t,r)}class or{constructor(e){this.sheet=e,this.transformations=[]}add(e){this.transformations.push(e)}performEagerTransformations(e,t){this.transformations.forEach(r=>r.performEagerTransformations(e,t))}transformSingleAst(e,t){let[r,i]=[e,t];return this.transformations.forEach(e=>{[r,i]=e.transformSingleAst(r,i)}),[r,i]}isIrreversible(){return!0}}class oi{constructor(e,t){this.stats=e,this.maxPendingLazyTransformations=t,this.transformations=[],this.versionOffset=0}version(){return this.versionOffset+this.transformations.length}addTransformation(e){return void 0!==this.combinedTransformer?this.combinedTransformer.add(e):this.transformations.push(e),this.version()}beginCombinedMode(e){this.combinedTransformer=new or(e)}commitCombinedMode(){if(void 0===this.combinedTransformer)throw Error("Combined mode wasn't started");return this.transformations.push(this.combinedTransformer),this.combinedTransformer=void 0,this.version()}applyTransformations(e,t,r){this.stats.start(l.TRANSFORM_ASTS_POSTPONED);let i=this.version();for(let n=Math.max(r,this.versionOffset);n<i;n++){let r=this.transformations[n-this.versionOffset];r.isIrreversible()&&(this.undoRedo.storeDataForVersion(n,t,this.parser.computeHashFromAst(e)),this.parser.rememberNewAst(e));let[i,o]=r.transformSingleAst(e,t);e=i,t=o}let n=this.parser.rememberNewAst(e);return this.stats.end(l.TRANSFORM_ASTS_POSTPONED),[n,t,i]}*getTransformationsFrom(e,t){let r=this.version();for(let i=Math.max(e,this.versionOffset);i<r;i++){let e=this.transformations[i-this.versionOffset];(!t||t(e))&&(yield e)}}needsCompaction(){return this.transformations.length>=this.maxPendingLazyTransformations}compact(){this.versionOffset+=this.transformations.length,this.transformations=[]}}function on(e,t){return typeof e==typeof t?e===tA?0:e<t?-1:+(e>t):e===tA?-1:t===tA?1:t instanceof rq||"number"==typeof e&&"string"==typeof t||"number"==typeof e&&"boolean"==typeof t?-1:"string"==typeof e&&"number"==typeof t?1:"string"==typeof e&&"boolean"==typeof t?-1:1}class oo{constructor(e){this.dependencyGraph=e}advancedFind(e,t,{returnOccurrence:r}={returnOccurrence:"first"}){let i=t.range,n=void 0===i?t.valuesFromTopLeftCorner():this.dependencyGraph.computeListOfValuesInRange(i),o="first"===r?0:n.length-1,s="first"===r?e=>e<n.length:e=>e>=0,l="first"===r?e=>e+1:e=>e-1;for(let t=o;s(t);t=l(t))if(e(tM(n[t])))return t;return -1}basicFind(e,t,r,{ordering:i,ifNoMatch:n,returnOccurrence:o}){let s="string"==typeof e?iS(e):e,l=t.range;return void 0===l?this.findNormalizedValue(s,t.valuesFromTopLeftCorner(),n,o):"none"===i?this.findNormalizedValue(s,this.dependencyGraph.computeListOfValuesInRange(l),n,o):function(e,t,{searchCoordinate:r,orderingDirection:i,ifNoMatch:n},o){let s=t.start[r],l="col"===r?t.effectiveEndColumn(o):t.effectiveEndRow(o),a="col"===r?e=>tM(o.getCellValue(r0(t.sheet,e,t.start.row))):e=>tM(o.getCellValue(r0(t.sheet,t.start.col,e))),h="asc"===i?(e,t)=>on(e,t):(e,t)=>-on(e,t),d=function(e,t,r){let i=t,n=r;for(;i<n;){let t=Math.ceil((i+n)/2);e(t)?i=t:n=t-1}return i===n&&e(i)?i:-1}(t=>h(e,a(t))>=0,s,l),u=a(d);if(u===e)return d-s;if("returnLowerBound"===n){if(-1===d)return"asc"===i?-1:0;if(typeof u!=typeof e)return -1;if("asc"===i)return d-s;let t=d+1;return t<=l?t-s:-1}if("returnUpperBound"===n){if(-1===d)return"asc"===i?0:-1;if(typeof u!=typeof e)return -1;if("desc"===i)return d-s;let t=d+1;return t<=l?t-s:-1}return -1}(s,l,{searchCoordinate:r,orderingDirection:i,ifNoMatch:n},this.dependencyGraph)}findNormalizedValue(e,t,r="returnNotFound",i="first"){let n=t.map(tM).map(e=>"string"==typeof e?iS(e):e);if("returnNotFound"===r)return"first"===i?n.indexOf(e):n.lastIndexOf(e);let o="returnLowerBound"===r?(e,t)=>on(e,t):(e,t)=>-on(e,t),s="returnLowerBound"===r?-1/0:1/0,l=-1,a="first"===i?0:n.length-1,h="first"===i?e=>e<n.length:e=>e>=0,d="first"===i?e=>e+1:e=>e-1;for(let t=a;h(t);t=d(t)){let r=n[t];if(r===e)return t;!(o(r,e)>0)&&0>o(s,r)&&(s=r,l=t)}return l}}class os extends oo{constructor(e){super(e),this.dependencyGraph=e}add(e,t){}remove(e,t){}change(e,t,r){}applyChanges(e){}addColumns(e){}removeColumns(e){}removeSheet(e){}moveValues(e,t,r,i){}removeValues(e){}forceApplyPostponedTransformations(){}find(e,t,r){return this.basicFind(e,t,"row",r)}}class ol{constructor(e,t,r){this.dependencyGraph=e,this.config=t,this.stats=r,this.index=new Map,this.transformingService=this.dependencyGraph.lazilyTransformingAstService,this.binarySearchStrategy=new os(e)}add(e,t){if(e!==tA&&!(e instanceof rq))if(e instanceof tF)for(let[r,i]of e.entriesFromTopLeftCorner(t))this.addSingleCellValue(tM(r),i);else this.addSingleCellValue(e,t)}remove(e,t){if(void 0!==e)if(e instanceof tF)for(let[r,i]of e.entriesFromTopLeftCorner(t))this.removeSingleValue(tM(r),i);else this.removeSingleValue(e,t)}change(e,t,r){e!==t&&(this.remove(e,r),this.add(t,r))}applyChanges(e){for(let t of e)void 0!==t.oldValue&&this.change(tM(t.oldValue),tM(t.value),t.address)}moveValues(e,t,r,i){for(let[n,o]of e){let e=r2(o,i,t,r);this.remove(n,o),this.add(n,e)}}removeValues(e){for(let[t,r]of e)this.remove(t,r)}find(e,t,{ordering:r,ifNoMatch:i,returnOccurrence:n}){null==n&&(n="none"===r?"first":"last");let o=this.findUsingColumnIndex(e,t,n);return void 0!==o?o:this.binarySearchStrategy.find(e,t,{ordering:r,ifNoMatch:i,returnOccurrence:n})}findUsingColumnIndex(e,t,r){let i=t.range;if(void 0===i)return;this.ensureRecentData(i.sheet,i.start.col,e);let n=this.getColumnMap(i.sheet,i.start.col);if(!n)return -1;let o="string"==typeof e?iS(e):e,s=n.get(o);if(!s||!s.index||0===s.index.length)return;let l=ol.findRowBelongingToRange(s,i,r);return void 0!==l?l-i.start.row:void 0}static findRowBelongingToRange(e,t,r){let i=t.start.row,n=t.end.row,o="first"===r?oa(i,e.index,"upperBound"):oa(n,e.index,"lowerBound");if(-1===o)return;let s=e.index[o];return s>=i&&s<=n?s:void 0}advancedFind(e,t,r={returnOccurrence:"first"}){return this.binarySearchStrategy.advancedFind(e,t,r)}addColumns(e){let t=this.index.get(e.sheet);t&&t.splice(e.columnStart,0,...Array(e.numberOfColumns))}removeColumns(e){let t=this.index.get(e.sheet);t&&t.splice(e.columnStart,e.numberOfColumns)}removeSheet(e){this.index.delete(e)}forceApplyPostponedTransformations(){for(let[e,t]of this.index)t.forEach((t,r)=>{if(t)for(let i of t.keys())this.ensureRecentData(e,r,i)})}getColumnMap(e,t){this.index.has(e)||this.index.set(e,[]);let r=this.index.get(e),i=r[t];return i||(i=new Map,r[t]=i),i}getValueIndex(e,t,r){let i=this.getColumnMap(e,t),n=this.getColumnMap(e,t).get(r);return n||(n={version:this.transformingService.version(),index:[]},i.set(r,n)),n}ensureRecentData(e,t,r){let i=this.getValueIndex(e,t,r),n=this.transformingService.version();if(i.version!==n){for(let n of this.transformingService.getTransformationsFrom(i.version,t=>t.sheet===e&&(t instanceof nh||t instanceof np)))n instanceof nh?this.addRows(t,n.rowsSpan,r):n instanceof np&&this.removeRows(t,n.rowsSpan,r);i.version=n}}addSingleCellValue(e,t){this.stats.measure(l.BUILD_COLUMN_INDEX,()=>{this.ensureRecentData(t.sheet,t.col,e),"string"==typeof e&&(e=iS(e));let r=this.getValueIndex(t.sheet,t.col,e);ol.addValue(r,t.row)})}removeSingleValue(e,t){this.stats.measure(l.BUILD_COLUMN_INDEX,()=>{this.ensureRecentData(t.sheet,t.col,e);let r=this.getColumnMap(t.sheet,t.col);"string"==typeof e&&(e=iS(e));let i=r.get(e);if(!i)return;let n=oa(t.row,i.index);n>-1&&i.index.splice(n,1),0===i.index.length&&r.delete(e),0===r.size&&delete this.index.get(t.sheet)[t.col]})}addRows(e,t,r){let i=this.getValueIndex(t.sheet,e,r);ol.shiftRows(i,t.rowStart,t.numberOfRows)}removeRows(e,t,r){let i=this.getValueIndex(t.sheet,e,r);ol.removeRowsFromValues(i,t),ol.shiftRows(i,t.rowEnd+1,-t.numberOfRows)}static addValue(e,t){let r=oa(t,e.index,"lowerBound");e.index[r]!==t&&e.index.splice(r+1,0,t)}static removeRowsFromValues(e,t){let r=oa(t.rowStart,e.index,"upperBound"),i=oa(t.rowEnd,e.index,"lowerBound");r>-1&&i>-1&&r<=i&&e.index[r]<=t.rowEnd&&e.index.splice(r,i-r+1)}static shiftRows(e,t,r){let i=oa(t,e.index,"upperBound");if(-1!==i)for(let t=i;t<e.index.length;++t)e.index[t]+=r}}function oa(e,t,r="upperBound"){let i=0,n=t.length-1;for(;i<=n;){let r=Math.floor((i+n)/2);if(e>t[r])i=r+1;else{if(!(e<t[r]))return r;n=r-1}}let o="lowerBound"===r?n:i;return o>=0&&o<=t.length?o:-1}class oh{constructor(e){this.config=e;const t="."===this.config.thousandSeparator?`\\${this.config.thousandSeparator}`:this.config.thousandSeparator,r="."===this.config.decimalSeparator?`\\${this.config.decimalSeparator}`:this.config.decimalSeparator;this.numberPattern=RegExp(`^([+-]?((${r}\\d+)|(\\d+(${t}\\d{3,})*(${r}\\d*)?)))([eE][+-]?\\d+)?$`),this.allThousandSeparatorsRegex=RegExp(`${t}`,"g")}numericStringToMaybeNumber(e){if(this.numberPattern.test(e)){let t=this.numericStringToNumber(e);if(!isNaN(t))return t}}numericStringToNumber(e){return Number(e.replace(this.allThousandSeparatorsRegex,"").replace(this.config.decimalSeparator,"."))}}class od{constructor(e,t,r){this.dependencyGraph=e,this.unparser=t,this.exporter=r}getCellHyperlink(e){let t=this.dependencyGraph.getCell(e);if(t instanceof rx){let e=t.getFormula(this.dependencyGraph.lazilyTransformingAstService);if("HYPERLINK"===e.procedureName)return e.hyperlink}}getCellFormula(e,t){let r=this.dependencyGraph.getCell(e);if(r instanceof rx){let i=r.getFormula(this.dependencyGraph.lazilyTransformingAstService);return t=null!=t?t:e,this.unparser.unparse(i,t)}if(r instanceof rT){let i=r.getAddress(this.dependencyGraph.lazilyTransformingAstService);if(i.row!==e.row||i.col!==e.col||i.sheet!==e.sheet)return;t=null!=t?t:e;let n=r.getFormula(this.dependencyGraph.lazilyTransformingAstService);if(void 0!==n)return this.unparser.unparse(n,t)}else if(r instanceof rU)return r.getFormula()}getCellSerialized(e,t){var r;return null!=(r=this.getCellFormula(e,t))?r:this.getRawValue(e)}getCellValue(e){return this.exporter.exportValue(this.dependencyGraph.getScalarValue(e))}getRawValue(e){return this.dependencyGraph.getRawValue(e)}getSheetValues(e){return this.genericSheetGetter(e,e=>this.getCellValue(e))}getSheetFormulas(e){return this.genericSheetGetter(e,e=>this.getCellFormula(e))}genericSheetGetter(e,t){let r=this.dependencyGraph.getSheetHeight(e),i=this.dependencyGraph.getSheetWidth(e),n=Array(r);for(let o=0;o<r;o++){n[o]=Array(i);for(let r=0;r<i;r++){let i=r0(e,r,o);n[o][r]=t(i)}for(let e=i-1;e>=0;e--)if(null===n[o][e]||void 0===n[o][e])n[o].pop();else break}for(let e=r-1;e>=0;e--)if(0===n[e].length)n.pop();else break;return n}genericAllSheetsGetter(e){let t={};for(let r of this.dependencyGraph.sheetMapping.iterateSheetNames()){let i=this.dependencyGraph.sheetMapping.getSheetIdOrThrowError(r);t[r]=e(i)}return t}getSheetSerialized(e){return this.genericSheetGetter(e,e=>this.getCellSerialized(e))}getAllSheetsValues(){return this.genericAllSheetsGetter(e=>this.getSheetValues(e))}getAllSheetsFormulas(){return this.genericAllSheetsGetter(e=>this.getSheetFormulas(e))}getAllSheetsSerialized(){return this.genericAllSheetsGetter(e=>this.getSheetSerialized(e))}getAllNamedExpressionsSerialized(){let e=[],t=0;for(let r of this.dependencyGraph.sheetMapping.iterateSheetNames())e[this.dependencyGraph.sheetMapping.getSheetIdOrThrowError(r)]=t,t++;return this.dependencyGraph.namedExpressions.getAllNamedExpressions().map(t=>({name:t.expression.displayName,expression:this.getCellSerialized(t.expression.address),scope:void 0!==t.scope?e[t.scope]:void 0,options:t.expression.options}))}withNewConfig(e,t){let r=new tf(e,this.dependencyGraph.sheetMapping,t);return new od(this.dependencyGraph,r,this.exporter)}}class ou{static buildFromSheets(e,t={},r=[]){let i=new of(t);return this.buildEngine(i,e,r)}static buildFromSheet(e,t={},r=[]){let i=new of(t),n=i.translationPackage.getUITranslation(h.NEW_SHEET_PREFIX)+"1";return this.buildEngine(i,{[n]:e},r)}static buildEmpty(e={},t=[]){return this.buildEngine(new of(e),{},t)}static rebuildWithConfig(e,t,r,i){return this.buildEngine(e,t,r,i)}static buildEngine(e,t={},r=[],i=e.useStats?new tY:new tK){i.start(l.BUILD_ENGINE_TOTAL);let n=new tW,o=new n6(e),s=new oi(i,e.maxPendingLazyTransformations),a=rB.buildEmpty(s,e,o,n,i),h=e.useColumnIndex?new ol(a,e,i):new os(a),d=a.sheetMapping,u=a.addressMapping;for(let r in t)if(Object.prototype.hasOwnProperty.call(t,r)){let i=t[r];rL(i);let n=rF(i);if(n.height>e.maxRows||n.width>e.maxColumns)throw new tZ;let o=d.addSheet(r);u.addSheetAndSetStrategyBasedOnBoundaries(o,n,{throwIfSheetAlreadyExists:!0})}let c=new ty(e,o,a.sheetReferenceRegistrar.ensureSheetRegistered.bind(a.sheetReferenceRegistrar));s.parser=c;let g=new tf(e,d,n),p=new iY(e),m=new oh(e),f=new io(e,p,m),w=new nn(e,p,m),y=new ix(e,o),b=new nC(e,a,h,w,c,i,s,n,y),C=new nG(e,b);s.undoRedo=C;let S=new ns(e,a,b),v=new nj(e,b,C,S,a,h,c,w,s,n),R=new nZ(e,n,d,s),E=new od(a,g,R),T=new n7(e,a,h,i,f,o,n,E,y,p);i.measure(l.GRAPH_BUILD,()=>{new nJ(a,h,c,w,i,y).buildGraph(t,i)}),r.forEach(e=>{v.ensureItIsPossibleToAddNamedExpression(e.name,e.expression,e.scope),v.operations.addNamedExpression(e.name,e.expression,e.scope,e.options)});let x=new nq(e,i,T,s,a,h);return x.run(),i.end(l.BUILD_ENGINE_TOTAL),{config:e,stats:i,dependencyGraph:a,columnSearch:h,parser:c,unparser:g,cellContentParser:w,evaluator:x,lazilyTransformingAstService:s,crudOperations:v,exporter:R,namedExpressions:n,serialization:E,functionRegistry:o}}}var oc=r(732);(V=S||(S={})).SheetAdded="sheetAdded",V.SheetRemoved="sheetRemoved",V.SheetRenamed="sheetRenamed",V.NamedExpressionAdded="namedExpressionAdded",V.NamedExpressionRemoved="namedExpressionRemoved",V.ValuesUpdated="valuesUpdated",V.EvaluationSuspended="evaluationSuspended",V.EvaluationResumed="evaluationResumed";class og extends oc.TinyEmitter{emit(e,...t){return super.emit(e,...t),this}}class op{constructor(e,t,r,i,n,o,s,l,a,h,d,u,c,g){this._config=e,this._stats=t,this._dependencyGraph=r,this._columnSearch=i,this._parser=n,this._unparser=o,this._cellContentParser=s,this._evaluator=l,this._lazilyTransformingAstService=a,this._crudOperations=h,this._exporter=d,this._namedExpressions=u,this._serialization=c,this._functionRegistry=g,this._emitter=new og,this._evaluationSuspended=!1}static get defaultConfig(){return ow({})}get graph(){return this.dependencyGraph.graph}get rangeMapping(){return this.dependencyGraph.rangeMapping}get arrayMapping(){return this.dependencyGraph.arrayMapping}get sheetMapping(){return this.dependencyGraph.sheetMapping}get addressMapping(){return this.dependencyGraph.addressMapping}get dependencyGraph(){return this._dependencyGraph}get evaluator(){return this._evaluator}get columnSearch(){return this._columnSearch}get lazilyTransformingAstService(){return this._lazilyTransformingAstService}get licenseKeyValidityState(){return this._config.licenseKeyValidityState}static buildFromArray(e,t={},r=[]){return this.buildFromEngineState(ou.buildFromSheet(e,t,r))}static buildFromSheets(e,t={},r=[]){return this.buildFromEngineState(ou.buildFromSheets(e,t,r))}static buildEmpty(e={},t=[]){return this.buildFromEngineState(ou.buildEmpty(e,t))}static getLanguage(e){ik(e,"string","languageCode");let t=this.registeredLanguages.get(e);if(void 0!==t)return t;throw new rh}static registerLanguage(e,t){if(ik(e,"string","languageCode"),this.registeredLanguages.has(e))throw new rd;this.registeredLanguages.set(e,new rH(Object.assign({},t.functions),Object.assign({},t.errors),Object.assign({},t.ui)))}static unregisterLanguage(e){if(ik(e,"string","languageCode"),this.registeredLanguages.has(e))this.registeredLanguages.delete(e);else throw new rh}static getRegisteredLanguagesCodes(){return Array.from(this.registeredLanguages.keys())}static registerFunctionPlugin(e,t){n6.registerFunctionPlugin(e,t)}static unregisterFunctionPlugin(e){n6.unregisterFunctionPlugin(e)}static registerFunction(e,t,r){ik(e,"string","functionId"),n6.registerFunction(e,t,r)}static unregisterFunction(e){ik(e,"string","functionId"),n6.unregisterFunction(e)}static unregisterAllFunctions(){n6.unregisterAll()}static getRegisteredFunctionNames(e){ik(e,"string","code");let t=n6.getRegisteredFunctionIds();return this.getLanguage(e).getFunctionTranslations(t)}static getFunctionPlugin(e){return ik(e,"string","functionId"),n6.getFunctionPlugin(e)}static getAllFunctionPlugins(){return n6.getPlugins()}static buildFromEngineState(e){return new op(e.config,e.stats,e.dependencyGraph,e.columnSearch,e.parser,e.unparser,e.cellContentParser,e.evaluator,e.lazilyTransformingAstService,e.crudOperations,e.exporter,e.namedExpressions,e.serialization,e.functionRegistry)}getCellValue(e){if(!r6(e))throw new rt("SimpleCellAddress","cellAddress");return this.ensureEvaluationIsNotSuspended(),this._serialization.getCellValue(e)}getCellFormula(e){if(!r6(e))throw new rt("SimpleCellAddress","cellAddress");return this._serialization.getCellFormula(e)}getCellHyperlink(e){if(!r6(e))throw new rt("SimpleCellAddress","cellAddress");return this.ensureEvaluationIsNotSuspended(),this._serialization.getCellHyperlink(e)}getCellSerialized(e){if(!r6(e))throw new rt("SimpleCellAddress","cellAddress");return this.ensureEvaluationIsNotSuspended(),this._serialization.getCellSerialized(e)}getSheetValues(e){return ik(e,"number","sheetId"),this.ensureEvaluationIsNotSuspended(),this._serialization.getSheetValues(e)}getSheetFormulas(e){return ik(e,"number","sheetId"),this._serialization.getSheetFormulas(e)}getSheetSerialized(e){return ik(e,"number","sheetId"),this.ensureEvaluationIsNotSuspended(),this._serialization.getSheetSerialized(e)}getAllSheetsDimensions(){return this._serialization.genericAllSheetsGetter(e=>this.getSheetDimensions(e))}getSheetDimensions(e){return ik(e,"number","sheetId"),{width:this.dependencyGraph.getSheetWidth(e),height:this.dependencyGraph.getSheetHeight(e)}}getAllSheetsValues(){return this.ensureEvaluationIsNotSuspended(),this._serialization.getAllSheetsValues()}getAllSheetsFormulas(){return this._serialization.getAllSheetsFormulas()}getAllSheetsSerialized(){return this.ensureEvaluationIsNotSuspended(),this._serialization.getAllSheetsSerialized()}updateConfig(e){Object.entries(e).every(([e,t])=>this._config[e]===t)||this.rebuildWithConfig(e)}getConfig(){return this._config.getConfig()}rebuildAndRecalculate(){this.rebuildWithConfig({})}getStats(){return this._stats.snapshot()}undo(){return this._crudOperations.undo(),this.recomputeIfDependencyGraphNeedsIt()}redo(){return this._crudOperations.redo(),this.recomputeIfDependencyGraphNeedsIt()}isThereSomethingToUndo(){return this._crudOperations.isThereSomethingToUndo()}isThereSomethingToRedo(){return this._crudOperations.isThereSomethingToRedo()}isItPossibleToSetCellContents(e){let t;if(r6(e))t=new r7(e,e);else if(r8(e))t=new r7(e.start,e.end);else throw new rt("SimpleCellAddress | SimpleCellRange","address");try{for(let e of(this._crudOperations.ensureRangeInSizeLimits(t),t.addresses(this._dependencyGraph)))this._crudOperations.ensureItIsPossibleToChangeContent(e)}catch(e){return!1}return!0}setCellContents(e,t){return this._crudOperations.setCellContents(e,t),this.recomputeIfDependencyGraphNeedsIt()}swapRowIndexes(e,t){return ik(e,"number","sheetId"),this._crudOperations.setRowOrder(e,t),this.recomputeIfDependencyGraphNeedsIt()}isItPossibleToSwapRowIndexes(e,t){ik(e,"number","sheetId");try{return this._crudOperations.validateSwapRowIndexes(e,t),this._crudOperations.testRowOrderForArrays(e,t),!0}catch(e){return!1}}setRowOrder(e,t){ik(e,"number","sheetId");let r=this._crudOperations.mappingFromOrder(e,t,"row");return this.swapRowIndexes(e,r)}isItPossibleToSetRowOrder(e,t){ik(e,"number","sheetId");try{let r=this._crudOperations.mappingFromOrder(e,t,"row");return this._crudOperations.validateSwapRowIndexes(e,r),this._crudOperations.testRowOrderForArrays(e,r),!0}catch(e){return!1}}swapColumnIndexes(e,t){return ik(e,"number","sheetId"),this._crudOperations.setColumnOrder(e,t),this.recomputeIfDependencyGraphNeedsIt()}isItPossibleToSwapColumnIndexes(e,t){ik(e,"number","sheetId");try{return this._crudOperations.validateSwapColumnIndexes(e,t),this._crudOperations.testColumnOrderForArrays(e,t),!0}catch(e){return!1}}setColumnOrder(e,t){ik(e,"number","sheetId");let r=this._crudOperations.mappingFromOrder(e,t,"column");return this.swapColumnIndexes(e,r)}isItPossibleToSetColumnOrder(e,t){ik(e,"number","sheetId");try{let r=this._crudOperations.mappingFromOrder(e,t,"column");return this._crudOperations.validateSwapColumnIndexes(e,r),this._crudOperations.testColumnOrderForArrays(e,r),!0}catch(e){return!1}}isItPossibleToAddRows(e,...t){ik(e,"number","sheetId");let r=nv(t);try{return this._crudOperations.ensureItIsPossibleToAddRows(e,...r),!0}catch(e){return!1}}addRows(e,...t){return ik(e,"number","sheetId"),this._crudOperations.addRows(e,...t),this.recomputeIfDependencyGraphNeedsIt()}isItPossibleToRemoveRows(e,...t){ik(e,"number","sheetId");let r=nS(t);try{return this._crudOperations.ensureItIsPossibleToRemoveRows(e,...r),!0}catch(e){return!1}}removeRows(e,...t){return ik(e,"number","sheetId"),this._crudOperations.removeRows(e,...t),this.recomputeIfDependencyGraphNeedsIt()}isItPossibleToAddColumns(e,...t){ik(e,"number","sheetId");let r=nv(t);try{return this._crudOperations.ensureItIsPossibleToAddColumns(e,...r),!0}catch(e){return!1}}addColumns(e,...t){return ik(e,"number","sheetId"),this._crudOperations.addColumns(e,...t),this.recomputeIfDependencyGraphNeedsIt()}isItPossibleToRemoveColumns(e,...t){ik(e,"number","sheetId");let r=nS(t);try{return this._crudOperations.ensureItIsPossibleToRemoveColumns(e,...r),!0}catch(e){return!1}}removeColumns(e,...t){return ik(e,"number","sheetId"),this._crudOperations.removeColumns(e,...t),this.recomputeIfDependencyGraphNeedsIt()}isItPossibleToMoveCells(e,t){if(!r6(t))throw new rt("SimpleCellAddress","destinationLeftCorner");if(!r8(e))throw new rt("SimpleCellRange","source");try{let r=new r7(e.start,e.end);return this._crudOperations.operations.ensureItIsPossibleToMoveCells(r.start,r.width(),r.height(),t),!0}catch(e){return!1}}moveCells(e,t){if(!r6(t))throw new rt("SimpleCellAddress","destinationLeftCorner");if(!r8(e))throw new rt("SimpleCellRange","source");let r=new r7(e.start,e.end);return this._crudOperations.moveCells(r.start,r.width(),r.height(),t),this.recomputeIfDependencyGraphNeedsIt()}isItPossibleToMoveRows(e,t,r,i){ik(e,"number","sheetId"),ik(t,"number","startRow"),ik(r,"number","numberOfRows"),ik(i,"number","targetRow");try{return this._crudOperations.ensureItIsPossibleToMoveRows(e,t,r,i),!0}catch(e){return!1}}moveRows(e,t,r,i){return ik(e,"number","sheetId"),ik(t,"number","startRow"),ik(r,"number","numberOfRows"),ik(i,"number","targetRow"),this._crudOperations.moveRows(e,t,r,i),this.recomputeIfDependencyGraphNeedsIt()}isItPossibleToMoveColumns(e,t,r,i){ik(e,"number","sheetId"),ik(t,"number","startColumn"),ik(r,"number","numberOfColumns"),ik(i,"number","targetColumn");try{return this._crudOperations.ensureItIsPossibleToMoveColumns(e,t,r,i),!0}catch(e){return!1}}moveColumns(e,t,r,i){return ik(e,"number","sheetId"),ik(t,"number","startColumn"),ik(r,"number","numberOfColumns"),ik(i,"number","targetColumn"),this._crudOperations.moveColumns(e,t,r,i),this.recomputeIfDependencyGraphNeedsIt()}copy(e){if(!r8(e))throw new rt("SimpleCellRange","source");let t=new r7(e.start,e.end);return this._crudOperations.copy(t.start,t.width(),t.height()),this.getRangeValues(e)}cut(e){if(!r8(e))throw new rt("SimpleCellRange","source");let t=new r7(e.start,e.end);return this._crudOperations.cut(t.start,t.width(),t.height()),this.getRangeValues(e)}paste(e){if(!r6(e))throw new rt("SimpleCellAddress","targetLeftCorner");return this.ensureEvaluationIsNotSuspended(),this._crudOperations.paste(e),this.recomputeIfDependencyGraphNeedsIt()}isClipboardEmpty(){return this._crudOperations.isClipboardEmpty()}clearClipboard(){this._crudOperations.clearClipboard()}clearRedoStack(){this._crudOperations.undoRedo.clearRedoStack()}clearUndoStack(){this._crudOperations.undoRedo.clearUndoStack()}getRangeValues(e){if(!r8(e))throw new rt("SimpleCellRange","source");return new r7(e.start,e.end).arrayOfAddressesInRange().map(e=>e.map(e=>this.getCellValue(e)))}getRangeFormulas(e){if(!r8(e))throw new rt("SimpleCellRange","source");return new r7(e.start,e.end).arrayOfAddressesInRange().map(e=>e.map(e=>this.getCellFormula(e)))}getRangeSerialized(e){if(!r8(e))throw new rt("SimpleCellRange","source");return new r7(e.start,e.end).arrayOfAddressesInRange().map(e=>e.map(e=>this.getCellSerialized(e)))}getFillRangeData(e,t,r=!1){if(!r8(e))throw new rt("SimpleCellRange","source");if(!r8(t))throw new rt("SimpleCellRange","target");let i=new r7(e.start,e.end),n=new r7(t.start,t.end);return this.ensureEvaluationIsNotSuspended(),n.arrayOfAddressesInRange().map(n=>n.map(n=>{let o=((n.row-(r?t:e).start.row)%i.height()+i.height())%i.height()+e.start.row,s=((n.col-(r?t:e).start.col)%i.width()+i.width())%i.width()+e.start.col;return this._serialization.getCellSerialized({row:o,col:s,sheet:i.sheet},n)}))}isItPossibleToAddSheet(e){ik(e,"string","sheetName");try{return this._crudOperations.ensureItIsPossibleToAddSheet(e),!0}catch(e){return!1}}addSheet(e){void 0!==e&&ik(e,"string","sheetName");let t=this._crudOperations.addSheet(e);return this.recomputeIfDependencyGraphNeedsIt(),this._emitter.emit(S.SheetAdded,t),t}isItPossibleToRemoveSheet(e){ik(e,"number","sheetId");try{return this._crudOperations.ensureScopeIdIsValid(e),!0}catch(e){return!1}}removeSheet(e){ik(e,"number","sheetId");let t=this.sheetMapping.getSheetName(e);this._crudOperations.removeSheet(e);let r=this.recomputeIfDependencyGraphNeedsIt();return this._emitter.emit(S.SheetRemoved,t,r),r}isItPossibleToClearSheet(e){ik(e,"number","sheetId");try{return this._crudOperations.ensureScopeIdIsValid(e),!0}catch(e){return!1}}clearSheet(e){return ik(e,"number","sheetId"),this._crudOperations.clearSheet(e),this.recomputeIfDependencyGraphNeedsIt()}isItPossibleToReplaceSheetContent(e,t){ik(e,"number","sheetId");try{return this._crudOperations.ensureScopeIdIsValid(e),this._crudOperations.ensureItIsPossibleToChangeSheetContents(e,t),!0}catch(e){return!1}}setSheetContent(e,t){return ik(e,"number","sheetId"),this._crudOperations.setSheetContent(e,t),this.recomputeIfDependencyGraphNeedsIt()}simpleCellAddressFromString(e,t){return ik(e,"string","cellAddress"),ik(t,"number","sheetId"),eA(this.sheetMapping.getSheetId.bind(this.sheetMapping),e,t)}simpleCellRangeFromString(e,t){return ik(e,"string","cellRange"),ik(t,"number","sheetId"),((e,t,r)=>{let i=t.split(":");if(2!==i.length)return;let[n,o]=i,s=eA(e,n,r);if(void 0===s)return;let l=eA(e,o,s.sheet);if(void 0!==l&&s.sheet===l.sheet)return r9(s,l)})(this.sheetMapping.getSheetId.bind(this.sheetMapping),e,t)}simpleCellAddressToString(e,t={}){if(!r6(e))throw new rt("SimpleCellAddress","cellAddress");let r="number"==typeof t?t:t.includeSheetName?e.sheet+1:e.sheet;return eM(this.sheetMapping.getSheetNameOrThrowError.bind(this.sheetMapping),e,r)}simpleCellRangeToString(e,t={}){if(!r8(e))throw new rt("SimpleCellRange","cellRange");let r="number"==typeof t?t:t.includeSheetName?e.start.sheet+e.end.sheet+1:e.start.sheet;var i=this.sheetMapping.getSheetNameOrThrowError.bind(this.sheetMapping);let n=eM(i,e.start,r),o=eM(i,e.end,e.start.sheet);if(void 0!==n&&void 0!==o)return`${n}:${o}`}getCellDependents(e){let t;if(r6(e))t=this._dependencyGraph.addressMapping.getCell(e);else if(r8(e))t=this._dependencyGraph.rangeMapping.getRangeVertex(e.start,e.end);else throw new rt("SimpleCellAddress | SimpleCellRange",e);return void 0===t?[]:this._dependencyGraph.getAdjacentNodesAddresses(t)}getCellPrecedents(e){let t;if(r6(e))t=this._dependencyGraph.addressMapping.getCell(e);else if(r8(e))t=this._dependencyGraph.rangeMapping.getRangeVertex(e.start,e.end);else throw new rt("SimpleCellAddress | SimpleCellRange",e);return void 0===t?[]:this._dependencyGraph.dependencyQueryAddresses(t)}getSheetName(e){return ik(e,"number","sheetId"),this.sheetMapping.getSheetName(e)}getSheetNames(){return this.sheetMapping.getSheetNames()}getSheetId(e){return ik(e,"string","sheetName"),this.sheetMapping.getSheetId(e)}doesSheetExist(e){return ik(e,"string","sheetName"),this.sheetMapping.hasSheetWithName(e)}getCellType(e){if(!r6(e))throw new rt("SimpleCellAddress","cellAddress");var t=this.dependencyGraph.getCell(e);if(t instanceof rT)if(t.isLeftCorner(e))return u.ARRAYFORMULA;else return u.ARRAY;return t instanceof rx||t instanceof rU?u.FORMULA:t instanceof rz?u.VALUE:u.EMPTY}doesCellHaveSimpleValue(e){if(!r6(e))throw new rt("SimpleCellAddress","cellAddress");return this.getCellType(e)===u.VALUE}doesCellHaveFormula(e){if(!r6(e))throw new rt("SimpleCellAddress","cellAddress");let t=this.getCellType(e);return t===u.FORMULA||t===u.ARRAYFORMULA}isCellEmpty(e){if(!r6(e))throw new rt("SimpleCellAddress","cellAddress");return this.getCellType(e)===u.EMPTY}isCellPartOfArray(e){if(!r6(e))throw new rt("SimpleCellAddress","cellAddress");let t=this.getCellType(e);return t===u.ARRAY||t===u.ARRAYFORMULA}getCellValueType(e){if(!r6(e))throw new rt("SimpleCellAddress","cellAddress");return this.ensureEvaluationIsNotSuspended(),rK(this.dependencyGraph.getCellValue(e))}getCellValueDetailedType(e){if(!r6(e))throw new rt("SimpleCellAddress","cellAddress");this.ensureEvaluationIsNotSuspended();var t=this.dependencyGraph.getCellValue(e);return tD(t)?t instanceof tI?t.getDetailedType():s.NUMBER_RAW:rK(t)}getCellValueFormat(e){if(!r6(e))throw new rt("SimpleCellAddress","cellAddress");this.ensureEvaluationIsNotSuspended();var t=this.dependencyGraph.getCellValue(e);if(tD(t))return t instanceof tI?t.format:void 0}countSheets(){return this.sheetMapping.numberOfSheets()}isItPossibleToRenameSheet(e,t){ik(e,"number","sheetId"),ik(t,"string","newName");try{return this._crudOperations.ensureItIsPossibleToRenameSheet(e,t),!0}catch(e){return!1}}renameSheet(e,t){ik(e,"number","sheetId"),ik(t,"string","newName");let r=this._crudOperations.renameSheet(e,t);this.recomputeIfDependencyGraphNeedsIt(),void 0!==r&&this._emitter.emit(S.SheetRenamed,r,t)}batch(e){this.suspendEvaluation(),this._crudOperations.beginUndoRedoBatchMode();try{e()}catch(e){throw this._crudOperations.commitUndoRedoBatchMode(),this.resumeEvaluation(),e}return this._crudOperations.commitUndoRedoBatchMode(),this.resumeEvaluation()}suspendEvaluation(){this._evaluationSuspended=!0,this._emitter.emit(S.EvaluationSuspended)}resumeEvaluation(){this._evaluationSuspended=!1;let e=this.recomputeIfDependencyGraphNeedsIt();return this._emitter.emit(S.EvaluationResumed,e),e}isEvaluationSuspended(){return this._evaluationSuspended}isItPossibleToAddNamedExpression(e,t,r){ik(e,"string","expressionName"),void 0!==r&&ik(r,"number","scope");try{return this._crudOperations.ensureItIsPossibleToAddNamedExpression(e,t,r),!0}catch(e){return!1}}addNamedExpression(e,t,r,i){ik(e,"string","expressionName"),void 0!==r&&ik(r,"number","scope"),this._crudOperations.addNamedExpression(e,t,r,i);let n=this.recomputeIfDependencyGraphNeedsIt();return this._emitter.emit(S.NamedExpressionAdded,e,n),n}getNamedExpressionValue(e,t){ik(e,"string","expressionName"),void 0!==t&&ik(t,"number","scope"),this.ensureEvaluationIsNotSuspended(),this._crudOperations.ensureScopeIdIsValid(t);let r=this._namedExpressions.namedExpressionForScope(e,t);return r?this._serialization.getCellValue(r.address):void 0}getNamedExpressionFormula(e,t){ik(e,"string","expressionName"),void 0!==t&&ik(t,"number","scope"),this._crudOperations.ensureScopeIdIsValid(t);let r=this._namedExpressions.namedExpressionForScope(e,t);if(void 0!==r)return this._serialization.getCellFormula(r.address)}getNamedExpression(e,t){ik(e,"string","expressionName"),void 0!==t&&ik(t,"number","scope");let r=this._namedExpressions.namedExpressionForScope(e,t);if(void 0!==r)return{name:e,scope:t,expression:this._serialization.getCellFormula(r.address),options:r.options}}isItPossibleToChangeNamedExpression(e,t,r){ik(e,"string","expressionName"),void 0!==r&&ik(r,"number","scope");try{return this._crudOperations.ensureItIsPossibleToChangeNamedExpression(e,t,r),!0}catch(e){return!1}}changeNamedExpression(e,t,r,i){return ik(e,"string","expressionName"),void 0!==r&&ik(r,"number","scope"),this._crudOperations.changeNamedExpressionExpression(e,r,t,i),this.recomputeIfDependencyGraphNeedsIt()}isItPossibleToRemoveNamedExpression(e,t){ik(e,"string","expressionName"),void 0!==t&&ik(t,"number","scope");try{return this._crudOperations.isItPossibleToRemoveNamedExpression(e,t),!0}catch(e){return!1}}removeNamedExpression(e,t){ik(e,"string","expressionName"),void 0!==t&&ik(t,"number","scope");let r=this._crudOperations.removeNamedExpression(e,t);if(!r)return[];{let e=this.recomputeIfDependencyGraphNeedsIt();return this._emitter.emit(S.NamedExpressionRemoved,r.displayName,e),e}}listNamedExpressions(e){return void 0!==e&&ik(e,"number","scope"),this._crudOperations.ensureScopeIdIsValid(e),this._namedExpressions.getAllNamedExpressionsNamesInScope(e)}getAllNamedExpressionsSerialized(){return this._serialization.getAllNamedExpressionsSerialized()}normalizeFormula(e){ik(e,"string","formulaString");let{ast:t,address:r}=this.extractTemporaryFormula(e);if(void 0===t)throw new tJ;return this._unparser.unparse(t,r)}calculateFormula(e,t){ik(e,"string","formulaString"),ik(t,"number","sheetId"),this._crudOperations.ensureScopeIdIsValid(t);let{ast:r,address:i,dependencies:n}=this.extractTemporaryFormula(e,t);if(void 0===r)throw new tJ;let o=this.evaluator.runAndForget(r,i,n);return this._exporter.exportScalarOrRange(o)}getNamedExpressionsFromFormula(e){ik(e,"string","formulaString");let{ast:t,dependencies:r}=this.extractTemporaryFormula(e);if(void 0===t)throw new tJ;return[...new Set(r.filter(e=>e instanceof tT).map(e=>e.name))]}validateFormula(e){ik(e,"string","formulaString");let{ast:t}=this.extractTemporaryFormula(e);return void 0!==t}getRegisteredFunctionNames(){return op.getLanguage(this._config.language).getFunctionTranslations(this._functionRegistry.getRegisteredFunctionIds())}getFunctionPlugin(e){return ik(e,"string","functionId"),this._functionRegistry.getFunctionPlugin(e)}getAllFunctionPlugins(){return this._functionRegistry.getPlugins()}numberToDateTime(e){return ik(e,"number","val"),this._evaluator.interpreter.dateTimeHelper.numberToSimpleDateTime(e)}numberToDate(e){return ik(e,"number","val"),this._evaluator.interpreter.dateTimeHelper.numberToSimpleDate(e)}numberToTime(e){return ik(e,"number","val"),iX(e)}on(e,t){this._emitter.on(e,t)}once(e,t){this._emitter.once(e,t)}off(e,t){this._emitter.off(e,t)}destroy(){for(let[e,t]of Object.entries(this))t instanceof Function?this[e]=function(e){return()=>{throw Error(`The "${e}" method cannot be called because this HyperFormula instance has been destroyed`)}}(t):delete this[e]}ensureEvaluationIsNotSuspended(){if(this._evaluationSuspended)throw new rs}extractTemporaryFormula(e,t=1){let r=this._cellContentParser.parse(e),i={sheet:t,col:0,row:0};if(!(r instanceof w.Formula))return{address:i,dependencies:[]};let{ast:n,errors:o,dependencies:s}=this._parser.parse(r.formula,i);return o.length>0?{address:i,dependencies:[]}:{ast:n,address:i,dependencies:s}}rebuildWithConfig(e){let t=this._config.mergeConfig(e),r=this._config.mergeConfig({language:e.language}),i=this._serialization.withNewConfig(r,this._namedExpressions).getAllSheetsSerialized(),n=this._serialization.getAllNamedExpressionsSerialized(),o=ou.rebuildWithConfig(t,i,n,this._stats);this._config=o.config,this._stats=o.stats,this._dependencyGraph=o.dependencyGraph,this._columnSearch=o.columnSearch,this._parser=o.parser,this._unparser=o.unparser,this._cellContentParser=o.cellContentParser,this._evaluator=o.evaluator,this._lazilyTransformingAstService=o.lazilyTransformingAstService,this._crudOperations=o.crudOperations,this._exporter=o.exporter,this._namedExpressions=o.namedExpressions,this._serialization=o.serialization,this._functionRegistry=o.functionRegistry}compactLazyTransformationsIfNeeded(){var e;this._lazilyTransformingAstService.needsCompaction()&&(this._dependencyGraph.forceApplyPostponedTransformations(),this._columnSearch.forceApplyPostponedTransformations(),this._lazilyTransformingAstService.compact(),null==(e=this._lazilyTransformingAstService.undoRedo)||e.cleanupOrphanedOldData())}recomputeIfDependencyGraphNeedsIt(){if(this._evaluationSuspended)return[];{let e=this._crudOperations.getAndClearContentChanges(),t=this.dependencyGraph.verticesToRecompute();this.dependencyGraph.clearDirtyVertices(),this.compactLazyTransformationsIfNeeded(),t.length>0&&e.addAll(this.evaluator.partialRun(t));let r=e.exportChanges(this._exporter);return e.isEmpty()||this._emitter.emit(S.ValuesUpdated,r),r}}}op.version="3.3.0",op.buildDate="20/05/2026 14:43:58",op.releaseDate="20/05/2026",op.languages={},op.registeredLanguages=new Map;let om=new WeakMap;class of{constructor(e={},t=!0){const{accentSensitive:r,caseSensitive:i,caseFirst:n,chooseAddressMappingPolicy:o,context:s,currencySymbol:l,dateFormats:a,decimalSeparator:h,evaluateNullToZero:d,functionArgSeparator:u,functionPlugins:c,ignorePunctuation:g,leapYear1900:p,localeLang:m,language:f,ignoreWhiteSpace:w,licenseKey:y,matchWholeCell:b,arrayColumnSeparator:C,arrayRowSeparator:S,maxRows:v,maxColumns:R,nullYear:E,nullDate:T,parseDateTime:x,precisionEpsilon:A,precisionRounding:M,stringifyDateTime:I,stringifyDuration:N,smartRounding:O,timeFormats:k,thousandSeparator:H,useArrayArithmetic:_,useStats:P,undoLimit:D,maxPendingLazyTransformations:L,useColumnIndex:F,useRegularExpressions:B,useWildcards:V}=e;t&&of.warnDeprecatedOptions(e),this.useArrayArithmetic=iM(_,"boolean","useArrayArithmetic"),this.accentSensitive=iM(r,"boolean","accentSensitive"),this.caseSensitive=iM(i,"boolean","caseSensitive"),this.caseFirst=iM(n,["upper","lower","false"],"caseFirst"),this.ignorePunctuation=iM(g,"boolean","ignorePunctuation"),this.chooseAddressMappingPolicy=null!=o?o:of.defaultConfig.chooseAddressMappingPolicy,this.dateFormats=[...iN(a,Array.isArray,"array","dateFormats")],this.timeFormats=[...iN(k,Array.isArray,"array","timeFormats")],this.functionArgSeparator=iM(u,"string","functionArgSeparator"),this.decimalSeparator=iM(h,[".",","],"decimalSeparator"),this.language=iM(f,"string","language"),this.ignoreWhiteSpace=iM(w,["standard","any"],"ignoreWhiteSpace"),this.licenseKey=iM(y,"string","licenseKey"),this.thousandSeparator=iM(H,["",","," ","."],"thousandSeparator"),this.arrayColumnSeparator=iM(C,[",",";"],"arrayColumnSeparator"),this.arrayRowSeparator=iM(S,[";","|"],"arrayRowSeparator"),this.localeLang=iM(m,"string","localeLang"),this.functionPlugins=[...null!=c?c:of.defaultConfig.functionPlugins],this.smartRounding=iM(O,"boolean","smartRounding"),this.evaluateNullToZero=iM(d,"boolean","evaluateNullToZero"),this.nullYear=iM(E,"number","nullYear"),iI(this.nullYear,"nullYear",0),function(e,t){if(e>100)throw new rn(t,100)}(this.nullYear,"nullYear"),this.precisionRounding=iM(M,"number","precisionRounding"),iI(this.precisionRounding,"precisionRounding",0),this.precisionEpsilon=iM(A,"number","precisionEpsilon"),iI(this.precisionEpsilon,"precisionEpsilon",0),this.useColumnIndex=iM(F,"boolean","useColumnIndex"),this.useStats=iM(P,"boolean","useStats"),this.parseDateTime=iM(x,"function","parseDateTime"),this.stringifyDateTime=iM(I,"function","stringifyDateTime"),this.stringifyDuration=iM(N,"function","stringifyDuration"),this.translationPackage=op.getLanguage(this.language),this.errorMapping=this.translationPackage.buildErrorMapping(),this.nullDate=iN(T,i$,"IDate","nullDate"),this.leapYear1900=iM(p,"boolean","leapYear1900"),this.undoLimit=iM(D,"number","undoLimit"),this.maxPendingLazyTransformations=iM(L,"number","maxPendingLazyTransformations"),this.useRegularExpressions=iM(B,"boolean","useRegularExpressions"),this.useWildcards=iM(V,"boolean","useWildcards"),this.matchWholeCell=iM(b,"boolean","matchWholeCell"),iI(this.undoLimit,"undoLimit",0),iI(this.maxPendingLazyTransformations,"maxPendingLazyTransformations",1),this.maxRows=iM(v,"number","maxRows"),iI(this.maxRows,"maxRows",1),this.maxColumns=iM(R,"number","maxColumns"),this.currencySymbol=this.setupCurrencySymbol(l),iI(this.maxColumns,"maxColumns",1),this.context=s,om.set(this,{licenseKeyValidityState:function(e){let t={template:"missing",vars:{}};if("gpl-v3"===e||"internal-use-in-handsontable"===e||"hftrial-0168e-1f2b7-47158-70b05-0842f"===e)t.template="valid";else if("string"==typeof e&&function(e){if((e=(e+"").replace(/\-/g,""))[i8]!==i7("Z"))return!1;let t=0;return 0===[[0,i7("G")+1],[i7("H"),i7("H")-1],[i7("G")+i7("H"),i7("G")]].reduce((r,[i,n],o)=>{let s,l,a,h,d;return r|=(parseInt(`${parseInt((s=e,l=t+i-2*(0!==o),a=n+2*!!o,parseInt(s.substr(l,a),16)+(h=e,d=t+i+n,parseInt(h.substr(d,2),16)+[]).padStart(2,"0")),10)}`,10)%97||2)>>1,t+=2,r},i7("A"))}(e)){var r,i;let n,o,s,l,a,h,d,u,c,[g,p,m]="20/05/2026".split("/"),f=Math.floor(new Date(`${p}/${g}/${m}`).getTime()/864e5),w=25===i9(r=e)[i8]?(n=i9(r),o=parseInt("12",16),s=i7("F"),parseInt(n.substr(o,s),16)/(l=i9(r),a=i7("C"),h=i7("Y")>>4,parseInt(l.substr(a,h),16)||(~~![][i8]<<3)+1)):0;t.vars.keyValidityDate=(d=["January","February","March","April","May","June","July","August","September","October","November","December"][(i=new Date((w+1)*864e5)).getMonth()],u=i.getDate(),c=i.getFullYear(),`${d} ${u}, ${c}`),f>w?t.template="expired":t.template="valid"}else""!==e&&(t.template="invalid");return nt||"valid"===t.template||(console.warn(ne[t.template](t.vars)),nt=!0),t.template}(this.licenseKey)}),iO({value:this.decimalSeparator,name:"decimalSeparator"},{value:this.functionArgSeparator,name:"functionArgSeparator"},{value:this.thousandSeparator,name:"thousandSeparator"}),iO({value:this.arrayRowSeparator,name:"arrayRowSeparator"},{value:this.arrayColumnSeparator,name:"arrayColumnSeparator"})}setupCurrencySymbol(e){let t=[...iN(e,Array.isArray,"array","currencySymbol")];return t.forEach(e=>{if("string"!=typeof e)throw new rt("string[]","currencySymbol");if(""===e)throw new rr("currencySymbol")}),t}get licenseKeyValidityState(){return om.get(this).licenseKeyValidityState}getConfig(){return ow(this)}mergeConfig(e){let t=Object.assign({},this.getConfig(),e);return of.warnDeprecatedOptions(e),new of(t,!1)}static warnDeprecatedOptions(e){}static warnDeprecatedIfUsed(e,t,r,i){void 0!==e&&(void 0===i?console.warn(`${t} option is deprecated since ${r}`):console.warn(`${t} option is deprecated since ${r}, please use ${i}`))}}function ow(e){var t;let r={};for(let i in of.defaultConfig){let n=null!=(t=e[i])?t:of.defaultConfig[i];Array.isArray(n)?r[i]=[...n]:r[i]=n}return r}of.defaultConfig={accentSensitive:!1,currencySymbol:["$"],caseSensitive:!1,caseFirst:"lower",context:void 0,chooseAddressMappingPolicy:new class{call(){return r$}},dateFormats:["DD/MM/YYYY","DD/MM/YY"],decimalSeparator:".",evaluateNullToZero:!1,functionArgSeparator:",",functionPlugins:[],ignorePunctuation:!1,language:"enGB",ignoreWhiteSpace:"standard",licenseKey:"",leapYear1900:!1,localeLang:"en",matchWholeCell:!0,arrayColumnSeparator:",",arrayRowSeparator:";",maxRows:4e4,maxColumns:18278,nullYear:30,nullDate:{year:1899,month:12,day:30},parseDateTime:function(e,t,r){var i;if(void 0===t&&void 0===r)return;let n=e.replace(iP," ").trim().toLowerCase();if(i=n,!i_.test(i))return;let o=n.substring(n.length-2);"am"===o||"pm"===o?n=n.substring(0,n.length-2).trim():"a"===(o=n.substring(n.length-1))||"p"===o?n=n.substring(0,n.length-1).trim():o=void 0;let s=n.split(iD);s.length>=2&&s[s.length-2].includes(":")&&(s[s.length-2]=s[s.length-2]+"."+s[s.length-1],s.pop());let l=s[s.length-1].split(":");if(void 0!==o&&l.push(o),1===s.length)return iB(l,r);if(1===l.length)return iV(s,t);let a=iV(s.slice(0,s.length-1),t),h=iB(l,r);return void 0===a||void 0===h?void 0:Object.assign(Object.assign({},a),h)},precisionEpsilon:1e-13,precisionRounding:10,smartRounding:!0,stringifyDateTime:function(e,t){let r=i3(t);if(void 0===r)return;let i=r.tokens,n="",o=!1,s=i.some(e=>e.type===m.FORMAT&&("a/p"===e.value||"A/P"===e.value||"am/pm"===e.value||"AM/PM"===e.value));for(let t=0;t<i.length;t++){let r=i[t];if(r.type===m.FREE_TEXT){n+=r.value;continue}switch(r.value.toLowerCase()){case"h":case"hh":o=!0,n+=i5(s?(e.hours+11)%12+1:e.hours,r.value.length);break;case"d":case"dd":n+=i5(e.day,r.value.length);break;case"s":case"ss":n+=i5(Math.floor(e.seconds),r.value.length);break;case"m":case"mm":t+1<i.length&&i[t+1].value.startsWith(":")&&(o=!0),o?n+=i5(e.minutes,r.value.length):n+=i5(e.month,r.value.length),o=!0;break;case"yy":n+=i5(e.year%100,r.value.length);break;case"yyyy":n+=e.year;break;case"am/pm":case"a/p":{let[t,i]=r.value.split("/");n+=e.hours<12?t:i;break}default:if(iH.test(r.value)){let t=r.value.length-3;n+=`${e.seconds<10?"0":""}${Math.floor(e.seconds*Math.pow(10,t))/Math.pow(10,t)}`;continue}return}}return n},stringifyDuration:function(e,t){let r=i3(t);if(void 0===r)return;let i=r.tokens,n="";for(let t of i){if(t.type===m.FREE_TEXT){n+=t.value;continue}switch(t.value.toLowerCase()){case"h":case"hh":n+=i5(e.hours,t.value.length),e.hours=0;break;case"[hh]":n+=i5(e.hours,t.value.length-2),e.hours=0;break;case"m":case"mm":n+=i5(e.minutes,t.value.length),e.minutes=0;break;case"[mm]":n+=i5(e.minutes+60*e.hours,t.value.length-2),e.minutes=0,e.hours=0;break;case"s":case"ss":n+=i5(Math.floor(e.seconds),t.value.length);break;default:if(iH.test(t.value)){let r=Math.max(t.value.length-3,0);n+=`${e.seconds<10?"0":""}${Math.floor(e.seconds*Math.pow(10,r))/Math.pow(10,r)}`;continue}return}}return n},timeFormats:["hh:mm","hh:mm:ss.sss"],thousandSeparator:"",undoLimit:20,maxPendingLazyTransformations:50,useRegularExpressions:!1,useWildcards:!0,useColumnIndex:!1,useStats:!1,useArrayArithmetic:!1};let oy={errors:{CYCLE:"#CYCLE!",DIV_BY_ZERO:"#DIV/0!",ERROR:"#ERROR!",NA:"#N/A",NAME:"#NAME?",NUM:"#NUM!",REF:"#REF!",SPILL:"#SPILL!",VALUE:"#VALUE!"},functions:{FILTER:"FILTER",ADDRESS:"ADDRESS",ARRAY_CONSTRAIN:"ARRAY_CONSTRAIN",ARRAYFORMULA:"ARRAYFORMULA",ABS:"ABS",ACOS:"ACOS",ACOSH:"ACOSH",ACOT:"ACOT",ACOTH:"ACOTH",AND:"AND",ARABIC:"ARABIC",ASIN:"ASIN",ASINH:"ASINH",ATAN2:"ATAN2",ATAN:"ATAN",ATANH:"ATANH",AVERAGE:"AVERAGE",AVERAGEA:"AVERAGEA",AVERAGEIF:"AVERAGEIF",BASE:"BASE",BIN2DEC:"BIN2DEC",BIN2HEX:"BIN2HEX",BIN2OCT:"BIN2OCT",BITAND:"BITAND",BITLSHIFT:"BITLSHIFT",BITOR:"BITOR",BITRSHIFT:"BITRSHIFT",BITXOR:"BITXOR",CEILING:"CEILING",CHAR:"CHAR",CHOOSE:"CHOOSE",CLEAN:"CLEAN",CODE:"CODE",COLUMN:"COLUMN",COLUMNS:"COLUMNS",CONCATENATE:"CONCATENATE",CORREL:"CORREL",COS:"COS",COSH:"COSH",COT:"COT",COTH:"COTH",COUNT:"COUNT",COUNTA:"COUNTA",COUNTBLANK:"COUNTBLANK",COUNTIF:"COUNTIF",COUNTIFS:"COUNTIFS",COUNTUNIQUE:"COUNTUNIQUE",CSC:"CSC",CSCH:"CSCH",CUMIPMT:"CUMIPMT",CUMPRINC:"CUMPRINC",DATE:"DATE",DATEDIF:"DATEDIF",DATEVALUE:"DATEVALUE",DAY:"DAY",DAYS360:"DAYS360",DAYS:"DAYS",DB:"DB",DAVERAGE:"DAVERAGE",DCOUNT:"DCOUNT",DCOUNTA:"DCOUNTA",DGET:"DGET",DMAX:"DMAX",DMIN:"DMIN",DPRODUCT:"DPRODUCT",DSTDEV:"DSTDEV",DSTDEVP:"DSTDEVP",DSUM:"DSUM",DVAR:"DVAR",DVARP:"DVARP",DDB:"DDB",DEC2BIN:"DEC2BIN",DEC2HEX:"DEC2HEX",DEC2OCT:"DEC2OCT",DECIMAL:"DECIMAL",DEGREES:"DEGREES",DELTA:"DELTA",DOLLARDE:"DOLLARDE",DOLLARFR:"DOLLARFR",EDATE:"EDATE",EFFECT:"EFFECT",EOMONTH:"EOMONTH",ERF:"ERF",ERFC:"ERFC",EVEN:"EVEN",EXACT:"EXACT",EXP:"EXP",FALSE:"FALSE",FIND:"FIND",FORMULATEXT:"FORMULATEXT",FV:"FV",FVSCHEDULE:"FVSCHEDULE",HEX2BIN:"HEX2BIN",HEX2DEC:"HEX2DEC",HEX2OCT:"HEX2OCT",HLOOKUP:"HLOOKUP",HOUR:"HOUR",HYPERLINK:"HYPERLINK",IF:"IF",IFERROR:"IFERROR",IFNA:"IFNA",IFS:"IFS",INDEX:"INDEX",INT:"INT",INTERVAL:"INTERVAL",IPMT:"IPMT",IRR:"IRR",ISBINARY:"ISBINARY",ISBLANK:"ISBLANK",ISERR:"ISERR",ISERROR:"ISERROR",ISEVEN:"ISEVEN",ISFORMULA:"ISFORMULA",ISLOGICAL:"ISLOGICAL",ISNA:"ISNA",ISNONTEXT:"ISNONTEXT",ISNUMBER:"ISNUMBER",ISODD:"ISODD",ISOWEEKNUM:"ISOWEEKNUM",ISPMT:"ISPMT",ISREF:"ISREF",ISTEXT:"ISTEXT",LEFT:"LEFT",LEN:"LEN",LN:"LN",LOG10:"LOG10",LOG:"LOG",LOWER:"LOWER",MATCH:"MATCH",MAX:"MAX",MAXA:"MAXA",MAXIFS:"MAXIFS",MAXPOOL:"MAXPOOL",MEDIAN:"MEDIAN",MEDIANPOOL:"MEDIANPOOL",MID:"MID",MIN:"MIN",MINA:"MINA",MINIFS:"MINIFS",MINUTE:"MINUTE",MIRR:"MIRR",MMULT:"MMULT",MOD:"MOD",MONTH:"MONTH",N:"N",NA:"NA",NETWORKDAYS:"NETWORKDAYS","NETWORKDAYS.INTL":"NETWORKDAYS.INTL",NOMINAL:"NOMINAL",NOT:"NOT",NOW:"NOW",NPER:"NPER",NPV:"NPV",OCT2BIN:"OCT2BIN",OCT2DEC:"OCT2DEC",OCT2HEX:"OCT2HEX",ODD:"ODD",OFFSET:"OFFSET",OR:"OR",PI:"PI",PMT:"PMT",PDURATION:"PDURATION",PRODUCT:"PRODUCT",POWER:"POWER",PPMT:"PPMT",PROPER:"PROPER",PV:"PV",RADIANS:"RADIANS",RAND:"RAND",RATE:"RATE",REPLACE:"REPLACE",REPT:"REPT",RIGHT:"RIGHT",ROMAN:"ROMAN",ROUND:"ROUND",ROUNDDOWN:"ROUNDDOWN",ROUNDUP:"ROUNDUP",ROW:"ROW",ROWS:"ROWS",RRI:"RRI",SEARCH:"SEARCH",SEC:"SEC",SECH:"SECH",SECOND:"SECOND",SEQUENCE:"SEQUENCE",SHEET:"SHEET",SHEETS:"SHEETS",SIN:"SIN",SINH:"SINH",SLN:"SLN",SPLIT:"SPLIT",SQRT:"SQRT",STDEVA:"STDEVA","STDEV.P":"STDEV.P",STDEVPA:"STDEVPA","STDEV.S":"STDEV.S",SUBSTITUTE:"SUBSTITUTE",SUBTOTAL:"SUBTOTAL",SUM:"SUM",SUMIF:"SUMIF",SUMIFS:"SUMIFS",SUMPRODUCT:"SUMPRODUCT",SUMSQ:"SUMSQ",SWITCH:"SWITCH",SYD:"SYD",T:"T",TAN:"TAN",TANH:"TANH",TBILLEQ:"TBILLEQ",TBILLPRICE:"TBILLPRICE",TBILLYIELD:"TBILLYIELD",TEXT:"TEXT",TEXTJOIN:"TEXTJOIN",TIME:"TIME",TIMEVALUE:"TIMEVALUE",TODAY:"TODAY",TRANSPOSE:"TRANSPOSE",TRIM:"TRIM",TRUE:"TRUE",TRUNC:"TRUNC",UNICHAR:"UNICHAR",UNICODE:"UNICODE",UPPER:"UPPER",VALUE:"VALUE",VARA:"VARA","VAR.P":"VAR.P",VARPA:"VARPA","VAR.S":"VAR.S",VLOOKUP:"VLOOKUP",WEEKDAY:"WEEKDAY",WEEKNUM:"WEEKNUM",WORKDAY:"WORKDAY","WORKDAY.INTL":"WORKDAY.INTL",XNPV:"XNPV",XOR:"XOR",XLOOKUP:"XLOOKUP",YEAR:"YEAR",YEARFRAC:"YEARFRAC","HF.ADD":"HF.ADD","HF.CONCAT":"HF.CONCAT","HF.DIVIDE":"HF.DIVIDE","HF.EQ":"HF.EQ","HF.GT":"HF.GT","HF.GTE":"HF.GTE","HF.LT":"HF.LT","HF.LTE":"HF.LTE","HF.MINUS":"HF.MINUS","HF.MULTIPLY":"HF.MULTIPLY","HF.NE":"HF.NE","HF.POW":"HF.POW","HF.UMINUS":"HF.UMINUS","HF.UNARY_PERCENT":"HF.UNARY_PERCENT","HF.UPLUS":"HF.UPLUS",VARP:"VARP",VAR:"VAR",STDEVP:"STDEVP",STDEV:"STDEV","EXPON.DIST":"EXPON.DIST",FISHER:"FISHER",FISHERINV:"FISHERINV",GAMMA:"GAMMA","GAMMA.DIST":"GAMMA.DIST",GAMMALN:"GAMMALN","GAMMALN.PRECISE":"GAMMALN.PRECISE","GAMMA.INV":"GAMMA.INV",GAUSS:"GAUSS",FACT:"FACT",FACTDOUBLE:"FACTDOUBLE",COMBIN:"COMBIN",COMBINA:"COMBINA",GCD:"GCD",LCM:"LCM",MROUND:"MROUND",MULTINOMIAL:"MULTINOMIAL",QUOTIENT:"QUOTIENT",RANDBETWEEN:"RANDBETWEEN",SERIESSUM:"SERIESSUM",SIGN:"SIGN",SQRTPI:"SQRTPI",SUMX2MY2:"SUMX2MY2",SUMX2PY2:"SUMX2PY2",SUMXMY2:"SUMXMY2",EXPONDIST:"EXPONDIST",GAMMADIST:"GAMMADIST",GAMMAINV:"GAMMAINV","BETA.DIST":"BETA.DIST",BETADIST:"BETADIST","BETA.INV":"BETA.INV",BETAINV:"BETAINV","BINOM.DIST":"BINOM.DIST",BINOMDIST:"BINOMDIST","BINOM.INV":"BINOM.INV",BESSELI:"BESSELI",BESSELJ:"BESSELJ",BESSELK:"BESSELK",BESSELY:"BESSELY","CHISQ.DIST":"CHISQ.DIST","CHISQ.DIST.RT":"CHISQ.DIST.RT","CHISQ.INV":"CHISQ.INV","CHISQ.INV.RT":"CHISQ.INV.RT",CHIDIST:"CHIDIST",CHIINV:"CHIINV","F.DIST":"F.DIST","F.DIST.RT":"F.DIST.RT","F.INV":"F.INV","F.INV.RT":"F.INV.RT",FDIST:"FDIST",FINV:"FINV",WEIBULL:"WEIBULL","WEIBULL.DIST":"WEIBULL.DIST",POISSON:"POISSON","POISSON.DIST":"POISSON.DIST","HYPGEOM.DIST":"HYPGEOM.DIST",HYPGEOMDIST:"HYPGEOMDIST","T.DIST":"T.DIST","T.DIST.2T":"T.DIST.2T","T.DIST.RT":"T.DIST.RT","T.INV":"T.INV","T.INV.2T":"T.INV.2T",TDIST:"TDIST",TINV:"TINV",LOGINV:"LOGINV","LOGNORM.DIST":"LOGNORM.DIST","LOGNORM.INV":"LOGNORM.INV",LOGNORMDIST:"LOGNORMDIST","NORM.DIST":"NORM.DIST","NORM.INV":"NORM.INV","NORM.S.DIST":"NORM.S.DIST","NORM.S.INV":"NORM.S.INV",NORMDIST:"NORMDIST",NORMINV:"NORMINV",NORMSDIST:"NORMSDIST",NORMSINV:"NORMSINV",PHI:"PHI","NEGBINOM.DIST":"NEGBINOM.DIST",NEGBINOMDIST:"NEGBINOMDIST",COMPLEX:"COMPLEX",IMABS:"IMABS",IMAGINARY:"IMAGINARY",IMARGUMENT:"IMARGUMENT",IMCONJUGATE:"IMCONJUGATE",IMCOS:"IMCOS",IMCOSH:"IMCOSH",IMCOT:"IMCOT",IMCSC:"IMCSC",IMCSCH:"IMCSCH",IMDIV:"IMDIV",IMEXP:"IMEXP",IMLN:"IMLN",IMLOG10:"IMLOG10",IMLOG2:"IMLOG2",IMPOWER:"IMPOWER",IMPRODUCT:"IMPRODUCT",IMREAL:"IMREAL",IMSEC:"IMSEC",IMSECH:"IMSECH",IMSIN:"IMSIN",IMSINH:"IMSINH",IMSQRT:"IMSQRT",IMSUB:"IMSUB",IMSUM:"IMSUM",IMTAN:"IMTAN",LARGE:"LARGE",SMALL:"SMALL",PERCENTILE:"PERCENTILE","PERCENTILE.INC":"PERCENTILE.INC","PERCENTILE.EXC":"PERCENTILE.EXC",QUARTILE:"QUARTILE","QUARTILE.INC":"QUARTILE.INC","QUARTILE.EXC":"QUARTILE.EXC",AVEDEV:"AVEDEV",CONFIDENCE:"CONFIDENCE","CONFIDENCE.NORM":"CONFIDENCE.NORM","CONFIDENCE.T":"CONFIDENCE.T",DEVSQ:"DEVSQ",GEOMEAN:"GEOMEAN",HARMEAN:"HARMEAN",CRITBINOM:"CRITBINOM","COVARIANCE.P":"COVARIANCE.P","COVARIANCE.S":"COVARIANCE.S",COVAR:"COVAR",PEARSON:"PEARSON",RSQ:"RSQ",STANDARDIZE:"STANDARDIZE","Z.TEST":"Z.TEST",ZTEST:"ZTEST","F.TEST":"F.TEST",FTEST:"FTEST",STEYX:"STEYX",SLOPE:"SLOPE","CHISQ.TEST":"CHISQ.TEST",CHITEST:"CHITEST","T.TEST":"T.TEST",TTEST:"TTEST",SKEW:"SKEW","SKEW.P":"SKEW.P",WEIBULLDIST:"WEIBULLDIST",VARS:"VARS",TINV2T:"TINV2T",TDISTRT:"TDISTRT",TDIST2T:"TDIST2T",STDEVS:"STDEVS",FINVRT:"FINVRT",FDISTRT:"FDISTRT",CHIDISTRT:"CHIDISTRT",CHIINVRT:"CHIINVRT",COVARIANCEP:"COVARIANCEP",COVARIANCES:"COVARIANCES",LOGNORMINV:"LOGNORMINV",POISSONDIST:"POISSONDIST",SKEWP:"SKEWP","CEILING.MATH":"CEILING.MATH",FLOOR:"FLOOR","FLOOR.MATH":"FLOOR.MATH","CEILING.PRECISE":"CEILING.PRECISE","FLOOR.PRECISE":"FLOOR.PRECISE","ISO.CEILING":"ISO.CEILING"},langCode:"enGB",ui:{NEW_SHEET_PREFIX:"Sheet"}};(z=v||(v={}))[z.FullyAbsolute=1]="FullyAbsolute",z[z.RowAbsoluteColRelative=2]="RowAbsoluteColRelative",z[z.RowRelativeColAbsolute=3]="RowRelativeColAbsolute",z[z.FullyRelative=4]="FullyRelative";class ob extends iE{verifyAddressArguments(e,t,r,i){if(i){if(e<1||t<1)return new rq(d.VALUE,eY.LessThanOne)}else if(v.FullyAbsolute==r){if(e<1||t<1)return new rq(d.VALUE,eY.LessThanOne)}else if(v.RowAbsoluteColRelative==r){if(e<1)return new rq(d.VALUE,eY.LessThanOne)}else if(v.RowRelativeColAbsolute==r&&t<1)return new rq(d.VALUE,eY.LessThanOne)}address(e,t){return this.runFunction(e.args,t,this.metadata("ADDRESS"),(e,t,r,i,n)=>{let o=this.verifyAddressArguments(e,t,r,i);if(void 0!==o)return o;let s=eN(t-1),l="";null!=n&&(l=`${n}!`);let a=0==t?"C":`C[${t}]`,h=0==e?"R":`R[${e}]`;return v.FullyRelative==r?i?`${l}${s}${e}`:`${l}${h}${a}`:v.RowRelativeColAbsolute==r?i?`${l}$${s}${e}`:`${l}${h}C${t}`:v.RowAbsoluteColRelative==r?i?`${l}${s}$${e}`:`${l}R${e}${a}`:i?`${l}$${s}$${e}`:`${l}R${e}C${t}`})}}ob.implementedFunctions={ADDRESS:{method:"address",parameters:[{argumentType:p.NUMBER},{argumentType:p.NUMBER},{argumentType:p.NUMBER,optionalArg:!0,defaultValue:1,minValue:1,maxValue:4,emptyAsDefault:!0},{argumentType:p.BOOLEAN,optionalArg:!0,defaultValue:!0,emptyAsDefault:!0},{argumentType:p.STRING,optionalArg:!0}]}};class oC extends iE{arrayformula(e,t){return this.runFunction(e.args,t,this.metadata("ARRAYFORMULA"),e=>e)}arrayformulaArraySize(e,t){if(1!==e.args.length)return iT.error();let r=this.metadata("ARRAYFORMULA");return e.args.map(e=>{var i;return this.arraySizeForAst(e,new ir(t.formulaAddress,t.arraysFlag||null!=(i=null==r?void 0:r.enableArrayArithmeticForArguments)&&i))})[0]}arrayconstrain(e,t){return this.runFunction(e.args,t,this.metadata("ARRAY_CONSTRAIN"),(e,t,r)=>{t=Math.min(t,e.height()),r=Math.min(r,e.width());let i=e.data,n=[];for(let e=0;e<t;e++)n.push(i[e].slice(0,r));return tF.onlyValues(n)})}arrayconstrainArraySize(e,t){if(3!==e.args.length)return iT.error();let r=this.metadata("ARRAY_CONSTRAIN"),{height:i,width:o}=e.args.map(e=>{var i;return this.arraySizeForAst(e,new ir(t.formulaAddress,t.arraysFlag||null!=(i=null==r?void 0:r.enableArrayArithmeticForArguments)&&i))})[0];return(e.args[1].type===n.NUMBER&&(i=Math.min(i,e.args[1].value)),e.args[2].type===n.NUMBER&&(o=Math.min(o,e.args[2].value)),i<1||o<1||!Number.isInteger(i)||!Number.isInteger(o))?iT.error():new iT(o,i)}filter(e,t){return this.runFunction(e.args,t,this.metadata("FILTER"),(e,...t)=>{for(let r of t)if(e.width()!==r.width()||e.height()!==r.height())return new rq(d.NA,eY.EqualLength);if(e.width()>1&&e.height()>1)return new rq(d.NA,eY.WrongDimension);let r=e.data,i=[];for(let n=0;n<e.height();n++){let o=[];for(let i=0;i<e.width();i++){let e=!0;for(let r of t)if(!0!==id(r.data[n][i])){e=!1;break}e&&o.push(r[n][i])}o.length>0&&i.push(o)}return i.length>0?tF.onlyValues(i):new rq(d.NA,eY.EmptyRange)})}filterArraySize(e,t){if(e.args.length<=1)return iT.error();let r=this.metadata("FILTER"),i=e.args.map(e=>{var i;return this.arraySizeForAst(e,new ir(t.formulaAddress,t.arraysFlag||null!=(i=null==r?void 0:r.enableArrayArithmeticForArguments)&&i))});return new iT(Math.max(...i.map(e=>e.width)),Math.max(...i.map(e=>e.height)))}}oC.implementedFunctions={ARRAYFORMULA:{method:"arrayformula",sizeOfResultArrayMethod:"arrayformulaArraySize",enableArrayArithmeticForArguments:!0,parameters:[{argumentType:p.ANY}]},ARRAY_CONSTRAIN:{method:"arrayconstrain",sizeOfResultArrayMethod:"arrayconstrainArraySize",parameters:[{argumentType:p.RANGE},{argumentType:p.INTEGER,minValue:1},{argumentType:p.INTEGER,minValue:1}],vectorizationForbidden:!0},FILTER:{method:"filter",sizeOfResultArrayMethod:"filterArraySize",enableArrayArithmeticForArguments:!0,parameters:[{argumentType:p.RANGE},{argumentType:p.RANGE}],repeatLastArgs:1}};class oS extends iE{abs(e,t){return this.runFunction(e.args,t,this.metadata("ABS"),Math.abs)}}oS.implementedFunctions={ABS:{method:"abs",parameters:[{argumentType:p.NUMBER}]}};class ov extends iE{bitlshift(e,t){return this.runFunction(e.args,t,this.metadata("BITLSHIFT"),oR)}bitrshift(e,t){return this.runFunction(e.args,t,this.metadata("BITRSHIFT"),oE)}}function oR(e,t){return t<0?oE(e,-t):oT(e*Math.pow(2,t))}function oE(e,t){return t<0?oR(e,-t):oT(Math.floor(e/Math.pow(2,t)))}function oT(e){return e>0xffffffffffff?new rq(d.NUM,eY.BitshiftLong):e}ov.implementedFunctions={BITLSHIFT:{method:"bitlshift",parameters:[{argumentType:p.INTEGER,minValue:0},{argumentType:p.INTEGER,minValue:-53,maxValue:53}]},BITRSHIFT:{method:"bitrshift",parameters:[{argumentType:p.INTEGER,minValue:0},{argumentType:p.INTEGER,minValue:-53,maxValue:53}]}};class ox extends iE{bitand(e,t){return this.runFunction(e.args,t,this.metadata("BITAND"),(e,t)=>e&t)}bitor(e,t){return this.runFunction(e.args,t,this.metadata("BITOR"),(e,t)=>e|t)}bitxor(e,t){return this.runFunction(e.args,t,this.metadata("BITXOR"),(e,t)=>e^t)}}ox.implementedFunctions={BITAND:{method:"bitand",parameters:[{argumentType:p.INTEGER,minValue:0},{argumentType:p.INTEGER,minValue:0}]},BITOR:{method:"bitor",parameters:[{argumentType:p.INTEGER,minValue:0},{argumentType:p.INTEGER,minValue:0}]},BITXOR:{method:"bitxor",parameters:[{argumentType:p.INTEGER,minValue:0},{argumentType:p.INTEGER,minValue:0}]}};class oA extends iE{literalTrue(e,t){return this.runFunction(e.args,t,this.metadata("TRUE"),()=>!0)}literalFalse(e,t){return this.runFunction(e.args,t,this.metadata("FALSE"),()=>!1)}conditionalIf(e,t){return this.runFunction(e.args,t,this.metadata("IF"),(e,t,r)=>e?t:r)}ifs(e,t){return this.runFunction(e.args,t,this.metadata("IFS"),(...e)=>{for(let t=0;t<e.length;t+=2)if(e[t])return e[t+1];return new rq(d.NA,eY.NoConditionMet)})}and(e,t){return this.runFunction(e.args,t,this.metadata("AND"),(...e)=>e.filter(e=>void 0!==e).every(e=>!!e))}or(e,t){return this.runFunction(e.args,t,this.metadata("OR"),(...e)=>e.filter(e=>void 0!==e).some(e=>e))}not(e,t){return this.runFunction(e.args,t,this.metadata("NOT"),e=>!e)}xor(e,t){return this.runFunction(e.args,t,this.metadata("XOR"),(...e)=>{let t=0;return e.filter(e=>void 0!==e).forEach(e=>{e&&t++}),t%2==1})}switch(e,t){return this.runFunction(e.args,t,this.metadata("SWITCH"),(e,...t)=>{let r=t.length,i=0;for(;i+1<r;i+=2)if(!(t[i]instanceof rq)&&this.arithmeticHelper.eq(e,t[i]))return t[i+1];return i<r?t[i]:new rq(d.NA,eY.NoDefault)})}iferror(e,t){return this.runFunction(e.args,t,this.metadata("IFERROR"),(e,t)=>e instanceof rq?t:e)}ifna(e,t){return this.runFunction(e.args,t,this.metadata("IFNA"),(e,t)=>e instanceof rq&&e.type===d.NA?t:e)}choose(e,t){return this.runFunction(e.args,t,this.metadata("CHOOSE"),(e,...t)=>e>t.length?new rq(d.NUM,eY.Selector):t[e-1])}}oA.implementedFunctions={TRUE:{method:"literalTrue",parameters:[]},FALSE:{method:"literalFalse",parameters:[]},IF:{method:"conditionalIf",parameters:[{argumentType:p.BOOLEAN},{argumentType:p.SCALAR,passSubtype:!0},{argumentType:p.SCALAR,defaultValue:!1,passSubtype:!0}]},IFS:{method:"ifs",parameters:[{argumentType:p.BOOLEAN},{argumentType:p.SCALAR,passSubtype:!0}],repeatLastArgs:2},AND:{method:"and",parameters:[{argumentType:p.BOOLEAN}],repeatLastArgs:1,expandRanges:!0},OR:{method:"or",parameters:[{argumentType:p.BOOLEAN}],repeatLastArgs:1,expandRanges:!0},XOR:{method:"xor",parameters:[{argumentType:p.BOOLEAN}],repeatLastArgs:1,expandRanges:!0},NOT:{method:"not",parameters:[{argumentType:p.BOOLEAN}]},SWITCH:{method:"switch",parameters:[{argumentType:p.NOERROR},{argumentType:p.SCALAR,passSubtype:!0},{argumentType:p.SCALAR,passSubtype:!0}],repeatLastArgs:1},IFERROR:{method:"iferror",parameters:[{argumentType:p.SCALAR,passSubtype:!0},{argumentType:p.SCALAR,passSubtype:!0}]},IFNA:{method:"ifna",parameters:[{argumentType:p.SCALAR,passSubtype:!0},{argumentType:p.SCALAR,passSubtype:!0}]},CHOOSE:{method:"choose",parameters:[{argumentType:p.INTEGER,minValue:1},{argumentType:p.SCALAR,passSubtype:!0}],repeatLastArgs:1}};class oM extends iE{char(e,t){return this.runFunction(e.args,t,this.metadata("CHAR"),e=>e<1||e>=256?new rq(d.VALUE,eY.CharacterCodeBounds):String.fromCharCode(Math.trunc(e)))}unichar(e,t){return this.runFunction(e.args,t,this.metadata("CHAR"),e=>e<1||e>=1114112?new rq(d.VALUE,eY.CharacterCodeBounds):String.fromCodePoint(Math.trunc(e)))}}oM.implementedFunctions={CHAR:{method:"char",parameters:[{argumentType:p.NUMBER}]},UNICHAR:{method:"unichar",parameters:[{argumentType:p.NUMBER}]}};class oI extends iE{code(e,t){return this.runFunction(e.args,t,this.metadata("CODE"),e=>0===e.length?new rq(d.VALUE,eY.EmptyString):e.charCodeAt(0))}unicode(e,t){return this.runFunction(e.args,t,this.metadata("UNICODE"),e=>{var t;return null!=(t=e.codePointAt(0))?t:new rq(d.VALUE,eY.EmptyString)})}}oI.implementedFunctions={CODE:{method:"code",parameters:[{argumentType:p.STRING}]},UNICODE:{method:"unicode",parameters:[{argumentType:p.STRING}]}};class oN extends iE{countblank(e,t){return this.runFunction(e.args,t,this.metadata("COUNTBLANK"),(...e)=>{let t=0;return e.forEach(e=>{e===tA&&t++}),t})}}oN.implementedFunctions={COUNTBLANK:{method:"countblank",parameters:[{argumentType:p.SCALAR}],repeatLastArgs:1,expandRanges:!0}};class oO extends iE{countunique(e,t){return this.runFunction(e.args,t,this.metadata("COUNTUNIQUE"),(...e)=>{let t=new Set,r=new Set;for(let i of e)i instanceof rq?r.add(i.type):""!==i&&t.add(i);return t.size+r.size})}}oO.implementedFunctions={COUNTUNIQUE:{method:"countunique",parameters:[{argumentType:p.SCALAR}],repeatLastArgs:1,expandRanges:!0}};let ok=[{argumentType:p.RANGE},{argumentType:p.SCALAR},{argumentType:p.RANGE}];class oH extends iE{withDatabaseArgs(e,t,r,i){return this.runFunction(e.args,t,this.metadata(r),(e,t,r)=>{let n=this.resolveFieldIndex(e,t);if(n instanceof rq)return n;let o=this.buildDatabaseCriteria(e,r);return o instanceof rq?o:i(e.data,n,o)})}dcount(e,t){return this.withDatabaseArgs(e,t,"DCOUNT",(e,t,r)=>{let i=0;for(let n=1;n<e.length;n++)if(this.rowMatchesCriteria(e[n],r)){let r=e[n][t];if(r instanceof rq)return r;tD(r)&&i++}return i})}dcounta(e,t){return this.withDatabaseArgs(e,t,"DCOUNTA",(e,t,r)=>{let i=0;for(let n=1;n<e.length;n++)if(this.rowMatchesCriteria(e[n],r)){let r=e[n][t];if(r instanceof rq)return r;r!==tA&&null!=r&&i++}return i})}dproduct(e,t){return this.withDatabaseArgs(e,t,"DPRODUCT",(e,t,r)=>{let i=1,n=!1;for(let o=1;o<e.length;o++)if(this.rowMatchesCriteria(e[o],r)){let r=e[o][t];if(r instanceof rq)return r;tD(r)&&(i*=tM(r),n=!0)}return n?i:0})}dsum(e,t){return this.withDatabaseArgs(e,t,"DSUM",(e,t,r)=>{let i=0;for(let n=1;n<e.length;n++)if(this.rowMatchesCriteria(e[n],r)){let r=e[n][t];if(r instanceof rq)return r;tD(r)&&(i+=tM(r))}return i})}daverage(e,t){return this.withDatabaseArgs(e,t,"DAVERAGE",(e,t,r)=>{let i=0,n=0;for(let o=1;o<e.length;o++)if(this.rowMatchesCriteria(e[o],r)){let r=e[o][t];if(r instanceof rq)return r;tD(r)&&(i+=tM(r),n++)}return 0===n?new rq(d.DIV_BY_ZERO):i/n})}dget(e,t){return this.withDatabaseArgs(e,t,"DGET",(e,t,r)=>{let i,n=0;for(let o=1;o<e.length;o++)if(this.rowMatchesCriteria(e[o],r)){if(++n>1)return new rq(d.NUM,eY.ValueLarge);i=e[o][t]}return 0===n?new rq(d.VALUE,eY.WrongType):i instanceof rq?i:i===tA||null==i?0:i})}dmax(e,t){return this.withDatabaseArgs(e,t,"DMAX",(e,t,r)=>{let i=-1/0,n=!1;for(let o=1;o<e.length;o++)if(this.rowMatchesCriteria(e[o],r)){let r=e[o][t];if(r instanceof rq)return r;if(tD(r)){let e=tM(r);e>i&&(i=e),n=!0}}return n?i:0})}dmin(e,t){return this.withDatabaseArgs(e,t,"DMIN",(e,t,r)=>{let i=1/0,n=!1;for(let o=1;o<e.length;o++)if(this.rowMatchesCriteria(e[o],r)){let r=e[o][t];if(r instanceof rq)return r;if(tD(r)){let e=tM(r);e<i&&(i=e),n=!0}}return n?i:0})}dstdev(e,t){return this.withDatabaseArgs(e,t,"DSTDEV",(e,t,r)=>{let i=this.collectNumericValues(e,t,r);if(i instanceof rq)return i;if(i.length<=1)return new rq(d.DIV_BY_ZERO);let n=i.reduce((e,t)=>e+t,0)/i.length;return Math.sqrt(i.reduce((e,t)=>e+Math.pow(t-n,2),0)/(i.length-1))})}dstdevp(e,t){return this.withDatabaseArgs(e,t,"DSTDEVP",(e,t,r)=>{let i=this.collectNumericValues(e,t,r);if(i instanceof rq)return i;if(0===i.length)return new rq(d.DIV_BY_ZERO);let n=i.reduce((e,t)=>e+t,0)/i.length;return Math.sqrt(i.reduce((e,t)=>e+Math.pow(t-n,2),0)/i.length)})}dvar(e,t){return this.withDatabaseArgs(e,t,"DVAR",(e,t,r)=>{let i=this.collectNumericValues(e,t,r);if(i instanceof rq)return i;if(i.length<=1)return new rq(d.DIV_BY_ZERO);let n=i.reduce((e,t)=>e+t,0)/i.length;return i.reduce((e,t)=>e+Math.pow(t-n,2),0)/(i.length-1)})}dvarp(e,t){return this.withDatabaseArgs(e,t,"DVARP",(e,t,r)=>{let i=this.collectNumericValues(e,t,r);if(i instanceof rq)return i;if(0===i.length)return new rq(d.DIV_BY_ZERO);let n=i.reduce((e,t)=>e+t,0)/i.length;return i.reduce((e,t)=>e+Math.pow(t-n,2),0)/i.length})}collectNumericValues(e,t,r){let i=[];for(let n=1;n<e.length;n++)if(this.rowMatchesCriteria(e[n],r)){let r=e[n][t];if(r instanceof rq)return r;tD(r)&&i.push(tM(r))}return i}resolveFieldIndex(e,t){if(t instanceof rq)return t;let r=e.data[0];if("string"==typeof t){let e=t.toLowerCase();for(let t=0;t<r.length;t++){let i=r[t];if("string"==typeof i&&i.toLowerCase()===e)return t}return new rq(d.VALUE,eY.WrongType)}let i="boolean"==typeof t?Number(t):t;if(tD(i)){let e=Math.trunc(tM(i));return!Number.isFinite(e)||e<1||e>r.length?new rq(d.VALUE,eY.WrongType):e-1}return new rq(d.VALUE,eY.WrongType)}buildDatabaseCriteria(e,t){var r;let i=e.data[0],n=t.data,o=n[0];for(let e of o)if(e instanceof rq)return e;let s=o.map(e=>{if("string"!=typeof e)return -1;let t=e.toLowerCase();return i.findIndex(e=>"string"==typeof e&&e.toLowerCase()===t)}),l=[];for(let e=1;e<n.length;e++){let t=[];for(let i=0;i<o.length;i++){let o=s[i];if(-1===o)continue;let l=null==(r=n[e])?void 0:r[i];if(l===tA||null==l)continue;if(l instanceof rq)return l;let a=tD(l)?tM(l):l,h=this.interpreter.criterionBuilder.fromCellValue(a,this.arithmeticHelper);if(void 0===h)return new rq(d.VALUE,eY.BadCriterion);t.push({columnIndex:o,lambda:h.lambda})}l.push(t)}return l}rowMatchesCriteria(e,t){return 0!==t.length&&t.some(t=>0===t.length||t.every(t=>{let r=e[t.columnIndex],i=tD(r)?tM(r):r;return t.lambda(i)}))}}oH.implementedFunctions={DCOUNT:{method:"dcount",parameters:ok},DCOUNTA:{method:"dcounta",parameters:ok},DPRODUCT:{method:"dproduct",parameters:ok},DSTDEV:{method:"dstdev",parameters:ok},DSTDEVP:{method:"dstdevp",parameters:ok},DSUM:{method:"dsum",parameters:ok},DVAR:{method:"dvar",parameters:ok},DVARP:{method:"dvarp",parameters:ok},DAVERAGE:{method:"daverage",parameters:ok},DGET:{method:"dget",parameters:ok},DMAX:{method:"dmax",parameters:ok},DMIN:{method:"dmin",parameters:ok}};class o_ extends iE{constructor(){super(...arguments),this.isoweeknumCore=e=>{let t=Math.floor(this.dateTimeHelper.relativeNumberToAbsoluteNumber(e)),r=this.dateTimeHelper.numberToSimpleDate(e),i=this.dateTimeHelper.dateToNumber({year:r.year,month:1,day:1}),n=this.dateTimeHelper.relativeNumberToAbsoluteNumber(i),o=Math.floor((t-1)/7)-Math.floor((n+((4-n)%7+7)%7-1)/7)+1;return 0===o?this.isoweeknumCore(e-7)+1:o},this.days360Core=(e,t,r)=>{let i,n,o=this.dateTimeHelper.numberToSimpleDate(e),s=this.dateTimeHelper.numberToSimpleDate(t);return r?(i=iZ(o),n=iZ(s)):[i,n]=this.dateTimeHelper.toBasisUS(o,s),360*(n.year-i.year)+30*(n.month-i.month)+n.day-i.day}}date(e,t){return this.runFunction(e.args,t,this.metadata("DATE"),(e,t,r)=>{let i=Math.trunc(r),n=Math.trunc(t),o=Math.trunc(e);o<this.dateTimeHelper.getEpochYearZero()&&(o+=this.dateTimeHelper.getEpochYearZero());let s=Math.floor((n-1)/12),l={year:o+=s,month:n-=12*s,day:1};if(this.dateTimeHelper.isValidDate(l)){let e=this.dateTimeHelper.dateToNumber(l)+(i-1);return void 0===(e=this.dateTimeHelper.getWithinBounds(e))?new rq(d.NUM,eY.DateBounds):e}return new rq(d.VALUE,eY.InvalidDate)})}time(e,t){return this.runFunction(e.args,t,this.metadata("TIME"),(e,t,r)=>{let i=iQ({hours:Math.trunc(e),minutes:Math.trunc(t),seconds:Math.trunc(r)});return i<0?new rq(d.NUM,eY.NegativeTime):i%1})}eomonth(e,t){return this.runFunction(e.args,t,this.metadata("EOMONTH"),(e,t)=>{let r=this.dateTimeHelper.numberToSimpleDate(e),i=this.dateTimeHelper.dateToNumber(this.dateTimeHelper.endOfMonth(iK(r,t)));return void 0===(i=this.dateTimeHelper.getWithinBounds(i))?new rq(d.NUM,eY.DateBounds):i})}day(e,t){return this.runFunction(e.args,t,this.metadata("DAY"),e=>this.dateTimeHelper.numberToSimpleDate(e).day)}days(e,t){return this.runFunction(e.args,t,this.metadata("DAYS"),(e,t)=>Math.trunc(e)-Math.trunc(t))}month(e,t){return this.runFunction(e.args,t,this.metadata("MONTH"),e=>this.dateTimeHelper.numberToSimpleDate(e).month)}year(e,t){return this.runFunction(e.args,t,this.metadata("YEAR"),e=>this.dateTimeHelper.numberToSimpleDate(e).year)}hour(e,t){return this.runFunction(e.args,t,this.metadata("HOUR"),e=>iX(iq(e)%1).hours)}minute(e,t){return this.runFunction(e.args,t,this.metadata("MINUTE"),e=>iX(iq(e)%1).minutes)}second(e,t){return this.runFunction(e.args,t,this.metadata("SECOND"),e=>iX(iq(e)%1).seconds)}text(e,t){return this.runFunction(e.args,t,this.metadata("TEXT"),(e,t)=>(function(e,t,r,i){let n=r.stringifyDateTime(i.numberToSimpleDateTime(e),t);if(void 0!==n)return n;let o=r.stringifyDuration(iX(e),t);if(void 0!==o)return o;let s=function(e){let t,r=(i0.lastIndex=0,null!==(t=i0.exec(e))?[t]:[]);if(!r.every(e=>i6(e)))return{type:f.NUMBER,tokens:i2(r,e)}}(t);return void 0!==s?function(e,t){let r="";for(let i=0;i<e.length;++i){let n=e[i];if(n.type===m.FREE_TEXT){r+=n.value;continue}let o=n.value.split("."),s=o[0],l=o[1]||"",a=o[1]?".":"",h=Number(t.toFixed(l.length)).toString().split("."),d=h[0]||"",u=h[1]||"";if(s.length>d.length){let e=i4(s.substr(0,s.length-d.length),"0");d=i5(d,e+d.length)}let c=i4(l.substr(u.length,l.length-u.length),"0");r+=d+a+(u=function(e,t){let r=`${e}`;for(;r.length<t;)r+="0";return r}(u,c+u.length))}return r}(s.tokens,e):t})(e,t,this.config,this.dateTimeHelper))}weekday(e,t){return this.runFunction(e.args,t,this.metadata("WEEKDAY"),(e,t)=>{let r=Math.floor(this.dateTimeHelper.relativeNumberToAbsoluteNumber(e));if(3===t)return(r-1)%7;let i=oL.get(t);return void 0===i?new rq(d.NUM,eY.BadMode):(r-i)%7+1})}weeknum(e,t){return this.runFunction(e.args,t,this.metadata("WEEKNUM"),(e,t)=>{let r=Math.floor(this.dateTimeHelper.relativeNumberToAbsoluteNumber(e)),i=this.dateTimeHelper.numberToSimpleDate(e),n=this.dateTimeHelper.dateToNumber({year:i.year,month:1,day:1}),o=this.dateTimeHelper.relativeNumberToAbsoluteNumber(n);if(21===t)return this.isoweeknumCore(e);let s=oL.get(t);return void 0===s?new rq(d.NUM,eY.BadMode):Math.floor((r-s)/7)-Math.floor((o-s)/7)+1})}isoweeknum(e,t){return this.runFunction(e.args,t,this.metadata("ISOWEEKNUM"),this.isoweeknumCore)}datevalue(e,t){return this.runFunction(e.args,t,this.metadata("DATEVALUE"),e=>{let{dateTime:t}=this.dateTimeHelper.parseDateTimeFromConfigFormats(e);return void 0===t?new rq(d.VALUE,eY.IncorrectDateTime):i$(t)?(iG(t)?Math.trunc(iQ(t)):0)+this.dateTimeHelper.dateToNumber(t):0})}timevalue(e,t){return this.runFunction(e.args,t,this.metadata("TIMEVALUE"),e=>{let t=this.dateTimeHelper.dateStringToDateNumber(e);return void 0===t?new rq(d.VALUE,eY.IncorrectDateTime):tM(t)%1})}now(e,t){return this.runFunction(e.args,t,this.metadata("NOW"),()=>{let e=new Date(Date.now());return iQ({hours:e.getHours(),minutes:e.getMinutes(),seconds:e.getSeconds()})+this.dateTimeHelper.dateToNumber({year:e.getFullYear(),month:e.getMonth()+1,day:e.getDate()})})}today(e,t){return this.runFunction(e.args,t,this.metadata("TODAY"),()=>{let e=new Date(Date.now());return this.dateTimeHelper.dateToNumber({year:e.getFullYear(),month:e.getMonth()+1,day:e.getDate()})})}edate(e,t){return this.runFunction(e.args,t,this.metadata("EDATE"),(e,t)=>{var r;let i={year:(r=iK(this.dateTimeHelper.numberToSimpleDate(e),t)).year,month:r.month,day:Math.min(r.day,iU[r.month-1])},n=this.dateTimeHelper.dateToNumber(i);return void 0===(n=this.dateTimeHelper.getWithinBounds(n))?new rq(d.NUM,eY.DateBounds):n})}datedif(e,t){return this.runFunction(e.args,t,this.metadata("DATEDIF"),(e,t,r)=>{if(e>t)return new rq(d.NUM,eY.StartEndDate);if("D"===r)return Math.floor(t)-Math.floor(e);let i=this.dateTimeHelper.numberToSimpleDate(e),n=this.dateTimeHelper.numberToSimpleDate(t);switch(r){case"M":return(n.year-i.year)*12+(n.month-i.month)-(n.day<i.day);case"YM":return(12+(n.month-i.month)-(n.day<i.day))%12;case"Y":if(n.month>i.month||n.month===i.month&&n.day>=i.day)return n.year-i.year;return n.year-i.year-1;case"MD":if(n.day>=i.day)return n.day-i.day;{let e=1===n.month?12:n.month-1,t=1===n.month?n.year-1:n.year;return this.dateTimeHelper.daysInMonth(t,e)+n.day-i.day}case"YD":if(n.month>i.month||n.month===i.month&&n.day>=i.day)return Math.floor(t)-this.dateTimeHelper.dateToNumber({year:n.year,month:i.month,day:i.day});return Math.floor(t)-Math.floor(e)-365*(n.year-i.year-1)-this.dateTimeHelper.leapYearsCount(n.year-1)+this.dateTimeHelper.leapYearsCount(i.year);default:return new rq(d.NUM,eY.BadMode)}})}days360(e,t){return this.runFunction(e.args,t,this.metadata("DAYS360"),this.days360Core)}yearfrac(e,t){return this.runFunction(e.args,t,this.metadata("YEARFRAC"),(e,t,r)=>{switch((e=Math.trunc(e))>(t=Math.trunc(t))&&([e,t]=[t,e]),r){case 0:return this.days360Core(e,t,!1)/360;case 1:return(t-e)/this.dateTimeHelper.yearLengthForBasis(this.dateTimeHelper.numberToSimpleDate(e),this.dateTimeHelper.numberToSimpleDate(t));case 2:return(t-e)/360;case 3:return(t-e)/365;case 4:return this.days360Core(e,t,!0)/360}throw Error("Should not be reachable.")})}interval(e,t){return this.runFunction(e.args,t,this.metadata("INTERVAL"),e=>{let t=(e=Math.trunc(e))%60,r=(e=Math.trunc(e/60))%60,i=(e=Math.trunc(e/60))%24,n=(e=Math.trunc(e/24))%30,o=(e=Math.trunc(e/30))%12,s=Math.trunc(e/12);return"P"+(s>0?`${s}Y`:"")+(o>0?`${o}M`:"")+(n>0?`${n}D`:"")+"T"+(i>0?`${i}H`:"")+(r>0?`${r}M`:"")+(t>0?`${t}S`:"")})}networkdays(e,t){return this.runFunction(e.args,t,this.metadata("NETWORKDAYS"),(e,t,r)=>this.networkdayscore(e,t,1,r))}networkdaysintl(e,t){return this.runFunction(e.args,t,this.metadata("NETWORKDAYS.INTL"),(e,t,r,i)=>this.networkdayscore(e,t,r,i))}workday(e,t){return this.runFunction(e.args,t,this.metadata("WORKDAY"),(e,t,r)=>this.workdaycore(e,t,1,r))}workdayintl(e,t){return this.runFunction(e.args,t,this.metadata("WORKDAY.INTL"),(e,t,r,i)=>this.workdaycore(e,t,r,i))}networkdayscore(e,t,r,i){let n=1;(e=Math.trunc(e))>(t=Math.trunc(t))&&([e,t]=[t,e],n=-1);let o=oD(r);if(o instanceof rq)return o;let s=this.simpleRangeToFilteredHolidays(o,i);return s instanceof rq?s:n*this.countWorkdays(e,t,o,s)}workdaycore(e,t,r,i){e=Math.trunc(e),t=Math.trunc(t);let n=oD(r);if(n instanceof rq)return n;let o=this.simpleRangeToFilteredHolidays(n,i);if(o instanceof rq)return o;if(t>0){let r=1;for(;this.countWorkdays(e+1,e+r,n,o)<t;)r*=2;let i=1;for(;i+1<r;){let s=Math.trunc((i+r)/2);this.countWorkdays(e+1,e+s,n,o)<t?i=s:r=s}return e+r}if(!(t<0))return e;{t*=-1;let r=1;for(;this.countWorkdays(e-r,e-1,n,o)<t;)r*=2;let i=1;for(;i+1<r;){let s=Math.trunc((i+r)/2);this.countWorkdays(e-s,e-1,n,o)<t?i=s:r=s}return e-r}}countWorkdays(e,t,r,i){let n=Math.floor(this.dateTimeHelper.relativeNumberToAbsoluteNumber(t)),o=Math.floor(this.dateTimeHelper.relativeNumberToAbsoluteNumber(e)),s=0;for(let e=0;e<7;e++)"0"===r.charAt(e)&&(s+=Math.floor((n+6-e)/7),s-=Math.floor((o-1+6-e)/7));return s-(oP(t+1,i)-oP(e,i))}simpleRangeToFilteredHolidays(e,t){var r;let i=null!=(r=null==t?void 0:t.valuesFromTopLeftCorner())?r:[];for(let e of i)if(e instanceof rq)return e;let n=[];for(let e of i)if(e!==tA)if(!tD(e))return new rq(d.VALUE,eY.WrongType);else n.push(Math.trunc(tM(e)));return[...new Set(n)].sort((e,t)=>e-t).filter(t=>{let r=this.dateTimeHelper.relativeNumberToAbsoluteNumber(t);return"0"===e.charAt((r-1)%7)})}}function oP(e,t){if(0===t.length||e<=t[0])return 0;if(t[t.length-1]<e)return t.length;let r=0,i=t.length-1;for(;r+1<i;){let n=Math.floor((i+r)/2);t[n]>=e?i=n:r=n}return i}function oD(e){var t;return"number"!=typeof e&&"string"!=typeof e?new rq(d.VALUE,eY.WrongType):"string"!=typeof e?null!=(t=oF.get(e))?t:new rq(d.NUM,eY.BadMode):7===e.length&&/^(0|1)*$/.test(e)&&"1111111"!==e?e:new rq(d.NUM,eY.WeekendString)}o_.implementedFunctions={DATE:{method:"date",parameters:[{argumentType:p.NUMBER},{argumentType:p.NUMBER},{argumentType:p.NUMBER}],returnNumberType:s.NUMBER_DATE},TIME:{method:"time",parameters:[{argumentType:p.NUMBER},{argumentType:p.NUMBER},{argumentType:p.NUMBER}],returnNumberType:s.NUMBER_TIME},MONTH:{method:"month",parameters:[{argumentType:p.NUMBER,minValue:0}]},YEAR:{method:"year",parameters:[{argumentType:p.NUMBER,minValue:0}]},HOUR:{method:"hour",parameters:[{argumentType:p.NUMBER,minValue:0}]},MINUTE:{method:"minute",parameters:[{argumentType:p.NUMBER,minValue:0}]},SECOND:{method:"second",parameters:[{argumentType:p.NUMBER,minValue:0}]},TEXT:{method:"text",parameters:[{argumentType:p.NUMBER},{argumentType:p.STRING}]},EOMONTH:{method:"eomonth",parameters:[{argumentType:p.NUMBER,minValue:0},{argumentType:p.NUMBER}],returnNumberType:s.NUMBER_DATE},DAY:{method:"day",parameters:[{argumentType:p.NUMBER,minValue:0}]},DAYS:{method:"days",parameters:[{argumentType:p.NUMBER,minValue:0},{argumentType:p.NUMBER,minValue:0}]},WEEKDAY:{method:"weekday",parameters:[{argumentType:p.NUMBER,minValue:0},{argumentType:p.NUMBER,defaultValue:1}]},WEEKNUM:{method:"weeknum",parameters:[{argumentType:p.NUMBER,minValue:0},{argumentType:p.NUMBER,defaultValue:1}]},ISOWEEKNUM:{method:"isoweeknum",parameters:[{argumentType:p.NUMBER,minValue:0}]},DATEVALUE:{method:"datevalue",parameters:[{argumentType:p.STRING}],returnNumberType:s.NUMBER_DATE},TIMEVALUE:{method:"timevalue",parameters:[{argumentType:p.STRING}],returnNumberType:s.NUMBER_TIME},NOW:{method:"now",parameters:[],isVolatile:!0,returnNumberType:s.NUMBER_DATETIME},TODAY:{method:"today",parameters:[],isVolatile:!0,returnNumberType:s.NUMBER_DATE},EDATE:{method:"edate",parameters:[{argumentType:p.NUMBER,minValue:0},{argumentType:p.NUMBER}],returnNumberType:s.NUMBER_DATE},DAYS360:{method:"days360",parameters:[{argumentType:p.NUMBER,minValue:0},{argumentType:p.NUMBER,minValue:0},{argumentType:p.BOOLEAN,defaultValue:!1}]},DATEDIF:{method:"datedif",parameters:[{argumentType:p.NUMBER,minValue:0},{argumentType:p.NUMBER,minValue:0},{argumentType:p.STRING}]},YEARFRAC:{method:"yearfrac",parameters:[{argumentType:p.NUMBER,minValue:0},{argumentType:p.NUMBER,minValue:0},{argumentType:p.INTEGER,defaultValue:0,minValue:0,maxValue:4}]},INTERVAL:{method:"interval",parameters:[{argumentType:p.NUMBER,minValue:0}]},NETWORKDAYS:{method:"networkdays",parameters:[{argumentType:p.NUMBER,minValue:0},{argumentType:p.NUMBER,minValue:0},{argumentType:p.RANGE,optionalArg:!0}]},"NETWORKDAYS.INTL":{method:"networkdaysintl",parameters:[{argumentType:p.NUMBER,minValue:0},{argumentType:p.NUMBER,minValue:0},{argumentType:p.NOERROR,defaultValue:1},{argumentType:p.RANGE,optionalArg:!0}]},WORKDAY:{method:"workday",parameters:[{argumentType:p.NUMBER,minValue:0},{argumentType:p.NUMBER},{argumentType:p.RANGE,optionalArg:!0}]},"WORKDAY.INTL":{method:"workdayintl",parameters:[{argumentType:p.NUMBER,minValue:0},{argumentType:p.NUMBER},{argumentType:p.NOERROR,defaultValue:1},{argumentType:p.RANGE,optionalArg:!0}]}};let oL=new Map([[1,0],[2,1],[11,1],[12,2],[13,3],[14,4],[15,5],[16,6],[17,0]]),oF=new Map([[1,"0000011"],[2,"1000001"],[3,"1100000"],[4,"0110000"],[5,"0011000"],[6,"0001100"],[7,"0000110"],[11,"0000001"],[12,"1000000"],[13,"0100000"],[14,"0010000"],[15,"0001000"],[16,"0000100"],[17,"0000010"]]);class oB extends iE{degrees(e,t){return this.runFunction(e.args,t,this.metadata("DEGREES"),e=>180/Math.PI*e)}}oB.implementedFunctions={DEGREES:{method:"degrees",parameters:[{argumentType:p.NUMBER}]}};class oV extends iE{delta(e,t){return this.runFunction(e.args,t,this.metadata("DELTA"),(e,t)=>+(e===t))}}oV.implementedFunctions={DELTA:{method:"delta",parameters:[{argumentType:p.NUMBER},{argumentType:p.NUMBER,defaultValue:0}]}};class oz extends iE{exp(e,t){return this.runFunction(e.args,t,this.metadata("EXP"),Math.exp)}}oz.implementedFunctions={EXP:{method:"exp",parameters:[{argumentType:p.NUMBER}]}};class oU extends iE{pmt(e,t){return this.runFunction(e.args,t,this.metadata("PMT"),oW)}ipmt(e,t){return this.runFunction(e.args,t,this.metadata("IPMT"),o$)}ppmt(e,t){return this.runFunction(e.args,t,this.metadata("PPMT"),oj)}fv(e,t){return this.runFunction(e.args,t,this.metadata("FV"),oG)}cumipmt(e,t){return this.runFunction(e.args,t,this.metadata("CUMIPMT"),(e,t,r,i,n,o)=>{if(i>n)return new rq(d.NUM,eY.EndStartPeriod);let s=0;for(let l=i;l<=n;l++)s+=o$(e,l,t,r,0,o);return s})}cumprinc(e,t){return this.runFunction(e.args,t,this.metadata("CUMPRINC"),(e,t,r,i,n,o)=>{if(i>n)return new rq(d.NUM,eY.EndStartPeriod);let s=0;for(let l=i;l<=n;l++)s+=oj(e,l,t,r,0,o);return s})}db(e,t){return this.runFunction(e.args,t,this.metadata("DB"),(e,t,r,i,n)=>{if(12===n&&i>r||i>r+1)return new rq(d.NUM,eY.PeriodLong);if(t>=e)return 0;let o=Math.round((1-Math.pow(t/e,1/r))*1e3)/1e3,s=e*o*n/12;if(1===i)return s;let l=s;for(let t=0;t<i-2;t++)l+=(e-l)*o;return i===r+1?(e-l)*o*(12-n)/12:(e-l)*o})}ddb(e,t){return this.runFunction(e.args,t,this.metadata("DDB"),(e,t,r,i,n)=>{let o;if(i>r)return new rq(d.NUM);let s=n/r;return s>=1?(s=1,o=1===i?e:0):o=e*Math.pow(1-s,i-1),Math.max(o-Math.max(t,e*Math.pow(1-s,i)),0)})}dollarde(e,t){return this.runFunction(e.args,t,this.metadata("DOLLARDE"),(e,t)=>{if(t<1)return new rq(d.DIV_BY_ZERO);for(t=Math.trunc(t);t>10;)t/=10;return Math.trunc(e)+(e-Math.trunc(e))*10/t})}dollarfr(e,t){return this.runFunction(e.args,t,this.metadata("DOLLARFR"),(e,t)=>{if(t<1)return new rq(d.DIV_BY_ZERO);for(t=Math.trunc(t);t>10;)t/=10;return Math.trunc(e)+(e-Math.trunc(e))*t/10})}effect(e,t){return this.runFunction(e.args,t,this.metadata("EFFECT"),(e,t)=>Math.pow(1+e/(t=Math.trunc(t)),t)-1)}ispmt(e,t){return this.runFunction(e.args,t,this.metadata("ISPMT"),(e,t,r,i)=>0===r?new rq(d.DIV_BY_ZERO):i*e*(t/r-1))}nominal(e,t){return this.runFunction(e.args,t,this.metadata("NOMINAL"),(e,t)=>(Math.pow(e+1,1/(t=Math.trunc(t)))-1)*t)}nper(e,t){return this.runFunction(e.args,t,this.metadata("NPER"),(e,t,r,i,n)=>0===e?0===t?new rq(d.DIV_BY_ZERO):(-r-i)/t:(n&&(t*=1+e),Math.log((t-i*e)/(r*e+t))/Math.log(1+e)))}rate(e,t){return this.runFunction(e.args,t,this.metadata("RATE"),(e,t,r,i,n,o)=>{if(o<=-1)return new rq(d.VALUE);let s=o;n=+!!n;for(let o=0;o<50;o++){let o,l;if(s<=-1)break;if(1e-7>Math.abs(s))o=r*(1+e*s)+t*(1+s*n)*e+i;else{let l=Math.pow(1+s,e);o=r*l+t*(1/s+n)*(l-1)+i}if(1e-7>Math.abs(o))return s;if(1e-7>Math.abs(s))l=r*e+t*n*e;else{let i=Math.pow(1+s,e),o=e*Math.pow(1+s,e-1);l=r*o+t*(1/s+n)*o+-1/(s*s)*t*(i-1)}s-=o/l}return new rq(d.NUM)})}pv(e,t){return this.runFunction(e.args,t,this.metadata("PV"),(e,t,r,i,n)=>{if(n=+!!n,-1===e)if(0===t)return new rq(d.NUM);else return new rq(d.DIV_BY_ZERO);return 0===e?-r*t-i:((1-Math.pow(1+e,t))*r*(1+e*n)/e-i)/Math.pow(1+e,t)})}rri(e,t){return this.runFunction(e.args,t,this.metadata("RRI"),(e,t,r)=>0===t||r<0&&t>0||r>0&&t<0?new rq(d.NUM):Math.pow(r/t,1/e)-1)}sln(e,t){return this.runFunction(e.args,t,this.metadata("SLN"),(e,t,r)=>0===r?new rq(d.DIV_BY_ZERO):(e-t)/r)}syd(e,t){return this.runFunction(e.args,t,this.metadata("SYD"),(e,t,r,i)=>i>r?new rq(d.NUM):(e-t)*(r-i+1)*2/(r*(r+1)))}tbilleq(e,t){return this.runFunction(e.args,t,this.metadata("TBILLEQ"),(e,t,r)=>{if((e=Math.round(e))>=(t=Math.round(t)))return new rq(d.NUM);let i=this.dateTimeHelper.numberToSimpleDate(e),n=this.dateTimeHelper.numberToSimpleDate(t);if(n.year>i.year+1||n.year===i.year+1&&(n.month>i.month||n.month===i.month&&n.day>i.day))return new rq(d.NUM);let o=360-r*(t-e);return 0===o?0:o<0?new rq(d.NUM):365*r/o})}tbillprice(e,t){return this.runFunction(e.args,t,this.metadata("TBILLPRICE"),(e,t,r)=>{if((e=Math.round(e))>=(t=Math.round(t)))return new rq(d.NUM);let i=this.dateTimeHelper.numberToSimpleDate(e),n=this.dateTimeHelper.numberToSimpleDate(t);if(n.year>i.year+1||n.year===i.year+1&&(n.month>i.month||n.month===i.month&&n.day>i.day))return new rq(d.NUM);let o=360-r*(t-e);return 0===o?0:o<0?new rq(d.NUM):100*(1-r*(t-e)/360)})}tbillyield(e,t){return this.runFunction(e.args,t,this.metadata("TBILLYIELD"),(e,t,r)=>{if((e=Math.round(e))>=(t=Math.round(t)))return new rq(d.NUM);let i=this.dateTimeHelper.numberToSimpleDate(e),n=this.dateTimeHelper.numberToSimpleDate(t);return n.year>i.year+1||n.year===i.year+1&&(n.month>i.month||n.month===i.month&&n.day>i.day)?new rq(d.NUM):(100-r)*360/(r*(t-e))})}fvschedule(e,t){return this.runFunction(e.args,t,this.metadata("FVSCHEDULE"),(e,t)=>{let r=t.valuesFromTopLeftCorner();for(let e of r)if(e instanceof rq)return e;for(let t of r)if(tD(t))e*=1+tM(t);else if(t!==tA)return new rq(d.VALUE,eY.NumberExpected);return e})}npv(e,t){return this.runFunction(e.args,t,this.metadata("NPV"),(e,...t)=>{let r=this.arithmeticHelper.coerceNumbersExactRanges(t);return r instanceof rq?r:oY(e,r)})}mirr(e,t){return this.runFunction(e.args,t,this.metadata("MIRR"),(e,t,r)=>{let i=this.arithmeticHelper.manyToExactNumbers(e.valuesFromTopLeftCorner());if(i instanceof rq)return i;let n=!1,o=!1,s=[],l=[];for(let e of i)e>0?(n=!0,s.push(e),l.push(0)):(e<0?(o=!0,l.push(e)):l.push(0),s.push(0));if(!n||!o)return new rq(d.DIV_BY_ZERO);let a=i.length,h=oY(r,s);if(h instanceof rq)return h;let u=oY(t,l);return u instanceof rq?u:Math.pow(-h*Math.pow(1+r,a)/u/(1+t),1/(a-1))-1})}pduration(e,t){return this.runFunction(e.args,t,this.metadata("PDURATION"),(e,t,r)=>(Math.log(r)-Math.log(t))/Math.log(1+e))}xnpv(e,t){return this.runFunction(e.args,t,this.metadata("XNPV"),(e,t,r)=>{let i=t.valuesFromTopLeftCorner();for(let e of i)if("number"!=typeof e)return new rq(d.VALUE,eY.NumberExpected);let n=r.valuesFromTopLeftCorner();for(let e of n)if("number"!=typeof e)return new rq(d.VALUE,eY.NumberExpected);if(n.length!==i.length)return new rq(d.NUM,eY.EqualLength);let o=n.length,s=0;if(n[0]<0)return new rq(d.NUM,eY.ValueSmall);for(let t=0;t<o;t++){if(n[t]=Math.floor(n[t]),n[t]<n[0])return new rq(d.NUM,eY.ValueSmall);s+=i[t]/Math.pow(1+e,(n[t]-n[0])/365)}return s})}irr(e,t){return this.runFunction(e.args,t,this.metadata("IRR"),(e,t)=>{if(t<=-1)return new rq(d.VALUE);let r=this.arithmeticHelper.manyToExactNumbers(e.valuesFromTopLeftCorner());if(r instanceof rq)return r;let i=r.some(e=>e>0),n=r.some(e=>e<0);return i&&n?function(e,t){let r=t;for(let t=0;t<50;t++){let t=0,i=0;for(let n=0;n<e.length;n++){let o=Math.pow(1+r,n);if(!isFinite(o)||0===o)return new rq(d.NUM);t+=e[n]/o,n>0&&(i-=n*e[n]/(o*(1+r)))}if(1e-10>Math.abs(t))return r;if(1e-10>Math.abs(i))break;let n=r-t/i;if(!isFinite(n))break;if(n<=-1&&(n=(r-1)/2),1e-10>Math.abs(n-r))return n;r=n}return new rq(d.NUM)}(r,t):new rq(d.NUM)})}}function oW(e,t,r,i,n){if(0===e)return(-r-i)/t;{let o=Math.pow(1+e,t);return(i*e+r*e*o)*(n?1/(1+e):1)/(1-o)}}function o$(e,t,r,i,n,o){let s=oW(e,r,i,n,o);return 1===t?e*(o?0:-i):e*(o?oG(e,t-2,s,i,o)-s:oG(e,t-1,s,i,o))}function oG(e,t,r,i,n){if(0===e)return-i-r*t;{let o=Math.pow(1+e,t);return r*(n?1+e:1)*(1-o)/e-i*o}}function oj(e,t,r,i,n,o){return oW(e,r,i,n,o)-o$(e,t,r,i,n,o)}function oY(e,t){let r=0;for(let i=t.length-1;i>=0;i--){if(r+=t[i],-1===e)if(0===r)continue;else return new rq(d.DIV_BY_ZERO);r/=1+e}return r}oU.implementedFunctions={PMT:{method:"pmt",parameters:[{argumentType:p.NUMBER},{argumentType:p.NUMBER},{argumentType:p.NUMBER},{argumentType:p.NUMBER,defaultValue:0},{argumentType:p.NUMBER,defaultValue:0}],returnNumberType:s.NUMBER_CURRENCY},IPMT:{method:"ipmt",parameters:[{argumentType:p.NUMBER},{argumentType:p.NUMBER},{argumentType:p.NUMBER},{argumentType:p.NUMBER},{argumentType:p.NUMBER,defaultValue:0},{argumentType:p.NUMBER,defaultValue:0}],returnNumberType:s.NUMBER_CURRENCY},PPMT:{method:"ppmt",parameters:[{argumentType:p.NUMBER},{argumentType:p.NUMBER},{argumentType:p.NUMBER},{argumentType:p.NUMBER},{argumentType:p.NUMBER,defaultValue:0},{argumentType:p.NUMBER,defaultValue:0}],returnNumberType:s.NUMBER_CURRENCY},FV:{method:"fv",parameters:[{argumentType:p.NUMBER},{argumentType:p.NUMBER},{argumentType:p.NUMBER},{argumentType:p.NUMBER,defaultValue:0},{argumentType:p.NUMBER,defaultValue:0}],returnNumberType:s.NUMBER_CURRENCY},CUMIPMT:{method:"cumipmt",parameters:[{argumentType:p.NUMBER,greaterThan:0},{argumentType:p.NUMBER,greaterThan:0},{argumentType:p.NUMBER,greaterThan:0},{argumentType:p.INTEGER,minValue:1},{argumentType:p.INTEGER,minValue:1},{argumentType:p.INTEGER,minValue:0,maxValue:1}],returnNumberType:s.NUMBER_CURRENCY},CUMPRINC:{method:"cumprinc",parameters:[{argumentType:p.NUMBER,greaterThan:0},{argumentType:p.NUMBER,greaterThan:0},{argumentType:p.NUMBER,greaterThan:0},{argumentType:p.INTEGER,minValue:1},{argumentType:p.INTEGER,minValue:1},{argumentType:p.INTEGER,minValue:0,maxValue:1}],returnNumberType:s.NUMBER_CURRENCY},DB:{method:"db",parameters:[{argumentType:p.NUMBER,minValue:0},{argumentType:p.NUMBER,minValue:0},{argumentType:p.INTEGER,minValue:0},{argumentType:p.INTEGER,minValue:0},{argumentType:p.INTEGER,minValue:1,maxValue:12,defaultValue:12}],returnNumberType:s.NUMBER_CURRENCY},DDB:{method:"ddb",parameters:[{argumentType:p.NUMBER,minValue:0},{argumentType:p.NUMBER,minValue:0},{argumentType:p.INTEGER,minValue:0},{argumentType:p.NUMBER,minValue:0},{argumentType:p.NUMBER,greaterThan:0,defaultValue:2}],returnNumberType:s.NUMBER_CURRENCY},DOLLARDE:{method:"dollarde",parameters:[{argumentType:p.NUMBER},{argumentType:p.NUMBER,minValue:0}]},DOLLARFR:{method:"dollarfr",parameters:[{argumentType:p.NUMBER},{argumentType:p.NUMBER,minValue:0}]},EFFECT:{method:"effect",parameters:[{argumentType:p.NUMBER,minValue:0},{argumentType:p.NUMBER,minValue:1}],returnNumberType:s.NUMBER_PERCENT},ISPMT:{method:"ispmt",parameters:[{argumentType:p.NUMBER},{argumentType:p.NUMBER},{argumentType:p.NUMBER},{argumentType:p.NUMBER}]},NOMINAL:{method:"nominal",parameters:[{argumentType:p.NUMBER,minValue:0},{argumentType:p.NUMBER,minValue:1}],returnNumberType:s.NUMBER_PERCENT},NPER:{method:"nper",parameters:[{argumentType:p.NUMBER},{argumentType:p.NUMBER},{argumentType:p.NUMBER},{argumentType:p.NUMBER,defaultValue:0},{argumentType:p.NUMBER,defaultValue:0}]},PV:{method:"pv",parameters:[{argumentType:p.NUMBER},{argumentType:p.NUMBER},{argumentType:p.NUMBER},{argumentType:p.NUMBER,defaultValue:0},{argumentType:p.NUMBER,defaultValue:0}],returnNumberType:s.NUMBER_CURRENCY},RATE:{method:"rate",parameters:[{argumentType:p.NUMBER,greaterThan:0},{argumentType:p.NUMBER},{argumentType:p.NUMBER},{argumentType:p.NUMBER,defaultValue:0},{argumentType:p.NUMBER,defaultValue:0},{argumentType:p.NUMBER,defaultValue:.1}],returnNumberType:s.NUMBER_PERCENT},RRI:{method:"rri",parameters:[{argumentType:p.NUMBER,greaterThan:0},{argumentType:p.NUMBER},{argumentType:p.NUMBER}],returnNumberType:s.NUMBER_PERCENT},SLN:{method:"sln",parameters:[{argumentType:p.NUMBER},{argumentType:p.NUMBER},{argumentType:p.NUMBER}],returnNumberType:s.NUMBER_CURRENCY},SYD:{method:"syd",parameters:[{argumentType:p.NUMBER},{argumentType:p.NUMBER},{argumentType:p.NUMBER,greaterThan:0},{argumentType:p.NUMBER,greaterThan:0}],returnNumberType:s.NUMBER_CURRENCY},TBILLEQ:{method:"tbilleq",parameters:[{argumentType:p.NUMBER,minValue:0},{argumentType:p.NUMBER,minValue:0},{argumentType:p.NUMBER,greaterThan:0}],returnNumberType:s.NUMBER_PERCENT},TBILLPRICE:{method:"tbillprice",parameters:[{argumentType:p.NUMBER,minValue:0},{argumentType:p.NUMBER,minValue:0},{argumentType:p.NUMBER,greaterThan:0}],returnNumberType:s.NUMBER_CURRENCY},TBILLYIELD:{method:"tbillyield",parameters:[{argumentType:p.NUMBER,minValue:0},{argumentType:p.NUMBER,minValue:0},{argumentType:p.NUMBER,greaterThan:0}],returnNumberType:s.NUMBER_PERCENT},FVSCHEDULE:{method:"fvschedule",parameters:[{argumentType:p.NUMBER},{argumentType:p.RANGE}],returnNumberType:s.NUMBER_CURRENCY},NPV:{method:"npv",parameters:[{argumentType:p.NUMBER},{argumentType:p.ANY}],repeatLastArgs:1,returnNumberType:s.NUMBER_CURRENCY},MIRR:{method:"mirr",parameters:[{argumentType:p.RANGE},{argumentType:p.NUMBER},{argumentType:p.NUMBER}],returnNumberType:s.NUMBER_PERCENT},PDURATION:{method:"pduration",parameters:[{argumentType:p.NUMBER,greaterThan:0},{argumentType:p.NUMBER,greaterThan:0},{argumentType:p.NUMBER,greaterThan:0}]},XNPV:{method:"xnpv",parameters:[{argumentType:p.NUMBER,greaterThan:-1},{argumentType:p.RANGE},{argumentType:p.RANGE}]},IRR:{method:"irr",parameters:[{argumentType:p.RANGE},{argumentType:p.NUMBER,defaultValue:.1}],returnNumberType:s.NUMBER_PERCENT}};class oK extends iE{formulatext(e,t){return this.runFunctionWithReferenceArgument(e.args,t,this.metadata("FORMULATEXT"),()=>new rq(d.NA,eY.WrongArgNumber),e=>{var t;return null!=(t=this.serialization.getCellFormula(e))?t:new rq(d.NA,eY.Formula)})}}oK.implementedFunctions={FORMULATEXT:{method:"formulatext",parameters:[{argumentType:p.NOERROR}],doesNotNeedArgumentsToBeComputed:!0,isDependentOnSheetStructureChange:!0,vectorizationForbidden:!0}};class oq extends iE{hyperlink(e,t){return this.runFunction(e.args,t,this.metadata("HYPERLINK"),(t,r)=>(e.hyperlink=t,null!=r?r:t))}}oq.implementedFunctions={HYPERLINK:{method:"hyperlink",parameters:[{argumentType:p.STRING},{argumentType:p.STRING,optionalArg:!0}]}};class oX extends iE{isbinary(e,t){return this.runFunction(e.args,t,this.metadata("ISBINARY"),e=>/^[01]{1,10}$/.test(e))}iserr(e,t){return this.runFunction(e.args,t,this.metadata("ISERR"),e=>e instanceof rq&&e.type!==d.NA)}iserror(e,t){return this.runFunction(e.args,t,this.metadata("ISERROR"),e=>e instanceof rq)}isformula(e,t){return this.runFunctionWithReferenceArgument(e.args,t,this.metadata("ISFORMULA"),()=>new rq(d.NA,eY.WrongArgNumber),e=>this.dependencyGraph.addressMapping.getCell(e)instanceof rE)}isblank(e,t){return this.runFunction(e.args,t,this.metadata("ISBLANK"),e=>e===tA)}isna(e,t){return this.runFunction(e.args,t,this.metadata("ISNA"),e=>e instanceof rq&&e.type==d.NA)}isnumber(e,t){return this.runFunction(e.args,t,this.metadata("ISNUMBER"),tD)}islogical(e,t){return this.runFunction(e.args,t,this.metadata("ISLOGICAL"),e=>"boolean"==typeof e)}isref(e,t){return this.runFunction(e.args,t,this.metadata("ISREF"),e=>e instanceof rq&&(e.type==d.REF||e.type==d.CYCLE))}istext(e,t){return this.runFunction(e.args,t,this.metadata("ISTEXT"),e=>"string"==typeof e)}isnontext(e,t){return this.runFunction(e.args,t,this.metadata("ISNONTEXT"),e=>"string"!=typeof e)}column(e,t){return this.runFunctionWithReferenceArgument(e.args,t,this.metadata("COLUMN"),()=>t.formulaAddress.col+1,e=>e.col+1)}columns(e,t){if(1!==e.args.length)return new rq(d.NA,eY.WrongArgNumber);if(e.args.some(e=>e.type===n.EMPTY))return new rq(d.NUM,eY.EmptyArg);let r=e.args[0];for(;r.type===n.PARENTHESIS;)r=r.expression;if(r.type===n.CELL_RANGE||r.type===n.COLUMN_RANGE)return r.end.col-r.start.col+1;{if(r.type===n.CELL_REFERENCE)return 1;if(r.type===n.ROW_RANGE)return this.config.maxColumns;let e=this.evaluateAst(r,t);return e instanceof tF?e.width():e instanceof rq?e:1}}row(e,t){return this.runFunctionWithReferenceArgument(e.args,t,this.metadata("ROW"),()=>t.formulaAddress.row+1,e=>e.row+1)}rows(e,t){if(1!==e.args.length)return new rq(d.NA,eY.WrongArgNumber);if(e.args.some(e=>e.type===n.EMPTY))return new rq(d.NUM,eY.EmptyArg);let r=e.args[0];for(;r.type===n.PARENTHESIS;)r=r.expression;if(r.type===n.CELL_RANGE||r.type===n.ROW_RANGE)return r.end.row-r.start.row+1;{if(r.type===n.CELL_REFERENCE)return 1;if(r.type===n.COLUMN_RANGE)return this.config.maxRows;let e=this.evaluateAst(r,t);return e instanceof tF?e.height():e instanceof rq?e:1}}index(e,t){return this.runFunction(e.args,t,this.metadata("INDEX"),(e,t,r)=>{var i,n,o,s,l,a;return r<1||t<1?new rq(d.VALUE,eY.LessThanOne):r>e.width()||t>e.height()?new rq(d.NUM,eY.ValueLarge):null!=(a=null!=(o=null==(n=null==(i=null==e?void 0:e.data)?void 0:i[t-1])?void 0:n[r-1])?o:null==(l=null==(s=null==e?void 0:e.data)?void 0:s[0])?void 0:l[0])?a:new rq(d.VALUE,eY.CellRangeExpected)})}na(e,t){return new rq(d.NA)}sheet(e,t){return this.runFunctionWithReferenceArgument(e.args,t,this.metadata("SHEET"),()=>t.formulaAddress.sheet+1,e=>e.sheet+1,e=>{let t=this.dependencyGraph.sheetMapping.getSheetId(e);return void 0!==t?t+1:new rq(d.NA,eY.SheetRef)})}sheets(e,t){return this.runFunctionWithReferenceArgument(e.args,t,this.metadata("SHEETS"),()=>this.dependencyGraph.sheetMapping.numberOfSheets(),()=>1,()=>new rq(d.VALUE,eY.CellRefExpected))}}oX.implementedFunctions={COLUMN:{method:"column",parameters:[{argumentType:p.NOERROR,optionalArg:!0}],isDependentOnSheetStructureChange:!0,doesNotNeedArgumentsToBeComputed:!0,vectorizationForbidden:!0},COLUMNS:{method:"columns",parameters:[{argumentType:p.RANGE}],isDependentOnSheetStructureChange:!0,doesNotNeedArgumentsToBeComputed:!0,vectorizationForbidden:!0},ISBINARY:{method:"isbinary",parameters:[{argumentType:p.STRING}]},ISERR:{method:"iserr",parameters:[{argumentType:p.SCALAR}]},ISFORMULA:{method:"isformula",parameters:[{argumentType:p.NOERROR}],doesNotNeedArgumentsToBeComputed:!0,vectorizationForbidden:!0},ISNA:{method:"isna",parameters:[{argumentType:p.SCALAR}]},ISREF:{method:"isref",parameters:[{argumentType:p.SCALAR}],vectorizationForbidden:!0},ISERROR:{method:"iserror",parameters:[{argumentType:p.SCALAR}]},ISBLANK:{method:"isblank",parameters:[{argumentType:p.SCALAR}]},ISNUMBER:{method:"isnumber",parameters:[{argumentType:p.SCALAR}]},ISLOGICAL:{method:"islogical",parameters:[{argumentType:p.SCALAR}]},ISTEXT:{method:"istext",parameters:[{argumentType:p.SCALAR}]},ISNONTEXT:{method:"isnontext",parameters:[{argumentType:p.SCALAR}]},INDEX:{method:"index",parameters:[{argumentType:p.RANGE},{argumentType:p.NUMBER},{argumentType:p.NUMBER,defaultValue:1}]},NA:{method:"na",parameters:[]},ROW:{method:"row",parameters:[{argumentType:p.NOERROR,optionalArg:!0}],isDependentOnSheetStructureChange:!0,doesNotNeedArgumentsToBeComputed:!0,vectorizationForbidden:!0},ROWS:{method:"rows",parameters:[{argumentType:p.RANGE}],isDependentOnSheetStructureChange:!0,doesNotNeedArgumentsToBeComputed:!0,vectorizationForbidden:!0},SHEET:{method:"sheet",parameters:[{argumentType:p.STRING}],doesNotNeedArgumentsToBeComputed:!0,vectorizationForbidden:!0},SHEETS:{method:"sheets",parameters:[{argumentType:p.STRING}],doesNotNeedArgumentsToBeComputed:!0,vectorizationForbidden:!0}};class oQ extends iE{iseven(e,t){return this.runFunction(e.args,t,this.metadata("ISEVEN"),e=>e%2==0)}}oQ.implementedFunctions={ISEVEN:{method:"iseven",parameters:[{argumentType:p.NUMBER}]}};class oZ extends iE{isodd(e,t){return this.runFunction(e.args,t,this.metadata("ISODD"),e=>e%2==1)}}oZ.implementedFunctions={ISODD:{method:"isodd",parameters:[{argumentType:p.NUMBER}]}};class oJ extends iE{log10(e,t){return this.runFunction(e.args,t,this.metadata("LOG10"),Math.log10)}log(e,t){return this.runFunction(e.args,t,this.metadata("LOG"),(e,t)=>Math.log(e)/Math.log(t))}ln(e,t){return this.runFunction(e.args,t,this.metadata("LN"),Math.log)}}oJ.implementedFunctions={LOG10:{method:"log10",parameters:[{argumentType:p.NUMBER}]},LOG:{method:"log",parameters:[{argumentType:p.NUMBER,greaterThan:0},{argumentType:p.NUMBER,defaultValue:10,greaterThan:0}]},LN:{method:"ln",parameters:[{argumentType:p.NUMBER}]}};let o0=parseFloat(Math.PI.toFixed(14));class o1 extends iE{pi(e,t){return this.runFunction(e.args,t,this.metadata("PI"),()=>o0)}sqrtpi(e,t){return this.runFunction(e.args,t,this.metadata("SQRTPI"),e=>Math.sqrt(o0*e))}}function o2(e,t){return new iT(t.width,e.height)}function o3(e,t,r){return new iT(1+(e.width-t)/r,1+(e.height-t)/r)}o1.implementedFunctions={PI:{method:"pi",parameters:[]},SQRTPI:{method:"sqrtpi",parameters:[{argumentType:p.NUMBER,minValue:0}]}};class o6 extends iE{mmult(e,t){return this.runFunction(e.args,t,this.metadata("MMULT"),(e,t)=>{if(!e.hasOnlyNumbers()||!t.hasOnlyNumbers())return new rq(d.VALUE,eY.NumberRange);if(t.height()!==e.width())return new rq(d.VALUE,eY.ArrayDimensions);let r=o2(e.size,t.size),i=this.createKernel(function(e,t,r){let i=0;for(let n=0;n<r;++n)i+=e[this.thread.y][n]*t[n][this.thread.x];return i},r)(e.rawNumbers(),t.rawNumbers(),e.width());return tF.onlyNumbers(i)})}mmultArraySize(e,t){if(2!==e.args.length)return iT.error();let r=this.metadata("MMULT"),[i,n]=e.args.map(e=>{var i;return this.arraySizeForAst(e,new ir(t.formulaAddress,t.arraysFlag||null!=(i=null==r?void 0:r.enableArrayArithmeticForArguments)&&i))});return o2(i,n)}maxpool(e,t){return this.runFunction(e.args,t,this.metadata("MAXPOOL"),(e,t,r=t)=>{if(!e.hasOnlyNumbers())return new rq(d.VALUE,eY.NumberRange);let i=o3(e.size,t,r),n=this.createKernel(function(e,t,r){let i=this.thread.x*r,n=this.thread.y*r,o=e[n][i];for(let r=0;r<t;r++)for(let s=0;s<t;s++)o=Math.max(o,e[n+r][i+s]);return o},i)(e.rawNumbers(),t,r);return tF.onlyNumbers(n)})}medianpool(e,t){return this.runFunction(e.args,t,this.metadata("MEDIANPOOL"),(e,t,r=t)=>{if(!e.hasOnlyNumbers())return new rq(d.VALUE,eY.NumberRange);let i=o3(e.size,t,r),n=this.createKernel(function(e,t,r){let i=this.thread.x*r,n=this.thread.y*r,o=e[n][i];for(let r=0;r<t;r++)for(let s=0;s<t;s++)o=Math.max(o,e[n+r][i+s]);let s=e[n][i];for(let r=0;r<t;r++)for(let o=0;o<t;o++)s=Math.min(s,e[n+r][i+o]);let l=t*t,a=s,h=o,d=42;for(let r=0;r<32;r++){let r=(a+h)/2,o=0;for(let s=0;s<t;s++)for(let l=0;l<t;l++)e[n+s][i+l]>r&&o++;if(t%2==0)if(o===l/2){d=r;break}else o>l/2?a=r:h=r;else if(o===(l-1)/2){d=r;break}else o>(l-1)/2?a=r:h=r}return d},i)(e.rawNumbers(),t,r);return tF.onlyNumbers(n)})}maxpoolArraySize(e,t){let r;if(e.args.length<2||e.args.length>3)return iT.error();let i=this.metadata("MAXPOOL"),o=e.args.map(e=>{var r;return this.arraySizeForAst(e,new ir(t.formulaAddress,t.arraysFlag||null!=(r=null==i?void 0:i.enableArrayArithmeticForArguments)&&r))})[0],s=e.args[1],l=r=s.type===n.NUMBER?s.value:1;if(3===e.args.length){let t=e.args[2];l=t.type===n.NUMBER?t.value:1}return r>o.width||r>o.height||l>r||(o.width-r)%l!=0||(o.height-r)%l!=0?iT.error():o3(o,r,l)}medianpoolArraySize(e,t){return this.maxpoolArraySize(e,t)}transpose(e,t){return this.runFunction(e.args,t,this.metadata("TRANSPOSE"),e=>{let t=e.rawData(),r=e.size,i=[];for(let e=0;e<r.width;++e){i[e]=[];for(let n=0;n<r.height;++n)i[e][n]=t[n][e]}return tF.onlyValues(i)})}transposeArraySize(e,t){if(1!==e.args.length)return iT.error();let r=this.metadata("TRANSPOSE"),[i]=e.args.map(e=>{var i;return this.arraySizeForAst(e,new ir(t.formulaAddress,t.arraysFlag||null!=(i=null==r?void 0:r.enableArrayArithmeticForArguments)&&i))});return new iT(i.height,i.width)}createKernel(e,t){return function(...r){let i=[];for(let n=0;n<t.height;++n){i.push([]);for(let o=0;o<t.width;++o)i[n][o]=e.apply({thread:{x:o,y:n}},r)}return i}}}o6.implementedFunctions={MMULT:{method:"mmult",sizeOfResultArrayMethod:"mmultArraySize",parameters:[{argumentType:p.RANGE},{argumentType:p.RANGE}],vectorizationForbidden:!0},TRANSPOSE:{method:"transpose",sizeOfResultArrayMethod:"transposeArraySize",parameters:[{argumentType:p.RANGE}],vectorizationForbidden:!0},MAXPOOL:{method:"maxpool",sizeOfResultArrayMethod:"maxpoolArraySize",parameters:[{argumentType:p.RANGE},{argumentType:p.NUMBER},{argumentType:p.NUMBER,optionalArg:!0}],vectorizationForbidden:!0},MEDIANPOOL:{method:"medianpool",sizeOfResultArrayMethod:"medianpoolArraySize",parameters:[{argumentType:p.RANGE},{argumentType:p.NUMBER},{argumentType:p.NUMBER,optionalArg:!0}],vectorizationForbidden:!0}};class o5 extends iE{median(e,t){return this.runFunction(e.args,t,this.metadata("MEDIAN"),(...e)=>{let t=this.arithmeticHelper.coerceNumbersExactRanges(e);return t instanceof rq?t:0===t.length?new rq(d.NUM,eY.OneValue):(t.sort((e,t)=>e-t),t.length%2==0)?(t[t.length/2-1]+t[t.length/2])/2:t[Math.floor(t.length/2)]})}large(e,t){return this.runFunction(e.args,t,this.metadata("LARGE"),(e,t)=>{let r=this.arithmeticHelper.manyToExactNumbers(e.valuesFromTopLeftCorner());return r instanceof rq?r:(r.sort((e,t)=>e-t),(t=Math.trunc(t))>r.length)?new rq(d.NUM,eY.ValueLarge):r[r.length-t]})}small(e,t){return this.runFunction(e.args,t,this.metadata("SMALL"),(e,t)=>{let r=this.arithmeticHelper.manyToExactNumbers(e.valuesFromTopLeftCorner());return r instanceof rq?r:(r.sort((e,t)=>e-t),(t=Math.trunc(t))>r.length)?new rq(d.NUM,eY.ValueLarge):r[t-1]})}}o5.implementedFunctions={MEDIAN:{method:"median",parameters:[{argumentType:p.ANY}],repeatLastArgs:1},LARGE:{method:"large",parameters:[{argumentType:p.RANGE},{argumentType:p.NUMBER,minValue:1}]},SMALL:{method:"small",parameters:[{argumentType:p.RANGE},{argumentType:p.NUMBER,minValue:1}]}};class o4 extends iE{mod(e,t){return this.runFunction(e.args,t,this.metadata("MOD"),(e,t)=>0===t?new rq(d.DIV_BY_ZERO):e%t)}}function o8(e,t){let r=e.length,i=t*(r-1),n=Math.floor(i);return n+1<r?e[n]+(i-n)*(e[n+1]-e[n]):e[n]}function o9(e,t){let r=e.length,i=t*(r+1);if(i<1)return new rq(d.NUM,eY.ValueSmall);if(i>r)return new rq(d.NUM,eY.ValueLarge);let n=Math.floor(i);return n<r?e[n-1]+(i-n)*(e[n]-e[n-1]):e[n-1]}o4.implementedFunctions={MOD:{method:"mod",parameters:[{argumentType:p.NUMBER},{argumentType:p.NUMBER}]}};class o7 extends iE{percentile(e,t){return this.runFunction(e.args,t,this.metadata("PERCENTILE.INC"),(e,t)=>{let r=this.getSortedValues(e);return r instanceof rq?r:o8(r,t)})}percentileExc(e,t){return this.runFunction(e.args,t,this.metadata("PERCENTILE.EXC"),(e,t)=>{let r=this.getSortedValues(e);return r instanceof rq?r:o9(r,t)})}quartile(e,t){return this.runFunction(e.args,t,this.metadata("QUARTILE.INC"),(e,t)=>{if((t=Math.trunc(t))<0)return new rq(d.NUM,eY.ValueSmall);if(t>4)return new rq(d.NUM,eY.ValueLarge);let r=this.getSortedValues(e);return r instanceof rq?r:o8(r,t/4)})}quartileExc(e,t){return this.runFunction(e.args,t,this.metadata("QUARTILE.EXC"),(e,t)=>{if((t=Math.trunc(t))<1)return new rq(d.NUM,eY.ValueSmall);if(t>3)return new rq(d.NUM,eY.ValueLarge);let r=this.getSortedValues(e);return r instanceof rq?r:o9(r,t/4)})}getSortedValues(e){let t=this.arithmeticHelper.manyToExactNumbers(e.valuesFromTopLeftCorner());return t instanceof rq?t:0===t.length?new rq(d.NUM,eY.OneValue):(t.sort((e,t)=>e-t),t)}}function se(e){return tD(e)&&!Number.isFinite(tM(e))?0:e}o7.implementedFunctions={"PERCENTILE.INC":{method:"percentile",parameters:[{argumentType:p.RANGE},{argumentType:p.NUMBER,minValue:0,maxValue:1}]},"PERCENTILE.EXC":{method:"percentileExc",parameters:[{argumentType:p.RANGE},{argumentType:p.NUMBER,greaterThan:0,lessThan:1}]},"QUARTILE.INC":{method:"quartile",parameters:[{argumentType:p.RANGE},{argumentType:p.NUMBER}]},"QUARTILE.EXC":{method:"quartileExc",parameters:[{argumentType:p.RANGE},{argumentType:p.NUMBER}]}},o7.aliases={PERCENTILE:"PERCENTILE.INC",QUARTILE:"QUARTILE.INC"};class st{constructor(e,t,r){this.sumsq=e,this.sum=t,this.count=r}static single(e){return new st(e*e,e,1)}compose(e){return new st(this.sumsq+e.sumsq,this.sum+e.sum,this.count+e.count)}averageValue(){return this.count>0?this.sum/this.count:void 0}varSValue(){return this.count>1?(this.sumsq-this.sum*this.sum/this.count)/(this.count-1):void 0}varPValue(){return this.count>0?(this.sumsq-this.sum*this.sum/this.count)/this.count:void 0}}st.empty=new st(0,0,0);class sr extends iE{constructor(){super(...arguments),this.addWithEpsilonRaw=(e,t)=>this.arithmeticHelper.addWithEpsilonRaw(e,t)}sum(e,t){return this.doSum(e.args,t)}sumsq(e,t){return this.reduce(e.args,t,0,"SUMSQ",this.addWithEpsilonRaw,e=>Math.pow(tM(e),2),si)}max(e,t){return this.doMax(e.args,t)}maxa(e,t){return se(this.reduce(e.args,t,-1/0,"MAXA",(e,t)=>Math.max(e,t),tM,sn))}min(e,t){return this.doMin(e.args,t)}mina(e,t){return se(this.reduce(e.args,t,1/0,"MINA",(e,t)=>Math.min(e,t),tM,sn))}count(e,t){return this.doCount(e.args,t)}counta(e,t){return this.doCounta(e.args,t)}average(e,t){return this.doAverage(e.args,t)}averagea(e,t){var r;let i=this.reduce(e.args,t,st.empty,"_AGGREGATE_A",(e,t)=>e.compose(t),e=>st.single(tM(e)),sn);return i instanceof rq?i:null!=(r=i.averageValue())?r:new rq(d.DIV_BY_ZERO)}vars(e,t){return this.doVarS(e.args,t)}varp(e,t){return this.doVarP(e.args,t)}vara(e,t){var r;let i=this.reduceAggregateA(e.args,t);return i instanceof rq?i:null!=(r=i.varSValue())?r:new rq(d.DIV_BY_ZERO)}varpa(e,t){var r;let i=this.reduceAggregateA(e.args,t);return i instanceof rq?i:null!=(r=i.varPValue())?r:new rq(d.DIV_BY_ZERO)}stdevs(e,t){return this.doStdevS(e.args,t)}stdevp(e,t){return this.doStdevP(e.args,t)}stdeva(e,t){let r=this.reduceAggregateA(e.args,t);if(r instanceof rq)return r;{let e=r.varSValue();return void 0===e?new rq(d.DIV_BY_ZERO):Math.sqrt(e)}}stdevpa(e,t){let r=this.reduceAggregateA(e.args,t);if(r instanceof rq)return r;{let e=r.varPValue();return void 0===e?new rq(d.DIV_BY_ZERO):Math.sqrt(e)}}product(e,t){return this.doProduct(e.args,t)}subtotal(e,t){if(e.args.length<2)return new rq(d.NA,eY.WrongArgNumber);let r=this.coerceToType(this.evaluateAst(e.args[0],t),{argumentType:p.NUMBER},t),i=e.args.slice(1);switch(r){case 1:case 101:return this.doAverage(i,t);case 2:case 102:return this.doCount(i,t);case 3:case 103:return this.doCounta(i,t);case 4:case 104:return this.doMax(i,t);case 5:case 105:return this.doMin(i,t);case 6:case 106:return this.doProduct(i,t);case 7:case 107:return this.doStdevS(i,t);case 8:case 108:return this.doStdevP(i,t);case 9:case 109:return this.doSum(i,t);case 10:case 110:return this.doVarS(i,t);case 11:case 111:return this.doVarP(i,t);default:return new rq(d.VALUE,eY.BadMode)}}reduceAggregate(e,t){return this.reduce(e,t,st.empty,"_AGGREGATE",(e,t)=>e.compose(t),e=>st.single(tM(e)),si)}reduceAggregateA(e,t){return this.reduce(e,t,st.empty,"_AGGREGATE_A",(e,t)=>e.compose(t),e=>st.single(tM(e)),sn)}doAverage(e,t){var r;let i=this.reduceAggregate(e,t);return i instanceof rq?i:null!=(r=i.averageValue())?r:new rq(d.DIV_BY_ZERO)}doVarS(e,t){var r;let i=this.reduceAggregate(e,t);return i instanceof rq?i:null!=(r=i.varSValue())?r:new rq(d.DIV_BY_ZERO)}doVarP(e,t){var r;let i=this.reduceAggregate(e,t);return i instanceof rq?i:null!=(r=i.varPValue())?r:new rq(d.DIV_BY_ZERO)}doStdevS(e,t){let r=this.reduceAggregate(e,t);if(r instanceof rq)return r;{let e=r.varSValue();return void 0===e?new rq(d.DIV_BY_ZERO):Math.sqrt(e)}}doStdevP(e,t){let r=this.reduceAggregate(e,t);if(r instanceof rq)return r;{let e=r.varPValue();return void 0===e?new rq(d.DIV_BY_ZERO):Math.sqrt(e)}}doCount(e,t){return this.reduce(e,t,0,"COUNT",(e,t)=>e+t,tM,e=>+!!tD(e))}doCounta(e,t){return this.reduce(e,t,0,"COUNTA",(e,t)=>e+t,tM,e=>+(e!==tA))}doMax(e,t){return se(this.reduce(e,t,-1/0,"MAX",(e,t)=>Math.max(e,t),tM,si))}doMin(e,t){return se(this.reduce(e,t,1/0,"MIN",(e,t)=>Math.min(e,t),tM,si))}doSum(e,t){return this.reduce(e,t,0,"SUM",this.addWithEpsilonRaw,tM,si)}doProduct(e,t){return this.reduce(e,t,1,"PRODUCT",(e,t)=>e*t,tM,si)}reduce(e,t,r,i,o,s,l){return e.length<1?new rq(d.NA,eY.WrongArgNumber):e.reduce((e,a)=>{let h;if(e instanceof rq)return e;if(a.type===n.CELL_RANGE||a.type===n.COLUMN_RANGE||a.type===n.ROW_RANGE){let n=this.evaluateRange(a,t,r,i,o,s,l);return n instanceof rq?n:o(n,e)}if((h=this.evaluateAst(a,t))instanceof tF)return Array.from(h.valuesFromTopLeftCorner()).map(l).filter(e=>void 0!==e).map(e=>e instanceof rq?e:s(e)).reduce((e,t)=>e instanceof rq?e:t instanceof rq?t:o(e,t),e);if(a.type===n.CELL_REFERENCE){if(void 0===(h=l(h)))return e}else if(void 0===(h=l(h=this.coerceScalarToNumberOrError(h))))return e;return h instanceof rq?h:o(e,s(h))},r)}evaluateRange(e,t,r,i,n,o,s){let l;try{l=r7.fromAst(e,t.formulaAddress)}catch(e){if(e instanceof t2)return new rq(d.REF,eY.RangeManySheets);throw e}if(!this.isSheetValid(l))return new rq(d.REF,eY.SheetRef);let a=this.dependencyGraph.getRange(l.start,l.end);if(void 0===a)throw Error("Range does not exists in graph");let h=a.getFunctionValue(i);return void 0===h&&(h=this.getRangeValues(i,l,a,o,s).reduce((e,t)=>e instanceof rq?e:t instanceof rq?t:n(e,t),r),a.setFunctionValue(i,h)),h}isSheetValid(e){return this.dependencyGraph.sheetMapping.hasSheetWithId(e.start.sheet,{includePlaceholders:!1})&&this.dependencyGraph.sheetMapping.hasSheetWithId(e.end.sheet,{includePlaceholders:!1})}getRangeValues(e,t,r,i,n){let o,s=[],{smallerRangeVertex:l,restRange:a}=this.dependencyGraph.rangeMapping.findSmallerRange(t);if(void 0!==l&&this.dependencyGraph.existsEdge(l,r)){let t=l.getFunctionValue(e);if(void 0!==t)s.push(t);else for(let e of l.range.addresses(this.dependencyGraph)){let t=n(this.dependencyGraph.getScalarValue(e));t instanceof rq?s.push(t):void 0!==t&&s.push(i(t))}o=a}else o=t;for(let e of o.addresses(this.dependencyGraph)){let t=n(this.dependencyGraph.getScalarValue(e));t instanceof rq?s.push(t):void 0!==t&&s.push(i(t))}return s}}function si(e){return tD(e)||e instanceof rq?e:void 0}function sn(e){return"boolean"==typeof e?ia(e):tD(e)||e instanceof rq?e:"string"==typeof e?0:void 0}sr.implementedFunctions={SUM:{method:"sum",parameters:[{argumentType:p.ANY}],repeatLastArgs:1},SUMSQ:{method:"sumsq",parameters:[{argumentType:p.ANY}],repeatLastArgs:1},MAX:{method:"max",parameters:[{argumentType:p.ANY}],repeatLastArgs:1},MIN:{method:"min",parameters:[{argumentType:p.ANY}],repeatLastArgs:1},MAXA:{method:"maxa",parameters:[{argumentType:p.ANY}],repeatLastArgs:1},MINA:{method:"mina",parameters:[{argumentType:p.ANY}],repeatLastArgs:1},COUNT:{method:"count",parameters:[{argumentType:p.ANY}],repeatLastArgs:1},COUNTA:{method:"counta",parameters:[{argumentType:p.ANY}],repeatLastArgs:1},AVERAGE:{method:"average",parameters:[{argumentType:p.ANY}],repeatLastArgs:1},AVERAGEA:{method:"averagea",parameters:[{argumentType:p.ANY}],repeatLastArgs:1},PRODUCT:{method:"product",parameters:[{argumentType:p.ANY}],repeatLastArgs:1},"VAR.S":{method:"vars",parameters:[{argumentType:p.ANY}],repeatLastArgs:1},"VAR.P":{method:"varp",parameters:[{argumentType:p.ANY}],repeatLastArgs:1},VARA:{method:"vara",parameters:[{argumentType:p.ANY}],repeatLastArgs:1},VARPA:{method:"varpa",parameters:[{argumentType:p.ANY}],repeatLastArgs:1},"STDEV.S":{method:"stdevs",parameters:[{argumentType:p.ANY}],repeatLastArgs:1},"STDEV.P":{method:"stdevp",parameters:[{argumentType:p.ANY}],repeatLastArgs:1},STDEVA:{method:"stdeva",parameters:[{argumentType:p.ANY}],repeatLastArgs:1},STDEVPA:{method:"stdevpa",parameters:[{argumentType:p.ANY}],repeatLastArgs:1},SUBTOTAL:{method:"subtotal",parameters:[{argumentType:p.NUMBER},{argumentType:p.ANY}],repeatLastArgs:1}},sr.aliases={VAR:"VAR.S",VARP:"VAR.P",STDEV:"STDEV.S",STDEVP:"STDEV.P",VARS:"VAR.S",STDEVS:"STDEV.S"};class so extends iE{power(e,t){return this.runFunction(e.args,t,this.metadata("POWER"),Math.pow)}}so.implementedFunctions={POWER:{method:"power",parameters:[{argumentType:p.NUMBER},{argumentType:p.NUMBER}]}};class ss extends iE{radians(e,t){return this.runFunction(e.args,t,this.metadata("RADIANS"),e=>Math.PI/180*e)}}ss.implementedFunctions={RADIANS:{method:"radians",parameters:[{argumentType:p.NUMBER}]}};class sl extends iE{dec2bin(e,t){return this.runFunction(e.args,t,this.metadata("DEC2BIN"),(e,t)=>sh(e,2,t))}dec2oct(e,t){return this.runFunction(e.args,t,this.metadata("DEC2OCT"),(e,t)=>sh(e,8,t))}dec2hex(e,t){return this.runFunction(e.args,t,this.metadata("DEC2HEX"),(e,t)=>sh(e,16,t))}bin2dec(e,t){return this.runFunction(e.args,t,this.metadata("BIN2DEC"),e=>{let t=sa(e,2,10);return void 0===t?new rq(d.NUM,eY.NotBinary):sg(t,2)})}bin2oct(e,t){return this.runFunction(e.args,t,this.metadata("BIN2OCT"),(e,t)=>{let r=sa(e,2,10);return void 0===r?new rq(d.NUM,eY.NotBinary):sh(sg(r,2),8,t)})}bin2hex(e,t){return this.runFunction(e.args,t,this.metadata("BIN2HEX"),(e,t)=>{let r=sa(e,2,10);return void 0===r?new rq(d.NUM,eY.NotBinary):sh(sg(r,2),16,t)})}oct2dec(e,t){return this.runFunction(e.args,t,this.metadata("OCT2DEC"),e=>{let t=sa(e,8,10);return void 0===t?new rq(d.NUM,eY.NotOctal):sg(t,8)})}oct2bin(e,t){return this.runFunction(e.args,t,this.metadata("OCT2BIN"),(e,t)=>{let r=sa(e,8,10);return void 0===r?new rq(d.NUM,eY.NotOctal):sh(sg(r,8),2,t)})}oct2hex(e,t){return this.runFunction(e.args,t,this.metadata("OCT2HEX"),(e,t)=>{let r=sa(e,8,10);return void 0===r?new rq(d.NUM,eY.NotOctal):sh(sg(r,8),16,t)})}hex2dec(e,t){return this.runFunction(e.args,t,this.metadata("HEX2DEC"),e=>{let t=sa(e,16,10);return void 0===t?new rq(d.NUM,eY.NotHex):sg(t,16)})}hex2bin(e,t){return this.runFunction(e.args,t,this.metadata("HEX2BIN"),(e,t)=>{let r=sa(e,16,10);return void 0===r?new rq(d.NUM,eY.NotHex):sh(sg(r,16),2,t)})}hex2oct(e,t){return this.runFunction(e.args,t,this.metadata("HEX2OCT"),(e,t)=>{let r=sa(e,16,10);return void 0===r?new rq(d.NUM,eY.NotHex):sh(sg(r,16),8,t)})}base(e,t){return this.runFunction(e.args,t,this.metadata("BASE"),su)}decimal(e,t){return this.runFunction(e.args,t,this.metadata("DECIMAL"),(e,t)=>{let r=sa(e,t,255);return void 0===r?new rq(d.NUM,eY.NotHex):parseInt(r,t)})}}function sa(e,t,r){let i=RegExp(`^[${"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ".substr(0,t)}]+$`);if(!(e.length>r)&&i.test(e))return e}function sh(e,t,r){if(e>-sd(t)-1)return new rq(d.NUM,eY.ValueBaseLarge);if(e<sd(t))return new rq(d.NUM,eY.ValueBaseSmall);let i=sc(e,t);return void 0===r||e<0?i:i.length>r?new rq(d.NUM,eY.ValueBaseLong):i5(i,r)}function sd(e){return-Math.pow(e,10)/2}function su(e,t,r){let i=sc(e,t);return void 0!==r&&r>i.length?i5(i,r):i}function sc(e,t){let r=e<0?Math.pow(t,10):0;return(e+r).toString(t).toUpperCase()}function sg(e,t){let r=parseInt(e,t),i=Math.pow(t,10);return r>=i/2?r-i:r}sl.implementedFunctions={DEC2BIN:{method:"dec2bin",parameters:[{argumentType:p.NUMBER},{argumentType:p.NUMBER,optionalArg:!0,minValue:1,maxValue:10}]},DEC2OCT:{method:"dec2oct",parameters:[{argumentType:p.NUMBER},{argumentType:p.NUMBER,optionalArg:!0,minValue:1,maxValue:10}]},DEC2HEX:{method:"dec2hex",parameters:[{argumentType:p.NUMBER},{argumentType:p.NUMBER,optionalArg:!0,minValue:1,maxValue:10}]},BIN2DEC:{method:"bin2dec",parameters:[{argumentType:p.STRING}]},BIN2OCT:{method:"bin2oct",parameters:[{argumentType:p.STRING},{argumentType:p.NUMBER,optionalArg:!0,minValue:0,maxValue:10}]},BIN2HEX:{method:"bin2hex",parameters:[{argumentType:p.STRING},{argumentType:p.NUMBER,optionalArg:!0,minValue:0,maxValue:10}]},OCT2DEC:{method:"oct2dec",parameters:[{argumentType:p.STRING}]},OCT2BIN:{method:"oct2bin",parameters:[{argumentType:p.STRING},{argumentType:p.NUMBER,optionalArg:!0,minValue:0,maxValue:10}]},OCT2HEX:{method:"oct2hex",parameters:[{argumentType:p.STRING},{argumentType:p.NUMBER,optionalArg:!0,minValue:0,maxValue:10}]},HEX2DEC:{method:"hex2dec",parameters:[{argumentType:p.STRING}]},HEX2BIN:{method:"hex2bin",parameters:[{argumentType:p.STRING},{argumentType:p.NUMBER,optionalArg:!0,minValue:0,maxValue:10}]},HEX2OCT:{method:"hex2oct",parameters:[{argumentType:p.STRING},{argumentType:p.NUMBER,optionalArg:!0,minValue:0,maxValue:10}]},DECIMAL:{method:"decimal",parameters:[{argumentType:p.STRING},{argumentType:p.NUMBER,minValue:2,maxValue:36}]},BASE:{method:"base",parameters:[{argumentType:p.NUMBER,minValue:0},{argumentType:p.NUMBER,minValue:2,maxValue:36},{argumentType:p.NUMBER,optionalArg:!0,minValue:0,maxValue:255}]}};class sp extends iE{rand(e,t){return this.runFunction(e.args,t,this.metadata("RAND"),Math.random)}randbetween(e,t){return this.runFunction(e.args,t,this.metadata("RANDBETWEEN"),(e,t)=>t<e?new rq(d.NUM,eY.WrongOrder):((e=Math.ceil(e))===(t=Math.floor(t)+1)&&(t+=1),e+Math.floor(Math.random()*(t-e))))}}sp.implementedFunctions={RAND:{method:"rand",parameters:[],isVolatile:!0},RANDBETWEEN:{method:"randbetween",parameters:[{argumentType:p.NUMBER},{argumentType:p.NUMBER}],isVolatile:!0}};class sm extends iE{static isValidDimension(e){return Number.isFinite(e)&&e>=sm.MIN_DIMENSION}static parseLiteralDimension(e){if(e.type===n.NUMBER)return Math.trunc(e.value);if(e.type===n.STRING){let t=Number(e.value);return Number.isFinite(t)?Math.trunc(t):void 0}if(e.type===n.PLUS_UNARY_OP&&e.value.type===n.NUMBER)return Math.trunc(e.value.value);if(e.type===n.MINUS_UNARY_OP&&e.value.type===n.NUMBER)return Math.trunc(-e.value.value);if(e.type===n.FUNCTION_CALL){if("TRUE"===e.procedureName&&0===e.args.length)return 1;if("FALSE"===e.procedureName&&0===e.args.length)return 0}}sequence(e,t){return this.runFunction(e.args,t,this.metadata("SEQUENCE"),(e,t,r,i)=>{if(!Number.isFinite(e)||!Number.isFinite(t))return new rq(d.VALUE,eY.ValueLarge);if(e<0||t<0)return new rq(d.VALUE,eY.LessThanOne);let n=Math.trunc(e),o=Math.trunc(t);if(!sm.isValidDimension(n)||!sm.isValidDimension(o))return new rq(d.VALUE,eY.LessThanOne);if(n>this.config.maxRows||o>this.config.maxColumns)return new rq(d.VALUE,eY.ValueLarge);let s=[];for(let e=0;e<n;e++){let t=[];for(let n=0;n<o;n++)t.push(r+(e*o+n)*i);s.push(t)}return tF.onlyNumbers(s)})}sequenceArraySize(e,t){if(e.args.length<1||e.args.length>4)return iT.error();let r=e.args[0],i=e.args.length>1?e.args[1]:void 0;if(r.type===n.EMPTY)return iT.error();let o=sm.parseLiteralDimension(r);if(void 0===o)return iT.error();let s=void 0===i||i.type===n.EMPTY?1:sm.parseLiteralDimension(i);return void 0===s||!sm.isValidDimension(o)||!sm.isValidDimension(s)||o>this.config.maxRows||s>this.config.maxColumns?iT.error():new iT(s,o)}}function sf(e){let t=Math.ceil(e);return t%2==1?t:t+1}function sw(e){let t=Math.ceil(e);return t%2==0?t:t+1}sm.MIN_DIMENSION=1,sm.implementedFunctions={SEQUENCE:{method:"sequence",sizeOfResultArrayMethod:"sequenceArraySize",parameters:[{argumentType:p.NUMBER},{argumentType:p.NUMBER,defaultValue:1,emptyAsDefault:!0},{argumentType:p.NUMBER,defaultValue:1,emptyAsDefault:!0},{argumentType:p.NUMBER,defaultValue:1,emptyAsDefault:!0}],vectorizationForbidden:!0}};class sy extends iE{roundup(e,t){return this.runFunction(e.args,t,this.metadata("ROUNDDOWN"),(e,t)=>{let r=Math.pow(10,t);return e<0?-Math.ceil(-e*r)/r:Math.ceil(e*r)/r})}rounddown(e,t){return this.runFunction(e.args,t,this.metadata("ROUNDDOWN"),(e,t)=>{let r=Math.pow(10,t);return e<0?-Math.floor(-e*r)/r:Math.floor(e*r)/r})}round(e,t){return this.runFunction(e.args,t,this.metadata("ROUND"),(e,t)=>{let r=Math.pow(10,t);return e<0?-Math.round(-e*r)/r:Math.round(e*r)/r})}intFunc(e,t){return this.runFunction(e.args,t,this.metadata("INT"),e=>e<0?-Math.floor(-e):Math.floor(e))}even(e,t){return this.runFunction(e.args,t,this.metadata("EVEN"),e=>e<0?-sw(-e):sw(e))}odd(e,t){return this.runFunction(e.args,t,this.metadata("ODD"),e=>e<0?-sf(-e):sf(e))}ceilingmath(e,t){return this.runFunction(e.args,t,this.metadata("CEILING.MATH"),(e,t,r)=>0===t||0===e?0:(t=Math.abs(t),1===r&&e<0&&(t=-t),Math.ceil(e/t)*t))}ceiling(e,t){return this.runFunction(e.args,t,this.metadata("CEILING"),(e,t)=>0===e?0:0===t?new rq(d.DIV_BY_ZERO):e>0&&t<0?new rq(d.NUM,eY.DistinctSigns):Math.ceil(e/t)*t)}ceilingprecise(e,t){return this.runFunction(e.args,t,this.metadata("CEILING.PRECISE"),(e,t)=>0===t||0===e?0:Math.ceil(e/(t=Math.abs(t)))*t)}floormath(e,t){return this.runFunction(e.args,t,this.metadata("FLOOR.MATH"),(e,t,r)=>0===t||0===e?0:(t=Math.abs(t),1===r&&e<0&&(t*=-1),Math.floor(e/t)*t))}floor(e,t){return this.runFunction(e.args,t,this.metadata("FLOOR"),(e,t)=>0===e?0:0===t?new rq(d.DIV_BY_ZERO):e>0&&t<0?new rq(d.NUM,eY.DistinctSigns):Math.floor(e/t)*t)}floorprecise(e,t){return this.runFunction(e.args,t,this.metadata("FLOOR.PRECISE"),(e,t)=>0===t||0===e?0:Math.floor(e/(t=Math.abs(t)))*t)}}sy.implementedFunctions={ROUNDUP:{method:"roundup",parameters:[{argumentType:p.NUMBER},{argumentType:p.NUMBER,defaultValue:0}]},ROUNDDOWN:{method:"rounddown",parameters:[{argumentType:p.NUMBER},{argumentType:p.NUMBER,defaultValue:0}]},ROUND:{method:"round",parameters:[{argumentType:p.NUMBER},{argumentType:p.NUMBER,defaultValue:0}]},INT:{method:"intFunc",parameters:[{argumentType:p.NUMBER}]},EVEN:{method:"even",parameters:[{argumentType:p.NUMBER}]},ODD:{method:"odd",parameters:[{argumentType:p.NUMBER}]},"CEILING.MATH":{method:"ceilingmath",parameters:[{argumentType:p.NUMBER},{argumentType:p.NUMBER,defaultValue:1},{argumentType:p.NUMBER,defaultValue:0}]},CEILING:{method:"ceiling",parameters:[{argumentType:p.NUMBER},{argumentType:p.NUMBER}]},"CEILING.PRECISE":{method:"ceilingprecise",parameters:[{argumentType:p.NUMBER},{argumentType:p.NUMBER,defaultValue:1}]},"FLOOR.MATH":{method:"floormath",parameters:[{argumentType:p.NUMBER},{argumentType:p.NUMBER,defaultValue:1},{argumentType:p.NUMBER,defaultValue:0}]},FLOOR:{method:"floor",parameters:[{argumentType:p.NUMBER},{argumentType:p.NUMBER}]},"FLOOR.PRECISE":{method:"floorprecise",parameters:[{argumentType:p.NUMBER},{argumentType:p.NUMBER,defaultValue:1}]}},sy.aliases={"ISO.CEILING":"CEILING.PRECISE",TRUNC:"ROUNDDOWN"};class sb extends iE{sqrt(e,t){return this.runFunction(e.args,t,this.metadata("SQRT"),Math.sqrt)}}sb.implementedFunctions={SQRT:{method:"sqrt",parameters:[{argumentType:p.NUMBER}]}};class sC{constructor(e,t,r,i,n){this.interpreter=e,this.cacheKey=t,this.reduceInitialValue=r,this.composeFunction=i,this.mapFunction=n,this.dependencyGraph=this.interpreter.dependencyGraph}compute(e,t){for(let r of t)if(!r.conditionRange.sameDimensionsAs(e))return new rq(d.VALUE,eY.EqualLength);let r=this.tryToGetRangeVertexForRangeValue(e),i=t.map(e=>this.tryToGetRangeVertexForRangeValue(e.conditionRange));if(!(r&&i.every(e=>void 0!==e)))return this.evaluateRangeValue(e,t);{let n=t.map(e=>e.criterionPackage.raw).join(","),o=this.findAlreadyComputedValueInCache(r,this.cacheKey(t),n);if(void 0!==o)return this.interpreter.stats.incrementCriterionFunctionFullCacheUsed(),o;let s=this.buildNewCriterionCache(this.cacheKey(t),t.map(e=>e.conditionRange.range),e.range);return s.has(n)||s.set(n,[this.evaluateRangeValue(e,t),t.map(e=>e.criterionPackage.lambda)]),r.setCriterionFunctionValues(this.cacheKey(t),s),i.forEach(e=>{void 0!==e&&e.addDependentCacheRange(r)}),s.get(n)[0]}}tryToGetRangeVertexForRangeValue(e){let t=e.range;if(void 0!==t)return this.dependencyGraph.getRange(t.start,t.end)}reduceFunction(e){let t=this.reduceInitialValue;for(let r of e)t=this.composeFunction(t,r);return t}findAlreadyComputedValueInCache(e,t,r){return e.getCriterionFunctionValue(t,r)}evaluateRangeValue(e,t){let r=t.map(e=>e.criterionPackage.lambda),i=Array.from(e.valuesFromTopLeftCorner()).map(this.mapFunction)[Symbol.iterator](),n=sR(r,t.map(e=>e.conditionRange.iterateValuesFromTopLeftCorner()),i);return this.reduceFunction(n)}buildNewCriterionCache(e,t,r){let i,n=this.dependencyGraph.getRange(r.start,r.end),{smallerRangeVertex:o,restConditionRanges:s,restValuesRange:l}=((e,t,r)=>{if(r.end.row>r.start.row){let i=r0(r.end.sheet,r.end.col,r.end.row-1),n=e.getRange(r.start,i);if(void 0!==n)return{smallerRangeVertex:n,restValuesRange:r.withStart(r0(r.start.sheet,r.start.col,r.end.row)),restConditionRanges:t.map(e=>e.withStart(r0(e.start.sheet,e.start.col,e.end.row)))}}return{restValuesRange:r,restConditionRanges:t}})(this.dependencyGraph,t,r);i=void 0!==o&&this.dependencyGraph.existsEdge(o,n)?o.getCriterionFunctionValues(e):new Map;let a=new Map;return i.forEach(([e,t],r)=>{let i=sR(t,s.map(e=>sv(this.dependencyGraph,e)),Array.from(sv(this.dependencyGraph,l)).map(this.mapFunction)[Symbol.iterator]()),n=this.composeFunction(e,this.reduceFunction(i));this.interpreter.stats.incrementCriterionFunctionPartialCacheUsed(),a.set(r,[n,t])}),a}}class sS{constructor(e,t){this.conditionRange=e,this.criterionPackage=t}}function*sv(e,t){for(let r of t.addresses(e))yield tM(e.getScalarValue(r))}function*sR(e,t,r){for(let i of r){let r=t.map(e=>(function(e){let t=e[Symbol.iterator](),{done:r,value:i}=t.next();return r?{rest:function*(){}()}:{value:i,rest:t}})(e));if(!r.every(e=>Object.prototype.hasOwnProperty.call(e,"value")))return;(function(e,t){let r=[];for(let i=0;i<Math.min(e.length,t.length);i++)r.push([e[i],t[i]]);return r})(r.map(e=>tM(e.value)),e).every(([e,t])=>t(e))&&(yield i),t=r.map(e=>e.rest)}}class sE{constructor(e,t){this.sum=e,this.count=t}static single(e){return new sE(e,1)}compose(e){return new sE(this.sum+e.sum,this.count+e.count)}averageValue(){return this.count>0?this.sum/this.count:void 0}}function sT(e){return tD(e)&&!Number.isFinite(tM(e))?0:e}function sx(e){return e instanceof rq?e:tD(e)?tM(e):void 0}sE.empty=new sE(0,0);class sA extends iE{sumif(e,t){let r="SUMIF",i=(e,t,i)=>this.computeConditionalAggregationFunction(null!=i?i:e,[e,t],r,0,(e,t)=>this.arithmeticHelper.nonstrictadd(e,t),sx);return this.runFunction(e.args,t,this.metadata(r),i)}sumifs(e,t){let r="SUMIFS",i=(e,...t)=>this.computeConditionalAggregationFunction(e,t,r,0,(e,t)=>this.arithmeticHelper.nonstrictadd(e,t),sx);return this.runFunction(e.args,t,this.metadata(r),i)}averageif(e,t){let r="AVERAGEIF",i=(e,t,i)=>{let n=this.computeConditionalAggregationFunction(null!=i?i:e,[e,t],r,sE.empty,(e,t)=>e.compose(t),e=>tD(e)?sE.single(tM(e)):sE.empty);return n instanceof rq?n:n.averageValue()||new rq(d.DIV_BY_ZERO)};return this.runFunction(e.args,t,this.metadata(r),i)}countif(e,t){let r="COUNTIF",i=(e,t)=>this.computeConditionalAggregationFunction(e,[e,t],r,0,(e,t)=>e+t,()=>1);return this.runFunction(e.args,t,this.metadata(r),i)}countifs(e,t){let r="COUNTIFS",i=(...e)=>this.computeConditionalAggregationFunction(e[0],e,r,0,(e,t)=>e+t,()=>1);return this.runFunction(e.args,t,this.metadata(r),i)}minifs(e,t){let r="MINIFS",i=(e,t)=>void 0===t||void 0===e?void 0===t?e:t:Math.min(e,t),n=(e,...t)=>sT(this.computeConditionalAggregationFunction(e,t,r,1/0,i,sx));return this.runFunction(e.args,t,this.metadata(r),n)}maxifs(e,t){let r="MAXIFS",i=(e,t)=>void 0===t||void 0===e?void 0===t?e:t:Math.max(e,t),n=(e,...t)=>sT(this.computeConditionalAggregationFunction(e,t,r,-1/0,i,sx));return this.runFunction(e.args,t,this.metadata(r),n)}computeConditionalAggregationFunction(e,t,r,i,n,o){let s=[];for(let e=0;e<t.length;e+=2){let r=t[e],i=this.interpreter.criterionBuilder.fromCellValue(t[e+1],this.arithmeticHelper);if(void 0===i)return new rq(d.VALUE,eY.BadCriterion);s.push(new sS(r,i))}return new sC(this.interpreter,e=>[r,...e.map(e=>`${e.conditionRange.range.sheet},${e.conditionRange.range.start.col},${e.conditionRange.range.start.row}`)].join(","),i,n,o).compute(e,s)}}sA.implementedFunctions={SUMIF:{method:"sumif",parameters:[{argumentType:p.RANGE},{argumentType:p.NOERROR},{argumentType:p.RANGE,optionalArg:!0}]},COUNTIF:{method:"countif",parameters:[{argumentType:p.RANGE},{argumentType:p.NOERROR}]},AVERAGEIF:{method:"averageif",parameters:[{argumentType:p.RANGE},{argumentType:p.NOERROR},{argumentType:p.RANGE,optionalArg:!0}]},SUMIFS:{method:"sumifs",parameters:[{argumentType:p.RANGE},{argumentType:p.RANGE},{argumentType:p.NOERROR}],repeatLastArgs:2},COUNTIFS:{method:"countifs",parameters:[{argumentType:p.RANGE},{argumentType:p.NOERROR}],repeatLastArgs:2},MINIFS:{method:"minifs",parameters:[{argumentType:p.RANGE},{argumentType:p.RANGE},{argumentType:p.NOERROR}],repeatLastArgs:2},MAXIFS:{method:"maxifs",parameters:[{argumentType:p.RANGE},{argumentType:p.RANGE},{argumentType:p.NOERROR}],repeatLastArgs:2}};class sM extends iE{sumproduct(e,t){return this.runFunction(e.args,t,this.metadata("SUMPRODUCT"),(...e)=>{let t=e[0].width(),r=e[0].height();for(let i of e)if(i.width()!==t||i.height()!==r)return new rq(d.VALUE,eY.EqualLength);let i=0,n=e.map(e=>e.iterateValuesFromTopLeftCorner());for(let e=0;e<t*r;e++){let e=1;for(let t of n){let r=t.next().value;if(r instanceof rq)return r;let i=this.coerceScalarToNumberOrError(r);tD(i)?e*=tM(i):e=0}i+=e}return i})}}sM.implementedFunctions={SUMPRODUCT:{method:"sumproduct",parameters:[{argumentType:p.RANGE}],repeatLastArgs:1}};class sI extends iE{concatenate(e,t){return this.runFunction(e.args,t,this.metadata("CONCATENATE"),(...e)=>"".concat(...e))}split(e,t){return this.runFunction(e.args,t,this.metadata("SPLIT"),(e,t)=>{let r=e.split(" ");return t>=r.length||t<0?new rq(d.VALUE,eY.IndexBounds):r[t]})}len(e,t){return this.runFunction(e.args,t,this.metadata("LEN"),e=>e.length)}lower(e,t){return this.runFunction(e.args,t,this.metadata("LOWER"),e=>e.toLowerCase())}trim(e,t){return this.runFunction(e.args,t,this.metadata("TRIM"),e=>e.replace(/^ +/g,"").replace(/ +$/g,"").replace(/ +/g," "))}proper(e,t){return this.runFunction(e.args,t,this.metadata("PROPER"),e=>e.replace(/\p{L}+/gu,e=>e.charAt(0).toUpperCase()+e.substring(1).toLowerCase()))}clean(e,t){return this.runFunction(e.args,t,this.metadata("CLEAN"),e=>e.replace(/[\u0000-\u001F]/g,""))}exact(e,t){return this.runFunction(e.args,t,this.metadata("EXACT"),(e,t)=>e===t)}rept(e,t){return this.runFunction(e.args,t,this.metadata("REPT"),(e,t)=>t<0?new rq(d.VALUE,eY.NegativeCount):e.repeat(t))}right(e,t){return this.runFunction(e.args,t,this.metadata("RIGHT"),(e,t)=>t<0?new rq(d.VALUE,eY.NegativeLength):0===t?"":e.slice(-t))}left(e,t){return this.runFunction(e.args,t,this.metadata("LEFT"),(e,t)=>t<0?new rq(d.VALUE,eY.NegativeLength):e.slice(0,t))}mid(e,t){return this.runFunction(e.args,t,this.metadata("MID"),(e,t,r)=>t<1?new rq(d.VALUE,eY.LessThanOne):r<0?new rq(d.VALUE,eY.NegativeLength):e.substring(t-1,t+r-1))}replace(e,t){return this.runFunction(e.args,t,this.metadata("REPLACE"),(e,t,r,i)=>t<1?new rq(d.VALUE,eY.LessThanOne):r<0?new rq(d.VALUE,eY.NegativeLength):e.substring(0,t-1)+i+e.substring(t+r-1))}search(e,t){return this.runFunction(e.args,t,this.metadata("SEARCH"),(e,t,r)=>{if(r<1||r>t.length)return new rq(d.VALUE,eY.LengthBounds);let i=e.toLowerCase(),n=t.substring(r-1).toLowerCase(),o=this.arithmeticHelper.requiresRegex(i)?this.arithmeticHelper.searchString(i,n):n.indexOf(i);return o>-1?o+r:new rq(d.VALUE,eY.PatternNotFound)})}substitute(e,t){return this.runFunction(e.args,t,this.metadata("SUBSTITUTE"),(e,t,r,i)=>{let n,o=RegExp(this.escapeRegExpSpecialCharacters(t),"g");if(void 0===i)return e.replace(o,r);if(i<1)return new rq(d.VALUE,eY.LessThanOne);let s=0;for(;null!==(n=o.exec(e));)if(i===++s)return e.substring(0,n.index)+r+e.substring(o.lastIndex);return e})}find(e,t){return this.runFunction(e.args,t,this.metadata("FIND"),(e,t,r)=>{if(r<1||r>t.length)return new rq(d.VALUE,eY.IndexBounds);let i=t.substring(r-1).indexOf(e)+r;return i>0?i:new rq(d.VALUE,eY.PatternNotFound)})}t(e,t){return this.runFunction(e.args,t,this.metadata("T"),e=>e instanceof rq||"string"==typeof e?e:"")}n(e,t){return this.runFunction(e.args,t,this.metadata("N"),e=>{var t;let r=e instanceof tF?null==(t=e.data[0])?void 0:t[0]:e;return r instanceof rq||"number"==typeof r?r:"boolean"==typeof r?+!!r:0})}upper(e,t){return this.runFunction(e.args,t,this.metadata("UPPER"),e=>e.toUpperCase())}value(e,t){return this.runFunction(e.args,t,this.metadata("VALUE"),e=>{if(e instanceof rq||tD(e))return e;if("string"!=typeof e)return new rq(d.VALUE,eY.NumberCoercion);let t=e.trim(),r=/^\(([^()]+)\)$/.exec(t);if(r){let e=this.parseStringToNumber(r[1]);if(void 0!==e)return-e}let i=this.parseStringToNumber(t);return void 0!==i?i:new rq(d.VALUE,eY.NumberCoercion)})}textjoin(e,t){return this.runFunction(e.args,t,this.metadata("TEXTJOIN"),(e,t,...r)=>{let i=this.flattenArgToStrings(e);if(i instanceof rq)return i;let n=[];for(let e of r){let t=this.flattenArgToStrings(e);if(t instanceof rq)return t;n.push(...t)}let o=t?n.filter(e=>""!==e):n;if(0===o.length)return"";let s=o.reduce((e,t,r)=>0===r?t:e+i[(r-1)%i.length]+t,"");return s.length>32767?new rq(d.VALUE,eY.ResultTooLong):s})}flattenArgToStrings(e){let t=e instanceof tF?e.valuesFromTopLeftCorner():[e],r=[];for(let e of t){if(e instanceof rq)return e;let t=iu(e);if(t instanceof rq)return t;r.push(t)}return r}parseStringToNumber(e){let t=e.trim();if(""!==t)return this.arithmeticHelper.coerceToMaybeNumber(t)}escapeRegExpSpecialCharacters(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}}sI.implementedFunctions={CONCATENATE:{method:"concatenate",parameters:[{argumentType:p.STRING}],repeatLastArgs:1,expandRanges:!0},EXACT:{method:"exact",parameters:[{argumentType:p.STRING},{argumentType:p.STRING}]},SPLIT:{method:"split",parameters:[{argumentType:p.STRING},{argumentType:p.NUMBER}]},LEN:{method:"len",parameters:[{argumentType:p.STRING}]},LOWER:{method:"lower",parameters:[{argumentType:p.STRING}]},MID:{method:"mid",parameters:[{argumentType:p.STRING},{argumentType:p.NUMBER},{argumentType:p.NUMBER}]},TRIM:{method:"trim",parameters:[{argumentType:p.STRING}]},T:{method:"t",parameters:[{argumentType:p.SCALAR}]},N:{method:"n",parameters:[{argumentType:p.ANY}]},PROPER:{method:"proper",parameters:[{argumentType:p.STRING}]},CLEAN:{method:"clean",parameters:[{argumentType:p.STRING}]},REPT:{method:"rept",parameters:[{argumentType:p.STRING},{argumentType:p.NUMBER}]},RIGHT:{method:"right",parameters:[{argumentType:p.STRING},{argumentType:p.NUMBER,defaultValue:1}]},LEFT:{method:"left",parameters:[{argumentType:p.STRING},{argumentType:p.NUMBER,defaultValue:1}]},REPLACE:{method:"replace",parameters:[{argumentType:p.STRING},{argumentType:p.NUMBER},{argumentType:p.NUMBER},{argumentType:p.STRING}]},SEARCH:{method:"search",parameters:[{argumentType:p.STRING},{argumentType:p.STRING},{argumentType:p.NUMBER,defaultValue:1}]},SUBSTITUTE:{method:"substitute",parameters:[{argumentType:p.STRING},{argumentType:p.STRING},{argumentType:p.STRING},{argumentType:p.NUMBER,optionalArg:!0}]},FIND:{method:"find",parameters:[{argumentType:p.STRING},{argumentType:p.STRING},{argumentType:p.NUMBER,defaultValue:1}]},UPPER:{method:"upper",parameters:[{argumentType:p.STRING}]},VALUE:{method:"value",parameters:[{argumentType:p.SCALAR}]},TEXTJOIN:{method:"textjoin",repeatLastArgs:1,parameters:[{argumentType:p.ANY},{argumentType:p.BOOLEAN},{argumentType:p.ANY}]}};class sN extends iE{acos(e,t){return this.runFunction(e.args,t,this.metadata("ACOS"),Math.acos)}asin(e,t){return this.runFunction(e.args,t,this.metadata("ASIN"),Math.asin)}cos(e,t){return this.runFunction(e.args,t,this.metadata("COS"),Math.cos)}sin(e,t){return this.runFunction(e.args,t,this.metadata("SIN"),Math.sin)}tan(e,t){return this.runFunction(e.args,t,this.metadata("TAN"),Math.tan)}atan(e,t){return this.runFunction(e.args,t,this.metadata("ATAN"),Math.atan)}atan2(e,t){return this.runFunction(e.args,t,this.metadata("ATAN2"),(e,t)=>0===e&&0===t?new rq(d.DIV_BY_ZERO):Math.atan2(t,e))}cot(e,t){return this.runFunction(e.args,t,this.metadata("COT"),e=>0===e?new rq(d.DIV_BY_ZERO):1/Math.tan(e))}acot(e,t){return this.runFunction(e.args,t,this.metadata("ACOT"),e=>0===e?o0/2:Math.atan(1/e))}sec(e,t){return this.runFunction(e.args,t,this.metadata("SEC"),e=>1/Math.cos(e))}csc(e,t){return this.runFunction(e.args,t,this.metadata("CSC"),e=>0===e?new rq(d.DIV_BY_ZERO):1/Math.sin(e))}sinh(e,t){return this.runFunction(e.args,t,this.metadata("SINH"),Math.sinh)}asinh(e,t){return this.runFunction(e.args,t,this.metadata("ASINH"),Math.asinh)}cosh(e,t){return this.runFunction(e.args,t,this.metadata("COSH"),Math.cosh)}acosh(e,t){return this.runFunction(e.args,t,this.metadata("ACOSH"),Math.acosh)}tanh(e,t){return this.runFunction(e.args,t,this.metadata("TANH"),Math.tanh)}atanh(e,t){return this.runFunction(e.args,t,this.metadata("ATANH"),Math.atanh)}coth(e,t){return this.runFunction(e.args,t,this.metadata("COTH"),e=>0===e?new rq(d.DIV_BY_ZERO):1/Math.tanh(e))}acoth(e,t){return this.runFunction(e.args,t,this.metadata("ACOTH"),e=>0===e?new rq(d.NUM,eY.NonZero):Math.atanh(1/e))}sech(e,t){return this.runFunction(e.args,t,this.metadata("SECH"),e=>1/Math.cosh(e))}csch(e,t){return this.runFunction(e.args,t,this.metadata("CSCH"),e=>0===e?new rq(d.DIV_BY_ZERO):1/Math.sinh(e))}}sN.implementedFunctions={ACOS:{method:"acos",parameters:[{argumentType:p.NUMBER}]},ASIN:{method:"asin",parameters:[{argumentType:p.NUMBER}]},COS:{method:"cos",parameters:[{argumentType:p.NUMBER}]},SIN:{method:"sin",parameters:[{argumentType:p.NUMBER}]},TAN:{method:"tan",parameters:[{argumentType:p.NUMBER}]},ATAN:{method:"atan",parameters:[{argumentType:p.NUMBER}]},ATAN2:{method:"atan2",parameters:[{argumentType:p.NUMBER},{argumentType:p.NUMBER}]},COT:{method:"cot",parameters:[{argumentType:p.NUMBER}]},SEC:{method:"sec",parameters:[{argumentType:p.NUMBER}]},CSC:{method:"csc",parameters:[{argumentType:p.NUMBER}]},SINH:{method:"sinh",parameters:[{argumentType:p.NUMBER}]},COSH:{method:"cosh",parameters:[{argumentType:p.NUMBER}]},TANH:{method:"tanh",parameters:[{argumentType:p.NUMBER}]},COTH:{method:"coth",parameters:[{argumentType:p.NUMBER}]},SECH:{method:"sech",parameters:[{argumentType:p.NUMBER}]},CSCH:{method:"csch",parameters:[{argumentType:p.NUMBER}]},ACOT:{method:"acot",parameters:[{argumentType:p.NUMBER}]},ASINH:{method:"asinh",parameters:[{argumentType:p.NUMBER}]},ACOSH:{method:"acosh",parameters:[{argumentType:p.NUMBER}]},ATANH:{method:"atanh",parameters:[{argumentType:p.NUMBER}]},ACOTH:{method:"acoth",parameters:[{argumentType:p.NUMBER}]}};class sO extends oo{constructor(e){super(e),this.dependencyGraph=e}find(e,t,r){return this.basicFind(e,t,"col",r)}}class sk extends iE{constructor(){super(...arguments),this.rowSearch=new sO(this.dependencyGraph)}vlookup(e,t){return this.runFunction(e.args,t,this.metadata("VLOOKUP"),(e,t,r,i)=>{let n=t.range;return void 0===n?new rq(d.VALUE,eY.WrongType):r<1?new rq(d.VALUE,eY.LessThanOne):r>n.width()?new rq(d.REF,eY.IndexLarge):this.doVlookup(ic(e),t,r-1,{ordering:i?"asc":"none",ifNoMatch:i?"returnLowerBound":"returnNotFound"})})}hlookup(e,t){return this.runFunction(e.args,t,this.metadata("HLOOKUP"),(e,t,r,i)=>{let n=t.range;return void 0===n?new rq(d.VALUE,eY.WrongType):r<1?new rq(d.VALUE,eY.LessThanOne):r>n.height()?new rq(d.REF,eY.IndexLarge):this.doHlookup(ic(e),t,r-1,{ordering:i?"asc":"none",ifNoMatch:i?"returnLowerBound":"returnNotFound"})})}xlookup(e,t){return this.runFunction(e.args,t,this.metadata("XLOOKUP"),(e,t,r,i,n,o)=>{if(![0,-1,1,2].includes(n)||![1,-1,2,-2].includes(o))return new rq(d.VALUE,eY.BadMode);let s=t instanceof tF?t:tF.fromScalar(t),l=r instanceof tF?r:tF.fromScalar(r);return this.doXlookup(ic(e),s,l,i,2===n,{ordering:2===o?"asc":-2===o?"desc":"none",returnOccurrence:-1===o?"last":"first",ifNoMatch:-1===n?"returnLowerBound":1===n?"returnUpperBound":"returnNotFound"})})}xlookupArraySize(e){var t,r;let i=null==(t=null==e?void 0:e.args)?void 0:t[1],n=null==(r=null==e?void 0:e.args)?void 0:r[2];if((null==i?void 0:i.start)==null||(null==i?void 0:i.end)==null||(null==n?void 0:n.start)==null||(null==n?void 0:n.end)==null)return iT.error();let o=i.end.row-i.start.row+1,s=i.end.col-i.start.col+1,l=n.end.row-n.start.row+1,a=n.end.col-n.start.col+1,h=1===s&&l===o,d=1===o&&a===s;return h||d?h?new iT(a,1):new iT(1,l):iT.error()}match(e,t){return this.runFunction(e.args,t,this.metadata("MATCH"),(e,t,r)=>this.doMatch(ic(e),t,r))}searchInRange(e,t,r,i,n){return r&&"string"==typeof e&&this.arithmeticHelper.requiresRegex(e)?n.advancedFind(this.arithmeticHelper.eqMatcherFunction(e),t,{returnOccurrence:i.returnOccurrence}):n.find(e,t,i)}doVlookup(e,t,r,i){let n,o;this.dependencyGraph.stats.start(l.VLOOKUP);let s=t.range;n=void 0===s?tF.onlyValues(t.data.map(e=>[e[0]])):tF.onlyRange(r7.spanFrom(s.start,1,s.height()),this.dependencyGraph);let a=this.searchInRange(e,n,"none"===i.ordering,i,this.columnSearch);if(this.dependencyGraph.stats.end(l.VLOOKUP),-1===a)return new rq(d.NA,eY.ValueNotFound);if(void 0===s)o=t.data[a][r];else{let e=r0(s.sheet,s.start.col+r,s.start.row+a);o=this.dependencyGraph.getCellValue(e)}return o instanceof tF?new rq(d.VALUE,eY.WrongType):o}doHlookup(e,t,r,i){let n,o,s=t.range;n=void 0===s?tF.onlyValues([t.data[0]]):tF.onlyRange(r7.spanFrom(s.start,s.width(),1),this.dependencyGraph);let l=this.searchInRange(e,n,"none"===i.ordering,i,this.rowSearch);if(-1===l)return new rq(d.NA,eY.ValueNotFound);if(void 0===s)o=t.data[r][l];else{let e=r0(s.sheet,s.start.col+l,s.start.row+r);o=this.dependencyGraph.getCellValue(e)}return o instanceof tF?new rq(d.VALUE,eY.WrongType):o}doXlookup(e,t,r,i,n,o){let s=1===t.width()&&r.height()===t.height(),l=1===t.height()&&r.width()===t.width();if(!s&&!l)return new rq(d.VALUE,eY.WrongDimension);let a=s?this.columnSearch:this.rowSearch,h=this.searchInRange(e,t,n,o,a);if(-1===h)return i==d.NA?new rq(d.NA,eY.ValueNotFound):i;let u=s?[r.data[h]]:r.data.map(e=>[e[h]]);return tF.onlyValues(u)}doMatch(e,t,r){if(![-1,0,1].includes(r))return new rq(d.VALUE,eY.BadMode);if(t.width()>1&&t.height()>1)return new rq(d.NA);let i=(1===t.width()?this.columnSearch:this.rowSearch).find(e,t,0===r?{ordering:"none",ifNoMatch:"returnNotFound"}:{ordering:-1===r?"desc":"asc",ifNoMatch:-1===r?"returnUpperBound":"returnLowerBound"});return -1===i?new rq(d.NA,eY.ValueNotFound):i+1}}sk.implementedFunctions={VLOOKUP:{method:"vlookup",parameters:[{argumentType:p.NOERROR},{argumentType:p.RANGE},{argumentType:p.NUMBER},{argumentType:p.BOOLEAN,defaultValue:!0}]},HLOOKUP:{method:"hlookup",parameters:[{argumentType:p.NOERROR},{argumentType:p.RANGE},{argumentType:p.NUMBER},{argumentType:p.BOOLEAN,defaultValue:!0}]},XLOOKUP:{method:"xlookup",sizeOfResultArrayMethod:"xlookupArraySize",parameters:[{argumentType:p.NOERROR},{argumentType:p.RANGE},{argumentType:p.RANGE},{argumentType:p.SCALAR,optionalArg:!0,defaultValue:d.NA},{argumentType:p.NUMBER,optionalArg:!0,defaultValue:0},{argumentType:p.NUMBER,optionalArg:!0,defaultValue:1}]},MATCH:{method:"match",parameters:[{argumentType:p.NOERROR},{argumentType:p.RANGE},{argumentType:p.NUMBER,defaultValue:1}]}};class sH extends iE{roman(e,t){return this.runFunction(e.args,t,this.metadata("ROMAN"),(e,t)=>{var r,i;let n;return(e=Math.trunc(e),!1===t?t=4:!0===t&&(t=0),(t=tM(this.coerceScalarToNumberOrError(t)))instanceof rq)?t:(t=Math.trunc(t))<0?new rq(d.VALUE,eY.ValueSmall):t>4?new rq(d.VALUE,eY.ValueLarge):(r=e,i=t,n={val:r%1e3,acc:"M".repeat(Math.floor(r/1e3))},4===i&&(sP(n,"IM",999,1e3),sP(n,"ID",499,500)),i>=3&&(sP(n,"VM",995,1e3),sP(n,"VD",495,500)),i>=2&&(sP(n,"XM",990,1e3),sP(n,"XD",490,500)),i>=1&&(sP(n,"LM",950,1e3),sP(n,"LD",450,500)),sP(n,"CM",900,1e3),sP(n,"CD",400,500),sP(n,"D",500,900),n.acc+="C".repeat(Math.floor(n.val/100)),n.val%=100,i>=2&&(sP(n,"IC",99,100),sP(n,"IL",49,50)),i>=1&&(sP(n,"VC",95,100),sP(n,"VL",45,50)),sP(n,"XC",90,100),sP(n,"XL",40,50),sP(n,"L",50,90),n.acc+="X".repeat(Math.floor(n.val/10)),n.val%=10,sP(n,"IX",9,10),sP(n,"IV",4,5),sP(n,"V",5,9),n.acc+="I".repeat(n.val),n.acc)})}arabic(e,t){return this.runFunction(e.args,t,this.metadata("ARABIC"),e=>{e=e.trim().toUpperCase();let t=!1;if(e.startsWith("-")&&(e=e.slice(1),t=!0,""===e))return new rq(d.VALUE,eY.InvalidRoman);let r={input:e,acc:0};return(s_(r,{token:"MMM",val:3e3},{token:"MM",val:2e3},{token:"M",val:1e3}),s_(r,{token:"IM",val:999},{token:"VM",val:995},{token:"XM",val:990},{token:"LM",val:950},{token:"CM",val:900}),s_(r,{token:"D",val:500},{token:"ID",val:499},{token:"VD",val:495},{token:"XD",val:490},{token:"LD",val:450},{token:"CD",val:400}),s_(r,{token:"CCC",val:300},{token:"CC",val:200},{token:"C",val:100}),s_(r,{token:"IC",val:99},{token:"VC",val:95},{token:"XC",val:90}),s_(r,{token:"L",val:50},{token:"IL",val:49},{token:"VL",val:45},{token:"XL",val:40}),s_(r,{token:"XXX",val:30},{token:"XX",val:20},{token:"X",val:10}),s_(r,{token:"IX",val:9}),s_(r,{token:"V",val:5},{token:"IV",val:4}),s_(r,{token:"III",val:3},{token:"II",val:2},{token:"I",val:1}),""!==r.input)?new rq(d.VALUE,eY.InvalidRoman):t?-r.acc:r.acc})}}function s_(e,...t){for(let r of t)if(e.input.startsWith(r.token)){e.input=e.input.slice(r.token.length),e.acc+=r.val;break}}function sP(e,t,r,i){e.val>=r&&e.val<i&&(e.val-=r,e.acc+=t)}sH.implementedFunctions={ROMAN:{method:"roman",parameters:[{argumentType:p.NUMBER,minValue:1,lessThan:4e3},{argumentType:p.NOERROR,optionalArg:!0,defaultValue:0}]},ARABIC:{method:"arabic",parameters:[{argumentType:p.STRING}]}};class sD extends iE{add(e,t){return this.runFunction(e.args,t,this.metadata("HF.ADD"),this.arithmeticHelper.addWithEpsilon)}concat(e,t){return this.runFunction(e.args,t,this.metadata("HF.CONCAT"),this.arithmeticHelper.concat)}divide(e,t){return this.runFunction(e.args,t,this.metadata("HF.DIVIDE"),this.arithmeticHelper.divide)}eq(e,t){return this.runFunction(e.args,t,this.metadata("HF.EQ"),this.arithmeticHelper.eq)}gt(e,t){return this.runFunction(e.args,t,this.metadata("HF.GT"),this.arithmeticHelper.gt)}gte(e,t){return this.runFunction(e.args,t,this.metadata("HF.GTE"),this.arithmeticHelper.geq)}lt(e,t){return this.runFunction(e.args,t,this.metadata("HF.LT"),this.arithmeticHelper.lt)}lte(e,t){return this.runFunction(e.args,t,this.metadata("HF.LTE"),this.arithmeticHelper.leq)}minus(e,t){return this.runFunction(e.args,t,this.metadata("HF.MINUS"),this.arithmeticHelper.subtract)}multiply(e,t){return this.runFunction(e.args,t,this.metadata("HF.MULTIPLY"),this.arithmeticHelper.multiply)}ne(e,t){return this.runFunction(e.args,t,this.metadata("HF.NE"),this.arithmeticHelper.neq)}pow(e,t){return this.runFunction(e.args,t,this.metadata("HF.POW"),this.arithmeticHelper.pow)}uminus(e,t){return this.runFunction(e.args,t,this.metadata("HF.UMINUS"),this.arithmeticHelper.unaryMinus)}upercent(e,t){return this.runFunction(e.args,t,this.metadata("HF.UNARY_PERCENT"),this.arithmeticHelper.unaryPercent)}uplus(e,t){return this.runFunction(e.args,t,this.metadata("HF.UPLUS"),this.arithmeticHelper.unaryPlus)}}sD.implementedFunctions={"HF.ADD":{method:"add",parameters:[{argumentType:p.NUMBER,passSubtype:!0},{argumentType:p.NUMBER,passSubtype:!0}]},"HF.CONCAT":{method:"concat",parameters:[{argumentType:p.STRING,passSubtype:!0},{argumentType:p.STRING,passSubtype:!0}]},"HF.DIVIDE":{method:"divide",parameters:[{argumentType:p.NUMBER,passSubtype:!0},{argumentType:p.NUMBER,passSubtype:!0}]},"HF.EQ":{method:"eq",parameters:[{argumentType:p.NOERROR,passSubtype:!0},{argumentType:p.NOERROR,passSubtype:!0}]},"HF.GT":{method:"gt",parameters:[{argumentType:p.NOERROR,passSubtype:!0},{argumentType:p.NOERROR,passSubtype:!0}]},"HF.GTE":{method:"gte",parameters:[{argumentType:p.NOERROR,passSubtype:!0},{argumentType:p.NOERROR,passSubtype:!0}]},"HF.LT":{method:"lt",parameters:[{argumentType:p.NOERROR,passSubtype:!0},{argumentType:p.NOERROR,passSubtype:!0}]},"HF.LTE":{method:"lte",parameters:[{argumentType:p.NOERROR,passSubtype:!0},{argumentType:p.NOERROR,passSubtype:!0}]},"HF.MINUS":{method:"minus",parameters:[{argumentType:p.NUMBER,passSubtype:!0},{argumentType:p.NUMBER,passSubtype:!0}]},"HF.MULTIPLY":{method:"multiply",parameters:[{argumentType:p.NUMBER,passSubtype:!0},{argumentType:p.NUMBER,passSubtype:!0}]},"HF.NE":{method:"ne",parameters:[{argumentType:p.NOERROR,passSubtype:!0},{argumentType:p.NOERROR,passSubtype:!0}]},"HF.POW":{method:"pow",parameters:[{argumentType:p.NUMBER,passSubtype:!0},{argumentType:p.NUMBER,passSubtype:!0}]},"HF.UMINUS":{method:"uminus",parameters:[{argumentType:p.NUMBER,passSubtype:!0}]},"HF.UNARY_PERCENT":{method:"upercent",parameters:[{argumentType:p.NUMBER,passSubtype:!0}]},"HF.UPLUS":{method:"uplus",parameters:[{argumentType:p.NUMBER,passSubtype:!0}]}};var sL=Math;function sF(e,t){for(var r=0,i=0;r<e.length;++r)i=t*i+e[r];return i}function sB(e,t,r,i,n){if(0===t)return r;if(1===t)return i;for(var o=2/e,s=i,l=1;l<t;++l)s=i*l*o+n*r,r=i,i=s;return s}function sV(e,t,r,i,n){return function(r,o){if(i){if(0===r)return 1==i?-1/0:1/0;else if(r<0)return NaN}if(0===o)return e(r);if(1===o)return t(r);if(o<0)return NaN;o|=0;var s=e(r),l=t(r);return sB(r,o,s,l,n)}}var sz=function(){var e=[0xd6759744e,-0x31c78f292,651619640.7,-11214424.18,77392.33017,-184.9052456].reverse(),t=[0xd675973ab,0x3d5d6d39,9494680.718,59272.64853,267.8532712,1].reverse(),r=[1,-.001098628627,2734510407e-14,-2073370639e-15,2093887211e-16].reverse(),i=[-.01562499995,1430488765e-13,-6911147651e-15,7621095161e-16,-934935152e-16].reverse();function n(n){var o=0,s=0,l=0,a=n*n;if(n<8)o=(s=sF(e,a))/(l=sF(t,a));else{var h=n-.785398164;s=sF(r,a=64/a),l=sF(i,a),o=sL.sqrt(.636619772/n)*(sL.cos(h)*s-sL.sin(h)*l*8/n)}return o}var o=[0x10d925ddd8,-0x1d6950b23,242396853.1,-2972611.439,15704.4826,-30.16036606].reverse(),s=[0x21b24bbb9a,0x891f618a,18583304.74,99447.43394,376.9991397,1].reverse(),l=[1,.00183105,-3516396496e-14,2457520174e-15,-240337019e-15].reverse(),a=[.04687499995,-2002690873e-13,8449199096e-15,-88228987e-14,105787412e-15].reverse();function h(e){var t=0,r=0,i=0,n=e*e,h=sL.abs(e)-2.356194491;return 8>Math.abs(e)?t=(r=e*sF(o,n))/(i=sF(s,n)):(r=sF(l,n=64/n),i=sF(a,n),t=sL.sqrt(.636619772/sL.abs(e))*(sL.cos(h)*r-sL.sin(h)*i*8/sL.abs(e)),e<0&&(t=-t)),t}return function e(t,r){if(r=Math.round(r),!isFinite(t))return isNaN(t)?t:0;if(r<0)return(r%2?-1:1)*e(t,-r);if(t<0)return(r%2?-1:1)*e(-t,r);if(0===r)return n(t);if(1===r)return h(t);if(0===t)return 0;var i=0;if(t>r)i=sB(t,r,n(t),h(t),-1);else{for(var o=2*sL.floor((r+sL.floor(sL.sqrt(40*r)))/2),s=!1,l=0,a=0,d=1,u=0,c=2/t,g=o;g>0;g--)u=g*c*d-l,l=d,d=u,sL.abs(d)>1e10&&(d*=1e-10,l*=1e-10,i*=1e-10,a*=1e-10),s&&(a+=d),s=!s,g==r&&(i=l);i/=a=2*a-d}return i}}(),sU=(U=[-0xb04cc5cd,0x1a4fa4b91,-512359803.6,10879881.29,-86327.92757,228.4622733].reverse(),W=[0x954bf890d,745249964.8,7189466.438,47447.2647,226.1030244,1].reverse(),$=[1,-.001098628627,2734510407e-14,-2073370639e-15,2093887211e-16].reverse(),G=[-.01562499995,1430488765e-13,-6911147651e-15,7621095161e-16,-934945152e-16].reverse(),j=[-4900604943e3,127527439e4,-0xbffb0414e,734926455.1,-4237922.726,8511.937935].reverse(),Y=[249958057e5,0x62d2b66f40,0xde8afbbf,22459040.02,102042.605,354.9632885,1].reverse(),K=[1,.00183105,-3516396496e-14,2457520174e-15,-240337019e-15].reverse(),q=[.04687499995,-2002690873e-13,8449199096e-15,-88228987e-14,105787412e-15].reverse(),sV(function(e){var t=0,r=0,i=0,n=e*e,o=e-.785398164;return e<8?t=(r=sF(U,n))/(i=sF(W,n))+.636619772*sz(e,0)*sL.log(e):(r=sF($,n=64/n),i=sF(G,n),t=sL.sqrt(.636619772/e)*(sL.sin(o)*r+sL.cos(o)*i*8/e)),t},function(e){var t=0,r=0,i=0,n=e*e,o=e-2.356194491;return e<8?t=(r=e*sF(j,n))/(i=sF(Y,n))+.636619772*(sz(e,1)*sL.log(e)-1/e):(r=sF(K,n=64/n),i=sF(q,n),t=sL.sqrt(.636619772/e)*(sL.sin(o)*r+sL.cos(o)*i*8/e)),t},"BESSELY",1,-1)),sW=(X=[1,3.5156229,3.0899424,1.2067492,.2659732,.0360768,.0045813].reverse(),Q=[.39894228,.01328592,.00225319,-.00157565,.00916281,-.02057706,.02635537,-.01647633,.00392377].reverse(),Z=[.5,.87890594,.51498869,.15084934,.02658733,.00301532,32411e-8].reverse(),J=[.39894228,-.03988024,-.00362018,.00163801,-.01031555,.02282967,-.02895312,.01787654,-.00420059].reverse(),function e(t,r){if(0===(r=Math.round(r)))return t<=3.75?sF(X,t*t/14.0625):sL.exp(sL.abs(t))/sL.sqrt(sL.abs(t))*sF(Q,3.75/sL.abs(t));if(1===r)return t<3.75?t*sF(Z,t*t/14.0625):(t<0?-1:1)*sL.exp(sL.abs(t))/sL.sqrt(sL.abs(t))*sF(J,3.75/sL.abs(t));if(r<0)return NaN;if(0===sL.abs(t))return 0;if(t==1/0)return 1/0;var i,n=0,o=2/sL.abs(t),s=0,l=1,a=0;for(i=2*sL.round((r+sL.round(sL.sqrt(40*r)))/2);i>0;i--)a=i*o*l+s,s=l,l=a,sL.abs(l)>1e10&&(l*=1e-10,s*=1e-10,n*=1e-10),i==r&&(n=s);return n*=e(t,0)/l,t<0&&r%2?-n:n}),s$=(ee=[-.57721566,.4227842,.23069756,.0348859,.00262698,1075e-7,74e-7].reverse(),et=[1.25331414,-.07832358,.02189568,-.01062446,.00587872,-.0025154,53208e-8].reverse(),er=[1,.15443144,-.67278579,-.18156897,-.01919402,-.00110404,-4686e-8].reverse(),ei=[1.25331414,.23498619,-.0365562,.01504268,-.00780353,.00325614,-68245e-8].reverse(),sV(function(e){return e<=2?-sL.log(e/2)*sW(e,0)+sF(ee,e*e/4):sL.exp(-e)/sL.sqrt(e)*sF(et,2/e)},function(e){return e<=2?sL.log(e/2)*sW(e,1)+1/e*sF(er,e*e/4):sL.exp(-e)/sL.sqrt(e)*sF(ei,2/e)},"BESSELK",2,1));function sG(e){let t,r,i,n,o=[-1.3026537197817094,.6419697923564902,.019476473204185836,-.00956151478680863,-946595344482036e-18,366839497852761e-18,42523324806907e-18,-20278578112534e-18,-1624290004647e-18,130365583558e-17,15626441722e-18,-85238095915e-18,6529054439e-18,5059343495e-18,-991364156e-18,-227365122e-18,96467911e-18,2394038e-18,-6886027e-18,894487e-18,313092e-18,-112708e-18,381e-18,7106e-18,-1523e-18,-94e-18,121e-18,-28e-18],s=o.length-1,l=!1,a=0,h=0;if(0===e)return 0;for(e<0&&(e=-e,l=!0),r=4*(t=2/(2+e))-2;s>0;s--)i=a,a=r*a-h+o[s],h=i;return n=t*Math.exp(-e*e+.5*(o[0]+r*a)-h),l?n-1:1-n}function sj(e){return 1-sG(e)}function sY(e){let t,r,i,n,o=0;if(e>=2)return -100;if(e<=0)return 100;for(t=-.70711*((2.30753+.27061*(i=Math.sqrt(-2*Math.log((n=e<1?e:2-e)/2))))/(1+i*(.99229+.04481*i))-i);o<2;o++)r=sj(t)-n,t+=r/(1.1283791670955126*Math.exp(-t*t)-t*r);return e<1?t:-t}function sK(e){let t,r,i,n,o=[-1.716185138865495,24.76565080557592,-379.80425647094563,629.3311553128184,866.9662027904133,-31451.272968848367,-36144.413418691176,66456.14382024054],s=[-30.8402300119739,315.35062697960416,-1015.1563674902192,-3107.771671572311,22538.11842098015,4755.846277527881,-134659.9598649693,-115132.2596755535],l=!1,a=0,h=0,d=0,u=e;if(e>171.6243769536076)return 1/0;if(u<=0){if(!(n=u%1))return 1/0;l=(1&u?-1:1)*Math.PI/Math.sin(Math.PI*n),u=1-u}for(t=0,i=u,r=u<1?u++:(u-=a=(0|u)-1)-1;t<8;++t)d=(d+o[t])*r,h=h*r+s[t];if(n=d/h+1,i<u)n/=i;else if(i>u)for(t=0;t<a;++t)n*=u,u++;return l&&(n=l/n),n}let sq=function(e,t,r){return sZ(e,t)*r};function sX(e){let t,r,i=0,n=[76.18009172947146,-86.50532032941678,24.01409824083091,-1.231739572450155,.001208650973866179,-5395239384953e-18],o=1.000000000190015;for(r=(t=e)+5.5,r-=(e+.5)*Math.log(r);i<6;i++)o+=n[i]/++t;return Math.log(2.5066282746310007*o/e)-r}function sQ(e,t){let r,i=sX(e),n=e,o=1/e,s=o,l=t+1-e,a=1/1e-30,h=1/l,d=h,u=1,c=-~(8.5*Math.log(e>=1?e:1/e)+.4*e+17);if(t<0||e<=0)return NaN;if(t<e+1){for(;u<=c;u++)o+=s*=t/++n;return o*Math.exp(-t+e*Math.log(t)-i)}for(;u<=c;u++)l+=2,d*=(h=1/(h=(r=-u*(u-e))*h+l))*(a=l+r/a);return 1-d*Math.exp(-t+e*Math.log(t)-i)}function sZ(e,t){let r,i,n,o,s,l=0,a=t-1,h=sX(t);if(e>=1)return Math.max(100,t+100*Math.sqrt(t));if(e<=0)return 0;for(t>1?(o=Math.log(a),s=Math.exp(a*(o-1)-h),r=(2.30753+.27061*(i=Math.sqrt(-2*Math.log(e<.5?e:1-e))))/(1+i*(.99229+.04481*i))-i,e<.5&&(r=-r),r=Math.max(.001,t*Math.pow(1-1/(9*t)-r/(3*Math.sqrt(t)),3))):r=e<(i=1-t*(.253+.12*t))?Math.pow(e/i,1/t):1-Math.log(1-(e-i)/(1-i));l<12;l++){if(r<=0)return 0;if(n=(sQ(t,r)-e)/(i=t>1?s*Math.exp(-(r-a)+a*(Math.log(r)-o)):Math.exp(-r+a*Math.log(r)-h)),(r-=i=n/(1-.5*Math.min(1,n*((t-1)/r-1))))<=0&&(r=.5*(r+i)),Math.abs(i)<1e-8*r)break}return r}let sJ=function(e,t,r){return Math.exp(-.5*Math.log(2*Math.PI)-Math.log(r)-Math.pow(e-t,2)/(2*r*r))},s0=function(e,t,r){return .5*(1+sG((e-t)/Math.sqrt(2*r*r)))},s1=function(e,t,r){return -1.4142135623730951*r*sY(2*e)+t};function s2(e,t){if(!(e<=0)&&!(t<=0))return e+t>170?Math.exp(s3(e,t)):sK(e)*sK(t)/sK(e+t)}function s3(e,t){return sX(e)+sX(t)-sX(e+t)}function s6(e,t,r){var i,n,o,s,l,a,h,d,u,c=t-1,g=r-1,p=0;if(e<=0)return 0;if(e>=1)return 1;for(t>=1&&r>=1?(l=(2.30753+.27061*(o=Math.sqrt(-2*Math.log(e<.5?e:1-e))))/(1+o*(.99229+.04481*o))-o,e<.5&&(l=-l),a=(l*l-3)/6,d=l*Math.sqrt(a+(h=2/(1/(2*t-1)+1/(2*r-1))))/h-(1/(2*r-1)-1/(2*t-1))*(a+5/6-2/(3*h)),l=t/(t+r*Math.exp(2*d))):(i=Math.log(t/(t+r)),n=Math.log(r/(t+r)),d=(o=Math.exp(t*i)/t)+(s=Math.exp(r*n)/r),l=e<o/d?Math.pow(t*d*e,1/t):1-Math.pow(r*d*(1-e),1/r)),u=-sX(t)-sX(r)+sX(t+r);p<10&&0!==l&&1!==l&&(s=(s5(l,t,r)-e)/(o=Math.exp(c*Math.log(l)+g*Math.log(1-l)+u)),(l-=o=s/(1-.5*Math.min(1,s*(c/l-g/(1-l)))))<=0&&(l=.5*(l+o)),l>=1&&(l=.5*(l+o+1)),!(Math.abs(o)<1e-8*l)||!(p>0));p++);return l}function s5(e,t,r){var i=0===e||1===e?0:Math.exp(sX(t+r)-sX(t)-sX(r)+t*Math.log(e)+r*Math.log(1-e));return!(e<0)&&!(e>1)&&(e<(t+1)/(t+r+2)?i*s4(e,t,r)/t:1-i*s4(1-e,r,t)/r)}function s4(e,t,r){var i,n,o,s,l=1,a=t+r,h=t+1,d=t-1,u=1,c=1-a*e/h;for(1e-30>Math.abs(c)&&(c=1e-30),s=c=1/c;l<=100&&(i=2*l,1e-30>Math.abs(c=1+(n=l*(r-l)*e/((d+i)*(t+i)))*c)&&(c=1e-30),1e-30>Math.abs(u=1+n/u)&&(u=1e-30),s*=(c=1/c)*u,1e-30>Math.abs(c=1+(n=-(t+l)*(a+l)*e/((t+i)*(h+i)))*c)&&(c=1e-30),1e-30>Math.abs(u=1+n/u)&&(u=1e-30),s*=o=(c=1/c)*u,!(3e-7>Math.abs(o-1)));l++);return s}let s8=function(e,t,r){return 0===r||1===r?+(t*r===e):le(t,e)*Math.pow(r,e)*Math.pow(1-r,t-e)},s9=function(e,t,r){if(e<0)return 0;if(e>=t)return 1;if(r<0||r>1||t<=0)return NaN;var i=(e=Math.floor(e))+1,n=t-e,o=i+n,s=Math.exp(sX(o)-sX(n)-sX(i)+i*Math.log(r)+n*Math.log(1-r));return Math.round(1e10*(1-(r<(i+1)/(o+2)?s*s7(r,i,n,1e-10):1-s*s7(1-r,n,i,1e-10))))/1e10};function s7(e,t,r,i){for(var n,o=0,s=1,l=1,a=1,h=0,d=0;Math.abs((l-d)/l)>i;)d=l,o=l+(n=-(t+h)*(t+r+h)*e/(t+2*h)/(t+2*h+1))*o,s=a+n*s,h+=1,l=o+(n=h*(r-h)*e/(t+2*h-1)/(t+2*h))*l,o/=a=s+n*a,s/=a,l/=a,a=1;return l/t}function le(e,t){var r,i;return e>170||t>170?Math.exp((r=e,i=t,lt(r)-lt(i)-lt(r-i))):lr(e)/lr(t)/lr(e-t)}function lt(e){return e<0?NaN:sX(e+1)}function lr(e){return e<0?NaN:sK(e+1)}let li=function(e,t){return e<0?0:sQ(t/2,e/2)},ln=function(e,t){return 2*sZ(e,.5*t)},lo=function(e,t,r){return e<0?0:s5(t*e/(t*e+r),t/2,r/2)},ls=function(e,t,r){return r/(t*(1/s6(e,t/2,r/2)-1))},ll={pdf:function(e,t){return t<0||e%1!=0||e<0?0:Math.pow(t,e)*Math.exp(-t)/lr(e)},cdf:function(e,t){var r=0;if(e<0)return 0;for(var i=0;r<=e;r++)i+=ll.pdf(r,t);return i}},la={pdf:function(e,t,r,i){if(e<0||e<r-(t-i)||e>i||e>r)return 0;if(2*r>t)if(2*i>t)return la.pdf(t-r-i+e,t,t-r,t-i);else return la.pdf(i-e,t,t-r,i);if(2*i>t)return la.pdf(r-e,t,r,t-i);if(r<i)return la.pdf(e,t,i,r);for(var n=1,o=0,s=0;s<e;s++){for(;n>1&&o<i;)n*=1-r/(t-o),o++;n*=(i-s)*(r-s)/((s+1)*(t-r-i+s+1))}for(;o<i;o++)n*=1-r/(t-o);return Math.min(1,Math.max(0,n))},cdf:function e(t,r,i,n){if(t<0||t<i-(r-n))return 0;if(t>=n||t>=i)return 1;if(2*i>r)if(2*n>r)return e(r-i-n+t,r,r-i,r-n);else return 1-la.cdf(n-t-1,r,r-i,n);if(2*n>r)return 1-la.cdf(i-t-1,r,i,r-n);if(i<n)return la.cdf(t,r,n,i);for(var o=1,s=1,l=0,a=0;a<t;a++){for(;o>1&&l<n;){var h=1-i/(r-l);s*=h,o*=h,l++}s*=(n-a)*(i-a)/((a+1)*(r-i-n+a+1)),o+=s}for(;l<n;l++)o*=1-i/(r-l);return Math.min(1,Math.max(0,o))}},lh=function(e,t){var r=t/2;return s5((e+Math.sqrt(e*e+t))/(2*Math.sqrt(e*e+t)),r,r)},ld=function(e,t){var r=s6(2*Math.min(e,1-e),.5*t,.5);return r=Math.sqrt(t*(1-r)/r),e>.5?r:-r},lu={pdf:function(e,t,r){return e===e>>>0&&(e<0?0:le(e+t-1,t-1)*Math.pow(1-r,e)*Math.pow(r,t))},cdf:function(e,t,r){var i=0,n=0;if(e<0)return 0;for(;n<=e;n++)i+=lu.pdf(n,t,r);return i}};function lc(e){for(var t=0,r=e.length;--r>=0;)t+=e[r];return t}function lg(e){return lc(e)/e.length}function lp(e){for(var t,r=lg(e),i=0,n=e.length;--n>=0;)i+=(t=e[n]-r)*t;return i}function lm(e,t){return lp(e)/(e.length-!!t)}function lf(e,t){return Math.sqrt(lm(e,t))}function lw(e,t){var r,i=lg(e),n=lg(t),o=e.length,s=Array(o);for(r=0;r<o;r++)s[r]=(e[r]-i)*(t[r]-n);return lc(s)/(o-1)}function ly(e,t){return lw(e,t)/lf(e,1)/lf(t,1)}class lb extends iE{erf(e,t){return this.runFunction(e.args,t,this.metadata("ERF"),(e,t)=>void 0===t?sG(e):sG(t)-sG(e))}erfc(e,t){return this.runFunction(e.args,t,this.metadata("ERFC"),sj)}expondist(e,t){return this.runFunction(e.args,t,this.metadata("EXPON.DIST"),(e,t,r)=>{let i,n,o,s;return r?(i=e,n=t,i<0?0:1-Math.exp(-n*i)):(o=e,s=t,o<0?0:s*Math.exp(-s*o))})}fisher(e,t){return this.runFunction(e.args,t,this.metadata("FISHER"),e=>Math.log((1+e)/(1-e))/2)}fisherinv(e,t){return this.runFunction(e.args,t,this.metadata("FISHERINV"),e=>1-2/(Math.exp(2*e)+1))}gamma(e,t){return this.runFunction(e.args,t,this.metadata("GAMMA"),sK)}gammadist(e,t){return this.runFunction(e.args,t,this.metadata("GAMMA.DIST"),(e,t,r,i)=>{var n,o,s,l,a,h;return i?(n=e,o=t,s=r,n<0?0:sQ(o,n/s)):(l=e,a=t,h=r,l<0?0:0===l&&1===a?1/h:Math.exp((a-1)*Math.log(l)-l/h-sX(a)-a*Math.log(h)))})}gammaln(e,t){return this.runFunction(e.args,t,this.metadata("GAMMALN"),sX)}gammainv(e,t){return this.runFunction(e.args,t,this.metadata("GAMMA.INV"),sq)}gauss(e,t){return this.runFunction(e.args,t,this.metadata("GAUSS"),e=>s0(e,0,1)-.5)}betadist(e,t){return this.runFunction(e.args,t,this.metadata("BETA.DIST"),(e,t,r,i,n,o)=>{var s,l,a,h,u,c;return e<=n?new rq(d.NUM,eY.ValueSmall):e>=o?new rq(d.NUM,eY.ValueLarge):(e=(e-n)/(o-n),i)?(s=e,l=t,a=r,s>1||s<0?+(s>1):s5(s,l,a)):(h=e,u=t,c=r,h>1||h<0?0:1==u&&1==c?1:u<512&&c<512?Math.pow(h,u-1)*Math.pow(1-h,c-1)/s2(u,c):Math.exp((u-1)*Math.log(h)+(c-1)*Math.log(1-h)-s3(u,c)))})}betainv(e,t){return this.runFunction(e.args,t,this.metadata("BETA.INV"),(e,t,r,i,n)=>i>=n?new rq(d.NUM,eY.WrongOrder):s6(e,t,r)*(n-i)+i)}binomialdist(e,t){return this.runFunction(e.args,t,this.metadata("BINOM.DIST"),(e,t,r,i)=>e>t?new rq(d.NUM,eY.WrongOrder):(e=Math.trunc(e),t=Math.trunc(t),i)?s9(e,t,r):s8(e,t,r))}binomialinv(e,t){return this.runFunction(e.args,t,this.metadata("BINOM.INV"),(e,t,r)=>{let i=-1,n=e=Math.trunc(e);for(;n>i+1;){let o=Math.trunc((i+n)/2);s9(o,e,t)>=r?n=o:i=o}return n})}besselifn(e,t){return this.runFunction(e.args,t,this.metadata("BESSELI"),(e,t)=>sW(e,Math.trunc(t)))}besseljfn(e,t){return this.runFunction(e.args,t,this.metadata("BESSELJ"),(e,t)=>sz(e,Math.trunc(t)))}besselkfn(e,t){return this.runFunction(e.args,t,this.metadata("BESSELK"),(e,t)=>s$(e,Math.trunc(t)))}besselyfn(e,t){return this.runFunction(e.args,t,this.metadata("BESSELY"),(e,t)=>sU(e,Math.trunc(t)))}chisqdist(e,t){return this.runFunction(e.args,t,this.metadata("CHISQ.DIST"),(e,t,r)=>{var i,n;return(t=Math.trunc(t),r)?li(e,t):(i=e,n=t,i<0?0:0===i&&2===n?.5:Math.exp((n/2-1)*Math.log(i)-i/2-n/2*Math.log(2)-sX(n/2)))})}chisqdistrt(e,t){return this.runFunction(e.args,t,this.metadata("CHISQ.DIST.RT"),(e,t)=>1-li(e,Math.trunc(t)))}chisqinv(e,t){return this.runFunction(e.args,t,this.metadata("CHISQ.INV"),(e,t)=>ln(e,Math.trunc(t)))}chisqinvrt(e,t){return this.runFunction(e.args,t,this.metadata("CHISQ.INV.RT"),(e,t)=>ln(1-e,Math.trunc(t)))}fdist(e,t){return this.runFunction(e.args,t,this.metadata("F.DIST"),(e,t,r,i)=>{var n,o,s;return(t=Math.trunc(t),r=Math.trunc(r),i)?lo(e,t,r):(n=e,o=t,s=r,n<0?0:o<=2?0===n&&o<2?1/0:0===n&&2===o?1:1/s2(o/2,s/2)*Math.pow(o/s,o/2)*Math.pow(n,o/2-1)*Math.pow(1+o/s*n,-(o+s)/2):s/(s+n*o)*o/2*s8((o-2)/2,(o+s-2)/2,o*n/(s+n*o)))})}fdistrt(e,t){return this.runFunction(e.args,t,this.metadata("F.DIST.RT"),(e,t,r)=>1-lo(e,Math.trunc(t),Math.trunc(r)))}finv(e,t){return this.runFunction(e.args,t,this.metadata("F.INV"),(e,t,r)=>ls(e,Math.trunc(t),Math.trunc(r)))}finvrt(e,t){return this.runFunction(e.args,t,this.metadata("F.INV.RT"),(e,t,r)=>ls(1-e,Math.trunc(t),Math.trunc(r)))}weibulldist(e,t){return this.runFunction(e.args,t,this.metadata("WEIBULL.DIST"),(e,t,r,i)=>{var n,o,s,l,a,h;return i?(n=e,o=r,s=t,n<0?0:1-Math.exp(-Math.pow(n/o,s))):(l=e,a=r,h=t,l<0||a<0||h<0?0:h/a*Math.pow(l/a,h-1)*Math.exp(-Math.pow(l/a,h)))})}poissondist(e,t){return this.runFunction(e.args,t,this.metadata("POISSON.DIST"),(e,t,r)=>(e=Math.trunc(e),r)?ll.cdf(e,t):ll.pdf(e,t))}hypgeomdist(e,t){return this.runFunction(e.args,t,this.metadata("HYPGEOM.DIST"),(e,t,r,i,n)=>e>t||e>r||t>i||r>i||e+i<r+t?new rq(d.NUM,eY.ValueLarge):(e=Math.trunc(e),t=Math.trunc(t),r=Math.trunc(r),i=Math.trunc(i),n)?la.cdf(e,i,r,t):la.pdf(e,i,r,t))}tdist(e,t){return this.runFunction(e.args,t,this.metadata("T.DIST"),(e,t,r)=>{var i,n;return(t=Math.trunc(t),r)?lh(e,t):(i=e,1/(Math.sqrt(n=(n=t)>1e100?1e100:n)*s2(.5,n/2))*Math.pow(1+i*i/n,-((n+1)/2)))})}tdist2t(e,t){return this.runFunction(e.args,t,this.metadata("T.DIST.2T"),(e,t)=>(1-lh(e,Math.trunc(t)))*2)}tdistrt(e,t){return this.runFunction(e.args,t,this.metadata("T.DIST.RT"),(e,t)=>1-lh(e,Math.trunc(t)))}tdistold(e,t){return this.runFunction(e.args,t,this.metadata("TDIST"),(e,t,r)=>r*(1-lh(e,Math.trunc(t))))}tinv(e,t){return this.runFunction(e.args,t,this.metadata("T.INV"),(e,t)=>ld(e,Math.trunc(t)))}tinv2t(e,t){return this.runFunction(e.args,t,this.metadata("T.INV.2T"),(e,t)=>ld(1-e/2,Math.trunc(t)))}lognormdist(e,t){return this.runFunction(e.args,t,this.metadata("LOGNORM.DIST"),(e,t,r,i)=>{var n,o,s,l,a,h;return i?(n=e,o=t,s=r,n<0?0:.5+.5*sG((Math.log(n)-o)/Math.sqrt(2*s*s))):(l=e,a=t,h=r,l<=0?0:Math.exp(-Math.log(l)-.5*Math.log(2*Math.PI)-Math.log(h)-Math.pow(Math.log(l)-a,2)/(2*h*h)))})}lognorminv(e,t){return this.runFunction(e.args,t,this.metadata("LOGNORM.INV"),(e,t,r)=>{var i,n;return i=e,n=t,Math.exp(-1.4142135623730951*r*sY(2*i)+n)})}normdist(e,t){return this.runFunction(e.args,t,this.metadata("NORM.DIST"),(e,t,r,i)=>i?s0(e,t,r):sJ(e,t,r))}norminv(e,t){return this.runFunction(e.args,t,this.metadata("NORM.INV"),(e,t,r)=>s1(e,t,r))}normsdist(e,t){return this.runFunction(e.args,t,this.metadata("NORM.S.DIST"),(e,t)=>t?s0(e,0,1):sJ(e,0,1))}normsinv(e,t){return this.runFunction(e.args,t,this.metadata("NORM.S.INV"),e=>s1(e,0,1))}phi(e,t){return this.runFunction(e.args,t,this.metadata("PHI"),e=>sJ(e,0,1))}negbinomdist(e,t){return this.runFunction(e.args,t,this.metadata("NEGBINOM.DIST"),(e,t,r,i)=>(e=Math.trunc(e),t=Math.trunc(t),i)?lu.cdf(e,t,r):lu.pdf(e,t,r))}confidencenorm(e,t){return this.runFunction(e.args,t,this.metadata("CONFIDENCE.NORM"),(e,t,r)=>(function(){var e,t=[].slice.call(arguments),r=[,,];return e=4===t.length?Math.abs(s1(t[1]/2,0,1)*t[2]/Math.sqrt(t[3])):Math.abs(s1(t[1]/2,0,1)*lf(t[2])/Math.sqrt(t[2].length)),r[0]=t[0]-e,r[1]=t[0]+e,r})(1,e,t,Math.trunc(r))[1]-1)}confidencet(e,t){return this.runFunction(e.args,t,this.metadata("CONFIDENCE.T"),(e,t,r)=>1===(r=Math.trunc(r))?new rq(d.DIV_BY_ZERO):function(){var e,t=[].slice.call(arguments),r=[,,];return e=4===t.length?Math.abs(ld(t[1]/2,t[3]-1)*t[2]/Math.sqrt(t[3])):Math.abs(ld(t[1]/2,t[2].length-1)*lf(t[2],!0)/Math.sqrt(t[2].length)),r[0]=t[0]-e,r[1]=t[0]+e,r}(1,e,t,r)[1]-1)}standardize(e,t){return this.runFunction(e.args,t,this.metadata("STANDARDIZE"),(e,t,r)=>(e-t)/r)}}lb.implementedFunctions={ERF:{method:"erf",parameters:[{argumentType:p.NUMBER},{argumentType:p.NUMBER,optionalArg:!0}]},ERFC:{method:"erfc",parameters:[{argumentType:p.NUMBER}]},"EXPON.DIST":{method:"expondist",parameters:[{argumentType:p.NUMBER,minValue:0},{argumentType:p.NUMBER,greaterThan:0},{argumentType:p.BOOLEAN}]},FISHER:{method:"fisher",parameters:[{argumentType:p.NUMBER,greaterThan:-1,lessThan:1}]},FISHERINV:{method:"fisherinv",parameters:[{argumentType:p.NUMBER}]},GAMMA:{method:"gamma",parameters:[{argumentType:p.NUMBER}]},"GAMMA.DIST":{method:"gammadist",parameters:[{argumentType:p.NUMBER,minValue:0},{argumentType:p.NUMBER,greaterThan:0},{argumentType:p.NUMBER,greaterThan:0},{argumentType:p.BOOLEAN}]},GAMMALN:{method:"gammaln",parameters:[{argumentType:p.NUMBER,greaterThan:0}]},"GAMMA.INV":{method:"gammainv",parameters:[{argumentType:p.NUMBER,minValue:0,lessThan:1},{argumentType:p.NUMBER,greaterThan:0},{argumentType:p.NUMBER,greaterThan:0}]},GAUSS:{method:"gauss",parameters:[{argumentType:p.NUMBER}]},"BETA.DIST":{method:"betadist",parameters:[{argumentType:p.NUMBER},{argumentType:p.NUMBER,greaterThan:0},{argumentType:p.NUMBER,greaterThan:0},{argumentType:p.BOOLEAN},{argumentType:p.NUMBER,defaultValue:0},{argumentType:p.NUMBER,defaultValue:1}]},"BETA.INV":{method:"betainv",parameters:[{argumentType:p.NUMBER,greaterThan:0,maxValue:1},{argumentType:p.NUMBER,greaterThan:0},{argumentType:p.NUMBER,greaterThan:0},{argumentType:p.NUMBER,defaultValue:0},{argumentType:p.NUMBER,defaultValue:1}]},"BINOM.DIST":{method:"binomialdist",parameters:[{argumentType:p.NUMBER,minValue:0},{argumentType:p.NUMBER,minValue:0},{argumentType:p.NUMBER,minValue:0,maxValue:1},{argumentType:p.BOOLEAN}]},"BINOM.INV":{method:"binomialinv",parameters:[{argumentType:p.NUMBER,minValue:0},{argumentType:p.NUMBER,minValue:0,maxValue:1},{argumentType:p.NUMBER,greaterThan:0,lessThan:1}]},BESSELI:{method:"besselifn",parameters:[{argumentType:p.NUMBER},{argumentType:p.NUMBER,minValue:0}]},BESSELJ:{method:"besseljfn",parameters:[{argumentType:p.NUMBER},{argumentType:p.NUMBER,minValue:0}]},BESSELK:{method:"besselkfn",parameters:[{argumentType:p.NUMBER},{argumentType:p.NUMBER,minValue:0}]},BESSELY:{method:"besselyfn",parameters:[{argumentType:p.NUMBER},{argumentType:p.NUMBER,minValue:0}]},"CHISQ.DIST":{method:"chisqdist",parameters:[{argumentType:p.NUMBER},{argumentType:p.NUMBER,minValue:1,maxValue:1e10},{argumentType:p.BOOLEAN}]},"CHISQ.DIST.RT":{method:"chisqdistrt",parameters:[{argumentType:p.NUMBER},{argumentType:p.NUMBER,minValue:1,maxValue:1e10}]},"CHISQ.INV":{method:"chisqinv",parameters:[{argumentType:p.NUMBER,minValue:0,maxValue:1},{argumentType:p.NUMBER,minValue:1,maxValue:1e10}]},"CHISQ.INV.RT":{method:"chisqinvrt",parameters:[{argumentType:p.NUMBER,minValue:0,maxValue:1},{argumentType:p.NUMBER,minValue:1}]},"F.DIST":{method:"fdist",parameters:[{argumentType:p.NUMBER,minValue:0},{argumentType:p.NUMBER,minValue:1},{argumentType:p.NUMBER,minValue:1},{argumentType:p.BOOLEAN}]},"F.DIST.RT":{method:"fdistrt",parameters:[{argumentType:p.NUMBER,minValue:0},{argumentType:p.NUMBER,minValue:1},{argumentType:p.NUMBER,minValue:1}]},"F.INV":{method:"finv",parameters:[{argumentType:p.NUMBER,minValue:0,maxValue:1},{argumentType:p.NUMBER,minValue:1},{argumentType:p.NUMBER,minValue:1}]},"F.INV.RT":{method:"finvrt",parameters:[{argumentType:p.NUMBER,minValue:0,maxValue:1},{argumentType:p.NUMBER,minValue:1},{argumentType:p.NUMBER,minValue:1}]},"WEIBULL.DIST":{method:"weibulldist",parameters:[{argumentType:p.NUMBER,minValue:0},{argumentType:p.NUMBER,greaterThan:0},{argumentType:p.NUMBER,greaterThan:0},{argumentType:p.BOOLEAN}]},"POISSON.DIST":{method:"poissondist",parameters:[{argumentType:p.NUMBER,minValue:0},{argumentType:p.NUMBER,minValue:0},{argumentType:p.BOOLEAN}]},"HYPGEOM.DIST":{method:"hypgeomdist",parameters:[{argumentType:p.NUMBER,minValue:0},{argumentType:p.NUMBER,greaterThan:0},{argumentType:p.NUMBER,greaterThan:0},{argumentType:p.NUMBER,greaterThan:0},{argumentType:p.BOOLEAN}]},"T.DIST":{method:"tdist",parameters:[{argumentType:p.NUMBER},{argumentType:p.NUMBER,minValue:1},{argumentType:p.BOOLEAN}]},"T.DIST.2T":{method:"tdist2t",parameters:[{argumentType:p.NUMBER,minValue:0},{argumentType:p.NUMBER,minValue:1}]},"T.DIST.RT":{method:"tdistrt",parameters:[{argumentType:p.NUMBER},{argumentType:p.NUMBER,minValue:1}]},TDIST:{method:"tdistold",parameters:[{argumentType:p.NUMBER,minValue:0},{argumentType:p.NUMBER,minValue:1},{argumentType:p.INTEGER,minValue:1,maxValue:2}]},"T.INV":{method:"tinv",parameters:[{argumentType:p.NUMBER,greaterThan:0,lessThan:1},{argumentType:p.NUMBER,minValue:1}]},"T.INV.2T":{method:"tinv2t",parameters:[{argumentType:p.NUMBER,greaterThan:0,maxValue:1},{argumentType:p.NUMBER,minValue:1}]},"LOGNORM.DIST":{method:"lognormdist",parameters:[{argumentType:p.NUMBER,greaterThan:0},{argumentType:p.NUMBER},{argumentType:p.NUMBER,greaterThan:0},{argumentType:p.BOOLEAN}]},"LOGNORM.INV":{method:"lognorminv",parameters:[{argumentType:p.NUMBER,greaterThan:0,lessThan:1},{argumentType:p.NUMBER},{argumentType:p.NUMBER,greaterThan:0}]},"NORM.DIST":{method:"normdist",parameters:[{argumentType:p.NUMBER},{argumentType:p.NUMBER},{argumentType:p.NUMBER,greaterThan:0},{argumentType:p.BOOLEAN}]},"NORM.INV":{method:"norminv",parameters:[{argumentType:p.NUMBER,greaterThan:0,lessThan:1},{argumentType:p.NUMBER},{argumentType:p.NUMBER,greaterThan:0}]},"NORM.S.DIST":{method:"normsdist",parameters:[{argumentType:p.NUMBER},{argumentType:p.BOOLEAN}]},"NORM.S.INV":{method:"normsinv",parameters:[{argumentType:p.NUMBER,greaterThan:0,lessThan:1}]},PHI:{method:"phi",parameters:[{argumentType:p.NUMBER}]},"NEGBINOM.DIST":{method:"negbinomdist",parameters:[{argumentType:p.NUMBER,minValue:0},{argumentType:p.NUMBER,minValue:1},{argumentType:p.NUMBER,minValue:0,maxValue:1},{argumentType:p.BOOLEAN}]},"CONFIDENCE.NORM":{method:"confidencenorm",parameters:[{argumentType:p.NUMBER,greaterThan:0,lessThan:1},{argumentType:p.NUMBER,greaterThan:0},{argumentType:p.NUMBER,minValue:1}]},"CONFIDENCE.T":{method:"confidencet",parameters:[{argumentType:p.NUMBER,greaterThan:0,lessThan:1},{argumentType:p.NUMBER,greaterThan:0},{argumentType:p.NUMBER,minValue:1}]},STANDARDIZE:{method:"standardize",parameters:[{argumentType:p.NUMBER},{argumentType:p.NUMBER},{argumentType:p.NUMBER,greaterThan:0}]}},lb.aliases={NEGBINOMDIST:"NEGBINOM.DIST",EXPONDIST:"EXPON.DIST",BETADIST:"BETA.DIST",NORMDIST:"NORM.DIST",NORMINV:"NORM.INV",NORMSDIST:"NORM.S.DIST",NORMSINV:"NORM.S.INV",LOGNORMDIST:"LOGNORM.DIST",LOGINV:"LOGNORM.INV",TINV:"T.INV.2T",HYPGEOMDIST:"HYPGEOM.DIST",POISSON:"POISSON.DIST",WEIBULL:"WEIBULL.DIST",FINV:"F.INV.RT",FDIST:"F.DIST.RT",CHIDIST:"CHISQ.DIST.RT",CHIINV:"CHISQ.INV.RT",GAMMADIST:"GAMMA.DIST","GAMMALN.PRECISE":"GAMMALN",GAMMAINV:"GAMMA.INV",BETAINV:"BETA.INV",BINOMDIST:"BINOM.DIST",CONFIDENCE:"CONFIDENCE.NORM",CRITBINOM:"BINOM.INV",WEIBULLDIST:"WEIBULL.DIST",TINV2T:"T.INV.2T",TDISTRT:"T.DIST.RT",TDIST2T:"T.DIST.2T",FINVRT:"F.INV.RT",FDISTRT:"F.DIST.RT",CHIDISTRT:"CHISQ.DIST.RT",CHIINVRT:"CHISQ.INV.RT",LOGNORMINV:"LOGNORM.INV",POISSONDIST:"POISSON.DIST"};class lC extends iE{fact(e,t){return this.runFunction(e.args,t,this.metadata("FACT"),e=>{e=Math.trunc(e);let t=1;for(let r=1;r<=e;r++)t*=r;return t})}factdouble(e,t){return this.runFunction(e.args,t,this.metadata("FACTDOUBLE"),e=>{e=Math.trunc(e);let t=1;for(let r=e;r>=1;r-=2)t*=r;return t})}combin(e,t){return this.runFunction(e.args,t,this.metadata("COMBIN"),(e,t)=>t>e?new rq(d.NUM,eY.WrongOrder):lS(e=Math.trunc(e),t=Math.trunc(t)))}combina(e,t){return this.runFunction(e.args,t,this.metadata("COMBINA"),(e,t)=>(e=Math.trunc(e))+(t=Math.trunc(t))-1>=1030?new rq(d.NUM,eY.ValueLarge):0===e&&0===t?1:lS(e+t-1,t))}gcd(e,t){return this.runFunction(e.args,t,this.metadata("GCD"),(...e)=>{let t=this.arithmeticHelper.coerceNumbersCoerceRangesDropNulls(e);if(t instanceof rq)return t;let r=0;for(let e of t){if(e<0)return new rq(d.NUM,eY.ValueSmall);r=lv(r,Math.trunc(e))}return r>Number.MAX_SAFE_INTEGER?new rq(d.NUM,eY.ValueLarge):r})}lcm(e,t){return this.runFunction(e.args,t,this.metadata("LCM"),(...e)=>{let t=this.arithmeticHelper.coerceNumbersCoerceRangesDropNulls(e);if(t instanceof rq)return t;let r=1;for(let e of t){var i,n;if(e<0)return new rq(d.NUM,eY.ValueSmall);i=r,n=Math.trunc(e),r=0===i||0===n?0:i*(n/lv(i,n))}return r>Number.MAX_SAFE_INTEGER?new rq(d.NUM,eY.ValueLarge):r})}mround(e,t){return this.runFunction(e.args,t,this.metadata("MROUND"),(e,t)=>0===t?0:e>0&&t<0||e<0&&t>0?new rq(d.NUM,eY.DistinctSigns):Math.round(e/t)*t)}multinomial(e,t){return this.runFunction(e.args,t,this.metadata("MULTINOMIAL"),(...e)=>{let t=0,r=1;for(let i of e){if(i<0)return new rq(d.NUM,eY.ValueSmall);i=Math.trunc(i);for(let e=1;e<=i;e++)r*=(t+e)/e;t+=i}return Math.round(r)})}quotient(e,t){return this.runFunction(e.args,t,this.metadata("QUOTIENT"),(e,t)=>0===t?new rq(d.DIV_BY_ZERO):Math.trunc(e/t))}seriessum(e,t){return this.runFunction(e.args,t,this.metadata("SERIESSUM"),(e,t,r,i)=>{let n=this.arithmeticHelper.manyToOnlyNumbersDropNulls(i.valuesFromTopLeftCorner());if(n instanceof rq)return n;let o=0;for(let t of(n.reverse(),n))o*=Math.pow(e,r),o+=t;return o*Math.pow(e,t)})}sign(e,t){return this.runFunction(e.args,t,this.metadata("SIGN"),e=>e>0?1:e<0?-1:0)}sumx2my2(e,t){return this.runFunction(e.args,t,this.metadata("SUMX2MY2"),(e,t)=>{let r=e.valuesFromTopLeftCorner(),i=t.valuesFromTopLeftCorner();if(r.length!==i.length)return new rq(d.NA,eY.EqualLength);let n=r.length,o=0;for(let e=0;e<n;e++){let t=r[e],n=i[e];if(t instanceof rq)return t;if(n instanceof rq)return n;"number"==typeof t&&"number"==typeof n&&(o+=Math.pow(t,2)-Math.pow(n,2))}return o})}sumx2py2(e,t){return this.runFunction(e.args,t,this.metadata("SUMX2PY2"),(e,t)=>{let r=e.valuesFromTopLeftCorner(),i=t.valuesFromTopLeftCorner();if(r.length!==i.length)return new rq(d.NA,eY.EqualLength);let n=r.length,o=0;for(let e=0;e<n;e++){let t=r[e],n=i[e];if(t instanceof rq)return t;if(n instanceof rq)return n;"number"==typeof t&&"number"==typeof n&&(o+=Math.pow(t,2)+Math.pow(n,2))}return o})}sumxmy2(e,t){return this.runFunction(e.args,t,this.metadata("SUMXMY2"),(e,t)=>{let r=e.valuesFromTopLeftCorner(),i=t.valuesFromTopLeftCorner();if(r.length!==i.length)return new rq(d.NA,eY.EqualLength);let n=r.length,o=0;for(let e=0;e<n;e++){let t=r[e],n=i[e];if(t instanceof rq)return t;if(n instanceof rq)return n;"number"==typeof t&&"number"==typeof n&&(o+=Math.pow(t-n,2))}return o})}}function lS(e,t){2*t>e&&(t=e-t);let r=1;for(let i=1;i<=t;i++)r*=(e-t+i)/i;return Math.round(r)}function lv(e,t){for(e<t&&([e,t]=[t,e]);t>0;)[e,t]=[t,e%t];return e}lC.implementedFunctions={FACT:{method:"fact",parameters:[{argumentType:p.NUMBER,minValue:0,maxValue:170}]},FACTDOUBLE:{method:"factdouble",parameters:[{argumentType:p.NUMBER,minValue:0,maxValue:288}]},COMBIN:{method:"combin",parameters:[{argumentType:p.NUMBER,minValue:0,lessThan:1030},{argumentType:p.NUMBER,minValue:0}]},COMBINA:{method:"combina",parameters:[{argumentType:p.NUMBER,minValue:0},{argumentType:p.NUMBER,minValue:0}]},GCD:{method:"gcd",parameters:[{argumentType:p.ANY}],repeatLastArgs:1},LCM:{method:"lcm",parameters:[{argumentType:p.ANY}],repeatLastArgs:1},MROUND:{method:"mround",parameters:[{argumentType:p.NUMBER},{argumentType:p.NUMBER}]},MULTINOMIAL:{method:"multinomial",parameters:[{argumentType:p.NUMBER}],repeatLastArgs:1,expandRanges:!0},QUOTIENT:{method:"quotient",parameters:[{argumentType:p.NUMBER},{argumentType:p.NUMBER}]},SERIESSUM:{method:"seriessum",parameters:[{argumentType:p.NUMBER},{argumentType:p.NUMBER},{argumentType:p.NUMBER},{argumentType:p.RANGE}]},SIGN:{method:"sign",parameters:[{argumentType:p.NUMBER}]},SUMX2MY2:{method:"sumx2my2",parameters:[{argumentType:p.RANGE},{argumentType:p.RANGE}]},SUMX2PY2:{method:"sumx2py2",parameters:[{argumentType:p.RANGE},{argumentType:p.RANGE}]},SUMXMY2:{method:"sumxmy2",parameters:[{argumentType:p.RANGE},{argumentType:p.RANGE}]}};class lR extends iE{complex(e,t){return this.runFunction(e.args,t,this.metadata("COMPLEX"),(e,t,r)=>"i"!==r&&"j"!==r?new rq(d.VALUE,eY.ShouldBeIorJ):is([e,t],r))}imabs(e,t){return this.runFunction(e.args,t,this.metadata("IMABS"),lO)}imaginary(e,t){return this.runFunction(e.args,t,this.metadata("IMAGINARY"),([e,t])=>t)}imreal(e,t){return this.runFunction(e.args,t,this.metadata("IMREAL"),([e,t])=>e)}imargument(e,t){return this.runFunction(e.args,t,this.metadata("IMARGUMENT"),([e,t])=>0===e&&0===t?new rq(d.DIV_BY_ZERO):Math.atan2(t,e))}imconjugate(e,t){return this.runFunction(e.args,t,this.metadata("IMCONJUGATE"),([e,t])=>is([e,-t]))}imcos(e,t){return this.runFunction(e.args,t,this.metadata("IMCOS"),e=>is(lx(e)))}imcosh(e,t){return this.runFunction(e.args,t,this.metadata("IMCOSH"),e=>is(lA(e)))}imcot(e,t){return this.runFunction(e.args,t,this.metadata("IMCOT"),e=>is(lT(lx(e),lM(e))))}imcsc(e,t){return this.runFunction(e.args,t,this.metadata("IMCSC"),e=>is(lT([1,0],lM(e))))}imcsch(e,t){return this.runFunction(e.args,t,this.metadata("IMCSCH"),e=>is(lT([1,0],lI(e))))}imsec(e,t){return this.runFunction(e.args,t,this.metadata("IMSEC"),e=>is(lT([1,0],lx(e))))}imsech(e,t){return this.runFunction(e.args,t,this.metadata("IMSECH"),e=>is(lT([1,0],lA(e))))}imsin(e,t){return this.runFunction(e.args,t,this.metadata("IMSIN"),e=>is(lM(e)))}imsinh(e,t){return this.runFunction(e.args,t,this.metadata("IMSINH"),e=>is(lI(e)))}imtan(e,t){return this.runFunction(e.args,t,this.metadata("IMTAN"),e=>is(lT(lM(e),lx(e))))}imdiv(e,t){return this.runFunction(e.args,t,this.metadata("IMDIV"),(e,t)=>is(lT(e,t)))}improduct(e,t){return this.runFunction(e.args,t,this.metadata("IMPRODUCT"),(...e)=>{let t=this.arithmeticHelper.coerceComplexExactRanges(e);if(t instanceof rq)return t;let r=[1,0];for(let e of t)r=lE(r,e);return is(r)})}imsum(e,t){return this.runFunction(e.args,t,this.metadata("IMSUM"),(...e)=>{let t=this.arithmeticHelper.coerceComplexExactRanges(e);if(t instanceof rq)return t;let r=[0,0];for(let e of t)r=function([e,t],[r,i]){return[e+r,t+i]}(r,e);return is(r)})}imsub(e,t){return this.runFunction(e.args,t,this.metadata("IMSUB"),(e,t)=>is(function([e,t],[r,i]){return[e-r,t-i]}(e,t)))}imexp(e,t){return this.runFunction(e.args,t,this.metadata("IMEXP"),e=>is(lN(e)))}imln(e,t){return this.runFunction(e.args,t,this.metadata("IMLN"),e=>is(lk(e)))}imlog10(e,t){return this.runFunction(e.args,t,this.metadata("IMLOG10"),e=>{let[t,r]=lk(e),i=Math.log(10);return is([t/i,r/i])})}imlog2(e,t){return this.runFunction(e.args,t,this.metadata("IMLOG2"),e=>{let[t,r]=lk(e),i=Math.log(2);return is([t/i,r/i])})}impower(e,t){return this.runFunction(e.args,t,this.metadata("IMPOWER"),(e,t)=>is(lH(e,t)))}imsqrt(e,t){return this.runFunction(e.args,t,this.metadata("IMSQRT"),e=>is(lH(e,.5)))}}function lE([e,t],[r,i]){return[e*r-t*i,e*i+r*t]}function lT([e,t],[r,i]){let n=Math.pow(r,2)+Math.pow(i,2),[o,s]=lE([e,t],[r,-i]);return[o/n,s/n]}function lx([e,t]){return[Math.cos(e)*Math.cosh(t),-Math.sin(e)*Math.sinh(t)]}function lA([e,t]){return[Math.cosh(e)*Math.cos(t),Math.sinh(e)*Math.sin(t)]}function lM([e,t]){return[Math.sin(e)*Math.cosh(t),Math.cos(e)*Math.sinh(t)]}function lI([e,t]){return[Math.sinh(e)*Math.cos(t),Math.cosh(e)*Math.sin(t)]}function lN([e,t]){return[Math.exp(e)*Math.cos(t),Math.exp(e)*Math.sin(t)]}function lO([e,t]){return Math.sqrt(e*e+t*t)}function lk([e,t]){return[Math.log(lO([e,t])),Math.atan2(t,e)]}function lH(e,t){let[r,i]=lk(e);return lN([t*r,t*i])}lR.implementedFunctions={COMPLEX:{method:"complex",parameters:[{argumentType:p.NUMBER},{argumentType:p.NUMBER},{argumentType:p.STRING,defaultValue:"i"}]},IMABS:{method:"imabs",parameters:[{argumentType:p.COMPLEX}]},IMAGINARY:{method:"imaginary",parameters:[{argumentType:p.COMPLEX}]},IMREAL:{method:"imreal",parameters:[{argumentType:p.COMPLEX}]},IMARGUMENT:{method:"imargument",parameters:[{argumentType:p.COMPLEX}]},IMCONJUGATE:{method:"imconjugate",parameters:[{argumentType:p.COMPLEX}]},IMCOS:{method:"imcos",parameters:[{argumentType:p.COMPLEX}]},IMCOSH:{method:"imcosh",parameters:[{argumentType:p.COMPLEX}]},IMCOT:{method:"imcot",parameters:[{argumentType:p.COMPLEX}]},IMCSC:{method:"imcsc",parameters:[{argumentType:p.COMPLEX}]},IMCSCH:{method:"imcsch",parameters:[{argumentType:p.COMPLEX}]},IMSEC:{method:"imsec",parameters:[{argumentType:p.COMPLEX}]},IMSECH:{method:"imsech",parameters:[{argumentType:p.COMPLEX}]},IMSIN:{method:"imsin",parameters:[{argumentType:p.COMPLEX}]},IMSINH:{method:"imsinh",parameters:[{argumentType:p.COMPLEX}]},IMTAN:{method:"imtan",parameters:[{argumentType:p.COMPLEX}]},IMDIV:{method:"imdiv",parameters:[{argumentType:p.COMPLEX},{argumentType:p.COMPLEX}]},IMPRODUCT:{method:"improduct",parameters:[{argumentType:p.ANY}],repeatLastArgs:1},IMSUM:{method:"imsum",parameters:[{argumentType:p.ANY}],repeatLastArgs:1},IMSUB:{method:"imsub",parameters:[{argumentType:p.COMPLEX},{argumentType:p.COMPLEX}]},IMEXP:{method:"imexp",parameters:[{argumentType:p.COMPLEX}]},IMLN:{method:"imln",parameters:[{argumentType:p.COMPLEX}]},IMLOG10:{method:"imlog10",parameters:[{argumentType:p.COMPLEX}]},IMLOG2:{method:"imlog2",parameters:[{argumentType:p.COMPLEX}]},IMPOWER:{method:"impower",parameters:[{argumentType:p.COMPLEX},{argumentType:p.NUMBER}]},IMSQRT:{method:"imsqrt",parameters:[{argumentType:p.COMPLEX}]}};class l_ extends iE{avedev(e,t){return this.runFunction(e.args,t,this.metadata("AVEDEV"),(...e)=>{let t=this.arithmeticHelper.coerceNumbersExactRanges(e);if(t instanceof rq)return t;if(0===t.length)return new rq(d.DIV_BY_ZERO);let r=lg(t);return t.reduce((e,t)=>e+Math.abs(t-r),0)/t.length})}devsq(e,t){return this.runFunction(e.args,t,this.metadata("DEVSQ"),(...e)=>{let t=this.arithmeticHelper.coerceNumbersExactRanges(e);return t instanceof rq?t:0===t.length?0:lp(t)})}geomean(e,t){return this.runFunction(e.args,t,this.metadata("GEOMEAN"),(...e)=>{let t=this.arithmeticHelper.coerceNumbersExactRanges(e);if(t instanceof rq)return t;if(0===t.length)return new rq(d.NUM,eY.OneValue);for(let e of t)if(e<=0)return new rq(d.NUM,eY.ValueSmall);return Math.pow(function(e){for(var t=1,r=e.length;--r>=0;)t*=e[r];return t}(t),1/t.length)})}harmean(e,t){return this.runFunction(e.args,t,this.metadata("HARMEAN"),(...e)=>{let t=this.arithmeticHelper.coerceNumbersExactRanges(e);if(t instanceof rq)return t;if(0===t.length)return new rq(d.NUM,eY.OneValue);for(let e of t)if(e<=0)return new rq(d.NUM,eY.ValueSmall);return t.length/t.reduce((e,t)=>e+1/t,0)})}correl(e,t){return this.runFunction(e.args,t,this.metadata("CORREL"),(e,t)=>{if(e.numberOfElements()!==t.numberOfElements())return new rq(d.NA,eY.EqualLength);let r=lP(e,t);return r instanceof rq?r:r[0].length<=1?new rq(d.DIV_BY_ZERO,eY.TwoValues):ly(r[0],r[1])})}rsq(e,t){return this.runFunction(e.args,t,this.metadata("RSQ"),(e,t)=>{if(e.numberOfElements()!==t.numberOfElements())return new rq(d.NA,eY.EqualLength);let r=lP(e,t);return r instanceof rq?r:r[0].length<=1?new rq(d.DIV_BY_ZERO,eY.TwoValues):Math.pow(ly(r[0],r[1]),2)})}covariancep(e,t){return this.runFunction(e.args,t,this.metadata("COVARIANCE.P"),(e,t)=>{if(e.numberOfElements()!==t.numberOfElements())return new rq(d.NA,eY.EqualLength);let r=lP(e,t);if(r instanceof rq)return r;let i=r[0].length;return i<1?new rq(d.DIV_BY_ZERO,eY.OneValue):1===i?0:lw(r[0],r[1])*(i-1)/i})}covariances(e,t){return this.runFunction(e.args,t,this.metadata("COVARIANCE.S"),(e,t)=>{if(e.numberOfElements()!==t.numberOfElements())return new rq(d.NA,eY.EqualLength);let r=lP(e,t);return r instanceof rq?r:r[0].length<=1?new rq(d.DIV_BY_ZERO,eY.TwoValues):lw(r[0],r[1])})}ztest(e,t){return this.runFunction(e.args,t,this.metadata("Z.TEST"),(e,t,r)=>{let i=this.arithmeticHelper.manyToExactNumbers(e.valuesFromTopLeftCorner());if(i instanceof rq)return i;let n=i.length;if(void 0===r){if(n<2)return new rq(d.DIV_BY_ZERO,eY.TwoValues);r=lf(i,!0)}return n<1?new rq(d.NA,eY.OneValue):0===r?new rq(d.DIV_BY_ZERO):1-s0((lg(i)-t)/(r/Math.sqrt(n)),0,1)})}ftest(e,t){return this.runFunction(e.args,t,this.metadata("F.TEST"),(e,t)=>{let r=this.arithmeticHelper.manyToExactNumbers(e.valuesFromTopLeftCorner()),i=this.arithmeticHelper.manyToExactNumbers(t.valuesFromTopLeftCorner());if(r instanceof rq)return r;if(i instanceof rq)return i;if(r.length<=1||i.length<=1)return new rq(d.DIV_BY_ZERO);let n=lm(r,!0),o=lm(i,!0);if(0===n||0===o)return new rq(d.DIV_BY_ZERO);let s=lo(n/o,r.length-1,i.length-1);return 2*Math.min(s,1-s)})}steyx(e,t){return this.runFunction(e.args,t,this.metadata("STEYX"),(e,t)=>{if(e.numberOfElements()!==t.numberOfElements())return new rq(d.NA,eY.EqualLength);let r=lP(e,t);if(r instanceof rq)return r;let i=r[0].length;return i<=2?new rq(d.DIV_BY_ZERO,eY.ThreeValues):Math.sqrt((lp(r[0])-Math.pow(lw(r[0],r[1])*(i-1),2)/lp(r[1]))/(i-2))})}slope(e,t){return this.runFunction(e.args,t,this.metadata("SLOPE"),(e,t)=>{if(e.numberOfElements()!==t.numberOfElements())return new rq(d.NA,eY.EqualLength);let r=lP(e,t);if(r instanceof rq)return r;let i=r[0].length;return i<=1?new rq(d.DIV_BY_ZERO,eY.TwoValues):lw(r[0],r[1])*(i-1)/lp(r[1])})}chisqtest(e,t){return this.runFunction(e.args,t,this.metadata("CHISQ.TEST"),(e,t)=>{let r=e.height(),i=e.width();if(t.height()!==r||t.width()!==i)return new rq(d.NA,eY.EqualLength);let n=lP(e,t);if(n instanceof rq)return n;if(n[0].length<=1)return new rq(d.DIV_BY_ZERO,eY.TwoValues);let o=0;for(let e=0;e<n[0].length;e++){if(0===n[1][e])return new rq(d.DIV_BY_ZERO);o+=Math.pow(n[0][e]-n[1][e],2)/n[1][e]}return o<0?new rq(d.NUM,eY.NaN):1-li(o,r>1&&i>1?(r-1)*(i-1):r*i-1)})}ttest(e,t){return this.runFunction(e.args,t,this.metadata("T.TEST"),(e,t,r,i)=>{let n=this.arithmeticHelper.manyToExactNumbers(e.valuesFromTopLeftCorner()),o=this.arithmeticHelper.manyToExactNumbers(t.valuesFromTopLeftCorner());if(n instanceof rq)return n;if(o instanceof rq)return o;let s=n.length,l=o.length;if(1===i){if(l!==s)return new rq(d.NA,eY.EqualLength);if(s<=1)return new rq(d.DIV_BY_ZERO,eY.TwoValues);let e=Array(s);for(let t=0;t<s;t++)e[t]=n[t]-o[t];let t=lf(e,!0);return 0===t?new rq(d.DIV_BY_ZERO):r*(1-lh(Math.abs(Math.sqrt(s)*lg(e)/t),s-1))}if(2===i){if(s<=1||l<=1)return new rq(d.DIV_BY_ZERO,eY.TwoValues);let e=(lp(n)+lp(o))/(s+l-2);return 0===e?new rq(d.DIV_BY_ZERO):r*(1-lh(Math.abs((lg(n)-lg(o))/Math.sqrt(e*(1/s+1/l))),s+l-2))}{if(s<=1||l<=1)return new rq(d.DIV_BY_ZERO,eY.TwoValues);let e=lm(n,!0),t=lm(o,!0);return 0===e&&0===t?new rq(d.DIV_BY_ZERO):r*(1-lh(Math.abs((lg(n)-lg(o))/Math.sqrt(e/s+t/l)),Math.pow(e/s+t/l,2)/(Math.pow(e/s,2)/(s-1)+Math.pow(t/l,2)/(l-1))))}})}skew(e,t){return this.runFunction(e.args,t,this.metadata("SKEW"),(...e)=>{let t=this.arithmeticHelper.coerceNumbersExactRanges(e);if(t instanceof rq)return t;let r=t.length;if(r<3)return new rq(d.DIV_BY_ZERO,eY.ThreeValues);let i=lg(t),n=lf(t,!0);return 0===n?new rq(d.DIV_BY_ZERO):t.reduce((e,t)=>e+Math.pow((t-i)/n,3),0)*r/(r-1)/(r-2)})}skewp(e,t){return this.runFunction(e.args,t,this.metadata("SKEW.P"),(...e)=>{let t=this.arithmeticHelper.coerceNumbersExactRanges(e);if(t instanceof rq)return t;let r=t.length;if(r<3)return new rq(d.DIV_BY_ZERO,eY.ThreeValues);let i=lg(t),n=lf(t,!1);return 0===n?new rq(d.DIV_BY_ZERO):t.reduce((e,t)=>e+Math.pow((t-i)/n,3),0)/r})}}function lP(e,t){let r,i,n=e.iterateValuesFromTopLeftCorner(),o=t.iterateValuesFromTopLeftCorner(),s=[],l=[];for(;r=n.next(),i=o.next(),!r.done&&!i.done;){let e=r.value,t=i.value;if(e instanceof rq)return e;if(t instanceof rq)return t;tD(e)&&tD(t)&&(s.push(tM(e)),l.push(tM(t)))}return[s,l]}l_.implementedFunctions={AVEDEV:{method:"avedev",parameters:[{argumentType:p.ANY}],repeatLastArgs:1},DEVSQ:{method:"devsq",parameters:[{argumentType:p.ANY}],repeatLastArgs:1},GEOMEAN:{method:"geomean",parameters:[{argumentType:p.ANY}],repeatLastArgs:1},HARMEAN:{method:"harmean",parameters:[{argumentType:p.ANY}],repeatLastArgs:1},CORREL:{method:"correl",parameters:[{argumentType:p.RANGE},{argumentType:p.RANGE}]},RSQ:{method:"rsq",parameters:[{argumentType:p.RANGE},{argumentType:p.RANGE}]},"COVARIANCE.P":{method:"covariancep",parameters:[{argumentType:p.RANGE},{argumentType:p.RANGE}]},"COVARIANCE.S":{method:"covariances",parameters:[{argumentType:p.RANGE},{argumentType:p.RANGE}]},"Z.TEST":{method:"ztest",parameters:[{argumentType:p.RANGE},{argumentType:p.NUMBER},{argumentType:p.NUMBER,optionalArg:!0}]},"F.TEST":{method:"ftest",parameters:[{argumentType:p.RANGE},{argumentType:p.RANGE}]},STEYX:{method:"steyx",parameters:[{argumentType:p.RANGE},{argumentType:p.RANGE}]},SLOPE:{method:"slope",parameters:[{argumentType:p.RANGE},{argumentType:p.RANGE}]},"CHISQ.TEST":{method:"chisqtest",parameters:[{argumentType:p.RANGE},{argumentType:p.RANGE}]},"T.TEST":{method:"ttest",parameters:[{argumentType:p.RANGE},{argumentType:p.RANGE},{argumentType:p.INTEGER,minValue:1,maxValue:2},{argumentType:p.INTEGER,minValue:1,maxValue:3}]},SKEW:{method:"skew",parameters:[{argumentType:p.ANY}],repeatLastArgs:1},"SKEW.P":{method:"skewp",parameters:[{argumentType:p.ANY}],repeatLastArgs:1}},l_.aliases={COVAR:"COVARIANCE.P",FTEST:"F.TEST",PEARSON:"CORREL",ZTEST:"Z.TEST",CHITEST:"CHISQ.TEST",TTEST:"T.TEST",COVARIANCEP:"COVARIANCE.P",COVARIANCES:"COVARIANCE.S",SKEWP:"SKEW.P"};class lD extends op{}lD.HyperFormula=op,lD.ErrorType=d,lD.CellError=rq,lD.CellType=u,lD.CellValueType=rG,lD.CellValueDetailedType=rj,lD.DetailedCellError=iA,lD.ExportedCellChange=nX,lD.ExportedNamedExpressionChange=nQ,lD.ConfigValueTooBigError=rn,lD.ConfigValueTooSmallError=ri,lD.EvaluationSuspendedError=rs,lD.ExpectedOneOfValuesError=ro,lD.ExpectedValueOfTypeError=rt,lD.ArraySize=iT,lD.SimpleRangeValue=tF,lD.EmptyValue=tA,lD.FunctionPlugin=iE,lD.FunctionArgumentType=p,lD.FunctionPluginValidationError=ru,lD.InvalidAddressError=t0,lD.InvalidArgumentsError=t1,lD.LanguageNotRegisteredError=rh,lD.LanguageAlreadyRegisteredError=rd,lD.MissingTranslationError=rl,lD.NamedExpressionDoesNotExistError=t5,lD.NamedExpressionNameIsAlreadyTakenError=t3,lD.NamedExpressionNameIsInvalidError=t6,lD.NoOperationToRedoError=t8,lD.NoOperationToUndoError=t4,lD.NoRelativeAddressesAllowedError=rm,lD.NoSheetWithIdError=tq,lD.NoSheetWithNameError=tX,lD.NotAFormulaError=tJ,lD.NothingToPasteError=t9,lD.ProtectedFunctionTranslationError=ra,lD.SheetNameAlreadyTakenError=tQ,lD.SheetSizeLimitExceededError=tZ,lD.SourceLocationHasArrayError=rg,lD.TargetLocationHasArrayError=rp,lD.UnableToParseError=re;let lL=of.defaultConfig.language;for(let e of(op.registerLanguage(lL,oy),op.languages[oy.langCode]=oy,Object.getOwnPropertyNames(en)))e.startsWith("_")||op.registerFunctionPlugin(en[e]);window.HyperFormula=op})(),(()=>{"use strict";let e,t,n,o;r.d(i,{default:()=>U$});var s={};r.r(s),r.d(s,{arrayAvg:()=>eh,arrayEach:()=>eo,arrayFilter:()=>ei,arrayFlatten:()=>function e(t){return er(t,(t,r)=>t.concat(Array.isArray(r)?e(r):r),[])},arrayMap:()=>en,arrayMax:()=>el,arrayMin:()=>ea,arrayReduce:()=>er,arraySum:()=>es,arrayToString:()=>ew,arrayUnique:()=>ec,extendArray:()=>ee,getDifferenceOfArrays:()=>eg,getIntersectionOfArrays:()=>ep,getUnionOfArrays:()=>em,insertValuesInPlace:()=>eu,pivot:()=>et,removeIndexesInPlace:()=>ed,stringToArray:()=>ef,to2dArray:()=>J});var l={};r.r(l),r.d(l,{_BLOCKING_MODAL_STATES:()=>to,_LICENSE_EXPIRED_TITLE:()=>te,_PURCHASE_LICENSE_TEXT:()=>tt,_buildMissingFeaturesMessage:()=>e7,_createLicenseBar:()=>tg,_createLicenseBarBlock:()=>tp,_formatExpiryClause:()=>e8,_formatIsoDate:()=>th,_getLicenseState:()=>tc,_injectProductInfo:()=>ta,_renderMessageParts:()=>e5,isDefined:()=>e$,isEmpty:()=>ej,isRegExp:()=>eY,isUndefined:()=>eG,stringify:()=>eW});var a={};r.r(a),r.d(a,{throwWithCause:()=>tf});var h={};r.r(h),r.d(h,{assignObjectDefaults:()=>tD,clone:()=>tv,createObjectPropListener:()=>t_,deepClone:()=>tS,deepExtend:()=>tC,deepMerge:()=>tL,deepObjectSize:()=>tH,defineGetter:()=>tM,duckSchema:()=>tw,extend:()=>tb,getProperty:()=>tN,hasOwnProperty:()=>tP,inherit:()=>ty,isKeyValueObject:()=>tF,isObject:()=>tT,isObjectEqual:()=>tE,isPlainObject:()=>tx,mixin:()=>tR,objectEach:()=>tI,setProperty:()=>tk,stripFunctionValues:()=>tA,writeOwnProperty:()=>tO});var d={};r.r(d),r.d(d,{cancelAnimationFrame:()=>tV,cancelIdleTask:()=>tU,getComparisonFunction:()=>tG,isCSR:()=>t$,isTouchSupported:()=>tW,requestAnimationFrame:()=>tB,requestIdleTask:()=>tz});var u={};r.r(u),r.d(u,{isChrome:()=>tZ,isChromeWebKit:()=>tJ,isEdge:()=>t6,isEdgeWebKit:()=>t5,isFirefox:()=>t0,isFirefoxWebKit:()=>t1,isIOS:()=>t8,isIpadOS:()=>t9,isLinuxOS:()=>rr,isMacOS:()=>rt,isMobileBrowser:()=>t4,isMobileOrIpadOS:()=>t7,isSafari:()=>t2,isSafariBefore261:()=>t3,isWindowsOS:()=>re,setBrowserMeta:()=>tX,setPlatformMeta:()=>tQ});var c={};r.r(c),r.d(c,{CELL_CLIP_CLASS:()=>r1,HTML_CHARACTERS:()=>rq,SANITIZER_WARN_KEY:()=>rX,addClass:()=>rW,addEvent:()=>iR,clearTextSelection:()=>iM,closest:()=>rk,closestDown:()=>rH,empty:()=>rK,eventTargetEl:()=>rA,fastInnerHTML:()=>rJ,fastInnerText:()=>r0,findFirstParentWithClass:()=>r_,getCaretPosition:()=>iT,getCellContentRoot:()=>r2,getChildEl:()=>iZ,getComposedEventTargetEl:()=>rM,getCssTransform:()=>iP,getDeepActiveElement:()=>iQ,getFixedContainingBlockRect:()=>ip,getFractionalScalingCompensation:()=>iN,getFrameElement:()=>rI,getMaximumScrollLeft:()=>is,getMaximumScrollTop:()=>io,getParent:()=>rT,getParentWindow:()=>rN,getScrollLeft:()=>ir,getScrollTop:()=>it,getScrollableElement:()=>ii,getScrollbarWidth:()=>iO,getSelectionEndPosition:()=>ix,getSelectionText:()=>iA,getShadowHostChain:()=>iX,getStyle:()=>iw,getTrimmingContainer:()=>im,getWindowScrollLeft:()=>ie,getWindowScrollTop:()=>r7,hasAccessToParentWindow:()=>rO,hasClass:()=>rU,hasHorizontalScrollbar:()=>iH,hasVerticalScrollbar:()=>ik,hasZeroHeight:()=>r8,index:()=>rD,innerHeight:()=>iS,innerWidth:()=>iv,isBottomMostColumnHeader:()=>rF,isChildOf:()=>rP,isDetached:()=>iV,isDocumentFragment:()=>ij,isHTMLElement:()=>iG,isHTMLInputElement:()=>iK,isHTMLTableCellElement:()=>iY,isInput:()=>iL,isInternalElement:()=>rx,isOutsideInput:()=>iF,isShadowRoot:()=>iq,isStartGapCovered:()=>r6,isTopGapCovered:()=>r5,isVisible:()=>r4,makeElementContentEditableAndSelectItsContent:()=>iU,matchesCSSRules:()=>iy,missingSanitizerMessage:()=>rQ,normalizeClassNames:()=>rV,observeVisibilityChangeOnce:()=>iz,offset:()=>r9,outerHeight:()=>iC,outerWidth:()=>ib,overlayContainsElement:()=>rL,removeAttribute:()=>rj,removeClass:()=>r$,removeContentEditableFromElementAndDeselect:()=>iW,removeEvent:()=>iE,removeInlineStyle:()=>iJ,removeTextNodes:()=>rY,resetCssTransform:()=>iD,runWithSelectedContendEditableElement:()=>i$,selectElementIfAllowed:()=>iB,setAttribute:()=>rG,setCaretPosition:()=>iI,setOverlayPosition:()=>i_,standsBehindRowHeader:()=>r3});var g={};r.r(g),r.d(g,{curry:()=>i7,curryRight:()=>ne,debounce:()=>i4,fastCall:()=>nt,isFunction:()=>i3,partial:()=>i9,pipe:()=>i8,throttle:()=>i6,throttleAfterHits:()=>i5});var p={};r.r(p),r.d(p,{KEY_CODES:()=>nr,isCtrlKey:()=>ns,isCtrlMetaKey:()=>nl,isFunctionKey:()=>no,isKey:()=>na,isPrintableChar:()=>nn});var m={};r.r(m),r.d(m,{POINTER_DRAG_TOLERANCE:()=>nb,getFirstChangedTouch:()=>nf,getTouchPointById:()=>nw,hasPointerTraveled:()=>nC,hasTouchList:()=>nm,isImmediatePropagationStopped:()=>nd,isLeftClick:()=>nc,isMiddleClick:()=>ng,isRightClick:()=>nu,isTouchEvent:()=>np,offsetRelativeTo:()=>ny,stopImmediatePropagation:()=>nh});var f={};r.r(f),r.d(f,{decodeHtmlEntities:()=>or,equalsIgnoreCase:()=>n8,escapeHtml:()=>os,getCharacterLength:()=>om,htmlToPlainText:()=>oi,isJSON:()=>n7,isPercentValue:()=>oe,localeLowerCase:()=>ou,randomString:()=>n9,removeCharactersBefore:()=>of,splitIntoCharacters:()=>op,stripTags:()=>on,substitute:()=>ri,toHyphen:()=>ol,toUpperCaseFirst:()=>n4});var w={};r.r(w),r.d(w,{_dataToHTML:()=>oT,htmlToGridSettings:()=>oN,instanceToHTML:()=>ov,instanceToTableElement:()=>oE,replaceTdCellsWithTextContent:()=>oI});var y={};r.r(y),r.d(y,{clamp:()=>oB,getParsedNumber:()=>oV,isCommaThousandsGroupedInteger:()=>oH,isDotThousandsGroupedFloat:()=>oP,isDotThousandsGroupedInteger:()=>o_,isLossyNumericConversion:()=>oU,isNumeric:()=>oO,isNumericLike:()=>ok,isUnsignedNumber:()=>oW,rangeEach:()=>oD,rangeEachReverse:()=>oL,valueAccordingPercent:()=>oF});var b={};r.r(b),r.d(b,{cloneRow:()=>dg,countFirstRowKeys:()=>dd,createEmptySpreadsheetData:()=>dl,createSpreadsheetData:()=>dn,createSpreadsheetObjectData:()=>ds,dataRowToChangesArray:()=>da,hasChangeForCell:()=>dh,isArrayOfArrays:()=>du,isArrayOfObjects:()=>dc,spreadsheetColumnIndex:()=>di,spreadsheetColumnLabel:()=>dr});var C={};r.r(C),r.d(C,{CANCEL:()=>dU,CHECKBOX_CHECKED:()=>cN,CHECKBOX_HEADER_CHECK_ALL:()=>ck,CHECKBOX_RENDERER_NAMESPACE:()=>cI,CHECKBOX_UNCHECKED:()=>cO,COLUMN_SORTING_ANNOUNCEMENT_ASCENDING:()=>gl,COLUMN_SORTING_ANNOUNCEMENT_DESCENDING:()=>ga,COLUMN_SORTING_ANNOUNCEMENT_REMOVED:()=>gh,COLUMN_SORTING_NAMESPACE:()=>gs,COMMON_NAMESPACE:()=>dV,CONTEXTMENU_ITEMS_ADD_COMMENT:()=>ui,CONTEXTMENU_ITEMS_ALIGNMENT:()=>ul,CONTEXTMENU_ITEMS_ALIGNMENT_BOTTOM:()=>up,CONTEXTMENU_ITEMS_ALIGNMENT_CENTER:()=>uh,CONTEXTMENU_ITEMS_ALIGNMENT_JUSTIFY:()=>uu,CONTEXTMENU_ITEMS_ALIGNMENT_LEFT:()=>ua,CONTEXTMENU_ITEMS_ALIGNMENT_MIDDLE:()=>ug,CONTEXTMENU_ITEMS_ALIGNMENT_RIGHT:()=>ud,CONTEXTMENU_ITEMS_ALIGNMENT_TOP:()=>uc,CONTEXTMENU_ITEMS_BORDERS:()=>um,CONTEXTMENU_ITEMS_BORDERS_BOTTOM:()=>uy,CONTEXTMENU_ITEMS_BORDERS_LEFT:()=>ub,CONTEXTMENU_ITEMS_BORDERS_RIGHT:()=>uw,CONTEXTMENU_ITEMS_BORDERS_TOP:()=>uf,CONTEXTMENU_ITEMS_CLEAR_COLUMN:()=>d0,CONTEXTMENU_ITEMS_COPY:()=>d1,CONTEXTMENU_ITEMS_COPY_COLUMN_HEADERS_ONLY:()=>d6,CONTEXTMENU_ITEMS_COPY_WITH_COLUMN_GROUP_HEADERS:()=>d3,CONTEXTMENU_ITEMS_COPY_WITH_COLUMN_HEADERS:()=>d2,CONTEXTMENU_ITEMS_CUT:()=>d5,CONTEXTMENU_ITEMS_EDIT_COMMENT:()=>un,CONTEXTMENU_ITEMS_EXPORT:()=>d4,CONTEXTMENU_ITEMS_EXPORT_FILE_CSV:()=>d8,CONTEXTMENU_ITEMS_EXPORT_FILE_XLSX:()=>d9,CONTEXTMENU_ITEMS_FREEZE_COLUMN:()=>d7,CONTEXTMENU_ITEMS_HIDE_COLUMN:()=>uR,CONTEXTMENU_ITEMS_HIDE_ROW:()=>uT,CONTEXTMENU_ITEMS_INSERT_LEFT:()=>dY,CONTEXTMENU_ITEMS_INSERT_RIGHT:()=>dK,CONTEXTMENU_ITEMS_MERGE_CELLS:()=>ut,CONTEXTMENU_ITEMS_NESTED_ROWS_DETACH_CHILD:()=>uv,CONTEXTMENU_ITEMS_NESTED_ROWS_INSERT_CHILD:()=>uS,CONTEXTMENU_ITEMS_NO_ITEMS:()=>d$,CONTEXTMENU_ITEMS_READ_ONLY:()=>dJ,CONTEXTMENU_ITEMS_READ_ONLY_COMMENT:()=>us,CONTEXTMENU_ITEMS_REDO:()=>dZ,CONTEXTMENU_ITEMS_REMOVE_BORDERS:()=>uC,CONTEXTMENU_ITEMS_REMOVE_COLUMN:()=>dX,CONTEXTMENU_ITEMS_REMOVE_COMMENT:()=>uo,CONTEXTMENU_ITEMS_REMOVE_ROW:()=>dq,CONTEXTMENU_ITEMS_ROW_ABOVE:()=>dG,CONTEXTMENU_ITEMS_ROW_BELOW:()=>dj,CONTEXTMENU_ITEMS_SHOW_COLUMN:()=>uE,CONTEXTMENU_ITEMS_SHOW_ROW:()=>ux,CONTEXTMENU_ITEMS_UNDO:()=>dQ,CONTEXTMENU_ITEMS_UNFREEZE_COLUMN:()=>ue,CONTEXTMENU_ITEMS_UNMERGE_CELLS:()=>ur,CONTEXT_MENU_ITEMS_NAMESPACE:()=>dW,DATA_PROVIDER_BUTTONS_REFETCH:()=>cJ,DATA_PROVIDER_ERRORS_CREATE:()=>cq,DATA_PROVIDER_ERRORS_FETCH:()=>cK,DATA_PROVIDER_ERRORS_REMOVE:()=>cQ,DATA_PROVIDER_ERRORS_REQUEST_FAILED:()=>cZ,DATA_PROVIDER_ERRORS_UPDATE:()=>cX,DATA_PROVIDER_NAMESPACE:()=>cY,EMPTY_DATA_STATE_BUTTONS_FILTERS_RESET:()=>c$,EMPTY_DATA_STATE_DESCRIPTION:()=>cz,EMPTY_DATA_STATE_DESCRIPTION_FILTERS:()=>cW,EMPTY_DATA_STATE_DESCRIPTION_LOADING:()=>cj,EMPTY_DATA_STATE_NAMESPACE:()=>cB,EMPTY_DATA_STATE_TITLE:()=>cV,EMPTY_DATA_STATE_TITLE_FILTERS:()=>cU,EMPTY_DATA_STATE_TITLE_LOADING:()=>cG,EXPORT_FILE_DIALOG_TITLE:()=>cF,EXPORT_FILE_NAMESPACE:()=>cL,FILTERS_BUTTONS_CANCEL:()=>u4,FILTERS_BUTTONS_CLEAR:()=>u6,FILTERS_BUTTONS_OK:()=>u5,FILTERS_BUTTONS_PLACEHOLDER_SEARCH:()=>u8,FILTERS_BUTTONS_PLACEHOLDER_SECOND_VALUE:()=>u7,FILTERS_BUTTONS_PLACEHOLDER_VALUE:()=>u9,FILTERS_BUTTONS_SELECT_ALL:()=>u3,FILTERS_CONDITIONS_AFTER:()=>uG,FILTERS_CONDITIONS_AFTER_OR_EQUAL:()=>uj,FILTERS_CONDITIONS_BEFORE:()=>uY,FILTERS_CONDITIONS_BEFORE_OR_EQUAL:()=>uK,FILTERS_CONDITIONS_BEGINS_WITH:()=>u_,FILTERS_CONDITIONS_BETWEEN:()=>uW,FILTERS_CONDITIONS_BY_VALUE:()=>uF,FILTERS_CONDITIONS_CONTAINS:()=>uD,FILTERS_CONDITIONS_EMPTY:()=>uN,FILTERS_CONDITIONS_ENDS_WITH:()=>uP,FILTERS_CONDITIONS_EQUAL:()=>uk,FILTERS_CONDITIONS_GREATER_THAN:()=>uB,FILTERS_CONDITIONS_GREATER_THAN_OR_EQUAL:()=>uV,FILTERS_CONDITIONS_LESS_THAN:()=>uz,FILTERS_CONDITIONS_LESS_THAN_OR_EQUAL:()=>uU,FILTERS_CONDITIONS_NAMESPACE:()=>uM,FILTERS_CONDITIONS_NONE:()=>uI,FILTERS_CONDITIONS_NOT_BETWEEN:()=>u$,FILTERS_CONDITIONS_NOT_CONTAIN:()=>uL,FILTERS_CONDITIONS_NOT_EMPTY:()=>uO,FILTERS_CONDITIONS_NOT_EQUAL:()=>uH,FILTERS_CONDITIONS_TODAY:()=>uq,FILTERS_CONDITIONS_TOMORROW:()=>uX,FILTERS_CONDITIONS_YESTERDAY:()=>uQ,FILTERS_DIVS_FILTER_BY_CONDITION:()=>uZ,FILTERS_DIVS_FILTER_BY_VALUE:()=>uJ,FILTERS_LABELS_CONJUNCTION:()=>u0,FILTERS_LABELS_DISJUNCTION:()=>u1,FILTERS_NAMESPACE:()=>uA,FILTERS_VALUES_BLANK_CELLS:()=>u2,FORMULA_BUILDER_ACCEPT_HINT:()=>gm,FORMULA_BUILDER_CELL_ADDRESS:()=>gg,FORMULA_BUILDER_CELL_ERROR:()=>gA,FORMULA_BUILDER_CELL_UNAVAILABLE:()=>gx,FORMULA_BUILDER_CLOSE:()=>gE,FORMULA_BUILDER_DEPENDENT_ERROR:()=>gM,FORMULA_BUILDER_DEPENDENT_ERRORS:()=>gI,FORMULA_BUILDER_EDITOR:()=>gu,FORMULA_BUILDER_FUNCTION_DESCRIPTION:()=>gC,FORMULA_BUILDER_FUNCTION_EXAMPLE:()=>gb,FORMULA_BUILDER_FUNCTION_HELP:()=>gw,FORMULA_BUILDER_FUNCTION_HELP_FOR:()=>gy,FORMULA_BUILDER_INPUT:()=>gc,FORMULA_BUILDER_INVALID_ADDRESS:()=>gT,FORMULA_BUILDER_LEARN_MORE:()=>gR,FORMULA_BUILDER_NAMESPACE:()=>gd,FORMULA_BUILDER_NAVIGATE_HINT:()=>gf,FORMULA_BUILDER_OPTIONAL_ARGUMENT:()=>gS,FORMULA_BUILDER_REPEATABLE_ARGUMENT:()=>gv,FORMULA_BUILDER_SUGGESTIONS:()=>gp,FREEZE_BAR_COLUMNS_END:()=>gr,FREEZE_BAR_COLUMNS_START:()=>gt,FREEZE_BAR_NAMESPACE:()=>c9,FREEZE_BAR_ROWS_BOTTOM:()=>ge,FREEZE_BAR_ROWS_TOP:()=>c7,LOADING_NAMESPACE:()=>cH,LOADING_TITLE:()=>c_,NESTED_ROWS_ANNOUNCEMENT_COLLAPSED:()=>go,NESTED_ROWS_ANNOUNCEMENT_EXPANDED:()=>gn,NESTED_ROWS_NAMESPACE:()=>gi,NOTIFICATION_BUTTONS_CLOSE:()=>cD,NOTIFICATION_NAMESPACE:()=>cP,OK:()=>dz,PAGINATION_COUNTER_SECTION:()=>cn,PAGINATION_FIRST_PAGE:()=>cs,PAGINATION_LAST_PAGE:()=>ch,PAGINATION_NAMESPACE:()=>ce,PAGINATION_NAV_SECTION:()=>co,PAGINATION_NEXT_PAGE:()=>ca,PAGINATION_PAGE_SIZE_AUTO:()=>cr,PAGINATION_PAGE_SIZE_SECTION:()=>ci,PAGINATION_PREV_PAGE:()=>cl,PAGINATION_SECTION:()=>ct,ROW_SELECTION_ANNOUNCE_COUNT:()=>c5,ROW_SELECTION_ANNOUNCE_ROW_DESELECTED:()=>c6,ROW_SELECTION_ANNOUNCE_ROW_SELECTED:()=>c3,ROW_SELECTION_MENU_CLEAR:()=>c8,ROW_SELECTION_MENU_REMOVE:()=>c4,ROW_SELECTION_NAMESPACE:()=>c0,ROW_SELECTION_SELECT_ALL:()=>c2,ROW_SELECTION_SELECT_ROW:()=>c1,SHEETS_BAR_ADD_SHEET:()=>cc,SHEETS_BAR_ALL_SHEETS:()=>cg,SHEETS_BAR_DEFAULT_SHEET_NAME:()=>cM,SHEETS_BAR_ITEMS_DELETE:()=>cf,SHEETS_BAR_ITEMS_DUPLICATE:()=>cw,SHEETS_BAR_ITEMS_MOVE_LEFT:()=>cC,SHEETS_BAR_ITEMS_MOVE_RIGHT:()=>cb,SHEETS_BAR_ITEMS_RENAME:()=>cy,SHEETS_BAR_NAMESPACE:()=>cd,SHEETS_BAR_PAGE_NEXT:()=>cv,SHEETS_BAR_PAGE_PREV:()=>cS,SHEETS_BAR_RENAME_NOT_CHANGED:()=>cT,SHEETS_BAR_RENAME_REJECTED:()=>cE,SHEETS_BAR_RENAME_SHEET:()=>cm,SHEETS_BAR_SECTION:()=>cu,SHEETS_BAR_SHEET_CHANGED:()=>cR,SHEETS_BAR_SHEET_DUPLICATED:()=>cx,SHEETS_BAR_SHEET_MENU:()=>cp,SHEETS_BAR_SHEET_MOVED:()=>cA});var S={};r.r(S),r.d(S,{ISO_DATETIME_REGEX:()=>yV,ISO_DATE_REGEX:()=>yO,TIME_REGEX:()=>yL,formatLocalDate:()=>yq,getDateTimeFormat:()=>yK,getNormalizedDate:()=>yk,getRelativeLocalDate:()=>y$,getTodayLocalDate:()=>yW,isSameLocalDay:()=>yG,isValidISODate:()=>yD,isValidISODateTime:()=>yU,isValidTime:()=>yB,parseToLocalDate:()=>yH,parseToLocalDateTime:()=>yz,parseToLocalTime:()=>yF});let v=e=>["tabindex",e],R=()=>["role","presentation"],E=()=>["role","gridcell"],T=()=>["role","gridcell button"],x=()=>["role","rowheader"],A=()=>["role","rowgroup"],M=()=>["role","columnheader"],I=()=>["role","row"],N=()=>["role","listbox"],O=()=>["role","group"],k=()=>["scope","col"],H=()=>["scope","row"],_=e=>["aria-label",e],P=e=>["aria-labelledby",e],D=e=>["aria-describedby",e],L=e=>["aria-description",e],F=()=>["aria-hidden","true"],B=(e=!0)=>["aria-disabled",e],V=e=>["aria-haspopup",e],z=e=>["aria-rowcount",e],U=e=>["aria-colcount",e],W=e=>["aria-rowindex",e],$=e=>["aria-colindex",e],G=e=>["aria-expanded",e],j=()=>["aria-readonly","true"],Y=()=>["aria-invalid","true"],K=e=>["aria-checked",e],q=()=>["aria-selected","true"],X=e=>["aria-setsize",e],Q=e=>["aria-posinset",e],Z=()=>["aria-busy","true"];function J(e){let t=e.length,r=0;for(;r<t;)e[r]=[e[r]],r+=1}function ee(e,t){let r=t.length,i=0;for(;i<r;)e.push(t[i]),i+=1}function et(e){let t=[];if(!e||0===e.length)return t;let r=e.length,i=0;for(let t=0;t<r;t++){let r=e[t];r&&r.length>i&&(i=r.length)}for(let n=0;n<i;n++){let i=Array(r);for(let t=0;t<r;t++){let r=e[t],o=r?r[n]:void 0;i[t]=void 0===o?null:o}t[n]=i}return t}function er(e,t,r,i){let n=-1,o=Array.isArray(e)?e:Array.from(e),s=o.length;i&&s&&(n+=1,r=o[n]);let l=r;for(n+=1;n<s;)l=t(l,o[n],n,o),n+=1;return l}function ei(e,t){let r=0,i=Array.isArray(e)?e:Array.from(e),n=i.length,o=[],s=-1;for(;r<n;){let e=i[r];t(e,r,i)&&(o[s+=1]=e),r+=1}return o}function en(e,t){let r=0,i=Array.isArray(e)?e:Array.from(e),n=i.length,o=[],s=-1;for(;r<n;){let e=i[r];o[s+=1]=t(e,r,i),r+=1}return o}function eo(e,t){let r,i=0,n=(r=Array.isArray(e)?e:Array.from(e)).length;for(;i<n&&!1!==t(r[i],i,r);)i+=1;return r}function es(e){return er(e,(e,t)=>e+t,0)}function el(e){return er(e,(e,t)=>void 0!==e&&e>t?e:t,e[0])}function ea(e){return er(e,(e,t)=>void 0!==e&&e<t?e:t,e[0])}function eh(e){return e.length?es(e)/e.length:0}function ed(e,t){let r=0;for(let i=0;i<e.length;i++)t.has(i)||(e[r]=e[i],r+=1);return e.length=r,e}function eu(e,t,r,i){if(r<=0)return e;let n=e.length,o=Math.min(t,n);e.length=n+r;for(let t=n-1;t>=o;t--)e[t+r]=e[t];return e.fill(i,o,o+r),e}function ec(e){let t=[],r=new Set;return eo(e,e=>{r.has(e)||(r.add(e),t.push(e))}),t}function eg(...e){let[t,...r]=[...e],i=t;return eo(r,e=>{let t=new Set(e);i=i.filter(e=>!t.has(e))}),i}function ep(...e){let t,r=[];eo(e,(i,n)=>{"function"==typeof i?n===e.length-1&&(t=i):r.push(i)});let[i,...n]=r,o=i;return eo(n,e=>{if(t)o=o.filter(r=>e.some(e=>t(r,e)));else{let t=new Set(e);o=o.filter(e=>t.has(e))}}),o}function em(...e){let[t,...r]=[...e],i=new Set(t);return eo(r,e=>{eo(e,e=>{i.has(e)||i.add(e)})}),Array.from(i)}function ef(e,t=" "){return e.split(t)}function ew(e,t=" "){return e.join(t)}function ey(e,...t){return er(Array.from(e),(e,r,i)=>{let n=r.replace(/\r?\n\s*/g,""),o=t[i];return e+n+(o||0===o?o:"")},"").trim()}let eb=/^[0-9a-fA-F]{25}$/;function eC(e){return"entitlement"===function(e){if("string"!=typeof e)return"unknown";let t=e.trim(),r=t.lastIndexOf("[");return -1!==r&&-1!==t.indexOf("]",r)?"entitlement":eb.test(t.replace(/-/g,""))?"legacy":"unknown"}(e)}let eS=["usage_until","release_until"],ev=[0x428a2f98,0xd728ae22,0x71374491,0x23ef65cd,0xb5c0fbcf,0xec4d3b2f,0xe9b5dba5,0x8189dbbc,0x3956c25b,0xf348b538,0x59f111f1,0xb605d019,0x923f82a4,0xaf194f9b,0xab1c5ed5,0xda6d8118,0xd807aa98,0xa3030242,0x12835b01,0x45706fbe,0x243185be,0x4ee4b28c,0x550c7dc3,0xd5ffb4e2,0x72be5d74,0xf27b896f,0x80deb1fe,0x3b1696b1,0x9bdc06a7,0x25c71235,0xc19bf174,0xcf692694,0xe49b69c1,0x9ef14ad2,0xefbe4786,0x384f25e3,0xfc19dc6,0x8b8cd5b5,0x240ca1cc,0x77ac9c65,0x2de92c6f,0x592b0275,0x4a7484aa,0x6ea6e483,0x5cb0a9dc,0xbd41fbd4,0x76f988da,0x831153b5,0x983e5152,0xee66dfab,0xa831c66d,0x2db43210,0xb00327c8,0x98fb213f,0xbf597fc7,0xbeef0ee4,0xc6e00bf3,0x3da88fc2,0xd5a79147,0x930aa725,0x6ca6351,0xe003826f,0x14292967,0xa0e6e70,0x27b70a85,0x46d22ffc,0x2e1b2138,0x5c26c926,0x4d2c6dfc,0x5ac42aed,0x53380d13,0x9d95b3df,0x650a7354,0x8baf63de,0x766a0abb,0x3c77b2a8,0x81c2c92e,0x47edaee6,0x92722c85,0x1482353b,0xa2bfe8a1,0x4cf10364,0xa81a664b,0xbc423001,0xc24b8b70,0xd0f89791,0xc76c51a3,0x654be30,0xd192e819,0xd6ef5218,0xd6990624,0x5565a910,0xf40e3585,0x5771202a,0x106aa070,0x32bbd1b8,0x19a4c116,0xb8d2d0c8,0x1e376c08,0x5141ab53,0x2748774c,0xdf8eeb99,0x34b0bcb5,0xe19b48a8,0x391c0cb3,0xc5c95a63,0x4ed8aa4a,0xe3418acb,0x5b9cca4f,0x7763e373,0x682e6ff3,0xd6b2b8a3,0x748f82ee,0x5defb2fc,0x78a5636f,0x43172f60,0x84c87814,0xa1f0ab72,0x8cc70208,0x1a6439ec,0x90befffa,0x23631e28,0xa4506ceb,0xde82bde9,0xbef9a3f7,0xb2c67915,0xc67178f2,0xe372532b,0xca273ece,0xea26619c,0xd186b8c7,0x21c0c207,0xeada7dd6,0xcde0eb1e,0xf57d4f7f,0xee6ed178,0x6f067aa,0x72176fba,0xa637dc5,0xa2c898a6,0x113f9804,0xbef90dae,0x1b710b35,0x131c471b,0x28db77f5,0x23047d84,0x32caab7b,0x40c72493,0x3c9ebe0a,0x15c9bebc,0x431d67c4,0x9c100d4c,0x4cc5d4be,0xcb3e42b6,0x597f299c,0xfc657e2a,0x5fcb6fab,0x3ad6faec,0x6c44198c,0x4a475817];function eR(e){return`00000000${(e>>>0).toString(16)}`.slice(-8)}function eE(e){let t=e.length,r=Math.ceil((t+17)/128),i=new Uint8Array(128*r);i.set(e),i[t]=128;let n=8*t,o=i.length;i[o-7]=255&Math.floor(n/0x1000000000000),i[o-6]=255&Math.floor(n/0x10000000000),i[o-5]=255&Math.floor(n/0x100000000),i[o-4]=n>>>24&255,i[o-3]=n>>>16&255,i[o-2]=n>>>8&255,i[o-1]=255&n;let s=[0x6a09e667,0xf3bcc908,0xbb67ae85,0x84caa73b,0x3c6ef372,0xfe94f82b,0xa54ff53a,0x5f1d36f1,0x510e527f,0xade682d1,0x9b05688c,0x2b3e6c1f,0x1f83d9ab,0xfb41bd6b,0x5be0cd19,0x137e2179],l=Array(80),a=Array(80);for(let e=0;e<r;e+=1){let t=128*e;for(let e=0;e<16;e+=1){let r=t+8*e;l[e]=(i[r]<<24|i[r+1]<<16|i[r+2]<<8|i[r+3])>>>0,a[e]=(i[r+4]<<24|i[r+5]<<16|i[r+6]<<8|i[r+7])>>>0}for(let e=16;e<80;e+=1){let t=l[e-2],r=a[e-2],i=l[e-15],n=a[e-15],o=(t>>>19|r<<13)^(r>>>29|t<<3)^t>>>6,s=(i>>>1|n<<31)^(i>>>8|n<<24)^i>>>7,h=(n>>>1|i<<31)^(n>>>8|i<<24)^(n>>>7|i<<25),d=(((r>>>19|t<<13)^(t>>>29|r<<3)^(r>>>6|t<<26))>>>0)+(a[e-7]>>>0)+(h>>>0)+(a[e-16]>>>0);a[e]=d>>>0,l[e]=(o>>>0)+(l[e-7]>>>0)+(s>>>0)+(l[e-16]>>>0)+Math.floor(d/0x100000000)>>>0}let r=s[0],n=s[1],o=s[2],h=s[3],d=s[4],u=s[5],c=s[6],g=s[7],p=s[8],m=s[9],f=s[10],w=s[11],y=s[12],b=s[13],C=s[14],S=s[15];for(let e=0;e<80;e+=1){let t=(p>>>14|m<<18)^(p>>>18|m<<14)^(m>>>9|p<<23),i=(m>>>14|p<<18)^(m>>>18|p<<14)^(p>>>9|m<<23),s=(r>>>28|n<<4)^(n>>>2|r<<30)^(n>>>7|r<<25),v=(n>>>28|r<<4)^(r>>>2|n<<30)^(r>>>7|n<<25),R=p&f^~p&y,E=r&o^r&d^o&d,T=n&h^n&u^h&u,x=(S>>>0)+(i>>>0)+((m&w^~m&b)>>>0)+(ev[2*e+1]>>>0)+(a[e]>>>0),A=x>>>0,M=(C>>>0)+(t>>>0)+(R>>>0)+(ev[2*e]>>>0)+(l[e]>>>0)+Math.floor(x/0x100000000)>>>0,I=(v>>>0)+(T>>>0),N=I>>>0,O=(s>>>0)+(E>>>0)+Math.floor(I/0x100000000)>>>0;C=y,S=b,y=f,b=w,f=p,w=m;let k=(g>>>0)+A;m=k>>>0,p=(c>>>0)+M+Math.floor(k/0x100000000)>>>0,c=d,g=u,d=o,u=h,o=r,h=n;let H=A+N;n=H>>>0,r=M+O+Math.floor(H/0x100000000)>>>0}let v=[r,n,o,h,d,u,c,g,p,m,f,w,y,b,C,S];for(let e=0;e<16;e+=2){let t=(s[e+1]>>>0)+(v[e+1]>>>0);s[e+1]=t>>>0,s[e]=(s[e]>>>0)+(v[e]>>>0)+Math.floor(t/0x100000000)>>>0}}return s.map(eR).join("")}function eT(e){let t=[];for(let r=0;r<e.length;r+=1){let i=e.charCodeAt(r);if(i>=55296&&i<=56319&&r+1<e.length){let t=e.charCodeAt(r+1);t>=56320&&t<=57343&&(i=(i-55296)*1024+(t-56320)+65536,r+=1)}i<128?t.push(i):i<2048?t.push(192|i>>6,128|63&i):i<65536?t.push(224|i>>12,128|i>>6&63,128|63&i):t.push(240|i>>18,128|i>>12&63,128|i>>6&63,128|63&i)}return t}function ex(e){let t="string"==typeof e?/^(\d{4})-(\d{2})-(\d{2})$/.exec(e):null;if(null===t)return null;let r=parseInt(t[1],10),i=parseInt(t[2],10),n=parseInt(t[3],10);if(r<100)return null;let o=Date.UTC(r,i-1,n),s=new Date(o);return s.getUTCFullYear()!==r||s.getUTCMonth()!==i-1||s.getUTCDate()!==n?null:o}let eA=/^[A-Za-z0-9\-_]+$/,eM=/^[0-9a-f]+$/,eI=/[\t\n\v\f\r \u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000\ufeff]+/g,eN=/\\[nrt]/g;function eO(e){return e.replace(eN,"").replace(eI,"")}function ek(e){return eO(e).normalize("NFC")}function eH(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function e_(e){return null!==e&&"object"==typeof e&&!Array.isArray(e)}function eP(e){return"number"==typeof e&&Number.isFinite(e)&&Math.floor(e)===e&&e>=0}function eD(e){return Array.isArray(e)&&e.every(e=>"string"==typeof e)}function eL(e,t,r){Object.defineProperty(e,t,{value:r,enumerable:!0,writable:!0,configurable:!0})}let eF=null,eB=null;function eV(e){return 864e5*Math.floor(e/864e5)}function ez(e,t){return(e-eV(t))/864e5}let eU="tier:";function eW(e){let t;switch(typeof e){case"string":case"number":t=`${e}`;break;case"object":t=null===e?"":e.toString();break;case"undefined":t="";break;default:t=e.toString()}return t}function e$(e){return void 0!==e}function eG(e){return void 0===e}function ej(e){return null===e||""===e||eG(e)}function eY(e){return"[object RegExp]"===Object.prototype.toString.call(e)}let eK="length",eq=e=>parseInt(e,16),eX=e=>parseInt(e,10),eQ=(e,t,r)=>e.substr(t,r),eZ=e=>(e.codePointAt(0)??0)-65,eJ=e=>`${e}`.replace(/\-/g,""),e0=e=>eq(eQ(eJ(e),eq("12"),eZ("F")))/(eq(eQ(eJ(e),eZ("B"),~~![][eK]))||9),e1=()=>"u">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),e2=!1,e3=new Set,e6={invalid:()=>ey`
|
|
32
32
|
The license key for Handsontable is invalid.\x20
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
To renew your license, contact sales@handsontable.com.`},usage_soft_stop:{severity:"error",message:tr},usage_hard_stop:{severity:"error",message:tr},release_expired:{severity:"error",message:({licensedUntil:e,hotVersion:t})=>ey`
|
|
50
50
|
The license key for Handsontable expired on ${e}, and is not valid for the installed\x20
|
|
51
51
|
version ${t}. Renew your license key or downgrade to a version released on or before\x20
|
|
52
|
-
${e}. If you need any help, contact us at sales@handsontable.com.`}},tn={trial_soft_stop:()=>[`${te} ${tt} `,{text:"Contact Sales",href:"mailto:sales@handsontable.com"},"."],release_expired:({licensedUntil:e,hotVersion:t})=>[`The license key for Handsontable expired on ${e}, and is not valid for the installed version ${t}. `,{text:"Renew",href:"https://handsontable.com/pricing",target:"_blank"},` your license key or downgrade to a version released on or before ${e}. If you need any help, contact us at `,{text:"sales@handsontable.com",href:"mailto:sales@handsontable.com"},"."]},to=Object.freeze(["trial_hard_stop","invalid","missing"]);function ts(e){return -1!==to.indexOf(e)}function tl(e){return"string"==typeof e?e.trim():e}function ta({className:e,key:t,element:r,releaseDate:i}){let n;if(eC(t=tl(t)))return function({className:e,key:t,element:r,releaseDate:i}){if(e1())return null;let{lifecycle:n,channels:o}=tc(t,i),{state:s}=n,l={daysRemaining:n.daysRemaining,licensedUntil:n.licensedUntil??void 0,hotVersion:"19.0.0-rc2"};if(o.console&&!e3.has(t??"")){let e="invalid"===s?{severity:"warn",message:()=>e6.invalid({})}:ti[s];e&&(console[e.severity](e.message(l)),e3.add(t??""))}if(!o.ui||!r||ts(s))return null;let a=tn[s];if(!a)return null;let h=r.ownerDocument,d=String(e),u=tg(h,d);return u.appendChild(tp(h,d,a(l))),r.appendChild(u),u}({className:e,key:t,element:r,releaseDate:i});let o=!ej(t),s="19.0.0-rc2",l="invalid",a="invalid",h=tm(t=eJ(t||""));if(o||h)if(h){let[e,r,o]=(i??"17/11/2026"??"").split("/").map(Number),s=Math.floor(Date.UTC(o,r-1,e)/864e5),h=e0(t);n=new Intl.DateTimeFormat("en-US",{year:"numeric",month:"long",day:"2-digit",timeZone:"UTC"}).format((h+1)*864e5),s>h?(l="expired",a="expired"):(l="valid",a="valid")}else l="invalid",a="invalid";else l="missing",a="missing";if(e1()&&(l="valid",a="valid"),e2||"valid"===l||(console.warn(e6[l]({keyValidityDate:n,hotVersion:s})),e2=!0),"valid"!==a&&!ts(a)&&r){let t=e4[a]({keyValidityDate:n,hotVersion:s});if(t.length>0){let i=r.ownerDocument,n=i.createElement("div"),o=i.createElement("div");return n.className=`handsontable ${e}`,o.className=`${e}_inner`,e5(o,t,i),n.appendChild(o),r.appendChild(n),n}}return null}function th(e){return new Date(e).toISOString().slice(0,10)}let td=Object.freeze({console:!0,ui:!0});function tu(e,t=null){return{state:e,isTrial:!1,daysRemaining:null,licensedUntil:t}}function tc(e,t){var r;let i,n=tl(e);if(e1())return{lifecycle:tu("legacy_valid"),channels:td,badge:!1,tiers:null};if(!eC(n))return{lifecycle:function(e,t){if(ej(e))return tu("missing");let r=eJ(e||"");if(!tm(r))return tu("invalid");let[i,n,o]=(t??"17/11/2026"??"").split("/").map(Number),s=Math.floor(Date.UTC(o,n-1,i)/864e5),l=e0(r);return s>l?tu("legacy_expired",th((l+1)*864e5)):tu("legacy_valid")}(n,t),channels:td,badge:!1,tiers:null};let o=function(e){if("string"!=typeof e)return null;if(e!==eF){let t=function(e){let t,r,i=e.lastIndexOf("[");if(-1===i)return null;let n=e.indexOf("]",i);if(-1===n)return null;let o=eO(e.slice(i+1,n));if(o.length<=128)return null;let s=o.slice(0,-128),l=o.slice(-128);if(!eA.test(s)||!eM.test(l)||eE(eT(s))!==l)return null;let a=null===(r=function(e){let t=`${e}`.replace(/-/g,"+").replace(/_/g,"/").replace(/=+$/,"");if(!/^[A-Za-z0-9+/]*$/.test(t)||t.length%4==1)return null;let r=[];for(let e=0;e<t.length;e+=4){let i=[0,1,2,3].map(r=>{let i=t.charAt(e+r);return""===i?-1:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".indexOf(i)});r.push(i[0]<<2|i[1]>>4),-1!==i[2]&&r.push((15&i[1])<<4|i[2]>>2),-1!==i[3]&&r.push((3&i[2])<<6|i[3])}return r}(s))?null:function(e){let t="",r=0;for(;r<e.length;){let i,n=e[r];n<128?(i=n,r+=1):n<224?(i=(31&n)<<6|63&e[r+1],r+=2):n<240?(i=(15&n)<<12|(63&e[r+1])<<6|63&e[r+2],r+=3):(i=(7&n)<<18|(63&e[r+1])<<12|(63&e[r+2])<<6|63&e[r+3],r+=4),i>=65536?(i-=65536,t+=String.fromCharCode(55296+(i>>10),56320+(1023&i))):t+=String.fromCharCode(i)}return t}(r);if(null===a)return null;try{t=JSON.parse(a)}catch(e){return null}if(!e_(t)||!e_(t.products))return null;let h=eH(p=t,"v")?!eP(p.v)||p.v<2?null:p.v:1;if(null===h||h>=2&&!function(e,t,r){if(""!==ek(r))return!1;let i=ek(t);return""!==i&&eH(e,"prose")&&"string"==typeof e.prose&&eE(eT(i)).slice(0,64)===e.prose}(t,e.slice(0,i),e.slice(n+1)))return null;let d={},u=t.products,c=!1;if(Object.keys(u).forEach(e=>{let t=function(e){if(!e_(e)||!eD(e.capabilities))return null;let t=eS.filter(t=>void 0!==e[t]);if(1!==t.length||null===ex(e[t[0]])||!eP(e.notice)||!eP(e.grace)||void 0!==e.flags&&!eD(e.flags))return null;let r={};return Object.keys(e).forEach(t=>eL(r,t,e[t])),eL(r,"capabilities",e.capabilities.slice()),eL(r,"notice",e.notice),eL(r,"grace",e.grace),eL(r,"flags",void 0===e.flags?[]:e.flags.slice()),eL(r,t[0],e[t[0]]),r}(u[e]);if(null===t){c=!0;return}eL(d,e,t)}),c)return null;var g,p,m={version:h,products:d};let f=[m];for(;f.length>0;){let e=f.pop();null===(g=e)||"object"!=typeof g||Object.isFrozen(g)||(Object.freeze(e),Object.keys(e).forEach(t=>f.push(e[t])))}return m}(e);eF=e,eB=t}return eB}(n),s=null===o?null:function(e,t){if(!eH(e.products,t))return null;let r=e.products[t];return e_(r)?r:null}(o,"handsontable");if(null===o||null===s)return{lifecycle:tu("invalid"),channels:td,badge:!1,tiers:null};let l=t||"17/11/2026";return{lifecycle:function(e,t){let r=-1!==e.flags.indexOf("trial");if(void 0!==e.release_until){let i=e.release_until;return{state:i>=t.buildDate||null===ex(t.buildDate)?"release_valid":"release_expired",isTrial:r,daysRemaining:null,licensedUntil:i}}let i=`${e.usage_until}`,n=ex(i)??eV(t.now),o=function(e,t,r){let i=e+864e5;if(r>=i)return r<i+864e5*t.grace?"soft_stop":"hard_stop";let n=ez(e,r);return t.notice>0&&n<=t.notice?"notice":"valid"}(n,e,t.now);return{state:`${r?"trial":"usage"}_${o}`,isTrial:r,daysRemaining:ez(n,t.now),licensedUntil:i}}(s,{now:Date.now(),buildDate:function(e){let[t,r,i]=`${e}`.split("/");return t&&r&&i?`${i}-${r.padStart(2,"0")}-${t.padStart(2,"0")}`:""}(l)}),channels:{console:-1===s.flags.indexOf("no-console-warns"),ui:-1===s.flags.indexOf("no-ui-warns")},badge:-1!==s.flags.indexOf("badge"),tiers:(r=s.capabilities,i=[],r.forEach(e=>{e.startsWith(eU)&&e.length>eU.length&&i.push(e.slice(eU.length))}),i.length>0?i:null)}}function tg(e,t){let r=e.createElement("div");return r.className=`handsontable ${t}`,r}function tp(e,t,r,i){let n=e.createElement("div");return n.className=i?`${t}_inner ${i}`:`${t}_inner`,e5(n,r,e),n}function tm(e){let t=[][eK],r=t;if(e[eK]!==eZ("Z"))return!1;for(let t="",i="B<H4P+".split(""),n=eZ(i.shift()??"A");n;n=eZ(i.shift()??"A"))--n<""[eK]?r|=(eX(`${eX(eq(t)+(eq(eQ(e,Math.abs(n),2))+String([])).padStart(2,"0"))}`)%97||2)>>1:t=eQ(e,n,n?1===i[eK]?9:8:6);return r===t}function tf(e){let t=Error(e);throw t.cause={handsontable:!0},t}function tw(e){let t;if(Array.isArray(e))t=e.length?Array(e.length).fill(null):[];else{let r=Object.create(null);tI(e,(e,t)=>{"__children"!==t&&(e&&"object"==typeof e&&!Array.isArray(e)?r[t]=tw(e):Array.isArray(e)?e.length&&"object"==typeof e[0]&&!Array.isArray(e[0])?r[t]=[tw(e[0])]:r[t]=[]:r[t]=null)}),t=r}return t}function ty(e,t){return t.prototype.constructor=t,e.prototype=new t,e.prototype.constructor=e,e}function tb(e,t,r){let i=Array.isArray(r);return tI(t,(t,n)=>{"__proto__"!==n&&"constructor"!==n&&"prototype"!==n&&(!1===i||r.includes(n))&&(e[n]=t)}),e}function tC(e,t){tI(t,(r,i)=>{if("__proto__"===i||"constructor"===i||"prototype"===i)return;let n=t[i];n&&"object"==typeof n?(e[i]||(Array.isArray(n)?e[i]=[]:"[object Date]"===Object.prototype.toString.call(n)?e[i]=n:e[i]={}),tC(e[i],n)):e[i]=n})}function tS(e){if(Array.isArray(e))return e.map(e=>tS(e));if(e instanceof Date)return new Date(e);if("object"==typeof e&&null!==e){let t={};for(let[r,i]of Object.entries(e))"__proto__"!==r&&"constructor"!==r&&"prototype"!==r&&(t[r]=tS(i));return t}return e}function tv(e){let t={};return tI(e,(e,r)=>{t[r]=e}),t}function tR(e,...t){return e.MIXINS||(e.MIXINS=[]),eo(t,t=>{e.MIXINS.push(t.MIXIN_NAME),tI(t,(t,r)=>{if(void 0!==e.prototype[r]&&tf(`Mixin conflict. Property '${r}' already exist and cannot be overwritten.`),"function"==typeof t)e.prototype[r]=t;else{let i,n;Object.defineProperty(e.prototype,r,{get:(i=`_${r}`,function(){let e;return void 0===this[i]&&(this[i]=((Array.isArray(e=t)||tx(e))&&(e=tS(e)),e)),this[i]}),set:(n=`_${r}`,function(e){this[n]=e}),configurable:!0})}})}),e}function tE(e,t){let r=e=>{if(void 0===e)return"undefined";if(Array.isArray(e))return`[${e.map(r).join(",")}]`;if(e instanceof Date)return JSON.stringify(e);if(null!==e&&"object"==typeof e){let t=Object.entries(e).sort(([e],[t])=>e.localeCompare(t)).map(([e,t])=>`${JSON.stringify(e)}:${r(t)}`);return`{${t.join(",")}}`}return JSON.stringify(e)};return r(e)===r(t)}function tT(e){return tx(e)}function tx(e){return"[object Object]"===Object.prototype.toString.call(e)}function tA(e){Array.isArray(e)?e.forEach((t,r)=>{"function"==typeof t?e[r]=null:tA(t)}):tx(e)&&Object.keys(e).forEach(t=>{"function"==typeof e[t]?delete e[t]:tA(e[t])})}function tM(e,t,r,i){i.value=r,i.writable=!1!==i.writable,i.enumerable=!1!==i.enumerable,i.configurable=!1!==i.configurable,Object.defineProperty(e,t,i)}function tI(e,t){for(let r in e)if((!e.hasOwnProperty||e.hasOwnProperty&&Object.prototype.hasOwnProperty.call(e,r))&&!1===t(e[r],r,e))break;return e}function tN(e,t){let r=t.split("."),i=e;for(let e=0;e<r.length;e+=1)if(void 0===(i=i[r[e]])||null===i&&e<r.length-1)return;return i}function tO(e,t,r){if("__proto__"===t||"constructor"===t||"prototype"===t)return;let i=Object.getOwnPropertyDescriptor(e,t);if(i&&(i.get||i.set)){"function"==typeof i.set&&i.set.call(e,r);return}if(i&&!1===i.configurable){!0===i.writable&&(e[t]=r);return}Object.defineProperty(e,t,{value:r,writable:!0,enumerable:!0,configurable:!0})}function tk(e,t,r){if("string"!=typeof t||null===e||"object"!=typeof e)return;let i=t.split("."),n=e;for(let e=0;e<i.length;e+=1){let t=i[e];if("__proto__"===t||"constructor"===t||"prototype"===t)return;if(e!==i.length-1){tP(n,t)||(n[t]={});let e=n[t];if(!tx(e))return;n=e}else tO(n,t,r)}}function tH(e){if(!tx(e))return 0;let t=function(e){let r=0;return tx(e)?tI(e,(e,i)=>{"__children"!==i&&(r+=t(e))}):r+=1,r};return t(e)}function t_(e,t="value"){let r=`_${t}`,i={_touched:!1,[r]:e,isTouched(){return!!this._touched},value:void 0};return Object.defineProperty(i,t,{get(){return this[r]},set(e){this._touched=!0,this[r]=e},enumerable:!0,configurable:!0}),i}function tP(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function tD(e,t){if("object"!=typeof e||null===e)return t;if("object"!=typeof t||null===t)return e;let r={};return Object.keys(t).forEach(i=>{let n=t[i],o=e[i];tx(n)?r[i]=tD(tx(o)?o:{},n):r[i]=tP(e,i)&&void 0!==o?o:n}),Object.keys(e).forEach(t=>{tP(r,t)||(r[t]=e[t])}),r}function tL(e={},t={}){let r={...e};return Object.keys(t).forEach(e=>{if("__proto__"===e||"constructor"===e||"prototype"===e)return;let i=t[e],n=r[e];tx(i)&&tx(n)?r[e]=tL(n,i):r[e]=i}),r}function tF(e){return tx(e)&&e$(e.key)&&e$(e.value)}function tB(e){return window.requestAnimationFrame(e)}function tV(e){window.cancelAnimationFrame(e)}function tz(e,t=100){return"function"==typeof window.requestIdleCallback?window.requestIdleCallback(()=>e(),{timeout:t}):window.requestAnimationFrame(e)}function tU(e){"function"==typeof window.cancelIdleCallback?window.cancelIdleCallback(e):window.cancelAnimationFrame(e)}function tW(){return"ontouchstart"in window}function t$(){return"u">typeof window}function tG(t,r={}){return e||(e="object"==typeof Intl?new Intl.Collator(t,r).compare:"function"==typeof String.prototype.localeCompare?(e,t)=>`${e}`.localeCompare(t):(e,t)=>e===t?0:e>t?-1:1)}let tj=e=>{let t={value:!1,test(r,i){t.value=e(r,i)}};return t},tY=/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i,tK={chrome:tj((e,t)=>/Chrome/.test(e)&&/Google/.test(t??"")),chromeWebKit:tj(e=>/CriOS/.test(e)),edge:tj(e=>/Edge/.test(e)),edgeWebKit:tj(e=>/EdgiOS/.test(e)),firefox:tj(e=>/Firefox/.test(e)),firefoxWebKit:tj(e=>/FxiOS/.test(e)),mobile:tj(e=>tY.test(e)),safari:tj((e,t)=>/Safari/.test(e)&&/Apple Computer/.test(t??"")),safariBefore261:tj((e,t)=>{if(!/Safari/.test(e)||!/Apple Computer/.test(t??""))return!1;let r=/Version\/(\d+(?:\.\d+)?)/i.exec(e);return(r?Number.parseFloat(r[1]):0)<26.1})},tq={mac:tj(e=>/^Mac/.test(e)),win:tj(e=>/^Win/.test(e)),linux:tj(e=>/^Linux/.test(e)),ios:tj(e=>/iPhone|iPad|iPod/i.test(e))};function tX({userAgent:e=navigator.userAgent,vendor:t=navigator.vendor}={}){tI(tK,({test:r})=>r(e,t))}function tQ({platform:e=navigator.platform}={}){tI(tq,({test:t})=>t(e))}function tZ(){return tK.chrome.value}function tJ(){return tK.chromeWebKit.value}function t0(){return tK.firefox.value}function t1(){return tK.firefoxWebKit.value}function t2(){return tK.safari.value}function t3(){return tK.safariBefore261.value}function t6(){return tK.edge.value}function t5(){return tK.edgeWebKit.value}function t4(e){return"string"==typeof e?.userAgent?tY.test(e.userAgent):tK.mobile.value}function t8(){return tq.ios.value}function t9(e){let t=(e??navigator).maxTouchPoints??0,r="string"==typeof e?.platform?/^Mac/.test(e.platform):tq.mac.value;return t>2&&r}function t7(e){return t4(e)||t9(e)}function re(){return tq.win.value}function rt(){return tq.mac.value}function rr(){return tq.linux.value}function ri(e,t={}){return`${e}`.replace(/(?:\\)?\[([^[\]]+)]/g,(e,r)=>"\\"===e.charAt(0)?e.substr(1,e.length-1):void 0===t[r]?"":String(t[r]))}function rn(...e){e$(console)&&console.warn(...e)}t$()&&(tX(),tQ());let ro=new WeakMap;function rs(e,t,...r){let i=ro.get(e);void 0===i&&(i=new Set,ro.set(e,i)),i.has(t)||(i.add(t),rn(...r))}let rl=new Set;function ra(e,t){rl.has(e)||e$(console)&&(rl.add(e),console.warn(t))}function rh(e,t){ra(e,`Deprecated: ${t}`)}function rd(...e){e$(console)&&console.error(...e)}let ru="bottom",rc="inline_start",rg="inline_end",rp="top_inline_start_corner",rm="bottom_inline_start_corner",rf="top_inline_end_corner",rw="bottom_inline_end_corner",ry=["top",ru,rc,rg,rp,rm,rf,rw],rb=[rg,rf,rw],rC="htScrollbarClearanceFillers",rS="htScrollbarClearanceFiller",rv="htScrollbarProxy",rR="htOverlayRail",rE=new Map([["top","ht_clone_top"],[ru,`ht_clone_${ru}`],[rc,`ht_clone_${rc} ht_clone_left`],[rp,`ht_clone_${rp} ht_clone_top_left_corner`],[rm,`ht_clone_${rm} ht_clone_bottom_left_corner`],[rg,`ht_clone_${rg}`],[rf,`ht_clone_${rf}`],[rw,`ht_clone_${rw}`]]);function rT(e,t=0){let r=-1,i=null,n=e;for(;null!==n;){if(r===t){i=iG(n)?n:null;break}iq(n)?n=n.host:(r+=1,n=n.parentNode)}return i}function rx(e,t){let r=e.closest(".handsontable");if(!r)return!1;let i=r.parentNode;return iG(i)&&i.classList.contains(rR)&&(i=i.parentNode),r===t||i===t}function rA(e){return e.target}function rM(e){let t=rA(e);if(null===t||"function"!=typeof e.composedPath)return t;let[r]=e.composedPath();return iG(r)&&r!==t&&iX(r).includes(t)?r:t}function rI(e){let{frameElement:t}=e;return e.parent&&Object.getPrototypeOf(e.parent)&&t instanceof HTMLIFrameElement?t:null}function rN(e){return rI(e)?e.parent:null}function rO(e){return!!Object.getPrototypeOf(e.parent)}function rk(e,t=[],r){let{ELEMENT_NODE:i,DOCUMENT_FRAGMENT_NODE:n}=Node,o=e;for(;null!=o&&o!==r;){let{nodeType:e,nodeName:r}=o;if(e===i&&iG(o)&&(t.includes(r)||t.includes(o)))return o;o=iq(o)?o.host:o.parentNode}return null}function rH(e,t,r){let i=[],n=iG(e)?e:null;for(;n&&(n=rk(n,t,r))&&(!r||r.contains(n));)if(i.push(n),iq(n)){let{host:e}=n;n=iG(e)?e:null}else n=n.parentElement;let o=i.length;return o?i[o-1]:null}function r_(e,t){let r={element:void 0,classNames:[]},i=e;for(;null!==i&&i!==e.ownerDocument.documentElement&&!r.element;){if("string"==typeof t&&i.classList.contains(t))r.element=i,r.classNames.push(t);else if(t instanceof RegExp){let e=Array.from(i.classList).filter(e=>t.test(e));e.length&&(r.element=i,r.classNames.push(...e))}i=i.parentElement}return r}function rP(e,t){let r=e.parentNode,i=[];for("string"==typeof t?i=e instanceof Document?Array.from(e.querySelectorAll(t)):Array.from(e.ownerDocument.querySelectorAll(t)):i.push(t);null!==r;){if(i.indexOf(r)>-1)return!0;r=r.parentNode}return!1}function rD(e){let t=0,r=e;if(r.previousSibling)for(;r=r.previousSibling;)t+=1;return t}function rL(e,t,r){let i=r.parentElement?.querySelector(`.ht_clone_${e}`);return!!i&&i.contains(t)}function rF(e){if(!e||!e.classList||!e.parentNode||!e.parentNode.parentNode||e.classList.contains("hiddenHeader")||"none"===e.style.display)return!1;let t=e.parentNode,r=Array.from(t?.parentNode?.childNodes??[]);return(t?r.indexOf(t):-1)+(Number.parseInt(e.getAttribute("rowspan")??"",10)||1)>=r.length}function rB(e){return e&&e.length?e.filter(e=>!!e):[]}function rV(e){return Array.isArray(e)?rB(e):"string"==typeof e?rB(e.split(" ")):[]}function rz(e,t){if(!e||!e.length)return t?{regexFree:[],regexes:[]}:[];let r=[],i=[];return i.push(...e.filter(e=>{let i=e instanceof RegExp;return i&&t&&r.push(e),!i})),t?{regexFree:i,regexes:r}:i}function rU(e,t){return void 0!==e.classList&&"string"==typeof t&&""!==t&&e.classList.contains(t)}function rW(e,t){"string"==typeof t&&(t=t.split(" ")),(t=rB(t)).length>0&&e.classList.add(...t)}function r$(e,t){"string"==typeof t?t=t.split(" "):t instanceof RegExp&&(t=[t]);let{regexFree:r,regexes:i}=rz(t,!0);(r=rB(r)).length>0&&e.classList.remove(...r),i.forEach(t=>{e.classList.forEach(r=>{t.test(r)&&e.classList.remove(r)})})}function rG(e,t=[],r){Array.isArray(t)||(t=[[t,r??""]]),t.forEach(t=>{Array.isArray(t)&&""!==t[0]&&e.setAttribute(t[0],String(t[1]))})}function rj(e,t=[]){"string"==typeof t?t=t.split(" "):t instanceof RegExp&&(t=[t]);let{regexFree:r,regexes:i}=rz(t,!0);if(r.forEach(t=>{""!==t&&e.removeAttribute(t)}),i.length>0){let t=e.getAttributeNames();for(let r=0;r<t.length;r++){let n=t[r];for(let t=0;t<i.length;t++)if(i[t].test(n)){e.removeAttribute(n);break}}}}function rY(e){if(3===e.nodeType)e.parentNode?.removeChild(e);else if(["TABLE","THEAD","TBODY","TFOOT","TR"].indexOf(e.nodeName)>-1){let t=e.childNodes;for(let e=t.length-1;e>=0;e--)rY(t[e])}}function rK(e){let t;for(;t=e.lastChild;)e.removeChild(t)}let rq=/(?:<\/?[a-z][^<>]*>)|(?:<[!?])|(?:&[a-z][a-z\d]+;)|(?:&#x?[\da-f]+;)/i,rX="sanitizer";function rQ(e){return`HTML content is being written to the DOM ("${e}") without a sanitizer. Configure the "sanitizer" option to prevent XSS vulnerabilities.`}let rZ={};function rJ(e,t,r=!0,i="innerHTML",n=rZ){if(rq.test(t)){let o;"function"==typeof r?o=r(t,i)??"":(!1!==r&&rs(n,rX,rQ(i)),o=t);let s=r2(e);if(""===o)return void rK(s);s.innerHTML=o}else r0(e,t)}function r0(e,t){let r=r2(e),i=r.firstChild;i&&3===i.nodeType&&null===i.nextSibling?i.textContent=t:(rK(r),r.appendChild(r.ownerDocument.createTextNode(t)))}let r1="htCellClip";function r2(e){let t=e.firstChild;return t&&t.nodeType===Node.ELEMENT_NODE&&null===t.nextSibling&&iG(t)&&rU(t,r1)?t:e}function r3(e){return e.previousElementSibling?.nodeName==="TH"}function r6(e,t,r){return(r?t.left-e.right:e.left-t.right)<.5}function r5(e,t){return e.top-t.bottom<.5}function r4(e){if("function"==typeof e.checkVisibility)return e.checkVisibility();let t=e.ownerDocument.documentElement,r=e.ownerDocument.defaultView,i=e;for(;i!==t;){if(null===i)return!1;if(iq(i)){let e=i.host;if(e.impl)return r4(e.impl);return r4(e)}if(i.nodeType===Node.DOCUMENT_FRAGMENT_NODE)return!1;else if(i.nodeType===Node.ELEMENT_NODE&&iG(i)&&r?.getComputedStyle(i).display==="none")return!1;i=i.parentNode}return!0}function r8(e){let t=e.ownerDocument.defaultView,r=e;for(;r.parentElement;){if("0px"===r.style.height||"0"===r.style.height){let e=t?.getComputedStyle(r).getPropertyValue("overflow");return"hidden"===e||"clip"===e}r=r.parentElement}return!1}function r9(e){let t,r,i,n=e.ownerDocument,o=n.defaultView,s=n.documentElement,l=e;for(t=l.offsetLeft,r=l.offsetTop,i=l;(l=iG(l.offsetParent)?l.offsetParent:null)&&l!==n.body&&"offsetLeft"in l;)t+=l.offsetLeft,r+=l.offsetTop,i=l;return i&&"fixed"===i.style.position&&(t+=(o?.pageXOffset??0)||s.scrollLeft,r+=(o?.pageYOffset??0)||s.scrollTop),{left:t,top:r}}function r7(e=window){return e.scrollY}function ie(e=window){return e.scrollX}function it(e,t=window){return iG(e)?e.scrollTop:r7(t)}function ir(e,t=window){return iG(e)?e.scrollLeft:ie(t)}function ii(e){let t=e.ownerDocument,r=t.defaultView,i=["auto","scroll"],n=e.parentElement;for(;n&&n.style&&t.body!==n;){let{overflow:e,overflowX:t,overflowY:o}=n.style;if([e,t,o].includes("scroll")||(r&&({overflow:e,overflowX:t,overflowY:o}=r.getComputedStyle(n)),i.includes(e)||i.includes(t)||i.includes(o))||n.clientHeight<=n.scrollHeight+1&&(i.includes(o)||i.includes(e))||n.clientWidth<=n.scrollWidth+1&&(i.includes(t)||i.includes(e)))return n;n=n.parentElement}return r??t.documentElement}function io(e){return e.scrollHeight-e.clientHeight}function is(e){return e.scrollWidth-e.clientWidth}let il=["scroll","hidden","auto","clip"],ia=["visible","clip","hidden","scroll","auto","overlay"];function ih(e,t){return il.includes(e)&&("clip"!==e||"visible"!==t&&""!==t)}function id(e,t){let[r="",i=r]=e.style.overflow.split(/\s+/).filter(Boolean),n=(e,r,i)=>{let n=e||r;return ia.includes(n)?n:t.getPropertyValue(i)};return{x:n(e.style.overflowX,r,"overflow-x"),y:n(e.style.overflowY,i,"overflow-y")}}let iu=["transform","translate","rotate","scale","perspective","filter","backdropFilter"],ic=["paint","layout","strict","content"],ig=["transform","translate","rotate","scale","perspective","filter","backdrop-filter","contain"];function ip(e){let t=e.ownerDocument,r=t.defaultView,i={top:0,left:0,width:t.documentElement.clientWidth,height:t.documentElement.clientHeight};if(!r)return i;let n=e.parentNode;for(;n&&n!==t.documentElement;){if(iq(n)){n=n.host;continue}if(!iG(n)){n=n.parentNode;continue}let e=n,t=r.getComputedStyle(e);if(function(e){if(iu.some(t=>{let r=e[t];return void 0!==r&&""!==r&&"none"!==r}))return!0;let t=e.contain??"";if(ic.some(e=>t.split(/\s+/).includes(e)))return!0;let r=e.willChange??"";return ig.some(e=>r.split(/[\s,]+/).includes(e))}(t)){let r=e.getBoundingClientRect(),i=parseFloat(t.borderTopWidth)||0,n=parseFloat(t.borderLeftWidth)||0,o=parseFloat(t.borderBottomWidth)||0,s=parseFloat(t.borderRightWidth)||0;return{top:r.top+i,left:r.left+n,width:Math.max(r.width-n-s,0),height:Math.max(r.height-i-o,0)}}n=e.parentNode}return function(e,t,r){let{documentElement:i}=e;if(t.innerWidth<=i.clientWidth)return r;let n=e.createElement("div");n.style.cssText="position: fixed; top: 0; left: 0; right: 0; height: 0; visibility: hidden; pointer-events: none; margin: 0; padding: 0; border: 0;",i.appendChild(n);let{left:o,width:s}=n.getBoundingClientRect();return n.remove(),s>0?{...r,left:o,width:s}:r}(t,r,i)}function im(e,t){let r=e.ownerDocument,i=r.defaultView,n=e.parentElement;for(;n&&n.style&&r.body!==n;){if(void 0!==t){if(function(e,t,r){if(r){let i=id(e,r.getComputedStyle(e));return il.includes(i[t])}let[i="",n=i]=e.style.overflow.split(/\s+/).filter(Boolean),o="x"===t?e.style.overflowX||i:e.style.overflowY||n;return il.includes(o)}(n,t,i))return n}else if(i){let{x:e,y:t}=id(n,i.getComputedStyle(n));if(ih(e,t)||ih(t,e))return n}else if("visible"!==n.style.overflow&&""!==n.style.overflow)return n;n=n.parentElement}return i??r.documentElement}function iw(e,t,r=window){if(!e)return;if(e instanceof Window)return"width"===t?`${e.innerWidth}px`:"height"===t?`${e.innerHeight}px`:void 0;let i=e.style.getPropertyValue(t)||e.style[t];if(""!==i&&void 0!==i)return i;let n=r.getComputedStyle(e),o=n.getPropertyValue(t)||n[t];if(""!==o&&void 0!==o)return o}function iy(e,t){let r=!1;return t instanceof CSSStyleRule&&t.selectorText&&("msMatchesSelector"in e&&"function"==typeof e.msMatchesSelector?r=e.msMatchesSelector(t.selectorText):e.matches&&(r=e.matches(t.selectorText))),r}function ib(e){return e.offsetWidth}function iC(e){return e.offsetHeight}function iS(e){return e instanceof Window?e.innerHeight:e.clientHeight}function iv(e){return e instanceof Window?e.innerWidth:e.clientWidth}function iR(e,t,r){e.addEventListener(t,r,!1)}function iE(e,t,r){e.removeEventListener(t,r,!1)}function iT(e){return e.selectionStart?e.selectionStart:0}function ix(e){return e.selectionEnd?e.selectionEnd:0}function iA(e=window){let t=e.document,r="";return e.getSelection?r=e.getSelection()?.toString()??"":"selection"in t&&t.selection&&"Control"!==t.selection.type&&(r=t.selection.createRange().text),r}function iM(e=window){if(e.getSelection){let t=e.getSelection();t?.empty?t.empty():t?.removeAllRanges&&t.removeAllRanges()}}function iI(e,t,r){if((void 0===r&&(r=t),e.setSelectionRange)&&(e.focus(),null!==e.selectionStart))try{e.setSelectionRange(t,r)}catch(n){let i=e.parentElement;if(i){let n=i.style.display;i.style.display="block",e.setSelectionRange(t,r),i.style.display=n}}}function iN(e=document){return re()?2*!Number.isInteger(e.defaultView?.devicePixelRatio||1):0}function iO(e=document){return void 0===t&&(t=function(e=document){let t=(t=!1)=>{let r=e.createElement("div");r.style.height="200px",r.style.width="100%";let i=e.createElement("div");i.classList.add("htScrollbarTest"),t&&i.classList.add("htScrollbarSafariTest"),i.style.boxSizing="content-box",i.style.height="150px",i.style.left="0px",i.style.overflow="hidden",i.style.position="absolute",i.style.top="0px",i.style.width="200px",i.style.visibility="hidden",i.appendChild(r),e.body.appendChild(i);let n=r.offsetWidth;i.style.overflow="scroll";let o=r.offsetWidth;return n===o&&(o=i.clientWidth),e.body.removeChild(i),n-o},r=t();return 0===r&&t3()&&!t7()?t(!0):r}(e)),t}function ik(e){return e instanceof Window?e.document.body.scrollHeight>e.innerHeight:e.offsetWidth!==e.clientWidth}function iH(e){return e instanceof Window?e.document.body.scrollWidth>e.innerWidth:e.offsetHeight!==e.clientHeight}function i_(e,t,r){e.style.transform=`translate3d(${t},${r},0)`}function iP(e){let t;return e.style.transform&&""!==(t=e.style.transform)?["transform",t]:-1}function iD(e){e.style.transform&&""!==e.style.transform&&(e.style.transform="")}function iL(e){return e&&(["INPUT","SELECT","TEXTAREA"].indexOf(e.nodeName)>-1||"true"===e.contentEditable)}function iF(e){return iL(e)&&"hotInput"in e.dataset==!1}function iB(e){let t=iQ(e.ownerDocument);iG(t)&&!iF(t)&&(e instanceof HTMLInputElement||e instanceof HTMLTextAreaElement)&&e.select()}function iV(e){return!e.parentNode}function iz(e,t){let r=new IntersectionObserver((e,r)=>{e.forEach(e=>{e.isIntersecting&&(t(),r.disconnect())})});return r.observe(e),r}function iU(e,t=!0,r=!0){let i=e.ownerDocument,n=i.createRange(),o=i.defaultView?.getSelection();if(rG(e,"contenteditable",!0),r){let t=F();rG(e,t[0],t[1])}t&&rW(e,"invisibleSelection"),n.selectNodeContents(e),o?.removeAllRanges(),o?.addRange(n)}function iW(e,t=!0){let r=e.ownerDocument.defaultView?.getSelection();e.hasAttribute("aria-hidden")&&e.removeAttribute("aria-hidden"),r?.removeAllRanges(),t&&r$(e,"invisibleSelection"),e.removeAttribute("contenteditable")}function i$(e,t,r=!0){iU(e,r),t(),iW(e,r)}function iG(e){if("object"!=typeof e||null===e)return!1;let t=e.ownerDocument?.defaultView?.Element;return!!(t&&e instanceof t)}function ij(e){if("object"!=typeof e||null===e)return!1;if("u">typeof DocumentFragment&&e instanceof DocumentFragment)return!0;let t=e.ownerDocument?.defaultView?.DocumentFragment;return!!(t&&e instanceof t)}function iY(e){return iG(e)&&("TD"===e.tagName||"TH"===e.tagName)}function iK(e){return"INPUT"===e.tagName}function iq(e){return"object"==typeof e&&null!==e&&"nodeType"in e&&e.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&"host"in e}function iX(e){let t=[],r=e.getRootNode();for(;iq(r);){let{host:e}=r;if(!iG(e))break;t.push(e),r=e.getRootNode()}return t}function iQ(e){let t=e.activeElement;for(;t?.shadowRoot?.activeElement;)t=t.shadowRoot.activeElement;return t}function iZ(e,t){return e.childNodes[t]||null}function iJ(e){e.hasAttribute("style")&&e.removeAttribute("style")}let i0="_renderVersion";function i1(e){e[i0]=(e[i0]??0)+1}class i2{#e=0;get epoch(){return this.#e}markAllChanged(){this.#e+=1}}function i3(e){return"function"==typeof e}function i6(e,t=200){let r=0,i={lastCallThrottled:!0},n=null;return function(...o){let s=Date.now(),l=!1;i.lastCallThrottled=!0,r||(r=s,l=!0);let a=t-(s-r);return l?(i.lastCallThrottled=!1,e.apply(this,o)):(n&&clearTimeout(n),n=setTimeout(()=>{i.lastCallThrottled=!1,e.apply(this,o),r=0,n=null},a)),i}}function i5(e,t=200,r=10){let i=i6(e,t),n=r;function o(...t){return n?(n-=1,e.apply(this,t)):i.apply(this,t)}return o.clearHits=function(){n=r},o}function i4(e,t=200){let r,i=null;function n(...o){return i&&clearTimeout(i),i=setTimeout(()=>{i=null,r=e.apply(this,o)},t),r}return n.cancel=function(){null!==i&&(clearTimeout(i),i=null)},n}function i8(...e){let[t,...r]=e;return function(...e){return er(r,(e,t)=>t(e),t.apply(this,e))}}function i9(e,...t){return function(...r){return e.apply(this,t.concat(r))}}function i7(e){let t=e.length;return function r(i){return function(...n){let o=i.concat(n);return o.length>=t?e.apply(this,o):r(o)}}([])}function ne(e){let t=e.length;return function r(i){return function(...n){let o=i.concat(n.reverse());return o.length>=t?e.apply(this,o):r(o)}}([])}function nt(e,t,r,i,n,o,s,l){if(e$(l))return e.call(t,r,i,n,o,s,l);if(e$(s))return e.call(t,r,i,n,o,s);if(e$(o))return e.call(t,r,i,n,o);if(e$(n))return e.call(t,r,i,n);if(e$(i))return e.call(t,r,i);else if(e$(r))return e.call(t,r);return e.call(t)}let nr={ALT:18,ARROW_DOWN:40,ARROW_LEFT:37,ARROW_RIGHT:39,ARROW_UP:38,AUDIO_DOWN:t0()?182:174,AUDIO_MUTE:t0()?181:173,AUDIO_UP:t0()?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},ni=[nr.ALT,nr.ARROW_DOWN,nr.ARROW_LEFT,nr.ARROW_RIGHT,nr.ARROW_UP,nr.AUDIO_DOWN,nr.AUDIO_MUTE,nr.AUDIO_UP,nr.BACKSPACE,nr.CAPS_LOCK,nr.DELETE,nr.END,nr.ENTER,nr.ESCAPE,nr.F1,nr.F2,nr.F3,nr.F4,nr.F5,nr.F6,nr.F7,nr.F8,nr.F9,nr.F10,nr.F11,nr.F12,nr.F13,nr.F14,nr.F15,nr.F16,nr.F17,nr.F18,nr.F19,nr.HOME,nr.INSERT,nr.MEDIA_NEXT,nr.MEDIA_PLAY_PAUSE,nr.MEDIA_PREV,nr.MEDIA_STOP,nr.NULL,nr.NUM_LOCK,nr.PAGE_DOWN,nr.PAGE_UP,nr.PAUSE,nr.SCROLL_LOCK,nr.SHIFT,nr.TAB];function nn(e){return 32===e||e>=48&&e<=57||e>=96&&e<=111||e>=186&&e<=192||e>=219&&e<=222||e>=226||e>=65&&e<=90}function no(e){return ni.includes(e)}function ns(e){let t=[];return rt()?t.push(nr.COMMAND_LEFT,nr.COMMAND_RIGHT,nr.COMMAND_FIREFOX):t.push(nr.CONTROL),t.includes(e)}function nl(e){return[nr.CONTROL,nr.COMMAND_LEFT,nr.COMMAND_RIGHT,nr.COMMAND_FIREFOX].includes(e)}function na(e,t){let r=t.split("|"),i=!1;return eo(r,t=>{if(e===nr[t])return i=!0,!1}),i}function nh(e){e.isImmediatePropagationEnabled=!1,e.cancelBubble=!0}function nd(e){return!1===e.isImmediatePropagationEnabled}function nu(e){return 2===e.button}function nc(e){return 0===e.button}function ng(e){return 1===e.button}function np(e){return"u">typeof TouchEvent&&e instanceof TouchEvent}function nm(e){return"touches"in e&&"changedTouches"in e}function nf(e){if(!nm(e)||0===e.changedTouches.length)return null;let{identifier:t,clientX:r,clientY:i}=e.changedTouches[0];return{identifier:t,clientX:r,clientY:i}}function nw(e,t){if(!nm(e))return null;for(let r=0;r<e.touches.length;r++){let i=e.touches[r];if(i.identifier===t)return{identifier:i.identifier,clientX:i.clientX,clientY:i.clientY}}return null}function ny(e,t){let r={x:e.offsetX,y:e.offsetY},i=rA(e);if(!iG(t)||i!==t&&i.contains(t))return r;for(;i!==t;)r.x+=i.offsetLeft,r.y+=i.offsetTop,i=i.offsetParent;return r}let nb=3;function nC(e,t){return Math.abs(t.clientX-e.x)>nb||Math.abs(t.clientY-e.y)>nb}let nS=["afterCellMetaReset","afterChange","afterContextMenuDefaultOptions","beforeContextMenuSetItems","afterDropdownMenuDefaultOptions","beforeDropdownMenuSetItems","afterContextMenuHide","beforeContextMenuShow","afterContextMenuShow","afterCopyLimit","beforeCreateCol","afterColumnSequenceCacheUpdate","afterColumnSequenceChange","afterCreateCol","beforeCreateRow","afterCreateRow","beforeAlter","afterDeselect","afterDestroy","afterDocumentKeyDown","afterDrawSelection","beforeRemoveCellClassNames","beforeCompositionStart","afterFontsLoad","afterGetCellMeta","afterGetColHeader","afterGetRowHeader","afterImport","afterInit","afterLoadData","afterUpdateData","afterDataProviderFetch","afterDataProviderFetchError","afterDataProviderFetchAbort","hasExternalDataSource","beforeRowsMutation","afterRowsMutation","afterRowsMutationError","afterMomentumScroll","afterOnCellCornerMouseDown","afterOnSelectionHandleMouseDown","afterOnSelectionEdgeMouseDown","beforeMoveCells","afterMoveCells","afterOnCellCornerDblClick","afterOnCellMouseDown","afterOnCellMouseUp","afterOnCellContextMenu","afterOnCellMouseOver","afterOnCellMouseOut","afterOnCellMouseOverOutside","afterRemoveCol","afterRemoveRow","beforeRenderer","afterRenderer","afterRowIdsRemoved","afterRowIdsReset","afterRowSequenceCacheUpdate","afterRowSequenceChange","beforeViewportScrollVertically","beforeViewportScrollHorizontally","beforeViewportScroll","afterScrollHorizontally","afterScrollVertically","afterScroll","afterSelection","afterSelectionByProp","afterSelectionEnd","afterSelectionEndByProp","afterSelectionFocusSet","beforeSelectColumns","afterSelectColumns","beforeSelectRows","afterSelectRows","beforeSelectAll","afterSelectAll","afterSetCellMeta","afterRemoveCellMeta","afterSetDataAtCell","afterSetDataAtRowProp","afterSetSourceDataAtCell","afterSetTheme","afterUpdateSettings","afterValidate","beforeLanguageChange","afterLanguageChange","beforeAutofill","afterAutofill","afterAsyncValueStart","beforeAsyncValueStart","beforeAsyncValueResolve","afterAsyncValueResolve","afterAsyncValueReject","afterAsyncValueCancel","afterAsyncValuesIdle","beforeCellAlignment","beforeReadOnlyToggle","beforeChange","beforeChangeRender","beforeHeightChange","beforeWidthChange","beforeDrawBorders","beforeGetCellMeta","beforeRemoveCellMeta","beforeImport","beforeInit","beforeInitWalkontable","beforeLoadData","beforeUpdateData","beforeDataProviderFetch","beforeKeyDown","beforeOnCellMouseDown","beforeOnCellMouseUp","beforeOnCellContextMenu","beforeOnCellMouseOver","beforeOnCellMouseOut","beforeOnCellMouseOverOutside","beforeRemoveCol","beforeRemoveRow","beforeViewRender","afterViewRender","beforeRender","afterRender","beforeSuspendExecution","afterSuspendExecution","beforeResumeExecution","afterResumeExecution","beforeRowWrap","beforeColumnWrap","beforeSetCellMeta","beforeSelectionFocusSet","beforeSetRangeStartOnly","beforeSetRangeStart","beforeSetRangeEnd","beforeSelectionHighlightSet","beforeTouchScroll","beforeValidate","beforeValueRender","construct","init","modifyColHeader","modifyColWidth","modifyFiltersMultiSelectValue","modifyFiltersMatchedRows","modifyFocusedElement","modifyRowHeader","modifyRowHeight","modifyRowHeightByOverlayName","modifyData","modifySourceData","modifyRowData","modifyGetCellCoords","modifyGetCoordsElement","modifyFocusOnTabNavigation","beforeHighlightingRowHeader","beforeHighlightingColumnHeader","beforeColumnSort","afterColumnSort","modifyAutofillRange","modifyCopyableRange","beforeCut","afterCut","beforeCopy","afterCopy","beforePasteParse","beforePaste","afterPaste","beforeColumnFreeze","afterColumnFreeze","beforeColumnMove","afterColumnMove","afterCustomBordersUpdate","beforeColumnUnfreeze","afterColumnUnfreeze","beforeRowCollapse","afterRowCollapse","beforeRowExpand","afterRowExpand","beforeRowMove","afterRowMove","beforeFreezeChange","afterFreezeChange","beforeColumnResize","afterColumnResize","beforeRowResize","afterRowResize","afterGetColumnHeaderRenderers","afterGetRowHeaderRenderers","beforeStretchingColumnWidth","beforeFilter","afterFilter","beforePageChange","afterPageChange","beforePageSizeChange","afterPageSizeChange","afterPageSizeVisibilityChange","afterPageCounterVisibilityChange","afterPageNavigationVisibilityChange","beforeSheetTabChange","afterSheetTabChange","beforeSheetTabAdd","afterSheetTabAdd","beforeSheetTabRemove","afterSheetTabRemove","beforeSheetTabRename","afterSheetTabRename","beforeSheetTabMove","afterSheetTabMove","afterSheetTabStateCapture","afterSheetTabStateRestore","afterFormulasValuesUpdate","afterNamedExpressionAdded","afterNamedExpressionRemoved","afterSheetAdded","afterSheetRenamed","afterSheetRemoved","modifyColumnHeaderHeight","modifySinglePassLayout","modifyColumnHeaderValue","beforeUndo","beforeUndoStackChange","afterUndo","afterUndoStackChange","beforeRedo","beforeRedoStackChange","afterRedo","afterRedoStackChange","modifyRowHeaderWidth","modifyTransformFocus","modifyTransformStart","modifyTransformEnd","afterModifyTransformFocus","afterModifyTransformStart","afterModifyTransformEnd","afterViewportRowCalculatorOverride","afterViewportColumnCalculatorOverride","afterPluginsInitialized","beforeHideRows","afterHideRows","beforeUnhideRows","afterUnhideRows","beforeRowSelectionChange","afterRowSelectionChange","beforeHideColumns","afterHideColumns","beforeUnhideColumns","afterUnhideColumns","beforeTrimRow","afterTrimRow","beforeUntrimRow","afterUntrimRow","beforeDropdownMenuShow","afterDropdownMenuShow","afterDropdownMenuHide","beforeAddChild","afterAddChild","beforeDetachChild","afterDetachChild","beforeBeginEditing","afterDialogHide","afterDialogShow","beforeDialogHide","beforeDialogShow","dialogFocusPreviousElement","dialogFocusNextElement","afterDialogFocus","beforeLoadingShow","afterLoadingShow","beforeLoadingHide","afterLoadingHide","beforeEmptyDataStateShow","afterEmptyDataStateShow","beforeEmptyDataStateHide","afterEmptyDataStateHide","beforeNotificationShow","afterNotificationShow","beforeNotificationHide","afterNotificationHide","afterBeginEditing","beforeMergeCells","afterMergeCells","beforeUnmergeCells","afterUnmergeCells","afterListen","afterUnlisten","afterRefreshDimensions","beforeRefreshDimensions","beforeColumnCollapse","afterColumnCollapse","beforeColumnExpand","afterColumnExpand","modifyAutoColumnSizeSeed"],nv=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"],["persistentStateSave","17.0.0"],["persistentStateLoad","17.0.0"],["persistentStateReset","17.0.0"]]),nR=new Map([]),nE=Symbol.for("handsontable.forwardedHookCallback");function nT(e){if("function"!=typeof e)return e;let t=e[nE];return"function"==typeof t?t:e}class nx{#t=new Map;constructor(){nS.forEach(e=>this.#r(e))}getList(e){return this.#t.get(e)??null}getHooks(e){let t=this.#t.get(e),r=[];if(t){let e=t.head;for(;e;)r.push(e),e=e.next}return r}add(e,t,r={}){let i=this.#t.get(e);i||(i=this.#r(e),nS.push(e));let n=!!r.fromSettings,o=nT(t);for(let n=i.head;null!==n;n=n.next)if(n.identity===o)return void this.#i(e,n,t,r);let s=Number.isInteger(r.orderIndex)?r.orderIndex??0:0,l=!!r.runOnce,a=!!r.initialHook;if(a){for(let e=i.head;null!==e;e=e.next)if(e.initialHook){e.callback=t,e.identity=o,e.fromSettings=n;return}}this.#n(i,{callback:t,orderIndex:s,runOnce:l,initialHook:a,fromSettings:n,identity:o,next:null})}#i(e,t,r,i){r!==t.callback&&r!==t.identity&&(t.callback=r);let n=!!i.initialHook&&!!i.fromSettings&&!t.initialHook;if(t.runOnce&&!i.runOnce&&(t.runOnce=!1,t.fromSettings=!!i.fromSettings,t.initialHook=!!i.initialHook),!i.fromSettings&&!i.runOnce){t.fromSettings=!1,t.initialHook=!1;return}n&&this.#o(e,e=>e===t||!e.initialHook)}has(e){let t=this.#t.get(e);return!!t&&null!==t.head}remove(e,t){let r=nT(t);return this.#s(e,e=>e.identity===r)}removeFromSettings(e){return this.#o(e,()=>!1)}replaceFromSettings(e,t){if(Array.isArray(t)){let r=new Set(t.map(e=>nT(e)));this.#o(e,e=>r.has(e.identity)),t.forEach(t=>this.add(e,t,{fromSettings:!0}));return}let r=null;this.#o(e,e=>null===r&&!!e.initialHook&&(r=e,!0));let i=r,n=this.getHooks(e).some(e=>e!==i&&e.identity===nT(t));if(i&&!n){i.callback=t,i.identity=nT(t);return}i&&this.#o(e,e=>e!==i),this.add(e,t,{initialHook:!0,fromSettings:!0})}#o(e,t){let r=this.#t.get(e);if(!r)return 0;let i=[],n=0,o=null,s=r.head;for(r.head=null;null!==s;){let e=s.next;if(s.fromSettings&&!t(s))i.push(s),n+=1;else{o?o.next=s:r.head=s;for(let e=0;e<i.length;e+=1)i[e].next=s;i.length=0,o=s}s=e}for(let e=0;e<i.length;e+=1)i[e].next=null;return o&&(o.next=null),r.tail=o,n}#s(e,t){let r=this.#t.get(e);if(!r)return!1;let i=null,n=r.head;for(;null!==n;){if(t(n))return i?i.next=n.next:r.head=n.next,n===r.tail&&(r.tail=i),!0;i=n,n=n.next}return!1}destroy(){this.#t.clear()}#n(e,t){if(null===e.head){e.head=t,e.tail=t;return}if(t.orderIndex>=e.tail.orderIndex){e.tail.next=t,e.tail=t;return}let r=null,i=e.head;for(;null!==i&&i.orderIndex<=t.orderIndex;)r=i,i=i.next;null===r?(t.next=e.head,e.head=t):(t.next=i,r.next=t)}#r(e){let t={head:null,tail:null};return this.#t.set(e,t),t}}let nA=ey`The plugin hook "[hookName]" was removed in Handsontable [removedInVersion].\x20
|
|
52
|
+
${e}. If you need any help, contact us at sales@handsontable.com.`}},tn={trial_soft_stop:()=>[`${te} ${tt} `,{text:"Contact Sales",href:"mailto:sales@handsontable.com"},"."],release_expired:({licensedUntil:e,hotVersion:t})=>[`The license key for Handsontable expired on ${e}, and is not valid for the installed version ${t}. `,{text:"Renew",href:"https://handsontable.com/pricing",target:"_blank"},` your license key or downgrade to a version released on or before ${e}. If you need any help, contact us at `,{text:"sales@handsontable.com",href:"mailto:sales@handsontable.com"},"."]},to=Object.freeze(["trial_hard_stop","invalid","missing"]);function ts(e){return -1!==to.indexOf(e)}function tl(e){return"string"==typeof e?e.trim():e}function ta({className:e,key:t,element:r,releaseDate:i}){let n;if(eC(t=tl(t)))return function({className:e,key:t,element:r,releaseDate:i}){if(e1())return null;let{lifecycle:n,channels:o}=tc(t,i),{state:s}=n,l={daysRemaining:n.daysRemaining,licensedUntil:n.licensedUntil??void 0,hotVersion:"19.0.0-rc4"};if(o.console&&!e3.has(t??"")){let e="invalid"===s?{severity:"warn",message:()=>e6.invalid({})}:ti[s];e&&(console[e.severity](e.message(l)),e3.add(t??""))}if(!o.ui||!r||ts(s))return null;let a=tn[s];if(!a)return null;let h=r.ownerDocument,d=String(e),u=tg(h,d);return u.appendChild(tp(h,d,a(l))),r.appendChild(u),u}({className:e,key:t,element:r,releaseDate:i});let o=!ej(t),s="19.0.0-rc4",l="invalid",a="invalid",h=tm(t=eJ(t||""));if(o||h)if(h){let[e,r,o]=(i??"20/11/2026"??"").split("/").map(Number),s=Math.floor(Date.UTC(o,r-1,e)/864e5),h=e0(t);n=new Intl.DateTimeFormat("en-US",{year:"numeric",month:"long",day:"2-digit",timeZone:"UTC"}).format((h+1)*864e5),s>h?(l="expired",a="expired"):(l="valid",a="valid")}else l="invalid",a="invalid";else l="missing",a="missing";if(e1()&&(l="valid",a="valid"),e2||"valid"===l||(console.warn(e6[l]({keyValidityDate:n,hotVersion:s})),e2=!0),"valid"!==a&&!ts(a)&&r){let t=e4[a]({keyValidityDate:n,hotVersion:s});if(t.length>0){let i=r.ownerDocument,n=i.createElement("div"),o=i.createElement("div");return n.className=`handsontable ${e}`,o.className=`${e}_inner`,e5(o,t,i),n.appendChild(o),r.appendChild(n),n}}return null}function th(e){return new Date(e).toISOString().slice(0,10)}let td=Object.freeze({console:!0,ui:!0});function tu(e,t=null){return{state:e,isTrial:!1,daysRemaining:null,licensedUntil:t}}function tc(e,t){var r;let i,n=tl(e);if(e1())return{lifecycle:tu("legacy_valid"),channels:td,badge:!1,tiers:null};if(!eC(n))return{lifecycle:function(e,t){if(ej(e))return tu("missing");let r=eJ(e||"");if(!tm(r))return tu("invalid");let[i,n,o]=(t??"20/11/2026"??"").split("/").map(Number),s=Math.floor(Date.UTC(o,n-1,i)/864e5),l=e0(r);return s>l?tu("legacy_expired",th((l+1)*864e5)):tu("legacy_valid")}(n,t),channels:td,badge:!1,tiers:null};let o=function(e){if("string"!=typeof e)return null;if(e!==eF){let t=function(e){let t,r,i=e.lastIndexOf("[");if(-1===i)return null;let n=e.indexOf("]",i);if(-1===n)return null;let o=eO(e.slice(i+1,n));if(o.length<=128)return null;let s=o.slice(0,-128),l=o.slice(-128);if(!eA.test(s)||!eM.test(l)||eE(eT(s))!==l)return null;let a=null===(r=function(e){let t=`${e}`.replace(/-/g,"+").replace(/_/g,"/").replace(/=+$/,"");if(!/^[A-Za-z0-9+/]*$/.test(t)||t.length%4==1)return null;let r=[];for(let e=0;e<t.length;e+=4){let i=[0,1,2,3].map(r=>{let i=t.charAt(e+r);return""===i?-1:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".indexOf(i)});r.push(i[0]<<2|i[1]>>4),-1!==i[2]&&r.push((15&i[1])<<4|i[2]>>2),-1!==i[3]&&r.push((3&i[2])<<6|i[3])}return r}(s))?null:function(e){let t="",r=0;for(;r<e.length;){let i,n=e[r];n<128?(i=n,r+=1):n<224?(i=(31&n)<<6|63&e[r+1],r+=2):n<240?(i=(15&n)<<12|(63&e[r+1])<<6|63&e[r+2],r+=3):(i=(7&n)<<18|(63&e[r+1])<<12|(63&e[r+2])<<6|63&e[r+3],r+=4),i>=65536?(i-=65536,t+=String.fromCharCode(55296+(i>>10),56320+(1023&i))):t+=String.fromCharCode(i)}return t}(r);if(null===a)return null;try{t=JSON.parse(a)}catch(e){return null}if(!e_(t)||!e_(t.products))return null;let h=eH(p=t,"v")?!eP(p.v)||p.v<2?null:p.v:1;if(null===h||h>=2&&!function(e,t,r){if(""!==ek(r))return!1;let i=ek(t);return""!==i&&eH(e,"prose")&&"string"==typeof e.prose&&eE(eT(i)).slice(0,64)===e.prose}(t,e.slice(0,i),e.slice(n+1)))return null;let d={},u=t.products,c=!1;if(Object.keys(u).forEach(e=>{let t=function(e){if(!e_(e)||!eD(e.capabilities))return null;let t=eS.filter(t=>void 0!==e[t]);if(1!==t.length||null===ex(e[t[0]])||!eP(e.notice)||!eP(e.grace)||void 0!==e.flags&&!eD(e.flags))return null;let r={};return Object.keys(e).forEach(t=>eL(r,t,e[t])),eL(r,"capabilities",e.capabilities.slice()),eL(r,"notice",e.notice),eL(r,"grace",e.grace),eL(r,"flags",void 0===e.flags?[]:e.flags.slice()),eL(r,t[0],e[t[0]]),r}(u[e]);if(null===t){c=!0;return}eL(d,e,t)}),c)return null;var g,p,m={version:h,products:d};let f=[m];for(;f.length>0;){let e=f.pop();null===(g=e)||"object"!=typeof g||Object.isFrozen(g)||(Object.freeze(e),Object.keys(e).forEach(t=>f.push(e[t])))}return m}(e);eF=e,eB=t}return eB}(n),s=null===o?null:function(e,t){if(!eH(e.products,t))return null;let r=e.products[t];return e_(r)?r:null}(o,"handsontable");if(null===o||null===s)return{lifecycle:tu("invalid"),channels:td,badge:!1,tiers:null};let l=t||"20/11/2026";return{lifecycle:function(e,t){let r=-1!==e.flags.indexOf("trial");if(void 0!==e.release_until){let i=e.release_until;return{state:i>=t.buildDate||null===ex(t.buildDate)?"release_valid":"release_expired",isTrial:r,daysRemaining:null,licensedUntil:i}}let i=`${e.usage_until}`,n=ex(i)??eV(t.now),o=function(e,t,r){let i=e+864e5;if(r>=i)return r<i+864e5*t.grace?"soft_stop":"hard_stop";let n=ez(e,r);return t.notice>0&&n<=t.notice?"notice":"valid"}(n,e,t.now);return{state:`${r?"trial":"usage"}_${o}`,isTrial:r,daysRemaining:ez(n,t.now),licensedUntil:i}}(s,{now:Date.now(),buildDate:function(e){let[t,r,i]=`${e}`.split("/");return t&&r&&i?`${i}-${r.padStart(2,"0")}-${t.padStart(2,"0")}`:""}(l)}),channels:{console:-1===s.flags.indexOf("no-console-warns"),ui:-1===s.flags.indexOf("no-ui-warns")},badge:-1!==s.flags.indexOf("badge"),tiers:(r=s.capabilities,i=[],r.forEach(e=>{e.startsWith(eU)&&e.length>eU.length&&i.push(e.slice(eU.length))}),i.length>0?i:null)}}function tg(e,t){let r=e.createElement("div");return r.className=`handsontable ${t}`,r}function tp(e,t,r,i){let n=e.createElement("div");return n.className=i?`${t}_inner ${i}`:`${t}_inner`,e5(n,r,e),n}function tm(e){let t=[][eK],r=t;if(e[eK]!==eZ("Z"))return!1;for(let t="",i="B<H4P+".split(""),n=eZ(i.shift()??"A");n;n=eZ(i.shift()??"A"))--n<""[eK]?r|=(eX(`${eX(eq(t)+(eq(eQ(e,Math.abs(n),2))+String([])).padStart(2,"0"))}`)%97||2)>>1:t=eQ(e,n,n?1===i[eK]?9:8:6);return r===t}function tf(e){let t=Error(e);throw t.cause={handsontable:!0},t}function tw(e){let t;if(Array.isArray(e))t=e.length?Array(e.length).fill(null):[];else{let r=Object.create(null);tI(e,(e,t)=>{"__children"!==t&&(e&&"object"==typeof e&&!Array.isArray(e)?r[t]=tw(e):Array.isArray(e)?e.length&&"object"==typeof e[0]&&!Array.isArray(e[0])?r[t]=[tw(e[0])]:r[t]=[]:r[t]=null)}),t=r}return t}function ty(e,t){return t.prototype.constructor=t,e.prototype=new t,e.prototype.constructor=e,e}function tb(e,t,r){let i=Array.isArray(r);return tI(t,(t,n)=>{"__proto__"!==n&&"constructor"!==n&&"prototype"!==n&&(!1===i||r.includes(n))&&(e[n]=t)}),e}function tC(e,t){tI(t,(r,i)=>{if("__proto__"===i||"constructor"===i||"prototype"===i)return;let n=t[i];n&&"object"==typeof n?(e[i]||(Array.isArray(n)?e[i]=[]:"[object Date]"===Object.prototype.toString.call(n)?e[i]=n:e[i]={}),tC(e[i],n)):e[i]=n})}function tS(e){if(Array.isArray(e))return e.map(e=>tS(e));if(e instanceof Date)return new Date(e);if("object"==typeof e&&null!==e){let t={};for(let[r,i]of Object.entries(e))"__proto__"!==r&&"constructor"!==r&&"prototype"!==r&&(t[r]=tS(i));return t}return e}function tv(e){let t={};return tI(e,(e,r)=>{t[r]=e}),t}function tR(e,...t){return e.MIXINS||(e.MIXINS=[]),eo(t,t=>{e.MIXINS.push(t.MIXIN_NAME),tI(t,(t,r)=>{if(void 0!==e.prototype[r]&&tf(`Mixin conflict. Property '${r}' already exist and cannot be overwritten.`),"function"==typeof t)e.prototype[r]=t;else{let i,n;Object.defineProperty(e.prototype,r,{get:(i=`_${r}`,function(){let e;return void 0===this[i]&&(this[i]=((Array.isArray(e=t)||tx(e))&&(e=tS(e)),e)),this[i]}),set:(n=`_${r}`,function(e){this[n]=e}),configurable:!0})}})}),e}function tE(e,t){let r=e=>{if(void 0===e)return"undefined";if(Array.isArray(e))return`[${e.map(r).join(",")}]`;if(e instanceof Date)return JSON.stringify(e);if(null!==e&&"object"==typeof e){let t=Object.entries(e).sort(([e],[t])=>e.localeCompare(t)).map(([e,t])=>`${JSON.stringify(e)}:${r(t)}`);return`{${t.join(",")}}`}return JSON.stringify(e)};return r(e)===r(t)}function tT(e){return tx(e)}function tx(e){return"[object Object]"===Object.prototype.toString.call(e)}function tA(e){Array.isArray(e)?e.forEach((t,r)=>{"function"==typeof t?e[r]=null:tA(t)}):tx(e)&&Object.keys(e).forEach(t=>{"function"==typeof e[t]?delete e[t]:tA(e[t])})}function tM(e,t,r,i){i.value=r,i.writable=!1!==i.writable,i.enumerable=!1!==i.enumerable,i.configurable=!1!==i.configurable,Object.defineProperty(e,t,i)}function tI(e,t){for(let r in e)if((!e.hasOwnProperty||e.hasOwnProperty&&Object.prototype.hasOwnProperty.call(e,r))&&!1===t(e[r],r,e))break;return e}function tN(e,t){let r=t.split("."),i=e;for(let e=0;e<r.length;e+=1)if(void 0===(i=i[r[e]])||null===i&&e<r.length-1)return;return i}function tO(e,t,r){if("__proto__"===t||"constructor"===t||"prototype"===t)return;let i=Object.getOwnPropertyDescriptor(e,t);if(i&&(i.get||i.set)){"function"==typeof i.set&&i.set.call(e,r);return}if(i&&!1===i.configurable){!0===i.writable&&(e[t]=r);return}Object.defineProperty(e,t,{value:r,writable:!0,enumerable:!0,configurable:!0})}function tk(e,t,r){if("string"!=typeof t||null===e||"object"!=typeof e)return;let i=t.split("."),n=e;for(let e=0;e<i.length;e+=1){let t=i[e];if("__proto__"===t||"constructor"===t||"prototype"===t)return;if(e!==i.length-1){tP(n,t)||(n[t]={});let e=n[t];if(!tx(e))return;n=e}else tO(n,t,r)}}function tH(e){if(!tx(e))return 0;let t=function(e){let r=0;return tx(e)?tI(e,(e,i)=>{"__children"!==i&&(r+=t(e))}):r+=1,r};return t(e)}function t_(e,t="value"){let r=`_${t}`,i={_touched:!1,[r]:e,isTouched(){return!!this._touched},value:void 0};return Object.defineProperty(i,t,{get(){return this[r]},set(e){this._touched=!0,this[r]=e},enumerable:!0,configurable:!0}),i}function tP(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function tD(e,t){if("object"!=typeof e||null===e)return t;if("object"!=typeof t||null===t)return e;let r={};return Object.keys(t).forEach(i=>{let n=t[i],o=e[i];tx(n)?r[i]=tD(tx(o)?o:{},n):r[i]=tP(e,i)&&void 0!==o?o:n}),Object.keys(e).forEach(t=>{tP(r,t)||(r[t]=e[t])}),r}function tL(e={},t={}){let r={...e};return Object.keys(t).forEach(e=>{if("__proto__"===e||"constructor"===e||"prototype"===e)return;let i=t[e],n=r[e];tx(i)&&tx(n)?r[e]=tL(n,i):r[e]=i}),r}function tF(e){return tx(e)&&e$(e.key)&&e$(e.value)}function tB(e){return window.requestAnimationFrame(e)}function tV(e){window.cancelAnimationFrame(e)}function tz(e,t=100){return"function"==typeof window.requestIdleCallback?window.requestIdleCallback(()=>e(),{timeout:t}):window.requestAnimationFrame(e)}function tU(e){"function"==typeof window.cancelIdleCallback?window.cancelIdleCallback(e):window.cancelAnimationFrame(e)}function tW(){return"ontouchstart"in window}function t$(){return"u">typeof window}function tG(t,r={}){return e||(e="object"==typeof Intl?new Intl.Collator(t,r).compare:"function"==typeof String.prototype.localeCompare?(e,t)=>`${e}`.localeCompare(t):(e,t)=>e===t?0:e>t?-1:1)}let tj=e=>{let t={value:!1,test(r,i){t.value=e(r,i)}};return t},tY=/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i,tK={chrome:tj((e,t)=>/Chrome/.test(e)&&/Google/.test(t??"")),chromeWebKit:tj(e=>/CriOS/.test(e)),edge:tj(e=>/Edge/.test(e)),edgeWebKit:tj(e=>/EdgiOS/.test(e)),firefox:tj(e=>/Firefox/.test(e)),firefoxWebKit:tj(e=>/FxiOS/.test(e)),mobile:tj(e=>tY.test(e)),safari:tj((e,t)=>/Safari/.test(e)&&/Apple Computer/.test(t??"")),safariBefore261:tj((e,t)=>{if(!/Safari/.test(e)||!/Apple Computer/.test(t??""))return!1;let r=/Version\/(\d+(?:\.\d+)?)/i.exec(e);return(r?Number.parseFloat(r[1]):0)<26.1})},tq={mac:tj(e=>/^Mac/.test(e)),win:tj(e=>/^Win/.test(e)),linux:tj(e=>/^Linux/.test(e)),ios:tj(e=>/iPhone|iPad|iPod/i.test(e))};function tX({userAgent:e=navigator.userAgent,vendor:t=navigator.vendor}={}){tI(tK,({test:r})=>r(e,t))}function tQ({platform:e=navigator.platform}={}){tI(tq,({test:t})=>t(e))}function tZ(){return tK.chrome.value}function tJ(){return tK.chromeWebKit.value}function t0(){return tK.firefox.value}function t1(){return tK.firefoxWebKit.value}function t2(){return tK.safari.value}function t3(){return tK.safariBefore261.value}function t6(){return tK.edge.value}function t5(){return tK.edgeWebKit.value}function t4(e){return"string"==typeof e?.userAgent?tY.test(e.userAgent):tK.mobile.value}function t8(){return tq.ios.value}function t9(e){let t=(e??navigator).maxTouchPoints??0,r="string"==typeof e?.platform?/^Mac/.test(e.platform):tq.mac.value;return t>2&&r}function t7(e){return t4(e)||t9(e)}function re(){return tq.win.value}function rt(){return tq.mac.value}function rr(){return tq.linux.value}function ri(e,t={}){return`${e}`.replace(/(?:\\)?\[([^[\]]+)]/g,(e,r)=>"\\"===e.charAt(0)?e.substr(1,e.length-1):void 0===t[r]?"":String(t[r]))}function rn(...e){e$(console)&&console.warn(...e)}t$()&&(tX(),tQ());let ro=new WeakMap;function rs(e,t,...r){let i=ro.get(e);void 0===i&&(i=new Set,ro.set(e,i)),i.has(t)||(i.add(t),rn(...r))}let rl=new Set;function ra(e,t){rl.has(e)||e$(console)&&(rl.add(e),console.warn(t))}function rh(e,t){ra(e,`Deprecated: ${t}`)}function rd(...e){e$(console)&&console.error(...e)}let ru="bottom",rc="inline_start",rg="inline_end",rp="top_inline_start_corner",rm="bottom_inline_start_corner",rf="top_inline_end_corner",rw="bottom_inline_end_corner",ry=["top",ru,rc,rg,rp,rm,rf,rw],rb=[rg,rf,rw],rC="htScrollbarClearanceFillers",rS="htScrollbarClearanceFiller",rv="htScrollbarProxy",rR="htOverlayRail",rE=new Map([["top","ht_clone_top"],[ru,`ht_clone_${ru}`],[rc,`ht_clone_${rc} ht_clone_left`],[rp,`ht_clone_${rp} ht_clone_top_left_corner`],[rm,`ht_clone_${rm} ht_clone_bottom_left_corner`],[rg,`ht_clone_${rg}`],[rf,`ht_clone_${rf}`],[rw,`ht_clone_${rw}`]]);function rT(e,t=0){let r=-1,i=null,n=e;for(;null!==n;){if(r===t){i=iG(n)?n:null;break}iq(n)?n=n.host:(r+=1,n=n.parentNode)}return i}function rx(e,t){let r=e.closest(".handsontable");if(!r)return!1;let i=r.parentNode;return iG(i)&&i.classList.contains(rR)&&(i=i.parentNode),r===t||i===t}function rA(e){return e.target}function rM(e){let t=rA(e);if(null===t||"function"!=typeof e.composedPath)return t;let[r]=e.composedPath();return iG(r)&&r!==t&&iX(r).includes(t)?r:t}function rI(e){let{frameElement:t}=e;return e.parent&&Object.getPrototypeOf(e.parent)&&t instanceof HTMLIFrameElement?t:null}function rN(e){return rI(e)?e.parent:null}function rO(e){return!!Object.getPrototypeOf(e.parent)}function rk(e,t=[],r){let{ELEMENT_NODE:i,DOCUMENT_FRAGMENT_NODE:n}=Node,o=e;for(;null!=o&&o!==r;){let{nodeType:e,nodeName:r}=o;if(e===i&&iG(o)&&(t.includes(r)||t.includes(o)))return o;o=iq(o)?o.host:o.parentNode}return null}function rH(e,t,r){let i=[],n=iG(e)?e:null;for(;n&&(n=rk(n,t,r))&&(!r||r.contains(n));)if(i.push(n),iq(n)){let{host:e}=n;n=iG(e)?e:null}else n=n.parentElement;let o=i.length;return o?i[o-1]:null}function r_(e,t){let r={element:void 0,classNames:[]},i=e;for(;null!==i&&i!==e.ownerDocument.documentElement&&!r.element;){if("string"==typeof t&&i.classList.contains(t))r.element=i,r.classNames.push(t);else if(t instanceof RegExp){let e=Array.from(i.classList).filter(e=>t.test(e));e.length&&(r.element=i,r.classNames.push(...e))}i=i.parentElement}return r}function rP(e,t){let r=e.parentNode,i=[];for("string"==typeof t?i=e instanceof Document?Array.from(e.querySelectorAll(t)):Array.from(e.ownerDocument.querySelectorAll(t)):i.push(t);null!==r;){if(i.indexOf(r)>-1)return!0;r=r.parentNode}return!1}function rD(e){let t=0,r=e;if(r.previousSibling)for(;r=r.previousSibling;)t+=1;return t}function rL(e,t,r){let i=r.parentElement?.querySelector(`.ht_clone_${e}`);return!!i&&i.contains(t)}function rF(e){if(!e||!e.classList||!e.parentNode||!e.parentNode.parentNode||e.classList.contains("hiddenHeader")||"none"===e.style.display)return!1;let t=e.parentNode,r=Array.from(t?.parentNode?.childNodes??[]);return(t?r.indexOf(t):-1)+(Number.parseInt(e.getAttribute("rowspan")??"",10)||1)>=r.length}function rB(e){return e&&e.length?e.filter(e=>!!e):[]}function rV(e){return Array.isArray(e)?rB(e):"string"==typeof e?rB(e.split(" ")):[]}function rz(e,t){if(!e||!e.length)return t?{regexFree:[],regexes:[]}:[];let r=[],i=[];return i.push(...e.filter(e=>{let i=e instanceof RegExp;return i&&t&&r.push(e),!i})),t?{regexFree:i,regexes:r}:i}function rU(e,t){return void 0!==e.classList&&"string"==typeof t&&""!==t&&e.classList.contains(t)}function rW(e,t){"string"==typeof t&&(t=t.split(" ")),(t=rB(t)).length>0&&e.classList.add(...t)}function r$(e,t){"string"==typeof t?t=t.split(" "):t instanceof RegExp&&(t=[t]);let{regexFree:r,regexes:i}=rz(t,!0);(r=rB(r)).length>0&&e.classList.remove(...r),i.forEach(t=>{e.classList.forEach(r=>{t.test(r)&&e.classList.remove(r)})})}function rG(e,t=[],r){Array.isArray(t)||(t=[[t,r??""]]),t.forEach(t=>{Array.isArray(t)&&""!==t[0]&&e.setAttribute(t[0],String(t[1]))})}function rj(e,t=[]){"string"==typeof t?t=t.split(" "):t instanceof RegExp&&(t=[t]);let{regexFree:r,regexes:i}=rz(t,!0);if(r.forEach(t=>{""!==t&&e.removeAttribute(t)}),i.length>0){let t=e.getAttributeNames();for(let r=0;r<t.length;r++){let n=t[r];for(let t=0;t<i.length;t++)if(i[t].test(n)){e.removeAttribute(n);break}}}}function rY(e){if(3===e.nodeType)e.parentNode?.removeChild(e);else if(["TABLE","THEAD","TBODY","TFOOT","TR"].indexOf(e.nodeName)>-1){let t=e.childNodes;for(let e=t.length-1;e>=0;e--)rY(t[e])}}function rK(e){let t;for(;t=e.lastChild;)e.removeChild(t)}let rq=/(?:<\/?[a-z][^<>]*>)|(?:<[!?])|(?:&[a-z][a-z\d]+;)|(?:&#x?[\da-f]+;)/i,rX="sanitizer";function rQ(e){return`HTML content is being written to the DOM ("${e}") without a sanitizer. Configure the "sanitizer" option to prevent XSS vulnerabilities.`}let rZ={};function rJ(e,t,r=!0,i="innerHTML",n=rZ){if(rq.test(t)){let o;"function"==typeof r?o=r(t,i)??"":(!1!==r&&rs(n,rX,rQ(i)),o=t);let s=r2(e);if(""===o)return void rK(s);s.innerHTML=o}else r0(e,t)}function r0(e,t){let r=r2(e),i=r.firstChild;i&&3===i.nodeType&&null===i.nextSibling?i.textContent=t:(rK(r),r.appendChild(r.ownerDocument.createTextNode(t)))}let r1="htCellClip";function r2(e){let t=e.firstChild;return t&&t.nodeType===Node.ELEMENT_NODE&&null===t.nextSibling&&iG(t)&&rU(t,r1)?t:e}function r3(e){return e.previousElementSibling?.nodeName==="TH"}function r6(e,t,r){return(r?t.left-e.right:e.left-t.right)<.5}function r5(e,t){return e.top-t.bottom<.5}function r4(e){if("function"==typeof e.checkVisibility)return e.checkVisibility();let t=e.ownerDocument.documentElement,r=e.ownerDocument.defaultView,i=e;for(;i!==t;){if(null===i)return!1;if(iq(i)){let e=i.host;if(e.impl)return r4(e.impl);return r4(e)}if(i.nodeType===Node.DOCUMENT_FRAGMENT_NODE)return!1;else if(i.nodeType===Node.ELEMENT_NODE&&iG(i)&&r?.getComputedStyle(i).display==="none")return!1;i=i.parentNode}return!0}function r8(e){let t=e.ownerDocument.defaultView,r=e;for(;r.parentElement;){if("0px"===r.style.height||"0"===r.style.height){let e=t?.getComputedStyle(r).getPropertyValue("overflow");return"hidden"===e||"clip"===e}r=r.parentElement}return!1}function r9(e){let t,r,i,n=e.ownerDocument,o=n.defaultView,s=n.documentElement,l=e;for(t=l.offsetLeft,r=l.offsetTop,i=l;(l=iG(l.offsetParent)?l.offsetParent:null)&&l!==n.body&&"offsetLeft"in l;)t+=l.offsetLeft,r+=l.offsetTop,i=l;return i&&"fixed"===i.style.position&&(t+=(o?.pageXOffset??0)||s.scrollLeft,r+=(o?.pageYOffset??0)||s.scrollTop),{left:t,top:r}}function r7(e=window){return e.scrollY}function ie(e=window){return e.scrollX}function it(e,t=window){return iG(e)?e.scrollTop:r7(t)}function ir(e,t=window){return iG(e)?e.scrollLeft:ie(t)}function ii(e){let t=e.ownerDocument,r=t.defaultView,i=["auto","scroll"],n=e.parentElement;for(;n&&n.style&&t.body!==n;){let{overflow:e,overflowX:t,overflowY:o}=n.style;if([e,t,o].includes("scroll")||(r&&({overflow:e,overflowX:t,overflowY:o}=r.getComputedStyle(n)),i.includes(e)||i.includes(t)||i.includes(o))||n.clientHeight<=n.scrollHeight+1&&(i.includes(o)||i.includes(e))||n.clientWidth<=n.scrollWidth+1&&(i.includes(t)||i.includes(e)))return n;n=n.parentElement}return r??t.documentElement}function io(e){return e.scrollHeight-e.clientHeight}function is(e){return e.scrollWidth-e.clientWidth}let il=["scroll","hidden","auto","clip"],ia=["visible","clip","hidden","scroll","auto","overlay"];function ih(e,t){return il.includes(e)&&("clip"!==e||"visible"!==t&&""!==t)}function id(e,t){let[r="",i=r]=e.style.overflow.split(/\s+/).filter(Boolean),n=(e,r,i)=>{let n=e||r;return ia.includes(n)?n:t.getPropertyValue(i)};return{x:n(e.style.overflowX,r,"overflow-x"),y:n(e.style.overflowY,i,"overflow-y")}}let iu=["transform","translate","rotate","scale","perspective","filter","backdropFilter"],ic=["paint","layout","strict","content"],ig=["transform","translate","rotate","scale","perspective","filter","backdrop-filter","contain"];function ip(e){let t=e.ownerDocument,r=t.defaultView,i={top:0,left:0,width:t.documentElement.clientWidth,height:t.documentElement.clientHeight};if(!r)return i;let n=e.parentNode;for(;n&&n!==t.documentElement;){if(iq(n)){n=n.host;continue}if(!iG(n)){n=n.parentNode;continue}let e=n,t=r.getComputedStyle(e);if(function(e){if(iu.some(t=>{let r=e[t];return void 0!==r&&""!==r&&"none"!==r}))return!0;let t=e.contain??"";if(ic.some(e=>t.split(/\s+/).includes(e)))return!0;let r=e.willChange??"";return ig.some(e=>r.split(/[\s,]+/).includes(e))}(t)){let r=e.getBoundingClientRect(),i=parseFloat(t.borderTopWidth)||0,n=parseFloat(t.borderLeftWidth)||0,o=parseFloat(t.borderBottomWidth)||0,s=parseFloat(t.borderRightWidth)||0;return{top:r.top+i,left:r.left+n,width:Math.max(r.width-n-s,0),height:Math.max(r.height-i-o,0)}}n=e.parentNode}return function(e,t,r){let{documentElement:i}=e;if(t.innerWidth<=i.clientWidth)return r;let n=e.createElement("div");n.style.cssText="position: fixed; top: 0; left: 0; right: 0; height: 0; visibility: hidden; pointer-events: none; margin: 0; padding: 0; border: 0;",i.appendChild(n);let{left:o,width:s}=n.getBoundingClientRect();return n.remove(),s>0?{...r,left:o,width:s}:r}(t,r,i)}function im(e,t){let r=e.ownerDocument,i=r.defaultView,n=e.parentElement;for(;n&&n.style&&r.body!==n;){if(void 0!==t){if(function(e,t,r){if(r){let i=id(e,r.getComputedStyle(e));return il.includes(i[t])}let[i="",n=i]=e.style.overflow.split(/\s+/).filter(Boolean),o="x"===t?e.style.overflowX||i:e.style.overflowY||n;return il.includes(o)}(n,t,i))return n}else if(i){let{x:e,y:t}=id(n,i.getComputedStyle(n));if(ih(e,t)||ih(t,e))return n}else if("visible"!==n.style.overflow&&""!==n.style.overflow)return n;n=n.parentElement}return i??r.documentElement}function iw(e,t,r=window){if(!e)return;if(e instanceof Window)return"width"===t?`${e.innerWidth}px`:"height"===t?`${e.innerHeight}px`:void 0;let i=e.style.getPropertyValue(t)||e.style[t];if(""!==i&&void 0!==i)return i;let n=r.getComputedStyle(e),o=n.getPropertyValue(t)||n[t];if(""!==o&&void 0!==o)return o}function iy(e,t){let r=!1;return t instanceof CSSStyleRule&&t.selectorText&&("msMatchesSelector"in e&&"function"==typeof e.msMatchesSelector?r=e.msMatchesSelector(t.selectorText):e.matches&&(r=e.matches(t.selectorText))),r}function ib(e){return e.offsetWidth}function iC(e){return e.offsetHeight}function iS(e){return e instanceof Window?e.innerHeight:e.clientHeight}function iv(e){return e instanceof Window?e.innerWidth:e.clientWidth}function iR(e,t,r){e.addEventListener(t,r,!1)}function iE(e,t,r){e.removeEventListener(t,r,!1)}function iT(e){return e.selectionStart?e.selectionStart:0}function ix(e){return e.selectionEnd?e.selectionEnd:0}function iA(e=window){let t=e.document,r="";return e.getSelection?r=e.getSelection()?.toString()??"":"selection"in t&&t.selection&&"Control"!==t.selection.type&&(r=t.selection.createRange().text),r}function iM(e=window){if(e.getSelection){let t=e.getSelection();t?.empty?t.empty():t?.removeAllRanges&&t.removeAllRanges()}}function iI(e,t,r){if((void 0===r&&(r=t),e.setSelectionRange)&&(e.focus(),null!==e.selectionStart))try{e.setSelectionRange(t,r)}catch(n){let i=e.parentElement;if(i){let n=i.style.display;i.style.display="block",e.setSelectionRange(t,r),i.style.display=n}}}function iN(e=document){return re()?2*!Number.isInteger(e.defaultView?.devicePixelRatio||1):0}function iO(e=document){return void 0===t&&(t=function(e=document){let t=(t=!1)=>{let r=e.createElement("div");r.style.height="200px",r.style.width="100%";let i=e.createElement("div");i.classList.add("htScrollbarTest"),t&&i.classList.add("htScrollbarSafariTest"),i.style.boxSizing="content-box",i.style.height="150px",i.style.left="0px",i.style.overflow="hidden",i.style.position="absolute",i.style.top="0px",i.style.width="200px",i.style.visibility="hidden",i.appendChild(r),e.body.appendChild(i);let n=r.offsetWidth;i.style.overflow="scroll";let o=r.offsetWidth;return n===o&&(o=i.clientWidth),e.body.removeChild(i),n-o},r=t();return 0===r&&t3()&&!t7()?t(!0):r}(e)),t}function ik(e){return e instanceof Window?e.document.body.scrollHeight>e.innerHeight:e.offsetWidth!==e.clientWidth}function iH(e){return e instanceof Window?e.document.body.scrollWidth>e.innerWidth:e.offsetHeight!==e.clientHeight}function i_(e,t,r){e.style.transform=`translate3d(${t},${r},0)`}function iP(e){let t;return e.style.transform&&""!==(t=e.style.transform)?["transform",t]:-1}function iD(e){e.style.transform&&""!==e.style.transform&&(e.style.transform="")}function iL(e){return e&&(["INPUT","SELECT","TEXTAREA"].indexOf(e.nodeName)>-1||"true"===e.contentEditable)}function iF(e){return iL(e)&&"hotInput"in e.dataset==!1}function iB(e){let t=iQ(e.ownerDocument);iG(t)&&!iF(t)&&(e instanceof HTMLInputElement||e instanceof HTMLTextAreaElement)&&e.select()}function iV(e){return!e.parentNode}function iz(e,t){let r=new IntersectionObserver((e,r)=>{e.forEach(e=>{e.isIntersecting&&(t(),r.disconnect())})});return r.observe(e),r}function iU(e,t=!0,r=!0){let i=e.ownerDocument,n=i.createRange(),o=i.defaultView?.getSelection();if(rG(e,"contenteditable",!0),r){let t=F();rG(e,t[0],t[1])}t&&rW(e,"invisibleSelection"),n.selectNodeContents(e),o?.removeAllRanges(),o?.addRange(n)}function iW(e,t=!0){let r=e.ownerDocument.defaultView?.getSelection();e.hasAttribute("aria-hidden")&&e.removeAttribute("aria-hidden"),r?.removeAllRanges(),t&&r$(e,"invisibleSelection"),e.removeAttribute("contenteditable")}function i$(e,t,r=!0){iU(e,r),t(),iW(e,r)}function iG(e){if("object"!=typeof e||null===e)return!1;let t=e.ownerDocument?.defaultView?.Element;return!!(t&&e instanceof t)}function ij(e){if("object"!=typeof e||null===e)return!1;if("u">typeof DocumentFragment&&e instanceof DocumentFragment)return!0;let t=e.ownerDocument?.defaultView?.DocumentFragment;return!!(t&&e instanceof t)}function iY(e){return iG(e)&&("TD"===e.tagName||"TH"===e.tagName)}function iK(e){return"INPUT"===e.tagName}function iq(e){return"object"==typeof e&&null!==e&&"nodeType"in e&&e.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&"host"in e}function iX(e){let t=[],r=e.getRootNode();for(;iq(r);){let{host:e}=r;if(!iG(e))break;t.push(e),r=e.getRootNode()}return t}function iQ(e){let t=e.activeElement;for(;t?.shadowRoot?.activeElement;)t=t.shadowRoot.activeElement;return t}function iZ(e,t){return e.childNodes[t]||null}function iJ(e){e.hasAttribute("style")&&e.removeAttribute("style")}let i0="_renderVersion";function i1(e){e[i0]=(e[i0]??0)+1}class i2{#e=0;get epoch(){return this.#e}markAllChanged(){this.#e+=1}}function i3(e){return"function"==typeof e}function i6(e,t=200){let r=0,i={lastCallThrottled:!0},n=null;return function(...o){let s=Date.now(),l=!1;i.lastCallThrottled=!0,r||(r=s,l=!0);let a=t-(s-r);return l?(i.lastCallThrottled=!1,e.apply(this,o)):(n&&clearTimeout(n),n=setTimeout(()=>{i.lastCallThrottled=!1,e.apply(this,o),r=0,n=null},a)),i}}function i5(e,t=200,r=10){let i=i6(e,t),n=r;function o(...t){return n?(n-=1,e.apply(this,t)):i.apply(this,t)}return o.clearHits=function(){n=r},o}function i4(e,t=200){let r,i=null;function n(...o){return i&&clearTimeout(i),i=setTimeout(()=>{i=null,r=e.apply(this,o)},t),r}return n.cancel=function(){null!==i&&(clearTimeout(i),i=null)},n}function i8(...e){let[t,...r]=e;return function(...e){return er(r,(e,t)=>t(e),t.apply(this,e))}}function i9(e,...t){return function(...r){return e.apply(this,t.concat(r))}}function i7(e){let t=e.length;return function r(i){return function(...n){let o=i.concat(n);return o.length>=t?e.apply(this,o):r(o)}}([])}function ne(e){let t=e.length;return function r(i){return function(...n){let o=i.concat(n.reverse());return o.length>=t?e.apply(this,o):r(o)}}([])}function nt(e,t,r,i,n,o,s,l){if(e$(l))return e.call(t,r,i,n,o,s,l);if(e$(s))return e.call(t,r,i,n,o,s);if(e$(o))return e.call(t,r,i,n,o);if(e$(n))return e.call(t,r,i,n);if(e$(i))return e.call(t,r,i);else if(e$(r))return e.call(t,r);return e.call(t)}let nr={ALT:18,ARROW_DOWN:40,ARROW_LEFT:37,ARROW_RIGHT:39,ARROW_UP:38,AUDIO_DOWN:t0()?182:174,AUDIO_MUTE:t0()?181:173,AUDIO_UP:t0()?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},ni=[nr.ALT,nr.ARROW_DOWN,nr.ARROW_LEFT,nr.ARROW_RIGHT,nr.ARROW_UP,nr.AUDIO_DOWN,nr.AUDIO_MUTE,nr.AUDIO_UP,nr.BACKSPACE,nr.CAPS_LOCK,nr.DELETE,nr.END,nr.ENTER,nr.ESCAPE,nr.F1,nr.F2,nr.F3,nr.F4,nr.F5,nr.F6,nr.F7,nr.F8,nr.F9,nr.F10,nr.F11,nr.F12,nr.F13,nr.F14,nr.F15,nr.F16,nr.F17,nr.F18,nr.F19,nr.HOME,nr.INSERT,nr.MEDIA_NEXT,nr.MEDIA_PLAY_PAUSE,nr.MEDIA_PREV,nr.MEDIA_STOP,nr.NULL,nr.NUM_LOCK,nr.PAGE_DOWN,nr.PAGE_UP,nr.PAUSE,nr.SCROLL_LOCK,nr.SHIFT,nr.TAB];function nn(e){return 32===e||e>=48&&e<=57||e>=96&&e<=111||e>=186&&e<=192||e>=219&&e<=222||e>=226||e>=65&&e<=90}function no(e){return ni.includes(e)}function ns(e){let t=[];return rt()?t.push(nr.COMMAND_LEFT,nr.COMMAND_RIGHT,nr.COMMAND_FIREFOX):t.push(nr.CONTROL),t.includes(e)}function nl(e){return[nr.CONTROL,nr.COMMAND_LEFT,nr.COMMAND_RIGHT,nr.COMMAND_FIREFOX].includes(e)}function na(e,t){let r=t.split("|"),i=!1;return eo(r,t=>{if(e===nr[t])return i=!0,!1}),i}function nh(e){e.isImmediatePropagationEnabled=!1,e.cancelBubble=!0}function nd(e){return!1===e.isImmediatePropagationEnabled}function nu(e){return 2===e.button}function nc(e){return 0===e.button}function ng(e){return 1===e.button}function np(e){return"u">typeof TouchEvent&&e instanceof TouchEvent}function nm(e){return"touches"in e&&"changedTouches"in e}function nf(e){if(!nm(e)||0===e.changedTouches.length)return null;let{identifier:t,clientX:r,clientY:i}=e.changedTouches[0];return{identifier:t,clientX:r,clientY:i}}function nw(e,t){if(!nm(e))return null;for(let r=0;r<e.touches.length;r++){let i=e.touches[r];if(i.identifier===t)return{identifier:i.identifier,clientX:i.clientX,clientY:i.clientY}}return null}function ny(e,t){let r={x:e.offsetX,y:e.offsetY},i=rA(e);if(!iG(t)||i!==t&&i.contains(t))return r;for(;i!==t;)r.x+=i.offsetLeft,r.y+=i.offsetTop,i=i.offsetParent;return r}let nb=3;function nC(e,t){return Math.abs(t.clientX-e.x)>nb||Math.abs(t.clientY-e.y)>nb}let nS=["afterCellMetaReset","afterChange","afterContextMenuDefaultOptions","beforeContextMenuSetItems","afterDropdownMenuDefaultOptions","beforeDropdownMenuSetItems","afterContextMenuHide","beforeContextMenuShow","afterContextMenuShow","afterCopyLimit","beforeCreateCol","afterColumnSequenceCacheUpdate","afterColumnSequenceChange","afterCreateCol","beforeCreateRow","afterCreateRow","beforeAlter","afterDeselect","afterDestroy","afterDocumentKeyDown","afterDrawSelection","beforeRemoveCellClassNames","beforeCompositionStart","afterFontsLoad","afterGetCellMeta","afterGetColHeader","afterGetRowHeader","afterImport","afterInit","afterLoadData","afterUpdateData","afterDataProviderFetch","afterDataProviderFetchError","afterDataProviderFetchAbort","hasExternalDataSource","beforeRowsMutation","afterRowsMutation","afterRowsMutationError","afterMomentumScroll","afterOnCellCornerMouseDown","afterOnSelectionHandleMouseDown","afterOnSelectionEdgeMouseDown","beforeMoveCells","afterMoveCells","afterOnCellCornerDblClick","afterOnCellMouseDown","afterOnCellMouseUp","afterOnCellContextMenu","afterOnCellMouseOver","afterOnCellMouseOut","afterOnCellMouseOverOutside","afterRemoveCol","afterRemoveRow","beforeRenderer","afterRenderer","afterRowIdsRemoved","afterRowIdsReset","afterRowSequenceCacheUpdate","afterRowSequenceChange","beforeViewportScrollVertically","beforeViewportScrollHorizontally","beforeViewportScroll","afterScrollHorizontally","afterScrollVertically","afterScroll","afterSelection","afterSelectionByProp","afterSelectionEnd","afterSelectionEndByProp","afterSelectionFocusSet","beforeSelectColumns","afterSelectColumns","beforeSelectRows","afterSelectRows","beforeSelectAll","afterSelectAll","afterSetCellMeta","afterRemoveCellMeta","afterSetDataAtCell","afterSetDataAtRowProp","afterSetSourceDataAtCell","afterSetTheme","afterUpdateSettings","afterValidate","beforeLanguageChange","afterLanguageChange","beforeAutofill","afterAutofill","afterAsyncValueStart","beforeAsyncValueStart","beforeAsyncValueResolve","afterAsyncValueResolve","afterAsyncValueReject","afterAsyncValueCancel","afterAsyncValuesIdle","beforeCellAlignment","beforeReadOnlyToggle","beforeChange","beforeChangeRender","beforeHeightChange","beforeWidthChange","beforeDrawBorders","beforeGetCellMeta","beforeRemoveCellMeta","beforeImport","beforeInit","beforeInitWalkontable","beforeLoadData","beforeUpdateData","beforeDataProviderFetch","beforeKeyDown","beforeOnCellMouseDown","beforeOnCellMouseUp","beforeOnCellContextMenu","beforeOnCellMouseOver","beforeOnCellMouseOut","beforeOnCellMouseOverOutside","beforeRemoveCol","beforeRemoveRow","beforeViewRender","afterViewRender","beforeRender","afterRender","beforeSuspendExecution","afterSuspendExecution","beforeResumeExecution","afterResumeExecution","beforeRowWrap","beforeColumnWrap","beforeSetCellMeta","beforeSelectionFocusSet","beforeSetRangeStartOnly","beforeSetRangeStart","beforeSetRangeEnd","beforeSelectionHighlightSet","beforeTouchScroll","beforeValidate","beforeValueRender","construct","init","modifyColHeader","modifyColWidth","modifyFiltersMultiSelectValue","modifyFiltersMatchedRows","modifyFocusedElement","modifyRowHeader","modifyRowHeight","modifyRowHeightByOverlayName","modifyData","modifySourceData","modifyRowData","modifyGetCellCoords","modifyGetCoordsElement","modifyFocusOnTabNavigation","beforeHighlightingRowHeader","beforeHighlightingColumnHeader","beforeColumnSort","afterColumnSort","modifyAutofillRange","modifyCopyableRange","beforeCut","afterCut","beforeCopy","afterCopy","beforePasteParse","beforePaste","afterPaste","beforeColumnFreeze","afterColumnFreeze","beforeColumnMove","afterColumnMove","afterCustomBordersUpdate","beforeColumnUnfreeze","afterColumnUnfreeze","beforeRowCollapse","afterRowCollapse","beforeRowExpand","afterRowExpand","beforeRowMove","afterRowMove","beforeFreezeChange","afterFreezeChange","beforeColumnResize","afterColumnResize","beforeRowResize","afterRowResize","afterGetColumnHeaderRenderers","afterGetRowHeaderRenderers","beforeStretchingColumnWidth","beforeFilter","afterFilter","beforePageChange","afterPageChange","beforePageSizeChange","afterPageSizeChange","afterPageSizeVisibilityChange","afterPageCounterVisibilityChange","afterPageNavigationVisibilityChange","beforeSheetTabChange","afterSheetTabChange","beforeSheetTabAdd","afterSheetTabAdd","beforeSheetTabRemove","afterSheetTabRemove","beforeSheetTabRename","afterSheetTabRename","beforeSheetTabMove","afterSheetTabMove","afterSheetTabStateCapture","afterSheetTabStateRestore","afterFormulasValuesUpdate","afterNamedExpressionAdded","afterNamedExpressionRemoved","afterSheetAdded","afterSheetRenamed","afterSheetRemoved","modifyColumnHeaderHeight","modifySinglePassLayout","modifyColumnHeaderValue","beforeUndo","beforeUndoStackChange","afterUndo","afterUndoStackChange","beforeRedo","beforeRedoStackChange","afterRedo","afterRedoStackChange","modifyRowHeaderWidth","modifyTransformFocus","modifyTransformStart","modifyTransformEnd","afterModifyTransformFocus","afterModifyTransformStart","afterModifyTransformEnd","afterViewportRowCalculatorOverride","afterViewportColumnCalculatorOverride","afterPluginsInitialized","beforeHideRows","afterHideRows","beforeUnhideRows","afterUnhideRows","beforeRowSelectionChange","afterRowSelectionChange","beforeHideColumns","afterHideColumns","beforeUnhideColumns","afterUnhideColumns","beforeTrimRow","afterTrimRow","beforeUntrimRow","afterUntrimRow","beforeDropdownMenuShow","afterDropdownMenuShow","afterDropdownMenuHide","beforeAddChild","afterAddChild","beforeDetachChild","afterDetachChild","beforeBeginEditing","afterDialogHide","afterDialogShow","beforeDialogHide","beforeDialogShow","dialogFocusPreviousElement","dialogFocusNextElement","afterDialogFocus","beforeLoadingShow","afterLoadingShow","beforeLoadingHide","afterLoadingHide","beforeEmptyDataStateShow","afterEmptyDataStateShow","beforeEmptyDataStateHide","afterEmptyDataStateHide","beforeNotificationShow","afterNotificationShow","beforeNotificationHide","afterNotificationHide","afterBeginEditing","beforeMergeCells","afterMergeCells","beforeUnmergeCells","afterUnmergeCells","afterListen","afterUnlisten","afterRefreshDimensions","beforeRefreshDimensions","beforeColumnCollapse","afterColumnCollapse","beforeColumnExpand","afterColumnExpand","modifyAutoColumnSizeSeed"],nv=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"],["persistentStateSave","17.0.0"],["persistentStateLoad","17.0.0"],["persistentStateReset","17.0.0"]]),nR=new Map([]),nE=Symbol.for("handsontable.forwardedHookCallback");function nT(e){if("function"!=typeof e)return e;let t=e[nE];return"function"==typeof t?t:e}class nx{#t=new Map;constructor(){nS.forEach(e=>this.#r(e))}getList(e){return this.#t.get(e)??null}getHooks(e){let t=this.#t.get(e),r=[];if(t){let e=t.head;for(;e;)r.push(e),e=e.next}return r}add(e,t,r={}){let i=this.#t.get(e);i||(i=this.#r(e),nS.push(e));let n=!!r.fromSettings,o=nT(t);for(let n=i.head;null!==n;n=n.next)if(n.identity===o)return void this.#i(e,n,t,r);let s=Number.isInteger(r.orderIndex)?r.orderIndex??0:0,l=!!r.runOnce,a=!!r.initialHook;if(a){for(let e=i.head;null!==e;e=e.next)if(e.initialHook){e.callback=t,e.identity=o,e.fromSettings=n;return}}this.#n(i,{callback:t,orderIndex:s,runOnce:l,initialHook:a,fromSettings:n,identity:o,next:null})}#i(e,t,r,i){r!==t.callback&&r!==t.identity&&(t.callback=r);let n=!!i.initialHook&&!!i.fromSettings&&!t.initialHook;if(t.runOnce&&!i.runOnce&&(t.runOnce=!1,t.fromSettings=!!i.fromSettings,t.initialHook=!!i.initialHook),!i.fromSettings&&!i.runOnce){t.fromSettings=!1,t.initialHook=!1;return}n&&this.#o(e,e=>e===t||!e.initialHook)}has(e){let t=this.#t.get(e);return!!t&&null!==t.head}remove(e,t){let r=nT(t);return this.#s(e,e=>e.identity===r)}removeFromSettings(e){return this.#o(e,()=>!1)}replaceFromSettings(e,t){if(Array.isArray(t)){let r=new Set(t.map(e=>nT(e)));this.#o(e,e=>r.has(e.identity)),t.forEach(t=>this.add(e,t,{fromSettings:!0}));return}let r=null;this.#o(e,e=>null===r&&!!e.initialHook&&(r=e,!0));let i=r,n=this.getHooks(e).some(e=>e!==i&&e.identity===nT(t));if(i&&!n){i.callback=t,i.identity=nT(t);return}i&&this.#o(e,e=>e!==i),this.add(e,t,{initialHook:!0,fromSettings:!0})}#o(e,t){let r=this.#t.get(e);if(!r)return 0;let i=[],n=0,o=null,s=r.head;for(r.head=null;null!==s;){let e=s.next;if(s.fromSettings&&!t(s))i.push(s),n+=1;else{o?o.next=s:r.head=s;for(let e=0;e<i.length;e+=1)i[e].next=s;i.length=0,o=s}s=e}for(let e=0;e<i.length;e+=1)i[e].next=null;return o&&(o.next=null),r.tail=o,n}#s(e,t){let r=this.#t.get(e);if(!r)return!1;let i=null,n=r.head;for(;null!==n;){if(t(n))return i?i.next=n.next:r.head=n.next,n===r.tail&&(r.tail=i),!0;i=n,n=n.next}return!1}destroy(){this.#t.clear()}#n(e,t){if(null===e.head){e.head=t,e.tail=t;return}if(t.orderIndex>=e.tail.orderIndex){e.tail.next=t,e.tail=t;return}let r=null,i=e.head;for(;null!==i&&i.orderIndex<=t.orderIndex;)r=i,i=i.next;null===r?(t.next=e.head,e.head=t):(t.next=i,r.next=t)}#r(e){let t={head:null,tail:null};return this.#t.set(e,t),t}}let nA=ey`The plugin hook "[hookName]" was removed in Handsontable [removedInVersion].\x20
|
|
53
53
|
Please consult release notes https://github.com/handsontable/handsontable/releases/tag/[removedInVersion] to\x20
|
|
54
54
|
learn about the migration path.`;class nM{static getSingleton(){return nI}globalBucket=new nx;getBucket(e=null){return e?(e.pluginHookBucket||(e.pluginHookBucket=new nx),e.pluginHookBucket):this.globalBucket}add(e,t,r=null,i){return Array.isArray(t)?eo(t,t=>this.add(e,t,r)):(this.#l(e),this.getBucket(r).add(e,t,{orderIndex:i,runOnce:!1})),this}once(e,t,r=null,i){return Array.isArray(t)?eo(t,t=>this.once(e,t,r)):this.getBucket(r).add(e,t,{orderIndex:i,runOnce:!0}),this}addAsFixed(e,t,r=null){return Array.isArray(t)?eo(t,t=>this.addAsFixed(e,t,r)):this.getBucket(r).add(e,t,{initialHook:!0}),this}_addFromSettings(e,t,r){return Array.isArray(t)?eo(t,t=>{this.#l(e),this.getBucket(r).add(e,t,{fromSettings:!0})}):this.getBucket(r).add(e,t,{initialHook:!0,fromSettings:!0}),this}_removeFromSettings(e,t){return this.getBucket(t).removeFromSettings(e)}_replaceFromSettings(e,t,r){return this.getBucket(r).replaceFromSettings(e,t),this}remove(e,t,r=null){return this.getBucket(r).remove(e,t)}has(e,t=null){return this.getBucket(t).has(e)}run(e,t,r,i,n,o,s,l){return r=this.#a(this.getBucket().getList(t),e,t,null,r,i,n,o,s,l),r=this.#a(this.getBucket(e).getList(t),e,t,e,r,i,n,o,s,l)}#l(e){nv.has(e)&&rn(ri(nA,{hookName:e,removedInVersion:nv.get(e)})),nR.has(e)&&rn(nR.get(e))}#a(e,t,r,i,n,o,s,l,a,h){if(null===e||null===e.head)return n;let d=e.head,u=e.tail;for(;null!==d;){let e=nt(d.callback,t,n,o,s,l,a,h);if(void 0!==e&&(n=e),d.runOnce&&this.remove(r,d.callback,i),d===u)break;d=d.next}return n}destroy(e=null){this.getBucket(e).destroy()}register(e){this.isRegistered(e)||nS.push(e)}deregister(e){this.isRegistered(e)&&nS.splice(nS.indexOf(e),1)}isDeprecated(e){return nR.has(e)||nv.has(e)}isRegistered(e){return nS.indexOf(e)>=0}getRegistered(){return nS}}let nI=new nM,nN=new Map;function nO(e="common"){nN.has(e)||nN.set(e,new Map);let t=nN.get(e);return{register:function(e,r){t.set(e,r)},getItem:function(e){return t.get(e)},hasItem:function(e){return t.has(e)},getNames:function(){return[...t.keys()]},getValues:function(){return[...t.values()]},clear:function(){nN.delete(e),t.clear()}}}let{register:nk,getItem:nH,hasItem:n_,getNames:nP,getValues:nD}=nO("editors");class nL{#h;#d={};constructor(e){this.#h=e;const t=this.#d;nM.getSingleton().add("afterDestroy",function(){t[this.guid]=null})}getConstructor(){return this.#h}getInstance(e){return e.guid in this.#d||(this.#d[e.guid]=new this.#h(e)),this.#d[e.guid]}}let nF=new WeakMap;function nB(e){return"function"==typeof e}function nV(e){return nB(e)||tf("Editor class must be a constructor function."),e}function nz(e){return"string"!=typeof e?nV(e):(n_(e)||tf(`No registered editor found under "${e}" name`),nH(e).getConstructor())}function nU(e,t){let r="string"==typeof e?e:null,i=t;e&&nB(e)&&(i=e,r=e.EDITOR_TYPE??null),i||tf("Editor class is required to register an editor.");let n=nV(i),o=new nL(n);null!==r&&nk(r,o),nF.set(n,o)}let nW={_hooksStorage:Object.create(null),addHook(e,t){return this._hooksStorage[e]||(this._hooksStorage[e]=[]),this.hot.addHook(e,t),this._hooksStorage[e].push(t),this},removeHooksByKey(e){eo(this._hooksStorage[e]||[],t=>{this.hot.removeHook(e,t)})},clearHooks(){tI(this._hooksStorage,(e,t)=>this.removeHooksByKey(t)),this._hooksStorage={}}};function n$(e,t,r){let{instance:i,visualRow:n,visualCol:o,valueSetter:s,emptyValue:l}=t,a=e;return(i3(s)&&(a=s.call(i,e,n,o,t,r)),""!==a||""===l||void 0===l||"string"==typeof r&&r.startsWith("UndoRedo.")||function(e){let{type:t}=e;return"checkbox"===t?""===e.checkedTemplate||""===e.uncheckedTemplate:("autocomplete"===t||"dropdown"===t)&&Array.isArray(e.source)&&e.source.includes("")}(t))?a:l}function nG(e,t){let{instance:r,visualRow:i,visualCol:n,valueGetter:o}=t;return i3(o)?o.call(r,e,i,n,t):e}function nj(e,t,r,i,n){let o=[];return nY(e,t,r,i,n,o),o}function nY(e,t,r,i,n,o){let s={visited:r.length>1?new Set:null,columnCount:e.countCols(),skipArea:function(e,t,r){if("number"!=typeof t||"number"!=typeof r)return null;let i=e.runHooks("modifyGetCellCoords",t,r,!1,"meta");if(Array.isArray(i)&&i.length>=4){let[e,t,r,n]=i;return{fromRow:e,fromColumn:t,toRow:r,toColumn:n}}if(Array.isArray(i)&&i.length>=2){let[e,t]=i;return{fromRow:e,fromColumn:t,toRow:e,toColumn:t}}return{fromRow:t,fromColumn:r,toRow:t,toColumn:r}}(e,i,n)};for(let i=0;i<r.length;i++){let n=function(e,t){if(t.isSingleHeader())return null;let r=Math.max(t.from.row??-1,t.to.row??-1),i=Math.max(t.from.col??-1,t.to.col??-1);if(r<0||i<0)return null;let n=t.getTopStartCorner().row,o=t.getTopStartCorner().col,s=e.runHooks("modifyGetCellCoords",n,o,!1,"meta");return Array.isArray(s)&&([n,o]=s),{fromRow:Math.max(n,0),fromColumn:Math.max(o,0),toRow:Math.min(t.getBottomEndCorner().row,e.countRows()-1),toColumn:Math.min(t.getBottomEndCorner().col,e.countCols()-1)}}(e,r[i]);if(null!==n&&function(e,t,r,i,n){for(let a=r.fromRow;a<=r.toRow;a++)for(let h=r.fromColumn;h<=r.toColumn;h++){var o,s,l;if(!(function(e,t,r,i){if(null===e)return!1;let n=r*t+i;return!!e.has(n)||(e.add(n),!1)}(i.visited,i.columnCount,a,h)||(o=i.skipArea,s=a,l=h,null!==o&&s>=o.fromRow&&s<=o.toRow&&l>=o.fromColumn&&l<=o.toColumn))&&function(e,t,r,i){var n;let o=e.getCellMetaTransient(r,i);if(o.readOnly)return!1;let s=e.getSourceDataAtCell(e.toPhysicalRow(r),i)??null;return n=!!o.valueSetter,null!==t&&"object"==typeof t||n||null===s||"object"!=typeof s}(e,t,a,h)){if(null===n)return!0;n.push([a,h,null!==t&&"object"==typeof t?tS(t):t])}}return!1}(e,t,n,s,o))return!0}return!1}function nK(e,t,r,i){let n=e.getSelectedRange();return!!n?.length&&nY(e,t,n,r,i,null)}tM(nW,"MIXIN_NAME","hooksRefRegisterer",{writable:!1,enumerable:!1});let nq=new WeakMap;function nX(e,t){let r=new Set(e._getWaitingChangeSets().map(({changes:e})=>e));if(t(),e.isDestroyed)return[];let i=e._getWaitingChangeSets().map(({changes:e})=>e).filter(e=>!r.has(e));return i.forEach(t=>{let r=nq.get(e);r||(r=new WeakSet,nq.set(e,r)),r.add(t)}),i}let nQ="edit";function nZ(e,t,r){return t===e.visualRow&&("function"==typeof e.prop?r===e.visualCol:r===e.prop)}let nJ=Object.freeze({VIRGIN:"STATE_VIRGIN",EDITING:"STATE_EDITING",WAITING:"STATE_WAITING",FINISHED:"STATE_FINISHED"});class n0{static get EDITOR_TYPE(){return"base"}state=nJ.VIRGIN;_opened=!1;_fullEditMode=!1;_closeCallback=null;_closeAfterDataChange=!0;TD=null;preventCloseElement;row=null;col=null;prop=null;originalValue=null;#u=null;#c=null;#g=!1;#p=null;#m=null;#f=void 0;#w=void 0;#y=null;#b=null;#C=new Set;resetValueBeforeEdit(){this.#g&&(this.#u=this.getValue(),this.#c=nG(this.originalValue,this.cellProperties))}constructor(e){this.hot=e,this.init()}_fireCallbacks(e){this._closeCallback&&(this._closeCallback(e),this._closeCallback=null)}init(){}getValue(){tf("Editor getValue() method unimplemented")}setValue(e){tf("Editor setValue() method unimplemented")}open(e){tf("Editor open() method unimplemented")}close(){tf("Editor close() method unimplemented")}focus(){tf("Editor focus() method unimplemented")}prepare(e,t,r,i,n,o){this.TD=i,this.row=e,this.col=t,this.prop=r,this.originalValue=n,this.cellProperties=o,this.state=this.isOpened()?this.state:nJ.VIRGIN}extend(){return class extends this.constructor{}}saveValue(e,t){if(t){let t=this.hot.getSelectedRange();if(t?.length)return void this.#S(e,t)}this.#v(e)}#v(e){let t=this.row,r=this.col,i=this.hot.runHooks("modifyGetCellCoords",t,r,!1,"meta");Array.isArray(i)&&([t,r]=i),this.hot.populateFromArray(t,r,e,null,null,nQ)}#S(e,t){let r=Array.isArray(e)&&Array.isArray(e[0])?e[0][0]:e,i=nj(this.hot,r,t);i.length>0&&this.hot.setDataAtCell(i,null,null,nQ)}beginEditing(e,t){if(this.state!==nJ.VIRGIN)return;if(null===this.row||null===this.col)return void rn("Editor opened without valid cell coordinates.");let r=this.hot,i=r.rowIndexMapper.getRenderableFromVisualIndex(this.row),n=r.columnIndexMapper.getRenderableFromVisualIndex(this.col);null!==i&&null!==n&&r.view.scrollViewport({row:i,col:n}),this.state=nJ.EDITING;let o=!1,s=null,l=null;if(this.isInFullEditMode()){let t=nG(this.originalValue,this.hot.getCellMeta(this.row,this.col)),r="string"!=typeof e;o=r,s=r?eW(t):e,l=r?t:null,this.setValue(r?t:e)}this.open(t),this._opened=!0,this.focus(),this.#g=o,this.#u=o?s:null,this.#c=l,r.view.render(),r.runHooks("afterBeginEditing",this.row,this.col),this.addHook("beforeDialogShow",()=>this.cancelChanges())}finishEditing(e,t,r){if(r){let e=this._closeCallback;this._closeCallback=t=>{e&&e(t),r(t),this.hot.view.render()}}if(!this.isWaiting()){if(this.state===nJ.VIRGIN)return void this.hot._registerTimeout(()=>{this._fireCallbacks(!0)});if(this.state===nJ.EDITING){if(e){this.cancelChanges(),this.hot.view.render();return}let r=this.getValue();this.cellProperties.trimWhitespace&&(r="string"==typeof r?String.prototype.trim.call(r||""):r);let i=r;"function"==typeof this.cellProperties.valueParser&&(r=this.cellProperties.valueParser(r,this.cellProperties));let n=!0===t&&nK(this.hot,r,this.row,this.col);if(!n&&this.isEditUnchanged(i,r))return void this.#R();if(this.state=nJ.WAITING,!this.hot.getCellValidator(this.cellProperties)){if(nX(this.hot,()=>this.saveValue([[r]],t)),this.hot.isDestroyed)return;this.state=nJ.FINISHED,this.discardEditor(!0);return}let o=this.#E(e=>{this.discardEditor(e)}),{validatesEditedCell:s,validatedCells:l,writtenCells:a,startsWrite:h}=this.#T(r,t);if(this.hot.isDestroyed||s||!this.isWaiting())return;if(l.length>0&&n)o(!0);else if(l.length>0){if(this.#p){let e=l.filter(e=>a.some(([t,r])=>t===e.row&&(r===e.col||r===this.hot.colToProp(e.col))));0===e.length?o(!0):this.#p.validatedCells=e.map(({row:e,col:t,source:r})=>({meta:this.#x(e,t),source:r}))}}else h?o(!0):this.#p&&(this.#p.acceptsAnyAnswer=!0)}}}#T(e,t){let r=!1,i=!1,n=()=>{i=!0},o=[],s=(e,t,i,n)=>{o.push({row:t,col:i,source:n}),this.#A(t,i)&&(r=!0,this.#p?.sources.add(n))};this.hot.addHook("beforeValidate",s),this.hot.addHook("beforeChange",n);let l=[];try{l=nX(this.hot,()=>this.saveValue([[e]],t)).flatMap(e=>e.map(([e,t])=>[e,t]))}finally{this.hot.isDestroyed||(this.hot.removeHook("beforeValidate",s),this.hot.removeHook("beforeChange",n))}return{validatesEditedCell:r,validatedCells:o,writtenCells:l,startsWrite:i}}#x(e,t){let r=this.hot.propToCol(t);if("number"==typeof r){let i=this.hot.getCellMeta(e,r);if(nZ(i,e,t))return i}return this.hot.getCellMeta(e,t)}isEditUnchanged(e,t){let r=e===this.#u||e===this.#c,i=t===this.#u||t===this.#c;return this.#g&&r&&i}#R(){if(!this.hot.getCellValidator(this.cellProperties)){this.state=nJ.FINISHED,this.discardEditor(!0),this.hot.view.render();return}this.state=nJ.WAITING,this.#E(e=>{this.discardEditor(e),this.hot.view.render()}),this.hot.validateCell(this.originalValue,this.cellProperties,()=>{},nQ)}#E(e){let t={sources:new Set,acceptsAnyAnswer:!1,validatedCells:null},r=r=>{if(this.hot.removeHook("postAfterValidate",i),this.#p!==t)return;this.#p=null,this.#b=null;let n=this.#M();this.#f=null===n?null:this.#I(),this.#w=n??void 0,this.#N(),this.state=nJ.FINISHED,e(r)},i=(e,i,n,o,s)=>{this.hot.isDestroyed||this.hot._isAnsweringStaleValidation()||(t.acceptsAnyAnswer||this.#O(t,n,o,s))&&r(e)};return this.#k(),this.#N(),this.#f=void 0,this.#w=void 0,this.#m=null===this.row?null:this.hot._trackRecord(this.row,this.col??void 0),this.#y=null===this.#m?null:this.hot._prepareRowReveal(),this.#p=t,this.#b=i,this.hot.addHook("postAfterValidate",i),r}#O(e,t,r,i){return null!==e.validatedCells?e.validatedCells.some(e=>e.source===i&&nZ(e.meta,t,r)):this.#A(t,r)&&(i===nQ||e.sources.has(i))}#A(e,t){return nZ(this.cellProperties,e,t)}#I(){if(null!==this.#m)return this.#m.getVisualRow()}#M(){if(null===this.#m)return;let e=this.#m.getVisualColumn();return"number"==typeof e&&null===this.hot.columnIndexMapper.getRenderableFromVisualIndex(e)?null:e}#H(e,t){let r=this.hot.getCell(e,t,!0);this.prepare(e,t,this.hot.colToProp(t)??this.prop,r??this.TD,this.originalValue,this.hot.getCellMeta(e,t)),"refreshDimensions"in this&&"function"==typeof this.refreshDimensions&&this.refreshDimensions()}#N(){this.#m?.release(),this.#m=null}#k(){this.#b&&(this.hot.removeHook("postAfterValidate",this.#b),this.#b=null)}_endValidationWait(){if(!this.isWaiting())return null;let e=this._closeCallback;return this._closeCallback=null,this.#p=null,this.#k(),this.#N(),this.cancelChanges(),e?()=>e(!1):null}cancelChanges(){this.#p=null,this.#k(),this.#N(),this.state=nJ.FINISHED,this.discardEditor()}discardEditor(e){if(this.state!==nJ.FINISHED)return;let t=!1===e&&!0!==this.cellProperties.allowInvalid,r=this.#y,i=this.#f,n=this.#w;(this.#f=void 0,this.#w=void 0,this.#y=null,t&&"number"==typeof i&&null!==r)?null!==this.hot.rowIndexMapper.getRenderableFromVisualIndex(i)?this.#_(t,r(i)?i:null,n):this.hot._runAfterValidatorAnswer(()=>{this.state===nJ.FINISHED&&this.#_(t,r(i)?i:null,n)}):this.#_(t,i,n)}_addFinishListener(e){this.#C.add(e)}_removeFinishListener(e){this.#C.delete(e)}#_(e,t,r){try{this.#P(e,t,r)}finally{this.hot.isDestroyed||[...this.#C].forEach(e=>e())}}#P(e,t,r){if(e&&null!==t){let e=t??this.row,i=r??this.col;null!==e&&null!==i&&((e!==this.row||i!==this.col)&&this.#H(e,i),this.hot.selectCell(e,i),this.focus(),this.state=nJ.EDITING,this._fireCallbacks(!1))}else this.close(),this._opened=!1,this._fullEditMode=!1,this.#g=!1,this.#u=null,this.#c=null,this.state=nJ.VIRGIN,this._fireCallbacks(!e),this.hot.getShortcutManager().setActiveContextName("grid")}enableFullEditMode(){this._fullEditMode=!0}isInFullEditMode(){return this._fullEditMode}isOpened(){return this._opened}isWaiting(){return this.state===nJ.WAITING}getEditedCellRect(){let e=this.getEditedCell();if(!e)return;let{wtOverlays:t,wtViewport:r}=this.hot.view._wt,i=this.hot.rootWindow,n=r9(e),o=ib(e),s=r9(this.hot.rootElement),l=ib(this.hot.rootElement),a=t.topOverlay?.holder,h=t.inlineStartOverlay?.holder,d=a!==i?a.scrollTop:0,u=h!==i?h.scrollLeft:0,c=i.innerWidth-s.left-l,{wtTable:g}=t.getParentOverlay(e)??this.hot.view._wt,p=g.name,m=g.getSpreaderOffset();n.top+=m.y,n.left+=m.x;let f=["master","inline_start","inline_end"].includes(p)?d:0,w=["master","top","bottom"].includes(p)?u:0,y=+(n.top!==s.top),b=n.top-s.top-y-f,C=0;C=this.hot.isRtl()?i.innerWidth-n.left-o-c-1+w:n.left-s.left-1-w,["top","top_inline_start_corner","top_inline_end_corner"].includes(p)&&(b+=t.topOverlay?.getOverlayTransformOffset()??0),["inline_start","top_inline_start_corner"].includes(p)&&(C+=Math.abs(t.inlineStartOverlay?.getOverlayTransformOffset()??0)),["inline_end","top_inline_end_corner"].includes(p)&&(C+=Math.abs(t.inlineEndOverlay?.getOverlayTransformOffset()??0));let S=this.hot.hasColHeaders(),v=this.hot.rowIndexMapper.getRenderableFromVisualIndex(this.row??0),R=this.hot.rowIndexMapper.getRenderableIndexesLength()-this.hot.view._wt.getSetting("fixedRowsBottom");(S&&(v??0)<=0||v===R)&&(b+=1);let E=i.getComputedStyle(e),T=Number.parseFloat(E[this.hot.isRtl()?"borderRightWidth":"borderLeftWidth"])>0||this.#D(e,p)?0:1;0===T&&(C+=1);let x=r.rowsRenderCalculator?.startPosition??0,A=r.columnsRenderCalculator?.startPosition??0,M=Math.abs(t.inlineStartOverlay?.getScrollPosition()??0),I=t.topOverlay?.getScrollPosition()??0,N=iO(this.hot.rootDocument),O=this.#L(e,p,x,I,N),k=["inline_end","top_inline_end_corner","bottom_inline_end_corner"].includes(p)?C-(t.inlineStartOverlay?.mainTableScrollableElement===i?M:0):this.#F(e,p,g,o,A,M),H=Number.parseFloat(E.borderTopWidth)>0?0:1,_=ib(e)+T,P=iC(e)+H,D=a&&ik(a)?N:0,L=h&&iH(h)?N:0,F=Math.max(this.hot.view.maximumVisibleElementWidth(k)-D+T-this.#B(p),0);return{top:b,start:C,height:P,maxHeight:Math.max(this.hot.view.maximumVisibleElementHeight(O??0)-L+H,this.hot.stylesHandler.getDefaultRowHeight()??0),width:_,maxWidth:F}}#D(e,t){if(r3(e))return!0;let{wtOverlays:r}=this.hot.view._wt,i={master:r.inlineStartOverlay,top:r.topInlineStartCornerOverlay,bottom:r.bottomInlineStartCornerOverlay}[t];return!!i?.needFullRender&&!!i.clone&&r6(e.getBoundingClientRect(),i.clone.wtTable.TABLE.getBoundingClientRect(),this.hot.isRtl())}#B(e){if(["inline_end","top_inline_end_corner","bottom_inline_end_corner"].includes(e))return 0;let{wtOverlays:t,wtViewport:r,wtTable:i}=this.hot.view._wt,n=t.inlineEndOverlay?.getBandWidth()??0;return 0===n?0:n+(r.hasHorizontalScroll()?0:Math.max(r.getWorkspaceWidth()-i.getTotalWidth(),0))+(t.inlineEndOverlay?.getFreezeLineOverlap()??0)}#L(e,t,r,i,n){let o=e.offsetTop,{wtOverlays:s}=this.hot.view._wt;if(["inline_start","inline_end","master"].includes(t)&&(o+=r-i),["bottom","bottom_inline_start_corner","bottom_inline_end_corner"].includes(t)&&s.bottomOverlay?.clone){let{wtViewport:e,wtTable:t}=s.bottomOverlay.clone;o+=e.getWorkspaceHeight()-t.getHeight()-n}return o}#F(e,t,r,i,n,o){let s=e.offsetLeft;return this.hot.isRtl()?s=(s>=0?r.getWidth()-e.offsetLeft:Math.abs(s))+(n-o-i):["top","master","bottom"].includes(t)&&(s+=n-o),s}getEditedCellsLayerClass(){switch(this.checkEditorSection()){case"inline-start":return"ht_clone_left ht_clone_inline_start";case"inline-end":return"ht_clone_inline_end";case"bottom":return"ht_clone_bottom";case"bottom-inline-start-corner":return"ht_clone_bottom_left_corner ht_clone_bottom_inline_start_corner";case"bottom-inline-end-corner":return"ht_clone_bottom_inline_end_corner";case"top":return"ht_clone_top";case"top-inline-start-corner":return"ht_clone_top_left_corner ht_clone_top_inline_start_corner";case"top-inline-end-corner":return"ht_clone_top_inline_end_corner";default:return"ht_clone_master"}}getEditedCell(){return null===this.row||null===this.col?null:this.hot.getCell(this.row,this.col,!0)}checkEditorSection(){if(null===this.row||null===this.col)return"";let e=this.hot.countRows(),t=this.hot.countCols(),r=this.hot.view.countFixedColumnsStart(),i=this.hot.view.countFixedRowsBottom(),n=t-this.hot.view.countFixedColumnsEnd(),o=this.col<r,s=!o&&this.col>=n,l="";return this.row<this.hot.view.countFixedRowsTop()?l=o?"top-inline-start-corner":s?"top-inline-end-corner":"top":i&&this.row>=e-i?l=o?"bottom-inline-start-corner":s?"bottom-inline-end-corner":"bottom":o?l="inline-start":s&&(l="inline-end"),l}}tR(n0,nW);let n1=0,n2=class{constructor(e=null){this.context=e||this,this.context.eventListeners||(this.context.eventListeners=[])}addEventListener(e,t,r,i=!1){if(!this.context)return()=>{};function n(e){r.call(this,function(e){let t=Object.getOwnPropertyDescriptor(e,"stopImmediatePropagation");if(void 0!==t&&!0!==t.writable&&"function"!=typeof t.set)return e;let r=e.stopImmediatePropagation;return e.stopImmediatePropagation=function(){r.apply(this),nh(this)},e}(e))}return this.context.eventListeners.push({element:e,event:t,callback:r,callbackProxy:n,options:i,eventManager:this}),e.addEventListener(t,n,i),n1+=1,()=>{this.removeEventListener(e,t,r)}}removeEventListener(e,t,r,i=!1){let n;if(!this.context)return;let o=this.context.eventListeners.length;for(;o;)if(o-=1,(n=this.context.eventListeners[o]).event===t&&n.element===e){if(r&&r!==n.callback||i&&n.eventManager!==this)continue;this.context.eventListeners.splice(o,1),n.element.removeEventListener(n.event,n.callbackProxy,n.options),n1-=1}}clearEvents(e=!1){if(!this.context)return;let t=this.context.eventListeners.length;for(;t;){t-=1;let r=this.context.eventListeners[t];e&&r.eventManager!==this||(this.context.eventListeners.splice(t,1),r.element.removeEventListener(r.event,r.callbackProxy,r.options),n1-=1)}}clear(){this.clearEvents()}destroy(){this.clearEvents(),this.context=null}destroyWithOwnEventsOnly(){this.clearEvents(!0),this.context=null}fireEvent(e,t){let r,i="document"in e?e.document:void 0,n="window"in e?e:void 0;i||(n=(i=e.ownerDocument?e.ownerDocument:e).defaultView);let o={bubbles:!0,cancelable:"mousemove"!==t,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};i.createEvent?(r=i.createEvent("MouseEvents")).initMouseEvent(t,o.bubbles,o.cancelable,o.view,o.detail,o.screenX,o.screenY,o.clientX,o.clientY,o.ctrlKey,o.altKey,o.shiftKey,o.metaKey,o.button,o.relatedTarget||i.body.parentNode):r=i.createEventObject(),e.dispatchEvent?e.dispatchEvent(r):e.fireEvent(`on${t}`,r)}};function n3(e,t){let r=e.colToProp(t);return null===r&&null===e.toPhysicalColumn(t)?t:r}class n6{destroyed=!1;#V=!1;#z=null;#U=null;#W=0;#$=(e={indexesSequenceChanged:!1,trimmedIndexesChanged:!1})=>{this.#G(this.#j(e),e)};#Y=(e={indexesSequenceChanged:!1,trimmedIndexesChanged:!1})=>{this.#G(this.#j(e),e)};#K=(e,t,r)=>{r&&this.#q()};#X=!1;#q(){let e=this.activeEditor;if(!this.destroyed&&e?.isOpened()){if(e.state===nJ.WAITING)return void this.#Q("postAfterValidate");if(this.hot.isRenderSuspended())return void this.#Q("afterRender");this.#Z()}}#Q(e){this.#X||(this.#X=!0,this.hot.addHookOnce(e,()=>{this.#X=!1,this.#q()}))}#Z(){let e=this.activeEditor;e?.isOpened()&&null!==e.row&&null!==e.col&&(this.hot.scrollViewportTo({row:e.row,col:e.col})&&this.hot.view.render(),"refreshDimensions"in e&&"function"==typeof e.refreshDimensions&&e.refreshDimensions())}#j(e){return"insert"===e.indexesChangeSource||"remove"===e.indexesChangeSource}#G(e,t){this.destroyed||(e?this.#J():this.#ee(t),this.#et())}constructor(e,t,r){this.hot=e,this.tableMeta=t,this.selection=r,this.eventManager=new n2(e),this.hot.addHook("afterDocumentKeyDown",e=>this.#er(e)),this.hot.addHook("beforeCompositionStart",e=>this.#er(e)),this.hot.addHook("afterRowSequenceCacheUpdate",this.#$),this.hot.addHook("afterColumnSequenceCacheUpdate",this.#Y),this.hot.addHook("afterRefreshDimensions",this.#K),this.hot.view._wt.update("onCellDblClick",(e,t,r)=>this.#ei(e,t))}getActiveEditor(){return this.activeEditor}suspendStrandDiscards(){this.#W+=1}resumeStrandDiscards(){this.#W=Math.max(0,this.#W-1)}prepareEditor(){if(this.#V=!1,this.activeEditor&&this.activeEditor.isWaiting())return void this.closeEditor(!1,!1,e=>{e&&this.prepareEditor()});let e=this.hot.getSelectedRangeActive()?.highlight;if(!e||e.isHeader())return;let{row:t,col:r}=e,i=this.hot.runHooks("modifyGetCellCoords",t,r,!1,"meta"),n=t,o=r;Array.isArray(i)&&([n,o]=i);let s=this.hot.getCellMeta(n,o);if(this.cellProperties=s,!this.isCellEditable())return void this.clearActiveEditor();let l=this.hot.getCell(t,r,!0);if(l){var a;let e,i=this.hot.getCellEditor(s),h=n3(this.hot,o),d=this.hot.getSourceDataAtCell(this.hot.toPhysicalRow(n),o);this.activeEditor=(a=this.hot,nB(i)?(nF.get(i)||nU(null,i),e=nF.get(i)):"string"==typeof i?e=nH(i):tf('Only strings and functions can be passed as "editor" parameter'),e||tf(`No editor registered under name "${i}"`),e.getInstance(a)),this.activeEditor.prepare(t,r,h,l,d,s),this.#z=this.hot.rowIndexMapper.getPhysicalFromVisualIndex(t),this.#U=this.hot.columnIndexMapper.getPhysicalFromVisualIndex(r)}}isEditorOpened(){return this.activeEditor&&this.activeEditor.isOpened()}openEditor(e,t,r=!1){if(this.activeEditor?.isOpened()||this.activeEditor?.isWaiting()||this.prepareEditor(),!this.isCellEditable())return void this.clearActiveEditor();let i=this.hot.getSelectedRangeActive(),n=this.hot.runHooks("beforeBeginEditing",i.highlight.row,i.highlight.col,e,t,r);(t instanceof MouseEvent&&"boolean"!=typeof n&&(n=0===this.hot.selection.getLayerLevel()&&i.isSingle()),!1===n)?this.clearActiveEditor():(this.activeEditor||(this.hot.scrollToFocusedCell(),this.prepareEditor()),this.activeEditor&&(r&&this.activeEditor.enableFullEditMode(),this.activeEditor.beginEditing(e,t)))}closeEditor(e=!1,t=!1,r){this.activeEditor?this.activeEditor.finishEditing(e,t,r):r&&r(!1)}closeEditorAndSaveChanges(e){this.closeEditor(!1,e)}closeEditorAndRestoreOriginalValue(e){this.closeEditor(!0,e)}clearActiveEditor(){this.activeEditor=void 0,this.#z=null,this.#U=null}isCellEditable(){let e=this.hot.getSelectedRangeActive()?.highlight;if(!e||e.isHeader())return!1;let t=this.cellProperties,{row:r,col:i}=e;if(null===r||null===i||!t)return!1;let n=this.hot.getCellEditor(t);return!(t.readOnly||!n||this.#en(r,i))}moveSelectionAfterEnter(e){if(!this.hot.getSelected())return;let t={..."function"==typeof this.tableMeta.enterMoves?this.tableMeta.enterMoves(e):this.tableMeta.enterMoves};e.shiftKey&&(t.row=-(t.row??0),t.col=-(t.col??0)),this.hot.selection.isMultiple()||(this.hot.getSelectedRange()?.length??0)>1?this.selection.transformFocus(t.row??0,t.col??0):this.selection.transformStart(t.row??0,t.col??0,!0)}#en(e,t){return this.hot.rowIndexMapper.isHidden(this.hot.toPhysicalRow(e))||this.hot.columnIndexMapper.isHidden(this.hot.toPhysicalColumn(t))}#J(){let e=this.activeEditor;if(!e||e.state!==nJ.EDITING&&e.state!==nJ.VIRGIN||null===e.row||null===e.col)return;let t=this.hot.rowIndexMapper.getPhysicalFromVisualIndex(e.row),r=this.hot.columnIndexMapper.getPhysicalFromVisualIndex(e.col);if(null===t||null===r){this.#z=null,this.#U=null;return}this.#z=t,this.#U=r}#ee(e){let t=this.activeEditor,r=t?.state===nJ.EDITING,i=t?.state===nJ.VIRGIN;if(!e.trimmedIndexesChanged&&!e.indexesSequenceChanged||!t||!r&&!i)return;if(null===this.#z||null===this.#U){0===this.#W&&(null===this.hot.rowIndexMapper.getPhysicalFromVisualIndex(t.row)||null===this.hot.columnIndexMapper.getPhysicalFromVisualIndex(t.col))&&(r&&t.cancelChanges(),this.clearActiveEditor());return}let n=this.hot.rowIndexMapper.getVisualFromPhysicalIndex(this.#z),o=this.hot.columnIndexMapper.getVisualFromPhysicalIndex(this.#U);if(i){(n!==t.row||o!==t.col)&&this.clearActiveEditor();return}if(null===n||null===o){t.cancelChanges(),this.clearActiveEditor();return}t.row=n,t.col=o}#et(e){let t=this.activeEditor??e;if(t&&null!==t.row&&null!==t.col&&this.#en(t.row,t.col)){if(t.isWaiting()){this.#V||(this.#V=!0,this.hot.addHookOnce("postAfterValidate",()=>{this.#V=!1,this.hot._registerTimeout(()=>this.#et(t),0)}));return}t.state!==nJ.EDITING||this.#V||(this.#V=!0,this.hot._registerTimeout(()=>{this.#V=!1,!this.destroyed&&t.state===nJ.EDITING&&null!==t.row&&null!==t.col&&this.#en(t.row,t.col)&&t.finishEditing(!1,!1,e=>{e||t.finishEditing(!0)})},0))}}#er(e){let t=this.hot.getSelectedRangeActive();if(!this.hot.isListening()||!t||t.highlight.isHeader()||nd(e))return;let{keyCode:r}=e,i=(e.ctrlKey||e.metaKey)&&!e.altKey;this.activeEditor&&(!this.activeEditor||this.activeEditor.isWaiting())||no(r)||nl(r)||i||this.isEditorOpened()||this.openEditor("",e)}#ei(e,t){t?.isCell()&&(this.hot.getShortcutManager().isCtrlPressed()?this.clearActiveEditor():this.openEditor(null,e,!0))}destroy(){this.destroyed=!0,this.eventManager.destroy()}}let n5=new WeakMap;function n4(e){return e[0].toUpperCase()+e.substr(1)}function n8(...e){let t=[],r=e.length;for(;r;){let i=eW(e[r-=1]).toLowerCase();-1===t.indexOf(i)&&t.push(i)}return 1===t.length}function n9(){let e=new Uint16Array(4);return globalThis.crypto.getRandomValues(e),Array.from(e,e=>e.toString(16).padStart(4,"0")).join("")}function n7(e){if("string"!=typeof e)return!1;try{let t=JSON.parse(e);return"object"==typeof t&&null!==t}catch{return!1}}function oe(e){return/^(?:\d\d?%|100%)$/.test(e)}n6.getInstance=function(e,t,r){let i=n5.get(e);return i||(i=new n6(e,t,r),n5.set(e,i)),i};let ot={amp:"&",lt:"<",gt:">",quot:'"',apos:"'",nbsp:"\xa0",ndash:"\u2013",mdash:"\u2014",hellip:"\u2026",lsquo:"\u2018",rsquo:"\u2019",ldquo:"\u201C",rdquo:"\u201D",laquo:"\xab",raquo:"\xbb",bull:"\u2022",middot:"\xb7",dagger:"\u2020",copy:"\xa9",reg:"\xae",trade:"\u2122",deg:"\xb0",plusmn:"\xb1",times:"\xd7",divide:"\xf7",euro:"\u20AC",pound:"\xa3",yen:"\xa5",cent:"\xa2",sect:"\xa7",para:"\xb6",shy:"\xad",ensp:"\u2002",emsp:"\u2003",thinsp:"\u2009"};function or(e){return String(e).replace(/&(#[0-9]+|#[xX][0-9a-fA-F]+|[a-zA-Z]+);/g,(e,t)=>{if("#"===t[0]){let r="x"===t[1]||"X"===t[1]?parseInt(t.slice(2),16):parseInt(t.slice(1),10);return!Number.isFinite(r)||r<0||r>1114111?e:0===r||r>=55296&&r<=57343?"\uFFFD":String.fromCodePoint(r)}return Object.hasOwn(ot,t)?ot[t]:e})}function oi(e){return or(on(e))}function on(e){let t=String(e),r="",i=0,n=!1,o="";for(let e=0;e<t.length;e++){let s=t[e];i>0&&!n&&('"'===s||"'"===s)?(n=!0,o=s):n&&s===o?n=!1:n||"<"!==s?!n&&">"===s&&i>0?i-=1:0===i&&(r+=s):i+=1}return r}let oo={"&":"&","<":"<",">":">",'"':""","'":"'"};function os(e){return String(e).replace(/[&<>"']/g,e=>oo[e])}function ol(e){return"string"!=typeof e?e:e.replace(/([A-Z])/g,"-$1").replaceAll("_","-").toLowerCase()}let oa="I\u0130\xcc\xcd\u0128",oh=oa.toLowerCase(),od=new Map;function ou(e,t){return!function(e){let t,r=od.get(e);if(void 0!==r)return r;try{t=oa.toLocaleLowerCase(e)!==oh}catch{t=!1}return od.set(e,t),t}(t)?e.toLowerCase():e.toLocaleLowerCase(t)}let oc=null,og=/^[^\r\u0300-\uFFFF]*$/;function op(e){return og.test(e)?e.split(""):Array.from((oc??=new Intl.Segmenter).segment(e),e=>e.segment)}function om(e){if(og.test(e))return e.length;oc??=new Intl.Segmenter;let t=0;for(let r of oc.segment(e))t+=1;return t}function of(e,t,r){let i=op(e.slice(0,t)),n=i.slice(0,Math.max(i.length-r,0)).join("");return{value:n+e.slice(t),index:n.length}}function ow(e,t=!0){return e.getSettings().sanitizer??t}function oy(e,t,r,i=!0){if(!t)return t;let{sanitizer:n}=e.getSettings();return"function"==typeof n?n(t,r)??"":(i&&rq.test(t)&&rs(e.rootElement,rX,rQ(r)),t)}let ob={" ":" ","&":"&","<":"<",">":">"},oC=RegExp(Object.keys(ob).map(e=>`(${e})`).join("|"),"gi");function oS(e,t){let r=String(t);return rq.test(r)?String(oy(e,r,"header",!1)):r}function ov(e){let t=e.hasColHeaders(),r=e.hasRowHeaders(),i=[t?-1:0,r?-1:0,e.countRows()-1,e.countCols()-1],n=e.getData(...i),o=n.length,s=o>0?n[0].length:0,l=["<table>","</table>"],a=t?["<thead>","</thead>"]:[],h=["<tbody>","</tbody>"],d=+!!r,u=+!!t;for(let i=0;i<o;i+=1){let o=t&&0===i,l=[];for(let t=0;t<s;t+=1){let s=!o&&r&&0===t,a="";if(o)a=`<th>${oS(e,e.getColHeader(t-d))}</th>`;else if(s)a=`<th>${oS(e,e.getRowHeader(i-u))}</th>`;else{let r=n[i][t],{hidden:o,rowspan:s,colspan:l}=e.getCellMetaTransient(i-u,t-d);if(!o){let e=[];if(s&&e.push(`rowspan="${s}"`),l&&e.push(`colspan="${l}"`),ej(r))a=`<td ${e.join(" ")}></td>`;else{let t=String(r).replaceAll("<","<").replaceAll(">",">").replace(/(<br(\s*|\/)>(\r\n|\n)?|\r\n|\n)/g,"<br>\r\n").replace(/\x20/gi," ").replace(/\t/gi,"	");a=`<td ${e.join(" ")}>${t}</td>`}}}l.push(a)}let c=["<tr>",...l,"</tr>"].join("");o?a.splice(1,0,c):h.splice(-1,0,c)}return l.splice(1,0,a.join(""),h.join("")),l.join("")}function oR(e){return or(e.replaceAll(" ","\xa0").replaceAll("\r","\n"))}function oE(e,t){let r=e.hasColHeaders(),i=e.hasRowHeaders(),n=[r?-1:0,i?-1:0,e.countRows()-1,e.countCols()-1],o=e.getData(...n),s=o.length,l=s>0?o[0].length:0,a=+!!i,h=+!!r,d=t.createElement("table"),u=t.createElement("thead"),c=t.createElement("tbody"),g=(t,r)=>{rJ(t,String(r),ow(e,!1),"header",e.rootElement)},p=(e,r)=>{String(r).split(/\r\n|\n/).forEach((r,i)=>{if(i>0){e.appendChild(t.createElement("br")),e.appendChild(t.createTextNode(`
|
|
55
55
|
${oR(r)}`));return}e.appendChild(t.createTextNode(oR(r)))})};for(let n=0;n<s;n+=1){let s=r&&0===n,d=t.createElement("tr");for(let r=0;r<l;r+=1){let l=!s&&i&&0===r;if(s){let i=t.createElement("th");g(i,e.getColHeader(r-a)),d.appendChild(i)}else if(l){let r=t.createElement("th");g(r,e.getRowHeader(n-h)),d.appendChild(r)}else{let i=o[n][r],{hidden:s,rowspan:l,colspan:u}=e.getCellMetaTransient(n-h,r-a);if(!s){let e=t.createElement("td");l&&e.setAttribute("rowspan",String(l)),u&&e.setAttribute("colspan",String(u)),ej(i)||p(e,i),d.appendChild(e)}}}s?u.appendChild(d):c.appendChild(d)}return r&&d.appendChild(u),d.appendChild(c),d}function oT(e){let t=e.length,r=["<table>"];for(let i=0;i<t;i+=1){let n=e[i],o=n.length,s=[];0===i&&r.push("<tbody>");for(let e=0;e<o;e+=1){let t=n[e],r=ej(t)?"":t.toString().replaceAll("&","&").replaceAll("<","<").replaceAll(">",">").replace(/(<br(\s*|\/)>(\r\n|\n)?|\r\n|\n)/g,"<br>\r\n").replace(/\x20{2,}/gi,e=>`<span style="mso-spacerun: yes">${" ".repeat(e.length-1)} </span>`).replace(/\t/gi,"	");s.push(`<td>${r}</td>`)}r.push("<tr>",...s,"</tr>"),i+1===t&&r.push("</tbody>")}return r.push("</table>"),r.join("")}let ox=/<td\b[^>]*>/i,oA=/<\/\s*td\s*>/i,oM=/<p.*?>/g;function oI(e){let t=[],r=0;for(;r<e.length;){let i,n=e.substring(r).match(ox);if(!n){t.push(e.substring(r));break}let o=r+(n.index??0),s=n[0],l=o+s.length;t.push(e.substring(r,o));let a=function(e,t){let r=1,i=t;for(;r>0;){let t=e.substring(i),n=t.match(ox),o=t.match(oA);if(!o)break;let s=i+(o.index??0),l=o[0].length,a=n?i+(n.index??0):e.length;if(a<s)r+=1,i=a+(n?.[0].length??0);else{if(0==(r-=1))return{start:s,length:l};i=s+l}}return null}(e,l);if(!a){t.push(e.substring(o));break}let h=e.substring(o,a.start+a.length),d=a.start-o,u=h.substring(s.length,d).trim().replaceAll(/\n\s+/g," ").replaceAll(oM,"\n").replace(/^\n+/,"").replaceAll(/<\/(.*)>\s+$/mg,"</$1>");do i=u,u=u.replace(/<(?!br\b)[^>]+>/gi,"");while(u!==i);u=u.replaceAll(/^ $/mg,""),t.push(`${s}${u}</td>`),r=a.start+a.length}return t.join("")}function oN(e,t=document,r={}){var i;let n={},o=e,s=null;if(null!=o&&("string"==typeof o||!o.nodeType)){let e=!1===r.normalize||"string"!=typeof o?o:oI(o);o=(s=new(t.defaultView?.DOMParser??DOMParser)().parseFromString(e,"text/html")).querySelector("table")}if(!o||"TABLE"!==((i=o)&&i.nodeName||""))return;let l=o,a=s?.querySelector('meta[name$="enerator"]')??null,h=null!==l.querySelector("tbody th"),d=function(e){let t=e.rows,r=[],i=0;for(let e=0;e<t.length;e+=1){let n=t[e].cells,o=function(e){for(let t=e.length-1;t>=0;t-=1)if("TD"===e[t].nodeName)return t;return -1}(n),s=r[e]||0;for(let i=0;i<=o;i+=1){let{colSpan:l,rowSpan:a,nodeName:h}=n[i];if("TD"===h){let n=i===o?1:l,h=Math.min(e+a,t.length);s+=n;for(let t=e+1;t<h;t+=1)r[t]=(r[t]||0)+l}}i=Math.max(i,s)}return i}(l),u=l.tFoot&&Array.from(l.tFoot.rows)||[],c=[],g=!1,p=0,m=0;if(l.tHead){let e=Array.from(l.tHead.rows).filter(e=>{let t=null!==e.querySelector("td");return t&&c.push(e),!t});g=(p=e.length)>0,p>1?n.nestedHeaders=Array.from(e).reduce((e,t)=>{let r=Array.from(t.cells).reduce((e,t,r)=>{if(h&&0===r)return e;let{colSpan:i,innerHTML:n}=t;return e.push(i>1?{label:n,colspan:i}:n),e},[]);return e.push(r),e},[]):g&&(n.colHeaders=Array.from(e[0].children).reduce((e,t,r)=>(h&&0===r||e.push(t.innerHTML),e),[]))}c.length&&(n.fixedRowsTop=c.length),u.length&&(n.fixedRowsBottom=u.length);let f=[...c,...Array.from(l.tBodies).reduce((e,t)=>(Array.from(t.rows).forEach(t=>{e.push(t)}),e),[]),...u],w=Array.from({length:m=f.length},()=>Array.from({length:d})),y=[],b=[];for(let e=0;e<m;e++){let t=Array.from(f[e].cells),r=t.length;for(let i=0;i<r;i++){let r=t[i],{nodeName:n,innerHTML:o,rowSpan:s,colSpan:l}=r,h=w[e].findIndex(e=>void 0===e);if("TD"===n){let t=Math.min(l,d-h);if(s>1||t>1){for(let r=e;r<e+s;r++)if(r<m)for(let e=h;e<h+t;e++)w[r][e]=null;let i=r.getAttribute("style");i&&i.includes("mso-ignore:colspan")||y.push({col:h,row:e,rowspan:s,colspan:t})}let i="";i=a&&/excel/gi.test(a.content)?o.replace(/[\r\n][\x20]{0,2}/g," ").replace(/<br(\s*|\/)>[\r\n]?[\x20]{0,3}/gim,"\r\n"):o.replace(/<br(\s*|\/)>[\r\n]?/gim,"\r\n"),w[e][h]=i.replace(oC,e=>ob[e])}else b.push(o)}}return y.length&&(n.mergeCells=y),b.length&&(n.rowHeaders=b),w.length&&(n.data=w),n}function oO(e,t=[]){if("number"==typeof e)return!isNaN(e)&&isFinite(e);if("string"==typeof e){if(0===e.length)return!1;if(1===e.length)return/\d/.test(e);let r=Array.from(new Set([".",...t])).map(e=>`\\${e}`).join("|");return RegExp(`^[+-]?(((${r})?\\d+((${r})\\d+)?(e[+-]?\\d+)?)|(0x[a-f\\d]+))$`,"i").test(e.trim())}return"object"==typeof e&&null!==e&&"number"==typeof e.valueOf()&&!(e instanceof Date)}function ok(e){return oO(e,[","])}function oH(e,t){return"."===t&&"string"==typeof e&&/^[+-]?[1-9]\d{0,2}(,\d{3})+$/.test(e.trim())}function o_(e,t){return","===t&&"string"==typeof e&&/^[+-]?[1-9]\d{0,2}(\.\d{3})+$/.test(e.trim())}function oP(e,t){return","===t&&"string"==typeof e&&/^[+-]?[1-9]\d{0,2}(\.\d{3})+,\d+$/.test(e.trim())}function oD(e,t,r){let i,n,o;for("function"==typeof t?(i=-1,n=e,o=t):(i=e-1,n=t,o=r);++i<=n&&!1!==o(i););}function oL(e,t,r){let i,n,o=e+1;for("function"==typeof t?(n=t,i=0):(n=r,i=t);--o>=i&&!1!==n(o););}function oF(e,t){return Number.parseInt(String(e*(t=isNaN(t=Number.parseInt(t.toString().replace("%",""),10))?0:t)/100),10)}function oB(e,t,r){return Math.min(e,t)===e?t:Math.max(e,r)===e?r:e}function oV(e,t={}){let{decimalSeparator:r}=t,i=e.trim();if(oH(e,r))return Number.parseFloat(i.replaceAll(",",""));if(o_(e,r))return Number.parseFloat(i.replaceAll(".",""));if(oP(e,r))return Number.parseFloat(i.replaceAll(".","").replace(",","."));let n=i.replace(",",".");return!1===isNaN(Number.parseFloat(n))?Number.parseFloat(n):null}function oz(e){let t=/^([+-]?)(\d*)(?:\.(\d*))?(?:e([+-]?\d+))?$/i.exec(e.trim());if(null===t||""===t[2]&&(t[3]??"")==="")return e.trim();let r="-"===t[1]?"-":"",i=t[2],n=t[3]??"",o=Number.parseInt(t[4]??"0",10);if(Math.abs(o)>1e3)return e.trim();let s=`${i}${n}`,l=i.length+o;l>s.length&&(s=s.padEnd(l,"0")),l<1&&(s=`${"0".repeat(1-l)}${s}`,l=1);let a=s.slice(0,l).replace(/^0+(?=\d)/,""),h=s.slice(l);return`${r}${a}${h.length>0?`.${h}`:""}`}function oU(e,t){let r=Object.is(t,-0)?"-0":String(t);return oz(e.replace(",","."))!==oz(r)}function oW(e){return Number.isInteger(e)&&"number"==typeof e&&e>=0}let o$=new Map([["asc",[-1,1]],["desc",[1,-1]]]),oG=e=>`The priority '${e}' is already declared in a map.`,oj=e=>`The priority '${e}' is not a number.`,oY=e=>`The id '${e}' is already declared in a map.`;function oK({errorIdExists:e}={}){let t=new Map,r=i3(e)?e:oY;function i(){return[...t]}function n(e){return t.has(e)}return{addItem:function(e,i){n(e)&&tf(String(r(e))),t.set(e,i)},clear:function(){t.clear()},getId:function(e){let[t]=i().find(([t,r])=>e===r&&t)||[null];return t},getItem:function(e){return t.get(e)},getItems:i,getValues:function(){return[...t.values()]},hasItem:n,removeItem:function(e){return t.delete(e)}}}let oq=e=>`'${e}' value is already declared in a unique set.`,oX=e=>`There is already registered "${e}" plugin.`,oQ=function({errorPriorityExists:e,errorPriorityNaN:t}={}){let r=new Map,i=i3(e)?e:oG,n=i3(t)?t:oj;return{addItem:function(e,t){oO(e)||tf(String(n(e))),r.has(e)&&tf(String(i(e))),r.set(e,t)},getItems:function(e="asc"){let[t,i]=o$.get(e)||o$.get("asc");return[...r].sort((e,r)=>e[0]<r[0]?t:i).map(e=>e[1])}}}({errorPriorityExists:e=>`There is already registered plugin on priority "${e}".`,errorPriorityNaN:e=>`The priority "${e}" is not a number.`}),oZ=function({errorItemExists:e}={}){let t=new Set,r=i3(e)?e:oq;return{addItem:function(e){t.has(e)&&tf(String(r(e))),t.add(e)},clear:function(){t.clear()},getItems:function(){return[...t]}}}({errorItemExists:oX}),oJ=oK({errorIdExists:oX}),o0=0;function o1(){return[...oQ.getItems(),...oZ.getItems()]}function o2(e){let t=n4(e);return oJ.getItem(t)}function o3(e){return!!o2(e)}function o6(e,t,r){var i,n,o,s,l,a;let h,[d,u,c]=(i=e,n=t,o=r,"function"==typeof i&&(i=(n=i).PLUGIN_KEY,o=n.PLUGIN_PRIORITY),[i,n,o]);void 0===o2(d)&&(s=d,l=u,a=c,h=n4(s),oJ.hasItem(h)&&tf(oX(h)),void 0===a?oZ.addItem(h):oQ.addItem(a,h),oJ.addItem(h,l),o0+=1)}let{register:o5,getItem:o4,hasItem:o8,getNames:o9,getValues:o7}=nO("renderers");function se(e){return"function"==typeof e?e:(o8(e)||tf(`No registered renderer found under "${e}" name`),o4(e))}function st(e,t){"string"!=typeof e&&(t=e,e=e.RENDERER_TYPE),o5(e,t)}let{register:sr,getItem:si,hasItem:sn,getNames:so,getValues:ss}=nO("validators");function sl(e){return"function"==typeof e?e:(sn(e)||tf(`No registered validator found under "${e}" name`),si(e))}function sa(e,t){"string"!=typeof e&&(t=e,e=e.VALIDATOR_TYPE),sr(e,t)}let{register:sh,getItem:sd,hasItem:su,getNames:sc,getValues:sg}=nO("cellTypes");function sp(e){return su(e)||tf(`You declared cell type "${e}" as a string that is not mapped to a known object.
|
|
@@ -64,8 +64,8 @@ ${oR(r)}`));return}e.appendChild(t.createTextNode(oR(r)))})};for(let n=0;n<s;n+=
|
|
|
64
64
|
before using it. Read more about this issue at:\x20
|
|
65
65
|
https://handsontable.com/docs/javascript-data-grid/language/#load-the-prepared-language-files`)}tR(dP,dp);let{register:dF,getValues:dB}=nO("phraseFormatters");dF("pluralize",function(e,t){return Array.isArray(e)&&Number.isInteger(t)?e[t]:e}),dF("substitute",function e(t,r){return Array.isArray(t)?t.map(t=>e(t,r)):ri(t,r)});let dV="Common:",dz=`${dV}ok`,dU=`${dV}cancel`,dW="ContextMenu:items",d$=`${dW}.noItems`,dG=`${dW}.insertRowAbove`,dj=`${dW}.insertRowBelow`,dY=`${dW}.insertColumnOnTheLeft`,dK=`${dW}.insertColumnOnTheRight`,dq=`${dW}.removeRow`,dX=`${dW}.removeColumn`,dQ=`${dW}.undo`,dZ=`${dW}.redo`,dJ=`${dW}.readOnly`,d0=`${dW}.clearColumn`,d1=`${dW}.copy`,d2=`${dW}.copyWithHeaders`,d3=`${dW}.copyWithGroupHeaders`,d6=`${dW}.copyHeadersOnly`,d5=`${dW}.cut`,d4=`${dW}.export`,d8=`${dW}.exportFileCsv`,d9=`${dW}.exportFileXlsx`,d7=`${dW}.freezeColumn`,ue=`${dW}.unfreezeColumn`,ut=`${dW}.mergeCells`,ur=`${dW}.unmergeCells`,ui=`${dW}.addComment`,un=`${dW}.editComment`,uo=`${dW}.removeComment`,us=`${dW}.readOnlyComment`,ul=`${dW}.align`,ua=`${dW}.align.left`,uh=`${dW}.align.center`,ud=`${dW}.align.right`,uu=`${dW}.align.justify`,uc=`${dW}.align.top`,ug=`${dW}.align.middle`,up=`${dW}.align.bottom`,um=`${dW}.borders`,uf=`${dW}.borders.top`,uw=`${dW}.borders.right`,uy=`${dW}.borders.bottom`,ub=`${dW}.borders.left`,uC=`${dW}.borders.remove`,uS=`${dW}.nestedHeaders.insertChildRow`,uv=`${dW}.nestedHeaders.detachFromParent`,uR=`${dW}.hideColumn`,uE=`${dW}.showColumn`,uT=`${dW}.hideRow`,ux=`${dW}.showRow`,uA="Filters:",uM=`${uA}conditions`,uI=`${uM}.none`,uN=`${uM}.isEmpty`,uO=`${uM}.isNotEmpty`,uk=`${uM}.isEqualTo`,uH=`${uM}.isNotEqualTo`,u_=`${uM}.beginsWith`,uP=`${uM}.endsWith`,uD=`${uM}.contains`,uL=`${uM}.doesNotContain`,uF=`${uM}.byValue`,uB=`${uM}.greaterThan`,uV=`${uM}.greaterThanOrEqualTo`,uz=`${uM}.lessThan`,uU=`${uM}.lessThanOrEqualTo`,uW=`${uM}.isBetween`,u$=`${uM}.isNotBetween`,uG=`${uM}.after`,uj=`${uM}.afterOrEqual`,uY=`${uM}.before`,uK=`${uM}.beforeOrEqual`,uq=`${uM}.today`,uX=`${uM}.tomorrow`,uQ=`${uM}.yesterday`,uZ=`${uA}labels.filterByCondition`,uJ=`${uA}labels.filterByValue`,u0=`${uA}labels.conjunction`,u1=`${uA}labels.disjunction`,u2=`${uA}values.blankCells`,u3=`${uA}buttons.selectAll`,u6=`${uA}buttons.clear`,u5=`${uA}buttons.ok`,u4=`${uA}buttons.cancel`,u8=`${uA}buttons.placeholder.search`,u9=`${uA}buttons.placeholder.value`,u7=`${uA}buttons.placeholder.secondValue`,ce="Pagination:",ct=`${ce}section.pagination`,cr=`${ce}.pageSize.auto`,ci=`${ce}section.pageSize`,cn=`${ce}section.counter`,co=`${ce}section.navigation`,cs=`${ce}firstPage`,cl=`${ce}prevPage`,ca=`${ce}nextPage`,ch=`${ce}lastPage`,cd="SheetsBar:",cu=`${cd}section.sheetsBar`,cc=`${cd}addSheet`,cg=`${cd}allSheets`,cp=`${cd}sheetMenu`,cm=`${cd}renameSheet`,cf=`${cd}items.delete`,cw=`${cd}items.duplicate`,cy=`${cd}items.rename`,cb=`${cd}items.moveRight`,cC=`${cd}items.moveLeft`,cS=`${cd}pagePrev`,cv=`${cd}pageNext`,cR=`${cd}announcement.sheetChanged`,cE=`${cd}announcement.renameRejected`,cT=`${cd}announcement.renameNotChanged`,cx=`${cd}announcement.sheetDuplicated`,cA=`${cd}announcement.sheetMoved`,cM=`${cd}defaultSheetName`,cI="CheckboxRenderer:",cN=`${cI}checked`,cO=`${cI}unchecked`,ck=`${cI}headerCheckAll`,cH="Loading:",c_=`${cH}title`,cP="Notification:",cD=`${cP}buttons.close`,cL="ExportFile:",cF=`${cL}dialog.title`,cB="EmptyDataState:",cV=`${cB}title`,cz=`${cB}description`,cU=`${cB}title.filters`,cW=`${cB}description.filters`,c$=`${cB}buttons.filters.reset`,cG=`${cB}title.loading`,cj=`${cB}description.loading`,cY="DataProvider:",cK=`${cY}errors.fetch`,cq=`${cY}errors.create`,cX=`${cY}errors.update`,cQ=`${cY}errors.remove`,cZ=`${cY}errors.requestFailed`,cJ=`${cY}buttons.refetch`,c0="RowSelection:",c1=`${c0}selectRow`,c2=`${c0}selectAll`,c3=`${c0}announce.rowSelected`,c6=`${c0}announce.rowDeselected`,c5=`${c0}announce.count`,c4=`${c0}menu.removeSelectedRows`,c8=`${c0}menu.clearSelection`,c9="FreezeBar:",c7=`${c9}rows.top`,ge=`${c9}rows.bottom`,gt=`${c9}columns.start`,gr=`${c9}columns.end`,gi="NestedRows:",gn=`${gi}announcement.expanded`,go=`${gi}announcement.collapsed`,gs="ColumnSorting:",gl=`${gs}announcement.ascending`,ga=`${gs}announcement.descending`,gh=`${gs}announcement.removed`,gd="FormulaBuilder:",gu=`${gd}labels.formulaEditor`,gc=`${gd}labels.formulaInput`,gg=`${gd}labels.cellAddress`,gp=`${gd}labels.formulaSuggestions`,gm=`${gd}hints.acceptSuggestion`,gf=`${gd}hints.navigateSuggestions`,gw=`${gd}labels.functionHelp`,gy=`${gd}labels.functionHelpFor`,gb=`${gd}labels.functionExample`,gC=`${gd}labels.functionDescription`,gS=`${gd}labels.optionalArgument`,gv=`${gd}labels.repeatableArgument`,gR=`${gd}labels.learnMore`,gE=`${gd}labels.close`,gT=`${gd}announce.invalidCellAddress`,gx=`${gd}announce.cellUnavailable`,gA=`${gd}announce.cellError`,gM=`${gd}announce.dependentCellError`,gI=`${gd}announce.dependentCellErrors`,gN={languageCode:"en-US",[dz]:"OK",[dU]:"Cancel",[d$]:"No available options",[dG]:"Insert row above",[dj]:"Insert row below",[dY]:"Insert column left",[dK]:"Insert column right",[dq]:["Remove row","Remove rows"],[dX]:["Remove column","Remove columns"],[dQ]:"Undo",[dZ]:"Redo",[dJ]:"Read only",[d0]:"Clear column",[ul]:"Alignment",[ua]:"Left",[uh]:"Center",[ud]:"Right",[uu]:"Justify",[uc]:"Top",[ug]:"Middle",[up]:"Bottom",[d7]:"Freeze column",[ue]:"Unfreeze column",[um]:"Borders",[uf]:"Top",[uw]:"Right",[uy]:"Bottom",[ub]:"Left",[uC]:"Remove border(s)",[ui]:"Add comment",[un]:"Edit comment",[uo]:"Delete comment",[us]:"Read-only comment",[ut]:"Merge cells",[ur]:"Unmerge cells",[d1]:"Copy",[d2]:["Copy with header","Copy with headers"],[d3]:["Copy with group header","Copy with group headers"],[d6]:["Copy header only","Copy headers only"],[d5]:"Cut",[d4]:"Export",[d8]:"To CSV",[d9]:"To Excel",[cF]:"Exporting\u2026",[uS]:"Insert child row",[uv]:"Detach from parent",[uR]:["Hide column","Hide columns"],[uE]:["Show column","Show columns"],[uT]:["Hide row","Hide rows"],[ux]:["Show row","Show rows"],[uI]:"None",[uN]:"Is empty",[uO]:"Is not empty",[uk]:"Is equal to",[uH]:"Is not equal to",[u_]:"Begins with",[uP]:"Ends with",[uD]:"Contains",[uL]:"Does not contain",[uB]:"Greater than",[uV]:"Greater than or equal to",[uz]:"Less than",[uU]:"Less than or equal to",[uW]:"Is between",[u$]:"Is not between",[uG]:"After",[uj]:"After or equal to",[uY]:"Before",[uK]:"Before or equal to",[uq]:"Today",[uX]:"Tomorrow",[uQ]:"Yesterday",[u2]:"Blank cells",[uZ]:"Filter by condition",[uJ]:"Filter by value",[u0]:"And",[u1]:"Or",[u3]:"Select all",[u6]:"Select none",[u5]:"OK",[u4]:"Cancel",[u8]:"Search",[u9]:"Value",[u7]:"Second value",[ct]:"Pagination",[ci]:"Page size",[cr]:"Auto",[cn]:"[start] - [end] of [total]",[co]:"Page [currentPage] of [totalPages]",[cs]:"Go to first page",[cl]:"Go to previous page",[ca]:"Go to next page",[ch]:"Go to last page",[cu]:"Sheets",[cc]:"Add sheet",[cg]:"All sheets",[cp]:"Sheet actions: [name]",[cm]:"Sheet name",[cf]:"Delete",[cw]:"Duplicate",[cy]:"Rename",[cb]:"Move right",[cC]:"Move left",[cS]:"Scroll sheets backward",[cv]:"Scroll sheets forward",[cR]:"Sheet [name] activated",[cE]:"Sheet name not changed: [name] is already in use",[cT]:"Sheet name not changed",[cx]:"Sheet [name] duplicated as [copy]",[cA]:"Sheet [name] moved to position [position] of [count]",[cM]:"Sheet",[cN]:"Checked",[cO]:"Unchecked",[c_]:"Loading...",[cD]:"Close",[cV]:"No data available",[cz]:"There\u2019s nothing to display yet.",[cU]:"No results found",[cW]:"It looks like your current filters are hiding all results.",[c$]:"Reset filters",[cG]:"Loading data",[cj]:"Please wait.",[cK]:"Could not load data",[cq]:"Could not create rows",[cX]:"Could not update rows",[cQ]:"Could not remove rows",[cZ]:"Request failed",[cJ]:"Refetch",[c1]:"Select row [row]",[c2]:"Select all rows ([selected] of [total] selected)",[ck]:"Check all ([checked] of [total] checked)",[c3]:"Row [row] selected",[c6]:"Row [row] deselected",[c5]:"[selected] of [total] rows selected",[c4]:"Remove selected rows ([count])",[c8]:"Clear row selection",[c7]:"Frozen rows at the top",[ge]:"Frozen rows at the bottom",[gt]:"Frozen columns at the start",[gr]:"Frozen columns at the end",[gn]:"Expanded row [label], expanded rows shown: [count]",[go]:"Collapsed row [label]",[gl]:"Sorted by [label], ascending",[ga]:"Sorted by [label], descending",[gh]:"Sorting removed from [label]",[gu]:"Formula editor",[gc]:"Formula input",[gg]:"Cell address",[gp]:"Formula suggestions",[gm]:"to accept.",[gf]:"to navigate",[gw]:"Function help",[gy]:"[name] function help",[gb]:"Example",[gC]:"About",[gS]:"optional",[gv]:"repeatable",[gR]:"Learn more",[gE]:"Close",[gT]:"Invalid cell address: [text]",[gx]:"Cannot select [text]",[gA]:"Error in [cell]: [message].",[gM]:"[count] more cell now contains an error.",[gI]:"[count] more cells now contain errors."},gO=gN.languageCode,gk="sr-SP",{register:gH,getItem:g_,hasItem:gP,getValues:gD}=nO("languagesDictionaries");function gL(e,t){let r=e,i=t;return tx(e)&&(r=String((i=e).languageCode)),function(e,t){e!==gO&&tI(g_(gO),(e,r)=>{eG(t[r])&&(t[r]=e)})}(r,i),gH(r,tS(i)),tS(i)}function gF(e){return gP(e)?tS(g_(e)):null}gL(gN);function gB(e,t,r){var i,n;let o=gF(e);if(null===o)return null;let s=o[t];if(eG(s))return null;let l=(i=s,n=r,dB().reduce((e,t)=>t(e,n),i));return Array.isArray(l)?l[0]:l}function gV(e){e===gk&&rh(`language.${gk}`,`The "${gk}" language code will be removed in 20.0.0. Use the "sr-Latn-RS" language code instead.`)}class gz{constructor(e,t){this.settings=e,this.cellRange=t||null}isEmpty(){return null===this.cellRange}add(e){return this.isEmpty()?this.cellRange=this.settings.createCellRange(e):this.cellRange.expand(e),this}replace(e,t){if(!this.isEmpty()){if(this.cellRange.from.isEqual(e))return this.cellRange.from=t,!0;if(this.cellRange.to.isEqual(e))return this.cellRange.to=t,!0}return!1}clear(){return this.cellRange=null,this}getCorners(){let e=this.cellRange.getOuterTopStartCorner(),t=this.cellRange.getOuterBottomEndCorner();return[e.row??0,e.col??0,t.row??0,t.col??0]}destroy(){this.runLocalHooks("destroy")}}tR(gz,dp);let gU=gz,gW=class extends gU{visualCellRange=null;constructor(e,t){super(e,null),this.visualCellRange=t||null,this.commit()}add(e){return null===this.visualCellRange?this.visualCellRange=this.settings.createCellRange(e):this.visualCellRange.expand(e),this}clear(){return this.visualCellRange=null,super.clear()}trimToVisibleCellsRangeOnly(e){let{from:t,to:r}=e,i="N-S"===e.getVerticalDirection()?1:-1,n="start-end"===e.getInlineDirection()?1:-1,o=this.getNearestNotHiddenCoords(t,i,n),s=this.getNearestNotHiddenCoords(r,-i,-n);if(null===o||null===s)return null;let l=o.row??0,a=s.row??0,h=o.col??0,d=s.col??0,u=1===n&&h>d||-1===n&&h<d;return 1===i&&l>a||-1===i&&l<a||u?null:this.settings.createCellRange(o,o,s)}getNearestNotHiddenCoords(e,t,r=t){if(null===e.row||null===e.col)return null;let i=this.getNearestNotHiddenIndex(this.settings.rowIndexMapper,e.row,t);if(null===i)return null;let n=this.getNearestNotHiddenIndex(this.settings.columnIndexMapper,e.col,r);return null===n?null:this.settings.createCellCoords(i,n)}getNearestNotHiddenIndex(e,t,r){return t<0?t:e.getNearestNotHiddenIndex(t,r)}commit(){if(null===this.visualCellRange)return this;let e=this.trimToVisibleCellsRangeOnly(this.visualCellRange);return null===e?this.cellRange=null:this.cellRange=this.createRenderableCellRange(e.from,e.to),this}syncWith(e){let t=e.from.clone().normalize(),r="N-S"===e.getVerticalDirection()?1:-1,i="W-E"===e.getHorizontalDirection()?1:-1,n=this.visualCellRange?this.settings.visualToRenderableCoords(this.visualCellRange.highlight):null,o=null;if((null===n||null===n.col||null===n.row)&&(o=this.getNearestNotHiddenCoords(t,r,i)),null!==o&&e.includes(o)){let t=e.highlight.clone();if((t.row??-1)>=0&&(t.row=o.row),(t.col??-1)>=0&&(t.col=o.col),null===this.cellRange){let e=this.settings.visualToRenderableCoords(t);this.cellRange=this.settings.createCellRange(e)}e.setHighlight(t)}return"focus"===this.settings.selectionType&&null!==n&&null===o&&null!==this.visualCellRange&&e.setHighlight(this.visualCellRange.highlight),this}getCorners(){let{from:e,to:t}=this.cellRange;return[Math.min(e.row??0,t.row??0),Math.min(e.col??0,t.col??0),Math.max(e.row??0,t.row??0),Math.max(e.col??0,t.col??0)]}getVisualCorners(){let e=this.cellRange,t=this.settings.renderableToVisualCoords(e.getTopStartCorner()),r=this.settings.renderableToVisualCoords(e.getBottomEndCorner());return[t.row,t.col,r.row,r.col]}createRenderableCellRange(e,t){let r=this.settings.visualToRenderableCoords(e),i=this.settings.visualToRenderableCoords(t);return null===r.row||null===r.col||null===i.row||null===i.col?null:this.settings.createCellRange(r,r,i)}};function g$({activeHeaderClassName:e,...t}){return new gW({className:e,...t,selectionType:hN})}function gG({areaCornerVisible:e,adjustHandlesVisible:t,moveEnabled:r,...i}){return new gW({className:"area",createLayers:!0,border:{width:1,color:"#4b89ff",cornerVisible:e,adjustHandlesVisible:t,moveEnabled:r},...i,selectionType:"area"})}function gj({...e}){return new gW({className:"highlight",...e,selectionType:"area"})}function gY({columnClassName:e,...t}){return new gW({className:e,...t,selectionType:"column"})}function gK({headerClassName:e,...t}){return new gW({className:e,...t,selectionType:"header"})}function gq({rowClassName:e,...t}){return new gW({className:e,...t,selectionType:"row"})}class gX{layerLevel=0;layeredAreas=new Map;areas=new Map;rowHeaders=new Map;columnHeaders=new Map;activeRowHeaders=new Map;activeColumnHeaders=new Map;activeCornerHeaders=new Map;rowHighlights=new Map;columnHighlights=new Map;customSelections=[];constructor(e){this.options=e,this.focus=function({cellCornerVisible:e,cellMoveEnabled:t,...r}){return new gW({className:"current",headerAttributes:[q()],border:{width:2,color:"#4b89ff",cornerVisible:e,moveEnabled:t},...r,selectionType:"focus"})}(e),this.fill=function({...e}){return new gW({className:"fill",border:{width:1,color:"#ff0000"},...e,selectionType:"fill"})}(e)}isEnabledFor(e,t){let r=e;"focus"===e&&(r="current");let i=this.options.disabledCellSelection;if("function"!=typeof i)return!0;let n=i(t.row,t.col);return"string"==typeof n&&(n=[n]),!n||Array.isArray(n)&&!n.includes(r)}useLayerLevel(e=0){return this.layerLevel=e,this}getFocus(){return this.focus}getFill(){return this.fill}createLayeredArea(){return this.#oI(this.layeredAreas,gG)}getLayeredAreas(){return[...this.layeredAreas.values()]}createArea(){return this.#oI(this.areas,gj)}getAreas(){return[...this.areas.values()]}createRowHeader(){return this.#oI(this.rowHeaders,gK)}getRowHeaders(){return[...this.rowHeaders.values()]}createColumnHeader(){return this.#oI(this.columnHeaders,gK)}getColumnHeaders(){return[...this.columnHeaders.values()]}createActiveRowHeader(){return this.#oI(this.activeRowHeaders,g$)}getActiveRowHeaders(){return[...this.activeRowHeaders.values()]}createActiveColumnHeader(){return this.#oI(this.activeColumnHeaders,g$)}getActiveColumnHeaders(){return[...this.activeColumnHeaders.values()]}createActiveCornerHeader(){return this.#oI(this.activeCornerHeaders,g$)}getActiveCornerHeaders(){return[...this.activeCornerHeaders.values()]}createRowHighlight(){return this.#oI(this.rowHighlights,gq)}getRowHighlights(){return[...this.rowHighlights.values()]}createColumnHighlight(){return this.#oI(this.columnHighlights,gY)}getColumnHighlights(){return[...this.columnHighlights.values()]}getCustomSelections(){return[...this.customSelections.values()]}addCustomSelection(e){this.customSelections.push(function({border:e,visualCellRange:t,...r}){return new gW({...e,...r,selectionType:hO},t)}({...this.options,...e}))}updateHighlightClassNames(e){"rowClassName"in e&&(this.options.rowClassName=e.rowClassName,eo(this.rowHighlights.values(),t=>{t.settings.className=e.rowClassName})),"columnClassName"in e&&(this.options.columnClassName=e.columnClassName,eo(this.columnHighlights.values(),t=>{t.settings.className=e.columnClassName})),"headerClassName"in e&&(this.options.headerClassName=e.headerClassName,eo(this.rowHeaders.values(),t=>{t.settings.className=e.headerClassName}),eo(this.columnHeaders.values(),t=>{t.settings.className=e.headerClassName})),"activeHeaderClassName"in e&&(this.options.activeHeaderClassName=e.activeHeaderClassName,eo(this.activeRowHeaders.values(),t=>{t.settings.className=e.activeHeaderClassName}),eo(this.activeColumnHeaders.values(),t=>{t.settings.className=e.activeHeaderClassName}),eo(this.activeCornerHeaders.values(),t=>{t.settings.className=e.activeHeaderClassName}))}clear(){this.focus.clear(),this.fill.clear(),this.areas.forEach(e=>e.clear()),this.layeredAreas.forEach(e=>e.clear()),this.rowHeaders.forEach(e=>e.clear()),this.columnHeaders.forEach(e=>e.clear()),this.activeRowHeaders.forEach(e=>e.clear()),this.activeColumnHeaders.forEach(e=>e.clear()),this.activeCornerHeaders.forEach(e=>e.clear()),this.rowHighlights.forEach(e=>e.clear()),this.columnHighlights.forEach(e=>e.clear())}#oI(e,t){let r=this.layerLevel;if(e.has(r))return e.get(r);let i=t({layerLevel:r,...this.options});return e.set(r,i),i}[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]()}}class gQ{ranges=[];createCellRange;constructor(e){this.createCellRange=e}isEmpty(){return 0===this.size()}set(e){return this.clear(),this.ranges.push(this.createCellRange(e)),this}add(e){return this.ranges.push(this.createCellRange(e)),this}push(e){return this.ranges.push(e),this}pop(){return this.ranges.pop()}current(){return this.peekByIndex(this.size()-1)}previous(){return this.peekByIndex(this.size()-2)}includes(e,t=()=>!0){return this.ranges.some((r,i)=>r.includes(e)&&t(r,i))}findAll(e){let t=[];return this.ranges.forEach((r,i)=>{r.isEqual(e)&&t.push({range:r,layer:i})}),t}remove(e){return this.ranges=this.ranges.filter(t=>!e.some(e=>e.isEqual(t))),this}removeLayers(e){return this.ranges=this.ranges.filter((t,r)=>!e.includes(r)),this}clear(){return this.ranges.length=0,this}size(){return this.ranges.length}clone(){let e=new gQ(this.createCellRange);return e.ranges=this.ranges.map(e=>e.clone()),e}map(e){return this.ranges=this.ranges.map((t,r)=>e(t,r)),this}peekByIndex(e=0){let t;return e>=0&&e<this.size()&&(t=this.ranges[e]),t}[Symbol.iterator](){return this.ranges[Symbol.iterator]()}}class gZ{#oN;#oO=0;#ok={x:0,y:0};constructor(e,t){this.#oN=e,this.tableApi=t}setActiveLayerIndex(e){this.#oO=e}getCurrentSelection(){return this.#oN.peekByIndex(this.#oO)}transformStart(e,t,r=!1){this.#ok=this.calculateOffset();let i=this.tableApi.createCellCoords(e,t),n=this.getCurrentSelection().highlight,o=this.tableApi.visualToRenderableCoords(n),s=0,l=0;if(this.runLocalHooks("beforeTransformStart",i),null!==o.row&&null!==o.col){let{width:e,height:t}=this.#oH(),{row:o,col:a}=this.#o_(n),h=this.tableApi.fixedRowsBottom(),d=this.tableApi.fixedColumnsEnd(),u=this.tableApi.minSpareRows(),c=this.tableApi.minSpareCols(),g=this.tableApi.autoWrapRow(),p=this.tableApi.autoWrapCol(),m=this.tableApi.createCellCoords((o??0)+(i.row??0),(a??0)+(i.col??0));if((m.row??0)>=t){let i=t_(r&&u>0&&0===h),n=(m.col??0)+1,o=n>=e,s=this.tableApi.createCellCoords((m.row??0)-t,o?n-e:n);if(this.runLocalHooks("beforeColumnWrap",i,this.#oP(s),o),i.value)this.runLocalHooks("insertRowRequire",this.countRenderableRows());else if(p){if(this.shouldSwitchSelectionLayer()&&o&&this.#oN.size()>1){this.#oD();let e=this.#oL("forward");null!==e&&s.assign(e)}m.assign(s)}}else if((m.row??0)<0){let r=t_(p),i=(m.col??0)-1,n=i<0,o=this.tableApi.createCellCoords(t+(m.row??0),n?e+i:i);if(this.runLocalHooks("beforeColumnWrap",r,this.#oP(o),n),p){if(this.shouldSwitchSelectionLayer()&&n&&this.#oN.size()>1){this.#oF();let e=this.#oL("backward");null!==e&&o.assign(e)}m.assign(o)}}if({width:e,height:t}=this.#oH(),(m.col??0)>=e){let i=t_(r&&c>0&&0===d),n=(m.row??0)+1,o=n>=t,s=this.tableApi.createCellCoords(o?n-t:n,(m.col??0)-e);if(this.runLocalHooks("beforeRowWrap",i,this.#oP(s),o),i.value)this.runLocalHooks("insertColRequire",this.countRenderableColumns());else if(g){if(this.shouldSwitchSelectionLayer()&&o&&this.#oN.size()>1){this.#oD();let e=this.#oL("forward");null!==e&&s.assign(e)}m.assign(s)}}else if((m.col??0)<0){let r=t_(g),i=(m.row??0)-1,n=i<0,o=this.tableApi.createCellCoords(n?t+i:i,e+(m.col??0));if(this.runLocalHooks("beforeRowWrap",r,this.#oP(o),n),g){if(this.shouldSwitchSelectionLayer()&&n&&this.#oN.size()>1){this.#oF();let e=this.#oL("backward");null!==e&&o.assign(e)}m.assign(o)}}let{rowDir:f,colDir:w}=this.#oB(m);s=f,l=w,n=this.#oP(m)}return this.runLocalHooks("afterTransformStart",n,s,l),{selectionLayer:this.#oO,visualCoords:n}}transformEnd(e,t){this.#ok=this.calculateOffset();let r=this.tableApi.createCellCoords(e,t),i=this.getCurrentSelection(),n=this.tableApi.visualToRenderableCoords(i.highlight),o=this.#oV(i.to.row??0,i.from.row??0),s=this.#oz(i.to.col??0,i.from.col??0),l=i.to.clone(),a=0,h=0;if(this.runLocalHooks("beforeTransformEnd",r),null!==n.row&&null!==n.col&&null!==o&&null!==s){let{row:e,col:t}=this.#o_(i.highlight),n=this.tableApi.createCellCoords(o+(r.row??0),s+(r.col??0)),d=i.getTopStartCorner(),u=i.getTopEndCorner(),c=i.getBottomEndCorner();if((r.col??0)<0&&s>=(t??0)&&(n.col??0)<(t??0)){let e=(n.col??0)-(t??0);n.col=(this.#oz(d.col??0,u.col??0)??0)+e}else if((r.col??0)>0&&s<=(t??0)&&(n.col??0)>(t??0)){let e=this.#oz(u.col??0,d.col??0),t=Math.max((n.col??0)-(e??0),1);n.col=(e??0)+t}if((r.row??0)<0&&o>=(e??0)&&(n.row??0)<(e??0)){let t=(n.row??0)-(e??0);n.row=(this.#oV(d.row??0,c.row??0)??0)+t}else if((r.row??0)>0&&o<=(e??0)&&(n.row??0)>(e??0)){let e=this.#oV(c.row??0,d.row??0),t=Math.max((n.row??0)-(e??0),1);n.row=(e??0)+t}let{rowDir:g,colDir:p}=this.#oB(n);a=g,h=p;let m=this.#oP(n);0===r.row&&0!==r.col?l.col=m.col:0!==r.row&&0===r.col?l.row=m.row:(l.row=m.row,l.col=m.col)}return this.runLocalHooks("afterTransformEnd",l,a,h),{selectionLayer:this.#oO,visualCoords:l}}calculateOffset(){tf("`calculateOffset` is not implemented")}countRenderableRows(){tf("`countRenderableRows` is not implemented")}countRenderableColumns(){tf("`countRenderableColumns` is not implemented")}shouldSwitchSelectionLayer(){tf("`shouldSwitchSelectionLayer` is not implemented")}#oD(){let e=this.#oO+1;this.setActiveLayerIndex(e>=this.#oN.size()?0:e),this.#ok=this.calculateOffset()}#oF(){let e=this.#oO-1;this.setActiveLayerIndex(e<0?this.#oN.size()-1:e),this.#ok=this.calculateOffset()}#oB(e){let{width:t,height:r}=this.#oH(),i=0,n=0;return(e.row??0)<0?(i=-1,e.row=0):(e.row??0)>0&&(e.row??0)>=r&&(i=1,e.row=r-1),(e.col??0)<0?(n=-1,e.col=0):(e.col??0)>0&&(e.col??0)>=t&&(n=1,e.col=t-1),{rowDir:i,colDir:n}}#oH(){return{width:this.#ok.x+this.countRenderableColumns(),height:this.#ok.y+this.countRenderableRows()}}#oL(e){if(!["forward","backward"].includes(e))return null;let t=this.getCurrentSelection().getTopStartCorner(),r=this.getCurrentSelection().getBottomEndCorner(),[i,n,o,s]="forward"===e?[t.row,r.row,t.col,r.col]:[r.row,t.row,r.col,t.col],l=this.#oV(i??0,n??0),a=this.#oz(o??0,s??0);return null===l||null===a?null:this.tableApi.createCellCoords(l,a)}#oV(e,t){let r=this.tableApi.findFirstNonHiddenRenderableRow(e,t);return null===r?null:this.#ok.y+r}#oz(e,t){let r=this.tableApi.findFirstNonHiddenRenderableColumn(e,t);return null===r?null:this.#ok.x+r}#o_(e){let{row:t,col:r}=this.tableApi.visualToRenderableCoords(e);return(null===t||null===r)&&tf("Renderable coords are not visible."),this.tableApi.createCellCoords(this.#ok.y+t,this.#ok.x+r)}#oP(e){let t=e.clone();return t.col=(e.col??0)-this.#ok.x,t.row=(e.row??0)-this.#ok.y,this.tableApi.renderableToVisualCoords(t)}}tR(gZ,dp);class gJ extends gZ{calculateOffset(){return{x:this.tableApi.navigableHeaders()?this.tableApi.countRowHeaders():0,y:this.tableApi.navigableHeaders()?this.tableApi.countColHeaders():0}}countRenderableRows(){return this.tableApi.countRenderableRows()}countRenderableColumns(){return this.tableApi.countRenderableColumns()}shouldSwitchSelectionLayer(){return!1}}class g0 extends gZ{calculateOffset(){let e=this.getCurrentSelection(),{row:t,col:r}=e.getOuterTopStartCorner(),i=t??0,n=r??0,o=this.tableApi.countRenderableColumnsInRange(0,n-1),s=this.tableApi.countRenderableRowsInRange(0,i-1),l=e.highlight.isHeader(),a=l?Math.abs(n):0,h=l?Math.abs(i):0;return{x:n<0?a:-o,y:i<0?h:-s}}countRenderableRows(){let e=this.getCurrentSelection();return this.tableApi.countRenderableRowsInRange(0,e.getOuterBottomEndCorner().row??0)}countRenderableColumns(){let e=this.getCurrentSelection();return this.tableApi.countRenderableColumnsInRange(0,e.getOuterBottomEndCorner().col??0)}transformEnd(e,t){tf("`transformEnd` is not valid for focus selection use `transformStart` instead")}shouldSwitchSelectionLayer(){return!0}}let g1=[3,2],g2=[["number"],["number","string"],["number","undefined"],["number","string","undefined"]],g3=Symbol("root"),g6=Symbol("child");function g5(e,t=g3){t!==g3&&t!==g6&&tf("The second argument is used internally only and cannot be overwritten.");let r=Array.isArray(e),i=t===g3,n=0;if(r){let t=e[0];0===e.length?n=1:i&&t instanceof l4?n=3:i&&Array.isArray(t)?n=g5(t,g6):e.length>=2&&e.length<=4&&(e.some((e,t)=>!g2[t].includes(typeof e))||(n=2))}return n}function g4(e,{createCellCoords:t,createCellRange:r,keepDirection:i=!1,propToCol:n}={}){return g1.includes(e)||tf("Unsupported selection ranges schema type was provided."),function(o){let s=3===e,l=s?o.from.row:o[0],a=s?o.from.col:o[1],h=s?o.to.row:o[2],d=s?o.to.col:o[3];"function"==typeof n&&("string"==typeof a&&(a=n(a)),"string"==typeof d&&(d=n(d))),eG(h)&&(h=l),eG(d)&&(d=a);let u=a,c=d;if(!i){let e=l,t=h,r=u,i=c;l=Math.min(e??0,t??0),u=Math.min(r??0,i??0),h=Math.max(e??0,t??0),c=Math.max(r??0,i??0)}return r(s?o.highlight.clone():t(l??0,u??0),t(l??0,u??0),t(h??0,c??0))}}function g8(e,t,r){let i=!1,n=!0;for(;n;){n=!1;let o=g9(e);for(let i=0;i<t.length;i+=1)(function(e,t){let r=t.row+t.rowspan-1,i=t.col+t.colspan-1,n=t.row<=e.bottom&&r>=e.top&&t.col<=e.end&&i>=e.start,o=t.row>=e.top&&r<=e.bottom&&t.col>=e.start&&i<=e.end;return n&&!o})(o,t[i])&&e.expandByRange(t[i].getRange(),r)&&(n=!0,o=g9(e));i=i||n}return i}function g9(e){let t=e.getOuterTopStartCorner(),r=e.getOuterBottomEndCorner();return{top:t.row??0,bottom:r.row??0,start:t.col??0,end:r.col??0}}function g7(e,t,r,i,n){let{row:o,col:s}=t.getTopStartCorner(),{row:l,col:a}=t.getBottomEndCorner(),h="row"===r,d=(h?o:s)??0,u=(h?l:a)??0,c=h?(a??0)-(s??0)+1:(l??0)-(o??0)+1,g=e=>1===i?e>=n:e<=n,p=function(e,t,r,i){let{row:n,col:o}=t.getTopStartCorner(),{row:s,col:l}=t.getBottomEndCorner(),a=n??0,h=o??0,d=s??0,u=l??0,c="row"===r,g=c?a:h,p=c?d:u,m=c?h:a,f=c?u:d,w=new Map;for(let t=0;t<e.length;t++){let r=e[t],n=c?r.row:r.col,o=n+(c?r.rowspan:r.colspan)-1,s=c?r.col:r.row,l=s+(c?r.colspan:r.rowspan)-1;if(o<g||n>p||l<m||s>f)continue;let a=1===i?o:n,h=Math.min(l,f)-Math.max(s,m)+1,d=Math.max(n,g),u=Math.min(o,p);for(let e=d;e<=u;e++){let t=w.get(e);t||(t={extents:new Set,coveredCells:0},w.set(e,t)),t.extents.add(a),t.coveredCells+=h}}return w}(e,t,r,i),m=Array.from(p.keys()).sort((e,t)=>(e-t)*i),f=null,w=0;for(let e=0;e<m.length;e++){let t=m[e],{extents:r,coveredCells:i}=p.get(t);if(i<c&&r.add(t),1===r.size){let e=r.values().next().value;if(g(e)){f=t,w=e;break}}}let y=1===i?Math.max(d,n):Math.min(u,n);for(;y>=d&&y<=u&&p.has(y);)y+=i;let b=y>=d&&y<=u;return null===f?b?y:n:!b||(f-y)*i<=0?w:y}class pe{#oU=[];#oW=null;#o$=null;#oG;#oj;#oY;constructor({blockGetter:e,rowIndexMapper:t,columnIndexMapper:r}){this.#oG=e,this.#oj=t,this.#oY=r}getCurrentVerticalNode(){return this.#o$??void 0}getFirstVerticalNode(){return this.#oK("vertical")}getNextVerticalNode(){return this.#oq(this.#o$,"vertical",1)}getPrevVerticalNode(){return this.#oq(this.#o$,"vertical",-1)}getCurrentHorizontalNode(){return this.#oW??void 0}getFirstHorizontalNode(){return this.#oK("horizontal")}getNextHorizontalNode(){return this.#oq(this.#oW,"horizontal",1)}getPrevHorizontalNode(){return this.#oq(this.#oW,"horizontal",-1)}getNodeAnchor(e){return this.#oX(e)}setPrevNodeAsActive(){this.#o$&&(this.#o$=this.#oQ(this.#o$,"vertical",-1)),this.#oW&&(this.#oW=this.#oQ(this.#oW,"horizontal",-1))}setNextNodeAsActive(){this.#o$&&(this.#o$=this.#oQ(this.#o$,"vertical",1)),this.#oW&&(this.#oW=this.#oQ(this.#oW,"horizontal",1))}buildFocusOrder(e){this.#oU=e.map(e=>{let t=e.getTopStartCorner(),r=e.getBottomEndCorner(),i=e.highlight.clone().normalize();return{rowFrom:t.row??0,rowTo:r.row??0,colFrom:t.col??0,colTo:r.col??0,highlightRow:i.row??0,highlightCol:i.col??0}});let t=null;for(let e=0;e<this.#oU.length;e++){let{highlightRow:r,highlightCol:i}=this.#oU[e],n=this.#oZ(e,r,i);n&&(t=n)}this.#oW=t,this.#o$=t}setActiveNode(e,t,r){if(void 0===r)return this;let i=this.#oZ(r,e,t);return i&&(this.#oW=i,this.#o$=i),this}#oZ(e,t,r){let i=this.#oU[e];if(!i)return null;let n=this.#oG(t,r);return n?this.#oJ(e,n):t<i.rowFrom||t>i.rowTo||r<i.colFrom||r>i.colTo||this.#oj.isHidden(t)||this.#oY.isHidden(r)?null:{selectionLayer:e,rowStart:t,rowEnd:t,colStart:r,colEnd:r}}#oJ(e,t){let r=this.#oU[e],i=t.row,n=t.row+t.rowspan-1,o=t.col,s=t.col+t.colspan-1;return i<r.rowFrom||n>r.rowTo||o<r.colFrom||s>r.colTo||null===this.#o0(i,n,o,s)?null:{selectionLayer:e,rowStart:i,rowEnd:n,colStart:o,colEnd:s}}#o0(e,t,r,i){let n=this.#oj.getNearestNotHiddenIndex(e,1),o=this.#oY.getNearestNotHiddenIndex(r,1);return null===n||n>t||null===o||o>i?null:{row:n,column:o}}#oX(e){return this.#o0(e.rowStart,e.rowEnd,e.colStart,e.colEnd)??{row:e.rowStart,column:e.colStart}}#oq(e,t,r){if(e)return this.#oQ(e,t,r)??void 0}#oQ(e,t,r){let i=this.#oU.length;if(0===i)return null;let n=this.#oU[e.selectionLayer]?e.selectionLayer:0,o=this.#o1(n,this.#oX(e),t,r);for(let e=1;null===o&&e<=i;e++){let s=((n+e*r)%i+i)%i;o=this.#o1(s,null,t,r)}return o}#oK(e){for(let t=0;t<this.#oU.length;t++){let r=this.#o1(t,null,e,1);if(r)return r}}#o1(e,t,r,i){let n=this.#oU[e];if(!n)return null;let o=null===t?this.#o2(n,i):this.#o3(n,t,r,i);for(;null!==o;){let t=this.#oG(o.row,o.column);if(!t)return{selectionLayer:e,rowStart:o.row,rowEnd:o.row,colStart:o.column,colEnd:o.column};let s=this.#oJ(e,t);if(s&&this.#o6(s,o,r,i))return s;o=this.#o5(n,o,t,r,i)}return null}#o6(e,t,r,i){let n=this.#o0(e.rowStart,e.rowEnd,e.colStart,e.colEnd);return null!==n&&(1===i?n.row===t.row&&n.column===t.column:"horizontal"===r?n.row===t.row:n.column===t.column)}#o5(e,t,r,i,n){if("horizontal"===i){let o=1===n?Math.min(r.col+r.colspan-1,e.colTo):Math.max(r.col,e.colFrom);return this.#o3(e,{row:t.row,column:o},i,n)}let o=1===n?Math.min(r.row+r.rowspan-1,e.rowTo):Math.max(r.row,e.rowFrom);return this.#o3(e,{row:o,column:t.column},i,n)}#o2(e,t){let r=1===t?this.#oj.getNearestNotHiddenIndex(e.rowFrom,1):this.#oj.getNearestNotHiddenIndex(e.rowTo,-1),i=1===t?this.#oY.getNearestNotHiddenIndex(e.colFrom,1):this.#oY.getNearestNotHiddenIndex(e.colTo,-1);return null===r||r<e.rowFrom||r>e.rowTo||null===i||i<e.colFrom||i>e.colTo?null:{row:r,column:i}}#o3(e,t,r,i){if("horizontal"===r){let r=this.#oY.getNearestNotHiddenIndex(t.column+i,i);if(null!==r&&r>=e.colFrom&&r<=e.colTo)return{row:t.row,column:r};let n=this.#oj.getNearestNotHiddenIndex(t.row+i,i),o=1===i?this.#oY.getNearestNotHiddenIndex(e.colFrom,1):this.#oY.getNearestNotHiddenIndex(e.colTo,-1);return null===n||n<e.rowFrom||n>e.rowTo||null===o||o<e.colFrom||o>e.colTo?null:{row:n,column:o}}let n=this.#oj.getNearestNotHiddenIndex(t.row+i,i);if(null!==n&&n>=e.rowFrom&&n<=e.rowTo)return{row:n,column:t.column};let o=this.#oY.getNearestNotHiddenIndex(t.column+i,i),s=1===i?this.#oj.getNearestNotHiddenIndex(e.rowFrom,1):this.#oj.getNearestNotHiddenIndex(e.rowTo,-1);return null===o||o<e.colFrom||o>e.colTo||null===s||s<e.rowFrom||s>e.rowTo?null:{row:s,column:o}}}function pt(e){return"object"==typeof e&&null!==e&&Number.isInteger(e.row)&&Number.isInteger(e.col)}function pr(e,t,r){if(!r||t<0)return t;let i=e.getNearestNotHiddenIndex(t,1,!0);return null===i?t:i}let pi=new Set;class pn{settings;tableProps;inProgress=!1;selectedRange=new gQ((e,t,r)=>this.tableProps.createCellRange(e,t,r));highlight;#o4;#o8;selectedByRowHeader=new Set;selectedByColumnHeader=new Set;#o9=!1;#o7=!1;#se="unknown";#st=!1;#sr=-1;#si=0;#sn={row:[],column:[]};#so={row:[],column:[]};#ss={row:new Set,column:new Set};#sl=0;#sa=null;#sh=null;#sd=null;#t1=!1;#su=null;#sc=new Set;#sg=new Set;#sp=[];#sm=0;#sf=[];#sw=[];#sy=null;#sb=null;#sC;#sS=null;constructor(e,t){this.settings=e,this.tableProps=t,this.highlight=new gX({headerClassName:e.currentHeaderClassName,activeHeaderClassName:e.activeHeaderClassName,rowClassName:e.currentRowClassName,columnClassName:e.currentColClassName,cellAttributes:[q()],rowIndexMapper:this.tableProps.rowIndexMapper,columnIndexMapper:this.tableProps.columnIndexMapper,disabledCellSelection:(e,t)=>this.tableProps.isDisabledCellSelection(e,t),cellCornerVisible:()=>this.isCellCornerVisible(),areaCornerVisible:e=>this.isAreaCornerVisible(e),adjustHandlesVisible:e=>this.isAdjustHandlesVisibleFor(e),moveEnabled:()=>this.isRangeMovable(),cellMoveEnabled:()=>this.isSingleCellMovable(),visualToRenderableCoords:e=>this.tableProps.visualToRenderableCoords(e),renderableToVisualCoords:e=>this.tableProps.renderableToVisualCoords(e),createCellCoords:(e,t)=>this.tableProps.createCellCoords(e,t),createCellRange:(e,t,r)=>this.tableProps.createCellRange(e,t,r)}),this.#o4=new gJ(this.selectedRange,{...this.tableProps,navigableHeaders:()=>!!e.navigableHeaders,fixedRowsBottom:()=>Number(e.fixedRowsBottom),fixedColumnsEnd:()=>Math.max(Math.floor(Number(e.fixedColumnsEnd))||0,0),minSpareRows:()=>Number(e.minSpareRows),minSpareCols:()=>Number(e.minSpareCols),autoWrapRow:()=>!!e.autoWrapRow,autoWrapCol:()=>!!e.autoWrapCol}),this.#o8=new g0(this.selectedRange,{...this.tableProps,navigableHeaders:()=>!!e.navigableHeaders,fixedRowsBottom:()=>0,fixedColumnsEnd:()=>0,minSpareRows:()=>0,minSpareCols:()=>0,autoWrapRow:()=>!0,autoWrapCol:()=>!0}),this.#o4.addLocalHook("beforeTransformStart",e=>{this.#sv(e),this.runLocalHooks("beforeModifyTransformStart",e)}),this.#o4.addLocalHook("afterTransformStart",(...e)=>this.runLocalHooks("afterModifyTransformStart",...e)),this.#o4.addLocalHook("beforeTransformEnd",e=>{this.#sR(e),this.runLocalHooks("beforeModifyTransformEnd",e)}),this.#o4.addLocalHook("afterTransformEnd",(...e)=>this.runLocalHooks("afterModifyTransformEnd",...e)),this.#o4.addLocalHook("insertRowRequire",(...e)=>this.runLocalHooks("insertRowRequire",...e)),this.#o4.addLocalHook("insertColRequire",(...e)=>this.runLocalHooks("insertColRequire",...e)),this.#o4.addLocalHook("beforeRowWrap",(...e)=>this.runLocalHooks("beforeRowWrap",...e)),this.#o4.addLocalHook("beforeColumnWrap",(...e)=>this.runLocalHooks("beforeColumnWrap",...e)),this.#o8.addLocalHook("beforeTransformStart",e=>{this.runLocalHooks("beforeModifyTransformFocus",e),this.#sS={row:e.row??0,col:e.col??0}}),this.#o8.addLocalHook("afterTransformStart",(...e)=>this.runLocalHooks("afterModifyTransformFocus",...e)),this.#sC=new pe({blockGetter:(e,t)=>this.#sy?.getBlockAt(e,t)??null,rowIndexMapper:this.tableProps.rowIndexMapper,columnIndexMapper:this.tableProps.columnIndexMapper})}updateHighlightClassNames(){this.highlight.updateHighlightClassNames({rowClassName:this.settings.currentRowClassName,columnClassName:this.settings.currentColClassName,headerClassName:this.settings.currentHeaderClassName,activeHeaderClassName:this.settings.activeHeaderClassName})}getSelectedRange(){return this.selectedRange}getActiveSelectedRange(){return this.selectedRange.peekByIndex(this.#si)}getActiveSelectionLayerIndex(){return this.#si}setActiveSelectionLayerIndex(e){this.#si=e}markSource(e){this.#se=e,this.#st=!1}markTabNavigation(){this.#st=!0}isDuringTabNavigation(){return this.#st}markEndSource(){this.#se="unknown",this.#st=!1}getSelectionSource(){return this.#se}setExpectedLayers(e){this.#sr=e}begin(){this.inProgress=!0}destroy(){this.#t1=!0}finish(){this.runLocalHooks("afterSelectionFinished",Array.from(this.selectedRange)),this.inProgress=!1,this.#sr=-1}isInProgress(){return this.inProgress}setRangeStart(e,t,r=!1,i=e){let n="multiple"===this.settings.selectionMode,o=eG(t)?this.tableProps.getShortcutManager().isCtrlPressed():t,s=e.clone();this.#sE(),this.#o7=!1,this.#o9=!1,this.#sb=null,this.runLocalHooks(`beforeSetRangeStart${r?"Only":""}`,s),(!n||n&&!o&&eG(t))&&(this.selectedRange.clear(),this.highlight.getAreas().forEach(e=>e.clear()),this.highlight.getLayeredAreas().forEach(e=>e.clear()),this.highlight.getRowHeaders().forEach(e=>e.clear()),this.highlight.getColumnHeaders().forEach(e=>e.clear()),this.highlight.getActiveRowHeaders().forEach(e=>e.clear()),this.highlight.getActiveColumnHeaders().forEach(e=>e.clear()),this.highlight.getActiveCornerHeaders().forEach(e=>e.clear()),this.highlight.getRowHighlights().forEach(e=>e.clear()),this.highlight.getColumnHighlights().forEach(e=>e.clear())),this.selectedRange.add(s).current()?.setHighlight(i.clone()),0===this.getLayerLevel()&&(this.selectedByRowHeader.clear(),this.selectedByColumnHeader.clear(),this.#sc.clear(),this.#sg.clear()),this.#sT(),r||this.setRangeEnd(e)}setRangeStartOnly(e,t,r=e){this.setRangeStart(e,t,!0,r)}setRangeEnd(e,t=this.getLayerLevel()){if(this.selectedRange.isEmpty())return;this.setActiveSelectionLayerIndex(t);let r=e.clone(),i=this.tableProps.countRows(),n=this.tableProps.countCols(),o=this.getActiveSelectedRange()?.clone().setTo(e).isSingleHeader();if((i>0||n>0)&&(0===i&&(r.col??0)<0&&!o||0===n&&(r.row??0)<0&&!o))return;this.runLocalHooks("beforeSetRangeEnd",r),this.begin();let s=this.getActiveSelectedRange();if(!s)return;if(this.settings.navigableHeaders||s.highlight.normalize(),"single"===this.settings.selectionMode)s.setFrom(s.highlight),s.setTo(s.highlight);else{let e=s.getHorizontalDirection(),t=s.getVerticalDirection(),i=this.isMultiple();s.setTo(r),i&&(e!==s.getHorizontalDirection()||1===s.getWidth()&&!s.includes(s.highlight))&&s.from.assign({col:s.highlight.col??void 0}),i&&(t!==s.getVerticalDirection()||1===s.getHeight()&&!s.includes(s.highlight))&&s.from.assign({row:s.highlight.row??void 0})}i>0&&n>0&&(!this.settings.navigableHeaders||this.settings.navigableHeaders&&!s.isSingleHeader())&&s.to.normalize(),this.#sx(s),this.runLocalHooks("beforeHighlightSet"),this.setRangeFocus(this.getActiveSelectedRange()?.highlight??s.highlight,t),this.applyAndCommit(this.getActiveSelectedRange()??s,t);let l=-1===this.#sr||this.selectedRange.size()===this.#sr;this.runLocalHooks("afterSetRangeEnd",e,l)}applyAndCommit(e=this.getActiveSelectedRange(),t=this.getLayerLevel()){if(!e)return;let r=this.tableProps.countRows(),i=this.tableProps.countCols();this.highlight.useLayerLevel(t);let n=this.highlight.createArea(),o=this.highlight.createLayeredArea(),s=this.highlight.createRowHeader(),l=this.highlight.createColumnHeader(),a=this.highlight.createActiveRowHeader(),h=this.highlight.createActiveColumnHeader(),d=this.highlight.createActiveCornerHeader(),u=this.highlight.createRowHighlight(),c=this.highlight.createColumnHighlight();n?.clear(),o?.clear(),s?.clear(),l?.clear(),a?.clear(),h?.clear(),d?.clear(),u?.clear(),c?.clear();let g=this.highlight.isEnabledFor("focus",e.highlight),p=this.highlight.isEnabledFor("area",e.highlight),m=this.highlight.isEnabledFor("header",e.highlight);if(p&&(this.isMultiple(e)||t>=1)&&(n?.add(e.from).add(e.to).commit(),o?.add(e.from).add(e.to).commit(),1===t)){let e=this.selectedRange.peekByIndex(t-1);e&&(this.highlight.useLayerLevel(t-1),this.highlight.createArea()?.add(e.from).commit().syncWith(e),this.highlight.createLayeredArea()?.add(e.from).commit().syncWith(e),this.highlight.useLayerLevel(t))}(g||p||m)&&this.#sA(e,u,c),m&&this.#sM(e,t,r,i,s,l,a,h,d)}#sA(e,t,r){if(e.isSingleHeader())return;let{rowCoordsFrom:i,rowCoordsTo:n,columnCoordsFrom:o,columnCoordsTo:s}=this.#sI(e,!0);t?.add(i).add(n).commit(),r?.add(o).add(s).commit()}#sI(e,t){let r=t?Math.min(-this.tableProps.countRowHeaders(),-1):-1,i=t?Math.min(-this.tableProps.countColHeaders(),-1):-1;return{rowCoordsFrom:this.tableProps.createCellCoords(Math.max(e.from.row??0,0),r),rowCoordsTo:this.tableProps.createCellCoords(e.to.row??0,-1),columnCoordsFrom:this.tableProps.createCellCoords(i,Math.max(e.from.col??0,0)),columnCoordsTo:this.tableProps.createCellCoords(-1,e.to.col??0)}}#sM(e,t,r,i,n,o,s,l,a){if(!e.isSingleHeader()){let{rowCoordsFrom:t,rowCoordsTo:r,columnCoordsFrom:i,columnCoordsTo:s}=this.#sI(e,!1);"single"===this.settings.selectionMode?(n?.add(t).commit(),o?.add(i).commit()):(n?.add(t).add(r).commit(),o?.add(i).add(s).commit())}let h=!this.#o7&&this.isEntireRowSelected(t)&&(i>0&&i===e.getWidth()||0===i&&this.isSelectedByRowHeader(t)),d=!this.#o7&&this.isEntireColumnSelected(t)&&(r>0&&r===e.getHeight()||0===r&&this.isSelectedByColumnHeader(t));h&&s?.add(this.tableProps.createCellCoords(Math.max(e.from.row??0,0),Math.min(-this.tableProps.countRowHeaders(),-1))).add(this.tableProps.createCellCoords(Math.max(e.to.row??0,0),-1)).commit(),d&&l?.add(this.tableProps.createCellCoords(Math.min(-this.tableProps.countColHeaders(),-1),Math.max(e.from.col??0,0))).add(this.tableProps.createCellCoords(-1,Math.max(e.to.col??0,0))).commit(),h&&d&&a?.add(this.tableProps.createCellCoords(-this.tableProps.countColHeaders(),-this.tableProps.countRowHeaders())).add(this.tableProps.createCellCoords(-1,-1)).commit()}setRangeFocus(e,t=this.getLayerLevel()){this.#sN(e,t,null)}#sN(e,t,r){if(this.selectedRange.isEmpty())return;this.setActiveSelectionLayerIndex(t),this.#o4.setActiveLayerIndex(t),this.#o8.setActiveLayerIndex(t);let i=this.getActiveSelectedRange();if(this.inProgress||this.runLocalHooks("beforeSetFocus",e),!i)return;let n=this.highlight.getFocus();n.clear(),i.setHighlight(e),this.inProgress||(this.#sx(i,r),this.runLocalHooks("beforeHighlightSet")),this.highlight.isEnabledFor("focus",i.highlight)&&n.add(i.highlight).commit().syncWith(i),this.inProgress||(this.#o9=!0,this.runLocalHooks("afterSetFocus",i.highlight)),this.#sT()}transformStart(e,t,r=!1){if(!this.isSelected())return;let{visualCoords:i}=this.#o4.transformStart(e,t,r);this.setRangeStart(i,void 0,!1,i)}transformEnd(e,t){if(!this.isSelected())return;let{visualCoords:r,selectionLayer:i}=this.#o4.transformEnd(e,t);this.setRangeEnd(r,i)}transformFocus(e,t){if(!this.isSelected())return;this.#sS=null;let{selectionLayer:r,visualCoords:i}=this.#o8.transformStart(e,t),n=this.#sO(i,r);n?this.#sN(n.coords,n.layerIndex,n.entry):this.setRangeFocus(i.normalize(),r)}suspendShifts(e=!0){this.#sp.push({sequence:null,ownsIndexChange:e})}resumeShifts(e=!0){if(this.#sp.pop(),!(this.#sp.length>0))if(e){try{this.#sk()}catch(e){throw this.#sH(),e}this.#s_()}else this.#sE(),this.#sH()}flushHeldShifts(){this.#sP()||this.#sk()}#sE(){this.#sf.length=0,this.#sw.length=0}#sk(){if(0===this.#sf.length&&0===this.#sw.length)return;let e=this.#sD(this.#sf),t=this.#sD(this.#sw);this.#sf=[],this.#sw=[],this.#sL(e),this.#sF(t)}markStructuralIndexChange(){let e=this.#sp[this.#sp.length-1];e&&e.ownsIndexChange&&(this.#sm+=1,e.sequence=this.#sm)}#sB(){let e=this.#sp[this.#sp.length-1];return e?(null===e.sequence&&(this.#sm+=1,e.sequence=this.#sm),e.sequence):0}#sP(){for(let e=0;e<this.#sp.length-1;e++)if(null!==this.#sp[e].sequence)return!0;return!1}#sD(e){return e.slice().sort((e,t)=>e.sequence-t.sequence).map(({index:e,amount:t})=>[e,t])}shiftRows(e,t){!this.isSelected()||(this.#sf.push({sequence:this.#sB(),index:e,amount:t}),this.#sP()||this.#sk())}#sL(e){if(0===e.length||!this.isSelected())return;let t=this.getActiveSelectedRange();if(this.isSelectedByCorner())return void this.selectAll(!0,!0,{disableHeadersHighlight:!0});if(!t)return;let{from:r,to:i,highlight:n}=t,o=this.isSelectedByRowHeader(),s=this.isSelectedByColumnHeader(),l=r.row??0,a=i.row??0,h=n.row??0,d=t.getOuterTopStartCorner().row??0,u=!1,c=!1;if(e.forEach(([e,t])=>{if(!s&&d<e)return;let r=s?0:t;u=!0,l+=r,d+=r,a+=t,h>=e&&(c=!0,h+=t)}),!u)return;let g=this.tableProps.countRows(),p=s?-1:0,m=r.row===i.row,f=e=>pr(this.tableProps.rowIndexMapper,e,m),w=new Set(this.#sc),y=new Set(this.#sg);this.getSelectedRange().pop();let b=this.tableProps.createCellCoords(f(oB(l,p,g-1)),r.col??0),C=this.tableProps.createCellCoords(f(oB(a,p,g-1)),i.col??0);this.markSource("shift"),c?this.setRangeStartOnly(b,!0,this.tableProps.createCellCoords(f(oB(h,0,g-1)),n.col??0)):this.setRangeStartOnly(b,!0),o&&this.selectedByRowHeader.add(this.getLayerLevel()),s&&this.selectedByColumnHeader.add(this.getLayerLevel()),this.#sc=w,this.#sg=y,this.setRangeEnd(C),this.markEndSource()}shiftColumns(e,t){!this.isSelected()||(this.#sw.push({sequence:this.#sB(),index:e,amount:t}),this.#sP()||this.#sk())}#sF(e){if(0===e.length||!this.isSelected())return;let t=this.getActiveSelectedRange();if(this.isSelectedByCorner())return void this.selectAll(!0,!0,{disableHeadersHighlight:!0});if(!t)return;let{from:r,to:i,highlight:n}=t,o=this.isSelectedByRowHeader(),s=this.isSelectedByColumnHeader(),l=r.col??0,a=i.col??0,h=n.col??0,d=t.getOuterTopStartCorner().col??0,u=!1,c=!1;if(e.forEach(([e,t])=>{if(!o&&d<e)return;let r=o?0:t;u=!0,l+=r,d+=r,a+=t,h>=e&&(c=!0,h+=t)}),!u)return;let g=this.tableProps.countCols(),p=o?-1:0,m=r.col===i.col,f=e=>pr(this.tableProps.columnIndexMapper,e,m),w=new Set(this.#sc),y=new Set(this.#sg);this.getSelectedRange().pop();let b=this.tableProps.createCellCoords(r.row??0,f(oB(l,p,g-1))),C=this.tableProps.createCellCoords(i.row??0,f(oB(a,p,g-1)));this.markSource("shift"),c?this.setRangeStartOnly(b,!0,this.tableProps.createCellCoords(n.row??0,f(oB(h,0,g-1)))):this.setRangeStartOnly(b,!0),o&&this.selectedByRowHeader.add(this.getLayerLevel()),s&&this.selectedByColumnHeader.add(this.getLayerLevel()),this.#sc=w,this.#sg=y,this.setRangeEnd(C),this.markEndSource()}getLayerLevel(){return this.selectedRange.size()-1}isSelected(){return!this.selectedRange.isEmpty()}isMultiple(e=this.getActiveSelectedRange()){if(!this.isSelected()||!e)return!1;let t=t_(!e.isSingle()&&!this.#sV(e));return this.runLocalHooks("afterIsMultipleSelection",t),t.value}setCellBlockProvider(e){this.#sy=e}#sV(e){if(null===this.#sy)return!1;let{row:t,col:r}=e.getTopStartCorner(),i=null===t||null===r?null:this.#sy.getBlockAt(t,r);return null!==i&&function(e,t){let r=e.getTopStartCorner(),i=e.getBottomEndCorner();for(let e=0;e<t.length;e+=1){let{row:n,col:o,rowspan:s,colspan:l}=t[e];if(r.row===n&&r.col===o&&i.row===n+s-1&&i.col===o+l-1)return!0}return!1}(e,[i])}#sx(e,t=null){if(null===this.#sy)return;let{highlight:r}=e;if(this.#sz()){this.#sb=t??r.clone();return}if(g8(e,this.#sy.getBlocks(),!1),null===r.row||null===r.col)return;let i=this.#sy.getBlockAt(r.row,r.col);this.#sb=t??r.clone(),null!==i&&null===t&&r.assign({row:i.row,col:i.col})}#sz(){let e=this.getActiveSelectionLayerIndex();return this.isSelectedByColumnHeader(e)||this.isSelectedByRowHeader(e)}#sv(e){let t=this.#sy,r=this.getActiveSelectedRange();if(null===t||!r)return;let{highlight:i}=r;if(this.#sU(i),null===i.row||null===i.col)return;let n=t.getBlockAt(i.row,i.col);if(null===n)return;let o=this.#sW("col",e,i,n);if(0===e.row&&o&&!this.isDuringTabNavigation()){let e=this.tableProps.rowIndexMapper.getNearestNotHiddenIndex(n.row,1);null!==e&&e<=n.row+n.rowspan-1&&(i.row=e)}this.#sW("row",e,i,n)}#sR(e){let t=this.#sy,r=this.getActiveSelectedRange();if(null===t||!r||this.#sz())return;let i=t.getBlocks(),n=r.clone();this.#s$("col",e,r,n,i),this.#s$("row",e,r,n,i)}#s$(e,t,r,i,n){let o=t[e]??0;if(0===o)return;let s=o<0?-1:1,l=r.to[e]??0,a=g7(n,r,e,s,l)+o,h=this.tableProps.createCellCoords(r.to.row??0,r.to.col??0);h[e]=a,i.expand(h),g8(i,n,!0);let[d,u]="row"===e?["S-N","N-S"]:["E-W","W-E"],c=this.#sG(r,e),g=this.#sG(i,e);s<0&&c===d&&g===d?a=i.getTopStartCorner()[e]??a:s>0&&c===u&&g===u&&(a=i.getBottomEndCorner()[e]??a);let p=this.#sj(e).getNearestNotHiddenIndex(a,s<0?1:-1);null!==p&&(t[e]=s<0?-Math.max(this.#sY(e,p,l)-1,1):Math.max(this.#sY(e,l,p)-1,1))}#sj(e){return"row"===e?this.tableProps.rowIndexMapper:this.tableProps.columnIndexMapper}#sY(e,t,r){return"row"===e?this.tableProps.countRenderableRowsInRange(t,r):this.tableProps.countRenderableColumnsInRange(t,r)}#sG(e,t){return"row"===t?e.getVerticalDirection():e.getHorizontalDirection()}#sO(e,t){let r=this.#sS,i=this.getActiveSelectedRange();if(this.#sS=null,null===this.#sy||null===r||!i||0===r.row&&0===r.col)return null;let n=this.#sK(i,r);if(!n)return null;let{selectionLayer:o,rowStart:s,rowEnd:l,colStart:a,colEnd:h}=n,{row:d,column:u}=this.#sC.getNodeAnchor(n),c=this.tableProps.createCellCoords(d,u);return{coords:c,entry:o===t&&null!==e.row&&null!==e.col&&e.row>=s&&e.row<=l&&e.col>=a&&e.col<=h?e.clone():c.clone(),layerIndex:o}}#sK(e,t){let r=this.#sC,i=e.highlight.clone().normalize();return(r.buildFocusOrder(Array.from(this.selectedRange)),null!==i.row&&null!==i.col&&r.setActiveNode(i.row,i.col,this.getActiveSelectionLayerIndex()),!e.highlight.isCell()&&(t.row>0||t.col>0?r.setPrevNodeAsActive():("E-W"===e.getHorizontalDirection()&&t.col<0||"S-N"===e.getVerticalDirection()&&t.row<0)&&r.setNextNodeAsActive()),0!==t.col)?t.col<0?r.getPrevHorizontalNode():r.getNextHorizontalNode():t.row<0?r.getPrevVerticalNode():r.getNextVerticalNode()}#sU(e){let t=this.#sb;if(null===t)return;let{rowIndexMapper:r,columnIndexMapper:i}=this.tableProps;null!==t.row&&null!==r.getRenderableFromVisualIndex(t.row)&&(e.row=t.row),null!==t.col&&null!==i.getRenderableFromVisualIndex(t.col)&&(e.col=t.col),this.#sb=null}#sW(e,t,r,i){let n=t[e]??0,o=r[e]??0;if(0===n)return!1;let s="row"===e,l=this.#sj(e),a=s?i.row:i.col,h=a+(s?i.rowspan:i.colspan)-1,d=o>=a&&o<=h;if(n<0){let r=l.getNearestNotHiddenIndex(d?a-1:h,-1);return t[e]=null===r?-this.#sY(e,0,o):-Math.max(this.#sY(e,r,o)-1,1),null!==r}let u=l.getNearestNotHiddenIndex(d?h+1:a,1),c=s?this.tableProps.countRows():this.tableProps.countCols();return t[e]=null===u?this.#sY(e,o,c):Math.max(this.#sY(e,o,u)-1,1),null!==u}#sT(){let e=this.getActiveSelectedRange()?.highlight;if(!e){this.#sd=null,this.#su=null;return}let{row:t,col:r}=e;this.#sd=null===t||t<0?null:this.tableProps.rowIndexMapper.getPhysicalFromVisualIndex(t),this.#su=null===r||r<0?null:this.tableProps.columnIndexMapper.getPhysicalFromVisualIndex(r)}#sq(e,t){return null!==e&&!(e<0)&&0!==t&&e>t-1}#sX(e,t,r,i){return null!==e&&!(e<0)&&0!==i&&null!==t&&null===r.getVisualFromPhysicalIndex(t)}#sQ(){return!(!0!==this.settings.moveCells||this.settings.disableVisualSelection||this.tableProps.isEditorOpened())&&!!this.tableProps.isPluginEnabled("moveCells")&&function({rangeCount:e,isEntireRow:t,isEntireColumn:r,isHeader:i}){return 1===e&&!t&&!r&&!i}({rangeCount:this.getSelectedRange().size(),isEntireRow:this.isEntireRowSelected(),isEntireColumn:this.isEntireColumnSelected(),isHeader:this.isSelectedByRowHeader()||this.isSelectedByColumnHeader()})}isRangeMovable(){let e=this.getActiveSelectedRange();return this.#sQ()&&!!e&&!e.isSingle()}isSingleCellMovable(){let e=this.getActiveSelectedRange();return this.#sQ()&&!!e&&e.isSingle()}isFocusSelectionChanged(){return this.isSelected()&&this.#o9}isSelectedByRowHeader(e=this.getLayerLevel()){return!this.isSelectedByCorner()&&(-1===e?this.selectedByRowHeader.size>0:this.selectedByRowHeader.has(e))}isEntireRowSelected(e=this.getLayerLevel()){let t=e=>{let{col:t}=e.getOuterTopStartCorner(),r=this.tableProps.countRowHeaders(),i=this.tableProps.countCols();return(r>0&&(t??0)<0||0===r)&&e.getWidth()===i};if(-1===e)return Array.from(this.selectedRange).some(e=>t(e));let r=this.selectedRange.peekByIndex(e);return!!r&&t(r)}isSelectedByColumnHeader(e=this.getLayerLevel()){return!this.isSelectedByCorner()&&(-1===e?this.selectedByColumnHeader.size>0:this.selectedByColumnHeader.has(e))}isEntireColumnSelected(e=this.getLayerLevel()){let t=e=>{let{row:t}=e.getOuterTopStartCorner(),r=this.tableProps.countColHeaders(),i=this.tableProps.countRows();return(r>0&&(t??0)<0||0===r)&&e.getHeight()===i};if(-1===e)return Array.from(this.selectedRange).some(e=>t(e));let r=this.selectedRange.peekByIndex(e);return!!r&&t(r)}isSelectedByAnyHeader(){return this.isSelectedByRowHeader(-1)||this.isSelectedByColumnHeader(-1)||this.isSelectedByCorner()}isSelectedByCorner(){return this.selectedByColumnHeader.has(this.getLayerLevel())&&this.selectedByRowHeader.has(this.getLayerLevel())}inInSelection(e){return this.selectedRange.includes(e)}getLayerContaining(e){if(this.selectedRange.isEmpty())return null;for(let t=this.selectedRange.size()-1;t>=0;t--)if(this.selectedRange.peekByIndex(t)?.includes(e))return t;return null}isCellCornerVisible(){return this.#sZ()&&!this.isMultiple()}isCellVisible(e){let t=this.tableProps.visualToRenderableCoords(e);return null!==t.row&&null!==t.col}isAreaCornerVisible(e){return(!Number.isInteger(e)||e===this.getLayerLevel())&&this.#sZ()&&this.isMultiple()}#sZ(){return!(!this.settings.fillHandle||this.tableProps.isEditorOpened()||this.#sJ())&&(!this.tableProps.isPluginRegistered("autofill")||this.tableProps.isPluginEnabled("autofill"))}#sJ(){return this.selectedRange.size()>1}isAdjustHandlesVisibleFor(e){return!(!0!==this.settings.selectionHandles||this.tableProps.isEditorOpened()||!this.tableProps.isPluginEnabled("selectionHandles")||"single"===this.settings.selectionMode||this.#sh!==e||this.isEntireRowSelected(e)||this.isEntireColumnSelected(e))}getHandlesHoveredLayer(){return this.#sh}setHandlesHoveredLayer(e){this.#sh!==e&&(this.#sh=e,this.runLocalHooks("afterSetHandlesHoveredLayer",e))}clear(){this.selectedRange.clear(),this.highlight.clear(),this.#sd=null,this.#su=null,this.#sc.clear(),this.#sg.clear()}recaptureHighlightRecord(){this.#sT()}deselectIfHighlightStranded({unresolvableOnly:e=!1}={}){if(!this.isSelected())return!1;let t=this.getActiveSelectedRange();if(!t)return!1;let{highlight:r,from:i,to:n}=t,{row:o,col:s}=r,l=this.tableProps.rowIndexMapper.getNotTrimmedIndexesLength()-1,a=this.tableProps.columnIndexMapper.getNotTrimmedIndexesLength()-1,h=this.#sq(o,l+1)||this.#sq(i.row,l+1)||this.#sq(n.row,l+1),d=this.#sq(s,a+1)||this.#sq(i.col,a+1)||this.#sq(n.col,a+1);if(h||d){let e=this.getActiveSelectionLayerIndex(),t=this.#sc.has(e),r=this.#sg.has(e);return h&&!t||d&&!r?(this.deselect(),!0):(this.#s0(),!1)}return!e&&!!(this.#sX(o,this.#sd,this.tableProps.rowIndexMapper,l+1)||this.#sX(s,this.#su,this.tableProps.columnIndexMapper,a+1))&&(this.deselect(),!0)}deselect(){this.isSelected()&&(this.inProgress=!1,this.#sH(),this.clear(),this.runLocalHooks("afterDeselect"))}selectAll(e=!1,t=!1,r={focusPosition:!1,disableHeadersHighlight:!1}){let i=this.tableProps.countRows(),n=this.tableProps.countCols(),o=this.tableProps.countRowHeaders(),s=this.tableProps.countColHeaders(),l=t?-s:0,a=e?-o:0;if(0===l&&0===a&&(0===i||0===n))return;let h=this.getActiveSelectedRange()?.highlight,{focusPosition:d,disableHeadersHighlight:u}=r;pt(d)&&(h=this.tableProps.createCellCoords(oB(d.row,l,i-1),oB(d.col,a,n-1)));let c=this.tableProps.createCellCoords(l,a),g=this.tableProps.createCellCoords(i-1,n-1);this.clear(),this.runLocalHooks("beforeSelectAll",c,g,h),this.setRangeStartOnly(c,void 0,h),this.#o7=u??!1,this.#sc.add(this.getLayerLevel()),this.#sg.add(this.getLayerLevel()),a<0&&this.selectedByRowHeader.add(this.getLayerLevel()),l<0&&this.selectedByColumnHeader.add(this.getLayerLevel()),this.setRangeEnd(g),this.#t1||(this.runLocalHooks("afterSelectAll",c,g,h),this.finish())}selectCells(e){let t=g5(e);if(1===t)return!1;0===t&&tf(ey`Unsupported format of the selection ranges was passed. To select cells pass\x20
|
|
66
66
|
the coordinates as an array of arrays ([[rowStart, columnStart/columnPropStart, rowEnd,\x20
|
|
67
|
-
columnEnd/columnPropEnd]]) or as an array of CellRange objects.`);let r=g4(t,{createCellCoords:(...e)=>this.tableProps.createCellCoords(...e),createCellRange:(...e)=>this.tableProps.createCellRange(...e),propToCol:e=>this.tableProps.propToCol(e),keepDirection:!0}),i=this.settings.navigableHeaders,n={countRows:this.tableProps.countRows(),countCols:this.tableProps.countCols(),countRowHeaders:i?this.tableProps.countRowHeaders():0,countColHeaders:i?this.tableProps.countColHeaders():0},o=!e.some(e=>{let t=r(e),i=t.isValid(n);return!(i&&!t.containsHeaders()||i&&t.containsHeaders()&&t.isSingleHeader())});if(o){this.clear(),this.setExpectedLayers(e.length);for(let t=0;t<e.length;t++){let{from:i,to:n}=r(e[t]);if(this.setRangeStartOnly(i.clone(),!1),this.setRangeEnd(n.clone()),this.#t1)return o}this.finish()}return o}selectColumns(e,t=e,r=0){let i="string"==typeof e?this.tableProps.propToCol(e):e,n="string"==typeof t?this.tableProps.propToCol(t):t,o=this.tableProps.countRows(),s=this.tableProps.countCols(),l=this.tableProps.countColHeaders(),a=0===l?0:-l,h=this.tableProps.createCellCoords(a,i),d=this.tableProps.createCellCoords(o-1,n),u=this.tableProps.createCellRange(h,h,d).isValid({countRows:o,countCols:s,countRowHeaders:0,countColHeaders:l});if(u){let e=0,t=0;pt(r)?(e=oB(r.row??0,a,o-1),t=oB(r.col??0,Math.min(i,n),Math.max(i,n))):(e=oB("number"==typeof r?r:0,a,o-1),t=i);let s=this.tableProps.createCellCoords(e,t),h=0===l?0:oB(s.row??0,a,-1),d=this.tableProps.createCellCoords(h,i),c=this.tableProps.createCellCoords(o-1,n);if(this.runLocalHooks("beforeSelectColumns",d,c,s),this.setRangeStartOnly(d,void 0,s),this.selectedByColumnHeader.add(this.getLayerLevel()),this.#sc.add(this.getLayerLevel()),this.setRangeEnd(c),this.#t1)return u;this.runLocalHooks("afterSelectColumns",d,c,s),"mouse"!==this.getSelectionSource()&&this.finish()}return u}selectRows(e,t=e,r=0){let i=this.tableProps.countRows(),n=this.tableProps.countCols(),o=this.tableProps.countRowHeaders(),s=0===o?0:-o,l=this.tableProps.createCellCoords(e,s),a=this.tableProps.createCellCoords(t,n-1),h=this.tableProps.createCellRange(l,l,a).isValid({countRows:i,countCols:n,countRowHeaders:o,countColHeaders:0});if(h){let i=0,l=0;pt(r)?(i=oB(r.row??0,Math.min(e,t),Math.max(e,t)),l=oB(r.col??0,s,n-1)):(i=e,l=oB("number"==typeof r?r:0,s,n-1));let a=this.tableProps.createCellCoords(i,l),d=0===o?0:oB(a.col??0,s,-1),u=this.tableProps.createCellCoords(e,d),c=this.tableProps.createCellCoords(t,n-1);if(this.runLocalHooks("beforeSelectRows",u,c,a),this.setRangeStartOnly(u,void 0,a),this.selectedByRowHeader.add(this.getLayerLevel()),this.#sg.add(this.getLayerLevel()),this.setRangeEnd(c),this.#t1)return h;this.runLocalHooks("afterSelectRows",u,c,a),"mouse"!==this.getSelectionSource()&&this.finish()}return h}importSelection({ranges:e,activeRange:t,activeSelectionLayer:r,selectedByRowHeader:i,selectedByColumnHeader:n,disableHeadersHighlight:o,rowExtentSpansGrid:s=[],columnExtentSpansGrid:l=[]}){0!==e.length&&(this.selectedRange.clear(),this.highlight.clear(),this.inProgress=!1,this.#o7=o,this.selectedByRowHeader=new Set(i),this.selectedByColumnHeader=new Set(n),this.#sc=new Set(s),this.#sg=new Set(l),this.setActiveSelectionLayerIndex(0),e.forEach((e,t)=>{this.selectedRange.push(e),this.applyAndCommit(e,t)}),this.setRangeFocus(t.highlight,r),this.#o7=!1,this.inProgress=!1)}exportSelection(){return{ranges:Array.from(this.selectedRange).map(e=>e.clone()),activeRange:this.getActiveSelectedRange(),activeSelectionLayer:this.getActiveSelectionLayerIndex(),selectedByRowHeader:Array.from(this.selectedByRowHeader),selectedByColumnHeader:Array.from(this.selectedByColumnHeader),disableHeadersHighlight:this.#o7,rowExtentSpansGrid:Array.from(this.#sc),columnExtentSpansGrid:Array.from(this.#sg)}}capturePhysicalSelection(e,t=!0,r=!0){let i=this.getActiveSelectedRange();if(this.#so[e].push(r&&i?this.#s1(e):pi),!t||!this.tableProps.isEditorOpened()||!i)return void this.#sn[e].push(null);let n="row"===e?this.tableProps.rowIndexMapper:this.tableProps.columnIndexMapper,o=this.#so[e],s=o[o.length-1],l="row"===e?"row":"col",a=[];(this.selectedRange.ranges.forEach((t,r)=>{let i=this.#s2(t,e=>{let t=e.clone();return t[l]=this.#s3(e[l],n),t});if(this.#s6(i,e)){let o=s.has(r);a.push({physical:i,visual:t.clone(),physicalSpan:this.#s5(t,e,n,o),spansAxis:o,originalLayerIndex:r})}}),a.some(({originalLayerIndex:e})=>e===this.#si))?this.#sn[e].push({ranges:a,activeSelectionLayer:this.#si,selectedByRowHeader:new Set(this.selectedByRowHeader),selectedByColumnHeader:new Set(this.selectedByColumnHeader),rowExtentSpansGrid:new Set(this.#sc),columnExtentSpansGrid:new Set(this.#sg),disableHeadersHighlight:this.#o7,selectionSource:this.#se}):this.#sn[e].push(null)}restorePhysicalSelection(e){let t=this.#sn[e],r=t.length>0?t[t.length-1]:null;if(t.length>0&&(t[t.length-1]=null),!r)return;let i=this.tableProps.rowIndexMapper.getNotTrimmedIndexesLength(),n=this.tableProps.columnIndexMapper.getNotTrimmedIndexesLength();if(0===i||0===n)return void this.#s4(e);let o=[];r.ranges.forEach(({physical:t,visual:i,physicalSpan:n,spansAxis:s,originalLayerIndex:l})=>{let a=this.#s8(t,i,n,s,l,e,r);a&&o.push({range:a,originalLayerIndex:l})});let s=o.findIndex(({originalLayerIndex:e})=>e===r.activeSelectionLayer);0===o.length||-1===s?this.#s4(e):(this.selectedRange.ranges=o.map(({range:e})=>e),this.#si=s,this.selectedByRowHeader=this.#s9(r.selectedByRowHeader,o),this.selectedByColumnHeader=this.#s9(r.selectedByColumnHeader,o),this.#sc=this.#s9(r.rowExtentSpansGrid,o),this.#sg=this.#s9(r.columnExtentSpansGrid,o),this.#s7(e,o),this.#o7=r.disableHeadersHighlight,this.#se=r.selectionSource,this.#o4.setActiveLayerIndex(this.#si),this.#o8.setActiveLayerIndex(this.#si),this.commitHighlightsDirectly())}#s7(e,t){let r=this.#so[e];r.length>0&&(r[r.length-1]=this.#s9(r[r.length-1],t))}commitHighlightsDirectly(){this.highlight.clear(),this.selectedRange.ranges.forEach((e,t)=>this.applyAndCommit(e,t));let e=this.getActiveSelectedRange();this.highlight.useLayerLevel(this.#si),this.highlight.getFocus().clear(),e&&this.highlight.isEnabledFor("focus",e.highlight)&&this.highlight.getFocus().add(e.highlight).commit().syncWith(e)}#s4(e){this.clear(),this.selectedByRowHeader.clear(),this.selectedByColumnHeader.clear(),this.inProgress=!1,this.#sa=e}notifyDeferredDeselect(e){this.#sa===e&&(this.#sa=null,this.isSelected()||this.runLocalHooks("afterDeselect"))}discardPhysicalSelectionSnapshot(e){this.#sn[e].pop(),this.#so[e].pop()}fitGridTrackingExtents(e){let t=this.#so[e],r=t.length>0?t[t.length-1]:null;if(r&&0!==r.size&&this.isSelected()){if(this.#le())return void r.forEach(t=>this.#ss[e].add(t));this.#lt(e,r)&&this.#lr()}}suspendGridTrackingFits(){this.#sl+=1}resumeGridTrackingFits(e=!0){(this.#sl=Math.max(0,this.#sl-1),e)?this.#s_():this.#sH()}#le(){return this.#sp.length>0||this.#sl>0}#s_(){if(this.#le())return;let{row:e,column:t}=this.#ss;if(0===e.size&&0===t.size)return;let r=new Set(e),i=new Set(t);if(this.#sH(),!this.isSelected())return;let n=this.#lt("row",r),o=this.#lt("column",i);(n||o)&&this.#lr()}#sH(){this.#ss.row.clear(),this.#ss.column.clear()}#lt(e,t){if(0===t.size)return!1;let r="row"===e?this.tableProps.rowIndexMapper:this.tableProps.columnIndexMapper,i="row"===e?this.#sc:this.#sg,n="row"===e?"row":"col",o="row"===e?this.settings.maxRows:this.settings.maxCols,s=Math.min(r.getNotTrimmedIndexesLength(),o??1/0)-1,l=!1;return!(s<0)&&(this.selectedRange.ranges.forEach((e,r)=>{t.has(r)&&i.has(r)&&e.to[n]!==s&&(e.to[n]=s,l=!0)}),l)}#lr(){this.tableProps.isEditorOpened()?this.commitHighlightsDirectly():this.#s0()}#s0(){let e="unknown"===this.getSelectionSource();e&&this.markSource("shift");try{this.refresh()}finally{e&&this.markEndSource()}}refresh(){if(!this.isSelected())return;let e=this.tableProps.countRows(),t=this.tableProps.countCols();if(0===e||0===t)return void this.deselect();let r=this.selectedRange.ranges.map(e=>e.clone());"unknown"===this.getSelectionSource()&&this.markSource("refresh");let i=new Set(this.selectedByRowHeader),n=new Set(this.selectedByColumnHeader),o=new Set(this.#sc),s=new Set(this.#sg);this.clear(),this.setExpectedLayers(r.length),r.forEach(r=>{let{from:i,to:n,highlight:o}=r,s=e-1,l=t-1;o.assign({row:oB(o.row??0,this.settings.navigableHeaders?-1/0:0,s),col:oB(o.col??0,this.settings.navigableHeaders?-1/0:0,l)}),i.assign({row:oB(i.row??0,-1/0,s),col:oB(i.col??0,-1/0,l)}),n.assign({row:oB(n.row??0,-1/0,s),col:oB(n.col??0,-1/0,l)}),this.setRangeStartOnly(i,!0,o),this.setRangeEnd(n)}),this.selectedByRowHeader=i,this.selectedByColumnHeader=n,this.#sc=o,this.#sg=s,this.finish(),this.markEndSource()}#s2(e,t){return this.tableProps.createCellRange(t(e.highlight),t(e.from),t(e.to))}#s3(e,t){return null===e||e<0?e:t.getPhysicalFromVisualIndex(e)}#s1(e){let t=("row"===e?this.tableProps.rowIndexMapper:this.tableProps.columnIndexMapper).getNotTrimmedIndexesLength(),r=new Set;return this.selectedRange.ranges.forEach((i,n)=>{this.#li(i,n,e,t)&&r.add(n)}),r}#li(e,t,r,i){let n="row"===r?this.#sc:this.#sg,o="row"===r?"row":"col",s=e.from[o],l=e.to[o];return n.has(t)&&(s??0)<=0&&(l??-1)>=i-1}#s6(e,t){let r="row"===t?"row":"col";return[e.highlight,e.from,e.to].every(e=>null!==e[r])}#s5(e,t,r,i){let n="row"===t?"row":"col",o=e.from[n],s=e.to[n];if(i||null===o||null===s)return[];let l=s>=o?1:-1,a=[];for(let e=o;l>0?e<=s:e>=s;e+=l){let t=this.#s3(e,r);null!==t&&t>=0&&a.push(t)}return a}#ln(e,t,r){let i="row"===t?this.tableProps.rowIndexMapper:this.tableProps.columnIndexMapper;for(let t=0;t<e.length;t++){let n=e[r?t:e.length-1-t],o=i.getVisualFromPhysicalIndex(n);if(null!==o)return o}return null}#lo(e,t){return null!==e&&e<0?e:null===e?null:t.getVisualFromPhysicalIndex(e)}#ls(e,t,r,i,n=null){let o="row"===r?this.tableProps.rowIndexMapper:this.tableProps.columnIndexMapper,s="row"===r?"row":"col",l=i??this.#lo(e[s],o)??n;if(null===l)return null;let a=t.clone();return a[s]=l,a}#s8(e,t,r,i,n,o,s){let l,a,h="row"===o?"row":"col",d=n===s.activeSelectionLayer,u=("row"===o?this.tableProps.rowIndexMapper:this.tableProps.columnIndexMapper).getNotTrimmedIndexesLength();if(i){let e=t.from[h];l=null!==e&&e<0?e:0,a=u-1}let c=this.#ln(r,o,!0),g=this.#ln(r,o,!1),p=t.highlight[h],m=null!==p&&p>=0&&p<u,f=null;null===c&&(i?f=oB(p??0,0,u-1):d&&m&&(f=p));let w=this.#ls(e.highlight,t.highlight,o,void 0,d||i?c??f:null),y=this.#ls(e.from,t.from,o,l,c??f),b=this.#ls(e.to,t.to,o,a,g??f);if(!w||!y||!b)return null;if(this.#ll(y,b,r,i,o)){if(!d)return null;let r=this.#ls(e.highlight,t.highlight,o,void 0,c??f);return r?this.tableProps.createCellRange(r,r.clone(),r.clone()):null}return this.tableProps.createCellRange(w,y,b)}#ll(e,t,r,i,n){if(i||0===r.length)return!1;let o="row"===n?"row":"col",s=e[o],l=t[o];if(null===s||null===l)return!1;let a="row"===n?this.tableProps.rowIndexMapper:this.tableProps.columnIndexMapper,h=new Set(r),d=Math.min(s,l),u=Math.max(s,l);for(let e=Math.max(d,0);e<=u;e++){let t=this.#s3(e,a);if(null!==t&&t>=0&&!h.has(t))return!0}return!1}#s9(e,t){let r=new Set;return t.forEach(({originalLayerIndex:t},i)=>{e.has(t)&&r.add(i)}),r}commit(){if(this.highlight.getCustomSelections().forEach(e=>{e.commit()}),!this.isSelected())return;let e=this.getLayerLevel(),t=this.getActiveSelectedRange();t&&this.highlight.isEnabledFor("focus",t.highlight)&&this.highlight.getFocus().commit().syncWith(t);for(let e=0;e<this.selectedRange.size();e+=1){this.highlight.useLayerLevel(e);let t=this.highlight.createArea(),r=this.highlight.createLayeredArea(),i=this.highlight.createRowHeader(),n=this.highlight.createColumnHeader(),o=this.highlight.createActiveRowHeader(),s=this.highlight.createActiveColumnHeader(),l=this.highlight.createActiveCornerHeader(),a=this.highlight.createRowHighlight(),h=this.highlight.createColumnHighlight();t?.commit(),r?.commit(),i?.commit(),n?.commit(),o?.commit(),s?.commit(),l?.commit(),a?.commit(),h?.commit()}this.highlight.useLayerLevel(e)}}tR(pn,dp);let po=new WeakMap,ps="_typeEditorRequested";function pl(e,t,r=e,i=!1,n){let o="string"==typeof t.type?sp(t.type):t.type;if(e._automaticallyAssignedMetaProps&&tI(t,(t,r)=>{e._automaticallyAssignedMetaProps.delete(r)}),tP(t,"editor")&&po.delete(e),!tx(o))return;r!==e||e._automaticallyAssignedMetaProps||(e._automaticallyAssignedMetaProps=new Set);let s={},l=!(i||tP(e,ps)&&!0===e[ps])&&function(e){if(!1!==e.editor)return!1;let t=function(e,t){let r=e;for(;r&&!tP(r,t);)r=Object.getPrototypeOf(r);return r}(e,"editor");return null!==t&&!(po.has(t)&&po.get(t)===t.editor)}(e);tI(o,(t,i)=>{("editor"!==i||!l)&&"CELL_TYPE"!==i&&(r._automaticallyAssignedMetaProps?.has(i)||!tP(r,i))&&(s[i]=t,e._automaticallyAssignedMetaProps?.add(i),n?.set(i,t),"editor"===i&&po.set(e,t))}),tb(e,s)}function pa(e,t){e()||tf(`Assertion failed: ${t}`)}function ph(e){if(!0!==e.editor)return e;let t={...e};return delete t.editor,t}function pd(e,t,r,i){if(tP(e,t)||!i||!r||"string"!=typeof t||-1===t.indexOf("."))return e[t];let n=e;for(let e of t.split(".")){if(null==n)return;n=n[e]}return n}function pu(e,t,r){return"object"==typeof e?tE(t,e):r&&t===e}function pc(e,t,r){if("function"==typeof t)return t(e.toPhysicalRow(r))}let pg=()=>({_automaticallyAssignedMetaProps:void 0,_userDefinedMetaProps:void 0,_cellOptionMetaProps:void 0,_persistedMetaProps:void 0,activeHeaderClassName:"ht__active_highlight",allowEmpty:!0,allowHtml:!1,allowInsertColumn:!0,allowInsertRow:!0,allowInvalid:!0,allowRemoveColumn:!0,allowRemoveRow:!0,ariaTags:!0,asyncValues:!1,autoLink:!1,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,currentColClassName:void 0,currentHeaderClassName:"ht__highlight",currentRowClassName:void 0,customBorders:!1,customBordersProgressive:!1,data:void 0,dataProvider:void 0,dataDotNotation:!0,dataSchema:void 0,rowId:void 0,dateFormat:{year:"numeric",month:"2-digit",day:"2-digit"},timeFormat:{hour:"2-digit",minute:"2-digit"},dateTimeFormat:{year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!1},defaultDate:void 0,disableVisualSelection:!1,dialog:!1,dragToScroll:!0,dropdownMenu:void 0,editor:void 0,emptyDataState:!1,enterBeginsEditing:!0,enterCommits:!0,enterMoves:{col:0,row:1},exportFile:void 0,importFile:void 0,fillHandle:{autoInsertRow:!1},filter:!0,filterValueComparator:void 0,filteringCaseSensitive:!1,filters:void 0,filterSelectedItems:!0,fixedColumnsEnd:0,fixedColumnsLeft:0,fixedColumnsStart:0,fixedRowsBottom:0,fixedRowsTop:0,formulaBuilder:void 0,formulas:void 0,fragmentSelection:!1,hashLength:void 0,hashRevealDelay:void 0,hashSymbol:"*",headerClassName:void 0,headerCheckbox:void 0,height:void 0,hiddenColumns:void 0,hiddenRows:void 0,initialState:void 0,invalidCellClassName:"htInvalid",imeFastEdit:!1,isEmptyCol(e){let t,r,{dataSchema:i,dataDotNotation:n}=this.getSettings(),o=!!i,s=this.getSchema(),l=this.colToProp(e),a=this.countRows(),h="function"==typeof i,d=null===l?void 0:pd(s,l,n,o);for(t=0;t<a;t++)if(!1===ej(r=this.getDataAtCell(t,e))&&(h&&null!==l&&(d=pd(pc(this,i,t),l,n,o)),!pu(r,d,o)))return!1;return!0},isEmptyRow(e){let t,r,{dataSchema:i,dataDotNotation:n}=this.getSettings(),o=!!i,s=pc(this,i,e)??this.getSchema(),l=this.countCols();for(t=0;t<l;t++)if(!1===ej(r=this.getDataAtCell(e,t))){let e=this.colToProp(t);if(!pu(r,null===e?void 0:pd(s,e,n,o),o))return!1}return!0},label:void 0,language:"en-US",layoutDirection:"inherit",layout:void 0,licenseKey:void 0,limitFixedToViewport:!1,locale:"en-US",loading:!1,notification:!1,freezeBar:void 0,manualColumnFreeze:void 0,manualColumnMove:void 0,manualColumnResize:void 0,manualRowMove:void 0,manualRowResize:void 0,maxCols:1/0,maxLength:1/0,maxRows:1/0,maxSelections:void 0,mergeCells:!1,minCols:0,minRowHeights:void 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,preserveNumericLiteral:!1,observeDOMVisibility:!0,outsideClickDeselects:!0,pagination:void 0,placeholder:void 0,placeholderCellClassName:"htPlaceholder",preserveTextValue:!1,preventOverflow:!1,preventWheel:!1,readOnly:!1,readOnlyCellClassName:"htDimmed",readOnlyStyling:!0,renderAllRows:!1,renderMode:"always",renderAllColumns:!1,renderer:void 0,valueFormatter:void 0,valueParser:void 0,rowHeaders:void 0,rowHeaderWidth:void 0,autoRowHeaderSize:void 0,rowHeights:void 0,rowSelection:void 0,search:!1,searchInput:!0,selectionMode:"multiple",selectionHandles:!1,sheetsBar:void 0,moveCells:!1,selectOptions:void 0,skipColumnOnPaste:!1,skipRowOnPaste:!1,sortByRelevance:!0,sourceSortFunction:void 0,source:void 0,sourceLabel:void 0,startCols:5,startRows:5,stretchH:"none",strict:void 0,tableClassName:void 0,textEllipsis:!1,themeName:void 0,theme:void 0,colorScheme:void 0,density:void 0,injectCoreCss:!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,sourceDataValidator:void 0,sourceDataWarningMessage:void 0,valueGetter:void 0,valueSetter:void 0,emptyValue:"",viewportColumnRenderingOffset:"auto",viewportRowRenderingOffset:"auto",viewportColumnRenderingThreshold:0,viewportRowRenderingThreshold:0,visibleRows:10,width:void 0,wordWrap:!0,sanitizer:void 0,textExtractor:void 0,parsePastedValue:!1});class pp{metaCtor=class{};#la=new Set;#lh=new Map;#ld=null;#lu;#lc=new Set;constructor(e){this.meta=this.metaCtor.prototype,tb(this.meta,pg()),this.meta.instance=e}getMetaConstructor(){return this.metaCtor}getMeta(){return this.meta}updateMeta(e){let t=ph(e);tb(this.meta,t),Object.keys(t).forEach(e=>{this.#la.add(e),void 0===t[e]&&this.#lc.add(e)});let r=t.type??this.meta.type;this.#ld=this.#lg(r)??this.#ld,this.#lu=null===this.#ld?this.#lu:r,pl(this.meta,{...t,type:r},t,!0===e.editor,this.#lh)}updateTypeFromSettings(e){var t;let r,i=this.#ld,n=null!==i&&Object.keys(e).some(t=>this.#lp(t,e[t])&&tP(i,t)),o=("string"==typeof e.type||tx(e.type))&&null!==this.#lg(e.type);tP(e,"type")&&!o&&"string"==typeof e.type&&(this.meta.type=this.#lu);let s=null;if(o?s=this.#lg(e.type):n&&(s=this.#lg(this.meta.type)??i),this.#lm(e,o),null===s)return!1;let l=s!==i;l&&this.#lf();let a={};return this.#la.forEach(e=>{a[e]=!0}),this.#ld=s,this.#lu=o?e.type:this.#lu,pl(this.meta,{type:s},a,!0===e.editor,this.#lh),l&&!(null!==i&&(r=Object.keys(t=s)).length===Object.keys(i).length&&r.every(e=>tP(i,e)&&t[e]===i[e]))}#lm(e,t){Object.keys(e).forEach(r=>{"editor"===r&&!0===e[r]?t&&this.#la.delete(r):this.#lp(r,e[r])?this.#la.delete(r):this.#la.add(r)})}#lp(e,t){return void 0===t&&!this.#lc.has(e)}#lg(e){if("string"==typeof e&&!su(e))return null;let t="string"==typeof e?sp(e):e;return tx(t)?t:null}#lf(){let e=pg();this.#lh.forEach((t,r)=>{this.#la.has(r)||this.meta[r]!==t&&void 0!==this.meta[r]||(tP(e,r)?this.meta[r]=e[r]:Reflect.deleteProperty(this.meta,r))}),this.#lh.clear()}}class pm{constructor(e){const t=e.getMetaConstructor();this.meta=new t}getMeta(){return this.meta}updateMeta(e){let t=ph(e);tb(this.meta,t),pl(this.meta,t,t,!0===e.editor)}}function pf(e){oW(e)||null==e||tf("Assertion failed: Expecting an unsigned number or null/undefined argument.")}class pw{#lw=new Map;#os=0;#ly=[];#lb=0;#lC=-1;#lS=!0;#lv=!1;constructor(e){this.valueFactory=e}obtain(e){oW(e)||tf("Assertion failed: Expecting an unsigned number.");let t=e;this.#ly.length>0&&-1===(t=this.#lR(e))&&(this.#lE(),t=e);let r=this.#lw.get(t);if(void 0===r){r=this.valueFactory(e),this.#lw.set(t,r),e>=this.#os&&(this.#os=e+1);let i=t>e?t:e;i>=this.#lb&&(this.#lb=i+1),t>this.#lC?this.#lC=t:this.#lS=!1}return r}has(e){return void 0!==this.getIfExists(e)}insert(e,t=1){pf(e);let r=null==e?this.#os:e;this.#os+=t,r>=this.#lb||(this.#lb+=t,this.#lT({start:r,amount:t,isInsert:!0}))}remove(e,t=1){let r;if(pf(e),null==e){let e=this.#os-t;r=e<0?Math.max(this.#os+e,0):e}else r=e;let i=Math.max(Math.min(this.#os-r,t),0),n=r>=this.#lb;this.#os-=i,this.#lb>this.#os&&(this.#lb=this.#os),n||this.#lT({start:r,amount:t,isInsert:!1})}size(){return this.#ly.length>0&&this.#lE(),this.#lw.size}values(){return this.#ly.length>0&&this.#lE(),this.#lv=!0,this.#lw.values()}entries(){return this.#ly.length>0&&this.#lE(),this.#lv=!0,this.#lw.entries()}evict(e){if(this.#ly.length>0){let t=this.#lR(e);-1!==t&&this.#lw.delete(t);return}this.#lw.delete(e)}getIfExists(e){if(this.#ly.length>0){let t=this.#lR(e);return -1===t?void 0:this.#lw.get(t)}return this.#lw.get(e)}clear(){this.#lw.clear(),this.#ly=[],this.#os=0,this.#lb=0,this.#lC=-1,this.#lS=!0,this.#lv=!1}#lT(e){let t=this.#ly,r=t.length>0?t[t.length-1]:void 0;!(void 0!==r&&r.isInsert===e.isInsert&&this.#lx(r,e))&&(t.push(e),t.length>=1024&&this.#lE())}#lx(e,t){return t.isInsert?t.start>=e.start&&t.start<=e.start+e.amount&&(e.amount+=t.amount,!0):t.start===e.start?(e.amount+=t.amount,!0):t.start+t.amount===e.start&&(e.start=t.start,e.amount+=t.amount,!0)}#lR(e){let t=this.#ly,r=e;for(let e=t.length-1;e>=0;e--){let{start:i,amount:n,isInsert:o}=t[e];if(o){if(r>=i+n)r-=n;else if(r>=i)return -1}else r>=i&&(r+=n)}return r}#lE(){let e=this.#ly;if(this.#ly=[],1===e.length&&!e[0].isInsert&&!this.#lv&&this.#lS&&this.#lC===this.#lw.size-1)return void this.#lA(e[0].start,e[0].amount);let t=Array(e.length),r=1/0;for(let i=e.length-1;i>=0;i--)e[i].start<r&&(r=e[i].start),t[i]=r;let i=!1;for(let e of this.#lw.keys())if(e>=r){i=!0;break}if(!i)return;let n=new Map,o=-1,s=!0,l=-1;for(let[r,i]of this.#lw){let a=this.#lM(r,e,t);-1!==a&&(n.set(a,i),a>o&&(o=a),a<=l&&(s=!1),l=a)}this.#lw=n,this.#lv=!1,this.#lb=o+1,this.#lC=o,this.#lS=s}#lA(e,t){let r=this.#lw,i=r.size,n=Math.max(i-t,e);for(let i=e;i<n;i++)r.set(i,r.get(i+t));for(let e=n;e<i;e++)r.delete(e);this.#lC=n-1,this.#lb=n}#lM(e,t,r){let i=e;for(let e=0;e<t.length&&!(i<r[e]);e++){let{start:r,amount:n,isInsert:o}=t[e];if(o)i>=r&&(i+=n);else if(i>=r+n)i-=n;else if(i>=r)return -1}return i}[Symbol.iterator](){return this.entries()}}let py=["data","width"];class pb{metas=new pw(()=>this._createMeta());constructor(e){this.globalMeta=e,this.metas=new pw(()=>this._createMeta())}updateMeta(e,t){let r=this.getMeta(e),i=ph(t);tb(r,i),pl(r,i,r,!0===t.editor)}createColumn(e,t){this.metas.insert(e,t)}removeColumn(e,t){this.metas.remove(e,t)}getMeta(e){return this.metas.obtain(e)}getMetaConstructor(e){return this.metas.obtain(e).constructor}clearCache(){this.metas.clear()}_createMeta(){return function(e,t=[]){function r(){}ty(r,e);for(let e=0;e<t.length;e++)r.prototype[t[e]]=void 0;return r}(this.globalMeta.getMetaConstructor(),py).prototype}}let pC=new WeakMap;function pS(e,t){let r=pC.get(e);return void 0===r||"string"!=typeof t?t:rV(t).filter(e=>!r.includes(e)).join(" ")}function pv(e){return tP(e,"valid")&&!1===e.valid}let pR=Object.freeze({hadOwn:!1,value:void 0,origin:"none"});function pE(e,t){let r=e[t];return r instanceof Set?r:void 0}function pT(e,t){let r=e[t];return"className"===t?pS(e,r):r}function px(e,t){return pE(e,"_userDefinedMetaProps")?.has(t)?"user":pE(e,"_cellOptionMetaProps")?.has(t)?"cellOption":"none"}class pA{metas=new pw(()=>this._createRow());#lI=0;#lN=0;constructor(e){this.columnMeta=e}enableUserDefinedMetaRecording(){this.#lI>0&&(this.#lI-=1)}disableUserDefinedMetaRecording(){this.#lI+=1}isUserDefinedMetaRecording(){return 0===this.#lI}startCellOptionMetaRecording(){this.#lN+=1,this.disableUserDefinedMetaRecording()}isRecordingCellOptionMeta(){return this.#lN>0}endCellOptionMetaRecording(){0!==this.#lN&&(this.#lN-=1,this.enableUserDefinedMetaRecording())}updateMeta(e,t,r){i1(this.extendMeta(e,t,r))}extendMeta(e,t,r){let i=this.getMeta(e,t),n=ph(r),o=!1;tI(n,(e,t)=>{i[t]!==e&&(o=!0)});let s=i.editor;return tb(i,n),pl(i,n,i,!0===r.editor),i.editor!==s&&(o=!0),o&&i1(i),i}createRow(e,t){this.metas.insert(e,t)}createColumn(e,t){for(let[,r]of this.metas)r.insert(e,t)}removeRow(e,t){this.metas.remove(e,t)}removeColumn(e,t){for(let[,r]of this.metas)r.remove(e,t)}getMeta(e,t,r){let i=this.metas.obtain(e).obtain(t);return void 0===r?i:i[r]}hasMeta(e,t){return this.metas.has(e)&&this.metas.obtain(e).has(t)}getMetaIfExists(e,t){return this.metas.getIfExists(e)?.getIfExists(t)}createTransientMeta(e){return this._createMeta(e)}setMeta(e,t,r,i){let n=this.metas.obtain(e).obtain(t);if(i1(n),"editor"===r&&!0===i){delete n[r],n._persistedMetaProps?.delete(r),n._userDefinedMetaProps?.delete(r),n._cellOptionMetaProps?.delete(r),this.setMeta(e,t,ps,!0);return}"editor"===r&&this.removeMeta(e,t,ps),n._automaticallyAssignedMetaProps?.delete(r),n[r]=i,"className"===r&&function(e,t){let r=pC.get(e);if(void 0===r)return;let i="string"==typeof t||Array.isArray(t)?rV(t):[],n=r.filter(e=>!i.includes(e));0===n.length?pC.delete(e):pC.set(e,n)}(n,i),void 0===n._persistedMetaProps&&(n._persistedMetaProps=new Set),n._persistedMetaProps.add(r);let o=this.#lN>0&&this.#lI===this.#lN;0===this.#lI?(void 0===n._userDefinedMetaProps&&(n._userDefinedMetaProps=new Set),n._userDefinedMetaProps.add(r),n._cellOptionMetaProps?.delete(r)):o?(void 0===n._cellOptionMetaProps&&(n._cellOptionMetaProps=new Set),n._cellOptionMetaProps.add(r),n._userDefinedMetaProps?.delete(r)):(n._userDefinedMetaProps?.delete(r),n._cellOptionMetaProps?.delete(r))}removeMeta(e,t,r){let i=this.metas.getIfExists(e)?.getIfExists(t);void 0!==i&&(delete i[r],i._userDefinedMetaProps?.delete(r),i._cellOptionMetaProps?.delete(r),i._persistedMetaProps?.delete(r),i1(i),"editor"===r&&this.removeMeta(e,t,ps),r===ps&&tP(i,"editor")&&!pE(i,"_persistedMetaProps")?.has("editor")&&delete i.editor)}getMetaKeyState(e,t,r){let i=this.metas.getIfExists(e)?.getIfExists(t);return void 0!==i&&pE(i,"_persistedMetaProps")?.has(r)&&tP(i,r)?{hadOwn:!0,value:pT(i,r),origin:px(i,r)}:pR}applyMetaKeyState(e,t,r,i){if(!i.hadOwn)return void this.removeMeta(e,t,r);if("cellOption"===i.origin){this.startCellOptionMetaRecording();try{this.setMeta(e,t,r,i.value)}finally{this.endCellOptionMetaRecording()}}else if("none"===i.origin){this.disableUserDefinedMetaRecording();try{this.setMeta(e,t,r,i.value)}finally{this.enableUserDefinedMetaRecording()}}else this.setMeta(e,t,r,i.value)}captureRowMetaKeyStates(e,t){let r=this.metas.getIfExists(e);if(void 0!==r)for(let[i,n]of r)this.#lO(e,i,n,t)}captureColumnMetaKeyStates(e,t){for(let[r,i]of this.metas){let n=i.getIfExists(e);void 0!==n&&this.#lO(r,e,n,t)}}getMetas(){let e=[],t=Array.from(this.metas.values());for(let r=0;r<t.length;r++)e$(t[r])&&e.push(...Array.from(t[r].values()));return e}getMetasAtRow(e){pa(()=>oW(e),"Expecting an unsigned number.");let t=this.metas.getIfExists(e);return void 0===t?[]:Array.from(t).sort(([e],[t])=>e-t).map(([,e])=>e)}getMetasAtRowWithPhysicalColumns(e){pa(()=>oW(e),"Expecting an unsigned number.");let t=this.metas.getIfExists(e);return void 0===t?[]:Array.from(t).sort(([e],[t])=>e-t).map(([e,t])=>({physicalColumn:e,meta:t}))}getUserDefinedMetas(){return this.#lk("_userDefinedMetaProps")}getCellOptionMetas(){return this.#lk("_cellOptionMetaProps")}#lO(e,t,r,i){let n=pE(r,"_persistedMetaProps");n?.forEach(n=>{let o=px(r,n);if("none"!==o&&tP(r,n)){let s=pT(r,n);i.push({physicalRow:e,physicalColumn:t,key:n,state:{hadOwn:!0,value:s,origin:o}})}})}#lk(e){let t=[];for(let[r,i]of this.metas)for(let[n,o]of i){let i=o[e];void 0!==i&&i.forEach(e=>{tP(o,e)&&t.push({physicalRow:r,physicalColumn:n,key:e,value:pT(o,e)})})}return t}getInvalidMetas(){let e=[];for(let[t,r]of this.metas)for(let[i,n]of r)pv(n)&&e.push({physicalRow:t,physicalColumn:i});return e}restoreInvalidMetas(e){e.forEach(({physicalRow:e,physicalColumn:t})=>{let r=this.getMeta(e,t);r.valid=!1,i1(r)})}evictRow(e){let t=this.metas.getIfExists(e);if(void 0===t)return[];let r=!1,i=[];for(let[e,n]of t){let o=pE(n,"_persistedMetaProps"),s=void 0!==o&&o.size>0,l=pv(n);s||l?r=!0:(t.evict(e),i.push(e))}return r||this.metas.evict(e),i}clearCache(){this.metas.clear()}_createRow(){return new pw(e=>this._createMeta(e))}_createMeta(e){return new(this.columnMeta.getMetaConstructor(e))}}let pM="The `fixedColumnsLeft` is not supported for RTL. Please use option `fixedColumnsStart`.";function pI(e,t){return tP(e,"fixedColumnsLeft")?(tP(e,"fixedColumnsStart")&&tf("The `fixedColumnsLeft` and `fixedColumnsStart` should not be used together. Please use only the option `fixedColumnsStart`."),t&&tf(pM),pN(e)):e}function pN(e){if(!tP(e,"fixedColumnsLeft"))return e;let{fixedColumnsLeft:t,...r}=e;return{...r,fixedColumnsStart:tP(r,"fixedColumnsStart")?r.fixedColumnsStart:t}}function pO(e,t){if(!tP(t,"fixedColumnsLeft")||!tP(e,"fixedColumnsStart"))return e;let{fixedColumnsStart:r,...i}=e;return{...i,fixedColumnsLeft:r}}function pk(e){tf(`The \`${e}\` option can not be updated after the Handsontable is initialized.`)}class pH{metaManager;usageTracker=new Set;propDescriptors=new Map([["ariaTags",{initOnly:!0}],["fixedColumnsLeft",{target:"fixedColumnsStart",onChange(e){this.metaManager.hot.isRtl()&&"fixedColumnsLeft"===e&&tf(pM)}}],["layoutDirection",{initOnly:!0}],["renderAllColumns",{initOnly:!0}],["renderAllRows",{initOnly:!0}]]);constructor(e){this.metaManager=e,this.extendMetaProps()}#lH=(e,t,r)=>{r||pk(e)};extendMetaProps(){this.propDescriptors.forEach((e,t)=>{let{initOnly:r,target:i,onChange:n}=e,o="string"==typeof i,s=o?i:t,l=`_${s}`;this.metaManager.globalMeta.meta[l]=this.metaManager.globalMeta.meta[s],n?(this.installPropWatcher(t,l,n),o&&this.installPropWatcher(i,l,n)):r&&(this.installPropWatcher(t,l,this.#lH),this.metaManager.globalMeta.meta._initOnlySettings||(this.metaManager.globalMeta.meta._initOnlySettings=[]),this.metaManager.globalMeta.meta._initOnlySettings.push(t))})}installPropWatcher(e,t,r){let{usageTracker:i}=this,n=r.bind(this),o=()=>this.metaManager.isInitialized();Object.defineProperty(this.metaManager.globalMeta.meta,e,{get(){return this[t]},set(r){let s=!o()&&!i.has(e);i.add(e),n(e,r,s),this[t]=r},enumerable:!0,configurable:!0})}}class p_{#l_=0;#lP=!1;constructor(e,t={},r=[]){this.hot=e,this.globalMeta=new pp(e),this.tableMeta=new pm(this.globalMeta),this.columnMeta=new pb(this.globalMeta),this.cellMeta=new pA(this.columnMeta),r.forEach(e=>new e(this)),this.globalMeta.updateMeta(t)}finishInitialization(){this.#lP=!0}isInitialized(){return this.#lP}assertNoInitOnlyUpdates(e){this.#lP&&(this.globalMeta.getMeta()._initOnlySettings??[]).forEach(t=>{tP(e,t)&&pk(t)})}getGlobalMeta(){return this.globalMeta.getMeta()}updateGlobalMeta(e){this.globalMeta.updateMeta(e)}updateGlobalTypeFromSettings(e){return this.globalMeta.updateTypeFromSettings(e)}getTableMeta(){return this.tableMeta.getMeta()}updateTableMeta(e){this.tableMeta.updateMeta(e)}getColumnMeta(e){return this.columnMeta.getMeta(e)}updateColumnMeta(e,t){this.columnMeta.updateMeta(e,t)}getCellMeta(e,t,r){let i=this.cellMeta.getMeta(e,t);return i.visualRow=r.visualRow,i.visualCol=r.visualColumn,i.row=e,i.col=t,r.skipMetaExtension||this.runLocalHooks("afterGetCellMeta",i),i}getCellMetaUncached(e,t,r){let i=this.cellMeta.getMetaIfExists(e,t)??this.cellMeta.createTransientMeta(t);return i.visualRow=r.visualRow,i.visualCol=r.visualColumn,i.row=e,i.col=t,i}createTransientColumnMeta(e){return this.cellMeta.createTransientMeta(e)}getCellMetaTransient(e,t,r){let i=this.cellMeta.getMetaIfExists(e,t);if(void 0!==i)return i.visualRow=r.visualRow,i.visualCol=r.visualColumn,i.row=e,i.col=t,this.runLocalHooks("afterGetCellMeta",i),i;let n=this.cellMeta.createTransientMeta(t);return n.visualRow=r.visualRow,n.visualCol=r.visualColumn,n.row=e,n.col=t,this.runLocalHooks("extendTransientCellMeta",n),n}getCellMetaKeyValue(e,t,r){return"string"!=typeof r&&tf("The passed cell meta object key is not a string"),this.cellMeta.getMeta(e,t,r)}setCellMeta(e,t,r,i){this.cellMeta.setMeta(e,t,r,i)}updateCellMeta(e,t,r){this.cellMeta.updateMeta(e,t,r)}extendCellMeta(e,t,r){this.cellMeta.extendMeta(e,t,r)}removeCellMeta(e,t,r){this.cellMeta.removeMeta(e,t,r)}getCellMetaKeyState(e,t,r){return this.cellMeta.getMetaKeyState(e,t,r)}applyCellMetaKeyState(e,t,r,i){this.cellMeta.applyMetaKeyState(e,t,r,i)}isUserDefinedMetaRecording(){return this.cellMeta.isUserDefinedMetaRecording()}captureRowMetaKeyStates(e,t){this.cellMeta.captureRowMetaKeyStates(e,t)}captureColumnMetaKeyStates(e,t){this.cellMeta.captureColumnMetaKeyStates(e,t)}getCellsMeta(){return this.cellMeta.getMetas()}getCellsMetaAtRow(e){return this.cellMeta.getMetasAtRow(e)}getCellsMetaAtRowWithPhysicalColumns(e){return this.cellMeta.getMetasAtRowWithPhysicalColumns(e)}getUserDefinedCellMetas(){return this.cellMeta.getUserDefinedMetas()}getCellMetaIfExists(e,t){return this.cellMeta.getMetaIfExists(e,t)}getStructureVersion(){return this.#l_}getInvalidCellMetas(){return this.cellMeta.getInvalidMetas()}restoreInvalidCellMetas(e){this.cellMeta.restoreInvalidMetas(e)}getCellOptionCellMetas(){return this.cellMeta.getCellOptionMetas()}enableUserDefinedMetaRecording(){this.cellMeta.enableUserDefinedMetaRecording()}disableUserDefinedMetaRecording(){this.cellMeta.disableUserDefinedMetaRecording()}startCellOptionMetaRecording(){this.cellMeta.startCellOptionMetaRecording()}endCellOptionMetaRecording(){this.cellMeta.endCellOptionMetaRecording()}isRecordingCellOptionMeta(){return this.cellMeta.isRecordingCellOptionMeta()}createRow(e,t=1){this.#l_+=1,this.cellMeta.createRow(e,t)}removeRow(e,t=1){this.#l_+=1,this.cellMeta.removeRow(e,t)}createColumn(e,t=1){this.#l_+=1,this.cellMeta.createColumn(e,t),this.columnMeta.createColumn(e,t)}removeColumn(e,t=1){this.#l_+=1,this.cellMeta.removeColumn(e,t),this.columnMeta.removeColumn(e,t)}invalidateMetaExtensions(){this.runLocalHooks("invalidateMetaExtensions")}clearCellsCache(){this.#l_+=1,this.cellMeta.clearCache()}clearCache(){this.cellMeta.clearCache(),this.columnMeta.clearCache()}}tR(p_,dp);class pP{metaSyncMemo=new Map;#lD=0;#lL=0;#lF=!1;constructor(e){this.metaManager=e,e.addLocalHook("afterGetCellMeta",e=>{this.extendCellMeta(e)}),e.addLocalHook("extendTransientCellMeta",e=>{this.extendTransientCellMeta(e)}),e.addLocalHook("invalidateMetaExtensions",()=>{this.metaSyncMemo.clear()}),nM.getSingleton().add("beforeRender",e=>{e&&this.metaSyncMemo.clear()},this.metaManager.hot);const t=()=>this.#lB();nM.getSingleton().add("afterScrollVertically",t,this.metaManager.hot),nM.getSingleton().add("afterViewRender",t,this.metaManager.hot)}extendCellMeta(e){let t=e.row,r=e.col;if(this.metaSyncMemo.get(t)?.has(r))return;this.#lV(e,e=>{this.metaManager.extendCellMeta(t,r,e)});let i=this.metaSyncMemo.get(t);void 0===i&&(i=new Set,this.metaSyncMemo.set(t,i)),i.add(r)}extendTransientCellMeta(e){this.#lV(e,t=>{let r=ph(t);tb(e,r),pl(e,r,e,!0===t.editor)})}#lV(e,t){let r=e.row,i=e.col,n=e.visualRow,o=e.visualCol,s=this.metaManager.hot,l=n3(s,o);e.prop=l,s.runHooks("beforeGetCellMeta",n,o,e);let a=tP(e,"type")?e.type:null,h=i3(e.cells)?e.cells(r,i,l):null;a&&(h?h.type=h.type??a:h={type:a}),h&&t(h),!h?.type&&function(e){if(!0!==e[ps]||!tP(e,ps)||tP(e,"type")||tP(e,"editor")||!1!==e.editor)return!1;let t="string"==typeof e.type?sp(e.type):e.type;if(!tx(t)||!tP(t,"editor"))return!1;let r=t.editor;return e.editor=r,po.set(e,r),!0}(e)&&i1(e),s.runHooks("afterGetCellMeta",n,o,e)}#lB(){let e=this.metaManager.hot,t=e.getFirstRenderedVisibleRow(),r=e.getLastRenderedVisibleRow();if(!Number.isInteger(t)||!Number.isInteger(r)||r<t)return;let i=r-t+1,n=t-i,o=r+i,s=this.#lD,l=this.#lL;this.#lF&&(this.#lz(s,Math.min(l,n-1)),this.#lz(Math.max(s,o+1),l)),this.#lD=n,this.#lL=o,this.#lF=!0}#lz(e,t){if(e>t)return;let r=this.metaManager.hot,i=r.getSelectedRangeLast(),n=i?i.highlight.row:null;for(let i=e;i<=t;i++){let e=r.toPhysicalRow(i);i!==n&&Number.isInteger(e)&&this.#lU(e)}}#lU(e){let t=this.metaManager.cellMeta.evictRow(e);if(0===t.length)return;let r=this.metaSyncMemo.get(e);if(void 0!==r){for(let e=0;e<t.length;e++)r.delete(t[e]);0===r.size&&this.metaSyncMemo.delete(e)}}}function pD(e){return"function"==typeof e}let pL=class{dataType="array";colToProp=e=>void 0;propToCol=e=>void 0;countCachedColumns;#lW={colToProp:e=>this.colToProp(e),toPhysicalColumn:e=>this.hot.toPhysicalColumn(e)};constructor(e,t=[]){this.hot=e,this.data=t}modifyRowData(e){let t;return this.hot.hasHook("modifyRowData")&&(t=this.hot.runHooks("modifyRowData",e)),void 0===t||Number.isInteger(t)?this.data[e]:t}getData(e=!1){return this.data?.length?e||this.hot.hasHook("modifySourceData")||this.hot.hasHook("modifyRowData")?this.getByRange(null,null,e):this.data.map(dg):this.data}setData(e){this.data=e}getAtColumn(e){let t=[];return eo(this.data,(r,i)=>{let n=this.getAtCell(i,e);t.push(n)}),t}getAtRow(e,t,r,i=!1){let n=void 0===t&&void 0===r,{dataDotNotation:o,columns:s,maxCols:l}=this.hot.getSettings(),a=null,h=null;if(Array.isArray(a=this.modifyRowData(e)))h=[],n?a.forEach((t,r)=>{h[r]=this.getAtPhysicalCell(e,r,a)}):oD(t,r,r=>{h[r-t]=this.getAtPhysicalCell(e,r,a)});else if(tx(a)||i3(a))if(h=i?[]:{},!n||i){let n=this.countCachedColumns?.()??0,d=Array.isArray(s)?Math.max(n,Math.min(l??1/0,s.length)):n,u=Math.max(this.countFirstRowKeys(),d)-1;oD(0,u,n=>{let s=n3(this.#lW,n),l=!Number.isInteger(s)||i&&n<d&&null!==this.hot.toPhysicalColumn(n);if(n>=(t||0)&&n<=(r??u)&&l){let t=this.getAtPhysicalCell(e,s,a);i?h.push(t):o?null!==h&&tk(h,s,t):h[s]=t}})}else tI(a,(t,r)=>{let i=this.getAtPhysicalCell(e,r,a);o?null!==h&&tk(h,r,i):h[r]=i});return h}setAtCell(e,t,r,i=!1){let n;if("string"==typeof e){let t=Number(e);if(Number.isNaN(t)||!Number.isInteger(t)||t<0)return;n=t}else{if("number"!=typeof e||!Number.isInteger(e)||e<0)return;n=e}if(n>=this.countRows()||!i&&"number"==typeof t&&t>=this.countFirstRowKeys())return;if(this.hot.hasHook("modifySourceData")){let e=t_(r);this.hot.runHooks("modifySourceData",n,t,e,"set"),e.isTouched()&&(r=e.value)}let o=this.modifyRowData(n);if("function"==typeof t){null!=o&&t(o,r);return}if(Number.isInteger(t))Array.isArray(o)?o[t]=r:tx(o)&&tk(o,String(t),r);else if(Array.isArray(o)){let e=Number(t);!Number.isNaN(e)&&Number.isInteger(e)&&e>=0&&e<this.countFirstRowKeys()&&(o[e]=r)}else tx(o)&&this.#l$(o,String(t),r,i)}#l$(e,t,r,i){!i||!tP(e,t)&&!0===this.hot.getSettings().dataDotNotation&&t.includes(".")?tk(e,t,r):tO(e,t,r)}getAtPhysicalCell(e,t,r){let i=this.#lG(t,r);if(this.hot.hasHook("modifySourceData")){let r=t_(i);this.hot.runHooks("modifySourceData",e,t,r,"get"),r.isTouched()&&(i=r.value)}return i}getAtCell(e,t){let r=this.modifyRowData(e),i="function"==typeof t?t:n3(this.#lW,t);return this.getAtPhysicalCell(e,i,r)}getAtCellByProp(e,t,r){return this.getAtPhysicalCell(e,t,void 0===r?this.modifyRowData(e):r)}getRawAtCellByProp(e,t){let r=this.modifyRowData(e);return"string"==typeof t&&tx(r)&&tP(r,t)?r[t]:this.#lG(t,r)}#lG(e,t){if(!t)return null;if("string"==typeof e){let{dataDotNotation:r}=this.hot.getSettings();return r?tN(t,e):t[e]}return"function"==typeof e?e(t):t[e]}getByRange(e=null,t=null,r=!1){let i=!1,n=null,o=null,s=null,l=null;null===e||null===t?(i=!0,n=0,s=this.countRows()-1):(n=Math.min(e.row,t.row),o=Math.min(e.col,t.col),s=Math.max(e.row,t.row),l=Math.max(e.col,t.col));let a=[];return oD(n,s,e=>{a.push(i?this.getAtRow(e,void 0,void 0,r):this.getAtRow(e,o,l,r))}),a}getCopyable(e,t){let r=this.propToCol(t)??t;return"number"==typeof r&&this.hot.getCellMetaTransient(e,r).copyable?this.getAtCell(this.hot.toPhysicalRow(e),r):""}countRows(){if(this.hot.hasHook("modifySourceLength")){let e=this.hot.runHooks("modifySourceLength");if("number"==typeof e&&Number.isInteger(e))return e}return this.data.length}countFirstRowKeys(){return dd(this.data??[])}destroy(){this.data=null,this.hot=null}},pF=/^(\r\n|\n\r|\r|\n)/,pB=/^[^\t\r\n]+/,pV=/^\t/;function pz(e){let t,r,i,n,o,s="";for(t=0,r=e.length;t<r;t+=1){for(i=0,n=e[t].length;i<n;i+=1)i>0&&(s+=" "),"string"==typeof(o=e[t][i])?o.indexOf("\n")>-1?s+=`"${o.replaceAll('"','""')}"`:s+=o:null==o?s+="":s+=o;t!==r-1&&(s+="\n")}return s}let pU=new Set(["valid"]);function pW(e){return"object"==typeof e&&null!==e?tS(e):e}function p$(e,t,r){let i=e.getRecordingTransaction();if(null===i)return;let n=i.journal[i.journal.length-1];void 0!==r?null!==r.op&&n===r.op?r.op.changes.push(t):(r.op={type:"cells",changes:[t],reversed:!0},e.append(i,r.op)):n?.type==="cells"&&!0!==n.reversed&&e.isLatestEntry(n)?n.changes.push(t):e.append(i,{type:"cells",changes:[t]})}function pG(e,t,r,i){let n=e._getOperationScope();if(null===n.getRecordingTransaction()||i<=0)return;let o=[];if(!t){let t=e._getMetaManager();for(let e=r;e<r+i;e++)t.captureRowMetaKeyStates(e,o)}n.record({type:"metaRows",insert:t,physicalRow:r,amount:i,metas:o})}function pj(e,t){let r=t-e.length;return e.every((e,t)=>e===r+t)}class pY{static get DESTINATION_RENDERER(){return 1}static get DESTINATION_CLIPBOARD_GENERATOR(){return 2}tableMeta;#lj=0;#lY=0;constructor(e,t,r){this.hot=e,this.metaManager=r,this.tableMeta=r.getTableMeta(),this.dataSource=t,this.colToPropCache=[],this.propToColCache=new Map,this.refreshDuckSchema(),this.createMap()}createMap(){let e=this.getSchema();void 0===e&&tf("trying to create `columns` definition but you didn't provide `schema` nor `data`");let t=this.tableMeta.columns;this.colToPropCache=[],this.propToColCache=new Map,t?this.#lK(t,e):this.recursiveDuckColumns(e)}#lq(e){return null===e&&!this.propToColCache.has(null)}#lK(e,t){let r=0,i=0,n="function"==typeof e;if(n){let e=tH(t);r=e>0?e:this.countFirstRowKeys()}else r=Math.min(this.tableMeta.maxCols??1/0,e.length);for(let t=0;t<r;t++){let r=n?e(t):e[t];if(tx(r)){if(void 0!==r.data){let e=n?i:t,o=r.data;this.colToPropCache[e]=o,this.propToColCache.set(o,e)}i+=1}}}countFirstRowKeys(){return dd(this.dataSource??[])}recursiveDuckColumns(e,t,r){let i,n=t??0,o=r??"";return"object"!=typeof e||null===e||Array.isArray(e)||tI(e,(e,t)=>{let r="object"==typeof e&&null!==e;!("__children"===t||"function"==typeof e||Array.isArray(e))&&(!r||tx(e))&&(tx(e)?n=this.recursiveDuckColumns(e,n,`${o}${t}.`):(i=o+t,this.colToPropCache.push(i),this.propToColCache.set(i,n),n+=1))}),n}colToProp(e){if(!1===Number.isInteger(e))return e;let t=this.hot.toPhysicalColumn(e);return null===t?null:this.colToPropCache&&e$(this.colToPropCache[t])?this.colToPropCache[t]:t}propToCol(e){let t=this.propToColCache.get(e);return void 0!==t?this.hot.toVisualColumn(t):null===e?null:"number"!=typeof e?e:this.hot.toVisualColumn(e)}getSchema(){let e=this.tableMeta.dataSchema;return e?"function"==typeof e?e():e:this.duckSchema}createDuckSchema(){return this.dataSource&&this.dataSource[0]?tw(this.dataSource[0]):{}}refreshDuckSchema(){this.duckSchema=this.createDuckSchema()}createRow(e,t=1,{source:r,mode:i="above",fillsMinimumSize:n=!1}={}){let o=this.hot.countSourceRows(),s=o,l=0,a=e;if(("number"!=typeof a||a>=o)&&(a=o),a<this.hot.countRows()&&(s=this.hot.toPhysicalRow(a)),!1===this.hot.runHooks("beforeCreateRow",a,t,r)||null===s)return{delta:0};let h=this.tableMeta.maxRows,d=this.getSchema().length,u=[];for(;l<t&&o+l<(h??1/0);){let e=null;if("array"===this.hot.dataType)this.tableMeta.dataSchema?e=tS(this.getSchema()):(e=[],oD(d-1,()=>e.push(null)));else if("function"===this.hot.dataType){let t=this.tableMeta.dataSchema;"function"!=typeof t&&tf("`dataSchema` must be a function when `dataType` is `function`"),e=t(a+l)}else tC(e={},this.getSchema());u.push(e),l+=1}this.hot.rowIndexMapper.insertIndexes(a,l,"below"===i?"end":"start"),"below"===i&&(s=Math.min(s+1,o)),this.#lX(s,l,o,n),this.spliceData(s,0,u),l>0&&this.hot._getOperationScope().record({type:"insertRows",physicalIndex:s,amount:l,atAxisEnd:s===this.hot.rowIndexMapper.getNumberOfIndexes()-l});let c=this.hot.toVisualRow(s);return this.hot.countSourceRows()===u.length&&this.hot.columnIndexMapper.initToLength(this.hot.getInitialColumnCount()),l>0&&(null==e?this.metaManager.createRow(null,l):"auto"!==r&&this.metaManager.createRow(s,t)),this.hot.runHooks("afterCreateRow",c,l,r),{delta:l,startPhysicalIndex:s}}createCol(e,t=1,{source:r,mode:i="start",fillsMinimumSize:n=!1}={}){this.hot.isColumnModificationAllowed()||tf('Cannot create a new column when the data source holds objects or the "columns" option is set. You can only have as many columns as defined in the first data row, the data schema, or the "columns" setting. To add new columns, use an array data source without the "columns" option.');let o=this.dataSource??[],s=this.tableMeta.maxCols,l=this.hot.columnIndexMapper.getNumberOfIndexes(),a=this.hot.countCols(),h=this.hot.countSourceRows(),d="number"==typeof e&&e<=l?e:a;if(!1===this.hot.runHooks("beforeCreateCol",d,t,r))return{delta:0};let u=d<a?this.hot.toPhysicalColumn(d):l,c="end"===i?Math.min(u+1,l):u,g=Math.max(0,Math.min(t,(s??1/0)-a));return this.#lQ(c,g,l,n),this.#lZ(o,c,d,a,h,g),g>0&&this.hot._getOperationScope().record({type:"insertColumns",physicalIndex:c,amount:g,atAxisEnd:c===this.hot.columnIndexMapper.getNumberOfIndexes()}),g>0&&(null==e?this.metaManager.createColumn(null,g):"auto"!==r&&this.metaManager.createColumn(c,t)),this.hot.columnIndexMapper.insertIndexes(d,g,i),this.hot.runHooks("afterCreateCol",this.hot.toVisualColumn(c),g,r),this.refreshDuckSchema(),{delta:g,startPhysicalIndex:c}}#lZ(e,t,r,i,n,o){if(!(o<=0)){if(0===n){let t="number"==typeof r?Math.max(0,Math.min(o,r-i+1)):o;for(let r=0;r<t;r++)e.push([null]);return}for(let r=0;r<n;r++)void 0===e[r]&&(e[r]=[]),eu(e[r],t,o,null)}}#lJ(e,t,r,i,n){return r<=0?e:n&&t>=i?e+r:t>i-e?Math.max(i-t,0):e}#l0(e,t,r){let i=r-e,n=0;return t.forEach(e=>{e>=i&&(n+=1)}),Math.max(e-n,0)}#lX(e,t,r,i){this.#lj=this.#lJ(this.#lj,e,t,r,i)}#lQ(e,t,r,i){this.#lY=this.#lJ(this.#lY,e,t,r,i)}removeRow(e,t=1,r){let i=Number.isInteger(e)?e:-t,n=this.visualRowsToPhysical(i,t),o=this.hot.countRows();if(i=(o+i)%o,!1===this.hot.runHooks("beforeRemoveRow",i,n.length,n,r))return!1;let s=n.length;if(!function(e,t){let r=e._getOperationScope();if(null===r.getRecordingTransaction()||0===t.length)return;let i=t.slice(0).sort((e,t)=>e-t),n=function(e){let t=[];for(let r=0;r<e.countCols();r++){let i=e.colToProp(r);pD(i)&&t.push([e.toPhysicalColumn(r),i])}return t}(e),o=e._getMetaManager(),s=[],l=[],a=[];i.forEach(t=>{let r;s.push((tx(r=tS(e.getSourceDataAtRow(t)))&&(delete r.__children,tA(r)),r)),l.push(n.map(([r,i])=>[r,pW(e.getSourceDataAtCell(t,i))])),o.captureRowMetaKeyStates(t,a)}),r.record({type:"removeRows",physicalIndexes:i,firstPhysicalIndex:t[0],rows:s,accessorValues:l,metas:a,atAxisEnd:pj(i,e.rowIndexMapper.getNumberOfIndexes())})}(this.hot,n),this.#l1(n),this.filterData(i,s,n),i<this.hot.countRows()){this.hot.rowIndexMapper.removeIndexes(n);let e=e$(this.tableMeta.columns)||e$(this.tableMeta.dataSchema)||this.tableMeta.colHeaders;0!==this.hot.rowIndexMapper.getNotTrimmedIndexesLength()||e||this.hot.columnIndexMapper.setIndexesSequence([])}let l=n.slice(0).sort((e,t)=>t-e);return this.#l2(l,(e,t)=>{this.metaManager.removeRow(e,t)}),this.hot.runHooks("afterRemoveRow",i,s,n,r),!0}removeCol(e,t=1,r){("object"===this.hot.dataType||this.tableMeta.columns)&&tf('Cannot remove a column when the data source holds objects or the "columns" option is set.');let i="number"!=typeof e?-t:e;i=(this.hot.countCols()+i)%this.hot.countCols();let n=this.visualColumnsToPhysical(i,t),o=n.slice(0).sort((e,t)=>t-e);if(!1===this.hot.runHooks("beforeRemoveCol",i,t,n,r))return!1;let s=!0,l=o.length,a=this.dataSource??[];for(let e=0;e<l;e++)s&&n[0]!==n[e]-e&&(s=!1);return!function(e,t,r){let i=e._getOperationScope();if(null===i.getRecordingTransaction()||0===r.length)return;let n=r.slice(0).sort((e,t)=>e-t),o=e._getMetaManager(),s=[],l=n.map(e=>{let r=[];for(let i=0;i<t.length;i++){let n=t[i];r.push(Array.isArray(n)?pW(n[e]):void 0)}return o.captureColumnMetaKeyStates(e,s),r});i.record({type:"removeColumns",physicalIndexes:n,values:l,metas:s,atAxisEnd:pj(n,e.columnIndexMapper.getNumberOfIndexes())})}(this.hot,a,n),this.#l3(n),this.#l6(a,s,n,o,t),i<this.hot.countCols()&&(this.hot.columnIndexMapper.removeIndexes(n),this.tableMeta.rowHeaders||0!==this.hot.columnIndexMapper.getNotTrimmedIndexesLength()||this.hot.rowIndexMapper.setIndexesSequence([])),this.hot.runHooks("afterRemoveCol",i,t,n,r),this.refreshDuckSchema(),!0}isTrailingFillerRow(e){return null!==e&&e>=this.hot.countSourceRows()-this.#lj}isTrailingFillerColumn(e){return null!==e&&e>=this.hot.countSourceCols()-this.#lY}#l6(e,t,r,i,n){if(t)for(let t=0,i=this.hot.countSourceRows();t<i;t++)e[t].splice(r[0],n),0===t&&this.metaManager.removeColumn(r[0],n);else{let t=new Set(r),n=this.hot.countSourceRows();for(let r=0;r<n;r++)ed(e[r],t);n>0&&this.#l2(i,(e,t)=>{this.metaManager.removeColumn(e,t)})}}#l3(e){this.#lY=this.#l0(this.#lY,e,this.hot.countSourceCols())}#l1(e){this.#lj=this.#l0(this.#lj,e,this.hot.countSourceRows())}#l2(e,t){let r=0;for(let i=0;i<e.length;i++)(i+1>=e.length||e[i+1]!==e[i]-1)&&(t(e[i],i-r+1),r=i+1)}spliceCol(e,t,r,...i){let n=this.hot.getDataAtCol(e),o=n.slice(t,t+r);ee(i,n.slice(t+r));let s=0;for(;s<r;)i.push(null),s+=1;return J(i),this.hot.populateFromArray(t,e,i,void 0,void 0,"spliceCol"),o}spliceRow(e,t,r,...i){let n=this.hot.getSourceDataAtRow(e),o=n.slice(t,t+r);ee(i,n.slice(t+r));let s=0;for(;s<r;)i.push(null),s+=1;return this.hot.populateFromArray(e,t,[i],void 0,void 0,"spliceRow"),o}spliceData(e,t,r){if(!1!==this.hot.runHooks("beforeDataSplice",e,t,r)){let t=[...this.dataSource.slice(0,e),...r,...this.dataSource.slice(e)];this.dataSource.length=0,t.forEach(e=>this.dataSource.push(e))}}filterData(e,t,r){let i=this.hot.runHooks("filterData",e,t,r);Array.isArray(i)?(this.dataSource.length=0,i.forEach(e=>{this.dataSource.push(e)})):ed(this.dataSource,new Set(r))}get(e,t,r){let i=r?.skipValueGetter===!0,n=this.hot.toPhysicalRow(e),o=this.dataSource[n],s=this.hot.runHooks("modifyRowData",n);o="number"!=typeof s?s:o;let{dataDotNotation:l}=this.hot.getSettings(),a=null;if(o&&!this.#lq(t)&&"function"!=typeof t&&tP(o,t))a=o[t];else if(l&&"string"==typeof t&&t.indexOf(".")>-1){let e=o;if(!e)return null;let r=t.split(".");for(let t=0,i=r.length;t<i;t++)if(void 0===(e=e[r[t]])||null===e&&t<i-1)return null;a=e}else"function"==typeof t&&o&&(a=t(o));let h=this.propToCol(t),d="number"==typeof h?this.hot.toPhysicalColumn(h):null;if(!i&&"number"==typeof h&&oW(n)&&oW(d)&&(a=nG(a,this.metaManager.getCellMetaUncached(n,d,{visualRow:e,visualColumn:h}))),this.hot.hasHook("modifyData")){let t=t_(a);this.hot.runHooks("modifyData",e,h,t,"get"),t.isTouched()&&(a=t.value)}return a}getAtColumnForRows(e,t){let r=this.colToProp(e),i=t.length,n=[],o=this.propToCol(r),s="number"==typeof o?this.hot.toPhysicalColumn(o):null,l="number"==typeof o&&oW(s),{dataDotNotation:a}=this.hot.getSettings();if(!("function"!=typeof r&&!(a&&"string"==typeof r&&r.indexOf(".")>-1)&&!this.hot.hasHook("modifyRowData")&&!this.hot.hasHook("modifyData")&&!this.hot.hasHook("modifySourceData")&&!(l&&i3(this.metaManager.getColumnMeta(s).valueGetter)))){for(let e=0;e<i;e++)n.push(this.get(this.hot.toVisualRow(t[e]),r));return n}let h=this.dataSource;for(let e=0;e<i;e++){let i=t[e];if(l&&oW(i)&&void 0!==this.metaManager.getCellMetaIfExists(i,s)){n.push(this.get(this.hot.toVisualRow(i),r));continue}let o=h[i];n.push(o&&tP(o,r)?o[r]:null)}return n}getCopyable(e,t){let r=this.propToCol(t)??t;return"number"==typeof r&&this.hot.getCellMetaTransient(e,r).copyable?this.get(e,t):""}set(e,t,r){this.setAtPhysicalRow(this.hot.toPhysicalRow(e),t,r,e)}setAtPhysicalRow(e,t,r,i){if(this.#lq(t))return;let n=r,o=this.dataSource[e],s=this.hot.runHooks("modifyRowData",e);if(o="number"!=typeof s?s:o,this.hot.hasHook("modifyData")){let e=t_(n);this.hot.runHooks("modifyData",i,this.propToCol(t),e,"set"),e.isTouched()&&(n=e.value)}let{dataDotNotation:l}=this.hot.getSettings();if(o&&"function"!=typeof t&&tP(o,t))o[t]=n;else if(l&&"string"==typeof t&&t.indexOf(".")>-1){let e,r=o,i=0,s=t.split(".");for(i=0,e=s.length-1;i<e;i++){if("__proto__"===s[i]||"constructor"===s[i]||"prototype"===s[i])return;(void 0===r[s[i]]||null===r[s[i]])&&(r[s[i]]={}),r=r[s[i]]}r[s[i]]=n}else if("function"==typeof t)o&&t(o,n);else{if("__proto__"===t||"constructor"===t||"prototype"===t)return;o[t]=n}}visualRowsToPhysical(e,t){let r=this.hot.countRows(),i=[],n=(r+e)%r,o=t;for(;n<r&&o;)i.push(this.hot.toPhysicalRow(n)),o-=1,n+=1;return i}visualColumnsToPhysical(e,t){let r=this.hot.countCols(),i=[],n=(r+e)%r,o=t;for(;n<r&&o;){let e=this.hot.toPhysicalColumn(n);i.push(e),o-=1,n+=1}return i}clear(){for(let e=0;e<this.hot.countSourceRows();e++)for(let t=0;t<this.hot.countCols();t++)this.set(e,this.colToProp(t),"")}getLength(){let e,t=this.tableMeta.maxRows;return e=(t??0)<0||0===t?0:t||1/0,Math.min(this.hot.rowIndexMapper.getNotTrimmedIndexesLength(),e)}getAll(){let e={row:0,col:0},t={row:Math.max(this.hot.countRows()-1,0),col:Math.max(this.hot.countCols()-1,0)};return e.row-t.row!=0||this.hot.countSourceRows()?this.getRange(e,t,pY.DESTINATION_RENDERER):[]}countCachedColumns(){return this.colToPropCache.length}getRange(e,t,r){let i,n,o,s=[],l=this.tableMeta.maxRows,a=this.tableMeta.maxCols;if(0===l||0===a)return[];let h=r===pY.DESTINATION_CLIPBOARD_GENERATOR?this.getCopyable:this.get,d=Math.min(Math.max((l??1/0)-1,0),Math.max(e.row,t.row)),u=Math.min(Math.max((a??1/0)-1,0),Math.max(e.col,t.col));for(i=Math.min(e.row,t.row);i<=d;i++){o=[];let r=i>=0?this.hot.toPhysicalRow(i):i;for(n=Math.min(e.col,t.col);n<=u&&null!==r;n++)o.push(h.call(this,i,n3(this.hot,n)));null!==r&&s.push(o)}return s}getText(e,t){return pz(this.getRange(e,t,pY.DESTINATION_RENDERER))}getCopyableText(e,t){return pz(this.getRange(e,t,pY.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}}function pK(e,t,r,i,n,o,s,l){let a=e.sourceDataValidator;if(!i3(a)||!0===a(t,e,l))return;!1===e.allowInvalid&&o.setAtCell(r,n,null);let h=e.sourceDataWarningMessage;if(h){let e=s.get(h)??[];e.push({row:r,col:i,value:t,message:h}),s.set(h,e)}}let pq=new Set(["type","sourceDataValidator"]);function pX(e,t){let r=e.countSourceRows(),i=e.countSourceCols();if(0===r||0===i)return;let n=e.getSettings(),o=e._getDataSource(),s=new Map,l=function(e,t){let r=[];for(let i=0;i<t;i+=1){let t=e.columnIndexMapper.getVisualFromPhysicalIndex(i);if(null!==t){let n=e.colToProp(t);null!==n&&r.push({physicalColumn:i,visualColumn:t,sourceColumn:n})}}return r}(e,i),{fullScan:a,columns:h}=function(e,t){let r=e._getMetaManager(),i=[];for(let e=0;e<t.length;e+=1){let n=t[e],{physicalColumn:o,visualColumn:s}=n,l=r.getCellMetaUncached(0,o,{visualRow:0,visualColumn:s}),a=l.sourceDataValidator;if(i3(a)){if(!0!==a.rowIndependent)return{fullScan:!0,columns:[]};i.push({...n,cellMeta:l})}}return{fullScan:!1,columns:i}}(e,l);(a||0!==h.length||Array.isArray(n.cell)&&n.cell.length>0||e._getMetaManager().getUserDefinedCellMetas().some(({key:e})=>pq.has(e)))&&(a||Array.isArray(n.cell)&&n.cell.length>0||e._getMetaManager().getUserDefinedCellMetas().length>0?!function(e,t,r,i,n,o){let{rowIndexMapper:s}=e,l=e._getMetaManager();for(let e=0;e<r;e+=1){let r=s.getVisualFromPhysicalIndex(e);if(null===r)continue;let a=null,h=!1;for(let s=0;s<i.length;s+=1){let{physicalColumn:d,visualColumn:u,sourceColumn:c}=i[s],g=l.getCellMetaUncached(e,d,{visualRow:r,visualColumn:u});i3(g.sourceDataValidator)&&(h||(a=t.modifyRowData(e),h=!0),pK(g,t.getAtCellByProp(e,c,a),e,d,c,t,n,o))}}}(e,o,r,l,s,t):!function(e,t,r,i,n,o){for(let s=0;s<r;s+=1){if(null===i(s))continue;let r=t.modifyRowData(s);for(let i=0;i<e.length;i+=1){let{physicalColumn:l,sourceColumn:a,cellMeta:h}=e[i];pK(h,t.getAtCellByProp(s,a,r),s,l,a,t,n,o)}}}(h,o,r,t=>e.rowIndexMapper.getVisualFromPhysicalIndex(t),s,t),s.forEach((e,t)=>{pQ(t,e)}))}function pQ(e,t){!function({logFunction:e=function(...e){e$(console)&&console.log(...e)},message:t="",items:r=[],maxSample:i=5,itemFormatter:n=e=>`${e}`}={}){if(!Array.isArray(r)||0===r.length)return;let o=r.length,s=r.slice(0,i).map(e=>` - ${n(e)}`),l=o>i?` - ...and ${o-i} more`:"";e(ri(t,{itemsCount:`${o} cell${o>1?"s":""}`,affectedCells:["Affected cells:",...s,...l?[l]:[]].join("\n")}))}({logFunction:rn,message:e,items:t,itemFormatter:e=>{let{row:t,col:r,value:i}=e,n=eW(i),o=n.length>64?`${n.slice(0,64)}...`:n;return`row ${t}, col ${r}, value: "${o}"`}})}function pZ(e,t,r,i){let{hotInstance:n,dataMap:o,dataSource:s,internalSource:l,source:a,metaManager:h,firstRun:d,beforeRender:u}=i,c=n4(l),g=n.getSettings();Array.isArray(g.dataSchema)?n.dataType="array":i3(g.dataSchema)?n.dataType="function":n.dataType="object",o&&o.destroy(),e=n.runHooks(`before${c}`,e,d,a);let p=new pY(n,e,h);t(p),"object"==typeof e&&null!==e?e.push&&e.splice||(e=[e]):null===e?e=function(e,t,r){let i=t.getSchema(),n=[];for(let t=0,o=r.startRows;t<o;t++){let t;if(("object"===e.dataType||"function"===e.dataType)&&r.dataSchema)t=tS(i);else if("array"===e.dataType)t=tS(i[0]);else{t=[];for(let e=0,i=r.startCols;e<i;e++)t.push(null)}n.push(t)}return n}(n,p,g):tf(`${l} only accepts array of objects or array of arrays (${typeof e} given)`),Array.isArray(e[0])&&(n.dataType="array"),g.data=e,p.dataSource=e,s.data=e,s.dataType=n.dataType,s.colToProp=e=>p.colToProp(e),s.propToCol=e=>p.propToCol(e),s.countCachedColumns=p.countCachedColumns.bind(p);let m=e.length;r(p),function(e,t,r){let{columns:i,dataSchema:n,maxCols:o,allowInsertColumn:s}=e.getSettings(),l=Array.isArray(i)||i3(i),a=e$(n)&&null!==n;if(0===r||0===e.countSourceRows()||e.columnIndexMapper.getNumberOfIndexes()>0||l||a||0===o)return;let h=!1;for(let e=1;e<t.length&&!h;e++)h=dd([t[e]])>0;if("array"===e.dataType&&!h&&s)return;let d=h?", while later rows have fields that no column displays":"";rs(e,"replaceData.undetectableColumns",`Handsontable found no columns in the data source, so the grid displays rows with no cells. Without the \`columns\` or \`dataSchema\` option, the number of columns is read from the first row of \`data\`, and it has no fields${d}. Define the columns with the \`columns\` or \`dataSchema\` option, or start \`data\` with a row that contains every field.`)}(n,e,m),d||n._isDataWorkDeferred()||pX(n,l),n.runHooks(`after${c}`,e,d,a),d||(u(),n.runHooks("afterChange",null,l),u(),n.render()),n.getSettings().ariaTags&&rG(n.rootElement,[z(-1)])}class pJ{#oj;#oY;constructor({rowIndexMapper:e,columnIndexMapper:t}){this.#oj=e,this.#oY=t}toRenderable(e){let t="N-S"===e.getVerticalDirection()?1:-1,r="W-E"===e.getHorizontalDirection()?1:-1,i=this.#l5(e.from,t,r);if(null===i)return null;let n=this.#l5(e.to,-t,-r);if(null===n)return null;let o=e.clone();return o.from=i,o.to=n,o.includes(e.highlight)||(o.highlight=i),o}#l5(e,t,r=t){if(null===e.row||null===e.col)return null;let i=this.#l4(this.#oj,e.row,t);if(null===i)return null;let n=this.#l4(this.#oY,e.col,r);return null===n?null:e.clone().assign({row:i,col:n})}#l4(e,t,r){return t<0?t:e.getNearestNotHiddenIndex(t,r)}}function p0(e){let t=Number(e);return t>0?t:0}function p1(e,t,r){let i=0;for(;i<t&&i<e&&r(e-1-i);)i+=1;return i}class p2{#ey;#l8=null;#l9=null;#l7=0;#ae=null;#at=null;#ar=null;#lw=null;#ai=new WeakMap;#an=null;#ao=!1;constructor(e){this.#ey=e,e.addHook("beforeInit",this.#as),e.addHook("afterUpdateSettings",this.#as),e.addHook("beforeLoadData",this.#al),e.addHook("beforeUpdateData",this.#al),e.addHook("afterLoadData",this.#aa),e.addHook("afterUpdateData",this.#aa),e.columnIndexMapper.addLocalHook("indexesInserted",this.#ah),e.columnIndexMapper.addLocalHook("indexesRemoved",this.#ah)}getDeclaredIndex(e,t){if(null===this.#l8||t!==this.#at)return e;let r=this.#l8.getValueAtIndex(e);return"number"==typeof r?r:null}#as=()=>{this.#ad()};#al=()=>{this.#ao=!0,this.#ey._registerMicrotask(this.#au),this.#ad(),null!==this.#an&&(this.#ac(this.#an.declared,this.#an.values),this.#an=null),null!==this.#l8&&null!==this.#at&&this.#ac(this.#at,this.#l8.getValues().slice())};#au=()=>{this.#ao=!1};#ah=()=>{this.#ao||"object"!=typeof this.#lw||null===this.#lw||(this.#ai.delete(this.#lw),this.#an=null)};#ac(e,t){let r=this.#lw;if("object"!=typeof r||null===r)return;let i=this.#ai.get(r);void 0===i&&(i=new Map,this.#ai.set(r,i)),i.set(e,t)}#aa=e=>{this.#ao=!1,this.#lw=e;let t=this.#l8,r=this.#at,i="object"==typeof e&&null!==e?this.#ai.get(e):void 0;if(void 0!==i&&this.#ai.delete(e),null===t||null===r||void 0===i)return;let n=i.get(r);void 0!==n&&n.length===t.getLength()&&!function(e,t){if(e.length!==t.length)return!1;for(let r=0;r<e.length;r+=1)if(e[r]!==t[r])return!1;return!0}(t.getValues(),n)&&t.setValues(n)};#ad(){let e=this.#ey.getSettings().colWidths;Array.isArray(e)?this.#ag(e):this.#ap()}#ag(e){if(this.#at===e)return;null!==this.#at&&this.#ap();let t=new dx((e,r)=>{if(void 0===r)return e;if(0===r){let r=Math.min(e,t.getLength()),{columnIndexMapper:i}=this.#ey,n=e>=t.getLength()&&(i.indexesSequence.isIdentity()||function(e,t){let r=e.indexOf(t);for(let i=r+1;i<e.length;i+=1)if(e[i]<t)return!1;return!0}(i.getIndexesSequence(),r));this.#ar=n?function(e){let t=0;for(let r=0;r<e.length;r+=1){let i=e[r];"number"==typeof i&&i>=t&&(t=i+1)}return t}(t.getValues()):null}return null===this.#ar?null:this.#ar+r}),r=`colWidths.declaredIndex.${this.#l7}`;this.#l7+=1,this.#l8=t,this.#l9=r,this.#at=e,this.#ey.columnIndexMapper.registerMap(r,t),this.#ae=this.#ey.columnIndexMapper.observeMapChange(t,()=>{this.#ey.view?.invalidateColumnWidthCache()})}#ap(){null!==this.#l9&&(null!==this.#l8&&null!==this.#at&&(this.#an={declared:this.#at,values:this.#l8.getValues().slice()}),this.#ae?.(),this.#ey.columnIndexMapper.unregisterMap(this.#l9),this.#l8=null,this.#l9=null,this.#ae=null,this.#at=null)}}let p3=["rowHeights","minRowHeights"];function p6(e){let t=0;for(let r=0;r<e.length;r+=1){let i=e[r];"number"==typeof i&&i>=t&&(t=i+1)}return t}class p5{#ey;#am=new Map;#af=new Map;#l7=0;#aw=new Map;#at=new Map;#ay=null;#ar=null;#lw=null;#ai=new WeakMap;#an=new Map;#ao=!1;constructor(e){this.#ey=e,e.rowIndexMapper.addLocalHook("indexesInserted",this.#ab),e.rowIndexMapper.addLocalHook("indexesRemoved",this.#aC),e.addHook("beforeInit",this.#as),e.addHook("afterUpdateSettings",this.#as),e.addHook("beforeLoadData",this.#al),e.addHook("beforeUpdateData",this.#al),e.addHook("afterLoadData",this.#aa),e.addHook("afterUpdateData",this.#aa)}getDeclaredIndex(e,t){let r=this.#am.get(e);if(void 0===r)return t;let i=r.getValueAtIndex(t);return"number"==typeof i?i:null}alignInsertedRows(e,t){let r=this.#ay;this.#ay=null,null===r||r===e||t<=0||this.#am.forEach(i=>{let n=i.getValues(),o=Math.min(r,n.length-t),s=n.slice(0,o).concat(n.slice(o+t)),l=e+t>=n.length,a=l?p6(s):0,h=Array(t);for(let e=0;e<t;e+=1)h[e]=l?a+e:null;i.setValues(s.slice(0,e).concat(h,s.slice(e)))})}readOrigins(){if(0===this.#am.size)return null;let e=new Map;return this.#am.forEach((t,r)=>e.set(r,t.getValues().slice())),e}writeOrigins(e){e.forEach((e,t)=>{this.#am.get(t)?.setValues(e)})}#ab=(e,t)=>{if(this.#aC(),this.#ay=null,this.#ar=null,0===e.length||0===this.#am.size)return;let r=this.#ey.rowIndexMapper.getNumberOfIndexes()-e.length,i=Math.min(e[0]+ +("end"===t),r),n=i>=r&&function(e,t){let r=e.indexOf(t);for(let i=r+1;i<e.length;i+=1)if(e[i]<t)return!1;return!0}(this.#ey.rowIndexMapper.getIndexesSequence(),i);this.#ay=i,this.#ar=new Map,this.#am.forEach((e,t)=>{n&&this.#ar.set(t,p6(e.getValues()))})};#aC=()=>{this.#ao||"object"!=typeof this.#lw||null===this.#lw||(this.#ai.delete(this.#lw),this.#an.clear())};#al=()=>{this.#ao=!0,this.#an.forEach(({declared:e,values:t},r)=>this.#ac(r,e,t)),this.#an.clear(),this.#aS()};#as=()=>{let e=this.#ey.getSettings();p3.forEach(t=>{let r=e[t];Array.isArray(r)?this.#ag(t,r):this.#ap(t)})};#aS(){this.#am.forEach((e,t)=>{let r=this.#at.get(t);void 0!==r&&this.#ac(t,r,e.getValues().slice())})}#aa=e=>{this.#ao=!1,this.#lw=e,this.#am.forEach((e,t)=>this.#av(t)),"object"==typeof e&&null!==e&&this.#ai.delete(e)};#ac(e,t,r){let i=this.#lw;if("object"!=typeof i||null===i)return;let n=this.#ai.get(i);void 0===n&&(n=new Map,this.#ai.set(i,n));let o=n.get(e);void 0===o&&(o=new Map,n.set(e,o)),o.set(t,r)}#av(e){let t=this.#am.get(e),r=this.#at.get(e),i=this.#lw,n="object"==typeof i&&null!==i?this.#ai.get(i)?.get(e):void 0;if(void 0===t||void 0===r||void 0===n)return;let o=n.get(r);void 0!==o&&o.length===t.getLength()&&t.setValues(o)}#ag(e,t){let r=this.#at.get(e);if(r===t)return;void 0!==r&&this.#ap(e);let i=new dx((t,r)=>{if(void 0===r)return t;let i=this.#ar?.get(e);return void 0===i?null:i+r}),n=`${e}.declaredIndex.${this.#l7}`;this.#l7+=1,this.#am.set(e,i),this.#af.set(e,n),this.#at.set(e,t),this.#ey.rowIndexMapper.registerMap(n,i),this.#aw.set(e,this.#ey.rowIndexMapper.observeMapChange(i,()=>{this.#ey.view?.invalidateRowHeightCache()}))}#ap(e){let t=this.#af.get(e);if(void 0===t)return;let r=this.#am.get(e),i=this.#at.get(e);void 0!==r&&void 0!==i&&this.#an.set(e,{declared:i,values:r.getValues().slice()}),this.#aw.get(e)?.(),this.#ey.rowIndexMapper.unregisterMap(t),this.#am.delete(e),this.#af.delete(e),this.#aw.delete(e),this.#at.delete(e)}}function p4(e,t,r,i=!1){for(let n=0;n<r;n+=1){let r=e.props[n],o=t.props[n];if(r!==o&&!(i&&"function"==typeof r&&"function"==typeof o))return!1}return!0}let p8=Object.freeze({CELL:"cell",MIXED:"mixed"});class p9{#ey;#aR=null;#aE=!1;#aT;#ax=1;#aA=null;#aM=new Map;#aI=null;#aN=!1;#aO=new Set;constructor(e){this.#ey=e}init(){let e=this.#ey.getSettings();this.#aT=e.imeFastEdit?p8.MIXED:p8.CELL,this.#ey.addHook("afterUpdateSettings",(...e)=>this.#ak(e[0])),this.#ey.addHook("afterSelection",(...e)=>this.#aH()),this.#ey.addHook("afterSelectionFocusSet",(...e)=>this.#aH()),this.#ey.addHook("afterSelectionEnd",(...e)=>this.#a_()),this.#ey.addHook("afterRender",(...e)=>this.#aP()),this.#aR=new n2(this.#ey);let t=[this.#ey.rootWrapperElement??this.#ey.rootElement,this.#ey.rootPortalElement].filter(e=>iG(e));t.forEach(e=>{this.#aR.addEventListener(e,"focusin",()=>{this.#aE=!0}),this.#aR.addEventListener(e,"focusout",e=>{let r=e.relatedTarget;this.#aE=iG(r)&&t.some(e=>e.contains(r))})})}hasBrowserFocus(){return this.#aE}registerOutsideClickExemptElement(e){this.#aO.add(e)}unregisterOutsideClickExemptElement(e){this.#aO.delete(e)}isPathOutsideClickExempt(e){return 0!==this.#aO.size&&e.some(e=>iG(e)&&this.#aO.has(e))}isForeignFocusTarget(e){let{rootElement:t,rootWrapperElement:r,rootPortalElement:i,rootDocument:n}=this.#ey,o=!!r&&r.contains(e)&&!t.contains(e);return!(null===e||e===n.body||e===n.documentElement||rx(e,t)||o||i&&i.contains(e))&&!iX(t).includes(e)}getFocusMode(){return this.#aT}setFocusMode(e){Object.values(p8).includes(e)?this.#aT=e:rn(`"${e}" is not a valid focus mode.`)}getRefocusDelay(){return this.#ax}setRefocusDelay(e){this.#ax=e}setRefocusElementGetter(e){this.#aA=e}suspend(){this.#aN=!0}resume(){this.#aN=!1}getRefocusElement(){return"function"==typeof this.#aA?this.#aA():this.#ey.getActiveEditor()?.TEXTAREA}focusElement(e,t){return!!iG(e)&&!!e.isConnected&&(e.focus(t),!0)}focusOnHighlightedCell(e){let t=e=>{let t=this.#ey.getSelectedRangeActive()?.highlight;if(!t)return;let r=this.#ey.runHooks("modifyFocusedElement",t.row,t.col,e);iG(r)||(r=e),r&&!this.#ey.getActiveEditor()?.isOpened?.()&&this.focusElement(r,{preventScroll:!0})};e?t(e):this.#aD(e=>t(e))}refocusToEditorTextarea(e=this.#ax){this.#ey.getSettings().imeFastEdit&&!this.#ey.getActiveEditor()?.isOpened?.()&&(this.#ey.getActiveEditor()?.refreshValue?.(),this.#aM.has(e)||this.#aM.set(e,i4(()=>{if(!this.#ey.isDestroyed){let e=this.getRefocusElement();e&&this.focusElement(e,{preventScroll:!0})&&"function"==typeof e.select&&e.select()}},e)),this.#aM.get(e)())}#aD(e){let t=this.#ey.getSelectedRangeActive()?.highlight;if(!t||!this.#ey.selection.isCellVisible(t)||null===t.row||null===t.col)return void e(null);let{row:r,col:i}=t,n=this.#ey.getCell(r,i,!0);null===n?this.#ey.addHookOnce("afterScroll",()=>{e(this.#ey.getCell(r,i,!0))}):e(n)}#aL(e){this.#aD(t=>{let r=iQ(this.#ey.rootDocument),i=iG(r)?r:null;e&&i&&iF(i)||(i&&iF(i)&&i.blur(),this.focusOnHighlightedCell(t))})}#a_(){if(this.#aN){let e=iQ(this.#ey.rootDocument),t=iG(e)?e:null;if(t&&iF(t))return}this.#aD(e=>{this.getFocusMode()===p8.MIXED&&e?.nodeName==="TD"&&this.refocusToEditorTextarea()})}#aH(){this.#aI=this.#aN}#aP(){let e=this.#aI;null===e||this.#ey.isDestroyed||(this.#aI=null,this.#aL(e))}#ak(e){"boolean"==typeof e.imeFastEdit&&this.setFocusMode(e.imeFastEdit?p8.MIXED:p8.CELL)}}let p7=Object.freeze({INLINE:"inline",MODAL:"modal"}),me=Object.freeze({UNKNOWN:"unknown",CLICK:"click",TAB_FROM_ABOVE:"tab_from_above",TAB_FROM_BELOW:"tab_from_below"});function mt(e,t){let r=e.rootDocument.createElement("div");return r.style.display="none",r.classList.add("htFocusCatcher"),r.dataset.htFocusSource=t,r}function mr(e){let{rowIndexMapper:t,columnIndexMapper:r}=e,{navigableHeaders:i}=e.getSettings(),n=i&&e.countColHeaders()>0?-e.countColHeaders():0,o=i&&e.countRowHeaders()>0?-e.countRowHeaders():0,s=0===n?t.getVisualFromRenderableIndex(n):n,l=0===o?r.getVisualFromRenderableIndex(o):o;return null===s||null===l?null:e._createCellCoords(s,l)}function mi(e){let{rowIndexMapper:t,columnIndexMapper:r}=e,{navigableHeaders:i}=e.getSettings(),n=t.getRenderableIndexesLength()-1,o=r.getRenderableIndexesLength()-1;if(n<0){if(!i||0===e.countColHeaders())return null;n=-1}if(o<0){if(!i||0===e.countColHeaders())return null;o=-1}return e._createCellCoords(t.getVisualFromRenderableIndex(n)??n,r.getVisualFromRenderableIndex(o)??o)}let mn="gridDefault",mo=[["Control/Meta","C"],["Control/Meta","X"],["Control/Meta","V"]],ms="grid.tabNavigation",ml="editorManager.handlingEditor";function ma(e){return e.countRenderedRows()>0&&e.countRenderedCols()>0}function mh(e){return!!sC(e)&&e.getFocusScopeManager().isGridBodyCovered()}function md(e){return ma(e)&&!mh(e)}function mu(e){let{navigableHeaders:t}=e.getSettings();return mh(e)?!0===t&&e.getSelectedRangeActive()?.highlight.isHeader()===!0:!0===t||ma(e)}let mc=new WeakMap;function mg(e){let t=mc.get(e);return void 0===t&&(t={coords:void 0,leftByTab:!1},mc.set(e,t)),t}function mp(e){return mg(e).coords}function mm(e,t){mg(e).coords=t}function mf(e,t){mg(e).leftByTab=t}function mw(e){let t=t=>{if(!t)return null;let{rowIndexMapper:r,columnIndexMapper:i}=e;if(r.isHidden(t.row)||i.isHidden(t.col))return null;let n=mr(e),o=mi(e);return null===n||null===o?null:(t.row=oB(t.row,n.row??t.row,o.row??t.row),t.col=oB(t.col,n.col??t.col,o.col??t.col),t)},r={wrapped:!1,flipped:!1},i=!0,n=!1,o=!1;e.addHook("afterSelection",()=>{mf(e,!1),i&&mm(e,e.getSelectedRangeActive()?.highlight)}),e.addHook("afterDeselect",()=>{mf(e,o)}),e.addHook("afterDocumentKeyDown",()=>{o=!1}),e.addHook("afterLoadData",()=>{mm(e,void 0),mf(e,!1)}),e.addHook("beforeRowWrap",(e,t,i)=>{r.wrapped=!0,r.flipped=i}),e.addHook("beforeEmptyDataStateShow",()=>{n=!0}),e.addHook("beforeEmptyDataStateHide",()=>{n=!1});let s=e.getShortcutManager().getContext("grid");s?.addShortcuts([{keys:[["Tab"],["Shift","Tab"]],preventDefault:!1,stopPropagation:!1,relativeToGroup:mn,group:ms,position:"before",callback(){let{tabNavigation:t}=e.getSettings();o=!0,e.getSelectedRangeActive()&&!t&&(i=!1)}},{keys:[["Tab"],["Shift","Tab"]],preventDefault:!1,stopPropagation:!1,relativeToGroup:mn,group:ms,callback(t){let{tabNavigation:n,autoWrapRow:o}=e.getSettings();if(i=!0,!n||!e.selection.isSelected()||o&&r.wrapped&&r.flipped||!o&&r.wrapped){if(o&&r.wrapped&&r.flipped){let r=t.shiftKey?mr(e):mi(e);mm(e,r)}r.wrapped=!1,r.flipped=!1}},position:"after"}]);let l=e.rootGridContentElement??e.rootElement;e.getFocusScopeManager().registerScope("grid",l,{contains:t=>!!(l===t||l.contains(t))||null===t.closest(".htMenu")&&e.rootPortalElement.contains(t),runOnlyIf:()=>{let{navigableHeaders:t}=e.getSettings();return!((n||!t)&&0===e.countRenderedRows()&&0===e.countRenderedCols()&&e.countRowHeaders()>0&&e.countColHeaders()>0)&&!!(!t&&ma(e)||t&&(e.countRowHeaders()>0||e.countColHeaders()>0))},onActivate:r=>{if("tab_from_above"===r){let r=t(mp(e))??mr(e);if(r){let t=e.runHooks("modifyFocusOnTabNavigation","from_above",r),{row:i,col:n}=r;!1!==t&&null!==i&&null!==n&&(e.selectCell(i,n),e.getFocusManager().focusOnHighlightedCell())}}else if("tab_from_below"===r){let r=t(mp(e))??mi(e);if(r){let t=e.runHooks("modifyFocusOnTabNavigation","from_below",r),{row:i,col:n}=r;!1!==t&&null!==i&&null!==n&&e.selectCell(i,n)}}}})}let my=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"]]),mb=e=>e.map(e=>{let t=e.toLowerCase();return my.has(t)?my.get(t)??t:t}).sort((e,t)=>e.localeCompare(t)).join("+"),mC=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"]]),mS=({which:e,key:t})=>{if(mC.has(e))return mC.get(e)??t.toLowerCase();let r=String.fromCharCode(e).toLowerCase();return/^[a-z0-9]$/.test(r)?r:t.toLowerCase()},mv=["meta","alt","shift","control"],mR=(e,t=!1)=>{let r=[];return e.altKey&&r.push("alt"),t&&(e.ctrlKey||e.metaKey)?r.push("control/meta"):(e.ctrlKey&&r.push("control"),e.metaKey&&r.push("meta")),e.shiftKey&&r.push("shift"),r},mE=(e,t)=>{if("string"!=typeof e.key)return[];let r=mS(e),i=mv.includes(r),n=i?[]:mR(e),o=[[r].concat(n)];return!i&&("function"==typeof t&&t()?n.includes("meta"):n.includes("control"))&&o.push([r].concat(mR(e,!0))),o},mT=Symbol("shortcut-context");function mx(e){return tx(e)&&e.__kindOf===mT}let mA=(e,t)=>e.relativeToGroup===t&&"before"===e.position,mM=(n=new Set,{press(e){n.add(e)},release(e){n.delete(e)},setPressed(e,t){t?n.add(e):n.delete(e)},releaseAll(){n.clear()},isPressed:e=>n.has(e)}),mI=new WeakMap,mN=e=>{mM.setPressed("alt",e.altKey),mM.setPressed("control",e.ctrlKey),mM.setPressed("meta",e.metaKey),mM.setPressed("shift",e.shiftKey)},mO=e=>{if("string"==typeof e.key){mN(e);let t=mS(e);mv.includes(t)&&mM.press(t)}},mk=e=>{if("string"==typeof e.key){mN(e);let t=mS(e);mv.includes(t)&&mM.release(t)}};function mH(e){let t=e.countCols(),r=e.view.countFixedColumnsEnd(),i=e.columnIndexMapper.getNearestNotHiddenIndex(t-r-1,-1);return 0===r||null!==i&&i>=e.view.countFixedColumnsStart()?i:null}let m_={name:"selectAllCells",callback({selection:e}){e.markSource("keyboard"),e.selectAll(!0,!0,{disableHeadersHighlight:!0}),e.markEndSource()}},mP="ht-link",mD="ht-link-scheme",mL=/^mailto:/i,mF=/^tel:/i;function mB(e,{href:t,target:r,classNames:i=[]}){let n=e.createElement("a");return n.className=[mP,...i.map(e=>e.trim()).filter(e=>""!==e)].join(" "),n.href=t,n.target=r,n.rel="noopener noreferrer",n.tabIndex=-1,n}function mV(e,t){let r=r2(e);for(;r.firstChild;)t.appendChild(r.firstChild);r.appendChild(t)}function mz(e){let t;if("mailto:"===e.protocol)t=mL;else{if("tel:"!==e.protocol)return!1;t=mF}let r=e.ownerDocument,i=r.createTreeWalker(e,NodeFilter.SHOW_TEXT),n=null,o=i.nextNode();for(;null!==o;){if(/\S/.test(o.data)){n=o;break}o=i.nextNode()}if(null===n||!t.test(n.data.trimStart()))return!1;let s=n.data.length-n.data.trimStart().length,l=s>0?n.splitText(s):n;l.splitText(e.protocol.length);let a=r.createElement("span");return a.className=mD,l.parentNode?.insertBefore(a,l),a.appendChild(l),!0}function mU(e,t){if(null===e.firstElementChild)return 0;let r=new Set,i=0;for(let n of Array.from(e.querySelectorAll(t))){if(!e.contains(n))continue;let t=function(e){let{parentNode:t}=e;for(;e.firstChild;)t?.insertBefore(e.firstChild,e);return e.remove(),t}(n);null!==t&&r.add(t),i+=1}return r.forEach(e=>e.normalize()),i}function mW(e){let t=e.getSelectedRangeActive()?.highlight;return t&&t.isCell()&&null!==t.row&&null!==t.col?e.getCell(t.row,t.col)?.querySelector(`a.${mP}`)??null:null}let m$=[{name:"editorCloseAndSave",callback(e){e._getEditorManager().closeEditorAndSaveChanges()}},{name:"editorCloseAndSaveByArrowKeys",callback(e,t,r){let i=e._getEditorManager(),n=i.getActiveEditor();if(!n?.isInFullEditMode()||n?.state!==nJ.EDITING){if(i.closeEditorAndSaveChanges(),e.isDestroyed)return void t.preventDefault();e.getSelected()&&(r.includes("arrowdown")?e.selection.transformStart(1,0):r.includes("arrowup")?e.selection.transformStart(-1,0):r.includes("arrowleft")?e.selection.transformStart(0,-1*e.getDirectionFactor()):r.includes("arrowright")&&e.selection.transformStart(0,e.getDirectionFactor())),t.preventDefault()}}},{name:"editorCloseAndSaveByEnter",callback(e,t){let r=e._getEditorManager();r.closeEditorAndSaveChanges(t.ctrlKey||t.metaKey),e.isDestroyed||r.moveSelectionAfterEnter(t)}},{name:"editorCloseWithoutSaving",callback(e){let t=e._getEditorManager();t.closeEditorAndRestoreOriginalValue(e.getShortcutManager().isCtrlPressed()),t.activeEditor?.focus()}},{name:"editorFastOpen",callback(e,t){let r=e.getSelectedRangeActive()?.highlight;r?.isHeader()||e._getEditorManager().openEditor(null,t,!0)}},{name:"editorOpen",callback(e,t,r){let{selection:i}=e,n=e._getEditorManager(),o=e.getSelectedRange(),s=e.getSelectedRangeActive(),l=s?.highlight;if((o?.some(e=>i.isMultiple(e))||(o?.length??0)>1)&&!s?.isHeader()&&ma(e)){let n=e.getSettings(),o="function"==typeof n.enterMoves?n.enterMoves(t):n.enterMoves;r.includes("shift")?i.transformFocus(-(o?.row??0),-(o?.col??0)):i.transformFocus(o?.row??0,o?.col??0);return}l?.isHeader()||(e.getSettings().enterBeginsEditing?(n.openEditor(null,t,!0),!n.isEditorOpened()&&n.cellProperties?.readOnly&&n.moveSelectionAfterEnter(t)):n.moveSelectionAfterEnter(t),nh(t))}},{name:"extendCellsSelectionDown",callback(e){let{selection:t}=e,r=e.getSelectedRangeActive()?.highlight;!t.isSelectedByColumnHeader()&&!t.isSelectedByCorner()&&(r?.isCell()||r?.isHeader()&&t.isSelectedByRowHeader())&&(t.markSource("keyboard"),t.transformEnd(1,0),t.markEndSource())}},{name:"extendCellsSelectionDownByViewportHeight",callback(e){let{selection:t,rowIndexMapper:r}=e,i=e.getSelectedRangeActive();if(!i)return;let{to:n}=i,o=n.row??0,s=Math.min(o+e.countVisibleRows(),e.countRows()-1),l=r.getNearestNotHiddenIndex(s,-1);if(null!==l){let r=e._createCellCoords(l,n.col??0),i=o-(e.getFirstFullyVisibleRow()??0),s=Math.min((r.row??0)-i,e.countRows()-1);t.markSource("keyboard"),t.setRangeEnd(r,e.getActiveSelectionLayerIndex()),t.markEndSource(),e.scrollViewportTo({row:s,verticalSnap:"top",horizontalSnap:"start"})}}},{name:"extendCellsSelectionLeft",callback(e){let{selection:t}=e,r=e.getSelectedRangeActive()?.highlight;!t.isSelectedByRowHeader()&&!t.isSelectedByCorner()&&(r?.isCell()||r?.isHeader()&&t.isSelectedByColumnHeader())&&(t.markSource("keyboard"),t.transformEnd(0,-1*e.getDirectionFactor()),t.markEndSource())}},{name:"extendCellsSelectionRight",callback(e){let{selection:t}=e,r=e.getSelectedRangeActive()?.highlight;!t.isSelectedByRowHeader()&&!t.isSelectedByCorner()&&(r?.isCell()||r?.isHeader()&&t.isSelectedByColumnHeader())&&(t.markSource("keyboard"),t.transformEnd(0,e.getDirectionFactor()),t.markEndSource())}},{name:"extendCellsSelectionToColumns",callback(e){let{selection:t}=e,r=e.getSelectedRangeActive();if(!r)return;let{highlight:i,from:n,to:o}=r;t.markSource("keyboard"),t.isSelectedByRowHeader()?t.selectAll(!0,!0):e.selectColumns(n.col??0,o.col??0,i),t.markEndSource()}},{name:"extendCellsSelectionToMostBottom",callback(e){let{selection:t,rowIndexMapper:r}=e,i=e.getSelectedRangeActive();if(!i)return;let{highlight:n,from:o,to:s}=i,l=n.isHeader()&&t.isSelectedByRowHeader();if(n.isCell()||l){let i=r.getNearestNotHiddenIndex(e.countRows()-1,-1),a=o.clone();a.row=n.row,t.markSource("keyboard"),t.setRangeStart(a,void 0,!1,n.clone()),l&&t.selectedByRowHeader.add(t.getLayerLevel()),t.setRangeEnd(e._createCellCoords(i??0,s.col??0)),t.markEndSource()}}},{name:"extendCellsSelectionToMostInlineEnd",callback(e){let{selection:t}=e,r=e.getSelectedRangeActive();if(!r)return;let{highlight:i,from:n,to:o}=r;if(!t.isSelectedByRowHeader()&&!t.isSelectedByCorner()&&i.isCell()){let r=mH(e);if(null===r&&(e.getSettings().fixedColumnsEnd??0)>0)return;let s=n.clone();s.col=i.col,t.markSource("keyboard"),t.setRangeStart(s,void 0,!1,i.clone()),t.setRangeEnd(e._createCellCoords(o.row??0,r??0)),t.markEndSource()}}},{name:"extendCellsSelectionToMostInlineStart",callback(e){let{selection:t,columnIndexMapper:r}=e,i=e.getSelectedRangeActive();if(!i)return;let{highlight:n,from:o,to:s}=i;if(!t.isSelectedByRowHeader()&&!t.isSelectedByCorner()&&n.isCell()){let i=e.view.countFixedColumnsStart(),l=r.getNearestNotHiddenIndex(i,1),a=o.clone();a.col=n.col,t.markSource("keyboard"),t.setRangeStart(a,void 0,!1,n.clone()),t.setRangeEnd(e._createCellCoords(s.row??0,l??0)),t.markEndSource()}}},{name:"extendCellsSelectionToMostLeft",callback(e){let{selection:t,columnIndexMapper:r}=e,i=e.getSelectedRangeActive();if(!i)return;let{highlight:n,from:o,to:s}=i,l=n.isHeader()&&t.isSelectedByColumnHeader();if(n.isCell()||l){let i=e.isRtl()?r.getNearestNotHiddenIndex(e.countCols()-1,-1):r.getNearestNotHiddenIndex(0,1),a=o.clone();a.col=n.col,t.markSource("keyboard"),t.setRangeStart(a,void 0,!1,n.clone()),l&&t.selectedByColumnHeader.add(t.getLayerLevel()),t.setRangeEnd(e._createCellCoords(s.row??0,i??0)),t.markEndSource()}}},{name:"extendCellsSelectionToMostRight",callback(e){let{selection:t,columnIndexMapper:r}=e,i=e.getSelectedRangeActive();if(!i)return;let{highlight:n,from:o,to:s}=i,l=n.isHeader()&&t.isSelectedByColumnHeader();if(n.isCell()||l){let i=e.isRtl()?r.getNearestNotHiddenIndex(0,1):r.getNearestNotHiddenIndex(e.countCols()-1,-1),a=o.clone();a.col=n.col,t.markSource("keyboard"),t.setRangeStart(a,void 0,!1,n.clone()),l&&t.selectedByColumnHeader.add(t.getLayerLevel()),t.setRangeEnd(e._createCellCoords(s.row??0,i??0)),t.markEndSource()}}},{name:"extendCellsSelectionToMostTop",callback(e){let{selection:t,rowIndexMapper:r}=e,i=e.getSelectedRangeActive();if(!i)return;let{highlight:n,from:o,to:s}=i,l=n.isHeader()&&t.isSelectedByRowHeader();if(n.isCell()||l){let i=r.getNearestNotHiddenIndex(0,1),a=o.clone();a.row=n.row,t.markSource("keyboard"),t.setRangeStart(a,void 0,!1,n.clone()),l&&t.selectedByRowHeader.add(t.getLayerLevel()),t.setRangeEnd(e._createCellCoords(i??0,s.col??0)),t.markEndSource()}}},{name:"extendCellsSelectionToRows",callback(e){let{selection:t}=e,r=e.getSelectedRangeActive();if(!r)return void t.markEndSource();let{highlight:i,from:n,to:o}=r;t.markSource("keyboard"),t.isSelectedByColumnHeader()?t.selectAll(!0,!0):e.selectRows(n.row??0,o.row??0,i),t.markEndSource()}},{name:"extendCellsSelectionUp",callback(e){let{selection:t}=e,r=e.getSelectedRangeActive()?.highlight;!t.isSelectedByColumnHeader()&&!t.isSelectedByCorner()&&(r?.isCell()||r?.isHeader()&&t.isSelectedByRowHeader())&&(t.markSource("keyboard"),t.transformEnd(-1,0),t.markEndSource())}},{name:"extendCellsSelectionUpByViewportHeight",callback(e){let{selection:t,rowIndexMapper:r}=e,i=e.getSelectedRangeActive();if(!i)return;let{to:n}=i,o=n.row??0,s=Math.max(o-e.countVisibleRows(),0),l=r.getNearestNotHiddenIndex(s,1);if(null!==l){let r=e._createCellCoords(l,n.col??0),i=o-(e.getFirstFullyVisibleRow()??0),s=Math.max((r.row??0)-i,0);t.markSource("keyboard"),t.setRangeEnd(r,e.getActiveSelectionLayerIndex()),t.markEndSource(),e.scrollViewportTo({row:s,verticalSnap:"top",horizontalSnap:"start"})}}},{name:"moveCellSelectionDown",callback({selection:e}){e.markSource("keyboard"),e.transformStart(1,0),e.markEndSource()}},{name:"moveCellSelectionDownByViewportHeight",callback(e){let{selection:t}=e,{navigableHeaders:r}=e.getSettings(),i=r?e.countColHeaders():0,n=e.getSelectedRangeActive()?.highlight.row??0,o=e.countVisibleRows()+i;o=0===o?1:o,n===e.countRows()-1?o=1:n+o>e.countRows()&&(o=e.countRows()-n-1),t.markSource("keyboard"),t.transformStart(o,0),t.markEndSource();let s=e.view.countFixedRowsBottom(),l=e.countRows(),a=e.getSelectedRangeActive()?.highlight.row??0;a<0?e.scrollViewportTo({row:0}):s>0&&a>=l-s&&e.scrollViewportTo({row:l-s-1,verticalSnap:"bottom"})}},{name:"moveCellSelectionInlineEnd",callback(e,t){let{selection:r}=e,i=e.getSettings(),n=e.getSelectedRange(),o=e.getSelectedRangeActive(),s="function"==typeof i.tabMoves?i.tabMoves(t):i.tabMoves;r.markSource("keyboard"),r.markTabNavigation(),(n?.some(e=>r.isMultiple(e))||(n?.length??0)>1)&&!o?.isHeader()&&ma(e)?r.transformFocus(-(s?.row??0),-(s?.col??0)):r.transformStart(-(s?.row??0),-(s?.col??0)),r.markEndSource()}},{name:"moveCellSelectionInlineStart",callback(e,t){let{selection:r}=e,i=e.getSettings(),n=e.getSelectedRange(),o=e.getSelectedRangeActive(),s="function"==typeof i.tabMoves?i.tabMoves(t):i.tabMoves;r.markSource("keyboard"),r.markTabNavigation(),(n?.some(e=>r.isMultiple(e))||(n?.length??0)>1)&&!o?.isHeader()&&ma(e)?r.transformFocus(s?.row??0,s?.col??0):r.transformStart(s?.row??0,s?.col??0),r.markEndSource()}},{name:"moveCellSelectionLeft",callback(e){let{selection:t}=e;t.markSource("keyboard"),t.transformStart(0,-1*e.getDirectionFactor()),t.markEndSource()}},{name:"moveCellSelectionRight",callback(e){let{selection:t}=e;t.markSource("keyboard"),t.transformStart(0,e.getDirectionFactor()),t.markEndSource()}},{name:"moveCellSelectionToMostBottom",callback(e){let{selection:t}=e,r=e.getSelectedRangeActive()?.highlight.col??0,i=e.rowIndexMapper.getNearestNotHiddenIndex(e.countRows()-1,-1);null===i&&(i=-1),t.setRangeStart(e._createCellCoords(i,r))}},{name:"moveCellSelectionToMostBottomInlineEnd",callback(e){let{selection:t,rowIndexMapper:r}=e,i=e.view.countFixedRowsBottom(),n=r.getNearestNotHiddenIndex(e.countRows()-i-1,-1),o=mH(e);null===o&&(e.getSettings().fixedColumnsEnd??0)>0||(t.markSource("keyboard"),t.setRangeStart(e._createCellCoords(n??-1,o??-1)),t.markEndSource())}},{name:"moveCellSelectionToMostInlineEnd",callback(e){let{selection:t}=e,r=mH(e);null===r&&(e.getSettings().fixedColumnsEnd??0)>0||(t.markSource("keyboard"),t.setRangeStart(e._createCellCoords(e.getSelectedRangeActive()?.highlight.row??0,r??0)),t.markEndSource())}},{name:"moveCellSelectionToMostInlineStart",callback(e){let{selection:t,columnIndexMapper:r}=e,i=e.view.countFixedColumnsStart(),n=e.getSelectedRangeActive()?.highlight.row??0,o=r.getNearestNotHiddenIndex(i,1);t.markSource("keyboard"),t.setRangeStart(e._createCellCoords(n,o??0)),t.markEndSource()}},{name:"moveCellSelectionToMostLeft",callback(e){let{selection:t,columnIndexMapper:r}=e,i=e.getSelectedRangeActive()?.highlight.row??0,n=e.isRtl()?r.getNearestNotHiddenIndex(e.countCols()-1,-1):r.getNearestNotHiddenIndex(0,1);null===n&&(n=e.isRtl()?-1:-e.countRowHeaders()),t.markSource("keyboard"),t.setRangeStart(e._createCellCoords(i,n)),t.markEndSource()}},{name:"moveCellSelectionToMostRight",callback(e){let{selection:t,columnIndexMapper:r}=e,i=e.getSelectedRangeActive()?.highlight.row??0,n=e.isRtl()?r.getNearestNotHiddenIndex(0,1):r.getNearestNotHiddenIndex(e.countCols()-1,-1);null===n&&(n=e.isRtl()?-e.countRowHeaders():-1),t.markSource("keyboard"),t.setRangeStart(e._createCellCoords(i,n)),t.markEndSource()}},{name:"moveCellSelectionToMostTop",callback(e){let{selection:t}=e,r=e.getSelectedRangeActive()?.highlight.col??0,i=e.rowIndexMapper.getNearestNotHiddenIndex(0,1);null===i&&(i=-e.countColHeaders()),t.markSource("keyboard"),t.setRangeStart(e._createCellCoords(i,r)),t.markEndSource()}},{name:"moveCellSelectionToMostTopInlineStart",callback(e){let{selection:t,rowIndexMapper:r,columnIndexMapper:i}=e,n=e.view.countFixedRowsTop(),o=e.view.countFixedColumnsStart(),s=r.getNearestNotHiddenIndex(n,1),l=i.getNearestNotHiddenIndex(o,1);t.markSource("keyboard"),t.setRangeStart(e._createCellCoords(s??0,l??0)),t.markEndSource()}},{name:"moveCellSelectionUp",callback({selection:e}){e.markSource("keyboard"),e.transformStart(-1,0),e.markEndSource()}},{name:"moveCellSelectionUpByViewportHight",callback(e){let{selection:t}=e,{navigableHeaders:r}=e.getSettings(),i=r?e.countColHeaders():0,n=e.getSelectedRangeActive()?.highlight.row??0,o=e.countVisibleRows()+i;o=0===o?-1:-o,n===-i?o=-1:n+o<i&&(o=-(n+i)),t.markSource("keyboard"),t.transformStart(o,0),t.markEndSource();let s=e.view.countFixedRowsTop();(e.getSelectedRangeActive()?.highlight.row??0)<s&&e.scrollViewportTo({row:s,verticalSnap:"top"})}},{name:"emptySelectedCells",callback(e){e.emptySelectedCells(),e.isDestroyed||e._getEditorManager().prepareEditor()}},{name:"scrollToFocusedCell",callback(e){let t=e.getSelectedRangeActive()?.highlight;if(!t)return;let r=e.getFirstFullyVisibleRow()-1,i=e.getFirstFullyVisibleColumn()-1,n=e.getLastFullyVisibleRow()+1,o=e.getLastFullyVisibleColumn()+1,s=e._createCellCoords(r,i),l=e._createCellCoords(n,o);if(!e._createCellRange(s,s,l).includes(t)&&((t.row??-1)>=0||(t.col??-1)>=0)){let r={};if((t.col??-1)>=0){let i=Math.floor(e.countVisibleCols()/2);r.col=Math.max((t.col??0)-i,0)}if((t.row??-1)>=0){let i=Math.floor(e.countVisibleRows()/2);r.row=Math.max((t.row??0)-i,0)}e.scrollViewportTo({...r,verticalSnap:"top",horizontalSnap:"start"})}}},m_,{name:"selectAllCellsAndHeaders",callback({selection:e}){e.markSource("keyboard"),e.selectAll(!0,!0,{disableHeadersHighlight:!1}),e.markEndSource()}},{name:"populateSelectedCellsData",callback(e){let t=e.getSelectedRange();if(!t?.length)return;let r=(e.getSelectedRangeActive()??t[t.length-1]).highlight.normalize(),i=r.row??0,n=r.col??0,o=nj(e,e.getDataAtCell(i,n),t,i,n);o.length>0&&e.setDataAtCell(o)}},{name:"tabNavigation",callback(e){let t={wrapped:!1,flipped:!1},r=!1,i=!1;return e.addHook("afterSelection",(e,n,o,s,l)=>{r&&(t.wrapped&&t.flipped||i)&&(i=!1,l.value=!0)}),e.addHook("beforeRowWrap",(e,r,i)=>{t.wrapped=!0,t.flipped=i}),{before(){let{tabNavigation:t}=e.getSettings();r=!0,t||(i=!0)},after(i){let{tabNavigation:n,autoWrapRow:o}=e.getSettings();if(r=!1,!n||!mu(e)||!e.selection.isSelected()||o&&t.wrapped&&t.flipped||!o&&t.wrapped)return t.wrapped=!1,t.flipped=!1,e.deselectCell(),!1;i.preventDefault()}}}},{name:"openCellLink",callback(e){let t=mW(e);null!==t&&e.rootWindow.open(t.href,t.target||"_blank","noopener,noreferrer")}}];function mG(e){let t={};return m$.forEach(({name:r,callback:i})=>{t[r]=(...t)=>i(e,...t)}),t}function mj(e){let t=e.getShortcutManager().addContext("editor"),r=mG(e);t.addShortcuts([{keys:[["Enter"],["Enter","Shift"]],callback:(e,t)=>r.editorCloseAndSaveByEnter(e,t)},{keys:[["Enter","Control/Meta"],["Enter","Control/Meta","Shift"]],captureCtrl:!0,callback:(e,t)=>r.editorCloseAndSaveByEnter(e,t)},{keys:[["Tab"],["Tab","Shift"],["PageDown"],["PageUp"]],forwardToContext:e.getShortcutManager().getContext("grid"),callback:(e,t)=>r.editorCloseAndSave(e,t)},{keys:[["ArrowDown"],["ArrowUp"],["ArrowLeft"],["ArrowRight"]],preventDefault:!1,callback:(e,t)=>r.editorCloseAndSaveByArrowKeys(e,t)},{keys:[["Escape"],["Escape","Control/Meta"]],callback:()=>r.editorCloseWithoutSaving()}],{group:ml})}function mY(e){var t;let r,i=e.getShortcutManager().addContext("grid"),n=(t=mG(e),r={},Object.keys(t).forEach(i=>{let n=t[i];r[i]=(...t)=>{let r=mh(e)?e.getSelectedRangeActive()?.highlight:void 0;if(r?.isHeader()!==!0)return n(...t);let{row:i,col:o}=r,s=n(...t);return"number"==typeof i&&"number"==typeof o&&e.getSelectedRangeActive()?.highlight.isHeader()===!1&&e.selectCell(i,o),s}}),r),o=()=>e$(e.getSelected())&&mu(e);i.addShortcuts([{keys:[["F2"]],callback:e=>n.editorFastOpen(e)},{keys:[["Enter"],["Enter","Shift"]],callback:(e,t)=>n.editorOpen(e,t)},{keys:[["Backspace"],["Delete"]],callback:()=>n.emptySelectedCells()}],{group:ml,runOnlyIf:()=>e$(e.getSelected())&&md(e)}),i.addShortcuts(mo.map(e=>({keys:[e],callback:()=>{}})),{group:"gridClipboard",preventDefault:!1}),i.addShortcuts([{keys:[["Control/Meta","A"]],callback:()=>n.selectAllCells(),runOnlyIf:()=>o()&&!e.getSelectedRangeActive()?.highlight.isHeader()},{keys:[["Control/Meta","A"]],callback:()=>{},runOnlyIf:()=>!!(o()&&e.getSelectedRangeActive()?.highlight.isHeader()),preventDefault:!0},{keys:[["Control/Meta","Shift","Space"]],callback:()=>n.selectAllCellsAndHeaders()},{keys:[["Control/Meta","Enter"]],callback:()=>n.populateSelectedCellsData(),runOnlyIf:()=>{let t=e.getSelectedRangeActive()?.highlight;if(!e$(e.getSelected())||!md(e)||void 0===t||t.isHeader())return!1;let{row:r,col:i}=t.normalize();return nK(e,e.getDataAtCell(r,i),r,i)}},{keys:[["Alt","Enter"]],stopPropagation:!0,callback:()=>n.openCellLink(),runOnlyIf:()=>md(e)&&null!==mW(e)},{keys:[["Control","Space"]],captureCtrl:!0,callback:()=>n.extendCellsSelectionToColumns()},{keys:[["Shift","Space"]],stopPropagation:!0,callback:()=>n.extendCellsSelectionToRows()},{keys:[["ArrowUp"]],callback:()=>n.moveCellSelectionUp()},{keys:[["ArrowUp","Control/Meta"]],captureCtrl:!0,callback:()=>n.moveCellSelectionToMostTop()},{keys:[["ArrowUp","Shift"]],callback:()=>n.extendCellsSelectionUp()},{keys:[["ArrowUp","Shift","Control/Meta"]],captureCtrl:!0,callback:()=>n.extendCellsSelectionToMostTop(),runOnlyIf:()=>o()&&!(e.selection.isSelectedByCorner()||e.selection.isSelectedByColumnHeader())},{keys:[["ArrowDown"]],callback:()=>n.moveCellSelectionDown()},{keys:[["ArrowDown","Control/Meta"]],captureCtrl:!0,callback:()=>n.moveCellSelectionToMostBottom()},{keys:[["ArrowDown","Shift"]],callback:()=>n.extendCellsSelectionDown()},{keys:[["ArrowDown","Shift","Control/Meta"]],captureCtrl:!0,callback:()=>n.extendCellsSelectionToMostBottom(),runOnlyIf:()=>o()&&!(e.selection.isSelectedByCorner()||e.selection.isSelectedByColumnHeader())},{keys:[["ArrowLeft"]],callback:()=>n.moveCellSelectionLeft()},{keys:[["ArrowLeft","Control/Meta"]],captureCtrl:!0,callback:()=>n.moveCellSelectionToMostLeft()},{keys:[["ArrowLeft","Shift"]],callback:()=>n.extendCellsSelectionLeft()},{keys:[["ArrowLeft","Shift","Control/Meta"]],captureCtrl:!0,callback:()=>n.extendCellsSelectionToMostLeft(),runOnlyIf:()=>o()&&!(e.selection.isSelectedByCorner()||e.selection.isSelectedByRowHeader())},{keys:[["ArrowRight"]],callback:()=>n.moveCellSelectionRight()},{keys:[["ArrowRight","Control/Meta"]],captureCtrl:!0,callback:()=>n.moveCellSelectionToMostRight()},{keys:[["ArrowRight","Shift"]],callback:()=>n.extendCellsSelectionRight()},{keys:[["ArrowRight","Shift","Control/Meta"]],captureCtrl:!0,callback:()=>n.extendCellsSelectionToMostRight(),runOnlyIf:()=>o()&&!(e.selection.isSelectedByCorner()||e.selection.isSelectedByRowHeader())},{keys:[["Home"]],captureCtrl:!0,callback:()=>n.moveCellSelectionToMostInlineStart(),runOnlyIf:()=>o()&&e.view.isMainTableNotFullyCoveredByOverlays()},{keys:[["Home","Shift"]],callback:()=>n.extendCellsSelectionToMostInlineStart()},{keys:[["Home","Control/Meta"]],captureCtrl:!0,callback:()=>n.moveCellSelectionToMostTopInlineStart(),runOnlyIf:()=>o()&&e.view.isMainTableNotFullyCoveredByOverlays()},{keys:[["End"]],captureCtrl:!0,callback:()=>n.moveCellSelectionToMostInlineEnd(),runOnlyIf:()=>o()&&e.view.isMainTableNotFullyCoveredByOverlays()},{keys:[["End","Shift"]],callback:()=>n.extendCellsSelectionToMostInlineEnd()},{keys:[["End","Control/Meta"]],captureCtrl:!0,callback:()=>n.moveCellSelectionToMostBottomInlineEnd(),runOnlyIf:()=>o()&&e.view.isMainTableNotFullyCoveredByOverlays()},{keys:[["PageUp"]],callback:()=>n.moveCellSelectionUpByViewportHight()},{keys:[["PageUp","Shift"]],callback:()=>n.extendCellsSelectionUpByViewportHeight()},{keys:[["PageDown"]],callback:()=>n.moveCellSelectionDownByViewportHeight()},{keys:[["PageDown","Shift"]],callback:()=>n.extendCellsSelectionDownByViewportHeight()},{keys:[["Tab"]],preventDefault:!1,callback:e=>n.moveCellSelectionInlineStart(e)},{keys:[["Shift","Tab"]],preventDefault:!1,callback:e=>n.moveCellSelectionInlineEnd(e)},{keys:[["Control/Meta","Backspace"]],callback:()=>n.scrollToFocusedCell()}],{runOnlyIf:o,group:mn});let s=n.tabNavigation();i.addShortcuts([{keys:[["Tab"],["Shift","Tab"]],preventDefault:!1,stopPropagation:!1,relativeToGroup:mn,group:ms,position:"before",callback:e=>s.before(e)},{keys:[["Tab"],["Shift","Tab"]],preventDefault:!1,stopPropagation:!1,relativeToGroup:mn,group:ms,callback:e=>s.after(e),position:"after"}])}function mK(e){let{classNames:t}=r_(e,/ht-theme-[a-zA-Z0-9_-]+/);return t.pop()}let mq="handsontable-core-styles";function mX(e){return"string"==typeof e&&/ht-theme-.*/.test(e)}class mQ{#ey;#aF;#aB;#aV=null;#az=!1;#tf;#aU;#aW={};#a$={};#aG={};#aj=null;#aY;constructor({hot:e,rootElement:t,rootDocument:r,onThemeChange:i=e=>{},injectCoreCss:n=!0}){this.#ey=e,this.#aB=t,this.#tf=r,this.#aY=i,this.#aU=n,n&&this.#aK()}isCoreCssInjectionEnabled(){return this.#aU}getCSSVariableValue(e){if(this.#aW[`--ht-${e}`])return this.#aW[`--ht-${e}`];let t=this.#aq(`--ht-${e}`)??this.#aX(`--ht-${e}`);if(null!==t)return this.#aW[`--ht-${e}`]=t,t}getResolvedLength(e){if(e in this.#a$)return this.#a$[e];let t=this.#tf.createElement("div");t.style.cssText="position:absolute;visibility:hidden;pointer-events:none;box-sizing:content-box;height:0;margin:0;padding:0;border:0;",t.style.width=e,this.#aB.appendChild(t);let r=t.offsetWidth;return(this.#aB.removeChild(t),r>0)?(this.#a$[e]=r,r):null}getStyleForTD(e){return this.#aG?.td?.[e]}getDefaultRowHeight(e){let t=this.#aQ();return void 0!==e&&this.firstRenderedRowDrawsTopBorder()&&e===this.#ey.view.getFirstRenderedVisibleRow()?(t??0)+1:t}firstRenderedRowDrawsTopBorder(){return this.#ey.view?0===this.#ey.view.getColumnHeadersCount():!this.#ey.hasColHeaders()}areCellsBorderBox(){return"border-box"===this.getStyleForTD("box-sizing")}useTheme(e){mX(e)?(this.#aZ(),e!==this.#aF&&(this.#aF=e),this.#aY(this.#aF),this.#aJ()):rn(`${e} isn't a valid theme name. Please ensure it follows the format ht-theme-<theme-name>.`)}getThemeName(){return this.#aF}#aK(){if(!this.#ey||!this.#tf||!this.#tf.head)return;let e=this.#tf.getElementById(mq);if(e&&e instanceof HTMLStyleElement)return;let t=this.#tf.createElement("style");t.id=mq,t.textContent='/*!\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 67,200.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: 19.0.0-rc2\n * Release date: 17/11/2026 (built at 17/11/2026 11:12:27)\n */\ndiv:where(.handsontable):not(p):not(p) span:where(.colHeader),div:where(.handsontable):not(p):not(p) span:where(.rowHeader),div:where(.handsontable):not(p):not(p) span:where(.ht-page-size-section__label),div:where(.handsontable):not(p):not(p) span:where(.ht-page-navigation-section__label),div:where(.handsontable):not(p):not(p) span:where(.ht-multi-select-arrow),div:where(.handsontable):not(p):not(p) span:where(.ht-multi-select-chip),div:where(.handsontable):not(p):not(p) span:where(.ht-multi-select-chip-label),div:where(.handsontable):not(p):not(p) span:where(.ht-multi-select-chip-remove),div:where(.handsontable):not(p):not(p) span:where(.ht-multi-select-overflow),div:where(.handsontable):not(p):not(p) span:where(.htUISelectCaptionLabel),div:where(.handsontable):not(p):not(p) span:where(.htCheckboxRendererBox),div:where(.handsontable):not(p):not(p) input:where(.htCheckboxRendererInput),div:where(.handsontable):not(p):not(p) span:where(.htCheckboxRendererLabelText),div:where(.handsontable):not(p):not(p) span:where(.ht_nestingLevel_empty),div:where(.handsontable):not(p):not(p) :where(.htUIInput)>input:where([type=text],[type=date],[type=datetime-local],[type=time],[type=button]),div:where(.handsontable):not(p):not(p) :where(.htUIRadio)>input:where([type=radio]),div:where(.handsontable):not(p):not(p) :where(.htItemWrapper)>span:where(.selected,.htMixed){padding:revert;margin:revert;border:revert;height:revert;font-size:revert;line-height:revert;font-weight:revert;letter-spacing:revert;font-family:revert}.ht-root-wrapper{font-family:var(--ht-font-family),-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;flex-direction:column;height:100%;display:flex;position:relative}.ht-root-wrapper.ht-shadow-dom{isolation:isolate}.ht-root-wrapper.ht-grid-follows-content>.ht-grid{flex-shrink:0;min-height:auto}.ht-root-wrapper.ht-slot-bottom-filled .ht-wrapper:not(.htHorizontallyScrollableByWindow) .ht_master .wtHolder,.ht-root-wrapper.ht-slot-bottom-filled .ht-wrapper:not(.htVerticallyScrollableByWindow) .ht_master .wtHolder,.ht-root-wrapper.ht-slot-top-filled .ht-wrapper:not(.htHorizontallyScrollableByWindow) .ht_master .wtHolder,.ht-root-wrapper.ht-slot-top-filled .ht-wrapper:not(.htVerticallyScrollableByWindow) .ht_master .wtHolder{background-color:var(--ht-background-color);box-shadow:inset 0 0 0 1px var(--ht-border-color)}.ht-root-wrapper.ht-slot-bottom-filled .ht-wrapper:not(.htHorizontallyScrollableByWindow) .ht_master .htScrollbarFrame,.ht-root-wrapper.ht-slot-bottom-filled .ht-wrapper:not(.htVerticallyScrollableByWindow) .ht_master .htScrollbarFrame,.ht-root-wrapper.ht-slot-top-filled .ht-wrapper:not(.htHorizontallyScrollableByWindow) .ht_master .htScrollbarFrame,.ht-root-wrapper.ht-slot-top-filled .ht-wrapper:not(.htVerticallyScrollableByWindow) .ht_master .htScrollbarFrame{box-shadow:inset 0 0 0 1px var(--ht-border-color)}.htFocusCatcher{opacity:0;z-index:-1;border:0;outline:0;width:0;height:0;margin:0;padding:0;position:absolute;display:block!important}.ht-grid{flex:auto;min-height:0;position:relative}.ht-grid-content{height:100%}.ht-slot-top,.ht-slot-bottom{flex:none;overflow-x:auto}.ht-slot-element{box-sizing:border-box;border:1px solid var(--ht-border-color);width:100%}.ht-slot-top>.ht-slot-element:not(:first-of-type){border-top-width:0}.ht-slot-top>.ht-slot-element:last-of-type,.ht-slot-bottom>.ht-slot-element:not(:last-of-type){border-bottom-width:0}.ht-slot-bottom>.ht-slot-element:first-of-type{border-top-width:0}.htScrollbarTest{scrollbar-width:auto;scrollbar-color:var(--ht-scrollbar-thumb-color)var(--ht-scrollbar-track-color)}.htScrollbarSafariTest::-webkit-scrollbar{width:9px;height:9px}.handsontable{font-family:var(--ht-font-family),-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;font-size:var(--ht-font-size);line-height:var(--ht-line-height);font-weight:var(--ht-font-weight);letter-spacing:var(--ht-letter-spacing);color:var(--ht-foreground-color);touch-action:manipulation;position:relative}.handsontable .wtHolder{scrollbar-width:auto;scrollbar-color:var(--ht-scrollbar-thumb-color)var(--ht-scrollbar-track-color)}.handsontable .wtHolder::-webkit-scrollbar{width:9px;height:9px}.handsontable .wtHolder::-webkit-scrollbar-track{background:var(--ht-scrollbar-track-color);border-radius:var(--ht-scrollbar-border-radius)}.handsontable .wtHolder::-webkit-scrollbar-thumb{background-color:var(--ht-scrollbar-thumb-color);border-radius:var(--ht-scrollbar-border-radius)}.handsontable .wtHolder::-webkit-scrollbar-corner{background:var(--ht-scrollbar-track-color);border-end-end-radius:var(--ht-scrollbar-border-radius)}.handsontable .htScrollbarProxy{scrollbar-width:auto;scrollbar-color:var(--ht-scrollbar-thumb-color)var(--ht-scrollbar-track-color);z-index:1;background:linear-gradient(var(--ht-scrollbar-track-color),var(--ht-scrollbar-track-color)),var(--ht-background-color);position:absolute}.handsontable .htScrollbarProxy>div{width:1px;height:1px}.handsontable .htScrollbarProxy::-webkit-scrollbar{width:9px;height:9px}.handsontable .htScrollbarProxy::-webkit-scrollbar-track{background:var(--ht-scrollbar-track-color);border-radius:var(--ht-scrollbar-border-radius)}.handsontable .htScrollbarProxy::-webkit-scrollbar-thumb{background-color:var(--ht-scrollbar-thumb-color);border-radius:var(--ht-scrollbar-border-radius)}.handsontable .htScrollbarProxy-vertical{overflow:hidden scroll}.handsontable .htScrollbarProxy-horizontal{overflow:scroll hidden}.handsontable .htScrollbarProxyFiller,.handsontable .htScrollbarCorner{z-index:1;background:linear-gradient(var(--ht-scrollbar-track-color),var(--ht-scrollbar-track-color)),var(--ht-background-color);position:absolute}.handsontable .htScrollbarFrame{z-index:2;pointer-events:none;position:absolute}.handsontable.ht-wrapper{width:100%;height:100%}.handsontable.ht-wrapper:not(.htFirstDatasetColumnNotRendered) :where(table.htCore>tbody>tr,.htGhostTable>table>tbody>tr)>td:first-child{border-inline-start-width:1px}.handsontable.htGhostTable.htNestedHeaders table{border-spacing:0;border-collapse:collapse}.handsontable.htGhostTable table thead th{border-bottom-width:0}.handsontable.htGhostTable table tbody tr:first-of-type th:first-child,.handsontable.htGhostTable table tbody tr:first-of-type td:first-child{height:calc(var(--ht-cell-vertical-padding)*2 + var(--ht-line-height) + 1px)}.handsontable.htGhostTable table tbody tr th,.handsontable.htGhostTable table tbody tr td{height:calc(var(--ht-cell-vertical-padding)*2 + var(--ht-line-height) + 1px);border-top-width:0}.handsontable:not(.htHorizontallyScrollableByWindow).htHasScrollX .ht_master .wtHolder,.handsontable:not(.htHorizontallyScrollableByWindow).htHasScrollY .ht_master .wtHolder,.handsontable:not(.htVerticallyScrollableByWindow).htHasScrollX .ht_master .wtHolder,.handsontable:not(.htVerticallyScrollableByWindow).htHasScrollY .ht_master .wtHolder{background-color:var(--ht-background-color);box-shadow:inset 0 0 0 1px var(--ht-border-color)}.handsontable:not(.htHorizontallyScrollableByWindow).htHasScrollX .ht_master .htScrollbarFrame,.handsontable:not(.htHorizontallyScrollableByWindow).htHasScrollY .ht_master .htScrollbarFrame,.handsontable:not(.htVerticallyScrollableByWindow).htHasScrollX .ht_master .htScrollbarFrame,.handsontable:not(.htVerticallyScrollableByWindow).htHasScrollY .ht_master .htScrollbarFrame{box-shadow:inset 0 0 0 1px var(--ht-border-color)}.handsontable :where(table.htCore>tbody,.htGhostTable>table>tbody)>tr.ht__row_even>th{background-color:var(--ht-row-header-even-background-color)}.handsontable :where(table.htCore>tbody,.htGhostTable>table>tbody)>tr.ht__row_even>td{background-color:var(--ht-row-cell-even-background-color)}.handsontable :where(table.htCore>tbody,.htGhostTable>table>tbody)>tr.ht__row_odd>th{background-color:var(--ht-row-header-odd-background-color)}.handsontable :where(table.htCore>tbody,.htGhostTable>table>tbody)>tr.ht__row_odd>td{background-color:var(--ht-row-cell-odd-background-color)}.handsontable :where(table.htCore>thead>tr,.htGhostTable>table>thead>tr,table.htCore>tbody>tr,.htGhostTable>table>tbody>tr)>th,.handsontable :where(table.htCore>tbody>tr,.htGhostTable>table>tbody>tr)>td{height:calc(var(--ht-cell-vertical-padding)*2 + var(--ht-line-height) + 1px);padding:var(--ht-cell-vertical-padding)var(--ht-cell-horizontal-padding);vertical-align:top;border-top-width:0;font-size:var(--ht-font-size);line-height:var(--ht-line-height);white-space:pre-wrap;empty-cells:show;box-sizing:border-box;color:var(--ht-foreground-color);border-inline-width:0 1px;border-style:solid;border-bottom-width:1px;border-top-color:var(--ht-cell-vertical-border-color);border-bottom-color:var(--ht-cell-vertical-border-color);border-inline-start-color:var(--ht-cell-horizontal-border-color);border-inline-end-color:var(--ht-cell-horizontal-border-color);outline:0;overflow:hidden}.handsontable :where(table.htCore>thead>tr,.htGhostTable>table>thead>tr,table.htCore>tbody>tr,.htGhostTable>table>tbody>tr)>th.invisibleSelection,.handsontable :where(table.htCore>tbody>tr,.htGhostTable>table>tbody>tr)>td.invisibleSelection{outline:none}.handsontable :where(table.htCore>thead>tr,.htGhostTable>table>thead>tr,table.htCore>tbody>tr,.htGhostTable>table>tbody>tr)>th.invisibleSelection::selection{background:0 0}.handsontable :where(table.htCore>tbody>tr,.htGhostTable>table>tbody>tr)>td.invisibleSelection::selection{background:0 0}.handsontable :where(table.htCore>thead>tr,.htGhostTable>table>thead>tr,table.htCore>tbody>tr,.htGhostTable>table>tbody>tr)>th{text-align:center;font-weight:var(--ht-header-font-weight);white-space:nowrap;color:var(--ht-header-foreground-color);background-color:var(--ht-header-background-color);position:relative;overflow:visible}.handsontable :where(table.htCore>thead>tr,.htGhostTable>table>thead>tr,table.htCore>tbody>tr,.htGhostTable>table>tbody>tr)>th:last-child{border-inline-width:0 1px;border-bottom-width:1px;border-inline-end-color:var(--ht-border-color)}.handsontable :where(table.htCore>thead>tr,.htGhostTable>table>thead>tr,table.htCore>tbody>tr,.htGhostTable>table>tbody>tr)>th:last-child.ht__active_highlight{border-inline-end-color:var(--ht-header-active-border-color)}.handsontable :where(table.htCore>thead>tr,.htGhostTable>table>thead>tr,table.htCore>tbody>tr,.htGhostTable>table>tbody>tr)>th:first-child{border-inline-start-color:var(--ht-border-color)}.handsontable :where(table.htCore>thead>tr,.htGhostTable>table>thead>tr,table.htCore>tbody>tr,.htGhostTable>table>tbody>tr)>th:first-child.ht__active_highlight{border-inline-start-color:var(--ht-header-active-border-color)}.handsontable :where(table.htCore>thead>tr,.htGhostTable>table>thead>tr,table.htCore>tbody>tr,.htGhostTable>table>tbody>tr)>th:first-child{border-inline-start-width:1px}.handsontable :where(table.htCore>thead>tr,.htGhostTable>table>thead>tr,table.htCore>tbody>tr,.htGhostTable>table>tbody>tr)>th.current{box-shadow:inset 0 0 0 1px var(--ht-cell-selection-border-color)}.handsontable :where(table.htCore>thead>tr,.htGhostTable>table>thead>tr,table.htCore>tbody>tr,.htGhostTable>table>tbody>tr)>th.active{color:var(--ht-header-active-foreground-color);background-color:var(--ht-header-active-background-color)}.handsontable :where(table.htCore>thead>tr,.htGhostTable>table>thead>tr,table.htCore>tbody>tr,.htGhostTable>table>tbody>tr)>th.ht__highlight{color:var(--ht-header-highlighted-foreground-color);background-color:var(--ht-header-highlighted-background-color)}.handsontable :where(table.htCore>thead>tr,.htGhostTable>table>thead>tr,table.htCore>tbody>tr,.htGhostTable>table>tbody>tr)>th.ht__active_highlight{border-color:var(--ht-header-active-border-color);color:var(--ht-header-active-foreground-color);background-color:var(--ht-header-active-background-color)}.handsontable :where(table.htCore>thead>tr,.htGhostTable>table>thead>tr,table.htCore>tbody>tr,.htGhostTable>table>tbody>tr)>th.ht__active_highlight-prev,.handsontable :where(table.htCore>thead>tr,.htGhostTable>table>thead>tr,table.htCore>tbody>tr,.htGhostTable>table>tbody>tr)>th.ht__active_highlight-seam{border-inline-end-color:var(--ht-header-active-border-color)}.handsontable.htRowHeaders .ht_master:not(.emptyColumns) :where(table.htCore>thead>tr,.htGhostTable>table>thead>tr)>th.htLastRowHeaderColumn:not(.ht__active_highlight):not(.ht__active_highlight-prev),.handsontable.htRowHeaders .ht_master:not(.emptyColumns) :where(table.htCore>tbody>tr,.htGhostTable>table>tbody>tr)>th:not(.ht__active_highlight):not(.ht__active_highlight-prev),.handsontable.htRowHeaders .ht_master:not(.emptyColumns)~.handsontable:not(.htGhostTable) :where(table.htCore>thead>tr,.htGhostTable>table>thead>tr)>th.htLastRowHeaderColumn:not(.ht__active_highlight):not(.ht__active_highlight-prev),.handsontable.htRowHeaders .ht_master:not(.emptyColumns)~.handsontable:not(.htGhostTable) :where(table.htCore>tbody>tr,.htGhostTable>table>tbody>tr)>th:not(.ht__active_highlight):not(.ht__active_highlight-prev),.handsontable.htRowHeaders .ht_master:not(.emptyColumns)~.htOverlayRail>.handsontable:not(.htGhostTable) :where(table.htCore>thead>tr,.htGhostTable>table>thead>tr)>th.htLastRowHeaderColumn:not(.ht__active_highlight):not(.ht__active_highlight-prev),.handsontable.htRowHeaders .ht_master:not(.emptyColumns)~.htOverlayRail>.handsontable:not(.htGhostTable) :where(table.htCore>tbody>tr,.htGhostTable>table>tbody>tr)>th:not(.ht__active_highlight):not(.ht__active_highlight-prev){border-inline-end-color:var(--ht-cell-horizontal-border-color)}.handsontable :where(table.htCore,.htGhostTable>table)>tbody>tr.ht__row_odd>th.ht__highlight,.handsontable :where(table.htCore,.htGhostTable>table)>tbody>tr.ht__row_even>th.ht__highlight{color:var(--ht-header-row-highlighted-foreground-color);background-color:var(--ht-header-row-highlighted-background-color)}.handsontable :where(table.htCore,.htGhostTable>table)>tbody>tr.ht__row_odd>th.ht__active_highlight,.handsontable :where(table.htCore,.htGhostTable>table)>tbody>tr.ht__row_even>th.ht__active_highlight{color:var(--ht-header-row-active-foreground-color);background-color:var(--ht-header-row-active-background-color)}.handsontable :where(table.htCore,.htGhostTable>table)>tbody>tr:first-of-type>th:first-child:empty:after,.handsontable :where(table.htCore,.htGhostTable>table)>tbody>tr:first-of-type>td:first-child:empty:after{content:"";min-height:var(--ht-line-height);display:block}.handsontable :where(table.htCore,.htGhostTable>table)>tbody>tr>th{color:var(--ht-header-row-foreground-color);background-color:var(--ht-header-row-background-color);padding:0}.handsontable :where(table.htCore,.htGhostTable>table)>tbody>tr>th .relative{padding:var(--ht-cell-vertical-padding)var(--ht-cell-horizontal-padding);min-height:100%}.handsontable :where(table.htCore,.htGhostTable>table)>tbody>tr>td:first-child{border-inline-start-color:var(--ht-border-color)}.handsontable :where(table.htCore,.htGhostTable>table)>tbody>tr>td:last-child{border-inline-end-color:var(--ht-border-color)}.handsontable :where(table.htCore,.htGhostTable>table)>tbody>tr>th.ht__active_highlight-prev-row{border-bottom-color:var(--ht-header-active-border-color)}.handsontable :where(table.htCore,.htGhostTable>table)>thead>tr>th{padding:0}.handsontable :where(table.htCore,.htGhostTable>table)>thead>tr>th.ht__active_highlight{box-shadow:-1px 0 0 0 var(--ht-header-active-border-color)}.handsontable :where(table.htCore,.htGhostTable>table)>thead>tr>th .relative{padding:var(--ht-cell-vertical-padding)var(--ht-cell-horizontal-padding);flex-direction:row;align-items:center;gap:2px;display:flex}.handsontable :where(table.htCore,.htGhostTable>table)>thead>tr>th .relative .colHeader{text-overflow:ellipsis;vertical-align:top;flex:auto;min-width:0;overflow:hidden}.handsontable :where(table.htCore>thead,table.htCore>tbody,.htGhostTable>table>thead,.htGhostTable>table>tbody)>tr:first-child>th,.handsontable :where(table.htCore>thead,table.htCore>tbody,.htGhostTable>table>thead,.htGhostTable>table>tbody)>tr:first-child>td{border-top-color:var(--ht-border-color);border-top-width:1px}.handsontable :where(table.htCore>thead,table.htCore>tbody,.htGhostTable>table>thead,.htGhostTable>table>tbody)>tr:first-child>th.ht__active_highlight,.handsontable :where(table.htCore>thead,table.htCore>tbody,.htGhostTable>table>thead,.htGhostTable>table>tbody)>tr:first-child>th.ht__active_highlight-row-seam-bottom,.handsontable :where(table.htCore>thead,table.htCore>tbody,.htGhostTable>table>thead,.htGhostTable>table>tbody)>tr:first-child>td.ht__active_highlight,.handsontable :where(table.htCore>thead,table.htCore>tbody,.htGhostTable>table>thead,.htGhostTable>table>tbody)>tr:first-child>td.ht__active_highlight-row-seam-bottom{border-top-color:var(--ht-header-active-border-color)}.handsontable :where(table.htCore,.htGhostTable>table)>thead:not(:empty)+tbody>tr:first-child>th,.handsontable :where(table.htCore,.htGhostTable>table)>thead:not(:empty)+tbody>tr:first-child>td{border-top-width:0}.handsontable :where(table.htCore>thead,table.htCore>tbody,.htGhostTable>table>thead,.htGhostTable>table>tbody)>tr:last-child>th,.handsontable :where(table.htCore>thead,table.htCore>tbody,.htGhostTable>table>thead,.htGhostTable>table>tbody)>tr:last-child>td{border-bottom-color:var(--ht-border-color)}.handsontable :where(table.htCore>thead,table.htCore>tbody,.htGhostTable>table>thead,.htGhostTable>table>tbody)>tr:last-child>th.ht__active_highlight,.handsontable :where(table.htCore>thead,table.htCore>tbody,.htGhostTable>table>thead,.htGhostTable>table>tbody)>tr:last-child>th.ht__active_highlight-row-seam-top,.handsontable :where(table.htCore>thead,table.htCore>tbody,.htGhostTable>table>thead,.htGhostTable>table>tbody)>tr:last-child>td.ht__active_highlight,.handsontable :where(table.htCore>thead,table.htCore>tbody,.htGhostTable>table>thead,.htGhostTable>table>tbody)>tr:last-child>td.ht__active_highlight-row-seam-top{border-bottom-color:var(--ht-header-active-border-color)}.handsontable div[class^=ht_clone] thead .ht__highlight .relative:after{content:"";height:var(--ht-header-highlighted-shadow-size);background-color:var(--ht-accent-color);display:block;position:absolute;bottom:-1px;left:-1px;right:-1px}.handsontable div[class^=ht_clone] thead tr:only-of-type .ht__highlight .relative:after{bottom:0}.handsontable div[class^=ht_clone] tbody .ht__highlight .relative:after{content:"";width:var(--ht-header-highlighted-shadow-size);background-color:var(--ht-accent-color);display:block;position:absolute;top:-1px;bottom:-1px;right:-1px}.handsontable div[class^=ht_clone] :where(table.htCore>tbody>tr,.htGhostTable>table>tbody>tr)>td:first-child{border-inline-start-width:1px}.handsontable div[class^=ht_clone].htFreezeLineShared.ht_clone_inline_end :where(table.htCore>thead>tr,.htGhostTable>table>thead>tr,table.htCore>tbody>tr,.htGhostTable>table>tbody>tr)>th:first-child,.handsontable div[class^=ht_clone].htFreezeLineShared.ht_clone_inline_end :where(table.htCore>tbody>tr,.htGhostTable>table>tbody>tr)>td:first-child,.handsontable div[class^=ht_clone].htFreezeLineShared.ht_clone_top_inline_end_corner :where(table.htCore>thead>tr,.htGhostTable>table>thead>tr,table.htCore>tbody>tr,.htGhostTable>table>tbody>tr)>th:first-child,.handsontable div[class^=ht_clone].htFreezeLineShared.ht_clone_top_inline_end_corner :where(table.htCore>tbody>tr,.htGhostTable>table>tbody>tr)>td:first-child,.handsontable div[class^=ht_clone].htFreezeLineShared.ht_clone_bottom_inline_end_corner :where(table.htCore>thead>tr,.htGhostTable>table>thead>tr,table.htCore>tbody>tr,.htGhostTable>table>tbody>tr)>th:first-child,.handsontable div[class^=ht_clone].htFreezeLineShared.ht_clone_bottom_inline_end_corner :where(table.htCore>tbody>tr,.htGhostTable>table>tbody>tr)>td:first-child{border-inline-start-width:0}.handsontable :where(table.htCore,.htGhostTable>table)>thead>tr:not(:last-child)>th{overflow:hidden}.handsontable .hide{display:none}.handsontable .relative{box-sizing:border-box;position:relative}.handsontable tr.htExactRow>td,.handsontable tr.htExactRow>th{height:auto;position:relative}.handsontable tr.htExactRow>td{padding:0}.handsontable tr.htExactRow>td>.htCellClip{inset:var(--ht-cell-vertical-padding)var(--ht-cell-horizontal-padding);box-sizing:border-box;border:0;min-height:0;margin:0;padding:0;position:absolute;overflow:hidden}.handsontable tr.htExactRow>td.htMiddle>.htCellClip{align-content:center}.handsontable tr.htExactRow>td.htBottom>.htCellClip{align-content:end}.handsontable tr.htExactRow>th>.relative{min-height:0;position:absolute;inset:0}.handsontable tr.htExactRow>th>.relative>.rowHeader{height:100%;display:block;overflow:hidden}.handsontable .wtHider{width:0}.handsontable .wtSpreader{width:0;height:auto;position:relative}.handsontable .htAutoSize{visibility:hidden;position:absolute;top:-99000px;left:-99000px}.handsontable.htGhostTable.htAutoSize{width:auto}.handsontable .htTextEllipsis{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.handsontable .htLineClamp{-webkit-line-clamp:var(--ht-text-line-clamp);white-space:pre-wrap;box-sizing:border-box;border:0;-webkit-box-orient:vertical;min-height:0;margin:0;padding:0;display:-webkit-box;overflow:hidden}.handsontable .htMergedCellContentWindow{box-sizing:border-box;border:0;margin:0;padding:0;display:block}.handsontable tr.htExactRow>td.htTextEllipsis>.htCellClip{text-overflow:ellipsis}.handsontable table.htCore,.handsontable:where(.htGhostTable)>table,.handsontable :where(table.htCore,.htGhostTable>table)>thead,.handsontable :where(table.htCore,.htGhostTable>table)>tbody,.handsontable input:not(:where(table.htCore>tbody>tr>td:not(.htCustomMenuRenderer) :not(.htCheckboxRendererInput),.htGhostTable>table>tbody>tr>td:not(.htCustomMenuRenderer) :not(.htCheckboxRendererInput))),.handsontable textarea:not(:where(table.htCore>tbody>tr>td:not(.htCustomMenuRenderer) :not(.htCheckboxRendererInput),.htGhostTable>table>tbody>tr>td:not(.htCustomMenuRenderer) :not(.htCheckboxRendererInput))),.handsontable div:not(:where(table.htCore>tbody>tr>td:not(.htCustomMenuRenderer) :not(.htCheckboxRendererInput),.htGhostTable>table>tbody>tr>td:not(.htCustomMenuRenderer) :not(.htCheckboxRendererInput))){box-sizing:content-box}.handsontable input:not(:where(table.htCore>tbody>tr>td:not(.htCustomMenuRenderer) :not(.htCheckboxRendererInput),.htGhostTable>table>tbody>tr>td:not(.htCustomMenuRenderer) :not(.htCheckboxRendererInput))),.handsontable textarea:not(:where(table.htCore>tbody>tr>td:not(.htCustomMenuRenderer) :not(.htCheckboxRendererInput),.htGhostTable>table>tbody>tr>td:not(.htCustomMenuRenderer) :not(.htCheckboxRendererInput))){min-height:initial}.handsontable .htCore{border-spacing:0;border-collapse:separate;table-layout:fixed;cursor:default;background-color:var(--ht-background-color);border-width:0;outline-width:0;width:0;margin:0}.handsontable :where(table.htCore,.htGhostTable>table)>colgroup>col,.handsontable :where(table.htCore,.htGhostTable>table)>colgroup>col.rowHeader{width:64px}.handsontable :where(table.htCore,.htGhostTable>table)>colgroup>col.hidden{width:0!important}.handsontable span.colHeader,.handsontable span.rowHeader{font-size:var(--ht-font-size);line-height:var(--ht-line-height);display:inline-block}.handsontable :where(table.htCore>thead,table.htCore>tbody,.htGhostTable>table>thead,.htGhostTable>table>tbody)>tr.hidden,.handsontable :where(table.htCore>thead,table.htCore>tbody,.htGhostTable>table>thead,.htGhostTable>table>tbody)>tr.hidden>td,.handsontable :where(table.htCore>thead,table.htCore>tbody,.htGhostTable>table>thead,.htGhostTable>table>tbody)>tr.hidden>th{display:none}.handsontable a:not(:where(table.htCore>tbody>tr>td:not(.htCustomMenuRenderer) :not(.htCheckboxRendererInput),.htGhostTable>table>tbody>tr>td:not(.htCustomMenuRenderer) :not(.htCheckboxRendererInput))){color:var(--ht-link-color)}.handsontable a:not(:where(table.htCore>tbody>tr>td:not(.htCustomMenuRenderer) :not(.htCheckboxRendererInput),.htGhostTable>table>tbody>tr>td:not(.htCustomMenuRenderer) :not(.htCheckboxRendererInput))):hover{color:var(--ht-link-hover-color)}.handsontable .ht_master table.htCore>thead,.handsontable .ht_master table.htCore>tbody>tr>th,.handsontable .ht_clone_inline_start table.htCore>thead,.handsontable .ht_clone_inline_end table.htCore>thead{visibility:hidden}.ht_master,.ht_clone_inline_start,.ht_clone_inline_end,.ht_clone_top,.ht_clone_bottom,.ht_master .wtHolder,.ht_clone_inline_start .wtHolder,.ht_clone_inline_end .wtHolder,.ht_clone_top .wtHolder,.ht_clone_bottom .wtHolder{overflow:hidden}.handsontable .ht_clone_inline_start .wtHolder,.handsontable .ht_clone_inline_end .wtHolder,.handsontable .ht_clone_top .wtHolder,.handsontable .ht_clone_bottom .wtHolder{overflow-anchor:none;scrollbar-width:none!important}.handsontable .ht_clone_inline_start .wtHolder::-webkit-scrollbar{display:none}.handsontable .ht_clone_inline_end .wtHolder::-webkit-scrollbar{display:none}.handsontable .ht_clone_top .wtHolder::-webkit-scrollbar{display:none}.handsontable .ht_clone_bottom .wtHolder::-webkit-scrollbar{display:none}.ht_clone_inline_start .wtHolder,.ht_clone_inline_end .wtHolder{overflow:hidden auto}.ht_clone_top .wtHolder,.ht_clone_bottom .wtHolder{overflow:auto hidden}.htScrollbarClearanceFillers{overflow-anchor:none;z-index:300;block-size:0;inline-size:0;position:sticky;inset-block-start:0;inset-inline-start:0}.htScrollbarClearanceFiller{background-color:var(--ht-scrollbar-track-color,var(--ht-background-color));pointer-events:none;box-sizing:border-box;position:absolute}.ht_master .wtHolder{overflow:auto}[dir=rtl].handsontable :where(table.htCore>tbody>tr,.htGhostTable>table>tbody>tr)>td[dir=ltr]{border-inline-width:1px 0}[dir=rtl].handsontable :where(table.htCore,.htGhostTable>table)>tbody>tr>td[dir=ltr]:last-child{border-inline-start-color:var(--ht-border-color)}[dir=rtl].handsontable div[class^=ht_clone] tbody .ht__highlight .relative:after{left:-1px;right:auto}.handsontable.ht-wrapper{border-radius:var(--ht-border-radius)}.handsontable.ht-wrapper:not(.htColumnHeaders) .ht_master .htCore>tbody>tr:first-child>td:first-child{border-start-start-radius:var(--ht-border-radius)}.handsontable.ht-wrapper:not(.htColumnHeaders) .ht_master .htCore>tbody>tr:first-child>td:last-child{border-start-end-radius:var(--ht-border-radius)}.handsontable.ht-wrapper:not(.htColumnHeaders) .ht_clone_top_inline_start_corner .htCore>tbody>tr:first-child>td:first-child{border-start-start-radius:var(--ht-border-radius)}.handsontable.ht-wrapper:not(.htColumnHeaders) .ht_clone_top_inline_end_corner .htCore>tbody>tr:first-child>td:last-child{border-start-end-radius:var(--ht-border-radius)}.handsontable.ht-wrapper:not(.htColumnHeaders) .ht_clone_top .htCore>tbody>tr:first-child>td:first-child{border-start-start-radius:var(--ht-border-radius)}.handsontable.ht-wrapper:not(.htColumnHeaders) .ht_clone_top .htCore>tbody>tr:first-child>td:last-child{border-start-end-radius:var(--ht-border-radius)}.handsontable.ht-wrapper:not(.htColumnHeaders) .ht_clone_inline_start .htCore>tbody>tr:first-child>th:first-child,.handsontable.ht-wrapper:not(.htColumnHeaders) .ht_clone_inline_start .htCore>tbody>tr:first-child>td:first-child{border-start-start-radius:var(--ht-border-radius)}.handsontable.ht-wrapper:not(.htColumnHeaders) .ht_clone_inline_end .htCore>tbody>tr:first-child>td:last-child{border-start-end-radius:var(--ht-border-radius)}.handsontable.ht-wrapper .ht_master .wtHolder,.handsontable.ht-wrapper .ht_master .htCore{border-radius:var(--ht-border-radius)}.handsontable.ht-wrapper .ht_master .htCore>thead>tr:first-child>th:first-child{border-start-start-radius:var(--ht-border-radius)}.handsontable.ht-wrapper .ht_master .htCore>thead>tr:first-child>th:not(.hiddenHeader).htLastVisibleHeader{border-start-end-radius:var(--ht-border-radius)}.handsontable.ht-wrapper .ht_master .htCore>thead>tr:last-child>th:first-child{border-end-start-radius:var(--ht-border-radius)}.handsontable.ht-wrapper .ht_master .htCore>thead>tr:last-child>th:not(.hiddenHeader).htLastVisibleHeader{border-end-end-radius:var(--ht-border-radius)}.handsontable.ht-wrapper .ht_master .htCore>tbody>tr:last-child>td:first-child{border-end-start-radius:var(--ht-border-radius)}.handsontable.ht-wrapper .ht_master .htCore>tbody>tr:last-child>td:last-child{border-end-end-radius:var(--ht-border-radius)}.handsontable.ht-wrapper .ht_clone_top_inline_start_corner .htCore,.handsontable.ht-wrapper .ht_clone_top_inline_start_corner .htCore>thead>tr:first-child>th:first-child{border-start-start-radius:var(--ht-border-radius)}.handsontable.ht-wrapper .ht_clone_top_inline_end_corner .htCore,.handsontable.ht-wrapper .ht_clone_top_inline_end_corner .htCore>thead>tr:first-child>th:last-child{border-start-end-radius:var(--ht-border-radius)}.handsontable.ht-wrapper .ht_clone_top .htCore{border-start-start-radius:var(--ht-border-radius);border-start-end-radius:var(--ht-border-radius)}.handsontable.ht-wrapper .ht_clone_top .htCore>thead>tr:first-child>th:first-child{border-start-start-radius:var(--ht-border-radius)}.handsontable.ht-wrapper .ht_clone_top .htCore>thead>tr:first-child>th:not(.hiddenHeader).htLastVisibleHeader{border-start-end-radius:var(--ht-border-radius)}.handsontable.ht-wrapper .ht_clone_inline_start .htCore{border-start-start-radius:var(--ht-border-radius);border-end-start-radius:var(--ht-border-radius)}.handsontable.ht-wrapper .ht_clone_inline_start .htCore>thead>tr:first-child>th:first-child{border-start-start-radius:var(--ht-border-radius)}.handsontable.ht-wrapper .ht_clone_inline_start .htCore>tbody>tr:last-child>th:first-child,.handsontable.ht-wrapper .ht_clone_inline_start .htCore>tbody>tr:last-child>td:first-child{border-end-start-radius:var(--ht-border-radius)}.handsontable.ht-wrapper .ht_clone_inline_end .htCore{border-start-end-radius:var(--ht-border-radius);border-end-end-radius:var(--ht-border-radius)}.handsontable.ht-wrapper .ht_clone_inline_end .htCore>thead>tr:first-child>th:last-child{border-start-end-radius:var(--ht-border-radius)}.handsontable.ht-wrapper .ht_clone_inline_end .htCore>tbody>tr:last-child>td:last-child{border-end-end-radius:var(--ht-border-radius)}.handsontable.ht-wrapper .ht_clone_bottom_inline_start_corner .htCore,.handsontable.ht-wrapper .ht_clone_bottom_inline_start_corner .htCore>:where(thead,tbody)>tr:last-child>th:first-child,.handsontable.ht-wrapper .ht_clone_bottom_inline_start_corner .htCore>:where(thead,tbody)>tr:last-child>td:first-child{border-end-start-radius:var(--ht-border-radius)}.handsontable.ht-wrapper .ht_clone_bottom_inline_end_corner .htCore,.handsontable.ht-wrapper .ht_clone_bottom_inline_end_corner .htCore>:where(thead,tbody)>tr:last-child>th:last-child,.handsontable.ht-wrapper .ht_clone_bottom_inline_end_corner .htCore>:where(thead,tbody)>tr:last-child>td:last-child{border-end-end-radius:var(--ht-border-radius)}.handsontable.ht-wrapper .ht_clone_bottom .htCore{border-end-end-radius:var(--ht-border-radius);border-end-start-radius:var(--ht-border-radius)}.handsontable.ht-wrapper .ht_clone_bottom .htCore>:where(thead,tbody)>tr:last-child>th:first-child,.handsontable.ht-wrapper .ht_clone_bottom .htCore>:where(thead,tbody)>tr:last-child>td:first-child{border-end-start-radius:var(--ht-border-radius)}.handsontable.ht-wrapper .ht_clone_bottom .htCore>:where(thead,tbody)>tr:last-child>th:last-child,.handsontable.ht-wrapper .ht_clone_bottom .htCore>:where(thead,tbody)>tr:last-child>td:last-child{border-end-end-radius:var(--ht-border-radius)}.handsontable.ht-wrapper.htHasScrollX:not(.htHorizontallyScrollableByWindow) .htCore{border-end-end-radius:0;border-end-start-radius:0}.handsontable.ht-wrapper.htHasScrollX:not(.htHorizontallyScrollableByWindow) .htCore>thead>tr:last-child>th:first-child,.handsontable.ht-wrapper.htHasScrollX:not(.htHorizontallyScrollableByWindow) .htCore>tbody>tr:last-child>td:first-child,.handsontable.ht-wrapper.htHasScrollX:not(.htHorizontallyScrollableByWindow) .htCore>tbody>tr:last-child>th:first-child{border-end-start-radius:0}.handsontable.ht-wrapper.htHasScrollX:not(.htHorizontallyScrollableByWindow) .htCore>thead>tr:last-child>th:not(.hiddenHeader).htLastVisibleHeader,.handsontable.ht-wrapper.htHasScrollX:not(.htHorizontallyScrollableByWindow) .htCore>tbody>tr:last-child>td:last-child,.handsontable.ht-wrapper.htHasScrollX:not(.htHorizontallyScrollableByWindow) .htCore>tbody>tr:last-child>th:last-child{border-end-end-radius:0}.handsontable.ht-wrapper.htHasScrollY:not(.htVerticallyScrollableByWindow) .htCore{border-start-end-radius:0;border-end-end-radius:0}.handsontable.ht-wrapper.htHasScrollY:not(.htVerticallyScrollableByWindow) .htCore>thead>tr:first-child>th:not(.hiddenHeader).htLastVisibleHeader,.handsontable.ht-wrapper.htHasScrollY:not(.htVerticallyScrollableByWindow) .htCore>tbody>tr:first-child>td:last-child,.handsontable.ht-wrapper.htHasScrollY:not(.htVerticallyScrollableByWindow) .htCore>tbody>tr:first-child>th:last-child{border-start-end-radius:0}.handsontable.ht-wrapper.htHasScrollY:not(.htVerticallyScrollableByWindow) .htCore>thead>tr:last-child>th:not(.hiddenHeader).htLastVisibleHeader,.handsontable.ht-wrapper.htHasScrollY:not(.htVerticallyScrollableByWindow) .htCore>tbody>tr:last-child>td:last-child,.handsontable.ht-wrapper.htHasScrollY:not(.htVerticallyScrollableByWindow) .htCore>tbody>tr:last-child>th:last-child{border-end-end-radius:0}.ht-root-wrapper{border-radius:var(--ht-border-radius)}.ht-root-wrapper.ht-slot-bottom-filled .ht-wrapper,.ht-root-wrapper.ht-slot-bottom-filled .ht_master .wtHolder{border-end-end-radius:0;border-end-start-radius:0}.ht-root-wrapper.ht-slot-bottom-filled .htCore{border-end-end-radius:0!important;border-end-start-radius:0!important}.ht-root-wrapper.ht-slot-bottom-filled .htCore>thead>tr:last-child>th:first-child,.ht-root-wrapper.ht-slot-bottom-filled .htCore>tbody>tr:last-child>td:first-child,.ht-root-wrapper.ht-slot-bottom-filled .htCore>tbody>tr:last-child>th:first-child{border-end-start-radius:0!important}.ht-root-wrapper.ht-slot-bottom-filled .htCore>thead>tr:last-child>th:not(.hiddenHeader).htLastVisibleHeader,.ht-root-wrapper.ht-slot-bottom-filled .htCore>tbody>tr:last-child>td:last-child,.ht-root-wrapper.ht-slot-bottom-filled .htCore>tbody>tr:last-child>th:last-child{border-end-end-radius:0!important}.ht-root-wrapper.ht-slot-top-filled .ht-wrapper,.ht-root-wrapper.ht-slot-top-filled .ht_master .wtHolder{border-start-start-radius:0;border-start-end-radius:0}.ht-root-wrapper.ht-slot-top-filled .htCore{border-start-start-radius:0!important;border-start-end-radius:0!important}.ht-root-wrapper.ht-slot-top-filled .htCore>thead>tr:first-child>th:first-child,.ht-root-wrapper.ht-slot-top-filled .htCore>tbody>tr:first-child>td:first-child,.ht-root-wrapper.ht-slot-top-filled .htCore>tbody>tr:first-child>th:first-child{border-start-start-radius:0!important}.ht-root-wrapper.ht-slot-top-filled .htCore>thead>tr:first-child>th:not(.hiddenHeader).htLastVisibleHeader,.ht-root-wrapper.ht-slot-top-filled .htCore>tbody>tr:first-child>td:last-child,.ht-root-wrapper.ht-slot-top-filled .htCore>tbody>tr:first-child>th:last-child{border-start-end-radius:0!important}.ht-root-wrapper .ht-slot-element{border-radius:var(--ht-border-radius)}.ht-root-wrapper .ht-slot-bottom>.ht-slot-element:not(:last-of-type){border-radius:0}.ht-root-wrapper .ht-slot-bottom>.ht-slot-element:last-of-type{border-start-start-radius:0;border-start-end-radius:0}.ht-root-wrapper .ht-slot-top>.ht-slot-element:not(:first-of-type){border-radius:0}.ht-root-wrapper .ht-slot-top>.ht-slot-element:first-of-type{border-end-end-radius:0;border-end-start-radius:0}.handsontable.mobile,.handsontable.mobile .wtHolder{-webkit-user-select:none;user-select:none;-webkit-tap-highlight-color:#0000;-webkit-overflow-scrolling:touch}.handsontable.mobile .handsontableInput:focus{box-shadow:inset 0 0 0 2px var(--ht-accent-color);-webkit-appearance:none}.handsontable .topSelectionHandle,.handsontable .topSelectionHandle-HitArea,.handsontable .bottomSelectionHandle,.handsontable .bottomSelectionHandle-HitArea{z-index:9999;inset-inline-start:-10000px;inset-inline-end:unset;top:-10000px}.handsontable.hide-tween{animation:.2s forwards opacity-hide}.handsontable.show-tween{animation:.3s forwards opacity-show}.ht_master{z-index:0}.ht_clone_master{z-index:100}.ht_clone_inline_start,.ht_clone_inline_end{z-index:120}.ht_clone_bottom{z-index:130}.ht_clone_bottom_inline_start_corner,.ht_clone_bottom_inline_end_corner{z-index:150}.ht_clone_top{z-index:160}.ht_clone_top_inline_start_corner,.ht_clone_top_inline_end_corner{z-index:180}.ht_editor_hidden{z-index:-1}.ht_editor_visible{z-index:200}.handsontable td.area{position:relative}.handsontable td.area:before{content:"";background:var(--ht-cell-selection-background-color,#1a42e8);position:absolute;inset:0}.handsontable td.area-1{position:relative}.handsontable td.area-1:before{content:"";background:var(--ht-cell-selection-background-color,#1a42e8);position:absolute;inset:0}.handsontable td.area-2{position:relative}.handsontable td.area-2:before{content:"";background:var(--ht-cell-selection-background-color,#1a42e8);position:absolute;inset:0}.handsontable td.area-3{position:relative}.handsontable td.area-3:before{content:"";background:var(--ht-cell-selection-background-color,#1a42e8);position:absolute;inset:0}.handsontable td.area-4{position:relative}.handsontable td.area-4:before{content:"";background:var(--ht-cell-selection-background-color,#1a42e8);position:absolute;inset:0}.handsontable td.area-5{position:relative}.handsontable td.area-5:before{content:"";background:var(--ht-cell-selection-background-color,#1a42e8);position:absolute;inset:0}.handsontable td.area-6{position:relative}.handsontable td.area-6:before{content:"";background:var(--ht-cell-selection-background-color,#1a42e8);position:absolute;inset:0}.handsontable td.area-7{position:relative}.handsontable td.area-7:before{content:"";background:var(--ht-cell-selection-background-color,#1a42e8);position:absolute;inset:0}.handsontable td.area:before{opacity:.14}.handsontable td.area-1:before{opacity:.21}.handsontable td.area-2:before{opacity:.28}.handsontable td.area-3:before{opacity:.35}.handsontable td.area-4:before{opacity:.42}.handsontable td.area-5:before{opacity:.49}.handsontable td.area-6:before{opacity:.56}.handsontable td.area-7:before{opacity:.63}.handsontable td.area{border-color:color-mix(in srgb,var(--ht-border-color),var(--ht-foreground-color)10%)}.handsontable .wtSelectionHandle{box-sizing:border-box;z-index:115;background:var(--ht-cell-selection-handle-background-color);border:var(--ht-cell-selection-handle-border-width)solid var(--ht-cell-selection-handle-border-color);border-radius:var(--ht-cell-selection-handle-border-radius);animation:ht-selection-handle-fade-in var(--ht-table-transition)ease-in-out backwards;position:absolute}.handsontable .wtSelectionHandle:hover{background:color-mix(in srgb,var(--ht-cell-selection-handle-border-color)30%,var(--ht-cell-selection-handle-background-color))}@media (prefers-reduced-motion:reduce){.handsontable .wtSelectionHandle{animation:none}}.handsontable .wtSelectionHandle--top,.handsontable .wtSelectionHandle--bottom{width:var(--ht-cell-selection-handle-length);height:var(--ht-cell-selection-handle-size);cursor:ns-resize}.handsontable .wtSelectionHandle--start,.handsontable .wtSelectionHandle--end{width:var(--ht-cell-selection-handle-size);height:var(--ht-cell-selection-handle-length);cursor:ew-resize}.handsontable.ht__resizing-selection--top .wtSelectionHandle:not(.wtSelectionHandle--top),.handsontable.ht__resizing-selection--bottom .wtSelectionHandle:not(.wtSelectionHandle--bottom),.handsontable.ht__resizing-selection--start .wtSelectionHandle:not(.wtSelectionHandle--start),.handsontable.ht__resizing-selection--end .wtSelectionHandle:not(.wtSelectionHandle--end){display:none!important}.handsontable.ht__resizing-selection--top,.handsontable.ht__resizing-selection--top *,.handsontable.ht__resizing-selection--bottom,.handsontable.ht__resizing-selection--bottom *{cursor:ns-resize!important}.handsontable.ht__resizing-selection--start,.handsontable.ht__resizing-selection--start *,.handsontable.ht__resizing-selection--end,.handsontable.ht__resizing-selection--end *{cursor:ew-resize!important}.handsontable.ht__resizing-selection--top .wtSelectionHandle--top,.handsontable.ht__resizing-selection--bottom .wtSelectionHandle--bottom,.handsontable.ht__resizing-selection--start .wtSelectionHandle--start,.handsontable.ht__resizing-selection--end .wtSelectionHandle--end{background:color-mix(in srgb,var(--ht-cell-selection-handle-border-color)30%,var(--ht-cell-selection-handle-background-color))}.handsontable .wtMoveZone{cursor:grab}.handsontable .wtMoveZone:active,.handsontable.ht__moving{cursor:grabbing}.handsontable.ht__moving *{cursor:grabbing!important}.handsontable.ht__moving .wtBorder.area,.handsontable.ht__moving .wtBorder.current{display:none!important}.handsontable.ht__moving .wtSelectionHandle,.handsontable.ht__moving .wtMoveZone{visibility:hidden!important}.handsontable .wtBorder{font-size:0;position:absolute}.handsontable .wtBorder:first-child,.handsontable .wtBorder:nth-child(3){z-index:2}.handsontable .wtBorder:nth-child(2),.handsontable .wtBorder:nth-child(4){z-index:1}.handsontable .wtBorder.hidden{display:none!important}.handsontable .wtBorder.current{z-index:10;background-color:var(--ht-cell-selection-border-color)!important}.handsontable .wtBorder.area{z-index:8;background-color:var(--ht-cell-selection-border-color)!important}.handsontable .wtBorder.fill{z-index:6;background-color:var(--ht-cell-autofill-fill-border-color,#68696c)!important}.handsontable .wtBorder.corner{cursor:crosshair;z-index:110;font-size:0;border-radius:var(--ht-cell-autofill-border-radius)!important;background-color:var(--ht-cell-autofill-background-color,#1a42e8)!important;border-color:var(--ht-cell-autofill-border-color)!important}.handsontable .wtBorder.corner:after{content:"";border-radius:var(--ht-cell-autofill-border-radius);inset:min(0px,(var(--ht-cell-autofill-size) - var(--ht-cell-autofill-hit-area-size))/2);background:0 0;position:absolute}.handsontable .wtBorder.corner.wtCornerInlineEndEdge:after{inset-inline-end:0}.handsontable .wtBorder.corner.wtCornerBlockEndEdge:after{inset-block-end:0}@media print{.handsontable .wtBorder.current,.handsontable .wtBorder.area,.handsontable .wtBorder.fill,.handsontable .wtBorder.corner,.handsontable .wtSelectionHandle,.handsontable .topSelectionHandle,.handsontable .bottomSelectionHandle,.handsontable .topSelectionHandle-HitArea,.handsontable .bottomSelectionHandle-HitArea,.handsontable .wtMoveZone,.handsontable td.area:before{display:none!important}}@keyframes ht-selection-handle-fade-in{0%{opacity:0}to{opacity:1}}.hot-display-license-info{font-family:var(--ht-font-family),-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;padding:var(--ht-license-vertical-padding,16px)var(--ht-license-horizontal-padding,16px);font-size:var(--ht-font-size-small);line-height:var(--ht-line-height-small);color:var(--ht-license-foreground-color);background-color:var(--ht-license-background-color,#f7f7f9);text-align:left;min-width:300px}.hot-display-license-info a{font-size:var(--ht-license-font-size);color:var(--ht-link-color)}.hot-display-license-info a:hover{color:var(--ht-link-hover-color)}.ht-license-badge-wrapper{z-index:1050;pointer-events:none;position:absolute;inset:0;overflow:hidden}.ht-license-badge-on .ht-license-badge-corner thead tr:first-child th:first-child:after{content:"";inline-size:min(var(--ht-license-badge-size,16px),100%);block-size:min(var(--ht-license-badge-size,16px),100%);background-color:var(--ht-license-badge-color,var(--ht-disabled-color,#a3a3a3));pointer-events:none;background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg width=%2711.1415%27 height=%2716%27 viewBox=%270 0 11.1415 16%27 fill=%27none%27 xmlns=%27http://www.w3.org/2000/svg%27%3E%3Cpath d=%27M7.96408 12.8226H11.1415V16H7.96408V12.8226Z%27 fill=%27%231A42E8%27/%3E%3C/svg%3E");background-position:50%;background-repeat:no-repeat;background-size:contain;margin:auto;position:absolute;inset:0;inset-inline-start:clamp(0px,100% - var(--ht-license-badge-size,16px),6px);mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg width=%2711.1415%27 height=%2716%27 viewBox=%270 0 11.1415 16%27 fill=%27none%27 xmlns=%27http://www.w3.org/2000/svg%27%3E%3Cpath d=%27M4.61799e-05 3.17744H2.06687V7.04929H5.89738V3.17744H7.96421V12.8226H5.89738V8.84054H2.06687V12.8226H4.61799e-05V3.17744Z%27 fill=%27%23000%27/%3E%3Cpath d=%27M7.96408 12.8226H11.1415V16H7.96408V12.8226Z%27 fill=%27%23000%27/%3E%3C/svg%3E");mask-position:50%;mask-size:contain;mask-repeat:no-repeat}.ht-license-badge-on .ht-license-badge-corner thead tr:first-child th:first-child:hover:after{background-color:var(--ht-license-badge-hover-color,var(--ht-read-only-color,#68696c))}[dir=rtl] .ht-license-badge-on .ht-license-badge-corner thead tr:first-child th:first-child:after{inset-inline-start:0;inset-inline-end:clamp(0px,100% - var(--ht-license-badge-size,16px),6px)}.ht-license-badge{clip-path:inset(50%);white-space:nowrap;color:#0000;background:0 0;border:0;block-size:1px;inline-size:1px;margin:0;padding:0;position:absolute;inset-block-start:0;inset-inline-start:0;overflow:hidden}.ht-license-popover{font-family:var(--ht-font-family),-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;z-index:1051;inline-size:auto;max-inline-size:min(var(--ht-license-popover-width,320px),100vw - 32px);border-radius:var(--ht-border-radius,8px);background-color:var(--ht-license-popover-background-color,#16171a);max-block-size:100%;color:var(--ht-license-popover-foreground-color,#fff);font-size:var(--ht-font-size-small,12px);line-height:var(--ht-line-height-small,18px);text-align:start;pointer-events:auto;box-shadow:var(--ht-shadow-x,0)var(--ht-shadow-y,0)var(--ht-shadow-blur,8px)color-mix(in srgb,var(--ht-shadow-color,#000)var(--ht-shadow-opacity,100%),transparent);border-start-start-radius:0;flex-direction:column;padding:16px;display:none;position:absolute;inset-block-start:0;inset-inline-start:var(--ht-license-badge-area-width,50px);inset-inline-end:0;overflow:visible}.ht-license-popover:before{content:"";border-block-start:var(--ht-license-popover-tail-size,5px)solid var(--ht-license-popover-background-color,#16171a);border-inline-start:var(--ht-license-popover-tail-size,5px)solid #0000;block-size:0;inline-size:0;position:absolute;inset-block-start:0;inset-inline-end:100%}.ht-license-popover__content{min-block-size:0;overflow-y:auto}.ht-license-badge-wrapper.is-corner-hover:not(.is-dismissed) .ht-license-popover,.ht-license-badge-wrapper:not(.is-dismissed):hover .ht-license-popover,.ht-license-popover.is-open{display:flex}.ht-license-badge-wrapper.is-cornerless .ht-license-badge{display:none}.ht-license-badge-wrapper.is-cornerless .ht-license-popover{border-start-start-radius:var(--ht-border-radius,8px);inset-inline-start:0}.ht-license-badge-wrapper.is-cornerless .ht-license-popover:before{display:none}.ht-license-popover__title{margin-block-end:8px;padding-inline-end:16px;font-weight:700}.ht-license-popover__body{color:var(--ht-license-popover-body-color,#d5d6d8);margin:0 0 12px}.ht-license-popover__link{color:var(--ht-license-popover-link-color,#3ba0ff);text-decoration:none}.ht-license-popover__link:hover{text-decoration:underline}.ht-license-popover__close{block-size:20px;inline-size:20px;color:inherit;cursor:pointer;background:0 0;border:0;justify-content:center;align-items:center;padding:0;line-height:1;display:flex;position:absolute;inset-block-start:12px;inset-inline-end:12px}.ht-license-popover__close:before{content:"\u2715";font-size:14px}.ht-dialog.ht-license-lock{z-index:1070}.ht-dialog.ht-license-lock:before{content:"";block-size:calc(var(--ht-line-height,20px) + var(--ht-density-cell-vertical,4px)*2);background-color:var(--ht-header-background-color);border-block-end:1px solid var(--ht-cell-horizontal-border-color,var(--ht-border-color));position:absolute;inset-block-start:0;inset-inline:0}.ht-dialog.ht-license-lock:after{content:"";inline-size:calc(var(--ht-license-badge-size,16px)*.696344);block-size:var(--ht-license-badge-size,16px);background-color:var(--ht-license-badge-color,var(--ht-disabled-color,#a3a3a3));position:absolute;inset-block-start:calc(var(--ht-density-cell-vertical,4px) + (var(--ht-line-height,20px) - var(--ht-license-badge-size,16px))/2);inset-inline-start:var(--ht-cell-horizontal-padding,8px);mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg width=%2711.1415%27 height=%2716%27 viewBox=%270 0 11.1415 16%27 fill=%27none%27 xmlns=%27http://www.w3.org/2000/svg%27%3E%3Cpath d=%27M4.61799e-05 3.17744H2.06687V7.04929H5.89738V3.17744H7.96421V12.8226H5.89738V8.84054H2.06687V12.8226H4.61799e-05V3.17744Z%27 fill=%27%23000%27/%3E%3Cpath d=%27M7.96408 12.8226H11.1415V16H7.96408V12.8226Z%27 fill=%27%23000%27/%3E%3C/svg%3E");mask-size:contain;mask-repeat:no-repeat}.ht-dialog.ht-license-lock .ht-dialog__content-wrapper{padding-block-start:calc(var(--ht-line-height,20px) + var(--ht-density-cell-vertical,4px)*2)}.ht-dialog.ht-license-lock .ht-dialog__content-wrapper-inner,.ht-dialog.ht-license-lock .ht-dialog__content{min-inline-size:0}.ht-dialog.ht-license-lock a.ht-button{text-decoration:none;display:inline-block}.ht-dialog.ht-license-lock .ht-dialog__title,.ht-dialog.ht-license-lock .ht-dialog__description{word-break:break-word;overflow-wrap:break-word}.ht-license-powered-by{font-family:var(--ht-font-family),-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;padding:var(--ht-license-vertical-padding,8px)var(--ht-license-horizontal-padding,16px);font-size:var(--ht-font-size-small,12px);line-height:var(--ht-line-height-small,18px);color:var(--ht-license-foreground-color,#222);background-color:var(--ht-license-background-color,#f7f7f9);text-align:start;align-items:center;display:flex}.ht-license-powered-by .ht-license-powered-by__link{color:inherit;align-items:flex-start;gap:8px;text-decoration:none;display:inline-flex}.ht-license-powered-by .ht-license-powered-by__link:hover{color:inherit;text-decoration:none}.ht-license-powered-by .ht-license-powered-by__link:focus-visible{outline:2px solid var(--ht-accent-color);outline-offset:2px}.ht-license-powered-by__logo{block-size:16px;inline-size:11.1415px;background-color:light-dark(#000,#fff);background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg width=%2711.1415%27 height=%2716%27 viewBox=%270 0 11.1415 16%27 fill=%27none%27 xmlns=%27http://www.w3.org/2000/svg%27%3E%3Cpath d=%27M7.96408 12.8226H11.1415V16H7.96408V12.8226Z%27 fill=%27%231A42E8%27/%3E%3C/svg%3E");background-position:50%;background-repeat:no-repeat;background-size:contain;flex-shrink:0;margin-block-start:max(0px,(var(--ht-line-height-small,18px) - 16px)/2);mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg width=%2711.1415%27 height=%2716%27 viewBox=%270 0 11.1415 16%27 fill=%27none%27 xmlns=%27http://www.w3.org/2000/svg%27%3E%3Cpath d=%27M4.61799e-05 3.17744H2.06687V7.04929H5.89738V3.17744H7.96421V12.8226H5.89738V8.84054H2.06687V12.8226H4.61799e-05V3.17744Z%27 fill=%27%23000%27/%3E%3Cpath d=%27M7.96408 12.8226H11.1415V16H7.96408V12.8226Z%27 fill=%27%23000%27/%3E%3C/svg%3E");mask-position:50%;mask-size:contain;mask-repeat:no-repeat}@media (forced-colors:active){.ht-license-powered-by__logo{forced-color-adjust:none;background-color:canvastext;background-image:none}}.handsontable td a.ht-link{color:var(--ht-link-color);text-decoration:underline}.handsontable td a.ht-link:hover{color:var(--ht-link-hover-color)}.handsontable td a.ht-link .ht-link-scheme{display:none}.ht-icon{width:var(--ht-icon-size);height:var(--ht-icon-size);vertical-align:middle;text-indent:0;pointer-events:none;flex-shrink:0;display:inline-block}.ht-icon.ht-icon--external{font-size:var(--ht-icon-size);text-align:center;background-color:#0000;line-height:1;mask-image:none}.ht-icon--flip-rtl:dir(rtl){transform:scaleX(-1)}.handsontable .htAutocompleteArrow{cursor:default;width:var(--ht-icon-size);height:var(--ht-icon-size);float:right;top:calc((var(--ht-line-height) - var(--ht-icon-size))/2);margin-inline-start:calc(var(--ht-gap-size)*2);margin-inline-end:1px;font-size:0;position:relative}.handsontable .htAutocompleteArrow .ht-icon{opacity:.6;position:absolute;top:0;left:0}.handsontable td.htAutocomplete{padding-inline-end:calc(var(--ht-cell-horizontal-padding) + var(--ht-icon-size) + var(--ht-gap-size)*2 + 1px);position:relative}.handsontable td.htAutocomplete .htAutocompleteArrow{float:none;inset-inline-end:calc(var(--ht-cell-horizontal-padding) + 1px);top:calc(var(--ht-cell-vertical-padding) + (var(--ht-line-height) - var(--ht-icon-size))/2);margin:0;position:absolute}.handsontable td.htAutocomplete.htMiddle .htAutocompleteArrow{top:50%;transform:translateY(-50%)}.handsontable td.htAutocomplete.htBottom .htAutocompleteArrow{top:auto;inset-block-end:calc(var(--ht-cell-vertical-padding) + (var(--ht-line-height) - var(--ht-icon-size))/2)}.handsontable tr.htExactRow>td.htAutocomplete>.htCellClip{padding-inline-end:calc(var(--ht-icon-size) + var(--ht-gap-size)*2 + 1px)}.handsontable tr.htExactRow>td.htAutocomplete>.htCellClip .htAutocompleteArrow{inset-inline-end:1px;top:calc((var(--ht-line-height) - var(--ht-icon-size))/2)}.handsontable tr.htExactRow>td.htAutocomplete.htMiddle>.htCellClip .htAutocompleteArrow{top:50%;transform:translateY(-50%)}.handsontable tr.htExactRow>td.htAutocomplete.htBottom>.htCellClip .htAutocompleteArrow{top:auto;inset-block-end:calc((var(--ht-line-height) - var(--ht-icon-size))/2)}[dir=rtl].handsontable .htAutocompleteArrow{float:left}.handsontable .htCheckboxRendererInput{width:var(--ht-checkbox-size);height:var(--ht-checkbox-size);vertical-align:middle;cursor:pointer;appearance:none;margin:0;outline:none;margin-top:-2px;display:inline-block;position:relative}.handsontable .htCheckboxRendererInput:before{content:"";width:var(--ht-checkbox-size);height:var(--ht-checkbox-size);border-radius:var(--ht-checkbox-border-radius);border:1px solid var(--ht-checkbox-border-color);background-color:var(--ht-checkbox-background-color);box-sizing:border-box;pointer-events:none;transition:all var(--ht-table-transition)ease-in-out;display:inline-block;position:absolute;top:0;left:0}.handsontable .htCheckboxRendererInput+.ht-icon{color:var(--ht-checkbox-icon-color)}.handsontable .htCheckboxRendererInput:checked:before{border-color:var(--ht-checkbox-checked-border-color);background-color:var(--ht-checkbox-checked-background-color)}.handsontable .htCheckboxRendererInput:checked+.ht-icon{color:var(--ht-checkbox-checked-icon-color)}.handsontable .htCheckboxRendererInput:checked:disabled:before{border-color:var(--ht-checkbox-checked-disabled-border-color);background-color:var(--ht-checkbox-checked-disabled-background-color)}.handsontable .htCheckboxRendererInput:checked:disabled+.ht-icon{color:var(--ht-checkbox-checked-disabled-icon-color)}.handsontable .htCheckboxRendererInput:checked:focus:before{border-color:var(--ht-checkbox-checked-focus-border-color);background-color:var(--ht-checkbox-checked-focus-background-color)}.handsontable .htCheckboxRendererInput:checked:focus+.ht-icon{color:var(--ht-checkbox-checked-focus-icon-color)}.handsontable .htCheckboxRendererInput:focus:before{border-color:var(--ht-checkbox-focus-border-color);background-color:var(--ht-checkbox-focus-background-color);outline:1px solid var(--ht-checkbox-focus-ring-color)}.handsontable .htCheckboxRendererInput:focus+.ht-icon{color:var(--ht-checkbox-focus-icon-color)}.handsontable .htCheckboxRendererInput:disabled{cursor:initial;pointer-events:none}.handsontable .htCheckboxRendererInput:disabled:before{border-color:var(--ht-checkbox-disabled-border-color);background-color:var(--ht-checkbox-disabled-background-color)}.handsontable .htCheckboxRendererInput:disabled+.ht-icon{color:var(--ht-checkbox-disabled-icon-color)}.handsontable .htCheckboxRendererInput:indeterminate:before{border-color:var(--ht-checkbox-indeterminate-border-color);background-color:var(--ht-checkbox-indeterminate-background-color)}.handsontable .htCheckboxRendererInput:indeterminate+.ht-icon{color:var(--ht-checkbox-indeterminate-icon-color)}.handsontable .htCheckboxRendererInput:indeterminate:disabled:before{border-color:var(--ht-checkbox-indeterminate-disabled-border-color);background-color:var(--ht-checkbox-indeterminate-disabled-background-color)}.handsontable .htCheckboxRendererInput:indeterminate:disabled+.ht-icon{color:var(--ht-checkbox-indeterminate-disabled-icon-color)}.handsontable .htCheckboxRendererInput:indeterminate:focus:before{border-color:var(--ht-checkbox-indeterminate-focus-border-color);background-color:var(--ht-checkbox-indeterminate-focus-background-color)}.handsontable .htCheckboxRendererInput:indeterminate:focus+.ht-icon{color:var(--ht-checkbox-indeterminate-focus-icon-color)}.handsontable .htCheckboxRendererInput.noValue,.handsontable .htCheckboxRendererInput.noValue+.ht-icon{opacity:.5}.handsontable .htCheckboxRendererBox{width:var(--ht-checkbox-size);height:var(--ht-checkbox-size);vertical-align:middle;margin:-2px 0 0;line-height:0;display:inline-block;position:relative}.handsontable .htCheckboxRendererBox:first-child{margin-inline-end:var(--ht-gap-size)}.handsontable .htCheckboxRendererBox:last-child{margin-inline-start:var(--ht-gap-size)}.handsontable .htCheckboxRendererBox>.htCheckboxRendererInput{margin:0;display:block}.handsontable .htCheckboxRendererBox>.ht-icon{z-index:1;width:var(--ht-checkbox-size);height:var(--ht-checkbox-size);margin:0;position:absolute;inset:0}.handsontable :not(.htCheckboxRendererBox)>.htCheckboxRendererInput:not(:first-child){margin-inline-start:var(--ht-gap-size)}.handsontable :not(.htCheckboxRendererBox)>.htCheckboxRendererInput+.ht-icon{z-index:1;width:var(--ht-checkbox-size);height:var(--ht-checkbox-size);vertical-align:middle;margin-inline-start:calc(-1*var(--ht-checkbox-size));margin-top:-2px;position:relative}.handsontable :not(.htCheckboxRendererBox)>.htCheckboxRendererInput+.ht-icon:not(:last-child){margin-inline-end:var(--ht-gap-size)}.handsontable :not(.htCheckboxRendererBox)>.htCheckboxRendererInput:first-child:nth-last-child(2){margin-inline-start:var(--ht-gap-size)}.handsontable :not(.htCheckboxRendererBox)>.htCheckboxRendererInput:first-child:nth-last-child(2)+.ht-icon{margin-inline-end:var(--ht-gap-size)}.handsontable .htCheckboxRendererLabel{font-size:inherit;line-height:inherit;cursor:pointer;color:inherit;margin:0;display:inline-block;position:relative}.handsontable .htCheckboxRendererLabel.fullWidth{width:100%}.handsontable .htPlaceholder{color:var(--ht-placeholder-color)}.handsontable .htDimmed{color:var(--ht-read-only-color)!important;background-color:var(--ht-cell-read-only-background-color)!important}.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 .htInvalid{background-color:var(--ht-cell-error-background-color)!important}.handsontable .htNoWrap{white-space:nowrap}.handsontable .htSearchResult{background-color:var(--ht-cell-success-background-color)!important}.handsontable .ht-multi-select-renderer{padding:var(--ht-cell-vertical-padding)var(--ht-cell-horizontal-padding);overflow:hidden}.handsontable .ht-multi-select-arrow{cursor:default;width:var(--ht-icon-size);height:var(--ht-icon-size);float:right;top:calc((var(--ht-line-height) - var(--ht-icon-size))/2);font-size:0;line-height:inherit;font-weight:inherit;letter-spacing:inherit;margin-inline-start:calc(var(--ht-gap-size)*2);margin-inline-end:1px;font-family:inherit;position:relative}.handsontable .ht-multi-select-arrow .ht-icon{opacity:.6;position:absolute;top:0;left:0}.handsontable .ht-multi-select-chips-container{align-items:center;gap:var(--ht-gap-size);flex-wrap:nowrap;max-width:100%;display:flex;overflow:hidden}.handsontable .ht-multi-select-chip{align-items:center;gap:var(--ht-gap-size);padding:var(--ht-chip-vertical-padding)calc((var(--ht-line-height) - var(--ht-icon-size))/2)var(--ht-chip-vertical-padding)var(--ht-chip-horizontal-padding);border-radius:var(--ht-chip-border-radius);background:var(--ht-chip-background);white-space:nowrap;box-sizing:border-box;max-width:100px;font-size:inherit;line-height:inherit;font-weight:inherit;letter-spacing:inherit;flex-shrink:0;font-family:inherit;display:inline-flex}.handsontable .ht-multi-select-chip-label{text-overflow:ellipsis;color:var(--ht-foreground-color);padding:0 var(--ht-chip-gap);font-style:normal;font-size:inherit;line-height:inherit;font-weight:inherit;letter-spacing:inherit;font-family:inherit;overflow:hidden}.handsontable .ht-multi-select-chip-remove{cursor:pointer;color:var(--ht-icon-button-icon-color);font-size:inherit;line-height:inherit;font-weight:inherit;letter-spacing:inherit;background-position:50%;background-repeat:no-repeat;background-size:contain;flex-shrink:0;justify-content:center;align-items:center;padding:0;font-family:inherit;display:flex;position:relative;width:var(--ht-icon-size)!important;height:var(--ht-icon-size)!important}.handsontable .ht-multi-select-chip-remove .ht-icon{position:absolute;top:0;left:0}.handsontable .ht-multi-select-chip-remove:hover{background-color:var(--ht-icon-button-hover-background-color)}.handsontable .ht-multi-select-overflow{padding:var(--ht-chip-vertical-padding)var(--ht-chip-horizontal-padding);background:var(--ht-chip-background);border-radius:var(--ht-chip-border-radius);color:var(--ht-foreground-color);white-space:nowrap;font-size:inherit;line-height:inherit;font-weight:inherit;letter-spacing:inherit;flex-shrink:0;justify-content:center;align-items:center;font-family:inherit;display:inline-flex}[dir=rtl].handsontable .ht-multi-select-arrow{float:left}.handsontableInputHolder{position:absolute;top:0;left:0}.handsontableInputHolder .handsontableInput{padding:calc(var(--ht-cell-vertical-padding,4px) + 1px)calc(var(--ht-cell-horizontal-padding,8px) + 1px);color:var(--ht-cell-editor-foreground-color);background-color:var(--ht-cell-editor-background-color,#fff);box-shadow:inset 0 0 0 var(--ht-cell-editor-border-width,2px)var(--ht-cell-editor-border-color,#1a42e8),0 0 var(--ht-cell-editor-shadow-blur-radius,0)0 var(--ht-cell-editor-shadow-color,transparent);box-sizing:border-box;border:none;border-radius:0;outline-width:0;margin:0;display:block;font-family:inherit!important;font-size:inherit!important;line-height:inherit!important;-webkit-appearance:none!important}.handsontableInputHolder .handsontableInput:focus{outline:none}.htSelectEditor{position:absolute}.htSelectEditor select{width:100%;height:100%;padding:calc(var(--ht-cell-vertical-padding,4px) + 1px)calc(var(--ht-cell-horizontal-padding,8px) + 1px);white-space:nowrap;text-overflow:ellipsis;color:var(--ht-cell-editor-foreground-color);background-color:var(--ht-cell-editor-background-color,#fff);box-shadow:inset 0 0 0 var(--ht-cell-editor-border-width,2px)var(--ht-cell-editor-border-color,#1a42e8),0 0 var(--ht-cell-editor-shadow-blur-radius,0)0 var(--ht-cell-editor-shadow-color,transparent);box-sizing:border-box;border:none;border-radius:0;margin:0;padding-inline-end:26px;position:absolute;inset:0;overflow:hidden;font-family:inherit!important;font-size:inherit!important;line-height:inherit!important;-webkit-appearance:none!important}.htSelectEditor select:focus{outline:none}.htSelectEditor .htAutocompleteArrow{z-index:1;pointer-events:none;margin-inline-end:4px;top:50%;transform:translateY(-50%)}.handsontable.listbox{box-shadow:var(--ht-menu-shadow-x,0)var(--ht-menu-shadow-y,0)var(--ht-menu-shadow-blur,8px)color-mix(in srgb,var(--ht-menu-shadow-color,#000)var(--ht-menu-shadow-opacity,100%),transparent);border:var(--ht-menu-border-width,1px)solid var(--ht-menu-border-color,#e5e5e9);margin:0}.handsontable.listbox .ht_master{background-color:var(--ht-background-color);overflow:hidden}.handsontable.listbox .wtHolder{overflow:auto;border-radius:0!important}.handsontable.listbox .wtHider,.handsontable.listbox .htCore{border-radius:0!important}.handsontable.listbox table{overflow:hidden}.handsontable.listbox table th,.handsontable.listbox table tr:first-child th,.handsontable.listbox table tr:last-child th,.handsontable.listbox table tr:first-child td,.handsontable.listbox table td{border-color:#0000!important}.handsontable.listbox table th,.handsontable.listbox table td{white-space:nowrap;text-overflow:ellipsis;border-radius:0!important}.handsontable.listbox table .wtBorder{visibility:hidden}.handsontable.listbox table strong{color:inherit;font-weight:700}.handsontable.listbox table tr td:hover td{cursor:pointer;background:color-mix(in srgb,var(--ht-menu-item-hover-color)var(--ht-menu-item-hover-color-opacity,100%),transparent)!important;box-shadow:none!important}.handsontable.listbox table td{transition:var(--ht-table-transition)background ease-in-out}.handsontable.listbox table td:hover{cursor:pointer;background-color:color-mix(in srgb,var(--ht-menu-item-hover-color)var(--ht-menu-item-hover-color-opacity,100%),transparent)!important}.handsontable.listbox table td.current:not([aria-expanded=true]){box-shadow:inset 0 0 0 1px var(--ht-accent-color)}.handsontable.listbox table td.htDimmed{cursor:default;font-style:inherit;color:inherit!important}.handsontable.listbox table td.htDimmed:not(.handsontable.listbox table td:hover){background-color:inherit!important}.handsontable.listbox table thead th{text-align:left;height:auto!important}.handsontable.listbox table thead th .relative{padding-top:calc(var(--ht-cell-vertical-padding) + var(--ht-gap-size));padding-bottom:calc(var(--ht-cell-vertical-padding) + var(--ht-gap-size))}.handsontable.listbox .ht_clone_top .wtHider{overflow:hidden}.handsontable.listbox .ht_clone_top table{border-radius:0}.handsontable.listbox .htBorders div{background:0 0!important}.handsontable.autocompleteEditor tr.ht__row_even th,.handsontable.autocompleteEditor tr.ht__row_even td,.handsontable.autocompleteEditor tr.ht__row_odd th,.handsontable.autocompleteEditor tr.ht__row_odd td{background-color:var(--ht-background-color,#fff)}[dir=rtl].handsontable.listbox table thead th{text-align:right}.handsontableEditor{position:absolute}.handsontableEditor .ht-multi-select-editor{box-shadow:var(--ht-menu-shadow-x,0)var(--ht-menu-shadow-y,0)var(--ht-menu-shadow-blur,8px)color-mix(in srgb,var(--ht-menu-shadow-color,#000)var(--ht-menu-shadow-opacity,100%),transparent);scrollbar-width:auto;scrollbar-color:var(--ht-scrollbar-thumb-color)var(--ht-scrollbar-track-color);border-radius:0 0 var(--ht-menu-border-radius)var(--ht-menu-border-radius);border:var(--ht-menu-border-width)solid var(--ht-menu-border-color);background:var(--ht-background-color);width:max-content;min-width:120px;padding:var(--ht-menu-vertical-padding)var(--ht-menu-horizontal-padding);overflow-y:auto}.handsontableEditor .ht-multi-select-editor .ht-multi-select-editor-search-input-wrapper{padding:var(--ht-menu-item-vertical-padding)var(--ht-menu-item-horizontal-padding);align-items:center;gap:var(--ht-gap-size);align-self:stretch;display:flex;position:relative}.handsontableEditor .ht-multi-select-editor .ht-multi-select-editor-search-input-wrapper .ht-icon-search{left:calc(var(--ht-menu-item-horizontal-padding) + 10px);opacity:.5;z-index:1;width:16px;height:16px;position:absolute;top:50%;transform:translateY(-50%)}.handsontableEditor .ht-multi-select-editor input.ht-multi-select-editor-search-input{box-sizing:border-box;border-radius:var(--ht-input-border-radius);width:100%;color:var(--ht-input-foreground-color);background-color:var(--ht-input-background-color);border:1px solid var(--ht-input-border-color);transition:var(--ht-table-transition)all ease-in-out;line-height:var(--ht-line-height);font-size:var(--ht-font-size);padding:var(--ht-input-vertical-padding)var(--ht-menu-item-horizontal-padding)var(--ht-input-vertical-padding)32px}.handsontableEditor .ht-multi-select-editor input.ht-multi-select-editor-search-input:hover{border-color:var(--ht-input-hover-border-color);color:var(--ht-input-hover-foreground-color);background-color:var(--ht-input-hover-background-color)}.handsontableEditor .ht-multi-select-editor input.ht-multi-select-editor-search-input:disabled{border-color:var(--ht-input-disabled-border-color);color:var(--ht-input-disabled-foreground-color);background-color:var(--ht-input-disabled-background-color)}.handsontableEditor .ht-multi-select-editor input.ht-multi-select-editor-search-input:focus{border-color:var(--ht-input-focus-border-color);color:var(--ht-input-focus-foreground-color);background-color:var(--ht-input-focus-background-color);outline-offset:0;box-shadow:none;outline:none}.handsontableEditor .ht-multi-select-editor input.ht-multi-select-editor-search-input::placeholder{color:var(--ht-foreground-color);opacity:.6}.handsontableEditor .ht-multi-select-editor .ht-multi-select-editor-separator{background-color:var(--ht-menu-border-color);width:100%;height:1px;margin:var(--ht-menu-vertical-padding)0 var(--ht-menu-vertical-padding)0;padding:0}.handsontableEditor .ht-multi-select-editor ul{width:100%;padding:var(--ht-gap-size)var(--ht-menu-horizontal-padding);flex-direction:column;align-items:flex-start;margin:0;list-style:none;display:flex}.handsontableEditor .ht-multi-select-editor ul li{background:var(--ht-background-color);padding:var(--ht-menu-item-vertical-padding)var(--ht-menu-item-horizontal-padding);-webkit-user-select:none;user-select:none;cursor:pointer;align-self:stretch;align-items:center;display:flex}.handsontableEditor .ht-multi-select-editor ul li *{cursor:pointer}.handsontableEditor .ht-multi-select-editor ul li.ht-multi-select-editor-item-selected{background:color-mix(in srgb,var(--ht-menu-item-active-color)var(--ht-menu-item-active-color-opacity,100%),transparent)}.handsontableEditor .ht-multi-select-editor ul li div{flex:1 0 0;align-items:center;display:flex}.handsontableEditor .ht-multi-select-editor ul li div input{appearance:none;width:var(--ht-checkbox-size);height:var(--ht-checkbox-size);flex-shrink:0;margin:0;padding:0;display:flex;position:relative}.handsontableEditor .ht-multi-select-editor ul li div input:before{content:"";box-sizing:border-box;width:var(--ht-checkbox-size);height:var(--ht-checkbox-size);border-radius:var(--ht-checkbox-border-radius);border:1px solid var(--ht-checkbox-border-color);background:var(--ht-checkbox-background-color);background-position:50%;background-repeat:no-repeat;display:block;position:absolute;top:0;left:0}.handsontableEditor .ht-multi-select-editor ul li div input:checked:before{border-color:var(--ht-checkbox-checked-border-color);background:var(--ht-checkbox-checked-background-color)}.handsontableEditor .ht-multi-select-editor ul li div input:focus{outline:none}.handsontableEditor .ht-multi-select-editor ul li div input+.ht-icon{z-index:1;width:var(--ht-checkbox-size);height:var(--ht-checkbox-size);color:var(--ht-checkbox-icon-color);margin-inline-start:calc(-1*var(--ht-checkbox-size));position:relative}.handsontableEditor .ht-multi-select-editor ul li div input:checked+.ht-icon{color:var(--ht-checkbox-checked-icon-color)}.handsontableEditor .ht-multi-select-editor ul li div label{color:var(--ht-foreground-color);text-overflow:ellipsis;font-size:var(--ht-font-size);font-style:normal;font-weight:400;line-height:var(--ht-line-height);letter-spacing:var(--ht-letter-spacing);width:100%;padding:0;padding-inline-start:var(--ht-gap-size);overflow:hidden}.handsontableEditor .ht-multi-select-editor ul li:hover,.handsontableEditor .ht-multi-select-editor ul li:has(input:focus){background:color-mix(in srgb,var(--ht-menu-item-hover-color)var(--ht-menu-item-hover-color-opacity,100%),transparent)}.handsontable .htUISelectCaption{width:100%;padding:var(--ht-input-vertical-padding)var(--ht-input-horizontal-padding);font-family:inherit;font-size:var(--ht-font-size);line-height:var(--ht-line-height);font-weight:var(--ht-font-weight);border-radius:var(--ht-input-border-radius);box-sizing:border-box;cursor:pointer;border:var(--ht-input-border-width)solid var(--ht-input-border-color);color:var(--ht-input-foreground-color);background-color:var(--ht-input-background-color);text-overflow:ellipsis;white-space:nowrap;transition:var(--ht-table-transition)all ease-in-out;margin:0;padding-inline-end:calc(var(--ht-input-horizontal-padding) + var(--ht-icon-size));overflow:hidden;outline:none!important}.handsontable .htUISelectCaption .ht-icon{inset-inline-end:calc(var(--ht-input-horizontal-padding) - var(--ht-icon-size)/4);position:absolute;top:50%;transform:translateY(-50%)}.handsontable .htUISelectCaption:hover{border-color:var(--ht-input-hover-border-color);color:var(--ht-input-hover-foreground-color);background-color:var(--ht-input-hover-background-color)}.handsontable .htUISelectCaption:disabled{border-color:var(--ht-input-disabled-border-color);color:var(--ht-input-disabled-foreground-color);background-color:var(--ht-input-disabled-background-color)}.handsontable .htUISelectCaption:focus{border-color:var(--ht-input-focus-border-color);color:var(--ht-input-focus-foreground-color);background-color:var(--ht-input-focus-background-color)}.handsontable .htUISelect{cursor:pointer;position:relative;outline:none!important}.handsontable .htUISelect:focus .htUISelectCaption{border-color:var(--ht-input-focus-border-color);color:var(--ht-input-focus-foreground-color);background-color:var(--ht-input-focus-background-color)}.handsontable .htFiltersMenuCondition .htUIInput input,.handsontable .htFiltersMenuValue .htUIMultipleSelectSearch input{width:100%;padding:var(--ht-input-vertical-padding)var(--ht-input-horizontal-padding);font-family:inherit;font-size:var(--ht-font-size);line-height:var(--ht-line-height);font-weight:var(--ht-font-weight);border-radius:var(--ht-input-border-radius);box-sizing:border-box;cursor:pointer;border:var(--ht-input-border-width)solid var(--ht-input-border-color);color:var(--ht-input-foreground-color);background-color:var(--ht-input-background-color);transition:var(--ht-table-transition)all ease-in-out;outline:none!important}.handsontable .htFiltersMenuCondition .htUIInput input:hover,.handsontable .htFiltersMenuValue .htUIMultipleSelectSearch input:hover{border-color:var(--ht-input-hover-border-color);color:var(--ht-input-hover-foreground-color);background-color:var(--ht-input-hover-background-color)}.handsontable .htFiltersMenuCondition .htUIInput input:disabled,.handsontable .htFiltersMenuValue .htUIMultipleSelectSearch input:disabled{border-color:var(--ht-input-disabled-border-color);color:var(--ht-input-disabled-foreground-color);background-color:var(--ht-input-disabled-background-color)}.handsontable .htFiltersMenuCondition .htUIInput input:focus,.handsontable .htFiltersMenuValue .htUIMultipleSelectSearch input:focus{border-color:var(--ht-input-focus-border-color);color:var(--ht-input-focus-foreground-color);background-color:var(--ht-input-focus-background-color)}.handsontable .htUIInput{text-align:center;padding:0;position:relative;outline:none!important}.handsontable .htUIInputIcon{position:absolute}.handsontable .htUIInput.htUIButton input,.handsontable .ht-button{min-width:64px;padding:var(--ht-button-vertical-padding)var(--ht-button-horizontal-padding);font-family:inherit;font-size:var(--ht-font-size);line-height:var(--ht-line-height);font-weight:var(--ht-font-weight);border-radius:var(--ht-button-border-radius);box-sizing:border-box;cursor:pointer;transition:var(--ht-table-transition)all ease-in-out;border-style:solid;border-width:1px;outline:none!important}.handsontable .htUIInput.htUIButtonCancel input,.handsontable .ht-button--secondary{border-color:var(--ht-secondary-button-border-color);background-color:var(--ht-secondary-button-background-color);color:var(--ht-secondary-button-foreground-color)}.handsontable .htUIInput.htUIButtonCancel input:hover,.handsontable .ht-button--secondary:hover{border-color:var(--ht-secondary-button-hover-border-color);background-color:var(--ht-secondary-button-hover-background-color);color:var(--ht-secondary-button-hover-foreground-color)}.handsontable .htUIInput.htUIButtonCancel input:disabled,.handsontable .ht-button--secondary:disabled{border-color:var(--ht-secondary-button-disabled-border-color);background-color:var(--ht-secondary-button-disabled-background-color);color:var(--ht-secondary-button-disabled-foreground-color)}.handsontable .htUIInput.htUIButtonCancel input:focus,.handsontable .ht-button--secondary:focus{border-color:var(--ht-secondary-button-focus-border-color);background-color:var(--ht-secondary-button-focus-background-color);color:var(--ht-secondary-button-focus-foreground-color);box-shadow:0 0 0 1px var(--ht-accent-color)}.htUIInput.htUIButtonOK input,.ht-button--primary{border-color:var(--ht-primary-button-border-color);background-color:var(--ht-primary-button-background-color);color:var(--ht-primary-button-foreground-color)}.htUIInput.htUIButtonOK input:hover,.ht-button--primary:hover{border-color:var(--ht-primary-button-hover-border-color);background-color:var(--ht-primary-button-hover-background-color);color:var(--ht-primary-button-hover-foreground-color)}.htUIInput.htUIButtonOK input:disabled,.ht-button--primary:disabled{border-color:var(--ht-primary-button-disabled-border-color);background-color:var(--ht-primary-button-disabled-background-color);color:var(--ht-primary-button-disabled-foreground-color)}.htUIInput.htUIButtonOK input:focus,.ht-button--primary:focus{border-color:var(--ht-primary-button-focus-border-color);background-color:var(--ht-primary-button-focus-background-color);color:var(--ht-primary-button-focus-foreground-color);box-shadow:0 0 0 1px var(--ht-accent-color)}.handsontable .htUIRadio{padding:var(--ht-gap-size)calc(2*var(--ht-gap-size));align-items:center;gap:var(--ht-gap-size);cursor:pointer;margin:0;padding-bottom:0;display:inline-flex;position:relative}.handsontable .htUIRadio:first-child{padding-inline-start:0}.handsontable .htUIRadio>input[type=radio]{width:var(--ht-radio-size);height:var(--ht-radio-size);appearance:none;cursor:pointer;border-radius:calc(.5*var(--ht-radio-size));outline:none;margin:0;position:relative}.handsontable .htUIRadio>input[type=radio]:before{content:"";border-radius:calc(.5*var(--ht-radio-size));border:1px solid var(--ht-radio-border-color);background-color:var(--ht-radio-background-color);display:block;position:absolute;inset:0}.handsontable .htUIRadio>input[type=radio]:checked:before{border-color:var(--ht-radio-checked-border-color);background-color:var(--ht-radio-checked-background-color)}.handsontable .htUIRadio>input[type=radio]:checked:disabled{cursor:initial}.handsontable .htUIRadio>input[type=radio]:checked:disabled:before{border-color:var(--ht-radio-checked-disabled-border-color);background-color:var(--ht-radio-checked-disabled-background-color)}.handsontable .htUIRadio>input[type=radio]:checked:focus:before{border-color:var(--ht-radio-checked-focus-border-color);background-color:var(--ht-radio-checked-focus-background-color)}.handsontable .htUIRadio>input[type=radio]:disabled{cursor:initial}.handsontable .htUIRadio>input[type=radio]:disabled:before{border-color:var(--ht-radio-disabled-border-color);background-color:var(--ht-radio-disabled-background-color)}.handsontable .htUIRadio>input[type=radio]:focus:before{border-color:var(--ht-radio-focus-border-color);background-color:var(--ht-radio-focus-background-color);outline:1px solid var(--ht-radio-focus-ring-color)}.handsontable .htUIRadio>input[type=radio]+.ht-icon{z-index:1;color:var(--ht-radio-icon-color);position:absolute}.handsontable .htUIRadio>input[type=radio]:checked+.ht-icon{color:var(--ht-radio-checked-icon-color)}.handsontable .htUIRadio>input[type=radio]:checked:disabled+.ht-icon{color:var(--ht-radio-checked-disabled-icon-color)}.handsontable .htUIRadio>input[type=radio]:checked:focus+.ht-icon{color:var(--ht-radio-checked-focus-icon-color)}.handsontable .htUIRadio>input[type=radio]:disabled+.ht-icon{color:var(--ht-radio-disabled-icon-color)}.handsontable .htUIRadio>input[type=radio]:focus+.ht-icon{color:var(--ht-radio-focus-icon-color)}.handsontable .htUIRadio label{vertical-align:middle;cursor:pointer;color:inherit}.handsontable .htUIRadio label:before{content:"";display:block;position:absolute;inset:0}.handsontable .collapsibleIndicator,.handsontable .ht_nestingButton{width:var(--ht-icon-button-hit-area-size);height:var(--ht-icon-button-hit-area-size);margin:calc(-1*(var(--ht-icon-button-hit-area-size) - var(--ht-icon-size))/2 + 1px);box-sizing:border-box;cursor:pointer;text-indent:-100px;flex-shrink:0;font-size:0;position:relative;overflow:visible}.handsontable .collapsibleIndicator>.ht-icon,.handsontable .ht_nestingButton>.ht-icon{width:var(--ht-icon-size);height:var(--ht-icon-size);margin-top:calc(-.5*var(--ht-icon-size));margin-left:calc(-.5*var(--ht-icon-size));border-radius:var(--ht-collapse-button-border-radius);transition:var(--ht-table-transition)all ease-in-out;z-index:1;position:absolute;top:50%;left:50%}.handsontable .collapsibleIndicator:after,.handsontable .ht_nestingButton:after{content:"";width:var(--ht-icon-size);height:var(--ht-icon-size);margin-top:calc(-.5*var(--ht-icon-size));margin-left:calc(-.5*var(--ht-icon-size));border-radius:var(--ht-collapse-button-border-radius);transition:var(--ht-table-transition)all ease-in-out;z-index:0;display:block;position:absolute;top:50%;left:50%}.handsontable .collapsibleIndicator.expanded>.ht-icon,.handsontable .collapsibleIndicator.ht_nestingCollapse>.ht-icon,.handsontable .ht_nestingButton.expanded>.ht-icon,.handsontable .ht_nestingButton.ht_nestingCollapse>.ht-icon{color:var(--ht-collapse-button-open-icon-color)}.handsontable .collapsibleIndicator.expanded:after,.handsontable .collapsibleIndicator.ht_nestingCollapse:after,.handsontable .ht_nestingButton.expanded:after,.handsontable .ht_nestingButton.ht_nestingCollapse:after{background-color:var(--ht-collapse-button-open-background-color);box-shadow:0 0 0 1px var(--ht-collapse-button-open-border-color)}.handsontable .collapsibleIndicator.expanded:hover>.ht-icon,.handsontable .collapsibleIndicator.ht_nestingCollapse:hover>.ht-icon,.handsontable .ht_nestingButton.expanded:hover>.ht-icon,.handsontable .ht_nestingButton.ht_nestingCollapse:hover>.ht-icon{color:var(--ht-collapse-button-open-hover-icon-color)}.handsontable .collapsibleIndicator.expanded:hover:after,.handsontable .collapsibleIndicator.ht_nestingCollapse:hover:after,.handsontable .ht_nestingButton.expanded:hover:after,.handsontable .ht_nestingButton.ht_nestingCollapse:hover:after{background-color:var(--ht-collapse-button-open-hover-background-color);box-shadow:0 0 0 1px var(--ht-collapse-button-open-hover-border-color)}.handsontable .collapsibleIndicator.collapsed>.ht-icon,.handsontable .collapsibleIndicator.ht_nestingExpand>.ht-icon,.handsontable .ht_nestingButton.collapsed>.ht-icon,.handsontable .ht_nestingButton.ht_nestingExpand>.ht-icon{color:var(--ht-collapse-button-close-icon-color)}.handsontable .collapsibleIndicator.collapsed:after,.handsontable .collapsibleIndicator.ht_nestingExpand:after,.handsontable .ht_nestingButton.collapsed:after,.handsontable .ht_nestingButton.ht_nestingExpand:after{background-color:var(--ht-collapse-button-close-background-color);box-shadow:0 0 0 1px var(--ht-collapse-button-close-border-color)}.handsontable .collapsibleIndicator.collapsed:hover>.ht-icon,.handsontable .collapsibleIndicator.ht_nestingExpand:hover>.ht-icon,.handsontable .ht_nestingButton.collapsed:hover>.ht-icon,.handsontable .ht_nestingButton.ht_nestingExpand:hover>.ht-icon{color:var(--ht-collapse-button-close-hover-icon-color)}.handsontable .collapsibleIndicator.collapsed:hover:after,.handsontable .collapsibleIndicator.ht_nestingExpand:hover:after,.handsontable .ht_nestingButton.collapsed:hover:after,.handsontable .ht_nestingButton.ht_nestingExpand:hover:after{background-color:var(--ht-collapse-button-close-hover-background-color);box-shadow:0 0 0 1px var(--ht-collapse-button-close-hover-border-color)}.handsontable th.ht__active_highlight .collapsibleIndicator.collapsed>.ht-icon,.handsontable th.ht__active_highlight .collapsibleIndicator.ht_nestingExpand>.ht-icon,.handsontable th.ht__active_highlight .ht_nestingButton.collapsed>.ht-icon,.handsontable th.ht__active_highlight .ht_nestingButton.ht_nestingExpand>.ht-icon{color:var(--ht-collapse-button-close-icon-active-color)}.handsontable th.ht__active_highlight .collapsibleIndicator.collapsed:hover>.ht-icon,.handsontable th.ht__active_highlight .collapsibleIndicator.ht_nestingExpand:hover>.ht-icon,.handsontable th.ht__active_highlight .ht_nestingButton.collapsed:hover>.ht-icon,.handsontable th.ht__active_highlight .ht_nestingButton.ht_nestingExpand:hover>.ht-icon{color:var(--ht-collapse-button-close-hover-icon-active-color)}.handsontable th.ht__active_highlight .collapsibleIndicator.expanded>.ht-icon,.handsontable th.ht__active_highlight .collapsibleIndicator.ht_nestingCollapse>.ht-icon,.handsontable th.ht__active_highlight .ht_nestingButton.expanded>.ht-icon,.handsontable th.ht__active_highlight .ht_nestingButton.ht_nestingCollapse>.ht-icon{color:var(--ht-collapse-button-open-icon-active-color)}.handsontable th.ht__active_highlight .collapsibleIndicator.expanded:hover>.ht-icon,.handsontable th.ht__active_highlight .collapsibleIndicator.ht_nestingCollapse:hover>.ht-icon,.handsontable th.ht__active_highlight .ht_nestingButton.expanded:hover>.ht-icon,.handsontable th.ht__active_highlight .ht_nestingButton.ht_nestingCollapse:hover>.ht-icon{color:var(--ht-collapse-button-open-hover-icon-active-color)}.handsontable .relative:not(.has-sort-indicator)>.changeType~.collapsibleIndicator{--ht-collapse-button-hit-area-overlap:max(0px,calc(var(--ht-icon-button-hit-area-size) - var(--ht-icon-size) - 4px));z-index:1;clip-path:inset(0 0 0 calc(var(--ht-collapse-button-hit-area-overlap)/2))}.handsontable .relative:not(.has-sort-indicator)>.changeType~.collapsibleIndicator:dir(rtl){clip-path:inset(0 calc(var(--ht-collapse-button-hit-area-overlap)/2)0 0)}.handsontable thead th.htRowspanHeader{vertical-align:bottom;height:auto;overflow:visible}.handsontable thead th.htRowspanHeader.ht__active_highlight{border-inline-start-color:var(--ht-header-active-border-color);z-index:1}.handsontable.htRowHeaders.htHasRowspanHeaders :where(table.htCore)>thead>tr:last-child>th:first-child{border-end-start-radius:0}.handsontable.htHasRowspanHeaders .ht_clone_inline_start .htCore>tbody>tr:first-child>th:first-child{border-start-start-radius:0}.handsontable thead th.hiddenHeader:not(:first-of-type){display:none}.handsontable thead th.hiddenHeaderText .colHeader{opacity:0}.handsontable th.ht_nestingLevels>.relative{align-items:center;gap:5px;display:flex}.handsontable th.ht_nestingLevels>.relative>span:last-child{padding-left:calc(var(--ht-icon-size) + 5px)}.handsontable th.ht_nestingLevels span.ht_nestingLevel{display:inline-block}.handsontable th.ht_nestingLevels span.ht_nestingLevel_empty{order:-2;width:5px;height:1px;display:inline-block;position:relative}.handsontable th.ht_nestingLevels .ht_nestingButton{cursor:pointer;order:-1;position:relative}.handsontable tr.htExactRow>th.ht_nestingLevels>.relative{align-items:flex-start}.handsontable tr.htExactRow>th.ht_nestingLevels>.relative>.ht_nestingButton{margin-top:calc((var(--ht-line-height,20px) - var(--ht-icon-button-hit-area-size,24px))/2)}.handsontable thead th.beforeHiddenColumn,.handsontable thead th.afterHiddenColumn{position:relative}.handsontable thead th>.ht-hidden-indicator-start,.handsontable thead th>.ht-hidden-indicator-end{color:var(--ht-hidden-indicator-color);font-size:10px;position:absolute;top:50%;transform:translateY(-50%);width:10px!important;height:10px!important}.handsontable thead th:not(.beforeHiddenColumn)>.ht-hidden-indicator-end,.handsontable thead th:not(.afterHiddenColumn)>.ht-hidden-indicator-start{display:none}.handsontable th.beforeHiddenColumn>.ht-hidden-indicator-end{right:-1px;mask-position:1px 0;mask-repeat:no-repeat}.handsontable th.afterHiddenColumn>.ht-hidden-indicator-start{left:-2px}.handsontable th.ht__active_highlight.beforeHiddenColumn>.ht-hidden-indicator-end,.handsontable th.ht__active_highlight.afterHiddenColumn>.ht-hidden-indicator-start{color:var(--ht-icon-button-active-icon-color,var(--ht-icon-active-button-icon-color))}[dir=rtl].handsontable th.beforeHiddenColumn>.ht-hidden-indicator-end{right:initial;left:-1px;transform:translateY(-50%)rotate(180deg)}[dir=rtl].handsontable th.afterHiddenColumn>.ht-hidden-indicator-start{right:-2px;left:initial;transform:translateY(-50%)rotate(180deg)}.handsontable tbody th.beforeHiddenRow,.handsontable tbody th.afterHiddenRow{position:relative}.handsontable tbody th>.ht-hidden-indicator-start,.handsontable tbody th>.ht-hidden-indicator-end{color:var(--ht-hidden-indicator-color);font-size:10px;position:absolute;left:50%;transform:translate(-50%);width:10px!important;height:10px!important}.handsontable tbody th:not(.beforeHiddenRow)>.ht-hidden-indicator-end,.handsontable tbody th:not(.afterHiddenRow)>.ht-hidden-indicator-start{display:none}.handsontable th.beforeHiddenRow>.ht-hidden-indicator-end{bottom:-1px;mask-position:0 1px;mask-repeat:no-repeat}.handsontable th.afterHiddenRow>.ht-hidden-indicator-start{top:-2px}.handsontable th.ht__active_highlight.beforeHiddenRow>.ht-hidden-indicator-end,.handsontable th.ht__active_highlight.afterHiddenRow>.ht-hidden-indicator-start{color:var(--ht-icon-button-active-icon-color,var(--ht-icon-active-button-icon-color))}.handsontable .changeType{box-sizing:border-box;width:var(--ht-icon-button-hit-area-size);height:var(--ht-icon-button-hit-area-size);margin:calc(-1*(var(--ht-icon-button-hit-area-size) - var(--ht-icon-size))/2 + 1px);box-shadow:none;color:inherit;z-index:1;background:0 0;border:none;outline:none;flex-shrink:0;padding:0;position:relative;overflow:visible}.handsontable .changeType .ht-icon{margin-top:calc(-.5*var(--ht-icon-size));margin-left:calc(-.5*var(--ht-icon-size));color:var(--ht-icon-button-icon-color);z-index:1;position:absolute;top:50%;left:50%}.handsontable .changeType:after{content:"";width:var(--ht-icon-size);height:var(--ht-icon-size);margin-top:calc(-.5*var(--ht-icon-size));margin-left:calc(-.5*var(--ht-icon-size));border-radius:var(--ht-icon-button-border-radius);box-shadow:0 0 0 1px var(--ht-icon-button-border-color);background-color:var(--ht-icon-button-background-color);z-index:0;display:block;position:absolute;top:50%;left:50%}.handsontable .changeType:hover{cursor:pointer}.handsontable .changeType:hover .ht-icon{color:var(--ht-icon-button-hover-icon-color)}.handsontable .changeType:hover:after{box-shadow:0 0 0 1px var(--ht-icon-button-hover-border-color);background-color:var(--ht-icon-button-hover-background-color)}.handsontable .ht__active_highlight .changeType .ht-icon{color:var(--ht-icon-button-active-icon-color,var(--ht-icon-active-button-icon-color))}.handsontable .ht__active_highlight .changeType:after{box-shadow:0 0 0 1px var(--ht-icon-button-active-border-color,var(--ht-icon-active-button-border-color));background-color:var(--ht-icon-button-active-background-color,var(--ht-icon-active-button-background-color))}.handsontable .ht__active_highlight .changeType:hover .ht-icon{color:var(--ht-icon-button-active-hover-icon-color,var(--ht-icon-active-button-hover-icon-color))}.handsontable .ht__active_highlight .changeType:hover:after{box-shadow:0 0 0 1px var(--ht-icon-button-active-hover-border-color,var(--ht-icon-active-button-hover-border-color));background-color:var(--ht-icon-button-active-hover-background-color,var(--ht-icon-active-button-hover-background-color))}.handsontable th.htFiltersActive{background-color:var(--ht-header-filter-background-color)}.handsontable th.htFiltersActive.ht__active_highlight{background-color:color-mix(in srgb,var(--ht-header-active-background-color),var(--ht-header-filter-background-color)20%)}.handsontable.htDropdownMenu>.ht_master,.handsontable.htContextMenu>.ht_master,.handsontable.htFiltersConditionsMenu>.ht_master,.handsontable.htSheetsBarMenu>.ht_master{box-shadow:var(--ht-menu-shadow-x,0)var(--ht-menu-shadow-y,0)var(--ht-menu-shadow-blur,8px)color-mix(in srgb,var(--ht-menu-shadow-color,#000)var(--ht-menu-shadow-opacity,100%),transparent);border:var(--ht-menu-border-width,1px)solid var(--ht-menu-border-color,#e5e5e9);border-radius:var(--ht-menu-border-radius);padding:var(--ht-menu-vertical-padding,8px)var(--ht-menu-horizontal-padding,0);background-color:var(--ht-background-color,#fff);overflow:hidden}.handsontable.htDropdownMenu:not(.htGhostTable),.handsontable.htContextMenu:not(.htGhostTable),.handsontable.htFiltersConditionsMenu:not(.htGhostTable),.handsontable.htSheetsBarMenu:not(.htGhostTable){z-index:1060;display:none;position:absolute}.handsontable.htDropdownMenu .ht_clone_top,.handsontable.htDropdownMenu .ht_clone_bottom,.handsontable.htDropdownMenu .ht_clone_inline_start,.handsontable.htDropdownMenu .ht_clone_inline_end,.handsontable.htDropdownMenu .ht_clone_top_inline_start_corner,.handsontable.htDropdownMenu .ht_clone_top_inline_end_corner,.handsontable.htDropdownMenu .ht_clone_bottom_inline_start_corner,.handsontable.htDropdownMenu .ht_clone_bottom_inline_end_corner,.handsontable.htContextMenu .ht_clone_top,.handsontable.htContextMenu .ht_clone_bottom,.handsontable.htContextMenu .ht_clone_inline_start,.handsontable.htContextMenu .ht_clone_inline_end,.handsontable.htContextMenu .ht_clone_top_inline_start_corner,.handsontable.htContextMenu .ht_clone_top_inline_end_corner,.handsontable.htContextMenu .ht_clone_bottom_inline_start_corner,.handsontable.htContextMenu .ht_clone_bottom_inline_end_corner,.handsontable.htFiltersConditionsMenu .ht_clone_top,.handsontable.htFiltersConditionsMenu .ht_clone_bottom,.handsontable.htFiltersConditionsMenu .ht_clone_inline_start,.handsontable.htFiltersConditionsMenu .ht_clone_inline_end,.handsontable.htFiltersConditionsMenu .ht_clone_top_inline_start_corner,.handsontable.htFiltersConditionsMenu .ht_clone_top_inline_end_corner,.handsontable.htFiltersConditionsMenu .ht_clone_bottom_inline_start_corner,.handsontable.htFiltersConditionsMenu .ht_clone_bottom_inline_end_corner,.handsontable.htSheetsBarMenu .ht_clone_top,.handsontable.htSheetsBarMenu .ht_clone_bottom,.handsontable.htSheetsBarMenu .ht_clone_inline_start,.handsontable.htSheetsBarMenu .ht_clone_inline_end,.handsontable.htSheetsBarMenu .ht_clone_top_inline_start_corner,.handsontable.htSheetsBarMenu .ht_clone_top_inline_end_corner,.handsontable.htSheetsBarMenu .ht_clone_bottom_inline_start_corner,.handsontable.htSheetsBarMenu .ht_clone_bottom_inline_end_corner{display:none}.handsontable.htDropdownMenu table.htCore,.handsontable.htContextMenu table.htCore,.handsontable.htFiltersConditionsMenu table.htCore,.handsontable.htSheetsBarMenu table.htCore{overflow:hidden}.handsontable.htDropdownMenu .htCustomMenuRenderer .table.htCore,.handsontable.htContextMenu .htCustomMenuRenderer .table.htCore,.handsontable.htFiltersConditionsMenu .htCustomMenuRenderer .table.htCore,.handsontable.htSheetsBarMenu .htCustomMenuRenderer .table.htCore{box-shadow:none}.handsontable.htDropdownMenu.handsontable:focus,.handsontable.htContextMenu.handsontable:focus,.handsontable.htFiltersConditionsMenu.handsontable:focus,.handsontable.htSheetsBarMenu.handsontable:focus{outline:none}.handsontable.htDropdownMenu .wtBorder,.handsontable.htContextMenu .wtBorder,.handsontable.htFiltersConditionsMenu .wtBorder,.handsontable.htSheetsBarMenu .wtBorder{visibility:hidden}.handsontable.htDropdownMenu tbody tr:first-of-type td:first-child,.handsontable.htDropdownMenu tbody tr:first-of-type th:first-child,.handsontable.htContextMenu tbody tr:first-of-type td:first-child,.handsontable.htContextMenu tbody tr:first-of-type th:first-child,.handsontable.htFiltersConditionsMenu tbody tr:first-of-type td:first-child,.handsontable.htFiltersConditionsMenu tbody tr:first-of-type th:first-child,.handsontable.htSheetsBarMenu tbody tr:first-of-type td:first-child,.handsontable.htSheetsBarMenu tbody tr:first-of-type th:first-child{height:calc(var(--ht-cell-vertical-padding)*2 + var(--ht-line-height) + 1px)}.handsontable.htDropdownMenu table tbody tr td,.handsontable.htContextMenu table tbody tr td,.handsontable.htFiltersConditionsMenu table tbody tr td,.handsontable.htSheetsBarMenu table tbody tr td{padding:var(--ht-menu-item-vertical-padding,4px)var(--ht-menu-item-horizontal-padding,8px);white-space:nowrap;text-overflow:ellipsis;background:var(--ht-background-color,#fff);cursor:pointer;transition:var(--ht-table-transition)background ease-in-out;border-width:0;position:relative;overflow:hidden}.handsontable.htDropdownMenu table tbody tr td:first-child,.handsontable.htContextMenu table tbody tr td:first-child,.handsontable.htFiltersConditionsMenu table tbody tr td:first-child,.handsontable.htSheetsBarMenu table tbody tr td:first-child{border-top-width:0;border-inline-end-width:0;border-bottom-width:0;border-inline-start-width:0}.handsontable.htDropdownMenu table tbody tr td.htDimmed,.handsontable.htContextMenu table tbody tr td.htDimmed,.handsontable.htFiltersConditionsMenu table tbody tr td.htDimmed,.handsontable.htSheetsBarMenu table tbody tr td.htDimmed{font-style:normal;color:inherit!important;background-color:inherit!important}.handsontable.htDropdownMenu table tbody tr td:not(.handsontable.htDropdownMenu table tbody tr td.htCustomMenuRenderer,.handsontable.htDropdownMenu table tbody tr td.htDisabled,.handsontable.htContextMenu table tbody tr td.htCustomMenuRenderer,.handsontable.htContextMenu table tbody tr td.htDisabled,.handsontable.htFiltersConditionsMenu table tbody tr td.htCustomMenuRenderer,.handsontable.htFiltersConditionsMenu table tbody tr td.htDisabled,.handsontable.htSheetsBarMenu table tbody tr td.htCustomMenuRenderer,.handsontable.htSheetsBarMenu table tbody tr td.htDisabled):hover,.handsontable.htContextMenu table tbody tr td:not(.handsontable.htDropdownMenu table tbody tr td.htCustomMenuRenderer,.handsontable.htDropdownMenu table tbody tr td.htDisabled,.handsontable.htContextMenu table tbody tr td.htCustomMenuRenderer,.handsontable.htContextMenu table tbody tr td.htDisabled,.handsontable.htFiltersConditionsMenu table tbody tr td.htCustomMenuRenderer,.handsontable.htFiltersConditionsMenu table tbody tr td.htDisabled,.handsontable.htSheetsBarMenu table tbody tr td.htCustomMenuRenderer,.handsontable.htSheetsBarMenu table tbody tr td.htDisabled):hover,.handsontable.htFiltersConditionsMenu table tbody tr td:not(.handsontable.htDropdownMenu table tbody tr td.htCustomMenuRenderer,.handsontable.htDropdownMenu table tbody tr td.htDisabled,.handsontable.htContextMenu table tbody tr td.htCustomMenuRenderer,.handsontable.htContextMenu table tbody tr td.htDisabled,.handsontable.htFiltersConditionsMenu table tbody tr td.htCustomMenuRenderer,.handsontable.htFiltersConditionsMenu table tbody tr td.htDisabled,.handsontable.htSheetsBarMenu table tbody tr td.htCustomMenuRenderer,.handsontable.htSheetsBarMenu table tbody tr td.htDisabled):hover,.handsontable.htSheetsBarMenu table tbody tr td:not(.handsontable.htDropdownMenu table tbody tr td.htCustomMenuRenderer,.handsontable.htDropdownMenu table tbody tr td.htDisabled,.handsontable.htContextMenu table tbody tr td.htCustomMenuRenderer,.handsontable.htContextMenu table tbody tr td.htDisabled,.handsontable.htFiltersConditionsMenu table tbody tr td.htCustomMenuRenderer,.handsontable.htFiltersConditionsMenu table tbody tr td.htDisabled,.handsontable.htSheetsBarMenu table tbody tr td.htCustomMenuRenderer,.handsontable.htSheetsBarMenu table tbody tr td.htDisabled):hover{cursor:pointer;background:color-mix(in srgb,var(--ht-menu-item-hover-color)var(--ht-menu-item-hover-color-opacity,100%),transparent)!important}.handsontable.htDropdownMenu table tbody tr td:not(.handsontable.htDropdownMenu table tbody tr td.htCustomMenuRenderer,.handsontable.htDropdownMenu table tbody tr td.htDisabled,.handsontable.htContextMenu table tbody tr td.htCustomMenuRenderer,.handsontable.htContextMenu table tbody tr td.htDisabled,.handsontable.htFiltersConditionsMenu table tbody tr td.htCustomMenuRenderer,.handsontable.htFiltersConditionsMenu table tbody tr td.htDisabled,.handsontable.htSheetsBarMenu table tbody tr td.htCustomMenuRenderer,.handsontable.htSheetsBarMenu table tbody tr td.htDisabled).current:not([aria-expanded=true]),.handsontable.htContextMenu table tbody tr td:not(.handsontable.htDropdownMenu table tbody tr td.htCustomMenuRenderer,.handsontable.htDropdownMenu table tbody tr td.htDisabled,.handsontable.htContextMenu table tbody tr td.htCustomMenuRenderer,.handsontable.htContextMenu table tbody tr td.htDisabled,.handsontable.htFiltersConditionsMenu table tbody tr td.htCustomMenuRenderer,.handsontable.htFiltersConditionsMenu table tbody tr td.htDisabled,.handsontable.htSheetsBarMenu table tbody tr td.htCustomMenuRenderer,.handsontable.htSheetsBarMenu table tbody tr td.htDisabled).current:not([aria-expanded=true]),.handsontable.htFiltersConditionsMenu table tbody tr td:not(.handsontable.htDropdownMenu table tbody tr td.htCustomMenuRenderer,.handsontable.htDropdownMenu table tbody tr td.htDisabled,.handsontable.htContextMenu table tbody tr td.htCustomMenuRenderer,.handsontable.htContextMenu table tbody tr td.htDisabled,.handsontable.htFiltersConditionsMenu table tbody tr td.htCustomMenuRenderer,.handsontable.htFiltersConditionsMenu table tbody tr td.htDisabled,.handsontable.htSheetsBarMenu table tbody tr td.htCustomMenuRenderer,.handsontable.htSheetsBarMenu table tbody tr td.htDisabled).current:not([aria-expanded=true]),.handsontable.htSheetsBarMenu table tbody tr td:not(.handsontable.htDropdownMenu table tbody tr td.htCustomMenuRenderer,.handsontable.htDropdownMenu table tbody tr td.htDisabled,.handsontable.htContextMenu table tbody tr td.htCustomMenuRenderer,.handsontable.htContextMenu table tbody tr td.htDisabled,.handsontable.htFiltersConditionsMenu table tbody tr td.htCustomMenuRenderer,.handsontable.htFiltersConditionsMenu table tbody tr td.htDisabled,.handsontable.htSheetsBarMenu table tbody tr td.htCustomMenuRenderer,.handsontable.htSheetsBarMenu table tbody tr td.htDisabled).current:not([aria-expanded=true]){box-shadow:inset 0 0 0 1px var(--ht-accent-color)}.handsontable.htDropdownMenu table tbody tr td.htSubmenu .htItemWrapper,.handsontable.htContextMenu table tbody tr td.htSubmenu .htItemWrapper,.handsontable.htFiltersConditionsMenu table tbody tr td.htSubmenu .htItemWrapper,.handsontable.htSheetsBarMenu table tbody tr td.htSubmenu .htItemWrapper{margin-inline-end:calc(2*var(--ht-gap-size,4px) + var(--ht-icon-size))}.handsontable.htDropdownMenu table tbody tr td.htSubmenu .htItemWrapper .htSubmenuIcon,.handsontable.htContextMenu table tbody tr td.htSubmenu .htItemWrapper .htSubmenuIcon,.handsontable.htFiltersConditionsMenu table tbody tr td.htSubmenu .htItemWrapper .htSubmenuIcon,.handsontable.htSheetsBarMenu table tbody tr td.htSubmenu .htItemWrapper .htSubmenuIcon{top:50%;position:absolute;inset-inline-end:calc(var(--ht-menu-item-horizontal-padding) + var(--ht-gap-size)*2);translate:0 -50%}.handsontable.htDropdownMenu table tbody tr td.htSeparator,.handsontable.htContextMenu table tbody tr td.htSeparator,.handsontable.htFiltersConditionsMenu table tbody tr td.htSeparator,.handsontable.htSheetsBarMenu table tbody tr td.htSeparator{border-top:1px solid var(--ht-border-color);cursor:default;height:0;padding:0}.handsontable.htDropdownMenu table tbody tr td.htDisabled,.handsontable.htContextMenu table tbody tr td.htDisabled,.handsontable.htFiltersConditionsMenu table tbody tr td.htDisabled,.handsontable.htSheetsBarMenu table tbody tr td.htDisabled{color:var(--ht-disabled-color);cursor:default}.handsontable.htDropdownMenu table tbody tr td.htDisabled:hover,.handsontable.htContextMenu table tbody tr td.htDisabled:hover,.handsontable.htFiltersConditionsMenu table tbody tr td.htDisabled:hover,.handsontable.htSheetsBarMenu table tbody tr td.htDisabled:hover{background:var(--ht-background-color);color:var(--ht-disabled-color)}.handsontable.htDropdownMenu table tbody tr td.htHidden,.handsontable.htContextMenu table tbody tr td.htHidden,.handsontable.htFiltersConditionsMenu table tbody tr td.htHidden,.handsontable.htSheetsBarMenu table tbody tr td.htHidden{display:none}.handsontable.htDropdownMenu table tbody tr td:has(.htItemWrapper .selected),.handsontable.htContextMenu table tbody tr td:has(.htItemWrapper .selected),.handsontable.htFiltersConditionsMenu table tbody tr td:has(.htItemWrapper .selected),.handsontable.htSheetsBarMenu table tbody tr td:has(.htItemWrapper .selected){background-color:color-mix(in srgb,var(--ht-menu-item-active-color)var(--ht-menu-item-active-color-opacity,100%),transparent)}.handsontable.htDropdownMenu table tbody tr td .htItemWrapper,.handsontable.htContextMenu table tbody tr td .htItemWrapper,.handsontable.htFiltersConditionsMenu table tbody tr td .htItemWrapper,.handsontable.htSheetsBarMenu table tbody tr td .htItemWrapper{margin-inline:calc(2*var(--ht-gap-size,4px))}.handsontable.htDropdownMenu table tbody tr td .htItemWrapper:before,.handsontable.htContextMenu table tbody tr td .htItemWrapper:before,.handsontable.htFiltersConditionsMenu table tbody tr td .htItemWrapper:before,.handsontable.htSheetsBarMenu table tbody tr td .htItemWrapper:before{vertical-align:text-bottom;margin-right:12px}.handsontable.htDropdownMenu table tbody tr td .htItemWrapper span.selected,.handsontable.htDropdownMenu table tbody tr td .htItemWrapper span.htMixed,.handsontable.htContextMenu table tbody tr td .htItemWrapper span.selected,.handsontable.htContextMenu table tbody tr td .htItemWrapper span.htMixed,.handsontable.htFiltersConditionsMenu table tbody tr td .htItemWrapper span.selected,.handsontable.htFiltersConditionsMenu table tbody tr td .htItemWrapper span.htMixed,.handsontable.htSheetsBarMenu table tbody tr td .htItemWrapper span.selected,.handsontable.htSheetsBarMenu table tbody tr td .htItemWrapper span.htMixed{font-size:0;inset:0}.handsontable.htDropdownMenu table tbody tr td .htItemWrapper span.selected .ht-icon,.handsontable.htDropdownMenu table tbody tr td .htItemWrapper span.htMixed .ht-icon,.handsontable.htContextMenu table tbody tr td .htItemWrapper span.selected .ht-icon,.handsontable.htContextMenu table tbody tr td .htItemWrapper span.htMixed .ht-icon,.handsontable.htFiltersConditionsMenu table tbody tr td .htItemWrapper span.selected .ht-icon,.handsontable.htFiltersConditionsMenu table tbody tr td .htItemWrapper span.htMixed .ht-icon,.handsontable.htSheetsBarMenu table tbody tr td .htItemWrapper span.selected .ht-icon,.handsontable.htSheetsBarMenu table tbody tr td .htItemWrapper span.htMixed .ht-icon{color:var(--ht-accent-color);top:50%;position:absolute;inset-inline-end:calc(var(--ht-menu-item-horizontal-padding) + var(--ht-gap-size)*2);transform:translateY(-50%)}.handsontable.htDropdownMenu table tbody tr td div span.selected,.handsontable.htDropdownMenu table tbody tr td div span.htMixed,.handsontable.htContextMenu table tbody tr td div span.selected,.handsontable.htContextMenu table tbody tr td div span.htMixed,.handsontable.htFiltersConditionsMenu table tbody tr td div span.selected,.handsontable.htFiltersConditionsMenu table tbody tr td div span.htMixed,.handsontable.htSheetsBarMenu table tbody tr td div span.selected,.handsontable.htSheetsBarMenu table tbody tr td div span.htMixed{position:absolute;inset-inline-end:0}.handsontable.htDropdownMenu table tbody tr td .htUIButton,.handsontable.htContextMenu table tbody tr td .htUIButton,.handsontable.htFiltersConditionsMenu table tbody tr td .htUIButton,.handsontable.htSheetsBarMenu table tbody tr td .htUIButton{width:calc(50% - var(--ht-gap-size))}.handsontable.htDropdownMenu table tbody tr td .htUIButton input,.handsontable.htContextMenu table tbody tr td .htUIButton input,.handsontable.htFiltersConditionsMenu table tbody tr td .htUIButton input,.handsontable.htSheetsBarMenu table tbody tr td .htUIButton input{width:100%}.handsontable .htUIClearAll a,.handsontable .htUISelectAll a{padding:var(--ht-gap-size);text-decoration:none;display:inline-block}.handsontable .htUIMultipleSelect .ht_master .wtHolder{background:0 0;box-shadow:none!important;border-radius:0!important;overflow-y:scroll!important}.handsontable .htUIMultipleSelect .ht_master .wtHolder .htCore{box-shadow:none}.handsontable .htUIMultipleSelect .ht_master .htScrollbarFrame{box-shadow:none!important}[dir=rtl].handsontable.htDropdownMenu table tbody tr td.htSubmenu .htItemWrapper .htSubmenuIcon,[dir=rtl].handsontable.htDropdownMenu table tbody tr td .htItemWrapper span.selected .ht-icon,[dir=rtl].handsontable.htDropdownMenu table tbody tr td .htItemWrapper span.htMixed .ht-icon,[dir=rtl].handsontable.htContextMenu table tbody tr td.htSubmenu .htItemWrapper .htSubmenuIcon,[dir=rtl].handsontable.htContextMenu table tbody tr td .htItemWrapper span.selected .ht-icon,[dir=rtl].handsontable.htContextMenu table tbody tr td .htItemWrapper span.htMixed .ht-icon,[dir=rtl].handsontable.htFiltersConditionsMenu table tbody tr td.htSubmenu .htItemWrapper .htSubmenuIcon,[dir=rtl].handsontable.htFiltersConditionsMenu table tbody tr td .htItemWrapper span.selected .ht-icon,[dir=rtl].handsontable.htFiltersConditionsMenu table tbody tr td .htItemWrapper span.htMixed .ht-icon,[dir=rtl].handsontable.htSheetsBarMenu table tbody tr td.htSubmenu .htItemWrapper .htSubmenuIcon,[dir=rtl].handsontable.htSheetsBarMenu table tbody tr td .htItemWrapper span.selected .ht-icon,[dir=rtl].handsontable.htSheetsBarMenu table tbody tr td .htItemWrapper span.htMixed .ht-icon{inset-inline-end:calc(4*var(--ht-gap-size))}.handsontable.htSheetsBarMenu table tbody tr td .htItemWrapper .ht-sheets-bar__menu-item-name{text-overflow:ellipsis;vertical-align:top;max-width:100%;font-size:inherit;line-height:inherit;font-weight:inherit;letter-spacing:inherit;border:0;margin:0;padding:0;font-family:inherit;display:inline-block;overflow:hidden}.handsontable.htSheetsBarMenu table tbody tr td .htItemWrapper span.selected{border:0;margin:0;padding:0}.handsontable.htFiltersConditionsMenu:not(.htGhostTable){z-index:1070}.handsontable .ht_master table td.htCustomMenuRenderer{cursor:auto}.handsontable .ht_master table td.htCustomMenuRenderer.htFiltersMenuActionBar{padding-top:calc(var(--ht-menu-item-vertical-padding,4px)*2)}.handsontable .htFiltersMenuLabel{font-size:var(--ht-font-size-small);line-height:var(--ht-line-height-small);font-weight:var(--ht-font-weight);margin-bottom:calc(var(--ht-gap-size,2px)*2)}.handsontable .htFiltersMenuLabel:empty{display:none}.handsontable .htFiltersMenuCondition{padding-top:calc(var(--ht-gap-size,2px)*3)!important;padding-bottom:0!important}.handsontable .htFiltersMenuCondition .border{border-bottom:1px solid var(--ht-border-color)!important}.handsontable .htFiltersMenuCondition .htUIInput{margin-top:calc(var(--ht-gap-size,2px)*2)}.handsontable .htFiltersMenuValue{padding-top:calc(var(--ht-gap-size,2px)*3)!important;border-bottom:1px solid var(--ht-border-color)!important;padding-bottom:0!important}.handsontable .htFiltersMenuOperators{padding-top:calc(var(--ht-gap-size,2px)*2)!important;padding-bottom:0!important}.handsontable .htUISelectionControls{white-space:normal;margin:0 calc(var(--ht-gap-size,2px)*-1);padding-top:calc(var(--ht-gap-size,2px)*2)!important;padding-bottom:var(--ht-gap-size,2px)!important}.handsontable .htUIMultipleSelectHot{--ht-cell-horizontal-padding:calc(var(--ht-menu-item-horizontal-padding,2px) + var(--ht-gap-size,2px)*2);--ht-cell-vertical-padding:4px;width:calc(100% + var(--ht-menu-item-horizontal-padding,2px)*2 + var(--ht-gap-size,2px)*4);margin:0 calc((var(--ht-menu-item-horizontal-padding,2px) + var(--ht-gap-size,2px)*2)*-1);overflow:initial!important}.handsontable .htUIMultipleSelectHot:before{content:"";background-color:var(--ht-border-color);width:100%;height:1px;display:block;position:absolute;top:-1px;left:0}.handsontable .htUIMultipleSelectHot .wtHolder{box-sizing:border-box;padding:0;overflow-x:hidden}.handsontable .htUIMultipleSelectHot .wtHolder .wtSpreader{padding:calc(var(--ht-gap-size)*2)0}.handsontable .htUIMultipleSelectHot .wtHolder td{padding:var(--ht-cell-vertical-padding)var(--ht-cell-horizontal-padding);height:auto!important}.handsontable .htUIClearAll,.handsontable .htUISelectAll{margin-right:var(--ht-gap-size,4px);margin-bottom:var(--ht-gap-size,4px);display:inline-block}.handsontable .htUIClearAll a,.handsontable .htUISelectAll a{font-size:var(--ht-font-size);line-height:var(--ht-line-height);color:var(--ht-link-color);border-radius:var(--ht-button-border-radius)}.handsontable .htUIClearAll a:hover,.handsontable .htUISelectAll a:hover{color:var(--ht-link-hover-color)}.handsontable .htUIClearAll a:focus,.handsontable .htUISelectAll a:focus{outline:1px solid var(--ht-link-hover-color)}.handsontable .htUIMultipleSelect .ht_master .wtHolder{overflow:auto}.handsontable .htUIMultipleSelect .ht_master .wtHolder .wtHider,.handsontable .htUIMultipleSelect .ht_master .wtHolder .htCore,.handsontable .htUIMultipleSelect .ht_master .wtHolder tr,.handsontable .htUIMultipleSelect .ht_master .wtHolder td{background:0 0}.handsontable .htUIInput.htUIButton{cursor:pointer;display:inline-block}.handsontable .htUIInput.htUIButtonOK{margin-inline-start:0;margin-inline-end:calc(2*var(--ht-gap-size,2px))}:where(.handsontable,.hfe-formula-bar,.hfe-popup-portal,.hfe-suggestions,.hfe-fn-help){--hfe-font-family:var(--ht-font-family),-apple-system,BlinkMacSystemFont,Segoe UI,sans-serif;--hfe-font-size:var(--ht-font-size);--hfe-line-height:var(--ht-line-height);--hfe-formula-bar-input-focus-ring:var(--ht-cell-selection-border-color);--hfe-gap:var(--ht-gap-size);--hfe-color-background:var(--ht-cell-editor-background-color);--hfe-color-foreground:var(--ht-cell-editor-foreground-color);--hfe-color-foreground-secondary:var(--ht-foreground-secondary-color);--hfe-color-accent:var(--ht-accent-color);--hfe-shadow-x:var(--ht-shadow-x);--hfe-shadow-y:var(--ht-shadow-y);--hfe-shadow-blur:var(--ht-shadow-blur);--hfe-shadow-opacity:var(--ht-shadow-opacity);--hfe-color-shadow:color-mix(in srgb,var(--ht-shadow-color)var(--ht-shadow-opacity),transparent);--hfe-padding-vertical:var(--ht-cell-vertical-padding);--hfe-padding-horizontal:var(--ht-cell-horizontal-padding);--hfe-border-width:var(--ht-cell-editor-border-width);--hfe-border-width-focus:var(--ht-cell-editor-border-width);--hfe-color-caret:var(--ht-cell-editor-foreground-color);--hfe-editor-color-border:var(--ht-cell-editor-border-color);--hfe-color-focus-ring:var(--ht-cell-editor-border-color);--hfe-menu-item-padding-horizontal:var(--ht-menu-item-horizontal-padding);--hfe-menu-item-padding-vertical:var(--ht-menu-item-vertical-padding);--hfe-menu-item-border-radius:0;--hfe-menu-padding-horizontal:var(--ht-menu-horizontal-padding);--hfe-menu-padding-vertical:var(--ht-menu-vertical-padding);--hfe-menu-border-radius:var(--ht-menu-border-radius);--hfe-menu-border-width:var(--ht-menu-border-width);--hfe-menu-border-color:var(--ht-menu-border-color);--hfe-menu-background:var(--ht-background-color);--hfe-menu-kbd-row-border-color:var(--ht-border-color);--hfe-menu-chip-background:var(--ht-accent-color);--hfe-menu-chip-foreground:var(--ht-background-color);--hfe-menu-chip-border-radius:var(--ht-chip-border-radius);--hfe-menu-shadow:var(--ht-menu-shadow-x)var(--ht-menu-shadow-y)var(--ht-menu-shadow-blur)color-mix(in srgb,var(--ht-menu-shadow-color)var(--ht-menu-shadow-opacity),transparent);--hfe-token-fn:var(--ht-foreground-color);--hfe-token-num:var(--ht-foreground-color);--hfe-token-str:var(--ht-foreground-color);--hfe-token-bool:var(--ht-foreground-color);--hfe-token-op:var(--ht-foreground-color);--hfe-token-paren:var(--ht-foreground-color);--hfe-token-paren-match:var(--ht-accent-color);--hfe-token-bracket:var(--ht-foreground-color);--hfe-token-sep:var(--ht-foreground-color);--hfe-token-ident:var(--ht-foreground-color);--hfe-ref-1:light-dark(#007bff,#0a84ff);--hfe-ref-2:light-dark(#ff9500,#ff9d0a);--hfe-ref-3:light-dark(#af52de,#bf5af2);--hfe-ref-4:light-dark(#30d158,#34c759);--hfe-ref-5:light-dark(#ff2d54,#ff375f);--hfe-ref-6:light-dark(#30b0c7,#40c8e0);--hfe-ref-7:light-dark(#5856d6,#5e5ce6);--hfe-ref-8:light-dark(#a2855e,#ac8e68);--hfe-error-padding-horizontal:var(--ht-comments-textarea-horizontal-padding);--hfe-error-padding-vertical:var(--ht-comments-textarea-vertical-padding);--hfe-formula-bar-background:var(--ht-background-color);--hfe-formula-bar-foreground:var(--ht-foreground-color);--hfe-formula-bar-border:var(--ht-border-color);--hfe-formula-bar-border-width:1px;--hfe-formula-bar-border-radius:var(--ht-border-radius);--hfe-formula-bar-padding-vertical:var(--ht-cell-vertical-padding);--hfe-formula-bar-padding-horizontal:var(--ht-cell-horizontal-padding)}.handsontable .hfe-editor{outline:none;box-sizing:border-box!important}.handsontable .hfe-editor--focused{outline:none}.ht-formula-builder__formula-bar .hfe-formula-bar__overlay .hfe-editor--focused{outline:var(--hfe-border-width-focus)solid var(--hfe-formula-bar-input-focus-ring);outline-offset:calc(-1*var(--hfe-border-width-focus))}.handsontable .ht-formula-builder__inline-editor{width:100%;height:100%}.handsontable .ht-formula-builder__inline-editor>.handsontableInput{resize:none;width:100%;height:100%;overflow:hidden}.handsontable .ht-formula-builder__inline-editor .hfe-editor{box-shadow:none;--hfe-padding-vertical:calc(var(--ht-cell-vertical-padding) + 1px);--hfe-padding-horizontal:calc(var(--ht-cell-horizontal-padding) + 1px)}.ht-formula-builder__formula-bar .hfe-formula-bar__overlay{--hfe-editor-max-lines:1}.ht-formula-builder__formula-bar.hfe-formula-bar .hfe-formula-bar__cell--formula{padding:0;padding-inline-start:var(--hfe-formula-bar-padding-horizontal)}.ht-formula-builder__formula-bar.hfe-formula-bar .hfe-formula-bar__idle{height:calc(var(--hfe-line-height) + 2*var(--hfe-formula-bar-padding-vertical))}.ht-formula-builder__formula-bar.hfe-formula-bar .hfe-overlay,.ht-formula-builder__formula-bar.hfe-formula-bar .hfe-editor__input{padding:var(--hfe-formula-bar-padding-vertical)var(--hfe-border-width-focus)}.ht-formula-builder__formula-bar .hfe-editor--height-capped .hfe-overlay,.ht-formula-builder__formula-bar .hfe-editor--height-capped .hfe-editor__input{scrollbar-width:auto}.handsontable .ht-formula-builder__inline-editor .hfe-editor:after{content:"";border:var(--hfe-border-width)solid var(--hfe-editor-color-border);pointer-events:none;position:absolute;inset:0}.handsontable .hfe-editor__input,.handsontable .hfe-overlay{box-sizing:border-box;font-weight:var(--ht-font-weight,400)}.handsontable .hfe-fn-help__learn-more,.handsontable .hfe-fn-help__learn-more:hover{color:var(--hfe-color-foreground)}.handsontable td.ht-formula-builder__editing-cell{color:#0000}.handsontable .htCommentCell{position:relative}.handsontable .htCommentCell:after{content:"";border-inline-start:var(--ht-comments-indicator-size,4px)solid #0000;border-inline-end:none;border-top:var(--ht-comments-indicator-size,4px)solid var(--ht-comments-indicator-color,#1a42e8);top:0;display:block;position:absolute;inset-inline-start:unset;inset-inline-end:0}.htCommentsContainer .htComments{z-index:1059;display:none;position:absolute}.htCommentsContainer .htCommentTextArea{font-family:var(--ht-font-family),-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;box-shadow:var(--ht-menu-shadow-x,0)var(--ht-menu-shadow-y,0)var(--ht-menu-shadow-blur,8px)color-mix(in srgb,var(--ht-menu-shadow-color,#000)var(--ht-menu-shadow-opacity,100%),transparent);width:240px;height:88px;font-size:var(--ht-font-size);line-height:var(--ht-line-height);font-weight:var(--ht-font-weight);padding:var(--ht-comments-textarea-vertical-padding)var(--ht-comments-textarea-horizontal-padding);border:var(--ht-comments-textarea-border-width,1px)solid var(--ht-comments-textarea-border-color,transparent);border-inline-start:var(--ht-comments-textarea-border-width,1px)solid var(--ht-comments-textarea-border-color,#1a42e8);color:var(--ht-comments-textarea-foreground-color);background-color:var(--ht-comments-textarea-background-color,#fff);box-sizing:border-box;-webkit-appearance:none;margin:0 -1px;outline:0!important}.htCommentsContainer .htCommentTextArea:focus{border:var(--ht-comments-textarea-focus-border-width,1px)solid var(--ht-comments-textarea-focus-border-color,#1a42e8);color:var(--ht-comments-textarea-focus-foreground-color);background-color:var(--ht-comments-textarea-focus-background-color,#fff)}.htBorders .wtBorder.ht-border-style-dashed-vertical{background-image:repeating-linear-gradient(to bottom,var(--ht-custom-border-color)0 5px,transparent 0 10px)}.htBorders .wtBorder.ht-border-style-dashed-horizontal{background-image:repeating-linear-gradient(to right,var(--ht-custom-border-color)0 5px,transparent 0 10px)}.htBorders .wtBorder.ht-border-style-dotted-horizontal{background-image:radial-gradient(circle,var(--ht-custom-border-color)calc(var(--ht-custom-border-size)/2),transparent 0);background-size:calc(var(--ht-custom-border-size)*2)var(--ht-custom-border-size);background-repeat:repeat-x}.htBorders .wtBorder.ht-border-style-dotted-vertical{background-image:radial-gradient(circle,var(--ht-custom-border-color)calc(var(--ht-custom-border-size)/2),transparent 0);background-size:var(--ht-custom-border-size)calc(var(--ht-custom-border-size)*2);background-repeat:repeat-y}.handsontable .colHeader.columnSorting.sortAction{box-sizing:border-box;min-width:min(var(--ht-icon-size,16px) + 8px,100%);flex-grow:0;max-width:100%;margin-inline:auto;position:static}.handsontable .colHeader.columnSorting.sortAction:after{margin-inline:var(--ht-sort-indicator-offset);margin-inline-end:var(--ht-sort-indicator-offset-end)}.handsontable .htLeft .colHeader.columnSorting.sortAction{margin-left:0;margin-right:auto}.handsontable .htRight .colHeader.columnSorting.sortAction{margin-left:auto;margin-right:0}.handsontable th .relative{--ht-sort-indicator-offset:var(--ht-cell-horizontal-padding);--ht-sort-indicator-offset-end:var(--ht-cell-horizontal-padding);--ht-sort-indicator-reserve:var(--ht-cell-horizontal-padding);--ht-sort-indicator-reserve-end:var(--ht-sort-indicator-reserve);--ht-header-button-slot:calc(var(--ht-icon-size,16px) + 2px);--ht-header-indicator-min-width:calc(2*var(--ht-cell-horizontal-padding) + 2*var(--ht-icon-size,16px) + 6px);--ht-header-indicator-min-content-width:calc(2*var(--ht-icon-size,16px) + 6px);--ht-header-gap:2px}.handsontable .relative.has-header-button{--ht-sort-indicator-offset-end:calc(var(--ht-cell-horizontal-padding) + var(--ht-icon-size,16px) + (var(--ht-icon-button-hit-area-size,24px) - var(--ht-icon-size,16px))*.5);--ht-sort-indicator-reserve-end:var(--ht-cell-horizontal-padding)}.handsontable .relative.has-sort-indicator.has-header-button{--ht-header-gap:clamp(2px,calc((100% - var(--ht-header-indicator-min-content-width))*1000 + 2px),calc(2px + var(--ht-header-button-slot)));column-gap:var(--ht-header-gap)}.handsontable .relative.has-sort-indicator{--ht-sort-indicator-reserve:calc(var(--ht-cell-horizontal-padding) + var(--ht-icon-size,16px) + 2px);padding-inline-end:var(--ht-sort-indicator-reserve-end)}.handsontable .relative.htRight.has-sort-indicator,.handsontable .htRight .relative.has-sort-indicator{--ht-header-button-slot:0px;padding-inline-start:var(--ht-sort-indicator-reserve);padding-inline-end:var(--ht-cell-horizontal-padding)}.handsontable .relative.htRight.has-sort-indicator.has-header-button,.handsontable .htRight .relative.has-sort-indicator.has-header-button{padding-inline-start:clamp(var(--ht-cell-horizontal-padding),(100% - var(--ht-header-indicator-min-width))*1000 + var(--ht-cell-horizontal-padding),var(--ht-sort-indicator-reserve))}.handsontable .relative.has-header-button .colHeader.columnSorting.sortAction{min-width:min(var(--ht-icon-size,16px) + 8px,max(0px,100% - var(--ht-icon-size,16px) - 2px - var(--ht-header-gap)))}.handsontable .relative.has-header-button.has-sort-indicator>.ht-sort-indicator{max-width:clamp(0px,(100% - var(--ht-header-indicator-min-width))*1000,var(--ht-icon-size,16px));overflow:hidden}.handsontable .relative.has-header-button.has-sort-indicator .colHeader.columnSorting.sortAction:after{max-width:clamp(0px,(100% - var(--ht-header-indicator-min-width))*1000,8px);overflow:hidden}.handsontable .columnSorting:not(.indicatorDisabled){position:relative}.handsontable .columnSorting:not(.indicatorDisabled).sortAction:hover{cursor:pointer;text-decoration:none}.handsontable th .relative>.ht-sort-indicator{pointer-events:auto;top:50%;position:absolute;inset-inline-end:calc(var(--ht-sort-indicator-offset-end) + 2px);transform:translateY(-50%)}.handsontable .columnSorting.sortAction~.ht-sort-indicator,.handsontable .columnSorting.sortAction~.ht-sort-indicator:hover{cursor:pointer}.handsontable .relative.htRight>.ht-sort-indicator,.handsontable .htRight .relative>.ht-sort-indicator{inset-inline-start:calc(var(--ht-sort-indicator-offset) + 2px);inset-inline-end:auto}[dir=rtl] .handsontable .relative.htRight.has-sort-indicator,[dir=rtl] .handsontable .htRight .relative.has-sort-indicator{--ht-header-button-slot:calc(var(--ht-icon-size,16px) + 2px);padding-inline-start:var(--ht-cell-horizontal-padding);padding-inline-end:var(--ht-sort-indicator-reserve-end)}[dir=rtl] .handsontable .relative.htLeft.has-sort-indicator,[dir=rtl] .handsontable .htLeft .relative.has-sort-indicator{--ht-header-button-slot:0px;padding-inline-start:var(--ht-sort-indicator-reserve);padding-inline-end:var(--ht-cell-horizontal-padding)}[dir=rtl] .handsontable .relative.htLeft.has-sort-indicator.has-header-button,[dir=rtl] .handsontable .htLeft .relative.has-sort-indicator.has-header-button{padding-inline-start:clamp(var(--ht-cell-horizontal-padding),(100% - var(--ht-header-indicator-min-width))*1000 + var(--ht-cell-horizontal-padding),var(--ht-sort-indicator-reserve))}[dir=rtl] .handsontable .relative.htRight>.ht-sort-indicator,[dir=rtl] .handsontable .htRight .relative>.ht-sort-indicator{inset-inline-start:auto;inset-inline-end:calc(var(--ht-sort-indicator-offset-end) + 2px)}[dir=rtl] .handsontable .relative.htLeft>.ht-sort-indicator,[dir=rtl] .handsontable .htLeft .relative>.ht-sort-indicator{inset-inline-start:calc(var(--ht-sort-indicator-offset) + 2px);inset-inline-end:auto}.htGhostTable .htCore .relative{--ht-sort-indicator-offset:0px;--ht-sort-indicator-offset-end:0px;--ht-header-button-slot:0px}.htGhostTable .htCore .relative.has-header-button{--ht-sort-indicator-reserve:var(--ht-cell-horizontal-padding);--ht-sort-indicator-reserve-end:var(--ht-cell-horizontal-padding)}.htGhostTable .htCore .relative.has-header-button .colHeader.columnSorting.sortAction{min-width:min(var(--ht-icon-size,16px) + 8px,100%)}.htGhostTable .htCore .relative.has-header-button .colHeader.columnSorting.sortAction:after,.htGhostTable .htCore .relative.has-header-button.has-sort-indicator>.ht-sort-indicator{max-width:none}.htGhostTable .htCore .relative.has-sort-indicator.has-header-button{--ht-header-gap:calc(2px + var(--ht-header-button-slot));column-gap:var(--ht-header-gap)}.htGhostTable .htCore span.colHeader.columnSorting:not(.indicatorDisabled):before{content:"*";padding-inline-end:calc(var(--ht-icon-size,16px) + 2px);display:inline-block;position:relative}.htGhostTable .htCore span.colHeader.columnSorting.sortAction:not(.indicatorDisabled):before{width:var(--ht-icon-size,16px)}.handsontable .colHeader.columnSorting:after{content:"";text-align:right;width:8px;margin-top:4px;font-size:8px;display:block;position:absolute;top:50%;right:0;transform:translateY(-50%)}.handsontable .colHeader.columnSorting[class^=sort-]:after,.handsontable .colHeader.columnSorting[class*=\\ sort-]:after{content:"+"}.handsontable .colHeader.columnSorting.sort-1:after{content:"1"}.handsontable .colHeader.columnSorting.sort-2:after{content:"2"}.handsontable .colHeader.columnSorting.sort-3:after{content:"3"}.handsontable .colHeader.columnSorting.sort-4:after{content:"4"}.handsontable .colHeader.columnSorting.sort-5:after{content:"5"}.handsontable .colHeader.columnSorting.sort-6:after{content:"6"}.handsontable .colHeader.columnSorting.sort-7:after{content:"7"}.handsontable .htRight .colHeader.columnSorting:after,[dir=rtl] .handsontable .colHeader.columnSorting:after{text-align:left;left:0;right:auto}[dir=rtl] .handsontable .htLeft .colHeader.columnSorting:after{text-align:right;left:auto;right:0}.htGhostTable th div:has(.changeType) span.colHeader.columnSorting:not(.indicatorDisabled){padding-inline-end:var(--ht-gap-size)}.handsontable .ht_clone_top_inline_start_corner th.ht__active_highlight,.handsontable .ht_clone_top_inline_end_corner th.ht__active_highlight{box-shadow:none}[dir=rtl].handsontable .ht-freeze-bar-guide--rows,[dir=rtl].handsontable .ht-freeze-bar-ghost--rows{--ht-freeze-bar-header-side:to left}[dir=rtl].handsontable.ht-freeze-bar-columns .manualColumnResizer.ht-resize-handle--freeze-before:before{left:0}[dir=rtl].handsontable.ht-freeze-bar-columns .manualColumnResizer.ht-resize-handle--freeze-before:after{left:calc(6px + var(--ht-sizing-size-1))}[dir=rtl].handsontable.ht-freeze-bar-columns .manualColumnResizer.ht-resize-handle--freeze-after:before{left:calc(0px - var(--ht-sizing-size-1))}[dir=rtl].handsontable.ht-freeze-bar-columns .manualColumnResizer.ht-resize-handle--freeze-after:after{left:6px}.handsontable .ht-freeze-bar{z-index:105;background:var(--ht-freeze-bar-color);cursor:grab;touch-action:none;position:absolute}.handsontable .ht-freeze-bar--active{cursor:grabbing}.handsontable .ht-freeze-bar--hover:not(.ht-freeze-bar--wide){--ht-freeze-bar-hover-side:to bottom;--ht-freeze-bar-header-paint:var(--ht-freeze-bar-hover-color);background:linear-gradient(var(--ht-freeze-bar-hover-side),var(--ht-freeze-bar-color)var(--ht-freeze-bar-header-from),var(--ht-freeze-bar-header-paint)var(--ht-freeze-bar-header-from),var(--ht-freeze-bar-header-paint)var(--ht-freeze-bar-header-to),var(--ht-freeze-bar-color)var(--ht-freeze-bar-header-to))}.handsontable .ht-freeze-bar--hover:not(.ht-freeze-bar--wide).ht-freeze-bar--active{--ht-freeze-bar-header-paint:var(--ht-freeze-bar-highlight-color)}.handsontable .ht-freeze-bar--hover:not(.ht-freeze-bar--wide).ht-freeze-bar--top,.handsontable .ht-freeze-bar--hover:not(.ht-freeze-bar--wide).ht-freeze-bar--bottom{--ht-freeze-bar-hover-side:to right}.handsontable .ht-freeze-bar--focused{outline:var(--ht-sizing-size-0-5)solid var(--ht-accent-color);outline-offset:calc(-1*var(--ht-sizing-size-0-5))}@media (pointer:coarse){.handsontable .ht-freeze-bar:before{content:"";position:absolute;inset:0}.handsontable .ht-freeze-bar.ht-freeze-bar--start:before{inset-inline-start:-12px}.handsontable .ht-freeze-bar.ht-freeze-bar--top:before{inset-block-start:-12px}.handsontable .ht-freeze-bar.ht-freeze-bar--end:before{inset-inline-end:-12px}.handsontable .ht-freeze-bar.ht-freeze-bar--bottom:before{inset-block-end:-12px}}.handsontable .ht-freeze-bar--start{width:var(--ht-sizing-size-1);top:0;bottom:0;inset-inline-end:0}.handsontable .ht-freeze-bar--top{height:var(--ht-sizing-size-1);inset-inline:0;bottom:0}.handsontable .ht-freeze-bar--end{width:var(--ht-sizing-size-1);top:0;bottom:0;inset-inline-start:0}.handsontable .ht-freeze-bar--bottom{height:var(--ht-sizing-size-1);inset-inline:0;top:0}.handsontable .ht-freeze-bar--empty{z-index:190}.handsontable .ht-freeze-bar--empty.ht-freeze-bar--start{inset-inline-end:auto}.handsontable .ht-freeze-bar--empty.ht-freeze-bar--top{bottom:auto;inset-inline:0}.handsontable .ht-freeze-bar--empty.ht-freeze-bar--end{inset-inline-start:auto}.handsontable .ht-freeze-bar--empty.ht-freeze-bar--bottom{top:auto;inset-inline:0}.handsontable .ht-freeze-bar--empty.ht-freeze-bar--wide{background:0 0}.handsontable .ht-freeze-bar--empty.ht-freeze-bar--wide:after{content:"";background:var(--ht-freeze-bar-color);position:absolute}.handsontable .ht-freeze-bar--empty.ht-freeze-bar--wide.ht-freeze-bar--hover:after{background:var(--ht-freeze-bar-hover-color)}.handsontable .ht-freeze-bar--empty.ht-freeze-bar--wide.ht-freeze-bar--hover.ht-freeze-bar--active:after{background:var(--ht-freeze-bar-highlight-color)}.handsontable .ht-freeze-bar--empty.ht-freeze-bar--wide.ht-freeze-bar--start:after{height:var(--ht-freeze-bar-corner);inset-block-start:0;inset-inline:0}.handsontable .ht-freeze-bar--empty.ht-freeze-bar--wide.ht-freeze-bar--top:after{width:var(--ht-freeze-bar-corner);inset-block:0;inset-inline-start:0}@media (pointer:coarse){.handsontable .ht-freeze-bar--empty.ht-freeze-bar--wide.ht-freeze-bar--start:before{height:var(--ht-freeze-bar-corner);inset:0 -20px auto}.handsontable .ht-freeze-bar--empty.ht-freeze-bar--wide.ht-freeze-bar--top:before{width:var(--ht-freeze-bar-corner);inset-block:-20px;inset-inline:0 auto}}.handsontable.ht-freeze-bar-columns .manualColumnResizer.ht-resize-handle--freeze-before:before{left:calc(2px - var(--ht-sizing-size-1))}.handsontable.ht-freeze-bar-columns .manualColumnResizer.ht-resize-handle--freeze-before:after{left:8px;right:auto}.handsontable.ht-freeze-bar-columns .manualColumnResizer.ht-resize-handle--freeze-after:before{left:2px}.handsontable.ht-freeze-bar-columns .manualColumnResizer.ht-resize-handle--freeze-after:after{right:auto;left:calc(8px + var(--ht-sizing-size-1))}.handsontable.ht-freeze-bar-rows .manualRowResizer.ht-resize-handle--freeze-before:before{top:calc(2px - var(--ht-sizing-size-1))}.handsontable.ht-freeze-bar-rows .manualRowResizer.ht-resize-handle--freeze-before:after{top:8px;bottom:auto}.handsontable.ht-freeze-bar-rows .manualRowResizer.ht-resize-handle--freeze-after:before{top:2px}.handsontable.ht-freeze-bar-rows .manualRowResizer.ht-resize-handle--freeze-after:after{bottom:auto;top:calc(8px + var(--ht-sizing-size-1))}.handsontable.ht-freeze-bar-dragging,.handsontable.ht-freeze-bar-dragging *{cursor:grabbing}.handsontable .ht-freeze-bar-guide,.handsontable .ht-freeze-bar-ghost{--ht-freeze-bar-header-side:to bottom;z-index:216;background:linear-gradient(var(--ht-freeze-bar-header-side),var(--ht-freeze-bar-highlight-color)var(--ht-freeze-bar-header),var(--ht-freeze-bar-shadow-color)var(--ht-freeze-bar-header))}.handsontable .ht-freeze-bar-guide--rows,.handsontable .ht-freeze-bar-ghost--rows{--ht-freeze-bar-header-side:to right}.handsontable .ht-freeze-bar-guide{--ht-freeze-bar-shadow-color:color-mix(in srgb,var(--ht-freeze-bar-color)60%,transparent)}.handsontable .ht-freeze-bar-ghost{z-index:217;--ht-freeze-bar-shadow-color:color-mix(in srgb,var(--ht-freeze-bar-highlight-color)25%,transparent)}.handsontable .manualColumnResizer{cursor:col-resize;opacity:0;z-index:210;background:0 0;width:10px;margin:0;position:absolute;top:0}.handsontable .manualColumnResizer:before,.handsontable .manualColumnResizer:after{content:"";background:var(--ht-resize-indicator-color);border-radius:2px;width:2px;height:calc(100% - 12px);max-height:16px;margin-top:.5px;display:block;position:absolute;top:50%;left:1px;transform:translateY(-50%)}.handsontable .manualColumnResizer:after{left:auto;right:0}.handsontable .manualColumnResizer:hover,.handsontable .manualColumnResizer.active{opacity:1}.handsontable .manualColumnResizerGuide{border-inline-end:1px solid var(--ht-accent-color);width:0;inset-inline-end:unset;border-inline-start:none;margin-inline-start:5px;margin-inline-end:unset;display:none;position:absolute;top:0}.handsontable .manualColumnResizerGuide.active{z-index:209;display:block}.handsontable .manualRowResizer{z-index:210;cursor:row-resize;opacity:0;background:0 0;height:10px;margin:0;position:absolute;left:0}.handsontable .manualRowResizer:before,.handsontable .manualRowResizer:after{content:"";background:var(--ht-resize-indicator-color);border-radius:2px;width:calc(100% - 12px);max-width:16px;height:2px;display:block;position:absolute;top:1px;left:50%;transform:translate(-50%)}.handsontable .manualRowResizer:after{top:auto;bottom:0}.handsontable .manualRowResizer:hover,.handsontable .manualRowResizer.active{opacity:1}.handsontable .manualRowResizerGuide{border-bottom:1px solid var(--ht-accent-color);border-top:none;height:0;margin-top:5px;display:none;position:absolute;bottom:0;left:0}.handsontable .manualRowResizerGuide.active{z-index:209;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-multiple]:before,.handsontable tbody td[rowspan][class*=area][class*=highlight][class*=fullySelectedMergedCell-0]:before{opacity:.14}.handsontable tbody td[rowspan][class*=area][class*=highlight][class*=fullySelectedMergedCell-1]:before{opacity:.21}.handsontable tbody td[rowspan][class*=area][class*=highlight][class*=fullySelectedMergedCell-2]:before{opacity:.28}.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:.42}.handsontable tbody td[rowspan][class*=area][class*=highlight][class*=fullySelectedMergedCell-5]:before{opacity:.49}.handsontable tbody td[rowspan][class*=area][class*=highlight][class*=fullySelectedMergedCell-6]:before{opacity:.56}.handsontable tbody td[rowspan][class*=area][class*=highlight][class*=fullySelectedMergedCell-7]:before{opacity:.63}.handsontable .ht__manualColumnMove.after-selection--columns thead th.ht__highlight,.handsontable .ht__manualColumnMove.after-selection--columns thead th.ht__active_highlight,.handsontable.ht__manualColumnMove.after-selection--columns thead th.ht__highlight,.handsontable.ht__manualColumnMove.after-selection--columns thead th.ht__active_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,.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,.handsontable.ht__manualColumnMove.on-moving--columns .manualColumnResizer{display:none}.handsontable .ht__manualColumnMove--guideline,.handsontable .ht__manualColumnMove--backlight,.handsontable.ht__manualColumnMove--guideline,.handsontable.ht__manualColumnMove--backlight{height:100%;display:none;position:absolute}.handsontable .ht__manualColumnMove--guideline,.handsontable.ht__manualColumnMove--guideline{z-index:205;background:var(--ht-move-indicator-color,#1a42e8);width:1px;margin-inline:-.5px 0;top:0}.handsontable .ht__manualColumnMove--backlight,.handsontable.ht__manualColumnMove--backlight{z-index:205;pointer-events:none;background:color-mix(in srgb,var(--ht-move-backlight-color)var(--ht-move-backlight-opacity,100%),transparent);display:none}.handsontable .on-moving--columns.show-ui .ht__manualColumnMove--guideline,.handsontable .on-moving--columns .ht__manualColumnMove--backlight,.handsontable.on-moving--columns.show-ui .ht__manualColumnMove--guideline,.handsontable.on-moving--columns .ht__manualColumnMove--backlight{display:block}.handsontable .wtHider{position:relative}.handsontable .ht__manualRowMove.after-selection--rows tbody th.ht__highlight,.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,.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,.handsontable.ht__manualRowMove.on-moving--rows .manualRowResizer{display:none}.handsontable .ht__manualRowMove--guideline,.handsontable .ht__manualRowMove--backlight,.handsontable.ht__manualRowMove--guideline,.handsontable.ht__manualRowMove--backlight{width:100%;display:none;position:absolute}.handsontable .ht__manualRowMove--guideline,.handsontable.ht__manualRowMove--guideline{border-top:1px solid var(--ht-move-indicator-color);z-index:205;left:0}.handsontable .ht__manualRowMove--backlight,.handsontable.ht__manualRowMove--backlight{z-index:205;pointer-events:none;background:color-mix(in srgb,var(--ht-move-backlight-color)var(--ht-move-backlight-opacity,100%),transparent);display:none}.handsontable .on-moving--rows.show-ui .ht__manualRowMove--guideline,.handsontable .on-moving--rows .ht__manualRowMove--backlight,.handsontable.on-moving--rows.show-ui .ht__manualRowMove--guideline,.handsontable.on-moving--rows .ht__manualRowMove--backlight{display:block}.ht-dialog{scrollbar-width:auto;scrollbar-color:var(--ht-scrollbar-thumb-color)var(--ht-scrollbar-track-color);font-size:var(--ht-font-size);line-height:var(--ht-line-height);letter-spacing:var(--ht-letter-spacing);z-index:1060;opacity:0;border-radius:var(--ht-border-radius);border:1px solid var(--ht-border-color);width:100%;height:100%;display:none;position:absolute;top:0;left:0;overflow-y:auto;box-sizing:border-box!important}.ht-dialog[dir=rtl]{left:auto;right:0}.ht-dialog:focus,.ht-dialog:has(.htFocusCatcher:focus){border:1px solid var(--ht-accent-color);outline:none}.ht-dialog *{box-sizing:border-box!important}.ht-dialog--background-solid{background-color:var(--ht-dialog-solid-background-color)}.ht-dialog--background-semi-transparent{background-color:color-mix(in srgb,var(--ht-dialog-semi-transparent-background-color)var(--ht-dialog-semi-transparent-background-opacity,100%),transparent)}.ht-dialog--animation{transition:opacity var(--ht-table-transition)ease-in-out}.ht-dialog--show{opacity:1}.ht-dialog__content-wrapper{width:100%;min-height:100%;padding:calc(var(--ht-gap-size)*4);border-radius:var(--ht-border-radius);justify-content:center;align-items:center;display:flex}.ht-dialog__content{padding:var(--ht-dialog-content-padding-horizontal)var(--ht-dialog-content-padding-vertical);max-width:480px;color:var(--ht-foreground-color);position:relative}.ht-dialog__content--background{box-shadow:var(--ht-shadow-x,0)var(--ht-shadow-y,0)var(--ht-shadow-blur,8px)color-mix(in srgb,var(--ht-shadow-color,#000)var(--ht-shadow-opacity,100%),transparent);border-radius:var(--ht-dialog-content-border-radius);background-color:var(--ht-dialog-content-background-color)}.ht-dialog--confirm .ht-dialog__content-wrapper{text-align:center;padding:calc(var(--ht-gap-size)*2)}.ht-dialog--confirm .ht-dialog__content-wrapper-inner{max-width:480px;padding:calc(var(--ht-gap-size)*2);border-radius:var(--ht-border-radius);flex-direction:column;justify-content:center;align-items:center;display:flex}.ht-dialog--confirm .ht-dialog__content-wrapper-inner--background{box-shadow:var(--ht-shadow-x,0)var(--ht-shadow-y,0)var(--ht-shadow-blur,8px)color-mix(in srgb,var(--ht-shadow-color,#000)var(--ht-shadow-opacity,100%),transparent);border-radius:var(--ht-dialog-content-border-radius);background-color:var(--ht-dialog-content-background-color)}.ht-dialog--confirm .ht-dialog__content-wrapper-inner:focus{box-shadow:0 0 0 1px var(--ht-accent-color);outline:none}.ht-dialog--confirm .ht-dialog__content{justify-content:center;align-items:center;gap:var(--ht-gap-size);flex-direction:column;display:flex}.ht-dialog--confirm .ht-dialog__content:has(.ht-dialog__buttons){gap:calc(var(--ht-gap-size)*2)}.ht-dialog--confirm .ht-dialog__title{font-size:var(--ht-font-size);font-weight:var(--ht-font-weight);line-height:var(--ht-line-height);margin:0}.ht-dialog--confirm .ht-dialog__description{color:var(--ht-foreground-secondary-color);font-size:var(--ht-font-size-small);line-height:var(--ht-line-height-small);font-weight:var(--ht-font-weight);margin:0}.ht-dialog--confirm .ht-dialog__buttons{justify-content:center;gap:calc(var(--ht-gap-size)*2);flex-flow:wrap;display:flex}.ht-notification{z-index:1070;pointer-events:none;position:absolute;inset:0;overflow:visible}.ht-notification__stack{overscroll-behavior:contain;pointer-events:auto;-webkit-overflow-scrolling:touch;scrollbar-width:auto;scrollbar-color:var(--ht-scrollbar-thumb-color)var(--ht-scrollbar-track-color);flex-direction:column;gap:10px;max-width:min(420px,100% - 40px);min-height:0;padding:10px;display:flex;position:absolute;overflow:hidden auto}.ht-notification__stack--top-start{top:10px;align-items:flex-start;max-height:calc(100% - 40px);inset-inline-start:10px}.ht-notification__stack--top-end{top:10px;align-items:flex-end;max-height:calc(100% - 40px);inset-inline-end:10px}.ht-notification__stack--bottom-start{bottom:10px;align-items:flex-start;max-height:calc(100% - 40px);inset-inline-start:10px}.ht-notification__stack--bottom-end{bottom:10px;align-items:flex-end;max-height:calc(100% - 40px);inset-inline-end:10px}.ht-notification__toast{box-shadow:var(--ht-shadow-x,0)var(--ht-shadow-y,0)var(--ht-shadow-blur,8px)color-mix(in srgb,var(--ht-shadow-color,#000)var(--ht-shadow-opacity,100%),transparent);pointer-events:auto;max-width:100%;color:var(--ht-notification-foreground-color,var(--ht-foreground-color));background-color:var(--ht-notification-background-color,var(--ht-background-color));border:1px solid var(--ht-notification-border-color,var(--ht-border-color));border-radius:var(--ht-border-radius,4px);font-size:var(--ht-font-size);line-height:var(--ht-line-height);letter-spacing:var(--ht-letter-spacing);outline:none;flex-shrink:0;display:flex;position:relative}.ht-notification__toast:focus-visible{box-shadow:0 0 0 1px var(--ht-accent-color)}.ht-notification__toast--animate{opacity:0;transition:opacity var(--ht-table-transition,.15s)ease-out,transform var(--ht-table-transition,.15s)ease-out}.ht-notification__toast--animate.ht-notification__toast--stack-top:not(.ht-notification__toast--visible){transform:translateY(-6px)}.ht-notification__toast--animate.ht-notification__toast--stack-bottom:not(.ht-notification__toast--visible){transform:translateY(6px)}.ht-notification__toast--visible{opacity:1;transform:translateY(0)}.ht-notification__toast--info .ht-notification__accent{display:none}.ht-notification__toast--success .ht-notification__accent{background-color:var(--ht-notification-success-accent,#37bc6c)}.ht-notification__toast--warning .ht-notification__accent{background-color:var(--ht-notification-warning-accent,#fbe952)}.ht-notification__toast--error .ht-notification__accent{background-color:var(--ht-notification-error-accent,#fa4d32)}.ht-notification__toast-inner{width:100%;min-width:0;direction:inherit;flex-direction:row;align-items:stretch;gap:0;padding:10px;display:flex}.ht-notification__accent{box-sizing:border-box;border-radius:4px;flex:0 0 4px;align-self:stretch;margin-inline-end:10px}.ht-notification__body{flex:auto;min-width:0}.ht-notification__title{margin:0 0 var(--ht-gap-size);font-size:var(--ht-font-size);font-weight:var(--ht-font-weight,600)}.ht-notification__message{font-size:var(--ht-font-size-small);word-break:break-word;margin:0}.ht-notification__actions{gap:var(--ht-gap-size);margin-top:var(--ht-gap-size);flex-wrap:wrap;display:flex}.ht-notification__close{box-sizing:border-box;width:var(--ht-icon-button-hit-area-size);height:var(--ht-icon-button-hit-area-size);color:var(--ht-icon-button-icon-color,inherit);cursor:pointer;border-radius:var(--ht-icon-button-border-radius,var(--ht-border-radius,4px));background:0 0;border:none;flex:none;align-self:flex-start;margin-inline-start:4px;padding:0;position:relative;overflow:visible}.ht-notification__close .ht-icon{margin-top:calc(-.5*var(--ht-icon-size));top:50%;margin-inline-start:calc(-.5*var(--ht-icon-size));position:absolute;inset-inline-start:50%}.ht-notification__close:hover{color:var(--ht-icon-button-hover-icon-color,inherit);background-color:var(--ht-icon-button-hover-background-color,color-mix(in srgb,var(--ht-foreground-color)8%,transparent))}.ht-notification__close:focus-visible{outline:2px solid var(--ht-accent-color);outline-offset:2px}.handsontable.ht-pagination{width:100%;color:var(--ht-pagination-bar-foreground-color);background:var(--ht-pagination-bar-background-color);font-size:var(--ht-font-size);line-height:var(--ht-line-height);box-sizing:border-box;overflow-x:auto}.handsontable.ht-pagination:not(.ht-slot-element){border:1px solid var(--ht-border-color);border-radius:var(--ht-border-radius)}.handsontable.ht-pagination .ht-pagination__inner{justify-content:space-between;align-items:center;gap:calc(var(--ht-gap-size)*4);padding-inline:var(--ht-pagination-bar-horizontal-padding);padding-block:var(--ht-pagination-bar-vertical-padding);flex-wrap:wrap;min-width:230px;display:flex}.handsontable.ht-pagination .ht-page-size-section{align-items:center;gap:calc(var(--ht-gap-size)*2);display:flex}.handsontable.ht-pagination .ht-page-size-section__label{white-space:nowrap;font-size:inherit;line-height:inherit;font-weight:inherit;letter-spacing:inherit;font-family:inherit}.handsontable.ht-pagination .ht-page-size-section__select-wrapper{border-radius:var(--ht-input-border-radius);background-color:var(--ht-input-background-color);position:relative}.handsontable.ht-pagination .ht-page-size-section__select-wrapper:focus-within{background-color:var(--ht-input-focus-background-color)}.handsontable.ht-pagination .ht-page-size-section__select-wrapper:hover{background-color:var(--ht-input-hover-background-color)}.handsontable.ht-pagination .ht-page-size-section__select-wrapper select{padding-inline-start:var(--ht-gap-size);padding-inline-end:calc(var(--ht-gap-size) + var(--ht-icon-size));padding-top:var(--ht-gap-size);padding-bottom:var(--ht-gap-size);border-radius:var(--ht-input-border-radius);color:var(--ht-input-foreground-color);border:1px solid var(--ht-input-border-color);line-height:calc(var(--ht-line-height) - 4px);-webkit-appearance:none;font-size:inherit;cursor:pointer;background-color:#0000}.handsontable.ht-pagination .ht-page-size-section__select-wrapper select:disabled{opacity:.4;cursor:default;color:var(--ht-input-disabled-foreground-color);border-color:var(--ht-input-disabled-border-color)}.handsontable.ht-pagination .ht-page-size-section__select-wrapper select:hover:not(:disabled){color:var(--ht-input-hover-foreground-color);border-color:var(--ht-input-hover-border-color)}.handsontable.ht-pagination .ht-page-size-section__select-wrapper select:focus{color:var(--ht-input-focus-foreground-color);border-color:var(--ht-input-focus-border-color);outline:none}.handsontable.ht-pagination .ht-page-size-section__select-wrapper .ht-icon{color:var(--ht-foreground-color);inset-inline-end:var(--ht-gap-size);position:absolute;top:50%;transform:translateY(-50%)}.handsontable.ht-pagination .ht-page-counter-section{margin-inline-end:auto}.handsontable.ht-pagination .ht-page-navigation-section{align-items:center;gap:1px;display:flex}.handsontable.ht-pagination .ht-page-navigation-section__button{font-size:inherit;border:1px solid var(--ht-pagination-button-border-color);color:var(--ht-pagination-button-foreground-color);background-color:var(--ht-pagination-button-background-color);border-radius:var(--ht-icon-button-large-border-radius);padding:var(--ht-icon-button-large-padding);cursor:pointer}.handsontable.ht-pagination .ht-page-navigation-section__button .ht-icon{display:block}.handsontable.ht-pagination .ht-page-navigation-section__button--disabled{cursor:default;pointer-events:none;color:var(--ht-pagination-button-disabled-foreground-color);background-color:var(--ht-pagination-button-disabled-background-color);border-color:var(--ht-pagination-button-disabled-border-color)}.handsontable.ht-pagination .ht-page-navigation-section__button:hover:not(:disabled){border-color:var(--ht-pagination-button-hover-border-color);color:var(--ht-pagination-button-hover-foreground-color);background-color:var(--ht-pagination-button-hover-background-color)}.handsontable.ht-pagination .ht-page-navigation-section__button:focus{border-color:var(--ht-pagination-button-focus-border-color);color:var(--ht-pagination-button-focus-foreground-color);background-color:var(--ht-pagination-button-focus-background-color);outline:none}.handsontable.ht-pagination .ht-page-navigation-section__label{white-space:nowrap;text-align:center;min-width:100px;font-size:inherit;line-height:inherit;font-weight:inherit;letter-spacing:inherit;font-family:inherit}.handsontable.htSheetsBarMenu{overflow:hidden}.handsontable.htSheetsBarMenu>.ht_master{padding-block:0}.handsontable.htMenu.htSheetsBarMenu .ht_master .wtHolder,.handsontable.htMenu.htSheetsBarMenu .ht_master .htScrollbarFrame{box-shadow:none}.handsontable.htSheetsBarMenu .ht_master .wtHolder{padding-block:var(--ht-menu-vertical-padding,8px);max-height:calc(8*(var(--ht-line-height) + var(--ht-menu-item-vertical-padding)*2 + 1px));overflow:hidden auto}.handsontable.htSheetsBarMenu table tbody tr td .htItemWrapper span.selected .ht-icon{color:var(--ht-menu-item-active-color,var(--ht-accent-color))}.handsontable.htSheetsBarMenu table tbody tr td .htItemWrapper{text-overflow:ellipsis;white-space:nowrap;max-width:32ch;padding-inline-end:calc(var(--ht-icon-size) + var(--ht-gap-size));overflow:hidden}.handsontable.htSheetsBarMenu table tbody tr td.htCustomMenuRenderer:not(.htDisabled):hover{cursor:pointer;background:color-mix(in srgb,var(--ht-menu-item-hover-color)var(--ht-menu-item-hover-color-opacity,100%),transparent)!important}.handsontable.htSheetsBarMenu table tbody tr td.htCustomMenuRenderer:not(.htDisabled).current{box-shadow:inset 0 0 0 1px var(--ht-menu-item-active-color,var(--ht-accent-color))}.handsontable.ht-sheets-bar{--ht-private-tab-enter-offset:-2em;--ht-private-sheets-bar-button-width:calc((2*var(--ht-icon-button-large-padding)) + var(--ht-icon-size) + 2px);width:100%;color:var(--ht-bar-foreground-color);background:var(--ht-sheets-bar-background-color);font-size:var(--ht-font-size);line-height:var(--ht-line-height);box-sizing:border-box;overflow:auto hidden}.handsontable.ht-sheets-bar:not(.ht-slot-element){border:1px solid var(--ht-border-color);border-radius:var(--ht-border-radius)}.handsontable.ht-sheets-bar.ht-slot-element{border-top-width:1px}.handsontable.ht-sheets-bar[dir=rtl]{--ht-private-tab-enter-offset:2em}.handsontable.ht-sheets-bar .ht-sheets-bar__inner{min-width:min-content;padding-inline:var(--ht-sheets-bar-horizontal-padding);grid-template-columns:auto minmax(auto,1fr) auto;align-items:stretch;display:grid}.handsontable.ht-sheets-bar .ht-sheets-bar__tabs-sizer{visibility:hidden;pointer-events:none;grid-area:1/2/auto/4;min-width:max-content;height:0;display:grid;overflow:clip}.handsontable.ht-sheets-bar .ht-sheets-bar__tabs-sizer>div{white-space:nowrap;padding-inline:var(--ht-sheets-bar-tab-horizontal-padding)calc(var(--ht-sheets-bar-tab-horizontal-padding) + var(--ht-sizing-size-1) + var(--ht-icon-size) + var(--ht-gap-size) + 2px + 2*var(--ht-private-sheets-bar-button-width) + 1px + 2*var(--ht-gap-size));grid-area:1/1}.handsontable.ht-sheets-bar .ht-sheets-bar__controls,.handsontable.ht-sheets-bar .ht-sheets-bar__paging{flex:none;align-items:center;gap:1px;display:flex}.handsontable.ht-sheets-bar .ht-sheets-bar__controls[hidden],.handsontable.ht-sheets-bar .ht-sheets-bar__paging[hidden]{display:none}.handsontable.ht-sheets-bar .ht-sheets-bar__controls{padding-inline:calc(var(--ht-gap-size)*2);grid-area:1/1;position:relative}.handsontable.ht-sheets-bar.ht-sheets-bar--strip-scrolled .ht-sheets-bar__controls:after{content:"";background:var(--ht-border-color);z-index:1;pointer-events:none;inset-inline-end:0;width:1px;position:absolute;top:0;bottom:0}.handsontable.ht-sheets-bar .ht-sheets-bar__paging{grid-area:1/3;padding-inline-start:calc(var(--ht-gap-size)*2);position:relative}.handsontable.ht-sheets-bar.ht-sheets-bar--strip-more-end .ht-sheets-bar__paging:before{content:"";background:var(--ht-border-color);z-index:1;pointer-events:none;inset-inline-start:0;width:1px;position:absolute;top:0;bottom:0}.handsontable.ht-sheets-bar .ht-sheets-bar__button{font-size:inherit;border:1px solid var(--ht-pagination-button-border-color);color:var(--ht-pagination-button-foreground-color);background-color:var(--ht-pagination-button-background-color);border-radius:var(--ht-icon-button-large-border-radius);padding:var(--ht-icon-button-large-padding);cursor:pointer;justify-content:center;align-items:center;display:flex}.handsontable.ht-sheets-bar .ht-sheets-bar__button:disabled,.handsontable.ht-sheets-bar .ht-sheets-bar__button.ht-sheets-bar__button--disabled{cursor:default;pointer-events:none;color:var(--ht-pagination-button-disabled-foreground-color);background-color:var(--ht-pagination-button-disabled-background-color);border-color:var(--ht-pagination-button-disabled-border-color)}.handsontable.ht-sheets-bar .ht-sheets-bar__button:hover:not(:disabled,.ht-sheets-bar__button--disabled){border-color:var(--ht-pagination-button-hover-border-color);color:var(--ht-pagination-button-hover-foreground-color);background-color:var(--ht-pagination-button-hover-background-color)}.handsontable.ht-sheets-bar .ht-sheets-bar__button:focus-visible{border-color:var(--ht-pagination-button-focus-border-color);color:var(--ht-pagination-button-focus-foreground-color);background-color:var(--ht-pagination-button-focus-background-color);outline:none}.handsontable.ht-sheets-bar .ht-sheets-bar__tabs{contain:inline-size;grid-area:1/2;align-items:stretch;min-width:0;padding-inline-end:1px;display:flex;position:relative;overflow-x:auto;scrollbar-width:none!important}.handsontable.ht-sheets-bar .ht-sheets-bar__tabs::-webkit-scrollbar{display:none}.handsontable.ht-sheets-bar .ht-sheets-bar__tab{isolation:isolate;cursor:pointer;align-items:center;gap:var(--ht-sizing-size-1);padding-inline:var(--ht-sheets-bar-tab-horizontal-padding);padding-block:var(--ht-sheets-bar-tab-vertical-padding);color:var(--ht-sheets-bar-tab-foreground-color);background:var(--ht-sheets-bar-tab-background-color);-webkit-user-select:none;user-select:none;touch-action:pan-x pan-y;transition:transform var(--ht-private-tab-slide-duration,var(--ht-table-transition))var(--ht-private-tab-slide-easing,ease-out),color var(--ht-table-transition)ease-out;flex:none;display:flex;position:relative}@media (prefers-reduced-motion:reduce){.handsontable.ht-sheets-bar .ht-sheets-bar__tab{transition:none}}.handsontable.ht-sheets-bar .ht-sheets-bar__tab--entering{animation:ht-sheets-bar-tab-enter var(--ht-table-transition)ease-out backwards}@media (prefers-reduced-motion:reduce){.handsontable.ht-sheets-bar .ht-sheets-bar__tab--entering{animation:none}}.handsontable.ht-sheets-bar .ht-sheets-bar__tab:hover{color:var(--ht-sheets-bar-tab-hover-foreground-color)}.handsontable.ht-sheets-bar .ht-sheets-bar__tab--active,.handsontable.ht-sheets-bar .ht-sheets-bar__tab--active:hover{color:var(--ht-sheets-bar-tab-active-foreground-color);background:var(--ht-sheets-bar-tab-active-background-color)}.handsontable.ht-sheets-bar .ht-sheets-bar__tab--active:after{content:"";border-block-end:var(--ht-sheets-bar-tab-active-border-width)solid var(--ht-sheets-bar-tab-active-border-color);pointer-events:none;inset-inline:0;position:absolute;bottom:0}.handsontable.ht-sheets-bar .ht-sheets-bar__tab--dragging{z-index:1;pointer-events:none;color:var(--ht-sheets-bar-tab-hover-foreground-color);background-color:var(--ht-sheets-bar-tab-background-color);box-shadow:var(--ht-shadow-x,0)var(--ht-shadow-y,0)var(--ht-shadow-blur,8px)color-mix(in srgb,var(--ht-shadow-color,#000)var(--ht-shadow-opacity,100%),transparent);transition:none;animation:none}.handsontable.ht-sheets-bar .ht-sheets-bar__tab--lifted{z-index:1;color:var(--ht-sheets-bar-tab-hover-foreground-color);background-color:var(--ht-sheets-bar-tab-background-color);box-shadow:var(--ht-shadow-x,0)var(--ht-shadow-y,0)var(--ht-shadow-blur,8px)color-mix(in srgb,var(--ht-shadow-color,#000)var(--ht-shadow-opacity,100%),transparent)}.handsontable.ht-sheets-bar .ht-sheets-bar__tab--active.ht-sheets-bar__tab--dragging,.handsontable.ht-sheets-bar .ht-sheets-bar__tab--active.ht-sheets-bar__tab--lifted{color:var(--ht-sheets-bar-tab-active-foreground-color);background-color:var(--ht-sheets-bar-tab-active-background-color)}@media (forced-colors:active){.handsontable.ht-sheets-bar .ht-sheets-bar__tab--lifted,.handsontable.ht-sheets-bar .ht-sheets-bar__tab--dragging{outline-offset:-2px;outline:2px solid highlight}}.handsontable.ht-sheets-bar .ht-sheets-bar__tab-ghost{top:0;bottom:0;left:var(--ht-private-tab-ghost-x,0);align-items:center;gap:var(--ht-sizing-size-1);box-sizing:border-box;width:var(--ht-private-tab-ghost-width,0);padding-inline:var(--ht-sheets-bar-tab-horizontal-padding);padding-block:var(--ht-sheets-bar-tab-vertical-padding);color:var(--ht-sheets-bar-tab-foreground-color);background:var(--ht-sheets-bar-tab-background-color);pointer-events:none;-webkit-user-select:none;user-select:none;animation:ht-sheets-bar-tab-leave var(--ht-table-transition)ease-in both;display:flex;position:absolute}@media (prefers-reduced-motion:reduce){.handsontable.ht-sheets-bar .ht-sheets-bar__tab-ghost{animation:none}}.handsontable.ht-sheets-bar .ht-sheets-bar__tabs--sliding{--ht-private-tab-slide-easing:ease-in-out}.handsontable.ht-sheets-bar .ht-sheets-bar__tab--slide-lead{z-index:1}.handsontable.ht-sheets-bar .ht-sheets-bar__tab-indicator{z-index:0;width:var(--ht-private-tab-indicator-width);transform:translateX(var(--ht-private-tab-indicator-x));background:var(--ht-sheets-bar-tab-active-background-color);border-block-end:var(--ht-sheets-bar-tab-active-border-width)solid var(--ht-sheets-bar-tab-active-border-color);pointer-events:none;transition-property:transform,width;transition-timing-function:ease-in-out;position:absolute;top:0;bottom:0;left:0}@media (prefers-reduced-motion:reduce){.handsontable.ht-sheets-bar .ht-sheets-bar__tab-indicator{transition:none}}.handsontable.ht-sheets-bar .ht-sheets-bar__tabs--indicator-moving:before{content:"";width:var(--ht-private-tab-indicator-path-width,0);transform:translateX(var(--ht-private-tab-indicator-path-x,0));background:var(--ht-sheets-bar-tab-background-color);pointer-events:none;position:absolute;top:0;bottom:0;left:0}.handsontable.ht-sheets-bar .ht-sheets-bar__tabs--indicator-moving .ht-sheets-bar__tab--indicator-path,.handsontable.ht-sheets-bar .ht-sheets-bar__tabs--indicator-moving .ht-sheets-bar__tab--active{background:0 0}.handsontable.ht-sheets-bar .ht-sheets-bar__tabs--indicator-moving .ht-sheets-bar__tab--active:after{content:none}.handsontable.ht-sheets-bar .ht-sheets-bar__tab-label,.handsontable.ht-sheets-bar .ht-sheets-bar__tab-chevron{color:inherit;font-size:inherit;line-height:inherit;font-weight:inherit;letter-spacing:inherit;cursor:pointer;background:0 0;border:none;margin:0;padding:0;font-family:inherit}.handsontable.ht-sheets-bar .ht-sheets-bar__tab:focus-visible{outline:1px solid var(--ht-pagination-button-focus-border-color);outline-offset:-1px}.handsontable.ht-sheets-bar .ht-sheets-bar__tab-chevron{color:var(--ht-icon-button-icon-color);padding:var(--ht-gap-size);margin-inline-end:calc(var(--ht-gap-size)*-1);margin-block:calc(var(--ht-gap-size)*-1);align-items:center;display:flex;position:relative}.handsontable.ht-sheets-bar .ht-sheets-bar__tab-chevron:before{content:"";inset:var(--ht-gap-size);border-radius:var(--ht-icon-button-border-radius);display:block;position:absolute}.handsontable.ht-sheets-bar .ht-sheets-bar__tab-chevron:after{content:"";inset:min(0px,(100% - var(--ht-icon-button-hit-area-size))/2);position:absolute}.handsontable.ht-sheets-bar .ht-sheets-bar__tab-chevron .ht-icon{z-index:1;position:relative}.handsontable.ht-sheets-bar .ht-sheets-bar__tab--active .ht-sheets-bar__tab-chevron:hover,.handsontable.ht-sheets-bar .ht-sheets-bar__tab--active .ht-sheets-bar__tab-chevron:focus-visible{color:var(--ht-icon-button-hover-icon-color)}.handsontable.ht-sheets-bar .ht-sheets-bar__tab--active .ht-sheets-bar__tab-chevron:hover:before,.handsontable.ht-sheets-bar .ht-sheets-bar__tab--active .ht-sheets-bar__tab-chevron:focus-visible:before{background-color:var(--ht-icon-button-hover-background-color);box-shadow:0 0 0 1px var(--ht-icon-button-hover-border-color)}.handsontable.ht-sheets-bar .ht-sheets-bar__tab--renaming .ht-sheets-bar__tab-chevron{display:none}.handsontable.ht-sheets-bar .ht-sheets-bar__tab--renaming,.handsontable.ht-sheets-bar .ht-sheets-bar__tab--renaming:hover{color:var(--ht-cell-editor-foreground-color);background:var(--ht-cell-editor-background-color);outline:2px solid var(--ht-cell-editor-border-color);outline-offset:-2px}.handsontable.ht-sheets-bar .ht-sheets-bar__tab--renaming:after{content:none}.handsontable.ht-sheets-bar .ht-sheets-bar__tab-rename{font-size:inherit;line-height:inherit;font-weight:inherit;letter-spacing:inherit;color:inherit;-webkit-user-select:text;user-select:text;box-shadow:none;background:0 0;border:none;border-radius:0;outline:none;max-width:40ch;height:auto;min-height:0;max-height:none;margin:0;padding:0;font-family:inherit}.handsontable.ht-sheets-bar .ht-sheets-bar__tab-rename-mirror{visibility:hidden;pointer-events:none;white-space:pre;font-size:inherit;line-height:inherit;font-weight:inherit;letter-spacing:inherit;border:none;margin:0;padding:0;font-family:inherit;position:absolute}.handsontable.ht-sheets-bar.ht-sheets-bar-pressing,.handsontable.ht-sheets-bar.ht-sheets-bar-pressing .ht-sheets-bar__tab,.handsontable.ht-sheets-bar.ht-sheets-bar-pressing .ht-sheets-bar__tab *,.handsontable.ht-sheets-bar.ht-sheets-bar-dragging,.handsontable.ht-sheets-bar.ht-sheets-bar-dragging *{cursor:move;cursor:-moz-grabbing;cursor:-webkit-grabbing;cursor:grabbing}.handsontable.ht-sheets-bar.ht-sheets-bar-dragging .ht-sheets-bar__tab{pointer-events:none}@keyframes ht-sheets-bar-tab-enter{0%{opacity:0;transform:translateX(var(--ht-private-tab-enter-offset))}to{opacity:1;transform:translate(0)}}@keyframes ht-sheets-bar-tab-leave{0%{opacity:1;transform:translate(0)}to{opacity:0;transform:translateX(var(--ht-private-tab-enter-offset))}}.ht-loading__icon-svg{width:var(--ht-icon-size);height:var(--ht-icon-size);color:var(--ht-accent-color);transform-origin:50%;animation:1s linear infinite ht-loading-spin;display:block}.ht-loading__content{align-items:center;gap:calc(var(--ht-gap-size)*2);display:flex}.ht-loading__title{font-size:var(--ht-font-size);font-weight:var(--ht-font-weight);line-height:var(--ht-line-height);margin:0}.ht-loading__description{color:var(--ht-foreground-secondary-color);font-size:var(--ht-font-size-small);line-height:var(--ht-line-height-small);font-weight:var(--ht-font-weight);margin:0}@keyframes ht-loading-spin{to{transform:rotate(360deg)}}.handsontable .htAsyncPending{position:relative}.handsontable .htAsyncIndicator{box-sizing:border-box;width:calc(var(--ht-icon-size)*.75);height:calc(var(--ht-icon-size)*.75);margin-top:calc(var(--ht-icon-size)*-.375);border:2px solid var(--ht-async-indicator-color,var(--ht-accent-color));pointer-events:none;top:50%;border-inline-end-color:#0000;border-radius:50%;animation:1s linear infinite ht-async-values-spin;position:absolute;inset-inline-end:var(--ht-cell-horizontal-padding)}@media (prefers-reduced-motion:reduce){.handsontable .htAsyncIndicator{animation:none}}.handsontable .htAutocompleteArrow~.htAsyncIndicator,.handsontable .ht-multi-select-arrow~.htAsyncIndicator{inset-inline-end:calc(var(--ht-cell-horizontal-padding) + var(--ht-icon-size)*1.25)}.handsontable td.htRight>.htAsyncIndicator{inset-inline:auto;left:var(--ht-cell-horizontal-padding)}.handsontable td.htLeft>.htAsyncIndicator{inset-inline:auto;right:var(--ht-cell-horizontal-padding)}.handsontable .htAsyncErrorMarker{border-inline-start:3px solid var(--ht-async-error-marker-color,var(--ht-notification-error-accent));pointer-events:none;width:0;position:absolute;inset-block:0;inset-inline-start:0}.handsontable .htAsyncErrorMessage,.handsontable .htAsyncPendingMessage{clip-path:inset(50%);white-space:nowrap;-webkit-user-select:none;user-select:none;width:1px;height:1px;position:absolute;overflow:hidden}.handsontable tbody tr>td.htAsyncError{background-color:var(--ht-async-error-background-color,var(--ht-cell-error-background-color));position:relative}@keyframes ht-async-values-spin{to{transform:rotate(360deg)}}.ht-empty-data-state{scrollbar-width:auto;scrollbar-color:var(--ht-scrollbar-thumb-color)var(--ht-scrollbar-track-color);z-index:999;border:1px solid var(--ht-border-color);border-radius:var(--ht-border-radius);box-sizing:border-box;background-color:var(--ht-background-color);width:100%;display:none;position:absolute;left:0;overflow-y:auto}.ht-empty-data-state *{box-sizing:border-box!important}.ht-empty-data-state__content-wrapper{text-align:center;width:100%;min-height:100%;padding:calc(var(--ht-gap-size)*2);border-radius:var(--ht-border-radius);justify-content:center;align-items:center;display:flex}.ht-empty-data-state__content-wrapper-inner{max-width:480px;padding:calc(var(--ht-gap-size)*2);border-radius:var(--ht-border-radius);flex-direction:column;justify-content:center;align-items:center;display:flex}.ht-empty-data-state__content-wrapper-inner:focus{box-shadow:0 0 0 1px var(--ht-accent-color);outline:none}.ht-empty-data-state__content{justify-content:center;align-items:center;gap:var(--ht-gap-size);flex-direction:column;display:flex}.ht-empty-data-state__title{font-size:var(--ht-font-size);font-weight:var(--ht-font-weight);line-height:var(--ht-line-height);margin:0}.ht-empty-data-state__description{color:var(--ht-foreground-secondary-color);font-size:var(--ht-font-size-small);line-height:var(--ht-line-height-small);font-weight:var(--ht-font-weight);margin:0}.ht-empty-data-state__buttons{justify-content:center;gap:calc(var(--ht-gap-size)*2);flex-flow:wrap;display:flex}.ht-empty-data-state__buttons--has-buttons{margin-top:calc(var(--ht-gap-size)*2)}.ht-empty-data-state__spinner{width:28px;height:28px;margin-bottom:calc(var(--ht-gap-size)*2);border:2px solid var(--ht-border-color);border-top-color:var(--ht-accent-color);border-radius:50%;flex-shrink:0;animation:.75s linear infinite ht-empty-data-state-spin}@media (prefers-reduced-motion:reduce){.ht-empty-data-state__spinner{border-top-color:var(--ht-border-color);animation:none}}.ht-empty-data-state--loading .ht-empty-data-state__content{gap:calc(var(--ht-gap-size)*.5)}.ht-empty-data-state--disable-top-border{border-top-width:0;border-start-start-radius:0;border-start-end-radius:0}.ht-empty-data-state--disable-inline-border{border-inline-start-width:0;border-start-start-radius:0;border-end-start-radius:0}.ht-empty-data-state--disable-bottom-border{border-bottom-width:0;border-end-end-radius:0;border-end-start-radius:0}.ht-root-wrapper.ht-slot-bottom-filled .ht-empty-data-state{border-end-end-radius:0;border-end-start-radius:0}@keyframes ht-empty-data-state-spin{to{transform:rotate(360deg)}}.handsontable th.htRowSelectionCell,.handsontable th.htRowSelectionHeader{cursor:pointer}.handsontable th.htRowSelectionCell .htRowSelectionCheckboxBox,.handsontable th.htRowSelectionHeader .htRowSelectionCheckboxBox{margin-inline:0}.handsontable th.htRowSelectionHeader .htRowSelectionCheckboxBox{margin-block:0}.handsontable th.htRowSelectionCheckboxOnly .relative{justify-content:center;height:100%}.handsontable th.htRowSelectionCheckboxOnly .colHeader{display:none}.handsontable .htRowSelectionCheckbox.htRowSelectionCheckboxHidden,.handsontable .htRowSelectionCheckbox.htRowSelectionCheckboxHidden+.ht-icon{visibility:hidden}.handsontable tbody tr>td.htRowSelected,.handsontable tbody tr>th.htRowSelected{background-image:linear-gradient(var(--ht-row-selection-background-color),var(--ht-row-selection-background-color))}.handsontable th.htCheckboxHeader .htCheckboxHeaderBox{margin-block:0}',this.#tf.head.appendChild(t)}#aQ(){let e=this.getCSSVariableValue("line-height"),t=this.getCSSVariableValue("cell-vertical-padding"),r=Number.parseFloat(this.getStyleForTD("border-bottom-width")??""),i=Math.round(r);if(null===e||null===t||isNaN(i))return null;let n=e+2*t+i;return Number.isFinite(n)&&r>i?this.#a0(n):n}#a0(e){let t=this.#a1(e),r=t-e;return r>0?r>this.#a2()?e:t:e}#a2(){let e=this.#a3();return e>0&&e<1?1/e-1:1}getMaxDefaultRowOvergrowth(){let e=this.#a3();return e>0&&e<1?1/e-1:0}#a3(){return this.#tf.defaultView?.devicePixelRatio??1}#a1(e){let t=this.#a3();if(null!==this.#aj&&this.#aj.declaredRowHeight===e&&this.#aj.devicePixelRatio===t)return this.#aj.cellHeight;let r=Number.parseFloat(this.#a6(["height"]).height);return r>0&&(this.#aj={declaredRowHeight:e,devicePixelRatio:t,cellHeight:r}),r}#aJ(){this.#az=!this.#a5(),this.#aV=getComputedStyle(this.#aB);let e=this.#a6(["box-sizing","border-bottom-width"]);this.#aG.td={...this.#aG.td,...{"box-sizing":e["box-sizing"],"border-bottom-width":e["border-bottom-width"]}}}#a6(e){let t=this.#tf,r=this.#aB,i=t.createElement("table"),n=t.createElement("tbody"),o=t.createElement("tr"),s=t.createElement("tr"),l=t.createElement("td");i.className="htCore",l.textContent="\xa0",s.appendChild(l),n.appendChild(o),n.appendChild(s),i.appendChild(n),r.appendChild(i);let a=getComputedStyle(l),h={};return e.forEach(e=>{h[e]=a.getPropertyValue(e)}),r.removeChild(i),h}#aq(e){let t=Math.ceil(Number.parseFloat(this.#aX(e)??""));return Number.isNaN(t)?null:t}#aX(e){let t=this.#aV?.getPropertyValue(e)??null;return""===t?null:t}#aZ(){this.#aG={},this.#aW={},this.#a$={},this.#aj=null}#a5(){if(!this.#aB.isConnected)return!1;let e=this.#aB.ownerDocument.defaultView;return null!==e&&""!==e.getComputedStyle(this.#aB).display}recacheValuesMeasuredWithoutStyles(){return!!this.#az&&!!this.#a5()&&(this.clearCache(),!0)}clearCache(){this.#aZ(),this.#aJ()}}function mZ(e,t,r){return"array"!==e&&t>0&&r>=t}let mJ=null,m0=null,m1=[];function m2(e,t){let r=e.createElement("div");r.setAttribute("role","status"),r.setAttribute("aria-live",t),r.setAttribute("aria-atomic","true");let i=r.style;return i.position="absolute",i.width="1px",i.height="1px",i.margin="-1px",i.overflow="hidden",i.clipPath="rect(0 0 0 0)",i.whiteSpace="nowrap",r}function m3(e,t="assertive"){let r="polite"===t?m0:mJ;r&&(r.textContent="",setTimeout(()=>{(r===mJ||r===m0)&&(r.textContent=e)},100))}let m6={TOP:"top",BOTTOM:"bottom"},m5="ht-slot-element";class m4{#eD;#i2=new Map;#a4=0;#a8=[];#a9;#a7;constructor(e,{itemClass:t="",onContentChange:r=()=>{}}={}){this.#eD=e,this.#a9=t,this.#a7=r}getElement(){return this.#eD}has(e){return this.#i2.has(e)}add(e,t,r=0){let i=this.#i2.get(e),n=i?i.seq:this.#a4;i&&i.element.remove(),this.#a9&&t.classList.add(this.#a9),this.#i2.set(e,{element:t,weight:r,seq:n}),i||(this.#a4+=1),this.#he(),this.#a7()}remove(e){let t=this.#i2.get(e);t&&(this.#a9&&t.element.classList.remove(this.#a9),t.element.remove(),this.#i2.delete(e),this.#a7())}setOrder(e){this.#a8=Array.isArray(e)?e.slice():[],this.#he()}getOrder(){return this.#ht()}clear(){this.#i2.forEach(e=>e.element.remove()),this.#i2.clear(),this.#a7()}#ht(){let e=this.#a8;return Array.from(this.#i2.keys()).sort((t,r)=>{let i=e.indexOf(t),n=e.indexOf(r);if(-1!==i||-1!==n)return(-1===i?1/0:i)-(-1===n?1/0:n);let o=this.#i2.get(t),s=this.#i2.get(r);return o.weight!==s.weight?o.weight-s.weight:o.seq-s.seq})}#he(){let e=this.#eD.firstChild;this.#ht().forEach(t=>{let r=this.#i2.get(t).element;r===e?e=e.nextSibling:this.#eD.insertBefore(r,e)})}}function m8(e,t){let r=t.parentElement;if(!r)return;let i=null!==t.querySelector(`:scope > .${m5}`);r.classList.toggle(`ht-slot-${e}-filled`,i)}class m9{#hr;constructor(e){this.#hr=new Map(Object.keys(e).map(t=>[t,new m4(e[t],{itemClass:m5,onContentChange:()=>m8(t,e[t])})]))}getSlot(e){let t=this.#hr.get(e);return t||tf(`Unknown layout slot "${e}".`),t}register(e,t,{side:r,weight:i=0}){this.getSlot(r).add(e,t,i)}unregister(e,t){this.getSlot(t).remove(e)}applyConfig(e={}){Object.values(m6).forEach(t=>this.getSlot(t).setOrder(e?.[t]??[]))}destroy(){this.#hr.forEach(e=>e.clear())}}let m7="http://www.w3.org/2000/svg";function fe(e,t){let r=t.createDocumentFragment(),i={};return(Array.isArray(e)?e:[e]).forEach(e=>{e&&r.appendChild(function e(t,r,i,n){let o=t.ns??n,s=o?r.createElementNS(o,t.tag):r.createElement(t.tag);return void 0!==t.className&&(o?s.setAttribute("class",t.className):s.className=t.className),t.attrs&&Object.keys(t.attrs).forEach(e=>{s.setAttribute(e,String(t.attrs[e]))}),void 0!==t.text&&(s.textContent=t.text),t.children?.forEach(t=>{t&&s.appendChild(e(t,r,i,o))}),void 0!==t.ref&&(i[t.ref]=s),s}(e,t,i))}),{fragment:r,refs:i}}let ft="mailto:sales@handsontable.com",fr="mailto:support@handsontable.com",fi="https://handsontable.com/docs/tutorial-license-key.html",fn={trial_valid:{title:"Handsontable Trial",body:({daysRemaining:e})=>`Your Handsontable license key ${e8(e)}. ${tt}`,linkText:"Contact Sales",linkHref:ft,dismissible:!1},trial_notice:{title:"Handsontable Trial",body:({daysRemaining:e})=>`Your Handsontable license key ${e8(e)}. ${tt}`,linkText:"Contact Sales",linkHref:ft,dismissible:!1},trial_soft_stop:{title:"Handsontable Trial Expired",body:()=>`${te} ${tt}`,linkText:"Contact Sales",linkHref:ft,dismissible:!0}},fo={trial_hard_stop:({licensedUntil:e})=>({title:`Your Handsontable trial license key expired on ${e}.`,description:"You may no longer use Handsontable under the trial license. To continue using the software, contact sales@handsontable.com to purchase a valid license.",action:{text:"Contact Sales",href:ft}}),invalid:()=>({title:"The license key for Handsontable is invalid.",description:"",action:{text:"Contact Support",href:fr},docsLink:{text:"Read more",href:fi,trailingText:" on how to install it properly, or contact us at support@handsontable.com."}}),missing:()=>({title:"The license key for Handsontable is missing.",description:"Use your purchased key to activate the product. ",action:{text:"Contact Support",href:fr},docsLink:{text:"Read more",href:fi,trailingText:" about it in the documentation, or contact us at support@handsontable.com."}})},fs="ht-license-powered-by",fl="licensePoweredBy",fa=`plugin:${fl}`,fh="licenseNotification",fd=`plugin:${fh}`,fu="hot-display-license-info",fc=`${fu}_missing-features`,fg=new Set,fp=new WeakMap,fm=new WeakSet;function ff(e){return e.rootSlotBottomElement?.querySelector(`.${fu}`)??null}function fw(e,t){let r=Array.from(e.children).find(e=>e.classList.contains(fs))??null;t.classList.add(m5),e.insertBefore(t,r),m8(m6.BOTTOM,e)}function fy(e,t){let r=e.rootSlotBottomElement;r&&(fw(r,t),e.getFocusScopeManager().registerScope(fh,t,{shortcutsContextName:fd,runOnlyIf:()=>null!==ff(e),onActivate:t=>{let r,i=(r=ff(e))?Array.from(r.querySelectorAll("a[href]")):[];i.length>0&&("tab_from_above"===t?i[0]?.focus():"tab_from_below"===t&&i[i.length-1]?.focus())}}))}function fb(e){let t,r,i;if(e.isDestroyed||!sC(e)||!fm.has(e))return;if(t=sv.get(e),t?.features.forEach(({isStillMissing:e},r)=>{null===e||e()||t.features.delete(r)}),r=sv.get(e),i=e.getSettings().licenseKey,void 0===r||r.key!==("string"==typeof i?i:"")||!(r.features.size>0)){sv.delete(e),fS(e);return}let n=function(e){let t=sv.get(e);if(!t)return null;let r=[...t.features.keys()],i=r.some(e=>!t.written.has(e));if(!i&&r.length===t.written.size)return null;t.written=new Set(r);let n=[...t.features.entries()].map(([e,{name:t}])=>({capability:e,name:t})).sort((e,t)=>e.name<t.name?-1:1);return{key:t.key,features:n,added:i}}(e);if(null===n)return;let{channels:o}=tc(n.key),{text:s,parts:l}=e7(n.features),a=`${n.key}
|
|
68
|
-
${n.features.map(({capability:e})=>e).join(",")}`;o.console&&n.added&&!fg.has(a)&&(fg.add(a),rd(s)),o.ui?function(e,t){let r=e.rootSlotBottomElement;if(!r)return;let i=r.ownerDocument,n=ff(e);n||((n=fp.get(e)??null)?fw(r,n):(fy(e,n=tg(i,fu)),fp.set(e,n)));let o=n.querySelector(`.${fc}`);o?(rK(o),e5(o,t,i)):n.appendChild(tp(i,fu,t,fc))}(e,l):fS(e)}function fC(e,t){!sR(t)||sE(e,t.capability)||(sT(e,t),fb(e),tf(e7([t]).text))}function fS(e){let t=ff(e),r=t?.querySelector(`.${fc}`);if(t&&r&&(r.remove(),null===t.querySelector(`.${fu}_inner`))){let e=t.parentElement;t.remove(),e&&m8(m6.BOTTOM,e)}}let fv=Object.freeze(["xlsx:import","xlsx:export","xlsx:formulas","xlsx:layout","xlsx:number_formats","xlsx:comments","xlsx:styles","xlsx:conditional_formatting","xlsx:data_validation","xlsx:protection"]),fR=Object.freeze(["xlsx:import","xlsx:formulas","xlsx:layout","xlsx:comments","xlsx:styles","xlsx:conditional_formatting","xlsx:data_validation","xlsx:protection"]),fE=Object.freeze(["xlsx:export","xlsx:formulas","xlsx:layout","xlsx:number_formats","xlsx:comments","xlsx:styles","xlsx:conditional_formatting","xlsx:data_validation","xlsx:protection"]),fT=Object.freeze({"xlsx:import":"import","xlsx:export":"export","xlsx:formulas":"formulas","xlsx:layout":"layout","xlsx:number_formats":"numberFormats","xlsx:comments":"comments","xlsx:styles":"styles","xlsx:conditional_formatting":"conditionalFormatting","xlsx:data_validation":"dataValidation","xlsx:protection":"protection"}),fx=Object.freeze({"xlsx:import":Object.freeze(["standard","professional"]),"xlsx:export":Object.freeze(["standard","professional"]),"xlsx:formulas":Object.freeze(["standard","professional"]),"xlsx:layout":Object.freeze(["standard","professional"]),"xlsx:number_formats":Object.freeze(["professional"]),"xlsx:comments":Object.freeze(["professional"]),"xlsx:styles":Object.freeze(["professional"]),"xlsx:conditional_formatting":Object.freeze(["professional"]),"xlsx:data_validation":Object.freeze(["professional"]),"xlsx:protection":Object.freeze(["professional"])}),fA=Object.freeze({import:!0,export:!0,formulas:!0,layout:!0,numberFormats:!0,comments:!0,importReport:!0,styles:!0,conditionalFormatting:!0,dataValidation:!0,protection:!0,missing:Object.freeze([])});function fM(e,t){let r=e.missing.filter(e=>t.includes(e));return r.length===e.missing.length?e:Object.freeze({...e,missing:Object.freeze(r)})}function fI(e,t){return`The xlsx ${e} skipped features your license does not unlock: ${t.join(", ")}.`}let fN=new WeakMap,fO=new Map;function fk(e){let{licenseKey:t}=e.getSettings(),r=fN.get(e);if(r&&r.key===t)return r.state;let i=tc(t,"
|
|
67
|
+
columnEnd/columnPropEnd]]) or as an array of CellRange objects.`);let r=g4(t,{createCellCoords:(...e)=>this.tableProps.createCellCoords(...e),createCellRange:(...e)=>this.tableProps.createCellRange(...e),propToCol:e=>this.tableProps.propToCol(e),keepDirection:!0}),i=this.settings.navigableHeaders,n={countRows:this.tableProps.countRows(),countCols:this.tableProps.countCols(),countRowHeaders:i?this.tableProps.countRowHeaders():0,countColHeaders:i?this.tableProps.countColHeaders():0},o=!e.some(e=>{let t=r(e),i=t.isValid(n);return!(i&&!t.containsHeaders()||i&&t.containsHeaders()&&t.isSingleHeader())});if(o){this.clear(),this.setExpectedLayers(e.length);for(let t=0;t<e.length;t++){let{from:i,to:n}=r(e[t]);if(this.setRangeStartOnly(i.clone(),!1),this.setRangeEnd(n.clone()),this.#t1)return o}this.finish()}return o}selectColumns(e,t=e,r=0){let i="string"==typeof e?this.tableProps.propToCol(e):e,n="string"==typeof t?this.tableProps.propToCol(t):t,o=this.tableProps.countRows(),s=this.tableProps.countCols(),l=this.tableProps.countColHeaders(),a=0===l?0:-l,h=this.tableProps.createCellCoords(a,i),d=this.tableProps.createCellCoords(o-1,n),u=this.tableProps.createCellRange(h,h,d).isValid({countRows:o,countCols:s,countRowHeaders:0,countColHeaders:l});if(u){let e=0,t=0;pt(r)?(e=oB(r.row??0,a,o-1),t=oB(r.col??0,Math.min(i,n),Math.max(i,n))):(e=oB("number"==typeof r?r:0,a,o-1),t=i);let s=this.tableProps.createCellCoords(e,t),h=0===l?0:oB(s.row??0,a,-1),d=this.tableProps.createCellCoords(h,i),c=this.tableProps.createCellCoords(o-1,n);if(this.runLocalHooks("beforeSelectColumns",d,c,s),this.setRangeStartOnly(d,void 0,s),this.selectedByColumnHeader.add(this.getLayerLevel()),this.#sc.add(this.getLayerLevel()),this.setRangeEnd(c),this.#t1)return u;this.runLocalHooks("afterSelectColumns",d,c,s),"mouse"!==this.getSelectionSource()&&this.finish()}return u}selectRows(e,t=e,r=0){let i=this.tableProps.countRows(),n=this.tableProps.countCols(),o=this.tableProps.countRowHeaders(),s=0===o?0:-o,l=this.tableProps.createCellCoords(e,s),a=this.tableProps.createCellCoords(t,n-1),h=this.tableProps.createCellRange(l,l,a).isValid({countRows:i,countCols:n,countRowHeaders:o,countColHeaders:0});if(h){let i=0,l=0;pt(r)?(i=oB(r.row??0,Math.min(e,t),Math.max(e,t)),l=oB(r.col??0,s,n-1)):(i=e,l=oB("number"==typeof r?r:0,s,n-1));let a=this.tableProps.createCellCoords(i,l),d=0===o?0:oB(a.col??0,s,-1),u=this.tableProps.createCellCoords(e,d),c=this.tableProps.createCellCoords(t,n-1);if(this.runLocalHooks("beforeSelectRows",u,c,a),this.setRangeStartOnly(u,void 0,a),this.selectedByRowHeader.add(this.getLayerLevel()),this.#sg.add(this.getLayerLevel()),this.setRangeEnd(c),this.#t1)return h;this.runLocalHooks("afterSelectRows",u,c,a),"mouse"!==this.getSelectionSource()&&this.finish()}return h}importSelection({ranges:e,activeRange:t,activeSelectionLayer:r,selectedByRowHeader:i,selectedByColumnHeader:n,disableHeadersHighlight:o,rowExtentSpansGrid:s=[],columnExtentSpansGrid:l=[]}){0!==e.length&&(this.selectedRange.clear(),this.highlight.clear(),this.inProgress=!1,this.#o7=o,this.selectedByRowHeader=new Set(i),this.selectedByColumnHeader=new Set(n),this.#sc=new Set(s),this.#sg=new Set(l),this.setActiveSelectionLayerIndex(0),e.forEach((e,t)=>{this.selectedRange.push(e),this.applyAndCommit(e,t)}),this.setRangeFocus(t.highlight,r),this.#o7=!1,this.inProgress=!1)}exportSelection(){return{ranges:Array.from(this.selectedRange).map(e=>e.clone()),activeRange:this.getActiveSelectedRange(),activeSelectionLayer:this.getActiveSelectionLayerIndex(),selectedByRowHeader:Array.from(this.selectedByRowHeader),selectedByColumnHeader:Array.from(this.selectedByColumnHeader),disableHeadersHighlight:this.#o7,rowExtentSpansGrid:Array.from(this.#sc),columnExtentSpansGrid:Array.from(this.#sg)}}capturePhysicalSelection(e,t=!0,r=!0){let i=this.getActiveSelectedRange();if(this.#so[e].push(r&&i?this.#s1(e):pi),!t||!this.tableProps.isEditorOpened()||!i)return void this.#sn[e].push(null);let n="row"===e?this.tableProps.rowIndexMapper:this.tableProps.columnIndexMapper,o=this.#so[e],s=o[o.length-1],l="row"===e?"row":"col",a=[];(this.selectedRange.ranges.forEach((t,r)=>{let i=this.#s2(t,e=>{let t=e.clone();return t[l]=this.#s3(e[l],n),t});if(this.#s6(i,e)){let o=s.has(r);a.push({physical:i,visual:t.clone(),physicalSpan:this.#s5(t,e,n,o),spansAxis:o,originalLayerIndex:r})}}),a.some(({originalLayerIndex:e})=>e===this.#si))?this.#sn[e].push({ranges:a,activeSelectionLayer:this.#si,selectedByRowHeader:new Set(this.selectedByRowHeader),selectedByColumnHeader:new Set(this.selectedByColumnHeader),rowExtentSpansGrid:new Set(this.#sc),columnExtentSpansGrid:new Set(this.#sg),disableHeadersHighlight:this.#o7,selectionSource:this.#se}):this.#sn[e].push(null)}restorePhysicalSelection(e){let t=this.#sn[e],r=t.length>0?t[t.length-1]:null;if(t.length>0&&(t[t.length-1]=null),!r)return;let i=this.tableProps.rowIndexMapper.getNotTrimmedIndexesLength(),n=this.tableProps.columnIndexMapper.getNotTrimmedIndexesLength();if(0===i||0===n)return void this.#s4(e);let o=[];r.ranges.forEach(({physical:t,visual:i,physicalSpan:n,spansAxis:s,originalLayerIndex:l})=>{let a=this.#s8(t,i,n,s,l,e,r);a&&o.push({range:a,originalLayerIndex:l})});let s=o.findIndex(({originalLayerIndex:e})=>e===r.activeSelectionLayer);0===o.length||-1===s?this.#s4(e):(this.selectedRange.ranges=o.map(({range:e})=>e),this.#si=s,this.selectedByRowHeader=this.#s9(r.selectedByRowHeader,o),this.selectedByColumnHeader=this.#s9(r.selectedByColumnHeader,o),this.#sc=this.#s9(r.rowExtentSpansGrid,o),this.#sg=this.#s9(r.columnExtentSpansGrid,o),this.#s7(e,o),this.#o7=r.disableHeadersHighlight,this.#se=r.selectionSource,this.#o4.setActiveLayerIndex(this.#si),this.#o8.setActiveLayerIndex(this.#si),this.commitHighlightsDirectly())}#s7(e,t){let r=this.#so[e];r.length>0&&(r[r.length-1]=this.#s9(r[r.length-1],t))}commitHighlightsDirectly(){this.highlight.clear(),this.selectedRange.ranges.forEach((e,t)=>this.applyAndCommit(e,t));let e=this.getActiveSelectedRange();this.highlight.useLayerLevel(this.#si),this.highlight.getFocus().clear(),e&&this.highlight.isEnabledFor("focus",e.highlight)&&this.highlight.getFocus().add(e.highlight).commit().syncWith(e)}#s4(e){this.clear(),this.selectedByRowHeader.clear(),this.selectedByColumnHeader.clear(),this.inProgress=!1,this.#sa=e}notifyDeferredDeselect(e){this.#sa===e&&(this.#sa=null,this.isSelected()||this.runLocalHooks("afterDeselect"))}discardPhysicalSelectionSnapshot(e){this.#sn[e].pop(),this.#so[e].pop()}fitGridTrackingExtents(e){let t=this.#so[e],r=t.length>0?t[t.length-1]:null;if(r&&0!==r.size&&this.isSelected()){if(this.#le())return void r.forEach(t=>this.#ss[e].add(t));this.#lt(e,r)&&this.#lr()}}suspendGridTrackingFits(){this.#sl+=1}resumeGridTrackingFits(e=!0){(this.#sl=Math.max(0,this.#sl-1),e)?this.#s_():this.#sH()}#le(){return this.#sp.length>0||this.#sl>0}#s_(){if(this.#le())return;let{row:e,column:t}=this.#ss;if(0===e.size&&0===t.size)return;let r=new Set(e),i=new Set(t);if(this.#sH(),!this.isSelected())return;let n=this.#lt("row",r),o=this.#lt("column",i);(n||o)&&this.#lr()}#sH(){this.#ss.row.clear(),this.#ss.column.clear()}#lt(e,t){if(0===t.size)return!1;let r="row"===e?this.tableProps.rowIndexMapper:this.tableProps.columnIndexMapper,i="row"===e?this.#sc:this.#sg,n="row"===e?"row":"col",o="row"===e?this.settings.maxRows:this.settings.maxCols,s=Math.min(r.getNotTrimmedIndexesLength(),o??1/0)-1,l=!1;return!(s<0)&&(this.selectedRange.ranges.forEach((e,r)=>{t.has(r)&&i.has(r)&&e.to[n]!==s&&(e.to[n]=s,l=!0)}),l)}#lr(){this.tableProps.isEditorOpened()?this.commitHighlightsDirectly():this.#s0()}#s0(){let e="unknown"===this.getSelectionSource();e&&this.markSource("shift");try{this.refresh()}finally{e&&this.markEndSource()}}refresh(){if(!this.isSelected())return;let e=this.tableProps.countRows(),t=this.tableProps.countCols();if(0===e||0===t)return void this.deselect();let r=this.selectedRange.ranges.map(e=>e.clone());"unknown"===this.getSelectionSource()&&this.markSource("refresh");let i=new Set(this.selectedByRowHeader),n=new Set(this.selectedByColumnHeader),o=new Set(this.#sc),s=new Set(this.#sg);this.clear(),this.setExpectedLayers(r.length),r.forEach(r=>{let{from:i,to:n,highlight:o}=r,s=e-1,l=t-1;o.assign({row:oB(o.row??0,this.settings.navigableHeaders?-1/0:0,s),col:oB(o.col??0,this.settings.navigableHeaders?-1/0:0,l)}),i.assign({row:oB(i.row??0,-1/0,s),col:oB(i.col??0,-1/0,l)}),n.assign({row:oB(n.row??0,-1/0,s),col:oB(n.col??0,-1/0,l)}),this.setRangeStartOnly(i,!0,o),this.setRangeEnd(n)}),this.selectedByRowHeader=i,this.selectedByColumnHeader=n,this.#sc=o,this.#sg=s,this.finish(),this.markEndSource()}#s2(e,t){return this.tableProps.createCellRange(t(e.highlight),t(e.from),t(e.to))}#s3(e,t){return null===e||e<0?e:t.getPhysicalFromVisualIndex(e)}#s1(e){let t=("row"===e?this.tableProps.rowIndexMapper:this.tableProps.columnIndexMapper).getNotTrimmedIndexesLength(),r=new Set;return this.selectedRange.ranges.forEach((i,n)=>{this.#li(i,n,e,t)&&r.add(n)}),r}#li(e,t,r,i){let n="row"===r?this.#sc:this.#sg,o="row"===r?"row":"col",s=e.from[o],l=e.to[o];return n.has(t)&&(s??0)<=0&&(l??-1)>=i-1}#s6(e,t){let r="row"===t?"row":"col";return[e.highlight,e.from,e.to].every(e=>null!==e[r])}#s5(e,t,r,i){let n="row"===t?"row":"col",o=e.from[n],s=e.to[n];if(i||null===o||null===s)return[];let l=s>=o?1:-1,a=[];for(let e=o;l>0?e<=s:e>=s;e+=l){let t=this.#s3(e,r);null!==t&&t>=0&&a.push(t)}return a}#ln(e,t,r){let i="row"===t?this.tableProps.rowIndexMapper:this.tableProps.columnIndexMapper;for(let t=0;t<e.length;t++){let n=e[r?t:e.length-1-t],o=i.getVisualFromPhysicalIndex(n);if(null!==o)return o}return null}#lo(e,t){return null!==e&&e<0?e:null===e?null:t.getVisualFromPhysicalIndex(e)}#ls(e,t,r,i,n=null){let o="row"===r?this.tableProps.rowIndexMapper:this.tableProps.columnIndexMapper,s="row"===r?"row":"col",l=i??this.#lo(e[s],o)??n;if(null===l)return null;let a=t.clone();return a[s]=l,a}#s8(e,t,r,i,n,o,s){let l,a,h="row"===o?"row":"col",d=n===s.activeSelectionLayer,u=("row"===o?this.tableProps.rowIndexMapper:this.tableProps.columnIndexMapper).getNotTrimmedIndexesLength();if(i){let e=t.from[h];l=null!==e&&e<0?e:0,a=u-1}let c=this.#ln(r,o,!0),g=this.#ln(r,o,!1),p=t.highlight[h],m=null!==p&&p>=0&&p<u,f=null;null===c&&(i?f=oB(p??0,0,u-1):d&&m&&(f=p));let w=this.#ls(e.highlight,t.highlight,o,void 0,d||i?c??f:null),y=this.#ls(e.from,t.from,o,l,c??f),b=this.#ls(e.to,t.to,o,a,g??f);if(!w||!y||!b)return null;if(this.#ll(y,b,r,i,o)){if(!d)return null;let r=this.#ls(e.highlight,t.highlight,o,void 0,c??f);return r?this.tableProps.createCellRange(r,r.clone(),r.clone()):null}return this.tableProps.createCellRange(w,y,b)}#ll(e,t,r,i,n){if(i||0===r.length)return!1;let o="row"===n?"row":"col",s=e[o],l=t[o];if(null===s||null===l)return!1;let a="row"===n?this.tableProps.rowIndexMapper:this.tableProps.columnIndexMapper,h=new Set(r),d=Math.min(s,l),u=Math.max(s,l);for(let e=Math.max(d,0);e<=u;e++){let t=this.#s3(e,a);if(null!==t&&t>=0&&!h.has(t))return!0}return!1}#s9(e,t){let r=new Set;return t.forEach(({originalLayerIndex:t},i)=>{e.has(t)&&r.add(i)}),r}commit(){if(this.highlight.getCustomSelections().forEach(e=>{e.commit()}),!this.isSelected())return;let e=this.getLayerLevel(),t=this.getActiveSelectedRange();t&&this.highlight.isEnabledFor("focus",t.highlight)&&this.highlight.getFocus().commit().syncWith(t);for(let e=0;e<this.selectedRange.size();e+=1){this.highlight.useLayerLevel(e);let t=this.highlight.createArea(),r=this.highlight.createLayeredArea(),i=this.highlight.createRowHeader(),n=this.highlight.createColumnHeader(),o=this.highlight.createActiveRowHeader(),s=this.highlight.createActiveColumnHeader(),l=this.highlight.createActiveCornerHeader(),a=this.highlight.createRowHighlight(),h=this.highlight.createColumnHighlight();t?.commit(),r?.commit(),i?.commit(),n?.commit(),o?.commit(),s?.commit(),l?.commit(),a?.commit(),h?.commit()}this.highlight.useLayerLevel(e)}}tR(pn,dp);let po=new WeakMap,ps="_typeEditorRequested";function pl(e,t,r=e,i=!1,n){let o="string"==typeof t.type?sp(t.type):t.type;if(e._automaticallyAssignedMetaProps&&tI(t,(t,r)=>{e._automaticallyAssignedMetaProps.delete(r)}),tP(t,"editor")&&po.delete(e),!tx(o))return;r!==e||e._automaticallyAssignedMetaProps||(e._automaticallyAssignedMetaProps=new Set);let s={},l=!(i||tP(e,ps)&&!0===e[ps])&&function(e){if(!1!==e.editor)return!1;let t=function(e,t){let r=e;for(;r&&!tP(r,t);)r=Object.getPrototypeOf(r);return r}(e,"editor");return null!==t&&!(po.has(t)&&po.get(t)===t.editor)}(e);tI(o,(t,i)=>{("editor"!==i||!l)&&"CELL_TYPE"!==i&&(r._automaticallyAssignedMetaProps?.has(i)||!tP(r,i))&&(s[i]=t,e._automaticallyAssignedMetaProps?.add(i),n?.set(i,t),"editor"===i&&po.set(e,t))}),tb(e,s)}function pa(e,t){e()||tf(`Assertion failed: ${t}`)}function ph(e){if(!0!==e.editor)return e;let t={...e};return delete t.editor,t}function pd(e,t,r,i){if(tP(e,t)||!i||!r||"string"!=typeof t||-1===t.indexOf("."))return e[t];let n=e;for(let e of t.split(".")){if(null==n)return;n=n[e]}return n}function pu(e,t,r){return"object"==typeof e?tE(t,e):r&&t===e}function pc(e,t,r){if("function"==typeof t)return t(e.toPhysicalRow(r))}let pg=()=>({_automaticallyAssignedMetaProps:void 0,_userDefinedMetaProps:void 0,_cellOptionMetaProps:void 0,_persistedMetaProps:void 0,activeHeaderClassName:"ht__active_highlight",allowEmpty:!0,allowHtml:!1,allowInsertColumn:!0,allowInsertRow:!0,allowInvalid:!0,allowRemoveColumn:!0,allowRemoveRow:!0,ariaTags:!0,asyncValues:!1,autoLink:!1,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,currentColClassName:void 0,currentHeaderClassName:"ht__highlight",currentRowClassName:void 0,customBorders:!1,customBordersProgressive:!1,data:void 0,dataProvider:void 0,dataDotNotation:!0,dataSchema:void 0,rowId:void 0,dateFormat:{year:"numeric",month:"2-digit",day:"2-digit"},timeFormat:{hour:"2-digit",minute:"2-digit"},dateTimeFormat:{year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!1},defaultDate:void 0,disableVisualSelection:!1,dialog:!1,dragToScroll:!0,dropdownMenu:void 0,editor:void 0,emptyDataState:!1,enterBeginsEditing:!0,enterCommits:!0,enterMoves:{col:0,row:1},exportFile:void 0,importFile:void 0,fillHandle:{autoInsertRow:!1},filter:!0,filterValueComparator:void 0,filteringCaseSensitive:!1,filters:void 0,filterSelectedItems:!0,fixedColumnsEnd:0,fixedColumnsLeft:0,fixedColumnsStart:0,fixedRowsBottom:0,fixedRowsTop:0,formulaBuilder:void 0,formulas:void 0,fragmentSelection:!1,hashLength:void 0,hashRevealDelay:void 0,hashSymbol:"*",headerClassName:void 0,headerCheckbox:void 0,height:void 0,hiddenColumns:void 0,hiddenRows:void 0,initialState:void 0,invalidCellClassName:"htInvalid",imeFastEdit:!1,isEmptyCol(e){let t,r,{dataSchema:i,dataDotNotation:n}=this.getSettings(),o=!!i,s=this.getSchema(),l=this.colToProp(e),a=this.countRows(),h="function"==typeof i,d=null===l?void 0:pd(s,l,n,o);for(t=0;t<a;t++)if(!1===ej(r=this.getDataAtCell(t,e))&&(h&&null!==l&&(d=pd(pc(this,i,t),l,n,o)),!pu(r,d,o)))return!1;return!0},isEmptyRow(e){let t,r,{dataSchema:i,dataDotNotation:n}=this.getSettings(),o=!!i,s=pc(this,i,e)??this.getSchema(),l=this.countCols();for(t=0;t<l;t++)if(!1===ej(r=this.getDataAtCell(e,t))){let e=this.colToProp(t);if(!pu(r,null===e?void 0:pd(s,e,n,o),o))return!1}return!0},label:void 0,language:"en-US",layoutDirection:"inherit",layout:void 0,licenseKey:void 0,limitFixedToViewport:!1,locale:"en-US",loading:!1,notification:!1,freezeBar:void 0,manualColumnFreeze:void 0,manualColumnMove:void 0,manualColumnResize:void 0,manualRowMove:void 0,manualRowResize:void 0,maxCols:1/0,maxLength:1/0,maxRows:1/0,maxSelections:void 0,mergeCells:!1,minCols:0,minRowHeights:void 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,preserveNumericLiteral:!1,observeDOMVisibility:!0,outsideClickDeselects:!0,pagination:void 0,placeholder:void 0,placeholderCellClassName:"htPlaceholder",preserveTextValue:!1,preventOverflow:!1,preventWheel:!1,readOnly:!1,readOnlyCellClassName:"htDimmed",readOnlyStyling:!0,renderAllRows:!1,renderMode:"always",renderAllColumns:!1,renderer:void 0,valueFormatter:void 0,valueParser:void 0,rowHeaders:void 0,rowHeaderWidth:void 0,autoRowHeaderSize:void 0,rowHeights:void 0,rowSelection:void 0,search:!1,searchInput:!0,selectionMode:"multiple",selectionHandles:!1,sheetsBar:void 0,moveCells:!1,selectOptions:void 0,skipColumnOnPaste:!1,skipRowOnPaste:!1,sortByRelevance:!0,sourceSortFunction:void 0,source:void 0,sourceLabel:void 0,startCols:5,startRows:5,stretchH:"none",strict:void 0,tableClassName:void 0,textEllipsis:!1,themeName:void 0,theme:void 0,colorScheme:void 0,density:void 0,injectCoreCss:!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,sourceDataValidator:void 0,sourceDataWarningMessage:void 0,valueGetter:void 0,valueSetter:void 0,emptyValue:"",viewportColumnRenderingOffset:"auto",viewportRowRenderingOffset:"auto",viewportColumnRenderingThreshold:0,viewportRowRenderingThreshold:0,visibleRows:10,width:void 0,wordWrap:!0,sanitizer:void 0,textExtractor:void 0,parsePastedValue:!1});class pp{metaCtor=class{};#la=new Set;#lh=new Map;#ld=null;#lu;#lc=new Set;constructor(e){this.meta=this.metaCtor.prototype,tb(this.meta,pg()),this.meta.instance=e}getMetaConstructor(){return this.metaCtor}getMeta(){return this.meta}updateMeta(e){let t=ph(e);tb(this.meta,t),Object.keys(t).forEach(e=>{this.#la.add(e),void 0===t[e]&&this.#lc.add(e)});let r=t.type??this.meta.type;this.#ld=this.#lg(r)??this.#ld,this.#lu=null===this.#ld?this.#lu:r,pl(this.meta,{...t,type:r},t,!0===e.editor,this.#lh)}updateTypeFromSettings(e){var t;let r,i=this.#ld,n=null!==i&&Object.keys(e).some(t=>this.#lp(t,e[t])&&tP(i,t)),o=("string"==typeof e.type||tx(e.type))&&null!==this.#lg(e.type);tP(e,"type")&&!o&&"string"==typeof e.type&&(this.meta.type=this.#lu);let s=null;if(o?s=this.#lg(e.type):n&&(s=this.#lg(this.meta.type)??i),this.#lm(e,o),null===s)return!1;let l=s!==i;l&&this.#lf();let a={};return this.#la.forEach(e=>{a[e]=!0}),this.#ld=s,this.#lu=o?e.type:this.#lu,pl(this.meta,{type:s},a,!0===e.editor,this.#lh),l&&!(null!==i&&(r=Object.keys(t=s)).length===Object.keys(i).length&&r.every(e=>tP(i,e)&&t[e]===i[e]))}#lm(e,t){Object.keys(e).forEach(r=>{"editor"===r&&!0===e[r]?t&&this.#la.delete(r):this.#lp(r,e[r])?this.#la.delete(r):this.#la.add(r)})}#lp(e,t){return void 0===t&&!this.#lc.has(e)}#lg(e){if("string"==typeof e&&!su(e))return null;let t="string"==typeof e?sp(e):e;return tx(t)?t:null}#lf(){let e=pg();this.#lh.forEach((t,r)=>{this.#la.has(r)||this.meta[r]!==t&&void 0!==this.meta[r]||(tP(e,r)?this.meta[r]=e[r]:Reflect.deleteProperty(this.meta,r))}),this.#lh.clear()}}class pm{constructor(e){const t=e.getMetaConstructor();this.meta=new t}getMeta(){return this.meta}updateMeta(e){let t=ph(e);tb(this.meta,t),pl(this.meta,t,t,!0===e.editor)}}function pf(e){oW(e)||null==e||tf("Assertion failed: Expecting an unsigned number or null/undefined argument.")}class pw{#lw=new Map;#os=0;#ly=[];#lb=0;#lC=-1;#lS=!0;#lv=!1;constructor(e){this.valueFactory=e}obtain(e){oW(e)||tf("Assertion failed: Expecting an unsigned number.");let t=e;this.#ly.length>0&&-1===(t=this.#lR(e))&&(this.#lE(),t=e);let r=this.#lw.get(t);if(void 0===r){r=this.valueFactory(e),this.#lw.set(t,r),e>=this.#os&&(this.#os=e+1);let i=t>e?t:e;i>=this.#lb&&(this.#lb=i+1),t>this.#lC?this.#lC=t:this.#lS=!1}return r}has(e){return void 0!==this.getIfExists(e)}insert(e,t=1){pf(e);let r=null==e?this.#os:e;this.#os+=t,r>=this.#lb||(this.#lb+=t,this.#lT({start:r,amount:t,isInsert:!0}))}remove(e,t=1){let r;if(pf(e),null==e){let e=this.#os-t;r=e<0?Math.max(this.#os+e,0):e}else r=e;let i=Math.max(Math.min(this.#os-r,t),0),n=r>=this.#lb;this.#os-=i,this.#lb>this.#os&&(this.#lb=this.#os),n||this.#lT({start:r,amount:t,isInsert:!1})}size(){return this.#ly.length>0&&this.#lE(),this.#lw.size}values(){return this.#ly.length>0&&this.#lE(),this.#lv=!0,this.#lw.values()}entries(){return this.#ly.length>0&&this.#lE(),this.#lv=!0,this.#lw.entries()}evict(e){if(this.#ly.length>0){let t=this.#lR(e);-1!==t&&this.#lw.delete(t);return}this.#lw.delete(e)}getIfExists(e){if(this.#ly.length>0){let t=this.#lR(e);return -1===t?void 0:this.#lw.get(t)}return this.#lw.get(e)}clear(){this.#lw.clear(),this.#ly=[],this.#os=0,this.#lb=0,this.#lC=-1,this.#lS=!0,this.#lv=!1}#lT(e){let t=this.#ly,r=t.length>0?t[t.length-1]:void 0;!(void 0!==r&&r.isInsert===e.isInsert&&this.#lx(r,e))&&(t.push(e),t.length>=1024&&this.#lE())}#lx(e,t){return t.isInsert?t.start>=e.start&&t.start<=e.start+e.amount&&(e.amount+=t.amount,!0):t.start===e.start?(e.amount+=t.amount,!0):t.start+t.amount===e.start&&(e.start=t.start,e.amount+=t.amount,!0)}#lR(e){let t=this.#ly,r=e;for(let e=t.length-1;e>=0;e--){let{start:i,amount:n,isInsert:o}=t[e];if(o){if(r>=i+n)r-=n;else if(r>=i)return -1}else r>=i&&(r+=n)}return r}#lE(){let e=this.#ly;if(this.#ly=[],1===e.length&&!e[0].isInsert&&!this.#lv&&this.#lS&&this.#lC===this.#lw.size-1)return void this.#lA(e[0].start,e[0].amount);let t=Array(e.length),r=1/0;for(let i=e.length-1;i>=0;i--)e[i].start<r&&(r=e[i].start),t[i]=r;let i=!1;for(let e of this.#lw.keys())if(e>=r){i=!0;break}if(!i)return;let n=new Map,o=-1,s=!0,l=-1;for(let[r,i]of this.#lw){let a=this.#lM(r,e,t);-1!==a&&(n.set(a,i),a>o&&(o=a),a<=l&&(s=!1),l=a)}this.#lw=n,this.#lv=!1,this.#lb=o+1,this.#lC=o,this.#lS=s}#lA(e,t){let r=this.#lw,i=r.size,n=Math.max(i-t,e);for(let i=e;i<n;i++)r.set(i,r.get(i+t));for(let e=n;e<i;e++)r.delete(e);this.#lC=n-1,this.#lb=n}#lM(e,t,r){let i=e;for(let e=0;e<t.length&&!(i<r[e]);e++){let{start:r,amount:n,isInsert:o}=t[e];if(o)i>=r&&(i+=n);else if(i>=r+n)i-=n;else if(i>=r)return -1}return i}[Symbol.iterator](){return this.entries()}}let py=["data","width"];class pb{metas=new pw(()=>this._createMeta());constructor(e){this.globalMeta=e,this.metas=new pw(()=>this._createMeta())}updateMeta(e,t){let r=this.getMeta(e),i=ph(t);tb(r,i),pl(r,i,r,!0===t.editor)}createColumn(e,t){this.metas.insert(e,t)}removeColumn(e,t){this.metas.remove(e,t)}getMeta(e){return this.metas.obtain(e)}getMetaConstructor(e){return this.metas.obtain(e).constructor}clearCache(){this.metas.clear()}_createMeta(){return function(e,t=[]){function r(){}ty(r,e);for(let e=0;e<t.length;e++)r.prototype[t[e]]=void 0;return r}(this.globalMeta.getMetaConstructor(),py).prototype}}let pC=new WeakMap;function pS(e,t){let r=pC.get(e);return void 0===r||"string"!=typeof t?t:rV(t).filter(e=>!r.includes(e)).join(" ")}function pv(e){return tP(e,"valid")&&!1===e.valid}let pR=Object.freeze({hadOwn:!1,value:void 0,origin:"none"});function pE(e,t){let r=e[t];return r instanceof Set?r:void 0}function pT(e,t){let r=e[t];return"className"===t?pS(e,r):r}function px(e,t){return pE(e,"_userDefinedMetaProps")?.has(t)?"user":pE(e,"_cellOptionMetaProps")?.has(t)?"cellOption":"none"}class pA{metas=new pw(()=>this._createRow());#lI=0;#lN=0;constructor(e){this.columnMeta=e}enableUserDefinedMetaRecording(){this.#lI>0&&(this.#lI-=1)}disableUserDefinedMetaRecording(){this.#lI+=1}isUserDefinedMetaRecording(){return 0===this.#lI}startCellOptionMetaRecording(){this.#lN+=1,this.disableUserDefinedMetaRecording()}isRecordingCellOptionMeta(){return this.#lN>0}endCellOptionMetaRecording(){0!==this.#lN&&(this.#lN-=1,this.enableUserDefinedMetaRecording())}updateMeta(e,t,r){i1(this.extendMeta(e,t,r))}extendMeta(e,t,r){let i=this.getMeta(e,t),n=ph(r),o=!1;tI(n,(e,t)=>{i[t]!==e&&(o=!0)});let s=i.editor;return tb(i,n),pl(i,n,i,!0===r.editor),i.editor!==s&&(o=!0),o&&i1(i),i}createRow(e,t){this.metas.insert(e,t)}createColumn(e,t){for(let[,r]of this.metas)r.insert(e,t)}removeRow(e,t){this.metas.remove(e,t)}removeColumn(e,t){for(let[,r]of this.metas)r.remove(e,t)}getMeta(e,t,r){let i=this.metas.obtain(e).obtain(t);return void 0===r?i:i[r]}hasMeta(e,t){return this.metas.has(e)&&this.metas.obtain(e).has(t)}getMetaIfExists(e,t){return this.metas.getIfExists(e)?.getIfExists(t)}createTransientMeta(e){return this._createMeta(e)}setMeta(e,t,r,i){let n=this.metas.obtain(e).obtain(t);if(i1(n),"editor"===r&&!0===i){delete n[r],n._persistedMetaProps?.delete(r),n._userDefinedMetaProps?.delete(r),n._cellOptionMetaProps?.delete(r),this.setMeta(e,t,ps,!0);return}"editor"===r&&this.removeMeta(e,t,ps),n._automaticallyAssignedMetaProps?.delete(r),n[r]=i,"className"===r&&function(e,t){let r=pC.get(e);if(void 0===r)return;let i="string"==typeof t||Array.isArray(t)?rV(t):[],n=r.filter(e=>!i.includes(e));0===n.length?pC.delete(e):pC.set(e,n)}(n,i),void 0===n._persistedMetaProps&&(n._persistedMetaProps=new Set),n._persistedMetaProps.add(r);let o=this.#lN>0&&this.#lI===this.#lN;0===this.#lI?(void 0===n._userDefinedMetaProps&&(n._userDefinedMetaProps=new Set),n._userDefinedMetaProps.add(r),n._cellOptionMetaProps?.delete(r)):o?(void 0===n._cellOptionMetaProps&&(n._cellOptionMetaProps=new Set),n._cellOptionMetaProps.add(r),n._userDefinedMetaProps?.delete(r)):(n._userDefinedMetaProps?.delete(r),n._cellOptionMetaProps?.delete(r))}removeMeta(e,t,r){let i=this.metas.getIfExists(e)?.getIfExists(t);void 0!==i&&(delete i[r],i._userDefinedMetaProps?.delete(r),i._cellOptionMetaProps?.delete(r),i._persistedMetaProps?.delete(r),i1(i),"editor"===r&&this.removeMeta(e,t,ps),r===ps&&tP(i,"editor")&&!pE(i,"_persistedMetaProps")?.has("editor")&&delete i.editor)}getMetaKeyState(e,t,r){let i=this.metas.getIfExists(e)?.getIfExists(t);return void 0!==i&&pE(i,"_persistedMetaProps")?.has(r)&&tP(i,r)?{hadOwn:!0,value:pT(i,r),origin:px(i,r)}:pR}applyMetaKeyState(e,t,r,i){if(!i.hadOwn)return void this.removeMeta(e,t,r);if("cellOption"===i.origin){this.startCellOptionMetaRecording();try{this.setMeta(e,t,r,i.value)}finally{this.endCellOptionMetaRecording()}}else if("none"===i.origin){this.disableUserDefinedMetaRecording();try{this.setMeta(e,t,r,i.value)}finally{this.enableUserDefinedMetaRecording()}}else this.setMeta(e,t,r,i.value)}captureRowMetaKeyStates(e,t){let r=this.metas.getIfExists(e);if(void 0!==r)for(let[i,n]of r)this.#lO(e,i,n,t)}captureColumnMetaKeyStates(e,t){for(let[r,i]of this.metas){let n=i.getIfExists(e);void 0!==n&&this.#lO(r,e,n,t)}}getMetas(){let e=[],t=Array.from(this.metas.values());for(let r=0;r<t.length;r++)e$(t[r])&&e.push(...Array.from(t[r].values()));return e}getMetasAtRow(e){pa(()=>oW(e),"Expecting an unsigned number.");let t=this.metas.getIfExists(e);return void 0===t?[]:Array.from(t).sort(([e],[t])=>e-t).map(([,e])=>e)}getMetasAtRowWithPhysicalColumns(e){pa(()=>oW(e),"Expecting an unsigned number.");let t=this.metas.getIfExists(e);return void 0===t?[]:Array.from(t).sort(([e],[t])=>e-t).map(([e,t])=>({physicalColumn:e,meta:t}))}getUserDefinedMetas(){return this.#lk("_userDefinedMetaProps")}getCellOptionMetas(){return this.#lk("_cellOptionMetaProps")}#lO(e,t,r,i){let n=pE(r,"_persistedMetaProps");n?.forEach(n=>{let o=px(r,n);if("none"!==o&&tP(r,n)){let s=pT(r,n);i.push({physicalRow:e,physicalColumn:t,key:n,state:{hadOwn:!0,value:s,origin:o}})}})}#lk(e){let t=[];for(let[r,i]of this.metas)for(let[n,o]of i){let i=o[e];void 0!==i&&i.forEach(e=>{tP(o,e)&&t.push({physicalRow:r,physicalColumn:n,key:e,value:pT(o,e)})})}return t}getInvalidMetas(){let e=[];for(let[t,r]of this.metas)for(let[i,n]of r)pv(n)&&e.push({physicalRow:t,physicalColumn:i});return e}restoreInvalidMetas(e){e.forEach(({physicalRow:e,physicalColumn:t})=>{let r=this.getMeta(e,t);r.valid=!1,i1(r)})}evictRow(e){let t=this.metas.getIfExists(e);if(void 0===t)return[];let r=!1,i=[];for(let[e,n]of t){let o=pE(n,"_persistedMetaProps"),s=void 0!==o&&o.size>0,l=pv(n);s||l?r=!0:(t.evict(e),i.push(e))}return r||this.metas.evict(e),i}clearCache(){this.metas.clear()}_createRow(){return new pw(e=>this._createMeta(e))}_createMeta(e){return new(this.columnMeta.getMetaConstructor(e))}}let pM="The `fixedColumnsLeft` is not supported for RTL. Please use option `fixedColumnsStart`.";function pI(e,t){return tP(e,"fixedColumnsLeft")?(tP(e,"fixedColumnsStart")&&tf("The `fixedColumnsLeft` and `fixedColumnsStart` should not be used together. Please use only the option `fixedColumnsStart`."),t&&tf(pM),pN(e)):e}function pN(e){if(!tP(e,"fixedColumnsLeft"))return e;let{fixedColumnsLeft:t,...r}=e;return{...r,fixedColumnsStart:tP(r,"fixedColumnsStart")?r.fixedColumnsStart:t}}function pO(e,t){if(!tP(t,"fixedColumnsLeft")||!tP(e,"fixedColumnsStart"))return e;let{fixedColumnsStart:r,...i}=e;return{...i,fixedColumnsLeft:r}}function pk(e){tf(`The \`${e}\` option can not be updated after the Handsontable is initialized.`)}class pH{metaManager;usageTracker=new Set;propDescriptors=new Map([["ariaTags",{initOnly:!0}],["fixedColumnsLeft",{target:"fixedColumnsStart",onChange(e){this.metaManager.hot.isRtl()&&"fixedColumnsLeft"===e&&tf(pM)}}],["layoutDirection",{initOnly:!0}],["renderAllColumns",{initOnly:!0}],["renderAllRows",{initOnly:!0}]]);constructor(e){this.metaManager=e,this.extendMetaProps()}#lH=(e,t,r)=>{r||pk(e)};extendMetaProps(){this.propDescriptors.forEach((e,t)=>{let{initOnly:r,target:i,onChange:n}=e,o="string"==typeof i,s=o?i:t,l=`_${s}`;this.metaManager.globalMeta.meta[l]=this.metaManager.globalMeta.meta[s],n?(this.installPropWatcher(t,l,n),o&&this.installPropWatcher(i,l,n)):r&&(this.installPropWatcher(t,l,this.#lH),this.metaManager.globalMeta.meta._initOnlySettings||(this.metaManager.globalMeta.meta._initOnlySettings=[]),this.metaManager.globalMeta.meta._initOnlySettings.push(t))})}installPropWatcher(e,t,r){let{usageTracker:i}=this,n=r.bind(this),o=()=>this.metaManager.isInitialized();Object.defineProperty(this.metaManager.globalMeta.meta,e,{get(){return this[t]},set(r){let s=!o()&&!i.has(e);i.add(e),n(e,r,s),this[t]=r},enumerable:!0,configurable:!0})}}class p_{#l_=0;#lP=!1;constructor(e,t={},r=[]){this.hot=e,this.globalMeta=new pp(e),this.tableMeta=new pm(this.globalMeta),this.columnMeta=new pb(this.globalMeta),this.cellMeta=new pA(this.columnMeta),r.forEach(e=>new e(this)),this.globalMeta.updateMeta(t)}finishInitialization(){this.#lP=!0}isInitialized(){return this.#lP}assertNoInitOnlyUpdates(e){this.#lP&&(this.globalMeta.getMeta()._initOnlySettings??[]).forEach(t=>{tP(e,t)&&pk(t)})}getGlobalMeta(){return this.globalMeta.getMeta()}updateGlobalMeta(e){this.globalMeta.updateMeta(e)}updateGlobalTypeFromSettings(e){return this.globalMeta.updateTypeFromSettings(e)}getTableMeta(){return this.tableMeta.getMeta()}updateTableMeta(e){this.tableMeta.updateMeta(e)}getColumnMeta(e){return this.columnMeta.getMeta(e)}updateColumnMeta(e,t){this.columnMeta.updateMeta(e,t)}getCellMeta(e,t,r){let i=this.cellMeta.getMeta(e,t);return i.visualRow=r.visualRow,i.visualCol=r.visualColumn,i.row=e,i.col=t,r.skipMetaExtension||this.runLocalHooks("afterGetCellMeta",i),i}getCellMetaUncached(e,t,r){let i=this.cellMeta.getMetaIfExists(e,t)??this.cellMeta.createTransientMeta(t);return i.visualRow=r.visualRow,i.visualCol=r.visualColumn,i.row=e,i.col=t,i}createTransientColumnMeta(e){return this.cellMeta.createTransientMeta(e)}getCellMetaTransient(e,t,r){let i=this.cellMeta.getMetaIfExists(e,t);if(void 0!==i)return i.visualRow=r.visualRow,i.visualCol=r.visualColumn,i.row=e,i.col=t,this.runLocalHooks("afterGetCellMeta",i),i;let n=this.cellMeta.createTransientMeta(t);return n.visualRow=r.visualRow,n.visualCol=r.visualColumn,n.row=e,n.col=t,this.runLocalHooks("extendTransientCellMeta",n),n}getCellMetaKeyValue(e,t,r){return"string"!=typeof r&&tf("The passed cell meta object key is not a string"),this.cellMeta.getMeta(e,t,r)}setCellMeta(e,t,r,i){this.cellMeta.setMeta(e,t,r,i)}updateCellMeta(e,t,r){this.cellMeta.updateMeta(e,t,r)}extendCellMeta(e,t,r){this.cellMeta.extendMeta(e,t,r)}removeCellMeta(e,t,r){this.cellMeta.removeMeta(e,t,r)}getCellMetaKeyState(e,t,r){return this.cellMeta.getMetaKeyState(e,t,r)}applyCellMetaKeyState(e,t,r,i){this.cellMeta.applyMetaKeyState(e,t,r,i)}isUserDefinedMetaRecording(){return this.cellMeta.isUserDefinedMetaRecording()}captureRowMetaKeyStates(e,t){this.cellMeta.captureRowMetaKeyStates(e,t)}captureColumnMetaKeyStates(e,t){this.cellMeta.captureColumnMetaKeyStates(e,t)}getCellsMeta(){return this.cellMeta.getMetas()}getCellsMetaAtRow(e){return this.cellMeta.getMetasAtRow(e)}getCellsMetaAtRowWithPhysicalColumns(e){return this.cellMeta.getMetasAtRowWithPhysicalColumns(e)}getUserDefinedCellMetas(){return this.cellMeta.getUserDefinedMetas()}getCellMetaIfExists(e,t){return this.cellMeta.getMetaIfExists(e,t)}getStructureVersion(){return this.#l_}getInvalidCellMetas(){return this.cellMeta.getInvalidMetas()}restoreInvalidCellMetas(e){this.cellMeta.restoreInvalidMetas(e)}getCellOptionCellMetas(){return this.cellMeta.getCellOptionMetas()}enableUserDefinedMetaRecording(){this.cellMeta.enableUserDefinedMetaRecording()}disableUserDefinedMetaRecording(){this.cellMeta.disableUserDefinedMetaRecording()}startCellOptionMetaRecording(){this.cellMeta.startCellOptionMetaRecording()}endCellOptionMetaRecording(){this.cellMeta.endCellOptionMetaRecording()}isRecordingCellOptionMeta(){return this.cellMeta.isRecordingCellOptionMeta()}createRow(e,t=1){this.#l_+=1,this.cellMeta.createRow(e,t)}removeRow(e,t=1){this.#l_+=1,this.cellMeta.removeRow(e,t)}createColumn(e,t=1){this.#l_+=1,this.cellMeta.createColumn(e,t),this.columnMeta.createColumn(e,t)}removeColumn(e,t=1){this.#l_+=1,this.cellMeta.removeColumn(e,t),this.columnMeta.removeColumn(e,t)}invalidateMetaExtensions(){this.runLocalHooks("invalidateMetaExtensions")}clearCellsCache(){this.#l_+=1,this.cellMeta.clearCache()}clearCache(){this.cellMeta.clearCache(),this.columnMeta.clearCache()}}tR(p_,dp);class pP{metaSyncMemo=new Map;#lD=0;#lL=0;#lF=!1;constructor(e){this.metaManager=e,e.addLocalHook("afterGetCellMeta",e=>{this.extendCellMeta(e)}),e.addLocalHook("extendTransientCellMeta",e=>{this.extendTransientCellMeta(e)}),e.addLocalHook("invalidateMetaExtensions",()=>{this.metaSyncMemo.clear()}),nM.getSingleton().add("beforeRender",e=>{e&&this.metaSyncMemo.clear()},this.metaManager.hot);const t=()=>this.#lB();nM.getSingleton().add("afterScrollVertically",t,this.metaManager.hot),nM.getSingleton().add("afterViewRender",t,this.metaManager.hot)}extendCellMeta(e){let t=e.row,r=e.col;if(this.metaSyncMemo.get(t)?.has(r))return;this.#lV(e,e=>{this.metaManager.extendCellMeta(t,r,e)});let i=this.metaSyncMemo.get(t);void 0===i&&(i=new Set,this.metaSyncMemo.set(t,i)),i.add(r)}extendTransientCellMeta(e){this.#lV(e,t=>{let r=ph(t);tb(e,r),pl(e,r,e,!0===t.editor)})}#lV(e,t){let r=e.row,i=e.col,n=e.visualRow,o=e.visualCol,s=this.metaManager.hot,l=n3(s,o);e.prop=l,s.runHooks("beforeGetCellMeta",n,o,e);let a=tP(e,"type")?e.type:null,h=i3(e.cells)?e.cells(r,i,l):null;a&&(h?h.type=h.type??a:h={type:a}),h&&t(h),!h?.type&&function(e){if(!0!==e[ps]||!tP(e,ps)||tP(e,"type")||tP(e,"editor")||!1!==e.editor)return!1;let t="string"==typeof e.type?sp(e.type):e.type;if(!tx(t)||!tP(t,"editor"))return!1;let r=t.editor;return e.editor=r,po.set(e,r),!0}(e)&&i1(e),s.runHooks("afterGetCellMeta",n,o,e)}#lB(){let e=this.metaManager.hot,t=e.getFirstRenderedVisibleRow(),r=e.getLastRenderedVisibleRow();if(!Number.isInteger(t)||!Number.isInteger(r)||r<t)return;let i=r-t+1,n=t-i,o=r+i,s=this.#lD,l=this.#lL;this.#lF&&(this.#lz(s,Math.min(l,n-1)),this.#lz(Math.max(s,o+1),l)),this.#lD=n,this.#lL=o,this.#lF=!0}#lz(e,t){if(e>t)return;let r=this.metaManager.hot,i=r.getSelectedRangeLast(),n=i?i.highlight.row:null;for(let i=e;i<=t;i++){let e=r.toPhysicalRow(i);i!==n&&Number.isInteger(e)&&this.#lU(e)}}#lU(e){let t=this.metaManager.cellMeta.evictRow(e);if(0===t.length)return;let r=this.metaSyncMemo.get(e);if(void 0!==r){for(let e=0;e<t.length;e++)r.delete(t[e]);0===r.size&&this.metaSyncMemo.delete(e)}}}function pD(e){return"function"==typeof e}let pL=class{dataType="array";colToProp=e=>void 0;propToCol=e=>void 0;countCachedColumns;#lW={colToProp:e=>this.colToProp(e),toPhysicalColumn:e=>this.hot.toPhysicalColumn(e)};constructor(e,t=[]){this.hot=e,this.data=t}modifyRowData(e){let t;return this.hot.hasHook("modifyRowData")&&(t=this.hot.runHooks("modifyRowData",e)),void 0===t||Number.isInteger(t)?this.data[e]:t}getData(e=!1){return this.data?.length?e||this.hot.hasHook("modifySourceData")||this.hot.hasHook("modifyRowData")?this.getByRange(null,null,e):this.data.map(dg):this.data}setData(e){this.data=e}getAtColumn(e){let t=[];return eo(this.data,(r,i)=>{let n=this.getAtCell(i,e);t.push(n)}),t}getAtRow(e,t,r,i=!1){let n=void 0===t&&void 0===r,{dataDotNotation:o,columns:s,maxCols:l}=this.hot.getSettings(),a=null,h=null;if(Array.isArray(a=this.modifyRowData(e)))h=[],n?a.forEach((t,r)=>{h[r]=this.getAtPhysicalCell(e,r,a)}):oD(t,r,r=>{h[r-t]=this.getAtPhysicalCell(e,r,a)});else if(tx(a)||i3(a))if(h=i?[]:{},!n||i){let n=this.countCachedColumns?.()??0,d=Array.isArray(s)?Math.max(n,Math.min(l??1/0,s.length)):n,u=Math.max(this.countFirstRowKeys(),d)-1;oD(0,u,n=>{let s=n3(this.#lW,n),l=!Number.isInteger(s)||i&&n<d&&null!==this.hot.toPhysicalColumn(n);if(n>=(t||0)&&n<=(r??u)&&l){let t=this.getAtPhysicalCell(e,s,a);i?h.push(t):o?null!==h&&tk(h,s,t):h[s]=t}})}else tI(a,(t,r)=>{let i=this.getAtPhysicalCell(e,r,a);o?null!==h&&tk(h,r,i):h[r]=i});return h}setAtCell(e,t,r,i=!1){let n;if("string"==typeof e){let t=Number(e);if(Number.isNaN(t)||!Number.isInteger(t)||t<0)return;n=t}else{if("number"!=typeof e||!Number.isInteger(e)||e<0)return;n=e}if(n>=this.countRows()||!i&&"number"==typeof t&&t>=this.countFirstRowKeys())return;if(this.hot.hasHook("modifySourceData")){let e=t_(r);this.hot.runHooks("modifySourceData",n,t,e,"set"),e.isTouched()&&(r=e.value)}let o=this.modifyRowData(n);if("function"==typeof t){null!=o&&t(o,r);return}if(Number.isInteger(t))Array.isArray(o)?o[t]=r:tx(o)&&tk(o,String(t),r);else if(Array.isArray(o)){let e=Number(t);!Number.isNaN(e)&&Number.isInteger(e)&&e>=0&&e<this.countFirstRowKeys()&&(o[e]=r)}else tx(o)&&this.#l$(o,String(t),r,i)}#l$(e,t,r,i){!i||!tP(e,t)&&!0===this.hot.getSettings().dataDotNotation&&t.includes(".")?tk(e,t,r):tO(e,t,r)}getAtPhysicalCell(e,t,r){let i=this.#lG(t,r);if(this.hot.hasHook("modifySourceData")){let r=t_(i);this.hot.runHooks("modifySourceData",e,t,r,"get"),r.isTouched()&&(i=r.value)}return i}getAtCell(e,t){let r=this.modifyRowData(e),i="function"==typeof t?t:n3(this.#lW,t);return this.getAtPhysicalCell(e,i,r)}getAtCellByProp(e,t,r){return this.getAtPhysicalCell(e,t,void 0===r?this.modifyRowData(e):r)}getRawAtCellByProp(e,t){let r=this.modifyRowData(e);return"string"==typeof t&&tx(r)&&tP(r,t)?r[t]:this.#lG(t,r)}#lG(e,t){if(!t)return null;if("string"==typeof e){let{dataDotNotation:r}=this.hot.getSettings();return r?tN(t,e):t[e]}return"function"==typeof e?e(t):t[e]}getByRange(e=null,t=null,r=!1){let i=!1,n=null,o=null,s=null,l=null;null===e||null===t?(i=!0,n=0,s=this.countRows()-1):(n=Math.min(e.row,t.row),o=Math.min(e.col,t.col),s=Math.max(e.row,t.row),l=Math.max(e.col,t.col));let a=[];return oD(n,s,e=>{a.push(i?this.getAtRow(e,void 0,void 0,r):this.getAtRow(e,o,l,r))}),a}getCopyable(e,t){let r=this.propToCol(t)??t;return"number"==typeof r&&this.hot.getCellMetaTransient(e,r).copyable?this.getAtCell(this.hot.toPhysicalRow(e),r):""}countRows(){if(this.hot.hasHook("modifySourceLength")){let e=this.hot.runHooks("modifySourceLength");if("number"==typeof e&&Number.isInteger(e))return e}return this.data.length}countFirstRowKeys(){return dd(this.data??[])}destroy(){this.data=null,this.hot=null}},pF=/^(\r\n|\n\r|\r|\n)/,pB=/^[^\t\r\n]+/,pV=/^\t/;function pz(e){let t,r,i,n,o,s="";for(t=0,r=e.length;t<r;t+=1){for(i=0,n=e[t].length;i<n;i+=1)i>0&&(s+=" "),"string"==typeof(o=e[t][i])?o.indexOf("\n")>-1?s+=`"${o.replaceAll('"','""')}"`:s+=o:null==o?s+="":s+=o;t!==r-1&&(s+="\n")}return s}let pU=new Set(["valid"]);function pW(e){return"object"==typeof e&&null!==e?tS(e):e}function p$(e,t,r){let i=e.getRecordingTransaction();if(null===i)return;let n=i.journal[i.journal.length-1];void 0!==r?null!==r.op&&n===r.op?r.op.changes.push(t):(r.op={type:"cells",changes:[t],reversed:!0},e.append(i,r.op)):n?.type==="cells"&&!0!==n.reversed&&e.isLatestEntry(n)?n.changes.push(t):e.append(i,{type:"cells",changes:[t]})}function pG(e,t,r,i){let n=e._getOperationScope();if(null===n.getRecordingTransaction()||i<=0)return;let o=[];if(!t){let t=e._getMetaManager();for(let e=r;e<r+i;e++)t.captureRowMetaKeyStates(e,o)}n.record({type:"metaRows",insert:t,physicalRow:r,amount:i,metas:o})}function pj(e,t){let r=t-e.length;return e.every((e,t)=>e===r+t)}class pY{static get DESTINATION_RENDERER(){return 1}static get DESTINATION_CLIPBOARD_GENERATOR(){return 2}tableMeta;#lj=0;#lY=0;constructor(e,t,r){this.hot=e,this.metaManager=r,this.tableMeta=r.getTableMeta(),this.dataSource=t,this.colToPropCache=[],this.propToColCache=new Map,this.refreshDuckSchema(),this.createMap()}createMap(){let e=this.getSchema();void 0===e&&tf("trying to create `columns` definition but you didn't provide `schema` nor `data`");let t=this.tableMeta.columns;this.colToPropCache=[],this.propToColCache=new Map,t?this.#lK(t,e):this.recursiveDuckColumns(e)}#lq(e){return null===e&&!this.propToColCache.has(null)}#lK(e,t){let r=0,i=0,n="function"==typeof e;if(n){let e=tH(t);r=e>0?e:this.countFirstRowKeys()}else r=Math.min(this.tableMeta.maxCols??1/0,e.length);for(let t=0;t<r;t++){let r=n?e(t):e[t];if(tx(r)){if(void 0!==r.data){let e=n?i:t,o=r.data;this.colToPropCache[e]=o,this.propToColCache.set(o,e)}i+=1}}}countFirstRowKeys(){return dd(this.dataSource??[])}recursiveDuckColumns(e,t,r){let i,n=t??0,o=r??"";return"object"!=typeof e||null===e||Array.isArray(e)||tI(e,(e,t)=>{let r="object"==typeof e&&null!==e;!("__children"===t||"function"==typeof e||Array.isArray(e))&&(!r||tx(e))&&(tx(e)?n=this.recursiveDuckColumns(e,n,`${o}${t}.`):(i=o+t,this.colToPropCache.push(i),this.propToColCache.set(i,n),n+=1))}),n}colToProp(e){if(!1===Number.isInteger(e))return e;let t=this.hot.toPhysicalColumn(e);return null===t?null:this.colToPropCache&&e$(this.colToPropCache[t])?this.colToPropCache[t]:t}propToCol(e){let t=this.propToColCache.get(e);return void 0!==t?this.hot.toVisualColumn(t):null===e?null:"number"!=typeof e?e:this.hot.toVisualColumn(e)}getSchema(){let e=this.tableMeta.dataSchema;return e?"function"==typeof e?e():e:this.duckSchema}createDuckSchema(){return this.dataSource&&this.dataSource[0]?tw(this.dataSource[0]):{}}refreshDuckSchema(){this.duckSchema=this.createDuckSchema()}createRow(e,t=1,{source:r,mode:i="above",fillsMinimumSize:n=!1}={}){let o=this.hot.countSourceRows(),s=o,l=0,a=e;if(("number"!=typeof a||a>=o)&&(a=o),a<this.hot.countRows()&&(s=this.hot.toPhysicalRow(a)),!1===this.hot.runHooks("beforeCreateRow",a,t,r)||null===s)return{delta:0};let h=this.tableMeta.maxRows,d=this.getSchema().length,u=[];for(;l<t&&o+l<(h??1/0);){let e=null;if("array"===this.hot.dataType)this.tableMeta.dataSchema?e=tS(this.getSchema()):(e=[],oD(d-1,()=>e.push(null)));else if("function"===this.hot.dataType){let t=this.tableMeta.dataSchema;"function"!=typeof t&&tf("`dataSchema` must be a function when `dataType` is `function`"),e=t(a+l)}else tC(e={},this.getSchema());u.push(e),l+=1}this.hot.rowIndexMapper.insertIndexes(a,l,"below"===i?"end":"start"),"below"===i&&(s=Math.min(s+1,o)),this.#lX(s,l,o,n),this.spliceData(s,0,u),l>0&&this.hot._getOperationScope().record({type:"insertRows",physicalIndex:s,amount:l,atAxisEnd:s===this.hot.rowIndexMapper.getNumberOfIndexes()-l});let c=this.hot.toVisualRow(s);return this.hot.countSourceRows()===u.length&&this.hot.columnIndexMapper.initToLength(this.hot.getInitialColumnCount()),l>0&&(null==e?this.metaManager.createRow(null,l):"auto"!==r&&this.metaManager.createRow(s,t)),this.hot.runHooks("afterCreateRow",c,l,r),{delta:l,startPhysicalIndex:s}}createCol(e,t=1,{source:r,mode:i="start",fillsMinimumSize:n=!1}={}){this.hot.isColumnModificationAllowed()||tf('Cannot create a new column when the data source holds objects or the "columns" option is set. You can only have as many columns as defined in the first data row, the data schema, or the "columns" setting. To add new columns, use an array data source without the "columns" option.');let o=this.dataSource??[],s=this.tableMeta.maxCols,l=this.hot.columnIndexMapper.getNumberOfIndexes(),a=this.hot.countCols(),h=this.hot.countSourceRows(),d="number"==typeof e&&e<=l?e:a;if(!1===this.hot.runHooks("beforeCreateCol",d,t,r))return{delta:0};let u=d<a?this.hot.toPhysicalColumn(d):l,c="end"===i?Math.min(u+1,l):u,g=Math.max(0,Math.min(t,(s??1/0)-a));return this.#lQ(c,g,l,n),this.#lZ(o,c,d,a,h,g),g>0&&this.hot._getOperationScope().record({type:"insertColumns",physicalIndex:c,amount:g,atAxisEnd:c===this.hot.columnIndexMapper.getNumberOfIndexes()}),g>0&&(null==e?this.metaManager.createColumn(null,g):"auto"!==r&&this.metaManager.createColumn(c,t)),this.hot.columnIndexMapper.insertIndexes(d,g,i),this.hot.runHooks("afterCreateCol",this.hot.toVisualColumn(c),g,r),this.refreshDuckSchema(),{delta:g,startPhysicalIndex:c}}#lZ(e,t,r,i,n,o){if(!(o<=0)){if(0===n){let t="number"==typeof r?Math.max(0,Math.min(o,r-i+1)):o;for(let r=0;r<t;r++)e.push([null]);return}for(let r=0;r<n;r++)void 0===e[r]&&(e[r]=[]),eu(e[r],t,o,null)}}#lJ(e,t,r,i,n){return r<=0?e:n&&t>=i?e+r:t>i-e?Math.max(i-t,0):e}#l0(e,t,r){let i=r-e,n=0;return t.forEach(e=>{e>=i&&(n+=1)}),Math.max(e-n,0)}#lX(e,t,r,i){this.#lj=this.#lJ(this.#lj,e,t,r,i)}#lQ(e,t,r,i){this.#lY=this.#lJ(this.#lY,e,t,r,i)}removeRow(e,t=1,r){let i=Number.isInteger(e)?e:-t,n=this.visualRowsToPhysical(i,t),o=this.hot.countRows();if(i=(o+i)%o,!1===this.hot.runHooks("beforeRemoveRow",i,n.length,n,r))return!1;let s=n.length;if(!function(e,t){let r=e._getOperationScope();if(null===r.getRecordingTransaction()||0===t.length)return;let i=t.slice(0).sort((e,t)=>e-t),n=function(e){let t=[];for(let r=0;r<e.countCols();r++){let i=e.colToProp(r);pD(i)&&t.push([e.toPhysicalColumn(r),i])}return t}(e),o=e._getMetaManager(),s=[],l=[],a=[];i.forEach(t=>{let r;s.push((tx(r=tS(e.getSourceDataAtRow(t)))&&(delete r.__children,tA(r)),r)),l.push(n.map(([r,i])=>[r,pW(e.getSourceDataAtCell(t,i))])),o.captureRowMetaKeyStates(t,a)}),r.record({type:"removeRows",physicalIndexes:i,firstPhysicalIndex:t[0],rows:s,accessorValues:l,metas:a,atAxisEnd:pj(i,e.rowIndexMapper.getNumberOfIndexes())})}(this.hot,n),this.#l1(n),this.filterData(i,s,n),i<this.hot.countRows()){this.hot.rowIndexMapper.removeIndexes(n);let e=e$(this.tableMeta.columns)||e$(this.tableMeta.dataSchema)||this.tableMeta.colHeaders;0!==this.hot.rowIndexMapper.getNotTrimmedIndexesLength()||e||this.hot.columnIndexMapper.setIndexesSequence([])}let l=n.slice(0).sort((e,t)=>t-e);return this.#l2(l,(e,t)=>{this.metaManager.removeRow(e,t)}),this.hot.runHooks("afterRemoveRow",i,s,n,r),!0}removeCol(e,t=1,r){("object"===this.hot.dataType||this.tableMeta.columns)&&tf('Cannot remove a column when the data source holds objects or the "columns" option is set.');let i="number"!=typeof e?-t:e;i=(this.hot.countCols()+i)%this.hot.countCols();let n=this.visualColumnsToPhysical(i,t),o=n.slice(0).sort((e,t)=>t-e);if(!1===this.hot.runHooks("beforeRemoveCol",i,t,n,r))return!1;let s=!0,l=o.length,a=this.dataSource??[];for(let e=0;e<l;e++)s&&n[0]!==n[e]-e&&(s=!1);return!function(e,t,r){let i=e._getOperationScope();if(null===i.getRecordingTransaction()||0===r.length)return;let n=r.slice(0).sort((e,t)=>e-t),o=e._getMetaManager(),s=[],l=n.map(e=>{let r=[];for(let i=0;i<t.length;i++){let n=t[i];r.push(Array.isArray(n)?pW(n[e]):void 0)}return o.captureColumnMetaKeyStates(e,s),r});i.record({type:"removeColumns",physicalIndexes:n,values:l,metas:s,atAxisEnd:pj(n,e.columnIndexMapper.getNumberOfIndexes())})}(this.hot,a,n),this.#l3(n),this.#l6(a,s,n,o,t),i<this.hot.countCols()&&(this.hot.columnIndexMapper.removeIndexes(n),this.tableMeta.rowHeaders||0!==this.hot.columnIndexMapper.getNotTrimmedIndexesLength()||this.hot.rowIndexMapper.setIndexesSequence([])),this.hot.runHooks("afterRemoveCol",i,t,n,r),this.refreshDuckSchema(),!0}isTrailingFillerRow(e){return null!==e&&e>=this.hot.countSourceRows()-this.#lj}isTrailingFillerColumn(e){return null!==e&&e>=this.hot.countSourceCols()-this.#lY}#l6(e,t,r,i,n){if(t)for(let t=0,i=this.hot.countSourceRows();t<i;t++)e[t].splice(r[0],n),0===t&&this.metaManager.removeColumn(r[0],n);else{let t=new Set(r),n=this.hot.countSourceRows();for(let r=0;r<n;r++)ed(e[r],t);n>0&&this.#l2(i,(e,t)=>{this.metaManager.removeColumn(e,t)})}}#l3(e){this.#lY=this.#l0(this.#lY,e,this.hot.countSourceCols())}#l1(e){this.#lj=this.#l0(this.#lj,e,this.hot.countSourceRows())}#l2(e,t){let r=0;for(let i=0;i<e.length;i++)(i+1>=e.length||e[i+1]!==e[i]-1)&&(t(e[i],i-r+1),r=i+1)}spliceCol(e,t,r,...i){let n=this.hot.getDataAtCol(e),o=n.slice(t,t+r);ee(i,n.slice(t+r));let s=0;for(;s<r;)i.push(null),s+=1;return J(i),this.hot.populateFromArray(t,e,i,void 0,void 0,"spliceCol"),o}spliceRow(e,t,r,...i){let n=this.hot.getSourceDataAtRow(e),o=n.slice(t,t+r);ee(i,n.slice(t+r));let s=0;for(;s<r;)i.push(null),s+=1;return this.hot.populateFromArray(e,t,[i],void 0,void 0,"spliceRow"),o}spliceData(e,t,r){if(!1!==this.hot.runHooks("beforeDataSplice",e,t,r)){let t=[...this.dataSource.slice(0,e),...r,...this.dataSource.slice(e)];this.dataSource.length=0,t.forEach(e=>this.dataSource.push(e))}}filterData(e,t,r){let i=this.hot.runHooks("filterData",e,t,r);Array.isArray(i)?(this.dataSource.length=0,i.forEach(e=>{this.dataSource.push(e)})):ed(this.dataSource,new Set(r))}get(e,t,r){let i=r?.skipValueGetter===!0,n=this.hot.toPhysicalRow(e),o=this.dataSource[n],s=this.hot.runHooks("modifyRowData",n);o="number"!=typeof s?s:o;let{dataDotNotation:l}=this.hot.getSettings(),a=null;if(o&&!this.#lq(t)&&"function"!=typeof t&&tP(o,t))a=o[t];else if(l&&"string"==typeof t&&t.indexOf(".")>-1){let e=o;if(!e)return null;let r=t.split(".");for(let t=0,i=r.length;t<i;t++)if(void 0===(e=e[r[t]])||null===e&&t<i-1)return null;a=e}else"function"==typeof t&&o&&(a=t(o));let h=this.propToCol(t),d="number"==typeof h?this.hot.toPhysicalColumn(h):null;if(!i&&"number"==typeof h&&oW(n)&&oW(d)&&(a=nG(a,this.metaManager.getCellMetaUncached(n,d,{visualRow:e,visualColumn:h}))),this.hot.hasHook("modifyData")){let t=t_(a);this.hot.runHooks("modifyData",e,h,t,"get"),t.isTouched()&&(a=t.value)}return a}getAtColumnForRows(e,t){let r=this.colToProp(e),i=t.length,n=[],o=this.propToCol(r),s="number"==typeof o?this.hot.toPhysicalColumn(o):null,l="number"==typeof o&&oW(s),{dataDotNotation:a}=this.hot.getSettings();if(!("function"!=typeof r&&!(a&&"string"==typeof r&&r.indexOf(".")>-1)&&!this.hot.hasHook("modifyRowData")&&!this.hot.hasHook("modifyData")&&!this.hot.hasHook("modifySourceData")&&!(l&&i3(this.metaManager.getColumnMeta(s).valueGetter)))){for(let e=0;e<i;e++)n.push(this.get(this.hot.toVisualRow(t[e]),r));return n}let h=this.dataSource;for(let e=0;e<i;e++){let i=t[e];if(l&&oW(i)&&void 0!==this.metaManager.getCellMetaIfExists(i,s)){n.push(this.get(this.hot.toVisualRow(i),r));continue}let o=h[i];n.push(o&&tP(o,r)?o[r]:null)}return n}getCopyable(e,t){let r=this.propToCol(t)??t;return"number"==typeof r&&this.hot.getCellMetaTransient(e,r).copyable?this.get(e,t):""}set(e,t,r){this.setAtPhysicalRow(this.hot.toPhysicalRow(e),t,r,e)}setAtPhysicalRow(e,t,r,i){if(this.#lq(t))return;let n=r,o=this.dataSource[e],s=this.hot.runHooks("modifyRowData",e);if(o="number"!=typeof s?s:o,this.hot.hasHook("modifyData")){let e=t_(n);this.hot.runHooks("modifyData",i,this.propToCol(t),e,"set"),e.isTouched()&&(n=e.value)}let{dataDotNotation:l}=this.hot.getSettings();if(o&&"function"!=typeof t&&tP(o,t))o[t]=n;else if(l&&"string"==typeof t&&t.indexOf(".")>-1){let e,r=o,i=0,s=t.split(".");for(i=0,e=s.length-1;i<e;i++){if("__proto__"===s[i]||"constructor"===s[i]||"prototype"===s[i])return;(void 0===r[s[i]]||null===r[s[i]])&&(r[s[i]]={}),r=r[s[i]]}r[s[i]]=n}else if("function"==typeof t)o&&t(o,n);else{if("__proto__"===t||"constructor"===t||"prototype"===t)return;o[t]=n}}visualRowsToPhysical(e,t){let r=this.hot.countRows(),i=[],n=(r+e)%r,o=t;for(;n<r&&o;)i.push(this.hot.toPhysicalRow(n)),o-=1,n+=1;return i}visualColumnsToPhysical(e,t){let r=this.hot.countCols(),i=[],n=(r+e)%r,o=t;for(;n<r&&o;){let e=this.hot.toPhysicalColumn(n);i.push(e),o-=1,n+=1}return i}clear(){for(let e=0;e<this.hot.countSourceRows();e++)for(let t=0;t<this.hot.countCols();t++)this.set(e,this.colToProp(t),"")}getLength(){let e,t=this.tableMeta.maxRows;return e=(t??0)<0||0===t?0:t||1/0,Math.min(this.hot.rowIndexMapper.getNotTrimmedIndexesLength(),e)}getAll(){let e={row:0,col:0},t={row:Math.max(this.hot.countRows()-1,0),col:Math.max(this.hot.countCols()-1,0)};return e.row-t.row!=0||this.hot.countSourceRows()?this.getRange(e,t,pY.DESTINATION_RENDERER):[]}countCachedColumns(){return this.colToPropCache.length}getRange(e,t,r){let i,n,o,s=[],l=this.tableMeta.maxRows,a=this.tableMeta.maxCols;if(0===l||0===a)return[];let h=r===pY.DESTINATION_CLIPBOARD_GENERATOR?this.getCopyable:this.get,d=Math.min(Math.max((l??1/0)-1,0),Math.max(e.row,t.row)),u=Math.min(Math.max((a??1/0)-1,0),Math.max(e.col,t.col));for(i=Math.min(e.row,t.row);i<=d;i++){o=[];let r=i>=0?this.hot.toPhysicalRow(i):i;for(n=Math.min(e.col,t.col);n<=u&&null!==r;n++)o.push(h.call(this,i,n3(this.hot,n)));null!==r&&s.push(o)}return s}getText(e,t){return pz(this.getRange(e,t,pY.DESTINATION_RENDERER))}getCopyableText(e,t){return pz(this.getRange(e,t,pY.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}}function pK(e,t,r,i,n,o,s,l){let a=e.sourceDataValidator;if(!i3(a)||!0===a(t,e,l))return;!1===e.allowInvalid&&o.setAtCell(r,n,null);let h=e.sourceDataWarningMessage;if(h){let e=s.get(h)??[];e.push({row:r,col:i,value:t,message:h}),s.set(h,e)}}let pq=new Set(["type","sourceDataValidator"]);function pX(e,t){let r=e.countSourceRows(),i=e.countSourceCols();if(0===r||0===i)return;let n=e.getSettings(),o=e._getDataSource(),s=new Map,l=function(e,t){let r=[];for(let i=0;i<t;i+=1){let t=e.columnIndexMapper.getVisualFromPhysicalIndex(i);if(null!==t){let n=e.colToProp(t);null!==n&&r.push({physicalColumn:i,visualColumn:t,sourceColumn:n})}}return r}(e,i),{fullScan:a,columns:h}=function(e,t){let r=e._getMetaManager(),i=[];for(let e=0;e<t.length;e+=1){let n=t[e],{physicalColumn:o,visualColumn:s}=n,l=r.getCellMetaUncached(0,o,{visualRow:0,visualColumn:s}),a=l.sourceDataValidator;if(i3(a)){if(!0!==a.rowIndependent)return{fullScan:!0,columns:[]};i.push({...n,cellMeta:l})}}return{fullScan:!1,columns:i}}(e,l);(a||0!==h.length||Array.isArray(n.cell)&&n.cell.length>0||e._getMetaManager().getUserDefinedCellMetas().some(({key:e})=>pq.has(e)))&&(a||Array.isArray(n.cell)&&n.cell.length>0||e._getMetaManager().getUserDefinedCellMetas().length>0?!function(e,t,r,i,n,o){let{rowIndexMapper:s}=e,l=e._getMetaManager();for(let e=0;e<r;e+=1){let r=s.getVisualFromPhysicalIndex(e);if(null===r)continue;let a=null,h=!1;for(let s=0;s<i.length;s+=1){let{physicalColumn:d,visualColumn:u,sourceColumn:c}=i[s],g=l.getCellMetaUncached(e,d,{visualRow:r,visualColumn:u});i3(g.sourceDataValidator)&&(h||(a=t.modifyRowData(e),h=!0),pK(g,t.getAtCellByProp(e,c,a),e,d,c,t,n,o))}}}(e,o,r,l,s,t):!function(e,t,r,i,n,o){for(let s=0;s<r;s+=1){if(null===i(s))continue;let r=t.modifyRowData(s);for(let i=0;i<e.length;i+=1){let{physicalColumn:l,sourceColumn:a,cellMeta:h}=e[i];pK(h,t.getAtCellByProp(s,a,r),s,l,a,t,n,o)}}}(h,o,r,t=>e.rowIndexMapper.getVisualFromPhysicalIndex(t),s,t),s.forEach((e,t)=>{pQ(t,e)}))}function pQ(e,t){!function({logFunction:e=function(...e){e$(console)&&console.log(...e)},message:t="",items:r=[],maxSample:i=5,itemFormatter:n=e=>`${e}`}={}){if(!Array.isArray(r)||0===r.length)return;let o=r.length,s=r.slice(0,i).map(e=>` - ${n(e)}`),l=o>i?` - ...and ${o-i} more`:"";e(ri(t,{itemsCount:`${o} cell${o>1?"s":""}`,affectedCells:["Affected cells:",...s,...l?[l]:[]].join("\n")}))}({logFunction:rn,message:e,items:t,itemFormatter:e=>{let{row:t,col:r,value:i}=e,n=eW(i),o=n.length>64?`${n.slice(0,64)}...`:n;return`row ${t}, col ${r}, value: "${o}"`}})}function pZ(e,t,r,i){let{hotInstance:n,dataMap:o,dataSource:s,internalSource:l,source:a,metaManager:h,firstRun:d,beforeRender:u}=i,c=n4(l),g=n.getSettings();Array.isArray(g.dataSchema)?n.dataType="array":i3(g.dataSchema)?n.dataType="function":n.dataType="object",o&&o.destroy(),e=n.runHooks(`before${c}`,e,d,a);let p=new pY(n,e,h);t(p),"object"==typeof e&&null!==e?e.push&&e.splice||(e=[e]):null===e?e=function(e,t,r){let i=t.getSchema(),n=[];for(let t=0,o=r.startRows;t<o;t++){let t;if(("object"===e.dataType||"function"===e.dataType)&&r.dataSchema)t=tS(i);else if("array"===e.dataType)t=tS(i[0]);else{t=[];for(let e=0,i=r.startCols;e<i;e++)t.push(null)}n.push(t)}return n}(n,p,g):tf(`${l} only accepts array of objects or array of arrays (${typeof e} given)`),Array.isArray(e[0])&&(n.dataType="array"),g.data=e,p.dataSource=e,s.data=e,s.dataType=n.dataType,s.colToProp=e=>p.colToProp(e),s.propToCol=e=>p.propToCol(e),s.countCachedColumns=p.countCachedColumns.bind(p);let m=e.length;r(p),function(e,t,r){let{columns:i,dataSchema:n,maxCols:o,allowInsertColumn:s}=e.getSettings(),l=Array.isArray(i)||i3(i),a=e$(n)&&null!==n;if(0===r||0===e.countSourceRows()||e.columnIndexMapper.getNumberOfIndexes()>0||l||a||0===o)return;let h=!1;for(let e=1;e<t.length&&!h;e++)h=dd([t[e]])>0;if("array"===e.dataType&&!h&&s)return;let d=h?", while later rows have fields that no column displays":"";rs(e,"replaceData.undetectableColumns",`Handsontable found no columns in the data source, so the grid displays rows with no cells. Without the \`columns\` or \`dataSchema\` option, the number of columns is read from the first row of \`data\`, and it has no fields${d}. Define the columns with the \`columns\` or \`dataSchema\` option, or start \`data\` with a row that contains every field.`)}(n,e,m),d||n._isDataWorkDeferred()||pX(n,l),n.runHooks(`after${c}`,e,d,a),d||(u(),n.runHooks("afterChange",null,l),u(),n.render()),n.getSettings().ariaTags&&rG(n.rootElement,[z(-1)])}class pJ{#oj;#oY;constructor({rowIndexMapper:e,columnIndexMapper:t}){this.#oj=e,this.#oY=t}toRenderable(e){let t="N-S"===e.getVerticalDirection()?1:-1,r="W-E"===e.getHorizontalDirection()?1:-1,i=this.#l5(e.from,t,r);if(null===i)return null;let n=this.#l5(e.to,-t,-r);if(null===n)return null;let o=e.clone();return o.from=i,o.to=n,o.includes(e.highlight)||(o.highlight=i),o}#l5(e,t,r=t){if(null===e.row||null===e.col)return null;let i=this.#l4(this.#oj,e.row,t);if(null===i)return null;let n=this.#l4(this.#oY,e.col,r);return null===n?null:e.clone().assign({row:i,col:n})}#l4(e,t,r){return t<0?t:e.getNearestNotHiddenIndex(t,r)}}function p0(e){let t=Number(e);return t>0?t:0}function p1(e,t,r){let i=0;for(;i<t&&i<e&&r(e-1-i);)i+=1;return i}class p2{#ey;#l8=null;#l9=null;#l7=0;#ae=null;#at=null;#ar=null;#lw=null;#ai=new WeakMap;#an=null;#ao=!1;constructor(e){this.#ey=e,e.addHook("beforeInit",this.#as),e.addHook("afterUpdateSettings",this.#as),e.addHook("beforeLoadData",this.#al),e.addHook("beforeUpdateData",this.#al),e.addHook("afterLoadData",this.#aa),e.addHook("afterUpdateData",this.#aa),e.columnIndexMapper.addLocalHook("indexesInserted",this.#ah),e.columnIndexMapper.addLocalHook("indexesRemoved",this.#ah)}getDeclaredIndex(e,t){if(null===this.#l8||t!==this.#at)return e;let r=this.#l8.getValueAtIndex(e);return"number"==typeof r?r:null}#as=()=>{this.#ad()};#al=()=>{this.#ao=!0,this.#ey._registerMicrotask(this.#au),this.#ad(),null!==this.#an&&(this.#ac(this.#an.declared,this.#an.values),this.#an=null),null!==this.#l8&&null!==this.#at&&this.#ac(this.#at,this.#l8.getValues().slice())};#au=()=>{this.#ao=!1};#ah=()=>{this.#ao||"object"!=typeof this.#lw||null===this.#lw||(this.#ai.delete(this.#lw),this.#an=null)};#ac(e,t){let r=this.#lw;if("object"!=typeof r||null===r)return;let i=this.#ai.get(r);void 0===i&&(i=new Map,this.#ai.set(r,i)),i.set(e,t)}#aa=e=>{this.#ao=!1,this.#lw=e;let t=this.#l8,r=this.#at,i="object"==typeof e&&null!==e?this.#ai.get(e):void 0;if(void 0!==i&&this.#ai.delete(e),null===t||null===r||void 0===i)return;let n=i.get(r);void 0!==n&&n.length===t.getLength()&&!function(e,t){if(e.length!==t.length)return!1;for(let r=0;r<e.length;r+=1)if(e[r]!==t[r])return!1;return!0}(t.getValues(),n)&&t.setValues(n)};#ad(){let e=this.#ey.getSettings().colWidths;Array.isArray(e)?this.#ag(e):this.#ap()}#ag(e){if(this.#at===e)return;null!==this.#at&&this.#ap();let t=new dx((e,r)=>{if(void 0===r)return e;if(0===r){let r=Math.min(e,t.getLength()),{columnIndexMapper:i}=this.#ey,n=e>=t.getLength()&&(i.indexesSequence.isIdentity()||function(e,t){let r=e.indexOf(t);for(let i=r+1;i<e.length;i+=1)if(e[i]<t)return!1;return!0}(i.getIndexesSequence(),r));this.#ar=n?function(e){let t=0;for(let r=0;r<e.length;r+=1){let i=e[r];"number"==typeof i&&i>=t&&(t=i+1)}return t}(t.getValues()):null}return null===this.#ar?null:this.#ar+r}),r=`colWidths.declaredIndex.${this.#l7}`;this.#l7+=1,this.#l8=t,this.#l9=r,this.#at=e,this.#ey.columnIndexMapper.registerMap(r,t),this.#ae=this.#ey.columnIndexMapper.observeMapChange(t,()=>{this.#ey.view?.invalidateColumnWidthCache()})}#ap(){null!==this.#l9&&(null!==this.#l8&&null!==this.#at&&(this.#an={declared:this.#at,values:this.#l8.getValues().slice()}),this.#ae?.(),this.#ey.columnIndexMapper.unregisterMap(this.#l9),this.#l8=null,this.#l9=null,this.#ae=null,this.#at=null)}}let p3=["rowHeights","minRowHeights"];function p6(e){let t=0;for(let r=0;r<e.length;r+=1){let i=e[r];"number"==typeof i&&i>=t&&(t=i+1)}return t}class p5{#ey;#am=new Map;#af=new Map;#l7=0;#aw=new Map;#at=new Map;#ay=null;#ar=null;#lw=null;#ai=new WeakMap;#an=new Map;#ao=!1;constructor(e){this.#ey=e,e.rowIndexMapper.addLocalHook("indexesInserted",this.#ab),e.rowIndexMapper.addLocalHook("indexesRemoved",this.#aC),e.addHook("beforeInit",this.#as),e.addHook("afterUpdateSettings",this.#as),e.addHook("beforeLoadData",this.#al),e.addHook("beforeUpdateData",this.#al),e.addHook("afterLoadData",this.#aa),e.addHook("afterUpdateData",this.#aa)}getDeclaredIndex(e,t){let r=this.#am.get(e);if(void 0===r)return t;let i=r.getValueAtIndex(t);return"number"==typeof i?i:null}alignInsertedRows(e,t){let r=this.#ay;this.#ay=null,null===r||r===e||t<=0||this.#am.forEach(i=>{let n=i.getValues(),o=Math.min(r,n.length-t),s=n.slice(0,o).concat(n.slice(o+t)),l=e+t>=n.length,a=l?p6(s):0,h=Array(t);for(let e=0;e<t;e+=1)h[e]=l?a+e:null;i.setValues(s.slice(0,e).concat(h,s.slice(e)))})}readOrigins(){if(0===this.#am.size)return null;let e=new Map;return this.#am.forEach((t,r)=>e.set(r,t.getValues().slice())),e}writeOrigins(e){e.forEach((e,t)=>{this.#am.get(t)?.setValues(e)})}#ab=(e,t)=>{if(this.#aC(),this.#ay=null,this.#ar=null,0===e.length||0===this.#am.size)return;let r=this.#ey.rowIndexMapper.getNumberOfIndexes()-e.length,i=Math.min(e[0]+ +("end"===t),r),n=i>=r&&function(e,t){let r=e.indexOf(t);for(let i=r+1;i<e.length;i+=1)if(e[i]<t)return!1;return!0}(this.#ey.rowIndexMapper.getIndexesSequence(),i);this.#ay=i,this.#ar=new Map,this.#am.forEach((e,t)=>{n&&this.#ar.set(t,p6(e.getValues()))})};#aC=()=>{this.#ao||"object"!=typeof this.#lw||null===this.#lw||(this.#ai.delete(this.#lw),this.#an.clear())};#al=()=>{this.#ao=!0,this.#an.forEach(({declared:e,values:t},r)=>this.#ac(r,e,t)),this.#an.clear(),this.#aS()};#as=()=>{let e=this.#ey.getSettings();p3.forEach(t=>{let r=e[t];Array.isArray(r)?this.#ag(t,r):this.#ap(t)})};#aS(){this.#am.forEach((e,t)=>{let r=this.#at.get(t);void 0!==r&&this.#ac(t,r,e.getValues().slice())})}#aa=e=>{this.#ao=!1,this.#lw=e,this.#am.forEach((e,t)=>this.#av(t)),"object"==typeof e&&null!==e&&this.#ai.delete(e)};#ac(e,t,r){let i=this.#lw;if("object"!=typeof i||null===i)return;let n=this.#ai.get(i);void 0===n&&(n=new Map,this.#ai.set(i,n));let o=n.get(e);void 0===o&&(o=new Map,n.set(e,o)),o.set(t,r)}#av(e){let t=this.#am.get(e),r=this.#at.get(e),i=this.#lw,n="object"==typeof i&&null!==i?this.#ai.get(i)?.get(e):void 0;if(void 0===t||void 0===r||void 0===n)return;let o=n.get(r);void 0!==o&&o.length===t.getLength()&&t.setValues(o)}#ag(e,t){let r=this.#at.get(e);if(r===t)return;void 0!==r&&this.#ap(e);let i=new dx((t,r)=>{if(void 0===r)return t;let i=this.#ar?.get(e);return void 0===i?null:i+r}),n=`${e}.declaredIndex.${this.#l7}`;this.#l7+=1,this.#am.set(e,i),this.#af.set(e,n),this.#at.set(e,t),this.#ey.rowIndexMapper.registerMap(n,i),this.#aw.set(e,this.#ey.rowIndexMapper.observeMapChange(i,()=>{this.#ey.view?.invalidateRowHeightCache()}))}#ap(e){let t=this.#af.get(e);if(void 0===t)return;let r=this.#am.get(e),i=this.#at.get(e);void 0!==r&&void 0!==i&&this.#an.set(e,{declared:i,values:r.getValues().slice()}),this.#aw.get(e)?.(),this.#ey.rowIndexMapper.unregisterMap(t),this.#am.delete(e),this.#af.delete(e),this.#aw.delete(e),this.#at.delete(e)}}function p4(e,t,r,i=!1){for(let n=0;n<r;n+=1){let r=e.props[n],o=t.props[n];if(r!==o&&!(i&&"function"==typeof r&&"function"==typeof o))return!1}return!0}let p8=Object.freeze({CELL:"cell",MIXED:"mixed"});class p9{#ey;#aR=null;#aE=!1;#aT;#ax=1;#aA=null;#aM=new Map;#aI=null;#aN=!1;#aO=new Set;constructor(e){this.#ey=e}init(){let e=this.#ey.getSettings();this.#aT=e.imeFastEdit?p8.MIXED:p8.CELL,this.#ey.addHook("afterUpdateSettings",(...e)=>this.#ak(e[0])),this.#ey.addHook("afterSelection",(...e)=>this.#aH()),this.#ey.addHook("afterSelectionFocusSet",(...e)=>this.#aH()),this.#ey.addHook("afterSelectionEnd",(...e)=>this.#a_()),this.#ey.addHook("afterRender",(...e)=>this.#aP()),this.#aR=new n2(this.#ey);let t=[this.#ey.rootWrapperElement??this.#ey.rootElement,this.#ey.rootPortalElement].filter(e=>iG(e));t.forEach(e=>{this.#aR.addEventListener(e,"focusin",()=>{this.#aE=!0}),this.#aR.addEventListener(e,"focusout",e=>{let r=e.relatedTarget;this.#aE=iG(r)&&t.some(e=>e.contains(r))})})}hasBrowserFocus(){return this.#aE}registerOutsideClickExemptElement(e){this.#aO.add(e)}unregisterOutsideClickExemptElement(e){this.#aO.delete(e)}isPathOutsideClickExempt(e){return 0!==this.#aO.size&&e.some(e=>iG(e)&&this.#aO.has(e))}isForeignFocusTarget(e){let{rootElement:t,rootWrapperElement:r,rootPortalElement:i,rootDocument:n}=this.#ey,o=!!r&&r.contains(e)&&!t.contains(e);return!(null===e||e===n.body||e===n.documentElement||rx(e,t)||o||i&&i.contains(e))&&!iX(t).includes(e)}getFocusMode(){return this.#aT}setFocusMode(e){Object.values(p8).includes(e)?this.#aT=e:rn(`"${e}" is not a valid focus mode.`)}getRefocusDelay(){return this.#ax}setRefocusDelay(e){this.#ax=e}setRefocusElementGetter(e){this.#aA=e}suspend(){this.#aN=!0}resume(){this.#aN=!1}getRefocusElement(){return"function"==typeof this.#aA?this.#aA():this.#ey.getActiveEditor()?.TEXTAREA}focusElement(e,t){return!!iG(e)&&!!e.isConnected&&(e.focus(t),!0)}focusOnHighlightedCell(e){let t=e=>{let t=this.#ey.getSelectedRangeActive()?.highlight;if(!t)return;let r=this.#ey.runHooks("modifyFocusedElement",t.row,t.col,e);iG(r)||(r=e),r&&!this.#ey.getActiveEditor()?.isOpened?.()&&this.focusElement(r,{preventScroll:!0})};e?t(e):this.#aD(e=>t(e))}refocusToEditorTextarea(e=this.#ax){this.#ey.getSettings().imeFastEdit&&!this.#ey.getActiveEditor()?.isOpened?.()&&(this.#ey.getActiveEditor()?.refreshValue?.(),this.#aM.has(e)||this.#aM.set(e,i4(()=>{if(!this.#ey.isDestroyed){let e=this.getRefocusElement();e&&this.focusElement(e,{preventScroll:!0})&&"function"==typeof e.select&&e.select()}},e)),this.#aM.get(e)())}#aD(e){let t=this.#ey.getSelectedRangeActive()?.highlight;if(!t||!this.#ey.selection.isCellVisible(t)||null===t.row||null===t.col)return void e(null);let{row:r,col:i}=t,n=this.#ey.getCell(r,i,!0);null===n?this.#ey.addHookOnce("afterScroll",()=>{e(this.#ey.getCell(r,i,!0))}):e(n)}#aL(e){this.#aD(t=>{let r=iQ(this.#ey.rootDocument),i=iG(r)?r:null;e&&i&&iF(i)||(i&&iF(i)&&i.blur(),this.focusOnHighlightedCell(t))})}#a_(){if(this.#aN){let e=iQ(this.#ey.rootDocument),t=iG(e)?e:null;if(t&&iF(t))return}this.#aD(e=>{this.getFocusMode()===p8.MIXED&&e?.nodeName==="TD"&&this.refocusToEditorTextarea()})}#aH(){this.#aI=this.#aN}#aP(){let e=this.#aI;null===e||this.#ey.isDestroyed||(this.#aI=null,this.#aL(e))}#ak(e){"boolean"==typeof e.imeFastEdit&&this.setFocusMode(e.imeFastEdit?p8.MIXED:p8.CELL)}}let p7=Object.freeze({INLINE:"inline",MODAL:"modal"}),me=Object.freeze({UNKNOWN:"unknown",CLICK:"click",TAB_FROM_ABOVE:"tab_from_above",TAB_FROM_BELOW:"tab_from_below"});function mt(e,t){let r=e.rootDocument.createElement("div");return r.style.display="none",r.classList.add("htFocusCatcher"),r.dataset.htFocusSource=t,r}function mr(e){let{rowIndexMapper:t,columnIndexMapper:r}=e,{navigableHeaders:i}=e.getSettings(),n=i&&e.countColHeaders()>0?-e.countColHeaders():0,o=i&&e.countRowHeaders()>0?-e.countRowHeaders():0,s=0===n?t.getVisualFromRenderableIndex(n):n,l=0===o?r.getVisualFromRenderableIndex(o):o;return null===s||null===l?null:e._createCellCoords(s,l)}function mi(e){let{rowIndexMapper:t,columnIndexMapper:r}=e,{navigableHeaders:i}=e.getSettings(),n=t.getRenderableIndexesLength()-1,o=r.getRenderableIndexesLength()-1;if(n<0){if(!i||0===e.countColHeaders())return null;n=-1}if(o<0){if(!i||0===e.countColHeaders())return null;o=-1}return e._createCellCoords(t.getVisualFromRenderableIndex(n)??n,r.getVisualFromRenderableIndex(o)??o)}let mn="gridDefault",mo=[["Control/Meta","C"],["Control/Meta","X"],["Control/Meta","V"]],ms="grid.tabNavigation",ml="editorManager.handlingEditor";function ma(e){return e.countRenderedRows()>0&&e.countRenderedCols()>0}function mh(e){return!!sC(e)&&e.getFocusScopeManager().isGridBodyCovered()}function md(e){return ma(e)&&!mh(e)}function mu(e){let{navigableHeaders:t}=e.getSettings();return mh(e)?!0===t&&e.getSelectedRangeActive()?.highlight.isHeader()===!0:!0===t||ma(e)}let mc=new WeakMap;function mg(e){let t=mc.get(e);return void 0===t&&(t={coords:void 0,leftByTab:!1},mc.set(e,t)),t}function mp(e){return mg(e).coords}function mm(e,t){mg(e).coords=t}function mf(e,t){mg(e).leftByTab=t}function mw(e){let t=t=>{if(!t)return null;let{rowIndexMapper:r,columnIndexMapper:i}=e;if(r.isHidden(t.row)||i.isHidden(t.col))return null;let n=mr(e),o=mi(e);return null===n||null===o?null:(t.row=oB(t.row,n.row??t.row,o.row??t.row),t.col=oB(t.col,n.col??t.col,o.col??t.col),t)},r={wrapped:!1,flipped:!1},i=!0,n=!1,o=!1;e.addHook("afterSelection",()=>{mf(e,!1),i&&mm(e,e.getSelectedRangeActive()?.highlight)}),e.addHook("afterDeselect",()=>{mf(e,o)}),e.addHook("afterDocumentKeyDown",()=>{o=!1}),e.addHook("afterLoadData",()=>{mm(e,void 0),mf(e,!1)}),e.addHook("beforeRowWrap",(e,t,i)=>{r.wrapped=!0,r.flipped=i}),e.addHook("beforeEmptyDataStateShow",()=>{n=!0}),e.addHook("beforeEmptyDataStateHide",()=>{n=!1});let s=e.getShortcutManager().getContext("grid");s?.addShortcuts([{keys:[["Tab"],["Shift","Tab"]],preventDefault:!1,stopPropagation:!1,relativeToGroup:mn,group:ms,position:"before",callback(){let{tabNavigation:t}=e.getSettings();o=!0,e.getSelectedRangeActive()&&!t&&(i=!1)}},{keys:[["Tab"],["Shift","Tab"]],preventDefault:!1,stopPropagation:!1,relativeToGroup:mn,group:ms,callback(t){let{tabNavigation:n,autoWrapRow:o}=e.getSettings();if(i=!0,!n||!e.selection.isSelected()||o&&r.wrapped&&r.flipped||!o&&r.wrapped){if(o&&r.wrapped&&r.flipped){let r=t.shiftKey?mr(e):mi(e);mm(e,r)}r.wrapped=!1,r.flipped=!1}},position:"after"}]);let l=e.rootGridContentElement??e.rootElement;e.getFocusScopeManager().registerScope("grid",l,{contains:t=>!!(l===t||l.contains(t))||null===t.closest(".htMenu")&&e.rootPortalElement.contains(t),runOnlyIf:()=>{let{navigableHeaders:t}=e.getSettings();return!((n||!t)&&0===e.countRenderedRows()&&0===e.countRenderedCols()&&e.countRowHeaders()>0&&e.countColHeaders()>0)&&!!(!t&&ma(e)||t&&(e.countRowHeaders()>0||e.countColHeaders()>0))},onActivate:r=>{if("tab_from_above"===r){let r=t(mp(e))??mr(e);if(r){let t=e.runHooks("modifyFocusOnTabNavigation","from_above",r),{row:i,col:n}=r;!1!==t&&null!==i&&null!==n&&(e.selectCell(i,n),e.getFocusManager().focusOnHighlightedCell())}}else if("tab_from_below"===r){let r=t(mp(e))??mi(e);if(r){let t=e.runHooks("modifyFocusOnTabNavigation","from_below",r),{row:i,col:n}=r;!1!==t&&null!==i&&null!==n&&e.selectCell(i,n)}}}})}let my=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"]]),mb=e=>e.map(e=>{let t=e.toLowerCase();return my.has(t)?my.get(t)??t:t}).sort((e,t)=>e.localeCompare(t)).join("+"),mC=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"]]),mS=({which:e,key:t})=>{if(mC.has(e))return mC.get(e)??t.toLowerCase();let r=String.fromCharCode(e).toLowerCase();return/^[a-z0-9]$/.test(r)?r:t.toLowerCase()},mv=["meta","alt","shift","control"],mR=(e,t=!1)=>{let r=[];return e.altKey&&r.push("alt"),t&&(e.ctrlKey||e.metaKey)?r.push("control/meta"):(e.ctrlKey&&r.push("control"),e.metaKey&&r.push("meta")),e.shiftKey&&r.push("shift"),r},mE=(e,t)=>{if("string"!=typeof e.key)return[];let r=mS(e),i=mv.includes(r),n=i?[]:mR(e),o=[[r].concat(n)];return!i&&("function"==typeof t&&t()?n.includes("meta"):n.includes("control"))&&o.push([r].concat(mR(e,!0))),o},mT=Symbol("shortcut-context");function mx(e){return tx(e)&&e.__kindOf===mT}let mA=(e,t)=>e.relativeToGroup===t&&"before"===e.position,mM=(n=new Set,{press(e){n.add(e)},release(e){n.delete(e)},setPressed(e,t){t?n.add(e):n.delete(e)},releaseAll(){n.clear()},isPressed:e=>n.has(e)}),mI=new WeakMap,mN=e=>{mM.setPressed("alt",e.altKey),mM.setPressed("control",e.ctrlKey),mM.setPressed("meta",e.metaKey),mM.setPressed("shift",e.shiftKey)},mO=e=>{if("string"==typeof e.key){mN(e);let t=mS(e);mv.includes(t)&&mM.press(t)}},mk=e=>{if("string"==typeof e.key){mN(e);let t=mS(e);mv.includes(t)&&mM.release(t)}};function mH(e){let t=e.countCols(),r=e.view.countFixedColumnsEnd(),i=e.columnIndexMapper.getNearestNotHiddenIndex(t-r-1,-1);return 0===r||null!==i&&i>=e.view.countFixedColumnsStart()?i:null}let m_={name:"selectAllCells",callback({selection:e}){e.markSource("keyboard"),e.selectAll(!0,!0,{disableHeadersHighlight:!0}),e.markEndSource()}},mP="ht-link",mD="ht-link-scheme",mL=/^mailto:/i,mF=/^tel:/i;function mB(e,{href:t,target:r,classNames:i=[]}){let n=e.createElement("a");return n.className=[mP,...i.map(e=>e.trim()).filter(e=>""!==e)].join(" "),n.href=t,n.target=r,n.rel="noopener noreferrer",n.tabIndex=-1,n}function mV(e,t){let r=r2(e);for(;r.firstChild;)t.appendChild(r.firstChild);r.appendChild(t)}function mz(e){let t;if("mailto:"===e.protocol)t=mL;else{if("tel:"!==e.protocol)return!1;t=mF}let r=e.ownerDocument,i=r.createTreeWalker(e,NodeFilter.SHOW_TEXT),n=null,o=i.nextNode();for(;null!==o;){if(/\S/.test(o.data)){n=o;break}o=i.nextNode()}if(null===n||!t.test(n.data.trimStart()))return!1;let s=n.data.length-n.data.trimStart().length,l=s>0?n.splitText(s):n;l.splitText(e.protocol.length);let a=r.createElement("span");return a.className=mD,l.parentNode?.insertBefore(a,l),a.appendChild(l),!0}function mU(e,t){if(null===e.firstElementChild)return 0;let r=new Set,i=0;for(let n of Array.from(e.querySelectorAll(t))){if(!e.contains(n))continue;let t=function(e){let{parentNode:t}=e;for(;e.firstChild;)t?.insertBefore(e.firstChild,e);return e.remove(),t}(n);null!==t&&r.add(t),i+=1}return r.forEach(e=>e.normalize()),i}function mW(e){let t=e.getSelectedRangeActive()?.highlight;return t&&t.isCell()&&null!==t.row&&null!==t.col?e.getCell(t.row,t.col)?.querySelector(`a.${mP}`)??null:null}let m$=[{name:"editorCloseAndSave",callback(e){e._getEditorManager().closeEditorAndSaveChanges()}},{name:"editorCloseAndSaveByArrowKeys",callback(e,t,r){let i=e._getEditorManager(),n=i.getActiveEditor();if(!n?.isInFullEditMode()||n?.state!==nJ.EDITING){if(i.closeEditorAndSaveChanges(),e.isDestroyed)return void t.preventDefault();e.getSelected()&&(r.includes("arrowdown")?e.selection.transformStart(1,0):r.includes("arrowup")?e.selection.transformStart(-1,0):r.includes("arrowleft")?e.selection.transformStart(0,-1*e.getDirectionFactor()):r.includes("arrowright")&&e.selection.transformStart(0,e.getDirectionFactor())),t.preventDefault()}}},{name:"editorCloseAndSaveByEnter",callback(e,t){let r=e._getEditorManager();r.closeEditorAndSaveChanges(t.ctrlKey||t.metaKey),e.isDestroyed||r.moveSelectionAfterEnter(t)}},{name:"editorCloseWithoutSaving",callback(e){let t=e._getEditorManager();t.closeEditorAndRestoreOriginalValue(e.getShortcutManager().isCtrlPressed()),t.activeEditor?.focus()}},{name:"editorFastOpen",callback(e,t){let r=e.getSelectedRangeActive()?.highlight;r?.isHeader()||e._getEditorManager().openEditor(null,t,!0)}},{name:"editorOpen",callback(e,t,r){let{selection:i}=e,n=e._getEditorManager(),o=e.getSelectedRange(),s=e.getSelectedRangeActive(),l=s?.highlight;if((o?.some(e=>i.isMultiple(e))||(o?.length??0)>1)&&!s?.isHeader()&&ma(e)){let n=e.getSettings(),o="function"==typeof n.enterMoves?n.enterMoves(t):n.enterMoves;r.includes("shift")?i.transformFocus(-(o?.row??0),-(o?.col??0)):i.transformFocus(o?.row??0,o?.col??0);return}l?.isHeader()||(e.getSettings().enterBeginsEditing?(n.openEditor(null,t,!0),!n.isEditorOpened()&&n.cellProperties?.readOnly&&n.moveSelectionAfterEnter(t)):n.moveSelectionAfterEnter(t),nh(t))}},{name:"extendCellsSelectionDown",callback(e){let{selection:t}=e,r=e.getSelectedRangeActive()?.highlight;!t.isSelectedByColumnHeader()&&!t.isSelectedByCorner()&&(r?.isCell()||r?.isHeader()&&t.isSelectedByRowHeader())&&(t.markSource("keyboard"),t.transformEnd(1,0),t.markEndSource())}},{name:"extendCellsSelectionDownByViewportHeight",callback(e){let{selection:t,rowIndexMapper:r}=e,i=e.getSelectedRangeActive();if(!i)return;let{to:n}=i,o=n.row??0,s=Math.min(o+e.countVisibleRows(),e.countRows()-1),l=r.getNearestNotHiddenIndex(s,-1);if(null!==l){let r=e._createCellCoords(l,n.col??0),i=o-(e.getFirstFullyVisibleRow()??0),s=Math.min((r.row??0)-i,e.countRows()-1);t.markSource("keyboard"),t.setRangeEnd(r,e.getActiveSelectionLayerIndex()),t.markEndSource(),e.scrollViewportTo({row:s,verticalSnap:"top",horizontalSnap:"start"})}}},{name:"extendCellsSelectionLeft",callback(e){let{selection:t}=e,r=e.getSelectedRangeActive()?.highlight;!t.isSelectedByRowHeader()&&!t.isSelectedByCorner()&&(r?.isCell()||r?.isHeader()&&t.isSelectedByColumnHeader())&&(t.markSource("keyboard"),t.transformEnd(0,-1*e.getDirectionFactor()),t.markEndSource())}},{name:"extendCellsSelectionRight",callback(e){let{selection:t}=e,r=e.getSelectedRangeActive()?.highlight;!t.isSelectedByRowHeader()&&!t.isSelectedByCorner()&&(r?.isCell()||r?.isHeader()&&t.isSelectedByColumnHeader())&&(t.markSource("keyboard"),t.transformEnd(0,e.getDirectionFactor()),t.markEndSource())}},{name:"extendCellsSelectionToColumns",callback(e){let{selection:t}=e,r=e.getSelectedRangeActive();if(!r)return;let{highlight:i,from:n,to:o}=r;t.markSource("keyboard"),t.isSelectedByRowHeader()?t.selectAll(!0,!0):e.selectColumns(n.col??0,o.col??0,i),t.markEndSource()}},{name:"extendCellsSelectionToMostBottom",callback(e){let{selection:t,rowIndexMapper:r}=e,i=e.getSelectedRangeActive();if(!i)return;let{highlight:n,from:o,to:s}=i,l=n.isHeader()&&t.isSelectedByRowHeader();if(n.isCell()||l){let i=r.getNearestNotHiddenIndex(e.countRows()-1,-1),a=o.clone();a.row=n.row,t.markSource("keyboard"),t.setRangeStart(a,void 0,!1,n.clone()),l&&t.selectedByRowHeader.add(t.getLayerLevel()),t.setRangeEnd(e._createCellCoords(i??0,s.col??0)),t.markEndSource()}}},{name:"extendCellsSelectionToMostInlineEnd",callback(e){let{selection:t}=e,r=e.getSelectedRangeActive();if(!r)return;let{highlight:i,from:n,to:o}=r;if(!t.isSelectedByRowHeader()&&!t.isSelectedByCorner()&&i.isCell()){let r=mH(e);if(null===r&&(e.getSettings().fixedColumnsEnd??0)>0)return;let s=n.clone();s.col=i.col,t.markSource("keyboard"),t.setRangeStart(s,void 0,!1,i.clone()),t.setRangeEnd(e._createCellCoords(o.row??0,r??0)),t.markEndSource()}}},{name:"extendCellsSelectionToMostInlineStart",callback(e){let{selection:t,columnIndexMapper:r}=e,i=e.getSelectedRangeActive();if(!i)return;let{highlight:n,from:o,to:s}=i;if(!t.isSelectedByRowHeader()&&!t.isSelectedByCorner()&&n.isCell()){let i=e.view.countFixedColumnsStart(),l=r.getNearestNotHiddenIndex(i,1),a=o.clone();a.col=n.col,t.markSource("keyboard"),t.setRangeStart(a,void 0,!1,n.clone()),t.setRangeEnd(e._createCellCoords(s.row??0,l??0)),t.markEndSource()}}},{name:"extendCellsSelectionToMostLeft",callback(e){let{selection:t,columnIndexMapper:r}=e,i=e.getSelectedRangeActive();if(!i)return;let{highlight:n,from:o,to:s}=i,l=n.isHeader()&&t.isSelectedByColumnHeader();if(n.isCell()||l){let i=e.isRtl()?r.getNearestNotHiddenIndex(e.countCols()-1,-1):r.getNearestNotHiddenIndex(0,1),a=o.clone();a.col=n.col,t.markSource("keyboard"),t.setRangeStart(a,void 0,!1,n.clone()),l&&t.selectedByColumnHeader.add(t.getLayerLevel()),t.setRangeEnd(e._createCellCoords(s.row??0,i??0)),t.markEndSource()}}},{name:"extendCellsSelectionToMostRight",callback(e){let{selection:t,columnIndexMapper:r}=e,i=e.getSelectedRangeActive();if(!i)return;let{highlight:n,from:o,to:s}=i,l=n.isHeader()&&t.isSelectedByColumnHeader();if(n.isCell()||l){let i=e.isRtl()?r.getNearestNotHiddenIndex(0,1):r.getNearestNotHiddenIndex(e.countCols()-1,-1),a=o.clone();a.col=n.col,t.markSource("keyboard"),t.setRangeStart(a,void 0,!1,n.clone()),l&&t.selectedByColumnHeader.add(t.getLayerLevel()),t.setRangeEnd(e._createCellCoords(s.row??0,i??0)),t.markEndSource()}}},{name:"extendCellsSelectionToMostTop",callback(e){let{selection:t,rowIndexMapper:r}=e,i=e.getSelectedRangeActive();if(!i)return;let{highlight:n,from:o,to:s}=i,l=n.isHeader()&&t.isSelectedByRowHeader();if(n.isCell()||l){let i=r.getNearestNotHiddenIndex(0,1),a=o.clone();a.row=n.row,t.markSource("keyboard"),t.setRangeStart(a,void 0,!1,n.clone()),l&&t.selectedByRowHeader.add(t.getLayerLevel()),t.setRangeEnd(e._createCellCoords(i??0,s.col??0)),t.markEndSource()}}},{name:"extendCellsSelectionToRows",callback(e){let{selection:t}=e,r=e.getSelectedRangeActive();if(!r)return void t.markEndSource();let{highlight:i,from:n,to:o}=r;t.markSource("keyboard"),t.isSelectedByColumnHeader()?t.selectAll(!0,!0):e.selectRows(n.row??0,o.row??0,i),t.markEndSource()}},{name:"extendCellsSelectionUp",callback(e){let{selection:t}=e,r=e.getSelectedRangeActive()?.highlight;!t.isSelectedByColumnHeader()&&!t.isSelectedByCorner()&&(r?.isCell()||r?.isHeader()&&t.isSelectedByRowHeader())&&(t.markSource("keyboard"),t.transformEnd(-1,0),t.markEndSource())}},{name:"extendCellsSelectionUpByViewportHeight",callback(e){let{selection:t,rowIndexMapper:r}=e,i=e.getSelectedRangeActive();if(!i)return;let{to:n}=i,o=n.row??0,s=Math.max(o-e.countVisibleRows(),0),l=r.getNearestNotHiddenIndex(s,1);if(null!==l){let r=e._createCellCoords(l,n.col??0),i=o-(e.getFirstFullyVisibleRow()??0),s=Math.max((r.row??0)-i,0);t.markSource("keyboard"),t.setRangeEnd(r,e.getActiveSelectionLayerIndex()),t.markEndSource(),e.scrollViewportTo({row:s,verticalSnap:"top",horizontalSnap:"start"})}}},{name:"moveCellSelectionDown",callback({selection:e}){e.markSource("keyboard"),e.transformStart(1,0),e.markEndSource()}},{name:"moveCellSelectionDownByViewportHeight",callback(e){let{selection:t}=e,{navigableHeaders:r}=e.getSettings(),i=r?e.countColHeaders():0,n=e.getSelectedRangeActive()?.highlight.row??0,o=e.countVisibleRows()+i;o=0===o?1:o,n===e.countRows()-1?o=1:n+o>e.countRows()&&(o=e.countRows()-n-1),t.markSource("keyboard"),t.transformStart(o,0),t.markEndSource();let s=e.view.countFixedRowsBottom(),l=e.countRows(),a=e.getSelectedRangeActive()?.highlight.row??0;a<0?e.scrollViewportTo({row:0}):s>0&&a>=l-s&&e.scrollViewportTo({row:l-s-1,verticalSnap:"bottom"})}},{name:"moveCellSelectionInlineEnd",callback(e,t){let{selection:r}=e,i=e.getSettings(),n=e.getSelectedRange(),o=e.getSelectedRangeActive(),s="function"==typeof i.tabMoves?i.tabMoves(t):i.tabMoves;r.markSource("keyboard"),r.markTabNavigation(),(n?.some(e=>r.isMultiple(e))||(n?.length??0)>1)&&!o?.isHeader()&&ma(e)?r.transformFocus(-(s?.row??0),-(s?.col??0)):r.transformStart(-(s?.row??0),-(s?.col??0)),r.markEndSource()}},{name:"moveCellSelectionInlineStart",callback(e,t){let{selection:r}=e,i=e.getSettings(),n=e.getSelectedRange(),o=e.getSelectedRangeActive(),s="function"==typeof i.tabMoves?i.tabMoves(t):i.tabMoves;r.markSource("keyboard"),r.markTabNavigation(),(n?.some(e=>r.isMultiple(e))||(n?.length??0)>1)&&!o?.isHeader()&&ma(e)?r.transformFocus(s?.row??0,s?.col??0):r.transformStart(s?.row??0,s?.col??0),r.markEndSource()}},{name:"moveCellSelectionLeft",callback(e){let{selection:t}=e;t.markSource("keyboard"),t.transformStart(0,-1*e.getDirectionFactor()),t.markEndSource()}},{name:"moveCellSelectionRight",callback(e){let{selection:t}=e;t.markSource("keyboard"),t.transformStart(0,e.getDirectionFactor()),t.markEndSource()}},{name:"moveCellSelectionToMostBottom",callback(e){let{selection:t}=e,r=e.getSelectedRangeActive()?.highlight.col??0,i=e.rowIndexMapper.getNearestNotHiddenIndex(e.countRows()-1,-1);null===i&&(i=-1),t.setRangeStart(e._createCellCoords(i,r))}},{name:"moveCellSelectionToMostBottomInlineEnd",callback(e){let{selection:t,rowIndexMapper:r}=e,i=e.view.countFixedRowsBottom(),n=r.getNearestNotHiddenIndex(e.countRows()-i-1,-1),o=mH(e);null===o&&(e.getSettings().fixedColumnsEnd??0)>0||(t.markSource("keyboard"),t.setRangeStart(e._createCellCoords(n??-1,o??-1)),t.markEndSource())}},{name:"moveCellSelectionToMostInlineEnd",callback(e){let{selection:t}=e,r=mH(e);null===r&&(e.getSettings().fixedColumnsEnd??0)>0||(t.markSource("keyboard"),t.setRangeStart(e._createCellCoords(e.getSelectedRangeActive()?.highlight.row??0,r??0)),t.markEndSource())}},{name:"moveCellSelectionToMostInlineStart",callback(e){let{selection:t,columnIndexMapper:r}=e,i=e.view.countFixedColumnsStart(),n=e.getSelectedRangeActive()?.highlight.row??0,o=r.getNearestNotHiddenIndex(i,1);t.markSource("keyboard"),t.setRangeStart(e._createCellCoords(n,o??0)),t.markEndSource()}},{name:"moveCellSelectionToMostLeft",callback(e){let{selection:t,columnIndexMapper:r}=e,i=e.getSelectedRangeActive()?.highlight.row??0,n=e.isRtl()?r.getNearestNotHiddenIndex(e.countCols()-1,-1):r.getNearestNotHiddenIndex(0,1);null===n&&(n=e.isRtl()?-1:-e.countRowHeaders()),t.markSource("keyboard"),t.setRangeStart(e._createCellCoords(i,n)),t.markEndSource()}},{name:"moveCellSelectionToMostRight",callback(e){let{selection:t,columnIndexMapper:r}=e,i=e.getSelectedRangeActive()?.highlight.row??0,n=e.isRtl()?r.getNearestNotHiddenIndex(0,1):r.getNearestNotHiddenIndex(e.countCols()-1,-1);null===n&&(n=e.isRtl()?-e.countRowHeaders():-1),t.markSource("keyboard"),t.setRangeStart(e._createCellCoords(i,n)),t.markEndSource()}},{name:"moveCellSelectionToMostTop",callback(e){let{selection:t}=e,r=e.getSelectedRangeActive()?.highlight.col??0,i=e.rowIndexMapper.getNearestNotHiddenIndex(0,1);null===i&&(i=-e.countColHeaders()),t.markSource("keyboard"),t.setRangeStart(e._createCellCoords(i,r)),t.markEndSource()}},{name:"moveCellSelectionToMostTopInlineStart",callback(e){let{selection:t,rowIndexMapper:r,columnIndexMapper:i}=e,n=e.view.countFixedRowsTop(),o=e.view.countFixedColumnsStart(),s=r.getNearestNotHiddenIndex(n,1),l=i.getNearestNotHiddenIndex(o,1);t.markSource("keyboard"),t.setRangeStart(e._createCellCoords(s??0,l??0)),t.markEndSource()}},{name:"moveCellSelectionUp",callback({selection:e}){e.markSource("keyboard"),e.transformStart(-1,0),e.markEndSource()}},{name:"moveCellSelectionUpByViewportHight",callback(e){let{selection:t}=e,{navigableHeaders:r}=e.getSettings(),i=r?e.countColHeaders():0,n=e.getSelectedRangeActive()?.highlight.row??0,o=e.countVisibleRows()+i;o=0===o?-1:-o,n===-i?o=-1:n+o<i&&(o=-(n+i)),t.markSource("keyboard"),t.transformStart(o,0),t.markEndSource();let s=e.view.countFixedRowsTop();(e.getSelectedRangeActive()?.highlight.row??0)<s&&e.scrollViewportTo({row:s,verticalSnap:"top"})}},{name:"emptySelectedCells",callback(e){e.emptySelectedCells(),e.isDestroyed||e._getEditorManager().prepareEditor()}},{name:"scrollToFocusedCell",callback(e){let t=e.getSelectedRangeActive()?.highlight;if(!t)return;let r=e.getFirstFullyVisibleRow()-1,i=e.getFirstFullyVisibleColumn()-1,n=e.getLastFullyVisibleRow()+1,o=e.getLastFullyVisibleColumn()+1,s=e._createCellCoords(r,i),l=e._createCellCoords(n,o);if(!e._createCellRange(s,s,l).includes(t)&&((t.row??-1)>=0||(t.col??-1)>=0)){let r={};if((t.col??-1)>=0){let i=Math.floor(e.countVisibleCols()/2);r.col=Math.max((t.col??0)-i,0)}if((t.row??-1)>=0){let i=Math.floor(e.countVisibleRows()/2);r.row=Math.max((t.row??0)-i,0)}e.scrollViewportTo({...r,verticalSnap:"top",horizontalSnap:"start"})}}},m_,{name:"selectAllCellsAndHeaders",callback({selection:e}){e.markSource("keyboard"),e.selectAll(!0,!0,{disableHeadersHighlight:!1}),e.markEndSource()}},{name:"populateSelectedCellsData",callback(e){let t=e.getSelectedRange();if(!t?.length)return;let r=(e.getSelectedRangeActive()??t[t.length-1]).highlight.normalize(),i=r.row??0,n=r.col??0,o=nj(e,e.getDataAtCell(i,n),t,i,n);o.length>0&&e.setDataAtCell(o)}},{name:"tabNavigation",callback(e){let t={wrapped:!1,flipped:!1},r=!1,i=!1;return e.addHook("afterSelection",(e,n,o,s,l)=>{r&&(t.wrapped&&t.flipped||i)&&(i=!1,l.value=!0)}),e.addHook("beforeRowWrap",(e,r,i)=>{t.wrapped=!0,t.flipped=i}),{before(){let{tabNavigation:t}=e.getSettings();r=!0,t||(i=!0)},after(i){let{tabNavigation:n,autoWrapRow:o}=e.getSettings();if(r=!1,!n||!mu(e)||!e.selection.isSelected()||o&&t.wrapped&&t.flipped||!o&&t.wrapped)return t.wrapped=!1,t.flipped=!1,e.deselectCell(),!1;i.preventDefault()}}}},{name:"openCellLink",callback(e){let t=mW(e);null!==t&&e.rootWindow.open(t.href,t.target||"_blank","noopener,noreferrer")}}];function mG(e){let t={};return m$.forEach(({name:r,callback:i})=>{t[r]=(...t)=>i(e,...t)}),t}function mj(e){let t=e.getShortcutManager().addContext("editor"),r=mG(e);t.addShortcuts([{keys:[["Enter"],["Enter","Shift"]],callback:(e,t)=>r.editorCloseAndSaveByEnter(e,t)},{keys:[["Enter","Control/Meta"],["Enter","Control/Meta","Shift"]],captureCtrl:!0,callback:(e,t)=>r.editorCloseAndSaveByEnter(e,t)},{keys:[["Tab"],["Tab","Shift"],["PageDown"],["PageUp"]],forwardToContext:e.getShortcutManager().getContext("grid"),callback:(e,t)=>r.editorCloseAndSave(e,t)},{keys:[["ArrowDown"],["ArrowUp"],["ArrowLeft"],["ArrowRight"]],preventDefault:!1,callback:(e,t)=>r.editorCloseAndSaveByArrowKeys(e,t)},{keys:[["Escape"],["Escape","Control/Meta"]],callback:()=>r.editorCloseWithoutSaving()}],{group:ml})}function mY(e){var t;let r,i=e.getShortcutManager().addContext("grid"),n=(t=mG(e),r={},Object.keys(t).forEach(i=>{let n=t[i];r[i]=(...t)=>{let r=mh(e)?e.getSelectedRangeActive()?.highlight:void 0;if(r?.isHeader()!==!0)return n(...t);let{row:i,col:o}=r,s=n(...t);return"number"==typeof i&&"number"==typeof o&&e.getSelectedRangeActive()?.highlight.isHeader()===!1&&e.selectCell(i,o),s}}),r),o=()=>e$(e.getSelected())&&mu(e);i.addShortcuts([{keys:[["F2"]],callback:e=>n.editorFastOpen(e)},{keys:[["Enter"],["Enter","Shift"]],callback:(e,t)=>n.editorOpen(e,t)},{keys:[["Backspace"],["Delete"]],callback:()=>n.emptySelectedCells()}],{group:ml,runOnlyIf:()=>e$(e.getSelected())&&md(e)}),i.addShortcuts(mo.map(e=>({keys:[e],callback:()=>{}})),{group:"gridClipboard",preventDefault:!1}),i.addShortcuts([{keys:[["Control/Meta","A"]],callback:()=>n.selectAllCells(),runOnlyIf:()=>o()&&!e.getSelectedRangeActive()?.highlight.isHeader()},{keys:[["Control/Meta","A"]],callback:()=>{},runOnlyIf:()=>!!(o()&&e.getSelectedRangeActive()?.highlight.isHeader()),preventDefault:!0},{keys:[["Control/Meta","Shift","Space"]],callback:()=>n.selectAllCellsAndHeaders()},{keys:[["Control/Meta","Enter"]],callback:()=>n.populateSelectedCellsData(),runOnlyIf:()=>{let t=e.getSelectedRangeActive()?.highlight;if(!e$(e.getSelected())||!md(e)||void 0===t||t.isHeader())return!1;let{row:r,col:i}=t.normalize();return nK(e,e.getDataAtCell(r,i),r,i)}},{keys:[["Alt","Enter"]],stopPropagation:!0,callback:()=>n.openCellLink(),runOnlyIf:()=>md(e)&&null!==mW(e)},{keys:[["Control","Space"]],captureCtrl:!0,callback:()=>n.extendCellsSelectionToColumns()},{keys:[["Shift","Space"]],stopPropagation:!0,callback:()=>n.extendCellsSelectionToRows()},{keys:[["ArrowUp"]],callback:()=>n.moveCellSelectionUp()},{keys:[["ArrowUp","Control/Meta"]],captureCtrl:!0,callback:()=>n.moveCellSelectionToMostTop()},{keys:[["ArrowUp","Shift"]],callback:()=>n.extendCellsSelectionUp()},{keys:[["ArrowUp","Shift","Control/Meta"]],captureCtrl:!0,callback:()=>n.extendCellsSelectionToMostTop(),runOnlyIf:()=>o()&&!(e.selection.isSelectedByCorner()||e.selection.isSelectedByColumnHeader())},{keys:[["ArrowDown"]],callback:()=>n.moveCellSelectionDown()},{keys:[["ArrowDown","Control/Meta"]],captureCtrl:!0,callback:()=>n.moveCellSelectionToMostBottom()},{keys:[["ArrowDown","Shift"]],callback:()=>n.extendCellsSelectionDown()},{keys:[["ArrowDown","Shift","Control/Meta"]],captureCtrl:!0,callback:()=>n.extendCellsSelectionToMostBottom(),runOnlyIf:()=>o()&&!(e.selection.isSelectedByCorner()||e.selection.isSelectedByColumnHeader())},{keys:[["ArrowLeft"]],callback:()=>n.moveCellSelectionLeft()},{keys:[["ArrowLeft","Control/Meta"]],captureCtrl:!0,callback:()=>n.moveCellSelectionToMostLeft()},{keys:[["ArrowLeft","Shift"]],callback:()=>n.extendCellsSelectionLeft()},{keys:[["ArrowLeft","Shift","Control/Meta"]],captureCtrl:!0,callback:()=>n.extendCellsSelectionToMostLeft(),runOnlyIf:()=>o()&&!(e.selection.isSelectedByCorner()||e.selection.isSelectedByRowHeader())},{keys:[["ArrowRight"]],callback:()=>n.moveCellSelectionRight()},{keys:[["ArrowRight","Control/Meta"]],captureCtrl:!0,callback:()=>n.moveCellSelectionToMostRight()},{keys:[["ArrowRight","Shift"]],callback:()=>n.extendCellsSelectionRight()},{keys:[["ArrowRight","Shift","Control/Meta"]],captureCtrl:!0,callback:()=>n.extendCellsSelectionToMostRight(),runOnlyIf:()=>o()&&!(e.selection.isSelectedByCorner()||e.selection.isSelectedByRowHeader())},{keys:[["Home"]],captureCtrl:!0,callback:()=>n.moveCellSelectionToMostInlineStart(),runOnlyIf:()=>o()&&e.view.isMainTableNotFullyCoveredByOverlays()},{keys:[["Home","Shift"]],callback:()=>n.extendCellsSelectionToMostInlineStart()},{keys:[["Home","Control/Meta"]],captureCtrl:!0,callback:()=>n.moveCellSelectionToMostTopInlineStart(),runOnlyIf:()=>o()&&e.view.isMainTableNotFullyCoveredByOverlays()},{keys:[["End"]],captureCtrl:!0,callback:()=>n.moveCellSelectionToMostInlineEnd(),runOnlyIf:()=>o()&&e.view.isMainTableNotFullyCoveredByOverlays()},{keys:[["End","Shift"]],callback:()=>n.extendCellsSelectionToMostInlineEnd()},{keys:[["End","Control/Meta"]],captureCtrl:!0,callback:()=>n.moveCellSelectionToMostBottomInlineEnd(),runOnlyIf:()=>o()&&e.view.isMainTableNotFullyCoveredByOverlays()},{keys:[["PageUp"]],callback:()=>n.moveCellSelectionUpByViewportHight()},{keys:[["PageUp","Shift"]],callback:()=>n.extendCellsSelectionUpByViewportHeight()},{keys:[["PageDown"]],callback:()=>n.moveCellSelectionDownByViewportHeight()},{keys:[["PageDown","Shift"]],callback:()=>n.extendCellsSelectionDownByViewportHeight()},{keys:[["Tab"]],preventDefault:!1,callback:e=>n.moveCellSelectionInlineStart(e)},{keys:[["Shift","Tab"]],preventDefault:!1,callback:e=>n.moveCellSelectionInlineEnd(e)},{keys:[["Control/Meta","Backspace"]],callback:()=>n.scrollToFocusedCell()}],{runOnlyIf:o,group:mn});let s=n.tabNavigation();i.addShortcuts([{keys:[["Tab"],["Shift","Tab"]],preventDefault:!1,stopPropagation:!1,relativeToGroup:mn,group:ms,position:"before",callback:e=>s.before(e)},{keys:[["Tab"],["Shift","Tab"]],preventDefault:!1,stopPropagation:!1,relativeToGroup:mn,group:ms,callback:e=>s.after(e),position:"after"}])}function mK(e){let{classNames:t}=r_(e,/ht-theme-[a-zA-Z0-9_-]+/);return t.pop()}let mq="handsontable-core-styles";function mX(e){return"string"==typeof e&&/ht-theme-.*/.test(e)}class mQ{#ey;#aF;#aB;#aV=null;#az=!1;#tf;#aU;#aW={};#a$={};#aG={};#aj=null;#aY;constructor({hot:e,rootElement:t,rootDocument:r,onThemeChange:i=e=>{},injectCoreCss:n=!0}){this.#ey=e,this.#aB=t,this.#tf=r,this.#aY=i,this.#aU=n,n&&this.#aK()}isCoreCssInjectionEnabled(){return this.#aU}getCSSVariableValue(e){if(this.#aW[`--ht-${e}`])return this.#aW[`--ht-${e}`];let t=this.#aq(`--ht-${e}`)??this.#aX(`--ht-${e}`);if(null!==t)return this.#aW[`--ht-${e}`]=t,t}getResolvedLength(e){if(e in this.#a$)return this.#a$[e];let t=this.#tf.createElement("div");t.style.cssText="position:absolute;visibility:hidden;pointer-events:none;box-sizing:content-box;height:0;margin:0;padding:0;border:0;",t.style.width=e,this.#aB.appendChild(t);let r=t.offsetWidth;return(this.#aB.removeChild(t),r>0)?(this.#a$[e]=r,r):null}getStyleForTD(e){return this.#aG?.td?.[e]}getDefaultRowHeight(e){let t=this.#aQ();return void 0!==e&&this.firstRenderedRowDrawsTopBorder()&&e===this.#ey.view.getFirstRenderedVisibleRow()?(t??0)+1:t}firstRenderedRowDrawsTopBorder(){return this.#ey.view?0===this.#ey.view.getColumnHeadersCount():!this.#ey.hasColHeaders()}areCellsBorderBox(){return"border-box"===this.getStyleForTD("box-sizing")}useTheme(e){mX(e)?(this.#aZ(),e!==this.#aF&&(this.#aF=e),this.#aY(this.#aF),this.#aJ()):rn(`${e} isn't a valid theme name. Please ensure it follows the format ht-theme-<theme-name>.`)}getThemeName(){return this.#aF}#aK(){if(!this.#ey||!this.#tf||!this.#tf.head)return;let e=this.#tf.getElementById(mq);if(e&&e instanceof HTMLStyleElement)return;let t=this.#tf.createElement("style");t.id=mq,t.textContent='/*!\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 67,200.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: 19.0.0-rc4\n * Release date: 20/11/2026 (built at 20/11/2026 12:42:41)\n */\ndiv:where(.handsontable):not(p):not(p) span:where(.colHeader),div:where(.handsontable):not(p):not(p) span:where(.rowHeader),div:where(.handsontable):not(p):not(p) span:where(.ht-page-size-section__label),div:where(.handsontable):not(p):not(p) span:where(.ht-page-navigation-section__label),div:where(.handsontable):not(p):not(p) span:where(.ht-multi-select-arrow),div:where(.handsontable):not(p):not(p) span:where(.ht-multi-select-chip),div:where(.handsontable):not(p):not(p) span:where(.ht-multi-select-chip-label),div:where(.handsontable):not(p):not(p) span:where(.ht-multi-select-chip-remove),div:where(.handsontable):not(p):not(p) span:where(.ht-multi-select-overflow),div:where(.handsontable):not(p):not(p) span:where(.htUISelectCaptionLabel),div:where(.handsontable):not(p):not(p) span:where(.htCheckboxRendererBox),div:where(.handsontable):not(p):not(p) input:where(.htCheckboxRendererInput),div:where(.handsontable):not(p):not(p) span:where(.htCheckboxRendererLabelText),div:where(.handsontable):not(p):not(p) span:where(.ht_nestingLevel_empty),div:where(.handsontable):not(p):not(p) :where(.htUIInput)>input:where([type=text],[type=date],[type=datetime-local],[type=time],[type=button]),div:where(.handsontable):not(p):not(p) :where(.htUIRadio)>input:where([type=radio]),div:where(.handsontable):not(p):not(p) :where(.htItemWrapper)>span:where(.selected,.htMixed){padding:revert;margin:revert;border:revert;height:revert;font-size:revert;line-height:revert;font-weight:revert;letter-spacing:revert;font-family:revert}.ht-root-wrapper{font-family:var(--ht-font-family),-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;flex-direction:column;height:100%;display:flex;position:relative}.ht-root-wrapper.ht-shadow-dom{isolation:isolate}.ht-root-wrapper.ht-grid-follows-content>.ht-grid{flex-shrink:0;min-height:auto}.ht-root-wrapper.ht-slot-bottom-filled .ht-wrapper:not(.htHorizontallyScrollableByWindow) .ht_master .wtHolder,.ht-root-wrapper.ht-slot-bottom-filled .ht-wrapper:not(.htVerticallyScrollableByWindow) .ht_master .wtHolder,.ht-root-wrapper.ht-slot-top-filled .ht-wrapper:not(.htHorizontallyScrollableByWindow) .ht_master .wtHolder,.ht-root-wrapper.ht-slot-top-filled .ht-wrapper:not(.htVerticallyScrollableByWindow) .ht_master .wtHolder{background-color:var(--ht-background-color);box-shadow:inset 0 0 0 1px var(--ht-border-color)}.ht-root-wrapper.ht-slot-bottom-filled .ht-wrapper:not(.htHorizontallyScrollableByWindow) .ht_master .htScrollbarFrame,.ht-root-wrapper.ht-slot-bottom-filled .ht-wrapper:not(.htVerticallyScrollableByWindow) .ht_master .htScrollbarFrame,.ht-root-wrapper.ht-slot-top-filled .ht-wrapper:not(.htHorizontallyScrollableByWindow) .ht_master .htScrollbarFrame,.ht-root-wrapper.ht-slot-top-filled .ht-wrapper:not(.htVerticallyScrollableByWindow) .ht_master .htScrollbarFrame{box-shadow:inset 0 0 0 1px var(--ht-border-color)}.htFocusCatcher{opacity:0;z-index:-1;border:0;outline:0;width:0;height:0;margin:0;padding:0;position:absolute;display:block!important}.ht-grid{flex:auto;min-height:0;position:relative}.ht-grid-content{height:100%}.ht-slot-top,.ht-slot-bottom{flex:none;overflow-x:auto}.ht-slot-element{box-sizing:border-box;border:1px solid var(--ht-border-color);width:100%}.ht-slot-top>.ht-slot-element:not(:first-of-type){border-top-width:0}.ht-slot-top>.ht-slot-element:last-of-type,.ht-slot-bottom>.ht-slot-element:not(:last-of-type){border-bottom-width:0}.ht-slot-bottom>.ht-slot-element:first-of-type{border-top-width:0}.htScrollbarTest{scrollbar-width:auto;scrollbar-color:var(--ht-scrollbar-thumb-color)var(--ht-scrollbar-track-color)}.htScrollbarSafariTest::-webkit-scrollbar{width:9px;height:9px}.handsontable{font-family:var(--ht-font-family),-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;font-size:var(--ht-font-size);line-height:var(--ht-line-height);font-weight:var(--ht-font-weight);letter-spacing:var(--ht-letter-spacing);color:var(--ht-foreground-color);touch-action:manipulation;position:relative}.handsontable .wtHolder{scrollbar-width:auto;scrollbar-color:var(--ht-scrollbar-thumb-color)var(--ht-scrollbar-track-color)}.handsontable .wtHolder::-webkit-scrollbar{width:9px;height:9px}.handsontable .wtHolder::-webkit-scrollbar-track{background:var(--ht-scrollbar-track-color);border-radius:var(--ht-scrollbar-border-radius)}.handsontable .wtHolder::-webkit-scrollbar-thumb{background-color:var(--ht-scrollbar-thumb-color);border-radius:var(--ht-scrollbar-border-radius)}.handsontable .wtHolder::-webkit-scrollbar-corner{background:var(--ht-scrollbar-track-color);border-end-end-radius:var(--ht-scrollbar-border-radius)}.handsontable .htScrollbarProxy{scrollbar-width:auto;scrollbar-color:var(--ht-scrollbar-thumb-color)var(--ht-scrollbar-track-color);z-index:1;background:linear-gradient(var(--ht-scrollbar-track-color),var(--ht-scrollbar-track-color)),var(--ht-background-color);position:absolute}.handsontable .htScrollbarProxy>div{width:1px;height:1px}.handsontable .htScrollbarProxy::-webkit-scrollbar{width:9px;height:9px}.handsontable .htScrollbarProxy::-webkit-scrollbar-track{background:var(--ht-scrollbar-track-color);border-radius:var(--ht-scrollbar-border-radius)}.handsontable .htScrollbarProxy::-webkit-scrollbar-thumb{background-color:var(--ht-scrollbar-thumb-color);border-radius:var(--ht-scrollbar-border-radius)}.handsontable .htScrollbarProxy-vertical{overflow:hidden scroll}.handsontable .htScrollbarProxy-horizontal{overflow:scroll hidden}.handsontable .htScrollbarProxyFiller,.handsontable .htScrollbarCorner{z-index:1;background:linear-gradient(var(--ht-scrollbar-track-color),var(--ht-scrollbar-track-color)),var(--ht-background-color);position:absolute}.handsontable .htScrollbarFrame{z-index:2;pointer-events:none;position:absolute}.handsontable.ht-wrapper{width:100%;height:100%}.handsontable.ht-wrapper:not(.htFirstDatasetColumnNotRendered) :where(table.htCore>tbody>tr,.htGhostTable>table>tbody>tr)>td:first-child{border-inline-start-width:1px}.handsontable.htGhostTable.htNestedHeaders table{border-spacing:0;border-collapse:collapse}.handsontable.htGhostTable table thead th{border-bottom-width:0}.handsontable.htGhostTable table tbody tr:first-of-type th:first-child,.handsontable.htGhostTable table tbody tr:first-of-type td:first-child{height:calc(var(--ht-cell-vertical-padding)*2 + var(--ht-line-height) + 1px)}.handsontable.htGhostTable table tbody tr th,.handsontable.htGhostTable table tbody tr td{height:calc(var(--ht-cell-vertical-padding)*2 + var(--ht-line-height) + 1px);border-top-width:0}.handsontable:not(.htHorizontallyScrollableByWindow).htHasScrollX .ht_master .wtHolder,.handsontable:not(.htHorizontallyScrollableByWindow).htHasScrollY .ht_master .wtHolder,.handsontable:not(.htVerticallyScrollableByWindow).htHasScrollX .ht_master .wtHolder,.handsontable:not(.htVerticallyScrollableByWindow).htHasScrollY .ht_master .wtHolder{background-color:var(--ht-background-color);box-shadow:inset 0 0 0 1px var(--ht-border-color)}.handsontable:not(.htHorizontallyScrollableByWindow).htHasScrollX .ht_master .htScrollbarFrame,.handsontable:not(.htHorizontallyScrollableByWindow).htHasScrollY .ht_master .htScrollbarFrame,.handsontable:not(.htVerticallyScrollableByWindow).htHasScrollX .ht_master .htScrollbarFrame,.handsontable:not(.htVerticallyScrollableByWindow).htHasScrollY .ht_master .htScrollbarFrame{box-shadow:inset 0 0 0 1px var(--ht-border-color)}.handsontable :where(table.htCore>tbody,.htGhostTable>table>tbody)>tr.ht__row_even>th{background-color:var(--ht-row-header-even-background-color)}.handsontable :where(table.htCore>tbody,.htGhostTable>table>tbody)>tr.ht__row_even>td{background-color:var(--ht-row-cell-even-background-color)}.handsontable :where(table.htCore>tbody,.htGhostTable>table>tbody)>tr.ht__row_odd>th{background-color:var(--ht-row-header-odd-background-color)}.handsontable :where(table.htCore>tbody,.htGhostTable>table>tbody)>tr.ht__row_odd>td{background-color:var(--ht-row-cell-odd-background-color)}.handsontable :where(table.htCore>thead>tr,.htGhostTable>table>thead>tr,table.htCore>tbody>tr,.htGhostTable>table>tbody>tr)>th,.handsontable :where(table.htCore>tbody>tr,.htGhostTable>table>tbody>tr)>td{height:calc(var(--ht-cell-vertical-padding)*2 + var(--ht-line-height) + 1px);padding:var(--ht-cell-vertical-padding)var(--ht-cell-horizontal-padding);vertical-align:top;border-top-width:0;font-size:var(--ht-font-size);line-height:var(--ht-line-height);white-space:pre-wrap;empty-cells:show;box-sizing:border-box;color:var(--ht-foreground-color);border-inline-width:0 1px;border-style:solid;border-bottom-width:1px;border-top-color:var(--ht-cell-vertical-border-color);border-bottom-color:var(--ht-cell-vertical-border-color);border-inline-start-color:var(--ht-cell-horizontal-border-color);border-inline-end-color:var(--ht-cell-horizontal-border-color);outline:0;overflow:hidden}.handsontable :where(table.htCore>thead>tr,.htGhostTable>table>thead>tr,table.htCore>tbody>tr,.htGhostTable>table>tbody>tr)>th.invisibleSelection,.handsontable :where(table.htCore>tbody>tr,.htGhostTable>table>tbody>tr)>td.invisibleSelection{outline:none}.handsontable :where(table.htCore>thead>tr,.htGhostTable>table>thead>tr,table.htCore>tbody>tr,.htGhostTable>table>tbody>tr)>th.invisibleSelection::selection{background:0 0}.handsontable :where(table.htCore>tbody>tr,.htGhostTable>table>tbody>tr)>td.invisibleSelection::selection{background:0 0}.handsontable :where(table.htCore>thead>tr,.htGhostTable>table>thead>tr,table.htCore>tbody>tr,.htGhostTable>table>tbody>tr)>th{text-align:center;font-weight:var(--ht-header-font-weight);white-space:nowrap;color:var(--ht-header-foreground-color);background-color:var(--ht-header-background-color);position:relative;overflow:visible}.handsontable :where(table.htCore>thead>tr,.htGhostTable>table>thead>tr,table.htCore>tbody>tr,.htGhostTable>table>tbody>tr)>th:last-child{border-inline-width:0 1px;border-bottom-width:1px;border-inline-end-color:var(--ht-border-color)}.handsontable :where(table.htCore>thead>tr,.htGhostTable>table>thead>tr,table.htCore>tbody>tr,.htGhostTable>table>tbody>tr)>th:last-child.ht__active_highlight{border-inline-end-color:var(--ht-header-active-border-color)}.handsontable :where(table.htCore>thead>tr,.htGhostTable>table>thead>tr,table.htCore>tbody>tr,.htGhostTable>table>tbody>tr)>th:first-child{border-inline-start-color:var(--ht-border-color)}.handsontable :where(table.htCore>thead>tr,.htGhostTable>table>thead>tr,table.htCore>tbody>tr,.htGhostTable>table>tbody>tr)>th:first-child.ht__active_highlight{border-inline-start-color:var(--ht-header-active-border-color)}.handsontable :where(table.htCore>thead>tr,.htGhostTable>table>thead>tr,table.htCore>tbody>tr,.htGhostTable>table>tbody>tr)>th:first-child{border-inline-start-width:1px}.handsontable :where(table.htCore>thead>tr,.htGhostTable>table>thead>tr,table.htCore>tbody>tr,.htGhostTable>table>tbody>tr)>th.current{box-shadow:inset 0 0 0 1px var(--ht-cell-selection-border-color)}.handsontable :where(table.htCore>thead>tr,.htGhostTable>table>thead>tr,table.htCore>tbody>tr,.htGhostTable>table>tbody>tr)>th.active{color:var(--ht-header-active-foreground-color);background-color:var(--ht-header-active-background-color)}.handsontable :where(table.htCore>thead>tr,.htGhostTable>table>thead>tr,table.htCore>tbody>tr,.htGhostTable>table>tbody>tr)>th.ht__highlight{color:var(--ht-header-highlighted-foreground-color);background-color:var(--ht-header-highlighted-background-color)}.handsontable :where(table.htCore>thead>tr,.htGhostTable>table>thead>tr,table.htCore>tbody>tr,.htGhostTable>table>tbody>tr)>th.ht__active_highlight{border-color:var(--ht-header-active-border-color);color:var(--ht-header-active-foreground-color);background-color:var(--ht-header-active-background-color)}.handsontable :where(table.htCore>thead>tr,.htGhostTable>table>thead>tr,table.htCore>tbody>tr,.htGhostTable>table>tbody>tr)>th.ht__active_highlight-prev,.handsontable :where(table.htCore>thead>tr,.htGhostTable>table>thead>tr,table.htCore>tbody>tr,.htGhostTable>table>tbody>tr)>th.ht__active_highlight-seam{border-inline-end-color:var(--ht-header-active-border-color)}.handsontable.htRowHeaders .ht_master:not(.emptyColumns) :where(table.htCore>thead>tr,.htGhostTable>table>thead>tr)>th.htLastRowHeaderColumn:not(.ht__active_highlight):not(.ht__active_highlight-prev),.handsontable.htRowHeaders .ht_master:not(.emptyColumns) :where(table.htCore>tbody>tr,.htGhostTable>table>tbody>tr)>th:not(.ht__active_highlight):not(.ht__active_highlight-prev),.handsontable.htRowHeaders .ht_master:not(.emptyColumns)~.handsontable:not(.htGhostTable) :where(table.htCore>thead>tr,.htGhostTable>table>thead>tr)>th.htLastRowHeaderColumn:not(.ht__active_highlight):not(.ht__active_highlight-prev),.handsontable.htRowHeaders .ht_master:not(.emptyColumns)~.handsontable:not(.htGhostTable) :where(table.htCore>tbody>tr,.htGhostTable>table>tbody>tr)>th:not(.ht__active_highlight):not(.ht__active_highlight-prev),.handsontable.htRowHeaders .ht_master:not(.emptyColumns)~.htOverlayRail>.handsontable:not(.htGhostTable) :where(table.htCore>thead>tr,.htGhostTable>table>thead>tr)>th.htLastRowHeaderColumn:not(.ht__active_highlight):not(.ht__active_highlight-prev),.handsontable.htRowHeaders .ht_master:not(.emptyColumns)~.htOverlayRail>.handsontable:not(.htGhostTable) :where(table.htCore>tbody>tr,.htGhostTable>table>tbody>tr)>th:not(.ht__active_highlight):not(.ht__active_highlight-prev){border-inline-end-color:var(--ht-cell-horizontal-border-color)}.handsontable :where(table.htCore,.htGhostTable>table)>tbody>tr.ht__row_odd>th.ht__highlight,.handsontable :where(table.htCore,.htGhostTable>table)>tbody>tr.ht__row_even>th.ht__highlight{color:var(--ht-header-row-highlighted-foreground-color);background-color:var(--ht-header-row-highlighted-background-color)}.handsontable :where(table.htCore,.htGhostTable>table)>tbody>tr.ht__row_odd>th.ht__active_highlight,.handsontable :where(table.htCore,.htGhostTable>table)>tbody>tr.ht__row_even>th.ht__active_highlight{color:var(--ht-header-row-active-foreground-color);background-color:var(--ht-header-row-active-background-color)}.handsontable :where(table.htCore,.htGhostTable>table)>tbody>tr:first-of-type>th:first-child:empty:after,.handsontable :where(table.htCore,.htGhostTable>table)>tbody>tr:first-of-type>td:first-child:empty:after{content:"";min-height:var(--ht-line-height);display:block}.handsontable :where(table.htCore,.htGhostTable>table)>tbody>tr>th{color:var(--ht-header-row-foreground-color);background-color:var(--ht-header-row-background-color);padding:0}.handsontable :where(table.htCore,.htGhostTable>table)>tbody>tr>th .relative{padding:var(--ht-cell-vertical-padding)var(--ht-cell-horizontal-padding);min-height:100%}.handsontable :where(table.htCore,.htGhostTable>table)>tbody>tr>td:first-child{border-inline-start-color:var(--ht-border-color)}.handsontable :where(table.htCore,.htGhostTable>table)>tbody>tr>td:last-child{border-inline-end-color:var(--ht-border-color)}.handsontable :where(table.htCore,.htGhostTable>table)>tbody>tr>th.ht__active_highlight-prev-row{border-bottom-color:var(--ht-header-active-border-color)}.handsontable :where(table.htCore,.htGhostTable>table)>thead>tr>th{padding:0}.handsontable :where(table.htCore,.htGhostTable>table)>thead>tr>th.ht__active_highlight{box-shadow:-1px 0 0 0 var(--ht-header-active-border-color)}.handsontable :where(table.htCore,.htGhostTable>table)>thead>tr>th .relative{padding:var(--ht-cell-vertical-padding)var(--ht-cell-horizontal-padding);flex-direction:row;align-items:center;gap:2px;display:flex}.handsontable :where(table.htCore,.htGhostTable>table)>thead>tr>th .relative .colHeader{text-overflow:ellipsis;vertical-align:top;flex:auto;min-width:0;overflow:hidden}.handsontable :where(table.htCore>thead,table.htCore>tbody,.htGhostTable>table>thead,.htGhostTable>table>tbody)>tr:first-child>th,.handsontable :where(table.htCore>thead,table.htCore>tbody,.htGhostTable>table>thead,.htGhostTable>table>tbody)>tr:first-child>td{border-top-color:var(--ht-border-color);border-top-width:1px}.handsontable :where(table.htCore>thead,table.htCore>tbody,.htGhostTable>table>thead,.htGhostTable>table>tbody)>tr:first-child>th.ht__active_highlight,.handsontable :where(table.htCore>thead,table.htCore>tbody,.htGhostTable>table>thead,.htGhostTable>table>tbody)>tr:first-child>th.ht__active_highlight-row-seam-bottom,.handsontable :where(table.htCore>thead,table.htCore>tbody,.htGhostTable>table>thead,.htGhostTable>table>tbody)>tr:first-child>td.ht__active_highlight,.handsontable :where(table.htCore>thead,table.htCore>tbody,.htGhostTable>table>thead,.htGhostTable>table>tbody)>tr:first-child>td.ht__active_highlight-row-seam-bottom{border-top-color:var(--ht-header-active-border-color)}.handsontable :where(table.htCore,.htGhostTable>table)>thead:not(:empty)+tbody>tr:first-child>th,.handsontable :where(table.htCore,.htGhostTable>table)>thead:not(:empty)+tbody>tr:first-child>td{border-top-width:0}.handsontable :where(table.htCore>thead,table.htCore>tbody,.htGhostTable>table>thead,.htGhostTable>table>tbody)>tr:last-child>th,.handsontable :where(table.htCore>thead,table.htCore>tbody,.htGhostTable>table>thead,.htGhostTable>table>tbody)>tr:last-child>td{border-bottom-color:var(--ht-border-color)}.handsontable :where(table.htCore>thead,table.htCore>tbody,.htGhostTable>table>thead,.htGhostTable>table>tbody)>tr:last-child>th.ht__active_highlight,.handsontable :where(table.htCore>thead,table.htCore>tbody,.htGhostTable>table>thead,.htGhostTable>table>tbody)>tr:last-child>th.ht__active_highlight-row-seam-top,.handsontable :where(table.htCore>thead,table.htCore>tbody,.htGhostTable>table>thead,.htGhostTable>table>tbody)>tr:last-child>td.ht__active_highlight,.handsontable :where(table.htCore>thead,table.htCore>tbody,.htGhostTable>table>thead,.htGhostTable>table>tbody)>tr:last-child>td.ht__active_highlight-row-seam-top{border-bottom-color:var(--ht-header-active-border-color)}.handsontable div[class^=ht_clone] thead .ht__highlight .relative:after{content:"";height:var(--ht-header-highlighted-shadow-size);background-color:var(--ht-accent-color);display:block;position:absolute;bottom:-1px;left:-1px;right:-1px}.handsontable div[class^=ht_clone] thead tr:only-of-type .ht__highlight .relative:after{bottom:0}.handsontable div[class^=ht_clone] tbody .ht__highlight .relative:after{content:"";width:var(--ht-header-highlighted-shadow-size);background-color:var(--ht-accent-color);display:block;position:absolute;top:-1px;bottom:-1px;right:-1px}.handsontable div[class^=ht_clone] :where(table.htCore>tbody>tr,.htGhostTable>table>tbody>tr)>td:first-child{border-inline-start-width:1px}.handsontable div[class^=ht_clone].htFreezeLineShared.ht_clone_inline_end :where(table.htCore>thead>tr,.htGhostTable>table>thead>tr,table.htCore>tbody>tr,.htGhostTable>table>tbody>tr)>th:first-child,.handsontable div[class^=ht_clone].htFreezeLineShared.ht_clone_inline_end :where(table.htCore>tbody>tr,.htGhostTable>table>tbody>tr)>td:first-child,.handsontable div[class^=ht_clone].htFreezeLineShared.ht_clone_top_inline_end_corner :where(table.htCore>thead>tr,.htGhostTable>table>thead>tr,table.htCore>tbody>tr,.htGhostTable>table>tbody>tr)>th:first-child,.handsontable div[class^=ht_clone].htFreezeLineShared.ht_clone_top_inline_end_corner :where(table.htCore>tbody>tr,.htGhostTable>table>tbody>tr)>td:first-child,.handsontable div[class^=ht_clone].htFreezeLineShared.ht_clone_bottom_inline_end_corner :where(table.htCore>thead>tr,.htGhostTable>table>thead>tr,table.htCore>tbody>tr,.htGhostTable>table>tbody>tr)>th:first-child,.handsontable div[class^=ht_clone].htFreezeLineShared.ht_clone_bottom_inline_end_corner :where(table.htCore>tbody>tr,.htGhostTable>table>tbody>tr)>td:first-child{border-inline-start-width:0}.handsontable :where(table.htCore,.htGhostTable>table)>thead>tr:not(:last-child)>th{overflow:hidden}.handsontable .hide{display:none}.handsontable .relative{box-sizing:border-box;position:relative}.handsontable tr.htExactRow>td,.handsontable tr.htExactRow>th{height:auto;position:relative}.handsontable tr.htExactRow>td{padding:0}.handsontable tr.htExactRow>td>.htCellClip{inset:var(--ht-cell-vertical-padding)var(--ht-cell-horizontal-padding);box-sizing:border-box;border:0;min-height:0;margin:0;padding:0;position:absolute;overflow:hidden}.handsontable tr.htExactRow>td.htMiddle>.htCellClip{align-content:center}.handsontable tr.htExactRow>td.htBottom>.htCellClip{align-content:end}.handsontable tr.htExactRow>th>.relative{min-height:0;position:absolute;inset:0}.handsontable tr.htExactRow>th>.relative>.rowHeader{height:100%;display:block;overflow:hidden}.handsontable .wtHider{width:0}.handsontable .wtSpreader{width:0;height:auto;position:relative}.handsontable .htAutoSize{visibility:hidden;position:absolute;top:-99000px;left:-99000px}.handsontable.htGhostTable.htAutoSize{width:auto}.handsontable .htTextEllipsis{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.handsontable .htLineClamp{-webkit-line-clamp:var(--ht-text-line-clamp);white-space:pre-wrap;box-sizing:border-box;border:0;-webkit-box-orient:vertical;min-height:0;margin:0;padding:0;display:-webkit-box;overflow:hidden}.handsontable .htMergedCellContentWindow{box-sizing:border-box;border:0;margin:0;padding:0;display:block}.handsontable tr.htExactRow>td.htTextEllipsis>.htCellClip{text-overflow:ellipsis}.handsontable table.htCore,.handsontable:where(.htGhostTable)>table,.handsontable :where(table.htCore,.htGhostTable>table)>thead,.handsontable :where(table.htCore,.htGhostTable>table)>tbody,.handsontable input:not(:where(table.htCore>tbody>tr>td:not(.htCustomMenuRenderer) :not(.htCheckboxRendererInput),.htGhostTable>table>tbody>tr>td:not(.htCustomMenuRenderer) :not(.htCheckboxRendererInput))),.handsontable textarea:not(:where(table.htCore>tbody>tr>td:not(.htCustomMenuRenderer) :not(.htCheckboxRendererInput),.htGhostTable>table>tbody>tr>td:not(.htCustomMenuRenderer) :not(.htCheckboxRendererInput))),.handsontable div:not(:where(table.htCore>tbody>tr>td:not(.htCustomMenuRenderer) :not(.htCheckboxRendererInput),.htGhostTable>table>tbody>tr>td:not(.htCustomMenuRenderer) :not(.htCheckboxRendererInput))){box-sizing:content-box}.handsontable input:not(:where(table.htCore>tbody>tr>td:not(.htCustomMenuRenderer) :not(.htCheckboxRendererInput),.htGhostTable>table>tbody>tr>td:not(.htCustomMenuRenderer) :not(.htCheckboxRendererInput))),.handsontable textarea:not(:where(table.htCore>tbody>tr>td:not(.htCustomMenuRenderer) :not(.htCheckboxRendererInput),.htGhostTable>table>tbody>tr>td:not(.htCustomMenuRenderer) :not(.htCheckboxRendererInput))){min-height:initial}.handsontable .htCore{border-spacing:0;border-collapse:separate;table-layout:fixed;cursor:default;background-color:var(--ht-background-color);border-width:0;outline-width:0;width:0;margin:0}.handsontable :where(table.htCore,.htGhostTable>table)>colgroup>col,.handsontable :where(table.htCore,.htGhostTable>table)>colgroup>col.rowHeader{width:64px}.handsontable :where(table.htCore,.htGhostTable>table)>colgroup>col.hidden{width:0!important}.handsontable span.colHeader,.handsontable span.rowHeader{font-size:var(--ht-font-size);line-height:var(--ht-line-height);display:inline-block}.handsontable :where(table.htCore>thead,table.htCore>tbody,.htGhostTable>table>thead,.htGhostTable>table>tbody)>tr.hidden,.handsontable :where(table.htCore>thead,table.htCore>tbody,.htGhostTable>table>thead,.htGhostTable>table>tbody)>tr.hidden>td,.handsontable :where(table.htCore>thead,table.htCore>tbody,.htGhostTable>table>thead,.htGhostTable>table>tbody)>tr.hidden>th{display:none}.handsontable a:not(:where(table.htCore>tbody>tr>td:not(.htCustomMenuRenderer) :not(.htCheckboxRendererInput),.htGhostTable>table>tbody>tr>td:not(.htCustomMenuRenderer) :not(.htCheckboxRendererInput))){color:var(--ht-link-color)}.handsontable a:not(:where(table.htCore>tbody>tr>td:not(.htCustomMenuRenderer) :not(.htCheckboxRendererInput),.htGhostTable>table>tbody>tr>td:not(.htCustomMenuRenderer) :not(.htCheckboxRendererInput))):hover{color:var(--ht-link-hover-color)}.handsontable .ht_master table.htCore>thead,.handsontable .ht_master table.htCore>tbody>tr>th,.handsontable .ht_clone_inline_start table.htCore>thead,.handsontable .ht_clone_inline_end table.htCore>thead{visibility:hidden}.ht_master,.ht_clone_inline_start,.ht_clone_inline_end,.ht_clone_top,.ht_clone_bottom,.ht_master .wtHolder,.ht_clone_inline_start .wtHolder,.ht_clone_inline_end .wtHolder,.ht_clone_top .wtHolder,.ht_clone_bottom .wtHolder{overflow:hidden}.handsontable .ht_clone_inline_start .wtHolder,.handsontable .ht_clone_inline_end .wtHolder,.handsontable .ht_clone_top .wtHolder,.handsontable .ht_clone_bottom .wtHolder{overflow-anchor:none;scrollbar-width:none!important}.handsontable .ht_clone_inline_start .wtHolder::-webkit-scrollbar{display:none}.handsontable .ht_clone_inline_end .wtHolder::-webkit-scrollbar{display:none}.handsontable .ht_clone_top .wtHolder::-webkit-scrollbar{display:none}.handsontable .ht_clone_bottom .wtHolder::-webkit-scrollbar{display:none}.ht_clone_inline_start .wtHolder,.ht_clone_inline_end .wtHolder{overflow:hidden auto}.ht_clone_top .wtHolder,.ht_clone_bottom .wtHolder{overflow:auto hidden}.htScrollbarClearanceFillers{overflow-anchor:none;z-index:300;block-size:0;inline-size:0;position:sticky;inset-block-start:0;inset-inline-start:0}.htScrollbarClearanceFiller{background-color:var(--ht-scrollbar-track-color,var(--ht-background-color));pointer-events:none;box-sizing:border-box;position:absolute}.ht_master .wtHolder{overflow:auto}[dir=rtl].handsontable :where(table.htCore>tbody>tr,.htGhostTable>table>tbody>tr)>td[dir=ltr]{border-inline-width:1px 0}[dir=rtl].handsontable :where(table.htCore,.htGhostTable>table)>tbody>tr>td[dir=ltr]:last-child{border-inline-start-color:var(--ht-border-color)}[dir=rtl].handsontable div[class^=ht_clone] tbody .ht__highlight .relative:after{left:-1px;right:auto}.handsontable.ht-wrapper{border-radius:var(--ht-border-radius)}.handsontable.ht-wrapper:not(.htColumnHeaders) .ht_master .htCore>tbody>tr:first-child>td:first-child{border-start-start-radius:var(--ht-border-radius)}.handsontable.ht-wrapper:not(.htColumnHeaders) .ht_master .htCore>tbody>tr:first-child>td:last-child{border-start-end-radius:var(--ht-border-radius)}.handsontable.ht-wrapper:not(.htColumnHeaders) .ht_clone_top_inline_start_corner .htCore>tbody>tr:first-child>td:first-child{border-start-start-radius:var(--ht-border-radius)}.handsontable.ht-wrapper:not(.htColumnHeaders) .ht_clone_top_inline_end_corner .htCore>tbody>tr:first-child>td:last-child{border-start-end-radius:var(--ht-border-radius)}.handsontable.ht-wrapper:not(.htColumnHeaders) .ht_clone_top .htCore>tbody>tr:first-child>td:first-child{border-start-start-radius:var(--ht-border-radius)}.handsontable.ht-wrapper:not(.htColumnHeaders) .ht_clone_top .htCore>tbody>tr:first-child>td:last-child{border-start-end-radius:var(--ht-border-radius)}.handsontable.ht-wrapper:not(.htColumnHeaders) .ht_clone_inline_start .htCore>tbody>tr:first-child>th:first-child,.handsontable.ht-wrapper:not(.htColumnHeaders) .ht_clone_inline_start .htCore>tbody>tr:first-child>td:first-child{border-start-start-radius:var(--ht-border-radius)}.handsontable.ht-wrapper:not(.htColumnHeaders) .ht_clone_inline_end .htCore>tbody>tr:first-child>td:last-child{border-start-end-radius:var(--ht-border-radius)}.handsontable.ht-wrapper .ht_master .wtHolder,.handsontable.ht-wrapper .ht_master .htCore{border-radius:var(--ht-border-radius)}.handsontable.ht-wrapper .ht_master .htCore>thead>tr:first-child>th:first-child{border-start-start-radius:var(--ht-border-radius)}.handsontable.ht-wrapper .ht_master .htCore>thead>tr:first-child>th:not(.hiddenHeader).htLastVisibleHeader{border-start-end-radius:var(--ht-border-radius)}.handsontable.ht-wrapper .ht_master .htCore>thead>tr:last-child>th:first-child{border-end-start-radius:var(--ht-border-radius)}.handsontable.ht-wrapper .ht_master .htCore>thead>tr:last-child>th:not(.hiddenHeader).htLastVisibleHeader{border-end-end-radius:var(--ht-border-radius)}.handsontable.ht-wrapper .ht_master .htCore>tbody>tr:last-child>td:first-child{border-end-start-radius:var(--ht-border-radius)}.handsontable.ht-wrapper .ht_master .htCore>tbody>tr:last-child>td:last-child{border-end-end-radius:var(--ht-border-radius)}.handsontable.ht-wrapper .ht_clone_top_inline_start_corner .htCore,.handsontable.ht-wrapper .ht_clone_top_inline_start_corner .htCore>thead>tr:first-child>th:first-child{border-start-start-radius:var(--ht-border-radius)}.handsontable.ht-wrapper .ht_clone_top_inline_end_corner .htCore,.handsontable.ht-wrapper .ht_clone_top_inline_end_corner .htCore>thead>tr:first-child>th:last-child{border-start-end-radius:var(--ht-border-radius)}.handsontable.ht-wrapper .ht_clone_top .htCore{border-start-start-radius:var(--ht-border-radius);border-start-end-radius:var(--ht-border-radius)}.handsontable.ht-wrapper .ht_clone_top .htCore>thead>tr:first-child>th:first-child{border-start-start-radius:var(--ht-border-radius)}.handsontable.ht-wrapper .ht_clone_top .htCore>thead>tr:first-child>th:not(.hiddenHeader).htLastVisibleHeader{border-start-end-radius:var(--ht-border-radius)}.handsontable.ht-wrapper .ht_clone_inline_start .htCore{border-start-start-radius:var(--ht-border-radius);border-end-start-radius:var(--ht-border-radius)}.handsontable.ht-wrapper .ht_clone_inline_start .htCore>thead>tr:first-child>th:first-child{border-start-start-radius:var(--ht-border-radius)}.handsontable.ht-wrapper .ht_clone_inline_start .htCore>tbody>tr:last-child>th:first-child,.handsontable.ht-wrapper .ht_clone_inline_start .htCore>tbody>tr:last-child>td:first-child{border-end-start-radius:var(--ht-border-radius)}.handsontable.ht-wrapper .ht_clone_inline_end .htCore{border-start-end-radius:var(--ht-border-radius);border-end-end-radius:var(--ht-border-radius)}.handsontable.ht-wrapper .ht_clone_inline_end .htCore>thead>tr:first-child>th:last-child{border-start-end-radius:var(--ht-border-radius)}.handsontable.ht-wrapper .ht_clone_inline_end .htCore>tbody>tr:last-child>td:last-child{border-end-end-radius:var(--ht-border-radius)}.handsontable.ht-wrapper .ht_clone_bottom_inline_start_corner .htCore,.handsontable.ht-wrapper .ht_clone_bottom_inline_start_corner .htCore>:where(thead,tbody)>tr:last-child>th:first-child,.handsontable.ht-wrapper .ht_clone_bottom_inline_start_corner .htCore>:where(thead,tbody)>tr:last-child>td:first-child{border-end-start-radius:var(--ht-border-radius)}.handsontable.ht-wrapper .ht_clone_bottom_inline_end_corner .htCore,.handsontable.ht-wrapper .ht_clone_bottom_inline_end_corner .htCore>:where(thead,tbody)>tr:last-child>th:last-child,.handsontable.ht-wrapper .ht_clone_bottom_inline_end_corner .htCore>:where(thead,tbody)>tr:last-child>td:last-child{border-end-end-radius:var(--ht-border-radius)}.handsontable.ht-wrapper .ht_clone_bottom .htCore{border-end-end-radius:var(--ht-border-radius);border-end-start-radius:var(--ht-border-radius)}.handsontable.ht-wrapper .ht_clone_bottom .htCore>:where(thead,tbody)>tr:last-child>th:first-child,.handsontable.ht-wrapper .ht_clone_bottom .htCore>:where(thead,tbody)>tr:last-child>td:first-child{border-end-start-radius:var(--ht-border-radius)}.handsontable.ht-wrapper .ht_clone_bottom .htCore>:where(thead,tbody)>tr:last-child>th:last-child,.handsontable.ht-wrapper .ht_clone_bottom .htCore>:where(thead,tbody)>tr:last-child>td:last-child{border-end-end-radius:var(--ht-border-radius)}.handsontable.ht-wrapper.htHasScrollX:not(.htHorizontallyScrollableByWindow) .htCore{border-end-end-radius:0;border-end-start-radius:0}.handsontable.ht-wrapper.htHasScrollX:not(.htHorizontallyScrollableByWindow) .htCore>thead>tr:last-child>th:first-child,.handsontable.ht-wrapper.htHasScrollX:not(.htHorizontallyScrollableByWindow) .htCore>tbody>tr:last-child>td:first-child,.handsontable.ht-wrapper.htHasScrollX:not(.htHorizontallyScrollableByWindow) .htCore>tbody>tr:last-child>th:first-child{border-end-start-radius:0}.handsontable.ht-wrapper.htHasScrollX:not(.htHorizontallyScrollableByWindow) .htCore>thead>tr:last-child>th:not(.hiddenHeader).htLastVisibleHeader,.handsontable.ht-wrapper.htHasScrollX:not(.htHorizontallyScrollableByWindow) .htCore>tbody>tr:last-child>td:last-child,.handsontable.ht-wrapper.htHasScrollX:not(.htHorizontallyScrollableByWindow) .htCore>tbody>tr:last-child>th:last-child{border-end-end-radius:0}.handsontable.ht-wrapper.htHasScrollY:not(.htVerticallyScrollableByWindow) .htCore{border-start-end-radius:0;border-end-end-radius:0}.handsontable.ht-wrapper.htHasScrollY:not(.htVerticallyScrollableByWindow) .htCore>thead>tr:first-child>th:not(.hiddenHeader).htLastVisibleHeader,.handsontable.ht-wrapper.htHasScrollY:not(.htVerticallyScrollableByWindow) .htCore>tbody>tr:first-child>td:last-child,.handsontable.ht-wrapper.htHasScrollY:not(.htVerticallyScrollableByWindow) .htCore>tbody>tr:first-child>th:last-child{border-start-end-radius:0}.handsontable.ht-wrapper.htHasScrollY:not(.htVerticallyScrollableByWindow) .htCore>thead>tr:last-child>th:not(.hiddenHeader).htLastVisibleHeader,.handsontable.ht-wrapper.htHasScrollY:not(.htVerticallyScrollableByWindow) .htCore>tbody>tr:last-child>td:last-child,.handsontable.ht-wrapper.htHasScrollY:not(.htVerticallyScrollableByWindow) .htCore>tbody>tr:last-child>th:last-child{border-end-end-radius:0}.ht-root-wrapper{border-radius:var(--ht-border-radius)}.ht-root-wrapper.ht-slot-bottom-filled .ht-wrapper,.ht-root-wrapper.ht-slot-bottom-filled .ht_master .wtHolder{border-end-end-radius:0;border-end-start-radius:0}.ht-root-wrapper.ht-slot-bottom-filled .htCore{border-end-end-radius:0!important;border-end-start-radius:0!important}.ht-root-wrapper.ht-slot-bottom-filled .htCore>thead>tr:last-child>th:first-child,.ht-root-wrapper.ht-slot-bottom-filled .htCore>tbody>tr:last-child>td:first-child,.ht-root-wrapper.ht-slot-bottom-filled .htCore>tbody>tr:last-child>th:first-child{border-end-start-radius:0!important}.ht-root-wrapper.ht-slot-bottom-filled .htCore>thead>tr:last-child>th:not(.hiddenHeader).htLastVisibleHeader,.ht-root-wrapper.ht-slot-bottom-filled .htCore>tbody>tr:last-child>td:last-child,.ht-root-wrapper.ht-slot-bottom-filled .htCore>tbody>tr:last-child>th:last-child{border-end-end-radius:0!important}.ht-root-wrapper.ht-slot-top-filled .ht-wrapper,.ht-root-wrapper.ht-slot-top-filled .ht_master .wtHolder{border-start-start-radius:0;border-start-end-radius:0}.ht-root-wrapper.ht-slot-top-filled .htCore{border-start-start-radius:0!important;border-start-end-radius:0!important}.ht-root-wrapper.ht-slot-top-filled .htCore>thead>tr:first-child>th:first-child,.ht-root-wrapper.ht-slot-top-filled .htCore>tbody>tr:first-child>td:first-child,.ht-root-wrapper.ht-slot-top-filled .htCore>tbody>tr:first-child>th:first-child{border-start-start-radius:0!important}.ht-root-wrapper.ht-slot-top-filled .htCore>thead>tr:first-child>th:not(.hiddenHeader).htLastVisibleHeader,.ht-root-wrapper.ht-slot-top-filled .htCore>tbody>tr:first-child>td:last-child,.ht-root-wrapper.ht-slot-top-filled .htCore>tbody>tr:first-child>th:last-child{border-start-end-radius:0!important}.ht-root-wrapper .ht-slot-element{border-radius:var(--ht-border-radius)}.ht-root-wrapper .ht-slot-bottom>.ht-slot-element:not(:last-of-type){border-radius:0}.ht-root-wrapper .ht-slot-bottom>.ht-slot-element:last-of-type{border-start-start-radius:0;border-start-end-radius:0}.ht-root-wrapper .ht-slot-top>.ht-slot-element:not(:first-of-type){border-radius:0}.ht-root-wrapper .ht-slot-top>.ht-slot-element:first-of-type{border-end-end-radius:0;border-end-start-radius:0}.handsontable.mobile,.handsontable.mobile .wtHolder{-webkit-user-select:none;user-select:none;-webkit-tap-highlight-color:#0000;-webkit-overflow-scrolling:touch}.handsontable.mobile .handsontableInput:focus{box-shadow:inset 0 0 0 2px var(--ht-accent-color);-webkit-appearance:none}.handsontable .topSelectionHandle,.handsontable .topSelectionHandle-HitArea,.handsontable .bottomSelectionHandle,.handsontable .bottomSelectionHandle-HitArea{z-index:9999;inset-inline-start:-10000px;inset-inline-end:unset;top:-10000px}.handsontable.hide-tween{animation:.2s forwards opacity-hide}.handsontable.show-tween{animation:.3s forwards opacity-show}.ht_master{z-index:0}.ht_clone_master{z-index:100}.ht_clone_inline_start,.ht_clone_inline_end{z-index:120}.ht_clone_bottom{z-index:130}.ht_clone_bottom_inline_start_corner,.ht_clone_bottom_inline_end_corner{z-index:150}.ht_clone_top{z-index:160}.ht_clone_top_inline_start_corner,.ht_clone_top_inline_end_corner{z-index:180}.ht_editor_hidden{z-index:-1}.ht_editor_visible{z-index:200}.handsontable td.area{position:relative}.handsontable td.area:before{content:"";background:var(--ht-cell-selection-background-color,#1a42e8);position:absolute;inset:0}.handsontable td.area-1{position:relative}.handsontable td.area-1:before{content:"";background:var(--ht-cell-selection-background-color,#1a42e8);position:absolute;inset:0}.handsontable td.area-2{position:relative}.handsontable td.area-2:before{content:"";background:var(--ht-cell-selection-background-color,#1a42e8);position:absolute;inset:0}.handsontable td.area-3{position:relative}.handsontable td.area-3:before{content:"";background:var(--ht-cell-selection-background-color,#1a42e8);position:absolute;inset:0}.handsontable td.area-4{position:relative}.handsontable td.area-4:before{content:"";background:var(--ht-cell-selection-background-color,#1a42e8);position:absolute;inset:0}.handsontable td.area-5{position:relative}.handsontable td.area-5:before{content:"";background:var(--ht-cell-selection-background-color,#1a42e8);position:absolute;inset:0}.handsontable td.area-6{position:relative}.handsontable td.area-6:before{content:"";background:var(--ht-cell-selection-background-color,#1a42e8);position:absolute;inset:0}.handsontable td.area-7{position:relative}.handsontable td.area-7:before{content:"";background:var(--ht-cell-selection-background-color,#1a42e8);position:absolute;inset:0}.handsontable td.area:before{opacity:.14}.handsontable td.area-1:before{opacity:.21}.handsontable td.area-2:before{opacity:.28}.handsontable td.area-3:before{opacity:.35}.handsontable td.area-4:before{opacity:.42}.handsontable td.area-5:before{opacity:.49}.handsontable td.area-6:before{opacity:.56}.handsontable td.area-7:before{opacity:.63}.handsontable td.area{border-color:color-mix(in srgb,var(--ht-border-color),var(--ht-foreground-color)10%)}.handsontable .wtSelectionHandle{box-sizing:border-box;z-index:115;background:var(--ht-cell-selection-handle-background-color);border:var(--ht-cell-selection-handle-border-width)solid var(--ht-cell-selection-handle-border-color);border-radius:var(--ht-cell-selection-handle-border-radius);animation:ht-selection-handle-fade-in var(--ht-table-transition)ease-in-out backwards;position:absolute}.handsontable .wtSelectionHandle:hover{background:color-mix(in srgb,var(--ht-cell-selection-handle-border-color)30%,var(--ht-cell-selection-handle-background-color))}@media (prefers-reduced-motion:reduce){.handsontable .wtSelectionHandle{animation:none}}.handsontable .wtSelectionHandle--top,.handsontable .wtSelectionHandle--bottom{width:var(--ht-cell-selection-handle-length);height:var(--ht-cell-selection-handle-size);cursor:ns-resize}.handsontable .wtSelectionHandle--start,.handsontable .wtSelectionHandle--end{width:var(--ht-cell-selection-handle-size);height:var(--ht-cell-selection-handle-length);cursor:ew-resize}.handsontable.ht__resizing-selection--top .wtSelectionHandle:not(.wtSelectionHandle--top),.handsontable.ht__resizing-selection--bottom .wtSelectionHandle:not(.wtSelectionHandle--bottom),.handsontable.ht__resizing-selection--start .wtSelectionHandle:not(.wtSelectionHandle--start),.handsontable.ht__resizing-selection--end .wtSelectionHandle:not(.wtSelectionHandle--end){display:none!important}.handsontable.ht__resizing-selection--top,.handsontable.ht__resizing-selection--top *,.handsontable.ht__resizing-selection--bottom,.handsontable.ht__resizing-selection--bottom *{cursor:ns-resize!important}.handsontable.ht__resizing-selection--start,.handsontable.ht__resizing-selection--start *,.handsontable.ht__resizing-selection--end,.handsontable.ht__resizing-selection--end *{cursor:ew-resize!important}.handsontable.ht__resizing-selection--top .wtSelectionHandle--top,.handsontable.ht__resizing-selection--bottom .wtSelectionHandle--bottom,.handsontable.ht__resizing-selection--start .wtSelectionHandle--start,.handsontable.ht__resizing-selection--end .wtSelectionHandle--end{background:color-mix(in srgb,var(--ht-cell-selection-handle-border-color)30%,var(--ht-cell-selection-handle-background-color))}.handsontable .wtMoveZone{cursor:grab}.handsontable .wtMoveZone:active,.handsontable.ht__moving{cursor:grabbing}.handsontable.ht__moving *{cursor:grabbing!important}.handsontable.ht__moving .wtBorder.area,.handsontable.ht__moving .wtBorder.current{display:none!important}.handsontable.ht__moving .wtSelectionHandle,.handsontable.ht__moving .wtMoveZone{visibility:hidden!important}.handsontable .wtBorder{font-size:0;position:absolute}.handsontable .wtBorder:first-child,.handsontable .wtBorder:nth-child(3){z-index:2}.handsontable .wtBorder:nth-child(2),.handsontable .wtBorder:nth-child(4){z-index:1}.handsontable .wtBorder.hidden{display:none!important}.handsontable .wtBorder.current{z-index:10;background-color:var(--ht-cell-selection-border-color)!important}.handsontable .wtBorder.area{z-index:8;background-color:var(--ht-cell-selection-border-color)!important}.handsontable .wtBorder.fill{z-index:6;background-color:var(--ht-cell-autofill-fill-border-color,#68696c)!important}.handsontable .wtBorder.corner{cursor:crosshair;z-index:110;font-size:0;border-radius:var(--ht-cell-autofill-border-radius)!important;background-color:var(--ht-cell-autofill-background-color,#1a42e8)!important;border-color:var(--ht-cell-autofill-border-color)!important}.handsontable .wtBorder.corner:after{content:"";border-radius:var(--ht-cell-autofill-border-radius);inset:min(0px,(var(--ht-cell-autofill-size) - var(--ht-cell-autofill-hit-area-size))/2);background:0 0;position:absolute}.handsontable .wtBorder.corner.wtCornerInlineEndEdge:after{inset-inline-end:0}.handsontable .wtBorder.corner.wtCornerBlockEndEdge:after{inset-block-end:0}@media print{.handsontable .wtBorder.current,.handsontable .wtBorder.area,.handsontable .wtBorder.fill,.handsontable .wtBorder.corner,.handsontable .wtSelectionHandle,.handsontable .topSelectionHandle,.handsontable .bottomSelectionHandle,.handsontable .topSelectionHandle-HitArea,.handsontable .bottomSelectionHandle-HitArea,.handsontable .wtMoveZone,.handsontable td.area:before{display:none!important}}@keyframes ht-selection-handle-fade-in{0%{opacity:0}to{opacity:1}}.hot-display-license-info{font-family:var(--ht-font-family),-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;padding:var(--ht-license-vertical-padding,16px)var(--ht-license-horizontal-padding,16px);font-size:var(--ht-font-size-small);line-height:var(--ht-line-height-small);color:var(--ht-license-foreground-color);background-color:var(--ht-license-background-color,#f7f7f9);text-align:left;min-width:300px}.hot-display-license-info a{font-size:var(--ht-license-font-size);color:var(--ht-link-color)}.hot-display-license-info a:hover{color:var(--ht-link-hover-color)}.ht-license-badge-wrapper{z-index:1050;pointer-events:none;position:absolute;inset:0;overflow:hidden}.ht-license-badge-on .ht-license-badge-corner thead tr:first-child th:first-child:after{content:"";inline-size:min(var(--ht-license-badge-size,16px),100%);block-size:min(var(--ht-license-badge-size,16px),100%);background-color:var(--ht-license-badge-color,var(--ht-disabled-color,#a3a3a3));pointer-events:none;background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg width=%2711.1415%27 height=%2716%27 viewBox=%270 0 11.1415 16%27 fill=%27none%27 xmlns=%27http://www.w3.org/2000/svg%27%3E%3Cpath d=%27M7.96408 12.8226H11.1415V16H7.96408V12.8226Z%27 fill=%27%231A42E8%27/%3E%3C/svg%3E");background-position:50%;background-repeat:no-repeat;background-size:contain;margin:auto;position:absolute;inset:0;inset-inline-start:clamp(0px,100% - var(--ht-license-badge-size,16px),6px);mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg width=%2711.1415%27 height=%2716%27 viewBox=%270 0 11.1415 16%27 fill=%27none%27 xmlns=%27http://www.w3.org/2000/svg%27%3E%3Cpath d=%27M4.61799e-05 3.17744H2.06687V7.04929H5.89738V3.17744H7.96421V12.8226H5.89738V8.84054H2.06687V12.8226H4.61799e-05V3.17744Z%27 fill=%27%23000%27/%3E%3Cpath d=%27M7.96408 12.8226H11.1415V16H7.96408V12.8226Z%27 fill=%27%23000%27/%3E%3C/svg%3E");mask-position:50%;mask-size:contain;mask-repeat:no-repeat}.ht-license-badge-on .ht-license-badge-corner thead tr:first-child th:first-child:hover:after{background-color:var(--ht-license-badge-hover-color,var(--ht-read-only-color,#68696c))}[dir=rtl] .ht-license-badge-on .ht-license-badge-corner thead tr:first-child th:first-child:after{inset-inline-start:0;inset-inline-end:clamp(0px,100% - var(--ht-license-badge-size,16px),6px)}.ht-license-badge{clip-path:inset(50%);white-space:nowrap;color:#0000;background:0 0;border:0;block-size:1px;inline-size:1px;margin:0;padding:0;position:absolute;inset-block-start:0;inset-inline-start:0;overflow:hidden}.ht-license-popover{font-family:var(--ht-font-family),-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;z-index:1051;inline-size:auto;max-inline-size:min(var(--ht-license-popover-width,320px),100vw - 32px);border-radius:var(--ht-border-radius,8px);background-color:var(--ht-license-popover-background-color,#16171a);max-block-size:100%;color:var(--ht-license-popover-foreground-color,#fff);font-size:var(--ht-font-size-small,12px);line-height:var(--ht-line-height-small,18px);text-align:start;pointer-events:auto;box-shadow:var(--ht-shadow-x,0)var(--ht-shadow-y,0)var(--ht-shadow-blur,8px)color-mix(in srgb,var(--ht-shadow-color,#000)var(--ht-shadow-opacity,100%),transparent);border-start-start-radius:0;flex-direction:column;padding:16px;display:none;position:absolute;inset-block-start:0;inset-inline-start:var(--ht-license-badge-area-width,50px);inset-inline-end:0;overflow:visible}.ht-license-popover:before{content:"";border-block-start:var(--ht-license-popover-tail-size,5px)solid var(--ht-license-popover-background-color,#16171a);border-inline-start:var(--ht-license-popover-tail-size,5px)solid #0000;block-size:0;inline-size:0;position:absolute;inset-block-start:0;inset-inline-end:100%}.ht-license-popover__content{min-block-size:0;overflow-y:auto}.ht-license-badge-wrapper.is-corner-hover:not(.is-dismissed) .ht-license-popover,.ht-license-badge-wrapper:not(.is-dismissed):hover .ht-license-popover,.ht-license-popover.is-open{display:flex}.ht-license-badge-wrapper.is-cornerless .ht-license-badge{display:none}.ht-license-badge-wrapper.is-cornerless .ht-license-popover{border-start-start-radius:var(--ht-border-radius,8px);inset-inline-start:0}.ht-license-badge-wrapper.is-cornerless .ht-license-popover:before{display:none}.ht-license-popover__title{margin-block-end:8px;padding-inline-end:16px;font-weight:700}.ht-license-popover__body{color:var(--ht-license-popover-body-color,#d5d6d8);margin:0 0 12px}.ht-license-popover__link{color:var(--ht-license-popover-link-color,#3ba0ff);text-decoration:none}.ht-license-popover__link:hover{text-decoration:underline}.ht-license-popover__close{block-size:20px;inline-size:20px;color:inherit;cursor:pointer;background:0 0;border:0;justify-content:center;align-items:center;padding:0;line-height:1;display:flex;position:absolute;inset-block-start:12px;inset-inline-end:12px}.ht-license-popover__close:before{content:"\u2715";font-size:14px}.ht-dialog.ht-license-lock{z-index:1070}.ht-dialog.ht-license-lock:before{content:"";block-size:calc(var(--ht-line-height,20px) + var(--ht-density-cell-vertical,4px)*2);background-color:var(--ht-header-background-color);border-block-end:1px solid var(--ht-cell-horizontal-border-color,var(--ht-border-color));position:absolute;inset-block-start:0;inset-inline:0}.ht-dialog.ht-license-lock:after{content:"";inline-size:calc(var(--ht-license-badge-size,16px)*.696344);block-size:var(--ht-license-badge-size,16px);background-color:var(--ht-license-badge-color,var(--ht-disabled-color,#a3a3a3));position:absolute;inset-block-start:calc(var(--ht-density-cell-vertical,4px) + (var(--ht-line-height,20px) - var(--ht-license-badge-size,16px))/2);inset-inline-start:var(--ht-cell-horizontal-padding,8px);mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg width=%2711.1415%27 height=%2716%27 viewBox=%270 0 11.1415 16%27 fill=%27none%27 xmlns=%27http://www.w3.org/2000/svg%27%3E%3Cpath d=%27M4.61799e-05 3.17744H2.06687V7.04929H5.89738V3.17744H7.96421V12.8226H5.89738V8.84054H2.06687V12.8226H4.61799e-05V3.17744Z%27 fill=%27%23000%27/%3E%3Cpath d=%27M7.96408 12.8226H11.1415V16H7.96408V12.8226Z%27 fill=%27%23000%27/%3E%3C/svg%3E");mask-size:contain;mask-repeat:no-repeat}.ht-dialog.ht-license-lock .ht-dialog__content-wrapper{padding-block-start:calc(var(--ht-line-height,20px) + var(--ht-density-cell-vertical,4px)*2)}.ht-dialog.ht-license-lock .ht-dialog__content-wrapper-inner,.ht-dialog.ht-license-lock .ht-dialog__content{min-inline-size:0}.ht-dialog.ht-license-lock a.ht-button{text-decoration:none;display:inline-block}.ht-dialog.ht-license-lock .ht-dialog__title,.ht-dialog.ht-license-lock .ht-dialog__description{word-break:break-word;overflow-wrap:break-word}.ht-license-powered-by{font-family:var(--ht-font-family),-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;padding:var(--ht-license-vertical-padding,8px)var(--ht-license-horizontal-padding,16px);font-size:var(--ht-font-size-small,12px);line-height:var(--ht-line-height-small,18px);color:var(--ht-license-foreground-color,#222);background-color:var(--ht-license-background-color,#f7f7f9);text-align:start;align-items:center;display:flex}.ht-license-powered-by .ht-license-powered-by__link{color:inherit;align-items:flex-start;gap:8px;text-decoration:none;display:inline-flex}.ht-license-powered-by .ht-license-powered-by__link:hover{color:inherit;text-decoration:none}.ht-license-powered-by .ht-license-powered-by__link:focus-visible{outline:2px solid var(--ht-accent-color);outline-offset:2px}.ht-license-powered-by__logo{block-size:16px;inline-size:11.1415px;background-color:light-dark(#000,#fff);background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg width=%2711.1415%27 height=%2716%27 viewBox=%270 0 11.1415 16%27 fill=%27none%27 xmlns=%27http://www.w3.org/2000/svg%27%3E%3Cpath d=%27M7.96408 12.8226H11.1415V16H7.96408V12.8226Z%27 fill=%27%231A42E8%27/%3E%3C/svg%3E");background-position:50%;background-repeat:no-repeat;background-size:contain;flex-shrink:0;margin-block-start:max(0px,(var(--ht-line-height-small,18px) - 16px)/2);mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg width=%2711.1415%27 height=%2716%27 viewBox=%270 0 11.1415 16%27 fill=%27none%27 xmlns=%27http://www.w3.org/2000/svg%27%3E%3Cpath d=%27M4.61799e-05 3.17744H2.06687V7.04929H5.89738V3.17744H7.96421V12.8226H5.89738V8.84054H2.06687V12.8226H4.61799e-05V3.17744Z%27 fill=%27%23000%27/%3E%3Cpath d=%27M7.96408 12.8226H11.1415V16H7.96408V12.8226Z%27 fill=%27%23000%27/%3E%3C/svg%3E");mask-position:50%;mask-size:contain;mask-repeat:no-repeat}@media (forced-colors:active){.ht-license-powered-by__logo{forced-color-adjust:none;background-color:canvastext;background-image:none}}.handsontable td a.ht-link{color:var(--ht-link-color);text-decoration:underline}.handsontable td a.ht-link:hover{color:var(--ht-link-hover-color)}.handsontable td a.ht-link .ht-link-scheme{display:none}.ht-icon{width:var(--ht-icon-size);height:var(--ht-icon-size);vertical-align:middle;text-indent:0;pointer-events:none;flex-shrink:0;display:inline-block}.ht-icon.ht-icon--external{font-size:var(--ht-icon-size);text-align:center;background-color:#0000;line-height:1;mask-image:none}.ht-icon--flip-rtl:dir(rtl){transform:scaleX(-1)}.handsontable .htAutocompleteArrow{cursor:default;width:var(--ht-icon-size);height:var(--ht-icon-size);float:right;top:calc((var(--ht-line-height) - var(--ht-icon-size))/2);margin-inline-start:calc(var(--ht-gap-size)*2);margin-inline-end:1px;font-size:0;position:relative}.handsontable .htAutocompleteArrow .ht-icon{opacity:.6;position:absolute;top:0;left:0}.handsontable td.htAutocomplete{padding-inline-end:calc(var(--ht-cell-horizontal-padding) + var(--ht-icon-size) + var(--ht-gap-size)*2 + 1px);position:relative}.handsontable td.htAutocomplete .htAutocompleteArrow{float:none;inset-inline-end:calc(var(--ht-cell-horizontal-padding) + 1px);top:calc(var(--ht-cell-vertical-padding) + (var(--ht-line-height) - var(--ht-icon-size))/2);margin:0;position:absolute}.handsontable td.htAutocomplete.htMiddle .htAutocompleteArrow{top:50%;transform:translateY(-50%)}.handsontable td.htAutocomplete.htBottom .htAutocompleteArrow{top:auto;inset-block-end:calc(var(--ht-cell-vertical-padding) + (var(--ht-line-height) - var(--ht-icon-size))/2)}.handsontable tr.htExactRow>td.htAutocomplete>.htCellClip{padding-inline-end:calc(var(--ht-icon-size) + var(--ht-gap-size)*2 + 1px)}.handsontable tr.htExactRow>td.htAutocomplete>.htCellClip .htAutocompleteArrow{inset-inline-end:1px;top:calc((var(--ht-line-height) - var(--ht-icon-size))/2)}.handsontable tr.htExactRow>td.htAutocomplete.htMiddle>.htCellClip .htAutocompleteArrow{top:50%;transform:translateY(-50%)}.handsontable tr.htExactRow>td.htAutocomplete.htBottom>.htCellClip .htAutocompleteArrow{top:auto;inset-block-end:calc((var(--ht-line-height) - var(--ht-icon-size))/2)}[dir=rtl].handsontable .htAutocompleteArrow{float:left}.handsontable .htCheckboxRendererInput{width:var(--ht-checkbox-size);height:var(--ht-checkbox-size);vertical-align:middle;cursor:pointer;appearance:none;margin:0;outline:none;margin-top:-2px;display:inline-block;position:relative}.handsontable .htCheckboxRendererInput:before{content:"";width:var(--ht-checkbox-size);height:var(--ht-checkbox-size);border-radius:var(--ht-checkbox-border-radius);border:1px solid var(--ht-checkbox-border-color);background-color:var(--ht-checkbox-background-color);box-sizing:border-box;pointer-events:none;transition:all var(--ht-table-transition)ease-in-out;display:inline-block;position:absolute;top:0;left:0}.handsontable .htCheckboxRendererInput+.ht-icon{color:var(--ht-checkbox-icon-color)}.handsontable .htCheckboxRendererInput:checked:before{border-color:var(--ht-checkbox-checked-border-color);background-color:var(--ht-checkbox-checked-background-color)}.handsontable .htCheckboxRendererInput:checked+.ht-icon{color:var(--ht-checkbox-checked-icon-color)}.handsontable .htCheckboxRendererInput:checked:disabled:before{border-color:var(--ht-checkbox-checked-disabled-border-color);background-color:var(--ht-checkbox-checked-disabled-background-color)}.handsontable .htCheckboxRendererInput:checked:disabled+.ht-icon{color:var(--ht-checkbox-checked-disabled-icon-color)}.handsontable .htCheckboxRendererInput:checked:focus:before{border-color:var(--ht-checkbox-checked-focus-border-color);background-color:var(--ht-checkbox-checked-focus-background-color)}.handsontable .htCheckboxRendererInput:checked:focus+.ht-icon{color:var(--ht-checkbox-checked-focus-icon-color)}.handsontable .htCheckboxRendererInput:focus:before{border-color:var(--ht-checkbox-focus-border-color);background-color:var(--ht-checkbox-focus-background-color);outline:1px solid var(--ht-checkbox-focus-ring-color)}.handsontable .htCheckboxRendererInput:focus+.ht-icon{color:var(--ht-checkbox-focus-icon-color)}.handsontable .htCheckboxRendererInput:disabled{cursor:initial;pointer-events:none}.handsontable .htCheckboxRendererInput:disabled:before{border-color:var(--ht-checkbox-disabled-border-color);background-color:var(--ht-checkbox-disabled-background-color)}.handsontable .htCheckboxRendererInput:disabled+.ht-icon{color:var(--ht-checkbox-disabled-icon-color)}.handsontable .htCheckboxRendererInput:indeterminate:before{border-color:var(--ht-checkbox-indeterminate-border-color);background-color:var(--ht-checkbox-indeterminate-background-color)}.handsontable .htCheckboxRendererInput:indeterminate+.ht-icon{color:var(--ht-checkbox-indeterminate-icon-color)}.handsontable .htCheckboxRendererInput:indeterminate:disabled:before{border-color:var(--ht-checkbox-indeterminate-disabled-border-color);background-color:var(--ht-checkbox-indeterminate-disabled-background-color)}.handsontable .htCheckboxRendererInput:indeterminate:disabled+.ht-icon{color:var(--ht-checkbox-indeterminate-disabled-icon-color)}.handsontable .htCheckboxRendererInput:indeterminate:focus:before{border-color:var(--ht-checkbox-indeterminate-focus-border-color);background-color:var(--ht-checkbox-indeterminate-focus-background-color)}.handsontable .htCheckboxRendererInput:indeterminate:focus+.ht-icon{color:var(--ht-checkbox-indeterminate-focus-icon-color)}.handsontable .htCheckboxRendererInput.noValue,.handsontable .htCheckboxRendererInput.noValue+.ht-icon{opacity:.5}.handsontable .htCheckboxRendererBox{width:var(--ht-checkbox-size);height:var(--ht-checkbox-size);vertical-align:middle;margin:-2px 0 0;line-height:0;display:inline-block;position:relative}.handsontable .htCheckboxRendererBox:first-child{margin-inline-end:var(--ht-gap-size)}.handsontable .htCheckboxRendererBox:last-child{margin-inline-start:var(--ht-gap-size)}.handsontable .htCheckboxRendererBox>.htCheckboxRendererInput{margin:0;display:block}.handsontable .htCheckboxRendererBox>.ht-icon{z-index:1;width:var(--ht-checkbox-size);height:var(--ht-checkbox-size);margin:0;position:absolute;inset:0}.handsontable :not(.htCheckboxRendererBox)>.htCheckboxRendererInput:not(:first-child){margin-inline-start:var(--ht-gap-size)}.handsontable :not(.htCheckboxRendererBox)>.htCheckboxRendererInput+.ht-icon{z-index:1;width:var(--ht-checkbox-size);height:var(--ht-checkbox-size);vertical-align:middle;margin-inline-start:calc(-1*var(--ht-checkbox-size));margin-top:-2px;position:relative}.handsontable :not(.htCheckboxRendererBox)>.htCheckboxRendererInput+.ht-icon:not(:last-child){margin-inline-end:var(--ht-gap-size)}.handsontable :not(.htCheckboxRendererBox)>.htCheckboxRendererInput:first-child:nth-last-child(2){margin-inline-start:var(--ht-gap-size)}.handsontable :not(.htCheckboxRendererBox)>.htCheckboxRendererInput:first-child:nth-last-child(2)+.ht-icon{margin-inline-end:var(--ht-gap-size)}.handsontable .htCheckboxRendererLabel{font-size:inherit;line-height:inherit;cursor:pointer;color:inherit;margin:0;display:inline-block;position:relative}.handsontable .htCheckboxRendererLabel.fullWidth{width:100%}.handsontable .htPlaceholder{color:var(--ht-placeholder-color)}.handsontable .htDimmed{color:var(--ht-read-only-color)!important;background-color:var(--ht-cell-read-only-background-color)!important}.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 .htInvalid{background-color:var(--ht-cell-error-background-color)!important}.handsontable .htNoWrap{white-space:nowrap}.handsontable .htSearchResult{background-color:var(--ht-cell-success-background-color)!important}.handsontable .ht-multi-select-renderer{padding:var(--ht-cell-vertical-padding)var(--ht-cell-horizontal-padding);overflow:hidden}.handsontable .ht-multi-select-arrow{cursor:default;width:var(--ht-icon-size);height:var(--ht-icon-size);float:right;top:calc((var(--ht-line-height) - var(--ht-icon-size))/2);font-size:0;line-height:inherit;font-weight:inherit;letter-spacing:inherit;margin-inline-start:calc(var(--ht-gap-size)*2);margin-inline-end:1px;font-family:inherit;position:relative}.handsontable .ht-multi-select-arrow .ht-icon{opacity:.6;position:absolute;top:0;left:0}.handsontable .ht-multi-select-chips-container{align-items:center;gap:var(--ht-gap-size);flex-wrap:nowrap;max-width:100%;display:flex;overflow:hidden}.handsontable .ht-multi-select-chip{align-items:center;gap:var(--ht-gap-size);padding:var(--ht-chip-vertical-padding)calc((var(--ht-line-height) - var(--ht-icon-size))/2)var(--ht-chip-vertical-padding)var(--ht-chip-horizontal-padding);border-radius:var(--ht-chip-border-radius);background:var(--ht-chip-background);white-space:nowrap;box-sizing:border-box;max-width:100px;font-size:inherit;line-height:inherit;font-weight:inherit;letter-spacing:inherit;flex-shrink:0;font-family:inherit;display:inline-flex}.handsontable .ht-multi-select-chip-label{text-overflow:ellipsis;color:var(--ht-foreground-color);padding:0 var(--ht-chip-gap);font-style:normal;font-size:inherit;line-height:inherit;font-weight:inherit;letter-spacing:inherit;font-family:inherit;overflow:hidden}.handsontable .ht-multi-select-chip-remove{cursor:pointer;color:var(--ht-icon-button-icon-color);font-size:inherit;line-height:inherit;font-weight:inherit;letter-spacing:inherit;background-position:50%;background-repeat:no-repeat;background-size:contain;flex-shrink:0;justify-content:center;align-items:center;padding:0;font-family:inherit;display:flex;position:relative;width:var(--ht-icon-size)!important;height:var(--ht-icon-size)!important}.handsontable .ht-multi-select-chip-remove .ht-icon{position:absolute;top:0;left:0}.handsontable .ht-multi-select-chip-remove:hover{background-color:var(--ht-icon-button-hover-background-color)}.handsontable .ht-multi-select-overflow{padding:var(--ht-chip-vertical-padding)var(--ht-chip-horizontal-padding);background:var(--ht-chip-background);border-radius:var(--ht-chip-border-radius);color:var(--ht-foreground-color);white-space:nowrap;font-size:inherit;line-height:inherit;font-weight:inherit;letter-spacing:inherit;flex-shrink:0;justify-content:center;align-items:center;font-family:inherit;display:inline-flex}[dir=rtl].handsontable .ht-multi-select-arrow{float:left}.handsontableInputHolder{position:absolute;top:0;left:0}.handsontableInputHolder .handsontableInput{padding:calc(var(--ht-cell-vertical-padding,4px) + 1px)calc(var(--ht-cell-horizontal-padding,8px) + 1px);color:var(--ht-cell-editor-foreground-color);background-color:var(--ht-cell-editor-background-color,#fff);box-shadow:inset 0 0 0 var(--ht-cell-editor-border-width,2px)var(--ht-cell-editor-border-color,#1a42e8),0 0 var(--ht-cell-editor-shadow-blur-radius,0)0 var(--ht-cell-editor-shadow-color,transparent);box-sizing:border-box;border:none;border-radius:0;outline-width:0;margin:0;display:block;font-family:inherit!important;font-size:inherit!important;line-height:inherit!important;-webkit-appearance:none!important}.handsontableInputHolder .handsontableInput:focus{outline:none}.htSelectEditor{position:absolute}.htSelectEditor select{width:100%;height:100%;padding:calc(var(--ht-cell-vertical-padding,4px) + 1px)calc(var(--ht-cell-horizontal-padding,8px) + 1px);white-space:nowrap;text-overflow:ellipsis;color:var(--ht-cell-editor-foreground-color);background-color:var(--ht-cell-editor-background-color,#fff);box-shadow:inset 0 0 0 var(--ht-cell-editor-border-width,2px)var(--ht-cell-editor-border-color,#1a42e8),0 0 var(--ht-cell-editor-shadow-blur-radius,0)0 var(--ht-cell-editor-shadow-color,transparent);box-sizing:border-box;border:none;border-radius:0;margin:0;padding-inline-end:26px;position:absolute;inset:0;overflow:hidden;font-family:inherit!important;font-size:inherit!important;line-height:inherit!important;-webkit-appearance:none!important}.htSelectEditor select:focus{outline:none}.htSelectEditor .htAutocompleteArrow{z-index:1;pointer-events:none;margin-inline-end:4px;top:50%;transform:translateY(-50%)}.handsontable.listbox{box-shadow:var(--ht-menu-shadow-x,0)var(--ht-menu-shadow-y,0)var(--ht-menu-shadow-blur,8px)color-mix(in srgb,var(--ht-menu-shadow-color,#000)var(--ht-menu-shadow-opacity,100%),transparent);border:var(--ht-menu-border-width,1px)solid var(--ht-menu-border-color,#e5e5e9);margin:0}.handsontable.listbox .ht_master{background-color:var(--ht-background-color);overflow:hidden}.handsontable.listbox .wtHolder{overflow:auto;border-radius:0!important}.handsontable.listbox .wtHider,.handsontable.listbox .htCore{border-radius:0!important}.handsontable.listbox table{overflow:hidden}.handsontable.listbox table th,.handsontable.listbox table tr:first-child th,.handsontable.listbox table tr:last-child th,.handsontable.listbox table tr:first-child td,.handsontable.listbox table td{border-color:#0000!important}.handsontable.listbox table th,.handsontable.listbox table td{white-space:nowrap;text-overflow:ellipsis;border-radius:0!important}.handsontable.listbox table .wtBorder{visibility:hidden}.handsontable.listbox table strong{color:inherit;font-weight:700}.handsontable.listbox table tr td:hover td{cursor:pointer;background:color-mix(in srgb,var(--ht-menu-item-hover-color)var(--ht-menu-item-hover-color-opacity,100%),transparent)!important;box-shadow:none!important}.handsontable.listbox table td{transition:var(--ht-table-transition)background ease-in-out}.handsontable.listbox table td:hover{cursor:pointer;background-color:color-mix(in srgb,var(--ht-menu-item-hover-color)var(--ht-menu-item-hover-color-opacity,100%),transparent)!important}.handsontable.listbox table td.current:not([aria-expanded=true]){box-shadow:inset 0 0 0 1px var(--ht-accent-color)}.handsontable.listbox table td.htDimmed{cursor:default;font-style:inherit;color:inherit!important}.handsontable.listbox table td.htDimmed:not(.handsontable.listbox table td:hover){background-color:inherit!important}.handsontable.listbox table thead th{text-align:left;height:auto!important}.handsontable.listbox table thead th .relative{padding-top:calc(var(--ht-cell-vertical-padding) + var(--ht-gap-size));padding-bottom:calc(var(--ht-cell-vertical-padding) + var(--ht-gap-size))}.handsontable.listbox .ht_clone_top .wtHider{overflow:hidden}.handsontable.listbox .ht_clone_top table{border-radius:0}.handsontable.listbox .htBorders div{background:0 0!important}.handsontable.autocompleteEditor tr.ht__row_even th,.handsontable.autocompleteEditor tr.ht__row_even td,.handsontable.autocompleteEditor tr.ht__row_odd th,.handsontable.autocompleteEditor tr.ht__row_odd td{background-color:var(--ht-background-color,#fff)}[dir=rtl].handsontable.listbox table thead th{text-align:right}.handsontableEditor{position:absolute}.handsontableEditor .ht-multi-select-editor{box-shadow:var(--ht-menu-shadow-x,0)var(--ht-menu-shadow-y,0)var(--ht-menu-shadow-blur,8px)color-mix(in srgb,var(--ht-menu-shadow-color,#000)var(--ht-menu-shadow-opacity,100%),transparent);scrollbar-width:auto;scrollbar-color:var(--ht-scrollbar-thumb-color)var(--ht-scrollbar-track-color);border-radius:0 0 var(--ht-menu-border-radius)var(--ht-menu-border-radius);border:var(--ht-menu-border-width)solid var(--ht-menu-border-color);background:var(--ht-background-color);width:max-content;min-width:120px;padding:var(--ht-menu-vertical-padding)var(--ht-menu-horizontal-padding);overflow-y:auto}.handsontableEditor .ht-multi-select-editor .ht-multi-select-editor-search-input-wrapper{padding:var(--ht-menu-item-vertical-padding)var(--ht-menu-item-horizontal-padding);align-items:center;gap:var(--ht-gap-size);align-self:stretch;display:flex;position:relative}.handsontableEditor .ht-multi-select-editor .ht-multi-select-editor-search-input-wrapper .ht-icon-search{left:calc(var(--ht-menu-item-horizontal-padding) + 10px);opacity:.5;z-index:1;width:16px;height:16px;position:absolute;top:50%;transform:translateY(-50%)}.handsontableEditor .ht-multi-select-editor input.ht-multi-select-editor-search-input{box-sizing:border-box;border-radius:var(--ht-input-border-radius);width:100%;color:var(--ht-input-foreground-color);background-color:var(--ht-input-background-color);border:1px solid var(--ht-input-border-color);transition:var(--ht-table-transition)all ease-in-out;line-height:var(--ht-line-height);font-size:var(--ht-font-size);padding:var(--ht-input-vertical-padding)var(--ht-menu-item-horizontal-padding)var(--ht-input-vertical-padding)32px}.handsontableEditor .ht-multi-select-editor input.ht-multi-select-editor-search-input:hover{border-color:var(--ht-input-hover-border-color);color:var(--ht-input-hover-foreground-color);background-color:var(--ht-input-hover-background-color)}.handsontableEditor .ht-multi-select-editor input.ht-multi-select-editor-search-input:disabled{border-color:var(--ht-input-disabled-border-color);color:var(--ht-input-disabled-foreground-color);background-color:var(--ht-input-disabled-background-color)}.handsontableEditor .ht-multi-select-editor input.ht-multi-select-editor-search-input:focus{border-color:var(--ht-input-focus-border-color);color:var(--ht-input-focus-foreground-color);background-color:var(--ht-input-focus-background-color);outline-offset:0;box-shadow:none;outline:none}.handsontableEditor .ht-multi-select-editor input.ht-multi-select-editor-search-input::placeholder{color:var(--ht-foreground-color);opacity:.6}.handsontableEditor .ht-multi-select-editor .ht-multi-select-editor-separator{background-color:var(--ht-menu-border-color);width:100%;height:1px;margin:var(--ht-menu-vertical-padding)0 var(--ht-menu-vertical-padding)0;padding:0}.handsontableEditor .ht-multi-select-editor ul{width:100%;padding:var(--ht-gap-size)var(--ht-menu-horizontal-padding);flex-direction:column;align-items:flex-start;margin:0;list-style:none;display:flex}.handsontableEditor .ht-multi-select-editor ul li{background:var(--ht-background-color);padding:var(--ht-menu-item-vertical-padding)var(--ht-menu-item-horizontal-padding);-webkit-user-select:none;user-select:none;cursor:pointer;align-self:stretch;align-items:center;display:flex}.handsontableEditor .ht-multi-select-editor ul li *{cursor:pointer}.handsontableEditor .ht-multi-select-editor ul li.ht-multi-select-editor-item-selected{background:color-mix(in srgb,var(--ht-menu-item-active-color)var(--ht-menu-item-active-color-opacity,100%),transparent)}.handsontableEditor .ht-multi-select-editor ul li div{flex:1 0 0;align-items:center;display:flex}.handsontableEditor .ht-multi-select-editor ul li div input{appearance:none;width:var(--ht-checkbox-size);height:var(--ht-checkbox-size);flex-shrink:0;margin:0;padding:0;display:flex;position:relative}.handsontableEditor .ht-multi-select-editor ul li div input:before{content:"";box-sizing:border-box;width:var(--ht-checkbox-size);height:var(--ht-checkbox-size);border-radius:var(--ht-checkbox-border-radius);border:1px solid var(--ht-checkbox-border-color);background:var(--ht-checkbox-background-color);background-position:50%;background-repeat:no-repeat;display:block;position:absolute;top:0;left:0}.handsontableEditor .ht-multi-select-editor ul li div input:checked:before{border-color:var(--ht-checkbox-checked-border-color);background:var(--ht-checkbox-checked-background-color)}.handsontableEditor .ht-multi-select-editor ul li div input:focus{outline:none}.handsontableEditor .ht-multi-select-editor ul li div input+.ht-icon{z-index:1;width:var(--ht-checkbox-size);height:var(--ht-checkbox-size);color:var(--ht-checkbox-icon-color);margin-inline-start:calc(-1*var(--ht-checkbox-size));position:relative}.handsontableEditor .ht-multi-select-editor ul li div input:checked+.ht-icon{color:var(--ht-checkbox-checked-icon-color)}.handsontableEditor .ht-multi-select-editor ul li div label{color:var(--ht-foreground-color);text-overflow:ellipsis;font-size:var(--ht-font-size);font-style:normal;font-weight:400;line-height:var(--ht-line-height);letter-spacing:var(--ht-letter-spacing);width:100%;padding:0;padding-inline-start:var(--ht-gap-size);overflow:hidden}.handsontableEditor .ht-multi-select-editor ul li:hover,.handsontableEditor .ht-multi-select-editor ul li:has(input:focus){background:color-mix(in srgb,var(--ht-menu-item-hover-color)var(--ht-menu-item-hover-color-opacity,100%),transparent)}.handsontable .htUISelectCaption{width:100%;padding:var(--ht-input-vertical-padding)var(--ht-input-horizontal-padding);font-family:inherit;font-size:var(--ht-font-size);line-height:var(--ht-line-height);font-weight:var(--ht-font-weight);border-radius:var(--ht-input-border-radius);box-sizing:border-box;cursor:pointer;border:var(--ht-input-border-width)solid var(--ht-input-border-color);color:var(--ht-input-foreground-color);background-color:var(--ht-input-background-color);text-overflow:ellipsis;white-space:nowrap;transition:var(--ht-table-transition)all ease-in-out;margin:0;padding-inline-end:calc(var(--ht-input-horizontal-padding) + var(--ht-icon-size));overflow:hidden;outline:none!important}.handsontable .htUISelectCaption .ht-icon{inset-inline-end:calc(var(--ht-input-horizontal-padding) - var(--ht-icon-size)/4);position:absolute;top:50%;transform:translateY(-50%)}.handsontable .htUISelectCaption:hover{border-color:var(--ht-input-hover-border-color);color:var(--ht-input-hover-foreground-color);background-color:var(--ht-input-hover-background-color)}.handsontable .htUISelectCaption:disabled{border-color:var(--ht-input-disabled-border-color);color:var(--ht-input-disabled-foreground-color);background-color:var(--ht-input-disabled-background-color)}.handsontable .htUISelectCaption:focus{border-color:var(--ht-input-focus-border-color);color:var(--ht-input-focus-foreground-color);background-color:var(--ht-input-focus-background-color)}.handsontable .htUISelect{cursor:pointer;position:relative;outline:none!important}.handsontable .htUISelect:focus .htUISelectCaption{border-color:var(--ht-input-focus-border-color);color:var(--ht-input-focus-foreground-color);background-color:var(--ht-input-focus-background-color)}.handsontable .htFiltersMenuCondition .htUIInput input,.handsontable .htFiltersMenuValue .htUIMultipleSelectSearch input{width:100%;padding:var(--ht-input-vertical-padding)var(--ht-input-horizontal-padding);font-family:inherit;font-size:var(--ht-font-size);line-height:var(--ht-line-height);font-weight:var(--ht-font-weight);border-radius:var(--ht-input-border-radius);box-sizing:border-box;cursor:pointer;border:var(--ht-input-border-width)solid var(--ht-input-border-color);color:var(--ht-input-foreground-color);background-color:var(--ht-input-background-color);transition:var(--ht-table-transition)all ease-in-out;outline:none!important}.handsontable .htFiltersMenuCondition .htUIInput input:hover,.handsontable .htFiltersMenuValue .htUIMultipleSelectSearch input:hover{border-color:var(--ht-input-hover-border-color);color:var(--ht-input-hover-foreground-color);background-color:var(--ht-input-hover-background-color)}.handsontable .htFiltersMenuCondition .htUIInput input:disabled,.handsontable .htFiltersMenuValue .htUIMultipleSelectSearch input:disabled{border-color:var(--ht-input-disabled-border-color);color:var(--ht-input-disabled-foreground-color);background-color:var(--ht-input-disabled-background-color)}.handsontable .htFiltersMenuCondition .htUIInput input:focus,.handsontable .htFiltersMenuValue .htUIMultipleSelectSearch input:focus{border-color:var(--ht-input-focus-border-color);color:var(--ht-input-focus-foreground-color);background-color:var(--ht-input-focus-background-color)}.handsontable .htUIInput{text-align:center;padding:0;position:relative;outline:none!important}.handsontable .htUIInputIcon{position:absolute}.handsontable .htUIInput.htUIButton input,.handsontable .ht-button{min-width:64px;padding:var(--ht-button-vertical-padding)var(--ht-button-horizontal-padding);font-family:inherit;font-size:var(--ht-font-size);line-height:var(--ht-line-height);font-weight:var(--ht-font-weight);border-radius:var(--ht-button-border-radius);box-sizing:border-box;cursor:pointer;transition:var(--ht-table-transition)all ease-in-out;border-style:solid;border-width:1px;outline:none!important}.handsontable .htUIInput.htUIButtonCancel input,.handsontable .ht-button--secondary{border-color:var(--ht-secondary-button-border-color);background-color:var(--ht-secondary-button-background-color);color:var(--ht-secondary-button-foreground-color)}.handsontable .htUIInput.htUIButtonCancel input:hover,.handsontable .ht-button--secondary:hover{border-color:var(--ht-secondary-button-hover-border-color);background-color:var(--ht-secondary-button-hover-background-color);color:var(--ht-secondary-button-hover-foreground-color)}.handsontable .htUIInput.htUIButtonCancel input:disabled,.handsontable .ht-button--secondary:disabled{border-color:var(--ht-secondary-button-disabled-border-color);background-color:var(--ht-secondary-button-disabled-background-color);color:var(--ht-secondary-button-disabled-foreground-color)}.handsontable .htUIInput.htUIButtonCancel input:focus,.handsontable .ht-button--secondary:focus{border-color:var(--ht-secondary-button-focus-border-color);background-color:var(--ht-secondary-button-focus-background-color);color:var(--ht-secondary-button-focus-foreground-color);box-shadow:0 0 0 1px var(--ht-accent-color)}.htUIInput.htUIButtonOK input,.ht-button--primary{border-color:var(--ht-primary-button-border-color);background-color:var(--ht-primary-button-background-color);color:var(--ht-primary-button-foreground-color)}.htUIInput.htUIButtonOK input:hover,.ht-button--primary:hover{border-color:var(--ht-primary-button-hover-border-color);background-color:var(--ht-primary-button-hover-background-color);color:var(--ht-primary-button-hover-foreground-color)}.htUIInput.htUIButtonOK input:disabled,.ht-button--primary:disabled{border-color:var(--ht-primary-button-disabled-border-color);background-color:var(--ht-primary-button-disabled-background-color);color:var(--ht-primary-button-disabled-foreground-color)}.htUIInput.htUIButtonOK input:focus,.ht-button--primary:focus{border-color:var(--ht-primary-button-focus-border-color);background-color:var(--ht-primary-button-focus-background-color);color:var(--ht-primary-button-focus-foreground-color);box-shadow:0 0 0 1px var(--ht-accent-color)}.handsontable .htUIRadio{padding:var(--ht-gap-size)calc(2*var(--ht-gap-size));align-items:center;gap:var(--ht-gap-size);cursor:pointer;margin:0;padding-bottom:0;display:inline-flex;position:relative}.handsontable .htUIRadio:first-child{padding-inline-start:0}.handsontable .htUIRadio>input[type=radio]{width:var(--ht-radio-size);height:var(--ht-radio-size);appearance:none;cursor:pointer;border-radius:calc(.5*var(--ht-radio-size));outline:none;margin:0;position:relative}.handsontable .htUIRadio>input[type=radio]:before{content:"";border-radius:calc(.5*var(--ht-radio-size));border:1px solid var(--ht-radio-border-color);background-color:var(--ht-radio-background-color);display:block;position:absolute;inset:0}.handsontable .htUIRadio>input[type=radio]:checked:before{border-color:var(--ht-radio-checked-border-color);background-color:var(--ht-radio-checked-background-color)}.handsontable .htUIRadio>input[type=radio]:checked:disabled{cursor:initial}.handsontable .htUIRadio>input[type=radio]:checked:disabled:before{border-color:var(--ht-radio-checked-disabled-border-color);background-color:var(--ht-radio-checked-disabled-background-color)}.handsontable .htUIRadio>input[type=radio]:checked:focus:before{border-color:var(--ht-radio-checked-focus-border-color);background-color:var(--ht-radio-checked-focus-background-color)}.handsontable .htUIRadio>input[type=radio]:disabled{cursor:initial}.handsontable .htUIRadio>input[type=radio]:disabled:before{border-color:var(--ht-radio-disabled-border-color);background-color:var(--ht-radio-disabled-background-color)}.handsontable .htUIRadio>input[type=radio]:focus:before{border-color:var(--ht-radio-focus-border-color);background-color:var(--ht-radio-focus-background-color);outline:1px solid var(--ht-radio-focus-ring-color)}.handsontable .htUIRadio>input[type=radio]+.ht-icon{z-index:1;color:var(--ht-radio-icon-color);position:absolute}.handsontable .htUIRadio>input[type=radio]:checked+.ht-icon{color:var(--ht-radio-checked-icon-color)}.handsontable .htUIRadio>input[type=radio]:checked:disabled+.ht-icon{color:var(--ht-radio-checked-disabled-icon-color)}.handsontable .htUIRadio>input[type=radio]:checked:focus+.ht-icon{color:var(--ht-radio-checked-focus-icon-color)}.handsontable .htUIRadio>input[type=radio]:disabled+.ht-icon{color:var(--ht-radio-disabled-icon-color)}.handsontable .htUIRadio>input[type=radio]:focus+.ht-icon{color:var(--ht-radio-focus-icon-color)}.handsontable .htUIRadio label{vertical-align:middle;cursor:pointer;color:inherit}.handsontable .htUIRadio label:before{content:"";display:block;position:absolute;inset:0}.handsontable .collapsibleIndicator,.handsontable .ht_nestingButton{width:var(--ht-icon-button-hit-area-size);height:var(--ht-icon-button-hit-area-size);margin:calc(-1*(var(--ht-icon-button-hit-area-size) - var(--ht-icon-size))/2 + 1px);box-sizing:border-box;cursor:pointer;text-indent:-100px;flex-shrink:0;font-size:0;position:relative;overflow:visible}.handsontable .collapsibleIndicator>.ht-icon,.handsontable .ht_nestingButton>.ht-icon{width:var(--ht-icon-size);height:var(--ht-icon-size);margin-top:calc(-.5*var(--ht-icon-size));margin-left:calc(-.5*var(--ht-icon-size));border-radius:var(--ht-collapse-button-border-radius);transition:var(--ht-table-transition)all ease-in-out;z-index:1;position:absolute;top:50%;left:50%}.handsontable .collapsibleIndicator:after,.handsontable .ht_nestingButton:after{content:"";width:var(--ht-icon-size);height:var(--ht-icon-size);margin-top:calc(-.5*var(--ht-icon-size));margin-left:calc(-.5*var(--ht-icon-size));border-radius:var(--ht-collapse-button-border-radius);transition:var(--ht-table-transition)all ease-in-out;z-index:0;display:block;position:absolute;top:50%;left:50%}.handsontable .collapsibleIndicator.expanded>.ht-icon,.handsontable .collapsibleIndicator.ht_nestingCollapse>.ht-icon,.handsontable .ht_nestingButton.expanded>.ht-icon,.handsontable .ht_nestingButton.ht_nestingCollapse>.ht-icon{color:var(--ht-collapse-button-open-icon-color)}.handsontable .collapsibleIndicator.expanded:after,.handsontable .collapsibleIndicator.ht_nestingCollapse:after,.handsontable .ht_nestingButton.expanded:after,.handsontable .ht_nestingButton.ht_nestingCollapse:after{background-color:var(--ht-collapse-button-open-background-color);box-shadow:0 0 0 1px var(--ht-collapse-button-open-border-color)}.handsontable .collapsibleIndicator.expanded:hover>.ht-icon,.handsontable .collapsibleIndicator.ht_nestingCollapse:hover>.ht-icon,.handsontable .ht_nestingButton.expanded:hover>.ht-icon,.handsontable .ht_nestingButton.ht_nestingCollapse:hover>.ht-icon{color:var(--ht-collapse-button-open-hover-icon-color)}.handsontable .collapsibleIndicator.expanded:hover:after,.handsontable .collapsibleIndicator.ht_nestingCollapse:hover:after,.handsontable .ht_nestingButton.expanded:hover:after,.handsontable .ht_nestingButton.ht_nestingCollapse:hover:after{background-color:var(--ht-collapse-button-open-hover-background-color);box-shadow:0 0 0 1px var(--ht-collapse-button-open-hover-border-color)}.handsontable .collapsibleIndicator.collapsed>.ht-icon,.handsontable .collapsibleIndicator.ht_nestingExpand>.ht-icon,.handsontable .ht_nestingButton.collapsed>.ht-icon,.handsontable .ht_nestingButton.ht_nestingExpand>.ht-icon{color:var(--ht-collapse-button-close-icon-color)}.handsontable .collapsibleIndicator.collapsed:after,.handsontable .collapsibleIndicator.ht_nestingExpand:after,.handsontable .ht_nestingButton.collapsed:after,.handsontable .ht_nestingButton.ht_nestingExpand:after{background-color:var(--ht-collapse-button-close-background-color);box-shadow:0 0 0 1px var(--ht-collapse-button-close-border-color)}.handsontable .collapsibleIndicator.collapsed:hover>.ht-icon,.handsontable .collapsibleIndicator.ht_nestingExpand:hover>.ht-icon,.handsontable .ht_nestingButton.collapsed:hover>.ht-icon,.handsontable .ht_nestingButton.ht_nestingExpand:hover>.ht-icon{color:var(--ht-collapse-button-close-hover-icon-color)}.handsontable .collapsibleIndicator.collapsed:hover:after,.handsontable .collapsibleIndicator.ht_nestingExpand:hover:after,.handsontable .ht_nestingButton.collapsed:hover:after,.handsontable .ht_nestingButton.ht_nestingExpand:hover:after{background-color:var(--ht-collapse-button-close-hover-background-color);box-shadow:0 0 0 1px var(--ht-collapse-button-close-hover-border-color)}.handsontable th.ht__active_highlight .collapsibleIndicator.collapsed>.ht-icon,.handsontable th.ht__active_highlight .collapsibleIndicator.ht_nestingExpand>.ht-icon,.handsontable th.ht__active_highlight .ht_nestingButton.collapsed>.ht-icon,.handsontable th.ht__active_highlight .ht_nestingButton.ht_nestingExpand>.ht-icon{color:var(--ht-collapse-button-close-icon-active-color)}.handsontable th.ht__active_highlight .collapsibleIndicator.collapsed:hover>.ht-icon,.handsontable th.ht__active_highlight .collapsibleIndicator.ht_nestingExpand:hover>.ht-icon,.handsontable th.ht__active_highlight .ht_nestingButton.collapsed:hover>.ht-icon,.handsontable th.ht__active_highlight .ht_nestingButton.ht_nestingExpand:hover>.ht-icon{color:var(--ht-collapse-button-close-hover-icon-active-color)}.handsontable th.ht__active_highlight .collapsibleIndicator.expanded>.ht-icon,.handsontable th.ht__active_highlight .collapsibleIndicator.ht_nestingCollapse>.ht-icon,.handsontable th.ht__active_highlight .ht_nestingButton.expanded>.ht-icon,.handsontable th.ht__active_highlight .ht_nestingButton.ht_nestingCollapse>.ht-icon{color:var(--ht-collapse-button-open-icon-active-color)}.handsontable th.ht__active_highlight .collapsibleIndicator.expanded:hover>.ht-icon,.handsontable th.ht__active_highlight .collapsibleIndicator.ht_nestingCollapse:hover>.ht-icon,.handsontable th.ht__active_highlight .ht_nestingButton.expanded:hover>.ht-icon,.handsontable th.ht__active_highlight .ht_nestingButton.ht_nestingCollapse:hover>.ht-icon{color:var(--ht-collapse-button-open-hover-icon-active-color)}.handsontable .relative:not(.has-sort-indicator)>.changeType~.collapsibleIndicator{--ht-collapse-button-hit-area-overlap:max(0px,calc(var(--ht-icon-button-hit-area-size) - var(--ht-icon-size) - 4px));z-index:1;clip-path:inset(0 0 0 calc(var(--ht-collapse-button-hit-area-overlap)/2))}.handsontable .relative:not(.has-sort-indicator)>.changeType~.collapsibleIndicator:dir(rtl){clip-path:inset(0 calc(var(--ht-collapse-button-hit-area-overlap)/2)0 0)}.handsontable thead th.htRowspanHeader{vertical-align:bottom;height:auto;overflow:visible}.handsontable thead th.htRowspanHeader.ht__active_highlight{border-inline-start-color:var(--ht-header-active-border-color);z-index:1}.handsontable.htRowHeaders.htHasRowspanHeaders :where(table.htCore)>thead>tr:last-child>th:first-child{border-end-start-radius:0}.handsontable.htHasRowspanHeaders .ht_clone_inline_start .htCore>tbody>tr:first-child>th:first-child{border-start-start-radius:0}.handsontable thead th.hiddenHeader:not(:first-of-type){display:none}.handsontable thead th.hiddenHeaderText .colHeader{opacity:0}.handsontable th.ht_nestingLevels>.relative{align-items:center;gap:5px;display:flex}.handsontable th.ht_nestingLevels>.relative>span:last-child{padding-left:calc(var(--ht-icon-size) + 5px)}.handsontable th.ht_nestingLevels span.ht_nestingLevel{display:inline-block}.handsontable th.ht_nestingLevels span.ht_nestingLevel_empty{order:-2;width:5px;height:1px;display:inline-block;position:relative}.handsontable th.ht_nestingLevels .ht_nestingButton{cursor:pointer;order:-1;position:relative}.handsontable tr.htExactRow>th.ht_nestingLevels>.relative{align-items:flex-start}.handsontable tr.htExactRow>th.ht_nestingLevels>.relative>.ht_nestingButton{margin-top:calc((var(--ht-line-height,20px) - var(--ht-icon-button-hit-area-size,24px))/2)}.handsontable thead th.beforeHiddenColumn,.handsontable thead th.afterHiddenColumn{position:relative}.handsontable thead th>.ht-hidden-indicator-start,.handsontable thead th>.ht-hidden-indicator-end{color:var(--ht-hidden-indicator-color);font-size:10px;position:absolute;top:50%;transform:translateY(-50%);width:10px!important;height:10px!important}.handsontable thead th:not(.beforeHiddenColumn)>.ht-hidden-indicator-end,.handsontable thead th:not(.afterHiddenColumn)>.ht-hidden-indicator-start{display:none}.handsontable th.beforeHiddenColumn>.ht-hidden-indicator-end{right:-1px;mask-position:1px 0;mask-repeat:no-repeat}.handsontable th.afterHiddenColumn>.ht-hidden-indicator-start{left:-2px}.handsontable th.ht__active_highlight.beforeHiddenColumn>.ht-hidden-indicator-end,.handsontable th.ht__active_highlight.afterHiddenColumn>.ht-hidden-indicator-start{color:var(--ht-icon-button-active-icon-color,var(--ht-icon-active-button-icon-color))}[dir=rtl].handsontable th.beforeHiddenColumn>.ht-hidden-indicator-end{right:initial;left:-1px;transform:translateY(-50%)rotate(180deg)}[dir=rtl].handsontable th.afterHiddenColumn>.ht-hidden-indicator-start{right:-2px;left:initial;transform:translateY(-50%)rotate(180deg)}.handsontable tbody th.beforeHiddenRow,.handsontable tbody th.afterHiddenRow{position:relative}.handsontable tbody th>.ht-hidden-indicator-start,.handsontable tbody th>.ht-hidden-indicator-end{color:var(--ht-hidden-indicator-color);font-size:10px;position:absolute;left:50%;transform:translate(-50%);width:10px!important;height:10px!important}.handsontable tbody th:not(.beforeHiddenRow)>.ht-hidden-indicator-end,.handsontable tbody th:not(.afterHiddenRow)>.ht-hidden-indicator-start{display:none}.handsontable th.beforeHiddenRow>.ht-hidden-indicator-end{bottom:-1px;mask-position:0 1px;mask-repeat:no-repeat}.handsontable th.afterHiddenRow>.ht-hidden-indicator-start{top:-2px}.handsontable th.ht__active_highlight.beforeHiddenRow>.ht-hidden-indicator-end,.handsontable th.ht__active_highlight.afterHiddenRow>.ht-hidden-indicator-start{color:var(--ht-icon-button-active-icon-color,var(--ht-icon-active-button-icon-color))}.handsontable .changeType{box-sizing:border-box;width:var(--ht-icon-button-hit-area-size);height:var(--ht-icon-button-hit-area-size);margin:calc(-1*(var(--ht-icon-button-hit-area-size) - var(--ht-icon-size))/2 + 1px);box-shadow:none;color:inherit;z-index:1;background:0 0;border:none;outline:none;flex-shrink:0;padding:0;position:relative;overflow:visible}.handsontable .changeType .ht-icon{margin-top:calc(-.5*var(--ht-icon-size));margin-left:calc(-.5*var(--ht-icon-size));color:var(--ht-icon-button-icon-color);z-index:1;position:absolute;top:50%;left:50%}.handsontable .changeType:after{content:"";width:var(--ht-icon-size);height:var(--ht-icon-size);margin-top:calc(-.5*var(--ht-icon-size));margin-left:calc(-.5*var(--ht-icon-size));border-radius:var(--ht-icon-button-border-radius);box-shadow:0 0 0 1px var(--ht-icon-button-border-color);background-color:var(--ht-icon-button-background-color);z-index:0;display:block;position:absolute;top:50%;left:50%}.handsontable .changeType:hover{cursor:pointer}.handsontable .changeType:hover .ht-icon{color:var(--ht-icon-button-hover-icon-color)}.handsontable .changeType:hover:after{box-shadow:0 0 0 1px var(--ht-icon-button-hover-border-color);background-color:var(--ht-icon-button-hover-background-color)}.handsontable .ht__active_highlight .changeType .ht-icon{color:var(--ht-icon-button-active-icon-color,var(--ht-icon-active-button-icon-color))}.handsontable .ht__active_highlight .changeType:after{box-shadow:0 0 0 1px var(--ht-icon-button-active-border-color,var(--ht-icon-active-button-border-color));background-color:var(--ht-icon-button-active-background-color,var(--ht-icon-active-button-background-color))}.handsontable .ht__active_highlight .changeType:hover .ht-icon{color:var(--ht-icon-button-active-hover-icon-color,var(--ht-icon-active-button-hover-icon-color))}.handsontable .ht__active_highlight .changeType:hover:after{box-shadow:0 0 0 1px var(--ht-icon-button-active-hover-border-color,var(--ht-icon-active-button-hover-border-color));background-color:var(--ht-icon-button-active-hover-background-color,var(--ht-icon-active-button-hover-background-color))}.handsontable th.htFiltersActive{background-color:var(--ht-header-filter-background-color)}.handsontable th.htFiltersActive.ht__active_highlight{background-color:color-mix(in srgb,var(--ht-header-active-background-color),var(--ht-header-filter-background-color)20%)}.handsontable.htDropdownMenu>.ht_master,.handsontable.htContextMenu>.ht_master,.handsontable.htFiltersConditionsMenu>.ht_master,.handsontable.htSheetsBarMenu>.ht_master{box-shadow:var(--ht-menu-shadow-x,0)var(--ht-menu-shadow-y,0)var(--ht-menu-shadow-blur,8px)color-mix(in srgb,var(--ht-menu-shadow-color,#000)var(--ht-menu-shadow-opacity,100%),transparent);border:var(--ht-menu-border-width,1px)solid var(--ht-menu-border-color,#e5e5e9);border-radius:var(--ht-menu-border-radius);padding:var(--ht-menu-vertical-padding,8px)var(--ht-menu-horizontal-padding,0);background-color:var(--ht-background-color,#fff);overflow:hidden}.handsontable.htDropdownMenu:not(.htGhostTable),.handsontable.htContextMenu:not(.htGhostTable),.handsontable.htFiltersConditionsMenu:not(.htGhostTable),.handsontable.htSheetsBarMenu:not(.htGhostTable){z-index:1060;display:none;position:absolute}.handsontable.htDropdownMenu .ht_clone_top,.handsontable.htDropdownMenu .ht_clone_bottom,.handsontable.htDropdownMenu .ht_clone_inline_start,.handsontable.htDropdownMenu .ht_clone_inline_end,.handsontable.htDropdownMenu .ht_clone_top_inline_start_corner,.handsontable.htDropdownMenu .ht_clone_top_inline_end_corner,.handsontable.htDropdownMenu .ht_clone_bottom_inline_start_corner,.handsontable.htDropdownMenu .ht_clone_bottom_inline_end_corner,.handsontable.htContextMenu .ht_clone_top,.handsontable.htContextMenu .ht_clone_bottom,.handsontable.htContextMenu .ht_clone_inline_start,.handsontable.htContextMenu .ht_clone_inline_end,.handsontable.htContextMenu .ht_clone_top_inline_start_corner,.handsontable.htContextMenu .ht_clone_top_inline_end_corner,.handsontable.htContextMenu .ht_clone_bottom_inline_start_corner,.handsontable.htContextMenu .ht_clone_bottom_inline_end_corner,.handsontable.htFiltersConditionsMenu .ht_clone_top,.handsontable.htFiltersConditionsMenu .ht_clone_bottom,.handsontable.htFiltersConditionsMenu .ht_clone_inline_start,.handsontable.htFiltersConditionsMenu .ht_clone_inline_end,.handsontable.htFiltersConditionsMenu .ht_clone_top_inline_start_corner,.handsontable.htFiltersConditionsMenu .ht_clone_top_inline_end_corner,.handsontable.htFiltersConditionsMenu .ht_clone_bottom_inline_start_corner,.handsontable.htFiltersConditionsMenu .ht_clone_bottom_inline_end_corner,.handsontable.htSheetsBarMenu .ht_clone_top,.handsontable.htSheetsBarMenu .ht_clone_bottom,.handsontable.htSheetsBarMenu .ht_clone_inline_start,.handsontable.htSheetsBarMenu .ht_clone_inline_end,.handsontable.htSheetsBarMenu .ht_clone_top_inline_start_corner,.handsontable.htSheetsBarMenu .ht_clone_top_inline_end_corner,.handsontable.htSheetsBarMenu .ht_clone_bottom_inline_start_corner,.handsontable.htSheetsBarMenu .ht_clone_bottom_inline_end_corner{display:none}.handsontable.htDropdownMenu table.htCore,.handsontable.htContextMenu table.htCore,.handsontable.htFiltersConditionsMenu table.htCore,.handsontable.htSheetsBarMenu table.htCore{overflow:hidden}.handsontable.htDropdownMenu .htCustomMenuRenderer .table.htCore,.handsontable.htContextMenu .htCustomMenuRenderer .table.htCore,.handsontable.htFiltersConditionsMenu .htCustomMenuRenderer .table.htCore,.handsontable.htSheetsBarMenu .htCustomMenuRenderer .table.htCore{box-shadow:none}.handsontable.htDropdownMenu.handsontable:focus,.handsontable.htContextMenu.handsontable:focus,.handsontable.htFiltersConditionsMenu.handsontable:focus,.handsontable.htSheetsBarMenu.handsontable:focus{outline:none}.handsontable.htDropdownMenu .wtBorder,.handsontable.htContextMenu .wtBorder,.handsontable.htFiltersConditionsMenu .wtBorder,.handsontable.htSheetsBarMenu .wtBorder{visibility:hidden}.handsontable.htDropdownMenu tbody tr:first-of-type td:first-child,.handsontable.htDropdownMenu tbody tr:first-of-type th:first-child,.handsontable.htContextMenu tbody tr:first-of-type td:first-child,.handsontable.htContextMenu tbody tr:first-of-type th:first-child,.handsontable.htFiltersConditionsMenu tbody tr:first-of-type td:first-child,.handsontable.htFiltersConditionsMenu tbody tr:first-of-type th:first-child,.handsontable.htSheetsBarMenu tbody tr:first-of-type td:first-child,.handsontable.htSheetsBarMenu tbody tr:first-of-type th:first-child{height:calc(var(--ht-cell-vertical-padding)*2 + var(--ht-line-height) + 1px)}.handsontable.htDropdownMenu table tbody tr td,.handsontable.htContextMenu table tbody tr td,.handsontable.htFiltersConditionsMenu table tbody tr td,.handsontable.htSheetsBarMenu table tbody tr td{padding:var(--ht-menu-item-vertical-padding,4px)var(--ht-menu-item-horizontal-padding,8px);white-space:nowrap;text-overflow:ellipsis;background:var(--ht-background-color,#fff);cursor:pointer;transition:var(--ht-table-transition)background ease-in-out;border-width:0;position:relative;overflow:hidden}.handsontable.htDropdownMenu table tbody tr td:first-child,.handsontable.htContextMenu table tbody tr td:first-child,.handsontable.htFiltersConditionsMenu table tbody tr td:first-child,.handsontable.htSheetsBarMenu table tbody tr td:first-child{border-top-width:0;border-inline-end-width:0;border-bottom-width:0;border-inline-start-width:0}.handsontable.htDropdownMenu table tbody tr td.htDimmed,.handsontable.htContextMenu table tbody tr td.htDimmed,.handsontable.htFiltersConditionsMenu table tbody tr td.htDimmed,.handsontable.htSheetsBarMenu table tbody tr td.htDimmed{font-style:normal;color:inherit!important;background-color:inherit!important}.handsontable.htDropdownMenu table tbody tr td:not(.handsontable.htDropdownMenu table tbody tr td.htCustomMenuRenderer,.handsontable.htDropdownMenu table tbody tr td.htDisabled,.handsontable.htContextMenu table tbody tr td.htCustomMenuRenderer,.handsontable.htContextMenu table tbody tr td.htDisabled,.handsontable.htFiltersConditionsMenu table tbody tr td.htCustomMenuRenderer,.handsontable.htFiltersConditionsMenu table tbody tr td.htDisabled,.handsontable.htSheetsBarMenu table tbody tr td.htCustomMenuRenderer,.handsontable.htSheetsBarMenu table tbody tr td.htDisabled):hover,.handsontable.htContextMenu table tbody tr td:not(.handsontable.htDropdownMenu table tbody tr td.htCustomMenuRenderer,.handsontable.htDropdownMenu table tbody tr td.htDisabled,.handsontable.htContextMenu table tbody tr td.htCustomMenuRenderer,.handsontable.htContextMenu table tbody tr td.htDisabled,.handsontable.htFiltersConditionsMenu table tbody tr td.htCustomMenuRenderer,.handsontable.htFiltersConditionsMenu table tbody tr td.htDisabled,.handsontable.htSheetsBarMenu table tbody tr td.htCustomMenuRenderer,.handsontable.htSheetsBarMenu table tbody tr td.htDisabled):hover,.handsontable.htFiltersConditionsMenu table tbody tr td:not(.handsontable.htDropdownMenu table tbody tr td.htCustomMenuRenderer,.handsontable.htDropdownMenu table tbody tr td.htDisabled,.handsontable.htContextMenu table tbody tr td.htCustomMenuRenderer,.handsontable.htContextMenu table tbody tr td.htDisabled,.handsontable.htFiltersConditionsMenu table tbody tr td.htCustomMenuRenderer,.handsontable.htFiltersConditionsMenu table tbody tr td.htDisabled,.handsontable.htSheetsBarMenu table tbody tr td.htCustomMenuRenderer,.handsontable.htSheetsBarMenu table tbody tr td.htDisabled):hover,.handsontable.htSheetsBarMenu table tbody tr td:not(.handsontable.htDropdownMenu table tbody tr td.htCustomMenuRenderer,.handsontable.htDropdownMenu table tbody tr td.htDisabled,.handsontable.htContextMenu table tbody tr td.htCustomMenuRenderer,.handsontable.htContextMenu table tbody tr td.htDisabled,.handsontable.htFiltersConditionsMenu table tbody tr td.htCustomMenuRenderer,.handsontable.htFiltersConditionsMenu table tbody tr td.htDisabled,.handsontable.htSheetsBarMenu table tbody tr td.htCustomMenuRenderer,.handsontable.htSheetsBarMenu table tbody tr td.htDisabled):hover{cursor:pointer;background:color-mix(in srgb,var(--ht-menu-item-hover-color)var(--ht-menu-item-hover-color-opacity,100%),transparent)!important}.handsontable.htDropdownMenu table tbody tr td:not(.handsontable.htDropdownMenu table tbody tr td.htCustomMenuRenderer,.handsontable.htDropdownMenu table tbody tr td.htDisabled,.handsontable.htContextMenu table tbody tr td.htCustomMenuRenderer,.handsontable.htContextMenu table tbody tr td.htDisabled,.handsontable.htFiltersConditionsMenu table tbody tr td.htCustomMenuRenderer,.handsontable.htFiltersConditionsMenu table tbody tr td.htDisabled,.handsontable.htSheetsBarMenu table tbody tr td.htCustomMenuRenderer,.handsontable.htSheetsBarMenu table tbody tr td.htDisabled).current:not([aria-expanded=true]),.handsontable.htContextMenu table tbody tr td:not(.handsontable.htDropdownMenu table tbody tr td.htCustomMenuRenderer,.handsontable.htDropdownMenu table tbody tr td.htDisabled,.handsontable.htContextMenu table tbody tr td.htCustomMenuRenderer,.handsontable.htContextMenu table tbody tr td.htDisabled,.handsontable.htFiltersConditionsMenu table tbody tr td.htCustomMenuRenderer,.handsontable.htFiltersConditionsMenu table tbody tr td.htDisabled,.handsontable.htSheetsBarMenu table tbody tr td.htCustomMenuRenderer,.handsontable.htSheetsBarMenu table tbody tr td.htDisabled).current:not([aria-expanded=true]),.handsontable.htFiltersConditionsMenu table tbody tr td:not(.handsontable.htDropdownMenu table tbody tr td.htCustomMenuRenderer,.handsontable.htDropdownMenu table tbody tr td.htDisabled,.handsontable.htContextMenu table tbody tr td.htCustomMenuRenderer,.handsontable.htContextMenu table tbody tr td.htDisabled,.handsontable.htFiltersConditionsMenu table tbody tr td.htCustomMenuRenderer,.handsontable.htFiltersConditionsMenu table tbody tr td.htDisabled,.handsontable.htSheetsBarMenu table tbody tr td.htCustomMenuRenderer,.handsontable.htSheetsBarMenu table tbody tr td.htDisabled).current:not([aria-expanded=true]),.handsontable.htSheetsBarMenu table tbody tr td:not(.handsontable.htDropdownMenu table tbody tr td.htCustomMenuRenderer,.handsontable.htDropdownMenu table tbody tr td.htDisabled,.handsontable.htContextMenu table tbody tr td.htCustomMenuRenderer,.handsontable.htContextMenu table tbody tr td.htDisabled,.handsontable.htFiltersConditionsMenu table tbody tr td.htCustomMenuRenderer,.handsontable.htFiltersConditionsMenu table tbody tr td.htDisabled,.handsontable.htSheetsBarMenu table tbody tr td.htCustomMenuRenderer,.handsontable.htSheetsBarMenu table tbody tr td.htDisabled).current:not([aria-expanded=true]){box-shadow:inset 0 0 0 1px var(--ht-accent-color)}.handsontable.htDropdownMenu table tbody tr td.htSubmenu .htItemWrapper,.handsontable.htContextMenu table tbody tr td.htSubmenu .htItemWrapper,.handsontable.htFiltersConditionsMenu table tbody tr td.htSubmenu .htItemWrapper,.handsontable.htSheetsBarMenu table tbody tr td.htSubmenu .htItemWrapper{margin-inline-end:calc(2*var(--ht-gap-size,4px) + var(--ht-icon-size))}.handsontable.htDropdownMenu table tbody tr td.htSubmenu .htItemWrapper .htSubmenuIcon,.handsontable.htContextMenu table tbody tr td.htSubmenu .htItemWrapper .htSubmenuIcon,.handsontable.htFiltersConditionsMenu table tbody tr td.htSubmenu .htItemWrapper .htSubmenuIcon,.handsontable.htSheetsBarMenu table tbody tr td.htSubmenu .htItemWrapper .htSubmenuIcon{top:50%;position:absolute;inset-inline-end:calc(var(--ht-menu-item-horizontal-padding) + var(--ht-gap-size)*2);translate:0 -50%}.handsontable.htDropdownMenu table tbody tr td.htSeparator,.handsontable.htContextMenu table tbody tr td.htSeparator,.handsontable.htFiltersConditionsMenu table tbody tr td.htSeparator,.handsontable.htSheetsBarMenu table tbody tr td.htSeparator{border-top:1px solid var(--ht-border-color);cursor:default;height:0;padding:0}.handsontable.htDropdownMenu table tbody tr td.htDisabled,.handsontable.htContextMenu table tbody tr td.htDisabled,.handsontable.htFiltersConditionsMenu table tbody tr td.htDisabled,.handsontable.htSheetsBarMenu table tbody tr td.htDisabled{color:var(--ht-disabled-color);cursor:default}.handsontable.htDropdownMenu table tbody tr td.htDisabled:hover,.handsontable.htContextMenu table tbody tr td.htDisabled:hover,.handsontable.htFiltersConditionsMenu table tbody tr td.htDisabled:hover,.handsontable.htSheetsBarMenu table tbody tr td.htDisabled:hover{background:var(--ht-background-color);color:var(--ht-disabled-color)}.handsontable.htDropdownMenu table tbody tr td.htHidden,.handsontable.htContextMenu table tbody tr td.htHidden,.handsontable.htFiltersConditionsMenu table tbody tr td.htHidden,.handsontable.htSheetsBarMenu table tbody tr td.htHidden{display:none}.handsontable.htDropdownMenu table tbody tr td:has(.htItemWrapper .selected),.handsontable.htContextMenu table tbody tr td:has(.htItemWrapper .selected),.handsontable.htFiltersConditionsMenu table tbody tr td:has(.htItemWrapper .selected),.handsontable.htSheetsBarMenu table tbody tr td:has(.htItemWrapper .selected){background-color:color-mix(in srgb,var(--ht-menu-item-active-color)var(--ht-menu-item-active-color-opacity,100%),transparent)}.handsontable.htDropdownMenu table tbody tr td .htItemWrapper,.handsontable.htContextMenu table tbody tr td .htItemWrapper,.handsontable.htFiltersConditionsMenu table tbody tr td .htItemWrapper,.handsontable.htSheetsBarMenu table tbody tr td .htItemWrapper{margin-inline:calc(2*var(--ht-gap-size,4px))}.handsontable.htDropdownMenu table tbody tr td .htItemWrapper:before,.handsontable.htContextMenu table tbody tr td .htItemWrapper:before,.handsontable.htFiltersConditionsMenu table tbody tr td .htItemWrapper:before,.handsontable.htSheetsBarMenu table tbody tr td .htItemWrapper:before{vertical-align:text-bottom;margin-right:12px}.handsontable.htDropdownMenu table tbody tr td .htItemWrapper span.selected,.handsontable.htDropdownMenu table tbody tr td .htItemWrapper span.htMixed,.handsontable.htContextMenu table tbody tr td .htItemWrapper span.selected,.handsontable.htContextMenu table tbody tr td .htItemWrapper span.htMixed,.handsontable.htFiltersConditionsMenu table tbody tr td .htItemWrapper span.selected,.handsontable.htFiltersConditionsMenu table tbody tr td .htItemWrapper span.htMixed,.handsontable.htSheetsBarMenu table tbody tr td .htItemWrapper span.selected,.handsontable.htSheetsBarMenu table tbody tr td .htItemWrapper span.htMixed{font-size:0;inset:0}.handsontable.htDropdownMenu table tbody tr td .htItemWrapper span.selected .ht-icon,.handsontable.htDropdownMenu table tbody tr td .htItemWrapper span.htMixed .ht-icon,.handsontable.htContextMenu table tbody tr td .htItemWrapper span.selected .ht-icon,.handsontable.htContextMenu table tbody tr td .htItemWrapper span.htMixed .ht-icon,.handsontable.htFiltersConditionsMenu table tbody tr td .htItemWrapper span.selected .ht-icon,.handsontable.htFiltersConditionsMenu table tbody tr td .htItemWrapper span.htMixed .ht-icon,.handsontable.htSheetsBarMenu table tbody tr td .htItemWrapper span.selected .ht-icon,.handsontable.htSheetsBarMenu table tbody tr td .htItemWrapper span.htMixed .ht-icon{color:var(--ht-accent-color);top:50%;position:absolute;inset-inline-end:calc(var(--ht-menu-item-horizontal-padding) + var(--ht-gap-size)*2);transform:translateY(-50%)}.handsontable.htDropdownMenu table tbody tr td div span.selected,.handsontable.htDropdownMenu table tbody tr td div span.htMixed,.handsontable.htContextMenu table tbody tr td div span.selected,.handsontable.htContextMenu table tbody tr td div span.htMixed,.handsontable.htFiltersConditionsMenu table tbody tr td div span.selected,.handsontable.htFiltersConditionsMenu table tbody tr td div span.htMixed,.handsontable.htSheetsBarMenu table tbody tr td div span.selected,.handsontable.htSheetsBarMenu table tbody tr td div span.htMixed{position:absolute;inset-inline-end:0}.handsontable.htDropdownMenu table tbody tr td .htUIButton,.handsontable.htContextMenu table tbody tr td .htUIButton,.handsontable.htFiltersConditionsMenu table tbody tr td .htUIButton,.handsontable.htSheetsBarMenu table tbody tr td .htUIButton{width:calc(50% - var(--ht-gap-size))}.handsontable.htDropdownMenu table tbody tr td .htUIButton input,.handsontable.htContextMenu table tbody tr td .htUIButton input,.handsontable.htFiltersConditionsMenu table tbody tr td .htUIButton input,.handsontable.htSheetsBarMenu table tbody tr td .htUIButton input{width:100%}.handsontable .htUIClearAll a,.handsontable .htUISelectAll a{padding:var(--ht-gap-size);text-decoration:none;display:inline-block}.handsontable .htUIMultipleSelect .ht_master .wtHolder{background:0 0;box-shadow:none!important;border-radius:0!important;overflow-y:scroll!important}.handsontable .htUIMultipleSelect .ht_master .wtHolder .htCore{box-shadow:none}.handsontable .htUIMultipleSelect .ht_master .htScrollbarFrame{box-shadow:none!important}[dir=rtl].handsontable.htDropdownMenu table tbody tr td.htSubmenu .htItemWrapper .htSubmenuIcon,[dir=rtl].handsontable.htDropdownMenu table tbody tr td .htItemWrapper span.selected .ht-icon,[dir=rtl].handsontable.htDropdownMenu table tbody tr td .htItemWrapper span.htMixed .ht-icon,[dir=rtl].handsontable.htContextMenu table tbody tr td.htSubmenu .htItemWrapper .htSubmenuIcon,[dir=rtl].handsontable.htContextMenu table tbody tr td .htItemWrapper span.selected .ht-icon,[dir=rtl].handsontable.htContextMenu table tbody tr td .htItemWrapper span.htMixed .ht-icon,[dir=rtl].handsontable.htFiltersConditionsMenu table tbody tr td.htSubmenu .htItemWrapper .htSubmenuIcon,[dir=rtl].handsontable.htFiltersConditionsMenu table tbody tr td .htItemWrapper span.selected .ht-icon,[dir=rtl].handsontable.htFiltersConditionsMenu table tbody tr td .htItemWrapper span.htMixed .ht-icon,[dir=rtl].handsontable.htSheetsBarMenu table tbody tr td.htSubmenu .htItemWrapper .htSubmenuIcon,[dir=rtl].handsontable.htSheetsBarMenu table tbody tr td .htItemWrapper span.selected .ht-icon,[dir=rtl].handsontable.htSheetsBarMenu table tbody tr td .htItemWrapper span.htMixed .ht-icon{inset-inline-end:calc(4*var(--ht-gap-size))}.handsontable.htSheetsBarMenu table tbody tr td .htItemWrapper .ht-sheets-bar__menu-item-name{text-overflow:ellipsis;vertical-align:top;max-width:100%;font-size:inherit;line-height:inherit;font-weight:inherit;letter-spacing:inherit;border:0;margin:0;padding:0;font-family:inherit;display:inline-block;overflow:hidden}.handsontable.htSheetsBarMenu table tbody tr td .htItemWrapper span.selected{border:0;margin:0;padding:0}.handsontable.htFiltersConditionsMenu:not(.htGhostTable){z-index:1070}.handsontable .ht_master table td.htCustomMenuRenderer{cursor:auto}.handsontable .ht_master table td.htCustomMenuRenderer.htFiltersMenuActionBar{padding-top:calc(var(--ht-menu-item-vertical-padding,4px)*2)}.handsontable .htFiltersMenuLabel{font-size:var(--ht-font-size-small);line-height:var(--ht-line-height-small);font-weight:var(--ht-font-weight);margin-bottom:calc(var(--ht-gap-size,2px)*2)}.handsontable .htFiltersMenuLabel:empty{display:none}.handsontable .htFiltersMenuCondition{padding-top:calc(var(--ht-gap-size,2px)*3)!important;padding-bottom:0!important}.handsontable .htFiltersMenuCondition .border{border-bottom:1px solid var(--ht-border-color)!important}.handsontable .htFiltersMenuCondition .htUIInput{margin-top:calc(var(--ht-gap-size,2px)*2)}.handsontable .htFiltersMenuValue{padding-top:calc(var(--ht-gap-size,2px)*3)!important;border-bottom:1px solid var(--ht-border-color)!important;padding-bottom:0!important}.handsontable .htFiltersMenuOperators{padding-top:calc(var(--ht-gap-size,2px)*2)!important;padding-bottom:0!important}.handsontable .htUISelectionControls{white-space:normal;margin:0 calc(var(--ht-gap-size,2px)*-1);padding-top:calc(var(--ht-gap-size,2px)*2)!important;padding-bottom:var(--ht-gap-size,2px)!important}.handsontable .htUIMultipleSelectHot{--ht-cell-horizontal-padding:calc(var(--ht-menu-item-horizontal-padding,2px) + var(--ht-gap-size,2px)*2);--ht-cell-vertical-padding:4px;width:calc(100% + var(--ht-menu-item-horizontal-padding,2px)*2 + var(--ht-gap-size,2px)*4);margin:0 calc((var(--ht-menu-item-horizontal-padding,2px) + var(--ht-gap-size,2px)*2)*-1);overflow:initial!important}.handsontable .htUIMultipleSelectHot:before{content:"";background-color:var(--ht-border-color);width:100%;height:1px;display:block;position:absolute;top:-1px;left:0}.handsontable .htUIMultipleSelectHot .wtHolder{box-sizing:border-box;padding:0;overflow-x:hidden}.handsontable .htUIMultipleSelectHot .wtHolder .wtSpreader{padding:calc(var(--ht-gap-size)*2)0}.handsontable .htUIMultipleSelectHot .wtHolder td{padding:var(--ht-cell-vertical-padding)var(--ht-cell-horizontal-padding);height:auto!important}.handsontable .htUIClearAll,.handsontable .htUISelectAll{margin-right:var(--ht-gap-size,4px);margin-bottom:var(--ht-gap-size,4px);display:inline-block}.handsontable .htUIClearAll a,.handsontable .htUISelectAll a{font-size:var(--ht-font-size);line-height:var(--ht-line-height);color:var(--ht-link-color);border-radius:var(--ht-button-border-radius)}.handsontable .htUIClearAll a:hover,.handsontable .htUISelectAll a:hover{color:var(--ht-link-hover-color)}.handsontable .htUIClearAll a:focus,.handsontable .htUISelectAll a:focus{outline:1px solid var(--ht-link-hover-color)}.handsontable .htUIMultipleSelect .ht_master .wtHolder{overflow:auto}.handsontable .htUIMultipleSelect .ht_master .wtHolder .wtHider,.handsontable .htUIMultipleSelect .ht_master .wtHolder .htCore,.handsontable .htUIMultipleSelect .ht_master .wtHolder tr,.handsontable .htUIMultipleSelect .ht_master .wtHolder td{background:0 0}.handsontable .htUIInput.htUIButton{cursor:pointer;display:inline-block}.handsontable .htUIInput.htUIButtonOK{margin-inline-start:0;margin-inline-end:calc(2*var(--ht-gap-size,2px))}:where(.handsontable,.hfe-formula-bar,.hfe-popup-portal,.hfe-suggestions,.hfe-fn-help){--hfe-font-family:var(--ht-font-family),-apple-system,BlinkMacSystemFont,Segoe UI,sans-serif;--hfe-font-size:var(--ht-font-size);--hfe-line-height:var(--ht-line-height);--hfe-formula-bar-input-focus-ring:var(--ht-cell-selection-border-color);--hfe-gap:var(--ht-gap-size);--hfe-color-background:var(--ht-cell-editor-background-color);--hfe-color-foreground:var(--ht-cell-editor-foreground-color);--hfe-color-foreground-secondary:var(--ht-foreground-secondary-color);--hfe-color-accent:var(--ht-accent-color);--hfe-shadow-x:var(--ht-shadow-x);--hfe-shadow-y:var(--ht-shadow-y);--hfe-shadow-blur:var(--ht-shadow-blur);--hfe-shadow-opacity:var(--ht-shadow-opacity);--hfe-color-shadow:color-mix(in srgb,var(--ht-shadow-color)var(--ht-shadow-opacity),transparent);--hfe-padding-vertical:var(--ht-cell-vertical-padding);--hfe-padding-horizontal:var(--ht-cell-horizontal-padding);--hfe-border-width:var(--ht-cell-editor-border-width);--hfe-border-width-focus:var(--ht-cell-editor-border-width);--hfe-color-caret:var(--ht-cell-editor-foreground-color);--hfe-editor-color-border:var(--ht-cell-editor-border-color);--hfe-color-focus-ring:var(--ht-cell-editor-border-color);--hfe-menu-item-padding-horizontal:var(--ht-menu-item-horizontal-padding);--hfe-menu-item-padding-vertical:var(--ht-menu-item-vertical-padding);--hfe-menu-item-border-radius:0;--hfe-menu-padding-horizontal:var(--ht-menu-horizontal-padding);--hfe-menu-padding-vertical:var(--ht-menu-vertical-padding);--hfe-menu-border-radius:var(--ht-menu-border-radius);--hfe-menu-border-width:var(--ht-menu-border-width);--hfe-menu-border-color:var(--ht-menu-border-color);--hfe-menu-background:var(--ht-background-color);--hfe-menu-kbd-row-border-color:var(--ht-border-color);--hfe-menu-chip-background:var(--ht-accent-color);--hfe-menu-chip-foreground:var(--ht-background-color);--hfe-menu-chip-border-radius:var(--ht-chip-border-radius);--hfe-menu-shadow:var(--ht-menu-shadow-x)var(--ht-menu-shadow-y)var(--ht-menu-shadow-blur)color-mix(in srgb,var(--ht-menu-shadow-color)var(--ht-menu-shadow-opacity),transparent);--hfe-token-fn:var(--ht-foreground-color);--hfe-token-num:var(--ht-foreground-color);--hfe-token-str:var(--ht-foreground-color);--hfe-token-bool:var(--ht-foreground-color);--hfe-token-op:var(--ht-foreground-color);--hfe-token-paren:var(--ht-foreground-color);--hfe-token-paren-match:var(--ht-accent-color);--hfe-token-bracket:var(--ht-foreground-color);--hfe-token-sep:var(--ht-foreground-color);--hfe-token-ident:var(--ht-foreground-color);--hfe-ref-1:light-dark(#007bff,#0a84ff);--hfe-ref-2:light-dark(#ff9500,#ff9d0a);--hfe-ref-3:light-dark(#af52de,#bf5af2);--hfe-ref-4:light-dark(#30d158,#34c759);--hfe-ref-5:light-dark(#ff2d54,#ff375f);--hfe-ref-6:light-dark(#30b0c7,#40c8e0);--hfe-ref-7:light-dark(#5856d6,#5e5ce6);--hfe-ref-8:light-dark(#a2855e,#ac8e68);--hfe-error-padding-horizontal:var(--ht-comments-textarea-horizontal-padding);--hfe-error-padding-vertical:var(--ht-comments-textarea-vertical-padding);--hfe-formula-bar-background:var(--ht-background-color);--hfe-formula-bar-foreground:var(--ht-foreground-color);--hfe-formula-bar-border:var(--ht-border-color);--hfe-formula-bar-border-width:1px;--hfe-formula-bar-border-radius:var(--ht-border-radius);--hfe-formula-bar-padding-vertical:var(--ht-cell-vertical-padding);--hfe-formula-bar-padding-horizontal:var(--ht-cell-horizontal-padding)}.handsontable .hfe-editor{outline:none;box-sizing:border-box!important}.handsontable .hfe-editor--focused{outline:none}.ht-formula-builder__formula-bar .hfe-formula-bar__overlay .hfe-editor--focused{outline:var(--hfe-border-width-focus)solid var(--hfe-formula-bar-input-focus-ring);outline-offset:calc(-1*var(--hfe-border-width-focus))}.handsontable .ht-formula-builder__inline-editor{width:100%;height:100%}.handsontable .ht-formula-builder__inline-editor>.handsontableInput{resize:none;width:100%;height:100%;overflow:hidden}.handsontable .ht-formula-builder__inline-editor .hfe-editor{box-shadow:none;--hfe-padding-vertical:calc(var(--ht-cell-vertical-padding) + 1px);--hfe-padding-horizontal:calc(var(--ht-cell-horizontal-padding) + 1px)}.ht-formula-builder__formula-bar .hfe-formula-bar__overlay{--hfe-editor-max-lines:1}.ht-formula-builder__formula-bar.hfe-formula-bar .hfe-formula-bar__cell--formula{padding:0;padding-inline-start:var(--hfe-formula-bar-padding-horizontal)}.ht-formula-builder__formula-bar.hfe-formula-bar .hfe-formula-bar__idle{height:calc(var(--hfe-line-height) + 2*var(--hfe-formula-bar-padding-vertical))}.ht-formula-builder__formula-bar.hfe-formula-bar .hfe-overlay,.ht-formula-builder__formula-bar.hfe-formula-bar .hfe-editor__input{padding:var(--hfe-formula-bar-padding-vertical)var(--hfe-border-width-focus)}.ht-formula-builder__formula-bar .hfe-editor--height-capped .hfe-overlay,.ht-formula-builder__formula-bar .hfe-editor--height-capped .hfe-editor__input{scrollbar-width:auto}.handsontable .ht-formula-builder__inline-editor .hfe-editor:after{content:"";border:var(--hfe-border-width)solid var(--hfe-editor-color-border);pointer-events:none;position:absolute;inset:0}.handsontable .hfe-editor__input,.handsontable .hfe-overlay{box-sizing:border-box;font-weight:var(--ht-font-weight,400)}.handsontable .hfe-fn-help__learn-more,.handsontable .hfe-fn-help__learn-more:hover{color:var(--hfe-color-foreground)}.handsontable td.ht-formula-builder__editing-cell{color:#0000}.handsontable .htCommentCell{position:relative}.handsontable .htCommentCell:after{content:"";border-inline-start:var(--ht-comments-indicator-size,4px)solid #0000;border-inline-end:none;border-top:var(--ht-comments-indicator-size,4px)solid var(--ht-comments-indicator-color,#1a42e8);top:0;display:block;position:absolute;inset-inline-start:unset;inset-inline-end:0}.htCommentsContainer .htComments{z-index:1059;display:none;position:absolute}.htCommentsContainer .htCommentTextArea{font-family:var(--ht-font-family),-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;box-shadow:var(--ht-menu-shadow-x,0)var(--ht-menu-shadow-y,0)var(--ht-menu-shadow-blur,8px)color-mix(in srgb,var(--ht-menu-shadow-color,#000)var(--ht-menu-shadow-opacity,100%),transparent);width:240px;height:88px;font-size:var(--ht-font-size);line-height:var(--ht-line-height);font-weight:var(--ht-font-weight);padding:var(--ht-comments-textarea-vertical-padding)var(--ht-comments-textarea-horizontal-padding);border:var(--ht-comments-textarea-border-width,1px)solid var(--ht-comments-textarea-border-color,transparent);border-inline-start:var(--ht-comments-textarea-border-width,1px)solid var(--ht-comments-textarea-border-color,#1a42e8);color:var(--ht-comments-textarea-foreground-color);background-color:var(--ht-comments-textarea-background-color,#fff);box-sizing:border-box;-webkit-appearance:none;margin:0 -1px;outline:0!important}.htCommentsContainer .htCommentTextArea:focus{border:var(--ht-comments-textarea-focus-border-width,1px)solid var(--ht-comments-textarea-focus-border-color,#1a42e8);color:var(--ht-comments-textarea-focus-foreground-color);background-color:var(--ht-comments-textarea-focus-background-color,#fff)}.htBorders .wtBorder.ht-border-style-dashed-vertical{background-image:repeating-linear-gradient(to bottom,var(--ht-custom-border-color)0 5px,transparent 0 10px)}.htBorders .wtBorder.ht-border-style-dashed-horizontal{background-image:repeating-linear-gradient(to right,var(--ht-custom-border-color)0 5px,transparent 0 10px)}.htBorders .wtBorder.ht-border-style-dotted-horizontal{background-image:radial-gradient(circle,var(--ht-custom-border-color)calc(var(--ht-custom-border-size)/2),transparent 0);background-size:calc(var(--ht-custom-border-size)*2)var(--ht-custom-border-size);background-repeat:repeat-x}.htBorders .wtBorder.ht-border-style-dotted-vertical{background-image:radial-gradient(circle,var(--ht-custom-border-color)calc(var(--ht-custom-border-size)/2),transparent 0);background-size:var(--ht-custom-border-size)calc(var(--ht-custom-border-size)*2);background-repeat:repeat-y}.handsontable .colHeader.columnSorting.sortAction{box-sizing:border-box;min-width:min(var(--ht-icon-size,16px) + 8px,100%);flex-grow:0;max-width:100%;margin-inline:auto;position:static}.handsontable .colHeader.columnSorting.sortAction:after{margin-inline:var(--ht-sort-indicator-offset);margin-inline-end:var(--ht-sort-indicator-offset-end)}.handsontable .htLeft .colHeader.columnSorting.sortAction{margin-left:0;margin-right:auto}.handsontable .htRight .colHeader.columnSorting.sortAction{margin-left:auto;margin-right:0}.handsontable th .relative{--ht-sort-indicator-offset:var(--ht-cell-horizontal-padding);--ht-sort-indicator-offset-end:var(--ht-cell-horizontal-padding);--ht-sort-indicator-reserve:var(--ht-cell-horizontal-padding);--ht-sort-indicator-reserve-end:var(--ht-sort-indicator-reserve);--ht-header-button-slot:calc(var(--ht-icon-size,16px) + 2px);--ht-header-indicator-min-width:calc(2*var(--ht-cell-horizontal-padding) + 2*var(--ht-icon-size,16px) + 6px);--ht-header-indicator-min-content-width:calc(2*var(--ht-icon-size,16px) + 6px);--ht-header-gap:2px}.handsontable .relative.has-header-button{--ht-sort-indicator-offset-end:calc(var(--ht-cell-horizontal-padding) + var(--ht-icon-size,16px) + (var(--ht-icon-button-hit-area-size,24px) - var(--ht-icon-size,16px))*.5);--ht-sort-indicator-reserve-end:var(--ht-cell-horizontal-padding)}.handsontable .relative.has-sort-indicator.has-header-button{--ht-header-gap:clamp(2px,calc((100% - var(--ht-header-indicator-min-content-width))*1000 + 2px),calc(2px + var(--ht-header-button-slot)));column-gap:var(--ht-header-gap)}.handsontable .relative.has-sort-indicator{--ht-sort-indicator-reserve:calc(var(--ht-cell-horizontal-padding) + var(--ht-icon-size,16px) + 2px);padding-inline-end:var(--ht-sort-indicator-reserve-end)}.handsontable .relative.htRight.has-sort-indicator,.handsontable .htRight .relative.has-sort-indicator{--ht-header-button-slot:0px;padding-inline-start:var(--ht-sort-indicator-reserve);padding-inline-end:var(--ht-cell-horizontal-padding)}.handsontable .relative.htRight.has-sort-indicator.has-header-button,.handsontable .htRight .relative.has-sort-indicator.has-header-button{padding-inline-start:clamp(var(--ht-cell-horizontal-padding),(100% - var(--ht-header-indicator-min-width))*1000 + var(--ht-cell-horizontal-padding),var(--ht-sort-indicator-reserve))}.handsontable .relative.has-header-button .colHeader.columnSorting.sortAction{min-width:min(var(--ht-icon-size,16px) + 8px,max(0px,100% - var(--ht-icon-size,16px) - 2px - var(--ht-header-gap)))}.handsontable .relative.has-header-button.has-sort-indicator>.ht-sort-indicator{max-width:clamp(0px,(100% - var(--ht-header-indicator-min-width))*1000,var(--ht-icon-size,16px));overflow:hidden}.handsontable .relative.has-header-button.has-sort-indicator .colHeader.columnSorting.sortAction:after{max-width:clamp(0px,(100% - var(--ht-header-indicator-min-width))*1000,8px);overflow:hidden}.handsontable .columnSorting:not(.indicatorDisabled){position:relative}.handsontable .columnSorting:not(.indicatorDisabled).sortAction:hover{cursor:pointer;text-decoration:none}.handsontable th .relative>.ht-sort-indicator{pointer-events:auto;top:50%;position:absolute;inset-inline-end:calc(var(--ht-sort-indicator-offset-end) + 2px);transform:translateY(-50%)}.handsontable .columnSorting.sortAction~.ht-sort-indicator,.handsontable .columnSorting.sortAction~.ht-sort-indicator:hover{cursor:pointer}.handsontable .relative.htRight>.ht-sort-indicator,.handsontable .htRight .relative>.ht-sort-indicator{inset-inline-start:calc(var(--ht-sort-indicator-offset) + 2px);inset-inline-end:auto}[dir=rtl] .handsontable .relative.htRight.has-sort-indicator,[dir=rtl] .handsontable .htRight .relative.has-sort-indicator{--ht-header-button-slot:calc(var(--ht-icon-size,16px) + 2px);padding-inline-start:var(--ht-cell-horizontal-padding);padding-inline-end:var(--ht-sort-indicator-reserve-end)}[dir=rtl] .handsontable .relative.htLeft.has-sort-indicator,[dir=rtl] .handsontable .htLeft .relative.has-sort-indicator{--ht-header-button-slot:0px;padding-inline-start:var(--ht-sort-indicator-reserve);padding-inline-end:var(--ht-cell-horizontal-padding)}[dir=rtl] .handsontable .relative.htLeft.has-sort-indicator.has-header-button,[dir=rtl] .handsontable .htLeft .relative.has-sort-indicator.has-header-button{padding-inline-start:clamp(var(--ht-cell-horizontal-padding),(100% - var(--ht-header-indicator-min-width))*1000 + var(--ht-cell-horizontal-padding),var(--ht-sort-indicator-reserve))}[dir=rtl] .handsontable .relative.htRight>.ht-sort-indicator,[dir=rtl] .handsontable .htRight .relative>.ht-sort-indicator{inset-inline-start:auto;inset-inline-end:calc(var(--ht-sort-indicator-offset-end) + 2px)}[dir=rtl] .handsontable .relative.htLeft>.ht-sort-indicator,[dir=rtl] .handsontable .htLeft .relative>.ht-sort-indicator{inset-inline-start:calc(var(--ht-sort-indicator-offset) + 2px);inset-inline-end:auto}.htGhostTable .htCore .relative{--ht-sort-indicator-offset:0px;--ht-sort-indicator-offset-end:0px;--ht-header-button-slot:0px}.htGhostTable .htCore .relative.has-header-button{--ht-sort-indicator-reserve:var(--ht-cell-horizontal-padding);--ht-sort-indicator-reserve-end:var(--ht-cell-horizontal-padding)}.htGhostTable .htCore .relative.has-header-button .colHeader.columnSorting.sortAction{min-width:min(var(--ht-icon-size,16px) + 8px,100%)}.htGhostTable .htCore .relative.has-header-button .colHeader.columnSorting.sortAction:after,.htGhostTable .htCore .relative.has-header-button.has-sort-indicator>.ht-sort-indicator{max-width:none}.htGhostTable .htCore .relative.has-sort-indicator.has-header-button{--ht-header-gap:calc(2px + var(--ht-header-button-slot));column-gap:var(--ht-header-gap)}.htGhostTable .htCore span.colHeader.columnSorting:not(.indicatorDisabled):before{content:"*";padding-inline-end:calc(var(--ht-icon-size,16px) + 2px);display:inline-block;position:relative}.htGhostTable .htCore span.colHeader.columnSorting.sortAction:not(.indicatorDisabled):before{width:var(--ht-icon-size,16px)}.handsontable .colHeader.columnSorting:after{content:"";text-align:right;width:8px;margin-top:4px;font-size:8px;display:block;position:absolute;top:50%;right:0;transform:translateY(-50%)}.handsontable .colHeader.columnSorting[class^=sort-]:after,.handsontable .colHeader.columnSorting[class*=\\ sort-]:after{content:"+"}.handsontable .colHeader.columnSorting.sort-1:after{content:"1"}.handsontable .colHeader.columnSorting.sort-2:after{content:"2"}.handsontable .colHeader.columnSorting.sort-3:after{content:"3"}.handsontable .colHeader.columnSorting.sort-4:after{content:"4"}.handsontable .colHeader.columnSorting.sort-5:after{content:"5"}.handsontable .colHeader.columnSorting.sort-6:after{content:"6"}.handsontable .colHeader.columnSorting.sort-7:after{content:"7"}.handsontable .htRight .colHeader.columnSorting:after,[dir=rtl] .handsontable .colHeader.columnSorting:after{text-align:left;left:0;right:auto}[dir=rtl] .handsontable .htLeft .colHeader.columnSorting:after{text-align:right;left:auto;right:0}.htGhostTable th div:has(.changeType) span.colHeader.columnSorting:not(.indicatorDisabled){padding-inline-end:var(--ht-gap-size)}.handsontable .ht_clone_top_inline_start_corner th.ht__active_highlight,.handsontable .ht_clone_top_inline_end_corner th.ht__active_highlight{box-shadow:none}[dir=rtl].handsontable .ht-freeze-bar-guide--rows,[dir=rtl].handsontable .ht-freeze-bar-ghost--rows{--ht-freeze-bar-header-side:to left}[dir=rtl].handsontable.ht-freeze-bar-columns .manualColumnResizer.ht-resize-handle--freeze-before:before{left:0}[dir=rtl].handsontable.ht-freeze-bar-columns .manualColumnResizer.ht-resize-handle--freeze-before:after{left:calc(6px + var(--ht-sizing-size-1))}[dir=rtl].handsontable.ht-freeze-bar-columns .manualColumnResizer.ht-resize-handle--freeze-after:before{left:calc(0px - var(--ht-sizing-size-1))}[dir=rtl].handsontable.ht-freeze-bar-columns .manualColumnResizer.ht-resize-handle--freeze-after:after{left:6px}.handsontable .ht-freeze-bar{z-index:105;background:var(--ht-freeze-bar-color);cursor:grab;touch-action:none;position:absolute}.handsontable .ht-freeze-bar--active{cursor:grabbing}.handsontable .ht-freeze-bar--hover:not(.ht-freeze-bar--wide){--ht-freeze-bar-hover-side:to bottom;--ht-freeze-bar-header-paint:var(--ht-freeze-bar-hover-color);background:linear-gradient(var(--ht-freeze-bar-hover-side),var(--ht-freeze-bar-color)var(--ht-freeze-bar-header-from),var(--ht-freeze-bar-header-paint)var(--ht-freeze-bar-header-from),var(--ht-freeze-bar-header-paint)var(--ht-freeze-bar-header-to),var(--ht-freeze-bar-color)var(--ht-freeze-bar-header-to))}.handsontable .ht-freeze-bar--hover:not(.ht-freeze-bar--wide).ht-freeze-bar--active{--ht-freeze-bar-header-paint:var(--ht-freeze-bar-highlight-color)}.handsontable .ht-freeze-bar--hover:not(.ht-freeze-bar--wide).ht-freeze-bar--top,.handsontable .ht-freeze-bar--hover:not(.ht-freeze-bar--wide).ht-freeze-bar--bottom{--ht-freeze-bar-hover-side:to right}.handsontable .ht-freeze-bar--focused{outline:var(--ht-sizing-size-0-5)solid var(--ht-accent-color);outline-offset:calc(-1*var(--ht-sizing-size-0-5))}@media (pointer:coarse){.handsontable .ht-freeze-bar:before{content:"";position:absolute;inset:0}.handsontable .ht-freeze-bar.ht-freeze-bar--start:before{inset-inline-start:-12px}.handsontable .ht-freeze-bar.ht-freeze-bar--top:before{inset-block-start:-12px}.handsontable .ht-freeze-bar.ht-freeze-bar--end:before{inset-inline-end:-12px}.handsontable .ht-freeze-bar.ht-freeze-bar--bottom:before{inset-block-end:-12px}}.handsontable .ht-freeze-bar--start{width:var(--ht-sizing-size-1);top:0;bottom:0;inset-inline-end:0}.handsontable .ht-freeze-bar--top{height:var(--ht-sizing-size-1);inset-inline:0;bottom:0}.handsontable .ht-freeze-bar--end{width:var(--ht-sizing-size-1);top:0;bottom:0;inset-inline-start:0}.handsontable .ht-freeze-bar--bottom{height:var(--ht-sizing-size-1);inset-inline:0;top:0}.handsontable .ht-freeze-bar--empty{z-index:190}.handsontable .ht-freeze-bar--empty.ht-freeze-bar--start{inset-inline-end:auto}.handsontable .ht-freeze-bar--empty.ht-freeze-bar--top{bottom:auto;inset-inline:0}.handsontable .ht-freeze-bar--empty.ht-freeze-bar--end{inset-inline-start:auto}.handsontable .ht-freeze-bar--empty.ht-freeze-bar--bottom{top:auto;inset-inline:0}.handsontable .ht-freeze-bar--empty.ht-freeze-bar--wide{background:0 0}.handsontable .ht-freeze-bar--empty.ht-freeze-bar--wide:after{content:"";background:var(--ht-freeze-bar-color);position:absolute}.handsontable .ht-freeze-bar--empty.ht-freeze-bar--wide.ht-freeze-bar--hover:after{background:var(--ht-freeze-bar-hover-color)}.handsontable .ht-freeze-bar--empty.ht-freeze-bar--wide.ht-freeze-bar--hover.ht-freeze-bar--active:after{background:var(--ht-freeze-bar-highlight-color)}.handsontable .ht-freeze-bar--empty.ht-freeze-bar--wide.ht-freeze-bar--start:after{height:var(--ht-freeze-bar-corner);inset-block-start:0;inset-inline:0}.handsontable .ht-freeze-bar--empty.ht-freeze-bar--wide.ht-freeze-bar--top:after{width:var(--ht-freeze-bar-corner);inset-block:0;inset-inline-start:0}@media (pointer:coarse){.handsontable .ht-freeze-bar--empty.ht-freeze-bar--wide.ht-freeze-bar--start:before{height:var(--ht-freeze-bar-corner);inset:0 -20px auto}.handsontable .ht-freeze-bar--empty.ht-freeze-bar--wide.ht-freeze-bar--top:before{width:var(--ht-freeze-bar-corner);inset-block:-20px;inset-inline:0 auto}}.handsontable.ht-freeze-bar-columns .manualColumnResizer.ht-resize-handle--freeze-before:before{left:calc(2px - var(--ht-sizing-size-1))}.handsontable.ht-freeze-bar-columns .manualColumnResizer.ht-resize-handle--freeze-before:after{left:8px;right:auto}.handsontable.ht-freeze-bar-columns .manualColumnResizer.ht-resize-handle--freeze-after:before{left:2px}.handsontable.ht-freeze-bar-columns .manualColumnResizer.ht-resize-handle--freeze-after:after{right:auto;left:calc(8px + var(--ht-sizing-size-1))}.handsontable.ht-freeze-bar-rows .manualRowResizer.ht-resize-handle--freeze-before:before{top:calc(2px - var(--ht-sizing-size-1))}.handsontable.ht-freeze-bar-rows .manualRowResizer.ht-resize-handle--freeze-before:after{top:8px;bottom:auto}.handsontable.ht-freeze-bar-rows .manualRowResizer.ht-resize-handle--freeze-after:before{top:2px}.handsontable.ht-freeze-bar-rows .manualRowResizer.ht-resize-handle--freeze-after:after{bottom:auto;top:calc(8px + var(--ht-sizing-size-1))}.handsontable.ht-freeze-bar-dragging,.handsontable.ht-freeze-bar-dragging *{cursor:grabbing}.handsontable .ht-freeze-bar-guide,.handsontable .ht-freeze-bar-ghost{--ht-freeze-bar-header-side:to bottom;z-index:216;background:linear-gradient(var(--ht-freeze-bar-header-side),var(--ht-freeze-bar-highlight-color)var(--ht-freeze-bar-header),var(--ht-freeze-bar-shadow-color)var(--ht-freeze-bar-header))}.handsontable .ht-freeze-bar-guide--rows,.handsontable .ht-freeze-bar-ghost--rows{--ht-freeze-bar-header-side:to right}.handsontable .ht-freeze-bar-guide{--ht-freeze-bar-shadow-color:color-mix(in srgb,var(--ht-freeze-bar-color)60%,transparent)}.handsontable .ht-freeze-bar-ghost{z-index:217;--ht-freeze-bar-shadow-color:color-mix(in srgb,var(--ht-freeze-bar-highlight-color)25%,transparent)}.handsontable .manualColumnResizer{cursor:col-resize;opacity:0;z-index:210;background:0 0;width:10px;margin:0;position:absolute;top:0}.handsontable .manualColumnResizer:before,.handsontable .manualColumnResizer:after{content:"";background:var(--ht-resize-indicator-color);border-radius:2px;width:2px;height:calc(100% - 12px);max-height:16px;margin-top:.5px;display:block;position:absolute;top:50%;left:1px;transform:translateY(-50%)}.handsontable .manualColumnResizer:after{left:auto;right:0}.handsontable .manualColumnResizer:hover,.handsontable .manualColumnResizer.active{opacity:1}.handsontable .manualColumnResizerGuide{border-inline-end:1px solid var(--ht-accent-color);width:0;inset-inline-end:unset;border-inline-start:none;margin-inline-start:5px;margin-inline-end:unset;display:none;position:absolute;top:0}.handsontable .manualColumnResizerGuide.active{z-index:209;display:block}.handsontable .manualRowResizer{z-index:210;cursor:row-resize;opacity:0;background:0 0;height:10px;margin:0;position:absolute;left:0}.handsontable .manualRowResizer:before,.handsontable .manualRowResizer:after{content:"";background:var(--ht-resize-indicator-color);border-radius:2px;width:calc(100% - 12px);max-width:16px;height:2px;display:block;position:absolute;top:1px;left:50%;transform:translate(-50%)}.handsontable .manualRowResizer:after{top:auto;bottom:0}.handsontable .manualRowResizer:hover,.handsontable .manualRowResizer.active{opacity:1}.handsontable .manualRowResizerGuide{border-bottom:1px solid var(--ht-accent-color);border-top:none;height:0;margin-top:5px;display:none;position:absolute;bottom:0;left:0}.handsontable .manualRowResizerGuide.active{z-index:209;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-multiple]:before,.handsontable tbody td[rowspan][class*=area][class*=highlight][class*=fullySelectedMergedCell-0]:before{opacity:.14}.handsontable tbody td[rowspan][class*=area][class*=highlight][class*=fullySelectedMergedCell-1]:before{opacity:.21}.handsontable tbody td[rowspan][class*=area][class*=highlight][class*=fullySelectedMergedCell-2]:before{opacity:.28}.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:.42}.handsontable tbody td[rowspan][class*=area][class*=highlight][class*=fullySelectedMergedCell-5]:before{opacity:.49}.handsontable tbody td[rowspan][class*=area][class*=highlight][class*=fullySelectedMergedCell-6]:before{opacity:.56}.handsontable tbody td[rowspan][class*=area][class*=highlight][class*=fullySelectedMergedCell-7]:before{opacity:.63}.handsontable .ht__manualColumnMove.after-selection--columns thead th.ht__highlight,.handsontable .ht__manualColumnMove.after-selection--columns thead th.ht__active_highlight,.handsontable.ht__manualColumnMove.after-selection--columns thead th.ht__highlight,.handsontable.ht__manualColumnMove.after-selection--columns thead th.ht__active_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,.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,.handsontable.ht__manualColumnMove.on-moving--columns .manualColumnResizer{display:none}.handsontable .ht__manualColumnMove--guideline,.handsontable .ht__manualColumnMove--backlight,.handsontable.ht__manualColumnMove--guideline,.handsontable.ht__manualColumnMove--backlight{height:100%;display:none;position:absolute}.handsontable .ht__manualColumnMove--guideline,.handsontable.ht__manualColumnMove--guideline{z-index:205;background:var(--ht-move-indicator-color,#1a42e8);width:1px;margin-inline:-.5px 0;top:0}.handsontable .ht__manualColumnMove--backlight,.handsontable.ht__manualColumnMove--backlight{z-index:205;pointer-events:none;background:color-mix(in srgb,var(--ht-move-backlight-color)var(--ht-move-backlight-opacity,100%),transparent);display:none}.handsontable .on-moving--columns.show-ui .ht__manualColumnMove--guideline,.handsontable .on-moving--columns .ht__manualColumnMove--backlight,.handsontable.on-moving--columns.show-ui .ht__manualColumnMove--guideline,.handsontable.on-moving--columns .ht__manualColumnMove--backlight{display:block}.handsontable .wtHider{position:relative}.handsontable .ht__manualRowMove.after-selection--rows tbody th.ht__highlight,.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,.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,.handsontable.ht__manualRowMove.on-moving--rows .manualRowResizer{display:none}.handsontable .ht__manualRowMove--guideline,.handsontable .ht__manualRowMove--backlight,.handsontable.ht__manualRowMove--guideline,.handsontable.ht__manualRowMove--backlight{width:100%;display:none;position:absolute}.handsontable .ht__manualRowMove--guideline,.handsontable.ht__manualRowMove--guideline{border-top:1px solid var(--ht-move-indicator-color);z-index:205;left:0}.handsontable .ht__manualRowMove--backlight,.handsontable.ht__manualRowMove--backlight{z-index:205;pointer-events:none;background:color-mix(in srgb,var(--ht-move-backlight-color)var(--ht-move-backlight-opacity,100%),transparent);display:none}.handsontable .on-moving--rows.show-ui .ht__manualRowMove--guideline,.handsontable .on-moving--rows .ht__manualRowMove--backlight,.handsontable.on-moving--rows.show-ui .ht__manualRowMove--guideline,.handsontable.on-moving--rows .ht__manualRowMove--backlight{display:block}.ht-dialog{scrollbar-width:auto;scrollbar-color:var(--ht-scrollbar-thumb-color)var(--ht-scrollbar-track-color);font-size:var(--ht-font-size);line-height:var(--ht-line-height);letter-spacing:var(--ht-letter-spacing);z-index:1060;opacity:0;border-radius:var(--ht-border-radius);border:1px solid var(--ht-border-color);width:100%;height:100%;display:none;position:absolute;top:0;left:0;overflow-y:auto;box-sizing:border-box!important}.ht-dialog[dir=rtl]{left:auto;right:0}.ht-dialog:focus,.ht-dialog:has(.htFocusCatcher:focus){border:1px solid var(--ht-accent-color);outline:none}.ht-dialog *{box-sizing:border-box!important}.ht-dialog--background-solid{background-color:var(--ht-dialog-solid-background-color)}.ht-dialog--background-semi-transparent{background-color:color-mix(in srgb,var(--ht-dialog-semi-transparent-background-color)var(--ht-dialog-semi-transparent-background-opacity,100%),transparent)}.ht-dialog--animation{transition:opacity var(--ht-table-transition)ease-in-out}.ht-dialog--show{opacity:1}.ht-dialog__content-wrapper{width:100%;min-height:100%;padding:calc(var(--ht-gap-size)*4);border-radius:var(--ht-border-radius);justify-content:center;align-items:center;display:flex}.ht-dialog__content{padding:var(--ht-dialog-content-padding-horizontal)var(--ht-dialog-content-padding-vertical);max-width:480px;color:var(--ht-foreground-color);position:relative}.ht-dialog__content--background{box-shadow:var(--ht-shadow-x,0)var(--ht-shadow-y,0)var(--ht-shadow-blur,8px)color-mix(in srgb,var(--ht-shadow-color,#000)var(--ht-shadow-opacity,100%),transparent);border-radius:var(--ht-dialog-content-border-radius);background-color:var(--ht-dialog-content-background-color)}.ht-dialog--confirm .ht-dialog__content-wrapper{text-align:center;padding:calc(var(--ht-gap-size)*2)}.ht-dialog--confirm .ht-dialog__content-wrapper-inner{max-width:480px;padding:calc(var(--ht-gap-size)*2);border-radius:var(--ht-border-radius);flex-direction:column;justify-content:center;align-items:center;display:flex}.ht-dialog--confirm .ht-dialog__content-wrapper-inner--background{box-shadow:var(--ht-shadow-x,0)var(--ht-shadow-y,0)var(--ht-shadow-blur,8px)color-mix(in srgb,var(--ht-shadow-color,#000)var(--ht-shadow-opacity,100%),transparent);border-radius:var(--ht-dialog-content-border-radius);background-color:var(--ht-dialog-content-background-color)}.ht-dialog--confirm .ht-dialog__content-wrapper-inner:focus{box-shadow:0 0 0 1px var(--ht-accent-color);outline:none}.ht-dialog--confirm .ht-dialog__content{justify-content:center;align-items:center;gap:var(--ht-gap-size);flex-direction:column;display:flex}.ht-dialog--confirm .ht-dialog__content:has(.ht-dialog__buttons){gap:calc(var(--ht-gap-size)*2)}.ht-dialog--confirm .ht-dialog__title{font-size:var(--ht-font-size);font-weight:var(--ht-font-weight);line-height:var(--ht-line-height);margin:0}.ht-dialog--confirm .ht-dialog__description{color:var(--ht-foreground-secondary-color);font-size:var(--ht-font-size-small);line-height:var(--ht-line-height-small);font-weight:var(--ht-font-weight);margin:0}.ht-dialog--confirm .ht-dialog__buttons{justify-content:center;gap:calc(var(--ht-gap-size)*2);flex-flow:wrap;display:flex}.ht-notification{z-index:1070;pointer-events:none;position:absolute;inset:0;overflow:visible}.ht-notification__stack{overscroll-behavior:contain;pointer-events:auto;-webkit-overflow-scrolling:touch;scrollbar-width:auto;scrollbar-color:var(--ht-scrollbar-thumb-color)var(--ht-scrollbar-track-color);flex-direction:column;gap:10px;max-width:min(420px,100% - 40px);min-height:0;padding:10px;display:flex;position:absolute;overflow:hidden auto}.ht-notification__stack--top-start{top:10px;align-items:flex-start;max-height:calc(100% - 40px);inset-inline-start:10px}.ht-notification__stack--top-end{top:10px;align-items:flex-end;max-height:calc(100% - 40px);inset-inline-end:10px}.ht-notification__stack--bottom-start{bottom:10px;align-items:flex-start;max-height:calc(100% - 40px);inset-inline-start:10px}.ht-notification__stack--bottom-end{bottom:10px;align-items:flex-end;max-height:calc(100% - 40px);inset-inline-end:10px}.ht-notification__toast{box-shadow:var(--ht-shadow-x,0)var(--ht-shadow-y,0)var(--ht-shadow-blur,8px)color-mix(in srgb,var(--ht-shadow-color,#000)var(--ht-shadow-opacity,100%),transparent);pointer-events:auto;max-width:100%;color:var(--ht-notification-foreground-color,var(--ht-foreground-color));background-color:var(--ht-notification-background-color,var(--ht-background-color));border:1px solid var(--ht-notification-border-color,var(--ht-border-color));border-radius:var(--ht-border-radius,4px);font-size:var(--ht-font-size);line-height:var(--ht-line-height);letter-spacing:var(--ht-letter-spacing);outline:none;flex-shrink:0;display:flex;position:relative}.ht-notification__toast:focus-visible{box-shadow:0 0 0 1px var(--ht-accent-color)}.ht-notification__toast--animate{opacity:0;transition:opacity var(--ht-table-transition,.15s)ease-out,transform var(--ht-table-transition,.15s)ease-out}.ht-notification__toast--animate.ht-notification__toast--stack-top:not(.ht-notification__toast--visible){transform:translateY(-6px)}.ht-notification__toast--animate.ht-notification__toast--stack-bottom:not(.ht-notification__toast--visible){transform:translateY(6px)}.ht-notification__toast--visible{opacity:1;transform:translateY(0)}.ht-notification__toast--info .ht-notification__accent{display:none}.ht-notification__toast--success .ht-notification__accent{background-color:var(--ht-notification-success-accent,#37bc6c)}.ht-notification__toast--warning .ht-notification__accent{background-color:var(--ht-notification-warning-accent,#fbe952)}.ht-notification__toast--error .ht-notification__accent{background-color:var(--ht-notification-error-accent,#fa4d32)}.ht-notification__toast-inner{width:100%;min-width:0;direction:inherit;flex-direction:row;align-items:stretch;gap:0;padding:10px;display:flex}.ht-notification__accent{box-sizing:border-box;border-radius:4px;flex:0 0 4px;align-self:stretch;margin-inline-end:10px}.ht-notification__body{flex:auto;min-width:0}.ht-notification__title{margin:0 0 var(--ht-gap-size);font-size:var(--ht-font-size);font-weight:var(--ht-font-weight,600)}.ht-notification__message{font-size:var(--ht-font-size-small);word-break:break-word;margin:0}.ht-notification__actions{gap:var(--ht-gap-size);margin-top:var(--ht-gap-size);flex-wrap:wrap;display:flex}.ht-notification__close{box-sizing:border-box;width:var(--ht-icon-button-hit-area-size);height:var(--ht-icon-button-hit-area-size);color:var(--ht-icon-button-icon-color,inherit);cursor:pointer;border-radius:var(--ht-icon-button-border-radius,var(--ht-border-radius,4px));background:0 0;border:none;flex:none;align-self:flex-start;margin-inline-start:4px;padding:0;position:relative;overflow:visible}.ht-notification__close .ht-icon{margin-top:calc(-.5*var(--ht-icon-size));top:50%;margin-inline-start:calc(-.5*var(--ht-icon-size));position:absolute;inset-inline-start:50%}.ht-notification__close:hover{color:var(--ht-icon-button-hover-icon-color,inherit);background-color:var(--ht-icon-button-hover-background-color,color-mix(in srgb,var(--ht-foreground-color)8%,transparent))}.ht-notification__close:focus-visible{outline:2px solid var(--ht-accent-color);outline-offset:2px}.handsontable.ht-pagination{width:100%;color:var(--ht-pagination-bar-foreground-color);background:var(--ht-pagination-bar-background-color);font-size:var(--ht-font-size);line-height:var(--ht-line-height);box-sizing:border-box;overflow-x:auto}.handsontable.ht-pagination:not(.ht-slot-element){border:1px solid var(--ht-border-color);border-radius:var(--ht-border-radius)}.handsontable.ht-pagination .ht-pagination__inner{justify-content:space-between;align-items:center;gap:calc(var(--ht-gap-size)*4);padding-inline:var(--ht-pagination-bar-horizontal-padding);padding-block:var(--ht-pagination-bar-vertical-padding);flex-wrap:wrap;min-width:230px;display:flex}.handsontable.ht-pagination .ht-page-size-section{align-items:center;gap:calc(var(--ht-gap-size)*2);display:flex}.handsontable.ht-pagination .ht-page-size-section__label{white-space:nowrap;font-size:inherit;line-height:inherit;font-weight:inherit;letter-spacing:inherit;font-family:inherit}.handsontable.ht-pagination .ht-page-size-section__select-wrapper{border-radius:var(--ht-input-border-radius);background-color:var(--ht-input-background-color);position:relative}.handsontable.ht-pagination .ht-page-size-section__select-wrapper:focus-within{background-color:var(--ht-input-focus-background-color)}.handsontable.ht-pagination .ht-page-size-section__select-wrapper:hover{background-color:var(--ht-input-hover-background-color)}.handsontable.ht-pagination .ht-page-size-section__select-wrapper select{padding-inline-start:var(--ht-gap-size);padding-inline-end:calc(var(--ht-gap-size) + var(--ht-icon-size));padding-top:var(--ht-gap-size);padding-bottom:var(--ht-gap-size);border-radius:var(--ht-input-border-radius);color:var(--ht-input-foreground-color);border:1px solid var(--ht-input-border-color);line-height:calc(var(--ht-line-height) - 4px);-webkit-appearance:none;font-size:inherit;cursor:pointer;background-color:#0000}.handsontable.ht-pagination .ht-page-size-section__select-wrapper select:disabled{opacity:.4;cursor:default;color:var(--ht-input-disabled-foreground-color);border-color:var(--ht-input-disabled-border-color)}.handsontable.ht-pagination .ht-page-size-section__select-wrapper select:hover:not(:disabled){color:var(--ht-input-hover-foreground-color);border-color:var(--ht-input-hover-border-color)}.handsontable.ht-pagination .ht-page-size-section__select-wrapper select:focus{color:var(--ht-input-focus-foreground-color);border-color:var(--ht-input-focus-border-color);outline:none}.handsontable.ht-pagination .ht-page-size-section__select-wrapper .ht-icon{color:var(--ht-foreground-color);inset-inline-end:var(--ht-gap-size);position:absolute;top:50%;transform:translateY(-50%)}.handsontable.ht-pagination .ht-page-counter-section{margin-inline-end:auto}.handsontable.ht-pagination .ht-page-navigation-section{align-items:center;gap:1px;display:flex}.handsontable.ht-pagination .ht-page-navigation-section__button{font-size:inherit;border:1px solid var(--ht-pagination-button-border-color);color:var(--ht-pagination-button-foreground-color);background-color:var(--ht-pagination-button-background-color);border-radius:var(--ht-icon-button-large-border-radius);padding:var(--ht-icon-button-large-padding);cursor:pointer}.handsontable.ht-pagination .ht-page-navigation-section__button .ht-icon{display:block}.handsontable.ht-pagination .ht-page-navigation-section__button--disabled{cursor:default;pointer-events:none;color:var(--ht-pagination-button-disabled-foreground-color);background-color:var(--ht-pagination-button-disabled-background-color);border-color:var(--ht-pagination-button-disabled-border-color)}.handsontable.ht-pagination .ht-page-navigation-section__button:hover:not(:disabled){border-color:var(--ht-pagination-button-hover-border-color);color:var(--ht-pagination-button-hover-foreground-color);background-color:var(--ht-pagination-button-hover-background-color)}.handsontable.ht-pagination .ht-page-navigation-section__button:focus{border-color:var(--ht-pagination-button-focus-border-color);color:var(--ht-pagination-button-focus-foreground-color);background-color:var(--ht-pagination-button-focus-background-color);outline:none}.handsontable.ht-pagination .ht-page-navigation-section__label{white-space:nowrap;text-align:center;min-width:100px;font-size:inherit;line-height:inherit;font-weight:inherit;letter-spacing:inherit;font-family:inherit}.handsontable.htSheetsBarMenu{overflow:hidden}.handsontable.htSheetsBarMenu>.ht_master{padding-block:0}.handsontable.htMenu.htSheetsBarMenu .ht_master .wtHolder,.handsontable.htMenu.htSheetsBarMenu .ht_master .htScrollbarFrame{box-shadow:none}.handsontable.htSheetsBarMenu .ht_master .wtHolder{padding-block:var(--ht-menu-vertical-padding,8px);max-height:calc(8*(var(--ht-line-height) + var(--ht-menu-item-vertical-padding)*2 + 1px));overflow:hidden auto}.handsontable.htSheetsBarMenu table tbody tr td .htItemWrapper span.selected .ht-icon{color:var(--ht-menu-item-active-color,var(--ht-accent-color))}.handsontable.htSheetsBarMenu table tbody tr td .htItemWrapper{text-overflow:ellipsis;white-space:nowrap;max-width:32ch;padding-inline-end:calc(var(--ht-icon-size) + var(--ht-gap-size));overflow:hidden}.handsontable.htSheetsBarMenu table tbody tr td.htCustomMenuRenderer:not(.htDisabled):hover{cursor:pointer;background:color-mix(in srgb,var(--ht-menu-item-hover-color)var(--ht-menu-item-hover-color-opacity,100%),transparent)!important}.handsontable.htSheetsBarMenu table tbody tr td.htCustomMenuRenderer:not(.htDisabled).current{box-shadow:inset 0 0 0 1px var(--ht-menu-item-active-color,var(--ht-accent-color))}.handsontable.ht-sheets-bar{--ht-private-tab-enter-offset:-2em;--ht-private-sheets-bar-button-width:calc((2*var(--ht-icon-button-large-padding)) + var(--ht-icon-size) + 2px);width:100%;color:var(--ht-bar-foreground-color);background:var(--ht-sheets-bar-background-color);font-size:var(--ht-font-size);line-height:var(--ht-line-height);box-sizing:border-box;overflow:auto hidden}.handsontable.ht-sheets-bar:not(.ht-slot-element){border:1px solid var(--ht-border-color);border-radius:var(--ht-border-radius)}.handsontable.ht-sheets-bar.ht-slot-element{border-top-width:1px}.handsontable.ht-sheets-bar[dir=rtl]{--ht-private-tab-enter-offset:2em}.handsontable.ht-sheets-bar .ht-sheets-bar__inner{min-width:min-content;padding-inline:var(--ht-sheets-bar-horizontal-padding);grid-template-columns:auto minmax(auto,1fr) auto;align-items:stretch;display:grid}.handsontable.ht-sheets-bar .ht-sheets-bar__tabs-sizer{visibility:hidden;pointer-events:none;grid-area:1/2/auto/4;min-width:max-content;height:0;display:grid;overflow:clip}.handsontable.ht-sheets-bar .ht-sheets-bar__tabs-sizer>div{white-space:nowrap;padding-inline:var(--ht-sheets-bar-tab-horizontal-padding)calc(var(--ht-sheets-bar-tab-horizontal-padding) + var(--ht-sizing-size-1) + var(--ht-icon-size) + var(--ht-gap-size) + 2px + 2*var(--ht-private-sheets-bar-button-width) + 1px + 2*var(--ht-gap-size));grid-area:1/1}.handsontable.ht-sheets-bar .ht-sheets-bar__controls,.handsontable.ht-sheets-bar .ht-sheets-bar__paging{flex:none;align-items:center;gap:1px;display:flex}.handsontable.ht-sheets-bar .ht-sheets-bar__controls[hidden],.handsontable.ht-sheets-bar .ht-sheets-bar__paging[hidden]{display:none}.handsontable.ht-sheets-bar .ht-sheets-bar__controls{padding-inline:calc(var(--ht-gap-size)*2);grid-area:1/1;position:relative}.handsontable.ht-sheets-bar.ht-sheets-bar--strip-scrolled .ht-sheets-bar__controls:after{content:"";background:var(--ht-border-color);z-index:1;pointer-events:none;inset-inline-end:0;width:1px;position:absolute;top:0;bottom:0}.handsontable.ht-sheets-bar .ht-sheets-bar__paging{grid-area:1/3;padding-inline-start:calc(var(--ht-gap-size)*2);position:relative}.handsontable.ht-sheets-bar.ht-sheets-bar--strip-more-end .ht-sheets-bar__paging:before{content:"";background:var(--ht-border-color);z-index:1;pointer-events:none;inset-inline-start:0;width:1px;position:absolute;top:0;bottom:0}.handsontable.ht-sheets-bar .ht-sheets-bar__button{font-size:inherit;border:1px solid var(--ht-pagination-button-border-color);color:var(--ht-pagination-button-foreground-color);background-color:var(--ht-pagination-button-background-color);border-radius:var(--ht-icon-button-large-border-radius);padding:var(--ht-icon-button-large-padding);cursor:pointer;justify-content:center;align-items:center;display:flex}.handsontable.ht-sheets-bar .ht-sheets-bar__button:disabled,.handsontable.ht-sheets-bar .ht-sheets-bar__button.ht-sheets-bar__button--disabled{cursor:default;pointer-events:none;color:var(--ht-pagination-button-disabled-foreground-color);background-color:var(--ht-pagination-button-disabled-background-color);border-color:var(--ht-pagination-button-disabled-border-color)}.handsontable.ht-sheets-bar .ht-sheets-bar__button:hover:not(:disabled,.ht-sheets-bar__button--disabled){border-color:var(--ht-pagination-button-hover-border-color);color:var(--ht-pagination-button-hover-foreground-color);background-color:var(--ht-pagination-button-hover-background-color)}.handsontable.ht-sheets-bar .ht-sheets-bar__button:focus-visible{border-color:var(--ht-pagination-button-focus-border-color);color:var(--ht-pagination-button-focus-foreground-color);background-color:var(--ht-pagination-button-focus-background-color);outline:none}.handsontable.ht-sheets-bar .ht-sheets-bar__tabs{contain:inline-size;grid-area:1/2;align-items:stretch;min-width:0;padding-inline-end:1px;display:flex;position:relative;overflow-x:auto;scrollbar-width:none!important}.handsontable.ht-sheets-bar .ht-sheets-bar__tabs::-webkit-scrollbar{display:none}.handsontable.ht-sheets-bar .ht-sheets-bar__tab{isolation:isolate;cursor:pointer;align-items:center;gap:var(--ht-sizing-size-1);padding-inline:var(--ht-sheets-bar-tab-horizontal-padding);padding-block:var(--ht-sheets-bar-tab-vertical-padding);color:var(--ht-sheets-bar-tab-foreground-color);background:var(--ht-sheets-bar-tab-background-color);-webkit-user-select:none;user-select:none;touch-action:pan-x pan-y;transition:transform var(--ht-private-tab-slide-duration,var(--ht-table-transition))var(--ht-private-tab-slide-easing,ease-out),color var(--ht-table-transition)ease-out;flex:none;display:flex;position:relative}@media (prefers-reduced-motion:reduce){.handsontable.ht-sheets-bar .ht-sheets-bar__tab{transition:none}}.handsontable.ht-sheets-bar .ht-sheets-bar__tab--entering{animation:ht-sheets-bar-tab-enter var(--ht-table-transition)ease-out backwards}@media (prefers-reduced-motion:reduce){.handsontable.ht-sheets-bar .ht-sheets-bar__tab--entering{animation:none}}.handsontable.ht-sheets-bar .ht-sheets-bar__tab:hover{color:var(--ht-sheets-bar-tab-hover-foreground-color)}.handsontable.ht-sheets-bar .ht-sheets-bar__tab--active,.handsontable.ht-sheets-bar .ht-sheets-bar__tab--active:hover{color:var(--ht-sheets-bar-tab-active-foreground-color);background:var(--ht-sheets-bar-tab-active-background-color)}.handsontable.ht-sheets-bar .ht-sheets-bar__tab--active:after{content:"";border-block-end:var(--ht-sheets-bar-tab-active-border-width)solid var(--ht-sheets-bar-tab-active-border-color);pointer-events:none;inset-inline:0;position:absolute;bottom:0}.handsontable.ht-sheets-bar .ht-sheets-bar__tab--dragging{z-index:1;pointer-events:none;color:var(--ht-sheets-bar-tab-hover-foreground-color);background-color:var(--ht-sheets-bar-tab-background-color);box-shadow:var(--ht-shadow-x,0)var(--ht-shadow-y,0)var(--ht-shadow-blur,8px)color-mix(in srgb,var(--ht-shadow-color,#000)var(--ht-shadow-opacity,100%),transparent);transition:none;animation:none}.handsontable.ht-sheets-bar .ht-sheets-bar__tab--lifted{z-index:1;color:var(--ht-sheets-bar-tab-hover-foreground-color);background-color:var(--ht-sheets-bar-tab-background-color);box-shadow:var(--ht-shadow-x,0)var(--ht-shadow-y,0)var(--ht-shadow-blur,8px)color-mix(in srgb,var(--ht-shadow-color,#000)var(--ht-shadow-opacity,100%),transparent)}.handsontable.ht-sheets-bar .ht-sheets-bar__tab--active.ht-sheets-bar__tab--dragging,.handsontable.ht-sheets-bar .ht-sheets-bar__tab--active.ht-sheets-bar__tab--lifted{color:var(--ht-sheets-bar-tab-active-foreground-color);background-color:var(--ht-sheets-bar-tab-active-background-color)}@media (forced-colors:active){.handsontable.ht-sheets-bar .ht-sheets-bar__tab--lifted,.handsontable.ht-sheets-bar .ht-sheets-bar__tab--dragging{outline-offset:-2px;outline:2px solid highlight}}.handsontable.ht-sheets-bar .ht-sheets-bar__tab-ghost{top:0;bottom:0;left:var(--ht-private-tab-ghost-x,0);align-items:center;gap:var(--ht-sizing-size-1);box-sizing:border-box;width:var(--ht-private-tab-ghost-width,0);padding-inline:var(--ht-sheets-bar-tab-horizontal-padding);padding-block:var(--ht-sheets-bar-tab-vertical-padding);color:var(--ht-sheets-bar-tab-foreground-color);background:var(--ht-sheets-bar-tab-background-color);pointer-events:none;-webkit-user-select:none;user-select:none;animation:ht-sheets-bar-tab-leave var(--ht-table-transition)ease-in both;display:flex;position:absolute}@media (prefers-reduced-motion:reduce){.handsontable.ht-sheets-bar .ht-sheets-bar__tab-ghost{animation:none}}.handsontable.ht-sheets-bar .ht-sheets-bar__tabs--sliding{--ht-private-tab-slide-easing:ease-in-out}.handsontable.ht-sheets-bar .ht-sheets-bar__tab--slide-lead{z-index:1}.handsontable.ht-sheets-bar .ht-sheets-bar__tab-indicator{z-index:0;width:var(--ht-private-tab-indicator-width);transform:translateX(var(--ht-private-tab-indicator-x));background:var(--ht-sheets-bar-tab-active-background-color);border-block-end:var(--ht-sheets-bar-tab-active-border-width)solid var(--ht-sheets-bar-tab-active-border-color);pointer-events:none;transition-property:transform,width;transition-timing-function:ease-in-out;position:absolute;top:0;bottom:0;left:0}@media (prefers-reduced-motion:reduce){.handsontable.ht-sheets-bar .ht-sheets-bar__tab-indicator{transition:none}}.handsontable.ht-sheets-bar .ht-sheets-bar__tabs--indicator-moving:before{content:"";width:var(--ht-private-tab-indicator-path-width,0);transform:translateX(var(--ht-private-tab-indicator-path-x,0));background:var(--ht-sheets-bar-tab-background-color);pointer-events:none;position:absolute;top:0;bottom:0;left:0}.handsontable.ht-sheets-bar .ht-sheets-bar__tabs--indicator-moving .ht-sheets-bar__tab--indicator-path,.handsontable.ht-sheets-bar .ht-sheets-bar__tabs--indicator-moving .ht-sheets-bar__tab--active{background:0 0}.handsontable.ht-sheets-bar .ht-sheets-bar__tabs--indicator-moving .ht-sheets-bar__tab--active:after{content:none}.handsontable.ht-sheets-bar .ht-sheets-bar__tab-label,.handsontable.ht-sheets-bar .ht-sheets-bar__tab-chevron{color:inherit;font-size:inherit;line-height:inherit;font-weight:inherit;letter-spacing:inherit;cursor:pointer;background:0 0;border:none;margin:0;padding:0;font-family:inherit}.handsontable.ht-sheets-bar .ht-sheets-bar__tab:focus-visible{outline:1px solid var(--ht-pagination-button-focus-border-color);outline-offset:-1px}.handsontable.ht-sheets-bar .ht-sheets-bar__tab-chevron{color:var(--ht-icon-button-icon-color);padding:var(--ht-gap-size);margin-inline-end:calc(var(--ht-gap-size)*-1);margin-block:calc(var(--ht-gap-size)*-1);align-items:center;display:flex;position:relative}.handsontable.ht-sheets-bar .ht-sheets-bar__tab-chevron:before{content:"";inset:var(--ht-gap-size);border-radius:var(--ht-icon-button-border-radius);display:block;position:absolute}.handsontable.ht-sheets-bar .ht-sheets-bar__tab-chevron:after{content:"";inset:min(0px,(100% - var(--ht-icon-button-hit-area-size))/2);position:absolute}.handsontable.ht-sheets-bar .ht-sheets-bar__tab-chevron .ht-icon{z-index:1;position:relative}.handsontable.ht-sheets-bar .ht-sheets-bar__tab--active .ht-sheets-bar__tab-chevron:hover,.handsontable.ht-sheets-bar .ht-sheets-bar__tab--active .ht-sheets-bar__tab-chevron:focus-visible{color:var(--ht-icon-button-hover-icon-color)}.handsontable.ht-sheets-bar .ht-sheets-bar__tab--active .ht-sheets-bar__tab-chevron:hover:before,.handsontable.ht-sheets-bar .ht-sheets-bar__tab--active .ht-sheets-bar__tab-chevron:focus-visible:before{background-color:var(--ht-icon-button-hover-background-color);box-shadow:0 0 0 1px var(--ht-icon-button-hover-border-color)}.handsontable.ht-sheets-bar .ht-sheets-bar__tab--renaming .ht-sheets-bar__tab-chevron{display:none}.handsontable.ht-sheets-bar .ht-sheets-bar__tab--renaming,.handsontable.ht-sheets-bar .ht-sheets-bar__tab--renaming:hover{color:var(--ht-cell-editor-foreground-color);background:var(--ht-cell-editor-background-color);outline:2px solid var(--ht-cell-editor-border-color);outline-offset:-2px}.handsontable.ht-sheets-bar .ht-sheets-bar__tab--renaming:after{content:none}.handsontable.ht-sheets-bar .ht-sheets-bar__tab-rename{font-size:inherit;line-height:inherit;font-weight:inherit;letter-spacing:inherit;color:inherit;-webkit-user-select:text;user-select:text;box-shadow:none;background:0 0;border:none;border-radius:0;outline:none;max-width:40ch;height:auto;min-height:0;max-height:none;margin:0;padding:0;font-family:inherit}.handsontable.ht-sheets-bar .ht-sheets-bar__tab-rename-mirror{visibility:hidden;pointer-events:none;white-space:pre;font-size:inherit;line-height:inherit;font-weight:inherit;letter-spacing:inherit;border:none;margin:0;padding:0;font-family:inherit;position:absolute}.handsontable.ht-sheets-bar.ht-sheets-bar-pressing,.handsontable.ht-sheets-bar.ht-sheets-bar-pressing .ht-sheets-bar__tab,.handsontable.ht-sheets-bar.ht-sheets-bar-pressing .ht-sheets-bar__tab *,.handsontable.ht-sheets-bar.ht-sheets-bar-dragging,.handsontable.ht-sheets-bar.ht-sheets-bar-dragging *{cursor:move;cursor:-moz-grabbing;cursor:-webkit-grabbing;cursor:grabbing}.handsontable.ht-sheets-bar.ht-sheets-bar-dragging .ht-sheets-bar__tab{pointer-events:none}@keyframes ht-sheets-bar-tab-enter{0%{opacity:0;transform:translateX(var(--ht-private-tab-enter-offset))}to{opacity:1;transform:translate(0)}}@keyframes ht-sheets-bar-tab-leave{0%{opacity:1;transform:translate(0)}to{opacity:0;transform:translateX(var(--ht-private-tab-enter-offset))}}.ht-loading__icon-svg{width:var(--ht-icon-size);height:var(--ht-icon-size);color:var(--ht-accent-color);transform-origin:50%;animation:1s linear infinite ht-loading-spin;display:block}.ht-loading__content{align-items:center;gap:calc(var(--ht-gap-size)*2);display:flex}.ht-loading__title{font-size:var(--ht-font-size);font-weight:var(--ht-font-weight);line-height:var(--ht-line-height);margin:0}.ht-loading__description{color:var(--ht-foreground-secondary-color);font-size:var(--ht-font-size-small);line-height:var(--ht-line-height-small);font-weight:var(--ht-font-weight);margin:0}@keyframes ht-loading-spin{to{transform:rotate(360deg)}}.handsontable .htAsyncPending{position:relative}.handsontable .htAsyncIndicator{box-sizing:border-box;width:calc(var(--ht-icon-size)*.75);height:calc(var(--ht-icon-size)*.75);margin-top:calc(var(--ht-icon-size)*-.375);border:2px solid var(--ht-async-indicator-color,var(--ht-accent-color));pointer-events:none;top:50%;border-inline-end-color:#0000;border-radius:50%;animation:1s linear infinite ht-async-values-spin;position:absolute;inset-inline-end:var(--ht-cell-horizontal-padding)}@media (prefers-reduced-motion:reduce){.handsontable .htAsyncIndicator{animation:none}}.handsontable .htAutocompleteArrow~.htAsyncIndicator,.handsontable .ht-multi-select-arrow~.htAsyncIndicator{inset-inline-end:calc(var(--ht-cell-horizontal-padding) + var(--ht-icon-size)*1.25)}.handsontable td.htRight>.htAsyncIndicator{inset-inline:auto;left:var(--ht-cell-horizontal-padding)}.handsontable td.htLeft>.htAsyncIndicator{inset-inline:auto;right:var(--ht-cell-horizontal-padding)}.handsontable .htAsyncErrorMarker{border-inline-start:3px solid var(--ht-async-error-marker-color,var(--ht-notification-error-accent));pointer-events:none;width:0;position:absolute;inset-block:0;inset-inline-start:0}.handsontable .htAsyncErrorMessage,.handsontable .htAsyncPendingMessage{clip-path:inset(50%);white-space:nowrap;-webkit-user-select:none;user-select:none;width:1px;height:1px;position:absolute;overflow:hidden}.handsontable tbody tr>td.htAsyncError{background-color:var(--ht-async-error-background-color,var(--ht-cell-error-background-color));position:relative}@keyframes ht-async-values-spin{to{transform:rotate(360deg)}}.ht-empty-data-state{scrollbar-width:auto;scrollbar-color:var(--ht-scrollbar-thumb-color)var(--ht-scrollbar-track-color);z-index:999;border:1px solid var(--ht-border-color);border-radius:var(--ht-border-radius);box-sizing:border-box;background-color:var(--ht-background-color);width:100%;display:none;position:absolute;left:0;overflow-y:auto}.ht-empty-data-state *{box-sizing:border-box!important}.ht-empty-data-state__content-wrapper{text-align:center;width:100%;min-height:100%;padding:calc(var(--ht-gap-size)*2);border-radius:var(--ht-border-radius);justify-content:center;align-items:center;display:flex}.ht-empty-data-state__content-wrapper-inner{max-width:480px;padding:calc(var(--ht-gap-size)*2);border-radius:var(--ht-border-radius);flex-direction:column;justify-content:center;align-items:center;display:flex}.ht-empty-data-state__content-wrapper-inner:focus{box-shadow:0 0 0 1px var(--ht-accent-color);outline:none}.ht-empty-data-state__content{justify-content:center;align-items:center;gap:var(--ht-gap-size);flex-direction:column;display:flex}.ht-empty-data-state__title{font-size:var(--ht-font-size);font-weight:var(--ht-font-weight);line-height:var(--ht-line-height);margin:0}.ht-empty-data-state__description{color:var(--ht-foreground-secondary-color);font-size:var(--ht-font-size-small);line-height:var(--ht-line-height-small);font-weight:var(--ht-font-weight);margin:0}.ht-empty-data-state__buttons{justify-content:center;gap:calc(var(--ht-gap-size)*2);flex-flow:wrap;display:flex}.ht-empty-data-state__buttons--has-buttons{margin-top:calc(var(--ht-gap-size)*2)}.ht-empty-data-state__spinner{width:28px;height:28px;margin-bottom:calc(var(--ht-gap-size)*2);border:2px solid var(--ht-border-color);border-top-color:var(--ht-accent-color);border-radius:50%;flex-shrink:0;animation:.75s linear infinite ht-empty-data-state-spin}@media (prefers-reduced-motion:reduce){.ht-empty-data-state__spinner{border-top-color:var(--ht-border-color);animation:none}}.ht-empty-data-state--loading .ht-empty-data-state__content{gap:calc(var(--ht-gap-size)*.5)}.ht-empty-data-state--disable-top-border{border-top-width:0;border-start-start-radius:0;border-start-end-radius:0}.ht-empty-data-state--disable-inline-border{border-inline-start-width:0;border-start-start-radius:0;border-end-start-radius:0}.ht-empty-data-state--disable-bottom-border{border-bottom-width:0;border-end-end-radius:0;border-end-start-radius:0}.ht-root-wrapper.ht-slot-bottom-filled .ht-empty-data-state{border-end-end-radius:0;border-end-start-radius:0}@keyframes ht-empty-data-state-spin{to{transform:rotate(360deg)}}.handsontable th.htRowSelectionCell,.handsontable th.htRowSelectionHeader{cursor:pointer}.handsontable th.htRowSelectionCell .htRowSelectionCheckboxBox,.handsontable th.htRowSelectionHeader .htRowSelectionCheckboxBox{margin-inline:0}.handsontable th.htRowSelectionHeader .htRowSelectionCheckboxBox{margin-block:0}.handsontable th.htRowSelectionCheckboxOnly .relative{justify-content:center;height:100%}.handsontable th.htRowSelectionCheckboxOnly .colHeader{display:none}.handsontable .htRowSelectionCheckbox.htRowSelectionCheckboxHidden,.handsontable .htRowSelectionCheckbox.htRowSelectionCheckboxHidden+.ht-icon{visibility:hidden}.handsontable tbody tr>td.htRowSelected,.handsontable tbody tr>th.htRowSelected{background-image:linear-gradient(var(--ht-row-selection-background-color),var(--ht-row-selection-background-color))}.handsontable th.htCheckboxHeader .htCheckboxHeaderBox{margin-block:0}',this.#tf.head.appendChild(t)}#aQ(){let e=this.getCSSVariableValue("line-height"),t=this.getCSSVariableValue("cell-vertical-padding"),r=Number.parseFloat(this.getStyleForTD("border-bottom-width")??""),i=Math.round(r);if(null===e||null===t||isNaN(i))return null;let n=e+2*t+i;return Number.isFinite(n)&&r>i?this.#a0(n):n}#a0(e){let t=this.#a1(e),r=t-e;return r>0?r>this.#a2()?e:t:e}#a2(){let e=this.#a3();return e>0&&e<1?1/e-1:1}getMaxDefaultRowOvergrowth(){let e=this.#a3();return e>0&&e<1?1/e-1:0}#a3(){return this.#tf.defaultView?.devicePixelRatio??1}#a1(e){let t=this.#a3();if(null!==this.#aj&&this.#aj.declaredRowHeight===e&&this.#aj.devicePixelRatio===t)return this.#aj.cellHeight;let r=Number.parseFloat(this.#a6(["height"]).height);return r>0&&(this.#aj={declaredRowHeight:e,devicePixelRatio:t,cellHeight:r}),r}#aJ(){this.#az=!this.#a5(),this.#aV=getComputedStyle(this.#aB);let e=this.#a6(["box-sizing","border-bottom-width"]);this.#aG.td={...this.#aG.td,...{"box-sizing":e["box-sizing"],"border-bottom-width":e["border-bottom-width"]}}}#a6(e){let t=this.#tf,r=this.#aB,i=t.createElement("table"),n=t.createElement("tbody"),o=t.createElement("tr"),s=t.createElement("tr"),l=t.createElement("td");i.className="htCore",l.textContent="\xa0",s.appendChild(l),n.appendChild(o),n.appendChild(s),i.appendChild(n),r.appendChild(i);let a=getComputedStyle(l),h={};return e.forEach(e=>{h[e]=a.getPropertyValue(e)}),r.removeChild(i),h}#aq(e){let t=Math.ceil(Number.parseFloat(this.#aX(e)??""));return Number.isNaN(t)?null:t}#aX(e){let t=this.#aV?.getPropertyValue(e)??null;return""===t?null:t}#aZ(){this.#aG={},this.#aW={},this.#a$={},this.#aj=null}#a5(){if(!this.#aB.isConnected)return!1;let e=this.#aB.ownerDocument.defaultView;return null!==e&&""!==e.getComputedStyle(this.#aB).display}recacheValuesMeasuredWithoutStyles(){return!!this.#az&&!!this.#a5()&&(this.clearCache(),!0)}clearCache(){this.#aZ(),this.#aJ()}}function mZ(e,t,r){return"array"!==e&&t>0&&r>=t}let mJ=null,m0=null,m1=[];function m2(e,t){let r=e.createElement("div");r.setAttribute("role","status"),r.setAttribute("aria-live",t),r.setAttribute("aria-atomic","true");let i=r.style;return i.position="absolute",i.width="1px",i.height="1px",i.margin="-1px",i.overflow="hidden",i.clipPath="rect(0 0 0 0)",i.whiteSpace="nowrap",r}function m3(e,t="assertive"){let r="polite"===t?m0:mJ;r&&(r.textContent="",setTimeout(()=>{(r===mJ||r===m0)&&(r.textContent=e)},100))}let m6={TOP:"top",BOTTOM:"bottom"},m5="ht-slot-element";class m4{#eD;#i2=new Map;#a4=0;#a8=[];#a9;#a7;constructor(e,{itemClass:t="",onContentChange:r=()=>{}}={}){this.#eD=e,this.#a9=t,this.#a7=r}getElement(){return this.#eD}has(e){return this.#i2.has(e)}add(e,t,r=0){let i=this.#i2.get(e),n=i?i.seq:this.#a4;i&&i.element.remove(),this.#a9&&t.classList.add(this.#a9),this.#i2.set(e,{element:t,weight:r,seq:n}),i||(this.#a4+=1),this.#he(),this.#a7()}remove(e){let t=this.#i2.get(e);t&&(this.#a9&&t.element.classList.remove(this.#a9),t.element.remove(),this.#i2.delete(e),this.#a7())}setOrder(e){this.#a8=Array.isArray(e)?e.slice():[],this.#he()}getOrder(){return this.#ht()}clear(){this.#i2.forEach(e=>e.element.remove()),this.#i2.clear(),this.#a7()}#ht(){let e=this.#a8;return Array.from(this.#i2.keys()).sort((t,r)=>{let i=e.indexOf(t),n=e.indexOf(r);if(-1!==i||-1!==n)return(-1===i?1/0:i)-(-1===n?1/0:n);let o=this.#i2.get(t),s=this.#i2.get(r);return o.weight!==s.weight?o.weight-s.weight:o.seq-s.seq})}#he(){let e=this.#eD.firstChild;this.#ht().forEach(t=>{let r=this.#i2.get(t).element;r===e?e=e.nextSibling:this.#eD.insertBefore(r,e)})}}function m8(e,t){let r=t.parentElement;if(!r)return;let i=null!==t.querySelector(`:scope > .${m5}`);r.classList.toggle(`ht-slot-${e}-filled`,i)}class m9{#hr;constructor(e){this.#hr=new Map(Object.keys(e).map(t=>[t,new m4(e[t],{itemClass:m5,onContentChange:()=>m8(t,e[t])})]))}getSlot(e){let t=this.#hr.get(e);return t||tf(`Unknown layout slot "${e}".`),t}register(e,t,{side:r,weight:i=0}){this.getSlot(r).add(e,t,i)}unregister(e,t){this.getSlot(t).remove(e)}applyConfig(e={}){Object.values(m6).forEach(t=>this.getSlot(t).setOrder(e?.[t]??[]))}destroy(){this.#hr.forEach(e=>e.clear())}}let m7="http://www.w3.org/2000/svg";function fe(e,t){let r=t.createDocumentFragment(),i={};return(Array.isArray(e)?e:[e]).forEach(e=>{e&&r.appendChild(function e(t,r,i,n){let o=t.ns??n,s=o?r.createElementNS(o,t.tag):r.createElement(t.tag);return void 0!==t.className&&(o?s.setAttribute("class",t.className):s.className=t.className),t.attrs&&Object.keys(t.attrs).forEach(e=>{s.setAttribute(e,String(t.attrs[e]))}),void 0!==t.text&&(s.textContent=t.text),t.children?.forEach(t=>{t&&s.appendChild(e(t,r,i,o))}),void 0!==t.ref&&(i[t.ref]=s),s}(e,t,i))}),{fragment:r,refs:i}}let ft="mailto:sales@handsontable.com",fr="mailto:support@handsontable.com",fi="https://handsontable.com/docs/tutorial-license-key.html",fn={trial_valid:{title:"Handsontable Trial",body:({daysRemaining:e})=>`Your Handsontable license key ${e8(e)}. ${tt}`,linkText:"Contact Sales",linkHref:ft,dismissible:!1},trial_notice:{title:"Handsontable Trial",body:({daysRemaining:e})=>`Your Handsontable license key ${e8(e)}. ${tt}`,linkText:"Contact Sales",linkHref:ft,dismissible:!1},trial_soft_stop:{title:"Handsontable Trial Expired",body:()=>`${te} ${tt}`,linkText:"Contact Sales",linkHref:ft,dismissible:!0}},fo={trial_hard_stop:({licensedUntil:e})=>({title:`Your Handsontable trial license key expired on ${e}.`,description:"You may no longer use Handsontable under the trial license. To continue using the software, contact sales@handsontable.com to purchase a valid license.",action:{text:"Contact Sales",href:ft}}),invalid:()=>({title:"The license key for Handsontable is invalid.",description:"",action:{text:"Contact Support",href:fr},docsLink:{text:"Read more",href:fi,trailingText:" on how to install it properly, or contact us at support@handsontable.com."}}),missing:()=>({title:"The license key for Handsontable is missing.",description:"Use your purchased key to activate the product. ",action:{text:"Contact Support",href:fr},docsLink:{text:"Read more",href:fi,trailingText:" about it in the documentation, or contact us at support@handsontable.com."}})},fs="ht-license-powered-by",fl="licensePoweredBy",fa=`plugin:${fl}`,fh="licenseNotification",fd=`plugin:${fh}`,fu="hot-display-license-info",fc=`${fu}_missing-features`,fg=new Set,fp=new WeakMap,fm=new WeakSet;function ff(e){return e.rootSlotBottomElement?.querySelector(`.${fu}`)??null}function fw(e,t){let r=Array.from(e.children).find(e=>e.classList.contains(fs))??null;t.classList.add(m5),e.insertBefore(t,r),m8(m6.BOTTOM,e)}function fy(e,t){let r=e.rootSlotBottomElement;r&&(fw(r,t),e.getFocusScopeManager().registerScope(fh,t,{shortcutsContextName:fd,runOnlyIf:()=>null!==ff(e),onActivate:t=>{let r,i=(r=ff(e))?Array.from(r.querySelectorAll("a[href]")):[];i.length>0&&("tab_from_above"===t?i[0]?.focus():"tab_from_below"===t&&i[i.length-1]?.focus())}}))}function fb(e){let t,r,i;if(e.isDestroyed||!sC(e)||!fm.has(e))return;if(t=sv.get(e),t?.features.forEach(({isStillMissing:e},r)=>{null===e||e()||t.features.delete(r)}),r=sv.get(e),i=e.getSettings().licenseKey,void 0===r||r.key!==("string"==typeof i?i:"")||!(r.features.size>0)){sv.delete(e),fS(e);return}let n=function(e){let t=sv.get(e);if(!t)return null;let r=[...t.features.keys()],i=r.some(e=>!t.written.has(e));if(!i&&r.length===t.written.size)return null;t.written=new Set(r);let n=[...t.features.entries()].map(([e,{name:t}])=>({capability:e,name:t})).sort((e,t)=>e.name<t.name?-1:1);return{key:t.key,features:n,added:i}}(e);if(null===n)return;let{channels:o}=tc(n.key),{text:s,parts:l}=e7(n.features),a=`${n.key}
|
|
68
|
+
${n.features.map(({capability:e})=>e).join(",")}`;o.console&&n.added&&!fg.has(a)&&(fg.add(a),rd(s)),o.ui?function(e,t){let r=e.rootSlotBottomElement;if(!r)return;let i=r.ownerDocument,n=ff(e);n||((n=fp.get(e)??null)?fw(r,n):(fy(e,n=tg(i,fu)),fp.set(e,n)));let o=n.querySelector(`.${fc}`);o?(rK(o),e5(o,t,i)):n.appendChild(tp(i,fu,t,fc))}(e,l):fS(e)}function fC(e,t){!sR(t)||sE(e,t.capability)||(sT(e,t),fb(e),tf(e7([t]).text))}function fS(e){let t=ff(e),r=t?.querySelector(`.${fc}`);if(t&&r&&(r.remove(),null===t.querySelector(`.${fu}_inner`))){let e=t.parentElement;t.remove(),e&&m8(m6.BOTTOM,e)}}let fv=Object.freeze(["xlsx:import","xlsx:export","xlsx:formulas","xlsx:layout","xlsx:number_formats","xlsx:comments","xlsx:styles","xlsx:conditional_formatting","xlsx:data_validation","xlsx:protection"]),fR=Object.freeze(["xlsx:import","xlsx:formulas","xlsx:layout","xlsx:comments","xlsx:styles","xlsx:conditional_formatting","xlsx:data_validation","xlsx:protection"]),fE=Object.freeze(["xlsx:export","xlsx:formulas","xlsx:layout","xlsx:number_formats","xlsx:comments","xlsx:styles","xlsx:conditional_formatting","xlsx:data_validation","xlsx:protection"]),fT=Object.freeze({"xlsx:import":"import","xlsx:export":"export","xlsx:formulas":"formulas","xlsx:layout":"layout","xlsx:number_formats":"numberFormats","xlsx:comments":"comments","xlsx:styles":"styles","xlsx:conditional_formatting":"conditionalFormatting","xlsx:data_validation":"dataValidation","xlsx:protection":"protection"}),fx=Object.freeze({"xlsx:import":Object.freeze(["standard","professional"]),"xlsx:export":Object.freeze(["standard","professional"]),"xlsx:formulas":Object.freeze(["standard","professional"]),"xlsx:layout":Object.freeze(["standard","professional"]),"xlsx:number_formats":Object.freeze(["professional"]),"xlsx:comments":Object.freeze(["professional"]),"xlsx:styles":Object.freeze(["professional"]),"xlsx:conditional_formatting":Object.freeze(["professional"]),"xlsx:data_validation":Object.freeze(["professional"]),"xlsx:protection":Object.freeze(["professional"])}),fA=Object.freeze({import:!0,export:!0,formulas:!0,layout:!0,numberFormats:!0,comments:!0,importReport:!0,styles:!0,conditionalFormatting:!0,dataValidation:!0,protection:!0,missing:Object.freeze([])});function fM(e,t){let r=e.missing.filter(e=>t.includes(e));return r.length===e.missing.length?e:Object.freeze({...e,missing:Object.freeze(r)})}function fI(e,t){return`The xlsx ${e} skipped features your license does not unlock: ${t.join(", ")}.`}let fN=new WeakMap,fO=new Map;function fk(e){let{licenseKey:t}=e.getSettings(),r=fN.get(e);if(r&&r.key===t)return r.state;let i=tc(t,"20/11/2026");return fN.set(e,{key:t,state:i}),i}function fH(e){let{licenseKey:t}=e.getSettings();if("string"!=typeof t)return fA;let r=fO.get(t);return r||(r=function(e,t=fx){if(null==e)return fA;let r={},i=[];return fv.forEach(n=>{let o=(t[n]??[]).some(t=>e.includes(t));r[fT[n]]=o,o||i.push(n)}),Object.freeze({...r,importReport:!0,missing:Object.freeze(i)})}(tc(t).tiers),fO.set(t,r)),r}let f_="ht-license-popover",fP="is-open",fD="is-dismissed",fL="is-corner-hover",fF="is-cornerless";function fB(e){let t=e.view?.getOverlayByName(rp),r=t?.clone?.wtTable;return r?.TABLE?{table:r.TABLE,thead:r.THEAD??null}:null}let fV="ht-dialog",fz="licenseLock",fU=`plugin:${fz}`;function fW(e,t,r){let i=e,n=t;if(i<0){if((n+=i)<=0)return null;i=0}return i>=r?null:{start:i,amount:n}}let f$=e=>e.replace(/[A-Z]/g,e=>`-${e.toLowerCase()}`),fG=e=>{let t=`--ht-icon-${f$(e)}`;return`.ht-icon-${f$(e)} {
|
|
69
69
|
-webkit-mask-image: var(${t}, linear-gradient(transparent, transparent));
|
|
70
70
|
mask-image: var(${t}, linear-gradient(transparent, transparent));
|
|
71
71
|
-webkit-mask-size: contain;
|
|
@@ -93,13 +93,13 @@ ${r}
|
|
|
93
93
|
}
|
|
94
94
|
|
|
95
95
|
${t.map(fG).join("\n\n")}
|
|
96
|
-
`)),this.themeStyles.parentNode!==this.hot.rootWrapperElement&&this.hot.rootWrapperElement.prepend(this.themeStyles)}getClassName(){return this.themeClassName}getOverrides(){return{...this.#hl}}getColorScheme(){return this.#hl.colorScheme??this.themeConfig?.colorScheme}getDensityType(){return this.#hl.density??this.themeConfig?.density?.type}setOverrides(e){return!!this.#hh(e)&&(this.#hf(),!0)}update(e){this.hot&&(void 0===e.getThemeConfig&&tf('[ThemeManager] The "theme" option must be an instance of ThemeBuilder.'),this.themeConfig=e.getThemeConfig(),this.themeClassName=`ht-theme-${this.themeConfig.name}`,this.#hg(),"function"==typeof e.subscribe&&(this.#hs?.(),this.#hs=e.subscribe(e=>{this.hot?.stylesHandler&&(this.themeConfig=e,this.#hg(),this.#hf(),this.hot.stylesHandler.clearCache(),this.hot.render(),this.hot.runHooks("afterSetTheme",this.themeClassName,!1))})),this.mount(),this.hot.runHooks("afterSetTheme",this.themeClassName,!0))}mount(){this.#hw(),this.#hf()}unmount(){this.#hy(),this.themeStyles&&this.themeStyles.remove()}#hw(){[this.hot?.rootWrapperElement,this.hot?.rootPortalElement].forEach(e=>{e&&rW(e,this.scopeClassName)})}#hy(){[this.hot?.rootWrapperElement,this.hot?.rootPortalElement].forEach(e=>{e&&r$(e,this.scopeClassName)})}destroy(){this.#hs?.(),this.unmount(),this.hot.themeManager=null}}let wl={size_0:"0px",size_0_5:"2px",size_1:"4px",size_2:"8px",size_1_5:"6px",size_3:"12px",size_4:"16px",size_5:"20px",size_6:"24px",size_7:"28px",size_8:"32px",size_9:"36px",size_10:"40px",size_0_25:"1px"},wa={default:{cellVertical:"sizing.size_1",cellHorizontal:"sizing.size_2",barsHorizontal:"sizing.size_4",barsVertical:"sizing.size_2",gap:"sizing.size_1",buttonHorizontal:"sizing.size_3",buttonVertical:"sizing.size_1_5",dialogHorizontal:"sizing.size_2",dialogVertical:"sizing.size_2",inputHorizontal:"sizing.size_3",inputVertical:"sizing.size_1_5",menuVertical:"sizing.size_2",menuHorizontal:"sizing.size_0",menuItemVertical:"sizing.size_1",menuItemHorizontal:"sizing.size_3"},compact:{cellVertical:"sizing.size_0_5",cellHorizontal:"sizing.size_1_5",barsHorizontal:"sizing.size_2",barsVertical:"sizing.size_1",gap:"sizing.size_0_5",buttonHorizontal:"sizing.size_2",buttonVertical:"sizing.size_0_5",dialogHorizontal:"sizing.size_1_5",dialogVertical:"sizing.size_1_5",inputHorizontal:"sizing.size_2",inputVertical:"sizing.size_0_5",menuVertical:"sizing.size_2",menuHorizontal:"sizing.size_0",menuItemVertical:"sizing.size_0_5",menuItemHorizontal:"sizing.size_2"},comfortable:{cellVertical:"sizing.size_2",cellHorizontal:"sizing.size_3",barsHorizontal:"sizing.size_4",barsVertical:"sizing.size_2",gap:"sizing.size_1_5",buttonHorizontal:"sizing.size_4",buttonVertical:"sizing.size_2",dialogHorizontal:"sizing.size_3",dialogVertical:"sizing.size_3",inputHorizontal:"sizing.size_4",inputVertical:"sizing.size_2",menuVertical:"sizing.size_3",menuHorizontal:"sizing.size_0",menuItemVertical:"sizing.size_2",menuItemHorizontal:"sizing.size_2"}},wh=["sizing","icons","colors","tokens"],wd=["name","icons","colors","tokens"];class wu{#hb;#hC;#hS=new Set;#hv="auto";#hR="default";constructor(e){wr(e,"themeConfig",{requiredFields:wd}),this.#hb={name:void 0,sizing:wl,density:{type:this.#hR,sizes:wa},icons:{},colors:{},tokens:{},colorScheme:this.#hv},this.#hE(e),this.#hb=this.#hC}#hT(){let e=this.getThemeConfig();this.#hS.forEach(t=>t(e))}#hx(e,t){if("string"!=typeof t){let r=tL(e.density,t);e.density=r,void 0!==t.type&&(this.#hR=t.type,this.#hb?.density&&(this.#hb.density.type=t.type))}else e.density.type=t,this.#hR=t,this.#hb?.density&&(this.#hb.density.type=t)}#hE(e){let t=tS(this.#hb);void 0!==e.name&&(void 0!==this.#hb.name?rn('[ThemeBuilder] The "name" property can only be set during `registerTheme()` and cannot be updated via `params()`.'):t.name=e.name),wh.forEach(r=>{void 0!==e[r]&&tx(e[r])&&(t[r]=tL(t[r],e[r]))}),void 0!==e.density&&this.#hx(t,e.density),void 0!==e.colorScheme&&(t.colorScheme=e.colorScheme,this.#hv=e.colorScheme,this.#hb?.colorScheme&&(this.#hb.colorScheme=e.colorScheme)),this.#hC=t}subscribe(e){return"function"!=typeof e&&tf("[ThemeBuilder] listener must be a function."),this.#hS.add(e),()=>this.#hS.delete(e)}params(e){return wr(e,"params"),this.#hE(e),this.#hT(),this}setColorScheme(e){return this.#hv=f7(e),this.#hC.colorScheme=this.#hv,this.#hb.colorScheme=this.#hv,this.#hT(),this}setDensityType(e){return this.#hR=we(e),this.#hC.density.type=this.#hR,this.#hb.density.type=this.#hR,this.#hT(),this}getThemeConfig(){return this.#hC}}let{hasItem:wc,getItem:wg,getNames:wp,getValues:wm,register:wf}=nO("themes");function ww(e){return wc(e)}function wy(e){return wc(e)?wg(e):void rn(`Theme "${e}" is not registered. Please ensure it is registered before using it.`)}function wb(){return wp()}function wC(){return wm()}function wS(e,t){let r=e,i=tS(t);return"string"==typeof e&&tx(t)?i.name=e:"string"!=typeof e&&tx(e)&&(r=(i=tS(e)).name??""),{themeName:r,themeConfigObject:i}}function wv(e,t){let{themeName:r,themeConfigObject:i}=wS(e,t),n=new wu(i);return wc(r)?(rn(`Theme "${r}" is already registered. Registration skipped.`),wy(r)):(wf(r,n),n)}function wR(e,t){let{themeName:r,themeConfigObject:i}=wS(e,t);if(!wc(r))return void rn(`Theme "${r}" is not registered. Cannot reinitialize a non-existent theme.`);let n=new wu(i);return wf(r,n),n}let wE={name:"main",density:"default",icons:{arrowRight:"data:image/svg+xml;charset=utf-8,%3Csvg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M6.64648 10.9393L9.93938 7.64644L6.64648 4.35354' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E%0A",arrowRightWithBar:"data:image/svg+xml;charset=utf-8,%3Csvg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M4.9292 4.64188L8.27934 7.99203L4.9292 11.3422M11.0711 4.08353V11.3422' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E",arrowLeft:"data:image/svg+xml;charset=utf-8,%3Csvg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M9.49268 11.2929L6.19978 8.00001L9.49268 4.70712' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E%0A",arrowLeftWithBar:"data:image/svg+xml;charset=utf-8,%3Csvg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M11.0713 4.64188L7.72115 7.99203L11.0713 11.3422M4.92936 4.08353L4.92936 11.3422' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E",arrowDown:"data:image/svg+xml;charset=utf-8,%3Csvg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cg opacity='0.6'%3E%3Cpath d='M11.5859 6L8.29304 9.29289L5.00015 6' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/g%3E%3C/svg%3E",menu:"data:image/svg+xml;charset=utf-8,%3Csvg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M11.0002 6.66663C11.4262 6.66663 11.6487 7.15963 11.3917 7.47813L11.3537 7.52013L8.35372 10.5201C8.26762 10.6062 8.15307 10.6579 8.03156 10.6656C7.91005 10.6732 7.78992 10.6363 7.69372 10.5616L7.64672 10.5201L4.64672 7.52013L4.60522 7.47313L4.57822 7.43463L4.55122 7.38663L4.54272 7.36863L4.52922 7.33513L4.51322 7.28113L4.50822 7.25463L4.50322 7.22463L4.50122 7.19613V7.13713L4.50372 7.10813L4.50822 7.07813L4.51322 7.05213L4.52922 6.99813L4.54272 6.96463L4.57772 6.89863L4.61022 6.85363L4.64672 6.81313L4.69372 6.77163L4.73222 6.74463L4.78022 6.71763L4.79822 6.70913L4.83172 6.69563L4.88572 6.67963L4.91222 6.67463L4.94222 6.66963L4.97072 6.66763L11.0002 6.66663Z' fill='currentColor'/%3E%3C/svg%3E%0A",selectArrow:"data:image/svg+xml;charset=utf-8,%3Csvg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M11.0002 6.66663C11.4262 6.66663 11.6487 7.15963 11.3917 7.47813L11.3537 7.52013L8.35372 10.5201C8.26762 10.6062 8.15307 10.6579 8.03156 10.6656C7.91005 10.6732 7.78992 10.6363 7.69372 10.5616L7.64672 10.5201L4.64672 7.52013L4.60522 7.47313L4.57822 7.43463L4.55122 7.38663L4.54272 7.36863L4.52922 7.33513L4.51322 7.28113L4.50822 7.25463L4.50322 7.22463L4.50122 7.19613V7.13713L4.50372 7.10813L4.50822 7.07813L4.51322 7.05213L4.52922 6.99813L4.54272 6.96463L4.57772 6.89863L4.61022 6.85363L4.64672 6.81313L4.69372 6.77163L4.73222 6.74463L4.78022 6.71763L4.79822 6.70913L4.83172 6.69563L4.88572 6.67963L4.91222 6.67463L4.94222 6.66963L4.97072 6.66763L11.0002 6.66663Z' fill='currentColor'/%3E%3C/svg%3E%0A",arrowNarrowUp:"data:image/svg+xml;charset=utf-8,%3Csvg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M8.00008 12.6667L8.00008 3.33335M8.00008 3.33335L5.33342 6.00002M8.00008 3.33335L10.6667 6.00002' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E%0A",arrowNarrowDown:"data:image/svg+xml;charset=utf-8,%3Csvg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M8.00004 3.33331V12.6666M8.00004 12.6666L10.6667 9.99998M8.00004 12.6666L5.33337 9.99998' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E%0A",check:"data:image/svg+xml;charset=utf-8,%3Csvg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M3.33337 8.00002L6.66671 11.3334L13.3334 4.66669' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E%0A",checkbox:"data:image/svg+xml;charset=utf-8,%3Csvg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M5 8L7 10L11 6' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E%0A",caretHiddenLeft:"data:image/svg+xml,%3Csvg width='10' height='10' viewBox='0 0 10 10' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M6.08482 1.35771L6.11503 1.3551H6.17649L6.2067 1.35771L6.23795 1.36239L6.26503 1.3676L6.32128 1.38427L6.35618 1.39833L6.42493 1.43479L6.4718 1.46864L6.51399 1.50667L6.55722 1.55562L6.58534 1.59573L6.61347 1.64573L6.62232 1.66448L6.63639 1.69937L6.65305 1.75562L6.65826 1.78323L6.66347 1.81448L6.66555 1.84417L6.66659 1.87489V8.12489C6.66659 8.56864 6.15305 8.80042 5.82128 8.53271L5.77753 8.49312L2.65253 5.36812C2.56286 5.27844 2.50899 5.15912 2.50103 5.03254C2.49307 4.90596 2.53157 4.78083 2.6093 4.68062L2.65253 4.63167L5.77753 1.50667L5.82649 1.46344L5.86659 1.43531L5.91659 1.40719L5.93534 1.39833L5.97024 1.38427L6.02649 1.3676L6.05409 1.36239L6.08482 1.35771Z' fill='currentColor'/%3E%3C/svg%3E",caretHiddenRight:"data:image/svg+xml,%3Csvg width='10' height='10' viewBox='0 0 10 10' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M3.33337 1.87499C3.33337 1.43124 3.84692 1.19947 4.17869 1.46718L4.22244 1.50676L7.34744 4.63176C7.43711 4.72145 7.49098 4.84077 7.49894 4.96735C7.5069 5.09392 7.4684 5.21905 7.39067 5.31926L7.34744 5.36822L4.22244 8.49322L4.17348 8.53645L4.13337 8.56457L4.08337 8.5927L4.06462 8.60155L4.02973 8.61562L3.97348 8.63228L3.94587 8.63749L3.91462 8.6427L3.88494 8.64478L3.85421 8.64582L3.82348 8.64478L3.79327 8.64218L3.76202 8.63749L3.73494 8.63228L3.67869 8.61562L3.64379 8.60155L3.57504 8.5651L3.52817 8.53124L3.48598 8.49322L3.44275 8.44426L3.41462 8.40416L3.3865 8.35416L3.37764 8.33541L3.36358 8.30051L3.34692 8.24426L3.34171 8.21666L3.3365 8.18541L3.33442 8.15572L3.33337 1.87499Z' fill='currentColor'/%3E%3C/svg%3E",caretHiddenUp:"data:image/svg+xml;charset=utf-8,%3Csvg width='8' height='8' viewBox='0 0 8 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M3.76425 2.43099C3.82165 2.3736 3.89801 2.33913 3.97902 2.33403C4.06003 2.32894 4.14012 2.35358 4.20425 2.40333L4.23558 2.43099L6.23558 4.43099L6.26325 4.46233L6.28125 4.48799L6.29925 4.51999L6.30492 4.53199L6.31392 4.55433L6.32458 4.59033L6.32792 4.60799L6.33125 4.62799L6.33258 4.64699L6.33325 4.66666L6.33258 4.68633L6.33092 4.70566L6.32792 4.72566L6.32458 4.74299L6.31392 4.77899L6.30492 4.80133L6.28158 4.84533L6.25992 4.87533L6.23558 4.90233L6.20425 4.92999L6.17858 4.94799L6.14658 4.96599L6.13458 4.97166L6.11225 4.98066L6.07625 4.99133L6.05858 4.99466L6.03858 4.99799L6.01958 4.99933L5.99992 4.99999H1.99992C1.71592 4.99999 1.56758 4.67133 1.73892 4.45899L1.76425 4.43099L3.76425 2.43099Z' fill='currentColor'/%3E%3C/svg%3E%0A",caretHiddenDown:"data:image/svg+xml;charset=utf-8,%3Csvg width='8' height='8' viewBox='0 0 8 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M5.9999 3C6.2839 3 6.43224 3.32867 6.2609 3.541L6.23557 3.569L4.23557 5.569C4.17817 5.62639 4.10181 5.66087 4.0208 5.66596C3.93979 5.67106 3.8597 5.64642 3.79557 5.59667L3.76424 5.569L1.76424 3.569L1.73657 3.53767L1.71857 3.512L1.70057 3.48L1.6949 3.468L1.6859 3.44567L1.67524 3.40967L1.6719 3.392L1.66857 3.372L1.66724 3.353V3.31367L1.6689 3.29433L1.6719 3.27433L1.67524 3.257L1.6859 3.221L1.6949 3.19867L1.71824 3.15467L1.7399 3.12467L1.76424 3.09767L1.79557 3.07L1.82124 3.052L1.85324 3.034L1.86524 3.02833L1.88757 3.01933L1.92357 3.00867L1.94124 3.00533L1.96124 3.002L1.98024 3.00067L5.9999 3Z' fill='currentColor'/%3E%3C/svg%3E%0A",collapseOff:"data:image/svg+xml;charset=utf-8,%3Csvg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M4.33325 8H11.6666' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E%0A",collapseOn:"data:image/svg+xml;charset=utf-8,%3Csvg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M7.49988 11.6667C7.49988 11.9428 7.72374 12.1667 7.99988 12.1667C8.27602 12.1667 8.49988 11.9428 8.49988 11.6667V8.50002H11.6666C11.9427 8.50002 12.1666 8.27616 12.1666 8.00002C12.1666 7.72388 11.9427 7.50002 11.6666 7.50002H8.49988V4.33337C8.49988 4.05723 8.27602 3.83337 7.99988 3.83337C7.72374 3.83337 7.49988 4.05723 7.49988 4.33337V7.50002H4.33325C4.05711 7.50002 3.83325 7.72388 3.83325 8.00002C3.83325 8.27616 4.05711 8.50002 4.33325 8.50002H7.49988V11.6667Z' fill='currentColor'/%3E%3C/svg%3E%0A",radio:"data:image/svg+xml;charset=utf-8,%3Csvg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='8' cy='8' r='4' fill='currentColor'/%3E%3C/svg%3E%0A",chipClose:"data:image/svg+xml;charset=utf-8,%3Csvg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M12 4L4 12M4 4L12 12' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E%0A",search:"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 32 32' fill='none'%3E%3Cg opacity='0.5'%3E%3Cpath d='M28 28L20 20M4 13.3333C4 14.559 4.24141 15.7727 4.71046 16.905C5.1795 18.0374 5.86699 19.0663 6.73367 19.933C7.60035 20.7997 8.62925 21.4872 9.76162 21.9562C10.894 22.4253 12.1077 22.6667 13.3333 22.6667C14.559 22.6667 15.7727 22.4253 16.905 21.9562C18.0374 21.4872 19.0663 20.7997 19.933 19.933C20.7997 19.0663 21.4872 18.0374 21.9562 16.905C22.4253 15.7727 22.6667 14.559 22.6667 13.3333C22.6667 12.1077 22.4253 10.894 21.9562 9.76162C21.4872 8.62925 20.7997 7.60035 19.933 6.73367C19.0663 5.86699 18.0374 5.1795 16.905 4.71046C15.7727 4.24141 14.559 4 13.3333 4C12.1077 4 10.894 4.24141 9.76162 4.71046C8.62925 5.1795 7.60035 5.86699 6.73367 6.73367C5.86699 7.60035 5.1795 8.62925 4.71046 9.76162C4.24141 10.894 4 12.1077 4 13.3333Z' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/g%3E%3C/svg%3E",plus:"data:image/svg+xml;charset=utf-8,%3Csvg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M7.49988 11.6667C7.49988 11.9428 7.72374 12.1667 7.99988 12.1667C8.27602 12.1667 8.49988 11.9428 8.49988 11.6667V8.50002H11.6666C11.9427 8.50002 12.1666 8.27616 12.1666 8.00002C12.1666 7.72388 11.9427 7.50002 11.6666 7.50002H8.49988V4.33337C8.49988 4.05723 8.27602 3.83337 7.99988 3.83337C7.72374 3.83337 7.49988 4.05723 7.49988 4.33337V7.50002H4.33325C4.05711 7.50002 3.83325 7.72388 3.83325 8.00002C3.83325 8.27616 4.05711 8.50002 4.33325 8.50002H7.49988V11.6667Z' fill='currentColor'/%3E%3C/svg%3E%0A",menuList:"data:image/svg+xml;charset=utf-8,%3Csvg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath transform='translate(3.833 4.5)' d='M7.83301 6C8.10915 6 8.33301 6.22386 8.33301 6.5C8.33281 6.77597 8.10903 7 7.83301 7H0.5C0.22398 7 0.000197811 6.77597 0 6.5C0 6.22386 0.223858 6 0.5 6H7.83301ZM7.83301 3C8.10915 3 8.33301 3.22386 8.33301 3.5C8.33281 3.77597 8.10903 4 7.83301 4H0.5C0.22398 4 0.000197811 3.77597 0 3.5C0 3.22386 0.223858 3 0.5 3H7.83301ZM7.83301 0C8.10915 0 8.33301 0.223858 8.33301 0.5C8.33281 0.775974 8.10903 1 7.83301 1H0.5C0.22398 1 0.000197811 0.775974 0 0.5C0 0.223858 0.223858 0 0.5 0H7.83301Z' fill='currentColor'/%3E%3C/svg%3E"},colors:{white:"#ffffffff",black:"#000000ff",primary:{100:"#6180ffff",200:"#5573f0ff",300:"#4669f6ff",400:"#2e56fcff",500:"#1a42e8ff",600:"#1535bcff"},palette:{50:"#f7f7f9ff",100:"#e7e7e9ff",200:"#b9b9bbff",300:"#a3a3a3ff",400:"#68696cff",500:"#404144ff",600:"#313132ff",700:"#282829ff",800:"#222222ff",900:"#1e1e1fff",950:"#050506ff"},transparent:"#ffffff00"},tokens:{fontFamily:"Inter",fontSize:"14px",fontSizeSmall:"12px",lineHeight:"20px",lineHeightSmall:"18px",fontWeight:"400",letterSpacing:"0px",borderColor:["colors.palette.100","colors.palette.700"],accentColor:["colors.primary.500","colors.primary.300"],foregroundColor:["colors.palette.800","colors.palette.200"],foregroundSecondaryColor:["colors.palette.400","colors.palette.300"],backgroundColor:["colors.white","colors.palette.950"],backgroundSecondaryColor:["colors.palette.50","colors.palette.900"],placeholderColor:["colors.palette.300","colors.palette.400"],readOnlyColor:["colors.palette.400","colors.palette.300"],disabledColor:["colors.palette.300","colors.palette.400"],gapSize:"density.gap",iconSize:"sizing.size_4",tableTransition:"0.15s",borderRadius:"sizing.size_1",barForegroundColor:"tokens.foregroundColor",barBackgroundColor:"tokens.backgroundSecondaryColor",barHorizontalPadding:"density.barsHorizontal",barVerticalPadding:"density.barsVertical",shadowColor:["colors.palette.800","colors.palette.200"],shadowX:"sizing.size_0",shadowY:"sizing.size_2",shadowBlur:"sizing.size_4",shadowOpacity:"8%",cellHorizontalPadding:"density.cellHorizontal",cellVerticalPadding:"density.cellVertical",cellHorizontalBorderColor:"tokens.borderColor",cellVerticalBorderColor:"tokens.borderColor",cellSelectionBorderColor:"tokens.accentColor",cellSelectionBackgroundColor:["colors.primary.400","colors.primary.200"],rowSelectionBackgroundColor:["#1a42e81a","#4669f633"],cellSuccessBackgroundColor:"#37bc6c33",cellErrorBackgroundColor:"#fa4d3233",cellReadOnlyBackgroundColor:"tokens.backgroundSecondaryColor",cellAutofillSize:"sizing.size_1_5",cellAutofillHitAreaSize:"sizing.size_3",cellAutofillBorderWidth:"sizing.size_0_25",cellAutofillBorderRadius:"sizing.size_1",cellAutofillBorderColor:"tokens.backgroundColor",cellAutofillBackgroundColor:"tokens.accentColor",cellAutofillFillBorderColor:"tokens.foregroundColor",customBordersDefaultColor:["colors.black","colors.palette.200"],cellEditorBorderWidth:"2px",cellEditorBorderColor:"tokens.accentColor",cellEditorForegroundColor:["colors.palette.950","colors.white"],cellEditorBackgroundColor:"tokens.backgroundColor",cellEditorShadowBlurRadius:"0px",cellEditorShadowColor:"tokens.accentColor",cellMobileHandleSize:"sizing.size_3",cellMobileHandleBorderWidth:"sizing.size_0_25",cellMobileHandleBorderRadius:"sizing.size_3",cellMobileHandleBorderColor:"tokens.accentColor",cellMobileHandleBackgroundColor:"tokens.accentColor",cellMobileHandleBackgroundOpacity:"40%",cellSelectionHandleSize:"sizing.size_2",cellSelectionHandleLength:"sizing.size_4",cellSelectionHandleBorderWidth:"sizing.size_0_25",cellSelectionHandleBorderRadius:"sizing.size_3",cellSelectionHandleBorderColor:"tokens.accentColor",cellSelectionHandleBackgroundColor:"tokens.backgroundColor",headerFontWeight:"tokens.fontWeight",headerForegroundColor:"tokens.foregroundColor",headerBackgroundColor:"tokens.backgroundSecondaryColor",headerHighlightedShadowSize:"0px",headerHighlightedForegroundColor:["colors.palette.950","colors.white"],headerHighlightedBackgroundColor:["colors.palette.100","colors.palette.700"],headerActiveBorderColor:["colors.primary.400","colors.primary.200"],headerActiveForegroundColor:"colors.white",headerActiveBackgroundColor:"tokens.accentColor",headerFilterBackgroundColor:"tokens.cellSuccessBackgroundColor",headerRowForegroundColor:"tokens.foregroundColor",headerRowBackgroundColor:"tokens.backgroundSecondaryColor",headerRowHighlightedForegroundColor:["colors.palette.950","colors.white"],headerRowHighlightedBackgroundColor:["colors.palette.100","colors.palette.700"],headerRowActiveForegroundColor:"colors.white",headerRowActiveBackgroundColor:"tokens.accentColor",rowHeaderOddBackgroundColor:"tokens.headerRowBackgroundColor",rowHeaderEvenBackgroundColor:"tokens.headerRowBackgroundColor",rowCellOddBackgroundColor:"tokens.backgroundColor",rowCellEvenBackgroundColor:"tokens.backgroundColor",buttonBorderRadius:"sizing.size_1",buttonHorizontalPadding:"density.buttonHorizontal",buttonVerticalPadding:"density.buttonVertical",primaryButtonBorderColor:"colors.transparent",primaryButtonForegroundColor:"colors.white",primaryButtonBackgroundColor:"tokens.accentColor",primaryButtonDisabledBorderColor:"colors.transparent",primaryButtonDisabledForegroundColor:"tokens.disabledColor",primaryButtonDisabledBackgroundColor:["colors.palette.100","colors.palette.700"],primaryButtonHoverBorderColor:"colors.transparent",primaryButtonHoverForegroundColor:"tokens.backgroundColor",primaryButtonHoverBackgroundColor:["colors.primary.600","colors.primary.100"],primaryButtonFocusBorderColor:"tokens.backgroundColor",primaryButtonFocusForegroundColor:"tokens.backgroundColor",primaryButtonFocusBackgroundColor:"tokens.accentColor",secondaryButtonBorderColor:"tokens.borderColor",secondaryButtonForegroundColor:"tokens.foregroundColor",secondaryButtonBackgroundColor:"tokens.backgroundColor",secondaryButtonDisabledBorderColor:"tokens.borderColor",secondaryButtonDisabledForegroundColor:"tokens.disabledColor",secondaryButtonDisabledBackgroundColor:["colors.palette.100","colors.palette.700"],secondaryButtonHoverBorderColor:"tokens.borderColor",secondaryButtonHoverForegroundColor:"tokens.foregroundColor",secondaryButtonHoverBackgroundColor:["colors.palette.100","colors.palette.700"],secondaryButtonFocusBorderColor:"tokens.borderColor",secondaryButtonFocusForegroundColor:"tokens.foregroundColor",secondaryButtonFocusBackgroundColor:"tokens.backgroundColor",iconButtonBorderRadius:"sizing.size_0_5",iconButtonLargeBorderRadius:"sizing.size_1",iconButtonLargePadding:"sizing.size_1",iconButtonBorderColor:["colors.palette.50","colors.palette.900"],iconButtonBackgroundColor:"tokens.backgroundSecondaryColor",iconButtonIconColor:["colors.palette.300","colors.palette.400"],iconButtonHitAreaSize:"sizing.size_6",iconButtonHoverBorderColor:["colors.palette.100","colors.palette.700"],iconButtonHoverBackgroundColor:["colors.palette.100","colors.palette.700"],iconButtonHoverIconColor:["colors.palette.400","colors.palette.300"],iconButtonActiveBorderColor:["colors.primary.400","colors.primary.200"],iconButtonActiveBackgroundColor:"tokens.accentColor",iconButtonActiveIconColor:"colors.white",iconButtonActiveHoverBorderColor:["colors.primary.400","colors.primary.200"],iconButtonActiveHoverBackgroundColor:["colors.primary.400","colors.primary.200"],iconButtonActiveHoverIconColor:"colors.white",collapseButtonBorderRadius:"sizing.size_1",collapseButtonOpenBorderColor:["colors.palette.200","colors.palette.500"],collapseButtonOpenBackgroundColor:["colors.white","colors.palette.950"],collapseButtonOpenIconColor:["colors.palette.400","colors.palette.300"],collapseButtonOpenIconActiveColor:["colors.palette.400","colors.palette.300"],collapseButtonOpenHoverBorderColor:["colors.palette.200","colors.palette.500"],collapseButtonOpenHoverBackgroundColor:["colors.palette.50","colors.palette.900"],collapseButtonOpenHoverIconColor:["colors.palette.400","colors.palette.300"],collapseButtonOpenHoverIconActiveColor:["colors.palette.400","colors.palette.300"],collapseButtonCloseBorderColor:["colors.palette.200","colors.palette.500"],collapseButtonCloseBackgroundColor:["colors.palette.100","colors.palette.700"],collapseButtonCloseIconColor:["colors.palette.400","colors.palette.300"],collapseButtonCloseIconActiveColor:["colors.palette.400","colors.palette.300"],collapseButtonCloseHoverBorderColor:["colors.palette.200","colors.palette.500"],collapseButtonCloseHoverBackgroundColor:["colors.palette.100","colors.palette.700"],collapseButtonCloseHoverIconColor:["colors.palette.400","colors.palette.300"],collapseButtonCloseHoverIconActiveColor:["colors.palette.400","colors.palette.300"],linkColor:["colors.primary.600","colors.primary.100"],linkHoverColor:"tokens.accentColor",inputBorderWidth:"1px",inputBorderRadius:"sizing.size_1",inputHorizontalPadding:"density.inputHorizontal",inputVerticalPadding:"density.inputVertical",inputBorderColor:"tokens.borderColor",inputForegroundColor:"tokens.foregroundColor",inputBackgroundColor:"tokens.backgroundSecondaryColor",inputHoverBorderColor:"tokens.borderColor",inputHoverForegroundColor:"tokens.foregroundColor",inputHoverBackgroundColor:"tokens.backgroundColor",inputDisabledBorderColor:"tokens.borderColor",inputDisabledForegroundColor:"tokens.disabledColor",inputDisabledBackgroundColor:["colors.palette.200","colors.palette.500"],inputFocusBorderColor:"tokens.accentColor",inputFocusForegroundColor:"tokens.foregroundColor",inputFocusBackgroundColor:"tokens.backgroundColor",checkboxSize:"tokens.iconSize",checkboxBorderRadius:"sizing.size_1",checkboxBorderColor:["colors.palette.200","colors.palette.500"],checkboxBackgroundColor:"tokens.backgroundColor",checkboxIconColor:"colors.transparent",checkboxFocusBorderColor:["colors.palette.200","colors.palette.500"],checkboxFocusBackgroundColor:"tokens.backgroundColor",checkboxFocusIconColor:"colors.transparent",checkboxFocusRingColor:"tokens.accentColor",checkboxDisabledBorderColor:["colors.palette.200","colors.palette.500"],checkboxDisabledBackgroundColor:["colors.palette.100","colors.palette.700"],checkboxDisabledIconColor:"colors.transparent",checkboxCheckedBorderColor:["colors.primary.400","colors.primary.200"],checkboxCheckedBackgroundColor:"tokens.accentColor",checkboxCheckedIconColor:"colors.white",checkboxCheckedFocusBorderColor:"tokens.backgroundColor",checkboxCheckedFocusBackgroundColor:"tokens.accentColor",checkboxCheckedFocusIconColor:"colors.white",checkboxCheckedDisabledBorderColor:["colors.palette.200","colors.palette.500"],checkboxCheckedDisabledBackgroundColor:["colors.palette.100","colors.palette.700"],checkboxCheckedDisabledIconColor:"tokens.disabledColor",checkboxIndeterminateBorderColor:["colors.primary.400","colors.primary.200"],checkboxIndeterminateBackgroundColor:"tokens.accentColor",checkboxIndeterminateIconColor:"colors.white",checkboxIndeterminateFocusBorderColor:"tokens.backgroundColor",checkboxIndeterminateFocusBackgroundColor:"tokens.accentColor",checkboxIndeterminateFocusIconColor:"colors.white",checkboxIndeterminateDisabledBorderColor:["colors.palette.200","colors.palette.600"],checkboxIndeterminateDisabledBackgroundColor:["colors.palette.200","colors.palette.500"],checkboxIndeterminateDisabledIconColor:"tokens.disabledColor",radioSize:"tokens.iconSize",radioBorderColor:["colors.palette.200","colors.palette.500"],radioBackgroundColor:"tokens.backgroundColor",radioIconColor:"colors.transparent",radioFocusBorderColor:"tokens.borderColor",radioFocusBackgroundColor:"tokens.backgroundColor",radioFocusIconColor:"colors.transparent",radioFocusRingColor:"tokens.accentColor",radioDisabledBorderColor:["colors.palette.200","colors.palette.500"],radioDisabledBackgroundColor:["colors.palette.100","colors.palette.700"],radioDisabledIconColor:"colors.transparent",radioCheckedBorderColor:"tokens.accentColor",radioCheckedBackgroundColor:"tokens.backgroundColor",radioCheckedIconColor:"tokens.accentColor",radioCheckedFocusBorderColor:["colors.primary.400","colors.primary.200"],radioCheckedFocusBackgroundColor:"tokens.backgroundColor",radioCheckedFocusIconColor:["colors.primary.400","colors.primary.200"],radioCheckedDisabledBorderColor:["colors.palette.200","colors.palette.500"],radioCheckedDisabledBackgroundColor:["colors.palette.100","colors.palette.700"],radioCheckedDisabledIconColor:"tokens.disabledColor",moveBacklightColor:["colors.palette.800","colors.palette.200"],moveBacklightOpacity:"8%",moveIndicatorColor:"tokens.accentColor",resizeIndicatorColor:["colors.palette.300","colors.palette.400"],freezeBarColor:["colors.palette.200","colors.palette.500"],freezeBarHoverColor:["colors.palette.300","colors.palette.400"],freezeBarHighlightColor:"tokens.accentColor",asyncIndicatorColor:"tokens.accentColor",asyncErrorBackgroundColor:"tokens.cellErrorBackgroundColor",asyncErrorMarkerColor:"tokens.notificationErrorAccent",hiddenIndicatorColor:["colors.palette.300","colors.palette.400"],menuBorderWidth:"1px",menuBorderRadius:"sizing.size_1",menuHorizontalPadding:"density.menuHorizontal",menuVerticalPadding:"density.menuVertical",menuItemHorizontalPadding:"density.menuItemHorizontal",menuItemVerticalPadding:"density.menuItemVertical",menuBorderColor:"tokens.borderColor",menuShadowX:"tokens.shadowX",menuShadowY:"tokens.shadowY",menuShadowBlur:"tokens.shadowBlur",menuShadowColor:["colors.palette.950","colors.white"],menuShadowOpacity:"8%",menuItemHoverColor:["colors.palette.800","colors.palette.200"],menuItemHoverColorOpacity:"4%",menuItemActiveColor:"tokens.accentColor",menuItemActiveColorOpacity:"8%",commentsTextareaHorizontalPadding:"density.cellHorizontal",commentsTextareaVerticalPadding:"density.cellVertical",commentsTextareaBorderWidth:"1px",commentsTextareaBorderColor:"colors.transparent",commentsTextareaForegroundColor:"tokens.foregroundColor",commentsTextareaBackgroundColor:"tokens.backgroundSecondaryColor",commentsTextareaFocusBorderWidth:"1px",commentsTextareaFocusBorderColor:"tokens.accentColor",commentsTextareaFocusForegroundColor:"tokens.foregroundColor",commentsTextareaFocusBackgroundColor:"tokens.backgroundColor",commentsIndicatorSize:"sizing.size_1_5",commentsIndicatorColor:"tokens.accentColor",licenseHorizontalPadding:"tokens.barHorizontalPadding",licenseVerticalPadding:"tokens.barVerticalPadding",licenseForegroundColor:"tokens.barForegroundColor",licenseBackgroundColor:"tokens.barBackgroundColor",paginationBarForegroundColor:"tokens.barForegroundColor",paginationBarBackgroundColor:"tokens.barBackgroundColor",paginationBarHorizontalPadding:"tokens.barHorizontalPadding",paginationBarVerticalPadding:"tokens.barVerticalPadding",paginationButtonBorderColor:"tokens.paginationBarBackgroundColor",paginationButtonForegroundColor:"tokens.foregroundSecondaryColor",paginationButtonBackgroundColor:"tokens.paginationBarBackgroundColor",paginationButtonHoverBorderColor:["colors.palette.100","colors.palette.700"],paginationButtonHoverForegroundColor:"tokens.foregroundColor",paginationButtonHoverBackgroundColor:["colors.palette.100","colors.palette.700"],paginationButtonDisabledBorderColor:"tokens.paginationBarBackgroundColor",paginationButtonDisabledForegroundColor:"tokens.disabledColor",paginationButtonDisabledBackgroundColor:"tokens.paginationBarBackgroundColor",paginationButtonFocusBorderColor:"tokens.accentColor",paginationButtonFocusForegroundColor:"tokens.foregroundColor",paginationButtonFocusBackgroundColor:"tokens.paginationBarBackgroundColor",sheetsBarHorizontalPadding:"sizing.size_2",sheetsBarBackgroundColor:"tokens.barBackgroundColor",sheetsBarTabHorizontalPadding:"sizing.size_3",sheetsBarTabVerticalPadding:"sizing.size_2",sheetsBarTabForegroundColor:"tokens.foregroundSecondaryColor",sheetsBarTabBackgroundColor:"tokens.barBackgroundColor",sheetsBarTabHoverForegroundColor:["colors.palette.950","colors.white"],sheetsBarTabActiveForegroundColor:["colors.palette.950","colors.white"],sheetsBarTabActiveBackgroundColor:["colors.palette.100","colors.palette.700"],sheetsBarTabActiveBorderWidth:"1px",sheetsBarTabActiveBorderColor:"tokens.cellSelectionBorderColor",dialogSemiTransparentBackgroundColor:["colors.white","colors.palette.950"],dialogSemiTransparentBackgroundOpacity:"80%",dialogSolidBackgroundColor:["colors.white","colors.palette.950"],dialogContentPaddingHorizontal:"density.dialogHorizontal",dialogContentPaddingVertical:"density.dialogVertical",dialogContentBorderRadius:"sizing.size_2",dialogContentBackgroundColor:"tokens.backgroundSecondaryColor",notificationForegroundColor:"tokens.foregroundColor",notificationBackgroundColor:"tokens.backgroundColor",notificationBorderColor:"tokens.backgroundColor",notificationSuccessAccent:"#37bc6cff",notificationWarningAccent:"#fbe952ff",notificationErrorAccent:"#fa4d32ff",chipBackground:"tokens.backgroundSecondaryColor",chipBorderRadius:"sizing.size_0_5",chipVerticalPadding:"sizing.size_0",chipHorizontalPadding:"sizing.size_0_5",chipGap:"sizing.size_1",scrollbarBorderRadius:"sizing.size_2",scrollbarTrackColor:"tokens.backgroundSecondaryColor",scrollbarThumbColor:["colors.palette.300","colors.palette.400"]}},wT=/^(\d+(?:\.\d+)?)(?:\s*px)?$/i,wx=RegExp("^\\d+(?:\\.\\d+)?(?:%|px|em|rem|ex|ch|cap|ic|lh|rlh|[sld]?v(?:w|h|min|max|i|b)|cq(?:w|h|i|b|min|max)|cm|mm|q|in|pt|pc)$","i"),wA=/^(?:calc|min|max|clamp|var|env)\(/i,wM=/%|\d[sld]?v(?:w|h|min|max|i|b)\b|\dcq(?:w|h|i|b|min|max)\b|\bvar\(|\benv\(/i,wI=new Set(["fit-content","min-content","max-content","inherit","initial","unset","revert","revert-layer","stretch","-webkit-fill-available","-moz-available","none","normal"]);function wN(){return{kind:"invalid",cssValue:null}}function wO(e){return{kind:"css",cssValue:e}}function wk(e,t){if("number"==typeof e)return Number.isFinite(e)&&e>=0?{kind:"px",cssValue:`${e}px`}:wN();if("string"!=typeof e)return wN();let r=e.trim();return""===r?wN():function(e,t){let r=e.toLowerCase();if("auto"===r)return{kind:"auto",cssValue:"auto"};let i=wT.exec(e);return null!==i?{kind:"px",cssValue:`${i[1]}px`}:wI.has(r)||r.startsWith("fit-content(")?wN():wx.test(e)?wO(e):wA.test(e)?void 0===t||t(e)?wO(e):wN():void 0!==t&&t(e)?wO(e):wN()}(r,t)}function wH(e){return""===e?"unset":"auto"===e?"auto":wM.test(e)?"container-driven":"definite"}function w_(e){return""===e||"clip"===e}function wP(e,t){return e[t]||e.overflow}function wD(e){return"unset"===e||"auto"===e}function wL(e){let t=e.style.height;return{heightInline:t,height:wH(t)}}function wF(e,t,r,i){if(void 0===r)return"untouched";let n=i3(r)?r():r;if(null===(n=e.runHooks(i,n)))return!function(e,t){let r=function(e){let t=e.ownerDocument.createElement("div");t.style.cssText=e.dataset.initialstyle??"";let{height:r,width:i,overflow:n,overflowX:o,overflowY:s}=t.style;return{height:r,width:i,overflowX:o||n,overflowY:s||n}}(e),{style:i}=e;i[t]=r[t],"height"===t&&(w_(wP(i,"overflowY"))&&(i.overflowY=r.overflowY),w_(wP(i,"overflowX"))&&(i.overflowX=r.overflowX))}(e.rootElement,t),"reset";if(void 0===n)return"untouched";let o=wk(n,function(e,t){let r=e.CSS;if(void 0!==r&&"function"==typeof r.supports)return e=>{try{return r.supports(t,e)}catch{return!1}}}(e.rootWindow,t));if("invalid"===o.kind){var s;let r;return s=e.rootElement,r=h2(n),rs(s,`invalid-root-size-${t}-${r}`,`Handsontable: the \`${t}\` option expects a number of pixels, such as \`500\`, \`'500'\`, or \`'500px'\`, a CSS length such as \`'50%'\` or \`${"height"===t?"'75vh'":"'75vw'"}\`, or \`'auto'\`. The value ${r} cannot be read as a size, so it is ignored and the grid's ${t} is left as it was.`),"ignored"}return"px"===o.kind&&"height"===t?e.rootElement.style.height=function(e,t){if(!sC(e))return t;let r=[e.rootSlotTopElement,e.rootSlotBottomElement].reduce((e,t)=>e+(t?.offsetHeight??0),0);return 0===r?t:`calc(${t} - ${r}px)`}(e,o.cssValue??""):e.rootElement.style[t]=o.cssValue??"","written"}function wB(e,t,r){var i,n;let o,s,{rootElement:l}=e;if(r){let e=l.getAttribute("style");e&&(l.dataset.initialstyle=e)}let a=wL(l),h=wF(e,"height",t.height,"beforeHeightChange"),d=wF(e,"width",t.width,"beforeWidthChange"),u=[],c=sC(e)&&Object.prototype.hasOwnProperty.call(t,"preventOverflow");return(void 0!==t.height||void 0!==t.width||c)&&function(e,t,r,i){let{style:n}=e,o=wH(n.height),s=wH(n.width);if(!wD(o)){(!t||r)&&w_(wP(n,"overflowX"))&&(n.overflowX="clip"),!t&&w_(wP(n,"overflowY"))&&(n.overflowY="clip");return}w_(wP(n,"overflowY"))&&(n.overflowY=""),w_(wP(n,"overflowX"))&&(n.overflowX="definite"===s||i?"clip":"")}(l,"reset"===h,"written"===d,sC(e)&&"horizontal"===e.getSettings().preventOverflow),"ignored"===h&&u.push("height"),"ignored"===d&&u.push("width"),{scrollOwnerChanged:(i=wL(l),n=void 0!==t.height,o=wD(a.height),s=wD(i.height),!n||o!==s||(o||s)&&a.heightInline!==i.heightInline),ignoredAxes:u}}function wV(e,t){let r=i3(t)?t():t;"px"===wk(r).kind&&wB(e,{height:r},!1)}let wz=Object.freeze({resume:e=>e(),release:()=>{}});class wU{#hA=[];#hM=1;#hI=0;#hN=!1;#hO=new Set;#hk=new Set;#hH=new WeakSet;#h_=new WeakSet;#hP=new WeakMap;#hD=1;#hL=Object.freeze({resume:e=>this.suppress(e),release:()=>{}});current(){return this.#hI>0?null:this.#hA[this.#hA.length-1]??null}isActive(){return null!==this.current()}isSuppressed(){return this.#hI>0}setJournaling(e){this.#hN=e}getRecordingTransaction(){return this.#hN?this.current():null}record(e){let t=this.getRecordingTransaction();null!==t&&this.append(t,e)}append(e,t){e.journal.push(t),this.#hP.set(t,this.#hD),this.#hD+=1}getEntryOrder(e){return this.#hP.get(e)??0}isLatestEntry(e){return this.#hP.get(e)===this.#hD-1}describe(e){let t=this.current();null!==t&&1===t.depth&&Object.assign(t.details,e)}run(e,t,r){this.enter(e,t);let i=!0;try{let e=r();return i=!1,e}finally{this.leave(i)}}enter(e,t){if(this.#hI>0)return;let r=this.#hA[this.#hA.length-1];if(r){r.depth+=1,r.operations.push(e),r.sources.push(t);return}let i={id:this.#hM,name:e,source:t,operations:[e],sources:[t],journal:[],details:{},depth:1,holds:0,aborted:!1};this.#hM+=1,this.#hA.push(i);try{this.#hO.forEach(e=>e(i))}catch(e){throw this.#hA.splice(this.#hA.lastIndexOf(i),1),e}}leave(e=!1){if(this.#hI>0)return;let t=this.#hA[this.#hA.length-1];!t||(e&&(t.aborted=!0),t.depth-=1,t.depth>0||(this.#hA.pop(),this.#hF(t)))}hold(){if(this.#hI>0)return this.#hL;let e=this.current();if(null===e)return wz;e.holds+=1;let t=!1;return{resume:r=>t||this.#hI>0?r():this.#hH.has(e)?this.run(e.name,e.source,r):this.#hB(e,r),release:()=>{t||(t=!0,e.holds-=1,this.#hF(e))}}}suppress(e){this.#hI+=1;try{return e()}finally{this.#hI-=1}}addOpenListener(e){this.#hO.add(e)}removeOpenListener(e){this.#hO.delete(e)}addSettleListener(e){this.#hk.add(e)}removeSettleListener(e){this.#hk.delete(e)}destroy(){this.#hA.length=0,this.#hO.clear(),this.#hk.clear(),this.#hN=!1}#hB(e,t){let r=this.#hA.includes(e);r||this.#hA.push(e),e.depth+=1;let i=!0;try{let e=t();return i=!1,e}finally{if(i&&(e.aborted=!0,this.#h_.add(e)),e.depth-=1,!r){let t=this.#hA.lastIndexOf(e);-1!==t&&this.#hA.splice(t,1)}this.#hF(e)}}#hF(e){0===e.depth&&(0===e.holds||this.#h_.has(e))&&this.#hV(e)}#hV(e){this.#hH.has(e)||(this.#hH.add(e),this.#hk.forEach(t=>t(e)))}}class wW{#hz=new Map;require(e,t){let r=this.#hz.get(e);r||(r=new Set,this.#hz.set(e,r)),r.add(t)}release(e,t){let r=this.#hz.get(e);r&&(r.delete(t),0===r.size&&this.#hz.delete(e))}isRequired(e){return this.#hz.has(e)}}let w$="rowId",wG=["afterChange","afterSetSourceDataAtCell","afterCreateRow","afterRemoveRow","afterLoadData","afterUpdateData"];function wj(e,t){let r=[];return e.forEach(e=>{let i=t(e);null!==i&&r.push(i)}),r}function wY(e){return"string"==typeof e||"function"==typeof e}class wK extends dx{#hU;constructor(e,t){super(e),this.#hU=t}init(e){return e>0&&e===this.getLength()&&!this.#hU()?(this.runLocalHooks("init"),this):super.init(e)}}class wq{#ey;#hW;#h$=null;#hG=1;#hj=null;#hY=!0;#hU=!1;#hK=!1;#hq=void 0;#hX=null;#hQ=void 0;constructor(e,t){this.#ey=e,this.#hW=t,e.addHook("beforeInit",this.#as),e.addHook("afterUpdateSettings",this.#as),e.addHook("beforeLoadData",this.#hZ),e.addHook("afterLoadData",this.#hJ),e.addHook("beforeUpdateData",this.#h0),e.addHook("beforeRemoveRow",this.#h1,Number.MAX_SAFE_INTEGER),e.addHook("afterRowsMutation",this.#h2)}getRowIdAtPhysicalRow(e){if(!Number.isInteger(e)||e<0)return null;if(this.#h$)return this.#h$.getValueAtIndex(e)??null;let t=this.#h3();return!wY(t)||e>=this.#ey.rowIndexMapper.getNumberOfIndexes()?null:this.#h6(e,t)}getKeyedRowIdAtPhysicalRow(e){if(this.#h$)return null;try{return this.getRowIdAtPhysicalRow(e)}catch{return null}}getRowIdsAtPhysicalRows(e){let t=this.#h5(),r=this.#ey.rowIndexMapper.getNumberOfIndexes();return e.map(e=>null===t||null===e||!Number.isInteger(e)||e<0||e>=r?null:t(e))}getPhysicalRowById(e){if(null==e)return null;let t=this.#hj?.get(e);return void 0!==t&&this.getRowIdAtPhysicalRow(t)===e?t:void 0!==t||this.#hY?(this.#hj=this.#h4(),this.#hY=!1,this.#hj.get(e)??null):null}#h3(){let e=this.#ey.getSettings(),t=e.dataProvider?.rowId;if(wY(t)){let r=e.rowId;return null!=r&&!1!==r&&r!==t&&rs(this,"rowId.dataProvider","The `rowId` option is ignored, because `dataProvider.rowId` is set. Handsontable reads row ids with `dataProvider.rowId`."),t}return e.rowId}#h6(e,t){return function(e,t){if("object"==typeof e&&null!==e){if("function"==typeof t)return t(e);if("string"==typeof t){if(tP(e,t))return Reflect.get(e,t);let r=e;for(let e of t.split(".")){if("object"!=typeof r||null===r)return;r=Reflect.get(r,e)}return r}}}(this.#hW(e),t)??null}#h5(){let e=this.#h$;if(e)return t=>e.getValueAtIndex(t)??null;let t=this.#h3();return wY(t)?e=>this.#h6(e,t):null}#h4(){let e=new Map,t=this.#ey.rowIndexMapper.getNumberOfIndexes(),r=this.#h5();if(!r)return e;for(let i=0;i<t;i+=1){let t=r(i);null!==t&&(e.has(t)?rs(this,"rowId.duplicate",`Two rows have the same id (${String(t)}). Row ids must be unique: the lookups return the row with the lower physical index.`):e.set(t,i))}return e}#as=()=>{let e=this.#h3(),t=!0===e,r=this.#ey.rowIndexMapper,i=this.#hq;this.#hq=e,this.#h8(wY(e)),t&&this.#ey.getSettings().nestedRows&&rs(this,"rowId.nestedRows","Generated row ids (`rowId: true`) do not follow the rows that the `nestedRows` plugin moves or detaches. Store the ids in the data and set `rowId` to their property."),t&&!this.#h$?(this.#h$=r.registerMap(w$,new wK(this.#h9,()=>this.#hU)),this.#h$.addLocalHook("change",this.#h7)):!t&&this.#h$&&(r.unregisterMap(w$),this.#h$=null),this.#h7(),e!==i&&(!0===i||wY(i))&&this.#ey.runHooks("afterRowIdsReset")};#h1=(e,t,r,i)=>{!1!==e&&this.#de(i)};#h0=(e,t,r)=>{t||!0===this.#ey.runHooks("hasExternalDataSource")||this.#de(r)};#h2=(e,t)=>{if("remove"!==e||!this.#ey.hasHook("afterRowIdsRemoved")||null===t||"object"!=typeof t||!("rowsRemove"in t)||!Array.isArray(t.rowsRemove))return;let r=t.rowsRemove.filter(e=>null!=e);r.length>0&&this.#ey.runHooks("afterRowIdsRemoved",r,"dataProvider")};#de(e){if(null!==this.#hX||!this.#ey.hasHook("afterRowIdsRemoved"))return;let t=this.#h5();t&&(this.#hX=new Set(wj(this.#dt(),t)),this.#hQ=e,this.#ey._registerMicrotask(this.#dr))}#dr=()=>{let e=this.#hX,t=this.#hQ;if(this.#hX=null,this.#hQ=void 0,!e||this.#ey.isDestroyed)return;let r=this.#h5(),i=new Set(r?wj(this.#dt(),r):[]),n=[...e].filter(e=>!i.has(e));n.length>0&&this.#ey.runHooks("afterRowIdsRemoved",n,t)};#dt(){return Array.from({length:this.#ey.rowIndexMapper.getNumberOfIndexes()},(e,t)=>t)}#h8(e){e!==this.#hK&&(wG.forEach(t=>{e?this.#ey.addHook(t,this.#h7,Number.MIN_SAFE_INTEGER):this.#ey.removeHook(t,this.#h7)}),this.#hK=e)}#h9=()=>{let e=this.#hG;return this.#hG+=1,e};#hZ=(e,t,r)=>{this.#h0(e,t,r),this.#h$&&(this.#hU=!0,this.#ey._registerMicrotask(this.#hJ))};#hJ=()=>{this.#hU=!1};#h7=()=>{this.#hY=!0}}function wX(e){return"string"==typeof e&&e.endsWith("Validator")}let wQ=new WeakMap,wZ=0;function wJ(e){let t=new Map,r=new Map,i=null,n=!1,o=0,s=()=>{n&&(n=!1,r.clear(),t.forEach((e,t)=>{null!==t.physicalRow&&r.set(t.physicalRow,t)}))},l=(e,r="start")=>{if(0===e.length)return;let o=i.getNumberOfIndexes()-e.length,s="end"===r?Math.min(e[0]+1,o):e[0],l=e.length;t.forEach((e,t)=>{null!==t.physicalRow&&t.physicalRow>=s&&(t.physicalRow+=l,n=!0)})},a=e=>{if(0===e.length)return;let r=e.slice().sort((e,t)=>e-t);t.forEach((e,t)=>{if(null===t.physicalRow)return;let i=function(e,t){let r=0,i=e.length;for(;r<i;){let n=Math.floor((r+i)/2);e[n]<t?r=n+1:i=n}return r}(r,t.physicalRow),o=r[i]===t.physicalRow;(o||i>0)&&(t.physicalRow=o?null:t.physicalRow-i,n=!0)})},h=e=>{let r=new Map,i=!1;return t.forEach((t,i)=>{let n=e.get(i)??i.physicalRow;null!==n&&r.set(n,[...r.get(n)??[],i])}),r.forEach(t=>{t.length>1&&t.forEach(t=>{i=e.delete(t)||i})}),i},d=()=>{t.size>0&&null===i?((i=e()).addLocalHook("indexesInserted",l),i.addLocalHook("indexesRemoved",a)):0===t.size&&null!==i&&(i.removeLocalHook("indexesInserted",l),i.removeLocalHook("indexesRemoved",a),i=null,r.clear(),n=!1)};return{track(e){s();let i=r.get(e);return void 0===i&&(o+=1,i={id:o,physicalRow:e},r.set(e,i)),t.set(i,(t.get(i)??0)+1),d(),i},find:e=>(s(),r.get(e)),release(e){let i=t.get(e);if(void 0!==i){if(i>1)return void t.set(e,i-1);t.delete(e),n||null===e.physicalRow||r.get(e.physicalRow)!==e||r.delete(e.physicalRow),d()}},relocate(e){let r=new Map;e.forEach((e,i)=>{t.has(i)&&i.physicalRow!==e&&r.set(i,e)});let i=r.size>0;for(;i;)i=h(r);return r.forEach((e,t)=>{t.physicalRow=e,n=!0}),new Set(r.keys())},get size(){return t.size}}}function w0(e,t,r){return{record:e.track(r),rowObject:t.readRowObject(r),rowId:t.readKeyedRowId(r),meta:null,metaColumn:-1}}function w1(e){let t=null;return r=>{if(null===t){t=new Map;let r=e.countPhysicalRows();for(let i=0;i<r;i++){let r=e.readRowObject(i);w2(r)&&t.set(r,t.has(r)?null:i)}}return t.get(r)}}function w2(e){return"object"==typeof e&&null!==e}function w3(e,t,r=function(e){return t=>{let r,i=e.countPhysicalRows();for(let n=0;n<i;n++)if(e.readRowObject(n)===t){if(void 0!==r)return null;r=n}return r}}(e)){let i,{physicalRow:n}=t.record,o=null!==n&&n<e.countPhysicalRows()?n:null;if(null!==o&&w2(t.rowObject)&&e.readRowObject(o)===t.rowObject)return o;if(null!==t.rowId&&void 0!==t.rowId){if(null!==o&&e.readKeyedRowId(o)===t.rowId)return o;let i=e.findPhysicalRowById(t.rowId);return null!==i?i:w2(t.rowObject)?r(t.rowObject)??null:null}return void 0!==(i=w2(t.rowObject)?r(t.rowObject):void 0)?i:null!==o&&null!==t.meta&&e.getStoredMeta(o,t.metaColumn)===t.meta?o:null}function w6(e,t){Reflect.set(e,0,t)}let w5=null;function w4(e){if(0===e.length)return[];let t=[...e];return t.sort(([e],[t])=>e===t?0:e>t?1:-1),er(t,(e,[t,r])=>{let i=e[e.length-1],[n,o]=i,s=n+o;if(t<=s){let e=Math.max(r-(s-t),0);i[1]+=e}else e.push([t,r]);return e},[t[0]])}let w8=new Map,w9=Object.freeze({insert_row_above:"insert_row",insert_row_below:"insert_row",insert_col_start:"insert_col",insert_col_end:"insert_col",remove_row:"remove_row",remove_col:"remove_col"}),w7=[{name:"persistentState",version:"17.0.0",migrationUrl:"https://handsontable.com/docs/javascript-data-grid/changelog-17/"},{name:"correctFormat",version:"18.0.0",migrationUrl:"https://handsontable.com/docs/javascript-data-grid/migration-from-17.1-to-18.0/"}],ye=new Set(["fixedRowsTop","fixedRowsBottom","fixedColumnsStart","fixedColumnsLeft","fixedColumnsEnd"]),yt="htLineClamp",yr=Object.freeze({mode:"none"}),yi=Object.freeze({mode:"ellipsis"}),yn=new Map;function yo(e){let t=e.textEllipsis;if("number"==typeof t){if(!Number.isInteger(t)||t<1)return yr;if(1===t||!1===e.wordWrap)return yi;let r=yn.get(t);return void 0===r&&(r=Object.freeze({mode:"clamp",lines:t}),yn.set(t,r)),r}return t?yi:yr}function ys(e,t,r,i,n,o,s){let l=s.ariaTags,a=[],h=[],d=[],u=[];s._isBaseRendererCalled=!0,s.className&&rW(t,s.className),s.readOnly?(!1!==s.readOnlyStyling&&a.push(s.readOnlyCellClassName),l&&u.push(j())):l&&d.push(j()[0]),!1===s.valid&&s.invalidCellClassName?(a.push(s.invalidCellClassName),l&&u.push(Y())):(h.push(s.invalidCellClassName),l&&d.push(Y()[0])),!1===s.wordWrap&&s.noWordWrapClassName&&a.push("htNoWrap",s.noWordWrapClassName),ej(o)&&s.placeholder&&a.push(s.placeholderCellClassName),"none"!==yo(s).mode&&a.push("htTextEllipsis"),r$(t,h),rW(t,a),rj(t,d),rG(t,u)}function yl(e,t,r){e.addEventListener(t,r,!1)}function ya(e,t,r){e.removeEventListener(t,r,!1)}function yh(e){return e.ownerDocument.defaultView.getComputedStyle(e)}function yd(e,t={}){let r,i={minHeight:200,maxHeight:300,minWidth:100,maxWidth:300,textContent:e=>e.value,...t},n=e.body,o=e.createTextNode(""),s=e.createElement("span");function l(){o.textContent=i.textContent(r),s.style.position="absolute",s.style.fontSize=yh(r).fontSize,s.style.fontFamily=yh(r).fontFamily,s.style.whiteSpace="pre",n.appendChild(s);let e=Number.parseInt(yh(r)?.paddingInlineStart||"0",10),t=Number.parseInt(yh(r)?.paddingInlineEnd||"0",10),l=s.clientWidth+e+t+1;n.removeChild(s);let a=r.style;a.height=`${i.minHeight}px`,i.minWidth>l?a.width=`${i.minWidth}px`:l>i.maxWidth?a.width=`${i.maxWidth}px`:a.width=`${l}px`;let h=r.scrollHeight?r.scrollHeight-1:0;i.minHeight>h?a.height=`${i.minHeight}px`:i.maxHeight<h?(a.height=`${i.maxHeight}px`,a.overflowY="visible"):a.height=`${h}px`}function a(){e.defaultView.setTimeout(l,0)}function h(e,t){if("inherit"===e)return t;let r=Number.parseInt(String(e),10);if(!isNaN(r))return r}return{init:function(e,t,n=!1){r=e;if(t&&t.minHeight){let e=h(t.minHeight,r.clientHeight);void 0!==e&&(i.minHeight=e)}if(t&&t.maxHeight){let e=h(t.maxHeight,r.clientHeight);void 0!==e&&(i.maxHeight=e)}if(t&&t.minWidth){let e=h(t.minWidth,r.clientWidth);void 0!==e&&(i.minWidth=e)}if(t&&t.maxWidth){let e=h(t.maxWidth,r.clientWidth);void 0!==e&&(i.maxWidth=e)}s.firstChild||(s.className="autoResize",s.style.display="inline-block",s.appendChild(o)),"TEXTAREA"===r.nodeName&&(r.style.resize="none",r.style.height=`${i.minHeight}px`,r.style.minWidth=`${i.minWidth}px`,r.style.maxWidth=`${i.maxWidth}px`,r.style.overflowY="hidden"),n&&(yl(r,"input",l),yl(r,"keydown",a)),l()},resize:l,unObserve(){ya(r,"input",l),ya(r,"keydown",a)}}}function yu(e,t){let r=iT(t),i=t.value.split("\n"),n=r,o=0;for(let t=0;t<i.length;t++){let s=i[t];0!==t&&(o+=i[t-1].length+1);let l=o+s.length;if("home"===e?n=o:"end"===e&&(n=l),r<=l)break}iI(t,n,n)}ys.RENDERER_TYPE="base";let yc="ht_editor_hidden",yg="textEditor";class yp extends n0{static get EDITOR_TYPE(){return"text"}eventManager=new n2(this);autoResize=yd(this.hot.rootDocument);#di=!1;#dn=null;#ds=()=>{let{maxLength:e}=this.cellProperties;return this.capsLength&&sN(e)?e:null};#dl=e=>om(this.cellProperties.trimWhitespace?e.trim():e);#da=e=>{let{isComposing:t=!1}=e??{};if(t||null===this.#ds())return;let{value:r,selectionStart:i,selectionEnd:n}=this.TEXTAREA,o=i??r.length;this.#dn={length:this.#dl(r),selectedLength:om(r.slice(o,n??o))}};#dh=e=>{let{isComposing:t=!1,inputType:r=""}=e,i=this.#ds();if(null===i||t)return;let n=this.#dn;if(this.#dn=null,null===n||/^(delete|history|insertFromDrop)/.test(r))return;let{value:o,selectionEnd:s}=this.TEXTAREA,l=this.#dl(o),a=l-i;if(a<=0)return;let h=l-(n.length-n.selectedLength),d=s??o.length,u=this.cellProperties.trimWhitespace?Math.min(d,o.trimEnd().length):d,c=of(o,u,Math.min(a,h));c.value!==o&&(this.TEXTAREA.value=c.value,iI(this.TEXTAREA,c.index,c.index))};constructor(e){super(e),this.eventManager=new n2(this),this.createElements(),this.bindEvents(),this.hot.addHookOnce("afterDestroy",()=>this.destroy())}getValue(){return this.TEXTAREA.value}setValue(e){this.TEXTAREA.value=eW(e)}get capsLength(){return!0}open(e){this._opened=!0,this.#di=!1,this.#dn=null,this.refreshDimensions(),this.showEditableElement(),this.hot.getShortcutManager().setActiveContextName("editor"),this.registerShortcuts()}close(){this._opened=!1,this.#di=!1,this.#dn=null,this.autoResize.unObserve(),rx(iQ(this.hot.rootDocument),this.hot.rootElement)&&this.hot.listen(),this.hideEditableElement(),this.unregisterShortcuts()}prepare(e,t,r,i,n,o){let s=this.state;if(super.prepare(e,t,r,i,n,o),!o.readOnly){this.refreshDimensions(!0);let{allowInvalid:e}=o;e&&!this.isOpened()&&(this.TEXTAREA.value=""),s===nJ.FINISHED||this.isOpened()||this.hideEditableElement()}}beginEditing(e,t){this.state===nJ.VIRGIN&&(this.TEXTAREA.value="",super.beginEditing(e,t))}focus(){this.TEXTAREA.select(),iI(this.TEXTAREA,this.TEXTAREA.value.length,this.TEXTAREA.value.length)}createElements(e="textarea"){let{rootDocument:t}=this.hot;this.TEXTAREA=t.createElement(e),rG(this.TEXTAREA,[["data-hot-input",""],v(-1)]),rW(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"),rW(this.TEXTAREA_PARENT,"handsontableInputHolder"),rU(this.TEXTAREA_PARENT,this.layerClass)&&r$(this.TEXTAREA_PARENT,this.layerClass),rW(this.TEXTAREA_PARENT,yc),this.textareaParentStyle=this.TEXTAREA_PARENT.style,this.TEXTAREA_PARENT.appendChild(this.TEXTAREA),this.hot.rootElement.appendChild(this.TEXTAREA_PARENT)}hideEditableElement(){t6()&&(this.textareaStyle.textIndent="-99999px"),this.textareaStyle.overflowY="visible",this.textareaParentStyle.opacity="0",this.textareaParentStyle.height="1px",r$(this.TEXTAREA_PARENT,this.layerClass),rW(this.TEXTAREA_PARENT,yc)}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="";let e=this.TEXTAREA_PARENT.childNodes,t=!1;oD(e.length-1,r=>{if(rU(e[r],"handsontableEditor"))return t=!0,!1}),rU(this.TEXTAREA_PARENT,yc)&&r$(this.TEXTAREA_PARENT,yc),t?this.layerClass="ht_editor_visible":this.layerClass=this.getEditedCellsLayerClass(),rW(this.TEXTAREA_PARENT,this.layerClass)}refreshValue(){let e=this.hot.toPhysicalRow(this.row),t=this.hot.getSourceDataAtCell(e,this.col);this.originalValue=t,this.setValue(t),this.resetValueBeforeEdit(),this.refreshDimensions()}hideForScroll(){return this.close(),!1}showAfterScroll(){}refreshDimensions(e=!1){if(this.state!==nJ.EDITING&&!e)return;if(this.TD=this.getEditedCell(),!this.TD){e||(this.#di=this.hideForScroll());return}let t=this.getEditedCellRect();if(!t)return;let{top:r,start:i,width:n,maxWidth:o,height:s,maxHeight:l}=t;this.textareaParentStyle.top=`${r}px`,this.textareaParentStyle[this.hot.isRtl()?"right":"left"]=`${i}px`,this.showEditableElement();let 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(n,o),minHeight:Math.min(s,l),maxWidth:o,maxHeight:l},!0),!e&&this.#di&&(this.#di=!1,this._opened=!0,this.showAfterScroll())}bindEvents(){t8()&&this.eventManager.addEventListener(this.TEXTAREA,"focusout",()=>this.finishEditing(!1)),this.eventManager.addEventListener(this.TEXTAREA,"beforeinput",this.#da),this.eventManager.addEventListener(this.TEXTAREA,"compositionstart",this.#da),this.eventManager.addEventListener(this.TEXTAREA,"input",this.#dh),this.eventManager.addEventListener(this.TEXTAREA,"compositionend",this.#dh),this.addHook("afterScrollHorizontally",()=>this.refreshDimensions()),this.addHook("afterScrollVertically",()=>this.refreshDimensions()),this.addHook("afterColumnResize",()=>{this.refreshDimensions(),this.state===nJ.EDITING&&this.focus()}),this.addHook("afterRowResize",()=>{this.refreshDimensions(),this.state===nJ.EDITING&&this.focus()})}destroy(){this.eventManager.destroy(),this.clearHooks()}registerShortcuts(){let e=this.hot.getShortcutManager().getContext("editor"),t=()=>{this.#da(),this.hot.rootDocument.execCommand("insertText",!1,"\n")},r=()=>nK(this.hot,this.getValue(),this.row,this.col);e.addShortcuts([{keys:[["Control","Enter"]],callback:()=>(t(),!1),runOnlyIf:e=>!r()&&!e?.altKey},{keys:[["Meta","Enter"]],callback:()=>(t(),!1),runOnlyIf:()=>!r()},{keys:[["Alt","Enter"]],callback:()=>(t(),!1)},{keys:[["Home"]],callback:(e,t)=>{yu(t?.[0]??"",this.TEXTAREA)}},{keys:[["End"]],callback:(e,t)=>{yu(t?.[0]??"",this.TEXTAREA)}}],{runOnlyIf:()=>e$(this.hot.getSelected()),group:yg})}unregisterShortcuts(){this.hot.getShortcutManager().getContext("editor").removeShortcutsByGroup(yg)}}function ym(e){for(let t=e.firstChild;t;t=t.nextSibling)if(t.nodeType===Node.ELEMENT_NODE&&iG(t)){if(rU(t,yt))return t;let e="a"===t.localName&&rU(t,mP)?function(e){for(let t=e.firstChild;t;t=t.nextSibling)if(t.nodeType===Node.ELEMENT_NODE&&iG(t)&&rU(t,yt))return t;return null}(t):null;if(e)return e}return null}function yf(e,t,r,i,n,o,s){let l=o;ej(l)&&s.placeholder&&(l=s.placeholder);let a=eW(l),h=a;s.trimWhitespace&&(h=a.trim());let d=yo(s);"clamp"===d.mode?function(e,t,r){let i=ym(e);if(i){let e=i.parentNode;for(;i.previousSibling;)e.removeChild(i.previousSibling);for(;i.nextSibling;)e.removeChild(i.nextSibling)}else rK(e),rW(i=e.ownerDocument.createElement("div"),yt),e.appendChild(i);rW(e,"htTextLineClamp"),i.style.setProperty("--ht-text-line-clamp",String(r)),r0(i,t)}(t,h,d.lines):(ym(t)&&rK(t),r0(t,h))}yf.RENDERER_TYPE="text";let yw={CELL_TYPE:"text",editor:yp,renderer:yf},yy=function(e,t,r=!1){var i,n,o,s,l,a;let h,d,u,c,g,p,m,f,w,y,b,C,S,v,R,E,T,x,A,M,I=this,N=new n2(I),O=(d=new Map,u=0,function(){let e=u+=1,t=new Set,r=new Map;return{register(e,i,n,o){if(r.set(e,{key:i,cellMeta:n,structureVersion:o}),t.has(i))return;t.add(i);let s=d.get(i);s?s.inflight+=1:d.set(i,{applied:0,inflight:1})},answered(e,t){let i=r.get(e);i&&(i.valid=t)},claim(t,i){for(let n=t.length-1;n>=0;n--){let o=r.get(t[n]),s=void 0===o?void 0:d.get(o.key);if(!o||!s)continue;let l=s.applied>e,a=l?s.valid:o.valid;l&&t.splice(n,1),"boolean"==typeof a&&i(o.cellMeta,a,o.structureVersion)}},settle(t){t.forEach(t=>{let i=r.get(t),n=void 0===i?void 0:d.get(i.key);i&&n&&n.applied<e&&(n.applied=e,n.valid=i.valid??n.valid)})},release(){t.forEach(e=>{let t=d.get(e);t&&(t.inflight-=1,t.inflight<=0&&d.delete(e))}),t.clear()}}}),k=wJ(()=>I.rowIndexMapper),H={tracker:(c=wJ(()=>I.columnIndexMapper),g=new WeakMap,{track(e){let t=c.track(e),r=g.get(t);return void 0===r&&(r={id:t.id,record:t,get physicalColumn(){return t.physicalRow}},g.set(t,r)),r},release(e){c.release(e.record)},get size(){return c.size}}),toTrackedPhysicalColumn:e=>e8(e),toProp:e=>e},_=(i=()=>I.rowIndexMapper,n=e=>I.toVisualRow(e),o={getIndexMapper:()=>I.columnIndexMapper,toVisualColumn:e=>I.toVisualColumn(e),toProp:e=>e},p=new Set,m=new Set,f=new Map,w=null,y=null,b=0,C=()=>{p.forEach(({record:e,meta:t})=>{let{physicalRow:r}=e;if(null===r){t.visualRow=null;return}t.row=r,t.visualRow=n(r)})},S=()=>{p.forEach(({column:e,meta:t})=>{if(void 0===e||void 0===o)return;let{physicalColumn:r}=e;if(null===r){t.col=null,t.visualCol=null,t.prop=null;return}t.col=r,t.visualCol=o.toVisualColumn(r),t.prop=o.toProp(r)})},v=()=>{p.size>0&&null===w?(w=i()).addLocalHook("cacheUpdated",C):0===p.size&&null!==w&&(w.removeLocalHook("cacheUpdated",C),w=null),void 0!==o&&null===y&&b>0?(y=o.getIndexMapper()).addLocalHook("cacheUpdated",S):null!==y&&0===b&&(y.removeLocalHook("cacheUpdated",S),y=null),0===p.size&&m.clear()},{add(e,t,r){let i={record:e,meta:t,column:r};return m.delete(t),p.add(i),f.set(t,(f.get(t)??0)+1),b+=+(void 0!==r),v(),()=>{if(p.delete(i)){b-=void 0!==r;let e=(f.get(t)??1)-1;e>0?f.set(t,e):(f.delete(t),null===t.visualRow&&m.add(t))}v()}},findUnplaced(e,t){let r,i=null,n=!1;for(let r of p){let{record:o,meta:s}=r;if(null===s.visualRow&&null!==o.physicalRow&&s.prop===e){if(s===t)return r;n=n||null!==i&&i.record!==o,i=i??r}}return n||(r=!1,m.forEach(t=>{null!==t.visualRow?m.delete(t):t.prop===e&&(r=!0)}),r)?null:i},followRelocated(e,t){let r=[];return p.forEach(i=>{let{record:n,meta:o}=i;e.has(n)&&null!==n.physicalRow&&!t(o,n.physicalRow)&&(p.delete(i),r.push(i))}),C(),v(),r},get size(){return p.size}}),P=new WeakMap,D={countPhysicalRows:()=>I.rowIndexMapper.getNumberOfIndexes(),countVisualRows:()=>I.countRows(),readRowObject:e=>E.modifyRowData(e),getStoredMeta:(e,t)=>eN.getCellMetaIfExists(e,t),readKeyedRowId:e=>tK.getKeyedRowIdAtPhysicalRow(e),findPhysicalRowById:e=>{try{return tK.getPhysicalRowById(e)}catch{return null}}},L=e=>{let t=I.rowIndexMapper,r=()=>t.getNumberOfIndexes()-t.getNotTrimmedIndexesLength(),i=r(),n=(t,r)=>e.rowsInserted(t,r),o=(t,r)=>e.rowsRemoved(t,r),s=()=>{let t=i;(i=r())!==t&&e.trimmedRowsChanged(i-t)};return I.addHook("afterCreateRow",n),I.addHook("afterRemoveRow",o),t.addLocalHook("cacheUpdated",s),()=>{t.removeLocalHook("cacheUpdated",s),I&&(I.removeHook("afterCreateRow",n),I.removeHook("afterRemoveRow",o))}},F=!0,B=null,V=[],z=0,U=!1,W=!1,$=null,G=null,j=!1,Y=!1,K=null,q=[],X=e=>q.reduce((e,t)=>t(e),e),Q=new wW,Z=[],J=[],ee=new Map,er=new WeakMap,ei=0,es=[],el=!1,ea=!1,eh=null,ed=new wU,eu=0,ec=!1,ep=0,em=!1,ew=null,eb=null,eC=new Map,eS=(e,t=[])=>{if(!wX(e))return ep;if(null!==ew)return ew;let r=ep;return t.forEach(([e,t])=>{let i=Number.isInteger(e)?tc(e):null,n=null===i?void 0:k.find(i),o=void 0===n?void 0:eC.get(t)?.get(n)?.[0];void 0!==o&&o<r&&(r=o)}),r},ev=null,eR=null,eE=null,eT=null,ex={...t.initialState,...t};r===sb&&sy.set(this,!0),this.rootContainer=e,this.rootWrapperElement=null,this.rootGridElement=null,this.rootGridContentElement=null,this.rootSlotTopElement=null,this.rootSlotBottomElement=null,this.rootOverlaysElement=null,this.rootPortalElement=null,this.rootElement=sC(this)?e.ownerDocument.createElement("div"):e,this.rootDocument=e.ownerDocument,this.rootWindow=this.rootDocument.defaultView,sC(this)&&(this.rootWrapperElement=this.rootDocument.createElement("div"),this.rootSlotTopElement=this.rootDocument.createElement("div"),this.rootGridElement=this.rootDocument.createElement("div"),this.rootGridContentElement=this.rootDocument.createElement("div"),this.rootOverlaysElement=this.rootDocument.createElement("div"),this.rootSlotBottomElement=this.rootDocument.createElement("div"),this.rootPortalElement=this.rootDocument.createElement("div"),rW(this.rootElement,["ht-wrapper","handsontable"]),rW(this.rootWrapperElement,"ht-root-wrapper"),iq(this.rootContainer.getRootNode())&&rW(this.rootWrapperElement,"ht-shadow-dom"),rW(this.rootSlotTopElement,"ht-slot-top"),rW(this.rootGridElement,"ht-grid"),rW(this.rootGridContentElement,"ht-grid-content"),rW(this.rootOverlaysElement,"ht-overlay"),rW(this.rootSlotBottomElement,"ht-slot-bottom"),this.rootGridContentElement.appendChild(this.rootElement),this.rootGridElement.appendChild(this.rootGridContentElement),this.rootWrapperElement.appendChild(this.rootSlotTopElement),this.rootWrapperElement.appendChild(this.rootGridElement),this.rootWrapperElement.appendChild(this.rootSlotBottomElement),this.rootWrapperElement.appendChild(this.rootOverlaysElement),this.rootContainer.appendChild(this.rootWrapperElement),this.rootWrapperElement.__hotInstance=this,rW(this.rootPortalElement,"ht-portal"),this.rootDocument.body.appendChild(this.rootPortalElement)),this.isDestroyed=!1,this.renderSuspendedCounter=0,this.executionSuspendedCounter=0;let eA=ex?.layoutDirection??"inherit",eM=["rtl","ltr"].includes(eA)?eA:this.rootWindow.getComputedStyle(this.rootElement).direction;this.rootElement.setAttribute("dir",eM),this.rootWrapperElement?.setAttribute("dir",eM),this.isRtl=function(){return"rtl"===eM},this.isLtr=function(){return!I.isRtl()},this.getDirectionFactor=function(){return I.isLtr()?1:-1},this.stylesHandler=new mQ({hot:I,rootElement:I.rootElement,rootDocument:I.rootDocument,onThemeChange:e=>{sC(this)&&(r$(this.rootWrapperElement,/ht-theme-.*/g),r$(this.rootPortalElement,/ht-theme-.*/g),e&&(rW(this.rootWrapperElement,e),rW(this.rootPortalElement,e),getComputedStyle(this.rootWrapperElement).getPropertyValue("--ht-line-height")||rn(`The "${e}" theme is enabled, but its stylesheets are missing or not imported correctly. Import the correct CSS files in order to use that theme.`)),this.view?._wt?.selectionManager?.refreshAllBorderHandleStyles())},injectCoreCss:sC(this)?t?.injectCoreCss!==!1:t?.injectCoreCss===!0}),this.themeManager=null,gP(h=dD(a=ex.language))?gV(h):(h=gO,dL(a)),ex.language=h;let eI=Object.fromEntries(Object.entries(ex).filter(([e,t])=>("cell"!==e||!!Array.isArray(t))&&!(nM.getSingleton().isRegistered(e)||nM.getSingleton().isDeprecated(e)))),eN=new p_(I,eI,[pP,pH]);this.renderChangeTracker=new i2;let eO=eN.getTableMeta(),ek=eN.getGlobalMeta(),eH=oK();this.container=this.rootDocument.createElement("div"),this.rootElement.insertBefore(this.container,this.rootElement.firstChild),this.guid=`ht_${n9()}`,w8.set(this.guid,this),this.columnIndexMapper=new dP,this.rowIndexMapper=new dP,this.columnIndexMapper.addLocalHook("indexesSequenceChange",e=>{I.runHooks("afterColumnSequenceChange",e)}),this.rowIndexMapper.addLocalHook("indexesSequenceChange",e=>{I.runHooks("afterRowSequenceChange",e)}),N.addEventListener(this.rootDocument.documentElement,"compositionstart",e=>{I.runHooks("beforeCompositionStart",e)}),E=new pL(I);let e_=nO(this.guid);e_.register("cellRangeMapper",new pJ({rowIndexMapper:this.rowIndexMapper,columnIndexMapper:this.columnIndexMapper})),this.rootElement.id&&"ht_"!==this.rootElement.id.substring(0,3)||(this.rootElement.id=this.guid);let eP=new pn(eO,{rowIndexMapper:I.rowIndexMapper,columnIndexMapper:I.columnIndexMapper,countCols:()=>I.countCols(),countRows:()=>I.countRows(),propToCol:e=>R.propToCol(e)??e,isEditorOpened:()=>{let e=I.getActiveEditor();return!!e&&e.isOpened()},isPluginEnabled:e=>I.getPlugin(e)?.enabled===!0,isPluginRegistered:e=>void 0!==I.getPlugin(e),countRenderableColumns:()=>I.view.countRenderableColumns(),countRenderableRows:()=>I.view.countRenderableRows(),countRowHeaders:()=>I.countRowHeaders(),countColHeaders:()=>I.countColHeaders(),countRenderableRowsInRange:(e,t)=>I.view.countRenderableRowsInRange(e,t),countRenderableColumnsInRange:(e,t)=>I.view.countRenderableColumnsInRange(e,t),getShortcutManager:()=>I.getShortcutManager(),createCellCoords:(e,t)=>I._createCellCoords(e,t),createCellRange:(e,t,r)=>I._createCellRange(e,t,r),visualToRenderableCoords:e=>{let{row:t,col:r}=e;return I._createCellCoords(t>=0?I.rowIndexMapper.getRenderableFromVisualIndex(t):t,r>=0?I.columnIndexMapper.getRenderableFromVisualIndex(r):r)},renderableToVisualCoords:e=>{let{row:t,col:r}=e;return I._createCellCoords(t>=0?I.rowIndexMapper.getVisualFromRenderableIndex(t):t,r>=0?I.columnIndexMapper.getVisualFromRenderableIndex(r):r)},findFirstNonHiddenRenderableRow:(e,t)=>{let r=t>e?1:-1,i=Math.min(e,t),n=Math.max(e,t),o=I.rowIndexMapper.getNearestNotHiddenIndex(e,r);return null===o||1===r&&o>n||-1===r&&o<i?null:o>=0?I.rowIndexMapper.getRenderableFromVisualIndex(o):o},findFirstNonHiddenRenderableColumn:(e,t)=>{let r=t>e?1:-1,i=Math.min(e,t),n=Math.max(e,t),o=I.columnIndexMapper.getNearestNotHiddenIndex(e,r);return null===o||1===r&&o>n||-1===r&&o<i?null:o>=0?I.columnIndexMapper.getRenderableFromVisualIndex(o):o},isDisabledCellSelection:(e,t)=>e<0||t<0?I.getSettings().disableVisualSelection:I.getCellMeta(e,t).disableVisualSelection});this.selection=eP;let eD=(e,t)=>{this.selection.capturePhysicalSelection(t,(({indexesSequenceChanged:e,trimmedIndexesChanged:t})=>t&&!e)(e),e.trimmedIndexesChanged)},eL=(e,t)=>{let{hiddenIndexesChanged:r,trimmedIndexesChanged:i}=e;this.forceFullRender=!0,(e.indexesSequenceChanged||i||r)&&("row"===t?this.view?.invalidateRowHeightCache():this.view?.invalidateColumnWidthCache());let n=x?.isEditorOpened()===!0;return(({indexesSequenceChanged:e,trimmedIndexesChanged:t})=>t&&!e)(e)&&this.selection.restorePhysicalSelection(t),r&&(this.selection.commit(),i||this.selection.recaptureHighlightRecord()),n},eF=this.rowIndexMapper.getNumberOfIndexes(),eB=this.columnIndexMapper.getNumberOfIndexes(),eV=(e,{trimmedIndexesChanged:t,indexesSequenceChanged:r},i,n)=>{if(this.selection.isSelected()){if(e)return void this.selection.recaptureHighlightRecord();if(r&&this.selection.recaptureHighlightRecord(),t){if(x?.isEditorOpened()){this.selection.recaptureHighlightRecord(),r&&this.selection.fitGridTrackingExtents(n);return}this.selection.deselectIfHighlightStranded({unresolvableOnly:i})||(this.selection.recaptureHighlightRecord(),this.selection.fitGridTrackingExtents(n))}}};function ez(e){return e<0?e:I.colToProp(e)}this.columnIndexMapper.addLocalHook("beforeCacheUpdate",e=>eD(e,"column")),this.rowIndexMapper.addLocalHook("beforeCacheUpdate",e=>eD(e,"row")),this.columnIndexMapper.addLocalHook("afterCacheUpdate",()=>this.selection.discardPhysicalSelectionSnapshot("column")),this.rowIndexMapper.addLocalHook("afterCacheUpdate",()=>this.selection.discardPhysicalSelectionSnapshot("row")),this.columnIndexMapper.addLocalHook("cacheUpdated",e=>{this.renderChangeTracker.markAllChanged();let t=eL(e,"column"),r=this.columnIndexMapper.getNumberOfIndexes(),i=r!==eB;eB=r,i&&this.selection.markStructuralIndexChange();try{this.runHooks("afterColumnSequenceCacheUpdate",e)}finally{this.selection.notifyDeferredDeselect("column")}eV(i,e,t,"column")}),this.rowIndexMapper.addLocalHook("cacheUpdated",e=>{this.renderChangeTracker.markAllChanged();let t=eL(e,"row"),r=this.rowIndexMapper.getNumberOfIndexes(),i=r!==eF;eF=r,i&&this.selection.markStructuralIndexChange();try{this.runHooks("afterRowSequenceCacheUpdate",e)}finally{this.selection.notifyDeferredDeselect("row")}eV(i,e,t,"row")}),this.selection.addLocalHook("afterSetRangeEnd",(e,t)=>{let r=t_(!1),i=this.selection.getSelectedRange(),{from:n,to:o}=i.current(),s=i.size()-1;this.runHooks("afterSelection",n.row,n.col,o.row,o.col,r,s),this.runHooks("afterSelectionByProp",n.row,ez(n.col),o.row,ez(o.col),r,s);let l=eP.getSelectionSource();t&&!["loadData","updateData","deselect","shift"].includes(l)&&(!r.isTouched()||r.isTouched()&&!r.value)&&M.scrollTo(e);let a=eP.isSelectedByRowHeader(),h=eP.isSelectedByColumnHeader();if(a&&h?rW(this.rootElement,["ht__selection--rows","ht__selection--columns"]):a?(r$(this.rootElement,"ht__selection--columns"),rW(this.rootElement,"ht__selection--rows")):h?(r$(this.rootElement,"ht__selection--rows"),rW(this.rootElement,"ht__selection--columns")):r$(this.rootElement,["ht__selection--rows","ht__selection--columns"]),!["shift","refresh","loadData","updateData","deselect"].includes(l)&&(x.closeEditor(),!I))return;let d="shift"===l&&!t;if(!["refresh","loadData","updateData","deselect"].includes(l)&&!d){if(I.view.render(),!I)return;x.prepareEditor()}}),this.selection.addLocalHook("beforeSetFocus",e=>{this.runHooks("beforeSelectionFocusSet",e.row,e.col)}),this.selection.addLocalHook("afterSetFocus",e=>{let t=t_(!1);this.runHooks("afterSelectionFocusSet",e.row,e.col,t),(!t.isTouched()||t.isTouched()&&!t.value)&&M.scrollTo(e),x.closeEditor(),!I||(I.view.render(),I&&x.prepareEditor())}),this.selection.addLocalHook("afterSelectionFinished",e=>{if(!I)return;let t=e.length-1,{from:r,to:i}=e[t];this.runHooks("afterSelectionEnd",r.row,r.col,i.row,i.col,t),this.runHooks("afterSelectionEndByProp",r.row,ez(r.col),i.row,ez(i.col),t),["refresh","deselect"].includes(eP.getSelectionSource())&&(I.view.render(),x.prepareEditor())}),this.selection.addLocalHook("afterIsMultipleSelection",e=>{let t=this.runHooks("afterIsMultipleSelection",e.value);e.value&&(e.value=t)}),this.selection.addLocalHook("afterDeselect",()=>{x.closeEditor(),!I||(I.view.render(),I&&(r$(this.rootElement,["ht__selection--rows","ht__selection--columns"]),this.runHooks("afterDeselect")))}),this.selection.addLocalHook("afterSetHandlesHoveredLayer",()=>{I.view.render()}),this.selection.addLocalHook("beforeHighlightSet",()=>I.runHooks("beforeSelectionHighlightSet")).addLocalHook("beforeSetRangeStart",(...e)=>I.runHooks("beforeSetRangeStart",...e)).addLocalHook("beforeSetRangeStartOnly",(...e)=>I.runHooks("beforeSetRangeStartOnly",...e)).addLocalHook("beforeSetRangeEnd",(...e)=>I.runHooks("beforeSetRangeEnd",...e)).addLocalHook("beforeSelectColumns",(...e)=>I.runHooks("beforeSelectColumns",...e)).addLocalHook("afterSelectColumns",(...e)=>I.runHooks("afterSelectColumns",...e)).addLocalHook("beforeSelectRows",(...e)=>I.runHooks("beforeSelectRows",...e)).addLocalHook("afterSelectRows",(...e)=>I.runHooks("afterSelectRows",...e)).addLocalHook("beforeSelectAll",(...e)=>I.runHooks("beforeSelectAll",...e)).addLocalHook("afterSelectAll",(...e)=>I.runHooks("afterSelectAll",...e)).addLocalHook("beforeModifyTransformStart",(...e)=>I.runHooks("modifyTransformStart",...e)).addLocalHook("afterModifyTransformStart",(...e)=>I.runHooks("afterModifyTransformStart",...e)).addLocalHook("beforeModifyTransformFocus",(...e)=>I.runHooks("modifyTransformFocus",...e)).addLocalHook("afterModifyTransformFocus",(...e)=>I.runHooks("afterModifyTransformFocus",...e)).addLocalHook("beforeModifyTransformEnd",(...e)=>I.runHooks("modifyTransformEnd",...e)).addLocalHook("afterModifyTransformEnd",(...e)=>I.runHooks("afterModifyTransformEnd",...e)).addLocalHook("beforeRowWrap",(...e)=>I.runHooks("beforeRowWrap",...e)).addLocalHook("beforeColumnWrap",(...e)=>I.runHooks("beforeColumnWrap",...e)).addLocalHook("insertRowRequire",e=>I.alter("insert_row_above",e,1,"auto")).addLocalHook("insertColRequire",e=>I.alter("insert_col_start",e,1,"auto"));let eU=({axis:e,getCount:t,getNotTrimmedCount:r,isEmpty:i,isRemovable:n,previousMinimum:o,previousSpare:s,minimum:l,spare:a})=>{if(!(p0(o)>p0(l)||p0(s)>p0(a)))return;let h=t();if(h<r())return;let d=function({count:e,trailingEmpty:t,minimum:r,spare:i}){let n=Math.max(p0(r),e-t+p0(i));return Math.max(0,e-n)}({count:h,trailingEmpty:p1(h,h,i),minimum:l,spare:a}),u=p1(h,d,n);u>0&&((e,t,r)=>{let i=eP.isSelected()?I.getSelectedRangeActive():void 0,n="row"===e?i?.highlight.row:i?.highlight.col,o="row"===e?R.removeRow(t,r,"auto"):R.removeCol(t,r,"auto");if(o&&"number"==typeof n&&n>=t&&x.closeEditor(!0),o&&eP.isSelected()&&eP.getSelectedRange().ranges.some(r=>{let i=r.getOuterBottomEndCorner();return(("row"===e?i.row:i.col)??-1)>=t})){eP.markSource("shift");try{eP.refresh()}finally{eP.markEndSource()}}})(e,h-u,u)};function eK(e,t){let r="className"===e?I.rootElement:I.table;if(F)void 0!==t&&rW(r,t);else{let i=[],n=[];if(ek[e]){let t=ek[e];i=Array.isArray(t)?t:ef(String(t))}t&&(n=Array.isArray(t)?t:ef(t));let o=eg(i,n),s=eg(n,i);o.length&&r$(r,o),s.length&&rW(r,s)}ek[e]=t}function eq(e,t){if(i3(t)||Array.isArray(t))nM.getSingleton()._addFromSettings(e,t,I);else{if(null!==t)return;nM.getSingleton()._removeFromSettings(e,I)}eO[e]=t}function eX(e){let t;z+=1;try{t=e()}finally{z-=1}return eQ(),t}function eQ(e=0){if(!U||j||z>e||null!==B||!I.view)return;let t=eH.getItems().map(([,e])=>e),r=()=>t.reduce((e,t)=>t.runOwedReadyStep()||e,!1);z+=1;try{ed.suppress(()=>{let e=0;for(;e<t.length&&r();)e+=1})}finally{z-=1}(U=t.some(e=>e.isReadyStepOwed()))&&rn("A plugin ready step (`onGridReady()`) kept enabling or updating plugins. The steps still owed run when the next settings update, data load, or plugin call ends.")}function eZ(){if(I&&!I.isDestroyed&&I.view){if(!I.view.isVisible())return void eJ();if(eT?.disconnect(),eT=null,I.runHooks("afterFontsLoad"),I&&!I.isDestroyed&&I.view){if(!I.view.isVisible())return void eJ();I.view.invalidateIndexSizesCache(),I.renderChangeTracker.markAllChanged(),I.render()}}}function eJ(){null===eT&&(eT=iz(I.view._wt.wtTable.TABLE,()=>{eT=null,eZ()}))}function e0(e){let t={};return tP(e,"colorScheme")&&(t.colorScheme=e.colorScheme),tP(e,"density")&&(t.density=e.density),t}function e1(){return{colorScheme:eO.colorScheme,density:eO.density}}function e2(e,t){let r;(I.themeManager?.destroy(),void 0===e)?(r=wc("main")?wy("main"):wv(wE),r=wy("main")):r="function"!=typeof e.getThemeConfig?wv(e):e,I.themeManager=function({hot:e,themeObject:t,overrides:r}){return new ws({hot:e,themeObject:t,overrides:r})}({hot:I,themeObject:r,overrides:t})}function e3(){let e=!1;return{validatorsInQueue:0,valid:!0,addValidatorToQueue(){this.validatorsInQueue+=1,e=!1},removeValidatorFormQueue(){this.validatorsInQueue=this.validatorsInQueue-1<0?0:this.validatorsInQueue-1,this.checkIfQueueIsEmpty()},onQueueEmpty(e){},checkIfQueueIsEmpty(){0===this.validatorsInQueue&&!1===e&&(e=!0,this.onQueueEmpty(this.valid))}}}function e6(e,t){return!!t?.isOpened()&&dh(e,t.row,t.prop)}function e5(e,t,r=!1){let i=function(e){let t=I.toPhysicalRow(e);if(null!==t)return t;let r=I.rowIndexMapper.getNotTrimmedIndexesLength();return e>=r?I.rowIndexMapper.getNumberOfIndexes()+e-r:e}(e),n=I.toPhysicalColumn(t)??t,o={visualRow:e,visualColumn:t};return r?eN.getCellMeta(i,n,o):eN.getCellMetaTransient(i,n,o)}function e4(e,t,r){let i=tn(e,P.get(e)??null);if(i===e){if(e.valid===t)return;e.valid=t}ti(i,t,r)}function e8(e){if(!Number.isInteger(e)||"array"!==I.dataType||eO.columns&&0!==eO.columns.length)return null;let t=R.propToCol(e);return"number"!=typeof t?null:I.toPhysicalColumn(t)===e?e:null}function e9(e,t,r,i,n,o){let s=e.findIndex(e=>{if(t.getProp(e)!==r)return!1;let o=t.getRecord(e);return void 0===o?null!==n&&(t.getPastEndRow(e)??e[0])===n:null!==o.physicalRow&&o.physicalRow===i});-1!==s&&(e[s][3]=o)}function e7(e,t){return null===e&&wX(t)}function te(e,t,r){let i=_.findUnplaced(e,eb),n=i?.record.physicalRow??null;if(null===i||null===n)return;let o=n$(t,i.meta,r);ee.forEach(({records:t},r)=>{e9(r,t,e,n,null,o)})}function tt(e,t,r,i){void 0===i?R.set(e,t,r):R.setAtPhysicalRow(i,t,r,e)}function tr(e,t=!0){eP.suspendShifts(t);let r=!1;try{e(),r=!0}finally{eP.resumeShifts(r)}}function ti(e,t,r){if(eN.getStructureVersion()!==r)return;let i=e.row,n=e.col;if(!Number.isInteger(i)||!Number.isInteger(n))return;let o=eN.getCellMetaIfExists(i,n);if(o!==e){if(void 0!==o)o.valid=t,i1(o);else if(!1===t){let r=eN.getCellMeta(i,n,{visualRow:e.visualRow,visualColumn:e.visualCol,skipMetaExtension:!0});r.valid=t,i1(r)}}}function tn(e,t){if(null===t||!P.has(e))return e;let{physicalRow:r}=t;return{...e,row:r??void 0,col:e.col,visualRow:null===r?null:I.toVisualRow(r),visualCol:e.visualCol,hidden:e.hidden}}function to(e,t,r){return Array.isArray(e)?e:[[e,t,r]]}function ts(e,t,r,i){return(r||"object"!=typeof e||"string"!=typeof t?r:t)||i}function tl(e,t){let r=I.getActiveEditor(),i=!r?.isOpened()||dh(e.filter(e=>null!==e),r.row,r.prop),n=I.runHooks("beforeChange",e,t||"edit");if(!I)return[];let o=e.filter(e=>null!==e);if(!1===n||0===o.length)return i&&I.getActiveEditor()?.cancelChanges(),[];for(let e=o.length-1;e>=0;e--){let r,[i,n,,s]=o[e],l=R.propToCol(n)??n;r=Number.isInteger(l)?e5(i,l):{...Object.getPrototypeOf(eO),...eO},o[e][3]=n$(s,r,t)}return o}T={alter(e,t,r=1,i,n){eX(()=>tr(()=>T.runAlter(e,t,r,i,n)))},runAlter(e,t,r=1,i,n){x.suspendStrandDiscards();try{var o,s;let l=I.runHooks("beforeAlter",e,t,r,i,n);if(!1===l)return;switch(e){case"insert_row_below":case"insert_row_above":let a=I.countSourceRows();if(eO.maxRows===a)return;let h="insert_row_below"===e?"below":"above",d="number"==typeof t?t:"below"===h?a:0,{delta:u,startPhysicalIndex:c}=R.createRow(d,r,{source:i,mode:h});eP.shiftRows(I.toVisualRow(c),u);break;case"insert_col_start":case"insert_col_end":let g="insert_col_end"===e?"end":"start",p="end"===g?I.countSourceCols():0,m="number"==typeof t?t:p,{delta:f,startPhysicalIndex:w}=R.createCol(m,r,{source:i,mode:g});if(f){if(Array.isArray(eO.colHeaders)){let e=[w,0];e.length+=f,Array.prototype.splice.apply(eO.colHeaders,e)}eP.shiftColumns(I.toVisualColumn(w),f)}break;case"remove_row":let y;o=Array.isArray(t)?w4(t):[[t,r]],y=0,eo(o,([e,t])=>{if(Number.isInteger(e)){let r=fW(e-y,t,I.countRows());if(null===r)return;t=r.amount}let r=ej(e)?I.countRows()-1:Math.max(e-y,0);Number.isInteger(e)&&(e=Math.max(e-y,0));let n=I.countRows();if(!R.removeRow(e,t,i))return;if(eP.isSelected()){let{row:r}=I.getSelectedRangeActive().highlight;r>=e&&r<=e+t-1&&x.closeEditor(!0)}let o=I.countRows(),s=eO.fixedRowsTop;r>=0&&s>=r+1&&(eO.fixedRowsTop-=Math.min(t,s-r));let l=eO.fixedRowsBottom;if(l){let t=n-o,i=Number.isInteger(e)?r:Math.max(n-t,0),s=Math.min(i+t-1,n-1)-Math.max(i,n-l)+1;s>0&&(eO.fixedRowsBottom-=Math.min(s,l))}if(0===o)eP.deselect();else if("ContextMenu.removeRow"===i){let e=eP.getSelectedRange(),t=e.pop();e.clear().set(t.from).current().setTo(t.to),eP.flushHeldShifts(),eP.refresh()}else eP.shiftRows(e,-t);y+=t});break;case"remove_col":let b;s=Array.isArray(t)?w4(t):[[t,r]],b=0,eo(s,([e,t])=>{if(Number.isInteger(e)){let r=fW(e-b,t,I.countCols());if(null===r)return;t=r.amount}let r=ej(e)?I.countCols()-1:Math.max(e-b,0);Number.isInteger(e)&&(e=Math.max(e-b,0));let n=I.countCols(),o=[];if(Array.isArray(eO.colHeaders)){let i=ej(e)?Math.max(n-t,0):r;oD(i,i+t-1,e=>{let t=I.toPhysicalColumn(e);null!==t&&o.push(t)})}if(!R.removeCol(e,t,i))return;if(eP.isSelected()){let{col:r}=I.getSelectedRangeActive().highlight;r>=e&&r<=e+t-1&&x.closeEditor(!0)}let s=I.countCols();if(0===s)eP.deselect();else if("ContextMenu.removeColumn"===i){let e=eP.getSelectedRange(),t=e.pop();e.clear().set(t.from).current().setTo(t.to),eP.flushHeldShifts(),eP.refresh()}else eP.shiftColumns(e,-t);let l=eO.fixedColumnsStart;r>=0&&l>=r+1&&(eO._fixedColumnsStart-=Math.min(t,l-r));let a=eO.fixedColumnsEnd;if(a){let t=n-s,i=Number.isInteger(e)?r:Math.max(n-t,0),o=Math.min(i+t-1,n-1)-Math.max(i,n-a)+1;o>0&&(eO.fixedColumnsEnd-=Math.min(o,a))}if(Array.isArray(eO.colHeaders)){let e=eO.colHeaders;[...o].sort((e,t)=>t-e).forEach(t=>{e.splice(t,1)})}b+=t});break;default:tf(`There is no such action "${e}"`)}n||T.adjustRowsAndCols()}finally{x.resumeStrandDiscards(),I.forceFullRender=!0,I.view.invalidateColumnWidthCache()}eQ(1),I.view.render()},adjustRowsAndCols(){tr(()=>{let e=eO.minRows,t=eO.minSpareRows,r=eO.minCols,i=eO.minSpareCols;if(e){let t=I.countRows();t<e&&R.createRow(t,e-t,{source:"auto",fillsMinimumSize:!0})}if(t){let e=I.countEmptyRows(!0);if(e<t){let r=Math.min(t-e,eO.maxRows-I.countSourceRows());R.createRow(I.countRows(),r,{source:"auto",fillsMinimumSize:!0})}}{let e=0,t=Math.floor(Number(eO.fixedColumnsEnd))>0,n=i>0&&!eO.columns&&"array"===I.dataType&&!t;if(n)for(let t=I.countCols()-1;t>=0&&I.isEmptyCol(t)&&!((e+=1)>=i);t--);let o=I.countCols();if(r&&!eO.columns&&!t&&o<r){let t=r-o;e+=t,R.createCol(o,t,{source:"auto",fillsMinimumSize:!0})}if(n&&e<i){o=I.countCols();let t=Math.min(i-e,eO.maxCols-o);R.createCol(o,t,{source:"auto",fillsMinimumSize:!0})}}},!1)},removeSurplusRowsAndCols(e){eU({axis:"row",getCount:()=>I.countRows(),getNotTrimmedCount:()=>I.rowIndexMapper.getNotTrimmedIndexesLength(),isEmpty:e=>I.isEmptyRow(e),isRemovable:e=>R.isTrailingFillerRow(I.toPhysicalRow(e)),previousMinimum:e.minRows,previousSpare:e.minSpareRows,minimum:eO.minRows,spare:eO.minSpareRows}),eO.columns||"array"!==I.dataType||eU({axis:"column",getCount:()=>I.countCols(),getNotTrimmedCount:()=>I.columnIndexMapper.getNotTrimmedIndexesLength(),isEmpty:e=>I.isEmptyCol(e),isRemovable:e=>R.isTrailingFillerColumn(I.toPhysicalColumn(e)),previousMinimum:e.minCols,previousSpare:e.minSpareCols,minimum:eO.minCols,spare:eO.minSpareCols})},populateFromArray(e,t,r,i,n){let o,s,l,a,h,d=[],u={},c=[],g=e.row,p=e.col;if(0===(s=t.length))return!1;let m=0,f=0;switch(tx(r)&&(m=r.col-p+1,f=r.row-g+1),n){case"shift_down":let w=et(t),y=w.length;if(0===y)return!1;let b=Math.max(y,m),C=I.getData().slice(g),S=et(C).slice(p,p+b);for(l=0;l<b;l+=1)if(l<y){for(o=0,s=w[l].length;o<f-s;o+=1)w[l].push(w[l][o%s]);l<S.length?c.push(w[l].concat(S[l])):c.push(w[l].concat(Array(C.length).fill(null)))}else c.push(w[l%y].concat(S[l]));I.populateFromArray(g,p,et(c));break;case"shift_right":let v=t.length,R=Math.max(v,f),E=I.getData().slice(g).map(e=>e.slice(p));for(o=0;o<R;o+=1)if(o<v){for(l=0,a=t[o].length;l<m-a;l+=1)t[o].push(t[o][l%a]);if(o<E.length)for(let e=0;e<E[o].length;e+=1)t[o].push(E[o][e]);else t[o].push(...Array(E[0].length).fill(null))}else t.push(t[o%s].slice(0,R).concat(E[o]));I.populateFromArray(g,p,t);break;default:u.row=e.row,u.col=e.col;let T=0,x=0,A=!0,M="Autofill.fill"===i||"autofill.fill"===i,N=function(e,r=null){let i=t[e%t.length];return null!==r?i[r%i.length]:i},O=t.length,k=r?r.row-e.row+1:0;for(o=0,s=r?k:Math.max(O,k);o<s&&!(r&&u.row>r.row&&k>O||!eO.allowInsertRow&&u.row>I.countRows()-1)&&!(u.row>=eO.maxRows);o++){let t=o-T,n=M?o:t,c=N(n).length,g=r?r.col-e.col+1:0;if(a=r?g:Math.max(c,g),u.col=e.col,h=e5(u.row,u.col),("CopyPaste.paste"===i||"Autofill.fill"===i||"autofill.fill"===i)&&h.skipRowOnPaste){T+=1,u.row+=1,"CopyPaste.paste"===i&&(s+=1);continue}for(l=0,x=0;l<a&&!(r&&u.col>r.col&&g>c||!eO.allowInsertColumn&&u.col>I.countCols()-1)&&!(u.col>=eO.maxCols);l++){if(h=e5(u.row,u.col),("CopyPaste.paste"===i||"Autofill.fill"===i||"autofill.fill"===i)&&h.skipColumnOnPaste){x+=1,u.col+=1,"CopyPaste.paste"===i&&(a+=1);continue}if(h.readOnly&&"UndoRedo.undo"!==i){u.col+=1;continue}let e=l-x,t=M?l:e,r=!!h.valueSetter,o=N(n,t),s=I.getSourceDataAtCell(u.row,u.col)??null;if(null!==o&&"object"==typeof o)if(Array.isArray(o)&&null===s&&(s=[]),r||"object"==typeof s&&null!==s){if(null!==s){let e=tw(Array.isArray(s)?s:s[0]||s),t=tw(Array.isArray(o)?o:o[0]||o);r||"edit"===i||tE(e,t)||Array.isArray(e)&&Array.isArray(t)?o=tS(o):A=!1}}else A=!1,h.parsePastedValue&&"CopyPaste.paste"===i&&(A=!0),"edit"===i&&(A=!0,o=tS(o));else r||null===s||"object"!=typeof s||(A=!1);A&&d.push([u.row,u.col,o]),A=!0,u.col+=1}u.row+=1}I.setDataAtCell(d,null,null,i||"populateFromArray")}}},this.init=function(){ed.suppress(()=>(function(){if(el)return void(I.view?rn("Handsontable instance has already been initialized. Calling `init()` again is a no-op; use `updateSettings()` to reconfigure a live instance."):rn("Handsontable `init()` was already called but did not finish - the first call threw before the grid was built. Calling `init()` again is a no-op; create a new instance instead."));el=!0;let e=eO.theme,t=eO.themeName,r=mK(I.rootContainer);sC(I)&&!r&&(tx(e)||!e&&!t)&&e2(e,e1()),E.setData(eO.data),eq("beforeInit",ex.beforeInit),K=ex;try{I.runHooks("beforeInit")}finally{K=null}if(t7()&&rW(I.rootElement,"mobile"),I.updateSettings(ex,!0),I.view=new h7(I),x=n6.getInstance(I,eO,eP),M=function(e){let{selection:t}=e,r=!1,i=!1;return{resume(){i=!1},suspend(){i=!0},skipNextScrollCycle(){r=!0},scrollTo(n){let o;if(r||i){r=!1;return}t.isFocusSelectionChanged()?o=t=>{sW(e,t.toObject(),()=>{let t=e.getSelectedRangeActive();if(!t)return null;let{row:r,col:i}=t.highlight;return null!==r&&null!==i?e.getCell(r,i,!0):null})}:t.isSelectedByCorner()?o=()=>{}:t.isSelectedByRowHeader()?o=t=>{let r=sG(e).getComputedRowTarget(t);sW(e,{row:r},()=>{let t=!!e.getSettings().rowHeaders;return e.getCell(r,t?-1:0,!0)})}:t.isSelectedByColumnHeader()?o=t=>{let r=sG(e).getComputedColumnTarget(t);sW(e,{col:r},()=>{let t=!!e.getSettings().colHeaders;return e.getCell(t?-1:0,r,!0)})}:1===t.getSelectedRange().size()&&t.isMultiple()?o=t=>{let r=sG(e),i={row:r.getComputedRowTarget(t),col:r.getComputedColumnTarget(t)};sW(e,i,()=>{let{row:t,col:r}=i;return e.getCell(t,r,!0)})}:1!==t.getSelectedRange().size()||t.isMultiple()?t.getSelectedRange().size()>1&&(o=t=>{let r=sG(e),i={row:r.getComputedRowTarget(t),col:r.getComputedColumnTarget(t)};sW(e,i,()=>{let{row:t,col:r}=i;return e.getCell(t,r,!0)})}):o=t=>{let r=e.selection.getSelectionSource(),{row:i,col:n}=t;if("number"!=typeof i||"number"!=typeof n)return;let o=()=>e.getCell(i,n,!0);if(i<0&&n>=0)sW(e,{col:n},o);else if(n<0&&i>=0)sW(e,{row:i},o);else{let t={row:i,col:n};if("mouse"===r){var s,l,a,h,d,u,c,g;let r,o,p,m,f,w=function({row:e,col:t,lastPartiallyVisibleRow:r,lastPartiallyVisibleColumn:i,isRowLargerThanViewport:n,isColumnLargerThanViewport:o}){let s=t===i,l=e===r;if(!n&&!o&&(s||l))return null;let a={};return!(l&&!n)&&(a.row=e,n&&(a.verticalSnap="top")),!(s&&!o)&&(a.col=t,o&&(a.horizontalSnap="start")),a}({row:i,col:n,lastPartiallyVisibleRow:e.view.getLastPartiallyVisibleRow(),lastPartiallyVisibleColumn:e.view.getLastPartiallyVisibleColumn(),isRowLargerThanViewport:(s=e,l=i,r=s.view.countFixedRowsTop(),o=s.view.countFixedRowsBottom(),!(l<r||l>=s.countRows()-o)&&(a=sj(s,l),(h=s.view.getViewportHeight())>0&&(a??0)>h)),isColumnLargerThanViewport:(d=e,u=n,p=d.view.countFixedColumnsStart(),m=d.countCols(),f=d.view.countFixedColumnsEnd(),!(u<p)&&!(u>=m-f)&&(c=d.getColWidth(u),(g=d.view.getViewportWidth())>0&&(c??0)>g))});if(null===w)return;t=w}let p=void 0===t.row||void 0===t.col;sW(e,t,p?void 0:o)}},o?.(n)}}}(I),A.init(),sC(I)){var i,n;let e,t,r=[I.rootSlotTopElement,I.rootSlotBottomElement],o=()=>r.reduce((e,t)=>e+t.offsetHeight,0),s=o();e=(i=I.rootPortalElement).ownerDocument,mJ||(mJ=m2(e,"assertive"),m0=m2(e,"polite"),i.append(mJ,m0)),m1.push(i),function(e){let t=e.rootSlotBottomElement;if(!t)return;let r=ta({className:fu,key:e.getSettings().licenseKey,element:t,releaseDate:"17/11/2026"});r&&fy(e,r),e.addHookOnce("init",()=>{fm.add(e),fb(e)}),e.addHook("afterUpdateSettings",()=>fb(e),1e3)}(I),((t=fk(n=I)).lifecycle.isTrial||t.badge)&&function(e){let t=e.rootSlotBottomElement;if(!t)return;let{bar:r,link:i}=function(e){let{refs:t}=fe({tag:"div",ref:"bar",className:`handsontable ${fs}`,children:[{tag:"a",ref:"link",className:`${fs}__link`,attrs:{href:"https://handsontable.com",target:"_blank",rel:"noopener noreferrer"},children:[{tag:"span",className:`${fs}__logo`,attrs:{"aria-hidden":"true"}},{tag:"span",className:`${fs}__text`,text:"Powered by Handsontable DataGrid"}]}]},e);return t}(t.ownerDocument);r.classList.add(m5),t.appendChild(r),m8(m6.BOTTOM,t),e.getFocusScopeManager().registerScope(fl,r,{shortcutsContextName:fa,runOnlyIf:()=>r.isConnected,onActivate:e=>{("tab_from_above"===e||"tab_from_below"===e)&&i.focus()}})}(n),function(e,t){let{lifecycle:r,channels:i}=t,n=fo[r.state];n?function(e,t){let r=e.rootOverlaysElement;if(!r)return;let i=e.getFocusScopeManager(),n=e.getShortcutManager(),o=e.isRtl(),s=`${e.guid}-license-lock-title`,l=`${e.guid}-license-lock-description`,{refs:a}=fe({tag:"div",ref:"lock",className:`${fV} ${fV}--confirm handsontable ht-license-lock ${fV}--background-solid ${fV}--show`,attrs:{role:"alertdialog","aria-modal":"true","aria-labelledby":s,"aria-describedby":l,tabindex:"-1",dir:o?"rtl":"ltr",style:"display: block;"},children:[{tag:"div",className:`${fV}__content-wrapper`,children:[{tag:"div",ref:"inner",className:`${fV}__content-wrapper-inner`,attrs:{tabindex:"-1"},children:[{tag:"div",className:`${fV}__content`,children:[{tag:"h2",ref:"title",className:`${fV}__title`,attrs:{id:s}},{tag:"p",ref:"description",className:`${fV}__description`,attrs:{id:l}}]},{tag:"div",className:`${fV}__buttons`,children:[{tag:"a",ref:"contactButton",className:"ht-button ht-button--secondary",attrs:{rel:"noopener"}}]}]}]}]},e.rootDocument),h=a.lock;if(a.title.textContent=t.title,a.description.textContent=t.description,a.contactButton.textContent=t.action.text,a.contactButton.setAttribute("href",t.action.href),t.docsLink){let r=e.rootDocument.createElement("a");r.href=t.docsLink.href,r.target="_blank",r.rel="noopener",r.textContent=t.docsLink.text,a.description.appendChild(r),a.description.appendChild(e.rootDocument.createTextNode(t.docsLink.trailingText))}let d=()=>Array.from(h.querySelectorAll("a[href], button")),u=()=>{let{view:t}=e,r=t.isHorizontallyScrollableByWindow()?t.getTotalTableWidth():t.getWorkspaceWidth();h.style.width=`${r}px`};e.addHook("afterViewRender",u),(n.getContext(fU)??n.addContext(fU)).addShortcut({keys:[["Tab"],["Shift","Tab"]],callback:t=>{let r=d(),i=r.indexOf(e.rootDocument.activeElement),n=t.shiftKey?-1:1;r[(i+n+r.length)%r.length]?.focus()},group:fz}),i.registerScope(fz,h,{shortcutsContextName:fU,type:"modal",onActivate:e=>{let t=d();"tab_from_below"===e?t[t.length-1]?.focus():a.contactButton.focus()}}),r.appendChild(h),e.addHookOnce("afterInit",()=>{u(),e.deselectCell()})}(e,n(r)):i.ui&&function(e,t){var r;let i,n=fn[t.state],o=e.rootOverlaysElement;if(!n||!o)return;let s=`${e.guid}-license-popover`,{refs:l}=fe({tag:"div",ref:"wrapper",className:"ht-license-badge-wrapper",children:[{tag:"button",ref:"badge",className:"ht-license-badge",attrs:{type:"button","aria-label":"Handsontable license information"}},{tag:"div",ref:"popover",className:f_,attrs:{id:s,role:n.dismissible?"dialog":"tooltip","aria-labelledby":`${s}-title`},children:[{tag:"div",className:`${f_}__content`,children:[{tag:"div",ref:"popoverTitle",className:`${f_}__title`,attrs:{id:`${s}-title`}},{tag:"p",ref:"popoverBody",className:`${f_}__body`},{tag:"a",ref:"popoverLink",className:`${f_}__link`,attrs:{target:"_blank",rel:"noopener noreferrer"}}]},n.dismissible&&{tag:"button",ref:"closeButton",className:`${f_}__close`,attrs:{type:"button","aria-label":"Close"}}]}]},e.rootDocument),a=l.wrapper,h=l.badge,d=()=>e.hasRowHeaders()&&e.hasColHeaders(),u=()=>{if(e.isDestroyed)return;let t=d();a.classList.toggle(fF,!t),e.rootElement?.classList.toggle("ht-license-badge-on",t),fB(e)?.table.classList.toggle("ht-license-badge-corner",t)};u(),e.addHook("afterRender",()=>u());let c=0,g=()=>{let t=fB(e);if(!t||!d())return;let r=t.table.offsetWidth;r>0&&Math.abs(r-c)>1&&(c=r,a.style.setProperty("--ht-license-badge-area-width",`${r}px`))},p=e.rootWindow;if("function"==typeof p.ResizeObserver){let t=new p.ResizeObserver(()=>g()),r=null,i=()=>{let i=fB(e)?.table??null;i!==r&&(t.disconnect(),r=i,i&&t.observe(i))};i(),e.addHook("afterRender",()=>i()),e.addHook("afterDestroy",()=>t.disconnect())}else g(),e.addHook("afterRender",()=>g());h.tabIndex=-1;let m=l.popover;l.popoverTitle.textContent=n.title,l.popoverBody.textContent=n.body(t),l.popoverLink.href=n.linkHref,l.popoverLink.textContent=n.linkText,l.popoverLink.tabIndex=-1;let f=!1;m.addEventListener("mouseenter",()=>{f=!0}),m.addEventListener("mouseleave",()=>{f=!1}),r=()=>{f||a.classList.contains(fL)||a.classList.remove(fD)},(i=e.rootElement)&&(i.addEventListener("mouseover",t=>{let i=t.target instanceof e.rootWindow.Element?t.target:null,n=fB(e)?.thead??null,o=!a.classList.contains(fF)&&null!==i&&null!==n&&n.contains(i);a.classList.toggle(fL,o),r()}),i.addEventListener("mouseleave",()=>{a.classList.remove(fL),r()})),n.dismissible&&(m.classList.add(fP),l.closeButton.tabIndex=-1,l.closeButton.addEventListener("click",()=>{m.classList.remove(fP),a.classList.add(fD)})),o.appendChild(a)}(e,r)}(n,t),o()!==s&&wV(I,eO.height);let l={top:-1,bottom:-1};I.addHook("afterRender",()=>{if(!I||I.isDestroyed)return;let{view:e}=I;if(!e)return;let t=e.isHorizontallyScrollableByWindow(),r=t?e.getTotalTableWidth():e.getWorkspaceWidth();(0===r||t&&0>=I.countRenderedCols())&&I.rootWrapperElement&&(r=I.rootWrapperElement.offsetWidth);let i=I.rootWrapperElement?.clientWidth??0;t&&i>0&&(r=Math.min(r,i)),I.rootSlotBottomElement&&r!==l.bottom&&(l.bottom=r,I.rootSlotBottomElement.style.width=`${r}px`),I.rootSlotTopElement&&r!==l.top&&(l.top=r,I.rootSlotTopElement.style.width=`${r}px`)});let a=o(),h=()=>{let e=o();return e!==a&&(a=e,wV(I,eO.height),!0)};eR=h,ev=new I.rootWindow.ResizeObserver(()=>{I&&!I.isDestroyed&&I.view&&h()&&I.render()}),r.forEach(e=>ev?.observe(e))}W=!0;try{tk(eQ,!0)}finally{W=!1}eN.invalidateMetaExtensions(),I.runHooks("init");let o=eR;eR=null,o?.(),I.render(),null!==o&&I&&!I.isDestroyed&&o()&&I.render(),null===eE&&(eE=function(e,t){let r=e.fonts;if(!r||"function"!=typeof r.addEventListener)return()=>{};let i=!1,n=t,o=()=>{r.ready.then(()=>{if(null!==n){if("loading"===r.status)return void o();i=!1,n()}},()=>{i=!1})},s=()=>{i||(i=!0,o())};return r.addEventListener("loading",s),"loading"===r.status&&s(),()=>{n=null,r.removeEventListener("loading",s)}}(I.rootDocument,eZ)),F&&null===I.rootElement.offsetParent&&(eh=iz(I.rootElement,()=>{I&&!I.isDestroyed&&I.view&&I.render()})),"object"==typeof F&&(I.runHooks("afterChange",F[0],F[1]),F=!1),I.runHooks("afterInit"),eN.finishInitialization()})())},this._runInPluginLifecyclePass=function(e){return U=!0,eX(e)},this._createCellCoords=function(e,t){let r=I.view;return r?r._wt.createCellCoords(e,t):new l5(e,t,I.isRtl())},this._createCellRange=function(e,t,r){let i=I.view,n=[e,t,r];return i?i._wt.createCellRange(...n):new l4(...n,I.isRtl())},this.validateCell=function(e,t,r,i){let n=ec;ec=!1;let o=I.getCellValidator(t);function s(e,i=!0,n=t){if(!i||!0===t.hidden)return void r(e);let o=n.visualCol,l=n.visualRow,a=I.getCell(l,o,!0);if(a&&"TH"!==a.nodeName){let e=I.rowIndexMapper.getRenderableFromVisualIndex(l),t=I.columnIndexMapper.getRenderableFromVisualIndex(o);I.view._wt.getSetting("cellRenderer",e,t,a)}r(e)}if(eY(o)&&(o=sI(o)),i3(o)){let r,l=()=>i3(t.prop)?t.visualCol:t.prop,a=l(),h=eN.getStructureVersion(),d=ep,u=n?tc(t.visualRow):null,c=null===u?null:k.track(u),g=null===c?null:e8(t.prop),p=null===g?null:H.tracker.track(g);P.delete(t);let m=null===c?()=>{}:_.add(c,t,p??void 0);if(e=I.runHooks("beforeValidate",e,t.visualRow,a,i),!I)return;let f=ed.hold(),w=n&&d===ep,y=!w,b=!n,C=t.prop,S=()=>{if(!b&&(b=!0,null!==c)){let e,t,r;m(),e=eC.get(C),t=e?.get(c),r=t?.indexOf(d)??-1,e&&t&&-1!==r&&(t.splice(r,1),0===t.length&&e.delete(c),0===e.size&&eC.delete(C)),k.release(c),null!==p&&H.tracker.release(p)}y||(y=!0,d===ep&&(eu-=1))};null!==c&&(eC.has(C)||eC.set(C,new Map),(r=eC.get(C)).set(c,[...r.get(c)??[],d])),w&&(eu+=1),I._registerMicrotask(()=>{let r=ew,n=eb;ew=d,eb=t,ei+=1;try{f.resume(()=>o.call(t,e,r=>{if(!I){S(),f.release();return}ei+=1;try{f.resume(()=>{let n=tn(t,c);if(r=I.runHooks("afterValidate",r,e,n.visualRow,l(),i),!I||(n===t&&(t.valid=r,i1(t)),ti(n,r,h),S(),s(r,!0,n),!I))return;let o=em;em=d!==ep;try{I.runHooks("postAfterValidate",r,e,n.visualRow,l(),i)}finally{em=o}})}finally{S(),f.release(),tC()}}))}catch(e){throw S(),f.release(),e}finally{ew=r,eb=n,tC()}})}else I._registerMicrotask(()=>{t.valid=!0,i1(t),s(t.valid,!1)})},this.setDataAtCell=function(e,t,r,i){let n=ts(e,t,i,"edit");ed.run("change",n,()=>td.call(this,e,t,r,i))};let th=e=>!(I.view||I.countRows()>0)&&0!==I.countSourceRows()&&(rn(`\`${e}()\` writes nothing while Handsontable initializes and the grid has no rows yet, as inside \`afterHideColumns\`. Write in \`afterInit\`, or use \`setSourceDataAtCell()\`.`),!0);function td(e,t,r,i){let n,o,s;if(th("setDataAtCell"))return;let l=to(e,t,r),a=[],h=i||"object"!=typeof e?i:t,d=!1;for(n=0,o=l.length;n<o;n++){let[e,t,r]=l[n];if(null===t&&wX(h))continue;let i=function(e){"object"!=typeof e&&tf("Method `setDataAtCell` accepts row number or changes array of arrays as its first parameter");let t=e[1];return"number"!=typeof t&&tf("Method `setDataAtCell` accepts row and column number as its parameters. If you want to use object property name, use method `setDataAtRowProp`"),t}(l[n]);if(i>=this.countCols()?(d||=mZ(I.dataType,this.countCols(),i),s=i):s=n3(I,i),e7(e,h)){te(s,r,h);continue}a.push([e,s,E.getAtCell(this.toPhysicalRow(e),t),r])}if(l.length>0&&0===a.length)return void I.runHooks("afterSetDataAtCell",[],h);let u=eS(h,a),c=tl(a,h);d&&c.some(([,e])=>Number.isInteger(e)&&mZ(I.dataType,this.countCols(),e)&&null===R.propToCol(e))&&rh("Core.setDataAtCell.pastLastColumnOnObjectData","Writing past the last column of an object data source is deprecated and will be ignored in Handsontable 20.0.0. The value currently lands on a property named after the column index, which no column can display. Use `setDataAtRowProp()` to write a field the grid shows no column for."),!I||(I.runHooks("afterSetDataAtCell",c,h),I&&tu(c,h,u))}function tu(e,t,r){var i;let n,o,s,l,a,h,d,u,c,g,p,m,f,w,y,b=ed.hold(),C=(i=tc,n=new Map,o=new Map,s=new Set,l=new Map,a=new Map,h=new Map,d=null,u=!1,c=(e,t)=>{a.set(e,t),h.get(e)?.forEach(e=>Reflect.set(e,"visualRow",t))},g=(e,t)=>{e>=D.countVisualRows()-t||a.forEach((r,i)=>{e<=r&&c(i,r+t)})},p=(e,t)=>{a.forEach((r,i)=>{e<r&&c(i,r-Math.min(t,r-e))})},m=e=>{a.forEach((t,r)=>c(r,t-e))},f=()=>{d?.(),d=null},w=e=>{let t=o.get(e);return void 0!==t&&void 0!==H&&(null===t.physicalColumn||(Reflect.set(e,1,H.toProp(t.physicalColumn)),!1))},y={capture(e){if(u)return;u=!0;let t=new Map,r=D.countVisualRows();e.forEach(e=>{let l;l=H?.toTrackedPhysicalColumn(e[1])??null,void 0!==H&&null!==l&&(o.set(e,H.tracker.track(l)),er.set(e,y));let h=Number.isInteger(e[0])?i(e[0]):null;if(null===h){Number.isInteger(e[0])&&e[0]>=r&&a.set(e,e[0]);return}let d=t.get(h);void 0===d&&(d=w0(k,D,h),t.set(h,d),s.add(d)),n.set(e,d),er.set(e,y)}),a.size>0&&(d=L({rowsInserted:g,rowsRemoved:p,trimmedRowsChanged:m}))},noteMeta(e,t,r){let i=n.get(e);void 0!==i&&null===i.meta&&(i.meta=t,i.metaColumn=r)},notePastEndMeta(e,t){let r=a.get(e);void 0!==r&&(h.set(e,[...h.get(e)??[],t]),Reflect.set(t,"visualRow",r))},getPastEndRow:e=>a.get(e),getRecord:e=>n.get(e)?.record,resolve(e){let t=n.get(e);return void 0===t?void 0:w3(D,t)},hasRecords:()=>n.size>0,settle(e,t){if(f(),a.forEach((e,t)=>w6(t,e)),0===n.size&&0===o.size)return[];let r=new Map,i=[],s=w1(D);for(let o=e.length-1;o>=0;o--){let a,h=e[o],d=n.get(h);void 0!==d&&(r.has(d)||r.set(d,w3(D,d,s)),a=r.get(d)),null===a||w(h)?(e.splice(o,1),i.unshift(h)):void 0!==a&&(l.set(h,a),w6(h,t(a)))}return i},getSettledPhysicalRow:e=>l.get(e),getProp(e){let t=o.get(e);return void 0===t||void 0===H?e[1]:null===t.physicalColumn?void 0:H.toProp(t.physicalColumn)},getColumn:e=>o.get(e),getPhysicalRow(e){let t=l.get(e);if(void 0!==t)return t;let r=n.get(e);return void 0===r?void 0:w3(D,r)},forEachAnchor(e){s.forEach(e)},release(){s.forEach(e=>k.release(e.record)),o.forEach((e,t)=>{H?.tracker.release(e),er.get(t)===y&&er.delete(t)}),n.forEach((e,t)=>{er.get(t)===y&&er.delete(t)}),o.clear(),s.clear(),n.clear(),l.clear(),f(),a.clear(),h.clear()}});r===ep&&ee.set(e,{source:t,records:C});try{!function(e,t,r,i,n){if(!e.length)return n([],[]);let o=I.getActiveEditor(),s=e3(),l=[],a=[],h=wX(t)?null:O(),d=!0,u=([t,r,,n])=>{e9(e,i,r,null===t?null:I.toPhysicalRow(t),t,n)},c=(e,t)=>{wX(t)&&e?.forEach(u)};I.addHook("afterChange",c),s.onQueueEmpty=()=>{I.removeHook("afterChange",c);let t=[];try{r===ep&&(t=i.settle(e,e=>I.toVisualRow(e))),h?.claim(e,e4),o&&d&&r===ep&&o._closeAfterDataChange&&e6(e,o)&&o.cancelChanges(),n(a,t),h?.settle(e)}finally{h?.release(),function(e){if(0===e.length||!I)return;let t=I.countSourceRows();e.forEach(e=>{e.row>=t&&delete e.valid})}(l)}};try{!function(e,t,r,i,n,o,s,l){let a=I.countRows();for(let u=e.length-1;u>=0&&r===ep;u--){let r,[c,g,,p]=e[u],m=R.propToCol(g)??g;if(Number.isInteger(m)?(r=e5(c,m),I.getCellValidator(r)&&(r=e5(c,m,!0))):r={...Object.getPrototypeOf(eO),...eO},I.getCellValidator(r)){var h,d;i.addValidatorToQueue(),s.capture(e),c>=a?(n.push(r),s.notePastEndMeta(e[u],r)):Number.isInteger(r.col)&&s.noteMeta(e[u],r,r.col);let f=eN.getStructureVersion(),w=s.getRecord(e[u]),y=s.getColumn(e[u]);o?.register(e[u],(h=void 0===w?`v${c}`:`r${w.id}`,d=void 0===y?g:`t${y.id}`,"string"==typeof d||"number"==typeof d?`${h}:p${d}`:"function"==typeof d?(!wQ.has(d)&&(wZ+=1,wQ.set(d,wZ)),`${h}:f${wQ.get(d)}`):`${h}:c${"function"==typeof m?"":m}`),r,f),ec=!0;try{I.validateCell(p,r,function(t,r,n){return function(s){if("boolean"!=typeof s&&tf("Validation error: result is not boolean"),!1===s&&!1===r.allowInvalid){l(n);let i=e.lastIndexOf(n,t);-1!==i&&e.splice(i,1),P.has(r)||(r.valid=!0),ti(tn(r,P.get(r)??null),!0,f)}o?.answered(n,s),i.removeValidatorFormQueue()}}(u,r,e[u]),t)}finally{ec=!1}if(!I)return}}}(e,t,r,s,l,h,i,e=>{d=!1,a.push(e)})}catch(e){throw s.onQueueEmpty=()=>{},I.removeHook("afterChange",c),h?.release(),e}s.checkIfQueueIsEmpty()}(e,t,r,C,(i,n)=>{ee.delete(e);try{if(r===ep){let r=C.hasRecords()?e=>C.getSettledPhysicalRow(e):void 0;b.resume(()=>(function(e,t,r){tr(()=>(function(e,t){let r={op:null};for(let i=e.length-1;i>=0;i--){let n=!1;if(null===e[i]){e.splice(i,1);continue}if((null===e[i][2]||void 0===e[i][2])&&(null===e[i][3]||void 0===e[i][3]))continue;let o=void 0===t?void 0:t(e[i]);if(eO.allowInsertRow&&void 0===o)for(;e[i][0]>I.countRows()-1;){let t=e[i][0]-(I.countRows()-1),{delta:r}=R.createRow(void 0,t,{source:"auto"});if(0===r){n=!0;break}}if("array"===I.dataType&&(!eO.columns||0===eO.columns.length)&&eO.allowInsertColumn){let t=()=>Number(R.propToCol(e[i][1])??e[i][1]);for(;t()>I.countCols()-1;){let e=t()-(I.countCols()-1),{delta:r}=R.createCol(void 0,e,{source:"auto"});if(0===r){n=!0;break}}}n||function(e,t,r,i,n){let o=null;if(null!==ed.getRecordingTransaction()&&(o=n??I.toPhysicalRow(e)),null===o||!Number.isInteger(o))return tt(e,t,r,n);let s=pW(E.getRawAtCellByProp(o,t));tt(e,t,r,n),p$(ed,{physicalRow:o,prop:t,oldValue:s,newValue:pW(E.getRawAtCellByProp(o,t))},i)}(e[i][0],e[i][1],e[i][3],r,o)}})(e,r),!1);let i=e.length>0,n=x?.getActiveEditor(),o=n?._closeAfterDataChange,s=e6(e,n);if(i){if(T.adjustRowsAndCols(),I.runHooks("beforeChangeRender",e,t),!I||(n?.isOpened()&&o&&s&&x.closeEditor(),I.render(),!I)||((n?.isOpened()&&o&&s||!n?.isOpened())&&x?.prepareEditor(),I.runHooks("afterChange",e,t||"edit"),!I))return;n&&void 0!==n.refreshValue&&(!n.isOpened()||s)&&n.refreshValue()}else I.render()})(e,t,r)),n.length>0&&I&&Z.slice().forEach(e=>e(n,t,[]))}else Z.slice().forEach(r=>r(e,t,i))}finally{C.release(),b.release()}})}catch(t){throw ee.delete(e),C.release(),b.release(),t}}function tc(e){return e>=0&&e<I.countRows()?I.toPhysicalRow(e):null}function tg(e,t,r,i){let n,o;if(th("setDataAtRowProp"))return;let s=to(e,t,r),l=[],a=i||"object"!=typeof e?i:t;for(n=0,o=s.length;n<o;n++){let[e,t,r]=s[n];if(!(null===t&&wX(a))||R.colToPropCache.includes(null)){if(e7(e,a)){te(t,r,a);continue}l.push([e,t,E.getAtCellByProp(this.toPhysicalRow(e),t),r])}}if(s.length>0&&0===l.length)return void I.runHooks("afterSetDataAtRowProp",[],a);let h=eS(a,l),d=tl(l,a);!I||(I.runHooks("afterSetDataAtRowProp",d,a),I&&tu(d,a,h))}this.setDataAtRowProp=function(e,t,r,i){let n=ts(e,t,i,"edit");ed.run("change",n,()=>tg.call(this,e,t,r,i))},this.listen=function(){I&&!I.isListening()&&w8.has(I.guid)&&(w8.forEach(e=>{I!==e&&e.unlisten()}),w5=I.guid,I.runHooks("afterListen"))},this.unlisten=function(){this.isListening()&&(w5=null,I.runHooks("afterUnlisten"))},this.isListening=function(){return w5===I.guid},this.destroyEditor=function(e=!1,t=!0){x.closeEditor(e),!I||(I.view.render(),I&&t&&eP.isSelected()&&x.prepareEditor())},this.populateFromArray=function(e,t,r,i,n,o,s){("object"!=typeof r||"object"!=typeof r[0])&&tf("populateFromArray parameter `input` must be an array of arrays");let l="number"==typeof i?I._createCellCoords(i,n):void 0;return ed.run("change",o??"populateFromArray",()=>T.populateFromArray(I._createCellCoords(e,t),r,l,o,s))},this.spliceCol=function(e,t,r,...i){return rh("Core.spliceCol","The `spliceCol()` method is deprecated and will be removed in Handsontable 20.0.0. Change the data yourself and write it back with `populateFromArray()`, or use `alter()` with `insert_col`/`remove_col`."),R.spliceCol(e,t,r,...i)},this.spliceRow=function(e,t,r,...i){return rh("Core.spliceRow","The `spliceRow()` method is deprecated and will be removed in Handsontable 20.0.0. Change the data yourself and write it back with `populateFromArray()`, or use `alter()` with `insert_row`/`remove_row`."),R.spliceRow(e,t,r,...i)},this.getSelected=function(){if(eP.isSelected())return en(eP.getSelectedRange().ranges,({from:e,to:t})=>[e.row,e.col,t.row,t.col])},this.getSelectedLast=function(){let e,t=I.getSelected();return t&&t.length>0&&(e=t[t.length-1]),e},this.getSelectedActive=function(){let e=I.getSelectedRangeActive();if(!e)return;let{from:t,to:r}=e;return[t.row,t.col,r.row,r.col]},this.getSelectedRange=function(){if(eP.isSelected())return Array.from(eP.getSelectedRange())},this.getSelectedRangeLast=function(){let e,t=I.getSelectedRange();return t&&t.length>0&&(e=t[t.length-1]),e},this.getSelectedRangeActive=function(){return eP.getActiveSelectedRange()},this.getActiveSelectionLayerIndex=function(){return eP.getActiveSelectionLayerIndex()};let tp=(e,t,r,i,n)=>{let o=Math.max(t,0),s=Math.min(r,I.countRows()-1),l=Math.max(i,0),a=Math.min(n,I.countCols()-1);o>s||l>a||oD(o,s,t=>{oD(l,a,r=>{I.getCellMetaTransient(t,r).readOnly||e.push([t,r,null])})})};this.emptySelectedCells=function(e){if(!eP.isSelected()||0===this.countRows()||0===this.countCols())return;let t=[];eo(eP.getSelectedRange(),e=>{if(e.isSingleHeader())return;let r=e.getTopStartCorner(),i=e.getBottomEndCorner();tp(t,r.row,i.row,r.col,i.col)}),t.length>0&&this.setDataAtCell(t,e)},this.isRenderSuspended=function(){return this.renderSuspendedCounter>0},this.suspendRender=function(){this.renderSuspendedCounter+=1},this.resumeRender=function(){let e=this.renderSuspendedCounter-1;this.renderSuspendedCounter=Math.max(e,0),this.isRenderSuspended()||e!==this.renderSuspendedCounter||I.view.render()},this.render=function(){this.view&&(this.forceFullRender=!0,this.isRenderSuspended()||I.view.render())},this.markCellChanged=function(e,t){let r=I.toPhysicalRow(e),i=I.toPhysicalColumn(t);if(null===r||null===i)return;let n=eN.getCellMetaIfExists(r,i);n&&i1(n)},this.markAllCellsChanged=function(){I.renderChangeTracker.markAllChanged()},this.batchRender=function(e){I.suspendRender();try{return e()}finally{I.resumeRender()}},this.isExecutionSuspended=function(){return this.executionSuspendedCounter>0},this.suspendExecution=function(){let e=0===this.executionSuspendedCounter&&!j&&!Y;if(e){Y=!0;try{this.runHooks("beforeSuspendExecution")}finally{Y=!1}}if(this.executionSuspendedCounter+=1,this.columnIndexMapper.suspendOperations(),this.rowIndexMapper.suspendOperations(),e)try{this.runHooks("afterSuspendExecution")}catch(e){try{this.resumeExecution()}catch{}throw e}},this.resumeExecution=function(e=!1){let t=this.executionSuspendedCounter-1,r=0===t&&!j&&!Y;try{if(r){Y=!0;try{this.runHooks("beforeResumeExecution")}finally{Y=!1}}}finally{this.executionSuspendedCounter=Math.max(this.executionSuspendedCounter-1,0);try{if(!this.isExecutionSuspended()&&t>=0||e)try{this.columnIndexMapper.resumeOperations()}finally{this.rowIndexMapper.resumeOperations()}}finally{r&&!this.isExecutionSuspended()&&this.runHooks("afterResumeExecution")}}},this.batchExecution=function(e,t=!1){return ed.run("batch",void 0,()=>{I.suspendExecution();let r=!1;try{let t=e();return r=!0,t}finally{I.resumeExecution(r&&t)}})},this.batch=function(e){return ed.run("batch",void 0,()=>{I.suspendRender();try{I.suspendExecution();try{return e()}finally{I.resumeExecution()}}finally{I.resumeRender()}})},this.runOperation=function(e,t,r){return ed.run(e,r,t)},this._getOperationScope=function(){return ed},this._hasPendingValidation=function(){return eu>0};let tm=(e,t,r)=>{let{type:i,valueGetter:n}=r??I.getCellMetaTransient(e,t),o=tx(i)?i:null;"string"==typeof i&&su(i)&&(o=sp(i));let s="function"==typeof n&&tx(o)&&o.valueGetter===n;return R.get(e,n3(I,t),{skipValueGetter:s})};function ty(e){let t=!1;eP.suspendGridTrackingFits();try{e(),t=!0}finally{eP.resumeGridTrackingFits(t)}}function tb(e,t){eu=0,ep+=1,ee.forEach(({records:e})=>e.release()),ee.clear();let r=x?.getActiveEditor()?._endValidationWait()??null;ty(()=>pZ(e,e=>{R=e},()=>{I.renderChangeTracker.markAllChanged(),eN.clearCellsCache(),I.initIndexMappers(),T.adjustRowsAndCols(),eP.markSource("loadData");try{eP.refresh()}finally{eP.markEndSource()}F&&(F=[null,"loadData"])},{hotInstance:I,dataMap:R,dataSource:E,internalSource:"loadData",source:t,metaManager:eN,firstRun:F,beforeRender:()=>eQ(1)})),r?.()}function tC(){if(!((ei-=1)>0))for(;es.length>0;){let e=es.shift();I&&e()}}function tv(e=!1,t=!1){let r=I.getInitialColumnCount(),i=e?Math.min(r,I.columnIndexMapper.getNumberOfIndexes()):r,n=R.colToPropCache.slice();if(t&&"array"===I.dataType)for(let e=0;e<i;e+=1)void 0===n[e]&&(n[e]=e);return{count:i,props:n}}function tR(e,t=!1){if(null===e)return!1;let r=tv(!1,t);return!(t?r.count>=e.count&&p4(e,r,Math.max(e.count,e.props.length),!0)||r.count<=e.count&&p4(e,r,r.count,!0):e.count===r.count&&e.props.length===r.props.length&&p4(e,r,e.props.length))}function tT(e){e.forEach(({physicalRow:e,physicalColumn:t,key:r,value:i})=>{eN.setCellMeta(e,t,r,i)})}function tA(e){eN.startCellOptionMetaRecording();try{e()}finally{eN.endCellOptionMetaRecording()}}function tM(e){let t=e?[]:eN.getCellOptionCellMetas(),r=eN.getUserDefinedCellMetas(),i=eN.getInvalidCellMetas();eN.clearCache(),t.length>0&&tA(()=>tT(t)),tT(r),eN.restoreInvalidCellMetas(i)}function tN(e){let t=eO.columns;if(t)for(let r=0;r<e;r++){let e=i3(t)?t(r):t[r];e&&eN.updateColumnMeta(r,e)}}function tO(e){return void 0!==e.data&&void 0!==e.columns&&!i3(e.columns)&&!i3(eO.columns)}function tk(e,t){let r=I,i=r.renderSuspendedCounter;r.renderSuspendedCounter=i+1;try{e()}finally{r.renderSuspendedCounter=Math.max(r.renderSuspendedCounter-1,t?i:0)}}function tD(e,t,r=!1,i=null,n=null,o=e){var s,l,a;let h,d,u,c,g,p,m,f,w,y=(F?I.loadData:I.updateData).bind(I);e$(e.rows)&&tf('The "rows" setting is no longer supported. Do you mean startRows, minRows or maxRows?'),e$(e.cols)&&tf('The "cols" setting is no longer supported. Do you mean startCols, minCols or maxCols?'),e$(e.ganttChart)&&tf('Since 8.0.0 the "ganttChart" setting is no longer supported.'),d=Array.isArray(e.columns)?e.columns:[],u=Array.isArray(e.cell)?e.cell:[],c=[e,...d,...u],w7.forEach(({name:e,version:t,migrationUrl:r})=>{c.some(t=>tx(t)&&e$(t[e]))&&ra(`Core.removedOption.${e}`,`The "${e}" setting was removed in Handsontable ${t} and is ignored. See ${r} for the migration path.`)}),tU=null;let{previousMinimumSizes:b,previousColumnLayout:C,previousRootSize:S,previousDataSource:v}={previousMinimumSizes:{minRows:eO.minRows,minSpareRows:eO.minSpareRows,minCols:eO.minCols,minSpareCols:eO.minSpareCols},previousColumnLayout:!F&&(!eO.columns&&tP(e,"dataSchema")&&!i3(e.columns)||tO(e))?tv(!0,tO(e)):null,previousRootSize:{height:t?void 0:eO.height,width:t?void 0:eO.width},previousDataSource:{dataProvider:eO.dataProvider,isExternal:!t&&tz}},E=function(e,t){let r;for(r in t||eN.assertNoInitOnlyUpdates(e),e)"data"===r||"language"===r||("className"===r?eK("className",e.className):"tableClassName"===r&&I.table?(eK("tableClassName",e.tableClassName),I.view._wt.wtOverlays.syncOverlayTableClassNames()):nM.getSingleton().isRegistered(r)||nM.getSingleton().isDeprecated(r)?eq(r,e[r]):!t&&tP(e,r)&&function(e,t){let r="editor"===t&&!0===e[t],i="cell"===t&&!Array.isArray(e[t]);if(r||i)return;let n=ek[t];ek[t]=e[t],ye.has(t)&&e[t]!==n&&(Reflect.deleteProperty(eO,t),("fixedColumnsStart"===t||"fixedColumnsLeft"===t)&&Reflect.deleteProperty(eO,"_fixedColumnsStart"))}(e,r));return!t&&eN.updateGlobalTypeFromSettings(e)}(e,t);!function(e,t){let r=mK(I.rootContainer),i=tP(e,"themeName"),n=tP(e,"theme");if(i&&n&&rn("Both `theme` and `themeName` are defined in your configuration. These options are aliases and cannot be used together. The `themeName` option will be ignored."),t){let t;n&&"string"==typeof e.theme?t=e.theme:i&&"string"==typeof e.themeName&&e.themeName&&!n?(t=e.themeName,eO.theme=e.themeName,eO.themeName=void 0):r?t=r:I.themeManager&&(t=I.themeManager.getClassName()),I.useTheme(t??null)}else{let t=I.getCurrentThemeName();n&&"string"==typeof e.theme&&t!==e.theme?(I.themeManager?.destroy(),I.useTheme(e.theme)):i&&!n&&t!==e.themeName?(I.themeManager?.destroy(),eO.theme=e.themeName,eO.themeName=void 0,I.useTheme(e.themeName)):sC(I)&&!r&&tx(e.theme)&&function(e){if(null===I.themeManager)e2(e,e1()),I.useTheme(I.themeManager.getClassName());else{let t;t="function"!=typeof e.getThemeConfig?wv(e):e,I.themeManager.update(t),I.useTheme(I.themeManager.getClassName())}}(e.theme)}}(e,t);let x=(!!tP(g=e0(e),"colorScheme")||!!tP(g,"density"))&&(I.themeManager?!!I.themeManager.setOverrides(g)&&!t&&(I.stylesHandler.clearCache(),!0):(wn(g.colorScheme)&&wn(g.density)||ea||(ea=!0,rn("The `colorScheme` and `density` options require the theme engine, so they have no effect when the theme is enabled by a CSS class name. Pass a theme config object or a `ThemeBuilder` instance to the `theme` option, or remove the `ht-theme-*` class from the container element to use the default theme.")),!1)),A=Array.isArray(e.cell);void 0===e.cell||null===e.cell||A||rs(I.rootElement,"Core.invalidCellOption",'The "cell" option must be an array of objects. The passed value was ignored, and the previously declared entries were kept. Wrap a single entry in an array: cell: [{ row: 0, col: 0, ... }].');let M=(null!==(p=void 0!==e.columns&&Array.isArray(eO.columns)?eO.columns:null)&&(tM(A),tN(p.length)),(m=r&&null===p&&void 0!==e.columns)&&tM(A),{earlyColumnsSetting:p,resetsColumnMetaBeforeLoad:m});r||(s=()=>(function(e,t,r,i,n){if(!0===I.runHooks("hasExternalDataSource"))e.data&&rn('The "data" setting is ignored when "hasExternalDataSource" returns `true`.'),t||tP(e,"dataProvider")&&(!i.isExternal||e.dataProvider!==i.dataProvider||void 0!==e.columns)?n([],"updateSettings"):void 0!==e.columns&&(R.createMap(),I.initIndexMappers());else if(void 0===e.data&&void 0===eO.data)n(null,"updateSettings");else if(void 0!==e.data){let t;$=null===r?null:{previousLayout:r,columnsPath:void 0!==e.columns};try{n(e.data,"updateSettings")}finally{$=null}t=G,G=null,t?.sorting?.clearSort(),t?.filters&&(t.filters.clearConditions(),t.filters.filter())}else void 0!==e.columns?(R.createMap(),I.initIndexMappers()):null!==r&&!eO.columns&&(R.createMap(),tR(r)&&I.initIndexMappers())})(e,t,C,v,y),f=["data","columns","dataSchema","dataProvider"].some(t=>tP(e,t)),F||!f?s():(tk(s,!1),eN.invalidateMetaExtensions())),!F&&e.language&&(gP(h=dD(a=e.language))?(gV(h),I.runHooks("beforeLanguageChange",h),ek.language=h,I.runHooks("afterLanguageChange",h)):dL(a));let N=()=>(function(e,t,r,i,n,o){var s;let l,a,h,d,u,{earlyColumnsSetting:c,resetsColumnMetaBeforeLoad:g}=t,p=I.countCols();null===c&&!g&&(void 0!==e.cell||void 0!==e.cells||void 0!==e.columns||o)&&tM(r),p>0&&null===c&&tN(p),(null!==n&&(l=I.rowIndexMapper.getNumberOfIndexes(),a=I.columnIndexMapper.getNumberOfIndexes(),h=I.countSourceRows(),d=I.countSourceCols(),u=e=>e.physicalRow<l&&e.physicalColumn<a&&!(({physicalRow:e,physicalColumn:t})=>e<h&&R.isTrailingFillerRow(e)||t<d&&R.isTrailingFillerColumn(t))(e),tT(n.userDefined.filter(u)),eN.restoreInvalidCellMetas(n.invalid.filter(u))),null!==i)?tA(()=>tT(i)):r&&(s=e.cell,tA(()=>{s.forEach(e=>{let{row:t,col:r,...i}=e;I.setCellMetaObject(t,r,i)})})),I.runHooks("afterCellMetaReset")})(e,M,A,i,n,E);r||N(),F&&!r&&pX(I,"init");let O=((w=wB(I,e,t)).ignoredAxes.forEach(e=>{ek[e]=S[e]}),w);if(!t&&(I.view&&(I.view._wt.wtViewport.resetHasOversizedColumnHeadersMarked(),I.view._wt.exportSettingsAsClassNames(),I.view.invalidateIndexSizesCache(),I.view.syncRowHeightMode()),eP.updateHighlightClassNames(),I.renderChangeTracker.markAllChanged(),I.runHooks("afterUpdateSettings",o),!I||I.isDestroyed))return null;return r||(t||T.removeSurplusRowsAndCols(b),T.adjustRowsAndCols(),eQ(1),I.view&&!F&&I.render()),l=O.scrollOwnerChanged,x&&I.themeManager&&I.runHooks("afterSetTheme",I.themeManager.getClassName(),!1),!t&&I.view&&l&&I.view._wt.wtOverlays.updateMainScrollableElements(),sC(I)&&tZ?.applyConfig(eO.layout),(t||tP(e,"dataProvider"))&&(tz=!0===I.runHooks("hasExternalDataSource")),r?N:null}function tL(){return Math.max(I.countRows(),eO.data.length)-1}function tF(e,t,r,i){var n;let o,s,l=to(e,t,r),a=I.hasHook("afterSetSourceDataAtCell"),h=[],d=(e,t)=>{let r=I.toVisualRow(e);if("string"==typeof t){let i=R.propToCol(t);if(Number.isInteger(i))return eN.getCellMetaUncached(e,I.toPhysicalColumn(i),{visualRow:r??e,visualColumn:i})}let i="function"==typeof t?R.propToCol(t):I.toVisualColumn(t);return Number.isInteger(i)?I.getCellMetaTransient(r,i):{...Object.getPrototypeOf(eO),...eO}},u="UndoRedo.undo"===(n=ts(e,t,i))||"UndoRedo.redo"===n;eo(l,([e,t,r])=>{let n=u?r:n$(r,d(e,t),i);a&&h.push([e,t,E.getAtCellByProp(e,t),n]),(u||function(e,t,r){let i=t.sourceDataValidator;if(!i3(i)||!0===i(e,t,r))return!0;let{row:n,col:o,sourceDataWarningMessage:s,allowInvalid:l}=t;return s&&pQ(s,[{row:n,col:o,value:e}]),!0===l}(n,d(e,t),i??"setSourceDataAtCell"))&&function(e,t,r,i=!1){let n=Number(e);if(null===ed.getRecordingTransaction()||!Number.isInteger(n)||n<0)return E.setAtCell(e,t,r,i);let o=E.getRawAtCellByProp(n,t),s=pW(o);E.setAtCell(e,t,r,i);let l=E.getRawAtCellByProp(n,t);l!==o&&p$(ed,{physicalRow:n,prop:t,oldValue:s,newValue:pW(l)})}(e,t,n,u)}),a&&this.runHooks("afterSetSourceDataAtCell",h,i),this.render();let c=I.getActiveEditor();c&&e$(c.refreshValue)&&(!c.isOpened()||(o=I.toPhysicalRow(c.row),s=c.prop,l.some(([e,t])=>e===o&&t===s)))?c.refreshValue():c?.isOpened()&&c.refreshDimensions?.()}function tB(e,t){return[e<I.countRows()?I.toPhysicalRow(e):e,t<I.countCols()?I.toPhysicalColumn(t):t]}function tV(e,t,r,i){if(!(null!==ed.getRecordingTransaction()&&!pU.has(r)&&eN.isUserDefinedMetaRecording()&&Number.isInteger(e)&&Number.isInteger(t)))return void i();let n="editor"===r?[ps,r]:[r],o=n.map(r=>eN.getCellMetaKeyState(e,t,r));i(),n.forEach((r,i)=>{let n=eN.getCellMetaKeyState(e,t,r),s=o[i];(s.hadOwn!==n.hadOwn||s.value!==n.value||s.origin!==n.origin)&&ed.record({type:"meta",physicalRow:e,physicalColumn:t,key:r,before:s,after:n})})}this._getValueToValidate=function(e,t){return tm(e,t)},this._isAnsweringStaleValidation=function(){return em},this.refreshDimensions=function(){if(!I.view)return;let e=I.view,{width:t,height:r}=e.getLastSize(),{width:i,height:n}=I.rootElement.getBoundingClientRect(),o=i!==t||n!==r;!1!==I.runHooks("beforeRefreshDimensions",{width:t,height:r},{width:i,height:n},o)&&(o||e._wt.wtOverlays.scrollableElement===I.rootWindow?(e.setLastSize(i,n),I.render()):e.renderWhenWindowResizeMovedFixed(),I.runHooks("afterRefreshDimensions",{width:t,height:r},{width:i,height:n},o))},this.updateData=function(e,t){eX(()=>ed.suppress(()=>{var r,i;return r=e,i=t,void ty(()=>pZ(r,e=>{R=e},e=>{R=e,I.renderChangeTracker.markAllChanged(),x?.suspendStrandDiscards();try{let e,t,r=$;r&&tR(r.previousLayout,r.columnsPath)?r.columnsPath?(e=[I.getPlugin("columnSorting"),I.getPlugin("multiColumnSorting")],t=I.getPlugin("filters"),G={sorting:e.find(e=>e?.isSorted()===!0)??null,filters:t?.enabled===!0&&t.exportConditions().length>0?t:null},I.columnIndexMapper.initToLength(I.getInitialColumnCount()),I.rowIndexMapper.fitToLength(I.countSourceRows())):I.initIndexMappers():(I.columnIndexMapper.fitToLength(I.getInitialColumnCount()),I.rowIndexMapper.fitToLength(I.countSourceRows())),function(){let e,t,r,i,n;if(0===ee.size)return;let o=Array.from(ee.values(),({records:e})=>e),s=(e=w1(D),t=new Map,r=new Map,o.forEach(i=>i.forEachAnchor(i=>{let{record:n}=i,o=w3(D,i,e);r.set(n,[...r.get(n)??[],i]),t.set(n,t.has(n)&&t.get(n)!==o?null:o)})),i=new Map,t.forEach((e,t)=>{null!==e&&i.set(t,e)}),(n=k.relocate(i)).forEach(e=>{r.get(e).forEach(t=>{null!==t.meta&&(t.meta=D.getStoredMeta(e.physicalRow,t.metaColumn)??null)})}),n);0!==s.size&&_.followRelocated(s,(e,t)=>!Number.isInteger(e.col)||eN.getCellMetaIfExists(t,e.col)===e).forEach(({record:e,meta:t})=>P.set(t,e))}(),T.adjustRowsAndCols(),eP.markSource("updateData");try{eP.refresh()}finally{eP.markEndSource()}}finally{x?.resumeStrandDiscards()}},{hotInstance:I,dataMap:R,dataSource:E,internalSource:"updateData",source:i,metaManager:eN,firstRun:F,beforeRender:()=>eQ(1)}))}))},this.loadData=function(e,t){eX(()=>ed.suppress(()=>tb(e,t)))},this.getInitialColumnCount=function(){let e=eO.columns,t=0;if(Array.isArray(e))t=e.length;else if(i3(e))if("array"===I.dataType){let r=I.countSourceCols();for(let i=0;i<r;i+=1)e(i)&&(t+=1)}else("object"===I.dataType||"function"===I.dataType)&&(t=R.colToPropCache.length);else if(e$(eO.dataSchema)){let e=R.getSchema();t=Array.isArray(e)?e.length:tH(e)}else t=I.countSourceCols();return t},this.initIndexMappers=function(){this.columnIndexMapper.initToLength(this.getInitialColumnCount()),this.rowIndexMapper.initToLength(this.countSourceRows())},this.getData=function(e,t,r,i){return eG(e)?R.getAll():R.getRange(I._createCellCoords(e,t),I._createCellCoords(r,i),pY.DESTINATION_RENDERER)},this.getCopyableText=function(e,t,r,i){return R.getCopyableText(I._createCellCoords(e,t),I._createCellCoords(r,i))},this.getCopyableData=function(e,t){return eW(R.getCopyable(e,n3(I,t)))},this._getCopyableData=function(e,t){return R.getCopyable(e,n3(I,t))},this.getCopyableSourceData=function(e,t){return E.getCopyable(e,n3(I,t))},this.getSchema=function(){return R.getSchema()},this.updateSettings=function(e,t=!1){let r=pI(e,I.isRtl()),i=t?r:X(r);if(i!==r&&0===Object.keys(i).length)return;let n=pO(i,e);eX(()=>ed.suppress(()=>{if("configure"!==B||t){let e=B;"meta"===e&&(B="data");try{tD(i,t,!1,null,null,n)}catch(e){throw function(e,t){if(!t&&!F&&void 0!==e.data&&I.view&&!I.isDestroyed)try{I.render()}catch{}}(i,t),e}finally{B=e}return}tP(i,"data")&&rn('The "data" setting passed to updateSettings() while another settings and data change is being applied is ignored: the data that change loads replaces it. Call loadData() once it has finished.');let e=tD(i,t,!0,null,null,n);e&&V.push(e)}))},this._applySettingsAndData=function(e,t,r,i=null,n=null){let o=pI(e,I.isRtl()),s=!!I.view;s&&I.suspendRender();try{eX(()=>ed.suppress(()=>{let s=B,l=V,a=null!==s;B="configure",V=[];try{try{let s=X(o),l=tD(s,!1,!0,i,n,pO(s,e));if(!I||I.isDestroyed)return;let a=V;B="data",tb(t,r),B="meta",l?.(),a.forEach(e=>e()),I.view&&pX(I,"loadData")}finally{B=s,V=l}I.view&&!a&&eH.getItems().forEach(([,e])=>{e.enabled&&"function"==typeof e.onDataReady&&e.onDataReady()}),eQ(1)}catch(e){throw a||eH.getItems().forEach(([,e])=>{e.dropDeferredDataWork()}),e}}))}finally{s&&I&&!I.isDestroyed&&I.resumeRender()}},this._isDataWorkDeferred=function(){return null!==B},this._replaceInitPassSettings=function(e){if(null===K)return null;let t=K,r=X(e),i={};return Object.keys(r).forEach(e=>{i[e]=t[e],t[e]=r[e]}),i},this._addSettingsFilter=function(e){q.includes(e)||q.push(e)},this._requirePlugin=function(e,t){Q.require(e,t)},this._releasePlugin=function(e,t){Q.release(e,t)},this._isPluginRequired=function(e){return Q.isRequired(e)},this._removeSettingsFilter=function(e){let t=q.indexOf(e);-1!==t&&q.splice(t,1)},this._getWaitingChangeSets=function(){return[...ee].map(([e,{source:t}])=>({changes:e,source:t}))},this.getPhysicalRowOfChange=function(e){let t=er.get(e)?.getPhysicalRow(e);return void 0!==t?t:"number"==typeof e[0]?I.toPhysicalRow(e[0]):null},this._runAfterValidatorAnswer=function(e){0===ei?e():es.push(e)},this._trackRecord=function(e,t){let r=tc(e);if(null===r)return null;let i=w0(k,D,r),n=void 0===t?null:R.colToProp(t),o=null===n?null:e8(n),s=null===o?null:H.tracker.track(o),l=()=>null===i?null:w3(D,i);return{getPhysicalRow:l,getVisualRow(){let e=l();return null===e?null:I.toVisualRow(e)},getVisualColumn(){if(void 0===t)return;if(null===n)return t;if(null!==s)return null===s.physicalColumn?null:I.toVisualColumn(s.physicalColumn);let e=R.propToCol(n);return"number"==typeof e?e:null===e?null:t},release(){null!==i&&(k.release(i.record),i=null),null!==s&&(H.tracker.release(s),s=null)}}},this._addDroppedChangesListener=function(e){Z.includes(e)||Z.push(e)},this._removeDroppedChangesListener=function(e){let t=Z.indexOf(e);-1!==t&&Z.splice(t,1)},this._addRowRevealer=function(e){J.includes(e)||J.push(e)},this._removeRowRevealer=function(e){let t=J.indexOf(e);-1!==t&&J.splice(t,1)},this._prepareRowReveal=function(){let e=J.map(e=>e());return t=>{let r=()=>null!==I.rowIndexMapper.getRenderableFromVisualIndex(t);if(r())return!0;for(let i of e)if(i(t)&&r())return!0;return!1}},this._isDataLoadPending=function(){return"configure"===B},this._isHeldMetaPhaseRunning=function(){return"meta"===B},this._isRunningInitReadySteps=function(){return W},this.getValue=function(){let e=I.getSelectedRangeActive();if(eO.getValue){if(i3(eO.getValue))return eO.getValue.call(I);else if(e&&"string"==typeof eO.getValue){let t=e.highlight.row??0;return I.getData()[t][eO.getValue]}}else if(e)return I.getDataAtCell(e.highlight.row,e.highlight.col);return null},this.getSettings=function(){return eO},this.clear=function(){let e=this.countRows(),t=this.countCols();if(e>0&&t>0){let r=[];tp(r,0,e-1,0,t-1),r.length>0&&this.setDataAtCell(r)}this.deselectCell()},this.alter=function(e,t,r,i,n){ed.run(w9[e]??e,i,()=>{ed.describe({index:t}),T.alter(e,t,r,i,n)})},this.getCell=function(e,t,r=!1){if(!I.view)return null;let i=t,n=e;if(t>=0){if(I.columnIndexMapper.isHidden(I.toPhysicalColumn(t)))return null;i=I.columnIndexMapper.getRenderableFromVisualIndex(t)}if(e>=0){if(I.rowIndexMapper.isHidden(I.toPhysicalRow(e)))return null;n=I.rowIndexMapper.getRenderableFromVisualIndex(e)}return null===n||null===i||void 0===n||void 0===i?null:I.view.getCellAtCoords(I._createCellCoords(n,i),r)},this.getCoords=function(e){if(!I.view)return null;let t=I.view._wt.wtTable.getCoords(e);if(null===t)return null;let{row:r,col:i}=t,n=r,o=i;return null!==r&&r>=0&&(n=I.rowIndexMapper.getVisualFromRenderableIndex(r)),null!==i&&i>=0&&(o=I.columnIndexMapper.getVisualFromRenderableIndex(i)),I._createCellCoords(n,o)},this.colToProp=function(e){return R.colToProp(e)},this.propToCol=function(e){return R.propToCol(e)},this.toVisualRow=e=>I.rowIndexMapper.getVisualFromPhysicalIndex(e),this.toVisualColumn=e=>I.columnIndexMapper.getVisualFromPhysicalIndex(e),this.toPhysicalRow=e=>I.rowIndexMapper.getPhysicalFromVisualIndex(e),this.toPhysicalColumn=e=>I.columnIndexMapper.getPhysicalFromVisualIndex(e),this.getRowId=function(e){let t=Number.isInteger(e)&&e>=0&&e<I.countRows()?I.toPhysicalRow(e):null;return null===t?null:tK.getRowIdAtPhysicalRow(t)},this.getVisualRowById=function(e){let t=tK.getPhysicalRowById(e),r=null===t?null:I.toVisualRow(t);return null!==r&&r<I.countRows()?r:null},this.getPhysicalRowById=function(e){return tK.getPhysicalRowById(e)},this.getRowIdAtPhysicalRow=function(e){return!Number.isInteger(e)||e<0||e>=I.rowIndexMapper.getNumberOfIndexes()?null:tK.getRowIdAtPhysicalRow(e)},this.getRowIds=function(e){let t=I.countRows(),r=(Array.isArray(e)?e:Array.from({length:t},(e,t)=>t)).map(e=>Number.isInteger(e)&&e>=0&&e<t?I.toPhysicalRow(e):null);return tK.getRowIdsAtPhysicalRows(r)},this.getVisualRowsByIds=function(e){return Array.isArray(e)?e.map(e=>I.getVisualRowById(e)):[]},this.getPhysicalRowsByIds=function(e){return Array.isArray(e)?e.map(e=>tK.getPhysicalRowById(e)):[]},this.setDataAtRowIdProp=function(e,t,r,i){let n=I.getVisualRowById(e);if(null!==n)return I.setDataAtRowProp(n,t,r,i),!0;let o=tK.getPhysicalRowById(e);return null!==o&&(I.setSourceDataAtCell(o,t,r,i),!0)},this.getDataAtCell=function(e,t){return R.get(e,n3(I,t))},this._getDataAtColumnForRows=function(e,t){return R.getAtColumnForRows(e,t)},this.getDataAtRowProp=function(e,t){return R.get(e,t)},this.getDataAtCol=function(e){let t=[],r=R.getRange(I._createCellCoords(0,e),I._createCellCoords(tL(),e),pY.DESTINATION_RENDERER);for(let e=0;e<r.length;e+=1)for(let i=0;i<r[e].length;i+=1)t.push(r[e][i]);return t},this.getDataAtProp=function(e){let t=[],r=R.propToCol(e);if(null===r)return t;let i=R.getRange(I._createCellCoords(0,r),I._createCellCoords(tL(),r),pY.DESTINATION_RENDERER);for(let e=0;e<i.length;e+=1)for(let r=0;r<i[e].length;r+=1)t.push(i[e][r]);return t},this.getSourceData=function(e,t,r,i){return void 0===e?E.getData():E.getByRange(I._createCellCoords(e,t??null),I._createCellCoords(r??null,i??null))},this.getSourceDataArray=function(e,t,r,i){return void 0===e?E.getData(!0):E.getByRange(I._createCellCoords(e,t??null),I._createCellCoords(r??null,i??null),!0)},this.getSourceDataAtCol=function(e){return E.getAtColumn(e)},this.setSourceDataAtCell=function(e,t,r,i){let n=ts(e,t,i);ed.run("change",n,()=>tF.call(this,e,t,r,i))},this.getSourceDataAtRow=function(e){return E.getAtRow(e)},this.getSourceDataAtCell=function(e,t){return E.getAtCell(e,t)},this.getDataAtRow=function(e){return R.getRange(I._createCellCoords(e,0),I._createCellCoords(e,this.countCols()-1),pY.DESTINATION_RENDERER)[0]||[]},this.getDataType=function(e,t,r,i){let n=void 0===e?[0,0,I.countRows(),I.countCols()]:[e,t,r,i],[o,s]=n,[,,l,a]=n,h=null,d=null;void 0===l&&(l=o),void 0===a&&(a=s);let u="mixed";return oD(Math.max(Math.min(o,l),0),Math.max(o,l),e=>{let t=!0;return oD(Math.max(Math.min(s,a),0),Math.max(s,a),r=>(d=I.getCellMetaTransient(e,r).type??null,h?t=h===d:h=d,t)),u=t?d??"mixed":"mixed",t}),u},this.removeCellMeta=function(e,t,r){ed.run("remove_cell_meta",void 0,()=>{let[i,n]=tB(e,t),o=eN.getCellMetaKeyValue(i,n,r);!1!==I.runHooks("beforeRemoveCellMeta",e,t,r,o)&&(tV(i,n,r,()=>{eN.removeCellMeta(i,n,r)}),I.runHooks("afterRemoveCellMeta",e,t,r,o)),o=null})},this.spliceCellsMeta=function(e,t=0,...r){r.length>0&&!Array.isArray(r[0])&&tf("The 3rd argument (cellMetaRows) has to be passed as an array of cell meta objects array."),ed.run("splice_cells_meta",void 0,()=>{if(t>0){let r=I.toPhysicalRow(e);pG(I,!1,r,t),eN.removeRow(r,t)}r.length>0&&eo(r.reverse(),t=>{let r=I.toPhysicalRow(e);pG(I,!0,r,1),eN.createRow(r),eo(t,(t,r)=>{this.setCellMetaObject(e,r,t)})})}),I.render()},this.setCellMetaObject=function(e,t,r){"object"==typeof r&&ed.run("set_cell_meta",void 0,()=>{tI(r,(r,i)=>{this.setCellMeta(e,t,i,r)})})},this._setCellMetaDeclarative=function(e,t,r,i){let[n,o]=tB(e,t);eN.disableUserDefinedMetaRecording();try{eN.setCellMeta(n,o,r,i)}finally{eN.enableUserDefinedMetaRecording()}},this._removeCellMetaByPhysicalIndex=function(e,t,r){ed.run("remove_cell_meta",void 0,()=>{tV(e,t,r,()=>{eN.removeCellMeta(e,t,r)})})},this._setCellMetaByPhysicalIndex=function(e,t,r,i){ed.run("set_cell_meta",void 0,()=>{tV(e,t,r,()=>{eN.setCellMeta(e,t,r,i)})})},this.setCellMeta=function(e,t,r,i){ed.run("set_cell_meta",void 0,()=>{if(!1===I.runHooks("beforeSetCellMeta",e,t,r,i))return;let[n,o]=tB(e,t);tV(n,o,r,()=>{eN.setCellMeta(n,o,r,i)}),I.runHooks("afterSetCellMeta",e,t,r,i)})},this.getCellsMeta=function(){return eN.getCellsMeta()},this.getCellMeta=function(e,t,r={skipMetaExtension:!1}){let i=I.toPhysicalRow(e),n=I.toPhysicalColumn(t);return null===i&&(i=e),null===n&&(n=t),eN.getCellMeta(i,n,{visualRow:e,visualColumn:t,...r})},this.getCellMetaTransient=function(e,t){let r=I.toPhysicalRow(e),i=I.toPhysicalColumn(t);return null===r&&(r=e),null===i&&(i=t),eN.getCellMetaTransient(r,i,{visualRow:e,visualColumn:t})},this.getColumnMeta=function(e){return eN.getColumnMeta(I.toPhysicalColumn(e))},this.getCellMetaAtRow=function(e){return eN.getCellsMetaAtRow(e)},this.isColumnModificationAllowed=function(){return!("object"===I.dataType||eO.columns)},this.getCellRenderer=function(e,t){let r="number"==typeof e?I.getCellMeta(e,t).renderer:e.renderer;return"string"==typeof r?se(r):eG(r)?se("text"):r},this.getCellEditor=function(e,t){let r="number"==typeof e?I.getCellMeta(e,t).editor:e.editor;return"string"==typeof r?nz(r):eG(r)||!0===r?nz("text"):r},this.getCellValidator=function(e,t){let r="number"==typeof e?I.getCellMeta(e,t):e,i="string"==typeof r.validator?sl(r.validator):r.validator;return sN(r.maxLength)?function(e){if(!e)return sO;let t=eY(e)?sI(e):e;return function(e,r){sO.call(this,e,i=>{i?t.call(this,e,r):r(!1)})}}(i):i},this.validateCells=function(e){this._validateCells(e)},this.validateRows=function(e,t){Array.isArray(e)||tf("validateRows parameter `rows` must be an array"),this._validateCells(t,e)},this.validateColumns=function(e,t){Array.isArray(e)||tf("validateColumns parameter `columns` must be an array"),this._validateCells(t,void 0,e)},this._validateCells=function(e,t,r){let i=e3();e&&(i.onQueueEmpty=e);let n=I.countRows()-1;for(;n>=0;){if(void 0!==t&&-1===t.indexOf(n)){n-=1;continue}let e=I.countCols()-1;for(;e>=0;){if(void 0!==r&&-1===r.indexOf(e)){e-=1;continue}i.addValidatorToQueue();let t=n,o=e,s=I.getCellMetaTransient(t,o);if(I.validateCell(tm(t,o,s),s,e=>{if("boolean"!=typeof e&&tf("Validation error: result is not boolean"),!1===e){i.valid=!1;let e=I.getCellMeta(t,o,{skipMetaExtension:!0});e.valid=!1,i1(e)}i.removeValidatorFormQueue()},"validateCells"),!I)return;e-=1}n-=1}i.checkIfQueueIsEmpty()},this.getRowHeader=function(e){let t=eO.rowHeaders,r=e;if(void 0!==r&&(r=I.runHooks("modifyRowHeader",r)),void 0===r){let e=[];oD(I.countRows()-1,t=>{e.push(I.getRowHeader(t))}),t=e}else Array.isArray(t)&&void 0!==t[r]?t=t[r]:i3(t)?t=t(r):t&&"string"!=typeof t&&"number"!=typeof t&&(t=r+1);return t},this.hasRowHeaders=function(){return!!eO.rowHeaders},this.hasColHeaders=function(){if(void 0!==eO.colHeaders&&null!==eO.colHeaders)return!!eO.colHeaders;for(let e=0,t=I.countCols();e<t;e++)if(I.getColHeader(e))return!0;return!1};let tz=!1,tU=null;this.getColHeader=function(e,t=-1){let r=I.runHooks("modifyColHeader",e);if(void 0===r){let e=[],t=I.countCols();for(let r=0;r<t;r++)e.push(I.getColHeader(r));return e}let i=eO.colHeaders,n=eO.columns,o="function"==typeof n?n:null,s=I.toPhysicalColumn(r),l=null;if(null!==o){let e=I.countCols();if(null===tU||tU.columns!==o||tU.columnsLen!==e){let t=[];for(let r=0;r<e;r++)o(r)&&t.push(r);tU={columns:o,columnsLen:e,indexes:t}}l=o(tU.indexes[s])??null}return!1===eO.colHeaders?i=null:l&&l.title?i=l.title:n&&!i3(n)&&n[s]&&n[s].title?i=n[s].title:Array.isArray(eO.colHeaders)&&void 0!==eO.colHeaders[s]?i=eO.colHeaders[s]:i3(eO.colHeaders)?i=eO.colHeaders(s):eO.colHeaders&&"string"!=typeof eO.colHeaders&&"number"!=typeof eO.colHeaders&&(i=dr(r)),i=I.runHooks("modifyColumnHeaderValue",i,e,t)},this._getColWidthFromSettings=function(e){let t;if(e>=0&&(t=I.getCellMeta(0,e).width),null!=(t??=eO.colWidths)){switch(typeof t){case"object":{if(e<0){t=t[e];break}let r=I.toPhysicalColumn(e),i=null===r?e:tq.getDeclaredIndex(r,t);t=null===i?void 0:t[i];break}case"function":t=t((e>=0?I.toPhysicalColumn(e):null)??e)}"string"==typeof t&&(t=Number.parseInt(t,10))}return t??void 0},this.getColWidth=function(e,t){let r=I._getColWidthFromSettings(e);return void 0===(r=I.runHooks("modifyColWidth",r,e,t))&&(r=50),r};let tW=(e,t)=>{let r=eO[e];if("object"!=typeof r&&"function"!=typeof r||t<0)return sD(r,t);let i=I.toPhysicalRow(t);if(null===i)return;if(!Array.isArray(r))return sD(r,i);let n=tX.getDeclaredIndex(e,i);return null===n?void 0:sD(r,n)};this._isRowHeightExact=function(e){return!sF(eO.autoRowSize)&&sL(tW("rowHeights",e))},this._getRowHeightFromSettings=function(e){let t=tW("rowHeights",e),r=sL(t);if(r&&!sF(eO.autoRowSize))return t;let i=I.stylesHandler.getDefaultRowHeight(e),n=void 0!==eO.rowHeights&&null!==eO.rowHeights?t:void 0,o=r?t:tW("minRowHeights",e)??n;return null!=o&&null!==i&&o<i?i:o},this.getRowHeight=function(e,t){let r=I._getRowHeightFromSettings(e);return I.runHooks("modifyRowHeight",r,e,t)},this.countSourceRows=function(){return E.countRows()},this.countSourceCols=function(){return E.countFirstRowKeys()},this.countRows=function(){return R.getLength()},this.countCols=function(){return Math.min(eO.maxCols,I.columnIndexMapper.getNotTrimmedIndexesLength())},this.countRenderedRows=function(){let e=I.view;return e?._wt.drawn?e._wt.wtTable.getRenderedRowsCount():-1},this.countVisibleRows=function(){let e=I.view;return e?._wt.drawn?e._wt.wtTable.getVisibleRowsCount():-1},this.countRenderedCols=function(){let e=I.view;return e?._wt.drawn?e._wt.wtTable.getRenderedColumnsCount():-1},this.countVisibleCols=function(){let e=I.view;return e?._wt.drawn?e._wt.wtTable.getVisibleColumnsCount():-1},this.countRowHeaders=function(){let e=I.view;return e?e.getRowHeadersCount():0},this.countColHeaders=function(){let e=I.view;return e?e.getColumnHeadersCount():0},this.countEmptyRows=function(e=!1){let t=0;return oL(I.countRows()-1,r=>{if(I.isEmptyRow(r))t+=1;else if(!0===e)return!1}),t},this.countEmptyCols=function(e=!1){let t=0;return oL(I.countCols()-1,r=>{if(I.isEmptyCol(r))t+=1;else if(!0===e)return!1}),t},this.isEmptyRow=function(e){return eO.isEmptyRow.call(I,e)},this.isEmptyCol=function(e){return eO.isEmptyCol.call(I,e)},this.selectCell=function(e,t,r,i,n=!0,o=!0){if(eG(e)||eG(t))return!1;let s=[[null==e||Number.isNaN(Number(e))?0:Number(e),null==t||"number"==typeof t&&Number.isNaN(t)?0:t,eG(r)?void 0:r,eG(i)?void 0:i]];return I.selectCells(s,n,o)},this.selectCells=function(e=[[]],t=!0,r=!0){let i;if(!I.view)return!1;!1===t&&M.suspend(),!1===r&&A.suspend();try{i=eP.selectCells(e)}finally{M.resume(),!1===r&&A.resume()}return I&&i&&r&&I.listen(),i};let t$=(e,t)=>{if(!1!==e)return t();A.suspend();try{return t()}finally{A.resume()}};this.selectColumns=function(e,t=e,r,i=!0){return!!I.view&&t$(i,()=>eP.selectColumns(e,t,r))},this.selectRows=function(e,t=e,r,i=!0){return!!I.view&&t$(i,()=>eP.selectRows(e,t,r))},this.deselectCell=function(){eP.deselect()},this.selectAll=function(e=!0,t=e,r,i=!0){I.view&&(M.skipNextScrollCycle(),t$(i,()=>{eP.selectAll(e,t,r)}))};let tG=(e,t)=>e.getNearestNotHiddenIndex(t,1,!0);this.scrollViewportTo=function(e,t){if(!I.view)return!1;"number"==typeof e&&(e={row:arguments[0],col:arguments[1],verticalSnap:arguments[2]?"bottom":"top",horizontalSnap:arguments[3]?"end":"start",considerHiddenIndexes:arguments[4]??!0});let{row:r,col:i,considerHiddenIndexes:n}=e??{},o=r,s=i;if(i3(t)&&this.addHookOnce("afterScroll",t),void 0===n||n){var l,a;let e,t,n,h,d=(l=r,a=i,e=void 0!==l&&Number.isInteger(l)&&l>=0,t=void 0!==a&&Number.isInteger(a)&&a>=0,n=e?tG(I.rowIndexMapper,l):void 0,h=t?tG(I.columnIndexMapper,a):void 0,null!==n&&null!==h&&{renderableRow:e?I.rowIndexMapper.getRenderableFromVisualIndex(n)??void 0:l,renderableColumn:t?I.columnIndexMapper.getRenderableFromVisualIndex(h)??void 0:a});if(!1===d)return!1;o=d.renderableRow,s=d.renderableColumn}let h=Number.isInteger(o),d=Number.isInteger(s),u=!1;return h&&o>=0&&d&&s>=0?u=I.view.scrollViewport(I._createCellCoords(o,s),e.horizontalSnap,e.verticalSnap):h&&o>=0&&(d&&s<0||!d)?u=I.view.scrollViewportVertically(o,e.verticalSnap):d&&s>=0&&(h&&o<0||!h)&&(u=I.view.scrollViewportHorizontally(s,e.horizontalSnap)),i3(t)&&(u?this.view.render():(this.removeHook("afterScroll",t),this._registerMicrotask(()=>t()))),u},this.scrollToFocusedCell=function(e){if(!I.selection.isSelected())return!1;i3(e)&&I.addHookOnce("afterScroll",e);let{highlight:t}=I.getSelectedRangeActive(),r=I.scrollViewportTo(t.toObject());return r?I.view.render():i3(e)&&(I.removeHook("afterScroll",e),I._registerMicrotask(()=>e())),r},this.destroy=function(){j=!0,I.suspendRender(),I._clearTimeouts(),I._clearMicrotasks(),ed.destroy(),eP?.suspendGridTrackingFits(),eh?.disconnect(),eh=null,ev?.disconnect(),ev=null,eE?.(),eE=null,eT?.disconnect(),eT=null,I.view&&I.view.destroy(),E&&E.destroy(),E=null,sC(this)&&(!function(e){if(0===m1.length)return;let t=e?m1.lastIndexOf(e):m1.length-1;if(-1===t)return;if(m1.splice(t,1),0===m1.length){mJ.remove(),mJ=null,m0.remove(),m0=null;return}let r=mJ.parentElement;r&&m1.includes(r)||m1[0].append(mJ,m0)}(I.rootPortalElement),this.getFocusScopeManager().destroy(),tZ?.destroy(),I.themeManager?.destroy()),this.getShortcutManager().destroy(),e_.clear(),eN.clearCache(),w8.delete(this.guid),N.destroy(),x&&x.destroy(),I.rootContainer&&rK(I.rootContainer),I.rootPortalElement&&I.rootPortalElement.remove(),I.batchExecution(()=>{I.rowIndexMapper.destroy(),I.columnIndexMapper.destroy(),eH.getItems().forEach(([,e])=>{e.hot&&e.destroy()}),eH.clear(),I.runHooks("afterDestroy")},!0),nM.getSingleton().destroy(I),tI(I,(e,t,r)=>{var i;i3(e)?r[t]=(i=t,()=>{tf(`The "${i}" method cannot be called because this Handsontable instance has been destroyed`)}):"guid"!==t&&(r[t]=null)}),I.isDestroyed=!0,R&&R.destroy(),R=null,T=null,eP?.destroy(),eP=null,x=null,I=null},this.getActiveEditor=function(){return x?.getActiveEditor()};let tj=e=>{let t=I.view;return t?t[e]():null};this.getFirstRenderedVisibleRow=function(){return tj("getFirstRenderedVisibleRow")},this.getLastRenderedVisibleRow=function(){return tj("getLastRenderedVisibleRow")},this.getFirstRenderedVisibleColumn=function(){return tj("getFirstRenderedVisibleColumn")},this.getLastRenderedVisibleColumn=function(){return tj("getLastRenderedVisibleColumn")},this.getFirstFullyVisibleRow=function(){return tj("getFirstFullyVisibleRow")},this.getLastFullyVisibleRow=function(){return tj("getLastFullyVisibleRow")},this.getFirstFullyVisibleColumn=function(){return tj("getFirstFullyVisibleColumn")},this.getLastFullyVisibleColumn=function(){return tj("getLastFullyVisibleColumn")},this.getFirstPartiallyVisibleRow=function(){return tj("getFirstPartiallyVisibleRow")},this.getLastPartiallyVisibleRow=function(){return tj("getLastPartiallyVisibleRow")},this.getFirstPartiallyVisibleColumn=function(){return tj("getFirstPartiallyVisibleColumn")},this.getLastPartiallyVisibleColumn=function(){return tj("getLastPartiallyVisibleColumn")},this.getPlugin=function(e){return eH.getItem(n4(e))},this.getPluginName=function(e){return eH.getId(e)},this.getInstance=function(){return I},this.addHook=function(e,t,r){nM.getSingleton().add(e,t,I,r)},this.hasHook=function(e){return nM.getSingleton().has(e,I)||nM.getSingleton().has(e)},this.addHookOnce=function(e,t,r){nM.getSingleton().once(e,t,I,r)},this.removeHook=function(e,t){nM.getSingleton().remove(e,t,I)},this.runHooks=function(e,t,r,i,n,o,s){return nM.getSingleton().run(I,e,t,r,i,n,o,s)},this.getTranslatedPhrase=function(e,t){return gB(eO.language,e,t)},this.toHTML=()=>ov(this),this.toTableElement=()=>{let e=I.rootDocument;return oE(I,e)},this.timeouts=[],this.useTheme=e=>{let t=!!F;I.themeManager&&mX(e)&&I.themeManager.getClassName()!==e&&I.themeManager.destroy(),this.stylesHandler.useTheme(e??void 0);let r=this.stylesHandler.getThemeName();!t&&r&&(mK(this.rootContainer)&&(r$(this.rootContainer,/ht-theme-.*/g),rW(this.rootContainer,r)),I.render(),I.scrollViewportTo(0,0)),this.runHooks("afterSetTheme",r,t)},this.getCurrentThemeName=()=>I.stylesHandler.getThemeName()??null,this.getTableHeight=()=>I.rootElement.offsetHeight,this.getTableWidth=()=>I.rootElement.offsetWidth,this._registerTimeout=function(e,t=0){if("function"!=typeof e)return this.timeouts.push(e),e;let r=this.timeouts,i=setTimeout(()=>{let t=r.indexOf(i);-1!==t&&r.splice(t,1),e()},t);return this.timeouts.push(i),i},this._clearTimeouts=function(){eo(this.timeouts,e=>{clearTimeout(e)})},this.microtasks=[],this._registerMicrotask=function(e){let t={cancelled:!1};this.microtasks.push(t),this.rootWindow.queueMicrotask(()=>{if(t.cancelled)return;let r=this.microtasks.indexOf(t);-1!==r&&this.microtasks.splice(r,1),e()})},this._clearMicrotasks=function(){eo(this.microtasks,e=>{e.cancelled=!0}),this.microtasks.length=0},this._getEditorManager=function(){return x},this._getDataSource=function(){return E},this._alignInsertedRowSizes=function(e,t){tX.alignInsertedRows(e,t)},this._readRowSizeOrigins=function(){return tX.readOrigins()},this._writeRowSizeOrigins=function(e){tX.writeOrigins(e)},this._getMetaManager=function(){return eN};let tY=(({ownerWindow:e,handleEvent:t,beforeKeyDown:r,afterKeyDown:i})=>{let n=oK({errorIdExists:e=>`The "${e}" context name is already registered.`}),o="grid",s=(e,t="table")=>{let r=((e,t="table")=>{let r=oK({errorIdExists:t=>`The "${t}" shortcut is already registered in the "${e}" context.`}),i=null,n=({keys:e,callback:t,group:i,runOnlyIf:n=()=>!0,captureCtrl:o=!1,preventDefault:s=!0,stopPropagation:l=!1,relativeToGroup:a,position:h,forwardToContext:d}={})=>{eG(i)&&tf("You need to define the shortcut's group."),!1===i3(t)&&tf("The shortcut's callback needs to be a function."),!1===Array.isArray(e)&&tf(ey`Pass the shortcut\'s keys as an array of arrays,\x20
|
|
96
|
+
`)),this.themeStyles.parentNode!==this.hot.rootWrapperElement&&this.hot.rootWrapperElement.prepend(this.themeStyles)}getClassName(){return this.themeClassName}getOverrides(){return{...this.#hl}}getColorScheme(){return this.#hl.colorScheme??this.themeConfig?.colorScheme}getDensityType(){return this.#hl.density??this.themeConfig?.density?.type}setOverrides(e){return!!this.#hh(e)&&(this.#hf(),!0)}update(e){this.hot&&(void 0===e.getThemeConfig&&tf('[ThemeManager] The "theme" option must be an instance of ThemeBuilder.'),this.themeConfig=e.getThemeConfig(),this.themeClassName=`ht-theme-${this.themeConfig.name}`,this.#hg(),"function"==typeof e.subscribe&&(this.#hs?.(),this.#hs=e.subscribe(e=>{this.hot?.stylesHandler&&(this.themeConfig=e,this.#hg(),this.#hf(),this.hot.stylesHandler.clearCache(),this.hot.render(),this.hot.runHooks("afterSetTheme",this.themeClassName,!1))})),this.mount(),this.hot.runHooks("afterSetTheme",this.themeClassName,!0))}mount(){this.#hw(),this.#hf()}unmount(){this.#hy(),this.themeStyles&&this.themeStyles.remove()}#hw(){[this.hot?.rootWrapperElement,this.hot?.rootPortalElement].forEach(e=>{e&&rW(e,this.scopeClassName)})}#hy(){[this.hot?.rootWrapperElement,this.hot?.rootPortalElement].forEach(e=>{e&&r$(e,this.scopeClassName)})}destroy(){this.#hs?.(),this.unmount(),this.hot.themeManager=null}}let wl={size_0:"0px",size_0_5:"2px",size_1:"4px",size_2:"8px",size_1_5:"6px",size_3:"12px",size_4:"16px",size_5:"20px",size_6:"24px",size_7:"28px",size_8:"32px",size_9:"36px",size_10:"40px",size_0_25:"1px"},wa={default:{cellVertical:"sizing.size_1",cellHorizontal:"sizing.size_2",barsHorizontal:"sizing.size_4",barsVertical:"sizing.size_2",gap:"sizing.size_1",buttonHorizontal:"sizing.size_3",buttonVertical:"sizing.size_1_5",dialogHorizontal:"sizing.size_2",dialogVertical:"sizing.size_2",inputHorizontal:"sizing.size_3",inputVertical:"sizing.size_1_5",menuVertical:"sizing.size_2",menuHorizontal:"sizing.size_0",menuItemVertical:"sizing.size_1",menuItemHorizontal:"sizing.size_3"},compact:{cellVertical:"sizing.size_0_5",cellHorizontal:"sizing.size_1_5",barsHorizontal:"sizing.size_2",barsVertical:"sizing.size_1",gap:"sizing.size_0_5",buttonHorizontal:"sizing.size_2",buttonVertical:"sizing.size_0_5",dialogHorizontal:"sizing.size_1_5",dialogVertical:"sizing.size_1_5",inputHorizontal:"sizing.size_2",inputVertical:"sizing.size_0_5",menuVertical:"sizing.size_2",menuHorizontal:"sizing.size_0",menuItemVertical:"sizing.size_0_5",menuItemHorizontal:"sizing.size_2"},comfortable:{cellVertical:"sizing.size_2",cellHorizontal:"sizing.size_3",barsHorizontal:"sizing.size_4",barsVertical:"sizing.size_2",gap:"sizing.size_1_5",buttonHorizontal:"sizing.size_4",buttonVertical:"sizing.size_2",dialogHorizontal:"sizing.size_3",dialogVertical:"sizing.size_3",inputHorizontal:"sizing.size_4",inputVertical:"sizing.size_2",menuVertical:"sizing.size_3",menuHorizontal:"sizing.size_0",menuItemVertical:"sizing.size_2",menuItemHorizontal:"sizing.size_2"}},wh=["sizing","icons","colors","tokens"],wd=["name","icons","colors","tokens"];class wu{#hb;#hC;#hS=new Set;#hv="auto";#hR="default";constructor(e){wr(e,"themeConfig",{requiredFields:wd}),this.#hb={name:void 0,sizing:wl,density:{type:this.#hR,sizes:wa},icons:{},colors:{},tokens:{},colorScheme:this.#hv},this.#hE(e),this.#hb=this.#hC}#hT(){let e=this.getThemeConfig();this.#hS.forEach(t=>t(e))}#hx(e,t){if("string"!=typeof t){let r=tL(e.density,t);e.density=r,void 0!==t.type&&(this.#hR=t.type,this.#hb?.density&&(this.#hb.density.type=t.type))}else e.density.type=t,this.#hR=t,this.#hb?.density&&(this.#hb.density.type=t)}#hE(e){let t=tS(this.#hb);void 0!==e.name&&(void 0!==this.#hb.name?rn('[ThemeBuilder] The "name" property can only be set during `registerTheme()` and cannot be updated via `params()`.'):t.name=e.name),wh.forEach(r=>{void 0!==e[r]&&tx(e[r])&&(t[r]=tL(t[r],e[r]))}),void 0!==e.density&&this.#hx(t,e.density),void 0!==e.colorScheme&&(t.colorScheme=e.colorScheme,this.#hv=e.colorScheme,this.#hb?.colorScheme&&(this.#hb.colorScheme=e.colorScheme)),this.#hC=t}subscribe(e){return"function"!=typeof e&&tf("[ThemeBuilder] listener must be a function."),this.#hS.add(e),()=>this.#hS.delete(e)}params(e){return wr(e,"params"),this.#hE(e),this.#hT(),this}setColorScheme(e){return this.#hv=f7(e),this.#hC.colorScheme=this.#hv,this.#hb.colorScheme=this.#hv,this.#hT(),this}setDensityType(e){return this.#hR=we(e),this.#hC.density.type=this.#hR,this.#hb.density.type=this.#hR,this.#hT(),this}getThemeConfig(){return this.#hC}}let{hasItem:wc,getItem:wg,getNames:wp,getValues:wm,register:wf}=nO("themes");function ww(e){return wc(e)}function wy(e){return wc(e)?wg(e):void rn(`Theme "${e}" is not registered. Please ensure it is registered before using it.`)}function wb(){return wp()}function wC(){return wm()}function wS(e,t){let r=e,i=tS(t);return"string"==typeof e&&tx(t)?i.name=e:"string"!=typeof e&&tx(e)&&(r=(i=tS(e)).name??""),{themeName:r,themeConfigObject:i}}function wv(e,t){let{themeName:r,themeConfigObject:i}=wS(e,t),n=new wu(i);return wc(r)?(rn(`Theme "${r}" is already registered. Registration skipped.`),wy(r)):(wf(r,n),n)}function wR(e,t){let{themeName:r,themeConfigObject:i}=wS(e,t);if(!wc(r))return void rn(`Theme "${r}" is not registered. Cannot reinitialize a non-existent theme.`);let n=new wu(i);return wf(r,n),n}let wE={name:"main",density:"default",icons:{arrowRight:"data:image/svg+xml;charset=utf-8,%3Csvg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M6.64648 10.9393L9.93938 7.64644L6.64648 4.35354' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E%0A",arrowRightWithBar:"data:image/svg+xml;charset=utf-8,%3Csvg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M4.9292 4.64188L8.27934 7.99203L4.9292 11.3422M11.0711 4.08353V11.3422' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E",arrowLeft:"data:image/svg+xml;charset=utf-8,%3Csvg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M9.49268 11.2929L6.19978 8.00001L9.49268 4.70712' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E%0A",arrowLeftWithBar:"data:image/svg+xml;charset=utf-8,%3Csvg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M11.0713 4.64188L7.72115 7.99203L11.0713 11.3422M4.92936 4.08353L4.92936 11.3422' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E",arrowDown:"data:image/svg+xml;charset=utf-8,%3Csvg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cg opacity='0.6'%3E%3Cpath d='M11.5859 6L8.29304 9.29289L5.00015 6' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/g%3E%3C/svg%3E",menu:"data:image/svg+xml;charset=utf-8,%3Csvg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M11.0002 6.66663C11.4262 6.66663 11.6487 7.15963 11.3917 7.47813L11.3537 7.52013L8.35372 10.5201C8.26762 10.6062 8.15307 10.6579 8.03156 10.6656C7.91005 10.6732 7.78992 10.6363 7.69372 10.5616L7.64672 10.5201L4.64672 7.52013L4.60522 7.47313L4.57822 7.43463L4.55122 7.38663L4.54272 7.36863L4.52922 7.33513L4.51322 7.28113L4.50822 7.25463L4.50322 7.22463L4.50122 7.19613V7.13713L4.50372 7.10813L4.50822 7.07813L4.51322 7.05213L4.52922 6.99813L4.54272 6.96463L4.57772 6.89863L4.61022 6.85363L4.64672 6.81313L4.69372 6.77163L4.73222 6.74463L4.78022 6.71763L4.79822 6.70913L4.83172 6.69563L4.88572 6.67963L4.91222 6.67463L4.94222 6.66963L4.97072 6.66763L11.0002 6.66663Z' fill='currentColor'/%3E%3C/svg%3E%0A",selectArrow:"data:image/svg+xml;charset=utf-8,%3Csvg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M11.0002 6.66663C11.4262 6.66663 11.6487 7.15963 11.3917 7.47813L11.3537 7.52013L8.35372 10.5201C8.26762 10.6062 8.15307 10.6579 8.03156 10.6656C7.91005 10.6732 7.78992 10.6363 7.69372 10.5616L7.64672 10.5201L4.64672 7.52013L4.60522 7.47313L4.57822 7.43463L4.55122 7.38663L4.54272 7.36863L4.52922 7.33513L4.51322 7.28113L4.50822 7.25463L4.50322 7.22463L4.50122 7.19613V7.13713L4.50372 7.10813L4.50822 7.07813L4.51322 7.05213L4.52922 6.99813L4.54272 6.96463L4.57772 6.89863L4.61022 6.85363L4.64672 6.81313L4.69372 6.77163L4.73222 6.74463L4.78022 6.71763L4.79822 6.70913L4.83172 6.69563L4.88572 6.67963L4.91222 6.67463L4.94222 6.66963L4.97072 6.66763L11.0002 6.66663Z' fill='currentColor'/%3E%3C/svg%3E%0A",arrowNarrowUp:"data:image/svg+xml;charset=utf-8,%3Csvg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M8.00008 12.6667L8.00008 3.33335M8.00008 3.33335L5.33342 6.00002M8.00008 3.33335L10.6667 6.00002' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E%0A",arrowNarrowDown:"data:image/svg+xml;charset=utf-8,%3Csvg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M8.00004 3.33331V12.6666M8.00004 12.6666L10.6667 9.99998M8.00004 12.6666L5.33337 9.99998' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E%0A",check:"data:image/svg+xml;charset=utf-8,%3Csvg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M3.33337 8.00002L6.66671 11.3334L13.3334 4.66669' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E%0A",checkbox:"data:image/svg+xml;charset=utf-8,%3Csvg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M5 8L7 10L11 6' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E%0A",caretHiddenLeft:"data:image/svg+xml,%3Csvg width='10' height='10' viewBox='0 0 10 10' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M6.08482 1.35771L6.11503 1.3551H6.17649L6.2067 1.35771L6.23795 1.36239L6.26503 1.3676L6.32128 1.38427L6.35618 1.39833L6.42493 1.43479L6.4718 1.46864L6.51399 1.50667L6.55722 1.55562L6.58534 1.59573L6.61347 1.64573L6.62232 1.66448L6.63639 1.69937L6.65305 1.75562L6.65826 1.78323L6.66347 1.81448L6.66555 1.84417L6.66659 1.87489V8.12489C6.66659 8.56864 6.15305 8.80042 5.82128 8.53271L5.77753 8.49312L2.65253 5.36812C2.56286 5.27844 2.50899 5.15912 2.50103 5.03254C2.49307 4.90596 2.53157 4.78083 2.6093 4.68062L2.65253 4.63167L5.77753 1.50667L5.82649 1.46344L5.86659 1.43531L5.91659 1.40719L5.93534 1.39833L5.97024 1.38427L6.02649 1.3676L6.05409 1.36239L6.08482 1.35771Z' fill='currentColor'/%3E%3C/svg%3E",caretHiddenRight:"data:image/svg+xml,%3Csvg width='10' height='10' viewBox='0 0 10 10' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M3.33337 1.87499C3.33337 1.43124 3.84692 1.19947 4.17869 1.46718L4.22244 1.50676L7.34744 4.63176C7.43711 4.72145 7.49098 4.84077 7.49894 4.96735C7.5069 5.09392 7.4684 5.21905 7.39067 5.31926L7.34744 5.36822L4.22244 8.49322L4.17348 8.53645L4.13337 8.56457L4.08337 8.5927L4.06462 8.60155L4.02973 8.61562L3.97348 8.63228L3.94587 8.63749L3.91462 8.6427L3.88494 8.64478L3.85421 8.64582L3.82348 8.64478L3.79327 8.64218L3.76202 8.63749L3.73494 8.63228L3.67869 8.61562L3.64379 8.60155L3.57504 8.5651L3.52817 8.53124L3.48598 8.49322L3.44275 8.44426L3.41462 8.40416L3.3865 8.35416L3.37764 8.33541L3.36358 8.30051L3.34692 8.24426L3.34171 8.21666L3.3365 8.18541L3.33442 8.15572L3.33337 1.87499Z' fill='currentColor'/%3E%3C/svg%3E",caretHiddenUp:"data:image/svg+xml;charset=utf-8,%3Csvg width='8' height='8' viewBox='0 0 8 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M3.76425 2.43099C3.82165 2.3736 3.89801 2.33913 3.97902 2.33403C4.06003 2.32894 4.14012 2.35358 4.20425 2.40333L4.23558 2.43099L6.23558 4.43099L6.26325 4.46233L6.28125 4.48799L6.29925 4.51999L6.30492 4.53199L6.31392 4.55433L6.32458 4.59033L6.32792 4.60799L6.33125 4.62799L6.33258 4.64699L6.33325 4.66666L6.33258 4.68633L6.33092 4.70566L6.32792 4.72566L6.32458 4.74299L6.31392 4.77899L6.30492 4.80133L6.28158 4.84533L6.25992 4.87533L6.23558 4.90233L6.20425 4.92999L6.17858 4.94799L6.14658 4.96599L6.13458 4.97166L6.11225 4.98066L6.07625 4.99133L6.05858 4.99466L6.03858 4.99799L6.01958 4.99933L5.99992 4.99999H1.99992C1.71592 4.99999 1.56758 4.67133 1.73892 4.45899L1.76425 4.43099L3.76425 2.43099Z' fill='currentColor'/%3E%3C/svg%3E%0A",caretHiddenDown:"data:image/svg+xml;charset=utf-8,%3Csvg width='8' height='8' viewBox='0 0 8 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M5.9999 3C6.2839 3 6.43224 3.32867 6.2609 3.541L6.23557 3.569L4.23557 5.569C4.17817 5.62639 4.10181 5.66087 4.0208 5.66596C3.93979 5.67106 3.8597 5.64642 3.79557 5.59667L3.76424 5.569L1.76424 3.569L1.73657 3.53767L1.71857 3.512L1.70057 3.48L1.6949 3.468L1.6859 3.44567L1.67524 3.40967L1.6719 3.392L1.66857 3.372L1.66724 3.353V3.31367L1.6689 3.29433L1.6719 3.27433L1.67524 3.257L1.6859 3.221L1.6949 3.19867L1.71824 3.15467L1.7399 3.12467L1.76424 3.09767L1.79557 3.07L1.82124 3.052L1.85324 3.034L1.86524 3.02833L1.88757 3.01933L1.92357 3.00867L1.94124 3.00533L1.96124 3.002L1.98024 3.00067L5.9999 3Z' fill='currentColor'/%3E%3C/svg%3E%0A",collapseOff:"data:image/svg+xml;charset=utf-8,%3Csvg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M4.33325 8H11.6666' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E%0A",collapseOn:"data:image/svg+xml;charset=utf-8,%3Csvg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M7.49988 11.6667C7.49988 11.9428 7.72374 12.1667 7.99988 12.1667C8.27602 12.1667 8.49988 11.9428 8.49988 11.6667V8.50002H11.6666C11.9427 8.50002 12.1666 8.27616 12.1666 8.00002C12.1666 7.72388 11.9427 7.50002 11.6666 7.50002H8.49988V4.33337C8.49988 4.05723 8.27602 3.83337 7.99988 3.83337C7.72374 3.83337 7.49988 4.05723 7.49988 4.33337V7.50002H4.33325C4.05711 7.50002 3.83325 7.72388 3.83325 8.00002C3.83325 8.27616 4.05711 8.50002 4.33325 8.50002H7.49988V11.6667Z' fill='currentColor'/%3E%3C/svg%3E%0A",radio:"data:image/svg+xml;charset=utf-8,%3Csvg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='8' cy='8' r='4' fill='currentColor'/%3E%3C/svg%3E%0A",chipClose:"data:image/svg+xml;charset=utf-8,%3Csvg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M12 4L4 12M4 4L12 12' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E%0A",search:"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 32 32' fill='none'%3E%3Cg opacity='0.5'%3E%3Cpath d='M28 28L20 20M4 13.3333C4 14.559 4.24141 15.7727 4.71046 16.905C5.1795 18.0374 5.86699 19.0663 6.73367 19.933C7.60035 20.7997 8.62925 21.4872 9.76162 21.9562C10.894 22.4253 12.1077 22.6667 13.3333 22.6667C14.559 22.6667 15.7727 22.4253 16.905 21.9562C18.0374 21.4872 19.0663 20.7997 19.933 19.933C20.7997 19.0663 21.4872 18.0374 21.9562 16.905C22.4253 15.7727 22.6667 14.559 22.6667 13.3333C22.6667 12.1077 22.4253 10.894 21.9562 9.76162C21.4872 8.62925 20.7997 7.60035 19.933 6.73367C19.0663 5.86699 18.0374 5.1795 16.905 4.71046C15.7727 4.24141 14.559 4 13.3333 4C12.1077 4 10.894 4.24141 9.76162 4.71046C8.62925 5.1795 7.60035 5.86699 6.73367 6.73367C5.86699 7.60035 5.1795 8.62925 4.71046 9.76162C4.24141 10.894 4 12.1077 4 13.3333Z' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/g%3E%3C/svg%3E",plus:"data:image/svg+xml;charset=utf-8,%3Csvg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M7.49988 11.6667C7.49988 11.9428 7.72374 12.1667 7.99988 12.1667C8.27602 12.1667 8.49988 11.9428 8.49988 11.6667V8.50002H11.6666C11.9427 8.50002 12.1666 8.27616 12.1666 8.00002C12.1666 7.72388 11.9427 7.50002 11.6666 7.50002H8.49988V4.33337C8.49988 4.05723 8.27602 3.83337 7.99988 3.83337C7.72374 3.83337 7.49988 4.05723 7.49988 4.33337V7.50002H4.33325C4.05711 7.50002 3.83325 7.72388 3.83325 8.00002C3.83325 8.27616 4.05711 8.50002 4.33325 8.50002H7.49988V11.6667Z' fill='currentColor'/%3E%3C/svg%3E%0A",menuList:"data:image/svg+xml;charset=utf-8,%3Csvg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath transform='translate(3.833 4.5)' d='M7.83301 6C8.10915 6 8.33301 6.22386 8.33301 6.5C8.33281 6.77597 8.10903 7 7.83301 7H0.5C0.22398 7 0.000197811 6.77597 0 6.5C0 6.22386 0.223858 6 0.5 6H7.83301ZM7.83301 3C8.10915 3 8.33301 3.22386 8.33301 3.5C8.33281 3.77597 8.10903 4 7.83301 4H0.5C0.22398 4 0.000197811 3.77597 0 3.5C0 3.22386 0.223858 3 0.5 3H7.83301ZM7.83301 0C8.10915 0 8.33301 0.223858 8.33301 0.5C8.33281 0.775974 8.10903 1 7.83301 1H0.5C0.22398 1 0.000197811 0.775974 0 0.5C0 0.223858 0.223858 0 0.5 0H7.83301Z' fill='currentColor'/%3E%3C/svg%3E"},colors:{white:"#ffffffff",black:"#000000ff",primary:{100:"#6180ffff",200:"#5573f0ff",300:"#4669f6ff",400:"#2e56fcff",500:"#1a42e8ff",600:"#1535bcff"},palette:{50:"#f7f7f9ff",100:"#e7e7e9ff",200:"#b9b9bbff",300:"#a3a3a3ff",400:"#68696cff",500:"#404144ff",600:"#313132ff",700:"#282829ff",800:"#222222ff",900:"#1e1e1fff",950:"#050506ff"},transparent:"#ffffff00"},tokens:{fontFamily:"Inter",fontSize:"14px",fontSizeSmall:"12px",lineHeight:"20px",lineHeightSmall:"18px",fontWeight:"400",letterSpacing:"0px",borderColor:["colors.palette.100","colors.palette.700"],accentColor:["colors.primary.500","colors.primary.300"],foregroundColor:["colors.palette.800","colors.palette.200"],foregroundSecondaryColor:["colors.palette.400","colors.palette.300"],backgroundColor:["colors.white","colors.palette.950"],backgroundSecondaryColor:["colors.palette.50","colors.palette.900"],placeholderColor:["colors.palette.300","colors.palette.400"],readOnlyColor:["colors.palette.400","colors.palette.300"],disabledColor:["colors.palette.300","colors.palette.400"],gapSize:"density.gap",iconSize:"sizing.size_4",tableTransition:"0.15s",borderRadius:"sizing.size_1",barForegroundColor:"tokens.foregroundColor",barBackgroundColor:"tokens.backgroundSecondaryColor",barHorizontalPadding:"density.barsHorizontal",barVerticalPadding:"density.barsVertical",shadowColor:["colors.palette.800","colors.palette.200"],shadowX:"sizing.size_0",shadowY:"sizing.size_2",shadowBlur:"sizing.size_4",shadowOpacity:"8%",cellHorizontalPadding:"density.cellHorizontal",cellVerticalPadding:"density.cellVertical",cellHorizontalBorderColor:"tokens.borderColor",cellVerticalBorderColor:"tokens.borderColor",cellSelectionBorderColor:"tokens.accentColor",cellSelectionBackgroundColor:["colors.primary.400","colors.primary.200"],rowSelectionBackgroundColor:["#1a42e81a","#4669f633"],cellSuccessBackgroundColor:"#37bc6c33",cellErrorBackgroundColor:"#fa4d3233",cellReadOnlyBackgroundColor:"tokens.backgroundSecondaryColor",cellAutofillSize:"sizing.size_1_5",cellAutofillHitAreaSize:"sizing.size_3",cellAutofillBorderWidth:"sizing.size_0_25",cellAutofillBorderRadius:"sizing.size_1",cellAutofillBorderColor:"tokens.backgroundColor",cellAutofillBackgroundColor:"tokens.accentColor",cellAutofillFillBorderColor:"tokens.foregroundColor",customBordersDefaultColor:["colors.black","colors.palette.200"],cellEditorBorderWidth:"2px",cellEditorBorderColor:"tokens.accentColor",cellEditorForegroundColor:["colors.palette.950","colors.white"],cellEditorBackgroundColor:"tokens.backgroundColor",cellEditorShadowBlurRadius:"0px",cellEditorShadowColor:"tokens.accentColor",cellMobileHandleSize:"sizing.size_3",cellMobileHandleBorderWidth:"sizing.size_0_25",cellMobileHandleBorderRadius:"sizing.size_3",cellMobileHandleBorderColor:"tokens.accentColor",cellMobileHandleBackgroundColor:"tokens.accentColor",cellMobileHandleBackgroundOpacity:"40%",cellSelectionHandleSize:"sizing.size_2",cellSelectionHandleLength:"sizing.size_4",cellSelectionHandleBorderWidth:"sizing.size_0_25",cellSelectionHandleBorderRadius:"sizing.size_3",cellSelectionHandleBorderColor:"tokens.accentColor",cellSelectionHandleBackgroundColor:"tokens.backgroundColor",headerFontWeight:"tokens.fontWeight",headerForegroundColor:"tokens.foregroundColor",headerBackgroundColor:"tokens.backgroundSecondaryColor",headerHighlightedShadowSize:"0px",headerHighlightedForegroundColor:["colors.palette.950","colors.white"],headerHighlightedBackgroundColor:["colors.palette.100","colors.palette.700"],headerActiveBorderColor:["colors.primary.400","colors.primary.200"],headerActiveForegroundColor:"colors.white",headerActiveBackgroundColor:"tokens.accentColor",headerFilterBackgroundColor:"tokens.cellSuccessBackgroundColor",headerRowForegroundColor:"tokens.foregroundColor",headerRowBackgroundColor:"tokens.backgroundSecondaryColor",headerRowHighlightedForegroundColor:["colors.palette.950","colors.white"],headerRowHighlightedBackgroundColor:["colors.palette.100","colors.palette.700"],headerRowActiveForegroundColor:"colors.white",headerRowActiveBackgroundColor:"tokens.accentColor",rowHeaderOddBackgroundColor:"tokens.headerRowBackgroundColor",rowHeaderEvenBackgroundColor:"tokens.headerRowBackgroundColor",rowCellOddBackgroundColor:"tokens.backgroundColor",rowCellEvenBackgroundColor:"tokens.backgroundColor",buttonBorderRadius:"sizing.size_1",buttonHorizontalPadding:"density.buttonHorizontal",buttonVerticalPadding:"density.buttonVertical",primaryButtonBorderColor:"colors.transparent",primaryButtonForegroundColor:"colors.white",primaryButtonBackgroundColor:"tokens.accentColor",primaryButtonDisabledBorderColor:"colors.transparent",primaryButtonDisabledForegroundColor:"tokens.disabledColor",primaryButtonDisabledBackgroundColor:["colors.palette.100","colors.palette.700"],primaryButtonHoverBorderColor:"colors.transparent",primaryButtonHoverForegroundColor:"tokens.backgroundColor",primaryButtonHoverBackgroundColor:["colors.primary.600","colors.primary.100"],primaryButtonFocusBorderColor:"tokens.backgroundColor",primaryButtonFocusForegroundColor:"tokens.backgroundColor",primaryButtonFocusBackgroundColor:"tokens.accentColor",secondaryButtonBorderColor:"tokens.borderColor",secondaryButtonForegroundColor:"tokens.foregroundColor",secondaryButtonBackgroundColor:"tokens.backgroundColor",secondaryButtonDisabledBorderColor:"tokens.borderColor",secondaryButtonDisabledForegroundColor:"tokens.disabledColor",secondaryButtonDisabledBackgroundColor:["colors.palette.100","colors.palette.700"],secondaryButtonHoverBorderColor:"tokens.borderColor",secondaryButtonHoverForegroundColor:"tokens.foregroundColor",secondaryButtonHoverBackgroundColor:["colors.palette.100","colors.palette.700"],secondaryButtonFocusBorderColor:"tokens.borderColor",secondaryButtonFocusForegroundColor:"tokens.foregroundColor",secondaryButtonFocusBackgroundColor:"tokens.backgroundColor",iconButtonBorderRadius:"sizing.size_0_5",iconButtonLargeBorderRadius:"sizing.size_1",iconButtonLargePadding:"sizing.size_1",iconButtonBorderColor:["colors.palette.50","colors.palette.900"],iconButtonBackgroundColor:"tokens.backgroundSecondaryColor",iconButtonIconColor:["colors.palette.300","colors.palette.400"],iconButtonHitAreaSize:"sizing.size_6",iconButtonHoverBorderColor:["colors.palette.100","colors.palette.700"],iconButtonHoverBackgroundColor:["colors.palette.100","colors.palette.700"],iconButtonHoverIconColor:["colors.palette.400","colors.palette.300"],iconButtonActiveBorderColor:["colors.primary.400","colors.primary.200"],iconButtonActiveBackgroundColor:"tokens.accentColor",iconButtonActiveIconColor:"colors.white",iconButtonActiveHoverBorderColor:["colors.primary.400","colors.primary.200"],iconButtonActiveHoverBackgroundColor:["colors.primary.400","colors.primary.200"],iconButtonActiveHoverIconColor:"colors.white",collapseButtonBorderRadius:"sizing.size_1",collapseButtonOpenBorderColor:["colors.palette.200","colors.palette.500"],collapseButtonOpenBackgroundColor:["colors.white","colors.palette.950"],collapseButtonOpenIconColor:["colors.palette.400","colors.palette.300"],collapseButtonOpenIconActiveColor:["colors.palette.400","colors.palette.300"],collapseButtonOpenHoverBorderColor:["colors.palette.200","colors.palette.500"],collapseButtonOpenHoverBackgroundColor:["colors.palette.50","colors.palette.900"],collapseButtonOpenHoverIconColor:["colors.palette.400","colors.palette.300"],collapseButtonOpenHoverIconActiveColor:["colors.palette.400","colors.palette.300"],collapseButtonCloseBorderColor:["colors.palette.200","colors.palette.500"],collapseButtonCloseBackgroundColor:["colors.palette.100","colors.palette.700"],collapseButtonCloseIconColor:["colors.palette.400","colors.palette.300"],collapseButtonCloseIconActiveColor:["colors.palette.400","colors.palette.300"],collapseButtonCloseHoverBorderColor:["colors.palette.200","colors.palette.500"],collapseButtonCloseHoverBackgroundColor:["colors.palette.100","colors.palette.700"],collapseButtonCloseHoverIconColor:["colors.palette.400","colors.palette.300"],collapseButtonCloseHoverIconActiveColor:["colors.palette.400","colors.palette.300"],linkColor:["colors.primary.600","colors.primary.100"],linkHoverColor:"tokens.accentColor",inputBorderWidth:"1px",inputBorderRadius:"sizing.size_1",inputHorizontalPadding:"density.inputHorizontal",inputVerticalPadding:"density.inputVertical",inputBorderColor:"tokens.borderColor",inputForegroundColor:"tokens.foregroundColor",inputBackgroundColor:"tokens.backgroundSecondaryColor",inputHoverBorderColor:"tokens.borderColor",inputHoverForegroundColor:"tokens.foregroundColor",inputHoverBackgroundColor:"tokens.backgroundColor",inputDisabledBorderColor:"tokens.borderColor",inputDisabledForegroundColor:"tokens.disabledColor",inputDisabledBackgroundColor:["colors.palette.200","colors.palette.500"],inputFocusBorderColor:"tokens.accentColor",inputFocusForegroundColor:"tokens.foregroundColor",inputFocusBackgroundColor:"tokens.backgroundColor",checkboxSize:"tokens.iconSize",checkboxBorderRadius:"sizing.size_1",checkboxBorderColor:["colors.palette.200","colors.palette.500"],checkboxBackgroundColor:"tokens.backgroundColor",checkboxIconColor:"colors.transparent",checkboxFocusBorderColor:["colors.palette.200","colors.palette.500"],checkboxFocusBackgroundColor:"tokens.backgroundColor",checkboxFocusIconColor:"colors.transparent",checkboxFocusRingColor:"tokens.accentColor",checkboxDisabledBorderColor:["colors.palette.200","colors.palette.500"],checkboxDisabledBackgroundColor:["colors.palette.100","colors.palette.700"],checkboxDisabledIconColor:"colors.transparent",checkboxCheckedBorderColor:["colors.primary.400","colors.primary.200"],checkboxCheckedBackgroundColor:"tokens.accentColor",checkboxCheckedIconColor:"colors.white",checkboxCheckedFocusBorderColor:"tokens.backgroundColor",checkboxCheckedFocusBackgroundColor:"tokens.accentColor",checkboxCheckedFocusIconColor:"colors.white",checkboxCheckedDisabledBorderColor:["colors.palette.200","colors.palette.500"],checkboxCheckedDisabledBackgroundColor:["colors.palette.100","colors.palette.700"],checkboxCheckedDisabledIconColor:"tokens.disabledColor",checkboxIndeterminateBorderColor:["colors.primary.400","colors.primary.200"],checkboxIndeterminateBackgroundColor:"tokens.accentColor",checkboxIndeterminateIconColor:"colors.white",checkboxIndeterminateFocusBorderColor:"tokens.backgroundColor",checkboxIndeterminateFocusBackgroundColor:"tokens.accentColor",checkboxIndeterminateFocusIconColor:"colors.white",checkboxIndeterminateDisabledBorderColor:["colors.palette.200","colors.palette.600"],checkboxIndeterminateDisabledBackgroundColor:["colors.palette.200","colors.palette.500"],checkboxIndeterminateDisabledIconColor:"tokens.disabledColor",radioSize:"tokens.iconSize",radioBorderColor:["colors.palette.200","colors.palette.500"],radioBackgroundColor:"tokens.backgroundColor",radioIconColor:"colors.transparent",radioFocusBorderColor:"tokens.borderColor",radioFocusBackgroundColor:"tokens.backgroundColor",radioFocusIconColor:"colors.transparent",radioFocusRingColor:"tokens.accentColor",radioDisabledBorderColor:["colors.palette.200","colors.palette.500"],radioDisabledBackgroundColor:["colors.palette.100","colors.palette.700"],radioDisabledIconColor:"colors.transparent",radioCheckedBorderColor:"tokens.accentColor",radioCheckedBackgroundColor:"tokens.backgroundColor",radioCheckedIconColor:"tokens.accentColor",radioCheckedFocusBorderColor:["colors.primary.400","colors.primary.200"],radioCheckedFocusBackgroundColor:"tokens.backgroundColor",radioCheckedFocusIconColor:["colors.primary.400","colors.primary.200"],radioCheckedDisabledBorderColor:["colors.palette.200","colors.palette.500"],radioCheckedDisabledBackgroundColor:["colors.palette.100","colors.palette.700"],radioCheckedDisabledIconColor:"tokens.disabledColor",moveBacklightColor:["colors.palette.800","colors.palette.200"],moveBacklightOpacity:"8%",moveIndicatorColor:"tokens.accentColor",resizeIndicatorColor:["colors.palette.300","colors.palette.400"],freezeBarColor:["colors.palette.200","colors.palette.500"],freezeBarHoverColor:["colors.palette.300","colors.palette.400"],freezeBarHighlightColor:"tokens.accentColor",asyncIndicatorColor:"tokens.accentColor",asyncErrorBackgroundColor:"tokens.cellErrorBackgroundColor",asyncErrorMarkerColor:"tokens.notificationErrorAccent",hiddenIndicatorColor:["colors.palette.300","colors.palette.400"],menuBorderWidth:"1px",menuBorderRadius:"sizing.size_1",menuHorizontalPadding:"density.menuHorizontal",menuVerticalPadding:"density.menuVertical",menuItemHorizontalPadding:"density.menuItemHorizontal",menuItemVerticalPadding:"density.menuItemVertical",menuBorderColor:"tokens.borderColor",menuShadowX:"tokens.shadowX",menuShadowY:"tokens.shadowY",menuShadowBlur:"tokens.shadowBlur",menuShadowColor:["colors.palette.950","colors.white"],menuShadowOpacity:"8%",menuItemHoverColor:["colors.palette.800","colors.palette.200"],menuItemHoverColorOpacity:"4%",menuItemActiveColor:"tokens.accentColor",menuItemActiveColorOpacity:"8%",commentsTextareaHorizontalPadding:"density.cellHorizontal",commentsTextareaVerticalPadding:"density.cellVertical",commentsTextareaBorderWidth:"1px",commentsTextareaBorderColor:"colors.transparent",commentsTextareaForegroundColor:"tokens.foregroundColor",commentsTextareaBackgroundColor:"tokens.backgroundSecondaryColor",commentsTextareaFocusBorderWidth:"1px",commentsTextareaFocusBorderColor:"tokens.accentColor",commentsTextareaFocusForegroundColor:"tokens.foregroundColor",commentsTextareaFocusBackgroundColor:"tokens.backgroundColor",commentsIndicatorSize:"sizing.size_1_5",commentsIndicatorColor:"tokens.accentColor",licenseHorizontalPadding:"tokens.barHorizontalPadding",licenseVerticalPadding:"tokens.barVerticalPadding",licenseForegroundColor:"tokens.barForegroundColor",licenseBackgroundColor:"tokens.barBackgroundColor",paginationBarForegroundColor:"tokens.barForegroundColor",paginationBarBackgroundColor:"tokens.barBackgroundColor",paginationBarHorizontalPadding:"tokens.barHorizontalPadding",paginationBarVerticalPadding:"tokens.barVerticalPadding",paginationButtonBorderColor:"tokens.paginationBarBackgroundColor",paginationButtonForegroundColor:"tokens.foregroundSecondaryColor",paginationButtonBackgroundColor:"tokens.paginationBarBackgroundColor",paginationButtonHoverBorderColor:["colors.palette.100","colors.palette.700"],paginationButtonHoverForegroundColor:"tokens.foregroundColor",paginationButtonHoverBackgroundColor:["colors.palette.100","colors.palette.700"],paginationButtonDisabledBorderColor:"tokens.paginationBarBackgroundColor",paginationButtonDisabledForegroundColor:"tokens.disabledColor",paginationButtonDisabledBackgroundColor:"tokens.paginationBarBackgroundColor",paginationButtonFocusBorderColor:"tokens.accentColor",paginationButtonFocusForegroundColor:"tokens.foregroundColor",paginationButtonFocusBackgroundColor:"tokens.paginationBarBackgroundColor",sheetsBarHorizontalPadding:"sizing.size_2",sheetsBarBackgroundColor:"tokens.barBackgroundColor",sheetsBarTabHorizontalPadding:"sizing.size_3",sheetsBarTabVerticalPadding:"sizing.size_2",sheetsBarTabForegroundColor:"tokens.foregroundSecondaryColor",sheetsBarTabBackgroundColor:"tokens.barBackgroundColor",sheetsBarTabHoverForegroundColor:["colors.palette.950","colors.white"],sheetsBarTabActiveForegroundColor:["colors.palette.950","colors.white"],sheetsBarTabActiveBackgroundColor:["colors.palette.100","colors.palette.700"],sheetsBarTabActiveBorderWidth:"1px",sheetsBarTabActiveBorderColor:"tokens.cellSelectionBorderColor",dialogSemiTransparentBackgroundColor:["colors.white","colors.palette.950"],dialogSemiTransparentBackgroundOpacity:"80%",dialogSolidBackgroundColor:["colors.white","colors.palette.950"],dialogContentPaddingHorizontal:"density.dialogHorizontal",dialogContentPaddingVertical:"density.dialogVertical",dialogContentBorderRadius:"sizing.size_2",dialogContentBackgroundColor:"tokens.backgroundSecondaryColor",notificationForegroundColor:"tokens.foregroundColor",notificationBackgroundColor:"tokens.backgroundColor",notificationBorderColor:"tokens.backgroundColor",notificationSuccessAccent:"#37bc6cff",notificationWarningAccent:"#fbe952ff",notificationErrorAccent:"#fa4d32ff",chipBackground:"tokens.backgroundSecondaryColor",chipBorderRadius:"sizing.size_0_5",chipVerticalPadding:"sizing.size_0",chipHorizontalPadding:"sizing.size_0_5",chipGap:"sizing.size_1",scrollbarBorderRadius:"sizing.size_2",scrollbarTrackColor:"tokens.backgroundSecondaryColor",scrollbarThumbColor:["colors.palette.300","colors.palette.400"]}},wT=/^(\d+(?:\.\d+)?)(?:\s*px)?$/i,wx=RegExp("^\\d+(?:\\.\\d+)?(?:%|px|em|rem|ex|ch|cap|ic|lh|rlh|[sld]?v(?:w|h|min|max|i|b)|cq(?:w|h|i|b|min|max)|cm|mm|q|in|pt|pc)$","i"),wA=/^(?:calc|min|max|clamp|var|env)\(/i,wM=/%|\d[sld]?v(?:w|h|min|max|i|b)\b|\dcq(?:w|h|i|b|min|max)\b|\bvar\(|\benv\(/i,wI=new Set(["fit-content","min-content","max-content","inherit","initial","unset","revert","revert-layer","stretch","-webkit-fill-available","-moz-available","none","normal"]);function wN(){return{kind:"invalid",cssValue:null}}function wO(e){return{kind:"css",cssValue:e}}function wk(e,t){if("number"==typeof e)return Number.isFinite(e)&&e>=0?{kind:"px",cssValue:`${e}px`}:wN();if("string"!=typeof e)return wN();let r=e.trim();return""===r?wN():function(e,t){let r=e.toLowerCase();if("auto"===r)return{kind:"auto",cssValue:"auto"};let i=wT.exec(e);return null!==i?{kind:"px",cssValue:`${i[1]}px`}:wI.has(r)||r.startsWith("fit-content(")?wN():wx.test(e)?wO(e):wA.test(e)?void 0===t||t(e)?wO(e):wN():void 0!==t&&t(e)?wO(e):wN()}(r,t)}function wH(e){return""===e?"unset":"auto"===e?"auto":wM.test(e)?"container-driven":"definite"}function w_(e){return""===e||"clip"===e}function wP(e,t){return e[t]||e.overflow}function wD(e){return"unset"===e||"auto"===e}function wL(e){let t=e.style.height;return{heightInline:t,height:wH(t)}}function wF(e,t,r,i){if(void 0===r)return"untouched";let n=i3(r)?r():r;if(null===(n=e.runHooks(i,n)))return!function(e,t){let r=function(e){let t=e.ownerDocument.createElement("div");t.style.cssText=e.dataset.initialstyle??"";let{height:r,width:i,overflow:n,overflowX:o,overflowY:s}=t.style;return{height:r,width:i,overflowX:o||n,overflowY:s||n}}(e),{style:i}=e;i[t]=r[t],"height"===t&&(w_(wP(i,"overflowY"))&&(i.overflowY=r.overflowY),w_(wP(i,"overflowX"))&&(i.overflowX=r.overflowX))}(e.rootElement,t),"reset";if(void 0===n)return"untouched";let o=wk(n,function(e,t){let r=e.CSS;if(void 0!==r&&"function"==typeof r.supports)return e=>{try{return r.supports(t,e)}catch{return!1}}}(e.rootWindow,t));if("invalid"===o.kind){var s;let r;return s=e.rootElement,r=h2(n),rs(s,`invalid-root-size-${t}-${r}`,`Handsontable: the \`${t}\` option expects a number of pixels, such as \`500\`, \`'500'\`, or \`'500px'\`, a CSS length such as \`'50%'\` or \`${"height"===t?"'75vh'":"'75vw'"}\`, or \`'auto'\`. The value ${r} cannot be read as a size, so it is ignored and the grid's ${t} is left as it was.`),"ignored"}return"px"===o.kind&&"height"===t?e.rootElement.style.height=function(e,t){if(!sC(e))return t;let r=[e.rootSlotTopElement,e.rootSlotBottomElement].reduce((e,t)=>e+(t?.offsetHeight??0),0);return 0===r?t:`calc(${t} - ${r}px)`}(e,o.cssValue??""):e.rootElement.style[t]=o.cssValue??"","written"}function wB(e,t,r){var i,n;let o,s,{rootElement:l}=e;if(r){let e=l.getAttribute("style");e&&(l.dataset.initialstyle=e)}let a=wL(l),h=wF(e,"height",t.height,"beforeHeightChange"),d=wF(e,"width",t.width,"beforeWidthChange"),u=[],c=sC(e)&&Object.prototype.hasOwnProperty.call(t,"preventOverflow");return(void 0!==t.height||void 0!==t.width||c)&&function(e,t,r,i){let{style:n}=e,o=wH(n.height),s=wH(n.width);if(!wD(o)){(!t||r)&&w_(wP(n,"overflowX"))&&(n.overflowX="clip"),!t&&w_(wP(n,"overflowY"))&&(n.overflowY="clip");return}w_(wP(n,"overflowY"))&&(n.overflowY=""),w_(wP(n,"overflowX"))&&(n.overflowX="definite"===s||i?"clip":"")}(l,"reset"===h,"written"===d,sC(e)&&"horizontal"===e.getSettings().preventOverflow),"ignored"===h&&u.push("height"),"ignored"===d&&u.push("width"),{scrollOwnerChanged:(i=wL(l),n=void 0!==t.height,o=wD(a.height),s=wD(i.height),!n||o!==s||(o||s)&&a.heightInline!==i.heightInline),ignoredAxes:u}}function wV(e,t){let r=i3(t)?t():t;"px"===wk(r).kind&&wB(e,{height:r},!1)}let wz=Object.freeze({resume:e=>e(),release:()=>{}});class wU{#hA=[];#hM=1;#hI=0;#hN=!1;#hO=new Set;#hk=new Set;#hH=new WeakSet;#h_=new WeakSet;#hP=new WeakMap;#hD=1;#hL=Object.freeze({resume:e=>this.suppress(e),release:()=>{}});current(){return this.#hI>0?null:this.#hA[this.#hA.length-1]??null}isActive(){return null!==this.current()}isSuppressed(){return this.#hI>0}setJournaling(e){this.#hN=e}getRecordingTransaction(){return this.#hN?this.current():null}record(e){let t=this.getRecordingTransaction();null!==t&&this.append(t,e)}append(e,t){e.journal.push(t),this.#hP.set(t,this.#hD),this.#hD+=1}getEntryOrder(e){return this.#hP.get(e)??0}isLatestEntry(e){return this.#hP.get(e)===this.#hD-1}describe(e){let t=this.current();null!==t&&1===t.depth&&Object.assign(t.details,e)}run(e,t,r){this.enter(e,t);let i=!0;try{let e=r();return i=!1,e}finally{this.leave(i)}}enter(e,t){if(this.#hI>0)return;let r=this.#hA[this.#hA.length-1];if(r){r.depth+=1,r.operations.push(e),r.sources.push(t);return}let i={id:this.#hM,name:e,source:t,operations:[e],sources:[t],journal:[],details:{},depth:1,holds:0,aborted:!1};this.#hM+=1,this.#hA.push(i);try{this.#hO.forEach(e=>e(i))}catch(e){throw this.#hA.splice(this.#hA.lastIndexOf(i),1),e}}leave(e=!1){if(this.#hI>0)return;let t=this.#hA[this.#hA.length-1];!t||(e&&(t.aborted=!0),t.depth-=1,t.depth>0||(this.#hA.pop(),this.#hF(t)))}hold(){if(this.#hI>0)return this.#hL;let e=this.current();if(null===e)return wz;e.holds+=1;let t=!1;return{resume:r=>t||this.#hI>0?r():this.#hH.has(e)?this.run(e.name,e.source,r):this.#hB(e,r),release:()=>{t||(t=!0,e.holds-=1,this.#hF(e))}}}suppress(e){this.#hI+=1;try{return e()}finally{this.#hI-=1}}addOpenListener(e){this.#hO.add(e)}removeOpenListener(e){this.#hO.delete(e)}addSettleListener(e){this.#hk.add(e)}removeSettleListener(e){this.#hk.delete(e)}destroy(){this.#hA.length=0,this.#hO.clear(),this.#hk.clear(),this.#hN=!1}#hB(e,t){let r=this.#hA.includes(e);r||this.#hA.push(e),e.depth+=1;let i=!0;try{let e=t();return i=!1,e}finally{if(i&&(e.aborted=!0,this.#h_.add(e)),e.depth-=1,!r){let t=this.#hA.lastIndexOf(e);-1!==t&&this.#hA.splice(t,1)}this.#hF(e)}}#hF(e){0===e.depth&&(0===e.holds||this.#h_.has(e))&&this.#hV(e)}#hV(e){this.#hH.has(e)||(this.#hH.add(e),this.#hk.forEach(t=>t(e)))}}class wW{#hz=new Map;require(e,t){let r=this.#hz.get(e);r||(r=new Set,this.#hz.set(e,r)),r.add(t)}release(e,t){let r=this.#hz.get(e);r&&(r.delete(t),0===r.size&&this.#hz.delete(e))}isRequired(e){return this.#hz.has(e)}}let w$="rowId",wG=["afterChange","afterSetSourceDataAtCell","afterCreateRow","afterRemoveRow","afterLoadData","afterUpdateData"];function wj(e,t){let r=[];return e.forEach(e=>{let i=t(e);null!==i&&r.push(i)}),r}function wY(e){return"string"==typeof e||"function"==typeof e}class wK extends dx{#hU;constructor(e,t){super(e),this.#hU=t}init(e){return e>0&&e===this.getLength()&&!this.#hU()?(this.runLocalHooks("init"),this):super.init(e)}}class wq{#ey;#hW;#h$=null;#hG=1;#hj=null;#hY=!0;#hU=!1;#hK=!1;#hq=void 0;#hX=null;#hQ=void 0;constructor(e,t){this.#ey=e,this.#hW=t,e.addHook("beforeInit",this.#as),e.addHook("afterUpdateSettings",this.#as),e.addHook("beforeLoadData",this.#hZ),e.addHook("afterLoadData",this.#hJ),e.addHook("beforeUpdateData",this.#h0),e.addHook("beforeRemoveRow",this.#h1,Number.MAX_SAFE_INTEGER),e.addHook("afterRowsMutation",this.#h2)}getRowIdAtPhysicalRow(e){if(!Number.isInteger(e)||e<0)return null;if(this.#h$)return this.#h$.getValueAtIndex(e)??null;let t=this.#h3();return!wY(t)||e>=this.#ey.rowIndexMapper.getNumberOfIndexes()?null:this.#h6(e,t)}getKeyedRowIdAtPhysicalRow(e){if(this.#h$)return null;try{return this.getRowIdAtPhysicalRow(e)}catch{return null}}getRowIdsAtPhysicalRows(e){let t=this.#h5(),r=this.#ey.rowIndexMapper.getNumberOfIndexes();return e.map(e=>null===t||null===e||!Number.isInteger(e)||e<0||e>=r?null:t(e))}getPhysicalRowById(e){if(null==e)return null;let t=this.#hj?.get(e);return void 0!==t&&this.getRowIdAtPhysicalRow(t)===e?t:void 0!==t||this.#hY?(this.#hj=this.#h4(),this.#hY=!1,this.#hj.get(e)??null):null}#h3(){let e=this.#ey.getSettings(),t=e.dataProvider?.rowId;if(wY(t)){let r=e.rowId;return null!=r&&!1!==r&&r!==t&&rs(this,"rowId.dataProvider","The `rowId` option is ignored, because `dataProvider.rowId` is set. Handsontable reads row ids with `dataProvider.rowId`."),t}return e.rowId}#h6(e,t){return function(e,t){if("object"==typeof e&&null!==e){if("function"==typeof t)return t(e);if("string"==typeof t){if(tP(e,t))return Reflect.get(e,t);let r=e;for(let e of t.split(".")){if("object"!=typeof r||null===r)return;r=Reflect.get(r,e)}return r}}}(this.#hW(e),t)??null}#h5(){let e=this.#h$;if(e)return t=>e.getValueAtIndex(t)??null;let t=this.#h3();return wY(t)?e=>this.#h6(e,t):null}#h4(){let e=new Map,t=this.#ey.rowIndexMapper.getNumberOfIndexes(),r=this.#h5();if(!r)return e;for(let i=0;i<t;i+=1){let t=r(i);null!==t&&(e.has(t)?rs(this,"rowId.duplicate",`Two rows have the same id (${String(t)}). Row ids must be unique: the lookups return the row with the lower physical index.`):e.set(t,i))}return e}#as=()=>{let e=this.#h3(),t=!0===e,r=this.#ey.rowIndexMapper,i=this.#hq;this.#hq=e,this.#h8(wY(e)),t&&this.#ey.getSettings().nestedRows&&rs(this,"rowId.nestedRows","Generated row ids (`rowId: true`) do not follow the rows that the `nestedRows` plugin moves or detaches. Store the ids in the data and set `rowId` to their property."),t&&!this.#h$?(this.#h$=r.registerMap(w$,new wK(this.#h9,()=>this.#hU)),this.#h$.addLocalHook("change",this.#h7)):!t&&this.#h$&&(r.unregisterMap(w$),this.#h$=null),this.#h7(),e!==i&&(!0===i||wY(i))&&this.#ey.runHooks("afterRowIdsReset")};#h1=(e,t,r,i)=>{!1!==e&&this.#de(i)};#h0=(e,t,r)=>{t||!0===this.#ey.runHooks("hasExternalDataSource")||this.#de(r)};#h2=(e,t)=>{if("remove"!==e||!this.#ey.hasHook("afterRowIdsRemoved")||null===t||"object"!=typeof t||!("rowsRemove"in t)||!Array.isArray(t.rowsRemove))return;let r=t.rowsRemove.filter(e=>null!=e);r.length>0&&this.#ey.runHooks("afterRowIdsRemoved",r,"dataProvider")};#de(e){if(null!==this.#hX||!this.#ey.hasHook("afterRowIdsRemoved"))return;let t=this.#h5();t&&(this.#hX=new Set(wj(this.#dt(),t)),this.#hQ=e,this.#ey._registerMicrotask(this.#dr))}#dr=()=>{let e=this.#hX,t=this.#hQ;if(this.#hX=null,this.#hQ=void 0,!e||this.#ey.isDestroyed)return;let r=this.#h5(),i=new Set(r?wj(this.#dt(),r):[]),n=[...e].filter(e=>!i.has(e));n.length>0&&this.#ey.runHooks("afterRowIdsRemoved",n,t)};#dt(){return Array.from({length:this.#ey.rowIndexMapper.getNumberOfIndexes()},(e,t)=>t)}#h8(e){e!==this.#hK&&(wG.forEach(t=>{e?this.#ey.addHook(t,this.#h7,Number.MIN_SAFE_INTEGER):this.#ey.removeHook(t,this.#h7)}),this.#hK=e)}#h9=()=>{let e=this.#hG;return this.#hG+=1,e};#hZ=(e,t,r)=>{this.#h0(e,t,r),this.#h$&&(this.#hU=!0,this.#ey._registerMicrotask(this.#hJ))};#hJ=()=>{this.#hU=!1};#h7=()=>{this.#hY=!0}}function wX(e){return"string"==typeof e&&e.endsWith("Validator")}let wQ=new WeakMap,wZ=0;function wJ(e){let t=new Map,r=new Map,i=null,n=!1,o=0,s=()=>{n&&(n=!1,r.clear(),t.forEach((e,t)=>{null!==t.physicalRow&&r.set(t.physicalRow,t)}))},l=(e,r="start")=>{if(0===e.length)return;let o=i.getNumberOfIndexes()-e.length,s="end"===r?Math.min(e[0]+1,o):e[0],l=e.length;t.forEach((e,t)=>{null!==t.physicalRow&&t.physicalRow>=s&&(t.physicalRow+=l,n=!0)})},a=e=>{if(0===e.length)return;let r=e.slice().sort((e,t)=>e-t);t.forEach((e,t)=>{if(null===t.physicalRow)return;let i=function(e,t){let r=0,i=e.length;for(;r<i;){let n=Math.floor((r+i)/2);e[n]<t?r=n+1:i=n}return r}(r,t.physicalRow),o=r[i]===t.physicalRow;(o||i>0)&&(t.physicalRow=o?null:t.physicalRow-i,n=!0)})},h=e=>{let r=new Map,i=!1;return t.forEach((t,i)=>{let n=e.get(i)??i.physicalRow;null!==n&&r.set(n,[...r.get(n)??[],i])}),r.forEach(t=>{t.length>1&&t.forEach(t=>{i=e.delete(t)||i})}),i},d=()=>{t.size>0&&null===i?((i=e()).addLocalHook("indexesInserted",l),i.addLocalHook("indexesRemoved",a)):0===t.size&&null!==i&&(i.removeLocalHook("indexesInserted",l),i.removeLocalHook("indexesRemoved",a),i=null,r.clear(),n=!1)};return{track(e){s();let i=r.get(e);return void 0===i&&(o+=1,i={id:o,physicalRow:e},r.set(e,i)),t.set(i,(t.get(i)??0)+1),d(),i},find:e=>(s(),r.get(e)),release(e){let i=t.get(e);if(void 0!==i){if(i>1)return void t.set(e,i-1);t.delete(e),n||null===e.physicalRow||r.get(e.physicalRow)!==e||r.delete(e.physicalRow),d()}},relocate(e){let r=new Map;e.forEach((e,i)=>{t.has(i)&&i.physicalRow!==e&&r.set(i,e)});let i=r.size>0;for(;i;)i=h(r);return r.forEach((e,t)=>{t.physicalRow=e,n=!0}),new Set(r.keys())},get size(){return t.size}}}function w0(e,t,r){return{record:e.track(r),rowObject:t.readRowObject(r),rowId:t.readKeyedRowId(r),meta:null,metaColumn:-1}}function w1(e){let t=null;return r=>{if(null===t){t=new Map;let r=e.countPhysicalRows();for(let i=0;i<r;i++){let r=e.readRowObject(i);w2(r)&&t.set(r,t.has(r)?null:i)}}return t.get(r)}}function w2(e){return"object"==typeof e&&null!==e}function w3(e,t,r=function(e){return t=>{let r,i=e.countPhysicalRows();for(let n=0;n<i;n++)if(e.readRowObject(n)===t){if(void 0!==r)return null;r=n}return r}}(e)){let i,{physicalRow:n}=t.record,o=null!==n&&n<e.countPhysicalRows()?n:null;if(null!==o&&w2(t.rowObject)&&e.readRowObject(o)===t.rowObject)return o;if(null!==t.rowId&&void 0!==t.rowId){if(null!==o&&e.readKeyedRowId(o)===t.rowId)return o;let i=e.findPhysicalRowById(t.rowId);return null!==i?i:w2(t.rowObject)?r(t.rowObject)??null:null}return void 0!==(i=w2(t.rowObject)?r(t.rowObject):void 0)?i:null!==o&&null!==t.meta&&e.getStoredMeta(o,t.metaColumn)===t.meta?o:null}function w6(e,t){Reflect.set(e,0,t)}let w5=null;function w4(e){if(0===e.length)return[];let t=[...e];return t.sort(([e],[t])=>e===t?0:e>t?1:-1),er(t,(e,[t,r])=>{let i=e[e.length-1],[n,o]=i,s=n+o;if(t<=s){let e=Math.max(r-(s-t),0);i[1]+=e}else e.push([t,r]);return e},[t[0]])}let w8=new Map,w9=Object.freeze({insert_row_above:"insert_row",insert_row_below:"insert_row",insert_col_start:"insert_col",insert_col_end:"insert_col",remove_row:"remove_row",remove_col:"remove_col"}),w7=[{name:"persistentState",version:"17.0.0",migrationUrl:"https://handsontable.com/docs/javascript-data-grid/changelog-17/"},{name:"correctFormat",version:"18.0.0",migrationUrl:"https://handsontable.com/docs/javascript-data-grid/migration-from-17.1-to-18.0/"}],ye=new Set(["fixedRowsTop","fixedRowsBottom","fixedColumnsStart","fixedColumnsLeft","fixedColumnsEnd"]),yt="htLineClamp",yr=Object.freeze({mode:"none"}),yi=Object.freeze({mode:"ellipsis"}),yn=new Map;function yo(e){let t=e.textEllipsis;if("number"==typeof t){if(!Number.isInteger(t)||t<1)return yr;if(1===t||!1===e.wordWrap)return yi;let r=yn.get(t);return void 0===r&&(r=Object.freeze({mode:"clamp",lines:t}),yn.set(t,r)),r}return t?yi:yr}function ys(e,t,r,i,n,o,s){let l=s.ariaTags,a=[],h=[],d=[],u=[];s._isBaseRendererCalled=!0,s.className&&rW(t,s.className),s.readOnly?(!1!==s.readOnlyStyling&&a.push(s.readOnlyCellClassName),l&&u.push(j())):l&&d.push(j()[0]),!1===s.valid&&s.invalidCellClassName?(a.push(s.invalidCellClassName),l&&u.push(Y())):(h.push(s.invalidCellClassName),l&&d.push(Y()[0])),!1===s.wordWrap&&s.noWordWrapClassName&&a.push("htNoWrap",s.noWordWrapClassName),ej(o)&&s.placeholder&&a.push(s.placeholderCellClassName),"none"!==yo(s).mode&&a.push("htTextEllipsis"),r$(t,h),rW(t,a),rj(t,d),rG(t,u)}function yl(e,t,r){e.addEventListener(t,r,!1)}function ya(e,t,r){e.removeEventListener(t,r,!1)}function yh(e){return e.ownerDocument.defaultView.getComputedStyle(e)}function yd(e,t={}){let r,i={minHeight:200,maxHeight:300,minWidth:100,maxWidth:300,textContent:e=>e.value,...t},n=e.body,o=e.createTextNode(""),s=e.createElement("span");function l(){o.textContent=i.textContent(r),s.style.position="absolute",s.style.fontSize=yh(r).fontSize,s.style.fontFamily=yh(r).fontFamily,s.style.whiteSpace="pre",n.appendChild(s);let e=Number.parseInt(yh(r)?.paddingInlineStart||"0",10),t=Number.parseInt(yh(r)?.paddingInlineEnd||"0",10),l=s.clientWidth+e+t+1;n.removeChild(s);let a=r.style;a.height=`${i.minHeight}px`,i.minWidth>l?a.width=`${i.minWidth}px`:l>i.maxWidth?a.width=`${i.maxWidth}px`:a.width=`${l}px`;let h=r.scrollHeight?r.scrollHeight-1:0;i.minHeight>h?a.height=`${i.minHeight}px`:i.maxHeight<h?(a.height=`${i.maxHeight}px`,a.overflowY="visible"):a.height=`${h}px`}function a(){e.defaultView.setTimeout(l,0)}function h(e,t){if("inherit"===e)return t;let r=Number.parseInt(String(e),10);if(!isNaN(r))return r}return{init:function(e,t,n=!1){r=e;if(t&&t.minHeight){let e=h(t.minHeight,r.clientHeight);void 0!==e&&(i.minHeight=e)}if(t&&t.maxHeight){let e=h(t.maxHeight,r.clientHeight);void 0!==e&&(i.maxHeight=e)}if(t&&t.minWidth){let e=h(t.minWidth,r.clientWidth);void 0!==e&&(i.minWidth=e)}if(t&&t.maxWidth){let e=h(t.maxWidth,r.clientWidth);void 0!==e&&(i.maxWidth=e)}s.firstChild||(s.className="autoResize",s.style.display="inline-block",s.appendChild(o)),"TEXTAREA"===r.nodeName&&(r.style.resize="none",r.style.height=`${i.minHeight}px`,r.style.minWidth=`${i.minWidth}px`,r.style.maxWidth=`${i.maxWidth}px`,r.style.overflowY="hidden"),n&&(yl(r,"input",l),yl(r,"keydown",a)),l()},resize:l,unObserve(){ya(r,"input",l),ya(r,"keydown",a)}}}function yu(e,t){let r=iT(t),i=t.value.split("\n"),n=r,o=0;for(let t=0;t<i.length;t++){let s=i[t];0!==t&&(o+=i[t-1].length+1);let l=o+s.length;if("home"===e?n=o:"end"===e&&(n=l),r<=l)break}iI(t,n,n)}ys.RENDERER_TYPE="base";let yc="ht_editor_hidden",yg="textEditor";class yp extends n0{static get EDITOR_TYPE(){return"text"}eventManager=new n2(this);autoResize=yd(this.hot.rootDocument);#di=!1;#dn=null;#ds=()=>{let{maxLength:e}=this.cellProperties;return this.capsLength&&sN(e)?e:null};#dl=e=>om(this.cellProperties.trimWhitespace?e.trim():e);#da=e=>{let{isComposing:t=!1}=e??{};if(t||null===this.#ds())return;let{value:r,selectionStart:i,selectionEnd:n}=this.TEXTAREA,o=i??r.length;this.#dn={length:this.#dl(r),selectedLength:om(r.slice(o,n??o))}};#dh=e=>{let{isComposing:t=!1,inputType:r=""}=e,i=this.#ds();if(null===i||t)return;let n=this.#dn;if(this.#dn=null,null===n||/^(delete|history|insertFromDrop)/.test(r))return;let{value:o,selectionEnd:s}=this.TEXTAREA,l=this.#dl(o),a=l-i;if(a<=0)return;let h=l-(n.length-n.selectedLength),d=s??o.length,u=this.cellProperties.trimWhitespace?Math.min(d,o.trimEnd().length):d,c=of(o,u,Math.min(a,h));c.value!==o&&(this.TEXTAREA.value=c.value,iI(this.TEXTAREA,c.index,c.index))};constructor(e){super(e),this.eventManager=new n2(this),this.createElements(),this.bindEvents(),this.hot.addHookOnce("afterDestroy",()=>this.destroy())}getValue(){return this.TEXTAREA.value}setValue(e){this.TEXTAREA.value=eW(e)}get capsLength(){return!0}open(e){this._opened=!0,this.#di=!1,this.#dn=null,this.refreshDimensions(),this.showEditableElement(),this.hot.getShortcutManager().setActiveContextName("editor"),this.registerShortcuts()}close(){this._opened=!1,this.#di=!1,this.#dn=null,this.autoResize.unObserve(),rx(iQ(this.hot.rootDocument),this.hot.rootElement)&&this.hot.listen(),this.hideEditableElement(),this.unregisterShortcuts()}prepare(e,t,r,i,n,o){let s=this.state;if(super.prepare(e,t,r,i,n,o),!o.readOnly){this.refreshDimensions(!0);let{allowInvalid:e}=o;e&&!this.isOpened()&&(this.TEXTAREA.value=""),s===nJ.FINISHED||this.isOpened()||this.hideEditableElement()}}beginEditing(e,t){this.state===nJ.VIRGIN&&(this.TEXTAREA.value="",super.beginEditing(e,t))}focus(){this.TEXTAREA.select(),iI(this.TEXTAREA,this.TEXTAREA.value.length,this.TEXTAREA.value.length)}createElements(e="textarea"){let{rootDocument:t}=this.hot;this.TEXTAREA=t.createElement(e),rG(this.TEXTAREA,[["data-hot-input",""],v(-1)]),rW(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"),rW(this.TEXTAREA_PARENT,"handsontableInputHolder"),rU(this.TEXTAREA_PARENT,this.layerClass)&&r$(this.TEXTAREA_PARENT,this.layerClass),rW(this.TEXTAREA_PARENT,yc),this.textareaParentStyle=this.TEXTAREA_PARENT.style,this.TEXTAREA_PARENT.appendChild(this.TEXTAREA),this.hot.rootElement.appendChild(this.TEXTAREA_PARENT)}hideEditableElement(){t6()&&(this.textareaStyle.textIndent="-99999px"),this.textareaStyle.overflowY="visible",this.textareaParentStyle.opacity="0",this.textareaParentStyle.height="1px",r$(this.TEXTAREA_PARENT,this.layerClass),rW(this.TEXTAREA_PARENT,yc)}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="";let e=this.TEXTAREA_PARENT.childNodes,t=!1;oD(e.length-1,r=>{if(rU(e[r],"handsontableEditor"))return t=!0,!1}),rU(this.TEXTAREA_PARENT,yc)&&r$(this.TEXTAREA_PARENT,yc),t?this.layerClass="ht_editor_visible":this.layerClass=this.getEditedCellsLayerClass(),rW(this.TEXTAREA_PARENT,this.layerClass)}refreshValue(){let e=this.hot.toPhysicalRow(this.row),t=this.hot.getSourceDataAtCell(e,this.col);this.originalValue=t,this.setValue(t),this.resetValueBeforeEdit(),this.refreshDimensions()}hideForScroll(){return this.close(),!1}showAfterScroll(){}refreshDimensions(e=!1){if(this.state!==nJ.EDITING&&!e)return;if(this.TD=this.getEditedCell(),!this.TD){e||(this.#di=this.hideForScroll());return}let t=this.getEditedCellRect();if(!t)return;let{top:r,start:i,width:n,maxWidth:o,height:s,maxHeight:l}=t;this.textareaParentStyle.top=`${r}px`,this.textareaParentStyle[this.hot.isRtl()?"right":"left"]=`${i}px`,this.showEditableElement();let 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(n,o),minHeight:Math.min(s,l),maxWidth:o,maxHeight:l},!0),!e&&this.#di&&(this.#di=!1,this._opened=!0,this.showAfterScroll())}bindEvents(){t8()&&this.eventManager.addEventListener(this.TEXTAREA,"focusout",()=>this.finishEditing(!1)),this.eventManager.addEventListener(this.TEXTAREA,"beforeinput",this.#da),this.eventManager.addEventListener(this.TEXTAREA,"compositionstart",this.#da),this.eventManager.addEventListener(this.TEXTAREA,"input",this.#dh),this.eventManager.addEventListener(this.TEXTAREA,"compositionend",this.#dh),this.addHook("afterScrollHorizontally",()=>this.refreshDimensions()),this.addHook("afterScrollVertically",()=>this.refreshDimensions()),this.addHook("afterColumnResize",()=>{this.refreshDimensions(),this.state===nJ.EDITING&&this.focus()}),this.addHook("afterRowResize",()=>{this.refreshDimensions(),this.state===nJ.EDITING&&this.focus()})}destroy(){this.eventManager.destroy(),this.clearHooks()}registerShortcuts(){let e=this.hot.getShortcutManager().getContext("editor"),t=()=>{this.#da(),this.hot.rootDocument.execCommand("insertText",!1,"\n")},r=()=>nK(this.hot,this.getValue(),this.row,this.col);e.addShortcuts([{keys:[["Control","Enter"]],callback:()=>(t(),!1),runOnlyIf:e=>!r()&&!e?.altKey},{keys:[["Meta","Enter"]],callback:()=>(t(),!1),runOnlyIf:()=>!r()},{keys:[["Alt","Enter"]],callback:()=>(t(),!1)},{keys:[["Home"]],callback:(e,t)=>{yu(t?.[0]??"",this.TEXTAREA)}},{keys:[["End"]],callback:(e,t)=>{yu(t?.[0]??"",this.TEXTAREA)}}],{runOnlyIf:()=>e$(this.hot.getSelected()),group:yg})}unregisterShortcuts(){this.hot.getShortcutManager().getContext("editor").removeShortcutsByGroup(yg)}}function ym(e){for(let t=e.firstChild;t;t=t.nextSibling)if(t.nodeType===Node.ELEMENT_NODE&&iG(t)){if(rU(t,yt))return t;let e="a"===t.localName&&rU(t,mP)?function(e){for(let t=e.firstChild;t;t=t.nextSibling)if(t.nodeType===Node.ELEMENT_NODE&&iG(t)&&rU(t,yt))return t;return null}(t):null;if(e)return e}return null}function yf(e,t,r,i,n,o,s){let l=o;ej(l)&&s.placeholder&&(l=s.placeholder);let a=eW(l),h=a;s.trimWhitespace&&(h=a.trim());let d=yo(s);"clamp"===d.mode?function(e,t,r){let i=ym(e);if(i){let e=i.parentNode;for(;i.previousSibling;)e.removeChild(i.previousSibling);for(;i.nextSibling;)e.removeChild(i.nextSibling)}else rK(e),rW(i=e.ownerDocument.createElement("div"),yt),e.appendChild(i);rW(e,"htTextLineClamp"),i.style.setProperty("--ht-text-line-clamp",String(r)),r0(i,t)}(t,h,d.lines):(ym(t)&&rK(t),r0(t,h))}yf.RENDERER_TYPE="text";let yw={CELL_TYPE:"text",editor:yp,renderer:yf},yy=function(e,t,r=!1){var i,n,o,s,l,a;let h,d,u,c,g,p,m,f,w,y,b,C,S,v,R,E,T,x,A,M,I=this,N=new n2(I),O=(d=new Map,u=0,function(){let e=u+=1,t=new Set,r=new Map;return{register(e,i,n,o){if(r.set(e,{key:i,cellMeta:n,structureVersion:o}),t.has(i))return;t.add(i);let s=d.get(i);s?s.inflight+=1:d.set(i,{applied:0,inflight:1})},answered(e,t){let i=r.get(e);i&&(i.valid=t)},claim(t,i){for(let n=t.length-1;n>=0;n--){let o=r.get(t[n]),s=void 0===o?void 0:d.get(o.key);if(!o||!s)continue;let l=s.applied>e,a=l?s.valid:o.valid;l&&t.splice(n,1),"boolean"==typeof a&&i(o.cellMeta,a,o.structureVersion)}},settle(t){t.forEach(t=>{let i=r.get(t),n=void 0===i?void 0:d.get(i.key);i&&n&&n.applied<e&&(n.applied=e,n.valid=i.valid??n.valid)})},release(){t.forEach(e=>{let t=d.get(e);t&&(t.inflight-=1,t.inflight<=0&&d.delete(e))}),t.clear()}}}),k=wJ(()=>I.rowIndexMapper),H={tracker:(c=wJ(()=>I.columnIndexMapper),g=new WeakMap,{track(e){let t=c.track(e),r=g.get(t);return void 0===r&&(r={id:t.id,record:t,get physicalColumn(){return t.physicalRow}},g.set(t,r)),r},release(e){c.release(e.record)},get size(){return c.size}}),toTrackedPhysicalColumn:e=>e8(e),toProp:e=>e},_=(i=()=>I.rowIndexMapper,n=e=>I.toVisualRow(e),o={getIndexMapper:()=>I.columnIndexMapper,toVisualColumn:e=>I.toVisualColumn(e),toProp:e=>e},p=new Set,m=new Set,f=new Map,w=null,y=null,b=0,C=()=>{p.forEach(({record:e,meta:t})=>{let{physicalRow:r}=e;if(null===r){t.visualRow=null;return}t.row=r,t.visualRow=n(r)})},S=()=>{p.forEach(({column:e,meta:t})=>{if(void 0===e||void 0===o)return;let{physicalColumn:r}=e;if(null===r){t.col=null,t.visualCol=null,t.prop=null;return}t.col=r,t.visualCol=o.toVisualColumn(r),t.prop=o.toProp(r)})},v=()=>{p.size>0&&null===w?(w=i()).addLocalHook("cacheUpdated",C):0===p.size&&null!==w&&(w.removeLocalHook("cacheUpdated",C),w=null),void 0!==o&&null===y&&b>0?(y=o.getIndexMapper()).addLocalHook("cacheUpdated",S):null!==y&&0===b&&(y.removeLocalHook("cacheUpdated",S),y=null),0===p.size&&m.clear()},{add(e,t,r){let i={record:e,meta:t,column:r};return m.delete(t),p.add(i),f.set(t,(f.get(t)??0)+1),b+=+(void 0!==r),v(),()=>{if(p.delete(i)){b-=void 0!==r;let e=(f.get(t)??1)-1;e>0?f.set(t,e):(f.delete(t),null===t.visualRow&&m.add(t))}v()}},findUnplaced(e,t){let r,i=null,n=!1;for(let r of p){let{record:o,meta:s}=r;if(null===s.visualRow&&null!==o.physicalRow&&s.prop===e){if(s===t)return r;n=n||null!==i&&i.record!==o,i=i??r}}return n||(r=!1,m.forEach(t=>{null!==t.visualRow?m.delete(t):t.prop===e&&(r=!0)}),r)?null:i},followRelocated(e,t){let r=[];return p.forEach(i=>{let{record:n,meta:o}=i;e.has(n)&&null!==n.physicalRow&&!t(o,n.physicalRow)&&(p.delete(i),r.push(i))}),C(),v(),r},get size(){return p.size}}),P=new WeakMap,D={countPhysicalRows:()=>I.rowIndexMapper.getNumberOfIndexes(),countVisualRows:()=>I.countRows(),readRowObject:e=>E.modifyRowData(e),getStoredMeta:(e,t)=>eN.getCellMetaIfExists(e,t),readKeyedRowId:e=>tK.getKeyedRowIdAtPhysicalRow(e),findPhysicalRowById:e=>{try{return tK.getPhysicalRowById(e)}catch{return null}}},L=e=>{let t=I.rowIndexMapper,r=()=>t.getNumberOfIndexes()-t.getNotTrimmedIndexesLength(),i=r(),n=(t,r)=>e.rowsInserted(t,r),o=(t,r)=>e.rowsRemoved(t,r),s=()=>{let t=i;(i=r())!==t&&e.trimmedRowsChanged(i-t)};return I.addHook("afterCreateRow",n),I.addHook("afterRemoveRow",o),t.addLocalHook("cacheUpdated",s),()=>{t.removeLocalHook("cacheUpdated",s),I&&(I.removeHook("afterCreateRow",n),I.removeHook("afterRemoveRow",o))}},F=!0,B=null,V=[],z=0,U=!1,W=!1,$=null,G=null,j=!1,Y=!1,K=null,q=[],X=e=>q.reduce((e,t)=>t(e),e),Q=new wW,Z=[],J=[],ee=new Map,er=new WeakMap,ei=0,es=[],el=!1,ea=!1,eh=null,ed=new wU,eu=0,ec=!1,ep=0,em=!1,ew=null,eb=null,eC=new Map,eS=(e,t=[])=>{if(!wX(e))return ep;if(null!==ew)return ew;let r=ep;return t.forEach(([e,t])=>{let i=Number.isInteger(e)?tc(e):null,n=null===i?void 0:k.find(i),o=void 0===n?void 0:eC.get(t)?.get(n)?.[0];void 0!==o&&o<r&&(r=o)}),r},ev=null,eR=null,eE=null,eT=null,ex={...t.initialState,...t};r===sb&&sy.set(this,!0),this.rootContainer=e,this.rootWrapperElement=null,this.rootGridElement=null,this.rootGridContentElement=null,this.rootSlotTopElement=null,this.rootSlotBottomElement=null,this.rootOverlaysElement=null,this.rootPortalElement=null,this.rootElement=sC(this)?e.ownerDocument.createElement("div"):e,this.rootDocument=e.ownerDocument,this.rootWindow=this.rootDocument.defaultView,sC(this)&&(this.rootWrapperElement=this.rootDocument.createElement("div"),this.rootSlotTopElement=this.rootDocument.createElement("div"),this.rootGridElement=this.rootDocument.createElement("div"),this.rootGridContentElement=this.rootDocument.createElement("div"),this.rootOverlaysElement=this.rootDocument.createElement("div"),this.rootSlotBottomElement=this.rootDocument.createElement("div"),this.rootPortalElement=this.rootDocument.createElement("div"),rW(this.rootElement,["ht-wrapper","handsontable"]),rW(this.rootWrapperElement,"ht-root-wrapper"),iq(this.rootContainer.getRootNode())&&rW(this.rootWrapperElement,"ht-shadow-dom"),rW(this.rootSlotTopElement,"ht-slot-top"),rW(this.rootGridElement,"ht-grid"),rW(this.rootGridContentElement,"ht-grid-content"),rW(this.rootOverlaysElement,"ht-overlay"),rW(this.rootSlotBottomElement,"ht-slot-bottom"),this.rootGridContentElement.appendChild(this.rootElement),this.rootGridElement.appendChild(this.rootGridContentElement),this.rootWrapperElement.appendChild(this.rootSlotTopElement),this.rootWrapperElement.appendChild(this.rootGridElement),this.rootWrapperElement.appendChild(this.rootSlotBottomElement),this.rootWrapperElement.appendChild(this.rootOverlaysElement),this.rootContainer.appendChild(this.rootWrapperElement),this.rootWrapperElement.__hotInstance=this,rW(this.rootPortalElement,"ht-portal"),this.rootDocument.body.appendChild(this.rootPortalElement)),this.isDestroyed=!1,this.renderSuspendedCounter=0,this.executionSuspendedCounter=0;let eA=ex?.layoutDirection??"inherit",eM=["rtl","ltr"].includes(eA)?eA:this.rootWindow.getComputedStyle(this.rootElement).direction;this.rootElement.setAttribute("dir",eM),this.rootWrapperElement?.setAttribute("dir",eM),this.isRtl=function(){return"rtl"===eM},this.isLtr=function(){return!I.isRtl()},this.getDirectionFactor=function(){return I.isLtr()?1:-1},this.stylesHandler=new mQ({hot:I,rootElement:I.rootElement,rootDocument:I.rootDocument,onThemeChange:e=>{sC(this)&&(r$(this.rootWrapperElement,/ht-theme-.*/g),r$(this.rootPortalElement,/ht-theme-.*/g),e&&(rW(this.rootWrapperElement,e),rW(this.rootPortalElement,e),getComputedStyle(this.rootWrapperElement).getPropertyValue("--ht-line-height")||rn(`The "${e}" theme is enabled, but its stylesheets are missing or not imported correctly. Import the correct CSS files in order to use that theme.`)),this.view?._wt?.selectionManager?.refreshAllBorderHandleStyles())},injectCoreCss:sC(this)?t?.injectCoreCss!==!1:t?.injectCoreCss===!0}),this.themeManager=null,gP(h=dD(a=ex.language))?gV(h):(h=gO,dL(a)),ex.language=h;let eI=Object.fromEntries(Object.entries(ex).filter(([e,t])=>("cell"!==e||!!Array.isArray(t))&&!(nM.getSingleton().isRegistered(e)||nM.getSingleton().isDeprecated(e)))),eN=new p_(I,eI,[pP,pH]);this.renderChangeTracker=new i2;let eO=eN.getTableMeta(),ek=eN.getGlobalMeta(),eH=oK();this.container=this.rootDocument.createElement("div"),this.rootElement.insertBefore(this.container,this.rootElement.firstChild),this.guid=`ht_${n9()}`,w8.set(this.guid,this),this.columnIndexMapper=new dP,this.rowIndexMapper=new dP,this.columnIndexMapper.addLocalHook("indexesSequenceChange",e=>{I.runHooks("afterColumnSequenceChange",e)}),this.rowIndexMapper.addLocalHook("indexesSequenceChange",e=>{I.runHooks("afterRowSequenceChange",e)}),N.addEventListener(this.rootDocument.documentElement,"compositionstart",e=>{I.runHooks("beforeCompositionStart",e)}),E=new pL(I);let e_=nO(this.guid);e_.register("cellRangeMapper",new pJ({rowIndexMapper:this.rowIndexMapper,columnIndexMapper:this.columnIndexMapper})),this.rootElement.id&&"ht_"!==this.rootElement.id.substring(0,3)||(this.rootElement.id=this.guid);let eP=new pn(eO,{rowIndexMapper:I.rowIndexMapper,columnIndexMapper:I.columnIndexMapper,countCols:()=>I.countCols(),countRows:()=>I.countRows(),propToCol:e=>R.propToCol(e)??e,isEditorOpened:()=>{let e=I.getActiveEditor();return!!e&&e.isOpened()},isPluginEnabled:e=>I.getPlugin(e)?.enabled===!0,isPluginRegistered:e=>void 0!==I.getPlugin(e),countRenderableColumns:()=>I.view.countRenderableColumns(),countRenderableRows:()=>I.view.countRenderableRows(),countRowHeaders:()=>I.countRowHeaders(),countColHeaders:()=>I.countColHeaders(),countRenderableRowsInRange:(e,t)=>I.view.countRenderableRowsInRange(e,t),countRenderableColumnsInRange:(e,t)=>I.view.countRenderableColumnsInRange(e,t),getShortcutManager:()=>I.getShortcutManager(),createCellCoords:(e,t)=>I._createCellCoords(e,t),createCellRange:(e,t,r)=>I._createCellRange(e,t,r),visualToRenderableCoords:e=>{let{row:t,col:r}=e;return I._createCellCoords(t>=0?I.rowIndexMapper.getRenderableFromVisualIndex(t):t,r>=0?I.columnIndexMapper.getRenderableFromVisualIndex(r):r)},renderableToVisualCoords:e=>{let{row:t,col:r}=e;return I._createCellCoords(t>=0?I.rowIndexMapper.getVisualFromRenderableIndex(t):t,r>=0?I.columnIndexMapper.getVisualFromRenderableIndex(r):r)},findFirstNonHiddenRenderableRow:(e,t)=>{let r=t>e?1:-1,i=Math.min(e,t),n=Math.max(e,t),o=I.rowIndexMapper.getNearestNotHiddenIndex(e,r);return null===o||1===r&&o>n||-1===r&&o<i?null:o>=0?I.rowIndexMapper.getRenderableFromVisualIndex(o):o},findFirstNonHiddenRenderableColumn:(e,t)=>{let r=t>e?1:-1,i=Math.min(e,t),n=Math.max(e,t),o=I.columnIndexMapper.getNearestNotHiddenIndex(e,r);return null===o||1===r&&o>n||-1===r&&o<i?null:o>=0?I.columnIndexMapper.getRenderableFromVisualIndex(o):o},isDisabledCellSelection:(e,t)=>e<0||t<0?I.getSettings().disableVisualSelection:I.getCellMeta(e,t).disableVisualSelection});this.selection=eP;let eD=(e,t)=>{this.selection.capturePhysicalSelection(t,(({indexesSequenceChanged:e,trimmedIndexesChanged:t})=>t&&!e)(e),e.trimmedIndexesChanged)},eL=(e,t)=>{let{hiddenIndexesChanged:r,trimmedIndexesChanged:i}=e;this.forceFullRender=!0,(e.indexesSequenceChanged||i||r)&&("row"===t?this.view?.invalidateRowHeightCache():this.view?.invalidateColumnWidthCache());let n=x?.isEditorOpened()===!0;return(({indexesSequenceChanged:e,trimmedIndexesChanged:t})=>t&&!e)(e)&&this.selection.restorePhysicalSelection(t),r&&(this.selection.commit(),i||this.selection.recaptureHighlightRecord()),n},eF=this.rowIndexMapper.getNumberOfIndexes(),eB=this.columnIndexMapper.getNumberOfIndexes(),eV=(e,{trimmedIndexesChanged:t,indexesSequenceChanged:r},i,n)=>{if(this.selection.isSelected()){if(e)return void this.selection.recaptureHighlightRecord();if(r&&this.selection.recaptureHighlightRecord(),t){if(x?.isEditorOpened()){this.selection.recaptureHighlightRecord(),r&&this.selection.fitGridTrackingExtents(n);return}this.selection.deselectIfHighlightStranded({unresolvableOnly:i})||(this.selection.recaptureHighlightRecord(),this.selection.fitGridTrackingExtents(n))}}};function ez(e){return e<0?e:I.colToProp(e)}this.columnIndexMapper.addLocalHook("beforeCacheUpdate",e=>eD(e,"column")),this.rowIndexMapper.addLocalHook("beforeCacheUpdate",e=>eD(e,"row")),this.columnIndexMapper.addLocalHook("afterCacheUpdate",()=>this.selection.discardPhysicalSelectionSnapshot("column")),this.rowIndexMapper.addLocalHook("afterCacheUpdate",()=>this.selection.discardPhysicalSelectionSnapshot("row")),this.columnIndexMapper.addLocalHook("cacheUpdated",e=>{this.renderChangeTracker.markAllChanged();let t=eL(e,"column"),r=this.columnIndexMapper.getNumberOfIndexes(),i=r!==eB;eB=r,i&&this.selection.markStructuralIndexChange();try{this.runHooks("afterColumnSequenceCacheUpdate",e)}finally{this.selection.notifyDeferredDeselect("column")}eV(i,e,t,"column")}),this.rowIndexMapper.addLocalHook("cacheUpdated",e=>{this.renderChangeTracker.markAllChanged();let t=eL(e,"row"),r=this.rowIndexMapper.getNumberOfIndexes(),i=r!==eF;eF=r,i&&this.selection.markStructuralIndexChange();try{this.runHooks("afterRowSequenceCacheUpdate",e)}finally{this.selection.notifyDeferredDeselect("row")}eV(i,e,t,"row")}),this.selection.addLocalHook("afterSetRangeEnd",(e,t)=>{let r=t_(!1),i=this.selection.getSelectedRange(),{from:n,to:o}=i.current(),s=i.size()-1;this.runHooks("afterSelection",n.row,n.col,o.row,o.col,r,s),this.runHooks("afterSelectionByProp",n.row,ez(n.col),o.row,ez(o.col),r,s);let l=eP.getSelectionSource();t&&!["loadData","updateData","deselect","shift"].includes(l)&&(!r.isTouched()||r.isTouched()&&!r.value)&&M.scrollTo(e);let a=eP.isSelectedByRowHeader(),h=eP.isSelectedByColumnHeader();if(a&&h?rW(this.rootElement,["ht__selection--rows","ht__selection--columns"]):a?(r$(this.rootElement,"ht__selection--columns"),rW(this.rootElement,"ht__selection--rows")):h?(r$(this.rootElement,"ht__selection--rows"),rW(this.rootElement,"ht__selection--columns")):r$(this.rootElement,["ht__selection--rows","ht__selection--columns"]),!["shift","refresh","loadData","updateData","deselect"].includes(l)&&(x.closeEditor(),!I))return;let d="shift"===l&&!t;if(!["refresh","loadData","updateData","deselect"].includes(l)&&!d){if(I.view.render(),!I)return;x.prepareEditor()}}),this.selection.addLocalHook("beforeSetFocus",e=>{this.runHooks("beforeSelectionFocusSet",e.row,e.col)}),this.selection.addLocalHook("afterSetFocus",e=>{let t=t_(!1);this.runHooks("afterSelectionFocusSet",e.row,e.col,t),(!t.isTouched()||t.isTouched()&&!t.value)&&M.scrollTo(e),x.closeEditor(),!I||(I.view.render(),I&&x.prepareEditor())}),this.selection.addLocalHook("afterSelectionFinished",e=>{if(!I)return;let t=e.length-1,{from:r,to:i}=e[t];this.runHooks("afterSelectionEnd",r.row,r.col,i.row,i.col,t),this.runHooks("afterSelectionEndByProp",r.row,ez(r.col),i.row,ez(i.col),t),["refresh","deselect"].includes(eP.getSelectionSource())&&(I.view.render(),x.prepareEditor())}),this.selection.addLocalHook("afterIsMultipleSelection",e=>{let t=this.runHooks("afterIsMultipleSelection",e.value);e.value&&(e.value=t)}),this.selection.addLocalHook("afterDeselect",()=>{x.closeEditor(),!I||(I.view.render(),I&&(r$(this.rootElement,["ht__selection--rows","ht__selection--columns"]),this.runHooks("afterDeselect")))}),this.selection.addLocalHook("afterSetHandlesHoveredLayer",()=>{I.view.render()}),this.selection.addLocalHook("beforeHighlightSet",()=>I.runHooks("beforeSelectionHighlightSet")).addLocalHook("beforeSetRangeStart",(...e)=>I.runHooks("beforeSetRangeStart",...e)).addLocalHook("beforeSetRangeStartOnly",(...e)=>I.runHooks("beforeSetRangeStartOnly",...e)).addLocalHook("beforeSetRangeEnd",(...e)=>I.runHooks("beforeSetRangeEnd",...e)).addLocalHook("beforeSelectColumns",(...e)=>I.runHooks("beforeSelectColumns",...e)).addLocalHook("afterSelectColumns",(...e)=>I.runHooks("afterSelectColumns",...e)).addLocalHook("beforeSelectRows",(...e)=>I.runHooks("beforeSelectRows",...e)).addLocalHook("afterSelectRows",(...e)=>I.runHooks("afterSelectRows",...e)).addLocalHook("beforeSelectAll",(...e)=>I.runHooks("beforeSelectAll",...e)).addLocalHook("afterSelectAll",(...e)=>I.runHooks("afterSelectAll",...e)).addLocalHook("beforeModifyTransformStart",(...e)=>I.runHooks("modifyTransformStart",...e)).addLocalHook("afterModifyTransformStart",(...e)=>I.runHooks("afterModifyTransformStart",...e)).addLocalHook("beforeModifyTransformFocus",(...e)=>I.runHooks("modifyTransformFocus",...e)).addLocalHook("afterModifyTransformFocus",(...e)=>I.runHooks("afterModifyTransformFocus",...e)).addLocalHook("beforeModifyTransformEnd",(...e)=>I.runHooks("modifyTransformEnd",...e)).addLocalHook("afterModifyTransformEnd",(...e)=>I.runHooks("afterModifyTransformEnd",...e)).addLocalHook("beforeRowWrap",(...e)=>I.runHooks("beforeRowWrap",...e)).addLocalHook("beforeColumnWrap",(...e)=>I.runHooks("beforeColumnWrap",...e)).addLocalHook("insertRowRequire",e=>I.alter("insert_row_above",e,1,"auto")).addLocalHook("insertColRequire",e=>I.alter("insert_col_start",e,1,"auto"));let eU=({axis:e,getCount:t,getNotTrimmedCount:r,isEmpty:i,isRemovable:n,previousMinimum:o,previousSpare:s,minimum:l,spare:a})=>{if(!(p0(o)>p0(l)||p0(s)>p0(a)))return;let h=t();if(h<r())return;let d=function({count:e,trailingEmpty:t,minimum:r,spare:i}){let n=Math.max(p0(r),e-t+p0(i));return Math.max(0,e-n)}({count:h,trailingEmpty:p1(h,h,i),minimum:l,spare:a}),u=p1(h,d,n);u>0&&((e,t,r)=>{let i=eP.isSelected()?I.getSelectedRangeActive():void 0,n="row"===e?i?.highlight.row:i?.highlight.col,o="row"===e?R.removeRow(t,r,"auto"):R.removeCol(t,r,"auto");if(o&&"number"==typeof n&&n>=t&&x.closeEditor(!0),o&&eP.isSelected()&&eP.getSelectedRange().ranges.some(r=>{let i=r.getOuterBottomEndCorner();return(("row"===e?i.row:i.col)??-1)>=t})){eP.markSource("shift");try{eP.refresh()}finally{eP.markEndSource()}}})(e,h-u,u)};function eK(e,t){let r="className"===e?I.rootElement:I.table;if(F)void 0!==t&&rW(r,t);else{let i=[],n=[];if(ek[e]){let t=ek[e];i=Array.isArray(t)?t:ef(String(t))}t&&(n=Array.isArray(t)?t:ef(t));let o=eg(i,n),s=eg(n,i);o.length&&r$(r,o),s.length&&rW(r,s)}ek[e]=t}function eq(e,t){if(i3(t)||Array.isArray(t))nM.getSingleton()._addFromSettings(e,t,I);else{if(null!==t)return;nM.getSingleton()._removeFromSettings(e,I)}eO[e]=t}function eX(e){let t;z+=1;try{t=e()}finally{z-=1}return eQ(),t}function eQ(e=0){if(!U||j||z>e||null!==B||!I.view)return;let t=eH.getItems().map(([,e])=>e),r=()=>t.reduce((e,t)=>t.runOwedReadyStep()||e,!1);z+=1;try{ed.suppress(()=>{let e=0;for(;e<t.length&&r();)e+=1})}finally{z-=1}(U=t.some(e=>e.isReadyStepOwed()))&&rn("A plugin ready step (`onGridReady()`) kept enabling or updating plugins. The steps still owed run when the next settings update, data load, or plugin call ends.")}function eZ(){if(I&&!I.isDestroyed&&I.view){if(!I.view.isVisible())return void eJ();if(eT?.disconnect(),eT=null,I.runHooks("afterFontsLoad"),I&&!I.isDestroyed&&I.view){if(!I.view.isVisible())return void eJ();I.view.invalidateIndexSizesCache(),I.renderChangeTracker.markAllChanged(),I.render()}}}function eJ(){null===eT&&(eT=iz(I.view._wt.wtTable.TABLE,()=>{eT=null,eZ()}))}function e0(e){let t={};return tP(e,"colorScheme")&&(t.colorScheme=e.colorScheme),tP(e,"density")&&(t.density=e.density),t}function e1(){return{colorScheme:eO.colorScheme,density:eO.density}}function e2(e,t){let r;(I.themeManager?.destroy(),void 0===e)?(r=wc("main")?wy("main"):wv(wE),r=wy("main")):r="function"!=typeof e.getThemeConfig?wv(e):e,I.themeManager=function({hot:e,themeObject:t,overrides:r}){return new ws({hot:e,themeObject:t,overrides:r})}({hot:I,themeObject:r,overrides:t})}function e3(){let e=!1;return{validatorsInQueue:0,valid:!0,addValidatorToQueue(){this.validatorsInQueue+=1,e=!1},removeValidatorFormQueue(){this.validatorsInQueue=this.validatorsInQueue-1<0?0:this.validatorsInQueue-1,this.checkIfQueueIsEmpty()},onQueueEmpty(e){},checkIfQueueIsEmpty(){0===this.validatorsInQueue&&!1===e&&(e=!0,this.onQueueEmpty(this.valid))}}}function e6(e,t){return!!t?.isOpened()&&dh(e,t.row,t.prop)}function e5(e,t,r=!1){let i=function(e){let t=I.toPhysicalRow(e);if(null!==t)return t;let r=I.rowIndexMapper.getNotTrimmedIndexesLength();return e>=r?I.rowIndexMapper.getNumberOfIndexes()+e-r:e}(e),n=I.toPhysicalColumn(t)??t,o={visualRow:e,visualColumn:t};return r?eN.getCellMeta(i,n,o):eN.getCellMetaTransient(i,n,o)}function e4(e,t,r){let i=tn(e,P.get(e)??null);if(i===e){if(e.valid===t)return;e.valid=t}ti(i,t,r)}function e8(e){if(!Number.isInteger(e)||"array"!==I.dataType||eO.columns&&0!==eO.columns.length)return null;let t=R.propToCol(e);return"number"!=typeof t?null:I.toPhysicalColumn(t)===e?e:null}function e9(e,t,r,i,n,o){let s=e.findIndex(e=>{if(t.getProp(e)!==r)return!1;let o=t.getRecord(e);return void 0===o?null!==n&&(t.getPastEndRow(e)??e[0])===n:null!==o.physicalRow&&o.physicalRow===i});-1!==s&&(e[s][3]=o)}function e7(e,t){return null===e&&wX(t)}function te(e,t,r){let i=_.findUnplaced(e,eb),n=i?.record.physicalRow??null;if(null===i||null===n)return;let o=n$(t,i.meta,r);ee.forEach(({records:t},r)=>{e9(r,t,e,n,null,o)})}function tt(e,t,r,i){void 0===i?R.set(e,t,r):R.setAtPhysicalRow(i,t,r,e)}function tr(e,t=!0){eP.suspendShifts(t);let r=!1;try{e(),r=!0}finally{eP.resumeShifts(r)}}function ti(e,t,r){if(eN.getStructureVersion()!==r)return;let i=e.row,n=e.col;if(!Number.isInteger(i)||!Number.isInteger(n))return;let o=eN.getCellMetaIfExists(i,n);if(o!==e){if(void 0!==o)o.valid=t,i1(o);else if(!1===t){let r=eN.getCellMeta(i,n,{visualRow:e.visualRow,visualColumn:e.visualCol,skipMetaExtension:!0});r.valid=t,i1(r)}}}function tn(e,t){if(null===t||!P.has(e))return e;let{physicalRow:r}=t;return{...e,row:r??void 0,col:e.col,visualRow:null===r?null:I.toVisualRow(r),visualCol:e.visualCol,hidden:e.hidden}}function to(e,t,r){return Array.isArray(e)?e:[[e,t,r]]}function ts(e,t,r,i){return(r||"object"!=typeof e||"string"!=typeof t?r:t)||i}function tl(e,t){let r=I.getActiveEditor(),i=!r?.isOpened()||dh(e.filter(e=>null!==e),r.row,r.prop),n=I.runHooks("beforeChange",e,t||"edit");if(!I)return[];let o=e.filter(e=>null!==e);if(!1===n||0===o.length)return i&&I.getActiveEditor()?.cancelChanges(),[];for(let e=o.length-1;e>=0;e--){let r,[i,n,,s]=o[e],l=R.propToCol(n)??n;r=Number.isInteger(l)?e5(i,l):{...Object.getPrototypeOf(eO),...eO},o[e][3]=n$(s,r,t)}return o}T={alter(e,t,r=1,i,n){eX(()=>tr(()=>T.runAlter(e,t,r,i,n)))},runAlter(e,t,r=1,i,n){x.suspendStrandDiscards();try{var o,s;let l=I.runHooks("beforeAlter",e,t,r,i,n);if(!1===l)return;switch(e){case"insert_row_below":case"insert_row_above":let a=I.countSourceRows();if(eO.maxRows===a)return;let h="insert_row_below"===e?"below":"above",d="number"==typeof t?t:"below"===h?a:0,{delta:u,startPhysicalIndex:c}=R.createRow(d,r,{source:i,mode:h});eP.shiftRows(I.toVisualRow(c),u);break;case"insert_col_start":case"insert_col_end":let g="insert_col_end"===e?"end":"start",p="end"===g?I.countSourceCols():0,m="number"==typeof t?t:p,{delta:f,startPhysicalIndex:w}=R.createCol(m,r,{source:i,mode:g});if(f){if(Array.isArray(eO.colHeaders)){let e=[w,0];e.length+=f,Array.prototype.splice.apply(eO.colHeaders,e)}eP.shiftColumns(I.toVisualColumn(w),f)}break;case"remove_row":let y;o=Array.isArray(t)?w4(t):[[t,r]],y=0,eo(o,([e,t])=>{if(Number.isInteger(e)){let r=fW(e-y,t,I.countRows());if(null===r)return;t=r.amount}let r=ej(e)?I.countRows()-1:Math.max(e-y,0);Number.isInteger(e)&&(e=Math.max(e-y,0));let n=I.countRows();if(!R.removeRow(e,t,i))return;if(eP.isSelected()){let{row:r}=I.getSelectedRangeActive().highlight;r>=e&&r<=e+t-1&&x.closeEditor(!0)}let o=I.countRows(),s=eO.fixedRowsTop;r>=0&&s>=r+1&&(eO.fixedRowsTop-=Math.min(t,s-r));let l=eO.fixedRowsBottom;if(l){let t=n-o,i=Number.isInteger(e)?r:Math.max(n-t,0),s=Math.min(i+t-1,n-1)-Math.max(i,n-l)+1;s>0&&(eO.fixedRowsBottom-=Math.min(s,l))}if(0===o)eP.deselect();else if("ContextMenu.removeRow"===i){let e=eP.getSelectedRange(),t=e.pop();e.clear().set(t.from).current().setTo(t.to),eP.flushHeldShifts(),eP.refresh()}else eP.shiftRows(e,-t);y+=t});break;case"remove_col":let b;s=Array.isArray(t)?w4(t):[[t,r]],b=0,eo(s,([e,t])=>{if(Number.isInteger(e)){let r=fW(e-b,t,I.countCols());if(null===r)return;t=r.amount}let r=ej(e)?I.countCols()-1:Math.max(e-b,0);Number.isInteger(e)&&(e=Math.max(e-b,0));let n=I.countCols(),o=[];if(Array.isArray(eO.colHeaders)){let i=ej(e)?Math.max(n-t,0):r;oD(i,i+t-1,e=>{let t=I.toPhysicalColumn(e);null!==t&&o.push(t)})}if(!R.removeCol(e,t,i))return;if(eP.isSelected()){let{col:r}=I.getSelectedRangeActive().highlight;r>=e&&r<=e+t-1&&x.closeEditor(!0)}let s=I.countCols();if(0===s)eP.deselect();else if("ContextMenu.removeColumn"===i){let e=eP.getSelectedRange(),t=e.pop();e.clear().set(t.from).current().setTo(t.to),eP.flushHeldShifts(),eP.refresh()}else eP.shiftColumns(e,-t);let l=eO.fixedColumnsStart;r>=0&&l>=r+1&&(eO._fixedColumnsStart-=Math.min(t,l-r));let a=eO.fixedColumnsEnd;if(a){let t=n-s,i=Number.isInteger(e)?r:Math.max(n-t,0),o=Math.min(i+t-1,n-1)-Math.max(i,n-a)+1;o>0&&(eO.fixedColumnsEnd-=Math.min(o,a))}if(Array.isArray(eO.colHeaders)){let e=eO.colHeaders;[...o].sort((e,t)=>t-e).forEach(t=>{e.splice(t,1)})}b+=t});break;default:tf(`There is no such action "${e}"`)}n||T.adjustRowsAndCols()}finally{x.resumeStrandDiscards(),I.forceFullRender=!0,I.view.invalidateColumnWidthCache()}eQ(1),I.view.render()},adjustRowsAndCols(){tr(()=>{let e=eO.minRows,t=eO.minSpareRows,r=eO.minCols,i=eO.minSpareCols;if(e){let t=I.countRows();t<e&&R.createRow(t,e-t,{source:"auto",fillsMinimumSize:!0})}if(t){let e=I.countEmptyRows(!0);if(e<t){let r=Math.min(t-e,eO.maxRows-I.countSourceRows());R.createRow(I.countRows(),r,{source:"auto",fillsMinimumSize:!0})}}{let e=0,t=Math.floor(Number(eO.fixedColumnsEnd))>0,n=i>0&&!eO.columns&&"array"===I.dataType&&!t;if(n)for(let t=I.countCols()-1;t>=0&&I.isEmptyCol(t)&&!((e+=1)>=i);t--);let o=I.countCols();if(r&&!eO.columns&&!t&&o<r){let t=r-o;e+=t,R.createCol(o,t,{source:"auto",fillsMinimumSize:!0})}if(n&&e<i){o=I.countCols();let t=Math.min(i-e,eO.maxCols-o);R.createCol(o,t,{source:"auto",fillsMinimumSize:!0})}}},!1)},removeSurplusRowsAndCols(e){eU({axis:"row",getCount:()=>I.countRows(),getNotTrimmedCount:()=>I.rowIndexMapper.getNotTrimmedIndexesLength(),isEmpty:e=>I.isEmptyRow(e),isRemovable:e=>R.isTrailingFillerRow(I.toPhysicalRow(e)),previousMinimum:e.minRows,previousSpare:e.minSpareRows,minimum:eO.minRows,spare:eO.minSpareRows}),eO.columns||"array"!==I.dataType||eU({axis:"column",getCount:()=>I.countCols(),getNotTrimmedCount:()=>I.columnIndexMapper.getNotTrimmedIndexesLength(),isEmpty:e=>I.isEmptyCol(e),isRemovable:e=>R.isTrailingFillerColumn(I.toPhysicalColumn(e)),previousMinimum:e.minCols,previousSpare:e.minSpareCols,minimum:eO.minCols,spare:eO.minSpareCols})},populateFromArray(e,t,r,i,n){let o,s,l,a,h,d=[],u={},c=[],g=e.row,p=e.col;if(0===(s=t.length))return!1;let m=0,f=0;switch(tx(r)&&(m=r.col-p+1,f=r.row-g+1),n){case"shift_down":let w=et(t),y=w.length;if(0===y)return!1;let b=Math.max(y,m),C=I.getData().slice(g),S=et(C).slice(p,p+b);for(l=0;l<b;l+=1)if(l<y){for(o=0,s=w[l].length;o<f-s;o+=1)w[l].push(w[l][o%s]);l<S.length?c.push(w[l].concat(S[l])):c.push(w[l].concat(Array(C.length).fill(null)))}else c.push(w[l%y].concat(S[l]));I.populateFromArray(g,p,et(c));break;case"shift_right":let v=t.length,R=Math.max(v,f),E=I.getData().slice(g).map(e=>e.slice(p));for(o=0;o<R;o+=1)if(o<v){for(l=0,a=t[o].length;l<m-a;l+=1)t[o].push(t[o][l%a]);if(o<E.length)for(let e=0;e<E[o].length;e+=1)t[o].push(E[o][e]);else t[o].push(...Array(E[0].length).fill(null))}else t.push(t[o%s].slice(0,R).concat(E[o]));I.populateFromArray(g,p,t);break;default:u.row=e.row,u.col=e.col;let T=0,x=0,A=!0,M="Autofill.fill"===i||"autofill.fill"===i,N=function(e,r=null){let i=t[e%t.length];return null!==r?i[r%i.length]:i},O=t.length,k=r?r.row-e.row+1:0;for(o=0,s=r?k:Math.max(O,k);o<s&&!(r&&u.row>r.row&&k>O||!eO.allowInsertRow&&u.row>I.countRows()-1)&&!(u.row>=eO.maxRows);o++){let t=o-T,n=M?o:t,c=N(n).length,g=r?r.col-e.col+1:0;if(a=r?g:Math.max(c,g),u.col=e.col,h=e5(u.row,u.col),("CopyPaste.paste"===i||"Autofill.fill"===i||"autofill.fill"===i)&&h.skipRowOnPaste){T+=1,u.row+=1,"CopyPaste.paste"===i&&(s+=1);continue}for(l=0,x=0;l<a&&!(r&&u.col>r.col&&g>c||!eO.allowInsertColumn&&u.col>I.countCols()-1)&&!(u.col>=eO.maxCols);l++){if(h=e5(u.row,u.col),("CopyPaste.paste"===i||"Autofill.fill"===i||"autofill.fill"===i)&&h.skipColumnOnPaste){x+=1,u.col+=1,"CopyPaste.paste"===i&&(a+=1);continue}if(h.readOnly&&"UndoRedo.undo"!==i){u.col+=1;continue}let e=l-x,t=M?l:e,r=!!h.valueSetter,o=N(n,t),s=I.getSourceDataAtCell(u.row,u.col)??null;if(null!==o&&"object"==typeof o)if(Array.isArray(o)&&null===s&&(s=[]),r||"object"==typeof s&&null!==s){if(null!==s){let e=tw(Array.isArray(s)?s:s[0]||s),t=tw(Array.isArray(o)?o:o[0]||o);r||"edit"===i||tE(e,t)||Array.isArray(e)&&Array.isArray(t)?o=tS(o):A=!1}}else A=!1,h.parsePastedValue&&"CopyPaste.paste"===i&&(A=!0),"edit"===i&&(A=!0,o=tS(o));else r||null===s||"object"!=typeof s||(A=!1);A&&d.push([u.row,u.col,o]),A=!0,u.col+=1}u.row+=1}I.setDataAtCell(d,null,null,i||"populateFromArray")}}},this.init=function(){ed.suppress(()=>(function(){if(el)return void(I.view?rn("Handsontable instance has already been initialized. Calling `init()` again is a no-op; use `updateSettings()` to reconfigure a live instance."):rn("Handsontable `init()` was already called but did not finish - the first call threw before the grid was built. Calling `init()` again is a no-op; create a new instance instead."));el=!0;let e=eO.theme,t=eO.themeName,r=mK(I.rootContainer);sC(I)&&!r&&(tx(e)||!e&&!t)&&e2(e,e1()),E.setData(eO.data),eq("beforeInit",ex.beforeInit),K=ex;try{I.runHooks("beforeInit")}finally{K=null}if(t7()&&rW(I.rootElement,"mobile"),I.updateSettings(ex,!0),I.view=new h7(I),x=n6.getInstance(I,eO,eP),M=function(e){let{selection:t}=e,r=!1,i=!1;return{resume(){i=!1},suspend(){i=!0},skipNextScrollCycle(){r=!0},scrollTo(n){let o;if(r||i){r=!1;return}t.isFocusSelectionChanged()?o=t=>{sW(e,t.toObject(),()=>{let t=e.getSelectedRangeActive();if(!t)return null;let{row:r,col:i}=t.highlight;return null!==r&&null!==i?e.getCell(r,i,!0):null})}:t.isSelectedByCorner()?o=()=>{}:t.isSelectedByRowHeader()?o=t=>{let r=sG(e).getComputedRowTarget(t);sW(e,{row:r},()=>{let t=!!e.getSettings().rowHeaders;return e.getCell(r,t?-1:0,!0)})}:t.isSelectedByColumnHeader()?o=t=>{let r=sG(e).getComputedColumnTarget(t);sW(e,{col:r},()=>{let t=!!e.getSettings().colHeaders;return e.getCell(t?-1:0,r,!0)})}:1===t.getSelectedRange().size()&&t.isMultiple()?o=t=>{let r=sG(e),i={row:r.getComputedRowTarget(t),col:r.getComputedColumnTarget(t)};sW(e,i,()=>{let{row:t,col:r}=i;return e.getCell(t,r,!0)})}:1!==t.getSelectedRange().size()||t.isMultiple()?t.getSelectedRange().size()>1&&(o=t=>{let r=sG(e),i={row:r.getComputedRowTarget(t),col:r.getComputedColumnTarget(t)};sW(e,i,()=>{let{row:t,col:r}=i;return e.getCell(t,r,!0)})}):o=t=>{let r=e.selection.getSelectionSource(),{row:i,col:n}=t;if("number"!=typeof i||"number"!=typeof n)return;let o=()=>e.getCell(i,n,!0);if(i<0&&n>=0)sW(e,{col:n},o);else if(n<0&&i>=0)sW(e,{row:i},o);else{let t={row:i,col:n};if("mouse"===r){var s,l,a,h,d,u,c,g;let r,o,p,m,f,w=function({row:e,col:t,lastPartiallyVisibleRow:r,lastPartiallyVisibleColumn:i,isRowLargerThanViewport:n,isColumnLargerThanViewport:o}){let s=t===i,l=e===r;if(!n&&!o&&(s||l))return null;let a={};return!(l&&!n)&&(a.row=e,n&&(a.verticalSnap="top")),!(s&&!o)&&(a.col=t,o&&(a.horizontalSnap="start")),a}({row:i,col:n,lastPartiallyVisibleRow:e.view.getLastPartiallyVisibleRow(),lastPartiallyVisibleColumn:e.view.getLastPartiallyVisibleColumn(),isRowLargerThanViewport:(s=e,l=i,r=s.view.countFixedRowsTop(),o=s.view.countFixedRowsBottom(),!(l<r||l>=s.countRows()-o)&&(a=sj(s,l),(h=s.view.getViewportHeight())>0&&(a??0)>h)),isColumnLargerThanViewport:(d=e,u=n,p=d.view.countFixedColumnsStart(),m=d.countCols(),f=d.view.countFixedColumnsEnd(),!(u<p)&&!(u>=m-f)&&(c=d.getColWidth(u),(g=d.view.getViewportWidth())>0&&(c??0)>g))});if(null===w)return;t=w}let p=void 0===t.row||void 0===t.col;sW(e,t,p?void 0:o)}},o?.(n)}}}(I),A.init(),sC(I)){var i,n;let e,t,r=[I.rootSlotTopElement,I.rootSlotBottomElement],o=()=>r.reduce((e,t)=>e+t.offsetHeight,0),s=o();e=(i=I.rootPortalElement).ownerDocument,mJ||(mJ=m2(e,"assertive"),m0=m2(e,"polite"),i.append(mJ,m0)),m1.push(i),function(e){let t=e.rootSlotBottomElement;if(!t)return;let r=ta({className:fu,key:e.getSettings().licenseKey,element:t,releaseDate:"20/11/2026"});r&&fy(e,r),e.addHookOnce("init",()=>{fm.add(e),fb(e)}),e.addHook("afterUpdateSettings",()=>fb(e),1e3)}(I),((t=fk(n=I)).lifecycle.isTrial||t.badge)&&function(e){let t=e.rootSlotBottomElement;if(!t)return;let{bar:r,link:i}=function(e){let{refs:t}=fe({tag:"div",ref:"bar",className:`handsontable ${fs}`,children:[{tag:"a",ref:"link",className:`${fs}__link`,attrs:{href:"https://handsontable.com",target:"_blank",rel:"noopener noreferrer"},children:[{tag:"span",className:`${fs}__logo`,attrs:{"aria-hidden":"true"}},{tag:"span",className:`${fs}__text`,text:"Powered by Handsontable DataGrid"}]}]},e);return t}(t.ownerDocument);r.classList.add(m5),t.appendChild(r),m8(m6.BOTTOM,t),e.getFocusScopeManager().registerScope(fl,r,{shortcutsContextName:fa,runOnlyIf:()=>r.isConnected,onActivate:e=>{("tab_from_above"===e||"tab_from_below"===e)&&i.focus()}})}(n),function(e,t){let{lifecycle:r,channels:i}=t,n=fo[r.state];n?function(e,t){let r=e.rootOverlaysElement;if(!r)return;let i=e.getFocusScopeManager(),n=e.getShortcutManager(),o=e.isRtl(),s=`${e.guid}-license-lock-title`,l=`${e.guid}-license-lock-description`,{refs:a}=fe({tag:"div",ref:"lock",className:`${fV} ${fV}--confirm handsontable ht-license-lock ${fV}--background-solid ${fV}--show`,attrs:{role:"alertdialog","aria-modal":"true","aria-labelledby":s,"aria-describedby":l,tabindex:"-1",dir:o?"rtl":"ltr",style:"display: block;"},children:[{tag:"div",className:`${fV}__content-wrapper`,children:[{tag:"div",ref:"inner",className:`${fV}__content-wrapper-inner`,attrs:{tabindex:"-1"},children:[{tag:"div",className:`${fV}__content`,children:[{tag:"h2",ref:"title",className:`${fV}__title`,attrs:{id:s}},{tag:"p",ref:"description",className:`${fV}__description`,attrs:{id:l}}]},{tag:"div",className:`${fV}__buttons`,children:[{tag:"a",ref:"contactButton",className:"ht-button ht-button--secondary",attrs:{rel:"noopener"}}]}]}]}]},e.rootDocument),h=a.lock;if(a.title.textContent=t.title,a.description.textContent=t.description,a.contactButton.textContent=t.action.text,a.contactButton.setAttribute("href",t.action.href),t.docsLink){let r=e.rootDocument.createElement("a");r.href=t.docsLink.href,r.target="_blank",r.rel="noopener",r.textContent=t.docsLink.text,a.description.appendChild(r),a.description.appendChild(e.rootDocument.createTextNode(t.docsLink.trailingText))}let d=()=>Array.from(h.querySelectorAll("a[href], button")),u=()=>{let{view:t}=e,r=t.isHorizontallyScrollableByWindow()?t.getTotalTableWidth():t.getWorkspaceWidth();h.style.width=`${r}px`};e.addHook("afterViewRender",u),(n.getContext(fU)??n.addContext(fU)).addShortcut({keys:[["Tab"],["Shift","Tab"]],callback:t=>{let r=d(),i=r.indexOf(e.rootDocument.activeElement),n=t.shiftKey?-1:1;r[(i+n+r.length)%r.length]?.focus()},group:fz}),i.registerScope(fz,h,{shortcutsContextName:fU,type:"modal",onActivate:e=>{let t=d();"tab_from_below"===e?t[t.length-1]?.focus():a.contactButton.focus()}}),r.appendChild(h),e.addHookOnce("afterInit",()=>{u(),e.deselectCell()})}(e,n(r)):i.ui&&function(e,t){var r;let i,n=fn[t.state],o=e.rootOverlaysElement;if(!n||!o)return;let s=`${e.guid}-license-popover`,{refs:l}=fe({tag:"div",ref:"wrapper",className:"ht-license-badge-wrapper",children:[{tag:"button",ref:"badge",className:"ht-license-badge",attrs:{type:"button","aria-label":"Handsontable license information"}},{tag:"div",ref:"popover",className:f_,attrs:{id:s,role:n.dismissible?"dialog":"tooltip","aria-labelledby":`${s}-title`},children:[{tag:"div",className:`${f_}__content`,children:[{tag:"div",ref:"popoverTitle",className:`${f_}__title`,attrs:{id:`${s}-title`}},{tag:"p",ref:"popoverBody",className:`${f_}__body`},{tag:"a",ref:"popoverLink",className:`${f_}__link`,attrs:{target:"_blank",rel:"noopener noreferrer"}}]},n.dismissible&&{tag:"button",ref:"closeButton",className:`${f_}__close`,attrs:{type:"button","aria-label":"Close"}}]}]},e.rootDocument),a=l.wrapper,h=l.badge,d=()=>e.hasRowHeaders()&&e.hasColHeaders(),u=()=>{if(e.isDestroyed)return;let t=d();a.classList.toggle(fF,!t),e.rootElement?.classList.toggle("ht-license-badge-on",t),fB(e)?.table.classList.toggle("ht-license-badge-corner",t)};u(),e.addHook("afterRender",()=>u());let c=0,g=()=>{let t=fB(e);if(!t||!d())return;let r=t.table.offsetWidth;r>0&&Math.abs(r-c)>1&&(c=r,a.style.setProperty("--ht-license-badge-area-width",`${r}px`))},p=e.rootWindow;if("function"==typeof p.ResizeObserver){let t=new p.ResizeObserver(()=>g()),r=null,i=()=>{let i=fB(e)?.table??null;i!==r&&(t.disconnect(),r=i,i&&t.observe(i))};i(),e.addHook("afterRender",()=>i()),e.addHook("afterDestroy",()=>t.disconnect())}else g(),e.addHook("afterRender",()=>g());h.tabIndex=-1;let m=l.popover;l.popoverTitle.textContent=n.title,l.popoverBody.textContent=n.body(t),l.popoverLink.href=n.linkHref,l.popoverLink.textContent=n.linkText,l.popoverLink.tabIndex=-1;let f=!1;m.addEventListener("mouseenter",()=>{f=!0}),m.addEventListener("mouseleave",()=>{f=!1}),r=()=>{f||a.classList.contains(fL)||a.classList.remove(fD)},(i=e.rootElement)&&(i.addEventListener("mouseover",t=>{let i=t.target instanceof e.rootWindow.Element?t.target:null,n=fB(e)?.thead??null,o=!a.classList.contains(fF)&&null!==i&&null!==n&&n.contains(i);a.classList.toggle(fL,o),r()}),i.addEventListener("mouseleave",()=>{a.classList.remove(fL),r()})),n.dismissible&&(m.classList.add(fP),l.closeButton.tabIndex=-1,l.closeButton.addEventListener("click",()=>{m.classList.remove(fP),a.classList.add(fD)})),o.appendChild(a)}(e,r)}(n,t),o()!==s&&wV(I,eO.height);let l={top:-1,bottom:-1};I.addHook("afterRender",()=>{if(!I||I.isDestroyed)return;let{view:e}=I;if(!e)return;let t=e.isHorizontallyScrollableByWindow(),r=t?e.getTotalTableWidth():e.getWorkspaceWidth();(0===r||t&&0>=I.countRenderedCols())&&I.rootWrapperElement&&(r=I.rootWrapperElement.offsetWidth);let i=I.rootWrapperElement?.clientWidth??0;t&&i>0&&(r=Math.min(r,i)),I.rootSlotBottomElement&&r!==l.bottom&&(l.bottom=r,I.rootSlotBottomElement.style.width=`${r}px`),I.rootSlotTopElement&&r!==l.top&&(l.top=r,I.rootSlotTopElement.style.width=`${r}px`)});let a=o(),h=()=>{let e=o();return e!==a&&(a=e,wV(I,eO.height),!0)};eR=h,ev=new I.rootWindow.ResizeObserver(()=>{I&&!I.isDestroyed&&I.view&&h()&&I.render()}),r.forEach(e=>ev?.observe(e))}W=!0;try{tk(eQ,!0)}finally{W=!1}eN.invalidateMetaExtensions(),I.runHooks("init");let o=eR;eR=null,o?.(),I.render(),null!==o&&I&&!I.isDestroyed&&o()&&I.render(),null===eE&&(eE=function(e,t){let r=e.fonts;if(!r||"function"!=typeof r.addEventListener)return()=>{};let i=!1,n=t,o=()=>{r.ready.then(()=>{if(null!==n){if("loading"===r.status)return void o();i=!1,n()}},()=>{i=!1})},s=()=>{i||(i=!0,o())};return r.addEventListener("loading",s),"loading"===r.status&&s(),()=>{n=null,r.removeEventListener("loading",s)}}(I.rootDocument,eZ)),F&&null===I.rootElement.offsetParent&&(eh=iz(I.rootElement,()=>{I&&!I.isDestroyed&&I.view&&I.render()})),"object"==typeof F&&(I.runHooks("afterChange",F[0],F[1]),F=!1),I.runHooks("afterInit"),eN.finishInitialization()})())},this._runInPluginLifecyclePass=function(e){return U=!0,eX(e)},this._createCellCoords=function(e,t){let r=I.view;return r?r._wt.createCellCoords(e,t):new l5(e,t,I.isRtl())},this._createCellRange=function(e,t,r){let i=I.view,n=[e,t,r];return i?i._wt.createCellRange(...n):new l4(...n,I.isRtl())},this.validateCell=function(e,t,r,i){let n=ec;ec=!1;let o=I.getCellValidator(t);function s(e,i=!0,n=t){if(!i||!0===t.hidden)return void r(e);let o=n.visualCol,l=n.visualRow,a=I.getCell(l,o,!0);if(a&&"TH"!==a.nodeName){let e=I.rowIndexMapper.getRenderableFromVisualIndex(l),t=I.columnIndexMapper.getRenderableFromVisualIndex(o);I.view._wt.getSetting("cellRenderer",e,t,a)}r(e)}if(eY(o)&&(o=sI(o)),i3(o)){let r,l=()=>i3(t.prop)?t.visualCol:t.prop,a=l(),h=eN.getStructureVersion(),d=ep,u=n?tc(t.visualRow):null,c=null===u?null:k.track(u),g=null===c?null:e8(t.prop),p=null===g?null:H.tracker.track(g);P.delete(t);let m=null===c?()=>{}:_.add(c,t,p??void 0);if(e=I.runHooks("beforeValidate",e,t.visualRow,a,i),!I)return;let f=ed.hold(),w=n&&d===ep,y=!w,b=!n,C=t.prop,S=()=>{if(!b&&(b=!0,null!==c)){let e,t,r;m(),e=eC.get(C),t=e?.get(c),r=t?.indexOf(d)??-1,e&&t&&-1!==r&&(t.splice(r,1),0===t.length&&e.delete(c),0===e.size&&eC.delete(C)),k.release(c),null!==p&&H.tracker.release(p)}y||(y=!0,d===ep&&(eu-=1))};null!==c&&(eC.has(C)||eC.set(C,new Map),(r=eC.get(C)).set(c,[...r.get(c)??[],d])),w&&(eu+=1),I._registerMicrotask(()=>{let r=ew,n=eb;ew=d,eb=t,ei+=1;try{f.resume(()=>o.call(t,e,r=>{if(!I){S(),f.release();return}ei+=1;try{f.resume(()=>{let n=tn(t,c);if(r=I.runHooks("afterValidate",r,e,n.visualRow,l(),i),!I||(n===t&&(t.valid=r,i1(t)),ti(n,r,h),S(),s(r,!0,n),!I))return;let o=em;em=d!==ep;try{I.runHooks("postAfterValidate",r,e,n.visualRow,l(),i)}finally{em=o}})}finally{S(),f.release(),tC()}}))}catch(e){throw S(),f.release(),e}finally{ew=r,eb=n,tC()}})}else I._registerMicrotask(()=>{t.valid=!0,i1(t),s(t.valid,!1)})},this.setDataAtCell=function(e,t,r,i){let n=ts(e,t,i,"edit");ed.run("change",n,()=>td.call(this,e,t,r,i))};let th=e=>!(I.view||I.countRows()>0)&&0!==I.countSourceRows()&&(rn(`\`${e}()\` writes nothing while Handsontable initializes and the grid has no rows yet, as inside \`afterHideColumns\`. Write in \`afterInit\`, or use \`setSourceDataAtCell()\`.`),!0);function td(e,t,r,i){let n,o,s;if(th("setDataAtCell"))return;let l=to(e,t,r),a=[],h=i||"object"!=typeof e?i:t,d=!1;for(n=0,o=l.length;n<o;n++){let[e,t,r]=l[n];if(null===t&&wX(h))continue;let i=function(e){"object"!=typeof e&&tf("Method `setDataAtCell` accepts row number or changes array of arrays as its first parameter");let t=e[1];return"number"!=typeof t&&tf("Method `setDataAtCell` accepts row and column number as its parameters. If you want to use object property name, use method `setDataAtRowProp`"),t}(l[n]);if(i>=this.countCols()?(d||=mZ(I.dataType,this.countCols(),i),s=i):s=n3(I,i),e7(e,h)){te(s,r,h);continue}a.push([e,s,E.getAtCell(this.toPhysicalRow(e),t),r])}if(l.length>0&&0===a.length)return void I.runHooks("afterSetDataAtCell",[],h);let u=eS(h,a),c=tl(a,h);d&&c.some(([,e])=>Number.isInteger(e)&&mZ(I.dataType,this.countCols(),e)&&null===R.propToCol(e))&&rh("Core.setDataAtCell.pastLastColumnOnObjectData","Writing past the last column of an object data source is deprecated and will be ignored in Handsontable 20.0.0. The value currently lands on a property named after the column index, which no column can display. Use `setDataAtRowProp()` to write a field the grid shows no column for."),!I||(I.runHooks("afterSetDataAtCell",c,h),I&&tu(c,h,u))}function tu(e,t,r){var i;let n,o,s,l,a,h,d,u,c,g,p,m,f,w,y,b=ed.hold(),C=(i=tc,n=new Map,o=new Map,s=new Set,l=new Map,a=new Map,h=new Map,d=null,u=!1,c=(e,t)=>{a.set(e,t),h.get(e)?.forEach(e=>Reflect.set(e,"visualRow",t))},g=(e,t)=>{e>=D.countVisualRows()-t||a.forEach((r,i)=>{e<=r&&c(i,r+t)})},p=(e,t)=>{a.forEach((r,i)=>{e<r&&c(i,r-Math.min(t,r-e))})},m=e=>{a.forEach((t,r)=>c(r,t-e))},f=()=>{d?.(),d=null},w=e=>{let t=o.get(e);return void 0!==t&&void 0!==H&&(null===t.physicalColumn||(Reflect.set(e,1,H.toProp(t.physicalColumn)),!1))},y={capture(e){if(u)return;u=!0;let t=new Map,r=D.countVisualRows();e.forEach(e=>{let l;l=H?.toTrackedPhysicalColumn(e[1])??null,void 0!==H&&null!==l&&(o.set(e,H.tracker.track(l)),er.set(e,y));let h=Number.isInteger(e[0])?i(e[0]):null;if(null===h){Number.isInteger(e[0])&&e[0]>=r&&a.set(e,e[0]);return}let d=t.get(h);void 0===d&&(d=w0(k,D,h),t.set(h,d),s.add(d)),n.set(e,d),er.set(e,y)}),a.size>0&&(d=L({rowsInserted:g,rowsRemoved:p,trimmedRowsChanged:m}))},noteMeta(e,t,r){let i=n.get(e);void 0!==i&&null===i.meta&&(i.meta=t,i.metaColumn=r)},notePastEndMeta(e,t){let r=a.get(e);void 0!==r&&(h.set(e,[...h.get(e)??[],t]),Reflect.set(t,"visualRow",r))},getPastEndRow:e=>a.get(e),getRecord:e=>n.get(e)?.record,resolve(e){let t=n.get(e);return void 0===t?void 0:w3(D,t)},hasRecords:()=>n.size>0,settle(e,t){if(f(),a.forEach((e,t)=>w6(t,e)),0===n.size&&0===o.size)return[];let r=new Map,i=[],s=w1(D);for(let o=e.length-1;o>=0;o--){let a,h=e[o],d=n.get(h);void 0!==d&&(r.has(d)||r.set(d,w3(D,d,s)),a=r.get(d)),null===a||w(h)?(e.splice(o,1),i.unshift(h)):void 0!==a&&(l.set(h,a),w6(h,t(a)))}return i},getSettledPhysicalRow:e=>l.get(e),getProp(e){let t=o.get(e);return void 0===t||void 0===H?e[1]:null===t.physicalColumn?void 0:H.toProp(t.physicalColumn)},getColumn:e=>o.get(e),getPhysicalRow(e){let t=l.get(e);if(void 0!==t)return t;let r=n.get(e);return void 0===r?void 0:w3(D,r)},forEachAnchor(e){s.forEach(e)},release(){s.forEach(e=>k.release(e.record)),o.forEach((e,t)=>{H?.tracker.release(e),er.get(t)===y&&er.delete(t)}),n.forEach((e,t)=>{er.get(t)===y&&er.delete(t)}),o.clear(),s.clear(),n.clear(),l.clear(),f(),a.clear(),h.clear()}});r===ep&&ee.set(e,{source:t,records:C});try{!function(e,t,r,i,n){if(!e.length)return n([],[]);let o=I.getActiveEditor(),s=e3(),l=[],a=[],h=wX(t)?null:O(),d=!0,u=([t,r,,n])=>{e9(e,i,r,null===t?null:I.toPhysicalRow(t),t,n)},c=(e,t)=>{wX(t)&&e?.forEach(u)};I.addHook("afterChange",c),s.onQueueEmpty=()=>{I.removeHook("afterChange",c);let t=[];try{r===ep&&(t=i.settle(e,e=>I.toVisualRow(e))),h?.claim(e,e4),o&&d&&r===ep&&o._closeAfterDataChange&&e6(e,o)&&o.cancelChanges(),n(a,t),h?.settle(e)}finally{h?.release(),function(e){if(0===e.length||!I)return;let t=I.countSourceRows();e.forEach(e=>{e.row>=t&&delete e.valid})}(l)}};try{!function(e,t,r,i,n,o,s,l){let a=I.countRows();for(let u=e.length-1;u>=0&&r===ep;u--){let r,[c,g,,p]=e[u],m=R.propToCol(g)??g;if(Number.isInteger(m)?(r=e5(c,m),I.getCellValidator(r)&&(r=e5(c,m,!0))):r={...Object.getPrototypeOf(eO),...eO},I.getCellValidator(r)){var h,d;i.addValidatorToQueue(),s.capture(e),c>=a?(n.push(r),s.notePastEndMeta(e[u],r)):Number.isInteger(r.col)&&s.noteMeta(e[u],r,r.col);let f=eN.getStructureVersion(),w=s.getRecord(e[u]),y=s.getColumn(e[u]);o?.register(e[u],(h=void 0===w?`v${c}`:`r${w.id}`,d=void 0===y?g:`t${y.id}`,"string"==typeof d||"number"==typeof d?`${h}:p${d}`:"function"==typeof d?(!wQ.has(d)&&(wZ+=1,wQ.set(d,wZ)),`${h}:f${wQ.get(d)}`):`${h}:c${"function"==typeof m?"":m}`),r,f),ec=!0;try{I.validateCell(p,r,function(t,r,n){return function(s){if("boolean"!=typeof s&&tf("Validation error: result is not boolean"),!1===s&&!1===r.allowInvalid){l(n);let i=e.lastIndexOf(n,t);-1!==i&&e.splice(i,1),P.has(r)||(r.valid=!0),ti(tn(r,P.get(r)??null),!0,f)}o?.answered(n,s),i.removeValidatorFormQueue()}}(u,r,e[u]),t)}finally{ec=!1}if(!I)return}}}(e,t,r,s,l,h,i,e=>{d=!1,a.push(e)})}catch(e){throw s.onQueueEmpty=()=>{},I.removeHook("afterChange",c),h?.release(),e}s.checkIfQueueIsEmpty()}(e,t,r,C,(i,n)=>{ee.delete(e);try{if(r===ep){let r=C.hasRecords()?e=>C.getSettledPhysicalRow(e):void 0;b.resume(()=>(function(e,t,r){tr(()=>(function(e,t){let r={op:null};for(let i=e.length-1;i>=0;i--){let n=!1;if(null===e[i]){e.splice(i,1);continue}if((null===e[i][2]||void 0===e[i][2])&&(null===e[i][3]||void 0===e[i][3]))continue;let o=void 0===t?void 0:t(e[i]);if(eO.allowInsertRow&&void 0===o)for(;e[i][0]>I.countRows()-1;){let t=e[i][0]-(I.countRows()-1),{delta:r}=R.createRow(void 0,t,{source:"auto"});if(0===r){n=!0;break}}if("array"===I.dataType&&(!eO.columns||0===eO.columns.length)&&eO.allowInsertColumn){let t=()=>Number(R.propToCol(e[i][1])??e[i][1]);for(;t()>I.countCols()-1;){let e=t()-(I.countCols()-1),{delta:r}=R.createCol(void 0,e,{source:"auto"});if(0===r){n=!0;break}}}n||function(e,t,r,i,n){let o=null;if(null!==ed.getRecordingTransaction()&&(o=n??I.toPhysicalRow(e)),null===o||!Number.isInteger(o))return tt(e,t,r,n);let s=pW(E.getRawAtCellByProp(o,t));tt(e,t,r,n),p$(ed,{physicalRow:o,prop:t,oldValue:s,newValue:pW(E.getRawAtCellByProp(o,t))},i)}(e[i][0],e[i][1],e[i][3],r,o)}})(e,r),!1);let i=e.length>0,n=x?.getActiveEditor(),o=n?._closeAfterDataChange,s=e6(e,n);if(i){if(T.adjustRowsAndCols(),I.runHooks("beforeChangeRender",e,t),!I||(n?.isOpened()&&o&&s&&x.closeEditor(),I.render(),!I)||((n?.isOpened()&&o&&s||!n?.isOpened())&&x?.prepareEditor(),I.runHooks("afterChange",e,t||"edit"),!I))return;n&&void 0!==n.refreshValue&&(!n.isOpened()||s)&&n.refreshValue()}else I.render()})(e,t,r)),n.length>0&&I&&Z.slice().forEach(e=>e(n,t,[]))}else Z.slice().forEach(r=>r(e,t,i))}finally{C.release(),b.release()}})}catch(t){throw ee.delete(e),C.release(),b.release(),t}}function tc(e){return e>=0&&e<I.countRows()?I.toPhysicalRow(e):null}function tg(e,t,r,i){let n,o;if(th("setDataAtRowProp"))return;let s=to(e,t,r),l=[],a=i||"object"!=typeof e?i:t;for(n=0,o=s.length;n<o;n++){let[e,t,r]=s[n];if(!(null===t&&wX(a))||R.colToPropCache.includes(null)){if(e7(e,a)){te(t,r,a);continue}l.push([e,t,E.getAtCellByProp(this.toPhysicalRow(e),t),r])}}if(s.length>0&&0===l.length)return void I.runHooks("afterSetDataAtRowProp",[],a);let h=eS(a,l),d=tl(l,a);!I||(I.runHooks("afterSetDataAtRowProp",d,a),I&&tu(d,a,h))}this.setDataAtRowProp=function(e,t,r,i){let n=ts(e,t,i,"edit");ed.run("change",n,()=>tg.call(this,e,t,r,i))},this.listen=function(){I&&!I.isListening()&&w8.has(I.guid)&&(w8.forEach(e=>{I!==e&&e.unlisten()}),w5=I.guid,I.runHooks("afterListen"))},this.unlisten=function(){this.isListening()&&(w5=null,I.runHooks("afterUnlisten"))},this.isListening=function(){return w5===I.guid},this.destroyEditor=function(e=!1,t=!0){x.closeEditor(e),!I||(I.view.render(),I&&t&&eP.isSelected()&&x.prepareEditor())},this.populateFromArray=function(e,t,r,i,n,o,s){("object"!=typeof r||"object"!=typeof r[0])&&tf("populateFromArray parameter `input` must be an array of arrays");let l="number"==typeof i?I._createCellCoords(i,n):void 0;return ed.run("change",o??"populateFromArray",()=>T.populateFromArray(I._createCellCoords(e,t),r,l,o,s))},this.spliceCol=function(e,t,r,...i){return rh("Core.spliceCol","The `spliceCol()` method is deprecated and will be removed in Handsontable 20.0.0. Change the data yourself and write it back with `populateFromArray()`, or use `alter()` with `insert_col`/`remove_col`."),R.spliceCol(e,t,r,...i)},this.spliceRow=function(e,t,r,...i){return rh("Core.spliceRow","The `spliceRow()` method is deprecated and will be removed in Handsontable 20.0.0. Change the data yourself and write it back with `populateFromArray()`, or use `alter()` with `insert_row`/`remove_row`."),R.spliceRow(e,t,r,...i)},this.getSelected=function(){if(eP.isSelected())return en(eP.getSelectedRange().ranges,({from:e,to:t})=>[e.row,e.col,t.row,t.col])},this.getSelectedLast=function(){let e,t=I.getSelected();return t&&t.length>0&&(e=t[t.length-1]),e},this.getSelectedActive=function(){let e=I.getSelectedRangeActive();if(!e)return;let{from:t,to:r}=e;return[t.row,t.col,r.row,r.col]},this.getSelectedRange=function(){if(eP.isSelected())return Array.from(eP.getSelectedRange())},this.getSelectedRangeLast=function(){let e,t=I.getSelectedRange();return t&&t.length>0&&(e=t[t.length-1]),e},this.getSelectedRangeActive=function(){return eP.getActiveSelectedRange()},this.getActiveSelectionLayerIndex=function(){return eP.getActiveSelectionLayerIndex()};let tp=(e,t,r,i,n)=>{let o=Math.max(t,0),s=Math.min(r,I.countRows()-1),l=Math.max(i,0),a=Math.min(n,I.countCols()-1);o>s||l>a||oD(o,s,t=>{oD(l,a,r=>{I.getCellMetaTransient(t,r).readOnly||e.push([t,r,null])})})};this.emptySelectedCells=function(e){if(!eP.isSelected()||0===this.countRows()||0===this.countCols())return;let t=[];eo(eP.getSelectedRange(),e=>{if(e.isSingleHeader())return;let r=e.getTopStartCorner(),i=e.getBottomEndCorner();tp(t,r.row,i.row,r.col,i.col)}),t.length>0&&this.setDataAtCell(t,e)},this.isRenderSuspended=function(){return this.renderSuspendedCounter>0},this.suspendRender=function(){this.renderSuspendedCounter+=1},this.resumeRender=function(){let e=this.renderSuspendedCounter-1;this.renderSuspendedCounter=Math.max(e,0),this.isRenderSuspended()||e!==this.renderSuspendedCounter||I.view.render()},this.render=function(){this.view&&(this.forceFullRender=!0,this.isRenderSuspended()||I.view.render())},this.markCellChanged=function(e,t){let r=I.toPhysicalRow(e),i=I.toPhysicalColumn(t);if(null===r||null===i)return;let n=eN.getCellMetaIfExists(r,i);n&&i1(n)},this.markAllCellsChanged=function(){I.renderChangeTracker.markAllChanged()},this.batchRender=function(e){I.suspendRender();try{return e()}finally{I.resumeRender()}},this.isExecutionSuspended=function(){return this.executionSuspendedCounter>0},this.suspendExecution=function(){let e=0===this.executionSuspendedCounter&&!j&&!Y;if(e){Y=!0;try{this.runHooks("beforeSuspendExecution")}finally{Y=!1}}if(this.executionSuspendedCounter+=1,this.columnIndexMapper.suspendOperations(),this.rowIndexMapper.suspendOperations(),e)try{this.runHooks("afterSuspendExecution")}catch(e){try{this.resumeExecution()}catch{}throw e}},this.resumeExecution=function(e=!1){let t=this.executionSuspendedCounter-1,r=0===t&&!j&&!Y;try{if(r){Y=!0;try{this.runHooks("beforeResumeExecution")}finally{Y=!1}}}finally{this.executionSuspendedCounter=Math.max(this.executionSuspendedCounter-1,0);try{if(!this.isExecutionSuspended()&&t>=0||e)try{this.columnIndexMapper.resumeOperations()}finally{this.rowIndexMapper.resumeOperations()}}finally{r&&!this.isExecutionSuspended()&&this.runHooks("afterResumeExecution")}}},this.batchExecution=function(e,t=!1){return ed.run("batch",void 0,()=>{I.suspendExecution();let r=!1;try{let t=e();return r=!0,t}finally{I.resumeExecution(r&&t)}})},this.batch=function(e){return ed.run("batch",void 0,()=>{I.suspendRender();try{I.suspendExecution();try{return e()}finally{I.resumeExecution()}}finally{I.resumeRender()}})},this.runOperation=function(e,t,r){return ed.run(e,r,t)},this._getOperationScope=function(){return ed},this._hasPendingValidation=function(){return eu>0};let tm=(e,t,r)=>{let{type:i,valueGetter:n}=r??I.getCellMetaTransient(e,t),o=tx(i)?i:null;"string"==typeof i&&su(i)&&(o=sp(i));let s="function"==typeof n&&tx(o)&&o.valueGetter===n;return R.get(e,n3(I,t),{skipValueGetter:s})};function ty(e){let t=!1;eP.suspendGridTrackingFits();try{e(),t=!0}finally{eP.resumeGridTrackingFits(t)}}function tb(e,t){eu=0,ep+=1,ee.forEach(({records:e})=>e.release()),ee.clear();let r=x?.getActiveEditor()?._endValidationWait()??null;ty(()=>pZ(e,e=>{R=e},()=>{I.renderChangeTracker.markAllChanged(),eN.clearCellsCache(),I.initIndexMappers(),T.adjustRowsAndCols(),eP.markSource("loadData");try{eP.refresh()}finally{eP.markEndSource()}F&&(F=[null,"loadData"])},{hotInstance:I,dataMap:R,dataSource:E,internalSource:"loadData",source:t,metaManager:eN,firstRun:F,beforeRender:()=>eQ(1)})),r?.()}function tC(){if(!((ei-=1)>0))for(;es.length>0;){let e=es.shift();I&&e()}}function tv(e=!1,t=!1){let r=I.getInitialColumnCount(),i=e?Math.min(r,I.columnIndexMapper.getNumberOfIndexes()):r,n=R.colToPropCache.slice();if(t&&"array"===I.dataType)for(let e=0;e<i;e+=1)void 0===n[e]&&(n[e]=e);return{count:i,props:n}}function tR(e,t=!1){if(null===e)return!1;let r=tv(!1,t);return!(t?r.count>=e.count&&p4(e,r,Math.max(e.count,e.props.length),!0)||r.count<=e.count&&p4(e,r,r.count,!0):e.count===r.count&&e.props.length===r.props.length&&p4(e,r,e.props.length))}function tT(e){e.forEach(({physicalRow:e,physicalColumn:t,key:r,value:i})=>{eN.setCellMeta(e,t,r,i)})}function tA(e){eN.startCellOptionMetaRecording();try{e()}finally{eN.endCellOptionMetaRecording()}}function tM(e){let t=e?[]:eN.getCellOptionCellMetas(),r=eN.getUserDefinedCellMetas(),i=eN.getInvalidCellMetas();eN.clearCache(),t.length>0&&tA(()=>tT(t)),tT(r),eN.restoreInvalidCellMetas(i)}function tN(e){let t=eO.columns;if(t)for(let r=0;r<e;r++){let e=i3(t)?t(r):t[r];e&&eN.updateColumnMeta(r,e)}}function tO(e){return void 0!==e.data&&void 0!==e.columns&&!i3(e.columns)&&!i3(eO.columns)}function tk(e,t){let r=I,i=r.renderSuspendedCounter;r.renderSuspendedCounter=i+1;try{e()}finally{r.renderSuspendedCounter=Math.max(r.renderSuspendedCounter-1,t?i:0)}}function tD(e,t,r=!1,i=null,n=null,o=e){var s,l,a;let h,d,u,c,g,p,m,f,w,y=(F?I.loadData:I.updateData).bind(I);e$(e.rows)&&tf('The "rows" setting is no longer supported. Do you mean startRows, minRows or maxRows?'),e$(e.cols)&&tf('The "cols" setting is no longer supported. Do you mean startCols, minCols or maxCols?'),e$(e.ganttChart)&&tf('Since 8.0.0 the "ganttChart" setting is no longer supported.'),d=Array.isArray(e.columns)?e.columns:[],u=Array.isArray(e.cell)?e.cell:[],c=[e,...d,...u],w7.forEach(({name:e,version:t,migrationUrl:r})=>{c.some(t=>tx(t)&&e$(t[e]))&&ra(`Core.removedOption.${e}`,`The "${e}" setting was removed in Handsontable ${t} and is ignored. See ${r} for the migration path.`)}),tU=null;let{previousMinimumSizes:b,previousColumnLayout:C,previousRootSize:S,previousDataSource:v}={previousMinimumSizes:{minRows:eO.minRows,minSpareRows:eO.minSpareRows,minCols:eO.minCols,minSpareCols:eO.minSpareCols},previousColumnLayout:!F&&(!eO.columns&&tP(e,"dataSchema")&&!i3(e.columns)||tO(e))?tv(!0,tO(e)):null,previousRootSize:{height:t?void 0:eO.height,width:t?void 0:eO.width},previousDataSource:{dataProvider:eO.dataProvider,isExternal:!t&&tz}},E=function(e,t){let r;for(r in t||eN.assertNoInitOnlyUpdates(e),e)"data"===r||"language"===r||("className"===r?eK("className",e.className):"tableClassName"===r&&I.table?(eK("tableClassName",e.tableClassName),I.view._wt.wtOverlays.syncOverlayTableClassNames()):nM.getSingleton().isRegistered(r)||nM.getSingleton().isDeprecated(r)?eq(r,e[r]):!t&&tP(e,r)&&function(e,t){let r="editor"===t&&!0===e[t],i="cell"===t&&!Array.isArray(e[t]);if(r||i)return;let n=ek[t];ek[t]=e[t],ye.has(t)&&e[t]!==n&&(Reflect.deleteProperty(eO,t),("fixedColumnsStart"===t||"fixedColumnsLeft"===t)&&Reflect.deleteProperty(eO,"_fixedColumnsStart"))}(e,r));return!t&&eN.updateGlobalTypeFromSettings(e)}(e,t);!function(e,t){let r=mK(I.rootContainer),i=tP(e,"themeName"),n=tP(e,"theme");if(i&&n&&rn("Both `theme` and `themeName` are defined in your configuration. These options are aliases and cannot be used together. The `themeName` option will be ignored."),t){let t;n&&"string"==typeof e.theme?t=e.theme:i&&"string"==typeof e.themeName&&e.themeName&&!n?(t=e.themeName,eO.theme=e.themeName,eO.themeName=void 0):r?t=r:I.themeManager&&(t=I.themeManager.getClassName()),I.useTheme(t??null)}else{let t=I.getCurrentThemeName();n&&"string"==typeof e.theme&&t!==e.theme?(I.themeManager?.destroy(),I.useTheme(e.theme)):i&&!n&&t!==e.themeName?(I.themeManager?.destroy(),eO.theme=e.themeName,eO.themeName=void 0,I.useTheme(e.themeName)):sC(I)&&!r&&tx(e.theme)&&function(e){if(null===I.themeManager)e2(e,e1()),I.useTheme(I.themeManager.getClassName());else{let t;t="function"!=typeof e.getThemeConfig?wv(e):e,I.themeManager.update(t),I.useTheme(I.themeManager.getClassName())}}(e.theme)}}(e,t);let x=(!!tP(g=e0(e),"colorScheme")||!!tP(g,"density"))&&(I.themeManager?!!I.themeManager.setOverrides(g)&&!t&&(I.stylesHandler.clearCache(),!0):(wn(g.colorScheme)&&wn(g.density)||ea||(ea=!0,rn("The `colorScheme` and `density` options require the theme engine, so they have no effect when the theme is enabled by a CSS class name. Pass a theme config object or a `ThemeBuilder` instance to the `theme` option, or remove the `ht-theme-*` class from the container element to use the default theme.")),!1)),A=Array.isArray(e.cell);void 0===e.cell||null===e.cell||A||rs(I.rootElement,"Core.invalidCellOption",'The "cell" option must be an array of objects. The passed value was ignored, and the previously declared entries were kept. Wrap a single entry in an array: cell: [{ row: 0, col: 0, ... }].');let M=(null!==(p=void 0!==e.columns&&Array.isArray(eO.columns)?eO.columns:null)&&(tM(A),tN(p.length)),(m=r&&null===p&&void 0!==e.columns)&&tM(A),{earlyColumnsSetting:p,resetsColumnMetaBeforeLoad:m});r||(s=()=>(function(e,t,r,i,n){if(!0===I.runHooks("hasExternalDataSource"))e.data&&rn('The "data" setting is ignored when "hasExternalDataSource" returns `true`.'),t||tP(e,"dataProvider")&&(!i.isExternal||e.dataProvider!==i.dataProvider||void 0!==e.columns)?n([],"updateSettings"):void 0!==e.columns&&(R.createMap(),I.initIndexMappers());else if(void 0===e.data&&void 0===eO.data)n(null,"updateSettings");else if(void 0!==e.data){let t;$=null===r?null:{previousLayout:r,columnsPath:void 0!==e.columns};try{n(e.data,"updateSettings")}finally{$=null}t=G,G=null,t?.sorting?.clearSort(),t?.filters&&(t.filters.clearConditions(),t.filters.filter())}else void 0!==e.columns?(R.createMap(),I.initIndexMappers()):null!==r&&!eO.columns&&(R.createMap(),tR(r)&&I.initIndexMappers())})(e,t,C,v,y),f=["data","columns","dataSchema","dataProvider"].some(t=>tP(e,t)),F||!f?s():(tk(s,!1),eN.invalidateMetaExtensions())),!F&&e.language&&(gP(h=dD(a=e.language))?(gV(h),I.runHooks("beforeLanguageChange",h),ek.language=h,I.runHooks("afterLanguageChange",h)):dL(a));let N=()=>(function(e,t,r,i,n,o){var s;let l,a,h,d,u,{earlyColumnsSetting:c,resetsColumnMetaBeforeLoad:g}=t,p=I.countCols();null===c&&!g&&(void 0!==e.cell||void 0!==e.cells||void 0!==e.columns||o)&&tM(r),p>0&&null===c&&tN(p),(null!==n&&(l=I.rowIndexMapper.getNumberOfIndexes(),a=I.columnIndexMapper.getNumberOfIndexes(),h=I.countSourceRows(),d=I.countSourceCols(),u=e=>e.physicalRow<l&&e.physicalColumn<a&&!(({physicalRow:e,physicalColumn:t})=>e<h&&R.isTrailingFillerRow(e)||t<d&&R.isTrailingFillerColumn(t))(e),tT(n.userDefined.filter(u)),eN.restoreInvalidCellMetas(n.invalid.filter(u))),null!==i)?tA(()=>tT(i)):r&&(s=e.cell,tA(()=>{s.forEach(e=>{let{row:t,col:r,...i}=e;I.setCellMetaObject(t,r,i)})})),I.runHooks("afterCellMetaReset")})(e,M,A,i,n,E);r||N(),F&&!r&&pX(I,"init");let O=((w=wB(I,e,t)).ignoredAxes.forEach(e=>{ek[e]=S[e]}),w);if(!t&&(I.view&&(I.view._wt.wtViewport.resetHasOversizedColumnHeadersMarked(),I.view._wt.exportSettingsAsClassNames(),I.view.invalidateIndexSizesCache(),I.view.syncRowHeightMode()),eP.updateHighlightClassNames(),I.renderChangeTracker.markAllChanged(),I.runHooks("afterUpdateSettings",o),!I||I.isDestroyed))return null;return r||(t||T.removeSurplusRowsAndCols(b),T.adjustRowsAndCols(),eQ(1),I.view&&!F&&I.render()),l=O.scrollOwnerChanged,x&&I.themeManager&&I.runHooks("afterSetTheme",I.themeManager.getClassName(),!1),!t&&I.view&&l&&I.view._wt.wtOverlays.updateMainScrollableElements(),sC(I)&&tZ?.applyConfig(eO.layout),(t||tP(e,"dataProvider"))&&(tz=!0===I.runHooks("hasExternalDataSource")),r?N:null}function tL(){return Math.max(I.countRows(),eO.data.length)-1}function tF(e,t,r,i){var n;let o,s,l=to(e,t,r),a=I.hasHook("afterSetSourceDataAtCell"),h=[],d=(e,t)=>{let r=I.toVisualRow(e);if("string"==typeof t){let i=R.propToCol(t);if(Number.isInteger(i))return eN.getCellMetaUncached(e,I.toPhysicalColumn(i),{visualRow:r??e,visualColumn:i})}let i="function"==typeof t?R.propToCol(t):I.toVisualColumn(t);return Number.isInteger(i)?I.getCellMetaTransient(r,i):{...Object.getPrototypeOf(eO),...eO}},u="UndoRedo.undo"===(n=ts(e,t,i))||"UndoRedo.redo"===n;eo(l,([e,t,r])=>{let n=u?r:n$(r,d(e,t),i);a&&h.push([e,t,E.getAtCellByProp(e,t),n]),(u||function(e,t,r){let i=t.sourceDataValidator;if(!i3(i)||!0===i(e,t,r))return!0;let{row:n,col:o,sourceDataWarningMessage:s,allowInvalid:l}=t;return s&&pQ(s,[{row:n,col:o,value:e}]),!0===l}(n,d(e,t),i??"setSourceDataAtCell"))&&function(e,t,r,i=!1){let n=Number(e);if(null===ed.getRecordingTransaction()||!Number.isInteger(n)||n<0)return E.setAtCell(e,t,r,i);let o=E.getRawAtCellByProp(n,t),s=pW(o);E.setAtCell(e,t,r,i);let l=E.getRawAtCellByProp(n,t);l!==o&&p$(ed,{physicalRow:n,prop:t,oldValue:s,newValue:pW(l)})}(e,t,n,u)}),a&&this.runHooks("afterSetSourceDataAtCell",h,i),this.render();let c=I.getActiveEditor();c&&e$(c.refreshValue)&&(!c.isOpened()||(o=I.toPhysicalRow(c.row),s=c.prop,l.some(([e,t])=>e===o&&t===s)))?c.refreshValue():c?.isOpened()&&c.refreshDimensions?.()}function tB(e,t){return[e<I.countRows()?I.toPhysicalRow(e):e,t<I.countCols()?I.toPhysicalColumn(t):t]}function tV(e,t,r,i){if(!(null!==ed.getRecordingTransaction()&&!pU.has(r)&&eN.isUserDefinedMetaRecording()&&Number.isInteger(e)&&Number.isInteger(t)))return void i();let n="editor"===r?[ps,r]:[r],o=n.map(r=>eN.getCellMetaKeyState(e,t,r));i(),n.forEach((r,i)=>{let n=eN.getCellMetaKeyState(e,t,r),s=o[i];(s.hadOwn!==n.hadOwn||s.value!==n.value||s.origin!==n.origin)&&ed.record({type:"meta",physicalRow:e,physicalColumn:t,key:r,before:s,after:n})})}this._getValueToValidate=function(e,t){return tm(e,t)},this._isAnsweringStaleValidation=function(){return em},this.refreshDimensions=function(){if(!I.view)return;let e=I.view,{width:t,height:r}=e.getLastSize(),{width:i,height:n}=I.rootElement.getBoundingClientRect(),o=i!==t||n!==r;!1!==I.runHooks("beforeRefreshDimensions",{width:t,height:r},{width:i,height:n},o)&&(o||e._wt.wtOverlays.scrollableElement===I.rootWindow?(e.setLastSize(i,n),I.render()):e.renderWhenWindowResizeMovedFixed(),I.runHooks("afterRefreshDimensions",{width:t,height:r},{width:i,height:n},o))},this.updateData=function(e,t){eX(()=>ed.suppress(()=>{var r,i;return r=e,i=t,void ty(()=>pZ(r,e=>{R=e},e=>{R=e,I.renderChangeTracker.markAllChanged(),x?.suspendStrandDiscards();try{let e,t,r=$;r&&tR(r.previousLayout,r.columnsPath)?r.columnsPath?(e=[I.getPlugin("columnSorting"),I.getPlugin("multiColumnSorting")],t=I.getPlugin("filters"),G={sorting:e.find(e=>e?.isSorted()===!0)??null,filters:t?.enabled===!0&&t.exportConditions().length>0?t:null},I.columnIndexMapper.initToLength(I.getInitialColumnCount()),I.rowIndexMapper.fitToLength(I.countSourceRows())):I.initIndexMappers():(I.columnIndexMapper.fitToLength(I.getInitialColumnCount()),I.rowIndexMapper.fitToLength(I.countSourceRows())),function(){let e,t,r,i,n;if(0===ee.size)return;let o=Array.from(ee.values(),({records:e})=>e),s=(e=w1(D),t=new Map,r=new Map,o.forEach(i=>i.forEachAnchor(i=>{let{record:n}=i,o=w3(D,i,e);r.set(n,[...r.get(n)??[],i]),t.set(n,t.has(n)&&t.get(n)!==o?null:o)})),i=new Map,t.forEach((e,t)=>{null!==e&&i.set(t,e)}),(n=k.relocate(i)).forEach(e=>{r.get(e).forEach(t=>{null!==t.meta&&(t.meta=D.getStoredMeta(e.physicalRow,t.metaColumn)??null)})}),n);0!==s.size&&_.followRelocated(s,(e,t)=>!Number.isInteger(e.col)||eN.getCellMetaIfExists(t,e.col)===e).forEach(({record:e,meta:t})=>P.set(t,e))}(),T.adjustRowsAndCols(),eP.markSource("updateData");try{eP.refresh()}finally{eP.markEndSource()}}finally{x?.resumeStrandDiscards()}},{hotInstance:I,dataMap:R,dataSource:E,internalSource:"updateData",source:i,metaManager:eN,firstRun:F,beforeRender:()=>eQ(1)}))}))},this.loadData=function(e,t){eX(()=>ed.suppress(()=>tb(e,t)))},this.getInitialColumnCount=function(){let e=eO.columns,t=0;if(Array.isArray(e))t=e.length;else if(i3(e))if("array"===I.dataType){let r=I.countSourceCols();for(let i=0;i<r;i+=1)e(i)&&(t+=1)}else("object"===I.dataType||"function"===I.dataType)&&(t=R.colToPropCache.length);else if(e$(eO.dataSchema)){let e=R.getSchema();t=Array.isArray(e)?e.length:tH(e)}else t=I.countSourceCols();return t},this.initIndexMappers=function(){this.columnIndexMapper.initToLength(this.getInitialColumnCount()),this.rowIndexMapper.initToLength(this.countSourceRows())},this.getData=function(e,t,r,i){return eG(e)?R.getAll():R.getRange(I._createCellCoords(e,t),I._createCellCoords(r,i),pY.DESTINATION_RENDERER)},this.getCopyableText=function(e,t,r,i){return R.getCopyableText(I._createCellCoords(e,t),I._createCellCoords(r,i))},this.getCopyableData=function(e,t){return eW(R.getCopyable(e,n3(I,t)))},this._getCopyableData=function(e,t){return R.getCopyable(e,n3(I,t))},this.getCopyableSourceData=function(e,t){return E.getCopyable(e,n3(I,t))},this.getSchema=function(){return R.getSchema()},this.updateSettings=function(e,t=!1){let r=pI(e,I.isRtl()),i=t?r:X(r);if(i!==r&&0===Object.keys(i).length)return;let n=pO(i,e);eX(()=>ed.suppress(()=>{if("configure"!==B||t){let e=B;"meta"===e&&(B="data");try{tD(i,t,!1,null,null,n)}catch(e){throw function(e,t){if(!t&&!F&&void 0!==e.data&&I.view&&!I.isDestroyed)try{I.render()}catch{}}(i,t),e}finally{B=e}return}tP(i,"data")&&rn('The "data" setting passed to updateSettings() while another settings and data change is being applied is ignored: the data that change loads replaces it. Call loadData() once it has finished.');let e=tD(i,t,!0,null,null,n);e&&V.push(e)}))},this._applySettingsAndData=function(e,t,r,i=null,n=null){let o=pI(e,I.isRtl()),s=!!I.view;s&&I.suspendRender();try{eX(()=>ed.suppress(()=>{let s=B,l=V,a=null!==s;B="configure",V=[];try{try{let s=X(o),l=tD(s,!1,!0,i,n,pO(s,e));if(!I||I.isDestroyed)return;let a=V;B="data",tb(t,r),B="meta",l?.(),a.forEach(e=>e()),I.view&&pX(I,"loadData")}finally{B=s,V=l}I.view&&!a&&eH.getItems().forEach(([,e])=>{e.enabled&&"function"==typeof e.onDataReady&&e.onDataReady()}),eQ(1)}catch(e){throw a||eH.getItems().forEach(([,e])=>{e.dropDeferredDataWork()}),e}}))}finally{s&&I&&!I.isDestroyed&&I.resumeRender()}},this._isDataWorkDeferred=function(){return null!==B},this._replaceInitPassSettings=function(e){if(null===K)return null;let t=K,r=X(e),i={};return Object.keys(r).forEach(e=>{i[e]=t[e],t[e]=r[e]}),i},this._addSettingsFilter=function(e){q.includes(e)||q.push(e)},this._requirePlugin=function(e,t){Q.require(e,t)},this._releasePlugin=function(e,t){Q.release(e,t)},this._isPluginRequired=function(e){return Q.isRequired(e)},this._removeSettingsFilter=function(e){let t=q.indexOf(e);-1!==t&&q.splice(t,1)},this._getWaitingChangeSets=function(){return[...ee].map(([e,{source:t}])=>({changes:e,source:t}))},this.getPhysicalRowOfChange=function(e){let t=er.get(e)?.getPhysicalRow(e);return void 0!==t?t:"number"==typeof e[0]?I.toPhysicalRow(e[0]):null},this._runAfterValidatorAnswer=function(e){0===ei?e():es.push(e)},this._trackRecord=function(e,t){let r=tc(e);if(null===r)return null;let i=w0(k,D,r),n=void 0===t?null:R.colToProp(t),o=null===n?null:e8(n),s=null===o?null:H.tracker.track(o),l=()=>null===i?null:w3(D,i);return{getPhysicalRow:l,getVisualRow(){let e=l();return null===e?null:I.toVisualRow(e)},getVisualColumn(){if(void 0===t)return;if(null===n)return t;if(null!==s)return null===s.physicalColumn?null:I.toVisualColumn(s.physicalColumn);let e=R.propToCol(n);return"number"==typeof e?e:null===e?null:t},release(){null!==i&&(k.release(i.record),i=null),null!==s&&(H.tracker.release(s),s=null)}}},this._addDroppedChangesListener=function(e){Z.includes(e)||Z.push(e)},this._removeDroppedChangesListener=function(e){let t=Z.indexOf(e);-1!==t&&Z.splice(t,1)},this._addRowRevealer=function(e){J.includes(e)||J.push(e)},this._removeRowRevealer=function(e){let t=J.indexOf(e);-1!==t&&J.splice(t,1)},this._prepareRowReveal=function(){let e=J.map(e=>e());return t=>{let r=()=>null!==I.rowIndexMapper.getRenderableFromVisualIndex(t);if(r())return!0;for(let i of e)if(i(t)&&r())return!0;return!1}},this._isDataLoadPending=function(){return"configure"===B},this._isHeldMetaPhaseRunning=function(){return"meta"===B},this._isRunningInitReadySteps=function(){return W},this.getValue=function(){let e=I.getSelectedRangeActive();if(eO.getValue){if(i3(eO.getValue))return eO.getValue.call(I);else if(e&&"string"==typeof eO.getValue){let t=e.highlight.row??0;return I.getData()[t][eO.getValue]}}else if(e)return I.getDataAtCell(e.highlight.row,e.highlight.col);return null},this.getSettings=function(){return eO},this.clear=function(){let e=this.countRows(),t=this.countCols();if(e>0&&t>0){let r=[];tp(r,0,e-1,0,t-1),r.length>0&&this.setDataAtCell(r)}this.deselectCell()},this.alter=function(e,t,r,i,n){ed.run(w9[e]??e,i,()=>{ed.describe({index:t}),T.alter(e,t,r,i,n)})},this.getCell=function(e,t,r=!1){if(!I.view)return null;let i=t,n=e;if(t>=0){if(I.columnIndexMapper.isHidden(I.toPhysicalColumn(t)))return null;i=I.columnIndexMapper.getRenderableFromVisualIndex(t)}if(e>=0){if(I.rowIndexMapper.isHidden(I.toPhysicalRow(e)))return null;n=I.rowIndexMapper.getRenderableFromVisualIndex(e)}return null===n||null===i||void 0===n||void 0===i?null:I.view.getCellAtCoords(I._createCellCoords(n,i),r)},this.getCoords=function(e){if(!I.view)return null;let t=I.view._wt.wtTable.getCoords(e);if(null===t)return null;let{row:r,col:i}=t,n=r,o=i;return null!==r&&r>=0&&(n=I.rowIndexMapper.getVisualFromRenderableIndex(r)),null!==i&&i>=0&&(o=I.columnIndexMapper.getVisualFromRenderableIndex(i)),I._createCellCoords(n,o)},this.colToProp=function(e){return R.colToProp(e)},this.propToCol=function(e){return R.propToCol(e)},this.toVisualRow=e=>I.rowIndexMapper.getVisualFromPhysicalIndex(e),this.toVisualColumn=e=>I.columnIndexMapper.getVisualFromPhysicalIndex(e),this.toPhysicalRow=e=>I.rowIndexMapper.getPhysicalFromVisualIndex(e),this.toPhysicalColumn=e=>I.columnIndexMapper.getPhysicalFromVisualIndex(e),this.getRowId=function(e){let t=Number.isInteger(e)&&e>=0&&e<I.countRows()?I.toPhysicalRow(e):null;return null===t?null:tK.getRowIdAtPhysicalRow(t)},this.getVisualRowById=function(e){let t=tK.getPhysicalRowById(e),r=null===t?null:I.toVisualRow(t);return null!==r&&r<I.countRows()?r:null},this.getPhysicalRowById=function(e){return tK.getPhysicalRowById(e)},this.getRowIdAtPhysicalRow=function(e){return!Number.isInteger(e)||e<0||e>=I.rowIndexMapper.getNumberOfIndexes()?null:tK.getRowIdAtPhysicalRow(e)},this.getRowIds=function(e){let t=I.countRows(),r=(Array.isArray(e)?e:Array.from({length:t},(e,t)=>t)).map(e=>Number.isInteger(e)&&e>=0&&e<t?I.toPhysicalRow(e):null);return tK.getRowIdsAtPhysicalRows(r)},this.getVisualRowsByIds=function(e){return Array.isArray(e)?e.map(e=>I.getVisualRowById(e)):[]},this.getPhysicalRowsByIds=function(e){return Array.isArray(e)?e.map(e=>tK.getPhysicalRowById(e)):[]},this.setDataAtRowIdProp=function(e,t,r,i){let n=I.getVisualRowById(e);if(null!==n)return I.setDataAtRowProp(n,t,r,i),!0;let o=tK.getPhysicalRowById(e);return null!==o&&(I.setSourceDataAtCell(o,t,r,i),!0)},this.getDataAtCell=function(e,t){return R.get(e,n3(I,t))},this._getDataAtColumnForRows=function(e,t){return R.getAtColumnForRows(e,t)},this.getDataAtRowProp=function(e,t){return R.get(e,t)},this.getDataAtCol=function(e){let t=[],r=R.getRange(I._createCellCoords(0,e),I._createCellCoords(tL(),e),pY.DESTINATION_RENDERER);for(let e=0;e<r.length;e+=1)for(let i=0;i<r[e].length;i+=1)t.push(r[e][i]);return t},this.getDataAtProp=function(e){let t=[],r=R.propToCol(e);if(null===r)return t;let i=R.getRange(I._createCellCoords(0,r),I._createCellCoords(tL(),r),pY.DESTINATION_RENDERER);for(let e=0;e<i.length;e+=1)for(let r=0;r<i[e].length;r+=1)t.push(i[e][r]);return t},this.getSourceData=function(e,t,r,i){return void 0===e?E.getData():E.getByRange(I._createCellCoords(e,t??null),I._createCellCoords(r??null,i??null))},this.getSourceDataArray=function(e,t,r,i){return void 0===e?E.getData(!0):E.getByRange(I._createCellCoords(e,t??null),I._createCellCoords(r??null,i??null),!0)},this.getSourceDataAtCol=function(e){return E.getAtColumn(e)},this.setSourceDataAtCell=function(e,t,r,i){let n=ts(e,t,i);ed.run("change",n,()=>tF.call(this,e,t,r,i))},this.getSourceDataAtRow=function(e){return E.getAtRow(e)},this.getSourceDataAtCell=function(e,t){return E.getAtCell(e,t)},this.getDataAtRow=function(e){return R.getRange(I._createCellCoords(e,0),I._createCellCoords(e,this.countCols()-1),pY.DESTINATION_RENDERER)[0]||[]},this.getDataType=function(e,t,r,i){let n=void 0===e?[0,0,I.countRows(),I.countCols()]:[e,t,r,i],[o,s]=n,[,,l,a]=n,h=null,d=null;void 0===l&&(l=o),void 0===a&&(a=s);let u="mixed";return oD(Math.max(Math.min(o,l),0),Math.max(o,l),e=>{let t=!0;return oD(Math.max(Math.min(s,a),0),Math.max(s,a),r=>(d=I.getCellMetaTransient(e,r).type??null,h?t=h===d:h=d,t)),u=t?d??"mixed":"mixed",t}),u},this.removeCellMeta=function(e,t,r){ed.run("remove_cell_meta",void 0,()=>{let[i,n]=tB(e,t),o=eN.getCellMetaKeyValue(i,n,r);!1!==I.runHooks("beforeRemoveCellMeta",e,t,r,o)&&(tV(i,n,r,()=>{eN.removeCellMeta(i,n,r)}),I.runHooks("afterRemoveCellMeta",e,t,r,o)),o=null})},this.spliceCellsMeta=function(e,t=0,...r){r.length>0&&!Array.isArray(r[0])&&tf("The 3rd argument (cellMetaRows) has to be passed as an array of cell meta objects array."),ed.run("splice_cells_meta",void 0,()=>{if(t>0){let r=I.toPhysicalRow(e);pG(I,!1,r,t),eN.removeRow(r,t)}r.length>0&&eo(r.reverse(),t=>{let r=I.toPhysicalRow(e);pG(I,!0,r,1),eN.createRow(r),eo(t,(t,r)=>{this.setCellMetaObject(e,r,t)})})}),I.render()},this.setCellMetaObject=function(e,t,r){"object"==typeof r&&ed.run("set_cell_meta",void 0,()=>{tI(r,(r,i)=>{this.setCellMeta(e,t,i,r)})})},this._setCellMetaDeclarative=function(e,t,r,i){let[n,o]=tB(e,t);eN.disableUserDefinedMetaRecording();try{eN.setCellMeta(n,o,r,i)}finally{eN.enableUserDefinedMetaRecording()}},this._removeCellMetaByPhysicalIndex=function(e,t,r){ed.run("remove_cell_meta",void 0,()=>{tV(e,t,r,()=>{eN.removeCellMeta(e,t,r)})})},this._setCellMetaByPhysicalIndex=function(e,t,r,i){ed.run("set_cell_meta",void 0,()=>{tV(e,t,r,()=>{eN.setCellMeta(e,t,r,i)})})},this.setCellMeta=function(e,t,r,i){ed.run("set_cell_meta",void 0,()=>{if(!1===I.runHooks("beforeSetCellMeta",e,t,r,i))return;let[n,o]=tB(e,t);tV(n,o,r,()=>{eN.setCellMeta(n,o,r,i)}),I.runHooks("afterSetCellMeta",e,t,r,i)})},this.getCellsMeta=function(){return eN.getCellsMeta()},this.getCellMeta=function(e,t,r={skipMetaExtension:!1}){let i=I.toPhysicalRow(e),n=I.toPhysicalColumn(t);return null===i&&(i=e),null===n&&(n=t),eN.getCellMeta(i,n,{visualRow:e,visualColumn:t,...r})},this.getCellMetaTransient=function(e,t){let r=I.toPhysicalRow(e),i=I.toPhysicalColumn(t);return null===r&&(r=e),null===i&&(i=t),eN.getCellMetaTransient(r,i,{visualRow:e,visualColumn:t})},this.getColumnMeta=function(e){return eN.getColumnMeta(I.toPhysicalColumn(e))},this.getCellMetaAtRow=function(e){return eN.getCellsMetaAtRow(e)},this.isColumnModificationAllowed=function(){return!("object"===I.dataType||eO.columns)},this.getCellRenderer=function(e,t){let r="number"==typeof e?I.getCellMeta(e,t).renderer:e.renderer;return"string"==typeof r?se(r):eG(r)?se("text"):r},this.getCellEditor=function(e,t){let r="number"==typeof e?I.getCellMeta(e,t).editor:e.editor;return"string"==typeof r?nz(r):eG(r)||!0===r?nz("text"):r},this.getCellValidator=function(e,t){let r="number"==typeof e?I.getCellMeta(e,t):e,i="string"==typeof r.validator?sl(r.validator):r.validator;return sN(r.maxLength)?function(e){if(!e)return sO;let t=eY(e)?sI(e):e;return function(e,r){sO.call(this,e,i=>{i?t.call(this,e,r):r(!1)})}}(i):i},this.validateCells=function(e){this._validateCells(e)},this.validateRows=function(e,t){Array.isArray(e)||tf("validateRows parameter `rows` must be an array"),this._validateCells(t,e)},this.validateColumns=function(e,t){Array.isArray(e)||tf("validateColumns parameter `columns` must be an array"),this._validateCells(t,void 0,e)},this._validateCells=function(e,t,r){let i=e3();e&&(i.onQueueEmpty=e);let n=I.countRows()-1;for(;n>=0;){if(void 0!==t&&-1===t.indexOf(n)){n-=1;continue}let e=I.countCols()-1;for(;e>=0;){if(void 0!==r&&-1===r.indexOf(e)){e-=1;continue}i.addValidatorToQueue();let t=n,o=e,s=I.getCellMetaTransient(t,o);if(I.validateCell(tm(t,o,s),s,e=>{if("boolean"!=typeof e&&tf("Validation error: result is not boolean"),!1===e){i.valid=!1;let e=I.getCellMeta(t,o,{skipMetaExtension:!0});e.valid=!1,i1(e)}i.removeValidatorFormQueue()},"validateCells"),!I)return;e-=1}n-=1}i.checkIfQueueIsEmpty()},this.getRowHeader=function(e){let t=eO.rowHeaders,r=e;if(void 0!==r&&(r=I.runHooks("modifyRowHeader",r)),void 0===r){let e=[];oD(I.countRows()-1,t=>{e.push(I.getRowHeader(t))}),t=e}else Array.isArray(t)&&void 0!==t[r]?t=t[r]:i3(t)?t=t(r):t&&"string"!=typeof t&&"number"!=typeof t&&(t=r+1);return t},this.hasRowHeaders=function(){return!!eO.rowHeaders},this.hasColHeaders=function(){if(void 0!==eO.colHeaders&&null!==eO.colHeaders)return!!eO.colHeaders;for(let e=0,t=I.countCols();e<t;e++)if(I.getColHeader(e))return!0;return!1};let tz=!1,tU=null;this.getColHeader=function(e,t=-1){let r=I.runHooks("modifyColHeader",e);if(void 0===r){let e=[],t=I.countCols();for(let r=0;r<t;r++)e.push(I.getColHeader(r));return e}let i=eO.colHeaders,n=eO.columns,o="function"==typeof n?n:null,s=I.toPhysicalColumn(r),l=null;if(null!==o){let e=I.countCols();if(null===tU||tU.columns!==o||tU.columnsLen!==e){let t=[];for(let r=0;r<e;r++)o(r)&&t.push(r);tU={columns:o,columnsLen:e,indexes:t}}l=o(tU.indexes[s])??null}return!1===eO.colHeaders?i=null:l&&l.title?i=l.title:n&&!i3(n)&&n[s]&&n[s].title?i=n[s].title:Array.isArray(eO.colHeaders)&&void 0!==eO.colHeaders[s]?i=eO.colHeaders[s]:i3(eO.colHeaders)?i=eO.colHeaders(s):eO.colHeaders&&"string"!=typeof eO.colHeaders&&"number"!=typeof eO.colHeaders&&(i=dr(r)),i=I.runHooks("modifyColumnHeaderValue",i,e,t)},this._getColWidthFromSettings=function(e){let t;if(e>=0&&(t=I.getCellMeta(0,e).width),null!=(t??=eO.colWidths)){switch(typeof t){case"object":{if(e<0){t=t[e];break}let r=I.toPhysicalColumn(e),i=null===r?e:tq.getDeclaredIndex(r,t);t=null===i?void 0:t[i];break}case"function":t=t((e>=0?I.toPhysicalColumn(e):null)??e)}"string"==typeof t&&(t=Number.parseInt(t,10))}return t??void 0},this.getColWidth=function(e,t){let r=I._getColWidthFromSettings(e);return void 0===(r=I.runHooks("modifyColWidth",r,e,t))&&(r=50),r};let tW=(e,t)=>{let r=eO[e];if("object"!=typeof r&&"function"!=typeof r||t<0)return sD(r,t);let i=I.toPhysicalRow(t);if(null===i)return;if(!Array.isArray(r))return sD(r,i);let n=tX.getDeclaredIndex(e,i);return null===n?void 0:sD(r,n)};this._isRowHeightExact=function(e){return!sF(eO.autoRowSize)&&sL(tW("rowHeights",e))},this._getRowHeightFromSettings=function(e){let t=tW("rowHeights",e),r=sL(t);if(r&&!sF(eO.autoRowSize))return t;let i=I.stylesHandler.getDefaultRowHeight(e),n=void 0!==eO.rowHeights&&null!==eO.rowHeights?t:void 0,o=r?t:tW("minRowHeights",e)??n;return null!=o&&null!==i&&o<i?i:o},this.getRowHeight=function(e,t){let r=I._getRowHeightFromSettings(e);return I.runHooks("modifyRowHeight",r,e,t)},this.countSourceRows=function(){return E.countRows()},this.countSourceCols=function(){return E.countFirstRowKeys()},this.countRows=function(){return R.getLength()},this.countCols=function(){return Math.min(eO.maxCols,I.columnIndexMapper.getNotTrimmedIndexesLength())},this.countRenderedRows=function(){let e=I.view;return e?._wt.drawn?e._wt.wtTable.getRenderedRowsCount():-1},this.countVisibleRows=function(){let e=I.view;return e?._wt.drawn?e._wt.wtTable.getVisibleRowsCount():-1},this.countRenderedCols=function(){let e=I.view;return e?._wt.drawn?e._wt.wtTable.getRenderedColumnsCount():-1},this.countVisibleCols=function(){let e=I.view;return e?._wt.drawn?e._wt.wtTable.getVisibleColumnsCount():-1},this.countRowHeaders=function(){let e=I.view;return e?e.getRowHeadersCount():0},this.countColHeaders=function(){let e=I.view;return e?e.getColumnHeadersCount():0},this.countEmptyRows=function(e=!1){let t=0;return oL(I.countRows()-1,r=>{if(I.isEmptyRow(r))t+=1;else if(!0===e)return!1}),t},this.countEmptyCols=function(e=!1){let t=0;return oL(I.countCols()-1,r=>{if(I.isEmptyCol(r))t+=1;else if(!0===e)return!1}),t},this.isEmptyRow=function(e){return eO.isEmptyRow.call(I,e)},this.isEmptyCol=function(e){return eO.isEmptyCol.call(I,e)},this.selectCell=function(e,t,r,i,n=!0,o=!0){if(eG(e)||eG(t))return!1;let s=[[null==e||Number.isNaN(Number(e))?0:Number(e),null==t||"number"==typeof t&&Number.isNaN(t)?0:t,eG(r)?void 0:r,eG(i)?void 0:i]];return I.selectCells(s,n,o)},this.selectCells=function(e=[[]],t=!0,r=!0){let i;if(!I.view)return!1;!1===t&&M.suspend(),!1===r&&A.suspend();try{i=eP.selectCells(e)}finally{M.resume(),!1===r&&A.resume()}return I&&i&&r&&I.listen(),i};let t$=(e,t)=>{if(!1!==e)return t();A.suspend();try{return t()}finally{A.resume()}};this.selectColumns=function(e,t=e,r,i=!0){return!!I.view&&t$(i,()=>eP.selectColumns(e,t,r))},this.selectRows=function(e,t=e,r,i=!0){return!!I.view&&t$(i,()=>eP.selectRows(e,t,r))},this.deselectCell=function(){eP.deselect()},this.selectAll=function(e=!0,t=e,r,i=!0){I.view&&(M.skipNextScrollCycle(),t$(i,()=>{eP.selectAll(e,t,r)}))};let tG=(e,t)=>e.getNearestNotHiddenIndex(t,1,!0);this.scrollViewportTo=function(e,t){if(!I.view)return!1;"number"==typeof e&&(e={row:arguments[0],col:arguments[1],verticalSnap:arguments[2]?"bottom":"top",horizontalSnap:arguments[3]?"end":"start",considerHiddenIndexes:arguments[4]??!0});let{row:r,col:i,considerHiddenIndexes:n}=e??{},o=r,s=i;if(i3(t)&&this.addHookOnce("afterScroll",t),void 0===n||n){var l,a;let e,t,n,h,d=(l=r,a=i,e=void 0!==l&&Number.isInteger(l)&&l>=0,t=void 0!==a&&Number.isInteger(a)&&a>=0,n=e?tG(I.rowIndexMapper,l):void 0,h=t?tG(I.columnIndexMapper,a):void 0,null!==n&&null!==h&&{renderableRow:e?I.rowIndexMapper.getRenderableFromVisualIndex(n)??void 0:l,renderableColumn:t?I.columnIndexMapper.getRenderableFromVisualIndex(h)??void 0:a});if(!1===d)return!1;o=d.renderableRow,s=d.renderableColumn}let h=Number.isInteger(o),d=Number.isInteger(s),u=!1;return h&&o>=0&&d&&s>=0?u=I.view.scrollViewport(I._createCellCoords(o,s),e.horizontalSnap,e.verticalSnap):h&&o>=0&&(d&&s<0||!d)?u=I.view.scrollViewportVertically(o,e.verticalSnap):d&&s>=0&&(h&&o<0||!h)&&(u=I.view.scrollViewportHorizontally(s,e.horizontalSnap)),i3(t)&&(u?this.view.render():(this.removeHook("afterScroll",t),this._registerMicrotask(()=>t()))),u},this.scrollToFocusedCell=function(e){if(!I.selection.isSelected())return!1;i3(e)&&I.addHookOnce("afterScroll",e);let{highlight:t}=I.getSelectedRangeActive(),r=I.scrollViewportTo(t.toObject());return r?I.view.render():i3(e)&&(I.removeHook("afterScroll",e),I._registerMicrotask(()=>e())),r},this.destroy=function(){j=!0,I.suspendRender(),I._clearTimeouts(),I._clearMicrotasks(),ed.destroy(),eP?.suspendGridTrackingFits(),eh?.disconnect(),eh=null,ev?.disconnect(),ev=null,eE?.(),eE=null,eT?.disconnect(),eT=null,I.view&&I.view.destroy(),E&&E.destroy(),E=null,sC(this)&&(!function(e){if(0===m1.length)return;let t=e?m1.lastIndexOf(e):m1.length-1;if(-1===t)return;if(m1.splice(t,1),0===m1.length){mJ.remove(),mJ=null,m0.remove(),m0=null;return}let r=mJ.parentElement;r&&m1.includes(r)||m1[0].append(mJ,m0)}(I.rootPortalElement),this.getFocusScopeManager().destroy(),tZ?.destroy(),I.themeManager?.destroy()),this.getShortcutManager().destroy(),e_.clear(),eN.clearCache(),w8.delete(this.guid),N.destroy(),x&&x.destroy(),I.rootContainer&&rK(I.rootContainer),I.rootPortalElement&&I.rootPortalElement.remove(),I.batchExecution(()=>{I.rowIndexMapper.destroy(),I.columnIndexMapper.destroy(),eH.getItems().forEach(([,e])=>{e.hot&&e.destroy()}),eH.clear(),I.runHooks("afterDestroy")},!0),nM.getSingleton().destroy(I),tI(I,(e,t,r)=>{var i;i3(e)?r[t]=(i=t,()=>{tf(`The "${i}" method cannot be called because this Handsontable instance has been destroyed`)}):"guid"!==t&&(r[t]=null)}),I.isDestroyed=!0,R&&R.destroy(),R=null,T=null,eP?.destroy(),eP=null,x=null,I=null},this.getActiveEditor=function(){return x?.getActiveEditor()};let tj=e=>{let t=I.view;return t?t[e]():null};this.getFirstRenderedVisibleRow=function(){return tj("getFirstRenderedVisibleRow")},this.getLastRenderedVisibleRow=function(){return tj("getLastRenderedVisibleRow")},this.getFirstRenderedVisibleColumn=function(){return tj("getFirstRenderedVisibleColumn")},this.getLastRenderedVisibleColumn=function(){return tj("getLastRenderedVisibleColumn")},this.getFirstFullyVisibleRow=function(){return tj("getFirstFullyVisibleRow")},this.getLastFullyVisibleRow=function(){return tj("getLastFullyVisibleRow")},this.getFirstFullyVisibleColumn=function(){return tj("getFirstFullyVisibleColumn")},this.getLastFullyVisibleColumn=function(){return tj("getLastFullyVisibleColumn")},this.getFirstPartiallyVisibleRow=function(){return tj("getFirstPartiallyVisibleRow")},this.getLastPartiallyVisibleRow=function(){return tj("getLastPartiallyVisibleRow")},this.getFirstPartiallyVisibleColumn=function(){return tj("getFirstPartiallyVisibleColumn")},this.getLastPartiallyVisibleColumn=function(){return tj("getLastPartiallyVisibleColumn")},this.getPlugin=function(e){return eH.getItem(n4(e))},this.getPluginName=function(e){return eH.getId(e)},this.getInstance=function(){return I},this.addHook=function(e,t,r){nM.getSingleton().add(e,t,I,r)},this.hasHook=function(e){return nM.getSingleton().has(e,I)||nM.getSingleton().has(e)},this.addHookOnce=function(e,t,r){nM.getSingleton().once(e,t,I,r)},this.removeHook=function(e,t){nM.getSingleton().remove(e,t,I)},this.runHooks=function(e,t,r,i,n,o,s){return nM.getSingleton().run(I,e,t,r,i,n,o,s)},this.getTranslatedPhrase=function(e,t){return gB(eO.language,e,t)},this.toHTML=()=>ov(this),this.toTableElement=()=>{let e=I.rootDocument;return oE(I,e)},this.timeouts=[],this.useTheme=e=>{let t=!!F;I.themeManager&&mX(e)&&I.themeManager.getClassName()!==e&&I.themeManager.destroy(),this.stylesHandler.useTheme(e??void 0);let r=this.stylesHandler.getThemeName();!t&&r&&(mK(this.rootContainer)&&(r$(this.rootContainer,/ht-theme-.*/g),rW(this.rootContainer,r)),I.render(),I.scrollViewportTo(0,0)),this.runHooks("afterSetTheme",r,t)},this.getCurrentThemeName=()=>I.stylesHandler.getThemeName()??null,this.getTableHeight=()=>I.rootElement.offsetHeight,this.getTableWidth=()=>I.rootElement.offsetWidth,this._registerTimeout=function(e,t=0){if("function"!=typeof e)return this.timeouts.push(e),e;let r=this.timeouts,i=setTimeout(()=>{let t=r.indexOf(i);-1!==t&&r.splice(t,1),e()},t);return this.timeouts.push(i),i},this._clearTimeouts=function(){eo(this.timeouts,e=>{clearTimeout(e)})},this.microtasks=new Set,this._registerMicrotask=function(e){let t={cancelled:!1};this.microtasks.add(t),this.rootWindow.queueMicrotask(()=>{t.cancelled||(this.microtasks.delete(t),e())})},this._clearMicrotasks=function(){this.microtasks.forEach(e=>{e.cancelled=!0}),this.microtasks.clear()},this._getEditorManager=function(){return x},this._getDataSource=function(){return E},this._alignInsertedRowSizes=function(e,t){tX.alignInsertedRows(e,t)},this._readRowSizeOrigins=function(){return tX.readOrigins()},this._writeRowSizeOrigins=function(e){tX.writeOrigins(e)},this._getMetaManager=function(){return eN};let tY=(({ownerWindow:e,handleEvent:t,beforeKeyDown:r,afterKeyDown:i})=>{let n=oK({errorIdExists:e=>`The "${e}" context name is already registered.`}),o="grid",s=(e,t="table")=>{let r=((e,t="table")=>{let r=oK({errorIdExists:t=>`The "${t}" shortcut is already registered in the "${e}" context.`}),i=null,n=({keys:e,callback:t,group:i,runOnlyIf:n=()=>!0,captureCtrl:o=!1,preventDefault:s=!0,stopPropagation:l=!1,relativeToGroup:a,position:h,forwardToContext:d}={})=>{eG(i)&&tf("You need to define the shortcut's group."),!1===i3(t)&&tf("The shortcut's callback needs to be a function."),!1===Array.isArray(e)&&tf(ey`Pass the shortcut\'s keys as an array of arrays,\x20
|
|
97
97
|
using the KeyboardEvent.key properties:\x20
|
|
98
98
|
declare https: //developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/key/Key_Values.`);let u={callback:t,group:i,runOnlyIf:n,captureCtrl:o,preventDefault:s,stopPropagation:l};e$(a)&&(u.relativeToGroup=a,u.position=h),mx(d)&&(u.forwardToContext=d),e.forEach(e=>{let t=mb(e);if(r.hasItem(t)){let e=r.getItem(t),i=e.findIndex(e=>e.group===a);if(-1!==i)if("before"===h)for(;i>0&&mA(e[i-1],a);)i-=1;else i+=1;else i=e.length;e.splice(i,0,u)}else r.addItem(t,[u])})},o=e=>{let t=mb(e);r.removeItem(t)};return{__kindOf:mT,scope:t,addShortcut:n,addShortcuts:(e,t={})=>{e.forEach(e=>{tI(t,(r,i)=>{!1===Object.prototype.hasOwnProperty.call(e,i)&&(e[i]=t[i])}),n(e)})},getShortcuts:e=>{let t=mb(e),i=r.getItem(t);return e$(i)?i.slice():[]},hasShortcut:e=>{let t=mb(e);return r.hasItem(t)},removeShortcutsByKeys:o,removeShortcutsByGroup:e=>{r.getItems().forEach(([t,r])=>{let i=r.filter(t=>t.group!==e);0===i.length?o(t.split("+")):(r.length=0,r.push(...i))})},setFallbackContext:e=>{i=e},getFallbackContext:()=>i}})(e,t);return n.addItem(e,r),r},l=()=>o,a=e=>n.getItem(e),h=!1,d=!1,u=e=>d&&n.getItems().some(([,t])=>t===e),c=(e,t,r)=>{let i=r.getShortcuts(t),n=!1,o=!1;for(let s=0;s<i.length&&!u(r);s++){let{callback:r,runOnlyIf:l,preventDefault:a,stopPropagation:d,captureCtrl:u,forwardToContext:c}=i[s];if(l?.(e)===!0){if(n=!0,h=u??!1,o=!1===r(e,t),h=!1,a&&e.preventDefault(),d&&(nh(e),e.stopPropagation()),o)break;c&&g(e,t,c)}}return{hasRunAnyShortcut:n,isExecutionCancelled:o}},g=(e,t,r=l())=>{let i=(mx(r)?r:a(r))??null,n=null;for(;null!==i;){let{hasRunAnyShortcut:r,isExecutionCancelled:o}=c(e,t,i);if(r)return o;let s=i.getFallbackContext();if(null===s||((n??=new Set).add(i),n.has(s)))break;i=s}return!1},p=function(e,t,r,i,n,o=null){let s=e=>{if(!1!==t(e)){if(!1===r(e)||229===e.keyCode||"string"!=typeof e.key||nd(e))return;let t=mS(e),o=[];mv.includes(t)||(o=mR(e));let s=n(e,[t].concat(o));!s&&(rt()&&o.includes("meta")||!rt()&&o.includes("control"))&&(s=n(e,[t].concat(mR(e,!0)))),i(e);return}if(!1===i3(o)||229===e.keyCode||"string"!=typeof e.key||nd(e))return;let s=mS(e),l=[];mv.includes(s)||(l=mR(e));let a=o(e,[s].concat(l));!a&&(rt()&&l.includes("meta")||!rt()&&l.includes("control"))&&(a=o(e,[s].concat(mR(e,!0)))),i(e)},l=()=>{mM.releaseAll()};return{mount:()=>{let t=e;for(;t;){let{documentElement:e}=t.document,r=mI.get(e)??0;0===r&&(e.addEventListener("keydown",mO),e.addEventListener("keyup",mk)),mI.set(e,r+1),e.addEventListener("keydown",s),e.addEventListener("blur",l),t=rN(t)}},unmount:()=>{let t=e;for(;t;){let{documentElement:e}=t.document,r=mI.get(e)??0;r<=1?(e.removeEventListener("keydown",mO),e.removeEventListener("keyup",mk),mI.delete(e)):mI.set(e,r-1),e.removeEventListener("keydown",s),e.removeEventListener("blur",l),t=rN(t)}},isPressed:e=>mM.isPressed(e),releasePressedKeys:()=>mM.releaseAll()}}(e,e=>{let r=a(l());return t(e,r?.scope??"table")},r,i,g,(e,t)=>{let r=n.getItems();for(let i=0;i<r.length;i+=1){let[,n]=r[i];if("global"===n.scope&&c(e,t,n).isExecutionCancelled)return!0}return!1});return p.mount(),{addContext:s,getActiveContextName:l,getContext:a,getOrCreateContext:(e,t="table")=>a(e)??s(e,t),setActiveContextName:e=>{n.hasItem(e)||tf(ey`You've tried to activate the "${e}" shortcut context\x20
|
|
99
99
|
that does not exist. Before activation, register the context using the "addContext" method.`),o=e},hasEventShortcut:(e,t)=>{let r=a(e);return!!r&&mE(t,rt).some(e=>r.hasShortcut(e))},isCtrlPressed:()=>!h&&(p.isPressed("control")||p.isPressed("meta")),releasePressedKeys:()=>p.releasePressedKeys(),destroy:()=>{d||(d=!0,p.unmount())}}})({handleEvent:(e,t)=>"global"===t||I.isListening(),beforeKeyDown:e=>I.runHooks("beforeKeyDown",e),afterKeyDown:e=>{this.isDestroyed||I.runHooks("afterDocumentKeyDown",e)},ownerWindow:this.rootWindow}),tK=new wq(I,e=>E.modifyRowData(e)),tq=new p2(I),tX=new p5(I);this.addHook("beforeOnCellMouseDown",e=>{!1===e.ctrlKey&&!1===e.metaKey&&tY.releasePressedKeys()}),this.getShortcutManager=function(){return tY},A=new p9(I);let tQ=sC(this)?function(e){let t=oK({errorIdExists:e=>`The "${e}" focus scope is already registered.`}),r=e.getShortcutManager(),i=null;function n(e,t=me.UNKNOWN){let s=t===me.TAB_FROM_ABOVE||t===me.TAB_FROM_BELOW,l=i===e;if(l&&!s)return;null!==i&&i!==e&&o(i),i=e;let a=r.getActiveContextName();l||(a!==e.getShortcutsContextName()?e.setDisplacedShortcutsContextName(a):null===e.getDisplacedShortcutsContextName()&&e.setDisplacedShortcutsContextName("grid"),r.setActiveContextName(e.getShortcutsContextName())),i.activate(t)}function o(e,t=!0){l(),i===e&&(i=null,t&&s(e),e.deactivate())}function s(e){let t=e.getDisplacedShortcutsContextName();e.setDisplacedShortcutsContextName(null),null===t||null!==i||r.getActiveContextName()===e.getShortcutsContextName()&&r.setActiveContextName(t)}function l(){let r=t.getValues(),n=r.filter(e=>e.runOnlyIf()&&"modal"===e.getType());r.forEach(t=>{n.length>0&&n.includes(t)||0===n.length||t.hasContainerDetached()?t.enable():t.disable(),t===i?a(t,iQ(e.rootDocument))?t.deactivateFocusCatchers():t.activateFocusCatchers():t.runOnlyIf()?t.activateFocusCatchers():t.deactivateFocusCatchers()})}function a(e,t){return!!iG(t)&&(e.contains(t)||iX(t).some(t=>e.contains(t)))}function h(r,s){if(!r.isConnected||!r4(r))return;let l=t.getValues().filter(e=>e.runOnlyIf()),h=!1;l.forEach(t=>{!h&&a(t,r)&&(h=!0,s!==me.UNKNOWN&&e.listen(),n(t,s))}),!h&&i&&(o(i,!1),e.unlisten())}let d=function(e,t={}){let r=!1;function i(e){r||t.onFocus?.(e)}function n(e){t.onClick?.(e)}function o(e){"Tab"===e.key&&t.onTabKeyDown?.(e)}function s(){r=!0}function l(){r=!1}return{mount:()=>{let t=e;for(;t;){let{documentElement:e}=t.document;e.addEventListener("focusin",i),e.addEventListener("click",n),e.addEventListener("keydown",o),e.addEventListener("mousedown",s),e.addEventListener("mouseup",l),t=rN(t)}},unmount:()=>{let t=e;for(;t;){let{documentElement:e}=t.document;e.removeEventListener("focusin",i),e.removeEventListener("click",n),e.removeEventListener("keydown",o),e.removeEventListener("mousedown",s),e.removeEventListener("mouseup",l),t=rN(t)}}}}(e.rootWindow,{onFocus:e=>{let t=rM(e);h(t,t.dataset.htFocusSource??me.UNKNOWN)},onClick:e=>{h(rM(e),me.CLICK)},onTabKeyDown:()=>{l()}});return d.mount(),{getActiveScopeId:function(){return i?t.getId(i):null},isGridBodyCovered:function(){return t.getValues().some(e=>e.getCoversGridBody()&&e.runOnlyIf())},registerScope:function(i,n,o={}){t.hasItem(i)&&tf(`Scope with id "${i}" already registered`);let s=function(e,t,r={}){let i,n,o={shortcutsContextName:"grid",type:p7.INLINE,contains:e=>e===t||t.contains(e),runOnlyIf:()=>!0,enableFocusCatchers:!0,...r},s=null,l=!1===o.enableFocusCatchers?null:(i=mt(e,me.TAB_FROM_ABOVE),n=mt(e,me.TAB_FROM_BELOW),t.prepend(i),t.append(n),{activate(){i.tabIndex=0,n.tabIndex=0},deactivate(){i.tabIndex=-1,n.tabIndex=-1},destroy(){i.remove(),n.remove()}});return{getType:()=>o.type,hasContainerDetached:()=>!e.rootWrapperElement.contains(t),getShortcutsContextName:()=>o.shortcutsContextName,getFallbackShortcutsContextName:()=>o.fallbackShortcutsContextName??null,getCoversGridBody:()=>!0===o.coversGridBody,getDisplacedShortcutsContextName:()=>s,setDisplacedShortcutsContextName:e=>{s=e},runOnlyIf:()=>o.runOnlyIf(),contains:e=>o.contains(e),activate:(e=me.UNKNOWN)=>{o.onActivate?.(e)},deactivate:()=>{o.onDeactivate?.()},activateFocusCatchers:()=>{l?.activate()},deactivateFocusCatchers:()=>{l?.deactivate()},enable:()=>{t.removeAttribute("inert")},disable:()=>{t.setAttribute("inert","true")},destroy:()=>{l?.destroy()}}}(e,n,o);t.addItem(i,s);let l=s.getShortcutsContextName(),a=r.getOrCreateContext(l),h=s.getFallbackShortcutsContextName();h===l&&(t.removeItem(i),s.destroy(),tf(`The "${i}" focus scope falls back to its own shortcuts context ("${l}"). \`shortcutsContextName\` defaults to "grid", so a scope that declares only \`fallbackShortcutsContextName\` names the same context twice.`)),t.getValues().find(e=>e!==s&&e.getShortcutsContextName()===l&&e.getFallbackShortcutsContextName()!==h)&&(t.removeItem(i),s.destroy(),tf(`The "${i}" focus scope shares the "${l}" shortcuts context with a scope that declares a different \`fallbackShortcutsContextName\`. The fallback is a property of the context, not of the scope, so scopes sharing a context must agree on it.`)),null!==h&&a.setFallbackContext(r.getOrCreateContext(h))},unregisterScope:function(e){t.hasItem(e)||tf(`Scope with id "${e}" not found`);let i=t.getItem(e);o(i,!1),s(i),null===i.getFallbackShortcutsContextName()||t.getValues().some(e=>e!==i&&e.getShortcutsContextName()===i.getShortcutsContextName()&&e.getFallbackShortcutsContextName()===i.getFallbackShortcutsContextName())||r.getContext(i.getShortcutsContextName())?.setFallbackContext(null),i.destroy(),t.removeItem(e)},activateScope:(e,r)=>(function(e,r=me.UNKNOWN){t.hasItem(e)||tf(`Scope with id "${e}" not found`);let i=r??me.UNKNOWN;n(t.getItem(e),i)})(e,r),deactivateScope:e=>{let r;return t.hasItem(e)||tf(`Scope with id "${e}" not found`),void(o(r=t.getItem(e),!1),s(r))},destroy:()=>d.unmount()}}(I):null,tZ=sC(this)?new m9({top:I.rootSlotTopElement,bottom:I.rootSlotBottomElement}):null;this.getFocusManager=function(){return A},this.getFocusScopeManager=function(){return sC(I)||tf("The FocusScopeManager is only available for the main Handsontable instance."),tQ},this.getLayoutManager=function(){return sC(I)||tf("The LayoutManager is only available for the main Handsontable instance."),tZ};let tJ=ex.theme,t0=ex.themeName,t1=mK(I.rootContainer);sC(I)&&!t1&&(tx(tJ)||!tJ&&!t0)&&e2(tJ,e0(ex)),I.addHook("beforeInit",()=>{var e;let t,r;e=I,t=eH.getItems().map(([,e])=>e).filter(e=>e.hot),r=[],t.forEach(e=>{let t,i,n;e.init();let o=(i=Array.isArray(t=e.constructor.PLUGIN_DEPS)?t:[],n=[],(i.forEach(e=>{let[t,r]=e.split(":");sx.has(t)||tf(`Unknown plugin dependency type "${t}" was found.`),sx.get(t)(r)||n.push(` - ${r} (${t})`)}),0===n.length)?null:`The ${e.pluginName} plugin requires the following modules:
|
|
100
100
|
${n.join("\n")}
|
|
101
101
|
`);null!==o&&r.push(o)}),r.length>0&&tf(`${r.join("\n")}
|
|
102
|
-
You have to import and register them manually.`),e.addHookOnce("afterPluginsInitialized",()=>{t.forEach(e=>e.onInitEnableTurn())}),e.runHooks("afterPluginsInitialized")}),o1().forEach(e=>{let t=o2(e);t&&eH.addItem(e,new t(this))}),s=I,[mY,mj].forEach(e=>e(s)),sC(this)&&(l=I,[mw].forEach(e=>e(l))),tY.setActiveContextName("grid"),nM.getSingleton().run(I,"construct")};sm(yw),st(ys);let yb=function(e,t){let r=new yy(e,t||{},sb);return r.init(),r};function yC(e){let t=e.rootDocument.documentElement.clientWidth;return e.isRtl()?{inlineStartOffset:t-e.rootElement.getBoundingClientRect().right,viewportWidth:t}:{inlineStartOffset:e.rootElement.getBoundingClientRect().left,viewportWidth:t}}function yS(e,t){let r=Math.max(e.top,0);return{top:r,bottom:Math.max(Math.min(e.top+e.height,t),r)}}function yv(e,t,r){let i=yS(t,r);return{spaceAbove:Math.max(e.top-i.top,0),spaceBelow:Math.max(i.bottom-e.bottom,0)}}yb.editors={BaseEditor:n0,TextEditor:yp},yb.dom={empty:rK},yb.helper={},yb.Core=function(e,t={}){return new yy(e,t,sb)},yb.DefaultSettings=pg(),yb.hooks=nM.getSingleton(),yb.CellCoords=l5,yb.CellRange=l4,yb.packageName="handsontable",yb.buildDate="17/11/2026 11:12:30",yb.version="19.0.0-rc2",yb.languages={dictionaryKeys:C,getLanguageDictionary:gF,getLanguagesDictionaries:function(){return gD()},registerLanguageDictionary:gL,getTranslatedPhrase:gB},yb.themes={hasTheme:ww,getTheme:wy,getThemeNames:wb,getThemes:wC,registerTheme:wv,reinitTheme:wR};let yR="handsontableEditor";class yE extends yp{static get EDITOR_TYPE(){return"handsontable"}isFlippedVertically=!1;isFlippedHorizontally=!1;innerSelectionOrigin=null;#dd=!1;#du=0;appliedDropdownHeight=0;resolveInnerSelectionValue(){if(this.htEditor&&this.htEditor.getSelectedActive())return this.htEditor.getValue()}open(){super.open();let e=this.htContainer.style;this.htEditor&&(this.htEditor.rootPortalElement=null,this.htEditor.destroy(),e.width="",e.height="",e.overflow=""),"none"===e.display&&(e.display=""),this.htEditor=new this.hot.constructor(this.htContainer,this.htOptions),this.htEditor.rootPortalElement=this.hot.rootPortalElement,this.htEditor.init(),this.htEditor.rootElement.style.display="",this.cellProperties.strict?(this.htEditor.selectCell(0,0),this.innerSelectionOrigin="auto"):(this.htEditor.deselectCell(),this.innerSelectionOrigin=null),iI(this.TEXTAREA,0,this.TEXTAREA.value.length),this.#du=this.getTargetDropdownHeight(),this.appliedDropdownHeight=this.#du,this.htEditor.updateSettings({width:this.getTargetDropdownWidth(),height:this.#du}),this.refreshDimensions(),this.#dc()}close(){this.htEditor&&(this.htEditor.rootElement.style.display="none"),this.removeHooksByKey("beforeKeyDown"),super.close()}hideForScroll(){return this._opened=!1,this.hideEditableElement(),this.htEditor&&(this.htEditor.rootElement.style.display="none"),!0}showAfterScroll(){this.htEditor&&(this.htEditor.rootElement.style.display="",this.reflowDropdown())}reflowDropdown(){this.flipDropdownVerticallyIfNeeded(),this.flipDropdownHorizontallyIfNeeded()}prepare(e,t,r,i,n,o){super.prepare(e,t,r,i,n,o);let{hot:s}=this,l=this.setValue.bind(this),a=()=>{this.innerSelectionOrigin="user"},h={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(e,t){if(t.row<0||t.col<0)return;let r=this.getDataAtCell(t.row,t.col);a(),void 0!==r&&l(r),s.destroyEditor()},preventWheel:!0,layoutDirection:this.hot.isRtl()?"rtl":"ltr"};this.cellProperties.handsontable&&tb(h,o.handsontable),this.htOptions=h}beginEditing(e,t){let r=this.hot.getSettings().onBeginEditing;r&&!1===r()||super.beginEditing(e,t)}createElements(){super.createElements();let e=this.hot.rootDocument.createElement("DIV");e.className="handsontableEditor",this.TEXTAREA_PARENT.appendChild(e),this.htContainer=e,this.assignHooks()}finishEditing(e,t,r){this.htEditor&&this.htEditor.isListening()&&this.hot.listen();let i=this.resolveInnerSelectionValue();void 0!==i&&this.setValue(i),super.finishEditing(e,t,r)}#dg(){return this.getEditedCell()?.getBoundingClientRect()}#dp(){!this.hot.isDestroyed&&this.htEditor&&"none"!==this.htEditor.rootElement.style.display&&this.getEditedCell()&&(this.flipDropdownVerticallyIfNeeded(),this.flipDropdownHorizontallyIfNeeded())}refreshDimensions(e=!1){super.refreshDimensions(e),this.#dp()}flipDropdownVerticallyIfNeeded(){let e=this.#dg();if(!e)return{isFlipped:!1,spaceAbove:0,spaceBelow:0};let{spaceAbove:t,spaceBelow:r}=yv(e,this.#dm(),this.hot.rootDocument.documentElement.clientHeight),i=this.getDropdownHeight()>r&&t>r+e.height;return i?this.flipDropdownVertically():this.unflipDropdownVertically(),this.limitDropdownIfNeeded(i?t:r),{isFlipped:i,spaceAbove:t,spaceBelow:r}}limitDropdownIfNeeded(e){let t=this.htEditor.stylesHandler.getDefaultRowHeight()??0,r=Math.max(Math.min(this.#du,e),t||1);r!==this.appliedDropdownHeight&&(this.appliedDropdownHeight=r,this.htEditor.updateSettings({height:r}),this.replaceDropdownVertically())}replaceDropdownVertically(){this.isFlippedVertically?this.flipDropdownVertically():this.unflipDropdownVertically()}flipDropdownVertically(){this.#df(this.#dw().top-this.getDropdownHeight()),this.isFlippedVertically=!0}unflipDropdownVertically(){this.#df(this.#dw().bottom),this.isFlippedVertically=!1}flipDropdownHorizontallyIfNeeded(){let{view:e}=this.hot,t=this.getEditedCellRect();if(!t)return{isFlipped:!1,spaceInlineStart:0,spaceInlineEnd:0};let r=t.start+t.width,i=e.getWorkspaceWidth();if(e.isHorizontallyScrollableByWindow()){let e=yC(this.hot);r=Math.max(r+e.inlineStartOffset,0),i=e.viewportWidth}let n=this.getDropdownWidth(),o=i-r+t.width,s=n>o&&r>o;return s?this.flipDropdownHorizontally():this.unflipDropdownHorizontally(),{isFlipped:s,spaceInlineStart:r,spaceInlineEnd:o}}flipDropdownHorizontally(){let{width:e}=this.getEditedCellRect()??{width:0};this.#dy(-(this.getDropdownWidth()-e)),this.isFlippedHorizontally=!0}unflipDropdownHorizontally(){this.#dy(0),this.isFlippedHorizontally=!1}#dy(e){let t=this.htEditor.rootElement.style,r=this.#dw(),i=this.#dm();if(t.position="fixed",this.hot.isRtl()){t.left="",t.right=`${i.left+i.width-r.right+e}px`;return}t.right="",t.left=`${r.left+e-i.left}px`}#df(e){let t=this.htEditor.rootElement.style,r=this.#dm(),i=yS(r,this.hot.rootDocument.documentElement.clientHeight),n=this.getDropdownHeight(),o=Math.max(i.bottom-n,i.top),s=Math.min(Math.max(e,i.top),o);t.position="fixed",t.top=`${s-r.top}px`}#dm(){return ip(this.htEditor.rootElement)}#dc(){this.#dd||(this.eventManager.addEventListener(this.hot.rootDocument,"scroll",e=>{this.hot.isDestroyed||!this.hot.rootElement||iG(e.target)&&this.hot.rootElement.contains(e.target)||this.#dp()},{capture:!0,passive:!0}),this.#dd=!0,this.eventManager.addEventListener(this.hot.rootWindow,"resize",()=>this.#dp(),{passive:!0}))}#dw(){return this.TEXTAREA_PARENT.getBoundingClientRect()}getDropdownHeight(){return this.htEditor.getTableHeight()}getDropdownWidth(){return this.htEditor.getTableWidth()}getTargetDropdownWidth(){return this.htEditor.view.getTableWidth()}getTargetDropdownHeight(){return this.htEditor.view.getTableHeight()+1}assignHooks(){this.hot.addHook("afterDestroy",()=>{this.htEditor&&(this.htEditor.rootPortalElement=null,this.htEditor.destroy())}),this.hot.addHook("afterSetTheme",(e,t)=>{t||this.close()})}registerShortcuts(){let e=this.hot.getShortcutManager().getContext("editor");super.registerShortcuts();let t=(e,t)=>{let r=this.htEditor;if(void 0!==e&&(e<0||this.isFlippedVertically&&e>r.countRows()-1?(r.deselectCell(),this.innerSelectionOrigin=null):(r.selectCell(e,0),this.innerSelectionOrigin="user"),r.getData().length))return t.preventDefault(),nh(t),this.hot.listen(),this.TEXTAREA.focus(),!1};e.addShortcuts([{keys:[["ArrowUp"]],callback:e=>{let r,i=this.htEditor;if(!i.getSelectedActive()&&this.isFlippedVertically)r=i.countRows()-1;else if(i.getSelectedActive()){let e=i.getSelectedActive();r=this.isFlippedVertically?Math.max(0,e[0]-1):e[0]-1}return t(r,e)},preventDefault:!1},{keys:[["ArrowDown"]],callback:e=>{let r,i=this.htEditor;if(i.getSelectedActive()||this.isFlippedVertically){if(i.getSelectedActive()){let e=i.getSelectedActive();this.isFlippedVertically?r=e[0]+1:this.isFlippedVertically||(r=Math.min(i.countRows()-1,e[0]+1))}}else r=0;return t(r,e)},preventDefault:!1}],{group:yR,relativeToGroup:ml,position:"before"})}unregisterShortcuts(){super.unregisterShortcuts(),this.hot.getShortcutManager().getContext("editor").removeShortcutsByGroup(yR)}}function yT(e){return tF(e)}function yx(e,t){return tx(e)&&t?"function"==typeof t?t(e):"string"!=typeof t?e:t.split(".").reduce((e,t)=>tx(e)||Array.isArray(e)?e[t]:void 0,e):e}function yA(e,t,r){return!(t&&yT(e)&&tx(e.value))||""!==eW(r)}function yM(e,t,r=!1,i){if(!Array.isArray(e))return;let n=eW(t);return e.find(e=>{let t;return t=eW(yT(e)?yx(e.value,i):e),(r?t:on(t))===n})}class yI extends yE{static get EDITOR_TYPE(){return"autocomplete"}query=null;strippedChoices=[];rawChoices=[];#db=this.hot.guid.slice(0,9);#dC=0;#dS=0;#dv=new Set;#dR=null;getValue(){if(""===this.TEXTAREA.value)return this.TEXTAREA.value;let e=yM(this.rawChoices,this.TEXTAREA.value,!0===this.cellProperties.allowHtml,this.cellProperties.sourceLabel);return e$(e)?e:this.TEXTAREA.value}createElements(){super.createElements(),this.eventManager.addEventListener(this.TEXTAREA,"input",()=>{this.innerSelectionOrigin=null}),rW(this.htContainer,"autocompleteEditor"),rW(this.htContainer,-1===this.hot.rootWindow.navigator.platform.indexOf("Mac")?"":"htMacScroll"),this.hot.getSettings().ariaTags&&rG(this.TEXTAREA,[["type","text"],["role","combobox"],V("listbox"),["aria-autocomplete","list"]])}prepare(e,t,r,i,n,o){super.prepare(e,t,r,i,n,o),this.hot.getSettings().ariaTags&&rG(this.TEXTAREA,[G("false"),["aria-controls",`${this.#db}-listbox-${e}-${t}`]]),this.htOptions={...this.htOptions,valueGetter:e=>yT(e)?e.value:e}}beginEditing(e,t){if(this.state!==nJ.VIRGIN)return void super.beginEditing(e,t);let r="string"!=typeof e&&this.isInFullEditMode();this.#dR=null,super.beginEditing(e,t),r&&this.isOpened()&&(this.#dR=this.TEXTAREA.value)}open(){this.strippedChoices=[],this.rawChoices=[],super.open();let e=this.cellProperties.trimDropdown,t=void 0===e||e,r=this.hot.getSettings().ariaTags,i=Array.isArray(this.cellProperties.source)?this.cellProperties.source:null,n=i?.length,{row:o,col:s}=this;if(this.showEditableElement(),this.focus(),this.addHook("beforeKeyDown",e=>this.onBeforeKeyDown(e)),this.htEditor.addHook("afterScroll",this.#dE),this.htEditor.updateSettings({colWidths:t?[ib(this.TEXTAREA)-2]:void 0,autoColumnSize:!0,modifyColWidth:t?void 0:e=>Math.max(e??0,ib(this.TEXTAREA)-2),renderer:(e,t,o,s,l,a,h)=>{yf(e,t,o,s,l,a,h);let{filteringCaseSensitive:d,allowHtml:u}=this.cellProperties,c=this.cellProperties.locale,g=this.query,p=eW(a);if(u)rJ(t,p,!1,"html",this.hot.rootElement);else if(p&&g&&g.length>0){let r=!0===d?p.indexOf(g):ou(p,c).indexOf(ou(g,c));if(-1!==r){let i=p.slice(r,r+g.length),{rootDocument:n}=e;rK(t),t.appendChild(n.createTextNode(p.slice(0,r)));let o=n.createElement("strong");o.textContent=i,t.appendChild(o),t.appendChild(n.createTextNode(p.slice(r+g.length)))}}r&&rG(t,[["role","option"],...i?[X(n??0)]:[],...i?[Q(i.indexOf(a)+1)]:[],["id",`${this.htEditor.rootElement.id}_${o}-${s}`]])},afterSelectionEnd:(e,t)=>{if(r){let r=e=>{rG(e,[q()]),rG(this.TEXTAREA,"aria-activedescendant",e.id)},i=this.htEditor.getCell(e,t,!0);null!==i?r(i):this.htEditor.addHookOnce("afterScrollVertically",()=>{let i=this.htEditor.getCell(e,t,!0);null!==i&&r(i)})}}}),r){let e=R();rG(this.htEditor.view._wt.wtOverlays.wtTable.TABLE,e[0],e[1]),rG(this.htEditor.rootElement,[N(),["aria-live","polite"],["aria-relevant","text"],["id",`${this.#db}-listbox-${o}-${s}`]]),rG(this.TEXTAREA,...G("true"))}this.#dT()}#dx(){return this.stripValueIfNeeded(this.getValue())}#dA(e,t){let r=this.cellProperties.sortByRelevance,i=this.cellProperties.filter,n=yT(t)?t.value:t,o=null,s=e;r||(s=[...s].sort(this.#dM()));let l=String(n),{matchedIndexes:a,equalPosition:h}=this.#dI(s,l),d=h??this.#dN();return!1===i?l.length>0&&null!==d&&(o=a[d]??null):(s=a.map(e=>s[e]),o=d),{choices:s,highlightIndex:o}}#dI(e,t){let{filter:r,filteringCaseSensitive:i,strict:n}=this.cellProperties,o=this.cellProperties.locale,s=!1!==r,l=s||!0===n&&""!==t,a=e=>i?e:ou(e,o),h=a(t),d=[],u=null,c=null;for(let r=0;r<e.length;r++){let i=e[r],n=on(eW(yT(i)?i.value:i)),o=a(n);if(-1===o.indexOf(h))continue;let g=o===h;if((s||g||0===d.length)&&d.push(r),g&&null===u&&(u=d.length-1),null===c&&n===t&&(c=d.length-1),!s&&(!l||null!==c))break}return{matchedIndexes:d,equalPosition:c??u}}#dN(){return this.#dO()?null:0}#dO(){let e=this.#dR;return null!==e&&""!==e&&this.TEXTAREA.value===e}isEditUnchanged(e,t){return super.isEditUnchanged(e,t)||"user"!==this.innerSelectionOrigin&&this.#dO()}resetValueBeforeEdit(){super.resetValueBeforeEdit(),null!==this.#dR&&(this.#dR=this.TEXTAREA.value)}#dM(){if(!this.#dk())return(e,t)=>eW(e).localeCompare(eW(t));let e=e=>eW(yT(e)?e.value:e);return(t,r)=>e(t).localeCompare(e(r))}#dT(e=0){let t=this.hot._registerTimeout(()=>{this.#dv.delete(t),this.queryChoices(this.TEXTAREA.value)},e);this.#dv.add(t)}resolveInnerSelectionValue(){if("user"===this.innerSelectionOrigin)return super.resolveInnerSelectionValue();if(!0!==this.cellProperties.strict||this.#dO())return;let{choices:e,highlightIndex:t}=this.#dA(this.strippedChoices,this.#dx());if(null===t||t>=e.length)return;let r=e[t];return yT(r)?r.value:r}close(){this.#dH(),this.#dR=null,this.removeHooksByKey("beforeKeyDown"),super.close(),this.hot.getSettings().ariaTags&&rG(this.TEXTAREA,[G("false")])}#dH(){this.#dE.cancel(),this.#dv.forEach(e=>clearTimeout(e)),this.#dv.clear(),this.#dS+=1}hideForScroll(){return this.#dH(),this.hot.getSettings().ariaTags&&rG(this.TEXTAREA,[G("false")]),super.hideForScroll()}showAfterScroll(){this.htEditor&&this.strippedChoices.length>0&&(super.showAfterScroll(),this.hot.getSettings().ariaTags&&rG(this.TEXTAREA,[G("true")]))}reflowDropdown(){this.updateDropdownDimensions(),super.reflowDropdown()}discardEditor(e){super.discardEditor(e),this.hot.view.render()}queryChoices(e){if(this.state!==nJ.EDITING&&this.state!==nJ.WAITING||!this._opened)return;let t=this.cellProperties.source,r=this.#dC+1,i=this.#dS;this.#dC=r,this.query=e,"function"==typeof t?t.call(this.cellProperties,e,e=>{this.hot.isDestroyed||i!==this.#dS||r!==this.#dC||(this.rawChoices=e,this.updateChoicesList(this.stripValuesIfNeeded(this.#d_(e))))}):Array.isArray(t)?(this.rawChoices=t,this.updateChoicesList(this.stripValuesIfNeeded(this.#d_(t)))):this.updateChoicesList([])}updateChoicesList(e){let t=iT(this.TEXTAREA),r=ix(this.TEXTAREA),{choices:i,highlightIndex:n}=this.#dA(e,this.#dx());if(this.strippedChoices=i,0===i.length?this.htEditor.rootElement.style.display="none":this.htEditor.rootElement.style.display="",this.htEditor.loadData(et([i])),i.length>0){if(this.updateDropdownDimensions(),this.flipDropdownVerticallyIfNeeded(),this.flipDropdownHorizontallyIfNeeded(),!0===this.cellProperties.strict){let e=n??void 0;this.highlightBestMatchingChoice(e),this.innerSelectionOrigin=void 0===e?null:"auto"}}else this.innerSelectionOrigin=null,rj(this.TEXTAREA,"aria-activedescendant");this.hot.listen(),iI(this.TEXTAREA,t,t===r?void 0:r)}limitDropdownIfNeeded(e){let t=this.getTargetEditorHeight();if(t>e){let t=this.htEditor.stylesHandler.getDefaultRowHeight()??0;if(0===t)return;let r=Math.max(Math.ceil(e/t)-1,1);this.setDropdownHeight(r*t),this.replaceDropdownVertically()}else this.getDropdownHeight()<t&&(this.updateDropdownDimensions(),this.replaceDropdownVertically())}updateDropdownDimensions(){let e=iN(),t=this.getTargetEditorWidth()+e,r=this.getTargetEditorHeight()+e;this.appliedDropdownHeight=r,this.htEditor.updateSettings({width:t,height:r}),this.#dP(),this.htEditor.view._wt.wtTable.alignOverlaysWithTrimmingContainer()}setDropdownHeight(e){e!==this.appliedDropdownHeight&&(this.appliedDropdownHeight=e,this.htEditor.updateSettings({height:e}),this.#dP(),this.htEditor.view._wt.wtTable.alignOverlaysWithTrimmingContainer())}highlightBestMatchingChoice(e){"number"==typeof e?this.htEditor.selectCell(e,0,void 0,void 0,void 0,!1):(this.htEditor.deselectCell(),rj(this.TEXTAREA,"aria-activedescendant"))}getTargetEditorHeight(){let e=0;if(!this.hot.getCurrentThemeName()){let t=this.htContainer.querySelector(".htCore");if(t){let r=this.hot.rootWindow.getComputedStyle(t);e=parseInt(r.borderTopWidth,10)+parseInt(r.borderBottomWidth,10)}}return Array.from({length:Math.min(this.cellProperties.visibleRows,this.strippedChoices.length)},(e,t)=>t).reduce((e,t)=>e+((this.hot.stylesHandler.getDefaultRowHeight()??0)+ +(0===t)),0)+e}getTargetEditorWidth(){let e=0;if(!this.hot.getCurrentThemeName()){let t=this.htContainer.querySelector(".htCore");if(t){let r=this.hot.rootWindow.getComputedStyle(t);e=parseInt(r.borderInlineStartWidth,10)+parseInt(r.borderInlineEndWidth,10)}}return this.htEditor.getColWidth(0)+e}stripValueIfNeeded(e){return this.stripValuesIfNeeded([e])[0]}stripValuesIfNeeded(e){let{allowHtml:t,sourceLabel:r}=this.cellProperties,i=e=>eW(t?e:on(String(e)));return e.every(e=>yT(e))?e.map(e=>{let t=yx(e.value,r);return{key:i(e.key),value:i(t===e.value?t:eW(t))}}):e.map(e=>{if(yT(e)){let t=yx(e.value,r);if(r||t!==e.value)return i(eW(t))}return i(e)})}#dk(){return!!this.cellProperties.sourceLabel&&this.rawChoices.some(e=>yT(e)&&tx(e.value))}#d_(e){let{sourceLabel:t}=this.cellProperties;return t?e.filter(e=>!(t&&yT(e)&&tx(e.value))||yA(e,t,yx(e.value,t))):e}#dE=i4(()=>{this.focus()},100);#dP(){this.htEditor.view.hasVerticalScroll()&&this.htEditor.updateSettings({width:this.getTargetEditorWidth()+iO(this.hot.rootDocument)})}onBeforeKeyDown(e){if(nn(e.keyCode)||e.keyCode===nr.BACKSPACE||e.keyCode===nr.DELETE||e.keyCode===nr.INSERT){let t=10;e.keyCode===nr.C&&(e.ctrlKey||e.metaKey)||(this.isOpened()||(t+=10),this.#dT(t))}}}class yN extends n0{static get EDITOR_TYPE(){return"checkbox"}beginEditing(e,t){if(t&&"mouseup"===t.type&&"TD"===rA(t).nodeName){let e=this.TD.querySelector('input[type="checkbox"]');rU(e,"htBadValue")||e.click()}}finishEditing(){}init(){}open(){}close(){}getValue(){}setValue(){}focus(){}}let yO=/^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12]\d|3[01])$/;function yk(e){let t=new Date(e);return Number.isNaN(new Date(`${e}T00:00`).getDate())?t:new Date(t.getTime()+6e4*t.getTimezoneOffset())}function yH(e){if(ej(e))return null;if("string"==typeof e&&yO.test(e)){let[t,r,i]=e.split("-").map(Number),n=new Date(t,r-1,i);return t<100&&(n.setFullYear(t,r-1,i),n.setHours(0,0,0,0)),n}return null}let y_=[31,28,31,30,31,30,31,31,30,31,30,31];function yP(e){return e%4==0&&e%100!=0||e%400==0}function yD(e){if("string"!=typeof e||!yO.test(e))return!1;let t=+e.slice(0,4),r=+e.slice(5,7);return+e.slice(8,10)<=(2===r&&yP(t)?29:y_[r-1])}let yL=/^([01]\d|2[0-3]):([0-5]\d)(?::([0-5]\d)(?:\.(\d{1,3}))?)?$/;function yF(e){if(ej(e)||"string"!=typeof e)return null;let t=yL.exec(e);if(!t)return null;let r=Number(t[1]),i=Number(t[2]),n=void 0!==t[3]?Number(t[3]):0,o=t[4];return new Date(1970,0,1,r,i,n,void 0!==o?Number(o.padEnd(3,"0").slice(0,3)):0)}function yB(e){return"string"==typeof e&&yL.test(e)}let yV=/^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12]\d|3[01])(?:[T ]([01]\d|2[0-3]):([0-5]\d)(?::([0-5]\d)(?:\.(\d{1,3}))?)?)?$/;function yz(e){if(ej(e)||"string"!=typeof e)return null;let t=yV.exec(e);if(!t)return null;let[r]=e.split(/[T ]/),[i,n,o]=r.split("-").map(Number),s=void 0!==t[3]?Number(t[3]):0,l=void 0!==t[4]?Number(t[4]):0,a=void 0!==t[5]?Number(t[5]):0,h=void 0!==t[6]?Number(t[6].padEnd(3,"0").slice(0,3)):0,d=new Date(i,n-1,o,s,l,a,h);return i<100&&(d.setFullYear(i,n-1,o),d.setHours(s,l,a,h)),d}function yU(e){if("string"!=typeof e)return!1;let t=yV.exec(e);if(!t)return!1;let r=+e.slice(0,4),i=+t[1];return+t[2]<=(2===i&&yP(r)?29:y_[i-1])}function yW(){let e=new Date;return new Date(e.getFullYear(),e.getMonth(),e.getDate())}function y$(e){let t=yW();return t.setDate(t.getDate()+e),t}function yG(e,t){return e.getFullYear()===t.getFullYear()&&e.getMonth()===t.getMonth()&&e.getDate()===t.getDate()}let yj=new Map,yY=[new Date(2024,0,1),new Date(2024,6,1)];function yK(e,t){let r=void 0===e||"string"==typeof e?e:`\u0000${String(e)}`,i=yj.get(r);void 0===i&&(i=new Map,yj.set(r,i));let n=`${yY[0].getTimezoneOffset()},${yY[1].getTimezoneOffset()}`,o=`${n}:${JSON.stringify(t)}`,s=i.get(o);return void 0===s&&(s=new Intl.DateTimeFormat(e,t),i.set(o,s)),s}function yq(e,t,r){let i=yK(e,t);if(r.getFullYear()>=1||void 0!==t.era)return i.format(r);let{year:n,calendar:o}=i.resolvedOptions();return void 0===n||"gregory"!==o?i.format(r):yK(e,{...t,era:"short"}).format(r)}function yX(e,t){if(!t?.type.startsWith("key"))try{e.showPicker()}catch{}}function yQ(e,t){iQ(e.rootDocument)===t&&function(e){try{return e.matches(":open")}catch{return!0}}(t)&&(t.blur(),e.getFocusManager().focusOnHighlightedCell())}class yZ extends yp{#dD=!1;#dL=!1;static get EDITOR_TYPE(){return"date"}get capsLength(){return!1}init(){super.init(),this.hot.addHook("afterSetTheme",(e,t)=>{t||this.close()})}prepare(e,t,r,i,n,o){super.prepare(e,t,r,i,n,o),void 0!==o.datePickerConfig&&rs(this.hot.rootElement,"datePickerConfig",'The "datePickerConfig" option is not supported. The native date input is used instead of Pikaday.');let s=this.hot.toPhysicalRow(e);this.originalValue=this.hot.getSourceDataAtCell(s,t)}createElements(e){super.createElements("input"),this.TEXTAREA.setAttribute("type","date"),this.eventManager.addEventListener(this.TEXTAREA,"input",()=>{this.#dD=!0})}beginEditing(e,t){this.state===nJ.VIRGIN&&(this.#dD=!1,this.#dL=!1),super.beginEditing(e,t)}finishEditing(e,t,r){let i=this.state===nJ.EDITING&&this.#dF(t);super.finishEditing(e||i,t,r)}#dF(e){let t=this.TEXTAREA;return""===t.value&&(!1!==this.cellProperties.allowEmpty||!1!==this.cellProperties.allowInvalid)&&(ej(this.originalValue)?!0===e&&t.validity.badInput:t.validity.badInput||!this.#dL&&!this.#dD)}setValue(e){if(ej(e)&&(e=this.cellProperties.defaultDate),!yD(e)){rn(ey`DateEditor: value must be in ISO date format ("YYYY-MM-DD")\x20
|
|
102
|
+
You have to import and register them manually.`),e.addHookOnce("afterPluginsInitialized",()=>{t.forEach(e=>e.onInitEnableTurn())}),e.runHooks("afterPluginsInitialized")}),o1().forEach(e=>{let t=o2(e);t&&eH.addItem(e,new t(this))}),s=I,[mY,mj].forEach(e=>e(s)),sC(this)&&(l=I,[mw].forEach(e=>e(l))),tY.setActiveContextName("grid"),nM.getSingleton().run(I,"construct")};sm(yw),st(ys);let yb=function(e,t){let r=new yy(e,t||{},sb);return r.init(),r};function yC(e){let t=e.rootDocument.documentElement.clientWidth;return e.isRtl()?{inlineStartOffset:t-e.rootElement.getBoundingClientRect().right,viewportWidth:t}:{inlineStartOffset:e.rootElement.getBoundingClientRect().left,viewportWidth:t}}function yS(e,t){let r=Math.max(e.top,0);return{top:r,bottom:Math.max(Math.min(e.top+e.height,t),r)}}function yv(e,t,r){let i=yS(t,r);return{spaceAbove:Math.max(e.top-i.top,0),spaceBelow:Math.max(i.bottom-e.bottom,0)}}yb.editors={BaseEditor:n0,TextEditor:yp},yb.dom={empty:rK},yb.helper={},yb.Core=function(e,t={}){return new yy(e,t,sb)},yb.DefaultSettings=pg(),yb.hooks=nM.getSingleton(),yb.CellCoords=l5,yb.CellRange=l4,yb.packageName="handsontable",yb.buildDate="20/11/2026 12:42:43",yb.version="19.0.0-rc4",yb.languages={dictionaryKeys:C,getLanguageDictionary:gF,getLanguagesDictionaries:function(){return gD()},registerLanguageDictionary:gL,getTranslatedPhrase:gB},yb.themes={hasTheme:ww,getTheme:wy,getThemeNames:wb,getThemes:wC,registerTheme:wv,reinitTheme:wR};let yR="handsontableEditor";class yE extends yp{static get EDITOR_TYPE(){return"handsontable"}isFlippedVertically=!1;isFlippedHorizontally=!1;innerSelectionOrigin=null;#dd=!1;#du=0;appliedDropdownHeight=0;resolveInnerSelectionValue(){if(this.htEditor&&this.htEditor.getSelectedActive())return this.htEditor.getValue()}open(){super.open();let e=this.htContainer.style;this.htEditor&&(this.htEditor.rootPortalElement=null,this.htEditor.destroy(),e.width="",e.height="",e.overflow=""),"none"===e.display&&(e.display=""),this.htEditor=new this.hot.constructor(this.htContainer,this.htOptions),this.htEditor.rootPortalElement=this.hot.rootPortalElement,this.htEditor.init(),this.htEditor.rootElement.style.display="",this.cellProperties.strict?(this.htEditor.selectCell(0,0),this.innerSelectionOrigin="auto"):(this.htEditor.deselectCell(),this.innerSelectionOrigin=null),iI(this.TEXTAREA,0,this.TEXTAREA.value.length),this.#du=this.getTargetDropdownHeight(),this.appliedDropdownHeight=this.#du,this.htEditor.updateSettings({width:this.getTargetDropdownWidth(),height:this.#du}),this.refreshDimensions(),this.#dc()}close(){this.htEditor&&(this.htEditor.rootElement.style.display="none"),this.removeHooksByKey("beforeKeyDown"),super.close()}hideForScroll(){return this._opened=!1,this.hideEditableElement(),this.htEditor&&(this.htEditor.rootElement.style.display="none"),!0}showAfterScroll(){this.htEditor&&(this.htEditor.rootElement.style.display="",this.reflowDropdown())}reflowDropdown(){this.flipDropdownVerticallyIfNeeded(),this.flipDropdownHorizontallyIfNeeded()}prepare(e,t,r,i,n,o){super.prepare(e,t,r,i,n,o);let{hot:s}=this,l=this.setValue.bind(this),a=()=>{this.innerSelectionOrigin="user"},h={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(e,t){if(t.row<0||t.col<0)return;let r=this.getDataAtCell(t.row,t.col);a(),void 0!==r&&l(r),s.destroyEditor()},preventWheel:!0,layoutDirection:this.hot.isRtl()?"rtl":"ltr"};this.cellProperties.handsontable&&tb(h,o.handsontable),this.htOptions=h}beginEditing(e,t){let r=this.hot.getSettings().onBeginEditing;r&&!1===r()||super.beginEditing(e,t)}createElements(){super.createElements();let e=this.hot.rootDocument.createElement("DIV");e.className="handsontableEditor",this.TEXTAREA_PARENT.appendChild(e),this.htContainer=e,this.assignHooks()}finishEditing(e,t,r){this.htEditor&&this.htEditor.isListening()&&this.hot.listen();let i=this.resolveInnerSelectionValue();void 0!==i&&this.setValue(i),super.finishEditing(e,t,r)}#dg(){return this.getEditedCell()?.getBoundingClientRect()}#dp(){!this.hot.isDestroyed&&this.htEditor&&"none"!==this.htEditor.rootElement.style.display&&this.getEditedCell()&&(this.flipDropdownVerticallyIfNeeded(),this.flipDropdownHorizontallyIfNeeded())}refreshDimensions(e=!1){super.refreshDimensions(e),this.#dp()}flipDropdownVerticallyIfNeeded(){let e=this.#dg();if(!e)return{isFlipped:!1,spaceAbove:0,spaceBelow:0};let{spaceAbove:t,spaceBelow:r}=yv(e,this.#dm(),this.hot.rootDocument.documentElement.clientHeight),i=this.getDropdownHeight()>r&&t>r+e.height;return i?this.flipDropdownVertically():this.unflipDropdownVertically(),this.limitDropdownIfNeeded(i?t:r),{isFlipped:i,spaceAbove:t,spaceBelow:r}}limitDropdownIfNeeded(e){let t=this.htEditor.stylesHandler.getDefaultRowHeight()??0,r=Math.max(Math.min(this.#du,e),t||1);r!==this.appliedDropdownHeight&&(this.appliedDropdownHeight=r,this.htEditor.updateSettings({height:r}),this.replaceDropdownVertically())}replaceDropdownVertically(){this.isFlippedVertically?this.flipDropdownVertically():this.unflipDropdownVertically()}flipDropdownVertically(){this.#df(this.#dw().top-this.getDropdownHeight()),this.isFlippedVertically=!0}unflipDropdownVertically(){this.#df(this.#dw().bottom),this.isFlippedVertically=!1}flipDropdownHorizontallyIfNeeded(){let{view:e}=this.hot,t=this.getEditedCellRect();if(!t)return{isFlipped:!1,spaceInlineStart:0,spaceInlineEnd:0};let r=t.start+t.width,i=e.getWorkspaceWidth();if(e.isHorizontallyScrollableByWindow()){let e=yC(this.hot);r=Math.max(r+e.inlineStartOffset,0),i=e.viewportWidth}let n=this.getDropdownWidth(),o=i-r+t.width,s=n>o&&r>o;return s?this.flipDropdownHorizontally():this.unflipDropdownHorizontally(),{isFlipped:s,spaceInlineStart:r,spaceInlineEnd:o}}flipDropdownHorizontally(){let{width:e}=this.getEditedCellRect()??{width:0};this.#dy(-(this.getDropdownWidth()-e)),this.isFlippedHorizontally=!0}unflipDropdownHorizontally(){this.#dy(0),this.isFlippedHorizontally=!1}#dy(e){let t=this.htEditor.rootElement.style,r=this.#dw(),i=this.#dm();if(t.position="fixed",this.hot.isRtl()){t.left="",t.right=`${i.left+i.width-r.right+e}px`;return}t.right="",t.left=`${r.left+e-i.left}px`}#df(e){let t=this.htEditor.rootElement.style,r=this.#dm(),i=yS(r,this.hot.rootDocument.documentElement.clientHeight),n=this.getDropdownHeight(),o=Math.max(i.bottom-n,i.top),s=Math.min(Math.max(e,i.top),o);t.position="fixed",t.top=`${s-r.top}px`}#dm(){return ip(this.htEditor.rootElement)}#dc(){this.#dd||(this.eventManager.addEventListener(this.hot.rootDocument,"scroll",e=>{this.hot.isDestroyed||!this.hot.rootElement||iG(e.target)&&this.hot.rootElement.contains(e.target)||this.#dp()},{capture:!0,passive:!0}),this.#dd=!0,this.eventManager.addEventListener(this.hot.rootWindow,"resize",()=>this.#dp(),{passive:!0}))}#dw(){return this.TEXTAREA_PARENT.getBoundingClientRect()}getDropdownHeight(){return this.htEditor.getTableHeight()}getDropdownWidth(){return this.htEditor.getTableWidth()}getTargetDropdownWidth(){return this.htEditor.view.getTableWidth()}getTargetDropdownHeight(){return this.htEditor.view.getTableHeight()+1}assignHooks(){this.hot.addHook("afterDestroy",()=>{this.htEditor&&(this.htEditor.rootPortalElement=null,this.htEditor.destroy())}),this.hot.addHook("afterSetTheme",(e,t)=>{t||this.close()})}registerShortcuts(){let e=this.hot.getShortcutManager().getContext("editor");super.registerShortcuts();let t=(e,t)=>{let r=this.htEditor;if(void 0!==e&&(e<0||this.isFlippedVertically&&e>r.countRows()-1?(r.deselectCell(),this.innerSelectionOrigin=null):(r.selectCell(e,0),this.innerSelectionOrigin="user"),r.getData().length))return t.preventDefault(),nh(t),this.hot.listen(),this.TEXTAREA.focus(),!1};e.addShortcuts([{keys:[["ArrowUp"]],callback:e=>{let r,i=this.htEditor;if(!i.getSelectedActive()&&this.isFlippedVertically)r=i.countRows()-1;else if(i.getSelectedActive()){let e=i.getSelectedActive();r=this.isFlippedVertically?Math.max(0,e[0]-1):e[0]-1}return t(r,e)},preventDefault:!1},{keys:[["ArrowDown"]],callback:e=>{let r,i=this.htEditor;if(i.getSelectedActive()||this.isFlippedVertically){if(i.getSelectedActive()){let e=i.getSelectedActive();this.isFlippedVertically?r=e[0]+1:this.isFlippedVertically||(r=Math.min(i.countRows()-1,e[0]+1))}}else r=0;return t(r,e)},preventDefault:!1}],{group:yR,relativeToGroup:ml,position:"before"})}unregisterShortcuts(){super.unregisterShortcuts(),this.hot.getShortcutManager().getContext("editor").removeShortcutsByGroup(yR)}}function yT(e){return tF(e)}function yx(e,t){return tx(e)&&t?"function"==typeof t?t(e):"string"!=typeof t?e:t.split(".").reduce((e,t)=>tx(e)||Array.isArray(e)?e[t]:void 0,e):e}function yA(e,t,r){return!(t&&yT(e)&&tx(e.value))||""!==eW(r)}function yM(e,t,r=!1,i){if(!Array.isArray(e))return;let n=eW(t);return e.find(e=>{let t;return t=eW(yT(e)?yx(e.value,i):e),(r?t:on(t))===n})}class yI extends yE{static get EDITOR_TYPE(){return"autocomplete"}query=null;strippedChoices=[];rawChoices=[];#db=this.hot.guid.slice(0,9);#dC=0;#dS=0;#dv=new Set;#dR=null;getValue(){if(""===this.TEXTAREA.value)return this.TEXTAREA.value;let e=yM(this.rawChoices,this.TEXTAREA.value,!0===this.cellProperties.allowHtml,this.cellProperties.sourceLabel);return e$(e)?e:this.TEXTAREA.value}createElements(){super.createElements(),this.eventManager.addEventListener(this.TEXTAREA,"input",()=>{this.innerSelectionOrigin=null}),rW(this.htContainer,"autocompleteEditor"),rW(this.htContainer,-1===this.hot.rootWindow.navigator.platform.indexOf("Mac")?"":"htMacScroll"),this.hot.getSettings().ariaTags&&rG(this.TEXTAREA,[["type","text"],["role","combobox"],V("listbox"),["aria-autocomplete","list"]])}prepare(e,t,r,i,n,o){super.prepare(e,t,r,i,n,o),this.hot.getSettings().ariaTags&&rG(this.TEXTAREA,[G("false"),["aria-controls",`${this.#db}-listbox-${e}-${t}`]]),this.htOptions={...this.htOptions,valueGetter:e=>yT(e)?e.value:e}}beginEditing(e,t){if(this.state!==nJ.VIRGIN)return void super.beginEditing(e,t);let r="string"!=typeof e&&this.isInFullEditMode();this.#dR=null,super.beginEditing(e,t),r&&this.isOpened()&&(this.#dR=this.TEXTAREA.value)}open(){this.strippedChoices=[],this.rawChoices=[],super.open();let e=this.cellProperties.trimDropdown,t=void 0===e||e,r=this.hot.getSettings().ariaTags,i=Array.isArray(this.cellProperties.source)?this.cellProperties.source:null,n=i?.length,{row:o,col:s}=this;if(this.showEditableElement(),this.focus(),this.addHook("beforeKeyDown",e=>this.onBeforeKeyDown(e)),this.htEditor.addHook("afterScroll",this.#dE),this.htEditor.updateSettings({colWidths:t?[ib(this.TEXTAREA)-2]:void 0,autoColumnSize:!0,modifyColWidth:t?void 0:e=>Math.max(e??0,ib(this.TEXTAREA)-2),renderer:(e,t,o,s,l,a,h)=>{yf(e,t,o,s,l,a,h);let{filteringCaseSensitive:d,allowHtml:u}=this.cellProperties,c=this.cellProperties.locale,g=this.query,p=eW(a);if(u)rJ(t,p,!1,"html",this.hot.rootElement);else if(p&&g&&g.length>0){let r=!0===d?p.indexOf(g):ou(p,c).indexOf(ou(g,c));if(-1!==r){let i=p.slice(r,r+g.length),{rootDocument:n}=e;rK(t),t.appendChild(n.createTextNode(p.slice(0,r)));let o=n.createElement("strong");o.textContent=i,t.appendChild(o),t.appendChild(n.createTextNode(p.slice(r+g.length)))}}r&&rG(t,[["role","option"],...i?[X(n??0)]:[],...i?[Q(i.indexOf(a)+1)]:[],["id",`${this.htEditor.rootElement.id}_${o}-${s}`]])},afterSelectionEnd:(e,t)=>{if(r){let r=e=>{rG(e,[q()]),rG(this.TEXTAREA,"aria-activedescendant",e.id)},i=this.htEditor.getCell(e,t,!0);null!==i?r(i):this.htEditor.addHookOnce("afterScrollVertically",()=>{let i=this.htEditor.getCell(e,t,!0);null!==i&&r(i)})}}}),r){let e=R();rG(this.htEditor.view._wt.wtOverlays.wtTable.TABLE,e[0],e[1]),rG(this.htEditor.rootElement,[N(),["aria-live","polite"],["aria-relevant","text"],["id",`${this.#db}-listbox-${o}-${s}`]]),rG(this.TEXTAREA,...G("true"))}this.#dT()}#dx(){return this.stripValueIfNeeded(this.getValue())}#dA(e,t){let r=this.cellProperties.sortByRelevance,i=this.cellProperties.filter,n=yT(t)?t.value:t,o=null,s=e;r||(s=[...s].sort(this.#dM()));let l=String(n),{matchedIndexes:a,equalPosition:h}=this.#dI(s,l),d=h??this.#dN();return!1===i?l.length>0&&null!==d&&(o=a[d]??null):(s=a.map(e=>s[e]),o=d),{choices:s,highlightIndex:o}}#dI(e,t){let{filter:r,filteringCaseSensitive:i,strict:n}=this.cellProperties,o=this.cellProperties.locale,s=!1!==r,l=s||!0===n&&""!==t,a=e=>i?e:ou(e,o),h=a(t),d=[],u=null,c=null;for(let r=0;r<e.length;r++){let i=e[r],n=on(eW(yT(i)?i.value:i)),o=a(n);if(-1===o.indexOf(h))continue;let g=o===h;if((s||g||0===d.length)&&d.push(r),g&&null===u&&(u=d.length-1),null===c&&n===t&&(c=d.length-1),!s&&(!l||null!==c))break}return{matchedIndexes:d,equalPosition:c??u}}#dN(){return this.#dO()?null:0}#dO(){let e=this.#dR;return null!==e&&""!==e&&this.TEXTAREA.value===e}isEditUnchanged(e,t){return super.isEditUnchanged(e,t)||"user"!==this.innerSelectionOrigin&&this.#dO()}resetValueBeforeEdit(){super.resetValueBeforeEdit(),null!==this.#dR&&(this.#dR=this.TEXTAREA.value)}#dM(){if(!this.#dk())return(e,t)=>eW(e).localeCompare(eW(t));let e=e=>eW(yT(e)?e.value:e);return(t,r)=>e(t).localeCompare(e(r))}#dT(e=0){let t=this.hot._registerTimeout(()=>{this.#dv.delete(t),this.queryChoices(this.TEXTAREA.value)},e);this.#dv.add(t)}resolveInnerSelectionValue(){if("user"===this.innerSelectionOrigin)return super.resolveInnerSelectionValue();if(!0!==this.cellProperties.strict||this.#dO())return;let{choices:e,highlightIndex:t}=this.#dA(this.strippedChoices,this.#dx());if(null===t||t>=e.length)return;let r=e[t];return yT(r)?r.value:r}close(){this.#dH(),this.#dR=null,this.removeHooksByKey("beforeKeyDown"),super.close(),this.hot.getSettings().ariaTags&&rG(this.TEXTAREA,[G("false")])}#dH(){this.#dE.cancel(),this.#dv.forEach(e=>clearTimeout(e)),this.#dv.clear(),this.#dS+=1}hideForScroll(){return this.#dH(),this.hot.getSettings().ariaTags&&rG(this.TEXTAREA,[G("false")]),super.hideForScroll()}showAfterScroll(){this.htEditor&&this.strippedChoices.length>0&&(super.showAfterScroll(),this.hot.getSettings().ariaTags&&rG(this.TEXTAREA,[G("true")]))}reflowDropdown(){this.updateDropdownDimensions(),super.reflowDropdown()}discardEditor(e){super.discardEditor(e),this.hot.view.render()}queryChoices(e){if(this.state!==nJ.EDITING&&this.state!==nJ.WAITING||!this._opened)return;let t=this.cellProperties.source,r=this.#dC+1,i=this.#dS;this.#dC=r,this.query=e,"function"==typeof t?t.call(this.cellProperties,e,e=>{this.hot.isDestroyed||i!==this.#dS||r!==this.#dC||(this.rawChoices=e,this.updateChoicesList(this.stripValuesIfNeeded(this.#d_(e))))}):Array.isArray(t)?(this.rawChoices=t,this.updateChoicesList(this.stripValuesIfNeeded(this.#d_(t)))):this.updateChoicesList([])}updateChoicesList(e){let t=iT(this.TEXTAREA),r=ix(this.TEXTAREA),{choices:i,highlightIndex:n}=this.#dA(e,this.#dx());if(this.strippedChoices=i,0===i.length?this.htEditor.rootElement.style.display="none":this.htEditor.rootElement.style.display="",this.htEditor.loadData(et([i])),i.length>0){if(this.updateDropdownDimensions(),this.flipDropdownVerticallyIfNeeded(),this.flipDropdownHorizontallyIfNeeded(),!0===this.cellProperties.strict){let e=n??void 0;this.highlightBestMatchingChoice(e),this.innerSelectionOrigin=void 0===e?null:"auto"}}else this.innerSelectionOrigin=null,rj(this.TEXTAREA,"aria-activedescendant");this.hot.listen(),iI(this.TEXTAREA,t,t===r?void 0:r)}limitDropdownIfNeeded(e){let t=this.getTargetEditorHeight();if(t>e){let t=this.htEditor.stylesHandler.getDefaultRowHeight()??0;if(0===t)return;let r=Math.max(Math.ceil(e/t)-1,1);this.setDropdownHeight(r*t),this.replaceDropdownVertically()}else this.getDropdownHeight()<t&&(this.updateDropdownDimensions(),this.replaceDropdownVertically())}updateDropdownDimensions(){let e=iN(),t=this.getTargetEditorWidth()+e,r=this.getTargetEditorHeight()+e;this.appliedDropdownHeight=r,this.htEditor.updateSettings({width:t,height:r}),this.#dP(),this.htEditor.view._wt.wtTable.alignOverlaysWithTrimmingContainer()}setDropdownHeight(e){e!==this.appliedDropdownHeight&&(this.appliedDropdownHeight=e,this.htEditor.updateSettings({height:e}),this.#dP(),this.htEditor.view._wt.wtTable.alignOverlaysWithTrimmingContainer())}highlightBestMatchingChoice(e){"number"==typeof e?this.htEditor.selectCell(e,0,void 0,void 0,void 0,!1):(this.htEditor.deselectCell(),rj(this.TEXTAREA,"aria-activedescendant"))}getTargetEditorHeight(){let e=0;if(!this.hot.getCurrentThemeName()){let t=this.htContainer.querySelector(".htCore");if(t){let r=this.hot.rootWindow.getComputedStyle(t);e=parseInt(r.borderTopWidth,10)+parseInt(r.borderBottomWidth,10)}}return Array.from({length:Math.min(this.cellProperties.visibleRows,this.strippedChoices.length)},(e,t)=>t).reduce((e,t)=>e+((this.hot.stylesHandler.getDefaultRowHeight()??0)+ +(0===t)),0)+e}getTargetEditorWidth(){let e=0;if(!this.hot.getCurrentThemeName()){let t=this.htContainer.querySelector(".htCore");if(t){let r=this.hot.rootWindow.getComputedStyle(t);e=parseInt(r.borderInlineStartWidth,10)+parseInt(r.borderInlineEndWidth,10)}}return this.htEditor.getColWidth(0)+e}stripValueIfNeeded(e){return this.stripValuesIfNeeded([e])[0]}stripValuesIfNeeded(e){let{allowHtml:t,sourceLabel:r}=this.cellProperties,i=e=>eW(t?e:on(String(e)));return e.every(e=>yT(e))?e.map(e=>{let t=yx(e.value,r);return{key:i(e.key),value:i(t===e.value?t:eW(t))}}):e.map(e=>{if(yT(e)){let t=yx(e.value,r);if(r||t!==e.value)return i(eW(t))}return i(e)})}#dk(){return!!this.cellProperties.sourceLabel&&this.rawChoices.some(e=>yT(e)&&tx(e.value))}#d_(e){let{sourceLabel:t}=this.cellProperties;return t?e.filter(e=>!(t&&yT(e)&&tx(e.value))||yA(e,t,yx(e.value,t))):e}#dE=i4(()=>{this.focus()},100);#dP(){this.htEditor.view.hasVerticalScroll()&&this.htEditor.updateSettings({width:this.getTargetEditorWidth()+iO(this.hot.rootDocument)})}onBeforeKeyDown(e){if(nn(e.keyCode)||e.keyCode===nr.BACKSPACE||e.keyCode===nr.DELETE||e.keyCode===nr.INSERT){let t=10;e.keyCode===nr.C&&(e.ctrlKey||e.metaKey)||(this.isOpened()||(t+=10),this.#dT(t))}}}class yN extends n0{static get EDITOR_TYPE(){return"checkbox"}beginEditing(e,t){if(t&&"mouseup"===t.type&&"TD"===rA(t).nodeName){let e=this.TD.querySelector('input[type="checkbox"]');rU(e,"htBadValue")||e.click()}}finishEditing(){}init(){}open(){}close(){}getValue(){}setValue(){}focus(){}}let yO=/^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12]\d|3[01])$/;function yk(e){let t=new Date(e);return Number.isNaN(new Date(`${e}T00:00`).getDate())?t:new Date(t.getTime()+6e4*t.getTimezoneOffset())}function yH(e){if(ej(e))return null;if("string"==typeof e&&yO.test(e)){let[t,r,i]=e.split("-").map(Number),n=new Date(t,r-1,i);return t<100&&(n.setFullYear(t,r-1,i),n.setHours(0,0,0,0)),n}return null}let y_=[31,28,31,30,31,30,31,31,30,31,30,31];function yP(e){return e%4==0&&e%100!=0||e%400==0}function yD(e){if("string"!=typeof e||!yO.test(e))return!1;let t=+e.slice(0,4),r=+e.slice(5,7);return+e.slice(8,10)<=(2===r&&yP(t)?29:y_[r-1])}let yL=/^([01]\d|2[0-3]):([0-5]\d)(?::([0-5]\d)(?:\.(\d{1,3}))?)?$/;function yF(e){if(ej(e)||"string"!=typeof e)return null;let t=yL.exec(e);if(!t)return null;let r=Number(t[1]),i=Number(t[2]),n=void 0!==t[3]?Number(t[3]):0,o=t[4];return new Date(1970,0,1,r,i,n,void 0!==o?Number(o.padEnd(3,"0").slice(0,3)):0)}function yB(e){return"string"==typeof e&&yL.test(e)}let yV=/^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12]\d|3[01])(?:[T ]([01]\d|2[0-3]):([0-5]\d)(?::([0-5]\d)(?:\.(\d{1,3}))?)?)?$/;function yz(e){if(ej(e)||"string"!=typeof e)return null;let t=yV.exec(e);if(!t)return null;let[r]=e.split(/[T ]/),[i,n,o]=r.split("-").map(Number),s=void 0!==t[3]?Number(t[3]):0,l=void 0!==t[4]?Number(t[4]):0,a=void 0!==t[5]?Number(t[5]):0,h=void 0!==t[6]?Number(t[6].padEnd(3,"0").slice(0,3)):0,d=new Date(i,n-1,o,s,l,a,h);return i<100&&(d.setFullYear(i,n-1,o),d.setHours(s,l,a,h)),d}function yU(e){if("string"!=typeof e)return!1;let t=yV.exec(e);if(!t)return!1;let r=+e.slice(0,4),i=+t[1];return+t[2]<=(2===i&&yP(r)?29:y_[i-1])}function yW(){let e=new Date;return new Date(e.getFullYear(),e.getMonth(),e.getDate())}function y$(e){let t=yW();return t.setDate(t.getDate()+e),t}function yG(e,t){return e.getFullYear()===t.getFullYear()&&e.getMonth()===t.getMonth()&&e.getDate()===t.getDate()}let yj=new Map,yY=[new Date(2024,0,1),new Date(2024,6,1)];function yK(e,t){let r=void 0===e||"string"==typeof e?e:`\u0000${String(e)}`,i=yj.get(r);void 0===i&&(i=new Map,yj.set(r,i));let n=`${yY[0].getTimezoneOffset()},${yY[1].getTimezoneOffset()}`,o=`${n}:${JSON.stringify(t)}`,s=i.get(o);return void 0===s&&(s=new Intl.DateTimeFormat(e,t),i.set(o,s)),s}function yq(e,t,r){let i=yK(e,t);if(r.getFullYear()>=1||void 0!==t.era)return i.format(r);let{year:n,calendar:o}=i.resolvedOptions();return void 0===n||"gregory"!==o?i.format(r):yK(e,{...t,era:"short"}).format(r)}function yX(e,t){if(!t?.type.startsWith("key"))try{e.showPicker()}catch{}}function yQ(e,t){iQ(e.rootDocument)===t&&function(e){try{return e.matches(":open")}catch{return!0}}(t)&&(t.blur(),e.getFocusManager().focusOnHighlightedCell())}class yZ extends yp{#dD=!1;#dL=!1;static get EDITOR_TYPE(){return"date"}get capsLength(){return!1}init(){super.init(),this.hot.addHook("afterSetTheme",(e,t)=>{t||this.close()})}prepare(e,t,r,i,n,o){super.prepare(e,t,r,i,n,o),void 0!==o.datePickerConfig&&rs(this.hot.rootElement,"datePickerConfig",'The "datePickerConfig" option is not supported. The native date input is used instead of Pikaday.');let s=this.hot.toPhysicalRow(e);this.originalValue=this.hot.getSourceDataAtCell(s,t)}createElements(e){super.createElements("input"),this.TEXTAREA.setAttribute("type","date"),this.eventManager.addEventListener(this.TEXTAREA,"input",()=>{this.#dD=!0})}beginEditing(e,t){this.state===nJ.VIRGIN&&(this.#dD=!1,this.#dL=!1),super.beginEditing(e,t)}finishEditing(e,t,r){let i=this.state===nJ.EDITING&&this.#dF(t);super.finishEditing(e||i,t,r)}#dF(e){let t=this.TEXTAREA;return""===t.value&&(!1!==this.cellProperties.allowEmpty||!1!==this.cellProperties.allowInvalid)&&(ej(this.originalValue)?!0===e&&t.validity.badInput:t.validity.badInput||!this.#dL&&!this.#dD)}setValue(e){if(ej(e)&&(e=this.cellProperties.defaultDate),!yD(e)){rn(ey`DateEditor: value must be in ISO date format ("YYYY-MM-DD")\x20
|
|
103
103
|
required by the native date input. Received:`,e),super.setValue("");return}super.setValue(e),this.#dL=!0}focus(){this.TEXTAREA.focus({preventScroll:!0}),this.TEXTAREA.select()}close(){super.close(),yQ(this.hot,this.TEXTAREA)}open(e){super.open(e),yX(this.TEXTAREA,e)}}class yJ extends yI{static get EDITOR_TYPE(){return"dropdown"}prepare(e,t,r,i,n,o){o.filter=!1,o.strict=!0,super.prepare(e,t,r,i,n,o)}finishEditing(e,t,r){if(this.isOpened()){let t=this.hot.getSelectedRangeActive();(eG(t)||e$(t)&&!t.includes(this.hot._createCellCoords(this.row,this.col)))&&(e=!0)}super.finishEditing(e,t,r)}}class y0 extends yZ{static get EDITOR_TYPE(){return"intl-date"}}let y1=/^\d{4}-\d{2}-\d{2}$/,y2=/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}$/;class y3 extends yp{static get EDITOR_TYPE(){return"intl-datetime"}get capsLength(){return!1}init(){super.init(),this.hot.addHook("afterSetTheme",(e,t)=>{t||this.close()})}prepare(e,t,r,i,n,o){super.prepare(e,t,r,i,n,o);let s=this.hot.toPhysicalRow(e);this.originalValue=this.hot.getSourceDataAtCell(s,t)}createElements(e){super.createElements("input"),this.TEXTAREA.setAttribute("type","datetime-local"),this.TEXTAREA.setAttribute("step","1"),this.TEXTAREA.setAttribute("dir","ltr")}setValue(e){if(ej(e))return void super.setValue("");if(!yU(e)){rn(ey`IntlDatetimeEditor: value must be in ISO date-time format ("YYYY-MM-DDTHH:mm:ss")\x20
|
|
104
104
|
required by the native datetime-local input. Received:`,e),super.setValue("");return}let t=String(e).replace(" ","T").replace(/\.\d+$/,"");y1.test(t)?t+="T00:00:00":y2.test(t)&&(t+=":00"),super.setValue(t)}getValue(){let e=super.getValue();return e&&y2.test(e)?`${e}:00`:e}focus(){this.TEXTAREA.focus({preventScroll:!0}),this.TEXTAREA.select()}close(){super.close(),yQ(this.hot,this.TEXTAREA)}open(e){super.open(e),yX(this.TEXTAREA,e)}}class y6 extends yp{static get EDITOR_TYPE(){return"time"}get capsLength(){return!1}init(){super.init(),this.hot.addHook("afterSetTheme",(e,t)=>{t||this.close()})}createElements(e){super.createElements("input"),this.TEXTAREA.setAttribute("type","time"),this.TEXTAREA.setAttribute("dir","ltr")}setValue(e){if(!yB(e)){rn(ey`TimeEditor: value must be in 24-hour time format ("HH:mm", "HH:mm:ss" or "HH:mm:ss.SSS")\x20
|
|
105
105
|
required by the native time input. Received:`,e),super.setValue("");return}super.setValue(e)}focus(){this.TEXTAREA.focus({preventScroll:!0}),this.TEXTAREA.select()}close(){super.close(),yQ(this.hot,this.TEXTAREA)}open(e){super.open(e),yX(this.TEXTAREA,e)}}class y5 extends y6{static get EDITOR_TYPE(){return"intl-time"}}class y4 extends yp{static get EDITOR_TYPE(){return"numeric"}get capsLength(){return!1}}class y8 extends yp{autoResize=yd(this.hot.rootDocument,{textContent:e=>"\u2022".repeat(e.value.length)});#dB="";#dV=null;#dz=null;#dU=!1;static get EDITOR_TYPE(){return"password"}get capsLength(){return!1}createElements(){super.createElements(),this.TEXTAREA=this.hot.rootDocument.createElement("input"),this.TEXTAREA.setAttribute("type","password"),this.TEXTAREA.dataset.hotInput="",this.TEXTAREA.className="handsontableInput",this.textareaStyle=this.TEXTAREA.style,this.textareaStyle.width="0",this.textareaStyle.height="0",rK(this.TEXTAREA_PARENT);let e=v(-1);this.TEXTAREA.setAttribute(e[0],String(e[1])),this.TEXTAREA_PARENT.appendChild(this.TEXTAREA)}open(){super.open();let e=this.cellProperties.hashRevealDelay,t=String(this.cellProperties.hashSymbol||"*");if(e>0){this.#dU=!0;let r=t[0];this.TEXTAREA.setAttribute("type","text"),this.TEXTAREA.setAttribute("autocomplete","off"),this.TEXTAREA.setAttribute("spellcheck","false"),this.TEXTAREA.setAttribute("autocapitalize","off"),this.TEXTAREA.setAttribute("autocorrect","off"),this.TEXTAREA.value=r.repeat(this.#dB.length),this.#dz=t=>this.#dW(t,r,e),this.TEXTAREA.addEventListener("input",this.#dz)}}close(){this.#dz&&(this.TEXTAREA.removeEventListener("input",this.#dz),this.#dz=null),null!==this.#dV&&(clearTimeout(this.#dV),this.#dV=null),this.#dU=!1,this.#dB="",this.TEXTAREA.setAttribute("type","password"),this.TEXTAREA.removeAttribute("autocomplete"),this.TEXTAREA.removeAttribute("spellcheck"),this.TEXTAREA.removeAttribute("autocapitalize"),this.TEXTAREA.removeAttribute("autocorrect"),super.close()}getValue(){return this.#dU?this.#dB:super.getValue()}setValue(e){let t=eW(e);if(this.#dU){this.#dB=t;let e=String(this.cellProperties.hashSymbol||"*")[0];this.TEXTAREA.value=e.repeat(this.#dB.length)}else this.cellProperties?.hashRevealDelay>0?this.#dB=t:super.setValue(t)}#dW(e,t,r){let{inputType:i,data:n}=e;if(n&&("insertText"===i||"insertFromPaste"===i||"insertFromDrop"===i||"insertReplacementText"===i||"insertCompositionText"===i)){let e=this.TEXTAREA.selectionStart??0,i=e-n.length,o=this.TEXTAREA.value.length-e;this.#dB=this.#dB.slice(0,i)+n+this.#dB.slice(this.#dB.length-o),this.TEXTAREA.value=t.repeat(i)+n+t.repeat(o),this.TEXTAREA.setSelectionRange(e,e),null!==this.#dV&&clearTimeout(this.#dV),this.#dV=this.hot._registerTimeout(()=>{let e=this.TEXTAREA.selectionStart;this.TEXTAREA.value=t.repeat(this.#dB.length),this.TEXTAREA.setSelectionRange(e,e),this.#dV=null},r)}else if(i?.startsWith("delete")){let e=this.#dB.length,r=this.TEXTAREA.selectionStart??0,i=e-this.TEXTAREA.value.length;this.#dB=this.#dB.slice(0,r)+this.#dB.slice(r+i),this.TEXTAREA.value=t.repeat(this.#dB.length),this.TEXTAREA.setSelectionRange(r,r),null!==this.#dV&&(clearTimeout(this.#dV),this.#dV=null)}else{let e=this.#dB.length,i=this.TEXTAREA.value;if(i.length>e){let n=i.slice(e);this.#dB+=n,this.TEXTAREA.value=t.repeat(e)+n,null!==this.#dV&&clearTimeout(this.#dV),this.#dV=this.hot._registerTimeout(()=>{this.TEXTAREA.value=t.repeat(this.#dB.length),this.#dV=null},r)}else this.#dB=this.#dB.slice(0,i.length),this.TEXTAREA.value=t.repeat(this.#dB.length),null!==this.#dV&&(clearTimeout(this.#dV),this.#dV=null)}}}let y9=new WeakMap;function y7(e){return e.themeManager??y9.get(e)?.themeManager??null}function be(e,t,r={}){let i=y7(e);if(i)return i.createIcon(t,r);let n=e.rootDocument.createElement("i"),o=[fX,f0(t)];return r.flipInRtl&&o.push(fZ),r.className&&o.push(r.className),n.className=o.join(" "),n.setAttribute("aria-hidden","true"),n}function bt(e,t,r,i,n={}){let o=t.querySelector(`.${r}`);if(null===i)return o?.remove(),null;if(o?.classList.contains(f0(i))){let t=y7(e),s={...n,className:[n.className,r].filter(Boolean).join(" ")};if(!t){if(void 0!==o.dataset.htIconsRevision||o.classList.contains(fQ)){let t=be(e,i,s);return o.replaceWith(t),t}return o}let l=String(t.getIconsRevision());return o.dataset.htIconsRevision!==l&&(t.applyIcon(o,i,s),o.dataset.htIconsRevision=l),o}let s=be(e,i,{...n,className:[n.className,r].filter(Boolean).join(" ")}),l=y7(e);return l&&(s.dataset.htIconsRevision=String(l.getIconsRevision())),o?o.replaceWith(s):t.appendChild(s),s}function br(){let e=new WeakSet;return(t,r,i,n,o={})=>null!==n||e.has(r)?(null!==n&&e.add(r),bt(t,r,i,n,o)):null}let bi="ht_editor_visible",bn="selectEditor",bo="ht-select-editor-arrow-icon";class bs extends n0{static get EDITOR_TYPE(){return"select"}init(){this.selectWrapper=this.hot.rootDocument.createElement("div"),this.select=this.hot.rootDocument.createElement("select"),this.select.dataset.hotInput="true",this.selectWrapper.style.display="none";let e=this.hot.rootDocument.createElement("DIV"),t=this.hot.getSettings().ariaTags;e.className="htAutocompleteArrow",t&&e.setAttribute(...F()),e.appendChild(this.hot.rootDocument.createTextNode(String.fromCharCode(9660))),bt(this.hot,e,bo,"selectArrow"),rW(this.selectWrapper,"htSelectEditor"),this.selectWrapper.appendChild(this.select),this.selectWrapper.insertBefore(e,this.selectWrapper.firstChild),this.hot.rootElement.appendChild(this.selectWrapper),this.registerHooks(),this.hot.addHookOnce("afterDestroy",()=>this.destroy())}getValue(){return this.select.value}setValue(e){this.select.value=null==e?"":String(e)}open(){this._opened=!0;let e=this.selectWrapper.querySelector(".htAutocompleteArrow");e&&bt(this.hot,e,bo,"selectArrow"),this.refreshDimensions(),this.selectWrapper.style.display="",this.hot.getShortcutManager().setActiveContextName("editor"),this.registerShortcuts()}close(){this._opened=!1,this.selectWrapper.style.display="none",rU(this.selectWrapper,bi)&&r$(this.selectWrapper,bi),this.unregisterShortcuts(),this.removeHooksByKey("beforeDialogShow")}focus(){this.select.focus()}registerHooks(){this.addHook("afterScrollHorizontally",()=>this.refreshDimensions()),this.addHook("afterScrollVertically",()=>this.refreshDimensions()),this.addHook("afterColumnResize",()=>this.refreshDimensions()),this.addHook("afterRowResize",()=>this.refreshDimensions())}prepare(e,t,r,i,n,o){let s;super.prepare(e,t,r,i,n,o);let l=this.cellProperties.selectOptions;s="function"==typeof l?this.prepareOptions(l(this.row,this.col,this.prop)):this.prepareOptions(l),rK(this.select);let a=ow(this.hot);if(Array.isArray(s))for(let e=0;e<s.length;e++){let t=this.hot.rootDocument.createElement("OPTION");t.value=String(s[e]),rJ(t,String(s[e]),a,"selectEditor",this.hot.rootElement),this.select.appendChild(t)}else tI(s,(e,t)=>{let r=this.hot.rootDocument.createElement("OPTION");r.value=t,rJ(r,String(e),a,"selectEditor",this.hot.rootElement),this.select.appendChild(r)})}prepareOptions(e){return Array.isArray(e)||"object"==typeof e?e:{}}refreshValue(){let e=this.hot.toPhysicalRow(this.row),t=this.hot.getSourceDataAtCell(e,this.col);this.originalValue=t,this.setValue(t),this.resetValueBeforeEdit(),this.refreshDimensions()}refreshDimensions(){if(this.state!==nJ.EDITING)return;if(this.TD=this.getEditedCell(),!this.TD)return void this.close();let e=this.getEditedCellRect();if(!e)return;let{top:t,start:r,width:i,height:n}=e,o=this.selectWrapper.style;o.height=`${n}px`,o.width=`${i}px`,o.top=`${t}px`,o[this.hot.isRtl()?"right":"left"]=`${r}px`,o.margin="0px",rW(this.selectWrapper,bi)}registerShortcuts(){let e=this.hot.getShortcutManager().getContext("editor");this.isInFullEditMode()&&e.addShortcuts([{keys:[["ArrowUp"]],callback:()=>{let e=this.select.selectedIndex-1;e>=0&&(this.select[e].selected=!0)}},{keys:[["ArrowDown"]],callback:()=>{let e=this.select.selectedIndex+1;e<=this.select.length-1&&(this.select[e].selected=!0)}}],{group:bn})}unregisterShortcuts(){this.hot.getShortcutManager().getContext("editor").removeShortcutsByGroup(bn)}destroy(){this.clearHooks()}}function bl(e){return e.querySelector('input[type="checkbox"]')}function ba(e,t){return tF(t)?Array.isArray(e)&&e.some(e=>tF(e)?tE(e,t):e===t):e.includes(t)}class bh{input;eventManager;enabled;onInput=this._onInput.bind(this);constructor({input:e,eventManager:t}){this.input=e,this.eventManager=t,this.enabled=!0}getInputElement(){return this.input}setValue(e){this.input.value=e}toggle(e){this.enabled=e,this.input&&(e?this.listen():this.unlisten())}listen(){this.eventManager.addEventListener(this.input,"input",this.onInput)}unlisten(){this.eventManager.removeEventListener(this.input,"input",this.onInput)}_onInput(){this.#d$(this.input.value)}#d$(e){this.runLocalHooks("triggerFilter",e)}}tR(bh,dp);let bd="ht-multi-select-editor",bu=`${bd}-search-input-wrapper`,bc=`${bd}-search-input`,bg=`${bd}-separator`,bp=`${bd}-item-`,bm=`${bd}-item-selected`;function bf(e){let t=bl(e);rW(e,bm),t&&!t.checked&&(t.checked=!0)}function bw(e){let t=bl(e);r$(e,bm),t&&t.checked&&(t.checked=!1)}let by="ht-multi-select-editor-search-icon",bb="ht-multi-select-editor-search-slot";function bC({dropdownListElement:e,index:t}){let r=e.children[t];if(r){let e=bl(r);e&&e.blur()}}class bS{#dG=null;#dj;#dY=null;#dK=null;#dq=null;#dX=null;#dQ=null;#dZ=null;#tf=null;#aR=new n2(this);#dJ={visibleRowsNumberSetting:null,entriesCount:0,flippedVertically:!1,currentlySelectedItemIndex:0,checkboxChangeListeners:new Map,areCheckboxesDisabled:!1,sourceSortFunction:null};constructor(e,t,r){this.#dY=e,this.#tf=this.#dY.ownerDocument,this.#dG=t,this.#dj=r,this.init()}init(){this.#tf&&this.#dY&&(this.#dK=function({root:e}){return e.createElement("ul")}({root:this.#tf}),this.#dq=function({root:e}){let t=e.createElement("input");return rG(t,[_("Search options"),["type","text"],["size",3],["placeholder","Search..."],["id",bc]]),rW(t,bc),t}({root:this.#tf}),this.#dQ=function({root:e}){let t=e.createElement("div");return t.className=bu,t}({root:this.#tf}),this.#dX=function({root:e}){let t=e.createElement("div");return t.className=bg,t}({root:this.#tf}),this.#dQ.appendChild(function({hotInstance:e}){return be(e,"search",{className:`${by} ${bb}`})}({hotInstance:this.#dj})),this.#dQ.appendChild(this.#dq),this.#dY.appendChild(this.#dQ),this.#dY.appendChild(this.#dX),this.#dY.appendChild(this.#dK),this.#dZ=new bh({input:this.#dq,eventManager:this.#aR}))}refreshIcons(){this.#dQ&&function({hotInstance:e,wrapper:t}){bt(e,t,bb,"search",{className:by})}({hotInstance:this.#dj,wrapper:this.#dQ})}setVisibleRowsNumberSetting(e){this.#dJ.visibleRowsNumberSetting=e}setSourceSortFunction(e){this.#dJ.sourceSortFunction=e??null}setSearchInputVisibility(e=!0){this.#dQ&&this.#dX&&this.#dZ&&(this.#dQ.style.display=e?"":"none",this.#dX.style.display=e?"":"none",this.#dZ.toggle(e))}fillDropdown(e,t=[]){this.removeAllDropdownItems(),this.#dJ.currentlySelectedItemIndex=0,Array.isArray(t)||(t=[]);let r=e;this.#dJ.sourceSortFunction&&(r=this.#dJ.sourceSortFunction(e.slice())),this.#tf&&this.#dK&&null!==this.#dG&&(r.forEach((e,r)=>{let i="object"==typeof e&&null!==e&&"value"in e?e.value:e;this.#d0({rootDocument:this.#tf,itemKey:"object"==typeof e&&null!==e&&"key"in e?e.key:void 0,itemValue:String(i??e),indexWithinList:r,checked:ba(t,e),disabled:this.#dJ.areCheckboxesDisabled})}),this.#dJ.entriesCount=r.length,this.runLocalHooks("afterDropdownFill"))}updateDimensions(e,t=!1){let r=this.#d1(),i=this.#d2(),n=this.#d3(e,i),o=(t?this.#dJ.flippedVertically:n)?e.spaceAbove:e.spaceBelow;if(t||(this.#dJ.flippedVertically=n),this.#dJ.entriesCount>0&&o<this.getHeight(!0)+i){let e=Math.max(Math.floor((o-Math.max(i-r,0)-this.#d6())/r)-1,1);this.#dJ.actualRenderedItemsCount=this.#dJ.visibleRowsNumberSetting?Math.min(e,this.#dJ.visibleRowsNumberSetting):e}else this.#dJ.actualRenderedItemsCount=Math.min(this.#dJ.entriesCount,this.#dJ.visibleRowsNumberSetting??this.#dJ.entriesCount);this.#dY&&(this.#dJ.actualRenderedItemsCount&&this.#dJ.entriesCount>this.#dJ.actualRenderedItemsCount?this.#dY.style.height=`${this.getHeight()}px`:this.#dY.style.height="",this.#d5(e),this.#dY.scrollTop=0)}getDropdownWidth(){return this.#dK?function({dropdownListElement:e}){return e.offsetWidth}({dropdownListElement:this.#dK}):0}deselectAllItems(){this.#dK&&function({dropdownListElement:e}){e.querySelectorAll(`.${bm}`).forEach(e=>bw(e))}({dropdownListElement:this.#dK})}focusFirstItem(){this.#dJ.entriesCount>0&&this.#d4(0)}focusItem(e){this.#d4(e)}focusPreviousItem(){if(this.#dK){if(0===this.#dJ.currentlySelectedItemIndex)return void this.focusSearchInput();bC({dropdownListElement:this.#dK,index:this.#dJ.currentlySelectedItemIndex}),this.#d4(this.#dJ.currentlySelectedItemIndex-1)}}focusNextItem(){this.#dK&&this.#dJ.currentlySelectedItemIndex!==this.#dJ.entriesCount-1&&(bC({dropdownListElement:this.#dK,index:this.#dJ.currentlySelectedItemIndex}),this.#d4(this.#dJ.currentlySelectedItemIndex+1))}focusSearchInput(){this.#dq&&this.#dq.focus()}reset(){this.removeAllDropdownItems(),this.#d8(),this.#dq&&(this.#dq.value=""),this.#dY&&(this.#dY.style.position="",this.#dY.style.top="",this.#dY.style.bottom="",this.#dY.style.height="",this.#dY.scrollTop=0)}isFlippedVertically(){return this.#dJ.flippedVertically}getOuterWidth(){return this.#dY?this.#dY.offsetWidth:0}getHeight(e=!1,t=!1){if(!this.#tf||!this.#dY)return 0;let r=this.#tf.defaultView.getComputedStyle(this.#dY);return this.#d9(e)+this.#d6()+(!0===t?2*parseInt(r.getPropertyValue("--ht-menu-vertical-padding"),10):0)}getInputController(){return this.#dZ}removeAllDropdownItems(){this.#dK&&(Array.from(this.#dK.children).forEach(e=>this.#d7(e)),this.#dJ.checkboxChangeListeners.clear(),this.#dK.replaceChildren())}disableCheckboxes(){this.#dJ.areCheckboxesDisabled=!0,this.#dK&&function({dropdownListElement:e}){e.querySelectorAll('input[type="checkbox"]:not(:checked)').forEach(e=>{e.dataset.disabled="true"})}({dropdownListElement:this.#dK})}enableCheckboxes(){this.#dJ.areCheckboxesDisabled=!1,this.#dK&&function({dropdownListElement:e}){e.querySelectorAll('input[type="checkbox"]').forEach(e=>{e.dataset.disabled="false"})}({dropdownListElement:this.#dK})}#d4(e){this.#dJ.currentlySelectedItemIndex=e,this.#dK&&function({dropdownListElement:e,index:t}){let r=e.children[t];if(r){let e=bl(r);e&&e.focus()}}({dropdownListElement:this.#dK,index:e})}#d3(e,t){let{spaceAbove:r,spaceBelow:i,cellHeight:n}=e;return this.getHeight(!0)+t>i&&r>i+n}#d5(e){if(!this.#dY)return;let{cellHeight:t}=e;this.#dJ.flippedVertically?(this.#dY.style.position="absolute",this.#dY.style.top="auto",this.#dY.style.bottom=`${t+1}px`):(this.#dY.style.position="",this.#dY.style.top="",this.#dY.style.bottom="")}#d1(){if(!this.#tf||!this.#dY)return 0;let e=this.#tf.defaultView.getComputedStyle(this.#dY);return 2*parseInt(e.getPropertyValue("--ht-menu-item-vertical-padding"),10)+parseInt(e.getPropertyValue("--ht-line-height"),10)}#d2(){if(!this.#tf||!this.#dY)return 0;let{defaultView:e}=this.#tf,t=(t,r)=>{let i=e.getComputedStyle(t);return r.reduce((e,t)=>e+(parseFloat(i.getPropertyValue(t))||0),0)},r=t(this.#dY,["padding-top","padding-bottom","border-top-width","border-bottom-width"]);return this.#dK&&(r+=t(this.#dK,["padding-top","padding-bottom","margin-top","margin-bottom"])),r}#d9(e){let{entriesCount:t,visibleRowsNumberSetting:r}=this.#dJ,i=r&&r>0?Math.min(t,r):t;return(e?i:this.#dJ.actualRenderedItemsCount??t)*this.#d1()}#d6(){if(!this.#dZ?.enabled||!this.#dQ||!this.#dX||!this.#tf||!this.#dY)return 0;let e=this.#tf.defaultView.getComputedStyle(this.#dY);return this.#dQ.offsetHeight+(this.#dX.offsetHeight+2*parseInt(e.getPropertyValue("--ht-menu-vertical-padding"),10))}#d0({rootDocument:e,itemKey:t,itemValue:r,indexWithinList:i,checked:n=!1,disabled:o=!1}){if(!this.#dK||null===this.#dG)return;let s=function({rootDocument:e,instanceId:t,itemKey:r,itemValue:i,indexWithinList:n,checked:o=!1,disabled:s=!1,hotInstance:l}){let a=e.createElement("li"),h=e.createElement("div"),d=e.createElement("input"),u=e.createElement("label");return d.id=`${t}-${bp}${n}`,d.type="checkbox",d.dataset.value=i,d.dataset.index=String(n),d.dataset.disabled=s&&!o?"true":"false",r&&(d.dataset.key=r),u.htmlFor=d.id,u.textContent=i,h.appendChild(d),h.appendChild(be(l,"checkbox")),h.appendChild(u),a.appendChild(h),a}({rootDocument:e,instanceId:this.#dG,itemKey:t,itemValue:r,indexWithinList:i,checked:n,disabled:o,hotInstance:this.#dj});n&&bf(s),this.#ue(s),this.#dK.appendChild(s)}#ue(e){let t=bl(e);if(!t||!this.#dK)return;let r=()=>{if("true"===t.dataset.disabled&&t.checked){t.checked=!1;return}t.checked?(bf(e),this.runLocalHooks("afterDropdownItemChecked",t.dataset.key,t.dataset.value)):(bw(e),this.runLocalHooks("afterDropdownItemUnchecked",t.dataset.key,t.dataset.value))},i=e=>{let r=rA(e);r!==t&&"true"!==t.dataset.disabled&&"LABEL"!==r.tagName&&(t.checked=!t.checked,t.dispatchEvent(new Event("change")))};this.#dJ.checkboxChangeListeners.set(t,{change:r,click:i}),this.#aR.addEventListener(t,"change",r),this.#aR.addEventListener(e,"click",i)}#d7(e){let t=bl(e);if(!t)return;let r=this.#dJ.checkboxChangeListeners.get(t);r&&(this.#aR.removeEventListener(t,"change",r.change),this.#aR.removeEventListener(e,"click",r.click),this.#dJ.checkboxChangeListeners.delete(t))}#d8(){this.#dJ.visibleRowsNumberSetting=null,this.#dJ.entriesCount=0,this.#dJ.flippedVertically=!1,this.#dJ.currentlySelectedItemIndex=0,this.#dJ.checkboxChangeListeners.clear(),this.#dJ.areCheckboxesDisabled=!1,this.#dJ.sourceSortFunction=null}}tR(bS,dp);class bv{selectedItems;maxSelectionsCount;constructor(e){Array.isArray(e)?this.selectedItems=new Set(e):this.selectedItems=new Set,this.maxSelectionsCount=1/0}setMaxSelectionCount(e){this.maxSelectionsCount=e}add(e){this.selectedItems.size>=this.maxSelectionsCount||(Array.isArray(e)?e.forEach(e=>this.selectedItems.add(e)):this.selectedItems.add(e))}remove(e){if(!tF(e))return this.selectedItems.delete(e);{let t=Array.from(this.selectedItems).find(t=>tE(t,e));if(void 0!==t)return this.selectedItems.delete(t),!0}return!1}has(e){return ba(this.getItemsArray(),e)}clear(){this.selectedItems.clear()}getSize(){return this.selectedItems.size}getItemsArray(){return Array.from(this.selectedItems)}}let bR="multiselect",bE="multiselectEditor";class bT extends n0{_closeAfterDataChange=!1;#ut=new bv;#ur=null;isFlippedHorizontally=!1;dropdownContainerElement=null;dropdownController=null;#dd=!1;static get EDITOR_TYPE(){return bR}constructor(e){super(e),this.eventManager=new n2(this),this.createElements(),this.bindEvents()}createElements(){let{rootDocument:e}=this.hot;this.#ur=e.createElement("div"),this.#ur.style.display="none",rW(this.#ur,"handsontableEditor"),this.dropdownContainerElement=this.hot.rootDocument.createElement("div"),rW(this.dropdownContainerElement,"ht-multi-select-editor handsontableEditor"),rG(this.dropdownContainerElement,[_("Select options"),O()]),this.#ur.appendChild(this.dropdownContainerElement),this.hot.rootElement.appendChild(this.#ur),this.dropdownController=new bS(this.dropdownContainerElement,this.hot.guid,this.hot)}prepare(e,t,r,i,n,o){super.prepare(e,t,r,i,n,o);let s="string"==typeof n&&n7(n)?JSON.parse(n):n,l=ep(Array.isArray(s)?s:[s],this.#ui(),(e,t)=>JSON.stringify(e)===JSON.stringify(t));this.dropdownController.reset(),l.length>=this.#un("maxSelections")&&this.#uo(),this.#us(l),this.dropdownController.setSourceSortFunction(this.#un("sourceSortFunction")??null),this.dropdownController.fillDropdown(this.#ui(),l),this.dropdownController.setVisibleRowsNumberSetting(this.#un("visibleRows")),this.dropdownController.setSearchInputVisibility(this.#un("searchInput")),this.dropdownController.refreshIcons(),void 0!==o.maxSelections&&this.#ut.setMaxSelectionCount(this.#un("maxSelections"))}finishEditing(e,t,r){super.finishEditing(e,t,r)}bindEvents(){this.dropdownController.addLocalHook("afterDropdownItemChecked",(e,t)=>{this.#ul(e,t),this.#ut.getSize()>=this.#un("maxSelections")&&this.#uo()}),this.dropdownController.addLocalHook("afterDropdownItemUnchecked",(e,t)=>{this.#ua(e,t),this.#ut.getSize()<this.#un("maxSelections")&&this.#uh()}),this.addHook("afterDestroy",()=>this.destroy()),this.addHook("afterChange",(e,t)=>this.#ud(e,t)),this.addHook("afterScrollHorizontally",()=>this.#uu()),this.addHook("afterScrollVertically",()=>this.#uu()),this.dropdownController.getInputController().addLocalHook("triggerFilter",e=>this.#uc(e))}open(e){let t=e&&"keyCode"in e?e.keyCode:0,r=e&&"key"in e?e.key:"";if(t&&nn(t)){let i=1===r.length?r:String.fromCharCode(t);this.dropdownController.getInputController().enabled&&(this.dropdownController.getInputController().setValue(i),this.#uc(i)),e?.preventDefault(),this.enableFullEditMode()}this.#ug(),this.dropdownController.updateDimensions(this.#up()),this.refreshDimensions(),this.hot.getShortcutManager().setActiveContextName("editor"),this.#um(),this.dropdownController.getInputController().listen(),this.#dc()}close(){this.#uf(),this.#uw(),this.dropdownController.getInputController().unlisten(),this.isFlippedHorizontally=!1}getValue(){return this.#ut.getItemsArray()}setValue(){}refreshDimensions(e=!0){let t=this.getEditedCellRect();if(!t)return void this.close();let{top:r,start:i,height:n,width:o}=t,s=this.hot.rootElement.getBoundingClientRect(),l=ip(this.#ur),a=this.#ur.style,{spaceInlineStart:h,spaceInlineEnd:d}=this.#uy(t),u=this.dropdownController.getOuterWidth(),c=e?u>d&&h>d:this.isFlippedHorizontally;this.isFlippedHorizontally=c;let g=c?i-(u-o):i;a.position="fixed",a.top=`${s.top+r+n-l.top}px`,this.hot.isRtl()?(a.left="",a.right=`${l.left+l.width-s.right+g}px`):(a.right="",a.left=`${s.left+g-l.left}px`),rW(this.#ur,"ht_editor_visible")}focus(){!1===this.#un("searchInput")?this.dropdownController.focusFirstItem():this.dropdownController.focusSearchInput()}getInputElement(){return this.dropdownController.getInputController().getInputElement()}destroy(){this.close(),this.dropdownController.reset(),this.eventManager.destroy()}#ui(){return this.cellProperties.source??[]}#um(){let e=this.hot.getShortcutManager().getContext("editor");e.addShortcuts([{keys:[["ArrowUp"]],callback:()=>{this.dropdownController.focusPreviousItem()}},{keys:[["ArrowDown"]],callback:()=>{iQ(this.hot.rootDocument)===this.getInputElement()?this.dropdownController.focusFirstItem():this.dropdownController.focusNextItem()}}],{group:bE}),e.addShortcuts([{keys:[["enter"],["shift","enter"],["control/meta","enter"],["control/meta","shift","enter"]],runOnlyIf:()=>!this.#un("enterCommits"),callback:e=>{let t=iQ(this.hot.rootDocument);return t instanceof HTMLInputElement&&"checkbox"===t.type&&(t.checked=!t.checked,t.dispatchEvent(new Event("change"))),e.preventDefault(),!1}},{keys:[["space"]],runOnlyIf:()=>!this.#un("enterCommits"),callback:e=>{e.preventDefault()}}],{group:bE,relativeToGroup:ml,position:"before"})}#uw(){this.hot.getShortcutManager().getContext("editor").removeShortcutsByGroup(bE)}#ug(){this.#ur.style.display=""}#uf(){this.#ur.style.display="none"}#uo(){this.dropdownController.disableCheckboxes()}#uh(){this.dropdownController.enableCheckboxes()}#uc(e,t=this.#un("filterSelectedItems")??!0){let r=this.cellProperties.locale,i=this.#ui().filter(i=>{let n="object"==typeof i&&null!==i&&"value"in i?i.value:i;return!!(!t&&this.#ut.has(i))||(this.cellProperties.filteringCaseSensitive?String(n).includes(e):ou(String(n),r).includes(ou(e,r)))});this.dropdownController.fillDropdown(i,this.#ut.getItemsArray()),this.dropdownController.updateDimensions(this.#up(),!0),this.refreshDimensions(!1)}#uu(){if(this.isOpened()&&this.getEditedCell()){let e=this.dropdownContainerElement,{scrollTop:t}=e;this.dropdownController.updateDimensions(this.#up()),e.scrollTop=t}this.refreshDimensions()}#dc(){if(this.#dd)return;let e=e=>{if(this.hot.isDestroyed||!this.hot.rootElement||!this.isOpened())return;let t=e?.target;iG(t)&&this.hot.rootElement.contains(t)||this.#uu()};this.eventManager.addEventListener(this.hot.rootDocument,"scroll",e,{capture:!0,passive:!0}),this.eventManager.addEventListener(this.hot.rootWindow,"resize",()=>e(),{passive:!0}),this.#dd=!0}#up(){let e=this.getEditedCell().getBoundingClientRect(),{spaceAbove:t,spaceBelow:r}=yv(e,ip(this.#ur),this.hot.rootDocument.documentElement.clientHeight);return{spaceAbove:t,spaceBelow:r,cellHeight:e.height}}#uy(e){var t;let r,i,{view:n}=this.hot,o=n.isHorizontallyScrollableByWindow()?yC(this.hot):void 0;return t=n.getWorkspaceWidth(),r=e.start+e.width,i=t,o&&(r=Math.max(r+o.inlineStartOffset,0),i=o.viewportWidth),{spaceInlineStart:r,spaceInlineEnd:i-r+e.width}}#ub(){let e=this.#ut.getItemsArray();this.saveValue([[e]])}#ul(e,t){e?this.#ut.add({key:e,value:t}):this.#ut.add(t),this.#ub(),this.refreshDimensions(!1)}#ua(e,t){e?this.#ut.remove({key:e,value:t}):this.#ut.remove(t),this.#ub(),this.refreshDimensions(!1)}#us(e){e.length>0?this.#ut=new bv(e):this.#ut=new bv}#un(e){return this.cellProperties[e]}#ud(e,t){this.isOpened()&&t===`${bR}-renderer`&&Array.isArray(e)&&e.length>0&&e[0][0]===this.cellProperties.visualRow&&this.hot.propToCol(e[0][1])===this.cellProperties.visualCol&&(this.#us(e[0][3]),this.dropdownController.fillDropdown(this.#ui(),this.#ut.getItemsArray()),this.dropdownController.focusItem(0),this.#ut.getSize()>=this.#un("maxSelections")?this.#uo():this.#uh())}}function bx(e,t,r,i,n,o,s){rJ(t,null==o?"":o,!1)}function bA(e,t,r,i,n,o,s){let{rootDocument:l}=e,a=s.allowHtml?bx:yf,h=l.createElement("DIV"),d=e.getSettings().ariaTags;h.className="htAutocompleteArrow",d&&h.setAttribute(...F()),h.appendChild(l.createTextNode(String.fromCharCode(9660))),h.appendChild(be(e,"selectArrow")),a.apply(this,[e,t,r,i,n,o,s]);let u=r2(t);if(u.firstChild||u.appendChild(l.createTextNode(String.fromCharCode(160))),u.insertBefore(h,u.firstChild),rW(t,"htAutocomplete"),!e.acArrowListener){let n=new n2(e);e.acArrowListener=function(n){!nd(n)&&nc(n)&&null!==rA(n).closest(".htAutocompleteArrow")&&e.view._wt.getSetting("onCellDblClick",null,e._createCellCoords(r,i),t)},n.addEventListener(e.rootElement,"mousedown",e.acArrowListener),e.addHookOnce("afterDestroy",()=>{n.destroy()})}}function bM(e,t,r,i,n,o,s){bA.apply(this,[e,t,r,i,n,o,s])}function bI(e){return"checkbox"===e.type}function bN(e){return{checked:void 0===e.checkedTemplate||e.checkedTemplate,unchecked:void 0!==e.uncheckedTemplate&&e.uncheckedTemplate}}function bO(e,t){let r=bN(t),i="string"==typeof t.locale?t.locale:void 0,n=ou(eW(e),i),o=e=>n===ou(eW(e),i);return e===r.checked?"checked":e===r.unchecked?"unchecked":o(r.checked)?"checked":o(r.unchecked)?"unchecked":null}function bk(e,t){return"checked"===bO(e,t)}function bH(e,t,r){let i=e.toVisualRow(t);if(null!==i)return e.getCellMetaTransient(i,r);let n=e.toPhysicalColumn(r)??r;return e._getMetaManager().getCellMetaTransient(t,n,{visualRow:t,visualColumn:r})}function b_(e,t,r,i,n){let o=e.colToProp(t)??t,s=[],l=[];return r.forEach(r=>{let n=e.toVisualRow(r),a=bH(e,r,t);if(a.readOnly||!bI(a)||bk(null===n?e.getSourceDataAtCell(r,o):e.getDataAtCell(n,t),a)===i)return;let h=bN(a),d=i?h.checked:h.unchecked;null===n?l.push([r,d]):s.push([n,t,d])}),s.length>0&&e.setDataAtCell(s,n),l.length>0&&e.setSourceDataAtCell(l.map(([e,t])=>[e,o,t]),0,null,n),s.length+l.length}bx.RENDERER_TYPE="html",bA.RENDERER_TYPE="autocomplete",bM.RENDERER_TYPE="dropdown";let bP="#bad-value#",bD="ht-loading",bL=new WeakMap,bF=new WeakMap,bB="data-row",bV="data-col",bz="checkbox";function bU(e,t,r,i,n,o,s){let l,a,h,d,{rootDocument:u}=e,c=e.getSettings().ariaTags;!function(e){let t=bF.get(e);if(!t){let{rootElement:r}=e;(t=new n2(e)).addEventListener(r,"click",t=>(function(e,t){let r=rA(e);if(!b$(r)||!r.hasAttribute(bB)||!r.hasAttribute(bV))return;let i=Number.parseInt(r.getAttribute(bB),10),n=Number.parseInt(r.getAttribute(bV),10),o=t.getCellMetaTransient(i,n);(o.readOnly||!bW(o))&&e.preventDefault()})(t,e)),t.addEventListener(r,"mouseup",t=>{var r,i;let n;return r=t,i=e,void(!b$(n=rA(r))||n.hasAttribute(bB)&&n.hasAttribute(bV)&&setTimeout(i.listen,10))}),t.addEventListener(r,"change",t=>(function(e,t){let r=rA(e);if(!b$(r)||!r.hasAttribute(bB)||!r.hasAttribute(bV))return;let i=Number.parseInt(r.getAttribute(bB),10),n=Number.parseInt(r.getAttribute(bV),10),o=t.getCellMetaTransient(i,n);if(!o.readOnly&&bW(o)){let e=null;e=r.checked?void 0===o.uncheckedTemplate||o.checkedTemplate:void 0!==o.uncheckedTemplate&&o.uncheckedTemplate,t.setDataAtCell(i,n,e)}})(t,e)),bF.set(e,t)}}(e);let g=((l=u.createElement("input")).className="htCheckboxRendererInput",l.type="checkbox",l.setAttribute("tabindex","-1"),l.cloneNode(!1)),p=g,m=g,f=s.label,w=!1;void 0===s.checkedTemplate&&(s.checkedTemplate=!0),void 0===s.uncheckedTemplate&&(s.uncheckedTemplate=!1);let y=r2(t);rK(y),"checked"===(a=bO(o,s))?(g.checked=!0,g.defaultChecked=!0):"unchecked"===a?g.checked=!1:ej(o)?rW(g,"noValue"):(g.style.display="none",rW(g,"htBadValue"),w=!0),rG(g,[[bB,r],[bV,i]]),bW(s)||!1===s.readOnlyStyling||(g.disabled=!0),c&&rG(g,[_(g.checked?e.getTranslatedPhrase(cN):e.getTranslatedPhrase(cO)),K(g.checked),["role","checkbox"]]),w||(((h=u.createElement("span")).className="htCheckboxRendererBox",p=h).appendChild(g),p.appendChild(be(e,"checkbox")),m=p),function(){if(!w&&f){let t="";if(f.value){let e=f.value;t="function"==typeof f.value?String(e(r,i,n,o)):String(f.value)}else if(f.property){let i=e.getDataAtRowProp(r,String(f.property));t=null!==i?String(i):""}let s=function(e,t,r){let i=e.createElement("label");i.className=`htCheckboxRendererLabel ${r?"fullWidth":""}`;let n=e.createTextNode(t);if(r){let t=e.createElement("span");t.className="htCheckboxRendererLabelText",t.appendChild(n),i.appendChild(t)}else i.appendChild(n);return i.cloneNode(!0)}(u,t,!0!==f.separated);"before"===f.position?f.separated?(y.appendChild(s),y.appendChild(p)):(s.appendChild(p),m=s):f.position&&"after"!==f.position||(f.separated?(y.appendChild(p),y.appendChild(s)):(s.insertBefore(p,s.firstChild),m=s))}}();function b(t=!1,r=!1){let i=e.getSelectedRange(),n=[],o=new Map,s=[],l=0;if(i){for(let r=0;r<i.length;r++){let{row:a,col:h}=i[r].getTopStartCorner(),{row:d,col:u}=i[r].getBottomEndCorner();if(!(null===a||null===h||null===d||null===u||i[r].isHeader())){for(let r=a;r<=d;r+=1)for(let i=h;i<=u;i+=1){let a=e.getCellMetaTransient(r,i);if(a.hidden)continue;let h={checkedTemplate:a.checkedTemplate,uncheckedTemplate:a.uncheckedTemplate};if("checkbox"!==a.type){!0!==t||a.readOnly||(o.has(n.length)?o.set(n.length,[...o.get(n.length),[r,i,null]]):o.set(n.length,[[r,i,null]]));continue}if(!0===a.readOnly||!bW(a))continue;void 0===a.checkedTemplate&&(a.checkedTemplate=!0),void 0===a.uncheckedTemplate&&(a.uncheckedTemplate=!1);let d=e.getDataAtCell(r,i);if(!1===t){let e=null==d?"unchecked":bO(d,a);"checked"===e?s.push([r,i,a.uncheckedTemplate,h]):"unchecked"===e&&s.push([r,i,a.checkedTemplate,h])}else s.push([r,i,a.uncheckedTemplate,h]);l+=1}n.push(l),l=0}}if((s=s.every(([,,e])=>e===s[0][2])?s.map(([e,t,r])=>[e,t,r]):s.map(([e,t,,r])=>[e,t,r?.checkedTemplate])).length>0||o.size>0&&r){let r=[];if(n.forEach((e,t)=>{let i=s.splice(0,e);o.size&&o.has(t)&&(i=[...i,...o.get(t)??[]]),r.push(i)}),t){let t=[];r.forEach(e=>{e.forEach(e=>{t.push(e)})}),t.length>0&&e.setDataAtCell(t)}else r.forEach(t=>{t.length>0&&e.setDataAtCell(t)})}}}function C(){let t=e.getSelectedRange();if(t){for(let r=0;r<t.length;r++){let i=t[r].getTopStartCorner(),n=t[r].getBottomEndCorner();if(!(null===i.row||null===i.col||null===n.row||null===n.col||t[r].isHeader()))for(let t=i.row;t<=n.row;t++)for(let r=i.col;r<=n.col;r++){let i=e.getCellMetaTransient(t,r);if(i.readOnly)continue;if("checkbox"===i.type)return!0;let n=e.getCell(t,r);if(iG(n)&&n.querySelectorAll("input[type=checkbox]").length>0)return!0}}return!1}}f&&(!f||f.separated)||y.appendChild(m),w&&y.appendChild(u.createTextNode(bP)),bL.has(e)||(bL.set(e,!0),d=e.getShortcutManager().getContext("grid"),d?.addShortcuts([{keys:[["space"]],callback:()=>(b(),!C()),runOnlyIf:()=>{let t;return md(e)&&!!(t=e.getSelectedRangeActive())&&!t.isHeader()}},{keys:[["enter"]],callback:()=>(b(),!C()),runOnlyIf:()=>{let t=e.getSelectedRangeActive();return md(e)&&!!(e.getSettings().enterBeginsEditing&&t?.highlight.isCell()&&!e.selection.isMultiple())}},{keys:[["delete"],["backspace"]],callback:()=>{let e=C();return b(!0,e),!e},runOnlyIf:()=>md(e)&&!!e.getSelectedRangeActive()?.highlight.isCell()}],{group:"checkboxRenderer",relativeToGroup:ml,position:"before"}))}function bW(e){return!1!==e.editor&&null!==e.editor}function b$(e){return"INPUT"===e.tagName&&"checkbox"===e.getAttribute("type")}function bG(e,t,r,i,n,o,s){bA.apply(this,[e,t,r,i,n,o,s])}nM.getSingleton().add("modifyAutoColumnSizeSeed",function(e,t,r){let{label:i,type:n,row:o,column:s,prop:l}=t;if(n!==bz||!i)return;let{value:a,property:h}=i,d=r;if(a)d="function"==typeof a?a(o,s,l,r):a;else if(h){let e=this.getDataAtRowProp(o,String(h));d=null!==e?e:r}return`${eW(d).length}`}),bU.RENDERER_TYPE=bz,bG.RENDERER_TYPE="handsontable";let bj={year:"numeric",month:"2-digit",day:"2-digit"},bY=new WeakSet;function bK(e,t){let{dateFormat:r,locale:i,allowEmpty:n,instance:o}=t;if(ej(e))return n?e:bP;if("string"==typeof r)return o&&!bY.has(o)&&(bY.add(o),rn("The dateFormat option as a string is not supported. Use an Intl.DateTimeFormatOptions object instead.")),e;let s=yH(e);return null===s?bP:yq(i,tx(r)?r:bj,s)}function bq(e,t,r,i,n,o,s){yf.apply(this,[e,t,r,i,n,o,s])}function bX(e,t,r,i,n,o,s){bq.apply(this,[e,t,r,i,n,o,s])}bq.valueFormatter=bK,bq.RENDERER_TYPE="date",bX.valueFormatter=bK,bX.RENDERER_TYPE="intl-date";let bQ={year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!1},bZ=new WeakSet;function bJ(e,t){let{dateTimeFormat:r,locale:i,allowEmpty:n,instance:o}=t;if(ej(e))return n?e:bP;if("string"==typeof r)return o&&!bZ.has(o)&&(bZ.add(o),rn("The dateTimeFormat option as a string is not supported. Use an Intl.DateTimeFormatOptions object instead.")),e;let s=yz(e);return null===s?bP:yq(i,tx(r)?r:bQ,s)}function b0(e,t,r,i,n,o,s){yf.apply(this,[e,t,r,i,n,o,s])}b0.valueFormatter=bJ,b0.RENDERER_TYPE="intl-datetime";let b1={hour:"numeric",minute:"2-digit"},b2=new WeakSet;function b3(e,t){let{timeFormat:r,locale:i,allowEmpty:n,instance:o}=t;if(ej(e))return n?e:bP;let s=yF(e);return null===s?bP:("string"==typeof r&&o&&!b2.has(o)&&(b2.add(o),rn("The timeFormat option as a string is not supported. Use an Intl.DateTimeFormatOptions object instead.")),yK(i,tx(r)?r:b1).format(s))}function b6(e,t,r,i,n,o,s){yf.apply(this,[e,t,r,i,n,o,s]),t.dir="ltr"}function b5(e,t,r,i,n,o,s){b6.apply(this,[e,t,r,i,n,o,s])}b6.valueFormatter=b3,b6.RENDERER_TYPE="time",b5.RENDERER_TYPE="intl-time";let b4={useGrouping:!1,maximumFractionDigits:20},b8=new Map,b9=new WeakSet;function b7(e,t){return oO(e)&&(e=function(e,t){let{numericFormat:r,locale:i}=t,n=r??b4,o=`${i??""}:${JSON.stringify(n)}`,s=b8.get(o);return void 0===s&&(s=new Intl.NumberFormat(i,n),b8.set(o,s)),s.format(e)}(e,t)),e}function Ce(e,t,r,i,n,o,s){let l=s.numericFormat;if(l?.pattern!==void 0||l?.culture!==void 0){let e=s.instance;b9.has(e)||(b9.add(e),rn("The numericFormat.pattern and numericFormat.culture options are not supported. Use Intl.NumberFormat options instead (numericFormat: { style, currency, ... })."))}let a=rV(s.className),h=[];0>a.indexOf("htLeft")&&0>a.indexOf("htCenter")&&0>a.indexOf("htRight")&&0>a.indexOf("htJustify")&&(a.push("htRight"),h.push("htRight")),0>a.indexOf("htNumeric")&&(a.push("htNumeric"),h.push("htNumeric")),h.length>0&&(s.className=a.join(" "),function(e,t){if(0===t.length)return;let r=pC.get(e);void 0===r?pC.set(e,t):t.forEach(e=>{r.includes(e)||r.push(e)})}(s,h)),t.dir="ltr",yf.apply(this,[e,t,r,i,n,o,s])}function Ct(e,t){let r=t.hashLength||eW(e).length,i=String(t.hashSymbol??"*"),n="";for(let e=0;e<r;e++)n+=i;return n}function Cr(e,t,r,i,n,o){rJ(t,o,ow(e),"password",e.rootElement)}function Ci(e,t,r,i,n,o,s){yf.apply(this,[e,t,r,i,n,o,s])}function Cn(e,t){Co(this,e,t,!!this.strict)}function Co(e,t,r,i){let n=e=>yT(e)?n(e.key)&&n(e.value):null==e,o=t;(n(o)&&(o=""),""===o)?r(!!e.allowEmpty):i&&e.source?"function"==typeof e.source?e.source(o,Cs(o,r)):Cs(o,r)(e.source):r(!0)}function Cs(e,t){return function(r){let i=!1;for(let t=0,n=r.length;t<n;t++)if(tE(e,r[t])){i=!0;break}t(i)}}function Cl(e,t){t(null!==bO(e,this)||ej(e)&&!1!==this.allowEmpty)}function Ca(e,t){return!!(t.allowEmpty&&ej(e)||"string"==typeof e&&e.startsWith("="))||yD(e)}function Ch(e,t){t(!!(this.allowEmpty&&ej(e))||yD(e))}function Cd(e,t){Co(this,e,t,!0)}function Cu(e,t){Ch.call(this,e,t)}function Cc(e,t){return!!(t.allowEmpty&&ej(e)||"string"==typeof e&&e.startsWith("="))||yU(e)}function Cg(e,t){t(!!(this.allowEmpty&&ej(e))||yU(e))}function Cp(e,t){return!!(t.allowEmpty&&ej(e)||"string"==typeof e&&e.startsWith("="))||yB(e)}function Cm(e,t){t(!!(this.allowEmpty&&ej(e))||yB(e))}function Cf(e,t){Cm.call(this,e,t)}function Cw(e,t){let r=e;(null==r&&(r=""),this.allowEmpty&&""===r)?t(!0):(this.allowEmpty||""!==r)&&Array.isArray(r)?0===r.length?t(!0):this.source?"function"==typeof this.source?this.source(r,Cy(r,t)):Cy(r,t)(this.source):t(!0):t(!1)}function Cy(e,t){return function(r){let i=!0;for(let t=0,n=e.length;t<n;t++){let n=!1;for(let i=0,o=r.length;i<o;i++)if(tF(e[t])&&!tF(r[i])||!tF(e[t])&&tF(r[i])){n=!1;break}else tF(e[t])&&tF(r[i])&&tE(e[t],r[i])?n=!0:"string"==typeof e[t]&&"string"==typeof r[i]&&e[t]===r[i]&&(n=!0);if(!n){i=!1;break}}t(i)}}function Cb(e,t){let r=e;null==r&&(r=""),t(!!this.allowEmpty&&""===r||""!==r&&oO(e))}function CC(e,t,r,i){return tx(e)&&void 0!==e.value?yx(e.value,i?.sourceLabel):e}function CS(e,t,r,i,n){var o;if(yT(e)||"string"==typeof n&&n.startsWith("UndoRedo."))return e;if(!ej(e)&&Array.isArray(o=i?.source)&&o.some(yT)){let t=yM(i?.source,e,i?.allowHtml===!0,i?.sourceLabel);if(yT(t))return t}let s=this.getSourceDataAtCell(this.toPhysicalRow(t),this.toPhysicalColumn(r));return!ej(e)&&yT(s)?{key:e,value:e}:e}Ce.valueFormatter=b7,Ce.RENDERER_TYPE="numeric",Cr.valueFormatter=Ct,Cr.RENDERER_TYPE="password",Ci.RENDERER_TYPE="select",Cn.VALIDATOR_TYPE="autocomplete",Cl.VALIDATOR_TYPE="checkbox",Ca.rowIndependent=!0,Ch.VALIDATOR_TYPE="date",Cd.VALIDATOR_TYPE="dropdown",Cu.VALIDATOR_TYPE="intl-date",Cc.rowIndependent=!0,Cg.VALIDATOR_TYPE="intl-datetime",Cp.rowIndependent=!0,Cm.VALIDATOR_TYPE="time",Cf.VALIDATOR_TYPE="intl-time",Cw.VALIDATOR_TYPE="multiselect",Cb.VALIDATOR_TYPE="numeric";let Cv="ht-multi-select",CR=`${Cv}-chip`,CE=`${Cv}-chip-remove`,CT=`${Cv}-arrow`,Cx=`${Cv}-chip-label`,CA=`${Cv}-overflow`,CM=new WeakSet,CI=new WeakMap,CN=new WeakMap,CO=new WeakMap;function Ck(e){return!e.readOnly&&!1!==e.editor&&null!==e.editor}function CH(e){let t=rA(e);return t&&null!==t.closest(`.${CE}`)?t.closest(`.${CR}`):null}function C_(e,t){let{row:r,col:i}=t.dataset;return void 0!==r&&void 0!==i&&Ck(e.getCellMetaTransient(Number(r),Number(i)))}function CP(e,t){return tF(e)?e[t]:e}function CD(e){if(null==e||""===e)return[];if(Array.isArray(e))return e;if("string"==typeof e)try{let t=JSON.parse(e);return Array.isArray(t)?t:[t]}catch{return e.trim()?[e]:[]}return[e]}function CL(e,t,r,i,n){var o;let s,l=r2(t);l.insertBefore((o=e.rootDocument,rW(s=o.createElement("span"),CT),s.dataset.row=String(r),s.dataset.col=String(i),n&&s.setAttribute(...F()),s.appendChild(be(e,"selectArrow")),s),l.firstChild),function(e){if(CO.has(e))return;let t=new n2(e);CO.set(e,t),e.addHookOnce("afterDestroy",()=>{t.destroy(),CO.delete(e)}),t.addEventListener(e.rootElement,"mousedown",t=>{let r=rA(t);if(!iG(r)||!rU(r,CT)||!nc(t)||nd(t))return;let i=Number(r.dataset.row),n=Number(r.dataset.col),o=r.closest("td");e.view._wt.getSetting("onCellDblClick",null,e._createCellCoords(i,n),o)})}(e)}function CF(e){return Array.isArray(e)?ew(e.map(e=>tF(e)?e.value:e),", "):e}let CB={CELL_TYPE:"multiselect",_complexDataFormat:!0,editor:bT,renderer:function(e,t,r,i,n,o,s){ys(e,t,r,i,n,o,s);let{rootDocument:l}=e,a=e.getSettings().ariaTags??!1,h=o;if(ej(h)&&s.placeholder){r0(t,h=eW(h=s.placeholder)),CL(e,t,r,i,a);return}let d=e.toPhysicalRow(r),u=CD(e.getSourceDataAtCell(d,i)),c=r2(t);if(rK(c),rW(t,"ht-multi-select-renderer"),0===u.length){c.appendChild(l.createTextNode("")),CL(e,t,r,i,a);return}let g=l.createElement("div");g.className="ht-multi-select-chips-container";let p=Ck(s)||!1===s.readOnlyStyling;u.forEach(t=>{let o=function(e,t,r,i,n,o,s,l=!0){let a=e.createElement("span"),h=CP(t,"value");rW(a,CR),a.dataset.row=String(i),a.dataset.col=String(n),a.dataset.prop=String(o),a.title=h;let d=e.createElement("span");if(rW(d,Cx),d.textContent=h,a.appendChild(d),a.dataset.key=CP(t,"key"),!l)return a;let u=e.createElement("span");return rW(u,CE),r&&u.setAttribute(...F()),u.appendChild(be(s,"chipClose")),a.appendChild(u),a}(l,t,a,r,i,n,e,p);g.appendChild(o)}),c.appendChild(g),CN.has(e)||(CN.set(e,new n2(e)),CN.get(e).addEventListener(e.rootElement,"click",t=>{var r,i;let n=CH(t);if(!n||(t.preventDefault(),t.stopPropagation(),!C_(e,n)))return;let o=Number(n.dataset.row??0),s=Number(n.dataset.col??0),l=e.toPhysicalRow(o),a=e.getSourceDataAtCell(l,s),h=n.dataset.key,d=(r=CD(a),i=h,r.filter(e=>CP(e,"key")!==i));e.setDataAtCell(o,s,d,"multiselect-renderer")}),e.addHook("beforeOnCellMouseDown",t=>{let r=CH(t);null!==r&&C_(e,r)&&nh(t)})),CL(e,t,r,i,a),function(e,t,r){let i=null===e?null:e-function(e,t){let r=e.parentElement.querySelector(`.${CT}`);if(!r)return 0;let i=t.defaultView.getComputedStyle(r);return r.offsetWidth+(parseFloat(i.marginLeft)||0)+(parseFloat(i.marginRight)||0)}(t,r),n=t.querySelectorAll(`.${CR}`);for(let e=0;e<n.length;e++)n[e].style.display="";if(null===i||0===n.length)return;let o=t.querySelector(`.${CA}`);if(o)o.style.display="",o.style.visibility="hidden";else{var s;let e;s=n.length,rW(e=r.createElement("span"),CA),e.textContent=`+${s}`,(o=e).style.visibility="hidden",t.appendChild(o)}let l=parseFloat(r.defaultView.getComputedStyle(t).gap)||0,a=o.offsetWidth,h=0,d=0;for(let e=0;e<n.length;e++){let t=h+n[e].offsetWidth+(e<n.length-1?l:0);if(t<=i-(e<n.length-1?a+l:0))h=t,d+=1;else break}let u=n.length-d;if(u>0){for(let e=d;e<n.length;e++)n[e].style.display="none";o.textContent=`+${u}`,o.style.visibility="visible"}else o.style.display="none"}(function(e,t){let r=e.getColWidth(t);if(CI.has(e)){let i=CI.get(e);i[t]?.width!==r&&CI.set(e,{...i,[t]:{width:r}})}else CI.set(e,{[t]:{width:r}});return CM.has(e)||(e.addHook("beforeColumnResize",(...t)=>{let r=t[0],i=t[1],n=CI.get(e);n?.[i]?.width!==r&&CI.set(e,{...n,[i]:{width:r}})}),CM.add(e)),CI.get(e)?.[t]?.width??r}(e,i),g,l)},validator:Cw,valueGetter:CF,valueSetter:function(e,t,r){if(Array.isArray(e)){let i=this.getSourceDataAtCell(this.toPhysicalRow(t),r);if(Array.isArray(i)&&i.length>0&&tF(i[0]))return e.map(e=>tF(e)?e:{key:e,value:e})}return e},parsePastedValue:!0};class CV{#uC;#uS;#uv=null;#uR=!1;#uE=!1;constructor(e,t){this.#uC=e,this.#uS=t}isLive(){return!this.#uE&&this.#uS()}isStarted(){return this.#uR}start(e){this.#uR=!0,this.#uv=e,this.#uC(this.release)}release=()=>{if(this.#uE)return;this.#uE=!0;let e=this.#uv;this.#uv=null,e?.()}}class Cz{#uT=[];#ux=0;#tF=0;#uA=!1;#uM;constructor(e){this.#uM=e}push(e){this.#uT.push(e),this.pump()}pump(){if(!this.#uA){this.#uA=!0;try{for(;this.#ux<this.#uT.length&&this.#tF<this.#uM();){let e=this.#uT[this.#ux];this.#ux+=1,e.isLive()&&(this.#tF+=1,e.start(this.#uv))}}finally{this.#uA=!1,this.#ux===this.#uT.length?this.clear():this.#ux>1024&&2*this.#ux>this.#uT.length&&(this.#uT=this.#uT.slice(this.#ux),this.#ux=0)}}}clear(){this.#uT=[],this.#ux=0}#uv=()=>{this.#tF-=1,this.pump()}}function CU(e){return"string"==typeof e||"number"==typeof e}function CW(e){let t=[],r=[],i=new Set,n=new Set;return eo(e,e=>{oD(Math.min(e.startRow,e.endRow),Math.max(e.startRow,e.endRow),e=>{i.has(e)||(i.add(e),t.push(e))}),oD(Math.min(e.startCol,e.endCol),Math.max(e.startCol,e.endCol),e=>{n.has(e)||(n.add(e),r.push(e))})}),{rows:t,columns:r}}let C$="htAsyncIndicator",CG="htAsyncErrorMessage",Cj="htAsyncPendingMessage",CY="htAsyncErrorMarker",CK=[C$,CG,Cj,CY],Cq="data-ht-async";function CX(e,t,r){let i=e.createElement("span");return i.className=t,""===r?i.setAttribute("aria-hidden","true"):i.textContent=r,i}let CQ=Object.freeze({capability:"feat:async_values",name:"Async values",gate:"enable",tiers:Object.freeze(["standard","professional"])}),CZ="asyncValues",CJ="AsyncValues.resolve",C0=Symbol("vetoed");sw(CZ,"nestedRows");let C1=new Set(["auto","UndoRedo.undo","UndoRedo.redo"]);function C2(e){return e.state.physicalRow}class C3 extends sM{static get PLUGIN_KEY(){return CZ}static get PLUGIN_PRIORITY(){return 340}static get LICENSE(){return CQ}static get DEFAULT_SETTINGS(){return{flush:"microtask",concurrency:6,copyPendingAs:"previous",saveToDataProvider:!1}}static get SETTINGS_VALIDATORS(){return{flush:e=>"microtask"===e||"frame"===e||"number"==typeof e&&e>=0&&Number.isFinite(e),concurrency:e=>e===1/0||Number.isInteger(e)&&e>=1,copyPendingAs:e=>"previous"===e||"empty"===e,saveToDataProvider:e=>"boolean"==typeof e}}#uI=null;#uN=new Set;#i2=new Set;#uO=0;#uk=!1;#uH=0;#hH=[];#u_=new Cz(()=>this.getSetting("concurrency")??6);#uP=null;#uD=!1;#uL=!1;#uF=[];#uB=!1;#uV=null;#uz=0;#uU=new Map;#uW=!1;#u$=[];#rS=null;#uG=!1;#uj=0;#uY=0;#uK=null;#uq=new WeakMap;#uX=new WeakMap;#uQ=!1;isEnabled(){return!!this.hot.getSettings()[CZ]}enablePlugin(){this.enabled||(this.#uI=this.hot.rowIndexMapper.createAndRegisterIndexMap(this.pluginName,"physicalIndexToValue",null),this.addHook("afterGetCellMeta",this.#uZ),this.addHook("afterRenderer",this.#uJ),this.addHook("beforeCopy",this.#u0),this.addHook("beforeCut",this.#u0),this.addHook("afterChange",this.#ud,-1),this.addHook("afterSetSourceDataAtCell",this.#u1,-1),this.addHook("beforeChange",this.#u2),this.addHook("afterSetDataAtRowProp",this.#u3),this.addHook("beforeValidate",this.#u6),this.addHook("postAfterValidate",this.#u5),this.hot._addDroppedChangesListener(this.#u4),this.addHook("afterCreateRow",this.#u8,-1),this.addHook("afterRemoveRow",this.#u8,-1),this.addHook("afterCreateCol",this.#u9),this.addHook("afterRemoveCol",this.#u7),this.addHook("beforeLoadData",this.#hZ),this.addHook("beforeUpdateData",this.#ce),this.addHook("afterLoadData",this.#ct,-1),this.addHook("afterUpdateData",this.#cr,-1),this.hot.rowIndexMapper.addLocalHook("init",this.#ci),this.hot.rowIndexMapper.addLocalHook("cacheUpdated",this.#cn),this.#uj=this.hot.rowIndexMapper.getNumberOfIndexes(),super.enablePlugin())}updatePlugin(){this.#u_.pump(),super.updatePlugin()}disablePlugin(){let e=null;if(this.#i2.size>0){this.#uD=!0;try{this.#co("disabled")}catch(t){e={error:t}}finally{this.#uD=!1}this.hot.markAllCellsChanged(),this.hot.render()}if(this.#uP?.(),this.#uP=null,this.#hH=[],this.#uU.clear(),this.#u_.clear(),this.#uN.clear(),this.#uL=!1,this.#uF=[],this.hot.rowIndexMapper.removeLocalHook("init",this.#ci),this.hot.rowIndexMapper.removeLocalHook("cacheUpdated",this.#cn),this.hot._removeDroppedChangesListener(this.#u4),this.#cs(),this.#cl(),this.#uI&&(this.hot.rowIndexMapper.unregisterMap(this.pluginName),this.#uI=null),super.disablePlugin(),e)throw e.error}setAsyncValue(e,t,r,i={}){return this.setAsyncValueAt({row:e,column:t},r,i)}setAsyncValueAt(e,t,r={}){let i;this.#ca();let n=this.#ch(e);n||tf(`The cell ${JSON.stringify(e)} cannot hold an async value.`);let o=this.#cd(r);try{i=this.#cu(n,t,o)}finally{this.#cc(o)}return i}setAsyncValues(e,t,r,i,n,o={}){this.#ca();let s=[];for(let n=Math.min(e,r);n<=Math.max(e,r);n++)for(let o=Math.min(t,i);o<=Math.max(t,i);o++){let l=this.#ch({row:n,column:o});l||tf(`The range (${e}, ${t}) - (${r}, ${i}) cannot hold async values.`),s.push(l)}return this.#cg(s,n,o)}setAsyncValuesForRows(e,t,r,i={}){return this.#ca(),this.#cg(this.#cp(e,t),r,i)}setAsyncValuesInBatches(e,t,r,i={}){this.#ca();let n=this.#cp(e,t),o=this.#cd(i),s=[];try{s=this.#cm(n,r,o)}finally{this.#cc(o)}return Promise.all(s)}cancel(e,t){this.cancelAt({row:e,column:t})}cancelAt(e){let t=this.#cf(e);t&&(this.#cw(t,"manual"),this.hot.render())}cancelAll(){this.#i2.size>0&&(this.#co("manual"),this.hot.render())}retry(e,t){return this.retryAt({row:e,column:t})}retryAt(e){let t=this.#cf(e);return t&&"error"===t.status&&t.origin?this.#cy([t])[0]:null}retryErrors(){let e=[...this.#i2].filter(e=>"error"===e.status&&e.origin);return Promise.all(e.length>0?this.#cy(e):[])}getAsyncState(e,t){return this.getAsyncStateAt({row:e,column:t})}getAsyncStateAt(e){let t=this.#cf(e);return t?"pending"===t.status?{status:"pending"}:{status:"error",error:t.error,message:t.message}:null}isPending(e,t){return this.#cf({row:e,column:t})?.status==="pending"}isPendingAt(e){return this.#cf(e)?.status==="pending"}getPendingCells(){return this.#cb("pending")}getErrorCells(){return this.#cb("error")}countPending(){return this.#uO}countErrors(){return this.#i2.size-this.#uO}destroy(){let e=[...this.#i2];null!==this.#rS&&(this.hot.rootWindow.cancelAnimationFrame(this.#rS),this.#rS=null),this.hot.rowIndexMapper.removeLocalHook("init",this.#ci),this.hot.rowIndexMapper.removeLocalHook("cacheUpdated",this.#cn),this.hot._removeDroppedChangesListener(this.#u4),this.#uP?.(),this.#uP=null,this.#i2.clear(),this.#uN.clear(),this.#hH=[],this.#u_.clear(),this.#uI=null,e.forEach(e=>{"pending"===e.status&&(e.controller?.abort(),e.batch?.controller.abort(),e.controller=null,e.settle({status:"canceled",reason:"disabled"}))}),super.destroy()}#cl(){this.#uQ&&(this.#uQ=!1,this.hot.getCellsMeta().forEach(e=>{tP(e,"asyncState")&&null!==e.asyncState&&(e.asyncState=null,e.asyncError=null)}))}#ca(){this.#uD||this.enabled&&this.#uI||tf("The AsyncValues plugin is not enabled.")}#cd(e){let t=e.batchSize;return{options:{dependsOn:[...e.dependsOn??[]],source:this.#cC(e.source),meta:e.meta??null,undo:"record"===e.undo?"record":"skip",keepSource:!1!==e.keepSource,batchSize:"number"==typeof t&&t>=1?Math.floor(t):25},live:0,unlanded:0,writeStates:new Set,finalized:!1}}#cC(e){return"string"!=typeof e||""===e?CJ:C1.has(e)||e.endsWith("Validator")?(rs(this,`asyncValues.source.${e}`,`The AsyncValues plugin: the "${e}" source is reserved, so "${CJ}" is used instead.`),CJ):e}#cg(e,t,r){let i=this.#cd(r),n=[],o=new Map;try{e.forEach(e=>{let r=o.get(e.physicalRow),s=r?.get(e.prop);s||(s=this.#cu(e,t,i),r||(r=new Map,o.set(e.physicalRow,r)),r.set(e.prop,s)),n.push(s)})}finally{this.#cc(i)}return Promise.all(n)}#cc(e){let t=this.#uV;if(this.#uV=null,this.#uI&&this.hot.render(),0===e.live&&this.#cS(),t)throw t.error}#cv(e){try{return{value:e()}}catch(e){return this.#uV??={error:e},null}}#cR(e){let t=this.#cE(e,e=>this.#cc(e));if(t)throw t.error}#cE(e,t){let r=null;return e.forEach(e=>{if(!this.#cT())try{t(e)}catch(e){r??={error:e}}}),r}#cT(){return!this.hot||this.hot.isDestroyed}#ch(e){if("row"in e){let{row:t,column:r}=e,i=Number.isInteger(t)&&Number.isInteger(r)&&t>=0&&t<this.hot.countRows()&&r>=0&&r<this.hot.countCols(),n=i?this.hot.toPhysicalRow(t):null,o=i?this.hot.colToProp(r):null;return null!==n&&CU(o)?{physicalRow:n,prop:o}:null}let t="rowId"in e?this.#cx(e.rowId):e.physicalRow;return null!==t&&this.#cA(t)&&this.#cM(e.prop)?{physicalRow:t,prop:e.prop}:null}#cp(e,t){return(this.#cM(t)||tf(`The column ${JSON.stringify(t)} cannot hold async values.`),"all"===e)?Array.from({length:this.hot.rowIndexMapper.getNumberOfIndexes()},(e,r)=>({physicalRow:r,prop:t})):(Array.isArray(e)||tf("The rows must be `'all'` or an array of `{ physicalRow }` or `{ rowId }` objects."),e.map(e=>{let r="object"==typeof e&&null!==e?this.#ch({...e,prop:t}):null;return r||tf(`The row ${JSON.stringify(e)} cannot hold an async value.`),r}))}#cA(e){return Number.isInteger(e)&&e>=0&&e<this.hot.rowIndexMapper.getNumberOfIndexes()}#cM(e){if(!CU(e))return!1;let t=this.hot.propToCol(e);return"number"==typeof t&&t>=0&&t<this.hot.countCols()}#cI(e){return this.hot.getRowIdAtPhysicalRow(e)??null}#cx(e){return null==e?null:this.hot.getPhysicalRowById(e)}#cN(e,t,r){if(this.#uD||!this.#uI)return{entry:null,result:Promise.resolve({status:"canceled",reason:"disabled"})};let{physicalRow:i,prop:n}=e,o=this.#cv(()=>this.hot.runHooks("beforeAsyncValueStart",i,n,this.#cI(i)));if(!o||!1===o.value)return{entry:null,result:Promise.resolve({status:"canceled",reason:"vetoed"})};if(this.#uD||!this.#uI)return{entry:null,result:Promise.resolve({status:"canceled",reason:"disabled"})};let s=()=>{},l=new Promise(e=>{s=e}),a=this.#cO(i),h={status:"pending",state:a,prop:n,controller:new AbortController,error:null,message:"",settle:s,run:t,origin:t.options.keepSource?r:null,batch:null,launch:null,finished:!1,reported:!1},d=a.entries.get(n);return t.live+=1,this.#ck(h),d&&this.#cH(d),this.#c_(h),d&&this.#cv(()=>this.#cP([[d,"restart"]])),this.#cD(h)&&this.#cv(()=>this.hot.runHooks("afterAsyncValueStart",i,n,this.#cI(i))),{entry:this.#cD(h)?h:null,result:l}}#cu(e,t,r){"function"!=typeof t&&Promise.resolve(t).catch(()=>{});let{entry:i,result:n}=this.#cN(e,r,"function"==typeof t?{kind:"cell",source:t}:null);return i&&(i.launch=new CV(e=>{if(!this.#cD(i))return void e();let r=this.#cL(i);new Promise(e=>{e("function"==typeof t?t(r):t)}).then(t=>{e(),this.#cF({entry:i,outcome:{status:"resolved",value:t}})},t=>{e(),this.#cF({entry:i,outcome:{status:"rejected",error:t}})})},()=>this.#cD(i)),this.#u_.push(i.launch)),n}#cm(e,t,r){let i=[],n=new Map,{batchSize:o}=r.options,s={controller:new AbortController,entries:[],canceled:0};try{e.forEach(({physicalRow:e,prop:l})=>{let a=n.get(e),h=a?.get(l);if(h)return void i.push(h);let{entry:d,result:u}=this.#cN({physicalRow:e,prop:l},r,{kind:"batch",source:t});a||(a=new Map,n.set(e,a)),a.set(l,u),i.push(u),d&&(d.batch=s,s.entries.push(d)),s.entries.length===o&&(this.#cB(s,t),s={controller:new AbortController,entries:[],canceled:0})})}finally{s.entries.length>0&&this.#cB(s,t)}return i}#cB(e,t){let r=new CV(r=>{let i=e.entries.filter(e=>this.#cD(e));if(0===i.length)return void r();let n=i.map(e=>this.#cL(e));new Promise(r=>{r(t(n,e.controller.signal))}).then(e=>{r(),this.#cV(i,e)},e=>{r(),i.forEach(t=>this.#cF({entry:t,outcome:{status:"rejected",error:e}}))})},()=>e.entries.some(e=>this.#cD(e)));e.entries.forEach(e=>{e.launch=r}),this.#u_.push(r)}#cV(e,t){if(!function(e){if(Array.isArray(e))return!0;if("object"!=typeof e||null===e)return!1;let{length:t}=e;return Number.isInteger(t)&&t>=0}(t)){rs(this,"asyncValues.batchAnswer","The AsyncValues plugin: a batch source resolved with something that is not an array, so every cell of the batch was rejected."),e.forEach(e=>this.#cF({entry:e,outcome:{status:"rejected",error:void 0}}));return}e.forEach((e,r)=>{let i=t[r];this.#cF({entry:e,outcome:void 0===i||i instanceof Error?{status:"rejected",error:i}:{status:"resolved",value:i}})})}#cy(e){let t=new Map,r=new Map,i=new Map;try{e.forEach(e=>{let n=r.get(e.run.options);n||(n={options:e.run.options,live:0,unlanded:0,writeStates:new Set,finalized:!1},r.set(e.run.options,n));let o=e.origin;if("cell"===o.kind)return void t.set(e,this.#cu({physicalRow:C2(e),prop:e.prop},o.source,n));let s=i.get(o.source);s||(s=new Map,i.set(o.source,s));let l=s.get(n);l?l.push(e):s.set(n,[e])}),i.forEach((e,r)=>{e.forEach((e,i)=>{this.#cm(e.map(e=>({physicalRow:C2(e),prop:e.prop})),r,i).forEach((r,i)=>t.set(e[i],r))})})}finally{this.#cR([...r.values()])}return e.map(e=>t.get(e))}#cL(e){let t=C2(e),r=this.hot.propToCol(e.prop);return{signal:e.controller.signal,row:this.#cz(t),column:"number"==typeof r&&r>=0?r:null,physicalRow:t,prop:e.prop,rowId:this.#cI(t)}}#cz(e){let t=this.hot.toVisualRow(e);return null!==t&&t<this.hot.countRows()?t:null}#cU(e,t){if("string"==typeof t)return this.hot.getSourceDataAtCell(e,t);let r=this.hot.propToCol(t);return this.hot.getSourceDataAtCell(e,"number"==typeof r&&r>=0?r:t)}#cF(e){this.#cD(e.entry)&&(this.#hH.push(e),this.#uP||this.#cW())}#cW(){let e=this.getSetting("flush"),t=this.hot.rootWindow,r=!1,i=()=>{r||this.#c$()};if(this.#uP=()=>{r=!0},"frame"===e){let e=t.requestAnimationFrame(i);this.#uP=()=>{r=!0,t.cancelAnimationFrame(e)}}else"number"==typeof e?this.hot._registerTimeout(i,e):t.queueMicrotask(i)}#c$=()=>{this.#uP=null;let e=this.#hH.filter(({entry:e})=>this.#cD(e));if(this.#hH=[],0===e.length||!this.#uI)return;let t=[],r=[],i=[];this.#uH+=1;try{let n=this.#cG(e);i.push(n.failure,this.#rx(n,t,r))}finally{t.forEach(this.#cj);try{this.#cP(r)}catch(e){i.push({error:e})}i.push(this.#cE(t,this.#cY)),this.#uH-=1,this.#cS()}let n=i.find(e=>null!==e);if(n)throw n.error};#rx(e,t,r){if(this.#cT())return null;this.#uz+=1;try{return this.#cK(e,t,r)}finally{this.#uz-=1,this.#u$.splice(0).forEach(e=>this.#cq(e)),0===this.#uz&&this.#cX()}}#cK(e,t,r){let i=(e,t)=>{this.#cH(e),this.#cQ(e),r.push([e,t])};e.vetoed.forEach(e=>i(e,"vetoed")),e.rejected.forEach(e=>{this.#cD(e.entry)&&(this.#cZ(e.entry,"rejected"===e.outcome.status?e.outcome.error:void 0),t.push(e))});let n=e.resolved.filter(({entry:e,outcome:t})=>this.#cD(e)&&"resolved"===t.status),o=this.#cJ(n),s={bySource:new Map,flights:[]};n.forEach(e=>{let r=o.get(e.entry);r?i(e.entry,r):"resolved"===e.outcome.status&&(this.#c0(e.entry,e.outcome.value,s),t.push(e))});let l=this.#c1(s);return s.flights.forEach(e=>{e.group?.some(e=>e.validating)&&(e.validating=!0)}),s.flights.forEach(e=>{e.validating||this.#c2(e.state,e.prop,e,!0)}),l}#cJ(e){let t=new Map,r=new Map,i=this.hot.getActiveEditor(),n=i?.isOpened()?{row:i.row,prop:i.prop}:null;return e.forEach(({entry:e})=>{r.set(e.state,(r.get(e.state)??new Set).add(e.prop))}),e.forEach(({entry:e})=>{let i=r.get(e.state);n&&n.prop===e.prop&&n.row===this.hot.toVisualRow(C2(e))?t.set(e,"edit"):e.run.options.dependsOn.some(t=>t!==e.prop&&i.has(t))&&t.set(e,"dependency")}),t}#cG(e){let t=[],r=[],i=[],n=null;return e.forEach(e=>{let{entry:o,outcome:s}=e;if(!this.#cT()&&this.#cD(o)){if("rejected"===s.status)return void t.push(e);try{let e=this.#c3(o,s.value);e===C0?this.#cD(o)&&r.push(o):i.push({entry:o,outcome:{status:"resolved",value:e}})}catch(e){n??={error:e},t.push({entry:o,outcome:{status:"rejected",error:e}})}}}),{rejected:t,vetoed:r,resolved:i,failure:n}}#cZ(e,t){e.status="error",e.controller=null,e.launch=null,e.batch=null,e.error=t,e.message=function(e){if(e instanceof Error)return e.message;if("object"==typeof e&&null!==e){let{message:t}=e;return"string"==typeof t?t:""}return null==e?"":String(e)}(t),this.#cQ(e),this.#c_(e)}#c3(e,t){if(!this.hot.hasHook("beforeAsyncValueResolve"))return t;let r=C2(e),i=this.hot.runHooks("beforeAsyncValueResolve",t,r,e.prop,this.#cI(r));return this.#cD(e)&&(!1!==i||!1===t)?void 0===i?t:i:C0}#c0(e,t,r){let{state:i,prop:n,run:o}=e,s=i.physicalRow,l=null;if("record"===o.options.undo||o.options.meta){l={run:o,oldValue:pW(this.#cU(s,n)),landed:!1,landedValue:void 0,supersedes:null};let e=i.writes.get(n);e?.landed?this.#c6(i,n):e&&(l.supersedes=e),i.writes.set(n,l),o.unlanded+=1,o.writeStates.add(i)}this.#uY+=1;let a={sequence:this.#uY,source:o.options.source,write:l,validating:!1,validated:!1,change:null,changes:null,state:i,prop:n,group:null},h=i.flights.get(n);h?h.push(a):i.flights.set(n,[a]),r.flights.push(a),this.#c5(e),e.controller=null,e.launch=null,this.#cQ(e),this.#c_(e);let d=r.bySource.get(o.options.source);d?d.push({prop:n,value:t,flight:a}):r.bySource.set(o.options.source,[{prop:n,value:t,flight:a}])}#c1(e){let t=[],r=e=>{try{e()}catch(e){t.push(e)}};null===this.#rS||this.#uG||(this.hot.suspendRender(),this.#uG=!0),this.hot.suspendRender();try{this.hot._getOperationScope().suppress(()=>{e.bySource.forEach((e,t)=>{let i=[],n=[],o=[],s=new Map;if(e.forEach(({prop:e,value:t,flight:r})=>{let l=this.#cz(r.state.physicalRow);if(null===l)n.push([r.state.physicalRow,e,t]);else i.push([l,e,t]),s.set(`${l}:${e}`,r),o.push(r),r.group=o}),i.length>0){let e=this.#uK;this.#uK={source:t,flights:s};try{r(()=>this.hot.setDataAtRowProp(i,"","",t))}finally{this.#uK=e}}n.length>0&&r(()=>this.hot.setSourceDataAtCell(n,"",void 0,t))})}),this.hot.render()}finally{this.hot.resumeRender()}return this.#rS??=this.hot.rootWindow.requestAnimationFrame(this.#c4),t.length>0?{error:t[0]}:null}#c4=()=>{this.#rS=null,this.#uG&&(this.#uG=!1,this.hot.resumeRender())};#cs(){null!==this.#rS&&(this.hot.rootWindow.cancelAnimationFrame(this.#rS),this.#rS=null),this.#uG&&(this.#uG=!1,this.hot.resumeRender())}#cj=({entry:e,outcome:t})=>{e.settle("resolved"===t.status?{status:"resolved",value:t.value}:{status:"rejected",error:e.error,message:e.message})};#cY=({entry:e,outcome:t})=>{let r=C2(e),i=this.#cI(r);"resolved"===t.status?this.hot.runHooks("afterAsyncValueResolve",r,e.prop,t.value,i):this.#i2.has(e)&&(""!==e.message&&this.#c8(e)&&this.hot.getSettings().ariaTags&&this.hot.isListening()&&m3(e.message,"polite"),this.hot.runHooks("afterAsyncValueReject",r,e.prop,e.error,e.message,i))};#cQ(e){e.finished||(e.finished=!0,this.#uO-=1,e.run.live-=1,this.#c9(e.run))}#c9(e){if(!(e.finalized||e.live>0||e.unlanded>0||0===e.writeStates.size||this.#cT())){if(e.finalized=!0,this.#uz>0)return void this.#u$.push(e);this.hot.rootWindow.queueMicrotask(()=>this.#cq(e))}}#cS(){!(this.#uH>0||this.#cT())&&this.#uk&&0===this.#uO&&(this.#uk=!1,this.hot.runHooks("afterAsyncValuesIdle"))}#cq(e){if(this.#cT())return;let t=[];if(e.writeStates.forEach(r=>{r.writes.forEach((i,n)=>{if(i.run!==e||(r.writes.delete(n),!i.landed||"record"!==e.options.undo||r.dropped))return;let o=this.#cU(r.physicalRow,n);Object.is(o,i.landedValue)&&!Object.is(o,i.oldValue)&&t.push({physicalRow:r.physicalRow,prop:n,oldValue:i.oldValue,newValue:pW(o)})}),this.#c7(r)}),e.writeStates.clear(),t.length>0){let r=this.hot._getOperationScope();r.run("change",e.options.source,()=>{t.forEach(e=>p$(r,e))})}}#c8(e){let t=this.hot.getSelectedRangeActive()?.highlight;return!!t&&t.row===this.hot.toVisualRow(C2(e))&&t.col===this.hot.propToCol(e.prop)}#cw(e,t){this.#cH(e),this.#cP([[e,t]])}#cH(e){this.#c5(e),this.#c_(e)}#cP(e){let t=e.filter(([e])=>"pending"===e.status&&!e.reported),r=null;if(0===t.length)return void this.#cS();try{t.forEach(([e,t])=>{let r=e.controller;e.controller=null,e.reported=!0,this.#cQ(e),e.settle({status:"canceled",reason:t}),r?.abort(),this.#ge(e)}),r=this.#cE(t,([e,t])=>{let r=C2(e),i=e.state.dropped?e.state.rowId:this.#cI(r);this.hot.runHooks("afterAsyncValueCancel",r,e.prop,t,i)})}finally{this.#cS()}if(r)throw r.error}#ge(e){let{batch:t,launch:r}=e;t&&(t.canceled+=1,t.canceled===t.entries.length&&t.controller.abort()),r?.isStarted()&&!r.isLive()&&r.release()}#co(e){let t=[...this.#i2];t.forEach(e=>this.#cH(e)),this.#cP(t.map(t=>[t,e]))}#cD(e){return"pending"===e.status&&this.#i2.has(e)}#cb(e){return[...this.#i2].filter(t=>t.status===e).map(e=>({physicalRow:C2(e),prop:e.prop,rowId:this.#cI(C2(e))}))}#gt(e,t){if(0!==this.#i2.size&&this.#uI)return this.#uI.getValueAtIndex(e)?.entries.get(t)}#cf(e){if(0===this.#i2.size)return;let t=this.#ch(e);return t?this.#gt(t.physicalRow,t.prop):void 0}#cO(e){let t=this.#uI,r=t.getValueAtIndex(e);return r?this.#uN.has(r)||(r.physicalRow=e,this.#uN.add(r)):(r={physicalRow:e,rowId:this.#cI(e),dropped:!1,entries:new Map,writes:new Map,flights:new Map},t.setValueAtIndex(e,r),this.#uN.add(r)),r}#c7(e){e.entries.size>0||e.writes.size>0||e.flights.size>0||(this.#uN.delete(e),this.#uI?.getValueAtIndex(e.physicalRow)===e&&this.#uI.setValueAtIndex(e.physicalRow,null))}#ck(e){e.state.entries.set(e.prop,e),this.#i2.add(e),"pending"===e.status&&(this.#uO+=1,this.#uk=!0)}#c5(e){e.state.entries.get(e.prop)===e&&e.state.entries.delete(e.prop),this.#i2.delete(e),this.#c7(e.state)}#c_(e){let t=this.hot.toVisualRow(C2(e)),r=this.hot.propToCol(e.prop);null!==t&&"number"==typeof r&&r>=0&&this.hot.markCellChanged(t,r)}#gr(e){let t=[];[...this.#uN].forEach(r=>{e.has(r)||(this.#uN.delete(r),r.dropped=!0,this.#gi(r),r.entries.forEach(e=>{this.#i2.delete(e),t.push([e,"rowRemoved"])}))}),this.#cP(t)}#u8=()=>{if(0===this.#uN.size||!this.#uI||this.#uL)return;let e=this.#uI,t=new Set;e.getValues().forEach((r,i)=>{r&&(r.physicalRow=i,0===r.entries.size&&0===r.writes.size&&0===r.flights.size?e.setValueAtIndex(i,null):t.add(r))}),this.#gr(t)};#ci=()=>{let e=this.#uI;if(this.#uL||!e||0===this.#uN.size)return;let t=new Set;this.#uN.forEach(r=>{r.physicalRow<e.getLength()&&(e.setValueAtIndex(r.physicalRow,r),t.add(r))}),this.#gr(t)};#gn(e,t,r,i,n,o){let s=this.#uI?.getValueAtIndex(e),l="string"==typeof r&&r.endsWith("Validator");if(l&&this.#go(e,t),!s)return;let a=s.flights.get(t);if(l&&a?.some(e=>e.validating))return;let h=o?this.#uq.get(o):void 0,d=h??a?.find(e=>e.source===r),u=s.entries.get(t),c=s.writes.get(t),g=[...s.entries.values()].filter(e=>e!==u&&e.run.options.dependsOn.includes(t));l&&c?.landed?c.landedValue=this.#cU(s.physicalRow,t):d?this.#gs(s,t,d,void 0!==h,n):this.#gl(s,t,o,i),g.forEach(e=>{this.#cH(e),i.push([e,"dependency"])})}#gs(e,t,r,i,n){e.flights.get(t)?.includes(r)&&(r.group&&n.add(r.group),i&&r.validated&&this.#ga(e,t,r.sequence-1),this.#gh(e,t,r))}#gl(e,t,r,i){let n=r?this.#uX.get(r):void 0,o=e.entries.get(t);void 0!==n&&this.#ga(e,t,n);let s=e.writes.get(t),l=s&&!s.landed?this.#gd(e,t,s):void 0;(!l?.validated||l.sequence<=(n??0))&&this.#c6(e,t),o&&(this.#cH(o),i.push([o,"edit"]))}#gh(e,t,r){let i=r.write;if(this.#c2(e,t,r,!1),e.flights.has(t)){i&&this.#gu(e,t,i);return}this.#gc(e,t,i?.run.options.undo==="record"),i&&!i.landed&&e.writes.get(t)===i&&this.#gg(e,t,i)}#ga(e,t,r){let i=e.flights.get(t);i&&i[0].sequence<=r&&i.filter(e=>e.sequence<=r).forEach(r=>this.#c2(e,t,r,!0))}#gc(e,t,r){if(!this.getSetting("saveToDataProvider"))return;if(r)return void rs(this,"asyncValues.saveUndo","The AsyncValues plugin: `saveToDataProvider` does not save the values of a call with `undo: 'record'`.");if(!this.#gp())return void rs(this,"asyncValues.saveNoDataProvider","The AsyncValues plugin: `saveToDataProvider` needs the `dataProvider` option with `rowId` and `onRowsUpdate`, so nothing was saved.");let i=this.#gm(e.physicalRow);if(null===i)return void rs(this,"asyncValues.saveNoRowId","The AsyncValues plugin: `saveToDataProvider` skipped a row whose `dataProvider.rowId` has no value.");let n=this.#cz(e.physicalRow),o=this.hot.propToCol(t);if(null!==n&&"number"==typeof o&&!1===this.hot.getCellMetaTransient(n,o).valid)return;let s=pW(this.#cU(e.physicalRow,t)),l=this.#uU.get(i);l?l.set(t,s):this.#uU.set(i,new Map([[t,s]])),0!==this.#uz||this.#uW||(this.#uW=!0,this.hot._registerMicrotask(()=>{this.#uW=!1,this.#cX()}))}#gp(){let e=this.hot.getSettings().dataProvider;return!!this.hot.getPlugin("dataProvider")?.enabled&&"function"==typeof e?.onRowsUpdate&&!!e.rowId}#gm(e){try{return this.#cI(e)}catch{return null}}#go(e,t){let r=this.#uU.size>0?this.#uU.get(this.#gm(e)):void 0;r?.has(t)&&r.set(t,pW(this.#cU(e,t)))}#cX(){if(0===this.#uU.size||this.#cT())return;let e=[...this.#uU],t=[];this.#uU.clear(),this.getSetting("saveToDataProvider")&&this.#gp()&&(e.forEach(([e,r])=>{let i=this.hot.getPhysicalRowById(e);if(null===i)return;let n={};r.forEach((e,t)=>{let r=this.#cU(i,t);tE(r,e)&&(n[String(t)]=r)}),0!==Object.keys(n).length&&t.push({id:e,changes:n,rowData:this.hot.getSourceDataAtRow(i)})}),t.length>0&&this.hot.getPlugin("dataProvider").updateRows(t).catch(e=>{rd("The AsyncValues plugin: saving the resolved values failed.",e)}))}#gg(e,t,r){let{run:i}=r,{meta:n,undo:o}=i.options,s=this.#cz(e.physicalRow),l=this.hot.propToCol(t);r.landed=!0,r.landedValue=this.#cU(e.physicalRow,t),i.unlanded-=1,this.#gf(r),n&&null!==s&&"number"==typeof l&&l>=0&&this.hot._getOperationScope().suppress(()=>{Object.keys(n).forEach(e=>this.hot.setCellMeta(s,l,e,n[e]))}),"record"!==o&&(e.writes.delete(t),this.#c7(e)),this.#c9(i)}#c6(e,t){let r=e.writes.get(t);if(!r)return;let i=[];for(let e=r;e;e=e.supersedes)i.push(e);e.writes.delete(t),i.forEach(e=>{e.supersedes=null,e.run.unlanded-=!e.landed}),this.#c7(e),i.forEach(e=>this.#c9(e.run))}#gf(e){let t=[];for(let r=e.supersedes;r;r=r.supersedes)t.push(r);e.supersedes=null,t.forEach(e=>{e.supersedes=null,e.run.unlanded-=!e.landed}),t.forEach(e=>this.#c9(e.run))}#gu(e,t,r){let i=e.writes.get(t),n=i===r?null:i??null;for(;n&&n.supersedes!==r;)n=n.supersedes;if(i!==r&&!n)return void this.#c7(e);n?n.supersedes=r.supersedes:r.supersedes?e.writes.set(t,r.supersedes):e.writes.delete(t),r.supersedes=null,r.run.unlanded-=!r.landed;let o=e.writes.get(t);!o||o.landed||this.#gd(e,t,o)||this.#gu(e,t,o),this.#c7(e),this.#c9(r.run)}#gd(e,t,r){return e.flights.get(t)?.find(e=>e.write===r)}#gi(e){let t=[];e.writes.forEach(e=>{for(let r=e;r;r=r.supersedes)t.push(r)}),e.writes.clear(),t.forEach(e=>{e.supersedes=null,e.landed||(e.run.unlanded-=1),this.#c9(e.run)})}#u2=(e,t)=>{0===this.#uN.size||this.#uK?.source===t||"string"==typeof t&&t.endsWith("Validator")||e.forEach(e=>{e&&CU(e[1])&&this.#gw(e)})};#u3=(e,t)=>{let r=this.#uK;r&&r.source===t&&e.forEach(t=>{var i,n;let o=CU(t[1])?r.flights.get((i=t[0],n=t[1],`${i}:${n}`)):void 0;o&&(o.change=t,o.changes=e,this.#uq.set(t,o))})};#gw(e){let t=this.hot.toPhysicalRow(e[0]),r=null===t?null:this.#uI?.getValueAtIndex(t),i=0;r?.flights.get(e[1])?.forEach(e=>{i=e.validated?e.sequence:i}),i>0&&this.#uX.set(e,i)}#u6=(e,t,r,i)=>{let n=this.#gy(t,r,e=>e.source===i&&!e.validating);n&&(n.flight.validating=!0,n.flight.validated=!0)};#u5=(e,t,r,i)=>{if(0===this.#uN.size)return;let n=[],o=e=>{e.flights.get(i)?.forEach(e=>{e.change&&!e.changes?.includes(e.change)&&n.push(e)})};if(null===r)this.#uN.forEach(o);else{let e=this.hot.toPhysicalRow(r),t=null===e?null:this.#uI?.getValueAtIndex(e);t&&o(t)}n.forEach(e=>this.#c2(e.state,e.prop,e,!0))};#u4=e=>{let t=[],r=new Set(e);this.#uN.forEach(i=>{i.flights.forEach(i=>{i.forEach(i=>{(i.changes===e||null!==i.change&&r.has(i.change))&&t.push(i)})})}),t.forEach(e=>this.#c2(e.state,e.prop,e,!0))};#gy(e,t,r){let i=0===this.#uN.size?null:this.hot.toPhysicalRow(e),n=null===i?null:this.#uI?.getValueAtIndex(i),o=n?.flights.get(t)?.find(r);return n&&o?{state:n,flight:o}:null}#c2(e,t,r,i){let n=e.flights.get(t),o=n?n.indexOf(r):-1;-1!==o&&(n.splice(o,1),0===n.length&&e.flights.delete(t),i&&r.write?this.#gu(e,t,r.write):this.#c7(e))}#gb(e){let t=this.#uI?.getValueAtIndex(e);t&&(t.rowId=this.#cI(e))}#gC(e,t){let r=[],i=new Set,n=new Set;if(e.forEach(([e,o,s])=>{null!==e&&CU(o)&&(n.has(e)||(n.add(e),this.#gb(e)),this.#gn(e,o,t,r,i,s))}),i.forEach(e=>{e.forEach(e=>{e.state.flights.get(e.prop)?.includes(e)&&this.#c2(e.state,e.prop,e,!0)})}),r.length>0)try{this.#cP(r)}finally{this.hot.render()}}#ud=(e,t)=>{e&&(0!==this.#uN.size||0!==this.#uU.size)&&this.#gC(e.map(e=>[this.hot.getPhysicalRowOfChange(e),e[1],e]),t)};#u1=(e,t)=>{if(0===this.#uN.size)return;let r=e.filter(([e,r,,i])=>{if(!CU(r)||Object.is(this.#cU(e,r),i))return!0;let n=this.#uI?.getValueAtIndex(e),o=n?.flights.get(r)?.find(e=>e.source===t);return n&&o&&this.#c2(n,r,o,!0),!1});this.#gC(r.map(([e,t])=>[e,t]),t)};#u9=(e,t)=>{let r=this.hot.toPhysicalColumn(e);t>0&&null!==r&&this.#gS(r)};#u7=(e,t,r)=>{r.length>0&&this.#gS(r.reduce((e,t)=>Math.min(e,t),1/0))};#gS(e){if([...this.#uN].forEach(t=>{[...t.writes.keys()].forEach(r=>{"number"==typeof r&&r>=e&&this.#c6(t,r)})}),0===this.#i2.size)return;let t=[...this.#i2].filter(t=>"number"==typeof t.prop&&t.prop>=e);t.length>0&&(t.forEach(e=>this.#cH(e)),this.#cP(t.map(e=>[e,"columnsChanged"])),this.hot.render())}#hZ=()=>{this.#gv(!0)};#ce=()=>{this.#gv(!1)};#gv(e){this.#uL=!0,this.#uB=e,this.#uF=[...this.#uN].map(e=>({state:e,rowId:this.#cI(e.physicalRow),rowObject:this.#gR(e.physicalRow)})),this.hot.rootWindow.queueMicrotask(()=>{this.#uL&&this.enabled&&this.#gE(this.#uB)})}#ct=()=>{this.#gE(!0)};#cr=()=>{this.#gE(!1)};#gE(e){let t=this.#uI,r=this.#uF;if(this.#uL=!1,this.#uF=[],!t||0===r.length)return;let i=t.getLength(),n=new Set,o=new Map,s=w1({countPhysicalRows:()=>this.hot.rowIndexMapper.getNumberOfIndexes(),readRowObject:e=>this.#gR(e)}),l=r.map(t=>this.#gT(t,e,s));r.forEach(({state:e},r)=>{l[r]===e.physicalRow&&l[r]<i&&t.getValueAtIndex(e.physicalRow)===e?n.add(e):t.getValueAtIndex(e.physicalRow)===e&&t.setValueAtIndex(e.physicalRow,null)}),n.size!==r.length&&(r.forEach((r,s)=>{let a=l[s];if(!n.has(r.state)){if(null===a||a>=i||null!==t.getValueAtIndex(a)){r.state.rowId=r.rowId,o.set(r.state,e&&!this.#gx(r)?"dataReplaced":"rowRemoved");return}t.setValueAtIndex(a,r.state),r.state.physicalRow=a,r.state.rowId=r.rowId,n.add(r.state)}}),this.#gA(n,o),this.hot.markAllCellsChanged())}#cn=()=>{if(this.#cT())return;let e=this.hot.rowIndexMapper.getNumberOfIndexes();e!==this.#uj&&(this.#uj=e,this.#uN.size>0&&!this.#uL&&this.hot.rootWindow.queueMicrotask(this.#gM))};#gM=()=>{if(this.#cT()||!this.#uI||0===this.#uN.size||this.#uL)return;let e=this.#gI(this.#uI);this.#u8(),e&&(this.hot.markAllCellsChanged(),this.hot.render())};#gI(e){let t=new Map,r=new Map,i=!1;return this.#uN.forEach(e=>{if(null===e.rowId||void 0===e.rowId)return;let n=this.#cx(e.rowId);null===n?t.set(e,"rowRemoved"):(r.set(e,n),i=i||n!==e.physicalRow)}),(!!i||0!==t.size)&&(this.#gN(e,r,t),this.#gA(new Set,t),!0)}#gN(e,t,r){e.getValues().forEach((i,n)=>{i&&(t.has(i)||r.has(i)||!this.#uN.has(i))&&e.setValueAtIndex(n,null)}),t.forEach((t,i)=>{t>=e.getLength()||null!==e.getValueAtIndex(t)?r.set(i,"rowRemoved"):(e.setValueAtIndex(t,i),i.physicalRow=t)})}#gx(e){return null!==e.rowId&&void 0!==e.rowId}#gT(e,t,r){if(this.#gx(e))return this.hot.getPhysicalRowById(e.rowId);if(t)return null;let{rowObject:i,state:n}=e;if(!w2(i)||this.#gR(n.physicalRow)===i)return n.physicalRow;let o=r(i);return void 0===o?n.physicalRow:o}#gR(e){if(!(e>=this.hot.rowIndexMapper.getNumberOfIndexes()))return this.hot._getDataSource().modifyRowData(e)}#gA(e,t){let r=[];t.forEach((t,i)=>{e.has(i)||(this.#uN.delete(i),i.dropped=!0,this.#gi(i),i.entries.forEach(e=>{this.#i2.delete(e),r.push([e,t])}))}),this.#cP(r)}#uZ=(e,t,r)=>{let i=0===this.#i2.size?null:this.hot.toPhysicalRow(e),n=null===i?void 0:this.#gt(i,r.prop);n?(r.asyncState=n.status,r.asyncError="error"===n.status?n.message:null,this.#uQ=!0):tP(r,"asyncState")&&null!==r.asyncState&&(r.asyncState=null,r.asyncError=null)};#u0=(e,t)=>{if(0===this.#uO||"empty"!==this.getSetting("copyPendingAs"))return;let{rows:r,columns:i}=CW(t),n=new Map(r.map((e,t)=>[e,t])),o=new Map(i.map((e,t)=>[e,t]));this.#i2.forEach(t=>{if("pending"!==t.status)return;let r=n.get(this.hot.toVisualRow(C2(t))??-1),i=o.get(this.hot.propToCol(t.prop));void 0!==r&&void 0!==i&&e[r]&&(e[r][i]="")})};#uJ=(e,t,r,i,n,o)=>{let s=0===this.#i2.size?null:this.hot.toPhysicalRow(t),l=null===s?void 0:this.#gt(s,i);if(!function(e){if(!e.hasAttribute(Cq))return;let t=e.getAttribute(Cq);""!==t&&e.getAttribute("title")===t&&e.removeAttribute("title"),rj(e,[Cq]),Array.from(e.children).filter(e=>CK.some(t=>e.classList.contains(t))).forEach(e=>e.remove())}(e),l){let t="pending"===l.status?this.hot.getTranslatedPhrase(c_):l.message;!function(e,t,r,i){let n=e.ownerDocument;if("pending"===t){e.appendChild(CX(n,C$,"")),""!==r&&e.appendChild(CX(n,Cj,r)),rW(e,"htAsyncPending"),e.setAttribute(Cq,""),i&&rG(e,[Z()]);return}rW(e,"htAsyncError"),e.setAttribute(Cq,r),e.appendChild(CX(n,CY,"")),""!==r&&(e.setAttribute("title",r),e.appendChild(CX(n,CG,r))),i&&rG(e,[Y()])}(e,l.status,"string"==typeof t?t:"",!!o.ariaTags)}}}let C6=["http","https","mailto","tel"];function C5(e){return Array.isArray(e)?C6.filter(t=>e.includes(t)):[...C6]}function C4(e,t){if(!Array.isArray(e))return t;if(0===e.length)return[];let r=C5(e);return 0===r.length?t:r}function C8(e,t,r=C6){let i;if("string"!=typeof e||""===e.trim())return null;try{i=new URL(e,t)}catch(e){return null}let n=i.protocol.slice(0,-1);return C6.includes(n)&&r.includes(n)?i.href:null}let C9=null;function C7(e){return null===C9&&(C9=new Set("aaa aarp abb abbott abbvie abc able abogado abudhabi ac academy accenture accountant accountants aco actor ad ads adult ae aeg aero aetna af afl africa ag agakhan agency ai aig airbus airforce airtel akdn al alibaba alipay allfinanz allstate ally alsace alstom am amazon americanexpress americanfamily amex amfam amica amsterdam analytics android anquan anz ao aol apartments app apple aq aquarelle ar arab aramco archi army arpa art arte as asda asia associates at athleta attorney au auction audi audible audio auspost author auto autos aw aws ax axa az azure ba baby baidu banamex band bank bar barcelona barclaycard barclays barefoot bargains baseball basketball bauhaus bayern bb bbc bbt bbva bcg bcn bd be beats beauty beer berlin best bestbuy bet bf bg bh bharti bi bible bid bike bing bingo bio biz bj black blackfriday blockbuster blog bloomberg blue bm bms bmw bn bnpparibas bo boats boehringer bofa bom bond boo book booking bosch bostik boston bot boutique box br bradesco bridgestone broadway broker brother brussels bs bt build builders business buy buzz bv bw by bz bzh ca cab cafe cal call calvinklein cam camera camp canon capetown capital capitalone car caravan cards care career careers cars casa case cash casino cat catering catholic cba cbn cbre cc cd center ceo cern cf cfa cfd cg ch chanel channel charity chase chat cheap chintai christmas chrome church ci cipriani circle cisco citadel citi citic city ck cl claims cleaning click clinic clinique clothing cloud club clubmed cm cn co coach codes coffee college cologne com commbank community company compare computer comsec condos construction consulting contact contractors cooking cool coop corsica country coupon coupons courses cpa cr credit creditcard creditunion cricket crown crs cruise cruises cu cuisinella cv cw cx cy cymru cyou cz dad dance data date dating datsun day dclk dds de deal dealer deals degree delivery dell deloitte delta democrat dental dentist desi design dev dhl diamonds diet digital direct directory discount discover dish diy dj dk dm dnp do docs doctor dog domains dot download drive dtv dubai dupont durban dvag dvr dz earth eat ec eco edeka edu education ee eg email emerck energy engineer engineering enterprises epson equipment er ericsson erni es esq estate et eu eurovision eus events exchange expert exposed express extraspace fage fail fairwinds faith family fan fans farm farmers fashion fast fedex feedback ferrari ferrero fi fidelity fido film final finance financial fire firestone firmdale fish fishing fit fitness fj fk flickr flights flir florist flowers fly fm fo foo food football ford forex forsale forum foundation fox fr free fresenius frl frogans frontier ftr fujitsu fun fund furniture futbol fyi ga gal gallery gallo gallup game games gap garden gay gb gbiz gd gdn ge gea gent genting george gf gg ggee gh gi gift gifts gives giving gl glass gle global globo gm gmail gmbh gmo gmx gn godaddy gold goldpoint golf goodyear goog google gop got gov gp gq gr grainger graphics gratis green gripe grocery group gs gt gu gucci guge guide guitars guru gw gy hair hamburg hangout haus hbo hdfc hdfcbank health healthcare help helsinki here hermes hiphop hisamitsu hitachi hiv hk hkt hm hn hockey holdings holiday homedepot homegoods homes homesense honda horse hospital host hosting hot hotels hotmail house how hr hsbc ht hu hughes hyatt hyundai ibm icbc ice icu id ie ieee ifm ikano il im imamat imdb immo immobilien in inc industries infiniti info ing ink institute insurance insure int international intuit investments io ipiranga iq ir irish is ismaili ist istanbul it itau itv jaguar java jcb je jeep jetzt jewelry jio jll jm jmp jnj jo jobs joburg jot joy jp jpmorgan jprs juegos juniper kaufen kddi ke kerryhotels kerryproperties kfh kg kh ki kia kids kim kindle kitchen kiwi km kn koeln komatsu kosher kp kpmg kpn kr krd kred kuokgroup kw ky kyoto kz la lacaixa lamborghini lamer land landrover lanxess lasalle lat latino latrobe law lawyer lb lc lds lease leclerc lefrak legal lego lexus lgbt li lidl life lifeinsurance lifestyle lighting like lilly limited limo lincoln link live living lk llc llp loan loans locker locus lol london lotte lotto love lpl lplfinancial lr ls lt ltd ltda lu lundbeck luxe luxury lv ly ma madrid maif maison makeup man management mango map market marketing markets marriott marshalls mattel mba mc mckinsey md me med media meet melbourne meme memorial men menu merck merckmsd mg mh miami microsoft mil mini mint mit mitsubishi mk ml mlb mls mm mma mn mo mobi mobile moda moe moi mom monash money monster mormon mortgage moscow moto motorcycles mov movie mp mq mr ms msd mt mtn mtr mu museum music mv mw mx my mz na nab nagoya name navy nba nc ne nec net netbank netflix network neustar new news next nextdirect nexus nf nfl ng ngo nhk ni nico nike nikon ninja nissan nissay nl no nokia norton now nowruz nowtv np nr nra nrw ntt nu nyc nz obi observer office okinawa olayan olayangroup ollo om omega one ong onl online ooo open oracle orange org organic origins osaka otsuka ott ovh pa page panasonic paris pars partners parts party pay pccw pe pet pf pfizer pg ph pharmacy phd philips phone photo photography photos physio pics pictet pictures pid pin ping pink pioneer pizza pk pl place play playstation plumbing plus pm pn pnc pohl poker politie porn post pr praxi press prime pro prod productions prof progressive promo properties property protection pru prudential ps pt pub pw pwc py qa qpon quebec quest racing radio re read realestate realtor realty recipes red redumbrella rehab reise reisen reit reliance ren rent rentals repair report republican rest restaurant review reviews rexroth rich richardli ricoh ril rio rip ro rocks rodeo rogers room rs rsvp ru rugby ruhr run rw rwe ryukyu sa saarland safe safety sakura sale salon samsclub samsung sandvik sandvikcoromant sanofi sap sarl sas save saxo sb sbi sbs sc scb schaeffler schmidt scholarships school schule schwarz science scot sd se search seat secure security seek select sener services seven sew sex sexy sfr sg sh shangrila sharp shell shia shiksha shoes shop shopping shouji show si silk sina singles site sj sk ski skin sky skype sl sling sm smart smile sn sncf so soccer social softbank software sohu solar solutions song sony soy spa space sport spot sr srl ss st stada staples star statebank statefarm stc stcgroup stockholm storage store stream studio study style su sucks supplies supply support surf surgery suzuki sv swatch swiss sx sy sydney systems sz tab taipei talk taobao target tatamotors tatar tattoo tax taxi tc tci td tdk team tech technology tel temasek tennis teva tf tg th thd theater theatre tiaa tickets tienda tips tires tirol tj tjmaxx tjx tk tkmaxx tl tm tmall tn to today tokyo tools top toray toshiba total tours town toyota toys tr trade trading training travel travelers travelersinsurance trust trv tt tube tui tunes tushu tv tvs tw tz ua ubank ubs ug uk unicom university uno uol ups us uy uz va vacations vana vanguard vc ve vegas ventures verisign versicherung vet vg vi viajes video vig viking villas vin vip virgin visa vision viva vivo vlaanderen vn vodka volvo vote voting voto voyage vu wales walmart walter wang wanggou watch watches weather weatherchannel web webcam weber website wed wedding weibo weir wf whoswho wien wiki williamhill win windows wine winners wme woodside work works world wow ws wtc wtf xbox xerox xihuan xin xxx xyz yachts yahoo yamaxun yandex ye yodobashi yoga yokohama you youtube yt yun za zappos zara zero zip zm zone zuerich zw".split(" "))),C9.has(e)}let Se=/(?:https?:\/\/|(?<![\p{L}\p{N}\p{M}._~+\\-])(?:mailto:|tel:))[^\s<>"'`]+/giu,St=/^(?:https?:\/\/|mailto:|tel:)/i,Sr=/(?:(?<![/\\])https?:\/\/|(?<![\p{L}\p{N}\p{M}._~+/\\-])(?:mailto:|tel:))/giu,Si=new Set([".",",",";",":","!","?"]),Sn={")":"(","]":"[","}":"{"},So="[A-Za-z0-9](?:[A-Za-z0-9-]{0,61}[A-Za-z0-9])?",Ss=RegExp(`(?<![\\p{L}\\p{N}\\p{M}@._~+/\\\\-])(?=((?:${So}\\.)+[A-Za-z]{2,63}))\\1(?!:\\d{6,})(?::\\d{1,5}(?!\\d))?(?:[/?#][^\\s<>"'\`]*)?`,"gu"),Sl=RegExp(`(?<![\\p{L}\\p{N}\\p{M}._%+\\\\-])[A-Za-z0-9._%+-]+@(?:${So}\\.)+([A-Za-z]{2,63})`,"gu"),Sa=/[:/?#]/,Sh=/[A-Za-z]+$/;function Sd(e){let t=function(e){let t={"(":0,")":0,"[":0,"]":0,"{":0,"}":0};for(let r of e)r in t&&(t[r]+=1);return t}(e),r=e.length,i=!0;for(;i;){for(i=!1;r>0&&Si.has(e.charAt(r-1));)r-=1,i=!0;let n=r>0?e.charAt(r-1):"",o=Sn[n];void 0!==o&&t[n]>t[o]&&(t[n]-=1,r-=1,i=!0)}return e.slice(0,r)}function Su(e){let t=e.search(Sa),r=-1===t?e:e.slice(0,t),i=Sh.exec(r);return null===i?null:i[0].toLowerCase()}function Sc(e,t,r,i){let n=Sd(e),o=""===n?null:Su(n);if(null===o||!C7(o))return null;let s=C8(`https://${n}`,r,i);return null===s?null:{start:t,end:t+n.length,href:s}}function Sg(e,t,r,i){let n=Sd(e),o=n.indexOf("@");if(-1===o)return null;let s=Su(n.slice(o+1));if(null===s||!C7(s))return null;let l=C8(`mailto:${n}`,r,i);return null===l?null:{start:t,end:t+n.length,href:l}}function Sp(e,t,r,i,n,o){let s=[],l=[];e.lastIndex=0;let a=e.exec(t);for(;null!==a;){let h=a.index,d=a.index+a[0].length;if(!function(e,t,r){return r.some(r=>e<r.end&&t>r.start)}(h,d,n)){l.push({start:h,end:d});let e=o(a[0],a.index,r,i);null!==e&&s.push(e)}a=e.exec(t)}return{tokens:s,consideredSpans:l}}function Sm(e,t,r=C6,i=!0){if("string"!=typeof e)return[];let n=function(e,t,r){let i=[],n=[];if(-1===e.indexOf(":"))return{tokens:i,consideredSpans:n};Se.lastIndex=0;let o=Se.exec(e);for(;null!==o;){let s=o[0],l=function(e){Sr.lastIndex=1;let t=Sr.exec(e);return null===t?-1:t.index}(s);l>0&&(s=s.slice(0,l),Se.lastIndex=o.index+l);let a=Sd(s);if(function(e){let t=St.exec(e);return null!==t&&e.length>t[0].length}(a)){let e={start:o.index,end:o.index+a.length};n.push(e);let s=C8(a,t,r);null!==s&&i.push({...e,href:s})}o=Se.exec(e)}return{tokens:i,consideredSpans:n}}(e,t,r);if(i)return n.tokens;let o=Sp(Sl,e,t,r,n.consideredSpans,Sg),s=Sp(Ss,e,t,r,[...n.consideredSpans,...o.consideredSpans],Sc);return[...n.tokens,...o.tokens,...s.tokens].sort((e,t)=>e.start-t.start)}let Sf="ht-auto-link",Sw="a, button, input, select, textarea, label",Sy=`a.${Sf}`,Sb=`${Sy} .${mD}`;function SC(e){return mU(e,Sb),mU(e,Sy)}let SS=Object.freeze({capability:"feat:auto_link",name:"Auto link",gate:"enable",tiers:Object.freeze(["standard","professional"])}),Sv="autoLink";class SR extends sM{static get PLUGIN_KEY(){return Sv}static get PLUGIN_PRIORITY(){return 270}static get LICENSE(){return SS}static get DEFAULT_SETTINGS(){return{target:"_blank",schemes:[...C6],inline:!0,strict:!0,className:""}}static get SETTINGS_VALIDATORS(){return{target:e=>"_blank"===e||"_self"===e,schemes:e=>Array.isArray(e)&&e.every(e=>C6.includes(e)),inline:e=>"boolean"==typeof e,strict:e=>"boolean"==typeof e,className:e=>"string"==typeof e}}#gO=null;#gk="";#gH=new WeakMap;#g_=new WeakMap;isEnabled(){return!!this.hot.getSettings()[Sv]}enablePlugin(){this.enabled||(this.#gO=this.#gP(void 0),this.#gk=this.hot.rootDocument.baseURI,this.addHook("beforeRender",this.#gD),this.addHook("afterRenderer",this.#uJ),this.hot.markAllCellsChanged(),super.enablePlugin())}updatePlugin(){this.disablePlugin(),this.enablePlugin(),super.updatePlugin()}disablePlugin(){this.hot.rootElement&&SC(this.hot.rootElement),this.hot.markAllCellsChanged(),this.#gO=null,this.#gH=new WeakMap,this.#g_=new WeakMap,super.disablePlugin()}destroy(){this.#gO=null,super.destroy()}#gD=()=>{this.#gk=this.hot.rootDocument.baseURI};#gP(e){let t=this.#gO??{target:this.getSetting("target"),schemes:C5(this.getSetting("schemes")),inline:this.getSetting("inline"),strict:this.getSetting("strict"),classNames:this.getSetting("className").split(/\s+/).filter(e=>""!==e)};return"object"!=typeof e||null===e||e===this.hot.getSettings()[Sv]?t:function(e,t,r){let i=e.get(r);void 0===i&&(i={target:"_self"===r.target||"_blank"===r.target?r.target:t.target,schemes:C4(r.schemes,t.schemes),inline:"boolean"==typeof r.inline?r.inline:t.inline,strict:"boolean"==typeof r.strict?r.strict:t.strict,classNames:"string"==typeof r.className?r.className.split(/\s+/).filter(e=>""!==e):t.classNames},e.set(r,i));return i}(this.#gH,t,e)}#gL(e){let t=this.#g_.get(e);if(void 0!==t&&t.baseUrl===this.#gk)return t;let r={...e,baseUrl:this.#gk};return this.#g_.set(e,r),r}#uJ=(e,t,r,i,n,o)=>{var s;let l,a=o.autoLink;!1===a?SC(e):(s=this.#gL(this.#gP(a)),SC(e),l=e.textContent??"",(s.strict?-1===l.indexOf(":"):-1===l.indexOf(":")&&-1===l.indexOf(".")&&-1===l.indexOf("@"))||null===e.querySelector("a")&&(s.inline?(function(e){let t=e.ownerDocument.createTreeWalker(e,NodeFilter.SHOW_TEXT),r=[],i=t.nextNode();for(;null!==i;){let n=i.parentElement,o=n?.closest(Sw)??null;null!==o&&e.contains(o)||r.push(i),i=t.nextNode()}return r})(e).forEach(e=>(function(e,t){let r=Sm(e.data,t.baseUrl,t.schemes,t.strict),i=e.ownerDocument;for(let n=r.length-1;n>=0;n--){let{start:o,end:s,href:l}=r[n];e.splitText(s);let a=e.splitText(o),h=mB(i,{href:l,target:t.target,classNames:[Sf,...t.classNames]});a.parentNode?.insertBefore(h,a),h.appendChild(a),mz(h)}})(e,s)):function(e,t,r){let i=t.trim(),n=Sm(i,r.baseUrl,r.schemes,r.strict);if(1!==n.length||0!==n[0].start||n[0].end!==i.length||null!==e.querySelector(Sw))return;let o=mB(e.ownerDocument,{href:n[0].href,target:r.target,classNames:[Sf,...r.classNames]});mV(e,o),mz(o)}(e,l,s)))}}class SE{static get SAMPLE_COUNT(){return 3}samples=null;dataFactory=null;customSampleCount=null;allowDuplicates=!1;includeHidden=!1;constructor(e){this.dataFactory=e}getSampleCount(){return this.customSampleCount?this.customSampleCount:SE.SAMPLE_COUNT}static resolveSampleCount(e){let t=parseInt(String(e),10);return Number.isInteger(t)&&t>0?t:null}applySamplingOptions({samplingRatio:e,allowDuplicates:t}){let r=SE.resolveSampleCount(e),i=r!==this.customSampleCount||t!==this.allowDuplicates;return this.customSampleCount=r,this.allowDuplicates=t,i}setIncludeHidden(e){this.includeHidden=e}generateRowSamples(e,t){return this.generateSamples("row",t,e)}generateColumnSamples(e,t){return this.generateSamples("col",t,e)}generateSamples(e,t,r){let i=new Map,{from:n,to:o}="number"==typeof r?{from:r,to:r}:r;return oD(n,o,r=>{let n=this.generateSample(e,t,r);i.set(r,n)}),i}generateSample(e,t,r,i){this.#gF(e);let n=i??new Map,o="row"===e?"col":"row",s=[];i&&i.forEach(e=>{e.strings.forEach(({value:e})=>s.push(e))});let l=t=>{let i="row"===e?this.dataFactory(r,t,this):this.dataFactory(t,r,this);!1!==i&&this.#gB(n,s,o,t,i.value,i.bundleSeed,i.block)};return Array.isArray(t)?t.forEach(l):oD(t.from,t.to,l),n}generateSampleFromValues(e,t){this.#gF(e);let r=new Map,i="row"===e?"col":"row",n=[];return t.forEach(({index:e,value:t})=>{this.#gB(r,n,i,e,t,void 0,void 0)}),r}#gF(e){"row"!==e&&"col"!==e&&tf("Unsupported sample type")}#gB(e,t,r,i,n,o,s){let l,a="string"==typeof o&&o.length>0?o:null,h=null!==a;l=null!==a?a:tx(n)?`${Object.keys(n).length}`:Array.isArray(n)?`${n.length}`:`${eW(n).length}`,e.has(l)||e.set(l,{needed:this.getSampleCount(),strings:[]});let d=e.get(l);if(d&&d.needed&&(!(t.indexOf(n)>-1)||this.allowDuplicates||h)){let e={value:n,[r]:i};void 0!==s&&(e.block=s),d.strings.push(e),d.needed-=1,void 0===s&&t.push(n)}}}let ST={changed:!1,mergesChangedIn:[]};function Sx(e){return Number(e)>1}class SA{#gV;#gz=new Map;#gU=new Map;#gW=new Map;#g$=new Map;#gG=null;#gj=!0;#gY=null;#eS=!1;#gK=!1;#gq=!1;constructor(e){this.#gV=e}mayHaveMultiColumnMerges(){return this.#gq}getWidth(e){return this.#gz.get(e)}markWidthsChanged(){this.#eS=!0}invalidateCell(e,t){let r=this.#gV.toPhysicalRow(e),i=this.#gV.toPhysicalColumn(t);null!==r&&null!==i&&(this.#gU.get(i)?.delete(r),this.#gX(i)),this.#eS=!0,this.#gj=!0}invalidateColumn(e){let t=this.#gV.toPhysicalColumn(e);null!==t&&(this.#gU.delete(t),this.#gX(t)),this.#eS=!0,this.#gj=!0}markMergesChanged(e){this.invalidateColumn(e),this.#gq=!0}snapshotMerges(){this.#gG=this.#gQ(this.#gV.getMergedAreas()),this.#eS=!0,this.#gj=!0}markStale(){this.#gK=!0}markRenumbered(){this.#gK=!0,this.#gG=null}markStylesChanged(){this.#g$.clear(),this.#eS=!0,this.#gj=!0}markLayoutChanged(){this.#eS=!0,this.#gj=!0}clear(){this.#gz.clear(),this.#gZ(),this.#eS=!1,this.#gK=!1,this.#gq=!1,this.#gG=null,this.#gj=!0,this.#gY=null}clearColumn(e){this.#gz.delete(e),this.#gU.delete(e),this.#gX(e),this.#gj=!0}fit(){if(!this.#eS&&!this.#gK)return ST;if(!this.#gj&&!this.#gK&&null!==this.#gY)return this.#eS=!1,{changed:this.#gJ(this.#gY),mergesChangedIn:[]};this.#gj=!1,this.#gK&&this.#gZ(),this.#eS=!1,this.#gK=!1;let e=this.#gV.getMergedAreas(),t=this.#g0(e),r=e.filter(({colspan:e})=>Sx(e)),i=r.filter(e=>this.#g1(e));return(this.#gq=r.length>0,0===i.length&&0===this.#gz.size)?(this.#gY={contentWidths:new Map,targets:[]},{changed:!1,mergesChangedIn:t}):(this.#gY=this.#g2(i),{changed:this.#gJ(this.#gY),mergesChangedIn:t})}#g0(e){let t=this.#gG;if(null===t)return[];let r=this.#gQ(e),i=new Set;this.#gG=null;let n=({physicalColumn:e,colspan:t})=>{let r=this.#gV.toVisualColumn(e);for(let e=0;null!==r&&e<t;e++)i.add(r+e)};return r.forEach((e,r)=>t.has(r)?void 0:n(e)),t.forEach((e,t)=>r.has(t)?void 0:n(e)),Array.from(i)}#gQ(e){let t=new Map;return e.forEach(({row:e,col:r,rowspan:i,colspan:n})=>{let o=this.#gV.toPhysicalRow(e),s=this.#gV.toPhysicalColumn(r);null!==o&&null!==s&&t.set(`${o}:${s}:${i}:${n}`,{physicalColumn:s,colspan:n})}),t}#g2(e){let t=this.#dl(e),r=new Map;return e.forEach(e=>{let t=this.#g3(e);if(null!==t){let i=r.get(t)??new Map;i.set(`${e.col}:${e.colspan}`,e),r.set(t,i)}}),{contentWidths:t,targets:Array.from(r,([e,t])=>({target:e,spans:Array.from(t.values())})).sort((e,t)=>t.target-e.target)}}#gJ({contentWidths:e,targets:t}){let r=this.#gz;return this.#gz=new Map,t.forEach(({target:t,spans:r})=>{let i=this.#gV.toPhysicalColumn(t),n=0;r.forEach(r=>{n=Math.max(n,this.#g6(r,t,e))}),null!==i&&n>0&&this.#gz.set(i,n)}),!function(e,t){if(e.size!==t.size)return!1;for(let[r,i]of e)if(t.get(r)!==i)return!1;return!0}(r,this.#gz)}#g6(e,t,r){let i=r.get(`${e.col}:${e.colspan}`)??0;for(let r=e.col;r<e.col+e.colspan;r++)r===t||this.#gV.isColumnHidden(r)||(i-=this.#gV.getColumnWidth(r));return i}#dl(e){let t=new Map,r=new Map;return this.#g5(e).forEach(e=>{let i=this.#g$.get(e.cacheKey);if(void 0!==i&&i.signature===e.signature)return void t.set(e.key,i.width);let n=r.get(e.colspan)??[];n.push(e),r.set(e.colspan,n)}),r.forEach(e=>{let r=this.#gV.measureTexts(e.map(e=>({column:e.col,texts:e.rows.map((t,r)=>({row:t,value:this.#g4(t,e.col,e.physicalRows[r],e.physicalColumn)}))})));e.forEach(e=>{let i=r.get(e.col)??0;t.set(e.key,i),this.#g$.set(e.cacheKey,{width:i,signature:e.signature})})}),t}#g5(e){let t=new Map;return e.forEach(({row:e,col:r,colspan:i})=>{let n=this.#gV.toPhysicalRow(e),o=this.#gV.toPhysicalColumn(r);if(null===n||null===o)return;let s=`${r}:${i}`,l=t.get(s)??{key:s,cacheKey:`${o}:${i}`,col:r,colspan:i,physicalColumn:o,rows:[],physicalRows:[],signature:""};l.rows.push(e),l.physicalRows.push(n),t.set(s,l)}),t.forEach(e=>{e.signature=this.#g8(e.physicalColumn,e.physicalRows)}),Array.from(t.values())}#g8(e,t){let r=0,i=0;return t.forEach(e=>{r+=e,i^=Math.imul(e+1,0x9e3779b1)}),`${this.#gW.get(e)??0}:${t.length}:${r}:${i}`}#g4(e,t,r,i){let n=this.#gU.get(i)??new Map;return n.has(r)||(n.set(r,this.#gV.formatCellText(e,t)),this.#gU.set(i,n)),n.get(r)}#gX(e){this.#gW.set(e,(this.#gW.get(e)??0)+1)}#gZ(){this.#gU.clear(),this.#g$.clear(),this.#gW.clear()}#g1(e){for(let t=e.row;t<e.row+e.rowspan;t++)if(!this.#gV.isRowHidden(t))return!0;return!1}#g3(e){for(let t=e.col;t<e.col+e.colspan;t++)if(!this.#gV.isColumnHidden(t))return t;return null}}let SM=Object.freeze({capability:"feat:auto_column_size",name:"Auto column size",gate:"enable",tiers:Object.freeze(["standard","professional"])});nM.getSingleton().register("modifyAutoColumnSizeSeed");let SI="autoColumnSize";class SN extends sM{static get PLUGIN_KEY(){return SI}static get PLUGIN_PRIORITY(){return 10}static get LICENSE(){return SM}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}static get CALCULATION_CELLS_BUDGET(){return 1e5}ghostTable=new sz(this.hot);samplesGenerator=new SE((e,t)=>{let r=this.hot.toPhysicalRow(e),i=this.hot.toPhysicalColumn(t);if(this.hot.rowIndexMapper.isHidden(r)||this.hot.columnIndexMapper.isHidden(i))return!1;let n=this.hot.getCellMetaTransient(e,t),o="",s="";if(n.hidden)return!1;n.spanned&&Sx(n.colspan)||(s=o=sk(this.hot.getDataAtCell(e,t),n,this.hot.getCellRenderer(n)));let l="";return this.hot.hasHook("modifyAutoColumnSizeSeed")&&(l=String(this.hot.runHooks("modifyAutoColumnSizeSeed",l,n,s)??l)),{value:o,bundleSeed:l}});inProgress=!1;#g9=null;#g7=null;#pe=!1;#pt=new Set;#pr=!1;measuredColumns=0;columnWidthsMap;#lP=!1;#pi=[];#pn=new Map;#po=new Map;#ps=new SA({getMergedAreas:()=>{let e=this.hot.getPlugin("mergeCells");return e?.enabled?e.getVisibleMergedAreas():[]},isRowHidden:e=>this.hot.rowIndexMapper.isHidden(this.hot.toPhysicalRow(e)),isColumnHidden:e=>this.hot.columnIndexMapper.isHidden(this.hot.toPhysicalColumn(e)),toPhysicalRow:e=>this.hot.toPhysicalRow(e),toPhysicalColumn:e=>this.hot.toPhysicalColumn(e),toVisualColumn:e=>this.hot.toVisualColumn(e),getColumnWidth:e=>this.hot.getColWidth(e,"StretchColumns"),formatCellText:(e,t)=>this.#pl(e,t,this.hot.getDataAtCell(e,t)),measureTexts:e=>this.#pa(e)});#ph=new Set;#pd=new Map;#pu=0;#pc=!1;#pg=new Set;#pp=!1;#pm=void 0;#pf=null;constructor(e){super(e),this.columnWidthsMap=this.hot.columnIndexMapper.createAndRegisterIndexMap("autoColumnSize","physicalIndexToValue",null,{skipUnchangedWrites:!0}),this.addHook("beforeColumnResize",this.#pw)}isEnabled(){return!1!==this.hot.getSettings()[SI]&&!this.hot.getSettings().colWidths}#py=!1;#pb=!1;enablePlugin(){this.enabled||(this.#pb=this.#pC()&&this.#py,this.#py=!0,this.addHook("afterLoadData",this.#ct),this.addHook("afterFontsLoad",this.#pS,10),this.addHook("beforeLoadData",this.#pv),this.addHook("beforeChangeRender",this.#u2),this.addHook("afterSetCellMeta",this.#pR),this.addHook("afterSetSourceDataAtCell",this.#u1),this.addHook("afterFormulasValuesUpdate",this.#pE),this.addHook("beforeMergeCells",this.#pT),this.addHook("beforeUnmergeCells",this.#pT),this.addHook("afterMergeCells",this.#px),this.addHook("afterUnmergeCells",this.#pA),this.addHook("afterUpdateData",this.#cr),this.addHook("beforeUndo",this.#pM),this.addHook("beforeRedo",this.#pM),this.addHook("beforeRender",this.#gD),this.addHook("modifyColWidth",(e,t)=>this.getColumnWidth(t,e),-10),this.addHook("init",this.#pI),this.hot.rowIndexMapper.addLocalHook("cacheUpdated",this.#pN),this.hot.columnIndexMapper.addLocalHook("cacheUpdated",this.#pO),this.hot.columnIndexMapper.addLocalHook("change",this.#pk),this.#ps.markStale(),this.#pf=this.hot.columnIndexMapper.observeMapChange(this.columnWidthsMap,()=>{this.hot.view?.invalidateColumnWidthCache()}),super.enablePlugin())}updatePlugin(e){this.findColumnsWhereHeaderWasChanged().forEach(e=>{this.#pn.set(e,null)}),(this.#pC()||this.#pb)&&this.recalculateAllColumnsWidth(),this.#pb=!1,this.#pH(),this.#po.clear(),this.#p_(),super.updatePlugin()}#pC(){let e=this.getSetting("useHeaders"),t=this.#pm!==e;this.#pm=e,this.ghostTable.setSetting("useHeaders",e);let r=this.samplesGenerator.applySamplingOptions({samplingRatio:this.getSetting("samplingRatio"),allowDuplicates:this.getSetting("allowSampleDuplicates")});return t||r}disablePlugin(){this.#pf&&(this.#pf(),this.#pf=null),this.hot.rowIndexMapper.removeLocalHook("cacheUpdated",this.#pN),this.hot.columnIndexMapper.removeLocalHook("cacheUpdated",this.#pO),this.hot.columnIndexMapper.removeLocalHook("change",this.#pk),this.#pP(),this.#ps.clear(),super.disablePlugin(),this.addHook("beforeColumnResize",this.#pw)}calculateVisibleColumnsWidth(){if(!this.hot.countRows())return;let e=this.getFirstVisibleColumn(),t=this.getLastVisibleColumn();if(-1===e||-1===t)return;let r=this.#g7,i=this.hot.forceFullRender,n={from:e,to:t},o={from:0,to:this.hot.countRows()-1};null!==r&&i&&this.#pe?this.#pD(n,o,e=>!r.has(e)):this.#pD(n,o,()=>i),i&&(this.#pp=!1)}calculateColumnsWidth(e={from:0,to:this.hot.countCols()-1},t={from:0,to:this.hot.countRows()-1},r=!1){this.#pD("number"==typeof e?{from:e,to:e}:e,"number"==typeof t?{from:t,to:t}:t,()=>r)}#pD(e,t,r){let i=new Set;oD(e.from,e.to,e=>{let n=this.hot.toPhysicalColumn(e);null===n&&(n=e);let o=r(e);if(o||null===this.columnWidthsMap.getValueAtIndex(n)&&!this.hot._getColWidthFromSettings(e)){let r=o?this.#po.get(n):void 0;void 0!==r?(this.#pg.add(e),this.#pL(e,r)):(o&&i.add(e),this.#pF(e,t))}}),this.ghostTable.columns.length&&(this.#pB(i),this.measuredColumns=e.to+1)}calculateAllColumnsWidth(e={from:0,to:this.hot.countRows()-1},t=!1){this.#pV({rowsRange:"number"==typeof e?{from:e,to:e}:e,overwriteCache:t,syncColumns:this.getSyncCalculationLimit()+1,reuseSamples:!1,viewportFirst:!1})}#pV({rowsRange:e,overwriteCache:t,syncColumns:r,reuseSamples:i,viewportFirst:n}){let o=this.#pz(n),s=0,l=e.from,a=null,h=0;this.#pP(),this.inProgress=!0,this.#g7=i?new Set(o):null,this.#pt.clear(),t&&(this.#pr=!1);let d=e=>t||null===this.columnWidthsMap.getValueAtIndex(this.#pU(e))&&!this.hot._getColWidthFromSettings(e),u=()=>{this.#g7?.delete(o[s]),s+=1},c=(t,r)=>{let n=t,c=r,g=this.hot.countCols()-1,p=Math.min(e.to,this.hot.countRows()-1);for(;n>0&&s<o.length;){let t=o[s];if(t>g){a=null,u();continue}if(null!==a&&this.#pt.has(t)&&(a=null),this.#pt.delete(t),null===a){if(!d(t)){u(),n-=1;continue}let r=i&&!this.#pn.has(t)?this.#po.get(this.#pU(t)):void 0;if(void 0!==r){this.#pg.add(t),this.#pL(t,r),u(),n-=1;continue}a=new Map,h=this.#pu,l=e.from}if(l<=p){if(c<=0)return!1;let e=Math.min(p,l+c-1);this.samplesGenerator.generateSample("col",{from:l,to:e},t,a),c-=e-l+1,l=e+1}l>p&&(this.#pL(t,a),this.#po.set(this.#pU(t),a),this.#pW(t,h),a=null,u(),n-=1)}return s>=o.length},g=()=>{if(!this.ghostTable.columns.length)return!1;let e=this.#pB(),t=!1;if(i&&e.length>0){let r=this.#p$();t=e.some(e=>r.has(e))}return n||(this.measuredColumns=s),t},p=e=>{if(this.#g9=null,!this.hot)return void this.#pG();if(!this.hot.view.isVisible()){t&&!i&&(o.slice(s).forEach(e=>{this.#po.delete(this.#pU(e))}),this.#pr=!0),this.#pP();return}let r=!1,n=!1;this.#pc=!0;try{r=c(SN.CALCULATION_STEP+1,SN.CALCULATION_CELLS_BUDGET),n=g()}finally{this.#pc=!1}r?(this.#pG(),this.#pj()):this.#g9=tz(()=>p(!0)),i&&e&&(n||r)&&(this.#pe=!0,this.hot.render())};r>0&&(c(r,1/0),g()),s<o.length?p(!1):this.#pG()}#pz(e){let t=Array.from({length:this.hot.countCols()},(e,t)=>t);if(!e)return t;let r=this.#p$();return[...r,...t.filter(e=>!r.has(e))]}#p$(){let e=this.hot.countCols(),t=new Set,r=Math.min(this.hot.view.countFixedColumnsStart(),e),i=Math.max(e-this.hot.view.countFixedColumnsEnd(),0);oD(0,r-1,e=>t.add(e));let n=this.getFirstVisibleColumn(),o=this.getLastVisibleColumn();return -1!==n&&-1!==o&&oD(n,Math.min(o,e-1),e=>t.add(e)),oD(i,e-1,e=>t.add(e)),t}#pU(e){return this.hot.toPhysicalColumn(e)??e}#pY(){if(0===this.#pn.size)return;let e=this.#pn,t=this.#g7;this.inProgress&&null!==t?(e=new Map,this.#pn.forEach((r,i)=>{t.has(i)||(e.set(i,r),this.#pn.delete(i),this.#pd.delete(i))})):(this.#pn=new Map,this.#pd.clear());let r=this.hot.countRows(),i=[],n=[];if(e.forEach((e,t)=>{let o=this.hot.toPhysicalColumn(t);if(null===o||this.hot._getColWidthFromSettings(t))return;let s=this.columnWidthsMap.getValueAtIndex(o);null===e||null==s||2*e.length>=r?i.push(t):n.push({visualColumn:t,cells:e,cachedWidth:s})}),this.#pK(n,i),i.length>0){let e={from:0,to:r-1};i.forEach(t=>{this.#ph.has(t)||this.#pF(t,e)})}this.ghostTable.columns.length&&this.#pB()}#pK(e,t){if(0===e.length)return;let r=new Map,i=[],n=e.map(({visualColumn:e,cells:t})=>({visualColumn:e,samples:this.samplesGenerator.generateSample("col",t.map(e=>e.row),e)})),o=new Map(n.map(({visualColumn:e,samples:t})=>[e,t])),s=this.#pq(n);if(e.forEach(e=>{let n=s.get(e.visualColumn);void 0!==n&&n>e.cachedWidth?(r.set(e.visualColumn,n),this.#pX(e,o.get(e.visualColumn))):e.cells.some(e=>!e.hasOldValue)?t.push(e.visualColumn):(i.push(e),this.#pX(e,o.get(e.visualColumn)))}),i.length>0){let e=this.#pq(i.map(({visualColumn:e,cells:t})=>({visualColumn:e,samples:this.samplesGenerator.generateSampleFromValues("col",t.map(t=>({index:t.row,value:this.#pl(t.row,e,t.oldValue)})))})));i.forEach(({visualColumn:r,cachedWidth:i})=>{let n=e.get(r);void 0!==n&&n>=i&&t.push(r)})}r.size>0&&(this.hot.batchExecution(()=>{r.forEach((e,t)=>{this.columnWidthsMap.setValueAtIndex(this.hot.toPhysicalColumn(t),e)})},!0),this.#ps.markWidthsChanged(),this.#pj())}#pX(e,t){let r=this.hot.toPhysicalColumn(e.visualColumn),i=null===r?void 0:this.#po.get(r);if(void 0===i)return;let n=new Set(e.cells.map(e=>e.row));if(i.forEach((e,t)=>{let r=e.strings.filter(({row:e})=>void 0===e||!n.has(e));0===r.length?i.delete(t):e.strings=r}),void 0===t)return;let o=this.samplesGenerator.getSampleCount(),s=!1;t.forEach((e,t)=>{let r=i.get(t);void 0===r?i.set(t,e):(r.strings.push(...e.strings),r.strings.length>2*o&&(s=!0))}),s&&null!==r&&this.#po.delete(r)}#pq(e){let t=new Map,r=e.filter(({samples:e})=>e.size>0);if(0===r.length)return t;let i=this.ghostTable.getSetting("useHeaders");this.ghostTable.setSetting("useHeaders",!1);try{r.forEach(({visualColumn:e,samples:t})=>{this.#pL(e,t)}),this.ghostTable.getWidths((e,r)=>{t.set(e,r)})}finally{this.ghostTable.clean(),this.ghostTable.setSetting("useHeaders",i)}return t}#pl(e,t,r){let i=this.hot.getCellMetaTransient(e,t);return sk(r,i,this.hot.getCellRenderer(i))}#pF(e,t){this.samplesGenerator.generateColumnSamples(e,t).forEach((e,t)=>{let r=this.hot.toPhysicalColumn(t);this.#ph.add(t),this.#pL(t,e),this.#po.set(null===r?t:r,e)})}#pL(e,t){this.ghostTable.addColumn(e,new Map(t))}#pB(e=new Set){let t=!1,r=[];return this.hot.batchExecution(()=>{this.ghostTable.getWidths((i,n)=>{let o=this.hot.toPhysicalColumn(i);this.columnWidthsMap.getValueAtIndex(o)!==n&&(r.push(i),this.#ps.markWidthsChanged(),t||=this.#pg.has(i)||this.#pp&&e.has(i)),this.columnWidthsMap.setValueAtIndex(o,n)})},!0),this.ghostTable.clean(),this.#pg.clear(),t&&this.#ps.markStylesChanged(),this.#pc||this.#pj(),r}#pj(){let{changed:e,mergesChangedIn:t}=this.#ps.fit();t.forEach(e=>{let t=this.hot.toPhysicalColumn(e);null!==t&&this.#po.delete(t),this.#pn.set(e,null)}),e&&this.hot.view?.invalidateColumnWidthCache()}#pW(e,t){let r=this.#pd.get(e);void 0!==r&&r<=t&&null===this.#pn.get(e)&&(this.#pn.delete(e),this.#pd.delete(e))}#pa(e){return this.#pq(e.map(({column:e,texts:t})=>({visualColumn:e,samples:this.samplesGenerator.generateSampleFromValues("col",t.map(({row:e,value:t})=>({index:e,value:t})))})))}isReMeasurePending(){return this.inProgress||this.#pr}recalculateAllColumnsWidth(){this.hot.view.isVisible()&&(this.#pn.clear(),this.#pd.clear(),this.#ps.markStale(),this.calculateAllColumnsWidth({from:0,to:this.hot.countRows()-1},!0),this.#po.clear(),this.#pp=!0)}getSyncCalculationLimit(){let e=this.hot.getSettings()[SI],t=SN.SYNC_CALCULATION_LIMIT,r=this.hot.countCols()-1;if(tx(e)){let i=e.syncLimit;if("string"==typeof i&&oe(i))t=oF(r,i);else{let e=Number(i);t=Number.isFinite(e)?Math.trunc(e):0}}return Math.min(t,r)}getColumnWidth(e,t,r=!0){let i=t;if(void 0===i){let t=this.hot.toPhysicalColumn(e),n=this.#ps.getWidth(t);i=this.columnWidthsMap.getValueAtIndex(t),void 0!==n&&(i=Math.max(i??0,n)),r&&"number"==typeof i&&(i=Math.max(i,50))}return i}getFirstVisibleColumn(){return this.hot.getFirstRenderedVisibleColumn()??-1}getLastVisibleColumn(){return this.hot.getLastRenderedVisibleColumn()??-1}findColumnsWhereHeaderWasChanged(){return this.hot.getColHeader().reduce((e,t,r)=>{let i=this.#pi.length;if(i-1<r||this.#pi[r]!==t){let t=this.hot.toVisualColumn(r);null!==t&&e.push(t)}return i-1<r?this.#pi.push(t):this.#pi[r]=t,e},[])}clearCache(e){Array.isArray(e)?this.hot.batchExecution(()=>{e.forEach(e=>{this.columnWidthsMap.setValueAtIndex(e,null),this.#po.delete(e),this.#ps.clearColumn(e)})},!0):(this.columnWidthsMap.clear(),this.#po.clear(),this.#ps.clear())}isNeedRecalculate(){return!!this.columnWidthsMap.getValues().slice(0,this.measuredColumns).filter(e=>null===e).length}#gD=()=>{this.#ph.clear(),this.#pr&&this.hot.view.isVisible()&&this.hot.countRows()>0&&this.hot.countCols()>0&&this.#pQ(),this.calculateVisibleColumnsWidth(),this.#pe=!1,this.inProgress&&null===this.#g7||this.#pY(),this.#pj(),!this.inProgress&&this.#pn.size>0&&this.#pY()};#pS=()=>{if(!this.hot.countRows()){this.#pr=!0;return}this.#ps.markStylesChanged(),this.#pQ()};#pQ(){this.#pV({rowsRange:{from:0,to:this.hot.countRows()-1},overwriteCache:!0,syncColumns:0,reuseSamples:!0,viewportFirst:!0}),this.#pe=null!==this.#g7}#px=(e,t,r)=>{this.#pZ(e,r)};#pT=()=>{this.#ps.markLayoutChanged()};#pA=e=>{this.#pZ(e,!1)};#pZ(e,t){let r=e.getTopStartCorner().col,i=e.getBottomEndCorner().col;null!==r&&null!==i&&(oD(r,i,e=>{let i=this.hot.toPhysicalColumn(e);null!==i&&this.#po.delete(i),t&&e!==r||(this.#pn.set(e,null),this.#pu+=1,this.#pd.set(e,this.#pu),this.#ps.markMergesChanged(e))}),this.#pJ())}#pJ(){null!==this.#g7&&this.#pP()}#p0(e){this.#g7?.has(e)&&this.#pt.add(e)}#p_(){this.#g7?.forEach(e=>this.#pt.add(e))}#pv=()=>{this.#pP()};#pP(){null!==this.#g9&&(tU(this.#g9),this.#g9=null),null!==this.#g7&&(this.#pr=!0),this.#pG()}#pG(){this.inProgress=!1,this.#g7=null,this.#pe=!1,this.#pt.clear()}#ct=(e,t)=>{this.#pn.clear(),this.#pr=!1,this.#pd.clear(),this.#ps.markRenumbered(),t||this.recalculateAllColumnsWidth()};#u2=e=>{e.forEach(([e,t,r])=>{if("function"==typeof t||null===e)return;let i=this.hot.propToCol(t);if(null===i||!Number.isInteger(i)||this.#p1(e,i))return;let n=this.#pn.get(i);if(null===n)return;let o={row:e,oldValue:r,hasOldValue:!0};void 0===n?this.#pn.set(i,[o]):n.push(o)})};#u1=e=>{e.forEach(([,e])=>{let t="function"==typeof e?null:this.hot.propToCol(e);Number.isInteger(t)?(this.#po.delete(this.#pU(Number(t))),this.#p0(Number(t))):this.#po.clear()}),this.#ps.mayHaveMultiColumnMerges()&&e.forEach(([e,t])=>{let r=this.hot.toVisualRow(e),i="function"==typeof t?null:this.hot.propToCol(t);null!==r&&Number.isInteger(i)&&this.#p1(r,Number(i))})};#p1(e,t){if(!this.#ps.mayHaveMultiColumnMerges())return!1;let r=this.hot.getCellMetaTransient(e,t);return!!(r.spanned&&Sx(r.colspan))&&(this.#ps.invalidateCell(e,t),!0)}#pR=(e,t)=>{let r=this.hot.toPhysicalColumn(t);null!==r&&(this.#po.delete(r),this.#pJ()),this.#p1(e,t)};#pN=e=>{let{indexesSequenceChanged:t,trimmedIndexesChanged:r,hiddenIndexesChanged:i}=e;(t||r||i)&&(this.#po.clear(),this.#pJ(),this.#pH(t?"numbering":"refit"))};#pO=e=>{let{indexesSequenceChanged:t,trimmedIndexesChanged:r,hiddenIndexesChanged:i}=e;t&&(this.#po.clear(),this.#pJ()),(t||r||i)&&this.#pH(t?"numbering":"refit")};#pH(e="texts"){this.hot.getPlugin("mergeCells")?.enabled&&("numbering"===e?this.#ps.markRenumbered():"texts"===e?this.#ps.markStale():this.#ps.markLayoutChanged())}#pk=()=>{this.#ps.mayHaveMultiColumnMerges()&&this.#ps.markWidthsChanged()};#cr=()=>{this.#pH("numbering"),(null!==this.#g7||this.#pr)&&(this.#po.clear(),this.#p_())};#pM=()=>{this.hot.getPlugin("mergeCells")?.enabled&&this.#ps.snapshotMerges()};#pw=(e,t,r)=>{let i=e;return r&&(this.calculateColumnsWidth(t,void 0,!0),i=this.getColumnWidth(t,void 0,!1)??i),i};#pI=()=>{this.#pi=this.hot.getColHeader(),this.recalculateAllColumnsWidth(),this.#lP=!0};#pE=e=>{if(!this.#lP)return;let t=this.hot.getPlugin("formulas"),r=t?.sheetId;e.forEach(e=>{let t=e.address;if(null!=r&&t?.sheet!==r)return;let i=Number(t?.col),n=Number(t?.row);if(!Number.isInteger(i))return;let o=this.hot.toVisualColumn(i);if(null===o)return;let s=Number.isInteger(n)?this.hot.toVisualRow(n):null;if(null!==s&&this.#p1(s,o))return;let l=this.#pn.get(o);if(null===l)return;if(null===s)return void this.#pn.set(o,null);let a={row:s,oldValue:void 0,hasOldValue:!1};void 0===l?this.#pn.set(o,[a]):l.push(a)})};destroy(){this.hot?.rowIndexMapper.removeLocalHook("cacheUpdated",this.#pN),this.hot?.columnIndexMapper.removeLocalHook("cacheUpdated",this.#pO),this.hot?.columnIndexMapper.removeLocalHook("change",this.#pk),this.#pP(),this.ghostTable.clean(),super.destroy()}}function SO(e,t,r){let{view:i,columnIndexMapper:n,rowIndexMapper:o}=e,s={getCell:(t,r)=>e.getCell(t,r,!0),getHeight:e=>e.offsetHeight,getWidth:e=>e.offsetWidth,getRowspan:(t,r)=>e.getCellMetaTransient(t,r).rowspan,getColspan:(t,r)=>e.getCellMetaTransient(t,r).colspan},l=e.isRtl(),a=i.countNotHiddenFixedColumnsStart(),h=i.countNotHiddenFixedRowsTop(),d=i.countNotHiddenFixedRowsBottom(),u=e.getFirstPartiallyVisibleRow(),c=e.getLastPartiallyVisibleRow(),g=e.getFirstPartiallyVisibleColumn(),p=e.getLastPartiallyVisibleColumn(),m=e.rootElement.getBoundingClientRect(),f=e.hasColHeaders()?i.getColumnHeaderHeight():0,w=e.hasRowHeaders()?i.getRowHeaderWidth():0,{rootWindow:y}=e,b=i.isHorizontallyScrollableByWindow()?Math.min(0,m.left):m.left,C=i.isVerticallyScrollableByWindow()?Math.min(0,m.top):m.top,S=i.isHorizontallyScrollableByWindow()?y.innerWidth:m.left+i.getViewportWidth()+w,v=i.isVerticallyScrollableByWindow()?y.innerHeight:m.top+i.getViewportHeight()+f,R=oB(t,b,S),E=oB(r,C,v),T=u??0,x=c??T,A=null;if(a>0){let t=n.getVisualFromRenderableIndex(0),r=n.getVisualFromRenderableIndex(a-1),i=null!==t?n.getNearestNotHiddenIndex(t,1):null;if(null!==i&&null!==r){let t=sQ(s,T,x,i,r),n=e.getCell(t,i,!0);if(n instanceof HTMLElement){let e=n.getBoundingClientRect();A=sK(s,t,i,r,l?e.right-R:R-e.left)}}}if(null===A&&(A=function(e,t,r,i,n){let{view:o,columnIndexMapper:s}=e,l=e.countCols(),a=o.countFixedColumnsEnd();if(!(a>0))return null;let h=s.getNearestNotHiddenIndex(l-a,1),d=s.getNearestNotHiddenIndex(l-1,-1);if(null===h||null===d||h>d||h<l-a)return null;let u=sQ(t,i,n,h,d),c=e.getCell(u,h,!0);if(!(c instanceof HTMLElement))return null;let g=c.getBoundingClientRect(),p=e.isRtl()?g.right-r:r-g.left;return p<0?null:sK(t,u,h,d,p)??d}(e,s,R,T,x)),null===A){let t=sQ(s,T,x,g,p),r=e.getCell(t,g,!0);if(r instanceof HTMLElement){let i=r.getBoundingClientRect(),n=l?i.right-R:R-i.left;null===(A=sK(s,t,g,p,n))&&(A=n<0?g??0:p??e.countCols()-1)}else A=g??0}null===A&&tf("Failed to resolve cell coordinates from mouse position.");let M=g??0,I=p??M,N=null;if(h>0){let t=o.getVisualFromRenderableIndex(0),r=o.getVisualFromRenderableIndex(h-1),i=null!==t?o.getNearestNotHiddenIndex(t,1):null;if(null!==i&&null!==r){let t=sX(s,M,I,i,r),n=e.getCell(i,t,!0);n instanceof HTMLElement&&(N=sq(s,t,i,r,E-n.getBoundingClientRect().top))}}if(null===N&&d>0){let t=o.getNotHiddenIndexesLength(),r=o.getVisualFromRenderableIndex(t-d),i=o.getVisualFromRenderableIndex(t-1),n=null!==r?o.getNearestNotHiddenIndex(r,1):null,l=null!==i?o.getNearestNotHiddenIndex(i,-1):null;if(null!==n&&null!==l){let t=sX(s,M,I,n,l),r=e.getCell(n,t,!0);if(r instanceof HTMLElement){let e=E-r.getBoundingClientRect().top;e>=0&&null===(N=sq(s,t,n,l,e))&&(N=l)}}}if(null===N){let t=u??0,r=c??t,i=sX(s,M,I,t,r),n=e.getCell(u,i,!0);if(n instanceof HTMLElement){let t=E-n.getBoundingClientRect().top;null===(N=sq(s,i,u,c,t))&&(N=t<0?u??0:c??e.countRows()-1)}else N=u??0}return null===N&&tf("Failed to resolve cell coordinates from mouse position."),e._createCellCoords(N,A)}function Sk(e,t,r){return e<t?t-e:e>r?e-r:0}function SH(e,t){return e<=0?0:t>0?Math.ceil(e/t):1}let S_=Object.freeze({horizontal:"horizontal",vertical:"vertical"}),SP=Object.freeze({capability:"feat:autofill",name:"Autofill",gate:"enable",tiers:Object.freeze(["standard","professional"])});nM.getSingleton().register("modifyAutofillRange"),nM.getSingleton().register("beforeAutofill"),nM.getSingleton().register("afterAutofill");let SD="fillHandle",SL=Object.freeze({capability:"feat:auto_row_size",name:"Auto row size",gate:"enable",tiers:Object.freeze(["standard","professional"])}),SF="autoRowSize",SB="htFirstDatasetColumnNotRendered",SV="htAutoRowSize";class Sz extends sM{static get PLUGIN_KEY(){return SF}static get PLUGIN_PRIORITY(){return 40}static get LICENSE(){return SL}static get SETTING_KEYS(){return!0}static get DEFAULT_SETTINGS(){return{samplingRatio:null,allowSampleDuplicates:!1}}static get CALCULATION_STEP(){return 50}static get SYNC_CALCULATION_LIMIT(){return 500}headerHeight=null;ghostTable=new sz(this.hot);samplesGenerator=new SE((e,t)=>{let r,i,n=this.hot.toPhysicalColumn(t);if(this.hot.columnIndexMapper.isHidden(n))return!1;let o=e,s=t,l=null;if(e>=0&&t>=0&&(r=this.hot.getCellMetaTransient(e,t)).hidden){if(null===(l=this.#p2(e,t)))return!1;o=l.row,s=l.col,r=this.hot.getCellMetaTransient(o,s)}return(e>=0?(i=this.hot.getDataAtCell(o,s),r&&(i=sk(i,r,this.hot.getCellRenderer(r)))):-1===e&&(i=this.hot.getColHeader(t)),null===l)?{value:i}:{value:i,block:l,bundleSeed:`mergedBlock:${o}:${s}`}});inProgress=!1;measuredRows=0;rowHeightsMap;#p3=[];#pf=null;#lP=!1;#p6=!1;#p5=!1;#p4=!1;#p8=0;#p9=!1;#p7=new Map;#me=new Map;#mt=new Set;constructor(e){super(e),this.rowHeightsMap=this.hot.rowIndexMapper.createAndRegisterIndexMap("autoRowSize","physicalIndexToValue",null,{skipUnchangedWrites:!0}),this.addHook("beforeRowResize",this.#mr)}isEnabled(){return sF(this.hot.getSettings()[SF])}#py=!1;#pb=!1;enablePlugin(){this.enabled||(this.#pb=this.#pC()&&this.#py,this.#py=!0,this.addHook("afterLoadData",this.#ct),this.addHook("afterFontsLoad",this.#pS,11),this.addHook("beforeChangeRender",this.#u2),this.addHook("beforeColumnResize",this.#pw),this.addHook("afterFormulasValuesUpdate",this.#pE),this.addHook("beforeViewRender",this.#mi),this.addHook("beforeRender",this.#gD),this.addHook("modifyRowHeight",(e,t)=>this.getRowHeight(t,e)),this.addHook("init",this.#pI),this.addHook("modifyColumnHeaderHeight",()=>this.getColumnHeaderHeight()),this.#pf=this.hot.rowIndexMapper.observeMapChange(this.rowHeightsMap,()=>{this.hot.view?.invalidateRowHeightCache()}),this.hot.rowIndexMapper.addLocalHook("cacheUpdated",this.#mn),this.hot.columnIndexMapper.addLocalHook("cacheUpdated",this.#mn),this.addHook("afterMergeCells",this.#mo),this.addHook("afterUnmergeCells",this.#mo),this.addHook("afterUndo",this.#ms),this.addHook("afterRedo",this.#ms),this.addHook("afterUpdateSettings",this.#ml),this.#p9=!0,rW(this.hot.rootElement,SV),super.enablePlugin())}updatePlugin(e){(this.#pC()||this.#pb)&&this.clearCache(),this.#pb=!1,super.updatePlugin()}#pC(){return this.samplesGenerator.applySamplingOptions({samplingRatio:this.getSetting("samplingRatio"),allowDuplicates:this.getSetting("allowSampleDuplicates")})}disablePlugin(){this.#pf&&(this.#pf(),this.#pf=null),this.#ma(),this.headerHeight=null,this.#p4=!1,this.#p9=!1,this.#p7.clear(),this.#me.clear(),this.#mt.clear(),r$(this.hot.rootElement,SV),super.disablePlugin(),this.#mh(!1),this.addHook("beforeRowResize",this.#mr)}calculateVisibleRowsHeight(){if(!this.hot.countCols())return;let e=this.getFirstVisibleRow(),t=this.getLastVisibleRow();if(-1===e||-1===t)return;let r=this.hot.forceFullRender;this.calculateRowsHeight({from:e,to:t},void 0,r)}calculateRowsHeight(e={from:0,to:this.hot.countRows()-1},t={from:0,to:this.hot.countCols()-1},r=!1){let i="number"==typeof e?{from:e,to:e}:e,n="number"==typeof t?{from:t,to:t}:t;if((r||null===this.headerHeight)&&null!==this.hot.getColHeader(0)){let e=this.samplesGenerator.generateRowSamples(-1,n);this.ghostTable.addColumnHeadersRow(e.get(-1))}oD(i.from,i.to,e=>{let t=this.hot.toPhysicalRow(e);null===t&&(t=e),(r||null===this.rowHeightsMap.getValueAtIndex(t))&&this.samplesGenerator.generateRowSamples(e,n).forEach((e,t)=>this.ghostTable.addRow(t,e))}),this.ghostTable.rows.length&&(this.hot.batchExecution(()=>{this.ghostTable.getHeights((e,t)=>{e<0?this.headerHeight=Math.round(t):this.rowHeightsMap.setValueAtIndex(this.hot.toPhysicalRow(e),this.#md(t))})},!0),this.measuredRows=i.to+1,this.ghostTable.clean())}calculateAllRowsHeight(e={from:0,to:this.hot.countCols()-1},t=!1){let r=0,i=this.hot.countRows()-1;tU(this.#p8),this.#p8=0,this.inProgress=!0;let n=()=>{if(!this.hot){tU(this.#p8),this.#p8=0,this.inProgress=!1;return}try{this.calculateRowsHeight({from:r,to:Math.min(r+Sz.CALCULATION_STEP,i)},e,t)}catch(e){throw this.#mu(),e}(r=r+Sz.CALCULATION_STEP+1)<i?this.#p8=tz(n):(tU(this.#p8),this.#p8=0,this.inProgress=!1,this.#mc())},o=this.getSyncCalculationLimit();if(o>=0){try{this.calculateRowsHeight({from:0,to:o},e,t)}catch(e){throw this.#mu(),e}r=o+1}r<i?n():(this.inProgress=!1,this.#mc())}#mu(){tU(this.#p8),this.#p8=0,this.inProgress=!1,this.#p5=!0,this.ghostTable.clean()}#p2(e,t){let r=this.hot.getPlugin("mergeCells");return r?.enabled?r.getBlockDrawnOn(e,t):null}#mn=({hiddenIndexesChanged:e,trimmedIndexesChanged:t,indexesSequenceChanged:r})=>{(e||t||r)&&(this.#p9=!0)};#mo=()=>{this.#p9=!0};#ms=()=>{this.#p9=!0,this.#mg(!0),this.#mc()};#ml=e=>{tx(e)&&tP(e,"mergeCells")&&(this.#p9=!0)};#ma(){this.hot?.rowIndexMapper.removeLocalHook("cacheUpdated",this.#mn),this.hot?.columnIndexMapper.removeLocalHook("cacheUpdated",this.#mn)}#mg(e=!1){if(!this.#p9)return;this.#p9=!1;let t=this.hot.getPlugin("mergeCells"),r=new Map,i=new Map;t?.enabled&&t.getCellsBlocksAreDrawnOn().forEach(({row:e,col:t,colspan:n,originRow:o,originCol:s})=>{let l=this.hot.toPhysicalRow(e),a=this.hot.toPhysicalColumn(t),h=this.hot.toPhysicalRow(o),d=this.hot.toPhysicalColumn(s);null!==l&&null!==a&&(r.set(`${l}:${a}:${n}`,l),null!==h&&null!==d&&i.set(`${h}:${d}`,l))});let n=new Set;r.forEach((e,t)=>{this.#p7.has(t)||n.add(e)}),this.#p7.forEach((e,t)=>{r.has(t)||n.add(e)}),this.#mt.forEach(e=>{this.hot.rowIndexMapper.isHidden(e)||(this.#mt.delete(e),n.add(e))}),this.#p7=r,this.#me=i,this.#mp(Array.from(n),e)}#mp(e,t){if(0===e.length)return;let r=this.getFirstVisibleRow(),i=this.getLastVisibleRow(),n=[];this.hot.batchExecution(()=>{e.forEach(e=>{this.rowHeightsMap.setValueAtIndex(e,null)})},!0),e.forEach(e=>{if(this.hot.rowIndexMapper.isHidden(e))return void this.#mt.add(e);let o=this.hot.toVisualRow(e);null!==o&&(t||!(null!==o&&o>=r&&o<=i))&&n.push(e)}),this.#mm(n)}#md(e){let{stylesHandler:t}=this.hot;return function(e,t,r=0){return e<=t+r+.05?Math.round(e):Math.ceil(e)}(e,t.getDefaultRowHeight()??0,t.getMaxDefaultRowOvergrowth())}#mc(){this.inProgress||0===this.hot.countCols()||0===this.#p3.length||(this.#mf(this.#p3),this.#p3=[])}#mf(e){let t={from:0,to:this.hot.countCols()-1};e.forEach(e=>{this.samplesGenerator.generateRowSamples(e,t).forEach((e,t)=>this.ghostTable.addRow(t,e))}),this.ghostTable.rows.length&&(this.hot.batchExecution(()=>{this.ghostTable.getHeights((e,t)=>{let r=this.hot.toPhysicalRow(e);this.rowHeightsMap.setValueAtIndex(r,this.#md(t))})},!0),this.ghostTable.clean())}recalculateAllRowsHeight(){this.hot.view.isVisible()&&this.calculateAllRowsHeight({from:0,to:this.hot.countCols()-1},!0)}getSyncCalculationLimit(){let e=this.hot.getSettings()[SF],t=Sz.SYNC_CALCULATION_LIMIT,r=this.hot.countRows()-1;if(tx(e))if(oe(t=this.getSetting("syncLimit")))t=oF(r,t);else{let e=Number(t);t=Number.isFinite(e)?Math.trunc(e):0}return Math.min(t,r)}getRowHeight(e,t=this.hot.stylesHandler.getDefaultRowHeight(e)??0){if(e<0)return this.headerHeight??t;let r=this.hot.toPhysicalRow(e);if(this.hot.rowIndexMapper.isHidden(r))return t;let i=this.rowHeightsMap.getValueAtIndex(r),n=t;return null!=i&&i>t&&(n=i,this.hot.stylesHandler.firstRenderedRowDrawsTopBorder()&&e===this.hot.view.getFirstRenderedVisibleRow()&&(n+=1)),n}getColumnHeaderHeight(){return this.headerHeight}getFirstVisibleRow(){return this.hot.getFirstRenderedVisibleRow()??-1}getLastVisibleRow(){return this.hot.getLastRenderedVisibleRow()??-1}clearCache(e){this.headerHeight=null,Array.isArray(e)?(this.hot.batchExecution(()=>{e.forEach(e=>{this.rowHeightsMap.setValueAtIndex(e,null)})},!0),this.#mm(e)):(this.rowHeightsMap.clear(),this.#p5=!0)}clearCacheByRange(e){let{from:t,to:r}="number"==typeof e?{from:e,to:e}:e,i=[];this.hot.batchExecution(()=>{oD(Math.min(t,r),Math.max(t,r),e=>{this.rowHeightsMap.setValueAtIndex(e,null),i.push(e)})},!0),this.#mm(i)}#mm(e){e.forEach(e=>{let t=this.hot.toVisualRow(e);null===t||this.#p3.includes(t)||this.#p3.push(t)})}isNeedRecalculate(){return!!this.rowHeightsMap.getValues().slice(0,this.measuredRows).filter(e=>null===e).length}#mh(e){let t=this.hot.getFirstRenderedVisibleColumn(),r=this.hot.columnIndexMapper.getPhysicalFromVisualIndex(t);!1===e||r===this.hot.columnIndexMapper.getPhysicalFromRenderableIndex(0)?r$(this.hot.rootElement,SB):rW(this.hot.rootElement,SB)}#mi=()=>{this.#mh()};#gD=()=>{if(this.#mg(),this.calculateVisibleRowsHeight(),this.#mc(),this.#p4&&this.hot.view.isVisible()&&!this.#mw()&&(this.#p4=!1,this.#p5=!0),this.#p5&&this.hot.countCols()>0&&this.hot.countRows()>0&&this.hot.view.isVisible()){this.#p5=!1;try{this.recalculateAllRowsHeight()}catch(e){throw this.#p5=!0,e}}};#pw=()=>{this.#p6||(this.#p6=!0,this.hot._registerTimeout(()=>{this.#p6=!1,this.recalculateAllRowsHeight()},0))};#mr=(e,t,r)=>{let i=e;return r&&(this.calculateRowsHeight(t,void 0,!0),i=this.getRowHeight(t)),i};#pS=()=>{if(0===this.hot.countCols()){this.#p5=!0;return}this.recalculateAllRowsHeight(),this.#p4=this.#mw()};#mw(){let e=this.hot.getPlugin("autoColumnSize");return e?.enabled===!0&&e.isReMeasurePending()}#ct=(e,t)=>{t||this.recalculateAllRowsHeight()};#u2=e=>{let t=new Set;e.forEach(e=>{let[r,i]=e;if(null===r){let t=this.hot.getPhysicalRowOfChange(e);null!==t&&this.rowHeightsMap.setValueAtIndex(t,null);return}t.add(Number(r)),this.#my(Number(r),i).forEach(e=>t.add(e))}),t.forEach(e=>{this.#p3.push(e)})};#my(e,t){let r=this.hot.toPhysicalRow(e);if(0===this.#me.size||null===r)return[];let i="string"==typeof t||"number"==typeof t?this.hot.propToCol(t):null,n="number"==typeof i?this.hot.toPhysicalColumn(i):null,o=[];if(null===n)this.#me.forEach((e,t)=>{t.startsWith(`${r}:`)&&o.push(e)});else{let e=this.#me.get(`${r}:${n}`);void 0!==e&&o.push(e)}return o.flatMap(e=>{let t=this.hot.toVisualRow(e);return null===t?[]:[t]})}#pI=()=>{this.recalculateAllRowsHeight(),this.#lP=!0};#pE=e=>{if(!this.#lP)return;let t=this.hot.getPlugin("formulas"),r=t?.sheetId,i=e.reduce((e,t)=>{if(null!=r&&t.address?.sheet!==r)return e;let i=Number(t.address?.row);if(Number.isInteger(i)){let t=this.hot.toVisualRow(i);null!==t&&-1===e.indexOf(t)&&e.push(t)}return e},[]);this.#p3.push(...i)};destroy(){this.#ma(),this.ghostTable.clean(),super.destroy()}}let SU=Object.freeze({capability:"feat:auto_row_header_size",name:"Auto row header size",gate:"enable",tiers:Object.freeze(["standard","professional"])}),SW="autoRowHeaderSize";class S$ extends sM{static get PLUGIN_KEY(){return SW}static get PLUGIN_PRIORITY(){return 45}static get LICENSE(){return SU}static get SETTING_KEYS(){return!0}static get SYNC_CALCULATION_LIMIT(){return 500}static get CALCULATION_STEP(){return 1e3}static get CALCULATION_BUDGET(){return 8}static get MEASUREMENT_PADDING(){return 8}static get DEFAULT_SETTINGS(){return{samplingRatio:null,allowSampleDuplicates:!1,syncLimit:S$.SYNC_CALCULATION_LIMIT}}#mb=new sz(this.hot);#mC=new SE(e=>null!==this.hot.rowIndexMapper.getRenderableFromVisualIndex(e)&&{value:this.#mS(e)});#mS=e=>this.hot.getRowHeader(e);#mv=null;#mR=null;#mE=null;#mT="";#mx=!1;#mA=null;#mM=[];#mI=null;#mN=0;#mO=[];#mk=[];#mH=null;#m_=!1;#mP=null;#mD=null;isEnabled(){let e=this.hot.getSettings()[SW];return!0===e||"object"==typeof e&&null!==e}enablePlugin(){this.enabled||(this.#mC.applySamplingOptions({samplingRatio:this.getSetting("samplingRatio"),allowDuplicates:this.getSetting("allowSampleDuplicates")}),this.addHook("modifyRowHeaderWidth",this.#mL,-10),this.addHook("afterLoadData",this.#mF),this.addHook("afterUpdateData",this.#mF),this.addHook("afterCreateRow",this.#mF),this.addHook("afterRemoveRow",this.#mF),this.addHook("afterColumnSort",this.#mF),this.addHook("afterSetTheme",this.#mF),this.addHook("afterFontsLoad",this.#mF,10),this.addHook("afterFormulasValuesUpdate",this.#mF),this.addHook("afterSetDataAtCell",this.#mB),this.addHook("afterSetSourceDataAtCell",this.#mV),super.enablePlugin())}updatePlugin(e){this.clearCache(),this.disablePlugin(),this.enablePlugin(),super.updatePlugin()}disablePlugin(){super.disablePlugin(),this.clearCache()}getSyncCalculationLimit(){let e=this.hot.countRows(),t=this.getSetting("syncLimit"),r=S$.SYNC_CALCULATION_LIMIT;if("string"==typeof t&&oe(t))r=oF(e,t);else{let e=Number(t);Number.isFinite(e)&&(r=Math.trunc(e))}return Math.max(0,Math.min(r,e))}getRowHeaderWidth(e=0){return this.#mz()[e<0?-e-1:e]??0}getRowHeaderWidths(){return this.#mz().slice()}clearCache(){this.#pP(),this.#mU(),this.#mW(null),this.#mT=""}destroy(){this.#pP(),this.#mU(),this.#mb.clean(),this.#mv=null,super.destroy()}#mz(){return this.#m_||(null===this.#mR||this.#mT!==this.#m$())&&this.#mG(),this.#mR??[]}#mW(e){this.#mR=e,this.#mE=null===e?null:e.map(e=>Math.max(e,50))}#m$(){return[this.hot.countRows(),this.hot.rowIndexMapper.getRenderableIndexesLength(),this.hot.countRowHeaders()].join(",")}#mG(){this.#pP(),this.#mT=this.#m$();let e=this.hot.countRows();if(e<1)return void this.#mW([]);let t=this.#mj();this.#mM=t.renderers,this.#mI=t.gridRenderer,this.#mA=this.#mM.map(()=>new Map),this.#mO=this.#mM.map(()=>-1),this.#mk=this.#mM.map(()=>0),this.#mN=0,this.#mY(Math.min(this.getSyncCalculationLimit(),e)-1);let r=this.#mN>=e;this.#mK(r),r?this.#mq():(this.#mx=!0,this.#mX())}#mq(){this.#mA=null,this.#mM=[],this.#mI=null,this.#mx=!1}#pP(){null!==this.#mH&&(tU(this.#mH),this.#mH=null),this.#mA=null,this.#mM=[],this.#mI=null,this.#mN=0,this.#mx=!1}#mX(){this.#mH=tz(()=>{if(this.#mH=null,!this.hot||!this.enabled||null===this.#mA)return void this.#pP();let e=this.hot.countRows(),t=performance.now()+S$.CALCULATION_BUDGET;do this.#mY(Math.min(this.#mN+S$.CALCULATION_STEP-1,e-1));while(this.#mN<e&&performance.now()<t);let r=this.#mN>=e,i=this.#mK(r);r?this.#mq():this.#mX(),i&&this.hot.render()})}#mY(e){if(null===this.#mA||e<this.#mN)return;let t={from:this.#mN,to:e};this.#mM.forEach((e,r)=>{this.#mQ(this.#mA[r],e,t,e===this.#mI)}),this.#mN=e+1}#mQ(e,t,r,i){this.#mS=i?e=>this.hot.getRowHeader(e):e=>this.#mZ(t,e),this.#mC.generateSample("col",r,-1,e)}#mK(e){if(null===this.#mA)return!1;let t=this.#mA.map((e,t)=>{let r=this.#mJ(e);return r!==this.#mO[t]&&(this.#mO[t]=r,this.#mk[t]=0===r?0:this.#m0(e,this.#mM[t],t)),this.#mk[t]}),r=this.#mR,i=e||null===r||r.length!==t.length?t:t.map((e,t)=>Math.max(e,r[t]));return this.#mW(i),null===r||r.length!==i.length||i.some((e,t)=>e!==r[t])}#mJ(e){let t=0;return e.forEach(e=>{t+=e.strings.length}),t}#mj(){let e=[],t=null;return this.hot.hasRowHeaders()&&(t=(e,t)=>{let r=e>=0?this.hot.rowIndexMapper.getVisualFromRenderableIndex(e):e;this.hot.view.appendRowHeader(r,t)},e.push(t)),this.hot.runHooks("afterGetRowHeaderRenderers",e),{renderers:e,gridRenderer:t}}#mZ(e,t){null===this.#mv&&(this.#mv=this.hot.rootDocument.createElement("th"));let r=this.#mv;return r.textContent="",e(this.#m1(t),r),r.textContent??""}#m1(e){return this.hot.rowIndexMapper.getRenderableFromVisualIndex(e)??e}#m0(e,t,r){let i=0;this.#m_=!0;try{this.#mb.addRowHeadersColumn(new Map(e),r,(e,r)=>{t(this.#m1(e),r)}),this.#mb.getWidths((e,t)=>{i=Math.max(i,t)})}finally{this.#mb.clean(),this.#m_=!1}return 0===i?0:i+S$.MEASUREMENT_PADDING}#mL=e=>{this.#mz();let t=this.#mE;return null===t||0===t.length?e:1===t.length?t[0]:t.slice()};#h7(){this.#pP(),this.#mU(),this.#mT=""}#mF=()=>{this.#h7()};#mB=e=>{if(!Array.isArray(e)||0===e.length||null===this.#mR)return;if(this.#mx)return void this.#h7();let t=this.#mP??new Set;(e.forEach(e=>t.add(e[0])),t.size>S$.SYNC_CALCULATION_LIMIT)?this.#h7():(this.#mP=t,this.#m2())};#mV=e=>{Array.isArray(e)&&this.#mB(e.map(([e,...t])=>[this.hot.toVisualRow(e),...t]))};#m2(){null===this.#mD&&(this.#mD=tz(()=>{this.#mD=null;let e=null===this.#mP?[]:Array.from(this.#mP);this.#mP=null,this.hot&&this.enabled&&null!==this.#mR&&0!==e.length&&this.#m3(e)&&this.hot.render()}))}#mU(){null!==this.#mD&&(tU(this.#mD),this.#mD=null),this.#mP=null}#m3(e){let{renderers:t,gridRenderer:r}=this.#mj();if(t.length!==this.#mR.length)return this.#h7(),!1;let i=[...this.#mR],n=!1;return t.forEach((t,o)=>{let s=new Map;if(this.#mQ(s,t,e,t===r),0===s.size)return;let l=this.#m0(s,t,o);l>i[o]&&(i[o]=l,n=!0)}),n&&this.#mW(i),n}}let SG=class extends dm{constructor(){super(e=>e)}insert(e,t){let r=db(this.indexedValues,t);this.indexedValues=dR(r,e,t,this.initValueOrFn),super.insert(e,t)}remove(e){let t=dE(this.indexedValues,e);this.indexedValues=dy(t,e),super.remove(e)}},Sj=class extends dm{constructor(){super(e=>e)}insert(e,t){this.indexedValues=dR(this.indexedValues,e,t,(e,t)=>this.getNextValue(t)),super.insert(e,t)}remove(e){this.indexedValues=dE(this.indexedValues,e),super.remove(e)}getNextValue(e){return Math.max(...this.getValues())+1+e}},SY=Object.freeze({capability:"feat:bind_rows_with_headers",name:"Bind rows with headers",gate:"enable",tiers:Object.freeze(["standard","professional"])}),SK="bindRowsWithHeaders",Sq=new Map([["loose",SG],["strict",Sj]]);function SX(e){let{wtOverlays:t}=e.view._wt;return[t.inlineEndOverlay?.clone?.wtTable.THEAD,t.topInlineEndCornerOverlay?.clone?.wtTable.THEAD].filter(e=>!!e)}let SQ=["plugin:NestedHeaders"],SZ=Object.freeze({capability:"feat:collapsible_columns",name:"Collapsible columns",gate:"enable",tiers:Object.freeze(["standard","professional"])}),SJ="collapsibleColumns",S0=["nestedHeaders"],S1="collapsibleIndicator",S2="collapsibleColumns.visibleWhen",S3="columnSorting";function S6(e){return"object"==typeof e&&null!==e&&"groups"in e&&Array.isArray(e.groups)&&"configVersion"in e&&"number"==typeof e.configVersion}let S5=new Map([["collapse",{hideColumn:!0,beforeHook:"beforeColumnCollapse",afterHook:"afterColumnCollapse"}],["expand",{hideColumn:!1,beforeHook:"beforeColumnExpand",afterHook:"afterColumnExpand"}]]);class S4 extends sM{static get PLUGIN_KEY(){return SJ}static get PLUGIN_PRIORITY(){return 290}static get PLUGIN_DEPS(){return[...SQ]}static get LICENSE(){return SZ}static get SETTING_KEYS(){return[SJ,...S0]}nestedHeadersPlugin=null;headerStateManager=null;#m6=null;#m5=null;#m4=new WeakMap;#m8=[];#m9=!1;#m7=!1;isEnabled(){return!!this.hot.getSettings()[SJ]}enablePlugin(){this.enabled||(this.pluginName&&(this.#m6=this.hot.columnIndexMapper.createAndRegisterIndexMap(this.pluginName,"hiding")),this.#m5=this.hot.columnIndexMapper.createAndRegisterIndexMap(S2,"hiding"),this.nestedHeadersPlugin=this.hot.getPlugin("nestedHeaders"),this.headerStateManager=this.nestedHeadersPlugin.getStateManager(),this.nestedHeadersPlugin.addLocalHook("afterHeaderStateRebuild",this.#fe),this.addHook("afterGetColHeader",this.#ft),this.addHook("beforeOnCellMouseDown",this.#fr),this.addHook("afterCreateCol",this.#fi),this.addHook("afterRemoveCol",this.#fi),this.addHook("beforeColumnMove",this.#fn),this.addHook("afterColumnMove",this.#fi),this.hot.columnIndexMapper.addLocalHook("beforeCacheUpdate",this.#fo),this.hot.columnIndexMapper.addLocalHook("afterCacheUpdate",this.#fs),this.registerShortcuts(),this.#m9=!0,this.#m7=!0,super.enablePlugin())}updatePlugin(){this.#m9=!0,super.updatePlugin()}onGridReady(){this.#m7&&(this.#m7=!1,this.hot.getSettings().nestedHeaders||this.#fl()||rn("You need to configure the Nested Headers plugin in order to use collapsible headers.")),this.#m9=!1,this.#fa()}#fl(){let{sheetsBar:e}=this.hot.getSettings(),t=tx(e)?e.sheets:void 0;return Array.isArray(t)&&t.some(e=>!!e?.settings?.nestedHeaders)}#fa(){if(!this.nestedHeadersPlugin?.detectedOverlappedHeaders){let{collapsibleColumns:e}=this.hot.getSettings();"boolean"==typeof e?this.headerStateManager?.mapState(e=>({collapsible:Number(e.origColspan)>1})):Array.isArray(e)&&(this.headerStateManager?.mapState(()=>({collapsible:!1})),this.headerStateManager?.mergeStateWith(e))}this.#fh()}disablePlugin(){this.hot.columnIndexMapper.removeLocalHook("beforeCacheUpdate",this.#fo),this.hot.columnIndexMapper.removeLocalHook("afterCacheUpdate",this.#fs),this.#m8=[],this.pluginName&&this.hot.columnIndexMapper.unregisterMap(this.pluginName),this.hot.columnIndexMapper.unregisterMap(S2),this.#m6=null,this.#m5=null,this.nestedHeadersPlugin?.removeLocalHook("afterHeaderStateRebuild",this.#fe),this.nestedHeadersPlugin=null,this.unregisterShortcuts(),this.clearButtons(),super.disablePlugin(),this.#m7=!1}registerShortcuts(){let e=this.hot.getShortcutManager().getContext("grid"),t=e?.getShortcuts(["Enter"]).some(({group:e})=>e===S3);e?.addShortcut({keys:[["Enter"]],callback:()=>{let e=this.hot.getSelectedRangeActive();if(!e)return;let{row:t,col:r}=e.highlight;if(null===t||null===r)return;let{collapsible:i,isCollapsed:n,columnIndex:o}=this.headerStateManager?.getHeaderTreeNodeData(t,r)??{collapsible:!1,isCollapsed:!1,columnIndex:0,headerLevel:0};if(i)return n?this.expandSection({row:t,col:o}):this.collapseSection({row:t,col:o}),!1},runOnlyIf:()=>!!(this.hot.getSelectedRangeActive()?.isSingle()&&this.hot.getSelectedRangeActive()?.highlight.isHeader()),group:SJ,relativeToGroup:t?S3:ml,position:"before"})}unregisterShortcuts(){this.hot.getShortcutManager().getContext("grid")?.removeShortcutsByGroup(SJ)}clearButtons(){if(!this.hot.view)return;let e=this.hot.view._wt.wtTable.THEAD,t=this.hot.view._wt.wtOverlays.topOverlay?.clone?.wtTable.THEAD??null,r=this.hot.view._wt.wtOverlays.topInlineStartCornerOverlay?this.hot.view._wt.wtOverlays.topInlineStartCornerOverlay.clone?.wtTable.THEAD??null:null,i=function(e){e&&e.parentNode&&e.parentNode.removeChild(e)};e&&t&&oD(0,e.childNodes.length-1,n=>{let o=e.childNodes[n],s=t.childNodes[n],l=r?r.childNodes[n]:null;oD(0,o.childNodes.length-1,e=>{let t=o.childNodes[e].querySelector(`.${S1}`);i(t),s&&s.childNodes[e]&&i(t=s.childNodes[e].querySelector(`.${S1}`)),r&&l&&l.childNodes[e]&&i(t=l.childNodes[e].querySelector(`.${S1}`))}),SX(this.hot).forEach(e=>{e.childNodes[n]?.childNodes.forEach(e=>{i(e.querySelector(`.${S1}`))})})})}expandSection(e){this.toggleCollapsibleSection([e],"expand")}collapseSection(e){this.toggleCollapsibleSection([e],"collapse")}toggleAllCollapsibleSections(e){let t=this.headerStateManager?.mapNodes(t=>{let{collapsible:r,origColspan:i,headerLevel:n,columnIndex:o,isCollapsed:s}=t;if(!0===r&&Number(i)>1&&(s&&"expand"===e||!s&&"collapse"===e))return{row:this.headerStateManager?.levelToRowCoords(Number(n))??0,col:o}});this.toggleCollapsibleSection(t,e)}collapseAll(){this.toggleAllCollapsibleSections("collapse")}expandAll(){this.toggleAllCollapsibleSections("expand")}toggleCollapsibleSection(e,t){this.runOperation("expand"===t?"expand_columns":"collapse_columns",()=>this.#fd(e,t))}captureState(e){if(null===this.headerStateManager)return;let t=this.headerStateManager.getCollapsedGroupsVersion(),r=this.headerStateManager.getConfigVersion(),i=S6(e)&&e.configVersion===r;if(i&&this.#m4.get(e)===t)return e;let n=this.headerStateManager.exportCollapsedGroups(),o=i&&e.groups.length===n.length&&e.groups.every((e,t)=>e.headerLevel===n[t].headerLevel&&e.authoredColumnIndex===n[t].authoredColumnIndex)?e:{groups:n,configVersion:r};return this.#m4.set(o,t),o}getStateColumns(){return[]}restoreState(e){null!==this.headerStateManager&&S6(e)&&e.configVersion===this.headerStateManager.getConfigVersion()&&this.#fu(e.groups)}_exportViewState(){return this.enabled&&null!==this.headerStateManager?{groups:this.headerStateManager.exportCollapsedGroups()}:null}_importViewState(e){this.enabled&&this.#fu(e?.groups??[])}#fu(e){let t=this.#m6,r=this.headerStateManager;if(null===r||!t)return;let i=t.getHiddenIndexes(),n=0===e.length&&0===i.length&&0===r.exportCollapsedGroups().length?[]:en(r.importCollapsedGroups(e,this.#fc(t)),e=>this.hot.toPhysicalColumn(e));(n.length!==i.length||0!==eg(n,i).length)&&this.hot.batchExecution(()=>{t.clear(),eo(n,e=>{t.setValueAtIndex(e,!0)})},!0),this.#fh()}#fc(e){let t=this.hot.columnIndexMapper,r=t.hidingMapsCollection.get().filter(t=>t!==e);return{isVisible(e){let i=t.getPhysicalFromVisualIndex(e);return null!==i&&!r.some(e=>!0===e.getValueAtIndex(i))}}}#fd(e,t){if(void 0!==t&&S5.has(t)||tf(`Unsupported action is passed (${t}).`),!Array.isArray(e))return;let r=ei(e,({row:e})=>e<0),i=this.#fg(r,t),n=[],o=[],s=this.headerStateManager?.getVisibleWhenHiddenColumns()??[];i&&eo(r,({row:e,col:r})=>{let{affectedColumns:i,rollbackModification:s}=this.headerStateManager?.triggerNodeModification(t,e,r)??{colspanCompensation:0,affectedColumns:[],rollbackModification:()=>{}};n.push(s),i.length>0&&o.push(...i)});let l=this.getCollapsedColumns(),a=[];"collapse"===t?a=ec([...l,...o]):"expand"===t&&(a=ei(l,e=>!o.includes(e)));let h=S5.get(t);if(!1===this.hot.runHooks(h.beforeHook,l,a,i))return void eo(n,e=>{e()});this.hot.batchExecution(()=>{eo(o,e=>{this.#m6?.setValueAtIndex(this.hot.toPhysicalColumn(e),h.hideColumn)})},!0);let d=this.headerStateManager?.getVisibleWhenHiddenColumns()??[],u=eg(d,s),c=u.length>0||d.length!==s.length;c&&this.#fh(d);let g=this.getCollapsedColumns().length!==l.length||c,p="collapse"===t?ec([...o,...u]):u;g&&p.length>0&&this.#fp(p),this.hot.runHooks(h.afterHook,l,a,i,g),this.hot.render()}#fg(e,t){if(0===e.length)return!1;let r=!0;return eo(e,({row:e,col:i})=>{let{collapsible:n,isCollapsed:o}=this.headerStateManager?.getHeaderTreeNodeData(e,i)??{};if(!n||o&&"collapse"===t||!o&&"expand"===t)return r=!1,!1}),r}#fp(e){let t=this.hot.getSelectedRangeActive();if(!t)return;let{row:r,col:i}=t.highlight;if(null!==r&&null!==i&&(this.hot.rowIndexMapper.isHidden(r)||this.hot.columnIndexMapper.isHidden(i))&&e.includes(i)){let e=r>=0?this.hot.rowIndexMapper.getNearestNotHiddenIndex(r,1,!0):r,t=i>=0?this.hot.columnIndexMapper.getNearestNotHiddenIndex(i,1,!0):i;null!==e&&null!==t&&this.hot.selectCell(e,t)}}getCollapsedColumns(){return this.#m6?.getHiddenIndexes()??[]}#fh(e=this.headerStateManager?.getVisibleWhenHiddenColumns()??[]){if(!this.#m5)return;let t=this.#m5,r=en(e,e=>this.hot.toPhysicalColumn(e)),i=t.getHiddenIndexes();(r.length!==i.length||0!==eg(r,i).length)&&this.hot.batchExecution(()=>{t.clear(),eo(r,e=>{t.setValueAtIndex(e,!0)})},!0)}#fi=()=>{this.#fh()};#fn=(e,t,r,i)=>{let n=this.headerStateManager;if(!1===i||!n)return;let o=new Map(this.#fm(e,t).map((e,t)=>[e,t]));n.getCollapsedGroups().forEach(({headerLevel:e,columnIndex:t,origColspan:r})=>{if(this.#ff(t,r,o)){let r=n.levelToRowCoords(e);null!==r&&this.toggleCollapsibleSection([{row:r,col:t}],"expand")}})};#fm(e,t){let r=new Set(e),i=[];for(let e=0,t=this.hot.countCols();e<t;e++)r.has(e)||i.push(e);return[...i.slice(0,t),...e,...i.slice(t)]}#ff(e,t,r){let i=1/0,n=-1/0,o=0;for(let s=e;s<e+t;s++){let e=r.get(s);void 0!==e&&(i=Math.min(i,e),n=Math.max(n,e),o+=1)}return o>0&&n-i!=o-1}#fw(e,t,r){let i=e.firstChild;i?.nodeType===3?i.textContent!==t&&(i.textContent=t):e.insertBefore(this.hot.rootDocument.createTextNode(t),i),bt(this.hot,e,"collapsibleIndicator__icon",r)}#fy(e,t){let r=this.hot.getSettings(),i=lv(r.fixedColumnsEnd,r.fixedColumnsStart,this.hot.countCols());return!!i&&e+t-1>=this.hot.countCols()-i}#ft=(e,t,r)=>{let{collapsible:i,origColspan:n,isCollapsed:o}=this.headerStateManager?.getHeaderSettings(r,e)??{},s=!0===i&&(n??0)>1&&e>=(this.hot.getSettings().fixedColumnsStart??0)&&!this.#fy(e,n??0)&&!this.hot.view.isColumnHeaderCorner(t),l=this.hot.getSettings().ariaTags,a=t.querySelector(`.${S1}`);if(rj(t,[G("")[0]]),s){a||(rW(a=this.hot.rootDocument.createElement("div"),S1),t.querySelector("div:first-child")?.appendChild(a));let e=a;r$(e,["collapsed","expanded"]),o?(rW(e,"collapsed"),this.#fw(e,"+","collapseOn"),l&&rG(t,...G(!1))):(rW(e,"expanded"),this.#fw(e,"-","collapseOff"),l&&rG(t,...G(!0))),l&&rG(e,...F())}else a?.remove()};#fr=(e,t)=>{let r=rA(e)?.closest(`.${S1}`);r&&(rU(r,"expanded")?(this.eventManager.fireEvent(r,"mouseup"),this.toggleCollapsibleSection([t],"collapse")):rU(r,"collapsed")&&(this.eventManager.fireEvent(r,"mouseup"),this.toggleCollapsibleSection([t],"expand")),e.isImmediatePropagationEnabled=!1)};#fo=()=>{this.#m8.push(this.headerStateManager?.getCollapsedGroupsVersion()??0)};#fs=()=>{let e=this.#m8.pop(),t=this.headerStateManager;this.enabled&&null!==t&&e!==t.getCollapsedGroupsVersion()&&this.#fu(t.exportCollapsedGroups())};#fe=()=>{this.enabled&&this.hot.view&&!this.#m9&&this.#fa()};destroy(){this.#m6=null,this.#m5=null,super.destroy()}}let S8=["sortEmptyCells","indicator","headerAction","compareFunctionFactory"];class S9{sortingStates;sortEmptyCells=!1;indicator=!0;headerAction=!0;mapName;constructor(e,t){this.hot=e,this.mapName=t,this.sortingStates=this.hot.columnIndexMapper.createAndRegisterIndexMap(t,"linkedPhysicalIndexToValue")}updateAllColumnsProperties(e){tx(e)&&tI(e,(e,t)=>{S8.includes(t)&&(this[t]=e)})}resetAllColumnsProperties(){this.sortEmptyCells=!1,this.indicator=!0,this.headerAction=!0,this.compareFunctionFactory=void 0}getAllColumnsProperties(){let e={sortEmptyCells:this.sortEmptyCells,indicator:this.indicator,headerAction:this.headerAction};return"function"==typeof this.compareFunctionFactory&&(e.compareFunctionFactory=this.compareFunctionFactory),e}getSortOrderOfColumn(e){return this.sortingStates.getValueAtIndex(this.hot.toPhysicalColumn(e))?.sortOrder}getIndexOfColumnInSortQueue(e){return e=this.hot.toPhysicalColumn(e),this.sortingStates.getEntries().findIndex(([t])=>t===e)}getNumberOfSortedColumns(){return this.sortingStates.getLength()}isListOfSortedColumnsEmpty(){return 0===this.getNumberOfSortedColumns()}isColumnSorted(e){return tx(this.sortingStates.getValueAtIndex(this.hot.toPhysicalColumn(e)))}getSortStates(){return null===this.sortingStates?[]:this.sortingStates.getEntries().map(([e,t])=>({column:this.hot.toVisualColumn(e),...t}))}getColumnSortState(e){let t=this.getSortOrderOfColumn(e);if(void 0!==t)return{column:e,sortOrder:t}}setSortStates(e){this.sortingStates.clear();for(let t=0;t<e.length;t+=1){let r=e[t];this.sortingStates.setValueAtIndex(this.hot.toPhysicalColumn(r.column),{sortOrder:r.sortOrder})}}destroy(){this.hot.columnIndexMapper.unregisterMap(this.mapName),Reflect.set(this,"sortingStates",null)}}let S7=Symbol("preparedCompareFn"),ve=Symbol("preparingRootComparator");function vt(e){return e?.[S7]===!0}function vr(e,t){if(!t.some(vt))return e;let r=t.length;return e.prepare=e=>{let i=e.length;if(0===i)return null;let n=e[0].length,o=[],s=[];for(let i=0;i<r;i++){let r=t[i];vt(r)?(o.push(r.prepare(e,i+1)),s.push(r.compare)):(o.push(null),s.push(null))}for(let t=0;t<i;t++)e[t].push(t);return function(e,i){let l=e[n],a=i[n];for(let n=0;n<r;n++){let r=s[n],h=null===r?t[n](e[n+1],i[n+1]):r(o[n],l,a);if(h!==vp)return h}return vp}},e.cleanup=e=>{for(let t=0;t<e.length;t++)e[t].pop()},e[ve]=!0,e}function vi(e,t,r){if("boolean"==typeof e)return Number(e);if("string"==typeof e){let i=r.get(e);return void 0===i&&(i=ou(e,t),r.set(e,i)),i}return e}function vn(e,t,r){let i=t.locale,n=new Map,o=function(t,o){let{sortEmptyCells:s}=r,l=vi(t,i,n),a=vi(o,i,n);return l===a?vp:ej(l)?ej(a)?vp:s&&"asc"===e?vm:vf:ej(a)?s&&"asc"===e?vf:vm:function(e,t,r){let i=isNaN(e),n=isNaN(t);if(i&&!n)return"asc"===r?vf:vm;if(!i&&n)return"asc"===r?vm:vf;let o=e,s=t;i||n||(o=parseFloat(String(e)),s=parseFloat(String(t)));let l=o,a=s;return l<a?"asc"===r?vm:vf:l>a?"asc"===r?vf:vm:vp}(l,a,e)};return o.prepare=function(e,t){let r=e.length,i=Array(r);for(let n=0;n<r;n++)i[n]=e[n][t];return o.prepareValues(i)},o.prepareValues=function(e){let t=e.length,r=Array(t),n=new Uint8Array(t),o=new Uint8Array(t),s=new Float64Array(t);for(let l=0;l<t;l++){let t=e[l],a=t;"boolean"==typeof t?a=Number(t):"string"==typeof t&&(a=ou(t,i)),r[l]=a,ej(a)?n[l]=1:isNaN(a)?o[l]=1:s[l]=parseFloat(String(a))}return{normalizedValues:r,emptyFlags:n,notANumberFlags:o,numbers:s}},o.compare=function(t,i,n){let{normalizedValues:o,emptyFlags:s,notANumberFlags:l,numbers:a}=t,h=o[i],d=o[n];if(h===d)return vp;let{sortEmptyCells:u}=r;if(1===s[i])return 1===s[n]?vp:u&&"asc"===e?vm:vf;if(1===s[n])return u&&"asc"===e?vf:vm;let c=1===l[i],g=1===l[n];if(c&&!g)return"asc"===e?vf:vm;if(!c&&g)return"asc"===e?vm:vf;let p=c?h:a[i],m=c?d:a[n];return p<m?"asc"===e?vm:vf:p>m?"asc"===e?vf:vm:vp},o[S7]=!0,o}let vo="default";function vs(e,t){let r=bO(e,t),i="checked"===r?t.checkedTemplate:t.uncheckedTemplate;return null===r||void 0===i?e:i}let{register:vl,getItem:va,hasItem:vh}=nO("sorting.compareFunctionFactory"),{register:vd,getItem:vu}=nO("sorting.mainSortComparator"),vc=new Map;function vg(e){return vh(e)?va(e):va(vo)}vl("checkbox",function(e,t,r){let i=t.checkedTemplate,n=t.uncheckedTemplate,{sortEmptyCells:o}=r,s=vn(e,t,r);return function(r,l){var a,h;let d=ej(r),u=ej(l),c=d?n:vs(r,t),g=u?n:vs(l,t);if(!1===o){if(d&&!1===u)return vf;if(!1===d&&u)return vm}let p=(a=c===n||c===i,h=g===n||g===i,!1===a&&h?"asc"===e?vm:vf:a&&!1===h?"asc"===e?vf:vm:!1===a&&!1===h?s(r,l):null);return null!==p?p:c===n&&g===i?"asc"===e?vm:vf:c===i&&g===n?"asc"===e?vf:vm:vp}}),vl("date",function(e,t,r){return vR(yH,e,r)}),vl("intl-date",function(e,t,r){return vR(yH,e,r)}),vl(vo,vn),vl("numeric",function(e,t,r){return function(t,i){let n=parseFloat(t),o=parseFloat(i),{sortEmptyCells:s}=r;if(n===o||isNaN(n)&&isNaN(o))return vp;if(s){if(ej(t))return"asc"===e?vm:vf;if(ej(i))return"asc"===e?vf:vm}return isNaN(n)?vf:isNaN(o)?vm:n<o?"asc"===e?vm:vf:n>o?"asc"===e?vf:vm:vp}}),vl("time",function(e,t,r){return vR(yF,e,r)}),vl("intl-time",function(e,t,r){return vR(yF,e,r)}),vl("intl-datetime",function(e,t,r){return vR(yz,e,r)});let vp=0,vm=-1,vf=1,vw="desc",vy="colHeader";function vb(e){if(!1===tx(e))return!1;let{column:t,sortOrder:r}=e;return Number.isInteger(t)&&["asc",vw].includes(r)}function vC(e){return e===vw?void 0:"asc"===e?vw:"asc"}function vS(e){return e.querySelector(`.${vy}`)}function vv(e,t,r){if(t<0||e>=0||nu(r))return!1;if(-1===e)return!0;let i="function"==typeof rA(r)?.closest?rA(r).closest("th"):null;return null!==i&&rF(i)}function vR(e,t,r){let i=new Map,n=t=>{let r=i.get(t);return void 0===r&&(r=e(t)?.getTime()??null,i.set(t,r)),r};return function(e,i){let{sortEmptyCells:o}=r;if(e===i)return vp;if(ej(e))return ej(i)?vp:o&&"asc"===t?vm:vf;if(ej(i))return o&&"asc"===t?vf:vm;let s=n(e),l=n(i);return null===s?vf:null===l?vm:l>s?"asc"===t?vm:vf:l<s?"asc"===t?vf:vm:vp}}let vE="ascending",vT="descending",vx="indicatorDisabled",vA="columnSorting",vM="sortAction",vI=new Map([["asc",vE],[vw,vT]]);function vN(e,t){let r=t.columnSorting;return(r?.compareFunctionFactory?r.compareFunctionFactory:vg(t.type??""))(e,t,r)}function vO(e,t){let r=vN(e[0],t[0]);return vr((e,t)=>r(e[1],t[1]),[r])}let vk=Object.freeze({capability:"feat:column_sorting",name:"Column sorting",gate:"enable",tiers:Object.freeze(["standard","professional"])}),vH="columnSorting",v_="append",vP="collapsibleColumns",vD="has-sort-indicator",vL="ht-sort-indicator";vd(vH,vO),vc.set(vO,function(e,t,r){let i=vN(e[0],t[0]),n=r[0];if(vt(i)){let e=i.prepareValues(n),t=i.compare;return function(r,i){return t(e,r,i)}}return function(e,t){return i(n[e],n[t])}}),nM.getSingleton().register("beforeColumnSort"),nM.getSingleton().register("afterColumnSort");let vF=new WeakMap;class vB extends sM{static get PLUGIN_KEY(){return vH}static get PLUGIN_PRIORITY(){return 50}static get LICENSE(){return vk}columnStatesManager=null;columnMetaCache=null;#fb=null;#fC=new Set;#fS=new Map;#fv=!1;#fR=br();#fE=!1;#fT=!1;pluginKey=vH;indexesSequenceCache=null;#fx=null;constructor(e){super(e),this.hot.addHook("afterGetColHeader",this.#fA)}_getObjectSettingDefaults(){return{indicator:!0,headerAction:!0,sortEmptyCells:!1,compareFunctionFactory:void 0}}isEnabled(){return!!this.hot.getSettings()[this.pluginKey]}enablePlugin(){let e=vF.get(this.hot);if(void 0!==e&&e!==this.pluginKey){if(this.hot.getSettings()[e]){var t;this.hot.updateSettings({[this.pluginKey]:!1}),t=this.pluginKey,rn(ey`Plugins \`columnSorting\` and \`multiColumnSorting\` should not be enabled simultaneously.\x20
|