handsontable 18.0.0-rc5 → 18.0.0
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 +4 -1
- package/base.js +2 -2
- package/base.mjs +2 -2
- package/dist/handsontable.full.js +8 -8
- package/dist/handsontable.full.min.js +6 -6
- package/dist/handsontable.js +8 -8
- package/dist/handsontable.min.js +6 -6
- 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/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 +2 -2
- package/helpers/mixed.mjs +2 -2
- package/package.json +1 -1
- package/styles/handsontable.css +2 -2
- package/styles/handsontable.min.css +2 -2
- 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 +1 -1
- package/utils/licenseNotification.mjs +1 -1
|
@@ -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: 18.0.0
|
|
29
|
-
* Release date:
|
|
28
|
+
* Version: 18.0.0
|
|
29
|
+
* Release date: 30/06/2026 (built at 30/06/2026 08:45:33)
|
|
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:()=>eR,LexerDefinitionErrorType:()=>b,NoViableAltException:()=>tL,Parser:()=>ra,resolveGrammar:()=>tT,defaultParserErrorProvider:()=>tw,EarlyExitException:()=>tD,CstParser:()=>rl,Option:()=>eO,createSyntaxDiagramsCode:()=>rd,Alternation:()=>eP,assignOccurrenceIndices:()=>tM,ParserDefinitionErrorType:()=>S,GAstVisitor:()=>ez,Rule:()=>eI,defaultGrammarValidatorErrorProvider:()=>tv,defaultGrammarResolverErrorProvider:()=>tS,tokenMatcher:()=>eT,clearCache:()=>rb,RepetitionMandatory:()=>ek,Terminal:()=>eD,RepetitionMandatoryWithSeparator:()=>e_,createTokenInstance:()=>eE,RepetitionWithSeparator:()=>eL,defaultLexerErrorProvider:()=>ea,MismatchedTokenException:()=>tH,Repetition:()=>eH,tokenLabel:()=>ed,validateGrammar:()=>tA,NotAllInputParsedException:()=>tP,tokenName:()=>eu,Lexer:()=>eh,generateParserModule:()=>rC,NonTerminal:()=>eN,EMPTY_ALT:()=>rs,generateParserFactory:()=>rf,EmbeddedActionsParser:()=>rh,isRecognitionException:()=>t_,createToken:()=>eS,serializeGrammar:()=>eF,Flat:()=>ex,serializeProduction:()=>eV,VERSION:()=>R});var n,o,i,s,a,l,h,d,u,c,g,p,m,f,C,b,y,w,S,R="6.5.0",E=r(642),T=r(713),A={},M=new T.RegExpParser;function N(e){var t=e.toString();if(A.hasOwnProperty(t))return A[t];var r=M.pattern(t);return A[t]=r,r}var I=(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)}),x="Complement Sets are not supported for first char optimization",O='Unable to use "first char" lexer optimizations:\n';function k(e,t,r){var n=Q(e);t[n]=n,!0===r&&function(e,t){var r=String.fromCharCode(e),n=r.toUpperCase();if(n!==r){var o=Q(n.charCodeAt(0));t[o]=o}else{var i=r.toLowerCase();if(i!==r){var o=Q(i.charCodeAt(0));t[o]=o}}}(e,t)}function _(e,t){return(0,E.I6)(e.value,function(e){return"number"==typeof e?(0,E.gR)(t,e):void 0!==(0,E.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 I(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,E.gR)(this.targetCharCodes,e.value)&&(this.found=!0)},t.prototype.visitSet=function(e){e.complement?void 0===_(e,this.targetCharCodes)&&(this.found=!0):void 0!==_(e,this.targetCharCodes)&&(this.found=!0)},t}(T.BaseRegExpVisitor);function L(e,t){if(!(t instanceof RegExp))return void 0!==(0,E.I6)(t,function(t){return(0,E.gR)(e,t.charCodeAt(0))});var r=N(t),n=new H(e);return n.visit(r),n.found}var P=(o=function(e,t){return(o=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}o(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),D="PATTERN",F="defaultMode",V="modes",B="boolean"==typeof RegExp("(?:)").sticky,U=/[^\\][\$]/,z=/[^\\[][\^]|^\^/;function W(e){var t=e.ignoreCase?"i":"";return RegExp("^(?:"+e.source+")",t)}function G(e){var t=e.ignoreCase?"iy":"y";return RegExp(""+e.source,t)}function $(e){var t=e.PATTERN;if((0,E.gd)(t))return!1;if((0,E.Tn)(t))return!0;if((0,E.zy)(t,"exec"))return!0;if((0,E.Kg)(t))return!1;throw Error("non exhaustive match")}function j(e){return!!(0,E.Kg)(e)&&1===e.length&&e.charCodeAt(0)}var Y={test:function(e){for(var t=e.length,r=this.lastIndex;r<t;r++){var n=e.charCodeAt(r);if(10===n)return this.lastIndex=r+1,!0;if(13===n)return 10===e.charCodeAt(r+1)?this.lastIndex=r+2:this.lastIndex=r+1,!0}return!1},lastIndex:0};function q(e,t){if((0,E.zy)(e,"LINE_BREAKS"))return!1;if((0,E.gd)(e.PATTERN)){try{L(t,e.PATTERN)}catch(e){return{issue:b.IDENTIFY_TERMINATOR,errMsg:e.message}}return!1}if((0,E.Kg)(e.PATTERN))return!1;if($(e))return{issue:b.CUSTOM_LINE_BREAK};throw Error("non exhaustive match")}function K(e){return(0,E.Tj)(e,function(e){return(0,E.Kg)(e)&&e.length>0?e.charCodeAt(0):e})}function X(e,t,r){void 0===e[t]?e[t]=[r]:e[t].push(r)}function Q(e){return e<256?e:Z[e]}var Z=[];function J(e,t){var r=e.tokenTypeIdx;return r===t.tokenTypeIdx||!0===t.isParent&&!0===t.categoryMatchesMap[r]}function ee(e,t){return e.tokenTypeIdx===t.tokenTypeIdx}var et=1,er={};function en(e){var t,r,n,o=function(e){for(var t=(0,E.T9)(e),r=e,n=!0;n;){r=(0,E.oE)((0,E.Bq)((0,E.Tj)(r,function(e){return e.CATEGORIES})));var o=(0,E.iv)(r,t);t=t.concat(o),(0,E.Im)(o)?n=!1:r=o}return t}(e);t=o,(0,E.jJ)(t,function(e){var t,r;eo(e)||(er[et]=e,e.tokenTypeIdx=et++),ei(e)&&!(0,E.cy)(e.CATEGORIES)&&(e.CATEGORIES=[e.CATEGORIES]),ei(e)||(e.CATEGORIES=[]),t=e,(0,E.zy)(t,"categoryMatches")||(e.categoryMatches=[]),r=e,(0,E.zy)(r,"categoryMatchesMap")||(e.categoryMatchesMap={})}),r=o,(0,E.jJ)(r,function(e){!function e(t,r){(0,E.jJ)(t,function(e){r.categoryMatchesMap[e.tokenTypeIdx]=!0}),(0,E.jJ)(r.CATEGORIES,function(n){var o=t.concat(r);(0,E.gR)(o,n)||e(o,n)})}([],e)}),n=o,(0,E.jJ)(n,function(e){e.categoryMatches=[],(0,E.jJ)(e.categoryMatchesMap,function(t,r){e.categoryMatches.push(er[r].tokenTypeIdx)})}),(0,E.jJ)(o,function(e){e.isParent=e.categoryMatches.length>0})}function eo(e){return(0,E.zy)(e,"tokenTypeIdx")}function ei(e){return(0,E.zy)(e,"CATEGORIES")}function es(e){return(0,E.zy)(e,"tokenTypeIdx")}var ea={buildUnableToPopLexerModeMessage:function(e){return"Unable to pop Lexer Mode after encountering Token ->"+e.image+"<- The Mode Stack is empty"},buildUnexpectedCharactersMessage:function(e,t,r,n,o){return"unexpected character: ->"+e.charAt(t)+"<- at offset: "+t+", skipped "+r+" characters."}};(i=b||(b={}))[i.MISSING_PATTERN=0]="MISSING_PATTERN",i[i.INVALID_PATTERN=1]="INVALID_PATTERN",i[i.EOI_ANCHOR_FOUND=2]="EOI_ANCHOR_FOUND",i[i.UNSUPPORTED_FLAGS_FOUND=3]="UNSUPPORTED_FLAGS_FOUND",i[i.DUPLICATE_PATTERNS_FOUND=4]="DUPLICATE_PATTERNS_FOUND",i[i.INVALID_GROUP_TYPE_FOUND=5]="INVALID_GROUP_TYPE_FOUND",i[i.PUSH_MODE_DOES_NOT_EXIST=6]="PUSH_MODE_DOES_NOT_EXIST",i[i.MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE=7]="MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE",i[i.MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY=8]="MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY",i[i.MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST=9]="MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST",i[i.LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED=10]="LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED",i[i.SOI_ANCHOR_FOUND=11]="SOI_ANCHOR_FOUND",i[i.EMPTY_MATCH_PATTERN=12]="EMPTY_MATCH_PATTERN",i[i.NO_LINE_BREAKS_FLAGS=13]="NO_LINE_BREAKS_FLAGS",i[i.UNREACHABLE_PATTERN=14]="UNREACHABLE_PATTERN",i[i.IDENTIFY_TERMINATOR=15]="IDENTIFY_TERMINATOR",i[i.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:ea,traceInitPerf:!1,skipValidations:!1};Object.freeze(el);var eh=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,E.h1)(el,t);var n=this.config.traceInitPerf;!0===n?(this.traceInitMaxIdent=1/0,this.traceInitPerf=!0):"number"==typeof n&&(this.traceInitMaxIdent=n,this.traceInitPerf=!0),this.traceInitIndent=-1,this.TRACE_INIT("Lexer Constructor",function(){var n,o=!0;r.TRACE_INIT("Lexer Config handling",function(){if(r.config.lineTerminatorsPattern===el.lineTerminatorsPattern)r.config.lineTerminatorsPattern=Y;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,E.cy)(e)?((n={modes:{}}).modes[F]=(0,E.T9)(e),n[F]=F):(o=!1,n=(0,E.lR)(e))}),!1===r.config.skipValidations&&(r.TRACE_INIT("performRuntimeChecks",function(){var e,t;r.lexerDefinitionErrors=r.lexerDefinitionErrors.concat((e=n,r.trackStartLines,r.config.lineTerminatorCharacters,t=[],(0,E.zy)(e,F)||t.push({message:"A MultiMode Lexer cannot be initialized without a <"+F+"> property in its definition\n",type:b.MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE}),(0,E.zy)(e,V)||t.push({message:"A MultiMode Lexer cannot be initialized without a <"+V+"> property in its definition\n",type:b.MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY}),(0,E.zy)(e,V)&&(0,E.zy)(e,F)&&!(0,E.zy)(e.modes,e.defaultMode)&&t.push({message:"A MultiMode Lexer cannot be initialized with a "+F+": <"+e.defaultMode+">which does not exist\n",type:b.MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST}),(0,E.zy)(e,V)&&(0,E.jJ)(e.modes,function(e,r){(0,E.jJ)(e,function(e,n){(0,E.b0)(e)&&t.push({message:"A Lexer cannot be initialized using an undefined Token Type. Mode:"+("<"+r+"> at index: <")+n+">\n",type:b.LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED})})}),t))}),r.TRACE_INIT("performWarningRuntimeChecks",function(){var e,t,o,i,s,a,l,h;r.lexerDefinitionWarning=r.lexerDefinitionWarning.concat((e=n,t=r.trackStartLines,o=r.config.lineTerminatorCharacters,i=[],s=!1,a=(0,E.oE)((0,E.Bq)((0,E.LG)(e.modes,function(e){return e}))),l=(0,E.ku)(a,function(e){return e[D]===eh.NA}),h=K(o),t&&(0,E.jJ)(l,function(e){var t=q(e,h);if(!1!==t){var r={message:function(e,t){if(t.issue===b.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===b.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};i.push(r)}else(0,E.zy)(e,"LINE_BREAKS")?!0===e.LINE_BREAKS&&(s=!0):L(h,e.PATTERN)&&(s=!0)}),t&&!s&&i.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:b.NO_LINE_BREAKS_FLAGS}),i))})),n.modes=n.modes?n.modes:{},(0,E.jJ)(n.modes,function(e,t){n.modes[t]=(0,E.ku)(e,function(e){return(0,E.b0)(e)})});var i=(0,E.HP)(n.modes);if((0,E.jJ)(n.modes,function(e,n){r.TRACE_INIT("Mode: <"+n+"> processing",function(){if(r.modes.push(n),!1===r.config.skipValidations&&r.TRACE_INIT("validatePatterns",function(){var t,n,o,s,a,l,h,d,u,c,g,p,m,f,C,y,w,S,R,A,M,I,x,O,k,_,H,L,F,V,B,W,G;r.lexerDefinitionErrors=r.lexerDefinitionErrors.concat((t=[],a=e,l=(0,E.pb)(a,function(e){return!(0,E.zy)(e,D)}),n={errors:(0,E.Tj)(l,function(e){return{message:"Token Type: ->"+e.name+"<- missing static 'PATTERN' property",type:b.MISSING_PATTERN,tokenTypes:[e]}}),valid:(0,E.iv)(a,l)},t=t.concat(n.errors),s=(h=n.valid,d=(0,E.pb)(h,function(e){var t=e[D];return!(0,E.gd)(t)&&!(0,E.Tn)(t)&&!(0,E.zy)(t,"exec")&&!(0,E.Kg)(t)}),o={errors:(0,E.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:b.INVALID_PATTERN,tokenTypes:[e]}}),valid:(0,E.iv)(h,d)}).valid,t=(t=(t=(t=(t=t.concat(o.errors)).concat((u=s,c=[],g=(0,E.pb)(u,function(e){return(0,E.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}(T.BaseRegExpVisitor),f=(0,E.pb)(p,function(e){var t=e[D];try{var r=N(t),n=new m;return n.visit(r),n.found}catch(e){return U.test(t.source)}}),(0,E.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:b.EOI_ANCHOR_FOUND,tokenTypes:[e]}})))).concat((C=g,y=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}(T.BaseRegExpVisitor),w=(0,E.pb)(C,function(e){var t=e[D];try{var r=N(t),n=new y;return n.visit(r),n.found}catch(e){return z.test(t.source)}}),(0,E.Tj)(w,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:b.SOI_ANCHOR_FOUND,tokenTypes:[e]}})))).concat((S=g,R=(0,E.pb)(S,function(e){var t=e[D];return t instanceof RegExp&&(t.multiline||t.global)}),(0,E.Tj)(R,function(e){return{message:"Token Type: ->"+e.name+"<- static 'PATTERN' may NOT contain global('g') or multiline('m')",type:b.UNSUPPORTED_FLAGS_FOUND,tokenTypes:[e]}})))).concat((A=g,M=[],I=(0,E.Tj)(A,function(e){return(0,E.TS)(A,function(t,r){return e.PATTERN.source!==r.PATTERN.source||(0,E.gR)(M,r)||r.PATTERN===eh.NA||(M.push(r),t.push(r)),t},[])}),I=(0,E.oE)(I),x=(0,E.pb)(I,function(e){return e.length>1}),(0,E.Tj)(x,function(e){var t=(0,E.Tj)(e,function(e){return e.name});return{message:"The same RegExp pattern ->"+(0,E.$1)(e).PATTERN+"<-has been used in all of the following Token Types: "+t.join(", ")+" <-",type:b.DUPLICATE_PATTERNS_FOUND,tokenTypes:e}})))).concat((O=g,k=(0,E.pb)(O,function(e){return e[D].test("")}),(0,E.Tj)(k,function(e){return{message:"Token Type: ->"+e.name+"<- static 'PATTERN' must not match an empty string",type:b.EMPTY_MATCH_PATTERN,tokenTypes:[e]}})))))).concat((_=s,H=(0,E.pb)(_,function(e){if(!(0,E.zy)(e,"GROUP"))return!1;var t=e.GROUP;return t!==eh.SKIPPED&&t!==eh.NA&&!(0,E.Kg)(t)}),(0,E.Tj)(H,function(e){return{message:"Token Type: ->"+e.name+"<- static 'GROUP' can only be Lexer.SKIPPED/Lexer.NA/A String",type:b.INVALID_GROUP_TYPE_FOUND,tokenTypes:[e]}})))).concat((L=s,F=i,V=(0,E.pb)(L,function(e){return void 0!==e.PUSH_MODE&&!(0,E.gR)(F,e.PUSH_MODE)}),(0,E.Tj)(V,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:b.PUSH_MODE_DOES_NOT_EXIST,tokenTypes:[e]}})))).concat((B=s,W=[],G=(0,E.TS)(B,function(e,t,r){var n,o=t.PATTERN;return o===eh.NA||((0,E.Kg)(o)?e.push({str:o,idx:r,tokenType:t}):(0,E.gd)(o)&&(n=o,void 0===(0,E.I6)([".","\\","[","]","|","^","$","(",")","?","*","+","{"],function(e){return -1!==n.source.indexOf(e)}))&&e.push({str:o.source,idx:r,tokenType:t})),e},[]),(0,E.jJ)(B,function(e,t){(0,E.jJ)(G,function(r){var n=r.str,o=r.idx,i=r.tokenType;if(t<o&&function(e,t){if((0,E.gd)(t)){var r=t.exec(e);return null!==r&&0===r.index}if((0,E.Tn)(t))return t(e,0,[],{});if((0,E.zy)(t,"exec"))return t.exec(e,0,[],{});if("string"==typeof t)return t===e;throw Error("non exhaustive match")}(n,e.PATTERN)){var s="Token: ->"+i.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";W.push({message:s,type:b.UNREACHABLE_PATTERN,tokenTypes:[e,i]})}})}),W))))}),(0,E.Im)(r.lexerDefinitionErrors)){var o;en(e),r.TRACE_INIT("analyzeTokenTypes",function(){var n,i,s,a,l,h,d,u,c,g,p,m,f,C,b,y,w;n={lineTerminatorCharacters:r.config.lineTerminatorCharacters,positionTracking:t.positionTracking,ensureOptimizations:t.ensureOptimizations,safeMode:t.safeMode,tracer:r.TRACE_INIT.bind(r)},(C=(n=(0,E.NT)(n,{useSticky:B,debug:!1,safeMode:!1,positionTracking:"full",lineTerminatorCharacters:["\r","\n"],tracer:function(e,t){return t()}})).tracer)("initCharCodeToOptimizedIndexMap",function(){if((0,E.Im)(Z)){Z=Array(65536);for(var e=0;e<65536;e++)Z[e]=e>255?255+~~(e/255):e}}),C("Reject Lexer.NA",function(){i=(0,E.ku)(e,function(e){return e[D]===eh.NA})}),b=!1,C("Transform Patterns",function(){b=!1,s=(0,E.Tj)(i,function(e){var t=e[D];if((0,E.gd)(t)){var r=t.source;return 1===r.length&&"^"!==r&&"$"!==r&&"."!==r?r:2!==r.length||"\\"!==r[0]||(0,E.gR)(["d","D","s","S","t","r","n","t","0","c","b","B","f","v","w","W"],r[1])?n.useSticky?G(t):W(t):r[1]}if((0,E.Tn)(t))return b=!0,{exec:t};if((0,E.zy)(t,"exec"))return b=!0,t;if("string"==typeof t)if(1===t.length)return t;else{var o=new RegExp(t.replace(/[\\^$.*+?()[\]{}|]/g,"\\$&"));return n.useSticky?G(o):W(o)}throw Error("non exhaustive match")})}),C("misc mapping",function(){a=(0,E.Tj)(i,function(e){return e.tokenTypeIdx}),l=(0,E.Tj)(i,function(e){var t=e.GROUP;if(t!==eh.SKIPPED){if((0,E.Kg)(t))return t;if((0,E.b0)(t))return!1;throw Error("non exhaustive match")}}),h=(0,E.Tj)(i,function(e){var t=e.LONGER_ALT;if(t)return(0,E.qh)(i,t)}),d=(0,E.Tj)(i,function(e){return e.PUSH_MODE}),u=(0,E.Tj)(i,function(e){return(0,E.zy)(e,"POP_MODE")})}),C("Line Terminator Handling",function(){var e=K(n.lineTerminatorCharacters);c=(0,E.Tj)(i,function(e){return!1}),"onlyOffset"!==n.positionTracking&&(c=(0,E.Tj)(i,function(t){return(0,E.zy)(t,"LINE_BREAKS")?t.LINE_BREAKS:!1===q(t,e)?L(e,t.PATTERN):void 0}))}),C("Misc Mapping #2",function(){g=(0,E.Tj)(i,$),p=(0,E.Tj)(s,j),m=(0,E.TS)(i,function(e,t){var r=t.GROUP;return(0,E.Kg)(r)&&r!==eh.SKIPPED&&(e[r]=[]),e},{}),f=(0,E.Tj)(s,function(e,t){return{pattern:s[t],longerAlt:h[t],canLineTerminator:c[t],isCustom:g[t],short:p[t],group:l[t],push:d[t],pop:u[t],tokenTypeIdx:a[t],tokenType:i[t]}})}),y=!0,w=[],n.safeMode||C("First Char Optimization",function(){w=(0,E.TS)(i,function(e,t,r){if("string"==typeof t.PATTERN){var o;X(e,Q(t.PATTERN.charCodeAt(0)),f[r])}else if((0,E.cy)(t.START_CHARS_HINT))(0,E.jJ)(t.START_CHARS_HINT,function(t){var n=Q("string"==typeof t?t.charCodeAt(0):t);o!==n&&(o=n,X(e,n,f[r]))});else if((0,E.gd)(t.PATTERN))if(t.PATTERN.unicode)y=!1,n.ensureOptimizations&&(0,E.Zi)(""+O+" 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 i=function(e,t){void 0===t&&(t=!1);try{var r=N(e);return function e(t,r,n){switch(t.type){case"Disjunction":for(var o=0;o<t.value.length;o++)e(t.value[o],r,n);break;case"Alternative":for(var i=t.value,o=0;o<i.length;o++){var s=i[o];switch(s.type){case"EndAnchor":case"GroupBackReference":case"Lookahead":case"NegativeLookahead":case"StartAnchor":case"WordBoundary":case"NonWordBoundary":continue}switch(s.type){case"Character":k(s.value,r,n);break;case"Set":if(!0===s.complement)throw Error(x);(0,E.jJ)(s.value,function(e){if("number"==typeof e)k(e,r,n);else if(!0===n)for(var t=e.from;t<=e.to;t++)k(t,r,n);else{for(var t=e.from;t<=e.to&&t<256;t++)k(t,r,n);if(e.to>=256)for(var o=e.from>=256?e.from:256,i=e.to,s=Q(o),a=Q(i),l=s;l<=a;l++)r[l]=l}});break;case"Group":e(s.value,r,n);break;default:throw Error("Non Exhaustive Match")}var a=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,E.cy)(t.value)?(0,E.Si)(t.value,e):e(t.value))}(s)||"Group"!==s.type&&!1===a)break}break;default:throw Error("non exhaustive match!")}return(0,E.zu)(r)}(r.value,{},r.flags.ignoreCase)}catch(r){if(r.message===x)t&&(0,E.x5)(""+O+" 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 n="";t&&(n="\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,E.Zi)(O+"\n Failed parsing: < "+e.toString()+" >\n Using the regexp-to-ast library version: "+T.VERSION+"\n Please open an issue at: https://github.com/bd82/regexp-to-ast/issues"+n)}}return[]}(t.PATTERN,n.ensureOptimizations);(0,E.Im)(i)&&(y=!1),(0,E.jJ)(i,function(t){X(e,t,f[r])})}else n.ensureOptimizations&&(0,E.Zi)(""+O+" 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"),y=!1;return e},[])}),C("ArrayPacking",function(){w=(0,E.VS)(w)}),o={emptyGroups:m,patternIdxToConfig:f,charCodeToPatternIdxToConfig:w,hasCustom:b,canBeOptimized:y}}),r.patternIdxToConfig[n]=o.patternIdxToConfig,r.charCodeToPatternIdxToConfig[n]=o.charCodeToPatternIdxToConfig,r.emptyGroups=(0,E.h1)(r.emptyGroups,o.emptyGroups),r.hasCustom=o.hasCustom||r.hasCustom,r.canModeBeOptimized[n]=o.canBeOptimized}})}),r.defaultMode=n.defaultMode,!(0,E.Im)(r.lexerDefinitionErrors)&&!r.config.deferDefinitionErrorsHandling)throw Error("Errors detected in definition of Lexer:\n"+(0,E.Tj)(r.lexerDefinitionErrors,function(e){return e.message}).join("-----------------------\n"));(0,E.jJ)(r.lexerDefinitionWarning,function(e){(0,E.x5)(e.message)}),r.TRACE_INIT("Choosing sub-methods implementations",function(){if(B?(r.chopInput=E.zK,r.match=r.matchWithTest):(r.updateLastIndex=E.tE,r.match=r.matchWithExec),o&&(r.handleModes=E.tE),!1===r.trackStartLines&&(r.computeNewColumn=E.zK),!1===r.trackEndLines&&(r.updateTokenEndLineColumnLocation=E.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,E.TS)(r.canModeBeOptimized,function(e,t,r){return!1===t&&e.push(r),e},[]);if(t.ensureOptimizations&&!(0,E.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(){A={}}),r.TRACE_INIT("toFastProperties",function(){(0,E.Bl)(r)})})}return e.prototype.tokenize=function(e,t){if(void 0===t&&(t=this.defaultMode),!(0,E.Im)(this.lexerDefinitionErrors))throw Error("Unable to Tokenize because Errors detected in definition of Lexer:\n"+(0,E.Tj)(this.lexerDefinitionErrors,function(e){return e.message}).join("-----------------------\n"));return this.tokenizeInternal(e,t)},e.prototype.tokenizeInternal=function(e,t){var r,n,o,i,s,a,l,h,d,u,c,g,p,m,f,C,b,y,w=this,S=e,R=S.length,T=0,A=0,M=Array(this.hasCustom?0:Math.floor(e.length/10)),N=[],I=this.trackStartLines?1:void 0,x=this.trackStartLines?1:void 0,O=(r=this.emptyGroups,n={},o=(0,E.HP)(r),(0,E.jJ)(o,function(e){var t=r[e];if((0,E.cy)(t))n[e]=[];else throw Error("non exhaustive match")}),n),k=this.trackStartLines,_=this.config.lineTerminatorsPattern,H=0,L=[],P=[],D=[],F=[];Object.freeze(F);var V=void 0;function B(){return L}function U(e){var t=P[Q(e)];return void 0===t?F:t}var z=function(e){if(1===D.length&&void 0===e.tokenType.PUSH_MODE){var t=w.config.errorMessageProvider.buildUnableToPopLexerModeMessage(e);N.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,E.HV)(D);L=w.patternIdxToConfig[r],P=w.charCodeToPatternIdxToConfig[r],H=L.length;var n=w.canModeBeOptimized[r]&&!1===w.config.safeMode;V=P&&n?U:B}};function W(e){D.push(e),P=this.charCodeToPatternIdxToConfig[e],H=(L=this.patternIdxToConfig[e]).length,H=L.length;var t=this.canModeBeOptimized[e]&&!1===this.config.safeMode;V=P&&t?U:B}for(W.call(this,t);T<R;){h=null;var G=S.charCodeAt(T),$=V(G),j=$.length;for(i=0;i<j;i++){var Y=(y=$[i]).pattern;d=null;var q=y.short;if(!1!==q?G===q&&(h=Y):!0===y.isCustom?null!==(b=Y.exec(S,T,M,O))?(h=b[0],void 0!==b.payload&&(d=b.payload)):h=null:(this.updateLastIndex(Y,T),h=this.match(Y,e,T)),null!==h){if(void 0!==(l=y.longerAlt)){var K=L[l],X=K.pattern;u=null,!0===K.isCustom?null!==(b=X.exec(S,T,M,O))?(a=b[0],void 0!==b.payload&&(u=b.payload)):a=null:(this.updateLastIndex(X,T),a=this.match(X,e,T)),a&&a.length>h.length&&(h=a,d=u,y=K)}break}}if(null!==h){if(c=h.length,void 0!==(g=y.group)&&(p=y.tokenTypeIdx,m=this.createTokenInstance(h,T,p,y.tokenType,I,x,c),this.handlePayload(m,d),!1===g?A=this.addToken(M,A,m):O[g].push(m)),e=this.chopInput(e,c),T+=c,x=this.computeNewColumn(x,c),!0===k&&!0===y.canLineTerminator){var Z=0,J=void 0,ee=void 0;_.lastIndex=0;do!0===(J=_.test(h))&&(ee=_.lastIndex-1,Z++);while(!0===J);0!==Z&&(I+=Z,x=c-ee,this.updateTokenEndLineColumnLocation(m,g,ee,Z,I,x,c))}this.handleModes(y,z,W,m)}else{for(var et=T,er=I,en=x,eo=!1;!eo&&T<R;)for(S.charCodeAt(T),e=this.chopInput(e,1),T++,s=0;s<H;s++){var ei=L[s],Y=ei.pattern,q=ei.short;if(!1!==q?S.charCodeAt(T)===q&&(eo=!0):!0===ei.isCustom?eo=null!==Y.exec(S,T,M,O):(this.updateLastIndex(Y,T),eo=null!==Y.exec(e)),!0===eo)break}f=T-et,C=this.config.errorMessageProvider.buildUnexpectedCharactersMessage(S,et,f,er,en),N.push({offset:et,line:er,column:en,length:f,message:C})}}return this.hasCustom||(M.length=A),{tokens:M,groups:O,errors:N}},e.prototype.handleModes=function(e,t,r,n){if(!0===e.pop){var o=e.push;t(n),void 0!==o&&r.call(this,o)}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,n,o,i,s){var a,l;void 0!==t&&(l=(a=r===s-1)?-1:0,(1!==n||!0!==a)&&(e.endLine=o+l,e.endColumn=i-1+-l))},e.prototype.computeNewColumn=function(e,t){return e+t},e.prototype.createTokenInstance=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return null},e.prototype.createOffsetOnlyToken=function(e,t,r,n){return{image:e,startOffset:t,tokenTypeIdx:r,tokenType:n}},e.prototype.createStartOnlyToken=function(e,t,r,n,o,i){return{image:e,startOffset:t,startLine:o,startColumn:i,tokenTypeIdx:r,tokenType:n}},e.prototype.createFullToken=function(e,t,r,n,o,i,s){return{image:e,startOffset:t,endOffset:t+s-1,startLine:o,endLine:o,startColumn:i,endColumn:i+s-1,tokenTypeIdx:r,tokenType:n}},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 n=(0,E.O1)(t),o=n.time,i=n.value,s=o>10?console.warn:console.log;return this.traceInitIndent<this.traceInitMaxIdent&&s(r+"<-- <"+e+"> time: "+o+"ms"),this.traceInitIndent--,i},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 ed(e){return ec(e)?e.LABEL:e.name}function eu(e){return e.name}function ec(e){return(0,E.Kg)(e.LABEL)&&""!==e.LABEL}var eg="categories",ep="label",em="group",ef="push_mode",eC="pop_mode",eb="longer_alt",ey="line_breaks",ew="start_chars_hint";function eS(e){return ev(e)}function ev(e){var t=e.pattern,r={};if(r.name=e.name,(0,E.b0)(t)||(r.PATTERN=t),(0,E.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,E.zy)(e,eg)&&(r.CATEGORIES=e[eg]),en([r]),(0,E.zy)(e,ep)&&(r.LABEL=e[ep]),(0,E.zy)(e,em)&&(r.GROUP=e[em]),(0,E.zy)(e,eC)&&(r.POP_MODE=e[eC]),(0,E.zy)(e,ef)&&(r.PUSH_MODE=e[ef]),(0,E.zy)(e,eb)&&(r.LONGER_ALT=e[eb]),(0,E.zy)(e,ey)&&(r.LINE_BREAKS=e[ey]),(0,E.zy)(e,ew)&&(r.START_CHARS_HINT=e[ew]),r}var eR=ev({name:"EOF",pattern:eh.NA});function eE(e,t,r,n,o,i,s,a){return{image:t,startOffset:r,endOffset:n,startLine:o,endLine:i,startColumn:s,endColumn:a,tokenTypeIdx:e.tokenTypeIdx,tokenType:e}}function eT(e,t){return J(e,t)}en([eR]);var eA=(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)}),eM=function(){function e(e){this.definition=e}return e.prototype.accept=function(e){e.visit(this),(0,E.jJ)(this.definition,function(t){t.accept(e)})},e}(),eN=function(e){function t(t){var r=e.call(this,[])||this;return r.idx=1,(0,E.kp)(r,(0,E.Up)(t,function(e){return void 0!==e})),r}return eA(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}(eM),eI=function(e){function t(t){var r=e.call(this,t.definition)||this;return r.orgText="",(0,E.kp)(r,(0,E.Up)(t,function(e){return void 0!==e})),r}return eA(t,e),t}(eM),ex=function(e){function t(t){var r=e.call(this,t.definition)||this;return r.ignoreAmbiguities=!1,(0,E.kp)(r,(0,E.Up)(t,function(e){return void 0!==e})),r}return eA(t,e),t}(eM),eO=function(e){function t(t){var r=e.call(this,t.definition)||this;return r.idx=1,(0,E.kp)(r,(0,E.Up)(t,function(e){return void 0!==e})),r}return eA(t,e),t}(eM),ek=function(e){function t(t){var r=e.call(this,t.definition)||this;return r.idx=1,(0,E.kp)(r,(0,E.Up)(t,function(e){return void 0!==e})),r}return eA(t,e),t}(eM),e_=function(e){function t(t){var r=e.call(this,t.definition)||this;return r.idx=1,(0,E.kp)(r,(0,E.Up)(t,function(e){return void 0!==e})),r}return eA(t,e),t}(eM),eH=function(e){function t(t){var r=e.call(this,t.definition)||this;return r.idx=1,(0,E.kp)(r,(0,E.Up)(t,function(e){return void 0!==e})),r}return eA(t,e),t}(eM),eL=function(e){function t(t){var r=e.call(this,t.definition)||this;return r.idx=1,(0,E.kp)(r,(0,E.Up)(t,function(e){return void 0!==e})),r}return eA(t,e),t}(eM),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,E.kp)(r,(0,E.Up)(t,function(e){return void 0!==e})),r}return eA(t,e),t}(eM),eD=function(){function e(e){this.idx=1,(0,E.kp)(this,(0,E.Up)(e,function(e){return void 0!==e}))}return e.prototype.accept=function(e){e.visit(this)},e}();function eF(e){return(0,E.Tj)(e,eV)}function eV(e){function t(e){return(0,E.Tj)(e,eV)}if(e instanceof eN)return{type:"NonTerminal",name:e.nonTerminalName,idx:e.idx};if(e instanceof ex)return{type:"Flat",definition:t(e.definition)};if(e instanceof eO)return{type:"Option",idx:e.idx,definition:t(e.definition)};if(e instanceof ek)return{type:"RepetitionMandatory",name:e.name,idx:e.idx,definition:t(e.definition)};if(e instanceof e_)return{type:"RepetitionMandatoryWithSeparator",name:e.name,idx:e.idx,separator:eV(new eD({terminalType:e.separator})),definition:t(e.definition)};else if(e instanceof eL)return{type:"RepetitionWithSeparator",name:e.name,idx:e.idx,separator:eV(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:ed(e.terminalType),idx:e.idx},n=e.terminalType.PATTERN;return e.terminalType.PATTERN&&(r.pattern=(0,E.gd)(n)?n.source:n),r}else if(e instanceof eI)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,E.jJ)(e.definition,function(n,o){var i=(0,E.gv)(e.definition,o+1);if(n instanceof eN)r.walkProdRef(n,i,t);else if(n instanceof eD)r.walkTerminal(n,i,t);else if(n instanceof ex)r.walkFlat(n,i,t);else if(n instanceof eO)r.walkOption(n,i,t);else if(n instanceof ek)r.walkAtLeastOne(n,i,t);else if(n instanceof e_)r.walkAtLeastOneSep(n,i,t);else if(n instanceof eL)r.walkManySep(n,i,t);else if(n instanceof eH)r.walkMany(n,i,t);else if(n instanceof eP)r.walkOr(n,i,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 n=t.concat(r);this.walk(e,n)},e.prototype.walkOption=function(e,t,r){var n=t.concat(r);this.walk(e,n)},e.prototype.walkAtLeastOne=function(e,t,r){var n=[new eO({definition:e.definition})].concat(t,r);this.walk(e,n)},e.prototype.walkAtLeastOneSep=function(e,t,r){var n=eU(e,t,r);this.walk(e,n)},e.prototype.walkMany=function(e,t,r){var n=[new eO({definition:e.definition})].concat(t,r);this.walk(e,n)},e.prototype.walkManySep=function(e,t,r){var n=eU(e,t,r);this.walk(e,n)},e.prototype.walkOr=function(e,t,r){var n=this,o=t.concat(r);(0,E.jJ)(e.definition,function(e){var t=new ex({definition:[e]});n.walk(t,o)})},e}();function eU(e,t,r){return[new eO({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 eN:return this.visitNonTerminal(e);case ex:return this.visitFlat(e);case eO:return this.visitOption(e);case ek:return this.visitRepetitionMandatory(e);case e_:return this.visitRepetitionMandatoryWithSeparator(e);case eL:return this.visitRepetitionWithSeparator(e);case eH:return this.visitRepetition(e);case eP:return this.visitAlternation(e);case eD:return this.visitTerminal(e);case eI: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}(),eW=(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)});function eG(e,t){return void 0===t&&(t=[]),e instanceof eO||e instanceof eH||e instanceof eL||(e instanceof eP?(0,E.zN)(e.definition,function(e){return eG(e,t)}):!(e instanceof eN&&(0,E.gR)(t,e))&&e instanceof eM&&(e instanceof eN&&t.push(e),(0,E.Si)(e.definition,function(e){return eG(e,t)})))}function e$(e){if(e instanceof eN)return"SUBRULE";if(e instanceof eO)return"OPTION";if(e instanceof eP)return"OR";if(e instanceof ek)return"AT_LEAST_ONE";if(e instanceof e_)return"AT_LEAST_ONE_SEP";else if(e instanceof eL)return"MANY_SEP";else if(e instanceof eH)return"MANY";else if(e instanceof eD)return"CONSUME";else throw Error("non exhaustive match")}var ej=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 eW(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,E.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,E.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),eY=new ej;function eq(e){if(e instanceof eN)return eq(e.referencedRule);if(e instanceof eD)return[e.terminalType];if(e instanceof ex||e instanceof eO||e instanceof eH||e instanceof ek||e instanceof e_||e instanceof eL||e instanceof eD||e instanceof eI)return function(e){for(var t,r=[],n=e.definition,o=0,i=n.length>o,s=!0;i&&s;)s=eG(t=n[o]),r=r.concat(eq(t)),o+=1,i=n.length>o;return(0,E.sb)(r)}(e);if(e instanceof eP){var t,r;return t=e,r=(0,E.Tj)(t.definition,function(e){return eq(e)}),(0,E.sb)((0,E.Bq)(r))}throw Error("non exhaustive match")}var eK="_~IN~_",eX=(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)}),eQ=function(e){function t(t){var r=e.call(this)||this;return r.topProd=t,r.follows={},r}return eX(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 n,o,i=(n=e.referencedRule,o=e.idx,n.name+o+eK+this.topProd.name),s=eq(new ex({definition:t.concat(r)}));this.follows[i]=s},t}(eB),eZ=(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 eJ(e,t){!0===isNaN(e.startOffset)?(e.startOffset=t.startOffset,e.endOffset=t.endOffset):e.endOffset<t.endOffset==!0&&(e.endOffset=t.endOffset)}function e0(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 e1(e,t,r){void 0===e.children[t]?e.children[t]=[r]:e.children[t].push(r)}var e2=function(e){function t(t){var r=e.call(this)||this;return r.result=[],r.ruleIdx=t,r}return eZ(t,e),t.prototype.collectNamedDSLMethod=function(e,t,r){if(!(0,E.b0)(e.name)){var n,o=void 0;if(e instanceof eO||e instanceof eH||e instanceof ek||e instanceof eP)o=new t({definition:e.definition,idx:e.idx});else if(e instanceof e_||e instanceof eL)o=new t({definition:e.definition,idx:e.idx,separator:e.separator});else throw Error("non exhaustive match");var i=[o],s=(n=this.ruleIdx,e.idx|r|n);this.result.push({def:i,key:s,name:e.name,orgProd:e})}},t.prototype.visitOption=function(e){this.collectNamedDSLMethod(e,eO,512)},t.prototype.visitRepetition=function(e){this.collectNamedDSLMethod(e,eH,768)},t.prototype.visitRepetitionMandatory=function(e){this.collectNamedDSLMethod(e,ek,1024)},t.prototype.visitRepetitionMandatoryWithSeparator=function(e){this.collectNamedDSLMethod(e,e_,1536)},t.prototype.visitRepetitionWithSeparator=function(e){this.collectNamedDSLMethod(e,eL,1280)},t.prototype.visitAlternation=function(e){var t=this;this.collectNamedDSLMethod(e,eP,256);var r=e.definition.length>1;(0,E.jJ)(e.definition,function(n,o){if(!(0,E.b0)(n.name)){var i,s,a=n.definition;a=r?[new eO({definition:n.definition})]:n.definition;var l=(i=t.ruleIdx,s=e.idx,256|s|i|o+1<<24);t.result.push({def:a,key:l,name:n.name,orgProd:n})}})},t}(ez),e3=(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)}),e6=function(e){function t(t,r){var n=e.call(this,t,r)||this;return n.path=r,n.nextTerminalName="",n.nextTerminalOccurrence=0,n.nextTerminalName=n.path.lastTok.name,n.nextTerminalOccurrence=n.path.lastTokOccurrence,n}return e3(t,e),t.prototype.walkTerminal=function(e,t,r){if(this.isAtEndOfPath&&e.terminalType.name===this.nextTerminalName&&e.idx===this.nextTerminalOccurrence&&!this.found){var n=new ex({definition:t.concat(r)});this.possibleTokTypes=eq(n),this.found=!0}},t}(function(e){function t(t,r){var n=e.call(this)||this;return n.topProd=t,n.path=r,n.possibleTokTypes=[],n.nextProductionName="",n.nextProductionOccurrence=0,n.found=!1,n.isAtEndOfPath=!1,n}return e3(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,E.T9)(this.path.ruleStack).reverse(),this.occurrenceStack=(0,E.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 n=t.concat(r);this.updateExpectedNext(),this.walk(e.referencedRule,n)}},t.prototype.updateExpectedNext=function(){(0,E.Im)(this.ruleStack)?(this.nextProductionName="",this.nextProductionOccurrence=0,this.isAtEndOfPath=!0):(this.nextProductionName=this.ruleStack.pop(),this.nextProductionOccurrence=this.occurrenceStack.pop())},t}(eB)),e5=function(e){function t(t,r){var n=e.call(this)||this;return n.topRule=t,n.occurrence=r,n.result={token:void 0,occurrence:void 0,isEndOfRule:void 0},n}return e3(t,e),t.prototype.startWalking=function(){return this.walk(this.topRule),this.result},t}(eB),e4=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return e3(t,e),t.prototype.walkMany=function(t,r,n){if(t.idx===this.occurrence){var o=(0,E.$1)(r.concat(n));this.result.isEndOfRule=void 0===o,o instanceof eD&&(this.result.token=o.terminalType,this.result.occurrence=o.idx)}else e.prototype.walkMany.call(this,t,r,n)},t}(e5),e9=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return e3(t,e),t.prototype.walkManySep=function(t,r,n){if(t.idx===this.occurrence){var o=(0,E.$1)(r.concat(n));this.result.isEndOfRule=void 0===o,o instanceof eD&&(this.result.token=o.terminalType,this.result.occurrence=o.idx)}else e.prototype.walkManySep.call(this,t,r,n)},t}(e5),e7=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return e3(t,e),t.prototype.walkAtLeastOne=function(t,r,n){if(t.idx===this.occurrence){var o=(0,E.$1)(r.concat(n));this.result.isEndOfRule=void 0===o,o instanceof eD&&(this.result.token=o.terminalType,this.result.occurrence=o.idx)}else e.prototype.walkAtLeastOne.call(this,t,r,n)},t}(e5),e8=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return e3(t,e),t.prototype.walkAtLeastOneSep=function(t,r,n){if(t.idx===this.occurrence){var o=(0,E.$1)(r.concat(n));this.result.isEndOfRule=void 0===o,o instanceof eD&&(this.result.token=o.terminalType,this.result.occurrence=o.idx)}else e.prototype.walkAtLeastOneSep.call(this,t,r,n)},t}(e5);function te(e,t,r){void 0===r&&(r=[]),r=(0,E.T9)(r);var n=[],o=0;function i(i){var s=te(i.concat((0,E.gv)(e,o+1)),t,r);return n.concat(s)}for(;r.length<t&&o<e.length;){var s=e[o];if(s instanceof ex)return i(s.definition);if(s instanceof eN)return i(s.definition);if(s instanceof eO)n=i(s.definition);else if(s instanceof ek){var a=s.definition.concat([new eH({definition:s.definition})]);return i(a)}else if(s instanceof e_){var a=[new ex({definition:s.definition}),new eH({definition:[new eD({terminalType:s.separator})].concat(s.definition)})];return i(a)}else if(s instanceof eL){var a=s.definition.concat([new eH({definition:[new eD({terminalType:s.separator})].concat(s.definition)})]);n=i(a)}else if(s instanceof eH){var a=s.definition.concat([new eH({definition:s.definition})]);n=i(a)}else if(s instanceof eP)return(0,E.jJ)(s.definition,function(e){n=i(e.definition)}),n;else if(s instanceof eD)r.push(s.terminalType);else throw Error("non exhaustive match");o++}return n.push({partialPath:r,suffixDef:(0,E.gv)(e,o)}),n}function tt(e,t,r,n){var o="EXIT_NONE_TERMINAL",i=[o],s="EXIT_ALTERNATIVE",a=!1,l=t.length,h=l-n-1,d=[],u=[];for(u.push({idx:-1,def:e,ruleStack:[],occurrenceStack:[]});!(0,E.Im)(u);){var c=u.pop();if(c===s){a&&(0,E.HV)(u).idx<=h&&u.pop();continue}var g=c.def,p=c.idx,m=c.ruleStack,f=c.occurrenceStack;if(!(0,E.Im)(g)){var C=g[0];if(C===o){var b={idx:p,def:(0,E.gv)(g),ruleStack:(0,E.gc)(m),occurrenceStack:(0,E.gc)(f)};u.push(b)}else if(C instanceof eD)if(p<l-1){var y=p+1;if(r(t[y],C.terminalType)){var b={idx:y,def:(0,E.gv)(g),ruleStack:m,occurrenceStack:f};u.push(b)}}else if(p===l-1)d.push({nextTokenType:C.terminalType,nextTokenOccurrence:C.idx,ruleStack:m,occurrenceStack:f}),a=!0;else throw Error("non exhaustive match");else if(C instanceof eN){var w=(0,E.T9)(m);w.push(C.nonTerminalName);var S=(0,E.T9)(f);S.push(C.idx);var b={idx:p,def:C.definition.concat(i,(0,E.gv)(g)),ruleStack:w,occurrenceStack:S};u.push(b)}else if(C instanceof eO){var R={idx:p,def:(0,E.gv)(g),ruleStack:m,occurrenceStack:f};u.push(R),u.push(s);var T={idx:p,def:C.definition.concat((0,E.gv)(g)),ruleStack:m,occurrenceStack:f};u.push(T)}else if(C instanceof ek){var A=new eH({definition:C.definition,idx:C.idx}),M=C.definition.concat([A],(0,E.gv)(g)),b={idx:p,def:M,ruleStack:m,occurrenceStack:f};u.push(b)}else if(C instanceof e_){var N=new eD({terminalType:C.separator}),A=new eH({definition:[N].concat(C.definition),idx:C.idx}),M=C.definition.concat([A],(0,E.gv)(g)),b={idx:p,def:M,ruleStack:m,occurrenceStack:f};u.push(b)}else if(C instanceof eL){var R={idx:p,def:(0,E.gv)(g),ruleStack:m,occurrenceStack:f};u.push(R),u.push(s);var N=new eD({terminalType:C.separator}),I=new eH({definition:[N].concat(C.definition),idx:C.idx}),M=C.definition.concat([I],(0,E.gv)(g)),T={idx:p,def:M,ruleStack:m,occurrenceStack:f};u.push(T)}else if(C instanceof eH){var R={idx:p,def:(0,E.gv)(g),ruleStack:m,occurrenceStack:f};u.push(R),u.push(s);var I=new eH({definition:C.definition,idx:C.idx}),M=C.definition.concat([I],(0,E.gv)(g)),T={idx:p,def:M,ruleStack:m,occurrenceStack:f};u.push(T)}else if(C instanceof eP)for(var x=C.definition.length-1;x>=0;x--){var O={idx:p,def:C.definition[x].definition.concat((0,E.gv)(g)),ruleStack:m,occurrenceStack:f};u.push(O),u.push(s)}else if(C instanceof ex)u.push({idx:p,def:C.definition.concat((0,E.gv)(g)),ruleStack:m,occurrenceStack:f});else if(C instanceof eI)u.push(function(e,t,r,n){var o=(0,E.T9)(r);o.push(e.name);var i=(0,E.T9)(n);return i.push(1),{idx:t,def:e.definition,ruleStack:o,occurrenceStack:i}}(C,p,m,f));else throw Error("non exhaustive match")}}return d}var tr=(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=y||(y={}))[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 tn=function(e){function t(t,r,n){var o=e.call(this)||this;return o.topProd=t,o.targetOccurrence=r,o.targetProdType=n,o}return tr(t,e),t.prototype.startWalking=function(){return this.walk(this.topProd),this.restDef},t.prototype.checkIsTarget=function(e,t,r,n){return e.idx===this.targetOccurrence&&this.targetProdType===t&&(this.restDef=r.concat(n),!0)},t.prototype.walkOption=function(t,r,n){this.checkIsTarget(t,y.OPTION,r,n)||e.prototype.walkOption.call(this,t,r,n)},t.prototype.walkAtLeastOne=function(t,r,n){this.checkIsTarget(t,y.REPETITION_MANDATORY,r,n)||e.prototype.walkOption.call(this,t,r,n)},t.prototype.walkAtLeastOneSep=function(t,r,n){this.checkIsTarget(t,y.REPETITION_MANDATORY_WITH_SEPARATOR,r,n)||e.prototype.walkOption.call(this,t,r,n)},t.prototype.walkMany=function(t,r,n){this.checkIsTarget(t,y.REPETITION,r,n)||e.prototype.walkOption.call(this,t,r,n)},t.prototype.walkManySep=function(t,r,n){this.checkIsTarget(t,y.REPETITION_WITH_SEPARATOR,r,n)||e.prototype.walkOption.call(this,t,r,n)},t}(eB),to=function(e){function t(t,r,n){var o=e.call(this)||this;return o.targetOccurrence=t,o.targetProdType=r,o.targetRef=n,o.result=[],o}return tr(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,y.OPTION)},t.prototype.visitRepetition=function(e){this.checkIsTarget(e,y.REPETITION)},t.prototype.visitRepetitionMandatory=function(e){this.checkIsTarget(e,y.REPETITION_MANDATORY)},t.prototype.visitRepetitionMandatoryWithSeparator=function(e){this.checkIsTarget(e,y.REPETITION_MANDATORY_WITH_SEPARATOR)},t.prototype.visitRepetitionWithSeparator=function(e){this.checkIsTarget(e,y.REPETITION_WITH_SEPARATOR)},t.prototype.visitAlternation=function(e){this.checkIsTarget(e,y.ALTERNATION)},t}(ez);function ti(e){for(var t=Array(e),r=0;r<e;r++)t[r]=[];return t}function ts(e){for(var t=[""],r=0;r<e.length;r++){for(var n=e[r],o=[],i=0;i<t.length;i++){var s=t[i];o.push(s+"_"+n.tokenTypeIdx);for(var a=0;a<n.categoryMatches.length;a++){var l="_"+n.categoryMatches[a];o.push(s+l)}}t=o}return t}function ta(e,t){for(var r=(0,E.Tj)(e,function(e){return te([e],1)}),n=ti(r.length),o=(0,E.Tj)(r,function(e){var t={};return(0,E.jJ)(e,function(e){var r=ts(e.partialPath);(0,E.jJ)(r,function(e){t[e]=!0})}),t}),i=r,s=1;s<=t;s++){var a=i;i=ti(a.length);for(var l=function(e){for(var r=a[e],l=0;l<r.length;l++){var h=r[l].partialPath,d=r[l].suffixDef,u=ts(h);if(function(e,t,r){for(var n=0;n<e.length;n++)if(n!==r){for(var o=e[n],i=0;i<t.length;i++)if(!0===o[t[i]])return!1}return!0}(o,u,e)||(0,E.Im)(d)||h.length===t){var c=n[e];if(!1===td(c,h)){c.push(h);for(var g=0;g<u.length;g++){var p=u[g];o[e][p]=!0}}}else{var m=te(d,s+1,h);i[e]=i[e].concat(m),(0,E.jJ)(m,function(t){var r=ts(t.partialPath);(0,E.jJ)(r,function(t){o[e][t]=!0})})}}},h=0;h<a.length;h++)l(h)}return n}function tl(e,t,r,n){var o=new to(e,y.ALTERNATION,n);return t.accept(o),ta(o.result,r)}function th(e,t,r,n){var o=new to(e,r);t.accept(o);var i=o.result,s=new tn(t,e,r).startWalking();return ta([new ex({definition:i}),new ex({definition:s})],n)}function td(e,t){e:for(var r=0;r<e.length;r++){var n=e[r];if(n.length===t.length){for(var o=0;o<n.length;o++){var i=t[o],s=n[o];if(!1==(i===s||void 0!==s.categoryMatchesMap[i.tokenTypeIdx]))continue e}return!0}}return!1}function tu(e){return(0,E.Si)(e,function(e){return(0,E.Si)(e,function(e){return(0,E.Si)(e,function(e){return(0,E.Im)(e.categoryMatches)})})})}var tc=(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 tg(e){return e$(e)+"_#_"+e.idx+"_#_"+tp(e)}function tp(e){return e instanceof eD?e.terminalType.name:e instanceof eN?e.nonTerminalName:""}var tm=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.allProductions=[],t}return tc(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),tf=/^[a-zA-Z_]\w*$/,tC=new RegExp(tf.source.replace("^","^\\$")),tb=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.alternations=[],t}return tc(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 tc(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),tw={buildMismatchTokenMessage:function(e){var t=e.expected,r=e.actual;return e.previous,e.ruleName,"Expecting "+(ec(t)?"--\x3e "+ed(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,n=(e.previous,e.customUserDescription);e.ruleName;var o="Expecting: ",i="\nbut found: '"+(0,E.$1)(r).image+"'";if(n)return o+n+i;var s=(0,E.TS)(t,function(e,t){return e.concat(t)},[]),a=(0,E.Tj)(s,function(e){return"["+(0,E.Tj)(e,function(e){return ed(e)}).join(", ")+"]"});return o+"one of these possible Token sequences:\n"+(0,E.Tj)(a,function(e,t){return" "+(t+1)+". "+e}).join("\n")+i},buildEarlyExitMessage:function(e){var t=e.expectedIterationPaths,r=e.actual,n=e.customUserDescription;e.ruleName;var o="Expecting: ",i="\nbut found: '"+(0,E.$1)(r).image+"'";return n?o+n+i:o+("expecting at least one iteration which starts with one of these possible Token sequences::\n <"+(0,E.Tj)(t,function(e){return"["+(0,E.Tj)(e,function(e){return ed(e)}).join(",")+"]"}).join(" ,"))+">"+i}};Object.freeze(tw);var tS={buildRuleNotFoundError:function(e,t){return"Invalid grammar, reference to a rule which is not defined: ->"+t.nonTerminalName+"<-\ninside top level rule: ->"+e.name+"<-"}},tv={buildDuplicateFoundError:function(e,t){var r=e.name,n=(0,E.$1)(t),o=n.idx,i=e$(n),s=n instanceof eD?n.terminalType.name:n instanceof eN?n.nonTerminalName:"",a="->"+i+(o>0?o:"")+"<- "+(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(a=a.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: ->"+tC.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,E.$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,E.Tj)(e.prefixPath,function(e){return ed(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,E.Tj)(e.prefixPath,function(e){return ed(e)}).join(", "),r=0===e.alternation.idx?"":e.alternation.idx,n="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 n+"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 "+E.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 eI?e.topLevelRule.name:e.topLevelRule)+"<- is already defined in the grammar: ->"+e.grammarName+"<-"}},tR=(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)}),tE=function(e){function t(t,r){var n=e.call(this)||this;return n.nameToTopRule=t,n.errMsgProvider=r,n.errors=[],n}return tR(t,e),t.prototype.resolveRefs=function(){var e=this;(0,E.jJ)((0,E.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 tT(e){e=(0,E.NT)(e,{errMsgProvider:tS});var t,r={};return(0,E.jJ)(e.rules,function(e){r[e.name]=e}),(t=new tE(r,e.errMsgProvider)).resolveRefs(),t.errors}function tA(e){var t,r,n,o,i,s,a,l,h,d,u,c,g,p,m,f,C,b,w,R,T,A,M,N,I,x,O,k,_,H,L,P,D;return t=(e=(0,E.NT)(e,{errMsgProvider:tv,ignoredIssues:{}})).rules,r=e.maxLookahead,n=e.tokenTypes,o=e.ignoredIssues,i=e.errMsgProvider,s=e.grammarName,a=E.Tj(t,function(e){var t,r,n,o,s,a;return t=e,r=i,n=new tm,t.accept(n),o=n.allProductions,s=E.$z(o,tg),a=E.Up(s,function(e){return e.length>1}),E.Tj(E.zu(a),function(e){var n=E.$1(e),o=r.buildDuplicateFoundError(t,e),i=e$(n),s={message:o,type:S.DUPLICATE_PRODUCTIONS,ruleName:t.name,dslName:i,occurrence:n.idx},a=tp(n);return a&&(s.parameter=a),s})}),l=E.Tj(t,function(e){return function e(t,r,n,o){void 0===o&&(o=[]);var i=[],s=function e(t){var r=[];if(E.Im(t))return r;var n=E.$1(t);if(n instanceof eN)r.push(n.referencedRule);else if(n instanceof ex||n instanceof eO||n instanceof ek||n instanceof e_||n instanceof eL||n instanceof eH)r=r.concat(e(n.definition));else if(n instanceof eP)r=E.Bq(E.Tj(n.definition,function(t){return e(t.definition)}));else if(n instanceof eD);else throw Error("non exhaustive match");var o=eG(n),i=t.length>1;if(!o||!i)return r;var s=E.gv(t);return r.concat(e(s))}(r.definition);if(E.Im(s))return[];var a=t.name;E.gR(s,t)&&i.push({message:n.buildLeftRecursionError({topLevelRule:t,leftRecursionPath:o}),type:S.LEFT_RECURSION,ruleName:a});var l=E.iv(s,o.concat([t])),h=E.Tj(l,function(r){var i=E.T9(o);return i.push(r),e(t,r,n,i)});return i.concat(E.Bq(h))}(e,e,i)}),h=[],d=[],u=[],(0,E.Si)(l,E.Im)&&(h=(0,E.Tj)(t,function(e){var t,r,n,o;return t=e,r=i,n=new tb,t.accept(n),o=n.alternations,E.TS(o,function(e,n){var o=E.gc(n.definition),i=E.Tj(o,function(e,o){var i=tt([e],[],null,1);return E.Im(i)?{message:r.buildEmptyAlternationError({topLevelRule:t,alternation:n,emptyChoiceIdx:o}),type:S.NONE_LAST_EMPTY_ALT,ruleName:t.name,occurrence:n.idx,alternative:o+1}:null});return e.concat(E.oE(i))},[])}),d=(0,E.Tj)(t,function(e){var t,n,s,a,l,h,d;return t=e,n=r,s=o,a=i,l=new tb,t.accept(l),h=l.alternations,(d=s[t.name])&&(h=(0,E.ku)(h,function(e){return d[e$(e)+(0===e.idx?"":e.idx)]})),h=(0,E.ku)(h,function(e){return!0===e.ignoreAmbiguities}),E.TS(h,function(e,r){var o,i,s,l,h,d,u,c,g,p,m,f,C=tl(r.idx,t,r.maxLookahead||n,r),b=(o=C,i=r,s=t,l=a,h=[],d=(0,E.TS)(o,function(e,t,r){return!0===i.definition[r].ignoreAmbiguities||(0,E.jJ)(t,function(t){var n=[r];(0,E.jJ)(o,function(e,o){r!==o&&td(e,t)&&!0!==i.definition[o].ignoreAmbiguities&&n.push(o)}),n.length>1&&!td(h,t)&&(h.push(t),e.push({alts:n,path:t}))}),e},[]),E.Tj(d,function(e){var t=(0,E.Tj)(e.alts,function(e){return e+1});return{message:l.buildAlternationAmbiguityError({topLevelRule:s,alternation:i,ambiguityIndices:t,prefixPath:e.path}),type:S.AMBIGUOUS_ALTS,ruleName:s.name,occurrence:i.idx,alternatives:[e.alts]}})),y=(u=C,c=r,g=t,p=a,m=[],f=(0,E.TS)(u,function(e,t,r){var n=(0,E.Tj)(t,function(e){return{idx:r,path:e}});return e.concat(n)},[]),(0,E.jJ)(f,function(e){if(!0!==c.definition[e.idx].ignoreAmbiguities){var t=e.idx,r=e.path,n=(0,E.JW)(f,function(e){var n;return!0!==c.definition[e.idx].ignoreAmbiguities&&e.idx<t&&(n=e.path,n.length<r.length&&(0,E.Si)(n,function(e,t){var n=r[t];return e===n||n.categoryMatchesMap[e.tokenTypeIdx]}))}),o=(0,E.Tj)(n,function(e){var r=[e.idx+1,t+1],n=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:n,alternatives:r}});m=m.concat(o)}}),m);return e.concat(b,y)},[])}),w=t,R=r,T=i,A=[],(0,E.jJ)(w,function(e){var t=new ty;e.accept(t);var r=t.allProductions;(0,E.jJ)(r,function(t){var r=function(e){if(e instanceof eO)return y.OPTION;if(e instanceof eH)return y.REPETITION;if(e instanceof ek)return y.REPETITION_MANDATORY;if(e instanceof e_)return y.REPETITION_MANDATORY_WITH_SEPARATOR;if(e instanceof eL)return y.REPETITION_WITH_SEPARATOR;else if(e instanceof eP)return y.ALTERNATION;else throw Error("non exhaustive match")}(t),n=t.maxLookahead||R,o=th(t.idx,e,r,n)[0];if((0,E.Im)((0,E.Bq)(o))){var i=T.buildEmptyRepetitionError({topLevelRule:e,repetition:t});A.push({message:i,type:S.NO_NON_EMPTY_LOOKAHEAD,ruleName:e.name})}})}),u=A),M=t,N=n,I=i,x=[],O=(0,E.Tj)(N,function(e){return e.name}),(0,E.jJ)(M,function(e){var t=e.name;if((0,E.gR)(O,t)){var r=I.buildNamespaceConflictError(e);x.push({message:r,type:S.CONFLICT_TOKENS_RULES_NAMESPACE,ruleName:t})}}),c=x,g=E.Tj(n,function(e){var t,r,n;return t=e,r=i,n=[],t.name.match(tf)||n.push({message:r.buildTokenNameError({tokenType:t,expectedPattern:tf}),type:S.INVALID_TOKEN_NAME}),n}),k=t,_=i,H=[],(0,E.jJ)(k,function(e){var t=new e2("");e.accept(t);var r=(0,E.Tj)(t.result,function(e){return e.orgProd});H.push((0,E.Tj)(r,function(t){var r,n,o,i;return r=e,n=t,o=_,i=[],n.name.match(tC)||i.push({message:o.buildInvalidNestedRuleNameError(r,n),type:S.INVALID_NESTED_RULE_NAME,ruleName:r.name}),i}))}),p=(0,E.Bq)(H),L=t,P=i,D=[],(0,E.jJ)(L,function(e){var t=new e2("");e.accept(t);var r=(0,E.$z)(t.result,function(e){return e.name}),n=(0,E.Up)(r,function(e){return e.length>1});(0,E.jJ)((0,E.zu)(n),function(t){var r=(0,E.Tj)(t,function(e){return e.orgProd}),n=P.buildDuplicateNestedRuleNameError(e,r);D.push({message:n,type:S.DUPLICATE_NESTED_NAME,ruleName:e.name})})}),m=D,f=(0,E.Tj)(t,function(e){var t,r,n,o;return t=e,r=i,n=new tb,t.accept(n),o=n.alternations,E.TS(o,function(e,n){return n.definition.length>255&&e.push({message:r.buildTooManyAlternativesError({topLevelRule:t,alternation:n}),type:S.TOO_MANY_ALTS,ruleName:t.name,occurrence:n.idx}),e},[])}),C=(0,E.Tj)(t,function(e){var t,r,n,o;return t=e,r=i,n=[],(o=t.name).match(tf)||n.push({message:r.buildInvalidRuleNameError({topLevelRule:t,expectedPattern:tf}),type:S.INVALID_RULE_NAME,ruleName:o}),n}),b=(0,E.Tj)(t,function(e){var r=e,n=t,o=s,a=i,l=[];if((0,E.TS)(n,function(e,t){return t.name===r.name?e+1:e},0)>1){var h=a.buildDuplicateRuleNameError({topLevelRule:r,grammarName:o});l.push({message:h,type:S.DUPLICATE_RULE_NAME,ruleName:r.name})}return l}),E.Bq(a.concat(g,p,m,u,l,h,d,c,f,C,b))}function tM(e){(0,E.jJ)(e.rules,function(e){var t=new ej;e.accept(t),(0,E.jJ)(t.dslMethods,function(e){(0,E.jJ)(e,function(e,t){e.idx=t+1})})})}var tN="MismatchedTokenException",tI="NoViableAltException",tx="EarlyExitException",tO="NotAllInputParsedException",tk=[tN,tI,tx,tO];function t_(e){return(0,E.gR)(tk,e.name)}function tH(e,t,r){this.name=tN,this.message=e,this.token=t,this.previousToken=r,this.resyncedTokens=[]}function tL(e,t,r){this.name=tI,this.message=e,this.token=t,this.previousToken=r,this.resyncedTokens=[]}function tP(e,t){this.name=tO,this.message=e,this.token=t,this.resyncedTokens=[]}function tD(e,t,r){this.name=tx,this.message=e,this.token=t,this.previousToken=r,this.resyncedTokens=[]}Object.freeze(tk),tH.prototype=Error.prototype,tL.prototype=Error.prototype,tP.prototype=Error.prototype,tD.prototype=Error.prototype;var tF={},tV="InRuleRecoveryException";function tB(e){this.name=tV,this.message=e}tB.prototype=Error.prototype;var tU=function(){function e(){}return e.prototype.initRecoverable=function(e){this.firstAfterRepMap={},this.resyncFollows={},this.recoveryEnabled=(0,E.zy)(e,"recoveryEnabled")?e.recoveryEnabled:ro.recoveryEnabled,this.recoveryEnabled&&(this.attemptInRepetitionRecovery=tz)},e.prototype.getTokenToInsert=function(e){var t=eE(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,n){for(var o=this,i=this.findReSyncTokenType(),s=this.exportLexerState(),a=[],l=!1,h=this.LA(1),d=this.LA(1),u=function(){var e=o.LA(0),t=new tH(o.errorMessageProvider.buildMismatchTokenMessage({expected:n,actual:h,previous:e,ruleName:o.getCurrRuleFullName()}),h,o.LA(0));t.resyncedTokens=(0,E.gc)(a),o.SAVE_ERROR(t)};!l;)if(this.tokenMatcher(d,n))return void u();else if(r.call(this)){u(),e.apply(this,t);return}else this.tokenMatcher(d,i)?l=!0:(d=this.SKIP_TOKEN(),this.addToResyncTokens(d,a));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,E.Im)(t))return!1;var n=this.LA(1);return void 0!==(0,E.I6)(t,function(e){return r.tokenMatcher(n,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,E.gR)(r,e)},e.prototype.findReSyncTokenType=function(){for(var e=this.flattenFollowSet(),t=this.LA(1),r=2;;){var n=t.tokenType;if((0,E.gR)(e,n))return n;t=this.LA(r),r++}},e.prototype.getCurrFollowKey=function(){if(1===this.RULE_STACK.length)return tF;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,E.Im)(this.LAST_EXPLICIT_RULE_STACK)||(t=(0,E.Tj)(this.LAST_EXPLICIT_RULE_STACK,function(t){return e.RULE_STACK[t]}),r=(0,E.Tj)(this.LAST_EXPLICIT_RULE_STACK,function(t){return e.RULE_OCCURRENCE_STACK[t]})),(0,E.Tj)(t,function(n,o){return 0===o?tF:{ruleName:e.shortRuleNameToFullName(n),idxInCallingRule:r[o],inRule:e.shortRuleNameToFullName(t[o-1])}})},e.prototype.flattenFollowSet=function(){var e=this,t=(0,E.Tj)(this.buildFullFollowKeyStack(),function(t){return e.getFollowSetFromFollowKey(t)});return(0,E.Bq)(t)},e.prototype.getFollowSetFromFollowKey=function(e){if(e===tF)return[eR];var t=e.ruleName+e.idxInCallingRule+eK+e.inRule;return this.resyncFollows[t]},e.prototype.addToResyncTokens=function(e,t){return this.tokenMatcher(e,eR)||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,E.gc)(t)},e.prototype.attemptInRepetitionRecovery=function(e,t,r,n,o,i,s){},e.prototype.getCurrentGrammarPath=function(e,t){return{ruleStack:this.getHumanReadableRuleStack(),occurrenceStack:(0,E.T9)(this.RULE_OCCURRENCE_STACK),lastTok:e,lastTokOccurrence:t}},e.prototype.getHumanReadableRuleStack=function(){var e=this;return(0,E.Im)(this.LAST_EXPLICIT_RULE_STACK)?(0,E.Tj)(this.RULE_STACK,function(t){return e.shortRuleNameToFullName(t)}):(0,E.Tj)(this.LAST_EXPLICIT_RULE_STACK,function(t){return e.shortRuleNameToFullName(e.RULE_STACK[t])})},e}();function tz(e,t,r,n,o,i,s){var a=this.getKeyForAutomaticLookahead(n,o),l=this.firstAfterRepMap[a];if(void 0===l){var h=this.getCurrRuleFullName();l=new i(this.getGAstProductions()[h],o).startWalking(),this.firstAfterRepMap[a]=l}var d=l.token,u=l.occurrence,c=l.isEndOfRule;1===this.RULE_STACK.length&&c&&void 0===d&&(d=eR,u=1),this.shouldInRepetitionRecoveryBeTried(d,u,s)&&this.tryInRepetitionRecovery(e,t,r,d)}var tW=function(){function e(){}return e.prototype.initLooksAhead=function(e){this.dynamicTokensEnabled=(0,E.zy)(e,"dynamicTokensEnabled")?e.dynamicTokensEnabled:ro.dynamicTokensEnabled,this.maxLookahead=(0,E.zy)(e,"maxLookahead")?e.maxLookahead:ro.maxLookahead,this.lookAheadFuncsCache=(0,E.rF)()?new Map:[],(0,E.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,E.jJ)(e,function(e){t.TRACE_INIT(e.name+" Rule Lookahead",function(){var r,n=(eY.reset(),e.accept(eY),r=eY.dslMethods,eY.reset(),r),o=n.alternation,i=n.repetition,s=n.option,a=n.repetitionMandatory,l=n.repetitionMandatoryWithSeparator,h=n.repetitionWithSeparator;(0,E.jJ)(o,function(r){var n=0===r.idx?"":r.idx;t.TRACE_INIT(""+e$(r)+n,function(){var n,o,i,s,a,l,h,d,u=(n=r.idx,o=r.maxLookahead||t.maxLookahead,i=r.hasPredicates,s=t.dynamicTokensEnabled,a=t.lookAheadBuilderForAlternatives,h=tu(l=tl(n,e,o))?ee:J,a(l,i,h,s)),c=(d=t.fullRuleNameToShort[e.name],256|r.idx|d);t.setLaFuncCache(c,u)})}),(0,E.jJ)(i,function(r){t.computeLookaheadFunc(e,r.idx,768,y.REPETITION,r.maxLookahead,e$(r))}),(0,E.jJ)(s,function(r){t.computeLookaheadFunc(e,r.idx,512,y.OPTION,r.maxLookahead,e$(r))}),(0,E.jJ)(a,function(r){t.computeLookaheadFunc(e,r.idx,1024,y.REPETITION_MANDATORY,r.maxLookahead,e$(r))}),(0,E.jJ)(l,function(r){t.computeLookaheadFunc(e,r.idx,1536,y.REPETITION_MANDATORY_WITH_SEPARATOR,r.maxLookahead,e$(r))}),(0,E.jJ)(h,function(r){t.computeLookaheadFunc(e,r.idx,1280,y.REPETITION_WITH_SEPARATOR,r.maxLookahead,e$(r))})})})},e.prototype.computeLookaheadFunc=function(e,t,r,n,o,i){var s=this;this.TRACE_INIT(""+i+(0===t?"":t),function(){var i,a,l,h,d,u=(i=o||s.maxLookahead,a=s.dynamicTokensEnabled,l=s.lookAheadBuilderForOptional,d=tu(h=th(t,e,n,i))?ee:J,l(h[0],d,a)),c=t|r|s.fullRuleNameToShort[e.name];s.setLaFuncCache(c,u)})},e.prototype.lookAheadBuilderForOptional=function(e,t,r){return function(e,t,r){var n=(0,E.Si)(e,function(e){return 1===e.length}),o=e.length;if(!n||r)return function(){t:for(var r=0;r<o;r++){for(var n=e[r],i=n.length,s=0;s<i;s++)if(!1===t(this.LA(s+1),n[s]))continue t;return!0}return!1};var i=(0,E.Bq)(e);if(1===i.length&&(0,E.Im)(i[0].categoryMatches)){var s=i[0].tokenTypeIdx;return function(){return this.LA(1).tokenTypeIdx===s}}var a=(0,E.TS)(i,function(e,t,r){return e[t.tokenTypeIdx]=!0,(0,E.jJ)(t.categoryMatches,function(t){e[t]=!0}),e},[]);return function(){return!0===a[this.LA(1).tokenTypeIdx]}}(e,t,r)},e.prototype.lookAheadBuilderForAlternatives=function(e,t,r,n){var o=e.length,i=(0,E.Si)(e,function(e){return(0,E.Si)(e,function(e){return 1===e.length})});if(t)return function(t){for(var n=(0,E.Tj)(t,function(e){return e.GATE}),i=0;i<o;i++){var s=e[i],a=s.length,l=n[i];if(void 0===l||!1!==l.call(this))t:for(var h=0;h<a;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 i}}};if(!i||n)return function(){for(var t=0;t<o;t++){var n=e[t],i=n.length;t:for(var s=0;s<i;s++){for(var a=n[s],l=a.length,h=0;h<l;h++)if(!1===r(this.LA(h+1),a[h]))continue t;return t}}};var s=(0,E.Tj)(e,function(e){return(0,E.Bq)(e)}),a=(0,E.TS)(s,function(e,t,r){return(0,E.jJ)(t,function(t){(0,E.zy)(e,t.tokenTypeIdx)||(e[t.tokenTypeIdx]=r),(0,E.jJ)(t.categoryMatches,function(t){(0,E.zy)(e,t)||(e[t]=r)})}),e},[]);return function(){return a[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}(),tG=/^\s*function\s*(\S*)\s*\(/,t$="name";function tj(e){var t=e.name;return t||e.toString().match(tG)[1]}function tY(e,t){var r=Object.getOwnPropertyDescriptor(e,t$);return(!!(0,E.b0)(r)||!!r.configurable)&&(Object.defineProperty(e,t$,{enumerable:!1,configurable:!0,writable:!1,value:t}),!0)}function tq(e,t){for(var r=(0,E.HP)(e),n=r.length,o=0;o<n;o++)for(var i=e[r[o]],s=i.length,a=0;a<s;a++){var l=i[a];void 0===l.tokenTypeIdx&&(void 0!==l.fullName?this[l.fullName](l.children,t):this[l.name](l.children,t))}}(m=w||(w={}))[m.REDUNDANT_METHOD=0]="REDUNDANT_METHOD",m[m.MISSING_METHOD=1]="MISSING_METHOD";var tK=["constructor","visit","validateVisitor"],tX=function(){function e(){}return e.prototype.initTreeBuilder=function(e){if(this.LAST_EXPLICIT_RULE_STACK=[],this.CST_STACK=[],this.outputCst=(0,E.zy)(e,"outputCst")?e.outputCst:ro.outputCst,this.nodeLocationTracking=(0,E.zy)(e,"nodeLocationTracking")?e.nodeLocationTracking:ro.nodeLocationTracking,this.outputCst)if(/full/i.test(this.nodeLocationTracking))this.recoveryEnabled?(this.setNodeLocationFromToken=e0,this.setNodeLocationFromNode=e0,this.cstPostRule=E.tE,this.setInitialNodeLocation=this.setInitialNodeLocationFullRecovery):(this.setNodeLocationFromToken=E.tE,this.setNodeLocationFromNode=E.tE,this.cstPostRule=this.cstPostRuleFull,this.setInitialNodeLocation=this.setInitialNodeLocationFullRegular);else if(/onlyOffset/i.test(this.nodeLocationTracking))this.recoveryEnabled?(this.setNodeLocationFromToken=eJ,this.setNodeLocationFromNode=eJ,this.cstPostRule=E.tE,this.setInitialNodeLocation=this.setInitialNodeLocationOnlyOffsetRecovery):(this.setNodeLocationFromToken=E.tE,this.setNodeLocationFromNode=E.tE,this.cstPostRule=this.cstPostRuleOnlyOffset,this.setInitialNodeLocation=this.setInitialNodeLocationOnlyOffsetRegular);else if(/none/i.test(this.nodeLocationTracking))this.setNodeLocationFromToken=E.tE,this.setNodeLocationFromNode=E.tE,this.cstPostRule=E.tE,this.setInitialNodeLocation=E.tE;else throw Error('Invalid <nodeLocationTracking> config option: "'+e.nodeLocationTracking+'"');else this.cstInvocationStateUpdate=E.tE,this.cstFinallyStateUpdate=E.tE,this.cstPostTerminal=E.tE,this.cstPostNonTerminal=E.tE,this.cstPostRule=E.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];e1(r,t,e),this.setNodeLocationFromNode(r.location,e.location)}},e.prototype.getBaseCstVisitorConstructor=function(){if((0,E.b0)(this.baseCstVisitorConstructor)){var e,t,r,n=(e=this.className,t=this.allRuleNames,tY(r=function(){},e+"BaseSemantics"),r.prototype={visit:function(e,t){if((0,E.cy)(e)&&(e=e[0]),!(0,E.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,n,o,i,s,a,l=(e=this,r=t,s=(n=e,o=r,i=(0,E.Tj)(o,function(e){if(!(0,E.Tn)(n[e]))return{msg:"Missing visitor method: <"+e+"> on "+tj(n.constructor)+" CST Visitor.",type:w.MISSING_METHOD,methodName:e}}),(0,E.oE)(i)),a=function(e,t){var r=[];for(var n in e)tf.test(n)&&(0,E.Tn)(e[n])&&!(0,E.gR)(tK,n)&&!(0,E.gR)(t,n)&&r.push({msg:"Redundant visitor method: <"+n+"> on "+tj(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 /"+tf.source+"/.",type:w.REDUNDANT_METHOD,methodName:n});return r}(e,r),s.concat(a));if(!(0,E.Im)(l)){var h=(0,E.Tj)(l,function(e){return e.msg});throw Error("Errors Detected in CST Visitor <"+tj(this.constructor)+">:\n "+h.join("\n\n").replace(/\n/g,"\n "))}}},r.prototype.constructor=r,r._RULE_NAMES=t,r);return this.baseCstVisitorConstructor=n,n}return this.baseCstVisitorConstructor},e.prototype.getBaseCstVisitorConstructorWithDefaults=function(){if((0,E.b0)(this.baseCstVisitorWithDefaultsConstructor)){var e,t,r,n,o,i=(e=this.className,t=this.allRuleNames,r=this.getBaseCstVisitorConstructor(),tY(n=function(){},e+"BaseSemanticsWithDefaults"),o=Object.create(r.prototype),(0,E.jJ)(t,function(e){o[e]=tq}),n.prototype=o,n.prototype.constructor=n,n);return this.baseCstVisitorWithDefaultsConstructor=i,i}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,n){var o,i,s=(o=this.getLastExplicitRuleShortName(),t|r|o|n+1<<24);return void 0!==e.NAME?(i=e.NAME,this.nestedRuleInvocationStateUpdate(i,s),{shortName:s,nestedName:i}):void 0},e.prototype.nestedRuleFinallyClause=function(e,t){var r=this.CST_STACK,n=r[r.length-1];this.nestedRuleFinallyStateUpdate();var o=r[r.length-1];e1(o,t,n),this.setNodeLocationFromNode(o.location,n.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}(),tQ=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)):rn},e.prototype.LA=function(e){var t=this.currIdx+e;return t<0||this.tokVectorLength<=t?rn: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}(),tZ=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=ri),(0,E.gR)(this.definedRulesNames,e)){var n={message:tv.buildDuplicateRuleNameError({topLevelRule:e,grammarName:this.className}),type:S.DUPLICATE_RULE_NAME,ruleName:e};this.definitionErrors.push(n)}this.definedRulesNames.push(e);var o=this.defineRule(e,t,r);return this[e]=o,o},e.prototype.OVERRIDE_RULE=function(e,t,r){void 0===r&&(r=ri);var n,o,i,s=[];s=s.concat((n=this.definedRulesNames,o=this.className,i=[],E.gR(n,e)||i.push({message:"Invalid rule override, rule: ->"+e+"<- cannot be overridden in the grammar: ->"+o+"<-as it is not defined in any of the super grammars ",type:S.INVALID_RULE_OVERRIDE,ruleName:e}),i)),this.definitionErrors.push.apply(this.definitionErrors,s);var a=this.defineRule(e,t,r);return this[e]=a,a},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(t_(e))return!1;throw e}finally{this.reloadRecogState(r),this.isBackTrackingStack.pop()}}},e.prototype.getGAstProductions=function(){return this.gastProductionsCache},e.prototype.getSerializedGastProductions=function(){return eF((0,E.zu)(this.gastProductionsCache))},e}(),tJ=function(){function e(){}return e.prototype.initRecognizerEngine=function(e,t){if(this.className=tj(this.constructor),this.shortRuleNameToFull={},this.fullRuleNameToShort={},this.ruleShortNameIdx=256,this.tokenMatcher=ee,this.definedRulesNames=[],this.tokensMap={},this.allRuleNames=[],this.isBackTrackingStack=[],this.RULE_STACK=[],this.RULE_OCCURRENCE_STACK=[],this.gastProductionsCache={},(0,E.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,E.cy)(e)){if((0,E.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,E.cy)(e))this.tokensMap=(0,E.TS)(e,function(e,t){return e[t.name]=t,e},{});else if((0,E.zy)(e,"modes")&&(0,E.Si)((0,E.Bq)((0,E.zu)(e.modes)),es)){var r=(0,E.Bq)((0,E.zu)(e.modes)),n=(0,E.sb)(r);this.tokensMap=(0,E.TS)(n,function(e,t){return e[t.name]=t,e},{})}else if((0,E.Gv)(e))this.tokensMap=(0,E.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=eR;var o=(0,E.Si)((0,E.zu)(e),function(e){return(0,E.Im)(e.categoryMatches)});this.tokenMatcher=o?ee:J,en((0,E.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 n,o=(0,E.zy)(r,"resyncEnabled")?r.resyncEnabled:ri.resyncEnabled,i=(0,E.zy)(r,"recoveryValueFunc")?r.recoveryValueFunc:ri.recoveryValueFunc,s=this.ruleShortNameIdx<<12;function a(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,o,i)}finally{this.ruleFinallyStateUpdate()}}return this.ruleShortNameIdx++,this.shortRuleNameToFull[s]=e,this.fullRuleNameToShort[e]=s,(n=function(t,r){return void 0===t&&(t=0),this.ruleInvocationStateUpdate(s,e,t),a.call(this,r)}).ruleName=e,n.originalGrammarAction=t,n},e.prototype.invokeRuleCatch=function(e,t,r){var n=1===this.RULE_STACK.length,o=t&&!this.isBackTracking()&&this.recoveryEnabled;if(t_(e)){if(o){var i=this.findReSyncTokenType();if(this.isInCurrentRuleReSyncSet(i)){if(e.resyncedTokens=this.reSyncTo(i),!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(n)return this.moveToTerminatedState(),r()}throw e},e.prototype.optionInternal=function(e,t){var r=this.getKeyForAutomaticLookahead(512,t),n=this.nestedRuleBeforeClause(e,r);try{return this.optionInternalLogic(e,t,r)}finally{void 0!==n&&this.nestedRuleFinallyClause(r,n)}},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 n,o,i=this,s=this.getLaFuncFromCache(r);if(void 0!==e.DEF){if(n=e.DEF,void 0!==(o=e.GATE)){var a=s;s=function(){return o.call(i)&&a.call(i)}}}else n=e;if(!0===s.call(this))return n.call(this)},e.prototype.atLeastOneInternal=function(e,t){var r=this.getKeyForAutomaticLookahead(1024,e),n=this.nestedRuleBeforeClause(t,r);try{return this.atLeastOneInternalLogic(e,t,r)}finally{void 0!==n&&this.nestedRuleFinallyClause(r,n)}},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 n,o,i=this,s=this.getLaFuncFromCache(r);if(void 0!==t.DEF){if(n=t.DEF,void 0!==(o=t.GATE)){var a=s;s=function(){return o.call(i)&&a.call(i)}}}else n=t;if(!0===s.call(this))for(var l=this.doSingleRepetition(n);!0===s.call(this)&&!0===l;)l=this.doSingleRepetition(n);else throw this.raiseEarlyExitException(e,y.REPETITION_MANDATORY,t.ERR_MSG);this.attemptInRepetitionRecovery(this.atLeastOneInternal,[e,t],s,1024,e,e7)},e.prototype.atLeastOneSepFirstInternal=function(e,t){var r=this.getKeyForAutomaticLookahead(1536,e),n=this.nestedRuleBeforeClause(t,r);try{this.atLeastOneSepFirstInternalLogic(e,t,r)}finally{void 0!==n&&this.nestedRuleFinallyClause(r,n)}},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 n=this,o=t.DEF,i=t.SEP;if(!0===this.getLaFuncFromCache(r).call(this)){o.call(this);for(var s=function(){return n.tokenMatcher(n.LA(1),i)};!0===this.tokenMatcher(this.LA(1),i);)this.CONSUME(i),o.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[e,i,s,o,e8],s,1536,e,e8)}else throw this.raiseEarlyExitException(e,y.REPETITION_MANDATORY_WITH_SEPARATOR,t.ERR_MSG)},e.prototype.manyInternal=function(e,t){var r=this.getKeyForAutomaticLookahead(768,e),n=this.nestedRuleBeforeClause(t,r);try{return this.manyInternalLogic(e,t,r)}finally{void 0!==n&&this.nestedRuleFinallyClause(r,n)}},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 n,o,i=this,s=this.getLaFuncFromCache(r);if(void 0!==t.DEF){if(n=t.DEF,void 0!==(o=t.GATE)){var a=s;s=function(){return o.call(i)&&a.call(i)}}}else n=t;for(var l=!0;!0===s.call(this)&&!0===l;)l=this.doSingleRepetition(n);this.attemptInRepetitionRecovery(this.manyInternal,[e,t],s,768,e,e4,l)},e.prototype.manySepFirstInternal=function(e,t){var r=this.getKeyForAutomaticLookahead(1280,e),n=this.nestedRuleBeforeClause(t,r);try{this.manySepFirstInternalLogic(e,t,r)}finally{void 0!==n&&this.nestedRuleFinallyClause(r,n)}},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 n=this,o=t.DEF,i=t.SEP;if(!0===this.getLaFuncFromCache(r).call(this)){o.call(this);for(var s=function(){return n.tokenMatcher(n.LA(1),i)};!0===this.tokenMatcher(this.LA(1),i);)this.CONSUME(i),o.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[e,i,s,o,e9],s,1280,e,e9)}},e.prototype.repetitionSepSecondInternal=function(e,t,r,n,o){for(;r();)this.CONSUME(t),n.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[e,t,r,n,o],r,1536,e,o)},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,E.cy)(e)?e:e.DEF,n=this.getKeyForAutomaticLookahead(256,t),o=this.getLaFuncFromCache(n).call(this,r);if(void 0!==o)return r[o].ALT.call(this);this.raiseNoAltException(t,e.ERR_MSG)},e.prototype.orInternal=function(e,t){var r=this.getKeyForAutomaticLookahead(256,t),n=this.nestedRuleBeforeClause(e,r);try{var o=(0,E.cy)(e)?e:e.DEF,i=this.getLaFuncFromCache(r).call(this,o);if(void 0!==i){var s=o[i],a=this.nestedAltBeforeClause(s,t,256,i);try{return s.ALT.call(this)}finally{void 0!==a&&this.nestedRuleFinallyClause(a.shortName,a.nestedName)}}this.raiseNoAltException(t,e.ERR_MSG)}finally{void 0!==n&&this.nestedRuleFinallyClause(r,n)}},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 n;try{var o=void 0!==r?r.ARGS:void 0;return n=e.call(this,t,o),this.cstPostNonTerminal(n,void 0!==r&&void 0!==r.LABEL?r.LABEL:e.ruleName),n}catch(t){this.subruleInternalError(t,r,e.ruleName)}},e.prototype.subruleInternalError=function(e,t,r){throw t_(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 n;try{var o=this.LA(1);!0===this.tokenMatcher(o,e)?(this.consumeToken(),n=o):this.consumeInternalError(e,o,r)}catch(r){n=this.consumeInternalRecovery(e,t,r)}return this.cstPostTerminal(void 0!==r&&void 0!==r.LABEL?r.LABEL:e.name,n),n},e.prototype.consumeInternalError=function(e,t,r){var n,o=this.LA(0);throw n=void 0!==r&&r.ERR_MSG?r.ERR_MSG:this.errorMessageProvider.buildMismatchTokenMessage({expected:e,actual:t,previous:o,ruleName:this.getCurrRuleFullName()}),this.SAVE_ERROR(new tH(n,t,o))},e.prototype.consumeInternalRecovery=function(e,t,r){if(this.recoveryEnabled&&"MismatchedTokenException"===r.name&&!this.isBackTracking()){var n=this.getFollowsForInRuleRecovery(e,t);try{return this.tryInRuleRecovery(e,n)}catch(e){if(e.name===tV)throw r;throw e}}throw r},e.prototype.saveRecogState=function(){var e=this.errors,t=(0,E.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),eR)},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}(),t0=function(){function e(){}return e.prototype.initErrorHandler=function(e){this._errors=[],this.errorMessageProvider=(0,E.NT)(e.errorMessageProvider,ro.errorMessageProvider)},e.prototype.SAVE_ERROR=function(e){if(t_(e))return e.context={ruleStack:this.getHumanReadableRuleStack(),ruleOccurrenceStack:(0,E.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,E.T9)(this._errors)},set:function(e){this._errors=e},enumerable:!0,configurable:!0}),e.prototype.raiseEarlyExitException=function(e,t,r){for(var n=this.getCurrRuleFullName(),o=th(e,this.getGAstProductions()[n],t,this.maxLookahead)[0],i=[],s=1;s<=this.maxLookahead;s++)i.push(this.LA(s));var a=this.errorMessageProvider.buildEarlyExitMessage({expectedIterationPaths:o,actual:i,previous:this.LA(0),customUserDescription:r,ruleName:n});throw this.SAVE_ERROR(new tD(a,this.LA(1),this.LA(0)))},e.prototype.raiseNoAltException=function(e,t){for(var r=this.getCurrRuleFullName(),n=tl(e,this.getGAstProductions()[r],this.maxLookahead),o=[],i=1;i<=this.maxLookahead;i++)o.push(this.LA(i));var s=this.LA(0),a=this.errorMessageProvider.buildNoViableAltMessage({expectedPathsPerAlt:n,actual:o,previous:s,customUserDescription:t,ruleName:this.getCurrRuleFullName()});throw this.SAVE_ERROR(new tL(a,this.LA(1),s))},e}(),t1=function(){function e(){}return e.prototype.initContentAssist=function(){},e.prototype.computeContentAssist=function(e,t){var r=this.gastProductionsCache[e];if((0,E.b0)(r))throw Error("Rule ->"+e+"<- does not exist in this grammar.");return tt([r],t,this.tokenMatcher,this.maxLookahead)},e.prototype.getNextPossibleTokenTypes=function(e){var t=(0,E.$1)(e.ruleStack);return new e6(this.getGAstProductions()[t],e).startWalking()},e}(),t2={description:"This Object indicates the Parser is during Recording Phase"};Object.freeze(t2);var t3=ev({name:"RECORDING_PHASE_TOKEN",pattern:eh.NA});en([t3]);var t6=eE(t3,"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(t6);var t5={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:{}},t4=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 rn},e.prototype.topLevelRuleRecord=function(e,t){try{var r=new eI({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 t9.call(this,eO,e,t)},e.prototype.atLeastOneInternalRecord=function(e,t){t9.call(this,ek,t,e)},e.prototype.atLeastOneSepFirstInternalRecord=function(e,t){t9.call(this,e_,t,e,!0)},e.prototype.manyInternalRecord=function(e,t){t9.call(this,eH,t,e)},e.prototype.manySepFirstInternalRecord=function(e,t){t9.call(this,eL,t,e,!0)},e.prototype.orInternalRecord=function(e,t){return t7.call(this,e,t)},e.prototype.subruleInternalRecord=function(e,t,r){if(re(t),!e||!1===(0,E.zy)(e,"ruleName")){var n=Error("<SUBRULE"+t8(t)+"> argument is invalid expecting a Parser method reference but got: <"+JSON.stringify(e)+">\n inside top level rule: <"+this.recordingProdStack[0].name+">");throw n.KNOWN_RECORDER_ERROR=!0,n}var o=(0,E.se)(this.recordingProdStack),i=new eN({idx:t,nonTerminalName:e.ruleName,referencedRule:void 0});return o.definition.push(i),this.outputCst?t5:t2},e.prototype.consumeInternalRecord=function(e,t,r){if(re(t),!eo(e)){var n=Error("<CONSUME"+t8(t)+"> argument is invalid expecting a TokenType reference but got: <"+JSON.stringify(e)+">\n inside top level rule: <"+this.recordingProdStack[0].name+">");throw n.KNOWN_RECORDER_ERROR=!0,n}var o=(0,E.se)(this.recordingProdStack),i=new eD({idx:t,terminalType:e});return o.definition.push(i),t6},e}();function t9(e,t,r,n){void 0===n&&(n=!1),re(r);var o=(0,E.se)(this.recordingProdStack),i=(0,E.Tn)(t)?t:t.DEF,s=new e({definition:[],idx:r});return(0,E.zy)(t,"NAME")&&(s.name=t.NAME),n&&(s.separator=t.SEP),(0,E.zy)(t,"MAX_LOOKAHEAD")&&(s.maxLookahead=t.MAX_LOOKAHEAD),this.recordingProdStack.push(s),i.call(this),o.definition.push(s),this.recordingProdStack.pop(),t2}function t7(e,t){var r=this;re(t);var n=(0,E.se)(this.recordingProdStack),o=!1===(0,E.cy)(e),i=!1===o?e:e.DEF,s=new eP({definition:[],idx:t,ignoreAmbiguities:o&&!0===e.IGNORE_AMBIGUITIES});return(0,E.zy)(e,"NAME")&&(s.name=e.NAME),(0,E.zy)(e,"MAX_LOOKAHEAD")&&(s.maxLookahead=e.MAX_LOOKAHEAD),s.hasPredicates=(0,E.zN)(i,function(e){return(0,E.Tn)(e.GATE)}),n.definition.push(s),(0,E.jJ)(i,function(e){var t=new ex({definition:[]});s.definition.push(t),(0,E.zy)(e,"NAME")&&(t.name=e.NAME),(0,E.zy)(e,"IGNORE_AMBIGUITIES")?t.ignoreAmbiguities=e.IGNORE_AMBIGUITIES:(0,E.zy)(e,"GATE")&&(t.ignoreAmbiguities=!0),r.recordingProdStack.push(t),e.ALT.call(r),r.recordingProdStack.pop()}),t2}function t8(e){return 0===e?"":""+e}function re(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 rt=function(){function e(){}return e.prototype.initPerformanceTracer=function(e){if((0,E.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=ro.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 n=(0,E.O1)(t),o=n.time,i=n.value,s=o>10?console.warn:console.log;return this.traceInitIndent<this.traceInitMaxIdent&&s(r+"<-- <"+e+"> time: "+o+"ms"),this.traceInitIndent--,i},e}(),rr=(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)}),rn=eE(eR,"",NaN,NaN,NaN,NaN,NaN,NaN);Object.freeze(rn);var ro=Object.freeze({recoveryEnabled:!1,maxLookahead:4,ignoredIssues:{},dynamicTokensEnabled:!1,outputCst:!0,errorMessageProvider:tw,nodeLocationTracking:"none",traceInitPerf:!1,skipValidations:!1}),ri=Object.freeze({recoveryValueFunc:function(){},resyncEnabled:!0});function rs(e){return void 0===e&&(e=void 0),function(){return e}}(C=S||(S={}))[C.INVALID_RULE_NAME=0]="INVALID_RULE_NAME",C[C.DUPLICATE_RULE_NAME=1]="DUPLICATE_RULE_NAME",C[C.INVALID_RULE_OVERRIDE=2]="INVALID_RULE_OVERRIDE",C[C.DUPLICATE_PRODUCTIONS=3]="DUPLICATE_PRODUCTIONS",C[C.UNRESOLVED_SUBRULE_REF=4]="UNRESOLVED_SUBRULE_REF",C[C.LEFT_RECURSION=5]="LEFT_RECURSION",C[C.NONE_LAST_EMPTY_ALT=6]="NONE_LAST_EMPTY_ALT",C[C.AMBIGUOUS_ALTS=7]="AMBIGUOUS_ALTS",C[C.CONFLICT_TOKENS_RULES_NAMESPACE=8]="CONFLICT_TOKENS_RULES_NAMESPACE",C[C.INVALID_TOKEN_NAME=9]="INVALID_TOKEN_NAME",C[C.INVALID_NESTED_RULE_NAME=10]="INVALID_NESTED_RULE_NAME",C[C.DUPLICATE_NESTED_NAME=11]="DUPLICATE_NESTED_NAME",C[C.NO_NON_EMPTY_LOOKAHEAD=12]="NO_NON_EMPTY_LOOKAHEAD",C[C.AMBIGUOUS_PREFIX_ALTS=13]="AMBIGUOUS_PREFIX_ALTS",C[C.TOO_MANY_ALTS=14]="TOO_MANY_ALTS";var ra=function(){function e(e,t){void 0===t&&(t=ro),this.ignoredIssues=ro.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,E.zy)(t,"ignoredIssues")&&t.ignoredIssues!==ro.ignoredIssues&&(0,E.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,E.zy)(t,"ignoredIssues")?t.ignoredIssues:ro.ignoredIssues,this.skipValidations=(0,E.zy)(t,"skipValidations")?t.skipValidations:ro.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,E.Bl)(t)}),t.TRACE_INIT("Grammar Recording",function(){try{t.enableRecording(),(0,E.jJ)(t.definedRulesNames,function(e){var r=t[e].originalGrammarAction,n=void 0;t.TRACE_INIT(e+" Rule",function(){n=t.topLevelRuleRecord(e,r)}),t.gastProductionsCache[e]=n})}finally{t.disableRecording()}});var n=[];if(t.TRACE_INIT("Grammar Resolving",function(){n=tT({rules:(0,E.zu)(t.gastProductionsCache)}),t.definitionErrors.push.apply(t.definitionErrors,n)}),t.TRACE_INIT("Grammar Validations",function(){if((0,E.Im)(n)&&!1===t.skipValidations){var e=tA({rules:(0,E.zu)(t.gastProductionsCache),maxLookahead:t.maxLookahead,tokenTypes:(0,E.zu)(t.tokensMap),ignoredIssues:t.ignoredIssues,errMsgProvider:tv,grammarName:r});t.definitionErrors.push.apply(t.definitionErrors,e)}}),(0,E.Im)(t.definitionErrors)&&(t.recoveryEnabled&&t.TRACE_INIT("computeAllProdsFollows",function(){var e,r,n=(e=(0,E.zu)(t.gastProductionsCache),r={},(0,E.jJ)(e,function(e){var t=new eQ(e).startWalking();(0,E.kp)(r,t)}),r);t.resyncFollows=n}),t.TRACE_INIT("ComputeLookaheadFunctions",function(){t.preComputeLookaheadFunctions((0,E.zu)(t.gastProductionsCache))})),t.TRACE_INIT("expandAllNestedRuleNames",function(){var e,r,n,o=(e=(0,E.zu)(t.gastProductionsCache),r=t.fullRuleNameToShort,n={allRuleNames:[]},(0,E.jJ)(e,function(e){var t=r[e.name];n.allRuleNames.push(e.name);var o=new e2(t);e.accept(o),(0,E.jJ)(o.result,function(t){t.def,t.key;var r=t.name;n.allRuleNames.push(e.name+r)})}),n);t.allRuleNames=o.allRuleNames}),!e.DEFER_DEFINITION_ERRORS_HANDLING&&!(0,E.Im)(t.definitionErrors))throw Error("Parser Definition Errors detected:\n "+(0,E.Tj)(t.definitionErrors,function(e){return e.message}).join("\n-------------------------------\n"))})},e.DEFER_DEFINITION_ERRORS_HANDLING=!1,e}();(0,E.XJ)(ra,[tU,tW,tX,tQ,tJ,tZ,t0,t1,t4,rt]);var rl=function(e){function t(t,r){void 0===r&&(r=ro);var n=(0,E.lR)(r);return n.outputCst=!0,e.call(this,t,n)||this}return rr(t,e),t}(ra),rh=function(e){function t(t,r){void 0===r&&(r=ro);var n=(0,E.lR)(r);return n.outputCst=!1,e.call(this,t,n)||this}return rr(t,e),t}(ra);function rd(e,t){var r=void 0===t?{}:t,n=r.resourceBase,o=void 0===n?"https://unpkg.com/chevrotain@"+R+"/diagrams/":n,i=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===i?"https://unpkg.com/chevrotain@"+R+"/diagrams/diagrams.css":i)+"'>\n"+("\n<script src='"+o+"vendor/railroad-diagrams.js'><\/script>\n<script src='"+o+"src/diagrams_builder.js'><\/script>\n<script src='"+o+"src/diagrams_behavior.js'><\/script>\n<script src='"+o+"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 ru(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,E.Tj)(t,function(e){var t;return rm(1,'$.RULE("'+(t=e).name+'", function() {')+"\n"+rp(t.definition,2)+(rm(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 rc(e,t,r){var n=rm(r,"$."+(e+t.idx)+"(");return t.name||t.separator?(n+="{\n",t.name&&(n+=rm(r+1,'NAME: "'+t.name+'"')+",\n"),t.separator&&(n+=rm(r+1,"SEP: this.tokensMap."+t.separator.name)+",\n"),n+="DEF: "+rg(t.definition,r+2)+"\n",n+=rm(r,"}")+"\n"):n+=rg(t.definition,r+1),n+=rm(r,")")+"\n"}function rg(e,t){var r="function() {\n";return r+=rp(e,t),r+=rm(t,"}")+"\n"}function rp(e,t){var r="";return(0,E.jJ)(e,function(e){r+=function(e,t){var r;if(e instanceof eN)return rm(t,"$.SUBRULE"+e.idx+"($."+e.nonTerminalName+")\n");if(e instanceof eO)return rc("OPTION",e,t);if(e instanceof ek)return rc("AT_LEAST_ONE",e,t);if(e instanceof e_)return rc("AT_LEAST_ONE_SEP",e,t);if(e instanceof eL)return rc("MANY_SEP",e,t);else if(e instanceof eH)return rc("MANY",e,t);else if(e instanceof eP)return rm(t,"$.OR"+e.idx+"([")+"\n"+(0,E.Tj)(e.definition,function(e){var r,n,o;return r=e,o=rm(n=t+1,"{")+"\n",r.name&&(o+=rm(n+1,'NAME: "'+r.name+'",')+"\n"),o+=rm(n+1,"ALT: function() {")+"\n",o+=rp(r.definition,n+1),o+=rm(n+1,"}")+"\n",o+=rm(n,"}")}).join(",\n")+"\n"+rm(t,"])\n");else if(e instanceof eD)return r=e.terminalType.name,rm(t,"$.CONSUME"+e.idx+"(this.tokensMap."+r+")\n");else if(e instanceof ex)return rp(e.definition,t);else throw Error("non exhaustive match")}(e,t+1)}),r}function rm(e,t){return Array(4*e+1).join(" ")+t}function rf(e){var t,n=Function("tokenVocabulary","config","chevrotain"," \n"+ru(t={name:e.name,rules:e.rules})+"\nreturn new "+t.name+"(tokenVocabulary, config) \n");return function(t){return n(e.tokenVocabulary,t,r(603))}}function rC(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"+ru(t={name:e.name,rules:e.rules})+"\n \nreturn {\n "+t.name+": "+t.name+" \n}\n}));\n"}function rb(){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 n(e){return e&&0===e.length}function o(e){return null==e?[]:Object.keys(e)}function i(e){for(var t=[],r=Object.keys(e),n=0;n<r.length;n++)t.push(e[r[n]]);return t}function s(e,t){for(var r=[],n=o(e),i=0;i<n.length;i++){var s=n[i];r.push(t.call(null,e[s],s))}return r}function a(e,t){for(var r=[],n=0;n<e.length;n++)r.push(t.call(null,e[n],n));return r}function l(e){return n(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(O(e))for(var n=o(e),r=0;r<n.length;r++){var i=n[r],s=e[i];t.call(null,s,i)}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 n=0;n<e.length;n++){var o=e[n];t.call(null,o)&&r.push(o)}return r}function C(e,t){return f(e,function(e){return!t(e)})}function b(e,t){for(var r=Object.keys(e),n={},o=0;o<r.length;o++){var i=r[o],s=e[i];t(s)&&(n[i]=s)}return n}function y(e,t){return!!O(e)&&e.hasOwnProperty(t)}function w(e,t){return void 0!==E(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 R(e){var t={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}function E(e,t){for(var r=0;r<e.length;r++){var n=e[r];if(t.call(null,n))return n}}function T(e,t){for(var r=[],n=0;n<e.length;n++){var o=e[n];t.call(null,o)&&r.push(o)}return r}function A(e,t,r){for(var n=Array.isArray(e),s=n?e:i(e),a=n?[]:o(e),l=r,h=0;h<s.length;h++)l=t.call(null,l,s[h],n?h:a[h]);return l}function M(e){return C(e,function(e){return null==e})}function N(e,t){void 0===t&&(t=function(e){return e});var r=[];return A(e,function(e,n){var o=t(n);return w(r,o)?e:(r.push(o),e.concat(n))},[])}function I(e){return Array.isArray(e)}function x(e){return e instanceof RegExp}function O(e){return e instanceof Object}function k(e,t){for(var r=0;r<e.length;r++)if(!t(e[r],r))return!1;return!0}function _(e,t){return C(e,function(e){return w(t,e)})}function H(e,t){for(var r=0;r<e.length;r++)if(t(e[r]))return!0;return!1}function L(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 n=0;n<t.length;n++)for(var i=t[n],s=o(i),a=0;a<s.length;a++){var l=s[a];e[l]=i[l]}return e}function D(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];for(var n=0;n<t.length;n++){var i=t[n];if(!c(i))for(var s=o(i),a=0;a<s.length;a++){var l=s[a];y(e,l)||(e[l]=i[l])}}return e}function F(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return D.apply(null,[{}].concat(e))}function V(e,t){var r={};return d(e,function(e){var n=t(e),o=r[n];o?o.push(e):r[n]=[e]}),r}function B(e,t){for(var r=R(e),n=o(t),i=0;i<n.length;i++){var s=n[i],a=t[s];r[s]=a}return r}function U(){}function z(e){return e}function W(e){for(var t=[],r=0;r<e.length;r++){var n=e[r];t.push(void 0!==n?n:void 0)}return t}function G(e){console&&console.error&&console.error("Error: "+e)}function $(e){console&&console.warn&&console.warn("Warning: "+e)}function j(){return"function"==typeof Map}function Y(e,t){t.forEach(function(t){var r=t.prototype;Object.getOwnPropertyNames(r).forEach(function(n){if("constructor"!==n){var o=Object.getOwnPropertyDescriptor(r,n);o&&(o.get||o.set)?Object.defineProperty(e.prototype,n,o):e.prototype[n]=t.prototype[n]}})})}function q(e){function t(){}t.prototype=e;var r=new t;function n(){return typeof r.bar}return n(),n(),e}function K(e){return e[e.length-1]}function X(e){var t=new Date().getTime(),r=e();return{time:new Date().getTime()-t,value:r}}r.d(t,{$1:()=>l,$z:()=>V,Bl:()=>q,Bq:()=>function e(t){for(var r=[],n=0;n<t.length;n++){var o=t[n];Array.isArray(o)?r=r.concat(e(o)):r.push(o)}return r},Gv:()=>O,HP:()=>o,HV:()=>h,I6:()=>E,Im:()=>n,JW:()=>T,Kg:()=>u,LG:()=>s,NT:()=>F,O1:()=>X,Si:()=>k,T9:()=>S,TS:()=>A,Tj:()=>a,Tn:()=>g,Up:()=>b,VS:()=>W,XJ:()=>Y,Zi:()=>G,b0:()=>c,cy:()=>I,gR:()=>w,gc:()=>m,gd:()=>x,gv:()=>p,h1:()=>B,iv:()=>_,jJ:()=>d,kp:()=>P,ku:()=>C,lR:()=>R,oE:()=>M,pb:()=>f,qh:()=>L,rF:()=>j,sb:()=>N,se:()=>K,tE:()=>U,x5:()=>$,zK:()=>z,zN:()=>H,zu:()=>i,zy:()=>y})},713(e){var t,r;t="u">typeof self?self:this,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":a(r,"global");break;case"i":a(r,"ignoreCase");break;case"m":a(r,"multiLine");break;case"u":a(r,"unicode");break;case"y":a(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"}l(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;l(t)}if(!0!==e||void 0!==t)return l(t),"?"===this.peekChar(0)?(this.consumeChar("?"),t.greedy=!1):t.greedy=!0,t.type="Quantifier",t},e.prototype.atom=function(){var e;switch(this.peekChar()){case".":e=this.dotAll();break;case"\\":e=this.atomEscape();break;case"[":e=this.characterClass();break;case"(":e=this.group()}return void 0===e&&this.isPatternCharacter()&&(e=this.patternCharacter()),l(e),this.isQuantifier()&&(e.quantifier=this.quantifier()),e},e.prototype.dotAll=function(){return this.consumeChar("."),{type:"Set",complement:!0,value:[i("\n"),i("\r"),i("\u2028"),i("\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 l(e),{type:"Set",value:e,complement:t}},e.prototype.controlEscapeAtom=function(){var e;switch(this.popChar()){case"f":e=i("\f");break;case"n":e=i("\n");break;case"r":e=i("\r");break;case"t":e=i(" ");break;case"v":e=i("\v")}return l(e),{type:"Character",value:e}},e.prototype.controlLetterEscapeAtom=function(){this.consumeChar("c");var e=this.popChar();if(!1===/[a-zA-Z]/.test(e))throw Error("Invalid ");return{type:"Character",value:e.toUpperCase().charCodeAt(0)-64}},e.prototype.nulCharacterAtom=function(){return this.consumeChar("0"),{type:"Character",value:i("\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:i(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:i(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 n=this.classAtom();if("Character"===n.type){if(n.value<r.value)throw Error("Range out of order in character class");e.push({from:r.value,to:n.value})}else s(r.value,e),e.push(i("-")),s(n.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:i("\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===o.test(e))throw Error("Expecting a positive integer");for(;n.test(this.peekChar(0));)e+=this.popChar();return parseInt(e,10)},e.prototype.integerIncludingZero=function(){var e=this.popChar();if(!1===n.test(e))throw Error("Expecting an integer");for(;n.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:i(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 n.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="",n=0;n<e;n++){var o=this.popChar();if(!1===r.test(o))throw Error("Expecting a HexDecimal digits");t+=o}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]/,n=/[0-9]/,o=/[1-9]/;function i(e){return e.charCodeAt(0)}function s(e,t){void 0!==e.length?e.forEach(function(e){t.push(e)}):t.push(e)}function a(e,t){if(!0===e[t])throw"duplicate flag "+t;e[t]=!0}function l(e){if(void 0===e)throw Error("Internal Error - Should never get here!")}var h=[];for(t=i("0");t<=i("9");t++)h.push(t);var d=[i("_")].concat(h);for(t=i("a");t<=i("z");t++)d.push(t);for(t=i("A");t<=i("Z");t++)d.push(t);var u=[i(" "),i("\f"),i("\n"),i("\r"),i(" "),i("\v"),i(" "),i("\xa0"),i(" "),i(" "),i(" "),i(" "),i(" "),i(" "),i(" "),i(" "),i(" "),i(" "),i(" "),i(" "),i("\u2028"),i("\u2029"),i(" "),i(" "),i(" "),i("\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"}},"function"==typeof define&&define.amd?define([],r):e.exports?e.exports=r():t.regexpToAst=r()},732(e){function t(){}t.prototype={on:function(e,t,r){var n=this.e||(this.e={});return(n[e]||(n[e]=[])).push({fn:t,ctx:r}),this},once:function(e,t,r){var n=this;function o(){n.off(e,o),t.apply(r,arguments)}return o._=t,this.on(e,o,r)},emit:function(e){for(var t=[].slice.call(arguments,1),r=((this.e||(this.e={}))[e]||[]).slice(),n=0,o=r.length;n<o;n++)r[n].fn.apply(r[n].ctx,t);return this},off:function(e,t){var r=this.e||(this.e={}),n=r[e],o=[];if(n&&t)for(var i=0,s=n.length;i<s;i++)n[i].fn!==t&&n[i].fn._!==t&&o.push(n[i]);return o.length?r[e]=o:delete r[e],this}},e.exports=t,e.exports.TinyEmitter=t}},t={};function r(n){var o=t[n];if(void 0!==o)return o.exports;var i=t[n]={exports:{}};return e[n].call(i.exports,i,i.exports,r),i.exports}r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},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 n={};return(()=>{"use strict";r.d({},{iz:()=>tX,f1:()=>ip});var e,t,n,o,i,s,a,l,h,d,u,c,g,p,m,f,C,b,y,w,S,R,E,T,A,M,N,I,x,O,k,_,H,L,P,D,F,V,B,U,z,W,G,$,j,Y,q,K,X,Q,Z,J,ee,et,er,en,eo,ei={};r.r(ei),r.d(ei,{AbsPlugin:()=>iv,AddressPlugin:()=>iw,ArrayPlugin:()=>iS,BitShiftPlugin:()=>iR,BitwiseLogicOperationsPlugin:()=>iM,BooleanPlugin:()=>iN,CharPlugin:()=>iI,CodePlugin:()=>ix,ComplexPlugin:()=>aE,ConditionalAggregationPlugin:()=>sN,CountBlankPlugin:()=>iO,CountUniquePlugin:()=>ik,DatabasePlugin:()=>iH,DateTimePlugin:()=>iL,DegreesPlugin:()=>iB,DeltaPlugin:()=>iU,ExpPlugin:()=>iz,FinancialPlugin:()=>iW,FormulaTextPlugin:()=>iK,HyperlinkPlugin:()=>iX,InformationPlugin:()=>iQ,IsEvenPlugin:()=>iZ,IsOddPlugin:()=>iJ,LogarithmPlugin:()=>i0,LookupPlugin:()=>s_,MathConstantsPlugin:()=>i2,MathPlugin:()=>aS,MatrixPlugin:()=>i5,MedianPlugin:()=>i4,ModuloPlugin:()=>i9,NumericAggregationPlugin:()=>sn,PercentilePlugin:()=>se,PowerPlugin:()=>ss,RadiansPlugin:()=>sa,RadixConversionPlugin:()=>sl,RandomPlugin:()=>sm,RomanPlugin:()=>sH,RoundingPlugin:()=>sy,SequencePlugin:()=>sf,SimpleArithmerticPlugin:()=>sD,SqrtPlugin:()=>sw,StatisticalAggregationPlugin:()=>aL,StatisticalPlugin:()=>aw,SumprodPlugin:()=>sI,TextPlugin:()=>sx,TrigonometryPlugin:()=>sO}),(E=e||(e={})).RELATIVE="RELATIVE",E.ABSOLUTE="ABSOLUTE";class es{constructor(e,t,r){this.type=e,this.col=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.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 n=void 0===this.sheet?void 0:e;return new es(this.type,this.col+t,n)}shiftedByColumns(e){return new es(this.type,this.col+e,this.sheet)}toSimpleColumnAddress(e){let t=r4(this,e),r=this.col;return this.isColumnRelative()&&(r=e.col+this.col),rJ(t,r)}shiftRelativeDimensions(e,t){let r=this.isColumnRelative()?this.col+e:this.col;return new es(this.type,r,this.sheet)}shiftAbsoluteDimensions(e,t){let r=this.isColumnAbsolute()?this.col+e:this.col;return new es(this.type,r,this.sheet)}withSheet(e){return new es(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(r0(r))return;let n=eO(r.col),o=this.type===e.ABSOLUTE?"$":"";return`${o}${n}`}exceedsSheetSizeLimits(e){return this.col>=e}}class ea{constructor(e,t,r){this.type=e,this.row=t,this.sheet=r}static absolute(t,r){return new ea(e.ABSOLUTE,t,r)}static relative(t,r){return new ea(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 n=void 0===this.sheet?void 0:e;return new ea(this.type,this.row+r,n)}shiftedByRows(e){return new ea(this.type,this.row+e,this.sheet)}toSimpleRowAddress(e){let t=r4(this,e),r=this.row;return this.isRowRelative()&&(r=e.row+this.row),rQ(t,r)}shiftRelativeDimensions(e,t){let r=this.isRowRelative()?this.row+t:this.row;return new ea(this.type,r,this.sheet)}shiftAbsoluteDimensions(e,t){let r=this.isRowAbsolute()?this.row+t:this.row;return new ea(this.type,r,this.sheet)}withSheet(e){return new ea(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(rZ(r))return;let n=this.type===e.ABSOLUTE?"$":"";return`${n}${r.row+1}`}exceedsSheetSizeLimits(e){return this.row>=e}}(T=t||(t={})).CELL_REFERENCE_RELATIVE="CELL_REFERENCE",T.CELL_REFERENCE_ABSOLUTE="CELL_REFERENCE_ABSOLUTE",T.CELL_REFERENCE_ABSOLUTE_COL="CELL_REFERENCE_ABSOLUTE_COL",T.CELL_REFERENCE_ABSOLUTE_ROW="CELL_REFERENCE_ABSOLUTE_ROW";class el{constructor(e,t,r,n){this.col=e,this.row=t,this.type=r,this.sheet=n}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,n){return new el(e,r,t.CELL_REFERENCE_RELATIVE,n)}static absolute(e,r,n){return new el(e,r,t.CELL_REFERENCE_ABSOLUTE,n)}static absoluteCol(e,r,n){return new el(e,r,t.CELL_REFERENCE_ABSOLUTE_COL,n)}static absoluteRow(e,r,n){return new el(e,r,t.CELL_REFERENCE_ABSOLUTE_ROW,n)}toSimpleCellAddress(e){let r=r4(this,e);return this.type===t.CELL_REFERENCE_ABSOLUTE?r1(r,this.col,this.row):this.type===t.CELL_REFERENCE_ABSOLUTE_ROW?r1(r,e.col+this.col,this.row):this.type===t.CELL_REFERENCE_ABSOLUTE_COL?r1(r,this.col,e.row+this.row):r1(r,e.col+this.col,e.row+this.row)}toColumnAddress(){return new es(this.isColumnRelative()?e.RELATIVE:e.ABSOLUTE,this.col,this.sheet)}toRowAddress(){return new ea(this.isRowRelative()?e.RELATIVE:e.ABSOLUTE,this.row,this.sheet)}toSimpleColumnAddress(e){let t=r4(this,e),r=this.col;return this.isColumnRelative()&&(r+=e.col),rJ(t,r)}toSimpleRowAddress(e){let t=r4(this,e),r=this.row;return this.isRowRelative()&&(r+=e.row),rQ(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 n=void 0===this.sheet?void 0:e;return new el(this.col+t,this.row+r,this.type,n)}withSheet(e){return new el(this.col,this.row,this.type,e)}isInvalid(e){return r2(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(r2(r))return;let n=eO(r.col),o=this.type===t.CELL_REFERENCE_ABSOLUTE||this.type===t.CELL_REFERENCE_ABSOLUTE_ROW?"$":"",i=this.type===t.CELL_REFERENCE_ABSOLUTE||this.type===t.CELL_REFERENCE_ABSOLUTE_COL?"$":"";return`${i}${n}${o}${r.row+1}`}exceedsSheetSizeLimits(e,t){return this.row>=t||this.col>=e}}let eh="A-Za-z\xc0-ʯ",ed=`${eh}0-9_.`,eu=`[${eh}0-9_]+`,ec=`(${eu}|'(((?!').|'')*)')!`,eg=`(${ec})?\\$?[A-Za-z]+\\$?[0-9]+`,ep=`(${ec})?\\$?[A-Za-z]+`,em=`(${ec})?\\$?[0-9]+`,ef="[rR][0-9]*[cC][0-9]*",eC=`(${eg})[^${ed}]`,eb=`[${eh}_][${ed}]*`,ey=["0","1","2","3","4","5","6","7","8","9"],ew=[...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)),eS=RegExp(`^(${ec})?(\\$?)([A-Za-z]+)(\\$?)([0-9]+)$`),ev=RegExp(`^(${ec})?(\\$?)([A-Za-z]+)$`),eR=RegExp(`^(${ec})?(\\$?)([0-9]+)$`),eE=RegExp(`^${eu}$`),eT=(e,t,r)=>{let n=eS.exec(e);if(!n)return;let o=ex(n[6]),i=Number(n[8])-1,s=eH(e_(n),r);if(null!==s)if("$"===n[5]&&"$"===n[7])return el.absolute(o,i,s);else if("$"===n[5])return el.absoluteCol(o,i-t.row,s);else if("$"===n[7])return el.absoluteRow(o-t.col,i,s);else return el.relative(o-t.col,i-t.row,s)},eA=(e,t,r)=>{let n=ev.exec(e);if(!n)return;let o=ex(n[6]),i=eH(e_(n),r);if(null!==i)if("$"===n[5])return es.absolute(o,i);else return es.relative(o-t.col,i)},eM=(e,t,r)=>{let n=eR.exec(e);if(!n)return;let o=Number(n[6])-1,i=eH(e_(n),r);if(null!==i)if("$"===n[5])return ea.absolute(o,i);else return ea.relative(o-t.row,i)},eN=(e,t,r)=>{let n=eS.exec(t);if(!n)return;let o=ex(n[6]),i=Number(n[8])-1,s=eH(e_(n),e);if(null!==s)return r1(void 0===s?r:s,o,i)},eI=(e,t,r)=>{let n=eO(t.col),o=ek(t.sheet,e);if(void 0!==o)if(r!==t.sheet)return`${o}!${n}${t.row+1}`;else return`${n}${t.row+1}`};function ex(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 eO(e){let t="";for(;e>=0;)t=String.fromCharCode(e%26+97)+t,e=Math.floor(e/26)-1;return t.toUpperCase()}function ek(e,t){let r=t(e);if(void 0!==r)if(eE.test(r))return r;else return r=r.replace(/'/g,"''"),`'${r}'`}function e_(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 eL=r(603);let eP=(e,t)=>({type:e,message:t});(A=n||(n={})).LexingError="LexingError",A.ParserError="ParsingError",A.StaticOffsetError="StaticOffsetError",A.StaticOffsetOutOfRangeError="StaticOffsetOutOfRangeError",A.RangeOffsetNotAllowed="RangeOffsetNotAllowed",A.InvalidRangeSize="InvalidRangeSize",(M=o||(o={})).EMPTY="EMPTY",M.NUMBER="NUMBER",M.STRING="STRING",M.MINUS_UNARY_OP="MINUS_UNARY_OP",M.PLUS_UNARY_OP="PLUS_UNARY_OP",M.PERCENT_OP="PERCENT_OP",M.CONCATENATE_OP="CONCATENATE_OP",M.EQUALS_OP="EQUALS_OP",M.NOT_EQUAL_OP="NOT_EQUAL_OP",M.GREATER_THAN_OP="GREATER_THAN_OP",M.LESS_THAN_OP="LESS_THAN_OP",M.GREATER_THAN_OR_EQUAL_OP="GREATER_THAN_OR_EQUAL_OP",M.LESS_THAN_OR_EQUAL_OP="LESS_THAN_OR_EQUAL_OP",M.PLUS_OP="PLUS_OP",M.MINUS_OP="MINUS_OP",M.TIMES_OP="TIMES_OP",M.DIV_OP="DIV_OP",M.POWER_OP="POWER_OP",M.FUNCTION_CALL="FUNCTION_CALL",M.NAMED_EXPRESSION="NAMED_EXPRESSION",M.PARENTHESIS="PARENTHESES",M.CELL_REFERENCE="CELL_REFERENCE",M.CELL_RANGE="CELL_RANGE",M.COLUMN_RANGE="COLUMN_RANGE",M.ROW_RANGE="ROW_RANGE",M.ERROR="ERROR",M.ERROR_WITH_RAW_INPUT="ERROR_WITH_RAW_INPUT",M.ARRAY="ARRAY",(N=i||(i={}))[N.RELATIVE=0]="RELATIVE",N[N.START_ABSOLUTE=1]="START_ABSOLUTE",N[N.BOTH_ABSOLUTE=2]="BOTH_ABSOLUTE";let eD=(e,t)=>({type:o.CELL_REFERENCE,reference:e,leadingWhitespace:null==t?void 0:t.image}),eF=(e,t,r,n)=>(eW(e,t,r),{type:o.CELL_RANGE,start:e,end:t,sheetReferenceType:r,leadingWhitespace:n}),eV=(e,t,r)=>({type:o.ARRAY,args:e,leadingWhitespace:null==t?void 0:t.image,internalWhitespace:null==r?void 0:r.image}),eB=(e,t)=>({type:o.ERROR,error:e,leadingWhitespace:null==t?void 0:t.image}),eU=(e,t,r)=>({type:o.ERROR_WITH_RAW_INPUT,error:t,rawInput:e,leadingWhitespace:null==r?void 0:r.image}),ez=()=>({type:o.ERROR,error:rX.parsingError()});function eW(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!==i.RELATIVE||void 0!==e.sheet&&r===i.RELATIVE)throw Error("Sheet address inconsistent with sheet reference type")}function eG(e,t){return(null!=t?t:"")+e}let e$={[o.PLUS_OP]:"+",[o.MINUS_OP]:"-",[o.TIMES_OP]:"*",[o.DIV_OP]:"/",[o.CONCATENATE_OP]:"&",[o.POWER_OP]:"^",[o.EQUALS_OP]:"=",[o.NOT_EQUAL_OP]:"<>",[o.GREATER_THAN_OP]:">",[o.GREATER_THAN_OR_EQUAL_OP]:">=",[o.LESS_THAN_OP]:"<",[o.LESS_THAN_OR_EQUAL_OP]:"<="};class ej{constructor(e){this.functionRegistry=e,this.cache=new Map}set(e,t){let r=tS(t,this.functionRegistry),n={ast:t,relativeDependencies:r,hasVolatileFunction:eY(t,this.functionRegistry.isFunctionVolatile),hasStructuralChangeFunction:eY(t,this.functionRegistry.isFunctionDependentOnSheetStructureChange)};return this.cache.set(e,n),n}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 eY=(e,t)=>{switch(e.type){case o.EMPTY:case o.NUMBER:case o.STRING:case o.ERROR:case o.ERROR_WITH_RAW_INPUT:case o.CELL_REFERENCE:case o.CELL_RANGE:case o.COLUMN_RANGE:case o.ROW_RANGE:case o.NAMED_EXPRESSION:return!1;case o.PERCENT_OP:case o.PLUS_UNARY_OP:case o.MINUS_UNARY_OP:return eY(e.value,t);case o.CONCATENATE_OP:case o.EQUALS_OP:case o.NOT_EQUAL_OP:case o.LESS_THAN_OP:case o.GREATER_THAN_OP:case o.LESS_THAN_OR_EQUAL_OP:case o.GREATER_THAN_OR_EQUAL_OP:case o.MINUS_OP:case o.PLUS_OP:case o.TIMES_OP:case o.DIV_OP:case o.POWER_OP:return eY(e.left,t)||eY(e.right,t);case o.PARENTHESIS:return eY(e.expression,t);case o.FUNCTION_CALL:if(t(e.procedureName))return!0;return e.args.some(e=>eY(e,t));case o.ARRAY:return e.args.some(e=>e.some(e=>eY(e,t)))}};class eq{}eq.DistinctSigns="Distinct signs.",eq.WrongArgNumber="Wrong number of arguments.",eq.EmptyArg="Empty function argument.",eq.EmptyArray="Empty array not allowed.",eq.ArrayDimensions="Array dimensions are not compatible.",eq.NoSpaceForArrayResult="No space for array result.",eq.ValueSmall="Value too small.",eq.ValueLarge="Value too large.",eq.BadCriterion="Incorrect criterion.",eq.RangeManySheets="Range spans more than one sheet.",eq.CellRangeExpected="Cell range expected.",eq.WrongDimension="Wrong range dimension.",eq.ScalarExpected="Cell range not allowed.",eq.NumberCoercion="Value cannot be coerced to number.",eq.NumberExpected="Number argument expected.",eq.IntegerExpected="Value needs to be an integer.",eq.BadMode="Mode not recognized.",eq.DateBounds="Date outside of bounds.",eq.OutOfSheet="Resulting reference is out of the sheet.",eq.WrongType="Wrong type of argument.",eq.NaN="NaN or infinite value encountered.",eq.EqualLength="Ranges need to be of equal length.",eq.Negative="Value cannot be negative.",eq.NotBinary="String does not represent a binary number.",eq.NotOctal="String does not represent an octal number.",eq.NotHex="String does not represent a hexadecimal number.",eq.EndStartPeriod="End period needs to be at least start period.",eq.CellRefExpected="Cell reference expected.",eq.EmptyRange="Empty range not allowed.",eq.BadRef="Address is not correct.",eq.NumberRange="Number-only range expected.",eq.ValueNotFound="Value not found.",eq.ValueBaseLarge="Value in base too large.",eq.ValueBaseSmall="Value in base too small.",eq.ValueBaseLong="Value in base too long.",eq.NegativeLength="Length cannot be negative.",eq.PatternNotFound="Pattern not found.",eq.OneValue="Needs at least one value.",eq.TwoValues="Range needs to contain at least two elements.",eq.ThreeValues="Range needs to contain at least three elements.",eq.IndexBounds="Index out of bounds.",eq.IndexLarge="Index too large.",eq.Formula="Expected formula.",eq.NegativeCount="Count cannot be negative.",eq.ParseError="Parsing error.",eq.SheetRef="Sheet does not exist.",eq.PeriodLong="Period number cannot exceed life length.",eq.InvalidDate="Invalid date.",eq.BitshiftLong="Result of bitshift is too long.",eq.EmptyString="Empty-string argument not allowed.",eq.LengthBounds="Length out of bounds.",eq.NegativeTime="Time cannot be negative.",eq.NoDefault="No default option.",eq.NoConditionMet="None of the conditions were met.",eq.Selector="Selector cannot exceed the number of arguments.",eq.StartEndDate="Start date needs to be earlier than end date.",eq.IncorrectDateTime="String does not represent correct DateTime.",eq.CharacterCodeBounds="Character code out of bounds.",eq.NonZero="Argument cannot be 0.",eq.LessThanOne="Argument cannot be less than 1.",eq.WeekendString="Incorrect weekend bitmask string.",eq.InvalidRoman="Invalid roman numeral.",eq.WrongOrder="Wrong order of values.",eq.ComplexNumberExpected="Complex number expected.",eq.ShouldBeIorJ="Should be 'i' or 'j'.",eq.SizeMismatch="Array dimensions mismatched.",eq.ResultTooLong="Result exceeds the maximum allowed length.",eq.FunctionName=e=>`Function name ${e} not recognized.`,eq.NamedExpressionName=e=>`Named expression ${e} not recognized.`,eq.LicenseKey=e=>`License key is ${e}.`;let eK=(0,eL.createToken)({name:"AdditionOp",pattern:eL.Lexer.NA}),eX=(0,eL.createToken)({name:"PlusOp",pattern:/\+/,categories:eK}),eQ=(0,eL.createToken)({name:"MinusOp",pattern:/-/,categories:eK}),eZ=(0,eL.createToken)({name:"MultiplicationOp",pattern:eL.Lexer.NA}),eJ=(0,eL.createToken)({name:"TimesOp",pattern:/\*/,categories:eZ}),e0=(0,eL.createToken)({name:"DivOp",pattern:/\//,categories:eZ}),e1=(0,eL.createToken)({name:"PowerOp",pattern:/\^/}),e2=(0,eL.createToken)({name:"PercentOp",pattern:/%/}),e3=(0,eL.createToken)({name:"BooleanOp",pattern:eL.Lexer.NA}),e6=(0,eL.createToken)({name:"EqualsOp",pattern:/=/,categories:e3}),e5=(0,eL.createToken)({name:"NotEqualOp",pattern:/<>/,categories:e3}),e4=(0,eL.createToken)({name:"GreaterThanOp",pattern:/>/,categories:e3}),e9=(0,eL.createToken)({name:"LessThanOp",pattern:/</,categories:e3}),e7=(0,eL.createToken)({name:"GreaterThanOrEqualOp",pattern:/>=/,categories:e3}),e8=(0,eL.createToken)({name:"LessThanOrEqualOp",pattern:/<=/,categories:e3}),te=(0,eL.createToken)({name:"ConcatenateOp",pattern:/&/}),tt=(0,eL.createToken)({name:"LParen",pattern:/\(/}),tr=(0,eL.createToken)({name:"RParen",pattern:/\)/}),tn=(0,eL.createToken)({name:"ArrayLParen",pattern:/{/}),to=(0,eL.createToken)({name:"ArrayRParen",pattern:/}/}),ti=(0,eL.createToken)({name:"StringLiteral",pattern:/"([^"\\]*(\\.[^"\\]*)*)"/}),ts=(0,eL.createToken)({name:"ErrorLiteral",pattern:/#[A-Za-z0-9\/]+[?!]?/}),ta=(0,eL.createToken)({name:"RangeSeparator",pattern:RegExp(":")}),tl=(0,eL.createToken)({name:"ColumnRange",pattern:RegExp(`${ep}:${ep}`)}),th=(0,eL.createToken)({name:"RowRange",pattern:RegExp(`${em}:${em}`)}),td=(0,eL.createToken)({name:"ProcedureName",pattern:RegExp(`([${eh}][${ed}]*)\\(`)}),tu=new class{constructor(){this.POSSIBLE_START_CHARACTERS=[...ew,...ey,"$","'","_"],this.cellReferenceRegexp=RegExp(eC,"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)}},tc=(0,eL.createToken)({name:"CellReference",pattern:tu.match.bind(tu),start_chars_hint:tu.POSSIBLE_START_CHARACTERS,line_breaks:!1}),tg=new class{constructor(){this.POSSIBLE_START_CHARACTERS=[...ew,"_"],this.namedExpressionRegexp=RegExp(eb,"y"),this.r1c1CellRefRegexp=RegExp(`^${ef}$`)}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}},tp=(0,eL.createToken)({name:"NamedExpression",pattern:tg.match.bind(tg),start_chars_hint:tg.POSSIBLE_START_CHARACTERS,line_breaks:!1});class tm extends eL.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,eL.EMPTY_ALT)({type:o.EMPTY,leadingWhitespace:null==e?void 0:e.image})}])}),this.procedureExpression=this.RULE("procedureExpression",()=>{var e;let t,r,n,i=this.CONSUME(td),s=i.image.toUpperCase().slice(0,-1),a=null!=(e=this.lexerConfig.functionMapping[s])?e:s,l=[],h=this.SUBRULE(this.booleanExpressionOrEmpty);this.MANY(()=>{var e;let t=this.CONSUME(this.lexerConfig.ArgSeparator);h.type===o.EMPTY&&(h.leadingWhitespace=null==(e=t.leadingWhitespace)?void 0:e.image),l.push(h),h=this.SUBRULE2(this.booleanExpressionOrEmpty)}),l.push(h),1===l.length&&l[0].type===o.EMPTY&&(l.length=0);let d=this.CONSUME(tr);return t=i.leadingWhitespace,r=d.leadingWhitespace,{type:o.FUNCTION_CALL,procedureName:a,args:l,leadingWhitespace:null==t?void 0:t.image,internalWhitespace:null==r?void 0:r.image,hyperlink:n}}),this.namedExpressionExpression=this.RULE("namedExpressionExpression",()=>{let e,t,r=this.CONSUME(tp);return e=r.image,t=r.leadingWhitespace,{type:o.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(tt),this.MANY_SEP({SEP:this.lexerConfig.ArgSeparator,DEF:()=>{e.push(this.SUBRULE(this.booleanExpression))}}),this.CONSUME(tr),this.handleOffsetHeuristic(e)}),this.columnRangeExpression=this.RULE("columnRangeExpression",()=>{var e;let t=this.CONSUME(tl),[r,i]=t.image.split(":"),s=this.ACTION(()=>eA(r,this.formulaAddress,this.resolveSheetReference)),a=this.ACTION(()=>eA(i,this.formulaAddress,this.resolveSheetReference));if(void 0===s||void 0===a)return eB(new rX(d.REF));if(s.exceedsSheetSizeLimits(this.lexerConfig.maxColumns)||a.exceedsSheetSizeLimits(this.lexerConfig.maxColumns))return eU(t.image,new rX(d.NAME),t.leadingWhitespace);if(void 0===s.sheet&&void 0!==a.sheet)return this.parsingError(n.ParserError,"Malformed range expression");let{firstEnd:l,secondEnd:h,sheetRefType:u}=tm.fixSheetIdsForRangeEnds(s,a);return e=t.leadingWhitespace,eW(l,h,u),{type:o.COLUMN_RANGE,start:l,end:h,sheetReferenceType:u,leadingWhitespace:null==e?void 0:e.image}}),this.rowRangeExpression=this.RULE("rowRangeExpression",()=>{var e;let t=this.CONSUME(th),[r,i]=t.image.split(":"),s=this.ACTION(()=>eM(r,this.formulaAddress,this.resolveSheetReference)),a=this.ACTION(()=>eM(i,this.formulaAddress,this.resolveSheetReference));if(void 0===s||void 0===a)return eB(new rX(d.REF));if(s.exceedsSheetSizeLimits(this.lexerConfig.maxRows)||a.exceedsSheetSizeLimits(this.lexerConfig.maxRows))return eU(t.image,new rX(d.NAME),t.leadingWhitespace);if(void 0===s.sheet&&void 0!==a.sheet)return this.parsingError(n.ParserError,"Malformed range expression");let{firstEnd:l,secondEnd:h,sheetRefType:u}=tm.fixSheetIdsForRangeEnds(s,a);return e=t.leadingWhitespace,eW(l,h,u),{type:o.ROW_RANGE,start:l,end:h,sheetReferenceType:u,leadingWhitespace:null==e?void 0:e.image}}),this.cellReference=this.RULE("cellReference",()=>{let e=this.CONSUME(tc),t=this.ACTION(()=>eT(e.image,this.formulaAddress,this.resolveSheetReference));return void 0===t?eU(e.image,new rX(d.REF),e.leadingWhitespace):t.exceedsSheetSizeLimits(this.lexerConfig.maxColumns,this.lexerConfig.maxRows)?eU(e.image,new rX(d.NAME),e.leadingWhitespace):eD(t,e.leadingWhitespace)}),this.endRangeReference=this.RULE("endRangeReference",e=>{var t;let r=this.CONSUME(tc),n=this.ACTION(()=>eT(e.image,this.formulaAddress,this.resolveSheetReference)),o=this.ACTION(()=>eT(r.image,this.formulaAddress,this.resolveSheetReference));return void 0===n||void 0===o?this.ACTION(()=>eU(`${e.image}:${r.image}`,new rX(d.REF),e.leadingWhitespace)):n.exceedsSheetSizeLimits(this.lexerConfig.maxColumns,this.lexerConfig.maxRows)||o.exceedsSheetSizeLimits(this.lexerConfig.maxColumns,this.lexerConfig.maxRows)?this.ACTION(()=>eU(`${e.image}:${r.image}`,new rX(d.NAME),e.leadingWhitespace)):this.buildCellRange(n,o,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),i=this.ACTION(()=>eT(e.image,this.formulaAddress,this.resolveSheetReference));return void 0===i?eB(new rX(d.REF)):r.type===o.CELL_REFERENCE?this.buildCellRange(i,r.reference,null==(t=e.leadingWhitespace)?void 0:t.image):this.parsingError(n.RangeOffsetNotAllowed,"Range offset not allowed here")}}])),this.cellRangeExpression=this.RULE("cellRangeExpression",()=>{let e=this.CONSUME(tc);return this.CONSUME2(ta),this.SUBRULE(this.endOfRangeExpression,{ARGS:[e]})}),this.endRangeWithOffsetStartReference=this.RULE("endRangeWithOffsetStartReference",e=>{let t=this.CONSUME(tc),r=this.ACTION(()=>eT(t.image,this.formulaAddress,this.resolveSheetReference));return void 0===r?this.ACTION(()=>eB(new rX(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===o.CELL_REFERENCE?this.buildCellRange(e.reference,t.reference,e.leadingWhitespace):this.parsingError(n.RangeOffsetNotAllowed,"Range offset not allowed here")}}])),this.offsetExpression=this.RULE("offsetExpression",()=>{let e,t=this.SUBRULE(this.offsetProcedureExpression);return(this.OPTION(()=>{this.CONSUME(ta),e=t.type===o.CELL_RANGE?this.parsingError(n.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))}}])}),eV(e)}),this.parenthesisExpression=this.RULE("parenthesisExpression",()=>{let e,t,r=this.CONSUME(tt),n=this.SUBRULE(this.booleanExpression),i=this.CONSUME(tr);return e=r.leadingWhitespace,t=i.leadingWhitespace,{type:o.PARENTHESIS,expression:n,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(tn),t=this.SUBRULE(this.insideArrayExpression),r=this.CONSUME(to);return eV(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:o.NUMBER,value:e,leadingWhitespace:null==t?void 0:t.image}}},{ALT:()=>{var e,t;return e=this.CONSUME(ti),{type:o.STRING,value:e.image.slice(1,-1),leadingWhitespace:null==(t=e.leadingWhitespace)?void 0:t.image}}},{ALT:()=>{let e=this.CONSUME(ts),t=e.image.toUpperCase(),r=this.lexerConfig.errorMapping[t];return r?eB(new rX(r),e.leadingWhitespace):this.parsingError(n.ParserError,"Unknown error literal")}}])}),this.rightUnaryOpAtomicExpression=this.RULE("rightUnaryOpAtomicExpression",()=>{let e=this.SUBRULE(this.positiveAtomicExpression),t=this.OPTION(()=>this.CONSUME(e2));if(t){let r;return r=t.leadingWhitespace,{type:o.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,eL.tokenMatcher)(e,eX)){let r;return r=e.leadingWhitespace,{type:o.PLUS_UNARY_OP,value:t,leadingWhitespace:null==r?void 0:r.image}}if((0,eL.tokenMatcher)(e,eQ)){let r;return r=e.leadingWhitespace,{type:o.MINUS_UNARY_OP,value:t,leadingWhitespace:null==r?void 0:r.image}}return this.customParsingError=eP(n.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(e1),r=this.SUBRULE2(this.atomicExpression);if((0,eL.tokenMatcher)(t,e1)){let n,i;n=e,i=t.leadingWhitespace,e={type:o.POWER_OP,left:n,right:r,leadingWhitespace:null==i?void 0:i.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(eZ),r=this.SUBRULE2(this.powerExpression);if((0,eL.tokenMatcher)(t,eJ)){let n,i;n=e,i=t.leadingWhitespace,e={type:o.TIMES_OP,left:n,right:r,leadingWhitespace:null==i?void 0:i.image}}else if((0,eL.tokenMatcher)(t,e0)){let n,i;n=e,i=t.leadingWhitespace,e={type:o.DIV_OP,left:n,right:r,leadingWhitespace:null==i?void 0:i.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,eL.tokenMatcher)(t,eX)){let n,i;n=e,i=t.leadingWhitespace,e={type:o.PLUS_OP,left:n,right:r,leadingWhitespace:null==i?void 0:i.image}}else if((0,eL.tokenMatcher)(t,eQ)){let n,i;n=e,i=t.leadingWhitespace,e={type:o.MINUS_OP,left:n,right:r,leadingWhitespace:null==i?void 0:i.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,n=this.CONSUME(te),i=this.SUBRULE2(this.additionExpression);t=e,r=n.leadingWhitespace,e={type:o.CONCATENATE_OP,left:t,right:i,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(e3),r=this.SUBRULE2(this.concatenateExpression);if((0,eL.tokenMatcher)(t,e6)){let n,i;n=e,i=t.leadingWhitespace,e={type:o.EQUALS_OP,left:n,right:r,leadingWhitespace:null==i?void 0:i.image}}else if((0,eL.tokenMatcher)(t,e5)){let n,i;n=e,i=t.leadingWhitespace,e={type:o.NOT_EQUAL_OP,left:n,right:r,leadingWhitespace:null==i?void 0:i.image}}else if((0,eL.tokenMatcher)(t,e4)){let n,i;n=e,i=t.leadingWhitespace,e={type:o.GREATER_THAN_OP,left:n,right:r,leadingWhitespace:null==i?void 0:i.image}}else if((0,eL.tokenMatcher)(t,e9)){let n,i;n=e,i=t.leadingWhitespace,e={type:o.LESS_THAN_OP,left:n,right:r,leadingWhitespace:null==i?void 0:i.image}}else if((0,eL.tokenMatcher)(t,e7)){let n,i;n=e,i=t.leadingWhitespace,e={type:o.GREATER_THAN_OR_EQUAL_OP,left:n,right:r,leadingWhitespace:null==i?void 0:i.image}}else if((0,eL.tokenMatcher)(t,e8)){let n,i;n=e,i=t.leadingWhitespace,e={type:o.LESS_THAN_OR_EQUAL_OP,left:n,right:r,leadingWhitespace:null==i?void 0:i.image}}else this.ACTION(()=>{throw Error("Operator not supported")})}),e}),this.formula=this.RULE("formula",()=>(this.CONSUME(e6),this.SUBRULE(this.booleanExpression))),this.lexerConfig=e,this.formulaAddress=r1(0,0,0),this.performSelfAnalysis()}parseFromTokens(e,t){this.input=e;let r=this.formulaWithContext(t),o=[];return this.customParsingError&&o.push(this.customParsingError),(o=o.concat(this.errors.map(e=>({type:n.ParserError,message:e.message})))).length>0&&(r=ez()),{ast:r,errors:o}}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(n.ParserError,"Malformed range expression");let{firstEnd:o,secondEnd:i,sheetRefType:s}=tm.fixSheetIdsForRangeEnds(e,t);return eF(o,i,s,r)}static fixSheetIdsForRangeEnds(e,t){let r=tm.rangeSheetReferenceType(e.sheet,t.sheet),n=void 0!==e.sheet&&void 0===t.sheet?t.withSheet(e.sheet):t;return{firstEnd:e,secondEnd:n,sheetRefType:r}}handleOffsetHeuristic(e){var r;let s,a,l,h,u=e[0];if(u.type!==o.CELL_REFERENCE)return this.parsingError(n.StaticOffsetError,"First argument to OFFSET is not a reference");let c=e[1];if(c.type===o.NUMBER&&Number.isInteger(c.value))s=c.value;else if(c.type===o.PLUS_UNARY_OP&&c.value.type===o.NUMBER&&Number.isInteger(c.value.value))s=c.value.value;else{if(!(c.type===o.MINUS_UNARY_OP&&c.value.type===o.NUMBER&&Number.isInteger(c.value.value)))return this.parsingError(n.StaticOffsetError,"Second argument to OFFSET is not a static number");s=-c.value.value}let g=e[2];if(g.type===o.NUMBER&&Number.isInteger(g.value))a=g.value;else if(g.type===o.PLUS_UNARY_OP&&g.value.type===o.NUMBER&&Number.isInteger(g.value.value))a=g.value.value;else{if(!(g.type===o.MINUS_UNARY_OP&&g.value.type===o.NUMBER&&Number.isInteger(g.value.value)))return this.parsingError(n.StaticOffsetError,"Third argument to OFFSET is not a static number");a=-g.value.value}let p=e[3];if(void 0===p)l=1;else{if(p.type!==o.NUMBER)return this.parsingError(n.StaticOffsetError,"Fourth argument to OFFSET is not a static number");if((l=p.value)<1)return this.parsingError(n.StaticOffsetError,"Fourth argument to OFFSET is too small number");if(!Number.isInteger(l))return this.parsingError(n.StaticOffsetError,"Fourth argument to OFFSET is not integer")}let m=e[4];if(void 0===m)h=1;else{if(m.type!==o.NUMBER)return this.parsingError(n.StaticOffsetError,"Fifth argument to OFFSET is not a static number");if((h=m.value)<1)return this.parsingError(n.StaticOffsetError,"Fifth argument to OFFSET is too small number");if(!Number.isInteger(h))return this.parsingError(n.StaticOffsetError,"Fifth argument to OFFSET is not integer")}let f=new el(u.reference.col+a,u.reference.row+s,u.reference.type,null!=(r=u.reference.sheet)?r:void 0),C=f.col,b=f.row;if((u.reference.type===t.CELL_REFERENCE_RELATIVE||u.reference.type===t.CELL_REFERENCE_ABSOLUTE_COL)&&(b+=this.formulaAddress.row),(u.reference.type===t.CELL_REFERENCE_RELATIVE||u.reference.type===t.CELL_REFERENCE_ABSOLUTE_ROW)&&(C+=this.formulaAddress.col),C<0||b<0)return eB(new rX(d.REF,eq.OutOfSheet));if(1===h&&1===l)return eD(f);{let e=new el(f.col+h-1,f.row+l-1,f.type,f.sheet);return eF(f,e,null==u.reference.sheet?i.RELATIVE:i.BOTH_ABSOLUTE)}}parsingError(e,t){return this.customParsingError=eP(e,t),ez()}static rangeSheetReferenceType(e,t){return void 0===e?i.RELATIVE:void 0===t?i.START_ABSOLUTE:i.BOTH_ABSOLUTE}}class tf{constructor(e){this.lexerConfig=e,this.lexer=new eL.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 tf.filterTokensByNeighbors(e,(e,t,r)=>((0,eL.tokenMatcher)(e,tc)||(0,eL.tokenMatcher)(e,ta))&&(0,eL.tokenMatcher)(t,this.lexerConfig.WhiteSpace)&&((0,eL.tokenMatcher)(r,tc)||(0,eL.tokenMatcher)(r,ta)))}skipWhitespacesBeforeArgSeparators(e){return tf.filterTokensByNeighbors(e,(e,t,r)=>!(0,eL.tokenMatcher)(e,this.lexerConfig.ArgSeparator)&&(0,eL.tokenMatcher)(t,this.lexerConfig.WhiteSpace)&&(0,eL.tokenMatcher)(r,this.lexerConfig.ArgSeparator))}static filterTokensByNeighbors(e,t){if(e.length<3)return e;let r=0,n=[e[r++]];for(;r<e.length-1;)t(e[r-1],e[r],e[r+1])||n.push(e[r]),++r;return n.push(e[r]),n}trimTrailingWhitespaces(e){return e.length>0&&(0,eL.tokenMatcher)(e[e.length-1],this.lexerConfig.WhiteSpace)&&e.pop(),e}}class tC{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,n;switch(e.type){case o.EMPTY:return eG("",e.leadingWhitespace);case o.NUMBER:return eG(tb(e.value,this.config.decimalSeparator),e.leadingWhitespace);case o.STRING:return eG('"'+e.value+'"',e.leadingWhitespace);case o.FUNCTION_CALL:{let r=e.args.map(e=>void 0!==e?this.unparseAst(e,t):"").join(this.config.functionArgSeparator),n=(this.config.translationPackage.isFunctionTranslated(e.procedureName)?this.config.translationPackage.getFunctionTranslation(e.procedureName):e.procedureName)+"("+r+eG(")",e.internalWhitespace);return eG(n,e.leadingWhitespace)}case o.NAMED_EXPRESSION:return eG((null==(r=this.namedExpressions.nearestNamedExpression(e.expressionName,t.sheet))?void 0:r.displayName)||e.expressionName,e.leadingWhitespace);case o.CELL_REFERENCE:return eG((void 0!==e.reference.sheet?this.unparseSheetName(e.reference.sheet)+"!":"")+(null!=(n=e.reference.unparse(t))?n:this.config.translationPackage.getErrorTranslation(d.REF)),e.leadingWhitespace);case o.COLUMN_RANGE:case o.ROW_RANGE:case o.CELL_RANGE:return eG(this.formatRange(e,t),e.leadingWhitespace);case o.PLUS_UNARY_OP:{let r=this.unparseAst(e.value,t);return eG("+",e.leadingWhitespace)+r}case o.MINUS_UNARY_OP:{let r=this.unparseAst(e.value,t);return eG("-",e.leadingWhitespace)+r}case o.PERCENT_OP:return this.unparseAst(e.value,t)+eG("%",e.leadingWhitespace);case o.ERROR:return eG(this.config.translationPackage.getErrorTranslation(e.error?e.error.type:d.ERROR),e.leadingWhitespace);case o.ERROR_WITH_RAW_INPUT:return eG(e.rawInput,e.leadingWhitespace);case o.PARENTHESIS:{let r="("+this.unparseAst(e.expression,t)+eG(")",e.internalWhitespace);return eG(r,e.leadingWhitespace)}case o.ARRAY:{let r="{"+e.args.map(e=>e.map(e=>this.unparseAst(e,t)).join(this.config.arrayColumnSeparator)).join(this.config.arrayRowSeparator)+eG("}",e.internalWhitespace);return eG(r,e.leadingWhitespace)}default:{let r=this.unparseAst(e.left,t),n=this.unparseAst(e.right,t);return r+eG(e$[e.type],e.leadingWhitespace)+n}}}unparseSheetName(e){let t=ek(e,e=>this.sheetMapping.getSheetNameOrThrowError(e,{includePlaceholders:!0}));if(void 0===t)throw new tX(e);return t}formatRange(e,t){let r="",n="";void 0!==e.start.sheet&&e.sheetReferenceType!==i.RELATIVE&&(r=this.unparseSheetName(e.start.sheet)+"!"),void 0!==e.end.sheet&&e.sheetReferenceType===i.BOTH_ABSOLUTE&&(n=this.unparseSheetName(e.end.sheet)+"!");let o=e.start.unparse(t),s=e.end.unparse(t);return void 0===o||void 0===s?this.config.translationPackage.getErrorTranslation(d.REF):`${r}${o}:${n}${s}`}}function tb(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,n=e.translationPackage.getFunctionTranslation("OFFSET"),o=e.errorMapping,i=e.translationPackage.buildFunctionMapping(),s=new RegExp("standard"===e.ignoreWhiteSpace?"[ \\t\\n\\r]+":"\\s+"),a=(0,eL.createToken)({name:"WhiteSpace",pattern:s}),l=(0,eL.createToken)({name:"ArrayRowSep",pattern:e.arrayRowSeparator}),h=(0,eL.createToken)({name:"ArrayColSep",pattern:e.arrayColumnSeparator}),d=(0,eL.createToken)({name:"NumberLiteral",pattern:RegExp(`(([${e.decimalSeparator}]\\d+)|(\\d+([${e.decimalSeparator}]\\d*)?))(e[+-]?\\d+)?`)}),u=(0,eL.createToken)({name:"OffsetProcedureName",pattern:RegExp(n,"i")});e.functionArgSeparator===e.arrayColumnSeparator?(t=h,r=[]):e.functionArgSeparator===e.arrayRowSeparator?(t=l,r=[]):r=[t=(0,eL.createToken)({name:"ArgSeparator",pattern:e.functionArgSeparator})];let c=[a,eX,eQ,eJ,e0,e1,e6,e5,e2,e7,e8,e4,e9,tt,tr,tn,to,u,td,ta,...r,tl,th,d,ti,ts,te,e3,eK,eZ,tc,tp,l,h];return{ArgSeparator:t,NumberLiteral:d,OffsetProcedureName:u,ArrayRowSeparator:l,ArrayColSeparator:h,WhiteSpace:a,allTokens:c,errorMapping:o,functionMapping:i,decimalSeparator:e.decimalSeparator,maxColumns:e.maxColumns,maxRows:e.maxRows}})(e),this.lexer=new tf(this.lexerConfig),this.formulaParser=new tm(this.lexerConfig,this.resolveSheetReference),this.cache=new ej(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:n.LexingError,message:e.message}));return{ast:ez(),errors:e,hasVolatileFunction:!1,hasStructuralChangeFunction:!1,dependencies:[]}}let o=this.computeHashFromTokens(r.tokens,t),i=this.cache.get(o);if(void 0!==i)++this.statsCacheUsed;else{let e=this.bindWhitespacesToTokens(r.tokens),n=this.formulaParser.parseFromTokens(e,t);if(n.errors.length>0)return Object.assign(Object.assign({},n),{hasVolatileFunction:!1,hasStructuralChangeFunction:!1,dependencies:[]});i=this.cache.set(o,n.ast)}let{ast:s,hasVolatileFunction:a,hasStructuralChangeFunction:l}=i,h=this.convertReversedRangesToRegularRanges(s),d=tS(h,this.functionRegistry);return{ast:h,errors:[],hasVolatileFunction:a,hasStructuralChangeFunction:l,dependencies:d}}convertReversedRangesToRegularRanges(e){switch(e.type){case o.EMPTY:case o.NUMBER:case o.STRING:case o.ERROR:case o.ERROR_WITH_RAW_INPUT:case o.CELL_REFERENCE:case o.NAMED_EXPRESSION:return e;case o.CELL_RANGE:{let{start:t,end:r}=e,n=this.orderCellRangeEnds(t,r);return Object.assign(Object.assign({},e),{start:n.start,end:n.end})}case o.COLUMN_RANGE:{let{start:t,end:r}=e,n=this.orderColumnRangeEnds(t,r);return Object.assign(Object.assign({},e),{start:n.start,end:n.end})}case o.ROW_RANGE:{let{start:t,end:r}=e,n=this.orderRowRangeEnds(t,r);return Object.assign(Object.assign({},e),{start:n.start,end:n.end})}case o.PERCENT_OP:case o.PLUS_UNARY_OP:case o.MINUS_UNARY_OP:{let t=this.convertReversedRangesToRegularRanges(e.value);return Object.assign(Object.assign({},e),{value:t})}case o.CONCATENATE_OP:case o.EQUALS_OP:case o.NOT_EQUAL_OP:case o.LESS_THAN_OP:case o.GREATER_THAN_OP:case o.LESS_THAN_OR_EQUAL_OP:case o.GREATER_THAN_OR_EQUAL_OP:case o.MINUS_OP:case o.PLUS_OP:case o.TIMES_OP:case o.DIV_OP:case o.POWER_OP:{let t=this.convertReversedRangesToRegularRanges(e.left),r=this.convertReversedRangesToRegularRanges(e.right);return Object.assign(Object.assign({},e),{left:t,right:r})}case o.PARENTHESIS:{let t=this.convertReversedRangesToRegularRanges(e.expression);return Object.assign(Object.assign({},e),{expression:t})}case o.FUNCTION_CALL:{let t=e.args.map(e=>this.convertReversedRangesToRegularRanges(e));return Object.assign(Object.assign({},e),{args:t})}case o.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],[n,o]=r.map(e=>e.toColumnAddress()).sort(es.compareByAbsoluteAddress(this.formulaAddress)),[i,s]=r.map(e=>e.toRowAddress()).sort(ea.compareByAbsoluteAddress(this.formulaAddress)),[a,l]=r.map(e=>e.sheet).sort(ty.compareSheetIds.bind(this));return{start:el.fromColAndRow(n,i,a),end:el.fromColAndRow(o,s,l)}}orderColumnRangeEnds(e,t){let r=[e,t],[n,o]=r.sort(es.compareByAbsoluteAddress(this.formulaAddress)),[i,s]=r.map(e=>e.sheet).sort(ty.compareSheetIds.bind(this));return{start:new es(n.type,n.col,i),end:new es(o.type,o.col,s)}}orderRowRangeEnds(e,t){let r=[e,t],[n,o]=r.sort(ea.compareByAbsoluteAddress(this.formulaAddress)),[i,s]=r.map(e=>e.sheet).sort(ty.compareSheetIds.bind(this));return{start:new ea(n.type,n.row,i),end:new ea(o.type,o.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:n,relativeDependencies:o}=t;return{ast:e,errors:[],hasVolatileFunction:r,hasStructuralChangeFunction:n,dependencies:o}}}computeHashFromTokens(e,t){var r;let n="",o=0;for(;o<e.length;){let i=e[o];if((0,eL.tokenMatcher)(i,tc)){let e=eT(i.image,t,this.resolveSheetReference);n=void 0===e?n.concat(i.image):n.concat(e.hash(!0))}else if((0,eL.tokenMatcher)(i,td)){let e=i.image.toUpperCase().slice(0,-1),t=null!=(r=this.lexerConfig.functionMapping[e])?r:e;n=n.concat(t,"(")}else if((0,eL.tokenMatcher)(i,tl)){let[e,r]=i.image.split(":"),o=eA(e,t,this.resolveSheetReference),s=eA(r,t,this.resolveSheetReference);n=void 0===o||void 0===s?n.concat("!REF"):n.concat(o.hash(!0),":",s.hash(!0))}else if((0,eL.tokenMatcher)(i,th)){let[e,r]=i.image.split(":"),o=eM(e,t,this.resolveSheetReference),s=eM(r,t,this.resolveSheetReference);n=void 0===o||void 0===s?n.concat("!REF"):n.concat(o.hash(!0),":",s.hash(!0))}else n=n.concat(i.image);o++}return n}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 o.EMPTY:return e.leadingWhitespace||"";case o.NUMBER:return eG(tb(e.value,this.config.decimalSeparator),e.leadingWhitespace);case o.STRING:return eG('"'+e.value+'"',e.leadingWhitespace);case o.NAMED_EXPRESSION:return eG(e.expressionName,e.leadingWhitespace);case o.FUNCTION_CALL:{let t=e.args.map(e=>this.computeHashOfAstNode(e)).join(this.config.functionArgSeparator),r=e.procedureName+"("+t+eG(")",e.internalWhitespace);return eG(r,e.leadingWhitespace)}case o.CELL_REFERENCE:return eG(e.reference.hash(!0),e.leadingWhitespace);case o.COLUMN_RANGE:case o.ROW_RANGE:case o.CELL_RANGE:return eG(e.start.hash(e.sheetReferenceType!==i.RELATIVE)+":"+e.end.hash(e.sheetReferenceType===i.BOTH_ABSOLUTE),e.leadingWhitespace);case o.MINUS_UNARY_OP:return eG("-"+this.computeHashOfAstNode(e.value),e.leadingWhitespace);case o.PLUS_UNARY_OP:return eG("+"+this.computeHashOfAstNode(e.value),e.leadingWhitespace);case o.PERCENT_OP:return this.computeHashOfAstNode(e.value)+eG("%",e.leadingWhitespace);case o.ERROR:return eG(this.config.translationPackage.getErrorTranslation(e.error?e.error.type:d.ERROR),e.leadingWhitespace);case o.ERROR_WITH_RAW_INPUT:return eG(e.rawInput,e.leadingWhitespace);case o.ARRAY:return eG("{"+e.args.map(e=>e.map(e=>this.computeHashOfAstNode(e)).join(",")).join(";")+eG("}",e.internalWhitespace),e.leadingWhitespace);case o.PARENTHESIS:{let t="("+this.computeHashOfAstNode(e.expression)+eG(")",e.internalWhitespace);return eG(t,e.leadingWhitespace)}default:return this.computeHashOfAstNode(e.left)+eG(e$[e.type],e.leadingWhitespace)+this.computeHashOfAstNode(e.right)}}bindWhitespacesToTokens(e){let t=[],r=e[0];(0,eL.tokenMatcher)(r,this.lexerConfig.WhiteSpace)||t.push(r);for(let r=1;r<e.length;++r){let n=e[r];if((0,eL.tokenMatcher)(n,this.lexerConfig.WhiteSpace))continue;let o=e[r-1];(0,eL.tokenMatcher)(o,this.lexerConfig.WhiteSpace)&&(n.leadingWhitespace=o),t.push(n)}return t}tokenizeFormula(e){return this.lexer.tokenizeFormula(e)}}let tw=(e,t,r,n)=>{switch(e.type){case o.EMPTY:case o.NUMBER:case o.STRING:case o.ERROR:return;case o.NAMED_EXPRESSION:n&&r.push(new tA(e.expressionName));return;case o.CELL_REFERENCE:n&&r.push(new tv(e.reference));return;case o.CELL_RANGE:n&&e.start.sheet===e.end.sheet&&r.push(new tR(e.start,e.end));return;case o.COLUMN_RANGE:n&&e.start.sheet===e.end.sheet&&r.push(new tE(e.start,e.end));return;case o.ROW_RANGE:n&&e.start.sheet===e.end.sheet&&r.push(new tT(e.start,e.end));return;case o.PERCENT_OP:case o.PLUS_UNARY_OP:case o.MINUS_UNARY_OP:return void tw(e.value,t,r,!0);case o.CONCATENATE_OP:case o.EQUALS_OP:case o.NOT_EQUAL_OP:case o.LESS_THAN_OP:case o.GREATER_THAN_OP:case o.LESS_THAN_OR_EQUAL_OP:case o.GREATER_THAN_OR_EQUAL_OP:case o.MINUS_OP:case o.PLUS_OP:case o.TIMES_OP:case o.DIV_OP:case o.POWER_OP:tw(e.left,t,r,!0),tw(e.right,t,r,!0);return;case o.PARENTHESIS:tw(e.expression,t,r,n);return;case o.FUNCTION_CALL:{let n=!t.doesFunctionNeedArgumentToBeComputed(e.procedureName);e.args.forEach(e=>tw(e,t,r,n));return}}},tS=(e,t)=>{let r=[];return tw(e,t,r,!0),r};class tv{constructor(e){this.dependency=e}absolutize(e){return this.dependency.toSimpleCellAddress(e)}}class tR{constructor(e,t){this.start=e,this.end=t}absolutize(e){return new ne(this.start.toSimpleCellAddress(e),this.end.toSimpleCellAddress(e))}}class tE{constructor(e,t){this.start=e,this.end=t}absolutize(e){let t=this.start.toSimpleColumnAddress(e),r=this.end.toSimpleColumnAddress(e);return new nt(t.sheet,t.col,r.col)}}class tT{constructor(e,t){this.start=e,this.end=t}absolutize(e){let t=this.start.toSimpleRowAddress(e),r=this.end.toSimpleRowAddress(e);return new nr(t.sheet,t.row,r.row)}}class tA{constructor(e){this.name=e}absolutize(e){return this}}let tM=(e,t)=>e.map(e=>e.absolutize(t)),tN=Symbol("Empty value");function tI(e){return e instanceof tx?e.val:e}class tx{constructor(e,t){this.val=e,this.format=t}fromNumber(e){return new this.constructor(e)}}function tO(e,t){if("number"==typeof e)return t;{let r=e.fromNumber(t);return r.format=e.format,r}}class tk extends tx{getDetailedType(){return s.NUMBER_DATE}}class t_ extends tx{getDetailedType(){return s.NUMBER_CURRENCY}}class tH extends tx{getDetailedType(){return s.NUMBER_TIME}}class tL extends tx{getDetailedType(){return s.NUMBER_DATETIME}}class tP extends tx{getDetailedType(){return s.NUMBER_PERCENT}}function tD(e){return"number"==typeof e||e instanceof tx}function tF(e){return e instanceof tx?{type:e.getDetailedType(),format:e.format}:{type:s.NUMBER_RAW}}(I=s||(s={})).NUMBER_RAW="NUMBER_RAW",I.NUMBER_DATE="NUMBER_DATE",I.NUMBER_TIME="NUMBER_TIME",I.NUMBER_DATETIME="NUMBER_DATETIME",I.NUMBER_CURRENCY="NUMBER_CURRENCY",I.NUMBER_PERCENT="NUMBER_PERCENT";class tV{constructor(e,t,r,n){this._data=e,this.range=t,this.dependencyGraph=r,this._hasOnlyNumbers=n,this.size=void 0===e?new nE(t.effectiveWidth(r),t.effectiveHeight(r)):new nE(e[0].length,e.length)}get data(){return this.ensureThatComputed(),this._data}static fromRange(e,t,r){return new tV(e,t,r,!0)}static onlyNumbers(e){return new tV(e,void 0,void 0,!0)}static onlyValues(e){return new tV(e,void 0,void 0,void 0)}static onlyRange(e,t){return new tV(void 0,e,t,void 0)}static fromScalar(e){return new tV([[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 n=0;n<r.length;++n)yield r1(e.sheet,e.col+n,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],r1(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 tV?(this._hasOnlyNumbers=!1,new rX(d.VALUE,eq.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 n=e.exportChange(r);Array.isArray(n)?t=t.concat(n):t.push(n)}),t}getChanges(){return Array.from(this.changes.values())}isEmpty(){return 0===this.changes.size}add(e,t){let r=t.value;if(r instanceof tV)for(let t of r.effectiveAddressesFromData(e))this.changes.delete(r6(t));this.changes.set(r6(e),t)}addInterpreterValue(e,t,r){this.add(t,{address:t,value:e,oldValue:r})}}class tU{constructor(e,t,r,n){this.displayName=e,this.address=t,this.added=r,this.options=n}normalizeExpressionName(){return this.displayName.toLowerCase()}copy(){return new tU(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 tW{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 tG{constructor(){this.nextNamedExpressionRow=0,this.workbookStore=new tz,this.worksheetStores=new Map,this.addressCache=new Map}isNameAvailable(e,t){var r,n;return void 0===t?this.workbookStore.isNameAvailable(e):null==(n=null==(r=this.worksheetStore(t))?void 0:r.isNameAvailable(e))||n}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,n;return null!=(n=null==(r=this.worksheetStore(t))?void 0:r.get(e))?n:this.workbookStore.getExisting(e)}isExpressionInScope(e,t){var r,n;return null!=(n=null==(r=this.worksheetStore(t))?void 0:r.has(e))&&n}isNameValid(e){let t=RegExp(`^${eg}$`),r=RegExp(`^${ef}$`),n=RegExp(`^${eb}$`);return!(t.test(e)||r.test(e))&&n.test(e)}addNamedExpression(e,t,r){let n=void 0===t?this.workbookStore:this.worksheetStoreOrCreate(t),o=n.get(e);return void 0!==o?(o.added=!0,o.displayName=e,o.options=r):(o=new tU(e,this.nextAddress(),!0,r),n.add(o)),this.addressCache.set(o.address.row,o),o}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 tU(e,this.nextAddress(),!1),this.workbookStore.add(t)),t}remove(e,t){let r,n=null==(r=void 0===t?this.workbookStore:this.worksheetStore(t))?void 0:r.get(e);if(void 0===r||void 0===n||!n.added)throw Error("Named expression does not exist");r.remove(e),r instanceof tW&&0===r.mapping.size&&this.worksheetStores.delete(t),this.addressCache.delete(n.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 tW,this.worksheetStores.set(e,t)),t}worksheetStore(e){return this.worksheetStores.get(e)}nextAddress(){return r1(tG.SHEET_FOR_WORKBOOK_EXPRESSIONS,0,this.nextNamedExpressionRow++)}}tG.SHEET_FOR_WORKBOOK_EXPRESSIONS=-1;let t$=e=>{switch(e.type){case o.EMPTY:case o.NUMBER:case o.STRING:case o.ERROR:case o.ERROR_WITH_RAW_INPUT:return!1;case o.CELL_REFERENCE:return!e.reference.isAbsolute();case o.CELL_RANGE:case o.COLUMN_RANGE:case o.ROW_RANGE:return!e.start.isAbsolute();case o.NAMED_EXPRESSION:return!1;case o.PERCENT_OP:case o.PLUS_UNARY_OP:case o.MINUS_UNARY_OP:return t$(e.value);case o.CONCATENATE_OP:case o.EQUALS_OP:case o.NOT_EQUAL_OP:case o.LESS_THAN_OP:case o.GREATER_THAN_OP:case o.LESS_THAN_OR_EQUAL_OP:case o.GREATER_THAN_OR_EQUAL_OP:case o.MINUS_OP:case o.PLUS_OP:case o.TIMES_OP:case o.DIV_OP:case o.POWER_OP:return t$(e.left)||t$(e.right);case o.PARENTHESIS:return t$(e.expression);case o.FUNCTION_CALL:return e.args.some(e=>t$(e));case o.ARRAY:return e.args.some(e=>e.some(e=>t$(e)))}};class tj{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 tj(e,t,t+r-1)}static fromRowStartAndEnd(e,t,r){return new tj(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 tj(this.sheet,t,r)}firstRow(){return new tj(this.sheet,this.rowStart,this.rowStart)}}class tY{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 tY(e,t,t+r-1)}static fromColumnStartAndEnd(e,t,r){return new tY(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 tY(this.sheet,t,r)}firstColumn(){return new tY(this.sheet,this.columnStart,this.columnStart)}}(x=a||(a={})).BUILD_ENGINE_TOTAL="BUILD_ENGINE_TOTAL",x.PARSER="PARSER",x.GRAPH_BUILD="GRAPH_BUILD",x.COLLECT_DEPENDENCIES="COLLECT_DEPENDENCIES",x.PROCESS_DEPENDENCIES="PROCESS_DEPENDENCIES",x.TOP_SORT="TOP_SORT",x.BUILD_COLUMN_INDEX="BUILD_COLUMN_INDEX",x.EVALUATION="EVALUATION",x.VLOOKUP="VLOOKUP",x.TRANSFORM_ASTS="TRANSFORM_ASTS",x.TRANSFORM_ASTS_POSTPONED="TRANSFORM_ASTS_POSTPONED",x.ADJUSTING_ADDRESS_MAPPING="ADJUSTING_ADDRESS_MAPPING",x.ADJUSTING_ARRAY_MAPPING="ADJUSTING_ARRAY_MAPPING",x.ADJUSTING_RANGES="ADJUSTING_RANGES",x.ADJUSTING_GRAPH="ADJUSTING_GRAPH",x.CRITERION_FUNCTION_FULL_CACHE_USED="CRITERION_FUNCTION_FULL_CACHE_USED",x.CRITERION_FUNCTION_PARTIAL_CACHE_USED="CRITERION_FUNCTION_PARTIAL_CACHE_USED";class tq{constructor(){this.stats=new Map([[a.CRITERION_FUNCTION_FULL_CACHE_USED,0],[a.CRITERION_FUNCTION_PARTIAL_CACHE_USED,0]]),this.startTimes=new Map}incrementCriterionFunctionFullCacheUsed(){var e;let t=(null!=(e=this.stats.get(a.CRITERION_FUNCTION_FULL_CACHE_USED))?e:0)+1;this.stats.set(a.CRITERION_FUNCTION_FULL_CACHE_USED,t)}incrementCriterionFunctionPartialCacheUsed(){var e;let t=(null!=(e=this.stats.get(a.CRITERION_FUNCTION_PARTIAL_CACHE_USED))?e:0)+1;this.stats.set(a.CRITERION_FUNCTION_PARTIAL_CACHE_USED,t)}reset(){this.stats.clear(),this.startTimes.clear(),this.stats.set(a.CRITERION_FUNCTION_FULL_CACHE_USED,0),this.stats.set(a.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(),n=this.startTimes.get(e);if(n){let o=null!=(t=this.stats.get(e))?t:0;o+=r-n,this.stats.set(e,o),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 tq{incrementCriterionFunctionFullCacheUsed(){}incrementCriterionFunctionPartialCacheUsed(){}start(e){}end(e){}}class tX extends Error{constructor(e){super(`There's no sheet with id = ${e}`)}}class tQ extends Error{constructor(e){super(`There's no sheet with name '${e}'`)}}class tZ extends Error{constructor(e){super(`Sheet with name ${e} already exists`)}}class tJ extends Error{constructor(){super("Sheet size limit exceeded")}}class t0 extends Error{constructor(){super("This is not a formula")}}class t1 extends Error{constructor(e){super(`Address (row = ${e.row}, col = ${e.col}) is invalid`)}}class t2 extends Error{constructor(e){super(`Invalid arguments, expected ${e}`)}}class t3 extends Error{constructor(e,t){super(`Sheets ${e} and ${t} are not equal.`)}}class t6 extends Error{constructor(e){super(`Name of Named Expression '${e}' is already present`)}}class t5 extends Error{constructor(e){super(`Name of Named Expression '${e}' is invalid`)}}class t4 extends Error{constructor(e){super(`Named Expression '${e}' does not exist`)}}class t9 extends Error{constructor(){super("There is no operation to undo")}}class t7 extends Error{constructor(){super("There is no operation to redo")}}class t8 extends Error{constructor(){super("There is nothing to paste")}}function re(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 rt extends Error{constructor(e){super(`Unable to parse value: ${JSON.stringify(e,re,4)}`)}}class rr extends Error{constructor(e,t){super(`Expected value of type: ${e} for config parameter: ${t}`)}}class rn extends Error{constructor(e){super(`Config parameter ${e} cannot be empty.`)}}class ro extends Error{constructor(e,t){super(`Config parameter ${e} should be at least ${t}`)}}class ri extends Error{constructor(e,t){super(`Config parameter ${e} should be at most ${t}`)}}class rs extends Error{constructor(e,t){super(`Expected one of ${e} for config parameter: ${t}`)}}class ra 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 rh extends Error{constructor(e){super(`Cannot register translation for function with id: ${e}`)}}class rd extends Error{constructor(){super("Language not registered.")}}class ru extends Error{constructor(){super("Language already registered.")}}class rc extends Error{static functionNotDeclaredInPlugin(e,t){return new rc(`Function with id ${e} not declared in plugin ${t}`)}static functionMethodNotFound(e,t){return new rc(`Function method ${e} not found in plugin ${t}`)}}class rg extends Error{static cannotRegisterFunctionWithId(e){return new rg(`Cannot register function with id ${e}`)}static cannotUnregisterFunctionWithId(e){return new rg(`Cannot unregister function with id ${e}`)}static cannotUnregisterProtectedPlugin(){return new rg("Cannot unregister protected plugin")}}class rp extends Error{constructor(){super("Cannot perform this operation, source location has an array inside.")}}class rm extends Error{constructor(){super("Cannot perform this operation, target location has an array inside.")}}class rf extends Error{constructor(){super("Relative addresses not allowed in named expressions.")}}class rC extends Error{constructor(e,t){super(`Alias id ${e} in plugin ${t} already defined as a function or alias.`)}}class rb{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 tX(e.sheet);return}let n=r.getCell(e);if(!n&&t.throwIfCellNotExists)throw Error("Vertex for address missing in AddressMapping");return n}getCellOrThrow(e){let t=this.mapping.get(e.sheet);if(!t)throw new tX(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 tX(e);return t}addSheetWithStrategy(e,t,r={throwIfSheetAlreadyExists:!0}){let n=this.mapping.get(e);if(n){if(r.throwIfSheetAlreadyExists)throw Error("Sheet already added");return n}return this.mapping.set(e,t),t}addSheetOrChangeStrategy(e,t){let r=this.createStrategyBasedOnBoundaries(t),n=this.mapping.get(e);return n?r instanceof r$?n:(this.moveStrategyContent(n,r,e),this.mapping.set(e,r),r):(this.mapping.set(e,r),r)}moveStrategyContent(e,t,r){for(let[n,o]of e.getEntries(r))t.setCell(n,o)}addSheetAndSetStrategyBasedOnBoundaries(e,t,r={throwIfSheetAlreadyExists:!0}){this.addSheetWithStrategy(e,this.createStrategyBasedOnBoundaries(t),r)}createStrategyBasedOnBoundaries(e){let{height:t,width:r,fill:n}=e;return new(this.policy.call(n))(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?tN:t instanceof rA?t.getArrayCellValue(e):t.getCellValue()}getRawValue(e){let t=this.getCell(e);return t instanceof rz?t.getValues().rawValue:t instanceof rA?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 n=r.getCell(e);if(void 0===n)throw Error("Cannot move cell. No cell with such address.");this.setCell(t,n),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(r6(e))}setArray(e,t){this.arrayMapping.set(r6(e.start),t)}removeArray(e){"string"==typeof e?this.arrayMapping.delete(e):this.arrayMapping.delete(r6(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,n)=>{let o=n.getRange();return t<=o.start.row?[o.shifted(0,r),n]:void 0})}moveArrayVerticesAfterColumnByColumns(e,t,r){this.updateArrayVerticesInSheet(e,(e,n)=>{let o=n.getRange();return t<=o.start.col?[o.shifted(r,0),n]:void 0})}updateArrayVerticesInSheet(e,t){let r=[];for(let[n,o]of this.arrayMapping.entries()){if(o.sheet!==e)continue;let i=t(n,o);void 0!==i&&(this.removeArray(n),r.push(i))}r.forEach(([e,t])=>{this.setArray(e,t)})}}class rw{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 rS{constructor(e){if(this.size=new nE(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 rS(e instanceof tV?e.data:[[e]])}simpleRangeValue(){return tV.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(tN));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 n=0;n<e;++n)r.push(Array(t).fill(tN));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 rv{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 rR{}class rE extends rR{constructor(){super()}}class rT extends rE{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,n){return r.isScalar()?new rM(e,t,n):new rA(e,t,r,n)}getFormula(e){return this.ensureRecentData(e),this.formula}ensureRecentData(e){if(this.version!=e.version()){let[t,r,n]=e.applyTransformations(this.formula,this.cellAddress,this.version);this.formula=t,this.cellAddress=r,this.version=n}}getAddress(e){return this.ensureRecentData(e),this.cellAddress}}class rA extends rT{constructor(e,t,r,n=0){super(e,t,n),r.isRef?this.array=new rv(new rX(d.REF,eq.NoSpaceForArrayResult),nE.error()):this.array=new rw(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 rX)return this.setErrorValue(e),e;let t=rS.fromInterpreterValue(e);return t.resize(this.array.size),this.array=t,e}getCellValue(){if(this.array instanceof rw)throw Error("Array not computed yet.");return this.array.simpleRangeValue()}valueOrUndef(){if(!(this.array instanceof rw))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 rX(d.REF)}}getArrayCellRawValue(e){let t=this.getArrayCellValue(e);if(!(t instanceof rX)&&t!==tN)return tI(t)}setArrayCellValue(e,t){let r=e.col-this.cellAddress.col,n=e.row-this.cellAddress.row;this.array instanceof rS&&this.array.set(r,n,t)}setNoSpace(){return this.array=new rv(new rX(d.SPILL,eq.NoSpaceForArrayResult),nE.error()),this.getCellValue()}getRange(){return ne.spanFrom(this.cellAddress,this.width,this.height)}getRangeOrUndef(){return ne.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 rw)}columnsFromArray(){return tY.fromNumberOfColumns(this.cellAddress.sheet,this.cellAddress.col,this.width)}rowsFromArray(){return tj.fromNumberOfRows(this.cellAddress.sheet,this.cellAddress.row,this.height)}ensureRecentData(e){}isLeftCorner(e){return r9(this.cellAddress,e)}setErrorValue(e){this.array=new rv(e,this.array.size)}}class rM extends rT{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 rN extends rR{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 rI=(e,t,r,n,o)=>{let i,s;if(t instanceof rN){let e=t.range.intersectionWith(r);return void 0!==e?Array.from(e.addresses(o)):[]}return t instanceof rT?(i=t.getFormula(n),s=t.getAddress(n),tS(i,e).filter(e=>e instanceof tv).map(e=>e.dependency.toSimpleCellAddress(s)).filter(e=>r.addressInRange(e))):[]};(O=l||(l={}))[O.ON_STACK=0]="ON_STACK",O[O.PROCESSED=1]="PROCESSED",O[O.POPPED=2]="POPPED";class rx{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 n=e.reverse();return n.forEach(e=>this.runDFS(e)),this.postprocess(n,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]=l.ON_STACK;let t=[e],r=[];for(;t.length>0;){let e=t[t.length-1];switch(this.nodeStatus[e]){case l.ON_STACK:this.handleOnStack(e,r,t);break;case l.PROCESSED:this.handleProcessed(e,r,t);break;case l.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]=l.ON_STACK)}),this.nodeStatus[e]=l.PROCESSED}handleProcessed(e,t,r){let n=this.entranceTime[e];if(this.getAdjacentNodeIds(e).forEach(t=>{this.inSCC[t]||(n=this.parent[t]===e?Math.min(n,this.low[t]):Math.min(n,this.entranceTime[t]))}),this.low[e]=n,n===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]=l.POPPED}postprocess(e,t,r){let n=[];e.forEach(e=>{n[e]=!0});let o=[],i=[];return this.order.reverse(),this.order.forEach(e=>{let s=this.getAdjacentNodeIds(e);this.sccNonSingletons[e]||s.includes(e)?(i.push(this.nodesSparseArray[e]),t(this.nodesSparseArray[e]),s.forEach(e=>n[e]=!0)):(o.push(this.nodesSparseArray[e]),n[e]&&r(this.nodesSparseArray[e])&&s.forEach(e=>n[e]=!0))}),{sorted:o,cycled:i}}}class rO{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 rk{constructor(e){this.dependencyQuery=e,this.nodesSparseArray=[],this.edgesSparseArray=[],this.dirtyAndVolatileNodeIds=new rO({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,n=t.idInGraph;return void 0!==r&&void 0!==n&&this.edgesSparseArray[r].includes(n)}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),n=this.getNodeIdIfNotNumber(t);if(void 0===r)throw this.missingNodeError(e);if(void 0===n)throw this.missingNodeError(t);this.edgesSparseArray[r].includes(n)||this.edgesSparseArray[r].push(n)}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),n=this.getNodeIdIfNotNumber(t);if(void 0===r)throw this.missingNodeError(e);if(void 0===n)throw this.missingNodeError(t);let o=this.edgesSparseArray[r].indexOf(n);if(-1===o)throw Error("Edge does not exist");delete this.edgesSparseArray[r][o]}removeEdgeIfExists(e,t){let r=this.getNodeIdIfNotNumber(e),n=this.getNodeIdIfNotNumber(t);if(void 0===r||void 0===n)return;let o=this.edgesSparseArray[r].indexOf(n);-1!==o&&delete this.edgesSparseArray[r][o]}topSortWithScc(){return this.getTopSortedWithSccSubgraphFrom(this.getNodes(),()=>!0,()=>{})}getTopSortedWithSccSubgraphFrom(e,t,r){let n=new rx(this.nodesSparseArray,this.edgesSparseArray),o=e.map(e=>e.idInGraph).filter(e=>void 0!==e);return n.getTopSortedWithSccSubgraphFrom(o,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 r_{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=r_.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 n=r_.calculateRangeKey(e.start,e.end);r.delete(n),0===r.size&&this.rangeMapping.delete(t)}getRangeVertex(e,t){let r=this.rangeMapping.get(e.sheet),n=r_.calculateRangeKey(e,t);return null==r?void 0:r.get(n)}getVertexOrThrow(e,t){let r=this.getRangeVertex(e,t);if(!r)throw Error("Range does not exist");return r}truncateRanges(e,t){let r=[],n=[],o=[],i=e.sheet;for(let[s,a]of this.entriesFromSheet(e.sheet)){let l=a.range;e.start<=t(a.range.end)&&(l.removeSpan(e),l.shouldBeRemoved()?(this.removeByKey(i,s),r.push(a)):n.push([s,a]),o.push(a))}let s=[];for(let[e,r]of(n.sort((e,r)=>r_.compareBy(e[1],r[1],t)),n)){let t=r_.calculateRangeKey(r.range.start,r.range.end);if(t===e)continue;let n=this.getByKey(i,t);this.removeByKey(i,e),void 0!==n&&r!=n?s.push([n,r]):this.addOrUpdateVertex(r)}return{verticesToRemove:r,verticesToMerge:s,verticesWithChangedSize:o}}moveAllRangesInSheetAfterAddingRows(e,t,r){return this.updateVerticesFromSheet(e,(e,n)=>t<=n.start.row?(n.range.shiftByRows(r),{changedSize:!1,vertex:n}):t>n.start.row&&t<=n.end.row?(n.range.expandByRows(r),{changedSize:!0,vertex:n}):void 0)}moveAllRangesInSheetAfterAddingColumns(e,t,r){return this.updateVerticesFromSheet(e,(e,n)=>t<=n.start.col?(n.range.shiftByColumns(r),{changedSize:!1,vertex:n}):t>n.start.col&&t<=n.end.col?(n.range.expandByColumns(r),{changedSize:!0,vertex:n}):void 0)}moveRangesInsideSourceRange(e,t,r,n){this.updateVerticesFromSheet(e.sheet,(o,i)=>e.containsRange(i.range)?(i.range.shiftByColumns(t),i.range.shiftByRows(r),i.range.moveToSheet(n),{changedSize:!1,vertex:i}):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=r1(e.end.sheet,e.end.col,e.end.row-1),r=this.getRangeVertex(e.start,t);if(void 0!==r)return{smallerRangeVertex:r,restRange:ne.fromSimpleCellAddresses(r1(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 n=r(e.range.start),o=r(t.range.start);return n!==o?n-o: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[n,o]of this.entriesFromSheet(e)){let i=t(n,o);void 0!==i&&(this.removeByKey(e,n),r.push(i))}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 rh(e)}}(h||(h={})).NEW_SHEET_PREFIX="NEW_SHEET_PREFIX";class rL{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 tQ(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 tZ(e);return t.isPlaceholder=!1,t.id}this.lastSheetId++;let r=new rL(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 tZ(t);r.isPlaceholder=!1;return}e>this.lastSheetId&&(this.lastSheetId=e);let n=new rL(e,t);this._storeSheetInMappings(n)}addPlaceholderIfNotExists(e){let t=this._getSheetByName(e,{includePlaceholders:!0});if(t)return t.id;this.lastSheetId++;let r=new rL(this.lastSheetId,e,!0);return this._storeSheetInMappings(r),r.id}addPlaceholderWithId(e,t){if(this._getSheetByName(t,{includePlaceholders:!0}))throw new tZ(t);if(this.hasSheetWithId(e,{includePlaceholders:!0}))throw Error(`Sheet with id ${e} already exists`);e>this.lastSheetId&&(this.lastSheetId=e);let r=new rL(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,n=this._getSheetOrThrowError(e,{}),o=n.displayName;if(o===t)return{previousDisplayName:void 0};let i=this._getSheetByName(t,{includePlaceholders:!0});if(void 0!==i&&i.id!==n.id)if(i.isPlaceholder)this.mappingFromCanonicalNameToId.delete(i.canonicalName),this.allSheets.delete(i.id),i.id===this.lastSheetId&&this.lastSheetId--,r=i.id;else throw new tZ(t);let s=n.canonicalName;return this.mappingFromCanonicalNameToId.delete(s),n.displayName=t,this._storeSheetInMappings(n),{previousDisplayName:o,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 tX(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 rF(e){if(!Array.isArray(e))throw new t2("an array of arrays.");for(let t=0;t<e.length;t++)if(!Array.isArray(e[t]))throw new t2("an array of arrays.")}function rV(e){let t=0,r=0,n=0;for(let o=0;o<e.length;o++){let i=0;for(let t=0;t<e[o].length;t++)null!=e[o][t]&&(i=t+1,++n);t=Math.max(t,i),i>0&&(r=o+1)}let o=t*r;return{height:r,width:t,fill:0===o?0:n/o}}class rB{constructor(e,t,r,n,o,i,s,a){this.addressMapping=e,this.rangeMapping=t,this.sheetMapping=r,this.arrayMapping=n,this.stats=o,this.lazilyTransformingAstService=i,this.functionRegistry=s,this.namedExpressions=a,this.changes=tB.empty(),this.dependencyQueryAddresses=e=>{if(e instanceof rN)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 tA?this.namedExpressions.namedExpressionOrPlaceholder(t.name,e.sheet).address:r5(t)?t:r8(t.start,t.end))}}},this.dependencyQueryVertices=e=>{if(e instanceof rN)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 ne)return[t.start,this.rangeMapping.getVertexOrThrow(t.start,t.end)];if(!(t instanceof tA))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:n,restRange:o}=this.rangeMapping.findSmallerRange(e.range);for(let i of(void 0!==n&&this.graph.adjacentNodes(n).has(e)?(t=o,r.push([new ne(n.start,n.end),n])):t=e.range,t.addresses(this))){let e=this.addressMapping.getCell(i);void 0!==e&&r.push([i,e])}return r},this.formulaDependencyQuery=e=>{let t;return e instanceof rT?(t=e.getAddress(this.lazilyTransformingAstService),[t,tM(tS(e.getFormula(this.lazilyTransformingAstService),this.functionRegistry),t)]):void 0},this.graph=new rk(this.dependencyQueryVertices),this.sheetReferenceRegistrar=new rD(r,e)}static buildEmpty(e,t,r,n,o){return new rB(new rb(t.chooseAddressMappingPolicy),new r_,new rP(t.translationPackage),new ry,o,e,r,n)}setFormulaToCell(e,t,r,n,o,i){let s=rT.fromAst(t,e,n,this.lazilyTransformingAstService.version());return this.exchangeOrAddFormulaVertex(s),this.processCellDependencies(r,s),this.graph.markNodeAsDirty(s),o&&this.markAsVolatile(s),i&&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 rA&&this.arrayMapping.removeArray(r.getRange()),r instanceof rz)r.getValues().rawValue!==t.rawValue&&(r.setValues(t),this.graph.markNodeAsDirty(r));else{let n=new rz(t.parsedValue,t.rawValue);this.exchangeOrAddGraphNode(r,n),this.addressMapping.setCell(e,n),this.graph.markNodeAsDirty(n)}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 rU;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 ne){let t=this.getRange(e.start,e.end);void 0===t&&(t=new rN(e),this.rangeMapping.addOrUpdateVertex(t)),this.graph.addNodeIfNotExists(t);let n=t.idInGraph;if(void 0===n)throw Error("Range vertex not found");e.isFinite()||this.graph.markNodeAsInfiniteRange(n);let{smallerRangeVertex:o,restRange:i}=this.rangeMapping.findSmallerRange(e);if(void 0!==o){if(this.graph.addEdge(o,n),t.bruteForce)for(let r of(t.bruteForce=!1,e.addresses(this)))this.graph.removeEdge(this.fetchCell(r),n)}else t.bruteForce=!0;let s=this.arrayMapping.getArray(i);if(void 0!==s)this.graph.addEdge(s,n);else for(let e of i.addresses(this)){let{vertex:t,id:r}=this.fetchCellOrCreateEmpty(e);this.graph.addEdge(null!=r?r:t,n)}this.graph.addEdge(n,r),e.isFinite()&&this.correctInfiniteRangesDependenciesByRangeVertex(t)}else if(e instanceof tA){let n=t.getAddress(this.lazilyTransformingAstService).sheet,{vertex:o,id:i}=this.fetchNamedExpressionVertex(e.name,n);this.graph.addEdge(null!=i?i:o,r)}else{let{vertex:t,id:n}=this.fetchCellOrCreateEmpty(e);this.graph.addEdge(null!=n?n: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,n=this.fetchCellOrCreateEmpty(t).vertex;this.addressMapping.removeCell(e),this.exchangeGraphNode(r,n)}fetchCellOrCreateEmpty(e){let t=this.addressMapping.getCell(e);if(void 0!==t)return{vertex:t,id:void 0};let r=new rU,n=this.graph.addNodeIfNotExists(r);return this.addressMapping.setCell(e,r),{vertex:r,id:n}}removeRows(e){this.stats.measure(a.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 rA)if(!r.isLeftCorner(t))continue;else this.shrinkArrayToCorner(r),this.arrayMapping.removeArray(r.getRange());this.removeVertex(r)}}),this.stats.measure(a.ADJUSTING_ADDRESS_MAPPING,()=>{this.addressMapping.removeRows(e)});let t=this.stats.measure(a.ADJUSTING_RANGES,()=>{let t=this.truncateRanges(e,e=>e.row);return this.getArrayVerticesRelatedToRanges(t)});return this.stats.measure(a.ADJUSTING_ARRAY_MAPPING,()=>{this.fixArraysAfterRemovingRows(e.sheet,e.rowStart,e.numberOfRows)}),this.addStructuralNodesToChangeSet(),{affectedArrays:t,contentChanges:this.getAndClearContentChanges()}}addSheet(e){this.addressMapping.addSheetOrChangeStrategy(e,rV([])),this.stats.measure(a.ADJUSTING_ADDRESS_MAPPING,()=>{this.markAllCellsAsDirtyInSheet(e)}),this.stats.measure(a.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,n]of this.addressMapping.sheetEntries(e))n instanceof rA?t.add(n):this.setCellEmpty(r);for(let e of t.values())this.setArrayEmpty(e);this.addStructuralNodesToChangeSet()}removeColumns(e){this.stats.measure(a.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 rA)if(!r.isLeftCorner(t))continue;else this.shrinkArrayToCorner(r),this.arrayMapping.removeArray(r.getRange());this.removeVertex(r)}}),this.stats.measure(a.ADJUSTING_ADDRESS_MAPPING,()=>{this.addressMapping.removeColumns(e)});let t=this.stats.measure(a.ADJUSTING_RANGES,()=>{let t=this.truncateRanges(e,e=>e.col);return this.getArrayVerticesRelatedToRanges(t)});return this.stats.measure(a.ADJUSTING_ARRAY_MAPPING,()=>this.fixArraysAfterRemovingColumns(e.sheet,e.columnStart,e.numberOfColumns)),this.addStructuralNodesToChangeSet(),{affectedArrays:t,contentChanges:this.getAndClearContentChanges()}}addRows(e){this.stats.measure(a.ADJUSTING_ADDRESS_MAPPING,()=>{this.addressMapping.addRows(e.sheet,e.rowStart,e.numberOfRows)});let t=this.stats.measure(a.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(a.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(a.ADJUSTING_ADDRESS_MAPPING,()=>{this.addressMapping.addColumns(e.sheet,e.columnStart,e.numberOfColumns)});let t=this.stats.measure(a.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(a.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 rU)&&t!==e)return!1}return!0}moveCells(e,t,r,n){for(let o of e.addressesWithDirection(t,r,this)){let i=r1(n,o.col+t,o.row+r),s=this.addressMapping.getCell(o),a=this.addressMapping.getCell(i);if(this.addressMapping.removeCell(o),void 0!==s){let t;for(let r of(this.graph.markNodeAsDirty(s),this.addressMapping.setCell(i,s),this.graph.adjacentNodes(s)))r instanceof rN&&!e.containsRange(r.range)&&(t=null!=t?t:this.fetchCellOrCreateEmpty(o).vertex,this.graph.addEdge(t,r),this.graph.removeEdge(s,r));t&&(this.graph.markNodeAsDirty(t),this.addressMapping.setCell(o,t))}if(void 0!==a){for(let e of(void 0===s&&this.addressMapping.removeCell(i),this.graph.adjacentNodes(a)))s=null!=s?s:this.fetchCellOrCreateEmpty(i).vertex,this.graph.addEdge(s,e),this.graph.markNodeAsDirty(s);this.removeVertex(a)}}for(let t of this.rangeMapping.rangeVerticesContainedInRange(e))for(let r of this.graph.adjacentNodes(t))if(r instanceof rN&&!e.containsRange(r.range))for(let e of(this.graph.removeEdge(t,r),t.range.addresses(this))){let{vertex:t,id:n}=this.fetchCellOrCreateEmpty(e);this.graph.addEdge(null!=n?n:t,r),this.addressMapping.setCell(e,t),this.graph.markNodeAsDirty(t)}this.rangeMapping.moveRangesInsideSourceRange(e,t,r,n)}setArrayEmpty(e){let t=ne.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=rI(this.functionRegistry,t,e.getRange(),this.lazilyTransformingAstService,this);for(let e of r){let{vertex:r,id:n}=this.fetchCellOrCreateEmpty(e);this.graph.addEdge(null!=n?n: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 rA&&(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 rX(d.REF,eq.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 rX(d.REF,eq.SheetRef);let t=this.addressMapping.getCellValue(e);return t instanceof tV?new rX(d.VALUE,eq.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 rM&&e.ensureRecentData(this.lazilyTransformingAstService)}*rawValuesFromRange(e){for(let t of e.addresses(this)){let e=this.getScalarValue(t);e!==tN&&(yield[tI(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 rT?this.formulaDirectDependenciesToArray(t,e):this.rangeDirectDependenciesToArray(t,e);let n=!1;for(let[o,i]of r)e.isLeftCorner(o)&&(n=!0),this.graph.addEdge(i,t),this.graph.markNodeAsDirty(i);n||this.graph.removeEdge(e,t)}this.graph.markNodeAsDirty(e)}isArrayInternalCell(e){let t=this.getCell(e);return t instanceof rA&&!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 rN?r.push(r8(e.start,e.end)):e instanceof rT&&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 n=r.start,o=r.end;if(n.sheet!==t&&o.sheet!==t)continue;let i=r1(e,n.col,n.row),s=r1(e,o.col,o.row),a=this.rangeMapping.getRangeVertex(i,s);a?(this.rerouteDependents(r,a),this.removeVertexAndRerouteDependencies(r,a),this.rangeMapping.removeVertexIfExists(r),this.graph.markNodeAsDirty(a)):(this.rangeMapping.removeVertexIfExists(r),r.range.moveToSheet(e),this.rangeMapping.addOrUpdateVertex(r),this.graph.markNodeAsDirty(r))}}mergeCellVertices(e,t){for(let[r,n]of Array.from(this.addressMapping.sheetEntries(t))){let t=r1(e,r.col,r.row),o=this.getCell(t);o?(this.rerouteDependents(n,o),this.removeVertexAndCleanupDependencies(n),this.addressMapping.removeCell(r),this.graph.markNodeAsDirty(o)):(this.addressMapping.moveCell(r,t),this.graph.markNodeAsDirty(n))}}isPlaceholder(e){return e!==tG.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:n}=this.fetchCellOrCreateEmpty(e),o=null!=n?n:r.idInGraph;if(void 0===o)throw Error("Vertex not found");t.forEach(e=>{this.graph.addEdge(o,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 rA&&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:n}=this.fetchCellOrCreateEmpty(e);this.graph.addEdge(null!=n?n: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 rX(d.REF),t,r):(this.addressMapping.removeCell(t),this.changes.addChange(tN,t,r)):this.changes.addChange(tN,t,r)}}*formulaDirectDependenciesToArray(e,t){var r;let[,n]=null!=(r=this.formulaDependencyQuery(e))?r:[];if(void 0!==n){for(let e of n)if(!(e instanceof tA)&&!(e instanceof ne)&&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 rT||t instanceof rN)&&(yield t)}addStructuralNodesToChangeSet(){this.graph.markChangingWithStructureNodesAsDirty()}fixRangesWhenAddingRows(e,t,r){for(let n of Array.from(this.rangeMapping.rangesInSheet(e)))if(n.range.includesRow(t+r))if(n.bruteForce)for(let e of n.range.rangeWithSameWidth(t,r).addresses(this)){let{vertex:t,id:r}=this.fetchCellOrCreateEmpty(e);this.graph.addEdge(null!=r?r:t,n)}else{let e=n,t=this.rangeMapping.findSmallerRange(e.range);if(void 0!==t.smallerRangeVertex)continue;for(;void 0===t.smallerRangeVertex;){let r=new rN(ne.spanFrom(e.range.start,e.range.width(),e.range.height()-1));this.rangeMapping.addOrUpdateVertex(r),this.graph.addNodeIfNotExists(r);let n=new ne(r1(e.range.start.sheet,e.range.start.col,e.range.end.row),e.range.end);this.addAllFromRange(n,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,n)}}addAllFromRange(e,t){for(let r of e.addresses(this)){let{vertex:e,id:n}=this.fetchCellOrCreateEmpty(r);this.graph.addEdge(null!=n?n:e,t)}}fixRangesWhenAddingColumns(e,t,r){for(let n of this.rangeMapping.rangesInSheet(e))if(n.range.includesColumn(t+r)){for(let o of(n.bruteForce?n.range.rangeWithSameHeight(t,r):ne.spanFrom(r1(e,t,n.range.end.row),r,1)).addresses(this)){let{vertex:e,id:t}=this.fetchCellOrCreateEmpty(o);this.graph.addEdge(null!=t?t:e,n)}}}exchangeOrAddFormulaVertex(e){let t=e.getAddress(this.lazilyTransformingAstService),r=ne.spanFrom(t,e.width,e.height),n=this.shrinkPossibleArrayAndGetCell(t);if(e instanceof rA&&this.setArray(r,e),this.exchangeOrAddGraphNode(n,e),this.addressMapping.setCell(t,e),e instanceof rA){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 rA))return;let r=ne.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:n,verticesWithChangedSize:o}=this.rangeMapping.truncateRanges(e,t);for(let[e,t]of n)this.rerouteDependents(t,e),this.removeVertexAndCleanupDependencies(t);for(let e of r)this.removeVertexAndCleanupDependencies(e);return o}fixArraysAfterAddingRow(e,t,r){if(this.arrayMapping.moveArrayVerticesAfterRowByRows(e,t,r),!(t<=0))for(let[,n]of this.arrayMapping.arraysInRows(tj.fromRowStartAndEnd(e,t-1,t-1))){let o=n.getRange();for(let i=o.start.col;i<=o.end.col;++i)for(let s=t;s<=o.end.row;++s){let t=r1(e,i,s),o=r1(e,i,s+r),a=n.getArrayCellValue(t);this.addressMapping.moveCell(o,t),this.changes.addChange(tN,o,a)}}}fixArraysAfterRemovingRows(e,t,r){if(this.arrayMapping.moveArrayVerticesAfterRowByRows(e,t,-r),!(t<=0))for(let[,r]of this.arrayMapping.arraysInRows(tj.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[,n]of this.arrayMapping.arraysInCols(tY.fromColumnStartAndEnd(e,t-1,t-1))){let o=n.getRange();for(let i=o.start.row;i<=o.end.row;++i)for(let s=t;s<=o.end.col;++s){let t=r1(e,s,i),o=r1(e,s+r,i),a=n.getArrayCellValue(t);this.addressMapping.moveCell(o,t),this.changes.addChange(tN,o,a)}}}fixArraysAfterRemovingColumns(e,t,r){if(this.arrayMapping.moveArrayVerticesAfterColumnByColumns(e,t,-r),!(t<=0))for(let[,r]of this.arrayMapping.arraysInCols(tY.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 rA?(this.setNoSpaceIfArray(t),this.getCell(e)):t}setNoSpaceIfArray(e){e instanceof rA&&(this.shrinkArrayToCorner(e),e.setNoSpace())}removeVertex(e){this.removeVertexAndCleanupDependencies(e),e instanceof rN&&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[n,o]=e;this.graph.hasNode(o)&&0===this.graph.adjacentNodesCount(o)&&((o instanceof rN||o instanceof rU)&&this.graph.removeNode(o).forEach(e=>t.add(e)),o instanceof rN?(this.rangeMapping.removeVertexIfExists(o),r.add(o.sheet)):o instanceof rU&&r5(n)&&(this.addressMapping.removeCell(n),r.add(n.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 rU extends rE{constructor(){super()}getCellValue(){return tN}}class rz extends rE{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 rW extends rE{constructor(e,t){super(),this.errors=e,this.rawInput=t}getCellValue(){let e=this.errors.map(e=>e.message).find(e=>e);return rX.parsingError(e)}getFormula(){return this.rawInput}}class rG{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 n=new Map;r.forEach((o,i)=>{i>=e&&(n.set(i+t,o),r.delete(i))}),n.forEach((e,t)=>{r.set(t,e)})}),this.height+=t}addColumns(e,t){let r=new Map;this.mapping.forEach((n,o)=>{o>=e&&(r.set(o+t,n),this.mapping.delete(o))}),r.forEach((e,t)=>{this.mapping.set(t,e)}),this.width+=t}removeRows(e){this.mapping.forEach(t=>{let r=new Map;t.forEach((n,o)=>{o>=e.rowStart&&(t.delete(o),o>e.rowEnd&&r.set(o-e.numberOfRows,n))}),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,n)=>{n>=e.columnStart&&(this.mapping.delete(n),n>e.columnEnd&&t.set(n-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[n,o]of r)yield[r1(e,t,n),o]}*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 n of e.rows()){let o=r.get(n);void 0!==o&&(yield[r1(e.sheet,t,n),o])}}*entriesFromColumnsSpan(e){for(let t of e.columns()){let r=this.mapping.get(t);if(void 0!==r)for(let[n,o]of r.entries())yield[r1(e.sheet,t,n),o]}}*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 n=this.getCellVertex(r,t);n&&(yield[r1(e,r,t),n])}}*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 n=this.getCellVertex(t,r);n&&(yield[r1(e.sheet,t,r),n])}}*entriesFromColumnsSpan(e){for(let t=e.columnStart;t<=e.columnEnd;++t)for(let r=0;r<this.height;++r){let n=this.getCellVertex(t,r);n&&(yield[r1(e.sheet,t,r),n])}}*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]}}(k=d||(d={})).DIV_BY_ZERO="DIV_BY_ZERO",k.NAME="NAME",k.VALUE="VALUE",k.NUM="NUM",k.NA="NA",k.CYCLE="CYCLE",k.REF="REF",k.SPILL="SPILL",k.LIC="LIC",k.ERROR="ERROR",(_=u||(u={})).FORMULA="FORMULA",_.VALUE="VALUE",_.ARRAY="ARRAY",_.EMPTY="EMPTY",_.ARRAYFORMULA="ARRAYFORMULA",(H=c||(c={})).EMPTY="EMPTY",H.NUMBER="NUMBER",H.STRING="STRING",H.BOOLEAN="BOOLEAN",H.ERROR="ERROR",(g||(g={})).NUMBER="NUMBER";let rj=Object.assign(Object.assign({},c),g),rY=Object.assign(Object.assign({},c),s),rq=e=>{switch(e){case rj.EMPTY:return 0;case rj.NUMBER:return 1;case rj.STRING:return 2;case rj.BOOLEAN:return 3;case rj.ERROR:return 4}throw Error("Cell value not computed")},rK=e=>{if(e===tN)return rj.EMPTY;if(e instanceof rX||e instanceof tV)return rj.ERROR;if("string"==typeof e)return rj.STRING;if(tD(e))return rj.NUMBER;if("boolean"==typeof e)return rj.BOOLEAN;throw Error("Cell value not computed")};class rX{constructor(e,t,r){this.type=e,this.message=t,this.root=r}static parsingError(e){return new rX(d.ERROR,`${eq.ParseError}${e?" "+e:""}`)}attachRootVertex(e){return void 0===this.root?new rX(this.type,this.message,e):this}}let rQ=(e,t)=>({sheet:e,row:t}),rZ=e=>e.row<0,rJ=(e,t)=>({sheet:e,col:t}),r0=e=>e.col<0,r1=(e,t,r)=>({sheet:e,col:t,row:r}),r2=e=>e.col<0||e.row<0,r3=(e,t,r,n)=>r1(t,e.col+r,e.row+n),r6=e=>`${e.sheet},${e.row},${e.col}`;function r5(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 r4=(e,t)=>{var r;return null!=(r=e.sheet)?r:t.sheet},r9=(e,t)=>e.sheet===t.sheet&&e.col===t.col&&e.row===t.row;function r7(e){return!!e&&("object"==typeof e||"function"==typeof e)&&"start"in e&&r5(e.start)&&"end"in e&&r5(e.end)}let r8=(e,t)=>({start:e,end:t});class ne{constructor(e,t){if(e.sheet!==t.sheet)throw new t3(e.sheet,t.sheet);this.start=r1(e.sheet,e.col,e.row),this.end=r1(t.sheet,t.col,t.row)}get sheet(){return this.start.sheet}static fromSimpleCellAddresses(e,t){if(e.sheet!==t.sheet)throw new t3(e.sheet,t.sheet);let r=t.col-e.col,n=t.row-e.row;return Number.isFinite(n)&&Number.isFinite(r)?new ne(e,t):Number.isFinite(n)?new nr(e.sheet,e.row,t.row):new nt(e.sheet,e.col,t.col)}static fromAst(e,t){return e.type===o.CELL_RANGE?ne.fromCellRange(e,t):e.type===o.COLUMN_RANGE?nt.fromColumnRange(e,t):nr.fromRowRangeAst(e,t)}static fromAstOrUndef(e,t){try{return ne.fromAst(e,t)}catch(e){return}}static fromCellRange(e,t){return new ne(e.start.toSimpleCellAddress(t),e.end.toSimpleCellAddress(t))}static spanFrom(e,t,r){let n=ne.spanFromOrUndef(e,t,r);if(void 0===n)throw Error("AbsoluteCellRange: Wrong range size");return n}static spanFromOrUndef(e,t,r){if(!Number.isFinite(t)&&Number.isFinite(r)){if(0===e.col)return new nr(e.sheet,e.row,e.row+r-1)}else if(!Number.isFinite(r)&&Number.isFinite(t)){if(0!==e.row)return;return new nt(e.sheet,e.col,e.col+t-1)}else if(Number.isFinite(r)&&Number.isFinite(t))return new ne(e,r1(e.sheet,e.col+t-1,e.row+r-1))}static fromCoordinates(e,t,r,n,o){return new ne(r1(e,t,r),r1(e,n,o))}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),n=Math.max(this.start.col,e.start.col),o=Math.min(this.end.col,e.end.col);if(!(t>r)&&!(n>o))return new ne(r1(this.sheet,n,t),r1(this.sheet,o,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 ne.spanFrom(r1(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 tj?this.removeRows(e.start,e.end):this.removeColumns(e.start,e.end)}shouldBeRemoved(){return 0>=this.width()||0>=this.height()}rangeWithSameWidth(e,t){return ne.spanFrom(r1(this.sheet,this.start.col,e),this.width(),t)}rangeWithSameHeight(e,t){return ne.spanFrom(r1(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 n=r1(this.sheet,this.start.col+r,this.start.row+t);e[t].push(n)}}return e}withStart(e){return new ne(e,this.end)}sameDimensionsAs(e){return this.width()===e.width()&&this.height()===e.height()}sameAs(e){return r9(this.start,e.start)&&r9(this.end,e.end)}addressesArrayMap(e,t){let r=[],n=this.start.row;for(;n<=this.effectiveEndRow(e);){let o=this.start.col,i=[];for(;o<=this.effectiveEndColumn(e);)i.push(t(r1(this.start.sheet,o,n))),o++;r.push(i),n++}return r}addresses(e){let t=[],r=this.start.row,n=this.effectiveEndRow(e),o=this.effectiveEndColumn(e);for(;r<=n;){let e=this.start.col;for(;e<=o;)t.push(r1(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 r1(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 r1(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 r1(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 r1(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 r1(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 nt extends ne{constructor(e,t,r){super(r1(e,t,0),r1(e,r,1/0))}static fromColumnRange(e,t){let r=e.start.toSimpleColumnAddress(t),n=e.end.toSimpleColumnAddress(t);if(r.sheet!==n.sheet)throw new t3(r.sheet,n.sheet);return new nt(r.sheet,r.col,n.col)}shouldBeRemoved(){return 0>=this.width()}shiftByRows(e){}expandByRows(e){}shifted(e,t){return new nt(this.sheet,this.start.col+e,this.end.col+e)}rangeWithSameHeight(e,t){return new nt(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 nr extends ne{constructor(e,t,r){super(r1(e,0,t),r1(e,1/0,r))}static fromRowRangeAst(e,t){let r=e.start.toSimpleRowAddress(t),n=e.end.toSimpleRowAddress(t);if(r.sheet!==n.sheet)throw new t3(r.sheet,n.sheet);return new nr(r.sheet,r.row,n.row)}shouldBeRemoved(){return 0>=this.height()}shiftByColumns(e){}expandByColumns(e){}shifted(e,t){return new nr(this.sheet,this.start.row+t,this.end.row+t)}rangeWithSameWidth(e,t){return new nr(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 nn{constructor(e,t,r){this.formulaAddress=e,this.arraysFlag=t,this.formulaVertex=r}}let no=/^\s*([+-]?)\s*(([\d\.,]+(e[+-]?\d+)?)\s*([ij]?)|([ij]))\s*(([+-])\s*([+-]?)\s*(([\d\.,]+(e[+-]?\d+)?)\s*([ij]?)|([ij])))?$/;class ni{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(tI(e),tI(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=nb(e,t);return this.ExtendedNumberFactory(this.addWithEpsilonRaw(tI(e),tI(t)),r)},this.unaryMinus=e=>tO(e,-tI(e)),this.unaryPlus=e=>e,this.unaryPercent=e=>new tP(tI(e)/100),this.concat=(e,t)=>e.concat(t),this.nonstrictadd=(e,t)=>{if(e instanceof rX)return e;if(t instanceof rX)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=nb(e,t),n=tI(e),o=n-tI(t);return Math.abs(o)<this.actualEps*Math.abs(n)&&(o=0),this.ExtendedNumberFactory(o,r)},this.divide=(e,t)=>{let r=tI(e),n=tI(t);if(0===n)return new rX(d.DIV_BY_ZERO);{let o=ny(e,t);return this.ExtendedNumberFactory(r/n,o)}},this.multiply=(e,t)=>{let r=ny(e,t);return this.ExtendedNumberFactory(tI(e)*tI(t),r)},this.manyToExactComplex=e=>{let t=[];for(let r of e)if(r instanceof rX)return r;else if(tD(r)||"string"==typeof r){let e=this.coerceScalarToComplex(r);e instanceof rX||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 rX)return r;else tD(r)&&t.push(tI(r));return t},this.manyToOnlyNumbersDropNulls=e=>{let t=[];for(let r of e)if(r instanceof rX)return r;else if(tD(r))t.push(tI(r));else if(r!==tN)return new rX(d.VALUE,eq.NumberExpected);return t},this.manyToCoercedNumbersDropNulls=e=>{let t=[];for(let r of e){if(r instanceof rX)return r;if(r===tN)continue;let e=this.coerceScalarToNumberOrError(r);tD(e)&&t.push(tI(e))}return t},this.collator=function(e){let t=e.caseSensitive?e.accentSensitive?"variant":"case":e.accentSensitive?"accent":"base",r=e.caseFirst,n=e.ignorePunctuation;return new Intl.Collator(e.localeLang,{sensitivity:t,caseFirst:r,ignorePunctuation:n})}(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 n=this.buildRegex(e,!1).exec(t);return null!=(r=null==n?void 0:n.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(nm(r)||this.config.useRegularExpressions&&nC(r))return!0}return!1}floatCmp(e,t){let r=tI(e),n=tI(t),o=1+this.actualEps;return n>=0&&r*o>=n&&r<=n*o||n<=0&&r*o<=n&&r>=n*o?0:r>n?1:-1}coerceScalarToNumberOrError(e){var t;return e instanceof rX?e:null!=(t=this.coerceToMaybeNumber(e))?t:new rX(d.VALUE,eq.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===tN)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,n=this.numberLiteralsHelper.numericStringToMaybeNumber(r);if(void 0!==n)return new t_(n,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 tV)t.push(r);else if(r!==tN){let e=this.coerceScalarToComplex(r);if(e instanceof rX)return e;t.push(e)}let r=[];for(let e of t)if(e instanceof tV){let t=this.manyToExactComplex(e.valuesFromTopLeftCorner());if(t instanceof rX)return t;r.push(...t)}else r.push(e);return r}coerceScalarToComplex(e){return e instanceof rX?e:e===tN?[0,0]:tD(e)?[tI(e),0]:"string"==typeof e?this.coerceStringToComplex(e):new rX(d.NUM,eq.ComplexNumberExpected)}ExtendedNumberFactory(e,t){let{type:r,format:n}=t;switch(r){case s.NUMBER_RAW:return e;case s.NUMBER_CURRENCY:return new t_(e,null!=n?n:this.config.currencySymbol[0]);case s.NUMBER_DATE:return new tk(e,n);case s.NUMBER_DATETIME:return new tL(e,n);case s.NUMBER_TIME:return new tH(e,n);case s.NUMBER_PERCENT:return new tP(e,n)}}buildRegex(e,t=!0){let r;e=this.normalizeString(e);let n=this.config.useWildcards,o=this.config.useRegularExpressions;if(o)try{RegExp(e)}catch(e){o=!1,n=!1}return(r=o?function(e,t){let r="";for(let n=0;n<e.length;n++){let o=e.charAt(n);nm(o)||nC(o)||t?r+=o:r+=o.toLowerCase()}return r}(e,this.config.caseSensitive):n?function(e,t){let r="";for(let n=0;n<e.length;n++){let o=e.charAt(n);if("~"===o){if(n==e.length-1){r+="~";continue}let t=e.charAt(n+1);nm(t)||nC(t)?r+="\\"+t:r+=t,n++}else nm(o)?r+="."+o:nC(o)?r+="\\"+o:t?r+=o:r+=o.toLowerCase()}return r}(e,this.config.caseSensitive):function(e,t){let r="";for(let n=0;n<e.length;n++){let o=e.charAt(n);nm(o)||nC(o)?r+="\\"+o:t?r+=o:r+=o.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=nv(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,n="string"==typeof t?this.dateTimeHelper.dateStringToDateNumber(t):t;if(tD(r)&&tD(n))return this.floatCmp(r,n)}return(e===tN?e=nh(t):t===tN&&(t=nh(e)),"string"==typeof e&&"string"==typeof t)?this.stringCmp(e,t):"boolean"==typeof e&&"boolean"==typeof t?ng(nl(e),nl(t)):tD(e)&&tD(t)?this.floatCmp(e,t):e===tN&&t===tN?0:ng(rq(rK(e)),rq(rK(t)))}stringCmp(e,t){return this.collator.compare(e,t)}manyToNumbers(e,t){let r=[];for(let t of e)if(t instanceof tV)r.push(t);else{let e=tI(this.coerceScalarToNumberOrError(t));if(e instanceof rX)return e;r.push(e)}let n=[];for(let e of r)if(e instanceof tV){let r=t(e.valuesFromTopLeftCorner());if(r instanceof rX)return r;n.push(...r)}else n.push(e);return n}coerceStringToComplex(e){let t,r,n=no.exec(e);return null===n?new rX(d.NUM,eq.ComplexNumberExpected):(t=void 0!==n[6]?"-"===n[1]?[0,-1]:[0,1]:this.parseComplexToken(n[1]+n[3],n[5]))instanceof rX||void 0===n[8]?t:(r=void 0!==n[14]?"-"===n[9]?[0,-1]:[0,1]:this.parseComplexToken(n[9]+n[11],n[13]))instanceof rX?r:""!==n[5]||""===n[13]?new rX(d.NUM,eq.ComplexNumberExpected):"+"===n[8]?[t[0]+r[0],t[1]+r[1]]:[t[0]-r[0],t[1]-r[1]]}parseComplexToken(e,t){let r=tI(this.coerceNonDateScalarToMaybeNumber(e));return void 0===r?new rX(d.NUM,eq.ComplexNumberExpected):""===t?[r,0]:[0,r]}}function ns([e,t],r){if(!isFinite(e)||!isFinite(t))return new rX(d.NUM,eq.NaN);if(r=null!=r?r:"i",0===t)return`${e}`;let n=`${-1===t||1===t?"":Math.abs(t)}${r}`;return 0===e?`${t<0?"-":""}${n}`:`${e}${t<0?"-":"+"}${n}`}function na(e){return e instanceof tV?e:tV.fromScalar(e)}function nl(e){return Number(e)}function nh(e){return"string"==typeof e?"":tD(e)?0:"boolean"!=typeof e&&tN}function nd(e){if(e instanceof rX||"boolean"==typeof e)return e;{if(e===tN)return!1;if(tD(e))return 0!==tI(e);let t=e.toUpperCase();return"TRUE"===t||"FALSE"!==t&&""!==t&&void 0}}function nu(e){return e instanceof rX||"string"==typeof e?e:e===tN?"":tD(e)?tI(e).toString():e?"TRUE":"FALSE"}function nc(e){return e===tN?0:e}function ng(e,t){let r=tI(e),n=tI(t);return r>n?1:r<n?-1:0}function np(e){return isNaN(e)||e===1/0||e===-1/0}function nm(e){return["*","?"].includes(e)}let nf=["{","}","[","]","(",")","<",">","=",".","+","-",",","\\","$","^","!"];function nC(e){return nf.includes(e)}function nb(e,t){let{type:r,format:n}=tF(e),{type:o,format:i}=tF(t);if(r===s.NUMBER_RAW)return{type:o,format:i};if(o===s.NUMBER_RAW)return{type:r,format:n};if((r===s.NUMBER_DATETIME||r===s.NUMBER_DATE)&&(o===s.NUMBER_DATETIME||o===s.NUMBER_DATE))return{type:s.NUMBER_RAW};if(r===s.NUMBER_TIME){if(o===s.NUMBER_DATE)return{type:s.NUMBER_DATETIME,format:`${i} ${n}`};if(o===s.NUMBER_DATETIME)return{type:s.NUMBER_DATETIME,format:i}}if(o===s.NUMBER_TIME){if(r===s.NUMBER_DATE)return{type:s.NUMBER_DATETIME,format:`${n} ${i}`};if(r===s.NUMBER_DATETIME)return{type:s.NUMBER_DATETIME,format:n}}return{type:r,format:n}}function ny(e,t){let{type:r,format:n}=tF(e),{type:o,format:i}=tF(t);return(r===s.NUMBER_PERCENT&&(r=s.NUMBER_RAW,n=void 0),o===s.NUMBER_PERCENT&&(o=s.NUMBER_RAW,i=void 0),r===s.NUMBER_RAW)?{type:o,format:i}:o===s.NUMBER_RAW?{type:r,format:n}:{type:s.NUMBER_RAW}}function nw(e){return nv(e.toLowerCase(),"nfd").replace(/[\u0300-\u036f]/g,"")}function nS(e,t){var r;if(e.isAdHoc())return null==(r=e.data[0])?void 0:r[0];let n=e.range;if(t.formulaAddress.sheet===n.sheet){if(1===n.width()){let r=t.formulaAddress.row-n.start.row;if(r>=0&&r<n.height())return e.data[r][0]}else if(1===n.height()){let r=t.formulaAddress.col-n.start.col;if(r>=0&&r<n.width())return e.data[0][r]}}}function nv(e,t){return e.normalize(t.toUpperCase())}(L=p||(p={})).STRING="STRING",L.NUMBER="NUMBER",L.BOOLEAN="BOOLEAN",L.SCALAR="SCALAR",L.NOERROR="NOERROR",L.RANGE="RANGE",L.INTEGER="INTEGER",L.COMPLEX="COMPLEX",L.ANY="ANY";class nR{constructor(e){this.coerceScalarToNumberOrError=e=>this.arithmeticHelper.coerceScalarToNumberOrError(e),this.runFunction=(e,t,r,n)=>{let o=this.evaluateArguments(e,t,r),i=o.map(([e])=>e),s=o.map(([,e])=>e),a=o.map(([,,e])=>e),l=this.buildMetadataForEachArgumentValue(i.length,r),h=t.arraysFlag&&!r.vectorizationForbidden;if(!this.isNumberOfArgumentValuesValid(l,i.length))return new rX(d.NA,eq.WrongArgNumber);let[u,c]=h?this.calculateSizeOfVectorizedResultArray(i,l):[1,1];if(1===u&&1===c){let e=this.vectorizeAndBroadcastArgumentsIfNecessary(h,i,l,0,0);return this.calculateSingleCellOfResultArray(t,e,l,s,a,n,r.returnNumberType)}let g=[...Array(u).keys()].map(e=>[...Array(c).keys()].map(o=>{let d=this.vectorizeAndBroadcastArgumentsIfNecessary(h,i,l,e,o),u=this.calculateSingleCellOfResultArray(t,d,l,s,a,n,r.returnNumberType);if(u instanceof tV)throw Error("Function returning array cannot be vectorized.");return u}));return tV.onlyValues(g)},this.runFunctionWithReferenceArgument=(e,t,r,n,i,s=()=>new rX(d.NA,eq.CellRefExpected))=>{let a;if(0===e.length)return this.returnNumberWrapper(n(),r.returnNumberType);if(e.length>1)return new rX(d.NA,eq.WrongArgNumber);let l=e[0];for(;l.type===o.PARENTHESIS;)l=l.expression;if(l.type===o.CELL_REFERENCE)a=l.reference.toSimpleCellAddress(t.formulaAddress);else if(l.type===o.CELL_RANGE||l.type===o.COLUMN_RANGE||l.type===o.ROW_RANGE)try{a=ne.fromAst(l,t.formulaAddress).start}catch(e){return new rX(d.REF,eq.CellRefExpected)}return void 0!==a?this.returnNumberWrapper(i(a),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 n of e){let e=n.type===o.EMPTY,i=this.evaluateAst(n,t);if(i instanceof tV)for(let t of i.valuesFromTopLeftCorner())r.push([t,!0,e]);else r.push([i,!1,e])}return r}coerceToType(e,t,r){let n;if(e instanceof tV)switch(t.argumentType){case p.RANGE:case p.ANY:n=e;break;default:{let t=nS(e,r);if(void 0===t)return;e=t}}if(!(e instanceof tV))switch(t.argumentType){case p.INTEGER:case p.NUMBER:let o=this.coerceScalarToNumberOrError(e);if(!tD(o)){n=o;break}let i=tI(o);if(void 0!==t.maxValue&&i>t.maxValue)return new rX(d.NUM,eq.ValueLarge);if(void 0!==t.minValue&&i<t.minValue)return new rX(d.NUM,eq.ValueSmall);if(void 0!==t.lessThan&&i>=t.lessThan)return new rX(d.NUM,eq.ValueLarge);if(void 0!==t.greaterThan&&i<=t.greaterThan)return new rX(d.NUM,eq.ValueSmall);if(t.argumentType===p.INTEGER&&!Number.isInteger(i))return new rX(d.NUM,eq.IntegerExpected);n=o;break;case p.STRING:n=nu(e);break;case p.BOOLEAN:n=nd(e);break;case p.SCALAR:case p.NOERROR:case p.ANY:n=e;break;case p.RANGE:if(e instanceof rX)return e;n=na(e);break;case p.COMPLEX:return this.arithmeticHelper.coerceScalarToComplex(tI(e))}return t.passSubtype||void 0===n?n:tI(n)}calculateSingleCellOfResultArray(e,t,r,n,o,i,s){let a=this.coerceArgumentsToRequiredTypes(e,t,r,n,o);if(a instanceof rX)return a;let l=i(...a);return this.returnNumberWrapper(l,s)}coerceArgumentsToRequiredTypes(e,t,r,n,o){let i=[];for(let s=0;s<r.length;s++){let a=r[s],l=t[s],h=void 0===l?null==a?void 0:a.defaultValue:o[s]&&(null==a?void 0:a.emptyAsDefault)&&(null==a?void 0:a.defaultValue)!==void 0?a.defaultValue:l;if(void 0===h){i.push(void 0);continue}let u=this.coerceToType(h,a,e);if(void 0===u&&!n[s])return new rX(d.VALUE,eq.WrongType);if(u instanceof rX&&a.argumentType!==p.SCALAR)return u;i.push(u)}return i}vectorizeAndBroadcastArgumentsIfNecessary(e,t,r,n,o){return t.map((t,i)=>e&&this.isRangePassedAsAScalarArgument(t,r[i])?this.vectorizeAndBroadcastRangeArgument(t,n,o):t)}vectorizeAndBroadcastRangeArgument(e,t,r){var n;let o=1===e.height()?0:t,i=1===e.width()?0:r;return null==(n=e.data[o])?void 0:n[i]}evaluateArguments(e,t,r){return r.expandRanges?this.listOfScalarValues(e,t):e.map(e=>[this.evaluateAst(e,t),!1,e.type===o.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 tV&&![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(tI(e),{type:t,format:r}):e}}class nE{constructor(e,t,r=!1){this.width=e,this.height=t,this.isRef=r}static error(){return new nE(1,1,!0)}static scalar(){return new nE(1,1,!1)}isScalar(){return 1===this.width&&1===this.height||this.isRef}}class nT{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 o.FUNCTION_CALL:return this.checkArraySizeForFunction(e,t);case o.COLUMN_RANGE:case o.ROW_RANGE:case o.CELL_RANGE:{let r=ne.fromAstOrUndef(e,t.formulaAddress);if(void 0===r)return nE.error();return new nE(r.width(),r.height(),!0)}case o.ARRAY:{let r=[],n=[];for(let o of e.args){let e=o.map(e=>this.checkArraySizeForAst(e,t)),i=Math.min(...e.map(e=>e.height)),s=e.reduce((e,t)=>e+t.width,0);r.push(i),n.push(s)}return new nE(Math.min(...n),r.reduce((e,t)=>e+t,0))}case o.STRING:case o.NUMBER:return nE.scalar();case o.CELL_REFERENCE:return new nE(1,1,!0);case o.DIV_OP:case o.CONCATENATE_OP:case o.EQUALS_OP:case o.GREATER_THAN_OP:case o.GREATER_THAN_OR_EQUAL_OP:case o.LESS_THAN_OP:case o.LESS_THAN_OR_EQUAL_OP:case o.MINUS_OP:case o.NOT_EQUAL_OP:case o.PLUS_OP:case o.POWER_OP:case o.TIMES_OP:{let r=this.checkArraySizeForAst(e.left,t),n=this.checkArraySizeForAst(e.right,t);if(!t.arraysFlag&&(r.height>1||r.width>1||n.height>1||n.width>1))return nE.error();return new nE(Math.max(r.width,n.width),Math.max(r.height,n.height))}case o.MINUS_UNARY_OP:case o.PLUS_UNARY_OP:case o.PERCENT_OP:{let r=this.checkArraySizeForAst(e.value,t);if(!t.arraysFlag&&(r.height>1||r.width>1))return nE.error();return new nE(r.width,r.height)}case o.PARENTHESIS:return this.checkArraySizeForAst(e.expression,t);case o.EMPTY:default:return nE.error()}}checkArraySizeForFunction(e,t){let r=this.functionRegistry.getArraySizeFunction(e.procedureName);if(void 0!==r)return r(e,t);let n=this.functionRegistry.getMetadata(e.procedureName);if(void 0===n||n.expandRanges||!t.arraysFlag||n.vectorizationForbidden||void 0===n.parameters)return new nE(1,1);let o=e.args.map(e=>{var r;return this.checkArraySizeForAst(e,new nn(t.formulaAddress,t.arraysFlag||null!=(r=null==n?void 0:n.enableArrayArithmeticForArguments)&&r))}),i=[...n.parameters];if(void 0!==n.repeatLastArgs&&i.length<o.length&&(o.length-i.length)%n.repeatLastArgs!=0)return nE.error();for(;i.length<o.length;){if(void 0===n.repeatLastArgs)return nE.error();i.push(...i.slice(i.length-n.repeatLastArgs))}let s=1,a=1;for(let e=0;e<o.length;e++)i[e].argumentType!==p.RANGE&&i[e].argumentType!==p.ANY&&(a=Math.max(a,o[e].height),s=Math.max(s,o[e].width));return new nE(s,a)}}class nA{constructor(e,t,r){var n;this.value=t,this.address=r,this.type=e.type,this.message=null!=(n=e.message)?n:""}toString(){return this.value}valueOf(){return this.value}}function nM(e,t,r){if(void 0===e)return iC.defaultConfig[r];if("string"==typeof t)if(typeof e===t)return e;else throw new rr(t,r);if(t.includes(e))return e;throw new rs(t.map(e=>`'${e}'`).join(" "),r)}function nN(e,t,r){if(e<r)throw new ro(t,r)}function nI(e,t,r,n){if(t(e))return e;if(void 0===e)return iC.defaultConfig[n];throw new rr(r,n)}function nx(...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 nO(e,t,r){if(typeof e!==t)throw new rr(t,r)}let nk=RegExp("^ss(\\.(s+|0+))?$"),n_=RegExp("^[0-9/.\\-: ]+[ap]?m?$"),nH=RegExp("\\s+"),nL=RegExp("[ /.-]"),nP=nB(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=>nk.test(e))}}),nD=nB(function(e){let t=e.toLowerCase().trim().split(nL);return{itemsCount:t.length,dayItem:t.indexOf("dd"),monthItem:t.indexOf("mm"),shortYearItem:t.indexOf("yy"),longYearItem:t.indexOf("yyyy")}});function nF(e,t){var r,n,o;let i;if(void 0===t)return;let{itemsCount:s,hourItem:a,minuteItem:l,secondItem:h}=nP(t);if("am"===e[e.length-1]||"a"===e[e.length-1]?(i=!1,e.pop()):("pm"===e[e.length-1]||"p"===e[e.length-1])&&(i=!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!=(n=e[l])?n:"0");if(!(Number.isFinite(c)&&Number.isInteger(c)))return;let g=Number(null!=(o=e[a])?o:"0");if(Number.isFinite(g)&&Number.isInteger(g)&&(void 0===i||!(g<0)&&!(g>12)))return{hours:void 0!==i?g%12+12*!!i:g,minutes:c,seconds:u}}function nV(e,t){var r;if(void 0===t)return;let{itemsCount:n,dayItem:o,monthItem:i,shortYearItem:s,longYearItem:a}=nD(t);if(e.length!==n)return;let l=Number(e[o]);if(!(Number.isFinite(l)&&Number.isInteger(l)))return;let h=Number(e[i]);if(!(Number.isFinite(h)&&Number.isInteger(h))||e[a]&&e[s])return;let d=Number(null!=(r=e[a])?r:e[s]);if(Number.isFinite(d)&&Number.isInteger(d)&&(!e[a]||!(d<1e3)&&!(d>9999))&&(!e[s]||!(d<0)&&!(d>99)))return{year:d,month:h,day:l}}function nB(e){let t={};return r=>{let n=t[r];if(void 0!==n)return n;let o=e(r);return t[r]=o,o}}let nU=[31,28,31,30,31,30,31,31,30,31,30,31],nz=[0,31,59,90,120,151,181,212,243,273,304,334];function nW(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 nG(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 n$={year:9999,month:12,day:31};class nj{constructor(e){this.config=e,this.minDateAbsoluteValue=this.dateToNumberFromZero(e.nullDate),this.maxDateValue=this.dateToNumber(n$),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:n=""}=this.parseDateTimeFromConfigFormats(e);if(void 0!==t)if(nG(t))if(nW(t))return new tL(nX(t)+this.dateToNumber(t),r+" "+n);else return new tH(nX(t),n);else if(nW(t))return new tk(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<=nU[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,n=Math.floor(e)+this.minDateAbsoluteValue,o=Math.floor(n/365.2425);this.dateToNumberFromZero({year:o+1,month:1,day:1})<=n?o++:this.dateToNumberFromZero({year:o-1,month:1,day:1})>n&&o--;let i=n-this.dateToNumberFromZero({year:o,month:1,day:1}),s=(t=i-(this.isLeapYear(o)&&i>=59?1:0),r=0,nz[6]<=t&&(r+=6),nz[r+3]<=t&&(r+=3),nz[r+2]<=t?r+=2:nz[r+1]<=t&&(r+=1),r),a=i-nz[s]-(this.isLeapYear(o)&&s>1?1:0);return{year:o,month:s+1,day:a+1}}numberToSimpleDateTime(e){let t=nK(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:nU[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 n=this.parseDateTime(e,t,r);if(!nW(n)||(n.year>=0&&n.year<100&&(n.year<this.getNullYear()?n.year+=2e3:n.year+=1900),this.isValidDate(n)))return n}parseDateTimeFromFormats(e,t,r){let n=0===t.length?[void 0]:t,o=0===r.length?[void 0]:r;for(let t of n)for(let r of o){let n=this.parseSingleFormat(e,t,r);if(void 0!==n)return{dateTime:n,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+nz[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 nY(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 nq(e){return Math.round(3600*e*24)/86400}function nK(e){let t=24*e*3600,r=function(e,t=1){return Math.round(e*t)/t}(t%60,1e5)%60,n=(t-r)/60,o=Math.round(n%60)%60;return{hours:Math.round((n-o)/60),minutes:o,seconds:r}}function nX(e){return((e.seconds/60+e.minutes)/60+e.hours)/24}function nQ(e){return{year:e.year,month:e.month,day:Math.min(30,e.day)}}let nZ=/(\\.|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,nJ=/(\\.|[#0]+(\.[#0]*)?)/g;function n0(e,t){return{type:e,value:t}}function n1(e,t){let r=[],n=0;for(let o=0;o<e.length;++o){let i=e[o];if(i.index!==n){let e=t.substr(n,i.index-n);r.push(n0(m.FREE_TEXT,e))}i[0].startsWith("\\")?r.push(n0(m.FREE_TEXT,i[0])):r.push(n0(m.FORMAT,i[0])),n=i.index+i[0].length}let o=e[e.length-1];if(o.index+o[0].length<t.length){let e=t.substr(o.index+o[0].length,t.length);r.push(n0(m.FREE_TEXT,e))}return r}function n2(e){let t=function(e){let t;nZ.lastIndex=0;let r=[];do null!==(t=nZ.exec(e))&&r.push(t);while(t);return r}(e);if(!t.every(e=>n3(e)))return{type:f.DATE,tokens:n1(t,e)}}(P=m||(m={})).FORMAT="FORMAT",P.FREE_TEXT="FREE_TEXT",(D=f||(f={})).DATE="DATE",D.NUMBER="NUMBER",D.STRING="STRING";function n3(e){return e[0].startsWith("\\")}function n6(e,t){let r=`${e}`;for(;r.length<t;)r="0"+r;return r}function n5(e,t){return e.split(t).length-1}let n4="length",n9=e=>(e+"").replace(/\-/g,""),n7=e=>e.codePointAt(0)-65,n8={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."},oe=!1;var ot=C||(C={});ot.Number=class{constructor(e){var t;this.value=e,this.value=tO(this.value,0===(t=tI(this.value))?0:t)}},ot.String=class{constructor(e){this.value=e}},ot.Boolean=class{constructor(e){this.value=e}};class or{static getSingletonInstance(){return or.instance||(or.instance=new or),or.instance}}ot.Empty=or,ot.Formula=class{constructor(e){this.formula=e}},ot.Error=class{constructor(e,t){this.value=new rX(e,t)}};class on{constructor(e,t,r){this.config=e,this.dateHelper=t,this.numberLiteralsHelper=r}parse(e){if(null==e)return C.Empty.getSingletonInstance();if("number"==typeof e)if(np(e))return new C.Error(d.NUM,eq.ValueLarge);else return new C.Number(e);if("boolean"==typeof e)return new C.Boolean(e);if(e instanceof Date){let t=this.dateHelper.dateToNumber({day:e.getDate(),month:e.getMonth()+1,year:e.getFullYear()})+nX({hours:e.getHours(),minutes:e.getMinutes(),seconds:e.getSeconds()+e.getMilliseconds()/1e3});return t<0?new C.Error(d.NUM,eq.DateBounds):new C.Number(t%1==0?new tk(t,"Date()"):t<1?new tH(t,"Date()"):new tL(t,"Date()"))}if("string"==typeof e){let r;if("true"===(r=e.toLowerCase())||"false"===r)return new C.Boolean("true"===e.toLowerCase());{var t;let r;if(e.startsWith("="))return new C.Formula(e);if(t=this.config.errorMapping,r=e.toUpperCase(),/#[A-Za-z0-9\/]+[?!]?/.test(r)&&Object.prototype.hasOwnProperty.call(t,r))return new C.Error(this.config.errorMapping[e.toUpperCase()]);let n,o=e.trim(),i=0;if(o.endsWith("%"))i=1,o=o.slice(0,o.length-1);else{let e=this.currencyMatcher(o);void 0!==e&&(i=2,[n,o]=e)}let s=this.numberLiteralsHelper.numericStringToMaybeNumber(o);if(void 0!==s){let e;return e=1===i?new tP(s/100):2===i?new t_(s,n):s,new C.Number(e)}let a=this.dateHelper.dateStringToDateNumber(o);return void 0!==a?new C.Number(a):new C.String(e.startsWith("'")?e.slice(1):e)}}else throw new rt(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)]}}}(F=b||(b={}))[F.COPY=0]="COPY",F[F.CUT=1]="CUT",(V=y||(y={}))[V.VALUE=0]="VALUE",V[V.EMPTY=1]="EMPTY",V[V.FORMULA=2]="FORMULA",V[V.PARSING_ERROR=3]="PARSING_ERROR";class oo{constructor(e,t,r,n,o){this.sourceLeftCorner=e,this.width=t,this.height=r,this.type=n,this.content=o}*getContent(e){if(void 0!==this.content)for(let t=0;t<this.height;++t)for(let r=0;r<this.width;++r)yield[r1(e.sheet,e.col+r,e.row+t),this.content[t][r]]}}class oi{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 oo(e,t,r,b.CUT)}copy(e,t,r){let n=[];for(let o=0;o<r;++o){n[o]=[];for(let r=0;r<t;++r){let t=this.operations.getClipboardCell(r1(e.sheet,e.col+r,e.row+o));n[o].push(t)}}this.clipboard=new oo(e,t,r,b.COPY,n)}abortCut(){this.clipboard&&this.clipboard.type===b.CUT&&this.clear()}clear(){this.clipboard=void 0}ensureItIsPossibleToCopyPaste(e){if(void 0===this.clipboard)return;if(r2(e)||!this.dependencyGraph.sheetMapping.hasSheetWithId(e.sheet))throw new t2("a valid target address.");let t=ne.spanFrom(e,this.clipboard.width,this.clipboard.height);if(t.exceedsSheetSizeLimits(this.maxColumns,this.maxRows))throw new tJ;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===b.CUT}isCopyClipboard(){return void 0!==this.clipboard&&this.clipboard.type===b.COPY}}class os{performEagerTransformations(e,t){for(let r of e.arrayFormulaNodes()){let[n,o]=this.transformSingleAst(r.getFormula(e.lazilyTransformingAstService),r.getAddress(e.lazilyTransformingAstService)),i=t.rememberNewAst(n);r.setFormula(i),r.setAddress(o)}}transformSingleAst(e,t){return[this.transformAst(e,t),this.fixNodeAddress(t)]}transformAst(e,t){switch(e.type){case o.CELL_REFERENCE:return this.transformCellReferenceAst(e,t);case o.CELL_RANGE:return this.transformCellRangeAst(e,t);case o.COLUMN_RANGE:return this.transformColumnRangeAst(e,t);case o.ROW_RANGE:return this.transformRowRangeAst(e,t);case o.EMPTY:case o.ERROR:case o.NUMBER:case o.NAMED_EXPRESSION:case o.ERROR_WITH_RAW_INPUT:case o.STRING:return e;case o.PERCENT_OP:case o.MINUS_UNARY_OP:case o.PLUS_UNARY_OP:return Object.assign(Object.assign({},e),{value:this.transformAst(e.value,t)});case o.FUNCTION_CALL:return Object.assign(Object.assign({},e),{procedureName:e.procedureName,args:e.args.map(e=>this.transformAst(e,t))});case o.PARENTHESIS:return Object.assign(Object.assign({},e),{expression:this.transformAst(e.expression,t)});case o.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 rX(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 rX(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 rX(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 rX(d.REF)):e}}class oa extends os{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=r4(e,t);if(r!==this.columnsSpan.sheet&&t.sheet!==this.columnsSpan.sheet)return!1;let n=e.toSimpleColumnAddress(t);if(r===this.columnsSpan.sheet&&t.sheet!==this.columnsSpan.sheet)if(this.columnsSpan.columnStart<=n.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 n=this.transformCellAddress(e,r),o=this.transformCellAddress(t,r);return n===d.REF||o===d.REF?d.REF:(!!n||!!o)&&[n||e,o||t]}}class ol extends os{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=r4(e,t);if(r!==this.rowsSpan.sheet&&t.sheet!==this.rowsSpan.sheet)return!1;let n=e.toSimpleRowAddress(t);if(r===this.rowsSpan.sheet&&t.sheet!==this.rowsSpan.sheet)if(this.rowsSpan.rowStart<=n.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(n.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 n=this.transformCellAddress(e,r),o=this.transformCellAddress(t,r);return n===d.REF||o===d.REF?d.REF:(!!n||!!o)&&[n||e,o||t]}}class oh extends os{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 od extends os{constructor(e,t,r,n){super(),this.sourceRange=e,this.toRight=t,this.toBottom=r,this.toSheet=n,this.dependentFormulaTransformer=new ou(e,t,r,n)}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 r1(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 n=e.toSimpleCellAddress(t);if(r.addressInRange(n))return e.shiftAbsoluteDimensions(this.toRight,this.toBottom)}return e.shiftRelativeDimensions(-this.toRight,-this.toBottom)}transformRange(e,t,r){let n=this.sourceRange;if(e instanceof el&&t instanceof el){let o=e.toSimpleCellAddress(r),i=t.toSimpleCellAddress(r);if(n.addressInRange(o)&&n.addressInRange(i))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 ou extends os{constructor(e,t,r,n){super(),this.sourceRange=e,this.toRight=t,this.toBottom=r,this.toSheet=n}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 ea?this.sourceRange.rowInRange(e.toSimpleRowAddress(t))&&!this.sourceRange.isFinite():this.sourceRange.columnInRange(e.toSimpleColumnAddress(t))&&!this.sourceRange.isFinite()}transformRange(e,t,r){let n=this.transformCellAddress(e,r),o=this.transformCellAddress(t,r);return!!n&&!!o&&[n,o]}}class oc extends os{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=r4(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 n=r4(e,r),o=e,i=t;if(this.columnsSpan.sheet===n){let n=e.toSimpleColumnAddress(r),s=t.toSimpleColumnAddress(r);if(this.columnsSpan.columnStart<=n.col&&this.columnsSpan.columnEnd>=s.col)return d.REF;n.col>=this.columnsSpan.columnStart&&n.col<=this.columnsSpan.columnEnd&&(o=e.shiftedByColumns(this.columnsSpan.columnEnd-n.col+1)),s.col>=this.columnsSpan.columnStart&&s.col<=this.columnsSpan.columnEnd&&(i=t.shiftedByColumns(-(s.col-this.columnsSpan.columnStart+1)))}let s=this.transformCellAddress(o,r),a=this.transformCellAddress(i,r);if(!1===s&&!1===a)return[o,i];if(s!==d.REF&&a!==d.REF)return[s||o,a||i];throw Error("Cannot happen")}}class og extends os{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=r4(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 n=r4(e,r),o=e,i=t;if(this.rowsSpan.sheet===n){let n=e.toSimpleRowAddress(r),s=t.toSimpleRowAddress(r);if(this.rowsSpan.rowStart<=n.row&&this.rowsSpan.rowEnd>=s.row)return d.REF;n.row>=this.rowsSpan.rowStart&&n.row<=this.rowsSpan.rowEnd&&(o=e.shiftedByRows(this.rowsSpan.rowEnd-n.row+1)),s.row>=this.rowsSpan.rowStart&&s.row<=this.rowsSpan.rowEnd&&(i=t.shiftedByRows(-(s.row-this.rowsSpan.rowStart+1)))}let s=this.transformCellAddress(o,r),a=this.transformCellAddress(i,r);return!1===s&&!1===a?[o,i]:s===d.REF||a===d.REF?d.REF:[s||o,a||i]}}class op extends os{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),n=this.updateSheetInAddress(t);return(!!r||!!n)&&[r||e,n||t]}updateSheetInAddress(e){return e.sheet===this.sheetBeingMerged&&e.withSheet(this.sheetIdToKeep)}}class om{constructor(e,t){this.sheet=e,this.indexes=t}normalizedIndexes(){return ow(this.indexes)}rowsSpans(){return this.normalizedIndexes().map(e=>tj.fromNumberOfRows(this.sheet,e[0],e[1]))}}class of{constructor(e,t){this.sheet=e,this.indexes=t}normalizedIndexes(){return oS(this.indexes)}rowsSpans(){return this.normalizedIndexes().map(e=>tj.fromNumberOfRows(this.sheet,e[0],e[1]))}}class oC{constructor(e,t){this.sheet=e,this.indexes=t}normalizedIndexes(){return oS(this.indexes)}columnsSpans(){return this.normalizedIndexes().map(e=>tY.fromNumberOfColumns(this.sheet,e[0],e[1]))}}class ob{constructor(e,t){this.sheet=e,this.indexes=t}normalizedIndexes(){return ow(this.indexes)}columnsSpans(){return this.normalizedIndexes().map(e=>tY.fromNumberOfColumns(this.sheet,e[0],e[1]))}}class oy{constructor(e,t,r,n,o,i,s,a,l){this.dependencyGraph=t,this.columnSearch=r,this.cellContentParser=n,this.parser=o,this.stats=i,this.lazilyTransformingAstService=s,this.namedExpressions=a,this.arraySizePredictor=l,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:n,mergedWithPlaceholderSheet:o}=this.sheetMapping.renameSheet(e,t);return void 0!==o&&(this.dependencyGraph.mergeSheets(e,o),this.stats.measure(a.TRANSFORM_ASTS,()=>{let t=new op(e,o);t.performEagerTransformations(this.dependencyGraph,this.parser),r=this.lazilyTransformingAstService.addTransformation(t)})),{previousDisplayName:n,version:r,mergedPlaceholderSheetId:o}}moveRows(e,t,r,n){let o=tj.fromNumberOfRows(e,n,r);this.lazilyTransformingAstService.beginCombinedMode(e),this.doAddRows(o),n<t&&(t+=r);let i=r1(e,0,t),s=r1(e,0,n);this.moveCells(i,1/0,r,s);let a=tj.fromNumberOfRows(e,t,r);return this.doRemoveRows(a),this.lazilyTransformingAstService.commitCombinedMode()}moveColumns(e,t,r,n){let o=tY.fromNumberOfColumns(e,n,r);this.lazilyTransformingAstService.beginCombinedMode(e),this.doAddColumns(o),n<t&&(t+=r);let i=r1(e,t,0),s=r1(e,n,0);this.moveCells(i,r,1/0,s);let a=tY.fromNumberOfColumns(e,t,r);return this.doRemoveColumns(a),this.lazilyTransformingAstService.commitCombinedMode()}moveCells(e,t,r,n){this.ensureItIsPossibleToMoveCells(e,t,r,n);let o=ne.spanFrom(e,t,r),i=ne.spanFrom(n,t,r),s=n.col-e.col,l=n.row-e.row,h=n.sheet,d=this.getRangeClipboardCells(i),u=this.dependencyGraph.rawValuesFromRange(i);this.columnSearch.removeValues(u);let c=this.dependencyGraph.rawValuesFromRange(o);this.columnSearch.moveValues(c,s,l,h);let g=0;this.stats.measure(a.TRANSFORM_ASTS,()=>{let e=new od(o,s,l,h);e.performEagerTransformations(this.dependencyGraph,this.parser),g=this.lazilyTransformingAstService.addTransformation(e)}),this.dependencyGraph.moveCells(o,s,l,h);let p=this.updateNamedExpressionsForMovedCells(e,t,r,n);return{version:g,overwrittenCellsData:d,addedGlobalNamedExpressions:p}}setRowOrder(e,t){let r=[],n=[];for(let[o,i]of t)if(o!==i){let t=ne.spanFrom({sheet:e,col:0,row:o},1/0,1),s=this.getRangeClipboardCells(t);n=n.concat(s),r.push(s.map(([{sheet:e,col:t},r])=>[{sheet:e,col:t,row:i},r]))}return r.forEach(t=>this.restoreClipboardCells(e,t.values())),n}setColumnOrder(e,t){let r=[],n=[];for(let[o,i]of t)if(o!==i){let t=ne.spanFrom({sheet:e,col:o,row:0},1,1/0),s=this.getRangeClipboardCells(t);n=n.concat(s),r.push(s.map(([{sheet:e,col:t,row:r},n])=>[{sheet:e,col:i,row:r},n]))}return r.forEach(t=>this.restoreClipboardCells(e,t.values())),n}addNamedExpression(e,t,r,n){let o=this.namedExpressions.addNamedExpression(e,r,n);this.storeNamedExpressionInCell(o.address,t),this.adjustNamedExpressionEdges(o,e,r)}restoreNamedExpression(e,t,r){let n=e.displayName;this.restoreCell(e.address,t);let o=this.namedExpressions.restoreNamedExpression(e,r);this.adjustNamedExpressionEdges(o,n,r)}changeNamedExpressionExpression(e,t,r,n){let o=this.namedExpressions.namedExpressionForScope(e,r);if(!o)throw new t4(e);let i=o.copy();o.options=n;let s=this.getClipboardCell(o.address);return this.storeNamedExpressionInCell(o.address,t),[i,s]}removeNamedExpression(e,t){let r=this.namedExpressions.namedExpressionForScope(e,t);if(!r)throw new t4(e);this.namedExpressions.remove(r.displayName,t);let n=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,n]}ensureItIsPossibleToMoveCells(e,t,r,n){var o,i,s;if(r2(e)||!(ov(t)&&ov(r)||(o=e,i=t,s=r,0===o.row&&ov(i)&&s===1/0||0===o.col&&ov(s)&&i===1/0))||r2(n)||!this.sheetMapping.hasSheetWithId(e.sheet)||!this.sheetMapping.hasSheetWithId(n.sheet))throw new t2("a valid range of cells to move.");let a=ne.spanFrom(e,t,r),l=ne.spanFrom(n,t,r);if(l.exceedsSheetSizeLimits(this.maxColumns,this.maxRows))throw new tJ;if(this.dependencyGraph.arrayMapping.isFormulaArrayInRange(a))throw new rp;if(this.dependencyGraph.arrayMapping.isFormulaArrayInRange(l))throw new rm}restoreClipboardCells(e,t){let r=[];for(let[n,o]of t)if(this.restoreCell(n,o),o.type===y.FORMULA){let{dependencies:t}=this.parser.fetchCachedResult(o.hash);r.push(...this.updateNamedExpressionsForTargetAddress(e,n,t))}return r}restoreCell(e,t){switch(t.type){case y.VALUE:this.setValueToCell(t,e);break;case y.FORMULA:this.setFormulaToCellFromCache(t.hash,e);break;case y.EMPTY:this.setCellEmpty(e);break;case y.PARSING_ERROR:this.setParsingErrorToCell(t.rawInput,t.errors,e)}}getOldContent(e){let t=this.dependencyGraph.getCell(e);if(void 0===t||t instanceof rU)return[e,{type:y.EMPTY}];if(t instanceof rz)return[e,Object.assign({type:y.VALUE},t.getValues())];if(t instanceof rT)return[t.getAddress(this.lazilyTransformingAstService),{type:y.FORMULA,hash:this.parser.computeHashFromAst(t.getFormula(this.lazilyTransformingAstService))}];if(t instanceof rW)return[e,{type:y.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 rU)return{type:y.EMPTY};if(t instanceof rz)return Object.assign({type:y.VALUE},t.getValues());if(t instanceof rA){let r=t.getArrayCellValue(e);return r===tN?{type:y.EMPTY}:{type:y.VALUE,parsedValue:r,rawValue:t.getArrayCellRawValue(e)}}if(t instanceof rM)return{type:y.FORMULA,hash:this.parser.computeHashFromAst(t.getFormula(this.lazilyTransformingAstService))};if(t instanceof rW)return{type:y.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),n=Array(t);for(let o=0;o<t;o++){n[o]=Array(r);for(let t=0;t<r;t++){let r=r1(e,t,o);n[o][t]=this.getClipboardCell(r)}}return n}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),o=this.getOldContent(e);if(r instanceof C.Formula){let t=this.parser.parse(r.formula,e),{ast:o,errors:i}=t;if(i.length>0)this.setParsingErrorToCell(r.formula,i,e);else try{let r=this.arraySizePredictor.checkArraySize(o,e);if(r.width<=0||r.height<=0)throw Error("Incorrect array size");this.setFormulaToCell(e,r,t)}catch(o){if(!o.message)throw o;let t={type:n.InvalidRangeSize,message:"Invalid range size."};this.setParsingErrorToCell(r.formula,[t],e)}}else r instanceof C.Empty?this.setCellEmpty(e):this.setValueToCell({parsedValue:r.value,rawValue:t},e);return o}setSheetContent(e,t){this.clearSheet(e);for(let r=0;r<t.length;r++)for(let n=0;n<t[r].length;n++){let o=r1(e,n,r);this.setCellContent(o,t[r][n])}}setParsingErrorToCell(e,t,r){this.removeCellValueFromColumnSearch(r);let n=new rW(t,e),o=this.dependencyGraph.setParsingErrorToCell(r,n);this.columnSearch.applyChanges(o.getChanges()),this.changes.addAll(o),this.changes.addChange(n.getCellValue(),r)}setFormulaToCell(e,t,{ast:r,hasVolatileFunction:n,hasStructuralChangeFunction:o,dependencies:i}){this.removeCellValueFromColumnSearch(e);let s=this.dependencyGraph.setFormulaToCell(e,r,tM(i,e),t,n,o);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=>!r9(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(tN,e)}setFormulaToCellFromCache(e,t){let{ast:r,hasVolatileFunction:n,hasStructuralChangeFunction:o,dependencies:i}=this.parser.fetchCachedResult(e),s=tM(i,t),[a]=new oh(t.sheet).transformSingleAst(r,t);this.parser.rememberNewAst(a);let l=s.filter(e=>e instanceof tA||(e instanceof ne?!(r2(e.start)||r2(e.end)):!r2(e))),h=this.arraySizePredictor.checkArraySize(r,t);this.dependencyGraph.setFormulaToCell(t,a,l,h,n,o)}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:n}=this.dependencyGraph.removeRows(e);this.columnSearch.applyChanges(n.getChanges());let o=0;return this.stats.measure(a.TRANSFORM_ASTS,()=>{let t=new og(e);t.performEagerTransformations(this.dependencyGraph,this.parser),o=this.lazilyTransformingAstService.addTransformation(t)}),this.rewriteAffectedArrays(r),{version:o,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:n}=this.dependencyGraph.removeColumns(e);this.columnSearch.applyChanges(n.getChanges()),this.columnSearch.removeColumns(e);let o=0;return this.stats.measure(a.TRANSFORM_ASTS,()=>{let t=new oc(e);t.performEagerTransformations(this.dependencyGraph,this.parser),o=this.lazilyTransformingAstService.addTransformation(t)}),this.rewriteAffectedArrays(r),{version:o,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(a.TRANSFORM_ASTS,()=>{let t=new ol(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),n=this.parser.computeHashFromAst(e);this.setFormulaToCellFromCache(n,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(a.TRANSFORM_ASTS,()=>{let t=new oa(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:n,id:o}=this.dependencyGraph.fetchCellOrCreateEmpty(e.address),i=null!=o?o:n.idInGraph,s=this.namedExpressions.workbookNamedExpressionOrPlaceholder(t),{vertex:a,id:l}=this.dependencyGraph.fetchCellOrCreateEmpty(s.address),h=null!=l?l:a.idInGraph;for(let t of this.dependencyGraph.graph.adjacentNodes(a))if(t instanceof rM&&t.getAddress(this.lazilyTransformingAstService).sheet===r){let r=t.getFormula(this.lazilyTransformingAstService),n=t.getAddress(this.lazilyTransformingAstService),{dependencies:o}=this.parser.fetchCachedResultForAst(r);for(let r of tM(o,n))r instanceof tA&&r.name.toLowerCase()===e.displayName.toLowerCase()&&(this.dependencyGraph.graph.removeEdgeIfExists(h,t),this.dependencyGraph.graph.addEdge(i,t))}}storeNamedExpressionInCell(e,t){let r=this.cellContentParser.parse(t);if(r instanceof C.Formula){let t=this.parser.parse(r.formula,r1(-1,0,0));if(t$(t.ast))throw new rf;let{ast:n,hasVolatileFunction:o,hasStructuralChangeFunction:i,dependencies:s}=t;this.dependencyGraph.setFormulaToCell(e,n,tM(s,e),nE.scalar(),o,i)}else r instanceof C.Empty?this.setCellEmpty(e):this.setValueToCell({parsedValue:r.value,rawValue:t},e)}updateNamedExpressionsForMovedCells(e,t,r,n){if(e.sheet===n.sheet)return[];let o=[];for(let i of ne.spanFrom(n,t,r).addresses(this.dependencyGraph)){let t=this.addressMapping.getCell(i,{throwIfCellNotExists:!0});if(t instanceof rM&&i.sheet!==e.sheet){let r=t.getFormula(this.lazilyTransformingAstService),{dependencies:n}=this.parser.fetchCachedResultForAst(r);o.push(...this.updateNamedExpressionsForTargetAddress(e.sheet,i,n))}}return o}updateNamedExpressionsForTargetAddress(e,t,r){if(e===t.sheet)return[];let n=[],o=this.addressMapping.getCellOrThrow(t);for(let i of tM(r,t)){if(!(i instanceof tA))continue;let r=i.name,s=this.dependencyGraph.fetchNamedExpressionVertex(r,e).vertex,a=this.namedExpressions.isExpressionInScope(r,t.sheet)?this.dependencyGraph.fetchNamedExpressionVertex(r,t.sheet).vertex:this.copyOrFetchGlobalNamedExpressionVertex(r,s,n);a!==s&&(this.dependencyGraph.graph.removeEdgeIfExists(s,o),this.dependencyGraph.graph.addEdge(a,o))}return n}allocateNamedExpressionAddressSpace(){this.dependencyGraph.addressMapping.addSheetWithStrategy(tG.SHEET_FOR_WORKBOOK_EXPRESSIONS,new rG(0,0))}copyOrFetchGlobalNamedExpressionVertex(e,t,r){let n=this.namedExpressions.namedExpressionForScope(e);if(void 0===n)if(n=this.namedExpressions.addNamedExpression(e),r.push(n.normalizeExpressionName()),t instanceof rM){let{ast:e,hasVolatileFunction:r,hasStructuralChangeFunction:o,dependencies:i}=this.parser.fetchCachedResultForAst(t.getFormula(this.lazilyTransformingAstService));this.dependencyGraph.setFormulaToCell(n.address,e,tM(i,n.address),nE.scalar(),r,o)}else t instanceof rU?this.setCellEmpty(n.address):t instanceof rz&&this.setValueToCell(t.getValues(),n.address);return this.dependencyGraph.fetchCellOrCreateEmpty(n.address).vertex}removeCellValueFromColumnSearch(e){if(this.isNotComputed(e))return;let t=this.dependencyGraph.getCellValue(e);this.columnSearch.remove(tI(t),e)}changeCellValueInColumnSearch(e,t){if(this.isNotComputed(e))return;let r=this.dependencyGraph.getCellValue(e);this.columnSearch.change(tI(r),tI(t),e)}isNotComputed(e){let t=this.dependencyGraph.getCell(e);return!!t&&t instanceof rT&&!t.isComputed()}}function ow(e){if(e.length<=1)return e;let t=[...e].sort(([e],[t])=>e-t),r=t.reduce((e,[t,r])=>{let n=e[e.length-1],o=n[0]+n[1];return t<=o?n[1]+=Math.max(0,r-(o-t)):e.push([t,r]),e},[t[0]]),n=0;for(let e=0;e<r.length;++e)r[e][0]-=n,n+=r[e][1];return r}function oS(e){if(e.length<=1)return e;let t=[...e].sort(([e],[t])=>e-t),r=t.reduce((e,[t,r])=>{let n=e[e.length-1];return t===n[0]?n[1]=Math.max(n[1],r):e.push([t,r]),e},[t[0]]),n=0;for(let e=0;e<r.length;++e)r[e][0]+=n,n+=r[e][1];return r}function ov(e){return Number.isInteger(e)&&e>0}class oR{getReferencedOldDataVersions(){return[]}}class oE extends oR{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 oT extends oR{constructor(e,t,r,n,o,i,s){super(),this.sourceLeftCorner=e,this.width=t,this.height=r,this.destinationLeftCorner=n,this.overwrittenCellsData=o,this.addedGlobalNamedExpressions=i,this.version=s}doUndo(e){e.undoMoveCells(this)}doRedo(e){e.redoMoveCells(this)}getReferencedOldDataVersions(){return this.version>0?[this.version-1]:[]}}class oA extends oR{constructor(e){super(),this.command=e}doUndo(e){e.undoAddRows(this)}doRedo(e){e.redoAddRows(this)}}class oM extends oR{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 oN extends oR{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 oI extends oR{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 ox extends oR{constructor(e,t,r,n,o){super(),this.sheet=e,this.startRow=t,this.numberOfRows=r,this.targetRow=n,this.version=o,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 oO extends oR{constructor(e,t,r,n,o){super(),this.sheet=e,this.startColumn=t,this.numberOfColumns=r,this.targetColumn=n,this.version=o,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 ok extends oR{constructor(e){super(),this.command=e}doUndo(e){e.undoAddColumns(this)}doRedo(e){e.redoAddColumns(this)}}class o_ extends oR{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 oH extends oR{constructor(e,t){super(),this.sheetName=e,this.sheetId=t}doUndo(e){e.undoAddSheet(this)}doRedo(e){e.redoAddSheet(this)}}class oL extends oR{constructor(e,t,r,n){super(),this.sheetName=e,this.sheetId=t,this.oldSheetContent=r,this.scopedNamedExpressions=n}doUndo(e){e.undoRemoveSheet(this)}doRedo(e){e.redoRemoveSheet(this)}}class oP extends oR{constructor(e,t,r,n,o){super(),this.sheetId=e,this.oldName=t,this.newName=r,this.version=n,this.mergedPlaceholderSheetId=o}doUndo(e){e.undoRenameSheet(this)}doRedo(e){e.redoRenameSheet(this)}getReferencedOldDataVersions(){return void 0!==this.version&&this.version>0?[this.version-1]:[]}}class oD extends oR{constructor(e,t){super(),this.sheetId=e,this.oldSheetContent=t}doUndo(e){e.undoClearSheet(this)}doRedo(e){e.redoClearSheet(this)}}class oF extends oR{constructor(e){super(),this.cellContents=e}doUndo(e){e.undoSetCellContents(this)}doRedo(e){e.redoSetCellContents(this)}}class oV extends oR{constructor(e,t,r,n){super(),this.targetLeftCorner=e,this.oldContent=t,this.newContent=r,this.addedGlobalNamedExpressions=n}doUndo(e){e.undoPaste(this)}doRedo(e){e.redoPaste(this)}}class oB extends oR{constructor(e,t,r,n){super(),this.name=e,this.newContent=t,this.scope=r,this.options=n}doUndo(e){e.undoAddNamedExpression(this)}doRedo(e){e.redoAddNamedExpression(this)}}class oU extends oR{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 oz extends oR{constructor(e,t,r,n,o){super(),this.namedExpression=e,this.newContent=t,this.oldContent=r,this.scope=n,this.options=o}doUndo(e){e.undoChangeNamedExpression(this)}doRedo(e){e.redoChangeNamedExpression(this)}}class oW extends oR{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 oG{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 oW}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 n=r[e];for(let{address:e,cellType:r}of(this.operations.addRows(new of(t,[[n.rowFrom,n.rowCount]])),n.removedCells))this.operations.restoreCell(e,r);this.restoreOldDataFromVersion(n.version-1)}}undoRemoveColumns(e){this.operations.forceApplyPostponedTransformations();let{command:{sheet:t},columnsRemovals:r}=e;for(let e=r.length-1;e>=0;--e){let n=r[e];for(let{address:e,cellType:r}of(this.operations.addColumns(new oC(t,[[n.columnFrom,n.columnCount]])),n.removedCells))this.operations.restoreCell(e,r);this.restoreOldDataFromVersion(n.version-1)}}undoAddRows(e){let t=e.command.rowsSpans();for(let r=t.length-1;r>=0;--r){let n=t[r];this.operations.removeRows(new om(e.command.sheet,[[n.rowStart,n.numberOfRows]]))}}undoAddColumns(e){let t=e.command.columnsSpans();for(let r=t.length-1;r>=0;--r){let n=t[r];this.operations.removeColumns(new ob(e.command.sheet,[[n.columnStart,n.numberOfColumns]]))}}undoSetCellContents(e){for(let t of e.cellContents){let e=t.address,[r,n]=t.oldContent;r9(e,r)||this.operations.setCellEmpty(e),this.operations.restoreCell(r,n)}}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:n,sheetName:o}=e;this.operations.addSheetWithId(r,o);for(let e=0;e<t.length;e++){let n=t[e];for(let t=0;t<n.length;t++){let o=n[t],i=r1(r,t,e);this.operations.restoreCell(i,o)}}for(let[e,t]of n)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 n=t[e];for(let t=0;t<n.length;t++){let o=n[t],i=r1(r,t,e);this.operations.restoreCell(i,o)}}}undoSetSheetContent(e){let{oldSheetContent:t,sheetId:r}=e;this.operations.clearSheet(r);for(let e=0;e<t.length;e++){let n=t[e];for(let t=0;t<n.length;t++){let o=n[t],i=r1(r,t,e);this.operations.restoreCell(i,o)}}}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,n=r.length,o=r[0].length;for(let e=0;e<n;++e)for(let n=0;n<o;++n){let o=r1(t.sheet,t.col+n,t.row+e);this.operations.restoreCell(o,r[e][n])}}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 o${constructor(e,t,r,n,o,i,s,a,l,h){this.operations=t,this.undoRedo=r,this.clipboardOperations=n,this.dependencyGraph=o,this.columnSearch=i,this.parser=s,this.cellContentParser=a,this.lazilyTransformingAstService=l,this.namedExpressions=h,this.maxRows=e.maxRows,this.maxColumns=e.maxColumns}get sheetMapping(){return this.dependencyGraph.sheetMapping}addRows(e,...t){let r=new of(e,t);this.ensureItIsPossibleToAddRows(e,...t),this.undoRedo.clearRedoStack(),this.clipboardOperations.abortCut(),this.operations.addRows(r),this.undoRedo.saveOperation(new oA(r))}removeRows(e,...t){let r=new om(e,t);this.ensureItIsPossibleToRemoveRows(e,...t),this.undoRedo.clearRedoStack(),this.clipboardOperations.abortCut();let n=this.operations.removeRows(r);this.undoRedo.saveOperation(new oE(r,n))}addColumns(e,...t){let r=new oC(e,t);this.ensureItIsPossibleToAddColumns(e,...t),this.undoRedo.clearRedoStack(),this.clipboardOperations.abortCut(),this.operations.addColumns(r),this.undoRedo.saveOperation(new ok(r))}removeColumns(e,...t){let r=new ob(e,t);this.ensureItIsPossibleToRemoveColumns(e,...t),this.undoRedo.clearRedoStack(),this.clipboardOperations.abortCut();let n=this.operations.removeColumns(r);this.undoRedo.saveOperation(new o_(r,n))}moveCells(e,t,r,n){this.undoRedo.clearRedoStack(),this.clipboardOperations.abortCut();let{version:o,overwrittenCellsData:i,addedGlobalNamedExpressions:s}=this.operations.moveCells(e,t,r,n);this.undoRedo.saveOperation(new oT(e,t,r,n,i,s,o))}moveRows(e,t,r,n){this.ensureItIsPossibleToMoveRows(e,t,r,n),this.undoRedo.clearRedoStack(),this.clipboardOperations.abortCut();let o=this.operations.moveRows(e,t,r,n);this.undoRedo.saveOperation(new ox(e,t,r,n,o))}moveColumns(e,t,r,n){this.ensureItIsPossibleToMoveColumns(e,t,r,n),this.undoRedo.clearRedoStack();let o=this.operations.moveColumns(e,t,r,n);this.undoRedo.saveOperation(new oO(e,t,r,n,o))}cut(e,t,r){this.clipboardOperations.cut(e,t,r)}ensureItIsPossibleToCopy(e,t,r){if(!oj(t))throw new t2("width to be positive integer.");if(!oj(r))throw new t2("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 t8;if(this.clipboardOperations.isCutClipboard())this.moveCells(t.sourceLeftCorner,t.width,t.height,e);else if(this.clipboardOperations.isCopyClipboard()){this.clipboardOperations.ensureItIsPossibleToCopyPaste(e);let r=ne.spanFrom(e,t.width,t.height),n=this.operations.getRangeClipboardCells(r);this.undoRedo.clearRedoStack();let o=this.operations.restoreClipboardCells(t.sourceLeftCorner.sheet,t.getContent(e));this.undoRedo.saveOperation(new oV(e,n,t.content,o))}}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 oH(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),n=this.operations.removeSheet(e);this.undoRedo.saveOperation(new oL(t,e,r,n))}renameSheet(e,t){this.ensureItIsPossibleToRenameSheet(e,t);let{previousDisplayName:r,version:n,mergedPlaceholderSheetId:o}=this.operations.renameSheet(e,t);return void 0!==r&&(this.undoRedo.clearRedoStack(),this.undoRedo.saveOperation(new oP(e,r,t,n,o))),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 oD(e,t))}setCellContents(e,t){if(t instanceof Array){for(let e=0;e<t.length;e++)if(!(t[e]instanceof Array))throw new t2("an array of arrays or a raw cell value.")}else t=[[t]];this.ensureItIsPossibleToChangeCellContents(e,t),this.undoRedo.clearRedoStack();let r=[];for(let n=0;n<t.length;n++)for(let o=0;o<t[n].length;o++){let i={sheet:e.sheet,row:e.row+n,col:e.col+o},s=t[n][o];this.clipboardOperations.abortCut();let a=this.operations.setCellContent(i,s);r.push({address:i,newContent:s,oldContent:a})}this.undoRedo.saveOperation(new oF(r))}setSheetContent(e,t){this.ensureScopeIdIsValid(e),this.ensureItIsPossibleToChangeSheetContents(e,t),rF(t),this.undoRedo.clearRedoStack(),this.clipboardOperations.abortCut();let r=this.operations.getSheetClipboardCells(e);this.operations.setSheetContent(e,t),this.undoRedo.saveOperation(new oI(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 oM(e,t,r))}validateSwapRowIndexes(e,t){if(!this.sheetMapping.hasSheetWithId(e))throw new tX(e);this.validateRowOrColumnMapping(e,t,"row")}testColumnOrderForArrays(e,t){for(let[r,n]of t)if(r!==n){let t=ne.spanFrom({sheet:e,col:r,row:0},1,1/0);if(this.dependencyGraph.arrayMapping.isFormulaArrayInRange(t))throw new rp}}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 oN(e,t,r))}validateSwapColumnIndexes(e,t){if(!this.sheetMapping.hasSheetWithId(e))throw new tX(e);this.validateRowOrColumnMapping(e,t,"column")}testRowOrderForArrays(e,t){for(let[r,n]of t)if(r!==n){let t=ne.spanFrom({sheet:e,col:0,row:r},1/0,1);if(this.dependencyGraph.arrayMapping.isFormulaArrayInRange(t))throw new rp}}mappingFromOrder(e,t,r){if(!this.sheetMapping.hasSheetWithId(e))throw new tX(e);let n="row"===r?this.dependencyGraph.getSheetHeight(e):this.dependencyGraph.getSheetWidth(e);if(t.length!==n)throw new t2(`number of ${r}s provided to be sheet ${"row"===r?"height":"width"}.`);let o=[];for(let e=0;e<n;e++)t[e]!==e&&o.push([e,t[e]]);return o}undo(){if(this.undoRedo.isUndoStackEmpty())throw new t9;this.clipboardOperations.abortCut(),this.undoRedo.undo()}redo(){if(this.undoRedo.isRedoStackEmpty())throw new t7;this.clipboardOperations.abortCut(),this.undoRedo.redo()}addNamedExpression(e,t,r,n){this.ensureItIsPossibleToAddNamedExpression(e,t,r),this.operations.addNamedExpression(e,t,r,n),this.undoRedo.clearRedoStack(),this.clipboardOperations.abortCut(),this.undoRedo.saveOperation(new oB(e,t,r,n))}changeNamedExpressionExpression(e,t,r,n){this.ensureItIsPossibleToChangeNamedExpression(e,r,t);let[o,i]=this.operations.changeNamedExpressionExpression(e,r,t,n);this.undoRedo.clearRedoStack(),this.clipboardOperations.abortCut(),this.undoRedo.saveOperation(new oz(o,r,i,t,n))}removeNamedExpression(e,t){this.ensureScopeIdIsValid(t);let[r,n]=this.operations.removeNamedExpression(e,t);return this.undoRedo.clearRedoStack(),this.clipboardOperations.abortCut(),this.undoRedo.saveOperation(new oU(r,n,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 t4(e);this.ensureNamedExpressionIsValid(t)}isItPossibleToRemoveNamedExpression(e,t){if(this.ensureScopeIdIsValid(t),void 0===this.namedExpressions.namedExpressionForScope(e,t))throw new t4(e)}ensureItIsPossibleToAddRows(e,...t){if(!this.sheetMapping.hasSheetWithId(e))throw new tX(e);if(this.dependencyGraph.getSheetHeight(e)+t.map(e=>e[1]).reduce((e,t)=>e+t,0)>this.maxRows)throw new tJ;for(let[e,r]of t)if(!oY(e)||!oj(r))throw new t2("row number to be nonnegative and number of rows to add to be positive.")}ensureItIsPossibleToRemoveRows(e,...t){for(let[r,n]of t){let t=r+n-1;if(!oY(r)||!oY(t))throw new t2("starting and ending row to be nonnegative.");if(t<r)throw new t2("starting row to be smaller than the ending row.");if(!this.sheetMapping.hasSheetWithId(e))throw new tX(e)}}ensureItIsPossibleToAddColumns(e,...t){if(!this.sheetMapping.hasSheetWithId(e))throw new tX(e);if(this.dependencyGraph.getSheetWidth(e)+t.map(e=>e[1]).reduce((e,t)=>e+t,0)>this.maxColumns)throw new tJ;for(let[e,r]of t)if(!oY(e)||!oj(r))throw new t2("column number to be nonnegative and number of columns to add to be positive.")}ensureItIsPossibleToRemoveColumns(e,...t){for(let[r,n]of t){let t=r+n-1;if(!oY(r)||!oY(t))throw new t2("starting and ending column to be nonnegative.");if(t<r)throw new t2("starting column to be smaller than the ending column.");if(!this.sheetMapping.hasSheetWithId(e))throw new tX(e)}}ensureItIsPossibleToMoveRows(e,t,r,n){this.ensureItIsPossibleToAddRows(e,[n,r]);let o=r1(e,0,t),i=r1(e,0,n);if(!this.sheetMapping.hasSheetWithId(e)||r2(o)||r2(i)||!oj(r)||n<=t+r&&n>=t)throw new t2("a valid range of rows to move.");let s=this.dependencyGraph.getSheetWidth(e),a=ne.spanFrom(o,s,r);if(this.dependencyGraph.arrayMapping.isFormulaArrayInRange(a))throw new rp;if(n>0&&this.dependencyGraph.arrayMapping.isFormulaArrayInAllRows(tj.fromNumberOfRows(e,n-1,2)))throw new rm}ensureItIsPossibleToMoveColumns(e,t,r,n){this.ensureItIsPossibleToAddColumns(e,[n,r]);let o=r1(e,t,0),i=r1(e,n,0);if(!this.sheetMapping.hasSheetWithId(e)||r2(o)||r2(i)||!oj(r)||n<=t+r&&n>=t)throw new t2("a valid range of columns to move.");let s=this.dependencyGraph.getSheetHeight(e),a=ne.spanFrom(o,r,s);if(this.dependencyGraph.arrayMapping.isFormulaArrayInRange(a))throw new rp;if(n>0&&this.dependencyGraph.arrayMapping.isFormulaArrayInAllColumns(tY.fromNumberOfColumns(e,n-1,2)))throw new rm}ensureItIsPossibleToAddSheet(e){if(this.sheetMapping.hasSheetWithName(e))throw new tZ(e)}ensureItIsPossibleToRenameSheet(e,t){if(!this.sheetMapping.hasSheetWithId(e))throw new tX(e);let r=this.sheetMapping.getSheetId(t);if(void 0!==r&&r!==e)throw new tZ(t)}ensureItIsPossibleToChangeContent(e){if(r2(e))throw new t1(e);if(!this.sheetMapping.hasSheetWithId(e.sheet))throw new tX(e.sheet)}ensureItIsPossibleToChangeCellContents(e,t){let r=rV(t),n=ne.spanFrom(e,r.width,r.height);for(let e of(this.ensureRangeInSizeLimits(n),n.addresses(this.dependencyGraph)))this.ensureItIsPossibleToChangeContent(e)}ensureItIsPossibleToChangeSheetContents(e,t){let r=rV(t),n=ne.spanFrom(r1(e,0,0),r.width,r.height);this.ensureRangeInSizeLimits(n)}ensureRangeInSizeLimits(e){if(e.exceedsSheetSizeLimits(this.maxColumns,this.maxRows))throw new tJ}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 tX(e)}validateRowOrColumnMapping(e,t,r){let n="row"===r?this.dependencyGraph.getSheetHeight(e):this.dependencyGraph.getSheetWidth(e),o=t.map(([e,t])=>e).sort((e,t)=>e-t),i=t.map(([e,t])=>t).sort((e,t)=>e-t);for(let e=0;e<o.length;e++){if(!oY(o[e])||o[e]>=n)throw new t2(`${r} numbers to be nonnegative integers and less than sheet ${"row"===r?"height":"width"}.`);if(o[e]===o[e+1])throw new t2(`source ${r} numbers to be unique.`);if(o[e]!==i[e])throw new t2(`target ${r} numbers to be permutation of source ${r} numbers.`)}}ensureNamedExpressionNameIsValid(e,t){if(!this.namedExpressions.isNameValid(e))throw new t5(e);if(!this.namedExpressions.isNameAvailable(e,t))throw new t6(e)}ensureNamedExpressionIsValid(e){let t=this.cellContentParser.parse(e);if(t instanceof C.Formula&&t$(this.parser.parse(t.formula,r1(-1,0,0)).ast))throw new rf}}function oj(e){return Number.isInteger(e)&&e>0}function oY(e){return Number.isInteger(e)&&e>=0}class oq{constructor(e,t,r,n,o,i){this.config=e,this.stats=t,this.interpreter=r,this.lazilyTransformingAstService=n,this.dependencyGraph=o,this.columnSearch=i}run(){this.stats.start(a.TOP_SORT);let{sorted:e,cycled:t}=this.dependencyGraph.topSortWithScc();this.stats.end(a.TOP_SORT),this.stats.measure(a.EVALUATION,()=>{this.recomputeFormulas(t,e)})}partialRun(e){let t=tB.empty();return this.stats.measure(a.EVALUATION,()=>{this.dependencyGraph.graph.getTopSortedWithSccSubgraphFrom(e,e=>this.recomputeVertex(e,t),e=>this.processVertexOnCycle(e,t))}),t}runAndForget(e,t,r){let n=[];for(let e of tM(r,t))if(e instanceof ne&&void 0===this.dependencyGraph.getRange(e.start,e.end)){let t=new rN(e);this.dependencyGraph.rangeMapping.addOrUpdateVertex(t),n.push(t)}let o=this.evaluateAstToCellValue(e,new nn(t,this.config.useArrayArithmetic));return n.forEach(e=>{this.dependencyGraph.rangeMapping.removeVertexIfExists(e)}),o}recomputeVertex(e,t){if(e instanceof rT){let r=e.isComputed()?e.getCellValue():void 0,n=this.recomputeFormulaVertexValue(e);if(n!==r){let o=e.getAddress(this.lazilyTransformingAstService);return t.addChange(n,o),this.columnSearch.change(tI(r),tI(n),o),!0}return!1}return!(e instanceof rN)||(e.clearCache(),!0)}processVertexOnCycle(e,t){if(e instanceof rN)e.clearCache();else if(e instanceof rT){let r=e.getAddress(this.lazilyTransformingAstService);this.columnSearch.remove(tI(e.valueOrUndef()),r);let n=new rX(d.CYCLE,void 0,e);e.setCellValue(n),t.addChange(n,r)}}recomputeFormulas(e,t){e.forEach(e=>{e instanceof rT&&e.setCellValue(new rX(d.CYCLE,void 0,e))}),t.forEach(e=>{if(e instanceof rT){let t=this.recomputeFormulaVertexValue(e),r=e.getAddress(this.lazilyTransformingAstService);this.columnSearch.add(tI(t),r)}else e instanceof rN&&e.clearCache()})}recomputeFormulaVertexValue(e){let t=e.getAddress(this.lazilyTransformingAstService);if(e instanceof rA&&(e.array.size.isRef||!this.dependencyGraph.isThereSpaceForArray(e)))return e.setNoSpace();{let r=e.getFormula(this.lazilyTransformingAstService),n=this.evaluateAstToCellValue(r,new nn(t,this.config.useArrayArithmetic,e));return e.setCellValue(n)}}evaluateAstToCellValue(e,t){let r=this.interpreter.evaluateAst(e,t);return r instanceof tV?r:r===tN&&this.config.evaluateNullToZero?0:r}}class oK{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 oX{constructor(e,t){this.name=e,this.newValue=t}}class oQ{constructor(e,t,r,n){this.config=e,this.namedExpressions=t,this.sheetMapping=r,this.lazilyTransformingService=n}exportChange(e){let t=e.value,r=e.address;if(r.sheet===tG.SHEET_FOR_WORKBOOK_EXPRESSIONS){let e=this.namedExpressions.namedExpressionInAddress(r.row);if(!e)throw Error("Missing named expression");return new oX(e.displayName,this.exportScalarOrRange(t))}if(!(t instanceof tV))return new oK(r,this.exportValue(t));{let e=[];for(let[n,o]of t.entriesFromTopLeftCorner(r))e.push(new oK(o,this.exportValue(n)));return e}}exportValue(e){return e instanceof tV?this.detailedError(new rX(d.VALUE,eq.ScalarExpected)):this.config.smartRounding&&tD(e)?this.cellValueRounding(tI(e)):e instanceof rX?this.detailedError(e):e===tN?null:tI(e)}exportScalarOrRange(e){return e instanceof tV?e.rawData().map(e=>e.map(e=>this.exportValue(e))):this.exportValue(e)}detailedError(e){var t,r;let n,o=null==(t=e.root)?void 0:t.getAddress(this.lazilyTransformingService);return void 0!==o&&(n=o.sheet===tG.SHEET_FOR_WORKBOOK_EXPRESSIONS?null==(r=this.namedExpressions.namedExpressionInAddress(o.row))?void 0:r.displayName:eI(this.sheetMapping.getSheetNameOrThrowError.bind(this.sheetMapping),o,-1)),new nA(e,this.config.translationPackage.getErrorTranslation(e.type),n)}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 oZ{constructor(e,t,r,n,o,i){this.dependencyGraph=e,this.columnSearch=t,this.parser=r,this.cellContentParser=n,this.stats=o,this.arraySizePredictor=i,this.buildStrategy=new oJ(e,t,r,o,n,i)}buildGraph(e,t){let r=t.measure(a.COLLECT_DEPENDENCIES,()=>this.buildStrategy.run(e));this.dependencyGraph.getAndClearContentChanges(),t.measure(a.PROCESS_DEPENDENCIES,()=>this.processDependencies(r))}processDependencies(e){e.forEach((e,t)=>{this.dependencyGraph.processCellDependencies(e,t)})}}class oJ{constructor(e,t,r,n,o,i){this.dependencyGraph=e,this.columnIndex=t,this.parser=r,this.stats=n,this.cellContentParser=o,this.arraySizePredictor=i}run(e){let t=new Map;for(let r in e){let n=this.dependencyGraph.getSheetId(r),o=e[r];for(let e=0;e<o.length;++e){let r=o[e];for(let o=0;o<r.length;++o){let i=r[o],s=r1(n,o,e),l=this.cellContentParser.parse(i);if(l instanceof C.Formula){let e=this.stats.measure(a.PARSER,()=>this.parser.parse(l.formula,s));if(e.errors.length>0){this.shrinkArrayIfNeeded(s);let t=new rW(e.errors,l.formula);this.dependencyGraph.addVertex(s,t)}else{this.shrinkArrayIfNeeded(s);let r=this.arraySizePredictor.checkArraySize(e.ast,s);if(r.isScalar()){let r=new rM(e.ast,s,0);t.set(r,tM(e.dependencies,s)),this.dependencyGraph.addVertex(s,r),e.hasVolatileFunction&&this.dependencyGraph.markAsVolatile(r),e.hasStructuralChangeFunction&&this.dependencyGraph.markAsDependentOnStructureChange(r)}else{let n=new rA(e.ast,s,new nE(r.width,r.height));t.set(n,tM(e.dependencies,s)),this.dependencyGraph.addArrayVertex(s,n)}}}else if(l instanceof C.Empty);else{this.shrinkArrayIfNeeded(s);let e=new rz(l.value,i);this.columnIndex.add(tI(l.value),s),this.dependencyGraph.addVertex(s,e)}}}}return t}shrinkArrayIfNeeded(e){let t=this.dependencyGraph.getCell(e);t instanceof rA&&this.dependencyGraph.shrinkArrayToCorner(t)}}let o0=new Map([["gpl-v3",1],["missing",2],["invalid",3],["expired",4]]);class o1 extends nR{version(e,t){return this.runFunction(e.args,t,this.metadata("VERSION"),()=>{let e,{licenseKeyValidityState:t,licenseKey:r}=this.config;return o0.has(r)?e=o0.get(r):o0.has(t)?e=o0.get(t):"valid"===t&&(e=r.slice(-5)),`HyperFormula v${ip.version}, ${e}`})}}function o2(e,t){var r;let n=t.implementedFunctions[e],o=null==(r=t.aliases)?void 0:r[e];if(void 0!==o){if(void 0!==n)throw new rC(e,t.name);n=t.implementedFunctions[o]}if(void 0===n)throw rc.functionNotDeclaredInPlugin(e,t.name);return n}o1.implementedFunctions={VERSION:{method:"version",parameters:[]}};class o3{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))o3.loadPluginFunctions(t,this.instancePlugins);else this.instancePlugins=new Map(o3.plugins);for(const[e,t]of o3.protectedFunctions())o3.loadFunctionUnprotected(t,e,this.instancePlugins);for(const[e,t]of this.instancePlugins.entries())this.categorizeFunction(e,o2(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 rg.cannotUnregisterFunctionWithId(e);this.plugins.delete(e)}static unregisterFunctionPlugin(e){for(let t of this.protectedPlugins())if(t===e)throw rg.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(ip.getRegisteredLanguagesCodes());Object.keys(e).forEach(r=>{t.has(r)&&ip.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 rg.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 n=o2(t,e),o=n.method;if(this.handleDeprecatedMetadata(t,n),Object.prototype.hasOwnProperty.call(e.prototype,o))r.set(t,e);else throw rc.functionMethodNotFound(o,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,n]of this.instancePlugins.entries()){let o=t.find(e=>e instanceof n);void 0===o&&(o=new n(e),t.push(o));let i=o2(r,n),s=i.method;this.functions.set(r,[s,o]);let a=i.sizeOfResultArrayMethod;void 0!==a&&this.arraySizeFunctions.set(r,[a,o])}}getFunctionPlugin(e){if(!o3.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,n)=>r[e](t,n)}}getArraySizeFunction(e){let t=this.arraySizeFunctions.get(e);if(void 0!==t&&this.config.translationPackage.isFunctionTranslated(e)){let[e,r]=t;return(t,n)=>r[e](t,n)}}getMetadata(e){return this.functionsMetadata.get(e)}getPlugins(){let e=new Set;for(let[t,r]of this.instancePlugins)o3.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)}}o3.plugins=new Map,o3._protectedPlugins=new Map([["VERSION",o1],["OFFSET",void 0]]),(B=w||(w={})).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 o6=(e,t)=>({operator:e,value:t});class o5{constructor(e){var t,r,n,o;this.trueString=null!=(r=null==(t=e.translationPackage.getMaybeFunctionTranslation("TRUE"))?void 0:t.toLowerCase())?r:"true",this.falseString=null!=(o=null==(n=e.translationPackage.getMaybeFunctionTranslation("FALSE"))?void 0:n.toLowerCase())?o:"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:o9(r,t)}}parseCriterion(e,t){if("number"==typeof e||"boolean"==typeof e)return o6(w.EQUAL,e);if("string"==typeof e){let r,n,o=o4.exec(e);o?(n=function(e){switch(e){case">":return w.GREATER_THAN;case">=":return w.GREATER_THAN_OR_EQUAL;case"<":return w.LESS_THAN;case"<=":return w.LESS_THAN_OR_EQUAL;case"<>":return w.NOT_EQUAL;case"=":return w.EQUAL;default:return}}(o[1]),r=o[2]):(n=w.EQUAL,r=e);let i=t.coerceToMaybeNumber(r),s=r.toLowerCase()===this.trueString||r.toLowerCase()!==this.falseString&&void 0;if(void 0===n)return;if(""===r)return o6(n,null);if(void 0!==i)return o6(n,tI(i));if(n===w.EQUAL||n===w.NOT_EQUAL)return o6(n,null!=s?s:r)}}}let o4=/([<>=]+)(.*)/,o9=(e,t)=>{switch(e.operator){case w.GREATER_THAN:if("number"==typeof e.value)return r=>"number"==typeof r&&t.floatCmp(r,e.value)>0;return e=>!1;case w.GREATER_THAN_OR_EQUAL:if("number"==typeof e.value)return r=>"number"==typeof r&&t.floatCmp(r,e.value)>=0;return e=>!1;case w.LESS_THAN:if("number"==typeof e.value)return r=>"number"==typeof r&&0>t.floatCmp(r,e.value);return e=>!1;case w.LESS_THAN_OR_EQUAL:if("number"==typeof e.value)return r=>"number"==typeof r&&0>=t.floatCmp(r,e.value);return e=>!1;case w.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 n=t.coerceToMaybeNumber(r);return void 0!==n&&0===t.floatCmp(n,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===tN;case w.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 n=t.coerceToMaybeNumber(r);return void 0===n||0!==t.floatCmp(n,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!==tN}};class o7{constructor(e,t,r,n,o,i,s,a,l,h){this.config=e,this.dependencyGraph=t,this.columnSearch=r,this.stats=n,this.arithmeticHelper=o,this.functionRegistry=i,this.namedExpressions=s,this.serialization=a,this.arraySizePredictor=l,this.dateTimeHelper=h,this.equalOp=(e,t)=>ie(this.arithmeticHelper.eq,e,t),this.notEqualOp=(e,t)=>ie(this.arithmeticHelper.neq,e,t),this.greaterThanOp=(e,t)=>ie(this.arithmeticHelper.gt,e,t),this.lessThanOp=(e,t)=>ie(this.arithmeticHelper.lt,e,t),this.greaterThanOrEqualOp=(e,t)=>ie(this.arithmeticHelper.geq,e,t),this.lessThanOrEqualOp=(e,t)=>ie(this.arithmeticHelper.leq,e,t),this.concatOp=(e,t)=>ie(this.arithmeticHelper.concat,nu(e),nu(t)),this.plusOp=(e,t)=>ie(this.arithmeticHelper.addWithEpsilon,this.arithmeticHelper.coerceScalarToNumberOrError(e),this.arithmeticHelper.coerceScalarToNumberOrError(t)),this.minusOp=(e,t)=>ie(this.arithmeticHelper.subtract,this.arithmeticHelper.coerceScalarToNumberOrError(e),this.arithmeticHelper.coerceScalarToNumberOrError(t)),this.timesOp=(e,t)=>ie(this.arithmeticHelper.multiply,this.arithmeticHelper.coerceScalarToNumberOrError(e),this.arithmeticHelper.coerceScalarToNumberOrError(t)),this.powerOp=(e,t)=>ie(this.arithmeticHelper.pow,this.arithmeticHelper.coerceScalarToNumberOrError(e),this.arithmeticHelper.coerceScalarToNumberOrError(t)),this.divOp=(e,t)=>ie(this.arithmeticHelper.divide,this.arithmeticHelper.coerceScalarToNumberOrError(e),this.arithmeticHelper.coerceScalarToNumberOrError(t)),this.unaryMinusOp=e=>o8(this.arithmeticHelper.unaryMinus,this.arithmeticHelper.coerceScalarToNumberOrError(e)),this.percentOp=e=>o8(this.arithmeticHelper.unaryPercent,this.arithmeticHelper.coerceScalarToNumberOrError(e)),this.unaryPlusOp=e=>this.arithmeticHelper.unaryPlus(e),this.functionRegistry.initializePlugins(this),this.criterionBuilder=new o5(e)}evaluateAst(e,t){var r,n,o;let i=this.evaluateAstWithoutPostprocessing(e,t);if(tD(i))if(np(tI(i)))return new rX(d.NUM,eq.NaN);else{i=tO(i,0===(r=tI(i))?0:r)}return i instanceof tV&&1===i.height()&&1===i.width()&&([[i]]=i.data),n=i,o=t.formulaVertex,n instanceof rX&&void 0!==o?n.attachRootVertex(o):n}evaluateAstWithoutPostprocessing(e,t){switch(e.type){case o.EMPTY:return tN;case o.CELL_REFERENCE:{let r=e.reference.toSimpleCellAddress(t.formulaAddress);if(r2(r))return new rX(d.REF,eq.BadRef);if(!this.isSheetValid(e.reference))return new rX(d.REF,eq.SheetRef);return this.dependencyGraph.getCellValue(r)}case o.NUMBER:case o.STRING:return e.value;case o.CONCATENATE_OP:{let r=this.evaluateAst(e.left,t),n=this.evaluateAst(e.right,t);return this.binaryRangeWrapper(this.concatOp,r,n,t)}case o.EQUALS_OP:{let r=this.evaluateAst(e.left,t),n=this.evaluateAst(e.right,t);return this.binaryRangeWrapper(this.equalOp,r,n,t)}case o.NOT_EQUAL_OP:{let r=this.evaluateAst(e.left,t),n=this.evaluateAst(e.right,t);return this.binaryRangeWrapper(this.notEqualOp,r,n,t)}case o.GREATER_THAN_OP:{let r=this.evaluateAst(e.left,t),n=this.evaluateAst(e.right,t);return this.binaryRangeWrapper(this.greaterThanOp,r,n,t)}case o.LESS_THAN_OP:{let r=this.evaluateAst(e.left,t),n=this.evaluateAst(e.right,t);return this.binaryRangeWrapper(this.lessThanOp,r,n,t)}case o.GREATER_THAN_OR_EQUAL_OP:{let r=this.evaluateAst(e.left,t),n=this.evaluateAst(e.right,t);return this.binaryRangeWrapper(this.greaterThanOrEqualOp,r,n,t)}case o.LESS_THAN_OR_EQUAL_OP:{let r=this.evaluateAst(e.left,t),n=this.evaluateAst(e.right,t);return this.binaryRangeWrapper(this.lessThanOrEqualOp,r,n,t)}case o.PLUS_OP:{let r=this.evaluateAst(e.left,t),n=this.evaluateAst(e.right,t);return this.binaryRangeWrapper(this.plusOp,r,n,t)}case o.MINUS_OP:{let r=this.evaluateAst(e.left,t),n=this.evaluateAst(e.right,t);return this.binaryRangeWrapper(this.minusOp,r,n,t)}case o.TIMES_OP:{let r=this.evaluateAst(e.left,t),n=this.evaluateAst(e.right,t);return this.binaryRangeWrapper(this.timesOp,r,n,t)}case o.POWER_OP:{let r=this.evaluateAst(e.left,t),n=this.evaluateAst(e.right,t);return this.binaryRangeWrapper(this.powerOp,r,n,t)}case o.DIV_OP:{let r=this.evaluateAst(e.left,t),n=this.evaluateAst(e.right,t);return this.binaryRangeWrapper(this.divOp,r,n,t)}case o.PLUS_UNARY_OP:{let r=this.evaluateAst(e.value,t);return this.unaryRangeWrapper(this.unaryPlusOp,r,t)}case o.MINUS_UNARY_OP:{let r=this.evaluateAst(e.value,t);return this.unaryRangeWrapper(this.unaryMinusOp,r,t)}case o.PERCENT_OP:{let r=this.evaluateAst(e.value,t);return this.unaryRangeWrapper(this.percentOp,r,t)}case o.FUNCTION_CALL:{if("valid"!==this.config.licenseKeyValidityState&&!o3.functionIsProtected(e.procedureName))return new rX(d.LIC,eq.LicenseKey(this.config.licenseKeyValidityState));let r=this.functionRegistry.getFunction(e.procedureName);if(void 0!==r)return r(e,new nn(t.formulaAddress,t.arraysFlag||this.functionRegistry.isArrayFunction(e.procedureName),t.formulaVertex));return new rX(d.NAME,eq.FunctionName(e.procedureName))}case o.NAMED_EXPRESSION:{let r=this.namedExpressions.nearestNamedExpression(e.expressionName,t.formulaAddress.sheet);if(r)return this.dependencyGraph.getCellValue(r.address);return new rX(d.NAME,eq.NamedExpressionName(e.expressionName))}case o.CELL_RANGE:{if(!this.isSheetValid(e.start)||!this.isSheetValid(e.end))return new rX(d.REF,eq.SheetRef);if(!this.rangeSpansOneSheet(e))return new rX(d.REF,eq.RangeManySheets);let r=ne.fromCellRange(e,t.formulaAddress),n=this.dependencyGraph.getArray(r);if(n){let e=n.array;if(e instanceof rw)throw Error("Array should be already computed");if(e instanceof rX)return e;if(e instanceof rS)return tV.fromRange(e.raw(),r,this.dependencyGraph);else throw Error("Unknown array")}return tV.onlyRange(r,this.dependencyGraph)}case o.COLUMN_RANGE:{if(!this.isSheetValid(e.start)||!this.isSheetValid(e.end))return new rX(d.REF,eq.SheetRef);if(!this.rangeSpansOneSheet(e))return new rX(d.REF,eq.RangeManySheets);let r=nt.fromColumnRange(e,t.formulaAddress);return tV.onlyRange(r,this.dependencyGraph)}case o.ROW_RANGE:{if(!this.isSheetValid(e.start)||!this.isSheetValid(e.end))return new rX(d.REF,eq.SheetRef);if(!this.rangeSpansOneSheet(e))return new rX(d.REF,eq.RangeManySheets);let r=nr.fromRowRangeAst(e,t.formulaAddress);return tV.onlyRange(r,this.dependencyGraph)}case o.PARENTHESIS:return this.evaluateAst(e.expression,t);case o.ARRAY:{let r,n=[];for(let o of e.args){let e,i=[];for(let r of o){let n=na(this.evaluateAst(r,t)),o=n.height();if(void 0===e)e=o,i.push(...n.data);else if(e!==o)return new rX(d.REF,eq.SizeMismatch);else for(let e=0;e<o;e++)i[e].push(...n.data[e])}let s=i[0].length;if(void 0===r)r=s,n.push(...i);else{if(r!==s)return new rX(d.REF,eq.SizeMismatch);n.push(...i)}}return tV.onlyValues(n)}case o.ERROR_WITH_RAW_INPUT:case o.ERROR:return e.error}}isSheetValid(e){return void 0===e.sheet||e.sheet===tG.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 n;if(t instanceof tV&&!r.arraysFlag&&(t=null!=(n=nS(t,r))?n:new rX(d.VALUE,eq.ScalarExpected)),t instanceof rX)return t;if(t instanceof tV){let r=t.data.map(t=>t.map(e));return tV.onlyValues(r)}return e(t)}binaryRangeWrapper(e,t,r,n){var o,i;if(t instanceof tV&&!n.arraysFlag&&(t=null!=(o=nS(t,n))?o:new rX(d.VALUE,eq.ScalarExpected)),t instanceof rX)return t;if(r instanceof tV&&!n.arraysFlag&&(r=null!=(i=nS(r,n))?i:new rX(d.VALUE,eq.ScalarExpected)),r instanceof rX)return r;if(t instanceof tV||r instanceof tV){if(!(t instanceof tV))if(r.isAdHoc()){let n=r.data;for(let r=0;r<n.length;r++)for(let o=0;o<n[0].length;o++)n[r][o]=e(t,n[r][o]);return tV.onlyValues(n)}else t=tV.fromScalar(t);if(!(r instanceof tV))if(t.isAdHoc()){let n=t.data;for(let t=0;t<n.length;t++)for(let o=0;o<n[0].length;o++)n[t][o]=e(n[t][o],r);return tV.onlyValues(n)}else r=tV.fromScalar(r);if(t.width()===r.width()&&t.height()===r.height()){if(t.isAdHoc()){let n=t.data,o=r.data;for(let t=0;t<n.length;t++)for(let r=0;r<n[0].length;r++)n[t][r]=e(n[t][r],o[t][r]);return tV.onlyValues(n)}if(r.isAdHoc()){let n=t.data,o=r.data;for(let t=0;t<n.length;t++)for(let r=0;r<n[0].length;r++)o[t][r]=e(n[t][r],o[t][r]);return tV.onlyValues(o)}}let n=Math.max(t.width(),r.width()),o=Math.max(t.height(),r.height()),i=Array(o);for(let e=0;e<o;e++)i[e]=Array(n);for(let s=0;s<o;s++){let o=1!==t.height()?s:0,a=1!==r.height()?s:0;for(let l=0;l<n;l++){let n=1!==t.width()?l:0,h=1!==r.width()?l:0;o<t.height()&&a<r.height()&&n<t.width()&&h<r.width()?i[s][l]=e(t.data[o][n],r.data[a][h]):i[s][l]=new rX(d.NA)}}return tV.onlyValues(i)}return e(t,r)}}function o8(e,t){return t instanceof rX?t:e(t)}function ie(e,t,r){return t instanceof rX?t:r instanceof rX?r:e(t,r)}class it{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,n]=[e,t];return this.transformations.forEach(e=>{[r,n]=e.transformSingleAst(r,n)}),[r,n]}isIrreversible(){return!0}}class ir{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 it(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(a.TRANSFORM_ASTS_POSTPONED);let n=this.version();for(let o=Math.max(r,this.versionOffset);o<n;o++){let r=this.transformations[o-this.versionOffset];r.isIrreversible()&&(this.undoRedo.storeDataForVersion(o,t,this.parser.computeHashFromAst(e)),this.parser.rememberNewAst(e));let[n,i]=r.transformSingleAst(e,t);e=n,t=i}let o=this.parser.rememberNewAst(e);return this.stats.end(a.TRANSFORM_ASTS_POSTPONED),[o,t,n]}*getTransformationsFrom(e,t){let r=this.version();for(let n=Math.max(e,this.versionOffset);n<r;n++){let e=this.transformations[n-this.versionOffset];(!t||t(e))&&(yield e)}}needsCompaction(){return this.transformations.length>=this.maxPendingLazyTransformations}compact(){this.versionOffset+=this.transformations.length,this.transformations=[]}}function io(e,t){return typeof e==typeof t?e===tN?0:e<t?-1:+(e>t):e===tN?-1:t===tN?1:t instanceof rX||"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 ii{constructor(e){this.dependencyGraph=e}advancedFind(e,t,{returnOccurrence:r}={returnOccurrence:"first"}){let n=t.range,o=void 0===n?t.valuesFromTopLeftCorner():this.dependencyGraph.computeListOfValuesInRange(n),i="first"===r?0:o.length-1,s="first"===r?e=>e<o.length:e=>e>=0,a="first"===r?e=>e+1:e=>e-1;for(let t=i;s(t);t=a(t))if(e(tI(o[t])))return t;return -1}basicFind(e,t,r,{ordering:n,ifNoMatch:o,returnOccurrence:i}){let s="string"==typeof e?nw(e):e,a=t.range;return void 0===a?this.findNormalizedValue(s,t.valuesFromTopLeftCorner(),o,i):"none"===n?this.findNormalizedValue(s,this.dependencyGraph.computeListOfValuesInRange(a),o,i):function(e,t,{searchCoordinate:r,orderingDirection:n,ifNoMatch:o},i){let s=t.start[r],a="col"===r?t.effectiveEndColumn(i):t.effectiveEndRow(i),l="col"===r?e=>tI(i.getCellValue(r1(t.sheet,e,t.start.row))):e=>tI(i.getCellValue(r1(t.sheet,t.start.col,e))),h="asc"===n?(e,t)=>io(e,t):(e,t)=>-io(e,t),d=function(e,t,r){let n=t,o=r;for(;n<o;){let t=Math.ceil((n+o)/2);e(t)?n=t:o=t-1}return n===o&&e(n)?n:-1}(t=>h(e,l(t))>=0,s,a),u=l(d);if(u===e)return d-s;if("returnLowerBound"===o){if(-1===d)return"asc"===n?-1:0;if(typeof u!=typeof e)return -1;if("asc"===n)return d-s;let t=d+1;return t<=a?t-s:-1}if("returnUpperBound"===o){if(-1===d)return"asc"===n?0:-1;if(typeof u!=typeof e)return -1;if("desc"===n)return d-s;let t=d+1;return t<=a?t-s:-1}return -1}(s,a,{searchCoordinate:r,orderingDirection:n,ifNoMatch:o},this.dependencyGraph)}findNormalizedValue(e,t,r="returnNotFound",n="first"){let o=t.map(tI).map(e=>"string"==typeof e?nw(e):e);if("returnNotFound"===r)return"first"===n?o.indexOf(e):o.lastIndexOf(e);let i="returnLowerBound"===r?(e,t)=>io(e,t):(e,t)=>-io(e,t),s="returnLowerBound"===r?-1/0:1/0,a=-1,l="first"===n?0:o.length-1,h="first"===n?e=>e<o.length:e=>e>=0,d="first"===n?e=>e+1:e=>e-1;for(let t=l;h(t);t=d(t)){let r=o[t];if(r===e)return t;!(i(r,e)>0)&&0>i(s,r)&&(s=r,a=t)}return a}}class is extends ii{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,n){}removeValues(e){}forceApplyPostponedTransformations(){}find(e,t,r){return this.basicFind(e,t,"row",r)}}class ia{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 is(e)}add(e,t){if(e!==tN&&!(e instanceof rX))if(e instanceof tV)for(let[r,n]of e.entriesFromTopLeftCorner(t))this.addSingleCellValue(tI(r),n);else this.addSingleCellValue(e,t)}remove(e,t){if(void 0!==e)if(e instanceof tV)for(let[r,n]of e.entriesFromTopLeftCorner(t))this.removeSingleValue(tI(r),n);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(tI(t.oldValue),tI(t.value),t.address)}moveValues(e,t,r,n){for(let[o,i]of e){let e=r3(i,n,t,r);this.remove(o,i),this.add(o,e)}}removeValues(e){for(let[t,r]of e)this.remove(t,r)}find(e,t,{ordering:r,ifNoMatch:n,returnOccurrence:o}){null==o&&(o="none"===r?"first":"last");let i=this.findUsingColumnIndex(e,t,o);return void 0!==i?i:this.binarySearchStrategy.find(e,t,{ordering:r,ifNoMatch:n,returnOccurrence:o})}findUsingColumnIndex(e,t,r){let n=t.range;if(void 0===n)return;this.ensureRecentData(n.sheet,n.start.col,e);let o=this.getColumnMap(n.sheet,n.start.col);if(!o)return -1;let i="string"==typeof e?nw(e):e,s=o.get(i);if(!s||!s.index||0===s.index.length)return;let a=ia.findRowBelongingToRange(s,n,r);return void 0!==a?a-n.start.row:void 0}static findRowBelongingToRange(e,t,r){let n=t.start.row,o=t.end.row,i="first"===r?il(n,e.index,"upperBound"):il(o,e.index,"lowerBound");if(-1===i)return;let s=e.index[i];return s>=n&&s<=o?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 n of t.keys())this.ensureRecentData(e,r,n)})}getColumnMap(e,t){this.index.has(e)||this.index.set(e,[]);let r=this.index.get(e),n=r[t];return n||(n=new Map,r[t]=n),n}getValueIndex(e,t,r){let n=this.getColumnMap(e,t),o=this.getColumnMap(e,t).get(r);return o||(o={version:this.transformingService.version(),index:[]},n.set(r,o)),o}ensureRecentData(e,t,r){let n=this.getValueIndex(e,t,r),o=this.transformingService.version();if(n.version!==o){for(let o of this.transformingService.getTransformationsFrom(n.version,t=>t.sheet===e&&(t instanceof ol||t instanceof og)))o instanceof ol?this.addRows(t,o.rowsSpan,r):o instanceof og&&this.removeRows(t,o.rowsSpan,r);n.version=o}}addSingleCellValue(e,t){this.stats.measure(a.BUILD_COLUMN_INDEX,()=>{this.ensureRecentData(t.sheet,t.col,e),"string"==typeof e&&(e=nw(e));let r=this.getValueIndex(t.sheet,t.col,e);ia.addValue(r,t.row)})}removeSingleValue(e,t){this.stats.measure(a.BUILD_COLUMN_INDEX,()=>{this.ensureRecentData(t.sheet,t.col,e);let r=this.getColumnMap(t.sheet,t.col);"string"==typeof e&&(e=nw(e));let n=r.get(e);if(!n)return;let o=il(t.row,n.index);o>-1&&n.index.splice(o,1),0===n.index.length&&r.delete(e),0===r.size&&delete this.index.get(t.sheet)[t.col]})}addRows(e,t,r){let n=this.getValueIndex(t.sheet,e,r);ia.shiftRows(n,t.rowStart,t.numberOfRows)}removeRows(e,t,r){let n=this.getValueIndex(t.sheet,e,r);ia.removeRowsFromValues(n,t),ia.shiftRows(n,t.rowEnd+1,-t.numberOfRows)}static addValue(e,t){let r=il(t,e.index,"lowerBound");e.index[r]!==t&&e.index.splice(r+1,0,t)}static removeRowsFromValues(e,t){let r=il(t.rowStart,e.index,"upperBound"),n=il(t.rowEnd,e.index,"lowerBound");r>-1&&n>-1&&r<=n&&e.index[r]<=t.rowEnd&&e.index.splice(r,n-r+1)}static shiftRows(e,t,r){let n=il(t,e.index,"upperBound");if(-1!==n)for(let t=n;t<e.index.length;++t)e.index[t]+=r}}function il(e,t,r="upperBound"){let n=0,o=t.length-1;for(;n<=o;){let r=Math.floor((n+o)/2);if(e>t[r])n=r+1;else{if(!(e<t[r]))return r;o=r-1}}let i="lowerBound"===r?o:n;return i>=0&&i<=t.length?i:-1}class ih{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 id{constructor(e,t,r){this.dependencyGraph=e,this.unparser=t,this.exporter=r}getCellHyperlink(e){let t=this.dependencyGraph.getCell(e);if(t instanceof rM){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 rM){let n=r.getFormula(this.dependencyGraph.lazilyTransformingAstService);return t=null!=t?t:e,this.unparser.unparse(n,t)}if(r instanceof rA){let n=r.getAddress(this.dependencyGraph.lazilyTransformingAstService);if(n.row!==e.row||n.col!==e.col||n.sheet!==e.sheet)return;t=null!=t?t:e;let o=r.getFormula(this.dependencyGraph.lazilyTransformingAstService);if(void 0!==o)return this.unparser.unparse(o,t)}else if(r instanceof rW)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),n=this.dependencyGraph.getSheetWidth(e),o=Array(r);for(let i=0;i<r;i++){o[i]=Array(n);for(let r=0;r<n;r++){let n=r1(e,r,i);o[i][r]=t(n)}for(let e=n-1;e>=0;e--)if(null===o[i][e]||void 0===o[i][e])o[i].pop();else break}for(let e=r-1;e>=0;e--)if(0===o[e].length)o.pop();else break;return o}genericAllSheetsGetter(e){let t={};for(let r of this.dependencyGraph.sheetMapping.iterateSheetNames()){let n=this.dependencyGraph.sheetMapping.getSheetIdOrThrowError(r);t[r]=e(n)}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 tC(e,this.dependencyGraph.sheetMapping,t);return new id(this.dependencyGraph,r,this.exporter)}}class iu{static buildFromSheets(e,t={},r=[]){let n=new iC(t);return this.buildEngine(n,e,r)}static buildFromSheet(e,t={},r=[]){let n=new iC(t),o=n.translationPackage.getUITranslation(h.NEW_SHEET_PREFIX)+"1";return this.buildEngine(n,{[o]:e},r)}static buildEmpty(e={},t=[]){return this.buildEngine(new iC(e),{},t)}static rebuildWithConfig(e,t,r,n){return this.buildEngine(e,t,r,n)}static buildEngine(e,t={},r=[],n=e.useStats?new tq:new tK){n.start(a.BUILD_ENGINE_TOTAL);let o=new tG,i=new o3(e),s=new ir(n,e.maxPendingLazyTransformations),l=rB.buildEmpty(s,e,i,o,n),h=e.useColumnIndex?new ia(l,e,n):new is(l),d=l.sheetMapping,u=l.addressMapping;for(let r in t)if(Object.prototype.hasOwnProperty.call(t,r)){let n=t[r];rF(n);let o=rV(n);if(o.height>e.maxRows||o.width>e.maxColumns)throw new tJ;let i=d.addSheet(r);u.addSheetAndSetStrategyBasedOnBoundaries(i,o,{throwIfSheetAlreadyExists:!0})}let c=new ty(e,i,l.sheetReferenceRegistrar.ensureSheetRegistered.bind(l.sheetReferenceRegistrar));s.parser=c;let g=new tC(e,d,o),p=new nj(e),m=new ih(e),f=new ni(e,p,m),C=new on(e,p,m),b=new nT(e,i),y=new oy(e,l,h,C,c,n,s,o,b),w=new oG(e,y);s.undoRedo=w;let S=new oi(e,l,y),R=new o$(e,y,w,S,l,h,c,C,s,o),E=new oQ(e,o,d,s),T=new id(l,g,E),A=new o7(e,l,h,n,f,i,o,T,b,p);n.measure(a.GRAPH_BUILD,()=>{new oZ(l,h,c,C,n,b).buildGraph(t,n)}),r.forEach(e=>{R.ensureItIsPossibleToAddNamedExpression(e.name,e.expression,e.scope),R.operations.addNamedExpression(e.name,e.expression,e.scope,e.options)});let M=new oq(e,n,A,s,l,h);return M.run(),n.end(a.BUILD_ENGINE_TOTAL),{config:e,stats:n,dependencyGraph:l,columnSearch:h,parser:c,unparser:g,cellContentParser:C,evaluator:M,lazilyTransformingAstService:s,crudOperations:R,exporter:E,namedExpressions:o,serialization:T,functionRegistry:i}}}var ic=r(732);(U=S||(S={})).SheetAdded="sheetAdded",U.SheetRemoved="sheetRemoved",U.SheetRenamed="sheetRenamed",U.NamedExpressionAdded="namedExpressionAdded",U.NamedExpressionRemoved="namedExpressionRemoved",U.ValuesUpdated="valuesUpdated",U.EvaluationSuspended="evaluationSuspended",U.EvaluationResumed="evaluationResumed";class ig extends ic.TinyEmitter{emit(e,...t){return super.emit(e,...t),this}}class ip{constructor(e,t,r,n,o,i,s,a,l,h,d,u,c,g){this._config=e,this._stats=t,this._dependencyGraph=r,this._columnSearch=n,this._parser=o,this._unparser=i,this._cellContentParser=s,this._evaluator=a,this._lazilyTransformingAstService=l,this._crudOperations=h,this._exporter=d,this._namedExpressions=u,this._serialization=c,this._functionRegistry=g,this._emitter=new ig,this._evaluationSuspended=!1}static get defaultConfig(){return ib({})}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(iu.buildFromSheet(e,t,r))}static buildFromSheets(e,t={},r=[]){return this.buildFromEngineState(iu.buildFromSheets(e,t,r))}static buildEmpty(e={},t=[]){return this.buildFromEngineState(iu.buildEmpty(e,t))}static getLanguage(e){nO(e,"string","languageCode");let t=this.registeredLanguages.get(e);if(void 0!==t)return t;throw new rd}static registerLanguage(e,t){if(nO(e,"string","languageCode"),this.registeredLanguages.has(e))throw new ru;this.registeredLanguages.set(e,new rH(Object.assign({},t.functions),Object.assign({},t.errors),Object.assign({},t.ui)))}static unregisterLanguage(e){if(nO(e,"string","languageCode"),this.registeredLanguages.has(e))this.registeredLanguages.delete(e);else throw new rd}static getRegisteredLanguagesCodes(){return Array.from(this.registeredLanguages.keys())}static registerFunctionPlugin(e,t){o3.registerFunctionPlugin(e,t)}static unregisterFunctionPlugin(e){o3.unregisterFunctionPlugin(e)}static registerFunction(e,t,r){nO(e,"string","functionId"),o3.registerFunction(e,t,r)}static unregisterFunction(e){nO(e,"string","functionId"),o3.unregisterFunction(e)}static unregisterAllFunctions(){o3.unregisterAll()}static getRegisteredFunctionNames(e){nO(e,"string","code");let t=o3.getRegisteredFunctionIds();return this.getLanguage(e).getFunctionTranslations(t)}static getFunctionPlugin(e){return nO(e,"string","functionId"),o3.getFunctionPlugin(e)}static getAllFunctionPlugins(){return o3.getPlugins()}static buildFromEngineState(e){return new ip(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(!r5(e))throw new rr("SimpleCellAddress","cellAddress");return this.ensureEvaluationIsNotSuspended(),this._serialization.getCellValue(e)}getCellFormula(e){if(!r5(e))throw new rr("SimpleCellAddress","cellAddress");return this._serialization.getCellFormula(e)}getCellHyperlink(e){if(!r5(e))throw new rr("SimpleCellAddress","cellAddress");return this.ensureEvaluationIsNotSuspended(),this._serialization.getCellHyperlink(e)}getCellSerialized(e){if(!r5(e))throw new rr("SimpleCellAddress","cellAddress");return this.ensureEvaluationIsNotSuspended(),this._serialization.getCellSerialized(e)}getSheetValues(e){return nO(e,"number","sheetId"),this.ensureEvaluationIsNotSuspended(),this._serialization.getSheetValues(e)}getSheetFormulas(e){return nO(e,"number","sheetId"),this._serialization.getSheetFormulas(e)}getSheetSerialized(e){return nO(e,"number","sheetId"),this.ensureEvaluationIsNotSuspended(),this._serialization.getSheetSerialized(e)}getAllSheetsDimensions(){return this._serialization.genericAllSheetsGetter(e=>this.getSheetDimensions(e))}getSheetDimensions(e){return nO(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(r5(e))t=new ne(e,e);else if(r7(e))t=new ne(e.start,e.end);else throw new rr("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 nO(e,"number","sheetId"),this._crudOperations.setRowOrder(e,t),this.recomputeIfDependencyGraphNeedsIt()}isItPossibleToSwapRowIndexes(e,t){nO(e,"number","sheetId");try{return this._crudOperations.validateSwapRowIndexes(e,t),this._crudOperations.testRowOrderForArrays(e,t),!0}catch(e){return!1}}setRowOrder(e,t){nO(e,"number","sheetId");let r=this._crudOperations.mappingFromOrder(e,t,"row");return this.swapRowIndexes(e,r)}isItPossibleToSetRowOrder(e,t){nO(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 nO(e,"number","sheetId"),this._crudOperations.setColumnOrder(e,t),this.recomputeIfDependencyGraphNeedsIt()}isItPossibleToSwapColumnIndexes(e,t){nO(e,"number","sheetId");try{return this._crudOperations.validateSwapColumnIndexes(e,t),this._crudOperations.testColumnOrderForArrays(e,t),!0}catch(e){return!1}}setColumnOrder(e,t){nO(e,"number","sheetId");let r=this._crudOperations.mappingFromOrder(e,t,"column");return this.swapColumnIndexes(e,r)}isItPossibleToSetColumnOrder(e,t){nO(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){nO(e,"number","sheetId");let r=oS(t);try{return this._crudOperations.ensureItIsPossibleToAddRows(e,...r),!0}catch(e){return!1}}addRows(e,...t){return nO(e,"number","sheetId"),this._crudOperations.addRows(e,...t),this.recomputeIfDependencyGraphNeedsIt()}isItPossibleToRemoveRows(e,...t){nO(e,"number","sheetId");let r=ow(t);try{return this._crudOperations.ensureItIsPossibleToRemoveRows(e,...r),!0}catch(e){return!1}}removeRows(e,...t){return nO(e,"number","sheetId"),this._crudOperations.removeRows(e,...t),this.recomputeIfDependencyGraphNeedsIt()}isItPossibleToAddColumns(e,...t){nO(e,"number","sheetId");let r=oS(t);try{return this._crudOperations.ensureItIsPossibleToAddColumns(e,...r),!0}catch(e){return!1}}addColumns(e,...t){return nO(e,"number","sheetId"),this._crudOperations.addColumns(e,...t),this.recomputeIfDependencyGraphNeedsIt()}isItPossibleToRemoveColumns(e,...t){nO(e,"number","sheetId");let r=ow(t);try{return this._crudOperations.ensureItIsPossibleToRemoveColumns(e,...r),!0}catch(e){return!1}}removeColumns(e,...t){return nO(e,"number","sheetId"),this._crudOperations.removeColumns(e,...t),this.recomputeIfDependencyGraphNeedsIt()}isItPossibleToMoveCells(e,t){if(!r5(t))throw new rr("SimpleCellAddress","destinationLeftCorner");if(!r7(e))throw new rr("SimpleCellRange","source");try{let r=new ne(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(!r5(t))throw new rr("SimpleCellAddress","destinationLeftCorner");if(!r7(e))throw new rr("SimpleCellRange","source");let r=new ne(e.start,e.end);return this._crudOperations.moveCells(r.start,r.width(),r.height(),t),this.recomputeIfDependencyGraphNeedsIt()}isItPossibleToMoveRows(e,t,r,n){nO(e,"number","sheetId"),nO(t,"number","startRow"),nO(r,"number","numberOfRows"),nO(n,"number","targetRow");try{return this._crudOperations.ensureItIsPossibleToMoveRows(e,t,r,n),!0}catch(e){return!1}}moveRows(e,t,r,n){return nO(e,"number","sheetId"),nO(t,"number","startRow"),nO(r,"number","numberOfRows"),nO(n,"number","targetRow"),this._crudOperations.moveRows(e,t,r,n),this.recomputeIfDependencyGraphNeedsIt()}isItPossibleToMoveColumns(e,t,r,n){nO(e,"number","sheetId"),nO(t,"number","startColumn"),nO(r,"number","numberOfColumns"),nO(n,"number","targetColumn");try{return this._crudOperations.ensureItIsPossibleToMoveColumns(e,t,r,n),!0}catch(e){return!1}}moveColumns(e,t,r,n){return nO(e,"number","sheetId"),nO(t,"number","startColumn"),nO(r,"number","numberOfColumns"),nO(n,"number","targetColumn"),this._crudOperations.moveColumns(e,t,r,n),this.recomputeIfDependencyGraphNeedsIt()}copy(e){if(!r7(e))throw new rr("SimpleCellRange","source");let t=new ne(e.start,e.end);return this._crudOperations.copy(t.start,t.width(),t.height()),this.getRangeValues(e)}cut(e){if(!r7(e))throw new rr("SimpleCellRange","source");let t=new ne(e.start,e.end);return this._crudOperations.cut(t.start,t.width(),t.height()),this.getRangeValues(e)}paste(e){if(!r5(e))throw new rr("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(!r7(e))throw new rr("SimpleCellRange","source");return new ne(e.start,e.end).arrayOfAddressesInRange().map(e=>e.map(e=>this.getCellValue(e)))}getRangeFormulas(e){if(!r7(e))throw new rr("SimpleCellRange","source");return new ne(e.start,e.end).arrayOfAddressesInRange().map(e=>e.map(e=>this.getCellFormula(e)))}getRangeSerialized(e){if(!r7(e))throw new rr("SimpleCellRange","source");return new ne(e.start,e.end).arrayOfAddressesInRange().map(e=>e.map(e=>this.getCellSerialized(e)))}getFillRangeData(e,t,r=!1){if(!r7(e))throw new rr("SimpleCellRange","source");if(!r7(t))throw new rr("SimpleCellRange","target");let n=new ne(e.start,e.end),o=new ne(t.start,t.end);return this.ensureEvaluationIsNotSuspended(),o.arrayOfAddressesInRange().map(o=>o.map(o=>{let i=((o.row-(r?t:e).start.row)%n.height()+n.height())%n.height()+e.start.row,s=((o.col-(r?t:e).start.col)%n.width()+n.width())%n.width()+e.start.col;return this._serialization.getCellSerialized({row:i,col:s,sheet:n.sheet},o)}))}isItPossibleToAddSheet(e){nO(e,"string","sheetName");try{return this._crudOperations.ensureItIsPossibleToAddSheet(e),!0}catch(e){return!1}}addSheet(e){void 0!==e&&nO(e,"string","sheetName");let t=this._crudOperations.addSheet(e);return this.recomputeIfDependencyGraphNeedsIt(),this._emitter.emit(S.SheetAdded,t),t}isItPossibleToRemoveSheet(e){nO(e,"number","sheetId");try{return this._crudOperations.ensureScopeIdIsValid(e),!0}catch(e){return!1}}removeSheet(e){nO(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){nO(e,"number","sheetId");try{return this._crudOperations.ensureScopeIdIsValid(e),!0}catch(e){return!1}}clearSheet(e){return nO(e,"number","sheetId"),this._crudOperations.clearSheet(e),this.recomputeIfDependencyGraphNeedsIt()}isItPossibleToReplaceSheetContent(e,t){nO(e,"number","sheetId");try{return this._crudOperations.ensureScopeIdIsValid(e),this._crudOperations.ensureItIsPossibleToChangeSheetContents(e,t),!0}catch(e){return!1}}setSheetContent(e,t){return nO(e,"number","sheetId"),this._crudOperations.setSheetContent(e,t),this.recomputeIfDependencyGraphNeedsIt()}simpleCellAddressFromString(e,t){return nO(e,"string","cellAddress"),nO(t,"number","sheetId"),eN(this.sheetMapping.getSheetId.bind(this.sheetMapping),e,t)}simpleCellRangeFromString(e,t){return nO(e,"string","cellRange"),nO(t,"number","sheetId"),((e,t,r)=>{let n=t.split(":");if(2!==n.length)return;let[o,i]=n,s=eN(e,o,r);if(void 0===s)return;let a=eN(e,i,s.sheet);if(void 0!==a&&s.sheet===a.sheet)return r8(s,a)})(this.sheetMapping.getSheetId.bind(this.sheetMapping),e,t)}simpleCellAddressToString(e,t={}){if(!r5(e))throw new rr("SimpleCellAddress","cellAddress");let r="number"==typeof t?t:t.includeSheetName?e.sheet+1:e.sheet;return eI(this.sheetMapping.getSheetNameOrThrowError.bind(this.sheetMapping),e,r)}simpleCellRangeToString(e,t={}){if(!r7(e))throw new rr("SimpleCellRange","cellRange");let r="number"==typeof t?t:t.includeSheetName?e.start.sheet+e.end.sheet+1:e.start.sheet;var n=this.sheetMapping.getSheetNameOrThrowError.bind(this.sheetMapping);let o=eI(n,e.start,r),i=eI(n,e.end,e.start.sheet);if(void 0!==o&&void 0!==i)return`${o}:${i}`}getCellDependents(e){let t;if(r5(e))t=this._dependencyGraph.addressMapping.getCell(e);else if(r7(e))t=this._dependencyGraph.rangeMapping.getRangeVertex(e.start,e.end);else throw new rr("SimpleCellAddress | SimpleCellRange",e);return void 0===t?[]:this._dependencyGraph.getAdjacentNodesAddresses(t)}getCellPrecedents(e){let t;if(r5(e))t=this._dependencyGraph.addressMapping.getCell(e);else if(r7(e))t=this._dependencyGraph.rangeMapping.getRangeVertex(e.start,e.end);else throw new rr("SimpleCellAddress | SimpleCellRange",e);return void 0===t?[]:this._dependencyGraph.dependencyQueryAddresses(t)}getSheetName(e){return nO(e,"number","sheetId"),this.sheetMapping.getSheetName(e)}getSheetNames(){return this.sheetMapping.getSheetNames()}getSheetId(e){return nO(e,"string","sheetName"),this.sheetMapping.getSheetId(e)}doesSheetExist(e){return nO(e,"string","sheetName"),this.sheetMapping.hasSheetWithName(e)}getCellType(e){if(!r5(e))throw new rr("SimpleCellAddress","cellAddress");var t=this.dependencyGraph.getCell(e);if(t instanceof rA)if(t.isLeftCorner(e))return u.ARRAYFORMULA;else return u.ARRAY;return t instanceof rM||t instanceof rW?u.FORMULA:t instanceof rz?u.VALUE:u.EMPTY}doesCellHaveSimpleValue(e){if(!r5(e))throw new rr("SimpleCellAddress","cellAddress");return this.getCellType(e)===u.VALUE}doesCellHaveFormula(e){if(!r5(e))throw new rr("SimpleCellAddress","cellAddress");let t=this.getCellType(e);return t===u.FORMULA||t===u.ARRAYFORMULA}isCellEmpty(e){if(!r5(e))throw new rr("SimpleCellAddress","cellAddress");return this.getCellType(e)===u.EMPTY}isCellPartOfArray(e){if(!r5(e))throw new rr("SimpleCellAddress","cellAddress");let t=this.getCellType(e);return t===u.ARRAY||t===u.ARRAYFORMULA}getCellValueType(e){if(!r5(e))throw new rr("SimpleCellAddress","cellAddress");return this.ensureEvaluationIsNotSuspended(),rK(this.dependencyGraph.getCellValue(e))}getCellValueDetailedType(e){if(!r5(e))throw new rr("SimpleCellAddress","cellAddress");this.ensureEvaluationIsNotSuspended();var t=this.dependencyGraph.getCellValue(e);return tD(t)?t instanceof tx?t.getDetailedType():s.NUMBER_RAW:rK(t)}getCellValueFormat(e){if(!r5(e))throw new rr("SimpleCellAddress","cellAddress");this.ensureEvaluationIsNotSuspended();var t=this.dependencyGraph.getCellValue(e);if(tD(t))return t instanceof tx?t.format:void 0}countSheets(){return this.sheetMapping.numberOfSheets()}isItPossibleToRenameSheet(e,t){nO(e,"number","sheetId"),nO(t,"string","newName");try{return this._crudOperations.ensureItIsPossibleToRenameSheet(e,t),!0}catch(e){return!1}}renameSheet(e,t){nO(e,"number","sheetId"),nO(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){nO(e,"string","expressionName"),void 0!==r&&nO(r,"number","scope");try{return this._crudOperations.ensureItIsPossibleToAddNamedExpression(e,t,r),!0}catch(e){return!1}}addNamedExpression(e,t,r,n){nO(e,"string","expressionName"),void 0!==r&&nO(r,"number","scope"),this._crudOperations.addNamedExpression(e,t,r,n);let o=this.recomputeIfDependencyGraphNeedsIt();return this._emitter.emit(S.NamedExpressionAdded,e,o),o}getNamedExpressionValue(e,t){nO(e,"string","expressionName"),void 0!==t&&nO(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){nO(e,"string","expressionName"),void 0!==t&&nO(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){nO(e,"string","expressionName"),void 0!==t&&nO(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){nO(e,"string","expressionName"),void 0!==r&&nO(r,"number","scope");try{return this._crudOperations.ensureItIsPossibleToChangeNamedExpression(e,t,r),!0}catch(e){return!1}}changeNamedExpression(e,t,r,n){return nO(e,"string","expressionName"),void 0!==r&&nO(r,"number","scope"),this._crudOperations.changeNamedExpressionExpression(e,r,t,n),this.recomputeIfDependencyGraphNeedsIt()}isItPossibleToRemoveNamedExpression(e,t){nO(e,"string","expressionName"),void 0!==t&&nO(t,"number","scope");try{return this._crudOperations.isItPossibleToRemoveNamedExpression(e,t),!0}catch(e){return!1}}removeNamedExpression(e,t){nO(e,"string","expressionName"),void 0!==t&&nO(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&&nO(e,"number","scope"),this._crudOperations.ensureScopeIdIsValid(e),this._namedExpressions.getAllNamedExpressionsNamesInScope(e)}getAllNamedExpressionsSerialized(){return this._serialization.getAllNamedExpressionsSerialized()}normalizeFormula(e){nO(e,"string","formulaString");let{ast:t,address:r}=this.extractTemporaryFormula(e);if(void 0===t)throw new t0;return this._unparser.unparse(t,r)}calculateFormula(e,t){nO(e,"string","formulaString"),nO(t,"number","sheetId"),this._crudOperations.ensureScopeIdIsValid(t);let{ast:r,address:n,dependencies:o}=this.extractTemporaryFormula(e,t);if(void 0===r)throw new t0;let i=this.evaluator.runAndForget(r,n,o);return this._exporter.exportScalarOrRange(i)}getNamedExpressionsFromFormula(e){nO(e,"string","formulaString");let{ast:t,dependencies:r}=this.extractTemporaryFormula(e);if(void 0===t)throw new t0;return[...new Set(r.filter(e=>e instanceof tA).map(e=>e.name))]}validateFormula(e){nO(e,"string","formulaString");let{ast:t}=this.extractTemporaryFormula(e);return void 0!==t}getRegisteredFunctionNames(){return ip.getLanguage(this._config.language).getFunctionTranslations(this._functionRegistry.getRegisteredFunctionIds())}getFunctionPlugin(e){return nO(e,"string","functionId"),this._functionRegistry.getFunctionPlugin(e)}getAllFunctionPlugins(){return this._functionRegistry.getPlugins()}numberToDateTime(e){return nO(e,"number","val"),this._evaluator.interpreter.dateTimeHelper.numberToSimpleDateTime(e)}numberToDate(e){return nO(e,"number","val"),this._evaluator.interpreter.dateTimeHelper.numberToSimpleDate(e)}numberToTime(e){return nO(e,"number","val"),nK(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 ra}extractTemporaryFormula(e,t=1){let r=this._cellContentParser.parse(e),n={sheet:t,col:0,row:0};if(!(r instanceof C.Formula))return{address:n,dependencies:[]};let{ast:o,errors:i,dependencies:s}=this._parser.parse(r.formula,n);return i.length>0?{address:n,dependencies:[]}:{ast:o,address:n,dependencies:s}}rebuildWithConfig(e){let t=this._config.mergeConfig(e),r=this._config.mergeConfig({language:e.language}),n=this._serialization.withNewConfig(r,this._namedExpressions).getAllSheetsSerialized(),o=this._serialization.getAllNamedExpressionsSerialized(),i=iu.rebuildWithConfig(t,n,o,this._stats);this._config=i.config,this._stats=i.stats,this._dependencyGraph=i.dependencyGraph,this._columnSearch=i.columnSearch,this._parser=i.parser,this._unparser=i.unparser,this._cellContentParser=i.cellContentParser,this._evaluator=i.evaluator,this._lazilyTransformingAstService=i.lazilyTransformingAstService,this._crudOperations=i.crudOperations,this._exporter=i.exporter,this._namedExpressions=i.namedExpressions,this._serialization=i.serialization,this._functionRegistry=i.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}}}ip.version="3.3.0",ip.buildDate="20/05/2026 14:43:58",ip.releaseDate="20/05/2026",ip.languages={},ip.registeredLanguages=new Map;let im=new WeakMap;class iC{constructor(e={},t=!0){const{accentSensitive:r,caseSensitive:n,caseFirst:o,chooseAddressMappingPolicy:i,context:s,currencySymbol:a,dateFormats:l,decimalSeparator:h,evaluateNullToZero:d,functionArgSeparator:u,functionPlugins:c,ignorePunctuation:g,leapYear1900:p,localeLang:m,language:f,ignoreWhiteSpace:C,licenseKey:b,matchWholeCell:y,arrayColumnSeparator:w,arrayRowSeparator:S,maxRows:R,maxColumns:E,nullYear:T,nullDate:A,parseDateTime:M,precisionEpsilon:N,precisionRounding:I,stringifyDateTime:x,stringifyDuration:O,smartRounding:k,timeFormats:_,thousandSeparator:H,useArrayArithmetic:L,useStats:P,undoLimit:D,maxPendingLazyTransformations:F,useColumnIndex:V,useRegularExpressions:B,useWildcards:U}=e;t&&iC.warnDeprecatedOptions(e),this.useArrayArithmetic=nM(L,"boolean","useArrayArithmetic"),this.accentSensitive=nM(r,"boolean","accentSensitive"),this.caseSensitive=nM(n,"boolean","caseSensitive"),this.caseFirst=nM(o,["upper","lower","false"],"caseFirst"),this.ignorePunctuation=nM(g,"boolean","ignorePunctuation"),this.chooseAddressMappingPolicy=null!=i?i:iC.defaultConfig.chooseAddressMappingPolicy,this.dateFormats=[...nI(l,Array.isArray,"array","dateFormats")],this.timeFormats=[...nI(_,Array.isArray,"array","timeFormats")],this.functionArgSeparator=nM(u,"string","functionArgSeparator"),this.decimalSeparator=nM(h,[".",","],"decimalSeparator"),this.language=nM(f,"string","language"),this.ignoreWhiteSpace=nM(C,["standard","any"],"ignoreWhiteSpace"),this.licenseKey=nM(b,"string","licenseKey"),this.thousandSeparator=nM(H,["",","," ","."],"thousandSeparator"),this.arrayColumnSeparator=nM(w,[",",";"],"arrayColumnSeparator"),this.arrayRowSeparator=nM(S,[";","|"],"arrayRowSeparator"),this.localeLang=nM(m,"string","localeLang"),this.functionPlugins=[...null!=c?c:iC.defaultConfig.functionPlugins],this.smartRounding=nM(k,"boolean","smartRounding"),this.evaluateNullToZero=nM(d,"boolean","evaluateNullToZero"),this.nullYear=nM(T,"number","nullYear"),nN(this.nullYear,"nullYear",0),function(e,t){if(e>100)throw new ri(t,100)}(this.nullYear,"nullYear"),this.precisionRounding=nM(I,"number","precisionRounding"),nN(this.precisionRounding,"precisionRounding",0),this.precisionEpsilon=nM(N,"number","precisionEpsilon"),nN(this.precisionEpsilon,"precisionEpsilon",0),this.useColumnIndex=nM(V,"boolean","useColumnIndex"),this.useStats=nM(P,"boolean","useStats"),this.parseDateTime=nM(M,"function","parseDateTime"),this.stringifyDateTime=nM(x,"function","stringifyDateTime"),this.stringifyDuration=nM(O,"function","stringifyDuration"),this.translationPackage=ip.getLanguage(this.language),this.errorMapping=this.translationPackage.buildErrorMapping(),this.nullDate=nI(A,nW,"IDate","nullDate"),this.leapYear1900=nM(p,"boolean","leapYear1900"),this.undoLimit=nM(D,"number","undoLimit"),this.maxPendingLazyTransformations=nM(F,"number","maxPendingLazyTransformations"),this.useRegularExpressions=nM(B,"boolean","useRegularExpressions"),this.useWildcards=nM(U,"boolean","useWildcards"),this.matchWholeCell=nM(y,"boolean","matchWholeCell"),nN(this.undoLimit,"undoLimit",0),nN(this.maxPendingLazyTransformations,"maxPendingLazyTransformations",1),this.maxRows=nM(R,"number","maxRows"),nN(this.maxRows,"maxRows",1),this.maxColumns=nM(E,"number","maxColumns"),this.currencySymbol=this.setupCurrencySymbol(a),nN(this.maxColumns,"maxColumns",1),this.context=s,im.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,""))[n4]!==n7("Z"))return!1;let t=0;return 0===[[0,n7("G")+1],[n7("H"),n7("H")-1],[n7("G")+n7("H"),n7("G")]].reduce((r,[n,o],i)=>{let s,a,l,h,d;return r|=(parseInt(`${parseInt((s=e,a=t+n-2*(0!==i),l=o+2*!!i,parseInt(s.substr(a,l),16)+(h=e,d=t+n+o,parseInt(h.substr(d,2),16)+[]).padStart(2,"0")),10)}`,10)%97||2)>>1,t+=2,r},n7("A"))}(e)){var r,n;let o,i,s,a,l,h,d,u,c,[g,p,m]="20/05/2026".split("/"),f=Math.floor(new Date(`${p}/${g}/${m}`).getTime()/864e5),C=25===n9(r=e)[n4]?(o=n9(r),i=parseInt("12",16),s=n7("F"),parseInt(o.substr(i,s),16)/(a=n9(r),l=n7("C"),h=n7("Y")>>4,parseInt(a.substr(l,h),16)||(~~![][n4]<<3)+1)):0;t.vars.keyValidityDate=(d=["January","February","March","April","May","June","July","August","September","October","November","December"][(n=new Date((C+1)*864e5)).getMonth()],u=n.getDate(),c=n.getFullYear(),`${d} ${u}, ${c}`),f>C?t.template="expired":t.template="valid"}else""!==e&&(t.template="invalid");return oe||"valid"===t.template||(console.warn(n8[t.template](t.vars)),oe=!0),t.template}(this.licenseKey)}),nx({value:this.decimalSeparator,name:"decimalSeparator"},{value:this.functionArgSeparator,name:"functionArgSeparator"},{value:this.thousandSeparator,name:"thousandSeparator"}),nx({value:this.arrayRowSeparator,name:"arrayRowSeparator"},{value:this.arrayColumnSeparator,name:"arrayColumnSeparator"})}setupCurrencySymbol(e){let t=[...nI(e,Array.isArray,"array","currencySymbol")];return t.forEach(e=>{if("string"!=typeof e)throw new rr("string[]","currencySymbol");if(""===e)throw new rn("currencySymbol")}),t}get licenseKeyValidityState(){return im.get(this).licenseKeyValidityState}getConfig(){return ib(this)}mergeConfig(e){let t=Object.assign({},this.getConfig(),e);return iC.warnDeprecatedOptions(e),new iC(t,!1)}static warnDeprecatedOptions(e){}static warnDeprecatedIfUsed(e,t,r,n){void 0!==e&&(void 0===n?console.warn(`${t} option is deprecated since ${r}`):console.warn(`${t} option is deprecated since ${r}, please use ${n}`))}}function ib(e){var t;let r={};for(let n in iC.defaultConfig){let o=null!=(t=e[n])?t:iC.defaultConfig[n];Array.isArray(o)?r[n]=[...o]:r[n]=o}return r}iC.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 n;if(void 0===t&&void 0===r)return;let o=e.replace(nH," ").trim().toLowerCase();if(n=o,!n_.test(n))return;let i=o.substring(o.length-2);"am"===i||"pm"===i?o=o.substring(0,o.length-2).trim():"a"===(i=o.substring(o.length-1))||"p"===i?o=o.substring(0,o.length-1).trim():i=void 0;let s=o.split(nL);s.length>=2&&s[s.length-2].includes(":")&&(s[s.length-2]=s[s.length-2]+"."+s[s.length-1],s.pop());let a=s[s.length-1].split(":");if(void 0!==i&&a.push(i),1===s.length)return nF(a,r);if(1===a.length)return nV(s,t);let l=nV(s.slice(0,s.length-1),t),h=nF(a,r);return void 0===l||void 0===h?void 0:Object.assign(Object.assign({},l),h)},precisionEpsilon:1e-13,precisionRounding:10,smartRounding:!0,stringifyDateTime:function(e,t){let r=n2(t);if(void 0===r)return;let n=r.tokens,o="",i=!1,s=n.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<n.length;t++){let r=n[t];if(r.type===m.FREE_TEXT){o+=r.value;continue}switch(r.value.toLowerCase()){case"h":case"hh":i=!0,o+=n6(s?(e.hours+11)%12+1:e.hours,r.value.length);break;case"d":case"dd":o+=n6(e.day,r.value.length);break;case"s":case"ss":o+=n6(Math.floor(e.seconds),r.value.length);break;case"m":case"mm":t+1<n.length&&n[t+1].value.startsWith(":")&&(i=!0),i?o+=n6(e.minutes,r.value.length):o+=n6(e.month,r.value.length),i=!0;break;case"yy":o+=n6(e.year%100,r.value.length);break;case"yyyy":o+=e.year;break;case"am/pm":case"a/p":{let[t,n]=r.value.split("/");o+=e.hours<12?t:n;break}default:if(nk.test(r.value)){let t=r.value.length-3;o+=`${e.seconds<10?"0":""}${Math.floor(e.seconds*Math.pow(10,t))/Math.pow(10,t)}`;continue}return}}return o},stringifyDuration:function(e,t){let r=n2(t);if(void 0===r)return;let n=r.tokens,o="";for(let t of n){if(t.type===m.FREE_TEXT){o+=t.value;continue}switch(t.value.toLowerCase()){case"h":case"hh":o+=n6(e.hours,t.value.length),e.hours=0;break;case"[hh]":o+=n6(e.hours,t.value.length-2),e.hours=0;break;case"m":case"mm":o+=n6(e.minutes,t.value.length),e.minutes=0;break;case"[mm]":o+=n6(e.minutes+60*e.hours,t.value.length-2),e.minutes=0,e.hours=0;break;case"s":case"ss":o+=n6(Math.floor(e.seconds),t.value.length);break;default:if(nk.test(t.value)){let r=Math.max(t.value.length-3,0);o+=`${e.seconds<10?"0":""}${Math.floor(e.seconds*Math.pow(10,r))/Math.pow(10,r)}`;continue}return}}return o},timeFormats:["hh:mm","hh:mm:ss.sss"],thousandSeparator:"",undoLimit:20,maxPendingLazyTransformations:50,useRegularExpressions:!1,useWildcards:!0,useColumnIndex:!1,useStats:!1,useArrayArithmetic:!1};let iy={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=R||(R={}))[z.FullyAbsolute=1]="FullyAbsolute",z[z.RowAbsoluteColRelative=2]="RowAbsoluteColRelative",z[z.RowRelativeColAbsolute=3]="RowRelativeColAbsolute",z[z.FullyRelative=4]="FullyRelative";class iw extends nR{verifyAddressArguments(e,t,r,n){if(n){if(e<1||t<1)return new rX(d.VALUE,eq.LessThanOne)}else if(R.FullyAbsolute==r){if(e<1||t<1)return new rX(d.VALUE,eq.LessThanOne)}else if(R.RowAbsoluteColRelative==r){if(e<1)return new rX(d.VALUE,eq.LessThanOne)}else if(R.RowRelativeColAbsolute==r&&t<1)return new rX(d.VALUE,eq.LessThanOne)}address(e,t){return this.runFunction(e.args,t,this.metadata("ADDRESS"),(e,t,r,n,o)=>{let i=this.verifyAddressArguments(e,t,r,n);if(void 0!==i)return i;let s=eO(t-1),a="";null!=o&&(a=`${o}!`);let l=0==t?"C":`C[${t}]`,h=0==e?"R":`R[${e}]`;return R.FullyRelative==r?n?`${a}${s}${e}`:`${a}${h}${l}`:R.RowRelativeColAbsolute==r?n?`${a}$${s}${e}`:`${a}${h}C${t}`:R.RowAbsoluteColRelative==r?n?`${a}${s}$${e}`:`${a}R${e}${l}`:n?`${a}$${s}$${e}`:`${a}R${e}C${t}`})}}iw.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 iS extends nR{arrayformula(e,t){return this.runFunction(e.args,t,this.metadata("ARRAYFORMULA"),e=>e)}arrayformulaArraySize(e,t){if(1!==e.args.length)return nE.error();let r=this.metadata("ARRAYFORMULA");return e.args.map(e=>{var n;return this.arraySizeForAst(e,new nn(t.formulaAddress,t.arraysFlag||null!=(n=null==r?void 0:r.enableArrayArithmeticForArguments)&&n))})[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 n=e.data,o=[];for(let e=0;e<t;e++)o.push(n[e].slice(0,r));return tV.onlyValues(o)})}arrayconstrainArraySize(e,t){if(3!==e.args.length)return nE.error();let r=this.metadata("ARRAY_CONSTRAIN"),{height:n,width:i}=e.args.map(e=>{var n;return this.arraySizeForAst(e,new nn(t.formulaAddress,t.arraysFlag||null!=(n=null==r?void 0:r.enableArrayArithmeticForArguments)&&n))})[0];return(e.args[1].type===o.NUMBER&&(n=Math.min(n,e.args[1].value)),e.args[2].type===o.NUMBER&&(i=Math.min(i,e.args[2].value)),n<1||i<1||!Number.isInteger(n)||!Number.isInteger(i))?nE.error():new nE(i,n)}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 rX(d.NA,eq.EqualLength);if(e.width()>1&&e.height()>1)return new rX(d.NA,eq.WrongDimension);let r=e.data,n=[];for(let o=0;o<e.height();o++){let i=[];for(let n=0;n<e.width();n++){let e=!0;for(let r of t)if(!0!==nd(r.data[o][n])){e=!1;break}e&&i.push(r[o][n])}i.length>0&&n.push(i)}return n.length>0?tV.onlyValues(n):new rX(d.NA,eq.EmptyRange)})}filterArraySize(e,t){if(e.args.length<=1)return nE.error();let r=this.metadata("FILTER"),n=e.args.map(e=>{var n;return this.arraySizeForAst(e,new nn(t.formulaAddress,t.arraysFlag||null!=(n=null==r?void 0:r.enableArrayArithmeticForArguments)&&n))});return new nE(Math.max(...n.map(e=>e.width)),Math.max(...n.map(e=>e.height)))}}iS.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 iv extends nR{abs(e,t){return this.runFunction(e.args,t,this.metadata("ABS"),Math.abs)}}iv.implementedFunctions={ABS:{method:"abs",parameters:[{argumentType:p.NUMBER}]}};class iR extends nR{bitlshift(e,t){return this.runFunction(e.args,t,this.metadata("BITLSHIFT"),iE)}bitrshift(e,t){return this.runFunction(e.args,t,this.metadata("BITRSHIFT"),iT)}}function iE(e,t){return t<0?iT(e,-t):iA(e*Math.pow(2,t))}function iT(e,t){return t<0?iE(e,-t):iA(Math.floor(e/Math.pow(2,t)))}function iA(e){return e>0xffffffffffff?new rX(d.NUM,eq.BitshiftLong):e}iR.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 iM extends nR{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)}}iM.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 iN extends nR{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 rX(d.NA,eq.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,n=0;for(;n+1<r;n+=2)if(!(t[n]instanceof rX)&&this.arithmeticHelper.eq(e,t[n]))return t[n+1];return n<r?t[n]:new rX(d.NA,eq.NoDefault)})}iferror(e,t){return this.runFunction(e.args,t,this.metadata("IFERROR"),(e,t)=>e instanceof rX?t:e)}ifna(e,t){return this.runFunction(e.args,t,this.metadata("IFNA"),(e,t)=>e instanceof rX&&e.type===d.NA?t:e)}choose(e,t){return this.runFunction(e.args,t,this.metadata("CHOOSE"),(e,...t)=>e>t.length?new rX(d.NUM,eq.Selector):t[e-1])}}iN.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 iI extends nR{char(e,t){return this.runFunction(e.args,t,this.metadata("CHAR"),e=>e<1||e>=256?new rX(d.VALUE,eq.CharacterCodeBounds):String.fromCharCode(Math.trunc(e)))}unichar(e,t){return this.runFunction(e.args,t,this.metadata("CHAR"),e=>e<1||e>=1114112?new rX(d.VALUE,eq.CharacterCodeBounds):String.fromCodePoint(Math.trunc(e)))}}iI.implementedFunctions={CHAR:{method:"char",parameters:[{argumentType:p.NUMBER}]},UNICHAR:{method:"unichar",parameters:[{argumentType:p.NUMBER}]}};class ix extends nR{code(e,t){return this.runFunction(e.args,t,this.metadata("CODE"),e=>0===e.length?new rX(d.VALUE,eq.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 rX(d.VALUE,eq.EmptyString)})}}ix.implementedFunctions={CODE:{method:"code",parameters:[{argumentType:p.STRING}]},UNICODE:{method:"unicode",parameters:[{argumentType:p.STRING}]}};class iO extends nR{countblank(e,t){return this.runFunction(e.args,t,this.metadata("COUNTBLANK"),(...e)=>{let t=0;return e.forEach(e=>{e===tN&&t++}),t})}}iO.implementedFunctions={COUNTBLANK:{method:"countblank",parameters:[{argumentType:p.SCALAR}],repeatLastArgs:1,expandRanges:!0}};class ik extends nR{countunique(e,t){return this.runFunction(e.args,t,this.metadata("COUNTUNIQUE"),(...e)=>{let t=new Set,r=new Set;for(let n of e)n instanceof rX?r.add(n.type):""!==n&&t.add(n);return t.size+r.size})}}ik.implementedFunctions={COUNTUNIQUE:{method:"countunique",parameters:[{argumentType:p.SCALAR}],repeatLastArgs:1,expandRanges:!0}};let i_=[{argumentType:p.RANGE},{argumentType:p.SCALAR},{argumentType:p.RANGE}];class iH extends nR{withDatabaseArgs(e,t,r,n){return this.runFunction(e.args,t,this.metadata(r),(e,t,r)=>{let o=this.resolveFieldIndex(e,t);if(o instanceof rX)return o;let i=this.buildDatabaseCriteria(e,r);return i instanceof rX?i:n(e.data,o,i)})}dcount(e,t){return this.withDatabaseArgs(e,t,"DCOUNT",(e,t,r)=>{let n=0;for(let o=1;o<e.length;o++)if(this.rowMatchesCriteria(e[o],r)){let r=e[o][t];if(r instanceof rX)return r;tD(r)&&n++}return n})}dcounta(e,t){return this.withDatabaseArgs(e,t,"DCOUNTA",(e,t,r)=>{let n=0;for(let o=1;o<e.length;o++)if(this.rowMatchesCriteria(e[o],r)){let r=e[o][t];if(r instanceof rX)return r;r!==tN&&null!=r&&n++}return n})}dproduct(e,t){return this.withDatabaseArgs(e,t,"DPRODUCT",(e,t,r)=>{let n=1,o=!1;for(let i=1;i<e.length;i++)if(this.rowMatchesCriteria(e[i],r)){let r=e[i][t];if(r instanceof rX)return r;tD(r)&&(n*=tI(r),o=!0)}return o?n:0})}dsum(e,t){return this.withDatabaseArgs(e,t,"DSUM",(e,t,r)=>{let n=0;for(let o=1;o<e.length;o++)if(this.rowMatchesCriteria(e[o],r)){let r=e[o][t];if(r instanceof rX)return r;tD(r)&&(n+=tI(r))}return n})}daverage(e,t){return this.withDatabaseArgs(e,t,"DAVERAGE",(e,t,r)=>{let n=0,o=0;for(let i=1;i<e.length;i++)if(this.rowMatchesCriteria(e[i],r)){let r=e[i][t];if(r instanceof rX)return r;tD(r)&&(n+=tI(r),o++)}return 0===o?new rX(d.DIV_BY_ZERO):n/o})}dget(e,t){return this.withDatabaseArgs(e,t,"DGET",(e,t,r)=>{let n,o=0;for(let i=1;i<e.length;i++)if(this.rowMatchesCriteria(e[i],r)){if(++o>1)return new rX(d.NUM,eq.ValueLarge);n=e[i][t]}return 0===o?new rX(d.VALUE,eq.WrongType):n instanceof rX?n:n===tN||null==n?0:n})}dmax(e,t){return this.withDatabaseArgs(e,t,"DMAX",(e,t,r)=>{let n=-1/0,o=!1;for(let i=1;i<e.length;i++)if(this.rowMatchesCriteria(e[i],r)){let r=e[i][t];if(r instanceof rX)return r;if(tD(r)){let e=tI(r);e>n&&(n=e),o=!0}}return o?n:0})}dmin(e,t){return this.withDatabaseArgs(e,t,"DMIN",(e,t,r)=>{let n=1/0,o=!1;for(let i=1;i<e.length;i++)if(this.rowMatchesCriteria(e[i],r)){let r=e[i][t];if(r instanceof rX)return r;if(tD(r)){let e=tI(r);e<n&&(n=e),o=!0}}return o?n:0})}dstdev(e,t){return this.withDatabaseArgs(e,t,"DSTDEV",(e,t,r)=>{let n=this.collectNumericValues(e,t,r);if(n instanceof rX)return n;if(n.length<=1)return new rX(d.DIV_BY_ZERO);let o=n.reduce((e,t)=>e+t,0)/n.length;return Math.sqrt(n.reduce((e,t)=>e+Math.pow(t-o,2),0)/(n.length-1))})}dstdevp(e,t){return this.withDatabaseArgs(e,t,"DSTDEVP",(e,t,r)=>{let n=this.collectNumericValues(e,t,r);if(n instanceof rX)return n;if(0===n.length)return new rX(d.DIV_BY_ZERO);let o=n.reduce((e,t)=>e+t,0)/n.length;return Math.sqrt(n.reduce((e,t)=>e+Math.pow(t-o,2),0)/n.length)})}dvar(e,t){return this.withDatabaseArgs(e,t,"DVAR",(e,t,r)=>{let n=this.collectNumericValues(e,t,r);if(n instanceof rX)return n;if(n.length<=1)return new rX(d.DIV_BY_ZERO);let o=n.reduce((e,t)=>e+t,0)/n.length;return n.reduce((e,t)=>e+Math.pow(t-o,2),0)/(n.length-1)})}dvarp(e,t){return this.withDatabaseArgs(e,t,"DVARP",(e,t,r)=>{let n=this.collectNumericValues(e,t,r);if(n instanceof rX)return n;if(0===n.length)return new rX(d.DIV_BY_ZERO);let o=n.reduce((e,t)=>e+t,0)/n.length;return n.reduce((e,t)=>e+Math.pow(t-o,2),0)/n.length})}collectNumericValues(e,t,r){let n=[];for(let o=1;o<e.length;o++)if(this.rowMatchesCriteria(e[o],r)){let r=e[o][t];if(r instanceof rX)return r;tD(r)&&n.push(tI(r))}return n}resolveFieldIndex(e,t){if(t instanceof rX)return t;let r=e.data[0];if("string"==typeof t){let e=t.toLowerCase();for(let t=0;t<r.length;t++){let n=r[t];if("string"==typeof n&&n.toLowerCase()===e)return t}return new rX(d.VALUE,eq.WrongType)}let n="boolean"==typeof t?Number(t):t;if(tD(n)){let e=Math.trunc(tI(n));return!Number.isFinite(e)||e<1||e>r.length?new rX(d.VALUE,eq.WrongType):e-1}return new rX(d.VALUE,eq.WrongType)}buildDatabaseCriteria(e,t){var r;let n=e.data[0],o=t.data,i=o[0];for(let e of i)if(e instanceof rX)return e;let s=i.map(e=>{if("string"!=typeof e)return -1;let t=e.toLowerCase();return n.findIndex(e=>"string"==typeof e&&e.toLowerCase()===t)}),a=[];for(let e=1;e<o.length;e++){let t=[];for(let n=0;n<i.length;n++){let i=s[n];if(-1===i)continue;let a=null==(r=o[e])?void 0:r[n];if(a===tN||null==a)continue;if(a instanceof rX)return a;let l=tD(a)?tI(a):a,h=this.interpreter.criterionBuilder.fromCellValue(l,this.arithmeticHelper);if(void 0===h)return new rX(d.VALUE,eq.BadCriterion);t.push({columnIndex:i,lambda:h.lambda})}a.push(t)}return a}rowMatchesCriteria(e,t){return 0!==t.length&&t.some(t=>0===t.length||t.every(t=>{let r=e[t.columnIndex],n=tD(r)?tI(r):r;return t.lambda(n)}))}}iH.implementedFunctions={DCOUNT:{method:"dcount",parameters:i_},DCOUNTA:{method:"dcounta",parameters:i_},DPRODUCT:{method:"dproduct",parameters:i_},DSTDEV:{method:"dstdev",parameters:i_},DSTDEVP:{method:"dstdevp",parameters:i_},DSUM:{method:"dsum",parameters:i_},DVAR:{method:"dvar",parameters:i_},DVARP:{method:"dvarp",parameters:i_},DAVERAGE:{method:"daverage",parameters:i_},DGET:{method:"dget",parameters:i_},DMAX:{method:"dmax",parameters:i_},DMIN:{method:"dmin",parameters:i_}};class iL extends nR{constructor(){super(...arguments),this.isoweeknumCore=e=>{let t=Math.floor(this.dateTimeHelper.relativeNumberToAbsoluteNumber(e)),r=this.dateTimeHelper.numberToSimpleDate(e),n=this.dateTimeHelper.dateToNumber({year:r.year,month:1,day:1}),o=this.dateTimeHelper.relativeNumberToAbsoluteNumber(n),i=Math.floor((t-1)/7)-Math.floor((o+((4-o)%7+7)%7-1)/7)+1;return 0===i?this.isoweeknumCore(e-7)+1:i},this.days360Core=(e,t,r)=>{let n,o,i=this.dateTimeHelper.numberToSimpleDate(e),s=this.dateTimeHelper.numberToSimpleDate(t);return r?(n=nQ(i),o=nQ(s)):[n,o]=this.dateTimeHelper.toBasisUS(i,s),360*(o.year-n.year)+30*(o.month-n.month)+o.day-n.day}}date(e,t){return this.runFunction(e.args,t,this.metadata("DATE"),(e,t,r)=>{let n=Math.trunc(r),o=Math.trunc(t),i=Math.trunc(e);i<this.dateTimeHelper.getEpochYearZero()&&(i+=this.dateTimeHelper.getEpochYearZero());let s=Math.floor((o-1)/12),a={year:i+=s,month:o-=12*s,day:1};if(this.dateTimeHelper.isValidDate(a)){let e=this.dateTimeHelper.dateToNumber(a)+(n-1);return void 0===(e=this.dateTimeHelper.getWithinBounds(e))?new rX(d.NUM,eq.DateBounds):e}return new rX(d.VALUE,eq.InvalidDate)})}time(e,t){return this.runFunction(e.args,t,this.metadata("TIME"),(e,t,r)=>{let n=nX({hours:Math.trunc(e),minutes:Math.trunc(t),seconds:Math.trunc(r)});return n<0?new rX(d.NUM,eq.NegativeTime):n%1})}eomonth(e,t){return this.runFunction(e.args,t,this.metadata("EOMONTH"),(e,t)=>{let r=this.dateTimeHelper.numberToSimpleDate(e),n=this.dateTimeHelper.dateToNumber(this.dateTimeHelper.endOfMonth(nY(r,t)));return void 0===(n=this.dateTimeHelper.getWithinBounds(n))?new rX(d.NUM,eq.DateBounds):n})}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=>nK(nq(e)%1).hours)}minute(e,t){return this.runFunction(e.args,t,this.metadata("MINUTE"),e=>nK(nq(e)%1).minutes)}second(e,t){return this.runFunction(e.args,t,this.metadata("SECOND"),e=>nK(nq(e)%1).seconds)}text(e,t){return this.runFunction(e.args,t,this.metadata("TEXT"),(e,t)=>(function(e,t,r,n){let o=r.stringifyDateTime(n.numberToSimpleDateTime(e),t);if(void 0!==o)return o;let i=r.stringifyDuration(nK(e),t);if(void 0!==i)return i;let s=function(e){let t,r=(nJ.lastIndex=0,null!==(t=nJ.exec(e))?[t]:[]);if(!r.every(e=>n3(e)))return{type:f.NUMBER,tokens:n1(r,e)}}(t);return void 0!==s?function(e,t){let r="";for(let n=0;n<e.length;++n){let o=e[n];if(o.type===m.FREE_TEXT){r+=o.value;continue}let i=o.value.split("."),s=i[0],a=i[1]||"",l=i[1]?".":"",h=Number(t.toFixed(a.length)).toString().split("."),d=h[0]||"",u=h[1]||"";if(s.length>d.length){let e=n5(s.substr(0,s.length-d.length),"0");d=n6(d,e+d.length)}let c=n5(a.substr(u.length,a.length-u.length),"0");r+=d+l+(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 n=iF.get(t);return void 0===n?new rX(d.NUM,eq.BadMode):(r-n)%7+1})}weeknum(e,t){return this.runFunction(e.args,t,this.metadata("WEEKNUM"),(e,t)=>{let r=Math.floor(this.dateTimeHelper.relativeNumberToAbsoluteNumber(e)),n=this.dateTimeHelper.numberToSimpleDate(e),o=this.dateTimeHelper.dateToNumber({year:n.year,month:1,day:1}),i=this.dateTimeHelper.relativeNumberToAbsoluteNumber(o);if(21===t)return this.isoweeknumCore(e);let s=iF.get(t);return void 0===s?new rX(d.NUM,eq.BadMode):Math.floor((r-s)/7)-Math.floor((i-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 rX(d.VALUE,eq.IncorrectDateTime):nW(t)?(nG(t)?Math.trunc(nX(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 rX(d.VALUE,eq.IncorrectDateTime):tI(t)%1})}now(e,t){return this.runFunction(e.args,t,this.metadata("NOW"),()=>{let e=new Date(Date.now());return nX({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 n={year:(r=nY(this.dateTimeHelper.numberToSimpleDate(e),t)).year,month:r.month,day:Math.min(r.day,nU[r.month-1])},o=this.dateTimeHelper.dateToNumber(n);return void 0===(o=this.dateTimeHelper.getWithinBounds(o))?new rX(d.NUM,eq.DateBounds):o})}datedif(e,t){return this.runFunction(e.args,t,this.metadata("DATEDIF"),(e,t,r)=>{if(e>t)return new rX(d.NUM,eq.StartEndDate);if("D"===r)return Math.floor(t)-Math.floor(e);let n=this.dateTimeHelper.numberToSimpleDate(e),o=this.dateTimeHelper.numberToSimpleDate(t);switch(r){case"M":return(o.year-n.year)*12+(o.month-n.month)-(o.day<n.day);case"YM":return(12+(o.month-n.month)-(o.day<n.day))%12;case"Y":if(o.month>n.month||o.month===n.month&&o.day>=n.day)return o.year-n.year;return o.year-n.year-1;case"MD":if(o.day>=n.day)return o.day-n.day;{let e=1===o.month?12:o.month-1,t=1===o.month?o.year-1:o.year;return this.dateTimeHelper.daysInMonth(t,e)+o.day-n.day}case"YD":if(o.month>n.month||o.month===n.month&&o.day>=n.day)return Math.floor(t)-this.dateTimeHelper.dateToNumber({year:o.year,month:n.month,day:n.day});return Math.floor(t)-Math.floor(e)-365*(o.year-n.year-1)-this.dateTimeHelper.leapYearsCount(o.year-1)+this.dateTimeHelper.leapYearsCount(n.year);default:return new rX(d.NUM,eq.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,n=(e=Math.trunc(e/60))%24,o=(e=Math.trunc(e/24))%30,i=(e=Math.trunc(e/30))%12,s=Math.trunc(e/12);return"P"+(s>0?`${s}Y`:"")+(i>0?`${i}M`:"")+(o>0?`${o}D`:"")+"T"+(n>0?`${n}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,n)=>this.networkdayscore(e,t,r,n))}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,n)=>this.workdaycore(e,t,r,n))}networkdayscore(e,t,r,n){let o=1;(e=Math.trunc(e))>(t=Math.trunc(t))&&([e,t]=[t,e],o=-1);let i=iD(r);if(i instanceof rX)return i;let s=this.simpleRangeToFilteredHolidays(i,n);return s instanceof rX?s:o*this.countWorkdays(e,t,i,s)}workdaycore(e,t,r,n){e=Math.trunc(e),t=Math.trunc(t);let o=iD(r);if(o instanceof rX)return o;let i=this.simpleRangeToFilteredHolidays(o,n);if(i instanceof rX)return i;if(t>0){let r=1;for(;this.countWorkdays(e+1,e+r,o,i)<t;)r*=2;let n=1;for(;n+1<r;){let s=Math.trunc((n+r)/2);this.countWorkdays(e+1,e+s,o,i)<t?n=s:r=s}return e+r}if(!(t<0))return e;{t*=-1;let r=1;for(;this.countWorkdays(e-r,e-1,o,i)<t;)r*=2;let n=1;for(;n+1<r;){let s=Math.trunc((n+r)/2);this.countWorkdays(e-s,e-1,o,i)<t?n=s:r=s}return e-r}}countWorkdays(e,t,r,n){let o=Math.floor(this.dateTimeHelper.relativeNumberToAbsoluteNumber(t)),i=Math.floor(this.dateTimeHelper.relativeNumberToAbsoluteNumber(e)),s=0;for(let e=0;e<7;e++)"0"===r.charAt(e)&&(s+=Math.floor((o+6-e)/7),s-=Math.floor((i-1+6-e)/7));return s-(iP(t+1,n)-iP(e,n))}simpleRangeToFilteredHolidays(e,t){var r;let n=null!=(r=null==t?void 0:t.valuesFromTopLeftCorner())?r:[];for(let e of n)if(e instanceof rX)return e;let o=[];for(let e of n)if(e!==tN)if(!tD(e))return new rX(d.VALUE,eq.WrongType);else o.push(Math.trunc(tI(e)));return[...new Set(o)].sort((e,t)=>e-t).filter(t=>{let r=this.dateTimeHelper.relativeNumberToAbsoluteNumber(t);return"0"===e.charAt((r-1)%7)})}}function iP(e,t){if(0===t.length||e<=t[0])return 0;if(t[t.length-1]<e)return t.length;let r=0,n=t.length-1;for(;r+1<n;){let o=Math.floor((n+r)/2);t[o]>=e?n=o:r=o}return n}function iD(e){var t;return"number"!=typeof e&&"string"!=typeof e?new rX(d.VALUE,eq.WrongType):"string"!=typeof e?null!=(t=iV.get(e))?t:new rX(d.NUM,eq.BadMode):7===e.length&&/^(0|1)*$/.test(e)&&"1111111"!==e?e:new rX(d.NUM,eq.WeekendString)}iL.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 iF=new Map([[1,0],[2,1],[11,1],[12,2],[13,3],[14,4],[15,5],[16,6],[17,0]]),iV=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 iB extends nR{degrees(e,t){return this.runFunction(e.args,t,this.metadata("DEGREES"),e=>180/Math.PI*e)}}iB.implementedFunctions={DEGREES:{method:"degrees",parameters:[{argumentType:p.NUMBER}]}};class iU extends nR{delta(e,t){return this.runFunction(e.args,t,this.metadata("DELTA"),(e,t)=>+(e===t))}}iU.implementedFunctions={DELTA:{method:"delta",parameters:[{argumentType:p.NUMBER},{argumentType:p.NUMBER,defaultValue:0}]}};class iz extends nR{exp(e,t){return this.runFunction(e.args,t,this.metadata("EXP"),Math.exp)}}iz.implementedFunctions={EXP:{method:"exp",parameters:[{argumentType:p.NUMBER}]}};class iW extends nR{pmt(e,t){return this.runFunction(e.args,t,this.metadata("PMT"),iG)}ipmt(e,t){return this.runFunction(e.args,t,this.metadata("IPMT"),i$)}ppmt(e,t){return this.runFunction(e.args,t,this.metadata("PPMT"),iY)}fv(e,t){return this.runFunction(e.args,t,this.metadata("FV"),ij)}cumipmt(e,t){return this.runFunction(e.args,t,this.metadata("CUMIPMT"),(e,t,r,n,o,i)=>{if(n>o)return new rX(d.NUM,eq.EndStartPeriod);let s=0;for(let a=n;a<=o;a++)s+=i$(e,a,t,r,0,i);return s})}cumprinc(e,t){return this.runFunction(e.args,t,this.metadata("CUMPRINC"),(e,t,r,n,o,i)=>{if(n>o)return new rX(d.NUM,eq.EndStartPeriod);let s=0;for(let a=n;a<=o;a++)s+=iY(e,a,t,r,0,i);return s})}db(e,t){return this.runFunction(e.args,t,this.metadata("DB"),(e,t,r,n,o)=>{if(12===o&&n>r||n>r+1)return new rX(d.NUM,eq.PeriodLong);if(t>=e)return 0;let i=Math.round((1-Math.pow(t/e,1/r))*1e3)/1e3,s=e*i*o/12;if(1===n)return s;let a=s;for(let t=0;t<n-2;t++)a+=(e-a)*i;return n===r+1?(e-a)*i*(12-o)/12:(e-a)*i})}ddb(e,t){return this.runFunction(e.args,t,this.metadata("DDB"),(e,t,r,n,o)=>{let i;if(n>r)return new rX(d.NUM);let s=o/r;return s>=1?(s=1,i=1===n?e:0):i=e*Math.pow(1-s,n-1),Math.max(i-Math.max(t,e*Math.pow(1-s,n)),0)})}dollarde(e,t){return this.runFunction(e.args,t,this.metadata("DOLLARDE"),(e,t)=>{if(t<1)return new rX(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 rX(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,n)=>0===r?new rX(d.DIV_BY_ZERO):n*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,n,o)=>0===e?0===t?new rX(d.DIV_BY_ZERO):(-r-n)/t:(o&&(t*=1+e),Math.log((t-n*e)/(r*e+t))/Math.log(1+e)))}rate(e,t){return this.runFunction(e.args,t,this.metadata("RATE"),(e,t,r,n,o,i)=>{if(i<=-1)return new rX(d.VALUE);let s=i;o=+!!o;for(let i=0;i<50;i++){let i,a;if(s<=-1)break;if(1e-7>Math.abs(s))i=r*(1+e*s)+t*(1+s*o)*e+n;else{let a=Math.pow(1+s,e);i=r*a+t*(1/s+o)*(a-1)+n}if(1e-7>Math.abs(i))return s;if(1e-7>Math.abs(s))a=r*e+t*o*e;else{let n=Math.pow(1+s,e),i=e*Math.pow(1+s,e-1);a=r*i+t*(1/s+o)*i+-1/(s*s)*t*(n-1)}s-=i/a}return new rX(d.NUM)})}pv(e,t){return this.runFunction(e.args,t,this.metadata("PV"),(e,t,r,n,o)=>{if(o=+!!o,-1===e)if(0===t)return new rX(d.NUM);else return new rX(d.DIV_BY_ZERO);return 0===e?-r*t-n:((1-Math.pow(1+e,t))*r*(1+e*o)/e-n)/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 rX(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 rX(d.DIV_BY_ZERO):(e-t)/r)}syd(e,t){return this.runFunction(e.args,t,this.metadata("SYD"),(e,t,r,n)=>n>r?new rX(d.NUM):(e-t)*(r-n+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 rX(d.NUM);let n=this.dateTimeHelper.numberToSimpleDate(e),o=this.dateTimeHelper.numberToSimpleDate(t);if(o.year>n.year+1||o.year===n.year+1&&(o.month>n.month||o.month===n.month&&o.day>n.day))return new rX(d.NUM);let i=360-r*(t-e);return 0===i?0:i<0?new rX(d.NUM):365*r/i})}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 rX(d.NUM);let n=this.dateTimeHelper.numberToSimpleDate(e),o=this.dateTimeHelper.numberToSimpleDate(t);if(o.year>n.year+1||o.year===n.year+1&&(o.month>n.month||o.month===n.month&&o.day>n.day))return new rX(d.NUM);let i=360-r*(t-e);return 0===i?0:i<0?new rX(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 rX(d.NUM);let n=this.dateTimeHelper.numberToSimpleDate(e),o=this.dateTimeHelper.numberToSimpleDate(t);return o.year>n.year+1||o.year===n.year+1&&(o.month>n.month||o.month===n.month&&o.day>n.day)?new rX(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 rX)return e;for(let t of r)if(tD(t))e*=1+tI(t);else if(t!==tN)return new rX(d.VALUE,eq.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 rX?r:iq(e,r)})}mirr(e,t){return this.runFunction(e.args,t,this.metadata("MIRR"),(e,t,r)=>{let n=this.arithmeticHelper.manyToExactNumbers(e.valuesFromTopLeftCorner());if(n instanceof rX)return n;let o=!1,i=!1,s=[],a=[];for(let e of n)e>0?(o=!0,s.push(e),a.push(0)):(e<0?(i=!0,a.push(e)):a.push(0),s.push(0));if(!o||!i)return new rX(d.DIV_BY_ZERO);let l=n.length,h=iq(r,s);if(h instanceof rX)return h;let u=iq(t,a);return u instanceof rX?u:Math.pow(-h*Math.pow(1+r,l)/u/(1+t),1/(l-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 n=t.valuesFromTopLeftCorner();for(let e of n)if("number"!=typeof e)return new rX(d.VALUE,eq.NumberExpected);let o=r.valuesFromTopLeftCorner();for(let e of o)if("number"!=typeof e)return new rX(d.VALUE,eq.NumberExpected);if(o.length!==n.length)return new rX(d.NUM,eq.EqualLength);let i=o.length,s=0;if(o[0]<0)return new rX(d.NUM,eq.ValueSmall);for(let t=0;t<i;t++){if(o[t]=Math.floor(o[t]),o[t]<o[0])return new rX(d.NUM,eq.ValueSmall);s+=n[t]/Math.pow(1+e,(o[t]-o[0])/365)}return s})}irr(e,t){return this.runFunction(e.args,t,this.metadata("IRR"),(e,t)=>{if(t<=-1)return new rX(d.VALUE);let r=this.arithmeticHelper.manyToExactNumbers(e.valuesFromTopLeftCorner());if(r instanceof rX)return r;let n=r.some(e=>e>0),o=r.some(e=>e<0);return n&&o?function(e,t){let r=t;for(let t=0;t<50;t++){let t=0,n=0;for(let o=0;o<e.length;o++){let i=Math.pow(1+r,o);if(!isFinite(i)||0===i)return new rX(d.NUM);t+=e[o]/i,o>0&&(n-=o*e[o]/(i*(1+r)))}if(1e-10>Math.abs(t))return r;if(1e-10>Math.abs(n))break;let o=r-t/n;if(!isFinite(o))break;if(o<=-1&&(o=(r-1)/2),1e-10>Math.abs(o-r))return o;r=o}return new rX(d.NUM)}(r,t):new rX(d.NUM)})}}function iG(e,t,r,n,o){if(0===e)return(-r-n)/t;{let i=Math.pow(1+e,t);return(n*e+r*e*i)*(o?1/(1+e):1)/(1-i)}}function i$(e,t,r,n,o,i){let s=iG(e,r,n,o,i);return 1===t?e*(i?0:-n):e*(i?ij(e,t-2,s,n,i)-s:ij(e,t-1,s,n,i))}function ij(e,t,r,n,o){if(0===e)return-n-r*t;{let i=Math.pow(1+e,t);return r*(o?1+e:1)*(1-i)/e-n*i}}function iY(e,t,r,n,o,i){return iG(e,r,n,o,i)-i$(e,t,r,n,o,i)}function iq(e,t){let r=0;for(let n=t.length-1;n>=0;n--){if(r+=t[n],-1===e)if(0===r)continue;else return new rX(d.DIV_BY_ZERO);r/=1+e}return r}iW.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 iK extends nR{formulatext(e,t){return this.runFunctionWithReferenceArgument(e.args,t,this.metadata("FORMULATEXT"),()=>new rX(d.NA,eq.WrongArgNumber),e=>{var t;return null!=(t=this.serialization.getCellFormula(e))?t:new rX(d.NA,eq.Formula)})}}iK.implementedFunctions={FORMULATEXT:{method:"formulatext",parameters:[{argumentType:p.NOERROR}],doesNotNeedArgumentsToBeComputed:!0,isDependentOnSheetStructureChange:!0,vectorizationForbidden:!0}};class iX extends nR{hyperlink(e,t){return this.runFunction(e.args,t,this.metadata("HYPERLINK"),(t,r)=>(e.hyperlink=t,null!=r?r:t))}}iX.implementedFunctions={HYPERLINK:{method:"hyperlink",parameters:[{argumentType:p.STRING},{argumentType:p.STRING,optionalArg:!0}]}};class iQ extends nR{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 rX&&e.type!==d.NA)}iserror(e,t){return this.runFunction(e.args,t,this.metadata("ISERROR"),e=>e instanceof rX)}isformula(e,t){return this.runFunctionWithReferenceArgument(e.args,t,this.metadata("ISFORMULA"),()=>new rX(d.NA,eq.WrongArgNumber),e=>this.dependencyGraph.addressMapping.getCell(e)instanceof rT)}isblank(e,t){return this.runFunction(e.args,t,this.metadata("ISBLANK"),e=>e===tN)}isna(e,t){return this.runFunction(e.args,t,this.metadata("ISNA"),e=>e instanceof rX&&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 rX&&(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 rX(d.NA,eq.WrongArgNumber);if(e.args.some(e=>e.type===o.EMPTY))return new rX(d.NUM,eq.EmptyArg);let r=e.args[0];for(;r.type===o.PARENTHESIS;)r=r.expression;if(r.type===o.CELL_RANGE||r.type===o.COLUMN_RANGE)return r.end.col-r.start.col+1;{if(r.type===o.CELL_REFERENCE)return 1;if(r.type===o.ROW_RANGE)return this.config.maxColumns;let e=this.evaluateAst(r,t);return e instanceof tV?e.width():e instanceof rX?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 rX(d.NA,eq.WrongArgNumber);if(e.args.some(e=>e.type===o.EMPTY))return new rX(d.NUM,eq.EmptyArg);let r=e.args[0];for(;r.type===o.PARENTHESIS;)r=r.expression;if(r.type===o.CELL_RANGE||r.type===o.ROW_RANGE)return r.end.row-r.start.row+1;{if(r.type===o.CELL_REFERENCE)return 1;if(r.type===o.COLUMN_RANGE)return this.config.maxRows;let e=this.evaluateAst(r,t);return e instanceof tV?e.height():e instanceof rX?e:1}}index(e,t){return this.runFunction(e.args,t,this.metadata("INDEX"),(e,t,r)=>{var n,o,i,s,a,l;return r<1||t<1?new rX(d.VALUE,eq.LessThanOne):r>e.width()||t>e.height()?new rX(d.NUM,eq.ValueLarge):null!=(l=null!=(i=null==(o=null==(n=null==e?void 0:e.data)?void 0:n[t-1])?void 0:o[r-1])?i:null==(a=null==(s=null==e?void 0:e.data)?void 0:s[0])?void 0:a[0])?l:new rX(d.VALUE,eq.CellRangeExpected)})}na(e,t){return new rX(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 rX(d.NA,eq.SheetRef)})}sheets(e,t){return this.runFunctionWithReferenceArgument(e.args,t,this.metadata("SHEETS"),()=>this.dependencyGraph.sheetMapping.numberOfSheets(),()=>1,()=>new rX(d.VALUE,eq.CellRefExpected))}}iQ.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 iZ extends nR{iseven(e,t){return this.runFunction(e.args,t,this.metadata("ISEVEN"),e=>e%2==0)}}iZ.implementedFunctions={ISEVEN:{method:"iseven",parameters:[{argumentType:p.NUMBER}]}};class iJ extends nR{isodd(e,t){return this.runFunction(e.args,t,this.metadata("ISODD"),e=>e%2==1)}}iJ.implementedFunctions={ISODD:{method:"isodd",parameters:[{argumentType:p.NUMBER}]}};class i0 extends nR{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)}}i0.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 i1=parseFloat(Math.PI.toFixed(14));class i2 extends nR{pi(e,t){return this.runFunction(e.args,t,this.metadata("PI"),()=>i1)}sqrtpi(e,t){return this.runFunction(e.args,t,this.metadata("SQRTPI"),e=>Math.sqrt(i1*e))}}function i3(e,t){return new nE(t.width,e.height)}function i6(e,t,r){return new nE(1+(e.width-t)/r,1+(e.height-t)/r)}i2.implementedFunctions={PI:{method:"pi",parameters:[]},SQRTPI:{method:"sqrtpi",parameters:[{argumentType:p.NUMBER,minValue:0}]}};class i5 extends nR{mmult(e,t){return this.runFunction(e.args,t,this.metadata("MMULT"),(e,t)=>{if(!e.hasOnlyNumbers()||!t.hasOnlyNumbers())return new rX(d.VALUE,eq.NumberRange);if(t.height()!==e.width())return new rX(d.VALUE,eq.ArrayDimensions);let r=i3(e.size,t.size),n=this.createKernel(function(e,t,r){let n=0;for(let o=0;o<r;++o)n+=e[this.thread.y][o]*t[o][this.thread.x];return n},r)(e.rawNumbers(),t.rawNumbers(),e.width());return tV.onlyNumbers(n)})}mmultArraySize(e,t){if(2!==e.args.length)return nE.error();let r=this.metadata("MMULT"),[n,o]=e.args.map(e=>{var n;return this.arraySizeForAst(e,new nn(t.formulaAddress,t.arraysFlag||null!=(n=null==r?void 0:r.enableArrayArithmeticForArguments)&&n))});return i3(n,o)}maxpool(e,t){return this.runFunction(e.args,t,this.metadata("MAXPOOL"),(e,t,r=t)=>{if(!e.hasOnlyNumbers())return new rX(d.VALUE,eq.NumberRange);let n=i6(e.size,t,r),o=this.createKernel(function(e,t,r){let n=this.thread.x*r,o=this.thread.y*r,i=e[o][n];for(let r=0;r<t;r++)for(let s=0;s<t;s++)i=Math.max(i,e[o+r][n+s]);return i},n)(e.rawNumbers(),t,r);return tV.onlyNumbers(o)})}medianpool(e,t){return this.runFunction(e.args,t,this.metadata("MEDIANPOOL"),(e,t,r=t)=>{if(!e.hasOnlyNumbers())return new rX(d.VALUE,eq.NumberRange);let n=i6(e.size,t,r),o=this.createKernel(function(e,t,r){let n=this.thread.x*r,o=this.thread.y*r,i=e[o][n];for(let r=0;r<t;r++)for(let s=0;s<t;s++)i=Math.max(i,e[o+r][n+s]);let s=e[o][n];for(let r=0;r<t;r++)for(let i=0;i<t;i++)s=Math.min(s,e[o+r][n+i]);let a=t*t,l=s,h=i,d=42;for(let r=0;r<32;r++){let r=(l+h)/2,i=0;for(let s=0;s<t;s++)for(let a=0;a<t;a++)e[o+s][n+a]>r&&i++;if(t%2==0)if(i===a/2){d=r;break}else i>a/2?l=r:h=r;else if(i===(a-1)/2){d=r;break}else i>(a-1)/2?l=r:h=r}return d},n)(e.rawNumbers(),t,r);return tV.onlyNumbers(o)})}maxpoolArraySize(e,t){let r;if(e.args.length<2||e.args.length>3)return nE.error();let n=this.metadata("MAXPOOL"),i=e.args.map(e=>{var r;return this.arraySizeForAst(e,new nn(t.formulaAddress,t.arraysFlag||null!=(r=null==n?void 0:n.enableArrayArithmeticForArguments)&&r))})[0],s=e.args[1],a=r=s.type===o.NUMBER?s.value:1;if(3===e.args.length){let t=e.args[2];a=t.type===o.NUMBER?t.value:1}return r>i.width||r>i.height||a>r||(i.width-r)%a!=0||(i.height-r)%a!=0?nE.error():i6(i,r,a)}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,n=[];for(let e=0;e<r.width;++e){n[e]=[];for(let o=0;o<r.height;++o)n[e][o]=t[o][e]}return tV.onlyValues(n)})}transposeArraySize(e,t){if(1!==e.args.length)return nE.error();let r=this.metadata("TRANSPOSE"),[n]=e.args.map(e=>{var n;return this.arraySizeForAst(e,new nn(t.formulaAddress,t.arraysFlag||null!=(n=null==r?void 0:r.enableArrayArithmeticForArguments)&&n))});return new nE(n.height,n.width)}createKernel(e,t){return function(...r){let n=[];for(let o=0;o<t.height;++o){n.push([]);for(let i=0;i<t.width;++i)n[o][i]=e.apply({thread:{x:i,y:o}},r)}return n}}}i5.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 i4 extends nR{median(e,t){return this.runFunction(e.args,t,this.metadata("MEDIAN"),(...e)=>{let t=this.arithmeticHelper.coerceNumbersExactRanges(e);return t instanceof rX?t:0===t.length?new rX(d.NUM,eq.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 rX?r:(r.sort((e,t)=>e-t),(t=Math.trunc(t))>r.length)?new rX(d.NUM,eq.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 rX?r:(r.sort((e,t)=>e-t),(t=Math.trunc(t))>r.length)?new rX(d.NUM,eq.ValueLarge):r[t-1]})}}i4.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 i9 extends nR{mod(e,t){return this.runFunction(e.args,t,this.metadata("MOD"),(e,t)=>0===t?new rX(d.DIV_BY_ZERO):e%t)}}function i7(e,t){let r=e.length,n=t*(r-1),o=Math.floor(n);return o+1<r?e[o]+(n-o)*(e[o+1]-e[o]):e[o]}function i8(e,t){let r=e.length,n=t*(r+1);if(n<1)return new rX(d.NUM,eq.ValueSmall);if(n>r)return new rX(d.NUM,eq.ValueLarge);let o=Math.floor(n);return o<r?e[o-1]+(n-o)*(e[o]-e[o-1]):e[o-1]}i9.implementedFunctions={MOD:{method:"mod",parameters:[{argumentType:p.NUMBER},{argumentType:p.NUMBER}]}};class se extends nR{percentile(e,t){return this.runFunction(e.args,t,this.metadata("PERCENTILE.INC"),(e,t)=>{let r=this.getSortedValues(e);return r instanceof rX?r:i7(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 rX?r:i8(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 rX(d.NUM,eq.ValueSmall);if(t>4)return new rX(d.NUM,eq.ValueLarge);let r=this.getSortedValues(e);return r instanceof rX?r:i7(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 rX(d.NUM,eq.ValueSmall);if(t>3)return new rX(d.NUM,eq.ValueLarge);let r=this.getSortedValues(e);return r instanceof rX?r:i8(r,t/4)})}getSortedValues(e){let t=this.arithmeticHelper.manyToExactNumbers(e.valuesFromTopLeftCorner());return t instanceof rX?t:0===t.length?new rX(d.NUM,eq.OneValue):(t.sort((e,t)=>e-t),t)}}function st(e){return tD(e)&&!Number.isFinite(tI(e))?0:e}se.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}]}},se.aliases={PERCENTILE:"PERCENTILE.INC",QUARTILE:"QUARTILE.INC"};class sr{constructor(e,t,r){this.sumsq=e,this.sum=t,this.count=r}static single(e){return new sr(e*e,e,1)}compose(e){return new sr(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}}sr.empty=new sr(0,0,0);class sn extends nR{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(tI(e),2),so)}max(e,t){return this.doMax(e.args,t)}maxa(e,t){return st(this.reduce(e.args,t,-1/0,"MAXA",(e,t)=>Math.max(e,t),tI,si))}min(e,t){return this.doMin(e.args,t)}mina(e,t){return st(this.reduce(e.args,t,1/0,"MINA",(e,t)=>Math.min(e,t),tI,si))}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 n=this.reduce(e.args,t,sr.empty,"_AGGREGATE_A",(e,t)=>e.compose(t),e=>sr.single(tI(e)),si);return n instanceof rX?n:null!=(r=n.averageValue())?r:new rX(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 n=this.reduceAggregateA(e.args,t);return n instanceof rX?n:null!=(r=n.varSValue())?r:new rX(d.DIV_BY_ZERO)}varpa(e,t){var r;let n=this.reduceAggregateA(e.args,t);return n instanceof rX?n:null!=(r=n.varPValue())?r:new rX(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 rX)return r;{let e=r.varSValue();return void 0===e?new rX(d.DIV_BY_ZERO):Math.sqrt(e)}}stdevpa(e,t){let r=this.reduceAggregateA(e.args,t);if(r instanceof rX)return r;{let e=r.varPValue();return void 0===e?new rX(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 rX(d.NA,eq.WrongArgNumber);let r=this.coerceToType(this.evaluateAst(e.args[0],t),{argumentType:p.NUMBER},t),n=e.args.slice(1);switch(r){case 1:case 101:return this.doAverage(n,t);case 2:case 102:return this.doCount(n,t);case 3:case 103:return this.doCounta(n,t);case 4:case 104:return this.doMax(n,t);case 5:case 105:return this.doMin(n,t);case 6:case 106:return this.doProduct(n,t);case 7:case 107:return this.doStdevS(n,t);case 8:case 108:return this.doStdevP(n,t);case 9:case 109:return this.doSum(n,t);case 10:case 110:return this.doVarS(n,t);case 11:case 111:return this.doVarP(n,t);default:return new rX(d.VALUE,eq.BadMode)}}reduceAggregate(e,t){return this.reduce(e,t,sr.empty,"_AGGREGATE",(e,t)=>e.compose(t),e=>sr.single(tI(e)),so)}reduceAggregateA(e,t){return this.reduce(e,t,sr.empty,"_AGGREGATE_A",(e,t)=>e.compose(t),e=>sr.single(tI(e)),si)}doAverage(e,t){var r;let n=this.reduceAggregate(e,t);return n instanceof rX?n:null!=(r=n.averageValue())?r:new rX(d.DIV_BY_ZERO)}doVarS(e,t){var r;let n=this.reduceAggregate(e,t);return n instanceof rX?n:null!=(r=n.varSValue())?r:new rX(d.DIV_BY_ZERO)}doVarP(e,t){var r;let n=this.reduceAggregate(e,t);return n instanceof rX?n:null!=(r=n.varPValue())?r:new rX(d.DIV_BY_ZERO)}doStdevS(e,t){let r=this.reduceAggregate(e,t);if(r instanceof rX)return r;{let e=r.varSValue();return void 0===e?new rX(d.DIV_BY_ZERO):Math.sqrt(e)}}doStdevP(e,t){let r=this.reduceAggregate(e,t);if(r instanceof rX)return r;{let e=r.varPValue();return void 0===e?new rX(d.DIV_BY_ZERO):Math.sqrt(e)}}doCount(e,t){return this.reduce(e,t,0,"COUNT",(e,t)=>e+t,tI,e=>+!!tD(e))}doCounta(e,t){return this.reduce(e,t,0,"COUNTA",(e,t)=>e+t,tI,e=>+(e!==tN))}doMax(e,t){return st(this.reduce(e,t,-1/0,"MAX",(e,t)=>Math.max(e,t),tI,so))}doMin(e,t){return st(this.reduce(e,t,1/0,"MIN",(e,t)=>Math.min(e,t),tI,so))}doSum(e,t){return this.reduce(e,t,0,"SUM",this.addWithEpsilonRaw,tI,so)}doProduct(e,t){return this.reduce(e,t,1,"PRODUCT",(e,t)=>e*t,tI,so)}reduce(e,t,r,n,i,s,a){return e.length<1?new rX(d.NA,eq.WrongArgNumber):e.reduce((e,l)=>{let h;if(e instanceof rX)return e;if(l.type===o.CELL_RANGE||l.type===o.COLUMN_RANGE||l.type===o.ROW_RANGE){let o=this.evaluateRange(l,t,r,n,i,s,a);return o instanceof rX?o:i(o,e)}if((h=this.evaluateAst(l,t))instanceof tV)return Array.from(h.valuesFromTopLeftCorner()).map(a).filter(e=>void 0!==e).map(e=>e instanceof rX?e:s(e)).reduce((e,t)=>e instanceof rX?e:t instanceof rX?t:i(e,t),e);if(l.type===o.CELL_REFERENCE){if(void 0===(h=a(h)))return e}else if(void 0===(h=a(h=this.coerceScalarToNumberOrError(h))))return e;return h instanceof rX?h:i(e,s(h))},r)}evaluateRange(e,t,r,n,o,i,s){let a;try{a=ne.fromAst(e,t.formulaAddress)}catch(e){if(e instanceof t3)return new rX(d.REF,eq.RangeManySheets);throw e}if(!this.isSheetValid(a))return new rX(d.REF,eq.SheetRef);let l=this.dependencyGraph.getRange(a.start,a.end);if(void 0===l)throw Error("Range does not exists in graph");let h=l.getFunctionValue(n);return void 0===h&&(h=this.getRangeValues(n,a,l,i,s).reduce((e,t)=>e instanceof rX?e:t instanceof rX?t:o(e,t),r),l.setFunctionValue(n,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,n,o){let i,s=[],{smallerRangeVertex:a,restRange:l}=this.dependencyGraph.rangeMapping.findSmallerRange(t);if(void 0!==a&&this.dependencyGraph.existsEdge(a,r)){let t=a.getFunctionValue(e);if(void 0!==t)s.push(t);else for(let e of a.range.addresses(this.dependencyGraph)){let t=o(this.dependencyGraph.getScalarValue(e));t instanceof rX?s.push(t):void 0!==t&&s.push(n(t))}i=l}else i=t;for(let e of i.addresses(this.dependencyGraph)){let t=o(this.dependencyGraph.getScalarValue(e));t instanceof rX?s.push(t):void 0!==t&&s.push(n(t))}return s}}function so(e){return tD(e)||e instanceof rX?e:void 0}function si(e){return"boolean"==typeof e?nl(e):tD(e)||e instanceof rX?e:"string"==typeof e?0:void 0}sn.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}},sn.aliases={VAR:"VAR.S",VARP:"VAR.P",STDEV:"STDEV.S",STDEVP:"STDEV.P",VARS:"VAR.S",STDEVS:"STDEV.S"};class ss extends nR{power(e,t){return this.runFunction(e.args,t,this.metadata("POWER"),Math.pow)}}ss.implementedFunctions={POWER:{method:"power",parameters:[{argumentType:p.NUMBER},{argumentType:p.NUMBER}]}};class sa extends nR{radians(e,t){return this.runFunction(e.args,t,this.metadata("RADIANS"),e=>Math.PI/180*e)}}sa.implementedFunctions={RADIANS:{method:"radians",parameters:[{argumentType:p.NUMBER}]}};class sl extends nR{dec2bin(e,t){return this.runFunction(e.args,t,this.metadata("DEC2BIN"),(e,t)=>sd(e,2,t))}dec2oct(e,t){return this.runFunction(e.args,t,this.metadata("DEC2OCT"),(e,t)=>sd(e,8,t))}dec2hex(e,t){return this.runFunction(e.args,t,this.metadata("DEC2HEX"),(e,t)=>sd(e,16,t))}bin2dec(e,t){return this.runFunction(e.args,t,this.metadata("BIN2DEC"),e=>{let t=sh(e,2,10);return void 0===t?new rX(d.NUM,eq.NotBinary):sp(t,2)})}bin2oct(e,t){return this.runFunction(e.args,t,this.metadata("BIN2OCT"),(e,t)=>{let r=sh(e,2,10);return void 0===r?new rX(d.NUM,eq.NotBinary):sd(sp(r,2),8,t)})}bin2hex(e,t){return this.runFunction(e.args,t,this.metadata("BIN2HEX"),(e,t)=>{let r=sh(e,2,10);return void 0===r?new rX(d.NUM,eq.NotBinary):sd(sp(r,2),16,t)})}oct2dec(e,t){return this.runFunction(e.args,t,this.metadata("OCT2DEC"),e=>{let t=sh(e,8,10);return void 0===t?new rX(d.NUM,eq.NotOctal):sp(t,8)})}oct2bin(e,t){return this.runFunction(e.args,t,this.metadata("OCT2BIN"),(e,t)=>{let r=sh(e,8,10);return void 0===r?new rX(d.NUM,eq.NotOctal):sd(sp(r,8),2,t)})}oct2hex(e,t){return this.runFunction(e.args,t,this.metadata("OCT2HEX"),(e,t)=>{let r=sh(e,8,10);return void 0===r?new rX(d.NUM,eq.NotOctal):sd(sp(r,8),16,t)})}hex2dec(e,t){return this.runFunction(e.args,t,this.metadata("HEX2DEC"),e=>{let t=sh(e,16,10);return void 0===t?new rX(d.NUM,eq.NotHex):sp(t,16)})}hex2bin(e,t){return this.runFunction(e.args,t,this.metadata("HEX2BIN"),(e,t)=>{let r=sh(e,16,10);return void 0===r?new rX(d.NUM,eq.NotHex):sd(sp(r,16),2,t)})}hex2oct(e,t){return this.runFunction(e.args,t,this.metadata("HEX2OCT"),(e,t)=>{let r=sh(e,16,10);return void 0===r?new rX(d.NUM,eq.NotHex):sd(sp(r,16),8,t)})}base(e,t){return this.runFunction(e.args,t,this.metadata("BASE"),sc)}decimal(e,t){return this.runFunction(e.args,t,this.metadata("DECIMAL"),(e,t)=>{let r=sh(e,t,255);return void 0===r?new rX(d.NUM,eq.NotHex):parseInt(r,t)})}}function sh(e,t,r){let n=RegExp(`^[${"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ".substr(0,t)}]+$`);if(!(e.length>r)&&n.test(e))return e}function sd(e,t,r){if(e>-su(t)-1)return new rX(d.NUM,eq.ValueBaseLarge);if(e<su(t))return new rX(d.NUM,eq.ValueBaseSmall);let n=sg(e,t);return void 0===r||e<0?n:n.length>r?new rX(d.NUM,eq.ValueBaseLong):n6(n,r)}function su(e){return-Math.pow(e,10)/2}function sc(e,t,r){let n=sg(e,t);return void 0!==r&&r>n.length?n6(n,r):n}function sg(e,t){let r=e<0?Math.pow(t,10):0;return(e+r).toString(t).toUpperCase()}function sp(e,t){let r=parseInt(e,t),n=Math.pow(t,10);return r>=n/2?r-n: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 sm extends nR{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 rX(d.NUM,eq.WrongOrder):((e=Math.ceil(e))===(t=Math.floor(t)+1)&&(t+=1),e+Math.floor(Math.random()*(t-e))))}}sm.implementedFunctions={RAND:{method:"rand",parameters:[],isVolatile:!0},RANDBETWEEN:{method:"randbetween",parameters:[{argumentType:p.NUMBER},{argumentType:p.NUMBER}],isVolatile:!0}};class sf extends nR{static isValidDimension(e){return Number.isFinite(e)&&e>=sf.MIN_DIMENSION}static parseLiteralDimension(e){if(e.type===o.NUMBER)return Math.trunc(e.value);if(e.type===o.STRING){let t=Number(e.value);return Number.isFinite(t)?Math.trunc(t):void 0}if(e.type===o.PLUS_UNARY_OP&&e.value.type===o.NUMBER)return Math.trunc(e.value.value);if(e.type===o.MINUS_UNARY_OP&&e.value.type===o.NUMBER)return Math.trunc(-e.value.value);if(e.type===o.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,n)=>{if(!Number.isFinite(e)||!Number.isFinite(t))return new rX(d.VALUE,eq.ValueLarge);if(e<0||t<0)return new rX(d.VALUE,eq.LessThanOne);let o=Math.trunc(e),i=Math.trunc(t);if(!sf.isValidDimension(o)||!sf.isValidDimension(i))return new rX(d.VALUE,eq.LessThanOne);if(o>this.config.maxRows||i>this.config.maxColumns)return new rX(d.VALUE,eq.ValueLarge);let s=[];for(let e=0;e<o;e++){let t=[];for(let o=0;o<i;o++)t.push(r+(e*i+o)*n);s.push(t)}return tV.onlyNumbers(s)})}sequenceArraySize(e,t){if(e.args.length<1||e.args.length>4)return nE.error();let r=e.args[0],n=e.args.length>1?e.args[1]:void 0;if(r.type===o.EMPTY)return nE.error();let i=sf.parseLiteralDimension(r);if(void 0===i)return nE.error();let s=void 0===n||n.type===o.EMPTY?1:sf.parseLiteralDimension(n);return void 0===s||!sf.isValidDimension(i)||!sf.isValidDimension(s)||i>this.config.maxRows||s>this.config.maxColumns?nE.error():new nE(s,i)}}function sC(e){let t=Math.ceil(e);return t%2==1?t:t+1}function sb(e){let t=Math.ceil(e);return t%2==0?t:t+1}sf.MIN_DIMENSION=1,sf.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 nR{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?-sb(-e):sb(e))}odd(e,t){return this.runFunction(e.args,t,this.metadata("ODD"),e=>e<0?-sC(-e):sC(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 rX(d.DIV_BY_ZERO):e>0&&t<0?new rX(d.NUM,eq.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 rX(d.DIV_BY_ZERO):e>0&&t<0?new rX(d.NUM,eq.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 sw extends nR{sqrt(e,t){return this.runFunction(e.args,t,this.metadata("SQRT"),Math.sqrt)}}sw.implementedFunctions={SQRT:{method:"sqrt",parameters:[{argumentType:p.NUMBER}]}};class sS{constructor(e,t,r,n,o){this.interpreter=e,this.cacheKey=t,this.reduceInitialValue=r,this.composeFunction=n,this.mapFunction=o,this.dependencyGraph=this.interpreter.dependencyGraph}compute(e,t){for(let r of t)if(!r.conditionRange.sameDimensionsAs(e))return new rX(d.VALUE,eq.EqualLength);let r=this.tryToGetRangeVertexForRangeValue(e),n=t.map(e=>this.tryToGetRangeVertexForRangeValue(e.conditionRange));if(!(r&&n.every(e=>void 0!==e)))return this.evaluateRangeValue(e,t);{let o=t.map(e=>e.criterionPackage.raw).join(","),i=this.findAlreadyComputedValueInCache(r,this.cacheKey(t),o);if(void 0!==i)return this.interpreter.stats.incrementCriterionFunctionFullCacheUsed(),i;let s=this.buildNewCriterionCache(this.cacheKey(t),t.map(e=>e.conditionRange.range),e.range);return s.has(o)||s.set(o,[this.evaluateRangeValue(e,t),t.map(e=>e.criterionPackage.lambda)]),r.setCriterionFunctionValues(this.cacheKey(t),s),n.forEach(e=>{void 0!==e&&e.addDependentCacheRange(r)}),s.get(o)[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),n=Array.from(e.valuesFromTopLeftCorner()).map(this.mapFunction)[Symbol.iterator](),o=sE(r,t.map(e=>e.conditionRange.iterateValuesFromTopLeftCorner()),n);return this.reduceFunction(o)}buildNewCriterionCache(e,t,r){let n,o=this.dependencyGraph.getRange(r.start,r.end),{smallerRangeVertex:i,restConditionRanges:s,restValuesRange:a}=((e,t,r)=>{if(r.end.row>r.start.row){let n=r1(r.end.sheet,r.end.col,r.end.row-1),o=e.getRange(r.start,n);if(void 0!==o)return{smallerRangeVertex:o,restValuesRange:r.withStart(r1(r.start.sheet,r.start.col,r.end.row)),restConditionRanges:t.map(e=>e.withStart(r1(e.start.sheet,e.start.col,e.end.row)))}}return{restValuesRange:r,restConditionRanges:t}})(this.dependencyGraph,t,r);n=void 0!==i&&this.dependencyGraph.existsEdge(i,o)?i.getCriterionFunctionValues(e):new Map;let l=new Map;return n.forEach(([e,t],r)=>{let n=sE(t,s.map(e=>sR(this.dependencyGraph,e)),Array.from(sR(this.dependencyGraph,a)).map(this.mapFunction)[Symbol.iterator]()),o=this.composeFunction(e,this.reduceFunction(n));this.interpreter.stats.incrementCriterionFunctionPartialCacheUsed(),l.set(r,[o,t])}),l}}class sv{constructor(e,t){this.conditionRange=e,this.criterionPackage=t}}function*sR(e,t){for(let r of t.addresses(e))yield tI(e.getScalarValue(r))}function*sE(e,t,r){for(let n of r){let r=t.map(e=>(function(e){let t=e[Symbol.iterator](),{done:r,value:n}=t.next();return r?{rest:function*(){}()}:{value:n,rest:t}})(e));if(!r.every(e=>Object.prototype.hasOwnProperty.call(e,"value")))return;(function(e,t){let r=[];for(let n=0;n<Math.min(e.length,t.length);n++)r.push([e[n],t[n]]);return r})(r.map(e=>tI(e.value)),e).every(([e,t])=>t(e))&&(yield n),t=r.map(e=>e.rest)}}class sT{constructor(e,t){this.sum=e,this.count=t}static single(e){return new sT(e,1)}compose(e){return new sT(this.sum+e.sum,this.count+e.count)}averageValue(){return this.count>0?this.sum/this.count:void 0}}function sA(e){return tD(e)&&!Number.isFinite(tI(e))?0:e}function sM(e){return e instanceof rX?e:tD(e)?tI(e):void 0}sT.empty=new sT(0,0);class sN extends nR{sumif(e,t){let r="SUMIF",n=(e,t,n)=>this.computeConditionalAggregationFunction(null!=n?n:e,[e,t],r,0,(e,t)=>this.arithmeticHelper.nonstrictadd(e,t),sM);return this.runFunction(e.args,t,this.metadata(r),n)}sumifs(e,t){let r="SUMIFS",n=(e,...t)=>this.computeConditionalAggregationFunction(e,t,r,0,(e,t)=>this.arithmeticHelper.nonstrictadd(e,t),sM);return this.runFunction(e.args,t,this.metadata(r),n)}averageif(e,t){let r="AVERAGEIF",n=(e,t,n)=>{let o=this.computeConditionalAggregationFunction(null!=n?n:e,[e,t],r,sT.empty,(e,t)=>e.compose(t),e=>tD(e)?sT.single(tI(e)):sT.empty);return o instanceof rX?o:o.averageValue()||new rX(d.DIV_BY_ZERO)};return this.runFunction(e.args,t,this.metadata(r),n)}countif(e,t){let r="COUNTIF",n=(e,t)=>this.computeConditionalAggregationFunction(e,[e,t],r,0,(e,t)=>e+t,()=>1);return this.runFunction(e.args,t,this.metadata(r),n)}countifs(e,t){let r="COUNTIFS",n=(...e)=>this.computeConditionalAggregationFunction(e[0],e,r,0,(e,t)=>e+t,()=>1);return this.runFunction(e.args,t,this.metadata(r),n)}minifs(e,t){let r="MINIFS",n=(e,t)=>void 0===t||void 0===e?void 0===t?e:t:Math.min(e,t),o=(e,...t)=>sA(this.computeConditionalAggregationFunction(e,t,r,1/0,n,sM));return this.runFunction(e.args,t,this.metadata(r),o)}maxifs(e,t){let r="MAXIFS",n=(e,t)=>void 0===t||void 0===e?void 0===t?e:t:Math.max(e,t),o=(e,...t)=>sA(this.computeConditionalAggregationFunction(e,t,r,-1/0,n,sM));return this.runFunction(e.args,t,this.metadata(r),o)}computeConditionalAggregationFunction(e,t,r,n,o,i){let s=[];for(let e=0;e<t.length;e+=2){let r=t[e],n=this.interpreter.criterionBuilder.fromCellValue(t[e+1],this.arithmeticHelper);if(void 0===n)return new rX(d.VALUE,eq.BadCriterion);s.push(new sv(r,n))}return new sS(this.interpreter,e=>[r,...e.map(e=>`${e.conditionRange.range.sheet},${e.conditionRange.range.start.col},${e.conditionRange.range.start.row}`)].join(","),n,o,i).compute(e,s)}}sN.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 sI extends nR{sumproduct(e,t){return this.runFunction(e.args,t,this.metadata("SUMPRODUCT"),(...e)=>{let t=e[0].width(),r=e[0].height();for(let n of e)if(n.width()!==t||n.height()!==r)return new rX(d.VALUE,eq.EqualLength);let n=0,o=e.map(e=>e.iterateValuesFromTopLeftCorner());for(let e=0;e<t*r;e++){let e=1;for(let t of o){let r=t.next().value;if(r instanceof rX)return r;let n=this.coerceScalarToNumberOrError(r);tD(n)?e*=tI(n):e=0}n+=e}return n})}}sI.implementedFunctions={SUMPRODUCT:{method:"sumproduct",parameters:[{argumentType:p.RANGE}],repeatLastArgs:1}};class sx extends nR{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 rX(d.VALUE,eq.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 rX(d.VALUE,eq.NegativeCount):e.repeat(t))}right(e,t){return this.runFunction(e.args,t,this.metadata("RIGHT"),(e,t)=>t<0?new rX(d.VALUE,eq.NegativeLength):0===t?"":e.slice(-t))}left(e,t){return this.runFunction(e.args,t,this.metadata("LEFT"),(e,t)=>t<0?new rX(d.VALUE,eq.NegativeLength):e.slice(0,t))}mid(e,t){return this.runFunction(e.args,t,this.metadata("MID"),(e,t,r)=>t<1?new rX(d.VALUE,eq.LessThanOne):r<0?new rX(d.VALUE,eq.NegativeLength):e.substring(t-1,t+r-1))}replace(e,t){return this.runFunction(e.args,t,this.metadata("REPLACE"),(e,t,r,n)=>t<1?new rX(d.VALUE,eq.LessThanOne):r<0?new rX(d.VALUE,eq.NegativeLength):e.substring(0,t-1)+n+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 rX(d.VALUE,eq.LengthBounds);let n=e.toLowerCase(),o=t.substring(r-1).toLowerCase(),i=this.arithmeticHelper.requiresRegex(n)?this.arithmeticHelper.searchString(n,o):o.indexOf(n);return i>-1?i+r:new rX(d.VALUE,eq.PatternNotFound)})}substitute(e,t){return this.runFunction(e.args,t,this.metadata("SUBSTITUTE"),(e,t,r,n)=>{let o,i=RegExp(this.escapeRegExpSpecialCharacters(t),"g");if(void 0===n)return e.replace(i,r);if(n<1)return new rX(d.VALUE,eq.LessThanOne);let s=0;for(;null!==(o=i.exec(e));)if(n===++s)return e.substring(0,o.index)+r+e.substring(i.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 rX(d.VALUE,eq.IndexBounds);let n=t.substring(r-1).indexOf(e)+r;return n>0?n:new rX(d.VALUE,eq.PatternNotFound)})}t(e,t){return this.runFunction(e.args,t,this.metadata("T"),e=>e instanceof rX||"string"==typeof e?e:"")}n(e,t){return this.runFunction(e.args,t,this.metadata("N"),e=>{var t;let r=e instanceof tV?null==(t=e.data[0])?void 0:t[0]:e;return r instanceof rX||"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 rX||tD(e))return e;if("string"!=typeof e)return new rX(d.VALUE,eq.NumberCoercion);let t=e.trim(),r=/^\(([^()]+)\)$/.exec(t);if(r){let e=this.parseStringToNumber(r[1]);if(void 0!==e)return-e}let n=this.parseStringToNumber(t);return void 0!==n?n:new rX(d.VALUE,eq.NumberCoercion)})}textjoin(e,t){return this.runFunction(e.args,t,this.metadata("TEXTJOIN"),(e,t,...r)=>{let n=this.flattenArgToStrings(e);if(n instanceof rX)return n;let o=[];for(let e of r){let t=this.flattenArgToStrings(e);if(t instanceof rX)return t;o.push(...t)}let i=t?o.filter(e=>""!==e):o;if(0===i.length)return"";let s=i.reduce((e,t,r)=>0===r?t:e+n[(r-1)%n.length]+t,"");return s.length>32767?new rX(d.VALUE,eq.ResultTooLong):s})}flattenArgToStrings(e){let t=e instanceof tV?e.valuesFromTopLeftCorner():[e],r=[];for(let e of t){if(e instanceof rX)return e;let t=nu(e);if(t instanceof rX)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,"\\$&")}}sx.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 sO extends nR{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 rX(d.DIV_BY_ZERO):Math.atan2(t,e))}cot(e,t){return this.runFunction(e.args,t,this.metadata("COT"),e=>0===e?new rX(d.DIV_BY_ZERO):1/Math.tan(e))}acot(e,t){return this.runFunction(e.args,t,this.metadata("ACOT"),e=>0===e?i1/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 rX(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 rX(d.DIV_BY_ZERO):1/Math.tanh(e))}acoth(e,t){return this.runFunction(e.args,t,this.metadata("ACOTH"),e=>0===e?new rX(d.NUM,eq.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 rX(d.DIV_BY_ZERO):1/Math.sinh(e))}}sO.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 sk extends ii{constructor(e){super(e),this.dependencyGraph=e}find(e,t,r){return this.basicFind(e,t,"col",r)}}class s_ extends nR{constructor(){super(...arguments),this.rowSearch=new sk(this.dependencyGraph)}vlookup(e,t){return this.runFunction(e.args,t,this.metadata("VLOOKUP"),(e,t,r,n)=>{let o=t.range;return void 0===o?new rX(d.VALUE,eq.WrongType):r<1?new rX(d.VALUE,eq.LessThanOne):r>o.width()?new rX(d.REF,eq.IndexLarge):this.doVlookup(nc(e),t,r-1,{ordering:n?"asc":"none",ifNoMatch:n?"returnLowerBound":"returnNotFound"})})}hlookup(e,t){return this.runFunction(e.args,t,this.metadata("HLOOKUP"),(e,t,r,n)=>{let o=t.range;return void 0===o?new rX(d.VALUE,eq.WrongType):r<1?new rX(d.VALUE,eq.LessThanOne):r>o.height()?new rX(d.REF,eq.IndexLarge):this.doHlookup(nc(e),t,r-1,{ordering:n?"asc":"none",ifNoMatch:n?"returnLowerBound":"returnNotFound"})})}xlookup(e,t){return this.runFunction(e.args,t,this.metadata("XLOOKUP"),(e,t,r,n,o,i)=>{if(![0,-1,1,2].includes(o)||![1,-1,2,-2].includes(i))return new rX(d.VALUE,eq.BadMode);let s=t instanceof tV?t:tV.fromScalar(t),a=r instanceof tV?r:tV.fromScalar(r);return this.doXlookup(nc(e),s,a,n,2===o,{ordering:2===i?"asc":-2===i?"desc":"none",returnOccurrence:-1===i?"last":"first",ifNoMatch:-1===o?"returnLowerBound":1===o?"returnUpperBound":"returnNotFound"})})}xlookupArraySize(e){var t,r;let n=null==(t=null==e?void 0:e.args)?void 0:t[1],o=null==(r=null==e?void 0:e.args)?void 0:r[2];if((null==n?void 0:n.start)==null||(null==n?void 0:n.end)==null||(null==o?void 0:o.start)==null||(null==o?void 0:o.end)==null)return nE.error();let i=n.end.row-n.start.row+1,s=n.end.col-n.start.col+1,a=o.end.row-o.start.row+1,l=o.end.col-o.start.col+1,h=1===s&&a===i,d=1===i&&l===s;return h||d?h?new nE(l,1):new nE(1,a):nE.error()}match(e,t){return this.runFunction(e.args,t,this.metadata("MATCH"),(e,t,r)=>this.doMatch(nc(e),t,r))}searchInRange(e,t,r,n,o){return r&&"string"==typeof e&&this.arithmeticHelper.requiresRegex(e)?o.advancedFind(this.arithmeticHelper.eqMatcherFunction(e),t,{returnOccurrence:n.returnOccurrence}):o.find(e,t,n)}doVlookup(e,t,r,n){let o,i;this.dependencyGraph.stats.start(a.VLOOKUP);let s=t.range;o=void 0===s?tV.onlyValues(t.data.map(e=>[e[0]])):tV.onlyRange(ne.spanFrom(s.start,1,s.height()),this.dependencyGraph);let l=this.searchInRange(e,o,"none"===n.ordering,n,this.columnSearch);if(this.dependencyGraph.stats.end(a.VLOOKUP),-1===l)return new rX(d.NA,eq.ValueNotFound);if(void 0===s)i=t.data[l][r];else{let e=r1(s.sheet,s.start.col+r,s.start.row+l);i=this.dependencyGraph.getCellValue(e)}return i instanceof tV?new rX(d.VALUE,eq.WrongType):i}doHlookup(e,t,r,n){let o,i,s=t.range;o=void 0===s?tV.onlyValues([t.data[0]]):tV.onlyRange(ne.spanFrom(s.start,s.width(),1),this.dependencyGraph);let a=this.searchInRange(e,o,"none"===n.ordering,n,this.rowSearch);if(-1===a)return new rX(d.NA,eq.ValueNotFound);if(void 0===s)i=t.data[r][a];else{let e=r1(s.sheet,s.start.col+a,s.start.row+r);i=this.dependencyGraph.getCellValue(e)}return i instanceof tV?new rX(d.VALUE,eq.WrongType):i}doXlookup(e,t,r,n,o,i){let s=1===t.width()&&r.height()===t.height(),a=1===t.height()&&r.width()===t.width();if(!s&&!a)return new rX(d.VALUE,eq.WrongDimension);let l=s?this.columnSearch:this.rowSearch,h=this.searchInRange(e,t,o,i,l);if(-1===h)return n==d.NA?new rX(d.NA,eq.ValueNotFound):n;let u=s?[r.data[h]]:r.data.map(e=>[e[h]]);return tV.onlyValues(u)}doMatch(e,t,r){if(![-1,0,1].includes(r))return new rX(d.VALUE,eq.BadMode);if(t.width()>1&&t.height()>1)return new rX(d.NA);let n=(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===n?new rX(d.NA,eq.ValueNotFound):n+1}}s_.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 nR{roman(e,t){return this.runFunction(e.args,t,this.metadata("ROMAN"),(e,t)=>{var r,n;let o;return(e=Math.trunc(e),!1===t?t=4:!0===t&&(t=0),(t=tI(this.coerceScalarToNumberOrError(t)))instanceof rX)?t:(t=Math.trunc(t))<0?new rX(d.VALUE,eq.ValueSmall):t>4?new rX(d.VALUE,eq.ValueLarge):(r=e,n=t,o={val:r%1e3,acc:"M".repeat(Math.floor(r/1e3))},4===n&&(sP(o,"IM",999,1e3),sP(o,"ID",499,500)),n>=3&&(sP(o,"VM",995,1e3),sP(o,"VD",495,500)),n>=2&&(sP(o,"XM",990,1e3),sP(o,"XD",490,500)),n>=1&&(sP(o,"LM",950,1e3),sP(o,"LD",450,500)),sP(o,"CM",900,1e3),sP(o,"CD",400,500),sP(o,"D",500,900),o.acc+="C".repeat(Math.floor(o.val/100)),o.val%=100,n>=2&&(sP(o,"IC",99,100),sP(o,"IL",49,50)),n>=1&&(sP(o,"VC",95,100),sP(o,"VL",45,50)),sP(o,"XC",90,100),sP(o,"XL",40,50),sP(o,"L",50,90),o.acc+="X".repeat(Math.floor(o.val/10)),o.val%=10,sP(o,"IX",9,10),sP(o,"IV",4,5),sP(o,"V",5,9),o.acc+="I".repeat(o.val),o.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 rX(d.VALUE,eq.InvalidRoman);let r={input:e,acc:0};return(sL(r,{token:"MMM",val:3e3},{token:"MM",val:2e3},{token:"M",val:1e3}),sL(r,{token:"IM",val:999},{token:"VM",val:995},{token:"XM",val:990},{token:"LM",val:950},{token:"CM",val:900}),sL(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}),sL(r,{token:"CCC",val:300},{token:"CC",val:200},{token:"C",val:100}),sL(r,{token:"IC",val:99},{token:"VC",val:95},{token:"XC",val:90}),sL(r,{token:"L",val:50},{token:"IL",val:49},{token:"VL",val:45},{token:"XL",val:40}),sL(r,{token:"XXX",val:30},{token:"XX",val:20},{token:"X",val:10}),sL(r,{token:"IX",val:9}),sL(r,{token:"V",val:5},{token:"IV",val:4}),sL(r,{token:"III",val:3},{token:"II",val:2},{token:"I",val:1}),""!==r.input)?new rX(d.VALUE,eq.InvalidRoman):t?-r.acc:r.acc})}}function sL(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,n){e.val>=r&&e.val<n&&(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 nR{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 sF=Math;function sV(e,t){for(var r=0,n=0;r<e.length;++r)n=t*n+e[r];return n}function sB(e,t,r,n,o){if(0===t)return r;if(1===t)return n;for(var i=2/e,s=n,a=1;a<t;++a)s=n*a*i+o*r,r=n,n=s;return s}function sU(e,t,r,n,o){return function(r,i){if(n){if(0===r)return 1==n?-1/0:1/0;else if(r<0)return NaN}if(0===i)return e(r);if(1===i)return t(r);if(i<0)return NaN;i|=0;var s=e(r),a=t(r);return sB(r,i,s,a,o)}}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(),n=[-.01562499995,1430488765e-13,-6911147651e-15,7621095161e-16,-934935152e-16].reverse();function o(o){var i=0,s=0,a=0,l=o*o;if(o<8)i=(s=sV(e,l))/(a=sV(t,l));else{var h=o-.785398164;s=sV(r,l=64/l),a=sV(n,l),i=sF.sqrt(.636619772/o)*(sF.cos(h)*s-sF.sin(h)*a*8/o)}return i}var i=[0x10d925ddd8,-0x1d6950b23,242396853.1,-2972611.439,15704.4826,-30.16036606].reverse(),s=[0x21b24bbb9a,0x891f618a,18583304.74,99447.43394,376.9991397,1].reverse(),a=[1,.00183105,-3516396496e-14,2457520174e-15,-240337019e-15].reverse(),l=[.04687499995,-2002690873e-13,8449199096e-15,-88228987e-14,105787412e-15].reverse();function h(e){var t=0,r=0,n=0,o=e*e,h=sF.abs(e)-2.356194491;return 8>Math.abs(e)?t=(r=e*sV(i,o))/(n=sV(s,o)):(r=sV(a,o=64/o),n=sV(l,o),t=sF.sqrt(.636619772/sF.abs(e))*(sF.cos(h)*r-sF.sin(h)*n*8/sF.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 o(t);if(1===r)return h(t);if(0===t)return 0;var n=0;if(t>r)n=sB(t,r,o(t),h(t),-1);else{for(var i=2*sF.floor((r+sF.floor(sF.sqrt(40*r)))/2),s=!1,a=0,l=0,d=1,u=0,c=2/t,g=i;g>0;g--)u=g*c*d-a,a=d,d=u,sF.abs(d)>1e10&&(d*=1e-10,a*=1e-10,n*=1e-10,l*=1e-10),s&&(l+=d),s=!s,g==r&&(n=a);n/=l=2*l-d}return n}}(),sW=(W=[-0xb04cc5cd,0x1a4fa4b91,-512359803.6,10879881.29,-86327.92757,228.4622733].reverse(),G=[0x954bf890d,745249964.8,7189466.438,47447.2647,226.1030244,1].reverse(),$=[1,-.001098628627,2734510407e-14,-2073370639e-15,2093887211e-16].reverse(),j=[-.01562499995,1430488765e-13,-6911147651e-15,7621095161e-16,-934945152e-16].reverse(),Y=[-4900604943e3,127527439e4,-0xbffb0414e,734926455.1,-4237922.726,8511.937935].reverse(),q=[249958057e5,0x62d2b66f40,0xde8afbbf,22459040.02,102042.605,354.9632885,1].reverse(),K=[1,.00183105,-3516396496e-14,2457520174e-15,-240337019e-15].reverse(),X=[.04687499995,-2002690873e-13,8449199096e-15,-88228987e-14,105787412e-15].reverse(),sU(function(e){var t=0,r=0,n=0,o=e*e,i=e-.785398164;return e<8?t=(r=sV(W,o))/(n=sV(G,o))+.636619772*sz(e,0)*sF.log(e):(r=sV($,o=64/o),n=sV(j,o),t=sF.sqrt(.636619772/e)*(sF.sin(i)*r+sF.cos(i)*n*8/e)),t},function(e){var t=0,r=0,n=0,o=e*e,i=e-2.356194491;return e<8?t=(r=e*sV(Y,o))/(n=sV(q,o))+.636619772*(sz(e,1)*sF.log(e)-1/e):(r=sV(K,o=64/o),n=sV(X,o),t=sF.sqrt(.636619772/e)*(sF.sin(i)*r+sF.cos(i)*n*8/e)),t},"BESSELY",1,-1)),sG=(Q=[1,3.5156229,3.0899424,1.2067492,.2659732,.0360768,.0045813].reverse(),Z=[.39894228,.01328592,.00225319,-.00157565,.00916281,-.02057706,.02635537,-.01647633,.00392377].reverse(),J=[.5,.87890594,.51498869,.15084934,.02658733,.00301532,32411e-8].reverse(),ee=[.39894228,-.03988024,-.00362018,.00163801,-.01031555,.02282967,-.02895312,.01787654,-.00420059].reverse(),function e(t,r){if(0===(r=Math.round(r)))return t<=3.75?sV(Q,t*t/14.0625):sF.exp(sF.abs(t))/sF.sqrt(sF.abs(t))*sV(Z,3.75/sF.abs(t));if(1===r)return t<3.75?t*sV(J,t*t/14.0625):(t<0?-1:1)*sF.exp(sF.abs(t))/sF.sqrt(sF.abs(t))*sV(ee,3.75/sF.abs(t));if(r<0)return NaN;if(0===sF.abs(t))return 0;if(t==1/0)return 1/0;var n,o=0,i=2/sF.abs(t),s=0,a=1,l=0;for(n=2*sF.round((r+sF.round(sF.sqrt(40*r)))/2);n>0;n--)l=n*i*a+s,s=a,a=l,sF.abs(a)>1e10&&(a*=1e-10,s*=1e-10,o*=1e-10),n==r&&(o=s);return o*=e(t,0)/a,t<0&&r%2?-o:o}),s$=(et=[-.57721566,.4227842,.23069756,.0348859,.00262698,1075e-7,74e-7].reverse(),er=[1.25331414,-.07832358,.02189568,-.01062446,.00587872,-.0025154,53208e-8].reverse(),en=[1,.15443144,-.67278579,-.18156897,-.01919402,-.00110404,-4686e-8].reverse(),eo=[1.25331414,.23498619,-.0365562,.01504268,-.00780353,.00325614,-68245e-8].reverse(),sU(function(e){return e<=2?-sF.log(e/2)*sG(e,0)+sV(et,e*e/4):sF.exp(-e)/sF.sqrt(e)*sV(er,2/e)},function(e){return e<=2?sF.log(e/2)*sG(e,1)+1/e*sV(en,e*e/4):sF.exp(-e)/sF.sqrt(e)*sV(eo,2/e)},"BESSELK",2,1));function sj(e){let t,r,n,o,i=[-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=i.length-1,a=!1,l=0,h=0;if(0===e)return 0;for(e<0&&(e=-e,a=!0),r=4*(t=2/(2+e))-2;s>0;s--)n=l,l=r*l-h+i[s],h=n;return o=t*Math.exp(-e*e+.5*(i[0]+r*l)-h),a?o-1:1-o}function sY(e){return 1-sj(e)}function sq(e){let t,r,n,o,i=0;if(e>=2)return -100;if(e<=0)return 100;for(t=-.70711*((2.30753+.27061*(n=Math.sqrt(-2*Math.log((o=e<1?e:2-e)/2))))/(1+n*(.99229+.04481*n))-n);i<2;i++)r=sY(t)-o,t+=r/(1.1283791670955126*Math.exp(-t*t)-t*r);return e<1?t:-t}function sK(e){let t,r,n,o,i=[-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],a=!1,l=0,h=0,d=0,u=e;if(e>171.6243769536076)return 1/0;if(u<=0){if(!(o=u%1))return 1/0;a=(1&u?-1:1)*Math.PI/Math.sin(Math.PI*o),u=1-u}for(t=0,n=u,r=u<1?u++:(u-=l=(0|u)-1)-1;t<8;++t)d=(d+i[t])*r,h=h*r+s[t];if(o=d/h+1,n<u)o/=n;else if(n>u)for(t=0;t<l;++t)o*=u,u++;return a&&(o=a/o),o}let sX=function(e,t,r){return sJ(e,t)*r};function sQ(e){let t,r,n=0,o=[76.18009172947146,-86.50532032941678,24.01409824083091,-1.231739572450155,.001208650973866179,-5395239384953e-18],i=1.000000000190015;for(r=(t=e)+5.5,r-=(e+.5)*Math.log(r);n<6;n++)i+=o[n]/++t;return Math.log(2.5066282746310007*i/e)-r}function sZ(e,t){let r,n=sQ(e),o=e,i=1/e,s=i,a=t+1-e,l=1/1e-30,h=1/a,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++)i+=s*=t/++o;return i*Math.exp(-t+e*Math.log(t)-n)}for(;u<=c;u++)a+=2,d*=(h=1/(h=(r=-u*(u-e))*h+a))*(l=a+r/l);return 1-d*Math.exp(-t+e*Math.log(t)-n)}function sJ(e,t){let r,n,o,i,s,a=0,l=t-1,h=sQ(t);if(e>=1)return Math.max(100,t+100*Math.sqrt(t));if(e<=0)return 0;for(t>1?(i=Math.log(l),s=Math.exp(l*(i-1)-h),r=(2.30753+.27061*(n=Math.sqrt(-2*Math.log(e<.5?e:1-e))))/(1+n*(.99229+.04481*n))-n,e<.5&&(r=-r),r=Math.max(.001,t*Math.pow(1-1/(9*t)-r/(3*Math.sqrt(t)),3))):r=e<(n=1-t*(.253+.12*t))?Math.pow(e/n,1/t):1-Math.log(1-(e-n)/(1-n));a<12;a++){if(r<=0)return 0;if(o=(sZ(t,r)-e)/(n=t>1?s*Math.exp(-(r-l)+l*(Math.log(r)-i)):Math.exp(-r+l*Math.log(r)-h)),(r-=n=o/(1-.5*Math.min(1,o*((t-1)/r-1))))<=0&&(r=.5*(r+n)),Math.abs(n)<1e-8*r)break}return r}let s0=function(e,t,r){return Math.exp(-.5*Math.log(2*Math.PI)-Math.log(r)-Math.pow(e-t,2)/(2*r*r))},s1=function(e,t,r){return .5*(1+sj((e-t)/Math.sqrt(2*r*r)))},s2=function(e,t,r){return -1.4142135623730951*r*sq(2*e)+t};function s3(e,t){if(!(e<=0)&&!(t<=0))return e+t>170?Math.exp(s6(e,t)):sK(e)*sK(t)/sK(e+t)}function s6(e,t){return sQ(e)+sQ(t)-sQ(e+t)}function s5(e,t,r){var n,o,i,s,a,l,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?(a=(2.30753+.27061*(i=Math.sqrt(-2*Math.log(e<.5?e:1-e))))/(1+i*(.99229+.04481*i))-i,e<.5&&(a=-a),l=(a*a-3)/6,d=a*Math.sqrt(l+(h=2/(1/(2*t-1)+1/(2*r-1))))/h-(1/(2*r-1)-1/(2*t-1))*(l+5/6-2/(3*h)),a=t/(t+r*Math.exp(2*d))):(n=Math.log(t/(t+r)),o=Math.log(r/(t+r)),d=(i=Math.exp(t*n)/t)+(s=Math.exp(r*o)/r),a=e<i/d?Math.pow(t*d*e,1/t):1-Math.pow(r*d*(1-e),1/r)),u=-sQ(t)-sQ(r)+sQ(t+r);p<10&&0!==a&&1!==a&&(s=(s4(a,t,r)-e)/(i=Math.exp(c*Math.log(a)+g*Math.log(1-a)+u)),(a-=i=s/(1-.5*Math.min(1,s*(c/a-g/(1-a)))))<=0&&(a=.5*(a+i)),a>=1&&(a=.5*(a+i+1)),!(Math.abs(i)<1e-8*a)||!(p>0));p++);return a}function s4(e,t,r){var n=0===e||1===e?0:Math.exp(sQ(t+r)-sQ(t)-sQ(r)+t*Math.log(e)+r*Math.log(1-e));return!(e<0)&&!(e>1)&&(e<(t+1)/(t+r+2)?n*s9(e,t,r)/t:1-n*s9(1-e,r,t)/r)}function s9(e,t,r){var n,o,i,s,a=1,l=t+r,h=t+1,d=t-1,u=1,c=1-l*e/h;for(1e-30>Math.abs(c)&&(c=1e-30),s=c=1/c;a<=100&&(n=2*a,1e-30>Math.abs(c=1+(o=a*(r-a)*e/((d+n)*(t+n)))*c)&&(c=1e-30),1e-30>Math.abs(u=1+o/u)&&(u=1e-30),s*=(c=1/c)*u,1e-30>Math.abs(c=1+(o=-(t+a)*(l+a)*e/((t+n)*(h+n)))*c)&&(c=1e-30),1e-30>Math.abs(u=1+o/u)&&(u=1e-30),s*=i=(c=1/c)*u,!(3e-7>Math.abs(i-1)));a++);return s}let s7=function(e,t,r){return 0===r||1===r?+(t*r===e):at(t,e)*Math.pow(r,e)*Math.pow(1-r,t-e)},s8=function(e,t,r){if(e<0)return 0;if(e>=t)return 1;if(r<0||r>1||t<=0)return NaN;var n=(e=Math.floor(e))+1,o=t-e,i=n+o,s=Math.exp(sQ(i)-sQ(o)-sQ(n)+n*Math.log(r)+o*Math.log(1-r));return Math.round(1e10*(1-(r<(n+1)/(i+2)?s*ae(r,n,o,1e-10):1-s*ae(1-r,o,n,1e-10))))/1e10};function ae(e,t,r,n){for(var o,i=0,s=1,a=1,l=1,h=0,d=0;Math.abs((a-d)/a)>n;)d=a,i=a+(o=-(t+h)*(t+r+h)*e/(t+2*h)/(t+2*h+1))*i,s=l+o*s,h+=1,a=i+(o=h*(r-h)*e/(t+2*h-1)/(t+2*h))*a,i/=l=s+o*l,s/=l,a/=l,l=1;return a/t}function at(e,t){var r,n;return e>170||t>170?Math.exp((r=e,n=t,ar(r)-ar(n)-ar(r-n))):an(e)/an(t)/an(e-t)}function ar(e){return e<0?NaN:sQ(e+1)}function an(e){return e<0?NaN:sK(e+1)}let ao=function(e,t){return e<0?0:sZ(t/2,e/2)},ai=function(e,t){return 2*sJ(e,.5*t)},as=function(e,t,r){return e<0?0:s4(t*e/(t*e+r),t/2,r/2)},aa=function(e,t,r){return r/(t*(1/s5(e,t/2,r/2)-1))},al={pdf:function(e,t){return t<0||e%1!=0||e<0?0:Math.pow(t,e)*Math.exp(-t)/an(e)},cdf:function(e,t){var r=0;if(e<0)return 0;for(var n=0;r<=e;r++)n+=al.pdf(r,t);return n}},ah={pdf:function(e,t,r,n){if(e<0||e<r-(t-n)||e>n||e>r)return 0;if(2*r>t)if(2*n>t)return ah.pdf(t-r-n+e,t,t-r,t-n);else return ah.pdf(n-e,t,t-r,n);if(2*n>t)return ah.pdf(r-e,t,r,t-n);if(r<n)return ah.pdf(e,t,n,r);for(var o=1,i=0,s=0;s<e;s++){for(;o>1&&i<n;)o*=1-r/(t-i),i++;o*=(n-s)*(r-s)/((s+1)*(t-r-n+s+1))}for(;i<n;i++)o*=1-r/(t-i);return Math.min(1,Math.max(0,o))},cdf:function e(t,r,n,o){if(t<0||t<n-(r-o))return 0;if(t>=o||t>=n)return 1;if(2*n>r)if(2*o>r)return e(r-n-o+t,r,r-n,r-o);else return 1-ah.cdf(o-t-1,r,r-n,o);if(2*o>r)return 1-ah.cdf(n-t-1,r,n,r-o);if(n<o)return ah.cdf(t,r,o,n);for(var i=1,s=1,a=0,l=0;l<t;l++){for(;i>1&&a<o;){var h=1-n/(r-a);s*=h,i*=h,a++}s*=(o-l)*(n-l)/((l+1)*(r-n-o+l+1)),i+=s}for(;a<o;a++)i*=1-n/(r-a);return Math.min(1,Math.max(0,i))}},ad=function(e,t){var r=t/2;return s4((e+Math.sqrt(e*e+t))/(2*Math.sqrt(e*e+t)),r,r)},au=function(e,t){var r=s5(2*Math.min(e,1-e),.5*t,.5);return r=Math.sqrt(t*(1-r)/r),e>.5?r:-r},ac={pdf:function(e,t,r){return e===e>>>0&&(e<0?0:at(e+t-1,t-1)*Math.pow(1-r,e)*Math.pow(r,t))},cdf:function(e,t,r){var n=0,o=0;if(e<0)return 0;for(;o<=e;o++)n+=ac.pdf(o,t,r);return n}};function ag(e){for(var t=0,r=e.length;--r>=0;)t+=e[r];return t}function ap(e){return ag(e)/e.length}function am(e){for(var t,r=ap(e),n=0,o=e.length;--o>=0;)n+=(t=e[o]-r)*t;return n}function af(e,t){return am(e)/(e.length-!!t)}function aC(e,t){return Math.sqrt(af(e,t))}function ab(e,t){var r,n=ap(e),o=ap(t),i=e.length,s=Array(i);for(r=0;r<i;r++)s[r]=(e[r]-n)*(t[r]-o);return ag(s)/(i-1)}function ay(e,t){return ab(e,t)/aC(e,1)/aC(t,1)}class aw extends nR{erf(e,t){return this.runFunction(e.args,t,this.metadata("ERF"),(e,t)=>void 0===t?sj(e):sj(t)-sj(e))}erfc(e,t){return this.runFunction(e.args,t,this.metadata("ERFC"),sY)}expondist(e,t){return this.runFunction(e.args,t,this.metadata("EXPON.DIST"),(e,t,r)=>{let n,o,i,s;return r?(n=e,o=t,n<0?0:1-Math.exp(-o*n)):(i=e,s=t,i<0?0:s*Math.exp(-s*i))})}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,n)=>{var o,i,s,a,l,h;return n?(o=e,i=t,s=r,o<0?0:sZ(i,o/s)):(a=e,l=t,h=r,a<0?0:0===a&&1===l?1/h:Math.exp((l-1)*Math.log(a)-a/h-sQ(l)-l*Math.log(h)))})}gammaln(e,t){return this.runFunction(e.args,t,this.metadata("GAMMALN"),sQ)}gammainv(e,t){return this.runFunction(e.args,t,this.metadata("GAMMA.INV"),sX)}gauss(e,t){return this.runFunction(e.args,t,this.metadata("GAUSS"),e=>s1(e,0,1)-.5)}betadist(e,t){return this.runFunction(e.args,t,this.metadata("BETA.DIST"),(e,t,r,n,o,i)=>{var s,a,l,h,u,c;return e<=o?new rX(d.NUM,eq.ValueSmall):e>=i?new rX(d.NUM,eq.ValueLarge):(e=(e-o)/(i-o),n)?(s=e,a=t,l=r,s>1||s<0?+(s>1):s4(s,a,l)):(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)/s3(u,c):Math.exp((u-1)*Math.log(h)+(c-1)*Math.log(1-h)-s6(u,c)))})}betainv(e,t){return this.runFunction(e.args,t,this.metadata("BETA.INV"),(e,t,r,n,o)=>n>=o?new rX(d.NUM,eq.WrongOrder):s5(e,t,r)*(o-n)+n)}binomialdist(e,t){return this.runFunction(e.args,t,this.metadata("BINOM.DIST"),(e,t,r,n)=>e>t?new rX(d.NUM,eq.WrongOrder):(e=Math.trunc(e),t=Math.trunc(t),n)?s8(e,t,r):s7(e,t,r))}binomialinv(e,t){return this.runFunction(e.args,t,this.metadata("BINOM.INV"),(e,t,r)=>{let n=-1,o=e=Math.trunc(e);for(;o>n+1;){let i=Math.trunc((n+o)/2);s8(i,e,t)>=r?o=i:n=i}return o})}besselifn(e,t){return this.runFunction(e.args,t,this.metadata("BESSELI"),(e,t)=>sG(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)=>sW(e,Math.trunc(t)))}chisqdist(e,t){return this.runFunction(e.args,t,this.metadata("CHISQ.DIST"),(e,t,r)=>{var n,o;return(t=Math.trunc(t),r)?ao(e,t):(n=e,o=t,n<0?0:0===n&&2===o?.5:Math.exp((o/2-1)*Math.log(n)-n/2-o/2*Math.log(2)-sQ(o/2)))})}chisqdistrt(e,t){return this.runFunction(e.args,t,this.metadata("CHISQ.DIST.RT"),(e,t)=>1-ao(e,Math.trunc(t)))}chisqinv(e,t){return this.runFunction(e.args,t,this.metadata("CHISQ.INV"),(e,t)=>ai(e,Math.trunc(t)))}chisqinvrt(e,t){return this.runFunction(e.args,t,this.metadata("CHISQ.INV.RT"),(e,t)=>ai(1-e,Math.trunc(t)))}fdist(e,t){return this.runFunction(e.args,t,this.metadata("F.DIST"),(e,t,r,n)=>{var o,i,s;return(t=Math.trunc(t),r=Math.trunc(r),n)?as(e,t,r):(o=e,i=t,s=r,o<0?0:i<=2?0===o&&i<2?1/0:0===o&&2===i?1:1/s3(i/2,s/2)*Math.pow(i/s,i/2)*Math.pow(o,i/2-1)*Math.pow(1+i/s*o,-(i+s)/2):s/(s+o*i)*i/2*s7((i-2)/2,(i+s-2)/2,i*o/(s+o*i)))})}fdistrt(e,t){return this.runFunction(e.args,t,this.metadata("F.DIST.RT"),(e,t,r)=>1-as(e,Math.trunc(t),Math.trunc(r)))}finv(e,t){return this.runFunction(e.args,t,this.metadata("F.INV"),(e,t,r)=>aa(e,Math.trunc(t),Math.trunc(r)))}finvrt(e,t){return this.runFunction(e.args,t,this.metadata("F.INV.RT"),(e,t,r)=>aa(1-e,Math.trunc(t),Math.trunc(r)))}weibulldist(e,t){return this.runFunction(e.args,t,this.metadata("WEIBULL.DIST"),(e,t,r,n)=>{var o,i,s,a,l,h;return n?(o=e,i=r,s=t,o<0?0:1-Math.exp(-Math.pow(o/i,s))):(a=e,l=r,h=t,a<0||l<0||h<0?0:h/l*Math.pow(a/l,h-1)*Math.exp(-Math.pow(a/l,h)))})}poissondist(e,t){return this.runFunction(e.args,t,this.metadata("POISSON.DIST"),(e,t,r)=>(e=Math.trunc(e),r)?al.cdf(e,t):al.pdf(e,t))}hypgeomdist(e,t){return this.runFunction(e.args,t,this.metadata("HYPGEOM.DIST"),(e,t,r,n,o)=>e>t||e>r||t>n||r>n||e+n<r+t?new rX(d.NUM,eq.ValueLarge):(e=Math.trunc(e),t=Math.trunc(t),r=Math.trunc(r),n=Math.trunc(n),o)?ah.cdf(e,n,r,t):ah.pdf(e,n,r,t))}tdist(e,t){return this.runFunction(e.args,t,this.metadata("T.DIST"),(e,t,r)=>{var n,o;return(t=Math.trunc(t),r)?ad(e,t):(n=e,1/(Math.sqrt(o=(o=t)>1e100?1e100:o)*s3(.5,o/2))*Math.pow(1+n*n/o,-((o+1)/2)))})}tdist2t(e,t){return this.runFunction(e.args,t,this.metadata("T.DIST.2T"),(e,t)=>(1-ad(e,Math.trunc(t)))*2)}tdistrt(e,t){return this.runFunction(e.args,t,this.metadata("T.DIST.RT"),(e,t)=>1-ad(e,Math.trunc(t)))}tdistold(e,t){return this.runFunction(e.args,t,this.metadata("TDIST"),(e,t,r)=>r*(1-ad(e,Math.trunc(t))))}tinv(e,t){return this.runFunction(e.args,t,this.metadata("T.INV"),(e,t)=>au(e,Math.trunc(t)))}tinv2t(e,t){return this.runFunction(e.args,t,this.metadata("T.INV.2T"),(e,t)=>au(1-e/2,Math.trunc(t)))}lognormdist(e,t){return this.runFunction(e.args,t,this.metadata("LOGNORM.DIST"),(e,t,r,n)=>{var o,i,s,a,l,h;return n?(o=e,i=t,s=r,o<0?0:.5+.5*sj((Math.log(o)-i)/Math.sqrt(2*s*s))):(a=e,l=t,h=r,a<=0?0:Math.exp(-Math.log(a)-.5*Math.log(2*Math.PI)-Math.log(h)-Math.pow(Math.log(a)-l,2)/(2*h*h)))})}lognorminv(e,t){return this.runFunction(e.args,t,this.metadata("LOGNORM.INV"),(e,t,r)=>{var n,o;return n=e,o=t,Math.exp(-1.4142135623730951*r*sq(2*n)+o)})}normdist(e,t){return this.runFunction(e.args,t,this.metadata("NORM.DIST"),(e,t,r,n)=>n?s1(e,t,r):s0(e,t,r))}norminv(e,t){return this.runFunction(e.args,t,this.metadata("NORM.INV"),(e,t,r)=>s2(e,t,r))}normsdist(e,t){return this.runFunction(e.args,t,this.metadata("NORM.S.DIST"),(e,t)=>t?s1(e,0,1):s0(e,0,1))}normsinv(e,t){return this.runFunction(e.args,t,this.metadata("NORM.S.INV"),e=>s2(e,0,1))}phi(e,t){return this.runFunction(e.args,t,this.metadata("PHI"),e=>s0(e,0,1))}negbinomdist(e,t){return this.runFunction(e.args,t,this.metadata("NEGBINOM.DIST"),(e,t,r,n)=>(e=Math.trunc(e),t=Math.trunc(t),n)?ac.cdf(e,t,r):ac.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(s2(t[1]/2,0,1)*t[2]/Math.sqrt(t[3])):Math.abs(s2(t[1]/2,0,1)*aC(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 rX(d.DIV_BY_ZERO):function(){var e,t=[].slice.call(arguments),r=[,,];return e=4===t.length?Math.abs(au(t[1]/2,t[3]-1)*t[2]/Math.sqrt(t[3])):Math.abs(au(t[1]/2,t[2].length-1)*aC(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)}}aw.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}]}},aw.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 aS extends nR{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 rX(d.NUM,eq.WrongOrder):av(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 rX(d.NUM,eq.ValueLarge):0===e&&0===t?1:av(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 rX)return t;let r=0;for(let e of t){if(e<0)return new rX(d.NUM,eq.ValueSmall);r=aR(r,Math.trunc(e))}return r>Number.MAX_SAFE_INTEGER?new rX(d.NUM,eq.ValueLarge):r})}lcm(e,t){return this.runFunction(e.args,t,this.metadata("LCM"),(...e)=>{let t=this.arithmeticHelper.coerceNumbersCoerceRangesDropNulls(e);if(t instanceof rX)return t;let r=1;for(let e of t){var n,o;if(e<0)return new rX(d.NUM,eq.ValueSmall);n=r,o=Math.trunc(e),r=0===n||0===o?0:n*(o/aR(n,o))}return r>Number.MAX_SAFE_INTEGER?new rX(d.NUM,eq.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 rX(d.NUM,eq.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 n of e){if(n<0)return new rX(d.NUM,eq.ValueSmall);n=Math.trunc(n);for(let e=1;e<=n;e++)r*=(t+e)/e;t+=n}return Math.round(r)})}quotient(e,t){return this.runFunction(e.args,t,this.metadata("QUOTIENT"),(e,t)=>0===t?new rX(d.DIV_BY_ZERO):Math.trunc(e/t))}seriessum(e,t){return this.runFunction(e.args,t,this.metadata("SERIESSUM"),(e,t,r,n)=>{let o=this.arithmeticHelper.manyToOnlyNumbersDropNulls(n.valuesFromTopLeftCorner());if(o instanceof rX)return o;let i=0;for(let t of(o.reverse(),o))i*=Math.pow(e,r),i+=t;return i*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(),n=t.valuesFromTopLeftCorner();if(r.length!==n.length)return new rX(d.NA,eq.EqualLength);let o=r.length,i=0;for(let e=0;e<o;e++){let t=r[e],o=n[e];if(t instanceof rX)return t;if(o instanceof rX)return o;"number"==typeof t&&"number"==typeof o&&(i+=Math.pow(t,2)-Math.pow(o,2))}return i})}sumx2py2(e,t){return this.runFunction(e.args,t,this.metadata("SUMX2PY2"),(e,t)=>{let r=e.valuesFromTopLeftCorner(),n=t.valuesFromTopLeftCorner();if(r.length!==n.length)return new rX(d.NA,eq.EqualLength);let o=r.length,i=0;for(let e=0;e<o;e++){let t=r[e],o=n[e];if(t instanceof rX)return t;if(o instanceof rX)return o;"number"==typeof t&&"number"==typeof o&&(i+=Math.pow(t,2)+Math.pow(o,2))}return i})}sumxmy2(e,t){return this.runFunction(e.args,t,this.metadata("SUMXMY2"),(e,t)=>{let r=e.valuesFromTopLeftCorner(),n=t.valuesFromTopLeftCorner();if(r.length!==n.length)return new rX(d.NA,eq.EqualLength);let o=r.length,i=0;for(let e=0;e<o;e++){let t=r[e],o=n[e];if(t instanceof rX)return t;if(o instanceof rX)return o;"number"==typeof t&&"number"==typeof o&&(i+=Math.pow(t-o,2))}return i})}}function av(e,t){2*t>e&&(t=e-t);let r=1;for(let n=1;n<=t;n++)r*=(e-t+n)/n;return Math.round(r)}function aR(e,t){for(e<t&&([e,t]=[t,e]);t>0;)[e,t]=[t,e%t];return e}aS.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 aE extends nR{complex(e,t){return this.runFunction(e.args,t,this.metadata("COMPLEX"),(e,t,r)=>"i"!==r&&"j"!==r?new rX(d.VALUE,eq.ShouldBeIorJ):ns([e,t],r))}imabs(e,t){return this.runFunction(e.args,t,this.metadata("IMABS"),ak)}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 rX(d.DIV_BY_ZERO):Math.atan2(t,e))}imconjugate(e,t){return this.runFunction(e.args,t,this.metadata("IMCONJUGATE"),([e,t])=>ns([e,-t]))}imcos(e,t){return this.runFunction(e.args,t,this.metadata("IMCOS"),e=>ns(aM(e)))}imcosh(e,t){return this.runFunction(e.args,t,this.metadata("IMCOSH"),e=>ns(aN(e)))}imcot(e,t){return this.runFunction(e.args,t,this.metadata("IMCOT"),e=>ns(aA(aM(e),aI(e))))}imcsc(e,t){return this.runFunction(e.args,t,this.metadata("IMCSC"),e=>ns(aA([1,0],aI(e))))}imcsch(e,t){return this.runFunction(e.args,t,this.metadata("IMCSCH"),e=>ns(aA([1,0],ax(e))))}imsec(e,t){return this.runFunction(e.args,t,this.metadata("IMSEC"),e=>ns(aA([1,0],aM(e))))}imsech(e,t){return this.runFunction(e.args,t,this.metadata("IMSECH"),e=>ns(aA([1,0],aN(e))))}imsin(e,t){return this.runFunction(e.args,t,this.metadata("IMSIN"),e=>ns(aI(e)))}imsinh(e,t){return this.runFunction(e.args,t,this.metadata("IMSINH"),e=>ns(ax(e)))}imtan(e,t){return this.runFunction(e.args,t,this.metadata("IMTAN"),e=>ns(aA(aI(e),aM(e))))}imdiv(e,t){return this.runFunction(e.args,t,this.metadata("IMDIV"),(e,t)=>ns(aA(e,t)))}improduct(e,t){return this.runFunction(e.args,t,this.metadata("IMPRODUCT"),(...e)=>{let t=this.arithmeticHelper.coerceComplexExactRanges(e);if(t instanceof rX)return t;let r=[1,0];for(let e of t)r=aT(r,e);return ns(r)})}imsum(e,t){return this.runFunction(e.args,t,this.metadata("IMSUM"),(...e)=>{let t=this.arithmeticHelper.coerceComplexExactRanges(e);if(t instanceof rX)return t;let r=[0,0];for(let e of t)r=function([e,t],[r,n]){return[e+r,t+n]}(r,e);return ns(r)})}imsub(e,t){return this.runFunction(e.args,t,this.metadata("IMSUB"),(e,t)=>ns(function([e,t],[r,n]){return[e-r,t-n]}(e,t)))}imexp(e,t){return this.runFunction(e.args,t,this.metadata("IMEXP"),e=>ns(aO(e)))}imln(e,t){return this.runFunction(e.args,t,this.metadata("IMLN"),e=>ns(a_(e)))}imlog10(e,t){return this.runFunction(e.args,t,this.metadata("IMLOG10"),e=>{let[t,r]=a_(e),n=Math.log(10);return ns([t/n,r/n])})}imlog2(e,t){return this.runFunction(e.args,t,this.metadata("IMLOG2"),e=>{let[t,r]=a_(e),n=Math.log(2);return ns([t/n,r/n])})}impower(e,t){return this.runFunction(e.args,t,this.metadata("IMPOWER"),(e,t)=>ns(aH(e,t)))}imsqrt(e,t){return this.runFunction(e.args,t,this.metadata("IMSQRT"),e=>ns(aH(e,.5)))}}function aT([e,t],[r,n]){return[e*r-t*n,e*n+r*t]}function aA([e,t],[r,n]){let o=Math.pow(r,2)+Math.pow(n,2),[i,s]=aT([e,t],[r,-n]);return[i/o,s/o]}function aM([e,t]){return[Math.cos(e)*Math.cosh(t),-Math.sin(e)*Math.sinh(t)]}function aN([e,t]){return[Math.cosh(e)*Math.cos(t),Math.sinh(e)*Math.sin(t)]}function aI([e,t]){return[Math.sin(e)*Math.cosh(t),Math.cos(e)*Math.sinh(t)]}function ax([e,t]){return[Math.sinh(e)*Math.cos(t),Math.cosh(e)*Math.sin(t)]}function aO([e,t]){return[Math.exp(e)*Math.cos(t),Math.exp(e)*Math.sin(t)]}function ak([e,t]){return Math.sqrt(e*e+t*t)}function a_([e,t]){return[Math.log(ak([e,t])),Math.atan2(t,e)]}function aH(e,t){let[r,n]=a_(e);return aO([t*r,t*n])}aE.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 aL extends nR{avedev(e,t){return this.runFunction(e.args,t,this.metadata("AVEDEV"),(...e)=>{let t=this.arithmeticHelper.coerceNumbersExactRanges(e);if(t instanceof rX)return t;if(0===t.length)return new rX(d.DIV_BY_ZERO);let r=ap(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 rX?t:0===t.length?0:am(t)})}geomean(e,t){return this.runFunction(e.args,t,this.metadata("GEOMEAN"),(...e)=>{let t=this.arithmeticHelper.coerceNumbersExactRanges(e);if(t instanceof rX)return t;if(0===t.length)return new rX(d.NUM,eq.OneValue);for(let e of t)if(e<=0)return new rX(d.NUM,eq.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 rX)return t;if(0===t.length)return new rX(d.NUM,eq.OneValue);for(let e of t)if(e<=0)return new rX(d.NUM,eq.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 rX(d.NA,eq.EqualLength);let r=aP(e,t);return r instanceof rX?r:r[0].length<=1?new rX(d.DIV_BY_ZERO,eq.TwoValues):ay(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 rX(d.NA,eq.EqualLength);let r=aP(e,t);return r instanceof rX?r:r[0].length<=1?new rX(d.DIV_BY_ZERO,eq.TwoValues):Math.pow(ay(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 rX(d.NA,eq.EqualLength);let r=aP(e,t);if(r instanceof rX)return r;let n=r[0].length;return n<1?new rX(d.DIV_BY_ZERO,eq.OneValue):1===n?0:ab(r[0],r[1])*(n-1)/n})}covariances(e,t){return this.runFunction(e.args,t,this.metadata("COVARIANCE.S"),(e,t)=>{if(e.numberOfElements()!==t.numberOfElements())return new rX(d.NA,eq.EqualLength);let r=aP(e,t);return r instanceof rX?r:r[0].length<=1?new rX(d.DIV_BY_ZERO,eq.TwoValues):ab(r[0],r[1])})}ztest(e,t){return this.runFunction(e.args,t,this.metadata("Z.TEST"),(e,t,r)=>{let n=this.arithmeticHelper.manyToExactNumbers(e.valuesFromTopLeftCorner());if(n instanceof rX)return n;let o=n.length;if(void 0===r){if(o<2)return new rX(d.DIV_BY_ZERO,eq.TwoValues);r=aC(n,!0)}return o<1?new rX(d.NA,eq.OneValue):0===r?new rX(d.DIV_BY_ZERO):1-s1((ap(n)-t)/(r/Math.sqrt(o)),0,1)})}ftest(e,t){return this.runFunction(e.args,t,this.metadata("F.TEST"),(e,t)=>{let r=this.arithmeticHelper.manyToExactNumbers(e.valuesFromTopLeftCorner()),n=this.arithmeticHelper.manyToExactNumbers(t.valuesFromTopLeftCorner());if(r instanceof rX)return r;if(n instanceof rX)return n;if(r.length<=1||n.length<=1)return new rX(d.DIV_BY_ZERO);let o=af(r,!0),i=af(n,!0);if(0===o||0===i)return new rX(d.DIV_BY_ZERO);let s=as(o/i,r.length-1,n.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 rX(d.NA,eq.EqualLength);let r=aP(e,t);if(r instanceof rX)return r;let n=r[0].length;return n<=2?new rX(d.DIV_BY_ZERO,eq.ThreeValues):Math.sqrt((am(r[0])-Math.pow(ab(r[0],r[1])*(n-1),2)/am(r[1]))/(n-2))})}slope(e,t){return this.runFunction(e.args,t,this.metadata("SLOPE"),(e,t)=>{if(e.numberOfElements()!==t.numberOfElements())return new rX(d.NA,eq.EqualLength);let r=aP(e,t);if(r instanceof rX)return r;let n=r[0].length;return n<=1?new rX(d.DIV_BY_ZERO,eq.TwoValues):ab(r[0],r[1])*(n-1)/am(r[1])})}chisqtest(e,t){return this.runFunction(e.args,t,this.metadata("CHISQ.TEST"),(e,t)=>{let r=e.height(),n=e.width();if(t.height()!==r||t.width()!==n)return new rX(d.NA,eq.EqualLength);let o=aP(e,t);if(o instanceof rX)return o;if(o[0].length<=1)return new rX(d.DIV_BY_ZERO,eq.TwoValues);let i=0;for(let e=0;e<o[0].length;e++){if(0===o[1][e])return new rX(d.DIV_BY_ZERO);i+=Math.pow(o[0][e]-o[1][e],2)/o[1][e]}return i<0?new rX(d.NUM,eq.NaN):1-ao(i,r>1&&n>1?(r-1)*(n-1):r*n-1)})}ttest(e,t){return this.runFunction(e.args,t,this.metadata("T.TEST"),(e,t,r,n)=>{let o=this.arithmeticHelper.manyToExactNumbers(e.valuesFromTopLeftCorner()),i=this.arithmeticHelper.manyToExactNumbers(t.valuesFromTopLeftCorner());if(o instanceof rX)return o;if(i instanceof rX)return i;let s=o.length,a=i.length;if(1===n){if(a!==s)return new rX(d.NA,eq.EqualLength);if(s<=1)return new rX(d.DIV_BY_ZERO,eq.TwoValues);let e=Array(s);for(let t=0;t<s;t++)e[t]=o[t]-i[t];let t=aC(e,!0);return 0===t?new rX(d.DIV_BY_ZERO):r*(1-ad(Math.abs(Math.sqrt(s)*ap(e)/t),s-1))}if(2===n){if(s<=1||a<=1)return new rX(d.DIV_BY_ZERO,eq.TwoValues);let e=(am(o)+am(i))/(s+a-2);return 0===e?new rX(d.DIV_BY_ZERO):r*(1-ad(Math.abs((ap(o)-ap(i))/Math.sqrt(e*(1/s+1/a))),s+a-2))}{if(s<=1||a<=1)return new rX(d.DIV_BY_ZERO,eq.TwoValues);let e=af(o,!0),t=af(i,!0);return 0===e&&0===t?new rX(d.DIV_BY_ZERO):r*(1-ad(Math.abs((ap(o)-ap(i))/Math.sqrt(e/s+t/a)),Math.pow(e/s+t/a,2)/(Math.pow(e/s,2)/(s-1)+Math.pow(t/a,2)/(a-1))))}})}skew(e,t){return this.runFunction(e.args,t,this.metadata("SKEW"),(...e)=>{let t=this.arithmeticHelper.coerceNumbersExactRanges(e);if(t instanceof rX)return t;let r=t.length;if(r<3)return new rX(d.DIV_BY_ZERO,eq.ThreeValues);let n=ap(t),o=aC(t,!0);return 0===o?new rX(d.DIV_BY_ZERO):t.reduce((e,t)=>e+Math.pow((t-n)/o,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 rX)return t;let r=t.length;if(r<3)return new rX(d.DIV_BY_ZERO,eq.ThreeValues);let n=ap(t),o=aC(t,!1);return 0===o?new rX(d.DIV_BY_ZERO):t.reduce((e,t)=>e+Math.pow((t-n)/o,3),0)/r})}}function aP(e,t){let r,n,o=e.iterateValuesFromTopLeftCorner(),i=t.iterateValuesFromTopLeftCorner(),s=[],a=[];for(;r=o.next(),n=i.next(),!r.done&&!n.done;){let e=r.value,t=n.value;if(e instanceof rX)return e;if(t instanceof rX)return t;tD(e)&&tD(t)&&(s.push(tI(e)),a.push(tI(t)))}return[s,a]}aL.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}},aL.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 aD extends ip{}aD.HyperFormula=ip,aD.ErrorType=d,aD.CellError=rX,aD.CellType=u,aD.CellValueType=rj,aD.CellValueDetailedType=rY,aD.DetailedCellError=nA,aD.ExportedCellChange=oK,aD.ExportedNamedExpressionChange=oX,aD.ConfigValueTooBigError=ri,aD.ConfigValueTooSmallError=ro,aD.EvaluationSuspendedError=ra,aD.ExpectedOneOfValuesError=rs,aD.ExpectedValueOfTypeError=rr,aD.ArraySize=nE,aD.SimpleRangeValue=tV,aD.EmptyValue=tN,aD.FunctionPlugin=nR,aD.FunctionArgumentType=p,aD.FunctionPluginValidationError=rc,aD.InvalidAddressError=t1,aD.InvalidArgumentsError=t2,aD.LanguageNotRegisteredError=rd,aD.LanguageAlreadyRegisteredError=ru,aD.MissingTranslationError=rl,aD.NamedExpressionDoesNotExistError=t4,aD.NamedExpressionNameIsAlreadyTakenError=t6,aD.NamedExpressionNameIsInvalidError=t5,aD.NoOperationToRedoError=t7,aD.NoOperationToUndoError=t9,aD.NoRelativeAddressesAllowedError=rf,aD.NoSheetWithIdError=tX,aD.NoSheetWithNameError=tQ,aD.NotAFormulaError=t0,aD.NothingToPasteError=t8,aD.ProtectedFunctionTranslationError=rh,aD.SheetNameAlreadyTakenError=tZ,aD.SheetSizeLimitExceededError=tJ,aD.SourceLocationHasArrayError=rp,aD.TargetLocationHasArrayError=rm,aD.UnableToParseError=rt;let aF=iC.defaultConfig.language;for(let e of(ip.registerLanguage(aF,iy),ip.languages[iy.langCode]=iy,Object.getOwnPropertyNames(ei)))e.startsWith("_")||ip.registerFunctionPlugin(ei[e]);window.HyperFormula=ip})(),(()=>{"use strict";let e,t,o,i;r.d(n,{default:()=>bC});var s={};r.r(s),r.d(s,{arrayAvg:()=>eo,arrayEach:()=>ee,arrayFilter:()=>Z,arrayFlatten:()=>function e(t){return Q(t,(t,r)=>t.concat(Array.isArray(r)?e(r):r),[])},arrayMap:()=>J,arrayMax:()=>er,arrayMin:()=>en,arrayReduce:()=>Q,arraySum:()=>et,arrayToString:()=>ed,arrayUnique:()=>ei,extendArray:()=>K,getDifferenceOfArrays:()=>es,getIntersectionOfArrays:()=>ea,getUnionOfArrays:()=>el,pivot:()=>X,stringToArray:()=>eh,to2dArray:()=>q});var a={};r.r(a),r.d(a,{_injectProductInfo:()=>eM,isDefined:()=>ep,isEmpty:()=>ef,isRegExp:()=>eC,isUndefined:()=>em,stringify:()=>eg});var l={};r.r(l),r.d(l,{throwWithCause:()=>eN});var h={};r.r(h),r.d(h,{assignObjectDefaults:()=>ej,clone:()=>eH,createObjectPropListener:()=>eG,deepClone:()=>e_,deepExtend:()=>ek,deepMerge:()=>eY,deepObjectSize:()=>eW,defineGetter:()=>eV,duckSchema:()=>eI,extend:()=>eO,getProperty:()=>eU,hasOwnProperty:()=>e$,inherit:()=>ex,isKeyValueObject:()=>eq,isObject:()=>eD,isObjectEqual:()=>eP,isPlainObject:()=>eF,mixin:()=>eL,objectEach:()=>eB,setProperty:()=>ez});var d={};r.r(d),r.d(d,{cancelAnimationFrame:()=>eX,getComparisonFunction:()=>eJ,isCSR:()=>eZ,isTouchSupported:()=>eQ,requestAnimationFrame:()=>eK});var u={};r.r(u),r.d(u,{isChrome:()=>e5,isChromeWebKit:()=>e4,isEdge:()=>tt,isEdgeWebKit:()=>tr,isFirefox:()=>e9,isFirefoxWebKit:()=>e7,isIOS:()=>to,isIpadOS:()=>ti,isLinuxOS:()=>tl,isMacOS:()=>ta,isMobileBrowser:()=>tn,isSafari:()=>e8,isSafariBefore261:()=>te,isWindowsOS:()=>ts,setBrowserMeta:()=>e3,setPlatformMeta:()=>e6});var c={};r.r(c),r.d(c,{equalsIgnoreCase:()=>td,isJSON:()=>tc,isPercentValue:()=>tg,localeLowerCase:()=>tS,randomString:()=>tu,sanitize:()=>tf,stripTags:()=>tm,substitute:()=>tp,toHyphen:()=>tC,toUpperCaseFirst:()=>th});var g={};r.r(g),r.d(g,{HTML_CHARACTERS:()=>tX,SANITIZER_WARN_KEY:()=>tQ,addClass:()=>tG,addEvent:()=>rl,clearTextSelection:()=>rg,closest:()=>tH,closestDown:()=>tL,empty:()=>tK,eventTargetEl:()=>tx,fastInnerHTML:()=>tJ,fastInnerText:()=>t0,findFirstParentWithClass:()=>tP,getCaretPosition:()=>rd,getChildEl:()=>rH,getCssTransform:()=>rw,getFractionalScalingCompensation:()=>rm,getFrameElement:()=>tO,getMaximumScrollLeft:()=>re,getMaximumScrollTop:()=>t8,getParent:()=>tN,getParentWindow:()=>tk,getScrollLeft:()=>t9,getScrollTop:()=>t4,getScrollableElement:()=>t7,getScrollbarWidth:()=>rf,getSelectionEndPosition:()=>ru,getSelectionText:()=>rc,getStyle:()=>rr,getTrimmingContainer:()=>rt,getWindowScrollLeft:()=>t5,getWindowScrollTop:()=>t6,hasAccessToParentWindow:()=>t_,hasClass:()=>tW,hasHorizontalScrollbar:()=>rb,hasVerticalScrollbar:()=>rC,hasZeroHeight:()=>t2,index:()=>tF,innerHeight:()=>rs,innerWidth:()=>ra,isBottomMostColumnHeader:()=>tB,isChildOf:()=>tD,isDetached:()=>rT,isHTMLElement:()=>rx,isHTMLInputElement:()=>rk,isHTMLTableCellElement:()=>rO,isInput:()=>rv,isInternalElement:()=>tI,isOutsideInput:()=>rR,isShadowRoot:()=>r_,isVisible:()=>t1,makeElementContentEditableAndSelectItsContent:()=>rM,matchesCSSRules:()=>rn,observeVisibilityChangeOnce:()=>rA,offset:()=>t3,outerHeight:()=>ri,outerWidth:()=>ro,overlayContainsElement:()=>tV,removeAttribute:()=>tY,removeClass:()=>t$,removeContentEditableFromElementAndDeselect:()=>rN,removeEvent:()=>rh,removeTextNodes:()=>tq,resetCssTransform:()=>rS,runWithSelectedContendEditableElement:()=>rI,selectElementIfAllowed:()=>rE,setAttribute:()=>tj,setCaretPosition:()=>rp,setOverlayPosition:()=>ry});var p={};r.r(p),r.d(p,{curry:()=>rU,curryRight:()=>rz,debounce:()=>rF,fastCall:()=>rW,isFunction:()=>rL,partial:()=>rB,pipe:()=>rV,throttle:()=>rP,throttleAfterHits:()=>rD});var m={};r.r(m),r.d(m,{KEY_CODES:()=>rG,isCtrlKey:()=>rq,isCtrlMetaKey:()=>rK,isFunctionKey:()=>rY,isKey:()=>rX,isPrintableChar:()=>rj});var f={};r.r(f),r.d(f,{isImmediatePropagationStopped:()=>rZ,isLeftClick:()=>r0,isMiddleClick:()=>r1,isRightClick:()=>rJ,isTouchEvent:()=>r2,offsetRelativeTo:()=>r3,stopImmediatePropagation:()=>rQ});var C={};r.r(C),r.d(C,{_dataToHTML:()=>nS,htmlToGridSettings:()=>nA,instanceToHTML:()=>nw,replaceTdCellsWithTextContent:()=>nT});var b={};r.r(b),r.d(b,{clamp:()=>nL,getParsedNumber:()=>nP,isCommaThousandsGroupedInteger:()=>nI,isDotThousandsGroupedFloat:()=>nO,isDotThousandsGroupedInteger:()=>nx,isNumeric:()=>nM,isNumericLike:()=>nN,isUnsignedNumber:()=>nD,rangeEach:()=>nk,rangeEachReverse:()=>n_,valueAccordingPercent:()=>nH});var y={};r.r(y),r.d(y,{cloneRow:()=>iV,countFirstRowKeys:()=>iP,createEmptySpreadsheetData:()=>i_,createSpreadsheetData:()=>iO,createSpreadsheetObjectData:()=>ik,dataRowToChangesArray:()=>iH,hasChangeForCell:()=>iL,isArrayOfArrays:()=>iD,isArrayOfObjects:()=>iF,spreadsheetColumnIndex:()=>ix,spreadsheetColumnLabel:()=>iI});var w={};r.r(w),r.d(w,{CANCEL:()=>sn,CHECKBOX_CHECKED:()=>aP,CHECKBOX_RENDERER_NAMESPACE:()=>aL,CHECKBOX_UNCHECKED:()=>aD,COMMON_NAMESPACE:()=>st,CONTEXTMENU_ITEMS_ADD_COMMENT:()=>sN,CONTEXTMENU_ITEMS_ALIGNMENT:()=>sk,CONTEXTMENU_ITEMS_ALIGNMENT_BOTTOM:()=>sV,CONTEXTMENU_ITEMS_ALIGNMENT_CENTER:()=>sH,CONTEXTMENU_ITEMS_ALIGNMENT_JUSTIFY:()=>sP,CONTEXTMENU_ITEMS_ALIGNMENT_LEFT:()=>s_,CONTEXTMENU_ITEMS_ALIGNMENT_MIDDLE:()=>sF,CONTEXTMENU_ITEMS_ALIGNMENT_RIGHT:()=>sL,CONTEXTMENU_ITEMS_ALIGNMENT_TOP:()=>sD,CONTEXTMENU_ITEMS_BORDERS:()=>sB,CONTEXTMENU_ITEMS_BORDERS_BOTTOM:()=>sW,CONTEXTMENU_ITEMS_BORDERS_LEFT:()=>sG,CONTEXTMENU_ITEMS_BORDERS_RIGHT:()=>sz,CONTEXTMENU_ITEMS_BORDERS_TOP:()=>sU,CONTEXTMENU_ITEMS_CLEAR_COLUMN:()=>sm,CONTEXTMENU_ITEMS_COPY:()=>sf,CONTEXTMENU_ITEMS_COPY_COLUMN_HEADERS_ONLY:()=>sy,CONTEXTMENU_ITEMS_COPY_WITH_COLUMN_GROUP_HEADERS:()=>sb,CONTEXTMENU_ITEMS_COPY_WITH_COLUMN_HEADERS:()=>sC,CONTEXTMENU_ITEMS_CUT:()=>sw,CONTEXTMENU_ITEMS_EDIT_COMMENT:()=>sI,CONTEXTMENU_ITEMS_EXPORT:()=>sS,CONTEXTMENU_ITEMS_EXPORT_FILE_CSV:()=>sv,CONTEXTMENU_ITEMS_EXPORT_FILE_XLSX:()=>sR,CONTEXTMENU_ITEMS_FREEZE_COLUMN:()=>sE,CONTEXTMENU_ITEMS_HIDE_COLUMN:()=>sq,CONTEXTMENU_ITEMS_HIDE_ROW:()=>sX,CONTEXTMENU_ITEMS_INSERT_LEFT:()=>sl,CONTEXTMENU_ITEMS_INSERT_RIGHT:()=>sh,CONTEXTMENU_ITEMS_MERGE_CELLS:()=>sA,CONTEXTMENU_ITEMS_NESTED_ROWS_DETACH_CHILD:()=>sY,CONTEXTMENU_ITEMS_NESTED_ROWS_INSERT_CHILD:()=>sj,CONTEXTMENU_ITEMS_NO_ITEMS:()=>si,CONTEXTMENU_ITEMS_READ_ONLY:()=>sp,CONTEXTMENU_ITEMS_READ_ONLY_COMMENT:()=>sO,CONTEXTMENU_ITEMS_REDO:()=>sg,CONTEXTMENU_ITEMS_REMOVE_BORDERS:()=>s$,CONTEXTMENU_ITEMS_REMOVE_COLUMN:()=>su,CONTEXTMENU_ITEMS_REMOVE_COMMENT:()=>sx,CONTEXTMENU_ITEMS_REMOVE_ROW:()=>sd,CONTEXTMENU_ITEMS_ROW_ABOVE:()=>ss,CONTEXTMENU_ITEMS_ROW_BELOW:()=>sa,CONTEXTMENU_ITEMS_SHOW_COLUMN:()=>sK,CONTEXTMENU_ITEMS_SHOW_ROW:()=>sQ,CONTEXTMENU_ITEMS_UNDO:()=>sc,CONTEXTMENU_ITEMS_UNFREEZE_COLUMN:()=>sT,CONTEXTMENU_ITEMS_UNMERGE_CELLS:()=>sM,CONTEXT_MENU_ITEMS_NAMESPACE:()=>so,DATA_PROVIDER_BUTTONS_REFETCH:()=>a6,DATA_PROVIDER_ERRORS_CREATE:()=>a0,DATA_PROVIDER_ERRORS_FETCH:()=>aJ,DATA_PROVIDER_ERRORS_REMOVE:()=>a2,DATA_PROVIDER_ERRORS_REQUEST_FAILED:()=>a3,DATA_PROVIDER_ERRORS_UPDATE:()=>a1,DATA_PROVIDER_NAMESPACE:()=>aZ,EMPTY_DATA_STATE_BUTTONS_FILTERS_RESET:()=>aK,EMPTY_DATA_STATE_DESCRIPTION:()=>aj,EMPTY_DATA_STATE_DESCRIPTION_FILTERS:()=>aq,EMPTY_DATA_STATE_DESCRIPTION_LOADING:()=>aQ,EMPTY_DATA_STATE_NAMESPACE:()=>aG,EMPTY_DATA_STATE_TITLE:()=>a$,EMPTY_DATA_STATE_TITLE_FILTERS:()=>aY,EMPTY_DATA_STATE_TITLE_LOADING:()=>aX,EXPORT_FILE_DIALOG_TITLE:()=>aW,EXPORT_FILE_NAMESPACE:()=>az,FILTERS_BUTTONS_CANCEL:()=>aS,FILTERS_BUTTONS_CLEAR:()=>ay,FILTERS_BUTTONS_OK:()=>aw,FILTERS_BUTTONS_PLACEHOLDER_SEARCH:()=>av,FILTERS_BUTTONS_PLACEHOLDER_SECOND_VALUE:()=>aE,FILTERS_BUTTONS_PLACEHOLDER_VALUE:()=>aR,FILTERS_BUTTONS_SELECT_ALL:()=>ab,FILTERS_CONDITIONS_AFTER:()=>as,FILTERS_CONDITIONS_AFTER_OR_EQUAL:()=>aa,FILTERS_CONDITIONS_BEFORE:()=>al,FILTERS_CONDITIONS_BEFORE_OR_EQUAL:()=>ah,FILTERS_CONDITIONS_BEGINS_WITH:()=>s5,FILTERS_CONDITIONS_BETWEEN:()=>ao,FILTERS_CONDITIONS_BY_VALUE:()=>s8,FILTERS_CONDITIONS_CONTAINS:()=>s9,FILTERS_CONDITIONS_EMPTY:()=>s1,FILTERS_CONDITIONS_ENDS_WITH:()=>s4,FILTERS_CONDITIONS_EQUAL:()=>s3,FILTERS_CONDITIONS_GREATER_THAN:()=>ae,FILTERS_CONDITIONS_GREATER_THAN_OR_EQUAL:()=>at,FILTERS_CONDITIONS_LESS_THAN:()=>ar,FILTERS_CONDITIONS_LESS_THAN_OR_EQUAL:()=>an,FILTERS_CONDITIONS_NAMESPACE:()=>sJ,FILTERS_CONDITIONS_NONE:()=>s0,FILTERS_CONDITIONS_NOT_BETWEEN:()=>ai,FILTERS_CONDITIONS_NOT_CONTAIN:()=>s7,FILTERS_CONDITIONS_NOT_EMPTY:()=>s2,FILTERS_CONDITIONS_NOT_EQUAL:()=>s6,FILTERS_CONDITIONS_TODAY:()=>ad,FILTERS_CONDITIONS_TOMORROW:()=>au,FILTERS_CONDITIONS_YESTERDAY:()=>ac,FILTERS_DIVS_FILTER_BY_CONDITION:()=>ag,FILTERS_DIVS_FILTER_BY_VALUE:()=>ap,FILTERS_LABELS_CONJUNCTION:()=>am,FILTERS_LABELS_DISJUNCTION:()=>af,FILTERS_NAMESPACE:()=>sZ,FILTERS_VALUES_BLANK_CELLS:()=>aC,LOADING_NAMESPACE:()=>aF,LOADING_TITLE:()=>aV,NOTIFICATION_BUTTONS_CLOSE:()=>aU,NOTIFICATION_NAMESPACE:()=>aB,OK:()=>sr,PAGINATION_COUNTER_SECTION:()=>aI,PAGINATION_FIRST_PAGE:()=>aO,PAGINATION_LAST_PAGE:()=>aH,PAGINATION_NAMESPACE:()=>aT,PAGINATION_NAV_SECTION:()=>ax,PAGINATION_NEXT_PAGE:()=>a_,PAGINATION_PAGE_SIZE_AUTO:()=>aM,PAGINATION_PAGE_SIZE_SECTION:()=>aN,PAGINATION_PREV_PAGE:()=>ak,PAGINATION_SECTION:()=>aA});var S={};r.r(S),r.d(S,{ISO_DATE_REGEX:()=>dH,TIME_REGEX:()=>dF,getNormalizedDate:()=>dL,getRelativeLocalDate:()=>dz,getTodayLocalDate:()=>dU,isSameLocalDay:()=>dW,isValidISODate:()=>dD,isValidTime:()=>dB,parseToLocalDate:()=>dP,parseToLocalTime:()=>dV});let R=e=>["tabindex",e],E=()=>["role","presentation"],T=()=>["role","gridcell"],A=()=>["role","gridcell button"],M=()=>["role","rowheader"],N=()=>["role","rowgroup"],I=()=>["role","columnheader"],x=()=>["role","row"],O=()=>["role","listbox"],k=()=>["scope","col"],_=()=>["scope","row"],H=e=>["aria-label",e],L=()=>["aria-hidden","true"],P=function(){let e=!(arguments.length>0)||void 0===arguments[0]||arguments[0];return["aria-disabled",e]},D=e=>["aria-haspopup",e],F=e=>["aria-rowcount",e],V=e=>["aria-colcount",e],B=e=>["aria-rowindex",e],U=e=>["aria-colindex",e],z=e=>["aria-expanded",e],W=()=>["aria-readonly","true"],G=()=>["aria-invalid","true"],$=e=>["aria-checked",e],j=()=>["aria-selected","true"],Y=()=>["aria-busy","true"];function q(e){let t=e.length,r=0;for(;r<t;)e[r]=[e[r]],r+=1}function K(e,t){let r=t.length,n=0;for(;n<r;)e.push(t[n]),n+=1}function X(e){let t=[];if(!e||0===e.length||!e[0]||0===e[0].length)return t;let r=e.length,n=e[0].length;for(let o=0;o<r;o++)for(let r=0;r<n;r++)t[r]||(t[r]=[]),t[r][o]=e[o][r];return t}function Q(e,t,r,n){let o=-1,i=Array.isArray(e)?e:Array.from(e),s=i.length;n&&s&&(o+=1,r=i[o]);let a=r;for(o+=1;o<s;)a=t(a,i[o],o,i),o+=1;return a}function Z(e,t){let r=0,n=Array.isArray(e)?e:Array.from(e),o=n.length,i=[],s=-1;for(;r<o;){let e=n[r];t(e,r,n)&&(i[s+=1]=e),r+=1}return i}function J(e,t){let r=0,n=Array.isArray(e)?e:Array.from(e),o=n.length,i=[],s=-1;for(;r<o;){let e=n[r];i[s+=1]=t(e,r,n),r+=1}return i}function ee(e,t){let r,n=0,o=(r=Array.isArray(e)?e:Array.from(e)).length;for(;n<o&&!1!==t(r[n],n,r);)n+=1;return r}function et(e){return Q(e,(e,t)=>e+t,0)}function er(e){return Q(e,(e,t)=>void 0!==e&&e>t?e:t,e[0])}function en(e){return Q(e,(e,t)=>void 0!==e&&e<t?e:t,e[0])}function eo(e){return e.length?et(e)/e.length:0}function ei(e){let t=[];return ee(e,e=>{-1===t.indexOf(e)&&t.push(e)}),t}function es(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];let[n,...o]=[...t],i=n;return ee(o,e=>{i=i.filter(t=>!e.includes(t))}),i}function ea(){let e;for(var t=arguments.length,r=Array(t),n=0;n<t;n++)r[n]=arguments[n];let o=[];ee(r,(t,n)=>{"function"==typeof t?n===r.length-1&&(e=t):o.push(t)});let i=e?(t,r)=>r.some(r=>e(t,r)):(e,t)=>t.includes(e),[s,...a]=o,l=s;return ee(a,e=>{l=l.filter(t=>i(t,e))}),l}function el(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];let[n,...o]=[...t],i=new Set(n);return ee(o,e=>{ee(e,e=>{i.has(e)||i.add(e)})}),Array.from(i)}function eh(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:" ";return e.split(t)}function ed(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:" ";return e.join(t)}function eu(e){for(var t=arguments.length,r=Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];return Q(Array.from(e),(e,t,n)=>e+t.replace(/\r?\n\s*/g,"")+(r[n]?r[n]:""),"").trim()}function ec(e){for(var t=arguments.length,r=Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];let o=document.createElement("template");o.innerHTML=Array.from(e).reduce((e,t,n)=>e+t+(r[n]??""),"");let i=o.content.cloneNode(!0),s={};return i.querySelectorAll("[data-ref]").forEach(e=>{let t=e.dataset.ref??null;delete e.dataset.ref,null!==t&&(s[t]=e)}),{fragment:i,refs:s}}function eg(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 ep(e){return void 0!==e}function em(e){return void 0===e}function ef(e){return null===e||""===e||em(e)}function eC(e){return"[object RegExp]"===Object.prototype.toString.call(e)}let eb="length",ey=e=>parseInt(e,16),ew=e=>parseInt(e,10),eS=(e,t,r)=>e.substr(t,r),ev=e=>(e.codePointAt(0)??0)-65,eR=e=>`${e}`.replace(/\-/g,""),eE=!1,eT={invalid:()=>eu`
|
|
32
32
|
The license key for Handsontable is invalid.\x20
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
Alternatively, you can activate Handsontable to use for non-commercial purposes by\x20
|
|
50
50
|
passing the key: 'non-commercial-and-evaluation'.\x20
|
|
51
51
|
<a href="https://handsontable.com/docs/tutorial-license-key.html" target="_blank">Read more</a> about it in\x20
|
|
52
|
-
the documentation or contact us at <a href="mailto:support@handsontable.com">support@handsontable.com</a>.`,non_commercial:()=>""};function eM(e){let t,{className:r,key:n,element:o,releaseDate:i}=e,s=!ef(n),a="string"==typeof n&&("non-commercial-and-evaluation"===n.toLowerCase()||"ht68e-1f2b7-47158-70b05-0842f"===n.toLowerCase()),l="18.0.0-rc5",h="invalid",d="invalid",u=function(e){let t=[][eb],r=t;if(e[eb]!==ev("Z"))return!1;for(let t="",n="B<H4P+".split(""),o=ev(n.shift()??"A");o;o=ev(n.shift()??"A"))--o<""[eb]?r|=(ew(`${ew(ey(t)+(ey(eS(e,Math.abs(o),2))+String([])).padStart(2,"0"))}`)%97||2)>>1:t=eS(e,o,o?1===n[eb]?9:8:6);return r===t}(n=eR(n||""));if(a)h="non_commercial",d="valid";else if(s||u)if(u){let e,[r,o,s]=(i??"25/06/2026"??"").split("/").map(Number),a=Math.floor(Date.UTC(s,o-1,r)/864e5),l=ey(eS(eR(e=n),ey("12"),ev("F")))/(ey(eS(eR(e),ev("B"),~~![][eb]))||9);t=new Intl.DateTimeFormat("en-US",{year:"numeric",month:"long",day:"2-digit",timeZone:"UTC"}).format((l+1)*864e5),a>l?(h="expired",d="expired"):(h="valid",d="valid")}else h="invalid",d="invalid";else h="missing",d="missing";if("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)&&(h="valid",d="valid"),eE||"valid"===h||(eT[h]({keyValidityDate:t,hotVersion:l})&&console["non_commercial"===h?"info":"warn"](eT[h]({keyValidityDate:t,hotVersion:l})),eE=!0),"valid"!==d&&o&&eA[d]({keyValidityDate:t,hotVersion:l})){let e=document.createElement("div"),n=document.createElement("div");return e.className=`handsontable ${r}`,n.className=`${r}_inner`,n.innerHTML=eA[d]({keyValidityDate:t,hotVersion:l}),e.appendChild(n),o.appendChild(e),e}return null}function eN(e){throw Error(e,{cause:{handsontable:!0}})}function eI(e){let t;if(Array.isArray(e))t=e.length?Array(e.length).fill(null):[];else{let r=Object.create(null);eB(e,(e,t)=>{"__children"!==t&&(e&&"object"==typeof e&&!Array.isArray(e)?r[t]=eI(e):Array.isArray(e)?e.length&&"object"==typeof e[0]&&!Array.isArray(e[0])?r[t]=[eI(e[0])]:r[t]=[]:r[t]=null)}),t=r}return t}function ex(e,t){return t.prototype.constructor=t,e.prototype=new t,e.prototype.constructor=e,e}function eO(e,t,r){let n=Array.isArray(r);return eB(t,(t,o)=>{"__proto__"!==o&&"constructor"!==o&&"prototype"!==o&&(!1===n||r.includes(o))&&(e[o]=t)}),e}function ek(e,t){eB(t,(r,n)=>{if("__proto__"===n||"constructor"===n||"prototype"===n)return;let o=t[n];o&&"object"==typeof o?(e[n]||(Array.isArray(o)?e[n]=[]:"[object Date]"===Object.prototype.toString.call(o)?e[n]=o:e[n]={}),ek(e[n],o)):e[n]=o})}function e_(e){if(Array.isArray(e))return e.map(e=>e_(e));if(e instanceof Date)return new Date(e);if("object"==typeof e&&null!==e){let t={};for(let[r,n]of Object.entries(e))"__proto__"!==r&&"constructor"!==r&&"prototype"!==r&&(t[r]=e_(n));return t}return e}function eH(e){let t={};return eB(e,(e,r)=>{t[r]=e}),t}function eL(e){for(var t=arguments.length,r=Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];return e.MIXINS||(e.MIXINS=[]),ee(r,t=>{e.MIXINS.push(t.MIXIN_NAME),eB(t,(t,r)=>{if(void 0!==e.prototype[r]&&eN(`Mixin conflict. Property '${r}' already exist and cannot be overwritten.`),"function"==typeof t)e.prototype[r]=t;else{let n,o;Object.defineProperty(e.prototype,r,{get:(n=`_${r}`,function(){let e;return void 0===this[n]&&(this[n]=((Array.isArray(e=t)||eF(e))&&(e=e_(e)),e)),this[n]}),set:(o=`_${r}`,function(e){this[o]=e}),configurable:!0})}})}),e}function eP(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)=>{let[r]=e,[n]=t;return r.localeCompare(n)}).map(e=>{let[t,n]=e;return`${JSON.stringify(t)}:${r(n)}`});return`{${t.join(",")}}`}return JSON.stringify(e)};return r(e)===r(t)}function eD(e){return eF(e)}function eF(e){return"[object Object]"===Object.prototype.toString.call(e)}function eV(e,t,r,n){n.value=r,n.writable=!1!==n.writable,n.enumerable=!1!==n.enumerable,n.configurable=!1!==n.configurable,Object.defineProperty(e,t,n)}function eB(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 eU(e,t){let r=t.split("."),n=e;for(let e of r)if(void 0===(n=n[e]))return;return n}function ez(e,t,r){if("string"!=typeof t||null===e||"object"!=typeof e)return;let n=t.split("."),o=e;for(let e=0;e<n.length;e+=1){let t=n[e];if("__proto__"===t||"constructor"===t||"prototype"===t)return;if(e!==n.length-1){e$(o,t)||(o[t]={});let e=o[t];if(!eF(e))return;o=e}else Object.defineProperty(o,t,{value:r,writable:!0,enumerable:!0,configurable:!0})}}function eW(e){if(!eF(e))return 0;let t=function(e){let r=0;return eF(e)?eB(e,(e,n)=>{"__children"!==n&&(r+=t(e))}):r+=1,r};return t(e)}function eG(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"value",r=`_${t}`,n={_touched:!1,[r]:e,isTouched(){return!!this._touched},value:void 0};return Object.defineProperty(n,t,{get(){return this[r]},set(e){this._touched=!0,this[r]=e},enumerable:!0,configurable:!0}),n}function e$(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function ej(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(n=>{let o=t[n],i=e[n];eF(o)?r[n]=ej(eF(i)?i:{},o):r[n]=e$(e,n)&&void 0!==i?i:o}),Object.keys(e).forEach(t=>{e$(r,t)||(r[t]=e[t])}),r}function eY(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r={...e};return Object.keys(t).forEach(e=>{if("__proto__"===e||"constructor"===e||"prototype"===e)return;let n=t[e],o=r[e];eF(n)&&eF(o)?r[e]=eY(o,n):r[e]=n}),r}function eq(e){return eF(e)&&ep(e.key)&&ep(e.value)}function eK(e){return window.requestAnimationFrame(e)}function eX(e){window.cancelAnimationFrame(e)}function eQ(){return"ontouchstart"in window}function eZ(){return"u">typeof window}function eJ(t){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};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 e0=e=>{let t={value:!1,test(r,n){t.value=e(r,n)}};return t},e1={chrome:e0((e,t)=>/Chrome/.test(e)&&/Google/.test(t??"")),chromeWebKit:e0(e=>/CriOS/.test(e)),edge:e0(e=>/Edge/.test(e)),edgeWebKit:e0(e=>/EdgiOS/.test(e)),firefox:e0(e=>/Firefox/.test(e)),firefoxWebKit:e0(e=>/FxiOS/.test(e)),mobile:e0(e=>/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(e)),safari:e0((e,t)=>/Safari/.test(e)&&/Apple Computer/.test(t??"")),safariBefore261:e0((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})},e2={mac:e0(e=>/^Mac/.test(e)),win:e0(e=>/^Win/.test(e)),linux:e0(e=>/^Linux/.test(e)),ios:e0(e=>/iPhone|iPad|iPod/i.test(e))};function e3(){let{userAgent:e=navigator.userAgent,vendor:t=navigator.vendor}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};eB(e1,r=>{let{test:n}=r;return n(e,t)})}function e6(){let{platform:e=navigator.platform}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};eB(e2,t=>{let{test:r}=t;return r(e)})}function e5(){return e1.chrome.value}function e4(){return e1.chromeWebKit.value}function e9(){return e1.firefox.value}function e7(){return e1.firefoxWebKit.value}function e8(){return e1.safari.value}function te(){return e1.safariBefore261.value}function tt(){return e1.edge.value}function tr(){return e1.edgeWebKit.value}function tn(){return e1.mobile.value}function to(){return e2.ios.value}function ti(){let{maxTouchPoints:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:navigator;return(e??0)>2&&e2.mac.value}function ts(){return e2.win.value}function ta(){return e2.mac.value}function tl(){return e2.linux.value}function th(e){return e[0].toUpperCase()+e.substr(1)}function td(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];let n=[],o=t.length;for(;o;){let e=eg(t[o-=1]).toLowerCase();-1===n.indexOf(e)&&n.push(e)}return 1===n.length}function tu(){let e=new Uint16Array(4);return globalThis.crypto.getRandomValues(e),Array.from(e,e=>e.toString(16).padStart(4,"0")).join("")}function tc(e){if("string"!=typeof e)return!1;try{let t=JSON.parse(e);return"object"==typeof t&&null!==t}catch{return!1}}function tg(e){return/^(?:\d\d?%|100%)$/.test(e)}function tp(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return`${e}`.replace(/(?:\\)?\[([^[\]]+)]/g,(e,r)=>"\\"===e.charAt(0)?e.substr(1,e.length-1):void 0===t[r]?"":String(t[r]))}function tm(e){let t=String(e),r="",n=0,o=!1,i="";for(let e=0;e<t.length;e++){let s=t[e];n>0&&!o&&('"'===s||"'"===s)?(o=!0,i=s):o&&s===i?o=!1:o||"<"!==s?!o&&">"===s&&n>0?n-=1:0===n&&(r+=s):n+=1}return r}function tf(e){return e}function tC(e){return"string"!=typeof e?e:e.replace(/([A-Z])/g,"-$1").replaceAll("_","-").toLowerCase()}eZ()&&(e3(),e6());let tb="Iİ\xcc\xcdĨ",ty=tb.toLowerCase(),tw=new Map;function tS(e,t){return!function(e){let t,r=tw.get(e);if(void 0!==r)return r;try{t=tb.toLocaleLowerCase(e)!==ty}catch{t=!1}return tw.set(e,t),t}(t)?e.toLowerCase():e.toLocaleLowerCase(t)}function tv(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];ep(console)&&console.log(...t)}function tR(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];ep(console)&&console.warn(...t)}let tE=new WeakMap;function tT(e,t){for(var r=arguments.length,n=Array(r>2?r-2:0),o=2;o<r;o++)n[o-2]=arguments[o];let i=tE.get(e);void 0===i&&(i=new Set,tE.set(e,i)),i.has(t)||(i.add(t),tR(...n))}function tA(e){ep(console)&&console.warn(`Deprecated: ${e}`)}function tM(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];ep(console)&&console.error(...t)}function tN(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=-1,n=null,o=e;for(;null!==o;){if(r===t){n=rx(o)?o:null;break}r_(o)?o=o.host:(r+=1,o=o.parentNode)}return n}function tI(e,t){let r=e.closest(".handsontable");return!!r&&(r.parentNode===t||r===t)}function tx(e){return e.target}function tO(e){let{frameElement:t}=e;return e.parent&&Object.getPrototypeOf(e.parent)&&t instanceof HTMLIFrameElement?t:null}function tk(e){return tO(e)?e.parent:null}function t_(e){return!!Object.getPrototypeOf(e.parent)}function tH(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=arguments.length>2?arguments[2]:void 0,{ELEMENT_NODE:n,DOCUMENT_FRAGMENT_NODE:o}=Node,i=e;for(;null!=i&&i!==r;){let{nodeType:e,nodeName:r}=i;if(e===n&&rx(i)&&(t.includes(r)||t.includes(i)))return i;i=r_(i)?i.host:i.parentNode}return null}function tL(e,t,r){let n=[],o=rx(e)?e:null;for(;o&&(o=tH(o,t,r))&&(!r||r.contains(o));)if(n.push(o),r_(o)){let{host:e}=o;o=rx(e)?e:null}else o=o.parentElement;let i=n.length;return i?n[i-1]:null}function tP(e,t){let r={element:void 0,classNames:[]},n=e;for(;null!==n&&n!==e.ownerDocument.documentElement&&!r.element;){if("string"==typeof t&&n.classList.contains(t))r.element=n,r.classNames.push(t);else if(t instanceof RegExp){let e=Array.from(n.classList).filter(e=>t.test(e));e.length&&(r.element=n,r.classNames.push(...e))}n=n.parentElement}return r}function tD(e,t){let r=e.parentNode,n=[];for("string"==typeof t?n=e instanceof Document?Array.from(e.querySelectorAll(t)):Array.from(e.ownerDocument.querySelectorAll(t)):n.push(t);null!==r;){if(n.indexOf(r)>-1)return!0;r=r.parentNode}return!1}function tF(e){let t=0,r=e;if(r.previousSibling)for(;r=r.previousSibling;)t+=1;return t}function tV(e,t,r){let n=r.parentElement?.querySelector(`.ht_clone_${e}`);return!!n&&n.contains(t)}function tB(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 tU(e){return e&&e.length?e.filter(e=>!!e):[]}function tz(e,t){if(!e||!e.length)return t?{regexFree:[],regexes:[]}:[];let r=[],n=[];return n.push(...e.filter(e=>{let n=e instanceof RegExp;return n&&t&&r.push(e),!n})),t?{regexFree:n,regexes:r}:n}function tW(e,t){return void 0!==e.classList&&"string"==typeof t&&""!==t&&e.classList.contains(t)}function tG(e,t){"string"==typeof t&&(t=t.split(" ")),(t=tU(t)).length>0&&e.classList.add(...t)}function t$(e,t){"string"==typeof t?t=t.split(" "):t instanceof RegExp&&(t=[t]);let{regexFree:r,regexes:n}=tz(t,!0);(r=tU(r)).length>0&&e.classList.remove(...r),n.forEach(t=>{e.classList.forEach(r=>{t.test(r)&&e.classList.remove(r)})})}function tj(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=arguments.length>2?arguments[2]:void 0;Array.isArray(t)||(t=[[t,r??""]]),t.forEach(t=>{Array.isArray(t)&&""!==t[0]&&e.setAttribute(t[0],String(t[1]))})}function tY(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];"string"==typeof t?t=t.split(" "):t instanceof RegExp&&(t=[t]);let{regexFree:r,regexes:n}=tz(t,!0);if(r.forEach(t=>{""!==t&&e.removeAttribute(t)}),n.length>0){let t=e.getAttributeNames();for(let r=0;r<t.length;r++){let o=t[r];for(let t=0;t<n.length;t++)if(n[t].test(o)){e.removeAttribute(o);break}}}}function tq(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--)tq(t[e])}}function tK(e){let t;for(;t=e.lastChild;)e.removeChild(t)}let tX=/(<([^>]*)>|&([^;]*);)/,tQ="sanitizer",tZ={};function tJ(e,t){let r=!(arguments.length>2)||void 0===arguments[2]||arguments[2],n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"innerHTML",o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:tZ;if(tX.test(t)){let i;"function"==typeof r?i=r(t,n):(!1!==r&&tT(o,tQ,`HTML content is being written to the DOM ("${n}") without a sanitizer. Configure the "sanitizer" option to prevent XSS vulnerabilities.`),i=t),e.innerHTML=i}else t0(e,t)}function t0(e,t){let r=e.firstChild;r&&3===r.nodeType&&null===r.nextSibling?r.textContent=t:(tK(e),e.appendChild(e.ownerDocument.createTextNode(t)))}function t1(e){if("function"==typeof e.checkVisibility)return e.checkVisibility();let t=e.ownerDocument.documentElement,r=e.ownerDocument.defaultView,n=e;for(;n!==t;){if(null===n)return!1;if(r_(n)){let e=n.host;if(e.impl)return t1(e.impl);return t1(e)}if(n.nodeType===Node.DOCUMENT_FRAGMENT_NODE)return!1;else if(n.nodeType===Node.ELEMENT_NODE&&rx(n)&&r?.getComputedStyle(n).display==="none")return!1;n=n.parentNode}return!0}function t2(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 t3(e){let t,r,n,o=e.ownerDocument,i=o.defaultView,s=o.documentElement,a=e;for(t=a.offsetLeft,r=a.offsetTop,n=a;(a=rx(a.offsetParent)?a.offsetParent:null)&&a!==o.body&&"offsetLeft"in a;)t+=a.offsetLeft,r+=a.offsetTop,n=a;return n&&"fixed"===n.style.position&&(t+=(i?.pageXOffset??0)||s.scrollLeft,r+=(i?.pageYOffset??0)||s.scrollTop),{left:t,top:r}}function t6(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window;return e.scrollY}function t5(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window;return e.scrollX}function t4(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:window;return e instanceof Window?t6(t):e.scrollTop}function t9(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:window;return e instanceof Window?t5(t):e.scrollLeft}function t7(e){let t=e.ownerDocument,r=t.defaultView,n=["auto","scroll"],o=e.parentElement;for(;o&&o.style&&t.body!==o;){let{overflow:e,overflowX:t,overflowY:i}=o.style;if([e,t,i].includes("scroll")||(r&&({overflow:e,overflowX:t,overflowY:i}=r.getComputedStyle(o)),n.includes(e)||n.includes(t)||n.includes(i))||o.clientHeight<=o.scrollHeight+1&&(n.includes(i)||n.includes(e))||o.clientWidth<=o.scrollWidth+1&&(n.includes(t)||n.includes(e)))return o;o=o.parentElement}return r??t.documentElement}function t8(e){return e.scrollHeight-e.clientHeight}function re(e){return e.scrollWidth-e.clientWidth}function rt(e){let t=e.ownerDocument,r=t.defaultView,n=e.parentElement;for(;n&&n.style&&t.body!==n;){if("visible"!==n.style.overflow&&""!==n.style.overflow)return n;if(r){let e=r.getComputedStyle(n),t=["scroll","hidden","auto","clip"],o=e.getPropertyValue("overflow"),i=e.getPropertyValue("overflow-y"),s=e.getPropertyValue("overflow-x");if(t.includes(o)||t.includes(i)||t.includes(s))return n}n=n.parentElement}return r??t.documentElement}function rr(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:window;if(!e)return;if(e instanceof Window)return"width"===t?`${e.innerWidth}px`:"height"===t?`${e.innerHeight}px`:void 0;let n=e.style.getPropertyValue(t)||e.style[t];if(""!==n&&void 0!==n)return n;let o=r.getComputedStyle(e),i=o.getPropertyValue(t)||o[t];if(""!==i&&void 0!==i)return i}function rn(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 ro(e){return e.offsetWidth}function ri(e){return e.offsetHeight}function rs(e){return e instanceof Window?e.innerHeight:e.clientHeight}function ra(e){return e instanceof Window?e.innerWidth:e.clientWidth}function rl(e,t,r){e.addEventListener(t,r,!1)}function rh(e,t,r){e.removeEventListener(t,r,!1)}function rd(e){return e.selectionStart?e.selectionStart:0}function ru(e){return e.selectionEnd?e.selectionEnd:0}function rc(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window,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 rg(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window;if(e.getSelection){let t=e.getSelection();t?.empty?t.empty():t?.removeAllRanges&&t.removeAllRanges()}}function rp(e,t,r){if(void 0===r&&(r=t),e.setSelectionRange){e.focus();try{e.setSelectionRange(t,r)}catch(o){let n=e.parentElement;if(n){let o=n.style.display;n.style.display="block",e.setSelectionRange(t,r),n.style.display=o}}}}function rm(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document;return ts()?2*!Number.isInteger(e.defaultView?.devicePixelRatio||1):0}function rf(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document;return void 0===t&&(t=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document,t=function(){let t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],r=e.createElement("div");r.style.height="200px",r.style.width="100%";let n=e.createElement("div");n.classList.add("htScrollbarTest"),t&&n.classList.add("htScrollbarSafariTest"),n.style.boxSizing="content-box",n.style.height="150px",n.style.left="0px",n.style.overflow="hidden",n.style.position="absolute",n.style.top="0px",n.style.width="200px",n.style.visibility="hidden",n.appendChild(r),e.body.appendChild(n);let o=r.offsetWidth;n.style.overflow="scroll";let i=r.offsetWidth;return o===i&&(i=n.clientWidth),e.body.removeChild(n),o-i},r=t();return 0===r&&te()&&!tn()&&!ti()?t(!0):r}(e)),t}function rC(e){return e instanceof Window?e.document.body.scrollHeight>e.innerHeight:e.offsetWidth!==e.clientWidth}function rb(e){return e instanceof Window?e.document.body.scrollWidth>e.innerWidth:e.offsetHeight!==e.clientHeight}function ry(e,t,r){e.style.transform=`translate3d(${t},${r},0)`}function rw(e){let t;return e.style.transform&&""!==(t=e.style.transform)?["transform",t]:-1}function rS(e){e.style.transform&&""!==e.style.transform&&(e.style.transform="")}function rv(e){return e&&(["INPUT","SELECT","TEXTAREA"].indexOf(e.nodeName)>-1||"true"===e.contentEditable)}function rR(e){return rv(e)&&"hotInput"in e.dataset==!1}function rE(e){let t=e.ownerDocument.activeElement;rx(t)&&!rR(t)&&(e instanceof HTMLInputElement||e instanceof HTMLTextAreaElement)&&e.select()}function rT(e){return!e.parentNode}function rA(e,t){new IntersectionObserver((e,r)=>{e.forEach(e=>{e.isIntersecting&&(t(),r.disconnect())})}).observe(e)}function rM(e){let t=!(arguments.length>1)||void 0===arguments[1]||arguments[1],r=!(arguments.length>2)||void 0===arguments[2]||arguments[2],n=e.ownerDocument,o=n.createRange(),i=n.defaultView?.getSelection();if(tj(e,"contenteditable",!0),r){let t=L();tj(e,t[0],t[1])}t&&tG(e,"invisibleSelection"),o.selectNodeContents(e),i?.removeAllRanges(),i?.addRange(o)}function rN(e){let t=!(arguments.length>1)||void 0===arguments[1]||arguments[1],r=e.ownerDocument.defaultView?.getSelection();e.hasAttribute("aria-hidden")&&e.removeAttribute("aria-hidden"),r?.removeAllRanges(),t&&t$(e,"invisibleSelection"),e.removeAttribute("contenteditable")}function rI(e,t){let r=!(arguments.length>2)||void 0===arguments[2]||arguments[2];rM(e,r),t(),rN(e,r)}function rx(e){if("object"!=typeof e||null===e)return!1;let t=e.ownerDocument?.defaultView?.Element;return!!(t&&e instanceof t)}function rO(e){return rx(e)&&("TD"===e.tagName||"TH"===e.tagName)}function rk(e){return"INPUT"===e.tagName}function r_(e){return e.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&"host"in e}function rH(e,t){return e.childNodes[t]||null}function rL(e){return"function"==typeof e}function rP(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:200,r=0,n={lastCallThrottled:!0},o=null;return function(){for(var i=arguments.length,s=Array(i),a=0;a<i;a++)s[a]=arguments[a];let l=Date.now(),h=!1;n.lastCallThrottled=!0,r||(r=l,h=!0);let d=t-(l-r);return h?(n.lastCallThrottled=!1,e.apply(this,s)):(o&&clearTimeout(o),o=setTimeout(()=>{n.lastCallThrottled=!1,e.apply(this,s),r=0,o=null},d)),n}}function rD(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:200,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:10,n=rP(e,t),o=r;function i(){for(var t=arguments.length,r=Array(t),i=0;i<t;i++)r[i]=arguments[i];return o?(o-=1,e.apply(this,r)):n.apply(this,r)}return i.clearHits=function(){o=r},i}function rF(e){let t,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:200,n=null;function o(){for(var o=arguments.length,i=Array(o),s=0;s<o;s++)i[s]=arguments[s];return n&&clearTimeout(n),n=setTimeout(()=>{n=null,t=e.apply(this,i)},r),t}return o.cancel=function(){null!==n&&(clearTimeout(n),n=null)},o}function rV(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];let[n,...o]=t;return function(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return Q(o,(e,t)=>t(e),n.apply(this,t))}}function rB(e){for(var t=arguments.length,r=Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];return function(){for(var t=arguments.length,n=Array(t),o=0;o<t;o++)n[o]=arguments[o];return e.apply(this,r.concat(n))}}function rU(e){let t=e.length;return function r(n){return function(){for(var o=arguments.length,i=Array(o),s=0;s<o;s++)i[s]=arguments[s];let a=n.concat(i);return a.length>=t?e.apply(this,a):r(a)}}([])}function rz(e){let t=e.length;return function r(n){return function(){for(var o=arguments.length,i=Array(o),s=0;s<o;s++)i[s]=arguments[s];let a=n.concat(i.reverse());return a.length>=t?e.apply(this,a):r(a)}}([])}function rW(e,t,r,n,o,i,s,a){if(ep(a))return e.call(t,r,n,o,i,s,a);if(ep(s))return e.call(t,r,n,o,i,s);if(ep(i))return e.call(t,r,n,o,i);if(ep(o))return e.call(t,r,n,o);if(ep(n))return e.call(t,r,n);else if(ep(r))return e.call(t,r);return e.call(t)}let rG={ALT:18,ARROW_DOWN:40,ARROW_LEFT:37,ARROW_RIGHT:39,ARROW_UP:38,AUDIO_DOWN:e9()?182:174,AUDIO_MUTE:e9()?181:173,AUDIO_UP:e9()?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},r$=[rG.ALT,rG.ARROW_DOWN,rG.ARROW_LEFT,rG.ARROW_RIGHT,rG.ARROW_UP,rG.AUDIO_DOWN,rG.AUDIO_MUTE,rG.AUDIO_UP,rG.BACKSPACE,rG.CAPS_LOCK,rG.DELETE,rG.END,rG.ENTER,rG.ESCAPE,rG.F1,rG.F2,rG.F3,rG.F4,rG.F5,rG.F6,rG.F7,rG.F8,rG.F9,rG.F10,rG.F11,rG.F12,rG.F13,rG.F14,rG.F15,rG.F16,rG.F17,rG.F18,rG.F19,rG.HOME,rG.INSERT,rG.MEDIA_NEXT,rG.MEDIA_PLAY_PAUSE,rG.MEDIA_PREV,rG.MEDIA_STOP,rG.NULL,rG.NUM_LOCK,rG.PAGE_DOWN,rG.PAGE_UP,rG.PAUSE,rG.SCROLL_LOCK,rG.SHIFT,rG.TAB];function rj(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 rY(e){return r$.includes(e)}function rq(e){let t=[];return ta()?t.push(rG.COMMAND_LEFT,rG.COMMAND_RIGHT,rG.COMMAND_FIREFOX):t.push(rG.CONTROL),t.includes(e)}function rK(e){return[rG.CONTROL,rG.COMMAND_LEFT,rG.COMMAND_RIGHT,rG.COMMAND_FIREFOX].includes(e)}function rX(e,t){let r=t.split("|"),n=!1;return ee(r,t=>{if(e===rG[t])return n=!0,!1}),n}function rQ(e){e.isImmediatePropagationEnabled=!1,e.cancelBubble=!0}function rZ(e){return!1===e.isImmediatePropagationEnabled}function rJ(e){return 2===e.button}function r0(e){return 0===e.button}function r1(e){return 1===e.button}function r2(e){return"u">typeof TouchEvent&&e instanceof TouchEvent}function r3(e,t){let r={x:e.offsetX,y:e.offsetY},n=tx(e);if(!rx(t)||n!==t&&n.contains(t))return r;for(;n!==t;)r.x+=n.offsetLeft,r.y+=n.offsetTop,n=n.offsetParent;return r}let r6=["afterCellMetaReset","afterChange","afterContextMenuDefaultOptions","beforeContextMenuSetItems","afterDropdownMenuDefaultOptions","beforeDropdownMenuSetItems","afterContextMenuHide","beforeContextMenuShow","afterContextMenuShow","afterCopyLimit","beforeCreateCol","afterColumnSequenceCacheUpdate","afterColumnSequenceChange","afterCreateCol","beforeCreateRow","afterCreateRow","beforeAlter","afterDeselect","afterDestroy","afterDocumentKeyDown","afterDrawSelection","beforeRemoveCellClassNames","beforeCompositionStart","afterGetCellMeta","afterGetColHeader","afterGetRowHeader","afterInit","afterLoadData","afterUpdateData","afterDataProviderFetch","afterDataProviderFetchError","afterDataProviderFetchAbort","hasExternalDataSource","beforeRowsMutation","afterRowsMutation","afterRowsMutationError","afterMomentumScroll","afterOnCellCornerMouseDown","afterOnCellCornerDblClick","afterOnCellMouseDown","afterOnCellMouseUp","afterOnCellContextMenu","afterOnCellMouseOver","afterOnCellMouseOut","afterOnCellMouseOverOutside","afterRemoveCol","afterRemoveRow","beforeRenderer","afterRenderer","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","beforeCellAlignment","beforeChange","beforeChangeRender","beforeHeightChange","beforeWidthChange","beforeDrawBorders","beforeGetCellMeta","beforeRemoveCellMeta","beforeInit","beforeInitWalkontable","beforeLoadData","beforeUpdateData","beforeDataProviderFetch","beforeKeyDown","beforeOnCellMouseDown","beforeOnCellMouseUp","beforeOnCellContextMenu","beforeOnCellMouseOver","beforeOnCellMouseOut","beforeOnCellMouseOverOutside","beforeRemoveCol","beforeRemoveRow","beforeViewRender","afterViewRender","beforeRender","afterRender","beforeRowWrap","beforeColumnWrap","beforeSetCellMeta","beforeSelectionFocusSet","beforeSetRangeStartOnly","beforeSetRangeStart","beforeSetRangeEnd","beforeSelectionHighlightSet","beforeTouchScroll","beforeValidate","beforeValueRender","construct","init","modifyColHeader","modifyColWidth","modifyFiltersMultiSelectValue","modifyFocusedElement","modifyRowHeader","modifyRowHeight","modifyRowHeightByOverlayName","modifyData","modifySourceData","modifyRowData","modifyGetCellCoords","modifyGetCoordsElement","modifyFocusOnTabNavigation","beforeHighlightingRowHeader","beforeHighlightingColumnHeader","beforeColumnSort","afterColumnSort","modifyAutofillRange","modifyCopyableRange","beforeCut","afterCut","beforeCopy","afterCopy","beforePaste","afterPaste","beforeColumnFreeze","afterColumnFreeze","beforeColumnMove","afterColumnMove","beforeColumnUnfreeze","afterColumnUnfreeze","beforeRowMove","afterRowMove","beforeColumnResize","afterColumnResize","beforeRowResize","afterRowResize","afterGetColumnHeaderRenderers","afterGetRowHeaderRenderers","beforeStretchingColumnWidth","beforeFilter","afterFilter","beforePageChange","afterPageChange","beforePageSizeChange","afterPageSizeChange","afterPageSizeVisibilityChange","afterPageCounterVisibilityChange","afterPageNavigationVisibilityChange","afterFormulasValuesUpdate","afterNamedExpressionAdded","afterNamedExpressionRemoved","afterSheetAdded","afterSheetRenamed","afterSheetRemoved","modifyColumnHeaderHeight","modifyColumnHeaderValue","beforeUndo","beforeUndoStackChange","afterUndo","afterUndoStackChange","beforeRedo","beforeRedoStackChange","afterRedo","afterRedoStackChange","modifyRowHeaderWidth","modifyTransformFocus","modifyTransformStart","modifyTransformEnd","afterModifyTransformFocus","afterModifyTransformStart","afterModifyTransformEnd","afterViewportRowCalculatorOverride","afterViewportColumnCalculatorOverride","afterPluginsInitialized","beforeHideRows","afterHideRows","beforeUnhideRows","afterUnhideRows","beforeHideColumns","afterHideColumns","beforeUnhideColumns","afterUnhideColumns","beforeTrimRow","afterTrimRow","beforeUntrimRow","afterUntrimRow","beforeDropdownMenuShow","afterDropdownMenuShow","afterDropdownMenuHide","beforeAddChild","afterAddChild","beforeDetachChild","afterDetachChild","beforeBeginEditing","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"],r5=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"]]),r4=new Map([]);class r9{#e=new Map;#t=new Map;#r=new Set;constructor(){r6.forEach(e=>this.#n(e))}getHooks(e){return this.#e.get(e)??[]}add(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};this.#e.has(e)||(this.#n(e),r6.push(e));let n=this.#e.get(e)??[],o=n.find(e=>e.callback===t);if(o){!0===o.skip&&(o.skip=!1);return}let i=Number.isInteger(r.orderIndex)?r.orderIndex??0:0,s=!!r.runOnce,a=!!r.initialHook,l=!1;if(a){let e=n.find(e=>e.initialHook);e&&(e.callback=t,l=!0)}if(!l){n.push({callback:t,orderIndex:i,runOnce:s,initialHook:a,skip:!1});let r=this.#r.has(e);r||0===i||(r=!0,this.#r.add(e)),r&&n.length>1&&this.#e.set(e,n.toSorted((e,t)=>e.orderIndex-t.orderIndex))}}has(e){return this.#e.has(e)&&(this.#e.get(e)?.length??0)>0}remove(e,t){if(!this.#e.has(e))return!1;let r=this.#e.get(e)??[],n=r.find(e=>e.callback===t);if(n){let t=this.#t.get(e)??0;return n.skip=!0,(t+=1)>100&&(this.#e.set(e,r.filter(e=>!e.skip)),t=0),this.#t.set(e,t),!0}return!1}destroy(){this.#e.clear(),this.#t.clear()}#n(e){this.#e.set(e,[]),this.#t.set(e,0)}}let r7=eu`The plugin hook "[hookName]" was removed in Handsontable [removedInVersion].\x20
|
|
52
|
+
the documentation or contact us at <a href="mailto:support@handsontable.com">support@handsontable.com</a>.`,non_commercial:()=>""};function eM(e){let t,{className:r,key:n,element:o,releaseDate:i}=e,s=!ef(n),a="string"==typeof n&&("non-commercial-and-evaluation"===n.toLowerCase()||"ht68e-1f2b7-47158-70b05-0842f"===n.toLowerCase()),l="18.0.0",h="invalid",d="invalid",u=function(e){let t=[][eb],r=t;if(e[eb]!==ev("Z"))return!1;for(let t="",n="B<H4P+".split(""),o=ev(n.shift()??"A");o;o=ev(n.shift()??"A"))--o<""[eb]?r|=(ew(`${ew(ey(t)+(ey(eS(e,Math.abs(o),2))+String([])).padStart(2,"0"))}`)%97||2)>>1:t=eS(e,o,o?1===n[eb]?9:8:6);return r===t}(n=eR(n||""));if(a)h="non_commercial",d="valid";else if(s||u)if(u){let e,[r,o,s]=(i??"30/06/2026"??"").split("/").map(Number),a=Math.floor(Date.UTC(s,o-1,r)/864e5),l=ey(eS(eR(e=n),ey("12"),ev("F")))/(ey(eS(eR(e),ev("B"),~~![][eb]))||9);t=new Intl.DateTimeFormat("en-US",{year:"numeric",month:"long",day:"2-digit",timeZone:"UTC"}).format((l+1)*864e5),a>l?(h="expired",d="expired"):(h="valid",d="valid")}else h="invalid",d="invalid";else h="missing",d="missing";if("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)&&(h="valid",d="valid"),eE||"valid"===h||(eT[h]({keyValidityDate:t,hotVersion:l})&&console["non_commercial"===h?"info":"warn"](eT[h]({keyValidityDate:t,hotVersion:l})),eE=!0),"valid"!==d&&o&&eA[d]({keyValidityDate:t,hotVersion:l})){let e=document.createElement("div"),n=document.createElement("div");return e.className=`handsontable ${r}`,n.className=`${r}_inner`,n.innerHTML=eA[d]({keyValidityDate:t,hotVersion:l}),e.appendChild(n),o.appendChild(e),e}return null}function eN(e){throw Error(e,{cause:{handsontable:!0}})}function eI(e){let t;if(Array.isArray(e))t=e.length?Array(e.length).fill(null):[];else{let r=Object.create(null);eB(e,(e,t)=>{"__children"!==t&&(e&&"object"==typeof e&&!Array.isArray(e)?r[t]=eI(e):Array.isArray(e)?e.length&&"object"==typeof e[0]&&!Array.isArray(e[0])?r[t]=[eI(e[0])]:r[t]=[]:r[t]=null)}),t=r}return t}function ex(e,t){return t.prototype.constructor=t,e.prototype=new t,e.prototype.constructor=e,e}function eO(e,t,r){let n=Array.isArray(r);return eB(t,(t,o)=>{"__proto__"!==o&&"constructor"!==o&&"prototype"!==o&&(!1===n||r.includes(o))&&(e[o]=t)}),e}function ek(e,t){eB(t,(r,n)=>{if("__proto__"===n||"constructor"===n||"prototype"===n)return;let o=t[n];o&&"object"==typeof o?(e[n]||(Array.isArray(o)?e[n]=[]:"[object Date]"===Object.prototype.toString.call(o)?e[n]=o:e[n]={}),ek(e[n],o)):e[n]=o})}function e_(e){if(Array.isArray(e))return e.map(e=>e_(e));if(e instanceof Date)return new Date(e);if("object"==typeof e&&null!==e){let t={};for(let[r,n]of Object.entries(e))"__proto__"!==r&&"constructor"!==r&&"prototype"!==r&&(t[r]=e_(n));return t}return e}function eH(e){let t={};return eB(e,(e,r)=>{t[r]=e}),t}function eL(e){for(var t=arguments.length,r=Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];return e.MIXINS||(e.MIXINS=[]),ee(r,t=>{e.MIXINS.push(t.MIXIN_NAME),eB(t,(t,r)=>{if(void 0!==e.prototype[r]&&eN(`Mixin conflict. Property '${r}' already exist and cannot be overwritten.`),"function"==typeof t)e.prototype[r]=t;else{let n,o;Object.defineProperty(e.prototype,r,{get:(n=`_${r}`,function(){let e;return void 0===this[n]&&(this[n]=((Array.isArray(e=t)||eF(e))&&(e=e_(e)),e)),this[n]}),set:(o=`_${r}`,function(e){this[o]=e}),configurable:!0})}})}),e}function eP(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)=>{let[r]=e,[n]=t;return r.localeCompare(n)}).map(e=>{let[t,n]=e;return`${JSON.stringify(t)}:${r(n)}`});return`{${t.join(",")}}`}return JSON.stringify(e)};return r(e)===r(t)}function eD(e){return eF(e)}function eF(e){return"[object Object]"===Object.prototype.toString.call(e)}function eV(e,t,r,n){n.value=r,n.writable=!1!==n.writable,n.enumerable=!1!==n.enumerable,n.configurable=!1!==n.configurable,Object.defineProperty(e,t,n)}function eB(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 eU(e,t){let r=t.split("."),n=e;for(let e of r)if(void 0===(n=n[e]))return;return n}function ez(e,t,r){if("string"!=typeof t||null===e||"object"!=typeof e)return;let n=t.split("."),o=e;for(let e=0;e<n.length;e+=1){let t=n[e];if("__proto__"===t||"constructor"===t||"prototype"===t)return;if(e!==n.length-1){e$(o,t)||(o[t]={});let e=o[t];if(!eF(e))return;o=e}else Object.defineProperty(o,t,{value:r,writable:!0,enumerable:!0,configurable:!0})}}function eW(e){if(!eF(e))return 0;let t=function(e){let r=0;return eF(e)?eB(e,(e,n)=>{"__children"!==n&&(r+=t(e))}):r+=1,r};return t(e)}function eG(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"value",r=`_${t}`,n={_touched:!1,[r]:e,isTouched(){return!!this._touched},value:void 0};return Object.defineProperty(n,t,{get(){return this[r]},set(e){this._touched=!0,this[r]=e},enumerable:!0,configurable:!0}),n}function e$(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function ej(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(n=>{let o=t[n],i=e[n];eF(o)?r[n]=ej(eF(i)?i:{},o):r[n]=e$(e,n)&&void 0!==i?i:o}),Object.keys(e).forEach(t=>{e$(r,t)||(r[t]=e[t])}),r}function eY(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r={...e};return Object.keys(t).forEach(e=>{if("__proto__"===e||"constructor"===e||"prototype"===e)return;let n=t[e],o=r[e];eF(n)&&eF(o)?r[e]=eY(o,n):r[e]=n}),r}function eq(e){return eF(e)&&ep(e.key)&&ep(e.value)}function eK(e){return window.requestAnimationFrame(e)}function eX(e){window.cancelAnimationFrame(e)}function eQ(){return"ontouchstart"in window}function eZ(){return"u">typeof window}function eJ(t){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};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 e0=e=>{let t={value:!1,test(r,n){t.value=e(r,n)}};return t},e1={chrome:e0((e,t)=>/Chrome/.test(e)&&/Google/.test(t??"")),chromeWebKit:e0(e=>/CriOS/.test(e)),edge:e0(e=>/Edge/.test(e)),edgeWebKit:e0(e=>/EdgiOS/.test(e)),firefox:e0(e=>/Firefox/.test(e)),firefoxWebKit:e0(e=>/FxiOS/.test(e)),mobile:e0(e=>/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(e)),safari:e0((e,t)=>/Safari/.test(e)&&/Apple Computer/.test(t??"")),safariBefore261:e0((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})},e2={mac:e0(e=>/^Mac/.test(e)),win:e0(e=>/^Win/.test(e)),linux:e0(e=>/^Linux/.test(e)),ios:e0(e=>/iPhone|iPad|iPod/i.test(e))};function e3(){let{userAgent:e=navigator.userAgent,vendor:t=navigator.vendor}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};eB(e1,r=>{let{test:n}=r;return n(e,t)})}function e6(){let{platform:e=navigator.platform}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};eB(e2,t=>{let{test:r}=t;return r(e)})}function e5(){return e1.chrome.value}function e4(){return e1.chromeWebKit.value}function e9(){return e1.firefox.value}function e7(){return e1.firefoxWebKit.value}function e8(){return e1.safari.value}function te(){return e1.safariBefore261.value}function tt(){return e1.edge.value}function tr(){return e1.edgeWebKit.value}function tn(){return e1.mobile.value}function to(){return e2.ios.value}function ti(){let{maxTouchPoints:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:navigator;return(e??0)>2&&e2.mac.value}function ts(){return e2.win.value}function ta(){return e2.mac.value}function tl(){return e2.linux.value}function th(e){return e[0].toUpperCase()+e.substr(1)}function td(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];let n=[],o=t.length;for(;o;){let e=eg(t[o-=1]).toLowerCase();-1===n.indexOf(e)&&n.push(e)}return 1===n.length}function tu(){let e=new Uint16Array(4);return globalThis.crypto.getRandomValues(e),Array.from(e,e=>e.toString(16).padStart(4,"0")).join("")}function tc(e){if("string"!=typeof e)return!1;try{let t=JSON.parse(e);return"object"==typeof t&&null!==t}catch{return!1}}function tg(e){return/^(?:\d\d?%|100%)$/.test(e)}function tp(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return`${e}`.replace(/(?:\\)?\[([^[\]]+)]/g,(e,r)=>"\\"===e.charAt(0)?e.substr(1,e.length-1):void 0===t[r]?"":String(t[r]))}function tm(e){let t=String(e),r="",n=0,o=!1,i="";for(let e=0;e<t.length;e++){let s=t[e];n>0&&!o&&('"'===s||"'"===s)?(o=!0,i=s):o&&s===i?o=!1:o||"<"!==s?!o&&">"===s&&n>0?n-=1:0===n&&(r+=s):n+=1}return r}function tf(e){return e}function tC(e){return"string"!=typeof e?e:e.replace(/([A-Z])/g,"-$1").replaceAll("_","-").toLowerCase()}eZ()&&(e3(),e6());let tb="Iİ\xcc\xcdĨ",ty=tb.toLowerCase(),tw=new Map;function tS(e,t){return!function(e){let t,r=tw.get(e);if(void 0!==r)return r;try{t=tb.toLocaleLowerCase(e)!==ty}catch{t=!1}return tw.set(e,t),t}(t)?e.toLowerCase():e.toLocaleLowerCase(t)}function tv(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];ep(console)&&console.log(...t)}function tR(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];ep(console)&&console.warn(...t)}let tE=new WeakMap;function tT(e,t){for(var r=arguments.length,n=Array(r>2?r-2:0),o=2;o<r;o++)n[o-2]=arguments[o];let i=tE.get(e);void 0===i&&(i=new Set,tE.set(e,i)),i.has(t)||(i.add(t),tR(...n))}function tA(e){ep(console)&&console.warn(`Deprecated: ${e}`)}function tM(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];ep(console)&&console.error(...t)}function tN(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=-1,n=null,o=e;for(;null!==o;){if(r===t){n=rx(o)?o:null;break}r_(o)?o=o.host:(r+=1,o=o.parentNode)}return n}function tI(e,t){let r=e.closest(".handsontable");return!!r&&(r.parentNode===t||r===t)}function tx(e){return e.target}function tO(e){let{frameElement:t}=e;return e.parent&&Object.getPrototypeOf(e.parent)&&t instanceof HTMLIFrameElement?t:null}function tk(e){return tO(e)?e.parent:null}function t_(e){return!!Object.getPrototypeOf(e.parent)}function tH(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=arguments.length>2?arguments[2]:void 0,{ELEMENT_NODE:n,DOCUMENT_FRAGMENT_NODE:o}=Node,i=e;for(;null!=i&&i!==r;){let{nodeType:e,nodeName:r}=i;if(e===n&&rx(i)&&(t.includes(r)||t.includes(i)))return i;i=r_(i)?i.host:i.parentNode}return null}function tL(e,t,r){let n=[],o=rx(e)?e:null;for(;o&&(o=tH(o,t,r))&&(!r||r.contains(o));)if(n.push(o),r_(o)){let{host:e}=o;o=rx(e)?e:null}else o=o.parentElement;let i=n.length;return i?n[i-1]:null}function tP(e,t){let r={element:void 0,classNames:[]},n=e;for(;null!==n&&n!==e.ownerDocument.documentElement&&!r.element;){if("string"==typeof t&&n.classList.contains(t))r.element=n,r.classNames.push(t);else if(t instanceof RegExp){let e=Array.from(n.classList).filter(e=>t.test(e));e.length&&(r.element=n,r.classNames.push(...e))}n=n.parentElement}return r}function tD(e,t){let r=e.parentNode,n=[];for("string"==typeof t?n=e instanceof Document?Array.from(e.querySelectorAll(t)):Array.from(e.ownerDocument.querySelectorAll(t)):n.push(t);null!==r;){if(n.indexOf(r)>-1)return!0;r=r.parentNode}return!1}function tF(e){let t=0,r=e;if(r.previousSibling)for(;r=r.previousSibling;)t+=1;return t}function tV(e,t,r){let n=r.parentElement?.querySelector(`.ht_clone_${e}`);return!!n&&n.contains(t)}function tB(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 tU(e){return e&&e.length?e.filter(e=>!!e):[]}function tz(e,t){if(!e||!e.length)return t?{regexFree:[],regexes:[]}:[];let r=[],n=[];return n.push(...e.filter(e=>{let n=e instanceof RegExp;return n&&t&&r.push(e),!n})),t?{regexFree:n,regexes:r}:n}function tW(e,t){return void 0!==e.classList&&"string"==typeof t&&""!==t&&e.classList.contains(t)}function tG(e,t){"string"==typeof t&&(t=t.split(" ")),(t=tU(t)).length>0&&e.classList.add(...t)}function t$(e,t){"string"==typeof t?t=t.split(" "):t instanceof RegExp&&(t=[t]);let{regexFree:r,regexes:n}=tz(t,!0);(r=tU(r)).length>0&&e.classList.remove(...r),n.forEach(t=>{e.classList.forEach(r=>{t.test(r)&&e.classList.remove(r)})})}function tj(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=arguments.length>2?arguments[2]:void 0;Array.isArray(t)||(t=[[t,r??""]]),t.forEach(t=>{Array.isArray(t)&&""!==t[0]&&e.setAttribute(t[0],String(t[1]))})}function tY(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];"string"==typeof t?t=t.split(" "):t instanceof RegExp&&(t=[t]);let{regexFree:r,regexes:n}=tz(t,!0);if(r.forEach(t=>{""!==t&&e.removeAttribute(t)}),n.length>0){let t=e.getAttributeNames();for(let r=0;r<t.length;r++){let o=t[r];for(let t=0;t<n.length;t++)if(n[t].test(o)){e.removeAttribute(o);break}}}}function tq(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--)tq(t[e])}}function tK(e){let t;for(;t=e.lastChild;)e.removeChild(t)}let tX=/(<([^>]*)>|&([^;]*);)/,tQ="sanitizer",tZ={};function tJ(e,t){let r=!(arguments.length>2)||void 0===arguments[2]||arguments[2],n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"innerHTML",o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:tZ;if(tX.test(t)){let i;"function"==typeof r?i=r(t,n):(!1!==r&&tT(o,tQ,`HTML content is being written to the DOM ("${n}") without a sanitizer. Configure the "sanitizer" option to prevent XSS vulnerabilities.`),i=t),e.innerHTML=i}else t0(e,t)}function t0(e,t){let r=e.firstChild;r&&3===r.nodeType&&null===r.nextSibling?r.textContent=t:(tK(e),e.appendChild(e.ownerDocument.createTextNode(t)))}function t1(e){if("function"==typeof e.checkVisibility)return e.checkVisibility();let t=e.ownerDocument.documentElement,r=e.ownerDocument.defaultView,n=e;for(;n!==t;){if(null===n)return!1;if(r_(n)){let e=n.host;if(e.impl)return t1(e.impl);return t1(e)}if(n.nodeType===Node.DOCUMENT_FRAGMENT_NODE)return!1;else if(n.nodeType===Node.ELEMENT_NODE&&rx(n)&&r?.getComputedStyle(n).display==="none")return!1;n=n.parentNode}return!0}function t2(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 t3(e){let t,r,n,o=e.ownerDocument,i=o.defaultView,s=o.documentElement,a=e;for(t=a.offsetLeft,r=a.offsetTop,n=a;(a=rx(a.offsetParent)?a.offsetParent:null)&&a!==o.body&&"offsetLeft"in a;)t+=a.offsetLeft,r+=a.offsetTop,n=a;return n&&"fixed"===n.style.position&&(t+=(i?.pageXOffset??0)||s.scrollLeft,r+=(i?.pageYOffset??0)||s.scrollTop),{left:t,top:r}}function t6(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window;return e.scrollY}function t5(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window;return e.scrollX}function t4(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:window;return e instanceof Window?t6(t):e.scrollTop}function t9(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:window;return e instanceof Window?t5(t):e.scrollLeft}function t7(e){let t=e.ownerDocument,r=t.defaultView,n=["auto","scroll"],o=e.parentElement;for(;o&&o.style&&t.body!==o;){let{overflow:e,overflowX:t,overflowY:i}=o.style;if([e,t,i].includes("scroll")||(r&&({overflow:e,overflowX:t,overflowY:i}=r.getComputedStyle(o)),n.includes(e)||n.includes(t)||n.includes(i))||o.clientHeight<=o.scrollHeight+1&&(n.includes(i)||n.includes(e))||o.clientWidth<=o.scrollWidth+1&&(n.includes(t)||n.includes(e)))return o;o=o.parentElement}return r??t.documentElement}function t8(e){return e.scrollHeight-e.clientHeight}function re(e){return e.scrollWidth-e.clientWidth}function rt(e){let t=e.ownerDocument,r=t.defaultView,n=e.parentElement;for(;n&&n.style&&t.body!==n;){if("visible"!==n.style.overflow&&""!==n.style.overflow)return n;if(r){let e=r.getComputedStyle(n),t=["scroll","hidden","auto","clip"],o=e.getPropertyValue("overflow"),i=e.getPropertyValue("overflow-y"),s=e.getPropertyValue("overflow-x");if(t.includes(o)||t.includes(i)||t.includes(s))return n}n=n.parentElement}return r??t.documentElement}function rr(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:window;if(!e)return;if(e instanceof Window)return"width"===t?`${e.innerWidth}px`:"height"===t?`${e.innerHeight}px`:void 0;let n=e.style.getPropertyValue(t)||e.style[t];if(""!==n&&void 0!==n)return n;let o=r.getComputedStyle(e),i=o.getPropertyValue(t)||o[t];if(""!==i&&void 0!==i)return i}function rn(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 ro(e){return e.offsetWidth}function ri(e){return e.offsetHeight}function rs(e){return e instanceof Window?e.innerHeight:e.clientHeight}function ra(e){return e instanceof Window?e.innerWidth:e.clientWidth}function rl(e,t,r){e.addEventListener(t,r,!1)}function rh(e,t,r){e.removeEventListener(t,r,!1)}function rd(e){return e.selectionStart?e.selectionStart:0}function ru(e){return e.selectionEnd?e.selectionEnd:0}function rc(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window,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 rg(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window;if(e.getSelection){let t=e.getSelection();t?.empty?t.empty():t?.removeAllRanges&&t.removeAllRanges()}}function rp(e,t,r){if(void 0===r&&(r=t),e.setSelectionRange){e.focus();try{e.setSelectionRange(t,r)}catch(o){let n=e.parentElement;if(n){let o=n.style.display;n.style.display="block",e.setSelectionRange(t,r),n.style.display=o}}}}function rm(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document;return ts()?2*!Number.isInteger(e.defaultView?.devicePixelRatio||1):0}function rf(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document;return void 0===t&&(t=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document,t=function(){let t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],r=e.createElement("div");r.style.height="200px",r.style.width="100%";let n=e.createElement("div");n.classList.add("htScrollbarTest"),t&&n.classList.add("htScrollbarSafariTest"),n.style.boxSizing="content-box",n.style.height="150px",n.style.left="0px",n.style.overflow="hidden",n.style.position="absolute",n.style.top="0px",n.style.width="200px",n.style.visibility="hidden",n.appendChild(r),e.body.appendChild(n);let o=r.offsetWidth;n.style.overflow="scroll";let i=r.offsetWidth;return o===i&&(i=n.clientWidth),e.body.removeChild(n),o-i},r=t();return 0===r&&te()&&!tn()&&!ti()?t(!0):r}(e)),t}function rC(e){return e instanceof Window?e.document.body.scrollHeight>e.innerHeight:e.offsetWidth!==e.clientWidth}function rb(e){return e instanceof Window?e.document.body.scrollWidth>e.innerWidth:e.offsetHeight!==e.clientHeight}function ry(e,t,r){e.style.transform=`translate3d(${t},${r},0)`}function rw(e){let t;return e.style.transform&&""!==(t=e.style.transform)?["transform",t]:-1}function rS(e){e.style.transform&&""!==e.style.transform&&(e.style.transform="")}function rv(e){return e&&(["INPUT","SELECT","TEXTAREA"].indexOf(e.nodeName)>-1||"true"===e.contentEditable)}function rR(e){return rv(e)&&"hotInput"in e.dataset==!1}function rE(e){let t=e.ownerDocument.activeElement;rx(t)&&!rR(t)&&(e instanceof HTMLInputElement||e instanceof HTMLTextAreaElement)&&e.select()}function rT(e){return!e.parentNode}function rA(e,t){new IntersectionObserver((e,r)=>{e.forEach(e=>{e.isIntersecting&&(t(),r.disconnect())})}).observe(e)}function rM(e){let t=!(arguments.length>1)||void 0===arguments[1]||arguments[1],r=!(arguments.length>2)||void 0===arguments[2]||arguments[2],n=e.ownerDocument,o=n.createRange(),i=n.defaultView?.getSelection();if(tj(e,"contenteditable",!0),r){let t=L();tj(e,t[0],t[1])}t&&tG(e,"invisibleSelection"),o.selectNodeContents(e),i?.removeAllRanges(),i?.addRange(o)}function rN(e){let t=!(arguments.length>1)||void 0===arguments[1]||arguments[1],r=e.ownerDocument.defaultView?.getSelection();e.hasAttribute("aria-hidden")&&e.removeAttribute("aria-hidden"),r?.removeAllRanges(),t&&t$(e,"invisibleSelection"),e.removeAttribute("contenteditable")}function rI(e,t){let r=!(arguments.length>2)||void 0===arguments[2]||arguments[2];rM(e,r),t(),rN(e,r)}function rx(e){if("object"!=typeof e||null===e)return!1;let t=e.ownerDocument?.defaultView?.Element;return!!(t&&e instanceof t)}function rO(e){return rx(e)&&("TD"===e.tagName||"TH"===e.tagName)}function rk(e){return"INPUT"===e.tagName}function r_(e){return e.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&"host"in e}function rH(e,t){return e.childNodes[t]||null}function rL(e){return"function"==typeof e}function rP(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:200,r=0,n={lastCallThrottled:!0},o=null;return function(){for(var i=arguments.length,s=Array(i),a=0;a<i;a++)s[a]=arguments[a];let l=Date.now(),h=!1;n.lastCallThrottled=!0,r||(r=l,h=!0);let d=t-(l-r);return h?(n.lastCallThrottled=!1,e.apply(this,s)):(o&&clearTimeout(o),o=setTimeout(()=>{n.lastCallThrottled=!1,e.apply(this,s),r=0,o=null},d)),n}}function rD(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:200,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:10,n=rP(e,t),o=r;function i(){for(var t=arguments.length,r=Array(t),i=0;i<t;i++)r[i]=arguments[i];return o?(o-=1,e.apply(this,r)):n.apply(this,r)}return i.clearHits=function(){o=r},i}function rF(e){let t,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:200,n=null;function o(){for(var o=arguments.length,i=Array(o),s=0;s<o;s++)i[s]=arguments[s];return n&&clearTimeout(n),n=setTimeout(()=>{n=null,t=e.apply(this,i)},r),t}return o.cancel=function(){null!==n&&(clearTimeout(n),n=null)},o}function rV(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];let[n,...o]=t;return function(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return Q(o,(e,t)=>t(e),n.apply(this,t))}}function rB(e){for(var t=arguments.length,r=Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];return function(){for(var t=arguments.length,n=Array(t),o=0;o<t;o++)n[o]=arguments[o];return e.apply(this,r.concat(n))}}function rU(e){let t=e.length;return function r(n){return function(){for(var o=arguments.length,i=Array(o),s=0;s<o;s++)i[s]=arguments[s];let a=n.concat(i);return a.length>=t?e.apply(this,a):r(a)}}([])}function rz(e){let t=e.length;return function r(n){return function(){for(var o=arguments.length,i=Array(o),s=0;s<o;s++)i[s]=arguments[s];let a=n.concat(i.reverse());return a.length>=t?e.apply(this,a):r(a)}}([])}function rW(e,t,r,n,o,i,s,a){if(ep(a))return e.call(t,r,n,o,i,s,a);if(ep(s))return e.call(t,r,n,o,i,s);if(ep(i))return e.call(t,r,n,o,i);if(ep(o))return e.call(t,r,n,o);if(ep(n))return e.call(t,r,n);else if(ep(r))return e.call(t,r);return e.call(t)}let rG={ALT:18,ARROW_DOWN:40,ARROW_LEFT:37,ARROW_RIGHT:39,ARROW_UP:38,AUDIO_DOWN:e9()?182:174,AUDIO_MUTE:e9()?181:173,AUDIO_UP:e9()?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},r$=[rG.ALT,rG.ARROW_DOWN,rG.ARROW_LEFT,rG.ARROW_RIGHT,rG.ARROW_UP,rG.AUDIO_DOWN,rG.AUDIO_MUTE,rG.AUDIO_UP,rG.BACKSPACE,rG.CAPS_LOCK,rG.DELETE,rG.END,rG.ENTER,rG.ESCAPE,rG.F1,rG.F2,rG.F3,rG.F4,rG.F5,rG.F6,rG.F7,rG.F8,rG.F9,rG.F10,rG.F11,rG.F12,rG.F13,rG.F14,rG.F15,rG.F16,rG.F17,rG.F18,rG.F19,rG.HOME,rG.INSERT,rG.MEDIA_NEXT,rG.MEDIA_PLAY_PAUSE,rG.MEDIA_PREV,rG.MEDIA_STOP,rG.NULL,rG.NUM_LOCK,rG.PAGE_DOWN,rG.PAGE_UP,rG.PAUSE,rG.SCROLL_LOCK,rG.SHIFT,rG.TAB];function rj(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 rY(e){return r$.includes(e)}function rq(e){let t=[];return ta()?t.push(rG.COMMAND_LEFT,rG.COMMAND_RIGHT,rG.COMMAND_FIREFOX):t.push(rG.CONTROL),t.includes(e)}function rK(e){return[rG.CONTROL,rG.COMMAND_LEFT,rG.COMMAND_RIGHT,rG.COMMAND_FIREFOX].includes(e)}function rX(e,t){let r=t.split("|"),n=!1;return ee(r,t=>{if(e===rG[t])return n=!0,!1}),n}function rQ(e){e.isImmediatePropagationEnabled=!1,e.cancelBubble=!0}function rZ(e){return!1===e.isImmediatePropagationEnabled}function rJ(e){return 2===e.button}function r0(e){return 0===e.button}function r1(e){return 1===e.button}function r2(e){return"u">typeof TouchEvent&&e instanceof TouchEvent}function r3(e,t){let r={x:e.offsetX,y:e.offsetY},n=tx(e);if(!rx(t)||n!==t&&n.contains(t))return r;for(;n!==t;)r.x+=n.offsetLeft,r.y+=n.offsetTop,n=n.offsetParent;return r}let r6=["afterCellMetaReset","afterChange","afterContextMenuDefaultOptions","beforeContextMenuSetItems","afterDropdownMenuDefaultOptions","beforeDropdownMenuSetItems","afterContextMenuHide","beforeContextMenuShow","afterContextMenuShow","afterCopyLimit","beforeCreateCol","afterColumnSequenceCacheUpdate","afterColumnSequenceChange","afterCreateCol","beforeCreateRow","afterCreateRow","beforeAlter","afterDeselect","afterDestroy","afterDocumentKeyDown","afterDrawSelection","beforeRemoveCellClassNames","beforeCompositionStart","afterGetCellMeta","afterGetColHeader","afterGetRowHeader","afterInit","afterLoadData","afterUpdateData","afterDataProviderFetch","afterDataProviderFetchError","afterDataProviderFetchAbort","hasExternalDataSource","beforeRowsMutation","afterRowsMutation","afterRowsMutationError","afterMomentumScroll","afterOnCellCornerMouseDown","afterOnCellCornerDblClick","afterOnCellMouseDown","afterOnCellMouseUp","afterOnCellContextMenu","afterOnCellMouseOver","afterOnCellMouseOut","afterOnCellMouseOverOutside","afterRemoveCol","afterRemoveRow","beforeRenderer","afterRenderer","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","beforeCellAlignment","beforeChange","beforeChangeRender","beforeHeightChange","beforeWidthChange","beforeDrawBorders","beforeGetCellMeta","beforeRemoveCellMeta","beforeInit","beforeInitWalkontable","beforeLoadData","beforeUpdateData","beforeDataProviderFetch","beforeKeyDown","beforeOnCellMouseDown","beforeOnCellMouseUp","beforeOnCellContextMenu","beforeOnCellMouseOver","beforeOnCellMouseOut","beforeOnCellMouseOverOutside","beforeRemoveCol","beforeRemoveRow","beforeViewRender","afterViewRender","beforeRender","afterRender","beforeRowWrap","beforeColumnWrap","beforeSetCellMeta","beforeSelectionFocusSet","beforeSetRangeStartOnly","beforeSetRangeStart","beforeSetRangeEnd","beforeSelectionHighlightSet","beforeTouchScroll","beforeValidate","beforeValueRender","construct","init","modifyColHeader","modifyColWidth","modifyFiltersMultiSelectValue","modifyFocusedElement","modifyRowHeader","modifyRowHeight","modifyRowHeightByOverlayName","modifyData","modifySourceData","modifyRowData","modifyGetCellCoords","modifyGetCoordsElement","modifyFocusOnTabNavigation","beforeHighlightingRowHeader","beforeHighlightingColumnHeader","beforeColumnSort","afterColumnSort","modifyAutofillRange","modifyCopyableRange","beforeCut","afterCut","beforeCopy","afterCopy","beforePaste","afterPaste","beforeColumnFreeze","afterColumnFreeze","beforeColumnMove","afterColumnMove","beforeColumnUnfreeze","afterColumnUnfreeze","beforeRowMove","afterRowMove","beforeColumnResize","afterColumnResize","beforeRowResize","afterRowResize","afterGetColumnHeaderRenderers","afterGetRowHeaderRenderers","beforeStretchingColumnWidth","beforeFilter","afterFilter","beforePageChange","afterPageChange","beforePageSizeChange","afterPageSizeChange","afterPageSizeVisibilityChange","afterPageCounterVisibilityChange","afterPageNavigationVisibilityChange","afterFormulasValuesUpdate","afterNamedExpressionAdded","afterNamedExpressionRemoved","afterSheetAdded","afterSheetRenamed","afterSheetRemoved","modifyColumnHeaderHeight","modifyColumnHeaderValue","beforeUndo","beforeUndoStackChange","afterUndo","afterUndoStackChange","beforeRedo","beforeRedoStackChange","afterRedo","afterRedoStackChange","modifyRowHeaderWidth","modifyTransformFocus","modifyTransformStart","modifyTransformEnd","afterModifyTransformFocus","afterModifyTransformStart","afterModifyTransformEnd","afterViewportRowCalculatorOverride","afterViewportColumnCalculatorOverride","afterPluginsInitialized","beforeHideRows","afterHideRows","beforeUnhideRows","afterUnhideRows","beforeHideColumns","afterHideColumns","beforeUnhideColumns","afterUnhideColumns","beforeTrimRow","afterTrimRow","beforeUntrimRow","afterUntrimRow","beforeDropdownMenuShow","afterDropdownMenuShow","afterDropdownMenuHide","beforeAddChild","afterAddChild","beforeDetachChild","afterDetachChild","beforeBeginEditing","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"],r5=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"]]),r4=new Map([]);class r9{#e=new Map;#t=new Map;#r=new Set;constructor(){r6.forEach(e=>this.#n(e))}getHooks(e){return this.#e.get(e)??[]}add(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};this.#e.has(e)||(this.#n(e),r6.push(e));let n=this.#e.get(e)??[],o=n.find(e=>e.callback===t);if(o){!0===o.skip&&(o.skip=!1);return}let i=Number.isInteger(r.orderIndex)?r.orderIndex??0:0,s=!!r.runOnce,a=!!r.initialHook,l=!1;if(a){let e=n.find(e=>e.initialHook);e&&(e.callback=t,l=!0)}if(!l){n.push({callback:t,orderIndex:i,runOnce:s,initialHook:a,skip:!1});let r=this.#r.has(e);r||0===i||(r=!0,this.#r.add(e)),r&&n.length>1&&this.#e.set(e,n.toSorted((e,t)=>e.orderIndex-t.orderIndex))}}has(e){return this.#e.has(e)&&(this.#e.get(e)?.length??0)>0}remove(e,t){if(!this.#e.has(e))return!1;let r=this.#e.get(e)??[],n=r.find(e=>e.callback===t);if(n){let t=this.#t.get(e)??0;return n.skip=!0,(t+=1)>100&&(this.#e.set(e,r.filter(e=>!e.skip)),t=0),this.#t.set(e,t),!0}return!1}destroy(){this.#e.clear(),this.#t.clear()}#n(e){this.#e.set(e,[]),this.#t.set(e,0)}}let r7=eu`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 r8{static getSingleton(){return ne}globalBucket=new r9;getBucket(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return e?(e.pluginHookBucket||(e.pluginHookBucket=new r9),e.pluginHookBucket):this.globalBucket}add(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,n=arguments.length>3?arguments[3]:void 0;return Array.isArray(t)?ee(t,t=>this.add(e,t,r)):(r5.has(e)&&tR(tp(r7,{hookName:e,removedInVersion:r5.get(e)})),r4.has(e)&&tR(r4.get(e)),this.getBucket(r).add(e,t,{orderIndex:n,runOnce:!1})),this}once(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,n=arguments.length>3?arguments[3]:void 0;return Array.isArray(t)?ee(t,t=>this.once(e,t,r)):this.getBucket(r).add(e,t,{orderIndex:n,runOnce:!0}),this}addAsFixed(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return Array.isArray(t)?ee(t,t=>this.addAsFixed(e,t,r)):this.getBucket(r).add(e,t,{initialHook:!0}),this}remove(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return this.getBucket(r).remove(e,t)}has(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return this.getBucket(t).has(e)}run(e,t,r,n,o,i,s,a){return r=this.#o(this.getBucket().getHooks(t),e,t,null,r,n,o,i,s,a),r=this.#o(this.getBucket(e).getHooks(t),e,t,e,r,n,o,i,s,a)}#o(e,t,r,n,o,i,s,a,l,h){let d=e?e.length:0,u=0;if(d)for(;u<d;){if(!e[u]||e[u].skip){u+=1;continue}let d=rW(e[u].callback,t,o,i,s,a,l,h);void 0!==d&&(o=d),e[u]&&e[u].runOnce&&this.remove(r,e[u].callback,n),u+=1}return o}destroy(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;this.getBucket(e).destroy()}register(e){this.isRegistered(e)||r6.push(e)}deregister(e){this.isRegistered(e)&&r6.splice(r6.indexOf(e),1)}isDeprecated(e){return r4.has(e)||r5.has(e)}isRegistered(e){return r6.indexOf(e)>=0}getRegistered(){return r6}}let ne=new r8,nt=new Map;function nr(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"common";nt.has(e)||nt.set(e,new Map);let t=nt.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(){nt.delete(e),t.clear()}}}let{register:nn,getItem:no,hasItem:ni,getNames:ns,getValues:na}=nr("editors");class nl{#i;#s={};constructor(e){this.#i=e;const t=this.#s;r8.getSingleton().add("afterDestroy",function(){t[this.guid]=null})}getConstructor(){return this.#i}getInstance(e){return e.guid in this.#s||(this.#s[e.guid]=new this.#i(e)),this.#s[e.guid]}}let nh=new WeakMap;function nd(e){return"function"==typeof e}function nu(e){return nd(e)||eN("Editor class must be a constructor function."),e}function nc(e){return"string"!=typeof e?nu(e):(ni(e)||eN(`No registered editor found under "${e}" name`),no(e).getConstructor())}function ng(e,t){let r="string"==typeof e?e:null,n=t;e&&nd(e)&&(n=e,r=e.EDITOR_TYPE??null),n||eN("Editor class is required to register an editor.");let o=nu(n),i=new nl(o);null!==r&&nn(r,i),nh.set(o,i)}let np=0,nm=class{constructor(e=null){this.context=e||this,this.context.eventListeners||(this.context.eventListeners=[])}addEventListener(e,t,r){let n=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if(!this.context)return()=>{};function o(e){var t;let n;r.call(this,(n=(t=e).stopImmediatePropagation,t.stopImmediatePropagation=function(){n.apply(this),rQ(this)},t))}return this.context.eventListeners.push({element:e,event:t,callback:r,callbackProxy:o,options:n,eventManager:this}),e.addEventListener(t,o,n),np+=1,()=>{this.removeEventListener(e,t,r)}}removeEventListener(e,t,r){let n,o=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if(!this.context)return;let i=this.context.eventListeners.length;for(;i;)if(i-=1,(n=this.context.eventListeners[i]).event===t&&n.element===e){if(r&&r!==n.callback||o&&n.eventManager!==this)continue;this.context.eventListeners.splice(i,1),n.element.removeEventListener(n.event,n.callbackProxy,n.options),np-=1}}clearEvents(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];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),np-=1)}}clear(){this.clearEvents()}destroy(){this.clearEvents(),this.context=null}destroyWithOwnEventsOnly(){this.clearEvents(!0),this.context=null}fireEvent(e,t){let r,n="document"in e?e.document:void 0,o="window"in e?e:void 0;n||(o=(n=e.ownerDocument?e.ownerDocument:e).defaultView);let i={bubbles:!0,cancelable:"mousemove"!==t,view:o,detail:0,screenX:0,screenY:0,clientX:1,clientY:1,ctrlKey:!1,altKey:!1,shiftKey:!1,metaKey:!1,button:0,relatedTarget:void 0};n.createEvent?(r=n.createEvent("MouseEvents")).initMouseEvent(t,i.bubbles,i.cancelable,i.view,i.detail,i.screenX,i.screenY,i.clientX,i.clientY,i.ctrlKey,i.altKey,i.shiftKey,i.metaKey,i.button,i.relatedTarget||n.body.parentNode):r=n.createEventObject(),e.dispatchEvent?e.dispatchEvent(r):e.fireEvent(`on${t}`,r)}};class nf{destroyed=!1;constructor(e,t,r){this.hot=e,this.tableMeta=t,this.selection=r,this.eventManager=new nm(e),this.hot.addHook("afterDocumentKeyDown",e=>this.#a(e)),this.hot.addHook("beforeCompositionStart",e=>this.#a(e)),this.hot.view._wt.update("onCellDblClick",(e,t,r)=>this.#l(e,t))}getActiveEditor(){return this.activeEditor}prepareEditor(){if(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,n=this.hot.runHooks("modifyGetCellCoords",t,r,!1,"meta"),o=t,i=r;if(Array.isArray(n)&&([o,i]=n),this.cellProperties=this.hot.getCellMeta(o,i),!this.isCellEditable())return void this.clearActiveEditor();let s=this.hot.getCell(t,r,!0);if(s){var a;let e,n=this.hot.getCellEditor(this.cellProperties),l=this.hot.colToProp(i),h=this.hot.getSourceDataAtCell(this.hot.toPhysicalRow(o),i);this.activeEditor=(a=this.hot,nd(n)?(nh.get(n)||ng(null,n),e=nh.get(n)):"string"==typeof n?e=no(n):eN('Only strings and functions can be passed as "editor" parameter'),e||eN(`No editor registered under name "${n}"`),e.getInstance(a)),this.activeEditor.prepare(t,r,l,s,h,this.cellProperties)}}isEditorOpened(){return this.activeEditor&&this.activeEditor.isOpened()}openEditor(e,t){let r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(!this.isCellEditable())return void this.clearActiveEditor();let n=this.hot.getSelectedRangeActive(),o=this.hot.runHooks("beforeBeginEditing",n.highlight.row,n.highlight.col,e,t,r);(t instanceof MouseEvent&&"boolean"!=typeof o&&(o=0===this.hot.selection.getLayerLevel()&&n.isSingle()),!1===o)?this.clearActiveEditor():(this.activeEditor||(this.hot.scrollToFocusedCell(),this.prepareEditor()),this.activeEditor&&(r&&this.activeEditor.enableFullEditMode(),this.activeEditor.beginEditing(e,t)))}closeEditor(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=arguments.length>2?arguments[2]:void 0;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}isCellEditable(){let e=this.hot.getSelectedRangeActive();if(!e)return!1;let t=this.hot.getCellEditor(this.cellProperties),{row:r,col:n}=e.highlight;if(null===r||null===n)return!1;let{rowIndexMapper:o,columnIndexMapper:i}=this.hot,s=o.isHidden(this.hot.toPhysicalRow(r))||i.isHidden(this.hot.toPhysicalColumn(n));return!this.cellProperties.readOnly&&!!t&&!s}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.selection.transformFocus(t.row??0,t.col??0):this.selection.transformStart(t.row??0,t.col??0,!0)}#a(e){let t=this.hot.getSelectedRangeActive();if(!this.hot.isListening()||!t||t.highlight.isHeader()||rZ(e))return;let{keyCode:r}=e,n=(e.ctrlKey||e.metaKey)&&!e.altKey;this.activeEditor&&(!this.activeEditor||this.activeEditor.isWaiting())||rY(r)||rK(r)||n||this.isEditorOpened()||this.openEditor("",e)}#l(e,t){t?.isCell()&&(this.hot.getShortcutManager().isCtrlPressed()?this.clearActiveEditor():this.openEditor(null,e,!0))}destroy(){this.destroyed=!0,this.eventManager.destroy()}}let nC=new WeakMap;nf.getInstance=function(e,t,r){let n=nC.get(e);return n||(n=new nf(e,t,r),nC.set(e,n)),n};let nb={" ":" ","&":"&","<":"<",">":">"},ny=RegExp(Object.keys(nb).map(e=>`(${e})`).join("|"),"gi");function nw(e){let t=e.hasColHeaders(),r=e.hasRowHeaders(),n=[t?-1:0,r?-1:0,e.countRows()-1,e.countCols()-1],o=e.getData(...n),i=o.length,s=i>0?o[0].length:0,a=["<table>","</table>"],l=t?["<thead>","</thead>"]:[],h=["<tbody>","</tbody>"],d=+!!r,u=+!!t;for(let n=0;n<i;n+=1){let i=t&&0===n,a=[];for(let t=0;t<s;t+=1){let s=!i&&r&&0===t,l="";if(i)l=`<th>${e.getColHeader(t-d)}</th>`;else if(s)l=`<th>${e.getRowHeader(n-u)}</th>`;else{let r=o[n][t],{hidden:i,rowspan:s,colspan:a}=e.getCellMeta(n-u,t-d);if(!i){let e=[];if(s&&e.push(`rowspan="${s}"`),a&&e.push(`colspan="${a}"`),ef(r))l=`<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,"	");l=`<td ${e.join(" ")}>${t}</td>`}}}a.push(l)}let c=["<tr>",...a,"</tr>"].join("");i?l.splice(1,0,c):h.splice(-1,0,c)}return a.splice(1,0,l.join(""),h.join("")),a.join("")}function nS(e){let t=e.length,r=["<table>"];for(let n=0;n<t;n+=1){let o=e[n],i=o.length,s=[];0===n&&r.push("<tbody>");for(let e=0;e<i;e+=1){let t=o[e],r=ef(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>"),n+1===t&&r.push("</tbody>")}return r.push("</table>"),r.join("")}let nv=/<td\b[^>]*>/i,nR=/<\/\s*td\s*>/i,nE=/<p.*?>/g;function nT(e){let t=[],r=0;for(;r<e.length;){let n,o=e.substring(r).match(nv);if(!o){t.push(e.substring(r));break}let i=r+(o.index??0),s=o[0],a=i+s.length;t.push(e.substring(r,i));let l=function(e,t){let r=1,n=t;for(;r>0;){let t=e.substring(n),o=t.match(nv),i=t.match(nR);if(!i)break;let s=n+(i.index??0),a=i[0].length,l=o?n+(o.index??0):e.length;if(l<s)r+=1,n=l+(o?.[0].length??0);else{if(0==(r-=1))return{start:s,length:a};n=s+a}}return null}(e,a);if(!l){t.push(e.substring(i));break}let h=e.substring(i,l.start+l.length),d=l.start-i,u=h.substring(s.length,d).trim().replaceAll(/\n\s+/g," ").replaceAll(nE,"\n").replace(/^\n+/,"").replaceAll(/<\/(.*)>\s+$/mg,"</$1>");do n=u,u=u.replace(/<(?!br\b)[^>]+>/gi,"");while(u!==n);u=u.replaceAll(/^ $/mg,""),t.push(`${s}${u}</td>`),r=l.start+l.length}return t.join("")}function nA(e){var t;let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:document,n={},o=r.createDocumentFragment(),i=r.createElement("div");o.appendChild(i);let s=e;if("string"==typeof s){let e=nT(s);i.insertAdjacentHTML("afterbegin",e),s=i.querySelector("table")}if(!s||"TABLE"!==((t=s)&&t.nodeName||""))return;let a=s,l=i.querySelector('meta[name$="enerator"]'),h=null!==a.querySelector("tbody th"),d=a.querySelector("tr"),u=d?Array.from(d.cells).reduce((e,t)=>e+t.colSpan,0)-!!h:0,c=a.tFoot&&Array.from(a.tFoot.rows)||[],g=[],p=!1,m=0,f=0;if(a.tHead){let e=Array.from(a.tHead.rows).filter(e=>{let t=null!==e.querySelector("td");return t&&g.push(e),!t});p=(m=e.length)>0,m>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:n,innerHTML:o}=t;return e.push(n>1?{label:o,colspan:n}:o),e},[]);return e.push(r),e},[]):p&&(n.colHeaders=Array.from(e[0].children).reduce((e,t,r)=>(h&&0===r||e.push(t.innerHTML),e),[]))}g.length&&(n.fixedRowsTop=g.length),c.length&&(n.fixedRowsBottom=c.length);let C=[...g,...Array.from(a.tBodies).reduce((e,t)=>(Array.from(t.rows).forEach(t=>{e.push(t)}),e),[]),...c],b=Array.from({length:f=C.length},()=>Array.from({length:u})),y=[],w=[];for(let e=0;e<f;e++){let t=Array.from(C[e].cells),r=t.length;for(let n=0;n<r;n++){let r=t[n],{nodeName:o,innerHTML:i,rowSpan:s,colSpan:a}=r,h=b[e].findIndex(e=>void 0===e);if("TD"===o){if(s>1||a>1){for(let t=e;t<e+s;t++)if(t<f)for(let e=h;e<h+a;e++)b[t][e]=null;let t=r.getAttribute("style");t&&t.includes("mso-ignore:colspan")||y.push({col:h,row:e,rowspan:s,colspan:a})}let t="";t=l&&/excel/gi.test(l.content)?i.replace(/[\r\n][\x20]{0,2}/g," ").replace(/<br(\s*|\/)>[\r\n]?[\x20]{0,3}/gim,"\r\n"):i.replace(/<br(\s*|\/)>[\r\n]?/gim,"\r\n"),b[e][h]=t.replace(ny,e=>nb[e])}else w.push(i)}}return y.length&&(n.mergeCells=y),w.length&&(n.rowHeaders=w),b.length&&(n.data=b),n}function nM(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];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 nN(e){return nM(e,[","])}function nI(e,t){return"."===t&&"string"==typeof e&&/^[+-]?[1-9]\d{0,2}(,\d{3})+$/.test(e.trim())}function nx(e,t){return","===t&&"string"==typeof e&&/^[+-]?[1-9]\d{0,2}(\.\d{3})+$/.test(e.trim())}function nO(e,t){return","===t&&"string"==typeof e&&/^[+-]?[1-9]\d{0,2}(\.\d{3})+,\d+$/.test(e.trim())}function nk(e,t,r){let n,o,i;for("function"==typeof t?(n=-1,o=e,i=t):(n=e-1,o=t,i=r);++n<=o&&!1!==i(n););}function n_(e,t,r){let n,o,i=e+1;for("function"==typeof t?(o=t,n=0):(o=r,n=t);--i>=n&&!1!==o(i););}function nH(e,t){return Number.parseInt(String(e*(t=isNaN(t=Number.parseInt(t.toString().replace("%",""),10))?0:t)/100),10)}function nL(e,t,r){return Math.min(e,t)===e?t:Math.max(e,r)===e?r:e}function nP(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{decimalSeparator:r}=t,n=e.trim();if(nI(e,r))return Number.parseFloat(n.replaceAll(",",""));if(nx(e,r))return Number.parseFloat(n.replaceAll(".",""));if(nO(e,r))return Number.parseFloat(n.replaceAll(".","").replace(",","."));let o=n.replace(",",".");return!1===isNaN(Number.parseFloat(o))?Number.parseFloat(o):null}function nD(e){return Number.isInteger(e)&&"number"==typeof e&&e>=0}let nF=new Map([["asc",[-1,1]],["desc",[1,-1]]]),nV=e=>`The priority '${e}' is already declared in a map.`,nB=e=>`The priority '${e}' is not a number.`,nU=e=>`The id '${e}' is already declared in a map.`;function nz(){let{errorIdExists:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=new Map,r=rL(e)?e:nU;function n(){return[...t]}function o(e){return t.has(e)}return{addItem:function(e,n){o(e)&&eN(String(r(e))),t.set(e,n)},clear:function(){t.clear()},getId:function(e){let[t]=n().find(t=>{let[r,n]=t;return e===n&&r})||[null];return t},getItem:function(e){return t.get(e)},getItems:n,getValues:function(){return[...t.values()]},hasItem:o,removeItem:function(e){return t.delete(e)}}}let nW=e=>`'${e}' value is already declared in a unique set.`,nG=e=>`There is already registered "${e}" plugin.`,n$=function(){let{errorPriorityExists:e,errorPriorityNaN:t}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=new Map,n=rL(e)?e:nV,o=rL(t)?t:nB;return{addItem:function(e,t){nM(e)||eN(String(o(e))),r.has(e)&&eN(String(n(e))),r.set(e,t)},getItems:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"asc",[t,n]=nF.get(e)||nF.get("asc");return[...r].sort((e,r)=>e[0]<r[0]?t:n).map(e=>e[1])}}}({errorPriorityExists:e=>`There is already registered plugin on priority "${e}".`,errorPriorityNaN:e=>`The priority "${e}" is not a number.`}),nj=function(){let{errorItemExists:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=new Set,r=rL(e)?e:nW;return{addItem:function(e){t.has(e)&&eN(String(r(e))),t.add(e)},clear:function(){t.clear()},getItems:function(){return[...t]}}}({errorItemExists:nG}),nY=nz({errorIdExists:nG});function nq(){return[...n$.getItems(),...nj.getItems()]}function nK(e){let t=th(e);return nY.getItem(t)}function nX(e,t,r){var n,o,i,s,a,l;let h,[d,u,c]=(n=e,o=t,i=r,"function"==typeof n&&(n=(o=n).PLUGIN_KEY,i=o.PLUGIN_PRIORITY),[n,o,i]);void 0===nK(d)&&(s=d,a=u,l=c,h=th(s),nY.hasItem(h)&&eN(nG(h)),void 0===l?nj.addItem(h):n$.addItem(l,h),nY.addItem(h,a))}let{register:nQ,getItem:nZ,hasItem:nJ,getNames:n0,getValues:n1}=nr("renderers");function n2(e){return"function"==typeof e?e:(nJ(e)||eN(`No registered renderer found under "${e}" name`),nZ(e))}function n3(e,t){"string"!=typeof e&&(t=e,e=e.RENDERER_TYPE),nQ(e,t)}let{register:n6,getItem:n5,hasItem:n4,getNames:n9,getValues:n7}=nr("validators");function n8(e){return"function"==typeof e?e:(n4(e)||eN(`No registered validator found under "${e}" name`),n5(e))}function oe(e,t){"string"!=typeof e&&(t=e,e=e.VALIDATOR_TYPE),n6(e,t)}function ot(e,t,r,n,o){let i=0;for(let s=r;s<=n;s++){let r=e.getCell({row:t,col:s},!0);if(!(r instanceof HTMLElement))continue;let n=r.offsetWidth;if(o<i+n)return s;i+=n}return null}function or(e,t,r,n,o){let i=0;for(let s=r;s<=n;s++){let r=e.getCell({row:s,col:t},!0);if(!(r instanceof HTMLElement))continue;let n=r.offsetHeight;if(o<i+n)return s;i+=n}return null}let on=class{#h;#d;#u;#c;#g;#p;#m;#f=null;#C=[null,null];#b=[null,null];#y=null;#w=!1;#S=null;#v=!1;#R=null;#E=!1;#T=null;constructor(e,t,r,n,o,i,s=null){this.#h=r,this.#d=t,this.#u=o,this.#c=i,this.#g=s,this.#p=n,this.#m=e,this.registerEvents()}registerEvents(){this.#p.addEventListener(this.#u.holder,"contextmenu",e=>this.onContextMenu(e)),this.#p.addEventListener(this.#u.TABLE,"mouseover",e=>this.onMouseOver(e)),this.#p.addEventListener(this.#u.TABLE,"mouseout",e=>this.onMouseOut(e)),this.#u.isMaster&&(this.#p.addEventListener(this.#d.rootDocument,"mousemove",e=>this.onMouseMove(e)),this.#p.addEventListener(this.#d.rootDocument,"mouseup",()=>{this.#E=!1,this.#T=null}));let e=()=>{this.#p.addEventListener(this.#u.holder,"touchstart",e=>this.onTouchStart(e)),this.#p.addEventListener(this.#u.holder,"touchend",e=>this.onTouchEnd(e)),this.#p.addEventListener(this.#u.holder,"touchmove",e=>this.onTouchMove(e)),this.#p.addEventListener(this.#u.holder,"scroll",()=>this.onHolderScroll())},t=()=>{this.#p.addEventListener(this.#u.holder,"mouseup",e=>this.onMouseUp(e)),this.#p.addEventListener(this.#u.holder,"mousedown",e=>this.onMouseDown(e))};tn()?e():(eQ()&&e(),t())}selectedCellWasTouched(e){let t=this.parentCell(e).coords;if(this.#f&&t){let[e,r]=[t.row,this.#f.from.row],[n,o]=[t.col,this.#f.from.col];return e===r&&n===o}return!1}parentCell(e){let t={coords:null,TD:null},r=tL(e,["TD","TH"],this.#u.TABLE);if(r)t.coords=this.#u.getCoords(r),t.TD=r;else if(tW(e,"wtBorder")&&tW(e,"current")){let e=this.#c.getFocusSelection()?.cellRange;e&&(t.coords=e.highlight,t.TD=this.#u.getCell(t.coords))}else if(tW(e,"wtBorder")&&tW(e,"area")){let e=this.#c.getAreaSelection()?.cellRange;e&&(t.coords=e.to,t.TD=this.#u.getCell(t.coords))}return t}onMouseDown(e){let t=this.#d.rootDocument.activeElement,r=tx(e),n=tx(e);if(t&&!["TD","TH"].includes(t.nodeName)&&(n===t||tN(r,0)===t||tN(r,1)===t))return;let o=this.parentCell(n);tW(n,"corner")?this.#h.getSetting("onCellCornerMouseDown",e,n):o.TD&&(this.#E=!0,this.#T=null,this.#h.has("onCellMouseDown")&&this.callListener("onCellMouseDown",e,o.coords,o.TD)),(0===e.button||this.touchApplied)&&o.TD&&(this.#b[0]=o.TD,null!==this.#C[0]&&clearTimeout(this.#C[0]),this.#C[0]=setTimeout(()=>{this.#b[0]=null},1e3))}onContextMenu(e){if(this.#A(),this.#h.has("onCellContextMenu")){let t=this.parentCell(tx(e));t.TD&&this.callListener("onCellContextMenu",e,t.coords,t.TD)}}onMouseOver(e){if(!this.#h.has("onCellMouseOver"))return;let t=this.#u.TABLE,r=tL(tx(e),["TD","TH"],t),n=this.#g||this;if(r&&r!==n.lastMouseOver&&tD(r,t)){n.lastMouseOver=r;let t=this.#u.getCoords(r);t&&this.callListener("onCellMouseOver",e,t,r)}}onMouseMove(e){if(!this.#E)return;let{coords:t,isOutside:r}=this.#M(e.clientX,e.clientY);if(r){let r=this.#T;if(!r||r.row!==t.row||r.col!==t.col){let r=this.#u.getCell(t);r instanceof HTMLElement&&(this.#T={row:t.row,col:t.col},this.callListener("onCellMouseOverOutside",e,t,r))}}else this.#T=null}#M(e,t){let r=this.#h.getSetting("rtlMode"),n=this.#m(),o=this.#h.getSetting("fixedColumnsStart"),i=this.#h.getSetting("fixedRowsTop"),s=this.#h.getSetting("fixedRowsBottom"),a=n.wtScroll.getFirstPartiallyVisibleRow(),l=n.wtScroll.getLastPartiallyVisibleRow(),h=n.wtScroll.getFirstPartiallyVisibleColumn(),d=n.wtScroll.getLastPartiallyVisibleColumn(),u=this.#u.wtRootElement.getBoundingClientRect(),c=this.#h.getSetting("columnHeaders").length>0?n.wtViewport.getColumnHeaderHeight():0,g=this.#h.getSetting("rowHeaders").length>0?n.wtViewport.getRowHeaderWidth():0,{rootWindow:p}=this.#d,m=n.wtViewport.isHorizontallyScrollableByWindow()?Math.min(0,u.left):u.left,f=n.wtViewport.isVerticallyScrollableByWindow()?Math.min(0,u.top):u.top,C=n.wtViewport.isHorizontallyScrollableByWindow()?p.innerWidth:u.left+n.wtViewport.getViewportWidth()+g,b=n.wtViewport.isVerticallyScrollableByWindow()?p.innerHeight:u.top+n.wtViewport.getViewportHeight()+c,y=nL(e,m,C),w=nL(t,f,b),S=null;if(o>0){let e=n.getCell({row:a,col:0},!0);if(e instanceof HTMLElement){let t=e.getBoundingClientRect();S=ot(n,a,0,o-1,r?t.right-y:y-t.left)}}if(null===S){let e=n.getCell({row:a,col:h},!0);if(e instanceof HTMLElement){let t=e.getBoundingClientRect(),o=r?t.right-y:y-t.left;null===(S=ot(n,a,h,d,o))&&(S=o<0?h:d)}else S=h}let R=null;if(i>0){let e=n.getCell({row:0,col:h},!0);e instanceof HTMLElement&&(R=or(n,h,0,i-1,w-e.getBoundingClientRect().top))}if(null===R&&s>0){let e=this.#h.getSetting("totalRows"),t=e-s,r=e-1,o=n.getCell({row:t,col:h},!0);if(o instanceof HTMLElement){let e=w-o.getBoundingClientRect().top;e>=0&&null===(R=or(n,h,t,r,e))&&(R=r)}}if(null===R){let e=n.getCell({row:a,col:h},!0);e instanceof HTMLElement?null===(R=or(n,h,a,l,w-e.getBoundingClientRect().top))&&(R=l):R=a}return{coords:n.createCellCoords(R,S),isOutside:e<m||e>C||t<f||t>b}}onMouseOut(e){if(!this.#h.has("onCellMouseOut"))return;let t=this.#u.TABLE,r=tL(tx(e),["TD","TH"],t),n=tL(e.relatedTarget,["TD","TH"],t),o=this.#g||this;if(r&&r!==n&&tD(r,t)){let t=this.#u.getCoords(r);t&&this.callListener("onCellMouseOut",e,t,r),null===n&&(o.lastMouseOver=null)}}onMouseUp(e){this.#E=!1,this.#T=null;let t=this.parentCell(tx(e));t.TD&&this.#h.has("onCellMouseUp")&&this.callListener("onCellMouseUp",e,t.coords,t.TD),(0===e.button||this.touchApplied)&&(t.TD&&t.TD===this.#b[0]&&t.TD===this.#b[1]?(tW(tx(e),"corner")?this.callListener("onCellCornerDblClick",e,t.coords,t.TD):this.callListener("onCellDblClick",e,t.coords,t.TD),this.#b[0]=null,this.#b[1]=null):t.TD&&t.TD===this.#b[0]&&(this.#b[1]=t.TD,null!==this.#C[1]&&clearTimeout(this.#C[1]),this.#C[1]=setTimeout(()=>{this.#b[1]=null},500)))}onTouchStart(e){this.#f=this.#c.getFocusSelection()?.cellRange??null,this.touchApplied=!0,this.#v=!1,this.#w=!1,this.#R=e,this.#N(e)}onTouchEnd(e){let t=this.#v,r=!t&&!this.#w&&null!==this.#R,n=this.#R;this.#A(),this.#R=null,r&&null!==n&&this.onMouseDown(n);let o=tx(e),i=this.parentCell(o)?.coords,s=null!=i&&(i.row??-1)>=0&&(i.col??-1)>=0;e.cancelable&&s&&this.#h.getSetting("isDataViewInstance")&&(to()&&(e4()||e7())&&this.selectedCellWasTouched(o)&&!["A","BUTTON","INPUT"].includes(o.tagName)?e.preventDefault():this.selectedCellWasTouched(o)||"INPUT"===o.tagName&&"checkbox"===o.type||e.preventDefault()),(!t||this.#w)&&this.onMouseUp(e),this.touchApplied=!1,this.#v=!1,this.#w=!1}#N(e){this.#A();let t=e.touches[0];t&&(this.#S={x:t.clientX,y:t.clientY},this.#y=setTimeout(()=>{this.#y=null,this.#w=!0,this.#S=null,this.onMouseDown(e),this.#b[0]=null,this.#b[1]=null,null!==this.#C[0]&&clearTimeout(this.#C[0]),null!==this.#C[1]&&clearTimeout(this.#C[1]);let r=e.target;if(!r)return;let n=new MouseEvent("contextmenu",{bubbles:!0,cancelable:!0,clientX:t.clientX,clientY:t.clientY,screenX:t.screenX,screenY:t.screenY});r.dispatchEvent(n)},500))}onHolderScroll(){this.momentumScrolling||(this.momentumScrolling={}),this.touchApplied&&(this.#v=!0),this.#A(),clearTimeout(this.momentumScrolling._timeout),this.momentumScrolling.ongoing||this.#h.getSetting("onBeforeTouchScroll"),this.momentumScrolling.ongoing=!0,this.momentumScrolling._timeout=setTimeout(()=>{this.touchApplied||(this.momentumScrolling.ongoing=!1,this.#h.getSetting("onAfterMomentumScroll"))},200)}#A(){null!==this.#y&&(clearTimeout(this.#y),this.#y=null),this.#S=null}onTouchMove(e){if(null===this.#S)return;let t=e.touches[0];if(!t){this.#v=!0,this.#A();return}let r=Math.abs(t.clientX-this.#S.x),n=Math.abs(t.clientY-this.#S.y);(r>10||n>10)&&(this.#v=!0,this.#A())}callListener(e,t,r,n){let o=this.#h.getSettingPure(e);o&&o(t,r,n,this.#m())}destroy(){null!==this.#C[0]&&clearTimeout(this.#C[0]),null!==this.#C[1]&&clearTimeout(this.#C[1]),this.#A(),this.momentumScrolling&&clearTimeout(this.momentumScrolling._timeout),this.#p.destroy()}},oo=class{offset;total;countTH;constructor(e,t,r){this.offset=e,this.total=t,this.countTH=r}offsetted(e){return e+this.offset}unOffsetted(e){return e-this.offset}renderedToSource(e){return this.offsetted(e)}sourceToRendered(e){return this.unOffsetted(e)}offsettedTH(e){return e-this.countTH}unOffsettedTH(e){return e+this.countTH}visibleRowHeadedColumnToSourceColumn(e){return this.renderedToSource(this.offsettedTH(e))}sourceColumnToVisibleRowHeadedColumn(e){return this.unOffsettedTH(this.sourceToRendered(e))}},oi=class{offset;total;countTH;constructor(e,t,r){this.offset=e,this.total=t,this.countTH=r}offsetted(e){return e+this.offset}unOffsetted(e){return e-this.offset}renderedToSource(e){return this.offsetted(e)}sourceToRendered(e){return this.unOffsetted(e)}offsettedTH(e){return e-this.countTH}unOffsettedTH(e){return e+this.countTH}visibleColHeadedRowToSourceRow(e){return this.renderedToSource(this.offsettedTH(e))}sourceRowToVisibleColHeadedRow(e){return this.unOffsettedTH(this.sourceToRendered(e))}};class os{nextSize=0;nextOffset=0;setSize(e){this.nextSize=e}setOffset(e){this.nextOffset=e}}class oa{size=new os;workingSpace=0;sharedSize=null;setSize(e){this.size.setSize(e)}setOffset(e){this.size.setOffset(e)}getViewSize(){return this.size}isShared(){return null!==this.sharedSize}isPlaceOn(e){return this.workingSpace===e}append(e){this.workingSpace=1,e.workingSpace=2,this.sharedSize=e.getViewSize()}prepend(e){this.workingSpace=2,e.workingSpace=1,this.sharedSize=e.getViewSize()}}class ol{rootNode;nodesPool;sizeSet=new oa;collectedNodes=[];childNodeType;visualIndex=0;constructor(e,t,r){this.rootNode=e,this.nodesPool=t,this.childNodeType="string"==typeof r?r.toUpperCase():r}setSize(e){return this.sizeSet.setSize(e),this}setOffset(e){return this.sizeSet.setOffset(e),this}isSharedViewSet(){return this.sizeSet.isShared()}getNode(e){return e<this.collectedNodes.length?this.collectedNodes[e]:null}getCurrentNode(){let e=this.collectedNodes.length;return e>0?this.collectedNodes[e-1]:null}getRenderedChildCount(){let{rootNode:e,sizeSet:t}=this,r=0;if(this.isSharedViewSet()){let n=e.firstElementChild;for(;n;){if(n.tagName===this.childNodeType)r+=1;else if(t.isPlaceOn(1))break;n=n.nextElementSibling}}else r=e.childElementCount;return r}start(){this.collectedNodes.length=0,this.visualIndex=0;let{rootNode:e,sizeSet:t}=this,r=this.isSharedViewSet(),{nextSize:n}=t.getViewSize(),o=this.getRenderedChildCount();for(;o<n;){let n=this.nodesPool();!r||t.isPlaceOn(2)?e.appendChild(n):e.insertBefore(n,e.firstChild),o+=1}let i=r&&t.isPlaceOn(1);for(;o>n;){let t=i?e.firstChild:e.lastChild;t&&e.removeChild(t),o-=1}}render(){let{rootNode:e,sizeSet:t}=this,r=this.visualIndex;this.isSharedViewSet()&&t.isPlaceOn(2)&&t.sharedSize&&(r+=t.sharedSize.nextSize);let n=e.children[r];if(n){if(n.tagName!==this.childNodeType){let e=this.nodesPool();n.replaceWith(e),n=e}}else n=this.nodesPool(),e.appendChild(n);this.collectedNodes.push(n),this.visualIndex+=1}end(){}}class oh extends ol{prependView(e){return this.sizeSet.prepend(e.sizeSet),e.sizeSet.append(this.sizeSet),this}appendView(e){return this.sizeSet.append(e.sizeSet),e.sizeSet.prepend(this.sizeSet),this}}class od{nodeType;constructor(e){this.nodeType=e.toUpperCase()}setRootDocument(e){this.rootDocument=e}obtain(e,t){return this.rootDocument.createElement(this.nodeType)}}class ou{nodesPool=null;renderedNodes=0;constructor(e,t){this.nodesPool="string"==typeof e?new od(e):null,this.nodeType=e,void 0!==t&&(this.rootNode=t)}setTable(e){this.nodesPool&&this.nodesPool.setRootDocument(e.rootDocument),this.table=e}render(){}}class oc extends ou{orderViews=new WeakMap;constructor(){super("TH")}obtainOrderView(e){return this.orderViews.has(e)||this.orderViews.set(e,new oh(e,()=>this.nodesPool.obtain(),this.nodeType)),this.orderViews.get(e)}render(){let{rowsToRender:e,rowHeaderFunctions:t,rowHeadersCount:r,rows:n,cells:o}=this.table;for(let i=0;i<e;i++){let e=this.table.renderedRowToSource(i),s=n.getRenderedNode(i);if(!s)continue;let a=this.obtainOrderView(s),l=o.obtainOrderView(s);a.appendView(l).setSize(r).setOffset(0).start();for(let n=0;n<r;n++){a.render();let r=a.getCurrentNode();r&&(r.className="",r.removeAttribute("style"),tY(r,[/aria-(.*)/,/role/]),this.table.isAriaEnabled()&&tj(r,[M(),_(),U(n+1),R(-1)]),t[n](e,r,n))}a.end()}}}class og extends ou{orderView;constructor(e){super("TR",e),this.orderView=new ol(e,()=>this.nodesPool.obtain(),this.nodeType)}getRenderedNode(e){return this.orderView.getNode(e)}render(){let{columnHeadersCount:e}=this.table;this.table.isAriaEnabled()&&tj(this.rootNode,[N()]),this.orderView.setSize(e).setOffset(0).start();for(let t=0;t<e;t++){this.orderView.render();let e=this.orderView.getCurrentNode();e&&this.table.isAriaEnabled()&&tj(e,[x(),B(t+1)])}this.orderView.end()}}class op extends ou{orderViews=new WeakMap;constructor(){super("TH")}obtainOrderView(e){return this.orderViews.has(e)||this.orderViews.set(e,new ol(e,()=>this.nodesPool.obtain(),this.nodeType)),this.orderViews.get(e)}render(){let{columnHeadersCount:e,columnHeaderFunctions:t,columnsToRender:r,rowHeadersCount:n,columnHeaderRows:o}=this.table,i=r+n;for(let r=0;r<e;r++){let e=o.getRenderedNode(r);if(!e)continue;let s=this.obtainOrderView(e);s.setSize(i).setOffset(0).start();for(let e=0;e<i;e++){s.render();let o=e-n,i=this.table.renderedColumnToSource(o),a=s.getCurrentNode();a&&(a.className="",a.removeAttribute("style"),tY(a,[/aria-(.*)/,/role/]),this.table.isAriaEnabled()&&tj(a,[U(e+1),R(-1),I(),...o>=0?[k()]:[A(),H("Select whole grid")]]),t[r](i,a,r))}s.end()}}}let om=!1;class of extends ou{orderView;constructor(e){super("COL",e),this.orderView=new ol(e,()=>this.nodesPool.obtain(),this.nodeType)}render(){let{columnsToRender:e,rowHeadersCount:t}=this.table,r=e+t;!om&&e>1e3&&(om=!0,tR(eu`Performance tip: Handsontable rendered more than 1000 visible columns.\x20
|
|
55
55
|
Consider limiting the number of rendered columns by specifying the table width and/or\x20
|
|
@@ -62,7 +62,7 @@
|
|
|
62
62
|
Cell type must be an object or a string mapped to an object registered by
|
|
63
63
|
"Handsontable.cellTypes.registerCellType" method`),lI(e)}function lH(e,t){"string"!=typeof e&&(e=(t=e).CELL_TYPE);let{editor:r,renderer:n,validator:o}=t;r&&ng(e,r),n&&n3(e,n),o&&oe(e,o),lN(e,t)}function lL(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e,n="string"==typeof t.type?l_(t.type):t.type;if(e._automaticallyAssignedMetaProps&&eB(t,(t,r)=>{e._automaticallyAssignedMetaProps.delete(r)}),!eF(n))return;r!==e||e._automaticallyAssignedMetaProps||(e._automaticallyAssignedMetaProps=new Set);let o={};eB(n,(t,n)=>{"CELL_TYPE"!==n&&(r._automaticallyAssignedMetaProps?.has(n)||!e$(r,n))&&(o[n]=t,e._automaticallyAssignedMetaProps?.add(n))}),eO(e,o)}function lP(e,t){e()||eN(`Assertion failed: ${t}`)}function lD(e){return null==e}let lF=()=>({_automaticallyAssignedMetaProps:void 0,_userDefinedMetaProps:void 0,activeHeaderClassName:"ht__active_highlight",allowEmpty:!0,allowHtml:!1,allowInsertColumn:!0,allowInsertRow:!0,allowInvalid:!0,allowRemoveColumn:!0,allowRemoveRow:!0,ariaTags:!0,autoColumnSize:void 0,autoRowSize:void 0,autoWrapCol:!1,autoWrapRow:!1,bindRowsWithHeaders:void 0,cell:[],cells:void 0,checkedTemplate:void 0,className:void 0,colHeaders:null,collapsibleColumns:void 0,columnHeaderHeight:void 0,columns:void 0,columnSorting:void 0,columnSummary:void 0,colWidths:void 0,commentedCellClassName:"htCommentCell",comments:!1,contextMenu:void 0,copyable:!0,copyPaste:!0,currentColClassName:void 0,currentHeaderClassName:"ht__highlight",currentRowClassName:void 0,customBorders:!1,data:void 0,dataProvider:void 0,dataDotNotation:!0,dataSchema:void 0,dateFormat:{year:"numeric",month:"2-digit",day:"2-digit"},timeFormat:{hour:"2-digit",minute:"2-digit"},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,fillHandle:{autoInsertRow:!1},filter:!0,filteringCaseSensitive:!1,filters:void 0,filterSelectedItems:!0,fixedColumnsLeft:0,fixedColumnsStart:0,fixedRowsBottom:0,fixedRowsTop:0,formulas:void 0,fragmentSelection:!1,hashLength:void 0,hashRevealDelay:void 0,hashSymbol:"*",headerClassName:void 0,height:void 0,hiddenColumns:void 0,hiddenRows:void 0,initialState:void 0,invalidCellClassName:"htInvalid",imeFastEdit:!1,isEmptyCol(e){let t,r,n=!!this.getSettings().dataSchema,o=this.getSchema(),i=this.colToProp(e),s=this.countRows();for(t=0;t<s;t++)if(!1===ef(r=this.getDataAtCell(t,e))){if("object"==typeof r){if(!1===eP(o[i],r))return!1;continue}if(n&&o[i]===r)continue;return!1}return!0},isEmptyRow(e){let t,r,n=!!this.getSettings().dataSchema,o=this.getSchema(),i=this.countCols();for(t=0;t<i;t++)if(!1===ef(r=this.getDataAtCell(e,t))){let e=this.colToProp(t);if("object"==typeof r){if(!1===eP(o[e],r))return!1;continue}if(n&&o[e]===r)continue;return!1}return!0},label:void 0,language:"en-US",layoutDirection:"inherit",layout:void 0,licenseKey:void 0,locale:"en-US",loading:!1,notification:!1,manualColumnFreeze:void 0,manualColumnMove:void 0,manualColumnResize:void 0,manualRowMove:void 0,manualRowResize:void 0,maxCols: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,observeDOMVisibility:!0,outsideClickDeselects:!0,pagination:void 0,placeholder:void 0,placeholderCellClassName:"htPlaceholder",preventOverflow:!1,preventWheel:!1,readOnly:!1,readOnlyCellClassName:"htDimmed",renderAllRows:!1,renderAllColumns:!1,renderer:void 0,valueFormatter:void 0,valueParser:void 0,rowHeaders:void 0,rowHeaderWidth:void 0,rowHeights:void 0,search:!1,searchInput:!0,selectionMode:"multiple",selectOptions:void 0,skipColumnOnPaste:!1,skipRowOnPaste:!1,sortByRelevance:!0,sourceSortFunction:void 0,source:void 0,startCols:5,startRows:5,stretchH:"none",strict:void 0,tableClassName:void 0,textEllipsis:!1,themeName:void 0,theme: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,viewportColumnRenderingOffset:"auto",viewportRowRenderingOffset:"auto",viewportColumnRenderingThreshold:0,viewportRowRenderingThreshold:0,visibleRows:10,width:void 0,wordWrap:!0,sanitizer:void 0,parsePastedValue:!1});class lV{metaCtor=class{};constructor(e){this.meta=this.metaCtor.prototype,eO(this.meta,lF()),this.meta.instance=e}getMetaConstructor(){return this.metaCtor}getMeta(){return this.meta}updateMeta(e){eO(this.meta,e),lL(this.meta,{...e,type:e.type??this.meta.type},e)}}class lB{constructor(e){const t=e.getMetaConstructor();this.meta=new t}getMeta(){return this.meta}updateMeta(e){eO(this.meta,e),lL(this.meta,e,e)}}class lU{data=[];index=[];holes=new Set;constructor(e){this.valueFactory=e}obtain(e){let t;lP(()=>nD(e),"Expecting an unsigned number.");let r=this._getStorageIndexByKey(e);if(r>=0)void 0===(t=this.data[r])&&(t=this.valueFactory(e),this.data[r]=t);else{t=this.valueFactory(e);let r=this.holes.size>0?this.holes.values().next().value:void 0;void 0!==r?(this.holes.delete(r),this.data[r]=t,this.index[e]=r):(this.data.push(t),this.index[e]=this.data.length-1)}return t}insert(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;lP(()=>nD(e)||lD(e),"Expecting an unsigned number or null/undefined argument.");let r=[],n=this.data.length;for(let e=0;e<t;e++)r.push(n+e),this.data.push(void 0);let o=lD(e)?this.index.length:e;this.index=[...this.index.slice(0,o),...r,...this.index.slice(o)]}remove(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;lP(()=>nD(e)||lD(e),"Expecting an unsigned number or null/undefined argument.");let r=this.index.splice(lD(e)?this.index.length-t:e,t);for(let e=0;e<r.length;e++){let t=r[e];"number"==typeof t&&this.holes.add(t)}}size(){return this.data.length-this.holes.size}values(){return this.data.filter((e,t)=>void 0!==e&&!this.holes.has(t))[Symbol.iterator]()}entries(){let e=[];for(let t=0;t<this.data.length;t++){let r=this._getKeyByStorageIndex(t),n=this.data[t];-1!==r&&void 0!==n&&e.push([r,n])}let t=0,r={next(){if(t<e.length){let r=e[t];return t+=1,{value:r,done:!1}}return{done:!0,value:void 0}},[Symbol.iterator]:()=>r};return r}clear(){this.data=[],this.index=[],this.holes.clear()}_getStorageIndexByKey(e){return this.index.length>e?this.index[e]:-1}_getKeyByStorageIndex(e){return this.index.indexOf(e)}[Symbol.iterator](){return this.entries()}}let lz=["data","width"];class lW{metas=new lU(()=>this._createMeta());constructor(e){this.globalMeta=e,this.metas=new lU(()=>this._createMeta())}updateMeta(e,t){let r=this.getMeta(e);eO(r,t),lL(r,t)}createColumn(e,t){this.metas.insert(e,t)}removeColumn(e,t){this.metas.remove(e,t)}getMeta(e){return this.metas.obtain(e)}getMetaConstructor(e){return this.metas.obtain(e).constructor}clearCache(){this.metas.clear()}_createMeta(){return function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];function r(){}ex(r,e);for(let e=0;e<t.length;e++)r.prototype[t[e]]=void 0;return r}(this.globalMeta.getMetaConstructor(),lz).prototype}}class lG{metas=new lU(()=>this._createRow());#e8=0;constructor(e){this.columnMeta=e}enableUserDefinedMetaRecording(){this.#e8>0&&(this.#e8-=1)}disableUserDefinedMetaRecording(){this.#e8+=1}updateMeta(e,t,r){let n=this.getMeta(e,t);eO(n,r),lL(n,r)}createRow(e,t){this.metas.insert(e,t)}createColumn(e,t){for(let r=0;r<this.metas.size();r++)this.metas.obtain(r).insert(e,t)}removeRow(e,t){this.metas.remove(e,t)}removeColumn(e,t){for(let r=0;r<this.metas.size();r++)this.metas.obtain(r).remove(e,t)}getMeta(e,t,r){let n=this.metas.obtain(e).obtain(t);return void 0===r?n:n[r]}setMeta(e,t,r,n){let o=this.metas.obtain(e).obtain(t);o._automaticallyAssignedMetaProps?.delete(r),o[r]=n,0===this.#e8?(void 0===o._userDefinedMetaProps&&(o._userDefinedMetaProps=new Set),o._userDefinedMetaProps.add(r)):o._userDefinedMetaProps?.delete(r)}removeMeta(e,t,r){let n=this.metas.obtain(e).obtain(t);delete n[r],n._userDefinedMetaProps?.delete(r)}getMetas(){let e=[],t=Array.from(this.metas.values());for(let r=0;r<t.length;r++)ep(t[r])&&e.push(...Array.from(t[r].values()));return e}getMetasAtRow(e){lP(()=>nD(e),"Expecting an unsigned number.");let t=new Map(this.metas);return t.has(e)?Array.from(t.get(e)).sort((e,t)=>{let[r]=e,[n]=t;return r-n}).map(e=>{let[,t]=e;return t}):[]}getUserDefinedMetas(){let e=[];for(let[t,r]of this.metas)for(let[n,o]of r){let r=o._userDefinedMetaProps;void 0!==r&&r.forEach(r=>{e$(o,r)&&e.push({physicalRow:t,physicalColumn:n,key:r,value:o[r]})})}return e}clearCache(){this.metas.clear()}_createRow(){return new lU(e=>this._createMeta(e))}_createMeta(e){return new(this.columnMeta.getMetaConstructor(e))}}class l${constructor(e,t={},r=[]){this.hot=e,this.globalMeta=new lV(e),this.tableMeta=new lB(this.globalMeta),this.columnMeta=new lW(this.globalMeta),this.cellMeta=new lG(this.columnMeta),r.forEach(e=>new e(this)),this.globalMeta.updateMeta(t)}getGlobalMeta(){return this.globalMeta.getMeta()}updateGlobalMeta(e){this.globalMeta.updateMeta(e)}getTableMeta(){return this.tableMeta.getMeta()}updateTableMeta(e){this.tableMeta.updateMeta(e)}getColumnMeta(e){return this.columnMeta.getMeta(e)}updateColumnMeta(e,t){this.columnMeta.updateMeta(e,t)}getCellMeta(e,t,r){let n=this.cellMeta.getMeta(e,t);return n.visualRow=r.visualRow,n.visualCol=r.visualColumn,n.row=e,n.col=t,r.skipMetaExtension||this.runLocalHooks("afterGetCellMeta",n),n}getCellMetaKeyValue(e,t,r){return"string"!=typeof r&&eN("The passed cell meta object key is not a string"),this.cellMeta.getMeta(e,t,r)}setCellMeta(e,t,r,n){this.cellMeta.setMeta(e,t,r,n)}updateCellMeta(e,t,r){this.cellMeta.updateMeta(e,t,r)}removeCellMeta(e,t,r){this.cellMeta.removeMeta(e,t,r)}getCellsMeta(){return this.cellMeta.getMetas()}getCellsMetaAtRow(e){return this.cellMeta.getMetasAtRow(e)}getUserDefinedCellMetas(){return this.cellMeta.getUserDefinedMetas()}enableUserDefinedMetaRecording(){this.cellMeta.enableUserDefinedMetaRecording()}disableUserDefinedMetaRecording(){this.cellMeta.disableUserDefinedMetaRecording()}createRow(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;this.cellMeta.createRow(e,t)}removeRow(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;this.cellMeta.removeRow(e,t)}createColumn(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;this.cellMeta.createColumn(e,t),this.columnMeta.createColumn(e,t)}removeColumn(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;this.cellMeta.removeColumn(e,t),this.columnMeta.removeColumn(e,t)}clearCellsCache(){this.cellMeta.clearCache()}clearCache(){this.cellMeta.clearCache(),this.columnMeta.clearCache()}}eL(l$,iB);class lj{metaSyncMemo=new Map;constructor(e){var t=this;this.metaManager=e,e.addLocalHook("afterGetCellMeta",function(){for(var e=arguments.length,r=Array(e),n=0;n<e;n++)r[n]=arguments[n];t.extendCellMeta(r[0])}),r8.getSingleton().add("beforeRender",e=>{e&&this.metaSyncMemo.clear()},this.metaManager.hot)}extendCellMeta(e){let t=e.row,r=e.col;if(this.metaSyncMemo.get(t)?.has(r))return;let n=e.visualRow,o=e.visualCol,i=this.metaManager.hot,s=i.colToProp(o);e.prop=s,i.runHooks("beforeGetCellMeta",n,o,e);let a=e$(e,"type")?e.type:null,l=rL(e.cells)?e.cells(t,r,s):null;a&&(l?l.type=l.type??a:l={type:a}),l&&this.metaManager.updateCellMeta(t,r,l),i.runHooks("afterGetCellMeta",n,o,e),this.metaSyncMemo.has(t)||this.metaSyncMemo.set(t,new Set),this.metaSyncMemo.get(t).add(r)}}class lY{metaManager;usageTracker=new Set;propDescriptors=new Map([["ariaTags",{initOnly:!0}],["fixedColumnsLeft",{target:"fixedColumnsStart",onChange(e){this.metaManager.hot.isRtl()&&"fixedColumnsLeft"===e&&eN("The `fixedColumnsLeft` is not supported for RTL. Please use option `fixedColumnsStart`."),this.usageTracker.has("fixedColumnsLeft")&&this.usageTracker.has("fixedColumnsStart")&&eN("The `fixedColumnsLeft` and `fixedColumnsStart` should not be used together. Please use only the option `fixedColumnsStart`.")}}],["layoutDirection",{initOnly:!0}],["renderAllColumns",{initOnly:!0}],["renderAllRows",{initOnly:!0}]]);constructor(e){this.metaManager=e,this.extendMetaProps()}#te=(e,t,r)=>{r||eN(`The \`${e}\` option can not be updated after the Handsontable is initialized.`)};extendMetaProps(){this.propDescriptors.forEach((e,t)=>{let{initOnly:r,target:n,onChange:o}=e,i="string"==typeof n,s=i?n:t,a=`_${s}`;this.metaManager.globalMeta.meta[a]=this.metaManager.globalMeta.meta[s],o?(this.installPropWatcher(t,a,o),i&&this.installPropWatcher(n,a,o)):r&&(this.installPropWatcher(t,a,this.#te),this.metaManager.globalMeta.meta._initOnlySettings||(this.metaManager.globalMeta.meta._initOnlySettings=[]),this.metaManager.globalMeta.meta._initOnlySettings.push(t))})}installPropWatcher(e,t,r){let{usageTracker:n}=this,o=r.bind(this);Object.defineProperty(this.metaManager.globalMeta.meta,e,{get(){return this[t]},set(r){let i=!n.has(e);n.add(e),o(e,r,i),this[t]=r},enumerable:!0,configurable:!0})}}let lq=class{dataType="array";colToProp=e=>void 0;propToCol=e=>void 0;countCachedColumns;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(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return this.data?.length?e||this.hot.hasHook("modifySourceData")||this.hot.hasHook("modifyRowData")?this.getByRange(null,null,e):this.data.map(iV):this.data}setData(e){this.data=e}getAtColumn(e){let t=[];return ee(this.data,(r,n)=>{let o=this.getAtCell(n,e);t.push(o)}),t}getAtRow(e,t,r){let n=arguments.length>3&&void 0!==arguments[3]&&arguments[3],o=void 0===t&&void 0===r,{dataDotNotation:i}=this.hot.getSettings(),s=null,a=null;if(Array.isArray(s=this.modifyRowData(e)))a=[],o?s.forEach((t,r)=>{a[r]=this.getAtPhysicalCell(e,r,s)}):nk(t,r,r=>{a[r-t]=this.getAtPhysicalCell(e,r,s)});else if(eF(s)||rL(s))if(a=n?[]:{},!o||n){let o=this.countFirstRowKeys()-1;nk(0,o,l=>{let h=this.colToProp(l);if(l>=(t||0)&&l<=(r||o)&&!Number.isInteger(h)){let t=this.getAtPhysicalCell(e,h,s);n?a.push(t):i?null!==a&&ez(a,h,t):a[h]=t}})}else eB(s,(t,r)=>{let n=this.getAtPhysicalCell(e,r,s);i?null!==a&&ez(a,r,n):a[r]=n});return a}setAtCell(e,t,r){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()||"number"==typeof t&&t>=this.countFirstRowKeys())return;if(this.hot.hasHook("modifySourceData")){let e=eG(r);this.hot.runHooks("modifySourceData",n,t,e,"set"),e.isTouched()&&(r=e.value)}let o=this.modifyRowData(n);if(Number.isInteger(t))Array.isArray(o)?o[t]=r:eF(o)&&ez(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 eF(o)&&ez(o,String(t),r)}getAtPhysicalCell(e,t,r){let n=null;if(r)if("string"==typeof t){let{dataDotNotation:e}=this.hot.getSettings();n=e?eU(r,t):r[t]}else n="function"==typeof t?t(r):r[t];if(this.hot.hasHook("modifySourceData")){let r=eG(n);this.hot.runHooks("modifySourceData",e,t,r,"get"),r.isTouched()&&(n=r.value)}return n}getAtCell(e,t){let r=this.modifyRowData(e);return this.getAtPhysicalCell(e,this.colToProp(t),r)}getByRange(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=!1,o=null,i=null,s=null,a=null;null===e||null===t?(n=!0,o=0,s=this.countRows()-1):(o=Math.min(e.row,t.row),i=Math.min(e.col,t.col),s=Math.max(e.row,t.row),a=Math.max(e.col,t.col));let l=[];return nk(o,s,e=>{l.push(n?this.getAtRow(e,void 0,void 0,r):this.getAtRow(e,i,a,r))}),l}getCopyable(e,t){let r=this.propToCol(t);return"number"==typeof r&&this.hot.getCellMeta(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 iP(this.data??[])}destroy(){this.data=null,this.hot=null}},lK=/^(\r\n|\n\r|\r|\n)/,lX=/^[^\t\r\n]+/,lQ=/^\t/;function lZ(e){let t,r,n,o,i,s="";for(t=0,r=e.length;t<r;t+=1){for(n=0,o=e[t].length;n<o;n+=1)n>0&&(s+=" "),"string"==typeof(i=e[t][n])?i.indexOf("\n")>-1?s+=`"${i.replaceAll('"','""')}"`:s+=i:null==i?s+="":s+=i;t!==r-1&&(s+="\n")}return s}function lJ(e,t){let{instance:r,visualRow:n,visualCol:o,valueSetter:i}=t;return rL(i)?i.call(r,e,n,o,t):e}function l0(e,t){let{instance:r,visualRow:n,visualCol:o,valueGetter:i}=t;return rL(i)?i.call(r,e,n,o,t):e}class l1{static get DESTINATION_RENDERER(){return 1}static get DESTINATION_CLIPBOARD_GENERATOR(){return 2}tableMeta;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&&eN("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.#tt(t,e):this.recursiveDuckColumns(e)}#tt(e,t){let r=0,n=0,o="function"==typeof e;if(o){let e=eW(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=o?e(t):e[t];if(eF(r)){if(void 0!==r.data){let e=o?n:t,i=r.data;this.colToPropCache[e]=i,this.propToColCache.set(i,e)}n+=1}}}countFirstRowKeys(){return iP(this.dataSource??[])}recursiveDuckColumns(e,t,r){let n,o=t??0,i=r??"";return"object"!=typeof e||null===e||Array.isArray(e)||eB(e,(e,t)=>{null===e?(n=i+t,this.colToPropCache.push(n),this.propToColCache.set(n,o),o+=1):"object"==typeof e&&null!==e&&(o=this.recursiveDuckColumns(e,o,`${t}.`))}),o}colToProp(e){if(!1===Number.isInteger(e))return e;let t=this.hot.toPhysicalColumn(e);return null===t?e:this.colToPropCache&&ep(this.colToPropCache[t])?this.colToPropCache[t]:t}propToCol(e){let t=this.propToColCache.get(e);if(void 0!==t)return this.hot.toVisualColumn(t);if("number"!=typeof e)return e;let r=this.hot.toVisualColumn(e);return null!==r?r:e}getSchema(){let e=this.tableMeta.dataSchema;return e?"function"==typeof e?e():e:this.duckSchema}createDuckSchema(){return this.dataSource&&this.dataSource[0]?eI(this.dataSource[0]):{}}refreshDuckSchema(){this.duckSchema=this.createDuckSchema()}createRow(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,{source:r,mode:n="above"}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=this.hot.countSourceRows(),i=o,s=0,a=e;if(("number"!=typeof a||a>=o)&&(a=o),a<this.hot.countRows()&&(i=this.hot.toPhysicalRow(a)),!1===this.hot.runHooks("beforeCreateRow",a,t,r)||null===i)return{delta:0};let l=this.tableMeta.maxRows,h=this.getSchema().length,d=[];for(;s<t&&o+s<(l??1/0);){let e=null;if("array"===this.hot.dataType)this.tableMeta.dataSchema?e=e_(this.getSchema()):(e=[],nk(h-1,()=>e.push(null)));else if("function"===this.hot.dataType){let t=this.tableMeta.dataSchema;"function"!=typeof t&&eN("`dataSchema` must be a function when `dataType` is `function`"),e=t(a+s)}else ek(e={},this.getSchema());d.push(e),s+=1}this.hot.rowIndexMapper.insertIndexes(a,s),"below"===n&&(i=Math.min(i+1,o)),this.spliceData(i,0,d);let u=this.hot.toVisualRow(i);return this.hot.countSourceRows()===d.length&&this.hot.columnIndexMapper.initToLength(this.hot.getInitialColumnCount()),s>0&&(null==e?this.metaManager.createRow(null,s):"auto"!==r&&this.metaManager.createRow(i,t)),this.hot.runHooks("afterCreateRow",u,s,r),{delta:s,startPhysicalIndex:i}}createCol(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,{source:r,mode:n="start"}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};this.hot.isColumnModificationAllowed()||eN("Cannot create new column. When data source in an object, you can only have as much columns as defined in first data row, data schema or in the 'columns' setting.If you want to be able to add new columns, you have to use array datasource.");let o=this.dataSource??[],i=this.tableMeta.maxCols,s=this.hot.countSourceCols(),a=this.hot.countCols(),l=this.hot.countSourceRows(),h="number"==typeof e&&e<=s?e:a;if(!1===this.hot.runHooks("beforeCreateCol",h,t,r))return{delta:0};let d=h<a?this.hot.toPhysicalColumn(h):s,u="end"===n?Math.min(d+1,s):d,c=0;for(let e=u;c<t&&a+c<(i??1/0);e++,c++)this.#tr(o,e,h,a+c,l);return c>0&&(null==e?this.metaManager.createColumn(null,c):"auto"!==r&&this.metaManager.createColumn(u,t)),this.hot.columnIndexMapper.insertIndexes(h,c,n),this.hot.runHooks("afterCreateCol",this.hot.toVisualColumn(u),c,r),this.refreshDuckSchema(),{delta:c,startPhysicalIndex:u}}#tr(e,t,r,n,o){if("number"!=typeof r||r>=n)if(o>0)for(let t=0;t<o;t+=1)void 0===e[t]&&(e[t]=[]),e[t].push(null);else e.push([null]);else for(let r=0;r<o;r++)e[r].splice(t,0,null)}removeRow(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,r=arguments.length>2?arguments[2]:void 0,n=Number.isInteger(e)?e:-t,o=this.visualRowsToPhysical(n,t),i=this.hot.countRows();if(n=(i+n)%i,!1===this.hot.runHooks("beforeRemoveRow",n,o.length,o,r))return!1;let s=o.length;if(this.filterData(n,s,o),n<this.hot.countRows()){this.hot.rowIndexMapper.removeIndexes(o);let e=ep(this.tableMeta.columns)||ep(this.tableMeta.dataSchema)||this.tableMeta.colHeaders;0!==this.hot.rowIndexMapper.getNotTrimmedIndexesLength()||e||this.hot.columnIndexMapper.setIndexesSequence([])}return o.slice(0).sort((e,t)=>t-e).forEach(e=>{this.metaManager.removeRow(e,1)}),this.hot.runHooks("afterRemoveRow",n,s,o,r),!0}removeCol(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,r=arguments.length>2?arguments[2]:void 0;("object"===this.hot.dataType||this.tableMeta.columns)&&eN("cannot remove column with object data source or columns option specified");let n="number"!=typeof e?-t:e;n=(this.hot.countCols()+n)%this.hot.countCols();let o=this.visualColumnsToPhysical(n,t),i=o.slice(0).sort((e,t)=>t-e);if(!1===this.hot.runHooks("beforeRemoveCol",n,t,o,r))return!1;let s=!0,a=i.length,l=this.dataSource??[];for(let e=0;e<a;e++)s&&o[0]!==o[e]-e&&(s=!1);return this.#tn(l,s,o,i,t),n<this.hot.countCols()&&(this.hot.columnIndexMapper.removeIndexes(o),this.tableMeta.rowHeaders||0!==this.hot.columnIndexMapper.getNotTrimmedIndexesLength()||this.hot.rowIndexMapper.setIndexesSequence([])),this.hot.runHooks("afterRemoveCol",n,t,o,r),this.refreshDuckSchema(),!0}#tn(e,t,r,n,o){if(t)for(let t=0,n=this.hot.countSourceRows();t<n;t++)e[t].splice(r[0],o),0===t&&this.metaManager.removeColumn(r[0],o);else{let t=n.length;for(let r=0,o=this.hot.countSourceRows();r<o;r++)for(let o=0;o<t;o++)e[r].splice(n[o],1),0===r&&this.metaManager.removeColumn(n[o],1)}}spliceCol(e,t,r){for(var n=arguments.length,o=Array(n>3?n-3:0),i=3;i<n;i++)o[i-3]=arguments[i];let s=this.hot.getDataAtCol(e),a=s.slice(t,t+r);K(o,s.slice(t+r));let l=0;for(;l<r;)o.push(null),l+=1;return q(o),this.hot.populateFromArray(t,e,o,void 0,void 0,"spliceCol"),a}spliceRow(e,t,r){for(var n=arguments.length,o=Array(n>3?n-3:0),i=3;i<n;i++)o[i-3]=arguments[i];let s=this.hot.getSourceDataAtRow(e),a=s.slice(t,t+r);K(o,s.slice(t+r));let l=0;for(;l<r;)o.push(null),l+=1;return this.hot.populateFromArray(e,t,[o],void 0,void 0,"spliceRow"),a}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 n=this.hot.runHooks("filterData",e,t,r);!1===Array.isArray(n)&&(n=this.dataSource.filter((e,t)=>-1===r.indexOf(t))),this.dataSource.length=0,Array.prototype.push.apply(this.dataSource,n)}get(e,t){let r=this.hot.toPhysicalRow(e),n=this.dataSource[r],o=this.hot.runHooks("modifyRowData",r);n="number"!=typeof o?o:n;let{dataDotNotation:i}=this.hot.getSettings(),s=null;if(n&&e$(n,t))s=n[t];else if(i&&"string"==typeof t&&t.indexOf(".")>-1){let e=n;if(!e)return null;let r=t.split(".");for(let t=0,n=r.length;t<n;t++)if(void 0===(e=e[r[t]]))return null;s=e}else"function"==typeof t&&(s=t(this.dataSource.slice(r,r+1)[0]));let a=this.propToCol(t),l="number"==typeof a?this.hot.toPhysicalColumn(a):null;if(nD(r)&&nD(l)&&(s=l0(s,this.metaManager.getCellMeta(r,l,{visualRow:e,visualColumn:a,skipMetaExtension:!0}))),this.hot.hasHook("modifyData")){let t=eG(s);this.hot.runHooks("modifyData",e,a,t,"get"),t.isTouched()&&(s=t.value)}return s}getCopyable(e,t){let r=this.propToCol(t);return"number"==typeof r&&this.hot.getCellMeta(e,r).copyable?this.get(e,t):""}set(e,t,r){let n=this.hot.toPhysicalRow(e),o=r,i=this.dataSource[n],s=this.hot.runHooks("modifyRowData",n);if(i="number"!=typeof s?s:i,this.hot.hasHook("modifyData")){let r=eG(o);this.hot.runHooks("modifyData",e,this.propToCol(t),r,"set"),r.isTouched()&&(o=r.value)}let{dataDotNotation:a}=this.hot.getSettings();if(i&&e$(i,t))i[t]=o;else if(a&&"string"==typeof t&&t.indexOf(".")>-1){let e,r=i,n=0,s=t.split(".");for(n=0,e=s.length-1;n<e;n++){if("__proto__"===s[n]||"constructor"===s[n]||"prototype"===s[n])return;void 0===r[s[n]]&&(r[s[n]]={}),r=r[s[n]]}r[s[n]]=o}else if("function"==typeof t)t(this.dataSource.slice(n,n+1)[0],o);else{if("__proto__"===t||"constructor"===t||"prototype"===t)return;i[t]=o}}visualRowsToPhysical(e,t){let r=this.hot.countRows(),n=[],o=(r+e)%r,i=t;for(;o<r&&i;)n.push(this.hot.toPhysicalRow(o)),i-=1,o+=1;return n}visualColumnsToPhysical(e,t){let r=this.hot.countCols(),n=[],o=(r+e)%r,i=t;for(;o<r&&i;){let e=this.hot.toPhysicalColumn(o);n.push(e),i-=1,o+=1}return n}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,l1.DESTINATION_RENDERER):[]}countCachedColumns(){return this.colToPropCache.length}getRange(e,t,r){let n,o,i,s=[],a=this.tableMeta.maxRows,l=this.tableMeta.maxCols;if(0===a||0===l)return[];let h=r===l1.DESTINATION_CLIPBOARD_GENERATOR?this.getCopyable:this.get,d=Math.min(Math.max((a??1/0)-1,0),Math.max(e.row,t.row)),u=Math.min(Math.max((l??1/0)-1,0),Math.max(e.col,t.col));for(n=Math.min(e.row,t.row);n<=d;n++){i=[];let r=n>=0?this.hot.toPhysicalRow(n):n;for(o=Math.min(e.col,t.col);o<=u&&null!==r;o++)i.push(h.call(this,n,this.colToProp(o)));null!==r&&s.push(i)}return s}getText(e,t){return lZ(this.getRange(e,t,l1.DESTINATION_RENDERER))}getCopyableText(e,t){return lZ(this.getRange(e,t,l1.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 l2(e,t,r,n,o,i,s){let a=e.sourceDataValidator;if(!rL(a)||!0===a(t,e,s))return;!1===e.allowInvalid&&o.setAtCell(r,n,null);let l=e.sourceDataWarningMessage;if(l){let e=i.get(l)??[];e.push({row:r,col:n,value:t,message:l}),i.set(l,e)}}function l3(e,t,r,n,o,i){let{rowIndexMapper:s,columnIndexMapper:a}=e;for(let l=0;l<r;l+=1)for(let r=0;r<n;r+=1){let n=s.getVisualFromPhysicalIndex(l),h=a.getVisualFromPhysicalIndex(r);if(null===n||null===h)continue;let d=e.getCellMeta(n,h);rL(d.sourceDataValidator)&&l2(d,t.getAtCell(l,r),l,r,t,o,i)}}function l6(e,t){let r=e.countSourceRows(),n=e.countSourceCols();if(0===r||0===n)return;let o=e.getSettings(),i=e._getDataSource(),s=new Map;if(rL(o.cells)||Array.isArray(o.cell)&&o.cell.length>0||e.hasHook("beforeGetCellMeta")||e.hasHook("afterGetCellMeta")||e._getMetaManager().getUserDefinedCellMetas().length>0)l3(e,i,r,n,s,t);else{let{fullScan:o,columns:a}=function(e,t){let r=e.rowIndexMapper.getVisualFromPhysicalIndex(0);if(null===r)return{fullScan:!0,columns:[]};let n=[];for(let o=0;o<t;o+=1){let t=e.columnIndexMapper.getVisualFromPhysicalIndex(o);if(null===t)continue;let i=e.getCellMeta(r,t),s=i.sourceDataValidator;if(rL(s)){if(!0!==s.rowIndependent)return{fullScan:!0,columns:[]};n.push({physicalColumn:o,cellMeta:i})}}return{fullScan:!1,columns:n}}(e,n);o?l3(e,i,r,n,s,t):function(e,t,r,n,o,i){for(let s=0;s<r;s+=1)if(null!==n(s))for(let r=0;r<e.length;r+=1){let{physicalColumn:n,cellMeta:a}=e[r];l2(a,t.getAtCell(s,n),s,n,t,o,i)}}(a,i,r,t=>e.rowIndexMapper.getVisualFromPhysicalIndex(t),s,t)}s.forEach((e,t)=>{l5(t,e)})}function l5(e,t){!function(){let{logFunction:e=tv,message:t="",items:r=[],maxSample:n=5,itemFormatter:o=e=>`${e}`}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!Array.isArray(r)||0===r.length)return;let i=r.length,s=r.slice(0,n).map(e=>` - ${o(e)}`),a=i>n?` - ...and ${i-n} more`:"";e(tp(t,{itemsCount:`${i} cell${i>1?"s":""}`,affectedCells:["Affected cells:",...s,...a?[a]:[]].join("\n")}))}({logFunction:tR,message:e,items:t,itemFormatter:e=>{let{row:t,col:r,value:n}=e,o=eg(n),i=o.length>64?`${o.slice(0,64)}...`:o;return`row ${t}, col ${r}, value: "${i}"`}})}function l4(e,t,r,n){let{hotInstance:o,dataMap:i,dataSource:s,internalSource:a,source:l,metaManager:h,firstRun:d}=n,u=th(a),c=o.getSettings();Array.isArray(c.dataSchema)?o.dataType="array":rL(c.dataSchema)?o.dataType="function":o.dataType="object",i&&i.destroy(),e=o.runHooks(`before${u}`,e,d,l);let g=new l1(o,e,h);t(g),"object"==typeof e&&null!==e?e.push&&e.splice||(e=[e]):null===e?e=function(e,t,r){let n=t.getSchema(),o=[];for(let t=0,i=r.startRows;t<i;t++){let t;if(("object"===e.dataType||"function"===e.dataType)&&r.dataSchema)t=e_(n);else if("array"===e.dataType)t=e_(n[0]);else{t=[];for(let e=0,n=r.startCols;e<n;e++)t.push(null)}o.push(t)}return o}(o,g,c):eN(`${a} only accepts array of objects or array of arrays (${typeof e} given)`),Array.isArray(e[0])&&(o.dataType="array"),c.data=e,g.dataSource=e,s.data=e,s.dataType=o.dataType,s.colToProp=e=>g.colToProp(e),s.propToCol=e=>g.propToCol(e),s.countCachedColumns=g.countCachedColumns.bind(g),r(g),d||l6(o,a),o.runHooks(`after${u}`,e,d,l),d||(o.runHooks("afterChange",null,a),o.view.adjustElementsSize(),o.render()),o.getSettings().ariaTags&&tj(o.rootElement,[F(-1),V(o.countCols()+(o.view?o.countRowHeaders():0))])}class l9{#to;#ti;constructor({rowIndexMapper:e,columnIndexMapper:t}){this.#to=e,this.#ti=t}toRenderable(e){let t="N-S"===e.getVerticalDirection()?1:-1,r="W-E"===e.getHorizontalDirection()?1:-1,n=this.#ts(e.from,t,r);if(null===n)return null;let o=this.#ts(e.to,-t,-r);if(null===o)return null;let i=e.clone();return i.from=n,i.to=o,i.includes(e.highlight)||(i.highlight=n),i}#ts(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t;if(null===e.row||null===e.col)return null;let n=this.#ta(this.#to,e.row,t);if(null===n)return null;let o=this.#ta(this.#ti,e.col,r);return null===o?null:e.clone().assign({row:n,col:o})}#ta(e,t,r){return t<0?t:e.getNearestNotHiddenIndex(t,r)}}function l7(e){rx(e)&&e.scrollIntoView({block:"nearest",inline:"nearest"})}function l8(e){let{selection:t,view:r}=e,n=e.getSelectedRangeActive(),o=t.getSelectionSource(),i=r.getFirstFullyVisibleColumn()??-1,s=r.getLastFullyVisibleColumn()??-1,a=n?.getTopStartCorner().col??-1,l=n?.getBottomEndCorner().col??-1,h=a<=i,d=l>=s,u=r.getFirstFullyVisibleRow()??-1,c=r.getLastFullyVisibleRow()??-1,g=n?.getTopStartCorner().row??-1,p=n?.getBottomEndCorner().row??-1,m=g<=u,f=p>=c;return{getComputedColumnTarget:e=>"mouse"===o||"keyboard"===o?e.col??-1:h&&d?n?.highlight.col??-1:h?a:d?l:e.col??-1,getComputedRowTarget:e=>"mouse"===o||"keyboard"===o?e.row??-1:m&&f?n?.highlight.row??-1:m?g:f?p:e.row??-1}}let he=Object.freeze({CELL:"cell",MIXED:"mixed"});class ht{#tl;#th;#td=1;#tu=null;#tc=new Map;#tg=!1;#tp=!1;constructor(e){this.#tl=e}init(){var e=this;let t=this.#tl.getSettings();this.#th=t.imeFastEdit?he.MIXED:he.CELL,this.#tl.addHook("afterUpdateSettings",function(){for(var t=arguments.length,r=Array(t),n=0;n<t;n++)r[n]=arguments[n];return e.#tm(r[0])}),this.#tl.addHook("afterSelection",function(){for(var t=arguments.length,r=Array(t),n=0;n<t;n++)r[n]=arguments[n];return e.#tf()}),this.#tl.addHook("afterSelectionFocusSet",function(){for(var t=arguments.length,r=Array(t),n=0;n<t;n++)r[n]=arguments[n];return e.#tf()}),this.#tl.addHook("afterSelectionEnd",function(){for(var t=arguments.length,r=Array(t),n=0;n<t;n++)r[n]=arguments[n];return e.#tC()}),this.#tl.addHook("afterRender",function(){for(var t=arguments.length,r=Array(t),n=0;n<t;n++)r[n]=arguments[n];return e.#tb()})}getFocusMode(){return this.#th}setFocusMode(e){Object.values(he).includes(e)?this.#th=e:tR(`"${e}" is not a valid focus mode.`)}getRefocusDelay(){return this.#td}setRefocusDelay(e){this.#td=e}setRefocusElementGetter(e){this.#tu=e}suspend(){this.#tp=!0}resume(){this.#tp=!1}getRefocusElement(){return"function"==typeof this.#tu?this.#tu():this.#tl.getActiveEditor()?.TEXTAREA}focusElement(e,t){return!!rx(e)&&!!e.isConnected&&(e.focus(t),!0)}focusOnHighlightedCell(e){let t=e=>{let t=this.#tl.getSelectedRangeActive()?.highlight;if(!t)return;let r=this.#tl.runHooks("modifyFocusedElement",t.row,t.col,e);rx(r)||(r=e),r&&!this.#tl.getActiveEditor()?.isOpened?.()&&this.focusElement(r,{preventScroll:!0})};e?t(e):this.#ty(e=>t(e))}refocusToEditorTextarea(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.#td;this.#tl.getSettings().imeFastEdit&&!this.#tl.getActiveEditor()?.isOpened?.()&&(this.#tl.getActiveEditor()?.refreshValue?.(),this.#tc.has(e)||this.#tc.set(e,rF(()=>{this.#tl.isDestroyed||this.getRefocusElement()?.select()},e)),this.#tc.get(e)())}#ty(e){let t=this.#tl.getSelectedRangeActive()?.highlight;if(!t||!this.#tl.selection.isCellVisible(t)||null===t.row||null===t.col)return void e(null);let{row:r,col:n}=t,o=this.#tl.getCell(r,n,!0);null===o?this.#tl.addHookOnce("afterScroll",()=>{e(this.#tl.getCell(r,n,!0))}):e(o)}#tw(){let e=this.#tp;this.#ty(t=>{let r=this.#tl.rootDocument.activeElement;e&&r&&rR(r)||(r&&rR(r)&&r.blur(),this.focusOnHighlightedCell(t))})}#tC(){if(this.#tp){let e=this.#tl.rootDocument.activeElement;if(e&&rR(e))return}this.#ty(e=>{this.getFocusMode()===he.MIXED&&e?.nodeName==="TD"&&this.refocusToEditorTextarea()})}#tf(){this.#tg=!0}#tb(){this.#tg&&(this.#tg=!1,this.#tw())}#tm(e){"boolean"==typeof e.imeFastEdit&&this.setFocusMode(e.imeFastEdit?he.MIXED:he.CELL)}}let hr=Object.freeze({INLINE:"inline",MODAL:"modal"}),hn=Object.freeze({UNKNOWN:"unknown",CLICK:"click",TAB_FROM_ABOVE:"tab_from_above",TAB_FROM_BELOW:"tab_from_below"});function ho(e,t){let r=e.rootDocument.createElement("div");return r.style.display="none",r.classList.add("htFocusCatcher"),r.dataset.htFocusSource=t,r}function hi(e){let{rowIndexMapper:t,columnIndexMapper:r}=e,{navigableHeaders:n}=e.getSettings(),o=n&&e.countColHeaders()>0?-e.countColHeaders():0,i=n&&e.countRowHeaders()>0?-e.countRowHeaders():0,s=0===o?t.getVisualFromRenderableIndex(o):o,a=0===i?r.getVisualFromRenderableIndex(i):i;return null===s||null===a?null:e._createCellCoords(s,a)}function hs(e){let{rowIndexMapper:t,columnIndexMapper:r}=e,{navigableHeaders:n}=e.getSettings(),o=t.getRenderableIndexesLength()-1,i=r.getRenderableIndexesLength()-1;if(o<0){if(!n||0===e.countColHeaders())return null;o=-1}if(i<0){if(!n||0===e.countColHeaders())return null;i=-1}return e._createCellCoords(t.getVisualFromRenderableIndex(o)??o,r.getVisualFromRenderableIndex(i)??i)}let ha="gridDefault",hl="grid.tabNavigation",hh="editorManager.handlingEditor";function hd(e){let t,r=t=>{if(!t)return null;let{rowIndexMapper:r,columnIndexMapper:n}=e;if(r.isHidden(t.row)||n.isHidden(t.col))return null;let o=hi(e),i=hs(e);return null===o||null===i?null:(t.row=nL(t.row,o.row??t.row,i.row??t.row),t.col=nL(t.col,o.col??t.col,i.col??t.col),t)},n={wrapped:!1,flipped:!1},o=!0,i=!1;e.addHook("afterSelection",()=>{o&&(t=e.getSelectedRangeActive()?.highlight)}),e.addHook("beforeRowWrap",(e,t,r)=>{n.wrapped=!0,n.flipped=r}),e.addHook("beforeEmptyDataStateShow",()=>{i=!0}),e.addHook("beforeEmptyDataStateHide",()=>{i=!1});let s=e.getShortcutManager().getContext("grid");s?.addShortcuts([{keys:[["Tab"],["Shift","Tab"]],preventDefault:!1,stopPropagation:!1,relativeToGroup:ha,group:hl,position:"before",callback(){let{tabNavigation:t}=e.getSettings();e.getSelectedRangeActive()&&!t&&(o=!1)}},{keys:[["Tab"],["Shift","Tab"]],preventDefault:!1,stopPropagation:!1,relativeToGroup:ha,group:hl,callback(r){let{tabNavigation:i,autoWrapRow:s}=e.getSettings();o=!0,(!i||!e.selection.isSelected()||s&&n.wrapped&&n.flipped||!s&&n.wrapped)&&(s&&n.wrapped&&n.flipped&&(t=r.shiftKey?hi(e):hs(e)),n.wrapped=!1,n.flipped=!1)},position:"after"}]);let a=e.rootGridContentElement??e.rootElement;e.getFocusScopeManager().registerScope("grid",a,{contains:t=>!!(a===t||a.contains(t))||null===t.closest(".htMenu")&&e.rootPortalElement.contains(t),runOnlyIf:()=>{let{navigableHeaders:t}=e.getSettings();return!((i||!t)&&0===e.countRenderedRows()&&0===e.countRenderedCols()&&e.countRowHeaders()>0&&e.countColHeaders()>0)&&!!(!t&&e.countRenderedRows()>0&&e.countRenderedCols()>0||t&&(e.countRowHeaders()>0||e.countColHeaders()>0))},onActivate:n=>{if("tab_from_above"===n){let n=r(t)??hi(e);if(n){let t=e.runHooks("modifyFocusOnTabNavigation","from_above",n),{row:r,col:o}=n;!1!==t&&null!==r&&null!==o&&(e.selectCell(r,o),e.getFocusManager().focusOnHighlightedCell())}}else if("tab_from_below"===n){let n=r(t)??hs(e);if(n){let t=e.runHooks("modifyFocusOnTabNavigation","from_below",n),{row:r,col:o}=n;!1!==t&&null!==r&&null!==o&&e.selectCell(r,o)}}}})}let hu=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"]]),hc=e=>e.map(e=>{let t=e.toLowerCase();return hu.has(t)?hu.get(t)??t:t}).sort((e,t)=>e.localeCompare(t)).join("+"),hg=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"]]),hp=e=>{let{which:t,key:r}=e;if(hg.has(t))return hg.get(t)??r.toLowerCase();let n=String.fromCharCode(t).toLowerCase();return/^[a-z0-9]$/.test(n)?n:r.toLowerCase()},hm=["meta","alt","shift","control"],hf=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],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},hC=Symbol("shortcut-context");function hb(e){return eF(e)&&e.__kindOf===hC}let hy=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"table",r=nz({errorIdExists:t=>`The "${t}" shortcut is already registered in the "${e}" context.`}),n=function(){let{keys:e,callback:t,group:n,runOnlyIf:o=()=>!0,captureCtrl:i=!1,preventDefault:s=!0,stopPropagation:a=!1,relativeToGroup:l,position:h,forwardToContext:d}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};em(n)&&eN("You need to define the shortcut's group."),!1===rL(t)&&eN("The shortcut's callback needs to be a function."),!1===Array.isArray(e)&&eN(eu`Pass the shortcut\'s keys as an array of arrays,\x20
|
|
64
64
|
using the KeyboardEvent.key properties:\x20
|
|
65
|
-
declare https: //developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/key/Key_Values.`);let u={callback:t,group:n,runOnlyIf:o,captureCtrl:i,preventDefault:s,stopPropagation:a};ep(l)&&(u.relativeToGroup=l,u.position=h),hb(d)&&(u.forwardToContext=d),e.forEach(e=>{let t=hc(e);if(r.hasItem(t)){let e=r.getItem(t),n=e.findIndex(e=>e.group===l);-1!==n?"before"===h?n-=1:n+=1:n=e.length,e.splice(n,0,u)}else r.addItem(t,[u])})},o=e=>{let t=hc(e);r.removeItem(t)};return{__kindOf:hC,scope:t,addShortcut:n,addShortcuts:function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};e.forEach(e=>{eB(t,(r,n)=>{!1===Object.prototype.hasOwnProperty.call(e,n)&&(e[n]=t[n])}),n(e)})},getShortcuts:e=>{let t=hc(e),n=r.getItem(t);return ep(n)?n.slice():[]},hasShortcut:e=>{let t=hc(e);return r.hasItem(t)},removeShortcutsByKeys:o,removeShortcutsByGroup:e=>{r.getItems().forEach(t=>{let[r,n]=t,i=n.filter(t=>t.group!==e);0===i.length?o(r.split("+")):(n.length=0,n.push(...i))})}}},hw=(o=new Set,{press(e){o.add(e)},release(e){o.delete(e)},releaseAll(){o.clear()},isPressed:e=>o.has(e)}),hS=new WeakMap,hv=e=>{if("string"==typeof e.key){let t=hp(e);hm.includes(t)&&hw.press(t)}},hR=e=>{if("string"==typeof e.key){let t=hp(e);hm.includes(t)&&hw.release(t)}},hE={_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){ee(this._hooksStorage[e]||[],t=>{this.hot.removeHook(e,t)})},clearHooks(){eB(this._hooksStorage,(e,t)=>this.removeHooksByKey(t)),this._hooksStorage={}}};eV(hE,"MIXIN_NAME","hooksRefRegisterer",{writable:!1,enumerable:!1});let hT=Object.freeze({VIRGIN:"STATE_VIRGIN",EDITING:"STATE_EDITING",WAITING:"STATE_WAITING",FINISHED:"STATE_FINISHED"});class hA{static get EDITOR_TYPE(){return"base"}state=hT.VIRGIN;_opened=!1;_fullEditMode=!1;_closeCallback=null;_closeAfterDataChange=!0;TD=null;row=null;col=null;prop=null;originalValue=null;constructor(e){this.hot=e,this.init()}_fireCallbacks(e){this._closeCallback&&(this._closeCallback(e),this._closeCallback=null)}init(){}getValue(){eN("Editor getValue() method unimplemented")}setValue(e){eN("Editor setValue() method unimplemented")}open(e){eN("Editor open() method unimplemented")}close(){eN("Editor close() method unimplemented")}focus(){eN("Editor focus() method unimplemented")}prepare(e,t,r,n,o,i){this.TD=n,this.row=e,this.col=t,this.prop=r,this.originalValue=o,this.cellProperties=i,this.state=this.isOpened()?this.state:hT.VIRGIN}extend(){return class extends this.constructor{}}saveValue(e,t){let r,n,o,i;if(t){let e=this.hot.getSelectedRangeActive(),t=e?.getTopStartCorner(),s=e?.getBottomEndCorner();r=t?.row??this.row,n=t?.col??this.col,o=s?.row??this.row,i=s?.col??this.col}else[r,n,o,i]=[this.row,this.col,null,null];let s=this.hot.runHooks("modifyGetCellCoords",r,n,!1,"meta");Array.isArray(s)&&([r,n]=s),this.hot.populateFromArray(r,n,e,o,i,"edit")}beginEditing(e,t){if(this.state!==hT.VIRGIN)return;if(null===this.row||null===this.col)return void tR("Editor opened without valid cell coordinates.");let r=this.hot,n=r.rowIndexMapper.getRenderableFromVisualIndex(this.row),o=r.columnIndexMapper.getRenderableFromVisualIndex(this.col);if(null!==n&&null!==o&&r.view.scrollViewport({row:n,col:o}),this.state=hT.EDITING,this.isInFullEditMode()){let t=l0(this.originalValue,this.hot.getCellMeta(this.row,this.col)),r="string"==typeof e?e:eg(t);this.setValue(r)}this.open(t),this._opened=!0,this.focus(),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===hT.VIRGIN)return void this.hot._registerTimeout(()=>{this._fireCallbacks(!0)});if(this.state===hT.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),"function"==typeof this.cellProperties.valueParser&&(r=this.cellProperties.valueParser(r,this.cellProperties)),this.state=hT.WAITING,this.saveValue([[r]],t),this.hot.getCellValidator(this.cellProperties)?this.hot.addHookOnce("postAfterValidate",e=>{this.state=hT.FINISHED,this.discardEditor(e)}):(this.state=hT.FINISHED,this.discardEditor(!0))}}}cancelChanges(){this.state=hT.FINISHED,this.discardEditor()}discardEditor(e){if(this.state===hT.FINISHED)if(!1===e&&!0!==this.cellProperties.allowInvalid){if(null===this.row||null===this.col)return;this.hot.selectCell(this.row,this.col),this.focus(),this.state=hT.EDITING,this._fireCallbacks(!1)}else this.close(),this._opened=!1,this._fullEditMode=!1,this.state=hT.VIRGIN,this._fireCallbacks(!0),this.hot.getShortcutManager().setActiveContextName("grid")}enableFullEditMode(){this._fullEditMode=!0}isInFullEditMode(){return this._fullEditMode}isOpened(){return this._opened}isWaiting(){return this.state===hT.WAITING}getEditedCellRect(){let e=this.getEditedCell();if(!e)return;let{wtOverlays:t,wtViewport:r}=this.hot.view._wt,n=this.hot.rootWindow,o=t3(e),i=ro(e),s=t3(this.hot.rootElement),a=ro(this.hot.rootElement),l=t.topOverlay?.holder,h=t.inlineStartOverlay?.holder,d=l!==n?l.scrollTop:0,u=h!==n?h.scrollLeft:0,c=n.innerWidth-s.left-a,{wtTable:g}=t.getParentOverlay(e)??this.hot.view._wt,p=g.name,m=["master","inline_start"].includes(p)?d:0,f=["master","top","bottom"].includes(p)?u:0,C=+(o.top!==s.top),b=o.top-s.top-C-m,y=0;y=this.hot.isRtl()?n.innerWidth-o.left-i-c-1+f:o.left-s.left-1-f,["top","top_inline_start_corner"].includes(p)&&(b+=t.topOverlay?.getOverlayOffset()??0),["inline_start","top_inline_start_corner"].includes(p)&&(y+=Math.abs(t.inlineStartOverlay?.getOverlayOffset()??0));let w=this.hot.hasColHeaders(),S=this.hot.rowIndexMapper.getRenderableFromVisualIndex(this.row??0),R=this.hot.columnIndexMapper.getRenderableFromVisualIndex(this.col??0),E=this.hot.rowIndexMapper.getRenderableIndexesLength()-this.hot.view._wt.getSetting("fixedRowsBottom");(w&&(S??0)<=0||S===E)&&(b+=1),(R??0)<=0&&(y+=1);let T=r.rowsRenderCalculator?.startPosition??0,A=r.columnsRenderCalculator?.startPosition??0,M=Math.abs(t.inlineStartOverlay?.getScrollPosition()??0),N=t.topOverlay?.getScrollPosition()??0,I=rf(this.hot.rootDocument),x=this.#tS(e,p,T,N,I),O=this.#tv(e,p,g,i,A,M),k=n.getComputedStyle(e),_=Number.parseInt(k[this.hot.isRtl()?"borderRightWidth":"borderLeftWidth"],10)>0?0:1,H=Number.parseInt(k.borderTopWidth,10)>0?0:1,L=ro(e)+_,P=ri(e)+H,D=l&&rC(l)?I:0,F=h&&rb(h)?I:0,V=this.hot.view.maximumVisibleElementWidth(O)-D+_;return{top:b,start:y,height:P,maxHeight:Math.max(this.hot.view.maximumVisibleElementHeight(x??0)-F+H,this.hot.stylesHandler.getDefaultRowHeight()??0),width:L,maxWidth:V}}#tS(e,t,r,n,o){let i=e.offsetTop,{wtOverlays:s}=this.hot.view._wt;if(["inline_start","master"].includes(t)&&(i+=r-n),["bottom","bottom_inline_start_corner"].includes(t)&&s.bottomOverlay?.clone){let{wtViewport:e,wtTable:t}=s.bottomOverlay.clone;i+=e.getWorkspaceHeight()-t.getHeight()-o}return i}#tv(e,t,r,n,o,i){let s=e.offsetLeft;return this.hot.isRtl()?s=(s>=0?r.getWidth()-e.offsetLeft:Math.abs(s))+(o-i-n):["top","master","bottom"].includes(t)&&(s+=o-i),s}getEditedCellsLayerClass(){switch(this.checkEditorSection()){case"inline-start":return"ht_clone_left ht_clone_inline_start";case"bottom":return"ht_clone_bottom";case"bottom-inline-start-corner":return"ht_clone_bottom_left_corner ht_clone_bottom_inline_start_corner";case"top":return"ht_clone_top";case"top-inline-start-corner":return"ht_clone_top_left_corner ht_clone_top_inline_start_corner";default:return"ht_clone_master"}}getEditedCell(){return 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.getSettings(),r="";return this.row<(t.fixedRowsTop??0)?r=this.col<(t.fixedColumnsStart??0)?"top-inline-start-corner":"top":t.fixedRowsBottom&&this.row>=e-t.fixedRowsBottom?r=this.col<(t.fixedColumnsStart??0)?"bottom-inline-start-corner":"bottom":this.col<(t.fixedColumnsStart??0)&&(r="inline-start"),r}}eL(hA,hE);let hM=[{name:"editorCloseAndSave",callback(e){e._getEditorManager().closeEditorAndSaveChanges()}},{name:"editorCloseAndSaveByArrowKeys",callback(e,t,r){let n=e._getEditorManager(),o=n.getActiveEditor();o?.isInFullEditMode()&&o?.state===hT.EDITING||(n.closeEditorAndSaveChanges(),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),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:n}=e,o=e._getEditorManager(),i=e.getSelectedRange(),s=e.getSelectedRangeActive(),a=s?.highlight;if((i?.some(e=>n.isMultiple(e))||(i?.length??0)>1)&&!s?.isHeader()&&e.countRenderedCols()>0&&e.countRenderedRows()>0){let o=e.getSettings(),i="function"==typeof o.enterMoves?o.enterMoves(t):o.enterMoves;r.includes("shift")?n.transformFocus(-(i?.row??0),-(i?.col??0)):n.transformFocus(i?.row??0,i?.col??0);return}a?.isHeader()||(e.getSettings().enterBeginsEditing?o.cellProperties.readOnly?o.moveSelectionAfterEnter(t):o.openEditor(null,t,!0):o.moveSelectionAfterEnter(t),rQ(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,n=e.getSelectedRangeActive();if(!n)return;let{to:o}=n,i=o.row??0,s=Math.min(i+e.countVisibleRows(),e.countRows()-1),a=r.getNearestNotHiddenIndex(s,-1);if(null!==a){let r=e._createCellCoords(a,o.col??0),n=i-(e.getFirstFullyVisibleRow()??0),s=Math.min((r.row??0)-n,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:n,from:o,to:i}=r;t.markSource("keyboard"),t.isSelectedByRowHeader()?t.selectAll(!0,!0):e.selectColumns(o.col??0,i.col??0,n),t.markEndSource()}},{name:"extendCellsSelectionToMostBottom",callback(e){let{selection:t,rowIndexMapper:r}=e,n=e.getSelectedRangeActive();if(!n)return;let{highlight:o,from:i,to:s}=n,a=o.isHeader()&&t.isSelectedByRowHeader();if(o.isCell()||a){let n=r.getNearestNotHiddenIndex(e.countRows()-1,-1),l=i.clone();l.row=o.row,t.markSource("keyboard"),t.setRangeStart(l,void 0,!1,o.clone()),a&&t.selectedByRowHeader.add(t.getLayerLevel()),t.setRangeEnd(e._createCellCoords(n??0,s.col??0)),t.markEndSource()}}},{name:"extendCellsSelectionToMostInlineEnd",callback(e){let{selection:t,columnIndexMapper:r}=e,n=e.getSelectedRangeActive();if(!n)return;let{highlight:o,from:i,to:s}=n;if(!t.isSelectedByRowHeader()&&!t.isSelectedByCorner()&&o.isCell()){let n=r.getNearestNotHiddenIndex(e.countCols()-1,-1),a=i.clone();a.col=o.col,t.markSource("keyboard"),t.setRangeStart(a,void 0,!1,o.clone()),t.setRangeEnd(e._createCellCoords(s.row??0,n??0)),t.markEndSource()}}},{name:"extendCellsSelectionToMostInlineStart",callback(e){let{selection:t,columnIndexMapper:r}=e,n=e.getSelectedRangeActive();if(!n)return;let{highlight:o,from:i,to:s}=n;if(!t.isSelectedByRowHeader()&&!t.isSelectedByCorner()&&o.isCell()){let n=Number(e.getSettings().fixedColumnsStart)||0,a=r.getNearestNotHiddenIndex(n,1),l=i.clone();l.col=o.col,t.markSource("keyboard"),t.setRangeStart(l,void 0,!1,o.clone()),t.setRangeEnd(e._createCellCoords(s.row??0,a??0)),t.markEndSource()}}},{name:"extendCellsSelectionToMostLeft",callback(e){let{selection:t,columnIndexMapper:r}=e,n=e.getSelectedRangeActive();if(!n)return;let{highlight:o,from:i,to:s}=n,a=o.isHeader()&&t.isSelectedByColumnHeader();if(o.isCell()||a){let n=e.isRtl()?r.getNearestNotHiddenIndex(e.countCols()-1,-1):r.getNearestNotHiddenIndex(0,1),l=i.clone();l.col=o.col,t.markSource("keyboard"),t.setRangeStart(l,void 0,!1,o.clone()),a&&t.selectedByColumnHeader.add(t.getLayerLevel()),t.setRangeEnd(e._createCellCoords(s.row??0,n??0)),t.markEndSource()}}},{name:"extendCellsSelectionToMostRight",callback(e){let{selection:t,columnIndexMapper:r}=e,n=e.getSelectedRangeActive();if(!n)return;let{highlight:o,from:i,to:s}=n,a=o.isHeader()&&t.isSelectedByColumnHeader();if(o.isCell()||a){let n=e.isRtl()?r.getNearestNotHiddenIndex(0,1):r.getNearestNotHiddenIndex(e.countCols()-1,-1),l=i.clone();l.col=o.col,t.markSource("keyboard"),t.setRangeStart(l,void 0,!1,o.clone()),a&&t.selectedByColumnHeader.add(t.getLayerLevel()),t.setRangeEnd(e._createCellCoords(s.row??0,n??0)),t.markEndSource()}}},{name:"extendCellsSelectionToMostTop",callback(e){let{selection:t,rowIndexMapper:r}=e,n=e.getSelectedRangeActive();if(!n)return;let{highlight:o,from:i,to:s}=n,a=o.isHeader()&&t.isSelectedByRowHeader();if(o.isCell()||a){let n=r.getNearestNotHiddenIndex(0,1),l=i.clone();l.row=o.row,t.markSource("keyboard"),t.setRangeStart(l,void 0,!1,o.clone()),a&&t.selectedByRowHeader.add(t.getLayerLevel()),t.setRangeEnd(e._createCellCoords(n??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:n,from:o,to:i}=r;t.markSource("keyboard"),t.isSelectedByColumnHeader()?t.selectAll(!0,!0):e.selectRows(o.row??0,i.row??0,n),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,n=e.getSelectedRangeActive();if(!n)return;let{to:o}=n,i=o.row??0,s=Math.max(i-e.countVisibleRows(),0),a=r.getNearestNotHiddenIndex(s,1);if(null!==a){let r=e._createCellCoords(a,o.col??0),n=i-(e.getFirstFullyVisibleRow()??0),s=Math.max((r.row??0)-n,0);t.markSource("keyboard"),t.setRangeEnd(r,e.getActiveSelectionLayerIndex()),t.markEndSource(),e.scrollViewportTo({row:s,verticalSnap:"top",horizontalSnap:"start"})}}},{name:"moveCellSelectionDown",callback(e){let{selection:t}=e;t.markSource("keyboard"),t.transformStart(1,0),t.markEndSource()}},{name:"moveCellSelectionDownByViewportHeight",callback(e){let{selection:t}=e,{navigableHeaders:r}=e.getSettings(),n=r?e.countColHeaders():0,o=e.getSelectedRangeActive()?.highlight.row??0,i=e.countVisibleRows()+n;i=0===i?1:i,o===e.countRows()-1?i=1:o+i>e.countRows()&&(i=e.countRows()-o-1),t.markSource("keyboard"),t.transformStart(i,0),t.markEndSource();let s=e.getSettings().fixedRowsBottom??0,a=e.countRows(),l=e.getSelectedRangeActive()?.highlight.row??0;l<0?e.scrollViewportTo({row:0}):s>0&&l>=a-s&&e.scrollViewportTo({row:a-s-1,verticalSnap:"bottom"})}},{name:"moveCellSelectionInlineEnd",callback(e,t){let{selection:r}=e,n=e.getSettings(),o=e.getSelectedRange(),i=e.getSelectedRangeActive(),s="function"==typeof n.tabMoves?n.tabMoves(t):n.tabMoves;r.markSource("keyboard"),(o?.some(e=>r.isMultiple(e))||(o?.length??0)>1)&&!i?.isHeader()&&e.countRenderedCols()>0&&e.countRenderedRows()>0?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,n=e.getSettings(),o=e.getSelectedRange(),i=e.getSelectedRangeActive(),s="function"==typeof n.tabMoves?n.tabMoves(t):n.tabMoves;r.markSource("keyboard"),(o?.some(e=>r.isMultiple(e))||(o?.length??0)>1)&&!i?.isHeader()&&e.countRenderedCols()>0&&e.countRenderedRows()>0?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,n=e.rowIndexMapper.getNearestNotHiddenIndex(e.countRows()-1,-1);null===n&&(n=-1),t.setRangeStart(e._createCellCoords(n,r))}},{name:"moveCellSelectionToMostBottomInlineEnd",callback(e){let{selection:t,rowIndexMapper:r,columnIndexMapper:n}=e,o=Number(e.getSettings().fixedRowsBottom)||0,i=r.getNearestNotHiddenIndex(e.countRows()-o-1,-1),s=n.getNearestNotHiddenIndex(e.countCols()-1,-1);t.markSource("keyboard"),t.setRangeStart(e._createCellCoords(i??-1,s??-1)),t.markEndSource()}},{name:"moveCellSelectionToMostInlineEnd",callback(e){let{selection:t,columnIndexMapper:r}=e;t.markSource("keyboard"),t.setRangeStart(e._createCellCoords(e.getSelectedRangeActive()?.highlight.row??0,r.getNearestNotHiddenIndex(e.countCols()-1,-1)??0)),t.markEndSource()}},{name:"moveCellSelectionToMostInlineStart",callback(e){let{selection:t,columnIndexMapper:r}=e,n=Number(e.getSettings().fixedColumnsStart)||0,o=e.getSelectedRangeActive()?.highlight.row??0,i=r.getNearestNotHiddenIndex(n,1);t.markSource("keyboard"),t.setRangeStart(e._createCellCoords(o,i??0)),t.markEndSource()}},{name:"moveCellSelectionToMostLeft",callback(e){let{selection:t,columnIndexMapper:r}=e,n=e.getSelectedRangeActive()?.highlight.row??0,o=e.isRtl()?r.getNearestNotHiddenIndex(e.countCols()-1,-1):r.getNearestNotHiddenIndex(0,1);null===o&&(o=e.isRtl()?-1:-e.countRowHeaders()),t.markSource("keyboard"),t.setRangeStart(e._createCellCoords(n,o)),t.markEndSource()}},{name:"moveCellSelectionToMostRight",callback(e){let{selection:t,columnIndexMapper:r}=e,n=e.getSelectedRangeActive()?.highlight.row??0,o=e.isRtl()?r.getNearestNotHiddenIndex(0,1):r.getNearestNotHiddenIndex(e.countCols()-1,-1);null===o&&(o=e.isRtl()?-e.countRowHeaders():-1),t.markSource("keyboard"),t.setRangeStart(e._createCellCoords(n,o)),t.markEndSource()}},{name:"moveCellSelectionToMostTop",callback(e){let{selection:t}=e,r=e.getSelectedRangeActive()?.highlight.col??0,n=e.rowIndexMapper.getNearestNotHiddenIndex(0,1);null===n&&(n=-e.countColHeaders()),t.markSource("keyboard"),t.setRangeStart(e._createCellCoords(n,r)),t.markEndSource()}},{name:"moveCellSelectionToMostTopInlineStart",callback(e){let{selection:t,rowIndexMapper:r,columnIndexMapper:n}=e,o=Number(e.getSettings().fixedRowsTop)||0,i=Number(e.getSettings().fixedColumnsStart)||0,s=r.getNearestNotHiddenIndex(o,1),a=n.getNearestNotHiddenIndex(i,1);t.markSource("keyboard"),t.setRangeStart(e._createCellCoords(s??0,a??0)),t.markEndSource()}},{name:"moveCellSelectionUp",callback(e){let{selection:t}=e;t.markSource("keyboard"),t.transformStart(-1,0),t.markEndSource()}},{name:"moveCellSelectionUpByViewportHight",callback(e){let{selection:t}=e,{navigableHeaders:r}=e.getSettings(),n=r?e.countColHeaders():0,o=e.getSelectedRangeActive()?.highlight.row??0,i=e.countVisibleRows()+n;i=0===i?-1:-i,o===-n?i=-1:o+i<n&&(i=-(o+n)),t.markSource("keyboard"),t.transformStart(i,0),t.markEndSource();let s=e.getSettings().fixedRowsTop??0;(e.getSelectedRangeActive()?.highlight.row??0)<s&&e.scrollViewportTo({row:s,verticalSnap:"top"})}},{name:"emptySelectedCells",callback(e){e.emptySelectedCells(),e._getEditorManager().prepareEditor()}},{name:"scrollToFocusedCell",callback(e){let t=e.getSelectedRangeActive()?.highlight;if(!t)return;let r=e.getFirstFullyVisibleRow()-1,n=e.getFirstFullyVisibleColumn()-1,o=e.getLastFullyVisibleRow()+1,i=e.getLastFullyVisibleColumn()+1,s=e._createCellCoords(r,n),a=e._createCellCoords(o,i);if(!e._createCellRange(s,s,a).includes(t)&&((t.row??-1)>=0||(t.col??-1)>=0)){let r={};if((t.col??-1)>=0){let n=Math.floor(e.countVisibleCols()/2);r.col=Math.max((t.col??0)-n,0)}if((t.row??-1)>=0){let n=Math.floor(e.countVisibleRows()/2);r.row=Math.max((t.row??0)-n,0)}e.scrollViewportTo({...r,verticalSnap:"top",horizontalSnap:"start"})}}},{name:"selectAllCells",callback(e){let{selection:t}=e;t.markSource("keyboard"),t.selectAll(!0,!0,{disableHeadersHighlight:!0}),t.markEndSource()}},{name:"selectAllCellsAndHeaders",callback(e){let{selection:t}=e;t.markSource("keyboard"),t.selectAll(!0,!0,{disableHeadersHighlight:!1}),t.markEndSource()}},{name:"populateSelectedCellsData",callback(e){let t=e.getSelectedRange();if(!t)return;let r=t[t.length-1].highlight.normalize(),n=r.row??0,o=r.col??0,i=e.getDataAtCell(n,o),s=new Map;for(let r=0;r<t.length;r++)t[r].forAll((t,r)=>{if(t>=0&&r>=0&&(t!==n||r!==o)){let{readOnly:n}=e.getCellMeta(t,r);n||s.set(`${t}x${r}`,[t,r,i])}});e.setDataAtCell(Array.from(s.values()))}},{name:"tabNavigation",callback(e){let t={wrapped:!1,flipped:!1},r=!1,n=!1;return e.addHook("afterSelection",(e,o,i,s,a)=>{r&&(t.wrapped&&t.flipped||n)&&(n=!1,a.value=!0)}),e.addHook("beforeRowWrap",(e,r,n)=>{t.wrapped=!0,t.flipped=n}),{before(){let{tabNavigation:t}=e.getSettings();r=!0,t||(n=!0)},after(n){let{tabNavigation:o,autoWrapRow:i}=e.getSettings();if(r=!1,!o||!e.selection.isSelected()||i&&t.wrapped&&t.flipped||!i&&t.wrapped)return t.wrapped=!1,t.flipped=!1,e.deselectCell(),!1;n.preventDefault()}}}}];function hN(e){let t={};return hM.forEach(r=>{let{name:n,callback:o}=r;t[n]=function(){for(var t=arguments.length,r=Array(t),n=0;n<t;n++)r[n]=arguments[n];return o(e,...r)}}),t}function hI(e){let t=e.getShortcutManager().addContext("editor"),r=hN(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:hh})}function hx(e){let t=e.getShortcutManager().addContext("grid"),r=hN(e);t.addShortcuts([{keys:[["F2"]],callback:e=>r.editorFastOpen(e)},{keys:[["Enter"],["Enter","Shift"]],callback:(e,t)=>r.editorOpen(e,t)},{keys:[["Backspace"],["Delete"]],callback:()=>r.emptySelectedCells()}],{group:hh,runOnlyIf:()=>ep(e.getSelected())}),t.addShortcuts([{keys:[["Control/Meta","A"]],callback:()=>r.selectAllCells(),runOnlyIf:()=>ep(e.getSelected())&&!e.getSelectedRangeActive()?.highlight.isHeader()},{keys:[["Control/Meta","A"]],callback:()=>{},runOnlyIf:()=>!!(ep(e.getSelected())&&e.getSelectedRangeActive()?.highlight.isHeader()),preventDefault:!0},{keys:[["Control/Meta","Shift","Space"]],callback:()=>r.selectAllCellsAndHeaders()},{keys:[["Control/Meta","Enter"]],callback:()=>r.populateSelectedCellsData(),runOnlyIf:()=>ep(e.getSelected())&&!e.getSelectedRangeActive()?.highlight.isHeader()&&(e.getSelectedRangeActive()?.getCellsCount()??0)>1},{keys:[["Control","Space"]],captureCtrl:!0,callback:()=>r.extendCellsSelectionToColumns()},{keys:[["Shift","Space"]],stopPropagation:!0,callback:()=>r.extendCellsSelectionToRows()},{keys:[["ArrowUp"]],callback:()=>r.moveCellSelectionUp()},{keys:[["ArrowUp","Control/Meta"]],captureCtrl:!0,callback:()=>r.moveCellSelectionToMostTop()},{keys:[["ArrowUp","Shift"]],callback:()=>r.extendCellsSelectionUp()},{keys:[["ArrowUp","Shift","Control/Meta"]],captureCtrl:!0,callback:()=>r.extendCellsSelectionToMostTop(),runOnlyIf:()=>ep(e.getSelected())&&!(e.selection.isSelectedByCorner()||e.selection.isSelectedByColumnHeader())},{keys:[["ArrowDown"]],callback:()=>r.moveCellSelectionDown()},{keys:[["ArrowDown","Control/Meta"]],captureCtrl:!0,callback:()=>r.moveCellSelectionToMostBottom()},{keys:[["ArrowDown","Shift"]],callback:()=>r.extendCellsSelectionDown()},{keys:[["ArrowDown","Shift","Control/Meta"]],captureCtrl:!0,callback:()=>r.extendCellsSelectionToMostBottom(),runOnlyIf:()=>ep(e.getSelected())&&!(e.selection.isSelectedByCorner()||e.selection.isSelectedByColumnHeader())},{keys:[["ArrowLeft"]],callback:()=>r.moveCellSelectionLeft()},{keys:[["ArrowLeft","Control/Meta"]],captureCtrl:!0,callback:()=>r.moveCellSelectionToMostLeft()},{keys:[["ArrowLeft","Shift"]],callback:()=>r.extendCellsSelectionLeft()},{keys:[["ArrowLeft","Shift","Control/Meta"]],captureCtrl:!0,callback:()=>r.extendCellsSelectionToMostLeft(),runOnlyIf:()=>ep(e.getSelected())&&!(e.selection.isSelectedByCorner()||e.selection.isSelectedByRowHeader())},{keys:[["ArrowRight"]],callback:()=>r.moveCellSelectionRight()},{keys:[["ArrowRight","Control/Meta"]],captureCtrl:!0,callback:()=>r.moveCellSelectionToMostRight()},{keys:[["ArrowRight","Shift"]],callback:()=>r.extendCellsSelectionRight()},{keys:[["ArrowRight","Shift","Control/Meta"]],captureCtrl:!0,callback:()=>r.extendCellsSelectionToMostRight(),runOnlyIf:()=>ep(e.getSelected())&&!(e.selection.isSelectedByCorner()||e.selection.isSelectedByRowHeader())},{keys:[["Home"]],captureCtrl:!0,callback:()=>r.moveCellSelectionToMostInlineStart(),runOnlyIf:()=>ep(e.getSelected())&&e.view.isMainTableNotFullyCoveredByOverlays()},{keys:[["Home","Shift"]],callback:()=>r.extendCellsSelectionToMostInlineStart()},{keys:[["Home","Control/Meta"]],captureCtrl:!0,callback:()=>r.moveCellSelectionToMostTopInlineStart(),runOnlyIf:()=>ep(e.getSelected())&&e.view.isMainTableNotFullyCoveredByOverlays()},{keys:[["End"]],captureCtrl:!0,callback:()=>r.moveCellSelectionToMostInlineEnd(),runOnlyIf:()=>ep(e.getSelected())&&e.view.isMainTableNotFullyCoveredByOverlays()},{keys:[["End","Shift"]],callback:()=>r.extendCellsSelectionToMostInlineEnd()},{keys:[["End","Control/Meta"]],captureCtrl:!0,callback:()=>r.moveCellSelectionToMostBottomInlineEnd(),runOnlyIf:()=>ep(e.getSelected())&&e.view.isMainTableNotFullyCoveredByOverlays()},{keys:[["PageUp"]],callback:()=>r.moveCellSelectionUpByViewportHight()},{keys:[["PageUp","Shift"]],callback:()=>r.extendCellsSelectionUpByViewportHeight()},{keys:[["PageDown"]],callback:()=>r.moveCellSelectionDownByViewportHeight()},{keys:[["PageDown","Shift"]],callback:()=>r.extendCellsSelectionDownByViewportHeight()},{keys:[["Tab"]],preventDefault:!1,callback:e=>r.moveCellSelectionInlineStart(e)},{keys:[["Shift","Tab"]],preventDefault:!1,callback:e=>r.moveCellSelectionInlineEnd(e)},{keys:[["Control/Meta","Backspace"]],callback:()=>r.scrollToFocusedCell()}],{runOnlyIf:()=>{let{navigableHeaders:t}=e.getSettings();return ep(e.getSelected())&&(t||!t&&e.countRenderedRows()>0&&e.countRenderedCols()>0)},group:ha});let n=r.tabNavigation();t.addShortcuts([{keys:[["Tab"],["Shift","Tab"]],preventDefault:!1,stopPropagation:!1,relativeToGroup:ha,group:hl,position:"before",callback:e=>n.before(e)},{keys:[["Tab"],["Shift","Tab"]],preventDefault:!1,stopPropagation:!1,relativeToGroup:ha,group:hl,callback:e=>n.after(e),position:"after"}])}function hO(e){let{classNames:t}=tP(e,/ht-theme-[a-zA-Z0-9_-]+/);return t.pop()}let hk="handsontable-core-styles";class h_{#tl;#tR;#tE;#tT=null;#tA;#tM={};#tN={};#tI;constructor({hot:e,rootElement:t,rootDocument:r,onThemeChange:n=e=>{},injectCoreCss:o=!0}){this.#tl=e,this.#tE=t,this.#tA=r,this.#tI=n,o&&this.#tx()}getCSSVariableValue(e){if(this.#tM[`--ht-${e}`])return this.#tM[`--ht-${e}`];let t=this.#tO(`--ht-${e}`)??this.#tk(`--ht-${e}`);if(null!==t)return this.#tM[`--ht-${e}`]=t,t}getStyleForTD(e){return this.#tN?.td?.[e]}getDefaultRowHeight(e){let t=this.#t_();return void 0!==e&&e===this.#tl.view.getFirstRenderedVisibleRow()?(t??0)+1:t}areCellsBorderBox(){return"border-box"===this.getStyleForTD("box-sizing")}useTheme(e){"string"==typeof e&&/ht-theme-.*/.test(e)?(this.#tH(),e!==this.#tR&&(this.#tR=e),this.#tI(this.#tR),this.#tL()):tR(`${e} isn't a valid theme name. Please ensure it follows the format ht-theme-<theme-name>.`)}getThemeName(){return this.#tR}#tx(){if(!this.#tl||!this.#tA||!this.#tA.head)return;let e=this.#tA.getElementById(hk);if(e&&e instanceof HTMLStyleElement)return;let t=this.#tA.createElement("style");t.id=hk,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 62,800.00.\n *\n * This software is protected by applicable copyright laws, including international treaties, and dual-\n * licensed - depending on whether your use for commercial purposes, meaning intended for or\n * resulting in commercial advantage or monetary compensation, or not.\n *\n * If your use is strictly personal or solely for evaluation purposes, meaning for the purposes of testing\n * the suitability, performance, and usefulness of this software outside the production environment,\n * you agree to be bound by the terms included in the "handsontable-non-commercial-license.pdf" file.\n *\n * Your use of this software for commercial purposes is subject to the terms included in an applicable\n * license agreement.\n *\n * In any case, you must not make any such use of this software as to develop software which may be\n * considered competitive with this software.\n *\n * UNLESS EXPRESSLY AGREED OTHERWISE, HANDSONCODE PROVIDES THIS SOFTWARE ON AN "AS IS"\n * BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, AND IN NO EVENT AND UNDER NO\n * LEGAL THEORY, SHALL HANDSONCODE BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY DIRECT,\n * INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY CHARACTER ARISING FROM\n * USE OR INABILITY TO USE THIS SOFTWARE.\n *\n * Version: 18.0.0-rc5\n * Release date: 25/06/2026 (built at 25/06/2026 07:06:36)\n */\n.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}:is(.ht-root-wrapper:has(>.ht-slot-bottom>.ht-slot-element) .ht-wrapper:not(.htHorizontallyScrollableByWindow) .ht_master .wtHolder,.ht-root-wrapper:has(>.ht-slot-bottom>.ht-slot-element) .ht-wrapper:not(.htVerticallyScrollableByWindow) .ht_master .wtHolder,.ht-root-wrapper:has(>.ht-slot-top>.ht-slot-element) .ht-wrapper:not(.htHorizontallyScrollableByWindow) .ht_master .wtHolder,.ht-root-wrapper:has(>.ht-slot-top>.ht-slot-element) .ht-wrapper:not(.htVerticallyScrollableByWindow) .ht_master .wtHolder){background-color:var(--ht-background-color);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}.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)}.handsontable .wtHolder:not(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi))::-webkit-scrollbar-corner{border-bottom-right-radius:var(--ht-scrollbar-border-radius)}.handsontable .wtHolder:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi))::-webkit-scrollbar-corner{border-bottom-left-radius:var(--ht-scrollbar-border-radius)}.handsontable.ht-wrapper{width:100%;height:100%}.handsontable.ht-wrapper:not(.htFirstDatasetColumnNotRendered) td:first-of-type{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 tr.ht__row_even th{background-color:var(--ht-row-header-even-background-color)}.handsontable tr.ht__row_even td{background-color:var(--ht-row-cell-even-background-color)}.handsontable tr.ht__row_odd th{background-color:var(--ht-row-header-odd-background-color)}.handsontable tr.ht__row_odd td{background-color:var(--ht-row-cell-odd-background-color)}.handsontable th,.handsontable 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;border-inline-width:0 1px;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-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 th.invisibleSelection,.handsontable td.invisibleSelection{outline:none}.handsontable th.invisibleSelection::selection,.handsontable td.invisibleSelection::selection{background:0 0}.handsontable 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 th:last-child{border-inline-width:0 1px;border-bottom-width:1px;border-inline-end-color:var(--ht-border-color)}.handsontable th:last-child.ht__active_highlight{border-inline-end-color:var(--ht-header-active-border-color)}.handsontable th:first-child{border-inline-start-color:var(--ht-border-color)}.handsontable th:first-child.ht__active_highlight{border-inline-start-color:var(--ht-header-active-border-color)}.handsontable th:first-child,.handsontable th:nth-child(2){border-inline-start-width:1px}.handsontable th.current{box-shadow:inset 0 0 0 1px var(--ht-cell-selection-border-color)}.handsontable th.active{color:var(--ht-header-active-foreground-color);background-color:var(--ht-header-active-background-color)}.handsontable th.ht__highlight{color:var(--ht-header-highlighted-foreground-color);background-color:var(--ht-header-highlighted-background-color)}.handsontable 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 tbody tr.ht__row_odd th.ht__highlight,.handsontable 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 tbody tr.ht__row_odd th.ht__active_highlight,.handsontable 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 tbody tr:first-of-type th:first-child:empty:after,.handsontable tbody tr:first-of-type td:first-child:empty:after{content:"";min-height:var(--ht-line-height);display:block}.handsontable tbody tr th{color:var(--ht-header-row-foreground-color);background-color:var(--ht-header-row-background-color);padding:0}.handsontable tbody tr th.ht__active_highlight{box-shadow:0 -1px 0 0 var(--ht-header-active-border-color)}.handsontable tbody tr th .relative{padding:var(--ht-cell-vertical-padding)var(--ht-cell-horizontal-padding);min-height:100%}.handsontable tbody tr td:first-child{border-inline-start-color:var(--ht-border-color)}.handsontable tbody tr td:last-child{border-inline-end-color:var(--ht-border-color)}.handsontable thead tr th{padding:0}.handsontable thead tr th.ht__active_highlight{box-shadow:-1px 0 0 0 var(--ht-header-active-border-color)}.handsontable 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 thead tr th .relative .colHeader{text-overflow:ellipsis;vertical-align:top;flex:auto;min-width:0;overflow:hidden}.handsontable tr:first-child th,.handsontable tr:first-child td{border-top-color:var(--ht-border-color);border-top-width:1px}.handsontable tr:first-child th.ht__active_highlight,.handsontable tr:first-child td.ht__active_highlight{border-top-color:var(--ht-header-active-border-color)}.handsontable tr:last-child th,.handsontable tr:last-child td{border-bottom-color:var(--ht-border-color)}.handsontable tr:last-child th.ht__active_highlight,.handsontable tr:last-child td.ht__active_highlight{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] td:first-of-type{border-inline-start-width:1px}.handsontable thead tr:not(:last-child) th{overflow:hidden}.handsontable .hide{display:none}.handsontable .relative{box-sizing:border-box;position:relative}.handsontable .wtHider{width:0}.handsontable .wtSpreader{width:0;height:auto;position:relative}.handsontable .htAutoSize{visibility:hidden;position:absolute;top:-99000px;left:-99000px}.handsontable .htTextEllipsis{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.handsontable table,.handsontable tbody,.handsontable thead,.handsontable input,.handsontable textarea,.handsontable div{box-sizing:content-box}.handsontable input,.handsontable textarea{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 col,.handsontable col.rowHeader{width:64px}.handsontable 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 tr.hidden,.handsontable tr.hidden td,.handsontable tr.hidden th{display:none}.handsontable a{color:var(--ht-link-color)}.handsontable a:hover{color:var(--ht-link-hover-color)}.handsontable .ht_clone_top th:nth-child(2),.handsontable .ht_clone_top_inline_start_corner th:nth-child(2){border-inline-width:0 1px}.handsontable.htRowHeaders thead tr th:nth-child(2){border-inline-start-width:1px}.handsontable .ht_master:not(.innerBorderInlineStart):not(.emptyColumns) tbody tr th,.handsontable .ht_master:not(.innerBorderInlineStart):not(.emptyColumns) thead tr th:first-child,.handsontable .ht_master:not(.innerBorderInlineStart):not(.emptyColumns)~.handsontable:not(.htGhostTable) tbody tr th,.handsontable .ht_master:not(.innerBorderInlineStart):not(.emptyColumns)~.handsontable:not(.ht_clone_top):not(.htGhostTable) thead tr th:first-child{border-inline-width:1px 0}.handsontable .ht_master:not(.innerBorderTop):not(.innerBorderBottom) thead tr:last-child th,.handsontable .ht_master:not(.innerBorderTop):not(.innerBorderBottom)~.handsontable thead tr:last-child th,.handsontable .ht_master:not(.innerBorderTop):not(.innerBorderBottom) thead tr.lastChild th,.handsontable .ht_master:not(.innerBorderTop):not(.innerBorderBottom)~.handsontable thead tr.lastChild th{border-bottom-width:0}.handsontable.htAutoRowSize .ht_master.innerBorderTop tbody tr:first-child th,.handsontable.htAutoRowSize .ht_master.innerBorderTop tbody tr:first-child td,.handsontable.htAutoRowSize .ht_master.innerBorderTop~.ht_clone_inline_start tbody tr:first-child th,.handsontable.htAutoRowSize .ht_master.innerBorderTop~.ht_clone_inline_start tbody tr:first-child td{border-top-width:0}.handsontable .ht_master table.htCore>thead,.handsontable .ht_master table.htCore>tbody>tr>th,.handsontable .ht_clone_inline_start table.htCore>thead{visibility:hidden}.ht_master,.ht_clone_inline_start,.ht_clone_top,.ht_clone_bottom,.ht_master .wtHolder,.ht_clone_inline_start .wtHolder,.ht_clone_top .wtHolder,.ht_clone_bottom .wtHolder{overflow:hidden}.ht_master .wtHolder{overflow:auto}[dir=rtl].handsontable td[dir=ltr]{border-inline-width:1px 0}[dir=rtl].handsontable 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:not(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-top-left-radius:var(--ht-border-radius)}.handsontable.ht-wrapper:not(.htColumnHeaders) .ht_master .htCore tbody tr:first-child td:first-child:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-top-right-radius:var(--ht-border-radius)}.handsontable.ht-wrapper:not(.htColumnHeaders) .ht_master .htCore tbody tr:first-child td:last-child:not(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-top-right-radius:var(--ht-border-radius)}.handsontable.ht-wrapper:not(.htColumnHeaders) .ht_master .htCore tbody tr:first-child td:last-child:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-top-left-radius:var(--ht-border-radius)}.handsontable.ht-wrapper:not(.htColumnHeaders) .ht_clone_top_inline_start_corner .htCore tbody tr:first-child td:first-child:not(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-top-left-radius:var(--ht-border-radius)}.handsontable.ht-wrapper:not(.htColumnHeaders) .ht_clone_top_inline_start_corner .htCore tbody tr:first-child td:first-child:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-top-right-radius:var(--ht-border-radius)}.handsontable.ht-wrapper:not(.htColumnHeaders) .ht_clone_top .htCore tbody tr:first-child td:first-child:not(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-top-left-radius:var(--ht-border-radius)}.handsontable.ht-wrapper:not(.htColumnHeaders) .ht_clone_top .htCore tbody tr:first-child td:first-child:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-top-right-radius:var(--ht-border-radius)}.handsontable.ht-wrapper:not(.htColumnHeaders) .ht_clone_top .htCore tbody tr:first-child td:last-child:not(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-top-right-radius:var(--ht-border-radius)}.handsontable.ht-wrapper:not(.htColumnHeaders) .ht_clone_top .htCore tbody tr:first-child td:last-child:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-top-left-radius:var(--ht-border-radius)}:is(.handsontable.ht-wrapper:not(.htColumnHeaders) .ht_clone_inline_start .htCore tbody tr:first-child th:first-child:not(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)),.handsontable.ht-wrapper:not(.htColumnHeaders) .ht_clone_inline_start .htCore tbody tr:first-child td:first-child:not(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi))){border-top-left-radius:var(--ht-border-radius)}:is(.handsontable.ht-wrapper:not(.htColumnHeaders) .ht_clone_inline_start .htCore tbody tr:first-child th:first-child:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)),.handsontable.ht-wrapper:not(.htColumnHeaders) .ht_clone_inline_start .htCore tbody tr:first-child td:first-child:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi))){border-top-right-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:not(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-top-left-radius:var(--ht-border-radius)}.handsontable.ht-wrapper .ht_master .htCore thead tr:first-child th:first-child:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-top-right-radius:var(--ht-border-radius)}.handsontable.ht-wrapper .ht_master .htCore thead tr:first-child th:not(.hiddenHeader):not(:has(~th:not(.hiddenHeader))):not(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-top-right-radius:var(--ht-border-radius)}.handsontable.ht-wrapper .ht_master .htCore thead tr:first-child th:not(.hiddenHeader):not(:has(~th:not(.hiddenHeader))):is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-top-left-radius:var(--ht-border-radius)}.handsontable.ht-wrapper .ht_master .htCore thead tr:last-child th:first-child:not(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-bottom-left-radius:var(--ht-border-radius)}.handsontable.ht-wrapper .ht_master .htCore thead tr:last-child th:first-child:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-bottom-right-radius:var(--ht-border-radius)}.handsontable.ht-wrapper .ht_master .htCore thead tr:last-child th:not(.hiddenHeader):not(:has(~th:not(.hiddenHeader))):not(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-bottom-right-radius:var(--ht-border-radius)}.handsontable.ht-wrapper .ht_master .htCore thead tr:last-child th:not(.hiddenHeader):not(:has(~th:not(.hiddenHeader))):is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-bottom-left-radius:var(--ht-border-radius)}.handsontable.ht-wrapper .ht_master .htCore tbody tr:last-child td:first-child:not(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-bottom-left-radius:var(--ht-border-radius)}.handsontable.ht-wrapper .ht_master .htCore tbody tr:last-child td:first-child:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-bottom-right-radius:var(--ht-border-radius)}.handsontable.ht-wrapper .ht_master .htCore tbody tr:last-child td:last-child:not(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-bottom-right-radius:var(--ht-border-radius)}.handsontable.ht-wrapper .ht_master .htCore tbody tr:last-child td:last-child:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-bottom-left-radius:var(--ht-border-radius)}.handsontable.ht-wrapper .ht_clone_top_inline_start_corner .htCore:not(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-top-left-radius:var(--ht-border-radius)}.handsontable.ht-wrapper .ht_clone_top_inline_start_corner .htCore:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-top-right-radius:var(--ht-border-radius)}.handsontable.ht-wrapper .ht_clone_top_inline_start_corner .htCore thead tr:first-child th:first-child:not(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-top-left-radius:var(--ht-border-radius)}.handsontable.ht-wrapper .ht_clone_top_inline_start_corner .htCore thead tr:first-child th:first-child:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-top-right-radius:var(--ht-border-radius)}.handsontable.ht-wrapper .ht_clone_top .htCore:not(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-top-left-radius:var(--ht-border-radius);border-top-right-radius:var(--ht-border-radius)}.handsontable.ht-wrapper .ht_clone_top .htCore:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-top-right-radius:var(--ht-border-radius);border-top-left-radius:var(--ht-border-radius)}.handsontable.ht-wrapper .ht_clone_top .htCore thead tr:first-child th:first-child:not(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-top-left-radius:var(--ht-border-radius)}.handsontable.ht-wrapper .ht_clone_top .htCore thead tr:first-child th:first-child:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-top-right-radius:var(--ht-border-radius)}.handsontable.ht-wrapper .ht_clone_top .htCore thead tr:first-child th:not(.hiddenHeader):not(:has(~th:not(.hiddenHeader))):not(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-top-right-radius:var(--ht-border-radius)}.handsontable.ht-wrapper .ht_clone_top .htCore thead tr:first-child th:not(.hiddenHeader):not(:has(~th:not(.hiddenHeader))):is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-top-left-radius:var(--ht-border-radius)}.handsontable.ht-wrapper .ht_clone_inline_start .htCore:not(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-top-left-radius:var(--ht-border-radius);border-bottom-left-radius:var(--ht-border-radius)}.handsontable.ht-wrapper .ht_clone_inline_start .htCore:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-top-right-radius:var(--ht-border-radius);border-bottom-right-radius:var(--ht-border-radius)}.handsontable.ht-wrapper .ht_clone_inline_start .htCore thead tr:first-child th:first-child:not(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-top-left-radius:var(--ht-border-radius)}.handsontable.ht-wrapper .ht_clone_inline_start .htCore thead tr:first-child th:first-child:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-top-right-radius:var(--ht-border-radius)}:is(.handsontable.ht-wrapper .ht_clone_inline_start .htCore tbody tr:last-child th:first-child:not(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)),.handsontable.ht-wrapper .ht_clone_inline_start .htCore tbody tr:last-child td:first-child:not(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi))){border-bottom-left-radius:var(--ht-border-radius)}:is(.handsontable.ht-wrapper .ht_clone_inline_start .htCore tbody tr:last-child th:first-child:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)),.handsontable.ht-wrapper .ht_clone_inline_start .htCore tbody tr:last-child td:first-child:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi))){border-bottom-right-radius:var(--ht-border-radius)}.handsontable.ht-wrapper .ht_clone_bottom_inline_start_corner .htCore:not(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-bottom-left-radius:var(--ht-border-radius)}.handsontable.ht-wrapper .ht_clone_bottom_inline_start_corner .htCore:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-bottom-right-radius:var(--ht-border-radius)}:is(.handsontable.ht-wrapper .ht_clone_bottom_inline_start_corner .htCore tr:last-child th:first-child:not(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)),.handsontable.ht-wrapper .ht_clone_bottom_inline_start_corner .htCore tr:last-child td:first-child:not(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi))){border-bottom-left-radius:var(--ht-border-radius)}:is(.handsontable.ht-wrapper .ht_clone_bottom_inline_start_corner .htCore tr:last-child th:first-child:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)),.handsontable.ht-wrapper .ht_clone_bottom_inline_start_corner .htCore tr:last-child td:first-child:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi))){border-bottom-right-radius:var(--ht-border-radius)}.handsontable.ht-wrapper .ht_clone_bottom .htCore:not(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-bottom-right-radius:var(--ht-border-radius);border-bottom-left-radius:var(--ht-border-radius)}.handsontable.ht-wrapper .ht_clone_bottom .htCore:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-bottom-left-radius:var(--ht-border-radius);border-bottom-right-radius:var(--ht-border-radius)}:is(.handsontable.ht-wrapper .ht_clone_bottom .htCore tr:last-child th:first-child:not(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)),.handsontable.ht-wrapper .ht_clone_bottom .htCore tr:last-child td:first-child:not(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi))){border-bottom-left-radius:var(--ht-border-radius)}:is(.handsontable.ht-wrapper .ht_clone_bottom .htCore tr:last-child th:first-child:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)),.handsontable.ht-wrapper .ht_clone_bottom .htCore tr:last-child td:first-child:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi))){border-bottom-right-radius:var(--ht-border-radius)}:is(.handsontable.ht-wrapper .ht_clone_bottom .htCore tr:last-child th:last-child:not(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)),.handsontable.ht-wrapper .ht_clone_bottom .htCore tr:last-child td:last-child:not(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi))){border-bottom-right-radius:var(--ht-border-radius)}:is(.handsontable.ht-wrapper .ht_clone_bottom .htCore tr:last-child th:last-child:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)),.handsontable.ht-wrapper .ht_clone_bottom .htCore tr:last-child td:last-child:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi))){border-bottom-left-radius:var(--ht-border-radius)}.handsontable.ht-wrapper.htHasScrollX:not(.htHorizontallyScrollableByWindow) .htCore:not(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)),.handsontable.ht-wrapper.htHasScrollX:not(.htHorizontallyScrollableByWindow) .htCore:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-bottom-right-radius:0;border-bottom-left-radius:0}:is(.handsontable.ht-wrapper.htHasScrollX:not(.htHorizontallyScrollableByWindow) .htCore thead tr:last-child th:first-child:not(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)),.handsontable.ht-wrapper.htHasScrollX:not(.htHorizontallyScrollableByWindow) .htCore tbody tr:last-child td:first-child:not(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)),.handsontable.ht-wrapper.htHasScrollX:not(.htHorizontallyScrollableByWindow) .htCore tbody tr:last-child th:first-child:not(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi))){border-bottom-left-radius:0}:is(.handsontable.ht-wrapper.htHasScrollX:not(.htHorizontallyScrollableByWindow) .htCore thead tr:last-child th:first-child:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)),.handsontable.ht-wrapper.htHasScrollX:not(.htHorizontallyScrollableByWindow) .htCore tbody tr:last-child td:first-child:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)),.handsontable.ht-wrapper.htHasScrollX:not(.htHorizontallyScrollableByWindow) .htCore tbody tr:last-child th:first-child:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi))){border-bottom-right-radius:0}:is(.handsontable.ht-wrapper.htHasScrollX:not(.htHorizontallyScrollableByWindow) .htCore thead tr:last-child th:not(.hiddenHeader):not(:has(~th:not(.hiddenHeader))),.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):not(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-bottom-right-radius:0}:is(.handsontable.ht-wrapper.htHasScrollX:not(.htHorizontallyScrollableByWindow) .htCore thead tr:last-child th:not(.hiddenHeader):not(:has(~th:not(.hiddenHeader))),.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):is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-bottom-left-radius:0}.handsontable.ht-wrapper.htHasScrollY:not(.htVerticallyScrollableByWindow) .htCore:not(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-top-right-radius:0;border-bottom-right-radius:0}.handsontable.ht-wrapper.htHasScrollY:not(.htVerticallyScrollableByWindow) .htCore:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-top-left-radius:0;border-bottom-left-radius:0}:is(.handsontable.ht-wrapper.htHasScrollY:not(.htVerticallyScrollableByWindow) .htCore thead tr:first-child th:not(.hiddenHeader):not(:has(~th:not(.hiddenHeader))),.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):not(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-top-right-radius:0}:is(.handsontable.ht-wrapper.htHasScrollY:not(.htVerticallyScrollableByWindow) .htCore thead tr:first-child th:not(.hiddenHeader):not(:has(~th:not(.hiddenHeader))),.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):is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-top-left-radius:0}:is(.handsontable.ht-wrapper.htHasScrollY:not(.htVerticallyScrollableByWindow) .htCore thead tr:last-child th:not(.hiddenHeader):not(:has(~th:not(.hiddenHeader))),.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):not(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-bottom-right-radius:0}:is(.handsontable.ht-wrapper.htHasScrollY:not(.htVerticallyScrollableByWindow) .htCore thead tr:last-child th:not(.hiddenHeader):not(:has(~th:not(.hiddenHeader))),.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):is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-bottom-left-radius:0}.ht-root-wrapper{border-radius:var(--ht-border-radius)}.ht-root-wrapper:has(>.ht-slot-bottom>.ht-slot-element) .ht-wrapper:not(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-bottom-right-radius:0;border-bottom-left-radius:0}.ht-root-wrapper:has(>.ht-slot-bottom>.ht-slot-element) .ht-wrapper:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-bottom-right-radius:0;border-bottom-left-radius:0}.ht-root-wrapper:has(>.ht-slot-bottom>.ht-slot-element) .ht_master .wtHolder:not(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-bottom-right-radius:0;border-bottom-left-radius:0}.ht-root-wrapper:has(>.ht-slot-bottom>.ht-slot-element) .ht_master .wtHolder:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-bottom-right-radius:0;border-bottom-left-radius:0}.ht-root-wrapper:has(>.ht-slot-bottom>.ht-slot-element) .htCore:not(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-bottom-right-radius:0;border-bottom-left-radius:0}.ht-root-wrapper:has(>.ht-slot-bottom>.ht-slot-element) .htCore:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-bottom-right-radius:0;border-bottom-left-radius:0}:is(.ht-root-wrapper:has(>.ht-slot-bottom>.ht-slot-element) .htCore thead tr:last-child th:first-child,.ht-root-wrapper:has(>.ht-slot-bottom>.ht-slot-element) .htCore tbody tr:last-child td:first-child,.ht-root-wrapper:has(>.ht-slot-bottom>.ht-slot-element) .htCore tbody tr:last-child th:first-child):not(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-bottom-left-radius:0}:is(.ht-root-wrapper:has(>.ht-slot-bottom>.ht-slot-element) .htCore thead tr:last-child th:first-child,.ht-root-wrapper:has(>.ht-slot-bottom>.ht-slot-element) .htCore tbody tr:last-child td:first-child,.ht-root-wrapper:has(>.ht-slot-bottom>.ht-slot-element) .htCore tbody tr:last-child th:first-child):is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-bottom-right-radius:0}:is(.ht-root-wrapper:has(>.ht-slot-bottom>.ht-slot-element) .htCore thead tr:last-child th:not(.hiddenHeader):not(:has(~th:not(.hiddenHeader))),.ht-root-wrapper:has(>.ht-slot-bottom>.ht-slot-element) .htCore tbody tr:last-child td:last-child,.ht-root-wrapper:has(>.ht-slot-bottom>.ht-slot-element) .htCore tbody tr:last-child th:last-child):not(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-bottom-right-radius:0}:is(.ht-root-wrapper:has(>.ht-slot-bottom>.ht-slot-element) .htCore thead tr:last-child th:not(.hiddenHeader):not(:has(~th:not(.hiddenHeader))),.ht-root-wrapper:has(>.ht-slot-bottom>.ht-slot-element) .htCore tbody tr:last-child td:last-child,.ht-root-wrapper:has(>.ht-slot-bottom>.ht-slot-element) .htCore tbody tr:last-child th:last-child):is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-bottom-left-radius:0}.ht-root-wrapper:has(>.ht-slot-top>.ht-slot-element) .ht-wrapper:not(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-top-left-radius:0;border-top-right-radius:0}.ht-root-wrapper:has(>.ht-slot-top>.ht-slot-element) .ht-wrapper:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-top-left-radius:0;border-top-right-radius:0}.ht-root-wrapper:has(>.ht-slot-top>.ht-slot-element) .ht_master .wtHolder:not(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-top-left-radius:0;border-top-right-radius:0}.ht-root-wrapper:has(>.ht-slot-top>.ht-slot-element) .ht_master .wtHolder:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-top-left-radius:0;border-top-right-radius:0}.ht-root-wrapper:has(>.ht-slot-top>.ht-slot-element) .htCore:not(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-top-left-radius:0;border-top-right-radius:0}.ht-root-wrapper:has(>.ht-slot-top>.ht-slot-element) .htCore:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-top-left-radius:0;border-top-right-radius:0}:is(.ht-root-wrapper:has(>.ht-slot-top>.ht-slot-element) .htCore thead tr:first-child th:first-child,.ht-root-wrapper:has(>.ht-slot-top>.ht-slot-element) .htCore tbody tr:first-child td:first-child,.ht-root-wrapper:has(>.ht-slot-top>.ht-slot-element) .htCore tbody tr:first-child th:first-child):not(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-top-left-radius:0}:is(.ht-root-wrapper:has(>.ht-slot-top>.ht-slot-element) .htCore thead tr:first-child th:first-child,.ht-root-wrapper:has(>.ht-slot-top>.ht-slot-element) .htCore tbody tr:first-child td:first-child,.ht-root-wrapper:has(>.ht-slot-top>.ht-slot-element) .htCore tbody tr:first-child th:first-child):is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-top-right-radius:0}:is(.ht-root-wrapper:has(>.ht-slot-top>.ht-slot-element) .htCore thead tr:first-child th:not(.hiddenHeader):not(:has(~th:not(.hiddenHeader))),.ht-root-wrapper:has(>.ht-slot-top>.ht-slot-element) .htCore tbody tr:first-child td:last-child,.ht-root-wrapper:has(>.ht-slot-top>.ht-slot-element) .htCore tbody tr:first-child th:last-child):not(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-top-right-radius:0}:is(.ht-root-wrapper:has(>.ht-slot-top>.ht-slot-element) .htCore thead tr:first-child th:not(.hiddenHeader):not(:has(~th:not(.hiddenHeader))),.ht-root-wrapper:has(>.ht-slot-top>.ht-slot-element) .htCore tbody tr:first-child td:last-child,.ht-root-wrapper:has(>.ht-slot-top>.ht-slot-element) .htCore tbody tr:first-child th:last-child):is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-top-left-radius:0}.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:not(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)),.ht-root-wrapper .ht-slot-bottom>.ht-slot-element:last-of-type:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-top-left-radius:0;border-top-right-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:not(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)),.ht-root-wrapper .ht-slot-top>.ht-slot-element:first-of-type:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-bottom-right-radius:0;border-bottom-left-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{inset-inline-start:-10000px;inset-inline-end:unset;z-index:9999;top:-10000px}.handsontable.hide-tween{animation:.2s forwards opacity-hide}.handsontable.show-tween{animation:.3s forwards opacity-show}.ht_clone_master{z-index:100}.ht_clone_inline_start{z-index:120}.ht_clone_bottom{z-index:130}.ht_clone_bottom_inline_start_corner{z-index:150}.ht_clone_top{z-index:160}.ht_clone_top_inline_start_corner{z-index:180}.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 .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:10;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}.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}.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)}.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:after{content:"";opacity:.6;display:block;position:absolute;top:0;left:0}[dir=rtl].handsontable .htAutocompleteArrow{float:left}.handsontable .htCheckboxRendererInput{width:var(--ht-checkbox-size);height:var(--ht-checkbox-size);vertical-align:middle;cursor:pointer;margin:0;outline:none;margin-top:-2px;display:inline-block;position:relative}.handsontable .htCheckboxRendererInput:first-child{margin-inline-end:var(--ht-gap-size)}.handsontable .htCheckboxRendererInput:last-child{margin-inline-start:var(--ht-gap-size)}.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:after{content:"";color:var(--ht-checkbox-icon-color);pointer-events:none;display:block;position:absolute;top:0;left:0;width:var(--ht-checkbox-size)!important;height:var(--ht-checkbox-size)!important}.handsontable .htCheckboxRendererInput:checked:before{border-color:var(--ht-checkbox-checked-border-color);background-color:var(--ht-checkbox-checked-background-color)}.handsontable .htCheckboxRendererInput:checked:after{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:after{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:after{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:after{color:var(--ht-checkbox-focus-icon-color)}.handsontable .htCheckboxRendererInput:disabled{cursor:initial}.handsontable .htCheckboxRendererInput:disabled:before{border-color:var(--ht-checkbox-disabled-border-color);background-color:var(--ht-checkbox-disabled-background-color)}.handsontable .htCheckboxRendererInput:disabled:after{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:after{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:after{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:after{color:var(--ht-checkbox-indeterminate-focus-icon-color)}.handsontable .htCheckboxRendererInput.noValue{opacity:.5}.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-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;flex-shrink:0;max-width:100px;display:inline-flex}.handsontable .ht-multi-select-chip-label{text-overflow:ellipsis;color:var(--ht-foreground-color);font-style:normal;font-weight:var(--ht-font-weight);line-height:var(--ht-line-height,40px);letter-spacing:var(--ht-letter-spacing,0);padding:0 var(--ht-chip-gap);overflow:hidden}.handsontable .ht-multi-select-chip-remove{cursor:pointer;color:var(--ht-icon-button-icon-color);background-position:50%;background-repeat:no-repeat;background-size:contain;flex-shrink:0;justify-content:center;align-items:center;padding:0;display:flex;position:relative;width:var(--ht-icon-size)!important;height:var(--ht-icon-size)!important}.handsontable .ht-multi-select-chip-remove:before{content:"";display:block;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;flex-shrink:0;justify-content:center;align-items:center;display:inline-flex}.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-icon{left:calc(var(--ht-menu-item-horizontal-padding) + 10px);opacity:.5;pointer-events:none;z-index:1;background-position:50%;background-repeat:no-repeat;background-size:contain;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{-webkit-appearance:none;appearance:none;width:var(--ht-checkbox-size);height:var(--ht-checkbox-size);margin:0;padding:0;display:flex;position:relative}.handsontableEditor .ht-multi-select-editor ul li div input:after{content:"";display:block;position:absolute;top:0;left:0}.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:checked:after{color:var(--ht-checkbox-checked-icon-color);background-color:currentColor}.handsontableEditor .ht-multi-select-editor ul li div input:focus{outline:none}.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 0 0 calc(var(--ht-gap-size)*2);overflow:hidden}.handsontableEditor .ht-multi-select-editor ul li:hover{background:color-mix(in srgb,var(--ht-menu-item-hover-color)var(--ht-menu-item-hover-color-opacity,100%),transparent)}.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:after{content:"";right:calc(var(--ht-input-horizontal-padding) - var(--ht-icon-size)/4);display:block;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)}[dir=rtl].handsontable .htUISelectCaption:after{right:auto;left:calc(var(--ht-input-horizontal-padding) - var(--ht-icon-size)/4)}.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);-webkit-appearance:none;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]:after{content:"";color:var(--ht-radio-icon-color);display:block;position:absolute}.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:after{color:var(--ht-radio-checked-icon-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:disabled:after{color:var(--ht-radio-checked-disabled-icon-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]:checked:focus:after{color:var(--ht-radio-checked-focus-icon-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]:disabled:after{color:var(--ht-radio-disabled-icon-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]:focus:after{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:before,.handsontable .ht_nestingButton:before{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:1;display:block;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:before,.handsontable .collapsibleIndicator.ht_nestingCollapse:before,.handsontable .ht_nestingButton.expanded:before,.handsontable .ht_nestingButton.ht_nestingCollapse:before{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:before,.handsontable .collapsibleIndicator.ht_nestingCollapse:hover:before,.handsontable .ht_nestingButton.expanded:hover:before,.handsontable .ht_nestingButton.ht_nestingCollapse:hover:before{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:before,.handsontable .collapsibleIndicator.ht_nestingExpand:before,.handsontable .ht_nestingButton.collapsed:before,.handsontable .ht_nestingButton.ht_nestingExpand:before{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:before,.handsontable .collapsibleIndicator.ht_nestingExpand:hover:before,.handsontable .ht_nestingButton.collapsed:hover:before,.handsontable .ht_nestingButton.ht_nestingExpand:hover:before{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:before,.handsontable th.ht__active_highlight .collapsibleIndicator.ht_nestingExpand:before,.handsontable th.ht__active_highlight .ht_nestingButton.collapsed:before,.handsontable th.ht__active_highlight .ht_nestingButton.ht_nestingExpand:before{color:var(--ht-collapse-button-close-icon-active-color)}.handsontable th.ht__active_highlight .collapsibleIndicator.collapsed:hover:before,.handsontable th.ht__active_highlight .collapsibleIndicator.ht_nestingExpand:hover:before,.handsontable th.ht__active_highlight .ht_nestingButton.collapsed:hover:before,.handsontable th.ht__active_highlight .ht_nestingButton.ht_nestingExpand:hover:before{color:var(--ht-collapse-button-close-hover-icon-active-color)}.handsontable th.ht__active_highlight .collapsibleIndicator.expanded:before,.handsontable th.ht__active_highlight .collapsibleIndicator.ht_nestingCollapse:before,.handsontable th.ht__active_highlight .ht_nestingButton.expanded:before,.handsontable th.ht__active_highlight .ht_nestingButton.ht_nestingCollapse:before{color:var(--ht-collapse-button-open-icon-active-color)}.handsontable th.ht__active_highlight .collapsibleIndicator.expanded:hover:before,.handsontable th.ht__active_highlight .collapsibleIndicator.ht_nestingCollapse:hover:before,.handsontable th.ht__active_highlight .ht_nestingButton.expanded:hover:before,.handsontable th.ht__active_highlight .ht_nestingButton.ht_nestingCollapse:hover:before{color:var(--ht-collapse-button-open-hover-icon-active-color)}.handsontable thead th.htRowspanHeader+th{border-inline-start-width: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 thead tr:last-child th:first-child:not(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-bottom-left-radius:0}.handsontable.htRowHeaders.htHasRowspanHeaders thead tr:last-child th:first-child:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-bottom-right-radius:0}.handsontable.htHasRowspanHeaders .ht_clone_inline_start .htCore tbody tr:first-child th:first-child:not(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-top-left-radius:0}.handsontable.htHasRowspanHeaders .ht_clone_inline_start .htCore tbody tr:first-child th:first-child:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-top-right-radius:0}.handsontable .ht_master:not(.innerBorderTop):not(.innerBorderBottom) thead th.htRowspanBottomLevel,.handsontable .ht_master:not(.innerBorderTop):not(.innerBorderBottom)~.handsontable thead th.htRowspanBottomLevel{border-bottom-width: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 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 th.beforeHiddenColumn,.handsontable th.afterHiddenColumn{position:relative}.handsontable th.beforeHiddenColumn:before,.handsontable th.beforeHiddenColumn:after,.handsontable th.afterHiddenColumn:before,.handsontable th.afterHiddenColumn:after{color:var(--ht-hidden-indicator-color);position:absolute;top:50%;transform:translateY(-50%);width:10px!important;height:10px!important}.handsontable th.beforeHiddenColumn:after{content:"";display:block;right:-2px}.handsontable th.afterHiddenColumn:before{content:"";display:block;left:-2px}.handsontable th.ht__active_highlight.beforeHiddenColumn:before,.handsontable th.ht__active_highlight.beforeHiddenColumn:after,.handsontable th.ht__active_highlight.afterHiddenColumn:before,.handsontable th.ht__active_highlight.afterHiddenColumn:after{color:var(--ht-icon-button-active-icon-color,var(--ht-icon-active-button-icon-color))}[dir=rtl].handsontable th.beforeHiddenColumn:after{right:initial;left:-2px;transform:translateY(-50%)rotate(180deg)}[dir=rtl].handsontable th.afterHiddenColumn:before{right:-2px;left:initial;transform:translateY(-50%)rotate(180deg)}.handsontable th.beforeHiddenRow,.handsontable th.afterHiddenRow{position:relative}.handsontable th.beforeHiddenRow:before,.handsontable th.beforeHiddenRow:after,.handsontable th.afterHiddenRow:before,.handsontable th.afterHiddenRow:after{color:var(--ht-hidden-indicator-color);position:absolute;left:50%;transform:translate(-50%);width:10px!important;height:10px!important}.handsontable th.beforeHiddenRow:after{content:"";display:block;bottom:-2px}.handsontable th.afterHiddenRow:before{content:"";display:block;top:-2px}.handsontable th.ht__active_highlight.beforeHiddenRow:before,.handsontable th.ht__active_highlight.beforeHiddenRow:after,.handsontable th.ht__active_highlight.afterHiddenRow:before,.handsontable th.ht__active_highlight.afterHiddenRow:after{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:before{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));color:var(--ht-icon-button-icon-color);z-index:1;display:block;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:before{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:before{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:before{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{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){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_top_inline_start_corner,.handsontable.htDropdownMenu .ht_clone_bottom_inline_start_corner,.handsontable.htContextMenu .ht_clone_top,.handsontable.htContextMenu .ht_clone_bottom,.handsontable.htContextMenu .ht_clone_inline_start,.handsontable.htContextMenu .ht_clone_top_inline_start_corner,.handsontable.htContextMenu .ht_clone_bottom_inline_start_corner,.handsontable.htFiltersConditionsMenu .ht_clone_top,.handsontable.htFiltersConditionsMenu .ht_clone_bottom,.handsontable.htFiltersConditionsMenu .ht_clone_inline_start,.handsontable.htFiltersConditionsMenu .ht_clone_top_inline_start_corner,.handsontable.htFiltersConditionsMenu .ht_clone_bottom_inline_start_corner{display:none}.handsontable.htDropdownMenu table.htCore,.handsontable.htContextMenu table.htCore,.handsontable.htFiltersConditionsMenu table.htCore{overflow:hidden}.handsontable.htDropdownMenu .htCustomMenuRenderer .table.htCore,.handsontable.htContextMenu .htCustomMenuRenderer .table.htCore,.handsontable.htFiltersConditionsMenu .htCustomMenuRenderer .table.htCore{box-shadow:none}.handsontable.htDropdownMenu.handsontable:focus,.handsontable.htContextMenu.handsontable:focus,.handsontable.htFiltersConditionsMenu.handsontable:focus{outline:none}.handsontable.htDropdownMenu .wtBorder,.handsontable.htContextMenu .wtBorder,.handsontable.htFiltersConditionsMenu .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{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{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{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{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):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):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):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).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).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).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{margin-inline-end:calc(2*var(--ht-gap-size,4px) + var(--ht-icon-size))}.handsontable.htDropdownMenu table tbody tr td.htSubmenu .htItemWrapper:after,.handsontable.htContextMenu table tbody tr td.htSubmenu .htItemWrapper:after,.handsontable.htFiltersConditionsMenu table tbody tr td.htSubmenu .htItemWrapper:after{content:"";top:50%;right:calc(var(--ht-menu-item-horizontal-padding) + var(--ht-gap-size)*2);display:block;position:absolute;transform:translateY(-50%)}.handsontable.htDropdownMenu table tbody tr td.htSeparator,.handsontable.htContextMenu table tbody tr td.htSeparator,.handsontable.htFiltersConditionsMenu 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{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{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{display:none}:is(.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)){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{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{vertical-align:text-bottom;margin-right:12px}.handsontable.htDropdownMenu table tbody tr td .htItemWrapper span.selected,.handsontable.htContextMenu table tbody tr td .htItemWrapper span.selected,.handsontable.htFiltersConditionsMenu table tbody tr td .htItemWrapper span.selected{font-size:0;inset:0}.handsontable.htDropdownMenu table tbody tr td .htItemWrapper span.selected:after,.handsontable.htContextMenu table tbody tr td .htItemWrapper span.selected:after,.handsontable.htFiltersConditionsMenu table tbody tr td .htItemWrapper span.selected:after{content:"";top:50%;right:calc(var(--ht-menu-item-horizontal-padding) + var(--ht-gap-size)*2);color:var(--ht-accent-color);display:block;position:absolute;transform:translateY(-50%)}.handsontable.htDropdownMenu table tbody tr td div span.selected,.handsontable.htContextMenu table tbody tr td div span.selected,.handsontable.htFiltersConditionsMenu table tbody tr td div span.selected{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{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{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;border-radius:0!important;overflow-y:scroll!important}.handsontable .htUIMultipleSelect .ht_master .wtHolder .htCore{box-shadow:none}[dir=rtl].handsontable.htDropdownMenu table tbody tr td.htSubmenu .htItemWrapper:after,[dir=rtl].handsontable.htContextMenu table tbody tr td.htSubmenu .htItemWrapper:after,[dir=rtl].handsontable.htFiltersConditionsMenu table tbody tr td.htSubmenu .htItemWrapper:after{left:calc(4*var(--ht-gap-size));right:auto;transform:translateY(-50%)rotate(180deg)}[dir=rtl].handsontable.htDropdownMenu table tbody tr td .htItemWrapper span.selected:after,[dir=rtl].handsontable.htContextMenu table tbody tr td .htItemWrapper span.selected:after,[dir=rtl].handsontable.htFiltersConditionsMenu table tbody tr td .htItemWrapper span.selected:after{left:calc(4*var(--ht-gap-size));right:auto}.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{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);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:4px 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))}.handsontable .htCommentCell{position:relative}.handsontable .htCommentCell:after{content:"";top:0;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);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 .columnSorting:not(.indicatorDisabled){position:relative}.handsontable .columnSorting:not(.indicatorDisabled).sortAction.ascending,.handsontable .columnSorting:not(.indicatorDisabled).sortAction.descending{padding-inline-end:calc(var(--ht-icon-size,16px) + 2px)}.handsontable .columnSorting:not(.indicatorDisabled).sortAction:hover{cursor:pointer;text-decoration:none}.handsontable .columnSorting:not(.indicatorDisabled).sortAction:before{content:"";width:var(--ht-icon-size,16px);text-align:right;display:block;position:absolute;top:50%;right:2px;transform:translateY(-50%)}.handsontable .htRight .columnSorting.sortAction.ascending,.handsontable .htRight .columnSorting.sortAction.descending{padding-inline-start:calc(var(--ht-icon-size,16px) + 2px);padding-inline-end:0}.handsontable .htRight .columnSorting.sortAction:before,[dir=rtl] .handsontable .columnSorting.sortAction:before{text-align:left;left:2px;right:auto}[dir=rtl] .handsontable .htRight .columnSorting.sortAction.ascending,[dir=rtl] .handsontable .htRight .columnSorting.sortAction.descending{padding-inline-start:0;padding-inline-end:calc(var(--ht-icon-size,16px) + 2px)}[dir=rtl] .handsontable .htLeft .columnSorting.sortAction.ascending,[dir=rtl] .handsontable .htLeft .columnSorting.sortAction.descending{padding-inline-start:calc(var(--ht-icon-size,16px) + 2px);padding-inline-end:0}[dir=rtl] .handsontable .htLeft .columnSorting.sortAction:before{text-align:right;left:auto;right:2px}.htGhostTable .htCore span.colHeader.columnSorting:not(.indicatorDisabled):before{content:"*";padding-inline-end:calc(var(--ht-icon-size,16px) + 2px);display:inline-block;position:relative}.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 .htRowHeaders .ht_master.innerBorderInlineStart~.ht_clone_top_inline_start_corner th:nth-child(2),.handsontable .htRowHeaders .ht_master.innerBorderInlineStart~.ht_clone_inline_start td:first-of-type{border-left:0}.handsontable .ht_clone_top_inline_start_corner th.ht__active_highlight{box-shadow:none}.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{inset-inline-end:unset;width:0;border-inline-end:1px solid var(--ht-accent-color);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__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{border:1px solid var(--ht-accent-color);outline:none}.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:before{content:"";top:50%;margin-top:calc(-.5*var(--ht-icon-size));margin-inline-start:calc(-.5*var(--ht-icon-size));display:block;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}.handsontable.ht-pagination .ht-page-size-section__select-wrapper{border-radius:var(--ht-input-border-radius);position:relative}.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);background-color:var(--ht-input-background-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}.handsontable.ht-pagination .ht-page-size-section__select-wrapper select:disabled{opacity:.4;cursor:default;color:var(--ht-input-disabled-foreground-color);background-color:var(--ht-input-disabled-background-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);background-color:var(--ht-input-hover-background-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);background-color:var(--ht-input-focus-background-color);border-color:var(--ht-input-focus-border-color);outline:none}.handsontable.ht-pagination .ht-page-size-section__select-wrapper:after{content:"";background-color:var(--ht-foreground-color);pointer-events:none;display:block;position:absolute;inset-block-end:50%;inset-inline-end:var(--ht-gap-size);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:before{content:"";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}.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)}}.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}.ht-empty-data-state--disable-top-border:not(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)),.ht-empty-data-state--disable-top-border:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-top-left-radius:0;border-top-right-radius:0}.ht-empty-data-state--disable-inline-border{border-inline-start-width:0}.ht-empty-data-state--disable-inline-border:not(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-top-left-radius:0;border-bottom-left-radius:0}.ht-empty-data-state--disable-inline-border:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-top-right-radius:0;border-bottom-right-radius:0}.ht-empty-data-state--disable-bottom-border{border-bottom-width:0}.ht-empty-data-state--disable-bottom-border:not(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)),.ht-empty-data-state--disable-bottom-border:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-bottom-right-radius:0;border-bottom-left-radius:0}.ht-root-wrapper:has(>.ht-slot-bottom>.ht-slot-element) .ht-empty-data-state:not(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-bottom-right-radius:0;border-bottom-left-radius:0}.ht-root-wrapper:has(>.ht-slot-bottom>.ht-slot-element) .ht-empty-data-state:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-bottom-right-radius:0;border-bottom-left-radius:0}@keyframes ht-empty-data-state-spin{to{transform:rotate(360deg)}}',this.#tA.head.appendChild(t)}#t_(){let e=this.getCSSVariableValue("line-height"),t=this.getCSSVariableValue("cell-vertical-padding"),r=Math.round(Number.parseFloat(this.getStyleForTD("border-bottom-width")??""));return null===e||null===t||isNaN(r)?null:e+2*t+r}#tL(){this.#tT=getComputedStyle(this.#tE);let e=this.#tP(["box-sizing","border-bottom-width"]);this.#tN.td={...this.#tN.td,...{"box-sizing":e["box-sizing"],"border-bottom-width":e["border-bottom-width"]}}}#tP(e){let t=this.#tA,r=this.#tE,n=t.createElement("table"),o=t.createElement("tbody"),i=t.createElement("tr"),s=t.createElement("tr"),a=t.createElement("td");s.appendChild(a),o.appendChild(i),o.appendChild(s),n.appendChild(o),r.appendChild(n);let l=getComputedStyle(a),h={};return e.forEach(e=>{h[e]=l.getPropertyValue(e)}),r.removeChild(n),h}#tO(e){let t=Math.ceil(Number.parseFloat(this.#tk(e)??""));return Number.isNaN(t)?null:t}#tk(e){let t=this.#tT?.getPropertyValue(e)??null;return""===t?null:t}#tH(){this.#tN={},this.#tM={}}clearCache(){this.#tH(),this.#tL()}}let hH=null,hL=0,hP={TOP:"top",BOTTOM:"bottom"},hD="ht-slot-element",hF="licenseNotification",hV=`plugin:${hF}`,hB="hot-display-license-info";function hU(e){return e.rootSlotBottomElement?.querySelector(`.${hB}`)??null}let hz=(e,t)=>`width: var(--ht-icon-size);
|
|
65
|
+
declare https: //developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/key/Key_Values.`);let u={callback:t,group:n,runOnlyIf:o,captureCtrl:i,preventDefault:s,stopPropagation:a};ep(l)&&(u.relativeToGroup=l,u.position=h),hb(d)&&(u.forwardToContext=d),e.forEach(e=>{let t=hc(e);if(r.hasItem(t)){let e=r.getItem(t),n=e.findIndex(e=>e.group===l);-1!==n?"before"===h?n-=1:n+=1:n=e.length,e.splice(n,0,u)}else r.addItem(t,[u])})},o=e=>{let t=hc(e);r.removeItem(t)};return{__kindOf:hC,scope:t,addShortcut:n,addShortcuts:function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};e.forEach(e=>{eB(t,(r,n)=>{!1===Object.prototype.hasOwnProperty.call(e,n)&&(e[n]=t[n])}),n(e)})},getShortcuts:e=>{let t=hc(e),n=r.getItem(t);return ep(n)?n.slice():[]},hasShortcut:e=>{let t=hc(e);return r.hasItem(t)},removeShortcutsByKeys:o,removeShortcutsByGroup:e=>{r.getItems().forEach(t=>{let[r,n]=t,i=n.filter(t=>t.group!==e);0===i.length?o(r.split("+")):(n.length=0,n.push(...i))})}}},hw=(o=new Set,{press(e){o.add(e)},release(e){o.delete(e)},releaseAll(){o.clear()},isPressed:e=>o.has(e)}),hS=new WeakMap,hv=e=>{if("string"==typeof e.key){let t=hp(e);hm.includes(t)&&hw.press(t)}},hR=e=>{if("string"==typeof e.key){let t=hp(e);hm.includes(t)&&hw.release(t)}},hE={_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){ee(this._hooksStorage[e]||[],t=>{this.hot.removeHook(e,t)})},clearHooks(){eB(this._hooksStorage,(e,t)=>this.removeHooksByKey(t)),this._hooksStorage={}}};eV(hE,"MIXIN_NAME","hooksRefRegisterer",{writable:!1,enumerable:!1});let hT=Object.freeze({VIRGIN:"STATE_VIRGIN",EDITING:"STATE_EDITING",WAITING:"STATE_WAITING",FINISHED:"STATE_FINISHED"});class hA{static get EDITOR_TYPE(){return"base"}state=hT.VIRGIN;_opened=!1;_fullEditMode=!1;_closeCallback=null;_closeAfterDataChange=!0;TD=null;row=null;col=null;prop=null;originalValue=null;constructor(e){this.hot=e,this.init()}_fireCallbacks(e){this._closeCallback&&(this._closeCallback(e),this._closeCallback=null)}init(){}getValue(){eN("Editor getValue() method unimplemented")}setValue(e){eN("Editor setValue() method unimplemented")}open(e){eN("Editor open() method unimplemented")}close(){eN("Editor close() method unimplemented")}focus(){eN("Editor focus() method unimplemented")}prepare(e,t,r,n,o,i){this.TD=n,this.row=e,this.col=t,this.prop=r,this.originalValue=o,this.cellProperties=i,this.state=this.isOpened()?this.state:hT.VIRGIN}extend(){return class extends this.constructor{}}saveValue(e,t){let r,n,o,i;if(t){let e=this.hot.getSelectedRangeActive(),t=e?.getTopStartCorner(),s=e?.getBottomEndCorner();r=t?.row??this.row,n=t?.col??this.col,o=s?.row??this.row,i=s?.col??this.col}else[r,n,o,i]=[this.row,this.col,null,null];let s=this.hot.runHooks("modifyGetCellCoords",r,n,!1,"meta");Array.isArray(s)&&([r,n]=s),this.hot.populateFromArray(r,n,e,o,i,"edit")}beginEditing(e,t){if(this.state!==hT.VIRGIN)return;if(null===this.row||null===this.col)return void tR("Editor opened without valid cell coordinates.");let r=this.hot,n=r.rowIndexMapper.getRenderableFromVisualIndex(this.row),o=r.columnIndexMapper.getRenderableFromVisualIndex(this.col);if(null!==n&&null!==o&&r.view.scrollViewport({row:n,col:o}),this.state=hT.EDITING,this.isInFullEditMode()){let t=l0(this.originalValue,this.hot.getCellMeta(this.row,this.col)),r="string"==typeof e?e:eg(t);this.setValue(r)}this.open(t),this._opened=!0,this.focus(),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===hT.VIRGIN)return void this.hot._registerTimeout(()=>{this._fireCallbacks(!0)});if(this.state===hT.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),"function"==typeof this.cellProperties.valueParser&&(r=this.cellProperties.valueParser(r,this.cellProperties)),this.state=hT.WAITING,this.saveValue([[r]],t),this.hot.getCellValidator(this.cellProperties)?this.hot.addHookOnce("postAfterValidate",e=>{this.state=hT.FINISHED,this.discardEditor(e)}):(this.state=hT.FINISHED,this.discardEditor(!0))}}}cancelChanges(){this.state=hT.FINISHED,this.discardEditor()}discardEditor(e){if(this.state===hT.FINISHED)if(!1===e&&!0!==this.cellProperties.allowInvalid){if(null===this.row||null===this.col)return;this.hot.selectCell(this.row,this.col),this.focus(),this.state=hT.EDITING,this._fireCallbacks(!1)}else this.close(),this._opened=!1,this._fullEditMode=!1,this.state=hT.VIRGIN,this._fireCallbacks(!0),this.hot.getShortcutManager().setActiveContextName("grid")}enableFullEditMode(){this._fullEditMode=!0}isInFullEditMode(){return this._fullEditMode}isOpened(){return this._opened}isWaiting(){return this.state===hT.WAITING}getEditedCellRect(){let e=this.getEditedCell();if(!e)return;let{wtOverlays:t,wtViewport:r}=this.hot.view._wt,n=this.hot.rootWindow,o=t3(e),i=ro(e),s=t3(this.hot.rootElement),a=ro(this.hot.rootElement),l=t.topOverlay?.holder,h=t.inlineStartOverlay?.holder,d=l!==n?l.scrollTop:0,u=h!==n?h.scrollLeft:0,c=n.innerWidth-s.left-a,{wtTable:g}=t.getParentOverlay(e)??this.hot.view._wt,p=g.name,m=["master","inline_start"].includes(p)?d:0,f=["master","top","bottom"].includes(p)?u:0,C=+(o.top!==s.top),b=o.top-s.top-C-m,y=0;y=this.hot.isRtl()?n.innerWidth-o.left-i-c-1+f:o.left-s.left-1-f,["top","top_inline_start_corner"].includes(p)&&(b+=t.topOverlay?.getOverlayOffset()??0),["inline_start","top_inline_start_corner"].includes(p)&&(y+=Math.abs(t.inlineStartOverlay?.getOverlayOffset()??0));let w=this.hot.hasColHeaders(),S=this.hot.rowIndexMapper.getRenderableFromVisualIndex(this.row??0),R=this.hot.columnIndexMapper.getRenderableFromVisualIndex(this.col??0),E=this.hot.rowIndexMapper.getRenderableIndexesLength()-this.hot.view._wt.getSetting("fixedRowsBottom");(w&&(S??0)<=0||S===E)&&(b+=1),(R??0)<=0&&(y+=1);let T=r.rowsRenderCalculator?.startPosition??0,A=r.columnsRenderCalculator?.startPosition??0,M=Math.abs(t.inlineStartOverlay?.getScrollPosition()??0),N=t.topOverlay?.getScrollPosition()??0,I=rf(this.hot.rootDocument),x=this.#tS(e,p,T,N,I),O=this.#tv(e,p,g,i,A,M),k=n.getComputedStyle(e),_=Number.parseInt(k[this.hot.isRtl()?"borderRightWidth":"borderLeftWidth"],10)>0?0:1,H=Number.parseInt(k.borderTopWidth,10)>0?0:1,L=ro(e)+_,P=ri(e)+H,D=l&&rC(l)?I:0,F=h&&rb(h)?I:0,V=this.hot.view.maximumVisibleElementWidth(O)-D+_;return{top:b,start:y,height:P,maxHeight:Math.max(this.hot.view.maximumVisibleElementHeight(x??0)-F+H,this.hot.stylesHandler.getDefaultRowHeight()??0),width:L,maxWidth:V}}#tS(e,t,r,n,o){let i=e.offsetTop,{wtOverlays:s}=this.hot.view._wt;if(["inline_start","master"].includes(t)&&(i+=r-n),["bottom","bottom_inline_start_corner"].includes(t)&&s.bottomOverlay?.clone){let{wtViewport:e,wtTable:t}=s.bottomOverlay.clone;i+=e.getWorkspaceHeight()-t.getHeight()-o}return i}#tv(e,t,r,n,o,i){let s=e.offsetLeft;return this.hot.isRtl()?s=(s>=0?r.getWidth()-e.offsetLeft:Math.abs(s))+(o-i-n):["top","master","bottom"].includes(t)&&(s+=o-i),s}getEditedCellsLayerClass(){switch(this.checkEditorSection()){case"inline-start":return"ht_clone_left ht_clone_inline_start";case"bottom":return"ht_clone_bottom";case"bottom-inline-start-corner":return"ht_clone_bottom_left_corner ht_clone_bottom_inline_start_corner";case"top":return"ht_clone_top";case"top-inline-start-corner":return"ht_clone_top_left_corner ht_clone_top_inline_start_corner";default:return"ht_clone_master"}}getEditedCell(){return 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.getSettings(),r="";return this.row<(t.fixedRowsTop??0)?r=this.col<(t.fixedColumnsStart??0)?"top-inline-start-corner":"top":t.fixedRowsBottom&&this.row>=e-t.fixedRowsBottom?r=this.col<(t.fixedColumnsStart??0)?"bottom-inline-start-corner":"bottom":this.col<(t.fixedColumnsStart??0)&&(r="inline-start"),r}}eL(hA,hE);let hM=[{name:"editorCloseAndSave",callback(e){e._getEditorManager().closeEditorAndSaveChanges()}},{name:"editorCloseAndSaveByArrowKeys",callback(e,t,r){let n=e._getEditorManager(),o=n.getActiveEditor();o?.isInFullEditMode()&&o?.state===hT.EDITING||(n.closeEditorAndSaveChanges(),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),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:n}=e,o=e._getEditorManager(),i=e.getSelectedRange(),s=e.getSelectedRangeActive(),a=s?.highlight;if((i?.some(e=>n.isMultiple(e))||(i?.length??0)>1)&&!s?.isHeader()&&e.countRenderedCols()>0&&e.countRenderedRows()>0){let o=e.getSettings(),i="function"==typeof o.enterMoves?o.enterMoves(t):o.enterMoves;r.includes("shift")?n.transformFocus(-(i?.row??0),-(i?.col??0)):n.transformFocus(i?.row??0,i?.col??0);return}a?.isHeader()||(e.getSettings().enterBeginsEditing?o.cellProperties.readOnly?o.moveSelectionAfterEnter(t):o.openEditor(null,t,!0):o.moveSelectionAfterEnter(t),rQ(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,n=e.getSelectedRangeActive();if(!n)return;let{to:o}=n,i=o.row??0,s=Math.min(i+e.countVisibleRows(),e.countRows()-1),a=r.getNearestNotHiddenIndex(s,-1);if(null!==a){let r=e._createCellCoords(a,o.col??0),n=i-(e.getFirstFullyVisibleRow()??0),s=Math.min((r.row??0)-n,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:n,from:o,to:i}=r;t.markSource("keyboard"),t.isSelectedByRowHeader()?t.selectAll(!0,!0):e.selectColumns(o.col??0,i.col??0,n),t.markEndSource()}},{name:"extendCellsSelectionToMostBottom",callback(e){let{selection:t,rowIndexMapper:r}=e,n=e.getSelectedRangeActive();if(!n)return;let{highlight:o,from:i,to:s}=n,a=o.isHeader()&&t.isSelectedByRowHeader();if(o.isCell()||a){let n=r.getNearestNotHiddenIndex(e.countRows()-1,-1),l=i.clone();l.row=o.row,t.markSource("keyboard"),t.setRangeStart(l,void 0,!1,o.clone()),a&&t.selectedByRowHeader.add(t.getLayerLevel()),t.setRangeEnd(e._createCellCoords(n??0,s.col??0)),t.markEndSource()}}},{name:"extendCellsSelectionToMostInlineEnd",callback(e){let{selection:t,columnIndexMapper:r}=e,n=e.getSelectedRangeActive();if(!n)return;let{highlight:o,from:i,to:s}=n;if(!t.isSelectedByRowHeader()&&!t.isSelectedByCorner()&&o.isCell()){let n=r.getNearestNotHiddenIndex(e.countCols()-1,-1),a=i.clone();a.col=o.col,t.markSource("keyboard"),t.setRangeStart(a,void 0,!1,o.clone()),t.setRangeEnd(e._createCellCoords(s.row??0,n??0)),t.markEndSource()}}},{name:"extendCellsSelectionToMostInlineStart",callback(e){let{selection:t,columnIndexMapper:r}=e,n=e.getSelectedRangeActive();if(!n)return;let{highlight:o,from:i,to:s}=n;if(!t.isSelectedByRowHeader()&&!t.isSelectedByCorner()&&o.isCell()){let n=Number(e.getSettings().fixedColumnsStart)||0,a=r.getNearestNotHiddenIndex(n,1),l=i.clone();l.col=o.col,t.markSource("keyboard"),t.setRangeStart(l,void 0,!1,o.clone()),t.setRangeEnd(e._createCellCoords(s.row??0,a??0)),t.markEndSource()}}},{name:"extendCellsSelectionToMostLeft",callback(e){let{selection:t,columnIndexMapper:r}=e,n=e.getSelectedRangeActive();if(!n)return;let{highlight:o,from:i,to:s}=n,a=o.isHeader()&&t.isSelectedByColumnHeader();if(o.isCell()||a){let n=e.isRtl()?r.getNearestNotHiddenIndex(e.countCols()-1,-1):r.getNearestNotHiddenIndex(0,1),l=i.clone();l.col=o.col,t.markSource("keyboard"),t.setRangeStart(l,void 0,!1,o.clone()),a&&t.selectedByColumnHeader.add(t.getLayerLevel()),t.setRangeEnd(e._createCellCoords(s.row??0,n??0)),t.markEndSource()}}},{name:"extendCellsSelectionToMostRight",callback(e){let{selection:t,columnIndexMapper:r}=e,n=e.getSelectedRangeActive();if(!n)return;let{highlight:o,from:i,to:s}=n,a=o.isHeader()&&t.isSelectedByColumnHeader();if(o.isCell()||a){let n=e.isRtl()?r.getNearestNotHiddenIndex(0,1):r.getNearestNotHiddenIndex(e.countCols()-1,-1),l=i.clone();l.col=o.col,t.markSource("keyboard"),t.setRangeStart(l,void 0,!1,o.clone()),a&&t.selectedByColumnHeader.add(t.getLayerLevel()),t.setRangeEnd(e._createCellCoords(s.row??0,n??0)),t.markEndSource()}}},{name:"extendCellsSelectionToMostTop",callback(e){let{selection:t,rowIndexMapper:r}=e,n=e.getSelectedRangeActive();if(!n)return;let{highlight:o,from:i,to:s}=n,a=o.isHeader()&&t.isSelectedByRowHeader();if(o.isCell()||a){let n=r.getNearestNotHiddenIndex(0,1),l=i.clone();l.row=o.row,t.markSource("keyboard"),t.setRangeStart(l,void 0,!1,o.clone()),a&&t.selectedByRowHeader.add(t.getLayerLevel()),t.setRangeEnd(e._createCellCoords(n??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:n,from:o,to:i}=r;t.markSource("keyboard"),t.isSelectedByColumnHeader()?t.selectAll(!0,!0):e.selectRows(o.row??0,i.row??0,n),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,n=e.getSelectedRangeActive();if(!n)return;let{to:o}=n,i=o.row??0,s=Math.max(i-e.countVisibleRows(),0),a=r.getNearestNotHiddenIndex(s,1);if(null!==a){let r=e._createCellCoords(a,o.col??0),n=i-(e.getFirstFullyVisibleRow()??0),s=Math.max((r.row??0)-n,0);t.markSource("keyboard"),t.setRangeEnd(r,e.getActiveSelectionLayerIndex()),t.markEndSource(),e.scrollViewportTo({row:s,verticalSnap:"top",horizontalSnap:"start"})}}},{name:"moveCellSelectionDown",callback(e){let{selection:t}=e;t.markSource("keyboard"),t.transformStart(1,0),t.markEndSource()}},{name:"moveCellSelectionDownByViewportHeight",callback(e){let{selection:t}=e,{navigableHeaders:r}=e.getSettings(),n=r?e.countColHeaders():0,o=e.getSelectedRangeActive()?.highlight.row??0,i=e.countVisibleRows()+n;i=0===i?1:i,o===e.countRows()-1?i=1:o+i>e.countRows()&&(i=e.countRows()-o-1),t.markSource("keyboard"),t.transformStart(i,0),t.markEndSource();let s=e.getSettings().fixedRowsBottom??0,a=e.countRows(),l=e.getSelectedRangeActive()?.highlight.row??0;l<0?e.scrollViewportTo({row:0}):s>0&&l>=a-s&&e.scrollViewportTo({row:a-s-1,verticalSnap:"bottom"})}},{name:"moveCellSelectionInlineEnd",callback(e,t){let{selection:r}=e,n=e.getSettings(),o=e.getSelectedRange(),i=e.getSelectedRangeActive(),s="function"==typeof n.tabMoves?n.tabMoves(t):n.tabMoves;r.markSource("keyboard"),(o?.some(e=>r.isMultiple(e))||(o?.length??0)>1)&&!i?.isHeader()&&e.countRenderedCols()>0&&e.countRenderedRows()>0?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,n=e.getSettings(),o=e.getSelectedRange(),i=e.getSelectedRangeActive(),s="function"==typeof n.tabMoves?n.tabMoves(t):n.tabMoves;r.markSource("keyboard"),(o?.some(e=>r.isMultiple(e))||(o?.length??0)>1)&&!i?.isHeader()&&e.countRenderedCols()>0&&e.countRenderedRows()>0?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,n=e.rowIndexMapper.getNearestNotHiddenIndex(e.countRows()-1,-1);null===n&&(n=-1),t.setRangeStart(e._createCellCoords(n,r))}},{name:"moveCellSelectionToMostBottomInlineEnd",callback(e){let{selection:t,rowIndexMapper:r,columnIndexMapper:n}=e,o=Number(e.getSettings().fixedRowsBottom)||0,i=r.getNearestNotHiddenIndex(e.countRows()-o-1,-1),s=n.getNearestNotHiddenIndex(e.countCols()-1,-1);t.markSource("keyboard"),t.setRangeStart(e._createCellCoords(i??-1,s??-1)),t.markEndSource()}},{name:"moveCellSelectionToMostInlineEnd",callback(e){let{selection:t,columnIndexMapper:r}=e;t.markSource("keyboard"),t.setRangeStart(e._createCellCoords(e.getSelectedRangeActive()?.highlight.row??0,r.getNearestNotHiddenIndex(e.countCols()-1,-1)??0)),t.markEndSource()}},{name:"moveCellSelectionToMostInlineStart",callback(e){let{selection:t,columnIndexMapper:r}=e,n=Number(e.getSettings().fixedColumnsStart)||0,o=e.getSelectedRangeActive()?.highlight.row??0,i=r.getNearestNotHiddenIndex(n,1);t.markSource("keyboard"),t.setRangeStart(e._createCellCoords(o,i??0)),t.markEndSource()}},{name:"moveCellSelectionToMostLeft",callback(e){let{selection:t,columnIndexMapper:r}=e,n=e.getSelectedRangeActive()?.highlight.row??0,o=e.isRtl()?r.getNearestNotHiddenIndex(e.countCols()-1,-1):r.getNearestNotHiddenIndex(0,1);null===o&&(o=e.isRtl()?-1:-e.countRowHeaders()),t.markSource("keyboard"),t.setRangeStart(e._createCellCoords(n,o)),t.markEndSource()}},{name:"moveCellSelectionToMostRight",callback(e){let{selection:t,columnIndexMapper:r}=e,n=e.getSelectedRangeActive()?.highlight.row??0,o=e.isRtl()?r.getNearestNotHiddenIndex(0,1):r.getNearestNotHiddenIndex(e.countCols()-1,-1);null===o&&(o=e.isRtl()?-e.countRowHeaders():-1),t.markSource("keyboard"),t.setRangeStart(e._createCellCoords(n,o)),t.markEndSource()}},{name:"moveCellSelectionToMostTop",callback(e){let{selection:t}=e,r=e.getSelectedRangeActive()?.highlight.col??0,n=e.rowIndexMapper.getNearestNotHiddenIndex(0,1);null===n&&(n=-e.countColHeaders()),t.markSource("keyboard"),t.setRangeStart(e._createCellCoords(n,r)),t.markEndSource()}},{name:"moveCellSelectionToMostTopInlineStart",callback(e){let{selection:t,rowIndexMapper:r,columnIndexMapper:n}=e,o=Number(e.getSettings().fixedRowsTop)||0,i=Number(e.getSettings().fixedColumnsStart)||0,s=r.getNearestNotHiddenIndex(o,1),a=n.getNearestNotHiddenIndex(i,1);t.markSource("keyboard"),t.setRangeStart(e._createCellCoords(s??0,a??0)),t.markEndSource()}},{name:"moveCellSelectionUp",callback(e){let{selection:t}=e;t.markSource("keyboard"),t.transformStart(-1,0),t.markEndSource()}},{name:"moveCellSelectionUpByViewportHight",callback(e){let{selection:t}=e,{navigableHeaders:r}=e.getSettings(),n=r?e.countColHeaders():0,o=e.getSelectedRangeActive()?.highlight.row??0,i=e.countVisibleRows()+n;i=0===i?-1:-i,o===-n?i=-1:o+i<n&&(i=-(o+n)),t.markSource("keyboard"),t.transformStart(i,0),t.markEndSource();let s=e.getSettings().fixedRowsTop??0;(e.getSelectedRangeActive()?.highlight.row??0)<s&&e.scrollViewportTo({row:s,verticalSnap:"top"})}},{name:"emptySelectedCells",callback(e){e.emptySelectedCells(),e._getEditorManager().prepareEditor()}},{name:"scrollToFocusedCell",callback(e){let t=e.getSelectedRangeActive()?.highlight;if(!t)return;let r=e.getFirstFullyVisibleRow()-1,n=e.getFirstFullyVisibleColumn()-1,o=e.getLastFullyVisibleRow()+1,i=e.getLastFullyVisibleColumn()+1,s=e._createCellCoords(r,n),a=e._createCellCoords(o,i);if(!e._createCellRange(s,s,a).includes(t)&&((t.row??-1)>=0||(t.col??-1)>=0)){let r={};if((t.col??-1)>=0){let n=Math.floor(e.countVisibleCols()/2);r.col=Math.max((t.col??0)-n,0)}if((t.row??-1)>=0){let n=Math.floor(e.countVisibleRows()/2);r.row=Math.max((t.row??0)-n,0)}e.scrollViewportTo({...r,verticalSnap:"top",horizontalSnap:"start"})}}},{name:"selectAllCells",callback(e){let{selection:t}=e;t.markSource("keyboard"),t.selectAll(!0,!0,{disableHeadersHighlight:!0}),t.markEndSource()}},{name:"selectAllCellsAndHeaders",callback(e){let{selection:t}=e;t.markSource("keyboard"),t.selectAll(!0,!0,{disableHeadersHighlight:!1}),t.markEndSource()}},{name:"populateSelectedCellsData",callback(e){let t=e.getSelectedRange();if(!t)return;let r=t[t.length-1].highlight.normalize(),n=r.row??0,o=r.col??0,i=e.getDataAtCell(n,o),s=new Map;for(let r=0;r<t.length;r++)t[r].forAll((t,r)=>{if(t>=0&&r>=0&&(t!==n||r!==o)){let{readOnly:n}=e.getCellMeta(t,r);n||s.set(`${t}x${r}`,[t,r,i])}});e.setDataAtCell(Array.from(s.values()))}},{name:"tabNavigation",callback(e){let t={wrapped:!1,flipped:!1},r=!1,n=!1;return e.addHook("afterSelection",(e,o,i,s,a)=>{r&&(t.wrapped&&t.flipped||n)&&(n=!1,a.value=!0)}),e.addHook("beforeRowWrap",(e,r,n)=>{t.wrapped=!0,t.flipped=n}),{before(){let{tabNavigation:t}=e.getSettings();r=!0,t||(n=!0)},after(n){let{tabNavigation:o,autoWrapRow:i}=e.getSettings();if(r=!1,!o||!e.selection.isSelected()||i&&t.wrapped&&t.flipped||!i&&t.wrapped)return t.wrapped=!1,t.flipped=!1,e.deselectCell(),!1;n.preventDefault()}}}}];function hN(e){let t={};return hM.forEach(r=>{let{name:n,callback:o}=r;t[n]=function(){for(var t=arguments.length,r=Array(t),n=0;n<t;n++)r[n]=arguments[n];return o(e,...r)}}),t}function hI(e){let t=e.getShortcutManager().addContext("editor"),r=hN(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:hh})}function hx(e){let t=e.getShortcutManager().addContext("grid"),r=hN(e);t.addShortcuts([{keys:[["F2"]],callback:e=>r.editorFastOpen(e)},{keys:[["Enter"],["Enter","Shift"]],callback:(e,t)=>r.editorOpen(e,t)},{keys:[["Backspace"],["Delete"]],callback:()=>r.emptySelectedCells()}],{group:hh,runOnlyIf:()=>ep(e.getSelected())}),t.addShortcuts([{keys:[["Control/Meta","A"]],callback:()=>r.selectAllCells(),runOnlyIf:()=>ep(e.getSelected())&&!e.getSelectedRangeActive()?.highlight.isHeader()},{keys:[["Control/Meta","A"]],callback:()=>{},runOnlyIf:()=>!!(ep(e.getSelected())&&e.getSelectedRangeActive()?.highlight.isHeader()),preventDefault:!0},{keys:[["Control/Meta","Shift","Space"]],callback:()=>r.selectAllCellsAndHeaders()},{keys:[["Control/Meta","Enter"]],callback:()=>r.populateSelectedCellsData(),runOnlyIf:()=>ep(e.getSelected())&&!e.getSelectedRangeActive()?.highlight.isHeader()&&(e.getSelectedRangeActive()?.getCellsCount()??0)>1},{keys:[["Control","Space"]],captureCtrl:!0,callback:()=>r.extendCellsSelectionToColumns()},{keys:[["Shift","Space"]],stopPropagation:!0,callback:()=>r.extendCellsSelectionToRows()},{keys:[["ArrowUp"]],callback:()=>r.moveCellSelectionUp()},{keys:[["ArrowUp","Control/Meta"]],captureCtrl:!0,callback:()=>r.moveCellSelectionToMostTop()},{keys:[["ArrowUp","Shift"]],callback:()=>r.extendCellsSelectionUp()},{keys:[["ArrowUp","Shift","Control/Meta"]],captureCtrl:!0,callback:()=>r.extendCellsSelectionToMostTop(),runOnlyIf:()=>ep(e.getSelected())&&!(e.selection.isSelectedByCorner()||e.selection.isSelectedByColumnHeader())},{keys:[["ArrowDown"]],callback:()=>r.moveCellSelectionDown()},{keys:[["ArrowDown","Control/Meta"]],captureCtrl:!0,callback:()=>r.moveCellSelectionToMostBottom()},{keys:[["ArrowDown","Shift"]],callback:()=>r.extendCellsSelectionDown()},{keys:[["ArrowDown","Shift","Control/Meta"]],captureCtrl:!0,callback:()=>r.extendCellsSelectionToMostBottom(),runOnlyIf:()=>ep(e.getSelected())&&!(e.selection.isSelectedByCorner()||e.selection.isSelectedByColumnHeader())},{keys:[["ArrowLeft"]],callback:()=>r.moveCellSelectionLeft()},{keys:[["ArrowLeft","Control/Meta"]],captureCtrl:!0,callback:()=>r.moveCellSelectionToMostLeft()},{keys:[["ArrowLeft","Shift"]],callback:()=>r.extendCellsSelectionLeft()},{keys:[["ArrowLeft","Shift","Control/Meta"]],captureCtrl:!0,callback:()=>r.extendCellsSelectionToMostLeft(),runOnlyIf:()=>ep(e.getSelected())&&!(e.selection.isSelectedByCorner()||e.selection.isSelectedByRowHeader())},{keys:[["ArrowRight"]],callback:()=>r.moveCellSelectionRight()},{keys:[["ArrowRight","Control/Meta"]],captureCtrl:!0,callback:()=>r.moveCellSelectionToMostRight()},{keys:[["ArrowRight","Shift"]],callback:()=>r.extendCellsSelectionRight()},{keys:[["ArrowRight","Shift","Control/Meta"]],captureCtrl:!0,callback:()=>r.extendCellsSelectionToMostRight(),runOnlyIf:()=>ep(e.getSelected())&&!(e.selection.isSelectedByCorner()||e.selection.isSelectedByRowHeader())},{keys:[["Home"]],captureCtrl:!0,callback:()=>r.moveCellSelectionToMostInlineStart(),runOnlyIf:()=>ep(e.getSelected())&&e.view.isMainTableNotFullyCoveredByOverlays()},{keys:[["Home","Shift"]],callback:()=>r.extendCellsSelectionToMostInlineStart()},{keys:[["Home","Control/Meta"]],captureCtrl:!0,callback:()=>r.moveCellSelectionToMostTopInlineStart(),runOnlyIf:()=>ep(e.getSelected())&&e.view.isMainTableNotFullyCoveredByOverlays()},{keys:[["End"]],captureCtrl:!0,callback:()=>r.moveCellSelectionToMostInlineEnd(),runOnlyIf:()=>ep(e.getSelected())&&e.view.isMainTableNotFullyCoveredByOverlays()},{keys:[["End","Shift"]],callback:()=>r.extendCellsSelectionToMostInlineEnd()},{keys:[["End","Control/Meta"]],captureCtrl:!0,callback:()=>r.moveCellSelectionToMostBottomInlineEnd(),runOnlyIf:()=>ep(e.getSelected())&&e.view.isMainTableNotFullyCoveredByOverlays()},{keys:[["PageUp"]],callback:()=>r.moveCellSelectionUpByViewportHight()},{keys:[["PageUp","Shift"]],callback:()=>r.extendCellsSelectionUpByViewportHeight()},{keys:[["PageDown"]],callback:()=>r.moveCellSelectionDownByViewportHeight()},{keys:[["PageDown","Shift"]],callback:()=>r.extendCellsSelectionDownByViewportHeight()},{keys:[["Tab"]],preventDefault:!1,callback:e=>r.moveCellSelectionInlineStart(e)},{keys:[["Shift","Tab"]],preventDefault:!1,callback:e=>r.moveCellSelectionInlineEnd(e)},{keys:[["Control/Meta","Backspace"]],callback:()=>r.scrollToFocusedCell()}],{runOnlyIf:()=>{let{navigableHeaders:t}=e.getSettings();return ep(e.getSelected())&&(t||!t&&e.countRenderedRows()>0&&e.countRenderedCols()>0)},group:ha});let n=r.tabNavigation();t.addShortcuts([{keys:[["Tab"],["Shift","Tab"]],preventDefault:!1,stopPropagation:!1,relativeToGroup:ha,group:hl,position:"before",callback:e=>n.before(e)},{keys:[["Tab"],["Shift","Tab"]],preventDefault:!1,stopPropagation:!1,relativeToGroup:ha,group:hl,callback:e=>n.after(e),position:"after"}])}function hO(e){let{classNames:t}=tP(e,/ht-theme-[a-zA-Z0-9_-]+/);return t.pop()}let hk="handsontable-core-styles";class h_{#tl;#tR;#tE;#tT=null;#tA;#tM={};#tN={};#tI;constructor({hot:e,rootElement:t,rootDocument:r,onThemeChange:n=e=>{},injectCoreCss:o=!0}){this.#tl=e,this.#tE=t,this.#tA=r,this.#tI=n,o&&this.#tx()}getCSSVariableValue(e){if(this.#tM[`--ht-${e}`])return this.#tM[`--ht-${e}`];let t=this.#tO(`--ht-${e}`)??this.#tk(`--ht-${e}`);if(null!==t)return this.#tM[`--ht-${e}`]=t,t}getStyleForTD(e){return this.#tN?.td?.[e]}getDefaultRowHeight(e){let t=this.#t_();return void 0!==e&&e===this.#tl.view.getFirstRenderedVisibleRow()?(t??0)+1:t}areCellsBorderBox(){return"border-box"===this.getStyleForTD("box-sizing")}useTheme(e){"string"==typeof e&&/ht-theme-.*/.test(e)?(this.#tH(),e!==this.#tR&&(this.#tR=e),this.#tI(this.#tR),this.#tL()):tR(`${e} isn't a valid theme name. Please ensure it follows the format ht-theme-<theme-name>.`)}getThemeName(){return this.#tR}#tx(){if(!this.#tl||!this.#tA||!this.#tA.head)return;let e=this.#tA.getElementById(hk);if(e&&e instanceof HTMLStyleElement)return;let t=this.#tA.createElement("style");t.id=hk,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 62,800.00.\n *\n * This software is protected by applicable copyright laws, including international treaties, and dual-\n * licensed - depending on whether your use for commercial purposes, meaning intended for or\n * resulting in commercial advantage or monetary compensation, or not.\n *\n * If your use is strictly personal or solely for evaluation purposes, meaning for the purposes of testing\n * the suitability, performance, and usefulness of this software outside the production environment,\n * you agree to be bound by the terms included in the "handsontable-non-commercial-license.pdf" file.\n *\n * Your use of this software for commercial purposes is subject to the terms included in an applicable\n * license agreement.\n *\n * In any case, you must not make any such use of this software as to develop software which may be\n * considered competitive with this software.\n *\n * UNLESS EXPRESSLY AGREED OTHERWISE, HANDSONCODE PROVIDES THIS SOFTWARE ON AN "AS IS"\n * BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, AND IN NO EVENT AND UNDER NO\n * LEGAL THEORY, SHALL HANDSONCODE BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY DIRECT,\n * INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY CHARACTER ARISING FROM\n * USE OR INABILITY TO USE THIS SOFTWARE.\n *\n * Version: 18.0.0\n * Release date: 30/06/2026 (built at 30/06/2026 08:45:31)\n */\n.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}:is(.ht-root-wrapper:has(>.ht-slot-bottom>.ht-slot-element) .ht-wrapper:not(.htHorizontallyScrollableByWindow) .ht_master .wtHolder,.ht-root-wrapper:has(>.ht-slot-bottom>.ht-slot-element) .ht-wrapper:not(.htVerticallyScrollableByWindow) .ht_master .wtHolder,.ht-root-wrapper:has(>.ht-slot-top>.ht-slot-element) .ht-wrapper:not(.htHorizontallyScrollableByWindow) .ht_master .wtHolder,.ht-root-wrapper:has(>.ht-slot-top>.ht-slot-element) .ht-wrapper:not(.htVerticallyScrollableByWindow) .ht_master .wtHolder){background-color:var(--ht-background-color);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}.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)}.handsontable .wtHolder:not(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi))::-webkit-scrollbar-corner{border-bottom-right-radius:var(--ht-scrollbar-border-radius)}.handsontable .wtHolder:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi))::-webkit-scrollbar-corner{border-bottom-left-radius:var(--ht-scrollbar-border-radius)}.handsontable.ht-wrapper{width:100%;height:100%}.handsontable.ht-wrapper:not(.htFirstDatasetColumnNotRendered) td:first-of-type{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 tr.ht__row_even th{background-color:var(--ht-row-header-even-background-color)}.handsontable tr.ht__row_even td{background-color:var(--ht-row-cell-even-background-color)}.handsontable tr.ht__row_odd th{background-color:var(--ht-row-header-odd-background-color)}.handsontable tr.ht__row_odd td{background-color:var(--ht-row-cell-odd-background-color)}.handsontable th,.handsontable 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;border-inline-width:0 1px;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-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 th.invisibleSelection,.handsontable td.invisibleSelection{outline:none}.handsontable th.invisibleSelection::selection,.handsontable td.invisibleSelection::selection{background:0 0}.handsontable 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 th:last-child{border-inline-width:0 1px;border-bottom-width:1px;border-inline-end-color:var(--ht-border-color)}.handsontable th:last-child.ht__active_highlight{border-inline-end-color:var(--ht-header-active-border-color)}.handsontable th:first-child{border-inline-start-color:var(--ht-border-color)}.handsontable th:first-child.ht__active_highlight{border-inline-start-color:var(--ht-header-active-border-color)}.handsontable th:first-child,.handsontable th:nth-child(2){border-inline-start-width:1px}.handsontable th.current{box-shadow:inset 0 0 0 1px var(--ht-cell-selection-border-color)}.handsontable th.active{color:var(--ht-header-active-foreground-color);background-color:var(--ht-header-active-background-color)}.handsontable th.ht__highlight{color:var(--ht-header-highlighted-foreground-color);background-color:var(--ht-header-highlighted-background-color)}.handsontable 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 tbody tr.ht__row_odd th.ht__highlight,.handsontable 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 tbody tr.ht__row_odd th.ht__active_highlight,.handsontable 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 tbody tr:first-of-type th:first-child:empty:after,.handsontable tbody tr:first-of-type td:first-child:empty:after{content:"";min-height:var(--ht-line-height);display:block}.handsontable tbody tr th{color:var(--ht-header-row-foreground-color);background-color:var(--ht-header-row-background-color);padding:0}.handsontable tbody tr th.ht__active_highlight{box-shadow:0 -1px 0 0 var(--ht-header-active-border-color)}.handsontable tbody tr th .relative{padding:var(--ht-cell-vertical-padding)var(--ht-cell-horizontal-padding);min-height:100%}.handsontable tbody tr td:first-child{border-inline-start-color:var(--ht-border-color)}.handsontable tbody tr td:last-child{border-inline-end-color:var(--ht-border-color)}.handsontable thead tr th{padding:0}.handsontable thead tr th.ht__active_highlight{box-shadow:-1px 0 0 0 var(--ht-header-active-border-color)}.handsontable 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 thead tr th .relative .colHeader{text-overflow:ellipsis;vertical-align:top;flex:auto;min-width:0;overflow:hidden}.handsontable tr:first-child th,.handsontable tr:first-child td{border-top-color:var(--ht-border-color);border-top-width:1px}.handsontable tr:first-child th.ht__active_highlight,.handsontable tr:first-child td.ht__active_highlight{border-top-color:var(--ht-header-active-border-color)}.handsontable tr:last-child th,.handsontable tr:last-child td{border-bottom-color:var(--ht-border-color)}.handsontable tr:last-child th.ht__active_highlight,.handsontable tr:last-child td.ht__active_highlight{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] td:first-of-type{border-inline-start-width:1px}.handsontable thead tr:not(:last-child) th{overflow:hidden}.handsontable .hide{display:none}.handsontable .relative{box-sizing:border-box;position:relative}.handsontable .wtHider{width:0}.handsontable .wtSpreader{width:0;height:auto;position:relative}.handsontable .htAutoSize{visibility:hidden;position:absolute;top:-99000px;left:-99000px}.handsontable .htTextEllipsis{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.handsontable table,.handsontable tbody,.handsontable thead,.handsontable input,.handsontable textarea,.handsontable div{box-sizing:content-box}.handsontable input,.handsontable textarea{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 col,.handsontable col.rowHeader{width:64px}.handsontable 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 tr.hidden,.handsontable tr.hidden td,.handsontable tr.hidden th{display:none}.handsontable a{color:var(--ht-link-color)}.handsontable a:hover{color:var(--ht-link-hover-color)}.handsontable .ht_clone_top th:nth-child(2),.handsontable .ht_clone_top_inline_start_corner th:nth-child(2){border-inline-width:0 1px}.handsontable.htRowHeaders thead tr th:nth-child(2){border-inline-start-width:1px}.handsontable .ht_master:not(.innerBorderInlineStart):not(.emptyColumns) tbody tr th,.handsontable .ht_master:not(.innerBorderInlineStart):not(.emptyColumns) thead tr th:first-child,.handsontable .ht_master:not(.innerBorderInlineStart):not(.emptyColumns)~.handsontable:not(.htGhostTable) tbody tr th,.handsontable .ht_master:not(.innerBorderInlineStart):not(.emptyColumns)~.handsontable:not(.ht_clone_top):not(.htGhostTable) thead tr th:first-child{border-inline-width:1px 0}.handsontable .ht_master:not(.innerBorderTop):not(.innerBorderBottom) thead tr:last-child th,.handsontable .ht_master:not(.innerBorderTop):not(.innerBorderBottom)~.handsontable thead tr:last-child th,.handsontable .ht_master:not(.innerBorderTop):not(.innerBorderBottom) thead tr.lastChild th,.handsontable .ht_master:not(.innerBorderTop):not(.innerBorderBottom)~.handsontable thead tr.lastChild th{border-bottom-width:0}.handsontable.htAutoRowSize .ht_master.innerBorderTop tbody tr:first-child th,.handsontable.htAutoRowSize .ht_master.innerBorderTop tbody tr:first-child td,.handsontable.htAutoRowSize .ht_master.innerBorderTop~.ht_clone_inline_start tbody tr:first-child th,.handsontable.htAutoRowSize .ht_master.innerBorderTop~.ht_clone_inline_start tbody tr:first-child td{border-top-width:0}.handsontable .ht_master table.htCore>thead,.handsontable .ht_master table.htCore>tbody>tr>th,.handsontable .ht_clone_inline_start table.htCore>thead{visibility:hidden}.ht_master,.ht_clone_inline_start,.ht_clone_top,.ht_clone_bottom,.ht_master .wtHolder,.ht_clone_inline_start .wtHolder,.ht_clone_top .wtHolder,.ht_clone_bottom .wtHolder{overflow:hidden}.ht_master .wtHolder{overflow:auto}[dir=rtl].handsontable td[dir=ltr]{border-inline-width:1px 0}[dir=rtl].handsontable 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:not(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-top-left-radius:var(--ht-border-radius)}.handsontable.ht-wrapper:not(.htColumnHeaders) .ht_master .htCore tbody tr:first-child td:first-child:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-top-right-radius:var(--ht-border-radius)}.handsontable.ht-wrapper:not(.htColumnHeaders) .ht_master .htCore tbody tr:first-child td:last-child:not(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-top-right-radius:var(--ht-border-radius)}.handsontable.ht-wrapper:not(.htColumnHeaders) .ht_master .htCore tbody tr:first-child td:last-child:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-top-left-radius:var(--ht-border-radius)}.handsontable.ht-wrapper:not(.htColumnHeaders) .ht_clone_top_inline_start_corner .htCore tbody tr:first-child td:first-child:not(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-top-left-radius:var(--ht-border-radius)}.handsontable.ht-wrapper:not(.htColumnHeaders) .ht_clone_top_inline_start_corner .htCore tbody tr:first-child td:first-child:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-top-right-radius:var(--ht-border-radius)}.handsontable.ht-wrapper:not(.htColumnHeaders) .ht_clone_top .htCore tbody tr:first-child td:first-child:not(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-top-left-radius:var(--ht-border-radius)}.handsontable.ht-wrapper:not(.htColumnHeaders) .ht_clone_top .htCore tbody tr:first-child td:first-child:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-top-right-radius:var(--ht-border-radius)}.handsontable.ht-wrapper:not(.htColumnHeaders) .ht_clone_top .htCore tbody tr:first-child td:last-child:not(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-top-right-radius:var(--ht-border-radius)}.handsontable.ht-wrapper:not(.htColumnHeaders) .ht_clone_top .htCore tbody tr:first-child td:last-child:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-top-left-radius:var(--ht-border-radius)}:is(.handsontable.ht-wrapper:not(.htColumnHeaders) .ht_clone_inline_start .htCore tbody tr:first-child th:first-child:not(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)),.handsontable.ht-wrapper:not(.htColumnHeaders) .ht_clone_inline_start .htCore tbody tr:first-child td:first-child:not(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi))){border-top-left-radius:var(--ht-border-radius)}:is(.handsontable.ht-wrapper:not(.htColumnHeaders) .ht_clone_inline_start .htCore tbody tr:first-child th:first-child:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)),.handsontable.ht-wrapper:not(.htColumnHeaders) .ht_clone_inline_start .htCore tbody tr:first-child td:first-child:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi))){border-top-right-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:not(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-top-left-radius:var(--ht-border-radius)}.handsontable.ht-wrapper .ht_master .htCore thead tr:first-child th:first-child:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-top-right-radius:var(--ht-border-radius)}.handsontable.ht-wrapper .ht_master .htCore thead tr:first-child th:not(.hiddenHeader):not(:has(~th:not(.hiddenHeader))):not(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-top-right-radius:var(--ht-border-radius)}.handsontable.ht-wrapper .ht_master .htCore thead tr:first-child th:not(.hiddenHeader):not(:has(~th:not(.hiddenHeader))):is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-top-left-radius:var(--ht-border-radius)}.handsontable.ht-wrapper .ht_master .htCore thead tr:last-child th:first-child:not(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-bottom-left-radius:var(--ht-border-radius)}.handsontable.ht-wrapper .ht_master .htCore thead tr:last-child th:first-child:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-bottom-right-radius:var(--ht-border-radius)}.handsontable.ht-wrapper .ht_master .htCore thead tr:last-child th:not(.hiddenHeader):not(:has(~th:not(.hiddenHeader))):not(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-bottom-right-radius:var(--ht-border-radius)}.handsontable.ht-wrapper .ht_master .htCore thead tr:last-child th:not(.hiddenHeader):not(:has(~th:not(.hiddenHeader))):is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-bottom-left-radius:var(--ht-border-radius)}.handsontable.ht-wrapper .ht_master .htCore tbody tr:last-child td:first-child:not(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-bottom-left-radius:var(--ht-border-radius)}.handsontable.ht-wrapper .ht_master .htCore tbody tr:last-child td:first-child:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-bottom-right-radius:var(--ht-border-radius)}.handsontable.ht-wrapper .ht_master .htCore tbody tr:last-child td:last-child:not(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-bottom-right-radius:var(--ht-border-radius)}.handsontable.ht-wrapper .ht_master .htCore tbody tr:last-child td:last-child:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-bottom-left-radius:var(--ht-border-radius)}.handsontable.ht-wrapper .ht_clone_top_inline_start_corner .htCore:not(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-top-left-radius:var(--ht-border-radius)}.handsontable.ht-wrapper .ht_clone_top_inline_start_corner .htCore:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-top-right-radius:var(--ht-border-radius)}.handsontable.ht-wrapper .ht_clone_top_inline_start_corner .htCore thead tr:first-child th:first-child:not(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-top-left-radius:var(--ht-border-radius)}.handsontable.ht-wrapper .ht_clone_top_inline_start_corner .htCore thead tr:first-child th:first-child:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-top-right-radius:var(--ht-border-radius)}.handsontable.ht-wrapper .ht_clone_top .htCore:not(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-top-left-radius:var(--ht-border-radius);border-top-right-radius:var(--ht-border-radius)}.handsontable.ht-wrapper .ht_clone_top .htCore:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-top-right-radius:var(--ht-border-radius);border-top-left-radius:var(--ht-border-radius)}.handsontable.ht-wrapper .ht_clone_top .htCore thead tr:first-child th:first-child:not(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-top-left-radius:var(--ht-border-radius)}.handsontable.ht-wrapper .ht_clone_top .htCore thead tr:first-child th:first-child:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-top-right-radius:var(--ht-border-radius)}.handsontable.ht-wrapper .ht_clone_top .htCore thead tr:first-child th:not(.hiddenHeader):not(:has(~th:not(.hiddenHeader))):not(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-top-right-radius:var(--ht-border-radius)}.handsontable.ht-wrapper .ht_clone_top .htCore thead tr:first-child th:not(.hiddenHeader):not(:has(~th:not(.hiddenHeader))):is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-top-left-radius:var(--ht-border-radius)}.handsontable.ht-wrapper .ht_clone_inline_start .htCore:not(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-top-left-radius:var(--ht-border-radius);border-bottom-left-radius:var(--ht-border-radius)}.handsontable.ht-wrapper .ht_clone_inline_start .htCore:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-top-right-radius:var(--ht-border-radius);border-bottom-right-radius:var(--ht-border-radius)}.handsontable.ht-wrapper .ht_clone_inline_start .htCore thead tr:first-child th:first-child:not(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-top-left-radius:var(--ht-border-radius)}.handsontable.ht-wrapper .ht_clone_inline_start .htCore thead tr:first-child th:first-child:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-top-right-radius:var(--ht-border-radius)}:is(.handsontable.ht-wrapper .ht_clone_inline_start .htCore tbody tr:last-child th:first-child:not(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)),.handsontable.ht-wrapper .ht_clone_inline_start .htCore tbody tr:last-child td:first-child:not(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi))){border-bottom-left-radius:var(--ht-border-radius)}:is(.handsontable.ht-wrapper .ht_clone_inline_start .htCore tbody tr:last-child th:first-child:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)),.handsontable.ht-wrapper .ht_clone_inline_start .htCore tbody tr:last-child td:first-child:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi))){border-bottom-right-radius:var(--ht-border-radius)}.handsontable.ht-wrapper .ht_clone_bottom_inline_start_corner .htCore:not(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-bottom-left-radius:var(--ht-border-radius)}.handsontable.ht-wrapper .ht_clone_bottom_inline_start_corner .htCore:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-bottom-right-radius:var(--ht-border-radius)}:is(.handsontable.ht-wrapper .ht_clone_bottom_inline_start_corner .htCore tr:last-child th:first-child:not(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)),.handsontable.ht-wrapper .ht_clone_bottom_inline_start_corner .htCore tr:last-child td:first-child:not(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi))){border-bottom-left-radius:var(--ht-border-radius)}:is(.handsontable.ht-wrapper .ht_clone_bottom_inline_start_corner .htCore tr:last-child th:first-child:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)),.handsontable.ht-wrapper .ht_clone_bottom_inline_start_corner .htCore tr:last-child td:first-child:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi))){border-bottom-right-radius:var(--ht-border-radius)}.handsontable.ht-wrapper .ht_clone_bottom .htCore:not(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-bottom-right-radius:var(--ht-border-radius);border-bottom-left-radius:var(--ht-border-radius)}.handsontable.ht-wrapper .ht_clone_bottom .htCore:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-bottom-left-radius:var(--ht-border-radius);border-bottom-right-radius:var(--ht-border-radius)}:is(.handsontable.ht-wrapper .ht_clone_bottom .htCore tr:last-child th:first-child:not(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)),.handsontable.ht-wrapper .ht_clone_bottom .htCore tr:last-child td:first-child:not(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi))){border-bottom-left-radius:var(--ht-border-radius)}:is(.handsontable.ht-wrapper .ht_clone_bottom .htCore tr:last-child th:first-child:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)),.handsontable.ht-wrapper .ht_clone_bottom .htCore tr:last-child td:first-child:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi))){border-bottom-right-radius:var(--ht-border-radius)}:is(.handsontable.ht-wrapper .ht_clone_bottom .htCore tr:last-child th:last-child:not(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)),.handsontable.ht-wrapper .ht_clone_bottom .htCore tr:last-child td:last-child:not(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi))){border-bottom-right-radius:var(--ht-border-radius)}:is(.handsontable.ht-wrapper .ht_clone_bottom .htCore tr:last-child th:last-child:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)),.handsontable.ht-wrapper .ht_clone_bottom .htCore tr:last-child td:last-child:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi))){border-bottom-left-radius:var(--ht-border-radius)}.handsontable.ht-wrapper.htHasScrollX:not(.htHorizontallyScrollableByWindow) .htCore:not(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)),.handsontable.ht-wrapper.htHasScrollX:not(.htHorizontallyScrollableByWindow) .htCore:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-bottom-right-radius:0;border-bottom-left-radius:0}:is(.handsontable.ht-wrapper.htHasScrollX:not(.htHorizontallyScrollableByWindow) .htCore thead tr:last-child th:first-child:not(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)),.handsontable.ht-wrapper.htHasScrollX:not(.htHorizontallyScrollableByWindow) .htCore tbody tr:last-child td:first-child:not(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)),.handsontable.ht-wrapper.htHasScrollX:not(.htHorizontallyScrollableByWindow) .htCore tbody tr:last-child th:first-child:not(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi))){border-bottom-left-radius:0}:is(.handsontable.ht-wrapper.htHasScrollX:not(.htHorizontallyScrollableByWindow) .htCore thead tr:last-child th:first-child:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)),.handsontable.ht-wrapper.htHasScrollX:not(.htHorizontallyScrollableByWindow) .htCore tbody tr:last-child td:first-child:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)),.handsontable.ht-wrapper.htHasScrollX:not(.htHorizontallyScrollableByWindow) .htCore tbody tr:last-child th:first-child:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi))){border-bottom-right-radius:0}:is(.handsontable.ht-wrapper.htHasScrollX:not(.htHorizontallyScrollableByWindow) .htCore thead tr:last-child th:not(.hiddenHeader):not(:has(~th:not(.hiddenHeader))),.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):not(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-bottom-right-radius:0}:is(.handsontable.ht-wrapper.htHasScrollX:not(.htHorizontallyScrollableByWindow) .htCore thead tr:last-child th:not(.hiddenHeader):not(:has(~th:not(.hiddenHeader))),.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):is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-bottom-left-radius:0}.handsontable.ht-wrapper.htHasScrollY:not(.htVerticallyScrollableByWindow) .htCore:not(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-top-right-radius:0;border-bottom-right-radius:0}.handsontable.ht-wrapper.htHasScrollY:not(.htVerticallyScrollableByWindow) .htCore:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-top-left-radius:0;border-bottom-left-radius:0}:is(.handsontable.ht-wrapper.htHasScrollY:not(.htVerticallyScrollableByWindow) .htCore thead tr:first-child th:not(.hiddenHeader):not(:has(~th:not(.hiddenHeader))),.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):not(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-top-right-radius:0}:is(.handsontable.ht-wrapper.htHasScrollY:not(.htVerticallyScrollableByWindow) .htCore thead tr:first-child th:not(.hiddenHeader):not(:has(~th:not(.hiddenHeader))),.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):is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-top-left-radius:0}:is(.handsontable.ht-wrapper.htHasScrollY:not(.htVerticallyScrollableByWindow) .htCore thead tr:last-child th:not(.hiddenHeader):not(:has(~th:not(.hiddenHeader))),.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):not(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-bottom-right-radius:0}:is(.handsontable.ht-wrapper.htHasScrollY:not(.htVerticallyScrollableByWindow) .htCore thead tr:last-child th:not(.hiddenHeader):not(:has(~th:not(.hiddenHeader))),.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):is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-bottom-left-radius:0}.ht-root-wrapper{border-radius:var(--ht-border-radius)}.ht-root-wrapper:has(>.ht-slot-bottom>.ht-slot-element) .ht-wrapper:not(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-bottom-right-radius:0;border-bottom-left-radius:0}.ht-root-wrapper:has(>.ht-slot-bottom>.ht-slot-element) .ht-wrapper:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-bottom-right-radius:0;border-bottom-left-radius:0}.ht-root-wrapper:has(>.ht-slot-bottom>.ht-slot-element) .ht_master .wtHolder:not(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-bottom-right-radius:0;border-bottom-left-radius:0}.ht-root-wrapper:has(>.ht-slot-bottom>.ht-slot-element) .ht_master .wtHolder:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-bottom-right-radius:0;border-bottom-left-radius:0}.ht-root-wrapper:has(>.ht-slot-bottom>.ht-slot-element) .htCore:not(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-bottom-right-radius:0;border-bottom-left-radius:0}.ht-root-wrapper:has(>.ht-slot-bottom>.ht-slot-element) .htCore:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-bottom-right-radius:0;border-bottom-left-radius:0}:is(.ht-root-wrapper:has(>.ht-slot-bottom>.ht-slot-element) .htCore thead tr:last-child th:first-child,.ht-root-wrapper:has(>.ht-slot-bottom>.ht-slot-element) .htCore tbody tr:last-child td:first-child,.ht-root-wrapper:has(>.ht-slot-bottom>.ht-slot-element) .htCore tbody tr:last-child th:first-child):not(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-bottom-left-radius:0}:is(.ht-root-wrapper:has(>.ht-slot-bottom>.ht-slot-element) .htCore thead tr:last-child th:first-child,.ht-root-wrapper:has(>.ht-slot-bottom>.ht-slot-element) .htCore tbody tr:last-child td:first-child,.ht-root-wrapper:has(>.ht-slot-bottom>.ht-slot-element) .htCore tbody tr:last-child th:first-child):is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-bottom-right-radius:0}:is(.ht-root-wrapper:has(>.ht-slot-bottom>.ht-slot-element) .htCore thead tr:last-child th:not(.hiddenHeader):not(:has(~th:not(.hiddenHeader))),.ht-root-wrapper:has(>.ht-slot-bottom>.ht-slot-element) .htCore tbody tr:last-child td:last-child,.ht-root-wrapper:has(>.ht-slot-bottom>.ht-slot-element) .htCore tbody tr:last-child th:last-child):not(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-bottom-right-radius:0}:is(.ht-root-wrapper:has(>.ht-slot-bottom>.ht-slot-element) .htCore thead tr:last-child th:not(.hiddenHeader):not(:has(~th:not(.hiddenHeader))),.ht-root-wrapper:has(>.ht-slot-bottom>.ht-slot-element) .htCore tbody tr:last-child td:last-child,.ht-root-wrapper:has(>.ht-slot-bottom>.ht-slot-element) .htCore tbody tr:last-child th:last-child):is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-bottom-left-radius:0}.ht-root-wrapper:has(>.ht-slot-top>.ht-slot-element) .ht-wrapper:not(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-top-left-radius:0;border-top-right-radius:0}.ht-root-wrapper:has(>.ht-slot-top>.ht-slot-element) .ht-wrapper:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-top-left-radius:0;border-top-right-radius:0}.ht-root-wrapper:has(>.ht-slot-top>.ht-slot-element) .ht_master .wtHolder:not(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-top-left-radius:0;border-top-right-radius:0}.ht-root-wrapper:has(>.ht-slot-top>.ht-slot-element) .ht_master .wtHolder:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-top-left-radius:0;border-top-right-radius:0}.ht-root-wrapper:has(>.ht-slot-top>.ht-slot-element) .htCore:not(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-top-left-radius:0;border-top-right-radius:0}.ht-root-wrapper:has(>.ht-slot-top>.ht-slot-element) .htCore:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-top-left-radius:0;border-top-right-radius:0}:is(.ht-root-wrapper:has(>.ht-slot-top>.ht-slot-element) .htCore thead tr:first-child th:first-child,.ht-root-wrapper:has(>.ht-slot-top>.ht-slot-element) .htCore tbody tr:first-child td:first-child,.ht-root-wrapper:has(>.ht-slot-top>.ht-slot-element) .htCore tbody tr:first-child th:first-child):not(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-top-left-radius:0}:is(.ht-root-wrapper:has(>.ht-slot-top>.ht-slot-element) .htCore thead tr:first-child th:first-child,.ht-root-wrapper:has(>.ht-slot-top>.ht-slot-element) .htCore tbody tr:first-child td:first-child,.ht-root-wrapper:has(>.ht-slot-top>.ht-slot-element) .htCore tbody tr:first-child th:first-child):is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-top-right-radius:0}:is(.ht-root-wrapper:has(>.ht-slot-top>.ht-slot-element) .htCore thead tr:first-child th:not(.hiddenHeader):not(:has(~th:not(.hiddenHeader))),.ht-root-wrapper:has(>.ht-slot-top>.ht-slot-element) .htCore tbody tr:first-child td:last-child,.ht-root-wrapper:has(>.ht-slot-top>.ht-slot-element) .htCore tbody tr:first-child th:last-child):not(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-top-right-radius:0}:is(.ht-root-wrapper:has(>.ht-slot-top>.ht-slot-element) .htCore thead tr:first-child th:not(.hiddenHeader):not(:has(~th:not(.hiddenHeader))),.ht-root-wrapper:has(>.ht-slot-top>.ht-slot-element) .htCore tbody tr:first-child td:last-child,.ht-root-wrapper:has(>.ht-slot-top>.ht-slot-element) .htCore tbody tr:first-child th:last-child):is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-top-left-radius:0}.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:not(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)),.ht-root-wrapper .ht-slot-bottom>.ht-slot-element:last-of-type:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-top-left-radius:0;border-top-right-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:not(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)),.ht-root-wrapper .ht-slot-top>.ht-slot-element:first-of-type:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-bottom-right-radius:0;border-bottom-left-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{inset-inline-start:-10000px;inset-inline-end:unset;z-index:9999;top:-10000px}.handsontable.hide-tween{animation:.2s forwards opacity-hide}.handsontable.show-tween{animation:.3s forwards opacity-show}.ht_clone_master{z-index:100}.ht_clone_inline_start{z-index:120}.ht_clone_bottom{z-index:130}.ht_clone_bottom_inline_start_corner{z-index:150}.ht_clone_top{z-index:160}.ht_clone_top_inline_start_corner{z-index:180}.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 .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:10;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}.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}.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)}.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:after{content:"";opacity:.6;display:block;position:absolute;top:0;left:0}[dir=rtl].handsontable .htAutocompleteArrow{float:left}.handsontable .htCheckboxRendererInput{width:var(--ht-checkbox-size);height:var(--ht-checkbox-size);vertical-align:middle;cursor:pointer;margin:0;outline:none;margin-top:-2px;display:inline-block;position:relative}.handsontable .htCheckboxRendererInput:first-child{margin-inline-end:var(--ht-gap-size)}.handsontable .htCheckboxRendererInput:last-child{margin-inline-start:var(--ht-gap-size)}.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:after{content:"";color:var(--ht-checkbox-icon-color);pointer-events:none;display:block;position:absolute;top:0;left:0;width:var(--ht-checkbox-size)!important;height:var(--ht-checkbox-size)!important}.handsontable .htCheckboxRendererInput:checked:before{border-color:var(--ht-checkbox-checked-border-color);background-color:var(--ht-checkbox-checked-background-color)}.handsontable .htCheckboxRendererInput:checked:after{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:after{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:after{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:after{color:var(--ht-checkbox-focus-icon-color)}.handsontable .htCheckboxRendererInput:disabled{cursor:initial}.handsontable .htCheckboxRendererInput:disabled:before{border-color:var(--ht-checkbox-disabled-border-color);background-color:var(--ht-checkbox-disabled-background-color)}.handsontable .htCheckboxRendererInput:disabled:after{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:after{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:after{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:after{color:var(--ht-checkbox-indeterminate-focus-icon-color)}.handsontable .htCheckboxRendererInput.noValue{opacity:.5}.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-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;flex-shrink:0;max-width:100px;display:inline-flex}.handsontable .ht-multi-select-chip-label{text-overflow:ellipsis;color:var(--ht-foreground-color);font-style:normal;font-weight:var(--ht-font-weight);line-height:var(--ht-line-height,40px);letter-spacing:var(--ht-letter-spacing,0);padding:0 var(--ht-chip-gap);overflow:hidden}.handsontable .ht-multi-select-chip-remove{cursor:pointer;color:var(--ht-icon-button-icon-color);background-position:50%;background-repeat:no-repeat;background-size:contain;flex-shrink:0;justify-content:center;align-items:center;padding:0;display:flex;position:relative;width:var(--ht-icon-size)!important;height:var(--ht-icon-size)!important}.handsontable .ht-multi-select-chip-remove:before{content:"";display:block;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;flex-shrink:0;justify-content:center;align-items:center;display:inline-flex}.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-icon{left:calc(var(--ht-menu-item-horizontal-padding) + 10px);opacity:.5;pointer-events:none;z-index:1;background-position:50%;background-repeat:no-repeat;background-size:contain;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{-webkit-appearance:none;appearance:none;width:var(--ht-checkbox-size);height:var(--ht-checkbox-size);margin:0;padding:0;display:flex;position:relative}.handsontableEditor .ht-multi-select-editor ul li div input:after{content:"";display:block;position:absolute;top:0;left:0}.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:checked:after{color:var(--ht-checkbox-checked-icon-color);background-color:currentColor}.handsontableEditor .ht-multi-select-editor ul li div input:focus{outline:none}.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 0 0 calc(var(--ht-gap-size)*2);overflow:hidden}.handsontableEditor .ht-multi-select-editor ul li:hover{background:color-mix(in srgb,var(--ht-menu-item-hover-color)var(--ht-menu-item-hover-color-opacity,100%),transparent)}.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:after{content:"";right:calc(var(--ht-input-horizontal-padding) - var(--ht-icon-size)/4);display:block;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)}[dir=rtl].handsontable .htUISelectCaption:after{right:auto;left:calc(var(--ht-input-horizontal-padding) - var(--ht-icon-size)/4)}.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);-webkit-appearance:none;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]:after{content:"";color:var(--ht-radio-icon-color);display:block;position:absolute}.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:after{color:var(--ht-radio-checked-icon-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:disabled:after{color:var(--ht-radio-checked-disabled-icon-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]:checked:focus:after{color:var(--ht-radio-checked-focus-icon-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]:disabled:after{color:var(--ht-radio-disabled-icon-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]:focus:after{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:before,.handsontable .ht_nestingButton:before{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:1;display:block;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:before,.handsontable .collapsibleIndicator.ht_nestingCollapse:before,.handsontable .ht_nestingButton.expanded:before,.handsontable .ht_nestingButton.ht_nestingCollapse:before{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:before,.handsontable .collapsibleIndicator.ht_nestingCollapse:hover:before,.handsontable .ht_nestingButton.expanded:hover:before,.handsontable .ht_nestingButton.ht_nestingCollapse:hover:before{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:before,.handsontable .collapsibleIndicator.ht_nestingExpand:before,.handsontable .ht_nestingButton.collapsed:before,.handsontable .ht_nestingButton.ht_nestingExpand:before{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:before,.handsontable .collapsibleIndicator.ht_nestingExpand:hover:before,.handsontable .ht_nestingButton.collapsed:hover:before,.handsontable .ht_nestingButton.ht_nestingExpand:hover:before{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:before,.handsontable th.ht__active_highlight .collapsibleIndicator.ht_nestingExpand:before,.handsontable th.ht__active_highlight .ht_nestingButton.collapsed:before,.handsontable th.ht__active_highlight .ht_nestingButton.ht_nestingExpand:before{color:var(--ht-collapse-button-close-icon-active-color)}.handsontable th.ht__active_highlight .collapsibleIndicator.collapsed:hover:before,.handsontable th.ht__active_highlight .collapsibleIndicator.ht_nestingExpand:hover:before,.handsontable th.ht__active_highlight .ht_nestingButton.collapsed:hover:before,.handsontable th.ht__active_highlight .ht_nestingButton.ht_nestingExpand:hover:before{color:var(--ht-collapse-button-close-hover-icon-active-color)}.handsontable th.ht__active_highlight .collapsibleIndicator.expanded:before,.handsontable th.ht__active_highlight .collapsibleIndicator.ht_nestingCollapse:before,.handsontable th.ht__active_highlight .ht_nestingButton.expanded:before,.handsontable th.ht__active_highlight .ht_nestingButton.ht_nestingCollapse:before{color:var(--ht-collapse-button-open-icon-active-color)}.handsontable th.ht__active_highlight .collapsibleIndicator.expanded:hover:before,.handsontable th.ht__active_highlight .collapsibleIndicator.ht_nestingCollapse:hover:before,.handsontable th.ht__active_highlight .ht_nestingButton.expanded:hover:before,.handsontable th.ht__active_highlight .ht_nestingButton.ht_nestingCollapse:hover:before{color:var(--ht-collapse-button-open-hover-icon-active-color)}.handsontable thead th.htRowspanHeader+th{border-inline-start-width: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 thead tr:last-child th:first-child:not(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-bottom-left-radius:0}.handsontable.htRowHeaders.htHasRowspanHeaders thead tr:last-child th:first-child:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-bottom-right-radius:0}.handsontable.htHasRowspanHeaders .ht_clone_inline_start .htCore tbody tr:first-child th:first-child:not(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-top-left-radius:0}.handsontable.htHasRowspanHeaders .ht_clone_inline_start .htCore tbody tr:first-child th:first-child:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-top-right-radius:0}.handsontable .ht_master:not(.innerBorderTop):not(.innerBorderBottom) thead th.htRowspanBottomLevel,.handsontable .ht_master:not(.innerBorderTop):not(.innerBorderBottom)~.handsontable thead th.htRowspanBottomLevel{border-bottom-width: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 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 th.beforeHiddenColumn,.handsontable th.afterHiddenColumn{position:relative}.handsontable th.beforeHiddenColumn:before,.handsontable th.beforeHiddenColumn:after,.handsontable th.afterHiddenColumn:before,.handsontable th.afterHiddenColumn:after{color:var(--ht-hidden-indicator-color);position:absolute;top:50%;transform:translateY(-50%);width:10px!important;height:10px!important}.handsontable th.beforeHiddenColumn:after{content:"";display:block;right:-2px}.handsontable th.afterHiddenColumn:before{content:"";display:block;left:-2px}.handsontable th.ht__active_highlight.beforeHiddenColumn:before,.handsontable th.ht__active_highlight.beforeHiddenColumn:after,.handsontable th.ht__active_highlight.afterHiddenColumn:before,.handsontable th.ht__active_highlight.afterHiddenColumn:after{color:var(--ht-icon-button-active-icon-color,var(--ht-icon-active-button-icon-color))}[dir=rtl].handsontable th.beforeHiddenColumn:after{right:initial;left:-2px;transform:translateY(-50%)rotate(180deg)}[dir=rtl].handsontable th.afterHiddenColumn:before{right:-2px;left:initial;transform:translateY(-50%)rotate(180deg)}.handsontable th.beforeHiddenRow,.handsontable th.afterHiddenRow{position:relative}.handsontable th.beforeHiddenRow:before,.handsontable th.beforeHiddenRow:after,.handsontable th.afterHiddenRow:before,.handsontable th.afterHiddenRow:after{color:var(--ht-hidden-indicator-color);position:absolute;left:50%;transform:translate(-50%);width:10px!important;height:10px!important}.handsontable th.beforeHiddenRow:after{content:"";display:block;bottom:-2px}.handsontable th.afterHiddenRow:before{content:"";display:block;top:-2px}.handsontable th.ht__active_highlight.beforeHiddenRow:before,.handsontable th.ht__active_highlight.beforeHiddenRow:after,.handsontable th.ht__active_highlight.afterHiddenRow:before,.handsontable th.ht__active_highlight.afterHiddenRow:after{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:before{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));color:var(--ht-icon-button-icon-color);z-index:1;display:block;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:before{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:before{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:before{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{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){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_top_inline_start_corner,.handsontable.htDropdownMenu .ht_clone_bottom_inline_start_corner,.handsontable.htContextMenu .ht_clone_top,.handsontable.htContextMenu .ht_clone_bottom,.handsontable.htContextMenu .ht_clone_inline_start,.handsontable.htContextMenu .ht_clone_top_inline_start_corner,.handsontable.htContextMenu .ht_clone_bottom_inline_start_corner,.handsontable.htFiltersConditionsMenu .ht_clone_top,.handsontable.htFiltersConditionsMenu .ht_clone_bottom,.handsontable.htFiltersConditionsMenu .ht_clone_inline_start,.handsontable.htFiltersConditionsMenu .ht_clone_top_inline_start_corner,.handsontable.htFiltersConditionsMenu .ht_clone_bottom_inline_start_corner{display:none}.handsontable.htDropdownMenu table.htCore,.handsontable.htContextMenu table.htCore,.handsontable.htFiltersConditionsMenu table.htCore{overflow:hidden}.handsontable.htDropdownMenu .htCustomMenuRenderer .table.htCore,.handsontable.htContextMenu .htCustomMenuRenderer .table.htCore,.handsontable.htFiltersConditionsMenu .htCustomMenuRenderer .table.htCore{box-shadow:none}.handsontable.htDropdownMenu.handsontable:focus,.handsontable.htContextMenu.handsontable:focus,.handsontable.htFiltersConditionsMenu.handsontable:focus{outline:none}.handsontable.htDropdownMenu .wtBorder,.handsontable.htContextMenu .wtBorder,.handsontable.htFiltersConditionsMenu .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{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{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{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{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):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):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):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).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).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).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{margin-inline-end:calc(2*var(--ht-gap-size,4px) + var(--ht-icon-size))}.handsontable.htDropdownMenu table tbody tr td.htSubmenu .htItemWrapper:after,.handsontable.htContextMenu table tbody tr td.htSubmenu .htItemWrapper:after,.handsontable.htFiltersConditionsMenu table tbody tr td.htSubmenu .htItemWrapper:after{content:"";top:50%;right:calc(var(--ht-menu-item-horizontal-padding) + var(--ht-gap-size)*2);display:block;position:absolute;transform:translateY(-50%)}.handsontable.htDropdownMenu table tbody tr td.htSeparator,.handsontable.htContextMenu table tbody tr td.htSeparator,.handsontable.htFiltersConditionsMenu 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{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{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{display:none}:is(.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)){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{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{vertical-align:text-bottom;margin-right:12px}.handsontable.htDropdownMenu table tbody tr td .htItemWrapper span.selected,.handsontable.htContextMenu table tbody tr td .htItemWrapper span.selected,.handsontable.htFiltersConditionsMenu table tbody tr td .htItemWrapper span.selected{font-size:0;inset:0}.handsontable.htDropdownMenu table tbody tr td .htItemWrapper span.selected:after,.handsontable.htContextMenu table tbody tr td .htItemWrapper span.selected:after,.handsontable.htFiltersConditionsMenu table tbody tr td .htItemWrapper span.selected:after{content:"";top:50%;right:calc(var(--ht-menu-item-horizontal-padding) + var(--ht-gap-size)*2);color:var(--ht-accent-color);display:block;position:absolute;transform:translateY(-50%)}.handsontable.htDropdownMenu table tbody tr td div span.selected,.handsontable.htContextMenu table tbody tr td div span.selected,.handsontable.htFiltersConditionsMenu table tbody tr td div span.selected{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{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{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;border-radius:0!important;overflow-y:scroll!important}.handsontable .htUIMultipleSelect .ht_master .wtHolder .htCore{box-shadow:none}[dir=rtl].handsontable.htDropdownMenu table tbody tr td.htSubmenu .htItemWrapper:after,[dir=rtl].handsontable.htContextMenu table tbody tr td.htSubmenu .htItemWrapper:after,[dir=rtl].handsontable.htFiltersConditionsMenu table tbody tr td.htSubmenu .htItemWrapper:after{left:calc(4*var(--ht-gap-size));right:auto;transform:translateY(-50%)rotate(180deg)}[dir=rtl].handsontable.htDropdownMenu table tbody tr td .htItemWrapper span.selected:after,[dir=rtl].handsontable.htContextMenu table tbody tr td .htItemWrapper span.selected:after,[dir=rtl].handsontable.htFiltersConditionsMenu table tbody tr td .htItemWrapper span.selected:after{left:calc(4*var(--ht-gap-size));right:auto}.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{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);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:4px 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))}.handsontable .htCommentCell{position:relative}.handsontable .htCommentCell:after{content:"";top:0;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);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 .columnSorting:not(.indicatorDisabled){position:relative}.handsontable .columnSorting:not(.indicatorDisabled).sortAction.ascending,.handsontable .columnSorting:not(.indicatorDisabled).sortAction.descending{padding-inline-end:calc(var(--ht-icon-size,16px) + 2px)}.handsontable .columnSorting:not(.indicatorDisabled).sortAction:hover{cursor:pointer;text-decoration:none}.handsontable .columnSorting:not(.indicatorDisabled).sortAction:before{content:"";width:var(--ht-icon-size,16px);text-align:right;display:block;position:absolute;top:50%;right:2px;transform:translateY(-50%)}.handsontable .htRight .columnSorting.sortAction.ascending,.handsontable .htRight .columnSorting.sortAction.descending{padding-inline-start:calc(var(--ht-icon-size,16px) + 2px);padding-inline-end:0}.handsontable .htRight .columnSorting.sortAction:before,[dir=rtl] .handsontable .columnSorting.sortAction:before{text-align:left;left:2px;right:auto}[dir=rtl] .handsontable .htRight .columnSorting.sortAction.ascending,[dir=rtl] .handsontable .htRight .columnSorting.sortAction.descending{padding-inline-start:0;padding-inline-end:calc(var(--ht-icon-size,16px) + 2px)}[dir=rtl] .handsontable .htLeft .columnSorting.sortAction.ascending,[dir=rtl] .handsontable .htLeft .columnSorting.sortAction.descending{padding-inline-start:calc(var(--ht-icon-size,16px) + 2px);padding-inline-end:0}[dir=rtl] .handsontable .htLeft .columnSorting.sortAction:before{text-align:right;left:auto;right:2px}.htGhostTable .htCore span.colHeader.columnSorting:not(.indicatorDisabled):before{content:"*";padding-inline-end:calc(var(--ht-icon-size,16px) + 2px);display:inline-block;position:relative}.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 .htRowHeaders .ht_master.innerBorderInlineStart~.ht_clone_top_inline_start_corner th:nth-child(2),.handsontable .htRowHeaders .ht_master.innerBorderInlineStart~.ht_clone_inline_start td:first-of-type{border-left:0}.handsontable .ht_clone_top_inline_start_corner th.ht__active_highlight{box-shadow:none}.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{inset-inline-end:unset;width:0;border-inline-end:1px solid var(--ht-accent-color);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__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{border:1px solid var(--ht-accent-color);outline:none}.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:before{content:"";top:50%;margin-top:calc(-.5*var(--ht-icon-size));margin-inline-start:calc(-.5*var(--ht-icon-size));display:block;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}.handsontable.ht-pagination .ht-page-size-section__select-wrapper{border-radius:var(--ht-input-border-radius);position:relative}.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);background-color:var(--ht-input-background-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}.handsontable.ht-pagination .ht-page-size-section__select-wrapper select:disabled{opacity:.4;cursor:default;color:var(--ht-input-disabled-foreground-color);background-color:var(--ht-input-disabled-background-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);background-color:var(--ht-input-hover-background-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);background-color:var(--ht-input-focus-background-color);border-color:var(--ht-input-focus-border-color);outline:none}.handsontable.ht-pagination .ht-page-size-section__select-wrapper:after{content:"";background-color:var(--ht-foreground-color);pointer-events:none;display:block;position:absolute;inset-block-end:50%;inset-inline-end:var(--ht-gap-size);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:before{content:"";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}.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)}}.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}.ht-empty-data-state--disable-top-border:not(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)),.ht-empty-data-state--disable-top-border:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-top-left-radius:0;border-top-right-radius:0}.ht-empty-data-state--disable-inline-border{border-inline-start-width:0}.ht-empty-data-state--disable-inline-border:not(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-top-left-radius:0;border-bottom-left-radius:0}.ht-empty-data-state--disable-inline-border:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-top-right-radius:0;border-bottom-right-radius:0}.ht-empty-data-state--disable-bottom-border{border-bottom-width:0}.ht-empty-data-state--disable-bottom-border:not(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)),.ht-empty-data-state--disable-bottom-border:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-bottom-right-radius:0;border-bottom-left-radius:0}.ht-root-wrapper:has(>.ht-slot-bottom>.ht-slot-element) .ht-empty-data-state:not(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-bottom-right-radius:0;border-bottom-left-radius:0}.ht-root-wrapper:has(>.ht-slot-bottom>.ht-slot-element) .ht-empty-data-state:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-bottom-right-radius:0;border-bottom-left-radius:0}@keyframes ht-empty-data-state-spin{to{transform:rotate(360deg)}}',this.#tA.head.appendChild(t)}#t_(){let e=this.getCSSVariableValue("line-height"),t=this.getCSSVariableValue("cell-vertical-padding"),r=Math.round(Number.parseFloat(this.getStyleForTD("border-bottom-width")??""));return null===e||null===t||isNaN(r)?null:e+2*t+r}#tL(){this.#tT=getComputedStyle(this.#tE);let e=this.#tP(["box-sizing","border-bottom-width"]);this.#tN.td={...this.#tN.td,...{"box-sizing":e["box-sizing"],"border-bottom-width":e["border-bottom-width"]}}}#tP(e){let t=this.#tA,r=this.#tE,n=t.createElement("table"),o=t.createElement("tbody"),i=t.createElement("tr"),s=t.createElement("tr"),a=t.createElement("td");s.appendChild(a),o.appendChild(i),o.appendChild(s),n.appendChild(o),r.appendChild(n);let l=getComputedStyle(a),h={};return e.forEach(e=>{h[e]=l.getPropertyValue(e)}),r.removeChild(n),h}#tO(e){let t=Math.ceil(Number.parseFloat(this.#tk(e)??""));return Number.isNaN(t)?null:t}#tk(e){let t=this.#tT?.getPropertyValue(e)??null;return""===t?null:t}#tH(){this.#tN={},this.#tM={}}clearCache(){this.#tH(),this.#tL()}}let hH=null,hL=0,hP={TOP:"top",BOTTOM:"bottom"},hD="ht-slot-element",hF="licenseNotification",hV=`plugin:${hF}`,hB="hot-display-license-info";function hU(e){return e.rootSlotBottomElement?.querySelector(`.${hB}`)??null}let hz=(e,t)=>`width: var(--ht-icon-size);
|
|
66
66
|
height: var(--ht-icon-size);
|
|
67
67
|
-webkit-mask-size: contain;
|
|
68
68
|
-webkit-mask-image: url("${e[t]}");
|
|
@@ -192,8 +192,8 @@ ${r}.ht-multi-select-editor-item-selected input::after {
|
|
|
192
192
|
${hz(e,"checkbox")}
|
|
193
193
|
}`)),this.themeStyles.textContent+="}\n",this.themeStyles.textContent+=`.${this.themeClassName} {
|
|
194
194
|
color-scheme: ${n};
|
|
195
|
-
}`,this.themeStyles.parentNode!==this.hot.rootWrapperElement&&this.hot.rootWrapperElement.prepend(this.themeStyles)}getClassName(){return this.themeClassName}update(e){this.hot&&(void 0===e.getThemeConfig&&eN('[ThemeManager] The "theme" option must be an instance of ThemeBuilder.'),this.themeConfig=e.getThemeConfig(),this.themeClassName=`ht-theme-${this.themeConfig.name}`,"function"==typeof e.subscribe&&(this.#tD?.(),this.#tD=e.subscribe(e=>{this.hot?.stylesHandler&&(this.themeConfig=e,this.#tF(),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.#tF()}unmount(){this.themeStyles&&this.themeStyles.remove()}destroy(){this.#tD?.(),this.unmount(),this.hot.themeManager=null}}class hq{#g;#tV=new Map;#tB=0;#tU=[];#tz;constructor(e,{itemClass:t=""}={}){this.#g=e,this.#tz=t}getElement(){return this.#g}has(e){return this.#tV.has(e)}add(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,n=this.#tV.get(e),o=n?n.seq:this.#tB;n&&n.element.remove(),this.#tz&&t.classList.add(this.#tz),this.#tV.set(e,{element:t,weight:r,seq:o}),n||(this.#tB+=1),this.#tW()}remove(e){let t=this.#tV.get(e);t&&(this.#tz&&t.element.classList.remove(this.#tz),t.element.remove(),this.#tV.delete(e))}setOrder(e){this.#tU=Array.isArray(e)?e.slice():[],this.#tW()}getOrder(){return this.#tG()}clear(){this.#tV.forEach(e=>e.element.remove()),this.#tV.clear()}#tG(){let e=this.#tU;return Array.from(this.#tV.keys()).sort((t,r)=>{let n=e.indexOf(t),o=e.indexOf(r);if(-1!==n||-1!==o)return(-1===n?1/0:n)-(-1===o?1/0:o);let i=this.#tV.get(t),s=this.#tV.get(r);return i.weight!==s.weight?i.weight-s.weight:i.seq-s.seq})}#tW(){let e=this.#g.firstChild;this.#tG().forEach(t=>{let r=this.#tV.get(t).element;r===e?e=e.nextSibling:this.#g.insertBefore(r,e)})}}class hK{#t$;constructor(e){this.#t$=new Map(Object.keys(e).map(t=>[t,new hq(e[t],{itemClass:hD})]))}getSlot(e){let t=this.#t$.get(e);return t||eN(`Unknown layout slot "${e}".`),t}register(e,t,r){let{side:n,weight:o=0}=r;this.getSlot(n).add(e,t,o)}unregister(e,t){this.getSlot(t).remove(e)}applyConfig(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};Object.values(hP).forEach(t=>this.getSlot(t).setOrder(e?.[t]??[]))}destroy(){this.#t$.forEach(e=>e.clear())}}let hX={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"},hQ={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"}},hZ=new Set(["name","sizing","density","icons","colors","tokens","colorScheme"]),hJ=new Set(["light","dark","auto"]),h0=new Set(["default","compact","comfortable"]),h1=new Set(["arrowRight","arrowRightWithBar","arrowLeft","arrowLeftWithBar","arrowDown","menu","selectArrow","arrowNarrowUp","arrowNarrowDown","check","checkbox","caretHiddenLeft","caretHiddenRight","caretHiddenUp","caretHiddenDown","collapseOff","collapseOn","radio","chipClose","search"]),h2=new Set(["fontFamily","fontSize","fontSizeSmall","lineHeight","lineHeightSmall","fontWeight","letterSpacing","gapSize","iconSize","tableTransition","borderRadius","borderColor","accentColor","foregroundColor","foregroundSecondaryColor","backgroundColor","backgroundSecondaryColor","placeholderColor","readOnlyColor","disabledColor","shadowColor","shadowX","shadowY","shadowBlur","shadowOpacity","barForegroundColor","barBackgroundColor","barHorizontalPadding","barVerticalPadding","cellHorizontalBorderColor","cellVerticalBorderColor","cellHorizontalPadding","cellVerticalPadding","rowHeaderOddBackgroundColor","rowHeaderEvenBackgroundColor","rowCellOddBackgroundColor","rowCellEvenBackgroundColor","cellEditorBorderWidth","cellEditorBorderColor","cellEditorForegroundColor","cellEditorBackgroundColor","cellEditorShadowBlurRadius","cellEditorShadowColor","cellSuccessBackgroundColor","cellErrorBackgroundColor","cellReadOnlyBackgroundColor","cellSelectionBorderColor","cellSelectionBackgroundColor","cellAutofillSize","cellAutofillHitAreaSize","cellAutofillBorderWidth","cellAutofillBorderRadius","cellAutofillBorderColor","cellAutofillBackgroundColor","cellAutofillFillBorderColor","cellMobileHandleSize","cellMobileHandleBorderWidth","cellMobileHandleBorderRadius","cellMobileHandleBorderColor","cellMobileHandleBackgroundColor","cellMobileHandleBackgroundOpacity","resizeIndicatorColor","moveBacklightColor","moveBacklightOpacity","moveIndicatorColor","hiddenIndicatorColor","scrollbarBorderRadius","scrollbarTrackColor","scrollbarThumbColor","headerFontWeight","headerForegroundColor","headerBackgroundColor","headerHighlightedShadowSize","headerHighlightedForegroundColor","headerHighlightedBackgroundColor","headerActiveBorderColor","headerActiveForegroundColor","headerActiveBackgroundColor","headerFilterBackgroundColor","headerRowForegroundColor","headerRowBackgroundColor","headerRowHighlightedForegroundColor","headerRowHighlightedBackgroundColor","headerRowActiveForegroundColor","headerRowActiveBackgroundColor","checkboxSize","checkboxBorderRadius","checkboxBorderColor","checkboxBackgroundColor","checkboxIconColor","checkboxFocusBorderColor","checkboxFocusBackgroundColor","checkboxFocusIconColor","checkboxFocusRingColor","checkboxDisabledBorderColor","checkboxDisabledBackgroundColor","checkboxDisabledIconColor","checkboxCheckedBorderColor","checkboxCheckedBackgroundColor","checkboxCheckedIconColor","checkboxCheckedFocusBorderColor","checkboxCheckedFocusBackgroundColor","checkboxCheckedFocusIconColor","checkboxCheckedDisabledBorderColor","checkboxCheckedDisabledBackgroundColor","checkboxCheckedDisabledIconColor","checkboxIndeterminateBorderColor","checkboxIndeterminateBackgroundColor","checkboxIndeterminateIconColor","checkboxIndeterminateFocusBorderColor","checkboxIndeterminateFocusBackgroundColor","checkboxIndeterminateFocusIconColor","checkboxIndeterminateDisabledBorderColor","checkboxIndeterminateDisabledBackgroundColor","checkboxIndeterminateDisabledIconColor","radioSize","radioBorderColor","radioBackgroundColor","radioIconColor","radioFocusBorderColor","radioFocusBackgroundColor","radioFocusIconColor","radioFocusRingColor","radioDisabledBorderColor","radioDisabledBackgroundColor","radioDisabledIconColor","radioCheckedBorderColor","radioCheckedBackgroundColor","radioCheckedIconColor","radioCheckedFocusBorderColor","radioCheckedFocusBackgroundColor","radioCheckedFocusIconColor","radioCheckedDisabledBorderColor","radioCheckedDisabledBackgroundColor","radioCheckedDisabledIconColor","iconButtonBorderRadius","iconButtonLargeBorderRadius","iconButtonLargePadding","iconButtonBorderColor","iconButtonBackgroundColor","iconButtonIconColor","iconButtonHitAreaSize","iconButtonHoverBorderColor","iconButtonHoverBackgroundColor","iconButtonHoverIconColor","iconButtonActiveBorderColor","iconButtonActiveBackgroundColor","iconButtonActiveIconColor","iconButtonActiveHoverBorderColor","iconButtonActiveHoverBackgroundColor","iconButtonActiveHoverIconColor","collapseButtonBorderRadius","collapseButtonOpenBorderColor","collapseButtonOpenBackgroundColor","collapseButtonOpenIconColor","collapseButtonOpenIconActiveColor","collapseButtonOpenHoverBorderColor","collapseButtonOpenHoverBackgroundColor","collapseButtonOpenHoverIconColor","collapseButtonOpenHoverIconActiveColor","collapseButtonCloseBorderColor","collapseButtonCloseBackgroundColor","collapseButtonCloseIconColor","collapseButtonCloseIconActiveColor","collapseButtonCloseHoverBorderColor","collapseButtonCloseHoverBackgroundColor","collapseButtonCloseHoverIconColor","collapseButtonCloseHoverIconActiveColor","buttonBorderRadius","buttonHorizontalPadding","buttonVerticalPadding","primaryButtonBorderColor","primaryButtonForegroundColor","primaryButtonBackgroundColor","primaryButtonDisabledBorderColor","primaryButtonDisabledForegroundColor","primaryButtonDisabledBackgroundColor","primaryButtonHoverBorderColor","primaryButtonHoverForegroundColor","primaryButtonHoverBackgroundColor","primaryButtonFocusBorderColor","primaryButtonFocusForegroundColor","primaryButtonFocusBackgroundColor","secondaryButtonBorderColor","secondaryButtonForegroundColor","secondaryButtonBackgroundColor","secondaryButtonDisabledBorderColor","secondaryButtonDisabledForegroundColor","secondaryButtonDisabledBackgroundColor","secondaryButtonHoverBorderColor","secondaryButtonHoverForegroundColor","secondaryButtonHoverBackgroundColor","secondaryButtonFocusBorderColor","secondaryButtonFocusForegroundColor","secondaryButtonFocusBackgroundColor","commentsTextareaHorizontalPadding","commentsTextareaVerticalPadding","commentsTextareaBorderWidth","commentsTextareaBorderColor","commentsTextareaForegroundColor","commentsTextareaBackgroundColor","commentsTextareaFocusBorderWidth","commentsTextareaFocusBorderColor","commentsTextareaFocusForegroundColor","commentsTextareaFocusBackgroundColor","commentsIndicatorSize","commentsIndicatorColor","licenseHorizontalPadding","licenseVerticalPadding","licenseForegroundColor","licenseBackgroundColor","linkColor","linkHoverColor","inputBorderWidth","inputBorderRadius","inputHorizontalPadding","inputVerticalPadding","inputBorderColor","inputForegroundColor","inputBackgroundColor","inputHoverBorderColor","inputHoverForegroundColor","inputHoverBackgroundColor","inputDisabledBorderColor","inputDisabledForegroundColor","inputDisabledBackgroundColor","inputFocusBorderColor","inputFocusForegroundColor","inputFocusBackgroundColor","menuBorderWidth","menuBorderRadius","menuHorizontalPadding","menuVerticalPadding","menuItemHorizontalPadding","menuItemVerticalPadding","menuBorderColor","menuShadowX","menuShadowY","menuShadowBlur","menuShadowColor","menuShadowOpacity","menuItemHoverColor","menuItemHoverColorOpacity","menuItemActiveColor","menuItemActiveColorOpacity","dialogSemiTransparentBackgroundColor","dialogSemiTransparentBackgroundOpacity","dialogSolidBackgroundColor","dialogContentPaddingHorizontal","dialogContentPaddingVertical","dialogContentBorderRadius","dialogContentBackgroundColor","notificationForegroundColor","notificationBackgroundColor","notificationBorderColor","notificationSuccessAccent","notificationWarningAccent","notificationErrorAccent","paginationBarForegroundColor","paginationBarBackgroundColor","paginationBarHorizontalPadding","paginationBarVerticalPadding","paginationButtonBorderColor","paginationButtonForegroundColor","paginationButtonBackgroundColor","paginationButtonHoverBorderColor","paginationButtonHoverForegroundColor","paginationButtonHoverBackgroundColor","paginationButtonDisabledForegroundColor","paginationButtonDisabledBackgroundColor","paginationButtonDisabledBorderColor","paginationButtonFocusBorderColor","paginationButtonFocusForegroundColor","paginationButtonFocusBackgroundColor","chipBackground","chipBorderRadius","chipVerticalPadding","chipHorizontalPadding","chipGap"]);function h3(e){if(!hJ.has(e)){let t=[...hJ].join(", ");eN(`[ThemeBuilder] Invalid color scheme: "${e}". Must be one of: ${t}.`)}return e}function h6(e){if(!h0.has(e)){let t=[...h0].join(", ");eN(`[ThemeBuilder] Invalid density: "${e}". Must be one of: ${t}.`)}return e}function h5(e,t,r){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},{type:o="key",warnMissing:i=!1}=n;if(!e){i&&tR(`[ThemeBuilder] No ${o}s provided in ${r}. All ${o}s are missing.`);return}if(Object.keys(e).forEach(e=>{t.has(e)||tR(`[ThemeBuilder] Unknown ${o} key: "${e}" in ${r}. This may be a custom ${o} or a typo.`)}),i){let n=[];t.forEach(t=>{t in e||n.push(t)}),n.length>0&&tR(`[ThemeBuilder] Missing ${o}(s) in ${r}: ${n.join(", ")}`)}}function h4(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},{requiredFields:n=[]}=r;("object"!=typeof e||null===e)&&eN(`[ThemeBuilder] ${t} must be an object.`);let{name:o,sizing:i,density:s,icons:a,colors:l,tokens:h,colorScheme:d}=e;if(h5(e,hZ,t,{type:"param"}),n.forEach(r=>{void 0===e[r]&&eN(`[ThemeBuilder] ${t}.${r} is required.`)}),void 0!==o&&("string"!=typeof o||""===o.trim())&&eN(`[ThemeBuilder] ${t}.name must be a non-empty string.`),void 0===i||eF(i)||eN(`[ThemeBuilder] ${t}.sizing must be an object.`),void 0!==s){eF(s)||"string"==typeof s||eN(`[ThemeBuilder] ${t}.density must be a string or an object.`);var u=`${t}.density`;if(eF(s)){s.type&&s.sizes||eN(`[ThemeBuilder] ${u} must be a string or an object with a 'type' and 'sizes' property.`),h6(String(s.type));var c=s.sizes,g=`${u}.sizes`;eF(c)&&"object"==typeof c&&null!==c?Object.keys(c).forEach(e=>{h0.has(e)||tR(`[ThemeBuilder] Unknown density size key: "${e}" in ${g}.sizes. This may be a custom density size or a typo.`)}):eN(`[ThemeBuilder] ${g}.sizes must be an object.`)}else"string"==typeof s&&h6(s)}void 0!==a&&(eF(a)||eN(`[ThemeBuilder] ${t}.icons must be an object.`),h5(a,h1,`${t}.icons`,{type:"icon",warnMissing:n.includes("icons")})),void 0!==l&&(eF(l)||eN(`[ThemeBuilder] ${t}.colors must be an object.`),function e(t,r){Object.entries(t).forEach(t=>{let[n,o]=t,i=`${r}.${n}`;"string"!=typeof o&&(eF(o)?e(o,i):eN(`[ThemeBuilder] ${i} must be a string or an object.`))})}(l,`${t}.colors`)),void 0!==h&&(eF(h)||eN(`[ThemeBuilder] ${t}.tokens must be an object.`),h5(h,h2,`${t}.tokens`,{type:"token",warnMissing:n.includes("tokens")})),void 0!==d&&h3(String(d))}let h9=["sizing","icons","colors","tokens"],h7=["name","icons","colors","tokens"];class h8{#tj;#tY;#tq=new Set;#tK="auto";#tX="default";constructor(e){h4(e,"themeConfig",{requiredFields:h7}),this.#tj={name:void 0,sizing:hX,density:{type:this.#tX,sizes:hQ},icons:{},colors:{},tokens:{},colorScheme:this.#tK},this.#tQ(e),this.#tj=this.#tY}#tZ(){let e=this.getThemeConfig();this.#tq.forEach(t=>t(e))}#tJ(e,t){if("string"!=typeof t){let r=eY(e.density,t);e.density=r,void 0!==t.type&&(this.#tX=t.type,this.#tj?.density&&(this.#tj.density.type=t.type))}else e.density.type=t,this.#tX=t,this.#tj?.density&&(this.#tj.density.type=t)}#tQ(e){let t=e_(this.#tj);void 0!==e.name&&(void 0!==this.#tj.name?tR('[ThemeBuilder] The "name" property can only be set during `registerTheme()` and cannot be updated via `params()`.'):t.name=e.name),h9.forEach(r=>{void 0!==e[r]&&eF(e[r])&&(t[r]=eY(t[r],e[r]))}),void 0!==e.density&&this.#tJ(t,e.density),void 0!==e.colorScheme&&(t.colorScheme=e.colorScheme,this.#tK=e.colorScheme,this.#tj?.colorScheme&&(this.#tj.colorScheme=e.colorScheme)),this.#tY=t}subscribe(e){return"function"!=typeof e&&eN("[ThemeBuilder] listener must be a function."),this.#tq.add(e),()=>this.#tq.delete(e)}params(e){return h4(e,"params"),this.#tQ(e),this.#tZ(),this}setColorScheme(e){return this.#tK=h3(e),this.#tY.colorScheme=this.#tK,this.#tj.colorScheme=this.#tK,this.#tZ(),this}setDensityType(e){return this.#tX=h6(e),this.#tY.density.type=this.#tX,this.#tj.density.type=this.#tX,this.#tZ(),this}getThemeConfig(){return this.#tY}}let{hasItem:de,getItem:dt,getNames:dr,getValues:dn,register:di}=nr("themes");function ds(e){return de(e)}function da(e){return de(e)?dt(e):void tR(`Theme "${e}" is not registered. Please ensure it is registered before using it.`)}function dl(){return dr()}function dh(){return dn()}function dd(e,t){let r=e,n=e_(t);return"string"==typeof e&&eF(t)?n.name=e:"string"!=typeof e&&eF(e)&&(r=(n=e_(e)).name??""),{themeName:r,themeConfigObject:n}}function du(e,t){let{themeName:r,themeConfigObject:n}=dd(e,t),o=new h8(n);return de(r)?(tR(`Theme "${r}" is already registered. Registration skipped.`),da(r)):(di(r,o),o)}function dc(e,t){let{themeName:r,themeConfigObject:n}=dd(e,t);if(!de(r))return void tR(`Theme "${r}" is not registered. Cannot reinitialize a non-existent theme.`);let o=new h8(n);return di(r,o),o}let dg={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"},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"],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",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%",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.300","colors.palette.400"],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"],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",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"]}},dp=null;function dm(e){if(0===e.length)return[];let t=[...e];return t.sort((e,t)=>{let[r]=e,[n]=t;return r===n?0:r>n?1:-1}),Q(t,(e,t)=>{let[r,n]=t,o=e[e.length-1],[i,s]=o,a=i+s;if(r<=a){let e=Math.max(n-(a-r),0);o[1]+=e}else e.push([r,n]);return e},[t[0]])}let df=new Map;function dC(e,t,r,n,o,i,s){let a=s.ariaTags,l=[],h=[],d=[],u=[];s._isBaseRendererCalled=!0,s.className&&tG(t,s.className),s.readOnly?(l.push(s.readOnlyCellClassName),a&&u.push(W())):a&&d.push(W()[0]),!1===s.valid&&s.invalidCellClassName?(l.push(s.invalidCellClassName),a&&u.push(G())):(h.push(s.invalidCellClassName),a&&d.push(G()[0])),!1===s.wordWrap&&s.noWordWrapClassName&&l.push(s.noWordWrapClassName),ef(i)&&s.placeholder&&l.push(s.placeholderCellClassName),s.textEllipsis&&l.push("htTextEllipsis"),t$(t,h),tG(t,l),tY(t,d),tj(t,u)}function db(e,t,r){e.addEventListener(t,r,!1)}function dy(e,t,r){e.removeEventListener(t,r,!1)}function dw(e){return e.ownerDocument.defaultView.getComputedStyle(e)}function dS(e){let t,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n={minHeight:200,maxHeight:300,minWidth:100,maxWidth:300,textContent:e=>e.value,...r},o=e.body,i=e.createTextNode(""),s=e.createElement("span");function a(){i.textContent=n.textContent(t),s.style.position="absolute",s.style.fontSize=dw(t).fontSize,s.style.fontFamily=dw(t).fontFamily,s.style.whiteSpace="pre",o.appendChild(s);let e=Number.parseInt(dw(t)?.paddingInlineStart||"0",10),r=Number.parseInt(dw(t)?.paddingInlineEnd||"0",10),a=s.clientWidth+e+r+1;o.removeChild(s);let l=t.style;l.height=`${n.minHeight}px`,n.minWidth>a?l.width=`${n.minWidth}px`:a>n.maxWidth?l.width=`${n.maxWidth}px`:l.width=`${a}px`;let h=t.scrollHeight?t.scrollHeight-1:0;n.minHeight>h?l.height=`${n.minHeight}px`:n.maxHeight<h?(l.height=`${n.maxHeight}px`,l.overflowY="visible"):l.height=`${h}px`}function l(){e.defaultView.setTimeout(a,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,r){let o=arguments.length>2&&void 0!==arguments[2]&&arguments[2];t=e;if(r&&r.minHeight){let e=h(r.minHeight,t.clientHeight);void 0!==e&&(n.minHeight=e)}if(r&&r.maxHeight){let e=h(r.maxHeight,t.clientHeight);void 0!==e&&(n.maxHeight=e)}if(r&&r.minWidth){let e=h(r.minWidth,t.clientWidth);void 0!==e&&(n.minWidth=e)}if(r&&r.maxWidth){let e=h(r.maxWidth,t.clientWidth);void 0!==e&&(n.maxWidth=e)}s.firstChild||(s.className="autoResize",s.style.display="inline-block",s.appendChild(i)),"TEXTAREA"===t.nodeName&&(t.style.resize="none",t.style.height=`${n.minHeight}px`,t.style.minWidth=`${n.minWidth}px`,t.style.maxWidth=`${n.maxWidth}px`,t.style.overflowY="hidden"),o&&(db(t,"input",a),db(t,"keydown",l)),a()},resize:a,unObserve(){dy(t,"input",a),dy(t,"keydown",l)}}}function dv(e,t){let r=rd(t),n=t.value.split("\n"),o=r,i=0;for(let t=0;t<n.length;t++){let s=n[t];0!==t&&(i+=n[t-1].length+1);let a=i+s.length;if("home"===e?o=i:"end"===e&&(o=a),r<=a)break}rp(t,o,o)}dC.RENDERER_TYPE="base";let dR="ht_editor_hidden",dE="textEditor";class dT extends hA{static get EDITOR_TYPE(){return"text"}eventManager=new nm(this);autoResize=dS(this.hot.rootDocument);constructor(e){super(e),this.eventManager=new nm(this),this.createElements(),this.bindEvents(),this.hot.addHookOnce("afterDestroy",()=>this.destroy())}getValue(){return this.TEXTAREA.value}setValue(e){this.TEXTAREA.value=e}open(){this._opened=!0,this.refreshDimensions(),this.showEditableElement(),this.hot.getShortcutManager().setActiveContextName("editor"),this.registerShortcuts()}close(){this._opened=!1,this.autoResize.unObserve(),tI(this.hot.rootDocument.activeElement,this.hot.rootElement)&&this.hot.listen(),this.hideEditableElement(),this.unregisterShortcuts()}prepare(e,t,r,n,o,i){let s=this.state;if(super.prepare(e,t,r,n,o,i),!i.readOnly){this.refreshDimensions(!0);let{allowInvalid:e}=i;e&&!this.isOpened()&&(this.TEXTAREA.value=""),s===hT.FINISHED||this.isOpened()||this.hideEditableElement()}}beginEditing(e,t){this.state===hT.VIRGIN&&(this.TEXTAREA.value="",super.beginEditing(e,t))}focus(){this.TEXTAREA.select(),rp(this.TEXTAREA,this.TEXTAREA.value.length,this.TEXTAREA.value.length)}createElements(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"textarea",{rootDocument:t}=this.hot;this.TEXTAREA=t.createElement(e),tj(this.TEXTAREA,[["data-hot-input",""],R(-1)]),tG(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"),tG(this.TEXTAREA_PARENT,"handsontableInputHolder"),tW(this.TEXTAREA_PARENT,this.layerClass)&&t$(this.TEXTAREA_PARENT,this.layerClass),tG(this.TEXTAREA_PARENT,dR),this.textareaParentStyle=this.TEXTAREA_PARENT.style,this.TEXTAREA_PARENT.appendChild(this.TEXTAREA),this.hot.rootElement.appendChild(this.TEXTAREA_PARENT)}hideEditableElement(){tt()&&(this.textareaStyle.textIndent="-99999px"),this.textareaStyle.overflowY="visible",this.textareaParentStyle.opacity="0",this.textareaParentStyle.height="1px",t$(this.TEXTAREA_PARENT,this.layerClass),tG(this.TEXTAREA_PARENT,dR)}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;nk(e.length-1,r=>{if(tW(e[r],"handsontableEditor"))return t=!0,!1}),tW(this.TEXTAREA_PARENT,dR)&&t$(this.TEXTAREA_PARENT,dR),t?this.layerClass="ht_editor_visible":this.layerClass=this.getEditedCellsLayerClass(),tG(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.refreshDimensions()}refreshDimensions(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(this.state!==hT.EDITING&&!e)return;if(this.TD=this.getEditedCell(),!this.TD){e||this.close();return}let t=this.getEditedCellRect();if(!t)return;let{top:r,start:n,width:o,maxWidth:i,height:s,maxHeight:a}=t;this.textareaParentStyle.top=`${r}px`,this.textareaParentStyle[this.hot.isRtl()?"right":"left"]=`${n}px`,this.showEditableElement();let l=this.hot.rootWindow.getComputedStyle(this.TD);this.TEXTAREA.style.fontSize=l.fontSize,this.TEXTAREA.style.fontFamily=l.fontFamily,this.TEXTAREA.style.backgroundColor=this.TD.style.backgroundColor,this.autoResize.init(this.TEXTAREA,{minWidth:Math.min(o,i),minHeight:Math.min(s,a),maxWidth:i,maxHeight:a},!0)}bindEvents(){to()&&this.eventManager.addEventListener(this.TEXTAREA,"focusout",()=>this.finishEditing(!1)),this.addHook("afterScrollHorizontally",()=>this.refreshDimensions()),this.addHook("afterScrollVertically",()=>this.refreshDimensions()),this.addHook("afterColumnResize",()=>{this.refreshDimensions(),this.state===hT.EDITING&&this.focus()}),this.addHook("afterRowResize",()=>{this.refreshDimensions(),this.state===hT.EDITING&&this.focus()})}destroy(){this.eventManager.destroy(),this.clearHooks()}registerShortcuts(){let e=this.hot.getShortcutManager().getContext("editor"),t=()=>{this.hot.rootDocument.execCommand("insertText",!1,"\n")};e.addShortcuts([{keys:[["Control","Enter"]],callback:()=>(t(),!1),runOnlyIf:e=>!this.hot.selection.isMultiple()&&!e?.altKey},{keys:[["Meta","Enter"]],callback:()=>(t(),!1),runOnlyIf:()=>!this.hot.selection.isMultiple()},{keys:[["Alt","Enter"]],callback:()=>(t(),!1)},{keys:[["Home"]],callback:(e,t)=>{dv(t?.[0]??"",this.TEXTAREA)}},{keys:[["End"]],callback:(e,t)=>{dv(t?.[0]??"",this.TEXTAREA)}}],{runOnlyIf:()=>ep(this.hot.getSelected()),group:dE})}unregisterShortcuts(){this.hot.getShortcutManager().getContext("editor").removeShortcutsByGroup(dE)}}function dA(e,t,r,n,o,i,s){let a=i;ef(a)&&s.placeholder&&(a=s.placeholder);let l=eg(a),h=l;s.trimWhitespace&&(h=l.trim()),t0(t,h)}dA.RENDERER_TYPE="text";let dM={CELL_TYPE:"text",editor:dT,renderer:dA},dN=function(e,t){var r,n,o;let i,s,a,l,h,d,u,c=arguments.length>2&&void 0!==arguments[2]&&arguments[2],g=this,p=new nm(g),m=!0,f={...t.initialState,...t};c===iE&&iR.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=iT(this)?e.ownerDocument.createElement("div"):e,this.rootDocument=e.ownerDocument,this.rootWindow=this.rootDocument.defaultView,iT(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"),tG(this.rootElement,["ht-wrapper","handsontable"]),tG(this.rootWrapperElement,"ht-root-wrapper"),tG(this.rootSlotTopElement,"ht-slot-top"),tG(this.rootGridElement,"ht-grid"),tG(this.rootGridContentElement,"ht-grid-content"),tG(this.rootOverlaysElement,"ht-overlay"),tG(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,tG(this.rootPortalElement,"ht-portal"),this.rootDocument.body.appendChild(this.rootPortalElement)),this.isDestroyed=!1,this.renderSuspendedCounter=0,this.executionSuspendedCounter=0;let C=f?.layoutDirection??"inherit",b=["rtl","ltr"].includes(C)?C:this.rootWindow.getComputedStyle(this.rootElement).direction;this.rootElement.setAttribute("dir",b),this.rootWrapperElement?.setAttribute("dir",b),this.isRtl=function(){return"rtl"===b},this.isLtr=function(){return!g.isRtl()},this.getDirectionFactor=function(){return g.isLtr()?1:-1},this.stylesHandler=new h_({hot:g,rootElement:g.rootElement,rootDocument:g.rootDocument,onThemeChange:e=>{iT(this)&&(t$(this.rootWrapperElement,/ht-theme-.*/g),t$(this.rootPortalElement,/ht-theme-.*/g),e&&(tG(this.rootWrapperElement,e),tG(this.rootPortalElement,e),getComputedStyle(this.rootWrapperElement).getPropertyValue("--ht-line-height")||tR(`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:"boolean"!=typeof t?.injectCoreCss||t.injectCoreCss}),this.themeManager=null,a8(i=i9(o=f.language))||(i=a4,i7(o)),f.language=i;let y=Object.fromEntries(Object.entries(f).filter(e=>{let[t]=e;return!(r8.getSingleton().isRegistered(t)||r8.getSingleton().isDeprecated(t))})),w=new l$(g,y,[lj,lY]),S=w.getTableMeta(),R=w.getGlobalMeta(),E=nz();this.container=this.rootDocument.createElement("div"),this.rootElement.insertBefore(this.container,this.rootElement.firstChild),this.guid=`ht_${tu()}`,df.set(this.guid,this),this.columnIndexMapper=new i4,this.rowIndexMapper=new i4,this.columnIndexMapper.addLocalHook("indexesSequenceChange",e=>{g.runHooks("afterColumnSequenceChange",e)}),this.rowIndexMapper.addLocalHook("indexesSequenceChange",e=>{g.runHooks("afterRowSequenceChange",e)}),p.addEventListener(this.rootDocument.documentElement,"compositionstart",e=>{g.runHooks("beforeCompositionStart",e)}),a=new lq(g);let T=nr(this.guid);T.register("cellRangeMapper",new l9({rowIndexMapper:this.rowIndexMapper,columnIndexMapper:this.columnIndexMapper})),this.rootElement.id&&"ht_"!==this.rootElement.id.substring(0,3)||(this.rootElement.id=this.guid);let A=new lM(S,{rowIndexMapper:g.rowIndexMapper,columnIndexMapper:g.columnIndexMapper,countCols:()=>g.countCols(),countRows:()=>g.countRows(),propToCol:e=>s.propToCol(e),isEditorOpened:()=>{let e=g.getActiveEditor();return!!e&&e.isOpened()},countRenderableColumns:()=>g.view.countRenderableColumns(),countRenderableRows:()=>g.view.countRenderableRows(),countRowHeaders:()=>g.countRowHeaders(),countColHeaders:()=>g.countColHeaders(),countRenderableRowsInRange:(e,t)=>g.view.countRenderableRowsInRange(e,t),countRenderableColumnsInRange:(e,t)=>g.view.countRenderableColumnsInRange(e,t),getShortcutManager:()=>g.getShortcutManager(),createCellCoords:(e,t)=>g._createCellCoords(e,t),createCellRange:(e,t,r)=>g._createCellRange(e,t,r),visualToRenderableCoords:e=>{let{row:t,col:r}=e;return g._createCellCoords(t>=0?g.rowIndexMapper.getRenderableFromVisualIndex(t):t,r>=0?g.columnIndexMapper.getRenderableFromVisualIndex(r):r)},renderableToVisualCoords:e=>{let{row:t,col:r}=e;return g._createCellCoords(t>=0?g.rowIndexMapper.getVisualFromRenderableIndex(t):t,r>=0?g.columnIndexMapper.getVisualFromRenderableIndex(r):r)},findFirstNonHiddenRenderableRow:(e,t)=>{let r=t>e?1:-1,n=Math.min(e,t),o=Math.max(e,t),i=g.rowIndexMapper.getNearestNotHiddenIndex(e,r);return null===i||1===r&&i>o||-1===r&&i<n?null:i>=0?g.rowIndexMapper.getRenderableFromVisualIndex(i):i},findFirstNonHiddenRenderableColumn:(e,t)=>{let r=t>e?1:-1,n=Math.min(e,t),o=Math.max(e,t),i=g.columnIndexMapper.getNearestNotHiddenIndex(e,r);return null===i||1===r&&i>o||-1===r&&i<n?null:i>=0?g.columnIndexMapper.getRenderableFromVisualIndex(i):i},isDisabledCellSelection:(e,t)=>e<0||t<0?g.getSettings().disableVisualSelection:g.getCellMeta(e,t).disableVisualSelection});this.selection=A;let M=e=>{let{hiddenIndexesChanged:t}=e;this.forceFullRender=!0,t&&this.selection.commit()};function N(e,t){let r="className"===e?g.rootElement:g.table;if(m)void 0!==t&&tG(r,t);else{let n=[],o=[];if(R[e]){let t=R[e];n=Array.isArray(t)?t:eh(String(t))}t&&(o=Array.isArray(t)?t:eh(t));let i=es(n,o),s=es(o,n);i.length&&t$(r,i),s.length&&tG(r,s)}R[e]=t}function I(e){let t;void 0===e?(t=de("main")?da("main"):du(dg),t=da("main")):t="function"!=typeof e.getThemeConfig?du(e):e,g.themeManager=function(e){let{hot:t,themeObject:r}=e;return new hY({hot:t,themeObject:r})}({hot:g,themeObject:t})}function x(){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 O(e,t){return!!t?.isOpened()&&iL(e,t.row,t.prop)}function k(e,t,r){if(!e.length)return void r();let n=g.getActiveEditor(),o=x(),i=!0,a=t=>{let[r,n,,o]=t,i=e.findIndex(e=>{let[t,o]=e;return t===r&&o===n});-1!==i&&(e[i][3]=o)},l=(e,t)=>{"string"==typeof t&&t.endsWith("Validator")&&e?.forEach(a)};g.addHook("afterChange",l),o.onQueueEmpty=()=>{g.removeHook("afterChange",l),n&&i&&n._closeAfterDataChange&&O(e,n)&&n.cancelChanges(),r()};for(let r=e.length-1;r>=0;r--){let n,[a,l,,h]=e[r],d=s.propToCol(l);n=Number.isInteger(d)?g.getCellMeta(a,d):{...Object.getPrototypeOf(S),...S},g.getCellValidator(n)&&(o.addValidatorToQueue(),g.validateCell(h,n,function(t,r){return function(n){"boolean"!=typeof n&&eN("Validation error: result is not boolean"),!1===n&&!1===r.allowInvalid&&(i=!1,e.splice(t,1),r.valid=!0),o.removeValidatorFormQueue()}}(r,n),t))}o.checkIfQueueIsEmpty()}function _(e,t){for(let t=e.length-1;t>=0;t--){let r=!1;if(null===e[t]){e.splice(t,1);continue}if(null!==e[t][2]&&void 0!==e[t][2]||null!==e[t][3]&&void 0!==e[t][3]){if(S.allowInsertRow)for(;e[t][0]>g.countRows()-1;){let{delta:e}=s.createRow(void 0,void 0,{source:"auto"});if(0===e){r=!0;break}}if("array"===g.dataType&&(!S.columns||0===S.columns.length)&&S.allowInsertColumn)for(;Number(s.propToCol(e[t][1]))>g.countCols()-1;){let{delta:e}=s.createCol(void 0,void 0,{source:"auto"});if(0===e){r=!0;break}}r||s.set(e[t][0],e[t][1],e[t][3])}}let r=e.length>0,n=h.getActiveEditor(),o=n?._closeAfterDataChange,i=O(e,n);r?(l.adjustRowsAndCols(),g.runHooks("beforeChangeRender",e,t),n?.isOpened()&&o&&i&&h.closeEditor(),g.view.adjustElementsSize(),g.render(),(n?.isOpened()&&o&&i||!n?.isOpened())&&h.prepareEditor(),g.runHooks("afterChange",e,t||"edit"),n&&void 0!==n.refreshValue&&(!n.isOpened()||i)&&n.refreshValue()):g.render()}function H(e,t,r){return Array.isArray(e)?e:[[e,t,r]]}function L(e,t){let r=g.runHooks("beforeChange",e,t||"edit"),n=e.filter(e=>null!==e);if(!1===r||0===n.length)return g.getActiveEditor()?.cancelChanges(),[];for(let e=n.length-1;e>=0;e--){let t,[r,o,,i]=n[e],a=s.propToCol(o);t=Number.isInteger(a)?g.getCellMeta(r,a):{...Object.getPrototypeOf(S),...S},n[e][3]=lJ(i,t)}return n}this.columnIndexMapper.addLocalHook("cacheUpdated",e=>{M(e),this.runHooks("afterColumnSequenceCacheUpdate",e)}),this.rowIndexMapper.addLocalHook("cacheUpdated",e=>{M(e),this.runHooks("afterRowSequenceCacheUpdate",e)}),this.selection.addLocalHook("afterSetRangeEnd",(e,t)=>{let r=eG(!1),n=this.selection.getSelectedRange(),{from:o,to:i}=n.current(),s=n.size()-1;this.runHooks("afterSelection",o.row,o.col,i.row,i.col,r,s),this.runHooks("afterSelectionByProp",o.row,g.colToProp(o.col),i.row,g.colToProp(i.col),r,s);let a=A.getSelectionSource();t&&!["loadData","updateData","deselect","shift"].includes(a)&&(!r.isTouched()||r.isTouched()&&!r.value)&&u.scrollTo(e);let l=A.isSelectedByRowHeader(),d=A.isSelectedByColumnHeader();l&&d?tG(this.rootElement,["ht__selection--rows","ht__selection--columns"]):l?(t$(this.rootElement,"ht__selection--columns"),tG(this.rootElement,"ht__selection--rows")):d?(t$(this.rootElement,"ht__selection--rows"),tG(this.rootElement,"ht__selection--columns")):t$(this.rootElement,["ht__selection--rows","ht__selection--columns"]),["shift","refresh","loadData","updateData","deselect"].includes(a)||h.closeEditor(),["refresh","loadData","updateData","deselect"].includes(a)||(g.view.render(),h.prepareEditor())}),this.selection.addLocalHook("beforeSetFocus",e=>{this.runHooks("beforeSelectionFocusSet",e.row,e.col)}),this.selection.addLocalHook("afterSetFocus",e=>{let t=eG(!1);this.runHooks("afterSelectionFocusSet",e.row,e.col,t),(!t.isTouched()||t.isTouched()&&!t.value)&&u.scrollTo(e),h.closeEditor(),g.view.render(),h.prepareEditor()}),this.selection.addLocalHook("afterSelectionFinished",e=>{let t=e.length-1,{from:r,to:n}=e[t];this.runHooks("afterSelectionEnd",r.row,r.col,n.row,n.col,t),this.runHooks("afterSelectionEndByProp",r.row,g.colToProp(r.col),n.row,g.colToProp(n.col),t),["refresh","deselect"].includes(A.getSelectionSource())&&(g.view.render(),h.prepareEditor())}),this.selection.addLocalHook("afterIsMultipleSelection",e=>{let t=this.runHooks("afterIsMultipleSelection",e.value);e.value&&(e.value=t)}),this.selection.addLocalHook("afterDeselect",()=>{h.closeEditor(),g.view.render(),t$(this.rootElement,["ht__selection--rows","ht__selection--columns"]),this.runHooks("afterDeselect")}),this.selection.addLocalHook("beforeHighlightSet",()=>g.runHooks("beforeSelectionHighlightSet")).addLocalHook("beforeSetRangeStart",function(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return g.runHooks("beforeSetRangeStart",...t)}).addLocalHook("beforeSetRangeStartOnly",function(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return g.runHooks("beforeSetRangeStartOnly",...t)}).addLocalHook("beforeSetRangeEnd",function(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return g.runHooks("beforeSetRangeEnd",...t)}).addLocalHook("beforeSelectColumns",function(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return g.runHooks("beforeSelectColumns",...t)}).addLocalHook("afterSelectColumns",function(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return g.runHooks("afterSelectColumns",...t)}).addLocalHook("beforeSelectRows",function(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return g.runHooks("beforeSelectRows",...t)}).addLocalHook("afterSelectRows",function(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return g.runHooks("afterSelectRows",...t)}).addLocalHook("beforeSelectAll",function(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return g.runHooks("beforeSelectAll",...t)}).addLocalHook("afterSelectAll",function(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return g.runHooks("afterSelectAll",...t)}).addLocalHook("beforeModifyTransformStart",function(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return g.runHooks("modifyTransformStart",...t)}).addLocalHook("afterModifyTransformStart",function(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return g.runHooks("afterModifyTransformStart",...t)}).addLocalHook("beforeModifyTransformFocus",function(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return g.runHooks("modifyTransformFocus",...t)}).addLocalHook("afterModifyTransformFocus",function(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return g.runHooks("afterModifyTransformFocus",...t)}).addLocalHook("beforeModifyTransformEnd",function(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return g.runHooks("modifyTransformEnd",...t)}).addLocalHook("afterModifyTransformEnd",function(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return g.runHooks("afterModifyTransformEnd",...t)}).addLocalHook("beforeRowWrap",function(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return g.runHooks("beforeRowWrap",...t)}).addLocalHook("beforeColumnWrap",function(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return g.runHooks("beforeColumnWrap",...t)}).addLocalHook("insertRowRequire",e=>g.alter("insert_row_above",e,1,"auto")).addLocalHook("insertColRequire",e=>g.alter("insert_col_start",e,1,"auto")),l={alter(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,n=arguments.length>3?arguments[3]:void 0,o=arguments.length>4?arguments[4]:void 0;if(!1!==g.runHooks("beforeAlter",e,t,r,n,o)){var i,a;switch(e){case"insert_row_below":case"insert_row_above":let d=g.countSourceRows();if(S.maxRows===d)return;let u="insert_row_below"===e?"below":"above",c="number"==typeof t?t:"below"===u?d:0,{delta:p,startPhysicalIndex:m}=s.createRow(c,r,{source:n,mode:u});A.shiftRows(g.toVisualRow(m),p);break;case"insert_col_start":case"insert_col_end":let f="insert_col_end"===e?"end":"start",C="end"===f?g.countSourceCols():0,b="number"==typeof t?t:C,{delta:y,startPhysicalIndex:w}=s.createCol(b,r,{source:n,mode:f});if(y){if(Array.isArray(S.colHeaders)){let e=[g.toVisualColumn(w),0];e.length+=y,Array.prototype.splice.apply(S.colHeaders,e)}A.shiftColumns(g.toVisualColumn(w),y)}break;case"remove_row":let R;i=Array.isArray(t)?dm(t):[[t,r]],R=0,ee(i,e=>{let[t,r]=e,o=ef(t)?g.countRows()-1:Math.max(t-R,0);if(Number.isInteger(t)&&(t=Math.max(t-R,0)),!s.removeRow(t,r,n))return;if(A.isSelected()){let{row:e}=g.getSelectedRangeActive().highlight;e>=t&&e<=t+r-1&&h.closeEditor(!0)}let i=g.countRows(),a=S.fixedRowsTop;a>=o+1&&(S.fixedRowsTop-=Math.min(r,a-o));let l=S.fixedRowsBottom;if(l&&o>=i-l&&(S.fixedRowsBottom-=Math.min(r,l)),0===i)A.deselect();else if("ContextMenu.removeRow"===n){let e=A.getSelectedRange(),t=e.pop();e.clear().set(t.from).current().setTo(t.to),A.refresh()}else A.shiftRows(t,-r);R+=r});break;case"remove_col":let E;a=Array.isArray(t)?dm(t):[[t,r]],E=0,ee(a,e=>{let[t,r]=e,o=ef(t)?g.countCols()-1:Math.max(t-E,0),i=g.toPhysicalColumn(o);if(Number.isInteger(t)&&(t=Math.max(t-E,0)),!s.removeCol(t,r,n))return;if(A.isSelected()){let{col:e}=g.getSelectedRangeActive().highlight;e>=t&&e<=t+r-1&&h.closeEditor(!0)}if(0===g.countCols())A.deselect();else if("ContextMenu.removeColumn"===n){let e=A.getSelectedRange(),t=e.pop();e.clear().set(t.from).current().setTo(t.to),A.refresh()}else A.shiftColumns(t,-r);let a=S.fixedColumnsStart;a>=o+1&&(S.fixedColumnsStart-=Math.min(r,a-o)),Array.isArray(S.colHeaders)&&(void 0===i&&(i=-1),S.colHeaders.splice(i,r)),E+=r});break;default:eN(`There is no such action "${e}"`)}o||l.adjustRowsAndCols(),g.view.adjustElementsSize(),g.view.render()}},adjustRowsAndCols(){let e=S.minRows,t=S.minSpareRows,r=S.minCols,n=S.minSpareCols;if(e){let t=g.countRows();t<e&&s.createRow(t,e-t,{source:"auto"})}if(t){let e=g.countEmptyRows(!0);if(e<t){let r=Math.min(t-e,S.maxRows-g.countSourceRows());s.createRow(g.countRows(),r,{source:"auto"})}}{let e=0;(r||n)&&(e=g.countEmptyCols(!0));let t=g.countCols();if(r&&!S.columns&&t<r){let n=r-t;e+=n,s.createCol(t,n,{source:"auto"})}if(n&&!S.columns&&"array"===g.dataType&&e<n){t=g.countCols();let r=Math.min(n-e,S.maxCols-t);s.createCol(t,r,{source:"auto"})}}},populateFromArray(e,t,r,n,o){let i,s,a,l,h,d=[],u={},c=[],p=e.row,m=e.col;if(0===(s=t.length))return!1;let f=0,C=0;switch(eF(r)&&(f=r.col-m+1,C=r.row-p+1),o){case"shift_down":let b=X(t),y=b.length,w=Math.max(y,f),R=g.getData().slice(p),E=X(R).slice(m,m+w);for(a=0;a<w;a+=1)if(a<y){for(i=0,s=b[a].length;i<C-s;i+=1)b[a].push(b[a][i%s]);a<E.length?c.push(b[a].concat(E[a])):c.push(b[a].concat(Array(R.length).fill(null)))}else c.push(b[a%y].concat(E[a]));g.populateFromArray(p,m,X(c));break;case"shift_right":let T=t.length,A=Math.max(T,C),M=g.getData().slice(p).map(e=>e.slice(m));for(i=0;i<A;i+=1)if(i<T){for(a=0,l=t[i].length;a<f-l;a+=1)t[i].push(t[i][a%l]);if(i<M.length)for(let e=0;e<M[i].length;e+=1)t[i].push(M[i][e]);else t[i].push(...Array(M[0].length).fill(null))}else t.push(t[i%s].slice(0,A).concat(M[i]));g.populateFromArray(p,m,t);break;default:u.row=e.row,u.col=e.col;let N=0,I=0,x=!0,O="Autofill.fill"===n||"autofill.fill"===n,k=function(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=t[e%t.length];return null!==r?n[r%n.length]:n},_=t.length,H=r?r.row-e.row+1:0;for(i=0,s=r?H:Math.max(_,H);i<s&&!(r&&u.row>r.row&&H>_||!S.allowInsertRow&&u.row>g.countRows()-1)&&!(u.row>=S.maxRows);i++){let t=i-N,o=O?i:t,c=k(o).length,p=r?r.col-e.col+1:0;if(l=r?p:Math.max(c,p),u.col=e.col,h=g.getCellMeta(u.row,u.col),("CopyPaste.paste"===n||"Autofill.fill"===n||"autofill.fill"===n)&&h.skipRowOnPaste){N+=1,u.row+=1,"CopyPaste.paste"===n&&(s+=1);continue}for(a=0,I=0;a<l&&!(r&&u.col>r.col&&p>c||!S.allowInsertColumn&&u.col>g.countCols()-1)&&!(u.col>=S.maxCols);a++){if(h=g.getCellMeta(u.row,u.col),("CopyPaste.paste"===n||"Autofill.fill"===n||"autofill.fill"===n)&&h.skipColumnOnPaste){I+=1,u.col+=1,"CopyPaste.paste"===n&&(l+=1);continue}if(h.readOnly&&"UndoRedo.undo"!==n){u.col+=1;continue}let e=a-I,t=O?a:e,r=!!h.valueSetter,i=k(o,t),s=g.getSourceDataAtCell(u.row,u.col)??null;if(null!==i&&"object"==typeof i)if(Array.isArray(i)&&null===s&&(s=[]),r||"object"==typeof s&&null!==s){if(null!==s){let e=eI(Array.isArray(s)?s:s[0]||s),t=eI(Array.isArray(i)?i:i[0]||i);r||"edit"===n||eP(e,t)||Array.isArray(e)&&Array.isArray(t)?i=e_(i):x=!1}}else x=!1,h.parsePastedValue&&"CopyPaste.paste"===n&&(x=!0),"edit"===n&&(x=!0,i=e_(i));else r||null===s||"object"!=typeof s||(x=!1);x&&d.push([u.row,u.col,i]),x=!0,u.col+=1}u.row+=1}g.setDataAtCell(d,null,null,n||"populateFromArray")}}},this.init=function(){let e=S.theme,t=S.themeName,r=hO(g.rootContainer);if(iT(g)&&!r&&(eF(e)||!e&&!t)&&I(e),a.setData(S.data),g.runHooks("beforeInit"),(tn()||ti())&&tG(g.rootElement,"mobile"),this.updateSettings(f,!0),this.view=new iA(this),h=nf.getInstance(g,S,A),u=function(e){let{selection:t}=e,r=!1,n=!1;return{resume(){n=!1},suspend(){n=!0},skipNextScrollCycle(){r=!0},scrollTo(o){let i;if(r||n){r=!1;return}t.isFocusSelectionChanged()?i=t=>{e.scrollViewportTo(t.toObject(),()=>{let t=e.getSelectedRangeActive();if(!t)return;let{row:r,col:n}=t.highlight;null!==r&&null!==n&&l7(e.getCell(r,n,!0))})}:t.isSelectedByCorner()?i=()=>{}:t.isSelectedByRowHeader()?i=t=>{let r=l8(e).getComputedRowTarget(t);e.scrollViewportTo({row:r},()=>{let t=!!e.getSettings().rowHeaders;l7(e.getCell(r,t?-1:0,!0))})}:t.isSelectedByColumnHeader()?i=t=>{let r=l8(e).getComputedColumnTarget(t);e.scrollViewportTo({col:r},()=>{let t=!!e.getSettings().colHeaders;l7(e.getCell(t?-1:0,r,!0))})}:1===t.getSelectedRange().size()&&t.isMultiple()?i=t=>{let r=l8(e),n={row:r.getComputedRowTarget(t),col:r.getComputedColumnTarget(t)};e.scrollViewportTo(n,()=>{let{row:t,col:r}=n;l7(e.getCell(t,r,!0))})}:1!==t.getSelectedRange().size()||t.isMultiple()?t.getSelectedRange().size()>1&&(i=t=>{let r=l8(e),n={row:r.getComputedRowTarget(t),col:r.getComputedColumnTarget(t)};e.scrollViewportTo(n,()=>{let{row:t,col:r}=n;l7(e.getCell(t,r,!0))})}):i=t=>{let r=e.selection.getSelectionSource(),{row:n,col:o}=t,i=()=>{l7(e.getCell(n,o,!0))};if(n<0&&o>=0)e.scrollViewportTo({col:o},i);else if(o<0&&n>=0)e.scrollViewportTo({row:n},i);else{if("mouse"===r&&(o===e.view.getLastPartiallyVisibleColumn()||n===e.view.getLastPartiallyVisibleRow()))return;e.scrollViewportTo({row:n,col:o},i)}},i?.(o)}}}(g),d.init(),iT(this)){var n=g.rootPortalElement;let e=n.ownerDocument;if(!hH){(hH=e.createElement("div")).setAttribute("role","status"),hH.setAttribute("aria-live","assertive"),hH.setAttribute("aria-atomic","true");let t=hH.style;t.position="absolute",t.width="1px",t.height="1px",t.margin="-1px",t.overflow="hidden",t.clipPath="rect(0 0 0 0)",t.whiteSpace="nowrap",n.appendChild(hH)}hL+=1,function(e){let t=e.rootSlotBottomElement;if(!t)return;let r=eM({className:hB,key:e.getSettings().licenseKey,element:t,releaseDate:"u">typeof process&&1?"25/06/2026":""});r&&(r.classList.add(hD),t.appendChild(r),e.getFocusScopeManager().registerScope(hF,r,{shortcutsContextName:hV,runOnlyIf:()=>null!==hU(e),onActivate:t=>{let r,n=(r=hU(e))?Array.from(r.querySelectorAll("a[href]")):[];n.length>0&&("tab_from_above"===t?n.at(0)?.focus():"tab_from_below"===t&&n.at(-1)?.focus())}}))}(g);let t={top:-1,bottom:-1};this.addHook("afterRender",()=>{if(g.isDestroyed)return;let{view:e}=g;if(!e)return;let r=e.isHorizontallyScrollableByWindow()?e.getTotalTableWidth():e.getWorkspaceWidth();0===r&&g.rootWrapperElement&&(r=g.rootWrapperElement.offsetWidth),g.rootSlotBottomElement&&r!==t.bottom&&(t.bottom=r,g.rootSlotBottomElement.style.width=`${r}px`),g.rootSlotTopElement&&r!==t.top&&(t.top=r,g.rootSlotTopElement.style.width=`${r}px`)})}g.runHooks("init"),this.render(),m&&null===g.rootElement.offsetParent&&rA(g.rootElement,()=>{g.view._wt.wtOverlays.updateLastSpreaderSize(),g.view.adjustElementsSize(),g.render()}),"object"==typeof m&&(g.runHooks("afterChange",m[0],m[1]),m=!1),g.runHooks("afterInit")},this._createCellCoords=function(e,t){return g.view._wt.createCellCoords(e,t)},this._createCellRange=function(e,t,r){return g.view._wt.createCellRange(e,t,r)},this.validateCell=function(e,t,r,n){var o;let i=g.getCellValidator(t);function s(e){let n=!(arguments.length>1)||void 0===arguments[1]||arguments[1];if(!n||!0===t.hidden)return void r(e);let o=t.visualCol,i=t.visualRow,s=g.getCell(i,o,!0);if(s&&"TH"!==s.nodeName){let e=g.rowIndexMapper.getRenderableFromVisualIndex(i),t=g.columnIndexMapper.getRenderableFromVisualIndex(o);g.view._wt.getSetting("cellRenderer",e,t,s)}r(e)}if(eC(i)&&(o=i,i=function(e,t){t(o.test(e))}),rL(i)){let r=rL(t.prop)?t.visualCol:t.prop;e=g.runHooks("beforeValidate",e,t.visualRow,r,n),g._registerMicrotask(()=>{i.call(t,e,o=>{g&&(o=g.runHooks("afterValidate",o,e,t.visualRow,r,n),t.valid=o,s(o),g.runHooks("postAfterValidate",o,e,t.visualRow,r,n))})})}else g._registerMicrotask(()=>{t.valid=!0,s(t.valid,!1)})},this.setDataAtCell=function(e,t,r,n){let o,i,l,h=H(e,t,r),d=[],u=n;for(o=0,i=h.length;o<i;o++){let[e,t,r]=h[o];"object"!=typeof h[o]&&eN("Method `setDataAtCell` accepts row number or changes array of arrays as its first parameter"),"number"!=typeof h[o][1]&&eN("Method `setDataAtCell` accepts row and column number as its parameters. If you want to use object property name, use method `setDataAtRowProp`");let n="number"==typeof t?t:0;l=n>=this.countCols()?n:s.colToProp(n),d.push([e,l,a.getAtCell(this.toPhysicalRow(e),t),r])}u||"object"!=typeof e||(u=t);let c=L(d,u);g.runHooks("afterSetDataAtCell",c,u),k(c,u,()=>{_(c,u)})},this.setDataAtRowProp=function(e,t,r,n){let o,i,s=H(e,t,r),l=[],h=n;for(o=0,i=s.length;o<i;o++){let[e,t,r]=s[o];l.push([e,t,a.getAtCell(this.toPhysicalRow(e),t),r])}h||"object"!=typeof e||(h=t);let d=L(l,h);g.runHooks("afterSetDataAtRowProp",d,h),k(d,h,()=>{_(d,h)})},this.listen=function(){g&&!g.isListening()&&(df.forEach(e=>{g!==e&&e.unlisten()}),dp=g.guid,g.runHooks("afterListen"))},this.unlisten=function(){this.isListening()&&(dp=null,g.runHooks("afterUnlisten"))},this.isListening=function(){return dp===g.guid},this.destroyEditor=function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=!(arguments.length>1)||void 0===arguments[1]||arguments[1];h.closeEditor(e),g.view.render(),t&&A.isSelected()&&h.prepareEditor()},this.populateFromArray=function(e,t,r,n,o,i,s){("object"!=typeof r||"object"!=typeof r[0])&&eN("populateFromArray parameter `input` must be an array of arrays");let a="number"==typeof n?g._createCellCoords(n,o):void 0;return l.populateFromArray(g._createCellCoords(e,t),r,a,i,s)},this.spliceCol=function(e,t,r){for(var n=arguments.length,o=Array(n>3?n-3:0),i=3;i<n;i++)o[i-3]=arguments[i];return s.spliceCol(e,t,r,...o)},this.spliceRow=function(e,t,r){for(var n=arguments.length,o=Array(n>3?n-3:0),i=3;i<n;i++)o[i-3]=arguments[i];return s.spliceRow(e,t,r,...o)},this.getSelected=function(){if(A.isSelected())return J(A.getSelectedRange().ranges,e=>{let{from:t,to:r}=e;return[t.row,t.col,r.row,r.col]})},this.getSelectedLast=function(){let e,t=g.getSelected();return t&&t.length>0&&(e=t[t.length-1]),e},this.getSelectedActive=function(){let e=g.getSelectedRangeActive();if(!e)return;let{from:t,to:r}=e;return[t.row,t.col,r.row,r.col]},this.getSelectedRange=function(){if(A.isSelected())return Array.from(A.getSelectedRange())},this.getSelectedRangeLast=function(){let e,t=g.getSelectedRange();return t&&t.length>0&&(e=t[t.length-1]),e},this.getSelectedRangeActive=function(){return A.getActiveSelectedRange()},this.getActiveSelectionLayerIndex=function(){return A.getActiveSelectionLayerIndex()},this.emptySelectedCells=function(e){if(!A.isSelected()||0===this.countRows()||0===this.countCols())return;let t=[];ee(A.getSelectedRange(),e=>{if(e.isSingleHeader())return;let r=e.getTopStartCorner(),n=e.getBottomEndCorner(),o=Math.max(r.row,0),i=Math.min(n.row,this.countRows()-1),s=Math.max(r.col,0),a=Math.min(n.col,this.countCols()-1);if(o>i||s>a)return;let l=e=>{nk(s,a,r=>{this.getCellMeta(e,r).readOnly||t.push([e,r,null])})};nk(o,i,l)}),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||g.view.render()},this.render=function(){this.view&&(this.forceFullRender=!0,this.isRenderSuspended()||g.view.render())},this.batchRender=function(e){g.suspendRender();let t=e();return g.resumeRender(),t},this.isExecutionSuspended=function(){return this.executionSuspendedCounter>0},this.suspendExecution=function(){this.executionSuspendedCounter+=1,this.columnIndexMapper.suspendOperations(),this.rowIndexMapper.suspendOperations()},this.resumeExecution=function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=this.executionSuspendedCounter-1;this.executionSuspendedCounter=Math.max(t,0),(!this.isExecutionSuspended()&&t===this.executionSuspendedCounter||e)&&(this.columnIndexMapper.resumeOperations(),this.rowIndexMapper.resumeOperations())},this.batchExecution=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];g.suspendExecution();let r=e();return g.resumeExecution(t),r},this.batch=function(e){g.suspendRender(),g.suspendExecution();let t=e();return g.resumeExecution(),g.resumeRender(),t},this.refreshDimensions=function(){if(!g.view)return;let e=g.view,{width:t,height:r}=e.getLastSize(),{width:n,height:o}=g.rootElement.getBoundingClientRect(),i=n!==t||o!==r;!1!==g.runHooks("beforeRefreshDimensions",{width:t,height:r},{width:n,height:o},i)&&((i||e._wt.wtOverlays.scrollableElement===g.rootWindow)&&(e.setLastSize(n,o),e.adjustElementsSize(),g.render()),g.runHooks("afterRefreshDimensions",{width:t,height:r},{width:n,height:o},i))},this.updateData=function(e,t){l4(e,e=>{s=e},e=>{s=e,g.columnIndexMapper.fitToLength(this.getInitialColumnCount()),g.rowIndexMapper.fitToLength(this.countSourceRows()),l.adjustRowsAndCols(),A.markSource("updateData"),A.refresh(),A.markEndSource()},{hotInstance:g,dataMap:s,dataSource:a,internalSource:"updateData",source:t,metaManager:w,firstRun:m})},this.loadData=function(e,t){l4(e,e=>{s=e},()=>{w.clearCellsCache(),g.initIndexMappers(),l.adjustRowsAndCols(),A.markSource("loadData"),A.refresh(),A.markEndSource(),m&&(m=[null,"loadData"])},{hotInstance:g,dataMap:s,dataSource:a,internalSource:"loadData",source:t,metaManager:w,firstRun:m})},this.getInitialColumnCount=function(){let e=S.columns,t=0;if(Array.isArray(e))t=e.length;else if(rL(e))if("array"===g.dataType){let r=g.countSourceCols();for(let n=0;n<r;n+=1)e(n)&&(t+=1)}else("object"===g.dataType||"function"===g.dataType)&&(t=s.colToPropCache.length);else if(ep(S.dataSchema)){let e=s.getSchema();t=Array.isArray(e)?e.length:eW(e)}else t=g.countSourceCols();return t},this.initIndexMappers=function(){this.columnIndexMapper.initToLength(this.getInitialColumnCount()),this.rowIndexMapper.initToLength(this.countSourceRows())},this.getData=function(e,t,r,n){return em(e)?s.getAll():s.getRange(g._createCellCoords(e,t),g._createCellCoords(r,n),l1.DESTINATION_RENDERER)},this.getCopyableText=function(e,t,r,n){return s.getCopyableText(g._createCellCoords(e,t),g._createCellCoords(r,n))},this.getCopyableData=function(e,t){return s.getCopyable(e,s.colToProp(t))},this.getCopyableSourceData=function(e,t){return a.getCopyable(e,s.colToProp(t))},this.getSchema=function(){return s.getSchema()},this.updateSettings=function(e){var t;let r,n,o,i=arguments.length>1&&void 0!==arguments[1]&&arguments[1],a=(m?g.loadData:g.updateData).bind(this);for(n in ep(e.rows)&&eN('The "rows" setting is no longer supported. Do you mean startRows, minRows or maxRows?'),ep(e.cols)&&eN('The "cols" setting is no longer supported. Do you mean startCols, minCols or maxCols?'),ep(e.ganttChart)&&eN('Since 8.0.0 the "ganttChart" setting is no longer supported.'),ep(e.rowHeights)&&ep(e.minRowHeights)&&tR("Both `rowHeights` and `minRowHeights` are defined in your configuration. As one is the alias of the other, only one of them can be used at a time. `rowHeights` will be used as the row height configuration."),e)if("data"===n||"language"===n);else if("className"===n)N("className",e.className);else if("tableClassName"===n&&g.table)N("tableClassName",e.tableClassName),g.view._wt.wtOverlays.syncOverlayTableClassNames();else if(r8.getSingleton().isRegistered(n)||r8.getSingleton().isDeprecated(n)){let t=e[n];rL(t)?(r8.getSingleton().addAsFixed(n,t,g),S[n]=t):Array.isArray(t)&&(r8.getSingleton().add(n,t,g),S[n]=t)}else!i&&e$(e,n)&&(R[n]=e[n]);let h=hO(g.rootContainer),d=e$(e,"themeName"),u=e$(e,"theme");if(d&&u&&tR("Both `theme` and `themeName` are defined in your configuration. These options are aliases and cannot be used together. The `themeName` option will be ignored."),i){let t;u&&"string"==typeof e.theme?t=e.theme:d&&"string"==typeof e.themeName&&e.themeName&&!u?(t=e.themeName,S.theme=e.themeName,S.themeName=void 0):h?t=h:g.themeManager&&(t=g.themeManager.getClassName()),g.useTheme(t??null)}else{let t=g.getCurrentThemeName();if(u&&"string"==typeof e.theme&&t!==e.theme)g.themeManager?.unmount(),g.themeManager=null,g.useTheme(e.theme);else if(d&&!u&&t!==e.themeName)g.themeManager?.unmount(),g.themeManager=null,S.theme=e.themeName,S.themeName=void 0,g.useTheme(e.themeName);else if(iT(g)&&!h&&eF(e.theme))if(null===g.themeManager)I(e.theme),g.useTheme(g.themeManager.getClassName());else{let t;t="function"!=typeof e.theme.getThemeConfig?du(e.theme):e.theme,g.themeManager.update(t),g.useTheme(g.themeManager.getClassName())}}!0===g.runHooks("hasExternalDataSource")?(e.data&&tR('The "data" setting is ignored when "hasExternalDataSource" returns `true`.'),i||e$(e,"data")||e$(e,"dataProvider")?a([],"updateSettings"):void 0!==e.columns&&(s.createMap(),g.initIndexMappers())):void 0===e.data&&void 0===S.data?a(null,"updateSettings"):void 0!==e.data?a(e.data,"updateSettings"):void 0!==e.columns&&(s.createMap(),g.initIndexMappers()),!m&&e.language&&(a8(r=i9(t=e.language))?(g.runHooks("beforeLanguageChange",r),R.language=r,g.runHooks("afterLanguageChange",r)):i7(t));let c=g.countCols(),p=S.columns;if(void 0!==e.cell||void 0!==e.cells||void 0!==e.columns){let e=w.getUserDefinedCellMetas();w.clearCache(),e.forEach(e=>{let{physicalRow:t,physicalColumn:r,key:n,value:o}=e;w.setCellMeta(t,r,n,o)})}if(c>0)for(n=0,o=0;n<c;n++){if(p){let e=rL(p)?p(n):p[o];e&&w.updateColumnMeta(o,e)}o+=1}if(ep(e.cell)){w.disableUserDefinedMetaRecording();try{e.cell.forEach(e=>{g.setCellMetaObject(e.row,e.col,e)})}finally{w.enableUserDefinedMetaRecording()}}g.runHooks("afterCellMetaReset"),m&&l6(g,"init");let f=g.rootElement.style.height;""!==f&&(f=parseInt(g.rootElement.style.height,10)),i&&g.rootElement.getAttribute("style")&&(g.rootElement.dataset.initialstyle=g.rootElement.getAttribute("style")??"");let C=e.height;if(void 0!==e.height)if(rL(C)&&(C=C()),null===(C=g.runHooks("beforeHeightChange",C))){let e=g.rootElement.dataset.initialstyle;e&&(e.indexOf("height")>-1||e.indexOf("overflow")>-1)?g.rootElement.setAttribute("style",e):(g.rootElement.style.height="",g.rootElement.style.overflow="")}else void 0!==C&&(g.rootElement.style.height=isNaN(C)?`${C}`:`${C}px`,g.rootElement.style.overflow="clip");if(void 0!==e.width){let t=e.width;rL(t)&&(t=t()),t=g.runHooks("beforeWidthChange",t),g.rootElement.style.width=isNaN(t)?`${t}`:`${t}px`}if(void 0!==e.height||void 0!==e.width){let e=g.rootElement.style.height,t=g.rootElement.style.width;if(!e){let e=g.rootElement.style.overflowX;(""===e||"clip"===e)&&(g.rootElement.style.overflowX=t&&"auto"!==t?"clip":"")}}i||(g.view&&(g.view._wt.wtViewport.resetHasOversizedColumnHeadersMarked(),g.view._wt.exportSettingsAsClassNames(),g.view.invalidateIndexSizesCache()),A.updateHighlightClassNames(),g.runHooks("afterUpdateSettings",e)),l.adjustRowsAndCols(),g.view&&!m&&(g.render(),g.view._wt.wtOverlays.adjustElementsSize()),!i&&g.view&&(""===f||""===C||void 0===C)&&f!==C&&g.view._wt.wtOverlays.updateMainScrollableElements(),iT(g)&&V?.applyConfig(S.layout)},this.getValue=function(){let e=g.getSelectedRangeActive();if(S.getValue){if(rL(S.getValue))return S.getValue.call(g);else if(e&&"string"==typeof S.getValue){let t=e.highlight.row??0;return g.getData()[t][S.getValue]}}else if(e)return g.getDataAtCell(e.highlight.row,e.highlight.col);return null},this.getSettings=function(){return S},this.clear=function(){this.selectAll(),this.emptySelectedCells(),this.deselectCell()},this.alter=function(e,t,r,n,o){l.alter(e,t,r,n,o)},this.getCell=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=t,o=e;if(t>=0){if(g.columnIndexMapper.isHidden(g.toPhysicalColumn(t)))return null;n=g.columnIndexMapper.getRenderableFromVisualIndex(t)}if(e>=0){if(g.rowIndexMapper.isHidden(g.toPhysicalRow(e)))return null;o=g.rowIndexMapper.getRenderableFromVisualIndex(e)}return null===o||null===n||void 0===o||void 0===n?null:g.view.getCellAtCoords(g._createCellCoords(o,n),r)},this.getCoords=function(e){let t=g.view._wt.wtTable.getCoords(e);if(null===t)return null;let{row:r,col:n}=t,o=r,i=n;return null!==r&&r>=0&&(o=g.rowIndexMapper.getVisualFromRenderableIndex(r)),null!==n&&n>=0&&(i=g.columnIndexMapper.getVisualFromRenderableIndex(n)),g._createCellCoords(o,i)},this.colToProp=function(e){return s.colToProp(e)},this.propToCol=function(e){return s.propToCol(e)},this.toVisualRow=e=>g.rowIndexMapper.getVisualFromPhysicalIndex(e),this.toVisualColumn=e=>g.columnIndexMapper.getVisualFromPhysicalIndex(e),this.toPhysicalRow=e=>g.rowIndexMapper.getPhysicalFromVisualIndex(e),this.toPhysicalColumn=e=>g.columnIndexMapper.getPhysicalFromVisualIndex(e),this.getDataAtCell=function(e,t){return s.get(e,s.colToProp(t))},this.getDataAtRowProp=function(e,t){return s.get(e,t)},this.getDataAtCol=function(e){let t=[],r=s.getRange(g._createCellCoords(0,e),g._createCellCoords(S.data.length-1,e),l1.DESTINATION_RENDERER);for(let e=0;e<r.length;e+=1)for(let n=0;n<r[e].length;n+=1)t.push(r[e][n]);return t},this.getDataAtProp=function(e){let t=[],r=s.getRange(g._createCellCoords(0,s.propToCol(e)),g._createCellCoords(S.data.length-1,s.propToCol(e)),l1.DESTINATION_RENDERER);for(let e=0;e<r.length;e+=1)for(let n=0;n<r[e].length;n+=1)t.push(r[e][n]);return t},this.getSourceData=function(e,t,r,n){return void 0===e?a.getData():a.getByRange(g._createCellCoords(e,t??null),g._createCellCoords(r??null,n??null))},this.getSourceDataArray=function(e,t,r,n){return void 0===e?a.getData(!0):a.getByRange(g._createCellCoords(e,t??null),g._createCellCoords(r??null,n??null),!0)},this.getSourceDataAtCol=function(e){return a.getAtColumn(e)},this.setSourceDataAtCell=function(e,t,r,n){let o=H(e,t,r),i=g.hasHook("afterSetSourceDataAtCell"),s=[],l=(e,t)=>{let r=g.toVisualRow(e),n=g.toVisualColumn(t);return Number.isInteger(n)?g.getCellMeta(r,n):{...Object.getPrototypeOf(S),...S}};i&&ee(o,e=>{let[t,r,n]=e,o=lJ(n,l(t,r));s.push([t,r,a.getAtCell(t,r),o])}),ee(o,e=>{let[t,r,o]=e,i=l(t,r),s=lJ(o,i);(function(e,t,r){let n=t.sourceDataValidator;if(!rL(n)||!0===n(e,t,r))return!0;let{row:o,col:i,sourceDataWarningMessage:s,allowInvalid:a}=t;return s&&l5(s,[{row:o,col:i,value:e}]),!0===a})(s,i,n??"setSourceDataAtCell")&&a.setAtCell(t,r,s)}),i&&this.runHooks("afterSetSourceDataAtCell",s,n),this.render();let h=g.getActiveEditor();h&&ep(h.refreshValue)&&h.refreshValue()},this.getSourceDataAtRow=function(e){return a.getAtRow(e)},this.getSourceDataAtCell=function(e,t){return a.getAtCell(e,t)},this.getDataAtRow=function(e){return s.getRange(g._createCellCoords(e,0),g._createCellCoords(e,this.countCols()-1),l1.DESTINATION_RENDERER)[0]||[]},this.getDataType=function(e,t,r,n){let o=void 0===e?[0,0,g.countRows(),g.countCols()]:[e,t,r,n],[i,s]=o,[,,a,l]=o,h=null,d=null;void 0===a&&(a=i),void 0===l&&(l=s);let u="mixed";return nk(Math.max(Math.min(i,a),0),Math.max(i,a),e=>{let t=!0;return nk(Math.max(Math.min(s,l),0),Math.max(s,l),r=>(d=g.getCellMeta(e,r).type??null,h?t=h===d:h=d,t)),u=t?d??"mixed":"mixed",t}),u},this.removeCellMeta=function(e,t,r){let[n,o]=[g.toPhysicalRow(e),g.toPhysicalColumn(t)],i=w.getCellMetaKeyValue(n,o,r);!1!==g.runHooks("beforeRemoveCellMeta",e,t,r,i)&&(w.removeCellMeta(n,o,r),g.runHooks("afterRemoveCellMeta",e,t,r,i))},this.spliceCellsMeta=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;for(var r=arguments.length,n=Array(r>2?r-2:0),o=2;o<r;o++)n[o-2]=arguments[o];n.length>0&&!Array.isArray(n[0])&&eN("The 3rd argument (cellMetaRows) has to be passed as an array of cell meta objects array."),t>0&&w.removeRow(g.toPhysicalRow(e),t),n.length>0&&ee(n.reverse(),t=>{w.createRow(g.toPhysicalRow(e)),ee(t,(t,r)=>{this.setCellMetaObject(e,r,t)})}),g.render()},this.setCellMetaObject=function(e,t,r){"object"==typeof r&&eB(r,(r,n)=>{this.setCellMeta(e,t,n,r)})},this.setCellMeta=function(e,t,r,n){if(!1===g.runHooks("beforeSetCellMeta",e,t,r,n))return;let o=e,i=t;e<g.countRows()&&(o=g.toPhysicalRow(e)),t<g.countCols()&&(i=g.toPhysicalColumn(t)),w.setCellMeta(o,i,r,n),g.runHooks("afterSetCellMeta",e,t,r,n)},this.getCellsMeta=function(){return w.getCellsMeta()},this.getCellMeta=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{skipMetaExtension:!1},n=g.toPhysicalRow(e),o=g.toPhysicalColumn(t);return null===n&&(n=e),null===o&&(o=t),w.getCellMeta(n,o,{visualRow:e,visualColumn:t,...r})},this.getColumnMeta=function(e){return w.getColumnMeta(g.toPhysicalColumn(e))},this.getCellMetaAtRow=function(e){return w.getCellsMetaAtRow(e)},this.isColumnModificationAllowed=function(){return!("object"===g.dataType||S.columns)},this.getCellRenderer=function(e,t){let r="number"==typeof e?g.getCellMeta(e,t).renderer:e.renderer;return"string"==typeof r?n2(r):em(r)?n2("text"):r},this.getCellEditor=function(e,t){let r="number"==typeof e?g.getCellMeta(e,t).editor:e.editor;return"string"==typeof r?nc(r):em(r)?nc("text"):r},this.getCellValidator=function(e,t){let r="number"==typeof e?g.getCellMeta(e,t).validator:e.validator;return"string"==typeof r?n8(r):r},this.validateCells=function(e){this._validateCells(e)},this.validateRows=function(e,t){Array.isArray(e)||eN("validateRows parameter `rows` must be an array"),this._validateCells(t,e)},this.validateColumns=function(e,t){Array.isArray(e)||eN("validateColumns parameter `columns` must be an array"),this._validateCells(t,void 0,e)},this._validateCells=function(e,t,r){let n=x();e&&(n.onQueueEmpty=e);let o=g.countRows()-1;for(;o>=0;){if(void 0!==t&&-1===t.indexOf(o)){o-=1;continue}let e=g.countCols()-1;for(;e>=0;){if(void 0!==r&&-1===r.indexOf(e)){e-=1;continue}n.addValidatorToQueue(),g.validateCell(g.getDataAtCell(o,e),g.getCellMeta(o,e),e=>{"boolean"!=typeof e&&eN("Validation error: result is not boolean"),!1===e&&(n.valid=!1),n.removeValidatorFormQueue()},"validateCells"),e-=1}o-=1}n.checkIfQueueIsEmpty()},this.getRowHeader=function(e){let t=S.rowHeaders,r=e;if(void 0!==r&&(r=g.runHooks("modifyRowHeader",r)),void 0===r){let e=[];nk(g.countRows()-1,t=>{e.push(g.getRowHeader(t))}),t=e}else Array.isArray(t)&&void 0!==t[r]?t=t[r]:rL(t)?t=t(r):t&&"string"!=typeof t&&"number"!=typeof t&&(t=r+1);return t},this.hasRowHeaders=function(){return!!S.rowHeaders},this.hasColHeaders=function(){if(void 0!==S.colHeaders&&null!==S.colHeaders)return!!S.colHeaders;for(let e=0,t=g.countCols();e<t;e++)if(g.getColHeader(e))return!0;return!1},this.getColHeader=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1,r=g.runHooks("modifyColHeader",e);if(void 0===r){let e=[],t=g.countCols();for(let r=0;r<t;r++)e.push(g.getColHeader(r));return e}let n=S.colHeaders,o=S.columns,i=g.toPhysicalColumn(r),s=function(e){let t=[],r=g.countCols(),n=0;for(;n<r;n++)rL(o)&&o(n)&&t.push(n);return t[e]}(i);return!1===S.colHeaders?n=null:o&&rL(o)&&o(s)&&o(s).title?n=o(s).title:o&&!rL(o)&&o[i]&&o[i].title?n=o[i].title:Array.isArray(S.colHeaders)&&void 0!==S.colHeaders[i]?n=S.colHeaders[i]:rL(S.colHeaders)?n=S.colHeaders(i):S.colHeaders&&"string"!=typeof S.colHeaders&&"number"!=typeof S.colHeaders&&(n=iI(r)),n=g.runHooks("modifyColumnHeaderValue",n,e,t)},this._getColWidthFromSettings=function(e){let t;if(e>=0&&(t=g.getCellMeta(0,e).width),(void 0===t||t===S.width)&&(t=S.colWidths),null!=t){switch(typeof t){case"object":t=t[e];break;case"function":t=t(e)}"string"==typeof t&&(t=Number.parseInt(t,10))}return t},this.getColWidth=function(e,t){let r=g._getColWidthFromSettings(e);return void 0===(r=g.runHooks("modifyColWidth",r,e,t))&&(r=50),r},this._getRowHeightFromSettings=function(e){let t=g.stylesHandler.getDefaultRowHeight(e),r=S.rowHeights??S.minRowHeights;if(null!=r){switch(typeof r){case"object":r=r[e];break;case"function":r=r(e)}"string"==typeof r&&(r=Number.parseInt(r,10))}let n=r;return null!=n&&null!==t&&n<t?t:n},this.getRowHeight=function(e,t){let r=g._getRowHeightFromSettings(e);return g.runHooks("modifyRowHeight",r,e,t)},this.countSourceRows=function(){return a.countRows()},this.countSourceCols=function(){return a.countFirstRowKeys()},this.countRows=function(){return s.getLength()},this.countCols=function(){return Math.min(S.maxCols,g.columnIndexMapper.getNotTrimmedIndexesLength())},this.countRenderedRows=function(){let e=g.view;return e._wt.drawn?e._wt.wtTable.getRenderedRowsCount():-1},this.countVisibleRows=function(){let e=g.view;return e._wt.drawn?e._wt.wtTable.getVisibleRowsCount():-1},this.countRenderedCols=function(){let e=g.view;return e._wt.drawn?e._wt.wtTable.getRenderedColumnsCount():-1},this.countVisibleCols=function(){let e=g.view;return e._wt.drawn?e._wt.wtTable.getVisibleColumnsCount():-1},this.countRowHeaders=function(){return g.view.getRowHeadersCount()},this.countColHeaders=function(){return g.view.getColumnHeadersCount()},this.countEmptyRows=function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=0;return n_(g.countRows()-1,r=>{if(g.isEmptyRow(r))t+=1;else if(!0===e)return!1}),t},this.countEmptyCols=function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=0;return n_(g.countCols()-1,r=>{if(g.isEmptyCol(r))t+=1;else if(!0===e)return!1}),t},this.isEmptyRow=function(e){return S.isEmptyRow.call(g,e)},this.isEmptyCol=function(e){return S.isEmptyCol.call(g,e)},this.selectCell=function(e,t,r,n){let o=!(arguments.length>4)||void 0===arguments[4]||arguments[4],i=!(arguments.length>5)||void 0===arguments[5]||arguments[5];if(em(e)||em(t))return!1;let s=[[null==e||Number.isNaN(Number(e))?0:Number(e),null==t||"number"==typeof t&&Number.isNaN(t)?0:t,em(r)?void 0:r,em(n)?void 0:n]];return g.selectCells(s,o,i)},this.selectCells=function(){let e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[[]],r=!(arguments.length>1)||void 0===arguments[1]||arguments[1],n=!(arguments.length>2)||void 0===arguments[2]||arguments[2];!1===r&&u.suspend(),!1===n&&d.suspend();try{e=A.selectCells(t)}finally{u.resume(),d.resume()}return e&&n&&g.listen(),e},this.selectColumns=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e,r=arguments.length>2?arguments[2]:void 0;return A.selectColumns(e,t,r)},this.selectRows=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e,r=arguments.length>2?arguments[2]:void 0;return A.selectRows(e,t,r)},this.deselectCell=function(){A.deselect()},this.selectAll=function(){let e=!(arguments.length>0)||void 0===arguments[0]||arguments[0],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e,r=arguments.length>2?arguments[2]:void 0;u.skipNextScrollCycle(),A.selectAll(e,t,r)};let P=(e,t)=>e.getNearestNotHiddenIndex(t,1,!0);this.scrollViewportTo=function(e,t){"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:n,considerHiddenIndexes:o}=e??{},i=r,s=n;if(rL(t)&&this.addHookOnce("afterScroll",t),void 0===o||o){var a,l;let e,t,o,h,d=(a=r,l=n,e=void 0!==a&&Number.isInteger(a)&&a>=0,t=void 0!==l&&Number.isInteger(l)&&l>=0,o=e?P(g.rowIndexMapper,a):void 0,h=t?P(g.columnIndexMapper,l):void 0,null!==o&&null!==h&&{renderableRow:e?g.rowIndexMapper.getRenderableFromVisualIndex(o)??void 0:a,renderableColumn:t?g.columnIndexMapper.getRenderableFromVisualIndex(h)??void 0:l});if(!1===d)return!1;i=d.renderableRow,s=d.renderableColumn}let h=Number.isInteger(i),d=Number.isInteger(s),u=!1;return h&&i>=0&&d&&s>=0?u=g.view.scrollViewport(g._createCellCoords(i,s),e.horizontalSnap,e.verticalSnap):h&&i>=0&&(d&&s<0||!d)?u=g.view.scrollViewportVertically(i,e.verticalSnap):d&&s>=0&&(h&&i<0||!h)&&(u=g.view.scrollViewportHorizontally(s,e.horizontalSnap)),rL(t)&&(u?this.view.render():(this.removeHook("afterScroll",t),this._registerMicrotask(()=>t()))),u},this.scrollToFocusedCell=function(e){if(!g.selection.isSelected())return!1;rL(e)&&g.addHookOnce("afterScroll",e);let{highlight:t}=g.getSelectedRangeActive(),r=g.scrollViewportTo(t.toObject());return r?g.view.render():rL(e)&&(g.removeHook("afterScroll",e),g._registerMicrotask(()=>e())),r},this.destroy=function(){g._clearTimeouts(),g._clearMicrotasks(),g.view&&g.view.destroy(),a&&a.destroy(),a=null,iT(this)&&(0!==hL&&(1===hL&&(hH.remove(),hH=null),hL-=1),this.getFocusScopeManager().destroy(),V?.destroy(),g.themeManager?.destroy()),this.getShortcutManager().destroy(),T.clear(),w.clearCache(),df.delete(this.guid),p.destroy(),h&&h.destroy(),g.rootContainer&&tK(g.rootContainer),g.rootPortalElement&&g.rootPortalElement.remove(),g.batchExecution(()=>{g.rowIndexMapper.destroy(),g.columnIndexMapper.destroy(),E.getItems().forEach(e=>{let[,t]=e;t.destroy()}),E.clear(),g.runHooks("afterDestroy")},!0),r8.getSingleton().destroy(g),eB(g,(e,t,r)=>{var n;rL(e)?r[t]=(n=t,()=>{eN(`The "${n}" method cannot be called because this Handsontable instance has been destroyed`)}):"guid"!==t&&(r[t]=null)}),g.isDestroyed=!0,s&&s.destroy(),s=null,l=null,A=null,h=null,g=null},this.getActiveEditor=function(){return h?.getActiveEditor()},this.getFirstRenderedVisibleRow=function(){return g.view.getFirstRenderedVisibleRow()},this.getLastRenderedVisibleRow=function(){return g.view.getLastRenderedVisibleRow()},this.getFirstRenderedVisibleColumn=function(){return g.view.getFirstRenderedVisibleColumn()},this.getLastRenderedVisibleColumn=function(){return g.view.getLastRenderedVisibleColumn()},this.getFirstFullyVisibleRow=function(){return g.view.getFirstFullyVisibleRow()},this.getLastFullyVisibleRow=function(){return g.view.getLastFullyVisibleRow()},this.getFirstFullyVisibleColumn=function(){return g.view.getFirstFullyVisibleColumn()},this.getLastFullyVisibleColumn=function(){return g.view.getLastFullyVisibleColumn()},this.getFirstPartiallyVisibleRow=function(){return g.view.getFirstPartiallyVisibleRow()},this.getLastPartiallyVisibleRow=function(){return g.view.getLastPartiallyVisibleRow()},this.getFirstPartiallyVisibleColumn=function(){return g.view.getFirstPartiallyVisibleColumn()},this.getLastPartiallyVisibleColumn=function(){return g.view.getLastPartiallyVisibleColumn()},this.getPlugin=function(e){return E.getItem(th(e))},this.getPluginName=function(e){return E.getId(e)},this.getInstance=function(){return g},this.addHook=function(e,t,r){r8.getSingleton().add(e,t,g,r)},this.hasHook=function(e){return r8.getSingleton().has(e,g)||r8.getSingleton().has(e)},this.addHookOnce=function(e,t,r){r8.getSingleton().once(e,t,g,r)},this.removeHook=function(e,t){r8.getSingleton().remove(e,t,g)},this.runHooks=function(e,t,r,n,o,i,s){return r8.getSingleton().run(g,e,t,r,n,o,i,s)},this.getTranslatedPhrase=function(e,t){return ln(S.language,e,t)},this.toHTML=()=>nw(this),this.toTableElement=()=>{let e=g.rootDocument.createElement("div");return e.insertAdjacentHTML("afterbegin",nw(g)),e.firstElementChild},this.timeouts=[],this.useTheme=e=>{let t=!!m;this.stylesHandler.useTheme(e??void 0);let r=this.stylesHandler.getThemeName();!t&&r&&(hO(this.rootContainer)&&(t$(this.rootContainer,/ht-theme-.*/g),tG(this.rootContainer,r)),g.render(),g.scrollViewportTo(0,0)),this.runHooks("afterSetTheme",r,t)},this.getCurrentThemeName=()=>g.stylesHandler.getThemeName()??null,this.getTableHeight=()=>g.rootElement.offsetHeight,this.getTableWidth=()=>g.rootElement.offsetWidth,this._registerTimeout=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=e;return"function"==typeof r&&(r=setTimeout(r,t)),this.timeouts.push(r),r},this._clearTimeouts=function(){ee(this.timeouts,e=>{clearTimeout(e)})},this.microtasks=[],this._registerMicrotask=function(e){let t={cancelled:!1};this.microtasks.push(t),this.rootWindow.queueMicrotask(()=>{t.cancelled||e()})},this._clearMicrotasks=function(){ee(this.microtasks,e=>{e.cancelled=!0}),this.microtasks.length=0},this._getEditorManager=function(){return h},this._getDataSource=function(){return a},this._getMetaManager=function(){return w};let D=(e=>{let{ownerWindow:t,handleEvent:r,beforeKeyDown:n,afterKeyDown:o}=e,i=nz({errorIdExists:e=>`The "${e}" context name is already registered.`}),s="grid",a=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"table",r=hy(e,t);return i.addItem(e,r),r},l=()=>s,h=e=>i.getItem(e),d=!1,u=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:l(),n=hb(r)?r:h(r),o=!1;if(!n?.hasShortcut(t))return o;let i=n?.getShortcuts(t)??[];for(let r=0;r<i.length;r++){let{callback:n,runOnlyIf:s,preventDefault:a,stopPropagation:l,captureCtrl:h,forwardToContext:c}=i[r];if(s?.(e)===!0){if(d=h??!1,o=!1===n(e,t),d=!1,a&&e.preventDefault(),l&&(rQ(e),e.stopPropagation()),o)break;c&&u(e,t,c)}}return o},c=function(e,t,r,n,o){let i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:null,s=e=>{if(!1!==t(e)){if(!1===r(e)||229===e.keyCode||"string"!=typeof e.key||rZ(e))return;let t=hp(e),i=[];hm.includes(t)||(i=hf(e));let s=o(e,[t].concat(i));!s&&(ta()&&i.includes("meta")||!ta()&&i.includes("control"))&&(s=o(e,[t].concat(hf(e,!0)))),n(e);return}if(!1===rL(i)||229===e.keyCode||"string"!=typeof e.key||rZ(e))return;let s=hp(e),a=[];hm.includes(s)||(a=hf(e));let l=i(e,[s].concat(a));!l&&(ta()&&a.includes("meta")||!ta()&&a.includes("control"))&&(l=i(e,[s].concat(hf(e,!0)))),n(e)},a=()=>{hw.releaseAll()};return{mount:()=>{let t=e;for(;t;){let{documentElement:e}=t.document,r=hS.get(e)??0;0===r&&(e.addEventListener("keydown",hv),e.addEventListener("keyup",hR)),hS.set(e,r+1),e.addEventListener("keydown",s),e.addEventListener("blur",a),t=tk(t)}},unmount:()=>{let t=e;for(;t;){let{documentElement:e}=t.document,r=hS.get(e)??0;r<=1?(e.removeEventListener("keydown",hv),e.removeEventListener("keyup",hR),hS.delete(e)):hS.set(e,r-1),e.removeEventListener("keydown",s),e.removeEventListener("blur",a),t=tk(t)}},isPressed:e=>hw.isPressed(e),releasePressedKeys:()=>hw.releaseAll()}}(t,e=>{let t=h(l());return r(e,t?.scope??"table")},n,o,u,(e,t)=>{let r=i.getItems();for(let n=0;n<r.length;n+=1){let[,o]=r[n];if("global"===o.scope&&u(e,t,o))return!0}return!1});return c.mount(),{addContext:a,getActiveContextName:l,getContext:h,getOrCreateContext:function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"table";return h(e)??a(e,t)},setActiveContextName:e=>{i.hasItem(e)||eN(eu`You've tried to activate the "${e}" shortcut context\x20
|
|
196
|
-
that does not exist. Before activation, register the context using the "addContext" method.`),s=e},hasEventShortcut:(e,t)=>{let r=h(e);return!!r&&((e,t)=>{if("string"!=typeof e.key)return[];let r=hp(e),n=hm.includes(r),o=n?[]:hf(e),i=[[r].concat(o)];return!n&&("function"==typeof t&&t()?o.includes("meta"):o.includes("control"))&&i.push([r].concat(hf(e,!0))),i})(t,ta).some(e=>r.hasShortcut(e))},isCtrlPressed:()=>!d&&(c.isPressed("control")||c.isPressed("meta")),releasePressedKeys:()=>c.releasePressedKeys(),destroy:()=>c.unmount()}})({handleEvent:(e,t)=>"global"===t||g.isListening(),beforeKeyDown:e=>g.runHooks("beforeKeyDown",e),afterKeyDown:e=>{this.isDestroyed||g.runHooks("afterDocumentKeyDown",e)},ownerWindow:this.rootWindow});this.addHook("beforeOnCellMouseDown",e=>{!1===e.ctrlKey&&!1===e.metaKey&&D.releasePressedKeys()}),this.getShortcutManager=function(){return D},d=new ht(g);let F=iT(this)?function(e){let t=nz({errorIdExists:e=>`The "${e}" focus scope is already registered.`}),r=e.getShortcutManager(),n=null;function o(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:hn.UNKNOWN;n!==e&&(null!==n&&i(n),(n=e).activate(t),r.setActiveContextName(e.getShortcutsContextName()))}function i(e){s(),n===e&&(n=null,e.deactivate())}function s(){let r=t.getValues(),o=r.filter(e=>e.runOnlyIf()&&"modal"===e.getType());r.forEach(t=>{o.length>0&&o.includes(t)||0===o.length||t.hasContainerDetached()?t.enable():t.disable(),t===n?t.contains(e.rootDocument.activeElement)?t.deactivateFocusCatchers():t.activateFocusCatchers():t.runOnlyIf()?t.activateFocusCatchers():t.deactivateFocusCatchers()})}function a(r,s){if(!r.isConnected||!t1(r))return;let a=t.getValues().filter(e=>e.runOnlyIf()),l=!1;a.forEach(t=>{!l&&t.contains(r)&&(l=!0,s!==hn.UNKNOWN&&e.listen(),o(t,s))}),!l&&n&&(i(n),e.unlisten())}let l=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=!1;function n(e){r||t.onFocus?.(e)}function o(e){t.onClick?.(e)}function i(e){"Tab"===e.key&&t.onTabKeyDown?.(e)}function s(){r=!0}function a(){r=!1}return{mount:()=>{let t=e;for(;t;){let{documentElement:e}=t.document;e.addEventListener("focusin",n),e.addEventListener("click",o),e.addEventListener("keydown",i),e.addEventListener("mousedown",s),e.addEventListener("mouseup",a),t=tk(t)}},unmount:()=>{let t=e;for(;t;){let{documentElement:e}=t.document;e.removeEventListener("focusin",n),e.removeEventListener("click",o),e.removeEventListener("keydown",i),e.removeEventListener("mousedown",s),e.removeEventListener("mouseup",a),t=tk(t)}}}}(e.rootWindow,{onFocus:e=>{a(tx(e),tx(e).dataset.htFocusSource??hn.UNKNOWN)},onClick:e=>{a(tx(e),hn.CLICK)},onTabKeyDown:()=>{s()}});return l.mount(),{getActiveScopeId:function(){return n?t.getId(n):null},registerScope:function(n,o){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};t.hasItem(n)&&eN(`Scope with id "${n}" already registered`);let s=function(e,t){let r,n,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i={shortcutsContextName:"grid",type:hr.INLINE,contains:e=>e===t||t.contains(e),runOnlyIf:()=>!0,enableFocusCatchers:!0,...o},s=!1===i.enableFocusCatchers?null:(r=ho(e,hn.TAB_FROM_ABOVE),n=ho(e,hn.TAB_FROM_BELOW),t.prepend(r),t.append(n),{activate(){r.tabIndex=0,n.tabIndex=0},deactivate(){r.tabIndex=-1,n.tabIndex=-1},destroy(){r.remove(),n.remove()}});return{getType:()=>i.type,hasContainerDetached:()=>!e.rootWrapperElement.contains(t),getShortcutsContextName:()=>i.shortcutsContextName,runOnlyIf:()=>i.runOnlyIf(),contains:e=>i.contains(e),activate:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:hn.UNKNOWN;i.onActivate?.(e)},deactivate:()=>{i.onDeactivate?.()},activateFocusCatchers:()=>{s?.activate()},deactivateFocusCatchers:()=>{s?.deactivate()},enable:()=>{t.removeAttribute("inert")},disable:()=>{t.setAttribute("inert","true")},destroy:()=>{s?.destroy()}}}(e,o,i);t.addItem(n,s),r.getOrCreateContext(s.getShortcutsContextName())},unregisterScope:function(e){t.hasItem(e)||eN(`Scope with id "${e}" not found`),t.getItem(e).destroy(),t.removeItem(e)},activateScope:(e,r)=>(function(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:hn.UNKNOWN;t.hasItem(e)||eN(`Scope with id "${e}" not found`);let n=r??hn.UNKNOWN;o(t.getItem(e),n)})(e,r),deactivateScope:e=>{!t.hasItem(e)&&eN(`Scope with id "${e}" not found`),i(t.getItem(e))},destroy:()=>l.unmount()}}(g):null,V=iT(this)?new hK({top:g.rootSlotTopElement,bottom:g.rootSlotBottomElement}):null;this.getFocusManager=function(){return d},this.getFocusScopeManager=function(){return iT(g)||eN("The FocusScopeManager is only available for the main Handsontable instance."),F},this.getLayoutManager=function(){return iT(g)||eN("The LayoutManager is only available for the main Handsontable instance."),V};let B=f.theme,U=f.themeName,z=hO(g.rootContainer);iT(g)&&!z&&(eF(B)||!B&&!U)&&I(B),nq().forEach(e=>{let t=nK(e);t&&E.addItem(e,new t(this))}),r=g,[hx,hI].forEach(e=>e(r)),iT(this)&&(n=g,[hd].forEach(e=>e(n))),D.setActiveContextName("grid"),r8.getSingleton().run(g,"construct")};lH(dM),n3(dC);let dI=function(e,t){let r=new dN(e,t||{},iE);return r.init(),r};dI.editors={BaseEditor:hA,TextEditor:dT},dI.dom={empty:tK},dI.helper={},dI.Core=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return new dN(e,t,iE)},dI.DefaultSettings=lF(),dI.hooks=r8.getSingleton(),dI.CellCoords=oD,dI.CellRange=oF,dI.packageName="handsontable",dI.buildDate="25/06/2026 07:06:38",dI.version="18.0.0-rc5",dI.languages={dictionaryKeys:w,getLanguageDictionary:lr,getLanguagesDictionaries:function(){return le()},registerLanguageDictionary:lt,getTranslatedPhrase:ln},dI.themes={hasTheme:ds,getTheme:da,getThemeNames:dl,getThemes:dh,registerTheme:du,reinitTheme:dc};let dx="handsontableEditor";class dO extends dT{static get EDITOR_TYPE(){return"handsontable"}isFlippedVertically=!1;isFlippedHorizontally=!1;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.htEditor.deselectCell(),rp(this.TEXTAREA,0,this.TEXTAREA.value.length),this.htEditor.updateSettings({width:this.getTargetDropdownWidth(),height:this.getTargetDropdownHeight()}),this.refreshDimensions(),this.flipDropdownVerticallyIfNeeded(),this.flipDropdownHorizontallyIfNeeded()}close(){this.htEditor&&(this.htEditor.rootElement.style.display="none"),this.removeHooksByKey("beforeKeyDown"),super.close()}prepare(e,t,r,n,o,i){super.prepare(e,t,r,n,o,i);let{hot:s}=this,a=this.setValue.bind(this),l={startRows:0,startCols:0,minRows:0,minCols:0,className:"listbox",copyPaste:!1,autoColumnSize:!1,autoRowSize:!1,readOnly:!0,fillHandle:!1,autoWrapCol:!1,autoWrapRow:!1,ariaTags:!1,themeName:this.hot.getCurrentThemeName(),afterOnCellMouseDown(e,t){if(t.row<0||t.col<0)return;let r=this.getDataAtCell(t.row,t.col);void 0!==r&&a(r),s.destroyEditor()},preventWheel:!0,layoutDirection:this.hot.isRtl()?"rtl":"ltr"};this.cellProperties.handsontable&&eO(l,i.handsontable),this.htOptions=l}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){if(this.htEditor&&this.htEditor.isListening()&&this.hot.listen(),this.htEditor&&this.htEditor.getSelectedActive()){let e=this.htEditor.getValue();void 0!==e&&this.setValue(e)}super.finishEditing(e,t,r)}flipDropdownVerticallyIfNeeded(){let{view:e}=this.hot,t=this.getEditedCellRect();if(!t)return{isFlipped:!1,spaceAbove:0,spaceBelow:0};let r=t.top;e.isVerticallyScrollableByWindow()&&(r=Math.max(r+(e.getTableOffset().top-this.hot.rootWindow.scrollY),0));let n=this.getDropdownHeight(),o=e.getWorkspaceHeight()-r-t.height,i=n>o&&r>o+t.height;return i?this.flipDropdownVertically():this.unflipDropdownVertically(),{isFlipped:i,spaceAbove:r,spaceBelow:o}}flipDropdownVertically(){let e=this.htEditor.rootElement.style;e.position="absolute",e.top=`${-this.getDropdownHeight()}px`,this.isFlippedVertically=!0}unflipDropdownVertically(){let e=this.htEditor.rootElement.style;e.position="absolute",e.top="",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,n=e.getWorkspaceWidth();e.isHorizontallyScrollableByWindow()&&(r=Math.max(r+(e.getTableOffset().left-this.hot.rootWindow.scrollX),0),n=this.hot.rootDocument.documentElement.clientWidth);let o=this.getDropdownWidth(),i=n-r+t.width,s=o>i&&r>i;return s?this.flipDropdownHorizontally():this.unflipDropdownHorizontally(),{isFlipped:s,spaceInlineStart:r,spaceInlineEnd:i}}flipDropdownHorizontally(){let e=this.htEditor.rootElement.style,{width:t}=this.getEditedCellRect()??{width:0};e.position="absolute",e[this.hot.isRtl()?"right":"left"]=`${-(this.getDropdownWidth()-t)}px`,this.isFlippedHorizontally=!0}unflipDropdownHorizontally(){let e=this.htEditor.rootElement.style;e.position="absolute",e[this.hot.isRtl()?"right":"left"]="",this.isFlippedHorizontally=!1}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():r.selectCell(e,0),r.getData().length))return t.preventDefault(),rQ(t),this.hot.listen(),this.TEXTAREA.focus(),!1};e.addShortcuts([{keys:[["ArrowUp"]],callback:e=>{let r,n=this.htEditor;if(!n.getSelectedActive()&&this.isFlippedVertically)r=n.countRows()-1;else if(n.getSelectedActive()){let e=n.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,n=this.htEditor;if(n.getSelectedActive()||this.isFlippedVertically){if(n.getSelectedActive()){let e=n.getSelectedActive();this.isFlippedVertically?r=e[0]+1:this.isFlippedVertically||(r=Math.min(n.countRows()-1,e[0]+1))}}else r=0;return t(r,e)},preventDefault:!1}],{group:dx,relativeToGroup:hh,position:"before"})}unregisterShortcuts(){super.unregisterShortcuts(),this.hot.getShortcutManager().getContext("editor").removeShortcutsByGroup(dx)}}class dk extends dO{static get EDITOR_TYPE(){return"autocomplete"}query=null;strippedChoices=[];rawChoices=[];#t0=this.hot.guid.slice(0,9);getValue(){let e=this.rawChoices.find(e=>{let t=this.stripValueIfNeeded(e);return(this.#t1(t)?t.value:t)===this.TEXTAREA.value});return ep(e)?e:this.TEXTAREA.value}createElements(){super.createElements(),tG(this.htContainer,"autocompleteEditor"),tG(this.htContainer,-1===this.hot.rootWindow.navigator.platform.indexOf("Mac")?"":"htMacScroll"),this.hot.getSettings().ariaTags&&tj(this.TEXTAREA,[["type","text"],["role","combobox"],D("listbox"),["aria-autocomplete","list"]])}prepare(e,t,r,n,o,i){super.prepare(e,t,r,n,o,i),this.hot.getSettings().ariaTags&&tj(this.TEXTAREA,[z("false"),["aria-controls",`${this.#t0}-listbox-${e}-${t}`]]),this.htOptions={...this.htOptions,valueGetter:e=>this.#t1(e)?e.value:e}}open(){super.open();let e=this.cellProperties.trimDropdown,t=this.hot.getSettings().ariaTags,r=Array.isArray(this.cellProperties.source)?this.cellProperties.source:null,n=r?.length,{row:o,col:i}=this;if(this.showEditableElement(),this.focus(),this.addHook("beforeKeyDown",e=>this.onBeforeKeyDown(e)),this.htEditor.addHook("afterScroll",this.#t2),this.htEditor.updateSettings({colWidths:void 0===e||e?[ro(this.TEXTAREA)-2]:void 0,autoColumnSize:!0,renderer:(e,o,i,s,a,l,h)=>{dA(e,o,i,s,a,l,h);let{filteringCaseSensitive:d,allowHtml:u}=this.cellProperties,c=this.cellProperties.locale,g=this.query,p=eg(l);if(u)o.innerHTML=p;else if(p&&g&&g.length>0){let t=!0===d?p.indexOf(g):tS(p,c).indexOf(tS(g,c));if(-1!==t){let r=p.slice(t,t+g.length),{rootDocument:n}=e;o.innerHTML="",o.appendChild(n.createTextNode(p.slice(0,t)));let i=n.createElement("strong");i.textContent=r,o.appendChild(i),o.appendChild(n.createTextNode(p.slice(t+g.length)))}}t&&tj(o,[["role","option"],...r?[["aria-setsize",n??0]]:[],...r?[["aria-posinset",r.indexOf(l)+1]]:[],["id",`${this.htEditor.rootElement.id}_${i}-${s}`]])},afterSelectionEnd:(e,r)=>{if(t){let t=e=>{tj(e,[j()]),tj(this.TEXTAREA,"aria-activedescendant",e.id)},n=this.htEditor.getCell(e,r,!0);null!==n?t(n):this.htEditor.addHookOnce("afterScrollVertically",()=>{let n=this.htEditor.getCell(e,r,!0);null!==n&&t(n)})}}}),t){let e=E();tj(this.htEditor.view._wt.wtOverlays.wtTable.TABLE,e[0],e[1]),tj(this.htEditor.rootElement,[O(),["aria-live","polite"],["aria-relevant","text"],["id",`${this.#t0}-listbox-${o}-${i}`]]),tj(this.TEXTAREA,...z("true"))}this.hot._registerTimeout(()=>{this.queryChoices(this.TEXTAREA.value)})}close(){this.removeHooksByKey("beforeKeyDown"),super.close(),this.hot.getSettings().ariaTags&&tj(this.TEXTAREA,[z("false")])}discardEditor(e){super.discardEditor(e),this.hot.view.render()}queryChoices(e){let t=this.cellProperties.source;this.query=e,"function"==typeof t?t.call(this.cellProperties,e,e=>{this.rawChoices=e,this.updateChoicesList(this.stripValuesIfNeeded(e))}):Array.isArray(t)?(this.rawChoices=t,this.updateChoicesList(this.stripValuesIfNeeded(t))):this.updateChoicesList([])}updateChoicesList(e){let t=rd(this.TEXTAREA),r=ru(this.TEXTAREA),n=this.cellProperties.sortByRelevance,o=this.cellProperties.filter,i=this.stripValueIfNeeded(this.getValue()),s=this.#t1(i)?i.value:i,a=null,l=e;n||(l=l.toSorted((e,t)=>eg(e).localeCompare(eg(t))));let h=[],d=this.cellProperties.locale,u=this.cellProperties.filteringCaseSensitive,c=u?s:tS(String(s),d);for(let e=0;e<l.length;e++){let t=this.#t1(l[e])?tm(eg(l[e].value)):tm(eg(l[e]));if(-1!==(u?t:tS(t,d)).indexOf(String(c))&&(h.push(e),!1===o))break}!1===o?String(i).length>0&&(a=h[0]):a=(l=h.map(e=>l[e])).indexOf(c)>-1?l.indexOf(c):0,this.strippedChoices=l,0===l.length?this.htEditor.rootElement.style.display="none":this.htEditor.rootElement.style.display="",this.htEditor.loadData(X([l])),l.length>0&&(this.updateDropdownDimensions(),this.flipDropdownVerticallyIfNeeded(),this.flipDropdownHorizontallyIfNeeded(),!0===this.cellProperties.strict&&this.highlightBestMatchingChoice(a??void 0)),this.hot.listen(),rp(this.TEXTAREA,t,t===r?void 0:r)}flipDropdownVerticallyIfNeeded(){let e=super.flipDropdownVerticallyIfNeeded(),{isFlipped:t,spaceAbove:r,spaceBelow:n}=e;return this.limitDropdownIfNeeded(t?r:n),e}limitDropdownIfNeeded(e){let t=this.getDropdownHeight();if(t>e){let r=0,n=0,o=0;do r+=n=this.htEditor.stylesHandler.getDefaultRowHeight()??0;while(r<e);o=r-n,this.isFlippedVertically&&(this.htEditor.rootElement.style.top=`${parseInt(this.htEditor.rootElement.style.top,10)+t-o}px`),this.setDropdownHeight(r-n)}}updateDropdownDimensions(){let e=rm(),t=this.getTargetEditorWidth()+e,r=this.getTargetEditorHeight()+e;this.htEditor.updateSettings({width:t,height:r}),this.#t3(),this.htEditor.view._wt.wtTable.alignOverlaysWithTrimmingContainer()}setDropdownHeight(e){this.htEditor.updateSettings({height:e}),this.#t3(),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()}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}=this.cellProperties,r=e=>eg(t?e:tm(String(e)));return e.every(e=>eq(e))?e.map(e=>({key:r(e.key),value:r(e.value)})):e.map(e=>r(e))}#t2=rF(()=>{this.focus()},100);#t3(){this.htEditor.view.hasVerticalScroll()&&this.htEditor.updateSettings({width:this.getTargetEditorWidth()+rf(this.hot.rootDocument)})}#t1(e){return eF(e)&&ep(e.key)&&ep(e.value)}onBeforeKeyDown(e){if(rj(e.keyCode)||e.keyCode===rG.BACKSPACE||e.keyCode===rG.DELETE||e.keyCode===rG.INSERT){let t=10;e.keyCode===rG.C&&(e.ctrlKey||e.metaKey)||(this.isOpened()||(t+=10),this.htEditor&&this.hot._registerTimeout(()=>{this.queryChoices(this.TEXTAREA.value)},t))}}}class d_ extends hA{static get EDITOR_TYPE(){return"checkbox"}beginEditing(e,t){if(t&&"mouseup"===t.type&&"TD"===tx(t).nodeName){let e=this.TD.querySelector('input[type="checkbox"]');tW(e,"htBadValue")||e.click()}}finishEditing(){}init(){}open(){}close(){}getValue(){}setValue(){}focus(){}}let dH=/^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12]\d|3[01])$/;function dL(e){let t=new Date(e);return Number.isNaN(new Date(`${e}T00:00`).getDate())?t:new Date(t.getTime()+6e4*t.getTimezoneOffset())}function dP(e){if(ef(e))return null;if("string"==typeof e&&dH.test(e)){let[t,r,n]=e.split("-").map(Number);return new Date(t,r-1,n)}return null}function dD(e){if("string"!=typeof e||!dH.test(e))return!1;let t=new Date(e);return!Number.isNaN(t.getTime())&&e===t.toISOString().slice(0,10)}let dF=/^([01]\d|2[0-3]):([0-5]\d)(?::([0-5]\d)(?:\.(\d{1,3}))?)?$/;function dV(e){if(ef(e)||"string"!=typeof e)return null;let t=dF.exec(e);if(!t)return null;let r=Number(t[1]),n=Number(t[2]),o=void 0!==t[3]?Number(t[3]):0,i=t[4];return new Date(1970,0,1,r,n,o,void 0!==i?Number(i.padEnd(3,"0").slice(0,3)):0)}function dB(e){return"string"==typeof e&&dF.test(e)}function dU(){let e=new Date;return new Date(e.getFullYear(),e.getMonth(),e.getDate())}function dz(e){let t=dU();return t.setDate(t.getDate()+e),t}function dW(e,t){return e.getFullYear()===t.getFullYear()&&e.getMonth()===t.getMonth()&&e.getDate()===t.getDate()}class dG extends dT{static get EDITOR_TYPE(){return"date"}init(){super.init(),this.hot.addHook("afterSetTheme",(e,t)=>{t||this.close()})}prepare(e,t,r,n,o,i){super.prepare(e,t,r,n,o,i),void 0!==i.datePickerConfig&&tT(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")}setValue(e){if(ef(e)&&(e=this.cellProperties.defaultDate),!dD(e)){tR(eu`DateEditor: value must be in ISO date format ("YYYY-MM-DD")\x20
|
|
195
|
+
}`,this.themeStyles.parentNode!==this.hot.rootWrapperElement&&this.hot.rootWrapperElement.prepend(this.themeStyles)}getClassName(){return this.themeClassName}update(e){this.hot&&(void 0===e.getThemeConfig&&eN('[ThemeManager] The "theme" option must be an instance of ThemeBuilder.'),this.themeConfig=e.getThemeConfig(),this.themeClassName=`ht-theme-${this.themeConfig.name}`,"function"==typeof e.subscribe&&(this.#tD?.(),this.#tD=e.subscribe(e=>{this.hot?.stylesHandler&&(this.themeConfig=e,this.#tF(),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.#tF()}unmount(){this.themeStyles&&this.themeStyles.remove()}destroy(){this.#tD?.(),this.unmount(),this.hot.themeManager=null}}class hq{#g;#tV=new Map;#tB=0;#tU=[];#tz;constructor(e,{itemClass:t=""}={}){this.#g=e,this.#tz=t}getElement(){return this.#g}has(e){return this.#tV.has(e)}add(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,n=this.#tV.get(e),o=n?n.seq:this.#tB;n&&n.element.remove(),this.#tz&&t.classList.add(this.#tz),this.#tV.set(e,{element:t,weight:r,seq:o}),n||(this.#tB+=1),this.#tW()}remove(e){let t=this.#tV.get(e);t&&(this.#tz&&t.element.classList.remove(this.#tz),t.element.remove(),this.#tV.delete(e))}setOrder(e){this.#tU=Array.isArray(e)?e.slice():[],this.#tW()}getOrder(){return this.#tG()}clear(){this.#tV.forEach(e=>e.element.remove()),this.#tV.clear()}#tG(){let e=this.#tU;return Array.from(this.#tV.keys()).sort((t,r)=>{let n=e.indexOf(t),o=e.indexOf(r);if(-1!==n||-1!==o)return(-1===n?1/0:n)-(-1===o?1/0:o);let i=this.#tV.get(t),s=this.#tV.get(r);return i.weight!==s.weight?i.weight-s.weight:i.seq-s.seq})}#tW(){let e=this.#g.firstChild;this.#tG().forEach(t=>{let r=this.#tV.get(t).element;r===e?e=e.nextSibling:this.#g.insertBefore(r,e)})}}class hK{#t$;constructor(e){this.#t$=new Map(Object.keys(e).map(t=>[t,new hq(e[t],{itemClass:hD})]))}getSlot(e){let t=this.#t$.get(e);return t||eN(`Unknown layout slot "${e}".`),t}register(e,t,r){let{side:n,weight:o=0}=r;this.getSlot(n).add(e,t,o)}unregister(e,t){this.getSlot(t).remove(e)}applyConfig(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};Object.values(hP).forEach(t=>this.getSlot(t).setOrder(e?.[t]??[]))}destroy(){this.#t$.forEach(e=>e.clear())}}let hX={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"},hQ={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"}},hZ=new Set(["name","sizing","density","icons","colors","tokens","colorScheme"]),hJ=new Set(["light","dark","auto"]),h0=new Set(["default","compact","comfortable"]),h1=new Set(["arrowRight","arrowRightWithBar","arrowLeft","arrowLeftWithBar","arrowDown","menu","selectArrow","arrowNarrowUp","arrowNarrowDown","check","checkbox","caretHiddenLeft","caretHiddenRight","caretHiddenUp","caretHiddenDown","collapseOff","collapseOn","radio","chipClose","search"]),h2=new Set(["fontFamily","fontSize","fontSizeSmall","lineHeight","lineHeightSmall","fontWeight","letterSpacing","gapSize","iconSize","tableTransition","borderRadius","borderColor","accentColor","foregroundColor","foregroundSecondaryColor","backgroundColor","backgroundSecondaryColor","placeholderColor","readOnlyColor","disabledColor","shadowColor","shadowX","shadowY","shadowBlur","shadowOpacity","barForegroundColor","barBackgroundColor","barHorizontalPadding","barVerticalPadding","cellHorizontalBorderColor","cellVerticalBorderColor","cellHorizontalPadding","cellVerticalPadding","rowHeaderOddBackgroundColor","rowHeaderEvenBackgroundColor","rowCellOddBackgroundColor","rowCellEvenBackgroundColor","cellEditorBorderWidth","cellEditorBorderColor","cellEditorForegroundColor","cellEditorBackgroundColor","cellEditorShadowBlurRadius","cellEditorShadowColor","cellSuccessBackgroundColor","cellErrorBackgroundColor","cellReadOnlyBackgroundColor","cellSelectionBorderColor","cellSelectionBackgroundColor","cellAutofillSize","cellAutofillHitAreaSize","cellAutofillBorderWidth","cellAutofillBorderRadius","cellAutofillBorderColor","cellAutofillBackgroundColor","cellAutofillFillBorderColor","cellMobileHandleSize","cellMobileHandleBorderWidth","cellMobileHandleBorderRadius","cellMobileHandleBorderColor","cellMobileHandleBackgroundColor","cellMobileHandleBackgroundOpacity","resizeIndicatorColor","moveBacklightColor","moveBacklightOpacity","moveIndicatorColor","hiddenIndicatorColor","scrollbarBorderRadius","scrollbarTrackColor","scrollbarThumbColor","headerFontWeight","headerForegroundColor","headerBackgroundColor","headerHighlightedShadowSize","headerHighlightedForegroundColor","headerHighlightedBackgroundColor","headerActiveBorderColor","headerActiveForegroundColor","headerActiveBackgroundColor","headerFilterBackgroundColor","headerRowForegroundColor","headerRowBackgroundColor","headerRowHighlightedForegroundColor","headerRowHighlightedBackgroundColor","headerRowActiveForegroundColor","headerRowActiveBackgroundColor","checkboxSize","checkboxBorderRadius","checkboxBorderColor","checkboxBackgroundColor","checkboxIconColor","checkboxFocusBorderColor","checkboxFocusBackgroundColor","checkboxFocusIconColor","checkboxFocusRingColor","checkboxDisabledBorderColor","checkboxDisabledBackgroundColor","checkboxDisabledIconColor","checkboxCheckedBorderColor","checkboxCheckedBackgroundColor","checkboxCheckedIconColor","checkboxCheckedFocusBorderColor","checkboxCheckedFocusBackgroundColor","checkboxCheckedFocusIconColor","checkboxCheckedDisabledBorderColor","checkboxCheckedDisabledBackgroundColor","checkboxCheckedDisabledIconColor","checkboxIndeterminateBorderColor","checkboxIndeterminateBackgroundColor","checkboxIndeterminateIconColor","checkboxIndeterminateFocusBorderColor","checkboxIndeterminateFocusBackgroundColor","checkboxIndeterminateFocusIconColor","checkboxIndeterminateDisabledBorderColor","checkboxIndeterminateDisabledBackgroundColor","checkboxIndeterminateDisabledIconColor","radioSize","radioBorderColor","radioBackgroundColor","radioIconColor","radioFocusBorderColor","radioFocusBackgroundColor","radioFocusIconColor","radioFocusRingColor","radioDisabledBorderColor","radioDisabledBackgroundColor","radioDisabledIconColor","radioCheckedBorderColor","radioCheckedBackgroundColor","radioCheckedIconColor","radioCheckedFocusBorderColor","radioCheckedFocusBackgroundColor","radioCheckedFocusIconColor","radioCheckedDisabledBorderColor","radioCheckedDisabledBackgroundColor","radioCheckedDisabledIconColor","iconButtonBorderRadius","iconButtonLargeBorderRadius","iconButtonLargePadding","iconButtonBorderColor","iconButtonBackgroundColor","iconButtonIconColor","iconButtonHitAreaSize","iconButtonHoverBorderColor","iconButtonHoverBackgroundColor","iconButtonHoverIconColor","iconButtonActiveBorderColor","iconButtonActiveBackgroundColor","iconButtonActiveIconColor","iconButtonActiveHoverBorderColor","iconButtonActiveHoverBackgroundColor","iconButtonActiveHoverIconColor","collapseButtonBorderRadius","collapseButtonOpenBorderColor","collapseButtonOpenBackgroundColor","collapseButtonOpenIconColor","collapseButtonOpenIconActiveColor","collapseButtonOpenHoverBorderColor","collapseButtonOpenHoverBackgroundColor","collapseButtonOpenHoverIconColor","collapseButtonOpenHoverIconActiveColor","collapseButtonCloseBorderColor","collapseButtonCloseBackgroundColor","collapseButtonCloseIconColor","collapseButtonCloseIconActiveColor","collapseButtonCloseHoverBorderColor","collapseButtonCloseHoverBackgroundColor","collapseButtonCloseHoverIconColor","collapseButtonCloseHoverIconActiveColor","buttonBorderRadius","buttonHorizontalPadding","buttonVerticalPadding","primaryButtonBorderColor","primaryButtonForegroundColor","primaryButtonBackgroundColor","primaryButtonDisabledBorderColor","primaryButtonDisabledForegroundColor","primaryButtonDisabledBackgroundColor","primaryButtonHoverBorderColor","primaryButtonHoverForegroundColor","primaryButtonHoverBackgroundColor","primaryButtonFocusBorderColor","primaryButtonFocusForegroundColor","primaryButtonFocusBackgroundColor","secondaryButtonBorderColor","secondaryButtonForegroundColor","secondaryButtonBackgroundColor","secondaryButtonDisabledBorderColor","secondaryButtonDisabledForegroundColor","secondaryButtonDisabledBackgroundColor","secondaryButtonHoverBorderColor","secondaryButtonHoverForegroundColor","secondaryButtonHoverBackgroundColor","secondaryButtonFocusBorderColor","secondaryButtonFocusForegroundColor","secondaryButtonFocusBackgroundColor","commentsTextareaHorizontalPadding","commentsTextareaVerticalPadding","commentsTextareaBorderWidth","commentsTextareaBorderColor","commentsTextareaForegroundColor","commentsTextareaBackgroundColor","commentsTextareaFocusBorderWidth","commentsTextareaFocusBorderColor","commentsTextareaFocusForegroundColor","commentsTextareaFocusBackgroundColor","commentsIndicatorSize","commentsIndicatorColor","licenseHorizontalPadding","licenseVerticalPadding","licenseForegroundColor","licenseBackgroundColor","linkColor","linkHoverColor","inputBorderWidth","inputBorderRadius","inputHorizontalPadding","inputVerticalPadding","inputBorderColor","inputForegroundColor","inputBackgroundColor","inputHoverBorderColor","inputHoverForegroundColor","inputHoverBackgroundColor","inputDisabledBorderColor","inputDisabledForegroundColor","inputDisabledBackgroundColor","inputFocusBorderColor","inputFocusForegroundColor","inputFocusBackgroundColor","menuBorderWidth","menuBorderRadius","menuHorizontalPadding","menuVerticalPadding","menuItemHorizontalPadding","menuItemVerticalPadding","menuBorderColor","menuShadowX","menuShadowY","menuShadowBlur","menuShadowColor","menuShadowOpacity","menuItemHoverColor","menuItemHoverColorOpacity","menuItemActiveColor","menuItemActiveColorOpacity","dialogSemiTransparentBackgroundColor","dialogSemiTransparentBackgroundOpacity","dialogSolidBackgroundColor","dialogContentPaddingHorizontal","dialogContentPaddingVertical","dialogContentBorderRadius","dialogContentBackgroundColor","notificationForegroundColor","notificationBackgroundColor","notificationBorderColor","notificationSuccessAccent","notificationWarningAccent","notificationErrorAccent","paginationBarForegroundColor","paginationBarBackgroundColor","paginationBarHorizontalPadding","paginationBarVerticalPadding","paginationButtonBorderColor","paginationButtonForegroundColor","paginationButtonBackgroundColor","paginationButtonHoverBorderColor","paginationButtonHoverForegroundColor","paginationButtonHoverBackgroundColor","paginationButtonDisabledForegroundColor","paginationButtonDisabledBackgroundColor","paginationButtonDisabledBorderColor","paginationButtonFocusBorderColor","paginationButtonFocusForegroundColor","paginationButtonFocusBackgroundColor","chipBackground","chipBorderRadius","chipVerticalPadding","chipHorizontalPadding","chipGap"]);function h3(e){if(!hJ.has(e)){let t=[...hJ].join(", ");eN(`[ThemeBuilder] Invalid color scheme: "${e}". Must be one of: ${t}.`)}return e}function h6(e){if(!h0.has(e)){let t=[...h0].join(", ");eN(`[ThemeBuilder] Invalid density: "${e}". Must be one of: ${t}.`)}return e}function h5(e,t,r){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},{type:o="key",warnMissing:i=!1}=n;if(!e){i&&tR(`[ThemeBuilder] No ${o}s provided in ${r}. All ${o}s are missing.`);return}if(Object.keys(e).forEach(e=>{t.has(e)||tR(`[ThemeBuilder] Unknown ${o} key: "${e}" in ${r}. This may be a custom ${o} or a typo.`)}),i){let n=[];t.forEach(t=>{t in e||n.push(t)}),n.length>0&&tR(`[ThemeBuilder] Missing ${o}(s) in ${r}: ${n.join(", ")}`)}}function h4(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},{requiredFields:n=[]}=r;("object"!=typeof e||null===e)&&eN(`[ThemeBuilder] ${t} must be an object.`);let{name:o,sizing:i,density:s,icons:a,colors:l,tokens:h,colorScheme:d}=e;if(h5(e,hZ,t,{type:"param"}),n.forEach(r=>{void 0===e[r]&&eN(`[ThemeBuilder] ${t}.${r} is required.`)}),void 0!==o&&("string"!=typeof o||""===o.trim())&&eN(`[ThemeBuilder] ${t}.name must be a non-empty string.`),void 0===i||eF(i)||eN(`[ThemeBuilder] ${t}.sizing must be an object.`),void 0!==s){eF(s)||"string"==typeof s||eN(`[ThemeBuilder] ${t}.density must be a string or an object.`);var u=`${t}.density`;if(eF(s)){s.type&&s.sizes||eN(`[ThemeBuilder] ${u} must be a string or an object with a 'type' and 'sizes' property.`),h6(String(s.type));var c=s.sizes,g=`${u}.sizes`;eF(c)&&"object"==typeof c&&null!==c?Object.keys(c).forEach(e=>{h0.has(e)||tR(`[ThemeBuilder] Unknown density size key: "${e}" in ${g}.sizes. This may be a custom density size or a typo.`)}):eN(`[ThemeBuilder] ${g}.sizes must be an object.`)}else"string"==typeof s&&h6(s)}void 0!==a&&(eF(a)||eN(`[ThemeBuilder] ${t}.icons must be an object.`),h5(a,h1,`${t}.icons`,{type:"icon",warnMissing:n.includes("icons")})),void 0!==l&&(eF(l)||eN(`[ThemeBuilder] ${t}.colors must be an object.`),function e(t,r){Object.entries(t).forEach(t=>{let[n,o]=t,i=`${r}.${n}`;"string"!=typeof o&&(eF(o)?e(o,i):eN(`[ThemeBuilder] ${i} must be a string or an object.`))})}(l,`${t}.colors`)),void 0!==h&&(eF(h)||eN(`[ThemeBuilder] ${t}.tokens must be an object.`),h5(h,h2,`${t}.tokens`,{type:"token",warnMissing:n.includes("tokens")})),void 0!==d&&h3(String(d))}let h9=["sizing","icons","colors","tokens"],h7=["name","icons","colors","tokens"];class h8{#tj;#tY;#tq=new Set;#tK="auto";#tX="default";constructor(e){h4(e,"themeConfig",{requiredFields:h7}),this.#tj={name:void 0,sizing:hX,density:{type:this.#tX,sizes:hQ},icons:{},colors:{},tokens:{},colorScheme:this.#tK},this.#tQ(e),this.#tj=this.#tY}#tZ(){let e=this.getThemeConfig();this.#tq.forEach(t=>t(e))}#tJ(e,t){if("string"!=typeof t){let r=eY(e.density,t);e.density=r,void 0!==t.type&&(this.#tX=t.type,this.#tj?.density&&(this.#tj.density.type=t.type))}else e.density.type=t,this.#tX=t,this.#tj?.density&&(this.#tj.density.type=t)}#tQ(e){let t=e_(this.#tj);void 0!==e.name&&(void 0!==this.#tj.name?tR('[ThemeBuilder] The "name" property can only be set during `registerTheme()` and cannot be updated via `params()`.'):t.name=e.name),h9.forEach(r=>{void 0!==e[r]&&eF(e[r])&&(t[r]=eY(t[r],e[r]))}),void 0!==e.density&&this.#tJ(t,e.density),void 0!==e.colorScheme&&(t.colorScheme=e.colorScheme,this.#tK=e.colorScheme,this.#tj?.colorScheme&&(this.#tj.colorScheme=e.colorScheme)),this.#tY=t}subscribe(e){return"function"!=typeof e&&eN("[ThemeBuilder] listener must be a function."),this.#tq.add(e),()=>this.#tq.delete(e)}params(e){return h4(e,"params"),this.#tQ(e),this.#tZ(),this}setColorScheme(e){return this.#tK=h3(e),this.#tY.colorScheme=this.#tK,this.#tj.colorScheme=this.#tK,this.#tZ(),this}setDensityType(e){return this.#tX=h6(e),this.#tY.density.type=this.#tX,this.#tj.density.type=this.#tX,this.#tZ(),this}getThemeConfig(){return this.#tY}}let{hasItem:de,getItem:dt,getNames:dr,getValues:dn,register:di}=nr("themes");function ds(e){return de(e)}function da(e){return de(e)?dt(e):void tR(`Theme "${e}" is not registered. Please ensure it is registered before using it.`)}function dl(){return dr()}function dh(){return dn()}function dd(e,t){let r=e,n=e_(t);return"string"==typeof e&&eF(t)?n.name=e:"string"!=typeof e&&eF(e)&&(r=(n=e_(e)).name??""),{themeName:r,themeConfigObject:n}}function du(e,t){let{themeName:r,themeConfigObject:n}=dd(e,t),o=new h8(n);return de(r)?(tR(`Theme "${r}" is already registered. Registration skipped.`),da(r)):(di(r,o),o)}function dc(e,t){let{themeName:r,themeConfigObject:n}=dd(e,t);if(!de(r))return void tR(`Theme "${r}" is not registered. Cannot reinitialize a non-existent theme.`);let o=new h8(n);return di(r,o),o}let dg={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"},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"],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",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%",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.300","colors.palette.400"],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"],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",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"]}},dp=null;function dm(e){if(0===e.length)return[];let t=[...e];return t.sort((e,t)=>{let[r]=e,[n]=t;return r===n?0:r>n?1:-1}),Q(t,(e,t)=>{let[r,n]=t,o=e[e.length-1],[i,s]=o,a=i+s;if(r<=a){let e=Math.max(n-(a-r),0);o[1]+=e}else e.push([r,n]);return e},[t[0]])}let df=new Map;function dC(e,t,r,n,o,i,s){let a=s.ariaTags,l=[],h=[],d=[],u=[];s._isBaseRendererCalled=!0,s.className&&tG(t,s.className),s.readOnly?(l.push(s.readOnlyCellClassName),a&&u.push(W())):a&&d.push(W()[0]),!1===s.valid&&s.invalidCellClassName?(l.push(s.invalidCellClassName),a&&u.push(G())):(h.push(s.invalidCellClassName),a&&d.push(G()[0])),!1===s.wordWrap&&s.noWordWrapClassName&&l.push(s.noWordWrapClassName),ef(i)&&s.placeholder&&l.push(s.placeholderCellClassName),s.textEllipsis&&l.push("htTextEllipsis"),t$(t,h),tG(t,l),tY(t,d),tj(t,u)}function db(e,t,r){e.addEventListener(t,r,!1)}function dy(e,t,r){e.removeEventListener(t,r,!1)}function dw(e){return e.ownerDocument.defaultView.getComputedStyle(e)}function dS(e){let t,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n={minHeight:200,maxHeight:300,minWidth:100,maxWidth:300,textContent:e=>e.value,...r},o=e.body,i=e.createTextNode(""),s=e.createElement("span");function a(){i.textContent=n.textContent(t),s.style.position="absolute",s.style.fontSize=dw(t).fontSize,s.style.fontFamily=dw(t).fontFamily,s.style.whiteSpace="pre",o.appendChild(s);let e=Number.parseInt(dw(t)?.paddingInlineStart||"0",10),r=Number.parseInt(dw(t)?.paddingInlineEnd||"0",10),a=s.clientWidth+e+r+1;o.removeChild(s);let l=t.style;l.height=`${n.minHeight}px`,n.minWidth>a?l.width=`${n.minWidth}px`:a>n.maxWidth?l.width=`${n.maxWidth}px`:l.width=`${a}px`;let h=t.scrollHeight?t.scrollHeight-1:0;n.minHeight>h?l.height=`${n.minHeight}px`:n.maxHeight<h?(l.height=`${n.maxHeight}px`,l.overflowY="visible"):l.height=`${h}px`}function l(){e.defaultView.setTimeout(a,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,r){let o=arguments.length>2&&void 0!==arguments[2]&&arguments[2];t=e;if(r&&r.minHeight){let e=h(r.minHeight,t.clientHeight);void 0!==e&&(n.minHeight=e)}if(r&&r.maxHeight){let e=h(r.maxHeight,t.clientHeight);void 0!==e&&(n.maxHeight=e)}if(r&&r.minWidth){let e=h(r.minWidth,t.clientWidth);void 0!==e&&(n.minWidth=e)}if(r&&r.maxWidth){let e=h(r.maxWidth,t.clientWidth);void 0!==e&&(n.maxWidth=e)}s.firstChild||(s.className="autoResize",s.style.display="inline-block",s.appendChild(i)),"TEXTAREA"===t.nodeName&&(t.style.resize="none",t.style.height=`${n.minHeight}px`,t.style.minWidth=`${n.minWidth}px`,t.style.maxWidth=`${n.maxWidth}px`,t.style.overflowY="hidden"),o&&(db(t,"input",a),db(t,"keydown",l)),a()},resize:a,unObserve(){dy(t,"input",a),dy(t,"keydown",l)}}}function dv(e,t){let r=rd(t),n=t.value.split("\n"),o=r,i=0;for(let t=0;t<n.length;t++){let s=n[t];0!==t&&(i+=n[t-1].length+1);let a=i+s.length;if("home"===e?o=i:"end"===e&&(o=a),r<=a)break}rp(t,o,o)}dC.RENDERER_TYPE="base";let dR="ht_editor_hidden",dE="textEditor";class dT extends hA{static get EDITOR_TYPE(){return"text"}eventManager=new nm(this);autoResize=dS(this.hot.rootDocument);constructor(e){super(e),this.eventManager=new nm(this),this.createElements(),this.bindEvents(),this.hot.addHookOnce("afterDestroy",()=>this.destroy())}getValue(){return this.TEXTAREA.value}setValue(e){this.TEXTAREA.value=e}open(){this._opened=!0,this.refreshDimensions(),this.showEditableElement(),this.hot.getShortcutManager().setActiveContextName("editor"),this.registerShortcuts()}close(){this._opened=!1,this.autoResize.unObserve(),tI(this.hot.rootDocument.activeElement,this.hot.rootElement)&&this.hot.listen(),this.hideEditableElement(),this.unregisterShortcuts()}prepare(e,t,r,n,o,i){let s=this.state;if(super.prepare(e,t,r,n,o,i),!i.readOnly){this.refreshDimensions(!0);let{allowInvalid:e}=i;e&&!this.isOpened()&&(this.TEXTAREA.value=""),s===hT.FINISHED||this.isOpened()||this.hideEditableElement()}}beginEditing(e,t){this.state===hT.VIRGIN&&(this.TEXTAREA.value="",super.beginEditing(e,t))}focus(){this.TEXTAREA.select(),rp(this.TEXTAREA,this.TEXTAREA.value.length,this.TEXTAREA.value.length)}createElements(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"textarea",{rootDocument:t}=this.hot;this.TEXTAREA=t.createElement(e),tj(this.TEXTAREA,[["data-hot-input",""],R(-1)]),tG(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"),tG(this.TEXTAREA_PARENT,"handsontableInputHolder"),tW(this.TEXTAREA_PARENT,this.layerClass)&&t$(this.TEXTAREA_PARENT,this.layerClass),tG(this.TEXTAREA_PARENT,dR),this.textareaParentStyle=this.TEXTAREA_PARENT.style,this.TEXTAREA_PARENT.appendChild(this.TEXTAREA),this.hot.rootElement.appendChild(this.TEXTAREA_PARENT)}hideEditableElement(){tt()&&(this.textareaStyle.textIndent="-99999px"),this.textareaStyle.overflowY="visible",this.textareaParentStyle.opacity="0",this.textareaParentStyle.height="1px",t$(this.TEXTAREA_PARENT,this.layerClass),tG(this.TEXTAREA_PARENT,dR)}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;nk(e.length-1,r=>{if(tW(e[r],"handsontableEditor"))return t=!0,!1}),tW(this.TEXTAREA_PARENT,dR)&&t$(this.TEXTAREA_PARENT,dR),t?this.layerClass="ht_editor_visible":this.layerClass=this.getEditedCellsLayerClass(),tG(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.refreshDimensions()}refreshDimensions(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(this.state!==hT.EDITING&&!e)return;if(this.TD=this.getEditedCell(),!this.TD){e||this.close();return}let t=this.getEditedCellRect();if(!t)return;let{top:r,start:n,width:o,maxWidth:i,height:s,maxHeight:a}=t;this.textareaParentStyle.top=`${r}px`,this.textareaParentStyle[this.hot.isRtl()?"right":"left"]=`${n}px`,this.showEditableElement();let l=this.hot.rootWindow.getComputedStyle(this.TD);this.TEXTAREA.style.fontSize=l.fontSize,this.TEXTAREA.style.fontFamily=l.fontFamily,this.TEXTAREA.style.backgroundColor=this.TD.style.backgroundColor,this.autoResize.init(this.TEXTAREA,{minWidth:Math.min(o,i),minHeight:Math.min(s,a),maxWidth:i,maxHeight:a},!0)}bindEvents(){to()&&this.eventManager.addEventListener(this.TEXTAREA,"focusout",()=>this.finishEditing(!1)),this.addHook("afterScrollHorizontally",()=>this.refreshDimensions()),this.addHook("afterScrollVertically",()=>this.refreshDimensions()),this.addHook("afterColumnResize",()=>{this.refreshDimensions(),this.state===hT.EDITING&&this.focus()}),this.addHook("afterRowResize",()=>{this.refreshDimensions(),this.state===hT.EDITING&&this.focus()})}destroy(){this.eventManager.destroy(),this.clearHooks()}registerShortcuts(){let e=this.hot.getShortcutManager().getContext("editor"),t=()=>{this.hot.rootDocument.execCommand("insertText",!1,"\n")};e.addShortcuts([{keys:[["Control","Enter"]],callback:()=>(t(),!1),runOnlyIf:e=>!this.hot.selection.isMultiple()&&!e?.altKey},{keys:[["Meta","Enter"]],callback:()=>(t(),!1),runOnlyIf:()=>!this.hot.selection.isMultiple()},{keys:[["Alt","Enter"]],callback:()=>(t(),!1)},{keys:[["Home"]],callback:(e,t)=>{dv(t?.[0]??"",this.TEXTAREA)}},{keys:[["End"]],callback:(e,t)=>{dv(t?.[0]??"",this.TEXTAREA)}}],{runOnlyIf:()=>ep(this.hot.getSelected()),group:dE})}unregisterShortcuts(){this.hot.getShortcutManager().getContext("editor").removeShortcutsByGroup(dE)}}function dA(e,t,r,n,o,i,s){let a=i;ef(a)&&s.placeholder&&(a=s.placeholder);let l=eg(a),h=l;s.trimWhitespace&&(h=l.trim()),t0(t,h)}dA.RENDERER_TYPE="text";let dM={CELL_TYPE:"text",editor:dT,renderer:dA},dN=function(e,t){var r,n,o;let i,s,a,l,h,d,u,c=arguments.length>2&&void 0!==arguments[2]&&arguments[2],g=this,p=new nm(g),m=!0,f={...t.initialState,...t};c===iE&&iR.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=iT(this)?e.ownerDocument.createElement("div"):e,this.rootDocument=e.ownerDocument,this.rootWindow=this.rootDocument.defaultView,iT(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"),tG(this.rootElement,["ht-wrapper","handsontable"]),tG(this.rootWrapperElement,"ht-root-wrapper"),tG(this.rootSlotTopElement,"ht-slot-top"),tG(this.rootGridElement,"ht-grid"),tG(this.rootGridContentElement,"ht-grid-content"),tG(this.rootOverlaysElement,"ht-overlay"),tG(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,tG(this.rootPortalElement,"ht-portal"),this.rootDocument.body.appendChild(this.rootPortalElement)),this.isDestroyed=!1,this.renderSuspendedCounter=0,this.executionSuspendedCounter=0;let C=f?.layoutDirection??"inherit",b=["rtl","ltr"].includes(C)?C:this.rootWindow.getComputedStyle(this.rootElement).direction;this.rootElement.setAttribute("dir",b),this.rootWrapperElement?.setAttribute("dir",b),this.isRtl=function(){return"rtl"===b},this.isLtr=function(){return!g.isRtl()},this.getDirectionFactor=function(){return g.isLtr()?1:-1},this.stylesHandler=new h_({hot:g,rootElement:g.rootElement,rootDocument:g.rootDocument,onThemeChange:e=>{iT(this)&&(t$(this.rootWrapperElement,/ht-theme-.*/g),t$(this.rootPortalElement,/ht-theme-.*/g),e&&(tG(this.rootWrapperElement,e),tG(this.rootPortalElement,e),getComputedStyle(this.rootWrapperElement).getPropertyValue("--ht-line-height")||tR(`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:"boolean"!=typeof t?.injectCoreCss||t.injectCoreCss}),this.themeManager=null,a8(i=i9(o=f.language))||(i=a4,i7(o)),f.language=i;let y=Object.fromEntries(Object.entries(f).filter(e=>{let[t]=e;return!(r8.getSingleton().isRegistered(t)||r8.getSingleton().isDeprecated(t))})),w=new l$(g,y,[lj,lY]),S=w.getTableMeta(),R=w.getGlobalMeta(),E=nz();this.container=this.rootDocument.createElement("div"),this.rootElement.insertBefore(this.container,this.rootElement.firstChild),this.guid=`ht_${tu()}`,df.set(this.guid,this),this.columnIndexMapper=new i4,this.rowIndexMapper=new i4,this.columnIndexMapper.addLocalHook("indexesSequenceChange",e=>{g.runHooks("afterColumnSequenceChange",e)}),this.rowIndexMapper.addLocalHook("indexesSequenceChange",e=>{g.runHooks("afterRowSequenceChange",e)}),p.addEventListener(this.rootDocument.documentElement,"compositionstart",e=>{g.runHooks("beforeCompositionStart",e)}),a=new lq(g);let T=nr(this.guid);T.register("cellRangeMapper",new l9({rowIndexMapper:this.rowIndexMapper,columnIndexMapper:this.columnIndexMapper})),this.rootElement.id&&"ht_"!==this.rootElement.id.substring(0,3)||(this.rootElement.id=this.guid);let A=new lM(S,{rowIndexMapper:g.rowIndexMapper,columnIndexMapper:g.columnIndexMapper,countCols:()=>g.countCols(),countRows:()=>g.countRows(),propToCol:e=>s.propToCol(e),isEditorOpened:()=>{let e=g.getActiveEditor();return!!e&&e.isOpened()},countRenderableColumns:()=>g.view.countRenderableColumns(),countRenderableRows:()=>g.view.countRenderableRows(),countRowHeaders:()=>g.countRowHeaders(),countColHeaders:()=>g.countColHeaders(),countRenderableRowsInRange:(e,t)=>g.view.countRenderableRowsInRange(e,t),countRenderableColumnsInRange:(e,t)=>g.view.countRenderableColumnsInRange(e,t),getShortcutManager:()=>g.getShortcutManager(),createCellCoords:(e,t)=>g._createCellCoords(e,t),createCellRange:(e,t,r)=>g._createCellRange(e,t,r),visualToRenderableCoords:e=>{let{row:t,col:r}=e;return g._createCellCoords(t>=0?g.rowIndexMapper.getRenderableFromVisualIndex(t):t,r>=0?g.columnIndexMapper.getRenderableFromVisualIndex(r):r)},renderableToVisualCoords:e=>{let{row:t,col:r}=e;return g._createCellCoords(t>=0?g.rowIndexMapper.getVisualFromRenderableIndex(t):t,r>=0?g.columnIndexMapper.getVisualFromRenderableIndex(r):r)},findFirstNonHiddenRenderableRow:(e,t)=>{let r=t>e?1:-1,n=Math.min(e,t),o=Math.max(e,t),i=g.rowIndexMapper.getNearestNotHiddenIndex(e,r);return null===i||1===r&&i>o||-1===r&&i<n?null:i>=0?g.rowIndexMapper.getRenderableFromVisualIndex(i):i},findFirstNonHiddenRenderableColumn:(e,t)=>{let r=t>e?1:-1,n=Math.min(e,t),o=Math.max(e,t),i=g.columnIndexMapper.getNearestNotHiddenIndex(e,r);return null===i||1===r&&i>o||-1===r&&i<n?null:i>=0?g.columnIndexMapper.getRenderableFromVisualIndex(i):i},isDisabledCellSelection:(e,t)=>e<0||t<0?g.getSettings().disableVisualSelection:g.getCellMeta(e,t).disableVisualSelection});this.selection=A;let M=e=>{let{hiddenIndexesChanged:t}=e;this.forceFullRender=!0,t&&this.selection.commit()};function N(e,t){let r="className"===e?g.rootElement:g.table;if(m)void 0!==t&&tG(r,t);else{let n=[],o=[];if(R[e]){let t=R[e];n=Array.isArray(t)?t:eh(String(t))}t&&(o=Array.isArray(t)?t:eh(t));let i=es(n,o),s=es(o,n);i.length&&t$(r,i),s.length&&tG(r,s)}R[e]=t}function I(e){let t;void 0===e?(t=de("main")?da("main"):du(dg),t=da("main")):t="function"!=typeof e.getThemeConfig?du(e):e,g.themeManager=function(e){let{hot:t,themeObject:r}=e;return new hY({hot:t,themeObject:r})}({hot:g,themeObject:t})}function x(){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 O(e,t){return!!t?.isOpened()&&iL(e,t.row,t.prop)}function k(e,t,r){if(!e.length)return void r();let n=g.getActiveEditor(),o=x(),i=!0,a=t=>{let[r,n,,o]=t,i=e.findIndex(e=>{let[t,o]=e;return t===r&&o===n});-1!==i&&(e[i][3]=o)},l=(e,t)=>{"string"==typeof t&&t.endsWith("Validator")&&e?.forEach(a)};g.addHook("afterChange",l),o.onQueueEmpty=()=>{g.removeHook("afterChange",l),n&&i&&n._closeAfterDataChange&&O(e,n)&&n.cancelChanges(),r()};for(let r=e.length-1;r>=0;r--){let n,[a,l,,h]=e[r],d=s.propToCol(l);n=Number.isInteger(d)?g.getCellMeta(a,d):{...Object.getPrototypeOf(S),...S},g.getCellValidator(n)&&(o.addValidatorToQueue(),g.validateCell(h,n,function(t,r){return function(n){"boolean"!=typeof n&&eN("Validation error: result is not boolean"),!1===n&&!1===r.allowInvalid&&(i=!1,e.splice(t,1),r.valid=!0),o.removeValidatorFormQueue()}}(r,n),t))}o.checkIfQueueIsEmpty()}function _(e,t){for(let t=e.length-1;t>=0;t--){let r=!1;if(null===e[t]){e.splice(t,1);continue}if(null!==e[t][2]&&void 0!==e[t][2]||null!==e[t][3]&&void 0!==e[t][3]){if(S.allowInsertRow)for(;e[t][0]>g.countRows()-1;){let{delta:e}=s.createRow(void 0,void 0,{source:"auto"});if(0===e){r=!0;break}}if("array"===g.dataType&&(!S.columns||0===S.columns.length)&&S.allowInsertColumn)for(;Number(s.propToCol(e[t][1]))>g.countCols()-1;){let{delta:e}=s.createCol(void 0,void 0,{source:"auto"});if(0===e){r=!0;break}}r||s.set(e[t][0],e[t][1],e[t][3])}}let r=e.length>0,n=h.getActiveEditor(),o=n?._closeAfterDataChange,i=O(e,n);r?(l.adjustRowsAndCols(),g.runHooks("beforeChangeRender",e,t),n?.isOpened()&&o&&i&&h.closeEditor(),g.view.adjustElementsSize(),g.render(),(n?.isOpened()&&o&&i||!n?.isOpened())&&h.prepareEditor(),g.runHooks("afterChange",e,t||"edit"),n&&void 0!==n.refreshValue&&(!n.isOpened()||i)&&n.refreshValue()):g.render()}function H(e,t,r){return Array.isArray(e)?e:[[e,t,r]]}function L(e,t){let r=g.runHooks("beforeChange",e,t||"edit"),n=e.filter(e=>null!==e);if(!1===r||0===n.length)return g.getActiveEditor()?.cancelChanges(),[];for(let e=n.length-1;e>=0;e--){let t,[r,o,,i]=n[e],a=s.propToCol(o);t=Number.isInteger(a)?g.getCellMeta(r,a):{...Object.getPrototypeOf(S),...S},n[e][3]=lJ(i,t)}return n}this.columnIndexMapper.addLocalHook("cacheUpdated",e=>{M(e),this.runHooks("afterColumnSequenceCacheUpdate",e)}),this.rowIndexMapper.addLocalHook("cacheUpdated",e=>{M(e),this.runHooks("afterRowSequenceCacheUpdate",e)}),this.selection.addLocalHook("afterSetRangeEnd",(e,t)=>{let r=eG(!1),n=this.selection.getSelectedRange(),{from:o,to:i}=n.current(),s=n.size()-1;this.runHooks("afterSelection",o.row,o.col,i.row,i.col,r,s),this.runHooks("afterSelectionByProp",o.row,g.colToProp(o.col),i.row,g.colToProp(i.col),r,s);let a=A.getSelectionSource();t&&!["loadData","updateData","deselect","shift"].includes(a)&&(!r.isTouched()||r.isTouched()&&!r.value)&&u.scrollTo(e);let l=A.isSelectedByRowHeader(),d=A.isSelectedByColumnHeader();l&&d?tG(this.rootElement,["ht__selection--rows","ht__selection--columns"]):l?(t$(this.rootElement,"ht__selection--columns"),tG(this.rootElement,"ht__selection--rows")):d?(t$(this.rootElement,"ht__selection--rows"),tG(this.rootElement,"ht__selection--columns")):t$(this.rootElement,["ht__selection--rows","ht__selection--columns"]),["shift","refresh","loadData","updateData","deselect"].includes(a)||h.closeEditor(),["refresh","loadData","updateData","deselect"].includes(a)||(g.view.render(),h.prepareEditor())}),this.selection.addLocalHook("beforeSetFocus",e=>{this.runHooks("beforeSelectionFocusSet",e.row,e.col)}),this.selection.addLocalHook("afterSetFocus",e=>{let t=eG(!1);this.runHooks("afterSelectionFocusSet",e.row,e.col,t),(!t.isTouched()||t.isTouched()&&!t.value)&&u.scrollTo(e),h.closeEditor(),g.view.render(),h.prepareEditor()}),this.selection.addLocalHook("afterSelectionFinished",e=>{let t=e.length-1,{from:r,to:n}=e[t];this.runHooks("afterSelectionEnd",r.row,r.col,n.row,n.col,t),this.runHooks("afterSelectionEndByProp",r.row,g.colToProp(r.col),n.row,g.colToProp(n.col),t),["refresh","deselect"].includes(A.getSelectionSource())&&(g.view.render(),h.prepareEditor())}),this.selection.addLocalHook("afterIsMultipleSelection",e=>{let t=this.runHooks("afterIsMultipleSelection",e.value);e.value&&(e.value=t)}),this.selection.addLocalHook("afterDeselect",()=>{h.closeEditor(),g.view.render(),t$(this.rootElement,["ht__selection--rows","ht__selection--columns"]),this.runHooks("afterDeselect")}),this.selection.addLocalHook("beforeHighlightSet",()=>g.runHooks("beforeSelectionHighlightSet")).addLocalHook("beforeSetRangeStart",function(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return g.runHooks("beforeSetRangeStart",...t)}).addLocalHook("beforeSetRangeStartOnly",function(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return g.runHooks("beforeSetRangeStartOnly",...t)}).addLocalHook("beforeSetRangeEnd",function(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return g.runHooks("beforeSetRangeEnd",...t)}).addLocalHook("beforeSelectColumns",function(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return g.runHooks("beforeSelectColumns",...t)}).addLocalHook("afterSelectColumns",function(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return g.runHooks("afterSelectColumns",...t)}).addLocalHook("beforeSelectRows",function(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return g.runHooks("beforeSelectRows",...t)}).addLocalHook("afterSelectRows",function(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return g.runHooks("afterSelectRows",...t)}).addLocalHook("beforeSelectAll",function(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return g.runHooks("beforeSelectAll",...t)}).addLocalHook("afterSelectAll",function(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return g.runHooks("afterSelectAll",...t)}).addLocalHook("beforeModifyTransformStart",function(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return g.runHooks("modifyTransformStart",...t)}).addLocalHook("afterModifyTransformStart",function(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return g.runHooks("afterModifyTransformStart",...t)}).addLocalHook("beforeModifyTransformFocus",function(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return g.runHooks("modifyTransformFocus",...t)}).addLocalHook("afterModifyTransformFocus",function(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return g.runHooks("afterModifyTransformFocus",...t)}).addLocalHook("beforeModifyTransformEnd",function(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return g.runHooks("modifyTransformEnd",...t)}).addLocalHook("afterModifyTransformEnd",function(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return g.runHooks("afterModifyTransformEnd",...t)}).addLocalHook("beforeRowWrap",function(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return g.runHooks("beforeRowWrap",...t)}).addLocalHook("beforeColumnWrap",function(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return g.runHooks("beforeColumnWrap",...t)}).addLocalHook("insertRowRequire",e=>g.alter("insert_row_above",e,1,"auto")).addLocalHook("insertColRequire",e=>g.alter("insert_col_start",e,1,"auto")),l={alter(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,n=arguments.length>3?arguments[3]:void 0,o=arguments.length>4?arguments[4]:void 0;if(!1!==g.runHooks("beforeAlter",e,t,r,n,o)){var i,a;switch(e){case"insert_row_below":case"insert_row_above":let d=g.countSourceRows();if(S.maxRows===d)return;let u="insert_row_below"===e?"below":"above",c="number"==typeof t?t:"below"===u?d:0,{delta:p,startPhysicalIndex:m}=s.createRow(c,r,{source:n,mode:u});A.shiftRows(g.toVisualRow(m),p);break;case"insert_col_start":case"insert_col_end":let f="insert_col_end"===e?"end":"start",C="end"===f?g.countSourceCols():0,b="number"==typeof t?t:C,{delta:y,startPhysicalIndex:w}=s.createCol(b,r,{source:n,mode:f});if(y){if(Array.isArray(S.colHeaders)){let e=[g.toVisualColumn(w),0];e.length+=y,Array.prototype.splice.apply(S.colHeaders,e)}A.shiftColumns(g.toVisualColumn(w),y)}break;case"remove_row":let R;i=Array.isArray(t)?dm(t):[[t,r]],R=0,ee(i,e=>{let[t,r]=e,o=ef(t)?g.countRows()-1:Math.max(t-R,0);if(Number.isInteger(t)&&(t=Math.max(t-R,0)),!s.removeRow(t,r,n))return;if(A.isSelected()){let{row:e}=g.getSelectedRangeActive().highlight;e>=t&&e<=t+r-1&&h.closeEditor(!0)}let i=g.countRows(),a=S.fixedRowsTop;a>=o+1&&(S.fixedRowsTop-=Math.min(r,a-o));let l=S.fixedRowsBottom;if(l&&o>=i-l&&(S.fixedRowsBottom-=Math.min(r,l)),0===i)A.deselect();else if("ContextMenu.removeRow"===n){let e=A.getSelectedRange(),t=e.pop();e.clear().set(t.from).current().setTo(t.to),A.refresh()}else A.shiftRows(t,-r);R+=r});break;case"remove_col":let E;a=Array.isArray(t)?dm(t):[[t,r]],E=0,ee(a,e=>{let[t,r]=e,o=ef(t)?g.countCols()-1:Math.max(t-E,0),i=g.toPhysicalColumn(o);if(Number.isInteger(t)&&(t=Math.max(t-E,0)),!s.removeCol(t,r,n))return;if(A.isSelected()){let{col:e}=g.getSelectedRangeActive().highlight;e>=t&&e<=t+r-1&&h.closeEditor(!0)}if(0===g.countCols())A.deselect();else if("ContextMenu.removeColumn"===n){let e=A.getSelectedRange(),t=e.pop();e.clear().set(t.from).current().setTo(t.to),A.refresh()}else A.shiftColumns(t,-r);let a=S.fixedColumnsStart;a>=o+1&&(S.fixedColumnsStart-=Math.min(r,a-o)),Array.isArray(S.colHeaders)&&(void 0===i&&(i=-1),S.colHeaders.splice(i,r)),E+=r});break;default:eN(`There is no such action "${e}"`)}o||l.adjustRowsAndCols(),g.view.adjustElementsSize(),g.view.render()}},adjustRowsAndCols(){let e=S.minRows,t=S.minSpareRows,r=S.minCols,n=S.minSpareCols;if(e){let t=g.countRows();t<e&&s.createRow(t,e-t,{source:"auto"})}if(t){let e=g.countEmptyRows(!0);if(e<t){let r=Math.min(t-e,S.maxRows-g.countSourceRows());s.createRow(g.countRows(),r,{source:"auto"})}}{let e=0;(r||n)&&(e=g.countEmptyCols(!0));let t=g.countCols();if(r&&!S.columns&&t<r){let n=r-t;e+=n,s.createCol(t,n,{source:"auto"})}if(n&&!S.columns&&"array"===g.dataType&&e<n){t=g.countCols();let r=Math.min(n-e,S.maxCols-t);s.createCol(t,r,{source:"auto"})}}},populateFromArray(e,t,r,n,o){let i,s,a,l,h,d=[],u={},c=[],p=e.row,m=e.col;if(0===(s=t.length))return!1;let f=0,C=0;switch(eF(r)&&(f=r.col-m+1,C=r.row-p+1),o){case"shift_down":let b=X(t),y=b.length,w=Math.max(y,f),R=g.getData().slice(p),E=X(R).slice(m,m+w);for(a=0;a<w;a+=1)if(a<y){for(i=0,s=b[a].length;i<C-s;i+=1)b[a].push(b[a][i%s]);a<E.length?c.push(b[a].concat(E[a])):c.push(b[a].concat(Array(R.length).fill(null)))}else c.push(b[a%y].concat(E[a]));g.populateFromArray(p,m,X(c));break;case"shift_right":let T=t.length,A=Math.max(T,C),M=g.getData().slice(p).map(e=>e.slice(m));for(i=0;i<A;i+=1)if(i<T){for(a=0,l=t[i].length;a<f-l;a+=1)t[i].push(t[i][a%l]);if(i<M.length)for(let e=0;e<M[i].length;e+=1)t[i].push(M[i][e]);else t[i].push(...Array(M[0].length).fill(null))}else t.push(t[i%s].slice(0,A).concat(M[i]));g.populateFromArray(p,m,t);break;default:u.row=e.row,u.col=e.col;let N=0,I=0,x=!0,O="Autofill.fill"===n||"autofill.fill"===n,k=function(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=t[e%t.length];return null!==r?n[r%n.length]:n},_=t.length,H=r?r.row-e.row+1:0;for(i=0,s=r?H:Math.max(_,H);i<s&&!(r&&u.row>r.row&&H>_||!S.allowInsertRow&&u.row>g.countRows()-1)&&!(u.row>=S.maxRows);i++){let t=i-N,o=O?i:t,c=k(o).length,p=r?r.col-e.col+1:0;if(l=r?p:Math.max(c,p),u.col=e.col,h=g.getCellMeta(u.row,u.col),("CopyPaste.paste"===n||"Autofill.fill"===n||"autofill.fill"===n)&&h.skipRowOnPaste){N+=1,u.row+=1,"CopyPaste.paste"===n&&(s+=1);continue}for(a=0,I=0;a<l&&!(r&&u.col>r.col&&p>c||!S.allowInsertColumn&&u.col>g.countCols()-1)&&!(u.col>=S.maxCols);a++){if(h=g.getCellMeta(u.row,u.col),("CopyPaste.paste"===n||"Autofill.fill"===n||"autofill.fill"===n)&&h.skipColumnOnPaste){I+=1,u.col+=1,"CopyPaste.paste"===n&&(l+=1);continue}if(h.readOnly&&"UndoRedo.undo"!==n){u.col+=1;continue}let e=a-I,t=O?a:e,r=!!h.valueSetter,i=k(o,t),s=g.getSourceDataAtCell(u.row,u.col)??null;if(null!==i&&"object"==typeof i)if(Array.isArray(i)&&null===s&&(s=[]),r||"object"==typeof s&&null!==s){if(null!==s){let e=eI(Array.isArray(s)?s:s[0]||s),t=eI(Array.isArray(i)?i:i[0]||i);r||"edit"===n||eP(e,t)||Array.isArray(e)&&Array.isArray(t)?i=e_(i):x=!1}}else x=!1,h.parsePastedValue&&"CopyPaste.paste"===n&&(x=!0),"edit"===n&&(x=!0,i=e_(i));else r||null===s||"object"!=typeof s||(x=!1);x&&d.push([u.row,u.col,i]),x=!0,u.col+=1}u.row+=1}g.setDataAtCell(d,null,null,n||"populateFromArray")}}},this.init=function(){let e=S.theme,t=S.themeName,r=hO(g.rootContainer);if(iT(g)&&!r&&(eF(e)||!e&&!t)&&I(e),a.setData(S.data),g.runHooks("beforeInit"),(tn()||ti())&&tG(g.rootElement,"mobile"),this.updateSettings(f,!0),this.view=new iA(this),h=nf.getInstance(g,S,A),u=function(e){let{selection:t}=e,r=!1,n=!1;return{resume(){n=!1},suspend(){n=!0},skipNextScrollCycle(){r=!0},scrollTo(o){let i;if(r||n){r=!1;return}t.isFocusSelectionChanged()?i=t=>{e.scrollViewportTo(t.toObject(),()=>{let t=e.getSelectedRangeActive();if(!t)return;let{row:r,col:n}=t.highlight;null!==r&&null!==n&&l7(e.getCell(r,n,!0))})}:t.isSelectedByCorner()?i=()=>{}:t.isSelectedByRowHeader()?i=t=>{let r=l8(e).getComputedRowTarget(t);e.scrollViewportTo({row:r},()=>{let t=!!e.getSettings().rowHeaders;l7(e.getCell(r,t?-1:0,!0))})}:t.isSelectedByColumnHeader()?i=t=>{let r=l8(e).getComputedColumnTarget(t);e.scrollViewportTo({col:r},()=>{let t=!!e.getSettings().colHeaders;l7(e.getCell(t?-1:0,r,!0))})}:1===t.getSelectedRange().size()&&t.isMultiple()?i=t=>{let r=l8(e),n={row:r.getComputedRowTarget(t),col:r.getComputedColumnTarget(t)};e.scrollViewportTo(n,()=>{let{row:t,col:r}=n;l7(e.getCell(t,r,!0))})}:1!==t.getSelectedRange().size()||t.isMultiple()?t.getSelectedRange().size()>1&&(i=t=>{let r=l8(e),n={row:r.getComputedRowTarget(t),col:r.getComputedColumnTarget(t)};e.scrollViewportTo(n,()=>{let{row:t,col:r}=n;l7(e.getCell(t,r,!0))})}):i=t=>{let r=e.selection.getSelectionSource(),{row:n,col:o}=t,i=()=>{l7(e.getCell(n,o,!0))};if(n<0&&o>=0)e.scrollViewportTo({col:o},i);else if(o<0&&n>=0)e.scrollViewportTo({row:n},i);else{if("mouse"===r&&(o===e.view.getLastPartiallyVisibleColumn()||n===e.view.getLastPartiallyVisibleRow()))return;e.scrollViewportTo({row:n,col:o},i)}},i?.(o)}}}(g),d.init(),iT(this)){var n=g.rootPortalElement;let e=n.ownerDocument;if(!hH){(hH=e.createElement("div")).setAttribute("role","status"),hH.setAttribute("aria-live","assertive"),hH.setAttribute("aria-atomic","true");let t=hH.style;t.position="absolute",t.width="1px",t.height="1px",t.margin="-1px",t.overflow="hidden",t.clipPath="rect(0 0 0 0)",t.whiteSpace="nowrap",n.appendChild(hH)}hL+=1,function(e){let t=e.rootSlotBottomElement;if(!t)return;let r=eM({className:hB,key:e.getSettings().licenseKey,element:t,releaseDate:"u">typeof process&&1?"30/06/2026":""});r&&(r.classList.add(hD),t.appendChild(r),e.getFocusScopeManager().registerScope(hF,r,{shortcutsContextName:hV,runOnlyIf:()=>null!==hU(e),onActivate:t=>{let r,n=(r=hU(e))?Array.from(r.querySelectorAll("a[href]")):[];n.length>0&&("tab_from_above"===t?n.at(0)?.focus():"tab_from_below"===t&&n.at(-1)?.focus())}}))}(g);let t={top:-1,bottom:-1};this.addHook("afterRender",()=>{if(g.isDestroyed)return;let{view:e}=g;if(!e)return;let r=e.isHorizontallyScrollableByWindow()?e.getTotalTableWidth():e.getWorkspaceWidth();0===r&&g.rootWrapperElement&&(r=g.rootWrapperElement.offsetWidth),g.rootSlotBottomElement&&r!==t.bottom&&(t.bottom=r,g.rootSlotBottomElement.style.width=`${r}px`),g.rootSlotTopElement&&r!==t.top&&(t.top=r,g.rootSlotTopElement.style.width=`${r}px`)})}g.runHooks("init"),this.render(),m&&null===g.rootElement.offsetParent&&rA(g.rootElement,()=>{g.view._wt.wtOverlays.updateLastSpreaderSize(),g.view.adjustElementsSize(),g.render()}),"object"==typeof m&&(g.runHooks("afterChange",m[0],m[1]),m=!1),g.runHooks("afterInit")},this._createCellCoords=function(e,t){return g.view._wt.createCellCoords(e,t)},this._createCellRange=function(e,t,r){return g.view._wt.createCellRange(e,t,r)},this.validateCell=function(e,t,r,n){var o;let i=g.getCellValidator(t);function s(e){let n=!(arguments.length>1)||void 0===arguments[1]||arguments[1];if(!n||!0===t.hidden)return void r(e);let o=t.visualCol,i=t.visualRow,s=g.getCell(i,o,!0);if(s&&"TH"!==s.nodeName){let e=g.rowIndexMapper.getRenderableFromVisualIndex(i),t=g.columnIndexMapper.getRenderableFromVisualIndex(o);g.view._wt.getSetting("cellRenderer",e,t,s)}r(e)}if(eC(i)&&(o=i,i=function(e,t){t(o.test(e))}),rL(i)){let r=rL(t.prop)?t.visualCol:t.prop;e=g.runHooks("beforeValidate",e,t.visualRow,r,n),g._registerMicrotask(()=>{i.call(t,e,o=>{g&&(o=g.runHooks("afterValidate",o,e,t.visualRow,r,n),t.valid=o,s(o),g.runHooks("postAfterValidate",o,e,t.visualRow,r,n))})})}else g._registerMicrotask(()=>{t.valid=!0,s(t.valid,!1)})},this.setDataAtCell=function(e,t,r,n){let o,i,l,h=H(e,t,r),d=[],u=n;for(o=0,i=h.length;o<i;o++){let[e,t,r]=h[o];"object"!=typeof h[o]&&eN("Method `setDataAtCell` accepts row number or changes array of arrays as its first parameter"),"number"!=typeof h[o][1]&&eN("Method `setDataAtCell` accepts row and column number as its parameters. If you want to use object property name, use method `setDataAtRowProp`");let n="number"==typeof t?t:0;l=n>=this.countCols()?n:s.colToProp(n),d.push([e,l,a.getAtCell(this.toPhysicalRow(e),t),r])}u||"object"!=typeof e||(u=t);let c=L(d,u);g.runHooks("afterSetDataAtCell",c,u),k(c,u,()=>{_(c,u)})},this.setDataAtRowProp=function(e,t,r,n){let o,i,s=H(e,t,r),l=[],h=n;for(o=0,i=s.length;o<i;o++){let[e,t,r]=s[o];l.push([e,t,a.getAtCell(this.toPhysicalRow(e),t),r])}h||"object"!=typeof e||(h=t);let d=L(l,h);g.runHooks("afterSetDataAtRowProp",d,h),k(d,h,()=>{_(d,h)})},this.listen=function(){g&&!g.isListening()&&(df.forEach(e=>{g!==e&&e.unlisten()}),dp=g.guid,g.runHooks("afterListen"))},this.unlisten=function(){this.isListening()&&(dp=null,g.runHooks("afterUnlisten"))},this.isListening=function(){return dp===g.guid},this.destroyEditor=function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=!(arguments.length>1)||void 0===arguments[1]||arguments[1];h.closeEditor(e),g.view.render(),t&&A.isSelected()&&h.prepareEditor()},this.populateFromArray=function(e,t,r,n,o,i,s){("object"!=typeof r||"object"!=typeof r[0])&&eN("populateFromArray parameter `input` must be an array of arrays");let a="number"==typeof n?g._createCellCoords(n,o):void 0;return l.populateFromArray(g._createCellCoords(e,t),r,a,i,s)},this.spliceCol=function(e,t,r){for(var n=arguments.length,o=Array(n>3?n-3:0),i=3;i<n;i++)o[i-3]=arguments[i];return s.spliceCol(e,t,r,...o)},this.spliceRow=function(e,t,r){for(var n=arguments.length,o=Array(n>3?n-3:0),i=3;i<n;i++)o[i-3]=arguments[i];return s.spliceRow(e,t,r,...o)},this.getSelected=function(){if(A.isSelected())return J(A.getSelectedRange().ranges,e=>{let{from:t,to:r}=e;return[t.row,t.col,r.row,r.col]})},this.getSelectedLast=function(){let e,t=g.getSelected();return t&&t.length>0&&(e=t[t.length-1]),e},this.getSelectedActive=function(){let e=g.getSelectedRangeActive();if(!e)return;let{from:t,to:r}=e;return[t.row,t.col,r.row,r.col]},this.getSelectedRange=function(){if(A.isSelected())return Array.from(A.getSelectedRange())},this.getSelectedRangeLast=function(){let e,t=g.getSelectedRange();return t&&t.length>0&&(e=t[t.length-1]),e},this.getSelectedRangeActive=function(){return A.getActiveSelectedRange()},this.getActiveSelectionLayerIndex=function(){return A.getActiveSelectionLayerIndex()},this.emptySelectedCells=function(e){if(!A.isSelected()||0===this.countRows()||0===this.countCols())return;let t=[];ee(A.getSelectedRange(),e=>{if(e.isSingleHeader())return;let r=e.getTopStartCorner(),n=e.getBottomEndCorner(),o=Math.max(r.row,0),i=Math.min(n.row,this.countRows()-1),s=Math.max(r.col,0),a=Math.min(n.col,this.countCols()-1);if(o>i||s>a)return;let l=e=>{nk(s,a,r=>{this.getCellMeta(e,r).readOnly||t.push([e,r,null])})};nk(o,i,l)}),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||g.view.render()},this.render=function(){this.view&&(this.forceFullRender=!0,this.isRenderSuspended()||g.view.render())},this.batchRender=function(e){g.suspendRender();let t=e();return g.resumeRender(),t},this.isExecutionSuspended=function(){return this.executionSuspendedCounter>0},this.suspendExecution=function(){this.executionSuspendedCounter+=1,this.columnIndexMapper.suspendOperations(),this.rowIndexMapper.suspendOperations()},this.resumeExecution=function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=this.executionSuspendedCounter-1;this.executionSuspendedCounter=Math.max(t,0),(!this.isExecutionSuspended()&&t===this.executionSuspendedCounter||e)&&(this.columnIndexMapper.resumeOperations(),this.rowIndexMapper.resumeOperations())},this.batchExecution=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];g.suspendExecution();let r=e();return g.resumeExecution(t),r},this.batch=function(e){g.suspendRender(),g.suspendExecution();let t=e();return g.resumeExecution(),g.resumeRender(),t},this.refreshDimensions=function(){if(!g.view)return;let e=g.view,{width:t,height:r}=e.getLastSize(),{width:n,height:o}=g.rootElement.getBoundingClientRect(),i=n!==t||o!==r;!1!==g.runHooks("beforeRefreshDimensions",{width:t,height:r},{width:n,height:o},i)&&((i||e._wt.wtOverlays.scrollableElement===g.rootWindow)&&(e.setLastSize(n,o),e.adjustElementsSize(),g.render()),g.runHooks("afterRefreshDimensions",{width:t,height:r},{width:n,height:o},i))},this.updateData=function(e,t){l4(e,e=>{s=e},e=>{s=e,g.columnIndexMapper.fitToLength(this.getInitialColumnCount()),g.rowIndexMapper.fitToLength(this.countSourceRows()),l.adjustRowsAndCols(),A.markSource("updateData"),A.refresh(),A.markEndSource()},{hotInstance:g,dataMap:s,dataSource:a,internalSource:"updateData",source:t,metaManager:w,firstRun:m})},this.loadData=function(e,t){l4(e,e=>{s=e},()=>{w.clearCellsCache(),g.initIndexMappers(),l.adjustRowsAndCols(),A.markSource("loadData"),A.refresh(),A.markEndSource(),m&&(m=[null,"loadData"])},{hotInstance:g,dataMap:s,dataSource:a,internalSource:"loadData",source:t,metaManager:w,firstRun:m})},this.getInitialColumnCount=function(){let e=S.columns,t=0;if(Array.isArray(e))t=e.length;else if(rL(e))if("array"===g.dataType){let r=g.countSourceCols();for(let n=0;n<r;n+=1)e(n)&&(t+=1)}else("object"===g.dataType||"function"===g.dataType)&&(t=s.colToPropCache.length);else if(ep(S.dataSchema)){let e=s.getSchema();t=Array.isArray(e)?e.length:eW(e)}else t=g.countSourceCols();return t},this.initIndexMappers=function(){this.columnIndexMapper.initToLength(this.getInitialColumnCount()),this.rowIndexMapper.initToLength(this.countSourceRows())},this.getData=function(e,t,r,n){return em(e)?s.getAll():s.getRange(g._createCellCoords(e,t),g._createCellCoords(r,n),l1.DESTINATION_RENDERER)},this.getCopyableText=function(e,t,r,n){return s.getCopyableText(g._createCellCoords(e,t),g._createCellCoords(r,n))},this.getCopyableData=function(e,t){return s.getCopyable(e,s.colToProp(t))},this.getCopyableSourceData=function(e,t){return a.getCopyable(e,s.colToProp(t))},this.getSchema=function(){return s.getSchema()},this.updateSettings=function(e){var t;let r,n,o,i=arguments.length>1&&void 0!==arguments[1]&&arguments[1],a=(m?g.loadData:g.updateData).bind(this);for(n in ep(e.rows)&&eN('The "rows" setting is no longer supported. Do you mean startRows, minRows or maxRows?'),ep(e.cols)&&eN('The "cols" setting is no longer supported. Do you mean startCols, minCols or maxCols?'),ep(e.ganttChart)&&eN('Since 8.0.0 the "ganttChart" setting is no longer supported.'),ep(e.rowHeights)&&ep(e.minRowHeights)&&tR("Both `rowHeights` and `minRowHeights` are defined in your configuration. As one is the alias of the other, only one of them can be used at a time. `rowHeights` will be used as the row height configuration."),e)if("data"===n||"language"===n);else if("className"===n)N("className",e.className);else if("tableClassName"===n&&g.table)N("tableClassName",e.tableClassName),g.view._wt.wtOverlays.syncOverlayTableClassNames();else if(r8.getSingleton().isRegistered(n)||r8.getSingleton().isDeprecated(n)){let t=e[n];rL(t)?(r8.getSingleton().addAsFixed(n,t,g),S[n]=t):Array.isArray(t)&&(r8.getSingleton().add(n,t,g),S[n]=t)}else!i&&e$(e,n)&&(R[n]=e[n]);let h=hO(g.rootContainer),d=e$(e,"themeName"),u=e$(e,"theme");if(d&&u&&tR("Both `theme` and `themeName` are defined in your configuration. These options are aliases and cannot be used together. The `themeName` option will be ignored."),i){let t;u&&"string"==typeof e.theme?t=e.theme:d&&"string"==typeof e.themeName&&e.themeName&&!u?(t=e.themeName,S.theme=e.themeName,S.themeName=void 0):h?t=h:g.themeManager&&(t=g.themeManager.getClassName()),g.useTheme(t??null)}else{let t=g.getCurrentThemeName();if(u&&"string"==typeof e.theme&&t!==e.theme)g.themeManager?.unmount(),g.themeManager=null,g.useTheme(e.theme);else if(d&&!u&&t!==e.themeName)g.themeManager?.unmount(),g.themeManager=null,S.theme=e.themeName,S.themeName=void 0,g.useTheme(e.themeName);else if(iT(g)&&!h&&eF(e.theme))if(null===g.themeManager)I(e.theme),g.useTheme(g.themeManager.getClassName());else{let t;t="function"!=typeof e.theme.getThemeConfig?du(e.theme):e.theme,g.themeManager.update(t),g.useTheme(g.themeManager.getClassName())}}!0===g.runHooks("hasExternalDataSource")?(e.data&&tR('The "data" setting is ignored when "hasExternalDataSource" returns `true`.'),i||e$(e,"data")||e$(e,"dataProvider")?a([],"updateSettings"):void 0!==e.columns&&(s.createMap(),g.initIndexMappers())):void 0===e.data&&void 0===S.data?a(null,"updateSettings"):void 0!==e.data?a(e.data,"updateSettings"):void 0!==e.columns&&(s.createMap(),g.initIndexMappers()),!m&&e.language&&(a8(r=i9(t=e.language))?(g.runHooks("beforeLanguageChange",r),R.language=r,g.runHooks("afterLanguageChange",r)):i7(t));let c=g.countCols(),p=S.columns;if(void 0!==e.cell||void 0!==e.cells||void 0!==e.columns){let e=w.getUserDefinedCellMetas();w.clearCache(),e.forEach(e=>{let{physicalRow:t,physicalColumn:r,key:n,value:o}=e;w.setCellMeta(t,r,n,o)})}if(c>0)for(n=0,o=0;n<c;n++){if(p){let e=rL(p)?p(n):p[o];e&&w.updateColumnMeta(o,e)}o+=1}if(ep(e.cell)){w.disableUserDefinedMetaRecording();try{e.cell.forEach(e=>{g.setCellMetaObject(e.row,e.col,e)})}finally{w.enableUserDefinedMetaRecording()}}g.runHooks("afterCellMetaReset"),m&&l6(g,"init");let f=g.rootElement.style.height;""!==f&&(f=parseInt(g.rootElement.style.height,10)),i&&g.rootElement.getAttribute("style")&&(g.rootElement.dataset.initialstyle=g.rootElement.getAttribute("style")??"");let C=e.height;if(void 0!==e.height)if(rL(C)&&(C=C()),null===(C=g.runHooks("beforeHeightChange",C))){let e=g.rootElement.dataset.initialstyle;e&&(e.indexOf("height")>-1||e.indexOf("overflow")>-1)?g.rootElement.setAttribute("style",e):(g.rootElement.style.height="",g.rootElement.style.overflow="")}else void 0!==C&&(g.rootElement.style.height=isNaN(C)?`${C}`:`${C}px`,g.rootElement.style.overflow="clip");if(void 0!==e.width){let t=e.width;rL(t)&&(t=t()),t=g.runHooks("beforeWidthChange",t),g.rootElement.style.width=isNaN(t)?`${t}`:`${t}px`}if(void 0!==e.height||void 0!==e.width){let e=g.rootElement.style.height,t=g.rootElement.style.width;if(!e){let e=g.rootElement.style.overflowX;(""===e||"clip"===e)&&(g.rootElement.style.overflowX=t&&"auto"!==t?"clip":"")}}i||(g.view&&(g.view._wt.wtViewport.resetHasOversizedColumnHeadersMarked(),g.view._wt.exportSettingsAsClassNames(),g.view.invalidateIndexSizesCache()),A.updateHighlightClassNames(),g.runHooks("afterUpdateSettings",e)),l.adjustRowsAndCols(),g.view&&!m&&(g.render(),g.view._wt.wtOverlays.adjustElementsSize()),!i&&g.view&&(""===f||""===C||void 0===C)&&f!==C&&g.view._wt.wtOverlays.updateMainScrollableElements(),iT(g)&&V?.applyConfig(S.layout)},this.getValue=function(){let e=g.getSelectedRangeActive();if(S.getValue){if(rL(S.getValue))return S.getValue.call(g);else if(e&&"string"==typeof S.getValue){let t=e.highlight.row??0;return g.getData()[t][S.getValue]}}else if(e)return g.getDataAtCell(e.highlight.row,e.highlight.col);return null},this.getSettings=function(){return S},this.clear=function(){this.selectAll(),this.emptySelectedCells(),this.deselectCell()},this.alter=function(e,t,r,n,o){l.alter(e,t,r,n,o)},this.getCell=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=t,o=e;if(t>=0){if(g.columnIndexMapper.isHidden(g.toPhysicalColumn(t)))return null;n=g.columnIndexMapper.getRenderableFromVisualIndex(t)}if(e>=0){if(g.rowIndexMapper.isHidden(g.toPhysicalRow(e)))return null;o=g.rowIndexMapper.getRenderableFromVisualIndex(e)}return null===o||null===n||void 0===o||void 0===n?null:g.view.getCellAtCoords(g._createCellCoords(o,n),r)},this.getCoords=function(e){let t=g.view._wt.wtTable.getCoords(e);if(null===t)return null;let{row:r,col:n}=t,o=r,i=n;return null!==r&&r>=0&&(o=g.rowIndexMapper.getVisualFromRenderableIndex(r)),null!==n&&n>=0&&(i=g.columnIndexMapper.getVisualFromRenderableIndex(n)),g._createCellCoords(o,i)},this.colToProp=function(e){return s.colToProp(e)},this.propToCol=function(e){return s.propToCol(e)},this.toVisualRow=e=>g.rowIndexMapper.getVisualFromPhysicalIndex(e),this.toVisualColumn=e=>g.columnIndexMapper.getVisualFromPhysicalIndex(e),this.toPhysicalRow=e=>g.rowIndexMapper.getPhysicalFromVisualIndex(e),this.toPhysicalColumn=e=>g.columnIndexMapper.getPhysicalFromVisualIndex(e),this.getDataAtCell=function(e,t){return s.get(e,s.colToProp(t))},this.getDataAtRowProp=function(e,t){return s.get(e,t)},this.getDataAtCol=function(e){let t=[],r=s.getRange(g._createCellCoords(0,e),g._createCellCoords(S.data.length-1,e),l1.DESTINATION_RENDERER);for(let e=0;e<r.length;e+=1)for(let n=0;n<r[e].length;n+=1)t.push(r[e][n]);return t},this.getDataAtProp=function(e){let t=[],r=s.getRange(g._createCellCoords(0,s.propToCol(e)),g._createCellCoords(S.data.length-1,s.propToCol(e)),l1.DESTINATION_RENDERER);for(let e=0;e<r.length;e+=1)for(let n=0;n<r[e].length;n+=1)t.push(r[e][n]);return t},this.getSourceData=function(e,t,r,n){return void 0===e?a.getData():a.getByRange(g._createCellCoords(e,t??null),g._createCellCoords(r??null,n??null))},this.getSourceDataArray=function(e,t,r,n){return void 0===e?a.getData(!0):a.getByRange(g._createCellCoords(e,t??null),g._createCellCoords(r??null,n??null),!0)},this.getSourceDataAtCol=function(e){return a.getAtColumn(e)},this.setSourceDataAtCell=function(e,t,r,n){let o=H(e,t,r),i=g.hasHook("afterSetSourceDataAtCell"),s=[],l=(e,t)=>{let r=g.toVisualRow(e),n=g.toVisualColumn(t);return Number.isInteger(n)?g.getCellMeta(r,n):{...Object.getPrototypeOf(S),...S}};i&&ee(o,e=>{let[t,r,n]=e,o=lJ(n,l(t,r));s.push([t,r,a.getAtCell(t,r),o])}),ee(o,e=>{let[t,r,o]=e,i=l(t,r),s=lJ(o,i);(function(e,t,r){let n=t.sourceDataValidator;if(!rL(n)||!0===n(e,t,r))return!0;let{row:o,col:i,sourceDataWarningMessage:s,allowInvalid:a}=t;return s&&l5(s,[{row:o,col:i,value:e}]),!0===a})(s,i,n??"setSourceDataAtCell")&&a.setAtCell(t,r,s)}),i&&this.runHooks("afterSetSourceDataAtCell",s,n),this.render();let h=g.getActiveEditor();h&&ep(h.refreshValue)&&h.refreshValue()},this.getSourceDataAtRow=function(e){return a.getAtRow(e)},this.getSourceDataAtCell=function(e,t){return a.getAtCell(e,t)},this.getDataAtRow=function(e){return s.getRange(g._createCellCoords(e,0),g._createCellCoords(e,this.countCols()-1),l1.DESTINATION_RENDERER)[0]||[]},this.getDataType=function(e,t,r,n){let o=void 0===e?[0,0,g.countRows(),g.countCols()]:[e,t,r,n],[i,s]=o,[,,a,l]=o,h=null,d=null;void 0===a&&(a=i),void 0===l&&(l=s);let u="mixed";return nk(Math.max(Math.min(i,a),0),Math.max(i,a),e=>{let t=!0;return nk(Math.max(Math.min(s,l),0),Math.max(s,l),r=>(d=g.getCellMeta(e,r).type??null,h?t=h===d:h=d,t)),u=t?d??"mixed":"mixed",t}),u},this.removeCellMeta=function(e,t,r){let[n,o]=[g.toPhysicalRow(e),g.toPhysicalColumn(t)],i=w.getCellMetaKeyValue(n,o,r);!1!==g.runHooks("beforeRemoveCellMeta",e,t,r,i)&&(w.removeCellMeta(n,o,r),g.runHooks("afterRemoveCellMeta",e,t,r,i))},this.spliceCellsMeta=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;for(var r=arguments.length,n=Array(r>2?r-2:0),o=2;o<r;o++)n[o-2]=arguments[o];n.length>0&&!Array.isArray(n[0])&&eN("The 3rd argument (cellMetaRows) has to be passed as an array of cell meta objects array."),t>0&&w.removeRow(g.toPhysicalRow(e),t),n.length>0&&ee(n.reverse(),t=>{w.createRow(g.toPhysicalRow(e)),ee(t,(t,r)=>{this.setCellMetaObject(e,r,t)})}),g.render()},this.setCellMetaObject=function(e,t,r){"object"==typeof r&&eB(r,(r,n)=>{this.setCellMeta(e,t,n,r)})},this.setCellMeta=function(e,t,r,n){if(!1===g.runHooks("beforeSetCellMeta",e,t,r,n))return;let o=e,i=t;e<g.countRows()&&(o=g.toPhysicalRow(e)),t<g.countCols()&&(i=g.toPhysicalColumn(t)),w.setCellMeta(o,i,r,n),g.runHooks("afterSetCellMeta",e,t,r,n)},this.getCellsMeta=function(){return w.getCellsMeta()},this.getCellMeta=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{skipMetaExtension:!1},n=g.toPhysicalRow(e),o=g.toPhysicalColumn(t);return null===n&&(n=e),null===o&&(o=t),w.getCellMeta(n,o,{visualRow:e,visualColumn:t,...r})},this.getColumnMeta=function(e){return w.getColumnMeta(g.toPhysicalColumn(e))},this.getCellMetaAtRow=function(e){return w.getCellsMetaAtRow(e)},this.isColumnModificationAllowed=function(){return!("object"===g.dataType||S.columns)},this.getCellRenderer=function(e,t){let r="number"==typeof e?g.getCellMeta(e,t).renderer:e.renderer;return"string"==typeof r?n2(r):em(r)?n2("text"):r},this.getCellEditor=function(e,t){let r="number"==typeof e?g.getCellMeta(e,t).editor:e.editor;return"string"==typeof r?nc(r):em(r)?nc("text"):r},this.getCellValidator=function(e,t){let r="number"==typeof e?g.getCellMeta(e,t).validator:e.validator;return"string"==typeof r?n8(r):r},this.validateCells=function(e){this._validateCells(e)},this.validateRows=function(e,t){Array.isArray(e)||eN("validateRows parameter `rows` must be an array"),this._validateCells(t,e)},this.validateColumns=function(e,t){Array.isArray(e)||eN("validateColumns parameter `columns` must be an array"),this._validateCells(t,void 0,e)},this._validateCells=function(e,t,r){let n=x();e&&(n.onQueueEmpty=e);let o=g.countRows()-1;for(;o>=0;){if(void 0!==t&&-1===t.indexOf(o)){o-=1;continue}let e=g.countCols()-1;for(;e>=0;){if(void 0!==r&&-1===r.indexOf(e)){e-=1;continue}n.addValidatorToQueue(),g.validateCell(g.getDataAtCell(o,e),g.getCellMeta(o,e),e=>{"boolean"!=typeof e&&eN("Validation error: result is not boolean"),!1===e&&(n.valid=!1),n.removeValidatorFormQueue()},"validateCells"),e-=1}o-=1}n.checkIfQueueIsEmpty()},this.getRowHeader=function(e){let t=S.rowHeaders,r=e;if(void 0!==r&&(r=g.runHooks("modifyRowHeader",r)),void 0===r){let e=[];nk(g.countRows()-1,t=>{e.push(g.getRowHeader(t))}),t=e}else Array.isArray(t)&&void 0!==t[r]?t=t[r]:rL(t)?t=t(r):t&&"string"!=typeof t&&"number"!=typeof t&&(t=r+1);return t},this.hasRowHeaders=function(){return!!S.rowHeaders},this.hasColHeaders=function(){if(void 0!==S.colHeaders&&null!==S.colHeaders)return!!S.colHeaders;for(let e=0,t=g.countCols();e<t;e++)if(g.getColHeader(e))return!0;return!1},this.getColHeader=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1,r=g.runHooks("modifyColHeader",e);if(void 0===r){let e=[],t=g.countCols();for(let r=0;r<t;r++)e.push(g.getColHeader(r));return e}let n=S.colHeaders,o=S.columns,i=g.toPhysicalColumn(r),s=function(e){let t=[],r=g.countCols(),n=0;for(;n<r;n++)rL(o)&&o(n)&&t.push(n);return t[e]}(i);return!1===S.colHeaders?n=null:o&&rL(o)&&o(s)&&o(s).title?n=o(s).title:o&&!rL(o)&&o[i]&&o[i].title?n=o[i].title:Array.isArray(S.colHeaders)&&void 0!==S.colHeaders[i]?n=S.colHeaders[i]:rL(S.colHeaders)?n=S.colHeaders(i):S.colHeaders&&"string"!=typeof S.colHeaders&&"number"!=typeof S.colHeaders&&(n=iI(r)),n=g.runHooks("modifyColumnHeaderValue",n,e,t)},this._getColWidthFromSettings=function(e){let t;if(e>=0&&(t=g.getCellMeta(0,e).width),(void 0===t||t===S.width)&&(t=S.colWidths),null!=t){switch(typeof t){case"object":t=t[e];break;case"function":t=t(e)}"string"==typeof t&&(t=Number.parseInt(t,10))}return t},this.getColWidth=function(e,t){let r=g._getColWidthFromSettings(e);return void 0===(r=g.runHooks("modifyColWidth",r,e,t))&&(r=50),r},this._getRowHeightFromSettings=function(e){let t=g.stylesHandler.getDefaultRowHeight(e),r=S.rowHeights??S.minRowHeights;if(null!=r){switch(typeof r){case"object":r=r[e];break;case"function":r=r(e)}"string"==typeof r&&(r=Number.parseInt(r,10))}let n=r;return null!=n&&null!==t&&n<t?t:n},this.getRowHeight=function(e,t){let r=g._getRowHeightFromSettings(e);return g.runHooks("modifyRowHeight",r,e,t)},this.countSourceRows=function(){return a.countRows()},this.countSourceCols=function(){return a.countFirstRowKeys()},this.countRows=function(){return s.getLength()},this.countCols=function(){return Math.min(S.maxCols,g.columnIndexMapper.getNotTrimmedIndexesLength())},this.countRenderedRows=function(){let e=g.view;return e._wt.drawn?e._wt.wtTable.getRenderedRowsCount():-1},this.countVisibleRows=function(){let e=g.view;return e._wt.drawn?e._wt.wtTable.getVisibleRowsCount():-1},this.countRenderedCols=function(){let e=g.view;return e._wt.drawn?e._wt.wtTable.getRenderedColumnsCount():-1},this.countVisibleCols=function(){let e=g.view;return e._wt.drawn?e._wt.wtTable.getVisibleColumnsCount():-1},this.countRowHeaders=function(){return g.view.getRowHeadersCount()},this.countColHeaders=function(){return g.view.getColumnHeadersCount()},this.countEmptyRows=function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=0;return n_(g.countRows()-1,r=>{if(g.isEmptyRow(r))t+=1;else if(!0===e)return!1}),t},this.countEmptyCols=function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=0;return n_(g.countCols()-1,r=>{if(g.isEmptyCol(r))t+=1;else if(!0===e)return!1}),t},this.isEmptyRow=function(e){return S.isEmptyRow.call(g,e)},this.isEmptyCol=function(e){return S.isEmptyCol.call(g,e)},this.selectCell=function(e,t,r,n){let o=!(arguments.length>4)||void 0===arguments[4]||arguments[4],i=!(arguments.length>5)||void 0===arguments[5]||arguments[5];if(em(e)||em(t))return!1;let s=[[null==e||Number.isNaN(Number(e))?0:Number(e),null==t||"number"==typeof t&&Number.isNaN(t)?0:t,em(r)?void 0:r,em(n)?void 0:n]];return g.selectCells(s,o,i)},this.selectCells=function(){let e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[[]],r=!(arguments.length>1)||void 0===arguments[1]||arguments[1],n=!(arguments.length>2)||void 0===arguments[2]||arguments[2];!1===r&&u.suspend(),!1===n&&d.suspend();try{e=A.selectCells(t)}finally{u.resume(),d.resume()}return e&&n&&g.listen(),e},this.selectColumns=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e,r=arguments.length>2?arguments[2]:void 0;return A.selectColumns(e,t,r)},this.selectRows=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e,r=arguments.length>2?arguments[2]:void 0;return A.selectRows(e,t,r)},this.deselectCell=function(){A.deselect()},this.selectAll=function(){let e=!(arguments.length>0)||void 0===arguments[0]||arguments[0],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e,r=arguments.length>2?arguments[2]:void 0;u.skipNextScrollCycle(),A.selectAll(e,t,r)};let P=(e,t)=>e.getNearestNotHiddenIndex(t,1,!0);this.scrollViewportTo=function(e,t){"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:n,considerHiddenIndexes:o}=e??{},i=r,s=n;if(rL(t)&&this.addHookOnce("afterScroll",t),void 0===o||o){var a,l;let e,t,o,h,d=(a=r,l=n,e=void 0!==a&&Number.isInteger(a)&&a>=0,t=void 0!==l&&Number.isInteger(l)&&l>=0,o=e?P(g.rowIndexMapper,a):void 0,h=t?P(g.columnIndexMapper,l):void 0,null!==o&&null!==h&&{renderableRow:e?g.rowIndexMapper.getRenderableFromVisualIndex(o)??void 0:a,renderableColumn:t?g.columnIndexMapper.getRenderableFromVisualIndex(h)??void 0:l});if(!1===d)return!1;i=d.renderableRow,s=d.renderableColumn}let h=Number.isInteger(i),d=Number.isInteger(s),u=!1;return h&&i>=0&&d&&s>=0?u=g.view.scrollViewport(g._createCellCoords(i,s),e.horizontalSnap,e.verticalSnap):h&&i>=0&&(d&&s<0||!d)?u=g.view.scrollViewportVertically(i,e.verticalSnap):d&&s>=0&&(h&&i<0||!h)&&(u=g.view.scrollViewportHorizontally(s,e.horizontalSnap)),rL(t)&&(u?this.view.render():(this.removeHook("afterScroll",t),this._registerMicrotask(()=>t()))),u},this.scrollToFocusedCell=function(e){if(!g.selection.isSelected())return!1;rL(e)&&g.addHookOnce("afterScroll",e);let{highlight:t}=g.getSelectedRangeActive(),r=g.scrollViewportTo(t.toObject());return r?g.view.render():rL(e)&&(g.removeHook("afterScroll",e),g._registerMicrotask(()=>e())),r},this.destroy=function(){g._clearTimeouts(),g._clearMicrotasks(),g.view&&g.view.destroy(),a&&a.destroy(),a=null,iT(this)&&(0!==hL&&(1===hL&&(hH.remove(),hH=null),hL-=1),this.getFocusScopeManager().destroy(),V?.destroy(),g.themeManager?.destroy()),this.getShortcutManager().destroy(),T.clear(),w.clearCache(),df.delete(this.guid),p.destroy(),h&&h.destroy(),g.rootContainer&&tK(g.rootContainer),g.rootPortalElement&&g.rootPortalElement.remove(),g.batchExecution(()=>{g.rowIndexMapper.destroy(),g.columnIndexMapper.destroy(),E.getItems().forEach(e=>{let[,t]=e;t.destroy()}),E.clear(),g.runHooks("afterDestroy")},!0),r8.getSingleton().destroy(g),eB(g,(e,t,r)=>{var n;rL(e)?r[t]=(n=t,()=>{eN(`The "${n}" method cannot be called because this Handsontable instance has been destroyed`)}):"guid"!==t&&(r[t]=null)}),g.isDestroyed=!0,s&&s.destroy(),s=null,l=null,A=null,h=null,g=null},this.getActiveEditor=function(){return h?.getActiveEditor()},this.getFirstRenderedVisibleRow=function(){return g.view.getFirstRenderedVisibleRow()},this.getLastRenderedVisibleRow=function(){return g.view.getLastRenderedVisibleRow()},this.getFirstRenderedVisibleColumn=function(){return g.view.getFirstRenderedVisibleColumn()},this.getLastRenderedVisibleColumn=function(){return g.view.getLastRenderedVisibleColumn()},this.getFirstFullyVisibleRow=function(){return g.view.getFirstFullyVisibleRow()},this.getLastFullyVisibleRow=function(){return g.view.getLastFullyVisibleRow()},this.getFirstFullyVisibleColumn=function(){return g.view.getFirstFullyVisibleColumn()},this.getLastFullyVisibleColumn=function(){return g.view.getLastFullyVisibleColumn()},this.getFirstPartiallyVisibleRow=function(){return g.view.getFirstPartiallyVisibleRow()},this.getLastPartiallyVisibleRow=function(){return g.view.getLastPartiallyVisibleRow()},this.getFirstPartiallyVisibleColumn=function(){return g.view.getFirstPartiallyVisibleColumn()},this.getLastPartiallyVisibleColumn=function(){return g.view.getLastPartiallyVisibleColumn()},this.getPlugin=function(e){return E.getItem(th(e))},this.getPluginName=function(e){return E.getId(e)},this.getInstance=function(){return g},this.addHook=function(e,t,r){r8.getSingleton().add(e,t,g,r)},this.hasHook=function(e){return r8.getSingleton().has(e,g)||r8.getSingleton().has(e)},this.addHookOnce=function(e,t,r){r8.getSingleton().once(e,t,g,r)},this.removeHook=function(e,t){r8.getSingleton().remove(e,t,g)},this.runHooks=function(e,t,r,n,o,i,s){return r8.getSingleton().run(g,e,t,r,n,o,i,s)},this.getTranslatedPhrase=function(e,t){return ln(S.language,e,t)},this.toHTML=()=>nw(this),this.toTableElement=()=>{let e=g.rootDocument.createElement("div");return e.insertAdjacentHTML("afterbegin",nw(g)),e.firstElementChild},this.timeouts=[],this.useTheme=e=>{let t=!!m;this.stylesHandler.useTheme(e??void 0);let r=this.stylesHandler.getThemeName();!t&&r&&(hO(this.rootContainer)&&(t$(this.rootContainer,/ht-theme-.*/g),tG(this.rootContainer,r)),g.render(),g.scrollViewportTo(0,0)),this.runHooks("afterSetTheme",r,t)},this.getCurrentThemeName=()=>g.stylesHandler.getThemeName()??null,this.getTableHeight=()=>g.rootElement.offsetHeight,this.getTableWidth=()=>g.rootElement.offsetWidth,this._registerTimeout=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=e;return"function"==typeof r&&(r=setTimeout(r,t)),this.timeouts.push(r),r},this._clearTimeouts=function(){ee(this.timeouts,e=>{clearTimeout(e)})},this.microtasks=[],this._registerMicrotask=function(e){let t={cancelled:!1};this.microtasks.push(t),this.rootWindow.queueMicrotask(()=>{t.cancelled||e()})},this._clearMicrotasks=function(){ee(this.microtasks,e=>{e.cancelled=!0}),this.microtasks.length=0},this._getEditorManager=function(){return h},this._getDataSource=function(){return a},this._getMetaManager=function(){return w};let D=(e=>{let{ownerWindow:t,handleEvent:r,beforeKeyDown:n,afterKeyDown:o}=e,i=nz({errorIdExists:e=>`The "${e}" context name is already registered.`}),s="grid",a=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"table",r=hy(e,t);return i.addItem(e,r),r},l=()=>s,h=e=>i.getItem(e),d=!1,u=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:l(),n=hb(r)?r:h(r),o=!1;if(!n?.hasShortcut(t))return o;let i=n?.getShortcuts(t)??[];for(let r=0;r<i.length;r++){let{callback:n,runOnlyIf:s,preventDefault:a,stopPropagation:l,captureCtrl:h,forwardToContext:c}=i[r];if(s?.(e)===!0){if(d=h??!1,o=!1===n(e,t),d=!1,a&&e.preventDefault(),l&&(rQ(e),e.stopPropagation()),o)break;c&&u(e,t,c)}}return o},c=function(e,t,r,n,o){let i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:null,s=e=>{if(!1!==t(e)){if(!1===r(e)||229===e.keyCode||"string"!=typeof e.key||rZ(e))return;let t=hp(e),i=[];hm.includes(t)||(i=hf(e));let s=o(e,[t].concat(i));!s&&(ta()&&i.includes("meta")||!ta()&&i.includes("control"))&&(s=o(e,[t].concat(hf(e,!0)))),n(e);return}if(!1===rL(i)||229===e.keyCode||"string"!=typeof e.key||rZ(e))return;let s=hp(e),a=[];hm.includes(s)||(a=hf(e));let l=i(e,[s].concat(a));!l&&(ta()&&a.includes("meta")||!ta()&&a.includes("control"))&&(l=i(e,[s].concat(hf(e,!0)))),n(e)},a=()=>{hw.releaseAll()};return{mount:()=>{let t=e;for(;t;){let{documentElement:e}=t.document,r=hS.get(e)??0;0===r&&(e.addEventListener("keydown",hv),e.addEventListener("keyup",hR)),hS.set(e,r+1),e.addEventListener("keydown",s),e.addEventListener("blur",a),t=tk(t)}},unmount:()=>{let t=e;for(;t;){let{documentElement:e}=t.document,r=hS.get(e)??0;r<=1?(e.removeEventListener("keydown",hv),e.removeEventListener("keyup",hR),hS.delete(e)):hS.set(e,r-1),e.removeEventListener("keydown",s),e.removeEventListener("blur",a),t=tk(t)}},isPressed:e=>hw.isPressed(e),releasePressedKeys:()=>hw.releaseAll()}}(t,e=>{let t=h(l());return r(e,t?.scope??"table")},n,o,u,(e,t)=>{let r=i.getItems();for(let n=0;n<r.length;n+=1){let[,o]=r[n];if("global"===o.scope&&u(e,t,o))return!0}return!1});return c.mount(),{addContext:a,getActiveContextName:l,getContext:h,getOrCreateContext:function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"table";return h(e)??a(e,t)},setActiveContextName:e=>{i.hasItem(e)||eN(eu`You've tried to activate the "${e}" shortcut context\x20
|
|
196
|
+
that does not exist. Before activation, register the context using the "addContext" method.`),s=e},hasEventShortcut:(e,t)=>{let r=h(e);return!!r&&((e,t)=>{if("string"!=typeof e.key)return[];let r=hp(e),n=hm.includes(r),o=n?[]:hf(e),i=[[r].concat(o)];return!n&&("function"==typeof t&&t()?o.includes("meta"):o.includes("control"))&&i.push([r].concat(hf(e,!0))),i})(t,ta).some(e=>r.hasShortcut(e))},isCtrlPressed:()=>!d&&(c.isPressed("control")||c.isPressed("meta")),releasePressedKeys:()=>c.releasePressedKeys(),destroy:()=>c.unmount()}})({handleEvent:(e,t)=>"global"===t||g.isListening(),beforeKeyDown:e=>g.runHooks("beforeKeyDown",e),afterKeyDown:e=>{this.isDestroyed||g.runHooks("afterDocumentKeyDown",e)},ownerWindow:this.rootWindow});this.addHook("beforeOnCellMouseDown",e=>{!1===e.ctrlKey&&!1===e.metaKey&&D.releasePressedKeys()}),this.getShortcutManager=function(){return D},d=new ht(g);let F=iT(this)?function(e){let t=nz({errorIdExists:e=>`The "${e}" focus scope is already registered.`}),r=e.getShortcutManager(),n=null;function o(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:hn.UNKNOWN;n!==e&&(null!==n&&i(n),(n=e).activate(t),r.setActiveContextName(e.getShortcutsContextName()))}function i(e){s(),n===e&&(n=null,e.deactivate())}function s(){let r=t.getValues(),o=r.filter(e=>e.runOnlyIf()&&"modal"===e.getType());r.forEach(t=>{o.length>0&&o.includes(t)||0===o.length||t.hasContainerDetached()?t.enable():t.disable(),t===n?t.contains(e.rootDocument.activeElement)?t.deactivateFocusCatchers():t.activateFocusCatchers():t.runOnlyIf()?t.activateFocusCatchers():t.deactivateFocusCatchers()})}function a(r,s){if(!r.isConnected||!t1(r))return;let a=t.getValues().filter(e=>e.runOnlyIf()),l=!1;a.forEach(t=>{!l&&t.contains(r)&&(l=!0,s!==hn.UNKNOWN&&e.listen(),o(t,s))}),!l&&n&&(i(n),e.unlisten())}let l=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=!1;function n(e){r||t.onFocus?.(e)}function o(e){t.onClick?.(e)}function i(e){"Tab"===e.key&&t.onTabKeyDown?.(e)}function s(){r=!0}function a(){r=!1}return{mount:()=>{let t=e;for(;t;){let{documentElement:e}=t.document;e.addEventListener("focusin",n),e.addEventListener("click",o),e.addEventListener("keydown",i),e.addEventListener("mousedown",s),e.addEventListener("mouseup",a),t=tk(t)}},unmount:()=>{let t=e;for(;t;){let{documentElement:e}=t.document;e.removeEventListener("focusin",n),e.removeEventListener("click",o),e.removeEventListener("keydown",i),e.removeEventListener("mousedown",s),e.removeEventListener("mouseup",a),t=tk(t)}}}}(e.rootWindow,{onFocus:e=>{a(tx(e),tx(e).dataset.htFocusSource??hn.UNKNOWN)},onClick:e=>{a(tx(e),hn.CLICK)},onTabKeyDown:()=>{s()}});return l.mount(),{getActiveScopeId:function(){return n?t.getId(n):null},registerScope:function(n,o){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};t.hasItem(n)&&eN(`Scope with id "${n}" already registered`);let s=function(e,t){let r,n,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i={shortcutsContextName:"grid",type:hr.INLINE,contains:e=>e===t||t.contains(e),runOnlyIf:()=>!0,enableFocusCatchers:!0,...o},s=!1===i.enableFocusCatchers?null:(r=ho(e,hn.TAB_FROM_ABOVE),n=ho(e,hn.TAB_FROM_BELOW),t.prepend(r),t.append(n),{activate(){r.tabIndex=0,n.tabIndex=0},deactivate(){r.tabIndex=-1,n.tabIndex=-1},destroy(){r.remove(),n.remove()}});return{getType:()=>i.type,hasContainerDetached:()=>!e.rootWrapperElement.contains(t),getShortcutsContextName:()=>i.shortcutsContextName,runOnlyIf:()=>i.runOnlyIf(),contains:e=>i.contains(e),activate:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:hn.UNKNOWN;i.onActivate?.(e)},deactivate:()=>{i.onDeactivate?.()},activateFocusCatchers:()=>{s?.activate()},deactivateFocusCatchers:()=>{s?.deactivate()},enable:()=>{t.removeAttribute("inert")},disable:()=>{t.setAttribute("inert","true")},destroy:()=>{s?.destroy()}}}(e,o,i);t.addItem(n,s),r.getOrCreateContext(s.getShortcutsContextName())},unregisterScope:function(e){t.hasItem(e)||eN(`Scope with id "${e}" not found`),t.getItem(e).destroy(),t.removeItem(e)},activateScope:(e,r)=>(function(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:hn.UNKNOWN;t.hasItem(e)||eN(`Scope with id "${e}" not found`);let n=r??hn.UNKNOWN;o(t.getItem(e),n)})(e,r),deactivateScope:e=>{!t.hasItem(e)&&eN(`Scope with id "${e}" not found`),i(t.getItem(e))},destroy:()=>l.unmount()}}(g):null,V=iT(this)?new hK({top:g.rootSlotTopElement,bottom:g.rootSlotBottomElement}):null;this.getFocusManager=function(){return d},this.getFocusScopeManager=function(){return iT(g)||eN("The FocusScopeManager is only available for the main Handsontable instance."),F},this.getLayoutManager=function(){return iT(g)||eN("The LayoutManager is only available for the main Handsontable instance."),V};let B=f.theme,U=f.themeName,z=hO(g.rootContainer);iT(g)&&!z&&(eF(B)||!B&&!U)&&I(B),nq().forEach(e=>{let t=nK(e);t&&E.addItem(e,new t(this))}),r=g,[hx,hI].forEach(e=>e(r)),iT(this)&&(n=g,[hd].forEach(e=>e(n))),D.setActiveContextName("grid"),r8.getSingleton().run(g,"construct")};lH(dM),n3(dC);let dI=function(e,t){let r=new dN(e,t||{},iE);return r.init(),r};dI.editors={BaseEditor:hA,TextEditor:dT},dI.dom={empty:tK},dI.helper={},dI.Core=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return new dN(e,t,iE)},dI.DefaultSettings=lF(),dI.hooks=r8.getSingleton(),dI.CellCoords=oD,dI.CellRange=oF,dI.packageName="handsontable",dI.buildDate="30/06/2026 08:45:33",dI.version="18.0.0",dI.languages={dictionaryKeys:w,getLanguageDictionary:lr,getLanguagesDictionaries:function(){return le()},registerLanguageDictionary:lt,getTranslatedPhrase:ln},dI.themes={hasTheme:ds,getTheme:da,getThemeNames:dl,getThemes:dh,registerTheme:du,reinitTheme:dc};let dx="handsontableEditor";class dO extends dT{static get EDITOR_TYPE(){return"handsontable"}isFlippedVertically=!1;isFlippedHorizontally=!1;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.htEditor.deselectCell(),rp(this.TEXTAREA,0,this.TEXTAREA.value.length),this.htEditor.updateSettings({width:this.getTargetDropdownWidth(),height:this.getTargetDropdownHeight()}),this.refreshDimensions(),this.flipDropdownVerticallyIfNeeded(),this.flipDropdownHorizontallyIfNeeded()}close(){this.htEditor&&(this.htEditor.rootElement.style.display="none"),this.removeHooksByKey("beforeKeyDown"),super.close()}prepare(e,t,r,n,o,i){super.prepare(e,t,r,n,o,i);let{hot:s}=this,a=this.setValue.bind(this),l={startRows:0,startCols:0,minRows:0,minCols:0,className:"listbox",copyPaste:!1,autoColumnSize:!1,autoRowSize:!1,readOnly:!0,fillHandle:!1,autoWrapCol:!1,autoWrapRow:!1,ariaTags:!1,themeName:this.hot.getCurrentThemeName(),afterOnCellMouseDown(e,t){if(t.row<0||t.col<0)return;let r=this.getDataAtCell(t.row,t.col);void 0!==r&&a(r),s.destroyEditor()},preventWheel:!0,layoutDirection:this.hot.isRtl()?"rtl":"ltr"};this.cellProperties.handsontable&&eO(l,i.handsontable),this.htOptions=l}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){if(this.htEditor&&this.htEditor.isListening()&&this.hot.listen(),this.htEditor&&this.htEditor.getSelectedActive()){let e=this.htEditor.getValue();void 0!==e&&this.setValue(e)}super.finishEditing(e,t,r)}flipDropdownVerticallyIfNeeded(){let{view:e}=this.hot,t=this.getEditedCellRect();if(!t)return{isFlipped:!1,spaceAbove:0,spaceBelow:0};let r=t.top;e.isVerticallyScrollableByWindow()&&(r=Math.max(r+(e.getTableOffset().top-this.hot.rootWindow.scrollY),0));let n=this.getDropdownHeight(),o=e.getWorkspaceHeight()-r-t.height,i=n>o&&r>o+t.height;return i?this.flipDropdownVertically():this.unflipDropdownVertically(),{isFlipped:i,spaceAbove:r,spaceBelow:o}}flipDropdownVertically(){let e=this.htEditor.rootElement.style;e.position="absolute",e.top=`${-this.getDropdownHeight()}px`,this.isFlippedVertically=!0}unflipDropdownVertically(){let e=this.htEditor.rootElement.style;e.position="absolute",e.top="",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,n=e.getWorkspaceWidth();e.isHorizontallyScrollableByWindow()&&(r=Math.max(r+(e.getTableOffset().left-this.hot.rootWindow.scrollX),0),n=this.hot.rootDocument.documentElement.clientWidth);let o=this.getDropdownWidth(),i=n-r+t.width,s=o>i&&r>i;return s?this.flipDropdownHorizontally():this.unflipDropdownHorizontally(),{isFlipped:s,spaceInlineStart:r,spaceInlineEnd:i}}flipDropdownHorizontally(){let e=this.htEditor.rootElement.style,{width:t}=this.getEditedCellRect()??{width:0};e.position="absolute",e[this.hot.isRtl()?"right":"left"]=`${-(this.getDropdownWidth()-t)}px`,this.isFlippedHorizontally=!0}unflipDropdownHorizontally(){let e=this.htEditor.rootElement.style;e.position="absolute",e[this.hot.isRtl()?"right":"left"]="",this.isFlippedHorizontally=!1}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():r.selectCell(e,0),r.getData().length))return t.preventDefault(),rQ(t),this.hot.listen(),this.TEXTAREA.focus(),!1};e.addShortcuts([{keys:[["ArrowUp"]],callback:e=>{let r,n=this.htEditor;if(!n.getSelectedActive()&&this.isFlippedVertically)r=n.countRows()-1;else if(n.getSelectedActive()){let e=n.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,n=this.htEditor;if(n.getSelectedActive()||this.isFlippedVertically){if(n.getSelectedActive()){let e=n.getSelectedActive();this.isFlippedVertically?r=e[0]+1:this.isFlippedVertically||(r=Math.min(n.countRows()-1,e[0]+1))}}else r=0;return t(r,e)},preventDefault:!1}],{group:dx,relativeToGroup:hh,position:"before"})}unregisterShortcuts(){super.unregisterShortcuts(),this.hot.getShortcutManager().getContext("editor").removeShortcutsByGroup(dx)}}class dk extends dO{static get EDITOR_TYPE(){return"autocomplete"}query=null;strippedChoices=[];rawChoices=[];#t0=this.hot.guid.slice(0,9);getValue(){let e=this.rawChoices.find(e=>{let t=this.stripValueIfNeeded(e);return(this.#t1(t)?t.value:t)===this.TEXTAREA.value});return ep(e)?e:this.TEXTAREA.value}createElements(){super.createElements(),tG(this.htContainer,"autocompleteEditor"),tG(this.htContainer,-1===this.hot.rootWindow.navigator.platform.indexOf("Mac")?"":"htMacScroll"),this.hot.getSettings().ariaTags&&tj(this.TEXTAREA,[["type","text"],["role","combobox"],D("listbox"),["aria-autocomplete","list"]])}prepare(e,t,r,n,o,i){super.prepare(e,t,r,n,o,i),this.hot.getSettings().ariaTags&&tj(this.TEXTAREA,[z("false"),["aria-controls",`${this.#t0}-listbox-${e}-${t}`]]),this.htOptions={...this.htOptions,valueGetter:e=>this.#t1(e)?e.value:e}}open(){super.open();let e=this.cellProperties.trimDropdown,t=this.hot.getSettings().ariaTags,r=Array.isArray(this.cellProperties.source)?this.cellProperties.source:null,n=r?.length,{row:o,col:i}=this;if(this.showEditableElement(),this.focus(),this.addHook("beforeKeyDown",e=>this.onBeforeKeyDown(e)),this.htEditor.addHook("afterScroll",this.#t2),this.htEditor.updateSettings({colWidths:void 0===e||e?[ro(this.TEXTAREA)-2]:void 0,autoColumnSize:!0,renderer:(e,o,i,s,a,l,h)=>{dA(e,o,i,s,a,l,h);let{filteringCaseSensitive:d,allowHtml:u}=this.cellProperties,c=this.cellProperties.locale,g=this.query,p=eg(l);if(u)o.innerHTML=p;else if(p&&g&&g.length>0){let t=!0===d?p.indexOf(g):tS(p,c).indexOf(tS(g,c));if(-1!==t){let r=p.slice(t,t+g.length),{rootDocument:n}=e;o.innerHTML="",o.appendChild(n.createTextNode(p.slice(0,t)));let i=n.createElement("strong");i.textContent=r,o.appendChild(i),o.appendChild(n.createTextNode(p.slice(t+g.length)))}}t&&tj(o,[["role","option"],...r?[["aria-setsize",n??0]]:[],...r?[["aria-posinset",r.indexOf(l)+1]]:[],["id",`${this.htEditor.rootElement.id}_${i}-${s}`]])},afterSelectionEnd:(e,r)=>{if(t){let t=e=>{tj(e,[j()]),tj(this.TEXTAREA,"aria-activedescendant",e.id)},n=this.htEditor.getCell(e,r,!0);null!==n?t(n):this.htEditor.addHookOnce("afterScrollVertically",()=>{let n=this.htEditor.getCell(e,r,!0);null!==n&&t(n)})}}}),t){let e=E();tj(this.htEditor.view._wt.wtOverlays.wtTable.TABLE,e[0],e[1]),tj(this.htEditor.rootElement,[O(),["aria-live","polite"],["aria-relevant","text"],["id",`${this.#t0}-listbox-${o}-${i}`]]),tj(this.TEXTAREA,...z("true"))}this.hot._registerTimeout(()=>{this.queryChoices(this.TEXTAREA.value)})}close(){this.removeHooksByKey("beforeKeyDown"),super.close(),this.hot.getSettings().ariaTags&&tj(this.TEXTAREA,[z("false")])}discardEditor(e){super.discardEditor(e),this.hot.view.render()}queryChoices(e){let t=this.cellProperties.source;this.query=e,"function"==typeof t?t.call(this.cellProperties,e,e=>{this.rawChoices=e,this.updateChoicesList(this.stripValuesIfNeeded(e))}):Array.isArray(t)?(this.rawChoices=t,this.updateChoicesList(this.stripValuesIfNeeded(t))):this.updateChoicesList([])}updateChoicesList(e){let t=rd(this.TEXTAREA),r=ru(this.TEXTAREA),n=this.cellProperties.sortByRelevance,o=this.cellProperties.filter,i=this.stripValueIfNeeded(this.getValue()),s=this.#t1(i)?i.value:i,a=null,l=e;n||(l=l.toSorted((e,t)=>eg(e).localeCompare(eg(t))));let h=[],d=this.cellProperties.locale,u=this.cellProperties.filteringCaseSensitive,c=u?s:tS(String(s),d);for(let e=0;e<l.length;e++){let t=this.#t1(l[e])?tm(eg(l[e].value)):tm(eg(l[e]));if(-1!==(u?t:tS(t,d)).indexOf(String(c))&&(h.push(e),!1===o))break}!1===o?String(i).length>0&&(a=h[0]):a=(l=h.map(e=>l[e])).indexOf(c)>-1?l.indexOf(c):0,this.strippedChoices=l,0===l.length?this.htEditor.rootElement.style.display="none":this.htEditor.rootElement.style.display="",this.htEditor.loadData(X([l])),l.length>0&&(this.updateDropdownDimensions(),this.flipDropdownVerticallyIfNeeded(),this.flipDropdownHorizontallyIfNeeded(),!0===this.cellProperties.strict&&this.highlightBestMatchingChoice(a??void 0)),this.hot.listen(),rp(this.TEXTAREA,t,t===r?void 0:r)}flipDropdownVerticallyIfNeeded(){let e=super.flipDropdownVerticallyIfNeeded(),{isFlipped:t,spaceAbove:r,spaceBelow:n}=e;return this.limitDropdownIfNeeded(t?r:n),e}limitDropdownIfNeeded(e){let t=this.getDropdownHeight();if(t>e){let r=0,n=0,o=0;do r+=n=this.htEditor.stylesHandler.getDefaultRowHeight()??0;while(r<e);o=r-n,this.isFlippedVertically&&(this.htEditor.rootElement.style.top=`${parseInt(this.htEditor.rootElement.style.top,10)+t-o}px`),this.setDropdownHeight(r-n)}}updateDropdownDimensions(){let e=rm(),t=this.getTargetEditorWidth()+e,r=this.getTargetEditorHeight()+e;this.htEditor.updateSettings({width:t,height:r}),this.#t3(),this.htEditor.view._wt.wtTable.alignOverlaysWithTrimmingContainer()}setDropdownHeight(e){this.htEditor.updateSettings({height:e}),this.#t3(),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()}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}=this.cellProperties,r=e=>eg(t?e:tm(String(e)));return e.every(e=>eq(e))?e.map(e=>({key:r(e.key),value:r(e.value)})):e.map(e=>r(e))}#t2=rF(()=>{this.focus()},100);#t3(){this.htEditor.view.hasVerticalScroll()&&this.htEditor.updateSettings({width:this.getTargetEditorWidth()+rf(this.hot.rootDocument)})}#t1(e){return eF(e)&&ep(e.key)&&ep(e.value)}onBeforeKeyDown(e){if(rj(e.keyCode)||e.keyCode===rG.BACKSPACE||e.keyCode===rG.DELETE||e.keyCode===rG.INSERT){let t=10;e.keyCode===rG.C&&(e.ctrlKey||e.metaKey)||(this.isOpened()||(t+=10),this.htEditor&&this.hot._registerTimeout(()=>{this.queryChoices(this.TEXTAREA.value)},t))}}}class d_ extends hA{static get EDITOR_TYPE(){return"checkbox"}beginEditing(e,t){if(t&&"mouseup"===t.type&&"TD"===tx(t).nodeName){let e=this.TD.querySelector('input[type="checkbox"]');tW(e,"htBadValue")||e.click()}}finishEditing(){}init(){}open(){}close(){}getValue(){}setValue(){}focus(){}}let dH=/^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12]\d|3[01])$/;function dL(e){let t=new Date(e);return Number.isNaN(new Date(`${e}T00:00`).getDate())?t:new Date(t.getTime()+6e4*t.getTimezoneOffset())}function dP(e){if(ef(e))return null;if("string"==typeof e&&dH.test(e)){let[t,r,n]=e.split("-").map(Number);return new Date(t,r-1,n)}return null}function dD(e){if("string"!=typeof e||!dH.test(e))return!1;let t=new Date(e);return!Number.isNaN(t.getTime())&&e===t.toISOString().slice(0,10)}let dF=/^([01]\d|2[0-3]):([0-5]\d)(?::([0-5]\d)(?:\.(\d{1,3}))?)?$/;function dV(e){if(ef(e)||"string"!=typeof e)return null;let t=dF.exec(e);if(!t)return null;let r=Number(t[1]),n=Number(t[2]),o=void 0!==t[3]?Number(t[3]):0,i=t[4];return new Date(1970,0,1,r,n,o,void 0!==i?Number(i.padEnd(3,"0").slice(0,3)):0)}function dB(e){return"string"==typeof e&&dF.test(e)}function dU(){let e=new Date;return new Date(e.getFullYear(),e.getMonth(),e.getDate())}function dz(e){let t=dU();return t.setDate(t.getDate()+e),t}function dW(e,t){return e.getFullYear()===t.getFullYear()&&e.getMonth()===t.getMonth()&&e.getDate()===t.getDate()}class dG extends dT{static get EDITOR_TYPE(){return"date"}init(){super.init(),this.hot.addHook("afterSetTheme",(e,t)=>{t||this.close()})}prepare(e,t,r,n,o,i){super.prepare(e,t,r,n,o,i),void 0!==i.datePickerConfig&&tT(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")}setValue(e){if(ef(e)&&(e=this.cellProperties.defaultDate),!dD(e)){tR(eu`DateEditor: value must be in ISO date format ("YYYY-MM-DD")\x20
|
|
197
197
|
required by the native date input. Received:`,e),super.setValue("");return}super.setValue(e)}focus(){this.TEXTAREA.select()}open(){super.open();try{this.TEXTAREA.showPicker()}catch{}}}class d$ extends dk{static get EDITOR_TYPE(){return"dropdown"}prepare(e,t,r,n,o,i){i.filter=!1,i.strict=!0,super.prepare(e,t,r,n,o,i)}finishEditing(e,t,r){if(this.isOpened()){let t=this.hot.getSelectedRangeActive();(em(t)||ep(t)&&!t.includes(this.hot._createCellCoords(this.row,this.col)))&&(e=!0)}super.finishEditing(e,t,r)}}class dj extends dG{static get EDITOR_TYPE(){return"intl-date"}}class dY extends dT{static get EDITOR_TYPE(){return"time"}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(!dB(e)){tR(eu`TimeEditor: value must be in 24-hour time format ("HH:mm", "HH:mm:ss" or "HH:mm:ss.SSS")\x20
|
|
198
198
|
required by the native time input. Received:`,e),super.setValue("");return}super.setValue(e)}focus(){this.TEXTAREA.select()}open(){super.open();try{this.TEXTAREA.showPicker()}catch{}}}class dq extends dY{static get EDITOR_TYPE(){return"intl-time"}}class dK extends dT{static get EDITOR_TYPE(){return"numeric"}}class dX extends dT{autoResize=dS(this.hot.rootDocument,{textContent:e=>"•".repeat(e.value.length)});#t6="";#t5=null;#t4=null;#t9=!1;static get EDITOR_TYPE(){return"password"}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",tK(this.TEXTAREA_PARENT);let e=R(-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.#t9=!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.#t6.length),this.#t4=t=>this.#t7(t,r,e),this.TEXTAREA.addEventListener("input",this.#t4)}}close(){this.#t4&&(this.TEXTAREA.removeEventListener("input",this.#t4),this.#t4=null),null!==this.#t5&&(clearTimeout(this.#t5),this.#t5=null),this.#t9=!1,this.#t6="",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.#t9?this.#t6:super.getValue()}setValue(e){if(this.#t9){this.#t6=e??"";let t=String(this.cellProperties.hashSymbol||"*")[0];this.TEXTAREA.value=t.repeat(this.#t6.length)}else this.cellProperties?.hashRevealDelay>0?this.#t6=e??"":super.setValue(e)}#t7(e,t,r){let{inputType:n,data:o}=e;if(o&&("insertText"===n||"insertFromPaste"===n||"insertFromDrop"===n||"insertReplacementText"===n||"insertCompositionText"===n)){let e=this.TEXTAREA.selectionStart??0,n=e-o.length,i=this.TEXTAREA.value.length-e;this.#t6=this.#t6.slice(0,n)+o+this.#t6.slice(this.#t6.length-i),this.TEXTAREA.value=t.repeat(n)+o+t.repeat(i),this.TEXTAREA.setSelectionRange(e,e),null!==this.#t5&&clearTimeout(this.#t5),this.#t5=this.hot._registerTimeout(()=>{let e=this.TEXTAREA.selectionStart;this.TEXTAREA.value=t.repeat(this.#t6.length),this.TEXTAREA.setSelectionRange(e,e),this.#t5=null},r)}else if(n?.startsWith("delete")){let e=this.#t6.length,r=this.TEXTAREA.selectionStart??0,n=e-this.TEXTAREA.value.length;this.#t6=this.#t6.slice(0,r)+this.#t6.slice(r+n),this.TEXTAREA.value=t.repeat(this.#t6.length),this.TEXTAREA.setSelectionRange(r,r),null!==this.#t5&&(clearTimeout(this.#t5),this.#t5=null)}else{let e=this.#t6.length,n=this.TEXTAREA.value;if(n.length>e){let o=n.slice(e);this.#t6+=o,this.TEXTAREA.value=t.repeat(e)+o,null!==this.#t5&&clearTimeout(this.#t5),this.#t5=this.hot._registerTimeout(()=>{this.TEXTAREA.value=t.repeat(this.#t6.length),this.#t5=null},r)}else this.#t6=this.#t6.slice(0,n.length),this.TEXTAREA.value=t.repeat(this.#t6.length),null!==this.#t5&&(clearTimeout(this.#t5),this.#t5=null)}}}let dQ="ht_editor_visible",dZ="selectEditor";class dJ extends hA{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(...L()),e.appendChild(this.hot.rootDocument.createTextNode(String.fromCharCode(9660))),tG(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,this.refreshDimensions(),this.selectWrapper.style.display="",this.hot.getShortcutManager().setActiveContextName("editor"),this.registerShortcuts()}close(){this._opened=!1,this.selectWrapper.style.display="none",tW(this.selectWrapper,dQ)&&t$(this.selectWrapper,dQ),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,n,o,i){let s;super.prepare(e,t,r,n,o,i);let a=this.cellProperties.selectOptions;s="function"==typeof a?this.prepareOptions(a(this.row,this.col,this.prop)):this.prepareOptions(a),tK(this.select);let{sanitizer:l}=this.hot.getSettings();if(Array.isArray(s))for(let e=0;e<s.length;e++){let t=this.hot.rootDocument.createElement("OPTION");t.value=String(s[e]),tJ(t,String(s[e]),l,"selectEditor",this.hot.rootElement),this.select.appendChild(t)}else eB(s,(e,t)=>{let r=this.hot.rootDocument.createElement("OPTION");r.value=t,tJ(r,String(e),l,"selectEditor",this.hot.rootElement),this.select.appendChild(r)})}prepareOptions(e){return Array.isArray(e)||"object"==typeof e?e:{}}refreshValue(){let e=this.hot.getSourceDataAtCell(this.row,this.prop);this.originalValue=e,this.setValue(e),this.refreshDimensions()}refreshDimensions(){if(this.state!==hT.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:n,height:o}=e,i=this.selectWrapper.style;i.height=`${o}px`,i.width=`${n}px`,i.top=`${t}px`,i[this.hot.isRtl()?"right":"left"]=`${r}px`,i.margin="0px",tG(this.selectWrapper,dQ)}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:dZ})}unregisterShortcuts(){this.hot.getShortcutManager().getContext("editor").removeShortcutsByGroup(dZ)}destroy(){this.clearHooks()}}function d0(e){return e.querySelector('input[type="checkbox"]')}function d1(e,t){return eq(t)?Array.isArray(e)&&e.some(e=>eq(e)?eP(e,t):e===t):e.includes(t)}class d2{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.#t8(this.input.value)}#t8(e){this.runLocalHooks("triggerFilter",e)}}eL(d2,iB);let d3="ht-multi-select-editor",d6=`${d3}-search-input-wrapper`,d5=`${d3}-search-icon`,d4=`${d3}-search-input`,d9=`${d3}-separator`,d7=`${d3}-item-`,d8=`${d3}-item-selected`;function ue(e){let t=d0(e);tG(e,d8),t&&!t.checked&&(t.checked=!0)}function ut(e){let t=d0(e);t$(e,d8),t&&t.checked&&(t.checked=!1)}function ur(e){let{dropdownListElement:t,index:r}=e,n=t.children[r];if(n){let e=d0(n);e&&e.blur()}}class un{#re=null;#rt=null;#rr=null;#rn=null;#ro=null;#ri=null;#rs=null;#tA=null;#p=new nm(this);#ra={visibleRowsNumberSetting:null,entriesCount:0,flippedVertically:!1,currentlySelectedItemIndex:0,checkboxChangeListeners:new Map,areCheckboxesDisabled:!1,sourceSortFunction:null};constructor(e,t){this.#rt=e,this.#tA=this.#rt.ownerDocument,this.#re=t,this.init()}init(){if(!this.#tA||!this.#rt)return;this.#rr=function(e){let{root:t}=e;return t.createElement("ul")}({root:this.#tA}),this.#rn=function(e){let{root:t}=e,r=t.createElement("input");return tj(r,[H("Search options"),["type","text"],["size",3],["placeholder","Search..."],["id",d4]]),tG(r,d4),r}({root:this.#tA});let e=function(e){let{root:t}=e,r=t.createElement("div");return tG(r,d5),tj(r,[L()]),r}({root:this.#tA});this.#ri=function(e){let{root:t}=e,r=t.createElement("div");return r.className=d6,r}({root:this.#tA}),this.#ro=function(e){let{root:t}=e,r=t.createElement("div");return r.className=d9,r}({root:this.#tA}),this.#ri.appendChild(e),this.#ri.appendChild(this.#rn),this.#rt.appendChild(this.#ri),this.#rt.appendChild(this.#ro),this.#rt.appendChild(this.#rr),this.#rs=new d2({input:this.#rn,eventManager:this.#p})}setVisibleRowsNumberSetting(e){this.#ra.visibleRowsNumberSetting=e}setSourceSortFunction(e){this.#ra.sourceSortFunction=e??null}setSearchInputVisibility(){let e=!(arguments.length>0)||void 0===arguments[0]||arguments[0];this.#ri&&this.#ro&&this.#rs&&(this.#ri.style.display=e?"":"none",this.#ro.style.display=e?"":"none",this.#rs.toggle(e))}fillDropdown(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];this.removeAllDropdownItems(),this.#ra.currentlySelectedItemIndex=0,Array.isArray(t)||(t=[]);let r=e;this.#ra.sourceSortFunction&&(r=this.#ra.sourceSortFunction(e.slice())),this.#tA&&this.#rr&&null!==this.#re&&(r.forEach((e,r)=>{let n="object"==typeof e&&null!==e&&"value"in e?e.value:e;this.#rl({rootDocument:this.#tA,itemKey:"object"==typeof e&&null!==e&&"key"in e?e.key:void 0,itemValue:String(n??e),indexWithinList:r,checked:d1(t,e),disabled:this.#ra.areCheckboxesDisabled})}),this.#ra.entriesCount=r.length,this.runLocalHooks("afterDropdownFill"))}updateDimensions(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=this.#rh(),n=this.#rd(e),o=n?e.spaceAbove:e.spaceBelow;if(!t&&n&&(this.#ra.flippedVertically=!0),this.#ra.entriesCount>0&&o<this.getHeight(!0)){let e=Math.max(Math.floor((o-this.#ru())/r)-1,1);this.#ra.actualRenderedItemsCount=this.#ra.visibleRowsNumberSetting?Math.min(e,this.#ra.visibleRowsNumberSetting):e}else this.#ra.actualRenderedItemsCount=Math.min(this.#ra.entriesCount,this.#ra.visibleRowsNumberSetting??this.#ra.entriesCount);this.#rt&&(this.#ra.actualRenderedItemsCount&&this.#ra.entriesCount>this.#ra.actualRenderedItemsCount?this.#rt.style.height=`${this.getHeight()}px`:this.#rt.style.height="",this.#rc(e),this.#rt.scrollTop=0)}getDropdownWidth(){return this.#rr?function(e){let{dropdownListElement:t}=e;return t.offsetWidth}({dropdownListElement:this.#rr}):0}deselectAllItems(){this.#rr&&function(e){let{dropdownListElement:t}=e;t.querySelectorAll(`.${d8}`).forEach(e=>ut(e))}({dropdownListElement:this.#rr})}focusFirstItem(){this.#ra.entriesCount>0&&this.#rg(0)}focusItem(e){this.#rg(e)}focusPreviousItem(){if(this.#rr){if(0===this.#ra.currentlySelectedItemIndex)return void this.focusSearchInput();ur({dropdownListElement:this.#rr,index:this.#ra.currentlySelectedItemIndex}),this.#rg(this.#ra.currentlySelectedItemIndex-1)}}focusNextItem(){this.#rr&&this.#ra.currentlySelectedItemIndex!==this.#ra.entriesCount-1&&(ur({dropdownListElement:this.#rr,index:this.#ra.currentlySelectedItemIndex}),this.#rg(this.#ra.currentlySelectedItemIndex+1))}focusSearchInput(){this.#rn&&this.#rn.focus()}reset(){this.removeAllDropdownItems(),this.#rp(),this.#rn&&(this.#rn.value=""),this.#rt&&(this.#rt.style.position="",this.#rt.style.top="",this.#rt.style.height="",this.#rt.scrollTop=0)}isFlippedVertically(){return this.#ra.flippedVertically}getHeight(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(!this.#tA||!this.#rt)return 0;let r=this.#tA.defaultView.getComputedStyle(this.#rt);return this.#rm(e)+this.#ru()+(!0===t?2*parseInt(r.getPropertyValue("--ht-menu-vertical-padding"),10):0)}getInputController(){return this.#rs}removeAllDropdownItems(){this.#rr&&(Array.from(this.#rr.children).forEach(e=>this.#rf(e)),this.#ra.checkboxChangeListeners.clear(),this.#rr.innerHTML="")}disableCheckboxes(){this.#ra.areCheckboxesDisabled=!0,this.#rr&&function(e){let{dropdownListElement:t}=e;t.querySelectorAll('input[type="checkbox"]:not(:checked)').forEach(e=>{e.dataset.disabled="true"})}({dropdownListElement:this.#rr})}enableCheckboxes(){this.#ra.areCheckboxesDisabled=!1,this.#rr&&function(e){let{dropdownListElement:t}=e;t.querySelectorAll('input[type="checkbox"]').forEach(e=>{e.dataset.disabled="false"})}({dropdownListElement:this.#rr})}#rg(e){this.#ra.currentlySelectedItemIndex=e,this.#rr&&function(e){let{dropdownListElement:t,index:r}=e,n=t.children[r];if(n){let e=d0(n);e&&e.focus()}}({dropdownListElement:this.#rr,index:e})}#rd(e){let{spaceAbove:t,spaceBelow:r,cellHeight:n}=e;return this.getHeight(!0)>r&&t>r+n}#rc(e){if(!this.#rt)return;let{cellHeight:t}=e;this.#ra.flippedVertically?(this.#rt.style.position="absolute",this.#rt.style.top=`${-this.getHeight(!1,!0)-t-2}px`):(this.#rt.style.position="",this.#rt.style.top="")}#rh(){if(!this.#tA||!this.#rt)return 0;let e=this.#tA.defaultView.getComputedStyle(this.#rt);return 2*parseInt(e.getPropertyValue("--ht-menu-item-vertical-padding"),10)+parseInt(e.getPropertyValue("--ht-line-height"),10)}#rm(e){let t=this.#ra.entriesCount;return(e?t:this.#ra.actualRenderedItemsCount??t)*this.#rh()}#ru(){if(!this.#rs?.enabled||!this.#ri||!this.#ro||!this.#tA||!this.#rt)return 0;let e=this.#tA.defaultView.getComputedStyle(this.#rt);return this.#ri.offsetHeight+(this.#ro.offsetHeight+2*parseInt(e.getPropertyValue("--ht-menu-vertical-padding"),10))}#rl(e){let{rootDocument:t,itemKey:r,itemValue:n,indexWithinList:o,checked:i=!1,disabled:s=!1}=e;if(!this.#rr||null===this.#re)return;let a=function(e){let{rootDocument:t,instanceId:r,itemKey:n,itemValue:o,indexWithinList:i,checked:s=!1,disabled:a=!1}=e,l=t.createElement("li"),h=t.createElement("div"),d=t.createElement("input"),u=t.createElement("label");return d.id=`${r}-${d7}${i}`,d.type="checkbox",d.dataset.value=o,d.dataset.index=String(i),d.dataset.disabled=a&&!s?"true":"false",n&&(d.dataset.key=n),u.htmlFor=d.id,u.textContent=o,h.appendChild(d),h.appendChild(u),l.appendChild(h),l}({rootDocument:t,instanceId:this.#re,itemKey:r,itemValue:n,indexWithinList:o,checked:i,disabled:s});i&&ue(a),this.#rC(a),this.#rr.appendChild(a)}#rC(e){let t=d0(e);if(!t||!this.#rr)return;let r=()=>{if("true"===t.dataset.disabled&&t.checked){t.checked=!1;return}t.checked?(ue(e),this.runLocalHooks("afterDropdownItemChecked",t.dataset.key,t.dataset.value)):(ut(e),this.runLocalHooks("afterDropdownItemUnchecked",t.dataset.key,t.dataset.value))},n=e=>{let r=tx(e);r!==t&&"true"!==t.dataset.disabled&&"LABEL"!==r.tagName&&(t.checked=!t.checked,t.dispatchEvent(new Event("change")))};this.#ra.checkboxChangeListeners.set(t,{change:r,click:n}),this.#p.addEventListener(t,"change",r),this.#p.addEventListener(e,"click",n)}#rf(e){let t=d0(e);if(!t)return;let r=this.#ra.checkboxChangeListeners.get(t);r&&(this.#p.removeEventListener(t,"change",r.change),this.#p.removeEventListener(e,"click",r.click),this.#ra.checkboxChangeListeners.delete(t))}#rp(){this.#ra.visibleRowsNumberSetting=null,this.#ra.entriesCount=0,this.#ra.flippedVertically=!1,this.#ra.currentlySelectedItemIndex=0,this.#ra.checkboxChangeListeners.clear(),this.#ra.areCheckboxesDisabled=!1,this.#ra.sourceSortFunction=null}}eL(un,iB);class uo{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(!eq(e))return this.selectedItems.delete(e);{let t=Array.from(this.selectedItems).find(t=>eP(t,e));if(void 0!==t)return this.selectedItems.delete(t),!0}return!1}has(e){return d1(this.getItemsArray(),e)}clear(){this.selectedItems.clear()}getSize(){return this.selectedItems.size}getItemsArray(){return Array.from(this.selectedItems)}}let ui="multiselect",us="multiselectEditor";class ua extends hA{_closeAfterDataChange=!1;#rb=new uo;#ry=null;dropdownContainerElement=null;dropdownController=null;static get EDITOR_TYPE(){return ui}constructor(e){super(e),this.eventManager=new nm(this),this.createElements(),this.bindEvents()}createElements(){let{rootDocument:e}=this.hot;this.#ry=e.createElement("div"),this.#ry.style.display="none",tG(this.#ry,"handsontableEditor"),this.dropdownContainerElement=this.hot.rootDocument.createElement("div"),tG(this.dropdownContainerElement,"ht-multi-select-editor handsontableEditor"),tj(this.dropdownContainerElement,[H("Select options"),["role","group"]]),this.#ry.appendChild(this.dropdownContainerElement),this.hot.rootElement.appendChild(this.#ry),this.dropdownController=new un(this.dropdownContainerElement,this.hot.guid)}prepare(e,t,r,n,o,i){super.prepare(e,t,r,n,o,i);let s="string"==typeof o&&tc(o)?JSON.parse(o):o,a=ea(Array.isArray(s)?s:[s],this.#rw(),(e,t)=>JSON.stringify(e)===JSON.stringify(t));this.dropdownController.reset(),a.length>=this.#rS("maxSelections")&&this.#rv(),this.#rR(a),this.dropdownController.setSourceSortFunction(this.#rS("sourceSortFunction")??null),this.dropdownController.fillDropdown(this.#rw(),a),this.dropdownController.setVisibleRowsNumberSetting(this.#rS("visibleRows")),this.dropdownController.setSearchInputVisibility(this.#rS("searchInput")),void 0!==i.maxSelections&&this.#rb.setMaxSelectionCount(this.#rS("maxSelections"))}finishEditing(e,t,r){super.finishEditing(e,t,r)}bindEvents(){this.dropdownController.addLocalHook("afterDropdownItemChecked",(e,t)=>{this.#rE(e,t),this.#rb.getSize()>=this.#rS("maxSelections")&&this.#rv()}),this.dropdownController.addLocalHook("afterDropdownItemUnchecked",(e,t)=>{this.#rT(e,t),this.#rb.getSize()<this.#rS("maxSelections")&&this.#rA()}),this.addHook("afterDestroy",()=>this.destroy()),this.addHook("afterSetSourceDataAtCell",(e,t)=>this.#rM(e,t)),this.addHook("afterScrollHorizontally",()=>this.refreshDimensions()),this.addHook("afterScrollVertically",()=>this.refreshDimensions()),this.dropdownController.getInputController().addLocalHook("triggerFilter",e=>this.#rN(e))}open(e){let t=e&&"keyCode"in e?e.keyCode:0,r=e&&"key"in e?e.key:"";if(t&&rj(t)){let n=1===r.length?r:String.fromCharCode(t);this.dropdownController.getInputController().enabled&&(this.dropdownController.getInputController().setValue(n),this.#rN(n)),e?.preventDefault(),this.enableFullEditMode()}this.#rI(),this.refreshDimensions(),this.hot.getShortcutManager().setActiveContextName("editor"),this.#rx(),this.dropdownController.getInputController().listen(),this.dropdownController.updateDimensions(this.#rO())}close(){this.#rk(),this.#r_(),this.dropdownController.getInputController().unlisten()}getValue(){return this.#rb.getItemsArray()}setValue(){}refreshDimensions(){if(!this.getEditedCell())return void this.close();let{top:e,start:t,height:r}=this.getEditedCellRect(),n=this.#ry.style;n.top=`${e+r}px`,n[this.hot.isRtl()?"right":"left"]=`${t}px`,tG(this.#ry,"ht_editor_visible")}focus(){!1===this.#rS("searchInput")?this.dropdownController.focusFirstItem():this.dropdownController.focusSearchInput()}getInputElement(){return this.dropdownController.getInputController().getInputElement()}destroy(){this.close(),this.dropdownController.reset()}#rw(){return this.cellProperties.source??[]}#rx(){let e=this.hot.getShortcutManager().getContext("editor");e.addShortcuts([{keys:[["ArrowUp"]],callback:()=>{this.dropdownController.focusPreviousItem()}},{keys:[["ArrowDown"]],callback:()=>{this.hot.rootDocument.activeElement===this.getInputElement()?this.dropdownController.focusFirstItem():this.dropdownController.focusNextItem()}}],{group:us}),e.addShortcuts([{keys:[["enter"],["shift","enter"],["control/meta","enter"],["control/meta","shift","enter"]],runOnlyIf:()=>!this.#rS("enterCommits"),callback:e=>{let t=this.hot.rootDocument.activeElement;return t instanceof HTMLInputElement&&"checkbox"===t.type&&(t.checked=!t.checked,t.dispatchEvent(new Event("change"))),e.preventDefault(),!1}},{keys:[["space"]],runOnlyIf:()=>!this.#rS("enterCommits"),callback:e=>{e.preventDefault()}}],{group:us,relativeToGroup:hh,position:"before"})}#r_(){this.hot.getShortcutManager().getContext("editor").removeShortcutsByGroup(us)}#rI(){this.#ry.style.display=""}#rk(){this.#ry.style.display="none"}#rv(){this.dropdownController.disableCheckboxes()}#rA(){this.dropdownController.enableCheckboxes()}#rN(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.#rS("filterSelectedItems")??!0,r=this.#rw().filter(r=>{let n="object"==typeof r&&null!==r&&"value"in r?r.value:r;return!!(!t&&this.#rb.has(r))||(this.cellProperties.filteringCaseSensitive?String(n).includes(e):String(n).toLowerCase().includes(e.toLowerCase()))});this.dropdownController.fillDropdown(r,this.#rb.getItemsArray()),this.dropdownController.updateDimensions(this.#rO(),!0)}#rO(){let e=this.getEditedCellRect(),t=this.hot.view.isVerticallyScrollableByWindow(),r=this.hot.view.getWorkspaceHeight(),n=e.top;t&&(n=Math.max(n+(this.hot.view.getTableOffset().top-this.hot.rootWindow.scrollY),0));let o=r-n-e.height;return{spaceAbove:n,spaceBelow:o,cellHeight:e.height}}#rH(){let e=this.#rb.getItemsArray();this.saveValue([[e]])}#rE(e,t){e?this.#rb.add({key:e,value:t}):this.#rb.add(t),this.#rH(),this.refreshDimensions()}#rT(e,t){e?this.#rb.remove({key:e,value:t}):this.#rb.remove(t),this.#rH(),this.refreshDimensions()}#rR(e){e.length>0?this.#rb=new uo(e):this.#rb=new uo}#rS(e){return this.cellProperties[e]}#rM(e,t){this.isOpened()&&t===`${ui}-renderer`&&parseInt(String(e[0][0]),10)===this.cellProperties.visualRow&&parseInt(String(e[0][1]),10)===this.cellProperties.visualCol&&(this.#rR(e[0][3]),this.dropdownController.fillDropdown(this.#rw(),this.#rb.getItemsArray()),this.dropdownController.focusItem(0),this.#rb.getSize()>=this.#rS("maxSelections")?this.#rv():this.#rA())}}function ul(e,t,r,n,o,i,s){tJ(t,null==i?"":i,!1)}function uh(e,t,r,n,o,i,s){let{rootDocument:a}=e,l=s.allowHtml?ul:dA,h=a.createElement("DIV"),d=e.getSettings().ariaTags;if(h.className="htAutocompleteArrow",d&&h.setAttribute(...L()),h.appendChild(a.createTextNode(String.fromCharCode(9660))),l.apply(this,[e,t,r,n,o,i,s]),t.firstChild||t.appendChild(a.createTextNode(String.fromCharCode(160))),t.insertBefore(h,t.firstChild),tG(t,"htAutocomplete"),!e.acArrowListener){let o=new nm(e);e.acArrowListener=function(o){tW(tx(o),"htAutocompleteArrow")&&e.view._wt.getSetting("onCellDblClick",null,e._createCellCoords(r,n),t)},o.addEventListener(e.rootElement,"mousedown",e.acArrowListener),e.addHookOnce("afterDestroy",()=>{o.destroy()})}}function ud(e,t,r,n,o,i,s){uh.apply(this,[e,t,r,n,o,i,s])}ul.RENDERER_TYPE="html",uh.RENDERER_TYPE="autocomplete",ud.RENDERER_TYPE="dropdown";let uu="#bad-value#",uc="ht-loading",ug=new WeakMap,up=new WeakMap,um="data-row",uf="data-col",uC="checkbox";function ub(e,t,r,n,o,i,s){let a,l,{rootDocument:h}=e,d=e.getSettings().ariaTags;!function(e){let t=up.get(e);if(!t){let{rootElement:r}=e;(t=new nm(e)).addEventListener(r,"click",t=>(function(e,t){let r=tx(e);if(!uy(r)||!r.hasAttribute(um)||!r.hasAttribute(uf))return;let n=Number.parseInt(r.getAttribute(um),10),o=Number.parseInt(r.getAttribute(uf),10);t.getCellMeta(n,o).readOnly&&e.preventDefault()})(t,e)),t.addEventListener(r,"mouseup",t=>{var r,n;let o;return r=t,n=e,void(!uy(o=tx(r))||o.hasAttribute(um)&&o.hasAttribute(uf)&&setTimeout(n.listen,10))}),t.addEventListener(r,"change",t=>(function(e,t){let r=tx(e);if(!uy(r)||!r.hasAttribute(um)||!r.hasAttribute(uf))return;let n=Number.parseInt(r.getAttribute(um),10),o=Number.parseInt(r.getAttribute(uf),10),i=t.getCellMeta(n,o);if(!i.readOnly){let e=null;e=r.checked?void 0===i.uncheckedTemplate||i.checkedTemplate:void 0!==i.uncheckedTemplate&&i.uncheckedTemplate,t.setDataAtCell(n,o,e)}})(t,e)),up.set(e,t)}}(e);let u=((a=h.createElement("input")).className="htCheckboxRendererInput",a.type="checkbox",a.setAttribute("tabindex","-1"),a.cloneNode(!1)),c=u,g=s.label,p=!1;void 0===s.checkedTemplate&&(s.checkedTemplate=!0),void 0===s.uncheckedTemplate&&(s.uncheckedTemplate=!1),tK(t);let m=s.locale;i===s.checkedTemplate||tS(eg(i),m)===tS(eg(s.checkedTemplate),m)?u.checked=!0:i===s.uncheckedTemplate||tS(eg(i),m)===tS(eg(s.uncheckedTemplate),m)?u.checked=!1:ef(i)?tG(u,"noValue"):(u.style.display="none",tG(u,"htBadValue"),p=!0),tj(u,[[um,r],[uf,n]]),d&&tj(u,[H(u.checked?e.getTranslatedPhrase(aP):e.getTranslatedPhrase(aD)),$(u.checked),["role","checkbox"]]),function(){if(!p&&g){let s="";if(g.value){let e=g.value;s="function"==typeof g.value?String(e(r,n,o,i)):String(g.value)}else if(g.property){let t=e.getDataAtRowProp(r,String(g.property));s=null!==t?String(t):""}let a=function(e,t,r){let n=e.createElement("label");n.className=`htCheckboxRendererLabel ${r?"fullWidth":""}`;let o=e.createTextNode(t);if(r){let t=e.createElement("span");t.appendChild(o),n.appendChild(t)}else n.appendChild(o);return n.cloneNode(!0)}(h,s,!0!==g.separated);"before"===g.position?g.separated?(t.appendChild(a),t.appendChild(u)):(a.appendChild(u),c=a):g.position&&"after"!==g.position||(g.separated?(t.appendChild(u),t.appendChild(a)):(a.insertBefore(u,a.firstChild),c=a))}}();function f(){let t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],r=e.getSelectedRange(),n=[],o=new Map,i=[],s=0;if(r){for(let a=0;a<r.length;a++){let{row:l,col:h}=r[a].getTopStartCorner(),{row:d,col:u}=r[a].getBottomEndCorner();if(null!==l&&null!==h&&null!==d&&null!==u){for(let r=l;r<=d;r+=1)for(let a=h;a<=u;a+=1){let l=e.getCellMeta(r,a);if(l.hidden)continue;let h={checkedTemplate:l.checkedTemplate,uncheckedTemplate:l.uncheckedTemplate};if("checkbox"!==l.type){!0!==t||l.readOnly||(o.has(n.length)?o.set(n.length,[...o.get(n.length),[r,a,null]]):o.set(n.length,[[r,a,null]]));continue}if(!0===l.readOnly)continue;void 0===l.checkedTemplate&&(l.checkedTemplate=!0),void 0===l.uncheckedTemplate&&(l.uncheckedTemplate=!1);let d=e.getDataAtCell(r,a);!1===t?[l.checkedTemplate,String(l.checkedTemplate)].includes(d)?i.push([r,a,l.uncheckedTemplate,h]):[l.uncheckedTemplate,String(l.uncheckedTemplate),null,void 0].includes(d)&&i.push([r,a,l.checkedTemplate,h]):i.push([r,a,l.uncheckedTemplate,h]),s+=1}n.push(s),s=0}}if((i=i.every(e=>{let[,,t]=e;return t===i[0][2]})?i.map(e=>{let[t,r,n]=e;return[t,r,n]}):i.map(e=>{let[t,r,,n]=e;return[t,r,n?.checkedTemplate]})).length>0){let r=[];if(n.forEach((e,t)=>{let n=i.splice(0,e);o.size&&o.has(t)&&(n=[...n,...o.get(t)??[]]),r.push(n)}),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 n=t[r].getTopStartCorner(),o=t[r].getBottomEndCorner();if(null!==n.row&&null!==n.col&&null!==o.row&&null!==o.col)for(let t=n.row;t<=o.row;t++)for(let r=n.col;r<=o.col;r++){if(e.getCellMeta(t,r).readOnly)continue;let n=e.getCell(t,r);if(rx(n)&&n.querySelectorAll("input[type=checkbox]").length>0)return!0}}return!1}}g&&(!g||g.separated)||t.appendChild(c),p&&t.appendChild(h.createTextNode(uu)),ug.has(e)||(ug.set(e,!0),l=e.getShortcutManager().getContext("grid"),l?.addShortcuts([{keys:[["space"]],callback:()=>(f(),!C()),runOnlyIf:()=>!!e.getSelectedRangeActive()?.highlight.isCell()},{keys:[["enter"]],callback:()=>(f(),!C()),runOnlyIf:()=>{let t=e.getSelectedRangeActive();return!!(e.getSettings().enterBeginsEditing&&t?.highlight.isCell()&&!e.selection.isMultiple())}},{keys:[["delete"],["backspace"]],callback:()=>(f(!0),!C()),runOnlyIf:()=>!!e.getSelectedRangeActive()?.highlight.isCell()}],{group:"checkboxRenderer",relativeToGroup:hh,position:"before"}))}function uy(e){return"INPUT"===e.tagName&&"checkbox"===e.getAttribute("type")}function uw(e,t,r,n,o,i,s){uh.apply(this,[e,t,r,n,o,i,s])}r8.getSingleton().add("modifyAutoColumnSizeSeed",function(e,t,r){let{label:n,type:o,row:i,column:s,prop:a}=t;if(o!==uC||!n)return;let{value:l,property:h}=n,d=r;if(l)d="function"==typeof l?l(i,s,a,r):l;else if(h){let e=this.getDataAtRowProp(i,String(h));d=null!==e?e:r}return`${eg(d).length}`}),ub.RENDERER_TYPE=uC,uw.RENDERER_TYPE="handsontable";let uS={year:"numeric",month:"2-digit",day:"2-digit"},uv=new WeakSet;function uR(e,t){let{dateFormat:r,locale:n,allowEmpty:o,instance:i}=t;if(ef(e))return o?e:uu;if("string"==typeof r)return i&&!uv.has(i)&&(uv.add(i),tR("The dateFormat option as a string is not supported. Use an Intl.DateTimeFormatOptions object instead.")),e;let s=dP(e);if(null===s)return uu;let a=eF(r)?r:uS;return new Intl.DateTimeFormat(n,a).format(s)}function uE(e,t,r,n,o,i,s){dA.apply(this,[e,t,r,n,o,i,s])}function uT(e,t,r,n,o,i,s){uE.apply(this,[e,t,r,n,o,i,s])}uE.valueFormatter=uR,uE.RENDERER_TYPE="date",uT.valueFormatter=uR,uT.RENDERER_TYPE="intl-date";let uA={hour:"numeric",minute:"2-digit"},uM=new WeakSet;function uN(e,t){let{timeFormat:r,locale:n,allowEmpty:o,instance:i}=t;if(ef(e))return o?e:uu;let s=dV(e);if(null===s)return uu;"string"==typeof r&&i&&!uM.has(i)&&(uM.add(i),tR("The timeFormat option as a string is not supported. Use an Intl.DateTimeFormatOptions object instead."));let a=eF(r)?r:uA;return new Intl.DateTimeFormat(n,a).format(s)}function uI(e,t,r,n,o,i,s){dA.apply(this,[e,t,r,n,o,i,s]),t.dir="ltr"}function ux(e,t,r,n,o,i,s){uI.apply(this,[e,t,r,n,o,i,s])}uI.valueFormatter=uN,uI.RENDERER_TYPE="time",ux.RENDERER_TYPE="intl-time";let uO={useGrouping:!1,maximumFractionDigits:20},uk=new Map,u_=new WeakSet;function uH(e,t){return nM(e)&&(e=function(e,t){let{numericFormat:r,locale:n}=t,o=r??uO,i=`${n??""}:${JSON.stringify(o)}`,s=uk.get(i);return void 0===s&&(s=new Intl.NumberFormat(n,o),uk.set(i,s)),s.format(e)}(e,t)),e}function uL(e,t,r,n,o,i,s){let a=s.numericFormat;if(a?.pattern!==void 0||a?.culture!==void 0){let e=s.instance;u_.has(e)||(u_.add(e),tR("The numericFormat.pattern and numericFormat.culture options are not supported. Use Intl.NumberFormat options instead (numericFormat: { style, currency, ... })."))}if(nM(e.getDataAtCell(r,n))){let e=[];if(Array.isArray(s.className))e=s.className;else{let t=s.className??"";t.length&&(e=t.split(" "))}0>e.indexOf("htLeft")&&0>e.indexOf("htCenter")&&0>e.indexOf("htRight")&&0>e.indexOf("htJustify")&&e.push("htRight"),0>e.indexOf("htNumeric")&&e.push("htNumeric"),s.className=e.join(" "),t.dir="ltr"}dA.apply(this,[e,t,r,n,o,i,s])}function uP(e,t,r,n,o,i){tJ(t,i)}function uD(e,t,r,n,o,i,s){dA.apply(this,[e,t,r,n,o,i,s])}function uF(e,t){let r=e=>{let t;return eF(t=e)&&ep(t.key)&&ep(t.value)?r(e.key)&&r(e.value):null==e},n=e;(r(n)&&(n=""),""===n)?t(!!this.allowEmpty):this.strict&&this.source?"function"==typeof this.source?this.source(n,uV(n,t)):uV(n,t)(this.source):t(!0)}function uV(e,t){return function(r){let n=!1;for(let t=0,o=r.length;t<o;t++)if(eP(e,r[t])){n=!0;break}t(n)}}function uB(e,t){return!!(t.allowEmpty&&ef(e)||"string"==typeof e&&e.startsWith("="))||dD(e)}function uU(e,t){t(!!(this.allowEmpty&&ef(e))||dD(e))}function uz(e,t){uF.apply(this,[e,t])}function uW(e,t){uU.call(this,e,t)}function uG(e,t){return!!(t.allowEmpty&&ef(e)||"string"==typeof e&&e.startsWith("="))||dB(e)}function u$(e,t){t(!!(this.allowEmpty&&ef(e))||dB(e))}function uj(e,t){u$.call(this,e,t)}function uY(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,uq(r,t)):uq(r,t)(this.source):t(!0):t(!1)}function uq(e,t){return function(r){let n=!0;for(let t=0,o=e.length;t<o;t++){let o=!1;for(let n=0,i=r.length;n<i;n++)if(eq(e[t])&&!eq(r[n])||!eq(e[t])&&eq(r[n])){o=!1;break}else eq(e[t])&&eq(r[n])&&eP(e[t],r[n])?o=!0:"string"==typeof e[t]&&"string"==typeof r[n]&&e[t]===r[n]&&(o=!0);if(!o){n=!1;break}}t(n)}}function uK(e,t){let r=e;null==r&&(r=""),t(!!this.allowEmpty&&""===r||""!==r&&nM(e))}function uX(e){return eF(e)&&void 0!==e.value?e.value:e}function uQ(e,t,r){return eq(this.getSourceDataAtCell(this.toPhysicalRow(t),this.toPhysicalColumn(r)))?eq(e)?e:{key:e,value:e}:e}uL.valueFormatter=uH,uL.RENDERER_TYPE="numeric",uP.valueFormatter=function(e,t){let r=t.hashLength||eg(e).length,n=String(t.hashSymbol??"*"),o="";for(let e=0;e<r;e++)o+=n;return o},uP.RENDERER_TYPE="password",uD.RENDERER_TYPE="select",uF.VALIDATOR_TYPE="autocomplete",uB.rowIndependent=!0,uU.VALIDATOR_TYPE="date",uz.VALIDATOR_TYPE="dropdown",uW.VALIDATOR_TYPE="intl-date",uG.rowIndependent=!0,u$.VALIDATOR_TYPE="time",uj.VALIDATOR_TYPE="intl-time",uY.VALIDATOR_TYPE="multiselect",uK.VALIDATOR_TYPE="numeric";let uZ="ht-multi-select",uJ=`${uZ}-chip`,u0=`${uZ}-chip-remove`,u1=`${uZ}-chip-label`,u2=`${uZ}-overflow`,u3=new WeakSet,u6=new WeakMap,u5=new WeakMap;function u4(e,t){return eq(e)?e[t]:e}function u9(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 u7(e){return Array.isArray(e)?ed(e.map(e=>eq(e)?e.value:e),", "):e}let u8=[];function ce(e,t){if(Array.isArray(e)){"string"!=typeof t&&eN("registerConflict(blockedTargetKeys[], incompatibleSettingKeys) expects incompatibleSettingKeys to be a string.");for(let r=0;r<e.length;r+=1)u8.push({blockedKey:e[r],incompatibleSettingKey:t});return}if("string"!=typeof e&&eN("registerConflict expects a string blocked target key when the first argument is not an array."),Array.isArray(t)){for(let r=0;r<t.length;r+=1){let n=t[r];"string"!=typeof n&&eN("registerConflict(blockedTargetKey, incompatibleSettingKeys) expects incompatibleSettingKeys to be a string array."),u8.push({blockedKey:e,incompatibleSettingKey:n})}return}"string"==typeof t?u8.push({blockedKey:e,incompatibleSettingKey:t}):eN("Invalid registerConflict arguments.")}let ct=new Map([["plugin",function(e){return!!nK(e)}],["cell-type",lx],["editor",ni],["renderer",nJ],["validator",n4]]),cr=Symbol("mainSetting"),cn=[],co=null;class ci{static get PLUGIN_KEY(){return"base"}static get SETTING_KEYS(){return[this.PLUGIN_KEY]}static get DEFAULT_SETTINGS(){return{}}static get SETTINGS_VALIDATORS(){return null}static PLUGIN_DEPS;#rL=null;eventManager=new nm(this);pluginName=null;pluginsInitializedCallbacks=[];isPluginsReady=!1;enabled=!1;initialized=!1;#e={};constructor(e){eV(this,"hot",e,{writable:!1}),co=null,this.hot.addHook("afterPluginsInitialized",()=>this.onAfterPluginsInitialized()),this.hot.addHook("afterUpdateSettings",e=>{this.onUpdateSettings(e)}),this.hot.addHook("beforeInit",()=>this.init())}init(){this.pluginName=this.hot.getPluginName(this),this.updatePluginSettings(this.hot.getSettings()[this.constructor.PLUGIN_KEY]);let e=this.constructor.PLUGIN_DEPS,t=Array.isArray(e)?e:[];if(t.length>0){let e=[];if(t.forEach(t=>{let[r,n]=t.split(":");ct.has(r)||eN(`Unknown plugin dependency type "${r}" was found.`),ct.get(r)(n)||e.push(` - ${n} (${r})`)}),e.length>0){let t=`The ${this.pluginName} plugin requires the following modules:
|
|
199
199
|
${e.join("\n")}
|