adminizer 4.6.0 → 4.7.0-build.221
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/Readme.md +12 -0
- package/assets/RelationDialogStack-CnHFOYyR.css +1 -0
- package/assets/RelationDialogStack-DI2bZxQX.js +20 -0
- package/assets/add-4213XScp.js +1 -0
- package/assets/add-group--F1XxfJ1.js +1 -0
- package/assets/add-group-form-DKRXC2n-.js +1 -0
- package/assets/add-user-b9HfMq7z.js +1 -0
- package/assets/add-user-form-UXAToWQd.js +1 -0
- package/assets/app-Clx8f5hd.css +1 -0
- package/assets/app-layout-C02ja4OI.js +1 -0
- package/assets/app-shell-D8wtkECO.js +1 -0
- package/assets/app-sidebar-BR5_zwxj.js +1 -0
- package/assets/app-sidebar-header-BZbIBQjq.js +1 -0
- package/assets/app.js +59 -7990
- package/assets/breadcrumbs-CODaqVkB.js +1 -0
- package/assets/catalog-6ZZjWdFs.js +6 -0
- package/assets/dashboard-CftAdKiH.js +3 -0
- package/assets/date-picker-DSOkNiNo.js +1 -0
- package/assets/del-modal-Cd4M7af8.js +1 -0
- package/assets/dynamic-controls-BsrJhPDY.js +1 -0
- package/assets/geo-json-CzR5JBXL.js +1 -0
- package/assets/handsontable-BI98OF5R.js +336 -0
- package/assets/history-DLHSU7Ak.js +1 -0
- package/assets/home-NcQ7nnU0.js +2 -0
- package/assets/icon-C2JNaLxH.js +1 -0
- package/assets/init-user-D2HSyXup.js +1 -0
- package/assets/input-error-CH2caTtO.js +1 -0
- package/assets/jsoneditor-DVNQmA6G.js +3869 -0
- package/assets/list-CFU0-TgN.js +4 -0
- package/assets/login-DFSLEO17.js +1 -0
- package/assets/manifest.json +246 -273
- package/assets/material-icon-Bx9pGQiQ.js +1 -0
- package/assets/media-manager-WcKe1EvD.js +6 -0
- package/assets/module-CT7PC6pc.js +1 -0
- package/assets/monaco-Bl4zdWCn.js +11 -0
- package/assets/nav-footer-BiSQkPt4.js +1 -0
- package/assets/nav-main-rTH0PfDw.js +1 -0
- package/assets/nav-user-Bj6cWs0a.js +1 -0
- package/assets/notification-Bi-PX87D.js +20 -0
- package/assets/pagination-render-AKJvTIRA.js +1 -0
- package/assets/register-BTP4uxsK.js +1 -0
- package/assets/ru-eW0WKkga.js +1 -0
- package/assets/theme-switcher-Dm8EOGzx.js +1 -0
- package/assets/toast-editor-DOg_gvSp.js +668 -0
- package/assets/user-filters-list-YUfR4XMI.js +1 -0
- package/assets/user-info-BgSbT02v.js +1 -0
- package/assets/user-menu-content-TQTXHIv6.js +1 -0
- package/assets/{vanilla-picker-l5rcX3cq.js → vanilla-picker-B3LgXoKV.js} +1 -7
- package/assets/welcome-vLwTu1R6.js +1 -0
- package/controllers/add.d.ts +1 -1
- package/controllers/add.js +20 -26
- package/controllers/addGroup.d.ts +1 -1
- package/controllers/addGroup.js +7 -15
- package/controllers/addUser.d.ts +1 -1
- package/controllers/addUser.js +10 -16
- package/controllers/catalog/Catalog.d.ts +1 -1
- package/controllers/catalog/Catalog.js +1 -10
- package/controllers/catalog/FrontendCatalogAdapter.d.ts +3 -3
- package/controllers/catalog/FrontendCatalogAdapter.js +0 -6
- package/controllers/catalog/FrontentCatalogAdapter.d.ts +3 -3
- package/controllers/catalog/FrontentCatalogAdapter.js +0 -4
- package/controllers/ckeditorUpload.js +2 -18
- package/controllers/dashboard.d.ts +1 -1
- package/controllers/dashboard.js +2 -5
- package/controllers/edit.js +24 -37
- package/controllers/editGroup.d.ts +1 -1
- package/controllers/editGroup.js +10 -21
- package/controllers/editUser.d.ts +1 -1
- package/controllers/editUser.js +11 -23
- package/controllers/exportData.d.ts +6 -0
- package/controllers/exportData.js +315 -0
- package/controllers/feed.d.ts +6 -0
- package/controllers/feed.js +73 -0
- package/controllers/feedback/feedbackController.d.ts +1 -1
- package/controllers/feedback/feedbackController.js +5 -7
- package/controllers/filter-fields/columns.d.ts +11 -0
- package/controllers/filter-fields/columns.js +106 -0
- package/controllers/filter-fields/filterFields.d.ts +10 -0
- package/controllers/filter-fields/filterFields.js +141 -0
- package/controllers/filter-fields/getAllUserFilters.d.ts +6 -0
- package/controllers/filter-fields/getAllUserFilters.js +115 -0
- package/controllers/filter-fields/groups.d.ts +5 -0
- package/controllers/filter-fields/groups.js +26 -0
- package/controllers/filter-fields/savedFilters.d.ts +25 -0
- package/controllers/filter-fields/savedFilters.js +317 -0
- package/controllers/getAllWidgets.d.ts +1 -1
- package/controllers/getAllWidgets.js +1 -9
- package/controllers/history-actions/HistoryController.js +6 -31
- package/controllers/initUser.js +6 -5
- package/controllers/inlineUpdate.d.ts +7 -0
- package/controllers/inlineUpdate.js +148 -0
- package/controllers/list.d.ts +1 -1
- package/controllers/list.js +383 -70
- package/controllers/listUserFilters.d.ts +5 -0
- package/controllers/listUserFilters.js +26 -0
- package/controllers/login.js +2 -2
- package/controllers/media-manager/mediaManagerApi.js +0 -9
- package/controllers/navigation/edit.js +3 -9
- package/controllers/notifications/NotificationController.d.ts +1 -1
- package/controllers/notifications/NotificationController.js +12 -36
- package/controllers/register.js +10 -9
- package/controllers/remove.js +10 -19
- package/controllers/timezones.d.ts +1 -1
- package/controllers/timezones.js +0 -6
- package/controllers/userApiKey.d.ts +7 -0
- package/controllers/userApiKey.js +36 -0
- package/controllers/view.js +14 -26
- package/controllers/welcome.d.ts +1 -1
- package/controllers/welcome.js +0 -4
- package/controllers/widgets/Action.d.ts +1 -1
- package/controllers/widgets/Action.js +1 -9
- package/controllers/widgets/Custom.d.ts +1 -1
- package/controllers/widgets/Custom.js +1 -9
- package/controllers/widgets/Info.d.ts +1 -1
- package/controllers/widgets/Info.js +1 -9
- package/controllers/widgets/filterInfo.d.ts +1 -0
- package/controllers/widgets/filterInfo.js +44 -0
- package/controllers/widgets/switch.d.ts +1 -1
- package/controllers/widgets/switch.js +1 -9
- package/controllers/widgetsDB.d.ts +1 -1
- package/controllers/widgetsDB.js +2 -8
- package/helpers/accessRightsHelper.d.ts +1 -1
- package/helpers/accessRightsHelper.js +5 -4
- package/helpers/apiKeyHelper.d.ts +5 -0
- package/helpers/apiKeyHelper.js +8 -0
- package/helpers/configHelper.js +12 -15
- package/helpers/controllerHelper.d.ts +14 -21
- package/helpers/controllerHelper.js +50 -83
- package/helpers/fieldsHelper.js +3 -3
- package/helpers/filterDatetimeHelper.d.ts +5 -0
- package/helpers/filterDatetimeHelper.js +84 -0
- package/helpers/inertiaActionsHelper.d.ts +2 -2
- package/helpers/inertiaActionsHelper.js +5 -4
- package/helpers/inertiaAddHelper.d.ts +3 -414
- package/helpers/inertiaAddHelper.js +39 -15
- package/helpers/inertiaGroupHelper.d.ts +2 -2
- package/helpers/inertiaGroupHelper.js +3 -3
- package/helpers/inertiaListHelper.d.ts +7 -3
- package/helpers/inertiaListHelper.js +26 -12
- package/helpers/inertiaMenuHelper.d.ts +1 -0
- package/helpers/inertiaMenuHelper.js +15 -3
- package/helpers/inertiaUserHelper.d.ts +3 -2
- package/helpers/inertiaUserHelper.js +7 -3
- package/helpers/menuHelper.d.ts +5 -2
- package/helpers/menuHelper.js +64 -12
- package/helpers/viteHelper.js +1 -2
- package/index.d.ts +6 -2
- package/index.js +6 -2
- package/interfaces/adminpanelConfig.d.ts +126 -39
- package/interfaces/internalModelAccess.d.ts +37 -0
- package/interfaces/internalModelAccess.js +1 -0
- package/interfaces/listQueryBuilder.d.ts +22 -0
- package/interfaces/listQueryBuilder.js +1 -0
- package/interfaces/queryCriteria.d.ts +54 -0
- package/interfaces/queryCriteria.js +1 -0
- package/interfaces/types.d.ts +1 -13
- package/lib/Adminizer.d.ts +4 -2
- package/lib/Adminizer.js +29 -10
- package/lib/DataAccessor.d.ts +8 -5
- package/lib/DataAccessor.js +89 -42
- package/lib/I18n.d.ts +5 -1
- package/lib/I18n.js +45 -19
- package/lib/MiddlewareManager.d.ts +8 -0
- package/lib/MiddlewareManager.js +53 -0
- package/lib/ai-assistant/OpenAiModelService.d.ts +3 -3
- package/lib/ai-assistant/OpenAiModelService.js +23 -24
- package/lib/catalog/Navigation.d.ts +1 -0
- package/lib/catalog/Navigation.js +12 -11
- package/lib/controls/jsoneditor/JsonEditor.d.ts +1 -2
- package/lib/controls/markdown/ToastUiEditor.d.ts +1 -2
- package/lib/feedback/FeedbackHandler.js +2 -2
- package/lib/filters/ConditionValidator.d.ts +107 -0
- package/lib/filters/ConditionValidator.js +483 -0
- package/lib/filters/CustomFilterHandler.d.ts +122 -0
- package/lib/filters/CustomFilterHandler.js +131 -0
- package/lib/filters/FilterCustomFieldHandler.d.ts +2 -0
- package/lib/filters/FilterCustomFieldHandler.js +2 -0
- package/lib/filters/FilterService.d.ts +82 -0
- package/lib/filters/FilterService.js +323 -0
- package/lib/filters/index.d.ts +6 -0
- package/lib/filters/index.js +4 -0
- package/lib/history-actions/AbstractHistoryAdapter.d.ts +5 -4
- package/lib/history-actions/AbstractHistoryAdapter.js +45 -30
- package/lib/history-actions/DefaultHistoryAdapter.d.ts +2 -0
- package/lib/history-actions/DefaultHistoryAdapter.js +12 -6
- package/lib/history-actions/HistoryHandler.js +1 -1
- package/lib/list-query-builder/ListQueryBuilder.d.ts +117 -0
- package/lib/list-query-builder/ListQueryBuilder.js +707 -0
- package/lib/media-manager/AbstractMediaManager.d.ts +9 -8
- package/lib/media-manager/DefaultMediaManager.d.ts +2 -0
- package/lib/media-manager/DefaultMediaManager.js +27 -15
- package/lib/media-manager/Items.d.ts +4 -1
- package/lib/media-manager/Items.js +62 -59
- package/lib/media-manager/MediaManagerHandler.js +1 -1
- package/lib/media-manager/helpers/MediaManagerHelper.d.ts +5 -1
- package/lib/media-manager/helpers/MediaManagerHelper.js +38 -4
- package/lib/model/AbstractModel.d.ts +33 -25
- package/lib/model/AbstractModel.js +54 -2
- package/lib/model/InternalModelAccessFactory.d.ts +18 -0
- package/lib/model/InternalModelAccessFactory.js +82 -0
- package/lib/model/ModelHandler.d.ts +6 -0
- package/lib/model/ModelHandler.js +14 -0
- package/lib/model/adapter/sequelize.d.ts +32 -10
- package/lib/model/adapter/sequelize.js +409 -62
- package/lib/model/adapter/typeorm.d.ts +62 -0
- package/lib/model/adapter/typeorm.js +777 -0
- package/lib/model/internalModelAccessToken.d.ts +1 -0
- package/lib/model/internalModelAccessToken.js +1 -0
- package/lib/model/internalModelRepository.d.ts +3 -0
- package/lib/model/internalModelRepository.js +4 -0
- package/lib/notifications/AbstractNotificationService.d.ts +3 -0
- package/lib/notifications/AbstractNotificationService.js +42 -36
- package/lib/notifications/GeneralNotificationService.js +37 -40
- package/lib/notifications/SystemNotificationService.js +33 -36
- package/lib/requestProcessor.js +0 -3
- package/lib/ui-i18n/getUiTranslations.d.ts +1 -0
- package/lib/ui-i18n/getUiTranslations.js +3 -0
- package/lib/ui-i18n/uiTranslationKeys.d.ts +6 -0
- package/lib/ui-i18n/uiTranslationKeys.js +268 -0
- package/lib/widgets/widgetHandler.d.ts +7 -2
- package/lib/widgets/widgetHandler.js +98 -18
- package/models/FilterAP.d.ts +116 -0
- package/models/FilterAP.js +68 -0
- package/models/FilterColumnAP.d.ts +32 -0
- package/models/FilterColumnAP.js +21 -0
- package/models/GroupAP.d.ts +1 -1
- package/models/HistoryActionsAP.d.ts +3 -3
- package/models/MediaManagerMetaAP.d.ts +1 -1
- package/models/NavigationAP.d.ts +1 -1
- package/models/UserAP.d.ts +6 -1
- package/models/UserAP.js +4 -0
- package/package.json +39 -32
- package/policies/authPolicies.d.ts +12 -0
- package/policies/authPolicies.js +104 -0
- package/policies/permissionResolvers.d.ts +12 -0
- package/policies/permissionResolvers.js +52 -0
- package/services/FeedService.d.ts +70 -0
- package/services/FeedService.js +334 -0
- package/system/Router.d.ts +1 -0
- package/system/Router.js +136 -59
- package/system/bindAccessRights.js +11 -30
- package/system/bindAuthorization.js +18 -18
- package/system/bindCors.js +16 -1
- package/system/bindCustomFilterHandlers.d.ts +2 -0
- package/system/bindCustomFilterHandlers.js +4 -0
- package/system/bindInertia.js +18 -61
- package/system/bindReqFunctions.js +10 -2
- package/system/bindTranslations.js +7 -3
- package/system/buildInternalModelAccess.d.ts +4 -0
- package/system/buildInternalModelAccess.js +59 -0
- package/system/defaults.js +18 -14
- package/system/routePolicies.d.ts +2 -0
- package/system/routePolicies.js +29 -0
- package/translations/en.json +151 -39
- package/translations/ru.json +211 -64
- package/ui/components/handsontable.js +13 -27
- package/ui/components/ui/dialog-stack.js +1 -3
- package/ui/components/ui/popover.js +1 -1
- package/ui/components/ui/sidebar.js +1 -1
- package/assets/RelationDialogStack-D9UVEF9s.js +0 -407
- package/assets/RelationDialogStack-DV8OITPR.css +0 -4
- package/assets/add-BlvzWQKF.js +0 -1
- package/assets/add-group-1Uoq9NWe.js +0 -1
- package/assets/add-group-form-B01gwDGu.js +0 -1
- package/assets/add-user-BQCAsaRy.js +0 -1
- package/assets/add-user-form-Cgwc9JkI.js +0 -1
- package/assets/app-DaOMy1nl.css +0 -72
- package/assets/app-layout-CAm60qoE.js +0 -1
- package/assets/app-shell-QWCtn9ye.js +0 -1
- package/assets/app-sidebar-CfaYbnSy.js +0 -1
- package/assets/app-sidebar-header-BsPFDhZ8.js +0 -1
- package/assets/breadcrumbs-CZZirDj8.js +0 -1
- package/assets/catalog-k5myk7fk.js +0 -6
- package/assets/dashboard-BkL9ybBw.js +0 -3
- package/assets/date-picker-B5AZ_7Q9.js +0 -1
- package/assets/del-modal-BoyXZloG.js +0 -1
- package/assets/dynamic-controls-k61T9W2P.js +0 -1
- package/assets/form-1WGY0YgG.js +0 -1
- package/assets/form-DJapG3qF.js +0 -1
- package/assets/geo-json-DsMUHo0l.js +0 -4
- package/assets/handsontable-PxYdjN8c.js +0 -298
- package/assets/history-CluyR-yJ.js +0 -1
- package/assets/home-Dug9zBzM.js +0 -2
- package/assets/icon-DfDLMG5f.js +0 -1
- package/assets/init-user-CF80MEnT.js +0 -1
- package/assets/input-error-DuuqFgZa.js +0 -1
- package/assets/jsoneditor-De1FvcYu.js +0 -3882
- package/assets/list-CuexshNt.js +0 -1
- package/assets/list-table-BsEWjTKY.js +0 -22
- package/assets/login-eDemYzN-.js +0 -1
- package/assets/material-icon-DMT8KdmE.js +0 -1
- package/assets/media-manager-DfYa_mT_.js +0 -14
- package/assets/module-Cd4Tm6uq.js +0 -1
- package/assets/monaco-BhBYtg3d.js +0 -11
- package/assets/nav-footer-D3olYxtz.js +0 -1
- package/assets/nav-main-BctqyzeV.js +0 -1
- package/assets/nav-user-Bn1Lt-BZ.js +0 -1
- package/assets/notification-D64qvni-.js +0 -27
- package/assets/pagination-render-DxD78ahJ.js +0 -1
- package/assets/register-349PwYbe.js +0 -1
- package/assets/theme-switcher-DfExsHW2.js +0 -1
- package/assets/toast-editor-ESK5iWPx.js +0 -845
- package/assets/user-info-DtBK5Kh8.js +0 -1
- package/assets/user-menu-content-0XYOCMaA.js +0 -1
- package/assets/welcome-PDp-gUei.js +0 -1
- package/controllers/form.d.ts +0 -1
- package/controllers/form.js +0 -86
- package/helpers/formHelper.d.ts +0 -6
- package/helpers/formHelper.js +0 -38
- package/helpers/inertiaFromHelper.d.ts +0 -11
- package/helpers/inertiaFromHelper.js +0 -98
- package/helpers/runtimeMode.d.ts +0 -1
- package/helpers/runtimeMode.js +0 -3
- package/lib/PolicyManager.d.ts +0 -8
- package/lib/PolicyManager.js +0 -53
- package/lib/datatable/NodeTable.d.ts +0 -49
- package/lib/datatable/NodeTable.js +0 -207
- package/lib/model/adapter/waterline.d.ts +0 -32
- package/lib/model/adapter/waterline.js +0 -180
- package/migrations/index.d.ts +0 -3
- package/migrations/index.js +0 -4
- package/migrations/knex/20250106000001_adminizer_init.d.ts +0 -8
- package/migrations/knex/20250106000001_adminizer_init.js +0 -164
- package/migrations/umzug/0001.d.ts +0 -7
- package/migrations/umzug/0001.js +0 -121
- package/migrations/umzugExports.d.ts +0 -2
- package/migrations/umzugExports.js +0 -9
- package/system/bindForms.d.ts +0 -2
- package/system/bindForms.js +0 -20
- /package/{policies → middlewares}/addMessages.d.ts +0 -0
- /package/{policies → middlewares}/addMessages.js +0 -0
- /package/{policies → middlewares}/checkAuth.d.ts +0 -0
- /package/{policies → middlewares}/checkAuth.js +0 -0
- /package/{policies → middlewares}/setLocale.d.ts +0 -0
- /package/{policies → middlewares}/setLocale.js +0 -0
|
@@ -0,0 +1,336 @@
|
|
|
1
|
+
import{a as L$}from"./jsoneditor-DVNQmA6G.js";function T6(n,e){for(var t=0;t<e.length;t++){const o=e[t];if(typeof o!="string"&&!Array.isArray(o)){for(const i in o)if(i!=="default"&&!(i in n)){const s=Object.getOwnPropertyDescriptor(o,i);s&&Object.defineProperty(n,i,s.get?s:{enumerable:!0,get:()=>o[i]})}}}return Object.freeze(Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}))}var W_={exports:{}},ze={};var pI;function x6(){if(pI)return ze;pI=1;var n=Symbol.for("react.transitional.element"),e=Symbol.for("react.portal"),t=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),s=Symbol.for("react.consumer"),r=Symbol.for("react.context"),a=Symbol.for("react.forward_ref"),l=Symbol.for("react.suspense"),h=Symbol.for("react.memo"),c=Symbol.for("react.lazy"),d=Symbol.for("react.activity"),u=Symbol.iterator;function f(W){return W===null||typeof W!="object"?null:(W=u&&W[u]||W["@@iterator"],typeof W=="function"?W:null)}var p={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},C=Object.assign,_={};function S(W,q,Ce){this.props=W,this.context=q,this.refs=_,this.updater=Ce||p}S.prototype.isReactComponent={},S.prototype.setState=function(W,q){if(typeof W!="object"&&typeof W!="function"&&W!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,W,q,"setState")},S.prototype.forceUpdate=function(W){this.updater.enqueueForceUpdate(this,W,"forceUpdate")};function T(){}T.prototype=S.prototype;function P(W,q,Ce){this.props=W,this.context=q,this.refs=_,this.updater=Ce||p}var F=P.prototype=new T;F.constructor=P,C(F,S.prototype),F.isPureReactComponent=!0;var V=Array.isArray;function D(){}var I={H:null,A:null,T:null,S:null},G=Object.prototype.hasOwnProperty;function z(W,q,Ce){var $=Ce.ref;return{$$typeof:n,type:W,key:q,ref:$!==void 0?$:null,props:Ce}}function Y(W,q){return z(W.type,q,W.props)}function te(W){return typeof W=="object"&&W!==null&&W.$$typeof===n}function ee(W){var q={"=":"=0",":":"=2"};return"$"+W.replace(/[=:]/g,function(Ce){return q[Ce]})}var be=/\/+/g;function me(W,q){return typeof W=="object"&&W!==null&&W.key!=null?ee(""+W.key):q.toString(36)}function Ve(W){switch(W.status){case"fulfilled":return W.value;case"rejected":throw W.reason;default:switch(typeof W.status=="string"?W.then(D,D):(W.status="pending",W.then(function(q){W.status==="pending"&&(W.status="fulfilled",W.value=q)},function(q){W.status==="pending"&&(W.status="rejected",W.reason=q)})),W.status){case"fulfilled":return W.value;case"rejected":throw W.reason}}throw W}function Ye(W,q,Ce,$,Re){var Se=typeof W;(Se==="undefined"||Se==="boolean")&&(W=null);var g=!1;if(W===null)g=!0;else switch(Se){case"bigint":case"string":case"number":g=!0;break;case"object":switch(W.$$typeof){case n:case e:g=!0;break;case c:return g=W._init,Ye(g(W._payload),q,Ce,$,Re)}}if(g)return Re=Re(W),g=$===""?"."+me(W,0):$,V(Re)?(Ce="",g!=null&&(Ce=g.replace(be,"$&/")+"/"),Ye(Re,q,Ce,"",function(m){return m})):Re!=null&&(te(Re)&&(Re=Y(Re,Ce+(Re.key==null||W&&W.key===Re.key?"":(""+Re.key).replace(be,"$&/")+"/")+g)),q.push(Re)),1;g=0;var b=$===""?".":$+":";if(V(W))for(var v=0;v<W.length;v++)$=W[v],Se=b+me($,v),g+=Ye($,q,Ce,Se,Re);else if(v=f(W),typeof v=="function")for(W=v.call(W),v=0;!($=W.next()).done;)$=$.value,Se=b+me($,v++),g+=Ye($,q,Ce,Se,Re);else if(Se==="object"){if(typeof W.then=="function")return Ye(Ve(W),q,Ce,$,Re);throw q=String(W),Error("Objects are not valid as a React child (found: "+(q==="[object Object]"?"object with keys {"+Object.keys(W).join(", ")+"}":q)+"). If you meant to render a collection of children, use an array instead.")}return g}function Me(W,q,Ce){if(W==null)return W;var $=[],Re=0;return Ye(W,$,"","",function(Se){return q.call(Ce,Se,Re++)}),$}function Ge(W){if(W._status===-1){var q=W._result;q=q(),q.then(function(Ce){(W._status===0||W._status===-1)&&(W._status=1,W._result=Ce)},function(Ce){(W._status===0||W._status===-1)&&(W._status=2,W._result=Ce)}),W._status===-1&&(W._status=0,W._result=q)}if(W._status===1)return W._result.default;throw W._result}var wt=typeof reportError=="function"?reportError:function(W){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var q=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof W=="object"&&W!==null&&typeof W.message=="string"?String(W.message):String(W),error:W});if(!window.dispatchEvent(q))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",W);return}console.error(W)},on={map:Me,forEach:function(W,q,Ce){Me(W,function(){q.apply(this,arguments)},Ce)},count:function(W){var q=0;return Me(W,function(){q++}),q},toArray:function(W){return Me(W,function(q){return q})||[]},only:function(W){if(!te(W))throw Error("React.Children.only expected to receive a single React element child.");return W}};return ze.Activity=d,ze.Children=on,ze.Component=S,ze.Fragment=t,ze.Profiler=i,ze.PureComponent=P,ze.StrictMode=o,ze.Suspense=l,ze.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=I,ze.__COMPILER_RUNTIME={__proto__:null,c:function(W){return I.H.useMemoCache(W)}},ze.cache=function(W){return function(){return W.apply(null,arguments)}},ze.cacheSignal=function(){return null},ze.cloneElement=function(W,q,Ce){if(W==null)throw Error("The argument must be a React element, but you passed "+W+".");var $=C({},W.props),Re=W.key;if(q!=null)for(Se in q.key!==void 0&&(Re=""+q.key),q)!G.call(q,Se)||Se==="key"||Se==="__self"||Se==="__source"||Se==="ref"&&q.ref===void 0||($[Se]=q[Se]);var Se=arguments.length-2;if(Se===1)$.children=Ce;else if(1<Se){for(var g=Array(Se),b=0;b<Se;b++)g[b]=arguments[b+2];$.children=g}return z(W.type,Re,$)},ze.createContext=function(W){return W={$$typeof:r,_currentValue:W,_currentValue2:W,_threadCount:0,Provider:null,Consumer:null},W.Provider=W,W.Consumer={$$typeof:s,_context:W},W},ze.createElement=function(W,q,Ce){var $,Re={},Se=null;if(q!=null)for($ in q.key!==void 0&&(Se=""+q.key),q)G.call(q,$)&&$!=="key"&&$!=="__self"&&$!=="__source"&&(Re[$]=q[$]);var g=arguments.length-2;if(g===1)Re.children=Ce;else if(1<g){for(var b=Array(g),v=0;v<g;v++)b[v]=arguments[v+2];Re.children=b}if(W&&W.defaultProps)for($ in g=W.defaultProps,g)Re[$]===void 0&&(Re[$]=g[$]);return z(W,Se,Re)},ze.createRef=function(){return{current:null}},ze.forwardRef=function(W){return{$$typeof:a,render:W}},ze.isValidElement=te,ze.lazy=function(W){return{$$typeof:c,_payload:{_status:-1,_result:W},_init:Ge}},ze.memo=function(W,q){return{$$typeof:h,type:W,compare:q===void 0?null:q}},ze.startTransition=function(W){var q=I.T,Ce={};I.T=Ce;try{var $=W(),Re=I.S;Re!==null&&Re(Ce,$),typeof $=="object"&&$!==null&&typeof $.then=="function"&&$.then(D,wt)}catch(Se){wt(Se)}finally{q!==null&&Ce.types!==null&&(q.types=Ce.types),I.T=q}},ze.unstable_useCacheRefresh=function(){return I.H.useCacheRefresh()},ze.use=function(W){return I.H.use(W)},ze.useActionState=function(W,q,Ce){return I.H.useActionState(W,q,Ce)},ze.useCallback=function(W,q){return I.H.useCallback(W,q)},ze.useContext=function(W){return I.H.useContext(W)},ze.useDebugValue=function(){},ze.useDeferredValue=function(W,q){return I.H.useDeferredValue(W,q)},ze.useEffect=function(W,q){return I.H.useEffect(W,q)},ze.useEffectEvent=function(W){return I.H.useEffectEvent(W)},ze.useId=function(){return I.H.useId()},ze.useImperativeHandle=function(W,q,Ce){return I.H.useImperativeHandle(W,q,Ce)},ze.useInsertionEffect=function(W,q){return I.H.useInsertionEffect(W,q)},ze.useLayoutEffect=function(W,q){return I.H.useLayoutEffect(W,q)},ze.useMemo=function(W,q){return I.H.useMemo(W,q)},ze.useOptimistic=function(W,q){return I.H.useOptimistic(W,q)},ze.useReducer=function(W,q,Ce){return I.H.useReducer(W,q,Ce)},ze.useRef=function(W){return I.H.useRef(W)},ze.useState=function(W){return I.H.useState(W)},ze.useSyncExternalStore=function(W,q,Ce){return I.H.useSyncExternalStore(W,q,Ce)},ze.useTransition=function(){return I.H.useTransition()},ze.version="19.2.6",ze}var mI;function W$(){return mI||(mI=1,W_.exports=x6()),W_.exports}var Be=W$();const Xn=L$(Be),Fye=T6({__proto__:null,default:Xn},[Be]);var $_={exports:{}},No={};var wI;function M6(){if(wI)return No;wI=1;var n=W$();function e(l){var h="https://react.dev/errors/"+l;if(1<arguments.length){h+="?args[]="+encodeURIComponent(arguments[1]);for(var c=2;c<arguments.length;c++)h+="&args[]="+encodeURIComponent(arguments[c])}return"Minified React error #"+l+"; visit "+h+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function t(){}var o={d:{f:t,r:function(){throw Error(e(522))},D:t,C:t,L:t,m:t,X:t,S:t,M:t},p:0,findDOMNode:null},i=Symbol.for("react.portal");function s(l,h,c){var d=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:i,key:d==null?null:""+d,children:l,containerInfo:h,implementation:c}}var r=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function a(l,h){if(l==="font")return"";if(typeof h=="string")return h==="use-credentials"?h:""}return No.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=o,No.createPortal=function(l,h){var c=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!h||h.nodeType!==1&&h.nodeType!==9&&h.nodeType!==11)throw Error(e(299));return s(l,h,null,c)},No.flushSync=function(l){var h=r.T,c=o.p;try{if(r.T=null,o.p=2,l)return l()}finally{r.T=h,o.p=c,o.d.f()}},No.preconnect=function(l,h){typeof l=="string"&&(h?(h=h.crossOrigin,h=typeof h=="string"?h==="use-credentials"?h:"":void 0):h=null,o.d.C(l,h))},No.prefetchDNS=function(l){typeof l=="string"&&o.d.D(l)},No.preinit=function(l,h){if(typeof l=="string"&&h&&typeof h.as=="string"){var c=h.as,d=a(c,h.crossOrigin),u=typeof h.integrity=="string"?h.integrity:void 0,f=typeof h.fetchPriority=="string"?h.fetchPriority:void 0;c==="style"?o.d.S(l,typeof h.precedence=="string"?h.precedence:void 0,{crossOrigin:d,integrity:u,fetchPriority:f}):c==="script"&&o.d.X(l,{crossOrigin:d,integrity:u,fetchPriority:f,nonce:typeof h.nonce=="string"?h.nonce:void 0})}},No.preinitModule=function(l,h){if(typeof l=="string")if(typeof h=="object"&&h!==null){if(h.as==null||h.as==="script"){var c=a(h.as,h.crossOrigin);o.d.M(l,{crossOrigin:c,integrity:typeof h.integrity=="string"?h.integrity:void 0,nonce:typeof h.nonce=="string"?h.nonce:void 0})}}else h==null&&o.d.M(l)},No.preload=function(l,h){if(typeof l=="string"&&typeof h=="object"&&h!==null&&typeof h.as=="string"){var c=h.as,d=a(c,h.crossOrigin);o.d.L(l,c,{crossOrigin:d,integrity:typeof h.integrity=="string"?h.integrity:void 0,nonce:typeof h.nonce=="string"?h.nonce:void 0,type:typeof h.type=="string"?h.type:void 0,fetchPriority:typeof h.fetchPriority=="string"?h.fetchPriority:void 0,referrerPolicy:typeof h.referrerPolicy=="string"?h.referrerPolicy:void 0,imageSrcSet:typeof h.imageSrcSet=="string"?h.imageSrcSet:void 0,imageSizes:typeof h.imageSizes=="string"?h.imageSizes:void 0,media:typeof h.media=="string"?h.media:void 0})}},No.preloadModule=function(l,h){if(typeof l=="string")if(h){var c=a(h.as,h.crossOrigin);o.d.m(l,{as:typeof h.as=="string"&&h.as!=="script"?h.as:void 0,crossOrigin:c,integrity:typeof h.integrity=="string"?h.integrity:void 0})}else o.d.m(l)},No.requestFormReset=function(l){o.d.r(l)},No.unstable_batchedUpdates=function(l,h){return l(h)},No.useFormState=function(l,h,c){return r.H.useFormState(l,h,c)},No.useFormStatus=function(){return r.H.useHostTransitionStatus()},No.version="19.2.6",No}var bI;function I6(){if(bI)return $_.exports;bI=1;function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}return n(),$_.exports=M6(),$_.exports}var H6=I6();const $$=L$(H6);function CI(n,e){(e==null||e>n.length)&&(e=n.length);for(var t=0,o=Array(e);t<e;t++)o[t]=n[t];return o}function A6(n){if(Array.isArray(n))return n}function O6(n,e){var t=n==null?null:typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(t!=null){var o,i,s,r,a=[],l=!0,h=!1;try{if(s=(t=t.call(n)).next,e!==0)for(;!(l=(o=s.call(t)).done)&&(a.push(o.value),a.length!==e);l=!0);}catch(c){h=!0,i=c}finally{try{if(!l&&t.return!=null&&(r=t.return(),Object(r)!==r))return}finally{if(h)throw i}}return a}}function D6(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
2
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function N6(n,e){return A6(n)||O6(n,e)||P6(n,e)||D6()}function P6(n,e){if(n){if(typeof n=="string")return CI(n,e);var t={}.toString.call(n).slice(8,-1);return t==="Object"&&n.constructor&&(t=n.constructor.name),t==="Map"||t==="Set"?Array.from(n):t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?CI(n,e):void 0}}const F$=Object.entries,yI=Object.setPrototypeOf,L6=Object.isFrozen,W6=Object.getPrototypeOf,$6=Object.getOwnPropertyDescriptor;let gi=Object.freeze,ks=Object.seal,lu=Object.create,B$=typeof Reflect<"u"&&Reflect,cE=B$.apply,dE=B$.construct;gi||(gi=function(e){return e});ks||(ks=function(e){return e});cE||(cE=function(e,t){for(var o=arguments.length,i=new Array(o>2?o-2:0),s=2;s<o;s++)i[s-2]=arguments[s];return e.apply(t,i)});dE||(dE=function(e){for(var t=arguments.length,o=new Array(t>1?t-1:0),i=1;i<t;i++)o[i-1]=arguments[i];return new e(...o)});const sd=Zn(Array.prototype.forEach),F6=Zn(Array.prototype.lastIndexOf),_I=Zn(Array.prototype.pop),rd=Zn(Array.prototype.push),B6=Zn(Array.prototype.splice),ri=Array.isArray,Fg=Zn(String.prototype.toLowerCase),F_=Zn(String.prototype.toString),SI=Zn(String.prototype.match),ad=Zn(String.prototype.replace),vI=Zn(String.prototype.indexOf),V6=Zn(String.prototype.trim),z6=Zn(Number.prototype.toString),U6=Zn(Boolean.prototype.toString),RI=typeof BigInt>"u"?null:Zn(BigInt.prototype.toString),EI=typeof Symbol>"u"?null:Zn(Symbol.prototype.toString),Rn=Zn(Object.prototype.hasOwnProperty),Rf=Zn(Object.prototype.toString),Mo=Zn(RegExp.prototype.test),tw=Y6(TypeError);function Zn(n){return function(e){e instanceof RegExp&&(e.lastIndex=0);for(var t=arguments.length,o=new Array(t>1?t-1:0),i=1;i<t;i++)o[i-1]=arguments[i];return cE(n,e,o)}}function Y6(n){return function(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];return dE(n,t)}}function Xe(n,e){let t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Fg;if(yI&&yI(n,null),!ri(e))return n;let o=e.length;for(;o--;){let i=e[o];if(typeof i=="string"){const s=t(i);s!==i&&(L6(e)||(e[o]=s),i=s)}n[i]=!0}return n}function G6(n){for(let e=0;e<n.length;e++)Rn(n,e)||(n[e]=null);return n}function vi(n){const e=lu(null);for(const o of F$(n)){var t=N6(o,2);const i=t[0],s=t[1];Rn(n,i)&&(ri(s)?e[i]=G6(s):s&&typeof s=="object"&&s.constructor===Object?e[i]=vi(s):e[i]=s)}return e}function j6(n){switch(typeof n){case"string":return n;case"number":return z6(n);case"boolean":return U6(n);case"bigint":return RI?RI(n):"0";case"symbol":return EI?EI(n):"Symbol()";case"undefined":return Rf(n);case"function":case"object":{if(n===null)return Rf(n);const e=n,t=ic(e,"toString");if(typeof t=="function"){const o=t(e);return typeof o=="string"?o:Rf(o)}return Rf(n)}default:return Rf(n)}}function ic(n,e){for(;n!==null;){const o=$6(n,e);if(o){if(o.get)return Zn(o.get);if(typeof o.value=="function")return Zn(o.value)}n=W6(n)}function t(){return null}return t}function q6(n){try{return Mo(n,""),!0}catch{return!1}}const kI=gi(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),B_=gi(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),V_=gi(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),K6=gi(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),z_=gi(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),X6=gi(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),TI=gi(["#text"]),xI=gi(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","command","commandfor","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns"]),U_=gi(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),MI=gi(["accent","accentunder","align","bevelled","close","columnalign","columnlines","columnspacing","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lquote","lspace","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),nw=gi(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),Z6=ks(/{{[\w\W]*|^[\w\W]*}}/g),Q6=ks(/<%[\w\W]*|^[\w\W]*%>/g),J6=ks(/\${[\w\W]*/g),eG=ks(/^data-[\-\w.\u00B7-\uFFFF]+$/),tG=ks(/^aria-[\-\w]+$/),II=ks(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),nG=ks(/^(?:\w+script|data):/i),oG=ks(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),iG=ks(/^html$/i),sG=ks(/^[a-z][.\w]*(-[.\w]+)+$/i),ld={element:1,text:3,progressingInstruction:7,comment:8,document:9},rG=function(){return typeof window>"u"?null:window},aG=function(e,t){if(typeof e!="object"||typeof e.createPolicy!="function")return null;let o=null;const i="data-tt-policy-suffix";t&&t.hasAttribute(i)&&(o=t.getAttribute(i));const s="dompurify"+(o?"#"+o:"");try{return e.createPolicy(s,{createHTML(r){return r},createScriptURL(r){return r}})}catch{return console.warn("TrustedTypes policy "+s+" could not be created."),null}},HI=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function V$(){let n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:rG();const e=ke=>V$(ke);if(e.version="3.4.5",e.removed=[],!n||!n.document||n.document.nodeType!==ld.document||!n.Element)return e.isSupported=!1,e;let t=n.document;const o=t,i=o.currentScript,s=n.DocumentFragment,r=n.HTMLTemplateElement,a=n.Node,l=n.Element,h=n.NodeFilter,c=n.NamedNodeMap,d=c===void 0?n.NamedNodeMap||n.MozNamedAttrMap:c,u=n.HTMLFormElement,f=n.DOMParser,p=n.trustedTypes,C=l.prototype,_=ic(C,"cloneNode"),S=ic(C,"remove"),T=ic(C,"nextSibling"),P=ic(C,"childNodes"),F=ic(C,"parentNode"),V=a&&a.prototype?ic(a.prototype,"nodeType"):null;if(typeof r=="function"){const ke=t.createElement("template");ke.content&&ke.content.ownerDocument&&(t=ke.content.ownerDocument)}let D,I="";const G=t,z=G.implementation,Y=G.createNodeIterator,te=G.createDocumentFragment,ee=G.getElementsByTagName,be=o.importNode;let me=HI();e.isSupported=typeof F$=="function"&&typeof F=="function"&&z&&z.createHTMLDocument!==void 0;const Ve=Z6,Ye=Q6,Me=J6,Ge=eG,wt=tG,on=nG,W=oG,q=sG;let Ce=II,$=null;const Re=Xe({},[...kI,...B_,...V_,...z_,...TI]);let Se=null;const g=Xe({},[...xI,...U_,...MI,...nw]);let b=Object.seal(lu(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),v=null,m=null;const w=Object.seal(lu(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let y=!0,E=!0,k=!1,M=!0,N=!1,R=!0,A=!1,L=!1,H=!1,j=!1,ue=!1,re=!1,Ae=!0,Ne=!1;const nt="user-content-";let Oe=!0,je=!1,xt={},qt=null;const Ro=Xe({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let yn=null;const zt=Xe({},["audio","video","img","source","image","track"]);let Eo=null;const lo=Xe({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),dn="http://www.w3.org/1998/Math/MathML",Mt="http://www.w3.org/2000/svg",mi="http://www.w3.org/1999/xhtml";let Jo=mi,pl=!1,la=null;const ha=Xe({},[dn,Mt,mi],F_);let _f=Xe({},["mi","mo","mn","ms","mtext"]),Sf=Xe({},["annotation-xml"]);const vf=Xe({},["title","style","font","a","script"]);let Do=null;const Fi=["application/xhtml+xml","text/html"],Qm="text/html";let _n=null,id=null;const R6=t.createElement("form"),oI=function(x){return x instanceof RegExp||x instanceof Function},D_=function(){let x=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(id&&id===x)return;(!x||typeof x!="object")&&(x={}),x=vi(x),Do=Fi.indexOf(x.PARSER_MEDIA_TYPE)===-1?Qm:x.PARSER_MEDIA_TYPE,_n=Do==="application/xhtml+xml"?F_:Fg,$=Rn(x,"ALLOWED_TAGS")&&ri(x.ALLOWED_TAGS)?Xe({},x.ALLOWED_TAGS,_n):Re,Se=Rn(x,"ALLOWED_ATTR")&&ri(x.ALLOWED_ATTR)?Xe({},x.ALLOWED_ATTR,_n):g,la=Rn(x,"ALLOWED_NAMESPACES")&&ri(x.ALLOWED_NAMESPACES)?Xe({},x.ALLOWED_NAMESPACES,F_):ha,Eo=Rn(x,"ADD_URI_SAFE_ATTR")&&ri(x.ADD_URI_SAFE_ATTR)?Xe(vi(lo),x.ADD_URI_SAFE_ATTR,_n):lo,yn=Rn(x,"ADD_DATA_URI_TAGS")&&ri(x.ADD_DATA_URI_TAGS)?Xe(vi(zt),x.ADD_DATA_URI_TAGS,_n):zt,qt=Rn(x,"FORBID_CONTENTS")&&ri(x.FORBID_CONTENTS)?Xe({},x.FORBID_CONTENTS,_n):Ro,v=Rn(x,"FORBID_TAGS")&&ri(x.FORBID_TAGS)?Xe({},x.FORBID_TAGS,_n):vi({}),m=Rn(x,"FORBID_ATTR")&&ri(x.FORBID_ATTR)?Xe({},x.FORBID_ATTR,_n):vi({}),xt=Rn(x,"USE_PROFILES")?x.USE_PROFILES&&typeof x.USE_PROFILES=="object"?vi(x.USE_PROFILES):x.USE_PROFILES:!1,y=x.ALLOW_ARIA_ATTR!==!1,E=x.ALLOW_DATA_ATTR!==!1,k=x.ALLOW_UNKNOWN_PROTOCOLS||!1,M=x.ALLOW_SELF_CLOSE_IN_ATTR!==!1,N=x.SAFE_FOR_TEMPLATES||!1,R=x.SAFE_FOR_XML!==!1,A=x.WHOLE_DOCUMENT||!1,j=x.RETURN_DOM||!1,ue=x.RETURN_DOM_FRAGMENT||!1,re=x.RETURN_TRUSTED_TYPE||!1,H=x.FORCE_BODY||!1,Ae=x.SANITIZE_DOM!==!1,Ne=x.SANITIZE_NAMED_PROPS||!1,Oe=x.KEEP_CONTENT!==!1,je=x.IN_PLACE||!1,Ce=q6(x.ALLOWED_URI_REGEXP)?x.ALLOWED_URI_REGEXP:II,Jo=typeof x.NAMESPACE=="string"?x.NAMESPACE:mi,_f=Rn(x,"MATHML_TEXT_INTEGRATION_POINTS")&&x.MATHML_TEXT_INTEGRATION_POINTS&&typeof x.MATHML_TEXT_INTEGRATION_POINTS=="object"?vi(x.MATHML_TEXT_INTEGRATION_POINTS):Xe({},["mi","mo","mn","ms","mtext"]),Sf=Rn(x,"HTML_INTEGRATION_POINTS")&&x.HTML_INTEGRATION_POINTS&&typeof x.HTML_INTEGRATION_POINTS=="object"?vi(x.HTML_INTEGRATION_POINTS):Xe({},["annotation-xml"]);const K=Rn(x,"CUSTOM_ELEMENT_HANDLING")&&x.CUSTOM_ELEMENT_HANDLING&&typeof x.CUSTOM_ELEMENT_HANDLING=="object"?vi(x.CUSTOM_ELEMENT_HANDLING):lu(null);if(b=lu(null),Rn(K,"tagNameCheck")&&oI(K.tagNameCheck)&&(b.tagNameCheck=K.tagNameCheck),Rn(K,"attributeNameCheck")&&oI(K.attributeNameCheck)&&(b.attributeNameCheck=K.attributeNameCheck),Rn(K,"allowCustomizedBuiltInElements")&&typeof K.allowCustomizedBuiltInElements=="boolean"&&(b.allowCustomizedBuiltInElements=K.allowCustomizedBuiltInElements),N&&(E=!1),ue&&(j=!0),xt&&($=Xe({},TI),Se=lu(null),xt.html===!0&&(Xe($,kI),Xe(Se,xI)),xt.svg===!0&&(Xe($,B_),Xe(Se,U_),Xe(Se,nw)),xt.svgFilters===!0&&(Xe($,V_),Xe(Se,U_),Xe(Se,nw)),xt.mathMl===!0&&(Xe($,z_),Xe(Se,MI),Xe(Se,nw))),w.tagCheck=null,w.attributeCheck=null,Rn(x,"ADD_TAGS")&&(typeof x.ADD_TAGS=="function"?w.tagCheck=x.ADD_TAGS:ri(x.ADD_TAGS)&&($===Re&&($=vi($)),Xe($,x.ADD_TAGS,_n))),Rn(x,"ADD_ATTR")&&(typeof x.ADD_ATTR=="function"?w.attributeCheck=x.ADD_ATTR:ri(x.ADD_ATTR)&&(Se===g&&(Se=vi(Se)),Xe(Se,x.ADD_ATTR,_n))),Rn(x,"ADD_URI_SAFE_ATTR")&&ri(x.ADD_URI_SAFE_ATTR)&&Xe(Eo,x.ADD_URI_SAFE_ATTR,_n),Rn(x,"FORBID_CONTENTS")&&ri(x.FORBID_CONTENTS)&&(qt===Ro&&(qt=vi(qt)),Xe(qt,x.FORBID_CONTENTS,_n)),Rn(x,"ADD_FORBID_CONTENTS")&&ri(x.ADD_FORBID_CONTENTS)&&(qt===Ro&&(qt=vi(qt)),Xe(qt,x.ADD_FORBID_CONTENTS,_n)),Oe&&($["#text"]=!0),A&&Xe($,["html","head","body"]),$.table&&(Xe($,["tbody"]),delete v.tbody),x.TRUSTED_TYPES_POLICY){if(typeof x.TRUSTED_TYPES_POLICY.createHTML!="function")throw tw('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof x.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw tw('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');D=x.TRUSTED_TYPES_POLICY,I=D.createHTML("")}else D===void 0&&(D=aG(p,i)),D!==null&&typeof I=="string"&&(I=D.createHTML(""));gi&&gi(x),id=x},iI=Xe({},[...B_,...V_,...K6]),sI=Xe({},[...z_,...X6]),E6=function(x){let K=F(x);(!K||!K.tagName)&&(K={namespaceURI:Jo,tagName:"template"});const ce=Fg(x.tagName),at=Fg(K.tagName);return la[x.namespaceURI]?x.namespaceURI===Mt?K.namespaceURI===mi?ce==="svg":K.namespaceURI===dn?ce==="svg"&&(at==="annotation-xml"||_f[at]):!!iI[ce]:x.namespaceURI===dn?K.namespaceURI===mi?ce==="math":K.namespaceURI===Mt?ce==="math"&&Sf[at]:!!sI[ce]:x.namespaceURI===mi?K.namespaceURI===Mt&&!Sf[at]||K.namespaceURI===dn&&!_f[at]?!1:!sI[ce]&&(vf[ce]||!iI[ce]):!!(Do==="application/xhtml+xml"&&la[x.namespaceURI]):!1},Hs=function(x){rd(e.removed,{element:x});try{F(x).removeChild(x)}catch{S(x)}},_h=function(x,K){try{rd(e.removed,{attribute:K.getAttributeNode(x),from:K})}catch{rd(e.removed,{attribute:null,from:K})}if(K.removeAttribute(x),x==="is")if(j||ue)try{Hs(K)}catch{}else try{K.setAttribute(x,"")}catch{}},rI=function(x){let K=null,ce=null;if(H)x="<remove></remove>"+x;else{const Bn=SI(x,/^[\r\n\t ]+/);ce=Bn&&Bn[0]}Do==="application/xhtml+xml"&&Jo===mi&&(x='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+x+"</body></html>");const at=D?D.createHTML(x):x;if(Jo===mi)try{K=new f().parseFromString(at,Do)}catch{}if(!K||!K.documentElement){K=z.createDocument(Jo,"template",null);try{K.documentElement.innerHTML=pl?I:at}catch{}}const Fn=K.body||K.documentElement;return x&&ce&&Fn.insertBefore(t.createTextNode(ce),Fn.childNodes[0]||null),Jo===mi?ee.call(K,A?"html":"body")[0]:A?K.documentElement:Fn},aI=function(x){return Y.call(x.ownerDocument||x,x,h.SHOW_ELEMENT|h.SHOW_COMMENT|h.SHOW_TEXT|h.SHOW_PROCESSING_INSTRUCTION|h.SHOW_CDATA_SECTION,null)},lI=function(x){x.normalize();const K=Y.call(x.ownerDocument||x,x,h.SHOW_TEXT|h.SHOW_COMMENT|h.SHOW_CDATA_SECTION|h.SHOW_PROCESSING_INSTRUCTION,null);let ce=K.nextNode();for(;ce;){let at=ce.data;sd([Ve,Ye,Me],Fn=>{at=ad(at,Fn," ")}),ce.data=at,ce=K.nextNode()}},N_=function(x){return x instanceof u&&(typeof x.nodeName!="string"||typeof x.textContent!="string"||typeof x.removeChild!="function"||!(x.attributes instanceof d)||typeof x.removeAttribute!="function"||typeof x.setAttribute!="function"||typeof x.namespaceURI!="string"||typeof x.insertBefore!="function"||typeof x.hasChildNodes!="function")},Jm=function(x){if(!V||typeof x!="object"||x===null)return!1;try{return typeof V(x)=="number"}catch{return!1}};function ca(ke,x,K){sd(ke,ce=>{ce.call(e,x,K,id)})}const hI=function(x){let K=null;if(ca(me.beforeSanitizeElements,x,null),N_(x))return Hs(x),!0;const ce=_n(x.nodeName);if(ca(me.uponSanitizeElement,x,{tagName:ce,allowedTags:$}),R&&x.hasChildNodes()&&!Jm(x.firstElementChild)&&Mo(/<[/\w!]/g,x.innerHTML)&&Mo(/<[/\w!]/g,x.textContent)||R&&x.namespaceURI===mi&&ce==="style"&&Jm(x.firstElementChild)||x.nodeType===ld.progressingInstruction||R&&x.nodeType===ld.comment&&Mo(/<[/\w]/g,x.data))return Hs(x),!0;if(v[ce]||!(w.tagCheck instanceof Function&&w.tagCheck(ce))&&!$[ce]){if(!v[ce]&&dI(ce)&&(b.tagNameCheck instanceof RegExp&&Mo(b.tagNameCheck,ce)||b.tagNameCheck instanceof Function&&b.tagNameCheck(ce)))return!1;if(Oe&&!qt[ce]){const at=F(x)||x.parentNode,Fn=P(x)||x.childNodes;if(Fn&&at){const Bn=Fn.length;for(let wi=Bn-1;wi>=0;--wi){const ml=_(Fn[wi],!0);at.insertBefore(ml,T(x))}}}return Hs(x),!0}return x instanceof l&&!E6(x)||(ce==="noscript"||ce==="noembed"||ce==="noframes")&&Mo(/<\/no(script|embed|frames)/i,x.innerHTML)?(Hs(x),!0):(N&&x.nodeType===ld.text&&(K=x.textContent,sd([Ve,Ye,Me],at=>{K=ad(K,at," ")}),x.textContent!==K&&(rd(e.removed,{element:x.cloneNode()}),x.textContent=K)),ca(me.afterSanitizeElements,x,null),!1)},cI=function(x,K,ce){if(m[K]||Ae&&(K==="id"||K==="name")&&(ce in t||ce in R6))return!1;const at=Se[K]||w.attributeCheck instanceof Function&&w.attributeCheck(K,x);if(!(E&&!m[K]&&Mo(Ge,K))){if(!(y&&Mo(wt,K))){if(!at||m[K]){if(!(dI(x)&&(b.tagNameCheck instanceof RegExp&&Mo(b.tagNameCheck,x)||b.tagNameCheck instanceof Function&&b.tagNameCheck(x))&&(b.attributeNameCheck instanceof RegExp&&Mo(b.attributeNameCheck,K)||b.attributeNameCheck instanceof Function&&b.attributeNameCheck(K,x))||K==="is"&&b.allowCustomizedBuiltInElements&&(b.tagNameCheck instanceof RegExp&&Mo(b.tagNameCheck,ce)||b.tagNameCheck instanceof Function&&b.tagNameCheck(ce))))return!1}else if(!Eo[K]){if(!Mo(Ce,ad(ce,W,""))){if(!((K==="src"||K==="xlink:href"||K==="href")&&x!=="script"&&vI(ce,"data:")===0&&yn[x])){if(!(k&&!Mo(on,ad(ce,W,"")))){if(ce)return!1}}}}}}return!0},k6=Xe({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),dI=function(x){return!k6[Fg(x)]&&Mo(q,x)},uI=function(x){ca(me.beforeSanitizeAttributes,x,null);const K=x.attributes;if(!K||N_(x))return;const ce={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:Se,forceKeepAttr:void 0};let at=K.length;for(;at--;){const Fn=K[at],Bn=Fn.name,wi=Fn.namespaceURI,ml=Fn.value,da=_n(Bn),L_=ml;let ho=Bn==="value"?L_:V6(L_);if(ce.attrName=da,ce.attrValue=ho,ce.keepAttr=!0,ce.forceKeepAttr=void 0,ca(me.uponSanitizeAttribute,x,ce),ho=ce.attrValue,Ne&&(da==="id"||da==="name")&&vI(ho,nt)!==0&&(_h(Bn,x),ho=nt+ho),R&&Mo(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,ho)){_h(Bn,x);continue}if(da==="attributename"&&SI(ho,"href")){_h(Bn,x);continue}if(ce.forceKeepAttr)continue;if(!ce.keepAttr){_h(Bn,x);continue}if(!M&&Mo(/\/>/i,ho)){_h(Bn,x);continue}N&&sd([Ve,Ye,Me],gI=>{ho=ad(ho,gI," ")});const fI=_n(x.nodeName);if(!cI(fI,da,ho)){_h(Bn,x);continue}if(D&&typeof p=="object"&&typeof p.getAttributeType=="function"&&!wi)switch(p.getAttributeType(fI,da)){case"TrustedHTML":{ho=D.createHTML(ho);break}case"TrustedScriptURL":{ho=D.createScriptURL(ho);break}}if(ho!==L_)try{wi?x.setAttributeNS(wi,Bn,ho):x.setAttribute(Bn,ho),N_(x)?Hs(x):_I(e.removed)}catch{_h(Bn,x)}}ca(me.afterSanitizeAttributes,x,null)},P_=function(x){let K=null;const ce=aI(x);for(ca(me.beforeSanitizeShadowDOM,x,null);K=ce.nextNode();)ca(me.uponSanitizeShadowNode,K,null),hI(K),uI(K),K.content instanceof s&&P_(K.content);ca(me.afterSanitizeShadowDOM,x,null)},ew=function(x){if(x.nodeType===ld.element&&x.shadowRoot instanceof s){const at=x.shadowRoot;ew(at),P_(at)}const K=x.childNodes;if(!K)return;const ce=[];sd(K,at=>{rd(ce,at)});for(const at of ce)ew(at)};return e.sanitize=function(ke){let x=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},K=null,ce=null,at=null,Fn=null;if(pl=!ke,pl&&(ke="<!-->"),typeof ke!="string"&&!Jm(ke)&&(ke=j6(ke),typeof ke!="string"))throw tw("dirty is not a string, aborting");if(!e.isSupported)return ke;if(L||D_(x),e.removed=[],typeof ke=="string"&&(je=!1),je){const ml=ke.nodeName;if(typeof ml=="string"){const da=_n(ml);if(!$[da]||v[da])throw tw("root node is forbidden and cannot be sanitized in-place")}ew(ke)}else if(Jm(ke))K=rI("<!---->"),ce=K.ownerDocument.importNode(ke,!0),ce.nodeType===ld.element&&ce.nodeName==="BODY"||ce.nodeName==="HTML"?K=ce:K.appendChild(ce),ew(ce);else{if(!j&&!N&&!A&&ke.indexOf("<")===-1)return D&&re?D.createHTML(ke):ke;if(K=rI(ke),!K)return j?null:re?I:""}K&&H&&Hs(K.firstChild);const Bn=aI(je?ke:K);for(;at=Bn.nextNode();)hI(at),uI(at),at.content instanceof s&&P_(at.content);if(je)return N&&lI(ke),ke;if(j){if(N&&lI(K),ue)for(Fn=te.call(K.ownerDocument);K.firstChild;)Fn.appendChild(K.firstChild);else Fn=K;return(Se.shadowroot||Se.shadowrootmode)&&(Fn=be.call(o,Fn,!0)),Fn}let wi=A?K.outerHTML:K.innerHTML;return A&&$["!doctype"]&&K.ownerDocument&&K.ownerDocument.doctype&&K.ownerDocument.doctype.name&&Mo(iG,K.ownerDocument.doctype.name)&&(wi="<!DOCTYPE "+K.ownerDocument.doctype.name+`>
|
|
3
|
+
`+wi),N&&sd([Ve,Ye,Me],ml=>{wi=ad(wi,ml," ")}),D&&re?D.createHTML(wi):wi},e.setConfig=function(){let ke=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};D_(ke),L=!0},e.clearConfig=function(){id=null,L=!1},e.isValidAttribute=function(ke,x,K){id||D_({});const ce=_n(ke),at=_n(x);return cI(ce,at,K)},e.addHook=function(ke,x){typeof x=="function"&&rd(me[ke],x)},e.removeHook=function(ke,x){if(x!==void 0){const K=F6(me[ke],x);return K===-1?void 0:B6(me[ke],K,1)[0]}return _I(me[ke])},e.removeHooks=function(ke){me[ke]=[]},e.removeAllHooks=function(){me=HI()},e}var lG=V$();function hG(n){const e=n.length;let t=0;for(;t<e;)n[t]=[n[t]],t+=1}function AI(n,e){const t=e.length;let o=0;for(;o<t;)n.push(e[o]),o+=1}function Ab(n){const e=[];if(!n||n.length===0||!n[0]||n[0].length===0)return e;const t=n.length,o=n[0].length;for(let i=0;i<t;i++)for(let s=0;s<o;s++)e[s]||(e[s]=[]),e[s][i]=n[i][s];return e}function $i(n,e,t,o){let i=-1,s=n,r=t;Array.isArray(n)||(s=Array.from(n));const a=s.length;for(i+=1;i<a;)r=e(r,s[i],i,s),i+=1;return r}function Fc(n,e){let t=0,o=n;Array.isArray(n)||(o=Array.from(n));const i=o.length,s=[];let r=-1;for(;t<i;){const a=o[t];e(a,t,o)&&(r+=1,s[r]=a),t+=1}return s}function Tt(n,e){let t=0,o=n;Array.isArray(n)||(o=Array.from(n));const i=o.length,s=[];let r=-1;for(;t<i;){const a=o[t];r+=1,s[r]=e(a,t,o),t+=1}return s}function O(n,e){let t=0,o=n;Array.isArray(n)||(o=Array.from(n));const i=o.length;for(;t<i&&e(o[t],t,o)!==!1;)t+=1;return n}function cG(n){const e=[];return O(n,t=>{e.indexOf(t)===-1&&e.push(t)}),e}function OI(...n){const[e,...t]=[...n];let o=e;return O(t,i=>{o=o.filter(s=>!i.includes(s))}),o}function dG(...n){const e=n[n.length-1];let t,o=n;typeof e=="function"&&(t=e,o=o.slice(0,-1));const i=t?(l,h)=>h.some(c=>t(l,c)):(l,h)=>h.includes(l),[s,...r]=o;let a=s;return O(r,l=>{a=a.filter(h=>i(h,l))}),a}function DI(n,e=" "){return n.split(e)}function uG(n,e=" "){return n.join(e)}function pt(n,...e){return $i(n,(o,i,s)=>{const r=i.replace(/\r?\n\s*/g,""),a=e[s]?e[s]:"";return o+r+a},"").trim()}function Bc(n,...e){const t=document.createElement("template");t.innerHTML=n.reduce((s,r,a)=>s+r+(e[a]??""),"");const o=t.content.cloneNode(!0),i={};return o.querySelectorAll("[data-ref]").forEach(s=>{const r=s.getAttribute("data-ref");s.removeAttribute("data-ref"),i[r]=s}),{fragment:o,refs:i}}function bt(n){let e;switch(typeof n){case"string":case"number":e=`${n}`;break;case"object":e=n===null?"":n.toString();break;case"undefined":e="";break;default:e=n.toString();break}return e}function J(n){return typeof n<"u"}function Jt(n){return typeof n>"u"}function ht(n){return n===null||n===""||Jt(n)}function fG(n){return Object.prototype.toString.call(n)==="[object RegExp]"}const Bg="length",gp=n=>parseInt(n,16),NI=n=>parseInt(n,10),wC=(n,e,t)=>n.substr(e,t),pp=n=>n.codePointAt(0)-65,uE=n=>`${n}`.replace(/\-/g,""),gG=n=>gp(wC(uE(n),gp("12"),pp("F")))/(gp(wC(uE(n),pp("B"),~~![][Bg]))||9),pG=()=>typeof location<"u"&&/^([a-z0-9\-]+\.)?\x68\x61\x6E\x64\x73\x6F\x6E\x74\x61\x62\x6C\x65\x2E\x63\x6F\x6D$/i.test(location.host);let PI=!1;const LI={invalid:()=>pt`
|
|
4
|
+
The license key for Handsontable is invalid.\x20
|
|
5
|
+
If you need any help, contact us at support@handsontable.com.`,expired:({keyValidityDate:n,hotVersion:e})=>pt`
|
|
6
|
+
The license key for Handsontable expired on ${n}, and is not valid for the installed\x20
|
|
7
|
+
version ${e}. Renew your license key at handsontable.com or downgrade to a version released prior\x20
|
|
8
|
+
to ${n}. If you need any help, contact us at sales@handsontable.com.`,missing:()=>pt`
|
|
9
|
+
The license key for Handsontable is missing. Use your purchased key to activate the product.\x20
|
|
10
|
+
Alternatively, you can activate Handsontable to use for non-commercial purposes by\x20
|
|
11
|
+
passing the key: 'non-commercial-and-evaluation'. If you need any help, contact\x20
|
|
12
|
+
us at support@handsontable.com.`,non_commercial:()=>""},WI={invalid:()=>pt`
|
|
13
|
+
The license key for Handsontable is invalid.\x20
|
|
14
|
+
<a href="https://handsontable.com/docs/tutorial-license-key.html" target="_blank">Read more</a> on how to\x20
|
|
15
|
+
install it properly or contact us at <a href="mailto:support@handsontable.com">support@handsontable.com</a>.`,expired:({keyValidityDate:n,hotVersion:e})=>pt`
|
|
16
|
+
The license key for Handsontable expired on ${n}, and is not valid for the installed\x20
|
|
17
|
+
version ${e}. <a href="https://handsontable.com/pricing" target="_blank">Renew</a> your\x20
|
|
18
|
+
license key or downgrade to a version released prior to ${n}. If you need any\x20
|
|
19
|
+
help, contact us at <a href="mailto:sales@handsontable.com">sales@handsontable.com</a>.`,missing:()=>pt`
|
|
20
|
+
The license key for Handsontable is missing. Use your purchased key to activate the product.\x20
|
|
21
|
+
Alternatively, you can activate Handsontable to use for non-commercial purposes by\x20
|
|
22
|
+
passing the key: 'non-commercial-and-evaluation'.\x20
|
|
23
|
+
<a href="https://handsontable.com/docs/tutorial-license-key.html" target="_blank">Read more</a> about it in\x20
|
|
24
|
+
the documentation or contact us at <a href="mailto:support@handsontable.com">support@handsontable.com</a>.`,non_commercial:()=>""};function mG(n,e,t){const o=!ht(n),i=typeof n=="string"&&(n.toLowerCase()==="non-commercial-and-evaluation"||n.toLowerCase()==="ht68e-1f2b7-47158-70b05-0842f"),s="17.1.0";let r,a="invalid",l="invalid";n=uE(n||"");const h=wG(n);if(i)a="non_commercial",l="valid";else if(o||h)if(h){const[c,d,u]=t.split("/").map(Number),f=Math.floor(Date.UTC(u,d-1,c)/864e5),p=gG(n);r=new Intl.DateTimeFormat("en-US",{year:"numeric",month:"long",day:"2-digit",timeZone:"UTC"}).format((p+1)*864e5),f>p?(a="expired",l="expired"):(a="valid",l="valid")}else a="invalid",l="invalid";else a="missing",l="missing";if(pG()&&(a="valid",l="valid"),!PI&&a!=="valid"&&(LI[a]({keyValidityDate:r,hotVersion:s})&&console[a==="non_commercial"?"info":"warn"](LI[a]({keyValidityDate:r,hotVersion:s})),PI=!0),l!=="valid"&&e&&WI[l]({keyValidityDate:r,hotVersion:s})){const d=document.createElement("div");d.className="handsontable hot-display-license-info",d.innerHTML=WI[l]({keyValidityDate:r,hotVersion:s}),e.appendChild(d)}}function wG(n){let e=[][Bg],t=e;if(n[Bg]!==pp("Z"))return!1;for(let o="",i="B<H4P+".split(""),s=pp(i.shift());s;s=pp(i.shift()||"A"))--s<""[Bg]?t=t|(NI(`${NI(gp(o)+(gp(wC(n,Math.abs(s),2))+[]).padStart(2,"0"))}`)%97||2)>>1:o=wC(n,s,s?i[Bg]===1?9:8:6);return t===e}function mr(n){return n[0].toUpperCase()+n.substr(1)}function V0(){function n(){return Math.floor((1+Math.random())*65536).toString(16).substring(1)}return n()+n()+n()+n()}function z$(n){if(typeof n!="string")return!1;try{const e=JSON.parse(n);return typeof e=="object"&&e!==null}catch{return!1}}function U$(n){return/^([0-9][0-9]?%$)|(^100%$)/.test(n)}function My(n,e={}){return`${n}`.replace(/(?:\\)?\[([^[\]]+)]/g,(t,o)=>t.charAt(0)==="\\"?t.substr(1,t.length-1):e[o]===void 0?"":e[o])}function gr(n){return bC(`${n}`,{ALLOWED_TAGS:[]})}function bC(n,e){return lG.sanitize(n,e)}function Yp(n){return typeof n!="string"?n:n.replace(/([A-Z])/g,"-$1").replace(/_/g,"-").toLowerCase()}const wr=n=>["tabindex",n],bG=()=>["role","treegrid"],Ga=()=>["role","presentation"],CG=()=>["role","gridcell"],yG=()=>["role","gridcell button"],_G=()=>["role","rowheader"],Y$=()=>["role","rowgroup"],SG=()=>["role","columnheader"],G$=()=>["role","row"],vG=()=>["role","menu"],RG=()=>["role","menuitem"],EG=()=>["role","menuitemcheckbox"],kG=()=>["role","combobox"],j$=()=>["role","listbox"],TG=()=>["role","option"],xG=()=>["role","checkbox"],MG=()=>["role","dialog"],IG=()=>["role","alertdialog"],HG=()=>["role","group"],AG=()=>["scope","col"],OG=()=>["scope","row"],DG=()=>["type","text"],Ni=n=>["aria-label",n],NG=n=>["aria-labelledby",n],PG=n=>["aria-describedby",n],al=()=>["aria-hidden","true"],Vg=(n=!0)=>["aria-disabled",n],LG=()=>["aria-multiselectable","true"],q$=n=>["aria-haspopup",n],K$=n=>["aria-rowcount",n],Iy=n=>["aria-colcount",n],X$=n=>["aria-rowindex",n],z0=n=>["aria-colindex",n],Es=n=>["aria-expanded",n],WG=n=>["aria-sort",n],$I=()=>["aria-readonly","true"],FI=()=>["aria-invalid","true"],Z$=n=>["aria-checked",n],U0=()=>["aria-selected","true"],$G=()=>["aria-autocomplete","list"],FG=n=>["aria-controls",n],BG=n=>["aria-activedescendant",n],VG=n=>["aria-live",n],zG=n=>["aria-relevant",n],UG=n=>["aria-setsize",n],YG=n=>["aria-posinset",n],GG=()=>["aria-modal","true"],BI=()=>["aria-busy","true"];function U(n){throw new Error(n,{cause:{handsontable:!0}})}function Gp(n){let e;return Array.isArray(n)?e=n.length?new Array(n.length).fill(null):[]:(e={},tt(n,(t,o)=>{o!=="__children"&&(t&&typeof t=="object"&&!Array.isArray(t)?e[o]=Gp(t):Array.isArray(t)?t.length&&typeof t[0]=="object"&&!Array.isArray(t[0])?e[o]=[Gp(t[0])]:e[o]=[]:e[o]=null)})),e}function jG(n,e){return e.prototype.constructor=e,n.prototype=new e,n.prototype.constructor=n,n}function Wn(n,e,t){const o=Array.isArray(t);return tt(e,(i,s)=>{(o===!1||t.includes(s))&&(n[s]=i)}),n}function Hy(n,e){tt(e,(t,o)=>{e[o]&&typeof e[o]=="object"?(n[o]||(Array.isArray(e[o])?n[o]=[]:Object.prototype.toString.call(e[o])==="[object Date]"?n[o]=e[o]:n[o]={}),Hy(n[o],e[o])):n[o]=e[o]})}function Qn(n){return typeof n=="object"?JSON.parse(JSON.stringify(n)):n}function Jr(n){const e={};return tt(n,(t,o)=>{e[o]=t}),e}function Ct(n,...e){return n.MIXINS||(n.MIXINS=[]),O(e,t=>{n.MIXINS.push(t.MIXIN_NAME),tt(t,(o,i)=>{if(n.prototype[i]!==void 0&&U(`Mixin conflict. Property '${i}' already exist and cannot be overwritten.`),typeof o=="function")n.prototype[i]=o;else{const s=function(l,h){const c=`_${l}`,d=u=>{let f=u;return(Array.isArray(f)||ne(f))&&(f=Qn(f)),f};return function(){return this[c]===void 0&&(this[c]=d(h)),this[c]}},r=function(l){const h=`_${l}`;return function(c){this[h]=c}};Object.defineProperty(n.prototype,i,{get:s(i,o),set:r(i),configurable:!0})}})}),n}function uh(n,e){return JSON.stringify(n)===JSON.stringify(e)}function ne(n){return Object.prototype.toString.call(n)==="[object Object]"}function ll(n,e,t,o){o.value=t,o.writable=o.writable!==!1,o.enumerable=o.enumerable!==!1,o.configurable=o.configurable!==!1,Object.defineProperty(n,e,o)}function tt(n,e){for(const t in n)if((!n.hasOwnProperty||n.hasOwnProperty&&Object.prototype.hasOwnProperty.call(n,t))&&e(n[t],t,n)===!1)break;return n}function CC(n,e){const t=e.split(".");let o=n;return tt(t,i=>{if(o=o[i],o===void 0)return o=void 0,!1}),o}function Y_(n,e,t){if(typeof e!="string")return;const o=e.split(".");let i=n;o.forEach((s,r)=>{s==="__proto__"||s==="constructor"||s==="prototype"||(r!==o.length-1?(en(i,s)||(i[s]={}),i=i[s]):i[s]=t)})}function Y0(n){if(!ne(n))return 0;const e=function(t){let o=0;return ne(t)?tt(t,(i,s)=>{s!=="__children"&&(o+=e(i))}):o+=1,o};return e(n)}function Pi(n,e="value"){const t=`_${e}`,o={_touched:!1,[t]:n,isTouched(){return this._touched}};return Object.defineProperty(o,e,{get(){return this[t]},set(i){this._touched=!0,this[t]=i},enumerable:!0,configurable:!0}),o}function en(n,e){return Object.prototype.hasOwnProperty.call(n,e)}function Ob(n,e){if(typeof n!="object"||n===null)return e;if(typeof e!="object"||e===null)return n;const t={};return Object.keys(e).forEach(o=>{typeof e[o]=="object"&&e[o]!==null&&!Array.isArray(e[o])?t[o]=Ob(n[o],e[o]):t[o]=en(n,o)&&n[o]!==void 0?n[o]:e[o]}),Object.keys(n).forEach(o=>{en(t,o)||(t[o]=n[o])}),t}function G0(n={},e={}){const t={...n};return Object.keys(e).forEach(o=>{if(o==="__proto__"||o==="constructor"||o==="prototype")return;const i=e[o],s=t[o];ne(i)&&ne(s)?t[o]=G0(s,i):t[o]=i}),t}function Ln(n){return ne(n)&&J(n.key)&&J(n.value)}function yC(n){return window.requestAnimationFrame(n)}function _C(n){window.cancelAnimationFrame(n)}function Q$(){return"ontouchstart"in window}function qG(){return typeof window<"u"}let hd;function KG(n,e={}){return hd||(typeof Intl=="object"?hd=new Intl.Collator(n,e).compare:typeof String.prototype.localeCompare=="function"?hd=(t,o)=>`${t}`.localeCompare(o):hd=(t,o)=>t===o?0:t>o?-1:1,hd)}const ji=n=>{const e={value:!1};return e.test=(t,o)=>{e.value=n(t,o)},e},hl={chrome:ji((n,e)=>/Chrome/.test(n)&&/Google/.test(e)),chromeWebKit:ji(n=>/CriOS/.test(n)),edge:ji(n=>/Edge/.test(n)),edgeWebKit:ji(n=>/EdgiOS/.test(n)),firefox:ji(n=>/Firefox/.test(n)),firefoxWebKit:ji(n=>/FxiOS/.test(n)),mobile:ji(n=>/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(n)),safari:ji((n,e)=>/Safari/.test(n)&&/Apple Computer/.test(e)),safariBefore261:ji((n,e)=>{if(!/Safari/.test(n)||!/Apple Computer/.test(e))return!1;const t=/Version\/(\d+(?:\.\d+)?)/i.exec(n);return(t?Number.parseFloat(t[1]):0)<26.1})},Mm={mac:ji(n=>/^Mac/.test(n)),win:ji(n=>/^Win/.test(n)),linux:ji(n=>/^Linux/.test(n)),ios:ji(n=>/iPhone|iPad|iPod/i.test(n))};function XG({userAgent:n=navigator.userAgent,vendor:e=navigator.vendor}={}){tt(hl,({test:t})=>{t(n,e)})}function ZG({platform:n=navigator.platform}={}){tt(Mm,({test:e})=>{e(n)})}qG()&&(XG(),ZG());function QG(){return hl.chrome.value}function JG(){return hl.chromeWebKit.value}function mp(){return hl.firefox.value}function e4(){return hl.firefoxWebKit.value}function Ay(){return hl.safari.value}function t4(){return hl.safariBefore261.value}function n4(){return hl.edge.value}function qr(){return hl.mobile.value}function J$(){return Mm.ios.value}function j0({maxTouchPoints:n}=navigator){return n>2&&Mm.mac.value}function fE(){return Mm.win.value}function zg(){return Mm.mac.value}function o4(...n){J(console)&&console.log(...n)}function Ie(...n){J(console)&&console.warn(...n)}function fh(n){J(console)&&console.warn(`Deprecated: ${n}`)}function nl(...n){J(console)&&console.error(...n)}function i4({logFunction:n=o4,message:e,items:t,maxSample:o=5,itemFormatter:i=s=>`${s}`}={}){if(!Array.isArray(t)||t.length===0)return;const s=t.length,r=t.slice(0,o).map(h=>` - ${i(h)}`),a=s>o?` - ...and ${s-o} more`:"",l=["Affected cells:",...r,...a?[a]:[]].join(`
|
|
25
|
+
`);n(My(e,{itemsCount:`${s} cell${s>1?"s":""}`,affectedCells:l}))}function s4(n,e=0){let t=-1,o=null,i=n;for(;i!==null;){if(t===e){o=i;break}i.host&&i.nodeType===Node.DOCUMENT_FRAGMENT_NODE?i=i.host:(t+=1,i=i.parentNode)}return o}function Db(n,e){const t=n.closest(".handsontable");return!!t&&(t.parentNode===e||t===e)}function r4(n){return Object.getPrototypeOf(n.parent)&&n.frameElement}function gh(n){return r4(n)&&n.parent}function Vc(n,e=[],t){const{ELEMENT_NODE:o,DOCUMENT_FRAGMENT_NODE:i}=Node;let s=n;for(;s!=null&&s!==t;){const{nodeType:r,nodeName:a}=s;if(r===o&&(e.includes(a)||e.includes(s)))return s;const{host:l}=s;l&&r===i?s=l:s=s.parentNode}return null}function ow(n,e,t){const o=[];let i=n;for(;i&&(i=Vc(i,e,t),!(!i||t&&!t.contains(i)));)o.push(i),i.host&&i.nodeType===Node.DOCUMENT_FRAGMENT_NODE?i=i.host:i=i.parentNode;const s=o.length;return s?o[s-1]:null}function a4(n,e){const t={element:void 0,classNames:[]};let o=n;for(;o!==null&&o!==n.ownerDocument.documentElement&&!t.element;){if(typeof e=="string"&&o.classList.contains(e))t.element=o,t.classNames.push(e);else if(e instanceof RegExp){const i=Array.from(o.classList).filter(s=>e.test(s));i.length&&(t.element=o,t.classNames.push(...i))}o=o.parentElement}return t}function Hc(n,e){let t=n.parentNode,o=[];for(typeof e=="string"?n.defaultView?o=Array.prototype.slice.call(n.querySelectorAll(e),0):o=Array.prototype.slice.call(n.ownerDocument.querySelectorAll(e),0):o.push(e);t!==null;){if(o.indexOf(t)>-1)return!0;t=t.parentNode}return!1}function l4(n){let e=0,t=n;if(t.previousSibling)for(;t=t.previousSibling;)e+=1;return e}function Sh(n,e,t){const o=t.parentElement.querySelector(`.ht_clone_${n}`);return o?o.contains(e):null}function af(n){if(!n||!n.classList||!n.parentNode||!n.parentNode.parentNode||n.classList.contains("hiddenHeader")||n.style.display==="none")return!1;const e=n.parentNode,t=Array.from(e.parentNode.childNodes),o=t.indexOf(e),i=Number.parseInt(n.getAttribute("rowspan"),10)||1;return o+i>=t.length}function eF(n){return!n||!n.length?[]:n.filter(e=>!!e)}function tF(n,e){if(!n||!n.length)return{regexFree:[],regexes:[]};const t=[],o=[];return o.push(...n.filter(i=>{const s=i instanceof RegExp;return s&&e&&t.push(i),!s})),{regexFree:o,regexes:t}}function _e(n,e){return n.classList===void 0||typeof e!="string"||e===""?!1:n.classList.contains(e)}function B(n,e){typeof e=="string"&&(e=e.split(" ")),e=eF(e),e.length>0&&n.classList.add(...e)}function oe(n,e){typeof e=="string"?e=e.split(" "):e instanceof RegExp&&(e=[e]);let{regexFree:t,regexes:o}=tF(e,!0);t=eF(t),t.length>0&&n.classList.remove(...t),o.forEach(i=>{n.classList.forEach(s=>{i.test(s)&&n.classList.remove(s)})})}function fe(n,e=[],t){Array.isArray(e)||(e=[[e,t]]),e.forEach(o=>{Array.isArray(o)&&o[0]!==""&&n.setAttribute(...o)})}function Zr(n,e=[]){typeof e=="string"?e=e.split(" "):e instanceof RegExp&&(e=[e]);const{regexFree:t,regexes:o}=tF(e,!0);t.forEach(i=>{i!==""&&n.removeAttribute(i)}),o.forEach(i=>{n.getAttributeNames().forEach(s=>{i.test(s)&&n.removeAttribute(s)})})}function nF(n){if(n.nodeType===3)n.parentNode.removeChild(n);else if(["TABLE","THEAD","TBODY","TFOOT","TR"].indexOf(n.nodeName)>-1){const e=n.childNodes;for(let t=e.length-1;t>=0;t--)nF(e[t])}}function ol(n){let e;for(;e=n.lastChild;)n.removeChild(e)}const h4=/(<(.*)>|&(.*);)/;let VI=!1;function Qc(n,e,t=bC){h4.test(e)?(!VI&&t===bC&&(VI=!0,fh("The HTML sanitization using DOMPurify library is deprecated and will be removed in the next major release. Use the `sanitizer` option instead.\n\nMigration guide: https://handsontable.com/docs/migration-from-16.2-to-17.0/\n`sanitizer` documentation: https://handsontable.com/docs/api/options/#sanitizer")),n.innerHTML=typeof t=="function"?t(e,"innerHTML"):e):ph(n,e)}function ph(n,e){const t=n.firstChild;t&&t.nodeType===3&&t.nextSibling===null?t.textContent=e:(ol(n),n.appendChild(n.ownerDocument.createTextNode(e)))}function zc(n){const e=n.ownerDocument.documentElement,t=n.ownerDocument.defaultView;let o=n;for(;o!==e;){if(o===null)return!1;if(o.nodeType===Node.DOCUMENT_FRAGMENT_NODE)if(o.host){if(o.host.impl)return zc(o.host.impl);if(o.host)return zc(o.host);U("Lost in Web Components world")}else return!1;else if(t.getComputedStyle(o).display==="none")return!1;o=o.parentNode}return!0}function c4(n){const t=n.ownerDocument.defaultView;let o=n;for(;o.parentNode;){if(o.style.height==="0px"||o.style.height==="0"){const i=t.getComputedStyle(o).getPropertyValue("overflow");return i==="hidden"||i==="clip"}o=o.parentNode}return!1}function Ko(n){const e=n.ownerDocument,t=e.defaultView,o=e.documentElement;let i=n,s,r,a;for(s=i.offsetLeft,r=i.offsetTop,a=i;(i=i.offsetParent)&&!(i===e.body||!("offsetLeft"in i));)s+=i.offsetLeft,r+=i.offsetTop,a=i;return a&&a.style.position==="fixed"&&(s+=t.pageXOffset||o.scrollLeft,r+=t.pageYOffset||o.scrollTop),{left:s,top:r}}function oF(n=window){return n.scrollY}function q0(n=window){return n.scrollX}function K0(n,e=window){return n===e?oF(e):n.scrollTop}function iF(n,e=window){return n===e?q0(e):n.scrollLeft}function SC(n){let e=n.ownerDocument,t=e?e.defaultView:void 0;e||(e=n.document?n.document:n,t=e.defaultView);const o=["auto","scroll"];let i=n.parentNode;for(;i&&i.style&&e.body!==i;){let{overflow:s,overflowX:r,overflowY:a}=i.style;if([s,r,a].includes("scroll"))return i;if({overflow:s,overflowX:r,overflowY:a}=t.getComputedStyle(i),o.includes(s)||o.includes(r)||o.includes(a)||i.clientHeight<=i.scrollHeight+1&&(o.includes(a)||o.includes(s))||i.clientWidth<=i.scrollWidth+1&&(o.includes(r)||o.includes(s)))return i;i=i.parentNode}return t}function d4(n){return n.scrollHeight-n.clientHeight}function u4(n){return n.scrollWidth-n.clientWidth}function jp(n){const e=n.ownerDocument,t=e.defaultView;let o=n.parentNode;for(;o&&o.style&&e.body!==o;){if(o.style.overflow!=="visible"&&o.style.overflow!=="")return o;const i=t.getComputedStyle(o),s=["scroll","hidden","auto","clip"],r=i.getPropertyValue("overflow"),a=i.getPropertyValue("overflow-y"),l=i.getPropertyValue("overflow-x");if(s.includes(r)||s.includes(a)||s.includes(l))return o;o=o.parentNode}return t}function vC(n,e,t=window){if(n){if(n===t)return e==="width"?`${t.innerWidth}px`:e==="height"?`${t.innerHeight}px`:void 0}else return;const o=n.style[e];if(o!==""&&o!==void 0)return o;const i=t.getComputedStyle(n);if(i[e]!==""&&i[e]!==void 0)return i[e]}function bn(n){return n.offsetWidth}function Tn(n){return n.offsetHeight}function xu(n){return n.clientHeight||n.innerHeight}function sF(n){return n.clientWidth||n.innerWidth}function rF(n){return n.selectionStart?n.selectionStart:0}function f4(n){return n.selectionEnd?n.selectionEnd:0}function zI(n=window){n.getSelection&&(n.getSelection().empty?n.getSelection().empty():n.getSelection().removeAllRanges&&n.getSelection().removeAllRanges())}function Oy(n,e,t){if(t===void 0&&(t=e),n.setSelectionRange){n.focus();try{n.setSelectionRange(e,t)}catch{const i=n.parentNode,s=i.style.display;i.style.display="block",n.setSelectionRange(e,t),i.style.display=s}}}function g4(n=document){return fE()?Number.isInteger(n.defaultView.devicePixelRatio||1)?0:2:0}function p4(n=document){const e=(o=!1)=>{const i=n.createElement("div");i.style.height="200px",i.style.width="100%";const s=n.createElement("div");s.classList.add("htScrollbarTest"),o&&s.classList.add("htScrollbarSafariTest"),s.style.boxSizing="content-box",s.style.height="150px",s.style.left="0px",s.style.overflow="hidden",s.style.position="absolute",s.style.top="0px",s.style.width="200px",s.style.visibility="hidden",s.appendChild(i),n.body.appendChild(s);const r=i.offsetWidth;s.style.overflow="scroll";let a=i.offsetWidth;return r===a&&(a=s.clientWidth),n.body.removeChild(s),r-a},t=e();return t===0&&t4()&&!qr()&&!j0()?e(!0):t}let G_;function xn(n=document){return G_===void 0&&(G_=p4(n)),G_}function aF(n){return n instanceof Window?n.document.body.scrollHeight>n.innerHeight:n.offsetWidth!==n.clientWidth}function lF(n){return n instanceof Window?n.document.body.scrollWidth>n.innerWidth:n.offsetHeight!==n.clientHeight}function X0(n,e,t){n.style.transform=`translate3d(${e},${t},0)`}function Dy(n){n.style.transform&&n.style.transform!==""&&(n.style.transform="")}function Nb(n){return n&&(["INPUT","SELECT","TEXTAREA"].indexOf(n.nodeName)>-1||n.contentEditable==="true")}function hF(n){return Nb(n)&&n.hasAttribute("data-hot-input")===!1}function cF(n){return!n.parentNode}function m4(n,e){new IntersectionObserver((o,i)=>{o.forEach(s=>{s.isIntersecting&&(e(),i.disconnect())})}).observe(n)}function dF(n,e=!0,t=!0){const o=n.ownerDocument,i=o.createRange(),s=o.defaultView.getSelection();fe(n,"contenteditable",!0),t&&fe(n,...al()),e&&B(n,"invisibleSelection"),i.selectNodeContents(n),s.removeAllRanges(),s.addRange(i)}function uF(n,e=!0){const t=n.ownerDocument.defaultView.getSelection();n.hasAttribute("aria-hidden")&&n.removeAttribute("aria-hidden"),t.removeAllRanges(),e&&oe(n,"invisibleSelection"),n.removeAttribute("contenteditable")}function w4(n,e,t=!0){dF(n,t),e(),uF(n,t)}function Qr(n){const e=n?.ownerDocument?.defaultView.Element;return!!(e&&e!==null&&n instanceof e)}function ye(n){return typeof n=="function"}function Im(n,e=200){let t=null,o;function i(...r){return t&&clearTimeout(t),t=setTimeout(()=>{t=null,o=n.apply(this,r)},e),o}function s(){t!==null&&(clearTimeout(t),t=null)}return i.cancel=s,i}function fF(n,...e){return function(...o){return n.apply(this,e.concat(o))}}function b4(n){const e=n.length;function t(o){return function(...s){const r=o.concat(s);let a;return r.length>=e?a=n.apply(this,r):a=t(r),a}}return t([])}function gE(n,e,t,o,i,s,r,a){return J(a)?n.call(e,t,o,i,s,r,a):J(r)?n.call(e,t,o,i,s,r):J(s)?n.call(e,t,o,i,s):J(i)?n.call(e,t,o,i):J(o)?n.call(e,t,o):J(t)?n.call(e,t):n.call(e)}const Te={ALT:18,ARROW_DOWN:40,ARROW_LEFT:37,ARROW_RIGHT:39,ARROW_UP:38,AUDIO_DOWN:mp()?182:174,AUDIO_MUTE:mp()?181:173,AUDIO_UP:mp()?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},C4=[Te.ALT,Te.ARROW_DOWN,Te.ARROW_LEFT,Te.ARROW_RIGHT,Te.ARROW_UP,Te.AUDIO_DOWN,Te.AUDIO_MUTE,Te.AUDIO_UP,Te.BACKSPACE,Te.CAPS_LOCK,Te.DELETE,Te.END,Te.ENTER,Te.ESCAPE,Te.F1,Te.F2,Te.F3,Te.F4,Te.F5,Te.F6,Te.F7,Te.F8,Te.F9,Te.F10,Te.F11,Te.F12,Te.F13,Te.F14,Te.F15,Te.F16,Te.F17,Te.F18,Te.F19,Te.HOME,Te.INSERT,Te.MEDIA_NEXT,Te.MEDIA_PLAY_PAUSE,Te.MEDIA_PREV,Te.MEDIA_STOP,Te.NULL,Te.NUM_LOCK,Te.PAGE_DOWN,Te.PAGE_UP,Te.PAUSE,Te.SCROLL_LOCK,Te.SHIFT,Te.TAB];function gF(n){return n===32||n>=48&&n<=57||n>=96&&n<=111||n>=186&&n<=192||n>=219&&n<=222||n>=226||n>=65&&n<=90}function pF(n){return C4.includes(n)}function y4(n){return[Te.CONTROL,Te.COMMAND_LEFT,Te.COMMAND_RIGHT,Te.COMMAND_FIREFOX].includes(n)}function Xu(n,e){const t=e.split("|");let o=!1;return O(t,i=>{if(n===Te[i])return o=!0,!1}),o}function es(n){n.isImmediatePropagationEnabled=!1,n.cancelBubble=!0}function Kl(n){return n.isImmediatePropagationEnabled===!1}function Uc(n){return n.button===2}function Z0(n){return n.button===0}function _4(n){return typeof TouchEvent<"u"&&n instanceof TouchEvent}function S4(n,e){const t={x:n.offsetX,y:n.offsetY};let o=n.target;if(!Qr(e)||o!==e&&o.contains(e))return t;for(;o!==e;)t.x+=o.offsetLeft,t.y+=o.offsetTop,o=o.offsetParent;return t}const gc=["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","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","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"],j_=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"]]),q_=new Map([[]]);function mF(n,e){if(e.has(n))throw new TypeError("Cannot initialize the same private elements twice on an object")}function v4(n,e){return e.get?e.get.call(n):e.value}function R4(n,e,t){if(e.set)e.set.call(n,t);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=t}}function wF(n,e,t){if(!e.has(n))throw new TypeError("attempted to "+t+" private field on non-instance");return e.get(n)}function Ho(n,e){var t=wF(n,e,"get");return v4(n,t)}function K_(n,e,t){mF(n,e),e.set(n,t)}function Ef(n,e,t){var o=wF(n,e,"set");return R4(n,o,t),t}function UI(n,e,t){if(!e.has(n))throw new TypeError("attempted to get private field on non-instance");return t}function E4(n,e){mF(n,e),e.add(n)}const k4=100;var Ri=new WeakMap,sc=new WeakMap,iw=new WeakMap,X_=new WeakSet;class YI{getHooks(e){return Ho(this,Ri).get(e)??[]}add(e,t,o={}){Ho(this,Ri).has(e)||(UI(this,X_,GI).call(this,e),gc.push(e));const i=Ho(this,Ri).get(e),s=i.find(c=>c.callback===t);if(s){s.skip===!0&&(s.skip=!1);return}const r=Number.isInteger(o.orderIndex)?o.orderIndex:0,a=!!o.runOnce,l=!!o.initialHook;let h=!1;if(l){const c=i.find(d=>d.initialHook);c&&(c.callback=t,h=!0)}if(!h){i.push({callback:t,orderIndex:r,runOnce:a,initialHook:l,skip:!1});let c=Ho(this,iw).has(e);!c&&r!==0&&(c=!0,Ho(this,iw).add(e)),c&&i.length>1&&Ho(this,Ri).set(e,i.toSorted((d,u)=>d.orderIndex-u.orderIndex))}}has(e){return Ho(this,Ri).has(e)&&Ho(this,Ri).get(e).length>0}remove(e,t){if(!Ho(this,Ri).has(e))return!1;const o=Ho(this,Ri).get(e),i=o.find(s=>s.callback===t);if(i){let s=Ho(this,sc).get(e);return i.skip=!0,s+=1,s>k4&&(Ho(this,Ri).set(e,o.filter(r=>!r.skip)),s=0),Ho(this,sc).set(e,s),!0}return!1}destroy(){Ho(this,Ri).clear(),Ho(this,sc).clear(),Ef(this,Ri,null),Ef(this,sc,null)}constructor(){E4(this,X_),K_(this,Ri,{writable:!0,value:void 0}),K_(this,sc,{writable:!0,value:void 0}),K_(this,iw,{writable:!0,value:void 0}),Ef(this,Ri,new Map),Ef(this,sc,new Map),Ef(this,iw,new Set),gc.forEach(e=>UI(this,X_,GI).call(this,e))}}function GI(n){Ho(this,Ri).set(n,[]),Ho(this,sc).set(n,0)}const T4=pt`The plugin hook "[hookName]" was removed in Handsontable [removedInVersion].\x20
|
|
26
|
+
Please consult release notes https://github.com/handsontable/handsontable/releases/tag/[removedInVersion] to\x20
|
|
27
|
+
learn about the migration path.`;class he{static getSingleton(){return M4()}getBucket(e=null){return e?(e.pluginHookBucket||(e.pluginHookBucket=new YI),e.pluginHookBucket):this.globalBucket}add(e,t,o=null,i){return Array.isArray(t)?O(t,s=>this.add(e,s,o)):(j_.has(e)&&Ie(My(T4,{hookName:e,removedInVersion:j_.get(e)})),q_.has(e)&&Ie(q_.get(e)),this.getBucket(o).add(e,t,{orderIndex:i,runOnce:!1})),this}once(e,t,o=null,i){return Array.isArray(t)?O(t,s=>this.once(e,s,o)):this.getBucket(o).add(e,t,{orderIndex:i,runOnce:!0}),this}addAsFixed(e,t,o=null){return Array.isArray(t)?O(t,i=>this.addAsFixed(e,i,o)):this.getBucket(o).add(e,t,{initialHook:!0}),this}remove(e,t,o=null){return this.getBucket(o).remove(e,t)}has(e,t=null){return this.getBucket(t).has(e)}run(e,t,o,i,s,r,a,l){{const h=this.getBucket().getHooks(t),c=h?h.length:0;let d=0;if(c)for(;d<c;){if(!h[d]||h[d].skip){d+=1;continue}const u=gE(h[d].callback,e,o,i,s,r,a,l);u!==void 0&&(o=u),h[d]&&h[d].runOnce&&this.remove(t,h[d].callback),d+=1}}{const h=this.getBucket(e).getHooks(t),c=h?h.length:0;let d=0;if(c)for(;d<c;){if(!h[d]||h[d].skip){d+=1;continue}const u=gE(h[d].callback,e,o,i,s,r,a,l);u!==void 0&&(o=u),h[d]&&h[d].runOnce&&this.remove(t,h[d].callback,e),d+=1}}return o}destroy(e=null){this.getBucket(e).destroy()}register(e){this.isRegistered(e)||gc.push(e)}deregister(e){this.isRegistered(e)&&gc.splice(gc.indexOf(e),1)}isDeprecated(e){return q_.has(e)||j_.has(e)}isRegistered(e){return gc.indexOf(e)>=0}getRegistered(){return gc}constructor(){this.globalBucket=new YI}}const x4=new he;function M4(){return x4}const Ug=new Map;function ts(n="common"){Ug.has(n)||Ug.set(n,new Map);const e=Ug.get(n);function t(l,h){e.set(l,h)}function o(l){return e.get(l)}function i(l){return e.has(l)}function s(){return[...e.keys()]}function r(){return[...e.values()]}function a(){Ug.delete(n),e.clear()}return{register:t,getItem:o,hasItem:i,getNames:s,getValues:r,clear:a}}function I4(n,e){return Ug?.get(n.guid)?.get(e)}const pE=new WeakMap,{register:H4,getItem:bF,hasItem:CF,getNames:Bye,getValues:Vye}=ts("editors");function A4(n){const e={},t=n;this.getConstructor=function(){return n},this.getInstance=function(o){return o.guid in e||(e[o.guid]=new t(o)),e[o.guid]},he.getSingleton().add("afterDestroy",function(){e[this.guid]=null})}function yF(n,e){let t;return typeof n=="function"?(pE.get(n)||Bo(null,n),t=pE.get(n)):typeof n=="string"?t=bF(n):U('Only strings and functions can be passed as "editor" parameter'),t||U(`No editor registered under name "${n}"`),t.getInstance(e)}function mE(n){return typeof n=="function"?n:(CF(n)||U(`No registered editor found under "${n}" name`),bF(n).getConstructor())}function Bo(n,e){n&&typeof n!="string"&&(e=n,n=e.EDITOR_TYPE);const t=new A4(e);typeof n=="string"&&H4(n,t),pE.set(e,t)}class Wi{addEventListener(e,t,o,i=!1){function s(r){o.call(this,O4(r))}return this.context.eventListeners.push({element:e,event:t,callback:o,callbackProxy:s,options:i,eventManager:this}),e.addEventListener(t,s,i),()=>{this.removeEventListener(e,t,o)}}removeEventListener(e,t,o,i=!1){let s=this.context.eventListeners.length,r;for(;s;)if(s-=1,r=this.context.eventListeners[s],r.event===t&&r.element===e){if(o&&o!==r.callback||i&&r.eventManager!==this)continue;this.context.eventListeners.splice(s,1),r.element.removeEventListener(r.event,r.callbackProxy,r.options)}}clearEvents(e=!1){if(!this.context)return;let t=this.context.eventListeners.length;for(;t;){t-=1;const o=this.context.eventListeners[t];e&&o.eventManager!==this||(this.context.eventListeners.splice(t,1),o.element.removeEventListener(o.event,o.callbackProxy,o.options))}}clear(){this.clearEvents()}destroy(){this.clearEvents(),this.context=null}destroyWithOwnEventsOnly(){this.clearEvents(!0),this.context=null}fireEvent(e,t){let o=e.document,i=e;o||(o=e.ownerDocument?e.ownerDocument:e,i=o.defaultView);const s={bubbles:!0,cancelable:t!=="mousemove",view:i,detail:0,screenX:0,screenY:0,clientX:1,clientY:1,ctrlKey:!1,altKey:!1,shiftKey:!1,metaKey:!1,button:0};let r;o.createEvent?(r=o.createEvent("MouseEvents"),r.initMouseEvent(t,s.bubbles,s.cancelable,s.view,s.detail,s.screenX,s.screenY,s.clientX,s.clientY,s.ctrlKey,s.altKey,s.shiftKey,s.metaKey,s.button,o.body.parentNode)):r=o.createEventObject(),e.dispatchEvent?e.dispatchEvent(r):e.fireEvent(`on${t}`,r)}constructor(e=null){this.context=e||this,this.context.eventListeners||(this.context.eventListeners=[])}}function O4(n){const e=n.stopImmediatePropagation;return n.stopImmediatePropagation=function(){e.apply(this),es(this)},n}function D4(n,e){if(e.has(n))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Z_(n,e,t){if(!e.has(n))throw new TypeError("attempted to get private field on non-instance");return t}function jI(n,e){D4(n,e),e.add(n)}var Q_=new WeakSet,qI=new WeakSet;class wE{getActiveEditor(){return this.activeEditor}prepareEditor(){if(this.activeEditor&&this.activeEditor.isWaiting()){this.closeEditor(!1,!1,l=>{l&&this.prepareEditor()});return}const e=this.hot.getSelectedRangeActive()?.highlight;if(!e||e.isHeader())return;const{row:t,col:o}=e,i=this.hot.runHooks("modifyGetCellCoords",t,o,!1,"meta");let s=t,r=o;if(Array.isArray(i)&&([s,r]=i),this.cellProperties=this.hot.getCellMeta(s,r),!this.isCellEditable()){this.clearActiveEditor();return}const a=this.hot.getCell(t,o,!0);if(a){const l=this.hot.getCellEditor(this.cellProperties),h=this.hot.colToProp(r),c=this.hot.getSourceDataAtCell(this.hot.toPhysicalRow(s),r);this.activeEditor=yF(l,this.hot),this.activeEditor.prepare(t,o,h,a,c,this.cellProperties)}}isEditorOpened(){return this.activeEditor&&this.activeEditor.isOpened()}openEditor(e,t,o=!1){if(!this.isCellEditable()){this.clearActiveEditor();return}const i=this.hot.getSelectedRangeActive();let s=this.hot.runHooks("beforeBeginEditing",i.highlight.row,i.highlight.col,e,t,o);if(t instanceof MouseEvent&&typeof s!="boolean"&&(s=this.hot.selection.getLayerLevel()===0&&i.isSingle()),s===!1){this.clearActiveEditor();return}this.activeEditor||(this.hot.scrollToFocusedCell(),this.prepareEditor()),this.activeEditor&&(o&&this.activeEditor.enableFullEditMode(),this.activeEditor.beginEditing(e,t))}closeEditor(e,t,o){this.activeEditor?this.activeEditor.finishEditing(e,t,o):o&&o(!1)}closeEditorAndSaveChanges(e){this.closeEditor(!1,e)}closeEditorAndRestoreOriginalValue(e){this.closeEditor(!0,e)}clearActiveEditor(){this.activeEditor=void 0}isCellEditable(){const e=this.hot.getSelectedRangeActive();if(!e)return!1;const t=this.hot.getCellEditor(this.cellProperties),{row:o,col:i}=e.highlight,{rowIndexMapper:s,columnIndexMapper:r}=this.hot,a=s.isHidden(this.hot.toPhysicalRow(o))||r.isHidden(this.hot.toPhysicalColumn(i));return!(this.cellProperties.readOnly||!t||a)}moveSelectionAfterEnter(e){if(!this.hot.getSelected())return;const t={...typeof this.tableMeta.enterMoves=="function"?this.tableMeta.enterMoves(e):this.tableMeta.enterMoves};e.shiftKey&&(t.row=-t.row,t.col=-t.col),this.hot.selection.isMultiple()?this.selection.transformFocus(t.row,t.col):this.selection.transformStart(t.row,t.col,!0)}destroy(){this.destroyed=!0,this.eventManager.destroy()}constructor(e,t,o){jI(this,Q_),jI(this,qI),this.destroyed=!1,this.hot=e,this.tableMeta=t,this.selection=o,this.eventManager=new Wi(e),this.hot.addHook("afterDocumentKeyDown",i=>Z_(this,Q_,KI).call(this,i)),this.hot.addHook("beforeCompositionStart",i=>Z_(this,Q_,KI).call(this,i)),this.hot.view._wt.update("onCellDblClick",(i,s,r)=>Z_(this,qI,N4).call(this,i,s,r))}}function KI(n){const e=this.hot.getSelectedRangeActive();if(!this.hot.isListening()||!e||e.highlight.isHeader()||Kl(n))return;const{keyCode:t}=n,o=(n.ctrlKey||n.metaKey)&&!n.altKey;(!this.activeEditor||this.activeEditor&&!this.activeEditor.isWaiting())&&!pF(t)&&!y4(t)&&!o&&!this.isEditorOpened()&&this.openEditor("",n)}function N4(n,e){e.isCell()&&(this.hot.getShortcutManager().isCtrlPressed()?this.clearActiveEditor():this.openEditor(null,n,!0))}const XI=new WeakMap;wE.getInstance=function(n,e,t){let o=XI.get(n);return o||(o=new wE(n,e,t),XI.set(n,o)),o};const _F={" ":" ","&":"&","<":"<",">":">"},P4=new RegExp(Object.keys(_F).map(n=>`(${n})`).join("|"),"gi");function L4(n){return(n&&n.nodeName||"")==="TABLE"}function ZI(n){const e=n.hasColHeaders(),t=n.hasRowHeaders(),o=[e?-1:0,t?-1:0,n.countRows()-1,n.countCols()-1],i=n.getData(...o),s=i.length,r=s>0?i[0].length:0,a=["<table>","</table>"],l=e?["<thead>","</thead>"]:[],h=["<tbody>","</tbody>"],c=t?1:0,d=e?1:0;for(let u=0;u<s;u+=1){const f=e&&u===0,p=[];for(let _=0;_<r;_+=1){const S=!f&&t&&_===0;let T="";if(f)T=`<th>${n.getColHeader(_-c)}</th>`;else if(S)T=`<th>${n.getRowHeader(u-d)}</th>`;else{const P=i[u][_],{hidden:F,rowspan:V,colspan:D}=n.getCellMeta(u-d,_-c);if(!F){const I=[];if(V&&I.push(`rowspan="${V}"`),D&&I.push(`colspan="${D}"`),ht(P))T=`<td ${I.join(" ")}></td>`;else{const G=P.toString().replace(/</g,"<").replace(/>/g,">").replace(/(<br(\s*|\/)>(\r\n|\n)?|\r\n|\n)/g,`<br>\r
|
|
28
|
+
`).replace(/\x20/gi," ").replace(/\t/gi,"	");T=`<td ${I.join(" ")}>${G}</td>`}}}p.push(T)}const C=["<tr>",...p,"</tr>"].join("");f?l.splice(1,0,C):h.splice(-1,0,C)}return a.splice(1,0,l.join(""),h.join("")),a.join("")}function QI(n){const e=n.length,t=["<table>"];for(let o=0;o<e;o+=1){const i=n[o],s=i.length,r=[];o===0&&t.push("<tbody>");for(let a=0;a<s;a+=1){const l=i[a],h=ht(l)?"":l.toString().replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/(<br(\s*|\/)>(\r\n|\n)?|\r\n|\n)/g,`<br>\r
|
|
29
|
+
`).replace(/\x20{2,}/gi,c=>`<span style="mso-spacerun: yes">${" ".repeat(c.length-1)} </span>`).replace(/\t/gi,"	");r.push(`<td>${h}</td>`)}t.push("<tr>",...r,"</tr>"),o+1===e&&t.push("</tbody>")}return t.push("</table>"),t.join("")}const SF=/<td\b[^>]*>/i,W4=/<\/\s*td\s*>/i,$4=/<p.*?>/g;function F4(n,e){let t=1,o=e;for(;t>0;){const i=n.substring(o),s=i.match(SF),r=i.match(W4);if(!r)return null;const a=o+r.index,l=r[0].length,h=s?o+s.index:n.length;if(h<a)t+=1,o=h+s[0].length;else{if(t-=1,t===0)return{start:a,length:l};o=a+l}}return null}function B4(n){const e=[];let t=0;for(;t<n.length;){const o=n.substring(t).match(SF);if(!o){e.push(n.substring(t));break}const i=t+o.index,s=o[0],r=i+s.length;e.push(n.substring(t,i));const a=F4(n,r);if(!a){e.push(n.substring(i));break}const l=n.substring(i,a.start+a.length),h=a.start-i,c=l.substring(s.length,h).trim().replaceAll(/\n\s+/g," ").replaceAll($4,`
|
|
30
|
+
`).replace(/^\n+/,"").replaceAll(/<\/(.*)>\s+$/mg,"</$1>").replace(/(<(?!br)([^>]+)>)/gi,"").replaceAll(/^ $/mg,"");e.push(`${s}${c}</td>`),t=a.start+a.length}return e.join("")}function JI(n,e=document){const t={},o=e.createDocumentFragment(),i=e.createElement("div");o.appendChild(i);let s=n;if(typeof s=="string"){const P=B4(s);i.insertAdjacentHTML("afterbegin",`${P}`),s=i.querySelector("table")}if(!s||!L4(s))return;const r=i.querySelector('meta[name$="enerator"]'),a=s.querySelector("tbody th")!==null,l=s.querySelector("tr"),h=l?Array.from(l.cells).reduce((P,F)=>P+F.colSpan,0)-(a?1:0):0,c=s.tFoot&&Array.from(s.tFoot.rows)||[],d=[];let u=!1,f=0,p=0;if(s.tHead){const P=Array.from(s.tHead.rows).filter(F=>{const V=F.querySelector("td")!==null;return V&&d.push(F),!V});f=P.length,u=f>0,f>1?t.nestedHeaders=Array.from(P).reduce((F,V)=>{const D=Array.from(V.cells).reduce((I,G,z)=>{if(a&&z===0)return I;const{colSpan:Y,innerHTML:te}=G,ee=Y>1?{label:te,colspan:Y}:te;return I.push(ee),I},[]);return F.push(D),F},[]):u&&(t.colHeaders=Array.from(P[0].children).reduce((F,V,D)=>(a&&D===0||F.push(V.innerHTML),F),[]))}d.length&&(t.fixedRowsTop=d.length),c.length&&(t.fixedRowsBottom=c.length);const C=[...d,...Array.from(s.tBodies).reduce((P,F)=>(Array.from(F.rows).forEach(V=>{P.push(V)}),P),[]),...c];p=C.length;const _=new Array(p);for(let P=0;P<p;P++)_[P]=new Array(h);const S=[],T=[];for(let P=0;P<p;P++){const F=C[P],V=Array.from(F.cells),D=V.length;for(let I=0;I<D;I++){const G=V[I],{nodeName:z,innerHTML:Y,rowSpan:te,colSpan:ee}=G,be=_[P].findIndex(me=>me===void 0);if(z==="TD"){if(te>1||ee>1){for(let Me=P;Me<P+te;Me++)if(Me<p)for(let Ge=be;Ge<be+ee;Ge++)_[Me][Ge]=null;const Ve=G.getAttribute("style");Ve&&Ve.includes("mso-ignore:colspan")||S.push({col:be,row:P,rowspan:te,colspan:ee})}let me="";r&&/excel/gi.test(r.content)?me=Y.replace(/[\r\n][\x20]{0,2}/g," ").replace(/<br(\s*|\/)>[\r\n]?[\x20]{0,3}/gim,`\r
|
|
31
|
+
`):me=Y.replace(/<br(\s*|\/)>[\r\n]?/gim,`\r
|
|
32
|
+
`),_[P][be]=me.replace(P4,Ve=>_F[Ve])}else T.push(Y)}}return S.length&&(t.mergeCells=S),T.length&&(t.rowHeaders=T),_.length&&(t.data=_),t}function di(n,e=[]){const t=typeof n;if(t==="number")return!isNaN(n)&&isFinite(n);if(t==="string"){if(n.length===0)return!1;if(n.length===1)return/\d/.test(n);const o=Array.from(new Set([".",...e])).map(i=>`\\${i}`).join("|");return new RegExp(`^[+-]?(((${o})?\\d+((${o})\\d+)?(e[+-]?\\d+)?)|(0x[a-f\\d]+))$`,"i").test(n.trim())}else if(t==="object")return!!n&&typeof n.valueOf()=="number"&&!(n instanceof Date);return!1}function V4(n){return di(n,[","])}function vF(n,e){return e!=="."||typeof n!="string"?!1:/^[+-]?[1-9]\d{0,2}(,\d{3})+$/.test(n.trim())}function Ee(n,e,t){let o=-1;for(typeof e=="function"?(t=e,e=n):o=n-1;++o<=e&&t(o)!==!1;);}function eH(n,e,t){let o=n+1;for(typeof e=="function"&&(t=e,e=0);--o>=e&&t(o)!==!1;);}function RF(n,e){return e=parseInt(e.toString().replace("%",""),10),e=isNaN(e)?0:e,parseInt(n*e/100,10)}function et(n,e,t){return Math.min(n,e)===n?e:Math.max(n,t)===n?t:n}function z4(n,e={}){const{decimalSeparator:t}=e,o=n.trim();if(vF(n,t))return parseFloat(o.replace(/,/g,""));const i=o.replace(",",".");return isNaN(parseFloat(i))===!1?parseFloat(i):null}function Lu(n){return Number.isInteger(n)&&n>=0}const bE="asc",U4="desc",tH=new Map([[bE,[-1,1]],[U4,[1,-1]]]),Y4=n=>`The priority '${n}' is already declared in a map.`,G4=n=>`The priority '${n}' is not a number.`;function j4({errorPriorityExists:n,errorPriorityNaN:e}={}){const t=new Map;n=ye(n)?n:Y4,e=ye(e)?e:G4;function o(s,r){di(s)||U(e(s)),t.has(s)&&U(n(s)),t.set(s,r)}function i(s=bE){const[r,a]=tH.get(s)||tH.get(bE);return[...t].sort((l,h)=>l[0]<h[0]?r:a).map(l=>l[1])}return{addItem:o,getItems:i}}const q4=n=>`The id '${n}' is already declared in a map.`;function Hm({errorIdExists:n}={}){const e=new Map;n=ye(n)?n:q4;function t(c,d){h(c)&&U(n(c)),e.set(c,d)}function o(c){return e.delete(c)}function i(){e.clear()}function s(c){const[d]=a().find(([u,f])=>c===f?u:!1)||[null];return d}function r(c){return e.get(c)}function a(){return[...e]}function l(){return[...e.values()]}function h(c){return e.has(c)}return{addItem:t,clear:i,getId:s,getItem:r,getItems:a,getValues:l,hasItem:h,removeItem:o}}const K4=n=>`'${n}' value is already declared in a unique set.`;function X4({errorItemExists:n}={}){const e=new Set;n=ye(n)?n:K4;function t(s){e.has(s)&&U(n(s)),e.add(s)}function o(){return[...e]}function i(){e.clear()}return{addItem:t,clear:i,getItems:o}}const Q0=n=>`There is already registered "${n}" plugin.`,Z4=n=>`There is already registered plugin on priority "${n}".`,Q4=n=>`The priority "${n}" is not a number.`,EF=j4({errorPriorityExists:Z4,errorPriorityNaN:Q4}),kF=X4({errorItemExists:Q0}),CE=Hm({errorIdExists:Q0});function TF(){return[...EF.getItems(),...kF.getItems()]}function J0(n){const e=mr(n);return CE.getItem(e)}function J4(n){return!!J0(n)}function ot(n,e,t){[n,e,t]=t5(n,e,t),J0(n)===void 0&&e5(n,e,t)}function e5(n,e,t){const o=mr(n);CE.hasItem(o)&&U(Q0(o)),t===void 0?kF.addItem(o):EF.addItem(t,o),CE.addItem(o,e)}function t5(n,e,t){return typeof n=="function"&&(e=n,n=e.PLUGIN_KEY,t=e.PLUGIN_PRIORITY),[n,e,t]}const{register:n5,getItem:o5,hasItem:xF,getNames:zye,getValues:Uye}=ts("renderers");function yE(n){return typeof n=="function"?n:(xF(n)||U(`No registered renderer found under "${n}" name`),o5(n))}function ai(n,e){typeof n!="string"&&(e=n,n=e.RENDERER_TYPE),n5(n,e)}const{register:i5,getItem:s5,hasItem:MF,getNames:Yye,getValues:Gye}=ts("validators");function r5(n){return typeof n=="function"?n:(MF(n)||U(`No registered validator found under "${n}" name`),s5(n))}function Aa(n,e){typeof n!="string"&&(e=n,n=e.VALIDATOR_TYPE),i5(n,e)}class a5{initialize(){}process(e,t){const{totalCalculatedWidth:o,zeroBasedScrollOffset:i,viewportWidth:s,columnWidth:r}=t,a=i>0?s+1:s;o>=i&&o+r<=i+a&&((this.startColumn===null||this.startColumn===void 0)&&(this.startColumn=e),this.endColumn=e)}finalize(e){const{scrollOffset:t,viewportWidth:o,inlineStartOffset:i,zeroBasedScrollOffset:s,totalColumns:r,needReverse:a,positionCache:l,columnWidth:h}=e;if(this.endColumn===r-1&&a)for(this.startColumn=this.endColumn;this.startColumn>0;){const f=l.getOffset(this.endColumn)+h-l.getOffset(this.startColumn-1);if(f<=o&&(this.startColumn-=1),f>=o)break}this.startPosition=this.startColumn!==null?l.getOffset(this.startColumn):null;const c=s>0?o+1:o,d=t+o-c,u=this.startColumn===null?0:e.getColumnWidth(this.startColumn);d<-1*i||t>l.getOffset(e.lastProcessedIndex)||-1*t-o>-1*u?this.isVisibleInTrimmingContainer=!1:this.isVisibleInTrimmingContainer=!0,r<this.endColumn&&(this.endColumn=r-1),this.startColumn!==null&&(this.count=this.endColumn-this.startColumn+1)}constructor(){this.count=0,this.startColumn=null,this.endColumn=null,this.startPosition=null,this.isVisibleInTrimmingContainer=!1}}class l5{initialize(){}process(e,t){const{totalCalculatedHeight:o,zeroBasedScrollOffset:i,innerViewportHeight:s,rowHeight:r}=t;o>=i&&o+r<=s&&(this.startRow===null&&(this.startRow=e),this.endRow=e)}finalize(e){const{scrollOffset:t,viewportHeight:o,horizontalScrollbarHeight:i,totalRows:s,needReverse:r,positionCache:a,rowHeight:l}=e;if(this.endRow===s-1&&r)for(this.startRow=this.endRow;this.startRow>0;){const d=a.getOffset(this.endRow)+l-a.getOffset(this.startRow-1);if(d<=o-i&&(this.startRow-=1),d>=o-i)break}this.startPosition=this.startRow!==null?a.getOffset(this.startRow):null;const h=t+o-i,c=this.startRow===null?0:e.getRowHeight(this.startRow);h<c||t>a.getOffset(e.lastProcessedIndex)?this.isVisibleInTrimmingContainer=!1:this.isVisibleInTrimmingContainer=!0,s<this.endRow&&(this.endRow=s-1),this.startRow!==null&&(this.count=this.endRow-this.startRow+1)}constructor(){this.count=0,this.startRow=null,this.endRow=null,this.startPosition=null,this.isVisibleInTrimmingContainer=!1}}class IF{initialize(){}process(e,t){const{totalCalculatedWidth:o,zeroBasedScrollOffset:i,viewportWidth:s}=t;o<=i&&(this.startColumn=e);const r=i>0?s+1:s;o>=i&&o<=i+r&&(this.startColumn===null||this.startColumn===void 0)&&(this.startColumn=e),this.endColumn=e}finalize(e){const{scrollOffset:t,viewportWidth:o,inlineStartOffset:i,zeroBasedScrollOffset:s,totalColumns:r,needReverse:a,positionCache:l,columnWidth:h}=e;if(this.endColumn===r-1&&a)for(this.startColumn=this.endColumn;this.startColumn>0;){const u=l.getOffset(this.endColumn)+h-l.getOffset(this.startColumn-1);if(this.startColumn-=1,u>o)break}this.startPosition=this.startColumn!==null?l.getOffset(this.startColumn):null;const c=s>0?o+1:o;t+o-c<-1*i||t>l.getOffset(e.lastProcessedIndex)+h||-1*t-o>0?this.isVisibleInTrimmingContainer=!1:this.isVisibleInTrimmingContainer=!0,r<this.endColumn&&(this.endColumn=r-1),this.startColumn!==null&&(this.count=this.endColumn-this.startColumn+1)}constructor(){this.count=0,this.startColumn=null,this.endColumn=null,this.startPosition=null,this.isVisibleInTrimmingContainer=!1}}class HF{initialize(){}process(e,t){const{totalCalculatedHeight:o,zeroBasedScrollOffset:i,innerViewportHeight:s}=t;o<=i&&(this.startRow=e),o>=i&&o<=s&&this.startRow===null&&(this.startRow=e),this.endRow=e}finalize(e){const{scrollOffset:t,viewportHeight:o,horizontalScrollbarHeight:i,totalRows:s,needReverse:r,positionCache:a,rowHeight:l}=e;if(this.endRow===s-1&&r)for(this.startRow=this.endRow;this.startRow>0;){const c=a.getOffset(this.endRow)+l-a.getOffset(this.startRow-1);if(this.startRow-=1,c>=o-i)break}this.startPosition=this.startRow!==null?a.getOffset(this.startRow):null,t+o-i<0||t>a.getOffset(e.lastProcessedIndex)+l?this.isVisibleInTrimmingContainer=!1:this.isVisibleInTrimmingContainer=!0,s<this.endRow&&(this.endRow=s-1),this.startRow!==null&&(this.count=this.endRow-this.startRow+1)}constructor(){this.count=0,this.startRow=null,this.endRow=null,this.startPosition=null,this.isVisibleInTrimmingContainer=!1}}class h5{initialize({totalColumns:e}){this.count=e,this.endColumn=this.count-1}process(){}finalize(){}constructor(){this.count=0,this.startColumn=0,this.endColumn=0,this.startPosition=0,this.isVisibleInTrimmingContainer=!0}}class c5{initialize({totalRows:e}){this.count=e,this.endRow=this.count-1}process(){}finalize(){}constructor(){this.count=0,this.startRow=0,this.endRow=0,this.startPosition=0,this.isVisibleInTrimmingContainer=!0}}class d5 extends IF{finalize(e){super.finalize(e);const{overrideFn:t,totalColumns:o,positionCache:i}=e;if(this.startColumn!==null&&typeof t=="function"){const s=this.startColumn,r=this.endColumn;t(this),this.columnStartOffset=s-this.startColumn,this.columnEndOffset=this.endColumn-r}this.startColumn<0&&(this.startColumn=0),this.startPosition=this.startColumn!==null?i.getOffset(this.startColumn):null,o<this.endColumn&&(this.endColumn=o-1),this.startColumn!==null&&(this.count=this.endColumn-this.startColumn+1)}constructor(...e){super(...e),this.columnStartOffset=0,this.columnEndOffset=0}}class u5 extends HF{finalize(e){super.finalize(e);const{overrideFn:t,totalRows:o,positionCache:i}=e;if(this.startRow!==null&&typeof t=="function"){const s=this.startRow,r=this.endRow;t(this),this.rowStartOffset=s-this.startRow,this.rowEndOffset=this.endRow-r}this.startRow<0&&(this.startRow=0),this.startPosition=this.startRow!==null?i.getOffset(this.startRow):null,o<this.endRow&&(this.endRow=o-1),this.startRow!==null&&(this.count=this.endRow-this.startRow+1)}constructor(...e){super(...e),this.rowStartOffset=0,this.rowEndOffset=0}}function AF(n,{totalCount:e,zeroBasedScrollOffset:t,scrollEnd:o,positionCache:i,setSizeField:s,setTotalCalculated:r,getTotalCalculated:a}){n._initialize(n);let l=0;t>0&&e>0&&(l=i.findIndexAtOffset(t),r(n,i.getOffset(l)));let h=-1;for(let c=l;c<e;c++){const d=i.getSizeAt(c);if(s(n,d),n._process(c,n),h=c,r(n,a(n)+d),a(n)>=o){n.needReverse=!1;break}}n.lastProcessedIndex=h,n._finalize(n)}class OF{_initialize(e){this.calculationTypes.forEach(([t,o])=>{this.calculationResults.set(t,o),o.initialize(e)})}_process(e,t){this.calculationTypes.forEach(([,o])=>o.process(e,t))}_finalize(e){this.calculationTypes.forEach(([,t])=>t.finalize(e))}getResultsFor(e){return this.calculationResults.get(e)}constructor(e){this.calculationTypes=[],this.calculationResults=new Map,this.calculationTypes=e}}class f5 extends OF{calculate(){AF(this,{totalCount:this.totalColumns,zeroBasedScrollOffset:this.zeroBasedScrollOffset,scrollEnd:this.zeroBasedScrollOffset+this.viewportWidth,positionCache:this.positionCache,setSizeField:(e,t)=>{e.columnWidth=t},setTotalCalculated:(e,t)=>{e.totalCalculatedWidth=t},getTotalCalculated:e=>e.totalCalculatedWidth})}getColumnWidth(e){return this.positionCache.getSizeAt(e)}constructor({calculationTypes:e,viewportWidth:t,scrollOffset:o,totalColumns:i,overrideFn:s,inlineStartOffset:r,columnWidthCache:a}){super(e),this.viewportWidth=0,this.scrollOffset=0,this.zeroBasedScrollOffset=0,this.totalColumns=0,this.columnWidth=0,this.overrideFn=null,this.inlineStartOffset=0,this.totalCalculatedWidth=0,this.needReverse=!0,this.viewportWidth=t,this.scrollOffset=o,this.zeroBasedScrollOffset=Math.max(o,0),this.totalColumns=i,this.overrideFn=s,this.inlineStartOffset=r,this.positionCache=a,this.calculate()}}class g5 extends OF{calculate(){AF(this,{totalCount:this.totalRows,zeroBasedScrollOffset:this.zeroBasedScrollOffset,scrollEnd:this.innerViewportHeight,positionCache:this.positionCache,setSizeField:(e,t)=>{e.rowHeight=t},setTotalCalculated:(e,t)=>{e.totalCalculatedHeight=t},getTotalCalculated:e=>e.totalCalculatedHeight})}getRowHeight(e){return this.positionCache.getSizeAt(e)}constructor({calculationTypes:e,viewportHeight:t,scrollOffset:o,totalRows:i,overrideFn:s,horizontalScrollbarHeight:r,rowHeightCache:a}){super(e),this.viewportHeight=0,this.scrollOffset=0,this.zeroBasedScrollOffset=0,this.totalRows=0,this.rowHeight=0,this.overrideFn=null,this.horizontalScrollbarHeight=0,this.innerViewportHeight=0,this.totalCalculatedHeight=0,this.needReverse=!0,this.viewportHeight=t,this.scrollOffset=o,this.zeroBasedScrollOffset=Math.max(o,0),this.totalRows=i,this.overrideFn=s,this.horizontalScrollbarHeight=r??0,this.innerViewportHeight=this.zeroBasedScrollOffset+this.viewportHeight-this.horizontalScrollbarHeight,this.positionCache=a,this.calculate()}}const Zu=50;function p5(n,e){if(e.has(n))throw new TypeError("Cannot initialize the same private elements twice on an object")}function m5(n,e){return e.get?e.get.call(n):e.value}function w5(n,e,t){if(e.set)e.set.call(n,t);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=t}}function DF(n,e,t){if(!e.has(n))throw new TypeError("attempted to "+t+" private field on non-instance");return e.get(n)}function cd(n,e){var t=DF(n,e,"get");return m5(n,t)}function b5(n,e,t){p5(n,e),e.set(n,t)}function J_(n,e,t){var o=DF(n,e,"set");return w5(n,o,t),t}var _r=new WeakMap;class Yc{isValid(e){const{countRows:t,countCols:o,countRowHeaders:i,countColHeaders:s}={countRows:0,countCols:0,countRowHeaders:0,countColHeaders:0,...e};return!(!Number.isInteger(this.row)||!Number.isInteger(this.col)||this.row<-s||this.col<-i||this.row>=t||this.col>=o)}isEqual(e){return e===this?!0:this.row===e.row&&this.col===e.col}isHeader(){return!this.isCell()}isCell(){return this.row>=0&&this.col>=0}isRtl(){return cd(this,_r)}isSouthEastOf(e){return this.row>=e.row&&(cd(this,_r)?this.col<=e.col:this.col>=e.col)}isNorthWestOf(e){return this.row<=e.row&&(cd(this,_r)?this.col>=e.col:this.col<=e.col)}isSouthWestOf(e){return this.row>=e.row&&(cd(this,_r)?this.col>=e.col:this.col<=e.col)}isNorthEastOf(e){return this.row<=e.row&&(cd(this,_r)?this.col<=e.col:this.col>=e.col)}normalize(){return this.row=this.row===null?this.row:Math.max(this.row,0),this.col=this.col===null?this.col:Math.max(this.col,0),this}assign(e){return Number.isInteger(e?.row)&&(this.row=e.row),Number.isInteger(e?.col)&&(this.col=e.col),e instanceof Yc&&J_(this,_r,e.isRtl()),this}clone(){return new Yc(this.row,this.col,cd(this,_r))}toObject(){return{row:this.row,col:this.col}}constructor(e,t,o=!1){b5(this,_r,{writable:!0,value:void 0}),this.row=null,this.col=null,J_(this,_r,!1),J_(this,_r,o),typeof e<"u"&&typeof t<"u"&&(this.row=e,this.col=t)}}function C5(n,e){if(e.has(n))throw new TypeError("Cannot initialize the same private elements twice on an object")}function y5(n,e){return e.get?e.get.call(n):e.value}function _5(n,e,t){if(e.set)e.set.call(n,t);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=t}}function NF(n,e,t){if(!e.has(n))throw new TypeError("attempted to "+t+" private field on non-instance");return e.get(n)}function os(n,e){var t=NF(n,e,"get");return y5(n,t)}function S5(n,e,t){C5(n,e),e.set(n,t)}function nH(n,e,t){var o=NF(n,e,"set");return _5(n,o,t),t}var ei=new WeakMap;class lf{setHighlight(e){return this.highlight=e.clone(),this}setFrom(e){return this.from=e.clone(),this}setTo(e){return this.to=e.clone(),this}normalize(){return this.highlight.normalize(),this.from.normalize(),this.to.normalize(),this}isValid(e){return this.from.isValid(e)&&this.to.isValid(e)}isSingle(){return this.isSingleCell()||this.isSingleHeader()}isSingleCell(){return this.from.row>=0&&this.from.row===this.to.row&&this.from.col>=0&&this.from.col===this.to.col}isSingleHeader(){return(this.from.row<0||this.from.col<0)&&this.from.row===this.to.row&&this.from.col===this.to.col}isHeader(){return this.from.isHeader()&&this.to.isHeader()?!0:this.from.col<0&&this.to.col<0||this.from.row<0&&this.to.row<0}containsHeaders(){return this.from.isHeader()||this.to.isHeader()}getOuterHeight(){return Math.max(this.from.row,this.to.row)-Math.min(this.from.row,this.to.row)+1}getOuterWidth(){return Math.max(this.from.col,this.to.col)-Math.min(this.from.col,this.to.col)+1}getHeight(){if(this.from.row<0&&this.to.row<0)return 0;const e=Math.max(this.from.row,0),t=Math.max(this.to.row,0);return Math.max(e,t)-Math.min(e,t)+1}getWidth(){if(this.from.col<0&&this.to.col<0)return 0;const e=Math.max(this.from.col,0),t=Math.max(this.to.col,0);return Math.max(e,t)-Math.min(e,t)+1}getCellsCount(){return this.getWidth()*this.getHeight()}includes(e){const{row:t,col:o}=e,i=this.getOuterTopStartCorner(),s=this.getOuterBottomEndCorner();return i.row<=t&&s.row>=t&&i.col<=o&&s.col>=o}includesRange(e){return this.includes(e.getOuterTopStartCorner())&&this.includes(e.getOuterBottomEndCorner())}isEqual(e){return Math.min(this.from.row,this.to.row)===Math.min(e.from.row,e.to.row)&&Math.max(this.from.row,this.to.row)===Math.max(e.from.row,e.to.row)&&Math.min(this.from.col,this.to.col)===Math.min(e.from.col,e.to.col)&&Math.max(this.from.col,this.to.col)===Math.max(e.from.col,e.to.col)}overlaps(e){return e.isSouthEastOf(this.getOuterTopLeftCorner())&&e.isNorthWestOf(this.getOuterBottomRightCorner())}isSouthEastOf(e){return this.getOuterTopLeftCorner().isSouthEastOf(e)||this.getOuterBottomRightCorner().isSouthEastOf(e)}isNorthWestOf(e){return this.getOuterTopLeftCorner().isNorthWestOf(e)||this.getOuterBottomRightCorner().isNorthWestOf(e)}isOverlappingHorizontally(e){return this.getOuterTopEndCorner().col>=e.getOuterTopStartCorner().col&&this.getOuterTopEndCorner().col<=e.getOuterTopEndCorner().col||this.getOuterTopStartCorner().col<=e.getOuterTopEndCorner().col&&this.getOuterTopStartCorner().col>=e.getOuterTopStartCorner().col}isOverlappingVertically(e){return this.getOuterBottomStartCorner().row>=e.getOuterTopRightCorner().row&&this.getOuterBottomStartCorner().row<=e.getOuterBottomStartCorner().row||this.getOuterTopEndCorner().row<=e.getOuterBottomStartCorner().row&&this.getOuterTopEndCorner().row>=e.getOuterTopRightCorner().row}expand(e){const t=this.getOuterTopStartCorner(),o=this.getOuterBottomEndCorner();return e.row<t.row||e.col<t.col||e.row>o.row||e.col>o.col?(this.from=this._createCellCoords(Math.min(t.row,e.row),Math.min(t.col,e.col)),this.to=this._createCellCoords(Math.max(o.row,e.row),Math.max(o.col,e.col)),!0):!1}expandByRange(e,t=!0){if(this.includesRange(e)||!this.overlaps(e))return!1;const o=this.getOuterTopStartCorner(),i=this.getOuterBottomEndCorner(),s=this.getDirection(),r=e.getOuterTopStartCorner(),a=e.getOuterBottomEndCorner(),l=Math.min(o.row,r.row),h=Math.min(o.col,r.col),c=Math.max(i.row,a.row),d=Math.max(i.col,a.col),u=this._createCellCoords(l,h),f=this._createCellCoords(c,d);return this.from=u,this.to=f,this.setDirection(s),t&&(this.highlight.row===this.getOuterBottomRightCorner().row&&this.getVerticalDirection()==="N-S"&&this.flipDirectionVertically(),this.highlight.col===this.getOuterTopRightCorner().col&&this.getHorizontalDirection()==="W-E"&&this.flipDirectionHorizontally()),!0}getDirection(){if(this.from.isNorthWestOf(this.to))return"NW-SE";if(this.from.isNorthEastOf(this.to))return"NE-SW";if(this.from.isSouthEastOf(this.to))return"SE-NW";if(this.from.isSouthWestOf(this.to))return"SW-NE"}setDirection(e){switch(e){case"NW-SE":[this.from,this.to]=[this.getOuterTopLeftCorner(),this.getOuterBottomRightCorner()];break;case"NE-SW":[this.from,this.to]=[this.getOuterTopRightCorner(),this.getOuterBottomLeftCorner()];break;case"SE-NW":[this.from,this.to]=[this.getOuterBottomRightCorner(),this.getOuterTopLeftCorner()];break;case"SW-NE":[this.from,this.to]=[this.getOuterBottomLeftCorner(),this.getOuterTopRightCorner()];break}}getVerticalDirection(){return["NE-SW","NW-SE"].indexOf(this.getDirection())>-1?"N-S":"S-N"}getHorizontalDirection(){return["NW-SE","SW-NE"].indexOf(this.getDirection())>-1?"W-E":"E-W"}flipDirectionVertically(){switch(this.getDirection()){case"NW-SE":this.setDirection("SW-NE");break;case"NE-SW":this.setDirection("SE-NW");break;case"SE-NW":this.setDirection("NE-SW");break;case"SW-NE":this.setDirection("NW-SE");break}}flipDirectionHorizontally(){switch(this.getDirection()){case"NW-SE":this.setDirection("NE-SW");break;case"NE-SW":this.setDirection("NW-SE");break;case"SE-NW":this.setDirection("SW-NE");break;case"SW-NE":this.setDirection("SE-NW");break}}getTopStartCorner(){return this._createCellCoords(Math.min(this.from.row,this.to.row),Math.min(this.from.col,this.to.col)).normalize()}getTopLeftCorner(){return os(this,ei)?this.getTopEndCorner():this.getTopStartCorner()}getBottomEndCorner(){return this._createCellCoords(Math.max(this.from.row,this.to.row),Math.max(this.from.col,this.to.col)).normalize()}getBottomRightCorner(){return os(this,ei)?this.getBottomStartCorner():this.getBottomEndCorner()}getTopEndCorner(){return this._createCellCoords(Math.min(this.from.row,this.to.row),Math.max(this.from.col,this.to.col)).normalize()}getTopRightCorner(){return os(this,ei)?this.getTopStartCorner():this.getTopEndCorner()}getBottomStartCorner(){return this._createCellCoords(Math.max(this.from.row,this.to.row),Math.min(this.from.col,this.to.col)).normalize()}getBottomLeftCorner(){return os(this,ei)?this.getBottomEndCorner():this.getBottomStartCorner()}getOuterTopStartCorner(){return this._createCellCoords(Math.min(this.from.row,this.to.row),Math.min(this.from.col,this.to.col))}getOuterTopLeftCorner(){return os(this,ei)?this.getOuterTopEndCorner():this.getOuterTopStartCorner()}getOuterBottomEndCorner(){return this._createCellCoords(Math.max(this.from.row,this.to.row),Math.max(this.from.col,this.to.col))}getOuterBottomRightCorner(){return os(this,ei)?this.getOuterBottomStartCorner():this.getOuterBottomEndCorner()}getOuterTopEndCorner(){return this._createCellCoords(Math.min(this.from.row,this.to.row),Math.max(this.from.col,this.to.col))}getOuterTopRightCorner(){return os(this,ei)?this.getOuterTopStartCorner():this.getOuterTopEndCorner()}getOuterBottomStartCorner(){return this._createCellCoords(Math.max(this.from.row,this.to.row),Math.min(this.from.col,this.to.col))}getOuterBottomLeftCorner(){return os(this,ei)?this.getOuterBottomEndCorner():this.getOuterBottomStartCorner()}isCorner(e){return e.isEqual(this.getOuterTopLeftCorner())||e.isEqual(this.getOuterTopRightCorner())||e.isEqual(this.getOuterBottomLeftCorner())||e.isEqual(this.getOuterBottomRightCorner())}getOppositeCorner(e){if(!(e instanceof Yc))return!1;if(e.isEqual(this.getOuterBottomEndCorner()))return this.getOuterTopStartCorner();if(e.isEqual(this.getOuterTopStartCorner()))return this.getOuterBottomEndCorner();if(e.isEqual(this.getOuterTopEndCorner()))return this.getOuterBottomStartCorner();if(e.isEqual(this.getOuterBottomStartCorner()))return this.getOuterTopEndCorner()}getBordersSharedWith(e){if(!this.includesRange(e))return[];const t={top:Math.min(this.from.row,this.to.row),bottom:Math.max(this.from.row,this.to.row),left:Math.min(this.from.col,this.to.col),right:Math.max(this.from.col,this.to.col)},o={top:Math.min(e.from.row,e.to.row),bottom:Math.max(e.from.row,e.to.row),left:Math.min(e.from.col,e.to.col),right:Math.max(e.from.col,e.to.col)},i=[];return t.top===o.top&&i.push("top"),t.right===o.right&&i.push(os(this,ei)?"left":"right"),t.bottom===o.bottom&&i.push("bottom"),t.left===o.left&&i.push(os(this,ei)?"right":"left"),i}getInner(){const e=this.getOuterTopStartCorner(),t=this.getOuterBottomEndCorner(),o=[];for(let i=e.row;i<=t.row;i++)for(let s=e.col;s<=t.col;s++)!(this.from.row===i&&this.from.col===s)&&!(this.to.row===i&&this.to.col===s)&&o.push(this._createCellCoords(i,s));return o}getAll(){const e=this.getOuterTopStartCorner(),t=this.getOuterBottomEndCorner(),o=[];for(let i=e.row;i<=t.row;i++)for(let s=e.col;s<=t.col;s++)e.row===i&&e.col===s?o.push(e):t.row===i&&t.col===s?o.push(t):o.push(this._createCellCoords(i,s));return o}forAll(e){const t=this.getOuterTopStartCorner(),o=this.getOuterBottomEndCorner();for(let i=t.row;i<=o.row;i++)for(let s=t.col;s<=o.col;s++)if(e(i,s)===!1)return}clone(){return new lf(this.highlight,this.from,this.to,os(this,ei))}toObject(){return{from:this.from.toObject(),to:this.to.toObject()}}_createCellCoords(e,t){return new Yc(e,t,os(this,ei))}constructor(e,t=e,o=e,i=!1){S5(this,ei,{writable:!0,value:void 0}),this.highlight=null,this.from=null,this.to=null,nH(this,ei,!1),this.highlight=e.clone(),this.from=t.clone(),this.to=o.clone(),nH(this,ei,i)}}function PF(n,e){if(e.has(n))throw new TypeError("Cannot initialize the same private elements twice on an object")}function v5(n,e){return e.get?e.get.call(n):e.value}function R5(n,e,t){if(e.set)e.set.call(n,t);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=t}}function LF(n,e,t){if(!e.has(n))throw new TypeError("attempted to "+t+" private field on non-instance");return e.get(n)}function le(n,e){var t=LF(n,e,"get");return v5(n,t)}function is(n,e,t){PF(n,e),e.set(n,t)}function bo(n,e,t){var o=LF(n,e,"set");return R5(n,o,t),t}function $a(n,e,t){if(!e.has(n))throw new TypeError("attempted to get private field on non-instance");return t}function eS(n,e){PF(n,e),e.add(n)}const E5=500,oH=10;var ss=new WeakMap,tS=new WeakMap,Jn=new WeakMap,dd=new WeakMap,sw=new WeakMap,rs=new WeakMap,nS=new WeakMap,kf=new WeakMap,Dr=new WeakMap,Gi=new WeakMap,sh=new WeakMap,rh=new WeakMap,iH=new WeakSet,Xl=new WeakSet,sH=new WeakSet;let WF=class{registerEvents(){le(this,rs).addEventListener(le(this,Jn).holder,"contextmenu",o=>this.onContextMenu(o)),le(this,rs).addEventListener(le(this,Jn).TABLE,"mouseover",o=>this.onMouseOver(o)),le(this,rs).addEventListener(le(this,Jn).TABLE,"mouseout",o=>this.onMouseOut(o));const e=()=>{le(this,rs).addEventListener(le(this,Jn).holder,"touchstart",o=>this.onTouchStart(o)),le(this,rs).addEventListener(le(this,Jn).holder,"touchend",o=>this.onTouchEnd(o)),le(this,rs).addEventListener(le(this,Jn).holder,"touchmove",o=>$a(this,sH,T5).call(this,o)),this.momentumScrolling||(this.momentumScrolling={}),le(this,rs).addEventListener(le(this,Jn).holder,"scroll",()=>{$a(this,Xl,yc).call(this),clearTimeout(this.momentumScrolling._timeout),this.momentumScrolling.ongoing||le(this,ss).getSetting("onBeforeTouchScroll"),this.momentumScrolling.ongoing=!0,this.momentumScrolling._timeout=setTimeout(()=>{this.touchApplied||(this.momentumScrolling.ongoing=!1,le(this,ss).getSetting("onAfterMomentumScroll"))},200)})},t=()=>{le(this,rs).addEventListener(le(this,Jn).holder,"mouseup",o=>this.onMouseUp(o)),le(this,rs).addEventListener(le(this,Jn).holder,"mousedown",o=>this.onMouseDown(o))};qr()?e():(Q$()&&e(),t())}selectedCellWasTouched(e){const o=this.parentCell(e).coords;if(le(this,kf)&&o){const[i,s]=[o.row,le(this,kf).from.row],[r,a]=[o.col,le(this,kf).from.col];return i===s&&r===a}return!1}parentCell(e){const t={},o=le(this,Jn).TABLE,i=ow(e,["TD","TH"],o);return i?(t.coords=le(this,Jn).getCoords(i),t.TD=i):_e(e,"wtBorder")&&_e(e,"current")?(t.coords=le(this,dd).getFocusSelection().cellRange.highlight,t.TD=le(this,Jn).getCell(t.coords)):_e(e,"wtBorder")&&_e(e,"area")&&le(this,dd).getAreaSelection().cellRange&&(t.coords=le(this,dd).getAreaSelection().cellRange.to,t.TD=le(this,Jn).getCell(t.coords)),t}onMouseDown(e){const t=le(this,tS).rootDocument.activeElement,o=fF(s4,e.target),i=e.target;if(!["TD","TH"].includes(t.nodeName)&&(i===t||o(0)===t||o(1)===t))return;const s=this.parentCell(i);_e(i,"corner")?le(this,ss).getSetting("onCellCornerMouseDown",e,i):s.TD&&le(this,ss).has("onCellMouseDown")&&this.callListener("onCellMouseDown",e,s.coords,s.TD),(e.button===0||this.touchApplied)&&s.TD&&(le(this,Gi)[0]=s.TD,clearTimeout(le(this,Dr)[0]),le(this,Dr)[0]=setTimeout(()=>{le(this,Gi)[0]=null},1e3))}onContextMenu(e){if($a(this,Xl,yc).call(this),le(this,ss).has("onCellContextMenu")){const t=this.parentCell(e.target);t.TD&&this.callListener("onCellContextMenu",e,t.coords,t.TD)}}onMouseOver(e){if(!le(this,ss).has("onCellMouseOver"))return;const t=le(this,Jn).TABLE,o=ow(e.target,["TD","TH"],t),i=le(this,sw)||this;o&&o!==i.lastMouseOver&&Hc(o,t)&&(i.lastMouseOver=o,this.callListener("onCellMouseOver",e,le(this,Jn).getCoords(o),o))}onMouseOut(e){if(!le(this,ss).has("onCellMouseOut"))return;const t=le(this,Jn).TABLE,o=ow(e.target,["TD","TH"],t),i=ow(e.relatedTarget,["TD","TH"],t),s=le(this,sw)||this;o&&o!==i&&Hc(o,t)&&(this.callListener("onCellMouseOut",e,le(this,Jn).getCoords(o),o),i===null&&(s.lastMouseOver=null))}onMouseUp(e){const t=this.parentCell(e.target);t.TD&&le(this,ss).has("onCellMouseUp")&&this.callListener("onCellMouseUp",e,t.coords,t.TD),!(e.button!==0&&!this.touchApplied)&&(t.TD===le(this,Gi)[0]&&t.TD===le(this,Gi)[1]?(_e(e.target,"corner")?this.callListener("onCellCornerDblClick",e,t.coords,t.TD):this.callListener("onCellDblClick",e,t.coords,t.TD),le(this,Gi)[0]=null,le(this,Gi)[1]=null):t.TD===le(this,Gi)[0]&&(le(this,Gi)[1]=t.TD,clearTimeout(le(this,Dr)[1]),le(this,Dr)[1]=setTimeout(()=>{le(this,Gi)[1]=null},500)))}onTouchStart(e){bo(this,kf,le(this,dd).getFocusSelection().cellRange),this.touchApplied=!0,this.onMouseDown(e),$a(this,iH,k5).call(this,e)}onTouchEnd(e){$a(this,Xl,yc).call(this);const t=e.target,o=this.parentCell(t)?.coords,i=J(o)&&o.row>=0&&o.col>=0;if(e.cancelable&&i&&le(this,ss).getSetting("isDataViewInstance")){const r=["A","BUTTON","INPUT"];J$()&&(JG()||e4())&&this.selectedCellWasTouched(t)&&!r.includes(t.tagName)?e.preventDefault():this.selectedCellWasTouched(t)||e.preventDefault()}this.onMouseUp(e),this.touchApplied=!1}callListener(e,t,o,i){const s=le(this,ss).getSettingPure(e);s&&s(t,o,i,le(this,nS).call(this))}destroy(){clearTimeout(le(this,Dr)[0]),clearTimeout(le(this,Dr)[1]),$a(this,Xl,yc).call(this),le(this,rs).destroy()}constructor(e,t,o,i,s,r,a=null){eS(this,iH),eS(this,Xl),eS(this,sH),is(this,ss,{writable:!0,value:void 0}),is(this,tS,{writable:!0,value:void 0}),is(this,Jn,{writable:!0,value:void 0}),is(this,dd,{writable:!0,value:void 0}),is(this,sw,{writable:!0,value:void 0}),is(this,rs,{writable:!0,value:void 0}),is(this,nS,{writable:!0,value:void 0}),is(this,kf,{writable:!0,value:void 0}),is(this,Dr,{writable:!0,value:void 0}),is(this,Gi,{writable:!0,value:void 0}),is(this,sh,{writable:!0,value:void 0}),is(this,rh,{writable:!0,value:void 0}),bo(this,Dr,[null,null]),bo(this,Gi,[null,null]),bo(this,sh,null),bo(this,rh,null),bo(this,ss,o),bo(this,tS,t),bo(this,Jn,s),bo(this,dd,r),bo(this,sw,a),bo(this,rs,i),bo(this,nS,e),this.registerEvents()}};function k5(n){$a(this,Xl,yc).call(this);const e=n.touches[0];e&&(bo(this,rh,{x:e.clientX,y:e.clientY}),bo(this,sh,setTimeout(()=>{bo(this,sh,null),bo(this,rh,null),le(this,Gi)[0]=null,le(this,Gi)[1]=null,clearTimeout(le(this,Dr)[0]),clearTimeout(le(this,Dr)[1]);const t=n.target,o=new MouseEvent("contextmenu",{bubbles:!0,cancelable:!0,clientX:e.clientX,clientY:e.clientY,screenX:e.screenX,screenY:e.screenY});t.dispatchEvent(o)},E5)))}function yc(){le(this,sh)!==null&&(clearTimeout(le(this,sh)),bo(this,sh,null)),bo(this,rh,null)}function T5(n){if(le(this,sh)===null||le(this,rh)===null)return;const e=n.touches[0];if(!e){$a(this,Xl,yc).call(this);return}const t=Math.abs(e.clientX-le(this,rh).x),o=Math.abs(e.clientY-le(this,rh).y);(t>oH||o>oH)&&$a(this,Xl,yc).call(this)}class x5{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))}constructor(e,t,o){this.offset=e,this.total=t,this.countTH=o}}class M5{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))}constructor(e,t,o){this.offset=e,this.total=t,this.countTH=o}}class I5{setSize(e){this.currentSize=this.nextSize,this.nextSize=e}setOffset(e){this.currentOffset=this.nextOffset,this.nextOffset=e}constructor(){this.currentSize=0,this.nextSize=0,this.currentOffset=0,this.nextOffset=0}}const H5=0,RC=1,qp=2,A5=0,$F=1,FF=2,BF=3,VF=4,zF=5;class O5{setSize(e){this.size.setSize(e)}setOffset(e){this.size.setOffset(e)}getViewSize(){return this.size}isShared(){return this.sharedSize!==null}isPlaceOn(e){return this.workingSpace===e}append(e){this.workingSpace=RC,e.workingSpace=qp,this.sharedSize=e.getViewSize()}prepend(e){this.workingSpace=qp,e.workingSpace=RC,this.sharedSize=e.getViewSize()}constructor(){this.size=new I5,this.workingSpace=H5,this.sharedSize=null}}function D5(n,e){if(e.has(n))throw new TypeError("Cannot initialize the same private elements twice on an object")}function N5(n,e){return e.get?e.get.call(n):e.value}function P5(n,e,t){if(e.set)e.set.call(n,t);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=t}}function UF(n,e,t){if(!e.has(n))throw new TypeError("attempted to "+t+" private field on non-instance");return e.get(n)}function Tf(n,e){var t=UF(n,e,"get");return N5(n,t)}function L5(n,e,t){D5(n,e),e.set(n,t)}function W5(n,e,t){var o=UF(n,e,"set");return P5(n,o,t),t}var vh=new WeakMap;class $5{get length(){return this.order.length}has(e){return Tf(this,vh).has(e)}get(e){return e<this.order.length?this.order[e]:-1}remove(e){const t=this.order.indexOf(e);t>-1&&(this.order.splice(t,1),Tf(this,vh).delete(e))}prepend(e){this.order.unshift(e),Tf(this,vh).add(e);const t=this.order.pop();return Tf(this,vh).delete(t),t}constructor(e,t){L5(this,vh,{writable:!0,value:void 0}),this.order=[],W5(this,vh,new Set);const o=new Array(t),i=Tf(this,vh);for(let s=0;s<t;s++){const r=e+s;o[s]=r,i.add(r)}this.order=o}}class F5{diff(){const{sizeSet:e}=this,{currentSize:t,nextSize:o,currentOffset:i,nextOffset:s}=e.getViewSize();let r=Math.max(o,t);if(r===0)return[];const a=new $5(i,t),h=!e.isShared()||e.isPlaceOn(qp),c=[];for(let d=0;d<r;d++){const u=a.get(d),f=d<o?s+d:-1;if(f===-1)c.push([$F,u]);else if(u===-1)h?c.push([FF,f]):c.push([BF,f]);else if(f>u)a.has(f)&&(a.remove(f),o<=a.length&&(r-=1)),c.push([zF,f,u]);else if(f<u){const p=a.prepend(f);c.push([VF,f,u,p])}else c.push([A5,f])}return c}constructor(e){this.sizeSet=e}}class B5{applyCommand(e){const{rootNode:t}=this.orderView,[o,i,s,r]=e,a=this.orderView.nodesPool(i);switch(this.orderView.collectedNodes.push(a),o){case BF:t.insertBefore(a,t.firstChild);break;case FF:t.appendChild(a);break;case VF:t.insertBefore(a,this.orderView.nodesPool(s)),t.removeChild(this.orderView.nodesPool(r));break;case zF:t.replaceChild(a,this.orderView.nodesPool(s));break;case $F:t.removeChild(a);break}}start(){this.orderView.collectedNodes.length=0,this.leads=this.orderView.viewDiffer.diff(),this.leadIndex=0}render(){this.leadIndex<this.leads.length&&(this.applyCommand(this.leads[this.leadIndex]),this.leadIndex+=1)}end(){const{leads:e}=this;for(;this.leadIndex<e.length;)this.applyCommand(e[this.leadIndex]),this.leadIndex+=1}constructor(e){this.leads=[],this.leadIndex=0,this.orderView=e}}class V5{getRenderedChildCount(){const{rootNode:e,sizeSet:t}=this.orderView;let o=0;if(this.orderView.isSharedViewSet()){let i=e.firstElementChild;for(;i;){if(i.tagName===this.orderView.childNodeType)o+=1;else if(t.isPlaceOn(RC))break;i=i.nextElementSibling}}else o=e.childElementCount;return o}start(){this.orderView.collectedNodes.length=0,this.visualIndex=0;const{rootNode:e,sizeSet:t}=this.orderView,o=this.orderView.isSharedViewSet(),{nextSize:i}=t.getViewSize();let s=this.getRenderedChildCount();for(;s<i;){const a=this.orderView.nodesPool();!o||o&&t.isPlaceOn(qp)?e.appendChild(a):e.insertBefore(a,e.firstChild),s+=1}const r=o&&t.isPlaceOn(RC);for(;s>i;)e.removeChild(r?e.firstChild:e.lastChild),s-=1}render(){const{rootNode:e,sizeSet:t}=this.orderView;let o=this.visualIndex;this.orderView.isSharedViewSet()&&t.isPlaceOn(qp)&&(o+=t.sharedSize.nextSize);let i=e.childNodes[o];if(i.tagName!==this.orderView.childNodeType){const s=this.orderView.nodesPool();e.replaceChild(s,i),i=s}this.orderView.collectedNodes.push(i),this.visualIndex+=1}end(){}constructor(e){this.visualIndex=0,this.orderView=e}}function z5(n){return mp()?new V5(n):new B5(n)}class Am{setSize(e){return this.sizeSet.setSize(e),this}setOffset(e){return this.sizeSet.setOffset(e),this}isSharedViewSet(){return this.sizeSet.isShared()}getNode(e){return e<this.collectedNodes.length?this.collectedNodes[e]:null}getCurrentNode(){const e=this.collectedNodes.length;return e>0?this.collectedNodes[e-1]:null}start(){this.rendererAdapter.start()}render(){this.rendererAdapter.render()}end(){this.rendererAdapter.end()}constructor(e,t,o){this.sizeSet=new O5,this.collectedNodes=[],this.viewDiffer=new F5(this.sizeSet),this.rootNode=e,this.nodesPool=t,this.childNodeType=o,this.rendererAdapter=z5(this)}}class YF extends Am{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}}const U5=1048576;class Y5{setRootDocument(e){this.rootDocument=e}obtain(e,t){if(mp())return this.rootDocument.createElement(this.nodeType);const o=typeof t=="number"?e*U5+t:e;let i=this.pool.get(o);return i!==void 0||(i=this.rootDocument.createElement(this.nodeType),this.pool.set(o,i)),i}constructor(e){this.pool=new Map,this.nodeType=e.toUpperCase()}}class hf{setTable(e){this.nodesPool&&this.nodesPool.setRootDocument(e.rootDocument),this.table=e}render(){}constructor(e,t){this.nodesPool=null,this.table=null,this.renderedNodes=0,this.nodesPool=typeof e=="string"?new Y5(e):null,this.nodeType=e,this.rootNode=t}}class G5 extends hf{obtainOrderView(e){let t;return this.orderViews.has(e)?t=this.orderViews.get(e):(t=new YF(e,o=>this.nodesPool.obtain(this.sourceRowIndex,o),this.nodeType),this.orderViews.set(e,t)),t}render(){const{rowsToRender:e,rowHeaderFunctions:t,rowHeadersCount:o,rows:i,cells:s}=this.table;for(let r=0;r<e;r++){const a=this.table.renderedRowToSource(r),l=i.getRenderedNode(r);this.sourceRowIndex=a;const h=this.obtainOrderView(l),c=s.obtainOrderView(l);h.appendView(c).setSize(o).setOffset(0).start();for(let d=o-1;d>=0;d--){h.render();const u=h.getCurrentNode();u.className="",u.removeAttribute("style"),Zr(u,[new RegExp("aria-(.*)"),new RegExp("role")]),this.table.isAriaEnabled()&&fe(u,[_G(),OG(),z0(d+1),wr(-1)]),t[d](a,u,d)}h.end()}}constructor(){super("TH"),this.orderViews=new WeakMap,this.sourceRowIndex=0}}class j5 extends hf{getRenderedNode(e){return this.orderView.getNode(e)}render(){const{columnHeadersCount:e}=this.table;this.table.isAriaEnabled()&&fe(this.rootNode,[Y$()]),this.orderView.setSize(e).setOffset(0).start();for(let t=0;t<e;t++){this.orderView.render();const o=this.orderView.getCurrentNode();this.table.isAriaEnabled()&&fe(o,[G$(),X$(t+1)])}this.orderView.end()}constructor(e){super("TR",e),this.orderView=new Am(e,t=>this.nodesPool.obtain(t),this.nodeType)}}class q5 extends hf{obtainOrderView(e){let t;return this.orderViews.has(e)?t=this.orderViews.get(e):(t=new Am(e,o=>this.nodesPool.obtain(this.sourceRowIndex,o),this.nodeType),this.orderViews.set(e,t)),t}render(){const{columnHeadersCount:e,columnHeaderFunctions:t,columnsToRender:o,rowHeadersCount:i,columnHeaderRows:s}=this.table,r=o+i;for(let a=0;a<e;a++){const l=s.getRenderedNode(a);this.sourceRowIndex=a;const h=this.obtainOrderView(l);h.setSize(r).setOffset(0).start();for(let c=0;c<r;c++){h.render();const d=c-i,u=this.table.renderedColumnToSource(d),f=h.getCurrentNode();f.className="",f.removeAttribute("style"),Zr(f,[new RegExp("aria-(.*)"),new RegExp("role")]),this.table.isAriaEnabled()&&fe(f,[z0(c+1),wr(-1),SG(),...d>=0?[AG()]:[yG(),Ni("Select whole grid")]]),t[a](u,f,a)}h.end()}}constructor(){super("TH"),this.orderViews=new WeakMap,this.sourceRowIndex=0}}let rH=!1;class K5 extends hf{render(){const{columnsToRender:e,rowHeadersCount:t}=this.table,o=e+t;!rH&&e>1e3&&(rH=!0,Ie(pt`Performance tip: Handsontable rendered more than 1000 visible columns.\x20
|
|
33
|
+
Consider limiting the number of rendered columns by specifying the table width and/or\x20
|
|
34
|
+
turning off the "renderAllColumns" option.`)),this.orderView.setSize(o).setOffset(0).start();for(let s=0;s<o;s++){this.orderView.render();const r=this.orderView.getCurrentNode();if(s<t){const a=this.table.renderedColumnToSource(s);r.style.width=`${this.table.columnUtils.getHeaderWidth(a)}px`}else{const a=this.table.renderedColumnToSource(s-t);r.style.width=`${this.table.columnUtils.getWidth(a)}px`}}this.orderView.end();const i=this.rootNode.firstChild;i&&B(i,"rowHeader")}constructor(e){super("COL",e),this.orderView=new Am(e,t=>this.nodesPool.obtain(t),this.nodeType)}}const ud={rowEven:"ht__row_even",rowOdd:"ht__row_odd"};let aH=!1;class X5 extends hf{getRenderedNode(e){return this.orderView.getNode(e)}render(){const{rowsToRender:e}=this.table;!aH&&e>1e3&&(aH=!0,Ie(pt`Performance tip: Handsontable rendered more than 1000 visible rows.\x20
|
|
35
|
+
Consider limiting the number of rendered rows by specifying the table height and/or\x20
|
|
36
|
+
turning off the "renderAllRows" option.`)),this.table.isAriaEnabled()&&fe(this.rootNode,[Y$()]),this.orderView.setSize(e).setOffset(this.table.renderedRowToSource(0)).start();for(let t=0;t<e;t++){this.orderView.render();const o=this.orderView.getCurrentNode(),i=this.table.renderedRowToSource(t);this.table.isAriaEnabled()&&fe(o,[G$(),X$(i+(this.table.rowUtils?.dataAccessObject?.columnHeaders.length??0)+1)]),(i+1)%2===0?_e(o,ud.rowEven)||(oe(o,ud.rowOdd),B(o,ud.rowEven)):_e(o,ud.rowOdd)||(oe(o,ud.rowEven),B(o,ud.rowOdd))}this.orderView.end()}constructor(e){super("TR",e),this.orderView=new Am(e,t=>this.nodesPool.obtain(t),this.nodeType)}}class Z5 extends hf{obtainOrderView(e){let t;return this.orderViews.has(e)?t=this.orderViews.get(e):(t=new YF(e,o=>this.nodesPool.obtain(this.sourceRowIndex,o),this.nodeType),this.orderViews.set(e,t)),t}render(){const{rowsToRender:e,columnsToRender:t,rows:o,rowHeaders:i}=this.table;for(let s=0;s<e;s++){const r=this.table.renderedRowToSource(s),a=o.getRenderedNode(s);this.sourceRowIndex=r;const l=this.obtainOrderView(a),h=i.obtainOrderView(a);l.prependView(h).setSize(t).setOffset(0).start();for(let c=0;c<t;c++){l.render();const d=this.table.renderedColumnToSource(c),u=l.getCurrentNode();_e(u,"hide")||(u.className=""),u.removeAttribute("style"),u.removeAttribute("dir"),Zr(u,[new RegExp("aria-(.*)"),new RegExp("role")]),this.table.cellRenderer(r,d,u),this.table.isAriaEnabled()&&fe(u,[...u.hasAttribute("role")?[]:[CG()],wr(-1),z0(d+(this.table.rowUtils?.dataAccessObject?.rowHeaders.length??0)+1)])}l.end()}}constructor(){super("TD"),this.orderViews=new WeakMap,this.sourceRowIndex=0}}class Q5{setActiveOverlayName(e){this.activeOverlayName=e}setAxisUtils(e,t){this.rowUtils=e,this.columnUtils=t}setViewportSize(e,t){this.rowsToRender=e,this.columnsToRender=t}setFilters(e,t){this.rowFilter=e,this.columnFilter=t}setHeaderContentRenderers(e,t){this.rowHeaderFunctions=e,this.rowHeadersCount=e.length,this.columnHeaderFunctions=t,this.columnHeadersCount=t.length}setRenderers({rowHeaders:e,columnHeaderRows:t,columnHeaders:o,colGroup:i,rows:s,cells:r}={}){e.setTable(this),t.setTable(this),o.setTable(this),i.setTable(this),s.setTable(this),r.setTable(this),this.rowHeaders=e,this.columnHeaderRows=t,this.columnHeaders=o,this.colGroup=i,this.rows=s,this.cells=r}renderedRowToSource(e){return this.rowFilter.renderedToSource(e)}renderedColumnToSource(e){return this.columnFilter.renderedToSource(e)}isAriaEnabled(){return this.rowUtils.wtSettings.getSetting("ariaTags")}render(){this.columnHeaderRows.render(),this.columnHeaders.render(),this.rows.render(),this.rowHeaders.render(),this.cells.render(),this.columnUtils.calculateWidths(),this.colGroup.render();const{rowsToRender:e,rows:t}=this;for(let o=0;o<e;o++){const i=t.getRenderedNode(o),s=this.rowUtils;if(i.firstChild){const r=this.renderedRowToSource(o),a=s.getHeightByOverlayName(r,this.activeOverlayName),h=this.stylesHandler.areCellsBorderBox()?0:1;a?i.firstChild.style.height=`${a-h}px`:i.firstChild.style.height=""}}}constructor(e,{cellRenderer:t,stylesHandler:o}={}){this.rowHeaders=null,this.columnHeaderRows=null,this.columnHeaders=null,this.colGroup=null,this.rows=null,this.cells=null,this.rowFilter=null,this.columnFilter=null,this.rowUtils=null,this.columnUtils=null,this.rowsToRender=0,this.columnsToRender=0,this.rowHeaderFunctions=[],this.rowHeadersCount=0,this.columnHeaderFunctions=[],this.columnHeadersCount=0,this.rootNode=e,this.rootDocument=this.rootNode.ownerDocument,this.cellRenderer=t,this.stylesHandler=o}}class J5{setActiveOverlayName(e){return this.renderer.setActiveOverlayName(e),this}setFilters(e,t){return this.renderer.setFilters(e,t),this}setViewportSize(e,t){return this.renderer.setViewportSize(e,t),this}setHeaderContentRenderers(e,t){return this.renderer.setHeaderContentRenderers(e,t),this}render(){this.renderer.render()}constructor({TABLE:e,THEAD:t,COLGROUP:o,TBODY:i,rowUtils:s,columnUtils:r,cellRenderer:a,stylesHandler:l}={}){this.renderer=new Q5(e,{cellRenderer:a,stylesHandler:l}),this.renderer.setRenderers({rowHeaders:new G5,columnHeaderRows:new j5(t),columnHeaders:new q5,colGroup:new K5(o),rows:new X5(i),cells:new Z5}),this.renderer.setAxisUtils(s,r)}}class e9{getWidth(e){return this.wtSettings.getSetting("columnWidth",e)||this.wtSettings.getSetting("defaultColumnWidth")}getHeaderHeight(e){let t=this.wtSettings.getSetting("stylesHandler").getDefaultRowHeight();const o=this.dataAccessObject.wtViewport.oversizedColumnHeaders[e];return o!==void 0&&(t=t?Math.max(t,o):o),t}getHeaderWidth(e){return this.headerWidths.get(this.dataAccessObject.wtTable.columnFilter.sourceToRendered(e))}calculateWidths(){const{wtSettings:e}=this;let t=e.getSetting("rowHeaderWidth");if(t=e.getSetting("onModifyRowHeaderWidth",t),t!=null){const o=e.getSetting("rowHeaders").length,i=e.getSetting("defaultColumnWidth");for(let s=0;s<o;s++){let r=Array.isArray(t)?t[s]:t;r=r??i,this.headerWidths.set(s,r)}}}constructor(e,t){this.headerWidths=new Map,this.dataAccessObject=e,this.wtSettings=t}}class t9{getHeight(e){let t=this.wtSettings.getSetting("rowHeight",e);const o=this.dataAccessObject.wtViewport.oversizedRows[e];return o!==void 0&&(t=t===void 0?o:Math.max(t,o)),t}getHeightByOverlayName(e,t){let o=this.wtSettings.getSetting("rowHeightByOverlayName",e,t);const i=this.dataAccessObject.wtViewport.oversizedRows[e];return i!==void 0&&(o=o===void 0?i:Math.max(o,i)),o}constructor(e,t){this.dataAccessObject=e,this.wtSettings=t}}class cf{is(e){return this.name===e}fixTableDomTree(){const e=this.domBindings.rootDocument;this.TBODY=this.TABLE.querySelector("tbody"),this.TBODY||(this.TBODY=e.createElement("tbody"),this.TABLE.appendChild(this.TBODY)),this.THEAD=this.TABLE.querySelector("thead"),this.THEAD||(this.THEAD=e.createElement("thead"),this.TABLE.insertBefore(this.THEAD,this.TBODY)),this.COLGROUP=this.TABLE.querySelector("colgroup"),this.COLGROUP||(this.COLGROUP=e.createElement("colgroup"),this.TABLE.insertBefore(this.COLGROUP,this.THEAD))}createSpreader(e){const t=e.parentNode;let o;return(!t||t.nodeType!==Node.ELEMENT_NODE||!_e(t,"wtHolder"))&&(o=this.domBindings.rootDocument.createElement("div"),o.className="wtSpreader",t&&t.insertBefore(o,e),o.appendChild(e)),o.style.position="relative",this.wtSettings.getSetting("ariaTags")&&fe(o,[Ga()]),o}createHider(e){const t=e.parentNode;let o;return(!t||t.nodeType!==Node.ELEMENT_NODE||!_e(t,"wtHolder"))&&(o=this.domBindings.rootDocument.createElement("div"),o.className="wtHider",t&&t.insertBefore(o,e),o.appendChild(e)),this.wtSettings.getSetting("ariaTags")&&fe(o,[Ga()]),o}createHolder(e){const t=e.parentNode;let o;return(!t||t.nodeType!==Node.ELEMENT_NODE||!_e(t,"wtHolder"))&&(o=this.domBindings.rootDocument.createElement("div"),o.style.position="relative",o.className="wtHolder",this.isMaster&&fe(o,[wr(-1)]),t&&t.insertBefore(o,e),this.isMaster&&(o.parentNode.className+="ht_master handsontable",o.parentNode.setAttribute("dir",this.wtSettings.getSettingPure("rtlMode")?"rtl":"ltr"),this.wtSettings.getSetting("ariaTags")&&fe(o.parentNode,[Ga()])),o.appendChild(e)),this.wtSettings.getSetting("ariaTags")&&fe(o,[Ga()]),o}draw(e=!1){const{wtSettings:t}=this,{wtOverlays:o,wtViewport:i}=this.dataAccessObject,s=t.getSetting("totalRows"),r=t.getSetting("totalColumns"),a=t.getSetting("rowHeaders"),l=a.length,h=t.getSetting("columnHeaders"),c=h.length;let d=e;if(this.isMaster&&(o.beforeDraw(),this.holderOffset=Ko(this.holder),i.rowHeightCache.ensureBuilt(),i.columnWidthCache.ensureBuilt(),d=i.createCalculators(d),l&&!t.getSetting("fixedColumnsStart"))){const f=o.inlineStartOverlay.getScrollPosition(),p=this.correctHeaderWidth;this.correctHeaderWidth=f!==0,p!==this.correctHeaderWidth&&(d=!1)}if(d)this.isMaster&&o.refresh(!0);else{this.isMaster?this.tableOffset=Ko(this.TABLE):this.tableOffset=this.dataAccessObject.parentTableOffset;const f=Math.max(this.getFirstRenderedRow(),0),p=Math.max(this.getFirstRenderedColumn(),0);this.rowFilter=new M5(f,s,c),this.columnFilter=new x5(p,r,l);let C=!0;if(this.isMaster){this.alignOverlaysWithTrimmingContainer();const _={};this.wtSettings.getSetting("beforeDraw",!0,_),C=_.skipRender!==!0}C&&(this.tableRenderer.setHeaderContentRenderers(a,h),(this.is(Yr)||this.is(ah))&&this.tableRenderer.setHeaderContentRenderers(a,[]),this.resetOversizedRows(),this.tableRenderer.setActiveOverlayName(this.name).setViewportSize(this.getRenderedRowsCount(),this.getRenderedColumnsCount()).setFilters(this.rowFilter,this.columnFilter).render(),this.isMaster&&this.markOversizedColumnHeaders(),this.adjustColumnHeaderHeights(),this.isMaster&&this.syncOversizedColumnHeadersWithDOM(),(this.isMaster||this.is(Yr))&&this.markOversizedRows(),this.isMaster?(this.wtSettings.getSetting("externalRowCalculator")||(i.rowHeightCache.ensureBuilt(),i.columnWidthCache.ensureBuilt(),i.createVisibleCalculators()),o.refresh(!1),o.applyToDOM(),this.wtSettings.getSetting("onDraw",!0)):this.is(Yr)&&this.dataAccessObject.cloneSource.wtOverlays.adjustElementsSize())}let u=!1;return this.isMaster&&(u=o.topOverlay.resetFixedPosition(),o.bottomOverlay.clone&&(u=o.bottomOverlay.resetFixedPosition()||u),u=o.inlineStartOverlay.resetFixedPosition()||u,o.topInlineStartCornerOverlay&&o.topInlineStartCornerOverlay.resetFixedPosition(),o.bottomInlineStartCornerOverlay&&o.bottomInlineStartCornerOverlay.clone&&o.bottomInlineStartCornerOverlay.resetFixedPosition()),u?(o.refreshAll(),o.adjustElementsSize()):this.dataAccessObject.selectionManager.setActiveOverlay(this.facadeGetter()).render(d),this.isMaster&&o.afterDraw(),this.dataAccessObject.drawn=!0,this}markIfOversizedColumnHeader(e){const t=this.columnFilter.renderedToSource(e);let o=this.wtSettings.getSetting("columnHeaders").length;const i=this.wtSettings.getSetting("stylesHandler").getDefaultRowHeight();let s,r,a;const l=this.wtSettings.getSetting("columnHeaderHeight")||[];for(;o;)o-=1,s=this.getColumnHeaderHeight(o),r=this.getColumnHeader(t,o),r&&(a=xu(r),(!s&&i<a||s<a)&&(this.dataAccessObject.wtViewport.oversizedColumnHeaders[o]=a),Array.isArray(l)?l[o]!==null&&l[o]!==void 0&&(this.dataAccessObject.wtViewport.oversizedColumnHeaders[o]=l[o]):isNaN(l)||(this.dataAccessObject.wtViewport.oversizedColumnHeaders[o]=l),this.dataAccessObject.wtViewport.oversizedColumnHeaders[o]<(l[o]||l)&&(this.dataAccessObject.wtViewport.oversizedColumnHeaders[o]=l[o]||l))}adjustColumnHeaderHeights(){const{wtSettings:e}=this,t=this.THEAD.childNodes,o=this.dataAccessObject.wtViewport.oversizedColumnHeaders,i=e.getSetting("columnHeaders");for(let s=0,r=i.length;s<r;s++)if(o[s]){if(!t[s]||t[s].childNodes.length===0)return;t[s].childNodes[0].style.height=`${o[s]}px`}}syncOversizedColumnHeadersWithDOM(){const{wtSettings:e}=this,t=this.THEAD.childNodes,o=this.dataAccessObject.wtViewport.oversizedColumnHeaders,i=e.getSetting("columnHeaders"),s=1;for(let r=0,a=i.length;r<a;r++){if(!t[r]||!o[r])continue;const l=xu(t[r]);l>o[r]+s&&(o[r]=l)}}resetOversizedRows(){const{wtSettings:e}=this,{wtViewport:t}=this.dataAccessObject;if(!(!this.isMaster&&!this.is(Yr))&&!e.getSetting("externalRowCalculator")){const o=this.getRenderedRowsCount();for(let i=0;i<o;i++){const s=this.rowFilter.renderedToSource(i);t.oversizedRows&&t.oversizedRows[s]&&(t.oversizedRows[s]=void 0)}}}getCell(e){let t=e.row,o=e.col;const i=this.wtSettings.getSetting("onModifyGetCellCoords",t,o,!this.isMaster,"render");if(i&&Array.isArray(i)&&([t,o]=i),this.isRowBeforeRenderedRows(t))return-1;if(this.isRowAfterRenderedRows(t))return-2;if(this.isColumnBeforeRenderedColumns(o))return-3;if(this.isColumnAfterRenderedColumns(o))return-4;const s=this.getRow(t);!s&&t>=0&&U("TR was expected to be rendered but is not");const r=s.childNodes[this.columnFilter.sourceColumnToVisibleRowHeadedColumn(o)];return!r&&o>=0&&U("TD or TH was expected to be rendered but is not"),r}getRow(e){let t=null,o=null;return e<0?(t=this.rowFilter?.sourceRowToVisibleColHeadedRow(e),o=this.THEAD):(t=this.rowFilter?.sourceToRendered(e),o=this.TBODY),t!==void 0&&o!==void 0?o.childNodes.length<t+1?!1:o.childNodes[t]:!1}getColumnHeader(e,t=0){return this.THEAD.childNodes[t]?.childNodes[this.columnFilter.sourceColumnToVisibleRowHeadedColumn(e)]}getColumnHeaders(e){const t=[],o=this.columnFilter.sourceColumnToVisibleRowHeadedColumn(e);return this.THEAD.childNodes.forEach(i=>{const s=i.childNodes[o];s&&t.push(s)}),t}getRowHeader(e,t=0){const o=this.wtSettings.getSetting("rowHeaders").length;if(t>=o)return;const i=this.rowFilter.sourceToRendered(e),s=i<0?this.rowFilter.sourceRowToVisibleColHeadedRow(e):i;return(i<0?this.THEAD:this.TBODY).childNodes[s]?.childNodes[t]}getRowHeaders(e){const t=[],o=this.wtSettings.getSetting("rowHeaders").length;for(let i=0;i<o;i++){const r=this.TBODY.childNodes[this.rowFilter.sourceToRendered(e)]?.childNodes[i];r&&t.push(r)}return t}getCoords(e){let t=e;if(t.nodeName!=="TD"&&t.nodeName!=="TH"&&(t=Vc(t,["TD","TH"])),t===null)return null;const o=t.parentNode;if(!o)return null;const i=o.parentNode;let s=l4(o),r=t.cellIndex;Sh(qc,t,this.wtRootElement)||Sh(Gc,t,this.wtRootElement)?i.nodeName==="THEAD"&&(s-=i.childNodes.length):Sh(ah,t,this.wtRootElement)||Sh(Yr,t,this.wtRootElement)?s=this.wtSettings.getSetting("totalRows")-i.childNodes.length+s:i===this.THEAD?s=this.rowFilter.visibleColHeadedRowToSourceRow(s):this.rowFilter&&(s=this.rowFilter.renderedToSource(s)),Sh(qc,t,this.wtRootElement)||Sh(jc,t,this.wtRootElement)||Sh(ah,t,this.wtRootElement)?r=this.columnFilter.offsettedTH(r):this.columnFilter&&(r=this.columnFilter.visibleRowHeadedColumnToSourceColumn(r));const a=this.wtSettings.getSetting("onModifyGetCoordsElement",s,r);return a&&Array.isArray(a)&&([s,r]=a),this.wot.createCellCoords(s,r)}markOversizedRows(){if(this.wtSettings.getSetting("externalRowCalculator"))return;let e=this.TBODY.childNodes.length;const t=this.wtSettings.getSetting("stylesHandler"),o=e*t.getDefaultRowHeight(),i=xu(this.TBODY)-1,s=t.areCellsBorderBox(),r=s?Tn:xu,a=s?0:1,l=s?1:0;let h,c,d,u,f;if(o===i&&!this.wtSettings.getSetting("fixedRowsBottom"))return;const{wtViewport:p}=this.dataAccessObject;let C=!1;for(;e;){e-=1,d=this.rowFilter.renderedToSource(e),h=this.getRowHeight(d),u=this.getTrForRow(d),f=u.querySelector("th");const _=d===0?l:0;f?c=r(f):c=r(u)-a,(!h&&t.getDefaultRowHeight()<c-_||h<c)&&(s||(c+=1),p.oversizedRows[d]=c,C=!0)}C&&p.rowHeightCache.invalidate()}getTrForRow(e){return this.TBODY.childNodes[this.rowFilter.sourceToRendered(e)]}isColumnHeaderRendered(e){if(e>=0)return!1;const o=this.wtSettings.getSetting("rowHeaders").length;return Math.abs(e)<=o}isRowHeaderRendered(e){if(e>=0)return!1;const o=this.wtSettings.getSetting("columnHeaders").length;return Math.abs(e)<=o}isRowBeforeRenderedRows(e){const t=this.getFirstRenderedRow();return e<0&&t<=0?!this.isRowHeaderRendered(e):e<t}isRowAfterRenderedRows(e){return e>this.getLastRenderedRow()}isColumnBeforeRenderedColumns(e){const t=this.getFirstRenderedColumn();return e<0&&t<=0?!this.isColumnHeaderRendered(e):e<t}isColumnAfterRenderedColumns(e){return this.columnFilter&&e>this.getLastRenderedColumn()}isColumnAfterViewport(e){return this.columnFilter&&e>this.getLastVisibleColumn()}isRowAfterViewport(e){return this.rowFilter&&e>this.getLastVisibleRow()}isColumnBeforeViewport(e){return this.columnFilter&&this.columnFilter.sourceToRendered(e)<0&&e>=0}isLastRowFullyVisible(){return this.getLastVisibleRow()===this.getLastRenderedRow()}isLastColumnFullyVisible(){return this.getLastVisibleColumn()===this.getLastRenderedColumn()}allRowsInViewport(){return this.wtSettings.getSetting("totalRows")===this.getVisibleRowsCount()}allColumnsInViewport(){return this.wtSettings.getSetting("totalColumns")===this.getVisibleColumnsCount()}getRowHeight(e){return this.rowUtils.getHeight(e)}getColumnHeaderHeight(e){return this.columnUtils.getHeaderHeight(e)}getColumnWidth(e){return this.columnUtils.getWidth(e)}hasDefinedSize(){return this.hasTableHeight&&this.hasTableWidth}getWidth(){return bn(this.TABLE)}getHeight(){return Tn(this.TABLE)}getTotalWidth(){const e=bn(this.hider);return e!==0?e:this.getWidth()}getTotalHeight(){const e=Tn(this.hider);return e!==0?e:this.getHeight()}isVisible(){return zc(this.TABLE)}_modifyRowHeaderWidth(e){let t=ye(e)?e():null;return Array.isArray(t)?(t=[...t],t[t.length-1]=this._correctRowHeaderWidth(t[t.length-1])):t=this._correctRowHeaderWidth(t),t}_correctRowHeaderWidth(e){let t=e;return typeof e!="number"&&(t=this.wtSettings.getSetting("defaultColumnWidth")),this.correctHeaderWidth&&(t+=1),t}constructor(e,t,o,i,s){this.wtSettings=null,this.TBODY=null,this.THEAD=null,this.COLGROUP=null,this.hasTableHeight=!0,this.hasTableWidth=!0,this.isTableVisible=!1,this.tableOffset=0,this.holderOffset=0,this.domBindings=o,this.isMaster=s==="master",this.name=s,this.dataAccessObject=e,this.facadeGetter=t,this.wtSettings=i,this.instance=this.dataAccessObject.wot,this.wot=this.dataAccessObject.wot,this.TABLE=o.rootTable,nF(this.TABLE),this.spreader=this.createSpreader(this.TABLE),this.hider=this.createHider(this.spreader),this.holder=this.createHolder(this.hider),this.wtRootElement=this.holder.parentNode,this.isMaster&&this.alignOverlaysWithTrimmingContainer(),this.fixTableDomTree(),this.rowFilter=null,this.columnFilter=null,this.correctHeaderWidth=!1;const r=this.wtSettings.getSettingPure("rowHeaderWidth");this.wtSettings.update("rowHeaderWidth",()=>this._modifyRowHeaderWidth(r)),this.rowUtils=new t9(this.dataAccessObject,this.wtSettings),this.columnUtils=new e9(this.dataAccessObject,this.wtSettings),this.tableRenderer=new J5({TABLE:this.TABLE,THEAD:this.THEAD,COLGROUP:this.COLGROUP,TBODY:this.TBODY,rowUtils:this.rowUtils,columnUtils:this.columnUtils,cellRenderer:this.wtSettings.getSettingPure("cellRenderer"),stylesHandler:this.wtSettings.getSetting("stylesHandler")})}}const n9="stickyRowsBottom",ek={getFirstRenderedRow(){const n=this.getRenderedRowsCount();return n===0?-1:this.wtSettings.getSetting("totalRows")-n},getFirstVisibleRow(){return this.getFirstRenderedRow()},getFirstPartiallyVisibleRow(){return this.getFirstRenderedRow()},getLastRenderedRow(){return this.getRenderedRowsCount()===0?-1:this.wtSettings.getSetting("totalRows")-1},getLastVisibleRow(){return this.getLastRenderedRow()},getLastPartiallyVisibleRow(){return this.getLastRenderedRow()},getRenderedRowsCount(){return Math.min(this.wtSettings.getSetting("totalRows"),this.wtSettings.getSetting("fixedRowsBottom"))},getVisibleRowsCount(){return this.getRenderedRowsCount()},getColumnHeadersCount(){return 0}};ll(ek,"MIXIN_NAME",n9,{writable:!1,enumerable:!1});const o9="stickyColumnsStart",Ny={getFirstRenderedColumn(){return this.getRenderedColumnsCount()===0?-1:0},getFirstVisibleColumn(){return this.getFirstRenderedColumn()},getFirstPartiallyVisibleColumn(){return this.getFirstRenderedColumn()},getLastRenderedColumn(){return this.getRenderedColumnsCount()-1},getLastVisibleColumn(){return this.getLastRenderedColumn()},getLastPartiallyVisibleColumn(){return this.getLastRenderedColumn()},getRenderedColumnsCount(){return Math.min(this.wtSettings.getSetting("totalColumns"),this.wtSettings.getSetting("fixedColumnsStart"))},getVisibleColumnsCount(){return this.getRenderedColumnsCount()},getRowHeadersCount(){return this.dataAccessObject.rowHeaders.length}};ll(Ny,"MIXIN_NAME",o9,{writable:!1,enumerable:!1});class tk extends cf{constructor(e,t,o,i){super(e,t,o,i,ah)}}Ct(tk,ek);Ct(tk,Ny);const Gc="top",Yr="bottom",jc="inline_start",qc="top_inline_start_corner",ah="bottom_inline_start_corner",GF=[Gc,Yr,jc,qc,ah],i9=new Map([[Gc,`ht_clone_${Gc}`],[Yr,`ht_clone_${Yr}`],[jc,`ht_clone_${jc} ht_clone_left`],[qc,`ht_clone_${qc} ht_clone_top_left_corner`],[ah,`ht_clone_${ah} ht_clone_bottom_left_corner`]]);function s9(n,e){if(e.has(n))throw new TypeError("Cannot initialize the same private elements twice on an object")}function rw(n,e,t){if(!e.has(n))throw new TypeError("attempted to get private field on non-instance");return t}function lH(n,e){s9(n,e),e.add(n)}var oS=new WeakSet,iS=new WeakSet;class r9{scrollViewport(e,t,o){if(e.col<0||e.row<0)return!1;const i=this.scrollViewportHorizontally(e.col,t),s=this.scrollViewportVertically(e.row,o);return i||s}scrollViewportHorizontally(e,t="auto"){const{drawn:o,totalColumns:i}=this.dataAccessObject;if(!o)return!1;const s=Pi(t);if(e=this.dataAccessObject.wtSettings.getSetting("onBeforeViewportScrollHorizontally",e,s),!Number.isInteger(e)||e<0||e>i)return!1;t=s.value;const{fixedColumnsStart:r,inlineStartOverlay:a}=this.dataAccessObject,l=t==="auto";if(l&&e<r)return!1;const h=this.getFirstVisibleColumn(),c=this.getLastVisibleColumn();let d=!1;return(l&&(e<h||e>c)||!l)&&(d=a.scrollTo(e,l?e>=this.getLastPartiallyVisibleColumn():t==="end")),d}scrollViewportVertically(e,t="auto"){const{drawn:o,totalRows:i}=this.dataAccessObject;if(!o)return!1;const s=Pi(t);if(e=this.dataAccessObject.wtSettings.getSetting("onBeforeViewportScrollVertically",e,s),!Number.isInteger(e)||e<0||e>i)return!1;t=s.value;const{fixedRowsBottom:r,fixedRowsTop:a,topOverlay:l}=this.dataAccessObject,h=t==="auto";if(h&&(e<a||e>i-r-1))return!1;const c=this.getFirstVisibleRow(),d=this.getLastVisibleRow();let u=!1;return(h&&(e<c||e>d)||!h)&&(u=l.scrollTo(e,h?e>=this.getLastPartiallyVisibleRow():t==="bottom")),u}getFirstVisibleRow(){return this.dataAccessObject.wtTable.getFirstVisibleRow()}getLastVisibleRow(){return rw(this,iS,cH).call(this,this.dataAccessObject.wtTable.getLastVisibleRow())}getFirstPartiallyVisibleRow(){return this.dataAccessObject.wtTable.getFirstPartiallyVisibleRow()}getLastPartiallyVisibleRow(){return rw(this,iS,cH).call(this,this.dataAccessObject.wtTable.getLastPartiallyVisibleRow())}getFirstVisibleColumn(){return this.dataAccessObject.wtTable.getFirstVisibleColumn()}getLastVisibleColumn(){return rw(this,oS,hH).call(this,this.dataAccessObject.wtTable.getLastVisibleColumn())}getFirstPartiallyVisibleColumn(){return this.dataAccessObject.wtTable.getFirstPartiallyVisibleColumn()}getLastPartiallyVisibleColumn(){return rw(this,oS,hH).call(this,this.dataAccessObject.wtTable.getLastPartiallyVisibleColumn())}constructor(e){lH(this,oS),lH(this,iS),this.dataAccessObject=e}}function hH(n){const{wtSettings:e,inlineStartOverlay:t,wtTable:o,wtViewport:i,totalColumns:s,rootWindow:r}=this.dataAccessObject;if(t.mainTableScrollableElement===r){const a=e.getSetting("rtlMode");let l=null;if(a){const c=o.TABLE.getBoundingClientRect(),u=this.dataAccessObject.rootWindow.document.documentElement.offsetWidth;l=Math.abs(c.right-u)}else l=Ko(o.wtRootElement).left;const h=Math.abs(iF(r,r));if(l>h){const c=sF(r);let d=i.getRowHeaderWidth();for(let u=1;u<=s;u++)if(d+=t.sumCellSizes(u-1,u),l+d-h>=c){n=u-2;break}}}return n}function cH(n){const{topOverlay:e,wtTable:t,wtViewport:o,totalRows:i,rootWindow:s}=this.dataAccessObject;if(e.mainTableScrollableElement===s){const r=Ko(t.wtRootElement),a=K0(s,s);if(r.top>a){const l=xu(s);let h=o.getColumnHeaderHeight();for(let c=1;c<=i;c++)if(h+=e.sumCellSizes(c-1,c),r.top+h-a>=l){n=c-2;break}}}return n}class nk{get eventManager(){return new Wi(this)}findOriginalHeaders(){const e=[];if(this.wtTable.THEAD.childNodes.length&&this.wtTable.THEAD.childNodes[0].childNodes.length){for(let t=0,o=this.wtTable.THEAD.childNodes[0].childNodes.length;t<o;t++)e.push(this.wtTable.THEAD.childNodes[0].childNodes[t].innerHTML);this.wtSettings.getSetting("columnHeaders").length||this.wtSettings.update("columnHeaders",[function(t,o){ph(o,e[t])}])}}createCellCoords(e,t){return new Yc(e,t,this.wtSettings.getSetting("rtlMode"))}createCellRange(e,t,o){return new lf(e,t,o,this.wtSettings.getSetting("rtlMode"))}draw(e=!1){return this.drawInterrupted=!1,!this.wtTable.isVisible()||c4(this.wtTable.wtRootElement.parentNode)?this.drawInterrupted=!0:this.wtTable.draw(e),this}getCell(e,t=!1){if(!t)return this.wtTable.getCell(e);const o=this.wtSettings.getSetting("totalRows"),i=this.wtSettings.getSetting("fixedRowsTop"),s=this.wtSettings.getSetting("fixedRowsBottom"),r=this.wtSettings.getSetting("fixedColumnsStart");if(e.row<i&&e.col<r)return this.wtOverlays.topInlineStartCornerOverlay.clone.wtTable.getCell(e);if(e.row<i)return this.wtOverlays.topOverlay.clone.wtTable.getCell(e);if(e.col<r&&e.row>=o-s){if(this.wtOverlays.bottomInlineStartCornerOverlay&&this.wtOverlays.bottomInlineStartCornerOverlay.clone)return this.wtOverlays.bottomInlineStartCornerOverlay.clone.wtTable.getCell(e)}else{if(e.col<r)return this.wtOverlays.inlineStartOverlay.clone.wtTable.getCell(e);if(e.row<o&&e.row>=o-s&&this.wtOverlays.bottomOverlay&&this.wtOverlays.bottomOverlay.clone)return this.wtOverlays.bottomOverlay.clone.wtTable.getCell(e)}return this.wtTable.getCell(e)}scrollViewport(e,t,o){return this.wtScroll.scrollViewport(e,t,o)}scrollViewportHorizontally(e,t){return this.wtScroll.scrollViewportHorizontally(e,t)}scrollViewportVertically(e,t){return this.wtScroll.scrollViewportVertically(e,t)}getViewport(){return[this.wtTable.getFirstVisibleRow(),this.wtTable.getFirstVisibleColumn(),this.wtTable.getLastVisibleRow(),this.wtTable.getLastVisibleColumn()]}destroy(){this.wtOverlays.destroy(),this.wtEvent.destroy()}createScrollDao(){const e=this;return{get drawn(){return e.drawn},get topOverlay(){return e.wtOverlays.topOverlay},get inlineStartOverlay(){return e.wtOverlays.inlineStartOverlay},get wtTable(){return e.wtTable},get wtViewport(){return e.wtViewport},get wtSettings(){return e.wtSettings},get rootWindow(){return e.domBindings.rootWindow},get totalRows(){return e.wtSettings.getSetting("totalRows")},get totalColumns(){return e.wtSettings.getSetting("totalColumns")},get fixedRowsTop(){return e.wtSettings.getSetting("fixedRowsTop")},get fixedRowsBottom(){return e.wtSettings.getSetting("fixedRowsBottom")},get fixedColumnsStart(){return e.wtSettings.getSetting("fixedColumnsStart")}}}getTableDao(){const e=this;return{get wot(){return e},get parentTableOffset(){return e.cloneSource.wtTable.tableOffset},get cloneSource(){return e.cloneSource},get workspaceWidth(){return e.wtViewport.getWorkspaceWidth()},get wtViewport(){return e.wtViewport},get wtOverlays(){return e.wtOverlays},get selectionManager(){return e.selectionManager},get drawn(){return e.drawn},set drawn(t){e.drawn=t},get wtTable(){return e.wtTable},get startColumnRendered(){return e.wtViewport.columnsRenderCalculator.startColumn},get startColumnVisible(){return e.wtViewport.columnsVisibleCalculator.startColumn},get startColumnPartiallyVisible(){return e.wtViewport.columnsPartiallyVisibleCalculator.startColumn},get endColumnRendered(){return e.wtViewport.columnsRenderCalculator.endColumn},get endColumnVisible(){return e.wtViewport.columnsVisibleCalculator.endColumn},get endColumnPartiallyVisible(){return e.wtViewport.columnsPartiallyVisibleCalculator.endColumn},get countColumnsRendered(){return e.wtViewport.columnsRenderCalculator.count},get countColumnsVisible(){return e.wtViewport.columnsVisibleCalculator.count},get startRowRendered(){return e.wtViewport.rowsRenderCalculator.startRow},get startRowVisible(){return e.wtViewport.rowsVisibleCalculator.startRow},get startRowPartiallyVisible(){return e.wtViewport.rowsPartiallyVisibleCalculator.startRow},get endRowRendered(){return e.wtViewport.rowsRenderCalculator.endRow},get endRowVisible(){return e.wtViewport.rowsVisibleCalculator.endRow},get endRowPartiallyVisible(){return e.wtViewport.rowsPartiallyVisibleCalculator.endRow},get countRowsRendered(){return e.wtViewport.rowsRenderCalculator.count},get countRowsVisible(){return e.wtViewport.rowsVisibleCalculator.count},get columnHeaders(){return e.wtSettings.getSetting("columnHeaders")},get rowHeaders(){return e.wtSettings.getSetting("rowHeaders")}}}constructor(e,t){this.guid=`wt_${V0()}`,this.drawInterrupted=!1,this.drawn=!1,this.activeOverlayName="master",this.domBindings={rootTable:e,rootDocument:e.ownerDocument,rootWindow:e.ownerDocument.defaultView},this.wtSettings=t,this.wtScroll=new r9(this.createScrollDao())}}class a9 extends nk{constructor(e,t,o){super(e,t);const i=this.wtSettings.getSetting("facade",this);this.cloneSource=o.source,this.cloneOverlay=o.overlay,this.wtTable=this.cloneOverlay.createTable(this.getTableDao(),i,this.domBindings,this.wtSettings),this.wtViewport=o.viewport,this.selectionManager=o.selectionManager,this.wtEvent=new WF(i,this.domBindings,this.wtSettings,this.eventManager,this.wtTable,this.selectionManager,o.event),this.findOriginalHeaders()}}class Om{hasRenderingStateChanged(){return this.needFullRender!==this.shouldBeRendered()}updateStateOfRendering(e){e==="before"&&this.shouldBeRendered()?this.needFullRender=!0:e==="after"&&!this.shouldBeRendered()&&(this.needFullRender=!1)}shouldBeRendered(){return!0}updateTrimmingContainer(){this.trimmingContainer=jp(this.hider.parentNode.parentNode)}updateMainScrollableElement(){const{wtTable:e}=this.wot,{rootWindow:t}=this.domBindings,o=t.getComputedStyle(e.wtRootElement.parentNode).getPropertyValue("overflow");o==="hidden"||o==="clip"?this.mainTableScrollableElement=this.wot.wtTable.holder:this.mainTableScrollableElement=SC(e.TABLE)}getRelativeCellPosition(e,t,o){if(this.clone.wtTable.holder.contains(e)===!1){Ie(`The provided element is not a child of the ${this.type} overlay`);return}const i=this.mainTableScrollableElement===this.domBindings.rootWindow,s=o<this.wtSettings.getSetting("fixedColumnsStart"),r=t<this.wtSettings.getSetting("fixedRowsTop"),a=t>=this.wtSettings.getSetting("totalRows")-this.wtSettings.getSetting("fixedRowsBottom"),l=this.clone.wtTable.spreader,h={start:this.getRelativeStartPosition(l),top:l.offsetTop},c={start:this.getRelativeStartPosition(e),top:e.offsetTop};let d=null;return i?d=this.getRelativeCellPositionWithinWindow(r,s,c,h):d=this.getRelativeCellPositionWithinHolder(r,a,s,c,h),d}getRelativeStartPosition(e){return this.isRtl()?e.offsetParent.offsetWidth-e.offsetLeft-e.offsetWidth:e.offsetLeft}getRelativeCellPositionWithinWindow(e,t,o,i){const s=this.wot.wtTable.wtRootElement.getBoundingClientRect();let r=0,a=0;if(!t)r=i.start;else{let l=s.left;this.isRtl()&&(l=this.domBindings.rootWindow.innerWidth-(s.left+s.width+xn())),r=l<=0?-1*l:0}return e?a=this.clone.wtTable.TABLE.getBoundingClientRect().top-s.top:a=i.top,{start:o.start+r,top:o.top+a}}getRelativeCellPositionWithinHolder(e,t,o,i,s){const r={horizontal:this.wot.wtOverlays.inlineStartOverlay.getScrollPosition(),vertical:this.wot.wtOverlays.topOverlay.getScrollPosition()};let a=0,l=0;if(o||(a=r.horizontal-s.start),t){const h=this.wot.wtTable.wtRootElement.getBoundingClientRect();l=this.clone.wtTable.TABLE.getBoundingClientRect().top*-1+h.top}else e||(l=r.vertical-s.top);return{start:i.start-a,top:i.top-l}}makeClone(){GF.indexOf(this.type)===-1&&U(`Clone type "${this.type}" is not supported.`);const{wtTable:e,wtSettings:t}=this.wot,{rootDocument:o,rootWindow:i}=this.domBindings,s=o.createElement("div"),r=o.createElement("table"),a=e.wtRootElement.parentNode;s.className=`${i9.get(this.type)} handsontable`,s.setAttribute("dir",this.isRtl()?"rtl":"ltr"),s.style.position="absolute",s.style.top=0,s.style.overflow="visible",this.isRtl()?s.style.right=0:s.style.left=0,t.getSetting("ariaTags")&&fe(s,[Ga()]),r.className=e.TABLE.className,e.TABLE.getAttribute("role")&&r.setAttribute("role",e.TABLE.getAttribute("role")),s.appendChild(r),a.appendChild(s);const h=this.wtSettings.getSetting("preventOverflow"),c=i.getComputedStyle(a).getPropertyValue("overflow");return h===!0||h==="horizontal"&&this.type===Gc||h==="vertical"&&this.type===jc?this.mainTableScrollableElement=i:c==="hidden"||c==="clip"?this.mainTableScrollableElement=e.holder:this.mainTableScrollableElement=SC(e.TABLE),new a9(r,this.wtSettings,{source:this.wot,overlay:this,viewport:this.wot.wtViewport,event:this.wot.wtEvent,selectionManager:this.wot.selectionManager})}refresh(e=!1){if(this.needFullRender){const t=this.clone.cloneSource;t.activeOverlayName=this.clone.wtTable.name,this.clone.draw(e),t.activeOverlayName="master"}}reset(){const e=this.clone.wtTable.holder,t=this.clone.wtTable.hider,o=e.style,i=t.style,s=e.parentNode.style;[o,i,s].forEach(r=>{r.width="",r.height=""})}isRtl(){return this.wtSettings.getSetting("rtlMode")}destroy(){this.clone.eventManager.destroy()}constructor(e,t,o,i,s){this.wtSettings=null,ll(this,"wot",e,{writable:!1}),this.domBindings=s,this.facadeGetter=t,this.wtSettings=i;const{TABLE:r,hider:a,spreader:l,holder:h,wtRootElement:c}=this.wot.wtTable;this.instance=this.wot,this.type=o,this.mainTableScrollableElement=null,this.TABLE=r,this.hider=a,this.spreader=l,this.holder=h,this.wtRootElement=c,this.trimmingContainer=jp(this.hider.parentNode.parentNode),this.needFullRender=this.shouldBeRendered(),this.clone=this.makeClone()}}class l9 extends Om{createTable(...e){return new tk(...e)}shouldBeRendered(){return this.wtSettings.getSetting("shouldRenderBottomOverlay")&&this.wtSettings.getSetting("shouldRenderInlineStartOverlay")}resetFixedPosition(){const{wot:e}=this;if(this.updateTrimmingContainer(),!e.wtTable.holder.parentNode)return!1;const t=this.clone.wtTable.holder.parentNode;if(t.style.top="",this.trimmingContainer===this.domBindings.rootWindow){const s=this.inlineStartOverlay.getOverlayOffset(),r=this.bottomOverlay.getOverlayOffset();t.style[this.isRtl()?"right":"left"]=`${s}px`,t.style.bottom=`${r}px`}else Dy(t),this.repositionOverlay();let o=Tn(this.clone.wtTable.TABLE);const i=bn(this.clone.wtTable.TABLE);return this.wot.wtTable.hasDefinedSize()||(o=0),t.style.height=`${o}px`,t.style.width=`${i}px`,!1}repositionOverlay(){const{wtTable:e,wtViewport:t}=this.wot,{rootDocument:o}=this.domBindings,i=this.clone.wtTable.holder.parentNode;let s=0;t.hasVerticalScroll()||(s+=t.getWorkspaceHeight()-e.getTotalHeight()),t.hasVerticalScroll()&&t.hasHorizontalScroll()&&(s+=xn(o)),i.style.bottom=`${s}px`}constructor(e,t,o,i,s,r){super(e,t,ah,o,i),this.bottomOverlay=s,this.inlineStartOverlay=r}}const h9="calculatedColumns",Py={getFirstRenderedColumn(){const n=this.dataAccessObject.startColumnRendered;return n===null?-1:n},getFirstVisibleColumn(){const n=this.dataAccessObject.startColumnVisible;return n===null?-1:n},getFirstPartiallyVisibleColumn(){const n=this.dataAccessObject.startColumnPartiallyVisible;return n===null?-1:n},getLastRenderedColumn(){const n=this.dataAccessObject.endColumnRendered;return n===null?-1:n},getLastVisibleColumn(){const n=this.dataAccessObject.endColumnVisible;return n===null?-1:n},getLastPartiallyVisibleColumn(){const n=this.dataAccessObject.endColumnPartiallyVisible;return n===null?-1:n},getRenderedColumnsCount(){return this.dataAccessObject.countColumnsRendered},getVisibleColumnsCount(){return this.dataAccessObject.countColumnsVisible},getRowHeadersCount(){return this.dataAccessObject.rowHeaders.length}};ll(Py,"MIXIN_NAME",h9,{writable:!1,enumerable:!1});class ok extends cf{constructor(e,t,o,i){super(e,t,o,i,Yr)}}Ct(ok,ek);Ct(ok,Py);class c9 extends Om{createTable(...e){return new ok(...e)}shouldBeRendered(){return this.wtSettings.getSetting("shouldRenderBottomOverlay")}resetFixedPosition(){if(!this.needFullRender||!this.shouldBeRendered()||!this.wot.wtTable.holder.parentNode)return!1;const{rootWindow:e}=this.domBindings,t=this.clone.wtTable.holder.parentNode;t.style.top="";let o=0;const i=this.wtSettings.getSetting("preventOverflow");this.trimmingContainer===e&&(!i||i!=="vertical")?(o=this.getOverlayOffset(),t.style.bottom=`${o}px`):(o=this.getScrollPosition(),this.repositionOverlay());const s=this.adjustHeaderBordersPosition(o);return this.adjustElementsSize(),s}repositionOverlay(){const{wtTable:e,wtViewport:t}=this.wot,{rootDocument:o}=this.domBindings,i=this.clone.wtTable.holder.parentNode;let s=0;t.hasVerticalScroll()||(s+=t.getWorkspaceHeight()-e.getTotalHeight()),t.hasVerticalScroll()&&t.hasHorizontalScroll()&&(s+=xn(o)),i.style.bottom=`${s}px`}setScrollPosition(e){const{rootWindow:t}=this.domBindings,o=this.mainTableScrollableElement;let i=!1;if(o===t&&e!==t.scrollY){const s=t.scrollY;t.scrollTo(q0(t),top),i=s!==t.scrollY}else if(e!==o.scrollTop){const s=o.scrollTop;o.scrollTop=e,i=s!==o.scrollTop}return i}onScroll(){this.wtSettings.getSetting("onScrollHorizontally")}sumCellSizes(e,t){const{wtTable:o,wtSettings:i}=this.wot,s=i.getSetting("stylesHandler").getDefaultRowHeight();let r=e,a=0;for(;r<t;){const l=o.getRowHeight(r);a+=l===void 0?s:l,r+=1}return a}adjustElementsSize(){this.updateTrimmingContainer(),this.needFullRender&&(this.adjustRootElementSize(),this.adjustRootChildrenSize())}adjustRootElementSize(){const{wtTable:e,wtViewport:t}=this.wot,{rootDocument:o,rootWindow:i}=this.domBindings,r=this.clone.wtTable.holder.parentNode.style,a=this.wtSettings.getSetting("preventOverflow");if(this.trimmingContainer!==i||a==="horizontal"){let h=t.getWorkspaceWidth();t.hasVerticalScroll()&&(h-=xn(o)),h=Math.min(h,e.wtRootElement.scrollWidth),r.width=`${h}px`}else r.width="";this.clone.wtTable.holder.style.width=r.width;let l=Tn(this.clone.wtTable.TABLE);e.hasDefinedSize()||(l=0),r.height=`${l}px`}adjustRootChildrenSize(){const{holder:e}=this.clone.wtTable;this.clone.wtTable.hider.style.width=this.hider.style.width,e.style.width=e.parentNode.style.width,e.style.height=e.parentNode.style.height}applyToDOM(){const e=this.wtSettings.getSetting("totalRows");typeof this.wot.wtViewport.rowsRenderCalculator.startPosition=="number"?this.spreader.style.top=`${this.wot.wtViewport.rowsRenderCalculator.startPosition}px`:e===0?this.spreader.style.top="0":U("Incorrect value of the rowsRenderCalculator"),this.spreader.style.bottom="",this.needFullRender&&this.syncOverlayOffset()}syncOverlayOffset(){const e=this.isRtl()?"right":"left",{spreader:t}=this.clone.wtTable;typeof this.wot.wtViewport.columnsRenderCalculator.startPosition=="number"?t.style[e]=`${this.wot.wtViewport.columnsRenderCalculator.startPosition}px`:t.style[e]=""}scrollTo(e,t){let o=this.getTableParentOffset();const s=(this.wot.cloneSource?this.wot.cloneSource:this.wot).wtTable.holder;let r=0;t&&s.offsetHeight!==s.clientHeight&&(r=xn(this.domBindings.rootDocument)),t?(o+=this.sumCellSizes(0,e+1),o-=this.wot.wtViewport.getViewportHeight(),o+=1):o+=this.sumCellSizes(this.wtSettings.getSetting("fixedRowsBottom"),e),o+=r,this.setScrollPosition(o)}getTableParentOffset(){return this.mainTableScrollableElement===this.domBindings.rootWindow?this.wot.wtTable.holderOffset.top:0}getScrollPosition(){return K0(this.mainTableScrollableElement,this.domBindings.rootWindow)}getOverlayOffset(){const{rootWindow:e}=this.domBindings,t=this.wtSettings.getSetting("preventOverflow");let o=0;if(this.trimmingContainer===e&&(!t||t!=="vertical")){const i=this.wot.wtTable.getTotalHeight(),s=this.clone.wtTable.getTotalHeight(),r=i-s,a=this.domBindings.rootDocument.documentElement.clientHeight;o=Math.max(this.getTableParentOffset()-this.getScrollPosition()-a+i,0),o>r&&(o=0)}return o}adjustHeaderBordersPosition(e){const t=this.wtSettings.getSetting("fixedRowsBottom"),o=this.cachedFixedRowsBottom!==t,i=this.wtSettings.getSetting("columnHeaders");let s=!1;if((o||t===0)&&i.length>0){const r=this.wot.wtTable.holder.parentNode,a=_e(r,"innerBorderBottom");this.cachedFixedRowsBottom=this.wtSettings.getSetting("fixedRowsBottom"),e||this.wtSettings.getSetting("totalRows")===0?(B(r,"innerBorderBottom"),s=!a):(oe(r,"innerBorderBottom"),s=a)}return s}constructor(e,t,o,i){super(e,t,Yr,o,i),this.cachedFixedRowsBottom=-1,this.cachedFixedRowsBottom=this.wtSettings.getSetting("fixedRowsBottom")}}const d9="calculatedRows",ik={getFirstRenderedRow(){const n=this.dataAccessObject.startRowRendered;return n===null?-1:n},getFirstVisibleRow(){const n=this.dataAccessObject.startRowVisible;return n===null?-1:n},getFirstPartiallyVisibleRow(){const n=this.dataAccessObject.startRowPartiallyVisible;return n===null?-1:n},getLastRenderedRow(){const n=this.dataAccessObject.endRowRendered;return n===null?-1:n},getLastVisibleRow(){const n=this.dataAccessObject.endRowVisible;return n===null?-1:n},getLastPartiallyVisibleRow(){const n=this.dataAccessObject.endRowPartiallyVisible;return n===null?-1:n},getRenderedRowsCount(){return this.dataAccessObject.countRowsRendered},getVisibleRowsCount(){return this.dataAccessObject.countRowsVisible},getColumnHeadersCount(){return this.dataAccessObject.columnHeaders.length}};ll(ik,"MIXIN_NAME",d9,{writable:!1,enumerable:!1});class sk extends cf{constructor(e,t,o,i){super(e,t,o,i,jc)}}Ct(sk,ik);Ct(sk,Ny);const u9="localHooks",$n={_localHooks:Object.create(null),addLocalHook(n,e){return this._localHooks[n]||(this._localHooks[n]=[]),this._localHooks[n].push(e),this},removeLocalHook(n,e){if(this._localHooks[n]){const t=this._localHooks[n].indexOf(e);t>-1&&this._localHooks[n].splice(t,1)}return this},runLocalHooks(n,e,t,o,i,s,r){if(this._localHooks[n]){const a=this._localHooks[n].length;for(let l=0;l<a;l++)gE(this._localHooks[n][l],this,e,t,o,i,s,r)}},clearLocalHooks(){return this._localHooks={},this}};ll($n,"MIXIN_NAME",u9,{writable:!1,enumerable:!1});let jF=class{isEmpty(){return this.cellRange===null}add(e){return this.isEmpty()?this.cellRange=this.settings.createCellRange(e):this.cellRange.expand(e),this}replace(e,t){if(!this.isEmpty()){if(this.cellRange.from.isEqual(e))return this.cellRange.from=t,!0;if(this.cellRange.to.isEqual(e))return this.cellRange.to=t,!0}return!1}clear(){return this.cellRange=null,this}getCorners(){const e=this.cellRange.getOuterTopStartCorner(),t=this.cellRange.getOuterBottomEndCorner();return[e.row,e.col,t.row,t.col]}destroy(){this.runLocalHooks("destroy")}constructor(e,t){this.settings=e,this.cellRange=t||null}};Ct(jF,$n);const qF="active-header",rk="header",ak="area",EC="focus",f9="fill",g9="row",p9="column",m9="custom-selection",lk=n=>{const e=n.wtSettings.getSetting("stylesHandler"),t=e.getCSSVariableValue("cell-autofill-size"),o=e.getCSSVariableValue("cell-autofill-border-width"),i=e.getCSSVariableValue("cell-autofill-border-color");return Object.freeze({width:t,height:t,borderWidth:o,borderStyle:"solid",borderColor:i})};function KF(n,e){if(e.has(n))throw new TypeError("Cannot initialize the same private elements twice on an object")}function w9(n,e){return e.get?e.get.call(n):e.value}function b9(n,e,t){if(e.set)e.set.call(n,t);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=t}}function XF(n,e,t){if(!e.has(n))throw new TypeError("attempted to "+t+" private field on non-instance");return e.get(n)}function pn(n,e){var t=XF(n,e,"get");return w9(n,t)}function dH(n,e,t){KF(n,e),e.set(n,t)}function uH(n,e,t){var o=XF(n,e,"set");return b9(n,o,t),t}function sS(n,e,t){if(!e.has(n))throw new TypeError("attempted to get private field on non-instance");return t}function fH(n,e){KF(n,e),e.add(n)}var Ks=new WeakMap,Vo=new WeakMap,gH=new WeakSet,rS=new WeakSet;class C9{setActiveOverlay(e){return uH(this,Vo,e),this}setActiveSelection(e){return uH(this,Ks,e),this}scan(){const e=pn(this,Ks).settings.selectionType,t=new Set;return e==="active-header"?(this.scanColumnsInHeadersRange(o=>t.add(o)),this.scanRowsInHeadersRange(o=>t.add(o))):e==="area"?this.scanCellsRange(o=>t.add(o)):e==="focus"?(this.scanColumnsInHeadersRange(o=>t.add(o)),this.scanRowsInHeadersRange(o=>t.add(o)),this.scanCellsRange(o=>t.add(o))):e==="fill"?this.scanCellsRange(o=>t.add(o)):e==="header"?(this.scanColumnsInHeadersRange(o=>t.add(o)),this.scanRowsInHeadersRange(o=>t.add(o))):e==="row"?(this.scanRowsInHeadersRange(o=>t.add(o)),this.scanRowsInCellsRange(o=>t.add(o))):e==="column"&&(this.scanColumnsInHeadersRange(o=>t.add(o)),this.scanColumnsInCellsRange(o=>t.add(o))),t}scanColumnsInHeadersRange(e){const[t,o,i,s]=pn(this,Ks).getCorners(),{wtTable:r}=pn(this,Vo),a=r.getRenderedColumnsCount(),l=r.getColumnHeadersCount();let h=0;for(let c=-r.getRowHeadersCount();c<a;c++){const d=r.columnFilter.renderedToSource(c);if(!(d<o||d>s)){for(let u=-l;u<0;u++){if(u<t||u>i)continue;const f=u+l;let p=r.getColumnHeader(d,f);const C=pn(this,Vo).getSetting("onBeforeHighlightingColumnHeader",d,f,{selectionType:pn(this,Ks).settings.selectionType,columnCursor:h,selectionWidth:s-o+1});C!==null&&(C!==d&&(p=r.getColumnHeader(C,f)),e(p))}h+=1}}}scanRowsInHeadersRange(e){const[t,o,i,s]=pn(this,Ks).getCorners(),{wtTable:r}=pn(this,Vo),a=r.getRenderedRowsCount(),l=r.getRowHeadersCount();let h=0;for(let c=-r.getColumnHeadersCount();c<a;c++){const d=r.rowFilter.renderedToSource(c);if(!(d<t||d>i)){for(let u=-l;u<0;u++){if(u<o||u>s)continue;const f=u+l;let p=r.getRowHeader(d,f);const C=pn(this,Vo).getSetting("onBeforeHighlightingRowHeader",d,f,{selectionType:pn(this,Ks).settings.selectionType,rowCursor:h,selectionHeight:i-t+1});C!==null&&(C!==d&&(p=r.getRowHeader(C,f)),e(p))}h+=1}}}scanCellsRange(e){const{wtTable:t}=pn(this,Vo);sS(this,gH,y9).call(this,(o,i)=>{const s=t.getCell(pn(this,Vo).createCellCoords(o,i)),r=pn(this,Vo).getSetting("onAfterDrawSelection",o,i,pn(this,Ks).settings.layerLevel);typeof r=="string"&&B(s,r),e(s)})}scanRowsInCellsRange(e){const[t,,o]=pn(this,Ks).getCorners(),{wtTable:i}=pn(this,Vo);sS(this,rS,pH).call(this,(s,r)=>{if(s>=t&&s<=o){const a=i.getCell(pn(this,Vo).createCellCoords(s,r));e(a)}})}scanColumnsInCellsRange(e){const[,t,,o]=pn(this,Ks).getCorners(),{wtTable:i}=pn(this,Vo);sS(this,rS,pH).call(this,(s,r)=>{if(r>=t&&r<=o){const a=i.getCell(pn(this,Vo).createCellCoords(s,r));e(a)}})}constructor(){fH(this,gH),fH(this,rS),dH(this,Ks,{writable:!0,value:void 0}),dH(this,Vo,{writable:!0,value:void 0})}}function y9(n){let[e,t,o,i]=pn(this,Ks).getCorners();if(e<0&&o<0||t<0&&i<0)return;const{wtTable:s}=pn(this,Vo),r=e!==o||t!==i;if(t=Math.max(t,0),i=Math.max(i,0),e=Math.max(e,0),o=Math.max(o,0),r){if(t=Math.max(t,s.getFirstRenderedColumn()),i=Math.min(i,s.getLastRenderedColumn()),e=Math.max(e,s.getFirstRenderedRow()),o=Math.min(o,s.getLastRenderedRow()),i<t||o<e)return}else{const a=s.getCell(pn(this,Vo).createCellCoords(e,t));if(!Qr(a))return}for(let a=e;a<=o;a+=1)for(let l=t;l<=i;l+=1)n(a,l)}function pH(n){const{wtTable:e}=pn(this,Vo),t=e.getRenderedRowsCount(),o=e.getRenderedColumnsCount();for(let i=0;i<t;i+=1){const s=e.rowFilter.renderedToSource(i);for(let r=0;r<o;r+=1)n(s,e.columnFilter.renderedToSource(r))}}const mH="ht-border-style-",_9="-vertical",S9="-horizontal";class wH{registerListeners(){const e=this.wot.rootDocument.body;this.eventManager.addEventListener(e,"mousedown",()=>this.onMouseDown()),this.eventManager.addEventListener(e,"mouseup",()=>this.onMouseUp());for(let t=0,o=this.main.childNodes.length;t<o;t++){const i=this.main.childNodes[t];this.eventManager.addEventListener(i,"mouseenter",s=>this.onMouseEnter(s,this.main.childNodes[t]))}}onMouseDown(){this.mouseDown=!0}onMouseUp(){this.mouseDown=!1}onMouseEnter(e,t){if(!this.mouseDown||!this.wot.getSetting("hideBorderOnMouseDownOver"))return;e.preventDefault(),es(e);const o=this,i=this.wot.rootDocument.body,s=t.getBoundingClientRect();t.style.display="none";function r(l){if(l.clientY<Math.floor(s.top)||l.clientY>Math.ceil(s.top+s.height)||l.clientX<Math.floor(s.left)||l.clientX>Math.ceil(s.left+s.width))return!0}function a(l){r(l)&&(o.eventManager.removeEventListener(i,"mousemove",a),t.style.display="block")}this.eventManager.addEventListener(i,"mousemove",a)}createBorders(e){const{rootDocument:t}=this.wot;this.main=t.createElement("div");const o=["top","start","bottom","end","corner"];let i=this.main.style;i.position="absolute",i.top=0,i.left=0;for(let a=0;a<5;a++){const l=o[a],h=t.createElement("div"),c=u=>this.settings[l]&&this.settings[l][u]?this.settings[l][u]:e.border[u];h.className=`wtBorder ${this.settings.className||""}`,this.settings[l]&&this.settings[l].hide&&(h.className+=" hidden"),i=h.style;const d=c("style");d?(["start","end"].includes(l)?h.className+=` ${mH}${d}${_9}`:h.className+=` ${mH}${d}${S9}`,i.setProperty("--ht-custom-border-size",`${c("width")}px`),i.setProperty("--ht-custom-border-color",c("color"))):i.backgroundColor=c("color"),i.height=`${c("width")}px`,i.width=`${c("width")}px`,this.main.appendChild(h)}this.top=this.main.childNodes[0],this.start=this.main.childNodes[1],this.bottom=this.main.childNodes[2],this.end=this.main.childNodes[3],this.topStyle=this.top.style,this.startStyle=this.start.style,this.bottomStyle=this.bottom.style,this.endStyle=this.end.style,this.corner=this.main.childNodes[4],this.corner.className+=" corner",this.cornerStyle=this.corner.style,this.cornerStyle.width=`${this.cornerDefaultStyle.width}px`,this.cornerStyle.height=`${this.cornerDefaultStyle.height}px`,this.cornerStyle.border=[`${this.cornerDefaultStyle.borderWidth}px`,this.cornerDefaultStyle.borderStyle,this.cornerDefaultStyle.borderColor].join(" "),qr()&&this.instance.getSetting("isDataViewInstance")&&this.createMultipleSelectorHandles(),this.disappear();const{wtTable:s}=this.wot;let r=s.bordersHolder;r||(r=t.createElement("div"),r.className="htBorders",s.bordersHolder=r,s.spreader.appendChild(r)),r.appendChild(this.main)}createMultipleSelectorHandles(){const{rootDocument:t}=this.wot;this.selectionHandles={top:t.createElement("DIV"),topHitArea:t.createElement("DIV"),bottom:t.createElement("DIV"),bottomHitArea:t.createElement("DIV")},this.selectionHandles.top.className="topSelectionHandle topLeftSelectionHandle",this.selectionHandles.topHitArea.className="topSelectionHandle-HitArea topLeftSelectionHandle-HitArea",this.selectionHandles.bottom.className="bottomSelectionHandle bottomRightSelectionHandle",this.selectionHandles.bottomHitArea.className="bottomSelectionHandle-HitArea bottomRightSelectionHandle-HitArea",this.selectionHandles.styles={top:this.selectionHandles.top.style,topHitArea:this.selectionHandles.topHitArea.style,bottom:this.selectionHandles.bottom.style,bottomHitArea:this.selectionHandles.bottomHitArea.style};const o={position:"absolute",height:"40px",width:"40px","border-radius":`${parseInt(40/1.5,10)}px`};tt(o,(i,s)=>{this.selectionHandles.styles.bottomHitArea[s]=i,this.selectionHandles.styles.topHitArea[s]=i}),this.updateMultipleSelectorHandlesStyles(),this.main.appendChild(this.selectionHandles.top),this.main.appendChild(this.selectionHandles.bottom),this.main.appendChild(this.selectionHandles.topHitArea),this.main.appendChild(this.selectionHandles.bottomHitArea)}updateMultipleSelectorHandlesStyles(){if(!this.selectionHandles)return;const t=this.wot.wtSettings.getSetting("stylesHandler"),o=t.getCSSVariableValue("cell-mobile-handle-size"),i=t.getCSSVariableValue("cell-mobile-handle-border-radius"),s=t.getCSSVariableValue("cell-mobile-handle-background-color"),r=t.getCSSVariableValue("cell-mobile-handle-background-opacity"),a=t.getCSSVariableValue("cell-mobile-handle-border-width"),l=t.getCSSVariableValue("cell-mobile-handle-border-color"),h={position:"absolute",height:`${o}px`,width:`${o}px`,"border-radius":`${i}px`,background:`color-mix(in srgb, ${s} ${r}%, transparent)`,border:`${a}px solid ${l}`};tt(h,(c,d)=>{this.selectionHandles.styles.bottom[d]=c,this.selectionHandles.styles.top[d]=c})}isPartRange(e,t){const o=this.wot.selectionManager.getAreaSelection();return!!(o.cellRange&&(e!==o.cellRange.to.row||t!==o.cellRange.to.col))}updateMultipleSelectionHandlesPosition(e,t,o,i,s,r){const l=this.wot.wtSettings.getSetting("rtlMode")?"right":"left",{top:h,topHitArea:c,bottom:d,bottomHitArea:u}=this.selectionHandles.styles,f=parseInt(h.borderWidth,10),p=parseInt(h.width,10),C=parseInt(c.width,10),_=this.wot.wtTable.getWidth(),S=this.wot.wtTable.getHeight();h.top=`${parseInt(o-p-1,10)}px`,h[l]=`${parseInt(i-p-1,10)}px`,c.top=`${parseInt(o-C/4*3,10)}px`,c[l]=`${parseInt(i-C/4*3,10)}px`;const T=Math.min(parseInt(i+s,10),_-p-f*2),P=Math.min(parseInt(i+s-C/4,10),_-C-f*2);d[l]=`${T}px`,u[l]=`${P}px`;const F=Math.min(parseInt(o+r,10),S-p-f*2),V=Math.min(parseInt(o+r-C/4,10),S-C-f*2);d.top=`${F}px`,u.top=`${V}px`,this.settings.border.cornerVisible&&this.settings.border.cornerVisible()?(h.display="block",c.display="block",this.isPartRange(e,t)?(d.display="none",u.display="none"):(d.display="block",u.display="block")):(h.display="none",d.display="none",c.display="none",u.display="none"),e===this.wot.wtSettings.getSetting("fixedRowsTop")||t===this.wot.wtSettings.getSetting("fixedColumnsStart")?(h.zIndex="9999",c.zIndex="9999"):(h.zIndex="",c.zIndex="")}appear(e){if(this.disabled)return;let[t,o,i,s]=e;if(t<0&&i<0||o<0&&s<0){this.disappear();return}const{wtTable:r,rootDocument:a,rootWindow:l}=this.wot,h=t!==i||o!==s,c=r.getFirstRenderedRow(),d=r.getLastRenderedRow(),u=r.getFirstRenderedColumn(),f=r.getLastRenderedColumn();if(u<0&&f<0||c<0&&d<0){this.disappear();return}let p;if(h){if(o=Math.max(o,u),s=Math.min(s,f),t=Math.max(t,c),i=Math.min(i,d),s<o||i<t){this.disappear();return}p=r.getCell(this.wot.createCellCoords(t,o))}else if(p=r.getCell(this.wot.createCellCoords(t,o)),!Qr(p)){this.disappear();return}const C=h?r.getCell(this.wot.createCellCoords(i,s)):p,_=Ko(p),S=h?Ko(C):_,T=Ko(r.TABLE),P=_.top,F=_.left,V=this.wot.wtSettings.getSetting("rtlMode");let D=0,I=0;if(V){const Me=bn(r.TABLE),Ge=bn(p),wt=l.innerWidth-T.left-Me;I=F+Ge-S.left,D=l.innerWidth-F-Ge-wt-1}else I=S.left+bn(C)-F,D=F-T.left-1;if(this.isEntireColumnSelected(t,i)){const Me=t,Ge=this.getDimensionsFromHeader("columns",o,s,Me,T);let wt=null;Ge&&([wt,D,I]=Ge),wt&&(p=wt)}let G=P-T.top-1,z=S.top+Tn(C)-P;if(this.isEntireRowSelected(o,s)){const Me=o,Ge=this.getDimensionsFromHeader("rows",t,i,Me,T);let wt=null;Ge&&([wt,G,z]=Ge),wt&&(p=wt)}const Y=l.getComputedStyle(p);parseInt(Y.borderTopWidth,10)>0&&(G+=1,z=z>0?z-1:0),parseInt(Y[V?"borderRightWidth":"borderLeftWidth"],10)>0&&(D+=1,I=I>0?I-1:0);const te=V?"right":"left",ee=Math.ceil(this.settings.border.width/2);this.topStyle.top=`${G}px`,this.topStyle[te]=`${D}px`,this.topStyle.width=`${I+ee}px`,this.topStyle.display="block",this.startStyle.top=`${G}px`,this.startStyle[te]=`${D}px`,this.startStyle.height=`${z+ee}px`,this.startStyle.display="block",this.bottomStyle.top=`${G+z-parseInt(this.bottomStyle.height,10)+ee}px`,this.bottomStyle[te]=`${D}px`,this.bottomStyle.width=`${I+ee}px`,this.bottomStyle.display="block",this.endStyle.top=`${G}px`,this.endStyle[te]=`${D+I-parseInt(this.endStyle.width,10)+ee}px`,this.endStyle.height=`${z+ee}px`,this.endStyle.display="block";let be=this.settings.border.cornerVisible;be=typeof be=="function"?be(this.settings.layerLevel):be;const me=this.wot.getSetting("onModifyGetCellCoords",i,s,!1,"render");let[Ve,Ye]=[i,s];if(me&&Array.isArray(me)&&([,,Ve,Ye]=me),qr()||!be||this.isPartRange(Ve,Ye))this.cornerStyle.display="none";else{this.cornerStyle.top=`${G+z+this.cornerCenterPointOffset-this.cornerDefaultStyle.borderWidth}px`,this.cornerStyle[te]=`${D+I+this.cornerCenterPointOffset-this.cornerDefaultStyle.borderWidth}px`,this.cornerStyle.borderRightWidth=`${this.cornerDefaultStyle.borderWidth}px`,this.cornerStyle.borderLeftWidth=`${this.cornerDefaultStyle.borderWidth}px`,this.cornerStyle.borderBottomWidth=`${this.cornerDefaultStyle.borderWidth}px`,this.cornerStyle.width=this.cornerDefaultStyle.width,this.cornerStyle.display="none";let Me=jp(r.TABLE);const Ge=Me===l;Ge&&(Me=a.documentElement);const wt=parseInt(this.cornerDefaultStyle.borderWidth,10)-1,on=Math.ceil(parseInt(this.cornerDefaultStyle.width,10)/2),W=Math.ceil(parseInt(this.cornerDefaultStyle.height,10)/2);if(s===this.wot.getSetting("totalColumns")-1){const q=Ge?C.getBoundingClientRect().left:C.offsetLeft;let Ce=!1,$=0;if(V?($=q-parseInt(this.cornerDefaultStyle.width,10)/2,Ce=$<0):($=q+bn(C)+parseInt(this.cornerDefaultStyle.width,10)/2,Ce=$>=sF(Me)),Ce){const Re=Math.floor(D+I+this.cornerCenterPointOffset-on-wt);B(this.corner,"wtCornerInlineEndEdge"),this.cornerStyle[te]=`${Re-1}px`}}else oe(this.corner,"wtCornerInlineEndEdge");if(i===this.wot.getSetting("totalRows")-1){if((Ge?C.getBoundingClientRect().top:C.offsetTop)+Tn(C)+parseInt(this.cornerDefaultStyle.height,10)/2>=xu(Me)){const Re=Math.floor(G+z+this.cornerCenterPointOffset-W-wt);B(this.corner,"wtCornerBlockEndEdge"),this.cornerStyle.top=`${Re-1}px`}}else oe(this.corner,"wtCornerBlockEndEdge");this.cornerStyle.display="block"}qr()&&this.instance.getSetting("isDataViewInstance")&&this.updateMultipleSelectionHandlesPosition(i,s,G,D,I,z)}isEntireColumnSelected(e,t){return e===this.wot.wtTable.getFirstRenderedRow()&&t===this.wot.wtTable.getLastRenderedRow()}isEntireRowSelected(e,t){return e===this.wot.wtTable.getFirstRenderedColumn()&&t===this.wot.wtTable.getLastRenderedColumn()}getDimensionsFromHeader(e,t,o,i,s){const{wtTable:r}=this.wot,a=r.wtRootElement.parentNode;let l=null,h=null,c=null,d=null,u=null,f=null,p=null,C=null;switch(e){case"rows":l=(..._)=>r.getRowHeader(..._),h=(..._)=>Tn(..._),c="ht__selection--rows",f="top";break;case"columns":l=(..._)=>r.getColumnHeader(..._),h=(..._)=>bn(..._),c="ht__selection--columns",f="left";break}if(a.classList.contains(c)){const _=this.wot.getSetting("columnHeaders").length;if(p=l(t,_-i),C=l(o,_-i),!p||!C)return!1;const S=Ko(p),T=Ko(C);return p&&C&&(d=S[f]-s[f]-1,u=T[f]+h(C)-S[f]),[p,d,u]}return!1}changeBorderStyle(e,t){const o=this[e].style,i=t[e];!i||i.hide?B(this[e],"hidden"):(_e(this[e],"hidden")&&oe(this[e],"hidden"),o.backgroundColor=i.color,(e==="top"||e==="bottom")&&(o.height=`${i.width}px`),(e==="start"||e==="end")&&(o.width=`${i.width}px`))}changeBorderToDefaultStyle(e){const t={width:1,color:"#000"},o=this[e].style;o.backgroundColor=t.color,o.width=`${t.width}px`,o.height=`${t.width}px`}toggleHiddenClass(e,t){this.changeBorderToDefaultStyle(e),t?B(this[e],"hidden"):oe(this[e],"hidden")}disappear(){this.topStyle.display="none",this.bottomStyle.display="none",this.startStyle.display="none",this.endStyle.display="none",this.cornerStyle.display="none",qr()&&this.instance.getSetting("isDataViewInstance")&&(this.selectionHandles.styles.top.display="none",this.selectionHandles.styles.topHitArea.display="none",this.selectionHandles.styles.bottom.display="none",this.selectionHandles.styles.bottomHitArea.display="none")}destroy(){this.eventManager.destroyWithOwnEventsOnly(),this.main.parentNode.removeChild(this.main)}constructor(e,t){t&&(this.eventManager=e.eventManager,this.instance=e,this.wot=e,this.settings=t,this.mouseDown=!1,this.main=null,this.top=null,this.bottom=null,this.start=null,this.end=null,this.topStyle=null,this.bottomStyle=null,this.startStyle=null,this.endStyle=null,this.cornerDefaultStyle=lk(this.instance),this.cornerCenterPointOffset=-Math.ceil(parseInt(this.cornerDefaultStyle.width,10)/2),this.corner=null,this.cornerStyle=null,this.createBorders(t),this.registerListeners())}}function ZF(n,e){if(e.has(n))throw new TypeError("Cannot initialize the same private elements twice on an object")}function v9(n,e){return e.get?e.get.call(n):e.value}function R9(n,e,t){if(e.set)e.set.call(n,t);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=t}}function QF(n,e,t){if(!e.has(n))throw new TypeError("attempted to "+t+" private field on non-instance");return e.get(n)}function Ze(n,e){var t=QF(n,e,"get");return v9(n,t)}function fd(n,e,t){ZF(n,e),e.set(n,t)}function gd(n,e,t){var o=QF(n,e,"set");return R9(n,o,t),t}function E9(n,e,t){if(!e.has(n))throw new TypeError("attempted to get private field on non-instance");return t}function k9(n,e){ZF(n,e),e.add(n)}var zo=new WeakMap,Mi=new WeakMap,aw=new WeakMap,hu=new WeakMap,lw=new WeakMap,ua=new WeakMap,bH=new WeakSet;class T9{setActiveOverlay(e){return gd(this,zo,e),Ze(this,aw).setActiveOverlay(Ze(this,zo)),Ze(this,hu).has(Ze(this,zo))||Ze(this,hu).set(Ze(this,zo),new Set),this}getFocusSelection(){return Ze(this,Mi)!==null?Ze(this,Mi).getFocus():null}getAreaSelection(){return Ze(this,Mi)!==null?Ze(this,Mi).createLayeredArea():null}getBorderInstance(e){if(!e.settings.border)return null;if(Ze(this,ua).has(e)){const o=Ze(this,ua).get(e);if(o.has(Ze(this,zo)))return o.get(Ze(this,zo));const i=new wH(Ze(this,zo),e.settings);return o.set(Ze(this,zo),i),i}const t=new wH(Ze(this,zo),e.settings);return Ze(this,ua).set(e,new Map([[Ze(this,zo),t]])),t}getBorderInstances(e){return Array.from(Ze(this,ua).get(e)?.values()??[])}destroyBorders(e){Ze(this,ua).get(e).forEach(t=>t.destroy()),Ze(this,ua).delete(e)}refreshAllBorderHandleStyles(){Ze(this,ua).forEach(e=>{e.forEach(t=>{t.updateMultipleSelectorHandlesStyles?.()})})}render(e){if(Ze(this,Mi)===null)return;e&&E9(this,bH,x9).call(this);const t=Array.from(Ze(this,Mi)),o=new Map,i=new Map;for(let s=0;s<t.length;s++){const r=t[s],{className:a,headerAttributes:l,createLayers:h,selectionType:c}=r.settings;Ze(this,lw).has(r)||(Ze(this,lw).add(r),r.addLocalHook("destroy",()=>this.destroyBorders(r)));const d=this.getBorderInstance(r);if(r.isEmpty()){d?.disappear();continue}a&&Ze(this,aw).setActiveSelection(r).scan().forEach(p=>{if(o.has(p)){const C=o.get(p);C.has(a)&&h===!0?C.set(a,C.get(a)+1):C.set(a,1)}else o.set(p,new Map([[a,1]]));l&&(i.has(p)||i.set(p,[]),p.nodeName==="TH"&&i.get(p).push(...l))});const u=r.getCorners();Ze(this,zo).getSetting("onBeforeDrawBorders",u,c),d?.appear(u)}o.forEach((s,r)=>{const a=Array.from(s).map(([l,h])=>h===1?l:[l,...Array.from({length:h-1},(c,d)=>`${l}-${d+1}`)]).flat();a.forEach(l=>Ze(this,hu).get(Ze(this,zo)).add(l)),B(r,a),r.nodeName==="TD"&&Array.isArray(Ze(this,Mi).options?.cellAttributes)&&fe(r,Ze(this,Mi).options.cellAttributes)}),Array.from(i.keys()).forEach(s=>{fe(s,[...i.get(s)])})}constructor(e){k9(this,bH),fd(this,zo,{writable:!0,value:void 0}),fd(this,Mi,{writable:!0,value:void 0}),fd(this,aw,{writable:!0,value:void 0}),fd(this,hu,{writable:!0,value:void 0}),fd(this,lw,{writable:!0,value:void 0}),fd(this,ua,{writable:!0,value:void 0}),gd(this,aw,new C9),gd(this,hu,new WeakMap),gd(this,lw,new WeakSet),gd(this,ua,new Map),gd(this,Mi,e)}}function x9(){const n=Ze(this,hu).get(Ze(this,zo)),e=Ze(this,zo).wtSettings.getSetting("onBeforeRemoveCellClassNames");if(Array.isArray(e))for(let t=0;t<e.length;t++)n.add(e[t]);n.forEach(t=>{const o=Ze(this,zo).wtTable.TABLE.querySelectorAll(`.${t}`);let i=[];Array.isArray(Ze(this,Mi).options?.cellAttributes)&&(i=Ze(this,Mi).options.cellAttributes.map(s=>s[0])),Array.isArray(Ze(this,Mi).options?.headerAttributes)&&(i=[...i,...Ze(this,Mi).options.headerAttributes.map(s=>s[0])]);for(let s=0,r=o.length;s<r;s++)oe(o[s],t),Zr(o[s],i)}),n.clear()}class M9 extends Om{createTable(...e){return new sk(...e)}shouldBeRendered(){return this.wtSettings.getSetting("shouldRenderInlineStartOverlay")}resetFixedPosition(){const{wtTable:e}=this.wot;if(!this.needFullRender||!this.shouldBeRendered()||!e.holder.parentNode)return!1;const{rootWindow:t}=this.domBindings,o=this.clone.wtTable.holder.parentNode,i=this.wtSettings.getSetting("preventOverflow");let s=0;this.trimmingContainer===t&&(!i||i!=="horizontal")?(s=this.getOverlayOffset()*(this.isRtl()?-1:1),X0(o,`${s}px`,"0px")):(s=this.getScrollPosition(),Dy(o));const r=this.adjustHeaderBordersPosition(s);return this.adjustElementsSize(),r}setScrollPosition(e){const{rootWindow:t}=this.domBindings;let o=!1;this.isRtl()&&(e=-e);const i=this.mainTableScrollableElement;if(i===t&&e!==t.scrollX){const s=t.scrollX;t.scrollTo(e,oF(t)),o=s!==t.scrollX}else if(e!==i.scrollLeft){const s=i.scrollLeft;i.scrollLeft=e,o=s!==i.scrollLeft}return o}onScroll(){this.wtSettings.getSetting("onScrollVertically")}sumCellSizes(e,t){const o=this.wtSettings.getSetting("defaultColumnWidth");let i=e,s=0;for(;i<t;)s+=this.wot.wtTable.getColumnWidth(i)||o,i+=1;return s}adjustElementsSize(){this.updateTrimmingContainer(),this.needFullRender&&(this.adjustRootElementSize(),this.adjustRootChildrenSize())}adjustRootElementSize(){const{wtTable:e,wtViewport:t}=this.wot,{rootDocument:o,rootWindow:i}=this.domBindings,r=this.clone.wtTable.holder.parentNode.style,a=this.wtSettings.getSetting("preventOverflow");if(this.trimmingContainer!==i||a==="vertical"){let h=t.getWorkspaceHeight();t.hasHorizontalScroll()&&(h-=xn(o)),h=Math.min(h,e.wtRootElement.scrollHeight),r.height=`${h}px`}else r.height="";this.clone.wtTable.holder.style.height=r.height;const l=bn(this.clone.wtTable.TABLE);r.width=`${l}px`}adjustRootChildrenSize(){const{holder:e}=this.clone.wtTable,t=lk(this.wot),o=this.wot.selectionManager.getFocusSelection()?parseInt(t.width,10)/2:0;this.clone.wtTable.hider.style.height=this.hider.style.height,e.style.height=e.parentNode.style.height,e.style.width=`${parseInt(e.parentNode.style.width,10)+o}px`}applyToDOM(){const e=this.wtSettings.getSetting("totalColumns"),t=this.isRtl()?"right":"left";typeof this.wot.wtViewport.columnsRenderCalculator.startPosition=="number"?this.spreader.style[t]=`${this.wot.wtViewport.columnsRenderCalculator.startPosition}px`:e===0?this.spreader.style[t]="0":U("Incorrect value of the columnsRenderCalculator"),this.isRtl()?this.spreader.style.left="":this.spreader.style.right="",this.needFullRender&&this.syncOverlayOffset()}syncOverlayOffset(){typeof this.wot.wtViewport.rowsRenderCalculator.startPosition=="number"?this.clone.wtTable.spreader.style.top=`${this.wot.wtViewport.rowsRenderCalculator.startPosition}px`:this.clone.wtTable.spreader.style.top=""}scrollTo(e,t){const{wtSettings:o}=this,i=o.getSetting("rowHeaders"),s=o.getSetting("fixedColumnsStart"),a=(this.wot.cloneSource?this.wot.cloneSource:this.wot).wtTable.holder,l=s===0&&i.length>0&&!_e(a.parentNode,"innerBorderInlineStart")?1:0;let h=this.getTableParentOffset(),c=0;if(t){const d=this.wot.wtTable.getColumnWidth(e),u=this.wot.wtViewport.getViewportWidth();d>u&&(t=!1)}return t&&a.offsetWidth!==a.clientWidth&&(c=xn(this.domBindings.rootDocument)),t?(h+=this.sumCellSizes(0,e+1),h-=this.wot.wtViewport.getViewportWidth(),h+=l):h+=this.sumCellSizes(this.wtSettings.getSetting("fixedColumnsStart"),e),h+=c,u4(this.mainTableScrollableElement)===h-l&&l>0&&this.wot.wtOverlays.expandHiderHorizontallyBy(l),this.setScrollPosition(h)}getTableParentOffset(){const e=this.wtSettings.getSetting("preventOverflow");let t=0;return!e&&this.trimmingContainer===this.domBindings.rootWindow&&(t=this.wot.wtTable.holderOffset.left),t}getScrollPosition(){return Math.abs(iF(this.mainTableScrollableElement,this.domBindings.rootWindow))}getOverlayOffset(){const{rootWindow:e}=this.domBindings,t=this.wtSettings.getSetting("preventOverflow");let o=0;if(this.trimmingContainer===e&&(!t||t!=="horizontal")){this.isRtl()?o=Math.abs(Math.min(this.getTableParentOffset()-this.getScrollPosition(),0)):o=Math.max(this.getScrollPosition()-this.getTableParentOffset(),0);const i=this.wot.wtTable.getTotalWidth(),s=this.clone.wtTable.getTotalWidth(),r=i-s;o>r&&(o=0)}return o}adjustHeaderBordersPosition(e){const{wtSettings:t}=this,o=this.wot.wtTable.holder.parentNode,i=t.getSetting("rowHeaders"),s=t.getSetting("fixedColumnsStart"),r=t.getSetting("totalRows"),a=t.getSetting("preventOverflow")==="vertical";r?oe(o,"emptyRows"):B(o,"emptyRows");let l=!1;if(!a){if(s&&!i.length)B(o,"innerBorderLeft innerBorderInlineStart");else if(!s&&i.length){const h=_e(o,"innerBorderInlineStart");e?(B(o,"innerBorderLeft innerBorderInlineStart"),l=!h):(oe(o,"innerBorderLeft innerBorderInlineStart"),l=h)}}return l}constructor(e,t,o,i){super(e,t,jc,o,i)}}const I9="stickyRowsTop",hk={getFirstRenderedRow(){return this.getRenderedRowsCount()===0?-1:0},getFirstVisibleRow(){return this.getFirstRenderedRow()},getFirstPartiallyVisibleRow(){return this.getFirstRenderedRow()},getLastRenderedRow(){return this.getRenderedRowsCount()-1},getLastVisibleRow(){return this.getLastRenderedRow()},getLastPartiallyVisibleRow(){return this.getLastRenderedRow()},getRenderedRowsCount(){return Math.min(this.wtSettings.getSetting("totalRows"),this.wtSettings.getSetting("fixedRowsTop"))},getVisibleRowsCount(){return this.getRenderedRowsCount()},getColumnHeadersCount(){return this.dataAccessObject.columnHeaders.length}};ll(hk,"MIXIN_NAME",I9,{writable:!1,enumerable:!1});class ck extends cf{constructor(e,t,o,i){super(e,t,o,i,qc)}}Ct(ck,hk);Ct(ck,Ny);class H9 extends Om{createTable(...e){return new ck(...e)}shouldBeRendered(){return this.wtSettings.getSetting("shouldRenderTopOverlay")&&this.wtSettings.getSetting("shouldRenderInlineStartOverlay")}resetFixedPosition(){if(this.updateTrimmingContainer(),!this.wot.wtTable.holder.parentNode)return!1;const e=this.clone.wtTable.holder.parentNode;if(this.trimmingContainer===this.domBindings.rootWindow){const i=this.inlineStartOverlay.getOverlayOffset()*(this.isRtl()?-1:1),s=this.topOverlay.getOverlayOffset();X0(e,`${i}px`,`${s}px`)}else Dy(e);let t=Tn(this.clone.wtTable.TABLE);const o=bn(this.clone.wtTable.TABLE);return this.wot.wtTable.hasDefinedSize()||(t=0),e.style.height=`${t}px`,e.style.width=`${o}px`,!1}constructor(e,t,o,i,s,r){super(e,t,qc,o,i),this.topOverlay=s,this.inlineStartOverlay=r}}class dk extends cf{constructor(e,t,o,i){super(e,t,o,i,Gc)}}Ct(dk,hk);Ct(dk,Py);class A9 extends Om{createTable(...e){return new dk(...e)}shouldBeRendered(){return this.wtSettings.getSetting("shouldRenderTopOverlay")}resetFixedPosition(){if(!this.needFullRender||!this.shouldBeRendered()||!this.wot.wtTable.holder.parentNode)return!1;const e=this.clone.wtTable.holder.parentNode,{rootWindow:t}=this.domBindings,o=this.wtSettings.getSetting("preventOverflow");let i=0,s=!1;if(this.trimmingContainer===t&&(!o||o!=="vertical")){const{wtTable:a}=this.wot,l=a.hider.getBoundingClientRect(),h=Math.ceil(l.bottom),c=e.offsetHeight;s=h===c,i=this.getOverlayOffset(),X0(e,"0px",`${i}px`)}else i=this.getScrollPosition(),Dy(e);const r=this.adjustHeaderBordersPosition(i,s);return this.adjustElementsSize(),r}setScrollPosition(e){const{rootWindow:t}=this.domBindings,o=this.mainTableScrollableElement;let i=!1;if(o===t&&e!==t.scrollY){const s=t.scrollY;t.scrollTo(q0(t),e),i=s!==t.scrollY}else if(e!==o.scrollTop){const s=o.scrollTop;o.scrollTop=e,i=s!==o.scrollTop}return i}onScroll(){this.wtSettings.getSetting("onScrollHorizontally")}sumCellSizes(e,t){const o=this.wtSettings.getSetting("stylesHandler").getDefaultRowHeight();let i=e,s=0;for(;i<t;){const r=this.wot.wtTable.getRowHeight(i);s+=r===void 0?o:r,i+=1}return s}adjustElementsSize(){this.updateTrimmingContainer(),this.needFullRender&&(this.adjustRootElementSize(),this.adjustRootChildrenSize())}adjustRootElementSize(){const{wtTable:e,wtViewport:t}=this.wot,{rootDocument:o,rootWindow:i}=this.domBindings,r=this.clone.wtTable.holder.parentNode.style,a=this.wtSettings.getSetting("preventOverflow");if(this.trimmingContainer!==i||a==="horizontal"){let h=t.getWorkspaceWidth();t.hasVerticalScroll()&&(h-=xn(o)),h=Math.min(h,e.wtRootElement.scrollWidth),r.width=`${h}px`}else r.width="";this.clone.wtTable.holder.style.width=r.width;let l=Tn(this.clone.wtTable.TABLE);e.hasDefinedSize()||(l=0),r.height=`${l}px`}adjustRootChildrenSize(){const{holder:e}=this.clone.wtTable,t=lk(this.wot),o=this.wot.selectionManager.getFocusSelection()?parseInt(t.height,10)/2:0;this.clone.wtTable.hider.style.width=this.hider.style.width,e.style.width=e.parentNode.style.width,e.style.height=`${parseInt(e.parentNode.style.height,10)+o}px`}applyToDOM(){const e=this.wtSettings.getSetting("totalRows");typeof this.wot.wtViewport.rowsRenderCalculator.startPosition=="number"?this.spreader.style.top=`${this.wot.wtViewport.rowsRenderCalculator.startPosition}px`:e===0?this.spreader.style.top="0":U("Incorrect value of the rowsRenderCalculator"),this.spreader.style.bottom="",this.needFullRender&&this.syncOverlayOffset()}syncOverlayOffset(){const e=this.isRtl()?"right":"left",{spreader:t}=this.clone.wtTable;typeof this.wot.wtViewport.columnsRenderCalculator.startPosition=="number"?t.style[e]=`${this.wot.wtViewport.columnsRenderCalculator.startPosition}px`:t.style[e]=""}scrollTo(e,t){const{wot:o,wtSettings:i}=this,r=(o.cloneSource?o.cloneSource:o).wtTable.holder,a=i.getSetting("columnHeaders"),h=i.getSetting("fixedRowsTop")===0&&a.length>0&&!_e(r.parentNode,"innerBorderTop")?1:0;let c=this.getTableParentOffset(),d=0;if(t){const u=this.wot.wtTable.getRowHeight(e),f=this.wot.wtViewport.getViewportHeight();u>f&&(t=!1)}if(t&&r.offsetHeight!==r.clientHeight&&(d=xn(this.domBindings.rootDocument)),t){const u=i.getSetting("fixedRowsBottom"),f=i.getSetting("totalRows");c+=this.sumCellSizes(0,e+1),c-=o.wtViewport.getViewportHeight()-this.sumCellSizes(f-u,f),c+=1,c+=h}else c+=this.sumCellSizes(i.getSetting("fixedRowsTop"),e);return c+=d,d4(this.mainTableScrollableElement)===c-h&&h>0&&this.wot.wtOverlays.expandHiderVerticallyBy(h),this.setScrollPosition(c)}getTableParentOffset(){return this.mainTableScrollableElement===this.domBindings.rootWindow?this.wot.wtTable.holderOffset.top:0}getScrollPosition(){return K0(this.mainTableScrollableElement,this.domBindings.rootWindow)}getOverlayOffset(){const{rootWindow:e}=this.domBindings,t=this.wtSettings.getSetting("preventOverflow");let o=0;if(this.trimmingContainer===e&&(!t||t!=="vertical")){const i=this.wot.wtTable.getTotalHeight(),s=this.clone.wtTable.getTotalHeight(),r=i-s;o=Math.max(this.getScrollPosition()-this.getTableParentOffset(),0),o>r&&(o=0)}return o}adjustHeaderBordersPosition(e,t=!1){const{wtSettings:o}=this,i=this.wot.wtTable.holder.parentNode,s=o.getSetting("totalColumns"),r=o.getSetting("preventOverflow")==="horizontal";s?oe(i,"emptyColumns"):B(i,"emptyColumns");let a=!1;if(!t&&!r){const l=o.getSetting("fixedRowsTop"),h=this.cachedFixedRowsTop!==l,c=o.getSetting("columnHeaders");if((h||l===0)&&c.length>0){const d=_e(i,"innerBorderTop");this.cachedFixedRowsTop=o.getSetting("fixedRowsTop"),e||o.getSetting("totalRows")===0?(B(i,"innerBorderTop"),a=!d):(oe(i,"innerBorderTop"),a=d)}}return a}constructor(e,t,o,i){super(e,t,Gc,o,i),this.cachedFixedRowsTop=-1,this.cachedFixedRowsTop=this.wtSettings.getSetting("fixedRowsTop")}}function JF(n,e){if(e.has(n))throw new TypeError("Cannot initialize the same private elements twice on an object")}function O9(n,e){return e.get?e.get.call(n):e.value}function D9(n,e,t){if(e.set)e.set.call(n,t);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=t}}function eB(n,e,t){if(!e.has(n))throw new TypeError("attempted to "+t+" private field on non-instance");return e.get(n)}function ro(n,e){var t=eB(n,e,"get");return O9(n,t)}function aS(n,e,t){JF(n,e),e.set(n,t)}function Xs(n,e,t){var o=eB(n,e,"set");return D9(n,o,t),t}function jt(n,e,t){if(!e.has(n))throw new TypeError("attempted to get private field on non-instance");return t}function fa(n,e){JF(n,e),e.add(n)}var ui=new WeakMap,Zs=new WeakMap,Rh=new WeakMap,CH=new WeakSet,Pb=new WeakSet,Lb=new WeakSet,yH=new WeakSet,Yg=new WeakSet,cu=new WeakSet,_H=new WeakSet,Dm=new WeakSet,Kp=new WeakSet;class N9{registerListeners(){const{eventManager:e,domBindings:{rootDocument:t}}=ro(this,ui);ro(this,Zs)&&(Xs(this,Zs,!1),jt(this,cu,Gg).call(this,"relative",0,0)),Xs(this,Rh,!1),e.addEventListener(t,"mousedown",o=>{Xs(this,Rh,jt(this,_H,W9).call(this,o))}),e.addEventListener(t,"mouseup",()=>{Xs(this,Rh,!1),ro(this,Zs)&&this.deactivate()})}tryActivate(e,t){ro(this,Rh)&&!ro(this,Zs)&&!Ay()&&(e||t)&&jt(this,CH,P9).call(this)}syncOffsets(){if(!ro(this,Zs))return;const e=ro(this,ui),{wtViewport:t}=e.wot,o=t.rowsRenderCalculator.startPosition,i=t.columnsRenderCalculator.startPosition;if(typeof o!="number"||typeof i!="number")return;const s=o-jt(this,Pb,_E).call(this),r=i-jt(this,Lb,SE).call(this);jt(this,cu,Gg).call(this,"sticky",s,r)}destroy(){ro(this,Zs)&&jt(this,cu,Gg).call(this,"relative",0,0),Xs(this,Zs,!1),Xs(this,Rh,!1)}deactivate(){const e=ro(this,ui),t=e.wtTable.spreader,{wtViewport:o}=e.wot,s=e.wtSettings.getSetting("rtlMode")?"right":"left";e.refreshAll();const r=parseInt(t.style.top,10)||0,a=parseInt(t.style[s],10)||0,l=o.rowsRenderCalculator.startPosition,h=o.columnsRenderCalculator.startPosition,c=typeof l=="number"?l-r:jt(this,Pb,_E).call(this),d=typeof h=="number"?h-a:jt(this,Lb,SE).call(this);jt(this,yH,L9).call(this,c,d),Xs(this,Zs,!1),jt(this,cu,Gg).call(this,"relative",0,0),e.refreshAll(),e.applyToDOM()}constructor(e){fa(this,CH),fa(this,Pb),fa(this,Lb),fa(this,yH),fa(this,Yg),fa(this,cu),fa(this,_H),fa(this,Dm),fa(this,Kp),aS(this,ui,{writable:!0,value:void 0}),aS(this,Zs,{writable:!0,value:void 0}),aS(this,Rh,{writable:!0,value:void 0}),Xs(this,Zs,!1),Xs(this,Rh,!1),Xs(this,ui,e)}}function P9(){const n=ro(this,ui),e=n.wtTable.spreader,o=n.wtSettings.getSetting("rtlMode")?"right":"left",s=(parseInt(e.style.top,10)||0)-jt(this,Pb,_E).call(this),a=(parseInt(e.style[o],10)||0)-jt(this,Lb,SE).call(this);Xs(this,Zs,!0),jt(this,cu,Gg).call(this,"sticky",s,a)}function _E(){const{topOverlay:n}=ro(this,ui);return n.getScrollPosition()-n.getTableParentOffset()}function SE(){const{inlineStartOverlay:n}=ro(this,ui);return jt(this,Kp,kC).call(this)&&jt(this,Dm,Ly).call(this)?Math.abs(n.getScrollPosition()):Math.abs(n.getScrollPosition())-n.getTableParentOffset()}function L9(n,e){const t=ro(this,ui);if(jt(this,Dm,Ly).call(this)){const{rootWindow:o}=t.domBindings,i=jt(this,Kp,kC).call(this)?e:e+t.inlineStartOverlay.getTableParentOffset();o.scrollTo(i,n+t.topOverlay.getTableParentOffset())}else t.wtTable.holder.scrollTop=n,t.wtTable.holder.scrollLeft=jt(this,Kp,kC).call(this)?-e:e}function hw(n){n.style.top="",n.style.bottom="",n.style.left="",n.style.right=""}function Gg(n,e,t){const o=ro(this,ui),i=o.wtTable.spreader,s=jt(this,Kp,kC).call(this),r=s?"right":"left",a=n==="sticky";if(i.style.position=n,a?(i.style.top=`${e}px`,i.style.bottom="",i.style[r]=`${t}px`,i.style[s?"left":"right"]=""):jt(this,Yg,hw).call(this,i),!jt(this,Dm,Ly).call(this)){if(o.inlineStartOverlay.needFullRender){const l=o.inlineStartOverlay.clone.wtTable.spreader;l.style.position=n,a?l.style.top=`${e}px`:jt(this,Yg,hw).call(this,l)}if(o.topOverlay.needFullRender){const l=o.topOverlay.clone.wtTable.spreader;l.style.position=n,a?(l.style[r]=`${t}px`,l.style[s?"left":"right"]=""):jt(this,Yg,hw).call(this,l)}if(o.bottomOverlay.needFullRender&&o.bottomOverlay.clone){const l=o.bottomOverlay.clone.wtTable.spreader;l.style.position=n,a?(l.style[r]=`${t}px`,l.style[s?"left":"right"]=""):jt(this,Yg,hw).call(this,l)}}}function W9(n){return jt(this,Dm,Ly).call(this)?n.target===ro(this,ui).domBindings.rootDocument.documentElement:n.target===ro(this,ui).scrollableElement}function Ly(){return ro(this,ui).scrollableElement===ro(this,ui).domBindings.rootWindow}function kC(){return ro(this,ui).wtSettings.getSetting("rtlMode")}function tB(n,e){if(e.has(n))throw new TypeError("Cannot initialize the same private elements twice on an object")}function $9(n,e){return e.get?e.get.call(n):e.value}function F9(n,e,t){if(e.set)e.set.call(n,t);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=t}}function nB(n,e,t){if(!e.has(n))throw new TypeError("attempted to "+t+" private field on non-instance");return e.get(n)}function Un(n,e){var t=nB(n,e,"get");return $9(n,t)}function wl(n,e,t){tB(n,e),e.set(n,t)}function Gn(n,e,t){var o=nB(n,e,"set");return F9(n,o,t),t}function xf(n,e,t){if(!e.has(n))throw new TypeError("attempted to get private field on non-instance");return t}function cw(n,e){tB(n,e),e.add(n)}var Eh=new WeakMap,Mf=new WeakMap,Xp=new WeakMap,Zp=new WeakMap,kh=new WeakMap,bl=new WeakMap,dw=new WeakMap,Th=new WeakMap,SH=new WeakSet,vH=new WeakSet,RH=new WeakSet,lS=new WeakSet;class B9{getOverlays(e=!1){const t=[...Un(this,Eh)];return e&&t.push(this.wtTable),t}initBrowserLineHeight(){const{rootWindow:e,rootDocument:t}=this.domBindings,o=e.getComputedStyle(t.body),i=parseInt(o.lineHeight,10),s=parseInt(o.fontSize,10)*1.2;this.browserLineHeight=i||s}initOverlays(){const e=[this.wot,this.facadeGetter,this.wtSettings,this.domBindings];this.topOverlay=new A9(...e),this.bottomOverlay=new c9(...e),this.inlineStartOverlay=new M9(...e),this.topInlineStartCornerOverlay=new H9(...e,this.topOverlay,this.inlineStartOverlay),this.bottomInlineStartCornerOverlay=new l9(...e,this.bottomOverlay,this.inlineStartOverlay),Gn(this,Eh,[this.topOverlay,this.bottomOverlay,this.inlineStartOverlay,this.topInlineStartCornerOverlay,this.bottomInlineStartCornerOverlay])}beforeDraw(){Gn(this,Mf,Un(this,Eh).reduce((e,t)=>t.hasRenderingStateChanged()||e,!1)),Un(this,Eh).forEach(e=>e.updateStateOfRendering("before"))}afterDraw(){this.syncScrollWithMaster(),Un(this,Eh).forEach(e=>{const t=e.hasRenderingStateChanged();e.updateStateOfRendering("after"),t&&!e.needFullRender&&e.reset()})}refreshAll(){if(this.wot.drawn){if(!this.wtTable.holder.parentNode){this.destroy();return}this.wot.draw(!0),this.verticalScrolling&&xf(this,vH,z9).call(this)&&this.inlineStartOverlay.onScroll(),this.horizontalScrolling&&xf(this,RH,U9).call(this)&&this.topOverlay.onScroll(),this.verticalScrolling=!1,this.horizontalScrolling=!1}}registerListeners(){const{rootDocument:e,rootWindow:t}=this.domBindings,{mainTableScrollableElement:o}=this.topOverlay,{mainTableScrollableElement:i}=this.inlineStartOverlay;this.eventManager.addEventListener(e.documentElement,"keydown",c=>this.onKeyDown(c)),this.eventManager.addEventListener(e.documentElement,"keyup",()=>this.onKeyUp()),this.eventManager.addEventListener(e,"visibilitychange",()=>this.onKeyUp()),Un(this,Th).registerListeners(),this.eventManager.addEventListener(o,"scroll",c=>this.onTableScroll(c),{passive:!0}),o!==i&&this.eventManager.addEventListener(i,"scroll",c=>this.onTableScroll(c),{passive:!0});const s=this.scrollableElement===t,r=this.wtSettings.getSetting("preventWheel"),a={passive:s};this.eventManager.addEventListener(this.wtTable.wtRootElement,"wheel",c=>this.onCloneWheel(c,r),a),[this.topOverlay,this.bottomOverlay,this.inlineStartOverlay,this.topInlineStartCornerOverlay,this.bottomInlineStartCornerOverlay].forEach(c=>{this.eventManager.addEventListener(c.clone.wtTable.holder,"wheel",d=>this.onCloneWheel(d,r),a)});let h;this.eventManager.addEventListener(t,"resize",()=>{yC(()=>{clearTimeout(h),this.wtSettings.getSetting("onWindowResize"),h=setTimeout(()=>{Gn(this,kh,0)},200)})}),s||this.resizeObserver.observe(this.wtTable.wtRootElement.parentElement)}onTableScroll(e){const t=this.domBindings.rootWindow,o=this.inlineStartOverlay.mainTableScrollableElement,i=this.topOverlay.mainTableScrollableElement,s=e.target;this.keyPressed&&(i!==t&&s!==t&&!e.target.contains(i)||o!==t&&s!==t&&!e.target.contains(o))||this.syncScrollPositions(e)}onCloneWheel(e,t){if(e.ctrlKey)return;const{rootWindow:o}=this.domBindings,i=this.inlineStartOverlay.mainTableScrollableElement,s=this.topOverlay.mainTableScrollableElement,r=e.target,a=s!==o&&r!==o&&!r.contains(s),l=i!==o&&r!==o&&!r.contains(i);if(this.keyPressed&&(a||l)||this.scrollableElement===o)return;const h=this.translateMouseWheelToScroll(e);(t||this.scrollableElement!==o&&h)&&e.preventDefault()}onKeyDown(e){this.keyPressed=Xu(e.keyCode,"ARROW_UP|ARROW_RIGHT|ARROW_DOWN|ARROW_LEFT")}onKeyUp(){this.keyPressed=!1}translateMouseWheelToScroll(e){let t=isNaN(e.deltaY)?-1*e.wheelDeltaY:e.deltaY,o=isNaN(e.deltaX)?-1*e.wheelDeltaX:e.deltaX;e.deltaMode===1&&(o+=o*this.browserLineHeight,t+=t*this.browserLineHeight);const i=this.scrollVertically(t),s=this.scrollHorizontally(o);return i||s}scrollVertically(e){const t=this.scrollableElement.scrollTop;return this.scrollableElement.scrollTop+=e,t!==this.scrollableElement.scrollTop}scrollHorizontally(e){const t=this.scrollableElement.scrollLeft;return this.scrollableElement.scrollLeft+=e,t!==this.scrollableElement.scrollLeft}syncScrollPositions(){if(this.destroyed)return;const e=this.topOverlay.clone.wtTable.holder,t=this.inlineStartOverlay.clone.wtTable.holder,o=this.wtSettings.getSetting("preventOverflow");let i=this.scrollableElement.scrollLeft,s=this.scrollableElement.scrollTop;if(this.wot.wtViewport.isHorizontallyScrollableByWindow()&&(typeof o=="boolean"&&o||o!=="horizontal")&&(i=this.scrollableElement.scrollX),this.wot.wtViewport.isVerticallyScrollableByWindow()&&(typeof o=="boolean"&&o||o!=="vertical")&&(s=this.scrollableElement.scrollY),this.horizontalScrolling=this.lastScrollX!==i,this.verticalScrolling=this.lastScrollY!==s,this.lastScrollX=i,this.lastScrollY=s,Un(this,Th).tryActivate(this.verticalScrolling,this.horizontalScrolling),this.horizontalScrolling){e.scrollLeft=i;const r=this.bottomOverlay.needFullRender?this.bottomOverlay.clone.wtTable.holder:null;r&&(r.scrollLeft=i)}this.verticalScrolling&&(t.scrollTop=s),this.refreshAll(),Un(this,Th).syncOffsets()}syncScrollWithMaster(){if(!Un(this,Mf))return;const e=this.topOverlay.mainTableScrollableElement,{scrollLeft:t,scrollTop:o}=e;this.topOverlay.needFullRender&&(this.topOverlay.clone.wtTable.holder.scrollLeft=t),this.bottomOverlay.needFullRender&&(this.bottomOverlay.clone.wtTable.holder.scrollLeft=t),this.inlineStartOverlay.needFullRender&&(this.inlineStartOverlay.clone.wtTable.holder.scrollTop=o),Gn(this,Mf,!1)}updateMainScrollableElements(){this.eventManager.clearEvents(!0),this.inlineStartOverlay.updateMainScrollableElement(),this.topOverlay.updateMainScrollableElement(),this.bottomOverlay.needFullRender&&this.bottomOverlay.updateMainScrollableElement();const{wtTable:e}=this,{rootWindow:t}=this.domBindings,o=t.getComputedStyle(e.wtRootElement.parentNode).getPropertyValue("overflow");o==="hidden"||o==="clip"?this.scrollableElement=e.holder:this.scrollableElement=SC(e.TABLE),this.registerListeners()}destroy(){Un(this,dw).cancel(),Un(this,bl)!==null&&(clearTimeout(Un(this,bl)),Gn(this,bl,null)),this.resizeObserver.disconnect(),Un(this,Th).destroy(),this.eventManager.destroy(),this.topOverlay.destroy(),this.bottomOverlay.clone&&this.bottomOverlay.destroy(),this.inlineStartOverlay.destroy(),this.topInlineStartCornerOverlay&&this.topInlineStartCornerOverlay.destroy(),this.bottomInlineStartCornerOverlay&&this.bottomInlineStartCornerOverlay.clone&&this.bottomInlineStartCornerOverlay.destroy(),this.destroyed=!0}refresh(e=!1){this.verticalScrolling||this.horizontalScrolling?Un(this,dw).call(this):xf(this,lS,EH).call(this),this.bottomOverlay.clone&&this.bottomOverlay.refresh(e),this.inlineStartOverlay.refresh(e),this.topOverlay.refresh(e),this.topInlineStartCornerOverlay&&this.topInlineStartCornerOverlay.refresh(e),this.bottomInlineStartCornerOverlay&&this.bottomInlineStartCornerOverlay.clone&&this.bottomInlineStartCornerOverlay.refresh(e)}updateLastSpreaderSize(){const e=this.wtTable.spreader,t=e.clientWidth,o=e.clientHeight,i=t!==this.spreaderLastSize.width||o!==this.spreaderLastSize.height;return i&&(this.spreaderLastSize.width=t,this.spreaderLastSize.height=o),i}adjustElementsSize(){const{wtViewport:e}=this.wot,{wtTable:t}=this,{rootWindow:o}=this.domBindings,i=this.scrollableElement===o,s=this.wtSettings.getSetting("totalColumns"),r=this.wtSettings.getSetting("totalRows"),a=e.getRowHeaderWidth(),l=e.getColumnHeaderHeight(),h=this.wtSettings.getSetting("externalRowCalculator")?0:1,c=l+this.topOverlay.sumCellSizes(0,r)+h,d=a+this.inlineStartOverlay.sumCellSizes(0,s),f=t.hider.style,p=()=>i?!1:this.scrollableElement.scrollTop>Math.max(0,c-t.holder.clientHeight),C=()=>i?!1:this.scrollableElement.scrollLeft>Math.max(0,d-t.holder.clientWidth),_=p()?1:0,S=C()?1:0;f.width=`${d+S}px`,f.height=`${c+_}px`,this.topOverlay.adjustElementsSize(),this.inlineStartOverlay.adjustElementsSize(),this.bottomOverlay.adjustElementsSize()}expandHiderVerticallyBy(e){const{wtTable:t}=this;t.hider.style.height=`${parseInt(t.hider.style.height,10)+e}px`}expandHiderHorizontallyBy(e){const{wtTable:t}=this;t.hider.style.width=`${parseInt(t.hider.style.width,10)+e}px`}applyToDOM(){this.wtTable.isVisible()&&(this.topOverlay.applyToDOM(),this.bottomOverlay.clone&&this.bottomOverlay.applyToDOM(),this.inlineStartOverlay.applyToDOM(),Un(this,Th).syncOffsets())}getParentOverlay(e){if(!e)return null;const t=[this.topOverlay,this.inlineStartOverlay,this.bottomOverlay,this.topInlineStartCornerOverlay,this.bottomInlineStartCornerOverlay];let o=null;return O(t,i=>{i&&i.clone&&i.clone.wtTable.TABLE.contains(e)&&(o=i.clone)}),o}syncOverlayTableClassNames(){const e=this.wtTable.TABLE,t=[this.topOverlay,this.inlineStartOverlay,this.bottomOverlay,this.topInlineStartCornerOverlay,this.bottomInlineStartCornerOverlay];O(t,o=>{o&&(o.clone.wtTable.TABLE.className=e.className)})}constructor(e,t,o,i,s,r){cw(this,SH),cw(this,vH),cw(this,RH),cw(this,lS),wl(this,Eh,{writable:!0,value:void 0}),wl(this,Mf,{writable:!0,value:void 0}),wl(this,Xp,{writable:!0,value:void 0}),wl(this,Zp,{writable:!0,value:void 0}),wl(this,kh,{writable:!0,value:void 0}),wl(this,bl,{writable:!0,value:void 0}),wl(this,dw,{writable:!0,value:void 0}),wl(this,Th,{writable:!0,value:void 0}),this.wot=null,Gn(this,Eh,[]),this.topOverlay=null,this.bottomOverlay=null,this.inlineStartOverlay=null,this.topInlineStartCornerOverlay=null,this.bottomInlineStartCornerOverlay=null,this.browserLineHeight=void 0,this.wtSettings=null,Gn(this,Mf,!1),Gn(this,Xp,null),Gn(this,Zp,null),Gn(this,kh,0),Gn(this,bl,null),Gn(this,dw,Im(xf(this,lS,EH).bind(this),200)),Gn(this,Th,new N9(this)),this.resizeObserver=new ResizeObserver(d=>{yC(()=>{!Array.isArray(d)||!d.length||(Gn(this,kh,Un(this,kh)+1),Un(this,kh)===300&&(Ie("The ResizeObserver callback was fired too many times in direct succession.\nThis may be due to an infinite loop caused by setting a dynamic height/width (for example, with the `dvh` units) to a Handsontable container's parent. \nThe observer will be disconnected."),this.resizeObserver.disconnect()),Un(this,bl)!==null&&clearTimeout(Un(this,bl)),Gn(this,bl,setTimeout(()=>{Gn(this,kh,0)},100)),this.wtSettings.getSetting("onContainerElementResize"))})}),this.wot=e,this.wtSettings=i,this.domBindings=o,this.facadeGetter=t,this.wtTable=r;const{rootDocument:a,rootWindow:l}=this.domBindings;this.instance=this.wot,this.eventManager=s,this.scrollbarSize=xn(a);const h=l.getComputedStyle(r.wtRootElement.parentNode).getPropertyValue("overflow"),c=h==="hidden"||h==="clip";this.scrollableElement=c?r.holder:SC(r.TABLE),this.initOverlays(),xf(this,SH,V9).call(this),this.destroyed=!1,this.keyPressed=!1,this.spreaderLastSize={width:null,height:null},this.verticalScrolling=!1,this.horizontalScrolling=!1,this.initBrowserLineHeight(),this.registerListeners(),this.lastScrollX=l.scrollX,this.lastScrollY=l.scrollY}}function V9(){Gn(this,Xp,this.topOverlay.getScrollPosition()),Gn(this,Zp,this.inlineStartOverlay.getScrollPosition())}function z9(){const n=this.topOverlay.getScrollPosition();return Un(this,Xp)===n?!1:(Gn(this,Xp,n),!0)}function U9(){const n=this.inlineStartOverlay.getScrollPosition();return Un(this,Zp)===n?!1:(Gn(this,Zp,n),!0)}function EH(){if(this.destroyed)return;this.updateLastSpreaderSize()&&this.adjustElementsSize()}class Y9{getDefaults(){return{facade:void 0,table:void 0,isDataViewInstance:!0,externalRowCalculator:!1,currentRowClassName:null,currentColumnClassName:null,preventOverflow(){return!1},preventWheel:!1,data:void 0,fixedColumnsStart:0,fixedRowsTop:0,fixedRowsBottom:0,shouldRenderInlineStartOverlay:()=>this.getSetting("fixedColumnsStart")>0||this.getSetting("rowHeaders").length>0,shouldRenderTopOverlay:()=>this.getSetting("fixedRowsTop")>0||this.getSetting("columnHeaders").length>0,shouldRenderBottomOverlay:()=>this.getSetting("fixedRowsBottom")>0,minSpareRows:0,rowHeaders(){return[]},columnHeaders(){return[]},totalRows:void 0,totalColumns:void 0,cellRenderer:(e,t,o)=>{const i=this.getSetting("data",e,t);ph(o,i??"")},columnWidth(){},rowHeight(){},rowHeightByOverlayName(){},defaultColumnWidth:50,selections:null,hideBorderOnMouseDownOver:!1,viewportRowCalculatorOverride:null,viewportColumnCalculatorOverride:null,viewportRowRenderingThreshold:null,viewportColumnRenderingThreshold:null,onCellMouseDown:null,onCellContextMenu:null,onCellMouseOver:null,onCellMouseOut:null,onCellMouseUp:null,onCellDblClick:null,onCellCornerMouseDown:null,onCellCornerDblClick:null,beforeDraw:null,onDraw:null,onBeforeRemoveCellClassNames:null,onAfterDrawSelection:null,onBeforeDrawBorders:null,onBeforeViewportScrollHorizontally:e=>e,onBeforeViewportScrollVertically:e=>e,onScrollHorizontally:null,onScrollVertically:null,onBeforeTouchScroll:null,onAfterMomentumScroll:null,onModifyRowHeaderWidth:null,onModifyGetCellCoords:null,onModifyGetCoordsElement:null,onModifyGetCoords:null,onBeforeHighlightingRowHeader:e=>e,onBeforeHighlightingColumnHeader:e=>e,onWindowResize:null,onContainerElementResize:null,renderAllColumns:!1,renderAllRows:!1,groups:!1,rowHeaderWidth:null,columnHeaderHeight:null,headerClassName:null,rtlMode:!1,ariaTags:!0,stylesHandler:null}}update(e,t){return t===void 0?tt(e,(o,i)=>{this.settings[i]=o}):this.settings[e]=t,this}getSetting(e,t,o,i,s){return typeof this.settings[e]=="function"?this.settings[e](t,o,i,s):t!==void 0&&Array.isArray(this.settings[e])?this.settings[e][t]:this.settings[e]}getSettingPure(e){return this.settings[e]}has(e){return!!this.settings[e]}constructor(e){this.settings={},this.defaults=Object.freeze(this.getDefaults()),tt(this.defaults,(t,o)=>{e[o]!==void 0?this.settings[o]=e[o]:t===void 0?U(`A required setting "${o}" was not provided`):this.settings[o]=t})}}class uk extends cf{alignOverlaysWithTrimmingContainer(){const e=jp(this.wtRootElement),{rootWindow:t}=this.domBindings;if(e===t)this.wtSettings.getSetting("preventOverflow")||(this.holder.style.overflow="visible",this.wtRootElement.style.overflow="visible");else{const o=e.parentElement,i=vC(e,"height",t),s=vC(e,"overflow",t),r=this.holder.style,{scrollWidth:a,scrollHeight:l}=e;let h=e.offsetWidth,c=e.offsetHeight;if(o&&["auto","hidden","scroll","clip"].includes(s)){const u=e.cloneNode(!1);u.style.overflow="auto",u.style.position="absolute",e.nextElementSibling?o.insertBefore(u,e.nextElementSibling):o.appendChild(u);const f=parseInt(t.getComputedStyle(u).height,10);o.removeChild(u),f===0&&(c=0)}c=Math.min(c,l),r.height=i==="auto"?"auto":`${c}px`,h=Math.min(h,a),r.width=`${h}px`,r.overflow="",this.hasTableHeight=r.height==="auto"?!0:c>0,this.hasTableWidth=h>0}this.isTableVisible=zc(this.TABLE)}markOversizedColumnHeaders(){const{wtSettings:e}=this,{wtViewport:t}=this.dataAccessObject,o="master",s=e.getSetting("columnHeaders").length;if(s&&!t.hasOversizedColumnHeadersMarked[o]){const a=e.getSetting("rowHeaders").length,l=this.getRenderedColumnsCount();for(let h=0;h<s;h++)for(let c=-1*a;c<l;c++)this.markIfOversizedColumnHeader(c);t.hasOversizedColumnHeadersMarked[o]=!0}}constructor(e,t,o,i){super(e,t,o,i,"master")}}Ct(uk,ik);Ct(uk,Py);function G9(n,e){if(e.has(n))throw new TypeError("Cannot initialize the same private elements twice on an object")}function j9(n,e){return e.get?e.get.call(n):e.value}function q9(n,e,t){if(e.set)e.set.call(n,t);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=t}}function oB(n,e,t){if(!e.has(n))throw new TypeError("attempted to "+t+" private field on non-instance");return e.get(n)}function uw(n,e){var t=oB(n,e,"get");return j9(n,t)}function hS(n,e,t){G9(n,e),e.set(n,t)}function cS(n,e,t){var o=oB(n,e,"set");return q9(n,o,t),t}var fw=new WeakMap,dS=new WeakMap,uS=new WeakMap;class kH{build(){const e=uw(this,fw).call(this),t=uw(this,dS),o=uw(this,uS).call(this);this.totalItems=e,this.prefixSum=new Float64Array(e+1),this.prefixSum[0]=0;for(let i=0;i<e;i++){const s=t(i);this.prefixSum[i+1]=this.prefixSum[i]+(isNaN(s)?o:s)}}getOffset(e){return!this.prefixSum||e<=0?0:e>=this.totalItems?this.prefixSum[this.totalItems]:this.prefixSum[e]}findIndexAtOffset(e){if(!this.isBuilt()||e<=0||this.totalItems===0)return 0;let t=0,o=this.totalItems;for(;t<o;){const i=t+o>>>1;this.prefixSum[i+1]<=e?t=i+1:o=i}return Math.min(t,this.totalItems-1)}getSizeAt(e){return!this.prefixSum||e<0||e>=this.totalItems?0:this.prefixSum[e+1]-this.prefixSum[e]}ensureBuilt(){(!this.isBuilt()||this.totalItems!==uw(this,fw).call(this))&&this.build()}getTotalSize(){return this.prefixSum?this.prefixSum[this.totalItems]:0}invalidate(){this.prefixSum=null,this.totalItems=0}isBuilt(){return this.prefixSum!==null}constructor({totalItemsFn:e,sizeFn:t,defaultSizeFn:o}){hS(this,fw,{writable:!0,value:void 0}),hS(this,dS,{writable:!0,value:void 0}),hS(this,uS,{writable:!0,value:void 0}),this.prefixSum=null,this.totalItems=0,cS(this,fw,e),cS(this,dS,t),cS(this,uS,o)}}class K9{getWorkspaceHeight(){const e=this.domBindings.rootDocument,t=this.dataAccessObject.topOverlayTrimmingContainer;let o=0;return t===this.domBindings.rootWindow?o=e.documentElement.clientHeight:o=Tn(t)>0&&t.clientHeight>0?t.clientHeight:1/0,o}getViewportHeight(){let e=this.getWorkspaceHeight();if(e===1/0)return e;const t=this.getColumnHeaderHeight();return t>0&&(e-=t),e}getWorkspaceWidth(){const{rootDocument:e,rootWindow:t}=this.domBindings,o=this.dataAccessObject.inlineStartOverlayTrimmingContainer;let i;if(o===t){const s=this.wtSettings.getSetting("totalColumns");i=this.wtTable.holder.offsetWidth,this.getRowHeaderWidth()+this.sumColumnWidths(0,s)>i&&(i=e.documentElement.clientWidth)}else i=o.clientWidth;return i}getViewportWidth(){const e=this.getWorkspaceWidth();if(e===1/0)return e;const t=this.getRowHeaderWidth();return t>0?e-t:e}hasVerticalScroll(){if(this.isVerticallyScrollableByWindow()){const s=this.domBindings.rootDocument.documentElement;return s.scrollHeight>s.clientHeight}const{holder:e,hider:t}=this.wtTable,o=e.clientHeight,i=t.offsetHeight;return o<i?!0:i>this.getWorkspaceHeight()}hasHorizontalScroll(){if(this.isVerticallyScrollableByWindow()){const i=this.domBindings.rootDocument.documentElement;return i.scrollWidth>i.clientWidth}const{hider:e}=this.wtTable,t=e.offsetWidth,o=this.hasVerticalScroll()?xn():0;return t>this.getWorkspaceWidth()-o}isVerticallyScrollableByWindow(){return this.dataAccessObject.topOverlayTrimmingContainer===this.domBindings.rootWindow}isHorizontallyScrollableByWindow(){return this.dataAccessObject.inlineStartOverlayTrimmingContainer===this.domBindings.rootWindow}sumColumnWidths(e,t){let o=0,i=e;for(;i<t;)o+=this.wtTable.getColumnWidth(i),i+=1;return o}getWorkspaceOffset(){return Ko(this.wtTable.holder)}getColumnHeaderHeight(){return this.wtSettings.getSetting("columnHeaders").length?isNaN(this.columnHeaderHeight)&&(this.columnHeaderHeight=Tn(this.wtTable.THEAD)):this.columnHeaderHeight=0,this.columnHeaderHeight}getRowHeaderWidth(){const e=this.wtSettings.getSetting("rowHeaderWidth"),t=this.wtSettings.getSetting("rowHeaders");if(e){this.rowHeaderWidth=0;for(let o=0,i=t.length;o<i;o++)this.rowHeaderWidth+=e[o]||e}if(isNaN(this.rowHeaderWidth))if(t.length){let o=this.wtTable.TABLE.querySelector("TH");this.rowHeaderWidth=0;for(let i=0,s=t.length;i<s;i++)o?(this.rowHeaderWidth+=bn(o),o=o.nextSibling):this.rowHeaderWidth+=50}else this.rowHeaderWidth=0;return this.rowHeaderWidth=this.wtSettings.getSetting("onModifyRowHeaderWidth",this.rowHeaderWidth)||this.rowHeaderWidth,this.rowHeaderWidth}createRowsCalculator(e=["rendered","fullyVisible","partiallyVisible"]){const{wtSettings:t,wtTable:o}=this,i=t.getSetting("totalRows");let s=this.getViewportHeight(),r,a;this.rowHeaderWidth=NaN;let l=this.dataAccessObject.topScrollPosition-this.dataAccessObject.topParentOffset;const h=t.getSetting("fixedRowsTop"),c=t.getSetting("fixedRowsBottom");return h&&l>=0&&(a=this.dataAccessObject.topOverlay.sumCellSizes(0,h),l+=a,s-=a),c&&this.dataAccessObject.bottomOverlay.clone&&(a=this.dataAccessObject.bottomOverlay.sumCellSizes(i-c,i),s-=a),o.holder.clientHeight===o.holder.offsetHeight?r=0:r=xn(this.domBindings.rootDocument),new g5({calculationTypes:e.map(d=>[d,this.rowsCalculatorTypes.get(d)()]),viewportHeight:s,scrollOffset:l,totalRows:i,overrideFn:t.getSettingPure("viewportRowCalculatorOverride"),horizontalScrollbarHeight:r,rowHeightCache:this.rowHeightCache})}createColumnsCalculator(e=["rendered","fullyVisible","partiallyVisible"]){const{wtSettings:t,wtTable:o}=this,i=t.getSetting("totalColumns");let s=this.getViewportWidth(),r=Math.abs(this.dataAccessObject.inlineStartScrollPosition)-this.dataAccessObject.inlineStartParentOffset;this.columnHeaderHeight=NaN;const a=t.getSetting("fixedColumnsStart");if(a&&r>=0){const l=this.dataAccessObject.inlineStartOverlay.sumCellSizes(0,a);r+=l,s-=l}return o.holder.clientWidth!==o.holder.offsetWidth&&(s-=xn(this.domBindings.rootDocument)),new f5({calculationTypes:e.map(l=>[l,this.columnsCalculatorTypes.get(l)()]),viewportWidth:s,scrollOffset:r,totalColumns:i,overrideFn:t.getSettingPure("viewportColumnCalculatorOverride"),inlineStartOffset:this.dataAccessObject.inlineStartParentOffset,columnWidthCache:this.columnWidthCache})}createCalculators(e=!1){const{wtSettings:t}=this,o=this.createRowsCalculator(),i=this.createColumnsCalculator();if(e&&!t.getSetting("renderAllRows")){const s=o.getResultsFor("fullyVisible"),r=o.getResultsFor("partiallyVisible");e=this.areAllProposedVisibleRowsAlreadyRendered(s,r)}if(e&&!t.getSetting("renderAllColumns")){const s=i.getResultsFor("fullyVisible"),r=i.getResultsFor("partiallyVisible");e=this.areAllProposedVisibleColumnsAlreadyRendered(s,r)}return e||(this.rowsRenderCalculator=o.getResultsFor("rendered"),this.columnsRenderCalculator=i.getResultsFor("rendered")),this.rowsVisibleCalculator=o.getResultsFor("fullyVisible"),this.columnsVisibleCalculator=i.getResultsFor("fullyVisible"),this.rowsPartiallyVisibleCalculator=o.getResultsFor("partiallyVisible"),this.columnsPartiallyVisibleCalculator=i.getResultsFor("partiallyVisible"),e}createVisibleCalculators(){const e=this.createRowsCalculator(["fullyVisible","partiallyVisible"]),t=this.createColumnsCalculator(["fullyVisible","partiallyVisible"]);this.rowsVisibleCalculator=e.getResultsFor("fullyVisible"),this.columnsVisibleCalculator=t.getResultsFor("fullyVisible"),this.rowsPartiallyVisibleCalculator=e.getResultsFor("partiallyVisible"),this.columnsPartiallyVisibleCalculator=t.getResultsFor("partiallyVisible")}areAllProposedVisibleRowsAlreadyRendered(e,t){if(!this.rowsVisibleCalculator)return!1;let{startRow:o,endRow:i}=e;const{startRow:s,endRow:r}=t;if(o===null&&i===null){if(!e.isVisibleInTrimmingContainer&&!this.wtTable.isRowBeforeRenderedRows(s)&&!this.wtTable.isRowAfterRenderedRows(r))return!0;o=s,i=r}const{startRow:a,endRow:l,rowStartOffset:h,rowEndOffset:c}=this.rowsRenderCalculator,d=this.wtSettings.getSetting("totalRows")-1,u=this.wtSettings.getSetting("viewportRowRenderingThreshold");return Number.isInteger(u)&&u>0?(o=Math.max(0,o-Math.min(h,u)),i=Math.min(d,i+Math.min(c,u))):u==="auto"&&(o=Math.max(0,o-Math.ceil(h/2)),i=Math.min(d,i+Math.ceil(c/2))),o<a||o===a&&o>0?!1:!(i>l||i===l&&i<d)}areAllProposedVisibleColumnsAlreadyRendered(e,t){if(!this.columnsVisibleCalculator)return!1;let{startColumn:o,endColumn:i}=e;const{startColumn:s,endColumn:r}=t;if(o===null&&i===null){if(!e.isVisibleInTrimmingContainer&&!this.wtTable.isColumnBeforeRenderedColumns(s)&&!this.wtTable.isColumnAfterRenderedColumns(r))return!0;o=s,i=r}const{startColumn:a,endColumn:l,columnStartOffset:h,columnEndOffset:c}=this.columnsRenderCalculator,d=this.wtSettings.getSetting("totalColumns")-1,u=this.wtSettings.getSetting("viewportColumnRenderingThreshold");return Number.isInteger(u)&&u>0?(o=Math.max(0,o-Math.min(h,u)),i=Math.min(d,i+Math.min(c,u))):u==="auto"&&(o=Math.max(0,o-Math.ceil(h/2)),i=Math.min(d,i+Math.ceil(c/2))),o<a||o===a&&o>0?!1:!(i>l||i===l&&i<d)}invalidateRowHeightCache(){this.rowHeightCache.invalidate()}invalidateColumnWidthCache(){this.columnWidthCache.invalidate()}invalidateAllCaches(){this.rowHeightCache.invalidate(),this.columnWidthCache.invalidate()}resetHasOversizedColumnHeadersMarked(){tt(this.hasOversizedColumnHeadersMarked,(e,t,o)=>{o[t]=void 0})}constructor(e,t,o,i,s){this.dataAccessObject=e,this.wot=e.wot,this.instance=this.wot,this.domBindings=t,this.wtSettings=o,this.wtTable=s,this.oversizedRows=[],this.oversizedColumnHeaders=[],this.hasOversizedColumnHeadersMarked={},this.clientHeight=0,this.rowHeaderWidth=NaN,this.rowsVisibleCalculator=null,this.columnsVisibleCalculator=null,this.rowsCalculatorTypes=new Map([["rendered",()=>this.wtSettings.getSetting("renderAllRows")?new c5:new u5],["fullyVisible",()=>new l5],["partiallyVisible",()=>new HF]]),this.columnsCalculatorTypes=new Map([["rendered",()=>this.wtSettings.getSetting("renderAllColumns")?new h5:new d5],["fullyVisible",()=>new a5],["partiallyVisible",()=>new IF]]),this.rowHeightCache=new kH({totalItemsFn:()=>o.getSetting("totalRows"),sizeFn:r=>s.getRowHeight(r),defaultSizeFn:()=>o.getSetting("stylesHandler").getDefaultRowHeight()}),this.columnWidthCache=new kH({totalItemsFn:()=>o.getSetting("totalColumns"),sizeFn:r=>s.getColumnWidth(r),defaultSizeFn:()=>Zu}),this.eventManager=i,this.eventManager.addEventListener(this.domBindings.rootWindow,"resize",()=>{this.clientHeight=this.getWorkspaceHeight()})}}class X9 extends nk{exportSettingsAsClassNames(){const e={rowHeaders:"htRowHeaders",columnHeaders:"htColumnHeaders"},t=[],o=[];tt(e,(i,s)=>{this.wtSettings.getSetting(s).length&&o.push(i),t.push(i)}),oe(this.wtTable.wtRootElement.parentNode,t),B(this.wtTable.wtRootElement.parentNode,o)}getOverlayByName(e){if(!GF.includes(e))return null;const t=e.replace(/_([a-z])/g,o=>o[1].toUpperCase());return this.wtOverlays[`${t}Overlay`]??null}getViewportDao(){const e=this;return{get wot(){return e},get topOverlayTrimmingContainer(){return e.wtOverlays.topOverlay.trimmingContainer},get inlineStartOverlayTrimmingContainer(){return e.wtOverlays.inlineStartOverlay.trimmingContainer},get topScrollPosition(){return e.wtOverlays.topOverlay.getScrollPosition()},get topParentOffset(){return e.wtOverlays.topOverlay.getTableParentOffset()},get inlineStartScrollPosition(){return e.wtOverlays.inlineStartOverlay.getScrollPosition()},get inlineStartParentOffset(){return e.wtOverlays.inlineStartOverlay.getTableParentOffset()},get topOverlay(){return e.wtOverlays.topOverlay},get inlineStartOverlay(){return e.wtOverlays.inlineStartOverlay},get bottomOverlay(){return e.wtOverlays.bottomOverlay}}}constructor(e,t){super(e,new Y9(t));const o=this.wtSettings.getSetting("facade",this);this.wtTable=new uk(this.getTableDao(),o,this.domBindings,this.wtSettings),this.wtViewport=new K9(this.getViewportDao(),this.domBindings,this.wtSettings,this.eventManager,this.wtTable),this.selectionManager=new T9(this.wtSettings.getSetting("selections")),this.wtEvent=new WF(o,this.domBindings,this.wtSettings,this.eventManager,this.wtTable,this.selectionManager),this.wtOverlays=new B9(this,o,this.domBindings,this.wtSettings,this.eventManager,this.wtTable),this.exportSettingsAsClassNames(),this.findOriginalHeaders()}}class fk{_initFromSettings(e){e.facade=t=>{const o=new fk(t);return()=>o},this._wot=new X9(e.table,e)}get guid(){return this._wot.guid}get rootDocument(){return this._wot.domBindings.rootDocument}get rootWindow(){return this._wot.domBindings.rootWindow}get wtSettings(){return this._wot.wtSettings}get cloneSource(){return this._wot.cloneSource}get cloneOverlay(){return this._wot.cloneOverlay}get selectionManager(){return this._wot.selectionManager}get wtViewport(){return this._wot.wtViewport}get wtOverlays(){return this._wot.wtOverlays}get wtTable(){return this._wot.wtTable}get wtEvent(){return this._wot.wtEvent}get wtScroll(){return this._wot.wtScroll}get drawn(){return this._wot.drawn}set drawn(e){this._wot.drawn=e}get activeOverlayName(){return this._wot.activeOverlayName}get drawInterrupted(){return this._wot.drawInterrupted}set drawInterrupted(e){this._wot.drawInterrupted=e}get lastMouseOver(){return this._wot.lastMouseOver}set lastMouseOver(e){this._wot.lastMouseOver=e}get momentumScrolling(){return this._wot.momentumScrolling}set momentumScrolling(e){this._wot.momentumScrolling=e}get touchApplied(){return this._wot.touchApplied}set touchApplied(e){this._wot.touchApplied=e}get domBindings(){return this._wot.domBindings}get eventListeners(){return this._wot.eventListeners}set eventListeners(e){this._wot.eventListeners=e}get eventManager(){return this._wot.eventManager}createCellCoords(e,t){return this._wot.createCellCoords(e,t)}createCellRange(e,t,o){return this._wot.createCellRange(e,t,o)}draw(e=!1){return this._wot.draw(e),this}getCell(e,t=!1){return this._wot.getCell(e,t)}scrollViewport(e,t,o){return this._wot.scrollViewport(e,t,o)}scrollViewportHorizontally(e,t){return this._wot.scrollViewportHorizontally(e,t)}scrollViewportVertically(e,t){return this._wot.scrollViewportVertically(e,t)}getViewport(){return this._wot.getViewport()}getOverlayName(){return this._wot.cloneOverlay?this._wot.cloneOverlay.type:"master"}getOverlayByName(e){return this._wot.getOverlayByName(e)}exportSettingsAsClassNames(){return this._wot.exportSettingsAsClassNames()}update(e,t){return this._wot.wtSettings.update(e,t),this}getSetting(e,t,o,i,s){return this._wot.wtSettings.getSetting(e,t,o,i,s)}hasSetting(e){return this._wot.wtSettings.hasSetting(e)}destroy(){this._wot.destroy()}constructor(e){e instanceof nk?this._wot=e:this._initFromSettings(e)}}function TH({isShiftKey:n,isLeftClick:e,isRightClick:t,coords:o,selection:i,controller:s,cellCoordsFactory:r}){const a=i.isSelected()?i.getSelectedRange().current():null,l=i.isSelectedByCorner(),h=i.isSelectedByRowHeader();if(i.markSource("mouse"),n&&a)o.row>=0&&o.col>=0&&!s.cell?i.setRangeEnd(o):(l||h)&&o.row>=0&&o.col>=0&&!s.cell?i.setRangeEnd(r(o.row,o.col)):l&&o.row<0&&!s.column?i.setRangeEnd(r(a.to.row,o.col)):h&&o.col<0&&!s.row?i.setRangeEnd(r(o.row,a.to.col)):(!l&&!h&&o.col<0||l&&o.col<0)&&!s.row?i.selectRows(Math.max(a.from.row,0),o.row,o.col):(!l&&!h&&o.row<0||h&&o.row<0)&&!s.column&&i.selectColumns(Math.max(a.from.col,0),o.col,o.row);else{const c=!i.inInSelection(o),d=e||t&&c;o.row<0&&o.col>=0&&!s.column?d&&i.selectColumns(o.col,o.col,o.row):o.col<0&&o.row>=0&&!s.row?d&&i.selectRows(o.row,o.row,o.col):o.col>=0&&o.row>=0&&!s.cell?d&&i.setRangeStart(o):o.col<0&&o.row<0&&i.selectAll(!0,!0,{disableHeadersHighlight:!0,focusPosition:{row:0,col:0}})}i.markEndSource()}function Z9({isLeftClick:n,coords:e,selection:t,controller:o,cellCoordsFactory:i}){if(!n)return;const s=t.isSelectedByRowHeader(),r=t.isSelectedByColumnHeader(),a=t.tableProps.countCols(),l=t.tableProps.countRows();t.markSource("mouse"),r&&!o.column?t.setRangeEnd(i(l-1,e.col)):s&&!o.row?t.setRangeEnd(i(e.row,a-1)):o.cell||t.setRangeEnd(e),t.markEndSource()}function xH({isLeftClick:n,selection:e,cellRangeMapper:t}){if(!n||e.settings.selectionMode!=="multiple")return;const o=e.getSelectedRange(),i=o.clone().map(r=>t.toRenderable(r)),s=i.current();if(i.size()>1&&!s.isHeader()&&!e.isMultiple(s)){const r=i.findAll(s);r.length===i.size()?(e.markSource("deselect"),o.pop(),e.refresh(),e.markEndSource()):r.length>1&&(e.markSource("deselect"),o.removeLayers(r.map(({layer:a})=>a)),e.refresh(),e.markEndSource())}}const Q9=new Map([["touchstart",TH],["touchend",xH],["mousedown",TH],["mouseover",Z9],["mouseup",xH]]);function fS(n,e){Q9.get(n.type)({isShiftKey:n.shiftKey,isLeftClick:Z0(n)||n.type==="touchstart",isRightClick:Uc(n),...e})}const iB=new WeakMap,gk=Symbol("rootInstance");function J9(n){iB.set(n,!0)}function e7(n){return n===gk}function Qs(n){return iB.has(n)}function sB(n,e){if(e.has(n))throw new TypeError("Cannot initialize the same private elements twice on an object")}function t7(n,e){return e.get?e.get.call(n):e.value}function n7(n,e,t){if(e.set)e.set.call(n,t);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=t}}function rB(n,e,t){if(!e.has(n))throw new TypeError("attempted to "+t+" private field on non-instance");return e.get(n)}function rn(n,e){var t=rB(n,e,"get");return t7(n,t)}function Sr(n,e,t){sB(n,e),e.set(n,t)}function Ut(n,e,t){var o=rB(n,e,"set");return n7(n,o,t),t}function Fl(n,e,t){if(!e.has(n))throw new TypeError("attempted to get private field on non-instance");return t}function gw(n,e){sB(n,e),e.add(n)}var pw=new WeakMap,If=new WeakMap,Hf=new WeakMap,ga=new WeakMap,As=new WeakMap,mw=new WeakMap,ww=new WeakMap,xh=new WeakMap,jg=new WeakMap,pd=new WeakMap,Af=new WeakSet,vE=new WeakSet,MH=new WeakSet,IH=new WeakSet;class o7{render(){if(!this.hot.isRenderSuspended()){const e=this.hot.forceFullRender;this.hot.runHooks("beforeRender",e),this._wt.draw(!e),Fl(this,IH,s7).call(this),this.postponedAdjustElementsSize&&(this.postponedAdjustElementsSize=!1,this.adjustElementsSize(!0)),this.hot.runHooks("afterRender",e),this.hot.forceFullRender=!1}}adjustElementsSize(e=!1){e?this._wt.wtOverlays.adjustElementsSize():this.postponedAdjustElementsSize=!0}getCellAtCoords(e,t){const o=this._wt.getCell(e,t);return o<0?null:o}scrollViewport(e,t,o){return this._wt.scrollViewport(e,t,o)}scrollViewportHorizontally(e,t){return this._wt.scrollViewportHorizontally(e,t)}scrollViewportVertically(e,t){return this._wt.scrollViewportVertically(e,t)}createElements(){const{rootElement:e,rootDocument:t}=this.hot,o=e.getAttribute("style");o&&e.setAttribute("data-originalstyle",o),B(e,"handsontable"),Ut(this,As,t.createElement("TABLE")),B(rn(this,As),"htCore"),this.hot.getSettings().tableClassName&&B(rn(this,As),this.hot.getSettings().tableClassName),this.settings.ariaTags&&(fe(rn(this,As),[Ga()]),fe(e,[bG(),K$(-1),Iy(this.hot.countCols()),LG()])),this.THEAD=t.createElement("THEAD"),rn(this,As).appendChild(this.THEAD),this.TBODY=t.createElement("TBODY"),rn(this,As).appendChild(this.TBODY),this.hot.table=rn(this,As),this.hot.container.insertBefore(rn(this,As),this.hot.container.firstChild)}registerEvents(){const{rootWrapperElement:e,rootElement:t,rootDocument:o,selection:i,rootWindow:s}=this.hot,r=o.documentElement;this.eventManager.addEventListener(t,"mousedown",l=>{Fl(this,Af,bw).call(this,l)||(Ut(this,Hf,!0),this.isTextSelectionAllowed(l.target)||(zI(s),l.preventDefault(),s.focus()))}),this.eventManager.addEventListener(t,"mouseup",l=>{Fl(this,Af,bw).call(this,l)||Ut(this,Hf,!1)}),this.eventManager.addEventListener(t,"mousemove",l=>{rn(this,Hf)&&!this.isTextSelectionAllowed(l.target)&&(this.settings.fragmentSelection&&zI(s),l.preventDefault())}),this.eventManager.addEventListener(r,"keyup",l=>{i.isInProgress()&&!l.shiftKey&&i.finish()}),this.eventManager.addEventListener(r,"mouseup",l=>{if(i.isInProgress()&&Z0(l)&&i.finish(),Ut(this,ga,!1),Fl(this,Af,bw).call(this,l))return;const h=hF(o.activeElement);Nb(o.activeElement)&&!h||(h||!i.isSelected()&&!i.isSelectedByAnyHeader()&&!(e??t).contains(l.target)&&!Uc(l))&&this.hot.unlisten()}),this.eventManager.addEventListener(r,"contextmenu",l=>{i.isInProgress()&&Uc(l)&&(i.finish(),Ut(this,ga,!1))}),this.eventManager.addEventListener(r,"touchend",()=>{i.isInProgress()&&i.finish(),Ut(this,ga,!1),Ut(this,jg,!0),rn(this,pd)!==null&&clearTimeout(rn(this,pd)),Ut(this,pd,this.hot._registerTimeout(()=>{Ut(this,jg,!1),Ut(this,pd,null)},400))}),this.eventManager.addEventListener(r,"mousedown",l=>{const h=l.target,c=l.x||l.clientX,d=l.y||l.clientY;let u=l.target;if(rn(this,ga)||!t||!this.hot.view||Fl(this,Af,bw).call(this,l))return;const{holder:f}=this._wt.wtTable;if(u===f){const C=xn(o);if(o.elementFromPoint(c+C,d)!==f||o.elementFromPoint(c,d+C)!==f)return}else for(;u!==r;){if(u===null){if(l.isTargetWebComponent)break;return}if(u===t)return;u=u.parentNode}(typeof this.settings.outsideClickDeselects=="function"?this.settings.outsideClickDeselects(h):this.settings.outsideClickDeselects)?this.hot.deselectCell():this.hot.destroyEditor(!1,!1)});let a=gh(s);for(;a!==null;)this.eventManager.addEventListener(a.document.documentElement,"click",()=>{this.hot.unlisten()}),a=gh(a);this.eventManager.addEventListener(rn(this,As),"selectstart",l=>{this.settings.fragmentSelection||Nb(l.target)||l.preventDefault()})}invalidateIndexSizesCache(){this._wt.wtViewport.invalidateRowHeightCache(),this._wt.wtViewport.invalidateColumnWidthCache()}invalidateColumnWidthCache(){this._wt.wtViewport.invalidateColumnWidthCache()}invalidateRowHeightCache(){this._wt.wtViewport.invalidateRowHeightCache()}translateFromRenderableToVisualCoords({row:e,col:t}){return this.hot._createCellCoords(...this.translateFromRenderableToVisualIndex(e,t))}translateFromRenderableToVisualIndex(e,t){let o=e>=0?this.hot.rowIndexMapper.getVisualFromRenderableIndex(e):e,i=t>=0?this.hot.columnIndexMapper.getVisualFromRenderableIndex(t):t;return o===null&&(o=e),i===null&&(i=t),[o,i]}countRenderableIndexes(e,t){const o=Math.min(e.getNotTrimmedIndexesLength(),t),i=e.getNearestNotHiddenIndex(o-1,-1);return i===null?0:e.getRenderableFromVisualIndex(i)+1}countRenderableColumns(){return this.countRenderableIndexes(this.hot.columnIndexMapper,this.settings.maxCols)}countRenderableRows(){return this.countRenderableIndexes(this.hot.rowIndexMapper,this.settings.maxRows)}countNotHiddenRowIndexes(e,t){return this.countNotHiddenIndexes(e,t,this.hot.rowIndexMapper,this.countRenderableRows())}countNotHiddenColumnIndexes(e,t){return this.countNotHiddenIndexes(e,t,this.hot.columnIndexMapper,this.countRenderableColumns())}countNotHiddenIndexes(e,t,o,i){if(isNaN(e)||e<0)return 0;const s=o.getNearestNotHiddenIndex(e,t),r=o.getRenderableFromVisualIndex(s);if(!Number.isInteger(r))return 0;let a=0;return t<0?a=r+1:t>0&&(a=i-r),a}countNotHiddenFixedColumnsStart(){const e=this.hot.countCols(),t=Math.min(parseInt(this.settings.fixedColumnsStart,10),e)-1;return this.countNotHiddenColumnIndexes(t,-1)}countNotHiddenFixedRowsTop(){const e=this.hot.countRows(),t=Math.min(parseInt(this.settings.fixedRowsTop,10),e)-1;return this.countNotHiddenRowIndexes(t,-1)}countNotHiddenFixedRowsBottom(){const e=this.hot.countRows(),t=Math.max(e-parseInt(this.settings.fixedRowsBottom,10),0);return this.countNotHiddenRowIndexes(t,1)}countRenderableColumnsInRange(e,t){let o=0;for(let i=e;i<=t;i++)this.hot.columnIndexMapper.getRenderableFromVisualIndex(i)!==null&&(o+=1);return o}countRenderableRowsInRange(e,t){let o=0;for(let i=e;i<=t;i++)this.hot.rowIndexMapper.getRenderableFromVisualIndex(i)!==null&&(o+=1);return o}addClassNameToLicenseElement(e){const t=this.hot.rootElement.parentNode?.querySelector(".hot-display-license-info");t&&B(t,e)}removeClassNameFromLicenseElement(e){const t=this.hot.rootElement.parentNode?.querySelector(".hot-display-license-info");t&&oe(t,e)}isMainTableNotFullyCoveredByOverlays(){const e=this.countNotHiddenFixedRowsTop()+this.countNotHiddenFixedRowsBottom(),t=this.countNotHiddenFixedColumnsStart();return this.hot.countRenderedRows()>e&&this.hot.countRenderedCols()>t}initializeWalkontable(){const e={ariaTags:this.settings.ariaTags,rtlMode:this.hot.isRtl(),externalRowCalculator:this.hot.getPlugin("autoRowSize")&&this.hot.getPlugin("autoRowSize").isEnabled(),table:rn(this,As),isDataViewInstance:()=>Qs(this.hot),preventOverflow:()=>this.settings.preventOverflow,preventWheel:()=>this.settings.preventWheel,viewportColumnRenderingThreshold:()=>this.settings.viewportColumnRenderingThreshold,viewportRowRenderingThreshold:()=>this.settings.viewportRowRenderingThreshold,data:(s,r)=>this.hot.getDataAtCell(...this.translateFromRenderableToVisualIndex(s,r)),totalRows:()=>this.countRenderableRows(),totalColumns:()=>this.countRenderableColumns(),fixedColumnsStart:()=>this.countNotHiddenFixedColumnsStart(),fixedRowsTop:()=>this.countNotHiddenFixedRowsTop(),fixedRowsBottom:()=>this.countNotHiddenFixedRowsBottom(),shouldRenderInlineStartOverlay:()=>this.settings.fixedColumnsStart>0||e.rowHeaders().length>0,shouldRenderTopOverlay:()=>this.settings.fixedRowsTop>0||e.columnHeaders().length>0,shouldRenderBottomOverlay:()=>this.settings.fixedRowsBottom>0,minSpareRows:()=>this.settings.minSpareRows,renderAllRows:this.settings.renderAllRows,renderAllColumns:this.settings.renderAllColumns,rowHeaders:()=>{const s=[];return this.hot.hasRowHeaders()&&s.push((r,a)=>{const l=r>=0?this.hot.rowIndexMapper.getVisualFromRenderableIndex(r):r;this.appendRowHeader(l,a)}),this.hot.runHooks("afterGetRowHeaderRenderers",s),Ut(this,If,s.length),this.hot.getSettings().ariaTags&&Fl(this,vE,aB).call(this)===this.hot.countCols()&&Fl(this,MH,i7).call(this,rn(this,If)),s},columnHeaders:()=>{const s=[];return this.hot.hasColHeaders()&&s.push((r,a)=>{const l=r>=0?this.hot.columnIndexMapper.getVisualFromRenderableIndex(r):r;this.appendColHeader(l,a)}),this.hot.runHooks("afterGetColumnHeaderRenderers",s),Ut(this,pw,s.length),s},columnWidth:s=>{const r=this.hot.columnIndexMapper.getVisualFromRenderableIndex(s);return this.hot.getColWidth(r===null?s:r)},rowHeight:s=>{const r=this.hot.rowIndexMapper.getVisualFromRenderableIndex(s);return this.hot.getRowHeight(r===null?s:r)},rowHeightByOverlayName:(s,r)=>{const a=this.hot.rowIndexMapper.getVisualFromRenderableIndex(s),l=a===null?s:a;return this.hot.runHooks("modifyRowHeightByOverlayName",this.hot.getRowHeight(l),l,r)},cellRenderer:(s,r,a)=>{const[l,h]=this.translateFromRenderableToVisualIndex(s,r),c=this.hot.runHooks("modifyGetCellCoords",l,h,!1,"meta");let d=l,u=h;Array.isArray(c)&&([d,u]=c);const f=this.hot.getCellMeta(d,u),p=this.hot.colToProp(u);let C=this.hot.getDataAtRowProp(d,p);this.hot.hasHook("beforeValueRender")&&(C=this.hot.runHooks("beforeValueRender",C,f));const _=this.hot.getCellRenderer(f);let S=C;typeof f.valueFormatter=="function"?S=f.valueFormatter(S,f):typeof _.valueFormatter=="function"&&(S=_.valueFormatter.call(f,S,f)),this.hot.runHooks("beforeRenderer",a,l,h,p,C,f);const T=[this.hot,a,l,h,p,S,f];_(...T),f._isBaseRendererCalled||this.hot.getCellRenderer({renderer:"base"})(...T),this.hot.runHooks("afterRenderer",a,l,h,p,C,f),f._isBaseRendererCalled=!1},selections:this.hot.selection.highlight,hideBorderOnMouseDownOver:()=>this.settings.fragmentSelection,onWindowResize:()=>{this.hot&&!this.hot.isDestroyed&&this.hot.refreshDimensions()},onContainerElementResize:()=>{this.hot&&!this.hot.isDestroyed&&zc(this.hot.rootElement)&&this.hot.refreshDimensions()},onCellMouseDown:(s,r,a,l)=>{const h=this.translateFromRenderableToVisualCoords(r),c={row:!1,column:!1,cell:!1};this.hot.listen(),this.activeWt=l,Ut(this,ga,!0),Ut(this,xh,{x:s.clientX,y:s.clientY}),this.hot.runHooks("beforeOnCellMouseDown",s,h,a,c),!Kl(s)&&(fS(s,{coords:h,selection:this.hot.selection,controller:c,cellCoordsFactory:(d,u)=>this.hot._createCellCoords(d,u)}),this.hot.runHooks("afterOnCellMouseDown",s,h,a),this.activeWt=this._wt)},onCellContextMenu:(s,r,a,l)=>{const h=this.translateFromRenderableToVisualCoords(r);this.activeWt=l,Ut(this,ga,!1),this.hot.selection.isInProgress()&&this.hot.selection.finish(),this.hot.runHooks("beforeOnCellContextMenu",s,h,a),!Kl(s)&&(this.hot.runHooks("afterOnCellContextMenu",s,h,a),this.activeWt=this._wt)},onCellMouseOut:(s,r,a,l)=>{const h=this.translateFromRenderableToVisualCoords(r);this.activeWt=l,this.hot.runHooks("beforeOnCellMouseOut",s,h,a),!Kl(s)&&(this.hot.runHooks("afterOnCellMouseOut",s,h,a),this.activeWt=this._wt)},onCellMouseOver:(s,r,a,l)=>{const h=this.translateFromRenderableToVisualCoords(r),c={row:!1,column:!1,cell:!1};this.activeWt=l,this.hot.runHooks("beforeOnCellMouseOver",s,h,a,c),!Kl(s)&&(rn(this,ga)&&(!rn(this,xh)||rn(this,xh).x!==s.clientX||rn(this,xh).y!==s.clientY)&&fS(s,{coords:h,selection:this.hot.selection,controller:c,cellCoordsFactory:(d,u)=>this.hot._createCellCoords(d,u)}),this.hot.runHooks("afterOnCellMouseOver",s,h,a),this.activeWt=this._wt,Ut(this,xh,null))},onCellMouseUp:(s,r,a,l)=>{const h=this.translateFromRenderableToVisualCoords(r);this.activeWt=l,this.hot.runHooks("beforeOnCellMouseUp",s,h,a),!(Kl(s)||this.hot.isDestroyed)&&(fS(s,{coords:h,selection:this.hot.selection,cellRangeMapper:I4(this.hot,"cellRangeMapper")}),this.hot.runHooks("afterOnCellMouseUp",s,h,a),this.activeWt=this._wt)},onCellCornerMouseDown:s=>{s.preventDefault(),this.hot.runHooks("afterOnCellCornerMouseDown",s)},onCellCornerDblClick:s=>{s.preventDefault(),this.hot.runHooks("afterOnCellCornerDblClick",s)},beforeDraw:(s,r)=>this.beforeRender(s,r),onDraw:s=>this.afterRender(s),onBeforeViewportScrollVertically:(s,r)=>{const a=this.hot.rowIndexMapper,l=s<0;let h=s;return!l&&(h=a.getVisualFromRenderableIndex(s),h===null)?s:(h=this.hot.runHooks("beforeViewportScrollVertically",h,r),this.hot.runHooks("beforeViewportScroll"),l?h:a.getRenderableFromVisualIndex(h))},onBeforeViewportScrollHorizontally:(s,r)=>{const a=this.hot.columnIndexMapper,l=s<0;let h=s;return!l&&(h=a.getVisualFromRenderableIndex(s),h===null)?s:(h=this.hot.runHooks("beforeViewportScrollHorizontally",h,r),this.hot.runHooks("beforeViewportScroll"),l?h:a.getRenderableFromVisualIndex(h))},onScrollVertically:()=>{this.hot.runHooks("afterScrollVertically"),this.hot.runHooks("afterScroll")},onScrollHorizontally:()=>{this.hot.runHooks("afterScrollHorizontally"),this.hot.runHooks("afterScroll")},onBeforeRemoveCellClassNames:()=>this.hot.runHooks("beforeRemoveCellClassNames"),onBeforeHighlightingRowHeader:(s,r,a)=>{const l=this.hot.rowIndexMapper,h=s<0;let c=s;h||(c=l.getVisualFromRenderableIndex(s));const d=this.hot.runHooks("beforeHighlightingRowHeader",c,r,a);return h?d:l.getRenderableFromVisualIndex(l.getNearestNotHiddenIndex(d,1))},onBeforeHighlightingColumnHeader:(s,r,a)=>{const l=this.hot.columnIndexMapper,h=s<0;let c=s;h||(c=l.getVisualFromRenderableIndex(s));const d=this.hot.runHooks("beforeHighlightingColumnHeader",c,r,a);return h?d:l.getRenderableFromVisualIndex(l.getNearestNotHiddenIndex(d,1))},onAfterDrawSelection:(s,r,a)=>{let l;const[h,c]=this.translateFromRenderableToVisualIndex(s,r),d=this.hot.selection.getSelectedRange();if(d.size()>0){const f=d.peekByIndex(a??0);l=[f.from.row,f.from.col,f.to.row,f.to.col]}return this.hot.runHooks("afterDrawSelection",h,c,l,a)},onBeforeDrawBorders:(s,r)=>{const[a,l,h,c]=s,d=[this.hot.rowIndexMapper.getVisualFromRenderableIndex(a),this.hot.columnIndexMapper.getVisualFromRenderableIndex(l),this.hot.rowIndexMapper.getVisualFromRenderableIndex(h),this.hot.columnIndexMapper.getVisualFromRenderableIndex(c)];return this.hot.runHooks("beforeDrawBorders",d,r)},onBeforeTouchScroll:()=>this.hot.runHooks("beforeTouchScroll"),onAfterMomentumScroll:()=>this.hot.runHooks("afterMomentumScroll"),onModifyRowHeaderWidth:s=>this.hot.runHooks("modifyRowHeaderWidth",s),onModifyGetCellCoords:(s,r,a,l)=>{const h=this.hot.rowIndexMapper,c=this.hot.columnIndexMapper,d=r>=0?c.getVisualFromRenderableIndex(r):r,u=s>=0?h.getVisualFromRenderableIndex(s):s,f=this.hot.runHooks("modifyGetCellCoords",u,d,a,l);if(Array.isArray(f)){const[p,C,_,S]=f;return[p>=0?h.getRenderableFromVisualIndex(h.getNearestNotHiddenIndex(p,1)):p,C>=0?c.getRenderableFromVisualIndex(c.getNearestNotHiddenIndex(C,1)):C,_>=0?h.getRenderableFromVisualIndex(h.getNearestNotHiddenIndex(_,-1)):_,S>=0?c.getRenderableFromVisualIndex(c.getNearestNotHiddenIndex(S,-1)):S]}},onModifyGetCoordsElement:(s,r)=>{const a=this.hot.rowIndexMapper,l=this.hot.columnIndexMapper,h=r>=0?l.getVisualFromRenderableIndex(r):r,c=s>=0?a.getVisualFromRenderableIndex(s):s,d=this.hot.runHooks("modifyGetCoordsElement",c,h);if(Array.isArray(d)){const[u,f]=d;return[u>=0?a.getRenderableFromVisualIndex(a.getNearestNotHiddenIndex(u,1)):u,f>=0?l.getRenderableFromVisualIndex(l.getNearestNotHiddenIndex(f,1)):f]}},viewportRowCalculatorOverride:s=>{let r=this.settings.viewportRowRenderingOffset;if(r==="auto"&&(r=1),r>0){const a=this.countRenderableRows(),l=s.startRow,h=s.endRow;s.startRow=Math.max(l-r,0),s.endRow=Math.min(h+r,a-1)}this.hot.runHooks("afterViewportRowCalculatorOverride",s)},viewportColumnCalculatorOverride:s=>{let r=this.settings.viewportColumnRenderingOffset;if(r==="auto"&&(r=1),r>0){const a=this.countRenderableColumns(),l=s.startColumn,h=s.endColumn;s.startColumn=Math.max(l-r,0),s.endColumn=Math.min(h+r,a-1)}this.hot.runHooks("afterViewportColumnCalculatorOverride",s)},rowHeaderWidth:()=>this.settings.rowHeaderWidth,columnHeaderHeight:()=>{const s=this.hot.runHooks("modifyColumnHeaderHeight");return this.settings.columnHeaderHeight||s},stylesHandler:()=>this.hot.stylesHandler};this.hot.runHooks("beforeInitWalkontable",e),this._wt=new fk(e),this.activeWt=this._wt;const t=this._wt.wtTable.spreader,{width:o,height:i}=this.hot.rootElement.getBoundingClientRect();this.setLastSize(o,i),this.eventManager.addEventListener(t,"mousedown",s=>{s.target===t&&s.which===3&&s.stopPropagation()}),this.eventManager.addEventListener(t,"contextmenu",s=>{s.target===t&&s.which===3&&s.stopPropagation()}),this.eventManager.addEventListener(this.hot.rootDocument.documentElement,"click",()=>{this.settings.observeDOMVisibility&&this._wt.drawInterrupted&&this.hot.render()})}isTextSelectionAllowed(e){if(Nb(e))return!0;const t=Hc(e,this._wt.wtTable.spreader);if(this.settings.fragmentSelection===!0&&t)return!0;const o=this.hot.getSelectedRangeActive()?.isSingleCell()??!1;return!!(this.settings.fragmentSelection==="cell"&&o&&t||!this.settings.fragmentSelection&&this.isCellEdited()&&o)}isMouseDown(){return rn(this,ga)}isCellEdited(){const e=this.hot.getActiveEditor();return e&&e.isOpened()}beforeRender(e,t){e&&this.hot.runHooks("beforeViewRender",this.hot.forceFullRender,t)}afterRender(e){e&&this.hot.runHooks("afterViewRender",this.hot.forceFullRender)}appendRowHeader(e,t){if(t.firstChild){const o=t.firstChild;if(!_e(o,"relative")){ol(t),this.appendRowHeader(e,t);return}this.updateCellHeader(o.querySelector(".rowHeader"),e,this.hot.getRowHeader)}else{const{rootDocument:o,getRowHeader:i}=this.hot,s=o.createElement("div"),r=o.createElement("span");s.className="relative",r.className="rowHeader",this.updateCellHeader(r,e,i),s.appendChild(r),t.appendChild(s)}this.hot.runHooks("afterGetRowHeader",e,t)}appendColHeader(e,t,o=this.hot.getColHeader,i=0){const s=()=>{const r=e>=0?this.hot.getColumnMeta(e).headerClassName:null;return r?r.split(" "):[]};if(t.firstChild){const r=t.firstChild;_e(r,"relative")?(this.updateCellHeader(r.querySelector(".colHeader"),e,o,i),r.className="",B(r,["relative",...s()])):(ol(t),this.appendColHeader(e,t,o,i))}else{const{rootDocument:r}=this.hot,a=r.createElement("div"),l=r.createElement("span"),h=s();a.classList.add("relative",...h),l.className="colHeader",this.settings.ariaTags&&(fe(a,...Ga()),fe(l,...Ga())),this.updateCellHeader(l,e,o,i),a.appendChild(l),t.appendChild(a)}this.hot.runHooks("afterGetColHeader",e,t,i)}updateCellHeader(e,t,o,i=0){let s=t;const r=this._wt.wtOverlays.getParentOverlay(e)||this._wt;e.parentNode&&(_e(e,"colHeader")?s=r.wtTable.columnFilter.sourceToRendered(t):_e(e,"rowHeader")&&(s=r.wtTable.rowFilter.sourceToRendered(t))),s>-1?Qc(e,o(t,i),this.hot.getSettings().sanitizer):(ph(e," "),B(e,"cornerHeader"))}maximumVisibleElementWidth(e){const o=this._wt.wtViewport.getWorkspaceWidth()-e;return o>0?o:0}maximumVisibleElementHeight(e){const o=this._wt.wtViewport.getWorkspaceHeight()-e;return o>0?o:0}setLastSize(e,t){Ut(this,mw,e),Ut(this,ww,t)}getLastSize(){return{width:rn(this,mw),height:rn(this,ww)}}getFirstRenderedVisibleRow(){if(!this._wt.wtViewport.rowsRenderCalculator)return null;const e=this.hot.rowIndexMapper,t=e.getVisualFromRenderableIndex(this._wt.wtTable.getFirstRenderedRow());return e.getNearestNotHiddenIndex(t??0,1)}getLastRenderedVisibleRow(){if(!this._wt.wtViewport.rowsRenderCalculator)return null;const e=this.hot.rowIndexMapper,t=e.getVisualFromRenderableIndex(this._wt.wtTable.getLastRenderedRow());return e.getNearestNotHiddenIndex(t??this.hot.countRows()-1,-1)}getFirstRenderedVisibleColumn(){if(!this._wt.wtViewport.columnsRenderCalculator)return null;const e=this.hot.columnIndexMapper,t=e.getVisualFromRenderableIndex(this._wt.wtTable.getFirstRenderedColumn());return e.getNearestNotHiddenIndex(t??0,1)}getLastRenderedVisibleColumn(){if(!this._wt.wtViewport.columnsRenderCalculator)return null;const e=this.hot.columnIndexMapper,t=e.getVisualFromRenderableIndex(this._wt.wtTable.getLastRenderedColumn());return e.getNearestNotHiddenIndex(t??this.hot.countCols()-1,-1)}getFirstFullyVisibleRow(){return this.hot.rowIndexMapper.getVisualFromRenderableIndex(this._wt.wtScroll.getFirstVisibleRow())}getLastFullyVisibleRow(){return this.hot.rowIndexMapper.getVisualFromRenderableIndex(this._wt.wtScroll.getLastVisibleRow())}getFirstFullyVisibleColumn(){return this.hot.columnIndexMapper.getVisualFromRenderableIndex(this._wt.wtScroll.getFirstVisibleColumn())}getLastFullyVisibleColumn(){return this.hot.columnIndexMapper.getVisualFromRenderableIndex(this._wt.wtScroll.getLastVisibleColumn())}getFirstPartiallyVisibleRow(){return this.hot.rowIndexMapper.getVisualFromRenderableIndex(this._wt.wtScroll.getFirstPartiallyVisibleRow())}getLastPartiallyVisibleRow(){return this.hot.rowIndexMapper.getVisualFromRenderableIndex(this._wt.wtScroll.getLastPartiallyVisibleRow())}getFirstPartiallyVisibleColumn(){return this.hot.columnIndexMapper.getVisualFromRenderableIndex(this._wt.wtScroll.getFirstPartiallyVisibleColumn())}getLastPartiallyVisibleColumn(){return this.hot.columnIndexMapper.getVisualFromRenderableIndex(this._wt.wtScroll.getLastPartiallyVisibleColumn())}getColumnHeadersCount(){return rn(this,pw)}getRowHeadersCount(){return rn(this,If)}getViewportWidth(){return this._wt.wtViewport.getViewportWidth()}getWorkspaceWidth(){return this._wt.wtViewport.getWorkspaceWidth()}getViewportHeight(){return this._wt.wtViewport.getViewportHeight()}getWorkspaceHeight(){return this._wt.wtViewport.getWorkspaceHeight()}getElementOverlayName(e){return(this._wt.wtOverlays.getParentOverlay(e)??this._wt).wtTable.name}getOverlayByName(e){return this._wt.getOverlayByName(e)}getActiveOverlayName(){return this._wt.activeOverlayName}isVisible(){return this._wt.wtTable.isVisible()}hasVerticalScroll(){return this._wt.wtViewport.hasVerticalScroll()}hasHorizontalScroll(){return this._wt.wtViewport.hasHorizontalScroll()}getTableWidth(){return this._wt.wtTable.getWidth()}getTableHeight(){return this._wt.wtTable.getHeight()}getTotalTableWidth(){return this._wt.wtTable.getTotalWidth()}getTotalTableHeight(){return this._wt.wtTable.getTotalHeight()}getTableOffset(){return this._wt.wtViewport.getWorkspaceOffset()}getTableScrollPosition(){return{left:this._wt.wtTable.holder.scrollLeft,top:this._wt.wtTable.holder.scrollTop}}setTableScrollPosition(e){this._wt.wtTable.holder.scrollLeft=e.left,this._wt.wtTable.holder.scrollTop=e.top}getRowHeaderWidth(){return this._wt.wtViewport.getRowHeaderWidth()}getColumnHeaderHeight(){return this._wt.wtViewport.getColumnHeaderHeight()}isVerticallyScrollableByWindow(){return this._wt.wtViewport.isVerticallyScrollableByWindow()}isHorizontallyScrollableByWindow(){return this._wt.wtViewport.isHorizontallyScrollableByWindow()}destroy(){this._wt.destroy(),this.eventManager.destroy()}constructor(e){gw(this,Af),gw(this,vE),gw(this,MH),gw(this,IH),Sr(this,pw,{writable:!0,value:void 0}),Sr(this,If,{writable:!0,value:void 0}),Sr(this,Hf,{writable:!0,value:void 0}),Sr(this,ga,{writable:!0,value:void 0}),Sr(this,As,{writable:!0,value:void 0}),Sr(this,mw,{writable:!0,value:void 0}),Sr(this,ww,{writable:!0,value:void 0}),Sr(this,xh,{writable:!0,value:void 0}),Sr(this,jg,{writable:!0,value:void 0}),Sr(this,pd,{writable:!0,value:void 0}),Ut(this,pw,0),Ut(this,If,0),this.postponedAdjustElementsSize=!1,Ut(this,Hf,!1),Ut(this,mw,0),Ut(this,ww,0),Ut(this,xh,null),Ut(this,jg,!1),Ut(this,pd,null),this.hot=e,this.eventManager=new Wi(this.hot),this.settings=this.hot.getSettings(),this.createElements(),this.registerEvents(),this.initializeWalkontable()}}function bw(n){return n.sourceCapabilities?n.sourceCapabilities.firesTouchEvents===!0:rn(this,jg)}function aB(){return parseInt(this.hot.rootElement.getAttribute(Iy()[0]),10)}function i7(n){const e=Fl(this,vE,aB).call(this)+n;fe(this.hot.rootElement,...Iy(e))}function s7(){const n=this.hot.rootElement;this.hasVerticalScroll()?B(n,"htHasScrollY"):oe(n,"htHasScrollY"),this.isVerticallyScrollableByWindow()?B(n,"htVerticallyScrollableByWindow"):oe(n,"htVerticallyScrollableByWindow"),this.hasHorizontalScroll()?B(n,"htHasScrollX"):oe(n,"htHasScrollX"),this.isHorizontallyScrollableByWindow()?B(n,"htHorizontallyScrollableByWindow"):oe(n,"htHorizontallyScrollableByWindow"),xn()===0?B(n,"htScrollbarHidden"):oe(n,"htScrollbarHidden")}const r7="ABCDEFGHIJKLMNOPQRSTUVWXYZ",HH=r7.length;function a7(n){let e=n+1,t="",o;for(;e>0;)o=(e-1)%HH,t=String.fromCharCode(65+o)+t,e=parseInt((e-o)/HH,10);return t}function lB(n,e=0){let t=n;const o=[];return(!Array.isArray(n)||!Array.isArray(n[0]))&&(t=[n]),t.forEach((i,s)=>{Array.isArray(i)?i.forEach((r,a)=>{o.push([s+e,a,r])}):Object.keys(i).forEach(r=>{o.push([s+e,r,i[r]])})}),o}function l7(n,e,t){return n.some(([o,i])=>o===e&&i===t)}function hB(n){let e=0;return Array.isArray(n)&&(n[0]&&Array.isArray(n[0])?e=n[0].length:n[0]&&ne(n[0])&&(e=Y0(n[0]))),e}function h7(n){return!!(Array.isArray(n)&&n.length&&n.every(e=>Array.isArray(e)))}function c7(n){return!!(Array.isArray(n)&&n.length&&n.every(e=>typeof e=="object"&&!Array.isArray(e)&&e!==null))}class Jc{getValues(){return this.indexedValues}getValueAtIndex(e){const t=this.indexedValues;if(e<t.length)return t[e]}setValues(e){this.indexedValues=e.slice(),this.runLocalHooks("change")}setValueAtIndex(e,t){return e<this.indexedValues.length?(this.indexedValues[e]=t,this.runLocalHooks("change"),!0):!1}clear(){this.setDefaultValues()}getLength(){return this.getValues().length}setDefaultValues(e=this.indexedValues.length){this.indexedValues.length=0,ye(this.initValueOrFn)?Ee(e-1,t=>this.indexedValues.push(this.initValueOrFn(t))):Ee(e-1,()=>this.indexedValues.push(this.initValueOrFn)),this.runLocalHooks("change")}init(e){return this.setDefaultValues(e),this.runLocalHooks("init"),this}insert(){this.runLocalHooks("change")}remove(){this.runLocalHooks("change")}destroy(){this.clearLocalHooks(),this.indexedValues=null,this.initValueOrFn=null}constructor(e=null){this.indexedValues=[],this.initValueOrFn=e}}Ct(Jc,$n);function pk(n,e,t,o){const i=t.length?t[0]:void 0;return[...n.slice(0,i),...t.map((s,r)=>ye(o)?o(s,r):o),...i===void 0?[]:n.slice(i)]}function mk(n,e){return Fc(n,(t,o)=>e.includes(o)===!1)}class Ch extends Jc{insert(e,t){this.indexedValues=pk(this.indexedValues,e,t,this.initValueOrFn),super.insert(e,t)}remove(e){this.indexedValues=mk(this.indexedValues,e),super.remove(e)}}class Qp extends Ch{getHiddenIndexes(){return $i(this.getValues(),(e,t,o)=>(t&&e.push(o),e),[])}constructor(e=!1){super(e)}}function wk(n,e,t){return[...n.slice(0,e),...t,...n.slice(e)]}function Jp(n,e){return Fc(n,t=>e.includes(t)===!1)}function bk(n,e){return Tt(n,t=>t-e.filter(o=>o<t).length)}function Ck(n,e){const t=e[0],o=e.length;return Tt(n,i=>i>=t?i+o:i)}class Wy extends Jc{getValues(){return this.orderOfIndexes.map(e=>this.indexedValues[e])}setValues(e){this.orderOfIndexes=[...Array(e.length).keys()],super.setValues(e)}setValueAtIndex(e,t,o=this.orderOfIndexes.length){return e<this.indexedValues.length?(this.indexedValues[e]=t,this.orderOfIndexes.includes(e)===!1&&this.orderOfIndexes.splice(o,0,e),this.runLocalHooks("change"),!0):!1}clearValue(e){this.orderOfIndexes=Jp(this.orderOfIndexes,[e]),ye(this.initValueOrFn)?super.setValueAtIndex(e,this.initValueOrFn(e)):super.setValueAtIndex(e,this.initValueOrFn)}getLength(){return this.orderOfIndexes.length}setDefaultValues(e=this.indexedValues.length){this.orderOfIndexes.length=0,super.setDefaultValues(e)}insert(e,t){this.indexedValues=pk(this.indexedValues,e,t,this.initValueOrFn),this.orderOfIndexes=Ck(this.orderOfIndexes,t),super.insert(e,t)}remove(e){this.indexedValues=mk(this.indexedValues,e),this.orderOfIndexes=Jp(this.orderOfIndexes,e),this.orderOfIndexes=bk(this.orderOfIndexes,e),super.remove(e)}getEntries(){return this.orderOfIndexes.map(e=>[e,this.getValueAtIndex(e)])}constructor(...e){super(...e),this.orderOfIndexes=[]}}class Qu extends Ch{getTrimmedIndexes(){return $i(this.getValues(),(e,t,o)=>(t&&e.push(o),e),[])}constructor(e=!1){super(e)}}const AH=new Map([["indexesSequence",{getListWithInsertedItems:wk,getListWithRemovedItems:Jp}],["physicallyIndexed",{getListWithInsertedItems:pk,getListWithRemovedItems:mk}]]),cB=n=>(AH.has(n)===!1&&U(`Alter strategy with ID '${n}' does not exist.`),AH.get(n));class dB extends Jc{insert(e,t){const o=Ck(this.indexedValues,t);this.indexedValues=wk(o,e,t),super.insert(e,t)}remove(e){const t=Jp(this.indexedValues,e);this.indexedValues=bk(t,e),super.remove(e)}constructor(){super(e=>e)}}const OH=new Map([["hiding",Qp],["index",Jc],["linkedPhysicalIndexToValue",Wy],["physicalIndexToValue",Ch],["trimming",Qu]]);function d7(n,e=null){return OH.has(n)||U(`The provided map type ("${n}") does not exist.`),new(OH.get(n))(e)}class yk{register(e,t){this.collection.has(e)===!1&&(this.collection.set(e,t),t.addLocalHook("change",()=>this.runLocalHooks("change",t)))}unregister(e){const t=this.collection.get(e);J(t)&&(t.destroy(),this.collection.delete(e),this.runLocalHooks("change",t))}unregisterAll(){this.collection.forEach((e,t)=>this.unregister(t)),this.collection.clear()}get(e){return Jt(e)?Array.from(this.collection.values()):this.collection.get(e)}getLength(){return this.collection.size}removeFromEvery(e){this.collection.forEach(t=>{t.remove(e)})}insertToEvery(e,t){this.collection.forEach(o=>{o.insert(e,t)})}initEvery(e){this.collection.forEach(t=>{t.init(e)})}constructor(){this.collection=new Map}}Ct(yk,$n);class DH extends yk{getMergedValues(e=!0){if(e===!0)return this.mergedValuesCache;if(this.getLength()===0)return[];const t=Tt(this.get(),s=>s.getValues()),o=[],i=J(t[0])&&t[0].length||0;for(let s=0;s<i;s+=1){const r=[];for(let a=0;a<this.getLength();a+=1)r.push(t[a][s]);o.push(r)}return Tt(o,this.aggregationFunction)}getMergedValueAtIndex(e,t){const o=this.getMergedValues(t)[e];return J(o)?o:this.fallbackValue}updateCache(){this.mergedValuesCache=this.getMergedValues(!1)}constructor(e,t){super(),this.mergedValuesCache=[],this.aggregationFunction=e,this.fallbackValue=t}}function u7(n,e){if(e.has(n))throw new TypeError("Cannot initialize the same private elements twice on an object")}function f7(n,e){return e.get?e.get.call(n):e.value}function g7(n,e,t){if(e.set)e.set.call(n,t);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=t}}function uB(n,e,t){if(!e.has(n))throw new TypeError("attempted to "+t+" private field on non-instance");return e.get(n)}function p7(n,e){var t=uB(n,e,"get");return f7(n,t)}function m7(n,e,t){u7(n,e),e.set(n,t)}function NH(n,e,t){var o=uB(n,e,"set");return g7(n,o,t),t}var Cw=new WeakMap;class fB{subscribe(e){return this.addLocalHook("change",e),this._write(p7(this,Cw)),this}unsubscribe(){return this.runLocalHooks("unsubscribe"),this.clearLocalHooks(),this}_write(e){return e.length>0&&this.runLocalHooks("change",e),this}_writeInitialChanges(e){NH(this,Cw,e)}constructor(){m7(this,Cw,{writable:!0,value:void 0}),NH(this,Cw,[])}}Ct(fB,$n);function PH(n,e){const t=[];let o=0,i=0;for(;o<n.length&&i<e.length;o++,i++)n[o]!==e[i]&&t.push({op:"replace",index:i,oldValue:n[o],newValue:e[i]});for(;o<e.length;o++)t.push({op:"insert",index:o,oldValue:void 0,newValue:e[o]});for(;i<n.length;i++)t.push({op:"remove",index:i,oldValue:n[i],newValue:void 0});return t}function w7(n,e){if(e.has(n))throw new TypeError("Cannot initialize the same private elements twice on an object")}function b7(n,e){return e.get?e.get.call(n):e.value}function C7(n,e,t){if(e.set)e.set.call(n,t);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=t}}function gB(n,e,t){if(!e.has(n))throw new TypeError("attempted to "+t+" private field on non-instance");return e.get(n)}function as(n,e){var t=gB(n,e,"get");return b7(n,t)}function Of(n,e,t){w7(n,e),e.set(n,t)}function pa(n,e,t){var o=gB(n,e,"set");return C7(n,o,t),t}var Df=new WeakMap,md=new WeakMap,Nf=new WeakMap,Pf=new WeakMap,Lf=new WeakMap;class y7{createObserver(){const e=new fB;return as(this,Df).add(e),e.addLocalHook("unsubscribe",()=>{as(this,Df).delete(e)}),e._writeInitialChanges(PH(as(this,md),as(this,Nf))),e}emit(e){let t=as(this,Nf);(!as(this,Pf)||as(this,md).length!==e.length)&&(e.length===0?e=new Array(t.length).fill(as(this,Lf)):pa(this,md,new Array(e.length).fill(as(this,Lf))),as(this,Pf)||(pa(this,Pf,!0),t=as(this,md)));const o=PH(t,e);as(this,Df).forEach(i=>i._write(o)),pa(this,Nf,e)}constructor({initialIndexValue:e}={}){Of(this,Df,{writable:!0,value:void 0}),Of(this,md,{writable:!0,value:void 0}),Of(this,Nf,{writable:!0,value:void 0}),Of(this,Pf,{writable:!0,value:void 0}),Of(this,Lf,{writable:!0,value:void 0}),pa(this,Df,new Set),pa(this,md,[]),pa(this,Nf,[]),pa(this,Pf,!1),pa(this,Lf,!1),pa(this,Lf,e??!1)}}function pB(n,e){if(e.has(n))throw new TypeError("Cannot initialize the same private elements twice on an object")}function _7(n,e){return e.get?e.get.call(n):e.value}function S7(n,e,t){if(e.set)e.set.call(n,t);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=t}}function mB(n,e,t){if(!e.has(n))throw new TypeError("attempted to "+t+" private field on non-instance");return e.get(n)}function Ss(n,e){var t=mB(n,e,"get");return _7(n,t)}function LH(n,e,t){pB(n,e),e.set(n,t)}function gS(n,e,t){var o=mB(n,e,"set");return S7(n,o,t),t}function TC(n,e,t){if(!e.has(n))throw new TypeError("attempted to get private field on non-instance");return t}function pS(n,e){pB(n,e),e.add(n)}var Nr=new WeakMap,Ac=new WeakMap,WH=new WeakSet,_k=new WeakSet,$H=new WeakSet;class RE{suspendOperations(){this.isBatched=!0}resumeOperations(){this.isBatched=!1,this.updateCache(),TC(this,$H,R7).call(this)}createChangesObserver(e){return e!=="hiding"&&U(`Unsupported index map type "${e}".`),this.hidingChangesObservable.createObserver()}createAndRegisterIndexMap(e,t,o){return this.registerMap(e,d7(t,o))}registerMap(e,t){(this.trimmingMapsCollection.get(e)||this.hidingMapsCollection.get(e)||this.variousMapsCollection.get(e))&&U(`Map with name "${e}" has been already registered.`),t instanceof Qu?this.trimmingMapsCollection.register(e,t):t instanceof Qp?this.hidingMapsCollection.register(e,t):this.variousMapsCollection.register(e,t);const o=this.getNumberOfIndexes();return o>0&&t.init(o),t}unregisterMap(e){this.trimmingMapsCollection.unregister(e),this.hidingMapsCollection.unregister(e),this.variousMapsCollection.unregister(e)}unregisterAll(){this.trimmingMapsCollection.unregisterAll(),this.hidingMapsCollection.unregisterAll(),this.variousMapsCollection.unregisterAll()}getPhysicalFromVisualIndex(e){const t=this.notTrimmedIndexesCache[e];return J(t)?t:null}getPhysicalFromRenderableIndex(e){const t=this.renderablePhysicalIndexesCache[e];return J(t)?t:null}getVisualFromPhysicalIndex(e){const t=this.fromPhysicalToVisualIndexesCache.get(e);return J(t)?t:null}getVisualFromRenderableIndex(e){return this.getVisualFromPhysicalIndex(this.getPhysicalFromRenderableIndex(e))}getRenderableFromVisualIndex(e){const t=this.fromVisualToRenderableIndexesCache.get(e);return J(t)?t:null}getNearestNotHiddenIndex(e,t,o=!1){if(this.getPhysicalFromVisualIndex(e)===null)return null;if(this.fromVisualToRenderableIndexesCache.has(e))return e;const s=Array.from(this.fromVisualToRenderableIndexesCache.keys());let r=-1;return t>0?r=s.findIndex(a=>a>e):r=s.reverse().findIndex(a=>a<e),r===-1?o?this.getNearestNotHiddenIndex(e,-t,!1):null:s[r]}initToLength(e=this.getNumberOfIndexes()){this.notTrimmedIndexesCache=[...new Array(e).keys()],this.notHiddenIndexesCache=[...new Array(e).keys()],this.suspendOperations(),this.indexesChangeSource="init",this.indexesSequence.init(e),this.indexesChangeSource=void 0,this.trimmingMapsCollection.initEvery(e),this.resumeOperations(),this.suspendOperations(),this.hidingMapsCollection.initEvery(e),this.variousMapsCollection.initEvery(e),this.resumeOperations(),this.runLocalHooks("init")}fitToLength(e){const t=this.getNumberOfIndexes();if(e<t){const o=[...Array(this.getNumberOfIndexes()-e).keys()].map(i=>i+e);this.removeIndexes(o)}else this.insertIndexes(t,e-t)}getIndexesSequence(){return this.indexesSequence.getValues()}setIndexesSequence(e){this.indexesChangeSource===void 0&&(this.indexesChangeSource="update"),this.indexesSequence.setValues(e),this.indexesChangeSource==="update"&&(this.indexesChangeSource=void 0)}getNotTrimmedIndexes(e=!0){return e===!0?this.notTrimmedIndexesCache:this.getIndexesSequence().filter(o=>this.isTrimmed(o)===!1)}getNotTrimmedIndexesLength(){return this.getNotTrimmedIndexes().length}getNotHiddenIndexes(e=!0){return e===!0?this.notHiddenIndexesCache:this.getIndexesSequence().filter(o=>this.isHidden(o)===!1)}getNotHiddenIndexesLength(){return this.getNotHiddenIndexes().length}getRenderableIndexes(e=!0){return e===!0?this.renderablePhysicalIndexesCache:this.getNotTrimmedIndexes().filter(o=>this.isHidden(o)===!1)}getRenderableIndexesLength(){return this.getRenderableIndexes().length}getNumberOfIndexes(){return this.getIndexesSequence().length}moveIndexes(e,t){typeof e=="number"&&(e=[e]);const o=Tt(e,h=>this.getPhysicalFromVisualIndex(h)),i=this.getNotTrimmedIndexesLength(),s=e.length,r=Jp(this.getIndexesSequence(),o),a=r.filter(h=>this.isTrimmed(h)===!1);let l=r.indexOf(a[a.length-1])+1;if(t+s<i){const h=a[t];l=r.indexOf(h)}this.indexesChangeSource="move",this.setIndexesSequence(wk(r,l,o)),this.indexesChangeSource=void 0}isTrimmed(e){return this.trimmingMapsCollection.getMergedValueAtIndex(e)}isHidden(e){return this.hidingMapsCollection.getMergedValueAtIndex(e)}insertIndexes(e,t,o="start"){const i=this.getNotTrimmedIndexes()[e],s=J(i)?i:this.getNumberOfIndexes(),r=this.getIndexesSequence().includes(i)?this.getIndexesSequence().indexOf(i):this.getNumberOfIndexes(),a=Tt(new Array(t).fill(s),(h,c)=>h+c);this.suspendOperations(),this.indexesChangeSource="insert",this.indexesSequence.insert(r,a),this.indexesChangeSource=void 0;const l=o==="end"?a.map(h=>h+1):a;this.trimmingMapsCollection.insertToEvery(r,l),this.hidingMapsCollection.insertToEvery(r,l),this.variousMapsCollection.insertToEvery(r,l),this.resumeOperations()}removeIndexes(e){this.suspendOperations(),this.indexesChangeSource="remove",this.indexesSequence.remove(e),this.indexesChangeSource=void 0,this.trimmingMapsCollection.removeFromEvery(e),this.hidingMapsCollection.removeFromEvery(e),this.variousMapsCollection.removeFromEvery(e),this.resumeOperations()}observeMapChange(e,t){return(e instanceof Qu||e instanceof Qp)&&U('The "observeMapChange" method does not support trimming or hiding maps.'),Ss(this,Nr).has(e)||Ss(this,Nr).set(e,new Set),Ss(this,Nr).get(e).add(t),()=>{const o=Ss(this,Nr).get(e);o&&(o.delete(t),o.size===0&&Ss(this,Nr).delete(e))}}updateCache(e=!1){const t=this.indexesSequenceChanged||this.trimmedIndexesChanged||this.hiddenIndexesChanged;(e===!0||this.isBatched===!1&&t===!0)&&(this.trimmingMapsCollection.updateCache(),this.hidingMapsCollection.updateCache(),this.notTrimmedIndexesCache=this.getNotTrimmedIndexes(!1),this.notHiddenIndexesCache=this.getNotHiddenIndexes(!1),this.renderablePhysicalIndexesCache=this.getRenderableIndexes(!1),this.cacheFromPhysicalToVisualIndexes(),this.cacheFromVisualToRenderableIndexes(),this.hiddenIndexesChanged&&this.hidingChangesObservable.emit(this.hidingMapsCollection.getMergedValues()),this.runLocalHooks("cacheUpdated",{indexesSequenceChanged:this.indexesSequenceChanged,trimmedIndexesChanged:this.trimmedIndexesChanged,hiddenIndexesChanged:this.hiddenIndexesChanged}),this.indexesSequenceChanged=!1,this.trimmedIndexesChanged=!1,this.hiddenIndexesChanged=!1)}cacheFromPhysicalToVisualIndexes(){const e=this.getNotTrimmedIndexesLength();this.fromPhysicalToVisualIndexesCache.clear();for(let t=0;t<e;t+=1){const o=this.getPhysicalFromVisualIndex(t);this.fromPhysicalToVisualIndexesCache.set(o,t)}}cacheFromVisualToRenderableIndexes(){const e=this.getRenderableIndexesLength();this.fromVisualToRenderableIndexesCache.clear();for(let t=0;t<e;t+=1){const o=this.getPhysicalFromRenderableIndex(t),i=this.getVisualFromPhysicalIndex(o);this.fromVisualToRenderableIndexesCache.set(i,t)}}destroy(){gS(this,Nr,new WeakMap),Ss(this,Ac).clear(),this.unregisterAll()}constructor(){pS(this,WH),pS(this,_k),pS(this,$H),LH(this,Nr,{writable:!0,value:void 0}),LH(this,Ac,{writable:!0,value:void 0}),this.indexesSequence=new dB,this.trimmingMapsCollection=new DH(e=>e.some(t=>t===!0),!1),this.hidingMapsCollection=new DH(e=>e.some(t=>t===!0),!1),this.variousMapsCollection=new yk,this.hidingChangesObservable=new y7({initialIndexValue:!1}),this.notTrimmedIndexesCache=[],this.notHiddenIndexesCache=[],this.isBatched=!1,this.indexesSequenceChanged=!1,this.indexesChangeSource=void 0,this.trimmedIndexesChanged=!1,this.hiddenIndexesChanged=!1,this.renderablePhysicalIndexesCache=[],this.fromPhysicalToVisualIndexesCache=new Map,this.fromVisualToRenderableIndexesCache=new Map,gS(this,Nr,new WeakMap),gS(this,Ac,new Set),this.indexesSequence.addLocalHook("change",()=>{this.indexesSequenceChanged=!0,this.updateCache(),this.runLocalHooks("indexesSequenceChange",this.indexesChangeSource),this.runLocalHooks("change",this.indexesSequence,null)}),this.trimmingMapsCollection.addLocalHook("change",e=>{this.trimmedIndexesChanged=!0,this.updateCache(),this.runLocalHooks("change",e,this.trimmingMapsCollection)}),this.hidingMapsCollection.addLocalHook("change",e=>{this.hiddenIndexesChanged=!0,this.updateCache(),this.runLocalHooks("change",e,this.hidingMapsCollection)}),this.variousMapsCollection.addLocalHook("change",e=>{TC(this,WH,v7).call(this,e),this.runLocalHooks("change",e,this.variousMapsCollection)})}}function v7(n){Ss(this,Nr).has(n)&&(this.isBatched?Ss(this,Ac).add(n):TC(this,_k,wB).call(this,n))}function wB(n){const e=Ss(this,Nr).get(n);e&&e.forEach(t=>t(n))}function R7(){Ss(this,Ac).size>0&&(Ss(this,Ac).forEach(n=>TC(this,_k,wB).call(this,n)),Ss(this,Ac).clear())}Ct(RE,$n);function E7(n,e){return tt(e,(t,o)=>{Jt(n[o])&&(n[o]=t)}),n}function bB(n){const t=/^([a-zA-Z]{2})-([a-zA-Z]{2})$/.exec(n);return t?`${t[1].toLowerCase()}-${t[2].toUpperCase()}`:n}function CB(n){J(n)&&nl(pt`Language with code "${n}" was not found. You should register particular language\x20
|
|
37
|
+
before using it. Read more about this issue at: https://docs.handsontable.com/i18n/missing-language-code.`)}function k7(n,e){return Array.isArray(n)&&Number.isInteger(e)?n[e]:n}function yB(n,e){return Array.isArray(n)?n.map(t=>yB(t,e)):My(n,e)}const{register:T7,getValues:x7}=ts("phraseFormatters");function _B(n,e){T7(n,e)}function M7(){return x7()}_B("pluralize",k7);_B("substitute",yB);const Sk="Common:",xC=`${Sk}ok`,vk=`${Sk}cancel`,SB="ContextMenu:items",Le=SB,Rk=`${Le}.noItems`,Ek=`${Le}.insertRowAbove`,kk=`${Le}.insertRowBelow`,Tk=`${Le}.insertColumnOnTheLeft`,xk=`${Le}.insertColumnOnTheRight`,Mk=`${Le}.removeRow`,Ik=`${Le}.removeColumn`,Hk=`${Le}.undo`,Ak=`${Le}.redo`,MC=`${Le}.readOnly`,Ok=`${Le}.clearColumn`,Dk=`${Le}.copy`,Nk=`${Le}.copyWithHeaders`,Pk=`${Le}.copyWithGroupHeaders`,Lk=`${Le}.copyHeadersOnly`,Wk=`${Le}.cut`,$k=`${Le}.export`,Fk=`${Le}.exportFileCsv`,Bk=`${Le}.exportFileXlsx`,Vk=`${Le}.freezeColumn`,zk=`${Le}.unfreezeColumn`,Uk=`${Le}.mergeCells`,Yk=`${Le}.unmergeCells`,Gk=`${Le}.addComment`,jk=`${Le}.editComment`,qk=`${Le}.removeComment`,Kk=`${Le}.readOnlyComment`,Xk=`${Le}.align`,Zk=`${Le}.align.left`,Qk=`${Le}.align.center`,Jk=`${Le}.align.right`,eT=`${Le}.align.justify`,tT=`${Le}.align.top`,nT=`${Le}.align.middle`,oT=`${Le}.align.bottom`,iT=`${Le}.borders`,sT=`${Le}.borders.top`,rT=`${Le}.borders.right`,aT=`${Le}.borders.bottom`,lT=`${Le}.borders.left`,hT=`${Le}.borders.remove`,cT=`${Le}.nestedHeaders.insertChildRow`,dT=`${Le}.nestedHeaders.detachFromParent`,uT=`${Le}.hideColumn`,fT=`${Le}.showColumn`,gT=`${Le}.hideRow`,pT=`${Le}.showRow`,pi="Filters:",Cn=`${pi}conditions`,$y=`${Cn}.none`,mT=`${Cn}.isEmpty`,wT=`${Cn}.isNotEmpty`,bT=`${Cn}.isEqualTo`,CT=`${Cn}.isNotEqualTo`,yT=`${Cn}.beginsWith`,_T=`${Cn}.endsWith`,ST=`${Cn}.contains`,vT=`${Cn}.doesNotContain`,I7=`${Cn}.byValue`,RT=`${Cn}.greaterThan`,ET=`${Cn}.greaterThanOrEqualTo`,kT=`${Cn}.lessThan`,TT=`${Cn}.lessThanOrEqualTo`,Nm=`${Cn}.isBetween`,xT=`${Cn}.isNotBetween`,Pm=`${Cn}.after`,Lm=`${Cn}.before`,Fy=`${Cn}.today`,By=`${Cn}.tomorrow`,Vy=`${Cn}.yesterday`,MT=`${pi}labels.filterByCondition`,IT=`${pi}labels.filterByValue`,HT=`${pi}labels.conjunction`,zy=`${pi}labels.disjunction`,IC=`${pi}values.blankCells`,AT=`${pi}buttons.selectAll`,OT=`${pi}buttons.clear`,DT=`${pi}buttons.ok`,NT=`${pi}buttons.cancel`,PT=`${pi}buttons.placeholder.search`,LT=`${pi}buttons.placeholder.value`,WT=`${pi}buttons.placeholder.secondValue`,oa="Pagination:",$T=`${oa}section.pagination`,FT=`${oa}.pageSize.auto`,HC=`${oa}section.pageSize`,BT=`${oa}section.counter`,VT=`${oa}section.navigation`,zT=`${oa}firstPage`,UT=`${oa}prevPage`,YT=`${oa}nextPage`,GT=`${oa}lastPage`,jT="CheckboxRenderer:",qT=`${jT}checked`,KT=`${jT}unchecked`,vB="Loading:",XT=`${vB}title`,RB="Notification:",ZT=`${RB}buttons.close`,EB="ExportFile:",QT=`${EB}dialog.title`,yh="EmptyDataState:",JT=`${yh}title`,ex=`${yh}description`,tx=`${yh}title.filters`,nx=`${yh}description.filters`,ox=`${yh}buttons.filters.reset`,ix=`${yh}title.loading`,sx=`${yh}description.loading`,ed="DataProvider:",rx=`${ed}errors.fetch`,ax=`${ed}errors.create`,lx=`${ed}errors.update`,hx=`${ed}errors.remove`,cx=`${ed}errors.requestFailed`,dx=`${ed}buttons.refetch`,H7=Object.freeze(Object.defineProperty({__proto__:null,CANCEL:vk,CHECKBOX_CHECKED:qT,CHECKBOX_RENDERER_NAMESPACE:jT,CHECKBOX_UNCHECKED:KT,COMMON_NAMESPACE:Sk,CONTEXTMENU_ITEMS_ADD_COMMENT:Gk,CONTEXTMENU_ITEMS_ALIGNMENT:Xk,CONTEXTMENU_ITEMS_ALIGNMENT_BOTTOM:oT,CONTEXTMENU_ITEMS_ALIGNMENT_CENTER:Qk,CONTEXTMENU_ITEMS_ALIGNMENT_JUSTIFY:eT,CONTEXTMENU_ITEMS_ALIGNMENT_LEFT:Zk,CONTEXTMENU_ITEMS_ALIGNMENT_MIDDLE:nT,CONTEXTMENU_ITEMS_ALIGNMENT_RIGHT:Jk,CONTEXTMENU_ITEMS_ALIGNMENT_TOP:tT,CONTEXTMENU_ITEMS_BORDERS:iT,CONTEXTMENU_ITEMS_BORDERS_BOTTOM:aT,CONTEXTMENU_ITEMS_BORDERS_LEFT:lT,CONTEXTMENU_ITEMS_BORDERS_RIGHT:rT,CONTEXTMENU_ITEMS_BORDERS_TOP:sT,CONTEXTMENU_ITEMS_CLEAR_COLUMN:Ok,CONTEXTMENU_ITEMS_COPY:Dk,CONTEXTMENU_ITEMS_COPY_COLUMN_HEADERS_ONLY:Lk,CONTEXTMENU_ITEMS_COPY_WITH_COLUMN_GROUP_HEADERS:Pk,CONTEXTMENU_ITEMS_COPY_WITH_COLUMN_HEADERS:Nk,CONTEXTMENU_ITEMS_CUT:Wk,CONTEXTMENU_ITEMS_EDIT_COMMENT:jk,CONTEXTMENU_ITEMS_EXPORT:$k,CONTEXTMENU_ITEMS_EXPORT_FILE_CSV:Fk,CONTEXTMENU_ITEMS_EXPORT_FILE_XLSX:Bk,CONTEXTMENU_ITEMS_FREEZE_COLUMN:Vk,CONTEXTMENU_ITEMS_HIDE_COLUMN:uT,CONTEXTMENU_ITEMS_HIDE_ROW:gT,CONTEXTMENU_ITEMS_INSERT_LEFT:Tk,CONTEXTMENU_ITEMS_INSERT_RIGHT:xk,CONTEXTMENU_ITEMS_MERGE_CELLS:Uk,CONTEXTMENU_ITEMS_NESTED_ROWS_DETACH_CHILD:dT,CONTEXTMENU_ITEMS_NESTED_ROWS_INSERT_CHILD:cT,CONTEXTMENU_ITEMS_NO_ITEMS:Rk,CONTEXTMENU_ITEMS_READ_ONLY:MC,CONTEXTMENU_ITEMS_READ_ONLY_COMMENT:Kk,CONTEXTMENU_ITEMS_REDO:Ak,CONTEXTMENU_ITEMS_REMOVE_BORDERS:hT,CONTEXTMENU_ITEMS_REMOVE_COLUMN:Ik,CONTEXTMENU_ITEMS_REMOVE_COMMENT:qk,CONTEXTMENU_ITEMS_REMOVE_ROW:Mk,CONTEXTMENU_ITEMS_ROW_ABOVE:Ek,CONTEXTMENU_ITEMS_ROW_BELOW:kk,CONTEXTMENU_ITEMS_SHOW_COLUMN:fT,CONTEXTMENU_ITEMS_SHOW_ROW:pT,CONTEXTMENU_ITEMS_UNDO:Hk,CONTEXTMENU_ITEMS_UNFREEZE_COLUMN:zk,CONTEXTMENU_ITEMS_UNMERGE_CELLS:Yk,CONTEXT_MENU_ITEMS_NAMESPACE:SB,DATA_PROVIDER_BUTTONS_REFETCH:dx,DATA_PROVIDER_ERRORS_CREATE:ax,DATA_PROVIDER_ERRORS_FETCH:rx,DATA_PROVIDER_ERRORS_REMOVE:hx,DATA_PROVIDER_ERRORS_REQUEST_FAILED:cx,DATA_PROVIDER_ERRORS_UPDATE:lx,DATA_PROVIDER_NAMESPACE:ed,EMPTY_DATA_STATE_BUTTONS_FILTERS_RESET:ox,EMPTY_DATA_STATE_DESCRIPTION:ex,EMPTY_DATA_STATE_DESCRIPTION_FILTERS:nx,EMPTY_DATA_STATE_DESCRIPTION_LOADING:sx,EMPTY_DATA_STATE_NAMESPACE:yh,EMPTY_DATA_STATE_TITLE:JT,EMPTY_DATA_STATE_TITLE_FILTERS:tx,EMPTY_DATA_STATE_TITLE_LOADING:ix,EXPORT_FILE_DIALOG_TITLE:QT,EXPORT_FILE_NAMESPACE:EB,FILTERS_BUTTONS_CANCEL:NT,FILTERS_BUTTONS_CLEAR:OT,FILTERS_BUTTONS_OK:DT,FILTERS_BUTTONS_PLACEHOLDER_SEARCH:PT,FILTERS_BUTTONS_PLACEHOLDER_SECOND_VALUE:WT,FILTERS_BUTTONS_PLACEHOLDER_VALUE:LT,FILTERS_BUTTONS_SELECT_ALL:AT,FILTERS_CONDITIONS_AFTER:Pm,FILTERS_CONDITIONS_BEFORE:Lm,FILTERS_CONDITIONS_BEGINS_WITH:yT,FILTERS_CONDITIONS_BETWEEN:Nm,FILTERS_CONDITIONS_BY_VALUE:I7,FILTERS_CONDITIONS_CONTAINS:ST,FILTERS_CONDITIONS_EMPTY:mT,FILTERS_CONDITIONS_ENDS_WITH:_T,FILTERS_CONDITIONS_EQUAL:bT,FILTERS_CONDITIONS_GREATER_THAN:RT,FILTERS_CONDITIONS_GREATER_THAN_OR_EQUAL:ET,FILTERS_CONDITIONS_LESS_THAN:kT,FILTERS_CONDITIONS_LESS_THAN_OR_EQUAL:TT,FILTERS_CONDITIONS_NAMESPACE:Cn,FILTERS_CONDITIONS_NONE:$y,FILTERS_CONDITIONS_NOT_BETWEEN:xT,FILTERS_CONDITIONS_NOT_CONTAIN:vT,FILTERS_CONDITIONS_NOT_EMPTY:wT,FILTERS_CONDITIONS_NOT_EQUAL:CT,FILTERS_CONDITIONS_TODAY:Fy,FILTERS_CONDITIONS_TOMORROW:By,FILTERS_CONDITIONS_YESTERDAY:Vy,FILTERS_DIVS_FILTER_BY_CONDITION:MT,FILTERS_DIVS_FILTER_BY_VALUE:IT,FILTERS_LABELS_CONJUNCTION:HT,FILTERS_LABELS_DISJUNCTION:zy,FILTERS_NAMESPACE:pi,FILTERS_VALUES_BLANK_CELLS:IC,LOADING_NAMESPACE:vB,LOADING_TITLE:XT,NOTIFICATION_BUTTONS_CLOSE:ZT,NOTIFICATION_NAMESPACE:RB,OK:xC,PAGINATION_COUNTER_SECTION:BT,PAGINATION_FIRST_PAGE:zT,PAGINATION_LAST_PAGE:GT,PAGINATION_NAMESPACE:oa,PAGINATION_NAV_SECTION:VT,PAGINATION_NEXT_PAGE:YT,PAGINATION_PAGE_SIZE_AUTO:FT,PAGINATION_PAGE_SIZE_SECTION:HC,PAGINATION_PREV_PAGE:UT,PAGINATION_SECTION:$T},Symbol.toStringTag,{value:"Module"})),kB={languageCode:"en-US",[xC]:"OK",[vk]:"Cancel",[Rk]:"No available options",[Ek]:"Insert row above",[kk]:"Insert row below",[Tk]:"Insert column left",[xk]:"Insert column right",[Mk]:["Remove row","Remove rows"],[Ik]:["Remove column","Remove columns"],[Hk]:"Undo",[Ak]:"Redo",[MC]:"Read only",[Ok]:"Clear column",[Xk]:"Alignment",[Zk]:"Left",[Qk]:"Center",[Jk]:"Right",[eT]:"Justify",[tT]:"Top",[nT]:"Middle",[oT]:"Bottom",[Vk]:"Freeze column",[zk]:"Unfreeze column",[iT]:"Borders",[sT]:"Top",[rT]:"Right",[aT]:"Bottom",[lT]:"Left",[hT]:"Remove border(s)",[Gk]:"Add comment",[jk]:"Edit comment",[qk]:"Delete comment",[Kk]:"Read-only comment",[Uk]:"Merge cells",[Yk]:"Unmerge cells",[Dk]:"Copy",[Nk]:["Copy with header","Copy with headers"],[Pk]:["Copy with group header","Copy with group headers"],[Lk]:["Copy header only","Copy headers only"],[Wk]:"Cut",[$k]:"Export",[Fk]:"To CSV",[Bk]:"To Excel",[QT]:"Exporting…",[cT]:"Insert child row",[dT]:"Detach from parent",[uT]:["Hide column","Hide columns"],[fT]:["Show column","Show columns"],[gT]:["Hide row","Hide rows"],[pT]:["Show row","Show rows"],[$y]:"None",[mT]:"Is empty",[wT]:"Is not empty",[bT]:"Is equal to",[CT]:"Is not equal to",[yT]:"Begins with",[_T]:"Ends with",[ST]:"Contains",[vT]:"Does not contain",[RT]:"Greater than",[ET]:"Greater than or equal to",[kT]:"Less than",[TT]:"Less than or equal to",[Nm]:"Is between",[xT]:"Is not between",[Pm]:"After",[Lm]:"Before",[Fy]:"Today",[By]:"Tomorrow",[Vy]:"Yesterday",[IC]:"Blank cells",[MT]:"Filter by condition",[IT]:"Filter by value",[HT]:"And",[zy]:"Or",[AT]:"Select all",[OT]:"Clear",[DT]:"OK",[NT]:"Cancel",[PT]:"Search",[LT]:"Value",[WT]:"Second value",[$T]:"Pagination",[HC]:"Page size",[FT]:"Auto",[BT]:"[start] - [end] of [total]",[VT]:"Page [currentPage] of [totalPages]",[zT]:"Go to first page",[UT]:"Go to previous page",[YT]:"Go to next page",[GT]:"Go to last page",[qT]:"Checked",[KT]:"Unchecked",[XT]:"Loading...",[ZT]:"Close",[JT]:"No data available",[ex]:"There’s nothing to display yet.",[tx]:"No results found",[nx]:"It looks like your current filters are hiding all results.",[ox]:"Reset filters",[ix]:"Loading data",[sx]:"Please wait.",[rx]:"Could not load data",[ax]:"Could not create rows",[lx]:"Could not update rows",[hx]:"Could not remove rows",[cx]:"Request failed",[dx]:"Refetch"},A7=H7,EE=kB.languageCode,{register:O7,getItem:TB,hasItem:D7,getValues:N7}=ts("languagesDictionaries");xB(kB);function xB(n,e){let t=n,o=e;return ne(n)&&(o=n,t=o.languageCode),P7(t,o),O7(t,Qn(o)),Qn(o)}function P7(n,e){n!==EE&&E7(e,TB(EE))}function MB(n){return ux(n)?Qn(TB(n)):null}function ux(n){return D7(n)}function L7(){return N7()}function IB(n,e,t){const o=MB(n);if(o===null)return null;const i=o[e];if(Jt(i))return null;const s=W7(i,t);return Array.isArray(s)?s[0]:s}function W7(n,e){return M7().reduce((t,o)=>o(t,e),n)}function $7(n){let e=bB(n);return ux(e)||(e=EE,CB(n)),e}class cl extends jF{add(e){return this.visualCellRange===null?this.visualCellRange=this.settings.createCellRange(e):this.visualCellRange.expand(e),this}clear(){return this.visualCellRange=null,super.clear()}trimToVisibleCellsRangeOnly({from:e,to:t}){let o=this.getNearestNotHiddenCoords(e,1),i=this.getNearestNotHiddenCoords(t,-1);return o===null||i===null?null:((o.row>i.row||o.col>i.col)&&(o=e,i=t),this.settings.createCellRange(o,o,i))}getNearestNotHiddenCoords(e,t,o=t){const i=this.getNearestNotHiddenIndex(this.settings.rowIndexMapper,e.row,t);if(i===null)return null;const s=this.getNearestNotHiddenIndex(this.settings.columnIndexMapper,e.col,o);return s===null?null:this.settings.createCellCoords(i,s)}getNearestNotHiddenIndex(e,t,o){return t<0?t:e.getNearestNotHiddenIndex(t,o)}commit(){if(this.visualCellRange===null)return this;const e=this.trimToVisibleCellsRangeOnly(this.visualCellRange);return e===null?this.cellRange=null:this.cellRange=this.createRenderableCellRange(e.from,e.to),this}syncWith(e){const t=e.from.clone().normalize(),o=e.getVerticalDirection()==="N-S"?1:-1,i=e.getHorizontalDirection()==="W-E"?1:-1,s=this.settings.visualToRenderableCoords(this.visualCellRange.highlight);let r=null;if((s===null||s.col===null||s.row===null)&&(r=this.getNearestNotHiddenCoords(t,o,i)),r!==null&&e.overlaps(r)){const a=e.highlight.clone();if(a.row>=0&&(a.row=r.row),a.col>=0&&(a.col=r.col),this.cellRange===null){const l=this.settings.visualToRenderableCoords(a);this.cellRange=this.settings.createCellRange(l)}e.setHighlight(a)}return this.settings.selectionType==="focus"&&s!==null&&r===null&&e.setHighlight(this.visualCellRange.highlight),this}getCorners(){const{from:e,to:t}=this.cellRange;return[Math.min(e.row,t.row),Math.min(e.col,t.col),Math.max(e.row,t.row),Math.max(e.col,t.col)]}getVisualCorners(){const e=this.settings.renderableToVisualCoords(this.cellRange.getTopStartCorner()),t=this.settings.renderableToVisualCoords(this.cellRange.getBottomEndCorner());return[e.row,e.col,t.row,t.col]}createRenderableCellRange(e,t){const o=this.settings.visualToRenderableCoords(e),i=this.settings.visualToRenderableCoords(t);return o.row===null||o.col===null||i.row===null||i.col===null?null:this.settings.createCellRange(o,o,i)}constructor(e,t){super(e,null),this.visualCellRange=null,this.visualCellRange=t||null,this.commit()}}function mS({activeHeaderClassName:n,...e}){return new cl({className:n,...e,selectionType:qF})}function F7({areaCornerVisible:n,...e}){return new cl({className:"area",createLayers:!0,border:{width:1,color:"#4b89ff",cornerVisible:n},...e,selectionType:ak})}function B7({...n}){return new cl({className:"highlight",...n,selectionType:ak})}function V7({columnClassName:n,...e}){return new cl({className:n,...e,selectionType:p9})}function z7({cellCornerVisible:n,...e}){return new cl({className:"current",headerAttributes:[U0()],border:{width:2,color:"#4b89ff",cornerVisible:n},...e,selectionType:EC})}function U7({border:n,visualCellRange:e,...t}){return new cl({...n,...t,selectionType:m9},e)}function Y7({...n}){return new cl({className:"fill",border:{width:1,color:"#ff0000"},...n,selectionType:f9})}function FH({headerClassName:n,...e}){return new cl({className:n,...e,selectionType:rk})}function G7({rowClassName:n,...e}){return new cl({className:n,...e,selectionType:g9})}function j7(n,e){if(e.has(n))throw new TypeError("Cannot initialize the same private elements twice on an object")}function ma(n,e,t){if(!e.has(n))throw new TypeError("attempted to get private field on non-instance");return t}function q7(n,e){j7(n,e),e.add(n)}var vr=new WeakSet;class K7{isEnabledFor(e,t){let o=e;e===EC&&(o="current");let i=this.options.disabledCellSelection(t.row,t.col);return typeof i=="string"&&(i=[i]),!i||Array.isArray(i)&&!i.includes(o)}useLayerLevel(e=0){return this.layerLevel=e,this}getFocus(){return this.focus}getFill(){return this.fill}createLayeredArea(){return ma(this,vr,wa).call(this,this.layeredAreas,F7)}getLayeredAreas(){return[...this.layeredAreas.values()]}createArea(){return ma(this,vr,wa).call(this,this.areas,B7)}getAreas(){return[...this.areas.values()]}createRowHeader(){return ma(this,vr,wa).call(this,this.rowHeaders,FH)}getRowHeaders(){return[...this.rowHeaders.values()]}createColumnHeader(){return ma(this,vr,wa).call(this,this.columnHeaders,FH)}getColumnHeaders(){return[...this.columnHeaders.values()]}createActiveRowHeader(){return ma(this,vr,wa).call(this,this.activeRowHeaders,mS)}getActiveRowHeaders(){return[...this.activeRowHeaders.values()]}createActiveColumnHeader(){return ma(this,vr,wa).call(this,this.activeColumnHeaders,mS)}getActiveColumnHeaders(){return[...this.activeColumnHeaders.values()]}createActiveCornerHeader(){return ma(this,vr,wa).call(this,this.activeCornerHeaders,mS)}getActiveCornerHeaders(){return[...this.activeCornerHeaders.values()]}createRowHighlight(){return ma(this,vr,wa).call(this,this.rowHighlights,G7)}getRowHighlights(){return[...this.rowHighlights.values()]}createColumnHighlight(){return ma(this,vr,wa).call(this,this.columnHighlights,V7)}getColumnHighlights(){return[...this.columnHighlights.values()]}getCustomSelections(){return[...this.customSelections.values()]}addCustomSelection(e){this.customSelections.push(U7({...this.options,...e}))}updateHighlightClassNames(e){"rowClassName"in e&&(this.options.rowClassName=e.rowClassName,O(this.rowHighlights.values(),t=>{t.settings.className=e.rowClassName})),"columnClassName"in e&&(this.options.columnClassName=e.columnClassName,O(this.columnHighlights.values(),t=>{t.settings.className=e.columnClassName})),"headerClassName"in e&&(this.options.headerClassName=e.headerClassName,O(this.rowHeaders.values(),t=>{t.settings.className=e.headerClassName}),O(this.columnHeaders.values(),t=>{t.settings.className=e.headerClassName})),"activeHeaderClassName"in e&&(this.options.activeHeaderClassName=e.activeHeaderClassName,O(this.activeRowHeaders.values(),t=>{t.settings.className=e.activeHeaderClassName}),O(this.activeColumnHeaders.values(),t=>{t.settings.className=e.activeHeaderClassName}),O(this.activeCornerHeaders.values(),t=>{t.settings.className=e.activeHeaderClassName}))}clear(){this.focus.clear(),this.fill.clear(),O(this.areas.values(),e=>{e.clear()}),O(this.layeredAreas.values(),e=>{e.clear()}),O(this.rowHeaders.values(),e=>{e.clear()}),O(this.columnHeaders.values(),e=>{e.clear()}),O(this.activeRowHeaders.values(),e=>{e.clear()}),O(this.activeColumnHeaders.values(),e=>{e.clear()}),O(this.activeCornerHeaders.values(),e=>{e.clear()}),O(this.rowHighlights.values(),e=>{e.clear()}),O(this.columnHighlights.values(),e=>{e.clear()})}[Symbol.iterator](){return[this.focus,this.fill,...this.areas.values(),...this.layeredAreas.values(),...this.rowHeaders.values(),...this.columnHeaders.values(),...this.activeRowHeaders.values(),...this.activeColumnHeaders.values(),...this.activeCornerHeaders.values(),...this.rowHighlights.values(),...this.columnHighlights.values(),...this.customSelections][Symbol.iterator]()}constructor(e){q7(this,vr),this.layerLevel=0,this.layeredAreas=new Map,this.areas=new Map,this.rowHeaders=new Map,this.columnHeaders=new Map,this.activeRowHeaders=new Map,this.activeColumnHeaders=new Map,this.activeCornerHeaders=new Map,this.rowHighlights=new Map,this.columnHighlights=new Map,this.customSelections=[],this.options=e,this.focus=z7(e),this.fill=Y7(e)}}function wa(n,e){const t=this.layerLevel;if(n.has(t))return n.get(t);const o=e({layerLevel:t,...this.options});return n.set(t,o),o}class fx{isEmpty(){return this.size()===0}set(e){return this.clear(),this.ranges.push(this.createCellRange(e)),this}add(e){return this.ranges.push(this.createCellRange(e)),this}push(e){return this.ranges.push(e),this}pop(){return this.ranges.pop()}current(){return this.peekByIndex(this.size()-1)}previous(){return this.peekByIndex(this.size()-2)}includes(e,t=()=>!0){return this.ranges.some((o,i)=>o.includes(e)&&t(o,i))}findAll(e){const t=[];return this.ranges.forEach((o,i)=>{o.isEqual(e)&&t.push({range:o,layer:i})}),t}remove(e){return this.ranges=this.ranges.filter(t=>!e.some(o=>o.isEqual(t))),this}removeLayers(e){return this.ranges=this.ranges.filter((t,o)=>!e.includes(o)),this}clear(){return this.ranges.length=0,this}size(){return this.ranges.length}clone(){const e=new fx(this.createCellRange);return e.ranges=this.ranges.map(t=>t.clone()),e}map(e){return this.ranges=this.ranges.map((t,o)=>e(t,o)),this}peekByIndex(e=0){let t;return e>=0&&e<this.size()&&(t=this.ranges[e]),t}[Symbol.iterator](){return this.ranges[Symbol.iterator]()}constructor(e){this.ranges=[],this.createCellRange=e}}function HB(n,e){if(e.has(n))throw new TypeError("Cannot initialize the same private elements twice on an object")}function X7(n,e){return e.get?e.get.call(n):e.value}function Z7(n,e,t){if(e.set)e.set.call(n,t);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=t}}function AB(n,e,t){if(!e.has(n))throw new TypeError("attempted to "+t+" private field on non-instance");return e.get(n)}function qn(n,e){var t=AB(n,e,"get");return X7(n,t)}function wS(n,e,t){HB(n,e),e.set(n,t)}function Yl(n,e,t){var o=AB(n,e,"set");return Z7(n,o,t),t}function Ot(n,e,t){if(!e.has(n))throw new TypeError("attempted to get private field on non-instance");return t}function ba(n,e){HB(n,e),e.add(n)}var Na=new WeakMap,Gl=new WeakMap,Li=new WeakMap,bS=new WeakSet,CS=new WeakSet,yS=new WeakSet,Wb=new WeakSet,Wf=new WeakSet,qg=new WeakSet,Kg=new WeakSet,_S=new WeakSet,Mh=new WeakSet;class gx{setActiveLayerIndex(e){Yl(this,Gl,e)}getCurrentSelection(){return qn(this,Na).peekByIndex(qn(this,Gl))}transformStart(e,t,o=!1){Yl(this,Li,this.calculateOffset());const i=this.tableApi.createCellCoords(e,t);let s=this.getCurrentSelection().highlight;const r=this.tableApi.visualToRenderableCoords(s);let a=0,l=0;if(this.runLocalHooks("beforeTransformStart",i),r.row!==null&&r.col!==null){let{width:h,height:c}=Ot(this,Wb,kE).call(this);const{row:d,col:u}=Ot(this,_S,UH).call(this,s),f=this.tableApi.fixedRowsBottom(),p=this.tableApi.minSpareRows(),C=this.tableApi.minSpareCols(),_=this.tableApi.autoWrapRow(),S=this.tableApi.autoWrapCol(),T=this.tableApi.createCellCoords(d+i.row,u+i.col);if(T.row>=c){const V=Pi(o&&p>0&&f===0),D=T.col+1,I=D>=h,G=this.tableApi.createCellCoords(T.row-c,I?D-h:D);if(this.runLocalHooks("beforeColumnWrap",V,Ot(this,Mh,wd).call(this,G),I),V.value)this.runLocalHooks("insertRowRequire",this.countRenderableRows());else if(S){if(this.shouldSwitchSelectionLayer()&&I&&qn(this,Na).size()>1){Ot(this,bS,BH).call(this);const z=Ot(this,Wf,yw).call(this,"forward");z!==null&&G.assign(z)}T.assign(G)}}else if(T.row<0){const V=Pi(S),D=T.col-1,I=D<0,G=this.tableApi.createCellCoords(c+T.row,I?h+D:D);if(this.runLocalHooks("beforeColumnWrap",V,Ot(this,Mh,wd).call(this,G),I),S){if(this.shouldSwitchSelectionLayer()&&I&&qn(this,Na).size()>1){Ot(this,CS,VH).call(this);const z=Ot(this,Wf,yw).call(this,"backward");z!==null&&G.assign(z)}T.assign(G)}}if({width:h,height:c}=Ot(this,Wb,kE).call(this),T.col>=h){const V=Pi(o&&C>0),D=T.row+1,I=D>=c,G=this.tableApi.createCellCoords(I?D-c:D,T.col-h);if(this.runLocalHooks("beforeRowWrap",V,Ot(this,Mh,wd).call(this,G),I),V.value)this.runLocalHooks("insertColRequire",this.countRenderableColumns());else if(_){if(this.shouldSwitchSelectionLayer()&&I&&qn(this,Na).size()>1){Ot(this,bS,BH).call(this);const z=Ot(this,Wf,yw).call(this,"forward");z!==null&&G.assign(z)}T.assign(G)}}else if(T.col<0){const V=Pi(_),D=T.row-1,I=D<0,G=this.tableApi.createCellCoords(I?c+D:D,h+T.col);if(this.runLocalHooks("beforeRowWrap",V,Ot(this,Mh,wd).call(this,G),I),_){if(this.shouldSwitchSelectionLayer()&&I&&qn(this,Na).size()>1){Ot(this,CS,VH).call(this);const z=Ot(this,Wf,yw).call(this,"backward");z!==null&&G.assign(z)}T.assign(G)}}const{rowDir:P,colDir:F}=Ot(this,yS,zH).call(this,T);a=P,l=F,s=Ot(this,Mh,wd).call(this,T)}return this.runLocalHooks("afterTransformStart",s,a,l),{selectionLayer:qn(this,Gl),visualCoords:s}}transformEnd(e,t){Yl(this,Li,this.calculateOffset());const o=this.tableApi.createCellCoords(e,t),i=this.getCurrentSelection(),s=this.tableApi.visualToRenderableCoords(i.highlight),r=Ot(this,qg,$b).call(this,i.to.row,i.from.row),a=Ot(this,Kg,Fb).call(this,i.to.col,i.from.col),l=i.to.clone();let h=0,c=0;if(this.runLocalHooks("beforeTransformEnd",o),s.row!==null&&s.col!==null&&r!==null&&a!==null){const{row:d,col:u}=Ot(this,_S,UH).call(this,i.highlight),f=this.tableApi.createCellCoords(r+o.row,a+o.col),p=i.getTopStartCorner(),C=i.getTopEndCorner(),_=i.getBottomEndCorner();if(o.col<0&&a>=u&&f.col<u){const F=f.col-u;f.col=Ot(this,Kg,Fb).call(this,p.col,C.col)+F}else if(o.col>0&&a<=u&&f.col>u){const F=Ot(this,Kg,Fb).call(this,C.col,p.col),V=Math.max(f.col-F,1);f.col=F+V}if(o.row<0&&r>=d&&f.row<d){const F=f.row-d;f.row=Ot(this,qg,$b).call(this,p.row,_.row)+F}else if(o.row>0&&r<=d&&f.row>d){const F=Ot(this,qg,$b).call(this,_.row,p.row),V=Math.max(f.row-F,1);f.row=F+V}const{rowDir:S,colDir:T}=Ot(this,yS,zH).call(this,f);h=S,c=T;const P=Ot(this,Mh,wd).call(this,f);o.row===0&&o.col!==0?l.col=P.col:o.row!==0&&o.col===0?l.row=P.row:(l.row=P.row,l.col=P.col)}return this.runLocalHooks("afterTransformEnd",l,h,c),{selectionLayer:qn(this,Gl),visualCoords:l}}calculateOffset(){U("`calculateOffset` is not implemented")}countRenderableRows(){U("`countRenderableRows` is not implemented")}countRenderableColumns(){U("`countRenderableColumns` is not implemented")}shouldSwitchSelectionLayer(){U("`shouldSwitchSelectionLayer` is not implemented")}constructor(e,t){ba(this,bS),ba(this,CS),ba(this,yS),ba(this,Wb),ba(this,Wf),ba(this,qg),ba(this,Kg),ba(this,_S),ba(this,Mh),wS(this,Na,{writable:!0,value:void 0}),wS(this,Gl,{writable:!0,value:void 0}),wS(this,Li,{writable:!0,value:void 0}),Yl(this,Gl,0),Yl(this,Li,{x:0,y:0}),Yl(this,Na,e),this.tableApi=t}}function BH(){const n=qn(this,Gl)+1;this.setActiveLayerIndex(n>=qn(this,Na).size()?0:n),Yl(this,Li,this.calculateOffset())}function VH(){const n=qn(this,Gl)-1;this.setActiveLayerIndex(n<0?qn(this,Na).size()-1:n),Yl(this,Li,this.calculateOffset())}function zH(n){const{width:e,height:t}=Ot(this,Wb,kE).call(this);let o=0,i=0;return n.row<0?(o=-1,n.row=0):n.row>0&&n.row>=t&&(o=1,n.row=t-1),n.col<0?(i=-1,n.col=0):n.col>0&&n.col>=e&&(i=1,n.col=e-1),{rowDir:o,colDir:i}}function kE(){return{width:qn(this,Li).x+this.countRenderableColumns(),height:qn(this,Li).y+this.countRenderableRows()}}function yw(n){if(!["forward","backward"].includes(n))return null;const e=this.getCurrentSelection().getTopStartCorner(),t=this.getCurrentSelection().getBottomEndCorner(),[o,i,s,r]=n==="forward"?[e.row,t.row,e.col,t.col]:[t.row,e.row,t.col,e.col],a=Ot(this,qg,$b).call(this,o,i),l=Ot(this,Kg,Fb).call(this,s,r);return a===null||l===null?null:this.tableApi.createCellCoords(a,l)}function $b(n,e){const t=this.tableApi.findFirstNonHiddenRenderableRow(n,e);return t===null?null:qn(this,Li).y+t}function Fb(n,e){const t=this.tableApi.findFirstNonHiddenRenderableColumn(n,e);return t===null?null:qn(this,Li).x+t}function UH(n){const{row:e,col:t}=this.tableApi.visualToRenderableCoords(n);return(e===null||t===null)&&U("Renderable coords are not visible."),this.tableApi.createCellCoords(qn(this,Li).y+e,qn(this,Li).x+t)}function wd(n){const e=n.clone();return e.col=n.col-qn(this,Li).x,e.row=n.row-qn(this,Li).y,this.tableApi.renderableToVisualCoords(e)}Ct(gx,$n);class Q7 extends gx{calculateOffset(){return{x:this.tableApi.navigableHeaders()?this.tableApi.countRowHeaders():0,y:this.tableApi.navigableHeaders()?this.tableApi.countColHeaders():0}}countRenderableRows(){return this.tableApi.countRenderableRows()}countRenderableColumns(){return this.tableApi.countRenderableColumns()}shouldSwitchSelectionLayer(){return!1}}class J7 extends gx{calculateOffset(){const e=this.getCurrentSelection(),{row:t,col:o}=e.getOuterTopStartCorner(),i=this.tableApi.countRenderableColumnsInRange(0,o-1),s=this.tableApi.countRenderableRowsInRange(0,t-1),r=e.highlight.isHeader(),a=r?Math.abs(o):0,l=r?Math.abs(t):0;return{x:o<0?a:-i,y:t<0?l:-s}}countRenderableRows(){const e=this.getCurrentSelection();return this.tableApi.countRenderableRowsInRange(0,e.getOuterBottomEndCorner().row)}countRenderableColumns(){const e=this.getCurrentSelection();return this.tableApi.countRenderableColumnsInRange(0,e.getOuterBottomEndCorner().col)}transformEnd(){U("`transformEnd` is not valid for focus selection use `transformStart` instead")}shouldSwitchSelectionLayer(){return!0}}const Uy=0,Yy=1,OB=2,px=3,ej=[px,OB],tj=[["number"],["number","string"],["number","undefined"],["number","string","undefined"]],SS=Symbol("root"),YH=Symbol("child");function Ju(n,e=SS){e!==SS&&e!==YH&&U("The second argument is used internally only and cannot be overwritten.");const t=Array.isArray(n),o=e===SS;let i=Uy;if(t){const s=n[0];n.length===0?i=Yy:o&&s instanceof lf?i=px:o&&Array.isArray(s)?i=Ju(s,YH):n.length>=2&&n.length<=4&&!n.some((a,l)=>!tj[l].includes(typeof a))&&(i=OB)}return i}function em(n,{createCellCoords:e,createCellRange:t,keepDirection:o=!1,propToCol:i}={}){return ej.includes(n)||U("Unsupported selection ranges schema type was provided."),function(s){const r=n===px;let a=r?s.from.row:s[0],l=r?s.from.col:s[1],h=r?s.to.row:s[2],c=r?s.to.col:s[3];if(typeof i=="function"&&(typeof l=="string"&&(l=i(l)),typeof c=="string"&&(c=i(c))),Jt(h)&&(h=a),Jt(c)&&(c=l),!o){const p=a,C=l,_=h,S=c;a=Math.min(p,_),l=Math.min(C,S),h=Math.max(p,_),c=Math.max(C,S)}const d=r?s.highlight.clone():e(a,l),u=e(a,l),f=e(h,c);return t(d,u,f)}}function nj(n){const e=Ju(n.getSelected());if(e===Uy||e===Yy)return[];const t=em(e,{createCellCoords:n._createCellCoords.bind(n),createCellRange:n._createCellRange.bind(n)}),o=new Set;O(n.getSelected(),r=>{const{from:a,to:l}=t(r),h=Math.max(a.col,0),c=l.col-h+1;O(Array.from(new Array(c),(d,u)=>h+u),d=>{o.has(d)||o.add(d)})});const i=Array.from(o).sort((r,a)=>r-a);return $i(i,(r,a,l,h)=>(l!==0&&a===h[l-1]+1?r[r.length-1][1]+=1:r.push([a,1]),r),[])}function oj(n){const e=Ju(n.getSelected());if(e===Uy||e===Yy)return[];const t=em(e,{createCellCoords:n._createCellCoords.bind(n),createCellRange:n._createCellRange.bind(n)}),o=new Set;O(n.getSelected(),r=>{const{from:a,to:l}=t(r),h=Math.max(a.row,0),c=l.row-h+1;O(Array.from(new Array(c),(d,u)=>h+u),d=>{o.has(d)||o.add(d)})});const i=Array.from(o).sort((r,a)=>r-a);return $i(i,(r,a,l,h)=>(l!==0&&a===h[l-1]+1?r[r.length-1][1]+=1:r.push([a,1]),r),[])}function ij(n,e){if(e.has(n))throw new TypeError("Cannot initialize the same private elements twice on an object")}function sj(n,e){return e.get?e.get.call(n):e.value}function rj(n,e,t){if(e.set)e.set.call(n,t);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=t}}function DB(n,e,t){if(!e.has(n))throw new TypeError("attempted to "+t+" private field on non-instance");return e.get(n)}function sn(n,e){var t=DB(n,e,"get");return sj(n,t)}function Ih(n,e,t){ij(n,e),e.set(n,t)}function co(n,e,t){var o=DB(n,e,"set");return rj(n,o,t),t}var Bi=new WeakMap,bd=new WeakMap,$f=new WeakMap,Ca=new WeakMap,Ff=new WeakMap,Cd=new WeakMap,Bf=new WeakMap;class NB{updateHighlightClassNames(){this.highlight.updateHighlightClassNames({rowClassName:this.settings.currentRowClassName,columnClassName:this.settings.currentColClassName,headerClassName:this.settings.currentHeaderClassName,activeHeaderClassName:this.settings.activeHeaderClassName})}getSelectedRange(){return this.selectedRange}getActiveSelectedRange(){return this.selectedRange.peekByIndex(sn(this,Bf))}getActiveSelectionLayerIndex(){return sn(this,Bf)}setActiveSelectionLayerIndex(e){co(this,Bf,e)}markSource(e){co(this,Ff,e)}markEndSource(){co(this,Ff,"unknown")}getSelectionSource(){return sn(this,Ff)}setExpectedLayers(e){co(this,Cd,e)}begin(){this.inProgress=!0}finish(){this.runLocalHooks("afterSelectionFinished",Array.from(this.selectedRange)),this.inProgress=!1,co(this,Cd,-1)}isInProgress(){return this.inProgress}setRangeStart(e,t,o=!1,i=e){const s=this.settings.selectionMode==="multiple",r=Jt(t)?this.tableProps.getShortcutManager().isCtrlPressed():t,a=e.clone();co(this,Ca,!1),co(this,$f,!1),this.runLocalHooks(`beforeSetRangeStart${o?"Only":""}`,a),(!s||s&&!r&&Jt(t))&&(this.selectedRange.clear(),O(this.highlight.getAreas(),l=>{l.clear()}),O(this.highlight.getLayeredAreas(),l=>{l.clear()}),O(this.highlight.getRowHeaders(),l=>{l.clear()}),O(this.highlight.getColumnHeaders(),l=>{l.clear()}),O(this.highlight.getActiveRowHeaders(),l=>{l.clear()}),O(this.highlight.getActiveColumnHeaders(),l=>{l.clear()}),O(this.highlight.getActiveCornerHeaders(),l=>{l.clear()}),O(this.highlight.getRowHighlights(),l=>{l.clear()}),O(this.highlight.getColumnHighlights(),l=>{l.clear()})),this.selectedRange.add(a).current().setHighlight(i.clone()),this.getLayerLevel()===0&&(this.selectedByRowHeader.clear(),this.selectedByColumnHeader.clear()),o||this.setRangeEnd(e)}setRangeStartOnly(e,t,o=e){this.setRangeStart(e,t,!0,o)}setRangeEnd(e,t=this.getLayerLevel()){if(this.selectedRange.isEmpty())return;this.setActiveSelectionLayerIndex(t);const o=e.clone(),i=this.tableProps.countRows(),s=this.tableProps.countCols(),r=this.getActiveSelectedRange().clone().setTo(e).isSingleHeader();if((i>0||s>0)&&(i===0&&o.col<0&&!r||s===0&&o.row<0&&!r))return;this.runLocalHooks("beforeSetRangeEnd",o),this.begin();const a=this.getActiveSelectedRange();if(this.settings.navigableHeaders||a.highlight.normalize(),this.settings.selectionMode==="single")a.setFrom(a.highlight),a.setTo(a.highlight);else{const h=a.getHorizontalDirection(),c=a.getVerticalDirection(),d=this.isMultiple();a.setTo(o),d&&(h!==a.getHorizontalDirection()||a.getWidth()===1&&!a.includes(a.highlight))&&a.from.assign({col:a.highlight.col}),d&&(c!==a.getVerticalDirection()||a.getHeight()===1&&!a.includes(a.highlight))&&a.from.assign({row:a.highlight.row})}i>0&&s>0&&(!this.settings.navigableHeaders||this.settings.navigableHeaders&&!a.isSingleHeader())&&a.to.normalize(),this.runLocalHooks("beforeHighlightSet"),this.setRangeFocus(this.getActiveSelectedRange().highlight,t),this.applyAndCommit(this.getActiveSelectedRange(),t);const l=sn(this,Cd)===-1||this.selectedRange.size()===sn(this,Cd);this.runLocalHooks("afterSetRangeEnd",e,l)}applyAndCommit(e=this.getActiveSelectedRange(),t=this.getLayerLevel()){const o=this.tableProps.countRows(),i=this.tableProps.countCols();this.highlight.useLayerLevel(t);const s=this.highlight.createArea(),r=this.highlight.createLayeredArea(),a=this.highlight.createRowHeader(),l=this.highlight.createColumnHeader(),h=this.highlight.createActiveRowHeader(),c=this.highlight.createActiveColumnHeader(),d=this.highlight.createActiveCornerHeader(),u=this.highlight.createRowHighlight(),f=this.highlight.createColumnHighlight();if(s.clear(),r.clear(),a.clear(),l.clear(),h.clear(),c.clear(),d.clear(),u.clear(),f.clear(),this.highlight.isEnabledFor(ak,e.highlight)&&(this.isMultiple()||t>=1)&&(s.add(e.from).add(e.to).commit(),r.add(e.from).add(e.to).commit(),t===1)){const p=this.selectedRange.peekByIndex(t-1);this.highlight.useLayerLevel(t-1),this.highlight.createArea().add(p.from).commit().syncWith(p),this.highlight.createLayeredArea().add(p.from).commit().syncWith(p),this.highlight.useLayerLevel(t)}if(this.highlight.isEnabledFor(rk,e.highlight)){if(!e.isSingleHeader()){const _=this.tableProps.createCellCoords(Math.max(e.from.row,0),-1),S=this.tableProps.createCellCoords(e.to.row,-1),T=this.tableProps.createCellCoords(-1,Math.max(e.from.col,0)),P=this.tableProps.createCellCoords(-1,e.to.col);this.settings.selectionMode==="single"?(a.add(_).commit(),l.add(T).commit(),u.add(_).commit(),f.add(T).commit()):(a.add(_).add(S).commit(),l.add(T).add(P).commit(),u.add(_).add(S).commit(),f.add(T).add(P).commit())}const p=!sn(this,Ca)&&this.isEntireRowSelected()&&(i>0&&i===e.getWidth()||i===0&&this.isSelectedByRowHeader()),C=!sn(this,Ca)&&this.isEntireColumnSelected()&&(o>0&&o===e.getHeight()||o===0&&this.isSelectedByColumnHeader());p&&h.add(this.tableProps.createCellCoords(Math.max(e.from.row,0),Math.min(-this.tableProps.countRowHeaders(),-1))).add(this.tableProps.createCellCoords(Math.max(e.to.row,0),-1)).commit(),C&&c.add(this.tableProps.createCellCoords(Math.min(-this.tableProps.countColHeaders(),-1),Math.max(e.from.col,0))).add(this.tableProps.createCellCoords(-1,Math.max(e.to.col,0))).commit(),p&&C&&d.add(this.tableProps.createCellCoords(-this.tableProps.countColHeaders(),-this.tableProps.countRowHeaders())).add(this.tableProps.createCellCoords(-1,-1)).commit()}}setRangeFocus(e,t=this.getLayerLevel()){if(this.selectedRange.isEmpty())return;this.setActiveSelectionLayerIndex(t),sn(this,Bi).setActiveLayerIndex(t),sn(this,bd).setActiveLayerIndex(t);const o=this.getActiveSelectedRange();this.inProgress||this.runLocalHooks("beforeSetFocus",e);const i=this.highlight.getFocus();i.clear(),o.setHighlight(e),this.inProgress||this.runLocalHooks("beforeHighlightSet"),this.highlight.isEnabledFor(EC,o.highlight)&&i.add(o.highlight).commit().syncWith(o),this.inProgress||(co(this,$f,!0),this.runLocalHooks("afterSetFocus",o.highlight))}transformStart(e,t,o=!1){if(!this.isSelected())return;const{visualCoords:i}=sn(this,Bi).transformStart(e,t,o);this.setRangeStart(i)}transformEnd(e,t){if(!this.isSelected())return;const{visualCoords:o,selectionLayer:i}=sn(this,Bi).transformEnd(e,t);this.setRangeEnd(o,i)}transformFocus(e,t){if(!this.isSelected())return;const{selectionLayer:o,visualCoords:i}=sn(this,bd).transformStart(e,t);this.setRangeFocus(i.normalize(),o)}shiftRows(e,t){if(!this.isSelected())return;const o=this.getActiveSelectedRange();if(this.isSelectedByCorner())this.selectAll(!0,!0,{disableHeadersHighlight:!0});else if(this.isSelectedByColumnHeader()||o.getOuterTopStartCorner().row>=e){const{from:i,to:s,highlight:r}=o,a=this.tableProps.countRows(),l=this.isSelectedByRowHeader(),h=this.isSelectedByColumnHeader(),c=h?-1:0,d=h?0:t;this.getSelectedRange().pop();const u=this.tableProps.createCellCoords(et(i.row+d,c,a-1),i.col),f=this.tableProps.createCellCoords(et(s.row+t,c,a-1),s.col);this.markSource("shift"),r.row>=e?this.setRangeStartOnly(u,!0,this.tableProps.createCellCoords(et(r.row+t,0,a-1),r.col)):this.setRangeStartOnly(u,!0),l&&this.selectedByRowHeader.add(this.getLayerLevel()),h&&this.selectedByColumnHeader.add(this.getLayerLevel()),this.setRangeEnd(f),this.markEndSource()}}shiftColumns(e,t){if(!this.isSelected())return;const o=this.getActiveSelectedRange();if(this.isSelectedByCorner())this.selectAll(!0,!0,{disableHeadersHighlight:!0});else if(this.isSelectedByRowHeader()||o.getOuterTopStartCorner().col>=e){const{from:i,to:s,highlight:r}=o,a=this.tableProps.countCols(),l=this.isSelectedByRowHeader(),h=this.isSelectedByColumnHeader(),c=l?-1:0,d=l?0:t;this.getSelectedRange().pop();const u=this.tableProps.createCellCoords(i.row,et(i.col+d,c,a-1)),f=this.tableProps.createCellCoords(s.row,et(s.col+t,c,a-1));this.markSource("shift"),r.col>=e?this.setRangeStartOnly(u,!0,this.tableProps.createCellCoords(r.row,et(r.col+t,0,a-1))):this.setRangeStartOnly(u,!0),l&&this.selectedByRowHeader.add(this.getLayerLevel()),h&&this.selectedByColumnHeader.add(this.getLayerLevel()),this.setRangeEnd(f),this.markEndSource()}}getLayerLevel(){return this.selectedRange.size()-1}isSelected(){return!this.selectedRange.isEmpty()}isMultiple(e=this.getActiveSelectedRange()){if(!this.isSelected())return!1;const t=Pi(!e.isSingle());return this.runLocalHooks("afterIsMultipleSelection",t),t.value}isFocusSelectionChanged(){return this.isSelected()&&sn(this,$f)}isSelectedByRowHeader(e=this.getLayerLevel()){return!this.isSelectedByCorner(e)&&(e===-1?this.selectedByRowHeader.size>0:this.selectedByRowHeader.has(e))}isEntireRowSelected(e=this.getLayerLevel()){const t=i=>{const{col:s}=i.getOuterTopStartCorner(),r=this.tableProps.countRowHeaders(),a=this.tableProps.countCols();return(r>0&&s<0||r===0)&&i.getWidth()===a};if(e===-1)return Array.from(this.selectedRange).some(i=>t(i));const o=this.selectedRange.peekByIndex(e);return o?t(o):!1}isSelectedByColumnHeader(e=this.getLayerLevel()){return!this.isSelectedByCorner()&&(e===-1?this.selectedByColumnHeader.size>0:this.selectedByColumnHeader.has(e))}isEntireColumnSelected(e=this.getLayerLevel()){const t=i=>{const{row:s}=i.getOuterTopStartCorner(),r=this.tableProps.countColHeaders(),a=this.tableProps.countRows();return(r>0&&s<0||r===0)&&i.getHeight()===a};if(e===-1)return Array.from(this.selectedRange).some(i=>t(i));const o=this.selectedRange.peekByIndex(e);return o?t(o):!1}isSelectedByAnyHeader(){return this.isSelectedByRowHeader(-1)||this.isSelectedByColumnHeader(-1)||this.isSelectedByCorner()}isSelectedByCorner(){return this.selectedByColumnHeader.has(this.getLayerLevel())&&this.selectedByRowHeader.has(this.getLayerLevel())}inInSelection(e){return this.selectedRange.includes(e)}isCellCornerVisible(){return this.settings.fillHandle&&!this.tableProps.isEditorOpened()&&!this.isMultiple()}isCellVisible(e){const t=this.tableProps.visualToRenderableCoords(e);return t.row!==null&&t.col!==null}isAreaCornerVisible(e){return Number.isInteger(e)&&e!==this.getLayerLevel()?!1:this.settings.fillHandle&&!this.tableProps.isEditorOpened()&&this.isMultiple()}clear(){this.selectedRange.clear(),this.highlight.clear()}deselect(){this.isSelected()&&(this.inProgress=!1,this.clear(),this.runLocalHooks("afterDeselect"))}selectAll(e=!1,t=!1,o={focusPosition:!1,disableHeadersHighlight:!1}){const i=this.tableProps.countRows(),s=this.tableProps.countCols(),r=this.tableProps.countRowHeaders(),a=this.tableProps.countColHeaders(),l=t?-a:0,h=e?-r:0;if(l===0&&h===0&&(i===0||s===0))return;let c=this.getActiveSelectedRange()?.highlight;const{focusPosition:d,disableHeadersHighlight:u}=o;d&&Number.isInteger(d?.row)&&Number.isInteger(d?.col)&&(c=this.tableProps.createCellCoords(et(d.row,l,i-1),et(d.col,h,s-1)));const f=this.tableProps.createCellCoords(l,h),p=this.tableProps.createCellCoords(i-1,s-1);this.clear(),this.runLocalHooks("beforeSelectAll",f,p,c),this.setRangeStartOnly(f,void 0,c),co(this,Ca,u),h<0&&this.selectedByRowHeader.add(this.getLayerLevel()),l<0&&this.selectedByColumnHeader.add(this.getLayerLevel()),this.setRangeEnd(p),this.runLocalHooks("afterSelectAll",f,p,c),this.finish()}selectCells(e){const t=Ju(e);if(t===Yy)return!1;t===Uy&&U(pt`Unsupported format of the selection ranges was passed. To select cells pass\x20
|
|
38
|
+
the coordinates as an array of arrays ([[rowStart, columnStart/columnPropStart, rowEnd,\x20
|
|
39
|
+
columnEnd/columnPropEnd]]) or as an array of CellRange objects.`);const o=em(t,{createCellCoords:(...a)=>this.tableProps.createCellCoords(...a),createCellRange:(...a)=>this.tableProps.createCellRange(...a),propToCol:a=>this.tableProps.propToCol(a),keepDirection:!0}),i=this.settings.navigableHeaders,s={countRows:this.tableProps.countRows(),countCols:this.tableProps.countCols(),countRowHeaders:i?this.tableProps.countRowHeaders():0,countColHeaders:i?this.tableProps.countColHeaders():0},r=!e.some(a=>{const l=o(a),h=l.isValid(s);return!(h&&!l.containsHeaders()||h&&l.containsHeaders()&&l.isSingleHeader())});return r&&(this.clear(),this.setExpectedLayers(e.length),O(e,a=>{const{from:l,to:h}=o(a);this.setRangeStartOnly(l.clone(),!1),this.setRangeEnd(h.clone())}),this.finish()),r}selectColumns(e,t=e,o=0){const i=typeof e=="string"?this.tableProps.propToCol(e):e,s=typeof t=="string"?this.tableProps.propToCol(t):t,r=this.tableProps.countRows(),a=this.tableProps.countCols(),l=this.tableProps.countColHeaders(),h=l===0?0:-l,c=this.tableProps.createCellCoords(h,i),d=this.tableProps.createCellCoords(r-1,s),u=this.tableProps.createCellRange(c,c,d).isValid({countRows:r,countCols:a,countRowHeaders:0,countColHeaders:l});if(u){let f=0,p=0;Number.isInteger(o?.row)&&Number.isInteger(o?.col)?(f=et(o.row,h,r-1),p=et(o.col,Math.min(i,s),Math.max(i,s))):(f=et(o,h,r-1),p=i);const C=this.tableProps.createCellCoords(f,p),_=l===0?0:et(C.row,h,-1),S=r-1,T=this.tableProps.createCellCoords(_,i),P=this.tableProps.createCellCoords(S,s);this.runLocalHooks("beforeSelectColumns",T,P,C),this.setRangeStartOnly(T,void 0,C),this.selectedByColumnHeader.add(this.getLayerLevel()),this.setRangeEnd(P),this.runLocalHooks("afterSelectColumns",T,P,C),this.finish()}return u}selectRows(e,t=e,o=0){const i=this.tableProps.countRows(),s=this.tableProps.countCols(),r=this.tableProps.countRowHeaders(),a=r===0?0:-r,l=this.tableProps.createCellCoords(e,a),h=this.tableProps.createCellCoords(t,s-1),c=this.tableProps.createCellRange(l,l,h).isValid({countRows:i,countCols:s,countRowHeaders:r,countColHeaders:0});if(c){let d=0,u=0;Number.isInteger(o?.row)&&Number.isInteger(o?.col)?(d=et(o.row,Math.min(e,t),Math.max(e,t)),u=et(o.col,a,s-1)):(d=e,u=et(o,a,s-1));const f=this.tableProps.createCellCoords(d,u),p=r===0?0:et(f.col,a,-1),C=s-1,_=this.tableProps.createCellCoords(e,p),S=this.tableProps.createCellCoords(t,C);this.runLocalHooks("beforeSelectRows",_,S,f),this.setRangeStartOnly(_,void 0,f),this.selectedByRowHeader.add(this.getLayerLevel()),this.setRangeEnd(S),this.runLocalHooks("afterSelectRows",_,S,f),this.finish()}return c}importSelection({ranges:e,activeRange:t,activeSelectionLayer:o,selectedByRowHeader:i,selectedByColumnHeader:s,disableHeadersHighlight:r}){e.length!==0&&(this.selectedRange.clear(),this.highlight.clear(),this.inProgress=!1,co(this,Ca,r),this.selectedByRowHeader=new Set(i),this.selectedByColumnHeader=new Set(s),this.setActiveSelectionLayerIndex(0),e.forEach((a,l)=>{this.selectedRange.push(a),this.applyAndCommit(a,l)}),this.setRangeFocus(t.highlight,o),co(this,Ca,!1),this.inProgress=!1)}exportSelection(){return{ranges:Array.from(this.selectedRange).map(e=>e.clone()),activeRange:this.getActiveSelectedRange(),activeSelectionLayer:this.getActiveSelectionLayerIndex(),selectedByRowHeader:Array.from(this.selectedByRowHeader),selectedByColumnHeader:Array.from(this.selectedByColumnHeader),disableHeadersHighlight:sn(this,Ca)}}refresh(){if(!this.isSelected())return;const e=this.tableProps.countRows(),t=this.tableProps.countCols();if(e===0||t===0){this.deselect();return}const o=this.selectedRange.ranges.map(a=>a.clone());this.getSelectionSource()==="unknown"&&this.markSource("refresh");const s=new Set(this.selectedByRowHeader),r=new Set(this.selectedByColumnHeader);this.clear(),this.setExpectedLayers(o.length),o.forEach(a=>{const{from:l,to:h,highlight:c}=a,d=e-1,u=t-1;c.assign({row:et(c.row,this.settings.navigableHeaders?-1/0:0,d),col:et(c.col,this.settings.navigableHeaders?-1/0:0,u)}),l.assign({row:et(l.row,-1/0,d),col:et(l.col,-1/0,u)}),h.assign({row:et(h.row,-1/0,d),col:et(h.col,-1/0,u)}),this.setRangeStartOnly(l,!0,c),this.setRangeEnd(h)}),this.selectedByRowHeader=s,this.selectedByColumnHeader=r,this.finish(),this.markEndSource()}commit(){if(this.highlight.getCustomSelections().forEach(i=>{i.commit()}),!this.isSelected())return;const t=this.getLayerLevel(),o=this.getActiveSelectedRange();this.highlight.isEnabledFor(EC,o.highlight)&&this.highlight.getFocus().commit().syncWith(o);for(let i=0;i<this.selectedRange.size();i+=1){this.highlight.useLayerLevel(i);const s=this.highlight.createArea(),r=this.highlight.createLayeredArea(),a=this.highlight.createRowHeader(),l=this.highlight.createColumnHeader(),h=this.highlight.createActiveRowHeader(),c=this.highlight.createActiveColumnHeader(),d=this.highlight.createActiveCornerHeader(),u=this.highlight.createRowHighlight(),f=this.highlight.createColumnHighlight();s.commit(),r.commit(),a.commit(),l.commit(),h.commit(),c.commit(),d.commit(),u.commit(),f.commit()}this.highlight.useLayerLevel(t)}constructor(e,t){Ih(this,Bi,{writable:!0,value:void 0}),Ih(this,bd,{writable:!0,value:void 0}),Ih(this,$f,{writable:!0,value:void 0}),Ih(this,Ca,{writable:!0,value:void 0}),Ih(this,Ff,{writable:!0,value:void 0}),Ih(this,Cd,{writable:!0,value:void 0}),Ih(this,Bf,{writable:!0,value:void 0}),this.inProgress=!1,this.selectedRange=new fx((o,i,s)=>this.tableProps.createCellRange(o,i,s)),this.selectedByRowHeader=new Set,this.selectedByColumnHeader=new Set,co(this,$f,!1),co(this,Ca,!1),co(this,Ff,"unknown"),co(this,Cd,-1),co(this,Bf,0),this.settings=e,this.tableProps=t,this.highlight=new K7({headerClassName:e.currentHeaderClassName,activeHeaderClassName:e.activeHeaderClassName,rowClassName:e.currentRowClassName,columnClassName:e.currentColClassName,cellAttributes:[U0()],rowIndexMapper:this.tableProps.rowIndexMapper,columnIndexMapper:this.tableProps.columnIndexMapper,disabledCellSelection:(o,i)=>this.tableProps.isDisabledCellSelection(o,i),cellCornerVisible:(...o)=>this.isCellCornerVisible(...o),areaCornerVisible:(...o)=>this.isAreaCornerVisible(...o),visualToRenderableCoords:o=>this.tableProps.visualToRenderableCoords(o),renderableToVisualCoords:o=>this.tableProps.renderableToVisualCoords(o),createCellCoords:(o,i)=>this.tableProps.createCellCoords(o,i),createCellRange:(o,i,s)=>this.tableProps.createCellRange(o,i,s)}),co(this,Bi,new Q7(this.selectedRange,{...this.tableProps,navigableHeaders:()=>e.navigableHeaders,fixedRowsBottom:()=>e.fixedRowsBottom,minSpareRows:()=>e.minSpareRows,minSpareCols:()=>e.minSpareCols,autoWrapRow:()=>e.autoWrapRow,autoWrapCol:()=>e.autoWrapCol})),co(this,bd,new J7(this.selectedRange,{...this.tableProps,navigableHeaders:()=>e.navigableHeaders,fixedRowsBottom:()=>0,minSpareRows:()=>0,minSpareCols:()=>0,autoWrapRow:()=>!0,autoWrapCol:()=>!0})),sn(this,Bi).addLocalHook("beforeTransformStart",(...o)=>this.runLocalHooks("beforeModifyTransformStart",...o)),sn(this,Bi).addLocalHook("afterTransformStart",(...o)=>this.runLocalHooks("afterModifyTransformStart",...o)),sn(this,Bi).addLocalHook("beforeTransformEnd",(...o)=>this.runLocalHooks("beforeModifyTransformEnd",...o)),sn(this,Bi).addLocalHook("afterTransformEnd",(...o)=>this.runLocalHooks("afterModifyTransformEnd",...o)),sn(this,Bi).addLocalHook("insertRowRequire",(...o)=>this.runLocalHooks("insertRowRequire",...o)),sn(this,Bi).addLocalHook("insertColRequire",(...o)=>this.runLocalHooks("insertColRequire",...o)),sn(this,Bi).addLocalHook("beforeRowWrap",(...o)=>this.runLocalHooks("beforeRowWrap",...o)),sn(this,Bi).addLocalHook("beforeColumnWrap",(...o)=>this.runLocalHooks("beforeColumnWrap",...o)),sn(this,bd).addLocalHook("beforeTransformStart",(...o)=>this.runLocalHooks("beforeModifyTransformFocus",...o)),sn(this,bd).addLocalHook("afterTransformStart",(...o)=>this.runLocalHooks("afterModifyTransformFocus",...o))}}Ct(NB,$n);const GH=/^(\r\n|\n\r|\r|\n)/,aj=/^[^\t\r\n]+/,jH=/^\t/;function lj(n){const e=[[""]];if(n.length===0)return e;let t=0,o=0,i;for(;n.length>0&&i!==n.length;)if(i=n.length,n.match(jH))n=n.replace(jH,""),t+=1,e[o][t]="";else if(n.match(GH))n=n.replace(GH,""),t=0,o+=1,e[o]=[""];else{let s="";if(n.startsWith('"')){let r=0,a=!0;for(;a;){const l=n.slice(0,1);l==='"'&&(r+=1),s+=l,n=n.slice(1),(n.length===0||n.match(/^[\t\r\n]/)&&r%2===0)&&(a=!1)}s=s.replace(/^"/,"").replace(/"$/,"").replace(/["]*/g,l=>new Array(Math.floor(l.length/2)).fill('"').join(""))}else{const r=n.match(aj);s=r?r[0]:"",n=n.slice(s.length)}e[o][t]=s}return e}function AC(n){let e,t,o,i,s="",r;for(e=0,t=n.length;e<t;e+=1){for(i=n[e].length,o=0;o<i;o+=1)o>0&&(s+=" "),r=n[e][o],typeof r=="string"?r.indexOf(`
|
|
40
|
+
`)>-1?s+=`"${r.replace(/"/g,'""')}"`:s+=r:r==null?s+="":s+=r;e!==t-1&&(s+=`
|
|
41
|
+
`)}return s}function vS(n,e){const{instance:t,visualRow:o,visualCol:i,valueSetter:s}=e;return ye(s)?s.call(t,n,o,i,e):n}function Gy(n,e){const{instance:t,visualRow:o,visualCol:i,valueGetter:s}=e;return ye(s)?s.call(t,n,o,i,e):n}class Mu{static get DESTINATION_RENDERER(){return 1}static get DESTINATION_CLIPBOARD_GENERATOR(){return 2}createMap(){const e=this.getSchema();typeof e>"u"&&U("trying to create `columns` definition but you didn't provide `schema` nor `data`");const t=this.tableMeta.columns;let o;if(this.colToPropCache=[],this.propToColCache=new Map,t){let i=0,s=0,r=!1;if(typeof t=="function"){const a=Y0(e);i=a>0?a:this.countFirstRowKeys(),r=!0}else{const a=this.tableMeta.maxCols;i=Math.min(a,t.length)}for(o=0;o<i;o++){const a=r?t(o):t[o];if(ne(a)){if(typeof a.data<"u"){const l=r?s:o;this.colToPropCache[l]=a.data,this.propToColCache.set(a.data,l)}s+=1}}}else this.recursiveDuckColumns(e)}countFirstRowKeys(){return hB(this.dataSource)}recursiveDuckColumns(e,t,o){let i=t,s=o,r;return typeof i>"u"&&(i=0,s=""),typeof e=="object"&&!Array.isArray(e)&&tt(e,(a,l)=>{a===null?(r=s+l,this.colToPropCache.push(r),this.propToColCache.set(r,i),i+=1):i=this.recursiveDuckColumns(a,i,`${l}.`)}),i}colToProp(e){if(Number.isInteger(e)===!1)return e;const t=this.hot.toPhysicalColumn(e);return t===null?e:this.colToPropCache&&J(this.colToPropCache[t])?this.colToPropCache[t]:t}propToCol(e){const t=this.propToColCache.get(e);if(J(t))return this.hot.toVisualColumn(t);const o=this.hot.toVisualColumn(e);return o===null?e:o}getSchema(){const e=this.tableMeta.dataSchema;return e?typeof e=="function"?e():e:this.duckSchema}createDuckSchema(){return this.dataSource&&this.dataSource[0]?Gp(this.dataSource[0]):{}}refreshDuckSchema(){this.duckSchema=this.createDuckSchema()}createRow(e,t=1,{source:o,mode:i="above"}={}){const s=this.hot.countSourceRows();let r=s,a=0,l=e;if((typeof l!="number"||l>=s)&&(l=s),l<this.hot.countRows()&&(r=this.hot.toPhysicalRow(l)),this.hot.runHooks("beforeCreateRow",l,t,o)===!1||r===null)return{delta:0};const c=this.tableMeta.maxRows,d=this.getSchema().length,u=[];for(;a<t&&s+a<c;){let p=null;this.hot.dataType==="array"?this.tableMeta.dataSchema?p=Qn(this.getSchema()):(p=[],Ee(d-1,()=>p.push(null))):this.hot.dataType==="function"?p=this.tableMeta.dataSchema(l+a):(p={},Hy(p,this.getSchema())),u.push(p),a+=1}this.hot.rowIndexMapper.insertIndexes(l,a),i==="below"&&(r=Math.min(r+1,s)),this.spliceData(r,0,u);const f=this.hot.toVisualRow(r);return this.hot.countSourceRows()===u.length&&this.hot.columnIndexMapper.initToLength(this.hot.getInitialColumnCount()),a>0&&(e==null?this.metaManager.createRow(null,a):o!=="auto"&&this.metaManager.createRow(r,t)),this.hot.runHooks("afterCreateRow",f,a,o),{delta:a,startPhysicalIndex:r}}createCol(e,t=1,{source:o,mode:i="start"}={}){this.hot.isColumnModificationAllowed()||U("Cannot create new column. When data source in an object, you can only have as much columns as defined in first data row, data schema or in the 'columns' setting.If you want to be able to add new columns, you have to use array datasource.");const s=this.dataSource,r=this.tableMeta.maxCols,a=this.hot.countSourceCols(),l=this.hot.countCols(),h=this.hot.countSourceRows(),c=typeof e=="number"&&e<=a?e:l;if(this.hot.runHooks("beforeCreateCol",c,t,o)===!1)return{delta:0};const d=c<l?this.hot.toPhysicalColumn(c):a,u=i==="end"?Math.min(d+1,a):d;let f=0;for(let p=u;f<t&&l+f<r;p++){if(typeof c!="number"||c>=l+f)if(h>0)for(let C=0;C<h;C+=1)typeof s[C]>"u"&&(s[C]=[]),s[C].push(null);else s.push([null]);else for(let C=0;C<h;C++)s[C].splice(p,0,null);f+=1}return f>0&&(e==null?this.metaManager.createColumn(null,f):o!=="auto"&&this.metaManager.createColumn(u,t)),this.hot.columnIndexMapper.insertIndexes(c,f,i),this.hot.runHooks("afterCreateCol",this.hot.toVisualColumn(u),f,o),this.refreshDuckSchema(),{delta:f,startPhysicalIndex:u}}removeRow(e,t=1,o){let i=Number.isInteger(e)?e:-t;const s=this.visualRowsToPhysical(i,t),r=this.hot.countSourceRows();if(i=(r+i)%r,this.hot.runHooks("beforeRemoveRow",i,s.length,s,o)===!1)return!1;const l=s.length;if(this.filterData(i,l,s),i<this.hot.countRows()){this.hot.rowIndexMapper.removeIndexes(s);const c=J(this.tableMeta.columns)||J(this.tableMeta.dataSchema)||this.tableMeta.colHeaders;this.hot.rowIndexMapper.getNotTrimmedIndexesLength()===0&&!c&&this.hot.columnIndexMapper.setIndexesSequence([])}return s.slice(0).sort((c,d)=>d-c).forEach(c=>{this.metaManager.removeRow(c,1)}),this.hot.runHooks("afterRemoveRow",i,l,s,o),!0}removeCol(e,t=1,o){(this.hot.dataType==="object"||this.tableMeta.columns)&&U("cannot remove column with object data source or columns option specified");let i=typeof e!="number"?-t:e;i=(this.hot.countCols()+i)%this.hot.countCols();const s=this.visualColumnsToPhysical(i,t),r=s.slice(0).sort((d,u)=>u-d);if(this.hot.runHooks("beforeRemoveCol",i,t,s,o)===!1)return!1;let l=!0;const h=r.length,c=this.dataSource;for(let d=0;d<h;d++)l&&s[0]!==s[d]-d&&(l=!1);if(l)for(let d=0,u=this.hot.countSourceRows();d<u;d++)c[d].splice(s[0],t),d===0&&this.metaManager.removeColumn(s[0],t);else for(let d=0,u=this.hot.countSourceRows();d<u;d++)for(let f=0;f<h;f++)c[d].splice(r[f],1),d===0&&this.metaManager.removeColumn(r[f],1);return i<this.hot.countCols()&&(this.hot.columnIndexMapper.removeIndexes(s),!this.tableMeta.rowHeaders&&this.hot.columnIndexMapper.getNotTrimmedIndexesLength()===0&&this.hot.rowIndexMapper.setIndexesSequence([])),this.hot.runHooks("afterRemoveCol",i,t,s,o),this.refreshDuckSchema(),!0}spliceCol(e,t,o,...i){const s=this.hot.getDataAtCol(e),r=s.slice(t,t+o),a=s.slice(t+o);AI(i,a);let l=0;for(;l<o;)i.push(null),l+=1;return hG(i),this.hot.populateFromArray(t,e,i,null,null,"spliceCol"),r}spliceRow(e,t,o,...i){const s=this.hot.getSourceDataAtRow(e),r=s.slice(t,t+o),a=s.slice(t+o);AI(i,a);let l=0;for(;l<o;)i.push(null),l+=1;return this.hot.populateFromArray(e,t,[i],null,null,"spliceRow"),r}spliceData(e,t,o){if(this.hot.runHooks("beforeDataSplice",e,t,o)!==!1){const s=[...this.dataSource.slice(0,e),...o,...this.dataSource.slice(e)];this.dataSource.length=0,s.forEach(r=>this.dataSource.push(r))}}filterData(e,t,o){let i=this.hot.runHooks("filterData",e,t,o);Array.isArray(i)===!1&&(i=this.dataSource.filter((s,r)=>o.indexOf(r)===-1)),this.dataSource.length=0,Array.prototype.push.apply(this.dataSource,i)}get(e,t){const o=this.hot.toPhysicalRow(e);let i=this.dataSource[o];const s=this.hot.runHooks("modifyRowData",o);i=isNaN(s)?s:i;const{dataDotNotation:r}=this.hot.getSettings();let a=null;if(i&&i.hasOwnProperty&&en(i,t))a=i[t];else if(r&&typeof t=="string"&&t.indexOf(".")>-1){let c=i;if(!c)return null;const d=t.split(".");for(let u=0,f=d.length;u<f;u++)if(c=c[d[u]],typeof c>"u")return null;a=c}else typeof t=="function"&&(a=t(this.dataSource.slice(o,o+1)[0]));const l=this.propToCol(t),h=this.hot.toPhysicalColumn(l);if(Lu(o)&&Lu(h)&&(a=Gy(a,this.metaManager.getCellMeta(o,h,{visualRow:e,visualColumn:l,skipMetaExtension:!0}))),this.hot.hasHook("modifyData")){const c=Pi(a);this.hot.runHooks("modifyData",e,l,c,"get"),c.isTouched()&&(a=c.value)}return a}getCopyable(e,t){return this.hot.getCellMeta(e,this.propToCol(t)).copyable?this.get(e,t):""}set(e,t,o){const i=this.hot.toPhysicalRow(e);let s=o,r=this.dataSource[i];const a=this.hot.runHooks("modifyRowData",i);if(r=isNaN(a)?a:r,this.hot.hasHook("modifyData")){const h=Pi(s);this.hot.runHooks("modifyData",e,this.propToCol(t),h,"set"),h.isTouched()&&(s=h.value)}const{dataDotNotation:l}=this.hot.getSettings();if(r&&r.hasOwnProperty&&en(r,t))r[t]=s;else if(l&&typeof t=="string"&&t.indexOf(".")>-1){let h=r,c=0,d;const u=t.split(".");for(c=0,d=u.length-1;c<d;c++){if(u[c]==="__proto__"||u[c]==="constructor"||u[c]==="prototype")return;typeof h[u[c]]>"u"&&(h[u[c]]={}),h=h[u[c]]}h[u[c]]=s}else if(typeof t=="function")t(this.dataSource.slice(i,i+1)[0],s);else{if(t==="__proto__"||t==="constructor"||t==="prototype")return;r[t]=s}}visualRowsToPhysical(e,t){const o=this.hot.countSourceRows(),i=[];let s=(o+e)%o,r=t,a;for(;s<o&&r;)a=this.hot.toPhysicalRow(s),i.push(a),r-=1,s+=1;return i}visualColumnsToPhysical(e,t){const o=this.hot.countCols(),i=[];let s=(o+e)%o,r=t;for(;s<o&&r;){const a=this.hot.toPhysicalColumn(s);i.push(a),r-=1,s+=1}return i}clear(){for(let e=0;e<this.hot.countSourceRows();e++)for(let t=0;t<this.hot.countCols();t++)this.set(e,this.colToProp(t),"")}getLength(){const e=this.tableMeta.maxRows;let t;e<0||e===0?t=0:t=e||1/0;const o=this.hot.rowIndexMapper.getNotTrimmedIndexesLength();return Math.min(o,t)}getAll(){const e={row:0,col:0},t={row:Math.max(this.hot.countRows()-1,0),col:Math.max(this.hot.countCols()-1,0)};return e.row-t.row===0&&!this.hot.countSourceRows()?[]:this.getRange(e,t,Mu.DESTINATION_RENDERER)}countCachedColumns(){return this.colToPropCache.length}getRange(e,t,o){const i=[];let s,r,a;const l=this.tableMeta.maxRows,h=this.tableMeta.maxCols;if(l===0||h===0)return[];const c=o===Mu.DESTINATION_CLIPBOARD_GENERATOR?this.getCopyable:this.get,d=Math.min(Math.max(l-1,0),Math.max(e.row,t.row)),u=Math.min(Math.max(h-1,0),Math.max(e.col,t.col));for(s=Math.min(e.row,t.row);s<=d;s++){a=[];const f=s>=0?this.hot.toPhysicalRow(s):s;for(r=Math.min(e.col,t.col);r<=u&&f!==null;r++)a.push(c.call(this,s,this.colToProp(r)));f!==null&&i.push(a)}return i}getText(e,t){return AC(this.getRange(e,t,Mu.DESTINATION_RENDERER))}getCopyableText(e,t){return AC(this.getRange(e,t,Mu.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}constructor(e,t,o){this.hot=e,this.metaManager=o,this.tableMeta=o.getTableMeta(),this.dataSource=t,this.refreshDuckSchema(),this.createMap()}}class hj{modifyRowData(e){let t;return this.hot.hasHook("modifyRowData")&&(t=this.hot.runHooks("modifyRowData",e)),t!==void 0&&!Number.isInteger(t)?t:this.data[e]}getData(e=!1){return!this.data||this.data.length===0?this.data:this.getByRange(null,null,e)}setData(e){this.data=e}getAtColumn(e){const t=[];return O(this.data,(o,i)=>{const s=this.getAtCell(i,e);t.push(s)}),t}getAtRow(e,t,o,i=!1){const s=t===void 0&&o===void 0,{dataDotNotation:r}=this.hot.getSettings();let a=null,l=null;if(a=this.modifyRowData(e),Array.isArray(a))l=[],s?a.forEach((h,c)=>{l[c]=this.getAtPhysicalCell(e,c,a)}):Ee(t,o,h=>{l[h-t]=this.getAtPhysicalCell(e,h,a)});else if(ne(a)||ye(a))if(i?l=[]:l={},!s||i){const c=this.countFirstRowKeys()-1;Ee(0,c,d=>{const u=this.colToProp(d);if(d>=(t||0)&&d<=(o||c)&&!Number.isInteger(u)){const f=this.getAtPhysicalCell(e,u,a);i?l.push(f):r?Y_(l,u,f):l[u]=f}})}else tt(a,(h,c)=>{const d=this.getAtPhysicalCell(e,c,a);r?Y_(l,c,d):l[c]=d});return l}setAtCell(e,t,o){if(e>=this.countRows()||t>=this.countFirstRowKeys())return;if(this.hot.hasHook("modifySourceData")){const s=Pi(o);this.hot.runHooks("modifySourceData",e,t,s,"set"),s.isTouched()&&(o=s.value)}if(["__proto__","constructor","prototype"].includes(e))return;const i=this.modifyRowData(e);Number.isInteger(t)?i[t]=o:Y_(i,t,o)}getAtPhysicalCell(e,t,o){let i=null;if(o)if(typeof t=="string"){const{dataDotNotation:s}=this.hot.getSettings();i=s?CC(o,t):o[t]}else typeof t=="function"?i=t(o):i=o[t];if(this.hot.hasHook("modifySourceData")){const s=Pi(i);this.hot.runHooks("modifySourceData",e,t,s,"get"),s.isTouched()&&(i=s.value)}return i}getAtCell(e,t){const o=this.modifyRowData(e);return this.getAtPhysicalCell(e,this.colToProp(t),o)}getByRange(e=null,t=null,o=!1){let i=!1,s=null,r=null,a=null,l=null;e===null||t===null?(i=!0,s=0,a=this.countRows()-1):(s=Math.min(e.row,t.row),r=Math.min(e.col,t.col),a=Math.max(e.row,t.row),l=Math.max(e.col,t.col));const h=[];return Ee(s,a,c=>{h.push(i?this.getAtRow(c,void 0,void 0,o):this.getAtRow(c,r,l,o))}),h}getCopyable(e,t){const o=this.propToCol(t);return this.hot.getCellMeta(e,o).copyable?this.getAtCell(this.hot.toPhysicalRow(e),o):""}countRows(){if(this.hot.hasHook("modifySourceLength")){const e=this.hot.runHooks("modifySourceLength");if(Number.isInteger(e))return e}return this.data.length}countFirstRowKeys(){return hB(this.data)}destroy(){this.data=null,this.hot=null}constructor(e,t=[]){this.dataType="array",this.colToProp=()=>{},this.propToCol=()=>{},this.hot=e,this.data=t}}const{register:cj,getItem:dj,hasItem:PB,getNames:Kye,getValues:Xye}=ts("cellTypes");function uj(n){return PB(n)||U(`You declared cell type "${n}" as a string that is not mapped to a known object.
|
|
42
|
+
Cell type must be an object or a string mapped to an object registered by
|
|
43
|
+
"Handsontable.cellTypes.registerCellType" method`),dj(n)}function Ei(n,e){typeof n!="string"&&(e=n,n=e.CELL_TYPE);const{editor:t,renderer:o,validator:i}=e;t&&Bo(n,t),o&&ai(n,o),i&&Aa(n,i),cj(n,e)}function fj(n,e){return n==="CELL_TYPE"?!1:e._automaticallyAssignedMetaProps?.has(n)||!en(e,n)}function jy(n,e,t=n){const o=typeof e.type=="string"?uj(e.type):e.type;if(n._automaticallyAssignedMetaProps&&tt(e,(s,r)=>{n._automaticallyAssignedMetaProps.delete(r)}),!ne(o))return;t===n&&!n._automaticallyAssignedMetaProps&&(n._automaticallyAssignedMetaProps=new Set);const i={};tt(o,(s,r)=>{fj(r,t)&&(i[r]=s,n._automaticallyAssignedMetaProps?.add(r))}),Wn(n,i)}function gj(n,e=[]){function t(){}jG(t,n);for(let o=0;o<e.length;o++)t.prototype[e[o]]=void 0;return t}function Bb(n,e){n()||U(`Assertion failed: ${e}`)}function Xg(n){return n==null}const LB=(()=>({_automaticallyAssignedMetaProps:void 0,activeHeaderClassName:"ht__active_highlight",allowEmpty:!0,allowHtml:!1,allowInsertColumn:!0,allowInsertRow:!0,allowInvalid:!0,allowRemoveColumn:!0,allowRemoveRow:!0,ariaTags:!0,autoColumnSize:void 0,autoRowSize:void 0,autoWrapCol:!1,autoWrapRow:!1,bindRowsWithHeaders:void 0,cell:[],cells:void 0,checkedTemplate:void 0,className:void 0,colHeaders:null,collapsibleColumns:void 0,columnHeaderHeight:void 0,columns:void 0,columnSorting:void 0,columnSummary:void 0,colWidths:void 0,commentedCellClassName:"htCommentCell",comments:!1,contextMenu:void 0,copyable:!0,copyPaste:!0,correctFormat:!1,currentColClassName:void 0,currentHeaderClassName:"ht__highlight",currentRowClassName:void 0,customBorders:!1,data:void 0,dataProvider:void 0,dataDotNotation:!0,dataSchema:void 0,dateFormat:"DD/MM/YYYY",timeFormat:"h:mm:ss a",datePickerConfig:void 0,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,headerClassName:void 0,height:void 0,hiddenColumns:void 0,hiddenRows:void 0,initialState:void 0,invalidCellClassName:"htInvalid",imeFastEdit:!1,isEmptyCol(n){let e,t,o;const i=!!this.getSettings().dataSchema,s=this.getSchema(),r=this.colToProp(n);for(e=0,t=this.countRows();e<t;e++)if(o=this.getDataAtCell(e,n),ht(o)===!1){if(typeof o=="object"){if(uh(s[r],o)===!1)return!1;continue}if(i&&s[r]===o)continue;return!1}return!0},isEmptyRow(n){let e,t,o;const i=!!this.getSettings().dataSchema,s=this.getSchema();for(e=0,t=this.countCols();e<t;e++)if(o=this.getDataAtCell(n,e),ht(o)===!1){const r=this.colToProp(e);if(typeof o=="object"){if(uh(s[r],o)===!1)return!1;continue}if(i&&s[r]===o)continue;return!1}return!0},label:void 0,language:"en-US",layoutDirection:"inherit",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}));function pj(){return class{}}class mj{getMetaConstructor(){return this.metaCtor}getMeta(){return this.meta}updateMeta(e){Wn(this.meta,e),jy(this.meta,{...e,type:e.type??this.meta.type},e)}constructor(e){this.metaCtor=pj(),this.meta=this.metaCtor.prototype,Wn(this.meta,LB()),this.meta.instance=e}}class wj{getMeta(){return this.meta}updateMeta(e){Wn(this.meta,e),jy(this.meta,e,e)}constructor(e){const t=e.getMetaConstructor();this.meta=new t}}class OC{obtain(e){Bb(()=>Lu(e),"Expecting an unsigned number.");const t=this._getStorageIndexByKey(e);let o;if(t>=0)o=this.data[t],o===void 0&&(o=this.valueFactory(e),this.data[t]=o);else if(o=this.valueFactory(e),this.holes.size>0){const i=this.holes.values().next().value;this.holes.delete(i),this.data[i]=o,this.index[e]=i}else this.data.push(o),this.index[e]=this.data.length-1;return o}insert(e,t=1){Bb(()=>Lu(e)||Xg(e),"Expecting an unsigned number or null/undefined argument.");const o=[],i=this.data.length;for(let r=0;r<t;r++)o.push(i+r),this.data.push(void 0);const s=Xg(e)?this.index.length:e;this.index=[...this.index.slice(0,s),...o,...this.index.slice(s)]}remove(e,t=1){Bb(()=>Lu(e)||Xg(e),"Expecting an unsigned number or null/undefined argument.");const o=this.index.splice(Xg(e)?this.index.length-t:e,t);for(let i=0;i<o.length;i++){const s=o[i];typeof s=="number"&&this.holes.add(s)}}size(){return this.data.length-this.holes.size}values(){return this.data.filter((e,t)=>e!==void 0&&!this.holes.has(t))[Symbol.iterator]()}entries(){const e=[];for(let o=0;o<this.data.length;o++){const i=this._getKeyByStorageIndex(o);i!==-1&&this.data[o]!==void 0&&e.push([i,this.data[o]])}let t=0;return{next:()=>{if(t<e.length){const o=e[t];return t+=1,{value:o,done:!1}}return{done:!0}}}}clear(){this.data=[],this.index=[],this.holes.clear()}_getStorageIndexByKey(e){return this.index.length>e?this.index[e]:-1}_getKeyByStorageIndex(e){return this.index.indexOf(e)}[Symbol.iterator](){return this.entries()}constructor(e){this.data=[],this.index=[],this.holes=new Set,this.valueFactory=e}}const bj=["data","width"];class Cj{updateMeta(e,t){const o=this.getMeta(e);Wn(o,t),jy(o,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 gj(this.globalMeta.getMetaConstructor(),bj).prototype}constructor(e){this.metas=new OC(()=>this._createMeta()),this.globalMeta=e,this.metas=new OC(()=>this._createMeta())}}class yj{updateMeta(e,t,o){const i=this.getMeta(e,t);Wn(i,o),jy(i,o)}createRow(e,t){this.metas.insert(e,t)}createColumn(e,t){for(let o=0;o<this.metas.size();o++)this.metas.obtain(o).insert(e,t)}removeRow(e,t){this.metas.remove(e,t)}removeColumn(e,t){for(let o=0;o<this.metas.size();o++)this.metas.obtain(o).remove(e,t)}getMeta(e,t,o){const i=this.metas.obtain(e).obtain(t);return o===void 0?i:i[o]}setMeta(e,t,o,i){const s=this.metas.obtain(e).obtain(t);s._automaticallyAssignedMetaProps?.delete(o),s[o]=i}removeMeta(e,t,o){const i=this.metas.obtain(e).obtain(t);delete i[o]}getMetas(){const e=[],t=Array.from(this.metas.values());for(let o=0;o<t.length;o++)J(t[o])&&e.push(...t[o].values());return e}getMetasAtRow(e){Bb(()=>Lu(e),"Expecting an unsigned number.");const t=new Map(this.metas);return t.has(e)?Array.from(t.get(e)).sort(([o],[i])=>o-i).map(([,o])=>o):[]}clearCache(){this.metas.clear()}_createRow(){return new OC(e=>this._createMeta(e))}_createMeta(e){const t=this.columnMeta.getMetaConstructor(e);return new t}constructor(e){this.metas=new OC(()=>this._createRow()),this.columnMeta=e}}class WB{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,o){const i=this.cellMeta.getMeta(e,t);return i.visualRow=o.visualRow,i.visualCol=o.visualColumn,i.row=e,i.col=t,o.skipMetaExtension||this.runLocalHooks("afterGetCellMeta",i),i}getCellMetaKeyValue(e,t,o){return typeof o!="string"&&U("The passed cell meta object key is not a string"),this.cellMeta.getMeta(e,t,o)}setCellMeta(e,t,o,i){this.cellMeta.setMeta(e,t,o,i)}updateCellMeta(e,t,o){this.cellMeta.updateMeta(e,t,o)}removeCellMeta(e,t,o){this.cellMeta.removeMeta(e,t,o)}getCellsMeta(){return this.cellMeta.getMetas()}getCellsMetaAtRow(e){return this.cellMeta.getMetasAtRow(e)}createRow(e,t=1){this.cellMeta.createRow(e,t)}removeRow(e,t=1){this.cellMeta.removeRow(e,t)}createColumn(e,t=1){this.cellMeta.createColumn(e,t),this.columnMeta.createColumn(e,t)}removeColumn(e,t=1){this.cellMeta.removeColumn(e,t),this.columnMeta.removeColumn(e,t)}clearCellsCache(){this.cellMeta.clearCache()}clearCache(){this.cellMeta.clearCache(),this.columnMeta.clearCache()}constructor(e,t={},o=[]){this.hot=e,this.globalMeta=new mj(e),this.tableMeta=new wj(this.globalMeta),this.columnMeta=new Cj(this.globalMeta),this.cellMeta=new yj(this.columnMeta),o.forEach(i=>new i(this)),this.globalMeta.updateMeta(t)}}Ct(WB,$n);function _j(n,e,t){const o=e.sourceDataValidator;if(!ye(o)||o(n,e,t)===!0)return!0;const{row:s,col:r,sourceDataWarningMessage:a,allowInvalid:l}=e;return a&&FB(a,[{row:s,col:r,value:n}]),l===!0}function $B(n,e){const t=n.countSourceRows(),o=n.countSourceCols();if(t===0||o===0)return;const i=new Map;for(let s=0;s<t;s+=1)for(let r=0;r<o;r+=1){const a=n.toVisualRow(s),l=n.toVisualColumn(r);if(a===null||l===null)continue;const h=n.getCellMeta(a,l),{sourceDataWarningMessage:c,sourceDataValidator:d,allowInvalid:u}=h;if(!ye(d))continue;const f=n._getDataSource(),p=f.getAtCell(s,r,null);if(d(p,h,e)!==!0&&(u===!1&&f.setAtCell(s,r,null),c)){const _=c,S=i.get(_)??[];S.push({row:s,col:r,value:p,message:_}),i.set(_,S)}}i.forEach((s,r)=>{FB(r,s)})}function FB(n,e){i4({logFunction:Ie,message:n,items:e,itemFormatter:({row:t,col:o,value:i})=>{const s=bt(i),r=s.length>64?`${s.slice(0,64)}...`:s;return`row ${t}, col ${o}, value: "${r}"`}})}function qH(n,e,t,o){const{hotInstance:i,dataMap:s,dataSource:r,internalSource:a,source:l,metaManager:h,firstRun:c}=o,d=mr(a),u=i.getSettings();Array.isArray(u.dataSchema)?i.dataType="array":ye(u.dataSchema)?i.dataType="function":i.dataType="object",s&&s.destroy(),n=i.runHooks(`before${d}`,n,c,l);const f=new Mu(i,n,h);if(e(f),typeof n=="object"&&n!==null)n.push&&n.splice||(n=[n]);else if(n===null){const p=f.getSchema();n=[];let C,_=0,S=0;for(_=0,S=u.startRows;_<S;_++)if((i.dataType==="object"||i.dataType==="function")&&u.dataSchema)C=Qn(p),n.push(C);else if(i.dataType==="array")C=Qn(p[0]),n.push(C);else{C=[];for(let T=0,P=u.startCols;T<P;T++)C.push(null);n.push(C)}}else U(`${a} only accepts array of objects or array of arrays (${typeof n} given)`);Array.isArray(n[0])&&(i.dataType="array"),u.data=n,f.dataSource=n,r.data=n,r.dataType=i.dataType,r.colToProp=f.colToProp.bind(f),r.propToCol=f.propToCol.bind(f),r.countCachedColumns=f.countCachedColumns.bind(f),t(f),c||$B(i,a),i.runHooks(`after${d}`,n,c,l),c||(i.runHooks("afterChange",null,a),i.view.adjustElementsSize(),i.render()),i.getSettings().ariaTags&&fe(i.rootElement,[K$(-1),Iy(i.countCols()+(i.view?i.countRowHeaders():0))])}class Sj{extendCellMeta(e){const{row:t,col:o}=e;if(this.metaSyncMemo.get(t)?.has(o))return;const{visualRow:i,visualCol:s}=e,r=this.metaManager.hot,a=r.colToProp(s);e.prop=a,r.runHooks("beforeGetCellMeta",i,s,e);const l=en(e,"type")?e.type:null;let h=ye(e.cells)?e.cells(t,o,a):null;l&&(h?h.type=h.type??l:h={type:l}),h&&this.metaManager.updateCellMeta(t,o,h),r.runHooks("afterGetCellMeta",i,s,e),this.metaSyncMemo.has(t)||this.metaSyncMemo.set(t,new Set),this.metaSyncMemo.get(t).add(o)}constructor(e){this.metaSyncMemo=new Map,this.metaManager=e,e.addLocalHook("afterGetCellMeta",(...t)=>this.extendCellMeta(...t)),he.getSingleton().add("beforeRender",t=>{t&&this.metaSyncMemo.clear()},this.metaManager.hot)}}function vj(n,e){if(e.has(n))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Rj(n,e){return e.get?e.get.call(n):e.value}function Ej(n,e,t){if(e.set)e.set.call(n,t);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=t}}function BB(n,e,t){if(!e.has(n))throw new TypeError("attempted to "+t+" private field on non-instance");return e.get(n)}function kj(n,e){var t=BB(n,e,"get");return Rj(n,t)}function Tj(n,e,t){vj(n,e),e.set(n,t)}function xj(n,e,t){var o=BB(n,e,"set");return Ej(n,o,t),t}const KH=new WeakSet,XH=new WeakSet;var RS=new WeakMap;class Mj{extendMetaProps(){this.propDescriptors.forEach((e,t)=>{const{initOnly:o,target:i,onChange:s}=e,r=typeof i=="string",a=r?i:t,l=`_${a}`;this.metaManager.globalMeta.meta[l]=this.metaManager.globalMeta.meta[a],s?(this.installPropWatcher(t,l,s),r&&this.installPropWatcher(i,l,s)):o&&(this.installPropWatcher(t,l,kj(this,RS)),this.metaManager.globalMeta.meta._initOnlySettings||(this.metaManager.globalMeta.meta._initOnlySettings=[]),this.metaManager.globalMeta.meta._initOnlySettings.push(t))})}installPropWatcher(e,t,o){const i=this;Object.defineProperty(this.metaManager.globalMeta.meta,e,{get(){return this[t]},set(s){const r=!i.usageTracker.has(e);i.usageTracker.add(e),o.call(i,e,s,r),this[t]=s},enumerable:!0,configurable:!0})}constructor(e){Tj(this,RS,{writable:!0,value:void 0}),this.usageTracker=new Set,this.propDescriptors=new Map([["ariaTags",{initOnly:!0}],["fixedColumnsLeft",{target:"fixedColumnsStart",onChange(t){this.metaManager.hot.isRtl()&&t==="fixedColumnsLeft"&&U("The `fixedColumnsLeft` is not supported for RTL. Please use option `fixedColumnsStart`."),this.usageTracker.has("fixedColumnsLeft")&&this.usageTracker.has("fixedColumnsStart")&&U("The `fixedColumnsLeft` and `fixedColumnsStart` should not be used together. Please use only the option `fixedColumnsStart`.")}}],["correctFormat",{onChange(){KH.has(this.metaManager.hot)||(KH.add(this.metaManager.hot),fh("The `correctFormat` option is deprecated and will be removed in the next major release.\n\nMigration guide: https://handsontable.com/docs/migration-from-16.2-to-17.0/"))}}],["datePickerConfig",{onChange(){XH.has(this.metaManager.hot)||(XH.add(this.metaManager.hot),fh("The `datePickerConfig` option is deprecated and will be removed in the next major release.\n\nMigration guide: https://handsontable.com/docs/migration-from-16.2-to-17.0/"))}}],["layoutDirection",{initOnly:!0}],["renderAllColumns",{initOnly:!0}],["renderAllRows",{initOnly:!0}]]),xj(this,RS,(t,o,i)=>{i||U(`The \`${t}\` option can not be updated after the Handsontable is initialized.`)}),this.metaManager=e,this.extendMetaProps()}}function VB(n,e){if(e.has(n))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Ij(n,e){return e.get?e.get.call(n):e.value}function Hj(n,e,t){if(e.set)e.set.call(n,t);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=t}}function zB(n,e,t){if(!e.has(n))throw new TypeError("attempted to "+t+" private field on non-instance");return e.get(n)}function ZH(n,e){var t=zB(n,e,"get");return Ij(n,t)}function QH(n,e,t){VB(n,e),e.set(n,t)}function JH(n,e,t){var o=zB(n,e,"set");return Hj(n,o,t),t}function DC(n,e,t){if(!e.has(n))throw new TypeError("attempted to get private field on non-instance");return t}function eA(n,e){VB(n,e),e.add(n)}var TE=new WeakMap,xE=new WeakMap,ES=new WeakSet,ME=new WeakSet;class Aj{toRenderable(e){const t=e.getVerticalDirection()==="N-S"?1:-1,o=e.getHorizontalDirection()==="W-E"?1:-1,i=DC(this,ES,tA).call(this,e.from,t,o);if(i===null)return null;const s=DC(this,ES,tA).call(this,e.to,-t,-o);if(s===null)return null;const r=e.clone();return r.from=i,r.to=s,r.includes(e.highlight)||(r.highlight=i),r}constructor({rowIndexMapper:e,columnIndexMapper:t}){eA(this,ES),eA(this,ME),QH(this,TE,{writable:!0,value:void 0}),QH(this,xE,{writable:!0,value:void 0}),JH(this,TE,e),JH(this,xE,t)}}function tA(n,e,t=e){const o=DC(this,ME,nA).call(this,ZH(this,TE),n.row,e);if(o===null)return null;const i=DC(this,ME,nA).call(this,ZH(this,xE),n.col,t);return i===null?null:n.clone().assign({row:o,col:i})}function nA(n,e,t){return e<0?e:n.getNearestNotHiddenIndex(e,t)}function df(n){Qr(n)&&n.scrollIntoView({block:"nearest",inline:"nearest"})}function qy(n){const{selection:e,view:t}=n,o=n.getSelectedRangeActive(),i=e.getSelectionSource(),s=t.getFirstFullyVisibleColumn(),r=t.getLastFullyVisibleColumn(),a=o.getTopStartCorner().col,l=o.getBottomEndCorner().col,h=a<=s,c=l>=r,d=t.getFirstFullyVisibleRow(),u=t.getLastFullyVisibleRow(),f=o.getTopStartCorner().row,p=o.getBottomEndCorner().row,C=f<=d,_=p>=u;return{getComputedColumnTarget(S){return i==="mouse"||i==="keyboard"?S.col:h&&c?o.highlight.col:h?a:c?l:S.col},getComputedRowTarget(S){return i==="mouse"||i==="keyboard"?S.row:C&&_?o.highlight.row:C?f:_?p:S.row}}}function Oj(n){return e=>{const t=qy(n).getComputedColumnTarget(e);n.scrollViewportTo({col:t},()=>{const o=!!n.getSettings().colHeaders;df(n.getCell(o?-1:0,t,!0))})}}function Dj(){return()=>{}}function Nj(n){return e=>{n.scrollViewportTo(e.toObject(),()=>{const t=n.getSelectedRangeActive();if(!t)return;const{row:o,col:i}=t.highlight;df(n.getCell(o,i,!0))})}}function Pj(n){return e=>{const t=qy(n),o={row:t.getComputedRowTarget(e),col:t.getComputedColumnTarget(e)};n.scrollViewportTo(o,()=>{const{row:i,col:s}=o;df(n.getCell(i,s,!0))})}}function Lj(n){return e=>{const t=qy(n),o={row:t.getComputedRowTarget(e),col:t.getComputedColumnTarget(e)};n.scrollViewportTo(o,()=>{const{row:i,col:s}=o;df(n.getCell(i,s,!0))})}}function Wj(n){return e=>{const t=qy(n).getComputedRowTarget(e);n.scrollViewportTo({row:t},()=>{const o=!!n.getSettings().rowHeaders;df(n.getCell(t,o?-1:0,!0))})}}function $j(n){return e=>{const t=n.selection.getSelectionSource(),{row:o,col:i}=e,s=()=>{df(n.getCell(o,i,!0))};if(o<0&&i>=0)n.scrollViewportTo({col:i},s);else if(i<0&&o>=0)n.scrollViewportTo({row:o},s);else{if(t==="mouse"&&(i===n.view.getLastPartiallyVisibleColumn()||o===n.view.getLastPartiallyVisibleRow()))return;n.scrollViewportTo({row:o,col:i},s)}}}function Fj(n){const{selection:e}=n;let t=!1,o=!1;return{resume(){o=!1},suspend(){o=!0},skipNextScrollCycle(){t=!0},scrollTo(i){if(t||o){t=!1;return}let s;e.isFocusSelectionChanged()?s=Nj(n):e.isSelectedByCorner()?s=Dj():e.isSelectedByRowHeader()?s=Wj(n):e.isSelectedByColumnHeader()?s=Oj(n):e.getSelectedRange().size()===1&&e.isMultiple()?s=Pj(n):e.getSelectedRange().size()===1&&!e.isMultiple()?s=$j(n):e.getSelectedRange().size()>1&&(s=Lj(n)),s?.(i)}}}const Bj=Object.freeze({INLINE:"inline",MODAL:"modal"}),zr=Object.freeze({UNKNOWN:"unknown",CLICK:"click",TAB_FROM_ABOVE:"tab_from_above",TAB_FROM_BELOW:"tab_from_below"}),Vj="grid";function zj(n,e){const t=oA(n,zr.TAB_FROM_ABOVE),o=oA(n,zr.TAB_FROM_BELOW);return e.prepend(t),e.append(o),{activate(){t.tabIndex=0,o.tabIndex=0},deactivate(){t.tabIndex=-1,o.tabIndex=-1},destroy(){t.remove(),o.remove()}}}function oA(n,e){const o=n.rootDocument.createElement("div");return o.style.display="none",o.classList.add("htFocusCatcher"),o.dataset.htFocusSource=e,o}function Uj(n,e,t={}){const o={shortcutsContextName:Vj,type:Bj.INLINE,contains:f=>f===e||e.contains(f),runOnlyIf:()=>!0,enableFocusCatchers:!0,...t},i=o.enableFocusCatchers===!1?null:zj(n,e);return{getType:()=>o.type,hasContainerDetached:()=>!n.rootWrapperElement.contains(e),getShortcutsContextName:()=>o.shortcutsContextName,runOnlyIf:()=>o.runOnlyIf(),contains:f=>o.contains(f),activate:(f=zr.UNKNOWN)=>{o.onActivate?.(f)},deactivate:()=>{o.onDeactivate?.()},activateFocusCatchers:()=>{i?.activate()},deactivateFocusCatchers:()=>{i?.deactivate()},enable:()=>{e.removeAttribute("inert")},disable:()=>{e.setAttribute("inert","true")},destroy:()=>{i?.destroy()}}}function Yj(n,e={}){let t=!1;function o(c){t||e.onFocus?.(c)}function i(c){e.onClick?.(c)}function s(c){c.key==="Tab"&&e.onTabKeyDown?.(c)}function r(){t=!0}function a(){t=!1}return{mount:()=>{let c=n;for(;c;){const{documentElement:d}=c.document;d.addEventListener("focusin",o),d.addEventListener("click",i),d.addEventListener("keydown",s),d.addEventListener("mousedown",r),d.addEventListener("mouseup",a),c=gh(c)}},unmount:()=>{let c=n;for(;c;){const{documentElement:d}=c.document;d.removeEventListener("focusin",o),d.removeEventListener("click",i),d.removeEventListener("keydown",s),d.removeEventListener("mousedown",r),d.removeEventListener("mouseup",a),c=gh(c)}}}}function Gj(n){const e=Hm({errorIdExists:p=>`The "${p}" focus scope is already registered.`}),t=n.getShortcutManager();let o=null;function i(){return o?e.getId(o):null}function s(p,C,_={}){e.hasItem(p)&&U(`Scope with id "${p}" already registered`);const S=Uj(n,C,_);e.addItem(p,S),t.getOrCreateContext(S.getShortcutsContextName())}function r(p){e.hasItem(p)||U(`Scope with id "${p}" not found`),e.getItem(p).destroy(),e.removeItem(p)}function a(p,C=zr.UNKNOWN){e.hasItem(p)||U(`Scope with id "${p}" not found`);const _=C??zr.UNKNOWN;h(e.getItem(p),_)}function l(p){e.hasItem(p)||U(`Scope with id "${p}" not found`),c(e.getItem(p))}function h(p,C=zr.UNKNOWN){o!==p&&(o!==null&&c(o),o=p,o.activate(C),t.setActiveContextName(p.getShortcutsContextName()))}function c(p){d(),o===p&&(o=null,p.deactivate())}function d(){const p=e.getValues(),C=p.filter(_=>_.runOnlyIf()&&_.getType()==="modal");p.forEach(_=>{C.length>0&&C.includes(_)||C.length===0||_.hasContainerDetached()?_.enable():_.disable(),_===o?_.contains(n.rootDocument.activeElement)?_.deactivateFocusCatchers():_.activateFocusCatchers():_.runOnlyIf()?_.activateFocusCatchers():_.deactivateFocusCatchers()})}function u(p,C){if(!p.isConnected||!zc(p))return;const _=e.getValues().filter(T=>T.runOnlyIf());let S=!1;_.forEach(T=>{!S&&T.contains(p)&&(S=!0,C!==zr.UNKNOWN&&n.listen(),h(T,C))}),!S&&o&&(c(o),n.unlisten())}const f=Yj(n.rootWindow,{onFocus:p=>{u(p.target,p.target.dataset.htFocusSource??zr.UNKNOWN)},onClick:p=>{u(p.target,zr.CLICK)},onTabKeyDown:()=>{d()}});return f.mount(),{getActiveScopeId:i,registerScope:s,unregisterScope:r,activateScope:(p,C)=>a(p,C),deactivateScope:p=>l(p),destroy:()=>f.unmount()}}function UB(n,e){if(e.has(n))throw new TypeError("Cannot initialize the same private elements twice on an object")}function jj(n,e){return e.get?e.get.call(n):e.value}function qj(n,e,t){if(e.set)e.set.call(n,t);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=t}}function YB(n,e,t){if(!e.has(n))throw new TypeError("attempted to "+t+" private field on non-instance");return e.get(n)}function Dt(n,e){var t=YB(n,e,"get");return jj(n,t)}function yd(n,e,t){UB(n,e),e.set(n,t)}function tr(n,e,t){var o=YB(n,e,"set");return qj(n,o,t),t}function Fa(n,e,t){if(!e.has(n))throw new TypeError("attempted to get private field on non-instance");return t}function _d(n,e){UB(n,e),e.add(n)}const Wu=Object.freeze({CELL:"cell",MIXED:"mixed"});var En=new WeakMap,_w=new WeakMap,Vf=new WeakMap,zf=new WeakMap,Uf=new WeakMap,tm=new WeakMap,NC=new WeakSet,GB=new WeakSet,iA=new WeakSet,kS=new WeakSet,sA=new WeakSet,rA=new WeakSet;class Kj{init(){const e=Dt(this,En).getSettings();tr(this,_w,e.imeFastEdit?Wu.MIXED:Wu.CELL),Dt(this,En).addHook("afterUpdateSettings",(...t)=>Fa(this,rA,Jj).call(this,...t)),Dt(this,En).addHook("afterSelection",(...t)=>Fa(this,kS,aA).call(this,...t)),Dt(this,En).addHook("afterSelectionFocusSet",(...t)=>Fa(this,kS,aA).call(this,...t)),Dt(this,En).addHook("afterSelectionEnd",(...t)=>Fa(this,iA,Zj).call(this,...t)),Dt(this,En).addHook("afterRender",(...t)=>Fa(this,sA,Qj).call(this,...t))}getFocusMode(){return Dt(this,_w)}setFocusMode(e){Object.values(Wu).includes(e)?tr(this,_w,e):Ie(`"${e}" is not a valid focus mode.`)}getRefocusDelay(){return Dt(this,Vf)}setRefocusDelay(e){tr(this,Vf,e)}setRefocusElementGetter(e){tr(this,zf,e)}getRefocusElement(){return typeof Dt(this,zf)=="function"?Dt(this,zf).call(this):Dt(this,En).getActiveEditor()?.TEXTAREA}focusElement(e,t){return!Qr(e)||!e.isConnected?!1:(e.focus(t),!0)}focusOnHighlightedCell(e){const t=o=>{const i=Dt(this,En).getSelectedRangeActive()?.highlight;if(!i)return;let s=Dt(this,En).runHooks("modifyFocusedElement",i.row,i.col,o);Qr(s)||(s=o),s&&!Dt(this,En).getActiveEditor()?.isOpened()&&this.focusElement(s,{preventScroll:!0})};e?t(e):Fa(this,NC,mx).call(this,o=>t(o))}refocusToEditorTextarea(e=Dt(this,Vf)){Dt(this,En).getSettings().imeFastEdit&&!Dt(this,En).getActiveEditor()?.isOpened()&&(Dt(this,En).getActiveEditor()?.refreshValue?.(),Dt(this,Uf).has(e)||Dt(this,Uf).set(e,Im(()=>{Dt(this,En).isDestroyed||this.getRefocusElement()?.select()},e)),Dt(this,Uf).get(e)())}constructor(e){_d(this,NC),_d(this,GB),_d(this,iA),_d(this,kS),_d(this,sA),_d(this,rA),yd(this,En,{writable:!0,value:void 0}),yd(this,_w,{writable:!0,value:void 0}),yd(this,Vf,{writable:!0,value:void 0}),yd(this,zf,{writable:!0,value:void 0}),yd(this,Uf,{writable:!0,value:void 0}),yd(this,tm,{writable:!0,value:void 0}),tr(this,Vf,1),tr(this,zf,null),tr(this,Uf,new Map),tr(this,tm,!1),tr(this,En,e)}}function mx(n){const e=Dt(this,En).getSelectedRangeActive()?.highlight;if(!e||!Dt(this,En).selection.isCellVisible(e)){n(null);return}const t=Dt(this,En).getCell(e.row,e.col,!0);t===null?Dt(this,En).addHookOnce("afterScroll",()=>{n(Dt(this,En).getCell(e.row,e.col,!0))}):n(t)}function Xj(){Fa(this,NC,mx).call(this,n=>{const{activeElement:e}=Dt(this,En).rootDocument;e&&hF(e)&&e.blur(),this.focusOnHighlightedCell(n)})}function Zj(){Fa(this,NC,mx).call(this,n=>{this.getFocusMode()===Wu.MIXED&&n?.nodeName==="TD"&&this.refocusToEditorTextarea()})}function aA(){tr(this,tm,!0)}function Qj(){Dt(this,tm)&&(tr(this,tm,!1),Fa(this,GB,Xj).call(this))}function Jj(n){typeof n.imeFastEdit=="boolean"&&this.setFocusMode(n.imeFastEdit?Wu.MIXED:Wu.CELL)}function e8(n){return e=>{if(!e)return null;const{rowIndexMapper:t,columnIndexMapper:o}=n;if(t.isHidden(e.row)||o.isHidden(e.col))return null;const i=IE(n),s=HE(n);return i===null||s===null?null:(e.row=et(e.row,i.row,s.row),e.col=et(e.col,i.col,s.col),e)}}function IE(n){const{rowIndexMapper:e,columnIndexMapper:t}=n,{navigableHeaders:o}=n.getSettings();let i=o&&n.countColHeaders()>0?-n.countColHeaders():0,s=o&&n.countRowHeaders()>0?-n.countRowHeaders():0;return i===0&&(i=e.getVisualFromRenderableIndex(i)),s===0&&(s=t.getVisualFromRenderableIndex(s)),i===null||s===null?null:n._createCellCoords(i,s)}function HE(n){const{rowIndexMapper:e,columnIndexMapper:t}=n,{navigableHeaders:o}=n.getSettings();let i=e.getRenderableIndexesLength()-1,s=t.getRenderableIndexesLength()-1;if(i<0){if(!o||n.countColHeaders()===0)return null;i=-1}if(s<0){if(!o||n.countColHeaders()===0)return null;s=-1}return n._createCellCoords(e.getVisualFromRenderableIndex(i)??i,t.getVisualFromRenderableIndex(s)??s)}const wp="gridDefault",mh="grid",PC="grid.tabNavigation",dl="editorManager.handlingEditor",t8="editor",n8={name:"editorCloseAndSave",callback(n){n._getEditorManager().closeEditorAndSaveChanges()}},o8="hooksRefRegisterer",jB={_hooksStorage:Object.create(null),addHook(n,e){return this._hooksStorage[n]||(this._hooksStorage[n]=[]),this.hot.addHook(n,e),this._hooksStorage[n].push(e),this},removeHooksByKey(n){O(this._hooksStorage[n]||[],e=>{this.hot.removeHook(n,e)})},clearHooks(){tt(this._hooksStorage,(n,e)=>this.removeHooksByKey(e)),this._hooksStorage={}}};ll(jB,"MIXIN_NAME",o8,{writable:!1,enumerable:!1});const i8="base",kn=Object.freeze({VIRGIN:"STATE_VIRGIN",EDITING:"STATE_EDITING",WAITING:"STATE_WAITING",FINISHED:"STATE_FINISHED"});class td{static get EDITOR_TYPE(){return i8}_fireCallbacks(e){this._closeCallback&&(this._closeCallback(e),this._closeCallback=null)}init(){}getValue(){U("Editor getValue() method unimplemented")}setValue(){U("Editor setValue() method unimplemented")}open(){U("Editor open() method unimplemented")}close(){U("Editor close() method unimplemented")}prepare(e,t,o,i,s,r){this.TD=i,this.row=e,this.col=t,this.prop=o,this.originalValue=s,this.cellProperties=r,this.state=this.isOpened()?this.state:kn.VIRGIN}extend(){return class extends this.constructor{}}saveValue(e,t){let o,i,s,r;if(t){const l=this.hot.getSelectedRangeActive(),h=l.getTopStartCorner(),c=l.getBottomEndCorner();o=h.row,i=h.col,s=c.row,r=c.col}else[o,i,s,r]=[this.row,this.col,null,null];const a=this.hot.runHooks("modifyGetCellCoords",o,i,!1,"meta");Array.isArray(a)&&([o,i]=a),this.hot.populateFromArray(o,i,e,s,r,"edit")}beginEditing(e,t){if(this.state!==kn.VIRGIN)return;const o=this.hot,i=o.rowIndexMapper.getRenderableFromVisualIndex(this.row),s=o.columnIndexMapper.getRenderableFromVisualIndex(this.col);if(o.view.scrollViewport(o._createCellCoords(i,s)),this.state=kn.EDITING,this.isInFullEditMode()){const r=Gy(this.originalValue,this.hot.getCellMeta(this.row,this.col)),a=typeof e=="string"?e:bt(r);this.setValue(a)}this.open(t),this._opened=!0,this.focus(),o.view.render(),o.runHooks("afterBeginEditing",this.row,this.col),this.addHook("beforeDialogShow",()=>this.cancelChanges())}finishEditing(e,t,o){if(o){const i=this._closeCallback;this._closeCallback=s=>{i&&i(s),o(s),this.hot.view.render()}}if(!this.isWaiting()){if(this.state===kn.VIRGIN){this.hot._registerTimeout(()=>{this._fireCallbacks(!0)});return}if(this.state===kn.EDITING){if(e){this.cancelChanges(),this.hot.view.render();return}let i=this.getValue();this.cellProperties.trimWhitespace&&(i=typeof i=="string"?String.prototype.trim.call(i||""):i),typeof this.cellProperties.valueParser=="function"&&(i=this.cellProperties.valueParser(i,this.cellProperties)),this.state=kn.WAITING,this.saveValue([[i]],t),this.hot.getCellValidator(this.cellProperties)?this.hot.addHookOnce("postAfterValidate",s=>{this.state=kn.FINISHED,this.discardEditor(s)}):(this.state=kn.FINISHED,this.discardEditor(!0))}}}cancelChanges(){this.state=kn.FINISHED,this.discardEditor()}discardEditor(e){this.state===kn.FINISHED&&(e===!1&&this.cellProperties.allowInvalid!==!0?(this.hot.selectCell(this.row,this.col),this.focus(),this.state=kn.EDITING,this._fireCallbacks(!1)):(this.close(),this._opened=!1,this._fullEditMode=!1,this.state=kn.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===kn.WAITING}getEditedCellRect(){const e=this.getEditedCell();if(!e)return;const{wtOverlays:t,wtViewport:o}=this.hot.view._wt,i=this.hot.rootWindow,s=Ko(e),r=bn(e),a=Ko(this.hot.rootElement),l=bn(this.hot.rootElement),h=t.topOverlay.holder,c=t.inlineStartOverlay.holder,d=h!==i?h.scrollTop:0,u=c!==i?c.scrollLeft:0,f=i.innerWidth-a.left-l,{wtTable:p}=t.getParentOverlay(e)??this.hot.view._wt,C=p.name,_=["master","inline_start"].includes(C)?d:0,S=["master","top","bottom"].includes(C)?u:0,T=s.top===a.top?0:1;let P=s.top-a.top-T-_,F=0;this.hot.isRtl()?F=i.innerWidth-s.left-r-f-1+S:F=s.left-a.left-1-S,["top","top_inline_start_corner"].includes(C)&&(P+=t.topOverlay.getOverlayOffset()),["inline_start","top_inline_start_corner"].includes(C)&&(F+=Math.abs(t.inlineStartOverlay.getOverlayOffset()));const V=this.hot.hasColHeaders(),D=this.hot.rowIndexMapper.getRenderableFromVisualIndex(this.row),I=this.hot.columnIndexMapper.getRenderableFromVisualIndex(this.col),z=this.hot.rowIndexMapper.getRenderableIndexesLength()-this.hot.view._wt.getSetting("fixedRowsBottom");(V&&D<=0||D===z)&&(P+=1),I<=0&&(F+=1);const Y=o.rowsRenderCalculator.startPosition,te=o.columnsRenderCalculator.startPosition,ee=Math.abs(t.inlineStartOverlay.getScrollPosition()),be=t.topOverlay.getScrollPosition(),me=xn(this.hot.rootDocument);let Ve=e.offsetTop;if(["inline_start","master"].includes(C)&&(Ve+=Y-be),["bottom","bottom_inline_start_corner"].includes(C)){const{wtViewport:g,wtTable:b}=t.bottomOverlay.clone;Ve+=g.getWorkspaceHeight()-b.getHeight()-me}let Ye=e.offsetLeft;this.hot.isRtl()?(Ye>=0?Ye=p.getWidth()-e.offsetLeft:Ye=Math.abs(Ye),Ye+=te-ee-r):["top","master","bottom"].includes(C)&&(Ye+=te-ee);const Me=i.getComputedStyle(this.TD),Ge=this.hot.isRtl()?"borderRightWidth":"borderLeftWidth",wt=parseInt(Me[Ge],10)>0?0:1,on=parseInt(Me.borderTopWidth,10)>0?0:1,W=bn(e)+wt,q=Tn(e)+on,Ce=aF(h)?me:0,$=lF(c)?me:0,Re=this.hot.view.maximumVisibleElementWidth(Ye)-Ce+wt,Se=Math.max(this.hot.view.maximumVisibleElementHeight(Ve)-$+on,this.hot.stylesHandler.getDefaultRowHeight());return{top:P,start:F,height:q,maxHeight:Se,width:W,maxWidth:Re}}getEditedCellsLayerClass(){switch(this.checkEditorSection()){case"inline-start":return"ht_clone_left ht_clone_inline_start";case"bottom":return"ht_clone_bottom";case"bottom-inline-start-corner":return"ht_clone_bottom_left_corner ht_clone_bottom_inline_start_corner";case"top":return"ht_clone_top";case"top-inline-start-corner":return"ht_clone_top_left_corner ht_clone_top_inline_start_corner";default:return"ht_clone_master"}}getEditedCell(){return this.hot.getCell(this.row,this.col,!0)}checkEditorSection(){const e=this.hot.countRows();let t="";return this.row<this.hot.getSettings().fixedRowsTop?this.col<this.hot.getSettings().fixedColumnsStart?t="top-inline-start-corner":t="top":this.hot.getSettings().fixedRowsBottom&&this.row>=e-this.hot.getSettings().fixedRowsBottom?this.col<this.hot.getSettings().fixedColumnsStart?t="bottom-inline-start-corner":t="bottom":this.col<this.hot.getSettings().fixedColumnsStart&&(t="inline-start"),t}constructor(e){this.state=kn.VIRGIN,this._opened=!1,this._fullEditMode=!1,this._closeCallback=null,this._closeAfterDataChange=!0,this.TD=null,this.row=null,this.col=null,this.prop=null,this.originalValue=null,this.cellProperties=null,this.hot=e,this.init()}}Ct(td,jB);const s8={name:"editorCloseAndSaveByArrowKeys",callback(n,e,t){const o=n._getEditorManager(),i=o.getActiveEditor();i.isInFullEditMode()&&i.state===kn.EDITING||(o.closeEditorAndSaveChanges(),n.getSelected()&&(t.includes("arrowdown")?n.selection.transformStart(1,0):t.includes("arrowup")?n.selection.transformStart(-1,0):t.includes("arrowleft")?n.selection.transformStart(0,-1*n.getDirectionFactor()):t.includes("arrowright")&&n.selection.transformStart(0,n.getDirectionFactor())),e.preventDefault())}},r8={name:"editorCloseAndSaveByEnter",callback(n,e){const t=n._getEditorManager();t.closeEditorAndSaveChanges(e.ctrlKey||e.metaKey),t.moveSelectionAfterEnter(e)}},a8={name:"editorCloseWithoutSaving",callback(n){const e=n._getEditorManager();e.closeEditorAndRestoreOriginalValue(n.getShortcutManager().isCtrlPressed()),e.activeEditor.focus()}},l8={name:"editorFastOpen",callback(n,e){const{highlight:t}=n.getSelectedRangeActive();t.isHeader()||n._getEditorManager().openEditor(null,e,!0)}},h8={name:"editorOpen",callback(n,e,t){const{selection:o}=n,i=n._getEditorManager(),s=n.getSelectedRange(),r=n.getSelectedRangeActive(),{highlight:a}=r;if((s.some(l=>o.isMultiple(l))||s.length>1)&&!r.isHeader()&&n.countRenderedCols()>0&&n.countRenderedRows()>0){const l=n.getSettings(),h=typeof l.enterMoves=="function"?l.enterMoves(e):l.enterMoves;t.includes("shift")?o.transformFocus(-h.row,-h.col):o.transformFocus(h.row,h.col);return}a.isHeader()||(n.getSettings().enterBeginsEditing?i.cellProperties.readOnly?i.moveSelectionAfterEnter(e):i.openEditor(null,e,!0):i.moveSelectionAfterEnter(e),es(e))}};function c8(){return[n8,s8,r8,a8,l8,h8]}const d8={name:"extendCellsSelectionDown",callback(n){const{selection:e}=n,{highlight:t}=n.getSelectedRangeActive();!e.isSelectedByColumnHeader()&&!e.isSelectedByCorner()&&(t.isCell()||t.isHeader()&&e.isSelectedByRowHeader())&&(e.markSource("keyboard"),e.transformEnd(1,0),e.markEndSource())}},u8={name:"extendCellsSelectionDownByViewportHeight",callback(n){const{selection:e,rowIndexMapper:t}=n,{to:o}=n.getSelectedRangeActive(),i=Math.min(o.row+n.countVisibleRows(),n.countRows()-1),s=t.getNearestNotHiddenIndex(i,-1);if(s!==null){const r=n._createCellCoords(s,o.col),a=o.row-n.getFirstFullyVisibleRow(),l=Math.min(r.row-a,n.countRows()-1);e.markSource("keyboard"),e.setRangeEnd(r,n.getActiveSelectionLayerIndex()),e.markEndSource(),n.scrollViewportTo({row:l,verticalSnap:"top",horizontalSnap:"start"})}}},f8={name:"extendCellsSelectionLeft",callback(n){const{selection:e}=n,{highlight:t}=n.getSelectedRangeActive();!e.isSelectedByRowHeader()&&!e.isSelectedByCorner()&&(t.isCell()||t.isHeader()&&e.isSelectedByColumnHeader())&&(e.markSource("keyboard"),e.transformEnd(0,-1*n.getDirectionFactor()),e.markEndSource())}},g8={name:"extendCellsSelectionRight",callback(n){const{selection:e}=n,{highlight:t}=n.getSelectedRangeActive();!e.isSelectedByRowHeader()&&!e.isSelectedByCorner()&&(t.isCell()||t.isHeader()&&e.isSelectedByColumnHeader())&&(e.markSource("keyboard"),e.transformEnd(0,n.getDirectionFactor()),e.markEndSource())}},p8={name:"extendCellsSelectionToColumns",callback(n){const{selection:e}=n,{highlight:t,from:o,to:i}=n.getSelectedRangeActive();e.markSource("keyboard"),e.isSelectedByRowHeader()?e.selectAll(!0,!0):n.selectColumns(o.col,i.col,t),e.markEndSource()}},m8={name:"extendCellsSelectionToMostBottom",callback(n){const{selection:e,rowIndexMapper:t}=n,{highlight:o,from:i,to:s}=n.getSelectedRangeActive(),r=o.isHeader()&&e.isSelectedByRowHeader();if(o.isCell()||r){const a=t.getNearestNotHiddenIndex(n.countRows()-1,-1),l=i.clone();l.row=o.row,e.markSource("keyboard"),e.setRangeStart(l,void 0,!1,o.clone()),r&&e.selectedByRowHeader.add(e.getLayerLevel()),e.setRangeEnd(n._createCellCoords(a,s.col)),e.markEndSource()}}},w8={name:"extendCellsSelectionToMostInlineEnd",callback(n){const{selection:e,columnIndexMapper:t}=n,{highlight:o,from:i,to:s}=n.getSelectedRangeActive();if(!e.isSelectedByRowHeader()&&!e.isSelectedByCorner()&&o.isCell()){const r=t.getNearestNotHiddenIndex(n.countCols()-1,-1),a=i.clone();a.col=o.col,e.markSource("keyboard"),e.setRangeStart(a,void 0,!1,o.clone()),e.setRangeEnd(n._createCellCoords(s.row,r)),e.markEndSource()}}},b8={name:"extendCellsSelectionToMostInlineStart",callback(n){const{selection:e,columnIndexMapper:t}=n,{highlight:o,from:i,to:s}=n.getSelectedRangeActive();if(!e.isSelectedByRowHeader()&&!e.isSelectedByCorner()&&o.isCell()){const r=parseInt(n.getSettings().fixedColumnsStart,10),a=t.getNearestNotHiddenIndex(r,1),l=i.clone();l.col=o.col,e.markSource("keyboard"),e.setRangeStart(l,void 0,!1,o.clone()),e.setRangeEnd(n._createCellCoords(s.row,a)),e.markEndSource()}}},C8={name:"extendCellsSelectionToMostLeft",callback(n){const{selection:e,columnIndexMapper:t}=n,{highlight:o,from:i,to:s}=n.getSelectedRangeActive(),r=o.isHeader()&&e.isSelectedByColumnHeader();if(o.isCell()||r){const a=t.getNearestNotHiddenIndex(...n.isRtl()?[n.countCols()-1,-1]:[0,1]),l=i.clone();l.col=o.col,e.markSource("keyboard"),e.setRangeStart(l,void 0,!1,o.clone()),r&&e.selectedByColumnHeader.add(e.getLayerLevel()),e.setRangeEnd(n._createCellCoords(s.row,a)),e.markEndSource()}}},y8={name:"extendCellsSelectionToMostRight",callback(n){const{selection:e,columnIndexMapper:t}=n,{highlight:o,from:i,to:s}=n.getSelectedRangeActive(),r=o.isHeader()&&e.isSelectedByColumnHeader();if(o.isCell()||r){const a=t.getNearestNotHiddenIndex(...n.isRtl()?[0,1]:[n.countCols()-1,-1]),l=i.clone();l.col=o.col,e.markSource("keyboard"),e.setRangeStart(l,void 0,!1,o.clone()),r&&e.selectedByColumnHeader.add(e.getLayerLevel()),e.setRangeEnd(n._createCellCoords(s.row,a)),e.markEndSource()}}},_8={name:"extendCellsSelectionToMostTop",callback(n){const{selection:e,rowIndexMapper:t}=n,{highlight:o,from:i,to:s}=n.getSelectedRangeActive(),r=o.isHeader()&&e.isSelectedByRowHeader();if(o.isCell()||r){const a=t.getNearestNotHiddenIndex(0,1),l=i.clone();l.row=o.row,e.markSource("keyboard"),e.setRangeStart(l,void 0,!1,o.clone()),r&&e.selectedByRowHeader.add(e.getLayerLevel()),e.setRangeEnd(n._createCellCoords(a,s.col)),e.markEndSource()}}},S8={name:"extendCellsSelectionToRows",callback(n){const{selection:e}=n,{highlight:t,from:o,to:i}=n.getSelectedRangeActive();e.markSource("keyboard"),e.isSelectedByColumnHeader()?e.selectAll(!0,!0):n.selectRows(o.row,i.row,t),e.markEndSource()}},v8={name:"extendCellsSelectionUp",callback(n){const{selection:e}=n,{highlight:t}=n.getSelectedRangeActive();!e.isSelectedByColumnHeader()&&!e.isSelectedByCorner()&&(t.isCell()||t.isHeader()&&e.isSelectedByRowHeader())&&(e.markSource("keyboard"),e.transformEnd(-1,0),e.markEndSource())}},R8={name:"extendCellsSelectionUpByViewportHeight",callback(n){const{selection:e,rowIndexMapper:t}=n,{to:o}=n.getSelectedRangeActive(),i=Math.max(o.row-n.countVisibleRows(),0),s=t.getNearestNotHiddenIndex(i,1);if(s!==null){const r=n._createCellCoords(s,o.col),a=o.row-n.getFirstFullyVisibleRow(),l=Math.max(r.row-a,0);e.markSource("keyboard"),e.setRangeEnd(r,n.getActiveSelectionLayerIndex()),e.markEndSource(),n.scrollViewportTo({row:l,verticalSnap:"top",horizontalSnap:"start"})}}};function E8(){return[d8,u8,f8,g8,p8,m8,w8,b8,C8,y8,_8,S8,v8,R8]}const k8={name:"moveCellSelectionDown",callback({selection:n}){n.markSource("keyboard"),n.transformStart(1,0),n.markEndSource()}},T8={name:"moveCellSelectionDownByViewportHeight",callback(n){const{selection:e}=n,{navigableHeaders:t}=n.getSettings(),o=t?n.countColHeaders():0,{row:i}=n.getSelectedRangeActive().highlight;let s=n.countVisibleRows()+o;s=s===0?1:s,i===n.countRows()-1?s=1:i+s>n.countRows()&&(s=n.countRows()-i-1),e.markSource("keyboard"),e.transformStart(s,0),e.markEndSource(),n.getSelectedRangeActive().highlight.row<0&&n.scrollViewportTo({row:0})}},x8={name:"moveCellSelectionInlineEnd",callback(n,e){const{selection:t}=n,o=n.getSettings(),i=n.getSelectedRange(),s=n.getSelectedRangeActive(),r=typeof o.tabMoves=="function"?o.tabMoves(e):o.tabMoves;t.markSource("keyboard"),(i.some(a=>t.isMultiple(a))||i.length>1)&&!s.isHeader()&&n.countRenderedCols()>0&&n.countRenderedRows()>0?t.transformFocus(-r.row,-r.col):t.transformStart(-r.row,-r.col),t.markEndSource()}},M8={name:"moveCellSelectionInlineStart",callback(n,e){const{selection:t}=n,o=n.getSettings(),i=n.getSelectedRange(),s=n.getSelectedRangeActive(),r=typeof o.tabMoves=="function"?o.tabMoves(e):o.tabMoves;t.markSource("keyboard"),(i.some(a=>t.isMultiple(a))||i.length>1)&&!s.isHeader()&&n.countRenderedCols()>0&&n.countRenderedRows()>0?t.transformFocus(r.row,r.col):t.transformStart(r.row,r.col),t.markEndSource()}},I8={name:"moveCellSelectionLeft",callback(n){const{selection:e}=n;e.markSource("keyboard"),e.transformStart(0,-1*n.getDirectionFactor()),e.markEndSource()}},H8={name:"moveCellSelectionRight",callback(n){const{selection:e}=n;e.markSource("keyboard"),e.transformStart(0,n.getDirectionFactor()),e.markEndSource()}},A8={name:"moveCellSelectionToMostBottom",callback(n){const{selection:e}=n,{col:t}=n.getSelectedRangeActive().highlight;let o=n.rowIndexMapper.getNearestNotHiddenIndex(n.countRows()-1,-1);o===null&&(o=-1),e.setRangeStart(n._createCellCoords(o,t))}},O8={name:"moveCellSelectionToMostBottomInlineEnd",callback(n){const{selection:e,rowIndexMapper:t,columnIndexMapper:o}=n,i=parseInt(n.getSettings().fixedRowsBottom,10),s=t.getNearestNotHiddenIndex(n.countRows()-i-1,-1),r=o.getNearestNotHiddenIndex(n.countCols()-1,-1);e.markSource("keyboard"),e.setRangeStart(n._createCellCoords(s,r)),e.markEndSource()}},D8={name:"moveCellSelectionToMostInlineEnd",callback(n){const{selection:e,columnIndexMapper:t}=n;e.markSource("keyboard"),e.setRangeStart(n._createCellCoords(n.getSelectedRangeActive().highlight.row,t.getNearestNotHiddenIndex(n.countCols()-1,-1))),e.markEndSource()}},N8={name:"moveCellSelectionToMostInlineStart",callback(n){const{selection:e,columnIndexMapper:t}=n,o=parseInt(n.getSettings().fixedColumnsStart,10),i=n.getSelectedRangeActive().highlight.row,s=t.getNearestNotHiddenIndex(o,1);e.markSource("keyboard"),e.setRangeStart(n._createCellCoords(i,s)),e.markEndSource()}},P8={name:"moveCellSelectionToMostLeft",callback(n){const{selection:e,columnIndexMapper:t}=n,o=n.getSelectedRangeActive().highlight.row;let i=t.getNearestNotHiddenIndex(...n.isRtl()?[n.countCols()-1,-1]:[0,1]);i===null&&(i=n.isRtl()?-1:-n.countRowHeaders()),e.markSource("keyboard"),e.setRangeStart(n._createCellCoords(o,i)),e.markEndSource()}},L8={name:"moveCellSelectionToMostRight",callback(n){const{selection:e,columnIndexMapper:t}=n,{row:o}=n.getSelectedRangeActive().highlight;let i=t.getNearestNotHiddenIndex(...n.isRtl()?[0,1]:[n.countCols()-1,-1]);i===null&&(i=n.isRtl()?-n.countRowHeaders():-1),e.markSource("keyboard"),e.setRangeStart(n._createCellCoords(o,i)),e.markEndSource()}},W8={name:"moveCellSelectionToMostTop",callback(n){const{selection:e}=n,{col:t}=n.getSelectedRangeActive().highlight;let o=n.rowIndexMapper.getNearestNotHiddenIndex(0,1);o===null&&(o=-n.countColHeaders()),e.markSource("keyboard"),e.setRangeStart(n._createCellCoords(o,t)),e.markEndSource()}},$8={name:"moveCellSelectionToMostTopInlineStart",callback(n){const{selection:e,rowIndexMapper:t,columnIndexMapper:o}=n,i=parseInt(n.getSettings().fixedRowsTop,10),s=parseInt(n.getSettings().fixedColumnsStart,10),r=t.getNearestNotHiddenIndex(i,1),a=o.getNearestNotHiddenIndex(s,1);e.markSource("keyboard"),e.setRangeStart(n._createCellCoords(r,a)),e.markEndSource()}},F8={name:"moveCellSelectionUp",callback({selection:n}){n.markSource("keyboard"),n.transformStart(-1,0),n.markEndSource()}},B8={name:"moveCellSelectionUpByViewportHight",callback(n){const{selection:e}=n,{navigableHeaders:t}=n.getSettings(),o=t?n.countColHeaders():0,{row:i}=n.getSelectedRangeActive().highlight;let s=n.countVisibleRows()+o;s=s===0?-1:-s,i===-o?s=-1:i+s<o&&(s=-(i+o)),e.markSource("keyboard"),e.transformStart(s,0),e.markEndSource(),n.getSelectedRangeActive().highlight.row<0&&n.scrollViewportTo({row:0})}};function V8(){return[k8,T8,x8,M8,I8,H8,A8,O8,D8,N8,P8,L8,W8,$8,F8,B8]}const z8={name:"emptySelectedCells",callback(n){n.emptySelectedCells(),n._getEditorManager().prepareEditor()}},U8={name:"scrollToFocusedCell",callback(n){const{highlight:e}=n.getSelectedRangeActive(),t=n.getFirstFullyVisibleRow()-1,o=n.getFirstFullyVisibleColumn()-1,i=n.getLastFullyVisibleRow()+1,s=n.getLastFullyVisibleColumn()+1,r=n._createCellCoords(t,o),a=n._createCellCoords(i,s);if(!n._createCellRange(r,r,a).includes(e)&&(e.row>=0||e.col>=0)){const h={};if(e.col>=0){const c=Math.floor(n.countVisibleCols()/2);h.col=Math.max(e.col-c,0)}if(e.row>=0){const c=Math.floor(n.countVisibleRows()/2);h.row=Math.max(e.row-c,0)}n.scrollViewportTo({...h,verticalSnap:"top",horizontalSnap:"start"})}}},Y8={name:"selectAllCells",callback({selection:n}){n.markSource("keyboard"),n.selectAll(!0,!0,{disableHeadersHighlight:!0}),n.markEndSource()}},G8={name:"selectAllCellsAndHeaders",callback({selection:n}){n.markSource("keyboard"),n.selectAll(!0,!0,{disableHeadersHighlight:!1}),n.markEndSource()}},j8={name:"populateSelectedCellsData",callback(n){const e=n.getSelectedRange(),{row:t,col:o}=e[e.length-1].highlight.normalize(),i=n.getDataAtCell(t,o),s=new Map;for(let r=0;r<e.length;r++)e[r].forAll((a,l)=>{if(a>=0&&l>=0&&(a!==t||l!==o)){const{readOnly:h}=n.getCellMeta(a,l);h||s.set(`${a}x${l}`,[a,l,i])}});n.setDataAtCell(Array.from(s.values()))}},q8={name:"tabNavigation",callback(n){const e={wrapped:!1,flipped:!1};let t=!1,o=!1;return n.addHook("afterSelection",(i,s,r,a,l)=>{t&&(e.wrapped&&e.flipped||o)&&(o=!1,l.value=!0)}),n.addHook("beforeRowWrap",(i,s,r)=>{e.wrapped=!0,e.flipped=r}),{before(){const{tabNavigation:i}=n.getSettings();t=!0,i||(o=!0)},after(i){const{tabNavigation:s,autoWrapRow:r}=n.getSettings();if(t=!1,!s||!n.selection.isSelected()||r&&e.wrapped&&e.flipped||!r&&e.wrapped)return e.wrapped=!1,e.flipped=!1,n.deselectCell(),!1;i.preventDefault()}}}},K8=[...c8(),...E8(),...V8(),z8,U8,Y8,G8,j8,q8];function qB(n){const e={};return K8.forEach(({name:t,callback:o})=>{e[t]=(...i)=>o(n,...i)}),e}function X8(n){const e=n.getShortcutManager().addContext(t8),t=qB(n),o={group:dl};e.addShortcuts([{keys:[["Enter"],["Enter","Shift"]],callback:(i,s)=>t.editorCloseAndSaveByEnter(i,s)},{keys:[["Enter","Control/Meta"],["Enter","Control/Meta","Shift"]],captureCtrl:!0,callback:(i,s)=>t.editorCloseAndSaveByEnter(i,s)},{keys:[["Tab"],["Tab","Shift"],["PageDown"],["PageUp"]],forwardToContext:n.getShortcutManager().getContext(mh),callback:(i,s)=>t.editorCloseAndSave(i,s)},{keys:[["ArrowDown"],["ArrowUp"],["ArrowLeft"],["ArrowRight"]],preventDefault:!1,callback:(i,s)=>t.editorCloseAndSaveByArrowKeys(i,s)},{keys:[["Escape"],["Escape","Control/Meta"]],callback:()=>t.editorCloseWithoutSaving()}],o)}function Z8(n){const e=n.getShortcutManager().addContext(mh),t=qB(n),o={runOnlyIf:()=>{const{navigableHeaders:s}=n.getSettings();return J(n.getSelected())&&(s||!s&&n.countRenderedRows()>0&&n.countRenderedCols()>0)},group:wp};e.addShortcuts([{keys:[["F2"]],callback:s=>t.editorFastOpen(s)},{keys:[["Enter"],["Enter","Shift"]],callback:(s,r)=>t.editorOpen(s,r)},{keys:[["Backspace"],["Delete"]],callback:()=>t.emptySelectedCells()}],{group:dl,runOnlyIf:()=>J(n.getSelected())}),e.addShortcuts([{keys:[["Control/Meta","A"]],callback:()=>t.selectAllCells(),runOnlyIf:()=>J(n.getSelected())&&!n.getSelectedRangeActive()?.highlight.isHeader()},{keys:[["Control/Meta","A"]],callback:()=>{},runOnlyIf:()=>J(n.getSelected())&&n.getSelectedRangeActive()?.highlight.isHeader(),preventDefault:!0},{keys:[["Control/Meta","Shift","Space"]],callback:()=>t.selectAllCellsAndHeaders()},{keys:[["Control/Meta","Enter"]],callback:()=>t.populateSelectedCellsData(),runOnlyIf:()=>J(n.getSelected())&&!n.getSelectedRangeActive().highlight.isHeader()&&n.getSelectedRangeActive().getCellsCount()>1},{keys:[["Control","Space"]],captureCtrl:!0,callback:()=>t.extendCellsSelectionToColumns()},{keys:[["Shift","Space"]],stopPropagation:!0,callback:()=>t.extendCellsSelectionToRows()},{keys:[["ArrowUp"]],callback:()=>t.moveCellSelectionUp()},{keys:[["ArrowUp","Control/Meta"]],captureCtrl:!0,callback:()=>t.moveCellSelectionToMostTop()},{keys:[["ArrowUp","Shift"]],callback:()=>t.extendCellsSelectionUp()},{keys:[["ArrowUp","Shift","Control/Meta"]],captureCtrl:!0,callback:()=>t.extendCellsSelectionToMostTop(),runOnlyIf:()=>J(n.getSelected())&&!(n.selection.isSelectedByCorner()||n.selection.isSelectedByColumnHeader())},{keys:[["ArrowDown"]],callback:()=>t.moveCellSelectionDown()},{keys:[["ArrowDown","Control/Meta"]],captureCtrl:!0,callback:()=>t.moveCellSelectionToMostBottom()},{keys:[["ArrowDown","Shift"]],callback:()=>t.extendCellsSelectionDown()},{keys:[["ArrowDown","Shift","Control/Meta"]],captureCtrl:!0,callback:()=>t.extendCellsSelectionToMostBottom(),runOnlyIf:()=>J(n.getSelected())&&!(n.selection.isSelectedByCorner()||n.selection.isSelectedByColumnHeader())},{keys:[["ArrowLeft"]],callback:()=>t.moveCellSelectionLeft()},{keys:[["ArrowLeft","Control/Meta"]],captureCtrl:!0,callback:()=>t.moveCellSelectionToMostLeft()},{keys:[["ArrowLeft","Shift"]],callback:()=>t.extendCellsSelectionLeft()},{keys:[["ArrowLeft","Shift","Control/Meta"]],captureCtrl:!0,callback:()=>t.extendCellsSelectionToMostLeft(),runOnlyIf:()=>J(n.getSelected())&&!(n.selection.isSelectedByCorner()||n.selection.isSelectedByRowHeader())},{keys:[["ArrowRight"]],callback:()=>t.moveCellSelectionRight()},{keys:[["ArrowRight","Control/Meta"]],captureCtrl:!0,callback:()=>t.moveCellSelectionToMostRight()},{keys:[["ArrowRight","Shift"]],callback:()=>t.extendCellsSelectionRight()},{keys:[["ArrowRight","Shift","Control/Meta"]],captureCtrl:!0,callback:()=>t.extendCellsSelectionToMostRight(),runOnlyIf:()=>J(n.getSelected())&&!(n.selection.isSelectedByCorner()||n.selection.isSelectedByRowHeader())},{keys:[["Home"]],captureCtrl:!0,callback:()=>t.moveCellSelectionToMostInlineStart(),runOnlyIf:()=>J(n.getSelected())&&n.view.isMainTableNotFullyCoveredByOverlays()},{keys:[["Home","Shift"]],callback:()=>t.extendCellsSelectionToMostInlineStart()},{keys:[["Home","Control/Meta"]],captureCtrl:!0,callback:()=>t.moveCellSelectionToMostTopInlineStart(),runOnlyIf:()=>J(n.getSelected())&&n.view.isMainTableNotFullyCoveredByOverlays()},{keys:[["End"]],captureCtrl:!0,callback:()=>t.moveCellSelectionToMostInlineEnd(),runOnlyIf:()=>J(n.getSelected())&&n.view.isMainTableNotFullyCoveredByOverlays()},{keys:[["End","Shift"]],callback:()=>t.extendCellsSelectionToMostInlineEnd()},{keys:[["End","Control/Meta"]],captureCtrl:!0,callback:()=>t.moveCellSelectionToMostBottomInlineEnd(),runOnlyIf:()=>J(n.getSelected())&&n.view.isMainTableNotFullyCoveredByOverlays()},{keys:[["PageUp"]],callback:()=>t.moveCellSelectionUpByViewportHight()},{keys:[["PageUp","Shift"]],callback:()=>t.extendCellsSelectionUpByViewportHeight()},{keys:[["PageDown"]],callback:()=>t.moveCellSelectionDownByViewportHeight()},{keys:[["PageDown","Shift"]],callback:()=>t.extendCellsSelectionDownByViewportHeight()},{keys:[["Tab"]],preventDefault:!1,callback:s=>t.moveCellSelectionInlineStart(s)},{keys:[["Shift","Tab"]],preventDefault:!1,callback:s=>t.moveCellSelectionInlineEnd(s)},{keys:[["Control/Meta","Backspace"]],callback:()=>t.scrollToFocusedCell()}],o);const i=t.tabNavigation();e.addShortcuts([{keys:[["Tab"],["Shift","Tab"]],preventDefault:!1,stopPropagation:!1,relativeToGroup:wp,group:PC,position:"before",callback:s=>i.before(s)},{keys:[["Tab"],["Shift","Tab"]],preventDefault:!1,stopPropagation:!1,relativeToGroup:wp,group:PC,callback:s=>i.after(s),position:"after"}])}function Q8(n){[Z8,X8].forEach(e=>e(n))}function J8(n){const e=e8(n),t={wrapped:!1,flipped:!1};let o,i=!0,s=!1;n.addHook("afterSelection",()=>{i&&(o=n.getSelectedRangeActive()?.highlight)}),n.addHook("beforeRowWrap",(l,h,c)=>{t.wrapped=!0,t.flipped=c}),n.addHook("beforeEmptyDataStateShow",()=>{s=!0}),n.addHook("beforeEmptyDataStateHide",()=>{s=!1}),n.getShortcutManager().getContext(mh).addShortcuts([{keys:[["Tab"],["Shift","Tab"]],preventDefault:!1,stopPropagation:!1,relativeToGroup:wp,group:PC,position:"before",callback(){const{tabNavigation:l}=n.getSettings();n.getSelectedRangeActive()&&!l&&(i=!1)}},{keys:[["Tab"],["Shift","Tab"]],preventDefault:!1,stopPropagation:!1,relativeToGroup:wp,group:PC,callback(l){const{tabNavigation:h,autoWrapRow:c}=n.getSettings();i=!0,(!h||!n.selection.isSelected()||c&&t.wrapped&&t.flipped||!c&&t.wrapped)&&(c&&t.wrapped&&t.flipped&&(o=l.shiftKey?IE(n):HE(n)),t.wrapped=!1,t.flipped=!1)},position:"after"}]);const a=n.rootGridElement??n.rootElement;n.getFocusScopeManager().registerScope("grid",a,{contains:l=>a===l||a.contains(l)?!0:l.closest(".htMenu")!==null?!1:n.rootPortalElement.contains(l),runOnlyIf:()=>{const{navigableHeaders:l}=n.getSettings();return(s||!l)&&n.countRenderedRows()===0&&n.countRenderedCols()===0&&n.countRowHeaders()>0&&n.countColHeaders()>0?!1:!l&&n.countRenderedRows()>0&&n.countRenderedCols()>0||l&&(n.countRowHeaders()>0||n.countColHeaders()>0)},onActivate:l=>{if(l==="tab_from_above"){const h=e(o)??IE(n);h&&n.runHooks("modifyFocusOnTabNavigation","from_above",h)!==!1&&(n.selectCell(h.row,h.col),n.getFocusManager().focusOnHighlightedCell())}else if(l==="tab_from_below"){const h=e(o)??HE(n);h&&n.runHooks("modifyFocusOnTabNavigation","from_below",h)!==!1&&n.selectCell(h.row,h.col)}}})}function eq(n){[J8].forEach(e=>e(n))}const lA=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"]]),Sw=n=>n.map(e=>{const t=e.toLowerCase();return lA.has(t)?lA.get(t):t}).sort().join("+"),tq=n=>n.split("+"),hA=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"]]),Zg=({which:n,key:e})=>{if(hA.has(n))return hA.get(n);const t=String.fromCharCode(n).toLowerCase();return/^[a-z0-9]$/.test(t)?t:e.toLowerCase()},nq=["meta","alt","shift","control"],Qg=n=>nq.includes(n),Iu=(n,e=!1)=>{const t=[];return n.altKey&&t.push("alt"),e&&(n.ctrlKey||n.metaKey)?t.push("control/meta"):(n.ctrlKey&&t.push("control"),n.metaKey&&t.push("meta")),n.shiftKey&&t.push("shift"),t},oq=(n,e)=>{if(typeof n.key!="string")return[];const t=Zg(n),o=Qg(t),i=o?[]:Iu(n),r=[[t].concat(i)];return o||((typeof e=="function"?e():!1)?i.includes("meta"):i.includes("control"))&&r.push([t].concat(Iu(n,!0))),r},KB=Symbol("shortcut-context");function XB(n){return ne(n)&&n.__kindOf===KB}const iq=(n,e="table")=>{const t=Hm({errorIdExists:h=>`The "${h}" shortcut is already registered in the "${n}" context.`}),o=({keys:h,callback:c,group:d,runOnlyIf:u=()=>!0,captureCtrl:f=!1,preventDefault:p=!0,stopPropagation:C=!1,relativeToGroup:_,position:S,forwardToContext:T}={})=>{Jt(d)&&U("You need to define the shortcut's group."),ye(c)===!1&&U("The shortcut's callback needs to be a function."),Array.isArray(h)===!1&&U(pt`Pass the shortcut\'s keys as an array of arrays,\x20
|
|
44
|
+
using the KeyboardEvent.key properties:\x20
|
|
45
|
+
https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/key/Key_Values.`);const P={callback:c,group:d,runOnlyIf:u,captureCtrl:f,preventDefault:p,stopPropagation:C};J(_)&&(P.relativeToGroup=_,P.position=S),XB(T)&&(P.forwardToContext=T),h.forEach(F=>{const V=Sw(F);if(t.hasItem(V)){const I=t.getItem(V);let G=I.findIndex(z=>z.group===_);G!==-1?S==="before"?G-=1:G+=1:G=I.length,I.splice(G,0,P)}else t.addItem(V,[P])})},i=(h,c={})=>{h.forEach(d=>{tt(c,(u,f)=>{Object.prototype.hasOwnProperty.call(d,f)===!1&&(d[f]=c[f])}),o(d)})},s=h=>{const c=Sw(h);t.removeItem(c)};return{__kindOf:KB,scope:e,addShortcut:o,addShortcuts:i,getShortcuts:h=>{const c=Sw(h),d=t.getItem(c);return J(d)?d.slice():[]},hasShortcut:h=>{const c=Sw(h);return t.hasItem(c)},removeShortcutsByKeys:s,removeShortcutsByGroup:h=>{t.getItems().forEach(([d,u])=>{const f=u.filter(p=>p.group!==h);f.length===0?s(tq(d)):(u.length=0,u.push(...f))})}}};function sq(){const n=new Set;return{press(e){n.add(e)},release(e){n.delete(e)},releaseAll(){n.clear()},isPressed(e){return n.has(e)}}}const Yf=sq(),Gf=[];let vw=0;function rq(n,e,t,o,i,s=null){const r=u=>{if(e(u)!==!1){if(t(u)===!1||u.keyCode===229||typeof u.key!="string"||Kl(u))return;const P=Zg(u);let F=[];Qg(P)||(F=Iu(u));const V=[P].concat(F);let D=i(u,V);!D&&(zg()&&F.includes("meta")||!zg()&&F.includes("control"))&&(D=i(u,[P].concat(Iu(u,!0)))),o(u);return}if(ye(s)===!1||u.keyCode===229||typeof u.key!="string"||Kl(u))return;const p=Zg(u);let C=[];Qg(p)||(C=Iu(u));const _=[p].concat(C);let S=s(u,_);!S&&(zg()&&C.includes("meta")||!zg()&&C.includes("control"))&&(S=s(u,[p].concat(Iu(u,!0)))),o(u)},a=u=>{if(typeof u.key=="string"){const f=Zg(u);Qg(f)&&Yf.press(f)}},l=u=>{if(typeof u.key=="string"){const f=Zg(u);Qg(f)&&Yf.release(f)}},h=()=>{Yf.releaseAll()};return{mount:()=>{let u=n;for(vw+=1;u;)vw===1&&(u.document.documentElement.addEventListener("keydown",a),Gf.push({event:"keydown",listener:a}),u.document.documentElement.addEventListener("keyup",l),Gf.push({event:"keyup",listener:l})),u.document.documentElement.addEventListener("keydown",r),u.document.documentElement.addEventListener("blur",h),u=gh(u)},unmount:()=>{let u=n;for(vw-=1;u;){if(vw===0){for(let f=0;f<Gf.length;f++){const{event:p,listener:C}=Gf[f];u.document.documentElement.removeEventListener(p,C)}Gf.length=0}u.document.documentElement.removeEventListener("keydown",r),u.document.documentElement.removeEventListener("blur",h),u=gh(u)}},isPressed:u=>Yf.isPressed(u),releasePressedKeys:()=>Yf.releaseAll()}}const aq=({ownerWindow:n,handleEvent:e,beforeKeyDown:t,afterKeyDown:o})=>{const i=Hm({errorIdExists:S=>`The "${S}" context name is already registered.`});let s="grid";const r=(S,T="table")=>{const P=iq(S,T);return i.addItem(S,P),P},a=()=>s,l=S=>i.getItem(S),h=(S,T="table")=>l(S)??r(S,T),c=S=>{i.hasItem(S)||U(pt`You've tried to activate the "${S}" shortcut context\x20
|
|
46
|
+
that does not exist. Before activation, register the context using the "addContext" method.`),s=S};let d=!1;const u=(S,T,P=a())=>{const F=XB(P)?P:l(P);let V=!1;if(!F.hasShortcut(T))return V;const D=F.getShortcuts(T);for(let I=0;I<D.length;I++){const{callback:G,runOnlyIf:z,preventDefault:Y,stopPropagation:te,captureCtrl:ee,forwardToContext:be}=D[I];if(z(S)===!0){if(d=ee,V=G(S,T)===!1,d=!1,Y&&S.preventDefault(),te&&(es(S),S.stopPropagation()),V)break;be&&u(S,T,be)}}return V},C=rq(n,S=>{const T=a(),P=l(T);return e(S,P?.scope??"table")},t,o,u,(S,T)=>{const P=i.getItems();for(let F=0;F<P.length;F+=1){const[,V]=P[F];if(V.scope==="global"&&u(S,T,V))return!0}return!1});return C.mount(),{addContext:r,getActiveContextName:a,getContext:l,getOrCreateContext:h,setActiveContextName:c,hasEventShortcut:(S,T)=>{const P=l(S);return P?oq(T,zg).some(V=>P.hasShortcut(V)):!1},isCtrlPressed:()=>!d&&(C.isPressed("control")||C.isPressed("meta")),releasePressedKeys:()=>C.releasePressedKeys(),destroy:()=>C.unmount()}};function TS(n){const{classNames:e}=a4(n,/ht-theme-[a-zA-Z0-9_-]+/);return e.pop()}const lq=`/*!
|
|
47
|
+
* Copyright (c) HANDSONCODE sp. z o. o.
|
|
48
|
+
*
|
|
49
|
+
* HANDSONTABLE is a software distributed by HANDSONCODE sp. z o. o., a Polish corporation based in
|
|
50
|
+
* Gdynia, Poland, at Aleja Zwyciestwa 96-98, registered by the District Court in Gdansk under number
|
|
51
|
+
* 538651, EU tax ID number: PL5862294002, share capital: PLN 62,800.00.
|
|
52
|
+
*
|
|
53
|
+
* This software is protected by applicable copyright laws, including international treaties, and dual-
|
|
54
|
+
* licensed - depending on whether your use for commercial purposes, meaning intended for or
|
|
55
|
+
* resulting in commercial advantage or monetary compensation, or not.
|
|
56
|
+
*
|
|
57
|
+
* If your use is strictly personal or solely for evaluation purposes, meaning for the purposes of testing
|
|
58
|
+
* the suitability, performance, and usefulness of this software outside the production environment,
|
|
59
|
+
* you agree to be bound by the terms included in the "handsontable-non-commercial-license.pdf" file.
|
|
60
|
+
*
|
|
61
|
+
* Your use of this software for commercial purposes is subject to the terms included in an applicable
|
|
62
|
+
* license agreement.
|
|
63
|
+
*
|
|
64
|
+
* In any case, you must not make any such use of this software as to develop software which may be
|
|
65
|
+
* considered competitive with this software.
|
|
66
|
+
*
|
|
67
|
+
* UNLESS EXPRESSLY AGREED OTHERWISE, HANDSONCODE PROVIDES THIS SOFTWARE ON AN "AS IS"
|
|
68
|
+
* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, AND IN NO EVENT AND UNDER NO
|
|
69
|
+
* LEGAL THEORY, SHALL HANDSONCODE BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY DIRECT,
|
|
70
|
+
* INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY CHARACTER ARISING FROM
|
|
71
|
+
* USE OR INABILITY TO USE THIS SOFTWARE.
|
|
72
|
+
*
|
|
73
|
+
* Version: 17.1.0
|
|
74
|
+
* Release date: 19/05/2026 (built at 19/05/2026 14:51:40)
|
|
75
|
+
*/
|
|
76
|
+
.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}.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}.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{border-radius:var(--ht-wrapper-border-radius,0);width:100%;height:100%}.handsontable.ht-wrapper:not(.htFirstDatasetColumnNotRendered) td:first-of-type{border-inline-start-width:1px}.handsontable.ht-wrapper:before{content:"";border:var(--ht-wrapper-border-width)solid var(--ht-wrapper-border-color);border-radius:var(--ht-wrapper-border-radius,0);z-index:999;pointer-events:none;display:block;position:absolute;inset:0;overflow:hidden}.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.htHasScrollX:not(.htHorizontallyScrollableByWindow):not(.htScrollbarHidden) .ht_master .wtHolder,.handsontable.htHasScrollY:not(.htVerticallyScrollableByWindow):not(.htScrollbarHidden) .ht_master .wtHolder{border-radius:var(--ht-wrapper-border-radius,0)}.handsontable:not(.htHorizontallyScrollableByWindow).htPagination .ht_master .wtHolder,.handsontable:not(.htHorizontallyScrollableByWindow).htHasScrollX .ht_master .wtHolder,.handsontable:not(.htHorizontallyScrollableByWindow).htHasScrollY .ht_master .wtHolder,.handsontable:not(.htVerticallyScrollableByWindow).htPagination .ht_master .wtHolder,.handsontable:not(.htVerticallyScrollableByWindow).htHasScrollX .ht_master .wtHolder,.handsontable:not(.htVerticallyScrollableByWindow).htHasScrollY .ht_master .wtHolder{background-color:var(--ht-background-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: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-wrapper-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-wrapper-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-wrapper-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-wrapper-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-wrapper-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-wrapper-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-wrapper-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-wrapper-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-wrapper-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-wrapper-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-wrapper-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-wrapper-border-radius)}.handsontable.ht-wrapper .ht_master .htCore{border-radius:var(--ht-wrapper-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-wrapper-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-wrapper-border-radius)}.handsontable.ht-wrapper .ht_master .htCore thead 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:var(--ht-wrapper-border-radius)}.handsontable.ht-wrapper .ht_master .htCore thead 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:var(--ht-wrapper-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-wrapper-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-wrapper-border-radius)}.handsontable.ht-wrapper .ht_master .htCore thead 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:var(--ht-wrapper-border-radius)}.handsontable.ht-wrapper .ht_master .htCore thead 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:var(--ht-wrapper-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-wrapper-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-wrapper-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-wrapper-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-wrapper-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-wrapper-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-wrapper-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-wrapper-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-wrapper-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-wrapper-border-radius);border-top-right-radius:var(--ht-wrapper-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-wrapper-border-radius);border-top-left-radius:var(--ht-wrapper-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-wrapper-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-wrapper-border-radius)}.handsontable.ht-wrapper .ht_clone_top .htCore thead 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:var(--ht-wrapper-border-radius)}.handsontable.ht-wrapper .ht_clone_top .htCore thead 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:var(--ht-wrapper-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-wrapper-border-radius);border-bottom-left-radius:var(--ht-wrapper-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-wrapper-border-radius);border-bottom-right-radius:var(--ht-wrapper-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-wrapper-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-wrapper-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-wrapper-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-wrapper-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-wrapper-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-wrapper-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-wrapper-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-wrapper-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-wrapper-border-radius);border-bottom-left-radius:var(--ht-wrapper-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-wrapper-border-radius);border-bottom-right-radius:var(--ht-wrapper-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-wrapper-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-wrapper-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-wrapper-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-wrapper-border-radius)}.handsontable.ht-wrapper.htHasScrollX .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 .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 .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 .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 .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 .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 .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 .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 .htCore thead 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.htHasScrollX .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)),.handsontable.ht-wrapper.htHasScrollX .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 .htCore thead 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.htHasScrollX .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)),.handsontable.ht-wrapper.htHasScrollX .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: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.htHasScrollY:not(.htVerticallyScrollableByWindow) .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)),.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: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.htHasScrollY:not(.htVerticallyScrollableByWindow) .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)),.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: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.htHasScrollY:not(.htVerticallyScrollableByWindow) .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)),.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: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.htHasScrollY:not(.htVerticallyScrollableByWindow) .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)),.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}.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;border:1px solid var(--ht-border-color,#f7f7f9);border-radius:var(--ht-wrapper-border-radius);margin-top:10px}.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}.pika-single{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);font-size:var(--ht-font-size);line-height:var(--ht-line-height);font-weight:var(--ht-font-weight);color:var(--ht-foreground-color);background:var(--ht-background-color,#fff);border:var(--ht-menu-border-width,1px)solid var(--ht-menu-border-color,#e5e5e9);border-radius:var(--ht-menu-border-radius);z-index:9999;padding:10px;display:block;position:relative}.pika-single.is-hidden{display:none}.pika-single .pika-row{background-color:#0000}.pika-single .pika-title{justify-content:center;align-items:center;display:flex}.pika-single .pika-label{color:var(--ht-accent-color);order:2;padding:5px;position:relative}.pika-single .pika-label .pika-select{opacity:0;cursor:pointer;position:absolute;inset:0}.pika-single .pika-prev,.pika-single .pika-next{white-space:nowrap;text-indent:-9999px;cursor:pointer;width:20px;height:20px;color:var(--ht-accent-color);background:0 0;border:none;padding:0}.pika-single .pika-prev{order:1;margin-right:auto}.pika-single .pika-next{order:3;margin-left:auto}.pika-single .pika-table thead{height:50px}.pika-single .pika-table th{vertical-align:middle;padding:1px}.pika-single .pika-table th abbr{cursor:initial;border:none;font-weight:400;text-decoration:none}.pika-single .pika-table td{vertical-align:middle;padding:1px}.pika-single .pika-table td.is-disabled .pika-button{pointer-events:none;opacity:.5}.pika-single .pika-table td.is-today .pika-button{background:color-mix(in srgb,var(--ht-menu-item-hover-color)var(--ht-menu-item-hover-color-opacity,100%),transparent)}.pika-single .pika-table td.is-selected .pika-button{background:var(--ht-accent-color,#1a42e8);color:var(--ht-primary-button-foreground-color,#fff)}.pika-single .pika-table td.pika-week{text-align:center;width:12.5%}.pika-single .pika-table .pika-button{aspect-ratio:1;width:100%;color:var(--ht-foreground-color);border-radius:var(--ht-button-border-radius);cursor:pointer;font-size:inherit;background:0 0;border:none;margin:0;padding:10px}.pika-single .pika-table .pika-button:hover{background:color-mix(in srgb,var(--ht-menu-item-hover-color)var(--ht-menu-item-hover-color-opacity,100%),transparent)}[dir=rtl].htDatepickerHolder .pika-single .pika-next{margin-left:0;margin-right:auto;transform:rotate(180deg)}[dir=rtl].htDatepickerHolder .pika-single .pika-prev{margin-left:auto;margin-right:0;transform:rotate(180deg)}.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-wrapper-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-wrapper-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-wrapper-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-wrapper-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-wrapper-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{color:var(--ht-pagination-bar-foreground-color);background:var(--ht-pagination-bar-background-color);border:1px solid var(--ht-wrapper-border-color);border-radius:0 0 var(--ht-wrapper-border-radius)var(--ht-wrapper-border-radius);font-size:var(--ht-font-size);line-height:var(--ht-line-height);box-sizing:border-box;border-top-color:#0000;overflow-x:auto}.handsontable.ht-pagination--bordered{border-top-color:var(--ht-wrapper-border-color)}.handsontable.ht-pagination .ht-pagination__inner{justify-content:space-between;align-items:center;gap:calc(var(--ht-gap-size)*4);border-radius:0 0 var(--ht-wrapper-border-radius)var(--ht-wrapper-border-radius);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}.handsontable.ht-wrapper.htPagination: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.htPagination: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.ht-wrapper.htPagination .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.htPagination .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.htPagination .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.htPagination .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.htPagination .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.htPagination .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.htPagination .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.htPagination .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.htPagination .htCore thead 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.htPagination .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)),.handsontable.ht-wrapper.htPagination .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.htPagination .htCore thead 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.htPagination .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)),.handsontable.ht-wrapper.htPagination .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-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-wrapper-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-wrapper-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-wrapper-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}:is(.ht-empty-data-state--disable-bottom-border,.ht-empty-data-state:has(~.ht-pagination)){border-bottom-width:0}:is(.ht-empty-data-state--disable-bottom-border,.ht-empty-data-state:has(~.ht-pagination)):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)),:is(.ht-empty-data-state--disable-bottom-border,.ht-empty-data-state:has(~.ht-pagination)):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)}}`;function ZB(n,e){if(e.has(n))throw new TypeError("Cannot initialize the same private elements twice on an object")}function hq(n,e){return e.get?e.get.call(n):e.value}function cq(n,e,t){if(e.set)e.set.call(n,t);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=t}}function QB(n,e,t){if(!e.has(n))throw new TypeError("attempted to "+t+" private field on non-instance");return e.get(n)}function Dn(n,e){var t=QB(n,e,"get");return hq(n,t)}function Cl(n,e,t){ZB(n,e),e.set(n,t)}function $r(n,e,t){var o=QB(n,e,"set");return cq(n,o,t),t}function Pr(n,e,t){if(!e.has(n))throw new TypeError("attempted to get private field on non-instance");return t}function Hh(n,e){ZB(n,e),e.add(n)}const cA="handsontable-core-styles";var Vb=new WeakMap,jf=new WeakMap,LC=new WeakMap,wx=new WeakMap,Zl=new WeakMap,du=new WeakMap,$u=new WeakMap,xS=new WeakMap,dA=new WeakSet,uA=new WeakSet,MS=new WeakSet,JB=new WeakSet,fA=new WeakSet,AE=new WeakSet,IS=new WeakSet;class dq{getCSSVariableValue(e){if(Dn(this,du)[`--ht-${e}`])return Dn(this,du)[`--ht-${e}`];const t=Pr(this,fA,pq).call(this,`--ht-${e}`)??Pr(this,AE,eV).call(this,`--ht-${e}`);if(t!==null)return Dn(this,du)[`--ht-${e}`]=t,t}getStyleForTD(e){return Dn(this,$u)?.td?.[e]}getDefaultRowHeight(e){const t=Pr(this,uA,fq).call(this);return e!==void 0&&e===Dn(this,Vb).view.getFirstRenderedVisibleRow()?t+1:t}areCellsBorderBox(){return this.getStyleForTD("box-sizing")==="border-box"}useTheme(e){if(!/ht-theme-.*/.test(e)){Ie(`${e} isn't a valid theme name. Please ensure it follows the format ht-theme-<theme-name>.`);return}Pr(this,IS,pA).call(this),e&&e!==Dn(this,jf)&&$r(this,jf,e),Dn(this,xS).call(this,Dn(this,jf)),Pr(this,MS,gA).call(this)}getThemeName(){return Dn(this,jf)}clearCache(){Pr(this,IS,pA).call(this),Pr(this,MS,gA).call(this)}constructor({hot:e,rootElement:t,rootDocument:o,onThemeChange:i=()=>{},injectCoreCss:s=!0}){Hh(this,dA),Hh(this,uA),Hh(this,MS),Hh(this,JB),Hh(this,fA),Hh(this,AE),Hh(this,IS),Cl(this,Vb,{writable:!0,value:void 0}),Cl(this,jf,{writable:!0,value:void 0}),Cl(this,LC,{writable:!0,value:void 0}),Cl(this,wx,{writable:!0,value:void 0}),Cl(this,Zl,{writable:!0,value:void 0}),Cl(this,du,{writable:!0,value:void 0}),Cl(this,$u,{writable:!0,value:void 0}),Cl(this,xS,{writable:!0,value:void 0}),$r(this,du,{}),$r(this,$u,{}),$r(this,Vb,e),$r(this,LC,t),$r(this,Zl,o),$r(this,xS,i),s&&Pr(this,dA,uq).call(this)}}function uq(){if(!Dn(this,Vb)||!Dn(this,Zl)||!Dn(this,Zl).head)return;const n=Dn(this,Zl).getElementById(cA);if(n&&n instanceof HTMLStyleElement)return;const e=Dn(this,Zl).createElement("style");e.id=cA,e.textContent=lq,Dn(this,Zl).head.appendChild(e)}function fq(){const n=this.getCSSVariableValue("line-height"),e=this.getCSSVariableValue("cell-vertical-padding"),t=Math.ceil(parseFloat(this.getStyleForTD("border-bottom-width")));return n===null||e===null||isNaN(t)?null:n+2*e+t}function gA(){$r(this,wx,getComputedStyle(Dn(this,LC)));const n=Pr(this,JB,gq).call(this,["box-sizing","border-bottom-width"]);Dn(this,$u).td={...Dn(this,$u).td,"box-sizing":n["box-sizing"],"border-bottom-width":n["border-bottom-width"]}}function gq(n){const e=Dn(this,Zl),t=Dn(this,LC),o=e.createElement("table"),i=e.createElement("tbody"),s=e.createElement("tr"),r=e.createElement("tr"),a=e.createElement("td");r.appendChild(a),i.appendChild(s),i.appendChild(r),o.appendChild(i),t.appendChild(o);const l=getComputedStyle(a),h={};return n.forEach(c=>{h[c]=l.getPropertyValue(c)}),t.removeChild(o),h}function pq(n){const e=Math.ceil(parseFloat(Pr(this,AE,eV).call(this,n)));return Number.isNaN(e)?null:e}function eV(n){const e=Dn(this,wx)?.getPropertyValue(n);return e===""?null:e}function pA(){$r(this,$u,{}),$r(this,du,{})}let Ki=null,zb=0;function mq(n){const e=n.ownerDocument;if(!Ki){Ki=e.createElement("div"),Ki.setAttribute("role","status"),Ki.setAttribute("aria-live","assertive"),Ki.setAttribute("aria-atomic","true");const t=Ki.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(Ki)}zb+=1}function wq(){zb!==0&&(zb===1&&(Ki.remove(),Ki=null),zb-=1)}function bq(n){Ki&&(Ki.textContent="",setTimeout(()=>{Ki&&(Ki.textContent=n)},100))}const Cq={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"},yq={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"}},_q=new Set(["name","sizing","density","icons","colors","tokens","colorScheme"]),mA=new Set(["light","dark","auto"]),OE=new Set(["default","compact","comfortable"]),Sq=new Set(["arrowRight","arrowRightWithBar","arrowLeft","arrowLeftWithBar","arrowDown","menu","selectArrow","arrowNarrowUp","arrowNarrowDown","check","checkbox","caretHiddenLeft","caretHiddenRight","caretHiddenUp","caretHiddenDown","collapseOff","collapseOn","radio","chipClose","search"]),vq=new Set(["fontFamily","fontSize","fontSizeSmall","lineHeight","lineHeightSmall","fontWeight","letterSpacing","gapSize","iconSize","tableTransition","borderColor","accentColor","foregroundColor","foregroundSecondaryColor","backgroundColor","backgroundSecondaryColor","placeholderColor","readOnlyColor","disabledColor","shadowColor","shadowX","shadowY","shadowBlur","shadowOpacity","barForegroundColor","barBackgroundColor","barHorizontalPadding","barVerticalPadding","cellHorizontalBorderColor","cellVerticalBorderColor","cellHorizontalPadding","cellVerticalPadding","wrapperBorderWidth","wrapperBorderRadius","wrapperBorderColor","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 Rq(n,e){return(typeof n!="string"||n.trim()==="")&&U(`[ThemeBuilder] ${e}.name must be a non-empty string.`),n}function tV(n){if(!mA.has(n)){const e=[...mA].join(", ");U(`[ThemeBuilder] Invalid color scheme: "${n}". Must be one of: ${e}.`)}return n}function DE(n){if(!OE.has(n)){const e=[...OE].join(", ");U(`[ThemeBuilder] Invalid density: "${n}". Must be one of: ${e}.`)}return n}function Eq(n,e){ne(n)||U(`[ThemeBuilder] ${e}.sizes must be an object.`),Object.keys(n).forEach(t=>{OE.has(t)||Ie(`[ThemeBuilder] Unknown density size key: "${t}" in ${e}.sizes. This may be a custom density size or a typo.`)})}function kq(n,e){ne(n)?((!n.type||!n.sizes)&&U(`[ThemeBuilder] ${e} must be a string or an object with a 'type' and 'sizes' property.`),DE(n.type),Eq(n.sizes,`${e}.sizes`)):typeof n=="string"&&DE(n)}function nV(n,e){Object.entries(n).forEach(([t,o])=>{const i=`${e}.${t}`;typeof o!="string"&&(ne(o)?nV(o,i):U(`[ThemeBuilder] ${i} must be a string or an object.`))})}function HS(n,e,t,o={}){const{type:i="key",warnMissing:s=!1}=o;if(!n){s&&Ie(`[ThemeBuilder] No ${i}s provided in ${t}. All ${i}s are missing.`);return}if(Object.keys(n).forEach(a=>{e.has(a)||Ie(`[ThemeBuilder] Unknown ${i} key: "${a}" in ${t}. This may be a custom ${i} or a typo.`)}),s){const a=[];e.forEach(l=>{l in n||a.push(l)}),a.length>0&&Ie(`[ThemeBuilder] Missing ${i}(s) in ${t}: ${a.join(", ")}`)}}function wA(n,e,t={}){const{requiredFields:o=[]}=t;(typeof n!="object"||n===null)&&U(`[ThemeBuilder] ${e} must be an object.`);const{name:i,sizing:s,density:r,icons:a,colors:l,tokens:h,colorScheme:c}=n;HS(n,_q,e,{type:"param"}),o.forEach(d=>{n[d]===void 0&&U(`[ThemeBuilder] ${e}.${d} is required.`)}),i!==void 0&&Rq(i,e),s!==void 0&&(ne(s)||U(`[ThemeBuilder] ${e}.sizing must be an object.`)),r!==void 0&&(!ne(r)&&typeof r!="string"&&U(`[ThemeBuilder] ${e}.density must be a string or an object.`),kq(r,`${e}.density`)),a!==void 0&&(ne(a)||U(`[ThemeBuilder] ${e}.icons must be an object.`),HS(a,Sq,`${e}.icons`,{type:"icon",warnMissing:o.includes("icons")})),l!==void 0&&(ne(l)||U(`[ThemeBuilder] ${e}.colors must be an object.`),nV(l,`${e}.colors`)),h!==void 0&&(ne(h)||U(`[ThemeBuilder] ${e}.tokens must be an object.`),HS(h,vq,`${e}.tokens`,{type:"token",warnMissing:o.includes("tokens")})),c!==void 0&&tV(c)}function oV(n,e){if(e.has(n))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Tq(n,e){return e.get?e.get.call(n):e.value}function xq(n,e,t){if(e.set)e.set.call(n,t);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=t}}function iV(n,e,t){if(!e.has(n))throw new TypeError("attempted to "+t+" private field on non-instance");return e.get(n)}function wn(n,e){var t=iV(n,e,"get");return Tq(n,t)}function qf(n,e,t){oV(n,e),e.set(n,t)}function ar(n,e,t){var o=iV(n,e,"set");return xq(n,o,t),t}function uu(n,e,t){if(!e.has(n))throw new TypeError("attempted to get private field on non-instance");return t}function AS(n,e){oV(n,e),e.add(n)}const Mq=["sizing","icons","colors","tokens"],Iq=["name","icons","colors","tokens"];var Zi=new WeakMap,fu=new WeakMap,Jg=new WeakMap,rc=new WeakMap,jl=new WeakMap,Rw=new WeakSet,sV=new WeakSet,OS=new WeakSet;class Hq{subscribe(e){return typeof e!="function"&&U("[ThemeBuilder] listener must be a function."),wn(this,Jg).add(e),()=>wn(this,Jg).delete(e)}params(e){return wA(e,"params"),uu(this,OS,bA).call(this,e),uu(this,Rw,DS).call(this),this}setColorScheme(e){return ar(this,rc,tV(e)),wn(this,fu).colorScheme=wn(this,rc),wn(this,Zi).colorScheme=wn(this,rc),uu(this,Rw,DS).call(this),this}setDensityType(e){return ar(this,jl,DE(e)),wn(this,fu).density.type=wn(this,jl),wn(this,Zi).density.type=wn(this,jl),uu(this,Rw,DS).call(this),this}getThemeConfig(){return wn(this,fu)}constructor(e){AS(this,Rw),AS(this,sV),AS(this,OS),qf(this,Zi,{writable:!0,value:void 0}),qf(this,fu,{writable:!0,value:void 0}),qf(this,Jg,{writable:!0,value:void 0}),qf(this,rc,{writable:!0,value:void 0}),qf(this,jl,{writable:!0,value:void 0}),ar(this,Jg,new Set),ar(this,rc,"auto"),ar(this,jl,"default"),wA(e,"themeConfig",{requiredFields:Iq}),ar(this,Zi,{name:void 0,sizing:Cq,density:{type:wn(this,jl),sizes:yq},icons:{},colors:{},tokens:{},colorScheme:wn(this,rc)}),uu(this,OS,bA).call(this,e),ar(this,Zi,wn(this,fu))}}function DS(){const n=this.getThemeConfig();wn(this,Jg).forEach(e=>e(n))}function Aq(n,e){ne(e)?(n.density=G0(n.density,e),ar(this,jl,e.type),wn(this,Zi)?.density&&(wn(this,Zi).density.type=e.type)):typeof e=="string"&&(n.density.type=e,ar(this,jl,e),wn(this,Zi)?.density&&(wn(this,Zi).density.type=e))}function bA(n){const e=Qn(wn(this,Zi));n.name!==void 0&&(wn(this,Zi).name!==void 0?Ie('[ThemeBuilder] The "name" property can only be set during `registerTheme()` and cannot be updated via `params()`.'):e.name=n.name),Mq.forEach(t=>{n[t]!==void 0&&ne(n[t])&&(e[t]=G0(e[t],n[t]))}),n.density!==void 0&&uu(this,sV,Aq).call(this,e,n.density),n.colorScheme!==void 0&&(e.colorScheme=n.colorScheme,ar(this,rc,n.colorScheme),wn(this,Zi)?.colorScheme&&(wn(this,Zi).colorScheme=n.colorScheme)),ar(this,fu,e)}function Oq(n){return new Hq(n)}const Pt=(n,e)=>`width: var(--ht-icon-size);
|
|
77
|
+
height: var(--ht-icon-size);
|
|
78
|
+
-webkit-mask-size: contain;
|
|
79
|
+
-webkit-mask-image: url("${n[e]}");
|
|
80
|
+
background-color: currentColor;`,Dq=(n,e)=>`.htDropdownMenu table tbody tr td.htSubmenu .htItemWrapper::after,
|
|
81
|
+
.htContextMenu table tbody tr td.htSubmenu .htItemWrapper::after,
|
|
82
|
+
.htFiltersConditionsMenu table tbody tr td.htSubmenu .htItemWrapper::after,
|
|
83
|
+
.pika-single .pika-next {
|
|
84
|
+
${Pt(n,"arrowRight")}
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
.pika-single .pika-prev {
|
|
88
|
+
${Pt(n,"arrowLeft")}
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
.ht-page-size-section__select-wrapper::after {
|
|
92
|
+
${Pt(n,"arrowDown")}
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
.changeType::before {
|
|
96
|
+
${Pt(n,"menu")}
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
.htUISelectCaption::after,
|
|
100
|
+
.htAutocompleteArrow::after {
|
|
101
|
+
${Pt(n,"selectArrow")}
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
.columnSorting.sortAction.ascending::before {
|
|
105
|
+
${Pt(n,"arrowNarrowUp")}
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
.columnSorting.sortAction.descending::before {
|
|
109
|
+
${Pt(n,"arrowNarrowDown")}
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
.ht-page-navigation-section .ht-page-first::before {
|
|
113
|
+
${Pt(n,"arrowLeftWithBar")}
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
[dir="rtl"] .ht-page-navigation-section .ht-page-first::before {
|
|
117
|
+
${Pt(n,"arrowRightWithBar")}
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
.ht-page-navigation-section .ht-page-prev::before {
|
|
121
|
+
${Pt(n,"arrowLeft")}
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
[dir="rtl"] .ht-page-navigation-section .ht-page-prev::before {
|
|
125
|
+
${Pt(n,"arrowRight")}
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
.ht-page-navigation-section .ht-page-next::before {
|
|
129
|
+
${Pt(n,"arrowRight")}
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
[dir="rtl"] .ht-page-navigation-section .ht-page-next::before {
|
|
133
|
+
${Pt(n,"arrowLeft")}
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
.ht-page-navigation-section .ht-page-last::before {
|
|
137
|
+
${Pt(n,"arrowRightWithBar")}
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
[dir="rtl"] .ht-page-navigation-section .ht-page-last::before {
|
|
141
|
+
${Pt(n,"arrowLeftWithBar")}
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
.htDropdownMenu table tbody tr td .htItemWrapper span.selected::after,
|
|
145
|
+
.htContextMenu table tbody tr td .htItemWrapper span.selected::after,
|
|
146
|
+
.htFiltersConditionsMenu table tbody tr td .htItemWrapper span.selected::after {
|
|
147
|
+
${Pt(n,"check")}
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
.htCheckboxRendererInput {
|
|
151
|
+
appearance: none;
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
.htCheckboxRendererInput::after {
|
|
155
|
+
${Pt(n,"checkbox")}
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
th.beforeHiddenColumn::after {
|
|
159
|
+
${Pt(n,"caretHiddenLeft")}
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
th.afterHiddenColumn::before {
|
|
163
|
+
${Pt(n,"caretHiddenRight")}
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
th.beforeHiddenRow::after {
|
|
167
|
+
${Pt(n,"caretHiddenUp")}
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
th.afterHiddenRow::before {
|
|
171
|
+
${Pt(n,"caretHiddenDown")}
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
.collapsibleIndicator::before,
|
|
175
|
+
.ht_nestingButton::before {
|
|
176
|
+
${Pt(n,"collapseOff")}
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
.collapsibleIndicator.collapsed::before,
|
|
180
|
+
.ht_nestingButton.ht_nestingExpand::before {
|
|
181
|
+
${Pt(n,"collapseOn")}
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
.htUIRadio > input[type="radio"]::after {
|
|
185
|
+
${Pt(n,"radio")}
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
.ht-multi-select-chip-remove::before {
|
|
189
|
+
${Pt(n,"chipClose")}
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
.ht-notification__close::before {
|
|
193
|
+
${Pt(n,"chipClose")}
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
.ht-multi-select-editor-search-icon {
|
|
197
|
+
${Pt(n,"search")}
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
.ht-multi-select-editor-item-selected input::after {
|
|
201
|
+
${Pt(n,"checkbox")}
|
|
202
|
+
}`,NE="--ht-",Nq=["font-family"],Pq=["tokens.","colors.","sizing.","density."];function Lq(n){return typeof n=="string"&&Pq.some(e=>n.includes(e))}function Wq(n){return n.includes("tokens.")?`var(${NE}${Yp(n.split(".").slice(1).join("-"))})`:`var(${NE}${Yp(n.split(".").join("-"))})`}function $q(n,e){return`${NE}${n?`${n}-`:""}${Yp(e)}`}function gu(n,e){if(Lq(n))return Wq(n);if(Array.isArray(n)){if(n.length>=2){const[t,o]=n;return typeof t=="string"&&typeof o=="string"?`light-dark(${gu(t,e)}, ${gu(o,e)})`:typeof t=="string"?gu(t,e):typeof o=="string"?gu(o,e):""}return gu(n[0],e)}return e&&Nq.includes(e)?String(n):Yp(n)}function Fq(n,e,t){return`${$q(n,e)}: ${gu(t,e)};`}function ep(n,e="",t=""){let o="";return Object.entries(n).forEach(([i,s])=>{const r=Yp(i),a=t?`${t}-${r}`:r;ne(s)?o+=ep(s,e,a):o+=`${Fq(e,a,s)}
|
|
203
|
+
`}),o}function rV(n,e){if(e.has(n))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Bq(n,e){return e.get?e.get.call(n):e.value}function Vq(n,e,t){if(e.set)e.set.call(n,t);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=t}}function aV(n,e,t){if(!e.has(n))throw new TypeError("attempted to "+t+" private field on non-instance");return e.get(n)}function CA(n,e){var t=aV(n,e,"get");return Bq(n,t)}function zq(n,e,t){rV(n,e),e.set(n,t)}function yA(n,e,t){var o=aV(n,e,"set");return Vq(n,o,t),t}function _A(n,e,t){if(!e.has(n))throw new TypeError("attempted to get private field on non-instance");return t}function Uq(n,e){rV(n,e),e.add(n)}const Yq="ht-theme-";var Kf=new WeakMap,NS=new WeakSet;class Gq{getClassName(){return this.themeClassName}update(e){var t,o;this.hot&&(e.getThemeConfig===void 0&&U('[ThemeManager] The "theme" option must be an instance of ThemeBuilder.'),this.themeConfig=e.getThemeConfig(),this.themeClassName=`${Yq}${this.themeConfig.name}`,typeof e.subscribe=="function"&&((t=CA(o=this,Kf))===null||t===void 0||t.call(o),yA(this,Kf,e.subscribe(i=>{this.hot?.stylesHandler&&(this.themeConfig=i,_A(this,NS,SA).call(this),this.hot.stylesHandler.clearCache(),this.hot.render(),this.hot.runHooks("afterSetTheme",this.themeClassName,!1))}))),this.mount(),this.hot.runHooks("afterSetTheme",this.themeClassName,!0))}mount(){_A(this,NS,SA).call(this)}unmount(){this.themeStyles&&this.themeStyles.remove()}destroy(){var e,t;(e=CA(t=this,Kf))===null||e===void 0||e.call(t),this.unmount(),this.hot.themeManager=null}constructor({hot:e,themeObject:t}){Uq(this,NS),zq(this,Kf,{writable:!0,value:void 0}),yA(this,Kf,null),this.hot=e,this.update(t)}}function SA(){if(!this.themeConfig||!this.hot||!this.hot.rootDocument||!this.hot.rootWrapperElement)return;const n=this.themeConfig.colorScheme==="auto"?"light dark":this.themeConfig.colorScheme;this.themeStyles?this.themeStyles.textContent="":this.themeStyles=this.hot.rootDocument.createElement("style"),this.themeStyles.textContent=`:where(.${this.themeClassName}) {
|
|
204
|
+
`,this.themeConfig.sizing&&(this.themeStyles.textContent+=ep(this.themeConfig.sizing,"sizing")),this.themeConfig.density&&this.themeConfig.density.type&&this.themeConfig.density.sizes&&this.themeConfig.density.sizes[this.themeConfig.density.type]&&(this.themeStyles.textContent+=ep(this.themeConfig.density.sizes[this.themeConfig.density.type],"density")),this.themeConfig.colors&&(this.themeStyles.textContent+=ep(this.themeConfig.colors,"colors")),this.themeConfig.tokens&&(this.themeStyles.textContent+=ep(this.themeConfig.tokens)),this.themeConfig.icons&&(this.themeStyles.textContent+=Dq(this.themeConfig.icons)),this.themeStyles.textContent+=`}
|
|
205
|
+
`,this.themeStyles.textContent+=`.${this.themeClassName} {
|
|
206
|
+
color-scheme: ${n};
|
|
207
|
+
}`,this.hot.rootWrapperElement&&this.hot.rootWrapperElement.querySelector("style")?this.hot.rootWrapperElement.querySelector("style").textContent=this.themeStyles.textContent:this.hot.rootWrapperElement.prepend(this.themeStyles)}function jq({hot:n,themeObject:e}){return new Gq({hot:n,themeObject:e})}const qq={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"},Kq={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"},Xq={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",wrapperBorderWidth:"0px",wrapperBorderRadius:"sizing.size_1",wrapperBorderColor:"tokens.borderColor",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"]},Zq={name:"main",density:"default",icons:qq,colors:Kq,tokens:Xq},{hasItem:Qq,getItem:Jq,getNames:eK,getValues:tK,register:nK}=ts("themes");function Ky(n){return Qq(n)}function WC(n){if(!Ky(n)){Ie(`Theme "${n}" is not registered. Please ensure it is registered before using it.`);return}return Jq(n)}function oK(){return eK()}function iK(){return tK()}function sK(n,e){let t=n,o=Qn(e);return typeof n=="string"&&ne(e)?o.name=n:ne(n)&&(o=Qn(n),t=o.name),{themeName:t,themeConfigObject:o}}function Ub(n,e){const{themeName:t,themeConfigObject:o}=sK(n,e),i=Oq(o);return Ky(t)?(Ie(`Theme "${t}" is already registered. Registration skipped.`),WC(t)):(nK(t,i),i)}let PS=null;const LS=new Map;function lV(n,e,t=!1){let o=this;const i=new Wi(o);let s,r,a,l,h,c,d=!0;const u={...e.initialState,...e};e7(t)&&J9(this),this.rootContainer=n,this.rootWrapperElement=void 0,this.rootGridElement=void 0,this.rootPortalElement=void 0,this.rootElement=Qs(this)?n.ownerDocument.createElement("div"):n,this.rootDocument=n.ownerDocument,this.rootWindow=this.rootDocument.defaultView,Qs(this)&&(this.rootWrapperElement=this.rootDocument.createElement("div"),this.rootGridElement=this.rootDocument.createElement("div"),this.rootPortalElement=this.rootDocument.createElement("div"),B(this.rootElement,["ht-wrapper","handsontable"]),B(this.rootWrapperElement,"ht-root-wrapper"),B(this.rootGridElement,"ht-grid"),this.rootGridElement.appendChild(this.rootElement),this.rootWrapperElement.appendChild(this.rootGridElement),this.rootContainer.appendChild(this.rootWrapperElement),this.rootWrapperElement.__hotInstance=this,B(this.rootPortalElement,"ht-portal"),this.rootDocument.body.appendChild(this.rootPortalElement)),this.isDestroyed=!1,this.renderSuspendedCounter=0,this.executionSuspendedCounter=0;const f=u?.layoutDirection??"inherit",p=["rtl","ltr"].includes(f)?f:this.rootWindow.getComputedStyle(this.rootElement).direction;this.rootElement.setAttribute("dir",p),this.rootWrapperElement?.setAttribute("dir",p),this.isRtl=function(){return p==="rtl"},this.isLtr=function(){return!o.isRtl()},this.getDirectionFactor=function(){return o.isLtr()?1:-1},this.stylesHandler=new dq({hot:o,rootElement:o.rootElement,rootDocument:o.rootDocument,onThemeChange:g=>{Qs(this)&&(oe(this.rootWrapperElement,/ht-theme-.*/g),oe(this.rootPortalElement,/ht-theme-.*/g),g&&(B(this.rootWrapperElement,g),B(this.rootPortalElement,g),getComputedStyle(this.rootWrapperElement).getPropertyValue("--ht-line-height")||Ie(`The "${g}" 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:typeof e?.injectCoreCss=="boolean"?e.injectCoreCss:!0}),this.themeManager=null,u.language=$7(u.language);const C=Object.fromEntries(Object.entries(u).filter(([g])=>!(he.getSingleton().isRegistered(g)||he.getSingleton().isDeprecated(g)))),_=new WB(o,C,[Sj,Mj]),S=_.getTableMeta(),T=_.getGlobalMeta(),P=Hm();this.container=this.rootDocument.createElement("div"),this.rootElement.insertBefore(this.container,this.rootElement.firstChild),this.guid=`ht_${V0()}`,LS.set(this.guid,this),this.columnIndexMapper=new RE,this.rowIndexMapper=new RE,this.columnIndexMapper.addLocalHook("indexesSequenceChange",g=>{o.runHooks("afterColumnSequenceChange",g)}),this.rowIndexMapper.addLocalHook("indexesSequenceChange",g=>{o.runHooks("afterRowSequenceChange",g)}),i.addEventListener(this.rootDocument.documentElement,"compositionstart",g=>{o.runHooks("beforeCompositionStart",g)}),r=new hj(o);const F=ts(this.guid);F.register("cellRangeMapper",new Aj({rowIndexMapper:this.rowIndexMapper,columnIndexMapper:this.columnIndexMapper})),(!this.rootElement.id||this.rootElement.id.substring(0,3)==="ht_")&&(this.rootElement.id=this.guid);const V=g=>{const{row:b,col:v}=g;return o._createCellCoords(b>=0?o.rowIndexMapper.getRenderableFromVisualIndex(b):b,v>=0?o.columnIndexMapper.getRenderableFromVisualIndex(v):v)},D=g=>{const{row:b,col:v}=g;return o._createCellCoords(b>=0?o.rowIndexMapper.getVisualFromRenderableIndex(b):b,v>=0?o.columnIndexMapper.getVisualFromRenderableIndex(v):v)},I=(g,b)=>{const v=b>g?1:-1,m=Math.min(g,b),w=Math.max(g,b),y=o.rowIndexMapper.getNearestNotHiddenIndex(g,v);return y===null||v===1&&y>w||v===-1&&y<m?null:y>=0?o.rowIndexMapper.getRenderableFromVisualIndex(y):y},G=(g,b)=>{const v=b>g?1:-1,m=Math.min(g,b),w=Math.max(g,b),y=o.columnIndexMapper.getNearestNotHiddenIndex(g,v);return y===null||v===1&&y>w||v===-1&&y<m?null:y>=0?o.columnIndexMapper.getRenderableFromVisualIndex(y):y};let z=new NB(S,{rowIndexMapper:o.rowIndexMapper,columnIndexMapper:o.columnIndexMapper,countCols:()=>o.countCols(),countRows:()=>o.countRows(),propToCol:g=>s.propToCol(g),isEditorOpened:()=>o.getActiveEditor()?o.getActiveEditor().isOpened():!1,countRenderableColumns:()=>this.view.countRenderableColumns(),countRenderableRows:()=>this.view.countRenderableRows(),countRowHeaders:()=>this.countRowHeaders(),countColHeaders:()=>this.countColHeaders(),countRenderableRowsInRange:(...g)=>this.view.countRenderableRowsInRange(...g),countRenderableColumnsInRange:(...g)=>this.view.countRenderableColumnsInRange(...g),getShortcutManager:()=>o.getShortcutManager(),createCellCoords:(g,b)=>o._createCellCoords(g,b),createCellRange:(g,b,v)=>o._createCellRange(g,b,v),visualToRenderableCoords:V,renderableToVisualCoords:D,findFirstNonHiddenRenderableRow:I,findFirstNonHiddenRenderableColumn:G,isDisabledCellSelection:(g,b)=>g<0||b<0?o.getSettings().disableVisualSelection:o.getCellMeta(g,b).disableVisualSelection});this.selection=z;const Y=({hiddenIndexesChanged:g})=>{this.forceFullRender=!0,g&&this.selection.commit()};this.columnIndexMapper.addLocalHook("cacheUpdated",g=>{Y(g),this.runHooks("afterColumnSequenceCacheUpdate",g)}),this.rowIndexMapper.addLocalHook("cacheUpdated",g=>{Y(g),this.runHooks("afterRowSequenceCacheUpdate",g)}),this.selection.addLocalHook("afterSetRangeEnd",(g,b)=>{const v=Pi(!1),m=this.selection.getSelectedRange(),{from:w,to:y}=m.current(),E=m.size()-1;this.runHooks("afterSelection",w.row,w.col,y.row,y.col,v,E),this.runHooks("afterSelectionByProp",w.row,o.colToProp(w.col),y.row,o.colToProp(y.col),v,E);const k=z.getSelectionSource();b&&!["loadData","updateData","deselect","shift"].includes(k)&&(!v.isTouched()||v.isTouched()&&!v.value)&&c.scrollTo(g);const N=z.isSelectedByRowHeader(),R=z.isSelectedByColumnHeader();N&&R?B(this.rootElement,["ht__selection--rows","ht__selection--columns"]):N?(oe(this.rootElement,"ht__selection--columns"),B(this.rootElement,"ht__selection--rows")):R?(oe(this.rootElement,"ht__selection--rows"),B(this.rootElement,"ht__selection--columns")):oe(this.rootElement,["ht__selection--rows","ht__selection--columns"]),["shift","refresh","loadData","updateData","deselect"].includes(k)||l.closeEditor(null),["refresh","loadData","updateData","deselect"].includes(k)||(o.view.render(),l.prepareEditor())}),this.selection.addLocalHook("beforeSetFocus",g=>{this.runHooks("beforeSelectionFocusSet",g.row,g.col)}),this.selection.addLocalHook("afterSetFocus",g=>{const b=Pi(!1);this.runHooks("afterSelectionFocusSet",g.row,g.col,b),(!b.isTouched()||b.isTouched()&&!b.value)&&c.scrollTo(g),l.closeEditor(),o.view.render(),l.prepareEditor()}),this.selection.addLocalHook("afterSelectionFinished",g=>{const b=g.length-1,{from:v,to:m}=g[b];this.runHooks("afterSelectionEnd",v.row,v.col,m.row,m.col,b),this.runHooks("afterSelectionEndByProp",v.row,o.colToProp(v.col),m.row,o.colToProp(m.col),b),["refresh","deselect"].includes(z.getSelectionSource())&&(o.view.render(),l.prepareEditor())}),this.selection.addLocalHook("afterIsMultipleSelection",g=>{const b=this.runHooks("afterIsMultipleSelection",g.value);g.value&&(g.value=b)}),this.selection.addLocalHook("afterDeselect",()=>{l.closeEditor(),o.view.render(),oe(this.rootElement,["ht__selection--rows","ht__selection--columns"]),this.runHooks("afterDeselect")}),this.selection.addLocalHook("beforeHighlightSet",()=>this.runHooks("beforeSelectionHighlightSet")).addLocalHook("beforeSetRangeStart",(...g)=>this.runHooks("beforeSetRangeStart",...g)).addLocalHook("beforeSetRangeStartOnly",(...g)=>this.runHooks("beforeSetRangeStartOnly",...g)).addLocalHook("beforeSetRangeEnd",(...g)=>this.runHooks("beforeSetRangeEnd",...g)).addLocalHook("beforeSelectColumns",(...g)=>this.runHooks("beforeSelectColumns",...g)).addLocalHook("afterSelectColumns",(...g)=>this.runHooks("afterSelectColumns",...g)).addLocalHook("beforeSelectRows",(...g)=>this.runHooks("beforeSelectRows",...g)).addLocalHook("afterSelectRows",(...g)=>this.runHooks("afterSelectRows",...g)).addLocalHook("beforeSelectAll",(...g)=>this.runHooks("beforeSelectAll",...g)).addLocalHook("afterSelectAll",(...g)=>this.runHooks("afterSelectAll",...g)).addLocalHook("beforeModifyTransformStart",(...g)=>this.runHooks("modifyTransformStart",...g)).addLocalHook("afterModifyTransformStart",(...g)=>this.runHooks("afterModifyTransformStart",...g)).addLocalHook("beforeModifyTransformFocus",(...g)=>this.runHooks("modifyTransformFocus",...g)).addLocalHook("afterModifyTransformFocus",(...g)=>this.runHooks("afterModifyTransformFocus",...g)).addLocalHook("beforeModifyTransformEnd",(...g)=>this.runHooks("modifyTransformEnd",...g)).addLocalHook("afterModifyTransformEnd",(...g)=>this.runHooks("afterModifyTransformEnd",...g)).addLocalHook("beforeRowWrap",(...g)=>this.runHooks("beforeRowWrap",...g)).addLocalHook("beforeColumnWrap",(...g)=>this.runHooks("beforeColumnWrap",...g)).addLocalHook("insertRowRequire",g=>this.alter("insert_row_above",g,1,"auto")).addLocalHook("insertColRequire",g=>this.alter("insert_col_start",g,1,"auto")),a={alter(g,b,v=1,m,w){if(o.runHooks("beforeAlter",g,b,v,m,w)===!1)return;const E=k=>{if(k.length===0)return[];const M=[...k];return M.sort(([R],[A])=>R===A?0:R>A?1:-1),$i(M,(R,[A,L])=>{const H=R[R.length-1],[j,ue]=H,re=j+ue;if(A<=re){const Ae=Math.max(L-(re-A),0);H[1]+=Ae}else R.push([A,L]);return R},[M[0]])};switch(g){case"insert_row_below":case"insert_row_above":const k=o.countSourceRows();if(S.maxRows===k)return;const M=g==="insert_row_below"?"below":"above";b=b??(M==="below"?k:0);const{delta:N,startPhysicalIndex:R}=s.createRow(b,v,{source:m,mode:M});z.shiftRows(o.toVisualRow(R),N);break;case"insert_col_start":case"insert_col_end":const A=g==="insert_col_end"?"end":"start";b=b??(A==="end"?o.countSourceCols():0);const{delta:L,startPhysicalIndex:H}=s.createCol(b,v,{source:m,mode:A});if(L){if(Array.isArray(S.colHeaders)){const re=[o.toVisualColumn(H),0];re.length+=L,Array.prototype.splice.apply(S.colHeaders,re)}z.shiftColumns(o.toVisualColumn(H),L)}break;case"remove_row":const j=re=>{let Ae=0;O(re,([Ne,nt])=>{const Oe=ht(Ne)?o.countRows()-1:Math.max(Ne-Ae,0);if(Number.isInteger(Ne)&&(Ne=Math.max(Ne-Ae,0)),!s.removeRow(Ne,nt,m))return;if(z.isSelected()){const{row:yn}=o.getSelectedRangeActive().highlight;yn>=Ne&&yn<=Ne+nt-1&&l.closeEditor(!0)}const xt=o.countRows(),qt=S.fixedRowsTop;qt>=Oe+1&&(S.fixedRowsTop-=Math.min(nt,qt-Oe));const Ro=S.fixedRowsBottom;if(Ro&&Oe>=xt-Ro&&(S.fixedRowsBottom-=Math.min(nt,Ro)),xt===0)z.deselect();else if(m==="ContextMenu.removeRow"){const yn=z.getSelectedRange(),zt=yn.pop();yn.clear().set(zt.from).current().setTo(zt.to),z.refresh()}else z.shiftRows(Ne,-nt);Ae+=nt})};Array.isArray(b)?j(E(b)):j([[b,v]]);break;case"remove_col":const ue=re=>{let Ae=0;O(re,([Ne,nt])=>{const Oe=ht(Ne)?o.countCols()-1:Math.max(Ne-Ae,0);let je=o.toPhysicalColumn(Oe);if(Number.isInteger(Ne)&&(Ne=Math.max(Ne-Ae,0)),!s.removeCol(Ne,nt,m))return;if(z.isSelected()){const{col:yn}=o.getSelectedRangeActive().highlight;yn>=Ne&&yn<=Ne+nt-1&&l.closeEditor(!0)}if(o.countCols()===0)z.deselect();else if(m==="ContextMenu.removeColumn"){const yn=z.getSelectedRange(),zt=yn.pop();yn.clear().set(zt.from).current().setTo(zt.to),z.refresh()}else z.shiftColumns(Ne,-nt);const Ro=S.fixedColumnsStart;Ro>=Oe+1&&(S.fixedColumnsStart-=Math.min(nt,Ro-Oe)),Array.isArray(S.colHeaders)&&(typeof je>"u"&&(je=-1),S.colHeaders.splice(je,nt)),Ae+=nt})};Array.isArray(b)?ue(E(b)):ue([[b,v]]);break;default:U(`There is no such action "${g}"`)}w||a.adjustRowsAndCols(),o.view.adjustElementsSize(),o.view.render()},adjustRowsAndCols(){const g=S.minRows,b=S.minSpareRows,v=S.minCols,m=S.minSpareCols;if(g){const w=o.countRows();w<g&&s.createRow(w,g-w,{source:"auto"})}if(b){const w=o.countEmptyRows(!0);if(w<b){const y=b-w,E=Math.min(y,S.maxRows-o.countSourceRows());s.createRow(o.countRows(),E,{source:"auto"})}}{let w;(v||m)&&(w=o.countEmptyCols(!0));let y=o.countCols();if(v&&!S.columns&&y<v){const E=v-y;w+=E,s.createCol(y,E,{source:"auto"})}if(m&&!S.columns&&o.dataType==="array"&&w<m){y=o.countCols();const E=m-w,k=Math.min(E,S.maxCols-y);s.createCol(y,k,{source:"auto"})}}},populateFromArray(g,b,v,m,w){let y,E,k,M;const N=[],R={},A=[],L=g.row,H=g.col;if(E=b.length,E===0)return!1;let j=0,ue=0;switch(ne(v)&&(j=v.col-H+1,ue=v.row-L+1),w){case"shift_down":const re=Ab(b),Ae=re.length,Ne=Math.max(Ae,j),nt=o.getData().slice(L),Oe=Ab(nt).slice(H,H+Ne);for(k=0;k<Ne;k+=1)if(k<Ae){for(y=0,E=re[k].length;y<ue-E;y+=1)re[k].push(re[k][y%E]);k<Oe.length?A.push(re[k].concat(Oe[k])):A.push(re[k].concat(new Array(nt.length).fill(null)))}else A.push(re[k%Ae].concat(Oe[k]));o.populateFromArray(L,H,Ab(A));break;case"shift_right":const je=b.length,xt=Math.max(je,ue),qt=o.getData().slice(L).map(Jo=>Jo.slice(H));for(y=0;y<xt;y+=1)if(y<je){for(k=0,M=b[y].length;k<j-M;k+=1)b[y].push(b[y][k%M]);if(y<qt.length)for(let Jo=0;Jo<qt[y].length;Jo+=1)b[y].push(qt[y][Jo]);else b[y].push(...new Array(qt[0].length).fill(null))}else b.push(b[y%E].slice(0,xt).concat(qt[y]));o.populateFromArray(L,H,b);break;default:R.row=g.row,R.col=g.col;let Ro=0,yn=0,zt=!0,Eo;const lo=m==="Autofill.fill"||m==="autofill.fill",dn=function(pl,la=null){const ha=b[pl%b.length];return la!==null?ha[la%ha.length]:ha},Mt=b.length,mi=v?v.row-g.row+1:0;for(v?E=mi:E=Math.max(Mt,mi),y=0;y<E&&!(v&&R.row>v.row&&mi>Mt||!S.allowInsertRow&&R.row>o.countRows()-1||R.row>=S.maxRows);y++){const Jo=y-Ro,pl=lo?y:Jo,la=dn(pl).length,ha=v?v.col-g.col+1:0;if(v?M=ha:M=Math.max(la,ha),R.col=g.col,Eo=o.getCellMeta(R.row,R.col),(m==="CopyPaste.paste"||m==="Autofill.fill"||m==="autofill.fill")&&Eo.skipRowOnPaste){Ro+=1,R.row+=1,m==="CopyPaste.paste"&&(E+=1);continue}for(yn=0,k=0;k<M&&!(v&&R.col>v.col&&ha>la||!S.allowInsertColumn&&R.col>o.countCols()-1||R.col>=S.maxCols);k++){if(Eo=o.getCellMeta(R.row,R.col),(m==="CopyPaste.paste"||m==="Autofill.fill"||m==="autofill.fill")&&Eo.skipColumnOnPaste){yn+=1,R.col+=1,m==="CopyPaste.paste"&&(M+=1);continue}if(Eo.readOnly&&m!=="UndoRedo.undo"){R.col+=1;continue}const _f=k-yn,Sf=lo?k:_f,vf=!!Eo.valueSetter;let Do=dn(pl,Sf),Fi=o.getSourceDataAtCell(R.row,R.col)??null;if(Do!==null&&typeof Do=="object"){if(Array.isArray(Do)&&Fi===null&&(Fi=[]),!vf&&(typeof Fi!="object"||Fi===null))zt=!1,Eo.parsePastedValue&&m==="CopyPaste.paste"&&(zt=!0);else if(Fi!==null){const Qm=Gp(Array.isArray(Fi)?Fi:Fi[0]||Fi),_n=Gp(Array.isArray(Do)?Do:Do[0]||Do);vf||uh(Qm,_n)||Array.isArray(Qm)&&Array.isArray(_n)?Do=Qn(Do):zt=!1}}else!vf&&Fi!==null&&typeof Fi=="object"&&(zt=!1);zt&&N.push([R.row,R.col,Do]),zt=!0,R.col+=1}R.row+=1}o.setDataAtCell(N,null,null,m||"populateFromArray");break}}};function te(g){const b=bB(g);ux(b)?(o.runHooks("beforeLanguageChange",b),T.language=b,o.runHooks("afterLanguageChange",b)):CB(g)}function ee(g,b){const v=g==="className"?o.rootElement:o.table;if(d)B(v,b);else{let m=[],w=[];T[g]&&(m=Array.isArray(T[g])?T[g]:DI(T[g])),b&&(w=Array.isArray(b)?b:DI(b));const y=OI(m,w),E=OI(w,m);y.length&&oe(v,y),E.length&&B(v,E)}T[g]=b}this.init=function(){r.setData(S.data),o.runHooks("beforeInit"),(qr()||j0())&&B(o.rootElement,"mobile"),this.updateSettings(u,!0),this.view=new o7(this),l=wE.getInstance(o,S,z),c=Fj(o),h.init(),Qs(this)&&(mq(o.rootPortalElement),mG(u.licenseKey,this.rootWrapperElement,"19/05/2026")),o.runHooks("init"),this.render(),d&&o.rootElement.offsetParent===null&&m4(o.rootElement,()=>{o.view._wt.wtOverlays.updateLastSpreaderSize(),o.view.adjustElementsSize(),o.render()}),typeof d=="object"&&(o.runHooks("afterChange",d[0],d[1]),d=!1),o.runHooks("afterInit")};function be(g){let b;typeof g>"u"?(Ky("main")?b=WC("main"):b=Ub(Zq),b=WC("main")):typeof g.getThemeConfig!="function"?b=Ub(g):b=g,o.themeManager=jq({hot:o,themeObject:b})}function me(){let g=!1;return{validatorsInQueue:0,valid:!0,addValidatorToQueue(){this.validatorsInQueue+=1,g=!1},removeValidatorFormQueue(){this.validatorsInQueue=this.validatorsInQueue-1<0?0:this.validatorsInQueue-1,this.checkIfQueueIsEmpty()},onQueueEmpty(){},checkIfQueueIsEmpty(){this.validatorsInQueue===0&&g===!1&&(g=!0,this.onQueueEmpty(this.valid))}}}function Ve(g,b){return b?.isOpened()?l7(g,b.row,b.prop):!1}function Ye(g,b,v){if(!g.length){v();return}const m=o.getActiveEditor(),w=new me;let y=!0;w.onQueueEmpty=()=>{m&&y&&m._closeAfterDataChange&&Ve(g,m)&&m.cancelChanges(),v()};for(let E=g.length-1;E>=0;E--){const[k,M,,N]=g[E],R=s.propToCol(M);let A;Number.isInteger(R)?A=o.getCellMeta(k,R):A={...Object.getPrototypeOf(S),...S},o.getCellValidator(A)&&(w.addValidatorToQueue(),o.validateCell(N,A,(function(L,H){return function(j){typeof j!="boolean"&&U("Validation error: result is not boolean"),j===!1&&H.allowInvalid===!1&&(y=!1,g.splice(L,1),H.valid=!0),w.removeValidatorFormQueue()}})(E,A),b))}w.checkIfQueueIsEmpty()}function Me(g,b){for(let E=g.length-1;E>=0;E--){let k=!1;if(g[E]===null){g.splice(E,1);continue}if(!((g[E][2]===null||g[E][2]===void 0)&&(g[E][3]===null||g[E][3]===void 0))){if(S.allowInsertRow)for(;g[E][0]>o.countRows()-1;){const{delta:M}=s.createRow(void 0,void 0,{source:"auto"});if(M===0){k=!0;break}}if(o.dataType==="array"&&(!S.columns||S.columns.length===0)&&S.allowInsertColumn)for(;s.propToCol(g[E][1])>o.countCols()-1;){const{delta:M}=s.createCol(void 0,void 0,{source:"auto"});if(M===0){k=!0;break}}k||s.set(g[E][0],g[E][1],g[E][3])}}const v=g.length>0,m=l.getActiveEditor(),w=m?._closeAfterDataChange,y=Ve(g,m);v?(a.adjustRowsAndCols(),o.runHooks("beforeChangeRender",g,b),m?.isOpened()&&w&&y&&l.closeEditor(),o.view.adjustElementsSize(),o.render(),(m?.isOpened()&&w&&y||!m?.isOpened())&&l.prepareEditor(),o.runHooks("afterChange",g,b||"edit"),m&&J(m.refreshValue)&&(!m.isOpened()||y)&&m.refreshValue()):o.render()}this._createCellCoords=function(g,b){return o.view._wt.createCellCoords(g,b)},this._createCellRange=function(g,b,v){return o.view._wt.createCellRange(g,b,v)},this.validateCell=function(g,b,v,m){let w=o.getCellValidator(b);function y(E,k=!0){if(!k||b.hidden===!0){v(E);return}const M=b.visualCol,N=b.visualRow,R=o.getCell(N,M,!0);if(R&&R.nodeName!=="TH"){const A=o.rowIndexMapper.getRenderableFromVisualIndex(N),L=o.columnIndexMapper.getRenderableFromVisualIndex(M);o.view._wt.getSetting("cellRenderer",A,L,R)}v(E)}fG(w)&&(w=(function(E){return function(k,M){M(E.test(k))}})(w)),ye(w)?(g=o.runHooks("beforeValidate",g,b.visualRow,b.prop,m),o._registerMicrotask(()=>{w.call(b,g,E=>{o&&(E=o.runHooks("afterValidate",E,g,b.visualRow,b.prop,m),b.valid=E,y(E),o.runHooks("postAfterValidate",E,g,b.visualRow,b.prop,m))})})):o._registerMicrotask(()=>{b.valid=!0,y(b.valid,!1)})};function Ge(g,b,v){return Array.isArray(g)?g:[[g,b,v]]}function wt(g,b){const v=o.runHooks("beforeChange",g,b||"edit"),m=g.filter(w=>w!==null);if(v===!1||m.length===0)return o.getActiveEditor()?.cancelChanges(),[];for(let w=m.length-1;w>=0;w--){const[y,E,,k]=m[w],M=s.propToCol(E);let N;Number.isInteger(M)?N=o.getCellMeta(y,M):N={...Object.getPrototypeOf(S),...S},m[w][3]=vS(k,N)}return m}this.setDataAtCell=function(g,b,v,m){const w=Ge(g,b,v),y=[];let E=m,k,M,N;for(k=0,M=w.length;k<M;k++){const[A,L,H]=w[k];typeof w[k]!="object"&&U("Method `setDataAtCell` accepts row number or changes array of arrays as its first parameter"),typeof w[k][1]!="number"&&U("Method `setDataAtCell` accepts row and column number as its parameters. If you want to use object property name, use method `setDataAtRowProp`"),L>=this.countCols()?N=L:N=s.colToProp(L),y.push([A,N,r.getAtCell(this.toPhysicalRow(A),L),H])}!E&&typeof g=="object"&&(E=b);const R=wt(y,E);o.runHooks("afterSetDataAtCell",R,E),Ye(R,E,()=>{Me(R,E)})},this.setDataAtRowProp=function(g,b,v,m){const w=Ge(g,b,v),y=[];let E=m,k,M;for(k=0,M=w.length;k<M;k++){const[R,A,L]=w[k];y.push([R,A,r.getAtCell(this.toPhysicalRow(R),A),L])}!E&&typeof g=="object"&&(E=b);const N=wt(y,E);o.runHooks("afterSetDataAtRowProp",N,E),Ye(N,E,()=>{Me(N,E)})},this.listen=function(){o&&!o.isListening()&&(LS.forEach(g=>{o!==g&&g.unlisten()}),PS=o.guid,o.runHooks("afterListen"))},this.unlisten=function(){this.isListening()&&(PS=null,o.runHooks("afterUnlisten"))},this.isListening=function(){return PS===o.guid},this.destroyEditor=function(g=!1,b=!0){l.closeEditor(g),o.view.render(),b&&z.isSelected()&&l.prepareEditor()},this.populateFromArray=function(g,b,v,m,w,y,E){typeof v=="object"&&typeof v[0]=="object"||U("populateFromArray parameter `input` must be an array of arrays");const k=typeof m=="number"?o._createCellCoords(m,w):null;return a.populateFromArray(o._createCellCoords(g,b),v,k,y,E)},this.spliceCol=function(g,b,v,...m){return s.spliceCol(g,b,v,...m)},this.spliceRow=function(g,b,v,...m){return s.spliceRow(g,b,v,...m)},this.getSelected=function(){if(z.isSelected())return Tt(z.getSelectedRange(),({from:g,to:b})=>[g.row,g.col,b.row,b.col])},this.getSelectedLast=function(){const g=this.getSelected();let b;return g&&g.length>0&&(b=g[g.length-1]),b},this.getSelectedActive=function(){const g=this.getSelectedRangeActive();if(!g)return;const{from:b,to:v}=g;return[b.row,b.col,v.row,v.col]},this.getSelectedRange=function(){if(z.isSelected())return Array.from(z.getSelectedRange())},this.getSelectedRangeLast=function(){const g=this.getSelectedRange();let b;return g&&g.length>0&&(b=g[g.length-1]),b},this.getSelectedRangeActive=function(){return z.getActiveSelectedRange()},this.getActiveSelectionLayerIndex=function(){return z.getActiveSelectionLayerIndex()},this.emptySelectedCells=function(g){if(!z.isSelected()||this.countRows()===0||this.countCols()===0)return;const b=[];O(z.getSelectedRange(),v=>{if(v.isSingleHeader())return;const m=v.getTopStartCorner(),w=v.getBottomEndCorner(),y=Math.max(m.row,0),E=Math.min(w.row,this.countRows()-1),k=Math.max(m.col,0),M=Math.min(w.col,this.countCols()-1);y>E||k>M||Ee(y,E,N=>{Ee(k,M,R=>{this.getCellMeta(N,R).readOnly||b.push([N,R,null])})})}),b.length>0&&this.setDataAtCell(b,g)},this.isRenderSuspended=function(){return this.renderSuspendedCounter>0},this.suspendRender=function(){this.renderSuspendedCounter+=1},this.resumeRender=function(){const g=this.renderSuspendedCounter-1;this.renderSuspendedCounter=Math.max(g,0),!this.isRenderSuspended()&&g===this.renderSuspendedCounter&&o.view.render()},this.render=function(){this.view&&(this.forceFullRender=!0,this.isRenderSuspended()||o.view.render())},this.batchRender=function(g){this.suspendRender();const b=g();return this.resumeRender(),b},this.isExecutionSuspended=function(){return this.executionSuspendedCounter>0},this.suspendExecution=function(){this.executionSuspendedCounter+=1,this.columnIndexMapper.suspendOperations(),this.rowIndexMapper.suspendOperations()},this.resumeExecution=function(g=!1){const b=this.executionSuspendedCounter-1;this.executionSuspendedCounter=Math.max(b,0),(!this.isExecutionSuspended()&&b===this.executionSuspendedCounter||g)&&(this.columnIndexMapper.resumeOperations(),this.rowIndexMapper.resumeOperations())},this.batchExecution=function(g,b=!1){this.suspendExecution();const v=g();return this.resumeExecution(b),v},this.batch=function(g){this.suspendRender(),this.suspendExecution();const b=g();return this.resumeExecution(),this.resumeRender(),b},this.refreshDimensions=function(){if(!o.view)return;const g=o.view,{width:b,height:v}=g.getLastSize(),{width:m,height:w}=o.rootElement.getBoundingClientRect(),y=m!==b||w!==v;o.runHooks("beforeRefreshDimensions",{width:b,height:v},{width:m,height:w},y)!==!1&&((y||g._wt.wtOverlays.scrollableElement===o.rootWindow)&&(g.setLastSize(m,w),g.adjustElementsSize(),o.render()),o.runHooks("afterRefreshDimensions",{width:b,height:v},{width:m,height:w},y))},this.updateData=function(g,b){qH(g,v=>{s=v},v=>{s=v,o.columnIndexMapper.fitToLength(this.getInitialColumnCount()),o.rowIndexMapper.fitToLength(this.countSourceRows()),a.adjustRowsAndCols(),z.markSource("updateData"),z.refresh(),z.markEndSource()},{hotInstance:o,dataMap:s,dataSource:r,internalSource:"updateData",source:b,metaManager:_,firstRun:d})},this.loadData=function(g,b){qH(g,v=>{s=v},()=>{_.clearCellsCache(),o.initIndexMappers(),a.adjustRowsAndCols(),z.markSource("loadData"),z.refresh(),z.markEndSource(),d&&(d=[null,"loadData"])},{hotInstance:o,dataMap:s,dataSource:r,internalSource:"loadData",source:b,metaManager:_,firstRun:d})},this.getInitialColumnCount=function(){const g=S.columns;let b=0;if(Array.isArray(g))b=g.length;else if(ye(g))if(o.dataType==="array"){const v=this.countSourceCols();for(let m=0;m<v;m+=1)g(m)&&(b+=1)}else(o.dataType==="object"||o.dataType==="function")&&(b=s.colToPropCache.length);else if(J(S.dataSchema)){const v=s.getSchema();b=Array.isArray(v)?v.length:Y0(v)}else b=this.countSourceCols();return b},this.initIndexMappers=function(){this.columnIndexMapper.initToLength(this.getInitialColumnCount()),this.rowIndexMapper.initToLength(this.countSourceRows())},this.getData=function(g,b,v,m){return Jt(g)?s.getAll():s.getRange(o._createCellCoords(g,b),o._createCellCoords(v,m),s.DESTINATION_RENDERER)},this.getCopyableText=function(g,b,v,m){return s.getCopyableText(o._createCellCoords(g,b),o._createCellCoords(v,m))},this.getCopyableData=function(g,b){return s.getCopyable(g,s.colToProp(b))},this.getCopyableSourceData=function(g,b){return r.getCopyable(g,s.colToProp(b))},this.getSchema=function(){return s.getSchema()},this.updateSettings=function(g,b=!1){const v=(d?o.loadData:o.updateData).bind(this);let m=!1,w,y;J(g.rows)&&U('The "rows" setting is no longer supported. Do you mean startRows, minRows or maxRows?'),J(g.cols)&&U('The "cols" setting is no longer supported. Do you mean startCols, minCols or maxCols?'),J(g.ganttChart)&&U('Since 8.0.0 the "ganttChart" setting is no longer supported.'),J(g.rowHeights)&&J(g.minRowHeights)&&Ie("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.");for(w in g)if(!(w==="data"||w==="language"))if(w==="className")ee("className",g.className);else if(w==="tableClassName"&&o.table)ee("tableClassName",g.tableClassName),o.view._wt.wtOverlays.syncOverlayTableClassNames();else if(he.getSingleton().isRegistered(w)||he.getSingleton().isDeprecated(w)){const H=g[w];ye(H)?(he.getSingleton().addAsFixed(w,H,o),S[w]=H):Array.isArray(H)&&(he.getSingleton().add(w,H,o),S[w]=H)}else!b&&en(g,w)&&(T[w]=g[w]);const E=TS(o.rootContainer),k=en(g,"themeName"),M=en(g,"theme");if(k&&M&&Ie("Both `theme` and `themeName` are defined in your configuration. These options are aliases and cannot be used together. The `themeName` option will be ignored."),b){let H;M&&typeof g.theme=="string"?H=g.theme:k&&typeof g.themeName=="string"&&g.themeName&&!M?(H=g.themeName,S.theme=g.themeName,S.themeName=void 0):E?H=E:o.themeManager&&(H=o.themeManager.getClassName()),o.useTheme(H)}else{const H=o.getCurrentThemeName();if(M&&typeof g.theme=="string"&&H!==g.theme)o.useTheme(g.theme),o.themeManager?.unmount();else if(k&&!M&&H!==g.themeName)S.theme=g.themeName,S.themeName=void 0,o.useTheme(g.themeName),o.themeManager?.unmount();else if(Qs(o)&&!E&&ne(g.theme))if(o.themeManager===null)be(g.theme),o.useTheme(o.themeManager.getClassName());else{let j;typeof g.theme.getThemeConfig!="function"?j=Ub(g.theme):j=g.theme,o.themeManager.update(j),o.useTheme(o.themeManager.getClassName())}}o.runHooks("hasExternalDataSource")===!0?(g.data&&Ie('The "data" setting is ignored when "hasExternalDataSource" returns `true`.'),b||en(g,"data")||en(g,"dataProvider")?v([],"updateSettings"):g.columns!==void 0&&(s.createMap(),o.initIndexMappers())):g.data===void 0&&S.data===void 0?v(null,"updateSettings"):g.data!==void 0?v(g.data,"updateSettings"):g.columns!==void 0&&(s.createMap(),o.initIndexMappers()),!d&&g.language&&te(g.language);const N=o.countCols(),R=S.columns;if(R&&ye(R)&&(m=!0),(g.cell!==void 0||g.cells!==void 0||g.columns!==void 0)&&_.clearCache(),N>0)for(w=0,y=0;w<N;w++){if(R){const H=m?R(w):R[y];H&&_.updateColumnMeta(y,H)}y+=1}J(g.cell)&&tt(g.cell,H=>{o.setCellMetaObject(H.row,H.col,H)}),o.runHooks("afterCellMetaReset"),d&&$B(o,"init");let A=o.rootElement.style.height;A!==""&&(A=parseInt(o.rootElement.style.height,10)),b&&o.rootElement.getAttribute("style")&&o.rootElement.setAttribute("data-initialstyle",o.rootElement.getAttribute("style"));let L=g.height;if(typeof g.height<"u")if(ye(L)&&(L=L()),L=o.runHooks("beforeHeightChange",L),L===null){const H=o.rootElement.getAttribute("data-initialstyle");H&&(H.indexOf("height")>-1||H.indexOf("overflow")>-1)?o.rootElement.setAttribute("style",H):(o.rootElement.style.height="",o.rootElement.style.overflow="")}else L!==void 0&&(o.rootElement.style.height=isNaN(L)?`${L}`:`${L}px`,o.rootElement.style.overflow="clip");if(typeof g.width<"u"){let H=g.width;ye(H)&&(H=H()),H=o.runHooks("beforeWidthChange",H),o.rootElement.style.width=isNaN(H)?`${H}`:`${H}px`}b||(o.view&&(o.view._wt.wtViewport.resetHasOversizedColumnHeadersMarked(),o.view._wt.exportSettingsAsClassNames(),o.view.invalidateIndexSizesCache()),z.updateHighlightClassNames(),o.runHooks("afterUpdateSettings",g)),a.adjustRowsAndCols(),o.view&&!d&&(o.render(),o.view._wt.wtOverlays.adjustElementsSize()),!b&&o.view&&(A===""||L===""||L===void 0)&&A!==L&&o.view._wt.wtOverlays.updateMainScrollableElements()},this.getValue=function(){const g=o.getSelectedRangeActive();if(S.getValue){if(ye(S.getValue))return S.getValue.call(o);if(g)return o.getData()[g.highlight.row][S.getValue]}else if(g)return o.getDataAtCell(g.highlight.row,g.highlight.col);return null},this.getSettings=function(){return S},this.clear=function(){this.selectAll(),this.emptySelectedCells()},this.alter=function(g,b,v,m,w){a.alter(g,b,v,m,w)},this.getCell=function(g,b,v=!1){let m=b,w=g;if(b>=0){if(this.columnIndexMapper.isHidden(this.toPhysicalColumn(b)))return null;m=this.columnIndexMapper.getRenderableFromVisualIndex(b)}if(g>=0){if(this.rowIndexMapper.isHidden(this.toPhysicalRow(g)))return null;w=this.rowIndexMapper.getRenderableFromVisualIndex(g)}return w===null||m===null||w===void 0||m===void 0?null:o.view.getCellAtCoords(o._createCellCoords(w,m),v)},this.getCoords=function(g){const b=this.view._wt.wtTable.getCoords(g);if(b===null)return null;const{row:v,col:m}=b;let w=v,y=m;return v>=0&&(w=this.rowIndexMapper.getVisualFromRenderableIndex(v)),m>=0&&(y=this.columnIndexMapper.getVisualFromRenderableIndex(m)),o._createCellCoords(w,y)},this.colToProp=function(g){return s.colToProp(g)},this.propToCol=function(g){return s.propToCol(g)},this.toVisualRow=g=>this.rowIndexMapper.getVisualFromPhysicalIndex(g),this.toVisualColumn=g=>this.columnIndexMapper.getVisualFromPhysicalIndex(g),this.toPhysicalRow=g=>this.rowIndexMapper.getPhysicalFromVisualIndex(g),this.toPhysicalColumn=g=>this.columnIndexMapper.getPhysicalFromVisualIndex(g),this.getDataAtCell=function(g,b){return s.get(g,s.colToProp(b))},this.getDataAtRowProp=function(g,b){return s.get(g,b)},this.getDataAtCol=function(g){const b=[],v=s.getRange(o._createCellCoords(0,g),o._createCellCoords(S.data.length-1,g),s.DESTINATION_RENDERER);for(let m=0;m<v.length;m+=1)for(let w=0;w<v[m].length;w+=1)b.push(v[m][w]);return b},this.getDataAtProp=function(g){const b=[],v=s.getRange(o._createCellCoords(0,s.propToCol(g)),o._createCellCoords(S.data.length-1,s.propToCol(g)),s.DESTINATION_RENDERER);for(let m=0;m<v.length;m+=1)for(let w=0;w<v[m].length;w+=1)b.push(v[m][w]);return b},this.getSourceData=function(g,b,v,m){let w;return g===void 0?w=r.getData():w=r.getByRange(o._createCellCoords(g,b),o._createCellCoords(v,m)),w},this.getSourceDataArray=function(g,b,v,m){let w;return g===void 0?w=r.getData(!0):w=r.getByRange(o._createCellCoords(g,b),o._createCellCoords(v,m),!0),w},this.getSourceDataAtCol=function(g){return r.getAtColumn(g)},this.setSourceDataAtCell=function(g,b,v,m){const w=Ge(g,b,v),y=this.hasHook("afterSetSourceDataAtCell"),E=[],k=(N,R)=>{const A=this.toVisualRow(N),L=this.toVisualColumn(R);return Number.isInteger(L)?this.getCellMeta(A,L):{...Object.getPrototypeOf(S),...S}};y&&O(w,([N,R,A])=>{const L=vS(A,k(N,R));E.push([N,R,r.getAtCell(N,R),L])}),O(w,([N,R,A])=>{const L=k(N,R),H=vS(A,L);_j(H,L,m??"setSourceDataAtCell")&&r.setAtCell(N,R,H)}),y&&this.runHooks("afterSetSourceDataAtCell",E,m),this.render();const M=o.getActiveEditor();M&&J(M.refreshValue)&&M.refreshValue()},this.getSourceDataAtRow=function(g){return r.getAtRow(g)},this.getSourceDataAtCell=function(g,b){return r.getAtCell(g,b)},this.getDataAtRow=function(g){return s.getRange(o._createCellCoords(g,0),o._createCellCoords(g,this.countCols()-1),s.DESTINATION_RENDERER)[0]||[]},this.getDataType=function(g,b,v,m){const w=g===void 0?[0,0,this.countRows(),this.countCols()]:[g,b,v,m],[y,E]=w;let[,,k,M]=w,N=null,R=null;k===void 0&&(k=y),M===void 0&&(M=E);let A="mixed";return Ee(Math.max(Math.min(y,k),0),Math.max(y,k),L=>{let H=!0;return Ee(Math.max(Math.min(E,M),0),Math.max(E,M),j=>(R=this.getCellMeta(L,j).type,N?H=N===R:N=R,H)),A=H?R:"mixed",H}),A},this.removeCellMeta=function(g,b,v){const[m,w]=[this.toPhysicalRow(g),this.toPhysicalColumn(b)];let y=_.getCellMetaKeyValue(m,w,v);o.runHooks("beforeRemoveCellMeta",g,b,v,y)!==!1&&(_.removeCellMeta(m,w,v),o.runHooks("afterRemoveCellMeta",g,b,v,y)),y=null},this.spliceCellsMeta=function(g,b=0,...v){v.length>0&&!Array.isArray(v[0])&&U("The 3rd argument (cellMetaRows) has to be passed as an array of cell meta objects array."),b>0&&_.removeRow(this.toPhysicalRow(g),b),v.length>0&&O(v.reverse(),m=>{_.createRow(this.toPhysicalRow(g)),O(m,(w,y)=>this.setCellMetaObject(g,y,w))}),o.render()},this.setCellMetaObject=function(g,b,v){typeof v=="object"&&tt(v,(m,w)=>{this.setCellMeta(g,b,w,m)})},this.setCellMeta=function(g,b,v,m){if(o.runHooks("beforeSetCellMeta",g,b,v,m)===!1)return;let y=g,E=b;g<this.countRows()&&(y=this.toPhysicalRow(g)),b<this.countCols()&&(E=this.toPhysicalColumn(b)),_.setCellMeta(y,E,v,m),o.runHooks("afterSetCellMeta",g,b,v,m)},this.getCellsMeta=function(){return _.getCellsMeta()},this.getCellMeta=function(g,b,v={skipMetaExtension:!1}){let m=this.toPhysicalRow(g),w=this.toPhysicalColumn(b);return m===null&&(m=g),w===null&&(w=b),_.getCellMeta(m,w,{visualRow:g,visualColumn:b,...v})},this.getColumnMeta=function(g){return _.getColumnMeta(this.toPhysicalColumn(g))},this.getCellMetaAtRow=function(g){return _.getCellsMetaAtRow(g)},this.isColumnModificationAllowed=function(){return!(o.dataType==="object"||S.columns)},this.getCellRenderer=function(g,b){const v=typeof g=="number"?o.getCellMeta(g,b).renderer:g.renderer;return typeof v=="string"?yE(v):Jt(v)?yE("text"):v},this.getCellEditor=function(g,b){const v=typeof g=="number"?o.getCellMeta(g,b).editor:g.editor;return typeof v=="string"?mE(v):Jt(v)?mE("text"):v},this.getCellValidator=function(g,b){const v=typeof g=="number"?o.getCellMeta(g,b).validator:g.validator;return typeof v=="string"?r5(v):v},this.validateCells=function(g){this._validateCells(g)},this.validateRows=function(g,b){Array.isArray(g)||U("validateRows parameter `rows` must be an array"),this._validateCells(b,g)},this.validateColumns=function(g,b){Array.isArray(g)||U("validateColumns parameter `columns` must be an array"),this._validateCells(b,void 0,g)},this._validateCells=function(g,b,v){const m=new me;g&&(m.onQueueEmpty=g);let w=o.countRows()-1;for(;w>=0;){if(b!==void 0&&b.indexOf(w)===-1){w-=1;continue}let y=o.countCols()-1;for(;y>=0;){if(v!==void 0&&v.indexOf(y)===-1){y-=1;continue}m.addValidatorToQueue(),o.validateCell(o.getDataAtCell(w,y),o.getCellMeta(w,y),E=>{typeof E!="boolean"&&U("Validation error: result is not boolean"),E===!1&&(m.valid=!1),m.removeValidatorFormQueue()},"validateCells"),y-=1}w-=1}m.checkIfQueueIsEmpty()},this.getRowHeader=function(g){let b=S.rowHeaders,v=g;return v!==void 0&&(v=o.runHooks("modifyRowHeader",v)),v===void 0?(b=[],Ee(o.countRows()-1,m=>{b.push(o.getRowHeader(m))})):Array.isArray(b)&&b[v]!==void 0?b=b[v]:ye(b)?b=b(v):b&&typeof b!="string"&&typeof b!="number"&&(b=v+1),b},this.hasRowHeaders=function(){return!!S.rowHeaders},this.hasColHeaders=function(){if(S.colHeaders!==void 0&&S.colHeaders!==null)return!!S.colHeaders;for(let g=0,b=o.countCols();g<b;g++)if(o.getColHeader(g))return!0;return!1},this.getColHeader=function(g,b=-1){const v=o.runHooks("modifyColHeader",g);if(v===void 0){const k=[],M=o.countCols();for(let N=0;N<M;N++)k.push(o.getColHeader(N));return k}let m=S.colHeaders;const w=function(k){const M=[],N=o.countCols();let R=0;for(;R<N;R++)ye(S.columns)&&S.columns(R)&&M.push(R);return M[k]},y=o.toPhysicalColumn(v),E=w(y);return S.colHeaders===!1?m=null:S.columns&&ye(S.columns)&&S.columns(E)&&S.columns(E).title?m=S.columns(E).title:S.columns&&S.columns[y]&&S.columns[y].title?m=S.columns[y].title:Array.isArray(S.colHeaders)&&S.colHeaders[y]!==void 0?m=S.colHeaders[y]:ye(S.colHeaders)?m=S.colHeaders(y):S.colHeaders&&typeof S.colHeaders!="string"&&typeof S.colHeaders!="number"&&(m=a7(v)),m=o.runHooks("modifyColumnHeaderValue",m,g,b),m},this._getColWidthFromSettings=function(g){let b;if(g>=0&&(b=o.getCellMeta(0,g).width),(b===void 0||b===S.width)&&(b=S.colWidths),b!=null){switch(typeof b){case"object":b=b[g];break;case"function":b=b(g);break}typeof b=="string"&&(b=Number.parseInt(b,10))}return b},this.getColWidth=function(g,b){let v=o._getColWidthFromSettings(g);return v=o.runHooks("modifyColWidth",v,g,b),v===void 0&&(v=Zu),v},this._getRowHeightFromSettings=function(g){const b=o.stylesHandler.getDefaultRowHeight(g);let v=S.rowHeights??S.minRowHeights;if(v!=null){switch(typeof v){case"object":v=v[g];break;case"function":v=v(g);break}typeof v=="string"&&(v=Number.parseInt(v,10))}return v!=null&&v<b?b:v},this.getRowHeight=function(g,b){let v=o._getRowHeightFromSettings(g);return v=o.runHooks("modifyRowHeight",v,g,b),v},this.countSourceRows=function(){return r.countRows()},this.countSourceCols=function(){return r.countFirstRowKeys()},this.countRows=function(){return s.getLength()},this.countCols=function(){const g=S.maxCols,b=this.columnIndexMapper.getNotTrimmedIndexesLength();return Math.min(g,b)},this.countRenderedRows=function(){return o.view._wt.drawn?o.view._wt.wtTable.getRenderedRowsCount():-1},this.countVisibleRows=function(){return o.view._wt.drawn?o.view._wt.wtTable.getVisibleRowsCount():-1},this.countRenderedCols=function(){return o.view._wt.drawn?o.view._wt.wtTable.getRenderedColumnsCount():-1},this.countVisibleCols=function(){return o.view._wt.drawn?o.view._wt.wtTable.getVisibleColumnsCount():-1},this.countRowHeaders=function(){return this.view.getRowHeadersCount()},this.countColHeaders=function(){return this.view.getColumnHeadersCount()},this.countEmptyRows=function(g=!1){let b=0;return eH(o.countRows()-1,v=>{if(o.isEmptyRow(v))b+=1;else if(g===!0)return!1}),b},this.countEmptyCols=function(g=!1){let b=0;return eH(o.countCols()-1,v=>{if(o.isEmptyCol(v))b+=1;else if(g===!0)return!1}),b},this.isEmptyRow=function(g){return S.isEmptyRow.call(o,g)},this.isEmptyCol=function(g){return S.isEmptyCol.call(o,g)},this.selectCell=function(g,b,v,m,w=!0,y=!0){return Jt(g)||Jt(b)?!1:this.selectCells([[g,b,v,m]],w,y)},this.selectCells=function(g=[[]],b=!0,v=!0){b===!1&&c.suspend();const m=z.selectCells(g);return m&&v&&o.listen(),c.resume(),m},this.selectColumns=function(g,b=g,v){return z.selectColumns(g,b,v)},this.selectRows=function(g,b=g,v){return z.selectRows(g,b,v)},this.deselectCell=function(){z.deselect()},this.selectAll=function(g=!0,b=g,v){c.skipNextScrollCycle(),z.selectAll(g,b,v)};const on=(g,b)=>g.getNearestNotHiddenIndex(b,1,!0);this.scrollViewportTo=function(g,b){typeof g=="number"&&(g={row:arguments[0],col:arguments[1],verticalSnap:arguments[2]?"bottom":"top",horizontalSnap:arguments[3]?"end":"start",considerHiddenIndexes:arguments[4]??!0});const{row:v,col:m,considerHiddenIndexes:w}=g??{};let y=v,E=m;if(ye(b)&&this.addHookOnce("afterScroll",b),w===void 0||w){const R=Number.isInteger(v)&&v>=0,A=Number.isInteger(m)&&m>=0,L=R?on(this.rowIndexMapper,v):void 0,H=A?on(this.columnIndexMapper,m):void 0;if(L===null||H===null)return!1;y=R?o.rowIndexMapper.getRenderableFromVisualIndex(L):v,E=A?o.columnIndexMapper.getRenderableFromVisualIndex(H):m}const k=Number.isInteger(y),M=Number.isInteger(E);let N=!1;return k&&y>=0&&M&&E>=0?N=o.view.scrollViewport(o._createCellCoords(y,E),g.horizontalSnap,g.verticalSnap):k&&y>=0&&(M&&E<0||!M)?N=o.view.scrollViewportVertically(y,g.verticalSnap):M&&E>=0&&(k&&y<0||!k)&&(N=o.view.scrollViewportHorizontally(E,g.horizontalSnap)),ye(b)&&(N?this.view.render():(this.removeHook("afterScroll",b),this._registerMicrotask(()=>b()))),N},this.scrollToFocusedCell=function(g){if(!this.selection.isSelected())return!1;ye(g)&&this.addHookOnce("afterScroll",g);const{highlight:b}=this.getSelectedRangeActive(),v=this.scrollViewportTo(b.toObject());return v?this.view.render():ye(g)&&(this.removeHook("afterScroll",g),this._registerMicrotask(()=>g())),v},this.destroy=function(){o._clearTimeouts(),o._clearMicrotasks(),o.view&&o.view.destroy(),r&&r.destroy(),r=null,Qs(this)&&(wq(),this.getFocusScopeManager().destroy(),o.themeManager?.destroy()),this.getShortcutManager().destroy(),F.clear(),_.clearCache(),LS.delete(this.guid),i.destroy(),l&&l.destroy(),o.rootContainer&&ol(o.rootContainer),o.rootPortalElement&&o.rootPortalElement.remove(),o.batchExecution(()=>{o.rowIndexMapper.destroy(),o.columnIndexMapper.destroy(),P.getItems().forEach(([,g])=>{g.destroy()}),P.clear(),o.runHooks("afterDestroy")},!0),he.getSingleton().destroy(o),tt(o,(g,b,v)=>{ye(g)?v[b]=W(b):b!=="guid"&&(v[b]=null)}),o.isDestroyed=!0,s&&s.destroy(),s=null,a=null,z=null,l=null,o=null};function W(g){return()=>{U(`The "${g}" method cannot be called because this Handsontable instance has been destroyed`)}}this.getActiveEditor=function(){return l.getActiveEditor()},this.getFirstRenderedVisibleRow=function(){return o.view.getFirstRenderedVisibleRow()},this.getLastRenderedVisibleRow=function(){return o.view.getLastRenderedVisibleRow()},this.getFirstRenderedVisibleColumn=function(){return o.view.getFirstRenderedVisibleColumn()},this.getLastRenderedVisibleColumn=function(){return o.view.getLastRenderedVisibleColumn()},this.getFirstFullyVisibleRow=function(){return o.view.getFirstFullyVisibleRow()},this.getLastFullyVisibleRow=function(){return o.view.getLastFullyVisibleRow()},this.getFirstFullyVisibleColumn=function(){return o.view.getFirstFullyVisibleColumn()},this.getLastFullyVisibleColumn=function(){return o.view.getLastFullyVisibleColumn()},this.getFirstPartiallyVisibleRow=function(){return o.view.getFirstPartiallyVisibleRow()},this.getLastPartiallyVisibleRow=function(){return o.view.getLastPartiallyVisibleRow()},this.getFirstPartiallyVisibleColumn=function(){return o.view.getFirstPartiallyVisibleColumn()},this.getLastPartiallyVisibleColumn=function(){return o.view.getLastPartiallyVisibleColumn()},this.getPlugin=function(g){return P.getItem(mr(g))},this.getPluginName=function(g){return P.getId(g)},this.getInstance=function(){return o},this.addHook=function(g,b,v){he.getSingleton().add(g,b,o,v)},this.hasHook=function(g){return he.getSingleton().has(g,o)||he.getSingleton().has(g)},this.addHookOnce=function(g,b,v){he.getSingleton().once(g,b,o,v)},this.removeHook=function(g,b){he.getSingleton().remove(g,b,o)},this.runHooks=function(g,b,v,m,w,y,E){return he.getSingleton().run(o,g,b,v,m,w,y,E)},this.getTranslatedPhrase=function(g,b){return IB(S.language,g,b)},this.toHTML=()=>ZI(this),this.toTableElement=()=>{const g=this.rootDocument.createElement("div");return g.insertAdjacentHTML("afterbegin",ZI(this)),g.firstElementChild},this.timeouts=[],this.useTheme=g=>{const b=!!d;this.stylesHandler.useTheme(g);const v=this.stylesHandler.getThemeName();!b&&v&&(TS(this.rootContainer)&&(oe(this.rootContainer,/ht-theme-.*/g),B(this.rootContainer,v)),o.render(),o.scrollViewportTo(0,0)),this.runHooks("afterSetTheme",v,b)},this.getCurrentThemeName=()=>this.stylesHandler.getThemeName(),this.getTableHeight=()=>this.rootElement.offsetHeight,this.getTableWidth=()=>this.rootElement.offsetWidth,this._registerTimeout=function(g,b=0){let v=g;return typeof v=="function"&&(v=setTimeout(v,b)),this.timeouts.push(v),v},this._clearTimeouts=function(){O(this.timeouts,g=>{clearTimeout(g)})},this.microtasks=[],this._registerMicrotask=function(g){const b={cancelled:!1};this.microtasks.push(b),this.rootWindow.queueMicrotask(()=>{b.cancelled||g()})},this._clearMicrotasks=function(){O(this.microtasks,g=>{g.cancelled=!0}),this.microtasks.length=0},this._getEditorManager=function(){return l},this._getDataSource=function(){return r},this._getMetaManager=function(){return _};const q=aq({handleEvent(g,b){return b==="global"?!0:o.isListening()},beforeKeyDown:g=>this.runHooks("beforeKeyDown",g),afterKeyDown:g=>{this.isDestroyed||o.runHooks("afterDocumentKeyDown",g)},ownerWindow:this.rootWindow});this.addHook("beforeOnCellMouseDown",g=>{g.ctrlKey===!1&&g.metaKey===!1&&q.releasePressedKeys()}),this.getShortcutManager=function(){return q},h=new Kj(o);const Ce=Qs(this)?Gj(o):null;this.getFocusManager=function(){return h},this.getFocusScopeManager=function(){return Qs(o)||U("The FocusScopeManager is only available for the main Handsontable instance."),Ce};const $=u.theme,Re=u.themeName,Se=TS(o.rootContainer);Qs(o)&&!Se&&(ne($)||!$&&!Re)&&be($),TF().forEach(g=>{const b=J0(g);P.addItem(g,new b(this))}),Q8(o),Qs(this)&&eq(o),q.setActiveContextName("grid"),he.getSingleton().run(o,"construct")}const rK="base",aK="htTextEllipsis";function Xy(n,e,t,o,i,s,r){const a=r.ariaTags,l=[],h=[],c=[],d=[];r._isBaseRendererCalled=!0,r.className&&B(e,r.className),r.readOnly?(l.push(r.readOnlyCellClassName),a&&d.push($I())):a&&c.push($I()[0]),r.valid===!1&&r.invalidCellClassName?(l.push(r.invalidCellClassName),a&&d.push(FI())):(h.push(r.invalidCellClassName),a&&c.push(FI()[0])),r.wordWrap===!1&&r.noWordWrapClassName&&l.push(r.noWordWrapClassName),!s&&r.placeholder&&l.push(r.placeholderCellClassName),r.textEllipsis&&l.push(aK),oe(e,h),B(e,l),Zr(e,c),fe(e,d)}Xy.RENDERER_TYPE=rK;function vA(n,e,t){n.addEventListener(e,t,!1)}function RA(n,e,t){n.removeEventListener(e,t,!1)}function Ew(n){return n.ownerDocument.defaultView.getComputedStyle(n)}function hV(n,e={}){const t={minHeight:200,maxHeight:300,minWidth:100,maxWidth:300,textContent:d=>d.value,...e},o=n.body,i=n.createTextNode(""),s=n.createElement("span");let r;function a(){i.textContent=t.textContent(r),s.style.position="absolute",s.style.fontSize=Ew(r).fontSize,s.style.fontFamily=Ew(r).fontFamily,s.style.whiteSpace="pre",o.appendChild(s);const d=parseInt(Ew(r)?.paddingInlineStart||0,10),u=parseInt(Ew(r)?.paddingInlineEnd||0,10),f=s.clientWidth+d+u+1;o.removeChild(s);const p=r.style;p.height=`${t.minHeight}px`,t.minWidth>f?p.width=`${t.minWidth}px`:f>t.maxWidth?p.width=`${t.maxWidth}px`:p.width=`${f}px`;const C=r.scrollHeight?r.scrollHeight-1:0;t.minHeight>C?p.height=`${t.minHeight}px`:t.maxHeight<C?(p.height=`${t.maxHeight}px`,p.overflowY="visible"):p.height=`${C}px`}function l(){n.defaultView.setTimeout(a,0)}function h(d){if(d&&d.minHeight)if(d.minHeight==="inherit")t.minHeight=r.clientHeight;else{const u=parseInt(d.minHeight,10);isNaN(u)||(t.minHeight=u)}if(d&&d.maxHeight)if(d.maxHeight==="inherit")t.maxHeight=r.clientHeight;else{const u=parseInt(d.maxHeight,10);isNaN(u)||(t.maxHeight=u)}if(d&&d.minWidth)if(d.minWidth==="inherit")t.minWidth=r.clientWidth;else{const u=parseInt(d.minWidth,10);isNaN(u)||(t.minWidth=u)}if(d&&d.maxWidth)if(d.maxWidth==="inherit")t.maxWidth=r.clientWidth;else{const u=parseInt(d.maxWidth,10);isNaN(u)||(t.maxWidth=u)}s.firstChild||(s.className="autoResize",s.style.display="inline-block",s.appendChild(i))}function c(d,u,f=!1){r=d,h(u),r.nodeName==="TEXTAREA"&&(r.style.resize="none",r.style.height=`${t.minHeight}px`,r.style.minWidth=`${t.minWidth}px`,r.style.maxWidth=`${t.maxWidth}px`,r.style.overflowY="hidden"),f&&(vA(r,"input",a),vA(r,"keydown",l)),a()}return{init:c,resize:a,unObserve(){RA(r,"input",a),RA(r,"keydown",l)}}}function EA(n,e){const t=rF(e),o=e.value.split(`
|
|
208
|
+
`);let i=t,s=0;for(let r=0;r<o.length;r++){const a=o[r];r!==0&&(s+=o[r-1].length+1);const l=s+a.length;if(n==="home"?i=s:n==="end"&&(i=l),t<=l)break}Oy(e,i)}const lK="ht_editor_visible",kw="ht_editor_hidden",kA="textEditor",hK="text";class ul extends td{static get EDITOR_TYPE(){return hK}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(),Db(this.hot.rootDocument.activeElement,this.hot.rootElement)&&this.hot.listen(),this.hideEditableElement(),this.unregisterShortcuts()}prepare(e,t,o,i,s,r){const a=this.state;if(super.prepare(e,t,o,i,s,r),!r.readOnly){this.refreshDimensions(!0);const{allowInvalid:l}=r;l&&!this.isOpened()&&(this.TEXTAREA.value=""),a!==kn.FINISHED&&!this.isOpened()&&this.hideEditableElement()}}beginEditing(e,t){this.state===kn.VIRGIN&&(this.TEXTAREA.value="",super.beginEditing(e,t))}focus(){this.TEXTAREA.select(),Oy(this.TEXTAREA,this.TEXTAREA.value.length)}createElements(e="textarea"){const{rootDocument:t}=this.hot;this.TEXTAREA=t.createElement(e),fe(this.TEXTAREA,[["data-hot-input",""],wr(-1)]),B(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"),B(this.TEXTAREA_PARENT,"handsontableInputHolder"),_e(this.TEXTAREA_PARENT,this.layerClass)&&oe(this.TEXTAREA_PARENT,this.layerClass),B(this.TEXTAREA_PARENT,kw),this.textareaParentStyle=this.TEXTAREA_PARENT.style,this.TEXTAREA_PARENT.appendChild(this.TEXTAREA),this.hot.rootElement.appendChild(this.TEXTAREA_PARENT)}hideEditableElement(){n4()&&(this.textareaStyle.textIndent="-99999px"),this.textareaStyle.overflowY="visible",this.textareaParentStyle.opacity="0",this.textareaParentStyle.height="1px",oe(this.TEXTAREA_PARENT,this.layerClass),B(this.TEXTAREA_PARENT,kw)}showEditableElement(){this.textareaParentStyle.height="",this.textareaParentStyle.overflow="",this.textareaParentStyle.position="",this.textareaParentStyle[this.hot.isRtl()?"left":"right"]="auto",this.textareaParentStyle.opacity="1",this.textareaStyle.textIndent="";const e=this.TEXTAREA_PARENT.childNodes;let t=!1;Ee(e.length-1,o=>{const i=e[o];if(_e(i,"handsontableEditor"))return t=!0,!1}),_e(this.TEXTAREA_PARENT,kw)&&oe(this.TEXTAREA_PARENT,kw),t?(this.layerClass=lK,B(this.TEXTAREA_PARENT,this.layerClass)):(this.layerClass=this.getEditedCellsLayerClass(),B(this.TEXTAREA_PARENT,this.layerClass))}refreshValue(){const e=this.hot.toPhysicalRow(this.row),t=this.hot.getSourceDataAtCell(e,this.col);this.originalValue=t,this.setValue(t),this.refreshDimensions()}refreshDimensions(e=!1){if(this.state!==kn.EDITING&&!e)return;if(this.TD=this.getEditedCell(),!this.TD){e||this.close();return}const{top:t,start:o,width:i,maxWidth:s,height:r,maxHeight:a}=this.getEditedCellRect();this.textareaParentStyle.top=`${t}px`,this.textareaParentStyle[this.hot.isRtl()?"right":"left"]=`${o}px`,this.showEditableElement();const 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(i,s),minHeight:Math.min(r,a),maxWidth:s,maxHeight:a},!0)}bindEvents(){J$()&&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===kn.EDITING&&this.focus()}),this.addHook("afterRowResize",()=>{this.refreshDimensions(),this.state===kn.EDITING&&this.focus()})}destroy(){this.eventManager.destroy(),this.clearHooks()}registerShortcuts(){const t=this.hot.getShortcutManager().getContext("editor"),o={runOnlyIf:()=>J(this.hot.getSelected()),group:kA},i=()=>{this.hot.rootDocument.execCommand("insertText",!1,`
|
|
209
|
+
`)};t.addShortcuts([{keys:[["Control","Enter"]],callback:()=>(i(),!1),runOnlyIf:s=>!this.hot.selection.isMultiple()&&!s.altKey},{keys:[["Meta","Enter"]],callback:()=>(i(),!1),runOnlyIf:()=>!this.hot.selection.isMultiple()},{keys:[["Alt","Enter"]],callback:()=>(i(),!1)},{keys:[["Home"]],callback:(s,[r])=>{EA(r,this.TEXTAREA)}},{keys:[["End"]],callback:(s,[r])=>{EA(r,this.TEXTAREA)}}],o)}unregisterShortcuts(){this.hot.getShortcutManager().getContext("editor").removeShortcutsByGroup(kA)}constructor(e){super(e),this.eventManager=new Wi(this),this.autoResize=hV(this.hot.rootDocument),this.eventManager=new Wi(this),this.createElements(),this.bindEvents(),this.hot.addHookOnce("afterDestroy",()=>this.destroy())}}const cK="text";function ia(n,e,t,o,i,s,r){let a=s;!a&&r.placeholder&&(a=r.placeholder),a=bt(a),r.trimWhitespace&&(a=a.trim()),ph(e,a)}ia.RENDERER_TYPE=cK;const dK="text",cV={CELL_TYPE:dK,editor:ul,renderer:ia};Ei(cV);ai(Xy);fi.editors={BaseEditor:td};function fi(n,e){const t=new lV(n,e||{},gk);return t.init(),t}fi.Core=function(n,e={}){return new lV(n,e,gk)};fi.DefaultSettings=LB();fi.hooks=he.getSingleton();fi.CellCoords=Yc;fi.CellRange=lf;fi.packageName="handsontable";fi.buildDate="19/05/2026 14:51:41";fi.version="17.1.0";fi.languages={dictionaryKeys:A7,getLanguageDictionary:MB,getLanguagesDictionaries:L7,registerLanguageDictionary:xB,getTranslatedPhrase:IB};fi.themes={hasTheme:Ky,getTheme:WC,getThemeNames:oK,getThemes:iK,registerTheme:Ub};function PE(n,e){(e==null||e>n.length)&&(e=n.length);for(var t=0,o=Array(e);t<e;t++)o[t]=n[t];return o}function uK(n){if(Array.isArray(n))return n}function fK(n){if(Array.isArray(n))return PE(n)}function gK(n){if(n===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n}function pK(n,e,t){return e=FC(e),vK(n,fV()?Reflect.construct(e,t||[],FC(n).constructor):e.apply(n,t))}function dV(n,e){if(!(n instanceof e))throw new TypeError("Cannot call a class as a function")}function TA(n,e){for(var t=0;t<e.length;t++){var o=e[t];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(n,TK(o.key),o)}}function uV(n,e,t){return e&&TA(n.prototype,e),t&&TA(n,t),Object.defineProperty(n,"prototype",{writable:!1}),n}function $C(){return $C=Object.assign?Object.assign.bind():function(n){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var o in t)({}).hasOwnProperty.call(t,o)&&(n[o]=t[o])}return n},$C.apply(null,arguments)}function FC(n){return FC=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},FC(n)}function mK(n,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");n.prototype=Object.create(e&&e.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),Object.defineProperty(n,"prototype",{writable:!1}),e&&LE(n,e)}function fV(){try{var n=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(fV=function(){return!!n})()}function wK(n){if(typeof Symbol<"u"&&n[Symbol.iterator]!=null||n["@@iterator"]!=null)return Array.from(n)}function bK(n,e){var t=n==null?null:typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(t!=null){var o,i,s,r,a=[],l=!0,h=!1;try{if(s=(t=t.call(n)).next,e!==0)for(;!(l=(o=s.call(t)).done)&&(a.push(o.value),a.length!==e);l=!0);}catch(c){h=!0,i=c}finally{try{if(!l&&t.return!=null&&(r=t.return(),Object(r)!==r))return}finally{if(h)throw i}}return a}}function CK(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
210
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function yK(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
211
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function _K(n,e){if(n==null)return{};var t,o,i=SK(n,e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(n);for(o=0;o<s.length;o++)t=s[o],e.indexOf(t)===-1&&{}.propertyIsEnumerable.call(n,t)&&(i[t]=n[t])}return i}function SK(n,e){if(n==null)return{};var t={};for(var o in n)if({}.hasOwnProperty.call(n,o)){if(e.indexOf(o)!==-1)continue;t[o]=n[o]}return t}function vK(n,e){if(e&&(typeof e=="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return gK(n)}function LE(n,e){return LE=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,o){return t.__proto__=o,t},LE(n,e)}function RK(n,e){return uK(n)||bK(n,e)||gV(n,e)||CK()}function EK(n){return fK(n)||wK(n)||gV(n)||yK()}function kK(n,e){if(typeof n!="object"||!n)return n;var t=n[Symbol.toPrimitive];if(t!==void 0){var o=t.call(n,e);if(typeof o!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(n)}function TK(n){var e=kK(n,"string");return typeof e=="symbol"?e:e+""}function WE(n){"@babel/helpers - typeof";return WE=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},WE(n)}function gV(n,e){if(n){if(typeof n=="string")return PE(n,e);var t={}.toString.call(n).slice(8,-1);return t==="Object"&&n.constructor&&(t=n.constructor.name),t==="Map"||t==="Set"?Array.from(n):t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?PE(n,e):void 0}}var WS=null,xK="Your `HotTable` configuration includes `autoRowSize`/`autoColumnSize` options, which are not compatible with the component-based renderers`. Disable `autoRowSize` and `autoColumnSize` to prevent row and column misalignment.",MK="Providing a component-based renderer using `hot-renderer`-annotated component is no longer supported. Pass your component using `renderer` prop of the `HotTable` or `HotColumn` component instead.",IK="Providing a component-based editor using `hot-editor`-annotated component is no longer supported. Pass your component using `editor` prop of the `HotTable` or `HotColumn` component instead.",HK="Unexpected children nodes found in HotTable component. Only HotColumn components are allowed.",AK="Unexpected children nodes found in HotColumn component. HotColumn components do not support any children.",OK="The Handsontable instance bound to this component was destroyed and cannot be used properly.",DK="hot-wrapper-editor-container";function nm(){if(typeof console<"u"){var n;(n=console).warn.apply(n,arguments)}}function $E(n){return xA(n,"hot-renderer")?(nm(MK),!0):xA(n,"hot-editor")?(nm(IK),!0):!1}function NK(n,e){var t=Xn.Children.toArray(n);return t.some(function(o){return o.type!==e})?(nm(HK),!0):!1}function PK(n){var e=Xn.Children.toArray(n);return e.length?(nm(AK),!0):!1}function xA(n,e){var t=Xn.Children.toArray(n);return t.some(function(o){return o.props[e]!==void 0})}function pV(n,e){if(!n||!e||typeof e=="boolean")return null;var t=Xn.createElement(e,null),o=mV({},!1);return o.className="".concat(DK," ").concat(o.className),$$.createPortal(Xn.createElement("div",o,t),n.body)}function LK(n){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:document,t=arguments.length>2?arguments[2]:void 0,o=arguments.length>3?arguments[3]:void 0;e||(e=document),WS||(WS=e.createDocumentFragment());var i=o??e.createElement("DIV");return WS.appendChild(i),{portal:$$.createPortal(n,i,t),portalContainer:i}}function mV(n){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;return{id:n.id||(e?"hot-"+Math.random().toString(36).substring(5):void 0),className:n.className||"",style:n.style||{}}}function WK(){return typeof window<"u"}function FE(n){return WE(n)==="object"&&n!==null}function MA(n){if(!FE(n))return!1;var e=Object.getPrototypeOf(n);return e===Object.prototype||e===null}function Tw(n){return Array.isArray(n)}function BE(n,e){if(n===e)return!0;if(n instanceof RegExp||e instanceof RegExp)return!(n instanceof RegExp)||!(e instanceof RegExp)?!1:n.source===e.source&&n.flags===e.flags;if(Tw(n)&&Tw(e)){if(n.length!==e.length)return!1;for(var t=0;t<n.length;t++)if(!BE(n[t],e[t]))return!1;return!0}if(Tw(n)||Tw(e)||!FE(n)||!FE(e)||!MA(n)||!MA(e))return!1;var o=Object.keys(n),i=Object.keys(e);if(o.length!==i.length)return!1;for(var s=0,r=o;s<r.length;s++){var a=r[s];if(!Object.prototype.hasOwnProperty.call(e,a)||!BE(n[a],e[a]))return!1}return!0}function $K(n,e){var t=Xn.useRef(!1);Be.useEffect(function(){if(t.current)return n();t.current=!0},e)}var FK=["dataSchema","columns"],wV=(function(){function n(){dV(this,n)}return uV(n,null,[{key:"getSettings",value:(function(t){var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=o.prevProps,s=i===void 0?{}:i,r=o.isInit,a=r===void 0?!1:r,l=o.initOnlySettingKeys,h=l===void 0?[]:l,c=function(p){return!a&&FK.includes(p)?BE(s[p],t[p]):!!(!a&&h.includes(p))},d={};for(var u in t)u!=="children"&&!c(u)&&t.hasOwnProperty(u)&&(d[u]=t[u]);return d})}])})(),bV=Be.createContext(void 0),BK=function(e){var t=e.children,o=Be.useRef([]),i=Be.useCallback(function(_,S){o.current[S]=_},[]),s=Be.useRef(new Map),r=Be.useRef(new Map),a=Be.useCallback(function(){return r.current.clear()},[]),l=Be.useRef(new Map),h=Be.useCallback(function(){return l.current.clear()},[]),c=Be.useRef(new Map),d=Be.useCallback(function(_){return function(T,P,F,V,D,I,G){var z="".concat(F,"-").concat(V),Y=T.guid,te="".concat(Y,"-").concat(z),ee="".concat(z,"-").concat(Y);if(r.current.has(z)&&(P.innerHTML=r.current.get(z).innerHTML),P&&!P.getAttribute("ghost-table")){for(var be=l.current.get(ee),me=c.current.get(te);P.firstChild;)P.removeChild(P.firstChild);if(be&&me)P.appendChild(me);else{var Ve=Xn.createElement(_,{instance:T,TD:P,row:F,col:V,prop:D,value:I,cellProperties:G}),Ye=LK(Ve,P.ownerDocument,ee,me),Me=Ye.portal,Ge=Ye.portalContainer;c.current.set(te,Ge),P.appendChild(Ge),l.current.set(ee,Me)}}return r.current.set("".concat(F,"-").concat(V),P),P}},[]),u=Be.useRef(function(){}),f=Be.useCallback(function(_){u.current=_},[]),p=Be.useCallback(function(){u.current(EK(l.current.values()))},[]),C=Be.useMemo(function(){return{componentRendererColumns:s.current,columnsSettings:o.current,emitColumnSettings:i,getRendererWrapper:d,clearPortalCache:h,clearRenderedCellCache:a,setRenderersPortalManagerRef:f,pushCellPortalsIntoPortalManager:p}},[i,d,a,f,p]);return Xn.createElement(bV.Provider,{value:C},t)};function CV(){return Be.useContext(bV)}var yV=Be.createContext(void 0),VK=function(e){var t=e.columnIndex,o=e.getOwnerDocument,i=e.children,s=Be.useMemo(function(){return{columnIndex:t,getOwnerDocument:o}},[t,o]);return Xn.createElement(yV.Provider,{value:s},i)},zK=function(){return Be.useContext(yV)},UK=["close","focus","open"],YK=["getValue","setValue"],$S={open:"onOpen",close:"onClose",prepare:"onPrepare",focus:"onFocus"};function _V(n,e){return(function(t){function o(i){var s;return dV(this,o),s=pK(this,o,[i]),e.current=s,Object.getOwnPropertyNames(fi.editors.BaseEditor.prototype).forEach(function(r){if(!(r==="constructor"||YK.includes(r))){var a=fi.editors.BaseEditor.prototype[r];o.prototype[r]=(function(){for(var l,h,c=arguments.length,d=new Array(c),u=0;u<c;u++)d[u]=arguments[u];if(UK.includes(r)||(h=a.call.apply(a,[this].concat(d))),$S[r]&&(l=n.current)!==null&&l!==void 0&&l[$S[r]]){var f;h=(f=n.current[$S[r]]).call.apply(f,[this].concat(d))}return h}).bind(s)}}),s}return mK(o,t),uV(o,[{key:"focus",value:function(){}},{key:"getValue",value:function(){return this.value}},{key:"setValue",value:function(s){this.value=s}},{key:"open",value:function(){}},{key:"close",value:function(){}}])})(fi.editors.BaseEditor)}var GK=Be.createContext(void 0),SV=function(e){var t=e.hooksRef,o=e.hotCustomEditorInstanceRef,i=e.children;return Xn.createElement(GK.Provider,{value:{hooksRef:t,hotCustomEditorInstanceRef:o}},i)},jK=function(e){return e.type===vV},qK=["_columnIndex","_getOwnerDocument","children"],vV=function(e){var t=CV(),o=t.componentRendererColumns,i=t.emitColumnSettings,s=t.getRendererWrapper,r=zK(),a=r.columnIndex,l=r.getOwnerDocument,h=Be.useRef(null),c=Be.useRef(null);Be.useEffect(function(){var u=function(){return Object.keys(e).filter(function(_){return!qK.includes(_)}).reduce(function(_,S){return _[S]=e[S],_},{})},f=function(){var _=wV.getSettings(u());return e.renderer?(_.renderer=s(e.renderer),o.set(a,!0)):e.hotRenderer&&(_.renderer=e.hotRenderer),e.editor?_.editor=_V(h,c):e.hotEditor&&(_.editor=e.hotEditor),_},p=f();i(p,a),$E(e.children)||PK(e.children)});var d=pV(l(),e.editor);return Xn.createElement(SV,{hooksRef:h,hotCustomEditorInstanceRef:c},d)},KK="17.1.0",XK=Be.forwardRef(function(n,e){var t=Be.useState([]),o=RK(t,2),i=o[0],s=o[1];return Be.useImperativeHandle(e,function(){return s}),Xn.createElement(Be.Fragment,null,i)});function ZK(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var RV={exports:{}},FS,IA;function QK(){if(IA)return FS;IA=1;var n="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return FS=n,FS}var BS,HA;function JK(){if(HA)return BS;HA=1;var n=QK();function e(){}function t(){}return t.resetWarningCache=e,BS=function(){function i(a,l,h,c,d,u){if(u!==n){var f=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw f.name="Invariant Violation",f}}i.isRequired=i;function s(){return i}var r={array:i,bigint:i,bool:i,func:i,number:i,object:i,string:i,symbol:i,any:i,arrayOf:s,element:i,elementType:i,instanceOf:s,node:i,objectOf:s,oneOf:s,oneOfType:s,shape:s,exact:s,checkPropTypes:t,resetWarningCache:e};return r.PropTypes=r,r},BS}RV.exports=JK()();var eX=RV.exports,VS=ZK(eX),EV=Be.forwardRef(function(n,e){var t=Be.useRef(null),o=Be.useRef(null),i=Be.useRef(null),s=Be.useRef(null),r=Be.useRef(),a=CV(),l=Be.useCallback(function(){return!t.current||!t.current.isDestroyed?t.current:(console.warn(OK),null)},[t]),h=Be.useCallback(function(){return!t.current||t.current.isDestroyed},[t]),c=Be.useCallback(function(){a.clearRenderedCellCache(),a.componentRendererColumns.clear()},[a]),d=Be.useCallback(function(){return WK()?o.current?o.current.ownerDocument:document:null},[o]),u=function(){var T,P=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,F=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},V=h()?[]:((T=l())===null||T===void 0||(T=T.getSettings())===null||T===void 0?void 0:T._initOnlySettings)||[],D=wV.getSettings(n,{prevProps:F,isInit:P,initOnlySettingKeys:V});return a.columnsSettings.length&&(D.columns=a.columnsSettings),n.renderer?(D.renderer=a.getRendererWrapper(n.renderer),a.componentRendererColumns.set("global",!0)):D.renderer=n.hotRenderer||yE("text"),n.editor?D.editor=_V(i,s):D.editor=n.hotEditor||mE("text"),D},f=function(T){var P,F;T&&((P=T.getPlugin("autoRowSize"))!==null&&P!==void 0&&P.enabled||(F=T.getPlugin("autoColumnSize"))!==null&&F!==void 0&&F.enabled)&&a.componentRendererColumns.size>0&&nm(xK)};Be.useEffect(function(){var S=u(!0);return r.current=n,t.current=new fi.Core(o.current,S),t.current.addHook("beforeViewRender",function(){a.clearPortalCache(),a.clearRenderedCellCache()}),t.current.addHook("afterViewRender",function(){a.pushCellPortalsIntoPortalManager()}),t.current.init(),f(t.current),$E(n.children)||NK(n.children,vV),function(){var T;c(),(T=l())===null||T===void 0||T.destroy()}},[]),$K(function(){c();var S=l(),T=u(!1,r.current);r.current=n,S?.updateSettings(T,!1),f(S),$E(n.children)}),Be.useImperativeHandle(e,function(){return{get hotElementRef(){return o.current},get hotInstance(){return l()}}});var p=Be.Children.toArray(n.children).filter(jK).map(function(S,T){return Xn.createElement(VK,{columnIndex:T,getOwnerDocument:d,key:T},S)}),C=mV(n),_=pV(d(),n.editor);return Xn.createElement(Be.Fragment,null,Xn.createElement("div",$C({ref:o},C),p),Xn.createElement(XK,{ref:a.setRenderersPortalManagerRef}),Xn.createElement(SV,{hooksRef:i,hotCustomEditorInstanceRef:s},_))});EV.propTypes={style:VS.object,id:VS.string,className:VS.string};var tX=["children"],nX=Be.forwardRef(function(n,e){var t,o=n.children,i=_K(n,tX),s=(t=i.id)!==null&&t!==void 0?t:Be.useId();return Xn.createElement(BK,null,Xn.createElement(EV,$C({id:s},i,{ref:e}),o))});nX.version=KK;const AA="handsontableEditor",oX="handsontable";class bx extends ul{static get EDITOR_TYPE(){return oX}open(){super.open();const e=this.htContainer.style;this.htEditor&&(this.htEditor.destroy(),e.width="",e.height="",e.overflow=""),e.display==="none"&&(e.display=""),this.htEditor=new this.hot.constructor(this.htContainer,this.htOptions),this.htEditor.init(),this.htEditor.rootElement.style.display="",this.cellProperties.strict?this.htEditor.selectCell(0,0):this.htEditor.deselectCell(),Oy(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,o,i,s,r){super.prepare(e,t,o,i,s,r);const a=this,l={startRows:0,startCols:0,minRows:0,minCols:0,className:"listbox",copyPaste:!1,autoColumnSize:!1,autoRowSize:!1,readOnly:!0,fillHandle:!1,autoWrapCol:!1,autoWrapRow:!1,ariaTags:!1,themeName:this.hot.getCurrentThemeName(),afterOnCellMouseDown(h,c){const d=this.getSourceData(c.row,c.col);d!==void 0&&a.setValue(d),a.hot.destroyEditor()},preventWheel:!0,layoutDirection:this.hot.isRtl()?"rtl":"ltr"};this.cellProperties.handsontable&&Wn(l,r.handsontable),this.htOptions=l}beginEditing(e,t){const o=this.hot.getSettings().onBeginEditing;o&&o()===!1||super.beginEditing(e,t)}createElements(){super.createElements();const e=this.hot.rootDocument.createElement("DIV");e.className="handsontableEditor",this.TEXTAREA_PARENT.appendChild(e),this.htContainer=e,this.assignHooks()}finishEditing(e,t,o){if(this.htEditor&&this.htEditor.isListening()&&this.hot.listen(),this.htEditor&&this.htEditor.getSelectedActive()){const i=this.htEditor.getValue();i!==void 0&&this.setValue(i)}super.finishEditing(e,t,o)}flipDropdownVerticallyIfNeeded(){const{view:e}=this.hot,t=this.getEditedCellRect();let o=t.top;if(e.isVerticallyScrollableByWindow()){const a=e.getTableOffset().top-this.hot.rootWindow.scrollY;o=Math.max(o+a,0)}const i=this.getDropdownHeight(),s=e.getWorkspaceHeight()-o-t.height,r=i>s&&o>s+t.height;return r?this.flipDropdownVertically():this.unflipDropdownVertically(),{isFlipped:r,spaceAbove:o,spaceBelow:s}}flipDropdownVertically(){const e=this.htEditor.rootElement.style;e.position="absolute",e.top=`${-this.getDropdownHeight()}px`,this.isFlippedVertically=!0}unflipDropdownVertically(){const e=this.htEditor.rootElement.style;e.position="absolute",e.top="",this.isFlippedVertically=!1}flipDropdownHorizontallyIfNeeded(){const{view:e}=this.hot,t=this.getEditedCellRect();let o=t.start+t.width;if(e.isHorizontallyScrollableByWindow()){const a=e.getTableOffset().left-this.hot.rootWindow.scrollX;o=Math.max(o+a,0)}const i=this.getDropdownWidth(),s=e.getWorkspaceWidth()-o+t.width,r=i>s&&o>s;return r?this.flipDropdownHorizontally():this.unflipDropdownHorizontally(),{isFlipped:r,spaceInlineStart:o,spaceInlineEnd:s}}flipDropdownHorizontally(){const e=this.htEditor.rootElement.style,{width:t}=this.getEditedCellRect();e.position="absolute",e[this.hot.isRtl()?"right":"left"]=`${-(this.getDropdownWidth()-t)}px`,this.isFlippedHorizontally=!0}unflipDropdownHorizontally(){const 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?.destroy()}),this.hot.addHook("afterSetTheme",(e,t)=>{t||this.close()})}registerShortcuts(){const t=this.hot.getShortcutManager().getContext("editor");super.registerShortcuts();const o={group:AA,relativeToGroup:dl,position:"before"},i=(s,r)=>{const a=this.htEditor;if(s!==void 0&&(s<0||this.isFlippedVertically&&s>a.countRows()-1?a.deselectCell():a.selectCell(s,0),a.getData().length))return r.preventDefault(),es(r),this.hot.listen(),this.TEXTAREA.focus(),!1};t.addShortcuts([{keys:[["ArrowUp"]],callback:s=>{const r=this.htEditor;let a,l;return!r.getSelectedActive()&&this.isFlippedVertically?a=r.countRows()-1:r.getSelectedActive()&&(this.isFlippedVertically?(l=r.getSelectedActive()[0],a=Math.max(0,l-1)):(l=r.getSelectedActive()[0],a=l-1)),i(a,s)},preventDefault:!1},{keys:[["ArrowDown"]],callback:s=>{const r=this.htEditor;let a,l;if(!r.getSelectedActive()&&!this.isFlippedVertically)a=0;else if(r.getSelectedActive()){if(this.isFlippedVertically)a=r.getSelectedActive()[0]+1;else if(!this.isFlippedVertically){const h=r.countRows()-1;l=r.getSelectedActive()[0],a=Math.min(h,l+1)}}return i(a,s)},preventDefault:!1}],o)}unregisterShortcuts(){super.unregisterShortcuts(),this.hot.getShortcutManager().getContext("editor").removeShortcutsByGroup(AA)}constructor(...e){super(...e),this.isFlippedVertically=!1,this.isFlippedHorizontally=!1}}function kV(n,e){if(e.has(n))throw new TypeError("Cannot initialize the same private elements twice on an object")}function iX(n,e){return e.get?e.get.call(n):e.value}function sX(n,e,t){if(e.set)e.set.call(n,t);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=t}}function TV(n,e,t){if(!e.has(n))throw new TypeError("attempted to "+t+" private field on non-instance");return e.get(n)}function zS(n,e){var t=TV(n,e,"get");return iX(n,t)}function OA(n,e,t){kV(n,e),e.set(n,t)}function DA(n,e,t){var o=TV(n,e,"set");return sX(n,o,t),t}function NA(n,e,t){if(!e.has(n))throw new TypeError("attempted to get private field on non-instance");return t}function rX(n,e){kV(n,e),e.add(n)}const aX="autocomplete";var xw=new WeakMap,US=new WeakMap,YS=new WeakSet;class Cx extends bx{static get EDITOR_TYPE(){return aX}getValue(){const e=this.rawChoices.find(t=>{const o=this.stripValueIfNeeded(t);return(Ln(o)?o.value:o)===this.TEXTAREA.value});return J(e)?e:this.TEXTAREA.value}createElements(){super.createElements(),B(this.htContainer,"autocompleteEditor"),B(this.htContainer,this.hot.rootWindow.navigator.platform.indexOf("Mac")===-1?"":"htMacScroll"),this.hot.getSettings().ariaTags&&fe(this.TEXTAREA,[DG(),kG(),q$("listbox"),$G()])}prepare(e,t,o,i,s,r){super.prepare(e,t,o,i,s,r),this.hot.getSettings().ariaTags&&fe(this.TEXTAREA,[Es("false"),FG(`${zS(this,xw)}-listbox-${e}-${t}`)]),this.htOptions={...this.htOptions,valueGetter:a=>Ln(a)?a.value:a}}open(){super.open();const e=this.cellProperties.trimDropdown===void 0?!0:this.cellProperties.trimDropdown,t=this.hot.getSettings().ariaTags,o=Array.isArray(this.cellProperties.source)?this.cellProperties.source:null,i=o?.length,{row:s,col:r}=this;this.showEditableElement(),this.focus(),this.addHook("beforeKeyDown",a=>this.onBeforeKeyDown(a)),this.htEditor.addHook("afterScroll",zS(this,US)),this.htEditor.updateSettings({colWidths:e?[bn(this.TEXTAREA)-2]:void 0,autoColumnSize:!0,renderer:(a,l,h,c,d,u,f)=>{ia(a,l,h,c,d,u,f);const{filteringCaseSensitive:p,allowHtml:C,locale:_}=this.cellProperties,S=this.query;let T=bt(u),P,F;T&&!C&&(P=p===!0?T.indexOf(S):T.toLocaleLowerCase(_).indexOf(S.toLocaleLowerCase(_)),P!==-1&&(F=T.substr(P,S.length),T=T.replace(F,`<strong>${F}</strong>`))),t&&fe(l,[TG(),...o?[UG(i)]:[],...o?[YG(o.indexOf(u)+1)]:[],["id",`${this.htEditor.rootElement.id}_${h}-${c}`]]),l.innerHTML=T},afterSelectionEnd:(a,l)=>{if(t){const h=d=>{fe(d,[U0()]),fe(this.TEXTAREA,...BG(d.id))},c=this.htEditor.getCell(a,l,!0);c!==null?h(c):this.htEditor.addHookOnce("afterScrollVertically",()=>{const d=this.htEditor.getCell(a,l,!0);h(d)})}}}),t&&(fe(this.htEditor.view._wt.wtOverlays.wtTable.TABLE,...Ga()),fe(this.htEditor.rootElement,[j$(),VG("polite"),zG("text"),["id",`${zS(this,xw)}-listbox-${s}-${r}`]]),fe(this.TEXTAREA,...Es("true"))),this.hot._registerTimeout(()=>{this.queryChoices(this.TEXTAREA.value)})}close(){this.removeHooksByKey("beforeKeyDown"),super.close(),this.hot.getSettings().ariaTags&&fe(this.TEXTAREA,[Es("false")])}discardEditor(e){super.discardEditor(e),this.hot.view.render()}queryChoices(e){const t=this.cellProperties.source;this.query=e,typeof t=="function"?t.call(this.cellProperties,e,o=>{this.rawChoices=o,this.updateChoicesList(this.stripValuesIfNeeded(o))}):Array.isArray(t)?(this.rawChoices=t,this.updateChoicesList(this.stripValuesIfNeeded(t))):this.updateChoicesList([])}updateChoicesList(e){const t=rF(this.TEXTAREA),o=f4(this.TEXTAREA),i=this.cellProperties.sortByRelevance,s=this.cellProperties.filter,r=this.stripValueIfNeeded(this.getValue()),a=Ln(r)?r.value:r;let l=null,h=e;i||(h=h.toSorted());const c=[],d=this.cellProperties.locale,u=this.cellProperties.filteringCaseSensitive,f=u?a:a.toLocaleLowerCase(d);for(let p=0;p<h.length;p++){const C=Ln(h[p])?gr(bt(h[p].value)):gr(bt(h[p]));if((u?C:C.toLocaleLowerCase(d)).indexOf(f)!==-1&&(c.push(p),s===!1))break}s===!1?r.length>0&&(l=c[0]):(h=c.map(p=>h[p]),l=h.indexOf(f)>-1?h.indexOf(f):0),this.strippedChoices=h,h.length===0?this.htEditor.rootElement.style.display="none":this.htEditor.rootElement.style.display="",this.htEditor.loadData(Ab([h])),h.length>0&&(this.updateDropdownDimensions(),this.flipDropdownVerticallyIfNeeded(),this.cellProperties.strict===!0&&this.highlightBestMatchingChoice(l)),this.hot.listen(),Oy(this.TEXTAREA,t,t===o?void 0:o)}flipDropdownVerticallyIfNeeded(){const e=super.flipDropdownVerticallyIfNeeded(),{isFlipped:t,spaceAbove:o,spaceBelow:i}=e;return this.limitDropdownIfNeeded(t?o:i),e}limitDropdownIfNeeded(e){const t=this.getDropdownHeight();if(t>e){let o=0,i=0,s=null;do i=this.htEditor.stylesHandler.getDefaultRowHeight(),o+=i;while(o<e);s=o-i,this.isFlippedVertically&&(this.htEditor.rootElement.style.top=`${parseInt(this.htEditor.rootElement.style.top,10)+t-s}px`),this.setDropdownHeight(o-i)}}updateDropdownDimensions(){const e=g4(),t=this.getTargetEditorWidth()+e,o=this.getTargetEditorHeight()+e;this.htEditor.updateSettings({width:t,height:o}),NA(this,YS,PA).call(this),this.htEditor.view._wt.wtTable.alignOverlaysWithTrimmingContainer()}setDropdownHeight(e){this.htEditor.updateSettings({height:e}),NA(this,YS,PA).call(this),this.htEditor.view._wt.wtTable.alignOverlaysWithTrimmingContainer()}highlightBestMatchingChoice(e){typeof e=="number"?this.htEditor.selectCell(e,0,void 0,void 0,void 0,!1):this.htEditor.deselectCell()}getTargetEditorHeight(){let e=0;if(!this.hot.getCurrentThemeName()){const i=this.hot.rootWindow.getComputedStyle(this.htContainer.querySelector(".htCore"));e=parseInt(i.borderTopWidth,10)+parseInt(i.borderBottomWidth,10)}const t=Math.min(this.cellProperties.visibleRows,this.strippedChoices.length);return Array.from({length:t},(i,s)=>s).reduce((i,s)=>{const r=this.hot.stylesHandler.getDefaultRowHeight()+(s===0?1:0);return i+r},0)+e}getTargetEditorWidth(){let e=0;if(!this.hot.getCurrentThemeName()){const t=this.hot.rootWindow.getComputedStyle(this.htContainer.querySelector(".htCore"));e=parseInt(t.borderInlineStartWidth,10)+parseInt(t.borderInlineEndWidth,10)}return this.htEditor.getColWidth(0)+e}stripValueIfNeeded(e){return this.stripValuesIfNeeded([e])[0]}stripValuesIfNeeded(e){const{allowHtml:t}=this.cellProperties,o=i=>bt(t?i:gr(i));return e.every(i=>Ln(i))?e.map(i=>({key:o(i.key),value:o(i.value)})):e.map(i=>o(i))}onBeforeKeyDown(e){if(gF(e.keyCode)||e.keyCode===Te.BACKSPACE||e.keyCode===Te.DELETE||e.keyCode===Te.INSERT){let t=10;if(e.keyCode===Te.C&&(e.ctrlKey||e.metaKey))return;this.isOpened()||(t+=10),this.htEditor&&this.hot._registerTimeout(()=>{this.queryChoices(this.TEXTAREA.value)},t)}}constructor(...e){super(...e),rX(this,YS),OA(this,xw,{writable:!0,value:void 0}),OA(this,US,{writable:!0,value:void 0}),this.query=null,this.strippedChoices=[],this.rawChoices=[],DA(this,xw,this.hot.guid.slice(0,9)),DA(this,US,Im(()=>{this.focus()},100))}}function PA(){this.htEditor.view.hasVerticalScroll()&&this.htEditor.updateSettings({width:this.getTargetEditorWidth()+xn(this.hot.rootDocument)})}const lX="checkbox";class xV extends td{static get EDITOR_TYPE(){return lX}beginEditing(e,t){if(t&&t.type==="mouseup"&&t.target.nodeName==="TD"){const o=this.TD.querySelector('input[type="checkbox"]');_e(o,"htBadValue")||o.click()}}finishEditing(){}init(){}open(){}close(){}getValue(){}setValue(){}focus(){}}var MV;function Z(){return MV.apply(null,arguments)}function hX(n){MV=n}function br(n){return n instanceof Array||Object.prototype.toString.call(n)==="[object Array]"}function Oc(n){return n!=null&&Object.prototype.toString.call(n)==="[object Object]"}function _t(n,e){return Object.prototype.hasOwnProperty.call(n,e)}function yx(n){if(Object.getOwnPropertyNames)return Object.getOwnPropertyNames(n).length===0;var e;for(e in n)if(_t(n,e))return!1;return!0}function Ti(n){return n===void 0}function il(n){return typeof n=="number"||Object.prototype.toString.call(n)==="[object Number]"}function Wm(n){return n instanceof Date||Object.prototype.toString.call(n)==="[object Date]"}function IV(n,e){var t=[],o,i=n.length;for(o=0;o<i;++o)t.push(e(n[o],o));return t}function Jl(n,e){for(var t in e)_t(e,t)&&(n[t]=e[t]);return _t(e,"toString")&&(n.toString=e.toString),_t(e,"valueOf")&&(n.valueOf=e.valueOf),n}function sa(n,e,t,o){return JV(n,e,t,o,!0).utc()}function cX(){return{empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidEra:null,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1,parsedDateParts:[],era:null,meridiem:null,rfc2822:!1,weekdayMismatch:!1}}function Je(n){return n._pf==null&&(n._pf=cX()),n._pf}var VE;Array.prototype.some?VE=Array.prototype.some:VE=function(n){var e=Object(this),t=e.length>>>0,o;for(o=0;o<t;o++)if(o in e&&n.call(this,e[o],o,e))return!0;return!1};function _x(n){var e=null,t=!1,o=n._d&&!isNaN(n._d.getTime());if(o&&(e=Je(n),t=VE.call(e.parsedDateParts,function(i){return i!=null}),o=e.overflow<0&&!e.empty&&!e.invalidEra&&!e.invalidMonth&&!e.invalidWeekday&&!e.weekdayMismatch&&!e.nullInput&&!e.invalidFormat&&!e.userInvalidated&&(!e.meridiem||e.meridiem&&t),n._strict&&(o=o&&e.charsLeftOver===0&&e.unusedTokens.length===0&&e.bigHour===void 0)),Object.isFrozen==null||!Object.isFrozen(n))n._isValid=o;else return o;return n._isValid}function Zy(n){var e=sa(NaN);return n!=null?Jl(Je(e),n):Je(e).userInvalidated=!0,e}var LA=Z.momentProperties=[],GS=!1;function Sx(n,e){var t,o,i,s=LA.length;if(Ti(e._isAMomentObject)||(n._isAMomentObject=e._isAMomentObject),Ti(e._i)||(n._i=e._i),Ti(e._f)||(n._f=e._f),Ti(e._l)||(n._l=e._l),Ti(e._strict)||(n._strict=e._strict),Ti(e._tzm)||(n._tzm=e._tzm),Ti(e._isUTC)||(n._isUTC=e._isUTC),Ti(e._offset)||(n._offset=e._offset),Ti(e._pf)||(n._pf=Je(e)),Ti(e._locale)||(n._locale=e._locale),s>0)for(t=0;t<s;t++)o=LA[t],i=e[o],Ti(i)||(n[o]=i);return n}function $m(n){Sx(this,n),this._d=new Date(n._d!=null?n._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),GS===!1&&(GS=!0,Z.updateOffset(this),GS=!1)}function Cr(n){return n instanceof $m||n!=null&&n._isAMomentObject!=null}function HV(n){Z.suppressDeprecationWarnings===!1&&typeof console<"u"&&console.warn&&console.warn("Deprecation warning: "+n)}function xs(n,e){var t=!0;return Jl(function(){if(Z.deprecationHandler!=null&&Z.deprecationHandler(null,n),t){var o=[],i,s,r,a=arguments.length;for(s=0;s<a;s++){if(i="",typeof arguments[s]=="object"){i+=`
|
|
212
|
+
[`+s+"] ";for(r in arguments[0])_t(arguments[0],r)&&(i+=r+": "+arguments[0][r]+", ");i=i.slice(0,-2)}else i=arguments[s];o.push(i)}HV(n+`
|
|
213
|
+
Arguments: `+Array.prototype.slice.call(o).join("")+`
|
|
214
|
+
`+new Error().stack),t=!1}return e.apply(this,arguments)},e)}var WA={};function AV(n,e){Z.deprecationHandler!=null&&Z.deprecationHandler(n,e),WA[n]||(HV(e),WA[n]=!0)}Z.suppressDeprecationWarnings=!1;Z.deprecationHandler=null;function ra(n){return typeof Function<"u"&&n instanceof Function||Object.prototype.toString.call(n)==="[object Function]"}function dX(n){var e,t;for(t in n)_t(n,t)&&(e=n[t],ra(e)?this[t]=e:this["_"+t]=e);this._config=n,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)}function zE(n,e){var t=Jl({},n),o;for(o in e)_t(e,o)&&(Oc(n[o])&&Oc(e[o])?(t[o]={},Jl(t[o],n[o]),Jl(t[o],e[o])):e[o]!=null?t[o]=e[o]:delete t[o]);for(o in n)_t(n,o)&&!_t(e,o)&&Oc(n[o])&&(t[o]=Jl({},t[o]));return t}function vx(n){n!=null&&this.set(n)}var UE;Object.keys?UE=Object.keys:UE=function(n){var e,t=[];for(e in n)_t(n,e)&&t.push(e);return t};var uX={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"};function fX(n,e,t){var o=this._calendar[n]||this._calendar.sameElse;return ra(o)?o.call(e,t):o}function ea(n,e,t){var o=""+Math.abs(n),i=e-o.length,s=n>=0;return(s?t?"+":"":"-")+Math.pow(10,Math.max(0,i)).toString().substr(1)+o}var Rx=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,Mw=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,jS={},Fu={};function xe(n,e,t,o){var i=o;typeof o=="string"&&(i=function(){return this[o]()}),n&&(Fu[n]=i),e&&(Fu[e[0]]=function(){return ea(i.apply(this,arguments),e[1],e[2])}),t&&(Fu[t]=function(){return this.localeData().ordinal(i.apply(this,arguments),n)})}function gX(n){return n.match(/\[[\s\S]/)?n.replace(/^\[|\]$/g,""):n.replace(/\\/g,"")}function pX(n){var e=n.match(Rx),t,o;for(t=0,o=e.length;t<o;t++)Fu[e[t]]?e[t]=Fu[e[t]]:e[t]=gX(e[t]);return function(i){var s="",r;for(r=0;r<o;r++)s+=ra(e[r])?e[r].call(i,n):e[r];return s}}function Yb(n,e){return n.isValid()?(e=OV(e,n.localeData()),jS[e]=jS[e]||pX(e),jS[e](n)):n.localeData().invalidDate()}function OV(n,e){var t=5;function o(i){return e.longDateFormat(i)||i}for(Mw.lastIndex=0;t>=0&&Mw.test(n);)n=n.replace(Mw,o),Mw.lastIndex=0,t-=1;return n}var mX={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};function wX(n){var e=this._longDateFormat[n],t=this._longDateFormat[n.toUpperCase()];return e||!t?e:(this._longDateFormat[n]=t.match(Rx).map(function(o){return o==="MMMM"||o==="MM"||o==="DD"||o==="dddd"?o.slice(1):o}).join(""),this._longDateFormat[n])}var bX="Invalid date";function CX(){return this._invalidDate}var yX="%d",_X=/\d{1,2}/;function SX(n){return this._ordinal.replace("%d",n)}var vX={future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function RX(n,e,t,o){var i=this._relativeTime[t];return ra(i)?i(n,e,t,o):i.replace(/%d/i,n)}function EX(n,e){var t=this._relativeTime[n>0?"future":"past"];return ra(t)?t(e):t.replace(/%s/i,e)}var $A={D:"date",dates:"date",date:"date",d:"day",days:"day",day:"day",e:"weekday",weekdays:"weekday",weekday:"weekday",E:"isoWeekday",isoweekdays:"isoWeekday",isoweekday:"isoWeekday",DDD:"dayOfYear",dayofyears:"dayOfYear",dayofyear:"dayOfYear",h:"hour",hours:"hour",hour:"hour",ms:"millisecond",milliseconds:"millisecond",millisecond:"millisecond",m:"minute",minutes:"minute",minute:"minute",M:"month",months:"month",month:"month",Q:"quarter",quarters:"quarter",quarter:"quarter",s:"second",seconds:"second",second:"second",gg:"weekYear",weekyears:"weekYear",weekyear:"weekYear",GG:"isoWeekYear",isoweekyears:"isoWeekYear",isoweekyear:"isoWeekYear",w:"week",weeks:"week",week:"week",W:"isoWeek",isoweeks:"isoWeek",isoweek:"isoWeek",y:"year",years:"year",year:"year"};function Ms(n){return typeof n=="string"?$A[n]||$A[n.toLowerCase()]:void 0}function Ex(n){var e={},t,o;for(o in n)_t(n,o)&&(t=Ms(o),t&&(e[t]=n[o]));return e}var kX={date:9,day:11,weekday:11,isoWeekday:11,dayOfYear:4,hour:13,millisecond:16,minute:14,month:8,quarter:7,second:15,weekYear:1,isoWeekYear:1,week:5,isoWeek:5,year:1};function TX(n){var e=[],t;for(t in n)_t(n,t)&&e.push({unit:t,priority:kX[t]});return e.sort(function(o,i){return o.priority-i.priority}),e}var DV=/\d/,ns=/\d\d/,NV=/\d{3}/,kx=/\d{4}/,Qy=/[+-]?\d{6}/,nn=/\d\d?/,PV=/\d\d\d\d?/,LV=/\d\d\d\d\d\d?/,Jy=/\d{1,3}/,Tx=/\d{1,4}/,e_=/[+-]?\d{1,6}/,uf=/\d+/,t_=/[+-]?\d+/,xX=/Z|[+-]\d\d:?\d\d/gi,n_=/Z|[+-]\d\d(?::?\d\d)?/gi,MX=/[+-]?\d+(\.\d{1,3})?/,Fm=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i,ff=/^[1-9]\d?/,xx=/^([1-9]\d|\d)/,BC;BC={};function ge(n,e,t){BC[n]=ra(e)?e:function(o,i){return o&&t?t:e}}function IX(n,e){return _t(BC,n)?BC[n](e._strict,e._locale):new RegExp(HX(n))}function HX(n){return el(n.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(e,t,o,i,s){return t||o||i||s}))}function el(n){return n.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function vs(n){return n<0?Math.ceil(n)||0:Math.floor(n)}function dt(n){var e=+n,t=0;return e!==0&&isFinite(e)&&(t=vs(e)),t}var YE={};function Ft(n,e){var t,o=e,i;for(typeof n=="string"&&(n=[n]),il(e)&&(o=function(s,r){r[e]=dt(s)}),i=n.length,t=0;t<i;t++)YE[n[t]]=o}function Bm(n,e){Ft(n,function(t,o,i,s){i._w=i._w||{},e(t,i._w,i,s)})}function AX(n,e,t){e!=null&&_t(YE,n)&&YE[n](e,t._a,t,n)}function o_(n){return n%4===0&&n%100!==0||n%400===0}var Xo=0,ja=1,Gr=2,ao=3,dr=4,qa=5,_c=6,OX=7,DX=8;xe("Y",0,0,function(){var n=this.year();return n<=9999?ea(n,4):"+"+n});xe(0,["YY",2],0,function(){return this.year()%100});xe(0,["YYYY",4],0,"year");xe(0,["YYYYY",5],0,"year");xe(0,["YYYYYY",6,!0],0,"year");ge("Y",t_);ge("YY",nn,ns);ge("YYYY",Tx,kx);ge("YYYYY",e_,Qy);ge("YYYYYY",e_,Qy);Ft(["YYYYY","YYYYYY"],Xo);Ft("YYYY",function(n,e){e[Xo]=n.length===2?Z.parseTwoDigitYear(n):dt(n)});Ft("YY",function(n,e){e[Xo]=Z.parseTwoDigitYear(n)});Ft("Y",function(n,e){e[Xo]=parseInt(n,10)});function bp(n){return o_(n)?366:365}Z.parseTwoDigitYear=function(n){return dt(n)+(dt(n)>68?1900:2e3)};var WV=gf("FullYear",!0);function NX(){return o_(this.year())}function gf(n,e){return function(t){return t!=null?($V(this,n,t),Z.updateOffset(this,e),this):om(this,n)}}function om(n,e){if(!n.isValid())return NaN;var t=n._d,o=n._isUTC;switch(e){case"Milliseconds":return o?t.getUTCMilliseconds():t.getMilliseconds();case"Seconds":return o?t.getUTCSeconds():t.getSeconds();case"Minutes":return o?t.getUTCMinutes():t.getMinutes();case"Hours":return o?t.getUTCHours():t.getHours();case"Date":return o?t.getUTCDate():t.getDate();case"Day":return o?t.getUTCDay():t.getDay();case"Month":return o?t.getUTCMonth():t.getMonth();case"FullYear":return o?t.getUTCFullYear():t.getFullYear();default:return NaN}}function $V(n,e,t){var o,i,s,r,a;if(!(!n.isValid()||isNaN(t))){switch(o=n._d,i=n._isUTC,e){case"Milliseconds":return void(i?o.setUTCMilliseconds(t):o.setMilliseconds(t));case"Seconds":return void(i?o.setUTCSeconds(t):o.setSeconds(t));case"Minutes":return void(i?o.setUTCMinutes(t):o.setMinutes(t));case"Hours":return void(i?o.setUTCHours(t):o.setHours(t));case"Date":return void(i?o.setUTCDate(t):o.setDate(t));case"FullYear":break;default:return}s=t,r=n.month(),a=n.date(),a=a===29&&r===1&&!o_(s)?28:a,i?o.setUTCFullYear(s,r,a):o.setFullYear(s,r,a)}}function PX(n){return n=Ms(n),ra(this[n])?this[n]():this}function LX(n,e){if(typeof n=="object"){n=Ex(n);var t=TX(n),o,i=t.length;for(o=0;o<i;o++)this[t[o].unit](n[t[o].unit])}else if(n=Ms(n),ra(this[n]))return this[n](e);return this}function WX(n,e){return(n%e+e)%e}var An;Array.prototype.indexOf?An=Array.prototype.indexOf:An=function(n){var e;for(e=0;e<this.length;++e)if(this[e]===n)return e;return-1};function Mx(n,e){if(isNaN(n)||isNaN(e))return NaN;var t=WX(e,12);return n+=(e-t)/12,t===1?o_(n)?29:28:31-t%7%2}xe("M",["MM",2],"Mo",function(){return this.month()+1});xe("MMM",0,0,function(n){return this.localeData().monthsShort(this,n)});xe("MMMM",0,0,function(n){return this.localeData().months(this,n)});ge("M",nn,ff);ge("MM",nn,ns);ge("MMM",function(n,e){return e.monthsShortRegex(n)});ge("MMMM",function(n,e){return e.monthsRegex(n)});Ft(["M","MM"],function(n,e){e[ja]=dt(n)-1});Ft(["MMM","MMMM"],function(n,e,t,o){var i=t._locale.monthsParse(n,o,t._strict);i!=null?e[ja]=i:Je(t).invalidMonth=n});var $X="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),FV="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),BV=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,FX=Fm,BX=Fm;function VX(n,e){return n?br(this._months)?this._months[n.month()]:this._months[(this._months.isFormat||BV).test(e)?"format":"standalone"][n.month()]:br(this._months)?this._months:this._months.standalone}function zX(n,e){return n?br(this._monthsShort)?this._monthsShort[n.month()]:this._monthsShort[BV.test(e)?"format":"standalone"][n.month()]:br(this._monthsShort)?this._monthsShort:this._monthsShort.standalone}function UX(n,e,t){var o,i,s,r=n.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],o=0;o<12;++o)s=sa([2e3,o]),this._shortMonthsParse[o]=this.monthsShort(s,"").toLocaleLowerCase(),this._longMonthsParse[o]=this.months(s,"").toLocaleLowerCase();return t?e==="MMM"?(i=An.call(this._shortMonthsParse,r),i!==-1?i:null):(i=An.call(this._longMonthsParse,r),i!==-1?i:null):e==="MMM"?(i=An.call(this._shortMonthsParse,r),i!==-1?i:(i=An.call(this._longMonthsParse,r),i!==-1?i:null)):(i=An.call(this._longMonthsParse,r),i!==-1?i:(i=An.call(this._shortMonthsParse,r),i!==-1?i:null))}function YX(n,e,t){var o,i,s;if(this._monthsParseExact)return UX.call(this,n,e,t);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),o=0;o<12;o++){if(i=sa([2e3,o]),t&&!this._longMonthsParse[o]&&(this._longMonthsParse[o]=new RegExp("^"+this.months(i,"").replace(".","")+"$","i"),this._shortMonthsParse[o]=new RegExp("^"+this.monthsShort(i,"").replace(".","")+"$","i")),!t&&!this._monthsParse[o]&&(s="^"+this.months(i,"")+"|^"+this.monthsShort(i,""),this._monthsParse[o]=new RegExp(s.replace(".",""),"i")),t&&e==="MMMM"&&this._longMonthsParse[o].test(n))return o;if(t&&e==="MMM"&&this._shortMonthsParse[o].test(n))return o;if(!t&&this._monthsParse[o].test(n))return o}}function VV(n,e){if(!n.isValid())return n;if(typeof e=="string"){if(/^\d+$/.test(e))e=dt(e);else if(e=n.localeData().monthsParse(e),!il(e))return n}var t=e,o=n.date();return o=o<29?o:Math.min(o,Mx(n.year(),t)),n._isUTC?n._d.setUTCMonth(t,o):n._d.setMonth(t,o),n}function zV(n){return n!=null?(VV(this,n),Z.updateOffset(this,!0),this):om(this,"Month")}function GX(){return Mx(this.year(),this.month())}function jX(n){return this._monthsParseExact?(_t(this,"_monthsRegex")||UV.call(this),n?this._monthsShortStrictRegex:this._monthsShortRegex):(_t(this,"_monthsShortRegex")||(this._monthsShortRegex=FX),this._monthsShortStrictRegex&&n?this._monthsShortStrictRegex:this._monthsShortRegex)}function qX(n){return this._monthsParseExact?(_t(this,"_monthsRegex")||UV.call(this),n?this._monthsStrictRegex:this._monthsRegex):(_t(this,"_monthsRegex")||(this._monthsRegex=BX),this._monthsStrictRegex&&n?this._monthsStrictRegex:this._monthsRegex)}function UV(){function n(l,h){return h.length-l.length}var e=[],t=[],o=[],i,s,r,a;for(i=0;i<12;i++)s=sa([2e3,i]),r=el(this.monthsShort(s,"")),a=el(this.months(s,"")),e.push(r),t.push(a),o.push(a),o.push(r);e.sort(n),t.sort(n),o.sort(n),this._monthsRegex=new RegExp("^("+o.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+t.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+e.join("|")+")","i")}function KX(n,e,t,o,i,s,r){var a;return n<100&&n>=0?(a=new Date(n+400,e,t,o,i,s,r),isFinite(a.getFullYear())&&a.setFullYear(n)):a=new Date(n,e,t,o,i,s,r),a}function im(n){var e,t;return n<100&&n>=0?(t=Array.prototype.slice.call(arguments),t[0]=n+400,e=new Date(Date.UTC.apply(null,t)),isFinite(e.getUTCFullYear())&&e.setUTCFullYear(n)):e=new Date(Date.UTC.apply(null,arguments)),e}function VC(n,e,t){var o=7+e-t,i=(7+im(n,0,o).getUTCDay()-e)%7;return-i+o-1}function YV(n,e,t,o,i){var s=(7+t-o)%7,r=VC(n,o,i),a=1+7*(e-1)+s+r,l,h;return a<=0?(l=n-1,h=bp(l)+a):a>bp(n)?(l=n+1,h=a-bp(n)):(l=n,h=a),{year:l,dayOfYear:h}}function sm(n,e,t){var o=VC(n.year(),e,t),i=Math.floor((n.dayOfYear()-o-1)/7)+1,s,r;return i<1?(r=n.year()-1,s=i+tl(r,e,t)):i>tl(n.year(),e,t)?(s=i-tl(n.year(),e,t),r=n.year()+1):(r=n.year(),s=i),{week:s,year:r}}function tl(n,e,t){var o=VC(n,e,t),i=VC(n+1,e,t);return(bp(n)-o+i)/7}xe("w",["ww",2],"wo","week");xe("W",["WW",2],"Wo","isoWeek");ge("w",nn,ff);ge("ww",nn,ns);ge("W",nn,ff);ge("WW",nn,ns);Bm(["w","ww","W","WW"],function(n,e,t,o){e[o.substr(0,1)]=dt(n)});function XX(n){return sm(n,this._week.dow,this._week.doy).week}var ZX={dow:0,doy:6};function QX(){return this._week.dow}function JX(){return this._week.doy}function eZ(n){var e=this.localeData().week(this);return n==null?e:this.add((n-e)*7,"d")}function tZ(n){var e=sm(this,1,4).week;return n==null?e:this.add((n-e)*7,"d")}xe("d",0,"do","day");xe("dd",0,0,function(n){return this.localeData().weekdaysMin(this,n)});xe("ddd",0,0,function(n){return this.localeData().weekdaysShort(this,n)});xe("dddd",0,0,function(n){return this.localeData().weekdays(this,n)});xe("e",0,0,"weekday");xe("E",0,0,"isoWeekday");ge("d",nn);ge("e",nn);ge("E",nn);ge("dd",function(n,e){return e.weekdaysMinRegex(n)});ge("ddd",function(n,e){return e.weekdaysShortRegex(n)});ge("dddd",function(n,e){return e.weekdaysRegex(n)});Bm(["dd","ddd","dddd"],function(n,e,t,o){var i=t._locale.weekdaysParse(n,o,t._strict);i!=null?e.d=i:Je(t).invalidWeekday=n});Bm(["d","e","E"],function(n,e,t,o){e[o]=dt(n)});function nZ(n,e){return typeof n!="string"?n:isNaN(n)?(n=e.weekdaysParse(n),typeof n=="number"?n:null):parseInt(n,10)}function oZ(n,e){return typeof n=="string"?e.weekdaysParse(n)%7||7:isNaN(n)?null:n}function Ix(n,e){return n.slice(e,7).concat(n.slice(0,e))}var iZ="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),GV="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),sZ="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),rZ=Fm,aZ=Fm,lZ=Fm;function hZ(n,e){var t=br(this._weekdays)?this._weekdays:this._weekdays[n&&n!==!0&&this._weekdays.isFormat.test(e)?"format":"standalone"];return n===!0?Ix(t,this._week.dow):n?t[n.day()]:t}function cZ(n){return n===!0?Ix(this._weekdaysShort,this._week.dow):n?this._weekdaysShort[n.day()]:this._weekdaysShort}function dZ(n){return n===!0?Ix(this._weekdaysMin,this._week.dow):n?this._weekdaysMin[n.day()]:this._weekdaysMin}function uZ(n,e,t){var o,i,s,r=n.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],o=0;o<7;++o)s=sa([2e3,1]).day(o),this._minWeekdaysParse[o]=this.weekdaysMin(s,"").toLocaleLowerCase(),this._shortWeekdaysParse[o]=this.weekdaysShort(s,"").toLocaleLowerCase(),this._weekdaysParse[o]=this.weekdays(s,"").toLocaleLowerCase();return t?e==="dddd"?(i=An.call(this._weekdaysParse,r),i!==-1?i:null):e==="ddd"?(i=An.call(this._shortWeekdaysParse,r),i!==-1?i:null):(i=An.call(this._minWeekdaysParse,r),i!==-1?i:null):e==="dddd"?(i=An.call(this._weekdaysParse,r),i!==-1||(i=An.call(this._shortWeekdaysParse,r),i!==-1)?i:(i=An.call(this._minWeekdaysParse,r),i!==-1?i:null)):e==="ddd"?(i=An.call(this._shortWeekdaysParse,r),i!==-1||(i=An.call(this._weekdaysParse,r),i!==-1)?i:(i=An.call(this._minWeekdaysParse,r),i!==-1?i:null)):(i=An.call(this._minWeekdaysParse,r),i!==-1||(i=An.call(this._weekdaysParse,r),i!==-1)?i:(i=An.call(this._shortWeekdaysParse,r),i!==-1?i:null))}function fZ(n,e,t){var o,i,s;if(this._weekdaysParseExact)return uZ.call(this,n,e,t);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),o=0;o<7;o++){if(i=sa([2e3,1]).day(o),t&&!this._fullWeekdaysParse[o]&&(this._fullWeekdaysParse[o]=new RegExp("^"+this.weekdays(i,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[o]=new RegExp("^"+this.weekdaysShort(i,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[o]=new RegExp("^"+this.weekdaysMin(i,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[o]||(s="^"+this.weekdays(i,"")+"|^"+this.weekdaysShort(i,"")+"|^"+this.weekdaysMin(i,""),this._weekdaysParse[o]=new RegExp(s.replace(".",""),"i")),t&&e==="dddd"&&this._fullWeekdaysParse[o].test(n))return o;if(t&&e==="ddd"&&this._shortWeekdaysParse[o].test(n))return o;if(t&&e==="dd"&&this._minWeekdaysParse[o].test(n))return o;if(!t&&this._weekdaysParse[o].test(n))return o}}function gZ(n){if(!this.isValid())return n!=null?this:NaN;var e=om(this,"Day");return n!=null?(n=nZ(n,this.localeData()),this.add(n-e,"d")):e}function pZ(n){if(!this.isValid())return n!=null?this:NaN;var e=(this.day()+7-this.localeData()._week.dow)%7;return n==null?e:this.add(n-e,"d")}function mZ(n){if(!this.isValid())return n!=null?this:NaN;if(n!=null){var e=oZ(n,this.localeData());return this.day(this.day()%7?e:e-7)}else return this.day()||7}function wZ(n){return this._weekdaysParseExact?(_t(this,"_weekdaysRegex")||Hx.call(this),n?this._weekdaysStrictRegex:this._weekdaysRegex):(_t(this,"_weekdaysRegex")||(this._weekdaysRegex=rZ),this._weekdaysStrictRegex&&n?this._weekdaysStrictRegex:this._weekdaysRegex)}function bZ(n){return this._weekdaysParseExact?(_t(this,"_weekdaysRegex")||Hx.call(this),n?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(_t(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=aZ),this._weekdaysShortStrictRegex&&n?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function CZ(n){return this._weekdaysParseExact?(_t(this,"_weekdaysRegex")||Hx.call(this),n?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(_t(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=lZ),this._weekdaysMinStrictRegex&&n?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function Hx(){function n(c,d){return d.length-c.length}var e=[],t=[],o=[],i=[],s,r,a,l,h;for(s=0;s<7;s++)r=sa([2e3,1]).day(s),a=el(this.weekdaysMin(r,"")),l=el(this.weekdaysShort(r,"")),h=el(this.weekdays(r,"")),e.push(a),t.push(l),o.push(h),i.push(a),i.push(l),i.push(h);e.sort(n),t.sort(n),o.sort(n),i.sort(n),this._weekdaysRegex=new RegExp("^("+i.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+o.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+t.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+e.join("|")+")","i")}function Ax(){return this.hours()%12||12}function yZ(){return this.hours()||24}xe("H",["HH",2],0,"hour");xe("h",["hh",2],0,Ax);xe("k",["kk",2],0,yZ);xe("hmm",0,0,function(){return""+Ax.apply(this)+ea(this.minutes(),2)});xe("hmmss",0,0,function(){return""+Ax.apply(this)+ea(this.minutes(),2)+ea(this.seconds(),2)});xe("Hmm",0,0,function(){return""+this.hours()+ea(this.minutes(),2)});xe("Hmmss",0,0,function(){return""+this.hours()+ea(this.minutes(),2)+ea(this.seconds(),2)});function jV(n,e){xe(n,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),e)})}jV("a",!0);jV("A",!1);function qV(n,e){return e._meridiemParse}ge("a",qV);ge("A",qV);ge("H",nn,xx);ge("h",nn,ff);ge("k",nn,ff);ge("HH",nn,ns);ge("hh",nn,ns);ge("kk",nn,ns);ge("hmm",PV);ge("hmmss",LV);ge("Hmm",PV);ge("Hmmss",LV);Ft(["H","HH"],ao);Ft(["k","kk"],function(n,e,t){var o=dt(n);e[ao]=o===24?0:o});Ft(["a","A"],function(n,e,t){t._isPm=t._locale.isPM(n),t._meridiem=n});Ft(["h","hh"],function(n,e,t){e[ao]=dt(n),Je(t).bigHour=!0});Ft("hmm",function(n,e,t){var o=n.length-2;e[ao]=dt(n.substr(0,o)),e[dr]=dt(n.substr(o)),Je(t).bigHour=!0});Ft("hmmss",function(n,e,t){var o=n.length-4,i=n.length-2;e[ao]=dt(n.substr(0,o)),e[dr]=dt(n.substr(o,2)),e[qa]=dt(n.substr(i)),Je(t).bigHour=!0});Ft("Hmm",function(n,e,t){var o=n.length-2;e[ao]=dt(n.substr(0,o)),e[dr]=dt(n.substr(o))});Ft("Hmmss",function(n,e,t){var o=n.length-4,i=n.length-2;e[ao]=dt(n.substr(0,o)),e[dr]=dt(n.substr(o,2)),e[qa]=dt(n.substr(i))});function _Z(n){return(n+"").toLowerCase().charAt(0)==="p"}var SZ=/[ap]\.?m?\.?/i,vZ=gf("Hours",!0);function RZ(n,e,t){return n>11?t?"pm":"PM":t?"am":"AM"}var KV={calendar:uX,longDateFormat:mX,invalidDate:bX,ordinal:yX,dayOfMonthOrdinalParse:_X,relativeTime:vX,months:$X,monthsShort:FV,week:ZX,weekdays:iZ,weekdaysMin:sZ,weekdaysShort:GV,meridiemParse:SZ},hn={},Xf={},rm;function EZ(n,e){var t,o=Math.min(n.length,e.length);for(t=0;t<o;t+=1)if(n[t]!==e[t])return t;return o}function FA(n){return n&&n.toLowerCase().replace("_","-")}function kZ(n){for(var e=0,t,o,i,s;e<n.length;){for(s=FA(n[e]).split("-"),t=s.length,o=FA(n[e+1]),o=o?o.split("-"):null;t>0;){if(i=i_(s.slice(0,t).join("-")),i)return i;if(o&&o.length>=t&&EZ(s,o)>=t-1)break;t--}e++}return rm}function TZ(n){return!!(n&&n.match("^[^/\\\\]*$"))}function i_(n){var e=null,t;if(hn[n]===void 0&&typeof module<"u"&&module&&module.exports&&TZ(n))try{e=rm._abbr,t=require,t("./locale/"+n),lh(e)}catch{hn[n]=null}return hn[n]}function lh(n,e){var t;return n&&(Ti(e)?t=fl(n):t=Ox(n,e),t?rm=t:typeof console<"u"&&console.warn&&console.warn("Locale "+n+" not found. Did you forget to load it?")),rm._abbr}function Ox(n,e){if(e!==null){var t,o=KV;if(e.abbr=n,hn[n]!=null)AV("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),o=hn[n]._config;else if(e.parentLocale!=null)if(hn[e.parentLocale]!=null)o=hn[e.parentLocale]._config;else if(t=i_(e.parentLocale),t!=null)o=t._config;else return Xf[e.parentLocale]||(Xf[e.parentLocale]=[]),Xf[e.parentLocale].push({name:n,config:e}),null;return hn[n]=new vx(zE(o,e)),Xf[n]&&Xf[n].forEach(function(i){Ox(i.name,i.config)}),lh(n),hn[n]}else return delete hn[n],null}function xZ(n,e){if(e!=null){var t,o,i=KV;hn[n]!=null&&hn[n].parentLocale!=null?hn[n].set(zE(hn[n]._config,e)):(o=i_(n),o!=null&&(i=o._config),e=zE(i,e),o==null&&(e.abbr=n),t=new vx(e),t.parentLocale=hn[n],hn[n]=t),lh(n)}else hn[n]!=null&&(hn[n].parentLocale!=null?(hn[n]=hn[n].parentLocale,n===lh()&&lh(n)):hn[n]!=null&&delete hn[n]);return hn[n]}function fl(n){var e;if(n&&n._locale&&n._locale._abbr&&(n=n._locale._abbr),!n)return rm;if(!br(n)){if(e=i_(n),e)return e;n=[n]}return kZ(n)}function MZ(){return UE(hn)}function Dx(n){var e,t=n._a;return t&&Je(n).overflow===-2&&(e=t[ja]<0||t[ja]>11?ja:t[Gr]<1||t[Gr]>Mx(t[Xo],t[ja])?Gr:t[ao]<0||t[ao]>24||t[ao]===24&&(t[dr]!==0||t[qa]!==0||t[_c]!==0)?ao:t[dr]<0||t[dr]>59?dr:t[qa]<0||t[qa]>59?qa:t[_c]<0||t[_c]>999?_c:-1,Je(n)._overflowDayOfYear&&(e<Xo||e>Gr)&&(e=Gr),Je(n)._overflowWeeks&&e===-1&&(e=OX),Je(n)._overflowWeekday&&e===-1&&(e=DX),Je(n).overflow=e),n}var IZ=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,HZ=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,AZ=/Z|[+-]\d\d(?::?\d\d)?/,Iw=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/],["YYYYMM",/\d{6}/,!1],["YYYY",/\d{4}/,!1]],qS=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],OZ=/^\/?Date\((-?\d+)/i,DZ=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,NZ={UT:0,GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function XV(n){var e,t,o=n._i,i=IZ.exec(o)||HZ.exec(o),s,r,a,l,h=Iw.length,c=qS.length;if(i){for(Je(n).iso=!0,e=0,t=h;e<t;e++)if(Iw[e][1].exec(i[1])){r=Iw[e][0],s=Iw[e][2]!==!1;break}if(r==null){n._isValid=!1;return}if(i[3]){for(e=0,t=c;e<t;e++)if(qS[e][1].exec(i[3])){a=(i[2]||" ")+qS[e][0];break}if(a==null){n._isValid=!1;return}}if(!s&&a!=null){n._isValid=!1;return}if(i[4])if(AZ.exec(i[4]))l="Z";else{n._isValid=!1;return}n._f=r+(a||"")+(l||""),Px(n)}else n._isValid=!1}function PZ(n,e,t,o,i,s){var r=[LZ(n),FV.indexOf(e),parseInt(t,10),parseInt(o,10),parseInt(i,10)];return s&&r.push(parseInt(s,10)),r}function LZ(n){var e=parseInt(n,10);return e<=49?2e3+e:e<=999?1900+e:e}function WZ(n){return n.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,"")}function $Z(n,e,t){if(n){var o=GV.indexOf(n),i=new Date(e[0],e[1],e[2]).getDay();if(o!==i)return Je(t).weekdayMismatch=!0,t._isValid=!1,!1}return!0}function FZ(n,e,t){if(n)return NZ[n];if(e)return 0;var o=parseInt(t,10),i=o%100,s=(o-i)/100;return s*60+i}function ZV(n){var e=DZ.exec(WZ(n._i)),t;if(e){if(t=PZ(e[4],e[3],e[2],e[5],e[6],e[7]),!$Z(e[1],t,n))return;n._a=t,n._tzm=FZ(e[8],e[9],e[10]),n._d=im.apply(null,n._a),n._d.setUTCMinutes(n._d.getUTCMinutes()-n._tzm),Je(n).rfc2822=!0}else n._isValid=!1}function BZ(n){var e=OZ.exec(n._i);if(e!==null){n._d=new Date(+e[1]);return}if(XV(n),n._isValid===!1)delete n._isValid;else return;if(ZV(n),n._isValid===!1)delete n._isValid;else return;n._strict?n._isValid=!1:Z.createFromInputFallback(n)}Z.createFromInputFallback=xs("value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",function(n){n._d=new Date(n._i+(n._useUTC?" UTC":""))});function pu(n,e,t){return n??e??t}function VZ(n){var e=new Date(Z.now());return n._useUTC?[e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate()]:[e.getFullYear(),e.getMonth(),e.getDate()]}function Nx(n){var e,t,o=[],i,s,r;if(!n._d){for(i=VZ(n),n._w&&n._a[Gr]==null&&n._a[ja]==null&&zZ(n),n._dayOfYear!=null&&(r=pu(n._a[Xo],i[Xo]),(n._dayOfYear>bp(r)||n._dayOfYear===0)&&(Je(n)._overflowDayOfYear=!0),t=im(r,0,n._dayOfYear),n._a[ja]=t.getUTCMonth(),n._a[Gr]=t.getUTCDate()),e=0;e<3&&n._a[e]==null;++e)n._a[e]=o[e]=i[e];for(;e<7;e++)n._a[e]=o[e]=n._a[e]==null?e===2?1:0:n._a[e];n._a[ao]===24&&n._a[dr]===0&&n._a[qa]===0&&n._a[_c]===0&&(n._nextDay=!0,n._a[ao]=0),n._d=(n._useUTC?im:KX).apply(null,o),s=n._useUTC?n._d.getUTCDay():n._d.getDay(),n._tzm!=null&&n._d.setUTCMinutes(n._d.getUTCMinutes()-n._tzm),n._nextDay&&(n._a[ao]=24),n._w&&typeof n._w.d<"u"&&n._w.d!==s&&(Je(n).weekdayMismatch=!0)}}function zZ(n){var e,t,o,i,s,r,a,l,h;e=n._w,e.GG!=null||e.W!=null||e.E!=null?(s=1,r=4,t=pu(e.GG,n._a[Xo],sm(tn(),1,4).year),o=pu(e.W,1),i=pu(e.E,1),(i<1||i>7)&&(l=!0)):(s=n._locale._week.dow,r=n._locale._week.doy,h=sm(tn(),s,r),t=pu(e.gg,n._a[Xo],h.year),o=pu(e.w,h.week),e.d!=null?(i=e.d,(i<0||i>6)&&(l=!0)):e.e!=null?(i=e.e+s,(e.e<0||e.e>6)&&(l=!0)):i=s),o<1||o>tl(t,s,r)?Je(n)._overflowWeeks=!0:l!=null?Je(n)._overflowWeekday=!0:(a=YV(t,o,i,s,r),n._a[Xo]=a.year,n._dayOfYear=a.dayOfYear)}Z.ISO_8601=function(){};Z.RFC_2822=function(){};function Px(n){if(n._f===Z.ISO_8601){XV(n);return}if(n._f===Z.RFC_2822){ZV(n);return}n._a=[],Je(n).empty=!0;var e=""+n._i,t,o,i,s,r,a=e.length,l=0,h,c;for(i=OV(n._f,n._locale).match(Rx)||[],c=i.length,t=0;t<c;t++)s=i[t],o=(e.match(IX(s,n))||[])[0],o&&(r=e.substr(0,e.indexOf(o)),r.length>0&&Je(n).unusedInput.push(r),e=e.slice(e.indexOf(o)+o.length),l+=o.length),Fu[s]?(o?Je(n).empty=!1:Je(n).unusedTokens.push(s),AX(s,o,n)):n._strict&&!o&&Je(n).unusedTokens.push(s);Je(n).charsLeftOver=a-l,e.length>0&&Je(n).unusedInput.push(e),n._a[ao]<=12&&Je(n).bigHour===!0&&n._a[ao]>0&&(Je(n).bigHour=void 0),Je(n).parsedDateParts=n._a.slice(0),Je(n).meridiem=n._meridiem,n._a[ao]=UZ(n._locale,n._a[ao],n._meridiem),h=Je(n).era,h!==null&&(n._a[Xo]=n._locale.erasConvertYear(h,n._a[Xo])),Nx(n),Dx(n)}function UZ(n,e,t){var o;return t==null?e:n.meridiemHour!=null?n.meridiemHour(e,t):(n.isPM!=null&&(o=n.isPM(t),o&&e<12&&(e+=12),!o&&e===12&&(e=0)),e)}function YZ(n){var e,t,o,i,s,r,a=!1,l=n._f.length;if(l===0){Je(n).invalidFormat=!0,n._d=new Date(NaN);return}for(i=0;i<l;i++)s=0,r=!1,e=Sx({},n),n._useUTC!=null&&(e._useUTC=n._useUTC),e._f=n._f[i],Px(e),_x(e)&&(r=!0),s+=Je(e).charsLeftOver,s+=Je(e).unusedTokens.length*10,Je(e).score=s,a?s<o&&(o=s,t=e):(o==null||s<o||r)&&(o=s,t=e,r&&(a=!0));Jl(n,t||e)}function GZ(n){if(!n._d){var e=Ex(n._i),t=e.day===void 0?e.date:e.day;n._a=IV([e.year,e.month,t,e.hour,e.minute,e.second,e.millisecond],function(o){return o&&parseInt(o,10)}),Nx(n)}}function jZ(n){var e=new $m(Dx(QV(n)));return e._nextDay&&(e.add(1,"d"),e._nextDay=void 0),e}function QV(n){var e=n._i,t=n._f;return n._locale=n._locale||fl(n._l),e===null||t===void 0&&e===""?Zy({nullInput:!0}):(typeof e=="string"&&(n._i=e=n._locale.preparse(e)),Cr(e)?new $m(Dx(e)):(Wm(e)?n._d=e:br(t)?YZ(n):t?Px(n):qZ(n),_x(n)||(n._d=null),n))}function qZ(n){var e=n._i;Ti(e)?n._d=new Date(Z.now()):Wm(e)?n._d=new Date(e.valueOf()):typeof e=="string"?BZ(n):br(e)?(n._a=IV(e.slice(0),function(t){return parseInt(t,10)}),Nx(n)):Oc(e)?GZ(n):il(e)?n._d=new Date(e):Z.createFromInputFallback(n)}function JV(n,e,t,o,i){var s={};return(e===!0||e===!1)&&(o=e,e=void 0),(t===!0||t===!1)&&(o=t,t=void 0),(Oc(n)&&yx(n)||br(n)&&n.length===0)&&(n=void 0),s._isAMomentObject=!0,s._useUTC=s._isUTC=i,s._l=t,s._i=n,s._f=e,s._strict=o,jZ(s)}function tn(n,e,t,o){return JV(n,e,t,o,!1)}var KZ=xs("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var n=tn.apply(null,arguments);return this.isValid()&&n.isValid()?n<this?this:n:Zy()}),XZ=xs("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var n=tn.apply(null,arguments);return this.isValid()&&n.isValid()?n>this?this:n:Zy()});function ez(n,e){var t,o;if(e.length===1&&br(e[0])&&(e=e[0]),!e.length)return tn();for(t=e[0],o=1;o<e.length;++o)(!e[o].isValid()||e[o][n](t))&&(t=e[o]);return t}function ZZ(){var n=[].slice.call(arguments,0);return ez("isBefore",n)}function QZ(){var n=[].slice.call(arguments,0);return ez("isAfter",n)}var JZ=function(){return Date.now?Date.now():+new Date},Zf=["year","quarter","month","week","day","hour","minute","second","millisecond"];function eQ(n){var e,t=!1,o,i=Zf.length;for(e in n)if(_t(n,e)&&!(An.call(Zf,e)!==-1&&(n[e]==null||!isNaN(n[e]))))return!1;for(o=0;o<i;++o)if(n[Zf[o]]){if(t)return!1;parseFloat(n[Zf[o]])!==dt(n[Zf[o]])&&(t=!0)}return!0}function tQ(){return this._isValid}function nQ(){return yr(NaN)}function s_(n){var e=Ex(n),t=e.year||0,o=e.quarter||0,i=e.month||0,s=e.week||e.isoWeek||0,r=e.day||0,a=e.hour||0,l=e.minute||0,h=e.second||0,c=e.millisecond||0;this._isValid=eQ(e),this._milliseconds=+c+h*1e3+l*6e4+a*1e3*60*60,this._days=+r+s*7,this._months=+i+o*3+t*12,this._data={},this._locale=fl(),this._bubble()}function Gb(n){return n instanceof s_}function GE(n){return n<0?Math.round(-1*n)*-1:Math.round(n)}function oQ(n,e,t){var o=Math.min(n.length,e.length),i=Math.abs(n.length-e.length),s=0,r;for(r=0;r<o;r++)dt(n[r])!==dt(e[r])&&s++;return s+i}function tz(n,e){xe(n,0,0,function(){var t=this.utcOffset(),o="+";return t<0&&(t=-t,o="-"),o+ea(~~(t/60),2)+e+ea(~~t%60,2)})}tz("Z",":");tz("ZZ","");ge("Z",n_);ge("ZZ",n_);Ft(["Z","ZZ"],function(n,e,t){t._useUTC=!0,t._tzm=Lx(n_,n)});var iQ=/([\+\-]|\d\d)/gi;function Lx(n,e){var t=(e||"").match(n),o,i,s;return t===null?null:(o=t[t.length-1]||[],i=(o+"").match(iQ)||["-",0,0],s=+(i[1]*60)+dt(i[2]),s===0?0:i[0]==="+"?s:-s)}function Wx(n,e){var t,o;return e._isUTC?(t=e.clone(),o=(Cr(n)||Wm(n)?n.valueOf():tn(n).valueOf())-t.valueOf(),t._d.setTime(t._d.valueOf()+o),Z.updateOffset(t,!1),t):tn(n).local()}function jE(n){return-Math.round(n._d.getTimezoneOffset())}Z.updateOffset=function(){};function sQ(n,e,t){var o=this._offset||0,i;if(!this.isValid())return n!=null?this:NaN;if(n!=null){if(typeof n=="string"){if(n=Lx(n_,n),n===null)return this}else Math.abs(n)<16&&!t&&(n=n*60);return!this._isUTC&&e&&(i=jE(this)),this._offset=n,this._isUTC=!0,i!=null&&this.add(i,"m"),o!==n&&(!e||this._changeInProgress?iz(this,yr(n-o,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,Z.updateOffset(this,!0),this._changeInProgress=null)),this}else return this._isUTC?o:jE(this)}function rQ(n,e){return n!=null?(typeof n!="string"&&(n=-n),this.utcOffset(n,e),this):-this.utcOffset()}function aQ(n){return this.utcOffset(0,n)}function lQ(n){return this._isUTC&&(this.utcOffset(0,n),this._isUTC=!1,n&&this.subtract(jE(this),"m")),this}function hQ(){if(this._tzm!=null)this.utcOffset(this._tzm,!1,!0);else if(typeof this._i=="string"){var n=Lx(xX,this._i);n!=null?this.utcOffset(n):this.utcOffset(0,!0)}return this}function cQ(n){return this.isValid()?(n=n?tn(n).utcOffset():0,(this.utcOffset()-n)%60===0):!1}function dQ(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function uQ(){if(!Ti(this._isDSTShifted))return this._isDSTShifted;var n={},e;return Sx(n,this),n=QV(n),n._a?(e=n._isUTC?sa(n._a):tn(n._a),this._isDSTShifted=this.isValid()&&oQ(n._a,e.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted}function fQ(){return this.isValid()?!this._isUTC:!1}function gQ(){return this.isValid()?this._isUTC:!1}function nz(){return this.isValid()?this._isUTC&&this._offset===0:!1}var pQ=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,mQ=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function yr(n,e){var t=n,o=null,i,s,r;return Gb(n)?t={ms:n._milliseconds,d:n._days,M:n._months}:il(n)||!isNaN(+n)?(t={},e?t[e]=+n:t.milliseconds=+n):(o=pQ.exec(n))?(i=o[1]==="-"?-1:1,t={y:0,d:dt(o[Gr])*i,h:dt(o[ao])*i,m:dt(o[dr])*i,s:dt(o[qa])*i,ms:dt(GE(o[_c]*1e3))*i}):(o=mQ.exec(n))?(i=o[1]==="-"?-1:1,t={y:Ah(o[2],i),M:Ah(o[3],i),w:Ah(o[4],i),d:Ah(o[5],i),h:Ah(o[6],i),m:Ah(o[7],i),s:Ah(o[8],i)}):t==null?t={}:typeof t=="object"&&("from"in t||"to"in t)&&(r=wQ(tn(t.from),tn(t.to)),t={},t.ms=r.milliseconds,t.M=r.months),s=new s_(t),Gb(n)&&_t(n,"_locale")&&(s._locale=n._locale),Gb(n)&&_t(n,"_isValid")&&(s._isValid=n._isValid),s}yr.fn=s_.prototype;yr.invalid=nQ;function Ah(n,e){var t=n&&parseFloat(n.replace(",","."));return(isNaN(t)?0:t)*e}function BA(n,e){var t={};return t.months=e.month()-n.month()+(e.year()-n.year())*12,n.clone().add(t.months,"M").isAfter(e)&&--t.months,t.milliseconds=+e-+n.clone().add(t.months,"M"),t}function wQ(n,e){var t;return n.isValid()&&e.isValid()?(e=Wx(e,n),n.isBefore(e)?t=BA(n,e):(t=BA(e,n),t.milliseconds=-t.milliseconds,t.months=-t.months),t):{milliseconds:0,months:0}}function oz(n,e){return function(t,o){var i,s;return o!==null&&!isNaN(+o)&&(AV(e,"moment()."+e+"(period, number) is deprecated. Please use moment()."+e+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),s=t,t=o,o=s),i=yr(t,o),iz(this,i,n),this}}function iz(n,e,t,o){var i=e._milliseconds,s=GE(e._days),r=GE(e._months);n.isValid()&&(o=o??!0,r&&VV(n,om(n,"Month")+r*t),s&&$V(n,"Date",om(n,"Date")+s*t),i&&n._d.setTime(n._d.valueOf()+i*t),o&&Z.updateOffset(n,s||r))}var bQ=oz(1,"add"),CQ=oz(-1,"subtract");function sz(n){return typeof n=="string"||n instanceof String}function yQ(n){return Cr(n)||Wm(n)||sz(n)||il(n)||SQ(n)||_Q(n)||n===null||n===void 0}function _Q(n){var e=Oc(n)&&!yx(n),t=!1,o=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"],i,s,r=o.length;for(i=0;i<r;i+=1)s=o[i],t=t||_t(n,s);return e&&t}function SQ(n){var e=br(n),t=!1;return e&&(t=n.filter(function(o){return!il(o)&&sz(n)}).length===0),e&&t}function vQ(n){var e=Oc(n)&&!yx(n),t=!1,o=["sameDay","nextDay","lastDay","nextWeek","lastWeek","sameElse"],i,s;for(i=0;i<o.length;i+=1)s=o[i],t=t||_t(n,s);return e&&t}function RQ(n,e){var t=n.diff(e,"days",!0);return t<-6?"sameElse":t<-1?"lastWeek":t<0?"lastDay":t<1?"sameDay":t<2?"nextDay":t<7?"nextWeek":"sameElse"}function EQ(n,e){arguments.length===1&&(arguments[0]?yQ(arguments[0])?(n=arguments[0],e=void 0):vQ(arguments[0])&&(e=arguments[0],n=void 0):(n=void 0,e=void 0));var t=n||tn(),o=Wx(t,this).startOf("day"),i=Z.calendarFormat(this,o)||"sameElse",s=e&&(ra(e[i])?e[i].call(this,t):e[i]);return this.format(s||this.localeData().calendar(i,this,tn(t)))}function kQ(){return new $m(this)}function TQ(n,e){var t=Cr(n)?n:tn(n);return this.isValid()&&t.isValid()?(e=Ms(e)||"millisecond",e==="millisecond"?this.valueOf()>t.valueOf():t.valueOf()<this.clone().startOf(e).valueOf()):!1}function xQ(n,e){var t=Cr(n)?n:tn(n);return this.isValid()&&t.isValid()?(e=Ms(e)||"millisecond",e==="millisecond"?this.valueOf()<t.valueOf():this.clone().endOf(e).valueOf()<t.valueOf()):!1}function MQ(n,e,t,o){var i=Cr(n)?n:tn(n),s=Cr(e)?e:tn(e);return this.isValid()&&i.isValid()&&s.isValid()?(o=o||"()",(o[0]==="("?this.isAfter(i,t):!this.isBefore(i,t))&&(o[1]===")"?this.isBefore(s,t):!this.isAfter(s,t))):!1}function IQ(n,e){var t=Cr(n)?n:tn(n),o;return this.isValid()&&t.isValid()?(e=Ms(e)||"millisecond",e==="millisecond"?this.valueOf()===t.valueOf():(o=t.valueOf(),this.clone().startOf(e).valueOf()<=o&&o<=this.clone().endOf(e).valueOf())):!1}function HQ(n,e){return this.isSame(n,e)||this.isAfter(n,e)}function AQ(n,e){return this.isSame(n,e)||this.isBefore(n,e)}function OQ(n,e,t){var o,i,s;if(!this.isValid())return NaN;if(o=Wx(n,this),!o.isValid())return NaN;switch(i=(o.utcOffset()-this.utcOffset())*6e4,e=Ms(e),e){case"year":s=jb(this,o)/12;break;case"month":s=jb(this,o);break;case"quarter":s=jb(this,o)/3;break;case"second":s=(this-o)/1e3;break;case"minute":s=(this-o)/6e4;break;case"hour":s=(this-o)/36e5;break;case"day":s=(this-o-i)/864e5;break;case"week":s=(this-o-i)/6048e5;break;default:s=this-o}return t?s:vs(s)}function jb(n,e){if(n.date()<e.date())return-jb(e,n);var t=(e.year()-n.year())*12+(e.month()-n.month()),o=n.clone().add(t,"months"),i,s;return e-o<0?(i=n.clone().add(t-1,"months"),s=(e-o)/(o-i)):(i=n.clone().add(t+1,"months"),s=(e-o)/(i-o)),-(t+s)||0}Z.defaultFormat="YYYY-MM-DDTHH:mm:ssZ";Z.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";function DQ(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")}function NQ(n){if(!this.isValid())return null;var e=n!==!0,t=e?this.clone().utc():this;return t.year()<0||t.year()>9999?Yb(t,e?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):ra(Date.prototype.toISOString)?e?this.toDate().toISOString():new Date(this.valueOf()+this.utcOffset()*60*1e3).toISOString().replace("Z",Yb(t,"Z")):Yb(t,e?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")}function PQ(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var n="moment",e="",t,o,i,s;return this.isLocal()||(n=this.utcOffset()===0?"moment.utc":"moment.parseZone",e="Z"),t="["+n+'("]',o=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",i="-MM-DD[T]HH:mm:ss.SSS",s=e+'[")]',this.format(t+o+i+s)}function LQ(n){n||(n=this.isUtc()?Z.defaultFormatUtc:Z.defaultFormat);var e=Yb(this,n);return this.localeData().postformat(e)}function WQ(n,e){return this.isValid()&&(Cr(n)&&n.isValid()||tn(n).isValid())?yr({to:this,from:n}).locale(this.locale()).humanize(!e):this.localeData().invalidDate()}function $Q(n){return this.from(tn(),n)}function FQ(n,e){return this.isValid()&&(Cr(n)&&n.isValid()||tn(n).isValid())?yr({from:this,to:n}).locale(this.locale()).humanize(!e):this.localeData().invalidDate()}function BQ(n){return this.to(tn(),n)}function rz(n){var e;return n===void 0?this._locale._abbr:(e=fl(n),e!=null&&(this._locale=e),this)}var az=xs("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(n){return n===void 0?this.localeData():this.locale(n)});function lz(){return this._locale}var zC=1e3,Bu=60*zC,UC=60*Bu,hz=(365*400+97)*24*UC;function Vu(n,e){return(n%e+e)%e}function cz(n,e,t){return n<100&&n>=0?new Date(n+400,e,t)-hz:new Date(n,e,t).valueOf()}function dz(n,e,t){return n<100&&n>=0?Date.UTC(n+400,e,t)-hz:Date.UTC(n,e,t)}function VQ(n){var e,t;if(n=Ms(n),n===void 0||n==="millisecond"||!this.isValid())return this;switch(t=this._isUTC?dz:cz,n){case"year":e=t(this.year(),0,1);break;case"quarter":e=t(this.year(),this.month()-this.month()%3,1);break;case"month":e=t(this.year(),this.month(),1);break;case"week":e=t(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":e=t(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":e=t(this.year(),this.month(),this.date());break;case"hour":e=this._d.valueOf(),e-=Vu(e+(this._isUTC?0:this.utcOffset()*Bu),UC);break;case"minute":e=this._d.valueOf(),e-=Vu(e,Bu);break;case"second":e=this._d.valueOf(),e-=Vu(e,zC);break}return this._d.setTime(e),Z.updateOffset(this,!0),this}function zQ(n){var e,t;if(n=Ms(n),n===void 0||n==="millisecond"||!this.isValid())return this;switch(t=this._isUTC?dz:cz,n){case"year":e=t(this.year()+1,0,1)-1;break;case"quarter":e=t(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":e=t(this.year(),this.month()+1,1)-1;break;case"week":e=t(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":e=t(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":e=t(this.year(),this.month(),this.date()+1)-1;break;case"hour":e=this._d.valueOf(),e+=UC-Vu(e+(this._isUTC?0:this.utcOffset()*Bu),UC)-1;break;case"minute":e=this._d.valueOf(),e+=Bu-Vu(e,Bu)-1;break;case"second":e=this._d.valueOf(),e+=zC-Vu(e,zC)-1;break}return this._d.setTime(e),Z.updateOffset(this,!0),this}function UQ(){return this._d.valueOf()-(this._offset||0)*6e4}function YQ(){return Math.floor(this.valueOf()/1e3)}function GQ(){return new Date(this.valueOf())}function jQ(){var n=this;return[n.year(),n.month(),n.date(),n.hour(),n.minute(),n.second(),n.millisecond()]}function qQ(){var n=this;return{years:n.year(),months:n.month(),date:n.date(),hours:n.hours(),minutes:n.minutes(),seconds:n.seconds(),milliseconds:n.milliseconds()}}function KQ(){return this.isValid()?this.toISOString():null}function XQ(){return _x(this)}function ZQ(){return Jl({},Je(this))}function QQ(){return Je(this).overflow}function JQ(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}xe("N",0,0,"eraAbbr");xe("NN",0,0,"eraAbbr");xe("NNN",0,0,"eraAbbr");xe("NNNN",0,0,"eraName");xe("NNNNN",0,0,"eraNarrow");xe("y",["y",1],"yo","eraYear");xe("y",["yy",2],0,"eraYear");xe("y",["yyy",3],0,"eraYear");xe("y",["yyyy",4],0,"eraYear");ge("N",$x);ge("NN",$x);ge("NNN",$x);ge("NNNN",cJ);ge("NNNNN",dJ);Ft(["N","NN","NNN","NNNN","NNNNN"],function(n,e,t,o){var i=t._locale.erasParse(n,o,t._strict);i?Je(t).era=i:Je(t).invalidEra=n});ge("y",uf);ge("yy",uf);ge("yyy",uf);ge("yyyy",uf);ge("yo",uJ);Ft(["y","yy","yyy","yyyy"],Xo);Ft(["yo"],function(n,e,t,o){var i;t._locale._eraYearOrdinalRegex&&(i=n.match(t._locale._eraYearOrdinalRegex)),t._locale.eraYearOrdinalParse?e[Xo]=t._locale.eraYearOrdinalParse(n,i):e[Xo]=parseInt(n,10)});function eJ(n,e){var t,o,i,s=this._eras||fl("en")._eras;for(t=0,o=s.length;t<o;++t)switch(typeof s[t].since==="string"&&(i=Z(s[t].since).startOf("day"),s[t].since=i.valueOf()),typeof s[t].until){case"undefined":s[t].until=1/0;break;case"string":i=Z(s[t].until).startOf("day").valueOf(),s[t].until=i.valueOf();break}return s}function tJ(n,e,t){var o,i,s=this.eras(),r,a,l;for(n=n.toUpperCase(),o=0,i=s.length;o<i;++o)if(r=s[o].name.toUpperCase(),a=s[o].abbr.toUpperCase(),l=s[o].narrow.toUpperCase(),t)switch(e){case"N":case"NN":case"NNN":if(a===n)return s[o];break;case"NNNN":if(r===n)return s[o];break;case"NNNNN":if(l===n)return s[o];break}else if([r,a,l].indexOf(n)>=0)return s[o]}function nJ(n,e){var t=n.since<=n.until?1:-1;return e===void 0?Z(n.since).year():Z(n.since).year()+(e-n.offset)*t}function oJ(){var n,e,t,o=this.localeData().eras();for(n=0,e=o.length;n<e;++n)if(t=this.clone().startOf("day").valueOf(),o[n].since<=t&&t<=o[n].until||o[n].until<=t&&t<=o[n].since)return o[n].name;return""}function iJ(){var n,e,t,o=this.localeData().eras();for(n=0,e=o.length;n<e;++n)if(t=this.clone().startOf("day").valueOf(),o[n].since<=t&&t<=o[n].until||o[n].until<=t&&t<=o[n].since)return o[n].narrow;return""}function sJ(){var n,e,t,o=this.localeData().eras();for(n=0,e=o.length;n<e;++n)if(t=this.clone().startOf("day").valueOf(),o[n].since<=t&&t<=o[n].until||o[n].until<=t&&t<=o[n].since)return o[n].abbr;return""}function rJ(){var n,e,t,o,i=this.localeData().eras();for(n=0,e=i.length;n<e;++n)if(t=i[n].since<=i[n].until?1:-1,o=this.clone().startOf("day").valueOf(),i[n].since<=o&&o<=i[n].until||i[n].until<=o&&o<=i[n].since)return(this.year()-Z(i[n].since).year())*t+i[n].offset;return this.year()}function aJ(n){return _t(this,"_erasNameRegex")||Fx.call(this),n?this._erasNameRegex:this._erasRegex}function lJ(n){return _t(this,"_erasAbbrRegex")||Fx.call(this),n?this._erasAbbrRegex:this._erasRegex}function hJ(n){return _t(this,"_erasNarrowRegex")||Fx.call(this),n?this._erasNarrowRegex:this._erasRegex}function $x(n,e){return e.erasAbbrRegex(n)}function cJ(n,e){return e.erasNameRegex(n)}function dJ(n,e){return e.erasNarrowRegex(n)}function uJ(n,e){return e._eraYearOrdinalRegex||uf}function Fx(){var n=[],e=[],t=[],o=[],i,s,r,a,l,h=this.eras();for(i=0,s=h.length;i<s;++i)r=el(h[i].name),a=el(h[i].abbr),l=el(h[i].narrow),e.push(r),n.push(a),t.push(l),o.push(r),o.push(a),o.push(l);this._erasRegex=new RegExp("^("+o.join("|")+")","i"),this._erasNameRegex=new RegExp("^("+e.join("|")+")","i"),this._erasAbbrRegex=new RegExp("^("+n.join("|")+")","i"),this._erasNarrowRegex=new RegExp("^("+t.join("|")+")","i")}xe(0,["gg",2],0,function(){return this.weekYear()%100});xe(0,["GG",2],0,function(){return this.isoWeekYear()%100});function r_(n,e){xe(0,[n,n.length],0,e)}r_("gggg","weekYear");r_("ggggg","weekYear");r_("GGGG","isoWeekYear");r_("GGGGG","isoWeekYear");ge("G",t_);ge("g",t_);ge("GG",nn,ns);ge("gg",nn,ns);ge("GGGG",Tx,kx);ge("gggg",Tx,kx);ge("GGGGG",e_,Qy);ge("ggggg",e_,Qy);Bm(["gggg","ggggg","GGGG","GGGGG"],function(n,e,t,o){e[o.substr(0,2)]=dt(n)});Bm(["gg","GG"],function(n,e,t,o){e[o]=Z.parseTwoDigitYear(n)});function fJ(n){return uz.call(this,n,this.week(),this.weekday()+this.localeData()._week.dow,this.localeData()._week.dow,this.localeData()._week.doy)}function gJ(n){return uz.call(this,n,this.isoWeek(),this.isoWeekday(),1,4)}function pJ(){return tl(this.year(),1,4)}function mJ(){return tl(this.isoWeekYear(),1,4)}function wJ(){var n=this.localeData()._week;return tl(this.year(),n.dow,n.doy)}function bJ(){var n=this.localeData()._week;return tl(this.weekYear(),n.dow,n.doy)}function uz(n,e,t,o,i){var s;return n==null?sm(this,o,i).year:(s=tl(n,o,i),e>s&&(e=s),CJ.call(this,n,e,t,o,i))}function CJ(n,e,t,o,i){var s=YV(n,e,t,o,i),r=im(s.year,0,s.dayOfYear);return this.year(r.getUTCFullYear()),this.month(r.getUTCMonth()),this.date(r.getUTCDate()),this}xe("Q",0,"Qo","quarter");ge("Q",DV);Ft("Q",function(n,e){e[ja]=(dt(n)-1)*3});function yJ(n){return n==null?Math.ceil((this.month()+1)/3):this.month((n-1)*3+this.month()%3)}xe("D",["DD",2],"Do","date");ge("D",nn,ff);ge("DD",nn,ns);ge("Do",function(n,e){return n?e._dayOfMonthOrdinalParse||e._ordinalParse:e._dayOfMonthOrdinalParseLenient});Ft(["D","DD"],Gr);Ft("Do",function(n,e){e[Gr]=dt(n.match(nn)[0])});var fz=gf("Date",!0);xe("DDD",["DDDD",3],"DDDo","dayOfYear");ge("DDD",Jy);ge("DDDD",NV);Ft(["DDD","DDDD"],function(n,e,t){t._dayOfYear=dt(n)});function _J(n){var e=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return n==null?e:this.add(n-e,"d")}xe("m",["mm",2],0,"minute");ge("m",nn,xx);ge("mm",nn,ns);Ft(["m","mm"],dr);var SJ=gf("Minutes",!1);xe("s",["ss",2],0,"second");ge("s",nn,xx);ge("ss",nn,ns);Ft(["s","ss"],qa);var vJ=gf("Seconds",!1);xe("S",0,0,function(){return~~(this.millisecond()/100)});xe(0,["SS",2],0,function(){return~~(this.millisecond()/10)});xe(0,["SSS",3],0,"millisecond");xe(0,["SSSS",4],0,function(){return this.millisecond()*10});xe(0,["SSSSS",5],0,function(){return this.millisecond()*100});xe(0,["SSSSSS",6],0,function(){return this.millisecond()*1e3});xe(0,["SSSSSSS",7],0,function(){return this.millisecond()*1e4});xe(0,["SSSSSSSS",8],0,function(){return this.millisecond()*1e5});xe(0,["SSSSSSSSS",9],0,function(){return this.millisecond()*1e6});ge("S",Jy,DV);ge("SS",Jy,ns);ge("SSS",Jy,NV);var eh,gz;for(eh="SSSS";eh.length<=9;eh+="S")ge(eh,uf);function RJ(n,e){e[_c]=dt(("0."+n)*1e3)}for(eh="S";eh.length<=9;eh+="S")Ft(eh,RJ);gz=gf("Milliseconds",!1);xe("z",0,0,"zoneAbbr");xe("zz",0,0,"zoneName");function EJ(){return this._isUTC?"UTC":""}function kJ(){return this._isUTC?"Coordinated Universal Time":""}var Q=$m.prototype;Q.add=bQ;Q.calendar=EQ;Q.clone=kQ;Q.diff=OQ;Q.endOf=zQ;Q.format=LQ;Q.from=WQ;Q.fromNow=$Q;Q.to=FQ;Q.toNow=BQ;Q.get=PX;Q.invalidAt=QQ;Q.isAfter=TQ;Q.isBefore=xQ;Q.isBetween=MQ;Q.isSame=IQ;Q.isSameOrAfter=HQ;Q.isSameOrBefore=AQ;Q.isValid=XQ;Q.lang=az;Q.locale=rz;Q.localeData=lz;Q.max=XZ;Q.min=KZ;Q.parsingFlags=ZQ;Q.set=LX;Q.startOf=VQ;Q.subtract=CQ;Q.toArray=jQ;Q.toObject=qQ;Q.toDate=GQ;Q.toISOString=NQ;Q.inspect=PQ;typeof Symbol<"u"&&Symbol.for!=null&&(Q[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"});Q.toJSON=KQ;Q.toString=DQ;Q.unix=YQ;Q.valueOf=UQ;Q.creationData=JQ;Q.eraName=oJ;Q.eraNarrow=iJ;Q.eraAbbr=sJ;Q.eraYear=rJ;Q.year=WV;Q.isLeapYear=NX;Q.weekYear=fJ;Q.isoWeekYear=gJ;Q.quarter=Q.quarters=yJ;Q.month=zV;Q.daysInMonth=GX;Q.week=Q.weeks=eZ;Q.isoWeek=Q.isoWeeks=tZ;Q.weeksInYear=wJ;Q.weeksInWeekYear=bJ;Q.isoWeeksInYear=pJ;Q.isoWeeksInISOWeekYear=mJ;Q.date=fz;Q.day=Q.days=gZ;Q.weekday=pZ;Q.isoWeekday=mZ;Q.dayOfYear=_J;Q.hour=Q.hours=vZ;Q.minute=Q.minutes=SJ;Q.second=Q.seconds=vJ;Q.millisecond=Q.milliseconds=gz;Q.utcOffset=sQ;Q.utc=aQ;Q.local=lQ;Q.parseZone=hQ;Q.hasAlignedHourOffset=cQ;Q.isDST=dQ;Q.isLocal=fQ;Q.isUtcOffset=gQ;Q.isUtc=nz;Q.isUTC=nz;Q.zoneAbbr=EJ;Q.zoneName=kJ;Q.dates=xs("dates accessor is deprecated. Use date instead.",fz);Q.months=xs("months accessor is deprecated. Use month instead",zV);Q.years=xs("years accessor is deprecated. Use year instead",WV);Q.zone=xs("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",rQ);Q.isDSTShifted=xs("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",uQ);function TJ(n){return tn(n*1e3)}function xJ(){return tn.apply(null,arguments).parseZone()}function pz(n){return n}var St=vx.prototype;St.calendar=fX;St.longDateFormat=wX;St.invalidDate=CX;St.ordinal=SX;St.preparse=pz;St.postformat=pz;St.relativeTime=RX;St.pastFuture=EX;St.set=dX;St.eras=eJ;St.erasParse=tJ;St.erasConvertYear=nJ;St.erasAbbrRegex=lJ;St.erasNameRegex=aJ;St.erasNarrowRegex=hJ;St.months=VX;St.monthsShort=zX;St.monthsParse=YX;St.monthsRegex=qX;St.monthsShortRegex=jX;St.week=XX;St.firstDayOfYear=JX;St.firstDayOfWeek=QX;St.weekdays=hZ;St.weekdaysMin=dZ;St.weekdaysShort=cZ;St.weekdaysParse=fZ;St.weekdaysRegex=wZ;St.weekdaysShortRegex=bZ;St.weekdaysMinRegex=CZ;St.isPM=_Z;St.meridiem=RZ;function YC(n,e,t,o){var i=fl(),s=sa().set(o,e);return i[t](s,n)}function mz(n,e,t){if(il(n)&&(e=n,n=void 0),n=n||"",e!=null)return YC(n,e,t,"month");var o,i=[];for(o=0;o<12;o++)i[o]=YC(n,o,t,"month");return i}function Bx(n,e,t,o){typeof n=="boolean"?(il(e)&&(t=e,e=void 0),e=e||""):(e=n,t=e,n=!1,il(e)&&(t=e,e=void 0),e=e||"");var i=fl(),s=n?i._week.dow:0,r,a=[];if(t!=null)return YC(e,(t+s)%7,o,"day");for(r=0;r<7;r++)a[r]=YC(e,(r+s)%7,o,"day");return a}function MJ(n,e){return mz(n,e,"months")}function IJ(n,e){return mz(n,e,"monthsShort")}function HJ(n,e,t){return Bx(n,e,t,"weekdays")}function AJ(n,e,t){return Bx(n,e,t,"weekdaysShort")}function OJ(n,e,t){return Bx(n,e,t,"weekdaysMin")}lh("en",{eras:[{since:"0001-01-01",until:1/0,offset:1,name:"Anno Domini",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"Before Christ",narrow:"BC",abbr:"BC"}],dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(n){var e=n%10,t=dt(n%100/10)===1?"th":e===1?"st":e===2?"nd":e===3?"rd":"th";return n+t}});Z.lang=xs("moment.lang is deprecated. Use moment.locale instead.",lh);Z.langData=xs("moment.langData is deprecated. Use moment.localeData instead.",fl);var ya=Math.abs;function DJ(){var n=this._data;return this._milliseconds=ya(this._milliseconds),this._days=ya(this._days),this._months=ya(this._months),n.milliseconds=ya(n.milliseconds),n.seconds=ya(n.seconds),n.minutes=ya(n.minutes),n.hours=ya(n.hours),n.months=ya(n.months),n.years=ya(n.years),this}function wz(n,e,t,o){var i=yr(e,t);return n._milliseconds+=o*i._milliseconds,n._days+=o*i._days,n._months+=o*i._months,n._bubble()}function NJ(n,e){return wz(this,n,e,1)}function PJ(n,e){return wz(this,n,e,-1)}function VA(n){return n<0?Math.floor(n):Math.ceil(n)}function LJ(){var n=this._milliseconds,e=this._days,t=this._months,o=this._data,i,s,r,a,l;return n>=0&&e>=0&&t>=0||n<=0&&e<=0&&t<=0||(n+=VA(qE(t)+e)*864e5,e=0,t=0),o.milliseconds=n%1e3,i=vs(n/1e3),o.seconds=i%60,s=vs(i/60),o.minutes=s%60,r=vs(s/60),o.hours=r%24,e+=vs(r/24),l=vs(bz(e)),t+=l,e-=VA(qE(l)),a=vs(t/12),t%=12,o.days=e,o.months=t,o.years=a,this}function bz(n){return n*4800/146097}function qE(n){return n*146097/4800}function WJ(n){if(!this.isValid())return NaN;var e,t,o=this._milliseconds;if(n=Ms(n),n==="month"||n==="quarter"||n==="year")switch(e=this._days+o/864e5,t=this._months+bz(e),n){case"month":return t;case"quarter":return t/3;case"year":return t/12}else switch(e=this._days+Math.round(qE(this._months)),n){case"week":return e/7+o/6048e5;case"day":return e+o/864e5;case"hour":return e*24+o/36e5;case"minute":return e*1440+o/6e4;case"second":return e*86400+o/1e3;case"millisecond":return Math.floor(e*864e5)+o;default:throw new Error("Unknown unit "+n)}}function gl(n){return function(){return this.as(n)}}var Cz=gl("ms"),$J=gl("s"),FJ=gl("m"),BJ=gl("h"),VJ=gl("d"),zJ=gl("w"),UJ=gl("M"),YJ=gl("Q"),GJ=gl("y"),jJ=Cz;function qJ(){return yr(this)}function KJ(n){return n=Ms(n),this.isValid()?this[n+"s"]():NaN}function nd(n){return function(){return this.isValid()?this._data[n]:NaN}}var XJ=nd("milliseconds"),ZJ=nd("seconds"),QJ=nd("minutes"),JJ=nd("hours"),eee=nd("days"),tee=nd("months"),nee=nd("years");function oee(){return vs(this.days()/7)}var Pa=Math.round,Hu={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function iee(n,e,t,o,i){return i.relativeTime(e||1,!!t,n,o)}function see(n,e,t,o){var i=yr(n).abs(),s=Pa(i.as("s")),r=Pa(i.as("m")),a=Pa(i.as("h")),l=Pa(i.as("d")),h=Pa(i.as("M")),c=Pa(i.as("w")),d=Pa(i.as("y")),u=s<=t.ss&&["s",s]||s<t.s&&["ss",s]||r<=1&&["m"]||r<t.m&&["mm",r]||a<=1&&["h"]||a<t.h&&["hh",a]||l<=1&&["d"]||l<t.d&&["dd",l];return t.w!=null&&(u=u||c<=1&&["w"]||c<t.w&&["ww",c]),u=u||h<=1&&["M"]||h<t.M&&["MM",h]||d<=1&&["y"]||["yy",d],u[2]=e,u[3]=+n>0,u[4]=o,iee.apply(null,u)}function ree(n){return n===void 0?Pa:typeof n=="function"?(Pa=n,!0):!1}function aee(n,e){return Hu[n]===void 0?!1:e===void 0?Hu[n]:(Hu[n]=e,n==="s"&&(Hu.ss=e-1),!0)}function lee(n,e){if(!this.isValid())return this.localeData().invalidDate();var t=!1,o=Hu,i,s;return typeof n=="object"&&(e=n,n=!1),typeof n=="boolean"&&(t=n),typeof e=="object"&&(o=Object.assign({},Hu,e),e.s!=null&&e.ss==null&&(o.ss=e.s-1)),i=this.localeData(),s=see(this,!t,o,i),t&&(s=i.pastFuture(+this,s)),i.postformat(s)}var KS=Math.abs;function Sd(n){return(n>0)-(n<0)||+n}function a_(){if(!this.isValid())return this.localeData().invalidDate();var n=KS(this._milliseconds)/1e3,e=KS(this._days),t=KS(this._months),o,i,s,r,a=this.asSeconds(),l,h,c,d;return a?(o=vs(n/60),i=vs(o/60),n%=60,o%=60,s=vs(t/12),t%=12,r=n?n.toFixed(3).replace(/\.?0+$/,""):"",l=a<0?"-":"",h=Sd(this._months)!==Sd(a)?"-":"",c=Sd(this._days)!==Sd(a)?"-":"",d=Sd(this._milliseconds)!==Sd(a)?"-":"",l+"P"+(s?h+s+"Y":"")+(t?h+t+"M":"")+(e?c+e+"D":"")+(i||o||n?"T":"")+(i?d+i+"H":"")+(o?d+o+"M":"")+(n?d+r+"S":"")):"P0D"}var mt=s_.prototype;mt.isValid=tQ;mt.abs=DJ;mt.add=NJ;mt.subtract=PJ;mt.as=WJ;mt.asMilliseconds=Cz;mt.asSeconds=$J;mt.asMinutes=FJ;mt.asHours=BJ;mt.asDays=VJ;mt.asWeeks=zJ;mt.asMonths=UJ;mt.asQuarters=YJ;mt.asYears=GJ;mt.valueOf=jJ;mt._bubble=LJ;mt.clone=qJ;mt.get=KJ;mt.milliseconds=XJ;mt.seconds=ZJ;mt.minutes=QJ;mt.hours=JJ;mt.days=eee;mt.weeks=oee;mt.months=tee;mt.years=nee;mt.humanize=lee;mt.toISOString=a_;mt.toString=a_;mt.toJSON=a_;mt.locale=rz;mt.localeData=lz;mt.toIsoString=xs("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",a_);mt.lang=az;xe("X",0,0,"unix");xe("x",0,0,"valueOf");ge("x",t_);ge("X",MX);Ft("X",function(n,e,t){t._d=new Date(parseFloat(n)*1e3)});Ft("x",function(n,e,t){t._d=new Date(dt(n))});Z.version="2.30.1";hX(tn);Z.fn=Q;Z.min=ZZ;Z.max=QZ;Z.now=JZ;Z.utc=sa;Z.unix=TJ;Z.months=MJ;Z.isDate=Wm;Z.locale=lh;Z.invalid=Zy;Z.duration=yr;Z.isMoment=Cr;Z.weekdays=HJ;Z.parseZone=xJ;Z.localeData=fl;Z.isDuration=Gb;Z.monthsShort=IJ;Z.weekdaysMin=OJ;Z.defineLocale=Ox;Z.updateLocale=xZ;Z.locales=MZ;Z.weekdaysShort=AJ;Z.normalizeUnits=Ms;Z.relativeTimeRounding=ree;Z.relativeTimeThreshold=aee;Z.calendarFormat=RQ;Z.prototype=Q;Z.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"};const th=()=>window,_s=()=>window.document,KE=(n,e)=>window.setTimeout(n,e),Ar=function(n,e,t,o){n.addEventListener(e,t,!!o)},_a=function(n,e,t,o){n.removeEventListener(e,t,!!o)},hee=function(n){return n.trim?n.trim():n.replace(/^\s+|\s+$/g,"")},Ui=function(n,e){return(" "+n.className+" ").indexOf(" "+e+" ")!==-1},XS=function(n,e){Ui(n,e)||(n.className=n.className===""?e:n.className+" "+e)},ZS=function(n,e){n.className=hee((" "+n.className+" ").replace(" "+e+" "," "))},Vx=function(n){return/Array/.test(Object.prototype.toString.call(n))},qi=function(n){return/Date/.test(Object.prototype.toString.call(n))&&!isNaN(n.getTime())},cee=function(n){let e=n.getDay();return e===0||e===6},dee=function(n){return n%4===0&&n%100!==0||n%400===0},zA=function(n,e){return[31,dee(n)?29:28,31,30,31,30,31,31,30,31,30,31][e]},Hw=function(n){qi(n)&&n.setHours(0,0,0,0)},Aw=function(n,e){return n.getTime()===e.getTime()},GC=function(n,e,t){let o,i;for(o in e)i=n[o]!==void 0,i&&typeof e[o]=="object"&&e[o]!==null&&e[o].nodeName===void 0?qi(e[o])?t&&(n[o]=new Date(e[o].getTime())):Vx(e[o])?t&&(n[o]=e[o].slice(0)):n[o]=GC({},e[o],t):(t||!i)&&(n[o]=e[o]);return n},UA=function(n,e,t){let o=_s().createEvent("HTMLEvents");o.initEvent(e,!0,!1),o=GC(o,t),n.dispatchEvent(o)},YA=function(n){return n.month<0&&(n.year-=Math.ceil(Math.abs(n.month)/12),n.month+=12),n.month>11&&(n.year+=Math.floor(Math.abs(n.month)/12),n.month-=12),n},Rr={field:null,bound:void 0,ariaLabel:"Use the arrow keys to pick a date",position:"bottom left",reposition:!0,format:"YYYY-MM-DD",toString:null,parse:null,defaultDate:null,setDefaultDate:!1,firstDay:0,firstWeekOfYearMinDays:4,formatStrict:!1,minDate:null,maxDate:null,yearRange:10,showWeekNumber:!1,pickWholeWeek:!1,minYear:0,maxYear:9999,minMonth:void 0,maxMonth:void 0,startRange:null,endRange:null,isRTL:!1,yearSuffix:"",showMonthAfterYear:!1,showDaysInNextAndPreviousMonths:!1,enableSelectionDaysInNextAndPreviousMonths:!1,numberOfMonths:1,mainCalendar:"left",container:void 0,blurFieldOnSelect:!0,i18n:{previousMonth:"Previous Month",nextMonth:"Next Month",months:["January","February","March","April","May","June","July","August","September","October","November","December"],weekdays:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],weekdaysShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"]},theme:null,events:[],onSelect:null,onOpen:null,onClose:null,onDraw:null,keyboardInput:!0},GA=function(n,e,t){for(e+=n.firstDay;e>=7;)e-=7;return t?n.i18n.weekdaysShort[e]:n.i18n.weekdays[e]},uee=function(n){let e=[],t="false";if(n.isEmpty)if(n.showDaysInNextAndPreviousMonths)e.push("is-outside-current-month"),n.enableSelectionDaysInNextAndPreviousMonths||e.push("is-selection-disabled");else return'<td class="is-empty"></td>';return n.isDisabled&&e.push("is-disabled"),n.isToday&&e.push("is-today"),n.isSelected&&(e.push("is-selected"),t="true"),n.hasEvent&&e.push("has-event"),n.isInRange&&e.push("is-inrange"),n.isStartRange&&e.push("is-startrange"),n.isEndRange&&e.push("is-endrange"),'<td data-day="'+n.day+'" class="'+e.join(" ")+'" aria-selected="'+t+'"><button class="pika-button pika-day" type="button" data-pika-year="'+n.year+'" data-pika-month="'+n.month+'" data-pika-day="'+n.day+'">'+n.day+"</button></td>"},fee=function(n,e){n.setHours(0,0,0,0);let t=n.getDate(),o=n.getDay(),i=e,s=i-1,r=7,a=function(u){return(u+r-1)%r};n.setDate(t+s-a(o));let l=new Date(n.getFullYear(),0,i),h=1440*60*1e3,c=(n.getTime()-l.getTime())/h;return 1+Math.round((c-s+a(l.getDay()))/r)},gee=function(n,e,t,o,i){let s=new Date(o,t,e);return'<td class="pika-week">'+(n.hasMoment?n.moment(s).isoWeek():fee(s,i))+"</td>"},pee=function(n,e,t,o){return'<tr class="pika-row'+(t?" pick-whole-week":"")+(o?" is-selected":"")+'">'+(e?n.reverse():n).join("")+"</tr>"},mee=function(n){return"<tbody>"+n.join("")+"</tbody>"},wee=function(n){let e,t=[];for(n.showWeekNumber&&t.push("<th></th>"),e=0;e<7;e++)t.push('<th scope="col"><abbr title="'+GA(n,e)+'">'+GA(n,e,!0)+"</abbr></th>");return"<thead><tr>"+(n.isRTL?t.reverse():t).join("")+"</tr></thead>"},bee=function(n,e,t,o,i,s){let r,a,l,h=n._o,c=t===h.minYear,d=t===h.maxYear,u='<div id="'+s+'" class="pika-title" role="heading" aria-live="polite">',f,p,C=!0,_=!0;for(l=[],r=0;r<12;r++)l.push('<option value="'+(t===i?r-e:12+r-e)+'"'+(r===o?' selected="selected"':"")+(c&&r<h.minMonth||d&&r>h.maxMonth?' disabled="disabled"':"")+">"+h.i18n.months[r]+"</option>");for(f='<div class="pika-label">'+h.i18n.months[o]+'<select class="pika-select pika-select-month" tabindex="-1">'+l.join("")+"</select></div>",Vx(h.yearRange)?(r=h.yearRange[0],a=h.yearRange[1]+1):(r=t-h.yearRange,a=1+t+h.yearRange),l=[];r<a&&r<=h.maxYear;r++)r>=h.minYear&&l.push('<option value="'+r+'"'+(r===t?' selected="selected"':"")+">"+r+"</option>");return p='<div class="pika-label">'+t+h.yearSuffix+'<select class="pika-select pika-select-year" tabindex="-1">'+l.join("")+"</select></div>",h.showMonthAfterYear?u+=p+f:u+=f+p,c&&(o===0||h.minMonth>=o)&&(C=!1),d&&(o===11||h.maxMonth<=o)&&(_=!1),e===0&&(u+='<button class="pika-prev'+(C?"":" is-disabled")+'" type="button">'+h.i18n.previousMonth+"</button>"),e===n._o.numberOfMonths-1&&(u+='<button class="pika-next'+(_?"":" is-disabled")+'" type="button">'+h.i18n.nextMonth+"</button>"),u+="</div>"},Cee=function(n,e,t){return'<table cellpadding="0" cellspacing="0" class="pika-table" role="grid" aria-labelledby="'+t+'">'+wee(n)+mee(e)+"</table>"};function XE(n){let e=this,t=e.config(n);e._onMouseDown=function(i){if(!e._v)return;i=i||th().event;let s=i.target||i.srcElement;if(s)if(Ui(s,"is-disabled")||(Ui(s,"pika-button")&&!Ui(s,"is-empty")&&!Ui(s.parentNode,"is-disabled")?(e.setDate(new Date(s.getAttribute("data-pika-year"),s.getAttribute("data-pika-month"),s.getAttribute("data-pika-day"))),t.bound&&KE(function(){e.hide(),t.blurFieldOnSelect&&t.field&&t.field.blur()},100)):Ui(s,"pika-prev")?e.prevMonth():Ui(s,"pika-next")&&e.nextMonth()),Ui(s,"pika-select"))e._c=!0;else if(i.preventDefault)i.preventDefault();else return i.returnValue=!1,!1},e._onChange=function(i){i=i||th().event;let s=i.target||i.srcElement;s&&(Ui(s,"pika-select-month")?e.gotoMonth(s.value):Ui(s,"pika-select-year")&&e.gotoYear(s.value))},e._onKeyChange=function(i){if(i=i||th().event,e.isVisible())switch(i.keyCode){case 13:case 27:t.field&&t.field.blur();break;case 37:e.adjustDate("subtract",1);break;case 38:e.adjustDate("subtract",7);break;case 39:e.adjustDate("add",1);break;case 40:e.adjustDate("add",7);break;case 8:case 46:e.setDate(null);break}},e._parseFieldValue=function(){if(t.parse)return t.parse(t.field.value,t.format);if(this.hasMoment){let i=this.moment(t.field.value,t.format,t.formatStrict);return i&&i.isValid()?i.toDate():null}else return new Date(Date.parse(t.field.value))},e._onInputChange=function(i){let s;i.firedBy!==e&&(s=e._parseFieldValue(),qi(s)&&e.setDate(s),e._v||e.show())},e._onInputFocus=function(){e.show()},e._onInputClick=function(){e.show()},e._onInputBlur=function(){let i=_s().activeElement;do if(Ui(i,"pika-single"))return;while(i=i.parentNode);e._c||(e._b=KE(function(){e.hide()},50)),e._c=!1},e._onClick=function(i){i=i||th().event;let s=i.target||i.srcElement,r=s;if(s){!hasEventListeners&&Ui(s,"pika-select")&&(s.onchange||(s.setAttribute("onchange","return;"),Ar(s,"change",e._onChange)));do if(Ui(r,"pika-single")||r===t.trigger)return;while(r=r.parentNode);e._v&&s!==t.trigger&&r!==t.trigger&&e.hide()}},e.el=_s().createElement("div"),e.el.className="pika-single"+(t.isRTL?" is-rtl":"")+(t.theme?" "+t.theme:""),Ar(e.el,"mousedown",e._onMouseDown,!0),Ar(e.el,"touchend",e._onMouseDown,!0),Ar(e.el,"change",e._onChange),t.keyboardInput&&Ar(_s(),"keydown",e._onKeyChange),t.field&&(t.container?t.container.appendChild(e.el):t.bound?_s().body.appendChild(e.el):t.field.parentNode.insertBefore(e.el,t.field.nextSibling),Ar(t.field,"change",e._onInputChange),t.defaultDate||(t.defaultDate=e._parseFieldValue(),t.setDefaultDate=!0));let o=t.defaultDate;qi(o)?t.setDefaultDate?e.setDate(o,!0):e.gotoDate(o):e.gotoDate(new Date),t.bound?(this.hide(),e.el.className+=" is-bound",Ar(t.trigger,"click",e._onInputClick),Ar(t.trigger,"focus",e._onInputFocus),Ar(t.trigger,"blur",e._onInputBlur)):this.show()}XE.prototype={config:function(n){this._o||(this._o=GC({},Rr,!0));let e=GC(this._o,n,!0);e.isRTL=!!e.isRTL,e.field=e.field&&e.field.nodeName?e.field:null,e.theme=typeof e.theme=="string"&&e.theme?e.theme:null,e.bound=!!(e.bound!==void 0?e.field&&e.bound:e.field),e.trigger=e.trigger&&e.trigger.nodeName?e.trigger:e.field,e.disableWeekends=!!e.disableWeekends,e.disableDayFn=typeof e.disableDayFn=="function"?e.disableDayFn:null;let t=parseInt(e.numberOfMonths,10)||1;if(e.numberOfMonths=t>4?4:t,qi(e.minDate)||(e.minDate=!1),qi(e.maxDate)||(e.maxDate=!1),e.minDate&&e.maxDate&&e.maxDate<e.minDate&&(e.maxDate=e.minDate=!1),e.minDate&&this.setMinDate(e.minDate),e.maxDate&&this.setMaxDate(e.maxDate),Vx(e.yearRange)){let o=new Date().getFullYear()-10;e.yearRange[0]=parseInt(e.yearRange[0],10)||o,e.yearRange[1]=parseInt(e.yearRange[1],10)||o}else e.yearRange=Math.abs(parseInt(e.yearRange,10))||Rr.yearRange,e.yearRange>100&&(e.yearRange=100);return e},toString:function(n){return n=n||this._o.format,qi(this._d)?this._o.toString?this._o.toString(this._d,n):this.hasMoment?this.moment(this._d).format(n):this._d.toDateString():""},getMoment:function(){return this.hasMoment?this.moment(this._d):null},setMoment:function(n,e){this.hasMoment&&this.moment.isMoment(n)&&this.setDate(n.toDate(),e)},useMoment:function(n){this.hasMoment=!0,this.moment=n},getDate:function(){return qi(this._d)?new Date(this._d.getTime()):null},setDate:function(n,e){if(!n)return this._d=null,this._o.field&&(this._o.field.value="",UA(this._o.field,"change",{firedBy:this})),this.draw();if(typeof n=="string"&&(n=new Date(Date.parse(n))),!qi(n))return;let t=this._o.minDate,o=this._o.maxDate;qi(t)&&n<t?n=t:qi(o)&&n>o&&(n=o),this._d=new Date(n.getTime()),Hw(this._d),this.gotoDate(this._d),this._o.field&&(this._o.field.value=this.toString(),UA(this._o.field,"change",{firedBy:this})),!e&&typeof this._o.onSelect=="function"&&this._o.onSelect.call(this,this.getDate())},clear:function(){this.setDate(null)},gotoDate:function(n){let e=!0;if(qi(n)){if(this.calendars){let t=new Date(this.calendars[0].year,this.calendars[0].month,1),o=new Date(this.calendars[this.calendars.length-1].year,this.calendars[this.calendars.length-1].month,1),i=n.getTime();o.setMonth(o.getMonth()+1),o.setDate(o.getDate()-1),e=i<t.getTime()||o.getTime()<i}e&&(this.calendars=[{month:n.getMonth(),year:n.getFullYear()}],this._o.mainCalendar==="right"&&(this.calendars[0].month+=1-this._o.numberOfMonths)),this.adjustCalendars()}},adjustDate:function(n,e){let t=this.getDate()||new Date,o=parseInt(e)*24*60*60*1e3,i;n==="add"?i=new Date(t.valueOf()+o):n==="subtract"&&(i=new Date(t.valueOf()-o)),this.setDate(i)},adjustCalendars:function(){this.calendars[0]=YA(this.calendars[0]);for(let n=1;n<this._o.numberOfMonths;n++)this.calendars[n]=YA({month:this.calendars[0].month+n,year:this.calendars[0].year});this.draw()},gotoToday:function(){this.gotoDate(new Date)},gotoMonth:function(n){isNaN(n)||(this.calendars[0].month=parseInt(n,10),this.adjustCalendars())},nextMonth:function(){this.calendars[0].month++,this.adjustCalendars()},prevMonth:function(){this.calendars[0].month--,this.adjustCalendars()},gotoYear:function(n){isNaN(n)||(this.calendars[0].year=parseInt(n,10),this.adjustCalendars())},setMinDate:function(n){n instanceof Date?(Hw(n),this._o.minDate=n,this._o.minYear=n.getFullYear(),this._o.minMonth=n.getMonth()):(this._o.minDate=Rr.minDate,this._o.minYear=Rr.minYear,this._o.minMonth=Rr.minMonth,this._o.startRange=Rr.startRange),this.draw()},setMaxDate:function(n){n instanceof Date?(Hw(n),this._o.maxDate=n,this._o.maxYear=n.getFullYear(),this._o.maxMonth=n.getMonth()):(this._o.maxDate=Rr.maxDate,this._o.maxYear=Rr.maxYear,this._o.maxMonth=Rr.maxMonth,this._o.endRange=Rr.endRange),this.draw()},setStartRange:function(n){this._o.startRange=n},setEndRange:function(n){this._o.endRange=n},draw:function(n){if(!this._v&&!n)return;let e=this._o,t=e.minYear,o=e.maxYear,i=e.minMonth,s=e.maxMonth,r="",a;this._y<=t&&(this._y=t,!isNaN(i)&&this._m<i&&(this._m=i)),this._y>=o&&(this._y=o,!isNaN(s)&&this._m>s&&(this._m=s));for(let l=0;l<e.numberOfMonths;l++)a="pika-title-"+Math.random().toString(36).replace(/[^a-z]+/g,"").substr(0,2),r+='<div class="pika-lendar">'+bee(this,l,this.calendars[l].year,this.calendars[l].month,this.calendars[0].year,a)+this.render(this.calendars[l].year,this.calendars[l].month,a)+"</div>";this.el.innerHTML=r,e.bound&&e.field.type!=="hidden"&&KE(function(){e.trigger.focus()},1),typeof this._o.onDraw=="function"&&this._o.onDraw(this),e.bound&&e.field.setAttribute("aria-label",e.ariaLabel)},adjustPosition:function(){let n,e,t,o,i,s,r,a,l,h,c;this._o.container||(this.el.style.position="absolute",n=this._o.trigger,e=this.el.offsetWidth,t=this.el.offsetHeight,o=th().innerWidth||_s().documentElement.clientWidth,i=th().innerHeight||_s().documentElement.clientHeight,s=_s().body.scrollTop||_s().documentElement.scrollTop,h=!0,c=!0,l=n.getBoundingClientRect(),r=l.left+th().pageXOffset,a=l.bottom+th().pageYOffset,(this._o.reposition&&r+e>o||this._o.position.indexOf("right")>-1&&r-e+n.offsetWidth>0)&&(r=r-e+n.offsetWidth,h=!1),(this._o.reposition&&a+t>i+s||this._o.position.indexOf("top")>-1&&a-t-n.offsetHeight>0)&&(a=a-t-n.offsetHeight,c=!1),r<0&&(r=0),a<0&&(a=0),this.el.style.left=r+"px",this.el.style.top=a+"px",XS(this.el,h?"left-aligned":"right-aligned"),XS(this.el,c?"bottom-aligned":"top-aligned"),ZS(this.el,h?"right-aligned":"left-aligned"),ZS(this.el,c?"top-aligned":"bottom-aligned"))},render:function(n,e,t){let o=this._o,i=new Date,s=zA(n,e),r=new Date(n,e,1).getDay(),a=[],l=[];Hw(i),o.firstDay>0&&(r-=o.firstDay,r<0&&(r+=7));let h=e===0?11:e-1,c=e===11?0:e+1,d=e===0?n-1:n,u=e===11?n+1:n,f=zA(d,h),p=s+r,C=p;for(;C>7;)C-=7;p+=7-C;let _=!1;for(let S=0,T=0;S<p;S++){let P=new Date(n,e,1+(S-r)),F=qi(this._d)?Aw(P,this._d):!1,V=Aw(P,i),D=o.events.indexOf(P.toDateString())!==-1,I=S<r||S>=s+r,G=1+(S-r),z=e,Y=n,te=o.startRange&&Aw(o.startRange,P),ee=o.endRange&&Aw(o.endRange,P),be=o.startRange&&o.endRange&&o.startRange<P&&P<o.endRange,me=o.minDate&&P<o.minDate||o.maxDate&&P>o.maxDate||o.disableWeekends&&cee(P)||o.disableDayFn&&o.disableDayFn(P);I&&(S<r?(G=f+G,z=h,Y=d):(G=G-s,z=c,Y=u));let Ve={day:G,month:z,year:Y,hasEvent:D,isSelected:F,isToday:V,isDisabled:me,isEmpty:I,isStartRange:te,isEndRange:ee,isInRange:be,showDaysInNextAndPreviousMonths:o.showDaysInNextAndPreviousMonths,enableSelectionDaysInNextAndPreviousMonths:o.enableSelectionDaysInNextAndPreviousMonths};o.pickWholeWeek&&F&&(_=!0),l.push(uee(Ve)),++T===7&&(o.showWeekNumber&&l.unshift(gee(this,S-r,e,n,o.firstWeekOfYearMinDays)),a.push(pee(l,o.isRTL,o.pickWholeWeek,_)),l=[],T=0,_=!1)}return Cee(o,a,t)},isVisible:function(){return this._v},show:function(){this.isVisible()||(this._v=!0,this.draw(),ZS(this.el,"is-hidden"),this._o.bound&&(Ar(_s(),"click",this._onClick),this.adjustPosition()),typeof this._o.onOpen=="function"&&this._o.onOpen.call(this))},hide:function(){let n=this._v;n!==!1&&(this._o.bound&&_a(_s(),"click",this._onClick),this._o.container||(this.el.style.position="static",this.el.style.left="auto",this.el.style.top="auto"),XS(this.el,"is-hidden"),this._v=!1,n!==void 0&&typeof this._o.onClose=="function"&&this._o.onClose.call(this))},destroy:function(){let n=this._o;this.hide(),_a(this.el,"mousedown",this._onMouseDown,!0),_a(this.el,"touchend",this._onMouseDown,!0),_a(this.el,"change",this._onChange),n.keyboardInput&&_a(_s(),"keydown",this._onKeyChange),n.field&&(_a(n.field,"change",this._onInputChange),n.bound&&(_a(n.trigger,"click",this._onInputClick),_a(n.trigger,"focus",this._onInputFocus),_a(n.trigger,"blur",this._onInputBlur))),this.el.parentNode&&this.el.parentNode.removeChild(this.el)}};function yee(n,e){if(e.has(n))throw new TypeError("Cannot initialize the same private elements twice on an object")}function QS(n,e,t){if(!e.has(n))throw new TypeError("attempted to get private field on non-instance");return t}function _ee(n,e){yee(n,e),e.add(n)}const yz="date",jA="dateEditor",See="DD/MM/YYYY",qA=new WeakSet;var Ow=new WeakSet;class _z extends ul{static get EDITOR_TYPE(){return yz}init(){typeof Z!="function"&&U("You need to include moment.js to your project."),typeof XE!="function"&&U("You need to include Pikaday to your project."),super.init(),this.hot.addHook("afterDestroy",()=>{this.parentDestroyed=!0,this.destroyElements()}),this.hot.addHook("afterSetTheme",(e,t)=>{t||this.close()})}createElements(){super.createElements(),this.datePicker=this.hot.rootDocument.createElement("DIV"),this.datePickerStyle=this.datePicker.style,this.datePickerStyle.position="absolute",this.datePickerStyle.top=0,this.datePickerStyle.left=0,this.datePickerStyle.zIndex=9999,this.datePicker.setAttribute("dir",this.hot.isRtl()?"rtl":"ltr"),B(this.datePicker,"htDatepickerHolder"),this.hot.rootPortalElement.appendChild(this.datePicker),this.eventManager.addEventListener(this.datePicker,"mousedown",e=>{_e(e.target,"pika-day")&&this.hideDatepicker(),e.stopPropagation()})}destroyElements(){const e=this.datePicker.parentNode;this.$datePicker&&this.$datePicker.destroy(),e&&e.removeChild(this.datePicker)}prepare(e,t,o,i,s,r){super.prepare(e,t,o,i,s,r)}open(e=null){qA.has(this.cellProperties.instance)||(qA.add(this.cellProperties.instance),fh("The Pikaday-based `date` editor is deprecated and will be removed in the next major release, replaced by the native HTML date input.\n\nMigration guide: https://handsontable.com/docs/migration-from-16.2-to-17.0/\n`date` cell type documentation: https://handsontable.com/docs/date-cell-type/"));const o=this.hot.getShortcutManager().getContext("editor");this.showDatepicker(e),super.open(),o.addShortcuts([{keys:[["ArrowLeft"]],callback:()=>{this.$datePicker.adjustDate("subtract",1)}},{keys:[["ArrowRight"]],callback:()=>{this.$datePicker.adjustDate("add",1)}},{keys:[["ArrowUp"]],callback:()=>{this.$datePicker.adjustDate("subtract",7)}},{keys:[["ArrowDown"]],callback:()=>{this.$datePicker.adjustDate("add",7)}}],{group:jA})}close(){this.$datePicker?.destroy&&this.$datePicker.destroy(),this.hot._registerTimeout(()=>{const o=this.hot._getEditorManager();o.closeEditor(),this.hot.view.render(),o.prepareEditor()}),this.hot.getShortcutManager().getContext("editor").removeShortcutsByGroup(jA),super.close()}finishEditing(e=!1,t=!1){super.finishEditing(e,t)}showDatepicker(e){const t=QS(this,Ow,JS).call(this),o=this.hot.view.isMouseDown(),i=e?pF(e.keyCode):!1;let s;this.datePicker.style.display="block",this.$datePicker=new XE(this.getDatePickerConfig()),typeof this.$datePicker.useMoment=="function"&&this.$datePicker.useMoment(Z),this.$datePicker._onInputFocus=function(){},this.originalValue?(s=this.originalValue,Z(s,t,!0).isValid()&&this.$datePicker.setMoment(Z(s,t),!0),this.getValue()!==this.originalValue&&this.setValue(this.originalValue),!i&&!o&&this.setValue("")):this.cellProperties.defaultDate?(s=this.cellProperties.defaultDate,Z(s,t,!0).isValid()&&this.$datePicker.setMoment(Z(s,t),!0),!i&&!o&&this.setValue("")):this.$datePicker.gotoToday()}hideDatepicker(){this.datePickerStyle.display="none",this.$datePicker.hide()}getDatePickerConfig(){const e=this.TEXTAREA,t={};this.cellProperties&&this.cellProperties.datePickerConfig&&Hy(t,this.cellProperties.datePickerConfig);const o=t.onSelect,i=t.onClose;return t.field=e,t.trigger=e,t.container=this.datePicker,t.bound=!1,t.keyboardInput=!1,t.format=t.format??QS(this,Ow,JS).call(this),t.reposition=t.reposition||!1,t.isRTL=!1,t.onSelect=s=>{let r=s;isNaN(r.getTime())||(r=Z(r).format(QS(this,Ow,JS).call(this))),this.setValue(r),o&&o(),qr()&&this.hideDatepicker()},t.onClose=()=>{this.parentDestroyed||this.finishEditing(!1),i&&i()},t}refreshDimensions(e){if(super.refreshDimensions(e),this.state!==kn.EDITING)return;if(this.TD=this.getEditedCell(),!this.TD){this.hideDatepicker();return}const{rowIndexMapper:t,columnIndexMapper:o}=this.hot,{wtOverlays:i}=this.hot.view._wt,{wtTable:s}=i.getParentOverlay(this.TD)??this.hot.view._wt,r=t.getVisualFromRenderableIndex(s.getFirstPartiallyVisibleRow()),a=t.getVisualFromRenderableIndex(s.getLastPartiallyVisibleRow()),l=o.getVisualFromRenderableIndex(s.getFirstPartiallyVisibleColumn()),h=o.getVisualFromRenderableIndex(s.getLastPartiallyVisibleColumn());if(this.row>=r&&this.row<=a&&this.col>=l&&this.col<=h){const c=this.TD.getBoundingClientRect(),d=bn(this.datePicker),u=Tn(this.datePicker),f=Tn(this.TD),p=this.hot.rootWindow,C=this.hot.rootDocument.documentElement,_=p.pageYOffset,S=p.pageYOffset+C.clientHeight,T=p.pageXOffset,P=p.pageXOffset+C.clientWidth;let F=_+c.top+f;if(F+u>S){const G=_+c.top-u;F=G>=_?Math.max(_,G-1):S-u}this.datePickerStyle.top=`${F}px`;const V=T+c.left,D=T+c.right;let I;this.hot.isRtl()?(I=D-d,I<T&&(I=Math.min(V,P-d))):(I=V,I+d>P&&(I=Math.max(D-d,T))),I=et(I,T,P-d),this.datePickerStyle.left=`${I}px`}else this.hideDatepicker()}constructor(...e){super(...e),_ee(this,Ow),this.parentDestroyed=!1,this.$datePicker=null}}function JS(){return this.cellProperties.dateFormat??See}const vee="dropdown";class Sz extends Cx{static get EDITOR_TYPE(){return vee}prepare(e,t,o,i,s,r){r.filter=!1,r.strict=!0,super.prepare(e,t,o,i,s,r)}finishEditing(e,t,o){if(this.isOpened()){const i=this.hot.getSelectedRangeActive();(Jt(i)||J(i)&&!i.includes(this.hot._createCellCoords(this.row,this.col)))&&(e=!0)}super.finishEditing(e,t,o)}}const vz=/^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12]\d|3[01])$/;function Ree(n){const e=new Date(n);return isNaN(new Date(`${n}T00:00`).getDate())?e:new Date(e.getTime()+e.getTimezoneOffset()*6e4)}function ta(n){if(ht(n))return null;if(typeof n=="string"&&vz.test(n)){const[e,t,o]=n.split("-").map(Number);return new Date(e,t-1,o)}return null}function zx(n){if(typeof n!="string"||!vz.test(n))return!1;const e=new Date(n);return!Number.isNaN(e.getTime())&&n===e.toISOString().slice(0,10)}const Rz=/^([01]\d|2[0-3]):([0-5]\d)(?::([0-5]\d)(?:\.(\d{1,3}))?)?$/;function Kc(n){if(ht(n)||typeof n!="string")return null;const e=Rz.exec(n);if(!e)return null;const t=Number(e[1]),o=Number(e[2]),i=e[3]!==void 0?Number(e[3]):0,s=e[4],r=s!==void 0?Number(s.padEnd(3,"0").slice(0,3)):0;return new Date(1970,0,1,t,o,i,r)}function Ux(n){return typeof n=="string"&&Rz.test(n)}const Eee="intl-date";class Ez extends ul{static get EDITOR_TYPE(){return Eee}init(){super.init(),this.hot.addHook("afterSetTheme",(e,t)=>{t||this.close()})}createElements(){super.createElements("input"),this.TEXTAREA.setAttribute("type","date")}setValue(e){if(ht(e)&&(e=this.cellProperties.defaultDate),!zx(e)){Ie(pt`IntlDateEditor: value must be in ISO date format ("YYYY-MM-DD")\x20
|
|
215
|
+
required by the native date input. Received:`,e);return}super.setValue(e)}focus(){this.TEXTAREA.select()}open(){super.open();try{this.TEXTAREA.showPicker()}catch{}}}const kee="intl-time";class kz extends ul{static get EDITOR_TYPE(){return kee}init(){super.init(),this.hot.addHook("afterSetTheme",(e,t)=>{t||this.close()})}createElements(){super.createElements("input"),this.TEXTAREA.setAttribute("type","time")}setValue(e){if(!Ux(e)){Ie(pt`IntlTimeEditor: value must be in 24-hour time format ("HH:mm", "HH:mm:ss" or "HH:mm:ss.SSS")\x20
|
|
216
|
+
required by the native time input. Received:`,e);return}super.setValue(e)}focus(){this.TEXTAREA.select()}open(){super.open();try{this.TEXTAREA.showPicker()}catch{}}}const Tee="numeric";class Tz extends ul{static get EDITOR_TYPE(){return Tee}}const xee="password";class xz extends ul{static get EDITOR_TYPE(){return xee}createElements(){super.createElements(),this.TEXTAREA=this.hot.rootDocument.createElement("input"),this.TEXTAREA.setAttribute("type","password"),this.TEXTAREA.setAttribute("data-hot-input",""),this.TEXTAREA.className="handsontableInput",this.textareaStyle=this.TEXTAREA.style,this.textareaStyle.width=0,this.textareaStyle.height=0,ol(this.TEXTAREA_PARENT),this.TEXTAREA.setAttribute(...wr(-1)),this.TEXTAREA_PARENT.appendChild(this.TEXTAREA)}constructor(...e){super(...e),this.autoResize=hV(this.hot.rootDocument,{textContent:t=>"•".repeat(t.value.length)})}}const ev="ht_editor_visible",KA="selectEditor",Mee="select";class Mz extends td{static get EDITOR_TYPE(){return Mee}init(){this.selectWrapper=this.hot.rootDocument.createElement("div"),this.select=this.hot.rootDocument.createElement("select"),this.select.setAttribute("data-hot-input","true"),this.selectWrapper.style.display="none";const e=this.hot.rootDocument.createElement("DIV"),t=this.hot.getSettings().ariaTags;e.className="htAutocompleteArrow",t&&e.setAttribute(...al()),e.appendChild(this.hot.rootDocument.createTextNode("▼")),B(this.selectWrapper,"htSelectEditor"),this.selectWrapper.appendChild(this.select),this.selectWrapper.insertBefore(e,this.selectWrapper.firstChild),this.hot.rootElement.appendChild(this.selectWrapper),this.registerHooks()}getValue(){return this.select.value}setValue(e){this.select.value=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",_e(this.selectWrapper,ev)&&oe(this.selectWrapper,ev),this.unregisterShortcuts(),this.clearHooks()}focus(){this.select.focus()}registerHooks(){this.addHook("afterScrollHorizontally",()=>this.refreshDimensions()),this.addHook("afterScrollVertically",()=>this.refreshDimensions()),this.addHook("afterColumnResize",()=>this.refreshDimensions()),this.addHook("afterRowResize",()=>this.refreshDimensions())}prepare(e,t,o,i,s,r){super.prepare(e,t,o,i,s,r);const a=this.cellProperties.selectOptions;let l;typeof a=="function"?l=this.prepareOptions(a(this.row,this.col,this.prop)):l=this.prepareOptions(a),ol(this.select),tt(l,(h,c)=>{const d=this.hot.rootDocument.createElement("OPTION");d.value=c,Qc(d,h,this.hot.getSettings().sanitizer),this.select.appendChild(d)})}prepareOptions(e){let t={};if(Array.isArray(e))for(let o=0,i=e.length;o<i;o++)t[e[o]]=e[o];else typeof e=="object"&&(t=e);return t}refreshValue(){const e=this.hot.getSourceDataAtCell(this.row,this.prop);this.originalValue=e,this.setValue(e),this.refreshDimensions()}refreshDimensions(){if(this.state!==kn.EDITING)return;if(this.TD=this.getEditedCell(),!this.TD){this.close();return}const{top:e,start:t,width:o,height:i}=this.getEditedCellRect(),s=this.selectWrapper.style;s.height=`${i}px`,s.width=`${o}px`,s.top=`${e}px`,s[this.hot.isRtl()?"right":"left"]=`${t}px`,s.margin="0px",B(this.selectWrapper,ev)}registerShortcuts(){const t=this.hot.getShortcutManager().getContext("editor"),o={group:KA};this.isInFullEditMode()&&t.addShortcuts([{keys:[["ArrowUp"]],callback:()=>{const i=this.select.selectedIndex-1;i>=0&&(this.select[i].selected=!0)}},{keys:[["ArrowDown"]],callback:()=>{const i=this.select.selectedIndex+1;i<=this.select.length-1&&(this.select[i].selected=!0)}}],o)}unregisterShortcuts(){this.hot.getShortcutManager().getContext("editor").removeShortcutsByGroup(KA)}}const Iee="time";class Iz extends ul{static get EDITOR_TYPE(){return Iee}prepare(e,t,o,i,s,r){super.prepare(e,t,o,i,s,r),this.TEXTAREA.dir="ltr"}}function pf(n){return n.querySelector('input[type="checkbox"]')}function Hee(n){return z$(n)?JSON.parse(n):n}function Aee(n,e){return dG(n,e,(t,o)=>JSON.stringify(t)===JSON.stringify(o))}function Hz(n,e){return Ln(e)?Array.isArray(n)&&n.some(t=>Ln(t)?uh(t,e):t===e):n.includes(e)}function Oee(n,e){if(e.has(n))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Dee(n,e,t){if(!e.has(n))throw new TypeError("attempted to get private field on non-instance");return t}function Nee(n,e){Oee(n,e),e.add(n)}var XA=new WeakSet;class Az{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(){Dee(this,XA,Pee).call(this,this.input.value)}constructor({input:e,eventManager:t}){Nee(this,XA),this.input=e,this.eventManager=t,this.enabled=!0,this.onInput=this.onInput.bind(this)}}function Pee(n){this.runLocalHooks("triggerFilter",n)}Ct(Az,$n);const mf="ht-multi-select-editor",Lee=`${mf}-search-input-wrapper`,Wee=`${mf}-search-icon`,ZA=`${mf}-search-input`,$ee=`${mf}-separator`,Fee="Search...",Bee="Search options",Vee=`${mf}-item-`,Yx=`${mf}-item-selected`;function Oz(n){const e=pf(n);B(n,Yx),e.checked||(e.checked=!0)}function Dz(n){const e=pf(n);oe(n,Yx),e.checked&&(e.checked=!1)}function zee({root:n}){const e=n.createElement("div");return e.className=Lee,e}function Uee({root:n}){const e=n.createElement("div");return B(e,Wee),fe(e,[al()]),e}function Yee({root:n}){const e=n.createElement("input");return fe(e,[Ni(Bee),["type","text"],["size",3],["placeholder",Fee],["id",ZA]]),B(e,ZA),e}function Gee({root:n}){const e=n.createElement("div");return e.className=$ee,e}function jee({root:n}){return n.createElement("ul")}function qee({dropdownListElement:n}){return n.offsetWidth}function Kee({dropdownListElement:n}){n.querySelectorAll(`.${Yx}`).forEach(e=>Dz(e))}function QA({dropdownListElement:n,index:e}){const t=n.children[e];if(t){const o=pf(t);o&&o.blur()}}function Xee({dropdownListElement:n,index:e}){const t=n.children[e];if(t){const o=pf(t);o&&o.focus()}}function Zee({dropdownListElement:n}){n.querySelectorAll('input[type="checkbox"]:not(:checked)').forEach(e=>{e.dataset.disabled=!0})}function Qee({dropdownListElement:n}){n.querySelectorAll('input[type="checkbox"]').forEach(e=>{e.dataset.disabled=!1})}function Jee({rootDocument:n,instanceId:e,itemKey:t,itemValue:o,indexWithinList:i,checked:s=!1,disabled:r=!1}){const a=n.createElement("li"),l=n.createElement("div"),h=n.createElement("input"),c=n.createElement("label");return h.id=`${e}-${Vee}${i}`,h.type="checkbox",h.dataset.value=o,h.dataset.index=i,h.dataset.disabled=s?!1:r,t&&(h.dataset.key=t),c.htmlFor=h.id,c.textContent=o,l.appendChild(h),l.appendChild(c),a.appendChild(l),a}function Nz(n,e){if(e.has(n))throw new TypeError("Cannot initialize the same private elements twice on an object")}function ete(n,e){return e.get?e.get.call(n):e.value}function tte(n,e,t){if(e.set)e.set.call(n,t);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=t}}function Pz(n,e,t){if(!e.has(n))throw new TypeError("attempted to "+t+" private field on non-instance");return e.get(n)}function X(n,e){var t=Pz(n,e,"get");return ete(n,t)}function Er(n,e,t){Nz(n,e),e.set(n,t)}function uo(n,e,t){var o=Pz(n,e,"set");return tte(n,o,t),t}function li(n,e,t){if(!e.has(n))throw new TypeError("attempted to get private field on non-instance");return t}function kr(n,e){Nz(n,e),e.add(n)}var qb=new WeakMap,Hn=new WeakMap,ki=new WeakMap,Sa=new WeakMap,mu=new WeakMap,Bl=new WeakMap,wu=new WeakMap,fs=new WeakMap,Dc=new WeakMap,$e=new WeakMap,Qf=new WeakSet,JA=new WeakSet,e1=new WeakSet,ZE=new WeakSet,t1=new WeakSet,tv=new WeakSet,n1=new WeakSet,Lz=new WeakSet,o1=new WeakSet,i1=new WeakSet;class Wz{init(){uo(this,ki,jee({root:X(this,fs)})),uo(this,Sa,Yee({root:X(this,fs)}));const e=Uee({root:X(this,fs)});uo(this,Bl,zee({root:X(this,fs)})),uo(this,mu,Gee({root:X(this,fs)})),X(this,Bl).appendChild(e),X(this,Bl).appendChild(X(this,Sa)),X(this,Hn).appendChild(X(this,Bl)),X(this,Hn).appendChild(X(this,mu)),X(this,Hn).appendChild(X(this,ki)),uo(this,wu,new Az({input:X(this,Sa),eventManager:X(this,Dc)}))}setVisibleRowsNumberSetting(e){X(this,$e).visibleRowsNumberSetting=e}setSourceSortFunction(e){X(this,$e).sourceSortFunction=e??null}setSearchInputVisibility(e=!0){X(this,Bl).style.display=e?"":"none",X(this,mu).style.display=e?"":"none",X(this,wu).toggle(e)}fillDropdown(e,t=[]){this.removeAllDropdownItems(),X(this,$e).currentlySelectedItemIndex=0,Array.isArray(t)||(t=[]),X(this,$e).sourceSortFunction&&(e=X(this,$e).sourceSortFunction(e)),e.forEach((o,i)=>{li(this,n1,ste).call(this,{rootDocument:X(this,fs),itemKey:o?.key,itemValue:o?.value??o,indexWithinList:i,checked:Hz(t,o),disabled:X(this,$e).areCheckboxesDisabled})}),X(this,$e).entriesCount=e.length,this.runLocalHooks("afterDropdownFill")}updateDimensions(e,t=!1){const o=li(this,ZE,$z).call(this),i=li(this,JA,nte).call(this,e),s=i?e.spaceAbove:e.spaceBelow;if(!t&&i&&(X(this,$e).flippedVertically=!0),X(this,$e).entriesCount>0&&s<this.getHeight(!0)){const r=Math.max(Math.floor((s-li(this,tv,s1).call(this))/o)-1,1);X(this,$e).actualRenderedItemsCount=X(this,$e).visibleRowsNumberSetting?Math.min(r,X(this,$e).visibleRowsNumberSetting):r}else X(this,$e).actualRenderedItemsCount=Math.min(X(this,$e).entriesCount,X(this,$e).visibleRowsNumberSetting);X(this,$e).actualRenderedItemsCount&&X(this,$e).entriesCount>X(this,$e).actualRenderedItemsCount?X(this,Hn).style.height=`${this.getHeight()}px`:X(this,Hn).style.height="",li(this,e1,ote).call(this,e),X(this,Hn).scrollTop=0}getDropdownWidth(){return qee({dropdownListElement:X(this,ki)})}deselectAllItems(){Kee({dropdownListElement:X(this,ki)})}focusFirstItem(){X(this,$e).entriesCount>0&&li(this,Qf,Dw).call(this,0)}focusItem(e){li(this,Qf,Dw).call(this,e)}focusPreviousItem(){if(X(this,$e).currentlySelectedItemIndex===0){this.focusSearchInput();return}QA({dropdownListElement:X(this,ki),index:X(this,$e).currentlySelectedItemIndex}),li(this,Qf,Dw).call(this,X(this,$e).currentlySelectedItemIndex-1)}focusNextItem(){X(this,$e).currentlySelectedItemIndex!==X(this,$e).entriesCount-1&&(QA({dropdownListElement:X(this,ki),index:X(this,$e).currentlySelectedItemIndex}),li(this,Qf,Dw).call(this,X(this,$e).currentlySelectedItemIndex+1))}focusSearchInput(){X(this,Sa)&&X(this,Sa).focus()}reset(){this.removeAllDropdownItems(),li(this,i1,lte).call(this),X(this,Sa)&&(X(this,Sa).value=""),X(this,Hn).style.position="",X(this,Hn).style.top="",X(this,Hn).style.height="",X(this,Hn).scrollTop=0}isFlippedVertically(){return X(this,$e).flippedVertically}getHeight(e=!1,t=!1){const o=X(this,fs).defaultView.getComputedStyle(X(this,Hn));return li(this,t1,ite).call(this,e)+li(this,tv,s1).call(this)+(t===!0?2*parseInt(o.getPropertyValue("--ht-menu-vertical-padding"),10):0)}getInputController(){return X(this,wu)}removeAllDropdownItems(){Array.from(X(this,ki).children).forEach(e=>li(this,o1,ate).call(this,e)),X(this,$e).checkboxChangeListeners.clear(),X(this,ki).innerHTML=""}disableCheckboxes(){X(this,$e).areCheckboxesDisabled=!0,Zee({dropdownListElement:X(this,ki)})}enableCheckboxes(){X(this,$e).areCheckboxesDisabled=!1,Qee({dropdownListElement:X(this,ki)})}constructor(e,t){kr(this,Qf),kr(this,JA),kr(this,e1),kr(this,ZE),kr(this,t1),kr(this,tv),kr(this,n1),kr(this,Lz),kr(this,o1),kr(this,i1),Er(this,qb,{writable:!0,value:void 0}),Er(this,Hn,{writable:!0,value:void 0}),Er(this,ki,{writable:!0,value:void 0}),Er(this,Sa,{writable:!0,value:void 0}),Er(this,mu,{writable:!0,value:void 0}),Er(this,Bl,{writable:!0,value:void 0}),Er(this,wu,{writable:!0,value:void 0}),Er(this,fs,{writable:!0,value:void 0}),Er(this,Dc,{writable:!0,value:void 0}),Er(this,$e,{writable:!0,value:void 0}),uo(this,qb,null),uo(this,Hn,null),uo(this,ki,null),uo(this,Sa,null),uo(this,mu,null),uo(this,Bl,null),uo(this,wu,null),uo(this,fs,null),uo(this,Dc,new Wi(this)),uo(this,$e,{visibleRowsNumber:null,entriesCount:0,flippedVertically:!1,currentlySelectedItemIndex:0,checkboxChangeListeners:new Map,areCheckboxesDisabled:!1,sourceSortFunction:null}),uo(this,Hn,e),uo(this,fs,X(this,Hn).ownerDocument),uo(this,qb,t),this.init()}}function Dw(n){X(this,$e).currentlySelectedItemIndex=n,Xee({dropdownListElement:X(this,ki),index:n})}function nte(n){const{spaceAbove:e,spaceBelow:t,cellHeight:o}=n;return this.getHeight(!0)>t&&e>t+o}function ote(n){const{cellHeight:e}=n;X(this,$e).flippedVertically?(X(this,Hn).style.position="absolute",X(this,Hn).style.top=`${-this.getHeight(!1,!0)-e-2}px`):(X(this,Hn).style.position="",X(this,Hn).style.top="")}function $z(){const n=X(this,fs).defaultView.getComputedStyle(X(this,Hn));return 2*parseInt(n.getPropertyValue("--ht-menu-item-vertical-padding"),10)+parseInt(n.getPropertyValue("--ht-line-height"),10)}function ite(n=!1){const e=X(this,$e).entriesCount,t=n?e:X(this,$e).actualRenderedItemsCount??e,o=li(this,ZE,$z).call(this);return t*o}function s1(){if(!X(this,wu).enabled)return 0;const n=X(this,fs).defaultView.getComputedStyle(X(this,Hn)),e=X(this,Bl).offsetHeight,t=X(this,mu).offsetHeight+2*parseInt(n.getPropertyValue("--ht-menu-vertical-padding"),10);return e+t}function ste({rootDocument:n,itemKey:e,itemValue:t,indexWithinList:o,checked:i=!1,disabled:s=!1}){const r=Jee({rootDocument:n,instanceId:X(this,qb),itemKey:e,itemValue:t,indexWithinList:o,checked:i,disabled:s});i&&Oz(r),li(this,Lz,rte).call(this,r),X(this,ki).appendChild(r)}function rte(n){const e=pf(n),t=()=>{if(e.dataset.disabled==="true"&&e.checked){e.checked=!1;return}e.checked?(Oz(n),this.runLocalHooks("afterDropdownItemChecked",e.dataset.key,e.dataset.value)):(Dz(n),this.runLocalHooks("afterDropdownItemUnchecked",e.dataset.key,e.dataset.value))},o=i=>{i.target===e||e.dataset.disabled==="true"||i.target.tagName==="LABEL"||(e.checked=!e.checked,e.dispatchEvent(new Event("change")))};X(this,$e).checkboxChangeListeners.set(e,{change:t,click:o}),X(this,Dc).addEventListener(e,"change",t),X(this,Dc).addEventListener(n,"click",o)}function ate(n){const e=pf(n),t=X(this,$e).checkboxChangeListeners.get(e);X(this,Dc).removeEventListener(e,"change",t.change),X(this,Dc).removeEventListener(n,"click",t.click),X(this,$e).checkboxChangeListeners.delete(e)}function lte(){X(this,$e).visibleRowsNumberSetting=null,X(this,$e).entriesCount=0,X(this,$e).flippedVertically=!1,X(this,$e).currentlySelectedItemIndex=0,X(this,$e).checkboxChangeListeners.clear(),X(this,$e).areCheckboxesDisabled=!1,X(this,$e).sourceSortFunction=null}Ct(Wz,$n);class QE{setMaxSelectionCount(e){this.maxSelectionsCount=e}add(e){this.selectedItems.size>=this.maxSelectionsCount||(Array.isArray(e)?e.forEach(t=>this.selectedItems.add(t)):this.selectedItems.add(e))}remove(e){if(Ln(e)){const o=Array.from(this.selectedItems).find(i=>uh(i,e));if(o!==void 0)return this.selectedItems.delete(o),!0}else return this.selectedItems.delete(e);return!1}has(e){return Hz(this.getItemsArray(),e)}clear(){this.selectedItems.clear()}getSize(){return this.selectedItems.size}getItemsArray(){return Array.from(this.selectedItems)}constructor(e){this.selectedItems=this.selectedItems??new Set,this.maxSelectionsCount=1/0,Array.isArray(e)?this.selectedItems=new Set(e):this.selectedItems=new Set}}function Fz(n,e){if(e.has(n))throw new TypeError("Cannot initialize the same private elements twice on an object")}function hte(n,e){return e.get?e.get.call(n):e.value}function cte(n,e,t){if(e.set)e.set.call(n,t);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=t}}function Bz(n,e,t){if(!e.has(n))throw new TypeError("attempted to "+t+" private field on non-instance");return e.get(n)}function On(n,e){var t=Bz(n,e,"get");return hte(n,t)}function r1(n,e,t){Fz(n,e),e.set(n,t)}function Cp(n,e,t){var o=Bz(n,e,"set");return cte(n,o,t),t}function kt(n,e,t){if(!e.has(n))throw new TypeError("attempted to get private field on non-instance");return t}function ti(n,e){Fz(n,e),e.add(n)}const Vz="multiselect",dte="ht-multi-select-editor",ute="Select options",JE="multiselectEditor",fte="ht_editor_visible";var Oo=new WeakMap,nr=new WeakMap,yp=new WeakSet,a1=new WeakSet,l1=new WeakSet,h1=new WeakSet,c1=new WeakSet,Kb=new WeakSet,e0=new WeakSet,nv=new WeakSet,t0=new WeakSet,Gx=new WeakSet,d1=new WeakSet,u1=new WeakSet,n0=new WeakSet,Ql=new WeakSet,f1=new WeakSet;class zz extends td{static get EDITOR_TYPE(){return Vz}createElements(){const{rootDocument:e}=this.hot;Cp(this,nr,e.createElement("div")),On(this,nr).style.display="none",B(On(this,nr),"handsontableEditor"),this.dropdownContainerElement=this.hot.rootDocument.createElement("div"),B(this.dropdownContainerElement,`${dte} handsontableEditor`),fe(this.dropdownContainerElement,[Ni(ute),HG()]),On(this,nr).appendChild(this.dropdownContainerElement),this.hot.rootElement.appendChild(On(this,nr)),this.dropdownController=new Wz(this.dropdownContainerElement,this.hot.guid)}prepare(e,t,o,i,s,r){super.prepare(e,t,o,i,s,r);const a=Hee(s),l=Array.isArray(a)?a:[a],h=Aee(l,kt(this,yp,jC).call(this));this.dropdownController.reset(),h.length>=kt(this,Ql,Sc).call(this,"maxSelections")&&kt(this,Kb,o0).call(this),kt(this,n0,jz).call(this,h),this.dropdownController.setSourceSortFunction(this.cellProperties.sourceSortFunction),this.dropdownController.fillDropdown(kt(this,yp,jC).call(this),h),this.dropdownController.setVisibleRowsNumberSetting(kt(this,Ql,Sc).call(this,"visibleRows")),this.dropdownController.setSearchInputVisibility(kt(this,Ql,Sc).call(this,"searchInput")),r.maxSelections!==void 0&&On(this,Oo).setMaxSelectionCount(r.maxSelections)}finishEditing(e,t,o){super.finishEditing(e,t,o)}bindEvents(){this.dropdownController.addLocalHook("afterDropdownItemChecked",(e,t)=>{kt(this,d1,bte).call(this,e,t),On(this,Oo).getSize()>=this.cellProperties.maxSelections&&kt(this,Kb,o0).call(this)}),this.dropdownController.addLocalHook("afterDropdownItemUnchecked",(e,t)=>{kt(this,u1,Cte).call(this,e,t),On(this,Oo).getSize()<this.cellProperties.maxSelections&&kt(this,e0,Uz).call(this)}),this.addHook("afterDestroy",()=>this.destroy()),this.addHook("afterSetSourceDataAtCell",(...e)=>kt(this,f1,yte).call(this,...e)),this.addHook("afterScrollHorizontally",()=>this.refreshDimensions()),this.addHook("afterScrollVertically",()=>this.refreshDimensions()),this.dropdownController.getInputController().addLocalHook("triggerFilter",e=>kt(this,nv,g1).call(this,e))}open(e){if(gF(e?.keyCode)){const t=e.key.length===1?e.key:String.fromCharCode(e.keyCode);this.dropdownController.getInputController().enabled&&(this.dropdownController.getInputController().setValue(t),kt(this,nv,g1).call(this,t)),e.preventDefault(),this.enableFullEditMode()}kt(this,h1,mte).call(this),this.refreshDimensions(),this.hot.getShortcutManager().setActiveContextName("editor"),kt(this,a1,gte).call(this),this.dropdownController.getInputController().listen(),this.dropdownController.updateDimensions(kt(this,t0,Yz).call(this))}close(){kt(this,c1,wte).call(this),kt(this,l1,pte).call(this),this.dropdownController.getInputController().unlisten()}getValue(){return On(this,Oo).getItemsArray()}setValue(){}refreshDimensions(){if(!this.getEditedCell()){this.close();return}const{top:e,start:t,height:o}=this.getEditedCellRect(),i=On(this,nr).style;i.top=`${e+o}px`,i[this.hot.isRtl()?"right":"left"]=`${t}px`,B(On(this,nr),fte)}focus(){kt(this,Ql,Sc).call(this,"searchInput")===!1?this.dropdownController.focusFirstItem():this.dropdownController.focusSearchInput()}getInputElement(){return this.dropdownController.getInputController().getInputElement()}destroy(){this.close(),this.dropdownController.reset()}constructor(e){super(e),ti(this,yp),ti(this,a1),ti(this,l1),ti(this,h1),ti(this,c1),ti(this,Kb),ti(this,e0),ti(this,nv),ti(this,t0),ti(this,Gx),ti(this,d1),ti(this,u1),ti(this,n0),ti(this,Ql),ti(this,f1),r1(this,Oo,{writable:!0,value:void 0}),r1(this,nr,{writable:!0,value:void 0}),this._closeAfterDataChange=!1,Cp(this,Oo,new QE),Cp(this,nr,null),this.dropdownContainerElement=null,this.dropdownController=this.dropdownController??null,this.eventManager=new Wi(this),this.createElements(),this.bindEvents()}}function jC(){return this.cellProperties.source??[]}function gte(){const 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:JE}),e.addShortcuts([{keys:[["enter"],["shift","enter"],["control/meta","enter"],["control/meta","shift","enter"]],runOnlyIf:()=>!kt(this,Ql,Sc).call(this,"enterCommits"),callback:t=>{const o=this.hot.rootDocument.activeElement;return o.tagName==="INPUT"&&o.type==="checkbox"&&(o.checked=!o.checked,o.dispatchEvent(new Event("change"))),t.preventDefault(),!1}},{keys:[["space"]],runOnlyIf:()=>!kt(this,Ql,Sc).call(this,"enterCommits"),callback:t=>{t.preventDefault()}}],{group:JE,relativeToGroup:dl,position:"before"})}function pte(){this.hot.getShortcutManager().getContext("editor").removeShortcutsByGroup(JE)}function mte(){On(this,nr).style.display=""}function wte(){On(this,nr).style.display="none"}function o0(){this.dropdownController.disableCheckboxes()}function Uz(){this.dropdownController.enableCheckboxes()}function g1(n,e=kt(this,Ql,Sc).call(this,"filterSelectedItems")??!0){const t=kt(this,yp,jC).call(this).filter(o=>{const i=o?.value??o;return!e&&On(this,Oo).has(o)?!0:this.cellProperties.filteringCaseSensitive?i.includes(n):i.toLowerCase().includes(n.toLowerCase())});this.dropdownController.fillDropdown(t,On(this,Oo).getItemsArray()),this.dropdownController.updateDimensions(kt(this,t0,Yz).call(this),!0)}function Yz(){const n=this.getEditedCellRect(),e=this.hot.view.isVerticallyScrollableByWindow(),t=this.hot.view.getWorkspaceHeight();let o=n.top;if(e){const s=this.hot.view.getTableOffset().top-this.hot.rootWindow.scrollY;o=Math.max(o+s,0)}const i=t-o-n.height;return{spaceAbove:o,spaceBelow:i,cellHeight:n.height}}function Gz(){const n=On(this,Oo).getItemsArray();this.saveValue([[n]])}function bte(n,e){n?On(this,Oo).add({key:n,value:e}):On(this,Oo).add(e),kt(this,Gx,Gz).call(this),this.refreshDimensions()}function Cte(n,e){n?On(this,Oo).remove({key:n,value:e}):On(this,Oo).remove(e),kt(this,Gx,Gz).call(this),this.refreshDimensions()}function jz(n){n.length>0?Cp(this,Oo,new QE(n)):Cp(this,Oo,new QE)}function Sc(n){return this.cellProperties[n]}function yte(n,e){this.isOpened()&&e===`${Vz}-renderer`&&parseInt(n[0][0],10)===this.cellProperties.visualRow&&parseInt(n[0][1],10)===this.cellProperties.visualCol&&(kt(this,n0,jz).call(this,n[0][3]),this.dropdownController.fillDropdown(kt(this,yp,jC).call(this),On(this,Oo).getItemsArray()),this.dropdownController.focusItem(0),On(this,Oo).getSize()>=this.cellProperties.maxSelections?kt(this,Kb,o0).call(this):kt(this,e0,Uz).call(this))}function _te(){Bo(td),Bo(Cx),Bo(xV),Bo(_z),Bo(Sz),Bo(bx),Bo(Ez),Bo(kz),Bo(Tz),Bo(xz),Bo(Mz),Bo(ul),Bo(Iz),Bo(zz)}const Ste="html";function jx(n,e,t,o,i,s){Qc(e,s??"",!1)}jx.RENDERER_TYPE=Ste;const vte="autocomplete";function wf(n,e,t,o,i,s,r){const{rootDocument:a}=n,l=r.allowHtml?jx:ia,h=a.createElement("DIV"),c=n.getSettings().ariaTags;if(h.className="htAutocompleteArrow",c&&h.setAttribute(...al()),h.appendChild(a.createTextNode("▼")),l.apply(this,[n,e,t,o,i,s,r]),e.firstChild||e.appendChild(a.createTextNode(" ")),e.insertBefore(h,e.firstChild),B(e,"htAutocomplete"),!n.acArrowListener){const d=new Wi(n);n.acArrowListener=function(u){_e(u.target,"htAutocompleteArrow")&&n.view._wt.getSetting("onCellDblClick",null,n._createCellCoords(t,o),e)},d.addEventListener(n.rootElement,"mousedown",n.acArrowListener),n.addHookOnce("afterDestroy",()=>{d.destroy()})}}wf.RENDERER_TYPE=vte;const Rte="dropdown";function qx(n,e,t,o,i,s,r){wf.apply(this,[n,e,t,o,i,s,r])}qx.RENDERER_TYPE=Rte;const am="#bad-value#",Qi="ht-loading",p1=new WeakMap,m1=new WeakMap,Ete="htBadValue",ef="data-row",tf="data-col",kte="checkboxRenderer",qz="checkbox";he.getSingleton().add("modifyAutoColumnSizeSeed",function(n,e,t){const{label:o,type:i,row:s,column:r,prop:a}=e;if(i!==qz||!o)return;const{value:l,property:h}=o;let c=t;if(l)c=typeof l=="function"?l(s,r,a,t):l;else if(h){const d=this.getDataAtRowProp(s,h);c=d!==null?d:t}return`${bt(c).length}`});function Kx(n,e,t,o,i,s,r){const{rootDocument:a}=n,l=n.getSettings().ariaTags;Tte(n);let h=xte(a);const c=r.label;let d=!1;if(typeof r.checkedTemplate>"u"&&(r.checkedTemplate=!0),typeof r.uncheckedTemplate>"u"&&(r.uncheckedTemplate=!1),ol(e),s===r.checkedTemplate||bt(s).toLocaleLowerCase(r.locale)===bt(r.checkedTemplate).toLocaleLowerCase(r.locale)?h.checked=!0:s===r.uncheckedTemplate||bt(s).toLocaleLowerCase(r.locale)===bt(r.uncheckedTemplate).toLocaleLowerCase(r.locale)?h.checked=!1:ht(s)?B(h,"noValue"):(h.style.display="none",B(h,Ete),d=!0),fe(h,[[ef,t],[tf,o]]),l&&fe(h,[Ni(h.checked?n.getTranslatedPhrase(qT):n.getTranslatedPhrase(KT)),Z$(h.checked),xG()]),!d&&c){let C="";if(c.value)C=typeof c.value=="function"?c.value.call(this,t,o,i,s):c.value;else if(c.property){const S=n.getDataAtRowProp(t,c.property);C=S!==null?S:""}const _=Mte(a,C,c.separated!==!0);c.position==="before"?c.separated?(e.appendChild(_),e.appendChild(h)):(_.appendChild(h),h=_):(!c.position||c.position==="after")&&(c.separated?(e.appendChild(h),e.appendChild(_)):(_.insertBefore(h,_.firstChild),h=_))}(!c||c&&!c.separated)&&e.appendChild(h),d&&e.appendChild(a.createTextNode(am)),p1.has(n)||(p1.set(n,!0),u());function u(){const _=n.getShortcutManager().getContext("grid"),S={group:kte,relativeToGroup:dl,position:"before"};_.addShortcuts([{keys:[["space"]],callback:()=>(f(),!p()),runOnlyIf:()=>n.getSelectedRangeActive()?.highlight.isCell()},{keys:[["enter"]],callback:()=>(f(),!p()),runOnlyIf:()=>{const T=n.getSelectedRangeActive();return n.getSettings().enterBeginsEditing&&T?.highlight.isCell()&&!n.selection.isMultiple()}},{keys:[["delete"],["backspace"]],callback:()=>(f(!0),!p()),runOnlyIf:()=>n.getSelectedRangeActive()?.highlight.isCell()}],S)}function f(C=!1){const _=n.getSelectedRange(),S=[],T=new Map;let P=[],F=0;if(_){for(let V=0;V<_.length;V++){const{row:D,col:I}=_[V].getTopStartCorner(),{row:G,col:z}=_[V].getBottomEndCorner();for(let Y=D;Y<=G;Y+=1)for(let te=I;te<=z;te+=1){const ee=n.getCellMeta(Y,te);if(ee.hidden)continue;const be={checkedTemplate:ee.checkedTemplate,uncheckedTemplate:ee.uncheckedTemplate};if(ee.type!=="checkbox"){C===!0&&!ee.readOnly&&(T.has(S.length)?T.set(S.length,[...T.get(S.length),[Y,te,null]]):T.set(S.length,[[Y,te,null]]));continue}if(ee.readOnly===!0)continue;typeof ee.checkedTemplate>"u"&&(ee.checkedTemplate=!0),typeof ee.uncheckedTemplate>"u"&&(ee.uncheckedTemplate=!1);const me=n.getDataAtCell(Y,te);C===!1?[ee.checkedTemplate,ee.checkedTemplate.toString()].includes(me)?P.push([Y,te,ee.uncheckedTemplate,be]):[ee.uncheckedTemplate,ee.uncheckedTemplate.toString(),null,void 0].includes(me)&&P.push([Y,te,ee.checkedTemplate,be]):P.push([Y,te,ee.uncheckedTemplate,be]),F+=1}S.push(F),F=0}if(P.every(([,,V])=>V===P[0][2])?P=P.map(([V,D,I])=>[V,D,I]):P=P.map(([V,D,,I])=>[V,D,I.checkedTemplate]),P.length>0){const V=[];if(S.forEach((D,I)=>{let G=P.splice(0,D);T.size&&T.has(I)&&(G=[...G,...T.get(I)]),V.push(G)}),C){const D=[];V.forEach(I=>{I.forEach(G=>{D.push(G)})}),D.length>0&&n.setDataAtCell(D)}else V.forEach(D=>{D.length>0&&n.setDataAtCell(D)})}}}function p(){const C=n.getSelectedRange();if(C){for(let _=0;_<C.length;_++){const S=C[_].getTopStartCorner(),T=C[_].getBottomEndCorner();for(let P=S.row;P<=T.row;P++)for(let F=S.col;F<=T.col;F++){if(n.getCellMeta(P,F).readOnly)continue;const D=n.getCell(P,F);if(Qr(D)&&D.querySelectorAll("input[type=checkbox]").length>0)return!0}}return!1}}}Kx.RENDERER_TYPE=qz;function Tte(n){let e=m1.get(n);if(!e){const{rootElement:t}=n;e=new Wi(n),e.addEventListener(t,"click",o=>Hte(o,n)),e.addEventListener(t,"mouseup",o=>Ite(o,n)),e.addEventListener(t,"change",o=>Ate(o,n)),m1.set(n,e)}return e}function xte(n){const e=n.createElement("input");return e.className="htCheckboxRendererInput",e.type="checkbox",e.setAttribute("tabindex","-1"),e.cloneNode(!1)}function Mte(n,e,t){const o=n.createElement("label");o.className=`htCheckboxRendererLabel ${t?"fullWidth":""}`;const i=n.createTextNode(e);if(t){const s=n.createElement("span");s.appendChild(i),o.appendChild(s)}else o.appendChild(i);return o.cloneNode(!0)}function Ite(n,e){const{target:t}=n;Xx(t)&&(!t.hasAttribute(ef)||!t.hasAttribute(tf)||setTimeout(e.listen,10))}function Hte(n,e){const{target:t}=n;if(!Xx(t)||!t.hasAttribute(ef)||!t.hasAttribute(tf))return;const o=parseInt(t.getAttribute(ef),10),i=parseInt(t.getAttribute(tf),10);e.getCellMeta(o,i).readOnly&&n.preventDefault()}function Ate(n,e){const{target:t}=n;if(!Xx(t)||!t.hasAttribute(ef)||!t.hasAttribute(tf))return;const o=parseInt(t.getAttribute(ef),10),i=parseInt(t.getAttribute(tf),10),s=e.getCellMeta(o,i);if(!s.readOnly){let r=null;n.target.checked?r=s.uncheckedTemplate===void 0?!0:s.checkedTemplate:r=s.uncheckedTemplate===void 0?!1:s.uncheckedTemplate,e.setDataAtCell(o,i,r)}}function Xx(n){return n.tagName==="INPUT"&&n.getAttribute("type")==="checkbox"}const Ote="handsontable";function Zx(n,e,t,o,i,s,r){wf.apply(this,[n,e,t,o,i,s,r])}Zx.RENDERER_TYPE=Ote;const Dte="intl-date",Nte={year:"numeric",month:"2-digit",day:"2-digit"};function Kz(n,e){const{dateFormat:t,locale:o,allowEmpty:i}=e;if(ht(n))return i?n:am;const s=ta(n);if(s===null)return am;const r=ne(t)?t:Nte;return new Intl.DateTimeFormat(o,r).format(s)}function l_(n,e,t,o,i,s,r){ia.apply(this,[n,e,t,o,i,s,r])}l_.valueFormatter=Kz;l_.RENDERER_TYPE=Dte;const Pte="intl-time",Lte={hour:"numeric",minute:"2-digit"};function Wte(n,e){const{timeFormat:t,locale:o,allowEmpty:i}=e;if(ht(n))return i?n:am;const s=Kc(n);if(s===null)return am;const r=ne(t)?t:Lte;return new Intl.DateTimeFormat(o,r).format(s)}function Qx(n,e,t,o,i,s,r){ia.apply(this,[n,e,t,o,i,s,r]),e.dir="ltr"}Qx.RENDERER_TYPE=Pte;var $te=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Fte(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var ov,w1;function Bte(){return w1||(w1=1,ov={languageTag:"en-US",delimiters:{thousands:",",decimal:"."},abbreviations:{thousand:"k",million:"m",billion:"b",trillion:"t"},spaceSeparated:!1,ordinal:function(n){let e=n%10;return~~(n%100/10)===1?"th":e===1?"st":e===2?"nd":e===3?"rd":"th"},bytes:{binarySuffixes:["B","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"],decimalSuffixes:["B","KB","MB","GB","TB","PB","EB","ZB","YB"]},currency:{symbol:"$",position:"prefix",code:"USD"},currencyFormat:{thousandSeparated:!0,totalLength:4,spaceSeparated:!0,spaceSeparatedCurrency:!0},formats:{fourDigits:{totalLength:4,spaceSeparated:!0},fullWithTwoDecimals:{output:"currency",thousandSeparated:!0,mantissa:2},fullWithTwoDecimalsNoCurrency:{thousandSeparated:!0,mantissa:2},fullWithNoDecimals:{output:"currency",thousandSeparated:!0,mantissa:0}}}),ov}var iv,b1;function Xz(){if(b1)return iv;b1=1;const n=[{key:"ZiB",factor:Math.pow(1024,7)},{key:"ZB",factor:Math.pow(1e3,7)},{key:"YiB",factor:Math.pow(1024,8)},{key:"YB",factor:Math.pow(1e3,8)},{key:"TiB",factor:Math.pow(1024,4)},{key:"TB",factor:Math.pow(1e3,4)},{key:"PiB",factor:Math.pow(1024,5)},{key:"PB",factor:Math.pow(1e3,5)},{key:"MiB",factor:Math.pow(1024,2)},{key:"MB",factor:Math.pow(1e3,2)},{key:"KiB",factor:Math.pow(1024,1)},{key:"KB",factor:Math.pow(1e3,1)},{key:"GiB",factor:Math.pow(1024,3)},{key:"GB",factor:Math.pow(1e3,3)},{key:"EiB",factor:Math.pow(1024,6)},{key:"EB",factor:Math.pow(1e3,6)},{key:"B",factor:1}];function e(l){return l.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&")}function t(l,h,c,d,u,f,p){if(!isNaN(+l))return+l;let C="",_=l.replace(/(^[^(]*)\((.*)\)([^)]*$)/,"$1$2$3");if(_!==l)return-1*t(_,h,c,d,u,f);for(let D=0;D<n.length;D++){let I=n[D];if(C=l.replace(RegExp(`([0-9 ])(${I.key})$`),"$1"),C!==l)return t(C,h,c,d,u,f)*I.factor}if(C=l.replace("%",""),C!==l)return t(C,h,c,d,u,f)/100;let S=parseFloat(l);if(isNaN(S))return;let T=d(S);if(T&&T!=="."&&(C=l.replace(new RegExp(`${e(T)}$`),""),C!==l))return t(C,h,c,d,u,f);let P={};Object.keys(f).forEach(D=>{P[f[D]]=D});let F=Object.keys(P).sort().reverse(),V=F.length;for(let D=0;D<V;D++){let I=F[D],G=P[I];if(C=l.replace(I,""),C!==l){let z;switch(G){case"thousand":z=Math.pow(10,3);break;case"million":z=Math.pow(10,6);break;case"billion":z=Math.pow(10,9);break;case"trillion":z=Math.pow(10,12);break}return t(C,h,c,d,u,f)*z}}}function o(l,h,c){let d=l.replace(c,"");return d=d.replace(new RegExp(`([0-9])${e(h.thousands)}([0-9])`,"g"),"$1$2"),d=d.replace(h.decimal,"."),d}function i(l,h,c="",d,u,f,p){if(l==="")return;if(l===u)return 0;let C=o(l,h,c);return t(C,h,c,d,u,f)}function s(l,h){if(!(l.indexOf(":")&&h.thousands!==":"))return!1;let d=l.split(":");if(d.length!==3)return!1;let u=+d[0],f=+d[1],p=+d[2];return!isNaN(u)&&!isNaN(f)&&!isNaN(p)}function r(l){let h=l.split(":"),c=+h[0],d=+h[1];return+h[2]+60*d+3600*c}function a(l,h){const c=tM();let d=c.currentDelimiters(),u=c.currentCurrency().symbol,f=c.currentOrdinal(),p=c.getZeroFormat(),C=c.currentAbbreviations(),_;if(typeof l=="string")s(l,d)?_=r(l):_=i(l,d,u,f,p,C);else if(typeof l=="number")_=l;else return;if(_!==void 0)return _}return iv={unformat:a},iv}var sv,C1;function Jx(){if(C1)return sv;C1=1;let n=Xz();const e=/^[a-z]{2,3}(-[a-zA-Z]{4})?(-([A-Z]{2}|[0-9]{3}))?$/,t=["currency","percent","byte","time","ordinal","number"],o=["trillion","billion","million","thousand"],i=["prefix","infix","postfix"],s=["sign","parenthesis"],r={type:"object",children:{thousand:{type:"string",mandatory:!0},million:{type:"string",mandatory:!0},billion:{type:"string",mandatory:!0},trillion:{type:"string",mandatory:!0}},mandatory:!0},h={output:{type:"string",validValues:t},base:{type:"string",validValues:["decimal","binary","general"],restriction:(_,S)=>S.output==="byte",message:"`base` must be provided only when the output is `byte`",mandatory:_=>_.output==="byte"},characteristic:{type:"number",restriction:_=>_>=0,message:"value must be positive"},prefix:"string",postfix:"string",forceAverage:{type:"string",validValues:o},average:"boolean",lowPrecision:{type:"boolean",restriction:(_,S)=>S.average===!0,message:"`lowPrecision` must be provided only when the option `average` is set"},currencyPosition:{type:"string",validValues:i},currencySymbol:"string",totalLength:{type:"number",restrictions:[{restriction:_=>_>=0,message:"value must be positive"},{restriction:(_,S)=>!S.exponential,message:"`totalLength` is incompatible with `exponential`"}]},mantissa:{type:"number",restriction:_=>_>=0,message:"value must be positive"},optionalMantissa:"boolean",trimMantissa:"boolean",roundingFunction:"function",optionalCharacteristic:"boolean",thousandSeparated:"boolean",spaceSeparated:"boolean",spaceSeparatedCurrency:"boolean",spaceSeparatedAbbreviation:"boolean",abbreviations:{type:"object",children:{thousand:"string",million:"string",billion:"string",trillion:"string"}},negative:{type:"string",validValues:s},forceSign:"boolean",exponential:{type:"boolean"},prefixSymbol:{type:"boolean",restriction:(_,S)=>S.output==="percent",message:"`prefixSymbol` can be provided only when the output is `percent`"}},c={languageTag:{type:"string",mandatory:!0,restriction:_=>_.match(e),message:"the language tag must follow the BCP 47 specification (see https://tools.ieft.org/html/bcp47)"},delimiters:{type:"object",children:{thousands:"string",decimal:"string",thousandsSize:"number"},mandatory:!0},abbreviations:r,spaceSeparated:"boolean",spaceSeparatedCurrency:"boolean",ordinal:{type:"function",mandatory:!0},bytes:{type:"object",children:{binarySuffixes:"object",decimalSuffixes:"object"}},currency:{type:"object",children:{symbol:"string",position:"string",code:"string"},mandatory:!0},defaults:"format",ordinalFormat:"format",byteFormat:"format",percentageFormat:"format",currencyFormat:"format",timeDefaults:"format",formats:{type:"object",children:{fourDigits:{type:"format",mandatory:!0},fullWithTwoDecimals:{type:"format",mandatory:!0},fullWithTwoDecimalsNoCurrency:{type:"format",mandatory:!0},fullWithNoDecimals:{type:"format",mandatory:!0}}}};function d(_,S){let T=u(_),P=p(S);return T&&P}function u(_){return n.unformat(_)!==void 0}function f(_,S,T,P=!1){let F=Object.keys(_).map(V=>{if(!S[V])return console.error(`${T} Invalid key: ${V}`),!1;let D=_[V],I=S[V];if(typeof I=="string"&&(I={type:I}),I.type==="format"){if(!f(D,h,`[Validate ${V}]`,!0))return!1}else if(typeof D!==I.type)return console.error(`${T} ${V} type mismatched: "${I.type}" expected, "${typeof D}" provided`),!1;if(I.restrictions&&I.restrictions.length){let G=I.restrictions.length;for(let z=0;z<G;z++){let{restriction:Y,message:te}=I.restrictions[z];if(!Y(D,_))return console.error(`${T} ${V} invalid value: ${te}`),!1}}return I.restriction&&!I.restriction(D,_)?(console.error(`${T} ${V} invalid value: ${I.message}`),!1):I.validValues&&I.validValues.indexOf(D)===-1?(console.error(`${T} ${V} invalid value: must be among ${JSON.stringify(I.validValues)}, "${D}" provided`),!1):!(I.children&&!f(D,I.children,`[Validate ${V}]`))});return P||F.push(...Object.keys(S).map(V=>{let D=S[V];if(typeof D=="string"&&(D={type:D}),D.mandatory){let I=D.mandatory;if(typeof I=="function"&&(I=I(_)),I&&_[V]===void 0)return console.error(`${T} Missing mandatory key "${V}"`),!1}return!0})),F.reduce((V,D)=>V&&D,!0)}function p(_){return f(_,h,"[Validate format]")}function C(_){return f(_,c,"[Validate language]")}return sv={validate:d,validateFormat:p,validateInput:u,validateLanguage:C},sv}function Vte(n,e){let t=n.match(/^{([^}]*)}/);return t?(e.prefix=t[1],n.slice(t[0].length)):n}function zte(n,e){let t=n.match(/{([^}]*)}$/);return t?(e.postfix=t[1],n.slice(0,-t[0].length)):n}function Ute(n,e){if(n.indexOf("$")!==-1){e.output="currency";return}if(n.indexOf("%")!==-1){e.output="percent";return}if(n.indexOf("bd")!==-1){e.output="byte",e.base="general";return}if(n.indexOf("b")!==-1){e.output="byte",e.base="binary";return}if(n.indexOf("d")!==-1){e.output="byte",e.base="decimal";return}if(n.indexOf(":")!==-1){e.output="time";return}n.indexOf("o")!==-1&&(e.output="ordinal")}function Yte(n,e){n.indexOf(",")!==-1&&(e.thousandSeparated=!0)}function Gte(n,e){n.indexOf(" ")!==-1&&(e.spaceSeparated=!0,e.spaceSeparatedCurrency=!0,(e.average||e.forceAverage)&&(e.spaceSeparatedAbbreviation=!0))}function jte(n,e){let t=n.match(/[1-9]+[0-9]*/);t&&(e.totalLength=+t[0])}function qte(n,e){let o=n.split(".")[0].match(/0+/);o&&(e.characteristic=o[0].length)}function Kte(n,e){let t=n.split(".")[1];if(t){let o=t.match(/0+/);o&&(e.mantissa=o[0].length)}}function Xte(n,e){const t=n.split(".")[1];t&&(e.trimMantissa=t.indexOf("[")!==-1)}function Zte(n,e){n.indexOf("a")!==-1&&(e.average=!0)}function Qte(n,e){n.indexOf("K")!==-1?e.forceAverage="thousand":n.indexOf("M")!==-1?e.forceAverage="million":n.indexOf("B")!==-1?e.forceAverage="billion":n.indexOf("T")!==-1&&(e.forceAverage="trillion")}function Jte(n,e){n.match(/\[\.]/)?e.optionalMantissa=!0:n.match(/\./)&&(e.optionalMantissa=!1)}function ene(n,e){if(n.indexOf(".")!==-1){let t=n.split(".")[0];e.optionalCharacteristic=t.indexOf("0")===-1}}function tne(n,e){n.match(/^\+?\([^)]*\)$/)&&(e.negative="parenthesis"),n.match(/^\+?-/)&&(e.negative="sign")}function nne(n,e){n.match(/^\+/)&&(e.forceSign=!0)}function one(n,e={}){return typeof n!="string"?n:(n=Vte(n,e),n=zte(n,e),Ute(n,e),jte(n,e),qte(n,e),ene(n,e),Zte(n,e),Qte(n,e),Kte(n,e),Jte(n,e),Xte(n,e),Yte(n,e),Gte(n,e),tne(n,e),nne(n,e),e)}var eM={parseFormat:one};var rv,y1;function tM(){if(y1)return rv;y1=1;const n=Bte(),e=Jx(),t=eM;let o={},i,s={},r=null,a={};function l(c){i=c}function h(){return s[i]}return o.languages=()=>Object.assign({},s),o.currentLanguage=()=>i,o.currentBytes=()=>h().bytes||{},o.currentCurrency=()=>h().currency,o.currentAbbreviations=()=>h().abbreviations,o.currentDelimiters=()=>h().delimiters,o.currentOrdinal=()=>h().ordinal,o.currentDefaults=()=>Object.assign({},h().defaults,a),o.currentOrdinalDefaultFormat=()=>Object.assign({},o.currentDefaults(),h().ordinalFormat),o.currentByteDefaultFormat=()=>Object.assign({},o.currentDefaults(),h().byteFormat),o.currentPercentageDefaultFormat=()=>Object.assign({},o.currentDefaults(),h().percentageFormat),o.currentCurrencyDefaultFormat=()=>Object.assign({},o.currentDefaults(),h().currencyFormat),o.currentTimeDefaultFormat=()=>Object.assign({},o.currentDefaults(),h().timeFormat),o.setDefaults=c=>{c=t.parseFormat(c),e.validateFormat(c)&&(a=c)},o.getZeroFormat=()=>r,o.setZeroFormat=c=>r=typeof c=="string"?c:null,o.hasZeroFormat=()=>r!==null,o.languageData=c=>{if(c){if(s[c])return s[c];throw new Error(`Unknown tag "${c}"`)}return h()},o.registerLanguage=(c,d=!1)=>{if(!e.validateLanguage(c))throw new Error("Invalid language data");s[c.languageTag]=c,d&&l(c.languageTag)},o.setLanguage=(c,d=n.languageTag)=>{if(!s[c]){let u=c.split("-")[0],f=Object.keys(s).find(p=>p.split("-")[0]===u);if(!s[f]){l(d);return}l(f);return}l(c)},o.registerLanguage(n),i=n.languageTag,rv=o,rv}function ine(n){throw new Error('Could not dynamically require "'+n+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}function sne(n,e){n.forEach(t=>{let o;try{o=ine(`../languages/${t}`)}catch{console.error(`Unable to load "${t}". No matching language file found.`)}o&&e.registerLanguage(o)})}var rne=n=>({loadLanguagesInNode:e=>sne(e,n)}),Zz={exports:{}};(function(n){(function(e){var t,o=/^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i,i=Math.ceil,s=Math.floor,r="[BigNumber Error] ",a=r+"Number primitive has more than 15 significant digits: ",l=1e14,h=14,c=9007199254740991,d=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13],u=1e7,f=1e9;function p(D){var I,G,z,Y=$.prototype={constructor:$,toString:null,valueOf:null},te=new $(1),ee=20,be=4,me=-7,Ve=21,Ye=-1e7,Me=1e7,Ge=!1,wt=1,on=0,W={prefix:"",groupSize:3,secondaryGroupSize:0,groupSeparator:",",decimalSeparator:".",fractionGroupSize:0,fractionGroupSeparator:" ",suffix:""},q="0123456789abcdefghijklmnopqrstuvwxyz",Ce=!0;function $(m,w){var y,E,k,M,N,R,A,L,H=this;if(!(H instanceof $))return new $(m,w);if(w==null){if(m&&m._isBigNumber===!0){H.s=m.s,!m.c||m.e>Me?H.c=H.e=null:m.e<Ye?H.c=[H.e=0]:(H.e=m.e,H.c=m.c.slice());return}if((R=typeof m=="number")&&m*0==0){if(H.s=1/m<0?(m=-m,-1):1,m===~~m){for(M=0,N=m;N>=10;N/=10,M++);M>Me?H.c=H.e=null:(H.e=M,H.c=[m]);return}L=String(m)}else{if(!o.test(L=String(m)))return z(H,L,R);H.s=L.charCodeAt(0)==45?(L=L.slice(1),-1):1}(M=L.indexOf("."))>-1&&(L=L.replace(".","")),(N=L.search(/e/i))>0?(M<0&&(M=N),M+=+L.slice(N+1),L=L.substring(0,N)):M<0&&(M=L.length)}else{if(T(w,2,q.length,"Base"),w==10&&Ce)return H=new $(m),b(H,ee+H.e+1,be);if(L=String(m),R=typeof m=="number"){if(m*0!=0)return z(H,L,R,w);if(H.s=1/m<0?(L=L.slice(1),-1):1,$.DEBUG&&L.replace(/^0\.0*|\./,"").length>15)throw Error(a+m)}else H.s=L.charCodeAt(0)===45?(L=L.slice(1),-1):1;for(y=q.slice(0,w),M=N=0,A=L.length;N<A;N++)if(y.indexOf(E=L.charAt(N))<0){if(E=="."){if(N>M){M=A;continue}}else if(!k&&(L==L.toUpperCase()&&(L=L.toLowerCase())||L==L.toLowerCase()&&(L=L.toUpperCase()))){k=!0,N=-1,M=0;continue}return z(H,String(m),R,w)}R=!1,L=G(L,w,10,H.s),(M=L.indexOf("."))>-1?L=L.replace(".",""):M=L.length}for(N=0;L.charCodeAt(N)===48;N++);for(A=L.length;L.charCodeAt(--A)===48;);if(L=L.slice(N,++A)){if(A-=N,R&&$.DEBUG&&A>15&&(m>c||m!==s(m)))throw Error(a+H.s*m);if((M=M-N-1)>Me)H.c=H.e=null;else if(M<Ye)H.c=[H.e=0];else{if(H.e=M,H.c=[],N=(M+1)%h,M<0&&(N+=h),N<A){for(N&&H.c.push(+L.slice(0,N)),A-=h;N<A;)H.c.push(+L.slice(N,N+=h));N=h-(L=L.slice(N)).length}else N-=A;for(;N--;L+="0");H.c.push(+L)}}else H.c=[H.e=0]}$.clone=p,$.ROUND_UP=0,$.ROUND_DOWN=1,$.ROUND_CEIL=2,$.ROUND_FLOOR=3,$.ROUND_HALF_UP=4,$.ROUND_HALF_DOWN=5,$.ROUND_HALF_EVEN=6,$.ROUND_HALF_CEIL=7,$.ROUND_HALF_FLOOR=8,$.EUCLID=9,$.config=$.set=function(m){var w,y;if(m!=null)if(typeof m=="object"){if(m.hasOwnProperty(w="DECIMAL_PLACES")&&(y=m[w],T(y,0,f,w),ee=y),m.hasOwnProperty(w="ROUNDING_MODE")&&(y=m[w],T(y,0,8,w),be=y),m.hasOwnProperty(w="EXPONENTIAL_AT")&&(y=m[w],y&&y.pop?(T(y[0],-f,0,w),T(y[1],0,f,w),me=y[0],Ve=y[1]):(T(y,-f,f,w),me=-(Ve=y<0?-y:y))),m.hasOwnProperty(w="RANGE"))if(y=m[w],y&&y.pop)T(y[0],-f,-1,w),T(y[1],1,f,w),Ye=y[0],Me=y[1];else if(T(y,-f,f,w),y)Ye=-(Me=y<0?-y:y);else throw Error(r+w+" cannot be zero: "+y);if(m.hasOwnProperty(w="CRYPTO"))if(y=m[w],y===!!y)if(y)if(typeof crypto<"u"&&crypto&&(crypto.getRandomValues||crypto.randomBytes))Ge=y;else throw Ge=!y,Error(r+"crypto unavailable");else Ge=y;else throw Error(r+w+" not true or false: "+y);if(m.hasOwnProperty(w="MODULO_MODE")&&(y=m[w],T(y,0,9,w),wt=y),m.hasOwnProperty(w="POW_PRECISION")&&(y=m[w],T(y,0,f,w),on=y),m.hasOwnProperty(w="FORMAT"))if(y=m[w],typeof y=="object")W=y;else throw Error(r+w+" not an object: "+y);if(m.hasOwnProperty(w="ALPHABET"))if(y=m[w],typeof y=="string"&&!/^.?$|[+\-.\s]|(.).*\1/.test(y))Ce=y.slice(0,10)=="0123456789",q=y;else throw Error(r+w+" invalid: "+y)}else throw Error(r+"Object expected: "+m);return{DECIMAL_PLACES:ee,ROUNDING_MODE:be,EXPONENTIAL_AT:[me,Ve],RANGE:[Ye,Me],CRYPTO:Ge,MODULO_MODE:wt,POW_PRECISION:on,FORMAT:W,ALPHABET:q}},$.isBigNumber=function(m){if(!m||m._isBigNumber!==!0)return!1;if(!$.DEBUG)return!0;var w,y,E=m.c,k=m.e,M=m.s;e:if({}.toString.call(E)=="[object Array]"){if((M===1||M===-1)&&k>=-f&&k<=f&&k===s(k)){if(E[0]===0){if(k===0&&E.length===1)return!0;break e}if(w=(k+1)%h,w<1&&(w+=h),String(E[0]).length==w){for(w=0;w<E.length;w++)if(y=E[w],y<0||y>=l||y!==s(y))break e;if(y!==0)return!0}}}else if(E===null&&k===null&&(M===null||M===1||M===-1))return!0;throw Error(r+"Invalid BigNumber: "+m)},$.maximum=$.max=function(){return Se(arguments,-1)},$.minimum=$.min=function(){return Se(arguments,1)},$.random=(function(){var m=9007199254740992,w=Math.random()*m&2097151?function(){return s(Math.random()*m)}:function(){return(Math.random()*1073741824|0)*8388608+(Math.random()*8388608|0)};return function(y){var E,k,M,N,R,A=0,L=[],H=new $(te);if(y==null?y=ee:T(y,0,f),N=i(y/h),Ge)if(crypto.getRandomValues){for(E=crypto.getRandomValues(new Uint32Array(N*=2));A<N;)R=E[A]*131072+(E[A+1]>>>11),R>=9e15?(k=crypto.getRandomValues(new Uint32Array(2)),E[A]=k[0],E[A+1]=k[1]):(L.push(R%1e14),A+=2);A=N/2}else if(crypto.randomBytes){for(E=crypto.randomBytes(N*=7);A<N;)R=(E[A]&31)*281474976710656+E[A+1]*1099511627776+E[A+2]*4294967296+E[A+3]*16777216+(E[A+4]<<16)+(E[A+5]<<8)+E[A+6],R>=9e15?crypto.randomBytes(7).copy(E,A):(L.push(R%1e14),A+=7);A=N/7}else throw Ge=!1,Error(r+"crypto unavailable");if(!Ge)for(;A<N;)R=w(),R<9e15&&(L[A++]=R%1e14);for(N=L[--A],y%=h,N&&y&&(R=d[h-y],L[A]=s(N/R)*R);L[A]===0;L.pop(),A--);if(A<0)L=[M=0];else{for(M=-1;L[0]===0;L.splice(0,1),M-=h);for(A=1,R=L[0];R>=10;R/=10,A++);A<h&&(M-=h-A)}return H.e=M,H.c=L,H}})(),$.sum=function(){for(var m=1,w=arguments,y=new $(w[0]);m<w.length;)y=y.plus(w[m++]);return y},G=(function(){var m="0123456789";function w(y,E,k,M){for(var N,R=[0],A,L=0,H=y.length;L<H;){for(A=R.length;A--;R[A]*=E);for(R[0]+=M.indexOf(y.charAt(L++)),N=0;N<R.length;N++)R[N]>k-1&&(R[N+1]==null&&(R[N+1]=0),R[N+1]+=R[N]/k|0,R[N]%=k)}return R.reverse()}return function(y,E,k,M,N){var R,A,L,H,j,ue,re,Ae,Ne=y.indexOf("."),nt=ee,Oe=be;for(Ne>=0&&(H=on,on=0,y=y.replace(".",""),Ae=new $(E),ue=Ae.pow(y.length-Ne),on=H,Ae.c=w(V(_(ue.c),ue.e,"0"),10,k,m),Ae.e=Ae.c.length),re=w(y,E,k,N?(R=q,m):(R=m,q)),L=H=re.length;re[--H]==0;re.pop());if(!re[0])return R.charAt(0);if(Ne<0?--L:(ue.c=re,ue.e=L,ue.s=M,ue=I(ue,Ae,nt,Oe,k),re=ue.c,j=ue.r,L=ue.e),A=L+nt+1,Ne=re[A],H=k/2,j=j||A<0||re[A+1]!=null,j=Oe<4?(Ne!=null||j)&&(Oe==0||Oe==(ue.s<0?3:2)):Ne>H||Ne==H&&(Oe==4||j||Oe==6&&re[A-1]&1||Oe==(ue.s<0?8:7)),A<1||!re[0])y=j?V(R.charAt(1),-nt,R.charAt(0)):R.charAt(0);else{if(re.length=A,j)for(--k;++re[--A]>k;)re[A]=0,A||(++L,re=[1].concat(re));for(H=re.length;!re[--H];);for(Ne=0,y="";Ne<=H;y+=R.charAt(re[Ne++]));y=V(y,L,R.charAt(0))}return y}})(),I=(function(){function m(E,k,M){var N,R,A,L,H=0,j=E.length,ue=k%u,re=k/u|0;for(E=E.slice();j--;)A=E[j]%u,L=E[j]/u|0,N=re*A+L*ue,R=ue*A+N%u*u+H,H=(R/M|0)+(N/u|0)+re*L,E[j]=R%M;return H&&(E=[H].concat(E)),E}function w(E,k,M,N){var R,A;if(M!=N)A=M>N?1:-1;else for(R=A=0;R<M;R++)if(E[R]!=k[R]){A=E[R]>k[R]?1:-1;break}return A}function y(E,k,M,N){for(var R=0;M--;)E[M]-=R,R=E[M]<k[M]?1:0,E[M]=R*N+E[M]-k[M];for(;!E[0]&&E.length>1;E.splice(0,1));}return function(E,k,M,N,R){var A,L,H,j,ue,re,Ae,Ne,nt,Oe,je,xt,qt,Ro,yn,zt,Eo,lo=E.s==k.s?1:-1,dn=E.c,Mt=k.c;if(!dn||!dn[0]||!Mt||!Mt[0])return new $(!E.s||!k.s||(dn?Mt&&dn[0]==Mt[0]:!Mt)?NaN:dn&&dn[0]==0||!Mt?lo*0:lo/0);for(Ne=new $(lo),nt=Ne.c=[],L=E.e-k.e,lo=M+L+1,R||(R=l,L=C(E.e/h)-C(k.e/h),lo=lo/h|0),H=0;Mt[H]==(dn[H]||0);H++);if(Mt[H]>(dn[H]||0)&&L--,lo<0)nt.push(1),j=!0;else{for(Ro=dn.length,zt=Mt.length,H=0,lo+=2,ue=s(R/(Mt[0]+1)),ue>1&&(Mt=m(Mt,ue,R),dn=m(dn,ue,R),zt=Mt.length,Ro=dn.length),qt=zt,Oe=dn.slice(0,zt),je=Oe.length;je<zt;Oe[je++]=0);Eo=Mt.slice(),Eo=[0].concat(Eo),yn=Mt[0],Mt[1]>=R/2&&yn++;do{if(ue=0,A=w(Mt,Oe,zt,je),A<0){if(xt=Oe[0],zt!=je&&(xt=xt*R+(Oe[1]||0)),ue=s(xt/yn),ue>1)for(ue>=R&&(ue=R-1),re=m(Mt,ue,R),Ae=re.length,je=Oe.length;w(re,Oe,Ae,je)==1;)ue--,y(re,zt<Ae?Eo:Mt,Ae,R),Ae=re.length,A=1;else ue==0&&(A=ue=1),re=Mt.slice(),Ae=re.length;if(Ae<je&&(re=[0].concat(re)),y(Oe,re,je,R),je=Oe.length,A==-1)for(;w(Mt,Oe,zt,je)<1;)ue++,y(Oe,zt<je?Eo:Mt,je,R),je=Oe.length}else A===0&&(ue++,Oe=[0]);nt[H++]=ue,Oe[0]?Oe[je++]=dn[qt]||0:(Oe=[dn[qt]],je=1)}while((qt++<Ro||Oe[0]!=null)&&lo--);j=Oe[0]!=null,nt[0]||nt.splice(0,1)}if(R==l){for(H=1,lo=nt[0];lo>=10;lo/=10,H++);b(Ne,M+(Ne.e=H+L*h-1)+1,N,j)}else Ne.e=L,Ne.r=+j;return Ne}})();function Re(m,w,y,E){var k,M,N,R,A;if(y==null?y=be:T(y,0,8),!m.c)return m.toString();if(k=m.c[0],N=m.e,w==null)A=_(m.c),A=E==1||E==2&&(N<=me||N>=Ve)?F(A,N):V(A,N,"0");else if(m=b(new $(m),w,y),M=m.e,A=_(m.c),R=A.length,E==1||E==2&&(w<=M||M<=me)){for(;R<w;A+="0",R++);A=F(A,M)}else if(w-=N,A=V(A,M,"0"),M+1>R){if(--w>0)for(A+=".";w--;A+="0");}else if(w+=M-R,w>0)for(M+1==R&&(A+=".");w--;A+="0");return m.s<0&&k?"-"+A:A}function Se(m,w){for(var y,E,k=1,M=new $(m[0]);k<m.length;k++)E=new $(m[k]),(!E.s||(y=S(M,E))===w||y===0&&M.s===w)&&(M=E);return M}function g(m,w,y){for(var E=1,k=w.length;!w[--k];w.pop());for(k=w[0];k>=10;k/=10,E++);return(y=E+y*h-1)>Me?m.c=m.e=null:y<Ye?m.c=[m.e=0]:(m.e=y,m.c=w),m}z=(function(){var m=/^(-?)0([xbo])(?=\w[\w.]*$)/i,w=/^([^.]+)\.$/,y=/^\.([^.]+)$/,E=/^-?(Infinity|NaN)$/,k=/^\s*\+(?=[\w.])|^\s+|\s+$/g;return function(M,N,R,A){var L,H=R?N:N.replace(k,"");if(E.test(H))M.s=isNaN(H)?null:H<0?-1:1;else{if(!R&&(H=H.replace(m,function(j,ue,re){return L=(re=re.toLowerCase())=="x"?16:re=="b"?2:8,!A||A==L?ue:j}),A&&(L=A,H=H.replace(w,"$1").replace(y,"0.$1")),N!=H))return new $(H,L);if($.DEBUG)throw Error(r+"Not a"+(A?" base "+A:"")+" number: "+N);M.s=null}M.c=M.e=null}})();function b(m,w,y,E){var k,M,N,R,A,L,H,j=m.c,ue=d;if(j){e:{for(k=1,R=j[0];R>=10;R/=10,k++);if(M=w-k,M<0)M+=h,N=w,A=j[L=0],H=s(A/ue[k-N-1]%10);else if(L=i((M+1)/h),L>=j.length)if(E){for(;j.length<=L;j.push(0));A=H=0,k=1,M%=h,N=M-h+1}else break e;else{for(A=R=j[L],k=1;R>=10;R/=10,k++);M%=h,N=M-h+k,H=N<0?0:s(A/ue[k-N-1]%10)}if(E=E||w<0||j[L+1]!=null||(N<0?A:A%ue[k-N-1]),E=y<4?(H||E)&&(y==0||y==(m.s<0?3:2)):H>5||H==5&&(y==4||E||y==6&&(M>0?N>0?A/ue[k-N]:0:j[L-1])%10&1||y==(m.s<0?8:7)),w<1||!j[0])return j.length=0,E?(w-=m.e+1,j[0]=ue[(h-w%h)%h],m.e=-w||0):j[0]=m.e=0,m;if(M==0?(j.length=L,R=1,L--):(j.length=L+1,R=ue[h-M],j[L]=N>0?s(A/ue[k-N]%ue[N])*R:0),E)for(;;)if(L==0){for(M=1,N=j[0];N>=10;N/=10,M++);for(N=j[0]+=R,R=1;N>=10;N/=10,R++);M!=R&&(m.e++,j[0]==l&&(j[0]=1));break}else{if(j[L]+=R,j[L]!=l)break;j[L--]=0,R=1}for(M=j.length;j[--M]===0;j.pop());}m.e>Me?m.c=m.e=null:m.e<Ye&&(m.c=[m.e=0])}return m}function v(m){var w,y=m.e;return y===null?m.toString():(w=_(m.c),w=y<=me||y>=Ve?F(w,y):V(w,y,"0"),m.s<0?"-"+w:w)}return Y.absoluteValue=Y.abs=function(){var m=new $(this);return m.s<0&&(m.s=1),m},Y.comparedTo=function(m,w){return S(this,new $(m,w))},Y.decimalPlaces=Y.dp=function(m,w){var y,E,k,M=this;if(m!=null)return T(m,0,f),w==null?w=be:T(w,0,8),b(new $(M),m+M.e+1,w);if(!(y=M.c))return null;if(E=((k=y.length-1)-C(this.e/h))*h,k=y[k])for(;k%10==0;k/=10,E--);return E<0&&(E=0),E},Y.dividedBy=Y.div=function(m,w){return I(this,new $(m,w),ee,be)},Y.dividedToIntegerBy=Y.idiv=function(m,w){return I(this,new $(m,w),0,1)},Y.exponentiatedBy=Y.pow=function(m,w){var y,E,k,M,N,R,A,L,H,j=this;if(m=new $(m),m.c&&!m.isInteger())throw Error(r+"Exponent not an integer: "+v(m));if(w!=null&&(w=new $(w)),R=m.e>14,!j.c||!j.c[0]||j.c[0]==1&&!j.e&&j.c.length==1||!m.c||!m.c[0])return H=new $(Math.pow(+v(j),R?m.s*(2-P(m)):+v(m))),w?H.mod(w):H;if(A=m.s<0,w){if(w.c?!w.c[0]:!w.s)return new $(NaN);E=!A&&j.isInteger()&&w.isInteger(),E&&(j=j.mod(w))}else{if(m.e>9&&(j.e>0||j.e<-1||(j.e==0?j.c[0]>1||R&&j.c[1]>=24e7:j.c[0]<8e13||R&&j.c[0]<=9999975e7)))return M=j.s<0&&P(m)?-0:0,j.e>-1&&(M=1/M),new $(A?1/M:M);on&&(M=i(on/h+2))}for(R?(y=new $(.5),A&&(m.s=1),L=P(m)):(k=Math.abs(+v(m)),L=k%2),H=new $(te);;){if(L){if(H=H.times(j),!H.c)break;M?H.c.length>M&&(H.c.length=M):E&&(H=H.mod(w))}if(k){if(k=s(k/2),k===0)break;L=k%2}else if(m=m.times(y),b(m,m.e+1,1),m.e>14)L=P(m);else{if(k=+v(m),k===0)break;L=k%2}j=j.times(j),M?j.c&&j.c.length>M&&(j.c.length=M):E&&(j=j.mod(w))}return E?H:(A&&(H=te.div(H)),w?H.mod(w):M?b(H,on,be,N):H)},Y.integerValue=function(m){var w=new $(this);return m==null?m=be:T(m,0,8),b(w,w.e+1,m)},Y.isEqualTo=Y.eq=function(m,w){return S(this,new $(m,w))===0},Y.isFinite=function(){return!!this.c},Y.isGreaterThan=Y.gt=function(m,w){return S(this,new $(m,w))>0},Y.isGreaterThanOrEqualTo=Y.gte=function(m,w){return(w=S(this,new $(m,w)))===1||w===0},Y.isInteger=function(){return!!this.c&&C(this.e/h)>this.c.length-2},Y.isLessThan=Y.lt=function(m,w){return S(this,new $(m,w))<0},Y.isLessThanOrEqualTo=Y.lte=function(m,w){return(w=S(this,new $(m,w)))===-1||w===0},Y.isNaN=function(){return!this.s},Y.isNegative=function(){return this.s<0},Y.isPositive=function(){return this.s>0},Y.isZero=function(){return!!this.c&&this.c[0]==0},Y.minus=function(m,w){var y,E,k,M,N=this,R=N.s;if(m=new $(m,w),w=m.s,!R||!w)return new $(NaN);if(R!=w)return m.s=-w,N.plus(m);var A=N.e/h,L=m.e/h,H=N.c,j=m.c;if(!A||!L){if(!H||!j)return H?(m.s=-w,m):new $(j?N:NaN);if(!H[0]||!j[0])return j[0]?(m.s=-w,m):new $(H[0]?N:be==3?-0:0)}if(A=C(A),L=C(L),H=H.slice(),R=A-L){for((M=R<0)?(R=-R,k=H):(L=A,k=j),k.reverse(),w=R;w--;k.push(0));k.reverse()}else for(E=(M=(R=H.length)<(w=j.length))?R:w,R=w=0;w<E;w++)if(H[w]!=j[w]){M=H[w]<j[w];break}if(M&&(k=H,H=j,j=k,m.s=-m.s),w=(E=j.length)-(y=H.length),w>0)for(;w--;H[y++]=0);for(w=l-1;E>R;){if(H[--E]<j[E]){for(y=E;y&&!H[--y];H[y]=w);--H[y],H[E]+=l}H[E]-=j[E]}for(;H[0]==0;H.splice(0,1),--L);return H[0]?g(m,H,L):(m.s=be==3?-1:1,m.c=[m.e=0],m)},Y.modulo=Y.mod=function(m,w){var y,E,k=this;return m=new $(m,w),!k.c||!m.s||m.c&&!m.c[0]?new $(NaN):!m.c||k.c&&!k.c[0]?new $(k):(wt==9?(E=m.s,m.s=1,y=I(k,m,0,3),m.s=E,y.s*=E):y=I(k,m,0,wt),m=k.minus(y.times(m)),!m.c[0]&&wt==1&&(m.s=k.s),m)},Y.multipliedBy=Y.times=function(m,w){var y,E,k,M,N,R,A,L,H,j,ue,re,Ae,Ne,nt,Oe=this,je=Oe.c,xt=(m=new $(m,w)).c;if(!je||!xt||!je[0]||!xt[0])return!Oe.s||!m.s||je&&!je[0]&&!xt||xt&&!xt[0]&&!je?m.c=m.e=m.s=null:(m.s*=Oe.s,!je||!xt?m.c=m.e=null:(m.c=[0],m.e=0)),m;for(E=C(Oe.e/h)+C(m.e/h),m.s*=Oe.s,A=je.length,j=xt.length,A<j&&(Ae=je,je=xt,xt=Ae,k=A,A=j,j=k),k=A+j,Ae=[];k--;Ae.push(0));for(Ne=l,nt=u,k=j;--k>=0;){for(y=0,ue=xt[k]%nt,re=xt[k]/nt|0,N=A,M=k+N;M>k;)L=je[--N]%nt,H=je[N]/nt|0,R=re*L+H*ue,L=ue*L+R%nt*nt+Ae[M]+y,y=(L/Ne|0)+(R/nt|0)+re*H,Ae[M--]=L%Ne;Ae[M]=y}return y?++E:Ae.splice(0,1),g(m,Ae,E)},Y.negated=function(){var m=new $(this);return m.s=-m.s||null,m},Y.plus=function(m,w){var y,E=this,k=E.s;if(m=new $(m,w),w=m.s,!k||!w)return new $(NaN);if(k!=w)return m.s=-w,E.minus(m);var M=E.e/h,N=m.e/h,R=E.c,A=m.c;if(!M||!N){if(!R||!A)return new $(k/0);if(!R[0]||!A[0])return A[0]?m:new $(R[0]?E:k*0)}if(M=C(M),N=C(N),R=R.slice(),k=M-N){for(k>0?(N=M,y=A):(k=-k,y=R),y.reverse();k--;y.push(0));y.reverse()}for(k=R.length,w=A.length,k-w<0&&(y=A,A=R,R=y,w=k),k=0;w;)k=(R[--w]=R[w]+A[w]+k)/l|0,R[w]=l===R[w]?0:R[w]%l;return k&&(R=[k].concat(R),++N),g(m,R,N)},Y.precision=Y.sd=function(m,w){var y,E,k,M=this;if(m!=null&&m!==!!m)return T(m,1,f),w==null?w=be:T(w,0,8),b(new $(M),m,w);if(!(y=M.c))return null;if(k=y.length-1,E=k*h+1,k=y[k]){for(;k%10==0;k/=10,E--);for(k=y[0];k>=10;k/=10,E++);}return m&&M.e+1>E&&(E=M.e+1),E},Y.shiftedBy=function(m){return T(m,-c,c),this.times("1e"+m)},Y.squareRoot=Y.sqrt=function(){var m,w,y,E,k,M=this,N=M.c,R=M.s,A=M.e,L=ee+4,H=new $("0.5");if(R!==1||!N||!N[0])return new $(!R||R<0&&(!N||N[0])?NaN:N?M:1/0);if(R=Math.sqrt(+v(M)),R==0||R==1/0?(w=_(N),(w.length+A)%2==0&&(w+="0"),R=Math.sqrt(+w),A=C((A+1)/2)-(A<0||A%2),R==1/0?w="5e"+A:(w=R.toExponential(),w=w.slice(0,w.indexOf("e")+1)+A),y=new $(w)):y=new $(R+""),y.c[0]){for(A=y.e,R=A+L,R<3&&(R=0);;)if(k=y,y=H.times(k.plus(I(M,k,L,1))),_(k.c).slice(0,R)===(w=_(y.c)).slice(0,R))if(y.e<A&&--R,w=w.slice(R-3,R+1),w=="9999"||!E&&w=="4999"){if(!E&&(b(k,k.e+ee+2,0),k.times(k).eq(M))){y=k;break}L+=4,R+=4,E=1}else{(!+w||!+w.slice(1)&&w.charAt(0)=="5")&&(b(y,y.e+ee+2,1),m=!y.times(y).eq(M));break}}return b(y,y.e+ee+1,be,m)},Y.toExponential=function(m,w){return m!=null&&(T(m,0,f),m++),Re(this,m,w,1)},Y.toFixed=function(m,w){return m!=null&&(T(m,0,f),m=m+this.e+1),Re(this,m,w)},Y.toFormat=function(m,w,y){var E,k=this;if(y==null)m!=null&&w&&typeof w=="object"?(y=w,w=null):m&&typeof m=="object"?(y=m,m=w=null):y=W;else if(typeof y!="object")throw Error(r+"Argument not an object: "+y);if(E=k.toFixed(m,w),k.c){var M,N=E.split("."),R=+y.groupSize,A=+y.secondaryGroupSize,L=y.groupSeparator||"",H=N[0],j=N[1],ue=k.s<0,re=ue?H.slice(1):H,Ae=re.length;if(A&&(M=R,R=A,A=M,Ae-=M),R>0&&Ae>0){for(M=Ae%R||R,H=re.substr(0,M);M<Ae;M+=R)H+=L+re.substr(M,R);A>0&&(H+=L+re.slice(M)),ue&&(H="-"+H)}E=j?H+(y.decimalSeparator||"")+((A=+y.fractionGroupSize)?j.replace(new RegExp("\\d{"+A+"}\\B","g"),"$&"+(y.fractionGroupSeparator||"")):j):H}return(y.prefix||"")+E+(y.suffix||"")},Y.toFraction=function(m){var w,y,E,k,M,N,R,A,L,H,j,ue,re=this,Ae=re.c;if(m!=null&&(R=new $(m),!R.isInteger()&&(R.c||R.s!==1)||R.lt(te)))throw Error(r+"Argument "+(R.isInteger()?"out of range: ":"not an integer: ")+v(R));if(!Ae)return new $(re);for(w=new $(te),L=y=new $(te),E=A=new $(te),ue=_(Ae),M=w.e=ue.length-re.e-1,w.c[0]=d[(N=M%h)<0?h+N:N],m=!m||R.comparedTo(w)>0?M>0?w:L:R,N=Me,Me=1/0,R=new $(ue),A.c[0]=0;H=I(R,w,0,1),k=y.plus(H.times(E)),k.comparedTo(m)!=1;)y=E,E=k,L=A.plus(H.times(k=L)),A=k,w=R.minus(H.times(k=w)),R=k;return k=I(m.minus(y),E,0,1),A=A.plus(k.times(L)),y=y.plus(k.times(E)),A.s=L.s=re.s,M=M*2,j=I(L,E,M,be).minus(re).abs().comparedTo(I(A,y,M,be).minus(re).abs())<1?[L,E]:[A,y],Me=N,j},Y.toNumber=function(){return+v(this)},Y.toPrecision=function(m,w){return m!=null&&T(m,1,f),Re(this,m,w,2)},Y.toString=function(m){var w,y=this,E=y.s,k=y.e;return k===null?E?(w="Infinity",E<0&&(w="-"+w)):w="NaN":(m==null?w=k<=me||k>=Ve?F(_(y.c),k):V(_(y.c),k,"0"):m===10&&Ce?(y=b(new $(y),ee+k+1,be),w=V(_(y.c),y.e,"0")):(T(m,2,q.length,"Base"),w=G(V(_(y.c),k,"0"),10,m,E,!0)),E<0&&y.c[0]&&(w="-"+w)),w},Y.valueOf=Y.toJSON=function(){return v(this)},Y._isBigNumber=!0,D!=null&&$.set(D),$}function C(D){var I=D|0;return D>0||D===I?I:I-1}function _(D){for(var I,G,z=1,Y=D.length,te=D[0]+"";z<Y;){for(I=D[z++]+"",G=h-I.length;G--;I="0"+I);te+=I}for(Y=te.length;te.charCodeAt(--Y)===48;);return te.slice(0,Y+1||1)}function S(D,I){var G,z,Y=D.c,te=I.c,ee=D.s,be=I.s,me=D.e,Ve=I.e;if(!ee||!be)return null;if(G=Y&&!Y[0],z=te&&!te[0],G||z)return G?z?0:-be:ee;if(ee!=be)return ee;if(G=ee<0,z=me==Ve,!Y||!te)return z?0:!Y^G?1:-1;if(!z)return me>Ve^G?1:-1;for(be=(me=Y.length)<(Ve=te.length)?me:Ve,ee=0;ee<be;ee++)if(Y[ee]!=te[ee])return Y[ee]>te[ee]^G?1:-1;return me==Ve?0:me>Ve^G?1:-1}function T(D,I,G,z){if(D<I||D>G||D!==s(D))throw Error(r+(z||"Argument")+(typeof D=="number"?D<I||D>G?" out of range: ":" not an integer: ":" not a primitive number: ")+String(D))}function P(D){var I=D.c.length-1;return C(D.e/h)==I&&D.c[I]%2!=0}function F(D,I){return(D.length>1?D.charAt(0)+"."+D.slice(1):D)+(I<0?"e":"e+")+I}function V(D,I,G){var z,Y;if(I<0){for(Y=G+".";++I;Y+=G);D=Y+D}else if(z=D.length,++I>z){for(Y=G,I-=z;--I;Y+=G);D+=Y}else I<z&&(D=D.slice(0,I)+"."+D.slice(I));return D}t=p(),t.default=t.BigNumber=t,n.exports?n.exports=t:(e||(e=typeof self<"u"&&self?self:window),e.BigNumber=t)})($te)})(Zz);var Qz=Zz.exports;const or=tM(),ane=Jx(),lne=eM,hne=Qz,ko={trillion:Math.pow(10,12),billion:Math.pow(10,9),million:Math.pow(10,6),thousand:Math.pow(10,3)},Vm={totalLength:0,characteristic:0,forceAverage:!1,average:!1,mantissa:-1,optionalMantissa:!0,thousandSeparated:!1,spaceSeparated:!1,negative:"sign",forceSign:!1,roundingFunction:Math.round,spaceSeparatedAbbreviation:!1},{binarySuffixes:Jz,decimalSuffixes:qC}=or.currentBytes(),nM={general:{scale:1024,suffixes:qC},binary:{scale:1024,suffixes:Jz},decimal:{scale:1e3,suffixes:qC}};function cne(n,e={},t){if(typeof e=="string"&&(e=lne.parseFormat(e)),!ane.validateFormat(e))return"ERROR: invalid format";let i=e.prefix||"",s=e.postfix||"",r=dne(n,e,t);return r=Ine(r,i),r=Hne(r,s),r}function dne(n,e,t){switch(e.output){case"currency":return e=bu(e,or.currentCurrencyDefaultFormat()),Cne(n,e,or);case"percent":return e=bu(e,or.currentPercentageDefaultFormat()),bne(n,e,or,t);case"byte":return e=bu(e,or.currentByteDefaultFormat()),pne(n,e,or,t);case"time":return e=bu(e,or.currentTimeDefaultFormat()),wne(n);case"ordinal":return e=bu(e,or.currentOrdinalDefaultFormat()),mne(n,e,or);default:return zm({instance:n,providedFormat:e})}}function une(n){let e=nM.decimal;return h_(n._value,e.suffixes,e.scale).suffix}function fne(n){let e=nM.binary;return h_(n._value,e.suffixes,e.scale).suffix}function gne(n){let e=nM.general;return h_(n._value,e.suffixes,e.scale).suffix}function h_(n,e,t){let o=e[0],i=Math.abs(n);if(i>=t){for(let s=1;s<e.length;++s){let r=Math.pow(t,s),a=Math.pow(t,s+1);if(i>=r&&i<a){o=e[s],n=n/r;break}}o===e[0]&&(n=n/Math.pow(t,e.length-1),o=e[e.length-1])}return{value:n,suffix:o}}function pne(n,e,t,o){let i=e.base||"binary",s=Object.assign({},Vm,e);const{binarySuffixes:r,decimalSuffixes:a}=t.currentBytes();let h={general:{scale:1024,suffixes:a||qC,marker:"bd"},binary:{scale:1024,suffixes:r||Jz,marker:"b"},decimal:{scale:1e3,suffixes:a||qC,marker:"d"}}[i],{value:c,suffix:d}=h_(n._value,h.suffixes,h.scale);return`${zm({instance:o(c),providedFormat:e,state:t,defaults:t.currentByteDefaultFormat()})}${s.spaceSeparated?" ":""}${d}`}function mne(n,e,t){let o=t.currentOrdinal(),i=Object.assign({},Vm,e),s=zm({instance:n,providedFormat:e,state:t}),r=o(n._value);return`${s}${i.spaceSeparated?" ":""}${r}`}function wne(n){let e=Math.floor(n._value/60/60),t=Math.floor((n._value-e*60*60)/60),o=Math.round(n._value-e*60*60-t*60);return`${e}:${t<10?"0":""}${t}:${o<10?"0":""}${o}`}function bne(n,e,t,o){let i=e.prefixSymbol,s=zm({instance:o(n._value*100),providedFormat:e,state:t}),r=Object.assign({},Vm,e);return i?`%${r.spaceSeparated?" ":""}${s}`:`${s}${r.spaceSeparated?" ":""}%`}function Cne(n,e,t){const o=t.currentCurrency();let i=Object.assign({},e),s=Object.assign({},Vm,i),r,a="",l=!!s.totalLength||!!s.forceAverage||s.average,h=i.currencyPosition||o.position,c=i.currencySymbol||o.symbol;const d=s.spaceSeparatedCurrency!==void 0?s.spaceSeparatedCurrency:s.spaceSeparated;i.lowPrecision===void 0&&(i.lowPrecision=!1),d&&(a=" "),h==="infix"&&(r=a+c+a);let u=zm({instance:n,providedFormat:i,state:t,decimalSeparator:r});return h==="prefix"&&(n._value<0&&s.negative==="sign"?u=`-${a}${c}${u.slice(1)}`:n._value>0&&s.forceSign?u=`+${a}${c}${u.slice(1)}`:u=c+a+u),(!h||h==="postfix")&&(a=!s.spaceSeparatedAbbreviation&&l?"":a,u=u+a+c),u}function yne({value:n,forceAverage:e,lowPrecision:t=!0,abbreviations:o,spaceSeparated:i=!1,totalLength:s=0,roundingFunction:r=Math.round}){let a="",l=Math.abs(n),h=-1;if(e&&o[e]&&ko[e]?(a=o[e],n=n/ko[e]):l>=ko.trillion||t&&r(l/ko.trillion)===1?(a=o.trillion,n=n/ko.trillion):l<ko.trillion&&l>=ko.billion||t&&r(l/ko.billion)===1?(a=o.billion,n=n/ko.billion):l<ko.billion&&l>=ko.million||t&&r(l/ko.million)===1?(a=o.million,n=n/ko.million):(l<ko.million&&l>=ko.thousand||t&&r(l/ko.thousand)===1)&&(a=o.thousand,n=n/ko.thousand),a&&(a=(i?" ":"")+a),s){let d=n<0,u=n.toString().split(".")[0],f=d?u.length-1:u.length;h=Math.max(s-f,0)}return{value:n,abbreviation:a,mantissaPrecision:h}}function _ne({value:n,characteristicPrecision:e}){let[t,o]=n.toExponential().split("e"),i=+t;if(!e)return{value:i,abbreviation:`e${o}`};let s=1;return s<e&&(i=i*Math.pow(10,e-s),o=+o-(e-s),o=o>=0?`+${o}`:o),{value:i,abbreviation:`e${o}`}}function Nw(n){let e="";for(let t=0;t<n;t++)e+="0";return e}function Sne(n,e){let t=n.toString(),[o,i]=t.split("e"),[s,r=""]=o.split(".");if(+i>0)t=s+r+Nw(i-r.length);else{let a=".";+s<0?a=`-0${a}`:a=`0${a}`;let l=(Nw(-i-1)+Math.abs(s)+r).substr(0,e);l.length<e&&(l+=Nw(e-l.length)),t=a+l}return+i>0&&e>0&&(t+=`.${Nw(e)}`),t}function vne(n,e,t=Math.round){return n.toString().indexOf("e")!==-1?Sne(n,e):new hne(t(+`${n}e+${e}`)/Math.pow(10,e)).toFixed(e)}function Rne(n,e,t,o,i,s){if(o===-1)return n;let r=vne(e,o,s),[a,l=""]=r.toString().split(".");if(l.match(/^0+$/)&&(t||i))return a;let h=l.match(/0+$/);return i&&h?`${a}.${l.toString().slice(0,h.index)}`:r.toString()}function Ene(n,e,t,o){let i=n,[s,r]=i.toString().split(".");if(s.match(/^-?0$/)&&t)return r?`${s.replace("0","")}.${r}`:s.replace("0","");const a=e<0&&s.indexOf("-")===0;if(a&&(s=s.slice(1),i=i.slice(1)),s.length<o){let l=o-s.length;for(let h=0;h<l;h++)i=`0${i}`}return a&&(i=`-${i}`),i.toString()}function kne(n,e){let t=[],o=0;for(let i=n;i>0;i--)o===e&&(t.unshift(i),o=0),o++;return t}function Tne(n,e,t,o,i){let s=o.currentDelimiters(),r=s.thousands;i=i||s.decimal;let a=s.thousandsSize||3,l=n.toString(),h=l.split(".")[0],c=l.split(".")[1];const d=e<0&&h.indexOf("-")===0;return t&&(d&&(h=h.slice(1)),kne(h.length,a).forEach((f,p)=>{h=h.slice(0,f+p)+r+h.slice(f+p)}),d&&(h=`-${h}`)),c?l=h+i+c:l=h,l}function xne(n,e){return n+e}function Mne(n,e,t){return e===0?n:+n==0?n.replace("-",""):e>0?`+${n}`:t==="sign"?n:`(${n.replace("-","")})`}function Ine(n,e){return e+n}function Hne(n,e){return n+e}function zm({instance:n,providedFormat:e,state:t=or,decimalSeparator:o,defaults:i=t.currentDefaults()}){let s=n._value;if(s===0&&t.hasZeroFormat())return t.getZeroFormat();if(!isFinite(s))return s.toString();let r=Object.assign({},Vm,i,e),a=r.totalLength,l=a?0:r.characteristic,h=r.optionalCharacteristic,c=r.forceAverage,d=r.lowPrecision,u=!!a||!!c||r.average,f=a?-1:u&&e.mantissa===void 0?0:r.mantissa,p=a?!1:e.optionalMantissa===void 0?f===-1:r.optionalMantissa,C=r.trimMantissa,_=r.thousandSeparated,S=r.spaceSeparated,T=r.negative,P=r.forceSign,F=r.exponential,V=r.roundingFunction,D="";if(u){let G=yne({value:s,forceAverage:c,lowPrecision:d,abbreviations:t.currentAbbreviations(),spaceSeparated:S,roundingFunction:V,totalLength:a});s=G.value,D+=G.abbreviation,a&&(f=G.mantissaPrecision)}if(F){let G=_ne({value:s,characteristicPrecision:l});s=G.value,D=G.abbreviation+D}let I=Rne(s.toString(),s,p,f,C,V);return I=Ene(I,s,h,l),I=Tne(I,s,_,t,o),(u||F)&&(I=xne(I,D)),(P||s<0)&&(I=Mne(I,s,T)),I}function bu(n,e){if(!n)return e;let t=Object.keys(n);return t.length===1&&t[0]==="output"?e:n}var Ane=n=>({format:(...e)=>cne(...e,n),getByteUnit:(...e)=>gne(...e,n),getBinaryByteUnit:(...e)=>fne(...e,n),getDecimalByteUnit:(...e)=>une(...e,n),formatOrDefault:bu});const sl=Qz;function One(n,e,t){let o=new sl(n._value),i=e;return t.isNumbro(e)&&(i=e._value),i=new sl(i),n._value=o.plus(i).toNumber(),n}function e2(n,e,t){let o=new sl(n._value),i=e;return t.isNumbro(e)&&(i=e._value),i=new sl(i),n._value=o.minus(i).toNumber(),n}function Dne(n,e,t){let o=new sl(n._value),i=e;return t.isNumbro(e)&&(i=e._value),i=new sl(i),n._value=o.times(i).toNumber(),n}function Nne(n,e,t){let o=new sl(n._value),i=e;return t.isNumbro(e)&&(i=e._value),i=new sl(i),n._value=o.dividedBy(i).toNumber(),n}function Pne(n,e,t){let o=e;return t.isNumbro(e)&&(o=e._value),n._value=o,n}function Lne(n,e,t){let o=t(n._value);return e2(o,e,t),Math.abs(o._value)}var Wne=n=>({add:(e,t)=>One(e,t,n),subtract:(e,t)=>e2(e,t,n),multiply:(e,t)=>Dne(e,t,n),divide:(e,t)=>Nne(e,t,n),set:(e,t)=>Pne(e,t,n),difference:(e,t)=>Lne(e,t,n),BigNumber:sl});const $ne="2.5.0",aa=tM(),Fne=Jx(),Bne=rne(Mn),Vne=Xz();let Oh=Ane(Mn),ac=Wne(Mn);const zne=eM;class t2{constructor(e){this._value=e}clone(){return Mn(this._value)}format(e={}){return Oh.format(this,e)}formatCurrency(e){return typeof e=="string"&&(e=zne.parseFormat(e)),e=Oh.formatOrDefault(e,aa.currentCurrencyDefaultFormat()),e.output="currency",Oh.format(this,e)}formatTime(e={}){return e.output="time",Oh.format(this,e)}binaryByteUnits(){return Oh.getBinaryByteUnit(this)}decimalByteUnits(){return Oh.getDecimalByteUnit(this)}byteUnits(){return Oh.getByteUnit(this)}difference(e){return ac.difference(this,e)}add(e){return ac.add(this,e)}subtract(e){return ac.subtract(this,e)}multiply(e){return ac.multiply(this,e)}divide(e){return ac.divide(this,e)}set(e){return ac.set(this,n2(e))}value(){return this._value}valueOf(){return this._value}}function n2(n){let e=n;return Mn.isNumbro(n)?e=n._value:typeof n=="string"?e=Mn.unformat(n):isNaN(n)&&(e=NaN),e}function Mn(n){return new t2(n2(n))}Mn.version=$ne;Mn.isNumbro=function(n){return n instanceof t2};Mn.language=aa.currentLanguage;Mn.registerLanguage=aa.registerLanguage;Mn.setLanguage=aa.setLanguage;Mn.languages=aa.languages;Mn.languageData=aa.languageData;Mn.zeroFormat=aa.setZeroFormat;Mn.defaultFormat=aa.currentDefaults;Mn.setDefaults=aa.setDefaults;Mn.defaultCurrencyFormat=aa.currentCurrencyDefaultFormat;Mn.validate=Fne.validate;Mn.loadLanguagesInNode=Bne.loadLanguagesInNode;Mn.unformat=Vne.unformat;Mn.BigNumber=ac.BigNumber;var Une=Mn,Dh=Fte(Une);const Yne={useGrouping:!1,maximumFractionDigits:20};function Gne(n,e){const{numericFormat:t}=e,o=t&&t.culture||"-",i=t&&t.pattern;if(typeof o<"u"&&!Dh.languages()[o]){const s=o.replace("-",""),r=Dh.allLanguages?Dh.allLanguages[o]:Dh[s];r&&Dh.registerLanguage(r)}return Dh.setLanguage(o),Dh(n).format(i||"0")}function jne(n,e){const{numericFormat:t,locale:o}=e;return new Intl.NumberFormat(o,t??Yne).format(n)}function o2(n){const{numericFormat:e}=n;return e?.pattern!==void 0||e?.culture!==void 0}const qne="numeric",_1=new WeakSet;function i2(n,e){return di(n)&&(o2(e)?n=Gne(n,e):n=jne(n,e)),n}function c_(n,e,t,o,i,s,r){if(o2(r)&&!_1.has(r.instance)&&(_1.add(r.instance),fh("The `numericFormat.pattern` and `numericFormat.culture` options are deprecated and will be removed in the next major release. Pass `Intl.NumberFormat` options directly to `numericFormat` and use the `locale` cell property instead of `culture`.\n\nMigration guide: https://handsontable.com/docs/migration-from-16.2-to-17.0/\n`numericFormat` documentation: https://handsontable.com/docs/api/options/#numericformat\n`locale` documentation: https://handsontable.com/docs/api/options/#locale")),di(n.getDataAtCell(t,o))){let l=[];if(Array.isArray(r.className))l=r.className;else{const h=r.className??"";h.length&&(l=h.split(" "))}l.indexOf("htLeft")<0&&l.indexOf("htCenter")<0&&l.indexOf("htRight")<0&&l.indexOf("htJustify")<0&&l.push("htRight"),l.indexOf("htNumeric")<0&&l.push("htNumeric"),r.className=l.join(" "),e.dir="ltr"}ia.apply(this,[n,e,t,o,i,s,r])}c_.valueFormatter=i2;c_.RENDERER_TYPE=qne;const Kne="password";function Xne(n,e){const t=e.hashLength||bt(n).length,o=e.hashSymbol||"*";let i="";for(let s=0;s<t;s++)i+=o;return i}function d_(n,e,t,o,i,s){Qc(e,s,n.getSettings().sanitizer)}d_.valueFormatter=Xne;d_.RENDERER_TYPE=Kne;const Zne="select";function oM(n,e,t,o,i,s,r){ia.apply(this,[n,e,t,o,i,s,r])}oM.RENDERER_TYPE=Zne;const Qne="time",S1=new WeakSet;function iM(n,e,t,o,i,s,r){!S1.has(r.instance)&&typeof r.timeFormat=="string"&&(S1.add(r.instance),fh("The `time` cell type with string-based `timeFormat` (moment.js) is deprecated. In the next major release, `time` will accept only Intl.DateTimeFormat options (object). To start migrating, use the `intl-time` cell type now; it will become the `time` cell type after the next major release (the `intl-time` will become an alias for `time`).\n\nMigration guide: https://handsontable.com/docs/migration-from-16.2-to-17.0/\n`time` cell type: https://handsontable.com/docs/time-cell-type/")),ia.apply(this,[n,e,t,o,i,s,r]),e.dir="ltr"}iM.RENDERER_TYPE=Qne;function Jne(){ai(wf),ai(Xy),ai(Kx),ai(qx),ai(Zx),ai(jx),ai(l_),ai(Qx),ai(c_),ai(d_),ai(oM),ai(ia),ai(iM)}const eoe="autocomplete";function u_(n,e){const t=s=>ne(s)&&J(s.key)&&J(s.value),o=s=>t(s)?o(s.key)&&o(s.value):s==null;let i=n;if(o(i)&&(i=""),this.allowEmpty&&i===""){e(!0);return}this.strict&&this.source?typeof this.source=="function"?this.source(i,v1(i,e)):v1(i,e)(this.source):e(!0)}u_.VALIDATOR_TYPE=eoe;function v1(n,e){const t=n;return function(o){let i=!1;for(let s=0,r=o.length;s<r;s++)if(uh(t,o[s])){i=!0;break}e(i)}}const toe="date";function sM(n,e){const t=yF(yz,this.instance);let o=n,i=!0;o==null&&(o="");let s=Z(o,this.dateFormat||t.defaultDateFormat,!0).isValid(),r=Z(new Date(o)).isValid()||s;if(this.allowEmpty&&o===""&&(r=!0,s=!0),r||(i=!1),!r&&s&&(i=!0),r&&!s)if(this.correctFormat===!0){const a=noe(o,this.dateFormat);this.instance.setDataAtCell(this.visualRow,this.visualCol,a,"dateValidator"),i=!0}else i=!1;e(i)}sM.VALIDATOR_TYPE=toe;function noe(n,e){const t=Z(Ree(n)),o=Z(n,e),i=n.search(/[A-Za-z]/g)>-1;let s;return t.isValid()&&t.format("x")===o.format("x")||!o.isValid()||i?s=t:s=o,s.format(e)}const ooe="dropdown";function rM(n,e){u_.apply(this,[n,e])}rM.VALIDATOR_TYPE=ooe;const ioe="intl-date",soe=`Source data warning ([itemsCount]). Invalid value for "intl-date" cell type.
|
|
217
|
+
|
|
218
|
+
[affectedCells]
|
|
219
|
+
|
|
220
|
+
Expected a value compatible with the ISO 8601 date format ("YYYY-MM-DD").`;function roe(n,e){return e.allowEmpty&&ht(n)?!0:zx(n)}function aM(n,e){if(this.allowEmpty&&ht(n)){e(!0);return}e(zx(n))}aM.VALIDATOR_TYPE=ioe;const aoe="intl-time",loe=`Source data warning ([itemsCount]). Invalid value for "intl-time" cell type.
|
|
221
|
+
|
|
222
|
+
[affectedCells]
|
|
223
|
+
|
|
224
|
+
Expected a value compatible with the 24-hour time format ("HH:mm", "HH:mm:ss" or "HH:mm:ss.SSS").`;function hoe(n,e){return e.allowEmpty&&ht(n)?!0:Ux(n)}function lM(n,e){if(this.allowEmpty&&ht(n)){e(!0);return}e(Ux(n))}lM.VALIDATOR_TYPE=aoe;const coe="multiselect";function hM(n,e){let t=n;if(t==null&&(t=""),this.allowEmpty&&t===""){e(!0);return}else if(!this.allowEmpty&&t===""){e(!1);return}if(!Array.isArray(t)){e(!1);return}if(Array.isArray(t)&&t.length===0){e(!0);return}this.source?typeof this.source=="function"?this.source(t,R1(t,e)):R1(t,e)(this.source):e(!0)}hM.VALIDATOR_TYPE=coe;function R1(n,e){const t=n;return function(o){let i=!0;for(let s=0,r=t.length;s<r;s++){let a=!1;for(let l=0,h=o.length;l<h;l++)if(Ln(t[s])&&!Ln(o[l])||!Ln(t[s])&&Ln(o[l])){a=!1;break}else(Ln(t[s])&&Ln(o[l])&&uh(t[s],o[l])||typeof t[s]=="string"&&typeof o[l]=="string"&&t[s]===o[l])&&(a=!0);if(!a){i=!1;break}}e(i)}}const doe="numeric";function cM(n,e){let t=n;t==null&&(t=""),this.allowEmpty&&t===""?e(!0):e(t===""?!1:di(n))}cM.VALIDATOR_TYPE=doe;const uoe=["YYYY-MM-DDTHH:mm:ss.SSSZ","X","x"],foe="time";function dM(n,e){const t=this.timeFormat||"h:mm:ss a";let o=!0,i=n;i===null&&(i=""),i=/^\d{3,}$/.test(i)?parseInt(i,10):i;const s=/^\d{1,2}$/.test(i);s&&(i+=":00");const r=Z(i,uoe,!0).isValid()?Z(i):Z(i,t);let a=r.isValid(),l=Z(i,t,!0).isValid()&&!s;if(this.allowEmpty&&i===""&&(a=!0,l=!0),a||(o=!1),!a&&l&&(o=!0),a&&!l)if(this.correctFormat===!0){const h=r.format(t);this.instance.setDataAtCell(this.visualRow,this.visualCol,h,"timeValidator"),o=!0}else o=!1;e(o)}dM.VALIDATOR_TYPE=foe;function goe(){Aa(u_),Aa(rM),Aa(sM),Aa(aM),Aa(lM),Aa(hM),Aa(cM),Aa(dM)}function s2(n){return ne(n)&&n.value!==void 0?n.value:n}function r2(n,e,t){const o=this.getSourceDataAtCell(this.toPhysicalRow(e),this.toPhysicalColumn(t));return Ln(o)?Ln(n)?n:{key:n,value:n}:n}const poe="autocomplete",moe={CELL_TYPE:poe,editor:Cx,renderer:wf,validator:u_,valueGetter:s2,valueSetter:r2,parsePastedValue:!0};function woe(n,e,t){const{checkedTemplate:o,uncheckedTemplate:i}=this.getCellMeta(e,t),s=bt(n),r=s===bt(o),a=s===bt(i);return r||a?r?o:i:n}const boe="checkbox",Coe={CELL_TYPE:boe,editor:xV,renderer:Kx,valueSetter:woe},yoe="date",E1=new WeakSet;function a2(n,e,t,o,i,s,r){!E1.has(r.instance)&&typeof r.dateFormat=="string"&&(E1.add(r.instance),fh("The `date` cell type with string-based `dateFormat` (moment.js) is deprecated. In the next major release, `date` will accept only Intl.DateTimeFormat options (object). To start migrating, use the `intl-date` cell type now; it will become the `date` cell type after the next major release (the `intl-date` will become an alias for `date`).\n\nMigration guide: https://handsontable.com/docs/migration-from-16.2-to-17.0/\n`date` cell type: https://handsontable.com/docs/date-cell-type/")),wf.apply(this,[n,e,t,o,i,s,r])}a2.RENDERER_TYPE=yoe;const _oe="date",Soe={CELL_TYPE:_oe,editor:_z,renderer:a2,validator:sM};function voe(n){return s2.call(this,n)}function Roe(n,e,t,o){return r2.call(this,n,e,t,o)}const Eoe="dropdown",koe={CELL_TYPE:Eoe,editor:Sz,renderer:qx,validator:rM,filter:!1,strict:!0,valueGetter:voe,valueSetter:Roe,parsePastedValue:!0},Toe="handsontable",xoe={CELL_TYPE:Toe,editor:bx,renderer:Zx},Moe="intl-date",Ioe={CELL_TYPE:Moe,editor:Ez,renderer:l_,validator:aM,sourceDataValidator:roe,sourceDataWarningMessage:soe,valueFormatter:Kz},Hoe="intl-time",Aoe={CELL_TYPE:Hoe,editor:kz,renderer:Qx,validator:lM,sourceDataValidator:hoe,sourceDataWarningMessage:loe,valueFormatter:Wte},f_="ht-multi-select",uM=`${f_}-chip`,i0=`${f_}-chip-remove`,Ooe=`${f_}-chip-label`,l2=`${f_}-overflow`,k1=new WeakSet,va=new WeakMap,av=new WeakMap;function s0(n,e){return Ln(n)?n[e]:n}function h2(n){if(n==null||n==="")return[];if(Array.isArray(n))return n;if(typeof n=="string")try{const e=JSON.parse(n);return Array.isArray(e)?e:[e]}catch{return n.trim()?[n]:[]}return[n]}function Doe(n,e,t,o,i){const s=n.createElement("span"),r=s0(e,"value");B(s,uM),s.dataset.row=o,s.dataset.prop=i,s.title=r;const a=n.createElement("span");B(a,Ooe),a.textContent=r,s.appendChild(a);const l=n.createElement("span");return B(l,i0),t&&l.setAttribute(...al()),s.dataset.key=s0(e,"key"),s.appendChild(l),s}function Noe(n,e){const t=n.createElement("span");return B(t,l2),t.textContent=`+${e}`,t}function Poe(n,e){if(av.has(n))return;av.set(n,new Wi(n)),av.get(n).addEventListener(n.rootElement,"click",o=>{if(!_e(o.target,i0))return;o.preventDefault(),o.stopPropagation();const i=o.target.closest(`.${uM}`);if(!i)return;const s=i.dataset.row,r=i.dataset.prop,a=n.toPhysicalRow(s),l=typeof r=="string"?r:n.toPhysicalColumn(r),h=n.propToCol(r),c=n.getSourceDataAtCell(a,h),d=i.dataset.key,u=Foe(h2(c),d);n.setSourceDataAtCell(a,l,u,`${e}-renderer`),n.render()}),n.addHook("beforeOnCellMouseDown",o=>{_e(o.target,i0)&&es(o)})}function Loe(n,e){const t=n.getColWidth(e);return va.has(n)?va.get(n)?.[e]?.width!==t&&va.set(n,{...va.get(n),[e]:{width:t}}):va.set(n,{[e]:{width:t}}),k1.has(n)||(n.addHook("beforeColumnResize",(o,i)=>{va.get(n)?.[i]?.width!==o&&va.set(n,{...va.get(n),[i]:{width:o}})}),k1.add(n)),va.get(n)?.[e]?.width??t}function Woe(n,e,t){const o=n,i=e.querySelectorAll(`.${uM}`);for(let u=0;u<i.length;u++)i[u].style.display="";if(o===null||i.length===0)return;let s=e.querySelector(`.${l2}`);s?(s.style.display="",s.style.visibility="hidden"):(s=Noe(t,i.length),s.style.visibility="hidden",e.appendChild(s));const r=t.defaultView.getComputedStyle(e),a=parseFloat(r.gap)||0,l=s.offsetWidth;let h=0,c=0;for(let u=0;u<i.length;u++){const f=i[u].offsetWidth,p=u<i.length-1?a:0,C=h+f+p,_=u<i.length-1,S=o-(_?l+a:0);if(C<=S)h=C,c+=1;else break}const d=i.length-c;if(d>0){for(let u=c;u<i.length;u++)i[u].style.display="none";s.textContent=`+${d}`,s.style.visibility="visible"}else s.style.display="none"}function $oe(n,e,t){Woe(n,e,t)}function Foe(n,e){return n.filter(t=>s0(t,"key")!==e)}const c2="multiselect",Boe="ht-multi-select-renderer",Voe="ht-multi-select-chips-container";function d2(n,e,t,o,i,s,r){Xy.apply(this,[n,e,t,o,i,s,r]);let a=s;if(!a&&r.placeholder){a=r.placeholder,a=bt(a),ph(e,a);return}const{rootDocument:l}=n,h=n.getSettings().ariaTags,c=n.toPhysicalRow(t),d=typeof o=="string"?o:n.toPhysicalColumn(o),u=n.getSourceDataAtCell(c,d),f=h2(u);if(ol(e),B(e,Boe),f.length===0){e.appendChild(l.createTextNode(""));return}const p=l.createElement("div");p.className=Voe,f.forEach(_=>{const S=Doe(l,_,h,t,i);p.appendChild(S)}),e.appendChild(p),Poe(n,c2);const C=Loe(n,o);$oe(C,p,l)}d2.RENDERER_TYPE=c2;function u2(n){return Array.isArray(n)?uG(n.map(e=>Ln(e)?e.value:e),", "):n}function zoe(n,e,t){if(Array.isArray(n)){const o=this.getSourceDataAtCell(this.toPhysicalRow(e),t);if(Array.isArray(o)&&o.length>0&&Ln(o[0]))return n.map(i=>Ln(i)?i:{key:i,value:i})}return n}const Uoe="multiselect",Yoe={CELL_TYPE:Uoe,_complexDataFormat:!0,editor:zz,renderer:d2,validator:hM,valueGetter:u2,valueSetter:zoe,parsePastedValue:!0};function Goe(n){const e=n?.numericFormat?.culture??n?.locale;if(typeof e=="string"&&e.length>0)try{const o=new Intl.NumberFormat(e).formatToParts(1.1).find(({type:i})=>i==="decimal");if(o?.value==="."||o?.value===",")return o.value}catch{}const t=n?.numericFormat?.pattern;if(typeof t=="string"){const o=t.lastIndexOf("."),i=t.lastIndexOf(",");if(o>-1&&i>-1)return o>i?".":",";if(i>-1&&o===-1||o>-1&&i===-1)return"."}}function joe(n,e,t,o){if(typeof n!="string")return n;const i=Goe(o);if(V4(n)||vF(n,i)){const s=z4(n,{decimalSeparator:i});return Xg(s)?n:s}return n}const qoe="numeric",Koe={CELL_TYPE:qoe,editor:Tz,renderer:c_,validator:cM,dataType:"number",valueSetter:joe,valueFormatter:i2},Xoe="password",Zoe={CELL_TYPE:Xoe,editor:xz,renderer:d_,copyable:!1},Qoe="select",Joe={CELL_TYPE:Qoe,editor:Mz,renderer:oM},eie="time",tie={CELL_TYPE:eie,editor:Iz,renderer:iM,validator:dM};function nie(){Ei(moe),Ei(Coe),Ei(Soe),Ei(koe),Ei(xoe),Ei(Ioe),Ei(Aoe),Ei(Yoe),Ei(Koe),Ei(Zoe),Ei(Joe),Ei(cV),Ei(tie)}const _p=[];function oie(n,e){return!!n[e]}function f2(n,e){if(Array.isArray(n)){typeof e!="string"&&U("registerConflict(blockedTargetKeys[], incompatibleSettingKeys) expects incompatibleSettingKeys to be a string.");for(let o=0;o<n.length;o+=1)_p.push({blockedKey:n[o],incompatibleSettingKey:e});return}typeof n!="string"&&U("registerConflict expects a string blocked target key when the first argument is not an array.");const t=n;if(Array.isArray(e)){for(let o=0;o<e.length;o+=1){const i=e[o];typeof i!="string"&&U("registerConflict(blockedTargetKey, incompatibleSettingKeys) expects incompatibleSettingKeys to be a string array."),_p.push({blockedKey:t,incompatibleSettingKey:i})}return}if(typeof e=="string"){_p.push({blockedKey:t,incompatibleSettingKey:e});return}U("Invalid registerConflict arguments.")}function iie(n,e){for(let t=0;t<_p.length;t+=1){const o=_p[t];if(o.blockedKey===e&&oie(n,o.incompatibleSettingKey))return o}return null}function g2(n,e){if(e.has(n))throw new TypeError("Cannot initialize the same private elements twice on an object")}function sie(n,e){return e.get?e.get.call(n):e.value}function rie(n,e,t){if(e.set)e.set.call(n,t);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=t}}function p2(n,e,t){if(!e.has(n))throw new TypeError("attempted to "+t+" private field on non-instance");return e.get(n)}function Sn(n,e){var t=p2(n,e,"get");return sie(n,t)}function T1(n,e,t){g2(n,e),e.set(n,t)}function vd(n,e,t){var o=p2(n,e,"set");return rie(n,o,t),t}function aie(n,e,t){if(!e.has(n))throw new TypeError("attempted to get private field on non-instance");return t}function lie(n,e){g2(n,e),e.add(n)}const x1=new Map([["plugin",J4],["cell-type",PB],["editor",CF],["renderer",xF],["validator",MF]]),m2=Symbol("mainSetting"),hie="base",Pw=[];let Nh=null;var vn=new WeakMap,yl=new WeakMap,M1=new WeakSet;class rt{static get PLUGIN_KEY(){return hie}static get SETTING_KEYS(){return[this.PLUGIN_KEY]}static get DEFAULT_SETTINGS(){return{}}static get SETTINGS_VALIDATORS(){return null}init(){this.pluginName=this.hot.getPluginName(this),this.updatePluginSettings(this.hot.getSettings()[this.constructor.PLUGIN_KEY]);const e=this.constructor.PLUGIN_DEPS,t=Array.isArray(e)?e:[];if(t.length>0){const i=[];if(t.forEach(s=>{const[r,a]=s.split(":");x1.has(r)||U(`Unknown plugin dependency type "${r}" was found.`),x1.get(r)(a)||i.push(` - ${a} (${r})`)}),i.length>0){const s=[`The ${this.pluginName} plugin requires the following modules:
|
|
225
|
+
`,`${i.join(`
|
|
226
|
+
`)}
|
|
227
|
+
`].join("");Pw.push(s)}}if(Nh||(Nh=TF()),Nh.indexOf(this.pluginName)>=0&&Nh.splice(Nh.indexOf(this.pluginName),1),this.hot.addHookOnce("afterPluginsInitialized",()=>{if(this.isEnabled&&this.isEnabled()){if(this.isHardConflictBlocked()){this.hot.getSettings()[this.constructor.PLUGIN_KEY]=!1;return}this.enablePlugin()}}),Nh.length===0){if(Pw.length>0){const i=[`${Pw.join(`
|
|
228
|
+
`)}
|
|
229
|
+
`,"You have to import and register them manually."].join("");Pw.length=0,U(i)}this.hot.runHooks("afterPluginsInitialized")}this.initialized=!0}isHardConflictBlocked(){const e=this.constructor.PLUGIN_KEY,t=iie(this.hot.getSettings(),e);if(t){const{incompatibleSettingKey:o}=t;return Ie(pt`The \`${e}\` plugin cannot be used with the \`${o}\` option.\x20
|
|
230
|
+
This combination is not supported. The plugin will remain disabled.`),!0}return!1}enablePlugin(){this.enabled=!0}disablePlugin(){this.eventManager?.clear(),this.clearHooks(),this.enabled=!1}getSetting(e){const t=this.constructor.DEFAULT_SETTINGS,o=this.constructor.SETTINGS_VALIDATORS;if(e===void 0)return ne(Sn(this,vn))?Ob(Sn(this,vn),t):Sn(this,vn);let i;if((Array.isArray(Sn(this,vn))||ne(Sn(this,vn)))&&t[m2]===e)Array.isArray(Sn(this,vn))?i=Sn(this,vn):i=Sn(this,vn)[e]??t[e];else if(e.includes(".")){const s=CC(Sn(this,vn),e),r=CC(t,e);ne(s)?i=Ob(s,r):i=s!==void 0?s:r}else ne(Sn(this,vn))?i=Ob(Sn(this,vn),t)[e]:i=t[e];if(typeof i=="function"&&o&&typeof o=="object"){const s=o[e];if(s&&typeof s=="function")return(...r)=>{const a=i(...r);if(s(a)===!1){const h=r.map(d=>typeof d=="string"?`"${d}"`:"").join(", "),c=r.length>0?h:"";Ie(`${this.pluginName} Plugin: "${e}" function (${c}) result is not valid and will be ignored.`);return}return a}}return i}updatePluginSettings(e){const t=this.constructor.SETTINGS_VALIDATORS;if(t&&typeof t=="function"&&typeof e!="object"){if(t(e)===!1){Ie(`${this.pluginName} Plugin: option is not valid and it will be ignored.`);return}return vd(this,vn,e),Sn(this,vn)}return t&&typeof t=="object"&&typeof e=="object"?((Sn(this,vn)===null||typeof Sn(this,vn)!="object")&&vd(this,vn,{...this.constructor.DEFAULT_SETTINGS}),Object.keys(t).forEach(o=>{if(!(o in e))return;const i=t[o];if((i?i(e[o]):!0)===!1){Ie(`${this.pluginName} Plugin: "${o}" option is not valid and it will be ignored.`);return}Sn(this,vn)[o]=e[o]}),Sn(this,vn)):(vd(this,vn,e),e)}addHook(e,t,o){Sn(this,yl)[e]=Sn(this,yl)[e]||[];const i=Sn(this,yl)[e];this.hot.addHook(e,t,o),i.push(t),Sn(this,yl)[e]=i}removeHooks(e){O(Sn(this,yl)[e]||[],t=>{this.hot.removeHook(e,t)})}clearHooks(){const e=Sn(this,yl);tt(e,(t,o)=>this.removeHooks(o)),e.length=0}callOnPluginsReady(e){this.isPluginsReady?e():this.pluginsInitializedCallbacks.push(e)}onAfterPluginsInitialized(){O(this.pluginsInitializedCallbacks,e=>e()),this.pluginsInitializedCallbacks.length=0,this.isPluginsReady=!0}onUpdateSettings(e){if(!this.isEnabled)return;const t=aie(this,M1,cie).call(this,e);if(this.enabled&&!this.isEnabled()&&this.disablePlugin(),!this.enabled&&this.isEnabled()){if(this.isHardConflictBlocked())return;this.enablePlugin()}if(this.enabled&&this.isEnabled()&&this.isHardConflictBlocked()){this.disablePlugin();return}this.enabled&&this.isEnabled()&&t&&(this.updatePluginSettings(e[this.constructor.PLUGIN_KEY]),this.updatePlugin(e))}updatePlugin(){}destroy(){vd(this,vn,null),this.eventManager?.destroy(),this.clearHooks(),tt(this,(e,t)=>{t!=="hot"&&(this[t]=null)}),delete this.t,delete this.hot}constructor(e){lie(this,M1),T1(this,vn,{writable:!0,value:void 0}),T1(this,yl,{writable:!0,value:void 0}),vd(this,vn,null),this.eventManager=new Wi(this),this.pluginName=null,this.pluginsInitializedCallbacks=[],this.isPluginsReady=!1,this.enabled=!1,this.initialized=!1,vd(this,yl,{}),ll(this,"hot",e,{writable:!1}),Nh=null,this.hot.addHook("afterPluginsInitialized",()=>this.onAfterPluginsInitialized()),this.hot.addHook("afterUpdateSettings",t=>this.onUpdateSettings(t)),this.hot.addHook("beforeInit",()=>this.init())}}function cie(n){if(!n)return!1;const e=this.constructor.SETTING_KEYS;if(typeof e=="boolean")return e;for(let t=0;t<e.length;t++)if(n[e[t]]!==void 0)return!0;return!1}let w2=class{addRow(e,t){this.columns.length&&U("Doesn't support multi-dimensional table"),this.rows.length||(this.container=this.createContainer(this.hot.rootElement.className));const o={row:e};this.rows.push(o),this.samples=t,this.table=this.createTable(this.hot.table.className),this.table.colGroup.appendChild(this.createColGroupsCol(e)),this.table.tr.appendChild(this.createRow(e)),this.container.container.appendChild(this.table.fragment),o.table=this.table.table}addColumnHeadersRow(e){const t=this.hot.getColHeader(0);if(t!=null){const o={row:-1};this.rows.push(o),this.container=this.createContainer(this.hot.rootElement.className),this.samples=e,this.table=this.createTable(this.hot.table.className),this.table.colGroup.appendChild(this.createColGroupsCol()),this.appendColumnHeadersRow(),this.container.container.appendChild(this.table.fragment),o.table=this.table.table}}addColumn(e,t){this.rows.length&&U("Doesn't support multi-dimensional table"),this.columns.length||(this.container=this.createContainer(this.hot.rootElement.className));const o={col:e};this.columns.push(o),this.samples=t,this.table=this.createTable(this.hot.table.className),this.getSetting("useHeaders")&&this.hot.getColHeader(e)!==null&&this.hot.view.appendColHeader(e,this.table.th,void 0,-1),this.table.tBody.appendChild(this.createCol(e)),this.container.container.appendChild(this.table.fragment),o.table=this.table.table}getHeights(e){this.injected||this.injectTable(),O(this.rows,t=>{const{height:o}=t.table.getBoundingClientRect();e(t.row,Math.ceil(o))})}getWidths(e){this.injected||this.injectTable(),O(this.columns,t=>{const{width:o}=t.table.getBoundingClientRect();e(t.col,Math.ceil(o))})}setSettings(e){this.settings=e}setSetting(e,t){this.settings||(this.settings={}),this.settings[e]=t}getSettings(){return this.settings}getSetting(e){return this.settings?this.settings[e]:null}createColGroupsCol(e){const t=this.hot.rootDocument.createDocumentFragment();return this.hot.hasRowHeaders()&&t.appendChild(this.createColElement(-1,-1)),this.samples.forEach(o=>{O(o.strings,i=>{t.appendChild(this.createColElement(i.col,e))})}),t}createRow(e){const{rootDocument:t}=this.hot,o=t.createDocumentFragment(),i=t.createElement("th");return this.hot.hasRowHeaders()&&(this.hot.view.appendRowHeader(e,i),o.appendChild(i)),this.samples.forEach(s=>{O(s.strings,r=>{const a=r.col,l=this.hot.getCellMeta(e,a),h=this.hot.getCellRenderer(l),c=t.createElement("td");c.setAttribute("ghost-table",1),h(this.hot,c,e,a,this.hot.colToProp(a),r.value,l),o.appendChild(c)})}),o}appendColumnHeadersRow(){const{rootDocument:e}=this.hot,t=e.createDocumentFragment(),o=[];if(this.hot.hasRowHeaders()){const i=e.createElement("th");o.push([-1,i]),t.appendChild(i)}this.samples.forEach(i=>{O(i.strings,s=>{const r=s.col,a=e.createElement("th");o.push([r,a]),t.appendChild(a)})}),this.table.tHead.appendChild(t),O(o,i=>{const[s,r]=i;this.hot.view.appendColHeader(s,r)})}createCol(e){const{rootDocument:t}=this.hot,o=t.createDocumentFragment();return this.samples.forEach(i=>{O(i.strings,s=>{const r=s.row,a=this.hot.getCellMeta(r,e),l=this.hot.getCellRenderer(a),h=t.createElement("td"),c=t.createElement("tr");h.setAttribute("ghost-table",1),l(this.hot,h,r,e,this.hot.colToProp(e),s.value,a),c.appendChild(h),o.appendChild(c)})}),o}clean(){this.rows.length=0,this.rows[-1]=void 0,this.columns.length=0,this.samples&&this.samples.clear(),this.samples=null,this.removeTable()}injectTable(e=null){this.injected||((e||this.hot.rootElement).appendChild(this.container.fragment),this.injected=!0)}removeTable(){this.injected&&this.container.container.parentNode&&(this.container.container.parentNode.removeChild(this.container.container),this.container=null,this.injected=!1)}createColElement(e,t){const o=this.hot.rootDocument.createElement("col");let i=0;t>=0&&e>=0&&(i=this.hot.getCellMeta(t,e).colspan);let s=this.hot.getColWidth(e);if(i>1)for(let r=e+1;r<e+i;r++)s+=this.hot.getColWidth(r);return o.style.width=`${s}px`,o}createTable(e=""){const{rootDocument:t}=this.hot,o=t.createDocumentFragment(),i=t.createElement("table"),s=t.createElement("thead"),r=t.createElement("tbody"),a=t.createElement("colgroup"),l=t.createElement("tr"),h=t.createElement("th");return this.isVertical()&&i.appendChild(a),this.isHorizontal()&&(l.appendChild(h),s.appendChild(l),i.style.tableLayout="auto",i.style.width="auto"),i.appendChild(s),this.isVertical()&&r.appendChild(l),i.appendChild(r),B(i,e),o.appendChild(i),{fragment:o,table:i,tHead:s,tBody:r,colGroup:a,tr:l,th:h}}createContainer(e=""){const{rootDocument:t}=this.hot,o=t.createDocumentFragment(),i=t.createElement("div"),s=`htGhostTable htAutoSize ${e.trim()}`;return B(i,s),o.appendChild(i),{fragment:o,container:i}}isVertical(){return!!(this.rows.length&&!this.columns.length)}isHorizontal(){return!!(this.columns.length&&!this.rows.length)}constructor(e){this.hot=null,this.container=null,this.injected=!1,this.rows=[],this.columns=[],this.samples=null,this.settings={useHeaders:!0},this.hot=e}};class g_{static get SAMPLE_COUNT(){return 3}getSampleCount(){return this.customSampleCount?this.customSampleCount:g_.SAMPLE_COUNT}setSampleCount(e){this.customSampleCount=e}setAllowDuplicates(e){this.allowDuplicates=e}setIncludeHidden(e){this.includeHidden=e}generateRowSamples(e,t){return this.generateSamples("row",t,e)}generateColumnSamples(e,t){return this.generateSamples("col",t,e)}generateSamples(e,t,o){const i=new Map,{from:s,to:r}=typeof o=="number"?{from:o,to:o}:o;return Ee(s,r,a=>{const l=this.generateSample(e,t,a);i.set(a,l)}),i}generateSample(e,t,o){e!=="row"&&e!=="col"&&U("Unsupported sample type");const i=new Map,s=e==="row"?"col":"row",r=[];return Ee(t.from,t.to,a=>{const l=e==="row"?this.dataFactory(o,a,this):this.dataFactory(a,o,this);if(l===!1)return;const{value:h,bundleSeed:c}=l,d=typeof c=="string"&&c.length>0;let u;d?u=c:ne(h)?u=`${Object.keys(h).length}`:Array.isArray(h)?u=`${h.length}`:u=`${bt(h).length}`,i.has(u)||i.set(u,{needed:this.getSampleCount(),strings:[]});const f=i.get(u);f.needed&&(!(r.indexOf(h)>-1)||this.allowDuplicates||d)&&(f.strings.push({value:h,[s]:a}),r.push(h),f.needed-=1)}),i}constructor(e){this.samples=null,this.dataFactory=null,this.customSampleCount=null,this.allowDuplicates=!1,this.includeHidden=!1,this.dataFactory=e}}function b2(n,e){if(e.has(n))throw new TypeError("Cannot initialize the same private elements twice on an object")}function die(n,e){return e.get?e.get.call(n):e.value}function uie(n,e,t){if(e.set)e.set.call(n,t);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=t}}function C2(n,e,t){if(!e.has(n))throw new TypeError("attempted to "+t+" private field on non-instance");return e.get(n)}function Ur(n,e){var t=C2(n,e,"get");return die(n,t)}function Lw(n,e,t){b2(n,e),e.set(n,t)}function Fr(n,e,t){var o=C2(n,e,"set");return uie(n,o,t),t}function ps(n,e,t){if(!e.has(n))throw new TypeError("attempted to get private field on non-instance");return t}function Ra(n,e){b2(n,e),e.add(n)}he.getSingleton().register("modifyAutoColumnSizeSeed");const lv="autoColumnSize",fie=10,gie="autoColumnSize";var KC=new WeakMap,lc=new WeakMap,Nc=new WeakMap,Rd=new WeakMap,y2=new WeakSet,r0=new WeakSet,a0=new WeakSet,I1=new WeakSet,H1=new WeakSet,A1=new WeakSet,hv=new WeakSet,O1=new WeakSet,D1=new WeakSet;class Sp extends rt{static get PLUGIN_KEY(){return lv}static get PLUGIN_PRIORITY(){return fie}static get SETTING_KEYS(){return!0}static get DEFAULT_SETTINGS(){return{useHeaders:!0,samplingRatio:null,allowSampleDuplicates:!1}}static get CALCULATION_STEP(){return 50}static get SYNC_CALCULATION_LIMIT(){return 50}isEnabled(){return this.hot.getSettings()[lv]!==!1&&!this.hot.getSettings().colWidths}enablePlugin(){if(this.enabled)return;this.ghostTable.setSetting("useHeaders",this.getSetting("useHeaders")),this.samplesGenerator.setAllowDuplicates(this.getSetting("allowSampleDuplicates"));const e=this.getSetting("samplingRatio");e&&!isNaN(e)&&this.samplesGenerator.setSampleCount(parseInt(e,10)),this.addHook("afterLoadData",(...t)=>ps(this,H1,wie).call(this,...t)),this.addHook("beforeChangeRender",(...t)=>ps(this,A1,bie).call(this,...t)),this.addHook("afterFormulasValuesUpdate",(...t)=>ps(this,D1,yie).call(this,...t)),this.addHook("beforeRender",()=>ps(this,I1,mie).call(this)),this.addHook("modifyColWidth",(t,o)=>this.getColumnWidth(o,t)),this.addHook("init",()=>ps(this,O1,Cie).call(this)),Fr(this,Rd,this.hot.columnIndexMapper.observeMapChange(this.columnWidthsMap,()=>{this.hot.view?.invalidateColumnWidthCache()})),super.enablePlugin()}updatePlugin(){Fr(this,Nc,this.findColumnsWhereHeaderWasChanged()),super.updatePlugin()}disablePlugin(){Ur(this,Rd)&&(Ur(this,Rd).call(this),Fr(this,Rd,null)),super.disablePlugin(),this.addHook("beforeColumnResize",(e,t,o)=>ps(this,hv,N1).call(this,e,t,o))}calculateVisibleColumnsWidth(){if(!this.hot.countRows())return;const e=this.getFirstVisibleColumn(),t=this.getLastVisibleColumn();if(e===-1||t===-1)return;const o=this.hot.forceFullRender;this.calculateColumnsWidth({from:e,to:t},void 0,o)}calculateColumnsWidth(e={from:0,to:this.hot.countCols()-1},t={from:0,to:this.hot.countRows()-1},o=!1){const i=typeof e=="number"?{from:e,to:e}:e,s=typeof t=="number"?{from:t,to:t}:t;Ee(i.from,i.to,r=>{let a=this.hot.toPhysicalColumn(r);a===null&&(a=r),(o||this.columnWidthsMap.getValueAtIndex(a)===null&&!this.hot._getColWidthFromSettings(a))&&ps(this,r0,_2).call(this,r,s)}),this.ghostTable.columns.length&&(ps(this,a0,S2).call(this),this.measuredColumns=i.to+1,this.ghostTable.clean())}calculateAllColumnsWidth(e={from:0,to:this.hot.countRows()-1},t=!1){let o=0;const i=this.hot.countCols()-1;let s=null;this.inProgress=!0;const r=()=>{if(!this.hot){_C(s),this.inProgress=!1;return}this.calculateColumnsWidth({from:o,to:Math.min(o+Sp.CALCULATION_STEP,i)},e,t),o=o+Sp.CALCULATION_STEP+1,o<i?s=yC(r):(_C(s),this.inProgress=!1,this.hot.view.adjustElementsSize())},a=this.getSyncCalculationLimit();a>=0&&(this.calculateColumnsWidth({from:0,to:a},e,t),o=a+1),o<i?r():this.inProgress=!1}recalculateAllColumnsWidth(){this.hot.view.isVisible()&&this.calculateAllColumnsWidth({from:0,to:this.hot.countRows()-1},!0)}getSyncCalculationLimit(){const e=this.hot.getSettings()[lv];let t=Sp.SYNC_CALCULATION_LIMIT;const o=this.hot.countCols()-1;return ne(e)&&(t=e.syncLimit,U$(t)?t=RF(o,t):t>>=0),Math.min(t,o)}getColumnWidth(e,t,o=!0){let i=t;return i===void 0&&(i=this.columnWidthsMap.getValueAtIndex(this.hot.toPhysicalColumn(e)),o&&typeof i=="number"&&(i=Math.max(i,Zu))),i}getFirstVisibleColumn(){return this.hot.getFirstRenderedVisibleColumn()??-1}getLastVisibleColumn(){return this.hot.getLastRenderedVisibleColumn()??-1}findColumnsWhereHeaderWasChanged(){return this.hot.getColHeader().reduce((o,i,s)=>{const r=Ur(this,lc).length;return(r-1<s||Ur(this,lc)[s]!==i)&&o.push(this.hot.toVisualColumn(s)),r-1<s?Ur(this,lc).push(i):Ur(this,lc)[s]=i,o},[])}clearCache(e){Array.isArray(e)?this.hot.batchExecution(()=>{e.forEach(t=>{this.columnWidthsMap.setValueAtIndex(t,null)})},!0):this.columnWidthsMap.clear()}isNeedRecalculate(){return!!this.columnWidthsMap.getValues().slice(0,this.measuredColumns).filter(e=>e===null).length}destroy(){this.ghostTable.clean(),super.destroy()}constructor(e){super(e),Ra(this,y2),Ra(this,r0),Ra(this,a0),Ra(this,I1),Ra(this,H1),Ra(this,A1),Ra(this,hv),Ra(this,O1),Ra(this,D1),Lw(this,KC,{writable:!0,value:void 0}),Lw(this,lc,{writable:!0,value:void 0}),Lw(this,Nc,{writable:!0,value:void 0}),Lw(this,Rd,{writable:!0,value:void 0}),this.ghostTable=new w2(this.hot),this.samplesGenerator=new g_((t,o)=>{const i=this.hot.toPhysicalRow(t),s=this.hot.toPhysicalColumn(o);if(this.hot.rowIndexMapper.isHidden(i)||this.hot.columnIndexMapper.isHidden(s))return!1;const r=this.hot.getCellMeta(t,o);let a="";r.spanned||(a=this.hot.getDataAtCell(t,o),typeof r.valueFormatter=="function"&&(a=r.valueFormatter(a,r)));let l="";return this.hot.hasHook("modifyAutoColumnSizeSeed")&&(l=this.hot.runHooks("modifyAutoColumnSizeSeed",l,r,a)),{value:a,bundleSeed:l}}),this.inProgress=!1,this.measuredColumns=0,this.columnWidthsMap=new Ch,Fr(this,KC,!1),Fr(this,lc,[]),Fr(this,Nc,[]),Fr(this,Rd,null),this.hot.columnIndexMapper.registerMap(gie,this.columnWidthsMap),this.addHook("beforeColumnResize",(t,o,i)=>ps(this,hv,N1).call(this,t,o,i))}}function pie(n){const e={from:0,to:this.hot.countRows()-1};n.forEach(t=>{const o=this.hot.toPhysicalColumn(t);o!==null&&(this.hot._getColWidthFromSettings(o)||ps(this,r0,_2).call(this,t,e))}),this.ghostTable.columns.length&&(ps(this,a0,S2).call(this),this.ghostTable.clean())}function _2(n,e){this.samplesGenerator.generateColumnSamples(n,e).forEach((o,i)=>this.ghostTable.addColumn(i,o))}function S2(){this.hot.batchExecution(()=>{this.ghostTable.getWidths((n,e)=>{const t=this.hot.toPhysicalColumn(n);this.columnWidthsMap.setValueAtIndex(t,e)})},!0)}function mie(){this.calculateVisibleColumnsWidth(),this.inProgress||(ps(this,y2,pie).call(this,Ur(this,Nc)),Fr(this,Nc,[]))}function wie(n,e){e||this.recalculateAllColumnsWidth()}function bie(n){const e=n.reduce((t,[,o])=>{const i=this.hot.propToCol(o);return Number.isInteger(i)&&t.indexOf(i)===-1&&t.push(i),t},[]);Ur(this,Nc).push(...e)}function N1(n,e,t){let o=n;return t&&(this.calculateColumnsWidth(e,void 0,!0),o=this.getColumnWidth(e,void 0,!1)),o}function Cie(){Fr(this,lc,this.hot.getColHeader()),this.recalculateAllColumnsWidth(),Fr(this,KC,!0)}function yie(n){if(!Ur(this,KC))return;const t=this.hot.getPlugin("formulas")?.sheetId,o=n.reduce((i,s)=>{if(t!=null&&s.address?.sheet!==t)return i;const r=s.address?.col;if(Number.isInteger(r)){const a=this.hot.toVisualColumn(r);i.indexOf(a)===-1&&i.push(a)}return i},[]);Ur(this,Nc).push(...o)}const vc={horizontal:"horizontal",vertical:"vertical"};function _ie(n,e,t){let o,i,s;return e[0]===n[0]&&e[1]<n[1]?(s="left",o=t(e[0],e[1]),i=t(e[2],n[1]-1)):e[2]===n[2]&&e[0]===n[0]&&e[3]>n[3]?(s="right",o=t(e[0],n[3]+1),i=t(e[2],e[3])):e[0]<n[0]&&e[1]===n[1]?(s="up",o=t(e[0],e[1]),i=t(n[0]-1,e[3])):e[2]>n[2]&&e[1]===n[1]&&(s="down",o=t(n[2]+1,e[1]),i=t(e[2],e[3])),o&&o.normalize(),i&&i.normalize(),{directionOfDrag:s,startOfDragCoords:o,endOfDragCoords:i}}function Sie(n){const e={};return n===!0?(e.directions=Object.keys(vc),e.autoInsertRow=!0):ne(n)?(J(n.autoInsertRow)?n.direction===vc.horizontal?e.autoInsertRow=!1:e.autoInsertRow=n.autoInsertRow:e.autoInsertRow=!1,J(n.direction)?e.directions=[n.direction]:e.directions=Object.keys(vc)):typeof n=="string"?(e.directions=[n],e.autoInsertRow=!0):(e.directions=[],e.autoInsertRow=!1),e}function vie(n,e){if(e.has(n))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Ed(n,e,t){if(!e.has(n))throw new TypeError("attempted to get private field on non-instance");return t}function kd(n,e){vie(n,e),e.add(n)}he.getSingleton().register("modifyAutofillRange");he.getSingleton().register("beforeAutofill");he.getSingleton().register("afterAutofill");const P1="autofill",Rie=20,Eie=["fillHandle"],kie="insert_row_below",Tie=200;var L1=new WeakSet,W1=new WeakSet,$1=new WeakSet,F1=new WeakSet,B1=new WeakSet,V1=new WeakSet;class xie extends rt{static get PLUGIN_KEY(){return P1}static get PLUGIN_PRIORITY(){return Rie}static get SETTING_KEYS(){return[P1,...Eie]}isEnabled(){return this.hot.getSettings().fillHandle}enablePlugin(){this.enabled||(this.mapSettings(),this.registerEvents(),this.addHook("afterOnCellCornerMouseDown",e=>Ed(this,$1,Hie).call(this,e)),this.addHook("afterOnCellCornerDblClick",e=>Ed(this,W1,Iie).call(this,e)),this.addHook("beforeOnCellMouseOver",(e,t)=>Ed(this,F1,Aie).call(this,t)),super.enablePlugin())}updatePlugin(){this.disablePlugin(),this.enablePlugin(),super.updatePlugin()}disablePlugin(){this.clearMappedSettings(),super.disablePlugin()}getSelectionData(e=!1){const t=this.hot.getSelectedRangeLast(),{row:o,col:i}=t.getTopStartCorner(),{row:s,col:r}=t.getBottomEndCorner(),a=this.hot.runHooks("modifyCopyableRange",[{startRow:o,startCol:i,endRow:s,endCol:r}]),l=[],h=[],c=[];return O(a,d=>{for(let u=d.startRow;u<=d.endRow;u+=1)l.indexOf(u)===-1&&l.push(u);for(let u=d.startCol;u<=d.endCol;u+=1)h.indexOf(u)===-1&&h.push(u)}),O(l,d=>{const u=[];O(h,f=>{const p=e?this.hot.getSourceDataAtCell(d,f):null;e&&(ne(p)||Array.isArray(p))?u.push(this.hot.getCopyableSourceData(d,f)):u.push(this.hot.getCopyableData(d,f))}),c.push(u)}),c}fillIn(){if(this.hot.selection.highlight.getFill().isEmpty())return!1;const[e,t,o,i]=this.hot.selection.highlight.getFill().getVisualCorners(),s=this.hot.getSelectedRangeLast(),r=s.getTopStartCorner(),a=s.getBottomEndCorner();this.resetSelectionOfDraggedArea();const l=[r.row,r.col,a.row,a.col],h=this.hot.runHooks("modifyAutofillRange",[Math.min(r.row,e),Math.min(r.col,t),Math.max(a.row,o),Math.max(a.col,i)],l),{directionOfDrag:c,startOfDragCoords:d,endOfDragCoords:u}=_ie(l,h,(f,p)=>this.hot._createCellCoords(f,p));if(d&&d.row>-1&&d.col>-1){const f=this.getSelectionData(),p=this.getSelectionData(!0),C=s.clone(),_=this.hot._createCellRange(d,d,u),S=this.hot.runHooks("beforeAutofill",f,C,_,c);if(S===!1)return this.hot.selection.highlight.getFill().clear(),this.hot.render(),!1;let T=S;const P=S;if(["up","left"].indexOf(c)>-1&&!(P.length===1&&P[0].length===0))if(T=[],c==="up"){const F=u.row-d.row+1,V=F%P.length;for(let D=0;D<F;D++)T.push(P[(D+(P.length-V))%P.length])}else{const F=u.col-d.col+1,V=F%P[0].length;for(let D=0;D<P.length;D++){T.push([]);for(let I=0;I<F;I++)T[D].push(P[D][(I+(P[D].length-V))%P[D].length])}}if(p.some(F=>F.some(V=>ne(V)||Array.isArray(V)))){const F=Ed(this,L1,Mie).call(this,T,p,d,u,c);F.length&&(T=F)}this.hot.populateFromArray(d.row,d.col,T,u.row,u.col,`${this.pluginName}.fill`,null),this.setSelection(h),this.hot.runHooks("afterAutofill",T,C,_,c),this.hot.render()}else this.hot.view.render();return!0}reduceSelectionAreaIfNeeded(e){return e.row<0&&(e.row=0),e.col<0&&(e.col=0),e}getCoordsOfDragAndDropBorders(e){const t=this.hot.getSelectedRangeLast(),o=t.getBottomEndCorner();let i=e;if(this.directions.includes(vc.vertical)&&this.directions.includes(vc.horizontal)){const s=t.getTopStartCorner();(o.col<=e.col||s.col>=e.col)&&(i=this.hot._createCellCoords(o.row,e.col)),(o.row<e.row||s.row>e.row)&&(i=this.hot._createCellCoords(e.row,o.col))}else if(this.directions.includes(vc.vertical))i=this.hot._createCellCoords(e.row,o.col);else if(this.directions.includes(vc.horizontal))i=this.hot._createCellCoords(o.row,e.col);else return;return this.reduceSelectionAreaIfNeeded(i)}showBorder(e){const t=this.getCoordsOfDragAndDropBorders(e);t&&this.redrawBorders(t)}addRow(){this.hot._registerTimeout(()=>{this.hot.alter(kie,void 0,1,`${this.pluginName}.fill`),this.addingStarted=!1},Tie)}addNewRowIfNeeded(){if(!this.hot.selection.highlight.getFill().isEmpty()&&this.addingStarted===!1&&this.autoInsertRow){const e=this.hot.getSelectedLast(),t=this.hot.selection.highlight.getFill().getVisualCorners(),o=this.hot.countRows();e[2]<o-1&&t[2]===o-1&&(this.addingStarted=!0,this.addRow())}}getIndexOfLastAdjacentFilledInRow(e){const t=this.hot.getData(),o=this.hot.countRows();let i;for(let s=e[2]+1;s<o;s++){for(let l=e[1];l<=e[3];l++){const h=t[s][l];if(!ht(h))return-1}const r=t[s][e[1]-1],a=t[s][e[3]+1];(!ht(r)||!ht(a))&&(i=s)}return i}addSelectionFromStartAreaToSpecificRowIndex(e,t){this.hot.selection.highlight.getFill().clear().add(this.hot._createCellCoords(e[0],e[1])).add(this.hot._createCellCoords(t,e[3])).commit()}setSelection(e){this.hot.selectCell(...Tt(e,t=>Math.max(t,0)),!1,!1)}selectAdjacent(){const e=this.hot.getSelectedLast(),t=this.getIndexOfLastAdjacentFilledInRow(e);return t===-1||t===void 0?!1:(this.addSelectionFromStartAreaToSpecificRowIndex(e,t),!0)}resetSelectionOfDraggedArea(){this.handleDraggedCells=0,this.hot.selection.highlight.getFill().clear()}redrawBorders(e){this.hot.selection.highlight.getFill().clear().add(this.hot.getSelectedRangeLast().from).add(this.hot.getSelectedRangeLast().to).add(e).commit(),this.hot.view.render()}getIfMouseWasDraggedOutside(e){const{documentElement:t}=this.hot.rootDocument,o=Ko(this.hot.table).top-(this.hot.rootWindow.pageYOffset||t.scrollTop)+Tn(this.hot.table),i=Ko(this.hot.table).left-(this.hot.rootWindow.pageXOffset||t.scrollLeft)+bn(this.hot.table);return e.clientY>o&&e.clientX<=i}registerEvents(){const{documentElement:e}=this.hot.rootDocument;this.eventManager.addEventListener(e,"mouseup",()=>Ed(this,B1,Oie).call(this)),this.eventManager.addEventListener(e,"mousemove",t=>Ed(this,V1,Die).call(this,t))}clearMappedSettings(){this.directions.length=0,this.autoInsertRow=!1}mapSettings(){const e=Sie(this.hot.getSettings().fillHandle);this.directions=e.directions,this.autoInsertRow=e.autoInsertRow}destroy(){super.destroy()}constructor(...e){super(...e),kd(this,L1),kd(this,W1),kd(this,$1),kd(this,F1),kd(this,B1),kd(this,V1),this.addingStarted=!1,this.mouseDownOnCellCorner=!1,this.mouseDragOutside=!1,this.handleDraggedCells=0,this.directions=[],this.autoInsertRow=!1}}function Mie(n,e,t,o){const i=[];for(let s=Math.min(t.row,o.row);s<=Math.max(t.row,o.row);s+=1){i.push([]);for(let r=Math.min(t.col,o.col);r<=Math.max(t.col,o.col);r+=1){const a=this.hot.getSourceDataAtCell(s,r),l=this.hot.getCellMeta(s,r).source,h=this.hot.getCellMeta(s,r)._complexDataFormat||ne(l?.[0])||Array.isArray(l?.[0]),c=s-Math.min(t.row,o.row),d=r-Math.min(t.col,o.col),u=c%e.length,f=d%e[0].length;ne(a)||Array.isArray(a)||h?i[c][d]=e[u][f]:i[c][d]=n[u][f]}}return i}function Iie(){this.selectAdjacent()&&this.fillIn()}function Hie(){this.handleDraggedCells=1,this.mouseDownOnCellCorner=!0}function Aie(n){this.mouseDownOnCellCorner&&!this.hot.view.isMouseDown()&&this.handleDraggedCells&&(this.handleDraggedCells+=1,this.showBorder(n),this.addNewRowIfNeeded())}function Oie(){this.handleDraggedCells&&(this.handleDraggedCells>1&&this.fillIn(),this.handleDraggedCells=0,this.mouseDownOnCellCorner=!1)}function Die(n){const e=this.getIfMouseWasDraggedOutside(n);this.addingStarted===!1&&this.handleDraggedCells>0&&e?(this.mouseDragOutside=!0,this.addingStarted=!0):this.mouseDragOutside=!1,this.mouseDragOutside&&this.autoInsertRow&&this.addRow()}function v2(n,e){if(e.has(n))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Nie(n,e){return e.get?e.get.call(n):e.value}function Pie(n,e,t){if(e.set)e.set.call(n,t);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=t}}function R2(n,e,t){if(!e.has(n))throw new TypeError("attempted to "+t+" private field on non-instance");return e.get(n)}function nf(n,e){var t=R2(n,e,"get");return Nie(n,t)}function cv(n,e,t){v2(n,e),e.set(n,t)}function pc(n,e,t){var o=R2(n,e,"set");return Pie(n,o,t),t}function ir(n,e,t){if(!e.has(n))throw new TypeError("attempted to get private field on non-instance");return t}function Ea(n,e){v2(n,e),e.add(n)}const dv="autoRowSize",Lie=40,Wie="autoRowSize",z1="htFirstDatasetColumnNotRendered",U1="htAutoRowSize";var of=new WeakMap,Td=new WeakMap,XC=new WeakMap,E2=new WeakSet,l0=new WeakSet,Y1=new WeakSet,G1=new WeakSet,uv=new WeakSet,j1=new WeakSet,q1=new WeakSet,K1=new WeakSet,X1=new WeakSet;class vp extends rt{static get PLUGIN_KEY(){return dv}static get PLUGIN_PRIORITY(){return Lie}static get SETTING_KEYS(){return!0}static get DEFAULT_SETTINGS(){return{useHeaders:!0,samplingRatio:null,allowSampleDuplicates:!1}}static get CALCULATION_STEP(){return 50}static get SYNC_CALCULATION_LIMIT(){return 500}isEnabled(){const e=this.hot.getSettings()[dv];return e===!0||ne(e)}enablePlugin(){if(this.enabled)return;this.samplesGenerator.setAllowDuplicates(this.getSetting("allowSampleDuplicates"));const e=this.getSetting("samplingRatio");e&&!isNaN(e)&&this.samplesGenerator.setSampleCount(parseInt(e,10)),this.addHook("afterLoadData",(...t)=>ir(this,j1,Vie).call(this,...t)),this.addHook("beforeChangeRender",(...t)=>ir(this,q1,zie).call(this,...t)),this.addHook("beforeColumnResize",()=>this.recalculateAllRowsHeight()),this.addHook("afterFormulasValuesUpdate",(...t)=>ir(this,X1,Yie).call(this,...t)),this.addHook("beforeViewRender",()=>ir(this,Y1,Fie).call(this)),this.addHook("beforeRender",()=>ir(this,G1,Bie).call(this)),this.addHook("modifyRowHeight",(t,o)=>this.getRowHeight(o,t)),this.addHook("init",()=>ir(this,K1,Uie).call(this)),this.addHook("modifyColumnHeaderHeight",()=>this.getColumnHeaderHeight()),pc(this,Td,this.hot.rowIndexMapper.observeMapChange(this.rowHeightsMap,()=>{this.hot.view?.invalidateRowHeightCache()})),B(this.hot.rootElement,U1),super.enablePlugin()}disablePlugin(){nf(this,Td)&&(nf(this,Td).call(this),pc(this,Td,null)),this.headerHeight=null,oe(this.hot.rootElement,U1),super.disablePlugin(),ir(this,l0,k2).call(this,!1),this.addHook("beforeRowResize",(e,t,o)=>ir(this,uv,Z1).call(this,e,t,o))}calculateVisibleRowsHeight(){if(!this.hot.countCols())return;const e=this.getFirstVisibleRow(),t=this.getLastVisibleRow();if(e===-1||t===-1)return;const o=this.hot.forceFullRender;this.calculateRowsHeight({from:e,to:t},void 0,o)}calculateRowsHeight(e={from:0,to:this.hot.countRows()-1},t={from:0,to:this.hot.countCols()-1},o=!1){const i=typeof e=="number"?{from:e,to:e}:e,s=typeof t=="number"?{from:t,to:t}:t;if(this.hot.getColHeader(0)!==null){const r=this.samplesGenerator.generateRowSamples(-1,s);this.ghostTable.addColumnHeadersRow(r.get(-1))}Ee(i.from,i.to,r=>{let a=this.hot.toPhysicalRow(r);a===null&&(a=r),(o||this.rowHeightsMap.getValueAtIndex(a)===null)&&this.samplesGenerator.generateRowSamples(r,s).forEach((h,c)=>this.ghostTable.addRow(c,h))}),this.ghostTable.rows.length&&(this.hot.batchExecution(()=>{this.ghostTable.getHeights((r,a)=>{r<0?this.headerHeight=a:this.rowHeightsMap.setValueAtIndex(this.hot.toPhysicalRow(r),a)})},!0),this.measuredRows=i.to+1,this.ghostTable.clean())}calculateAllRowsHeight(e={from:0,to:this.hot.countCols()-1},t=!1){let o=0;const i=this.hot.countRows()-1;let s=null;this.inProgress=!0;const r=()=>{if(!this.hot){_C(s),this.inProgress=!1;return}this.calculateRowsHeight({from:o,to:Math.min(o+vp.CALCULATION_STEP,i)},e,t),o=o+vp.CALCULATION_STEP+1,o<i?s=yC(r):(_C(s),this.inProgress=!1,this.hot.view.adjustElementsSize())},a=this.getSyncCalculationLimit();a>=0&&(this.calculateRowsHeight({from:0,to:a},e,t),o=a+1),o<i?r():(this.inProgress=!1,this.hot.view.adjustElementsSize())}recalculateAllRowsHeight(){this.hot.view.isVisible()&&this.calculateAllRowsHeight({from:0,to:this.hot.countCols()-1},!0)}getSyncCalculationLimit(){const e=this.hot.getSettings()[dv];let t=vp.SYNC_CALCULATION_LIMIT;const o=this.hot.countRows()-1;return ne(e)&&(t=e.syncLimit,U$(t)?t=RF(o,t):t>>=0),Math.min(t,o)}getRowHeight(e,t=this.hot.stylesHandler.getDefaultRowHeight(e)){if(e<0)return this.headerHeight??t;const o=this.hot.toPhysicalRow(e);if(this.hot.rowIndexMapper.isHidden(o))return t;const i=this.rowHeightsMap.getValueAtIndex(o);let s=t;return i!==null&&i>t&&(s=i,e===this.hot.view.getFirstRenderedVisibleRow()&&(s+=1)),s}getColumnHeaderHeight(){return this.headerHeight}getFirstVisibleRow(){return this.hot.getFirstRenderedVisibleRow()??-1}getLastVisibleRow(){return this.hot.getLastRenderedVisibleRow()??-1}clearCache(e){this.headerHeight=null,Array.isArray(e)?this.hot.batchExecution(()=>{e.forEach(t=>{this.rowHeightsMap.setValueAtIndex(t,null)})},!0):this.rowHeightsMap.clear()}clearCacheByRange(e){const{from:t,to:o}=typeof e=="number"?{from:e,to:e}:e;this.hot.batchExecution(()=>{Ee(Math.min(t,o),Math.max(t,o),i=>{this.rowHeightsMap.setValueAtIndex(i,null)})},!0)}isNeedRecalculate(){return!!this.rowHeightsMap.getValues().slice(0,this.measuredRows).filter(e=>e===null).length}destroy(){this.ghostTable.clean(),super.destroy()}constructor(e){super(e),Ea(this,E2),Ea(this,l0),Ea(this,Y1),Ea(this,G1),Ea(this,uv),Ea(this,j1),Ea(this,q1),Ea(this,K1),Ea(this,X1),cv(this,of,{writable:!0,value:void 0}),cv(this,Td,{writable:!0,value:void 0}),cv(this,XC,{writable:!0,value:void 0}),this.headerHeight=null,this.ghostTable=new w2(this.hot),this.samplesGenerator=new g_((t,o)=>{const i=this.hot.toPhysicalColumn(o);if(this.hot.columnIndexMapper.isHidden(i))return!1;let s;if(t>=0&&o>=0&&(s=this.hot.getCellMeta(t,o),s.hidden))return!1;let r;return t>=0?(r=this.hot.getDataAtCell(t,o),typeof s?.valueFormatter=="function"&&(r=s.valueFormatter(r,s))):t===-1&&(r=this.hot.getColHeader(o)),{value:r}}),this.inProgress=!1,this.measuredRows=0,this.rowHeightsMap=new Ch,pc(this,of,[]),pc(this,Td,null),pc(this,XC,!1),this.hot.rowIndexMapper.registerMap(Wie,this.rowHeightsMap),this.addHook("beforeRowResize",(t,o,i)=>ir(this,uv,Z1).call(this,t,o,i))}}function $ie(n){const e={from:0,to:this.hot.countCols()-1};n.forEach(t=>{this.samplesGenerator.generateRowSamples(t,e).forEach((i,s)=>this.ghostTable.addRow(s,i))}),this.ghostTable.rows.length&&(this.hot.batchExecution(()=>{this.ghostTable.getHeights((t,o)=>{const i=this.hot.toPhysicalRow(t);this.rowHeightsMap.setValueAtIndex(i,o)})},!0),this.ghostTable.clean())}function k2(n){const e=this.hot.getFirstRenderedVisibleColumn(),t=this.hot.columnIndexMapper.getPhysicalFromVisualIndex(e);n===!1||t===this.hot.columnIndexMapper.getPhysicalFromRenderableIndex(0)?oe(this.hot.rootElement,z1):B(this.hot.rootElement,z1)}function Fie(){ir(this,l0,k2).call(this)}function Bie(){this.calculateVisibleRowsHeight(),this.inProgress||(ir(this,E2,$ie).call(this,nf(this,of)),pc(this,of,[]))}function Z1(n,e,t){let o=n;return t&&(this.calculateRowsHeight(e,void 0,!0),o=this.getRowHeight(e)),o}function Vie(n,e){e||this.recalculateAllRowsHeight()}function zie(n){const e=n.reduce((t,[o])=>(t.indexOf(o)===-1&&t.push(o),t),[]);nf(this,of).push(...e)}function Uie(){this.recalculateAllRowsHeight(),pc(this,XC,!0)}function Yie(n){if(!nf(this,XC))return;const t=this.hot.getPlugin("formulas")?.sheetId,o=n.reduce((i,s)=>{if(t!=null&&s.address?.sheet!==t)return i;const r=s.address?.row;if(Number.isInteger(r)){const a=this.hot.toVisualRow(r);i.indexOf(a)===-1&&i.push(a)}return i},[]);nf(this,of).push(...o)}const{getListWithInsertedItems:Gie,getListWithRemovedItems:jie}=cB("physicallyIndexed");class qie extends Jc{insert(e,t){const o=Ck(this.indexedValues,t);this.indexedValues=Gie(o,e,t,this.initValueOrFn),super.insert(e,t)}remove(e){const t=jie(this.indexedValues,e);this.indexedValues=bk(t,e),super.remove(e)}constructor(){super(e=>e)}}const{getListWithInsertedItems:Kie,getListWithRemovedItems:Xie}=cB("physicallyIndexed");class Zie extends Jc{insert(e,t){this.indexedValues=Kie(this.indexedValues,e,t,(o,i)=>this.getNextValue(i)),super.insert(e,t)}remove(e){this.indexedValues=Xie(this.indexedValues,e),super.remove(e)}getNextValue(e){return Math.max(...this.getValues())+1+e}constructor(){super(e=>e)}}function Qie(n,e){if(e.has(n))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Jie(n,e,t){if(!e.has(n))throw new TypeError("attempted to get private field on non-instance");return t}function ese(n,e){Qie(n,e),e.add(n)}const Q1="bindRowsWithHeaders",tse=210,nse="loose",J1=new Map([["loose",qie],["strict",Zie]]);var eO=new WeakSet;class ose extends rt{static get PLUGIN_KEY(){return Q1}static get PLUGIN_PRIORITY(){return tse}isEnabled(){return!!this.hot.getSettings()[Q1]}enablePlugin(){if(this.enabled)return;const e=J1.get(this.getSetting())??J1.get(nse);this.headerIndexes=this.hot.rowIndexMapper.registerMap("bindRowsWithHeaders",new e),this.addHook("modifyRowHeader",t=>Jie(this,eO,ise).call(this,t)),super.enablePlugin()}disablePlugin(){this.hot.rowIndexMapper.unregisterMap("bindRowsWithHeaders"),super.disablePlugin()}destroy(){super.destroy()}constructor(...e){super(...e),ese(this,eO),this.headerIndexes=null}}function ise(n){return this.headerIndexes.getValueAtIndex(this.hot.toPhysicalRow(n))}function T2(n,e){if(e.has(n))throw new TypeError("Cannot initialize the same private elements twice on an object")}function sse(n,e){return e.get?e.get.call(n):e.value}function rse(n,e,t){if(e.set)e.set.call(n,t);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=t}}function x2(n,e,t){if(!e.has(n))throw new TypeError("attempted to "+t+" private field on non-instance");return e.get(n)}function tO(n,e){var t=x2(n,e,"get");return sse(n,t)}function ase(n,e,t){T2(n,e),e.set(n,t)}function Ww(n,e,t){var o=x2(n,e,"set");return rse(n,o,t),t}function $w(n,e,t){if(!e.has(n))throw new TypeError("attempted to get private field on non-instance");return t}function Fw(n,e){T2(n,e),e.add(n)}const Xb="collapsibleColumns",lse=290,hse=["nestedHeaders"],zu="collapsibleIndicator",nO=Xb,oO=new Map([["collapse",{hideColumn:!0,beforeHook:"beforeColumnCollapse",afterHook:"afterColumnCollapse"}],["expand",{hideColumn:!1,beforeHook:"beforeColumnExpand",afterHook:"afterColumnExpand"}]]);var Ph=new WeakMap,iO=new WeakSet,sO=new WeakSet,rO=new WeakSet,aO=new WeakSet;class cse extends rt{static get PLUGIN_KEY(){return Xb}static get PLUGIN_PRIORITY(){return lse}static get PLUGIN_DEPS(){return["plugin:NestedHeaders"]}static get SETTING_KEYS(){return[Xb,...hse]}isEnabled(){return!!this.hot.getSettings()[Xb]}enablePlugin(){if(this.enabled)return;const{nestedHeaders:e}=this.hot.getSettings();e||Ie("You need to configure the Nested Headers plugin in order to use collapsible headers."),Ww(this,Ph,this.hot.columnIndexMapper.createAndRegisterIndexMap(this.pluginName,"hiding")),this.nestedHeadersPlugin=this.hot.getPlugin("nestedHeaders"),this.headerStateManager=this.nestedHeadersPlugin.getStateManager(),this.addHook("init",()=>$w(this,rO,fse).call(this)),this.addHook("afterLoadData",(...t)=>$w(this,aO,gse).call(this,...t)),this.addHook("afterGetColHeader",(...t)=>$w(this,iO,dse).call(this,...t)),this.addHook("beforeOnCellMouseDown",(t,o,i)=>$w(this,sO,use).call(this,t,o,i)),this.registerShortcuts(),super.enablePlugin(),this.updatePlugin()}updatePlugin(){if(this.hot.view){if(!this.nestedHeadersPlugin.detectedOverlappedHeaders){const{collapsibleColumns:e}=this.hot.getSettings();typeof e=="boolean"?this.headerStateManager.mapState(t=>({collapsible:t.origColspan>1})):Array.isArray(e)&&(this.headerStateManager.mapState(()=>({collapsible:!1})),this.headerStateManager.mergeStateWith(e))}super.updatePlugin()}}disablePlugin(){this.hot.columnIndexMapper.unregisterMap(this.pluginName),Ww(this,Ph,null),this.nestedHeadersPlugin=null,this.unregisterShortcuts(),this.clearButtons(),super.disablePlugin()}registerShortcuts(){this.hot.getShortcutManager().getContext("grid").addShortcut({keys:[["Enter"]],callback:()=>{const{row:e,col:t}=this.hot.getSelectedRangeActive().highlight,{collapsible:o,isCollapsed:i,columnIndex:s}=this.headerStateManager.getHeaderTreeNodeData(e,t)??{};if(o)return i?this.expandSection({row:e,col:s}):this.collapseSection({row:e,col:s}),!1},runOnlyIf:()=>this.hot.getSelectedRangeActive()?.isSingle()&&this.hot.getSelectedRangeActive()?.highlight.isHeader(),group:nO,relativeToGroup:dl,position:"before"})}unregisterShortcuts(){this.hot.getShortcutManager().getContext("grid").removeShortcutsByGroup(nO)}clearButtons(){if(!this.hot.view)return;const e=this.hot.view._wt.getSetting("columnHeaders").length,t=this.hot.view._wt.wtTable.THEAD,o=this.hot.view._wt.wtOverlays.topOverlay.clone.wtTable.THEAD,i=this.hot.view._wt.wtOverlays.topInlineStartCornerOverlay?this.hot.view._wt.wtOverlays.topInlineStartCornerOverlay.clone.wtTable.THEAD:null,s=function(r){r&&r.parentNode.removeChild(r)};Ee(0,e-1,r=>{const a=t.childNodes[r],l=o.childNodes[r],h=i?i.childNodes[r]:null;Ee(0,a.childNodes.length-1,c=>{let d=a.childNodes[c].querySelector(`.${zu}`);s(d),l&&l.childNodes[c]&&(d=l.childNodes[c].querySelector(`.${zu}`),s(d)),i&&h&&h.childNodes[c]&&(d=h.childNodes[c].querySelector(`.${zu}`),s(d))})})}expandSection(e){this.toggleCollapsibleSection([e],"expand")}collapseSection(e){this.toggleCollapsibleSection([e],"collapse")}toggleAllCollapsibleSections(e){const t=this.headerStateManager.mapNodes(o=>{const{collapsible:i,origColspan:s,headerLevel:r,columnIndex:a,isCollapsed:l}=o;if(i===!0&&s>1&&(l&&e==="expand"||!l&&e==="collapse"))return{row:this.headerStateManager.levelToRowCoords(r),col:a}});this.toggleCollapsibleSection(t,e)}collapseAll(){this.toggleAllCollapsibleSections("collapse")}expandAll(){this.toggleAllCollapsibleSections("expand")}toggleCollapsibleSection(e,t){if(oO.has(t)||U(`Unsupported action is passed (${t}).`),!Array.isArray(e))return;const o=Fc(e,({row:f})=>f<0);let i=o.length>0;O(o,({row:f,col:p})=>{const{collapsible:C,isCollapsed:_}=this.headerStateManager.getHeaderSettings(f,p)??{};if(!C||_&&t==="collapse"||!_&&t==="expand")return i=!1,!1});const s=[],r=[];i&&O(o,({row:f,col:p})=>{const{colspanCompensation:C,affectedColumns:_,rollbackModification:S}=this.headerStateManager.triggerNodeModification(t,f,p);C>0&&(r.push(..._),s.push(S))});const a=this.getCollapsedColumns();let l=[];t==="collapse"?l=cG([...a,...r]):t==="expand"&&(l=Fc(a,f=>!r.includes(f)));const h=oO.get(t);if(this.hot.runHooks(h.beforeHook,a,l,i)===!1){O(s,f=>{f()});return}this.hot.batchExecution(()=>{O(r,f=>{tO(this,Ph).setValueAtIndex(this.hot.toPhysicalColumn(f),h.hideColumn)})},!0);const d=this.getCollapsedColumns().length!==a.length,u=this.hot.getSelectedRangeActive();if(t==="collapse"&&d&&u){const{row:f,col:p}=u.highlight;if((this.hot.rowIndexMapper.isHidden(f)||this.hot.columnIndexMapper.isHidden(p))&&r.includes(p)){const _=f>=0?this.hot.rowIndexMapper.getNearestNotHiddenIndex(f,1,!0):f,S=p>=0?this.hot.columnIndexMapper.getNearestNotHiddenIndex(p,1,!0):p;_!==null&&S!==null&&this.hot.selectCell(_,S)}}this.hot.runHooks(h.afterHook,a,l,i,d),this.hot.view.adjustElementsSize(),this.hot.render()}getCollapsedColumns(){return tO(this,Ph).getHiddenIndexes()}destroy(){Ww(this,Ph,null),super.destroy()}constructor(...e){super(...e),Fw(this,iO),Fw(this,sO),Fw(this,rO),Fw(this,aO),ase(this,Ph,{writable:!0,value:void 0}),this.nestedHeadersPlugin=null,this.headerStateManager=null,Ww(this,Ph,null)}}function dse(n,e,t){const{collapsible:o,origColspan:i,isCollapsed:s}=this.headerStateManager.getHeaderSettings(t,n)??{},r=o&&i>1&&n>=this.hot.getSettings().fixedColumnsStart,a=this.hot.getSettings().ariaTags;let l=e.querySelector(`.${zu}`);Zr(e,[Es("")[0]]),r?(l||(l=this.hot.rootDocument.createElement("div"),B(l,zu),e.querySelector("div:first-child").appendChild(l)),oe(l,["collapsed","expanded"]),s?(B(l,"collapsed"),ph(l,"+"),a&&fe(e,...Es(!1))):(B(l,"expanded"),ph(l,"-"),a&&fe(e,...Es(!0))),a&&fe(l,...al())):l?.remove()}function use(n,e){_e(n.target,zu)&&(_e(n.target,"expanded")?(this.eventManager.fireEvent(n.target,"mouseup"),this.toggleCollapsibleSection([e],"collapse")):_e(n.target,"collapsed")&&(this.eventManager.fireEvent(n.target,"mouseup"),this.toggleCollapsibleSection([e],"expand")),es(n))}function fse(){this.updatePlugin()}function gse(n,e){e||this.updatePlugin()}const pse=["sortEmptyCells","indicator","headerAction","compareFunctionFactory"],mse=!1,wse=!0,bse=!0;class Cse{updateAllColumnsProperties(e){ne(e)&&tt(e,(t,o)=>{pse.includes(o)&&(this[o]=t)})}getAllColumnsProperties(){const e={sortEmptyCells:this.sortEmptyCells,indicator:this.indicator,headerAction:this.headerAction};return typeof this.compareFunctionFactory=="function"&&(e.compareFunctionFactory=this.compareFunctionFactory),e}getSortOrderOfColumn(e){return this.sortingStates.getValueAtIndex(this.hot.toPhysicalColumn(e))?.sortOrder}getIndexOfColumnInSortQueue(e){return e=this.hot.toPhysicalColumn(e),this.sortingStates.getEntries().findIndex(([t])=>t===e)}getNumberOfSortedColumns(){return this.sortingStates.getLength()}isListOfSortedColumnsEmpty(){return this.getNumberOfSortedColumns()===0}isColumnSorted(e){return ne(this.sortingStates.getValueAtIndex(this.hot.toPhysicalColumn(e)))}getSortStates(){return this.sortingStates===null?[]:this.sortingStates.getEntries().map(([t,o])=>({column:this.hot.toVisualColumn(t),...o}))}getColumnSortState(e){const t=this.getSortOrderOfColumn(e);if(J(t))return{column:e,sortOrder:t}}setSortStates(e){this.sortingStates.clear();for(let t=0;t<e.length;t+=1)this.sortingStates.setValueAtIndex(this.hot.toPhysicalColumn(e[t].column),{sortOrder:e[t].sortOrder})}destroy(){this.hot.columnIndexMapper.unregisterMap(this.mapName),this.sortingStates=null}constructor(e,t){this.sortingStates=new Wy,this.sortEmptyCells=mse,this.indicator=wse,this.headerAction=bse,this.hot=e,this.mapName=t,this.hot.columnIndexMapper.registerMap(t,this.sortingStates)}}function M2(n,e,t){const o=e.locale;return function(i,s){const{sortEmptyCells:r}=t;return typeof i=="string"&&(i=i.toLocaleLowerCase(o)),typeof s=="string"&&(s=s.toLocaleLowerCase(o)),i===s?Zo:ht(i)?ht(s)?Zo:r&&n==="asc"?ft:gt:ht(s)?r&&n==="asc"?gt:ft:isNaN(i)&&!isNaN(s)?n==="asc"?gt:ft:!isNaN(i)&&isNaN(s)||(isNaN(i)||isNaN(s)||(i=parseFloat(i),s=parseFloat(s)),i<s)?n==="asc"?ft:gt:i>s?n==="asc"?gt:ft:Zo}}const I2="default";function yse(n,e,t){return function(o,i){const s=parseFloat(o),r=parseFloat(i),{sortEmptyCells:a}=t;if(s===r||isNaN(s)&&isNaN(r))return Zo;if(a){if(ht(o))return n==="asc"?ft:gt;if(ht(i))return n==="asc"?gt:ft}return isNaN(s)?gt:isNaN(r)?ft:s<r?n==="asc"?ft:gt:s>r?n==="asc"?gt:ft:Zo}}const _se="numeric";function Sse(n,e,t){const o=e.checkedTemplate,i=e.uncheckedTemplate,{sortEmptyCells:s}=t;return function(r,a){const l=ht(r),h=ht(a),c=l?i:r,d=h?i:a,u=c===i||c===o,f=d===i||d===o;if(s===!1){if(l&&h===!1)return gt;if(l===!1&&h)return ft}return u===!1&&f?n==="asc"?ft:gt:u&&f===!1?n==="asc"?gt:ft:u===!1&&f===!1?M2(n,e,t)(r,a):c===i&&d===o?n==="asc"?ft:gt:c===o&&d===i?n==="asc"?gt:ft:Zo}}const vse="checkbox";function Rse(n,e,t){return P2(n,e.dateFormat,t)}const Ese="date";function kse(n,e,t){return Lse(n,e.dateFormat,t)}const Tse="intl-date";function xse(n,e,t){return P2(n,e.timeFormat,t)}const Mse="time";function Ise(n,e,t){return Wse(n,e.timeFormat,t)}const Hse="intl-time",{register:od,getItem:lO,hasItem:Ase}=ts("sorting.compareFunctionFactory"),{register:H2,getItem:Ose}=ts("sorting.mainSortComparator");function A2(n){return Ase(n)?lO(n):lO(I2)}od(vse,Sse);od(Ese,Rse);od(Tse,kse);od(I2,M2);od(_se,yse);od(Mse,xse);od(Hse,Ise);const Zo=0,ft=-1,gt=1;function Dse(n,e,...t){const o=Ose(e);n.sort(o(...t))}const ZC="asc",QC="desc",O2="colHeader";function Nse(n){if(ne(n)===!1)return!1;const{column:e,sortOrder:t}=n;return Number.isInteger(e)&&[ZC,QC].includes(t)}function Pse(n){if(n.some(t=>Nse(t)===!1))return!1;const e=n.map(({column:t})=>t);return new Set(e).size===e.length}function hO(n){if(n!==QC)return n===ZC?QC:ZC}function D2(n){return n.querySelector(`.${O2}`)}function N2(n,e){return n<0?!1:af(e)}function fM(n,e,t){if(e<0||n>=0||Uc(t))return!1;if(n===-1)return!0;const o=typeof t.target.closest=="function"?t.target.closest("th"):null;return af(o)}function P2(n,e,t){return function(o,i){const{sortEmptyCells:s}=t;if(o===i)return Zo;if(ht(o))return ht(i)?Zo:s&&n==="asc"?ft:gt;if(ht(i))return s&&n==="asc"?gt:ft;const r=Z(o,e),a=Z(i,e);return r.isValid()?a.isValid()?a.isAfter(r)?n==="asc"?ft:gt:a.isBefore(r)?n==="asc"?gt:ft:Zo:ft:gt}}function Lse(n,e,t){return function(o,i){const{sortEmptyCells:s}=t;if(o===i)return Zo;if(ht(o))return ht(i)?Zo:s&&n==="asc"?ft:gt;if(ht(i))return s&&n==="asc"?gt:ft;const r=ta(o),a=ta(i);return r===null?gt:a===null?ft:a>r?n==="asc"?ft:gt:a<r?n==="asc"?gt:ft:Zo}}function Wse(n,e,t){return function(o,i){const{sortEmptyCells:s}=t;if(o===i)return Zo;if(ht(o))return ht(i)?Zo:s&&n==="asc"?ft:gt;if(ht(i))return s&&n==="asc"?gt:ft;const r=Kc(o),a=Kc(i);return r===null?gt:a===null?ft:a>r?n==="asc"?ft:gt:a<r?n==="asc"?gt:ft:Zo}}function $se(n,e){Ie(pt`Plugins \`columnSorting\` and \`multiColumnSorting\` should not be enabled simultaneously.\x20
|
|
231
|
+
Only \`${n}\` will work. The \`${e}\` plugin will remain disabled.`)}const Fse="ascending",Bse="descending",L2="indicatorDisabled",W2="columnSorting",$2="sortAction",F2=new Map([[ZC,Fse],[QC,Bse]]);function Vse(n,e,t,o){const i=[W2];if(o&&i.push($2),t===!1)return i.push(L2),i;const s=n.getSortOrderOfColumn(e);return J(s)&&i.push(F2.get(s)),i}function zse(){return Array.from(F2.values()).concat($2,L2,W2)}function Use(n,e){return function(t,o){const[,...i]=t,[,...s]=o;return(function(a){const l=n[a],h=e[a],c=i[a],d=s[a],u=h.columnSorting;return(u.compareFunctionFactory?u.compareFunctionFactory:A2(h.type))(l,h,u)(c,d)})(0)}}function B2(n,e){if(e.has(n))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Yse(n,e){return e.get?e.get.call(n):e.value}function Gse(n,e,t){if(e.set)e.set.call(n,t);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=t}}function V2(n,e,t){if(!e.has(n))throw new TypeError("attempted to "+t+" private field on non-instance");return e.get(n)}function jse(n,e){var t=V2(n,e,"get");return Yse(n,t)}function qse(n,e,t){B2(n,e),e.set(n,t)}function Kse(n,e,t){var o=V2(n,e,"set");return Gse(n,o,t),t}function Cu(n,e,t){if(!e.has(n))throw new TypeError("attempted to get private field on non-instance");return t}function Bw(n,e){B2(n,e),e.add(n)}const JC="columnSorting",Xse=50,ey="append",Zse="replace",cO=JC;H2(JC,Use);he.getSingleton().register("beforeColumnSort");he.getSingleton().register("afterColumnSort");const Jf=new WeakMap;var Zb=new WeakSet,dO=new WeakSet,uO=new WeakSet,fv=new WeakMap,fO=new WeakSet;class z2 extends rt{static get PLUGIN_KEY(){return JC}static get PLUGIN_PRIORITY(){return Xse}isEnabled(){return!!this.hot.getSettings()[this.pluginKey]}enablePlugin(){if(Jf.has(this.hot)&&Jf.get(this.hot)!==this.pluginKey){this.hot.updateSettings({[this.pluginKey]:!1}),$se(Jf.get(this.hot),this.pluginKey);return}this.enabled||(Jf.set(this.hot,this.pluginKey),this.columnStatesManager=new Cse(this.hot,`${this.pluginKey}.sortingStates`),this.columnMetaCache=new Ch(e=>{let t=this.hot.toVisualColumn(e);return t===null&&(t=e),this.getMergedPluginSettings(t)}),this.hot.columnIndexMapper.registerMap(`${this.pluginKey}.columnMeta`,this.columnMetaCache),this.addHook("afterGetColHeader",(e,t)=>Cu(this,dO,Qse).call(this,e,t)),this.addHook("beforeOnCellMouseDown",(...e)=>Cu(this,fO,ere).call(this,...e)),this.addHook("afterOnCellMouseDown",(e,t)=>this.onAfterOnCellMouseDown(e,t)),this.addHook("afterInit",()=>Cu(this,Zb,h0).call(this)),this.addHook("afterLoadData",(...e)=>Cu(this,uO,Jse).call(this,...e)),this.addHook("afterDataProviderFetch",(...e)=>jse(this,fv).call(this,...e),-1),this.hot.view&&Cu(this,Zb,h0).call(this),this.registerShortcuts(),super.enablePlugin())}disablePlugin(){const e=(t,o)=>{const i=D2(o);N2(t,o)===!1||i===null||this.updateHeaderClasses(i)};Jf.delete(this.hot),this.hot.addHook("afterGetColHeader",e),this.hot.addHookOnce("afterViewRender",()=>{this.hot.removeHook("afterGetColHeader",e)}),this.hot.batchExecution(()=>{this.indexesSequenceCache!==null&&(this.hot.rowIndexMapper.setIndexesSequence(this.indexesSequenceCache.getValues()),this.hot.rowIndexMapper.unregisterMap(this.pluginKey),this.indexesSequenceCache=null)},!0),this.hot.columnIndexMapper.unregisterMap(`${this.pluginKey}.columnMeta`),this.columnStatesManager.destroy(),this.columnMetaCache=null,this.columnStatesManager=null,this.unregisterShortcuts(),super.disablePlugin()}registerShortcuts(){this.hot.getShortcutManager().getContext("grid").addShortcut({keys:[["Enter"]],callback:()=>{const{highlight:e}=this.hot.getSelectedRangeActive();return this.sort(this.getColumnNextConfig(e.col)),!1},runOnlyIf:()=>{const e=this.hot.getSelectedRangeActive()?.highlight,t=e?this.hot.getCell(e.row,e.col,!0):null;return e&&this.hot.getSelectedRangeActive()?.isSingle()&&this.hot.selection.isCellVisible(e)&&e.row<0&&e.col>=0&&af(t)},relativeToGroup:dl,position:"before",group:cO})}unregisterShortcuts(){this.hot.getShortcutManager().getContext("grid").removeShortcutsByGroup(cO)}sort(e){const t=this.getSortConfig(),o=this.getNormalizedSortConfigs(e),i=this.areValidSortConfigs(o);this.hot.runHooks("beforeColumnSort",t,o,i)!==!1&&(t.length===0&&this.indexesSequenceCache===null&&(this.indexesSequenceCache=this.hot.rowIndexMapper.registerMap(this.pluginKey,new dB),this.indexesSequenceCache.setValues(this.hot.rowIndexMapper.getIndexesSequence())),i&&(this.columnStatesManager.setSortStates(o),this.sortByPresetSortStates(o)),this.hot.runHooks("afterColumnSort",t,i?o:t,i),i&&this.hot.render())}clearSort(){this.sort([])}isSorted(){return this.enabled&&!this.columnStatesManager.isListOfSortedColumnsEmpty()}getSortConfig(e){return J(e)?this.columnStatesManager.getColumnSortState(e):this.columnStatesManager.getSortStates()}setSortConfig(e){const t=this.getNormalizedSortConfigs(e);this.areValidSortConfigs(t)&&this.columnStatesManager.setSortStates(t)}getNormalizedSortConfigs(e=[]){return Array.isArray(e)?e.slice(0,1):[e]}areValidSortConfigs(e){const t=this.hot.countCols();return Pse(e)&&e.every(({column:o})=>o<=t&&o>=0)}getColumnNextConfig(e){const t=this.columnStatesManager.getSortOrderOfColumn(e);if(J(t)){const i=hO(t);return J(i)?{column:e,sortOrder:i}:void 0}const o=this.hot.countCols();if(Number.isInteger(e)&&e>=0&&e<o)return{column:e,sortOrder:hO()}}getNextSortConfig(e,t=ey){const o=this.columnStatesManager.getIndexOfColumnInSortQueue(e),i=o!==-1,s=this.getSortConfig(),r=this.getColumnNextConfig(e);if(i){if(Jt(r))return[...s.slice(0,o),...s.slice(o+1)];if(t===ey)return[...s.slice(0,o),...s.slice(o+1),r];if(t===Zse)return[...s.slice(0,o),r,...s.slice(o+1)]}return J(r)?s.concat(r):s}getPluginColumnConfig(e){if(ne(e)){const t=e[this.pluginKey];if(ne(t))return t}return{}}getMergedPluginSettings(e){const t=this.hot.getSettings()[this.pluginKey],o=this.columnStatesManager.getAllColumnsProperties(),i=this.hot.getCellMeta(0,e),s=Object.getPrototypeOf(i);return Array.isArray(s.columns)?Object.assign(o,t,this.getPluginColumnConfig(s.columns[e])):ye(s.columns)?Object.assign(o,t,this.getPluginColumnConfig(s.columns(e))):Object.assign(o,t)}getFirstCellSettings(e){const t=this.hot.getCellMeta(0,e),o=Object.create(t);return o[this.pluginKey]=this.columnMetaCache.getValueAtIndex(this.hot.toPhysicalColumn(e)),o}getNumberOfRowsToSort(e){const t=this.hot.getSettings();return t.maxRows<=e?t.maxRows:e-t.minSpareRows}sortByPresetSortStates(e){if(this.hot.rowIndexMapper.setIndexesSequence(this.indexesSequenceCache.getValues()),e.length===0)return;const t=[],o=this.hot.countRows(),i=h=>Tt(e,c=>this.hot.getDataAtCell(h,c.column));for(let h=0;h<this.getNumberOfRowsToSort(o);h+=1)t.push([this.hot.toPhysicalRow(h)].concat(i(h)));const s=Tt(t,h=>h[0]);Dse(t,this.pluginKey,Tt(e,h=>h.sortOrder),Tt(e,h=>this.getFirstCellSettings(h.column)));for(let h=t.length;h<o;h+=1)t.push([h].concat(i(h)));const r=Tt(t,h=>h[0]),a=new Map(Tt(s,(h,c)=>[h,r[c]])),l=Tt(this.hot.rowIndexMapper.getIndexesSequence(),h=>a.has(h)?a.get(h):h);this.hot.rowIndexMapper.setIndexesSequence(l)}sortBySettings(e){if(ne(e)){this.columnStatesManager.updateAllColumnsProperties(e);const t=e.initialConfig;(Array.isArray(t)||ne(t))&&this.sort(t)}else this.hot.render()}updateHeaderClasses(e,...t){oe(e,zse()),this.enabled!==!1&&B(e,Vse(...t))}onUpdateSettings(e){super.onUpdateSettings(e),this.columnMetaCache!==null&&this.columnMetaCache.init(this.hot.columnIndexMapper.getNumberOfIndexes()),J(e[this.pluginKey])&&this.sortBySettings(e[this.pluginKey])}wasClickableHeaderClicked(e,t){return this.getFirstCellSettings(t)[this.pluginKey].headerAction&&_e(e.target,O2)}onAfterOnCellMouseDown(e,t){if(fM(t.row,t.col,e)!==!1&&this.wasClickableHeaderClicked(e,t.col)){this.hot.getShortcutManager().isCtrlPressed()&&(this.hot.deselectCell(),this.hot.selectColumns(t.col));const o=this.hot.getActiveEditor(),i=this.getColumnNextConfig(t.col);o?.isOpened()&&this.hot.getCellValidator(o.row,o.col)?this.hot.addHookOnce("postAfterValidate",()=>{this.sort(i)}):this.sort(i)}}destroy(){this.columnStatesManager?.destroy(),super.destroy()}constructor(...e){super(...e),Bw(this,Zb),Bw(this,dO),Bw(this,uO),Bw(this,fO),qse(this,fv,{writable:!0,value:void 0}),this.columnStatesManager=null,this.columnMetaCache=null,this.pluginKey=JC,this.indexesSequenceCache=null,Kse(this,fv,t=>{this.setSortConfig(t?.columnSortConfig??[])})}}function h0(){const n=this.hot.getSettings()[this.pluginKey];this.sortBySettings(n)}function Qse(n,e){const t=D2(e);if(N2(n,e)===!1||t===null)return;const o=this.getFirstCellSettings(n)[this.pluginKey],i=o.indicator,s=o.headerAction;if(this.updateHeaderClasses(t,this.columnStatesManager,n,i,s),this.hot.getSettings().ariaTags){const r=this.columnStatesManager.getSortOrderOfColumn(n);fe(e,...WG(r?`${r}ending`:"none"))}}function Jse(n){n===!0&&this.hot.view&&Cu(this,Zb,h0).call(this)}function ere(n,e,t,o){fM(e.row,e.col,n)!==!1&&this.wasClickableHeaderClicked(n,e.col)&&this.hot.getShortcutManager().isCtrlPressed()&&(o.column=!0)}function gv(n){return n==null||isNaN(n)}function tre(n,e){if(typeof n!="number")return n;const t=o=>o.toString();switch(typeof e){case"number":return t(n.toFixed(Math.min(Math.max(0,e),100)));case"boolean":return e?t(Math.round(n)):n;case"string":if(e==="auto"){const o=Math.round(n).toString().length;return t(n.toFixed(8-o))}return n;default:return n}}class nre{initEndpoints(){this.endpoints=this.parseSettings(),this.refreshAllEndpoints()}getEndpoint(e){return this.settingsType==="function"?this.fillMissingEndpointData(this.settings)[e]:this.endpoints[e]}getAllEndpoints(){return this.settingsType==="function"?this.fillMissingEndpointData(this.settings):this.endpoints}fillMissingEndpointData(e){return this.parseSettings(e.call(this))}parseSettings(e){const t=[];let o=e;if(!o&&typeof this.settings=="function"){this.settingsType="function";return}return o||(o=this.settings),O(o,i=>{const s={};this.assignSetting(i,s,"ranges",[[0,this.hot.countRows()-1]]),this.assignSetting(i,s,"reversedRowCoords",!1),this.assignSetting(i,s,"destinationRow",new Error(`
|
|
232
|
+
You must provide a destination row for the Column Summary plugin in order to work properly!
|
|
233
|
+
`)),this.assignSetting(i,s,"destinationColumn",new Error(`
|
|
234
|
+
You must provide a destination column for the Column Summary plugin in order to work properly!
|
|
235
|
+
`)),this.assignSetting(i,s,"sourceColumn",i.destinationColumn),this.assignSetting(i,s,"type","sum"),this.assignSetting(i,s,"forceNumeric",!1),this.assignSetting(i,s,"suppressDataTypeErrors",!0),this.assignSetting(i,s,"customFunction",null),this.assignSetting(i,s,"readOnly",!0),this.assignSetting(i,s,"roundFloat",!1),t.push(s)}),t}assignSetting(e,t,o,i){if(o==="ranges"&&e[o]===void 0){t[o]=i;return}else if(o==="ranges"&&e[o].length===0)return;if(e[o]===void 0){if(i instanceof Error)throw i;t[o]=i}else o==="destinationRow"&&t.reversedRowCoords?t[o]=this.hot.countRows()-e[o]-1:t[o]=e[o]}resetSetupBeforeStructureAlteration(e,t,o){if(this.settingsType!=="function")return;const i=e.indexOf("row")>-1?"row":"col",s=this.getAllEndpoints();O(s,r=>{i==="row"&&r.destinationRow>=t&&(e==="insert_row"?r.alterRowOffset=o:e==="remove_row"&&(r.alterRowOffset=-1*o)),i==="col"&&r.destinationColumn>=t&&(e==="insert_col"?r.alterColumnOffset=o:e==="remove_col"&&(r.alterColumnOffset=-1*o))}),this.resetAllEndpoints(s,!1)}resetSetupAfterStructureAlteration(e,t,o,i,s,r=!0){if(s==="auto")return;if(this.settingsType==="function"){const u=()=>(this.hot.removeHook("beforeViewRender",u),this.refreshAllEndpoints());this.hot.addHookOnce("beforeViewRender",u);return}const a=e.indexOf("row")>-1?"row":"col",l=e.indexOf("remove")>-1?-1:1,h=this.getAllEndpoints(),c=e.indexOf("move_row")===0,d=t;O(h,u=>{a==="row"&&u.destinationRow>=d&&(u.alterRowOffset=l*o),a==="col"&&u.destinationColumn>=d&&(u.alterColumnOffset=l*o)}),this.resetAllEndpoints(h,!c),c?O(h,u=>{this.extendEndpointRanges(u,d,i[0],i.length),this.recreatePhysicalRanges(u),this.clearOffsetInformation(u)}):O(h,u=>{this.shiftEndpointCoordinates(u,d)}),r&&this.refreshAllEndpoints()}clearOffsetInformation(e){e.alterRowOffset=void 0,e.alterColumnOffset=void 0}extendEndpointRanges(e,t,o,i){O(e.ranges,s=>{s[1]&&(t>=s[0]&&t<=s[1]?o>s[1]?s[1]+=i:o<s[0]&&(s[0]-=i):o>=s[0]&&o<=s[1]&&(s[1]-=i,t<=s[0]&&(s[0]+=1,s[1]+=1)))})}recreatePhysicalRanges(e){const t=e.ranges,o=[],i=[];O(t,s=>{const r=[];if(s[1])for(let a=s[0];a<=s[1];a++)r.push(this.hot.toPhysicalRow(a));else r.push(this.hot.toPhysicalRow(s[0]));i.push(r)}),O(i,s=>{let r=[];O(s,(a,l)=>{l===0?r.push(a):s[l]!==s[l-1]+1&&(r.push(s[l-1]),o.push(r),r=[],r.push(a)),l===s.length-1&&(r.push(a),o.push(r))})}),e.ranges=o}shiftEndpointCoordinates(e,t){e.alterRowOffset&&e.alterRowOffset!==0?(e.destinationRow+=e.alterRowOffset||0,O(e.ranges,o=>{O(o,(i,s)=>{i>=t&&(o[s]+=e.alterRowOffset||0)})})):e.alterColumnOffset&&e.alterColumnOffset!==0&&(e.destinationColumn+=e.alterColumnOffset||0,e.sourceColumn+=e.alterColumnOffset||0)}resetAllEndpoints(e=this.getAllEndpoints(),t=!0){e.some(i=>{const s=i.alterRowOffset||0,r=i.alterColumnOffset||0;return i.destinationRow+s>=this.hot.countRows()||i.destinationColumn+r>=this.hot.countCols()})||(this.cellsToSetCache=[],O(e,i=>{this.resetEndpointValue(i,t)}),this.cellsToSetCache.length&&this.hot.setDataAtCell(this.cellsToSetCache,"ColumnSummary.reset"),this.cellsToSetCache=[])}refreshAllEndpoints(){this.cellsToSetCache=[],O(this.getAllEndpoints(),e=>{this.currentEndpoint=e,this.plugin.calculate(e),this.setEndpointValue(e,"init")}),this.currentEndpoint=null,this.cellsToSetCache.length&&this.hot.setDataAtCell(this.cellsToSetCache,"ColumnSummary.reset"),this.cellsToSetCache=[]}refreshChangedEndpoints(e){const t=[];this.cellsToSetCache=[],O(e,(o,i,s)=>{`${o[2]||""}`!=`${o[3]}`&&O(this.getAllEndpoints(),(r,a)=>{this.hot.propToCol(s[i][1])===r.sourceColumn&&t.indexOf(a)===-1&&t.push(a)})}),O(t,o=>{this.refreshEndpoint(this.getEndpoint(o))}),this.cellsToSetCache.length&&this.hot.setDataAtCell(this.cellsToSetCache,"ColumnSummary.reset"),this.cellsToSetCache=[]}refreshCellMetas(){this.endpoints.forEach(e=>{const t=this.hot.toVisualRow(e.destinationRow);if(t!==null){const o=this.hot.getCellMeta(t,e.destinationColumn);o.readOnly=e.readOnly,o.className="columnSummaryResult"}})}refreshEndpoint(e){this.currentEndpoint=e,this.plugin.calculate(e),this.setEndpointValue(e),this.currentEndpoint=null}resetEndpointValue(e,t=!0){const o=e.alterRowOffset||0,i=e.alterColumnOffset||0;this.cellsToSetCache.push([this.hot.toVisualRow(e.destinationRow+(t?o:0)),this.hot.toVisualColumn(e.destinationColumn+(t?i:0)),""])}setEndpointValue(e,t,o=!1){const i=this.hot.toVisualRow(e.destinationRow);if(e.destinationRow>=this.hot.countRows()||e.destinationColumn>=this.hot.countCols()){this.throwOutOfBoundsWarning();return}const s=this.hot.toVisualRow(e.destinationRow);if(s!==null){const r=this.hot.getCellMeta(s,e.destinationColumn);(t==="init"||r.readOnly!==e.readOnly)&&(r.readOnly=e.readOnly,r.className="columnSummaryResult")}e.result=tre(e.result,e.roundFloat),o?this.hot.setDataAtCell(i,e.destinationColumn,e.result,"ColumnSummary.set"):this.cellsToSetCache.push([i,e.destinationColumn,e.result]),e.alterRowOffset=void 0,e.alterColumnOffset=void 0}throwOutOfBoundsWarning(){Ie("One of the Column Summary plugins' destination points you provided is beyond the table boundaries!")}constructor(e,t){this.endpoints=[],this.settingsType="array",this.currentEndpoint=null,this.cellsToSetCache=[],this.plugin=e,this.hot=this.plugin.hot,this.settings=t}}function ore(n,e){if(e.has(n))throw new TypeError("Cannot initialize the same private elements twice on an object")}function xd(n,e,t){if(!e.has(n))throw new TypeError("attempted to get private field on non-instance");return t}function Md(n,e){ore(n,e),e.add(n)}const pv="columnSummary",ire=220;var gO=new WeakSet,pO=new WeakSet,mO=new WeakSet,wO=new WeakSet,bO=new WeakSet,CO=new WeakSet;class sre extends rt{static get PLUGIN_KEY(){return pv}static get PLUGIN_PRIORITY(){return ire}isEnabled(){return!!this.hot.getSettings()[pv]}enablePlugin(){this.enabled||(this.settings=this.hot.getSettings()[pv],this.endpoints=new nre(this,this.settings),this.addHook("afterInit",(...e)=>xd(this,gO,rre).call(this,...e)),this.addHook("afterChange",(...e)=>xd(this,mO,lre).call(this,...e)),this.addHook("afterUpdateSettings",(...e)=>xd(this,pO,are).call(this,...e)),this.addHook("afterLoadData",(...e)=>xd(this,wO,hre).call(this,...e)),this.addHook("afterUpdateData",(...e)=>xd(this,bO,cre).call(this,...e)),this.addHook("beforeCreateRow",(e,t,o)=>this.endpoints.resetSetupBeforeStructureAlteration("insert_row",e,t,null,o)),this.addHook("beforeCreateCol",(e,t,o)=>this.endpoints.resetSetupBeforeStructureAlteration("insert_col",e,t,null,o)),this.addHook("beforeRemoveRow",(...e)=>this.endpoints.resetSetupBeforeStructureAlteration("remove_row",...e)),this.addHook("beforeRemoveCol",(...e)=>this.endpoints.resetSetupBeforeStructureAlteration("remove_col",...e)),this.addHook("afterCreateRow",(e,t,o)=>this.endpoints.resetSetupAfterStructureAlteration("insert_row",e,t,null,o)),this.addHook("afterCreateCol",(e,t,o)=>this.endpoints.resetSetupAfterStructureAlteration("insert_col",e,t,null,o)),this.addHook("afterRemoveRow",(...e)=>this.endpoints.resetSetupAfterStructureAlteration("remove_row",...e)),this.addHook("afterRemoveCol",(...e)=>this.endpoints.resetSetupAfterStructureAlteration("remove_col",...e)),this.addHook("afterRowMove",(...e)=>xd(this,CO,dre).call(this,...e)),super.enablePlugin())}disablePlugin(){this.endpoints=null,this.settings=null,this.currentEndpoint=null,super.disablePlugin()}updatePlugin(){this.disablePlugin(),this.enablePlugin(),this.endpoints.initEndpoints(),super.updatePlugin()}calculate(e){switch(e.type.toLowerCase()){case"sum":e.result=this.calculateSum(e);break;case"min":e.result=this.calculateMinMax(e,e.type);break;case"max":e.result=this.calculateMinMax(e,e.type);break;case"count":e.result=this.countEntries(e);break;case"average":e.result=this.calculateAverage(e);break;case"custom":e.result=e.customFunction.call(this,e);break}}calculateSum(e){let t=0;return tt(e.ranges,o=>{t+=this.getPartialSum(o,e.sourceColumn)}),t}getPartialSum(e,t){let o=0,i=e[1]||e[0],s=null,r=0;do{if(s=this.getCellValue(i,t),s=gv(s)?null:s,s!==null){const a=(`${s}`.split(".")[1]||[]).length||1;a>r&&(r=a)}o+=s||0,i-=1}while(i>=e[0]);return Math.round(o*10**r)/10**r}calculateMinMax(e,t){let o=null;return tt(e.ranges,i=>{const s=this.getPartialMinMax(i,e.sourceColumn,t);if(o===null&&s!==null&&(o=s),s!==null)switch(t){case"min":o=Math.min(o,s);break;case"max":o=Math.max(o,s);break}}),o===null?"Not enough data":o}getPartialMinMax(e,t,o){let i=null,s=e[1]||e[0],r;do{if(r=this.getCellValue(s,t),r=gv(r)?null:r,i===null)i=r;else if(r!==null)switch(o){case"min":i=Math.min(i,r);break;case"max":i=Math.max(i,r);break}s-=1}while(s>=e[0]);return i}countEmpty(e,t){let o,i=0,s=e[1]||e[0];do o=this.getCellValue(s,t),o=gv(o)?null:o,o===null&&(i+=1),s-=1;while(s>=e[0]);return i}countEntries(e){let t=0;const o=e.ranges;return tt(o,i=>{const s=i[1]===void 0?1:i[1]-i[0]+1,r=this.countEmpty(i,e.sourceColumn);t+=s,t-=r}),t}calculateAverage(e){const t=this.calculateSum(e),o=this.countEntries(e);return t/o}getCellValue(e,t){const o=this.hot.toVisualRow(e),i=this.hot.toVisualColumn(t);let s=this.hot.getSourceDataAtCell(e,t),r="";return o!==null&&i!==null&&(r=this.hot.getCellMeta(o,i).className||""),r.indexOf("columnSummaryResult")>-1?null:(this.endpoints.currentEndpoint.forceNumeric&&(typeof s=="string"&&(s=s.replace(/,/,".")),s=parseFloat(s)),isNaN(s)&&(this.endpoints.currentEndpoint.suppressDataTypeErrors||U(pt`ColumnSummary plugin: cell at (${e}, ${t}) is not in a\x20
|
|
236
|
+
numeric format. Cannot do the calculation.`)),s)}constructor(...e){super(...e),Md(this,gO),Md(this,pO),Md(this,mO),Md(this,wO),Md(this,bO),Md(this,CO),this.endpoints=null}}function rre(){this.endpoints.initEndpoints()}function are(n){n.columns!==void 0&&this.endpoints.refreshCellMetas()}function lre(n,e){n&&e!=="ColumnSummary.reset"&&e!=="ColumnSummary.set"&&e!=="loadData"&&this.endpoints.refreshChangedEndpoints(n)}function hre(n,e){e||this.endpoints.refreshAllEndpoints()}function cre(n,e){e||this.endpoints.refreshAllEndpoints()}function dre(n,e){this.endpoints.resetSetupBeforeStructureAlteration("move_row",n[0],n.length,n,this.pluginName),this.endpoints.resetSetupAfterStructureAlteration("move_row",e,n.length,n,this.pluginName)}function U2(n,e){if(e.has(n))throw new TypeError("Cannot initialize the same private elements twice on an object")}function ure(n,e){return e.get?e.get.call(n):e.value}function fre(n,e,t){if(e.set)e.set.call(n,t);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=t}}function Y2(n,e,t){if(!e.has(n))throw new TypeError("attempted to "+t+" private field on non-instance");return e.get(n)}function yu(n,e){var t=Y2(n,e,"get");return ure(n,t)}function mv(n,e,t){U2(n,e),e.set(n,t)}function _u(n,e,t){var o=Y2(n,e,"set");return fre(n,o,t),t}function gre(n,e,t){if(!e.has(n))throw new TypeError("attempted to get private field on non-instance");return t}function pre(n,e){U2(n,e),e.add(n)}var Rp=new WeakMap,eg=new WeakMap,tg=new WeakMap,yO=new WeakSet;class G2{setObservedElement(e){_u(this,eg,e)}unobserve(){yu(this,tg).unobserve(yu(this,eg))}observe(){_u(this,Rp,!0),yu(this,tg).observe(yu(this,eg))}destroy(){yu(this,tg).disconnect()}constructor(){pre(this,yO),mv(this,Rp,{writable:!0,value:void 0}),mv(this,eg,{writable:!0,value:void 0}),mv(this,tg,{writable:!0,value:void 0}),_u(this,Rp,!0),_u(this,eg,null),_u(this,tg,new ResizeObserver(e=>gre(this,yO,mre).call(this,e)))}}function mre(n){if(yu(this,Rp)||!Array.isArray(n)||!n.length){_u(this,Rp,!1);return}n.forEach(({borderBoxSize:e})=>{const{inlineSize:t,blockSize:o}=e[0];this.runLocalHooks("resize",t,o)})}Ct(G2,$n);function wre(n,e){if(e.has(n))throw new TypeError("Cannot initialize the same private elements twice on an object")}function bre(n,e){return e.get?e.get.call(n):e.value}function Cre(n,e,t){if(e.set)e.set.call(n,t);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=t}}function j2(n,e,t){if(!e.has(n))throw new TypeError("attempted to "+t+" private field on non-instance");return e.get(n)}function At(n,e){var t=j2(n,e,"get");return bre(n,t)}function _l(n,e,t){wre(n,e),e.set(n,t)}function bi(n,e,t){var o=j2(n,e,"set");return Cre(n,o,t),t}var Id=new WeakMap,wv=new WeakMap,Vw=new WeakMap,Tr=new WeakMap,Sl=new WeakMap,vl=new WeakMap,ng=new WeakMap,Lh=new WeakMap;class Rc{static get CLASS_EDITOR_CONTAINER(){return"htCommentsContainer"}static get CLASS_EDITOR(){return"htComments"}static get CLASS_INPUT(){return"htCommentTextArea"}static get CLASS_CELL(){return"htCommentCell"}setPosition(e,t){At(this,vl).left=`${e}px`,At(this,vl).top=`${t}px`}setSize(e,t){if(e&&t){const o=this.getInputElement();o.style.width=`${e}px`,o.style.height=`${t}px`}}getSize(){return{width:bn(this.getInputElement()),height:Tn(this.getInputElement())}}observeSize(){At(this,Lh).observe()}resetSize(){const e=this.getInputElement();e.style.width="",e.style.height=""}setReadOnlyState(e){const t=this.getInputElement();t.readOnly=e}show(){At(this,vl).display="block",bi(this,ng,!1)}hide(){At(this,Lh).unobserve(),At(this,ng)||(At(this,vl).display="none"),bi(this,ng,!0)}isVisible(){return At(this,vl).display==="block"}setValue(e=""){const t=e||"";this.getInputElement().value=t}getValue(){return this.getInputElement().value}isFocused(){return At(this,Id).activeElement===this.getInputElement()}focus(){this.getInputElement().focus()}createEditor(){const e=At(this,Id).createElement("div"),t=At(this,Id).createElement("textarea");return e.style.display="none",bi(this,Tr,At(this,Id).createElement("div")),At(this,Tr).setAttribute("dir",At(this,Vw)?"rtl":"ltr"),B(At(this,Tr),Rc.CLASS_EDITOR_CONTAINER),At(this,wv).appendChild(At(this,Tr)),B(e,Rc.CLASS_EDITOR),B(t,Rc.CLASS_INPUT),t.setAttribute("data-hot-input",!0),e.appendChild(t),At(this,Tr).appendChild(e),e}getInputElement(){return At(this,Sl).querySelector(`.${Rc.CLASS_INPUT}`)}getEditorElement(){return At(this,Sl)}destroy(){const e=At(this,Tr)?At(this,Tr).parentNode:null;At(this,Sl).parentNode.removeChild(At(this,Sl)),bi(this,Sl,null),bi(this,vl,null),At(this,Lh).destroy(),e&&e.removeChild(At(this,Tr))}constructor(e,t,o){_l(this,Id,{writable:!0,value:void 0}),_l(this,wv,{writable:!0,value:void 0}),_l(this,Vw,{writable:!0,value:void 0}),_l(this,Tr,{writable:!0,value:void 0}),_l(this,Sl,{writable:!0,value:void 0}),_l(this,vl,{writable:!0,value:void 0}),_l(this,ng,{writable:!0,value:void 0}),_l(this,Lh,{writable:!0,value:void 0}),bi(this,Vw,!1),bi(this,Tr,null),bi(this,ng,!0),bi(this,Lh,new G2),bi(this,Id,e),bi(this,wv,o),bi(this,Vw,t),bi(this,Sl,this.createEditor()),bi(this,vl,At(this,Sl).style),At(this,Lh).setObservedElement(this.getInputElement()),At(this,Lh).addLocalHook("resize",(...i)=>this.runLocalHooks("resize",...i)),this.hide()}}Ct(Rc,$n);const yre=250,_re=250;class q2{hide(){this.wasLastActionShow=!1,this.hidingTimer=setTimeout(()=>{this.wasLastActionShow===!1&&this.runLocalHooks("hide")},_re)}show(e){this.wasLastActionShow=!0,this.showDebounced(e)}cancelHiding(){this.wasLastActionShow=!0,clearTimeout(this.hidingTimer),this.hidingTimer=null}updateDelay(e=yre){this.showDebounced=Im(t=>{this.wasLastActionShow&&this.runLocalHooks("show",t.from.row,t.from.col)},e)}destroy(){this.clearLocalHooks()}constructor(e){this.wasLastActionShow=!0,this.showDebounced=null,this.hidingTimer=null,this.updateDelay(e)}}Ct(q2,$n);function Sre(n,e,t){return n>1?bn(e):t}function vre(n,e){return n.indexOf(e)!==-1?n:`${n.replace("htTop","").replace("htMiddle","").replace("htBottom","").replace(" ","")} ${e}`}function Rre(n,e){return n.indexOf(e)!==-1?n:`${n.replace("htLeft","").replace("htCenter","").replace("htRight","").replace("htJustify","").replace(" ","")} ${e}`}function Wh(n,e){const t={};return O(n,o=>{o.forAll((i,s)=>{i>=0&&s>=0&&(t[i]||(t[i]=[]),t[i][s]=e(i,s))})}),t}function Vl(n,e,t,o,i){O(n,s=>{s.forAll((r,a)=>{r>=0&&a>=0&&Ere(r,a,e,t,o,i)})})}function Ere(n,e,t,o,i,s){const r=i(n,e);let a=o;r.className&&(t==="vertical"?a=vre(r.className,o):a=Rre(r.className,o)),s(n,e,"className",a)}function K2(n){return`<span class="selected">✓</span>${n}`}function Qb(n,e){let t=!1;return Array.isArray(n)&&O(n,o=>(o.forAll((i,s)=>{if(i>=0&&s>=0&&e(i,s))return t=!0,!1}),t)),t}function p_(n,e){const t={top:0,left:0};if(e!==n.ownerDocument){const{frameElement:o}=e.defaultView,{top:i,left:s}=o.getBoundingClientRect();t.top=i,t.left=s}return t}const He="---------";function kre(){return{name:He}}const Cs="alignment";function Tre(){return{key:Cs,name(){return this.getTranslatedPhrase(Xk)},disabled(){if(this.countRows()===0||this.countCols()===0)return!0;const n=this.getSelectedRangeActive();return!n||n.isSingleHeader()?!0:!(this.getSelectedRange()&&!this.selection.isSelectedByCorner())},submenu:{items:[{key:`${Cs}:left`,name(){return this.getTranslatedPhrase(Zk)},callback(){const n=this.getSelectedRange(),e=Wh(n,(i,s)=>this.getCellMeta(i,s).className),t="horizontal",o="htLeft";this.runHooks("beforeCellAlignment",e,n,t,o),Vl(n,t,o,(i,s)=>this.getCellMeta(i,s),(i,s,r,a)=>this.setCellMeta(i,s,r,a)),this.render()},disabled:!1},{key:`${Cs}:center`,name(){return this.getTranslatedPhrase(Qk)},callback(){const n=this.getSelectedRange(),e=Wh(n,(i,s)=>this.getCellMeta(i,s).className),t="horizontal",o="htCenter";this.runHooks("beforeCellAlignment",e,n,t,o),Vl(n,t,o,(i,s)=>this.getCellMeta(i,s),(i,s,r,a)=>this.setCellMeta(i,s,r,a)),this.render()},disabled:!1},{key:`${Cs}:right`,name(){return this.getTranslatedPhrase(Jk)},callback(){const n=this.getSelectedRange(),e=Wh(n,(i,s)=>this.getCellMeta(i,s).className),t="horizontal",o="htRight";this.runHooks("beforeCellAlignment",e,n,t,o),Vl(n,t,o,(i,s)=>this.getCellMeta(i,s),(i,s,r,a)=>this.setCellMeta(i,s,r,a)),this.render()},disabled:!1},{key:`${Cs}:justify`,name(){return this.getTranslatedPhrase(eT)},callback(){const n=this.getSelectedRange(),e=Wh(n,(i,s)=>this.getCellMeta(i,s).className),t="horizontal",o="htJustify";this.runHooks("beforeCellAlignment",e,n,t,o),Vl(n,t,o,(i,s)=>this.getCellMeta(i,s),(i,s,r,a)=>this.setCellMeta(i,s,r,a)),this.render()},disabled:!1},{name:He},{key:`${Cs}:top`,name(){return this.getTranslatedPhrase(tT)},callback(){const n=this.getSelectedRange(),e=Wh(n,(i,s)=>this.getCellMeta(i,s).className),t="vertical",o="htTop";this.runHooks("beforeCellAlignment",e,n,t,o),Vl(n,t,o,(i,s)=>this.getCellMeta(i,s),(i,s,r,a)=>this.setCellMeta(i,s,r,a)),this.render()},disabled:!1},{key:`${Cs}:middle`,name(){return this.getTranslatedPhrase(nT)},callback(){const n=this.getSelectedRange(),e=Wh(n,(i,s)=>this.getCellMeta(i,s).className),t="vertical",o="htMiddle";this.runHooks("beforeCellAlignment",e,n,t,o),Vl(n,t,o,(i,s)=>this.getCellMeta(i,s),(i,s,r,a)=>this.setCellMeta(i,s,r,a)),this.render()},disabled:!1},{key:`${Cs}:bottom`,name(){return this.getTranslatedPhrase(oT)},callback(){const n=this.getSelectedRange(),e=Wh(n,(i,s)=>this.getCellMeta(i,s).className),t="vertical",o="htBottom";this.runHooks("beforeCellAlignment",e,n,t,o),Vl(n,t,o,(i,s)=>this.getCellMeta(i,s),(i,s,r,a)=>this.setCellMeta(i,s,r,a)),this.render()},disabled:!1}]}}}const m_="clear_column";function xre(){return{key:m_,name(){return this.getTranslatedPhrase(Ok)},callback(n,e){const t=e[0].start.col,o=e[0].end.col;this.countRows()&&this.populateFromArray(0,t,[[null]],Math.max(e[0].start.row,e[0].end.row),o,"ContextMenu.clearColumn")},disabled(){const n=this.getSelectedRangeActive();if(!n||n.isSingleHeader()&&n.highlight.col<0||!this.selection.isSelectedByColumnHeader())return!0;let e=!1;return n.forAll((t,o)=>{if(t<0||o<0)return!0;const{readOnly:i}=this.getCellMeta(t,o);return i?!0:(e=!0,!1)}),!e}}}const Um="col_left";function Mre(){return{key:Um,name(){return this.getTranslatedPhrase(Tk)},callback(){const n=this.getSelectedRangeActive().getTopLeftCorner(),e=this.isRtl()?"insert_col_end":"insert_col_start";this.alter(e,n.col,1,"ContextMenu.columnLeft")},disabled(){if(!this.isColumnModificationAllowed())return!0;const n=this.getSelectedRangeActive();return!n||this.selection.isSelectedByRowHeader()||n.isSingleHeader()&&n.highlight.col<0||this.countSourceCols()>=this.getSettings().maxCols?!0:this.selection.isSelectedByCorner()?this.countCols()===0:!1},hidden(){return!this.getSettings().allowInsertColumn}}}const Ym="col_right";function Ire(){return{key:Ym,name(){return this.getTranslatedPhrase(xk)},callback(){const n=this.getSelectedRangeActive().getTopRightCorner(),e=this.isRtl()?"insert_col_start":"insert_col_end";this.alter(e,n.col,1,"ContextMenu.columnRight")},disabled(){if(!this.isColumnModificationAllowed())return!0;const n=this.getSelectedRangeActive();return!!(!n||this.selection.isSelectedByRowHeader()||n.isSingleHeader()&&n.highlight.col<0||this.countSourceCols()>=this.getSettings().maxCols)},hidden(){return!this.getSettings().allowInsertColumn}}}const Gm="make_read_only";function Hre(){return{key:Gm,checkable:!0,ariaChecked(){return Qb(this.getSelectedRange(),(e,t)=>this.getCellMeta(e,t).readOnly)},ariaLabel(){return this.getTranslatedPhrase(MC)},name(){let n=this.getTranslatedPhrase(MC);return Qb(this.getSelectedRange(),(t,o)=>this.getCellMeta(t,o).readOnly)&&(n=K2(n)),n},callback(){const n=this.getSelectedRange(),e=Qb(n,(t,o)=>this.getCellMeta(t,o).readOnly);O(n,t=>{t.forAll((o,i)=>{o>=0&&i>=0&&this.setCellMeta(o,i,"readOnly",!e)})}),this.render()},disabled(){const n=this.getSelectedRangeActive();return!!(!n||n.isSingleHeader()||this.selection.isSelectedByCorner()||this.countRows()===0||this.countCols()===0||!this.getSelectedRange()||this.getSelectedRange().length===0)}}}const w_="redo";function Are(){return{key:w_,name(){return this.getTranslatedPhrase(Ak)},callback(){this.getPlugin("undoRedo").redo()},hidden(){const n=this.getPlugin("undoRedo");return!n||!n.isEnabled()},disabled(){return!this.getPlugin("undoRedo").isRedoAvailable()}}}const jm="remove_col";function Ore(){return{key:jm,name(){const n=this.getSelected();let e=0;if(n)if(n.length>1)e=1;else{const[,t,,o]=n[0];t-o!==0&&(e=1)}return this.getTranslatedPhrase(Ik,e)},callback(){this.alter("remove_col",nj(this),null,"ContextMenu.removeColumn")},disabled(){if(!this.isColumnModificationAllowed())return!0;const n=this.getSelectedRangeActive();if(!n||n.isSingleHeader()&&n.highlight.col<0)return!0;const e=this.countCols();return this.selection.isSelectedByCorner()?e===0:this.selection.isSelectedByRowHeader()||e===0},hidden(){return!this.getSettings().allowRemoveColumn}}}const b_="remove_row";function Dre(){return{key:b_,name(){const n=this.getSelected();let e=0;if(n)if(n.length>1)e=1;else{const[t,,o]=n[0];t-o!==0&&(e=1)}return this.getTranslatedPhrase(Mk,e)},callback(){this.alter("remove_row",oj(this),1,"ContextMenu.removeRow")},disabled(){const n=this.getSelectedRangeActive();if(!n||n.isSingleHeader()&&n.highlight.row<0)return!0;const e=this.countRows();return this.selection.isSelectedByCorner()?e===0:this.selection.isSelectedByColumnHeader()||e===0},hidden(){return!this.getSettings().allowRemoveRow}}}const C_="row_above";function Nre(){return{key:C_,name(){return this.getTranslatedPhrase(Ek)},callback(){const n=this.getSelectedRangeActive().getTopLeftCorner();this.alter("insert_row_above",n.row,1,"ContextMenu.rowAbove")},disabled(){const n=this.getSelectedRangeActive();return!n||this.selection.isSelectedByColumnHeader()||n.isSingleHeader()&&n.highlight.row<0||this.countSourceRows()>=this.getSettings().maxRows?!0:this.selection.isSelectedByCorner()?this.countRows()===0:!1},hidden(){return!this.getSettings().allowInsertRow}}}const y_="row_below";function Pre(){return{key:y_,name(){return this.getTranslatedPhrase(kk)},callback(){const n=this.getSelectedRangeActive().getBottomRightCorner();this.alter("insert_row_below",n.row,1,"ContextMenu.rowBelow")},disabled(){const n=this.getSelectedRangeActive();return!!(!n||this.selection.isSelectedByColumnHeader()||n.isSingleHeader()&&n.highlight.row<0||this.countSourceRows()>=this.getSettings().maxRows)},hidden(){return!this.getSettings().allowInsertRow}}}const lm="no_items";function Lre(){return{key:lm,name(){return this.getTranslatedPhrase(Rk)},disabled:!0,isCommand:!1}}const __="undo";function Wre(){return{key:__,name(){return this.getTranslatedPhrase(Hk)},callback(){this.getPlugin("undoRedo").undo()},hidden(){const n=this.getPlugin("undoRedo");return!n||!n.isEnabled()},disabled(){return!this.getPlugin("undoRedo").isUndoAvailable()}}}const $re=[C_,y_,Um,Ym,m_,b_,jm,__,w_,Gm,Cs,He,lm],Fre={[He]:kre,[lm]:Lre,[C_]:Nre,[y_]:Pre,[Um]:Mre,[Ym]:Ire,[m_]:xre,[b_]:Dre,[jm]:Ore,[__]:Wre,[w_]:Are,[Gm]:Hre,[Cs]:Tre};function X2(){const n={};return tt(Fre,(e,t)=>{n[t]=e()}),n}function Bre(n){return{key:"commentsAddEdit",name(){const e=this.getSelectedRangeActive()?.highlight;return e?.isCell()&&n.getCommentAtCell(e.row,e.col)?this.getTranslatedPhrase(jk):this.getTranslatedPhrase(Gk)},callback(){const e=this.getSelectedRangeActive();n.setRange(e),n.show(),n.focusEditor()},disabled(){const e=this.getSelectedRangeActive();return!!(!e||e.highlight.isHeader()||this.selection.isEntireRowSelected()&&this.selection.isEntireColumnSelected()||this.countRenderedRows()===0||this.countRenderedCols()===0)}}}function Vre(n){return{key:"commentsRemove",name(){return this.getTranslatedPhrase(qk)},callback(){this.getSelectedRangeActive().forAll((t,o)=>{t>=0&&o>=0&&n.removeCommentAtCell(t,o,!1)}),this.render()},disabled(){const e=this.getSelectedRangeActive();return!!(!e||e.highlight.isHeader()||this.selection.isEntireRowSelected()&&this.selection.isEntireColumnSelected()||this.countRenderedRows()===0||this.countRenderedCols()===0)}}}function zre(n){return{key:"commentsReadOnly",name(){const e=this.getTranslatedPhrase(Kk);return Qb(this.getSelectedRange(),(o,i)=>n.getCommentMeta(o,i,Jb))?K2(e):e},callback(){this.getSelectedRangeActive().forAll((t,o)=>{if(t>=0&&o>=0){const i=!!n.getCommentMeta(t,o,Jb);n.updateCommentMeta(t,o,{[Jb]:!i})}})},disabled(){const e=this.getSelectedRangeActive();return!!(!e||e.highlight.isHeader()||!n.getCommentAtCell(e.highlight.row,e.highlight.col)||this.selection.isEntireRowSelected()&&this.selection.isEntireColumnSelected()||this.countRenderedRows()===0||this.countRenderedCols()===0)}}}function Z2(n,e){if(e.has(n))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Ure(n,e){return e.get?e.get.call(n):e.value}function Yre(n,e,t){if(e.set)e.set.call(n,t);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=t}}function Q2(n,e,t){if(!e.has(n))throw new TypeError("attempted to "+t+" private field on non-instance");return e.get(n)}function qe(n,e){var t=Q2(n,e,"get");return Ure(n,t)}function $h(n,e,t){Z2(n,e),e.set(n,t)}function Ao(n,e,t){var o=Q2(n,e,"set");return Yre(n,o,t),t}function wo(n,e,t){if(!e.has(n))throw new TypeError("attempted to get private field on non-instance");return t}function ls(n,e){Z2(n,e),e.add(n)}const ty="comments",Gre=60,La="comment",tp="value",J2="style",Jb="readOnly",og=ty,ny=`plugin:${ty}`;var Rt=new WeakMap,sr=new WeakMap,hm=new WeakMap,np=new WeakMap,Ep=new WeakMap,oy=new WeakMap,kp=new WeakMap,_O=new WeakSet,SO=new WeakSet,vO=new WeakSet,RO=new WeakSet,EO=new WeakSet,kO=new WeakSet,TO=new WeakSet,xO=new WeakSet,MO=new WeakSet,bv=new WeakSet,IO=new WeakSet,hc=new WeakSet;class jre extends rt{static get PLUGIN_KEY(){return ty}static get PLUGIN_PRIORITY(){return Gre}static get DEFAULT_SETTINGS(){return{displayDelay:250}}isEnabled(){return!!this.hot.getSettings()[ty]}enablePlugin(){this.enabled||(qe(this,Rt)||(Ao(this,Rt,new Rc(this.hot.rootDocument,this.hot.isRtl(),this.hot.rootPortalElement)),qe(this,Rt).addLocalHook("resize",(...e)=>wo(this,MO,nae).call(this,...e)),this.hot.addHook("afterSetTheme",(e,t)=>{t||this.hide()})),qe(this,sr)||Ao(this,sr,new q2(this.getSetting("displayDelay"))),this.addHook("afterContextMenuDefaultOptions",e=>this.addToContextMenu(e)),this.addHook("afterRenderer",(e,t,o,i,s,r)=>wo(this,EO,Qre).call(this,e,r)),this.addHook("afterScroll",()=>wo(this,IO,oae).call(this)),this.addHook("afterBeginEditing",()=>this.hide()),this.addHook("afterDocumentKeyDown",e=>wo(this,bv,HO).call(this,e)),this.addHook("beforeCompositionStart",e=>wo(this,bv,HO).call(this,e)),qe(this,sr).addLocalHook("hide",()=>this.hide()),qe(this,sr).addLocalHook("show",(e,t)=>this.showAtCell(e,t)),this.registerShortcuts(),this.registerListeners(),super.enablePlugin())}updatePlugin(){qe(this,sr).updateDelay(this.getSetting("displayDelay")),super.updatePlugin()}disablePlugin(){this.unregisterShortcuts(),super.disablePlugin()}registerShortcuts(){const e=this.hot.getShortcutManager(),t=e.getContext("grid"),o=e.addContext(ny);t.addShortcut({keys:[["Control","Alt","M"]],callback:()=>{const i=this.hot.getSelectedRangeActive();Ao(this,np,!0),this.hot.scrollToFocusedCell(()=>{this.setRange(i),this.show(),this.focusEditor(),e.setActiveContextName(ny),this.hot._registerTimeout(()=>{Ao(this,np,!1)})})},stopPropagation:!0,runOnlyIf:()=>this.hot.getSelectedRangeActive()?.highlight.isCell(),group:og}),o.addShortcut({keys:[["Escape"]],callback:()=>{qe(this,Rt).setValue(qe(this,kp)),this.hide(),e.setActiveContextName("grid")},runOnlyIf:()=>qe(this,Rt).isVisible()&&qe(this,Rt).isFocused(),group:og}),o.addShortcut({keys:[["Control/Meta","Enter"]],callback:()=>{this.hide(),e.setActiveContextName("grid")},runOnlyIf:()=>qe(this,Rt).isVisible()&&qe(this,Rt).isFocused(),group:og}),o.addShortcut({keys:[["Shift","Tab"],["Tab"]],forwardToContext:e.getContext("grid"),callback:()=>{Ao(this,Ep,!0),qe(this,Rt).setValue(qe(this,Rt).getValue()),this.setComment(),this.hide(),e.setActiveContextName("grid")},group:og})}unregisterShortcuts(){this.hot.getShortcutManager().getContext("grid").removeShortcutsByGroup(og)}registerListeners(){const{rootDocument:e}=this.hot,t=this.getEditorInputElement();this.eventManager.addEventListener(e,"mouseover",o=>wo(this,vO,Xre).call(this,o)),this.eventManager.addEventListener(e,"mousedown",o=>wo(this,_O,qre).call(this,o)),this.eventManager.addEventListener(e,"mouseup",()=>wo(this,RO,Zre).call(this)),this.eventManager.addEventListener(t,"focus",()=>wo(this,TO,eae).call(this)),this.eventManager.addEventListener(t,"blur",()=>wo(this,kO,Jre).call(this)),this.eventManager.addEventListener(t,"keydown",o=>wo(this,xO,tae).call(this,o)),this.eventManager.addEventListener(this.getEditorInputElement(),"mousedown",o=>wo(this,SO,Kre).call(this,o))}setRange(e){this.range=e}clearRange(){this.range={}}targetIsCellWithComment(e){const t=Vc(e.target,"TD","TBODY");return!!(t&&_e(t,"htCommentCell")&&Vc(t,[this.hot.rootElement]))}targetIsCommentTextArea(e){return this.getEditorInputElement()===e.target}setComment(e){this.range.from||U('Before using this method, first set cell range (hot.getPlugin("comment").setRange())');const t=qe(this,Rt).getValue();let o="";e!=null?o=e:t!=null&&(o=t);const{row:i,col:s}=wo(this,hc,Su).call(this);this.updateCommentMeta(i,s,{[tp]:o}),this.hot.render()}setCommentAtCell(e,t,o){this.setRange({from:this.hot._createCellCoords(e,t)}),this.setComment(o)}removeComment(e=!0){this.range.from||U('Before using this method, first set cell range (hot.getPlugin("comment").setRange())');const{row:t,col:o}=wo(this,hc,Su).call(this);this.hot.setCellMeta(t,o,La),e&&this.hot.render(),this.hide()}removeCommentAtCell(e,t,o=!0){this.setRange({from:this.hot._createCellCoords(e,t)}),this.removeComment(o)}getComment(){const{row:e,col:t}=wo(this,hc,Su).call(this);return this.getCommentMeta(e,t,tp)}getCommentAtCell(e,t){return this.getCommentMeta(e,t,tp)}show(){this.range.from||U('Before using this method, first set cell range (hot.getPlugin("comment").setRange())');const{row:e,col:t}=wo(this,hc,Su).call(this);if(e<0||e>this.hot.countSourceRows()-1||t<0||t>this.hot.countSourceCols()-1)return!1;const o=this.hot.getCellMeta(e,t);return qe(this,sr).cancelHiding(),qe(this,Rt).setValue((o[La]?o[La][tp]:null)??""),qe(this,Rt).show(),this.refreshEditor(!0),!0}showAtCell(e,t){return this.setRange({from:this.hot._createCellCoords(e,t)}),this.show()}hide(){qe(this,Rt).hide()}refreshEditor(e=!1){if(!e&&(!this.range.from||!qe(this,Rt).isVisible()))return;const{rowIndexMapper:t,columnIndexMapper:o}=this.hot,{row:i,col:s}=wo(this,hc,Su).call(this);let r=t.getRenderableFromVisualIndex(i),a=o.getRenderableFromVisualIndex(s);const l=r===null;qe(this,Rt).setPosition(0,0),r===null&&(r=t.getRenderableFromVisualIndex(t.getNearestNotHiddenIndex(i,-1))),a===null&&(a=o.getRenderableFromVisualIndex(o.getNearestNotHiddenIndex(s,-1)));const h=r===null,c=a===null;r=r??0,a=a??0;const{rootWindow:d,view:{_wt:u}}=this.hot,{wtTable:f}=u,p=u.getCell({row:r,col:a},!0),_=this.hot.getCellMeta(i,s).colspan??1,S=this.getCommentMeta(i,s,J2);S?qe(this,Rt).setSize(S.width,S.height):qe(this,Rt).resetSize();const T=c?0:Sre(_,p,f.getColumnWidth(a)),P=l&&!h?Tn(p):0,{left:F,top:V,width:D,height:I}=p.getBoundingClientRect(),{width:G,height:z}=qe(this,Rt).getSize(),{innerWidth:Y,innerHeight:te}=this.hot.rootWindow,ee=this.hot.rootDocument.documentElement,be=xn(this.hot.rootDocument),me=aF(this.hot.rootWindow)?be:0,Ve=lF(this.hot.rootWindow)?be:0,Ye=_>1?1:0;let Me=F+d.scrollX+T-Ye,Ge=V+d.scrollY+P;this.hot.isRtl()&&(Me-=G+T),this.hot.isLtr()&&F+D+G>Y-me?Me=F+d.scrollX-G-1:this.hot.isRtl()&&Me<-(ee.scrollWidth-ee.clientWidth)&&(Me=F+d.scrollX+T+1),V+z>te-Ve&&(Ge-=z-I+1),qe(this,Rt).setPosition(Me,Ge),qe(this,Rt).setReadOnlyState(this.getCommentMeta(i,s,Jb)),qe(this,Rt).observeSize()}focusEditor(){qe(this,Rt).focus()}updateCommentMeta(e,t,o){const i=this.hot.getCellMeta(e,t)[La];let s;i?(s=Qn(i),Hy(s,o)):s=o,this.hot.setCellMeta(e,t,La,s)}getCommentMeta(e,t,o){const i=this.hot.getCellMeta(e,t);if(i[La])return i[La][o]}addToContextMenu(e){e.items.push({name:He},Bre(this),Vre(this),zre(this))}getEditorInputElement(){return qe(this,Rt).getInputElement()}destroy(){qe(this,Rt)?.destroy(),qe(this,sr)?.destroy(),super.destroy()}constructor(...e){super(...e),ls(this,_O),ls(this,SO),ls(this,vO),ls(this,RO),ls(this,EO),ls(this,kO),ls(this,TO),ls(this,xO),ls(this,MO),ls(this,bv),ls(this,IO),ls(this,hc),$h(this,Rt,{writable:!0,value:void 0}),$h(this,sr,{writable:!0,value:void 0}),$h(this,hm,{writable:!0,value:void 0}),$h(this,np,{writable:!0,value:void 0}),$h(this,Ep,{writable:!0,value:void 0}),$h(this,oy,{writable:!0,value:void 0}),$h(this,kp,{writable:!0,value:void 0}),this.range={},Ao(this,Rt,null),Ao(this,sr,null),Ao(this,hm,!1),Ao(this,np,!1),Ao(this,Ep,!1),Ao(this,oy,null),Ao(this,kp,"")}}function qre(n){if(!(!this.hot.view||!this.hot.view._wt)&&!qe(this,hm)&&!this.targetIsCommentTextArea(n)){const e=Vc(n.target,"TD","TBODY");let t=null;e&&(t=this.hot.getCoords(e)),(!e||this.range.from&&t&&(this.range.from.row!==t.row||this.range.from.col!==t.col))&&this.hide()}}function Kre(n){n.stopPropagation()}function Xre(n){const{rootDocument:e}=this.hot;if(!(qe(this,hm)||qe(this,Rt).isFocused()||_e(n.target,"wtBorder")||qe(this,oy)===n.target||!qe(this,Rt)))if(Ao(this,oy,e.elementFromPoint(n.clientX,n.clientY)),this.targetIsCellWithComment(n)){const t=this.hot._createCellRange(this.hot.getCoords(n.target));qe(this,sr).show(t)}else Hc(n.target,e)&&!this.targetIsCommentTextArea(n)&&qe(this,sr).hide()}function Zre(){Ao(this,hm,!1)}function Qre(n,e){e[La]&&e[La][tp]&&B(n,e.commentedCellClassName)}function Jre(){if(qe(this,Ep)){Ao(this,Ep,!1);return}Ao(this,kp,""),this.hot.getShortcutManager().setActiveContextName("grid"),this.setComment()}function eae(){Ao(this,kp,this.getComment()),this.hot.listen(),this.hot.getShortcutManager().setActiveContextName(ny)}function tae(n){qe(this,Rt).isVisible()&&(this.hot.getShortcutManager().hasEventShortcut(ny,n)||n.stopPropagation())}function nae(n,e){const{row:t,col:o}=wo(this,hc,Su).call(this);this.updateCommentMeta(t,o,{[J2]:{width:n,height:e}})}function HO(n){qe(this,Rt).isFocused()&&es(n)}function oae(){qe(this,np)||this.hide()}function Su(){return this.range instanceof lf?this.range.highlight:this.hot._createCellCoords(this.range.from.row,this.range.from.col)}class eU{registerCommand(e,t){this.commands[e]=t}setCommonCallback(e){this.commonCallback=e}execute(e,...t){const o=e.split(":"),i=o[0],s=o.length===2?o[1]:null;let r=this.commands[i];if(r||U(`Menu command '${i}' not exists.`),s&&r.submenu&&(r=iae(s,r.submenu.items)),r.disabled===!0||typeof r.disabled=="function"&&r.disabled.call(this.hot)===!0||en(r,"submenu"))return;const a=[];typeof r.callback=="function"&&a.push(r.callback),typeof this.commonCallback=="function"&&a.push(this.commonCallback),t.unshift(o.join(":")),O(a,l=>l.apply(this.hot,t))}constructor(e){this.commands={},this.commonCallback=null,this.hot=e}}function iae(n,e){let t;return O(e,o=>{const i=o.key?o.key.split(":"):null;if(Array.isArray(i)&&i[1]===n)return t=o,!1}),t}class tU{setPredefinedItems(e){const t={};this.defaultOrderPattern.length=0,tt(e,(o,i)=>{let s="";o.name===He?(t[He]=o,s=He):isNaN(parseInt(i,10))?(o.key=o.key===void 0?i:o.key,t[i]=o,s=o.key):(t[o.key]=o,s=o.key),this.defaultOrderPattern.push(s)}),this.predefinedItems=t}getItems(e=null){return sae(e,this.defaultOrderPattern,this.predefinedItems)}constructor(e,t=null){this.predefinedItems=X2(),this.hot=e,this.defaultOrderPattern=t}}function sae(n=null,e=[],t={}){const o=[];let i=n;return i&&i.items?i=i.items:Array.isArray(i)||(i=e),ne(i)?tt(i,(s,r)=>{let a=t[typeof s=="string"?s:r];a||(a=s),ne(s)?Wn(a,s):typeof a=="string"&&(a={name:a}),a.key===void 0&&(a.key=r),o.push(a)}):O(i,(s,r)=>{let a=t[s];!a&&$re.indexOf(s)>=0||(a||(a={name:s,key:`${r}`}),ne(s)&&Wn(a,s),a.key===void 0&&(a.key=r),o.push(a))}),o}class rae{getSourceType(e){let t="literal";return e instanceof Event&&(t="event"),t}fitsAbove(e){return this.topRelative>=e.offsetHeight}fitsBelow(e,t=this.rootWindow.innerHeight){return this.topRelative+e.offsetHeight<=t}fitsOnRight(e,t=this.rootWindow.document.documentElement.clientWidth){return this.leftRelative+this.cellWidth+e.offsetWidth<=t}fitsOnLeft(e){return this.leftRelative>=e.offsetWidth}constructor(e,t){const o=t.scrollY,i=t.scrollX;let s,r,a,l,h,c;this.rootWindow=t,this.type=this.getSourceType(e),this.type==="literal"?(s=parseInt(e.top,10),a=parseInt(e.left,10),h=e.height||0,c=e.width||0,r=s,l=a,s+=o,a+=i):this.type==="event"&&(s=parseInt(e.pageY,10),a=parseInt(e.pageX,10),h=e.target.clientHeight,c=e.target.clientWidth,r=s-o,l=a-i),this.top=s,this.topRelative=r,this.left=a,this.leftRelative=l,this.scrollTop=o,this.scrollLeft=i,this.cellHeight=h,this.cellWidth=c}}function aae(n,e){if(e.has(n))throw new TypeError("Cannot initialize the same private elements twice on an object")}function lae(n,e){return e.get?e.get.call(n):e.value}function hae(n,e,t){if(e.set)e.set.call(n,t);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=t}}function nU(n,e,t){if(!e.has(n))throw new TypeError("attempted to "+t+" private field on non-instance");return e.get(n)}function Ue(n,e){var t=nU(n,e,"get");return lae(n,t)}function ig(n,e,t){aae(n,e),e.set(n,t)}function Hd(n,e,t){var o=nU(n,e,"set");return hae(n,o,t),t}var ni=new WeakMap,Ci=new WeakMap,yi=new WeakMap,zw=new WeakMap,Fh=new WeakMap;class cae{setOffset(e,t=0){return Ue(this,Fh)[e]=t,this}setElement(e){return Hd(this,ni,e),this}setParentElement(e){return Hd(this,Ci,e),this}updatePosition(e){Hd(this,yi,new rae(e,Ue(this,ni).ownerDocument.defaultView)),Ue(this,zw)?(Ue(this,yi).fitsBelow(Ue(this,ni))?this.setPositionBelowCursor():Ue(this,yi).fitsAbove(Ue(this,ni))?this.setPositionAboveCursor():this.setPositionBelowCursor(),this.updateHorizontalPosition()):(this.setPositionBelowCursor(),this.setPositionOnRightOfCursor())}updateHorizontalPosition(){Ue(this,ni).dir==="rtl"?Ue(this,yi).fitsOnLeft(Ue(this,ni))?this.setPositionOnLeftOfCursor():this.setPositionOnRightOfCursor():Ue(this,yi).fitsOnRight(Ue(this,ni))?this.setPositionOnRightOfCursor():this.setPositionOnLeftOfCursor()}setPositionAboveCursor(){let e=Ue(this,Fh).above+Ue(this,yi).top-Ue(this,ni).offsetHeight;if(Ue(this,Ci)){const o=Ue(this,Ci).ownerDocument.defaultView.getComputedStyle(Ue(this,Ci).querySelector(".ht_master")),i=Number.parseInt(o.paddingTop,10),s=Number.parseInt(o.borderTop,10);e=Ue(this,yi).top+Ue(this,yi).cellHeight-Ue(this,ni).scrollHeight+i+s}Ue(this,ni).style.top=`${e}px`}setPositionBelowCursor(){let e=Ue(this,Fh).below+Ue(this,yi).top+1;if(Ue(this,Ci)){const o=Ue(this,Ci).ownerDocument.defaultView.getComputedStyle(Ue(this,Ci).querySelector(".ht_master")),i=Number.parseInt(o.paddingTop,10),s=Number.parseInt(o.borderTop,10);e=Ue(this,yi).top-i-s}Ue(this,ni).style.top=`${e}px`}setPositionOnRightOfCursor(){let e=Ue(this,yi).left;if(Ue(this,Ci)){const t=Ue(this,Ci).ownerDocument.defaultView,o=Number.parseInt(t.getComputedStyle(Ue(this,Ci).querySelector(".htCore")).borderRightWidth,10);e+=Ue(this,yi).cellWidth+o}else e+=Ue(this,Fh).right;Ue(this,ni).style.left=`${e}px`}setPositionOnLeftOfCursor(){let e=Ue(this,Fh).left+Ue(this,yi).left-Ue(this,ni).offsetWidth;if(Ue(this,Ci)){const t=Ue(this,Ci).ownerDocument.defaultView,o=Number.parseInt(t.getComputedStyle(Ue(this,Ci).querySelector(".htCore")).borderLeftWidth,10);e-=o}Ue(this,ni).style.left=`${e}px`}constructor(e){ig(this,ni,{writable:!0,value:void 0}),ig(this,Ci,{writable:!0,value:void 0}),ig(this,yi,{writable:!0,value:void 0}),ig(this,zw,{writable:!0,value:void 0}),ig(this,Fh,{writable:!0,value:void 0}),Hd(this,zw,!1),Hd(this,Fh,{above:0,below:0,left:0,right:0}),Hd(this,zw,e)}}function oU({initialPage:n=-1,size:e=()=>0,onItemSelect:t=()=>{},onClear:o=()=>{}}){const i=new Set;let s=et(n,-1,p()-1);function r(_,S){const T=p()-1;return _<0&&(_=T),_>T&&(_=0),i.has(_)?-1:(i.add(_),t(_,!1)===!1&&(_=r(S===1?++_:--_,S)),_)}function a(_){_>-1&&_<p()&&t(_,!0)!==!1&&(s=_)}function l(_){_>-1&&_<p()&&(s=_)}function h(){return s}function c(){p()>0&&(i.clear(),s=r(0,1))}function d(){p()>0&&(i.clear(),s=r(p()-1,-1))}function u(){p()>0&&(i.clear(),s=r(++s,1))}function f(){p()>0&&(i.clear(),s=r(--s,-1))}function p(){return Math.max(e(),0)}function C(){i.clear(),s=n,o()}return{setCurrentPage:a,setPageCursorAt:l,getCurrentPage:h,toFirstItem:c,toLastItem:d,toNextItem:u,toPreviousItem:f,getSize:p,clear:C}}function dae(n){return Tt(n,e=>({start:e.getTopStartCorner(),end:e.getBottomEndCorner()}))}function c0(n){return en(n,"submenu")}function d0(n){return new RegExp(He,"i").test(n.name)}function eC(n,e){return n.disabled===!0||typeof n.disabled=="function"&&n.disabled.call(e)===!0}function AO(n){return en(n,"disableSelection")}function uae(n){return _e(n,"htSeparator")}function fae(n){return _e(n,"htSubmenu")}function gae(n){return _e(n,"htDisabled")}function pae(n){return _e(n,"htSelectionDisabled")}function mae(n,e){return!n.hidden||!(typeof n.hidden=="function"&&n.hidden.call(e))}function iU(n,e){const t=n.slice(0);for(let o=0;o<t.length&&t[o].name===e;)t.shift();return t}function wae(n,e){let t=n.slice(0);return t.reverse(),t=iU(t,e),t.reverse(),t}function bae(n){const e=[];return O(n,(t,o)=>{o>0?e[e.length-1].name!==t.name&&e.push(t):e.push(t)}),e}function Cae(n,e=He){let t=n.slice(0);return t=iU(t,e),t=wae(t,e),t=bae(t),t}function yae(n){return n.checkable===!0}function _ae(n){return oU({size:()=>n.countRows(),onItemSelect(e,t){const o=n.getCell(e,0);if(!o||uae(o)||gae(o)||pae(o))return!1;n.selectCell(e,0,...t?[e,0,!1,!1]:[])},onClear(){n.deselectCell()}})}function Sae(n){const{hot:e,hotMenu:t}=n;return[{keys:[["Control/Meta","A"]],forwardToContext:e.getShortcutManager().getContext("grid"),callback:()=>n.close(!0)},{keys:[["Tab"],["Shift","Tab"]],callback:(o,i)=>{const s=e.getSettings(),r=typeof s.tabMoves=="function"?s.tabMoves(o):s.tabMoves;i.includes("shift")?e.selection.transformStart(-r.row,-r.col):e.selection.transformStart(r.row,r.col),n.close(!0)}},{keys:[["Escape"]],callback:()=>n.close()},{keys:[["ArrowDown"]],callback:()=>n.getNavigator().toNextItem()},{keys:[["ArrowUp"]],callback:()=>n.getNavigator().toPreviousItem()},{keys:[[e.isRtl()?"ArrowLeft":"ArrowRight"]],callback:()=>{const o=t.getSelectedActive();if(o){const i=n.openSubMenu(o[0]);i&&i.getNavigator().toFirstItem()}}},{keys:[[e.isRtl()?"ArrowRight":"ArrowLeft"]],callback:()=>{t.getSelectedActive()&&n.isSubMenu()&&(n.close(),n.isSubMenu()&&n.parentMenu.hotMenu.listen())}},{keys:[["Control/Meta","ArrowUp"],["Home"]],callback:()=>n.getNavigator().toFirstItem()},{keys:[["Control/Meta","ArrowDown"],["End"]],callback:()=>n.getNavigator().toLastItem()},{keys:[["Enter"],["Space"]],callback:o=>{const i=t.getSelectedActive();i&&(t.getSourceDataAtRow(i[0]).submenu?n.openSubMenu(i[0]).getNavigator().toFirstItem():(n.executeCommand(o),n.close(!0)))}},{keys:[["PageUp"]],callback:()=>{t.getSelectedActive()?t.selection.transformStart(-t.countVisibleRows(),0):n.getNavigator().toFirstItem()}},{keys:[["PageDown"]],callback:()=>{t.getSelectedActive()?t.selection.transformStart(t.countVisibleRows(),0):n.getNavigator().toLastItem()}}]}const sU="menu",OO=sU;function vae(n,e=[]){const t=[];o(Sae(n)),e.forEach(({shortcuts:h,contextName:c})=>{i(h,c)});function o(h,c){a(c).addShortcuts(h,{group:sU})}function i(h,c){const d=a(c);h.forEach(({keys:u})=>{u.forEach(f=>d.removeShortcutsByKeys(f))}),t.push({shortcuts:h,contextName:c}),o(h,c)}function s(){return[...t]}function r(h){return h?`${OO}:${h}`:OO}function a(h){const c=n.hotMenu.getShortcutManager(),d=r(h);return c.getContext(d)??c.addContext(d)}function l(h){n.hotMenu.getShortcutManager().setActiveContextName(r(h))}return{addCustomShortcuts:i,getCustomShortcuts:s,getContext:a,listen:l}}function Rae(n){return(e,t,o,i,s,r,a)=>{const l=e.getSourceDataAtRow(o),h=n.rootDocument.createElement("div"),c=typeof r=="function"?r.call(n):r,d=typeof l.ariaLabel=="function"?l.ariaLabel.call(n):l.ariaLabel,u=typeof l.ariaChecked=="function"?l.ariaChecked.call(n):l.ariaChecked;if(a.readOnlyCellClassName="",ol(t),B(h,"htItemWrapper"),n.getSettings().ariaTags){const f=!eC(l,n)&&!AO(l)&&!d0(l);fe(t,[...yae(l)?[EG(),Ni(d),Z$(u)]:[RG(),Ni(c)],...f?[wr(-1)]:[],...eC(l,n)?[Vg()]:[],...c0(l)?[Es(!1)]:[]])}t.className="",t.appendChild(h),d0(l)?B(t,"htSeparator"):typeof l.renderer=="function"?(B(t,"htCustomMenuRenderer"),t.appendChild(l.renderer(e,h,o,i,s,c))):Qc(h,c,n.getSettings().sanitizer),eC(l,n)?B(t,"htDisabled"):AO(l)?B(t,"htSelectionDisabled"):c0(l)&&B(t,"htSubmenu")}}function Eae(n,e){if(e.has(n))throw new TypeError("Cannot initialize the same private elements twice on an object")}function kae(n,e){return e.get?e.get.call(n):e.value}function Tae(n,e,t){if(e.set)e.set.call(n,t);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=t}}function rU(n,e,t){if(!e.has(n))throw new TypeError("attempted to "+t+" private field on non-instance");return e.get(n)}function Bh(n,e){var t=rU(n,e,"get");return kae(n,t)}function Cv(n,e,t){Eae(n,e),e.set(n,t)}function yv(n,e,t){var o=rU(n,e,"set");return Tae(n,o,t),t}const DO=215;var sg=new WeakMap,Uw=new WeakMap,Yw=new WeakMap;class bf{get tableBorderWidth(){return Bh(this,Yw)===void 0&&this.hotMenu&&yv(this,Yw,parseInt(this.hotMenu.rootWindow.getComputedStyle(this.hotMenu.view._wt.wtTable.TABLE).borderWidth,10)),Bh(this,Yw)}registerEvents(){let e=this.hot.rootWindow;for(;e;)this.eventManager.addEventListener(e.document,"mousedown",t=>this.onDocumentMouseDown(t)),this.eventManager.addEventListener(e.document,"touchstart",t=>this.onDocumentMouseDown(t)),this.eventManager.addEventListener(e.document,"contextmenu",t=>this.onDocumentContextMenu(t)),e=gh(e)}setMenuItems(e){this.menuItems=e}getNavigator(){return Bh(this,sg)}getKeyboardShortcutsCtrl(){return Bh(this,Uw)}getSelectedItem(){return this.hasSelectedItem()?this.hotMenu.getSourceDataAtRow(this.hotMenu.getSelectedActive()[0]):null}hasSelectedItem(){return Array.isArray(this.hotMenu.getSelectedActive())}isSubMenu(){return this.parentMenu!==null}open(){this.runLocalHooks("beforeOpen"),this.container.removeAttribute("style"),this.container.style.display="block";const e=Im(a=>this.openSubMenu(a),300),t=this.options.minWidth||DO;let o=!1,i=Fc(this.menuItems,a=>(a.key===lm&&(o=!0),mae(a,this.hot)));if(i.length<1&&!o)i.push(X2()[lm]);else if(i.length===0)return;i=Cae(i,He);let s=!1;const r={data:i,colHeaders:!1,autoColumnSize:!0,autoWrapRow:!1,modifyColWidth(a){return J(a)&&a<t?t:a},autoRowSize:!1,readOnly:!0,editor:!1,copyPaste:!1,hiddenRows:!0,maxCols:1,columns:[{data:"name",renderer:Rae(this.hot)}],renderAllRows:!0,fragmentSelection:!1,outsideClickDeselects:!1,disableVisualSelection:"area",layoutDirection:this.hot.isRtl()?"rtl":"ltr",ariaTags:!1,themeName:this.hot.getCurrentThemeName(),modifyRowHeight:(a,l)=>{const h=this.hotMenu.getSourceDataAtRow(l);return h&&h.name===He?1:a},beforeRefreshDimensions:()=>!1,beforeOnCellMouseOver:(a,l)=>{Bh(this,sg).setPageCursorAt(l.row)},afterOnCellMouseOver:(a,l)=>{this.isAllSubMenusClosed()?e(l.row):this.openSubMenu(l.row)},afterOnCellContextMenu:a=>{a.preventDefault(),fE()&&s&&this.hasSelectedItem()&&this.close(!0)},afterSelection:(a,l,h,c,d)=>{this.hotMenu.view.isMouseDown()&&(d.value=!0),this.runLocalHooks("afterSelectionChange",this.getSelectedItem())},beforeOnCellMouseUp:a=>{this.hasSelectedItem()&&(s=!this.isCommandPassive(this.getSelectedItem()),this.executeCommand(a))},afterOnCellMouseUp:a=>{(!fE()||!Uc(a))&&s&&this.hasSelectedItem()&&(qr()||j0()?this.hot._registerTimeout(()=>this.close(!0),325):this.close(!0))},afterUnlisten:()=>{!this.hasSelectedItem()&&this.isOpened()&&this.hotMenu.listen()}};this.origOutsideClickDeselects=this.hot.getSettings().outsideClickDeselects,this.hot.getSettings().outsideClickDeselects=!1,this.hotMenu=new this.hot.constructor(this.container,r),this.hotMenu.addHook("afterInit",()=>this.onAfterInit()),this.hotMenu.init(),yv(this,sg,_ae(this.hotMenu)),yv(this,Uw,vae(this)),Bh(this,Uw).listen(),this.focus(),this.isSubMenu()&&this.addLocalHook("afterOpen",()=>this.parentMenu.runLocalHooks("afterSubmenuOpen",this)),this.runLocalHooks("afterOpen",this)}close(e=!1){if(this.isOpened()){if(e&&this.isSubMenu())this.parentMenu.close();else if(Bh(this,sg).clear(),this.closeAllSubMenus(),this.container.style.display="none",this.hotMenu.destroy(),this.hotMenu=null,this.hot.getSettings().outsideClickDeselects=this.origOutsideClickDeselects,this.runLocalHooks("afterClose"),this.isSubMenu()){if(this.hot.getSettings().ariaTags){const t=this.parentMenu.hotMenu.getSelectedActive();if(t){const o=this.parentMenu.hotMenu.getCell(t[0],0);fe(o,[Es(!1)])}}this.parentMenu.hotMenu.listen()}}}openSubMenu(e){if(!this.hotMenu)return!1;const t=this.hotMenu.getCell(e,0);if(this.closeAllSubMenus(),!t||!fae(t))return!1;const o=this.hotMenu.getSourceDataAtRow(e),i=new bf(this.hot,{parent:this,name:o.name,className:this.options.className,keepInViewport:!0,container:this.options.container});return i.setMenuItems(o.submenu.items),i.open(),i.setPosition(t.getBoundingClientRect()),this.hotSubMenus[o.key]=i,this.hot.getSettings().ariaTags&&fe(t,[Es(!0)]),i}closeSubMenu(e){const t=this.hotMenu.getSourceDataAtRow(e),o=this.hotSubMenus[t.key];if(o){o.destroy(),delete this.hotSubMenus[t.key];const i=this.hotMenu.getCell(e,0);this.hot.getSettings().ariaTags&&fe(i,[Es(!1)])}}closeAllSubMenus(){O(this.hotMenu.getData(),(e,t)=>this.closeSubMenu(t))}isAllSubMenusClosed(){return Object.keys(this.hotSubMenus).length===0}focus(){this.isOpened()&&(this.hotMenu.rootElement.focus({preventScroll:!0}),this.getKeyboardShortcutsCtrl().listen(),this.hotMenu.listen())}destroy(){const e=this.container.parentNode;this.clearLocalHooks(),this.close(),this.parentMenu=null,this.eventManager.destroy(),e&&e.removeChild(this.container)}isOpened(){return this.hotMenu!==null}executeCommand(e){if(!this.isOpened()||!this.hasSelectedItem())return;const t=this.getSelectedItem();if(this.runLocalHooks("select",t,e),this.isCommandPassive(t))return;const o=this.hot.getSelectedRange(),i=o?dae(o):[];this.runLocalHooks("executeCommand",t.key,i,e),this.isSubMenu()&&this.parentMenu.runLocalHooks("executeCommand",t.key,i,e)}isCommandPassive(e){return e.isCommand===!1||d0(e)||eC(e,this.hot)||c0(e)}setOffset(e,t=0){this.positioner.setOffset(e,t)}setPosition(e){this.isSubMenu()&&this.positioner.setParentElement(this.parentMenu.container),this.positioner.setElement(this.container).updatePosition(e)}updateMenuDimensions(){const{wtTable:e}=this.hotMenu.view._wt,t=this.hotMenu.getSettings().data,o=e.hider.style,i=e.holder.style,s=parseInt(o.width,10),r=$i(t,(a,l,h)=>{const d=this.hotMenu.getCell(h,0)?Tn(this.hotMenu.getCell(h,0)):0;return a+(l.name===He?1:d)},0);i.width=`${s}px`,i.height=`${r}px`,o.height=i.height}createContainer(e=null){const t=this.options.container.ownerDocument;let o=e,i;return o&&(ye(o)&&(o=o.call(this.hot),o===null||Jt(o)?o="":o=o.toString()),o=o.replace(/[^A-Za-z0-9]/g,"_"),o=`${this.options.className}Sub_${o}`,i=t.querySelector(`.${this.options.className}.${o}`)),i||(i=t.createElement("div"),B(i,`htMenu handsontable ${this.options.className}`),o&&B(i,o),this.options.container.appendChild(i)),i}onAfterInit(){this.updateMenuDimensions(),this.hot.getSettings().ariaTags&&fe(this.hotMenu.rootElement,[vG(),wr(-1)])}onDocumentMouseDown(e){this.isOpened()&&(this.options.standalone&&this.hotMenu&&!Hc(e.target,this.hotMenu.rootElement)?this.close(!0):(this.isAllSubMenusClosed()||this.isSubMenu())&&!Hc(e.target,".htMenu")&&this.close(!0))}onDocumentContextMenu(e){this.isOpened()&&_e(e.target,"htCore")&&Hc(e.target,this.hotMenu.rootElement)&&e.preventDefault()}constructor(e,t){Cv(this,sg,{writable:!0,value:void 0}),Cv(this,Uw,{writable:!0,value:void 0}),Cv(this,Yw,{writable:!0,value:void 0}),this.eventManager=new Wi(this),this.hotMenu=null,this.hotSubMenus={},this.menuItems=null,this.origOutsideClickDeselects=null,this.hot=e,this.options=t||{parent:null,name:null,className:"",keepInViewport:!0,standalone:!1,minWidth:DO,container:this.hot.rootPortalElement},this.container=this.createContainer(this.options.name),this.positioner=new cae(this.options.keepInViewport),this.parentMenu=this.options.parent||null,this.registerEvents(),this.isSubMenu()&&this.addLocalHook("afterSelectionChange",(...o)=>this.parentMenu.runLocalHooks("afterSelectionChange",...o)),this.hot.addHook("afterSetTheme",(o,i)=>{this.options.container!==this.hot.rootPortalElement&&(oe(this.options.container,/ht-theme-.*/g),B(this.options.container,o)),i||this.close()})}}Ct(bf,$n);function xae(n,e){if(e.has(n))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Gw(n,e,t){if(!e.has(n))throw new TypeError("attempted to get private field on non-instance");return t}function jw(n,e){xae(n,e),e.add(n)}const op="contextMenu",Mae=70,NO=op;he.getSingleton().register("afterContextMenuDefaultOptions");he.getSingleton().register("beforeContextMenuShow");he.getSingleton().register("afterContextMenuShow");he.getSingleton().register("afterContextMenuHide");he.getSingleton().register("afterContextMenuExecute");var PO=new WeakSet,LO=new WeakSet,WO=new WeakSet,$O=new WeakSet;class S_ extends rt{static get PLUGIN_KEY(){return op}static get PLUGIN_PRIORITY(){return Mae}static get PLUGIN_DEPS(){return["plugin:AutoColumnSize"]}static get DEFAULT_ITEMS(){return[C_,y_,He,Um,Ym,He,b_,jm,He,__,w_,He,Gm,He,Cs]}isEnabled(){return!!this.hot.getSettings()[op]}enablePlugin(){if(this.enabled)return;const e=this.hot.getSettings()[op];typeof e.callback=="function"&&this.commandExecutor.setCommonCallback(e.callback),this.menu=new bf(this.hot,{className:"htContextMenu",keepInViewport:!0,container:e.uiContainer||this.hot.rootPortalElement}),this.menu.addLocalHook("beforeOpen",()=>Gw(this,LO,Hae).call(this)),this.menu.addLocalHook("afterOpen",()=>Gw(this,WO,Aae).call(this)),this.menu.addLocalHook("afterClose",()=>Gw(this,$O,Oae).call(this)),this.menu.addLocalHook("executeCommand",(...t)=>this.executeCommand.call(this,...t)),this.addHook("afterOnCellContextMenu",t=>Gw(this,PO,Iae).call(this,t)),this.addHook("beforeDialogShow",()=>this.close()),this.registerShortcuts(),super.enablePlugin()}updatePlugin(){this.disablePlugin(),this.enablePlugin(),super.updatePlugin()}disablePlugin(){this.close(),this.menu&&(this.menu.destroy(),this.menu=null),this.unregisterShortcuts(),super.disablePlugin()}registerShortcuts(){this.hot.getShortcutManager().getContext("grid").addShortcut({keys:[["Control/Meta","Shift","Backslash"],["Shift","F10"]],callback:()=>{const{highlight:e}=this.hot.getSelectedRangeActive();this.hot.scrollToFocusedCell();const t=this.hot.getCell(e.row,e.col,!0).getBoundingClientRect(),o=p_(this.menu.container,this.hot.rootDocument);this.open({left:t.left+o.left,top:t.top+o.top-1+t.height},{left:t.width,above:-t.height}),this.menu.getNavigator().toFirstItem()},runOnlyIf:()=>{const e=this.hot.getSelectedRangeActive()?.highlight;return e&&this.hot.selection.isCellVisible(e)&&!this.menu.isOpened()},group:NO})}unregisterShortcuts(){this.hot.getShortcutManager().getContext("grid").removeShortcutsByGroup(NO)}open(e,t={above:0,below:0,left:0,right:0}){this.menu?.isOpened()||(this.prepareMenuItems(),this.menu.open(),tt(t,(o,i)=>{this.menu.setOffset(i,o)}),this.menu.setPosition(e))}close(){this.menu?.close(),this.itemsFactory=null}executeCommand(e,...t){this.itemsFactory===null&&this.prepareMenuItems(),this.commandExecutor.execute(e,...t)}prepareMenuItems(){this.itemsFactory=new tU(this.hot,S_.DEFAULT_ITEMS);const e=this.hot.getSettings()[op],t={items:this.itemsFactory.getItems(e)};this.hot.runHooks("afterContextMenuDefaultOptions",t),this.itemsFactory.setPredefinedItems(t.items);const o=this.itemsFactory.getItems(e);this.hot.runHooks("beforeContextMenuSetItems",o),this.menu.setMenuItems(o),O(o,i=>this.commandExecutor.registerCommand(i.key,i))}destroy(){this.close(),this.menu&&this.menu.destroy(),super.destroy()}constructor(...e){super(...e),jw(this,PO),jw(this,LO),jw(this,WO),jw(this,$O),this.commandExecutor=new eU(this.hot),this.itemsFactory=null,this.menu=null}}function Iae(n){const e=this.hot.getSettings(),t=e.rowHeaders,o=e.colHeaders;function i(a){return a.nodeName==="TD"||a.parentNode.nodeName==="TD"}const s=n.target;if(this.close(),_e(s,"handsontableInput")||(n.preventDefault(),n.stopPropagation(),!(t||o)&&!i(s)&&!(_e(s,"current")&&_e(s,"wtBorder"))))return;const r=p_(this.menu.container,this.hot.rootDocument);this.open({top:n.clientY+r.top,left:n.clientX+r.left})}function Hae(){this.hot.runHooks("beforeContextMenuShow",this)}function Aae(){this.hot.runHooks("afterContextMenuShow",this)}function Oae(){this.hot.listen(),this.hot.runHooks("afterContextMenuHide",this)}S_.SEPARATOR={name:He};function Dae(n){return{key:"copy",name(){return this.getTranslatedPhrase(Dk)},callback(){n.copyCellsOnly()},disabled(){if(this.countRows()===0||this.countCols()===0)return!0;const e=this.getSelectedRangeActive();if(!e||e.isSingleHeader())return!0;const t=this.getSelected();return!t||t.length>1},hidden:!1}}function Nae(n){return{key:"copy_column_headers_only",name(){const e=this.getSelectedRangeActive(),t=e?et(e.getWidth()-1,0,1):0;return this.getTranslatedPhrase(Lk,t)},callback(){n.copyColumnHeadersOnly()},disabled(){if(!this.hasColHeaders())return!0;const e=this.getSelectedRangeActive();if(!e||e.isSingleHeader())return!0;const t=this.getSelected();return!t||t.length>1},hidden:!1}}function Pae(n){return{key:"copy_with_column_group_headers",name(){const e=this.getSelectedRangeActive(),t=e?et(e.getWidth()-1,0,1):0;return this.getTranslatedPhrase(Pk,t)},callback(){n.copyWithAllColumnHeaders()},disabled(){if(!this.hasColHeaders()||!this.getSettings().nestedHeaders)return!0;const e=this.getSelectedRangeActive();if(!e||e.isSingleHeader())return!0;const t=this.getSelected();return!t||t.length>1},hidden:!1}}function Lae(n){return{key:"copy_with_column_headers",name(){const e=this.getSelectedRangeActive(),t=e?et(e.getWidth()-1,0,1):0;return this.getTranslatedPhrase(Nk,t)},callback(){n.copyWithColumnHeaders()},disabled(){if(!this.hasColHeaders())return!0;const e=this.getSelectedRangeActive();if(!e||e.isSingleHeader())return!0;const t=this.getSelected();return!t||t.length>1},hidden:!1}}function Wae(n){return{key:"cut",name(){return this.getTranslatedPhrase(Wk)},callback(){n.cut()},disabled(){if(this.countRows()===0||this.countCols()===0)return!0;const e=this.getSelectedRangeActive();if(!e||e.isSingleHeader())return!0;const t=this.getSelected();return!t||t.length>1},hidden:!1}}class $ae{setData(e,t){this.data[e]=t}getData(e){return this.data[e]||void 0}constructor(){this.data={}}}class Fae{preventDefault(){}composedPath(){return[]}constructor(){this.clipboardData=new $ae}}function aU(n,e){if(e.has(n))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Bae(n,e){return e.get?e.get.call(n):e.value}function Vae(n,e,t){if(e.set)e.set.call(n,t);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=t}}function lU(n,e,t){if(!e.has(n))throw new TypeError("attempted to "+t+" private field on non-instance");return e.get(n)}function hi(n,e){var t=lU(n,e,"get");return Bae(n,t)}function Ad(n,e,t){aU(n,e),e.set(n,t)}function Od(n,e,t){var o=lU(n,e,"set");return Vae(n,o,t),t}function qw(n,e,t){if(!e.has(n))throw new TypeError("attempted to get private field on non-instance");return t}function FO(n,e){aU(n,e),e.add(n)}var Rl=new WeakMap,_v=new WeakMap,rg=new WeakMap,u0=new WeakMap,f0=new WeakMap,ag=new WeakMap,Kw=new WeakSet,BO=new WeakSet;class zae{setSelectedRange(e){Od(this,Rl,e)}getCellsRange(){if(hi(this,_v).call(this)===0||hi(this,rg).call(this)===0)return null;const{row:e,col:t}=hi(this,Rl).getTopStartCorner(),{row:o,col:i}=hi(this,Rl).getBottomEndCorner(),s=qw(this,BO,Uae).call(this,e,o),r=qw(this,Kw,Sv).call(this,t,i);return{isRangeTrimmed:o!==s||i!==r,startRow:e,startCol:t,endRow:s,endCol:r}}getMostBottomColumnHeadersRange(){if(hi(this,rg).call(this)===0||hi(this,ag).call(this)===0)return null;const{col:e}=hi(this,Rl).getTopStartCorner(),{col:t}=hi(this,Rl).getBottomEndCorner(),o=qw(this,Kw,Sv).call(this,e,t);return{isRangeTrimmed:t!==o,startRow:-1,startCol:e,endRow:-1,endCol:o}}getAllColumnHeadersRange(){if(hi(this,rg).call(this)===0||hi(this,ag).call(this)===0)return null;const{col:e}=hi(this,Rl).getTopStartCorner(),{col:t}=hi(this,Rl).getBottomEndCorner(),o=qw(this,Kw,Sv).call(this,e,t);return{isRangeTrimmed:t!==o,startRow:-hi(this,ag).call(this),startCol:e,endRow:-1,endCol:o}}constructor({countRows:e,countColumns:t,rowsLimit:o,columnsLimit:i,countColumnHeaders:s}){FO(this,Kw),FO(this,BO),Ad(this,Rl,{writable:!0,value:void 0}),Ad(this,_v,{writable:!0,value:void 0}),Ad(this,rg,{writable:!0,value:void 0}),Ad(this,u0,{writable:!0,value:void 0}),Ad(this,f0,{writable:!0,value:void 0}),Ad(this,ag,{writable:!0,value:void 0}),Od(this,_v,e),Od(this,rg,t),Od(this,u0,o),Od(this,f0,i),Od(this,ag,s)}}function Sv(n,e){return Math.min(e,Math.max(n+hi(this,f0).call(this)-1,n))}function Uae(n,e){return Math.min(e,Math.max(n+hi(this,u0).call(this)-1,n))}function hU(n){const e=[],t=[];return O(n,o=>{const i=Math.min(o.startRow,o.endRow),s=Math.max(o.startRow,o.endRow);Ee(i,s,l=>{e.indexOf(l)===-1&&e.push(l)});const r=Math.min(o.startCol,o.endCol),a=Math.max(o.startCol,o.endCol);Ee(r,a,l=>{t.indexOf(l)===-1&&t.push(l)})}),{rows:e,columns:t}}function cU(n,e){if(e.has(n))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Yae(n,e){return e.get?e.get.call(n):e.value}function Gae(n,e,t){if(e.set)e.set.call(n,t);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=t}}function dU(n,e,t){if(!e.has(n))throw new TypeError("attempted to "+t+" private field on non-instance");return e.get(n)}function Ii(n,e){var t=dU(n,e,"get");return Yae(n,t)}function El(n,e,t){cU(n,e),e.set(n,t)}function no(n,e,t){var o=dU(n,e,"set");return Gae(n,o,t),t}function xi(n,e,t){if(!e.has(n))throw new TypeError("attempted to get private field on non-instance");return t}function Os(n,e){cU(n,e),e.add(n)}he.getSingleton().register("afterCopyLimit");he.getSingleton().register("modifyCopyableRange");he.getSingleton().register("beforeCut");he.getSingleton().register("afterCut");he.getSingleton().register("beforePaste");he.getSingleton().register("afterPaste");he.getSingleton().register("beforeCopy");he.getSingleton().register("afterCopy");const vv="copyPaste",jae=80,qae=["fragmentSelection"],uU="application/ht-source-data-json-html",VO=['<meta name="generator" content="Handsontable"/>','<style type="text/css">td{white-space:normal}br{mso-data-placement:same-cell}</style>'].join(""),zO=new WeakSet;var tC=new WeakMap,nC=new WeakMap,oC=new WeakMap,Vh=new WeakMap,lg=new WeakMap,hg=new WeakMap,zh=new WeakMap,Tp=new WeakMap,Rv=new WeakSet,UO=new WeakSet,fU=new WeakSet,gM=new WeakSet,Ev=new WeakSet,YO=new WeakSet,GO=new WeakSet,jO=new WeakSet,qO=new WeakSet,KO=new WeakSet,XO=new WeakSet;class Kae extends rt{static get PLUGIN_KEY(){return vv}static get SETTING_KEYS(){return[vv,...qae]}static get PLUGIN_PRIORITY(){return jae}static get DEFAULT_SETTINGS(){return{pasteMode:"overwrite",rowsLimit:1/0,columnsLimit:1/0,copyColumnHeaders:!1,copyColumnGroupHeaders:!1,copyColumnHeadersOnly:!1}}isEnabled(){return!!this.hot.getSettings()[vv]}enablePlugin(){this.enabled||(this.pasteMode=this.getSetting("pasteMode")??this.pasteMode,this.rowsLimit=isNaN(this.getSetting("rowsLimit"))?this.rowsLimit:this.getSetting("rowsLimit"),this.columnsLimit=isNaN(this.getSetting("columnsLimit"))?this.columnsLimit:this.getSetting("columnsLimit"),no(this,tC,this.getSetting("copyColumnHeaders")),no(this,nC,this.getSetting("copyColumnGroupHeaders")),no(this,oC,this.getSetting("copyColumnHeadersOnly")),this.uiContainer=this.getSetting("uiContainer")??this.uiContainer,this.addHook("afterContextMenuDefaultOptions",e=>xi(this,YO,Qae).call(this,e)),this.addHook("afterSelection",(...e)=>xi(this,GO,Jae).call(this,...e)),this.addHook("afterSelectionEnd",()=>xi(this,jO,ele).call(this)),this.eventManager.addEventListener(this.hot.rootDocument,"copy",(...e)=>this.onCopy(...e)),this.eventManager.addEventListener(this.hot.rootDocument,"cut",(...e)=>this.onCut(...e)),this.eventManager.addEventListener(this.hot.rootDocument,"paste",(...e)=>this.onPaste(...e)),Ay()&&(this.eventManager.addEventListener(this.hot.rootDocument.body,"mouseenter",(...e)=>xi(this,qO,tle).call(this,...e)),this.eventManager.addEventListener(this.hot.rootDocument.body,"mouseleave",(...e)=>xi(this,KO,nle).call(this,...e)),this.addHook("afterSelection",()=>xi(this,XO,ole).call(this))),super.enablePlugin())}updatePlugin(){this.disablePlugin(),this.enablePlugin(),super.updatePlugin()}disablePlugin(){super.disablePlugin()}copy(e="cells-only"){no(this,Vh,e),no(this,lg,!0),xi(this,Rv,ZO).call(this,"copy")}copyCellsOnly(){this.copy("cells-only")}copyColumnHeadersOnly(){this.copy("column-headers-only")}copyWithAllColumnHeaders(){this.copy("with-column-group-headers")}copyWithColumnHeaders(){this.copy("with-column-headers")}cut(){no(this,hg,!0),xi(this,Rv,ZO).call(this,"cut")}getRangedCopyableData(e){return AC(this.getRangedData(e))}getRangedData(e,t=!1){const o=[],{rows:i,columns:s}=hU(e);return O(i,r=>{const a=[];O(s,l=>{if(r<0)a.push(this.hot.getColHeader(l,r));else{let h=t?this.hot.getCopyableSourceData(r,l):this.hot.getCopyableData(r,l);t&&(ne(h)||Array.isArray(h))&&(h=JSON.stringify(h)),a.push(h)}}),o.push(a)}),o}paste(e="",t=e){if(!e&&!t)return;const o=new Fae;e&&o.clipboardData.setData("text/plain",e),t&&o.clipboardData.setData("text/html",t),this.onPaste(o)}setCopyableText(){const e=this.hot.getSelectedRangeActive();if(!e)return;if(e.isSingleHeader()){this.copyableRanges=[];return}Ii(this,zh).setSelectedRange(e);const t=new Map([["headers",null],["cells",null]]);Ii(this,Vh)==="column-headers-only"?t.set("headers",Ii(this,zh).getMostBottomColumnHeadersRange()):(Ii(this,Vh)==="with-column-headers"?t.set("headers",Ii(this,zh).getMostBottomColumnHeadersRange()):Ii(this,Vh)==="with-column-group-headers"&&t.set("headers",Ii(this,zh).getAllColumnHeadersRange()),t.set("cells",Ii(this,zh).getCellsRange())),this.copyableRanges=Array.from(t.values()).filter(i=>i!==null).map(({startRow:i,startCol:s,endRow:r,endCol:a})=>({startRow:i,startCol:s,endRow:r,endCol:a})),this.copyableRanges=this.hot.runHooks("modifyCopyableRange",this.copyableRanges);const o=t.get("cells");if(o!==null&&o.isRangeTrimmed){const{startRow:i,startCol:s,endRow:r,endCol:a}=o;this.hot.runHooks("afterCopyLimit",r-i+1,a-s+1,this.rowsLimit,this.columnsLimit)}}isEditorOpened(){return this.hot.getActiveEditor()?.isOpened()}populateValues({plainData:e,originalPlainData:t,sourceData:o}){if(!e.length)return[null,null,null,null];const i=this.hot.getSelectedRangeActive(),s=e.length,r=e[0].length,a=[],{row:l,col:h}=i.getTopStartCorner(),{row:c,col:d}=i.getBottomEndCorner();let u=l,f=h,p=l,C=h;for(;a.length<s||u<=c;){const{skipRowOnPaste:_,visualRow:S}=this.hot.getCellMeta(u,h);if(u=S+1,_===!0)continue;p=S,f=h;const T=[],P=a.length%s;for(;T.length<r||f<=d;){const{skipColumnOnPaste:F,visualCol:V,parsePastedValue:D}=this.hot.getCellMeta(S,f),I=T.length%r;if(f=V+1,F===!0)continue;C=V;const G=o?.[P]?.[I],z=t?.[P]?.[I];let Y=e[P][I];D&&o&&z$(G)&&Y===z&&(Y=JSON.parse(G)),T.push(Y)}a.push(T)}return no(this,Tp,!0),this.hot.populateFromArray(l,h,a,void 0,void 0,"CopyPaste.paste",this.pasteMode),[l,h,p,C]}onCopy(e){const t=e.composedPath()[0],o=this.hot.getFocusManager().getRefocusElement(),i=t?.hasAttribute("data-hot-input");if(!this.hot.isListening()&&!Ii(this,lg)||this.isEditorOpened()||Qr(t)&&(i&&t!==o||!i&&t!==this.hot.rootDocument.body&&!Db(t,this.hot.rootElement)))return;e.preventDefault(),this.setCopyableText(),no(this,lg,!1);const s=this.getRangedData(this.copyableRanges),r=this.getRangedData(this.copyableRanges,!0),a=xi(this,UO,Xae).call(this,this.copyableRanges);this.hot.runHooks("beforeCopy",s,this.copyableRanges,a)&&(xi(this,Ev,QO).call(this,e,s,r),this.hot.runHooks("afterCopy",s,this.copyableRanges,a)),no(this,Vh,"cells-only")}onCut(e){const t=e.composedPath()[0],o=this.hot.getFocusManager().getRefocusElement(),i=t?.hasAttribute("data-hot-input");if(!this.hot.isListening()&&!Ii(this,hg)||this.isEditorOpened()||Qr(t)&&(i&&t!==o||!i&&t!==this.hot.rootDocument.body&&!Db(t,this.hot.rootElement)))return;e.preventDefault(),this.setCopyableText(),no(this,hg,!1);const s=this.getRangedData(this.copyableRanges),r=this.getRangedData(this.copyableRanges,!0);this.hot.runHooks("beforeCut",s,this.copyableRanges)&&(xi(this,Ev,QO).call(this,e,s,r),this.hot.emptySelectedCells("CopyPaste.cut"),this.hot.runHooks("afterCut",s,this.copyableRanges))}onPaste(e){const t=e.composedPath()[0],o=this.hot.getFocusManager().getRefocusElement(),i=t?.hasAttribute("data-hot-input");if(!this.hot.isListening()||this.isEditorOpened()||!this.hot.getSelected()||Qr(t)&&(i&&t!==o||!i&&t!==this.hot.rootDocument.body&&!Db(t,this.hot.rootElement)))return;e.preventDefault();let s,r;if(e&&typeof e.clipboardData<"u"){const u=e.clipboardData.getData(uU);u&&(r=JI(u,this.hot.rootDocument).data);const f=e.clipboardData.getData("text/html"),{sanitizer:p}=this.hot.getSettings();let C=f;typeof p=="function"?C=p(f,"CopyPaste.paste"):(zO.has(this.hot)||(zO.add(this.hot),fh("The HTML sanitization using DOMPurify library is deprecated and will be removed in the next major release. Use the `sanitizer` option instead.\n\nMigration guide: https://handsontable.com/docs/migration-from-16.2-to-17.0/\n`sanitizer` documentation: https://handsontable.com/docs/api/options/#sanitizer")),C=bC(f,{ADD_TAGS:["meta"],ADD_ATTR:["content"],FORCE_BODY:!0})),C&&/(<table)|(<TABLE)/g.test(C)?s=JI(C,this.hot.rootDocument).data:s=e.clipboardData.getData("text/plain")}else typeof ClipboardEvent>"u"&&typeof this.hot.rootWindow.clipboardData<"u"&&(s=this.hot.rootWindow.clipboardData.getData("Text"));if(typeof s=="string"&&(s=lj(s)),s===void 0||s&&s.length===0)return;const a=Qn(s);if(this.hot.runHooks("beforePaste",s,this.copyableRanges)===!1)return;const[l,h,c,d]=this.populateValues({plainData:s,sourceData:r,originalPlainData:a});l!==null&&h!==null&&this.hot.selectCell(l,h,Math.min(this.hot.countRows()-1,c),Math.min(this.hot.countCols()-1,d)),this.hot.runHooks("afterPaste",s,this.copyableRanges)}destroy(){super.destroy()}constructor(...e){super(...e),Os(this,Rv),Os(this,UO),Os(this,fU),Os(this,gM),Os(this,Ev),Os(this,YO),Os(this,GO),Os(this,jO),Os(this,qO),Os(this,KO),Os(this,XO),El(this,tC,{writable:!0,value:void 0}),El(this,nC,{writable:!0,value:void 0}),El(this,oC,{writable:!0,value:void 0}),El(this,Vh,{writable:!0,value:void 0}),El(this,lg,{writable:!0,value:void 0}),El(this,hg,{writable:!0,value:void 0}),El(this,zh,{writable:!0,value:void 0}),El(this,Tp,{writable:!0,value:void 0}),this.columnsLimit=1/0,this.rowsLimit=1/0,this.pasteMode="overwrite",this.uiContainer=this.hot.rootDocument.body,no(this,tC,!1),no(this,nC,!1),no(this,oC,!1),no(this,Vh,"cells-only"),no(this,lg,!1),no(this,hg,!1),no(this,zh,new zae({countRows:()=>this.hot.countRows(),countColumns:()=>this.hot.countCols(),rowsLimit:()=>this.rowsLimit,columnsLimit:()=>this.columnsLimit,countColumnHeaders:()=>this.hot.view.getColumnHeadersCount()})),no(this,Tp,!1),this.copyableRanges=[]}}function ZO(n){if(Ay()){const e=this.hot.getSelectedRangeActive();if(e){const{row:t,col:o}=e.highlight,i=this.hot.getCell(t,o,!0);i&&w4(i,()=>{this.hot.rootDocument.execCommand(n)})}}else this.hot.rootDocument.execCommand(n)}function Xae(n){const{rows:e}=hU(n);let t=0;for(let o=0;o<e.length&&!(e[o]>=0);o++)t+=1;return{columnHeadersCount:t}}function Zae(){if(this.hot.isListening()){const n=this.hot.getSelectedRangeActive();if(n){const{row:e,col:t}=n.highlight,o=this.hot.getCell(e,t,!0);o&&dF(o)}}}function gU(){if(this.hot.isListening()){const n=this.hot.getSelectedRangeActive();if(n){const{row:e,col:t}=n.highlight,o=this.hot.getCell(e,t,!0);o?.hasAttribute("contenteditable")&&uF(o)}}}function QO(n,e,t){const o=AC(e);if(n&&n.clipboardData){const i=QI(e),s=QI(t);n.clipboardData.setData("text/plain",o),n.clipboardData.setData("text/html",[VO,i].join("")),n.clipboardData.setData(uU,[VO,s].join(""))}else typeof ClipboardEvent>"u"&&this.hot.rootWindow.clipboardData.setData("Text",o)}function Qae(n){n.items.push({name:"---------"},Dae(this)),Ii(this,tC)&&n.items.push(Lae(this)),Ii(this,nC)&&n.items.push(Pae(this)),Ii(this,oC)&&n.items.push(Nae(this)),n.items.push(Wae(this))}function Jae(n,e,t,o,i){Ii(this,Tp)&&(i.value=!0),no(this,Tp,!1)}function ele(){this.isEditorOpened()||this.hot.getSettings().fragmentSelection||this.setCopyableText()}function tle(){xi(this,gM,gU).call(this)}function nle(){xi(this,fU,Zae).call(this)}function ole(){xi(this,gM,gU).call(this)}function pU(n,e){return`border_row${n}col${e}`}function ip(){return{width:1,color:"#000"}}function Ka(){return{hide:!0}}function ile(){return{width:1,color:"#000",cornerVisible:!1}}function kv(n){return(J(n.start)||J(n.left))&&(n.start=n.start??n.left),(J(n.end)||J(n.right))&&(n.end=n.end??n.right),delete n.left,delete n.right,n}function cg(n){return J(n.start)&&(n.left=n.start),J(n.end)&&(n.right=n.end),n}function Tv(n,e){return{id:pU(n,e),border:ile(),row:n,col:e,top:Ka(),bottom:Ka(),start:Ka(),end:Ka()}}function sle(n,e){return en(e,"border")&&e.border&&(n.border=e.border),en(e,"top")&&J(e.top)&&(e.top?(ne(e.top)||(e.top=ip()),n.top=e.top):(e.top=Ka(),n.top=e.top)),en(e,"bottom")&&J(e.bottom)&&(e.bottom?(ne(e.bottom)||(e.bottom=ip()),n.bottom=e.bottom):(e.bottom=Ka(),n.bottom=e.bottom)),en(e,"start")&&J(e.start)&&(e.start?(ne(e.start)||(e.start=ip()),n.start=e.start):(e.start=Ka(),n.start=e.start)),en(e,"end")&&J(e.end)&&(e.end?(ne(e.end)||(e.end=ip()),n.end=e.end):(e.end=Ka(),n.end=e.end)),n}function rl(n,e){let t=!1;return O(n.getSelectedRange(),o=>{o.forAll((i,s)=>{if(i<0||s<0)return;const r=n.getCellMeta(i,s).borders;if(r)if(e){if(!en(r[e],"hide")||r[e].hide===!1)return t=!0,!1}else return t=!0,!1})}),t}function v_(n){return`<span class="selected">✓</span>${n}`}function rle(n){return n.some(e=>J(e.left)||J(e.right))}function ale(n){return n.some(e=>J(e.start)||J(e.end))}const lle=new Map([["left","start"],["right","end"]]);function hle(n){return lle.get(n)??n}function cle(n){return{key:"borders:bottom",name(){let e=this.getTranslatedPhrase(aT);return rl(this,"bottom")&&(e=v_(e)),e},callback(e,t){const o=rl(this,"bottom");n.prepareBorder(t,"bottom",o)}}}function dle(n){const e=n.hot.isRtl()?"end":"start";return{key:"borders:left",name(){let t=this.getTranslatedPhrase(lT);return rl(this,e)&&(t=v_(t)),t},callback(t,o){const i=rl(this,e);n.prepareBorder(o,e,i)}}}function ule(n){return{key:"borders:no_borders",name(){return this.getTranslatedPhrase(hT)},callback(e,t){n.prepareBorder(t,"noBorders")},disabled(){return!rl(this)}}}function fle(n){const e=n.hot.isRtl()?"start":"end";return{key:"borders:right",name(){let t=this.getTranslatedPhrase(rT);return rl(this,e)&&(t=v_(t)),t},callback(t,o){const i=rl(this,e);n.prepareBorder(o,e,i)}}}function gle(n){return{key:"borders:top",name(){let e=this.getTranslatedPhrase(sT);return rl(this,"top")&&(e=v_(e)),e},callback(e,t){const o=rl(this,"top");n.prepareBorder(t,"top",o)}}}function ple(n,e){if(e.has(n))throw new TypeError("Cannot initialize the same private elements twice on an object")}function xv(n,e,t){if(!e.has(n))throw new TypeError("attempted to get private field on non-instance");return t}function Mv(n,e){ple(n,e),e.add(n)}const iC="customBorders",mle=90,JO=["dashed","dotted","solid"];var eD=new WeakSet,tD=new WeakSet,nD=new WeakSet;class wle extends rt{static get PLUGIN_KEY(){return iC}static get PLUGIN_PRIORITY(){return mle}isEnabled(){return!!this.hot.getSettings()[iC]}enablePlugin(){this.enabled||(this.addHook("afterContextMenuDefaultOptions",e=>xv(this,tD,Cle).call(this,e)),this.addHook("init",()=>xv(this,nD,yle).call(this)),super.enablePlugin())}disablePlugin(){this.hideBorders(),super.disablePlugin()}updatePlugin(){this.disablePlugin(),this.enablePlugin(),this.changeBorderSettings(),super.updatePlugin()}setBorders(e,t){let o=["top","bottom","start","end"],i=null;t&&(this.checkSettingsCohesion([t]),o=Object.keys(t),i=kv(t));const s=Ju(e),r=em(s,{createCellCoords:this.hot._createCellCoords.bind(this.hot),createCellRange:this.hot._createCellRange.bind(this.hot)});O(e,a=>{r(a).forAll((l,h)=>{O(o,c=>{this.prepareBorderFromCustomAdded(l,h,i,hle(c))})})}),this.hot.view.render()}getBorders(e){if(!Array.isArray(e))return this.savedBorders;const t=Ju(e),o=em(t,{createCellCoords:this.hot._createCellCoords.bind(this.hot),createCellRange:this.hot._createCellRange.bind(this.hot)}),i=[];return O(e,s=>{o(s).forAll((r,a)=>{O(this.savedBorders,l=>{l.row===r&&l.col===a&&i.push(cg(l))})})}),i}clearBorders(e){e?this.setBorders(e):(O(this.savedBorders,t=>{this.clearBordersFromSelectionSettings(t.id),this.clearNullCellRange(),this.hot.removeCellMeta(t.row,t.col,"borders")}),this.savedBorders.length=0)}insertBorderIntoSettings(e,t){this.checkSavedBorders(e)||this.savedBorders.push(e);const i=this.hot._createCellRange(this.hot._createCellCoords(e.row,e.col));this.checkCustomSelections(e,i,t)||this.hot.selection.highlight.addCustomSelection({border:e,visualCellRange:i})}prepareBorderFromCustomAdded(e,t,o,i){const s=this.hot.countRows(),r=this.hot.countCols();if(e>=s||t>=r)return;let a=Tv(e,t);o&&(a=sle(a,o),O(this.hot.selection.highlight.customSelections,l=>{if(a.id===l.settings.id)return Object.assign(l.settings,o),a.id=l.settings.id,a.top=l.settings.top,a.bottom=l.settings.bottom,a.start=l.settings.start,a.end=l.settings.end,!1})),this.hot.setCellMeta(e,t,"borders",cg(a)),this.insertBorderIntoSettings(a,i)}prepareBorderFromCustomAddedRange(e,t){const o=Math.min(e.to.row,this.hot.countRows()-1),i=Math.min(e.to.col,this.hot.countCols()-1);Ee(e.from.row,o,s=>{Ee(e.from.col,i,r=>{const a=Tv(s,r);let l=0;s===e.from.row&&en(t,"top")&&(l+=1,a.top=t.top),s===e.to.row&&en(t,"bottom")&&(l+=1,a.bottom=t.bottom),r===e.from.col&&en(t,"start")&&(l+=1,a.start=t.start),r===e.to.col&&en(t,"end")&&(l+=1,a.end=t.end),l>0&&(this.hot.setCellMeta(s,r,"borders",cg(a)),this.insertBorderIntoSettings(a))})})}removeAllBorders(e,t){const o=pU(e,t);this.spliceBorder(o),this.clearBordersFromSelectionSettings(o),this.clearNullCellRange(),this.hot.removeCellMeta(e,t,"borders")}setBorder(e,t,o,i){let s=this.hot.getCellMeta(e,t).borders;!s||s.border===void 0?s=Tv(e,t):s=kv(s),i?(s[o]=Ka(),this.countHide(s)===4?this.removeAllBorders(e,t):(this.checkCustomSelectionsFromContextMenu(s,o,i)||this.insertBorderIntoSettings(s),this.hot.setCellMeta(e,t,"borders",cg(s)))):(s[o]=ip(),this.checkCustomSelectionsFromContextMenu(s,o,i)||this.insertBorderIntoSettings(s),this.hot.setCellMeta(e,t,"borders",cg(s)))}prepareBorder(e,t,o){O(e,({start:i,end:s})=>{if(i.row===s.row&&i.col===s.col)t==="noBorders"?this.removeAllBorders(i.row,i.col):this.setBorder(i.row,i.col,t,o);else switch(t){case"noBorders":Ee(i.col,s.col,r=>{Ee(i.row,s.row,a=>{this.removeAllBorders(a,r)})});break;case"top":Ee(i.col,s.col,r=>{this.setBorder(i.row,r,t,o)});break;case"bottom":Ee(i.col,s.col,r=>{this.setBorder(s.row,r,t,o)});break;case"start":Ee(i.row,s.row,r=>{this.setBorder(r,i.col,t,o)});break;case"end":Ee(i.row,s.row,r=>{this.setBorder(r,s.col,t,o)});break}})}createCustomBorders(e){O(e,t=>{const o=kv(t);t.range?this.prepareBorderFromCustomAddedRange(t.range,o):this.prepareBorderFromCustomAdded(t.row,t.col,o)})}countHide(e){const{top:t,bottom:o,start:i,end:s}=e;return $i([t,o,i,s],(a,l)=>{let h=a;return l&&l.hide&&(h+=1),h},0)}clearBordersFromSelectionSettings(e){const t=Tt(this.hot.selection.highlight.customSelections,o=>o.settings.id).indexOf(e);t>-1&&this.hot.selection.highlight.customSelections[t].clear()}clearNullCellRange(){O(this.hot.selection.highlight.customSelections,(e,t)=>{if(e.cellRange===null)return this.hot.selection.highlight.customSelections[t].destroy(),this.hot.selection.highlight.customSelections.splice(t,1),!1})}hideBorders(){O(this.savedBorders,e=>{this.clearBordersFromSelectionSettings(e.id),this.clearNullCellRange()})}spliceBorder(e){const t=Tt(this.savedBorders,o=>o.id).indexOf(e);t>-1&&this.savedBorders.splice(t,1)}checkSavedBorders(e){let t=!1;return this.countHide(e)===4?(this.spliceBorder(e.id),t=!0):O(this.savedBorders,(i,s)=>{if(e.id===i.id)return this.savedBorders[s]=e,t=!0,!1}),t}checkCustomSelectionsFromContextMenu(e,t,o){let i=!1;return O(this.hot.selection.highlight.customSelections,s=>{if(e.id===s.settings.id){const r=this.hot.view._wt.selectionManager.getBorderInstances(s);return O(r,a=>{a.toggleHiddenClass(t,o)}),i=!0,!1}}),i}checkCustomSelections(e,t,o){const i=this.countHide(e);let s=!1;return i===4?(this.removeAllBorders(e.row,e.col),s=!0):O(this.hot.selection.highlight.customSelections,r=>{if(e.id===r.settings.id){if(r.visualCellRange=t,r.commit(),o){const a=this.hot.view._wt.selectionManager.getBorderInstances(r);O(a,l=>{l.changeBorderStyle(o,e)})}return s=!0,!1}}),s}changeBorderSettings(){const e=this.hot.getSettings()[iC];if(Array.isArray(e)){const t=Qn(e);this.checkSettingsCohesion(t),t.length||(this.savedBorders=t),this.createCustomBorders(t)}else e!==void 0&&this.createCustomBorders(this.savedBorders)}checkSettingsCohesion(e){const t=rle(e),o=ale(e);t&&o&&U('The "left"/"right" and "start"/"end" options should not be used together. Please use only the option "start"/"end".'),this.hot.isRtl()&&t&&U('The "left"/"right" properties are not supported for RTL. Please use option "start"/"end".'),xv(this,eD,ble).call(this,e)}destroy(){super.destroy()}constructor(...e){super(...e),Mv(this,eD),Mv(this,tD),Mv(this,nD),this.savedBorders=[]}}function ble(n){n.forEach(e=>{Object.keys(e).forEach(t=>{const o=e[t].style;J(o)&&!JO.includes(o)?(Ie(`The "${o}" border style is not supported. Please use one of the following styles: ${JO.join(", ")}.
|
|
237
|
+
The border style will be ignored.`),delete e[t].style):J(o)&&o==="solid"&&delete e[t].style})})}function Cle(n){this.hot.getSettings()[iC]&&n.items.push({name:"---------"},{key:"borders",name(){return this.getTranslatedPhrase(iT)},disabled(){const e=this.getSelectedRangeActive();return!e||e.isSingleHeader()?!0:this.selection.isSelectedByCorner()},submenu:{items:[gle(this),fle(this),cle(this),dle(this),ule(this)]}})}function yle(){this.changeBorderSettings()}const sp="dataProvider",_le=950,R_=10,Sle={rowId:void 0,fetchRows:void 0,onRowsCreate:void 0,onRowsUpdate:void 0,onRowsRemove:void 0},g0={rowId:n=>typeof n=="string"||ye(n),fetchRows:n=>ye(n),onRowsCreate:n=>ye(n),onRowsUpdate:n=>ye(n),onRowsRemove:n=>ye(n)},vle="DataProvider fetch superseded by a newer request",oD=Object.freeze({page:1,pageSize:R_,sort:null,filters:null}),mU=new Set(["edit",void 0,"CopyPaste.paste","CopyPaste.cut","Autofill.fill","ContextMenu.clearColumn","DataProvider.revert"]),iD="DataProvider: cannot send row update because `rowId` resolves to null or undefined for that row.";function Rle(n){return`DataProvider: cannot remove row at visual index ${n} because \`rowId\` resolves to null or undefined.`}const Ele="DataProvider: `updateRows` requires every entry to include a non-null `id`.",kle="DataProvider: `removeRows` requires every id to be non-null.";function pM(n,e,t){if(n.runHooks("beforeRowsMutation",e,t)===!1)return!1}function wU(n,e,t){n.runHooks("afterRowsMutation",e,t)}function sf(n,e,t,o){n.runHooks("afterRowsMutationError",e,t,o)}function Tle(n,e){const t=n.tail.then(e);return n.tail=t.catch(()=>{}),t}function xle(n,e){if(e!=null){if(ye(e))return e(n);if(typeof e=="string")return CC(n,e)}}function E_(n,e,t){return xle(n.getSourceDataAtRow(n.toPhysicalRow(t)),e)}function iy(n){return n==null}function bU(n,e,t){for(let o=0;o<n.countRows();o+=1)if(E_(n,e,o)===t)return o;return-1}function Mle(n,e,t,o){const i=[],s=()=>n.countRows(),r=(a,l)=>{for(let h=0;h<l;h+=1){const c=a+h;if(c>=0&&c<s()){const d=E_(n,e,c);iy(d)&&U(Rle(c)),i.push(d)}}};if(Array.isArray(t))t.forEach(([a,l])=>{const h=a==null?Math.max(0,s()-(l??1)):Math.max(0,a);r(h,l??1)});else{const a=typeof o=="number"&&o>=1?o:1,l=t==null?Math.max(0,s()-a):Math.max(0,t);r(l,a)}return i}function Ile(n,e){const t=e[0][0],o=n.getSourceDataAtRow(n.toPhysicalRow(t)),i=o&&typeof o=="object"&&!Array.isArray(o),s={};e.forEach(([,a,,l])=>{const h=typeof a=="number"?a:n.propToCol(a),c=i?n.colToProp(h):h;s[c]=l});let r;return Array.isArray(o)?(r=[...o],e.forEach(([,a,,l])=>{const h=typeof a=="number"?a:n.propToCol(a);r[h]=l})):i?r={...o,...s}:r={...s},{changesObj:s,rowData:r}}function Hle(n,e){e?.length&&n.batch(()=>{e.forEach(([t,o,i])=>{n.setDataAtRowProp(t,o,i,"DataProvider.revert")})})}function CU(n,e,t){const o=Object.entries(t);return o.length===0?Promise.resolve(!0):new Promise(i=>{let s=o.length,r=!0;const a=()=>{s-=1,s===0&&i(r)};o.forEach(([l,h])=>{const c=n.propToCol(l);if(c===void 0||c<0){a();return}const d=n.getCellMeta(e,c);if(!n.getCellValidator(d)){a();return}n.validateCell(h,d,u=>{u===!1&&d.allowInvalid===!1&&(r=!1),a()},"DataProvider.updateRows")})})}function Ale(n,e,t){return!n||!e?.length||t==="DataProvider.revert"||!mU.has(t)}function Ole(n,e){const t=e.filter(o=>o[2]!==o[3]);return t.length===0?[]:t.filter(o=>{const i=n.propToCol(o[1]);return i===void 0||i<0?!1:n.getCellMeta(o[0],i).valid!==!1})}function Dle(n,e,t){return t.map(o=>{const i=bU(n,e,o.id);let s;return i>=0?s=n.getSourceDataAtRow(n.toPhysicalRow(i)):o.rowData!==void 0?s=o.rowData:s={},{id:o.id,changes:o.changes,rowData:s&&typeof s=="object"?s:{}}})}async function Nle(n,e,t,o={}){const i=e.getOnRowsUpdate();if(!ye(i))return;const s={rows:t},{revertOptimistic:r}=o,{onRequestFailed:a}=e;try{await i(t)}catch(l){sf(n,"update",l,s),e.logError("Row update failed:",l),ye(r)&&r(),n.render(),a?.("update",l);return}try{wU(n,"update",s),await e.fetchData()}catch(l){sf(n,"update",l,s),e.logError("Data reload failed:",l),ye(r)&&r(),n.render()}}async function Ple(n,e,t){const{getRowIdOption:o,commitRowsUpdate:i}=e,s={rows:t};if(pM(n,"update",s)===!1)return;const r=o();if((await Promise.all(t.map(async l=>{const h=bU(n,r,l.id);return h<0?!0:CU(n,h,l.changes)}))).some(l=>!l)){sf(n,"update",new Error("Row update validation failed"),s),nl("Row update failed: validation failed for one or more cells");return}await i(t)}async function Lle(n,e,t){const{getRowIdOption:o,commitRowsUpdate:i}=e,s=new Map;t.forEach(u=>{const f=u[0];s.has(f)||s.set(f,[]),s.get(f).push(u)});const r=[...s.keys()].sort((u,f)=>u-f),a=o(),l=r.map(u=>{const{changesObj:f,rowData:p}=Ile(n,s.get(u));return{id:E_(n,a,u),changes:f,rowData:p}}),h={rows:l},c=()=>Hle(n,t);if(l.some(u=>iy(u.id))){c(),sf(n,"update",new Error(iD),h),nl("Row update failed:",iD),n.render();return}if(pM(n,"update",h)===!1){c();return}if((await Promise.all(r.map((u,f)=>CU(n,u,l[f].changes)))).some(u=>!u)){c(),sf(n,"update",new Error("Row update validation failed"),h),nl("Row update failed: validation failed for one or more cells"),n.render();return}await i(l,{revertOptimistic:c})}function Wle(n,e,t,o,i){const{enqueueMutation:s,runBeforeRowsMutation:r,runAfterRowsMutation:a,runAfterRowsMutationError:l,logError:h,onRequestFailed:c}=n;return s(async()=>{if(r(e,t)===!1)return;const d=e==="create"?"Row create":"Row remove";try{await o()}catch(u){l(e,u,t),h(`${d} failed:`,u),c?.(e,u);return}try{a(e,t),await i()}catch(u){l(e,u,t),h("Data reload failed:",u)}})}function $le(n,e,t,o){const{hot:i,getOnRowsCreate:s,getRowId:r,createRows:a}=n;if(!ye(s()))return;const l=i.countSourceRows();if(i.getSettings().maxRows===l)return;const h=e==="insert_row_below"?"below":"above",c=t??(h==="below"?l:0);return a({position:h,referenceRowId:c>=0?r(c):void 0,rowsAmount:typeof o=="number"&&o>=1?o:1}),!1}function Fle(n,e,t){const{hot:o,getOnRowsRemove:i,getRowIdOption:s,removeRows:r}=n;if(!ye(i()))return;const a=Mle(o,s(),e,t);if(a.length!==0)return r(a),!1}function Ble(n,e,t,o){if(e==="insert_row_above"||e==="insert_row_below")return $le(n,e,t,o);if(e==="remove_row")return Fle(n,t,o)}const Vle="filters";function zle(n){return n===null?null:n.map(e=>({prop:e.prop,operation:e.operation,conditions:(e.conditions||[]).map(t=>({name:t.name,args:Array.isArray(t.args)?[...t.args]:[]}))}))}function yU(n,e){if(!Array.isArray(e)||e.length===0)return null;const t=[];for(let o=0;o<e.length;o++){const i=e[o],s=n.toVisualColumn(i.column),r=n.colToProp(s);r!=null&&t.push({prop:String(r),operation:i.operation,conditions:i.conditions.map(a=>({name:a.name,args:Array.isArray(a.args)?[...a.args]:[]}))})}return t.length===0?null:t}function Ule(n,e){if(e==null)return[];if(!Array.isArray(e)||e.length===0)return[];const t=[];for(let o=0;o<e.length;o++){const i=e[o],s=n.propToCol(i.prop);if(s==null||s<0)continue;const r=n.toPhysicalColumn(s);t.push({column:r,operation:i.operation,conditions:(i.conditions||[]).map(a=>({name:a.name,args:Array.isArray(a.args)?[...a.args]:[]}))})}return t}function Yle(n,e,t){if(!ye(t()))return;const o=n.getPlugin(Vle);if(!o||!o.enabled)return;const i=yU(n,o.exportConditions());e.filters=i??null}function Gle(n,e){const{hot:t,hasFetchFn:o,applyFiltersAndRefetch:i}=n;if(!o())return;const s=yU(t,e);return i(s),!1}const cm="pagination";function jle(n,e){if(!n?.enabled)return;const t=typeof n.getCurrentPageSize=="function"?n.getCurrentPageSize():void 0,o=n.getSetting("pageSize"),i=n.getSetting("initialPage"),s=typeof n.getCurrentPage=="function"?n.getCurrentPage():void 0;typeof t=="number"?e.pageSize=t:typeof o=="number"&&(e.pageSize=o),typeof s=="number"&&s>=1?e.page=s:typeof i=="number"&&i>=1&&(e.page=i)}function qle(n,e){return n==="auto"||typeof n!="number"||!Number.isFinite(n)||n<1?e:n}function Kle(n,e){jle(n.getPlugin(cm),e)}function Xle(n,e,t=R_){const{page:o,pageSize:i}=n,s=typeof i=="number"&&i>=1?i:t;return(o-1)*s+e}function Zle(n,e,t){const{hot:o,getQueryPage:i,goToPage:s}=n;o.getPlugin(cm)?.enabled&&t!==i()&&s(t).catch(()=>{const a=o.getPlugin(cm);a?.enabled&&a.revertPageTo(e)})}function Qle(n,e,t){const{hot:o,getQueryPage:i,getQueryPageSize:s,setPageSize:r}=n;if(!o.getPlugin(cm)?.enabled)return;const l=qle(t,R_);l===s()&&i()===1||r(l).catch(()=>{const h=o.getPlugin(cm);h?.enabled&&h.revertPageSizeTo(e)})}const _U="columnSorting";function Jle(n,e){if(n==null||typeof n!="object")return null;if(typeof n.column=="number"&&typeof e=="function")return{prop:e(n.column),order:n.sortOrder};const t=n.order??n.sortOrder;return typeof n.prop=="string"&&(t==="asc"||t==="desc")?{prop:n.prop,order:t}:null}function ehe(n,e){if(n==null||typeof n!="object"||typeof n.prop!="string")return null;const t=n.order??n.sortOrder;if(t!=="asc"&&t!=="desc"||typeof e!="function")return null;const o=e(n.prop);return typeof o!="number"?null:{column:o,sortOrder:t}}function the(n,e,t){if(!n?.enabled||typeof t!="function")return;const o=n.getSortConfig(),i=Array.isArray(o)&&o.length>0?o[0]:o;i&&typeof i=="object"&&typeof i.column=="number"?e.sort={prop:t(i.column),order:i.sortOrder}:e.sort=null}function nhe(n,e){the(n.getPlugin(_U),e,t=>n.colToProp(t))}function ohe(n,e){n.sort=Jle(n.sort,t=>e.colToProp(t))}function ihe(n,e){const t=ehe(e,o=>n.propToCol(o));return t&&typeof t=="object"&&"column"in t?t:[]}function she(n,e,t,o){const{hot:i,hasFetchFn:s,applyQueryParametersFromPlugins:r,fetchData:a}=n;return!s()||!o?void 0:(i.getPlugin(_U).setSortConfig(t),r(),a({skipLoading:!0}),!1)}function rhe(n){return!n||typeof n!="object"||Array.isArray(n)?!1:Object.keys(g0).every(e=>g0[e](n[e]))}function ahe(n){return typeof n=="string"&&/^\d{3}$/.test(n.trim())}function Uu(n,e){if(typeof e=="string"){const t=e.trim();t&&n.push(t)}}function sD(n,e){!n||typeof n!="object"||Array.isArray(n)||(Uu(e,n.message),Uu(e,n.error),typeof n.detail=="string"&&Uu(e,n.detail))}function lhe(n){const e=[];if(n==null)return"Unknown error";if(typeof n=="string")return n.trim()||"Unknown error";if(typeof n!="object")return String(n);const t=n.response?.data??n.data??n.body;if(t!=null)if(typeof t=="string")try{sD(JSON.parse(t),e)}catch{Uu(e,t)}else sD(t,e);typeof n.error=="string"&&Uu(e,n.error),typeof n.message=="string"&&Uu(e,n.message);const o=e.find(i=>!ahe(i));return o||(e.length>0?e[0]:String(n))}function hhe(n,e,t){const o=typeof e=="number"&&e>=1?e:R_,i=Math.max(1,Math.ceil(t/o));return Math.max(1,Math.min(n,i))}function SU(n,e){if(e.has(n))throw new TypeError("Cannot initialize the same private elements twice on an object")}function che(n,e){return e.get?e.get.call(n):e.value}function dhe(n,e,t){if(e.set)e.set.call(n,t);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=t}}function vU(n,e,t){if(!e.has(n))throw new TypeError("attempted to "+t+" private field on non-instance");return e.get(n)}function Wt(n,e){var t=vU(n,e,"get");return che(n,t)}function Vi(n,e,t){SU(n,e),e.set(n,t)}function oo(n,e,t){var o=vU(n,e,"set");return dhe(n,o,t),t}function We(n,e,t){if(!e.has(n))throw new TypeError("attempted to get private field on non-instance");return t}function To(n,e){SU(n,e),e.add(n)}f2("dataProvider",["manualRowMove","manualColumnMove","trimRows","multiColumnSorting"]);var Uo=new WeakMap,jr=new WeakMap,p0=new WeakMap,Cf=new WeakSet,Dd=new WeakSet,rp=new WeakSet,Iv=new WeakSet,ap=new WeakSet,Hv=new WeakSet,vu=new WeakSet,Av=new WeakSet,RU=new WeakSet,rD=new WeakSet,aD=new WeakSet,Ov=new WeakSet,Dv=new WeakSet,sC=new WeakSet,sy=new WeakSet,Nv=new WeakSet,Pv=new WeakSet,Xw=new WeakMap,Lv=new WeakMap,Wv=new WeakMap,$v=new WeakMap,Fv=new WeakMap,Bv=new WeakMap,Vv=new WeakMap,zv=new WeakMap,Uv=new WeakMap,Yv=new WeakMap;let uhe=class extends rt{static get PLUGIN_KEY(){return sp}static get PLUGIN_PRIORITY(){return _le}static get SETTING_KEYS(){return[sp]}static get DEFAULT_SETTINGS(){return Sle}static get SETTINGS_VALIDATORS(){return g0}isEnabled(){return!!this.hot.getSettings()[sp]}enablePlugin(){this.enabled||(We(this,Av,cD).call(this),this.addHook("hasExternalDataSource",Wt(this,Xw)),this.addHook("afterInit",()=>Wt(this,Lv).call(this)),this.addHook("modifyRowHeader",(...e)=>Wt(this,Vv).call(this,...e)),this.addHook("beforeColumnSort",(...e)=>Wt(this,Bv).call(this,...e)),this.addHook("beforeUndoStackChange",(...e)=>Wt(this,zv).call(this,...e)),this.addHook("afterChange",(...e)=>Wt(this,Uv).call(this,...e)),this.addHook("beforeAlter",(...e)=>Wt(this,Yv).call(this,...e)),this.addHook("afterPageChange",(...e)=>Wt(this,Wv).call(this,...e)),this.addHook("afterPageSizeChange",(...e)=>Wt(this,$v).call(this,...e)),this.addHook("beforeFilter",(...e)=>Wt(this,Fv).call(this,...e)),super.enablePlugin())}updatePlugin(){this.disablePlugin(),this.enablePlugin(),this.hot.view&&this.fetchData(),super.updatePlugin()}disablePlugin(){We(this,Dv,uD).call(this),oo(this,Uo,{...oD}),super.disablePlugin()}getQueryParameters(){return We(this,vu,lp).call(this,Wt(this,Uo))}getRowId(e){return E_(this.hot,We(this,Dd,dg).call(this),e)}async fetchData(e={}){const t=We(this,rp,rC).call(this);if(!ye(t))return this.hot.render(),null;const o=We(this,rD,ghe).call(this,e),i=We(this,aD,phe).call(this),{signal:s}=i;if(this.hot.runHooks("beforeDataProviderFetch",o)===!1)return oo(this,jr,null),this.hot.render(),null;const r=We(this,vu,lp).call(this,o);try{const a=await t(r,{signal:s});if(s.aborted)return We(this,Ov,dD).call(this,o,void 0),null;const l=Array.isArray(a?.rows)?a.rows:[],h=typeof a?.totalRows=="number"&&a.totalRows>=0?a.totalRows:l.length,c=We(this,vu,lp).call(this,o),d=hhe(c.page,c.pageSize,h);if(d!==c.page)return this.fetchData({...e,page:d,skipLoading:e.skipLoading});oo(this,Uo,c),this.hot.loadData(l,sp);const u=ihe(this.hot,c.sort??null),f=Ule(this.hot,c.filters??null);return this.hot.runHooks("afterDataProviderFetch",{...a,rows:l,totalRows:h,queryParameters:c,columnSortConfig:u,filtersConditionsStack:f}),this.hot.render(),{rows:l,totalRows:h}}catch(a){if(s.aborted||a?.name==="AbortError")return We(this,Ov,dD).call(this,o,a),null;throw this.hot.runHooks("afterDataProviderFetchError",a,We(this,vu,lp).call(this,o)),We(this,sy,mM).call(this,"fetch",a),a}finally{Wt(this,jr)===i&&oo(this,jr,null)}}async createRows(e={}){const t=We(this,Iv,lD).call(this);if(!ye(t))return Promise.resolve();const o={position:e.position??"below",referenceRowId:e.referenceRowId,rowsAmount:e.rowsAmount??1},i={rowsCreate:o};return We(this,Pv,gD).call(this,"create",i,()=>t(o),()=>this.fetchData({skipLoading:!0}))}async removeRows(e){const t=We(this,Hv,hD).call(this);if(!ye(t))return Promise.resolve();const o=Array.isArray(e)?e:[e];o.forEach(s=>{iy(s)&&U(kle)});const i={rowsRemove:o};return We(this,Pv,gD).call(this,"remove",i,()=>t(o),async()=>{const s=Wt(this,Uo).page,r=this.hot.countRows();if(o.length>=r&&r>=1&&s>1){await this.fetchData({page:s-1,skipLoading:!0});return}(await this.fetchData({skipLoading:!0}))?.rows.length===0&&s>1&&await this.fetchData({page:s-1,skipLoading:!0})})}async updateRows(e){if(!ye(We(this,ap,aC).call(this))||!Array.isArray(e)||e.length===0)return;e.forEach(o=>{iy(o.id)&&U(Ele)});const t=Dle(this.hot,We(this,Dd,dg).call(this),e);return We(this,sC,m0).call(this,()=>Ple(this.hot,{getRowIdOption:()=>We(this,Dd,dg).call(this),commitRowsUpdate:o=>We(this,Nv,fD).call(this,o)},t))}destroy(){We(this,Dv,uD).call(this),super.destroy()}constructor(e){super(e),To(this,Cf),To(this,Dd),To(this,rp),To(this,Iv),To(this,ap),To(this,Hv),To(this,vu),To(this,Av),To(this,RU),To(this,rD),To(this,aD),To(this,Ov),To(this,Dv),To(this,sC),To(this,sy),To(this,Nv),To(this,Pv),Vi(this,Uo,{writable:!0,value:void 0}),Vi(this,jr,{writable:!0,value:void 0}),Vi(this,p0,{writable:!0,value:void 0}),Vi(this,Xw,{writable:!0,value:void 0}),Vi(this,Lv,{writable:!0,value:void 0}),Vi(this,Wv,{writable:!0,value:void 0}),Vi(this,$v,{writable:!0,value:void 0}),Vi(this,Fv,{writable:!0,value:void 0}),Vi(this,Bv,{writable:!0,value:void 0}),Vi(this,Vv,{writable:!0,value:void 0}),Vi(this,zv,{writable:!0,value:void 0}),Vi(this,Uv,{writable:!0,value:void 0}),Vi(this,Yv,{writable:!0,value:void 0}),oo(this,Uo,{...oD}),oo(this,jr,null),oo(this,p0,{tail:Promise.resolve()}),oo(this,Xw,()=>rhe(this.hot.getSettings().dataProvider)),oo(this,Lv,()=>{this.fetchData()}),oo(this,Wv,(t,o)=>{Zle({hot:this.hot,getQueryPage:()=>Wt(this,Uo).page,goToPage:i=>this.fetchData({page:i})},t,o)}),oo(this,$v,(t,o)=>{Qle({hot:this.hot,getQueryPage:()=>Wt(this,Uo).page,getQueryPageSize:()=>Wt(this,Uo).pageSize,setPageSize:i=>this.fetchData({pageSize:i,page:1})},t,o)}),oo(this,Fv,t=>Gle({hot:this.hot,hasFetchFn:()=>ye(We(this,rp,rC).call(this)),applyFiltersAndRefetch:o=>{Wt(this,Uo).filters=o??null,Wt(this,Uo).page=1,this.fetchData()}},t)),oo(this,Bv,(t,o,i)=>she({hot:this.hot,hasFetchFn:()=>ye(We(this,rp,rC).call(this)),applyQueryParametersFromPlugins:()=>We(this,Av,cD).call(this),fetchData:s=>this.fetchData(s)},t,o,i)),oo(this,Vv,t=>Xle(Wt(this,Uo),t)),oo(this,zv,(t,o)=>{if(ye(We(this,ap,aC).call(this))&&mU.has(o))return!1}),oo(this,Uv,(t,o)=>{if(Ale(ye(We(this,ap,aC).call(this)),t,o))return;const i=Ole(this.hot,t);i.length!==0&&We(this,sC,m0).call(this,()=>Lle(this.hot,{getRowIdOption:()=>We(this,Dd,dg).call(this),commitRowsUpdate:(s,r)=>We(this,Nv,fD).call(this,s,r)},i))}),oo(this,Yv,(t,o,i)=>Ble({hot:this.hot,getOnRowsCreate:()=>We(this,Iv,lD).call(this),getOnRowsRemove:()=>We(this,Hv,hD).call(this),getRowIdOption:()=>We(this,Dd,dg).call(this),getRowId:s=>this.getRowId(s),createRows:s=>this.createRows(s),removeRows:s=>this.removeRows(s)},t,o,i)),this.addHook("hasExternalDataSource",Wt(this,Xw))}};function qm(){const n=this.hot.getSettings()[sp];return n&&typeof n=="object"?n:void 0}function dg(){const n=We(this,Cf,qm).call(this);return n?n.rowId:void 0}function rC(){const n=We(this,Cf,qm).call(this);return n&&ye(n.fetchRows)?n.fetchRows:void 0}function lD(){const n=We(this,Cf,qm).call(this);return n&&ye(n.onRowsCreate)?n.onRowsCreate:void 0}function aC(){const n=We(this,Cf,qm).call(this);return n&&ye(n.onRowsUpdate)?n.onRowsUpdate:void 0}function hD(){const n=We(this,Cf,qm).call(this);return n&&ye(n.onRowsRemove)?n.onRowsRemove:void 0}function lp(n){return{page:n.page,pageSize:n.pageSize,sort:n.sort===null?null:{...n.sort},filters:zle(n.filters)}}function cD(){Kle(this.hot,Wt(this,Uo)),nhe(this.hot,Wt(this,Uo)),Yle(this.hot,Wt(this,Uo),()=>We(this,rp,rC).call(this))}function fhe(){if(!Wt(this,jr))return;const n=new Error(vle);n.name="AbortError",Wt(this,jr).abort(n)}function ghe(n){const e={...Wt(this,Uo),...n};return ohe(e,this.hot),typeof e.page=="number"&&!Number.isNaN(e.page)&&(e.page=Math.max(1,e.page)),e}function phe(){We(this,RU,fhe).call(this);const n=new AbortController;return oo(this,jr,n),n}function dD(n,e){const t=We(this,vu,lp).call(this,n);this.hot.runHooks("afterDataProviderFetchAbort",t,e)}function uD(){Wt(this,jr)?.abort(),oo(this,jr,null)}function m0(n){return Tle(Wt(this,p0),n)}function mM(n,e){const t=this.hot.getPlugin("notification");if(!t?.enabled)return;const o={fetch:rx,create:ax,update:lx,remove:hx},i=this.hot.getTranslatedPhrase(o[n]??cx),s=lhe(e);let r="";const a={variant:"error",title:i,message:s};n==="fetch"&&(a.duration=0,a.actions=[{label:this.hot.getTranslatedPhrase(dx),type:"primary",callback:()=>{r&&t.hide(r),this.fetchData()}}]),r=t.showMessage(a)}function fD(n,e={}){return Nle(this.hot,{getOnRowsUpdate:()=>We(this,ap,aC).call(this),fetchData:()=>this.fetchData({skipLoading:!0}),logError:nl,onRequestFailed:(t,o)=>We(this,sy,mM).call(this,t,o)},n,e)}function gD(n,e,t,o){return Wle({enqueueMutation:i=>We(this,sC,m0).call(this,i),runBeforeRowsMutation:(i,s)=>pM(this.hot,i,s),runAfterRowsMutation:(i,s)=>wU(this.hot,i,s),runAfterRowsMutationError:(i,s,r)=>sf(this.hot,i,s,r),logError:nl,onRequestFailed:(i,s)=>We(this,sy,mM).call(this,i,s)},n,e,t,o)}function mhe(n,e){if(e.has(n))throw new TypeError("Cannot initialize the same private elements twice on an object")}function pD(n,e,t){if(!e.has(n))throw new TypeError("attempted to get private field on non-instance");return t}function whe(n,e){mhe(n,e),e.add(n)}const mD="dragToScroll",bhe=100;var Gv=new WeakSet;class Che extends rt{static get PLUGIN_KEY(){return mD}static get PLUGIN_PRIORITY(){return bhe}isEnabled(){return!!this.hot.getSettings()[mD]}enablePlugin(){this.enabled||(this.addHook("afterOnCellMouseDown",e=>pD(this,Gv,wD).call(this,e)),this.addHook("afterOnCellCornerMouseDown",e=>pD(this,Gv,wD).call(this,e)),this.registerEvents(),super.enablePlugin())}updatePlugin(){this.disablePlugin(),this.enablePlugin(),super.updatePlugin()}disablePlugin(){this.unregisterEvents(),super.disablePlugin()}setBoundaries(e={left:0,right:this.hot.rootWindow.innerWidth,top:0,bottom:this.hot.rootWindow.innerHeight}){this.boundaries=e}setCallback(e){this.callback=e}check(e,t){let o=0,i=0;t<this.boundaries.top?i=t-this.boundaries.top:t>this.boundaries.bottom&&(i=t-this.boundaries.bottom),e<this.boundaries.left?o=e-this.boundaries.left:e>this.boundaries.right&&(o=e-this.boundaries.right),this.callback(o,i)}listen(){this.listening=!0}unlisten(){this.listening=!1}isListening(){return this.listening}registerEvents(){const{rootWindow:e}=this.hot;let t=e;for(;t;)this.eventManager.addEventListener(t.document,"contextmenu",()=>this.unlisten()),this.eventManager.addEventListener(t.document,"mouseup",()=>this.unlisten()),this.eventManager.addEventListener(t.document,"mousemove",o=>this.onMouseMove(o)),t=gh(t)}unregisterEvents(){this.eventManager.clear()}onMouseMove(e){this.isListening()&&this.check(e.clientX,e.clientY)}destroy(){super.destroy()}constructor(...e){super(...e),whe(this,Gv),this.boundaries=null,this.callback=null,this.listening=!1}}function wD(n){if(Uc(n))return;const e=this.hot.view._wt.wtOverlays.topOverlay.mainTableScrollableElement;this.setBoundaries(e!==this.hot.rootWindow?e.getBoundingClientRect():void 0),this.setCallback((t,o)=>{const i=e.scrollLeft??e.scrollX,s=e.scrollTop??e.scrollY;e.scroll(i+Math.sign(t)*50,s+Math.sign(o)*20)}),this.listen()}function EU(n,e){if(e.has(n))throw new TypeError("Cannot initialize the same private elements twice on an object")}function yhe(n,e){return e.get?e.get.call(n):e.value}function _he(n,e,t){if(e.set)e.set.call(n,t);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=t}}function kU(n,e,t){if(!e.has(n))throw new TypeError("attempted to "+t+" private field on non-instance");return e.get(n)}function She(n,e){var t=kU(n,e,"get");return yhe(n,t)}function vhe(n,e,t){EU(n,e),e.set(n,t)}function wM(n,e,t){var o=kU(n,e,"set");return _he(n,o,t),t}function ms(n,e,t){if(!e.has(n))throw new TypeError("attempted to get private field on non-instance");return t}function xr(n,e){EU(n,e),e.add(n)}he.getSingleton().register("afterDropdownMenuDefaultOptions");he.getSingleton().register("beforeDropdownMenuShow");he.getSingleton().register("afterDropdownMenuShow");he.getSingleton().register("afterDropdownMenuHide");he.getSingleton().register("afterDropdownMenuExecute");const lC="dropdownMenu",Rhe=230,Pc="changeType",jv=lC;var dm=new WeakMap,bM=new WeakSet,bD=new WeakSet,w0=new WeakSet,CD=new WeakSet,yD=new WeakSet,_D=new WeakSet,SD=new WeakSet,vD=new WeakSet,RD=new WeakSet,ED=new WeakSet;class k_ extends rt{static get PLUGIN_KEY(){return lC}static get PLUGIN_PRIORITY(){return Rhe}static get PLUGIN_DEPS(){return["plugin:AutoColumnSize"]}static get DEFAULT_ITEMS(){return[Um,Ym,He,jm,He,m_,He,Gm,He,Cs]}isEnabled(){return this.hot.getSettings()[lC]}enablePlugin(){if(this.enabled)return;this.itemsFactory=new tU(this.hot,k_.DEFAULT_ITEMS),this.addHook("beforeOnCellMouseDown",(...o)=>ms(this,ED,Ahe).call(this,...o)),this.addHook("beforeViewportScrollHorizontally",(...o)=>ms(this,RD,Hhe).call(this,...o)),this.addHook("beforeDialogShow",()=>this.close());const e=this.hot.getSettings()[lC],t={items:this.itemsFactory.getItems(e)};this.registerEvents(),typeof e.callback=="function"&&this.commandExecutor.setCommonCallback(e.callback),this.registerShortcuts(),super.enablePlugin(),this.callOnPluginsReady(()=>{this.hot.runHooks("afterDropdownMenuDefaultOptions",t),this.itemsFactory.setPredefinedItems(t.items);const o=this.itemsFactory.getItems(e);this.menu&&this.menu.destroy(),this.menu=new bf(this.hot,{className:"htDropdownMenu",keepInViewport:!0,container:e.uiContainer||this.hot.rootPortalElement}),this.hot.runHooks("beforeDropdownMenuSetItems",o),this.menu.setMenuItems(o),this.menu.addLocalHook("beforeOpen",()=>ms(this,yD,The).call(this)),this.menu.addLocalHook("afterOpen",()=>ms(this,_D,xhe).call(this)),this.menu.addLocalHook("afterSubmenuOpen",i=>ms(this,SD,Mhe).call(this,i)),this.menu.addLocalHook("afterClose",()=>ms(this,vD,Ihe).call(this)),this.menu.addLocalHook("executeCommand",(...i)=>this.executeCommand.call(this,...i)),O(o,i=>this.commandExecutor.registerCommand(i.key,i))})}updatePlugin(){this.disablePlugin(),this.enablePlugin(),super.updatePlugin()}disablePlugin(){this.close(),this.menu&&this.menu.destroy(),this.unregisterShortcuts(),super.disablePlugin()}registerShortcuts(){const e=this.hot.getShortcutManager().getContext("grid"),t=()=>{const{highlight:o}=this.hot.getSelectedRangeActive(),i=o.isHeader()?this.hot.getCell(o.row,o.col,!0):null,s=o.isHeader()&&o.col>=0&&af(i),r=o.isHeader()&&o.col>=0&&i&&_e(i,"hiddenHeader");if((s||r||o.isCell())&&o.col>=0){let l=s||r?o.row:-1;this.hot.selectColumns(o.col,o.col,l);const{from:h}=this.hot.getSelectedRangeActive(),c=p_(this.menu.container,this.hot.rootDocument);let d=this.hot.getCell(l,h.col,!0)?.querySelector(`.${Pc}`);if(!d)for(let f=-this.hot.view.getColumnHeadersCount();f<=-1;f++){const p=this.hot.getCell(f,h.col,!0)?.querySelector(`.${Pc}`);if(p){d=p,l=f,this.hot.selectColumns(o.col,o.col,l);break}}if(!d&&r)for(let f=h.col-1;f>=0;f--){const p=this.hot.getCell(l,f,!0);if(!p||_e(p,"hiddenHeader"))continue;const C=p?.querySelector(`.${Pc}`);C&&(d=C,this.hot.selectColumns(f,f,l));break}if(!d)return;const u=ms(this,w0,xU).call(this,d);this.open({left:u.left+c.left,top:u.bottom+c.top},{left:u.width,right:0,above:0,below:3}),this.menu.getNavigator().toFirstItem()}};e.addShortcuts([{keys:[["Shift","Alt","ArrowDown"],["Control/Meta","Enter"]],callback:t,runOnlyIf:()=>{const o=this.hot.getSelectedRangeActive()?.highlight,i=o?.isHeader()?this.hot.getCell(o.row,o.col,!0):null,s=o?.isHeader()&&o.col>=0&&i&&_e(i,"hiddenHeader");return o&&!this.menu.isOpened()&&o.isHeader()&&(this.hot.selection.isCellVisible(o)||s)},captureCtrl:!0,group:jv},{keys:[["Shift","Alt","ArrowDown"]],callback:t,runOnlyIf:()=>{const o=this.hot.getSelectedRangeActive()?.highlight;return o&&this.hot.selection.isCellVisible(o)&&o.isCell()&&!this.menu.isOpened()},group:jv}])}unregisterShortcuts(){this.hot.getShortcutManager().getContext("grid").removeShortcutsByGroup(jv)}registerEvents(){this.eventManager.addEventListener(this.hot.rootElement,"click",e=>ms(this,bD,Ehe).call(this,e))}open(e,t={above:0,below:0,left:0,right:0}){this.menu?.isOpened()||(this.menu.open(),tt(t,(o,i)=>{this.menu.setOffset(i,o)}),this.menu.setPosition(e))}close(){this.menu?.close()}executeCommand(e,...t){this.commandExecutor.execute(e,...t)}setListening(e=!0){this.menu.isOpened()&&(e?this.menu.hotMenu.listen():this.menu.hotMenu.unlisten())}destroy(){this.close(),this.menu&&this.menu.destroy(),super.destroy()}constructor(e){super(e),xr(this,bM),xr(this,bD),xr(this,w0),xr(this,CD),xr(this,yD),xr(this,_D),xr(this,SD),xr(this,vD),xr(this,RD),xr(this,ED),vhe(this,dm,{writable:!0,value:void 0}),this.commandExecutor=new eU(this.hot),this.itemsFactory=null,this.menu=null,wM(this,dm,!1),this.hot.addHook("afterGetColHeader",(t,o)=>ms(this,CD,khe).call(this,t,o))}}function TU(n){n.getKeyboardShortcutsCtrl().addCustomShortcuts([{keys:[["Control/Meta","A"]],callback:()=>!1}])}function Ehe(n){if(_e(n.target,Pc)){const e=p_(this.menu.container,this.hot.rootDocument),t=ms(this,w0,xU).call(this,n.target);n.stopPropagation(),wM(this,dm,!1),this.open({left:t.left+e.left,top:t.bottom+e.top},{left:t.width,right:0,above:0,below:3})}}function xU(n){const e=n.getBoundingClientRect(),t=this.hot.rootWindow.getComputedStyle(n,"::before"),o=Number.parseFloat(t.width);if(Number.isFinite(o)&&e.width>=o&&e.height>=o){const i=e.left+(e.width-o)/2,s=e.top+(e.height-o)/2;return{top:s,left:i,right:i+o,bottom:s+o,width:o,height:o}}return{top:e.top,left:e.left,right:e.right,bottom:e.bottom,width:e.width,height:e.height}}function khe(n,e){if(n<0||!af(e))return;const t=e.querySelector(`.${Pc}`);if(this.enabled&&t)return;if(!this.enabled){t&&t.parentNode.removeChild(t);return}const o=this.hot.rootDocument.createElement("button");o.className=Pc,o.type="button",o.tabIndex=-1,this.hot.getSettings().ariaTags&&(fe(o,[al(),Ni(" ")]),fe(e,[q$("menu")])),o.onclick=function(){return!1};const i=e.firstChild;if(!i)return;const s=i.querySelector(".colHeader");s?i.insertBefore(o,s.nextSibling):i.appendChild(o)}function The(){this.hot.runHooks("beforeDropdownMenuShow",this)}function xhe(){this.hot.runHooks("afterDropdownMenuShow",this),ms(this,bM,TU).call(this,this.menu)}function Mhe(n){ms(this,bM,TU).call(this,n)}function Ihe(){this.hot.listen(),this.hot.runHooks("afterDropdownMenuHide",this)}function Hhe(n){return She(this,dm)?null:n}function Ahe(n){_e(n.target,Pc)&&wM(this,dm,!0)}k_.SEPARATOR={name:He};class MU{setOptions(e){if(e&&"columnHeaders"in e&&!("colHeaders"in e)){this.options={...e,colHeaders:e.columnHeaders};return}this.options=e}_extractDataMatrix(e){const{startRow:t,startCol:o,endRow:i,endCol:s}=this._getDataRange(),r=this.options,a=[];for(let l=t;l<=i;l++){if(r.exportHiddenRows===!1&&this._isHiddenRow(l))continue;const h=[];for(let c=o;c<=s;c++)r.exportHiddenColumns===!1&&this._isHiddenColumn(c)||h.push(e(l,c));a.push(h)}return a}getData(){return this._extractDataMatrix((e,t)=>this.hot.getDataAtCell(e,t))}getRowHeaders(){const e=[];if(this.options.rowHeaders){const{startRow:t,endRow:o}=this._getDataRange(),i=this.hot.getRowHeader();for(let s=t;s<=o;s++)this.options.exportHiddenRows===!1&&this._isHiddenRow(s)||e.push(i[s])}return e}getColumnHeaders(){const e=[];if(this.options.colHeaders){const{startCol:t,endCol:o}=this._getDataRange(),i=this.hot.getColHeader();for(let s=t;s<=o;s++)this.options.exportHiddenColumns===!1&&this._isHiddenColumn(s)||e.push(i[s])}return e}_getDataRange(){const e=this.hot.countCols()-1,t=this.hot.countRows()-1;let[o=0,i=0,s=t,r=e]=this.options.range;return o=Math.max(o,0),i=Math.max(i,0),s=Math.min(s,t),r=Math.min(r,e),{startRow:o,startCol:i,endRow:s,endCol:r}}getSourceData(){return this._extractDataMatrix((e,t)=>this.hot.getSourceDataAtCell(e,t))}getExcludedHiddenRows(){const e=new Set;if(this.options.exportHiddenRows!==!1)return e;const{startRow:t,endRow:o}=this._getDataRange();for(let i=t;i<=o;i++)this._isHiddenRow(i)&&e.add(this.hot.toPhysicalRow(i));return e}getExcludedHiddenColumns(){const e=new Set;if(this.options.exportHiddenColumns!==!1)return e;const{startCol:t,endCol:o}=this._getDataRange();for(let i=t;i<=o;i++)this._isHiddenColumn(i)&&e.add(this.hot.toPhysicalColumn(i));return e}getHiddenRowDataIndices(){if(this.options.exportHiddenRows!=="hide")return[];const{startRow:e,endRow:t}=this._getDataRange(),o=[];let i=0;for(let s=e;s<=t;s++)this._isHiddenRow(s)&&o.push(i),i+=1;return o}getHiddenColumnDataIndices(){if(this.options.exportHiddenColumns!=="hide")return[];const{startCol:e,endCol:t}=this._getDataRange(),o=[];let i=0;for(let s=e;s<=t;s++)this._isHiddenColumn(s)&&o.push(i),i+=1;return o}getFormulasSeparator(){const e=this.hot.getPlugin("formulas");return!e||!e.isEnabled()?",":e.engine?.getConfig()?.functionArgSeparator??","}getCellsMeta(){return this._extractDataMatrix((e,t)=>this.hot.getCellMeta(e,t))}getCellElements(){return this._extractDataMatrix((e,t)=>this.hot.getCell(e,t))}getMergeCells(){const{startRow:e,startCol:t,endRow:o,endCol:i}=this._getDataRange(),s=this.hot.getPlugin("mergeCells");if(!s||!s.isEnabled())return[];const r=s.mergedCellsCollection.mergedCells,a=[],l=this.options.exportHiddenRows===!1,h=this.options.exportHiddenColumns===!1,c=u=>!l||!this._isHiddenRow(u),d=u=>!h||!this._isHiddenColumn(u);return r.forEach(u=>{const f=u.row+u.rowspan-1,p=u.col+u.colspan-1;if(u.row<e||f>o||u.col<t||p>i||!c(u.row)||!d(u.col))return;const C=this._countVisibleBefore(u.row,e,c),_=this._countVisibleBefore(u.col,t,d),S=this._countVisibleBefore(f+1,u.row,c),T=this._countVisibleBefore(p+1,u.col,d);S<=1&&T<=1||a.push({row:C,col:_,rowspan:S,colspan:T})}),a}getColumnsWidths(){const{startCol:e,endCol:t}=this._getDataRange(),o=this.options,i=[];for(let s=e;s<=t;s++){if(o.exportHiddenColumns===!1&&this._isHiddenColumn(s))continue;const r=this._isHiddenColumn(s)?this._getNaturalColWidth(s):this.hot.getColWidth(s);i.push(r)}return i}getRowsHeights(){const{startRow:e,endRow:t}=this._getDataRange(),o=this.options,i=[];for(let s=e;s<=t;s++){if(o.exportHiddenRows===!1&&this._isHiddenRow(s))continue;const r=this._isHiddenRow(s)?this._getNaturalRowHeight(s):this.hot.getRowHeight(s);i.push(r)}return i}getFrozenRows(){return this.hot.getSettings().fixedRowsTop||0}getFrozenColumns(){return this.hot.getSettings().fixedColumnsStart||0}getNestedColumnHeaders(){const e=this.hot.getPlugin("nestedHeaders");if(!e||!e.isEnabled())return null;const t=e.getLayersCount(),{startCol:o,endCol:i}=this._getDataRange(),r=!!this.options.exportHiddenColumns,a=[];for(let l=0;l<t;l++){const h=[];let c=o;for(;c<=i;){if(!r&&this._isHiddenColumn(c)){c+=1;continue}if(r){const d=e.getStateManager().getHeaderTreeNodeData(l,c);if(!d||d.columnIndex===c){const u=d?.origColspan??1,f=Math.min(u,i-c+1),p=(d?.headerClassNames??[]).join(" ");h.push({label:d?.label??"",colspan:f,className:p}),c+=u}else h.push({label:"",colspan:1,className:""}),c+=1}else{const d=e.getHeaderSettings(l,c);if(!d||d.isRoot){const u=d?.colspan??1;let f=0;for(let C=c;C<c+u&&C<=i;C++)this._isHiddenColumn(C)||(f+=1);const p=(d?.headerClassNames??[]).join(" ");h.push({label:d?.label??"",colspan:f,className:p}),c+=u}else h.push({label:"",colspan:1,className:""}),c+=1}}a.push(h)}return a}getColumnHeadersClassNames(){if(!this.options.colHeaders)return[];const{startCol:e,endCol:t}=this._getDataRange(),o=this.options,i=[];for(let s=e;s<=t;s++)o.exportHiddenColumns===!1&&this._isHiddenColumn(s)||i.push(this.hot.getColumnMeta(s).headerClassName||"");return i}getLayoutDirection(){return this.hot.getSettings().layoutDirection==="rtl"?"rtl":"ltr"}getColumnSummaries(){const e=this.hot.getPlugin("columnSummary");if(!e||!e.isEnabled())return[];const{startRow:t,startCol:o,endRow:i,endCol:s}=this._getDataRange(),r=e.endpoints.getAllEndpoints(),a=new Set;r.forEach(h=>{const c=this._physicalRowToDataIndex(h.destinationRow,t,i);c!==null&&a.add(c)});const l=[];return r.forEach(h=>{const c=this._transformEndpointToSummary(h,t,i,o,s,a);c!==null&&l.push(c)}),l}_transformEndpointToSummary(e,t,o,i,s,r){const a=this._physicalRowToDataIndex(e.destinationRow,t,o),l=this._physicalColToDataIndex(e.destinationColumn,i,s);if(a===null||l===null)return null;const h=e.sourceColumn??e.destinationColumn,c=this._physicalColToDataIndex(h,i,s);if(c===null)return null;const d=e.ranges||[[0,this.hot.countRows()-1]],u=[];return d.forEach(f=>{const p=f[0],C=f[1]!==void 0?f[1]:f[0];for(let _=p;_<=C;_++){const S=this._physicalRowToDataIndex(_,t,o);if(!(S===null||r.has(S))){if(u.length>0){const T=u[u.length-1];if(T[1]+1===S){T[1]=S;continue}}u.push([S,S])}}}),u.length===0?null:{destRow:a,destCol:l,type:String(e.type||"sum").toLowerCase(),sourceCol:c,sourceRanges:u}}_countVisibleBefore(e,t,o){let i=0;for(let s=t;s<e;s++)o(s)&&(i+=1);return i}_physicalRowToDataIndex(e,t,o){const i=this.hot.toVisualRow(e);return i===null||i<t||i>o||this.options.exportHiddenRows===!1&&this._isHiddenRow(i)?null:this._countVisibleBefore(i,t,s=>this.options.exportHiddenRows!==!1||!this._isHiddenRow(s))}_physicalColToDataIndex(e,t,o){const i=this.hot.toVisualColumn(e);return i===null||i<t||i>o||this.options.exportHiddenColumns===!1&&this._isHiddenColumn(i)?null:this._countVisibleBefore(i,t,s=>this.options.exportHiddenColumns!==!1||!this._isHiddenColumn(s))}_getNaturalColWidth(e){const t=this.hot.getSettings(),o=this.hot.getColumnMeta(e).width;if(o!=null)return o;const{colWidths:i,defaultColumnWidth:s}=t,r=s??50;return Array.isArray(i)?i[e]??r:typeof i=="function"?i(e)??r:typeof i=="number"?i:r}_getNaturalRowHeight(e){const t=this.hot.getSettings(),{rowHeights:o,defaultRowHeight:i}=t,s=i??23;return Array.isArray(o)?o[e]??s:typeof o=="function"?o(e)??s:typeof o=="number"?o:s}_isHiddenRow(e){return this.hot.rowIndexMapper.isHidden(this.hot.toPhysicalRow(e))}_isHiddenColumn(e){return this.hot.columnIndexMapper.isHidden(this.hot.toPhysicalColumn(e))}constructor(e){this.options={},this.hot=e}}class T_{static get DEFAULT_OPTIONS(){return{mimeType:"text/plain",fileExtension:"txt",filename:"Handsontable [YYYY]-[MM]-[DD]",encoding:"utf-8",bom:!1,colHeaders:!1,rowHeaders:!1,exportHiddenColumns:!1,exportHiddenRows:!1,range:[]}}get binary(){return!1}_mergeOptions(e){let t=Jr(this.constructor.DEFAULT_OPTIONS);const o=new Date;return t=Wn(Jr(T_.DEFAULT_OPTIONS),t),e&&"columnHeaders"in e&&!("colHeaders"in e)&&(e={...e,colHeaders:e.columnHeaders}),t=Wn(t,e),t.filename=My(t.filename,{YYYY:o.getFullYear(),MM:`${o.getMonth()+1}`.padStart(2,"0"),DD:`${o.getDate()}`.padStart(2,"0")}),t}constructor(e,t){this.dataProvider=e,this.options=this._mergeOptions(t),this.dataProvider.setOptions(this.options)}}function Ohe(n,e){if(e.has(n))throw new TypeError("Cannot initialize the same private elements twice on an object")}function kD(n,e,t){if(!e.has(n))throw new TypeError("attempted to get private field on non-instance");return t}function TD(n,e){Ohe(n,e),e.add(n)}const IU="\r",Dhe='"',Nhe=`
|
|
238
|
+
`,Phe="=",Lhe="+",Whe="-",$he="@",Fhe=" ";var xD=new WeakSet,MD=new WeakSet;class Bhe extends T_{static get DEFAULT_OPTIONS(){return{mimeType:"text/csv",fileExtension:"csv",bom:!0,columnDelimiter:",",rowDelimiter:`\r
|
|
239
|
+
`,sanitizeValues:!1}}_mergeOptions(e){const t=super._mergeOptions(e),o={};return t.exportHiddenRows==="hide"&&(o.exportHiddenRows=!1),t.exportHiddenColumns==="hide"&&(o.exportHiddenColumns=!1),Object.keys(o).length>0?Wn(t,o):t}export(){const e=this.options,t=this.dataProvider.getData();let o=this.dataProvider.getColumnHeaders();const i=o.length>0,s=this.dataProvider.getRowHeaders(),r=s.length>0;let a=e.bom?"\uFEFF":"";return i&&(o=o.map(l=>this._escapeCell(l,{force:!0,sanitizeValue:e.sanitizeValues})),r&&(a+=e.columnDelimiter),a+=o.join(e.columnDelimiter),a+=e.rowDelimiter),t.forEach((l,h)=>{h>0&&(a+=e.rowDelimiter),r&&(a+=this._escapeCell(s[h],{sanitizeValue:e.sanitizeValues}),a+=e.columnDelimiter);const c=l.map(d=>this._escapeCell(d,{sanitizeValue:e.sanitizeValues})).join(e.columnDelimiter);a+=c}),a}_escapeCell(e,{force:t=!1,sanitizeValue:o=!1}={}){let i=bt(e);return i===""||(o&&(t=!0),o instanceof RegExp?i=kD(this,MD,zhe).call(this,i,o):typeof o=="function"?i=o(i):o&&(i=kD(this,xD,Vhe).call(this,i)),(t||i.indexOf(IU)>=0||i.indexOf(Dhe)>=0||i.indexOf(Nhe)>=0||i.indexOf(this.options.columnDelimiter)>=0)&&(i=i.replace(new RegExp('"',"g"),'""'),i=`"${i}"`)),i}constructor(...e){super(...e),TD(this,xD),TD(this,MD)}}function Vhe(n){return n.startsWith(Phe)||n.startsWith(Lhe)||n.startsWith(Whe)||n.startsWith($he)||n.startsWith(Fhe)||n.startsWith(IU)?`'${n}`:n}function zhe(n,e){return e.test(n)?`'${n}`:n}const Uhe={sum:"SUM",min:"MIN",max:"MAX",count:"COUNT",average:"AVERAGE"};function um(n){let e="",t=n;for(;t>0;){const o=(t-1)%26;e=String.fromCharCode(65+o)+e,t=Math.floor((t-1)/26)}return e}function ID(n){let e=0;for(let t=0;t<n.length;t++)e=e*26+(n.charCodeAt(t)-64);return e}function Yhe(n){return typeof n=="string"&&n.startsWith("=")}function Ghe(n,e,t){const o=Uhe[n.type];if(!o)return null;const i=um(n.sourceCol+t),s=n.sourceRanges.map(([r,a])=>{const l=r+e,h=a+e;return l===h?`${i}${l}`:`${i}${l}:${i}${h}`});return{formula:`${o}(${s.join(",")})`}}function jhe(n,e,t){let o="",i=!1,s="";for(let r=0;r<n.length;r++){const a=n[r];i?(o+=a,a===s&&(n[r+1]===s?(o+=n[r+1],r+=1):i=!1)):a==='"'||a==="'"?(i=!0,s=a,o+=a):n.startsWith(e,r)?(o+=t,r+=e.length-1):o+=a}return o}function HD(n,e){let t=0;return n.forEach(o=>{o<e&&(t+=1)}),t}function qhe(n,e,t,o,i,s){let r=n.startsWith("=")?n.slice(1):n;const a=i?.size>0,l=s?.size>0;return(t!==0||o!==0||a||l)&&(r=r.replace(new RegExp(`("(?:[^"]|"")*"|'[^']*')|(?<![0-9])(\\$?)([A-Z]{1,3})(\\$?)(\\d{1,7})(?!\\()`,"g"),(h,c,d,u,f,p)=>{if(c!==void 0)return c;const C=ID(u)-1,_=parseInt(p,10)-1,S=l?HD(s,C):0,T=a?HD(i,_):0,P=ID(u)+o-S,F=parseInt(p,10)+t-T;return`${d}${um(P)}${f}${F}`})),e&&e!==","&&(r=jhe(r,e,",")),r}const Khe="FFF0F0F0",Xhe="FF808080";function b0(n){return Array.isArray(n)?n.filter(e=>typeof e=="string"&&e.length>0):typeof n=="string"?n.split(" ").filter(e=>e.length>0):[]}const C0=new WeakMap,y0=new WeakMap;function Zhe(n){C0.delete(n),y0.delete(n)}const ry=new Set(["htLeft","htRight","htCenter","htJustify","htTop","htMiddle","htBottom"]);function ay(n){if(!n)return null;const e=n.match(/rgba?\((\d+),\s*(\d+),\s*(\d+)(?:,\s*([\d.]+))?\)/);if(!e||(J(e[4])?parseFloat(e[4]):1)===0)return null;const o=parseInt(e[1],10).toString(16).padStart(2,"0"),i=parseInt(e[2],10).toString(16).padStart(2,"0"),s=parseInt(e[3],10).toString(16).padStart(2,"0");return`#${o}${i}${s}`.toUpperCase()}function Qhe(n,e,t){const o=e.join(" ");let i=C0.get(n);if(i||(i=new Map,C0.set(n,i)),i.has(o))return i.get(o);const s=n.createElement("div");s.className="handsontable",s.style.cssText="position:absolute;top:-99999px;left:-99999px;visibility:hidden;pointer-events:none;";const r=n.createElement("table"),a=n.createElement("tbody"),l=n.createElement("tr"),h=n.createElement("td");h.className=o;const c=n.createElement("td");c.className=e.filter(p=>ry.has(p)).join(" "),l.appendChild(h),l.appendChild(c),a.appendChild(l),r.appendChild(a),s.appendChild(r),n.body.appendChild(s);const d=t.getComputedStyle(h).backgroundColor,u=t.getComputedStyle(c).backgroundColor;n.body.removeChild(s);const f=d!==u?ay(d):null;return i.set(o,f),f}function Jhe(n,e,t){const o=t.join(" ");let i=y0.get(n);if(i||(i=new Map,y0.set(n,i)),i.has(o))return i.get(o);const s=n.createElement("div");s.className="handsontable",s.style.cssText="position:absolute;top:-99999px;left:-99999px;visibility:hidden;pointer-events:none;";const r=n.createElement("table"),a=n.createElement("tbody"),l=n.createElement("tr"),h=n.createElement("td");h.className=o;const c=n.createElement("td");c.className=t.filter(T=>ry.has(T)).join(" "),l.appendChild(h),l.appendChild(c),a.appendChild(l),r.appendChild(a),s.appendChild(r),n.body.appendChild(s);const d=e.getComputedStyle(h),u=e.getComputedStyle(c),f=d.backgroundColor,p=u.backgroundColor,C=d.color,_=u.color;n.body.removeChild(s);const S={fontBold:parseInt(d.fontWeight,10)>=700||d.fontWeight==="bold",fontItalic:d.fontStyle==="italic",fontUnderline:(d.textDecorationLine||d.textDecoration||"").includes("underline"),fontColor:C!==_?ay(C):null,backgroundColor:f!==p?ay(f):null};return i.set(o,S),S}function ece(n,e,t=null,o=null){if(!n){if(!t||!o)return null;const l=b0(e);return l.some(h=>!ry.has(h))?Jhe(t,o,l):null}const i=n.ownerDocument?.defaultView;if(!i)return null;const s=i.getComputedStyle(n),r=b0(e),a=r.some(l=>!ry.has(l));return{fontBold:parseInt(s.fontWeight,10)>=700||s.fontWeight==="bold",fontItalic:s.fontStyle==="italic",fontUnderline:(s.textDecorationLine||s.textDecoration||"").includes("underline"),fontColor:a?ay(s.color):null,backgroundColor:a?Qhe(n.ownerDocument,r,i):null}}function Km(n){if(!n||typeof n!="string")return"FF000000";const e=n.startsWith("#")?n.slice(1):n;if(e.length===3){const t=e[0]+e[0],o=e[1]+e[1],i=e[2]+e[2];return`FF${t}${o}${i}`.toUpperCase()}return e.length===6?`FF${e}`.toUpperCase():e.length===8?e.toUpperCase():"FF000000"}function HU(n){return n?AU({className:n}):null}function AU(n){if(!n?.className)return null;const e=b0(n.className),t={};return e.includes("htLeft")?t.horizontal="left":e.includes("htCenter")?t.horizontal="center":e.includes("htRight")?t.horizontal="right":e.includes("htJustify")&&(t.horizontal="justify"),e.includes("htTop")?t.vertical="top":e.includes("htMiddle")?t.vertical="middle":e.includes("htBottom")&&(t.vertical="bottom"),Object.keys(t).length>0?t:null}function tce(n){return n>=3?"thick":n===2?"medium":"thin"}function nce(n){if(!n?.borders)return null;const{borders:e}=n,t={};return["top","bottom","left","right"].forEach(o=>{e[o]&&e[o].width>0&&(t[o]={style:tce(e[o].width),color:{argb:Km(e[o].color)}})}),Object.keys(t).length>0?t:null}function oce(n,e=null){const t=n?.readOnly===!0,o=e?.fontBold||!1,i=e?.fontItalic||!1,s=e?.fontUnderline||!1,r=e?.fontColor??null;if(!o&&!i&&!s&&!r&&!t)return null;const a={};return o&&(a.bold=!0),i&&(a.italic=!0),s&&(a.underline=!0),r?a.color={argb:Km(r)}:t&&(a.color={argb:Xhe}),Object.keys(a).length>0?a:null}function ice(n,e=null){let t=null;return e?.backgroundColor?t=Km(e.backgroundColor):n?.readOnly===!0&&(t=Khe),t?{type:"pattern",pattern:"solid",fgColor:{argb:t}}:null}function sce(n,e){return!n||!e||!(n.type==="dropdown"||n.type==="autocomplete")||!Array.isArray(n.source)?null:{type:"list",allowBlank:!0,formulae:[e]}}const rce=Date.UTC(1899,11,30),ace=864e5;function lce(n){const e=Date.UTC(n.getFullYear(),n.getMonth(),n.getDate());return Math.round((e-rce)/ace)}function hce(n){if(!n)return null;const e=String(n).match(/^(\d{4})-(\d{2})-(\d{2})$/);if(!e)return null;const t=parseInt(e[1],10),o=parseInt(e[2],10),i=parseInt(e[3],10),s=new Date(t,o-1,i);return Number.isNaN(s.getTime())?null:lce(s)}function cce(n){if(!n)return null;const e=String(n).trim(),t=e.match(/^(\d{1,2}):(\d{2})(?::(\d{2}))?$/);if(t){const i=parseInt(t[1],10),s=parseInt(t[2],10),r=t[3]?parseInt(t[3],10):0;return i>23||s>59||r>59?null:(i*3600+s*60+r)/86400}const o=e.match(/^(\d{1,2}):(\d{2})(?::(\d{2}))?\s*(AM|PM)$/i);if(o){let i=parseInt(o[1],10);const s=parseInt(o[2],10),r=o[3]?parseInt(o[3],10):0,a=o[4].toUpperCase();return i>12||s>59||r>59?null:(a==="AM"&&i===12?i=0:a==="PM"&&i!==12&&(i+=12),(i*3600+s*60+r)/86400)}return null}function dce(){return"mm-dd-yy"}function uce(){return"h:mm:ss"}function fce(n){return!n||typeof n!="string"?null:n.replace(/0,0/g,"#,##0")}function gce(n,e){try{const t=new Intl.NumberFormat(e||"en",{style:"currency",currency:n,minimumFractionDigits:0,maximumFractionDigits:0}).formatToParts(0),o=t.find(a=>a.type==="currency")?.value??n,i=t.findIndex(a=>a.type==="currency"),s=t.findIndex(a=>a.type==="integer"),r=i<s;return{symbol:o,isPrefix:r}}catch{return{symbol:n,isPrefix:!0}}}function pce(n,e){if(!n)return null;if(n.pattern)return fce(n.pattern);const{style:t,currency:o,minimumFractionDigits:i=0,maximumFractionDigits:s,useGrouping:r=!0}=n,a=s??i,l=a>0?`.${"0".repeat(a)}`:"",h=r!==!1?"#,##0":"0";if(t==="percent")return`${h}${l}%`;if(t==="currency"&&o){const{symbol:c,isPrefix:d}=gce(o,e);return d?`${c}${h}${l}`:`${h}${l}${c}`}return`${h}${l}`}function mce(n,e){if(e.has(n))throw new TypeError("Cannot initialize the same private elements twice on an object")}function cn(n,e,t){if(!e.has(n))throw new TypeError("attempted to get private field on non-instance");return t}function In(n,e){mce(n,e),e.add(n)}const wce=7,bce=.75,Cce=5;var qv=new WeakSet,OU=new WeakSet,DU=new WeakSet,NU=new WeakSet,PU=new WeakSet,hC=new WeakSet,LU=new WeakSet,WU=new WeakSet,$U=new WeakSet,FU=new WeakSet,AD=new WeakSet,BU=new WeakSet,VU=new WeakSet,zU=new WeakSet,UU=new WeakSet,YU=new WeakSet,GU=new WeakSet,jU=new WeakSet,qU=new WeakSet,KU=new WeakSet,XU=new WeakSet;class yce extends T_{static get BINARY(){return!0}get binary(){return!0}static get DEFAULT_OPTIONS(){return{mimeType:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",fileExtension:"xlsx",bom:!1,engine:null,compression:null,conditionalFormatting:[],exportFormulas:!1,headerStyle:{backgroundColor:"#F2F2F2",border:{style:"thin"}}}}async export(){const{engine:e}=this.options;(!e||typeof e.Workbook!="function")&&U("Missing or invalid ExcelJS engine. Pass the ExcelJS module via the `engines` option in the exportFile plugin settings: `exportFile: { engines: { xlsx: ExcelJS } }`.");const{sheets:t}=this.options;(t&&t.length>0?new Set(t.map(s=>s.instance.rootDocument)):new Set([this.dataProvider.hot.rootDocument])).forEach(s=>Zhe(s));const i=new e.Workbook;if(t&&t.length>0){const s=new Set;t.forEach(r=>{const a=new MU(r.instance),l="columnHeaders"in r&&!("colHeaders"in r)?{...r,colHeaders:r.columnHeaders}:r,h={...this.options,...l};a.setOptions(h);const c=r.name||"Sheet";let d=c,u=1;for(;s.has(d);)d=`${c}${u}`,u+=1;s.add(d);const f=i.addWorksheet(d);cn(this,qv,OD).call(this,i,f,a,h)})}else{const s=i.addWorksheet("Sheet1");cn(this,qv,OD).call(this,i,s,this.dataProvider,this.options)}return i.xlsx.writeBuffer(cn(this,AD,Mce).call(this))}constructor(...e){super(...e),In(this,qv),In(this,OU),In(this,DU),In(this,NU),In(this,PU),In(this,hC),In(this,LU),In(this,WU),In(this,$U),In(this,FU),In(this,AD),In(this,BU),In(this,VU),In(this,zU),In(this,UU),In(this,YU),In(this,GU),In(this,jU),In(this,qU),In(this,KU),In(this,XU)}}function OD(n,e,t,o){const i=t.getData(),s=t.getCellsMeta(),r=cn(this,XU,$ce).call(this,n,s),a=t.getCellElements(),l=t.getColumnHeaders(),h=t.getColumnHeadersClassNames(),c=t.getRowHeaders(),d=t.getColumnsWidths(),u=t.getRowsHeights(),f=t.getMergeCells(),p=t.getFrozenRows(),C=t.getFrozenColumns(),_=t.getNestedColumnHeaders(),S=t.getLayoutDirection()==="rtl",{exportFormulas:T}=o,P=new Map;t.getColumnSummaries().forEach(Re=>{P.set(`${Re.destRow}:${Re.destCol}`,Re)});const V=T?t.getSourceData():null,D=T?t.getFormulasSeparator():",",I=l.length>0,G=c.length>0,z=_!==null&&I;let Y=0;z?Y=_.length:I&&(Y=1);const te=Y+1,ee=G?2:1,be=T?t.getExcludedHiddenRows():null,me=T?t.getExcludedHiddenColumns():null,Ve=t.getHiddenRowDataIndices(),Ye=t.getHiddenColumnDataIndices(),{rootDocument:Me,rootWindow:Ge}=t.hot;cn(this,zU,Ace).call(this,e,d,G),Ye.length>0&&cn(this,UU,Oce).call(this,e,Ye,G),cn(this,GU,Nce).call(this,e,p,C,Y,G,S);const wt=cn(this,$U,Tce).call(this,o.headerStyle),on=cn(this,FU,xce).call(this,o.headerStyle);z?(cn(this,qU,Lce).call(this,e,_,G,ee,wt,on),cn(this,KU,Wce).call(this,e,_,G,ee)):I&&cn(this,jU,Pce).call(this,e,l,h,G,ee,wt,on);const q=!(P.size>0)&&s.some(Re=>Re.some(Se=>Se.readOnly===!0)),Ce={exportFormulas:T,formulasSeparator:D,dataRowOffset:te,dataColOffset:ee,excludedHiddenRows:be,excludedHiddenCols:me,summaryMap:P,sourceData:V,hasRowHeaders:G,headerFill:wt,headerBorder:on,hasReadOnlyCells:q,rootDocument:Me,rootWindow:Ge,validationMap:r,cellsMeta:s,cellElements:a,rowHeaders:c,rowsHeights:u};cn(this,OU,_ce).call(this,e,i,Ce),Ve.length>0&&cn(this,YU,Dce).call(this,e,Ve,te),q&&e.protect("",{selectLockedCells:!0,selectUnlockedCells:!0,formatColumns:!0,formatRows:!0,sort:!0,autoFilter:!0}),f.forEach(Re=>{const Se=Re.row+te,g=Re.col+ee,b=Se+Re.rowspan-1,v=g+Re.colspan-1;e.mergeCells(Se,g,b,v)});const{conditionalFormatting:$}=o;return $&&$.length>0&&cn(this,BU,Ice).call(this,e,$,te,ee,i.length,i[0]?.length??0),i.length}function _ce(n,e,t){for(let o=0;o<e.length;o++){const i=e[o],s=o+t.dataRowOffset,r=n.getRow(s);if(J(t.rowsHeights[o])&&(r.height=t.rowsHeights[o]*bce),t.hasRowHeaders){const a=r.getCell(1);a.value=t.rowHeaders[o]??null,t.headerFill&&(a.fill=t.headerFill),t.headerBorder&&(a.border=t.headerBorder)}cn(this,DU,Sce).call(this,r,i,o,t),r.commit()}}function Sce(n,e,t,o){for(let i=0;i<e.length;i++){const s=e[i],r=n.getCell(i+o.dataColOffset),a=o.cellsMeta[t][i],l=o.summaryMap.get(`${t}:${i}`),h=o.sourceData?.[t][i],{value:c,numFmt:d}=cn(this,PU,Rce).call(this,s,a,h,l,o);r.value=c,d&&(r.numFmt=d);const u=ece(o.cellElements[t][i],a.className,o.rootDocument,o.rootWindow);cn(this,NU,vce).call(this,r,a,u,o),o.hasReadOnlyCells&&(r.protection={locked:a.readOnly===!0})}}function vce(n,e,t,o){const i=AU(e);i&&(n.alignment=i);const s=nce(e);s&&(n.border=s);const r=oce(e,t);r&&(n.font=r);const a=ice(e,t);a&&(n.fill=a);const l=Array.isArray(e.source)?o.validationMap.get(JSON.stringify(e.source))??null:null,h=sce(e,l);h&&(n.dataValidation=h),e.comment?.value&&(n.note=String(e.comment.value))}function Rce(n,e,t,o,i){const{exportFormulas:s,formulasSeparator:r,dataRowOffset:a,dataColOffset:l,excludedHiddenRows:h,excludedHiddenCols:c}=i;if(o&&s){const d=Ghe(o,a,l),u=cn(this,hC,Kv).call(this,n,e);return{value:d?{...d,result:n}:u,numFmt:null}}if(s&&Yhe(t))return{value:{formula:qhe(t,r,a-1,l-1,h,c)},numFmt:null};if(e.type==="date"||e.type==="intl-date"){const d=hce(n);if(d!==null)return{value:d,numFmt:dce()}}if(e.type==="time"||e.type==="intl-time"){const d=cce(n);if(d!==null)return{value:d,numFmt:uce()}}return e.type==="checkbox"?{value:cn(this,LU,Ece).call(this,n,e),numFmt:null}:e.type==="multiselect"?{value:cn(this,WU,kce).call(this,n),numFmt:null}:e.type==="numeric"?{value:cn(this,hC,Kv).call(this,n,e),numFmt:pce(e.numericFormat,e.locale)}:{value:cn(this,hC,Kv).call(this,n,e),numFmt:null}}function Kv(n,e){if(n==null)return null;if(e.type==="numeric"){if(typeof n=="number")return n;const t=Number(n);return Number.isNaN(t)?bt(n):t}return bt(n)}function Ece(n,e){const t=e.checkedTemplate??!0;return n===t}function kce(n){return Array.isArray(n)?n.length===0?null:n.map(e=>e!==null&&typeof e=="object"?e.value:e).join(", "):n==null?null:bt(n)}function Tce(n){return n?.backgroundColor?{type:"pattern",pattern:"solid",fgColor:{argb:Km(n.backgroundColor)}}:null}function xce(n){if(!n?.border)return null;const{style:e="thin",color:t}=n.border,o=t?{style:e,color:{argb:Km(t)}}:{style:e};return{top:o,bottom:o,left:o,right:o}}function Mce(){const{compression:n}=this.options;let e=null;return n===!0?e=6:typeof n=="number"&&n>=1&&n<=9&&(e=n),e===null?{}:{zip:{compression:"DEFLATE",compressionOptions:{level:e}}}}function Ice(n,e,t,o,i,s){i===0||s===0||e.forEach(({rows:r,cols:a,rules:l})=>{if(!l||l.length===0)return;const h=(r?r[0]:0)+t,c=(r?r[1]:i-1)+t,d=(a?a[0]:0)+o,u=(a?a[1]:s-1)+o;n.addConditionalFormatting({ref:cn(this,VU,Hce).call(this,h,d,c,u),rules:l})})}function Hce(n,e,t,o){return`${um(e)}${n}:${um(o)}${t}`}function Ace(n,e,t){t&&(n.getColumn(1).width=Cce);const o=t?1:0;for(let i=0;i<e.length;i++)n.getColumn(i+1+o).width=Math.max(e[i]/wce,1)}function Oce(n,e,t){const o=t?1:0;e.forEach(i=>{n.getColumn(i+1+o).hidden=!0})}function Dce(n,e,t){e.forEach(o=>{n.getRow(o+t).hidden=!0})}function Nce(n,e,t,o,i,s){const r=e>0||t>0;if(!r&&!s)return;const a={};s&&(a.rightToLeft=!0),r&&(a.state="frozen",a.xSplit=t+(i?1:0),a.ySplit=e+o),n.views=[a]}function Pce(n,e,t,o,i,s,r){const a=n.getRow(1);if(o){const l=a.getCell(1);l.value="",s&&(l.fill=s),r&&(l.border=r)}for(let l=0;l<e.length;l++){const h=a.getCell(l+i);h.value=e[l]??null;const c=HU(t[l]);c&&(h.alignment=c),s&&(h.fill=s),r&&(h.border=r)}a.commit()}function Lce(n,e,t,o,i,s){for(let r=0;r<e.length;r++){const a=e[r],l=n.getRow(r+1);if(t&&r===0){const c=l.getCell(1);c.value="",i&&(c.fill=i),s&&(c.border=s)}let h=o;a.forEach(c=>{const d=l.getCell(h);d.value=c.label??null;const u=HU(c.className);u&&(d.alignment=u),i&&(d.fill=i),s&&(d.border=s),h+=c.colspan}),l.commit()}}function Wce(n,e,t,o){t&&e.length>1&&n.mergeCells(1,1,e.length,1);for(let i=0;i<e.length;i++){const s=e[i],r=i+1;let a=o;s.forEach(l=>{l.colspan>1&&n.mergeCells(r,a,r,a+l.colspan-1),a+=l.colspan})}}function $ce(n,e){const t=new Map;for(let h=0;h<e.length;h++)for(let c=0;c<e[h].length;c++){const d=e[h][c];if((d.type==="dropdown"||d.type==="autocomplete")&&Array.isArray(d.source)&&d.source.length>0){const f=JSON.stringify(d.source);t.has(f)||t.set(f,d.source)}}if(t.size===0)return new Map;const o=new Set(n.worksheets.map(h=>h.name));let i="_HotValidation",s=1;for(;o.has(i);)i=`_HotValidation${s}`,s+=1;const r=n.addWorksheet(i);r.state="veryHidden";const a=new Map;let l=1;return t.forEach((h,c)=>{for(let p=0;p<h.length;p++){const C=h[p];r.getCell(p+1,l).value=Ln(C)?String(C.value):String(C)}const d=um(l),f=`'${i.replace(/'/g,"''")}'!$${d}$1:$${d}$${h.length}`;a.set(c,f),l+=1}),a}const Fce="csv",Bce="xlsx",ly={[Fce]:Bhe,[Bce]:yce};function Vce(n,e,t){return typeof ly[n]=="function"?new ly[n](e,t):null}function DD(n){const e=n.getSettings(),t=!!(e.colHeaders||e.nestedHeaders),o=!!e.rowHeaders,i=n.getSelectedRangeLast(),s={colHeaders:t,rowHeaders:o};return!i||i.isSingleCell()||i.from.row<0&&i.from.col<0?s:{...s,range:[Math.max(0,Math.min(i.from.row,i.to.row)),Math.max(0,Math.min(i.from.col,i.to.col)),Math.max(i.from.row,i.to.row),Math.max(i.from.col,i.to.col)]}}function zce(n){return{key:"export_file",name(){return this.getTranslatedPhrase($k)},hidden(){return this.getSettings()[hp]===void 0},submenu:{items:[{key:"export_file:csv",name(){return this.getTranslatedPhrase(Fk)},callback(){n.downloadFile("csv",DD(this))},disabled:!1},{key:"export_file:xlsx",name(){return this.getTranslatedPhrase(Bk)},callback(){n.downloadFileAsync("xlsx",DD(this)).catch(e=>{nl("ExportFile: XLSX export failed.",e)})},hidden(){return!n.supportsExportFormat("xlsx")}}]}}}function Uce(n){const{fragment:e}=Bc`
|
|
240
|
+
<div class="${Qi}__content">
|
|
241
|
+
<i class="${Qi}__icon">
|
|
242
|
+
<svg class="${Qi}__icon-svg"
|
|
243
|
+
xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 16 16">
|
|
244
|
+
<path stroke="currentColor" stroke-width="2" d="M15 8a7 7 0 1 1-3.5-6.062"></path>
|
|
245
|
+
</svg>
|
|
246
|
+
</i>
|
|
247
|
+
<div class="${Qi}__text">
|
|
248
|
+
<h2 class="${Qi}__title">${n}</h2>
|
|
249
|
+
</div>
|
|
250
|
+
</div>
|
|
251
|
+
`;return e}function Yce(n,e){if(e.has(n))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Xv(n,e,t){if(!e.has(n))throw new TypeError("attempted to get private field on non-instance");return t}function ND(n,e){Yce(n,e),e.add(n)}const hp="exportFile",Gce=240;var PD=new WeakSet,Zv=new WeakSet;class jce extends rt{static get PLUGIN_KEY(){return hp}static get PLUGIN_PRIORITY(){return Gce}static get SETTING_KEYS(){return[hp]}isEnabled(){return!0}enablePlugin(){this.enabled||(this.addHook("afterContextMenuDefaultOptions",(...e)=>Xv(this,PD,qce).call(this,...e)),super.enablePlugin())}disablePlugin(){super.disablePlugin()}exportAsString(e,t={}){const o=this._createTypeFormatter(e,t);return o.binary&&U(`Export format type "${e}" cannot be exported as a string (binary format).`),o.export()}exportAsBlob(e,t={}){const o=this._createTypeFormatter(e,t);return o.binary&&U(`exportAsBlob() does not support binary formats such as "${e}". Use exportAsBlobAsync() instead.`),this._createBlob(o)}async exportAsBlobAsync(e,t={}){return this._createBlob(this._createTypeFormatter(e,t))}downloadFile(e,t={}){const o=this._createTypeFormatter(e,t);o.binary&&U(`downloadFile() does not support binary formats such as "${e}". Use downloadFileAsync() instead.`);const i=`${o.options.filename}.${o.options.fileExtension}`;Xv(this,Zv,LD).call(this,this._createBlob(o),i)}async downloadFileAsync(e,t={}){const o=this._createTypeFormatter(e,t),i=this.hot.getPlugin("dialog"),s=i?.isEnabled(),{rootWindow:r}=this.hot,a=`${o.options.filename}.${o.options.fileExtension}`,l=async()=>{const h=await Promise.resolve(this._createBlob(o));Xv(this,Zv,LD).call(this,h,a)};if(s&&o.binary){i.show({content:Uce(this.hot.getTranslatedPhrase(QT)),customClassName:Qi,background:"semi-transparent",closable:!1,animation:!1}),await new Promise(h=>{r.requestAnimationFrame(()=>{r.requestAnimationFrame(h)})});try{await l()}finally{i.hide()}return}await l()}supportsExportFormat(e){if(!ly[e])return!1;if(e==="xlsx"){const t=this.hot.getSettings()[hp];return ne(t)&&ne(t.engines)&&!!t.engines.xlsx}return!0}_createTypeFormatter(e,t={}){ly[e]||U(`Export format type "${e}" is not supported.`);const o=this.hot.getSettings()[hp],s=(ne(o)&&ne(o.engines)?o.engines:void 0)?.[e],r=s!==void 0?{engine:s,...t}:t;return Vce(e,new MU(this.hot),r)}_createBlob(e){typeof Blob>"u"&&U("Blob is not available in this environment.");const t=e.export();return typeof t?.then=="function"?t.then(o=>new Blob([o],{type:e.options.mimeType})):new Blob([t],{type:`${e.options.mimeType};charset=${e.options.encoding}`})}constructor(...e){super(...e),ND(this,PD),ND(this,Zv)}}function qce(n){n.items.push({name:"---------"},zce(this))}function LD(n,e){const{rootDocument:t,rootWindow:o}=this.hot,i=o.URL||o.webkitURL,s=i.createObjectURL(n),r=t.createElement("a");r.style.display="none",r.setAttribute("href",s),r.setAttribute("download",e),t.body.appendChild(r),r.dispatchEvent(new MouseEvent("click")),t.body.removeChild(r),this.hot._registerTimeout(()=>{i.revokeObjectURL(s)},100)}class Xm{getElements(){return this.elements}reset(){O(this.elements,e=>e.reset())}hide(){this.hidden=!0}show(){this.hidden=!1}isHidden(){return this.hot===null||this.hidden}restoreState(e){this.state&&this.setState(this.state.getValueAtIndex(e))}setState(){U("The state setting logic is not implemented")}saveState(e){this.state&&this.state.setValueAtIndex(e,this.getState())}getState(){U("The state gathering logic is not implemented")}destroy(){this.hot.columnIndexMapper.unregisterMap(this.stateId),this.clearLocalHooks(),O(this.elements,e=>e.destroy()),this.state=null,this.elements=null,this.hot=null}constructor(e,{id:t,stateless:o=!0}){this.elements=[],this.hidden=!1,this.stateId="",this.hot=e,this.id=t,this.stateId=`Filters.component.${this.id}`,this.state=o?null:this.hot.columnIndexMapper.registerMap(this.stateId,new Wy)}}Ct(Xm,$n);const fm={};function Ts(n,e){fm[n]||U(`Filter condition "${n}" does not exist.`);const{condition:t,descriptor:o}=fm[n];let i=e;return o.inputValuesDecorator&&(i=o.inputValuesDecorator(i)),function(s){return t.apply(s.meta.instance,[].concat([s],[i]))}}function Ec(n){return fm[n]||U(`Filter condition "${n}" does not exist.`),fm[n].descriptor}function Ht(n,e,t){t.key=n,fm[n]={condition:e,descriptor:t}}const Kn="none";function Kce(){return!0}Ht(Kn,Kce,{name:$y,inputsCount:0,showOperators:!1});const mc="empty";function Xce(n){return ht(n.value)}Ht(mc,Xce,{name:mT,inputsCount:0,showOperators:!0});const Ru="not_empty";function Zce(n,e){return!Ts(mc,e)(n)}Ht(Ru,Zce,{name:wT,inputsCount:0,showOperators:!0});const wc="eq";function Qce(n,[e]){return bt(n.value).toLocaleLowerCase(n.meta.locale)===bt(e)}Ht(wc,Qce,{name:bT,inputsCount:1,showOperators:!0});const Eu="neq";function Jce(n,e){return!Ts(wc,e)(n)}Ht(Eu,Jce,{name:CT,inputsCount:1,showOperators:!0});const ZU="gt";function ede(n,[e]){let t=e;return n.meta.type==="numeric"&&(t=parseFloat(t,10)),n.value>t}Ht(ZU,ede,{name:RT,inputsCount:1,showOperators:!0});const QU="gte";function tde(n,[e]){let t=e;return n.meta.type==="numeric"&&(t=parseFloat(t,10)),n.value>=t}Ht(QU,tde,{name:ET,inputsCount:1,showOperators:!0});const JU="lt";function nde(n,[e]){let t=e;return n.meta.type==="numeric"&&(t=parseFloat(t,10)),n.value<t}Ht(JU,nde,{name:kT,inputsCount:1,showOperators:!0});const e3="lte";function ode(n,[e]){let t=e;return n.meta.type==="numeric"&&(t=parseFloat(t,10)),n.value<=t}Ht(e3,ode,{name:TT,inputsCount:1,showOperators:!0});const CM="date_after";function ide(n,[e]){const t=Z(n.value,n.meta.dateFormat),o=Z(e,n.meta.dateFormat);return!t.isValid()||!o.isValid()?!1:t.diff(o)>=0}Ht(CM,ide,{name:Pm,inputsCount:1,showOperators:!0});const yM="date_before";function sde(n,[e]){const t=Z(n.value,n.meta.dateFormat),o=Z(e,n.meta.dateFormat);return!t.isValid()||!o.isValid()?!1:t.diff(o)<=0}Ht(yM,sde,{name:Lm,inputsCount:1,showOperators:!0});const hy="between";function rde(n,[e,t]){let o=e,i=t;if(n.meta.type==="numeric"){const s=parseFloat(o,10),r=parseFloat(i,10);o=Math.min(s,r),i=Math.max(s,r)}else if(n.meta.type==="date"){const s=Ts(yM,[i]),r=Ts(CM,[o]);return s(n)&&r(n)}return n.value>=o&&n.value<=i}Ht(hy,rde,{name:Nm,inputsCount:2,showOperators:!0});const t3="not_between";function ade(n,e){return!Ts(hy,e)(n)}Ht(t3,ade,{name:xT,inputsCount:2,showOperators:!0});const _0="begins_with";function lde(n,[e]){return bt(n.value).toLocaleLowerCase(n.meta.locale).startsWith(bt(e))}Ht(_0,lde,{name:yT,inputsCount:1,showOperators:!0});const S0="ends_with";function hde(n,[e]){return bt(n.value).toLocaleLowerCase(n.meta.locale).endsWith(bt(e))}Ht(S0,hde,{name:_T,inputsCount:1,showOperators:!0});const cy="contains";function cde(n,[e]){return bt(n.value).toLocaleLowerCase(n.meta.locale).indexOf(bt(e))>=0}Ht(cy,cde,{name:ST,inputsCount:1,showOperators:!0});const v0="not_contains";function dde(n,e){return!Ts(cy,e)(n)}Ht(v0,dde,{name:vT,inputsCount:1,showOperators:!0});const n3="date_tomorrow";function ude(n){const e=Z(n.value,n.meta.dateFormat);return e.isValid()?e.isSame(Z().subtract(-1,"days").startOf("day"),"d"):!1}Ht(n3,ude,{name:By,inputsCount:0});const o3="date_today";function fde(n){const e=Z(n.value,n.meta.dateFormat);return e.isValid()?e.isSame(Z().startOf("day"),"d"):!1}Ht(o3,fde,{name:Fy,inputsCount:0});const i3="date_yesterday";function gde(n){const e=Z(n.value,n.meta.dateFormat);return e.isValid()?e.isSame(Z().subtract(1,"days").startOf("day"),"d"):!1}Ht(i3,gde,{name:Vy,inputsCount:0});const _M="intl_date_before";function pde(n,[e]){const t=ta(n.value),o=ta(e);return t===null||o===null?!1:t<=o}Ht(_M,pde,{name:Lm,inputsCount:1,showOperators:!0,inputType:"date"});const SM="intl_date_after";function mde(n,[e]){const t=ta(n.value),o=ta(e);return t===null||o===null?!1:t>=o}Ht(SM,mde,{name:Pm,inputsCount:1,showOperators:!0,inputType:"date"});const s3="intl_date_between";function wde(n,[e,t]){const o=Ts(_M,[t]),i=Ts(SM,[e]);return o(n)&&i(n)}Ht(s3,wde,{name:Nm,inputsCount:2,showOperators:!0,inputType:"date"});const r3="intl_date_tomorrow";function bde(n){const e=ta(n.value);if(e===null)return!1;const t=new Date;return t.setDate(t.getDate()+1),e.getFullYear()===t.getFullYear()&&e.getMonth()===t.getMonth()&&e.getDate()===t.getDate()}Ht(r3,bde,{name:By,inputsCount:0,inputType:"date"});const a3="intl_date_today";function Cde(n){const e=ta(n.value);if(e===null)return!1;const t=new Date;return e.getFullYear()===t.getFullYear()&&e.getMonth()===t.getMonth()&&e.getDate()===t.getDate()}Ht(a3,Cde,{name:Fy,inputsCount:0,inputType:"date"});const l3="intl_date_yesterday";function yde(n){const e=ta(n.value);if(e===null)return!1;const t=new Date;return t.setDate(t.getDate()-1),e.getFullYear()===t.getFullYear()&&e.getMonth()===t.getMonth()&&e.getDate()===t.getDate()}Ht(l3,yde,{name:Vy,inputsCount:0,inputType:"date"});const vM="intl_time_before";function _de(n,[e]){const t=Kc(n.value),o=Kc(e);return t===null||o===null?!1:t<=o}Ht(vM,_de,{name:Lm,inputsCount:1,showOperators:!0,inputType:"time"});const RM="intl_time_after";function Sde(n,[e]){const t=Kc(n.value),o=Kc(e);return t===null||o===null?!1:t>=o}Ht(RM,Sde,{name:Pm,inputsCount:1,showOperators:!0,inputType:"time"});const h3="intl_time_between";function vde(n,[e,t]){const o=Ts(vM,[t]),i=Ts(RM,[e]);return o(n)&&i(n)}Ht(h3,vde,{name:Nm,inputsCount:2,showOperators:!0,inputType:"time"});KG();function Rde(n,e){let t=n;return t===""&&(t=`(${e})`),t}function Zm(n){const e=new Set(n);return function(t){return e.has(t)}}function EM(n){return n??""}function R0(n){return Array.from(new Set(n)).map(e=>EM(e)).sort((e,t)=>typeof e=="number"&&typeof t=="number"?e-t:e===t?0:e>t?1:-1)}function WD(n,e,t,o){const i=[],s=n===e;let r;return s||(r=Zm(e)),n.forEach(a=>{let l=!1;(s||r(a))&&(l=!0);const h={checked:l,value:a,visualValue:Rde(a,t)};o&&o(h),i.push(h)}),i}const nh="by_value";function Ede(n,[e]){return e(n.value)}Ht(nh,Ede,{name:"By value",inputsCount:0,inputValuesDecorator([n]){return[Zm(n)]},showOperators:!1});const gm={};function kde(n){gm[n]||U(`Operation with id "${n}" does not exist.`);const e=gm[n].func;return function(t,o){return e(t,o)}}function Tde(n){return gm[n].name}function kM(n,e,t){gm[n]={name:e,func:t}}const hh="conjunction",xde=HT;function Mde(n,e){return n.every(t=>t.func(e))}kM(hh,xde,Mde);const dy="disjunction",Ide=zy;function Hde(n,e){return n.some(t=>t.func(e))}kM(dy,Ide,Hde);const TM="disjunctionWithExtraCondition",Ade=zy;function Ode(n,e){return n.length<3&&U("Operation doesn't work on less then three conditions."),n.slice(0,n.length-1).some(t=>t.func(e))&&n[n.length-1].func(e)}kM(TM,Ade,Ode);const Dde="numeric",c3="text",Nde="date",Pde="intl-date",Lde="intl-time",$D={[Dde]:[Kn,He,mc,Ru,He,wc,Eu,He,ZU,QU,JU,e3,hy,t3],[c3]:[Kn,He,mc,Ru,He,wc,Eu,He,_0,S0,He,cy,v0],[Nde]:[Kn,He,mc,Ru,He,wc,Eu,He,yM,CM,hy,He,n3,o3,i3],[Pde]:[Kn,He,mc,Ru,He,wc,Eu,He,_M,SM,s3,He,r3,a3,l3],[Lde]:[Kn,He,mc,Ru,He,wc,Eu,He,He,_0,S0,He,cy,v0,He,vM,RM,h3]};function Wde(n){const e=[];let t=n;return $D[t]||(t=c3),O($D[t],o=>{let i;o===He?i={name:He}:i=Jr(Ec(o)),e.push(i)}),e}const Qv="built",Jv="building",FD=["click","input","keydown","keypress","keyup","focus","blur","change"];let pr=class d3{static get DEFAULTS(){return Jr({className:"",value:"",tagName:"div",children:[],wrapIt:!0})}setValue(e){this.options.value=e,this.update()}getValue(){return this.options.value}get element(){return this.buildState===Jv?this._element:this.buildState===Qv?(this.update(),this._element):(this.buildState=Jv,this.build(),this.buildState=Qv,this._element)}isBuilt(){return this.buildState===Qv}translateIfPossible(e){return typeof e=="string"&&e.startsWith(pi)?this.hot.getTranslatedPhrase(e):e}build(){const e=(t,o)=>{this.eventManager.addEventListener(t,o,i=>this.runLocalHooks(o,i,this))};if(this.buildState||(this.buildState=Jv),this._element.setAttribute("data-hot-input",!0),this.options.tabIndex!==void 0&&this._element.setAttribute("tabindex",this.options.tabIndex),this.options.role!==void 0&&this._element.setAttribute("role",this.options.role),this.options.className&&B(this._element,this.options.className),this.options.children.length)O(this.options.children,t=>this._element.appendChild(t.element));else if(this.options.wrapIt){const t=this.hot.rootDocument.createElement(this.options.tagName);t.setAttribute("data-hot-input",!0),tt(this.options,(o,i)=>{t[i]!==void 0&&i!=="className"&&i!=="tagName"&&i!=="children"&&(t[i]=this.translateIfPossible(o))}),this._element.appendChild(t),O(FD,o=>e(t,o))}else O(FD,t=>e(this._element,t))}update(){}reset(){this.options.value="",this.update()}show(){this.element.style.display=""}hide(){this.element.style.display="none"}focus(){}destroy(){this.eventManager.destroy(),this.eventManager=null,this.hot=null,this._element.parentNode&&this._element.parentNode.removeChild(this._element),this._element=null}constructor(e,t){this.eventManager=new Wi(this),this.hot=e,this.options=Wn(d3.DEFAULTS,t),this._element=this.hot.rootDocument.createElement(this.options.wrapIt?"div":this.options.tagName)}};Ct(pr,$n);function u3(n,e){if(e.has(n))throw new TypeError("Cannot initialize the same private elements twice on an object")}function $de(n,e){return e.get?e.get.call(n):e.value}function Fde(n,e,t){if(e.set)e.set.call(n,t);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=t}}function f3(n,e,t){if(!e.has(n))throw new TypeError("attempted to "+t+" private field on non-instance");return e.get(n)}function Zw(n,e){var t=f3(n,e,"get");return $de(n,t)}function Bde(n,e,t){u3(n,e),e.set(n,t)}function Vde(n,e,t){var o=f3(n,e,"set");return Fde(n,o,t),t}function BD(n,e,t){if(!e.has(n))throw new TypeError("attempted to get private field on non-instance");return t}function zde(n,e){u3(n,e),e.add(n)}var Nd=new WeakMap,eR=new WeakSet;class ch extends pr{static get DEFAULTS(){return Jr({placeholder:"",type:"text",tagName:"input",tabIndex:-1})}registerHooks(){this.addLocalHook("keyup",e=>BD(this,eR,VD).call(this,e)),this.addLocalHook("input",e=>BD(this,eR,VD).call(this,e))}build(){super.build();const e=this.hot.rootDocument.createElement("div");Vde(this,Nd,this._element.firstChild),B(this._element,"htUIInput"),B(e,"htUIInputIcon"),this._element.appendChild(e),this.update()}update(){this.isBuilt()&&(Zw(this,Nd).type=this.options.type,Zw(this,Nd).placeholder=this.translateIfPossible(this.options.placeholder),Zw(this,Nd).value=this.translateIfPossible(this.options.value))}focus(){this.isBuilt()&&Zw(this,Nd).focus()}constructor(e,t){super(e,Wn(ch.DEFAULTS,t)),zde(this,eR),Bde(this,Nd,{writable:!0,value:void 0}),this.registerHooks()}}function VD(n){this.options.value=n.target.value}function g3(n,e){if(e.has(n))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Ude(n,e){return e.get?e.get.call(n):e.value}function Yde(n,e,t){if(e.set)e.set.call(n,t);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=t}}function p3(n,e,t){if(!e.has(n))throw new TypeError("attempted to "+t+" private field on non-instance");return e.get(n)}function un(n,e){var t=p3(n,e,"get");return Ude(n,t)}function ug(n,e,t){g3(n,e),e.set(n,t)}function kl(n,e,t){var o=p3(n,e,"set");return Yde(n,o,t),t}function tR(n,e,t){if(!e.has(n))throw new TypeError("attempted to get private field on non-instance");return t}function nR(n,e){g3(n,e),e.add(n)}var Vn=new WeakMap,fg=new WeakMap,Qw=new WeakMap,oR=new WeakMap,Jw=new WeakMap,zD=new WeakSet,UD=new WeakSet,YD=new WeakSet;class pm extends pr{static get DEFAULTS(){return Jr({className:"htUISelect",wrapIt:!1,tabIndex:-1})}getMenu(){return un(this,Vn)}registerHooks(){this.addLocalHook("click",()=>tR(this,YD,qde).call(this))}setItems(e){kl(this,fg,this.translateNames(e)),un(this,Vn)&&un(this,Vn).setMenuItems(un(this,fg))}translateNames(e){return O(e,t=>{t.name=this.translateIfPossible(t.name)}),e}build(){super.build(),kl(this,Vn,new bf(this.hot,{className:"htSelectUI htFiltersConditionsMenu",keepInViewport:!1,standalone:!0,container:this.options.menuContainer})),un(this,Vn).setMenuItems(un(this,fg));const e=new pr(this.hot,{className:"htUISelectCaption"}),t=new pr(this.hot,{className:"htUISelectDropdown"});kl(this,Qw,e),kl(this,oR,e.element),kl(this,Jw,t),this.hot.getSettings().ariaTags&&(fe(t.element,[al()]),fe(this._element,[j$()])),O([e,t],o=>this._element.appendChild(o.element)),un(this,Vn).addLocalHook("select",o=>tR(this,zD,Gde).call(this,o)),un(this,Vn).addLocalHook("afterClose",()=>tR(this,UD,jde).call(this)),this.update()}update(){if(!this.isBuilt())return;let e;this.options.value?e=this.options.value.name:e=un(this,Vn).hot.getTranslatedPhrase($y),un(this,oR).textContent=e,super.update()}openOptions(){const e=this.element.getBoundingClientRect();un(this,Vn)&&(un(this,Vn).open(),un(this,Vn).setPosition({left:this.hot.isLtr()?e.left-5:e.left-31,top:e.top-1,width:e.width,height:e.height}),un(this,Vn).getNavigator().toFirstItem(),un(this,Vn).getKeyboardShortcutsCtrl().addCustomShortcuts([{keys:[["Tab"],["Shift","Tab"]],callback:t=>{this.closeOptions(),this.runLocalHooks("tabKeydown",t)}},{keys:[["Control/Meta","A"]],callback:()=>!1}]))}closeOptions(){un(this,Vn)&&un(this,Vn).close()}focus(){this.isBuilt()&&this.element.focus()}destroy(){un(this,Vn)&&(un(this,Vn).destroy(),kl(this,Vn,null)),un(this,Qw)&&un(this,Qw).destroy(),un(this,Jw)&&un(this,Jw).destroy(),super.destroy()}constructor(e,t){super(e,Wn(pm.DEFAULTS,t)),nR(this,zD),nR(this,UD),nR(this,YD),ug(this,Vn,{writable:!0,value:void 0}),ug(this,fg,{writable:!0,value:void 0}),ug(this,Qw,{writable:!0,value:void 0}),ug(this,oR,{writable:!0,value:void 0}),ug(this,Jw,{writable:!0,value:void 0}),kl(this,Vn,null),kl(this,fg,[]),this.registerHooks()}}function Gde(n){n.name!==He&&(this.options.value=n,this.update(),this.runLocalHooks("select",this.options.value))}function jde(){this.runLocalHooks("afterClose")}function qde(){this.openOptions()}function Kde(n,e){if(e.has(n))throw new TypeError("Cannot initialize the same private elements twice on an object")}function GD(n,e,t){if(!e.has(n))throw new TypeError("attempted to get private field on non-instance");return t}function jD(n,e){Kde(n,e),e.add(n)}var qD=new WeakSet,KD=new WeakSet;class E0 extends Xm{registerHooks(){this.getSelectElement().addLocalHook("select",e=>GD(this,qD,Xde).call(this,e)).addLocalHook("afterClose",()=>this.runLocalHooks("afterClose")).addLocalHook("tabKeydown",e=>this.runLocalHooks("selectTabKeydown",e)),O(this.getInputElements(),e=>{e.addLocalHook("keydown",t=>GD(this,KD,Zde).call(this,t))})}setState(e){if(this.reset(),!e)return;const t=Jr(e.command);t.name.startsWith(Cn)&&(t.name=this.hot.getTranslatedPhrase(t.name)),this.getSelectElement().setValue(t),O(e.args,(o,i)=>{if(i>t.inputsCount-1)return!1;const s=this.getInputElement(i);s.setValue(o),s[t.inputsCount>i?"show":"hide"](),i||this.hot._registerTimeout(()=>s.focus(),10)})}getState(){const e=this.getSelectElement().getValue()||Ec(Kn),t=[];return O(this.getInputElements(),(o,i)=>{e.inputsCount>i&&t.push(o.getValue())}),{command:e,args:t}}updateState(e,t){const o=Ec(e?e.name:Kn);this.state.setValueAtIndex(t,{command:o,args:e?e.args:[]}),e||O(this.getInputElements(),i=>i.setValue(null))}getSelectElement(){return this.elements.filter(e=>e instanceof pm)[0]}getInputElement(e=0){return this.getInputElements()[e]}getInputElements(){return this.elements.filter(e=>e instanceof ch)}getMenuItemDescriptor(){return{key:this.id,name:this.name,isCommand:!1,disableSelection:!0,hidden:()=>this.isHidden(),renderer:(e,t,o,i,s,r)=>{B(t.parentNode,"htFiltersMenuCondition"),this.addSeparator&&B(t.parentNode,"border");const a=this.hot.rootDocument.createElement("div");return B(a,"htFiltersMenuLabel"),a.textContent=r,t.appendChild(a),t.parentElement.hasAttribute("ghost-table")||O(this.elements,l=>t.appendChild(l.element)),t}}}reset(){const e=this.hot.getPlugin("filters").getSelectedColumn();let t=[Ec(Kn)];if(e!==null){const{visualIndex:o}=e;t=Wde(this.hot.getDataType(0,o,this.hot.countRows(),o))}O(this.getInputElements(),o=>o.hide()),this.getSelectElement().setItems(t),super.reset(),this.getSelectElement().setValue(t[0])}constructor(e,t){super(e,{id:t.id,stateless:!1}),jD(this,qD),jD(this,KD),this.name="",this.addSeparator=!1,this.name=t.name,this.addSeparator=t.addSeparator,this.elements.push(new pm(this.hot,{menuContainer:t.menuContainer})),this.elements.push(new ch(this.hot,{placeholder:LT})),this.elements.push(new ch(this.hot,{placeholder:WT})),this.registerHooks()}}function Xde(n){O(this.getInputElements(),(e,t)=>{e[n.inputsCount>t?"show":"hide"](),e.options.type=n.inputType??"text",t===0&&this.hot._registerTimeout(()=>e.focus(),10)}),this.runLocalHooks("change",n)}function Zde(n){Xu(n.keyCode,"ESCAPE")&&(this.runLocalHooks("cancel"),es(n))}function Qde(n,e){if(e.has(n))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Jde(n,e){return e.get?e.get.call(n):e.value}function eue(n,e,t){if(e.set)e.set.call(n,t);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=t}}function m3(n,e,t){if(!e.has(n))throw new TypeError("attempted to "+t+" private field on non-instance");return e.get(n)}function gg(n,e){var t=m3(n,e,"get");return Jde(n,t)}function XD(n,e,t){Qde(n,e),e.set(n,t)}function ZD(n,e,t){var o=m3(n,e,"set");return eue(n,o,t),t}var Pd=new WeakMap,iR=new WeakMap;class uy extends pr{static get DEFAULTS(){return Jr({type:"radio",tagName:"input",className:"htUIRadio",label:{}})}build(){super.build();const e=this.hot.rootDocument.createElement("label");e.textContent=this.translateIfPossible(this.options.label.textContent),e.htmlFor=this.translateIfPossible(this.options.label.htmlFor),ZD(this,iR,e),ZD(this,Pd,this._element.firstChild),gg(this,Pd).checked=this.options.checked,this._element.appendChild(e),this.update()}update(){this.isBuilt()&&(gg(this,iR).textContent=this.translateIfPossible(this.options.label.textContent))}isChecked(){return this.isBuilt()?gg(this,Pd).checked:!1}setChecked(e=!0){this.isBuilt()&&(gg(this,Pd).checked=e)}focus(){this.isBuilt()&&gg(this,Pd).focus()}constructor(e,t){super(e,Wn(uy.DEFAULTS,t)),XD(this,Pd,{writable:!0,value:void 0}),XD(this,iR,{writable:!0,value:void 0})}}function tue(n,e){if(e.has(n))throw new TypeError("Cannot initialize the same private elements twice on an object")}function nue(n,e,t){if(!e.has(n))throw new TypeError("attempted to get private field on non-instance");return t}function oue(n,e){tue(n,e),e.add(n)}const QD=0;var JD=new WeakSet;class iue extends Xm{getMenuItemDescriptor(){return{key:this.id,name:this.name,isCommand:!1,disableSelection:!0,hidden:()=>this.isHidden(),renderer:(e,t)=>(B(t.parentNode,"htFiltersMenuOperators"),O(this.elements,o=>t.appendChild(o.element)),t)}}buildOperatorsElement(){const e=[hh,dy];O(e,t=>{const o=new uy(this.hot,{name:"operator",label:{htmlFor:t,textContent:Tde(t)},value:t,checked:t===e[QD],id:t});o.addLocalHook("change",i=>nue(this,JD,sue).call(this,i)),this.elements.push(o)})}setChecked(e){this.elements.length<e&&U(pt`Radio button with index ${e} doesn't exist.`),O(this.elements,(t,o)=>{t.setChecked(o===e)})}getActiveOperationId(){const e=this.elements.find(t=>t instanceof uy&&t.isChecked());return e?e.getValue():hh}getState(){return this.getActiveOperationId()}setState(e){this.reset(),e&&this.getActiveOperationId()!==e&&O(this.elements,t=>{t.setChecked(t.getValue()===e)})}updateState(e=hh,t){let o=e;o===TM&&(o=dy),this.state.setValueAtIndex(t,o)}reset(){this.setChecked(QD)}constructor(e,t){super(e,{id:t.id,stateless:!1}),oue(this,JD),this.name="",this.name=t.name,this.buildOperatorsElement()}}function sue(n){this.setState(n.target.value)}function rue(n,e){if(e.has(n))throw new TypeError("Cannot initialize the same private elements twice on an object")}function aue(n,e){return e.get?e.get.call(n):e.value}function lue(n,e,t){if(e.set)e.set.call(n,t);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=t}}function w3(n,e,t){if(!e.has(n))throw new TypeError("attempted to "+t+" private field on non-instance");return e.get(n)}function sR(n,e){var t=w3(n,e,"get");return aue(n,t)}function hue(n,e,t){rue(n,e),e.set(n,t)}function cue(n,e,t){var o=w3(n,e,"set");return lue(n,o,t),t}var pg=new WeakMap;class mm extends pr{static get DEFAULTS(){return Jr({href:"#",tagName:"a",tabIndex:-1,role:"button"})}build(){super.build(),cue(this,pg,this._element.firstChild)}update(){this.isBuilt()&&(sR(this,pg).textContent=this.translateIfPossible(this.options.textContent))}focus(){this.isBuilt()&&sR(this,pg).focus()}activate(){sR(this,pg).click()}constructor(e,t){super(e,Wn(mm.DEFAULTS,t)),hue(this,pg,{writable:!0,value:void 0})}}function b3(n,e){if(e.has(n))throw new TypeError("Cannot initialize the same private elements twice on an object")}function due(n,e){return e.get?e.get.call(n):e.value}function uue(n,e,t){if(e.set)e.set.call(n,t);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=t}}function C3(n,e,t){if(!e.has(n))throw new TypeError("attempted to "+t+" private field on non-instance");return e.get(n)}function Pe(n,e){var t=C3(n,e,"get");return due(n,t)}function Ld(n,e,t){b3(n,e),e.set(n,t)}function hs(n,e,t){var o=C3(n,e,"set");return uue(n,o,t),t}function eb(n,e,t){if(!e.has(n))throw new TypeError("attempted to get private field on non-instance");return t}function tb(n,e){b3(n,e),e.add(n)}const eN="multipleSelect.itemBox";var ws=new WeakMap,Qt=new WeakMap,rR=new WeakMap,ka=new WeakMap,Tl=new WeakMap,xl=new WeakMap,tN=new WeakSet,nN=new WeakSet,oN=new WeakSet,iN=new WeakSet;class wm extends pr{static get DEFAULTS(){return Jr({className:"htUIMultipleSelect",value:[]})}getItemsBox(){return Pe(this,Qt)}registerHooks(){Pe(this,ka).addLocalHook("keydown",e=>eb(this,nN,gue).call(this,e)),Pe(this,ka).addLocalHook("input",e=>eb(this,tN,fue).call(this,e)),Pe(this,Tl).addLocalHook("click",e=>eb(this,oN,pue).call(this,e)),Pe(this,xl).addLocalHook("click",e=>eb(this,iN,mue).call(this,e))}setItems(e){hs(this,ws,e),Pe(this,Qt)?.loadData(Pe(this,ws))}setLocale(e){hs(this,rR,e)}getLocale(){return Pe(this,rR)}getItems(){return[...Pe(this,ws)]}getValue(){return bue(Pe(this,ws))}getSearchInputElement(){return Pe(this,ka)}getSelectAllElement(){return Pe(this,Tl)}getClearAllElement(){return Pe(this,xl)}isSelectedAllValues(){return Pe(this,ws).length===this.getValue().length}build(){super.build();const{rootDocument:e}=this.hot,t=e.createElement("div"),o=new pr(this.hot,{className:"htUISelectionControls",children:[Pe(this,Tl),Pe(this,xl)]});this._element.appendChild(Pe(this,ka).element),this._element.appendChild(o.element),this._element.appendChild(t),Pe(this,Qt)?.destroy(),B(t,"htUIMultipleSelectHot"),hs(this,Qt,new this.hot.constructor(t,{data:[[]],columns:[{data:"checked",type:"checkbox",label:{property:"visualValue",position:"after"}}],beforeRenderer:(r,a,l,h,c,d)=>{r.title=d.instance.getDataAtRowProp(a,d.label.property)},afterListen:()=>{this.runLocalHooks("focus",this)},beforeOnCellMouseUp:()=>{Pe(this,Qt).listen()},modifyColWidth:r=>{const a=Pe(this,Qt).container.scrollWidth-xn(e);return r!==void 0&&r<a?a:r},autoColumnSize:!0,autoRowSize:!1,hiddenRows:!0,maxCols:1,autoWrapCol:!0,height:110,copyPaste:!1,disableVisualSelection:"area",fillHandle:!1,fragmentSelection:"cell",tabMoves:{row:1,col:0},themeName:this.hot.getCurrentThemeName(),layoutDirection:this.hot.isRtl()?"rtl":"ltr"})),Pe(this,Qt).init();const s=Pe(this,Qt).getShortcutManager().getContext("grid");s.removeShortcutsByKeys(["Tab"]),s.removeShortcutsByKeys(["Shift","Tab"]),s.addShortcut({keys:[["Escape"]],callback:r=>{this.runLocalHooks("keydown",r,this)},group:eN}),s.addShortcut({keys:[["Tab"],["Shift","Tab"]],callback:r=>{Pe(this,Qt).deselectCell(),this.runLocalHooks("keydown",r,this),this.runLocalHooks("listTabKeydown",r,this)},group:eN})}focus(){this.isBuilt()&&Pe(this,Qt).listen()}reset(){Pe(this,ka).reset(),Pe(this,Tl).reset(),Pe(this,xl).reset()}update(){!this.isBuilt()||Pe(this,Qt).rootElement.offsetHeight===0||(Pe(this,Qt).updateSettings({data:wue(Pe(this,ws),this.options.value)}),super.update())}destroy(){Pe(this,Qt)?.destroy(),Pe(this,ka).destroy(),Pe(this,xl).destroy(),Pe(this,Tl).destroy(),hs(this,ka,null),hs(this,xl,null),hs(this,Tl,null),hs(this,Qt,null),hs(this,ws,null),super.destroy()}constructor(e,t){super(e,Wn(wm.DEFAULTS,t)),tb(this,tN),tb(this,nN),tb(this,oN),tb(this,iN),Ld(this,ws,{writable:!0,value:void 0}),Ld(this,Qt,{writable:!0,value:void 0}),Ld(this,rR,{writable:!0,value:void 0}),Ld(this,ka,{writable:!0,value:void 0}),Ld(this,Tl,{writable:!0,value:void 0}),Ld(this,xl,{writable:!0,value:void 0}),hs(this,ws,[]),hs(this,ka,new ch(this.hot,{placeholder:PT,className:"htUIMultipleSelectSearch"})),hs(this,Tl,new mm(this.hot,{textContent:AT,className:"htUISelectAll"})),hs(this,xl,new mm(this.hot,{textContent:OT,className:"htUIClearAll"})),this.registerHooks()}}function fue(n){const t=n.target.value.trim().toLocaleLowerCase(this.getLocale());if(this.options.searchMode==="apply"){const o=Pe(this,Qt).getPlugin("hiddenRows"),i=[];o.showRows(o.getHiddenRows()),Pe(this,ws).forEach((s,r)=>{s.checked=`${s.value}`.toLocaleLowerCase(this.getLocale()).indexOf(t)>=0,s.checked||i.push(r)}),o.hideRows(i),Pe(this,Qt).view.adjustElementsSize(),Pe(this,Qt).render()}else{let o;t===""?o=[...Pe(this,ws)]:o=Pe(this,ws).filter(i=>`${i.value}`.toLocaleLowerCase(this.getLocale()).indexOf(t)>=0),Pe(this,Qt).loadData(o)}}function gue(n){this.runLocalHooks("keydown",n,this),fF(Xu,n.keyCode)("ARROW_DOWN")&&(n.preventDefault(),es(n),Pe(this,Qt).listen(),Pe(this,Qt).selectCell(0,0))}function pue(n){const e=[];n.preventDefault(),Pe(this,Qt).getSourceData().forEach((t,o)=>{t.checked=!0,e.push(lB(t,o)[0])}),Pe(this,Qt).setSourceDataAtCell(e)}function mue(n){const e=[];n.preventDefault(),Pe(this,Qt).getSourceData().forEach((t,o)=>{t.checked=!1,e.push(lB(t,o)[0])}),Pe(this,Qt).setSourceDataAtCell(e)}function wue(n,e){const t=Zm(e);return n.map(o=>(o.checked=t(o.value),o))}function bue(n){const e=[];return n.forEach(t=>{t.checked&&e.push(t.value)}),e}function Cue(n,e){if(e.has(n))throw new TypeError("Cannot initialize the same private elements twice on an object")}function nb(n,e,t){if(!e.has(n))throw new TypeError("attempted to get private field on non-instance");return t}function aR(n,e){Cue(n,e),e.add(n)}var sN=new WeakSet,lR=new WeakSet,rN=new WeakSet;class yue extends Xm{registerHooks(){this.getMultipleSelectElement().addLocalHook("keydown",e=>nb(this,sN,_ue).call(this,e)).addLocalHook("listTabKeydown",e=>this.runLocalHooks("listTabKeydown",e)),this.hot.addHook("modifyFiltersMultiSelectValue",(e,t)=>nb(this,rN,Sue).call(this,e,t))}getElements(){const e=this.getMultipleSelectElement();return[e.getSearchInputElement(),e.getSelectAllElement(),e.getClearAllElement(),this.getMultipleSelectElement()]}setState(e){if(this.reset(),e&&e.command.key===nh){const t=this.getMultipleSelectElement();t.setItems(e.itemsSnapshot),t.setValue(e.args[0]),t.setLocale(e.locale)}}getState(){const e=this.getMultipleSelectElement(),t=e.getItems();return{command:{key:e.isSelectedAllValues()||!t.length?Kn:nh},args:[e.getValue()],itemsSnapshot:t}}updateState(e){const t=(o,i,s,r,a)=>{const[l]=Fc(i,d=>d.name===nh),h={},c=this.hot.getTranslatedPhrase(IC);if(l){const d=r(o,a),u=Tt(d,T=>T.value),f=new Map(d.map(T=>[T.value,T.meta])),p=R0(u);s&&(l.args[0]=s);const C=[],_=WD(p,l.args[0],c,T=>{T.checked&&C.push(T.value),nb(this,lR,aN).call(this,T,f)}),S=e.editedConditionStack.column;h.locale=this.hot.getCellMeta(0,S).locale,h.args=[C],h.command=Ec(nh),h.itemsSnapshot=_}else h.args=[],h.command=Ec(Kn);this.state.setValueAtIndex(o,h)};t(e.editedConditionStack.column,e.editedConditionStack.conditions,e.conditionArgsChange,e.filteredRowsFactory),e.dependentConditionStacks.length&&t(e.dependentConditionStacks[0].column,e.dependentConditionStacks[0].conditions,e.conditionArgsChange,e.filteredRowsFactory,e.editedConditionStack)}getMultipleSelectElement(){return this.elements.filter(e=>e instanceof wm)[0]}getMenuItemDescriptor(){return{key:this.id,name:this.name,isCommand:!1,disableSelection:!0,hidden:()=>this.isHidden()||typeof this.hiddenWhen=="function"&&this.hiddenWhen(),renderer:(e,t,o,i,s,r)=>{B(t.parentNode,"htFiltersMenuValue");const a=this.hot.rootDocument.createElement("div");return B(a,"htFiltersMenuLabel"),a.textContent=r,t.appendChild(a),t.parentElement.hasAttribute("ghost-table")||O(this.elements,l=>t.appendChild(l.element)),t}}}reset(){const e=this.hot.getTranslatedPhrase(IC),t=this._getColumnVisibleValues(),o=t.map(l=>l.value),i=new Map(t.map(l=>[l.value,l.meta])),s=R0(o),r=WD(s,s,e,l=>{nb(this,lR,aN).call(this,l,i)});this.getMultipleSelectElement().setItems(r),super.reset(),this.getMultipleSelectElement().setValue(s);const a=this.hot.getPlugin("filters").getSelectedColumn();a!==null&&this.getMultipleSelectElement().setLocale(this.hot.getCellMeta(0,a.visualIndex).locale)}_getColumnVisibleValues(){const e=this.hot.getPlugin("filters").getSelectedColumn();return e===null?[]:Tt(this.hot.getDataAtCol(e.visualIndex),(t,o)=>({value:EM(t),meta:this.hot.getCellMeta(o,e.visualIndex)}))}constructor(e,t){super(e,{id:t.id,stateless:!1}),aR(this,sN),aR(this,lR),aR(this,rN),this.name="",this.name=t.name,this.searchMode=t.searchMode,this.hiddenWhen=t.hiddenWhen,this.elements.push(new wm(this.hot,{searchMode:this.searchMode})),this.registerHooks()}}function _ue(n){Xu(n.keyCode,"ESCAPE")&&(this.runLocalHooks("cancel"),es(n)),Xu(n.keyCode,"ENTER")&&(this.searchMode==="apply"&&this.runLocalHooks("accept"),es(n))}function aN(n,e){this.hot.hasHook("modifyFiltersMultiSelectValue")&&(n.visualValue=this.hot.runHooks("modifyFiltersMultiSelectValue",n.visualValue,e.get(n.value)))}function Sue(n,e){return e.valueFormatter?e.valueFormatter(n,e):n}function vue(n,e){if(e.has(n))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Rue(n,e,t){if(!e.has(n))throw new TypeError("attempted to get private field on non-instance");return t}function Eue(n,e){vue(n,e),e.add(n)}var lN=new WeakSet;class bm extends Xm{static get BUTTON_OK(){return"ok"}static get BUTTON_CANCEL(){return"cancel"}registerHooks(){O(this.elements,e=>{e.addLocalHook("click",(t,o)=>Rue(this,lN,kue).call(this,t,o))})}getMenuItemDescriptor(){return{key:this.id,name:this.name,isCommand:!1,disableSelection:!0,hidden:()=>this.isHidden(),renderer:(e,t)=>(B(t.parentNode,"htFiltersMenuActionBar"),O(this.elements,o=>t.appendChild(o.element)),t)}}accept(){this.runLocalHooks("accept")}cancel(){this.runLocalHooks("cancel")}constructor(e,t){super(e,{id:t.id,stateless:!0}),Eue(this,lN),this.name="",this.name=t.name,this.elements.push(new ch(this.hot,{type:"button",value:DT,className:"htUIButton htUIButtonOK",identifier:bm.BUTTON_OK})),this.elements.push(new ch(this.hot,{type:"button",value:NT,className:"htUIButton htUIButtonCancel",identifier:bm.BUTTON_CANCEL})),this.registerHooks()}}function kue(n,e){e.options.identifier===bm.BUTTON_OK?this.accept():this.cancel()}const hN="ConditionCollection.filteringStates";class xM{isEmpty(){return this.getFilteredColumns().length===0}isMatch(e,t){const o=this.filteringStates.getValueAtIndex(t),i=o?.conditions??[],s=o?.operation;return this.isMatchInConditions(i,e,s)}isMatchInConditions(e,t,o=hh){return e.length?kde(o)(e,t):!0}addCondition(e,t,o=hh,i){const s=this.hot.getCellMeta(0,e).locale,r=t.args.map(c=>typeof c=="string"?c.toLocaleLowerCase(s):c),a=t.name||t.command.key;this.runLocalHooks("beforeAdd",e);const l=this.getOperation(e);l?l!==o&&U(pt`The column of index ${e} has been already applied with a \`${l}\`\x20
|
|
252
|
+
filter operation. Use \`removeConditions\` to clear the current conditions and then add new ones.\x20
|
|
253
|
+
Mind that you cannot mix different types of operations (for instance, if you use \`conjunction\`,\x20
|
|
254
|
+
use it consequently for a particular column).`):Jt(gm[o])&&U(pt`Unexpected operation named \`${o}\`. Possible ones are\x20
|
|
255
|
+
\`disjunction\` and \`conjunction\`.`);const h=this.getConditions(e);h.length===0?this.filteringStates.setValueAtIndex(e,{operation:o,conditions:[{name:a,args:r,func:Ts(a,r)}]},i):h.push({name:a,args:r,func:Ts(a,r)}),this.runLocalHooks("afterAdd",e)}getConditions(e){return this.filteringStates.getValueAtIndex(e)?.conditions??[]}getOperation(e){return this.filteringStates.getValueAtIndex(e)?.operation}getFilteredColumns(){return this.filteringStates.getEntries().map(([e])=>e)}getColumnStackPosition(e){return this.getFilteredColumns().indexOf(e)}exportAllConditions(){return this.filteringStates.getEntries().reduce((e,[t,{operation:o,conditions:i}])=>(e.push({column:t,operation:o,conditions:i.map(({name:s,args:r})=>({name:s,args:[...r]}))}),e),[])}importAllConditions(e){this.clean(),e.forEach(t=>{t.conditions.forEach(o=>this.addCondition(t.column,o,t.operation))})}removeConditions(e){this.runLocalHooks("beforeRemove",e),this.filteringStates.clearValue(e),this.runLocalHooks("afterRemove",e)}clean(){this.runLocalHooks("beforeClean"),this.filteringStates.clear(),this.runLocalHooks("afterClean")}hasConditions(e,t){const o=this.getConditions(e);return t?o.some(i=>i.name===t):o.length>0}destroy(){this.isMapRegistrable&&this.hot.columnIndexMapper.unregisterMap(hN),this.filteringStates=null,this.clearLocalHooks()}constructor(e,t=!0){this.filteringStates=new Wy,this.hot=e,this.isMapRegistrable=t,this.isMapRegistrable===!0?this.hot.columnIndexMapper.registerMap(hN,this.filteringStates):this.filteringStates.init(this.hot.columnIndexMapper.getNumberOfIndexes())}}Ct(xM,$n);class y3{filter(){let e=[];return O(this.conditionCollection.getFilteredColumns(),(t,o)=>{let i=this.columnDataFactory(t);o&&(i=this._getIntersectData(i,e)),e=this.filterByColumn(t,i)}),e}filterByColumn(e,t=[]){const o=[];return O(t,i=>{i!==void 0&&this.conditionCollection.isMatch(i,e)&&o.push(i)}),o}_getIntersectData(e,t){const o=[];return O(t,i=>{const s=i.meta.row;e[s]!==void 0&&(o[s]=e[s])}),o}constructor(e,t=()=>[]){this.conditionCollection=e,this.columnDataFactory=t}}function Tue(n,e){if(e.has(n))throw new TypeError("Cannot initialize the same private elements twice on an object")}function hR(n,e,t){if(!e.has(n))throw new TypeError("attempted to get private field on non-instance");return t}function cR(n,e){Tue(n,e),e.add(n)}var cN=new WeakSet,dN=new WeakSet,uN=new WeakSet;class _3{groupChanges(){this.grouping=!0}flush(){this.grouping=!1,O(this.changes,e=>{this.updateStatesAtColumn(e)}),this.changes.length=0}updateStatesAtColumn(e,t){if(this.grouping){this.changes.indexOf(e)===-1&&this.changes.push(e);return}const o=this.conditionCollection.exportAllConditions();let i=this.conditionCollection.getColumnStackPosition(e);i===-1&&(i=this.latestEditedColumnPosition);const s=o.slice(0,i),r=o.slice(i);r.length&&r[0].column===e&&r.shift();const a=b4((h,c,d=[])=>{const u=new xM(this.hot,!1),f=[].concat(h,d);u.importAllConditions(f);const p=this.columnDataFactory(c);let C;u.isEmpty()?C=p:C=new y3(u,T=>this.columnDataFactory(T)).filter();const _=Tt(C,T=>T.meta.row),S=Zm(_);return u.destroy(),Fc(p,T=>S(T.meta.row))})(s),l=[].concat(this.conditionCollection.getConditions(e));this.runLocalHooks("update",{editedConditionStack:{column:e,conditions:l},dependentConditionStacks:r,filteredRowsFactory:a,conditionArgsChange:t})}destroy(){this.clearLocalHooks(),tt(this,(e,t)=>{this[t]=null})}constructor(e,t,o=()=>[]){cR(this,cN),cR(this,dN),cR(this,uN),this.changes=[],this.grouping=!1,this.latestEditedColumnPosition=-1,this.latestOrderStack=[],this.hot=e,this.conditionCollection=t,this.columnDataFactory=o,this.conditionCollection.addLocalHook("beforeRemove",i=>hR(this,cN,xue).call(this,i)),this.conditionCollection.addLocalHook("afterRemove",i=>this.updateStatesAtColumn(i)),this.conditionCollection.addLocalHook("afterAdd",i=>this.updateStatesAtColumn(i)),this.conditionCollection.addLocalHook("beforeClean",()=>hR(this,dN,Mue).call(this)),this.conditionCollection.addLocalHook("afterClean",()=>hR(this,uN,Iue).call(this))}}function xue(n){this.latestEditedColumnPosition=this.conditionCollection.getColumnStackPosition(n)}function Mue(){this.latestOrderStack=this.conditionCollection.getFilteredColumns()}function Iue(){O(this.latestOrderStack,n=>{this.updateStatesAtColumn(n)})}Ct(_3,$n);function Hue(n){return oU({initialPage:0,size:()=>n.length,onItemSelect:(t,o)=>{const i=n[t];if(i instanceof wm)return o;if(i.element&&!zc(i.element))return!1;i.focus()}})}const mg="filters";function Aue(n,e){let t=-1,o;const i=Hue(e),s=d=>()=>{o.isOpened()&&o.getKeyboardShortcutsCtrl().listen(mg),i.setCurrentPage(e.indexOf(d))};e.forEach(d=>{d instanceof pr&&(d.addLocalHook("click",s(d)),d.addLocalHook("focus",s(d)),d.addLocalHook("afterClose",s(d)))}),l(n);function r(d){const u=o.getKeyboardShortcutsCtrl(),f=d.getKeyboardShortcutsCtrl();i.clear(),f.addCustomShortcuts([{keys:[["Tab"],["Shift","Tab"]],forwardToContext:u.getContext(mg),callback:()=>{d.isSubMenu()&&d.close(),u.listen(mg)}}]),!d.isSubMenu()&&u.addCustomShortcuts([{keys:[["Tab"],["Shift","Tab"]],callback:p=>{const C=o.getNavigator();C.getCurrentPage()>-1&&(t=C.getCurrentPage()),C.clear(),p.shiftKey?i.toPreviousItem():i.toNextItem()}},{keys:[["Escape"]],callback:()=>{o.close()}},{keys:[["Enter"],["Space"]],preventDefault:!1,callback:p=>{const C=e[i.getCurrentPage()];C instanceof pm&&(C.openOptions(),p.preventDefault()),C instanceof mm&&(C.activate(),p.preventDefault()),C instanceof pr||p.preventDefault()}}],mg)}function a(){o.focus(),o.getKeyboardShortcutsCtrl().listen(mg)}function l(d){d.addLocalHook("afterSelectionChange",u=>{u.key.startsWith("filter_")||i.clear()}),d.addLocalHook("afterSubmenuOpen",r),d.addLocalHook("afterOpen",r),o=d}function h(){return o}function c(){return t}return{...i,listen:a,setMenu:l,getMenu:h,getLastMenuPage:c}}function S3(n,e){if(e.has(n))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Oue(n,e){return e.get?e.get.call(n):e.value}function Due(n,e,t){if(e.set)e.set.call(n,t);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=t}}function v3(n,e,t){if(!e.has(n))throw new TypeError("attempted to "+t+" private field on non-instance");return e.get(n)}function so(n,e){var t=v3(n,e,"get");return Oue(n,t)}function wg(n,e,t){S3(n,e),e.set(n,t)}function Js(n,e,t){var o=v3(n,e,"set");return Due(n,o,t),t}function _i(n,e,t){if(!e.has(n))throw new TypeError("attempted to get private field on non-instance");return t}function cs(n,e){S3(n,e),e.add(n)}const k0="filters",Nue=250,fN=k0;var Oa=new WeakMap,fy=new WeakMap,Lr=new WeakMap,cC=new WeakMap,zl=new WeakMap,gN=new WeakSet,pN=new WeakSet,mN=new WeakSet,wN=new WeakSet,bN=new WeakSet,CN=new WeakSet,yN=new WeakSet,dR=new WeakSet,_N=new WeakSet,uR=new WeakSet,SN=new WeakSet,vN=new WeakSet;class Pue extends rt{static get PLUGIN_KEY(){return k0}static get PLUGIN_PRIORITY(){return Nue}static get DEFAULT_SETTINGS(){return{searchMode:"show"}}static get SETTINGS_VALIDATORS(){return{searchMode:e=>typeof e=="string"&&["show","apply"].includes(e)}}static get PLUGIN_DEPS(){return["plugin:DropdownMenu","plugin:HiddenRows","cell-type:checkbox"]}isEnabled(){return!!this.hot.getSettings()[k0]}enablePlugin(){if(this.enabled)return;Js(this,zl,this.hot.runHooks("hasExternalDataSource")===!0),this.filtersRowsMap=this.hot.rowIndexMapper.registerMap(this.pluginName,new Qu),this.dropdownMenuPlugin=this.hot.getPlugin("dropdownMenu");const e=this.hot.getSettings().dropdownMenu,t=e&&e.uiContainer||this.hot.rootPortalElement,o=r=>(r.addLocalHook("accept",()=>_i(this,dR,RN).call(this,"accept")),r.addLocalHook("cancel",()=>_i(this,dR,RN).call(this,"cancel")),r.addLocalHook("change",a=>_i(this,_N,Uue).call(this,r,a)),r),i=()=>`${this.hot.getTranslatedPhrase(MT)}:`,s=()=>`${this.hot.getTranslatedPhrase(IT)}:`;if(!this.components.get("filter_by_condition")){const r=new E0(this.hot,{id:"filter_by_condition",name:i,addSeparator:!1,menuContainer:t});r.addLocalHook("afterClose",()=>_i(this,uR,EN).call(this)),this.components.set("filter_by_condition",o(r))}if(this.components.get("filter_operators")||this.components.set("filter_operators",new iue(this.hot,{id:"filter_operators",name:"Operators"})),!this.components.get("filter_by_condition2")){const r=new E0(this.hot,{id:"filter_by_condition2",name:"",addSeparator:!0,menuContainer:t});r.addLocalHook("afterClose",()=>_i(this,uR,EN).call(this)),this.components.set("filter_by_condition2",o(r))}if(!this.components.get("filter_by_value")){const r=this.getSetting("searchMode");this.components.set("filter_by_value",o(new yue(this.hot,{id:"filter_by_value",name:s,searchMode:r,hiddenWhen:()=>so(this,zl)})))}if(this.components.get("filter_action_bar")||this.components.set("filter_action_bar",o(new bm(this.hot,{id:"filter_action_bar",name:"Action bar"}))),this.conditionCollection||(this.conditionCollection=new xM(this.hot)),this.conditionUpdateObserver||(this.conditionUpdateObserver=new _3(this.hot,this.conditionCollection,r=>this.getDataMapAtColumn(r)),this.conditionUpdateObserver.addLocalHook("update",r=>_i(this,vN,Gue).call(this,r))),this.components.forEach(r=>r.show()),this.addHook("afterDropdownMenuDefaultOptions",(...r)=>_i(this,yN,zue).call(this,...r)),this.addHook("beforeDropdownMenuShow",()=>_i(this,CN,Vue).call(this)),this.addHook("afterDropdownMenuShow",()=>_i(this,wN,Fue).call(this)),this.addHook("afterDropdownMenuHide",()=>_i(this,bN,Bue).call(this)),this.addHook("afterChange",r=>_i(this,gN,Lue).call(this,r)),this.addHook("afterDataProviderFetch",r=>_i(this,pN,Wue).call(this,r)),this.addHook("afterDataProviderFetchError",()=>_i(this,mN,$ue).call(this)),this.hot.getSettings().dropdownMenu&&this.dropdownMenuPlugin&&(this.dropdownMenuPlugin.disablePlugin(),this.dropdownMenuPlugin.enablePlugin()),!so(this,Oa)&&this.dropdownMenuPlugin.enabled){const r=[{focus:()=>{const l=so(this,Oa).getMenu(),h=l.getNavigator(),c=so(this,Oa).getLastMenuPage();l.focus(),c>0?h.setCurrentPage(c):h.toFirstItem()}},...Array.from(this.components).map(([,l])=>l.getElements()).flat()];Js(this,Oa,Aue(this.dropdownMenuPlugin.menu,r));const a=l=>{so(this,Oa).listen(),l.preventDefault(),Xu(l.keyCode,"TAB")&&(l.shiftKey?so(this,Oa).toPreviousItem():so(this,Oa).toNextItem())};this.components.get("filter_by_value").addLocalHook("listTabKeydown",a),this.components.get("filter_by_condition").addLocalHook("selectTabKeydown",a)}this.registerShortcuts(),super.enablePlugin()}updatePlugin(){this.disablePlugin(),this.enablePlugin(),super.updatePlugin()}disablePlugin(){this.enabled&&(this.dropdownMenuPlugin?.enabled&&this.dropdownMenuPlugin.menu.clearLocalHooks(),this.components.forEach((e,t)=>{e.destroy(),this.components.set(t,null)}),this.conditionCollection.destroy(),this.conditionCollection=null,this.hot.rowIndexMapper.unregisterMap(this.pluginName)),this.unregisterShortcuts(),super.disablePlugin()}registerShortcuts(){this.hot.getShortcutManager().getContext("grid").addShortcut({keys:[["Alt","A"]],stopPropagation:!0,callback:()=>{const e=this.hot.getSelected();this.clearConditions(),this.filter(),e&&this.hot.selectCells(e)},group:fN})}unregisterShortcuts(){this.hot.getShortcutManager().getContext("grid").removeShortcutsByGroup(fN)}addCondition(e,t,o,i=hh){if(t===nh&&so(this,zl))return;const s=this.hot.toPhysicalColumn(e);this.conditionCollection.addCondition(s,{command:{key:t},args:o},i)}removeConditions(e){const t=this.hot.toPhysicalColumn(e);this.conditionCollection.removeConditions(t)}clearConditions(e){if(e===void 0)this.conditionCollection.clean();else{const t=this.hot.toPhysicalColumn(e);this.conditionCollection.removeConditions(t)}}importConditions(e){this.conditionCollection.importAllConditions(e)}exportConditions(){return this.conditionCollection.exportAllConditions()}filter(){const{navigableHeaders:e}=this.hot.getSettings(),t=!this.conditionCollection.isEmpty(),o=this.exportConditions();so(this,zl)&&Js(this,cC,Qn(so(this,Lr)));const i=this.hot.runHooks("beforeFilter",o,so(this,Lr));if(i!==!1&&t){const s=this._createDataFilter(),r=[];let a=[];this.hot.batchExecution(()=>{this.filtersRowsMap.clear(),a=Tt(s.filter(),h=>h.meta.row);const l=Zm(a);Ee(this.hot.countSourceRows()-1,h=>{l(h)||r.push(h)}),O(r,h=>{this.filtersRowsMap.setValueAtIndex(h,!0)})},!0),!e&&!a.length&&this.hot.deselectCell(),Js(this,Lr,this.exportConditions())}else i!==!1&&!t?(Js(this,Lr,this.exportConditions()),this.filtersRowsMap.clear()):so(this,zl)?Js(this,Lr,this.exportConditions()):this.importConditions(so(this,Lr));this.hot.selection.isSelected()&&this.hot.selectCell(e?-1:0,this.hot.getSelectedRangeActive().highlight.col),i!==!1&&(this.hot.runHooks("afterFilter",o),this.hot.view.adjustElementsSize(),this.hot.render())}getSelectedColumn(){const e=this.hot.getSelectedRangeActive()?.highlight;return e?{visualIndex:e.col,physicalIndex:this.hot.toPhysicalColumn(e.col)}:null}getDataMapAtColumn(e){const t=this.hot.countSourceRows(),o=this.hot.toVisualColumn(e),i=[];for(let s=0;s<t;s++){const r=this.hot._getMetaManager().getCellMeta(s,e,{visualRow:s,visualColumn:e,skipMetaExtension:!0});let a=Gy(this.hot.getSourceDataAtCell(s,o),r);if(this.hot.hasHook("modifyData")){const l=Pi(a);this.hot.runHooks("modifyData",s,e,l,"get"),l.isTouched()&&(a=l.value)}i.push({meta:r,value:EM(a)})}return i}updateValueComponentCondition(e){const t=this.hot.toVisualColumn(e),o=this.hot.getDataAtCol(t),i=R0(o);this.conditionUpdateObserver.updateStatesAtColumn(e,i)}restoreComponents(e){const t=this.getSelectedColumn()?.physicalIndex;e.forEach(o=>{o.isHidden()||o.restoreState(t)}),this.updateDependentComponentsVisibility()}getOperationBasedOnArguments(e,t,o,i){let s=e;return s===dy&&t.command.key!==Kn&&o.command.key!==Kn&&i.command.key!==Kn?s=TM:i.command.key!==Kn&&(t.command.key===Kn||o.command.key===Kn)&&(s=hh),s}setListeningDropdownMenu(){this.dropdownMenuPlugin&&this.dropdownMenuPlugin.setListening()}updateDependentComponentsVisibility(){const e=this.components.get("filter_by_condition"),{command:t}=e.getState(),o=[this.components.get("filter_by_condition2"),this.components.get("filter_operators")];t.showOperators?this.showComponents(...o):this.hideComponents(...o)}_createDataFilter(e=this.conditionCollection){return new y3(e,t=>this.getDataMapAtColumn(t))}getIndexesOfComponents(...e){const t=[];if(!this.dropdownMenuPlugin)return t;const o=this.dropdownMenuPlugin.menu;return O(e,i=>{O(o.menuItems,(s,r)=>{s.key===i.getMenuItemDescriptor().key&&t.push(r)})}),t}changeComponentsVisibility(e=!0,...t){if(!this.dropdownMenuPlugin)return;const i=this.dropdownMenuPlugin.menu.hotMenu,s=i.getPlugin("hiddenRows"),r=this.getIndexesOfComponents(...t);e?s.showRows(r):s.hideRows(r),i.render()}hideComponents(...e){this.changeComponentsVisibility(!1,...e)}showComponents(...e){this.changeComponentsVisibility(!0,...e)}destroy(){this.enabled&&(this.components.forEach((e,t)=>{e!==null&&(e.destroy(),this.components.set(t,null))}),this.conditionCollection.destroy(),this.conditionUpdateObserver.destroy(),this.hot.rowIndexMapper.unregisterMap(this.pluginName)),super.destroy()}constructor(e){super(e),cs(this,gN),cs(this,pN),cs(this,mN),cs(this,wN),cs(this,bN),cs(this,CN),cs(this,yN),cs(this,dR),cs(this,_N),cs(this,uR),cs(this,SN),cs(this,vN),wg(this,Oa,{writable:!0,value:void 0}),wg(this,fy,{writable:!0,value:void 0}),wg(this,Lr,{writable:!0,value:void 0}),wg(this,cC,{writable:!0,value:void 0}),wg(this,zl,{writable:!0,value:void 0}),this.dropdownMenuPlugin=null,this.conditionCollection=null,this.conditionUpdateObserver=null,this.components=new Map([["filter_by_condition",null],["filter_operators",null],["filter_by_condition2",null],["filter_by_value",null],["filter_action_bar",null]]),this.filtersRowsMap=null,Js(this,fy,new WeakSet),Js(this,Lr,[]),Js(this,cC,[]),Js(this,zl,!1),this.hot.addHook("afterGetColHeader",(...t)=>_i(this,SN,Yue).call(this,...t))}}function Lue(n){n&&O(n,e=>{const[,t]=e,o=this.hot.propToCol(t),i=this.hot.toPhysicalColumn(o);this.conditionCollection.hasConditions(i)&&this.updateValueComponentCondition(i)})}function Wue(n){this.importConditions(n?.filtersConditionsStack??[])}function $ue(){this.importConditions(so(this,cC))}function Fue(){const n=this.dropdownMenuPlugin.menu;this.restoreComponents(Array.from(this.components.values())),n.updateMenuDimensions()}function Bue(){this.components.get("filter_by_condition").getSelectElement().closeOptions(),this.components.get("filter_by_condition2").getSelectElement().closeOptions()}function Vue(){const n=this.dropdownMenuPlugin.menu;so(this,fy).has(n)||so(this,Oa).setMenu(n),so(this,fy).add(n)}function zue(n){n.items.push({name:He}),this.components.forEach(e=>{n.items.push(e.getMenuItemDescriptor())})}function RN(n){if(n==="accept"){const e=this.getSelectedColumn();if(e===null){this.dropdownMenuPlugin?.close();return}const{physicalIndex:t}=e,o=this.components.get("filter_by_condition").getState(),i=this.components.get("filter_by_condition2").getState(),s=this.components.get("filter_by_value").getState(),r=this.getOperationBasedOnArguments(this.components.get("filter_operators").getActiveOperationId(),o,i,s);this.conditionUpdateObserver.groupChanges();let a=this.conditionCollection.getColumnStackPosition(t);a===-1&&(a=void 0),this.conditionCollection.removeConditions(t),o.command.key!==Kn&&(this.conditionCollection.addCondition(t,o,r,a),i.command.key!==Kn&&this.conditionCollection.addCondition(t,i,r,a)),s.command.key!==Kn&&!so(this,zl)&&this.conditionCollection.addCondition(t,s,r,a),this.conditionUpdateObserver.flush(),this.components.forEach(l=>l.saveState(t)),this.filter()}this.dropdownMenuPlugin?.close()}function Uue(n,e){const t=this.dropdownMenuPlugin.menu;this.updateDependentComponentsVisibility(),n.constructor===E0&&!e.inputsCount&&this.setListeningDropdownMenu(),t.updateMenuDimensions()}function EN(){this.setListeningDropdownMenu()}function Yue(n,e){const t=this.hot.toPhysicalColumn(n);this.enabled&&this.conditionCollection.hasConditions(t)&&af(e)?B(e,"htFiltersActive"):oe(e,"htFiltersActive")}function Gue(n){if(!this.dropdownMenuPlugin?.enabled)return;const{editedConditionStack:{conditions:e,column:t},conditionArgsChange:o}=n;Array.isArray(o)&&Js(this,Lr,so(this,Lr).map(r=>(r.column===t&&e.length>0&&r.conditions.forEach(a=>{a.name==="by_value"&&(a.args=[[...o]])}),r)));const i=e.filter(r=>r.name===nh),s=e.filter(r=>r.name!==nh);if(i.length>=2||s.length>=3)Ie(pt`The filter conditions have been applied properly, but couldn’t be displayed visually.\x20
|
|
256
|
+
The dropdown menu supports at most 2 regular conditions and 1 'filter by value' condition per column,\x20
|
|
257
|
+
but more were provided. For more details see the documentation.`);else{const r=this.conditionCollection.getOperation(t);this.components.get("filter_by_condition").updateState(s[0],t),this.components.get("filter_by_condition2").updateState(s[1],t),this.components.get("filter_operators").updateState(r,t),this.components.get("filter_by_value").updateState(n)}}const R3="internal-use-in-handsontable",T0={licenseKey:R3,useArrayArithmetic:!0,useColumnIndex:!1,useStats:!1,evaluateNullToZero:!0,precisionEpsilon:1e-13,precisionRounding:14,smartRounding:!0,leapYear1900:!1,nullDate:{year:1899,month:12,day:30},nullYear:30,dateFormats:["DD/MM/YYYY","DD/MM/YY"],timeFormats:["hh:mm","hh:mm:ss.sss"],matchWholeCell:!0,useRegularExpressions:!1,useWildcards:!0,functionArgSeparator:",",thousandSeparator:"",decimalSeparator:".",language:"enGB"};function E3(n){return{maxColumns:n.maxColumns,maxRows:n.maxRows,language:n[qo]?.language?.langCode}}function k3(n){return Object.keys(n).reduce((e,t)=>(t!=="hyperformula"&&(e[t]=n[t]),e),{})}function jue(n){const e=n[qo],t=k3(e?.engine?.hyperformula?e.engine:{}),o=E3(n);return{...T0,...t,...o}}function que(n){const e=n[qo],t=k3(e?.engine?.hyperformula?e.engine:{}),o=E3(n);return{...t,...o}}function Kue(n,e){return Object.keys(e).some(t=>e[t]!==void 0&&e[t]!==n[t])}function x_(){const n="engine_relationship",e=ts(qo);return e.hasItem(n)||e.register(n,new Map),e.getItem(n)}function MM(){const n="shared_engine_usage",e=ts(qo);return e.hasItem(n)||e.register(n,new Map),e.getItem(n)}function Xue(n){const e=n.getSettings(),t=e[qo],o=t?.engine;if(t===!0||Jt(o))return null;if(typeof o.hyperformula=="function"||typeof o=="function")return Zue(o.hyperformula??o,e,n);if(typeof o=="object"&&Jt(o.hyperformula)){const i=x_(),s=MM().get(o);return i.has(o)||i.set(o,[]),i.get(o).push(n),s&&s.push(n.guid),o.getConfig().licenseKey||o.updateConfig({licenseKey:R3}),(o.getConfig().leapYear1900!==T0.leapYear1900||uh(o.getConfig().nullDate,T0.nullDate)===!1)&&Ie(pt`If you use HyperFormula with Handsontable, keep the default \`leapYear1900\` and \`nullDate\`
|
|
258
|
+
settings. Otherwise, HyperFormula's dates may not sync correctly with Handsontable's dates.`),o}return null}function Zue(n,e,t){const o=e[qo],i=jue(e),s=x_(),r=MM();Que(n,o.functions),Jue(n,o.language);const a=n.buildEmpty(i);return s.set(a,[t]),r.set(a,[t.guid]),efe(a,o.namedExpressions),a.on("sheetAdded",()=>{a.rebuildAndRecalculate()}),a.on("sheetRemoved",()=>{a.rebuildAndRecalculate()}),a}function kN(n){const e=x_(),t=e.size===0?[]:Array.from(e.get(n)??[]);return new Map(t.map(o=>[o.getPlugin("formulas").sheetId,o]))}function TN(n,e){if(n){const t=x_(),o=t.get(n),i=MM(),s=i.get(n);o&&o.includes(e)&&(o.splice(o.indexOf(e),1),o.length===0&&t.delete(n)),s&&s.includes(e.guid)&&(s.splice(s.indexOf(e.guid),1),s.length===0&&(i.delete(n),n.destroy()))}}function Que(n,e){e&&e.forEach(t=>{const{name:o,plugin:i,translations:s}=t;try{n.registerFunction(o,i,s)}catch(r){Ie(r.message)}})}function Jue(n,e){if(e){const{langCode:t}=e;try{n.registerLanguage(t,e)}catch(o){Ie(o.message)}}}function efe(n,e){e&&(n.suspendEvaluation(),e.forEach(t=>{const{name:o,expression:i,scope:s,options:r}=t;try{n.addNamedExpression(o,i,s,r)}catch(a){Ie(a.message)}}),n.resumeEvaluation())}function tfe(n,e){return(Jt(e)||!n.doesSheetExist(e))&&(e=n.addSheet(e)),e}const T3="DD/MM/YYYY";function nfe(n){return typeof n=="string"&&n.charAt(0)==="'"&&n.charAt(1)==="="}function ofe(n){return nfe(n)?n.substr(1):n}function ife(n){return typeof n=="string"&&n.startsWith("=")}function IM(n,e){return typeof n=="string"&&e==="date"}function x3(n,e){return Z(n,e,!0).isValid()}function M3(n,e){return Z(n,e,!0).format(T3)}function sfe(n,e){return Z(n,T3,!0).format(e)}function I3(n,e){const o=new Date(Date.UTC(0,0,n+-1));return Z(o).format(e)}function H3(n){return Array.isArray(n)?u2(n):n}function rfe(n,e,t){const o=Array.from(Array(t).keys()).filter(i=>n.includes(i)===!1);return e===0?o[e]??0:o[e-1]+1}function afe(n,e){const t=[];return n.forEach(o=>{const i={from:o,to:e};t.forEach(s=>{const r=s.from>s.to,a=s.to<=i.from;s.from>i.from&&a&&r&&(i.from+=1)}),i.from>=e&&(e+=1),t.push(i)}),t}function lfe(n){return n.forEach((e,t)=>{n.slice(t+1).forEach(i=>{const s=i.from<i.to;i.from>e.from&&s&&(i.from-=1)})}),n}function HM(n,e,t){const o=afe(n,rfe(n,e,t));return lfe(o)}function hfe(n,e){if(e.has(n))throw new TypeError("Cannot initialize the same private elements twice on an object")}function cfe(n,e){return e.get?e.get.call(n):e.value}function dfe(n,e,t){if(e.set)e.set.call(n,t);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=t}}function A3(n,e,t){if(!e.has(n))throw new TypeError("attempted to "+t+" private field on non-instance");return e.get(n)}function Kt(n,e){var t=A3(n,e,"get");return cfe(n,t)}function Uh(n,e,t){hfe(n,e),e.set(n,t)}function Ds(n,e,t){var o=A3(n,e,"set");return dfe(n,o,t),t}var bg=new WeakMap,Ml=new WeakMap,zi=new WeakMap,Cg=new WeakMap,ob=new WeakMap,fR=new WeakMap,yg=new WeakMap;class xN{setRemovedHfIndexes(e){return Ds(this,yg,e.map(t=>{const o=Kt(this,Ml).getVisualFromPhysicalIndex(t);return this.getHfIndexFromVisualIndex(o)})),Kt(this,yg)}getRemovedHfIndexes(){return Kt(this,yg)}getHfIndexFromVisualIndex(e){const t=Kt(this,Ml).getIndexesSequence(),o=Kt(this,Ml).getNotTrimmedIndexes();return t.indexOf(o[e],e)}syncMoves(e){const o=`move${mr(Kt(this,bg))}s`;Kt(this,zi).getEngine().batch(()=>{e.forEach(i=>{const s=i.from!==i.to,r=i.from+1!==i.to;s&&r&&Kt(this,zi).getEngine()[o](Kt(this,zi).getSheetId(),i.from,1,i.to)})})}storeMovesInformation(e,t,o){o!==!1&&(Ds(this,ob,e.map(i=>this.getHfIndexFromVisualIndex(i))),Ds(this,fR,this.getHfIndexFromVisualIndex(t)))}calculateAndSyncMoves(e,t){if(Kt(this,zi).isPerformingUndoRedo()||e===!1||t===!1)return;const o=HM(Kt(this,ob),Kt(this,fR),Kt(this,Ml).getNumberOfIndexes());Kt(this,zi).getSheetId()===null?Kt(this,zi).getPostponeAction(()=>this.syncMoves(o)):this.syncMoves(o)}getIndexesChangeSyncMethod(){const e=`set${mr(Kt(this,bg))}Order`;return t=>{if(Kt(this,zi).isPerformingUndoRedo())return;const o=Kt(this,Ml).getIndexesSequence();if(t==="update"&&o.length>0){const i=Kt(this,Cg).map(l=>o.indexOf(l)),s=Kt(this,zi).getEngine().getSheetDimensions(Kt(this,zi).getSheetId());let r;Kt(this,bg)==="row"?r=s.height:r=s.width;const a=i.length;for(let l=a;l<r;l+=1)i.push(l);Kt(this,zi).getEngine()[e](Kt(this,zi).getSheetId(),i)}Ds(this,Cg,o)}}init(){Ds(this,Cg,Kt(this,Ml).getIndexesSequence())}constructor(e,t,o){Uh(this,bg,{writable:!0,value:void 0}),Uh(this,Ml,{writable:!0,value:void 0}),Uh(this,zi,{writable:!0,value:void 0}),Uh(this,Cg,{writable:!0,value:void 0}),Uh(this,ob,{writable:!0,value:void 0}),Uh(this,fR,{writable:!0,value:void 0}),Uh(this,yg,{writable:!0,value:void 0}),Ds(this,Cg,[]),Ds(this,ob,[]),Ds(this,yg,[]),Ds(this,bg,e),Ds(this,Ml,t),Ds(this,zi,o)}}function ufe(n,e){if(e.has(n))throw new TypeError("Cannot initialize the same private elements twice on an object")}function ffe(n,e){return e.get?e.get.call(n):e.value}function gfe(n,e,t){if(e.set)e.set.call(n,t);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=t}}function O3(n,e,t){if(!e.has(n))throw new TypeError("attempted to "+t+" private field on non-instance");return e.get(n)}function Ta(n,e){var t=O3(n,e,"get");return ffe(n,t)}function Yh(n,e,t){ufe(n,e),e.set(n,t)}function Ns(n,e,t){var o=O3(n,e,"set");return gfe(n,o,t),t}var ib=new WeakMap,sb=new WeakMap,gR=new WeakMap,rb=new WeakMap,ab=new WeakMap,lb=new WeakMap,hb=new WeakMap;class pfe{getForAxis(e){return e==="row"?Ta(this,ib):Ta(this,sb)}setPerformUndo(e){Ns(this,rb,e)}setPerformRedo(e){Ns(this,ab,e)}isPerformingUndoRedo(){return Ta(this,rb)||Ta(this,ab)}getSheetId(){return Ta(this,hb)}getEngine(){return Ta(this,lb)}getPostponeAction(){return Ta(this,gR)}setupSyncEndpoint(e,t){Ns(this,lb,e),Ns(this,hb,t),Ta(this,ib).init(),Ta(this,sb).init()}constructor(e,t,o){Yh(this,ib,{writable:!0,value:void 0}),Yh(this,sb,{writable:!0,value:void 0}),Yh(this,gR,{writable:!0,value:void 0}),Yh(this,rb,{writable:!0,value:void 0}),Yh(this,ab,{writable:!0,value:void 0}),Yh(this,lb,{writable:!0,value:void 0}),Yh(this,hb,{writable:!0,value:void 0}),Ns(this,rb,!1),Ns(this,ab,!1),Ns(this,lb,null),Ns(this,hb,null),Ns(this,ib,new xN("row",e,this)),Ns(this,sb,new xN("column",t,this)),Ns(this,gR,o)}}function D3(n,e){if(e.has(n))throw new TypeError("Cannot initialize the same private elements twice on an object")}function mfe(n,e){return e.get?e.get.call(n):e.value}function wfe(n,e,t){if(e.set)e.set.call(n,t);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=t}}function N3(n,e,t){if(!e.has(n))throw new TypeError("attempted to "+t+" private field on non-instance");return e.get(n)}function Lc(n,e){var t=N3(n,e,"get");return mfe(n,t)}function pR(n,e,t){D3(n,e),e.set(n,t)}function ur(n,e,t){var o=N3(n,e,"set");return wfe(n,o,t),t}function it(n,e,t){if(!e.has(n))throw new TypeError("attempted to get private field on non-instance");return t}function Bt(n,e){D3(n,e),e.add(n)}const qo="formulas",bfe=["maxRows","maxColumns","language"],Cfe=260;he.getSingleton().register("afterNamedExpressionAdded");he.getSingleton().register("afterNamedExpressionRemoved");he.getSingleton().register("afterSheetAdded");he.getSingleton().register("afterSheetRemoved");he.getSingleton().register("afterSheetRenamed");he.getSingleton().register("afterFormulasValuesUpdate");const yf=n=>n==="UndoRedo.undo"||n==="UndoRedo.redo"||n==="auto";var na=new WeakMap,Cm=new WeakMap,Wd=new WeakMap,Au=new WeakSet,AM=new WeakSet,Yu=new WeakSet,MN=new WeakSet,IN=new WeakSet,mR=new WeakSet,HN=new WeakSet,wR=new WeakSet,AN=new WeakSet,ON=new WeakSet,bR=new WeakSet,DN=new WeakSet,NN=new WeakSet,PN=new WeakSet,LN=new WeakSet,WN=new WeakSet,$N=new WeakSet,FN=new WeakSet,BN=new WeakSet,VN=new WeakSet,zN=new WeakSet,UN=new WeakSet,YN=new WeakSet,GN=new WeakSet,jN=new WeakSet,qN=new WeakSet,KN=new WeakSet;class yfe extends rt{static get PLUGIN_KEY(){return qo}static get PLUGIN_PRIORITY(){return Cfe}static get SETTING_KEYS(){return[qo,...bfe]}isEnabled(){return!!this.hot.getSettings()[qo]}enablePlugin(){if(!this.enabled){if(this.engine=Xue(this.hot)??this.engine,!this.engine){Ie("Missing the required `engine` key in the Formulas settings. Please fill it with either an engine class or an engine instance.");return}if(this.sheetName!==null&&!this.engine.doesSheetExist(this.sheetName)){const e=this.addSheet(this.sheetName,it(this,Yu,ym).call(this));e!==!1&&it(this,Au,xp).call(this,e)}this.addHook("beforeLoadData",(...e)=>it(this,mR,XN).call(this,...e)),this.addHook("afterLoadData",(...e)=>it(this,wR,ZN).call(this,...e)),this.addHook("beforeUpdateData",(...e)=>it(this,mR,XN).call(this,...e)),this.addHook("afterUpdateData",(...e)=>it(this,wR,ZN).call(this,...e)),this.addHook("modifyData",(...e)=>it(this,AN,Rfe).call(this,...e)),this.addHook("modifySourceData",(...e)=>it(this,ON,Efe).call(this,...e)),this.addHook("beforeValidate",(...e)=>it(this,MN,_fe).call(this,...e)),this.addHook("afterSetSourceDataAtCell",(...e)=>it(this,DN,kfe).call(this,...e)),this.addHook("afterSetDataAtCell",(...e)=>it(this,bR,QN).call(this,...e)),this.addHook("afterSetDataAtRowProp",(...e)=>it(this,bR,QN).call(this,...e)),this.addHook("beforeCreateRow",(...e)=>it(this,NN,Tfe).call(this,...e)),this.addHook("beforeCreateCol",(...e)=>it(this,PN,xfe).call(this,...e)),this.addHook("afterCreateRow",(...e)=>it(this,$N,Hfe).call(this,...e)),this.addHook("afterCreateCol",(...e)=>it(this,FN,Afe).call(this,...e)),this.addHook("beforeRemoveRow",(...e)=>it(this,LN,Mfe).call(this,...e)),this.addHook("beforeRemoveCol",(...e)=>it(this,WN,Ife).call(this,...e)),this.addHook("afterRemoveRow",(...e)=>it(this,BN,Ofe).call(this,...e)),this.addHook("afterRemoveCol",(...e)=>it(this,VN,Dfe).call(this,...e)),this.indexSyncer=new pfe(this.hot.rowIndexMapper,this.hot.columnIndexMapper,e=>{this.hot.addHookOnce("init",()=>{e()})}),this.rowAxisSyncer=this.indexSyncer.getForAxis("row"),this.columnAxisSyncer=this.indexSyncer.getForAxis("column"),this.hot.addHook("afterRowSequenceChange",this.rowAxisSyncer.getIndexesChangeSyncMethod()),this.hot.addHook("afterColumnSequenceChange",this.columnAxisSyncer.getIndexesChangeSyncMethod()),this.hot.addHook("beforeRowMove",(e,t,o,i)=>{this.rowAxisSyncer.storeMovesInformation(e,t,i)}),this.hot.addHook("beforeColumnMove",(e,t,o,i)=>{this.columnAxisSyncer.storeMovesInformation(e,t,i)}),this.hot.addHook("afterRowMove",(e,t,o,i,s)=>{this.rowAxisSyncer.calculateAndSyncMoves(i,s)}),this.hot.addHook("afterColumnMove",(e,t,o,i,s)=>{this.columnAxisSyncer.calculateAndSyncMoves(i,s)}),this.hot.addHook("beforeColumnFreeze",(e,t)=>{this.columnAxisSyncer.storeMovesInformation([e],this.hot.getSettings().fixedColumnsStart,t)}),this.hot.addHook("afterColumnFreeze",(e,t)=>{this.columnAxisSyncer.calculateAndSyncMoves(t,t)}),this.hot.addHook("beforeColumnUnfreeze",(e,t)=>{this.columnAxisSyncer.storeMovesInformation([e],this.hot.getSettings().fixedColumnsStart-1,t)}),this.hot.addHook("afterColumnUnfreeze",(e,t)=>{this.columnAxisSyncer.calculateAndSyncMoves(t,t)}),this.addHook("afterCellMetaReset",(...e)=>it(this,HN,vfe).call(this,...e)),this.addHook("beforeUndo",()=>{this.indexSyncer.setPerformUndo(!0),this.engine.undo()}),this.addHook("beforeRedo",()=>{this.indexSyncer.setPerformRedo(!0),this.engine.redo()}),this.addHook("afterUndo",()=>{this.indexSyncer.setPerformUndo(!1)}),this.addHook("afterUndo",()=>{this.indexSyncer.setPerformRedo(!1)}),this.addHook("afterDetachChild",(...e)=>it(this,zN,Nfe).call(this,...e)),this.addHook("beforeAutofill",(...e)=>it(this,IN,Sfe).call(this,...e)),Lc(this,Wd).forEach(([e,t])=>this.engine.on(e,t)),super.enablePlugin()}}disablePlugin(){Lc(this,Wd).forEach(([e,t])=>this.engine.off(e,t)),TN(this.engine,this.hot),this.engine=null,super.disablePlugin()}updatePlugin(e){const t=que(this.hot.getSettings());Kue(this.engine.getConfig(),t)&&this.engine.updateConfig(t);const o=this.hot.getSettings()[qo];if(J(o)&&J(o.sheetName)&&o.sheetName!==this.sheetName&&this.switchSheet(o.sheetName),!e.data&&this.sheetName===null){const i=this.hot.getSettings()[qo].sheetName;if(i&&this.engine.doesSheetExist(i))this.switchSheet(this.sheetName);else{const s=this.addSheet(i??void 0,it(this,Yu,ym).call(this));it(this,Au,xp).call(this,s)}}super.updatePlugin(e)}destroy(){Lc(this,Wd).forEach(([e,t])=>this.engine?.off(e,t)),ur(this,Wd,null),TN(this.engine,this.hot),this.engine=null,super.destroy()}addSheet(e,t){if(J(t)&&!h7(t))return Ie("The provided data should be an array of arrays."),!1;if(e!=null&&this.engine.doesSheetExist(e))return Ie("Sheet with the provided name already exists."),!1;try{const o=this.engine.addSheet(e??void 0);return t&&this.engine.setSheetContent(this.engine.getSheetId(o),t),o}catch(o){return Ie(o.message),!1}}switchSheet(e){if(!this.engine.doesSheetExist(e)){nl(`The sheet named \`${e}\` does not exist, switch aborted.`);return}it(this,Au,xp).call(this,e);const t=this.engine.getSheetSerialized(this.sheetId);t.length>0&&this.hot.loadData(t,`${mr(qo)}.switchSheet`)}getCellType(e,t,o=this.sheetId){const i=this.hot.toPhysicalRow(e),s=this.hot.toPhysicalColumn(t);return i!==null&&s!==null?this.engine.getCellType({sheet:o,row:this.rowAxisSyncer.getHfIndexFromVisualIndex(e),col:this.columnAxisSyncer.getHfIndexFromVisualIndex(t)}):"EMPTY"}isFormulaCellType(e,t,o=this.sheetId){return this.engine.doesCellHaveFormula({sheet:o,row:this.rowAxisSyncer.getHfIndexFromVisualIndex(e),col:this.columnAxisSyncer.getHfIndexFromVisualIndex(t)})}renderDependentSheets(e,t=!1){const o=new Set;e.forEach(i=>{const s=i?.address?.sheet;s!==void 0&&(o.has(s)||o.add(s))}),kN(this.engine).forEach((i,s)=>{(t||s!==this.sheetId)&&o.has(s)&&(i.render(),i.view?.adjustElementsSize())})}validateDependentCells(e,t=[]){const o=s=>{const{row:r,col:a,sheet:l}=s?.address??{};return J(l)?`${l}:${r}x${a}`:""},i=new Set(t.map(s=>o(s)));e.forEach(s=>{const{row:r,col:a}=s.address??{};if(J(r)===!1||J(a)===!1||r>=this.hot.countRows()||a>=this.hot.countCols())return;const l=s?.address?.sheet,h=o(s);if(l!==void 0&&!i.has(h)){const c=kN(this.engine).get(l);if(!c)return;c.validateCell(c.getDataAtCell(r,a),c.getCellMeta(r,a),()=>{})}})}syncChangeWithEngine(e,t,o){const i={row:this.rowAxisSyncer.getHfIndexFromVisualIndex(e),col:this.columnAxisSyncer.getHfIndexFromVisualIndex(t),sheet:this.sheetId};if(!this.engine.isItPossibleToSetCellContents(i)){Ie(`Not possible to set cell data at ${JSON.stringify(i)}`);return}const s=this.hot.getCellMeta(e,t);return IM(o,s.type)&&(x3(o,s.dateFormat)?o=M3(o,s.dateFormat):ife(o)===!1&&(o=`'${o}`)),this.engine.setCellContents(i,o)}constructor(...e){super(...e),Bt(this,Au),Bt(this,AM),Bt(this,Yu),Bt(this,MN),Bt(this,IN),Bt(this,mR),Bt(this,HN),Bt(this,wR),Bt(this,AN),Bt(this,ON),Bt(this,bR),Bt(this,DN),Bt(this,NN),Bt(this,PN),Bt(this,LN),Bt(this,WN),Bt(this,$N),Bt(this,FN),Bt(this,BN),Bt(this,VN),Bt(this,zN),Bt(this,UN),Bt(this,YN),Bt(this,GN),Bt(this,jN),Bt(this,qN),Bt(this,KN),pR(this,na,{writable:!0,value:void 0}),pR(this,Cm,{writable:!0,value:void 0}),pR(this,Wd,{writable:!0,value:void 0}),ur(this,na,!1),ur(this,Cm,!1),ur(this,Wd,[["valuesUpdated",(...t)=>it(this,UN,Pfe).call(this,...t)],["namedExpressionAdded",(...t)=>it(this,YN,Lfe).call(this,...t)],["namedExpressionRemoved",(...t)=>it(this,GN,Wfe).call(this,...t)],["sheetAdded",(...t)=>it(this,jN,$fe).call(this,...t)],["sheetRenamed",(...t)=>it(this,qN,Ffe).call(this,...t)],["sheetRemoved",(...t)=>it(this,KN,Bfe).call(this,...t)]]),this.staticRegister=ts("formulas"),this.engine=null,this.sheetId=null,this.sheetName=null,this.indexSyncer=null,this.rowAxisSyncer=null,this.columnAxisSyncer=null}}function xp(n){this.sheetName=n,this.sheetId=this.engine.getSheetId(this.sheetName)}function P3(n,e,t){if(ne(t)&&t!==null){const o=this.hot.toVisualRow(n),i=this.hot.toVisualColumn(e);t=Gy(t,this.hot.getCellMeta(o,i)),t=t.toString()}return H3(t)}function ym(n,e,t,o){return this.hot.getSourceDataArray(n,e,t,o).map((i,s)=>i.map((r,a)=>it(this,AM,P3).call(this,s,a,r)))}function _fe(n,e,t){const o=this.hot.propToCol(t);if(this.isFormulaCellType(e,o)){const i={row:this.rowAxisSyncer.getHfIndexFromVisualIndex(e),col:this.columnAxisSyncer.getHfIndexFromVisualIndex(o),sheet:this.sheetId},s=this.hot.getCellMeta(e,o);let r=this.engine.getCellValue(i);return s.type==="date"&&di(r)&&(r=I3(r,s.dateFormat)),typeof r=="object"&&r!==null?r.value:r}return n}function Sfe(n,e,t){const{row:o,col:i}=e.getTopStartCorner(),{row:s,col:r}=e.getBottomEndCorner(),{row:a,col:l}=t.getTopStartCorner(),{row:h,col:c}=t.getBottomEndCorner(),d={start:{row:this.rowAxisSyncer.getHfIndexFromVisualIndex(o),col:this.columnAxisSyncer.getHfIndexFromVisualIndex(i),sheet:this.sheetId},end:{row:this.rowAxisSyncer.getHfIndexFromVisualIndex(s),col:this.columnAxisSyncer.getHfIndexFromVisualIndex(r),sheet:this.sheetId}},u={start:{row:this.rowAxisSyncer.getHfIndexFromVisualIndex(a),col:this.columnAxisSyncer.getHfIndexFromVisualIndex(l),sheet:this.sheetId},end:{row:this.rowAxisSyncer.getHfIndexFromVisualIndex(h),col:this.columnAxisSyncer.getHfIndexFromVisualIndex(c),sheet:this.sheetId}};if(this.engine.isItPossibleToSetCellContents(u)===!1)return!1;const f=this.engine.getFillRangeData(d,u),{row:p,col:C}=d.start,{row:_,col:S}=d.end,T=_-p+1,P=S-C+1;for(let F=0;F<f.length;F+=1)for(let V=0;V<f[F].length;V+=1){const D=f[F][V],I=p+F%T,G=C+V%P,z=this.hot.getCellMeta(I,G);IM(D,z.type)&&(D.startsWith("'")?f[F][V]=D.slice(1):this.isFormulaCellType(I,G,this.sheetId)===!1&&(f[F][V]=sfe(D,z.dateFormat)))}return f}function XN(n,e,t=""){t.includes(mr(qo))||ur(this,Cm,Jt(this.hot.getSettings().data))}function vfe(){if(Lc(this,Cm)){this.switchSheet(this.sheetName);return}const n=it(this,Yu,ym).call(this);n.forEach((t,o)=>{t.forEach((i,s)=>{const r=this.hot.getCellMeta(o,s,{skipMetaExtension:!0}),a=r.dateFormat;IM(i,r.type)&&(x3(i,a)?n[o][s]=M3(i,a):i.startsWith("=")||(n[o][s]=`'${i}`))})}),ur(this,na,!0);const e=this.engine.setSheetContent(this.sheetId,n);this.indexSyncer.setupSyncEndpoint(this.engine,this.sheetId),this.renderDependentSheets(e),ur(this,na,!1)}function ZN(n,e,t=""){if(t.includes(mr(qo)))return;const o=tfe(this.engine,this.hot.getSettings()[qo].sheetName);if(it(this,Au,xp).call(this,o),t!=="updateSettings")if(Lc(this,Cm))this.switchSheet(this.sheetName);else{const i=it(this,Yu,ym).call(this);if(this.engine.isItPossibleToReplaceSheetContent(this.sheetId,i)){ur(this,na,!0);const s=this.engine.setSheetContent(this.sheetId,i);this.indexSyncer.setupSyncEndpoint(this.engine,this.sheetId),this.renderDependentSheets(s),ur(this,na,!1)}}}function Rfe(n,e,t,o){if(o!=="get"||Lc(this,na)||this.sheetName===null||!this.engine.doesSheetExist(this.sheetName)||n===null||e===null)return;const i=this.getCellType(n,e);if(i==="VALUE"||i==="EMPTY"){t.value=ofe(t.value);return}const s={row:this.rowAxisSyncer.getHfIndexFromVisualIndex(n),col:this.columnAxisSyncer.getHfIndexFromVisualIndex(e),sheet:this.sheetId};let r=this.engine.getCellValue(s);const a=this.hot.getCellMeta(n,e,{skipMetaExtension:!0});a.type==="date"&&di(r)&&(r=I3(r,a.dateFormat)),t.value=typeof r=="object"&&r!==null?r.value:r}function Efe(n,e,t,o){if(o!=="get"||Lc(this,na)||this.sheetName===null||!this.engine.doesSheetExist(this.sheetName))return;const i=this.hot.toVisualRow(n),s=this.hot.propToCol(e);if(i===null||s===null)return;const r=this.getCellType(i,s);if(r==="VALUE"||r==="EMPTY")return;const a=this.engine.getSheetDimensions(this.engine.getSheetId(this.sheetName));if(a.width===0&&a.height===0)return;const l={row:this.rowAxisSyncer.getHfIndexFromVisualIndex(i),col:this.columnAxisSyncer.getHfIndexFromVisualIndex(s),sheet:this.sheetId};t.value=this.engine.getCellSerialized(l)}function QN(n,e){if(yf(e)||n.length===0)return;const t=[],o=[],i=this.engine.batch(()=>{n.forEach(([s,r,,a])=>{const l=this.hot.propToCol(r),h=this.hot.toPhysicalRow(s),c=this.hot.toPhysicalColumn(l),d={row:this.rowAxisSyncer.getHfIndexFromVisualIndex(s),col:this.columnAxisSyncer.getHfIndexFromVisualIndex(l),sheet:this.sheetId};a=it(this,AM,P3).call(this,h,c,a),h!==null&&c!==null?this.syncChangeWithEngine(s,l,a):t.push([s,l,a]),o.push({address:d})})});t.length&&this.hot.addHookOnce("afterChange",()=>{const s=this.engine.batch(()=>{t.forEach(([r,a,l])=>{this.syncChangeWithEngine(r,a,l)})});this.renderDependentSheets(s,!0)}),this.renderDependentSheets(i),this.validateDependentCells(i,o)}function kfe(n,e){if(yf(e))return;const t=[],o=[];n.forEach(([i,s,,r])=>{const a=this.hot.propToCol(s);if(!di(a))return;const l={row:this.rowAxisSyncer.getHfIndexFromVisualIndex(i),col:this.columnAxisSyncer.getHfIndexFromVisualIndex(a),sheet:this.sheetId};if(!this.engine.isItPossibleToSetCellContents(l)){Ie(`Not possible to set source cell data at ${JSON.stringify(l)}`);return}r=H3(r),o.push({address:l}),t.push(...this.engine.setCellContents(l,r))}),this.renderDependentSheets(t),this.validateDependentCells(t,o)}function Tfe(n,e){let t=this.rowAxisSyncer.getHfIndexFromVisualIndex(n);if(n>=this.hot.countRows()&&(t=n),this.sheetId===null||!this.engine.doesSheetExist(this.sheetName)||!this.engine.isItPossibleToAddRows(this.sheetId,[t,e]))return!1}function xfe(n,e){let t=this.columnAxisSyncer.getHfIndexFromVisualIndex(n);if(n>=this.hot.countCols()&&(t=n),this.sheetId===null||!this.engine.doesSheetExist(this.sheetName)||!this.engine.isItPossibleToAddColumns(this.sheetId,[t,e]))return!1}function Mfe(n,e,t){return this.rowAxisSyncer.setRemovedHfIndexes(t).every(s=>this.engine.isItPossibleToRemoveRows(this.sheetId,[s,1]))===!1?!1:void 0}function Ife(n,e,t){return this.columnAxisSyncer.setRemovedHfIndexes(t).every(s=>this.engine.isItPossibleToRemoveColumns(this.sheetId,[s,1]))===!1?!1:void 0}function Hfe(n,e,t){if(yf(t))return;const o=this.engine.addRows(this.sheetId,[this.rowAxisSyncer.getHfIndexFromVisualIndex(n),e]);this.renderDependentSheets(o)}function Afe(n,e,t){if(yf(t))return;const o=this.engine.addColumns(this.sheetId,[this.columnAxisSyncer.getHfIndexFromVisualIndex(n),e]);this.renderDependentSheets(o)}function Ofe(n,e,t,o){if(yf(o))return;const i=this.rowAxisSyncer.getRemovedHfIndexes().sort((r,a)=>a-r),s=this.engine.batch(()=>{i.forEach(r=>{this.engine.removeRows(this.sheetId,[r,1])})});this.renderDependentSheets(s)}function Dfe(n,e,t,o){if(yf(o))return;const i=this.columnAxisSyncer.getRemovedHfIndexes().sort((r,a)=>a-r),s=this.engine.batch(()=>{i.forEach(r=>{this.engine.removeColumns(this.sheetId,[r,1])})});this.renderDependentSheets(s)}function Nfe(n,e,t){ur(this,na,!0);const o=it(this,Yu,ym).call(this,t,0,t+(e.__children?.length||0),this.hot.countSourceCols());ur(this,na,!1),o.forEach((i,s)=>{i.forEach((r,a)=>{this.engine.setCellContents({col:a,row:t+s,sheet:this.sheetId},[[r]])})})}function Pfe(n){this.hot.runHooks("afterFormulasValuesUpdate",n)}function Lfe(n,e){this.hot.runHooks("afterNamedExpressionAdded",n,e)}function Wfe(n,e){this.hot.runHooks("afterNamedExpressionRemoved",n,e)}function $fe(n){this.hot.runHooks("afterSheetAdded",n)}function Ffe(n,e){it(this,Au,xp).call(this,e),this.hot.runHooks("afterSheetRenamed",n,e)}function Bfe(n,e){this.hot.runHooks("afterSheetRemoved",n,e)}function Vfe(n){return{key:"hidden_columns_hide",name(){const e=this.getSelectedActive();let t=0;if(Array.isArray(e)){const[,o,,i]=e;o-i!==0&&(t=1)}return this.getTranslatedPhrase(uT,t)},callback(){const{from:e,to:t}=this.getSelectedRangeActive(),o=Math.max(Math.min(e.col,t.col),0),i=Math.max(e.col,t.col),s=[];for(let l=o;l<=i;l+=1)s.push(l);n.hideColumns(s);const r=s[s.length-1],a=this.columnIndexMapper.getNearestNotHiddenIndex(r,1,!0);Number.isInteger(a)&&a>=0?this.selectColumns(a):this.deselectCell(),this.view.adjustElementsSize(),this.render()},disabled:!1,hidden(){return!(this.selection.isSelectedByColumnHeader()||this.selection.isSelectedByCorner())}}}function zfe(n){const e=[];return{key:"hidden_columns_show",name(){const t=e.length>1?1:0;return this.getTranslatedPhrase(fT,t)},callback(){if(e.length===0)return;let t=e[0],o=e[e.length-1];t=this.columnIndexMapper.getNearestNotHiddenIndex(t-1,-1)??0,o=this.columnIndexMapper.getNearestNotHiddenIndex(o+1,1)??this.countCols()-1,n.showColumns(e),this.view.adjustElementsSize(),this.render(),o-t+1===this.countCols()||this.selectColumns(t,o)},disabled:!1,hidden(){const t=Tt(n.getHiddenColumns(),d=>this.toPhysicalColumn(d));if(!(this.selection.isSelectedByColumnHeader()||this.selection.isSelectedByCorner())||t.length<1)return!0;e.length=0;const o=this.getSelectedRangeActive(),i=o.getTopStartCorner().col,s=o.getBottomEndCorner().col,r=this.columnIndexMapper,a=r.getRenderableFromVisualIndex(i),l=r.getRenderableFromVisualIndex(s),h=r.getNotTrimmedIndexes(),c=[];if(i!==s){const d=s-i+1,u=l-a+1;if(d>u){const f=h.slice(i,s+1);c.push(...f.filter(p=>t.includes(p)))}}else if(a===0&&a<i)c.push(...h.slice(0,i));else if(a===null)c.push(...h.slice(0,this.countCols()));else{const d=this.countCols()-1,u=r.getRenderableFromVisualIndex(r.getNearestNotHiddenIndex(d,-1));l===u&&d>s&&c.push(...h.slice(s+1))}return O(c,d=>{e.push(this.toVisualColumn(d))}),e.length===0}}}function L3(n,e){if(e.has(n))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Ufe(n,e){return e.get?e.get.call(n):e.value}function Yfe(n,e,t){if(e.set)e.set.call(n,t);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=t}}function W3(n,e,t){if(!e.has(n))throw new TypeError("attempted to "+t+" private field on non-instance");return e.get(n)}function Gh(n,e){var t=W3(n,e,"get");return Ufe(n,t)}function Gfe(n,e,t){L3(n,e),e.set(n,t)}function CR(n,e,t){var o=W3(n,e,"set");return Yfe(n,o,t),t}function $d(n,e,t){if(!e.has(n))throw new TypeError("attempted to get private field on non-instance");return t}function Fd(n,e){L3(n,e),e.add(n)}he.getSingleton().register("beforeHideColumns");he.getSingleton().register("afterHideColumns");he.getSingleton().register("beforeUnhideColumns");he.getSingleton().register("afterUnhideColumns");const JN="hiddenColumns",jfe=310;var Ps=new WeakMap,eP=new WeakSet,tP=new WeakSet,nP=new WeakSet,oP=new WeakSet,iP=new WeakSet,sP=new WeakSet;class qfe extends rt{static get PLUGIN_KEY(){return JN}static get PLUGIN_PRIORITY(){return jfe}static get DEFAULT_SETTINGS(){return{copyPasteEnabled:!0,indicators:!1,columns:[]}}isEnabled(){return!!this.hot.getSettings()[JN]}enablePlugin(){this.enabled||(CR(this,Ps,new Qp),Gh(this,Ps).addLocalHook("init",()=>$d(this,sP,ege).call(this)),this.hot.columnIndexMapper.registerMap(this.pluginName,Gh(this,Ps)),this.addHook("afterContextMenuDefaultOptions",(...e)=>$d(this,iP,Jfe).call(this,...e)),this.addHook("afterGetCellMeta",(e,t,o)=>$d(this,tP,Xfe).call(this,e,t,o)),this.addHook("modifyColWidth",(e,t)=>$d(this,eP,Kfe).call(this,e,t),2),this.addHook("afterGetColHeader",(...e)=>$d(this,oP,Qfe).call(this,...e)),this.addHook("modifyCopyableRange",e=>$d(this,nP,Zfe).call(this,e)),super.enablePlugin())}updatePlugin(){this.disablePlugin(),this.enablePlugin(),super.updatePlugin()}disablePlugin(){super.disablePlugin(),this.hot.columnIndexMapper.unregisterMap(this.pluginName),this.resetCellsMeta()}showColumns(e){const t=this.getHiddenColumns(),o=this.isValidConfig(e);let i=t;const s=Gh(this,Ps).getValues().slice(),r=e.length>0;if(o&&r){const l=e.map(h=>this.hot.toPhysicalColumn(h));O(l,h=>{s[h]=!1}),i=$i(s,(h,c,d)=>(c&&h.push(this.hot.toVisualColumn(d)),h),[])}this.hot.runHooks("beforeUnhideColumns",t,i,o&&r)!==!1&&(o&&r&&Gh(this,Ps).setValues(s),this.hot.view.adjustElementsSize(),this.hot.runHooks("afterUnhideColumns",t,i,o&&r,o&&i.length<t.length))}showColumn(...e){this.showColumns(e)}hideColumns(e){const t=this.getHiddenColumns(),o=this.isValidConfig(e);let i=t;o&&(i=Array.from(new Set(t.concat(e)))),this.hot.runHooks("beforeHideColumns",t,i,o)!==!1&&(o&&this.hot.batchExecution(()=>{O(e,r=>{Gh(this,Ps).setValueAtIndex(this.hot.toPhysicalColumn(r),!0)})},!0),this.hot.runHooks("afterHideColumns",t,i,o,o&&i.length>t.length))}hideColumn(...e){this.hideColumns(e)}getHiddenColumns(){return Tt(Gh(this,Ps).getHiddenIndexes(),e=>this.hot.toVisualColumn(e))}isHidden(e){return Gh(this,Ps).getValueAtIndex(this.hot.toPhysicalColumn(e))||!1}isValidConfig(e){const t=this.hot.countCols();return Array.isArray(e)&&e.length>0?e.every(o=>Number.isInteger(o)&&o>=0&&o<t):!1}resetCellsMeta(){O(this.hot.getCellsMeta(),e=>{e.skipColumnOnPaste=!1})}destroy(){CR(this,Ps,null),super.destroy()}constructor(...e){super(...e),Fd(this,eP),Fd(this,tP),Fd(this,nP),Fd(this,oP),Fd(this,iP),Fd(this,sP),Gfe(this,Ps,{writable:!0,value:void 0}),CR(this,Ps,null)}}function Kfe(n,e){if(this.isHidden(e))return 0;if(this.getSetting("indicators")&&(this.isHidden(e+1)||this.isHidden(e-1))&&typeof n=="number"&&this.hot.hasColHeaders())return n+15}function Xfe(n,e,t){if(this.getSetting("copyPasteEnabled")===!1&&this.isHidden(e)&&(t.skipColumnOnPaste=!0),this.isHidden(e-1))t.className=t.className||"",t.className.indexOf("afterHiddenColumn")===-1&&(t.className+=" afterHiddenColumn");else if(t.className){const o=t.className.split(" ");if(o.length>0){const i=o.indexOf("afterHiddenColumn");i>-1&&o.splice(i,1),t.className=o.join(" ")}}}function Zfe(n){if(this.getSetting("copyPasteEnabled"))return n;const e=[],t=(o,i,s,r)=>{e.push({startRow:o,endRow:i,startCol:s,endCol:r})};return O(n,o=>{let i=!0,s=0;Ee(o.startCol,o.endCol,r=>{this.isHidden(r)?(i||t(o.startRow,o.endRow,s,r-1),i=!0):(i&&(s=r),r===o.endCol&&t(o.startRow,o.endRow,s,r),i=!1)})}),e}function Qfe(n,e){if(!this.getSetting("indicators")||n<0)return;const t=[];n>=1&&this.isHidden(n-1)&&t.push("afterHiddenColumn"),n<this.hot.countCols()-1&&this.isHidden(n+1)&&t.push("beforeHiddenColumn"),B(e,t)}function Jfe(n){n.items.push({name:He},Vfe(this),zfe(this))}function ege(){const n=this.getSetting("columns");Array.isArray(n)&&this.hideColumns(n)}function tge(n){return{key:"hidden_rows_hide",name(){const e=this.getSelectedActive();let t=0;if(Array.isArray(e)){const[o,,i]=e;o-i!==0&&(t=1)}return this.getTranslatedPhrase(gT,t)},callback(){const{from:e,to:t}=this.getSelectedRangeActive(),o=Math.max(Math.min(e.row,t.row),0),i=Math.max(e.row,t.row),s=[];for(let l=o;l<=i;l+=1)s.push(l);n.hideRows(s);const r=s[s.length-1],a=this.rowIndexMapper.getNearestNotHiddenIndex(r,1,!0);Number.isInteger(a)&&a>=0?this.selectRows(a):this.deselectCell(),this.view.adjustElementsSize(),this.render()},disabled:!1,hidden(){return!(this.selection.isSelectedByRowHeader()||this.selection.isSelectedByCorner())}}}function nge(n){const e=[];return{key:"hidden_rows_show",name(){const t=e.length>1?1:0;return this.getTranslatedPhrase(pT,t)},callback(){if(e.length===0)return;let t=e[0],o=e[e.length-1];t=this.rowIndexMapper.getNearestNotHiddenIndex(t-1,-1)??0,o=this.rowIndexMapper.getNearestNotHiddenIndex(o+1,1)??this.countRows()-1,n.showRows(e),this.view.adjustElementsSize(),this.render(),o-t+1===this.countRows()||this.selectRows(t,o)},disabled:!1,hidden(){const t=Tt(n.getHiddenRows(),d=>this.toPhysicalRow(d));if(!(this.selection.isSelectedByRowHeader()||this.selection.isSelectedByCorner())||t.length<1)return!0;e.length=0;const o=this.getSelectedRangeActive(),i=o.getTopStartCorner().row,s=o.getBottomEndCorner().row,r=this.rowIndexMapper,a=r.getRenderableFromVisualIndex(i),l=r.getRenderableFromVisualIndex(s),h=r.getNotTrimmedIndexes(),c=[];if(i!==s){const d=s-i+1,u=l-a+1;if(d>u){const f=h.slice(i,s+1);c.push(...f.filter(p=>t.includes(p)))}}else if(a===0&&a<i)c.push(...h.slice(0,i));else if(a===null)c.push(...h.slice(0,this.countRows()));else{const d=this.countRows()-1,u=r.getRenderableFromVisualIndex(r.getNearestNotHiddenIndex(d,-1));l===u&&d>s&&c.push(...h.slice(s+1))}return O(c,d=>{e.push(this.toVisualRow(d))}),e.length===0}}}function $3(n,e){if(e.has(n))throw new TypeError("Cannot initialize the same private elements twice on an object")}function oge(n,e){return e.get?e.get.call(n):e.value}function ige(n,e,t){if(e.set)e.set.call(n,t);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=t}}function F3(n,e,t){if(!e.has(n))throw new TypeError("attempted to "+t+" private field on non-instance");return e.get(n)}function jh(n,e){var t=F3(n,e,"get");return oge(n,t)}function sge(n,e,t){$3(n,e),e.set(n,t)}function yR(n,e,t){var o=F3(n,e,"set");return ige(n,o,t),t}function Bd(n,e,t){if(!e.has(n))throw new TypeError("attempted to get private field on non-instance");return t}function Vd(n,e){$3(n,e),e.add(n)}he.getSingleton().register("beforeHideRows");he.getSingleton().register("afterHideRows");he.getSingleton().register("beforeUnhideRows");he.getSingleton().register("afterUnhideRows");const rP="hiddenRows",rge=320;var Ls=new WeakMap,aP=new WeakSet,lP=new WeakSet,hP=new WeakSet,cP=new WeakSet,dP=new WeakSet,uP=new WeakSet;class age extends rt{static get PLUGIN_KEY(){return rP}static get PLUGIN_PRIORITY(){return rge}static get DEFAULT_SETTINGS(){return{copyPasteEnabled:!0,indicators:!1,rows:[]}}isEnabled(){return!!this.hot.getSettings()[rP]}enablePlugin(){this.enabled||(yR(this,Ls,new Qp),jh(this,Ls).addLocalHook("init",()=>Bd(this,uP,fge).call(this)),this.hot.rowIndexMapper.registerMap(this.pluginName,jh(this,Ls)),this.addHook("afterContextMenuDefaultOptions",(...e)=>Bd(this,dP,uge).call(this,...e)),this.addHook("afterGetCellMeta",(e,t,o)=>Bd(this,lP,hge).call(this,e,t,o)),this.addHook("modifyRowHeight",(e,t)=>Bd(this,aP,lge).call(this,e,t)),this.addHook("afterGetRowHeader",(...e)=>Bd(this,cP,dge).call(this,...e)),this.addHook("modifyCopyableRange",e=>Bd(this,hP,cge).call(this,e)),super.enablePlugin())}updatePlugin(){this.disablePlugin(),this.enablePlugin(),super.updatePlugin()}disablePlugin(){super.disablePlugin(),this.hot.rowIndexMapper.unregisterMap(this.pluginName),this.resetCellsMeta()}showRows(e){const t=this.getHiddenRows(),o=this.isValidConfig(e);let i=t;const s=jh(this,Ls).getValues().slice(),r=e.length>0;if(o&&r){const l=e.map(h=>this.hot.toPhysicalRow(h));O(l,h=>{s[h]=!1}),i=$i(s,(h,c,d)=>(c&&h.push(this.hot.toVisualRow(d)),h),[])}this.hot.runHooks("beforeUnhideRows",t,i,o&&r)!==!1&&(o&&r&&jh(this,Ls).setValues(s),this.hot.runHooks("afterUnhideRows",t,i,o&&r,o&&i.length<t.length))}showRow(...e){this.showRows(e)}hideRows(e){const t=this.getHiddenRows(),o=this.isValidConfig(e);let i=t;o&&(i=Array.from(new Set(t.concat(e)))),this.hot.runHooks("beforeHideRows",t,i,o)!==!1&&(o&&this.hot.batchExecution(()=>{O(e,r=>{jh(this,Ls).setValueAtIndex(this.hot.toPhysicalRow(r),!0)})},!0),this.hot.runHooks("afterHideRows",t,i,o,o&&i.length>t.length))}hideRow(...e){this.hideRows(e)}getHiddenRows(){return Tt(jh(this,Ls).getHiddenIndexes(),e=>this.hot.toVisualRow(e))}isHidden(e){return jh(this,Ls).getValueAtIndex(this.hot.toPhysicalRow(e))||!1}isValidConfig(e){const t=this.hot.countRows();return Array.isArray(e)&&e.length>0?e.every(o=>Number.isInteger(o)&&o>=0&&o<t):!1}resetCellsMeta(){O(this.hot.getCellsMeta(),e=>{e.skipRowOnPaste=!1})}destroy(){yR(this,Ls,null),super.destroy()}constructor(...e){super(...e),Vd(this,aP),Vd(this,lP),Vd(this,hP),Vd(this,cP),Vd(this,dP),Vd(this,uP),sge(this,Ls,{writable:!0,value:void 0}),yR(this,Ls,null)}}function lge(n,e){return this.isHidden(e)?0:n}function hge(n,e,t){if(this.getSetting("copyPasteEnabled")===!1&&this.isHidden(n)&&(t.skipRowOnPaste=!0),this.isHidden(n-1))t.className=t.className||"",t.className.indexOf("afterHiddenRow")===-1&&(t.className+=" afterHiddenRow");else if(t.className){const o=t.className.split(" ");if(o.length>0){const i=o.indexOf("afterHiddenRow");i>-1&&o.splice(i,1),t.className=o.join(" ")}}}function cge(n){if(this.getSetting("copyPasteEnabled"))return n;const e=[],t=(o,i,s,r)=>{e.push({startRow:o,endRow:i,startCol:s,endCol:r})};return O(n,o=>{let i=!0,s=0;Ee(o.startRow,o.endRow,r=>{this.isHidden(r)?(i||t(s,r-1,o.startCol,o.endCol),i=!0):(i&&(s=r),r===o.endRow&&t(s,r,o.startCol,o.endCol),i=!1)})}),e}function dge(n,e){if(!this.getSetting("indicators")||n<0)return;const t=[];n>=1&&this.isHidden(n-1)&&t.push("afterHiddenRow"),n<this.hot.countRows()-1&&this.isHidden(n+1)&&t.push("beforeHiddenRow"),B(e,t)}function uge(n){n.items.push({name:He},tge(this),nge(this))}function fge(){const n=this.getSetting("rows");Array.isArray(n)&&this.hideRows(n)}function gge(n){return{key:"freeze_column",name(){return this.getTranslatedPhrase(Vk)},callback(e,t){const[{start:{col:o}}]=t;n.freezeColumn(o),this.view.adjustElementsSize(),this.render()},hidden(){const e=this.getSelectedRange();let t=!1;return(e===void 0||e.length>1||e[0].from.col!==e[0].to.col||e[0].from.col<=this.getSettings().fixedColumnsStart-1)&&(t=!0),t}}}function pge(n){return{key:"unfreeze_column",name(){return this.getTranslatedPhrase(zk)},callback(e,t){const[{start:{col:o}}]=t;n.unfreezeColumn(o),this.view.adjustElementsSize(),this.render()},hidden(){const e=this.getSelectedRange();let t=!1;return(e===void 0||e.length>1||e[0].from.col!==e[0].to.col||e[0].from.col>=this.getSettings().fixedColumnsStart)&&(t=!0),t}}}function B3(n,e){if(e.has(n))throw new TypeError("Cannot initialize the same private elements twice on an object")}function mge(n,e){return e.get?e.get.call(n):e.value}function wge(n,e,t){if(e.set)e.set.call(n,t);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=t}}function V3(n,e,t){if(!e.has(n))throw new TypeError("attempted to "+t+" private field on non-instance");return e.get(n)}function x0(n,e){var t=V3(n,e,"get");return mge(n,t)}function bge(n,e,t){B3(n,e),e.set(n,t)}function cb(n,e,t){var o=V3(n,e,"set");return wge(n,o,t),t}function fP(n,e,t){if(!e.has(n))throw new TypeError("attempted to get private field on non-instance");return t}function gP(n,e){B3(n,e),e.add(n)}he.getSingleton().register("beforeColumnFreeze");he.getSingleton().register("afterColumnFreeze");he.getSingleton().register("beforeColumnUnfreeze");he.getSingleton().register("afterColumnUnfreeze");const pP="manualColumnFreeze",Cge=110;var Ul=new WeakMap,mP=new WeakSet,wP=new WeakSet;class yge extends rt{static get PLUGIN_KEY(){return pP}static get PLUGIN_PRIORITY(){return Cge}isEnabled(){return!!this.hot.getSettings()[pP]}enablePlugin(){this.enabled||(this.addHook("afterContextMenuDefaultOptions",e=>fP(this,mP,_ge).call(this,e)),this.addHook("beforeColumnMove",(e,t)=>fP(this,wP,Sge).call(this,e,t)),super.enablePlugin())}disablePlugin(){cb(this,Ul,!1),super.disablePlugin()}updatePlugin(){this.disablePlugin(),this.enablePlugin(),super.updatePlugin()}freezeColumn(e){const t=this.hot.getSettings(),o=t.fixedColumnsStart<this.hot.countCols()&&e>t.fixedColumnsStart-1;x0(this,Ul)||cb(this,Ul,!0),this.hot.runHooks("beforeColumnFreeze",e,o)!==!1&&(o&&(this.hot.columnIndexMapper.moveIndexes(e,t.fixedColumnsStart),t._fixedColumnsStart+=1),this.hot.runHooks("afterColumnFreeze",e,o))}unfreezeColumn(e){const t=this.hot.getSettings(),o=t.fixedColumnsStart>0&&e<=t.fixedColumnsStart-1;x0(this,Ul)||cb(this,Ul,!0),this.hot.runHooks("beforeColumnUnfreeze",e,o)!==!1&&(o&&(t._fixedColumnsStart-=1,this.hot.columnIndexMapper.moveIndexes(e,t.fixedColumnsStart)),this.hot.runHooks("afterColumnUnfreeze",e,o))}constructor(...e){super(...e),gP(this,mP),gP(this,wP),bge(this,Ul,{writable:!0,value:void 0}),cb(this,Ul,!1)}}function _ge(n){n.items.push({name:"---------"},gge(this),pge(this))}function Sge(n,e){if(x0(this,Ul)){const t=this.hot.getSettings().fixedColumnsStart;if(e<t||n.some(o=>o<t))return!1}}const _R=0,bP=1,CP=2,zd="px";let z3=class{appendTo(e){e.appendChild(this._element),this.state=CP}build(){this.state===_R&&(this._element=this.hot.rootDocument.createElement("div"),this.state=bP)}destroy(){this.isAppended()&&this._element.parentElement.removeChild(this._element),this._element=null,this.state=_R}isAppended(){return this.state===CP}isBuilt(){return this.state>=bP}setPosition(e,t){di(e)&&(this._element.style.top=e+zd),di(t)&&(this._element.style[this.inlineProperty]=t+zd)}getPosition(){const e=this._element.style;return{top:e.top?parseInt(e.top,10):0,start:e[this.inlineProperty]?parseInt(e[this.inlineProperty],10):0}}setSize(e,t){di(e)&&(this._element.style.width=e+zd),di(t)&&(this._element.style.height=t+zd)}getSize(){return{width:this._element.style.width?parseInt(this._element.style.width,10):0,height:this._element.style.height?parseInt(this._element.style.height,10):0}}setOffset(e,t){di(e)&&(this._element.style.marginTop=e+zd),di(t)&&(this._element.style[`margin${mr(this.inlineProperty)}`]=t+zd)}getOffset(){const e=this._element.style,t=`margin${mr(this.inlineProperty)}`;return{top:e.marginTop?parseInt(e.marginTop,10):0,start:e[t]?parseInt(e[t],10):0}}constructor(e){this._element=null,this.state=_R,this.hot=e,this.inlineProperty=e.isRtl()?"right":"left"}};const vge="ht__manualColumnMove--backlight";let Rge=class extends z3{build(){super.build(),B(this._element,vge)}};const Ege="ht__manualColumnMove--guideline";let kge=class extends z3{build(){super.build(),B(this._element,Ege)}};function U3(n,e){if(e.has(n))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Tge(n,e){return e.get?e.get.call(n):e.value}function xge(n,e,t){if(e.set)e.set.call(n,t);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=t}}function Y3(n,e,t){if(!e.has(n))throw new TypeError("attempted to "+t+" private field on non-instance");return e.get(n)}function pe(n,e){var t=Y3(n,e,"get");return Tge(n,t)}function Ws(n,e,t){U3(n,e),e.set(n,t)}function jn(n,e,t){var o=Y3(n,e,"set");return xge(n,o,t),t}function Ud(n,e,t){if(!e.has(n))throw new TypeError("attempted to get private field on non-instance");return t}function Yd(n,e){U3(n,e),e.add(n)}he.getSingleton().register("beforeColumnMove");he.getSingleton().register("afterColumnMove");const SR="manualColumnMove",Mge=120,yP="ht__manualColumnMove",gy="show-ui",M0="on-moving--columns",I0="after-selection--columns";var Go=new WeakMap,Ba=new WeakMap,Kr=new WeakMap,cp=new WeakMap,Xa=new WeakMap,Yo=new WeakMap,db=new WeakMap,bs=new WeakMap,ku=new WeakMap,py=new WeakMap,Mp=new WeakMap,_P=new WeakSet,SP=new WeakSet,vP=new WeakSet,RP=new WeakSet,EP=new WeakSet,kP=new WeakSet;class Ige extends rt{static get PLUGIN_KEY(){return SR}static get PLUGIN_PRIORITY(){return Mge}isEnabled(){return!!this.hot.getSettings()[SR]}enablePlugin(){this.enabled||(this.addHook("beforeOnCellMouseDown",(...e)=>Ud(this,_P,Hge).call(this,...e)),this.addHook("beforeOnCellMouseOver",(...e)=>Ud(this,vP,Oge).call(this,...e)),this.addHook("afterScrollVertically",()=>Ud(this,EP,Nge).call(this)),this.addHook("afterLoadData",(...e)=>Ud(this,kP,Pge).call(this,...e)),this.buildPluginUI(),this.registerEvents(),B(this.hot.rootElement,yP),super.enablePlugin())}updatePlugin(){this.disablePlugin(),this.enablePlugin(),this.moveBySettingsOrLoad(),super.updatePlugin()}disablePlugin(){oe(this.hot.rootElement,yP),this.unregisterEvents(),pe(this,Go).destroy(),pe(this,Ba).destroy(),super.disablePlugin()}moveColumn(e,t){return this.moveColumns([e],t)}moveColumns(e,t){const o=pe(this,db),i=this.isMovePossible(e,t),s=this.hot.runHooks("beforeColumnMove",e,t,o,i);if(jn(this,db,void 0),s===!1)return;i&&this.hot.columnIndexMapper.moveIndexes(e,t);const r=i&&this.isColumnOrderChanged(e,t);return this.hot.runHooks("afterColumnMove",e,t,o,i,r),r}dragColumn(e,t){return this.dragColumns([e],t)}dragColumns(e,t){const o=this.countFinalIndex(e,t);return jn(this,db,t),this.moveColumns(e,o)}isMovePossible(e,t){const o=this.hot.columnIndexMapper.getNotTrimmedIndexesLength(),i=e.length+t>o,s=t<0,r=e.some(l=>l<0),a=e.some(l=>l>=o);return!(i||s||r||a)}isColumnOrderChanged(e,t){return e.some((o,i)=>o-i!==t)}countFinalIndex(e,t){const o=$i(e,(i,s)=>(s<t&&(i+=1),i),0);return t-o}getColumnsWidth(e,t){const o=this.hot.columnIndexMapper;let i=0;for(let s=e;s<=t;s+=1){const r=o.getRenderableFromVisualIndex(s);s<0?i+=this.hot.view._wt.wtViewport.getRowHeaderWidth()||0:r!==null&&(i+=this.hot.view._wt.wtTable.getColumnWidth(r)||0)}return i}moveBySettingsOrLoad(){const e=this.hot.getSettings()[SR];Array.isArray(e)&&this.moveColumns(e,0)}isFixedColumnsStart(e){return e<this.hot.getSettings().fixedColumnsStart}prepareColumnsToMoving(e,t){const o=[];return Ee(e,t,i=>{o.push(i)}),o}refreshPositions(){const e=this.hot.view.getFirstFullyVisibleColumn();this.isFixedColumnsStart(pe(this,bs))&&e>0&&this.hot.scrollViewportTo({col:this.hot.columnIndexMapper.getNearestNotHiddenIndex(e-1,-1)});const t=this.hot.view._wt.wtTable,o=this.hot.view._wt.wtOverlays.scrollableElement,i=typeof o.scrollX=="number"?o.scrollX:o.scrollLeft;let s=this.hot.view.THEAD.offsetLeft+this.getColumnsWidth(0,pe(this,bs)-1);const r=t.hider.offsetWidth,a=t.TBODY.offsetLeft,l=pe(this,Go).getOffset().start,h=pe(this,Go).getSize().width;let c=0,d=0;if(this.hot.isRtl()){const p=this.hot.rootWindow,C=bn(this.hot.rootElement),_=p.innerWidth-pe(this,ku)-C;d=p.innerWidth-pe(this,Yo).eventPageX-_-(o.scrollX===void 0?i:0)}else d=pe(this,Yo).eventPageX-(pe(this,ku)-(o.scrollX===void 0?i:0));if(pe(this,py)&&(c=this.hot.view._wt.wtOverlays.inlineStartOverlay.clone.wtTable.getColumnHeader(-1).offsetWidth),this.isFixedColumnsStart(pe(this,bs))&&(s+=i),s+=c,pe(this,bs)<0)pe(this,Mp)>0?pe(this,Yo).col=0:pe(this,Yo).col=e>0?e-1:e;else if(pe(this,Yo).TD.offsetWidth/2+s<=d){const p=pe(this,bs)>=pe(this,cp)?pe(this,cp)-1:pe(this,bs);pe(this,Yo).col=p+1,s+=pe(this,Yo).TD.offsetWidth}else pe(this,Yo).col=pe(this,bs);let u=d,f=s;d+h+l>=r?u=r-h-l:d+l<a+c&&(u=a+c+Math.abs(l)),s>=r-1?f=r-1:f===0?f=1:o.scrollX!==void 0&&pe(this,bs)<pe(this,Mp)&&(f-=pe(this,ku)<=o.scrollX?pe(this,ku):0),pe(this,Go).setPosition(null,u),pe(this,Ba).setPosition(null,f)}registerEvents(){const{documentElement:e}=this.hot.rootDocument;this.eventManager.addEventListener(e,"mousemove",t=>Ud(this,SP,Age).call(this,t)),this.eventManager.addEventListener(e,"mouseup",()=>Ud(this,RP,Dge).call(this))}unregisterEvents(){this.eventManager.clear()}buildPluginUI(){pe(this,Go).build(),pe(this,Ba).build()}destroy(){pe(this,Go).destroy(),pe(this,Ba).destroy(),super.destroy()}constructor(...e){super(...e),Yd(this,_P),Yd(this,SP),Yd(this,vP),Yd(this,RP),Yd(this,EP),Yd(this,kP),Ws(this,Go,{writable:!0,value:void 0}),Ws(this,Ba,{writable:!0,value:void 0}),Ws(this,Kr,{writable:!0,value:void 0}),Ws(this,cp,{writable:!0,value:void 0}),Ws(this,Xa,{writable:!0,value:void 0}),Ws(this,Yo,{writable:!0,value:void 0}),Ws(this,db,{writable:!0,value:void 0}),Ws(this,bs,{writable:!0,value:void 0}),Ws(this,ku,{writable:!0,value:void 0}),Ws(this,py,{writable:!0,value:void 0}),Ws(this,Mp,{writable:!0,value:void 0}),jn(this,Go,new Rge(this.hot)),jn(this,Ba,new kge(this.hot)),jn(this,Kr,[]),jn(this,cp,0),jn(this,Xa,!1),jn(this,Yo,{})}}function Hge(n,e,t,o){const i=this.hot.view._wt.wtTable,s=this.hot.selection.isSelectedByColumnHeader(),r=this.hot.getSelectedRangeActive(),a=_e(n.target,"sortAction");if(!r||!s||pe(this,Xa)||n.button!==0||a){jn(this,Xa,!1),pe(this,Kr).length=0,oe(this.hot.rootElement,[M0,gy]);return}const l=pe(this,Ba).isBuilt()&&!pe(this,Ba).isAppended(),h=pe(this,Go).isBuilt()&&!pe(this,Go).isAppended();l&&h&&(pe(this,Ba).appendTo(i.hider),pe(this,Go).appendTo(i.hider));const{from:c,to:d}=r,u=Math.min(c.col,d.col),f=Math.max(c.col,d.col);if(e.row<0&&e.col>=u&&e.col<=f){o.column=!0,jn(this,Xa,!0);const p=t.firstChild?S4(n,t.firstChild).x:n.offsetX;pe(this,Yo).eventPageX=n.pageX,jn(this,bs,e.col),pe(this,Yo).TD=t,pe(this,Yo).col=e.col,jn(this,Kr,this.prepareColumnsToMoving(u,f)),jn(this,py,!!this.hot.getSettings().rowHeaders),jn(this,cp,this.hot.countCols()),jn(this,Mp,this.hot.getSettings().fixedColumnsStart),jn(this,ku,Ko(this.hot.rootElement).left);const C=pe(this,py)?-1:0,_=i.holder.scrollTop+i.getColumnHeaderHeight(0)+1,S=e.col<pe(this,Mp),T=this.hot.view._wt.wtOverlays.inlineStartOverlay.getOverlayOffset(),P=Math.abs(p-(this.hot.isRtl()?t.offsetWidth:0)),F=this.getColumnsWidth(u,e.col-1)+P,V=this.getColumnsWidth(C,u-1)+(S?T:0)+F;pe(this,Go).setPosition(_,V),pe(this,Go).setSize(this.getColumnsWidth(u,f),i.hider.offsetHeight-_),pe(this,Go).setOffset(null,-F),B(this.hot.rootElement,M0)}else oe(this.hot.rootElement,I0),jn(this,Xa,!1),pe(this,Kr).length=0}function Age(n){pe(this,Xa)&&(pe(this,Yo).eventPageX=n.pageX,this.refreshPositions())}function Oge(n,e,t,o){!this.hot.getSelectedRangeActive()||!pe(this,Xa)||(pe(this,Kr).indexOf(e.col)>-1?oe(this.hot.rootElement,gy):B(this.hot.rootElement,gy),o.row=!0,o.column=!0,o.cell=!0,jn(this,bs,e.col),pe(this,Yo).TD=t)}function Dge(){const n=pe(this,Yo).col,e=pe(this,Kr).length;if(jn(this,bs,void 0),jn(this,Xa,!1),oe(this.hot.rootElement,[M0,gy,I0]),this.hot.selection.isSelectedByColumnHeader()&&B(this.hot.rootElement,I0),e<1||n===void 0)return;const t=pe(this,Kr)[0],o=this.hot.toPhysicalColumn(t),i=this.dragColumns(pe(this,Kr),n);if(pe(this,Kr).length=0,i===!0){this.hot.view.adjustElementsSize(),this.hot.render();const s=this.hot.toVisualColumn(o),r=s+e-1;this.hot.selectColumns(s,r)}}function Nge(){const n=this.hot.view._wt.wtTable,e=n.getColumnHeaderHeight(0)+1,t=n.holder.scrollTop,o=e+t;pe(this,Go).setPosition(o),pe(this,Go).setSize(null,n.hider.offsetHeight-o)}function Pge(){this.moveBySettingsOrLoad()}function G3(n,e="horizontal"){const t=n.getBoundingClientRect(),o=e==="vertical"?t.height:t.width,i=e==="vertical"?n.offsetHeight:n.offsetWidth;if(!Number.isFinite(o)||!Number.isFinite(i)||o<=0||i<=0||o>=i&&o-i<=1)return 1;const s=o/i;return Number.isFinite(s)&&s>0?s:1}function j3(n,e){return!Number.isFinite(e)||e<=0?n:Math.round(n/e)}function q3(n,e){if(e.has(n))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Lge(n,e){return e.get?e.get.call(n):e.value}function Wge(n,e,t){if(e.set)e.set.call(n,t);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=t}}function K3(n,e,t){if(!e.has(n))throw new TypeError("attempted to "+t+" private field on non-instance");return e.get(n)}function se(n,e){var t=K3(n,e,"get");return Lge(n,t)}function fo(n,e,t){q3(n,e),e.set(n,t)}function Qe(n,e,t){var o=K3(n,e,"set");return Wge(n,o,t),t}function xa(n,e,t){if(!e.has(n))throw new TypeError("attempted to get private field on non-instance");return t}function Ma(n,e){q3(n,e),e.add(n)}const my="manualColumnResize",$ge=130;var rr=new WeakMap,_g=new WeakMap,Hi=new WeakMap,Ip=new WeakMap,lr=new WeakMap,TP=new WeakMap,kc=new WeakMap,Sg=new WeakMap,dC=new WeakMap,si=new WeakMap,Or=new WeakMap,wh=new WeakMap,_m=new WeakMap,bc=new WeakMap,Hp=new WeakMap,ys=new WeakMap,Gd=new WeakMap,Ap=new WeakMap,xP=new WeakSet,MP=new WeakSet,IP=new WeakSet,HP=new WeakSet,AP=new WeakSet,OP=new WeakSet,DP=new WeakSet,NP=new WeakSet,PP=new WeakSet;class Fge extends rt{static get PLUGIN_KEY(){return my}static get PLUGIN_PRIORITY(){return $ge}get inlineDir(){return this.hot.isRtl()?"right":"left"}isEnabled(){return this.hot.getSettings()[my]}enablePlugin(){this.enabled||(Qe(this,ys,new Ch),se(this,ys).addLocalHook("init",()=>xa(this,xP,Bge).call(this)),this.hot.columnIndexMapper.registerMap(this.pluginName,se(this,ys)),Qe(this,Gd,this.hot.columnIndexMapper.observeMapChange(se(this,ys),()=>{this.hot.view?.invalidateColumnWidthCache()})),this.addHook("modifyColWidth",(...e)=>xa(this,DP,jge).call(this,...e),1),this.addHook("beforeStretchingColumnWidth",(...e)=>xa(this,NP,qge).call(this,...e),1),this.addHook("beforeColumnResize",(...e)=>xa(this,PP,Kge).call(this,...e)),this.bindEvents(),super.enablePlugin())}updatePlugin(){this.disablePlugin(),this.enablePlugin(),super.updatePlugin()}disablePlugin(){se(this,Gd)&&(se(this,Gd).call(this),Qe(this,Gd,null)),Qe(this,Ap,se(this,ys).getValues()),this.hot.columnIndexMapper.unregisterMap(this.pluginName),super.disablePlugin()}setManualSize(e,t){const o=Math.max(t,20),i=this.hot.toPhysicalColumn(e);return se(this,ys).setValueAtIndex(i,o),o}clearManualSize(e){const t=this.hot.toPhysicalColumn(e);se(this,ys).setValueAtIndex(t,null)}setupHandlePosition(e){if(!e.parentNode||se(this,bc)>1)return;Qe(this,rr,e);const{_wt:t}=this.hot.view,o=t.wtTable.getCoords(se(this,rr)),i=o.col;if(i<0)return;const s=Tn(se(this,rr)),r=i<t.getSetting("fixedColumnsStart");let a;r&&(a=t.wtOverlays.topInlineStartCornerOverlay.getRelativeCellPosition(se(this,rr),o.row,o.col)),a||(a=t.wtOverlays.topOverlay.getRelativeCellPosition(se(this,rr),o.row,o.col)),Qe(this,_g,this.hot.columnIndexMapper.getVisualFromRenderableIndex(i)),Qe(this,Hi,[]);const l=this.hot.selection.isSelectedByCorner()||this.hot.selection.isSelectedByColumnHeader();if(this.hot.selection.isSelected()&&l){const h=this.hot.getSelectedRange();O(h,c=>{const d=c.getTopStartCorner().col,u=c.getBottomEndCorner().col;Ee(d,u,f=>{se(this,Hi).includes(f)||se(this,Hi).push(f)})})}se(this,Hi).includes(se(this,_g))||Qe(this,Hi,[se(this,_g)]),Qe(this,Sg,a.start-6),Qe(this,kc,bn(se(this,rr))),Qe(this,dC,G3(se(this,rr))),se(this,si).style.top=`${a.top}px`,se(this,si).style[this.inlineDir]=`${se(this,Sg)+se(this,kc)}px`,se(this,si).style.height=`${s}px`,this.hot.rootElement.appendChild(se(this,si))}refreshHandlePosition(){se(this,si).style[this.inlineDir]=`${se(this,Sg)+se(this,Ip)}px`}setupGuidePosition(){const e=parseInt(Tn(se(this,si)),10),t=parseInt(se(this,si).style.top,10)+e,o=this.hot.view.getTableHeight();B(se(this,si),"active"),B(se(this,Or),"active"),se(this,Or).style.top=`${t}px`,this.refreshGuidePosition(),se(this,Or).style.height=`${o-e}px`,this.hot.rootElement.appendChild(se(this,Or))}refreshGuidePosition(){se(this,Or).style[this.inlineDir]=se(this,si).style[this.inlineDir]}hideHandleAndGuide(){oe(se(this,si),"active"),oe(se(this,Or),"active")}checkIfColumnHeader(e){const t=Vc(e,["THEAD"],this.hot.rootElement),{topOverlay:o,topInlineStartCornerOverlay:i}=this.hot.view._wt.wtOverlays;return[o.clone.wtTable.THEAD,i.clone.wtTable.THEAD].includes(t)}getClosestTHParent(e){return e.tagName!=="TABLE"?e.tagName==="TH"?e:this.getClosestTHParent(e.parentNode):null}afterMouseDownTimeout(){const e=()=>{this.hot.view.adjustElementsSize(),this.hot.render()},t=(o,i)=>{const s=this.hot.runHooks("beforeColumnResize",se(this,lr),o,!0);s!==void 0&&Qe(this,lr,s),this.setManualSize(o,se(this,lr)),this.hot.runHooks("afterColumnResize",se(this,lr),o,!0),i&&e()};se(this,bc)>=2&&(se(this,Hi).length>1?(O(se(this,Hi),i=>{t(i)}),e()):O(se(this,Hi),i=>{t(i,!0)})),Qe(this,bc,0),Qe(this,Hp,null)}bindEvents(){const{rootWindow:e,rootElement:t}=this.hot;this.eventManager.addEventListener(t,"mouseover",o=>xa(this,MP,Vge).call(this,o)),this.eventManager.addEventListener(t,"mousedown",o=>xa(this,IP,zge).call(this,o)),this.eventManager.addEventListener(e,"mousemove",o=>xa(this,HP,Uge).call(this,o)),this.eventManager.addEventListener(e,"mouseup",()=>xa(this,AP,Yge).call(this)),this.eventManager.addEventListener(se(this,si),"contextmenu",()=>xa(this,OP,Gge).call(this))}destroy(){super.destroy()}constructor(e){super(e),Ma(this,xP),Ma(this,MP),Ma(this,IP),Ma(this,HP),Ma(this,AP),Ma(this,OP),Ma(this,DP),Ma(this,NP),Ma(this,PP),fo(this,rr,{writable:!0,value:void 0}),fo(this,_g,{writable:!0,value:void 0}),fo(this,Hi,{writable:!0,value:void 0}),fo(this,Ip,{writable:!0,value:void 0}),fo(this,lr,{writable:!0,value:void 0}),fo(this,TP,{writable:!0,value:void 0}),fo(this,kc,{writable:!0,value:void 0}),fo(this,Sg,{writable:!0,value:void 0}),fo(this,dC,{writable:!0,value:void 0}),fo(this,si,{writable:!0,value:void 0}),fo(this,Or,{writable:!0,value:void 0}),fo(this,wh,{writable:!0,value:void 0}),fo(this,_m,{writable:!0,value:void 0}),fo(this,bc,{writable:!0,value:void 0}),fo(this,Hp,{writable:!0,value:void 0}),fo(this,ys,{writable:!0,value:void 0}),fo(this,Gd,{writable:!0,value:void 0}),fo(this,Ap,{writable:!0,value:void 0}),Qe(this,rr,null),Qe(this,_g,null),Qe(this,Hi,[]),Qe(this,Ip,null),Qe(this,lr,null),Qe(this,TP,null),Qe(this,kc,null),Qe(this,Sg,null),Qe(this,dC,1),Qe(this,si,this.hot.rootDocument.createElement("DIV")),Qe(this,Or,this.hot.rootDocument.createElement("DIV")),Qe(this,wh,null),Qe(this,_m,!1),Qe(this,bc,0),Qe(this,Hp,null),Qe(this,Gd,null),B(se(this,si),"manualColumnResizer"),B(se(this,Or),"manualColumnResizerGuide")}}function Bge(){const n=this.hot.getSettings()[my];Array.isArray(n)?(this.hot.batchExecution(()=>{n.forEach((e,t)=>{se(this,ys).setValueAtIndex(t,e)})},!0),Qe(this,Ap,n)):n===!0&&Array.isArray(se(this,Ap))&&this.hot.batchExecution(()=>{se(this,Ap).forEach((e,t)=>{se(this,ys).setValueAtIndex(t,e)})},!0)}function Vge(n){if(!cF(n.target)&&se(this,_m)!==!0&&this.checkIfColumnHeader(n.target)){const e=this.getClosestTHParent(n.target);if(!e)return;const t=e.getAttribute("colspan");e&&(t===null||t==="1")&&(se(this,wh)||this.setupHandlePosition(e))}}function zge(n){n.target.parentNode===this.hot.rootElement&&_e(n.target,"manualColumnResizer")&&(this.setupHandlePosition(se(this,rr)),this.setupGuidePosition(),Qe(this,wh,!0),se(this,Hp)===null&&Qe(this,Hp,this.hot._registerTimeout(()=>this.afterMouseDownTimeout(),500)),Qe(this,bc,se(this,bc)+1),this.startX=n.pageX,Qe(this,lr,se(this,kc)))}function Uge(n){if(se(this,wh)){const e=(n.pageX-this.startX)*this.hot.getDirectionFactor(),t=j3(e,se(this,dC));Qe(this,Ip,se(this,kc)+t),O(se(this,Hi),o=>{Qe(this,lr,this.setManualSize(o,se(this,Ip)))}),this.refreshHandlePosition(),this.refreshGuidePosition()}}function Yge(){const n=()=>{this.hot.view.adjustElementsSize(),this.hot.render()},e=(t,o)=>{this.hot.runHooks("beforeColumnResize",se(this,lr),t,!1),o&&n(),this.hot.runHooks("afterColumnResize",se(this,lr),t,!1)};se(this,wh)&&(this.hideHandleAndGuide(),Qe(this,wh,!1),se(this,lr)!==se(this,kc)&&(se(this,Hi).length>1?(O(se(this,Hi),o=>{e(o)}),n()):O(se(this,Hi),o=>{e(o,!0)})),this.setupHandlePosition(se(this,rr)))}function Gge(){this.hideHandleAndGuide(),this.hot.rootElement.removeChild(se(this,si)),this.hot.rootElement.removeChild(se(this,Or)),Qe(this,wh,!1),Qe(this,_m,!0),this.hot._registerMicrotask(()=>{Qe(this,_m,!1)})}function jge(n,e){let t=n;if(this.enabled){const o=this.hot.toPhysicalColumn(e),i=se(this,ys).getValueAtIndex(o);this.hot.getSettings()[my]&&i&&(t=i)}return t}function qge(n,e){const t=se(this,ys).getValueAtIndex(this.hot.toPhysicalColumn(e));return typeof t=="number"?t:n}function Kge(){this.hot.view._wt.wtViewport.resetHasOversizedColumnHeadersMarked()}const vR=0,LP=1,WP=2,jd="px";let X3=class{appendTo(e){e.appendChild(this._element),this.state=WP}build(){this.state===vR&&(this._element=this.hot.rootDocument.createElement("div"),this.state=LP)}destroy(){this.isAppended()&&this._element.parentElement.removeChild(this._element),this._element=null,this.state=vR}isAppended(){return this.state===WP}isBuilt(){return this.state>=LP}setPosition(e,t){e!==void 0&&(this._element.style.top=e+jd),t!==void 0&&(this._element.style.left=t+jd)}getPosition(){return{top:this._element.style.top?parseInt(this._element.style.top,10):0,left:this._element.style.left?parseInt(this._element.style.left,10):0}}setSize(e,t){e&&(this._element.style.width=e+jd),t&&(this._element.style.height=t+jd)}getSize(){return{width:this._element.style.width?parseInt(this._element.style.width,10):0,height:this._element.style.height?parseInt(this._element.style.height,10):0}}setOffset(e,t){e&&(this._element.style.marginTop=e+jd),t&&(this._element.style.marginLeft=t+jd)}getOffset(){return{top:this._element.style.marginTop?parseInt(this._element.style.marginTop,10):0,left:this._element.style.marginLeft?parseInt(this._element.style.marginLeft,10):0}}constructor(e){this._element=null,this.state=vR,this.hot=e}};const Xge="ht__manualRowMove--backlight";class Zge extends X3{build(){super.build(),B(this._element,Xge)}}const Qge="ht__manualRowMove--guideline";class Jge extends X3{build(){super.build(),B(this._element,Qge)}}function Z3(n,e){if(e.has(n))throw new TypeError("Cannot initialize the same private elements twice on an object")}function epe(n,e){return e.get?e.get.call(n):e.value}function tpe(n,e,t){if(e.set)e.set.call(n,t);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=t}}function Q3(n,e,t){if(!e.has(n))throw new TypeError("attempted to "+t+" private field on non-instance");return e.get(n)}function Fe(n,e){var t=Q3(n,e,"get");return epe(n,t)}function qd(n,e,t){Z3(n,e),e.set(n,t)}function hr(n,e,t){var o=Q3(n,e,"set");return tpe(n,o,t),t}function Kd(n,e,t){if(!e.has(n))throw new TypeError("attempted to get private field on non-instance");return t}function Xd(n,e){Z3(n,e),e.add(n)}he.getSingleton().register("beforeRowMove");he.getSingleton().register("afterRowMove");const ub="manualRowMove",npe=140,$P="ht__manualRowMove",wy="show-ui",H0="on-moving--rows",A0="after-selection--rows";var jo=new WeakMap,Va=new WeakMap,Xr=new WeakMap,oh=new WeakMap,ci=new WeakMap,fb=new WeakMap,FP=new WeakSet,BP=new WeakSet,VP=new WeakSet,zP=new WeakSet,UP=new WeakSet,YP=new WeakSet;class ope extends rt{static get PLUGIN_KEY(){return ub}static get PLUGIN_PRIORITY(){return npe}static get SETTING_KEYS(){return[ub]}isEnabled(){return!!this.hot.getSettings()[ub]}enablePlugin(){this.enabled||(this.addHook("beforeOnCellMouseDown",(...e)=>Kd(this,FP,ipe).call(this,...e)),this.addHook("beforeOnCellMouseOver",(...e)=>Kd(this,VP,rpe).call(this,...e)),this.addHook("afterScrollHorizontally",()=>Kd(this,UP,lpe).call(this)),this.addHook("afterLoadData",(...e)=>Kd(this,YP,hpe).call(this,...e)),this.buildPluginUI(),this.registerEvents(),B(this.hot.rootElement,$P),super.enablePlugin())}updatePlugin(){this.disablePlugin(),this.enablePlugin(),this.moveBySettingsOrLoad(),super.updatePlugin()}disablePlugin(){oe(this.hot.rootElement,$P),this.unregisterEvents(),Fe(this,jo).destroy(),Fe(this,Va).destroy(),super.disablePlugin()}moveRow(e,t){return this.moveRows([e],t)}moveRows(e,t){const o=Fe(this,fb),i=this.isMovePossible(e,t),s=this.hot.runHooks("beforeRowMove",e,t,o,i);if(hr(this,fb,void 0),s===!1)return;i&&this.hot.rowIndexMapper.moveIndexes(e,t);const r=i&&this.isRowOrderChanged(e,t);return this.hot.runHooks("afterRowMove",e,t,o,i,r),r}dragRow(e,t){return this.dragRows([e],t)}dragRows(e,t){const o=this.countFinalIndex(e,t);return hr(this,fb,t),this.moveRows(e,o)}isMovePossible(e,t){const o=this.hot.rowIndexMapper.getNotTrimmedIndexesLength(),i=e.length+t>o,s=t<0,r=e.some(l=>l<0),a=e.some(l=>l>=o);return!(i||s||r||a)}isRowOrderChanged(e,t){return e.some((o,i)=>o-i!==t)}countFinalIndex(e,t){const o=$i(e,(i,s)=>(s<t&&(i+=1),i),0);return t-o}getRowsHeight(e,t){const o=this.hot.rowIndexMapper;let i=0;for(let s=e;s<=t;s++){const r=o.getRenderableFromVisualIndex(s);r!==null&&(i+=this.hot.view._wt.wtTable.getRowHeight(r)||this.hot.stylesHandler.getDefaultRowHeight())}return i}moveBySettingsOrLoad(){const e=this.hot.getSettings()[ub];Array.isArray(e)&&this.moveRows(e,0)}isFixedRowTop(e){return e<this.hot.getSettings().fixedRowsTop}isFixedRowBottom(e){return e>this.hot.countRows()-1-this.hot.getSettings().fixedRowsBottom}prepareRowsToMoving(){const e=this.hot.getSelectedRangeActive(),t=[];if(!e)return t;const{from:o,to:i}=e,s=Math.min(o.row,i.row),r=Math.max(o.row,i.row);return Ee(s,r,a=>{t.push(a)}),t}refreshPositions(){const e=Fe(this,ci).coords,t=this.hot.getFirstFullyVisibleRow(),o=this.hot.getLastFullyVisibleRow(),i=this.hot.countRows();this.isFixedRowTop(e.row)&&t>0&&this.hot.scrollViewportTo(this.hot.rowIndexMapper.getNearestNotHiddenIndex(t-1,-1)),this.isFixedRowBottom(e.row)&&o<i&&this.hot.scrollViewportTo(this.hot.rowIndexMapper.getNearestNotHiddenIndex(o+1,1),void 0,!0);const s=this.hot.view._wt.wtTable,r=Fe(this,ci).TD,a=this.hot.rootElement,l=Ko(a),h=jp(a),c=s.holder.scrollTop,d=this.hot.rootWindow!==h?h.scrollTop:0,u=l.top-d,f=Fe(this,ci).eventPageY-u+c,p=s.hider.offsetHeight,C=s.TBODY.offsetTop,_=Fe(this,jo).getOffset().top,S=Fe(this,jo).getSize().height,T=r.offsetHeight/2,P=r.offsetHeight;let F=this.hot.view.THEAD.offsetHeight+this.getRowsHeight(0,e.row-1);const V=f>=F+T;this.isFixedRowTop(e.row)&&(F+=this.hot.view._wt.wtOverlays.topOverlay.getOverlayOffset()),e.row<0?Fe(this,ci).row=t>0?t-1:t:V?(Fe(this,ci).row=e.row+1,F+=e.row===0?P-1:P):Fe(this,ci).row=e.row;let D=f,I=F;f+S+_>=p?D=p-S-_:f+_<C&&(D=C+Math.abs(_)),F>=p-1&&(I=p-1),Fe(this,jo).setPosition(D),Fe(this,Va).setPosition(I)}registerEvents(){const{documentElement:e}=this.hot.rootDocument;this.eventManager.addEventListener(e,"mousemove",t=>Kd(this,BP,spe).call(this,t)),this.eventManager.addEventListener(e,"mouseup",()=>Kd(this,zP,ape).call(this))}unregisterEvents(){this.eventManager.clear()}buildPluginUI(){Fe(this,jo).build(),Fe(this,Va).build()}destroy(){Fe(this,jo).destroy(),Fe(this,Va).destroy(),super.destroy()}constructor(...e){super(...e),Xd(this,FP),Xd(this,BP),Xd(this,VP),Xd(this,zP),Xd(this,UP),Xd(this,YP),qd(this,jo,{writable:!0,value:void 0}),qd(this,Va,{writable:!0,value:void 0}),qd(this,Xr,{writable:!0,value:void 0}),qd(this,oh,{writable:!0,value:void 0}),qd(this,ci,{writable:!0,value:void 0}),qd(this,fb,{writable:!0,value:void 0}),hr(this,jo,new Zge(this.hot)),hr(this,Va,new Jge(this.hot)),hr(this,Xr,[]),hr(this,ci,{})}}function ipe(n,e,t,o){const{wtTable:i,wtViewport:s}=this.hot.view._wt,r=this.hot.selection.isSelectedByRowHeader(),a=this.hot.getSelectedRangeActive();if(!a||!r||Fe(this,oh)||n.button!==0){hr(this,oh,!1),Fe(this,Xr).length=0,oe(this.hot.rootElement,[H0,wy]);return}const l=Fe(this,Va).isBuilt()&&!Fe(this,Va).isAppended(),h=Fe(this,jo).isBuilt()&&!Fe(this,jo).isAppended();l&&h&&(Fe(this,Va).appendTo(i.hider),Fe(this,jo).appendTo(i.hider));const{from:c,to:d}=a,u=Math.min(c.row,d.row),f=Math.max(c.row,d.row);if(e.col<0&&e.row>=u&&e.row<=f){o.row=!0,hr(this,oh,!0),Fe(this,ci).eventPageY=n.pageY,Fe(this,ci).coords=e,Fe(this,ci).TD=t,hr(this,Xr,this.prepareRowsToMoving());const p=i.holder.scrollLeft+s.getRowHeaderWidth(),C=this.getRowsHeight(u,e.row-1)+(n.clientY-t.getBoundingClientRect().top);Fe(this,jo).setPosition(null,p),Fe(this,jo).setSize(i.hider.offsetWidth-p,this.getRowsHeight(u,f)),Fe(this,jo).setOffset(-C,null),B(this.hot.rootElement,H0),this.refreshPositions()}else oe(this.hot.rootElement,A0),hr(this,oh,!1),Fe(this,Xr).length=0}function spe(n){Fe(this,oh)&&(Fe(this,ci).eventPageY=n.pageY,this.refreshPositions())}function rpe(n,e,t,o){!this.hot.getSelectedRangeActive()||!Fe(this,oh)||(Fe(this,Xr).indexOf(e.row)>-1?oe(this.hot.rootElement,wy):B(this.hot.rootElement,wy),o.row=!0,o.column=!0,o.cell=!0,Fe(this,ci).coords=e,Fe(this,ci).TD=t)}function ape(){const n=Fe(this,ci).row,e=Fe(this,Xr).length;if(hr(this,oh,!1),oe(this.hot.rootElement,[H0,wy,A0]),this.hot.selection.isSelectedByRowHeader()&&B(this.hot.rootElement,A0),e<1||n===void 0)return;const t=Fe(this,Xr)[0],o=this.hot.toPhysicalRow(t),i=this.dragRows(Fe(this,Xr),n);if(Fe(this,Xr).length=0,i===!0){this.hot.view.adjustElementsSize(),this.hot.render();const s=this.hot.toVisualRow(o),r=s+e-1;this.hot.selectRows(s,r)}}function lpe(){const n=this.hot.view._wt.wtTable,e=this.hot.view._wt.wtViewport.getRowHeaderWidth(),t=n.holder.scrollLeft,o=e+t;Fe(this,jo).setPosition(null,o),Fe(this,jo).setSize(n.hider.offsetWidth-o)}function hpe(){this.moveBySettingsOrLoad()}function J3(n,e){if(e.has(n))throw new TypeError("Cannot initialize the same private elements twice on an object")}function cpe(n,e){return e.get?e.get.call(n):e.value}function dpe(n,e,t){if(e.set)e.set.call(n,t);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=t}}function eY(n,e,t){if(!e.has(n))throw new TypeError("attempted to "+t+" private field on non-instance");return e.get(n)}function ie(n,e){var t=eY(n,e,"get");return cpe(n,t)}function go(n,e,t){J3(n,e),e.set(n,t)}function Ke(n,e,t){var o=eY(n,e,"set");return dpe(n,o,t),t}function qh(n,e,t){if(!e.has(n))throw new TypeError("attempted to get private field on non-instance");return t}function Kh(n,e){J3(n,e),e.add(n)}const by="manualRowResize",upe=30;var gs=new WeakMap,vg=new WeakMap,Ai=new WeakMap,Ou=new WeakMap,za=new WeakMap,Cy=new WeakMap,Tc=new WeakMap,Rg=new WeakMap,uC=new WeakMap,Lo=new WeakMap,er=new WeakMap,bh=new WeakMap,Sm=new WeakMap,Cc=new WeakMap,Op=new WeakMap,Br=new WeakMap,Zd=new WeakMap,Dp=new WeakMap,GP=new WeakSet,jP=new WeakSet,qP=new WeakSet,KP=new WeakSet,XP=new WeakSet,ZP=new WeakSet,QP=new WeakSet;class fpe extends rt{static get PLUGIN_KEY(){return by}static get PLUGIN_PRIORITY(){return upe}get inlineDir(){return this.hot.isRtl()?"right":"left"}isEnabled(){return this.hot.getSettings()[by]}enablePlugin(){this.enabled||(Ke(this,Br,new Ch),ie(this,Br).addLocalHook("init",()=>qh(this,QP,ype).call(this)),this.hot.rowIndexMapper.registerMap(this.pluginName,ie(this,Br)),Ke(this,Zd,this.hot.rowIndexMapper.observeMapChange(ie(this,Br),()=>{this.hot.view?.invalidateRowHeightCache()})),this.addHook("modifyRowHeight",(e,t)=>qh(this,ZP,Cpe).call(this,e,t)),this.bindEvents(),super.enablePlugin())}updatePlugin(){this.disablePlugin(),this.enablePlugin(),super.updatePlugin()}disablePlugin(){ie(this,Zd)&&(ie(this,Zd).call(this),Ke(this,Zd,null)),Ke(this,Dp,ie(this,Br).getValues()),this.hot.rowIndexMapper.unregisterMap(this.pluginName),super.disablePlugin()}setManualSize(e,t){const o=this.hot.toPhysicalRow(e),i=Math.max(t,this.hot.stylesHandler.getDefaultRowHeight());return ie(this,Br).setValueAtIndex(o,i),i}getLastDesiredRowHeight(){return ie(this,Ou)}setupHandlePosition(e){if(!e.parentNode||ie(this,Cc)>1)return;Ke(this,gs,e);const{view:t}=this.hot,{_wt:o}=t,i=o.wtTable.getCoords(ie(this,gs)),s=i.row;if(s<0)return;const r=bn(ie(this,gs)),a=s<o.getSetting("fixedRowsTop"),l=s>=t.countNotHiddenRowIndexes(0,1)-o.getSetting("fixedRowsBottom");let h;a?h=o.wtOverlays.topInlineStartCornerOverlay.getRelativeCellPosition(ie(this,gs),i.row,i.col):l&&(h=o.wtOverlays.bottomInlineStartCornerOverlay.getRelativeCellPosition(ie(this,gs),i.row,i.col)),h||(h=o.wtOverlays.inlineStartOverlay.getRelativeCellPosition(ie(this,gs),i.row,i.col)),Ke(this,vg,this.hot.rowIndexMapper.getVisualFromRenderableIndex(s)),Ke(this,Ai,[]);const c=this.hot.selection.isSelectedByCorner()||this.hot.selection.isSelectedByRowHeader();if(this.hot.selection.isSelected()&&c){const d=this.hot.getSelectedRange();O(d,u=>{const f=u.getTopStartCorner().row,p=u.getBottomStartCorner().row;Ee(f,p,C=>{ie(this,Ai).includes(C)||ie(this,Ai).push(C)})})}ie(this,Ai).includes(ie(this,vg))||Ke(this,Ai,[ie(this,vg)]),Ke(this,Rg,h.top-6),Ke(this,Tc,Tn(ie(this,gs))),Ke(this,uC,G3(ie(this,gs),"vertical")),ie(this,Lo).style.top=`${ie(this,Rg)+ie(this,Tc)}px`,ie(this,Lo).style[this.inlineDir]=`${h.start}px`,ie(this,Lo).style.width=`${r}px`,this.hot.rootElement.appendChild(ie(this,Lo))}refreshHandlePosition(){ie(this,Lo).style.top=`${ie(this,Rg)+ie(this,Ou)}px`}setupGuidePosition(){const e=parseInt(bn(ie(this,Lo)),10),t=parseInt(ie(this,Lo).style[this.inlineDir],10)+e,o=this.hot.view.getTableWidth();B(ie(this,Lo),"active"),B(ie(this,er),"active"),ie(this,er).style.top=ie(this,Lo).style.top,ie(this,er).style[this.inlineDir]=`${t}px`,ie(this,er).style.width=`${o-e}px`,this.hot.rootElement.appendChild(ie(this,er))}refreshGuidePosition(){ie(this,er).style.top=ie(this,Lo).style.top}hideHandleAndGuide(){oe(ie(this,Lo),"active"),oe(ie(this,er),"active")}checkIfRowHeader(e){const t=Vc(e,["TBODY"],this.hot.rootElement),{inlineStartOverlay:o,topInlineStartCornerOverlay:i,bottomInlineStartCornerOverlay:s}=this.hot.view._wt.wtOverlays;return[o.clone.wtTable.TBODY,i.clone.wtTable.TBODY,s.clone.wtTable.TBODY].includes(t)}getClosestTHParent(e){return e.tagName!=="TABLE"?e.tagName==="TH"?e:this.getClosestTHParent(e.parentNode):null}getActualRowHeight(e){const t=this.hot.view._wt.wtTable.getRowHeight(e);return t!==void 0&&ie(this,za)<t?t:ie(this,za)}afterMouseDownTimeout(){const e=()=>{this.hot.view.adjustElementsSize(),this.hot.render()},t=(o,i)=>{const s=this.hot.runHooks("beforeRowResize",this.getActualRowHeight(o),o,!0);s!==void 0&&Ke(this,za,s),this.setManualSize(o,ie(this,za)),this.hot.runHooks("afterRowResize",this.getActualRowHeight(o),o,!0),i&&e()};ie(this,Cc)>=2&&(ie(this,Ai).length>1?(O(ie(this,Ai),i=>{t(i)}),e()):O(ie(this,Ai),i=>{t(i,!0)})),Ke(this,Cc,0),Ke(this,Op,null)}bindEvents(){const{rootElement:e,rootWindow:t}=this.hot;this.eventManager.addEventListener(e,"mouseover",o=>qh(this,GP,gpe).call(this,o)),this.eventManager.addEventListener(e,"mousedown",o=>qh(this,jP,ppe).call(this,o)),this.eventManager.addEventListener(t,"mousemove",o=>qh(this,qP,mpe).call(this,o)),this.eventManager.addEventListener(t,"mouseup",()=>qh(this,KP,wpe).call(this)),this.eventManager.addEventListener(ie(this,Lo),"contextmenu",()=>qh(this,XP,bpe).call(this))}destroy(){super.destroy()}constructor(e){super(e),Kh(this,GP),Kh(this,jP),Kh(this,qP),Kh(this,KP),Kh(this,XP),Kh(this,ZP),Kh(this,QP),go(this,gs,{writable:!0,value:void 0}),go(this,vg,{writable:!0,value:void 0}),go(this,Ai,{writable:!0,value:void 0}),go(this,Ou,{writable:!0,value:void 0}),go(this,za,{writable:!0,value:void 0}),go(this,Cy,{writable:!0,value:void 0}),go(this,Tc,{writable:!0,value:void 0}),go(this,Rg,{writable:!0,value:void 0}),go(this,uC,{writable:!0,value:void 0}),go(this,Lo,{writable:!0,value:void 0}),go(this,er,{writable:!0,value:void 0}),go(this,bh,{writable:!0,value:void 0}),go(this,Sm,{writable:!0,value:void 0}),go(this,Cc,{writable:!0,value:void 0}),go(this,Op,{writable:!0,value:void 0}),go(this,Br,{writable:!0,value:void 0}),go(this,Zd,{writable:!0,value:void 0}),go(this,Dp,{writable:!0,value:void 0}),Ke(this,gs,null),Ke(this,vg,null),Ke(this,Ai,[]),Ke(this,Ou,null),Ke(this,za,null),Ke(this,Cy,null),Ke(this,Tc,null),Ke(this,Rg,null),Ke(this,uC,1),Ke(this,Lo,this.hot.rootDocument.createElement("DIV")),Ke(this,er,this.hot.rootDocument.createElement("DIV")),Ke(this,bh,!1),Ke(this,Sm,!1),Ke(this,Cc,0),Ke(this,Op,null),Ke(this,Zd,null),B(ie(this,Lo),"manualRowResizer"),B(ie(this,er),"manualRowResizerGuide")}}function gpe(n){if(!cF(n.target)&&ie(this,Sm)!==!0&&this.checkIfRowHeader(n.target)){const e=this.getClosestTHParent(n.target);e&&(ie(this,bh)||this.setupHandlePosition(e))}}function ppe(n){n.target.parentNode===this.hot.rootElement&&_e(n.target,"manualRowResizer")&&(this.setupHandlePosition(ie(this,gs)),this.setupGuidePosition(),Ke(this,bh,!0),ie(this,Op)===null&&Ke(this,Op,this.hot._registerTimeout(()=>this.afterMouseDownTimeout(),500)),Ke(this,Cc,ie(this,Cc)+1),Ke(this,Cy,n.pageY),Ke(this,za,ie(this,Tc)))}function mpe(n){if(ie(this,bh)){const e=n.pageY-ie(this,Cy),t=j3(e,ie(this,uC));Ke(this,Ou,ie(this,Tc)+t),O(ie(this,Ai),o=>{Ke(this,za,this.setManualSize(o,ie(this,Ou)))}),this.refreshHandlePosition(),this.refreshGuidePosition()}}function wpe(){const n=()=>{this.hot.view.adjustElementsSize(),this.hot.render()},e=(t,o)=>{this.hot.runHooks("beforeRowResize",this.getActualRowHeight(t),t,!1),o&&n(),this.hot.runHooks("afterRowResize",this.getActualRowHeight(t),t,!1)};ie(this,bh)&&(this.hideHandleAndGuide(),Ke(this,bh,!1),ie(this,za)!==ie(this,Tc)&&(ie(this,Ai).length>1?(O(ie(this,Ai),o=>{e(o)}),n()):O(ie(this,Ai),o=>{e(o,!0)})),this.setupHandlePosition(ie(this,gs)))}function bpe(){this.hideHandleAndGuide(),this.hot.rootElement.removeChild(ie(this,Lo)),this.hot.rootElement.removeChild(ie(this,er)),Ke(this,bh,!1),Ke(this,Sm,!0),this.hot._registerMicrotask(()=>{Ke(this,Sm,!1)})}function Cpe(n,e){let t=n;if(this.enabled){const o=this.hot.toPhysicalRow(e),i=ie(this,Br).getValueAtIndex(o);this.hot.getSettings()[by]&&i&&(this.hot.getPlugin("autoRowSize")?.isEnabled()?t=Math.max(i,t??0):t=i)}return t}function ype(){const n=this.hot.getSettings()[by];this.hot.batchExecution(()=>{Array.isArray(n)?(n.forEach((e,t)=>{ie(this,Br).setValueAtIndex(t,e)}),Ke(this,Dp,n)):n===!0&&Array.isArray(ie(this,Dp))&&ie(this,Dp).forEach((e,t)=>{ie(this,Br).setValueAtIndex(t,e)})},!0)}function _pe(n,e){if(e.has(n))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Spe(n,e){return e.get?e.get.call(n):e.value}function vpe(n,e,t){if(e.set)e.set.call(n,t);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=t}}function tY(n,e,t){if(!e.has(n))throw new TypeError("attempted to "+t+" private field on non-instance");return e.get(n)}function JP(n,e){var t=tY(n,e,"get");return Spe(n,t)}function Rpe(n,e,t){_pe(n,e),e.set(n,t)}function Eg(n,e,t){var o=tY(n,e,"set");return vpe(n,o,t),t}var Il=new WeakMap;class Wr{static NEGATIVE_VALUES_WARNING({row:e,col:t,rowspan:o,colspan:i}){return pt`The merged cell declared with {row: ${e}, col: ${t},\x20
|
|
259
|
+
rowspan: ${o}, colspan: ${i}} contains negative values, which is\x20
|
|
260
|
+
not supported. It will not be added to the collection.`}static IS_OUT_OF_BOUNDS_WARNING({row:e,col:t}){return pt`The merged cell declared at [${e}, ${t}] is positioned\x20
|
|
261
|
+
(or positioned partially) outside of the table range. It was not added to the table, please fix your setup.`}static IS_SINGLE_CELL({row:e,col:t}){return pt`The merged cell declared at [${e}, ${t}] has both "rowspan"\x20
|
|
262
|
+
and "colspan" declared as "1", which makes it a single cell. It cannot be added to the collection.`}static ZERO_SPAN_WARNING({row:e,col:t}){return pt`The merged cell declared at [${e}, ${t}] has "rowspan"\x20
|
|
263
|
+
or "colspan" declared as "0", which is not supported. It cannot be added to the collection.`}static containsNegativeValues({row:e,col:t,rowspan:o,colspan:i}){return e<0||t<0||o<0||i<0}static isSingleCell({rowspan:e,colspan:t}){return t===1&&e===1}static containsZeroSpan({rowspan:e,colspan:t}){return t===0||e===0}static isOutOfBounds(e,t,o){return e.row<0||e.col<0||e.row>=t||e.row+e.rowspan-1>=t||e.col>=o||e.col+e.colspan-1>=o}normalize(e){const t=e.countRows(),o=e.countCols();this.row<0?this.row=0:this.row>t-1&&(this.row=t-1),this.col<0?this.col=0:this.col>o-1&&(this.col=o-1),this.row+this.rowspan>t-1&&(this.rowspan=t-this.row),this.col+this.colspan>o-1&&(this.colspan=o-this.col),Eg(this,Il,null)}includes(e,t){return this.row<=e&&this.col<=t&&this.row+this.rowspan-1>=e&&this.col+this.colspan-1>=t}includesHorizontally(e){return this.col<=e&&this.col+this.colspan-1>=e}includesVertically(e){return this.row<=e&&this.row+this.rowspan-1>=e}shift(e,t){const o=e[0]||e[1],i=t+Math.abs(e[0]||e[1])-1,s=e[0]?"colspan":"rowspan",r=e[0]?"col":"row",a=Math.min(t,i),l=Math.max(t,i),h=this[r],c=this[r]+this[s]-1;if(h>=t&&(this[r]+=o),o>0)t<=c&&t>h&&(this[s]+=o);else if(o<0){if(a<=h&&l>=c)return this.removed=!0,Eg(this,Il,null),!1;if(h>=a&&h<=l){const d=l-h+1,u=Math.abs(o)-d;this[r]-=u+o,this[s]-=d}else if(h<=a&&c>=l)this[s]+=o;else if(h<=a&&c>=a&&c<l){const d=c-a+1;this[s]-=d}}return Eg(this,Il,null),!0}isFarther(e,t){return e?t==="down"?e.row+e.rowspan-1<this.row+this.rowspan-1:t==="up"?e.row>this.row:t==="right"?e.col+e.colspan-1<this.col+this.colspan-1:t==="left"?e.col>this.col:null:!0}getLastRow(){return this.row+this.rowspan-1}getLastColumn(){return this.col+this.colspan-1}getRange(){return JP(this,Il)||Eg(this,Il,this.cellRangeFactory(this.cellCoordsFactory(this.row,this.col),this.cellCoordsFactory(this.row,this.col),this.cellCoordsFactory(this.getLastRow(),this.getLastColumn()))),JP(this,Il)}constructor(e,t,o,i,s,r){Rpe(this,Il,{writable:!0,value:void 0}),this.removed=!1,Eg(this,Il,null),this.row=e,this.col=t,this.rowspan=o,this.colspan=i,this.cellCoordsFactory=s,this.cellRangeFactory=r}}function Epe(n,e){if(e.has(n))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Xh(n,e,t){if(!e.has(n))throw new TypeError("attempted to get private field on non-instance");return t}function RR(n,e){Epe(n,e),e.add(n)}var kg=new WeakSet,ER=new WeakSet,eL=new WeakSet;class yy{static IS_OVERLAPPING_WARNING({row:e,col:t}){return pt`The merged cell declared at [${e}, ${t}], overlaps\x20
|
|
264
|
+
with the other declared merged cell. The overlapping merged cell was not added to the table, please\x20
|
|
265
|
+
fix your setup.`}get(e,t){return this.mergedCellsMatrix.has(e)?this.mergedCellsMatrix.get(e).get(t)??!1:!1}getByRange(e){const{row:t,col:o}=e.getTopStartCorner(),{row:i,col:s}=e.getBottomEndCorner(),r=this.mergedCells.length;let a=!1;for(let l=0;l<r;l++){const h=this.mergedCells[l],{row:c,col:d,rowspan:u,colspan:f}=h;if(c>=t&&c+u-1<=i&&d>=o&&d+f-1<=s){a=h;break}}return a}filterOverlappingMergeCells(e){const t=new Set;return this.mergedCells.forEach(i=>{const{row:s,col:r,colspan:a,rowspan:l}=i;for(let h=s;h<s+l;h++)for(let c=r;c<r+a;c++)t.add(`r${h},c${c}`)}),e.filter(i=>{const{row:s,col:r,colspan:a,rowspan:l}=i,h=new Set;let c=!1;for(let d=s;d<s+l;d++){for(let u=r;u<r+a;u++){const f=`r${d},c${u}`;if(t.has(f)){Ie(yy.IS_OVERLAPPING_WARNING(i)),c=!0;break}h.add(f)}if(c)break}return c||t.add(...h),!c})}getWithinRange(e,t=!1){const{row:o,col:i}=e.getTopStartCorner(),{row:s,col:r}=e.getBottomEndCorner(),a=[];for(let l=o;l<=s;l++)for(let h=i;h<=r;h++){const c=this.get(l,h);c&&(t||!t&&c.row===l&&c.col===h)&&a.push(c)}return a}add(e,t=!1){const o=e.row,i=e.col,s=e.rowspan,r=e.colspan,a=new Wr(o,i,s,r,this.hot._createCellCoords,this.hot._createCellRange),l=this.get(o,i),h=t?!1:this.isOverlapping(a);return!l&&!h?(this.hot&&a.normalize(this.hot),this.mergedCells.push(a),Xh(this,ER,tL).call(this,a),a):(h&&Ie(yy.IS_OVERLAPPING_WARNING(a)),!1)}remove(e,t){const o=this.get(e,t),i=o?this.mergedCells.indexOf(o):-1;return o&&i!==-1?(this.mergedCells.splice(i,1),Xh(this,eL,kpe).call(this,o),o):!1}clear(){O(this.mergedCells,({row:e,col:t,rowspan:o,colspan:i})=>{Ee(e,e+o,s=>{Ee(t,t+i,r=>{const a=this.hot.getCell(s,r);a&&(a.removeAttribute("rowspan"),a.removeAttribute("colspan"),a.style.display="")})})}),this.mergedCells.length=0,this.mergedCellsMatrix=new Map}isOverlapping(e){const t=e.getRange();for(let o=0;o<this.mergedCells.length;o++)if(this.mergedCells[o].getRange().overlaps(t))return!0;return!1}isFirstRenderableMergedCell(e,t){const o=this.get(e,t);if(!o)return!1;const{row:i,col:s,rowspan:r,colspan:a}=o,l=this.hot.view.getActiveOverlayName(),h=["top","top_inline_start_corner"].includes(l)?0:this.hot.getFirstRenderedVisibleRow(),c=["inline_start","top_inline_start_corner","bottom_inline_start_corner"].includes(l)?0:this.hot.getFirstRenderedVisibleColumn(),d=et(h,i,i+r-1),u=et(c,s,s+a-1);return this.hot.rowIndexMapper.getNearestNotHiddenIndex(d,1)===e&&this.hot.columnIndexMapper.getNearestNotHiddenIndex(u,1)===t}getFirstRenderableCoords(e,t){const o=this.get(e,t);if(!o||this.isFirstRenderableMergedCell(e,t))return this.hot._createCellCoords(e,t);const i=this.hot.rowIndexMapper.getNearestNotHiddenIndex(o.row,1),s=this.hot.columnIndexMapper.getNearestNotHiddenIndex(o.col,1);return this.hot._createCellCoords(i,s)}getStartMostColumnIndex(e,t){const o=Xh(this,kg,gb).call(this,e,"col",-1);let i=t;for(let s=0;s<o.length;s++)if(o[s]<=t){i=o[s];break}return i}getEndMostColumnIndex(e,t){const o=Xh(this,kg,gb).call(this,e,"col",1);let i=t;for(let s=0;s<o.length;s++)if(o[s]>=t){i=o[s];break}return i}getTopMostRowIndex(e,t){const o=Xh(this,kg,gb).call(this,e,"row",-1);let i=t;for(let s=0;s<o.length;s++)if(o[s]<=t){i=o[s];break}return i}getBottomMostRowIndex(e,t){const o=Xh(this,kg,gb).call(this,e,"row",1);let i=t;for(let s=0;s<o.length;s++)if(o[s]>=t){i=o[s];break}return i}shiftCollections(e,t,o){const i=[0,0];switch(e){case"right":i[0]+=o;break;case"left":i[0]-=o;break;case"down":i[1]+=o;break;case"up":i[1]-=o;break}const s=[];this.mergedCells.forEach(r=>{r.shift(i,t),r.removed&&s.push(r)}),s.forEach(r=>{this.mergedCells.splice(this.mergedCells.indexOf(r),1)}),this.mergedCellsMatrix.clear(),this.mergedCells.forEach(r=>{Xh(this,ER,tL).call(this,r)})}constructor(e){RR(this,kg),RR(this,ER),RR(this,eL),this.mergedCells=[],this.mergedCellsMatrix=new Map,this.plugin=e,this.hot=e.hot}}function gb(n,e,t=1){const o=new Map,i=t===1?n.getTopStartCorner():n.getBottomEndCorner(),s=t===1?n.getBottomEndCorner():n.getTopStartCorner();for(let r=i.row;t===1?r<=s.row:r>=s.row;r+=t)for(let a=i.col;t===1?a<=s.col:a>=s.col;a+=t){const l=e==="row"?r:a,h=this.get(r,a);let c=l;h&&(c=t===1?h[e]+h[`${e}span`]-1:h[e]),o.has(l)||o.set(l,new Set),o.get(l).add(c)}return Array.from(new Set(Array.from(o.entries()).filter(([,r])=>r.size===1).flatMap(([,r])=>Array.from(r))))}function tL(n){for(let e=n.row;e<n.row+n.rowspan;e++)for(let t=n.col;t<n.col+n.colspan;t++)this.mergedCellsMatrix.has(e)||this.mergedCellsMatrix.set(e,new Map),this.mergedCellsMatrix.get(e).set(t,n)}function kpe(n){for(let e=n.row;e<n.row+n.rowspan;e++)for(let t=n.col;t<n.col+n.colspan;t++)this.mergedCellsMatrix.get(e).delete(t)}class Tpe{getDirection(e,t){let o=null;return t[0]===e[0]&&t[1]===e[1]&&t[3]===e[3]?o="down":t[2]===e[2]&&t[1]===e[1]&&t[3]===e[3]?o="up":t[1]===e[1]&&t[2]===e[2]?o="right":o="left",o}snapDragArea(e,t,o,i){const s=t.slice(0),r=this.getAutofillSize(e,t,o),[a,l,h,c]=e,u=["up","down"].indexOf(o)>-1?h-a+1:c-l+1,f=Math.floor(r/u)*u,p=r-f,C=this.getFarthestCollection(e,t,o,i);if(C){if(o==="down"){const _=C.row+C.rowspan-a-p;s[2]+_>=this.plugin.hot.countRows()?s[2]-=p:s[2]+=p?_:0}else if(o==="right"){const _=C.col+C.colspan-l-p;s[3]+_>=this.plugin.hot.countCols()?s[3]-=p:s[3]+=p?_:0}else if(o==="up"){const _=h-p-C.row+1;s[0]+_<0?s[0]+=p:s[0]-=p?_:0}else if(o==="left"){const _=c-p-C.col+1;s[1]+_<0?s[1]+=p:s[1]-=p?_:0}}return this.updateCurrentFillCache({baseArea:e,dragDirection:o,foundMergedCells:i,fillSize:r,dragArea:s,cycleLength:u}),s}updateCurrentFillCache(e){this.currentFillData||(this.currentFillData={}),Wn(this.currentFillData,e)}getAutofillSize(e,t,o){const[i,s,r,a]=e,[l,h,c,d]=t;switch(o){case"up":return i-l;case"down":return c-r;case"left":return s-h;case"right":return d-a;default:return null}}getDragArea(e,t,o){const[i,s,r,a]=e,[l,h,c,d]=t;switch(o){case"up":return[l,h,i-1,a];case"down":{const u=this.mergedCellsCollection.get(c,a),f=u?u.rowspan-1:0;return[r+1,s,c+f,a]}case"left":return[l,h,r,s-1];case"right":{const u=this.mergedCellsCollection.get(c,a),f=u?u.colspan-1:0;return[i,a+f,c,d]}default:return null}}getFarthestCollection(e,t,o,i){const[s,r,a,l]=e,h=["up","down"].indexOf(o)>-1,c=h?a:l,d=h?s:r,u=this.getAutofillSize(e,t,o),f=h?a-s+1:l-r+1,p=Math.floor(u/f)*f,C=u-p;let _=null,S=null,T=null;switch(o){case"up":_="includesVertically",T=c-C+1;break;case"left":_="includesHorizontally",T=c-C+1;break;case"down":_="includesVertically",T=d+C-1;break;case"right":_="includesHorizontally",T=d+C-1;break}return O(i,P=>{P[_](T)&&P.isFarther(S,o)&&(S=P)}),S}recreateAfterDataPopulation(e){if(!this.currentFillData)return;const t=this.getRangeFromChanges(e),o=this.currentFillData.foundMergedCells,i=this.currentFillData.dragDirection,s=(h,c)=>{switch(i){case"up":return h.row-c>=t.from.row;case"down":return h.row+h.rowspan-1+c<=t.to.row;case"left":return h.col-c>=t.from.column;case"right":return h.col+h.colspan-1+c<=t.to.column;default:return null}};let r=0,a=null,l=1;do for(let h=0;h<o.length;h+=1){if(a=o[h],r=l*this.currentFillData.cycleLength,s(a,r))switch(i){case"up":this.plugin.mergedCellsCollection.add({row:a.row-r,rowspan:a.rowspan,col:a.col,colspan:a.colspan},!0);break;case"down":this.plugin.mergedCellsCollection.add({row:a.row+r,rowspan:a.rowspan,col:a.col,colspan:a.colspan},!0);break;case"left":this.plugin.mergedCellsCollection.add({row:a.row,rowspan:a.rowspan,col:a.col-r,colspan:a.colspan},!0);break;case"right":this.plugin.mergedCellsCollection.add({row:a.row,rowspan:a.rowspan,col:a.col+r,colspan:a.colspan},!0);break}h===o.length-1&&(l+=1)}while(s(a,r));this.currentFillData=null,this.plugin.hot.render(),o.length>0&&this.plugin.ifChromeForceRepaint()}getRangeFromChanges(e){const t={min:null,max:null},o={min:null,max:null};return O(e,i=>{const s=i[0],r=this.plugin.hot.propToCol(i[1]);(t.min===null||s<t.min)&&(t.min=s),(t.max===null||s>t.max)&&(t.max=s),(o.min===null||r<o.min)&&(o.min=r),(o.max===null||r>o.max)&&(o.max=r)}),{from:{row:t.min,column:o.min},to:{row:t.max,column:o.max}}}dragAreaOverlapsCollections(e,t,o){const i=this.getDragArea(e,t,o),[s,r,a,l]=i,h=this.plugin.hot._createCellCoords(s,r),c=this.plugin.hot._createCellCoords(a,l),d=this.plugin.hot._createCellRange(h,h,c);if(this.mergedCellsCollection.getWithinRange(d,!0).length===0)return!1;const f=this.mergedCellsCollection.getWithinRange(d,!1);return f.length===0?!0:o==="up"||o==="down"?!f.every(({colspan:p})=>p===d.getWidth()):!f.every(({rowspan:p})=>p===d.getHeight())}constructor(e){this.currentFillData=null,this.plugin=e,this.mergedCellsCollection=this.plugin.mergedCellsCollection}}class xpe{getSelectedMergedCellClassName(e,t,o,i){const s=Math.min(o[0],o[2]),r=Math.min(o[1],o[3]),a=Math.max(o[0],o[2]),l=Math.max(o[1],o[3]);if(i===void 0||!this.plugin.mergedCellsCollection.isFirstRenderableMergedCell(e,t))return;const c=this.plugin.mergedCellsCollection.get(e,t);if(!c)return;const d=c.getLastRow(),u=c.getLastColumn();if(s<=c.row&&r<=c.col&&a>=d&&l>=u)return`${this.fullySelectedMergedCellClassName}-${i}`;if(this.isMergeCellFullySelected(c,this.plugin.hot.getSelectedRange()))return`${this.fullySelectedMergedCellClassName}-multiple`}isMergeCellFullySelected(e,t){const o=[];if(!t||!e)return!1;for(let i=0;i<e.rowspan;i+=1)for(let s=0;s<e.colspan;s+=1)o.push(this.hot._createCellCoords(e.row+i,e.col+s));for(let i=0;i<o.length;i+=1){const s=[];for(let r=0;r<t.length;r+=1)s[r]=t[r].includes(o[i]);if(!s.includes(!0))return!1}return!0}getSelectedMergedCellClassNameToRemove(){const e=[];for(let t=0;t<=7;t+=1)e.push(`${this.fullySelectedMergedCellClassName}-${t}`);return e.push(`${this.fullySelectedMergedCellClassName}-multiple`),e}constructor(e){this.fullySelectedMergedCellClassName="fullySelectedMergedCell",this.plugin=e,this.hot=e.hot}}function Mpe(n){return{key:"mergeCells",name(){const e=this.getSelectedActive();if(e){const t=n.mergedCellsCollection.get(e[0],e[1]);if(t.row===e[0]&&t.col===e[1]&&t.row+t.rowspan-1===e[2]&&t.col+t.colspan-1===e[3])return this.getTranslatedPhrase(Yk)}return this.getTranslatedPhrase(Uk)},callback(){const e=this.getSelectedRangeActive();if(!e)return;e.setDirection(this.isRtl()?"NE-SW":"NW-SE");const{from:t,to:o}=e;n.toggleMerge(e),this.selectCell(t.row,t.col,o.row,o.col,!1)},disabled(){const e=this.getSelectedActive();return e?Wr.isSingleCell({row:e[0],col:e[1],rowspan:e[2]-e[0]+1,colspan:e[3]-e[1]+1})||this.selection.isSelectedByCorner():!0},hidden:!1}}class nL{constructor(e){this.next=null,this.prev=null,this.data=e}}class pb{push(e){const t=new nL(e);if(this.first===null)this.first=t,this.last=t;else{const o=this.last;this.last=t,t.prev=o,o.next=t}return t}unshift(e){const t=new nL(e);if(this.first===null)this.first=t,this.last=t;else{const o=this.first;this.first=t,t.next=o,o.prev=t}}inorder(e){let t=this.first;for(;t;){const o=e(t);if(t===this.last||o===!0)break;t=t.next}}remove(e){if(this.first===null)return!1;let t=this.first,o,i;for(;t;){if(t.data===e)return o=t.next,i=t.prev,o&&(o.prev=i),i&&(i.next=o),t===this.first&&(this.first=o),t===this.last&&(this.last=i),!0;t=t.next}return!1}hasCycle(){let e=this.first,t=this.first;for(;;){if(e===null||(e=e.next,e===null))return!1;if(e=e.next,t=t.next,e===t)return!0}}pop(){if(this.last===null)return null;const e=this.last;return this.last=this.last.prev,e}shift(){if(this.first===null)return null;const e=this.first;return this.first=this.first.next,e}recursiveReverse(){function e(o,i){i&&(e(i,i.next),i.next=o)}if(!this.first)return;e(this.first,this.first.next),this.first.next=null;const t=this.first;this.first=this.last,this.last=t}reverse(){if(!this.first||!this.first.next)return;let e=this.first.next,t=this.first,o;for(;e;)o=e.next,e.next=t,t.prev=e,t=e,e=o;this.first.next=null,this.last.prev=null,o=this.first,this.first=t,this.last=o}constructor(){this.first=null,this.last=null}}function nY(n,e){if(e.has(n))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Ipe(n,e){return e.get?e.get.call(n):e.value}function Hpe(n,e,t){if(e.set)e.set.call(n,t);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=t}}function oY(n,e,t){if(!e.has(n))throw new TypeError("attempted to "+t+" private field on non-instance");return e.get(n)}function vt(n,e){var t=oY(n,e,"get");return Ipe(n,t)}function Zh(n,e,t){nY(n,e),e.set(n,t)}function zn(n,e,t){var o=oY(n,e,"set");return Hpe(n,o,t),t}function oL(n,e,t){if(!e.has(n))throw new TypeError("attempted to get private field on non-instance");return t}function Ape(n,e){nY(n,e),e.add(n)}var $s=new WeakMap,Fs=new WeakMap,Bs=new WeakMap,Vs=new WeakMap,fC=new WeakMap,Tg=new WeakMap,xg=new WeakMap,kR=new WeakSet;class Ope{getCurrentVerticalNode(){return vt(this,Vs).data}getFirstVerticalNode(){return vt(this,Fs).first.data}getNextVerticalNode(){return vt(this,Vs).next.data}getPrevVerticalNode(){return vt(this,Vs).prev.data}getCurrentHorizontalNode(){return vt(this,Bs).data}getFirstHorizontalNode(){return vt(this,$s).first.data}getNextHorizontalNode(){return vt(this,Bs).next.data}getPrevHorizontalNode(){return vt(this,Bs).prev.data}setPrevNodeAsActive(){zn(this,Vs,vt(this,Vs).prev),zn(this,Bs,vt(this,Bs).prev)}setNextNodeAsActive(){zn(this,Vs,vt(this,Vs).next),zn(this,Bs,vt(this,Bs).next)}buildFocusOrder(e){zn(this,$s,new pb),e.forEach((t,o)=>{const i=new WeakSet,s=t.getTopStartCorner(),r=t.getBottomEndCorner();for(let a=s.row;a<=r.row;a++)if(!vt(this,Tg).isHidden(a))for(let l=s.col;l<=r.col;l++){if(vt(this,xg).isHidden(l))continue;const h=oL(this,kR,iL).call(this,{selectedRange:t,selectionLayer:o,listOrder:vt(this,$s),mergeCellsVisitor:i,row:a,column:l});h&&zn(this,Bs,h)}}),vt(this,$s).first&&(vt(this,$s).first.prev=vt(this,$s).last,vt(this,$s).last.next=vt(this,$s).first),zn(this,Fs,new pb),e.forEach((t,o)=>{const i=new WeakSet,s=t.getTopStartCorner(),r=t.getBottomEndCorner();for(let a=s.col;a<=r.col;a++)if(!vt(this,xg).isHidden(a))for(let l=s.row;l<=r.row;l++){if(vt(this,Tg).isHidden(l))continue;const h=oL(this,kR,iL).call(this,{selectedRange:t,selectionLayer:o,listOrder:vt(this,Fs),mergeCellsVisitor:i,row:l,column:a});h&&zn(this,Vs,h)}}),vt(this,Fs).first&&(vt(this,Fs).first.prev=vt(this,Fs).last,vt(this,Fs).last.next=vt(this,Fs).first)}setActiveNode(e,t,o){return vt(this,$s).inorder(i=>{const{selectionLayer:s,rowStart:r,rowEnd:a,colStart:l,colEnd:h}=i.data;if(s===o&&e>=r&&e<=a&&t>=l&&t<=h)return zn(this,Bs,i),!0}),vt(this,Fs).inorder(i=>{const{selectionLayer:s,rowStart:r,rowEnd:a,colStart:l,colEnd:h}=i.data;if(s===o&&e>=r&&e<=a&&t>=l&&t<=h)return zn(this,Vs,i),!0}),this}constructor({mergedCellsGetter:e,rowIndexMapper:t,columnIndexMapper:o}){Ape(this,kR),Zh(this,$s,{writable:!0,value:void 0}),Zh(this,Fs,{writable:!0,value:void 0}),Zh(this,Bs,{writable:!0,value:void 0}),Zh(this,Vs,{writable:!0,value:void 0}),Zh(this,fC,{writable:!0,value:void 0}),Zh(this,Tg,{writable:!0,value:void 0}),Zh(this,xg,{writable:!0,value:void 0}),zn(this,$s,new pb),zn(this,Fs,new pb),zn(this,Bs,null),zn(this,Vs,null),zn(this,fC,null),zn(this,Tg,null),zn(this,xg,null),zn(this,fC,e),zn(this,Tg,t),zn(this,xg,o)}}function iL({selectedRange:n,selectionLayer:e,listOrder:t,mergeCellsVisitor:o,row:i,column:s}){const r=n.getTopStartCorner(),a=n.getBottomEndCorner(),l=n.highlight.clone().normalize(),h=vt(this,fC).call(this,i,s);if(h&&o.has(h))return null;const c={selectionLayer:e,colStart:s,colEnd:s,rowStart:i,rowEnd:i};if(h){if(o.add(h),h.row<r.row||h.row+h.rowspan-1>a.row||h.col<r.col||h.col+h.colspan-1>a.col)return null;c.colStart=h.col,c.colEnd=h.col+h.colspan-1,c.rowStart=h.row,c.rowEnd=h.row+h.rowspan-1}const d=t.push(c);return i===l.row&&s===l.col||h&&l.row>=h.row&&l.row<=h.row+h.rowspan-1&&l.col>=h.col&&l.col<=h.col+h.colspan-1?d:null}function iY(n,e,t){const{rowIndexMapper:o,stylesHandler:i}=n;let s=0;for(let r=e;r<e+t;r++)o.isHidden(r)||(s+=n.getRowHeight(r)??i.getDefaultRowHeight(r));return s}function Dpe(n){const{hot:e}=n,{rowIndexMapper:t,columnIndexMapper:o}=e,i=new Map;function s(){}function r(a,l,h){const c=n.mergedCellsCollection.get(l,h);if(!ne(c)){a.removeAttribute("rowspan"),a.removeAttribute("colspan"),i.has(l)&&!e.getSettings().rowHeaders&&(a.style.height=`${i.get(l)}px`,i.delete(l)),a.style.display="";return}const{row:d,col:u,colspan:f,rowspan:p}=c,[C,_]=n.translateMergedCellToRenderable(d,p,u,f),S=n.getSetting("virtualized");if(u===0&&!e.getSettings().rowHeaders){const Y=e._getRowHeightFromSettings(l);if(Y!==void 0){const ee=e.stylesHandler.areCellsBorderBox()?0:1;i.set(l,Y-ee)}else if(Ay()){const te=iY(e,d,p);i.set(l,te/p)}}const T=t.getRenderableFromVisualIndex(l),P=o.getRenderableFromVisualIndex(h),F=C-T+1,V=_-P+1;let D=t.getNearestNotHiddenIndex(d,1),I=o.getNearestNotHiddenIndex(u,1);if(S){const Y=e.view.getActiveOverlayName();["top","top_inline_start_corner"].includes(Y)||(D=Math.max(D,e.getFirstRenderedVisibleRow())),["inline_start","top_inline_start_corner","bottom_inline_start_corner"].includes(Y)||(I=Math.max(I,e.getFirstRenderedVisibleColumn()))}const G=Math.min(p,F),z=Math.min(f,V);D===l&&I===h?(a.setAttribute("rowspan",G),a.setAttribute("colspan",z)):(a.removeAttribute("rowspan"),a.removeAttribute("colspan"),a.style.display="none")}return{before:s,after:r}}function sY(n,e){if(e.has(n))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Npe(n,e){return e.get?e.get.call(n):e.value}function Ppe(n,e,t){if(e.set)e.set.call(n,t);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=t}}function rY(n,e,t){if(!e.has(n))throw new TypeError("attempted to "+t+" private field on non-instance");return e.get(n)}function Vt(n,e){var t=rY(n,e,"get");return Npe(n,t)}function mb(n,e,t){sY(n,e),e.set(n,t)}function Za(n,e,t){var o=rY(n,e,"set");return Ppe(n,o,t),t}function Lt(n,e,t){if(!e.has(n))throw new TypeError("attempted to get private field on non-instance");return t}function Yt(n,e){sY(n,e),e.add(n)}he.getSingleton().register("beforeMergeCells");he.getSingleton().register("afterMergeCells");he.getSingleton().register("beforeUnmergeCells");he.getSingleton().register("afterUnmergeCells");const O0="mergeCells",Lpe=150,sL=O0;var Xi=new WeakMap,Ji=new WeakMap,cr=new WeakMap,TR=new WeakMap,rL=new WeakSet,aL=new WeakSet,lL=new WeakSet,hL=new WeakSet,cL=new WeakSet,dL=new WeakSet,xR=new WeakSet,uL=new WeakSet,MR=new WeakSet,fL=new WeakSet,gL=new WeakSet,pL=new WeakSet,mL=new WeakSet,wL=new WeakSet,bL=new WeakSet,CL=new WeakSet,yL=new WeakSet,_L=new WeakSet,SL=new WeakSet,vL=new WeakSet,RL=new WeakSet,EL=new WeakSet,kL=new WeakSet,TL=new WeakSet,xL=new WeakSet,ML=new WeakSet;class Wpe extends rt{static get PLUGIN_KEY(){return O0}static get PLUGIN_PRIORITY(){return Lpe}static get DEFAULT_SETTINGS(){return{[m2]:"cells",virtualized:!1,cells:[]}}isEnabled(){return!!this.hot.getSettings()[O0]}enablePlugin(){this.enabled||(this.mergedCellsCollection=new yy(this),this.autofillCalculations=new Tpe(this),this.selectionCalculations=new xpe(this),this.addHook("afterInit",(...e)=>Lt(this,rL,$pe).call(this,...e)),this.addHook("modifyTransformFocus",(...e)=>Lt(this,lL,Bpe).call(this,...e)),this.addHook("modifyTransformStart",(...e)=>Lt(this,hL,Vpe).call(this,...e)),this.addHook("modifyTransformEnd",(...e)=>Lt(this,cL,zpe).call(this,...e)),this.addHook("beforeSelectionHighlightSet",(...e)=>Lt(this,dL,Upe).call(this,...e)),this.addHook("beforeSetRangeStart",(...e)=>Lt(this,MR,HL).call(this,...e)),this.addHook("beforeSetRangeStartOnly",(...e)=>Lt(this,MR,HL).call(this,...e)),this.addHook("beforeSelectionFocusSet",(...e)=>Lt(this,fL,Gpe).call(this,...e)),this.addHook("afterSelectionFocusSet",(...e)=>Lt(this,gL,jpe).call(this,...e)),this.addHook("afterSelectionEnd",(...e)=>Lt(this,pL,qpe).call(this,...e)),this.addHook("modifyGetCellCoords",(...e)=>Lt(this,xR,IL).call(this,...e)),this.addHook("modifyGetCoordsElement",(...e)=>Lt(this,xR,IL).call(this,...e)),this.addHook("afterIsMultipleSelection",(...e)=>Lt(this,aL,Fpe).call(this,...e)),this.addHook("afterRenderer",(...e)=>Vt(this,TR).after(...e)),this.addHook("afterContextMenuDefaultOptions",(...e)=>Lt(this,uL,Ype).call(this,...e)),this.addHook("afterGetCellMeta",(...e)=>Lt(this,mL,Kpe).call(this,...e)),this.addHook("afterViewportRowCalculatorOverride",(...e)=>Lt(this,wL,Xpe).call(this,...e)),this.addHook("afterViewportColumnCalculatorOverride",(...e)=>Lt(this,bL,Zpe).call(this,...e)),this.addHook("modifyAutofillRange",(...e)=>Lt(this,CL,Qpe).call(this,...e)),this.addHook("afterCreateCol",(...e)=>Lt(this,yL,Jpe).call(this,...e)),this.addHook("afterRemoveCol",(...e)=>Lt(this,_L,eme).call(this,...e)),this.addHook("afterCreateRow",(...e)=>Lt(this,SL,tme).call(this,...e)),this.addHook("afterRemoveRow",(...e)=>Lt(this,vL,nme).call(this,...e)),this.addHook("afterChange",(...e)=>Lt(this,RL,ome).call(this,...e)),this.addHook("beforeDrawBorders",(...e)=>Lt(this,EL,ime).call(this,...e)),this.addHook("afterDrawSelection",(...e)=>Lt(this,kL,sme).call(this,...e)),this.addHook("beforeRemoveCellClassNames",(...e)=>Lt(this,TL,rme).call(this,...e)),this.addHook("beforeBeginEditing",(...e)=>Lt(this,xL,ame).call(this,...e)),this.addHook("modifyRowHeightByOverlayName",(...e)=>Lt(this,ML,lme).call(this,...e)),this.addHook("beforeUndoStackChange",(e,t)=>{if(t==="MergeCells")return!1}),this.registerShortcuts(),super.enablePlugin())}disablePlugin(){this.clearCollections(),this.unregisterShortcuts(),this.hot.render(),super.disablePlugin()}updatePlugin(){this.disablePlugin(),this.enablePlugin(),this.generateFromSettings(),super.updatePlugin()}ifChromeForceRepaint(){if(!QG())return;const e=[];let t=[];this.mergedCellsCollection.mergedCells.forEach(o=>{const{row:i,rowspan:s}=o;for(let r=i+1;r<i+s;r++)t.push(r)}),t=[...new Set(t)],t.forEach(o=>{const i=this.hot.rowIndexMapper.getRenderableFromVisualIndex(o);this.hot.view._wt.wtOverlays.getOverlays(!0).map(s=>s?.name==="master"?s:s.clone.wtTable).forEach(s=>{const r=s.getRow(i);r&&(r.style.background=vC(r,"backgroundColor").replace(")",", 0.99)"),e.push(r))})}),this.hot._registerTimeout(()=>{e.forEach(o=>{o.style.background=vC(o,"backgroundColor")?.replace(", 0.99)",")")})},1)}validateSetting(e){return e?Wr.containsNegativeValues(e)?(Ie(Wr.NEGATIVE_VALUES_WARNING(e)),!1):Wr.isOutOfBounds(e,this.hot.countRows(),this.hot.countCols())?(Ie(Wr.IS_OUT_OF_BOUNDS_WARNING(e)),!1):Wr.isSingleCell(e)?(Ie(Wr.IS_SINGLE_CELL(e)),!1):Wr.containsZeroSpan(e)?(Ie(Wr.ZERO_SPAN_WARNING(e)),!1):!0:!1}generateFromSettings(){const e=this.getSetting("cells").filter(i=>this.validateSetting(i)),t=this.mergedCellsCollection.filterOverlappingMergeCells(e),o=[];t.forEach(i=>{const{row:s,col:r,rowspan:a,colspan:l}=i,h=this.hot._createCellCoords(s,r),c=this.hot._createCellCoords(s+a-1,r+l-1),d=this.hot._createCellRange(h,h,c);this.mergeRange(d,!0,!0);for(let u=s;u<s+a;u++)for(let f=r;f<r+l;f++)(u!==s||f!==r)&&o.push([u,f,null])}),o.length!==0&&this.hot.setDataAtCell(o,void 0,void 0,this.pluginName)}clearCollections(){this.mergedCellsCollection.clear()}canMergeRange(e,t=!1){return t?!0:this.validateSetting(e)}mergeSelection(e=this.hot.getSelectedRangeActive()){if(!e)return;e.setDirection(this.hot.isRtl()?"NE-SW":"NW-SE");const{from:t,to:o}=e;this.unmergeRange(e,!0),this.mergeRange(e),this.hot.selectCell(t.row,t.col,o.row,o.col,!1)}unmergeSelection(e=this.hot.getSelectedRangeActive()){if(!e)return;const{from:t,to:o}=e;this.unmergeRange(e,!0),this.hot.selectCell(t.row,t.col,o.row,o.col,!1)}mergeRange(e,t=!1,o=!1){const i=e.getTopStartCorner(),s=e.getBottomEndCorner(),r={row:i.row,col:i.col,rowspan:s.row-i.row+1,colspan:s.col-i.col+1},a=[];let l=null;return this.canMergeRange(r,t)?(this.hot.runHooks("beforeMergeCells",e,t),Ee(0,r.rowspan-1,c=>{Ee(0,r.colspan-1,d=>{let u=null;a[c]||(a[c]=[]),c===0&&d===0?u=this.hot.getSourceDataAtCell(this.hot.toPhysicalRow(r.row),this.hot.toPhysicalColumn(r.col)):this.hot.setCellMeta(r.row+c,r.col+d,"hidden",!0),a[c][d]=u})}),this.hot.setCellMeta(r.row,r.col,"spanned",!0),this.mergedCellsCollection.add(r,t)?(o?l=[r.row,r.col,a]:this.hot.populateFromArray(r.row,r.col,a,void 0,void 0,this.pluginName),t||this.ifChromeForceRepaint(),this.hot.runHooks("afterMergeCells",e,r,t),l):!0):!1}unmergeRange(e,t=!1){const o=this.mergedCellsCollection.getWithinRange(e);o.length!==0&&(this.hot.runHooks("beforeUnmergeCells",e,t),O(o,i=>{this.mergedCellsCollection.remove(i.row,i.col),Ee(0,i.rowspan-1,s=>{Ee(0,i.colspan-1,r=>{this.hot.removeCellMeta(i.row+s,i.col+r,"hidden"),this.hot.removeCellMeta(i.row+s,i.col+r,"copyable")})}),this.hot.removeCellMeta(i.row,i.col,"spanned")}),this.hot.runHooks("afterUnmergeCells",e,t),this.hot.render())}toggleMerge(e){const{from:t,to:o}=e.clone().normalize(),i=this.mergedCellsCollection.get(t.row,t.col);i.row===t.row&&i.col===t.col&&i.row+i.rowspan-1===o.row&&i.col+i.colspan-1===o.col?this.unmergeRange(e):this.mergeSelection(e)}merge(e,t,o,i){const s=this.hot._createCellCoords(e,t),r=this.hot._createCellCoords(o,i);this.mergeRange(this.hot._createCellRange(s,s,r))}unmerge(e,t,o,i){const s=this.hot._createCellCoords(e,t),r=this.hot._createCellCoords(o,i);this.unmergeRange(this.hot._createCellRange(s,s,r))}registerShortcuts(){this.hot.getShortcutManager().getContext("grid").addShortcut({keys:[["Control","m"]],callback:()=>{const o=this.hot.getSelectedRangeActive();o&&!o.isSingleHeader()&&(this.toggleMerge(o),this.hot.render())},runOnlyIf:o=>!o.altKey,group:sL})}unregisterShortcuts(){this.hot.getShortcutManager().getContext("grid").removeShortcutsByGroup(sL)}modifyViewportRowStart(e,t){const o=this.hot.rowIndexMapper,i=o.getVisualFromRenderableIndex(e.startRow);for(let s=0;s<t;s+=1){const r=this.mergedCellsCollection.get(i,s);if(ne(r)){const a=o.getRenderableFromVisualIndex(o.getNearestNotHiddenIndex(r.row,1));if(a<e.startRow){e.startRow=a,this.modifyViewportRowStart(e,t);return}}}}modifyViewportRowEnd(e,t){const o=this.hot.rowIndexMapper,i=o.getVisualFromRenderableIndex(e.endRow);for(let s=0;s<t;s+=1){const r=this.mergedCellsCollection.get(i,s);if(ne(r)){const a=r.row+r.rowspan-1,l=o.getRenderableFromVisualIndex(o.getNearestNotHiddenIndex(a,-1));if(l>e.endRow){e.endRow=l,this.modifyViewportRowEnd(e,t);return}}}}modifyViewportColumnStart(e,t){const o=this.hot.columnIndexMapper,i=o.getVisualFromRenderableIndex(e.startColumn);for(let s=0;s<t;s+=1){const r=this.mergedCellsCollection.get(s,i);if(ne(r)){const a=o.getRenderableFromVisualIndex(o.getNearestNotHiddenIndex(r.col,1));if(a<e.startColumn){e.startColumn=a,this.modifyViewportColumnStart(e,t);return}}}}modifyViewportColumnEnd(e,t){const o=this.hot.columnIndexMapper,i=o.getVisualFromRenderableIndex(e.endColumn);for(let s=0;s<t;s+=1){const r=this.mergedCellsCollection.get(s,i);if(ne(r)){const a=r.col+r.colspan-1,l=o.getRenderableFromVisualIndex(o.getNearestNotHiddenIndex(a,-1));if(l>e.endColumn){e.endColumn=l,this.modifyViewportColumnEnd(e,t);return}}}}translateMergedCellToRenderable(e,t,o,i){const{rowIndexMapper:s,columnIndexMapper:r}=this.hot;let a,l;t===0?a=s.getNearestNotHiddenIndex(e,1):a=s.getNearestNotHiddenIndex(e+t-1,-1),i===0?l=r.getNearestNotHiddenIndex(o,1):l=r.getNearestNotHiddenIndex(o+i-1,-1);const h=e>=0?s.getRenderableFromVisualIndex(a):e,c=o>=0?r.getRenderableFromVisualIndex(l):o;return[h,c]}constructor(...e){super(...e),Yt(this,rL),Yt(this,aL),Yt(this,lL),Yt(this,hL),Yt(this,cL),Yt(this,dL),Yt(this,xR),Yt(this,uL),Yt(this,MR),Yt(this,fL),Yt(this,gL),Yt(this,pL),Yt(this,mL),Yt(this,wL),Yt(this,bL),Yt(this,CL),Yt(this,yL),Yt(this,_L),Yt(this,SL),Yt(this,vL),Yt(this,RL),Yt(this,EL),Yt(this,kL),Yt(this,TL),Yt(this,xL),Yt(this,ML),mb(this,Xi,{writable:!0,value:void 0}),mb(this,Ji,{writable:!0,value:void 0}),mb(this,cr,{writable:!0,value:void 0}),mb(this,TR,{writable:!0,value:void 0}),this.mergedCellsCollection=null,this.autofillCalculations=null,this.selectionCalculations=null,Za(this,Xi,null),Za(this,Ji,{row:0,col:0}),Za(this,cr,new Ope({mergedCellsGetter:(t,o)=>this.mergedCellsCollection.get(t,o),rowIndexMapper:this.hot.rowIndexMapper,columnIndexMapper:this.hot.columnIndexMapper})),Za(this,TR,Dpe(this))}}function $pe(){this.generateFromSettings(),this.hot.render()}function Fpe(n){if(n){const e=this.mergedCellsCollection.mergedCells,t=this.hot.getSelectedRangeActive(),o=t.getTopStartCorner(),i=t.getBottomEndCorner();for(let s=0;s<e.length;s+=1)if(o.row===e[s].row&&o.col===e[s].col&&i.row===e[s].row+e[s].rowspan-1&&i.col===e[s].col+e[s].colspan-1)return!1}return n}function Bpe(n){Vt(this,Ji).row=n.row,Vt(this,Ji).col=n.col}function Vpe(n){const e=this.hot.getSelectedRangeActive(),{highlight:t}=e,{columnIndexMapper:o,rowIndexMapper:i}=this.hot;Vt(this,Xi)&&(i.getRenderableFromVisualIndex(Vt(this,Xi).row)!==null&&(t.row=Vt(this,Xi).row),o.getRenderableFromVisualIndex(Vt(this,Xi).col)!==null&&(t.col=Vt(this,Xi).col),Za(this,Xi,null));const s=this.mergedCellsCollection.get(t.row,t.col);if(!s)return;const r=s.col,a=s.col+s.colspan-1;if(n.col<0){const c=t.col>=r&&t.col<=a?r-1:a,d=o.getNearestNotHiddenIndex(c,-1);d===null?n.col=-this.hot.view.countRenderableColumnsInRange(0,t.col):n.col=-Math.max(this.hot.view.countRenderableColumnsInRange(d,t.col)-1,1)}else if(n.col>0){const c=t.col>=r&&t.col<=a?a+1:r,d=o.getNearestNotHiddenIndex(c,1);d===null?n.col=this.hot.view.countRenderableColumnsInRange(t.col,this.hot.countCols()):n.col=Math.max(this.hot.view.countRenderableColumnsInRange(t.col,d)-1,1)}const l=s.row,h=s.row+s.rowspan-1;if(n.row<0){const c=t.row>=l&&t.row<=h?l-1:h,d=i.getNearestNotHiddenIndex(c,-1);d===null?n.row=-this.hot.view.countRenderableRowsInRange(0,t.row):n.row=-Math.max(this.hot.view.countRenderableRowsInRange(d,t.row)-1,1)}else if(n.row>0){const c=t.row>=l&&t.row<=h?h+1:l,d=i.getNearestNotHiddenIndex(c,1);d===null?n.row=this.hot.view.countRenderableRowsInRange(t.row,this.hot.countRows()):n.row=Math.max(this.hot.view.countRenderableRowsInRange(t.row,d)-1,1)}}function zpe(n){const e=this.hot.getSelectedRangeActive(),t=e.clone(),{to:o}=e,{columnIndexMapper:i,rowIndexMapper:s}=this.hot,r=(a,l)=>{t.expand(this.hot._createCellCoords(a,l));for(let h=0;h<this.mergedCellsCollection.mergedCells.length;h+=1)t.expandByRange(this.mergedCellsCollection.mergedCells[h].getRange())};if(n.col<0){let a=this.mergedCellsCollection.getStartMostColumnIndex(e,o.col)+n.col;r(o.row,a),e.getHorizontalDirection()==="E-W"&&t.getHorizontalDirection()==="E-W"&&(a=t.getTopStartCorner().col);const l=i.getNearestNotHiddenIndex(a,1);l!==null&&(n.col=-Math.max(this.hot.view.countRenderableColumnsInRange(l,o.col)-1,1))}else if(n.col>0){let a=this.mergedCellsCollection.getEndMostColumnIndex(e,o.col)+n.col;r(o.row,a),e.getHorizontalDirection()==="W-E"&&t.getHorizontalDirection()==="W-E"&&(a=t.getBottomEndCorner().col);const l=i.getNearestNotHiddenIndex(a,-1);l!==null&&(n.col=Math.max(this.hot.view.countRenderableColumnsInRange(o.col,l)-1,1))}if(n.row<0){let a=this.mergedCellsCollection.getTopMostRowIndex(e,o.row)+n.row;r(a,o.col),e.getVerticalDirection()==="S-N"&&t.getVerticalDirection()==="S-N"&&(a=t.getTopStartCorner().row);const l=s.getNearestNotHiddenIndex(a,1);l!==null&&(n.row=-Math.max(this.hot.view.countRenderableRowsInRange(l,o.row)-1,1))}else if(n.row>0){let a=this.mergedCellsCollection.getBottomMostRowIndex(e,o.row)+n.row;r(a,o.col),e.getVerticalDirection()==="N-S"&&t.getVerticalDirection()==="N-S"&&(a=t.getBottomStartCorner().row);const l=s.getNearestNotHiddenIndex(a,-1);l!==null&&(n.row=Math.max(this.hot.view.countRenderableRowsInRange(o.row,l)-1,1))}}function Upe(){const n=this.hot.getSelectedRangeLast(),{highlight:e}=n;if(this.hot.selection.isSelectedByColumnHeader()||this.hot.selection.isSelectedByRowHeader()){Za(this,Xi,e.clone());return}for(let o=0;o<this.mergedCellsCollection.mergedCells.length;o+=1)n.expandByRange(this.mergedCellsCollection.mergedCells[o].getRange(),!1);for(let o=0;o<this.mergedCellsCollection.mergedCells.length;o+=1)n.expandByRange(this.mergedCellsCollection.mergedCells[o].getRange(),!1);const t=this.mergedCellsCollection.get(e.row,e.col);Za(this,Xi,e.clone()),t&&e.assign(t)}function IL(n,e,t,o){if(n<0||e<0)return;const i=this.mergedCellsCollection.get(n,e);if(!i)return;const{row:s,col:r,colspan:a,rowspan:l}=i,h=s,c=r,d=s+l-1,u=r+a-1;if(o==="render"&&this.getSetting("virtualized")){const f=this.hot.view.getActiveOverlayName(),p=["top","top_inline_start_corner"].includes(f)?0:this.hot.getFirstRenderedVisibleRow(),C=["inline_start","top_inline_start_corner","bottom_inline_start_corner"].includes(f)?0:this.hot.getFirstRenderedVisibleColumn();return[et(p,h,d),et(C,c,u),et(this.hot.getLastRenderedVisibleRow(),h,d),et(this.hot.getLastRenderedVisibleColumn(),c,u)]}return[h,c,d,u]}function Ype(n){n.items.push({name:"---------"},Mpe(this))}function HL(){Za(this,Xi,null)}function Gpe(){if(Vt(this,Xi).isCell())return;const n=this.hot.getSelectedRangeActive(),e=n.getVerticalDirection(),t=n.getHorizontalDirection(),o=Vt(this,Xi).clone().normalize();Vt(this,cr).setActiveNode(o.row,o.col),Vt(this,Ji).row>0||Vt(this,Ji).col>0?Vt(this,cr).setPrevNodeAsActive():(t==="E-W"&&Vt(this,Ji).col<0||e==="S-N"&&Vt(this,Ji).row<0)&&Vt(this,cr).setNextNodeAsActive()}function jpe(n,e){const{columnIndexMapper:t,rowIndexMapper:o}=this.hot;let i=this.hot.getActiveSelectionLayerIndex(),s=null,r=null;if(Vt(this,Ji).col<0){const{rowEnd:a,colEnd:l,selectionLayer:h}=Vt(this,cr).getPrevHorizontalNode();r=t.getNearestNotHiddenIndex(l,-1),s=o.getNearestNotHiddenIndex(a,-1),i=h}else if(Vt(this,Ji).col>0){const{rowStart:a,colStart:l,selectionLayer:h}=Vt(this,cr).getNextHorizontalNode();r=t.getNearestNotHiddenIndex(l,1),s=o.getNearestNotHiddenIndex(a,1),i=h}else if(Vt(this,Ji).row<0){const{rowEnd:a,colEnd:l,selectionLayer:h}=Vt(this,cr).getPrevVerticalNode();r=t.getNearestNotHiddenIndex(l,-1),s=o.getNearestNotHiddenIndex(a,-1),i=h}else if(Vt(this,Ji).row>0){const{rowStart:a,colStart:l,selectionLayer:h}=Vt(this,cr).getNextVerticalNode();r=t.getNearestNotHiddenIndex(l,1),s=o.getNearestNotHiddenIndex(a,1),i=h}if(s!==null||r!==null){this.hot.selection.setActiveSelectionLayerIndex(i);const a=this.hot.getSelectedRangeActive(),l=this.hot._createCellCoords(s,r),h=this.mergedCellsCollection.get(l.row,l.col),c=this.hot.selection.highlight.getFocus();n=l.row,e=l.col,h?a.highlight.assign({row:this.hot.rowIndexMapper.getNearestNotHiddenIndex(h.row,1),col:this.hot.columnIndexMapper.getNearestNotHiddenIndex(h.col,1)}):a.highlight.assign(l),c.clear(),c.add(l).commit()}Vt(this,cr).setActiveNode(n,e,i),Za(this,Ji,{row:0,col:0})}function qpe(){Vt(this,cr).buildFocusOrder(this.hot.getSelectedRange())}function Kpe(n,e,t){const o=this.mergedCellsCollection.get(n,e);o&&(o.row!==n||o.col!==e?t.copyable=!1:(t.rowspan=o.rowspan,t.colspan=o.colspan))}function Xpe(n){if(this.getSetting("virtualized"))return;const e=this.hot.countCols();this.modifyViewportRowStart(n,e),this.modifyViewportRowEnd(n,e)}function Zpe(n){if(this.getSetting("virtualized"))return;const e=this.hot.countRows();this.modifyViewportColumnStart(n,e),this.modifyViewportColumnEnd(n,e)}function Qpe(n,e){const t=this.autofillCalculations.getDirection(e,n);if(this.autofillCalculations.dragAreaOverlapsCollections(e,n,t))return e;const o=this.hot._createCellCoords(e[0],e[1]),i=this.hot._createCellCoords(e[2],e[3]),s=this.hot._createCellRange(o,o,i),r=this.mergedCellsCollection.getWithinRange(s);return r.length===0?n:this.autofillCalculations.snapDragArea(e,n,t,r)}function Jpe(n,e){this.mergedCellsCollection.shiftCollections("right",n,e)}function eme(n,e){this.mergedCellsCollection.shiftCollections("left",n,e)}function tme(n,e,t){t!=="auto"&&this.mergedCellsCollection.shiftCollections("down",n,e)}function nme(n,e){this.mergedCellsCollection.shiftCollections("up",n,e)}function ome(n,e){e==="Autofill.fill"&&this.autofillCalculations.recreateAfterDataPopulation(n)}function ime(n,e){if(e&&e==="area"){const t=this.hot.getSelectedRangeActive(),o=this.mergedCellsCollection.getWithinRange(t);O(o,i=>{t.getBottomEndCorner().row===i.getLastRow()&&t.getBottomEndCorner().col===i.getLastColumn()&&(n[2]=i.row,n[3]=i.col)})}}function sme(n,e,t,o){if(t)return this.selectionCalculations.getSelectedMergedCellClassName(n,e,t,o)}function rme(){return this.selectionCalculations.getSelectedMergedCellClassNameToRemove()}function ame(n,e,t,o){if(!(o instanceof MouseEvent))return;const i=this.hot.getSelectedRangeActive(),s=this.mergedCellsCollection.getByRange(i);if(!s)return;const r=this.hot._createCellCoords(s.row,s.col),a=this.hot._createCellCoords(s.row+s.rowspan-1,s.col+s.colspan-1);return this.hot.selection.getLayerLevel()===0&&i.isEqual(this.hot._createCellRange(r,r,a))}function lme(n,e,t){if(this.hot.getSettings().rowHeaders||t==="bottom"||t==="bottom_inline_start_corner")return n;let o,i;if(t==="master")o=this.hot.getFirstRenderedVisibleColumn(),i=this.hot.getLastRenderedVisibleColumn();else{const u=this.hot.view.getOverlayByName(t);o=this.hot.columnIndexMapper.getVisualFromRenderableIndex(u.clone.wtTable.getFirstRenderedColumn()),i=this.hot.columnIndexMapper.getVisualFromRenderableIndex(u.clone.wtTable.getLastRenderedColumn())}if(!this.mergedCellsCollection.get(e,o))return n;const r=this.hot._createCellCoords(e,o),a=this.hot._createCellCoords(e,i),l=this.hot._createCellRange(r,r,a),h=this.mergedCellsCollection.getWithinRange(l,!0),c=h.reduce((u,{rowspan:f})=>Math.max(u,f),1);let d=0;return h.length>1&&h[0].rowspan<c&&(d=c-h[0].rowspan),h.forEach(({rowspan:u})=>{let f=0;t==="top"||t==="top_inline_start_corner"?f=Math.min(c,this.hot.view.countNotHiddenFixedRowsTop()-e):f=u-d,n=Math.max(n??0,iY(this.hot,e,f))}),n}function hme(n,e){return function(t,o){const[,...i]=t,[,...s]=o;return(function r(a){const l=n[a],h=e[a],c=i[a],d=s[a],u=h.multiColumnSorting,p=(u.compareFunctionFactory?u.compareFunctionFactory:A2(h.type))(l,h,u)(c,d);if(p===Zo){const C=a+1;if(typeof e[C]<"u")return r(C)}return p})(0)}}const aY="sort";function cme(n,e,t){const o=[];return t===!1||n.isColumnSorted(e)&&n.getNumberOfSortedColumns()>1&&o.push(`${aY}-${n.getIndexOfColumnInSortQueue(e)+1}`),o}function dme(n){const e=n.className.split(" "),t=new RegExp(`^${aY}-[0-9]{1,2}$`);return e.filter(o=>t.test(o))}const Np="multiColumnSorting",ume=170,AL=Np;H2(Np,hme);class fme extends z2{static get PLUGIN_KEY(){return Np}static get PLUGIN_PRIORITY(){return ume}static get SETTING_KEYS(){return[Np]}isEnabled(){return!!this.hot.getSettings()[this.pluginKey]}enablePlugin(){this.enabled||super.enablePlugin()}disablePlugin(){super.disablePlugin()}registerShortcuts(){super.registerShortcuts(),this.hot.getShortcutManager().getContext("grid").addShortcut({keys:[["Shift","Enter"]],callback:()=>{const{highlight:e}=this.hot.getSelectedRangeActive();return e.row===-1&&e.col>=0&&this.sort(this.getNextSortConfig(e.col,ey)),!1},runOnlyIf:()=>{const e=this.hot.getSelectedRangeActive()?.highlight;return e&&this.hot.getSelectedRangeActive()?.isSingle()&&this.hot.selection.isCellVisible(e)&&e.isHeader()},relativeToGroup:dl,position:"before",group:AL})}unregisterShortcuts(){super.unregisterShortcuts(),this.hot.getShortcutManager().getContext("grid").removeShortcutsByGroup(AL)}sort(e){super.sort(e)}clearSort(){super.clearSort()}isSorted(){return super.isSorted()}getSortConfig(e){return super.getSortConfig(e)}setSortConfig(e){super.setSortConfig(e)}getNormalizedSortConfigs(e=[]){return Array.isArray(e)?e:[e]}updateHeaderClasses(e,...t){super.updateHeaderClasses(e,...t),oe(e,dme(e)),this.enabled!==!1&&B(e,cme(...t))}onAfterOnCellMouseDown(e,t){fM(t.row,t.col,e)!==!1&&this.wasClickableHeaderClicked(e,t.col)&&(this.hot.getShortcutManager().isCtrlPressed()?(this.hot.deselectCell(),this.hot.selectColumns(t.col),this.sort(this.getNextSortConfig(t.col,ey))):this.sort(this.getColumnNextConfig(t.col)))}constructor(...e){super(...e),this.pluginKey=Np}}const gme="multipleSelectionHandles",pme=160;class mme extends rt{static get PLUGIN_KEY(){return gme}static get PLUGIN_PRIORITY(){return pme}isEnabled(){return qr()}enablePlugin(){this.enabled||(this.registerListeners(),super.enablePlugin())}registerListeners(){const e=this,{rootElement:t}=this.hot;function o(i){if(e.dragged.length===1)return e.dragged.splice(0,e.dragged.length),!0;const s=e.dragged.indexOf(i);if(s===-1)return!1;s===0?e.dragged=e.dragged.slice(0,1):s===1&&(e.dragged=e.dragged.slice(-1))}this.eventManager.addEventListener(t,"touchstart",i=>{let s;if(_e(i.target,"topSelectionHandle-HitArea"))return s=e.hot.getSelectedRangeActive(),e.dragged.push("top"),e.touchStartRange={width:s.getWidth(),height:s.getHeight(),direction:s.getDirection()},i.preventDefault(),!1;if(_e(i.target,"bottomSelectionHandle-HitArea"))return s=e.hot.getSelectedRangeActive(),e.dragged.push("bottom"),e.touchStartRange={width:s.getWidth(),height:s.getHeight(),direction:s.getDirection()},i.preventDefault(),!1}),this.eventManager.addEventListener(t,"touchend",i=>{if(_e(i.target,"topSelectionHandle-HitArea"))return o.call(e,"top"),e.touchStartRange=void 0,i.preventDefault(),!1;if(_e(i.target,"bottomSelectionHandle-HitArea"))return o.call(e,"bottom"),e.touchStartRange=void 0,i.preventDefault(),!1}),this.eventManager.addEventListener(t,"touchmove",i=>{const{rootDocument:s}=this.hot;let r,a,l,h,c,d;if(e.dragged.length===0)return;const u=s.elementFromPoint(i.touches[0].clientX,i.touches[0].clientY);!u||u===e.lastSetCell||((u.nodeName==="TD"||u.nodeName==="TH")&&(r=e.hot.getCoords(u),r.col===-1&&(r.col=0),a=e.hot.getSelectedRangeActive(),l=a.getWidth(),h=a.getHeight(),c=a.getDirection(),l===1&&h===1&&e.hot.selection.setRangeEnd(r),d=e.getCurrentRangeCoords(a,r,e.touchStartRange.direction,c,e.dragged[0]),d.start!==null&&e.hot.selection.setRangeStart(d.start),e.hot.selection.setRangeEnd(d.end),e.lastSetCell=u),i.preventDefault())})}getCurrentRangeCoords(e,t,o,i,s){const r=e.getTopStartCorner(),a=e.getBottomEndCorner(),l=e.getBottomStartCorner(),h=e.getTopEndCorner();let c={start:null,end:null};switch(o){case"NE-SW":switch(i){case"NE-SW":case"NW-SE":s==="top"?c={start:this.hot._createCellCoords(t.row,e.highlight.col),end:this.hot._createCellCoords(l.row,t.col)}:c={start:this.hot._createCellCoords(e.highlight.row,t.col),end:this.hot._createCellCoords(t.row,r.col)};break;case"SE-NW":s==="bottom"&&(c={start:this.hot._createCellCoords(a.row,t.col),end:this.hot._createCellCoords(t.row,r.col)});break}break;case"NW-SE":switch(i){case"NE-SW":s==="top"?c={start:t,end:l}:c.end=t;break;case"NW-SE":s==="top"?c={start:t,end:a}:c.end=t;break;case"SE-NW":s==="top"?c={start:t,end:r}:c.end=t;break;case"SW-NE":s==="top"?c={start:t,end:h}:c.end=t;break}break;case"SW-NE":switch(i){case"NW-SE":s==="bottom"?c={start:this.hot._createCellCoords(t.row,r.col),end:this.hot._createCellCoords(l.row,t.col)}:c={start:this.hot._createCellCoords(r.row,t.col),end:this.hot._createCellCoords(t.row,a.col)};break;case"SW-NE":s==="top"?c={start:this.hot._createCellCoords(e.highlight.row,t.col),end:this.hot._createCellCoords(t.row,a.col)}:c={start:this.hot._createCellCoords(t.row,r.col),end:this.hot._createCellCoords(r.row,t.col)};break;case"SE-NW":s==="bottom"?c={start:this.hot._createCellCoords(t.row,h.col),end:this.hot._createCellCoords(r.row,t.col)}:s==="top"&&(c={start:l,end:t});break}break;case"SE-NW":switch(i){case"NW-SE":case"NE-SW":case"SW-NE":s==="top"&&(c.end=t);break;case"SE-NW":s==="top"?c.end=t:c={start:t,end:r};break}break}return c}isDragged(){return this.dragged.length>0}constructor(...e){super(...e),this.dragged=[],this.lastSetCell=null}}function gC({label:n="",colspan:e=1,origColspan:t=1,rowspan:o=1,origRowspan:i=1,collapsible:s=!1,crossHiddenColumns:r=[],isCollapsed:a=!1,isHidden:l=!1,isRoot:h=!1,isPlaceholder:c=!1,isRowspanPlaceholder:d=!1,headerClassNames:u=[]}={}){return{label:n,colspan:e,origColspan:t,rowspan:o,origRowspan:i,collapsible:s,isCollapsed:a,crossHiddenColumns:r,isHidden:l,isRoot:h,isPlaceholder:c,isRowspanPlaceholder:d,headerClassNames:u}}function lY(){return{label:"",isPlaceholder:!0}}function wme(n,e=1/0){const t=[],o=[];if(e===0)return t;const i=a=>{if(a==="")return!0;if(!ne(a))return!1;const{label:l,colspan:h,rowspan:c,headerClassName:d}=a;return bt(l)===""&&(h===void 0||h===1)&&(c===void 0||c===1)&&d===void 0},s=a=>{const l=gC();if(ne(a)){const{label:h,colspan:c,rowspan:d,headerClassName:u}=a;l.label=bt(h),typeof c=="number"&&c>1&&(l.colspan=c,l.origColspan=c),typeof d=="number"&&d>1&&(l.rowspan=d,l.origRowspan=d),typeof u=="string"&&(l.headerClassNames=[...u.split(" ")])}else l.label=bt(a);return l};O(n,(a=[])=>{const l=[];let h=0,c=0;for(t.push(l);(h<a.length||o[c]>0)&&!(c>=e);){const d=a[h];if(o[c]>0){i(d)&&(h+=1),l.push(gC()),o[c]-=1,c+=1;continue}if(h>=a.length)break;const f=s(d);let p=f.origColspan;if(c+p>=e&&(p-=c+p-e,f.colspan=p,f.origColspan=p),f.origRowspan>1)for(let C=0;C<p;C++)o[c+C]=Math.max(o[c+C]??0,f.origRowspan-1);if(l.push(f),f.colspan>1)for(let C=0;C<f.colspan-1;C++)l.push(lY());c+=p,h+=1}});const r=Math.max(...Tt(t,a=>a.length));return O(t,a=>{if(a.length<r){const l=Tt(new Array(r-a.length),()=>gC());a.splice(a.length,0,...l)}}),t}function bme(n,e){if(e.has(n))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Cme(n,e){return e.get?e.get.call(n):e.value}function yme(n,e,t){if(e.set)e.set.call(n,t);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=t}}function hY(n,e,t){if(!e.has(n))throw new TypeError("attempted to "+t+" private field on non-instance");return e.get(n)}function zs(n,e){var t=hY(n,e,"get");return Cme(n,t)}function IR(n,e,t){bme(n,e),e.set(n,t)}function Hl(n,e,t){var o=hY(n,e,"set");return yme(n,o,t),t}const OL=["label","collapsible"];var Mr=new WeakMap,Al=new WeakMap,wb=new WeakMap;class _me{setColumnsLimit(e){Hl(this,wb,e)}setData(e=[]){Hl(this,Mr,wme(e,zs(this,wb))),Hl(this,Al,zs(this,Mr).length)}getData(){return zs(this,Mr)}mergeWith(e){O(e,({row:t,col:o,...i})=>{const s=this.getHeaderSettings(t,o);s!==null&&Wn(s,i,OL)})}map(e){O(zs(this,Mr),t=>{O(t,o=>{const i=e({...o});ne(i)&&Wn(o,i,OL)})})}getHeaderSettings(e,t){if(e>=zs(this,Al)||e<0)return null;const o=zs(this,Mr)[e];return Array.isArray(o)===!1||t>=o.length?null:o[t]??null}getHeadersSettings(e,t,o=1){const i=[];if(e>=zs(this,Al)||e<0)return i;const s=zs(this,Mr)[e];let r=0;for(let a=t;a<s.length;a++){const l=s[a];if(l.isPlaceholder&&U("The first column settings cannot overlap the other header layers"),r+=l.colspan,i.push(l),l.colspan>1&&(a+=l.colspan-1),r===o)break;r>o&&U("The last column settings cannot overlap the other header layers")}return i}getLayersCount(){return zs(this,Al)}getColumnsCount(){return zs(this,Al)>0?zs(this,Mr)[0].length:0}clear(){Hl(this,Mr,[]),Hl(this,Al,0)}constructor(){IR(this,Mr,{writable:!0,value:void 0}),IR(this,Al,{writable:!0,value:void 0}),IR(this,wb,{writable:!0,value:void 0}),Hl(this,Mr,[]),Hl(this,Al,0),Hl(this,wb,1/0)}}const cY="DF-pre-order";function dY(n,e){let t=n.call(e,this);for(let o=0;o<this.childs.length;o++){if(t===!1)return!1;t=dY.call(this.childs[o],n,e)}return t}const Sme="DF-post-order";function uY(n,e){for(let t=0;t<this.childs.length;t++)if(uY.call(this.childs[t],n,e)===!1)return!1;return n.call(e,this)}const fY="BF";function vme(n,e){const t=[this];function o(){if(t.length===0)return;const i=t.shift();t.push(...i.childs),n.call(e,i)!==!1&&o()}o()}const Rme=fY,DL=new Map([[cY,dY],[Sme,uY],[fY,vme]]);class _y{addChild(e){e.parent=this,this.childs.push(e)}cloneTree(e=this){const t=new _y({...e.data});for(let o=0;o<e.childs.length;o++)t.addChild(this.cloneTree(e.childs[o]));return t}replaceTreeWith(e){this.data={...e.data},this.childs=[];for(let t=0;t<e.childs.length;t++)this.addChild(e.childs[t])}walkDown(e,t=Rme){DL.has(t)||U(`Traversal strategy "${t}" does not exist`),DL.get(t).call(this,e,this)}walkUp(e){const t=this,o=i=>{e.call(t,i)!==!1&&i.parent!==null&&o(i.parent)};o(this)}constructor(e){this.data={},this.parent=null,this.childs=[],this.data=e}}function Eme(n,e){if(e.has(n))throw new TypeError("Cannot initialize the same private elements twice on an object")}function kme(n,e){return e.get?e.get.call(n):e.value}function Tme(n,e,t){if(e.set)e.set.call(n,t);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=t}}function gY(n,e,t){if(!e.has(n))throw new TypeError("attempted to "+t+" private field on non-instance");return e.get(n)}function oi(n,e){var t=gY(n,e,"get");return kme(n,t)}function HR(n,e,t){Eme(n,e),e.set(n,t)}function bb(n,e,t){var o=gY(n,e,"set");return Tme(n,o,t),t}var Qh=new WeakMap,Ol=new WeakMap,Jh=new WeakMap;class xme{getRoots(){return Array.from(oi(this,Qh).values())}getRootByColumn(e){let t;return oi(this,Ol).has(e)&&(t=oi(this,Qh).get(oi(this,Ol).get(e))),t}getNode(e,t){const o=this.getRootByColumn(t);if(!o)return;const i=t-oi(this,Ol).get(t);let s=0,r;return o.walkDown(a=>{const{data:{origColspan:l,headerLevel:h}}=a;if(e===h){if(i>=s&&i<=s+l-1)return r=a,r.data.isRoot=t===r.data.columnIndex,!1;s+=l}}),r}rebuildTreeIndex(){let e=0;oi(this,Ol).clear(),O(oi(this,Qh),([,{data:{colspan:t}}])=>{for(let o=e;o<e+t;o++)oi(this,Ol).set(o,e);e+=t})}buildTree(){this.clear();const e=oi(this,Jh).getColumnsCount();let t=0;for(;t<e;){const o=oi(this,Jh).getHeaderSettings(0,t),i=new _y;oi(this,Qh).set(t,i),this.buildLeaves(i,t,0,o.origColspan),t+=o.origColspan}this.rebuildTreeIndex()}buildLeaves(e,t,o,i=1){const s=oi(this,Jh).getHeadersSettings(o,t,i);o+=1,O(s,r=>{const a={...r,headerLevel:o-1,columnIndex:t};let l;o===1?(e.data=a,l=e):(l=new _y(a),e.addChild(l)),o<oi(this,Jh).getLayersCount()&&this.buildLeaves(l,t,o,r.origColspan),t+=r.origColspan})}clear(){oi(this,Qh).clear(),oi(this,Ol).clear()}constructor(e){HR(this,Qh,{writable:!0,value:void 0}),HR(this,Ol,{writable:!0,value:void 0}),HR(this,Jh,{writable:!0,value:void 0}),bb(this,Qh,new Map),bb(this,Ol,new Map),bb(this,Jh,null),bb(this,Jh,e)}}function pY(n,e){n.walkDown(({data:t,childs:o})=>{if(!t.isHidden&&(e(t.columnIndex),o.length===0))for(let i=1;i<t.colspan;i++)e(t.columnIndex+i)})}function Sy({childs:n},e){if(n.length!==0)return n[0].data[e]}function vy(n){return Sy(n,"origColspan")===n.data.origColspan}function OM(n){const{data:e,childs:t}=n;if(!e.isCollapsed||e.isHidden||e.origColspan<=1)return{rollbackModification:()=>{},affectedColumns:[],colspanCompensation:0};if(vy(n))return OM(t[0]);e.isCollapsed=!1;const i=t.slice(1),s=new Set;let r=0;if(i.length>0)O(i,a=>{a.replaceTreeWith(a.data.clonedTree),a.data.clonedTree=null;const l=a.data;r+=l.colspan,pY(a,h=>{s.add(h)})});else{const{colspan:a,origColspan:l,columnIndex:h}=e;r=l-a;for(let c=1;c<l;c++)s.add(h+c)}return n.walkUp(a=>{const{data:l}=a;l.colspan+=r,l.colspan>=l.origColspan?(l.colspan=l.origColspan,l.isCollapsed=!1):vy(a)&&(l.isCollapsed=Sy(a,"isCollapsed"))}),{rollbackModification:()=>DM(n),affectedColumns:Array.from(s),colspanCompensation:r}}function DM(n){const{data:e,childs:t}=n;if(e.isCollapsed||e.isHidden||e.origColspan<=1)return{rollbackModification:()=>{},affectedColumns:[],colspanCompensation:0};if(vy(n))return DM(t[0]);e.isCollapsed=!0;const i=t.slice(1),s=new Set;if(i.length>0)O(i,a=>{pY(a,l=>{s.add(l)}),a.data.clonedTree=a.cloneTree(),a.walkDown(({data:l})=>{l.isHidden=!0})});else{const{origColspan:a,columnIndex:l}=e;for(let h=1;h<a;h++){const c=l+h;s.add(c)}}const r=e.colspan-(Sy(n,"colspan")??1);return n.walkUp(a=>{const{data:l}=a;l.colspan-=r,l.colspan<=1?(l.colspan=1,l.isCollapsed=!0):vy(a)&&(l.isCollapsed=Sy(a,"isCollapsed"))}),{rollbackModification:()=>OM(n),affectedColumns:Array.from(s),colspanCompensation:r}}function Mme(n,e){Number.isInteger(e)||U("The passed gridColumnIndex argument has invalid type."),n.childs.length>0&&U(pt`The passed node is not the last node on the tree. Only for\x20
|
|
266
|
+
the last node, the hide column modification can be applied.`);const{crossHiddenColumns:t}=n.data;if(t.includes(e))return;let o=!1;n.walkUp(i=>{const{data:{collapsible:s}}=i;if(s)return o=!0,!1}),!o&&n.walkUp(i=>{const{data:s}=i;s.crossHiddenColumns.push(e),s.colspan>1?s.colspan-=1:s.isHidden=!0})}function Ime(n,e){Number.isInteger(e)||U("The passed gridColumnIndex argument has invalid type."),n.childs.length>0&&U(pt`The passed node is not the last node on the tree. Only for\x20
|
|
267
|
+
the last node, the show column modification can be applied.`);const{crossHiddenColumns:t}=n.data;if(!t.includes(e))return;let o=!1;n.walkUp(i=>{const{data:{collapsible:s}}=i;if(s)return o=!0,!1}),!o&&n.walkUp(i=>{const{data:s}=i;s.crossHiddenColumns.splice(s.crossHiddenColumns.indexOf(e),1),!s.isHidden&&s.colspan<s.origColspan&&(s.colspan+=1),s.isHidden=!1})}const NL=new Map([["collapse",DM],["expand",OM],["hide-column",Mme],["show-column",Ime]]);function Hme(n,e,t){return NL.has(n)||U(`The node modifier action ("${n}") does not exist.`),NL.get(n)(e,t)}function Cb(n){const e=[];return O(n,t=>{t.walkDown(o=>{const i=o.data,{origColspan:s,columnIndex:r,headerLevel:a,crossHiddenColumns:l}=i,h=Dme(e,a);let c=!1;for(let d=r;d<r+s;d++)if(l.includes(d)||c)h.push(lY());else{const f=Ome(i);f.isRoot=!0,h.push(f),c=!0}})}),Ame(e),e}function Ame(n){for(let e=0;e<n.length;e++){const t=n[e];for(let o=0;o<t.length;o++){const i=t[o];if(!i||!i.isRoot||!i.origRowspan||i.origRowspan<=1)continue;const s=Math.min(i.origRowspan,n.length-e),r=i.origColspan||1;for(let a=1;a<s;a++){const l=e+a;if(n[l])for(let h=o;h<o+r&&h<n[l].length;h++)n[l][h]={label:"",isPlaceholder:!0,isRowspanPlaceholder:!0}}}}}function Ome(n){const{crossHiddenColumns:e,...t}=gC(n);return t}function Dme(n,e){let t;return Array.isArray(n[e])?t=n[e]:(t=[],n[e]=t),t}function Nme(n,e){if(e.has(n))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Pme(n,e){return e.get?e.get.call(n):e.value}function Lme(n,e,t){if(e.set)e.set.call(n,t);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=t}}function mY(n,e,t){if(!e.has(n))throw new TypeError("attempted to "+t+" private field on non-instance");return e.get(n)}function fn(n,e){var t=mY(n,e,"get");return Pme(n,t)}function AR(n,e,t){Nme(n,e),e.set(n,t)}function Dl(n,e,t){var o=mY(n,e,"set");return Lme(n,o,t),t}var Us=new WeakMap,ii=new WeakMap,Nl=new WeakMap;class Wme{setState(e){fn(this,Us).setData(e);let t=!1;try{fn(this,ii).buildTree()}catch{fn(this,ii).clear(),fn(this,Us).clear(),t=!0}return Dl(this,Nl,Cb(fn(this,ii).getRoots())),t}setColumnsLimit(e){fn(this,Us).setColumnsLimit(e)}mergeStateWith(e){const t=Tt(e,({row:o,...i})=>({row:o<0?this.rowCoordsToLevel(o):o,...i}));fn(this,Us).mergeWith(t),fn(this,ii).buildTree(),Dl(this,Nl,Cb(fn(this,ii).getRoots()))}mapState(e){fn(this,Us).map(e),fn(this,ii).buildTree(),Dl(this,Nl,Cb(fn(this,ii).getRoots()))}mapNodes(e){return $i(fn(this,ii).getRoots(),(t,o)=>(o.walkDown(i=>{const s=e(i.data);s!==void 0&&t.push(s)}),t),[])}triggerNodeModification(e,t,o){t<0&&(t=this.rowCoordsToLevel(t));const i=fn(this,ii).getNode(t,o);let s;return i&&(s=Hme(e,i,o),Dl(this,Nl,Cb(fn(this,ii).getRoots()))),s}triggerColumnModification(e,t){return this.triggerNodeModification(e,-1,t)}rowCoordsToLevel(e){if(e>=0)return null;const t=e+Math.max(this.getLayersCount(),1);return t<0?null:t}levelToRowCoords(e){if(e<0)return null;const t=e-Math.max(this.getLayersCount(),1);return t>=0?null:t}getHeaderSettings(e,t){return e<0&&(e=this.rowCoordsToLevel(e)),e===null||e>=this.getLayersCount()?null:fn(this,Nl)[e]?.[t]??null}getHeaderTreeNodeData(e,t){const o=this.getHeaderTreeNode(e,t);return o?{...o.data}:null}getHeaderTreeNode(e,t){if(e<0&&(e=this.rowCoordsToLevel(e)),e===null||e>=this.getLayersCount())return null;const o=fn(this,ii).getNode(e,t);return o||null}findTopMostEntireHeaderLevel(e,t=e){const o=t-e+1;let i=!1,s=null;for(let r=e;r<=t;r++){const a=fn(this,ii).getRootByColumn(r);if(!a)break;i=!0,a.walkDown(l=>{const{columnIndex:h,headerLevel:c,origColspan:d,isHidden:u}=l.data;u||d<=o&&h>=e&&h+d-1<=t&&(s===null||c<s)&&(s=c)},cY)}return i&&s===null?-1:this.levelToRowCoords(s??0)}findLeftMostColumnIndex(e,t){const{isRoot:o}=this.getHeaderSettings(e,t)??{isRoot:!0};if(o)return t;let i=t-1;for(;i>=0;){const{isRoot:s}=this.getHeaderSettings(e,i)??{isRoot:!0};if(s)break;i-=1}return i}findRightMostColumnIndex(e,t){const{isRoot:o,origColspan:i}=this.getHeaderSettings(e,t)??{isRoot:!0,origColspan:1};if(o)return t+i-1;let s=t+1;for(;s<this.getColumnsCount();){const{isRoot:r}=this.getHeaderSettings(e,s)??{isRoot:!0};if(r)break;s+=1}return s-1}getLayersCount(){return fn(this,Us).getLayersCount()}getColumnsCount(){return fn(this,Us).getColumnsCount()}clear(){Dl(this,Nl,[]),fn(this,Us).clear(),fn(this,ii).clear()}constructor(){AR(this,Us,{writable:!0,value:void 0}),AR(this,ii,{writable:!0,value:void 0}),AR(this,Nl,{writable:!0,value:void 0}),Dl(this,Us,new _me),Dl(this,ii,new xme(fn(this,Us))),Dl(this,Nl,[[]])}}function $me(n,e){if(e.has(n))throw new TypeError("Cannot initialize the same private elements twice on an object")}function dh(n,e,t){if(!e.has(n))throw new TypeError("attempted to get private field on non-instance");return t}function Qd(n,e){$me(n,e),e.add(n)}var PL=new WeakSet,LL=new WeakSet,WL=new WeakSet,wY=new WeakSet,D0=new WeakSet,NM=new WeakSet;class Fme{setLayersCount(e){return this.layersCount=e,this}getWidth(e){return this.widthsMap.getValueAtIndex(this.hot.toPhysicalColumn(e))}buildWidthsMap(){const e=dh(this,LL,Vme).call(this),t=e.size>0,o=this.hot.getCurrentThemeName();this.container=this.hot.rootDocument.createElement("div"),this.container.classList.add("handsontable","htGhostTable","htAutoSize","htNestedHeaders"),o&&this.container.classList.add(o),dh(this,WL,zme).call(this,this.container,t),this.hot.rootDocument.body.appendChild(this.container);const i=t?dh(this,PL,Bme).call(this):null,r=this.container.querySelector('[data-ghost-table="rendered"]').querySelectorAll("th[data-column]"),a=new Map;for(let l=0;l<r.length;l++){const h=r[l];if(h.colSpan>1)continue;const c=Number.parseInt(h.dataset.column,10);a.set(c,h)}this.widthsMap.clear(),a.forEach((l,h)=>{const c=this.hot.toPhysicalColumn(h);if(this.hot.columnIndexMapper.isHidden(c))return;let d;if(t&&e.has(c)){const u=i.get(c);u!==void 0&&(d=u)}d===void 0&&(d=l.getBoundingClientRect().width),this.widthsMap.setValueAtIndex(c,d)}),this.container.remove(),this.container=null}clear(){this.widthsMap.clear(),this.container=null}constructor({hot:e,headersStateManager:t}){Qd(this,PL),Qd(this,LL),Qd(this,WL),Qd(this,wY),Qd(this,D0),Qd(this,NM),this.layersCount=0,this.hot=e,this.headersStateManager=t,this.widthsMap=this.hot.columnIndexMapper.createAndRegisterIndexMap("nestedHeaders.widthsMap","physicalIndexToValue")}}function Bme(){const e=this.container.querySelector('[data-ghost-table="full"]').querySelectorAll("tr:last-of-type th"),t=new Map;for(let o=0;o<e.length;o++){const i=Number.parseInt(e[o].dataset.column,10),s=this.hot.toPhysicalColumn(i);t.set(s,e[o].getBoundingClientRect().width)}return t}function Vme(){const n=new Set,e=this.hot.countCols();for(let t=0;t<e;t++){const o=this.headersStateManager.getHeaderTreeNode(-1,t);if(!o)continue;let i=!1;o.walkUp(s=>{if(s.data.isCollapsed===!0)return i=!0,!1}),i&&n.add(this.hot.toPhysicalColumn(t))}return n}function zme(n,e){const t=this.hot.getSettings(),o=!!t.dropdownMenu,i=!!t.collapsibleColumns,s=this.hot.countCols(),r=t.sanitizer;e?n.innerHTML=dh(this,wY,Ume).call(this,s,o,i,r)+dh(this,D0,$L).call(this,s,o,i,r):n.innerHTML=dh(this,D0,$L).call(this,s,o,i,r)}function Ume(n,e,t,o){let i="";for(let s=0;s<this.layersCount;s++){let r="";for(let a=0;a<n;a++){const l=this.headersStateManager.getHeaderTreeNodeData(s,a);l&&l.isRoot&&(r+=`<th data-column="${a}" colspan="${l.origColspan}">${dh(this,NM,bY).call(this,l,e,t,o)}</th>`)}i+=`<tr>${r}</tr>`}return`<table data-ghost-table="full"><thead>${i}</thead></table>`}function $L(n,e,t,o){let i="";for(let s=0;s<this.layersCount;s++){let r="";for(let a=0;a<n;a++){const l=this.headersStateManager.getHeaderSettings(s,a);if(l&&!l.isPlaceholder&&!l.isHidden&&!l.isRowspanPlaceholder){const h=l.rowspan>1?` rowspan="${l.rowspan}"`:"";r+=`<th data-column="${a}" colspan="${l.colspan}"${h}>${dh(this,NM,bY).call(this,l,e,t,o)}</th>`}}i+=`<tr>${r}</tr>`}return`<table data-ghost-table="rendered"><thead>${i}</thead></table>`}function bY(n,e,t,o){const i=typeof o=="function"?o(n.label,"innerHTML"):n.label,s=e?'<button class="changeType"></button>':"",a=t&&(n.origColspan>1||n.colspan>1)?'<div class="collapsibleIndicator expanded">-</div>':"";return`<div class="relative"><span class="colHeader">${i}</span>${s}${a}</div>`}function Yme(n,e,t,o){if(n<=t)return n;for(let i=n+1;i<=-1;i++){const s=o(i,e);if(!s)continue;const{isPlaceholder:r,isRowspanPlaceholder:a,isHidden:l}=s;if(!r&&!a&&!l)return i}return n}function CY(n,e){if(e.has(n))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Gme(n,e){return e.get?e.get.call(n):e.value}function jme(n,e,t){if(e.set)e.set.call(n,t);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=t}}function yY(n,e,t){if(!e.has(n))throw new TypeError("attempted to "+t+" private field on non-instance");return e.get(n)}function de(n,e){var t=yY(n,e,"get");return Gme(n,t)}function Ir(n,e,t){CY(n,e),e.set(n,t)}function yt(n,e,t){var o=yY(n,e,"set");return jme(n,o,t),t}function Gt(n,e,t){if(!e.has(n))throw new TypeError("attempted to get private field on non-instance");return t}function gn(n,e){CY(n,e),e.add(n)}const FL="nestedHeaders",qme=280;var De=new WeakMap,Ia=new WeakMap,Gu=new WeakMap,vm=new WeakMap,Rm=new WeakMap,Oi=new WeakMap,xc=new WeakMap,Pp=new WeakMap,dp=new WeakMap,Pl=new WeakMap,Lp=new WeakSet,_Y=new WeakSet,SY=new WeakSet,vY=new WeakSet,BL=new WeakSet,VL=new WeakSet,zL=new WeakSet,UL=new WeakSet,YL=new WeakSet,GL=new WeakSet,jL=new WeakSet,qL=new WeakSet,KL=new WeakSet,XL=new WeakSet,ZL=new WeakSet,QL=new WeakSet,JL=new WeakSet,eW=new WeakSet,tW=new WeakSet,nW=new WeakSet,oW=new WeakSet,iW=new WeakSet,sW=new WeakSet;class Kme extends rt{static get PLUGIN_KEY(){return FL}static get PLUGIN_PRIORITY(){return qme}isEnabled(){return!!this.hot.getSettings()[FL]}enablePlugin(){if(this.enabled)return;const{nestedHeaders:e}=this.hot.getSettings();(!Array.isArray(e)||!Array.isArray(e[0]))&&Ie(pt`Your Nested Headers plugin configuration is invalid. The settings has to be\x20
|
|
268
|
+
passed as an array of arrays e.q. [['A1', { label: 'A2', colspan: 2 }]]`),this.addHook("init",()=>Gt(this,oW,pwe).call(this)),this.addHook("afterLoadData",(...t)=>Gt(this,iW,mwe).call(this,...t)),this.addHook("beforeOnCellMouseDown",(...t)=>Gt(this,UL,nwe).call(this,...t)),this.addHook("afterOnCellMouseDown",(...t)=>Gt(this,YL,owe).call(this,...t)),this.addHook("beforeOnCellMouseOver",(...t)=>Gt(this,GL,iwe).call(this,...t)),this.addHook("beforeOnCellMouseUp",(...t)=>Gt(this,jL,swe).call(this,...t)),this.addHook("beforeSelectionHighlightSet",(...t)=>Gt(this,qL,rwe).call(this,...t)),this.addHook("modifyTransformStart",(...t)=>Gt(this,KL,awe).call(this,...t)),this.addHook("afterSelection",()=>de(this,Pl).call(this)),this.addHook("afterSelectionFocusSet",()=>de(this,Pl).call(this)),this.addHook("beforeViewportScrollHorizontally",(...t)=>Gt(this,BL,Jme).call(this,...t)),this.addHook("afterGetColumnHeaderRenderers",t=>Gt(this,ZL,hwe).call(this,t)),this.addHook("modifyColWidth",(...t)=>Gt(this,JL,dwe).call(this,...t)),this.addHook("modifyColumnHeaderHeight",(...t)=>Gt(this,eW,uwe).call(this,...t)),this.addHook("modifyColumnHeaderValue",(...t)=>Gt(this,tW,fwe).call(this,...t)),this.addHook("beforeHighlightingColumnHeader",(...t)=>Gt(this,VL,ewe).call(this,...t)),this.addHook("beforeCopy",(...t)=>Gt(this,zL,twe).call(this,...t)),this.addHook("beforeSelectColumns",(...t)=>Gt(this,XL,lwe).call(this,...t)),this.addHook("beforeViewRender",()=>Gt(this,sW,wwe).call(this)),this.addHook("afterViewportColumnCalculatorOverride",(...t)=>Gt(this,QL,cwe).call(this,...t)),this.addHook("modifyFocusedElement",(...t)=>Gt(this,nW,gwe).call(this,...t)),this.hot.columnIndexMapper.addLocalHook("cacheUpdated",de(this,Pl)),this.hot.rowIndexMapper.addLocalHook("cacheUpdated",de(this,Pl)),super.enablePlugin(),this.updatePlugin()}updatePlugin(){if(!this.hot.view)return;const{nestedHeaders:e}=this.hot.getSettings();yt(this,Oi,null),yt(this,xc,null),de(this,De).setColumnsLimit(this.hot.countCols()),Array.isArray(e)&&(this.detectedOverlappedHeaders=de(this,De).setState(e)),yt(this,dp,de(this,De).mapNodes(({origRowspan:t})=>t>1?!0:void 0).length>0),de(this,dp)?B(this.hot.rootElement,"htHasRowspanHeaders"):oe(this.hot.rootElement,"htHasRowspanHeaders"),this.detectedOverlappedHeaders&&Ie(pt`Your Nested Headers plugin setup contains overlapping headers. This kind of configuration\x20
|
|
269
|
+
is currently not supported.`),this.enabled&&this.hot.columnIndexMapper.hidingMapsCollection.getMergedValues().forEach((t,o)=>{const i=t===!0?"hide-column":"show-column";de(this,De).triggerColumnModification(i,o)}),!de(this,Ia)&&this.enabled&&yt(this,Ia,this.hot.columnIndexMapper.createChangesObserver("hiding").subscribe(t=>{t.forEach(({op:o,index:i,newValue:s})=>{if(o==="replace"){const r=s===!0?"hide-column":"show-column";de(this,De).triggerColumnModification(r,i)}}),this.ghostTable.buildWidthsMap()})),yt(this,Pp,!0),super.updatePlugin()}disablePlugin(){this.hot.rowIndexMapper.removeLocalHook("cacheUpdated",de(this,Pl)),this.hot.columnIndexMapper.removeLocalHook("cacheUpdated",de(this,Pl)),this.clearColspans(),de(this,De).clear(),yt(this,Oi,null),yt(this,xc,null),oe(this.hot.rootElement,"htHasRowspanHeaders"),de(this,Ia).unsubscribe(),yt(this,Ia,null),this.ghostTable.clear(),super.disablePlugin()}getStateManager(){return de(this,De)}getLayersCount(){return de(this,De).getLayersCount()}getHeaderSettings(e,t){return de(this,De).getHeaderSettings(e,t)}clearColspans(){if(!this.hot.view)return;const{_wt:e}=this.hot.view,t=e.getSetting("columnHeaders").length,o=e.wtTable.THEAD,i=e.wtOverlays.topOverlay.clone.wtTable.THEAD,s=e.wtOverlays.topInlineStartCornerOverlay?e.wtOverlays.topInlineStartCornerOverlay.clone.wtTable.THEAD:null;for(let r=0;r<t;r++){const a=o.childNodes[r];if(!a)break;const l=i.childNodes[r],h=s?s.childNodes[r]:null;for(let c=0,d=a.childNodes.length;c<d;c++)a.childNodes[c].removeAttribute("colspan"),a.childNodes[c].removeAttribute("rowspan"),a.childNodes[c].style.display="",oe(a.childNodes[c],"hiddenHeader"),l&&l.childNodes[c]&&(l.childNodes[c].removeAttribute("colspan"),l.childNodes[c].removeAttribute("rowspan"),l.childNodes[c].style.display="",oe(l.childNodes[c],"hiddenHeader")),s&&h&&h.childNodes[c]&&(h.childNodes[c].removeAttribute("colspan"),h.childNodes[c].removeAttribute("rowspan"),h.childNodes[c].style.display="",oe(h.childNodes[c],"hiddenHeader"))}}headerRendererFactory(e){const t=this.hot.view._wt.getSetting("fixedColumnsStart");return(o,i)=>{const{columnIndexMapper:s,view:r}=this.hot;let a=s.getVisualFromRenderableIndex(o);a===null&&(a=o),i.removeAttribute("colspan"),i.removeAttribute("rowspan"),i.style.display="",oe(i,"hiddenHeader"),oe(i,"hiddenHeaderText"),oe(i,"htRowspanHeader"),oe(i,"htRowspanBottomLevel");const{colspan:l,rowspan:h,isHidden:c,isPlaceholder:d,isRowspanPlaceholder:u,headerClassNames:f}=de(this,De).getHeaderSettings(e,a)??{};if(u)B(i,"hiddenHeader"),i.style.display="none";else if(d||c)B(i,"hiddenHeader");else{if(l>1){const{wtOverlays:p}=r._wt,C=p.topInlineStartCornerOverlay?.clone.wtTable.THEAD.contains(i),_=p.inlineStartOverlay?.clone.wtTable.THEAD.contains(i);p.topOverlay?.clone.wtTable.THEAD.contains(i)&&a<t&&B(i,"hiddenHeaderText");const T=C||_?Math.min(l,t-o):l;T>1&&i.setAttribute("colspan",T)}if(h>1){const p=e+h===this.getLayersCount();B(i,"htRowspanHeader"),p&&B(i,"htRowspanBottomLevel"),i.setAttribute("rowspan",h)}}if(this.hot.view.appendColHeader(a,i,(...p)=>this.getColumnHeaderValue(...p),e),!d&&!c&&!u){const p=i.querySelector("div.relative");p&&f&&f.length>0&&(oe(p,this.hot.getColumnMeta(a).headerClassName),B(p,f))}}}getColumnHeaderValue(e,t){const{isHidden:o,isPlaceholder:i,isRowspanPlaceholder:s}=de(this,De).getHeaderSettings(t,e)??{};return i||o||s?"":this.hot.getColHeader(e,t)}destroy(){yt(this,De,null),oe(this.hot.rootElement,"htHasRowspanHeaders"),de(this,Ia)!==null&&(de(this,Ia).unsubscribe(),yt(this,Ia,null)),super.destroy()}_getHeaderTreeNodeDataByCoords(e){if(!(e.row>=0||e.col<0))return de(this,De).getHeaderTreeNodeData(e.row,e.col)}constructor(...e){super(...e),gn(this,Lp),gn(this,_Y),gn(this,SY),gn(this,vY),gn(this,BL),gn(this,VL),gn(this,zL),gn(this,UL),gn(this,YL),gn(this,GL),gn(this,jL),gn(this,qL),gn(this,KL),gn(this,XL),gn(this,ZL),gn(this,QL),gn(this,JL),gn(this,eW),gn(this,tW),gn(this,nW),gn(this,oW),gn(this,iW),gn(this,sW),Ir(this,De,{writable:!0,value:void 0}),Ir(this,Ia,{writable:!0,value:void 0}),Ir(this,Gu,{writable:!0,value:void 0}),Ir(this,vm,{writable:!0,value:void 0}),Ir(this,Rm,{writable:!0,value:void 0}),Ir(this,Oi,{writable:!0,value:void 0}),Ir(this,xc,{writable:!0,value:void 0}),Ir(this,Pp,{writable:!0,value:void 0}),Ir(this,dp,{writable:!0,value:void 0}),Ir(this,Pl,{writable:!0,value:void 0}),yt(this,De,new Wme),yt(this,Ia,null),yt(this,Gu,null),yt(this,vm,!1),yt(this,Rm,null),yt(this,Oi,null),yt(this,xc,null),yt(this,Pp,!1),this.ghostTable=new Fme({hot:this.hot,headersStateManager:de(this,De)}),this.detectedOverlappedHeaders=!1,yt(this,dp,!1),yt(this,Pl,()=>{const t=this.hot?.getSelectedRangeActive();if(!t)return;const{highlight:o}=t;if(o.isHeader()&&o.col>=0){const{isRowspanPlaceholder:s}=de(this,De).getHeaderSettings(o.row,o.col)??{},r=s?Gt(this,Lp,pC).call(this,o.row,o.col):o.row,a=de(this,De).findLeftMostColumnIndex(r,o.col),l=this.hot.selection.highlight.getFocus(),h=l.visualCellRange;if(h===null)return;h.highlight.row=r,h.highlight.col=a,h.from.row=r,h.from.col=a,h.to.row=r,h.to.col=a,l.commit()}})}}function pC(n,e){const t=-this.getLayersCount();for(let o=n;o>=t;o--){const{isRowspanPlaceholder:i}=de(this,De).getHeaderSettings(o,e)??{};if(!i)return o}return n}function Xme(n,e){const t=de(this,De).findLeftMostColumnIndex(n,e),{rowspan:o=1}=de(this,De).getHeaderSettings(n,t)??{};return o}function Zme(n,e){const t=de(this,De).getHeaderSettings(n,e);if(!t)return!1;const{isPlaceholder:o,isRowspanPlaceholder:i,isHidden:s}=t;return i?n<-1:!o&&!i&&!s}function Qme(n,e,t){if(![-1,1].includes(t))return null;for(let o=e;o>=0&&o<this.hot.countCols();o+=t)if(Gt(this,SY,Zme).call(this,n,o))return o;return null}function Jme(n,e){const t=this.hot.getSelectedRangeActive();if(!t)return n;const{highlight:o}=t,{navigableHeaders:i}=this.hot.getSettings(),s=this.hot.selection.isSelectedByColumnHeader(),r=i?o.row:de(this,Rm)?.row,a=s?n:o.col,l=r<0&&a>=0;if(yt(this,Rm,null),!l)return n;const h=this.hot.getFirstFullyVisibleColumn(),c=this.hot.getLastFullyVisibleColumn(),d=c-h+1,u=de(this,De).findLeftMostColumnIndex(r,a),f=de(this,De).findRightMostColumnIndex(r,a),p=f-u+1;if(u<h&&f>c)return u;if(s){let C=null;return u>=h&&f>c?p>d?(e.value="start",C=u):(e.value="end",C=f):u<h&&f<=c&&(p>d?(e.value="end",C=f):(e.value="start",C=u)),C}return u<=h?u:f}function ewe(n,e,t){const o=de(this,De).getHeaderTreeNodeData(e,n);if(!o)return n;const{columnCursor:i,selectionType:s,selectionWidth:r}=t,{isRoot:a,colspan:l}=de(this,De).getHeaderSettings(e,n);if(s===rk){if(!a)return o.columnIndex}else if(s===qF&&(l>r-i||!a))return null;return n}function twe(n,e,{columnHeadersCount:t}){if(t!==0)for(let o=0;o<e.length;o++){const{startRow:i,startCol:s,endRow:r,endCol:a}=e[o],l=r-i+1,h=s-a+1;if(i>=0||h===1)break;for(let c=s;c<=a;c++)for(let d=i;d<=r;d++){const u=l+d,f=c-s;if(f===0)continue;de(this,De).getHeaderTreeNodeData(d,c)?.isRoot===!1&&(n[u][f]="")}}}function nwe(n,e,t,o){yt(this,Oi,null),yt(this,xc,null),this._getHeaderTreeNodeDataByCoords(e)&&(o.column=!0)}function owe(n,e){const t=this._getHeaderTreeNodeDataByCoords(e);if(!t)return;yt(this,Gu,e.clone()),yt(this,vm,!0);const{selection:o}=this.hot,i=o.isSelected()?o.getSelectedRange().current():null,s=[],{columnIndex:r,origColspan:a}=t,l=!o.inInSelection(e);n.shiftKey&&i?e.col<i.from.col?s.push(i.getTopEndCorner().col,r,e.row):e.col>i.from.col?s.push(i.getTopStartCorner().col,r+a-1,e.row):s.push(r,r+a-1,e.row):(Z0(n)||Uc(n)&&l||_4(n))&&s.push(r,r+a-1,e.row),o.selectColumns(...s)}function iwe(n,e,t,o){if(!this.hot.view.isMouseDown()||o.column)return;const i=this._getHeaderTreeNodeDataByCoords(e);if(!i)return;const{columnIndex:s,origColspan:r}=i,a=this.hot.getSelectedRangeActive(),l=a.getTopStartCorner(),h=a.getBottomEndCorner(),{from:c}=a;o.column=!0,o.cell=!0;const d=[],u=et(e.row,-1/0,-1);e.col<c.col?d.push(h.col,s,u):e.col>c.col?d.push(l.col,s+r-1,u):d.push(s,s+r-1,u),this.hot.selection.selectColumns(...d)}function swe(){yt(this,vm,!1)}function rwe(){const{navigableHeaders:n}=this.hot.getSettings();if(!this.hot.view.isMouseDown()||!de(this,vm)||!n)return;const e=this.hot.getSelectedRangeLast(),t=e.getTopStartCorner().col,o=e.getBottomEndCorner().col,{columnIndex:i,origColspan:s}=de(this,De).getHeaderTreeNodeData(de(this,Gu).row,de(this,Gu).col);if(e.setHighlight(de(this,Gu)),s>e.getWidth()||i<t||i+s-1>o){const r=de(this,De).findTopMostEntireHeaderLevel(et(t,i,i+s-1),et(o,i,i+s-1));e.highlight.row=r,e.highlight.col=e.from.col}}function awe(n){const{highlight:e}=this.hot.getSelectedRangeActive(),{row:t,col:o}=de(this,xc)??{};Number.isInteger(t)&&Number.isInteger(o)&&(e.row!==t||e.col!==o)&&yt(this,Oi,null);const i=n.row,s=n.col;let r=e.col+n.col,a=e.row+n.row;if(n.row!==0&&r>=0){const c=Math.sign(n.row),d=-1,u=-this.getLayersCount();let f=a;for(;f<=d&&f>=u;){const{isRowspanPlaceholder:p}=de(this,De).getHeaderSettings(f,r)??{};if(!p)break;f+=c}n.row=f-e.row,a=f}if(i===0&&s!==0&&e.row<0){if(Number.isInteger(de(this,Oi))){const _=Gt(this,vY,Qme).call(this,de(this,Oi),r,Math.sign(s));_!==null&&(r=_,a=de(this,Oi))}r<0&&s<0&&Number.isInteger(de(this,Oi))&&(a=de(this,Oi));const c=de(this,De).findLeftMostColumnIndex(e.row,e.col),d=de(this,De).findRightMostColumnIndex(e.row,e.col),{isRowspanPlaceholder:u}=de(this,De).getHeaderSettings(a,r)??{},f=a===e.row&&r>=c&&r<=d,p=a===e.row&&u&&s>0&&e.row<-1;!f&&!p&&(a=Gt(this,Lp,pC).call(this,a,r)),n.row=a-e.row,Gt(this,_Y,Xme).call(this,a,r)>1&&!Number.isInteger(de(this,Oi))&&yt(this,Oi,Yme(e.row,r,-this.getLayersCount(),(_,S)=>de(this,De).getHeaderSettings(_,S)))}const l=this.hot._createCellCoords(a,r),h=l.isHeader()&&l.col>=0;if((!h||i!==0)&&yt(this,Oi,null),h){const{isRowspanPlaceholder:c}=de(this,De).getHeaderSettings(e.row,e.col)??{},{isRowspanPlaceholder:d}=de(this,De).getHeaderSettings(l.row,l.col)??{};let u=de(this,De).findLeftMostColumnIndex(l.row,l.col),f=de(this,De).findRightMostColumnIndex(l.row,l.col);if(d){const p=Gt(this,Lp,pC).call(this,l.row,l.col);u=de(this,De).findLeftMostColumnIndex(p,l.col),f=de(this,De).findRightMostColumnIndex(p,l.col)}if(c){const p=Gt(this,Lp,pC).call(this,e.row,e.col);u=de(this,De).findLeftMostColumnIndex(p,e.col),f=de(this,De).findRightMostColumnIndex(p,e.col),s<0?u=Math.max(u,Math.min(e.col,l.col)):s>0&&(f=Math.min(f,Math.max(e.col,l.col)))}if(n.col<0){const p=e.col>=u&&e.col<=f?u-1:f,C=this.hot.columnIndexMapper.getNearestNotHiddenIndex(p,-1);C===null?n.col=-this.hot.view.countRenderableColumnsInRange(0,e.col):n.col=-Math.max(this.hot.view.countRenderableColumnsInRange(C,e.col)-1,1)}else if(n.col>0){const p=e.col>=u&&e.col<=f?f+1:u,C=this.hot.columnIndexMapper.getNearestNotHiddenIndex(p,1);C===null?(n.col=this.hot.view.countRenderableColumnsInRange(e.col,this.hot.countCols()),c&&(n.col+=1,e.row<-1&&(n.row=1,n.col=-(e.col+1)))):n.col=Math.max(this.hot.view.countRenderableColumnsInRange(e.col,C)-1,1)}}yt(this,xc,{row:e.row+n.row,col:e.col+n.col})}function lwe(n,e,t){const o=n.row,i=this._getHeaderTreeNodeDataByCoords({row:o,col:n.col}),s=this._getHeaderTreeNodeDataByCoords({row:o,col:e.col});yt(this,Rm,t.clone()),e.col<n.col?(i&&(n.col=i.columnIndex+i.origColspan-1),s&&(e.col=s.columnIndex)):e.col>=n.col&&(i&&(n.col=i.columnIndex),s&&(e.col=s.columnIndex+s.origColspan-1))}function hwe(n){if(de(this,De).getLayersCount()>0){n.length=0;for(let e=0;e<de(this,De).getLayersCount();e++)n.push(this.headerRendererFactory(e))}}function cwe(n){const e=de(this,De).getLayersCount();let t=n.startColumn,o=!!e;for(let i=0;i<e;i++){const s=de(this,De).findLeftMostColumnIndex(i,n.startColumn),r=this.hot.columnIndexMapper.getRenderableFromVisualIndex(s);if(s>=0&&(o=!1),di(r)&&r<n.startColumn){t=r;break}}n.startColumn=o?de(this,De).getHeaderTreeNodeData(0,t).columnIndex:t}function dwe(n,e){const t=this.ghostTable.getWidth(e);return n>t?n:t}function uwe(){if(!de(this,dp))return;const n=this.hot.rootWindow.getComputedStyle(this.hot.rootElement),e=Number.parseFloat(n.getPropertyValue("--ht-cell-vertical-padding")),t=Number.parseFloat(n.getPropertyValue("--ht-line-height")),o=Math.round(e*2+t+1);if(Number.isFinite(o))return new Array(this.getLayersCount()).fill(o)}function fwe(n,e,t){const{label:o}=de(this,De).getHeaderTreeNodeData(t,e)??{label:""};return o}function gwe(n,e){if(n<0)return this.hot.getCell(n,de(this,De).findLeftMostColumnIndex(n,e),!0)}function pwe(){this.updatePlugin()}function mwe(n,e){e||this.updatePlugin()}function wwe(){de(this,Pp)&&(this.ghostTable.setLayersCount(this.getLayersCount()).buildWidthsMap(),yt(this,Pp,!1))}class bwe{setData(e){this.data=e}getData(){return this.data}getRawSourceData(){let e=null;return this.plugin.disableCoreAPIModifiers(),e=this.hot.getSourceData(),this.plugin.enableCoreAPIModifiers(),e}updateWithData(e){this.setData(e),this.rewriteCache()}rewriteCache(){this.cache={levels:[],levelCount:0,rows:[],nodeInfo:new WeakMap},Ee(0,this.data.length-1,e=>{this.cacheNode(this.data[e],0,null)})}cacheNode(e,t,o){this.cache.levels[t]||(this.cache.levels[t]=[],this.cache.levelCount+=1),this.cache.levels[t].push(e),this.cache.rows.push(e),this.cache.nodeInfo.set(e,{parent:o,row:this.cache.rows.length-1,level:t}),this.hasChildren(e)&&O(e.__children,i=>{this.cacheNode(i,t+1,e)})}getDataObject(e){return e==null?null:this.cache.rows[e]}readTreeNodes(e,t,o,i){let s=!1,r=t;if(isNaN(r)&&r.end)return r;let a=e;return a||(a={__children:this.data},s=!0,r-=1),o!=null&&r===o?{result:a,end:!0}:i!=null&&a===i?{result:r,end:!0}:(r+=1,a.__children&&O(a.__children,l=>{if(this.parentReference.set(l,s?null:a),r=this.readTreeNodes(l,r,o,i),isNaN(r)&&r.end)return!1}),r)}mockParent(){const e=this.mockNode();return e.__children=this.data,e}mockNode(){const e={};return tt(this.data[0],(t,o)=>{e[o]=null}),e}getRowIndex(e){return e==null?null:this.cache.nodeInfo.get(e).row}getRowIndexWithinParent(e){let t=null;isNaN(e)?t=e:t=this.getDataObject(e);const o=this.getRowParent(e);return o==null?this.data.indexOf(t):o.__children.indexOf(t)}countAllRows(){const e={__children:this.data};return this.countChildren(e)}countChildren(e){let t=0,o=e;return isNaN(o)||(o=this.getDataObject(o)),!o||!o.__children?0:(O(o.__children,i=>{t+=1,i.__children&&(t+=this.countChildren(i))}),t)}getRowParent(e){let t;return isNaN(e)?t=e:t=this.getDataObject(e),this.getRowObjectParent(t)}getRowObjectParent(e){return!e||typeof e!="object"?null:this.cache.nodeInfo.get(e).parent}getRowLevel(e){let t=null;return isNaN(e)?t=e:t=this.getDataObject(e),t?this.getRowObjectLevel(t):null}getRowObjectLevel(e){return e==null?null:this.cache.nodeInfo.get(e).level}hasChildren(e){let t=e;return isNaN(t)||(t=this.getDataObject(t)),!!(t.__children&&t.__children.length)}isChild(e){return this.getRowParent(e)!==null}getChild(e,t){return e.__children?.[t]||null}isRowHighestLevel(e){return!this.isChild(e)}isParent(e){let t=e;return isNaN(t)||(t=this.getDataObject(t)),t&&!!t.__children&&t.__children?.length!==0}addChild(e,t){let o=t;this.hot.runHooks("beforeAddChild",e,o);let i=null;e&&(i=this.getRowIndex(e)),this.hot.runHooks("beforeCreateRow",i+this.countChildren(e)+1,1);let s=e;e||(s=this.mockParent()),s.__children||(s.__children=[]),o||(o=this.mockNode()),s.__children.push(o),this.rewriteCache();const r=this.getRowIndex(o);this.hot.rowIndexMapper.insertIndexes(r,1),this.hot.runHooks("afterCreateRow",r,1),this.hot.runHooks("afterAddChild",e,o)}addChildAtIndex(e,t,o){let i=o,s;if(i||(i=this.mockNode()),this.hot.runHooks("beforeAddChild",e,i,t),e){const a=this.getRowIndex(e)+t+1;this.hot.runHooks("beforeCreateRow",a,1),e.__children.splice(t,null,i),this.rewriteCache(),this.plugin.disableCoreAPIModifiers(),this.hot.setSourceDataAtCell(this.getRowIndexWithinParent(e),"__children",e.__children,"NestedRows.addChildAtIndex"),this.hot.rowIndexMapper.insertIndexes(a,1),this.plugin.enableCoreAPIModifiers(),this.hot.runHooks("afterCreateRow",a,1),s=a}else this.plugin.disableCoreAPIModifiers(),this.hot.alter("insert_row_above",t,1,"NestedRows.addChildAtIndex"),this.plugin.enableCoreAPIModifiers(),s=this.getRowIndex(this.data[t]);i=this.getDataObject(s),this.hot.runHooks("afterAddChild",e,i,t)}addSibling(e,t="below"){const o=this.translateTrimmedRow(e),i=this.getRowParent(o),s=this.getRowIndexWithinParent(o);switch(t){case"below":this.addChildAtIndex(i,s+1,null);break;case"above":this.addChildAtIndex(i,s,null);break}}detachFromParent(e,t=!0){let o=null;const i=[];Array.isArray(e)?(Ee(e[0],e[2],u=>{const f=this.translateTrimmedRow(u);i.push(this.getDataObject(f))}),Ee(0,i.length-2,u=>{this.detachFromParent(i[u],!1)}),o=i[i.length-1]):o=e;const s=this.getRowIndex(o),r=this.countChildren(o),a=this.getRowIndexWithinParent(o),l=this.getRowParent(o),h=this.getRowParent(l),c=this.getRowIndex(h);let d=null;if(this.hot.runHooks("beforeDetachChild",l,o),a!=null){const u=Array.from(new Array(s+r+1).keys()).splice(-1*(r+1));if(this.hot.runHooks("beforeRemoveRow",s,r+1,u,this.plugin.pluginName),l.__children.splice(a,1),this.rewriteCache(),this.hot.runHooks("afterRemoveRow",s,r+1,u,this.plugin.pluginName),h){d=c+this.countChildren(h);const f=this.getChild(h,this.countChildren(h)-1),p=this.getRowIndex(f);this.hot.runHooks("beforeCreateRow",p+1,r+1,this.plugin.pluginName),h.__children.push(o)}else d=this.hot.countRows()+1,this.hot.runHooks("beforeCreateRow",d-2,r+1,this.plugin.pluginName),this.data.push(o)}this.rewriteCache(),this.hot.runHooks("afterCreateRow",d-2,r+1,this.plugin.pluginName),this.hot.runHooks("afterDetachChild",l,o,this.getRowIndex(o)),t&&this.hot.render()}filterData(e,t,o){const i=[];O(o,s=>{i.push(this.getDataObject(s))}),O(i,s=>{const r=this.getRowIndexWithinParent(s),a=this.getRowParent(s);a===null?this.data.splice(r,1):a.__children.splice(r,1)}),this.rewriteCache()}spliceData(e,t,o){const i=this.getDataObject(e-1);let s=null,r=e;i&&i.__children&&i.__children.length===0?(s=i,r=0):e<this.countAllRows()&&(s=this.getRowParent(e),r=this.getRowIndexWithinParent(e)),s?o?s.__children.splice(r,t,...o):s.__children.splice(r,t):o?this.data.splice(r,t,...o):this.data.splice(r,t),this.rewriteCache()}syncRowWithRawSource(e){let t=e,o=t;do o=this.getRowParent(o),o!==null&&(t=o);while(o!==null);this.plugin.disableCoreAPIModifiers(),this.hot.setSourceDataAtCell(this.getRowIndexWithinParent(t),"__children",t.__children,"NestedRows.syncRowWithRawSource"),this.plugin.enableCoreAPIModifiers()}moveRow(e,t,o,i){const s=t===this.hot.countRows(),r=this.getRowParent(e),a=this.getRowIndexWithinParent(e),l=r.__children.slice(a,a+1),h=e>t;let c=s?this.getRowParent(t-1):this.getRowParent(t);c==null&&(c=this.getRowParent(t-1)),c==null&&(c=this.getDataObject(t-1)),c?c.__children||(c.__children=[]):(c=this.getDataObject(t),c.__children=[]);const d=s||o||i?c.__children.length:this.getRowIndexWithinParent(t),u=r===c;c.__children.splice(d,0,l[0]),r.__children.splice(a+(h&&u?1:0),1),this.syncRowWithRawSource(r),u||this.syncRowWithRawSource(c)}translateTrimmedRow(e){return this.plugin.collapsingUI?this.plugin.collapsingUI.translateTrimmedRow(e):e}untranslateTrimmedRow(e){return this.plugin.collapsingUI?this.plugin.collapsingUI.untranslateTrimmedRow(e):e}constructor(e,t){this.data=null,this.parentReference=new WeakMap,this.cache={levels:[],levelCount:0,rows:[],nodeInfo:new WeakMap},this.hot=t,this.plugin=e}}class PM{constructor(e,t){this.hot=t,this.plugin=e}}class Vr extends PM{static get CSS_CLASSES(){return{indicatorContainer:"ht_nestingLevels",parent:"ht_nestingParent",indicator:"ht_nestingLevel",emptyIndicator:"ht_nestingLevel_empty",button:"ht_nestingButton",expandButton:"ht_nestingExpand",collapseButton:"ht_nestingCollapse"}}appendLevelIndicators(e,t){const o=this.hot.toPhysicalRow(e),i=this.dataManager.getDataObject(o);if(!i)return;const s=this.dataManager.getRowLevel(o),r=t.getElementsByTagName("DIV")[0],a=r.querySelector("span.rowHeader"),l=r.querySelectorAll('[class^="ht_nesting"]'),h=this.hot.getSettings().ariaTags;if(O(l,c=>{c&&r.removeChild(c)}),B(t,Vr.CSS_CLASSES.indicatorContainer),s){const{rootDocument:c}=this.hot,d=a.cloneNode(!0);r.innerHTML="",Ee(0,s-1,()=>{const u=c.createElement("SPAN");B(u,Vr.CSS_CLASSES.emptyIndicator),r.appendChild(u)}),r.appendChild(d)}if(this.dataManager.hasChildren(i)){const c=this.hot.rootDocument.createElement("DIV");h&&fe(c,[al()]),B(t,Vr.CSS_CLASSES.parent),this.collapsingUI.areChildrenCollapsed(o)?(B(c,`${Vr.CSS_CLASSES.button} ${Vr.CSS_CLASSES.expandButton}`),h&&fe(t,[Es(!1)])):(B(c,`${Vr.CSS_CLASSES.button} ${Vr.CSS_CLASSES.collapseButton}`),h&&fe(t,[Es(!0)])),r.appendChild(c)}}updateRowHeaderWidth(e){let t=e;t||(t=this.dataManager.cache.levelCount);let o=11;o=this.hot.stylesHandler.getCSSVariableValue("cell-horizontal-padding")*2,this.rowHeaderWidthCache=Math.max(50,o+10*t+25),this.hot.render()}constructor(e,t){super(e,t),this.dataManager=this.plugin.dataManager,this.collapsingUI=this.plugin.collapsingUI,this.rowHeaderWidthCache=null}}class Cwe extends PM{collapseChildren(e,t=!0,o=!0){const i=[];let s=null,r=null,a=null;return isNaN(e)?(s=e,r=this.dataManager.getRowIndex(s)):(s=this.dataManager.getDataObject(e),r=e),this.dataManager.hasChildren(s)&&O(s.__children,l=>{i.push(this.dataManager.getRowIndex(l))}),a=this.collapseRows(i,!0,!1),o&&this.trimRows(a),t&&this.renderAndAdjust(),this.collapsedRows.indexOf(r)===-1&&this.collapsedRows.push(r),a}collapseMultipleChildren(e,t=!0,o=!0){const i=[];O(e,s=>{i.push(...this.collapseChildren(s,!1,!1))}),o&&this.trimRows(i),t&&this.renderAndAdjust()}collapseRow(e,t=!0){this.collapseRows([e],t)}collapseRows(e,t=!0,o=!1){const i=[];return O(e,s=>{i.push(s),t&&this.collapseChildRows(s,i)}),o&&this.trimRows(i),i}collapseChildRows(e,t=[],o,i=!1){if(this.dataManager.hasChildren(e)){const s=this.dataManager.getDataObject(e);O(s.__children,r=>{const a=this.dataManager.getRowIndex(r);t.push(a),this.collapseChildRows(a,t)})}i&&this.trimRows(t)}expandRow(e,t=!0){this.expandRows([e],t)}expandRows(e,t=!0,o=!1){const i=[];return O(e,s=>{i.push(s),t&&this.expandChildRows(s,i)}),o&&this.untrimRows(i),i}expandChildRows(e,t=[],o,i=!1){if(this.dataManager.hasChildren(e)){const s=this.dataManager.getDataObject(e);O(s.__children,r=>{if(!this.isAnyParentCollapsed(r)){const a=this.dataManager.getRowIndex(r);t.push(a),this.expandChildRows(a,t)}})}i&&this.untrimRows(t)}expandChildren(e,t=!0,o=!0){const i=[];let s=null,r=null,a=null;return isNaN(e)?(s=e,r=this.dataManager.getRowIndex(e)):(s=this.dataManager.getDataObject(e),r=e),this.collapsedRows.splice(this.collapsedRows.indexOf(r),1),this.dataManager.hasChildren(s)&&O(s.__children,l=>{const h=this.dataManager.getRowIndex(l);i.push(h)}),a=this.expandRows(i,!0,!1),o&&this.untrimRows(a),t&&this.renderAndAdjust(),a}expandMultipleChildren(e,t=!0,o=!0){const i=[];O(e,s=>{i.push(...this.expandChildren(s,!1,!1))}),o&&this.untrimRows(i),t&&this.renderAndAdjust()}collapseAll(){const e=this.dataManager.getData(),t=[];O(e,o=>{this.dataManager.hasChildren(o)&&t.push(o)}),this.collapseMultipleChildren(t),this.renderAndAdjust()}expandAll(){const e=this.dataManager.getData(),t=[];O(e,o=>{this.dataManager.hasChildren(o)&&t.push(o)}),this.expandMultipleChildren(t),this.renderAndAdjust()}trimRows(e){this.hot.batchExecution(()=>{O(e,t=>{this.plugin.collapsedRowsMap.setValueAtIndex(t,!0)})},!0)}untrimRows(e){this.hot.batchExecution(()=>{O(e,t=>{this.plugin.collapsedRowsMap.setValueAtIndex(t,!1)})},!0)}areChildrenCollapsed(e){let t=isNaN(e)?e:this.dataManager.getDataObject(e),o=!0;return t===null&&(t={__children:this.dataManager.data}),this.dataManager.hasChildren(t)&&O(t.__children,i=>{const s=this.dataManager.getRowIndex(i);if(!this.plugin.collapsedRowsMap.getValueAtIndex(s))return o=!1,!1}),o}isAnyParentCollapsed(e){let t=e;for(;t!==null;){t=this.dataManager.getRowParent(t);const o=this.dataManager.getRowIndex(t);if(this.collapsedRows.indexOf(o)>-1)return!0}return!1}toggleState(e,t){if(t.col>=0)return;const o=this.translateTrimmedRow(t.row);_e(e.target,Vr.CSS_CLASSES.button)&&(this.areChildrenCollapsed(o)?this.expandChildren(o):this.collapseChildren(o),es(e))}translateTrimmedRow(e){return this.hot.toPhysicalRow(e)}untranslateTrimmedRow(e){return this.hot.toVisualRow(e)}renderAndAdjust(){this.hot.view.adjustElementsSize(),this.hot.render()}constructor(e,t){super(e,t),this.dataManager=this.plugin.dataManager,this.collapsedRows=[],this.collapsedRowsStash={stash:(o=!1)=>{this.lastCollapsedRows=this.collapsedRows.slice(0),this.expandMultipleChildren(this.lastCollapsedRows,o)},shiftStash:(o,i,s=1)=>{i==null&&(i=1/0),O(this.lastCollapsedRows,(r,a)=>{r>=o&&r<i&&(this.lastCollapsedRows[a]=r+s)})},applyStash:(o=!0)=>{this.collapseMultipleChildren(this.lastCollapsedRows,o),this.lastCollapsedRows=void 0},trimStash:(o,i)=>{Ee(o,o+i-1,s=>{const r=this.lastCollapsedRows.indexOf(s);r>-1&&this.lastCollapsedRows.splice(r,1)})}}}}function ywe(n,e){if(e.has(n))throw new TypeError("Cannot initialize the same private elements twice on an object")}function _we(n,e){return e.get?e.get.call(n):e.value}function Swe(n,e,t){if(e.set)e.set.call(n,t);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=t}}function RY(n,e,t){if(!e.has(n))throw new TypeError("attempted to "+t+" private field on non-instance");return e.get(n)}function vwe(n,e){var t=RY(n,e,"get");return _we(n,t)}function Rwe(n,e,t){ywe(n,e),e.set(n,t)}function Ewe(n,e,t){var o=RY(n,e,"set");return Swe(n,o,t),t}var OR=new WeakMap;class kwe extends PM{appendOptions(e){const t=[{key:"add_child",name(){return this.getTranslatedPhrase(cT)},callback:()=>{const o=this.dataManager.translateTrimmedRow(this.hot.getSelectedActive()[0]),i=this.dataManager.getDataObject(o);this.dataManager.addChild(i)},disabled:()=>{const o=this.hot.getSelectedActive();return!o||o[0]<0||this.hot.selection.isSelectedByColumnHeader()||this.hot.countRows()>=this.hot.getSettings().maxRows}},{key:"detach_from_parent",name(){return this.getTranslatedPhrase(dT)},callback:()=>{this.dataManager.detachFromParent(this.hot.getSelectedActive())},disabled:()=>{const o=this.hot.getSelectedActive(),i=this.dataManager.translateTrimmedRow(o[0]);return!this.dataManager.getRowParent(i)||!o||o[0]<0||this.hot.selection.isSelectedByColumnHeader()||this.hot.countRows()>=this.hot.getSettings().maxRows}},{name:"---------"}];return Ee(0,e.items.length-1,o=>{if(o===0)return O(t,(i,s)=>{e.items.splice(o+s,0,i)}),!1}),this.modifyRowInsertingOptions(e)}modifyRowInsertingOptions(e){return Ee(0,e.items.length-1,t=>{const o=vwe(this,OR)[e.items[t].key];o!=null&&(e.items[t].callback=o)}),e}constructor(...e){super(...e),Rwe(this,OR,{writable:!0,value:void 0}),this.dataManager=this.plugin.dataManager,Ewe(this,OR,{row_above:(t,o)=>{const i=o[o.length-1];this.dataManager.addSibling(i.start.row,"above")},row_below:(t,o)=>{const i=o[o.length-1];this.dataManager.addSibling(i.start.row,"below")}})}}function Twe(n){return Array.isArray(n)&&(n.length===0||c7(n))}class xwe{onBeforeRowMove(e,t,o,i){if(this.displayAPICompatibilityWarning({rows:e,finalIndex:t,dropIndex:o,movePossible:i}))return!1;this.movedToCollapsed=!1;const r=o===this.hot.countRows(),a=r?this.hot.countSourceRows():this.dataManager.translateTrimmedRow(o);let l=!0;const h=e.map(p=>{if(!l)return!1;const C=this.dataManager.translateTrimmedRow(p);return l=this.shouldAllowMoving(C,a),C}),c=h.indexOf(a)===-1;if(!l||!c)return!1;const d=this.getBaseParent(h),u=this.getTargetParent(r,a),f=d===u;return this.movedToCollapsed=this.collapsingUI.areChildrenCollapsed(u),this.collapsingUI.collapsedRowsStash.stash(),this.shiftCollapsibleParentsLocations(h,a,f),this.moveRows(h,a,u),this.dataManager.rewriteCache(),this.moveCellsMeta(h,a),this.collapsingUI.collapsedRowsStash.applyStash(!1),this.hot.runHooks("afterRowMove",e,t,o,i,i&&this.isRowOrderChanged(e,t)),this.hot.render(),this.selectCells(e,o),!1}displayAPICompatibilityWarning(e){const{rows:t,finalIndex:o,dropIndex:i,movePossible:s}=e;let r=!1;return Jt(i)&&(Ie(pt`Since version 8.0.0 of the Handsontable the 'moveRows' method isn't used for moving rows\x20
|
|
270
|
+
when the NestedRows plugin is enabled. Please use the 'dragRows' method instead.`),this.hot.runHooks("afterRowMove",t,o,i,s,!1),r=!0),r}shouldAllowMoving(e,t){return!(this.dataManager.isParent(e)||this.dataManager.isRowHighestLevel(e)||e===t||t===0)}getBaseParent(e){return this.dataManager.getRowParent(e[0])}getTargetParent(e,t){let o=this.dataManager.getRowParent(e?t-1:t);return o==null&&(o=this.dataManager.getRowParent(t-1)),o}shiftCollapsibleParentsLocations(e,t,o){o||(Math.max(...e)<=t?this.collapsingUI.collapsedRowsStash.shiftStash(e[0],t,-1*e.length):this.collapsingUI.collapsedRowsStash.shiftStash(t,e[0],e.length))}moveRows(e,t,o){const i=t===this.dataManager.getRowIndex(o)+this.dataManager.countChildren(o)+1;this.hot.batchRender(()=>{e.forEach(s=>{this.dataManager.moveRow(s,t,this.movedToCollapsed,i)})})}moveCellsMeta(e,t){const o=[],i=Math.max(...e)<t;e.forEach(s=>{o.push(this.hot.getCellMetaAtRow(s))}),this.hot.spliceCellsMeta(e[0],e.length),this.hot.spliceCellsMeta(t-(i?o.length:0),0,...o)}selectCells(e,t){const o=e.length;let i=0,s=0;if(this.movedToCollapsed){let r=null;e[o-1]<t?r=this.dataManager.translateTrimmedRow(t-o):r=this.dataManager.translateTrimmedRow(t);const a=this.dataManager.getRowParent(r===null?this.hot.countSourceRows()-1:r-1),l=this.dataManager.getRowIndex(a);i=this.dataManager.untranslateTrimmedRow(l),s=i}else e[o-1]<t?(s=t-1,i=s-o+1):(i=t,s=i+o-1);this.hot.selectCells([[i,0,s,this.hot.countCols()-1]],!1)}isRowOrderChanged(e,t){return e.some((o,i)=>o-i!==t)}constructor(e){this.plugin=e,this.hot=e.hot,this.dataManager=e.dataManager,this.collapsingUI=e.collapsingUI}}function EY(n,e){if(e.has(n))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Mwe(n,e){return e.get?e.get.call(n):e.value}function Iwe(n,e,t){if(e.set)e.set.call(n,t);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=t}}function kY(n,e,t){if(!e.has(n))throw new TypeError("attempted to "+t+" private field on non-instance");return e.get(n)}function Wp(n,e){var t=kY(n,e,"get");return Mwe(n,t)}function DR(n,e,t){EY(n,e),e.set(n,t)}function Ua(n,e,t){var o=kY(n,e,"set");return Iwe(n,o,t),t}function po(n,e,t){if(!e.has(n))throw new TypeError("attempted to get private field on non-instance");return t}function xo(n,e){EY(n,e),e.add(n)}const Ry="nestedRows",Hwe=300,rW=Ry,Awe="The Nested Rows plugin requires an Array of Objects as a dataset to be provided. The plugin has been disabled.";var Em=new WeakMap,ec=new WeakMap,$p=new WeakMap,aW=new WeakSet,lW=new WeakSet,hW=new WeakSet,cW=new WeakSet,dW=new WeakSet,uW=new WeakSet,fW=new WeakSet,gW=new WeakSet,pW=new WeakSet,mW=new WeakSet,wW=new WeakSet,bW=new WeakSet,CW=new WeakSet,yW=new WeakSet,_W=new WeakSet,SW=new WeakSet,NR=new WeakSet;class Owe extends rt{static get PLUGIN_KEY(){return Ry}static get PLUGIN_PRIORITY(){return Hwe}isEnabled(){return!!this.hot.getSettings()[Ry]}enablePlugin(){this.enabled||(this.collapsedRowsMap=this.hot.rowIndexMapper.registerMap("nestedRows",new Qu),Ua(this,$p,!0),this.dataManager=new bwe(this,this.hot),this.collapsingUI=new Cwe(this,this.hot),this.headersUI=new Vr(this,this.hot),this.contextMenuUI=new kwe(this,this.hot),this.rowMoveController=new xwe(this),this.addHook("afterInit",(...e)=>po(this,yW,jwe).call(this,...e)),this.addHook("afterRender",(...e)=>po(this,_W,qwe).call(this,...e)),this.addHook("beforeViewRender",(...e)=>po(this,SW,Kwe).call(this,...e)),this.addHook("modifyRowData",(...e)=>this.onModifyRowData(...e)),this.addHook("modifySourceLength",(...e)=>this.onModifySourceLength(...e)),this.addHook("beforeDataSplice",(...e)=>this.onBeforeDataSplice(...e)),this.addHook("filterData",(...e)=>po(this,hW,Pwe).call(this,...e)),this.addHook("afterContextMenuDefaultOptions",(...e)=>po(this,cW,Lwe).call(this,...e)),this.addHook("afterGetRowHeader",(...e)=>po(this,dW,Wwe).call(this,...e)),this.addHook("beforeOnCellMouseDown",(...e)=>po(this,lW,Nwe).call(this,...e)),this.addHook("beforeRemoveRow",(...e)=>po(this,gW,Bwe).call(this,...e)),this.addHook("afterRemoveRow",(...e)=>po(this,fW,Fwe).call(this,...e)),this.addHook("beforeAddChild",(...e)=>po(this,pW,Vwe).call(this,...e)),this.addHook("afterAddChild",(...e)=>po(this,mW,zwe).call(this,...e)),this.addHook("beforeDetachChild",(...e)=>po(this,wW,Uwe).call(this,...e)),this.addHook("afterDetachChild",(...e)=>po(this,bW,Ywe).call(this,...e)),this.addHook("modifyRowHeaderWidth",(...e)=>po(this,uW,$we).call(this,...e)),this.addHook("afterCreateRow",(...e)=>po(this,CW,Gwe).call(this,...e)),this.addHook("beforeRowMove",(...e)=>po(this,aW,Dwe).call(this,...e)),this.addHook("beforeLoadData",e=>po(this,NR,vW).call(this,e)),this.addHook("beforeUpdateData",e=>po(this,NR,vW).call(this,e)),this.registerShortcuts(),super.enablePlugin())}disablePlugin(){this.hot.rowIndexMapper.unregisterMap("nestedRows"),this.unregisterShortcuts(),super.disablePlugin()}updatePlugin(){this.disablePlugin();const e=this.dataManager.getData();this.enablePlugin(),this.dataManager.updateWithData(e),super.updatePlugin()}registerShortcuts(){this.hot.getShortcutManager().getContext("grid").addShortcut({keys:[["Enter"]],callback:()=>{const{highlight:e}=this.hot.getSelectedRangeActive(),t=this.collapsingUI.translateTrimmedRow(e.row);return this.collapsingUI.areChildrenCollapsed(t)?this.collapsingUI.expandChildren(t):this.collapsingUI.collapseChildren(t),!1},runOnlyIf:()=>{const e=this.hot.getSelectedRangeActive()?.highlight;return e&&this.hot.getSelectedRangeActive()?.isSingle()&&this.hot.selection.isCellVisible(e)&&e.col===-1&&e.row>=0},group:rW,relativeToGroup:dl,position:"before"})}unregisterShortcuts(){this.hot.getShortcutManager().getContext("grid").removeShortcutsByGroup(rW)}disableCoreAPIModifiers(){Ua(this,ec,!0)}enableCoreAPIModifiers(){Ua(this,ec,!1)}onModifyRowData(e){if(!Wp(this,ec))return this.dataManager.getDataObject(e)}onModifySourceLength(){if(!Wp(this,ec))return this.dataManager.countAllRows()}onBeforeDataSplice(e,t,o){return Wp(this,ec)||this.dataManager.isRowHighestLevel(e)?!0:(this.dataManager.spliceData(e,t,o),!1)}destroy(){super.destroy()}constructor(...e){super(...e),xo(this,aW),xo(this,lW),xo(this,hW),xo(this,cW),xo(this,dW),xo(this,uW),xo(this,fW),xo(this,gW),xo(this,pW),xo(this,mW),xo(this,wW),xo(this,bW),xo(this,CW),xo(this,yW),xo(this,_W),xo(this,SW),xo(this,NR),DR(this,Em,{writable:!0,value:void 0}),DR(this,ec,{writable:!0,value:void 0}),DR(this,$p,{writable:!0,value:void 0}),this.dataManager=null,this.headersUI=null,this.collapsedRowsMap=null,Ua(this,Em,!1),Ua(this,ec,!1),Ua(this,$p,!0)}}function Dwe(n,e,t,o){return this.rowMoveController.onBeforeRowMove(n,e,t,o)}function Nwe(n,e,t){this.collapsingUI.toggleState(n,e,t)}function Pwe(n,e,t){return this.collapsingUI.collapsedRowsStash.stash(),this.collapsingUI.collapsedRowsStash.trimStash(t[0],e),this.collapsingUI.collapsedRowsStash.shiftStash(t[0],null,-1*e),this.dataManager.filterData(n,e,t),Ua(this,Em,!0),this.dataManager.getData().slice()}function Lwe(n){return this.contextMenuUI.appendOptions(n)}function Wwe(n,e){this.headersUI.appendLevelIndicators(n,e)}function $we(n){return Math.max(this.headersUI.rowHeaderWidthCache,n)}function Fwe(n,e,t,o){o!==this.pluginName&&this.hot._registerTimeout(()=>{Ua(this,Em,!1),this.headersUI.updateRowHeaderWidth(),this.collapsingUI.collapsedRowsStash.applyStash()})}function Bwe(n,e,t){const o=Array.from(t.reduce((i,s)=>{if(this.dataManager.isParent(s)){const r=this.dataManager.getDataObject(s).__children;return i.add(s),Array.isArray(r)&&r.forEach(a=>i.add(this.dataManager.getRowIndex(a))),i}return i.add(s)},new Set));t.length=0,t.push(...o)}function Vwe(){this.collapsingUI.collapsedRowsStash.stash()}function zwe(n,e){this.collapsingUI.collapsedRowsStash.shiftStash(this.dataManager.getRowIndex(e)),this.collapsingUI.collapsedRowsStash.applyStash(),this.headersUI.updateRowHeaderWidth()}function Uwe(){this.collapsingUI.collapsedRowsStash.stash()}function Ywe(n,e,t){this.collapsingUI.collapsedRowsStash.shiftStash(t,null,-1),this.collapsingUI.collapsedRowsStash.applyStash(),this.headersUI.updateRowHeaderWidth()}function Gwe(){this.dataManager.rewriteCache()}function jwe(){this.headersUI.updateRowHeaderWidth()}function qwe(){Wp(this,$p)&&this.hot.view&&(Ua(this,$p,!1),this.hot.rootWindow.requestAnimationFrame(()=>{this.hot&&this.hot.view&&!this.hot.isDestroyed&&this.hot.view.adjustElementsSize(!0)}))}function Kwe(n,e){Wp(this,Em)&&(e.skipRender=!0)}function vW(n){if(!Twe(n)){nl(Awe),this.hot.getSettings()[Ry]=!1,this.disablePlugin();return}this.dataManager.setData(n),this.dataManager.rewriteCache()}function TY(n,e){if(e.has(n))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Xwe(n,e){return e.get?e.get.call(n):e.value}function Zwe(n,e,t){if(e.set)e.set.call(n,t);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=t}}function xY(n,e,t){if(!e.has(n))throw new TypeError("attempted to "+t+" private field on non-instance");return e.get(n)}function st(n,e){var t=xY(n,e,"get");return Xwe(n,t)}function Ll(n,e,t){TY(n,e),e.set(n,t)}function Ys(n,e,t){var o=xY(n,e,"set");return Zwe(n,o,t),t}function PR(n,e,t){if(!e.has(n))throw new TypeError("attempted to get private field on non-instance");return t}function Qwe(n,e){TY(n,e),e.add(n)}const Jwe=`
|
|
271
|
+
<div data-ref="container" class="ht-pagination handsontable">
|
|
272
|
+
<div class="ht-pagination__inner">
|
|
273
|
+
<div data-ref="pageSizeSection" class="ht-page-size-section">
|
|
274
|
+
<span data-ref="pageSizeLabel" class="ht-page-size-section__label"></span>
|
|
275
|
+
<div class="ht-page-size-section__select-wrapper">
|
|
276
|
+
<select data-ref="pageSizeSelect" name="pageSize" data-hot-input></select>
|
|
277
|
+
</div>
|
|
278
|
+
</div>
|
|
279
|
+
<div data-ref="pageCounterSection" class="ht-page-counter-section"></div>
|
|
280
|
+
<nav data-ref="pageNavSection" class="ht-page-navigation-section">
|
|
281
|
+
<button data-ref="first" class="ht-page-navigation-section__button ht-page-first"></button>
|
|
282
|
+
<button data-ref="prev" class="ht-page-navigation-section__button ht-page-prev"></button>
|
|
283
|
+
<span data-ref="pageNavLabel" class="ht-page-navigation-section__label"></span>
|
|
284
|
+
<button data-ref="next" class="ht-page-navigation-section__button ht-page-next"></button>
|
|
285
|
+
<button data-ref="last" class="ht-page-navigation-section__button ht-page-last"></button>
|
|
286
|
+
</nav>
|
|
287
|
+
</div>
|
|
288
|
+
</div>
|
|
289
|
+
`;var Du=new WeakMap,cc=new WeakMap,yb=new WeakMap,Wo=new WeakMap,Jd=new WeakMap,ds=new WeakMap,LR=new WeakMap,WR=new WeakMap,_b=new WeakSet;class MY{install(){if(st(this,Wo)?.container)return;const e=Bc`${Jwe}`,{container:t,first:o,prev:i,next:s,last:r,pageSizeSelect:a}=e.refs;Ys(this,Wo,e.refs),t.setAttribute("dir",st(this,yb)?"rtl":"ltr"),t.tabIndex=-1;const l=c=>c.currentTarget.disabled,h=(c,d,u)=>{d.addEventListener(c,f=>{l(f)||u()})};h("click",o,()=>this.runLocalHooks("firstPageClick")),h("click",i,()=>this.runLocalHooks("prevPageClick")),h("click",s,()=>this.runLocalHooks("nextPageClick")),h("click",r,()=>this.runLocalHooks("lastPageClick")),a.addEventListener("change",()=>{const c=a.value==="auto"?"auto":Number.parseInt(a.value,10);this.runLocalHooks("pageSizeChange",c)}),this.setCounterSectionVisibility(!1),this.setNavigationSectionVisibility(!1),this.setPageSizeSectionVisibility(!1),st(this,cc)?(st(this,cc).appendChild(e.fragment),B(t,[st(this,Jd),"handsontable"])):st(this,Du).after(e.fragment)}getContainer(){return st(this,Wo).container}getFocusableElements(){const{first:e,prev:t,next:o,last:i,pageSizeSelect:s}=st(this,Wo);return[s,e,t,o,i].filter(r=>!r.disabled)}updateWidth(e){return st(this,Wo).container.style.width=`${e}px`,this}updateTheme(e){if(Ys(this,Jd,e),st(this,cc)){const{container:t}=st(this,Wo);oe(t,/ht-theme-.*/g),st(this,Jd)&&B(t,st(this,Jd))}return this}getHeight(){return st(this,Wo).container.offsetHeight}refreshBorderState(){const{container:e}=st(this,Wo);return st(this,cc)||st(this,LR).call(this)?B(e,"ht-pagination--bordered"):oe(e,"ht-pagination--bordered"),this}updateState({currentPage:e,totalPages:t,firstVisibleRowIndex:o,lastVisibleRowIndex:i,totalRenderedRows:s,pageSizeList:r,pageSize:a,autoPageSize:l,counterStartRow:h,counterEndRow:c}){const{first:d,prev:u,next:f,last:p,pageCounterSection:C,pageNavSection:_,pageNavLabel:S,pageSizeSelect:T,pageSizeLabel:P}=st(this,Wo),F=h??o+1,V=c??i+1,D=st(this,ds).call(this,BT,{start:F,end:V,total:s}),I=st(this,ds).call(this,VT,{currentPage:e,totalPages:t}),G=st(this,ds).call(this,HC);C.textContent=D,S.textContent=I,T.textContent="",P.textContent=`${G}:`,fe(_,[Ni(st(this,ds).call(this,$T))]),fe(T,[Ni(st(this,ds).call(this,HC))]),st(this,WR).call(this,I),this.refreshBorderState(),r.forEach(te=>{const ee=te==="auto"?st(this,ds).call(this,FT):te,be=new Option(ee,te);(l&&te==="auto"||!l&&te===a)&&(be.selected=!0),T.add(be)});const z=e===1,Y=e===t;if(_.style.display!=="none"){const te=st(this,Du).ownerDocument.activeElement;z?(B(d,"ht-page-navigation-section__button--disabled"),B(u,"ht-page-navigation-section__button--disabled"),d.disabled=!0,u.disabled=!0):(oe(d,"ht-page-navigation-section__button--disabled"),oe(u,"ht-page-navigation-section__button--disabled"),d.disabled=!1,u.disabled=!1),Y?(B(f,"ht-page-navigation-section__button--disabled"),B(p,"ht-page-navigation-section__button--disabled"),f.disabled=!0,p.disabled=!0):(oe(f,"ht-page-navigation-section__button--disabled"),oe(p,"ht-page-navigation-section__button--disabled"),f.disabled=!1,p.disabled=!1),[d,u,f,p].includes(te)&&(u.disabled?f.focus():f.disabled&&u.focus())}return fe(d,[Ni(st(this,ds).call(this,zT)),Vg(z)]),fe(u,[Ni(st(this,ds).call(this,UT)),Vg(z)]),fe(f,[Ni(st(this,ds).call(this,YT)),Vg(Y)]),fe(p,[Ni(st(this,ds).call(this,GT)),Vg(Y)]),this}setPageSizeSectionVisibility(e){const{pageSizeSection:t,pageSizeSelect:o}=st(this,Wo);return t.style.display=e?"":"none",o.disabled=!e,PR(this,_b,$R).call(this),this}setCounterSectionVisibility(e){return st(this,Wo).pageCounterSection.style.display=e?"":"none",PR(this,_b,$R).call(this),this}setNavigationSectionVisibility(e){const{pageNavSection:t,first:o,prev:i,next:s,last:r}=st(this,Wo);return t.style.display=e?"":"none",o.disabled=!e,i.disabled=!e,s.disabled=!e,r.disabled=!e,PR(this,_b,$R).call(this),this}destroy(){st(this,Wo)?.container.remove(),Ys(this,Wo,null)}constructor({rootElement:e,uiContainer:t,isRtl:o,themeName:i,phraseTranslator:s,shouldHaveBorder:r,a11yAnnouncer:a}){Qwe(this,_b),Ll(this,Du,{writable:!0,value:void 0}),Ll(this,cc,{writable:!0,value:void 0}),Ll(this,yb,{writable:!0,value:void 0}),Ll(this,Wo,{writable:!0,value:void 0}),Ll(this,Jd,{writable:!0,value:void 0}),Ll(this,ds,{writable:!0,value:void 0}),Ll(this,LR,{writable:!0,value:void 0}),Ll(this,WR,{writable:!0,value:void 0}),Ys(this,yb,!1),Ys(this,Du,e),Ys(this,cc,t),Ys(this,yb,o),Ys(this,Jd,i),Ys(this,ds,s),Ys(this,LR,r),Ys(this,WR,a),this.install()}}function $R(){const{container:n,pageSizeSection:e,pageCounterSection:t,pageNavSection:o}=st(this,Wo),i=e.style.display!=="none"||t.style.display!=="none"||o.style.display!=="none";st(this,cc)||(i?B(st(this,Du).querySelector(".ht-wrapper"),"htPagination"):oe(st(this,Du).querySelector(".ht-wrapper"),"htPagination")),n.style.display=i?"":"none"}Ct(MY,$n);class ebe{calculate({pageSize:e,totalItems:t}){this.pageSize=Math.max(e,1),this.totalItems=t,this.totalPages=Math.max(1,Math.ceil(this.totalItems/this.pageSize))}getTotalPages(){return this.totalPages}getState(e){if(e-=1,e<0||e>=this.getTotalPages())return;const t=e*this.pageSize,o=Math.max(0,Math.min(t+this.pageSize-1,this.totalItems-1));return{startIndex:t,endIndex:o,pageSize:this.pageSize}}constructor(){this.pageSize=1,this.totalItems=0,this.totalPages=0}}class tbe{calculate({itemsSizeProvider:e,viewportSizeProvider:t}){const o=e(),i=t(),s=[];let r=0,a=0,l=0;for(let h=0;h<o.length;h++){const c=o[h];l>0&&a+c>=i&&(s.push({startIndex:r,endIndex:h-1,pageSize:l}),r=h,a=0,l=0),a+=c,l+=1}s.push({startIndex:r,endIndex:Math.max(0,o.length-1),pageSize:l}),this.pages=s}getTotalPages(){return this.pages.length}getState(e){if(e-=1,!(e<0||e>=this.getTotalPages()))return this.pages[e]}constructor(){this.pages=[]}}const RW=new Map([["fixed",ebe],["auto",tbe]]);function IY(n){RW.has(n)||U(`Unknown pagination strategy type: ${n}`);const e=RW.get(n);return new e}function HY(n,e){if(e.has(n))throw new TypeError("Cannot initialize the same private elements twice on an object")}function nbe(n,e){return e.get?e.get.call(n):e.value}function obe(n,e,t){if(e.set)e.set.call(n,t);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=t}}function AY(n,e,t){if(!e.has(n))throw new TypeError("attempted to "+t+" private field on non-instance");return e.get(n)}function ae(n,e){var t=AY(n,e,"get");return nbe(n,t)}function Gs(n,e,t){HY(n,e),e.set(n,t)}function Et(n,e,t){var o=AY(n,e,"set");return obe(n,o,t),t}function ut(n,e,t){if(!e.has(n))throw new TypeError("attempted to get private field on non-instance");return t}function eo(n,e){HY(n,e),e.add(n)}f2("pagination",["nestedRows","mergeCells","fixedRowsTop","fixedRowsBottom"]);const ju="pagination",ibe=900,sbe=`plugin:${ju}`,EW=pt`The \`auto\` page size setting requires the \`autoRowSize\`\x20
|
|
290
|
+
plugin to be enabled. Set the \`autoRowSize: true\` in the configuration to ensure correct behavior.`;var Nu=new WeakMap,Zt=new WeakMap,io=new WeakMap,mn=new WeakMap,Di=new WeakMap,Fp=new WeakMap,Bp=new WeakMap,dc=new WeakMap,up=new WeakMap,FR=new WeakMap,Sb=new WeakSet,Mg=new WeakSet,Wa=new WeakSet,BR=new WeakSet,Ey=new WeakSet,kW=new WeakSet,TW=new WeakSet,xW=new WeakSet,VR=new WeakSet,MW=new WeakSet,IW=new WeakSet,HW=new WeakSet,AW=new WeakSet,OW=new WeakSet,DW=new WeakSet,NW=new WeakSet,PW=new WeakSet,LW=new WeakSet,WW=new WeakSet,vb=new WeakMap;class rbe extends rt{static get PLUGIN_KEY(){return ju}static get PLUGIN_PRIORITY(){return ibe}static get DEFAULT_SETTINGS(){return{pageSize:10,pageSizeList:["auto",5,10,20,50,100],initialPage:1,showPageSize:!0,showCounter:!0,showNavigation:!0,uiContainer:null}}isEnabled(){return!!this.hot.getSettings()[ju]}enablePlugin(){if(this.enabled)return;const e=this.hot.getSettings()[ju];e?.initialPage!==void 0&&Et(this,Zt,this.getSetting("initialPage")),e?.pageSize!==void 0&&Et(this,io,this.getSetting("pageSize")),Et(this,dc,this.hot.runHooks("hasExternalDataSource")===!0),Et(this,up,null),Et(this,Nu,this.hot.rowIndexMapper.createAndRegisterIndexMap(this.pluginName,"hiding",!1)),ae(this,io)==="auto"&&!this.hot.getPlugin("autoRowSize")?.enabled&&Ie(EW),Et(this,Di,IY(ae(this,io)==="auto"?"auto":"fixed")),ae(this,mn)||(Et(this,mn,new MY({rootElement:this.hot.rootGridElement,uiContainer:this.getSetting("uiContainer"),isRtl:this.hot.isRtl(),themeName:this.hot.getCurrentThemeName(),phraseTranslator:(...t)=>this.hot.getTranslatedPhrase(...t),shouldHaveBorder:()=>ut(this,kW,abe).call(this),a11yAnnouncer:t=>bq(t)})),ut(this,BR,$W).call(this),ae(this,mn).addLocalHook("firstPageClick",()=>this.firstPage()).addLocalHook("prevPageClick",()=>this.prevPage()).addLocalHook("nextPageClick",()=>this.nextPage()).addLocalHook("lastPageClick",()=>this.lastPage()).addLocalHook("pageSizeChange",t=>this.setPageSize(t))),this.addHook("init",(...t)=>ut(this,NW,mbe).call(this,...t),-1),this.addHook("beforeSelectAll",(...t)=>ut(this,VR,FW).call(this,...t)),this.addHook("beforeSelectColumns",(...t)=>ut(this,VR,FW).call(this,...t)),this.addHook("beforeSetRangeEnd",(...t)=>ut(this,MW,cbe).call(this,...t)),this.addHook("beforeSelectionHighlightSet",(...t)=>ut(this,IW,dbe).call(this,...t)),this.addHook("beforePaste",(...t)=>ut(this,HW,ube).call(this,...t)),this.addHook("afterViewRender",(...t)=>ut(this,AW,fbe).call(this,...t)),this.addHook("afterRender",(...t)=>ut(this,OW,gbe).call(this,...t)),this.addHook("afterScrollVertically",(...t)=>ut(this,PW,wbe).call(this,...t)),this.addHook("afterLanguageChange",(...t)=>ut(this,LW,bbe).call(this,...t)),this.addHook("beforeHeightChange",(...t)=>ut(this,DW,pbe).call(this,...t)),this.addHook("afterSetTheme",(...t)=>ut(this,WW,Cbe).call(this,...t)),this.addHook("afterDataProviderFetch",(...t)=>ae(this,FR).call(this,...t),-1),this.hot.rowIndexMapper.addLocalHook("cacheUpdated",ae(this,vb)),ut(this,TW,lbe).call(this),super.enablePlugin()}revertPageTo(e){const t=ae(this,Zt);ut(this,Sb,zR).call(this,e),this.hot.scrollViewportTo({row:0}),ut(this,Wa,ql).call(this),this.hot.runHooks("afterPageChange",t,e)}revertPageSizeTo(e){const t=ae(this,io);ut(this,Mg,Rb).call(this,e),ut(this,Wa,ql).call(this),this.hot.runHooks("afterPageSizeChange",t,e)}updatePlugin(){this.disablePlugin(),this.enablePlugin(),ut(this,Wa,ql).call(this),super.updatePlugin()}disablePlugin(){this.hot.rowIndexMapper.removeLocalHook("cacheUpdated",ae(this,vb)).unregisterMap(this.pluginName),ut(this,xW,hbe).call(this),ae(this,mn).destroy(),Et(this,mn,null),super.disablePlugin()}getPaginationData(){const e=ae(this,Di).getTotalPages();let t=-1,o=-1;if(ae(this,dc)){const s=this.hot.countRows();s>0&&(t=0,o=s-1)}else{const{pageSize:s,startIndex:r}=ae(this,Di).getState(ae(this,Zt)),a=this.hot.countRows();let l=0;for(let h=r;l<s&&!(h>=a);h++)this.hot.rowIndexMapper.isHidden(this.hot.toPhysicalRow(h))||(t===-1&&(t=h),o=h,l+=1)}const i=ae(this,Di).getState(ae(this,Zt));return{currentPage:ae(this,Zt),totalPages:e,pageSize:i?.pageSize??ae(this,io),pageSizeList:[...this.getSetting("pageSizeList")],autoPageSize:ae(this,io)==="auto",numberOfRenderedRows:this.hot.rowIndexMapper.getRenderableIndexesLength(),firstVisibleRowIndex:t,lastVisibleRowIndex:o}}getCurrentPage(){return ae(this,Zt)}getCurrentPageSize(){return ae(this,io)}setPage(e){const t=ae(this,Zt);this.hot.runHooks("beforePageChange",t,e)!==!1&&(ut(this,Sb,zR).call(this,e),ut(this,Wa,ql).call(this),this.hot.scrollViewportTo({row:0}),this.hot.runHooks("afterPageChange",t,ae(this,Zt)))}resetPage(){this.setPage(this.getSetting("initialPage"))}setPageSize(e){const t=ae(this,io);this.hot.runHooks("beforePageSizeChange",t,e)!==!1&&(e==="auto"&&!this.hot.getPlugin("autoRowSize")?.enabled&&Ie(EW),ut(this,Mg,Rb).call(this,e),ut(this,Wa,ql).call(this),this.hot.runHooks("afterPageSizeChange",t,ae(this,io)))}resetPageSize(){this.setPageSize(this.getSetting("pageSize"))}resetPagination(){this.resetPage(),this.resetPageSize(),ut(this,BR,$W).call(this)}nextPage(){this.setPage(ae(this,Zt)+1)}prevPage(){this.setPage(ae(this,Zt)-1)}firstPage(){this.setPage(1)}lastPage(){this.setPage(ae(this,Di).getTotalPages())}hasPreviousPage(){return ae(this,Zt)>1}hasNextPage(){return ae(this,Zt)<ae(this,Di).getTotalPages()}getCurrentPageData(){const{firstVisibleRowIndex:e,lastVisibleRowIndex:t}=this.getPaginationData();return e===-1||t===-1?[]:this.hot.getData(e,0,t,this.hot.countCols()-1)}showPageSizeSection(){ae(this,mn).setPageSizeSectionVisibility(!0),this.hot.runHooks("afterPageSizeVisibilityChange",!0)}hidePageSizeSection(){ae(this,mn).setPageSizeSectionVisibility(!1),this.hot.runHooks("afterPageSizeVisibilityChange",!1)}showPageCounterSection(){ae(this,mn).setCounterSectionVisibility(!0),this.hot.runHooks("afterPageCounterVisibilityChange",!0)}hidePageCounterSection(){ae(this,mn).setCounterSectionVisibility(!1),this.hot.runHooks("afterPageCounterVisibilityChange",!1)}showPageNavigationSection(){ae(this,mn).setNavigationSectionVisibility(!0),this.hot.runHooks("afterPageNavigationVisibilityChange",!0)}hidePageNavigationSection(){ae(this,mn).setNavigationSectionVisibility(!1),this.hot.runHooks("afterPageNavigationVisibilityChange",!1)}destroy(){Et(this,Nu,null),Et(this,Di,null),ae(this,mn)?.destroy(),Et(this,mn,null),super.destroy()}constructor(...e){super(...e),eo(this,Sb),eo(this,Mg),eo(this,Wa),eo(this,BR),eo(this,Ey),eo(this,kW),eo(this,TW),eo(this,xW),eo(this,VR),eo(this,MW),eo(this,IW),eo(this,HW),eo(this,AW),eo(this,OW),eo(this,DW),eo(this,NW),eo(this,PW),eo(this,LW),eo(this,WW),Gs(this,Nu,{writable:!0,value:void 0}),Gs(this,Zt,{writable:!0,value:void 0}),Gs(this,io,{writable:!0,value:void 0}),Gs(this,mn,{writable:!0,value:void 0}),Gs(this,Di,{writable:!0,value:void 0}),Gs(this,Fp,{writable:!0,value:void 0}),Gs(this,Bp,{writable:!0,value:void 0}),Gs(this,dc,{writable:!0,value:void 0}),Gs(this,up,{writable:!0,value:void 0}),Gs(this,FR,{writable:!0,value:void 0}),Gs(this,vb,{writable:!0,value:void 0}),Et(this,Nu,null),Et(this,Zt,1),Et(this,io,10),Et(this,mn,null),Et(this,Di,null),Et(this,Fp,!1),Et(this,Bp,!1),Et(this,dc,!1),Et(this,up,null),Et(this,FR,({queryParameters:t,totalRows:o})=>{if(!ae(this,dc))return;const i=ae(this,Zt),s=ae(this,io),{page:r,pageSize:a}=t;typeof r=="number"&&r>=1&&ut(this,Sb,zR).call(this,r),a==="auto"?ut(this,Mg,Rb).call(this,"auto"):typeof a=="number"&&a>=1&&ut(this,Mg,Rb).call(this,a),ae(this,dc)&&typeof o=="number"&&o>=0&&Et(this,up,o),ut(this,Wa,ql).call(this),i!==ae(this,Zt)&&this.hot.runHooks("afterPageChange",i,ae(this,Zt)),s!==ae(this,io)&&this.hot.runHooks("afterPageSizeChange",s,ae(this,io))}),Et(this,vb,()=>{!ae(this,Fp)&&this.hot?.view&&ut(this,Ey,LM).call(this)})}}function zR(n){Et(this,Zt,n)}function Rb(n){Et(this,Di,IY(n==="auto"?"auto":"fixed")),Et(this,io,n)}function ql(){ut(this,Ey,LM).call(this),this.hot.view.adjustElementsSize(),this.hot.render()}function $W(){this.getSetting("showPageSize")?this.showPageSizeSection():this.hidePageSizeSection(),this.getSetting("showCounter")?this.showPageCounterSection():this.hidePageCounterSection(),this.getSetting("showNavigation")?this.showPageNavigationSection():this.hidePageNavigationSection()}function LM(){Et(this,Fp,!0),ae(this,Nu).clear();const n=this.hot.rowIndexMapper.getRenderableIndexes(),e=n.length,{stylesHandler:t}=this.hot,o=ae(this,dc),i=o?ae(this,up)??e:e;ae(this,Di).calculate({pageSize:ae(this,io),totalItems:i,viewportSizeProvider:()=>{const{view:l}=this.hot;if(l.isVerticallyScrollableByWindow()){const c=getComputedStyle(this.hot.rootDocument.body),d=Number.parseInt(c.marginTop,10)+Number.parseInt(c.marginBottom,10),u=this.hot.hasColHeaders()?l._wt.wtTable.getColumnHeaderHeight():0,f=ae(this,mn).getHeight();return l.getWorkspaceHeight()-f-u-d}const h=l.hasHorizontalScroll()?xn():0;return l.getViewportHeight()-h},itemsSizeProvider:()=>this.hot.rowIndexMapper.getRenderableIndexes().map(h=>{const c=this.hot.toVisualRow(h);return this.hot.getRowHeight(c)??t.getDefaultRowHeight(c)})});const s=ae(this,Di).getTotalPages();if(Et(this,Zt,et(ae(this,Zt),1,s)),!o&&n.length>0){const{startIndex:l,pageSize:h}=ae(this,Di).getState(ae(this,Zt));n.splice(l,h)}!o&&n.length>0?this.hot.batchExecution(()=>{n.forEach(l=>ae(this,Nu).setValueAtIndex(l,!0))},!0):o||this.hot.rowIndexMapper.updateCache(!0),Et(this,Fp,!1);const a={...this.getPaginationData(),totalRenderedRows:o?i:e};if(o){const l=i,h=ae(this,Di).getState(ae(this,Zt))?.pageSize??ae(this,io);a.counterStartRow=(ae(this,Zt)-1)*h+1,a.counterEndRow=Math.min(ae(this,Zt)*h,l)}ae(this,mn).updateState(a)}function abe(){if(!this.hot.view)return!0;const{view:n}=this.hot;if(n.isVerticallyScrollableByWindow())return!1;if(n.hasHorizontalScroll()||n.getTableHeight()<n.getWorkspaceHeight())return!0;const{lastVisibleRowIndex:e}=this.getPaginationData();return n.getLastFullyVisibleRow()!==e}function lbe(){this.hot.getFocusScopeManager().registerScope(ju,ae(this,mn).getContainer(),{shortcutsContextName:sbe,runOnlyIf:()=>this.getSetting("showPageSize")||this.getSetting("showNavigation"),onActivate:n=>{const e=ae(this,mn).getFocusableElements();e.length>0&&(n==="tab_from_above"?e.at(0).focus():n==="tab_from_below"&&e.at(-1).focus())}})}function hbe(){this.hot.getFocusScopeManager().unregisterScope(ju)}function FW(n,e){const{firstVisibleRowIndex:t,lastVisibleRowIndex:o}=this.getPaginationData();(ae(this,Zt)>1||n.row>=0)&&(n.row=t),e.row=o}function cbe(n){if(this.hot.selection.isSelectedByColumnHeader()){const{lastVisibleRowIndex:e}=this.getPaginationData();n.row=e}}function dbe(){if(!this.hot.getSettings().navigableHeaders)return;const n=this.hot.getSelectedRangeLast();if(!n.isSingle()){const{highlight:e}=n;e.row=et(e.row,n.getTopStartCorner().row,n.getBottomEndCorner().row)}}function ube(n,e){const{firstVisibleRowIndex:t,lastVisibleRowIndex:o}=this.getPaginationData();if(t===-1||o===-1)return!1;e.forEach(({startRow:i})=>{if(n.length===0)return;const s=Math.min(n.length-(o-i+1),n.length);n.splice(0,s)})}function fbe(){if(ae(this,io)!=="auto"||ae(this,Bp)){Et(this,Bp,!1);return}Et(this,Bp,!0),ut(this,Wa,ql).call(this)}function gbe(){const{view:n}=this.hot,e=n.isHorizontallyScrollableByWindow()?n.getTotalTableWidth():n.getWorkspaceWidth();ae(this,mn).updateWidth(e).refreshBorderState()}function pbe(n){return this.getSetting("uiContainer")||!(typeof n=="number"||typeof n=="string"&&/^\d+$/.test(n)||typeof n=="string"&&n.endsWith("px"))?n:`calc(${typeof n=="string"&&n.endsWith("px")?n:`${n}px`} - ${ae(this,mn).getHeight()}px)`}function mbe(){ae(this,io)!=="auto"&&ut(this,Ey,LM).call(this)}function wbe(){ae(this,mn).refreshBorderState()}function bbe(){ut(this,Wa,ql).call(this)}function Cbe(n){ae(this,mn).updateTheme(n)}function ybe(n,e){if(e.has(n))throw new TypeError("Cannot initialize the same private elements twice on an object")}function BW(n,e,t){if(!e.has(n))throw new TypeError("attempted to get private field on non-instance");return t}function _be(n,e){ybe(n,e),e.add(n)}const UR="search",Sbe=190,vbe="htSearchResult",Rbe=function(n,e,t,o,i){n.getCellMeta(e,t).isSearchResult=i},Ebe=function(n,e,t){return Jt(n)||n===null||!n.toLocaleLowerCase||n.length===0||Jt(e)||e===null?!1:e.toString().toLocaleLowerCase(t.locale).indexOf(n.toLocaleLowerCase(t.locale))!==-1};var YR=new WeakSet;class kbe extends rt{static get PLUGIN_KEY(){return UR}static get PLUGIN_PRIORITY(){return Sbe}isEnabled(){return this.hot.getSettings()[UR]}enablePlugin(){if(this.enabled)return;const e=this.hot.getSettings()[UR];this.updatePluginSettings(e),this.addHook("beforeRenderer",(...t)=>BW(this,YR,VW).call(this,...t)),super.enablePlugin()}disablePlugin(){const e=(...t)=>BW(this,YR,VW).call(this,...t);this.hot.addHook("beforeRenderer",e),this.hot.addHookOnce("afterViewRender",()=>{this.hot.removeHook("beforeRenderer",e)}),super.disablePlugin()}updatePlugin(){this.disablePlugin(),this.enablePlugin(),super.updatePlugin()}query(e,t=this.getCallback(),o=this.getQueryMethod()){const i=this.hot.countRows(),s=this.hot.countCols(),r=[],a=this.hot;return Ee(0,i-1,l=>{Ee(0,s-1,h=>{const c=this.hot.getDataAtCell(l,h),d=this.hot.getCellMeta(l,h),u=d.search.callback||t,p=(d.search.queryMethod||o)(e,c,d);if(p){const C={row:l,col:h,data:c};r.push(C)}u&&u(a,l,h,c,p)})}),r}getCallback(){return this.callback}setCallback(e){this.callback=e}getQueryMethod(){return this.queryMethod}setQueryMethod(e){this.queryMethod=e}getSearchResultClass(){return this.searchResultClass}setSearchResultClass(e){this.searchResultClass=e}updatePluginSettings(e){ne(e)&&(e.searchResultClass&&this.setSearchResultClass(e.searchResultClass),e.queryMethod&&this.setQueryMethod(e.queryMethod),e.callback&&this.setCallback(e.callback))}destroy(){super.destroy()}constructor(...e){super(...e),_be(this,YR),this.callback=Rbe,this.queryMethod=Ebe,this.searchResultClass=vbe}}function VW(n,e,t,o,i,s){const r=s.className||[];let a=[];typeof r=="string"?a=r.split(" "):a.push(...r),this.isEnabled()&&s.isSearchResult?a.includes(this.searchResultClass)||a.push(`${this.searchResultClass}`):a.includes(this.searchResultClass)&&a.splice(a.indexOf(this.searchResultClass),1),s.className=a.join(" ")}class OY{prepare({viewportWidth:e}){this.viewportWidth=e,this.baseWidths.clear(),this.stretchedWidths.clear()}setColumnBaseWidth(e,t){this.baseWidths.set(e,t)}calculate(){}getWidths(){return Array.from(this.stretchedWidths)}constructor(e){this.baseWidths=new Map,this.stretchedWidths=new Map,this.overwriteColumnWidthFn=e}}class Tbe extends OY{calculate(){const e=Array.from(this.baseWidths).reduce((d,[,u])=>d+u,0);if(this.viewportWidth-e<0){this.stretchedWidths.clear();return}const o=this.viewportWidth/e,i=[],s=[];let r=this.viewportWidth,a=0;if(this.baseWidths.forEach((d,u)=>{const f=Math.round(d*o),p=this.overwriteColumnWidthFn(f,u);f===p&&f>=Zu?(i.push([u,p]),a+=p):f!==p&&(i.push([u,p]),s.push(u),r-=p)}),r<=Zu){this.stretchedWidths.clear();return}const l=r/a;let h=-1,c=0;i.forEach(([d,u],f)=>{let p=u;s.includes(d)||(p=Math.round(u*l)),this.stretchedWidths.set(d,p),h=d,f<i.length-1&&(c+=p)}),this.stretchedWidths.size>1&&this.stretchedWidths.set(h,Math.round(this.viewportWidth-c))}}function xbe(n,e){if(e.has(n))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Mbe(n,e){return e.get?e.get.call(n):e.value}function Ibe(n,e,t){if(e.set)e.set.call(n,t);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=t}}function DY(n,e,t){if(!e.has(n))throw new TypeError("attempted to "+t+" private field on non-instance");return e.get(n)}function Eb(n,e){var t=DY(n,e,"get");return Mbe(n,t)}function zW(n,e,t){xbe(n,e),e.set(n,t)}function eu(n,e,t){var o=DY(n,e,"set");return Ibe(n,o,t),t}var tu=new WeakMap,nu=new WeakMap;class Hbe extends OY{prepare(e){super.prepare(e),eu(this,tu,0),eu(this,nu,-1)}setColumnBaseWidth(e,t){super.setColumnBaseWidth(e,t),eu(this,nu,e),eu(this,tu,t)}calculate(){if(Eb(this,nu)===-1)return;const e=Array.from(this.baseWidths).reduce((o,[,i])=>o+i,0),t=this.viewportWidth-e+Eb(this,tu);if(t<Eb(this,tu)){this.stretchedWidths.clear();return}this.stretchedWidths.set(Eb(this,nu),t)}constructor(...e){super(...e),zW(this,tu,{writable:!0,value:void 0}),zW(this,nu,{writable:!0,value:void 0}),eu(this,tu,0),eu(this,nu,-1)}}function NY(n,e){if(e.has(n))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Abe(n,e){return e.get?e.get.call(n):e.value}function Obe(n,e,t){if(e.set)e.set.call(n,t);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=t}}function PY(n,e,t){if(!e.has(n))throw new TypeError("attempted to "+t+" private field on non-instance");return e.get(n)}function an(n,e){var t=PY(n,e,"get");return Abe(n,t)}function kb(n,e,t){NY(n,e),e.set(n,t)}function Ig(n,e,t){var o=PY(n,e,"set");return Obe(n,o,t),t}function Tb(n,e,t){if(!e.has(n))throw new TypeError("attempted to get private field on non-instance");return t}function GR(n,e){NY(n,e),e.add(n)}const Dbe="stretchColumns";var yo=new WeakMap,ou=new WeakMap,xb=new WeakMap,Hg=new WeakMap,UW=new WeakSet,YW=new WeakSet,jR=new WeakSet;class Nbe{useStrategy(e){Ig(this,Hg,an(this,xb).has(e)?e:"none")}refreshStretching(){if(an(this,Hg)==="none"){an(this,ou).clear();return}an(this,yo).batchExecution(()=>{an(this,ou).clear();const e=an(this,xb).get(an(this,Hg));let o=an(this,yo).view.getViewportWidth();Tb(this,UW,Pbe).call(this)&&(o-=xn(an(this,yo).rootDocument)),e.prepare({viewportWidth:o});for(let i=0;i<an(this,yo).countCols();i++)an(this,yo).columnIndexMapper.isHidden(an(this,yo).toPhysicalColumn(i))||e.setColumnBaseWidth(i,Tb(this,YW,Lbe).call(this,i));e.calculate(),e.getWidths().forEach(([i,s])=>{an(this,ou).setValueAtIndex(an(this,yo).toPhysicalColumn(i),s)})},!0)}getStretchedWidth(e){return an(this,ou).getValueAtIndex(an(this,yo).toPhysicalColumn(e))}constructor(e){GR(this,UW),GR(this,YW),GR(this,jR),kb(this,yo,{writable:!0,value:void 0}),kb(this,ou,{writable:!0,value:void 0}),kb(this,xb,{writable:!0,value:void 0}),kb(this,Hg,{writable:!0,value:void 0}),Ig(this,xb,new Map([["all",new Tbe(Tb(this,jR,GW).bind(this))],["last",new Hbe(Tb(this,jR,GW).bind(this))]])),Ig(this,Hg,"none"),Ig(this,yo,e),Ig(this,ou,an(this,yo).columnIndexMapper.createAndRegisterIndexMap(Dbe,"physicalIndexToValue"))}}function Pbe(){const{view:n,stylesHandler:e}=an(this,yo);if(n.isVerticallyScrollableByWindow())return!1;const t=n.getViewportHeight(),o=an(this,yo).countRows(),i=e.getDefaultRowHeight();let s=0,r=!1;for(let a=0;a<o;a++)if(!an(this,yo).rowIndexMapper.isHidden(an(this,yo).toPhysicalRow(a))&&(s+=an(this,yo).getRowHeight(a)??i,s>t)){r=!0;break}return r}function Lbe(n){return an(this,yo).getColWidth(n,"StretchColumns")??Zu}function GW(n,e){return an(this,yo).runHooks("beforeStretchingColumnWidth",n,e)}function LY(n,e){if(e.has(n))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Wbe(n,e){return e.get?e.get.call(n):e.value}function $be(n,e,t){if(e.set)e.set.call(n,t);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=t}}function WY(n,e,t){if(!e.has(n))throw new TypeError("attempted to "+t+" private field on non-instance");return e.get(n)}function Da(n,e){var t=WY(n,e,"get");return Wbe(n,t)}function qR(n,e,t){LY(n,e),e.set(n,t)}function iu(n,e,t){var o=WY(n,e,"set");return $be(n,o,t),t}function jW(n,e,t){if(!e.has(n))throw new TypeError("attempted to get private field on non-instance");return t}function qW(n,e){LY(n,e),e.add(n)}const Fbe="stretchColumns",Bbe=155;var uc=new WeakMap,Ag=new WeakMap,su=new WeakMap,KW=new WeakSet,XW=new WeakSet;class Vbe extends rt{static get PLUGIN_KEY(){return Fbe}static get PLUGIN_PRIORITY(){return Bbe}static get SETTING_KEYS(){return!0}isEnabled(){return["all","last"].includes(this.hot.getSettings().stretchH)}enablePlugin(){this.enabled||(Da(this,uc).useStrategy(this.hot.getSettings().stretchH),Da(this,su).observe(this.hot.rootElement),this.addHook("beforeRender",(...e)=>jW(this,XW,Ube).call(this,...e)),this.addHook("modifyColWidth",(...e)=>jW(this,KW,zbe).call(this,...e),10),super.enablePlugin())}updatePlugin(){Da(this,uc).useStrategy(this.hot.getSettings().stretchH),super.updatePlugin()}disablePlugin(){super.disablePlugin(),Da(this,su).unobserve(this.hot.rootElement)}getColumnWidth(e){return Da(this,uc).getStretchedWidth(e)}destroy(){Da(this,su).disconnect(),iu(this,su,null),iu(this,uc,null),super.destroy()}constructor(...e){super(...e),qW(this,KW),qW(this,XW),qR(this,uc,{writable:!0,value:void 0}),qR(this,Ag,{writable:!0,value:void 0}),qR(this,su,{writable:!0,value:void 0}),iu(this,uc,new Nbe(this.hot)),iu(this,Ag,null),iu(this,su,new ResizeObserver(t=>{requestAnimationFrame(()=>{this.hot?.view.isHorizontallyScrollableByWindow()&&t.forEach(({contentRect:o})=>{Da(this,Ag)!==null&&Da(this,Ag)!==o.width&&(this.hot.view.adjustElementsSize(),this.hot.refreshDimensions()),iu(this,Ag,o.width)})})}))}}function zbe(n,e,t){if(t===this.pluginName)return;const o=this.getColumnWidth(e);return typeof o=="number"?o:n}function Ube(n){n&&Da(this,uc).refreshStretching()}function Ybe(n,e){if(e.has(n))throw new TypeError("Cannot initialize the same private elements twice on an object")}function KR(n,e,t){if(!e.has(n))throw new TypeError("attempted to get private field on non-instance");return t}function XR(n,e){Ybe(n,e),e.add(n)}const Gbe="touchScroll",jbe=200;var ZW=new WeakSet,QW=new WeakSet,JW=new WeakSet;class qbe extends rt{static get PLUGIN_KEY(){return Gbe}static get PLUGIN_PRIORITY(){return jbe}static get SETTING_KEYS(){return!0}isEnabled(){return Q$()}enablePlugin(){this.enabled||(this.addHook("afterViewRender",()=>KR(this,ZW,Kbe).call(this)),this.registerEvents(),super.enablePlugin())}updatePlugin(){this.lockedCollection=!1,super.updatePlugin()}disablePlugin(){super.disablePlugin()}registerEvents(){this.addHook("beforeTouchScroll",()=>KR(this,QW,Xbe).call(this)),this.addHook("afterMomentumScroll",()=>KR(this,JW,Zbe).call(this))}constructor(...e){super(...e),XR(this,ZW),XR(this,QW),XR(this,JW),this.scrollbars=[],this.clones=[],this.lockedCollection=!1,this.freezeOverlays=!1}}function Kbe(){if(this.lockedCollection)return;const{topOverlay:n,bottomOverlay:e,inlineStartOverlay:t,topInlineStartCornerOverlay:o,bottomInlineStartCornerOverlay:i}=this.hot.view._wt.wtOverlays;this.lockedCollection=!0,this.scrollbars.length=0,this.scrollbars.push(n),e.clone&&this.scrollbars.push(e),this.scrollbars.push(t),o&&this.scrollbars.push(o),i&&i.clone&&this.scrollbars.push(i),this.clones=[],n.needFullRender&&this.clones.push(n.clone.wtTable.holder.parentNode),e.needFullRender&&this.clones.push(e.clone.wtTable.holder.parentNode),t.needFullRender&&this.clones.push(t.clone.wtTable.holder.parentNode),o&&this.clones.push(o.clone.wtTable.holder.parentNode),i&&i.clone&&this.clones.push(i.clone.wtTable.holder.parentNode)}function Xbe(){this.freezeOverlays=!0,O(this.clones,n=>{B(n,"hide-tween")})}function Zbe(){this.freezeOverlays=!1,O(this.clones,n=>{oe(n,"hide-tween"),B(n,"show-tween")}),this.hot._registerTimeout(()=>{O(this.clones,n=>{oe(n,"show-tween")})},400),O(this.scrollbars,n=>{n.refresh(),n.resetFixedPosition()}),this.hot.view._wt.wtOverlays.syncScrollWithMaster()}function Qbe(n,e){if(e.has(n))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Jbe(n,e,t){if(!e.has(n))throw new TypeError("attempted to get private field on non-instance");return t}function eCe(n,e){Qbe(n,e),e.add(n)}const fp="trimRows",tCe=330;var e$=new WeakSet;class nCe extends rt{static get PLUGIN_KEY(){return fp}static get PLUGIN_PRIORITY(){return tCe}static get SETTING_KEYS(){return[fp]}isEnabled(){return!!this.hot.getSettings()[fp]}enablePlugin(){this.enabled||(this.trimmedRowsMap=this.hot.rowIndexMapper.registerMap("trimRows",new Qu),this.trimmedRowsMap.addLocalHook("init",()=>Jbe(this,e$,oCe).call(this)),super.enablePlugin())}updatePlugin(){const e=this.hot.getSettings()[fp];Array.isArray(e)&&this.hot.batchExecution(()=>{this.trimmedRowsMap.clear(),O(e,t=>{this.trimmedRowsMap.setValueAtIndex(t,!0)})},!0),super.updatePlugin()}disablePlugin(){this.hot.rowIndexMapper.unregisterMap("trimRows"),super.disablePlugin()}getTrimmedRows(){return this.trimmedRowsMap.getTrimmedIndexes()}trimRows(e){const t=this.getTrimmedRows(),o=this.isValidConfig(e);let i=t;o&&(i=Array.from(new Set(t.concat(e)))),this.hot.runHooks("beforeTrimRow",t,i,o)!==!1&&(o&&this.hot.batchExecution(()=>{O(e,r=>{this.trimmedRowsMap.setValueAtIndex(r,!0)})},!0),this.hot.runHooks("afterTrimRow",t,i,o,o&&i.length>t.length))}trimRow(...e){this.trimRows(e)}untrimRows(e){const t=this.getTrimmedRows(),o=this.isValidConfig(e);let i=t;const s=this.trimmedRowsMap.getValues().slice(),r=e.length>0;o&&r&&(O(e,l=>{s[l]=!1}),i=$i(s,(l,h,c)=>(h&&l.push(c),l),[])),this.hot.runHooks("beforeUntrimRow",t,i,o&&r)!==!1&&(o&&r&&this.trimmedRowsMap.setValues(s),this.hot.runHooks("afterUntrimRow",t,i,o&&r,o&&i.length<t.length))}untrimRow(...e){this.untrimRows(e)}isTrimmed(e){return this.trimmedRowsMap.getValueAtIndex(e)||!1}untrimAll(){this.untrimRows(this.getTrimmedRows())}isValidConfig(e){const t=this.hot.countSourceRows();return e.every(o=>Number.isInteger(o)&&o>=0&&o<t)}destroy(){super.destroy()}constructor(...e){super(...e),eCe(this,e$),this.trimmedRowsMap=null}}function oCe(){const n=this.hot.getSettings()[fp];Array.isArray(n)&&this.hot.batchExecution(()=>{O(n,e=>{this.trimmedRowsMap.setValueAtIndex(e,!0)})},!0)}class Is{undo(){U("Not implemented")}redo(){U("Not implemented")}constructor(e){this.actionType="",this.actionType=e}}class WM extends Is{static startRegisteringEvents(e,t){e.addHook("beforeCellAlignment",(o,i,s,r)=>{t.done(()=>new WM({stateBefore:o,range:i,type:s,alignment:r}))})}undo(e,t){O(this.range,o=>{o.forAll((i,s)=>{i>=0&&s>=0&&e.setCellMeta(i,s,"className",this.stateBefore[i][s]||" htLeft")})}),e.addHookOnce("afterViewRender",t),e.render()}redo(e,t){Vl(this.range,this.type,this.alignment,(o,i)=>e.getCellMeta(o,i),(o,i,s,r)=>e.setCellMeta(o,i,s,r)),e.addHookOnce("afterViewRender",t),e.render()}constructor({stateBefore:e,range:t,type:o,alignment:i}){super("cell_alignment"),this.stateBefore=e,this.range=t,this.type=o,this.alignment=i}}class $M extends Is{static startRegisteringEvents(e,t){e.addHook("beforeColumnMove",(o,i)=>{o!==!1&&t.done(()=>new $M({columns:o,finalIndex:i}))})}undo(e,t){const o=e.getPlugin("manualColumnMove");e.addHookOnce("afterViewRender",t),HM(this.columns,this.finalColumnIndex,e.columnIndexMapper.getNumberOfIndexes()).reverse().forEach(({from:s,to:r})=>{s<r&&(r-=1),o.moveColumn(r,s)}),e.render(),e.deselectCell(),e.selectColumns(this.columns[0],this.columns[0]+this.columns.length-1)}redo(e,t){const o=e.getPlugin("manualColumnMove");e.addHookOnce("afterViewRender",t),o.moveColumns(this.columns.slice(),this.finalColumnIndex),e.render(),e.deselectCell(),e.selectColumns(this.finalColumnIndex,this.finalColumnIndex+this.columns.length-1)}constructor({columns:e,finalIndex:t}){super("col_move"),this.columns=e.slice(),this.finalColumnIndex=t}}class FM extends Is{static startRegisteringEvents(e,t){e.addHook("beforeColumnSort",(o,i,s)=>{s&&t.done(()=>new FM({currentSortState:o,newSortState:i}))})}undo(e,t){const o=e.getPlugin("columnSorting"),i=e.getPlugin("multiColumnSorting"),s=i.isEnabled()?i:o;this.previousSortState.length?s.sort(this.previousSortState):s.clearSort(),t()}redo(e,t){const o=e.getPlugin("columnSorting"),i=e.getPlugin("multiColumnSorting");(i.isEnabled()?i:o).sort(this.nextSortState),t()}constructor({currentSortState:e,newSortState:t}){super("col_sort"),this.previousSortState=e,this.nextSortState=t}}class BM extends Is{static startRegisteringEvents(e,t){e.addHook("afterCreateCol",(o,i,s)=>{t.done(()=>new BM({index:o,amount:i}),s)})}undo(e,t){e.addHookOnce("afterRemoveCol",t),e.alter("remove_col",this.index,this.amount,"UndoRedo.undo")}redo(e,t){e.addHookOnce("afterCreateCol",t),e.alter("insert_col_start",this.index,this.amount,"UndoRedo.redo")}constructor({index:e,amount:t}){super("insert_col"),this.index=e,this.amount=t}}class VM extends Is{static startRegisteringEvents(e,t){e.addHook("afterCreateRow",(o,i,s)=>{t.done(()=>new VM({index:o,amount:i}),s)})}undo(e,t){const o=e.countRows(),i=e.getSettings().minSpareRows;this.index>=o&&this.index-i<o&&(this.index-=i),e.addHookOnce("afterRemoveRow",t),e.alter("remove_row",this.index,this.amount,"UndoRedo.undo")}redo(e,t){e.addHookOnce("afterCreateRow",t),e.alter("insert_row_above",this.index,this.amount,"UndoRedo.redo")}constructor({index:e,amount:t}){super("insert_row"),this.index=e,this.amount=t}}class zM extends Is{static startRegisteringEvents(e,t){e.addHook("beforeChange",function(o,i){const s=o&&o.length;if(!s)return;o.find(a=>{if(a===null)return!1;const[,,l,h]=a;return l!==h});const r=()=>{const a=o.reduce((h,c)=>(c!==null&&h.push([...c]),h),[]);if(a.length===0)return null;a.forEach(h=>{h[1]=e.propToCol(h[1])});const l=s>1?this.getSelected():[[a[0][0],a[0][1]]];return new zM({changes:a,selected:l,countCols:e.countCols(),countRows:e.countRows()})};t.done(r,i)},t.constructor.PLUGIN_PRIORITY)}undo(e,t){const o=Qn(this.changes);for(let i=0,s=o.length;i<s;i++)o[i].splice(3,1);e.addHookOnce("afterChange",()=>{const i=e.countRows()-this.countRows;i>0&&e.alter("remove_row",null,i,"UndoRedo.undo");const s=e.countCols()-this.countCols;s>0&&e.isColumnModificationAllowed()&&e.alter("remove_col",null,s,"UndoRedo.undo"),e.scrollToFocusedCell(),e.selectCells(this.selected,!1,!1),t()}),e.setDataAtCell(o,null,null,"UndoRedo.undo")}redo(e,t){const o=Qn(this.changes);for(let i=0,s=o.length;i<s;i++)o[i].splice(2,1);e.addHookOnce("afterChange",()=>{e.selectCells(this.selected,!1,!1),t()}),e.setDataAtCell(o,null,null,"UndoRedo.redo")}constructor({changes:e,selected:t,countCols:o,countRows:i}){super("change"),this.changes=e,this.selected=t,this.countCols=o,this.countRows=i}}class UM extends Is{static startRegisteringEvents(e,t){e.addHook("beforeFilter",(o,i)=>{t.done(()=>new UM({conditionsStack:o,previousConditionsStack:i}))})}undo(e,t){const o=e.getPlugin("filters");e.addHookOnce("afterViewRender",t),o.importConditions(this.previousConditionsStack),o.filter()}redo(e,t){const o=e.getPlugin("filters");e.addHookOnce("afterViewRender",t),o.importConditions(this.conditionsStack),o.filter()}constructor({conditionsStack:e,previousConditionsStack:t}){super("filter"),this.conditionsStack=e,this.previousConditionsStack=t}}class YM extends Is{static startRegisteringEvents(e,t){e.addHook("beforeMergeCells",(o,i)=>{if(i)return;const s=o.getTopStartCorner(),r=o.getBottomEndCorner(),a=e.getData(s.row,s.col,r.row,r.col);t.done(()=>new YM({data:a,cellRange:o}))})}undo(e,t){const o=e.getPlugin("mergeCells");e.addHookOnce("afterViewRender",t),o.unmergeRange(this.cellRange,!0);const i=this.cellRange.getTopStartCorner();e.populateFromArray(i.row,i.col,this.data,void 0,void 0,"MergeCells")}redo(e,t){const o=e.getPlugin("mergeCells");e.addHookOnce("afterViewRender",t),o.mergeRange(this.cellRange)}constructor({data:e,cellRange:t}){super("merge_cells"),this.cellRange=t,this.data=e}}function $Y(n,e,t,o,i){const s=[];return Ee(o,i,r=>{Ee(e,t,a=>{const l=n.getCellMeta(a,r);s.push([l.visualRow,l.visualCol,l])})}),s}class GM extends Is{static startRegisteringEvents(e,t){e.addHook("beforeRemoveCol",(o,i,s,r)=>{const a=()=>{const l=e.getSourceDataArray(),h=(e.countCols()+o)%e.countCols(),c=h+i-1,d=[],u=[],f=[];return Ee(l.length-1,p=>{const C=[],_=l[p];Ee(h,c,S=>{C.push(_[e.toPhysicalColumn(S)])}),d.push(C)}),Ee(i-1,p=>{f.push(e.toPhysicalColumn(h+p))}),Array.isArray(e.getSettings().colHeaders)&&Ee(i-1,p=>{u.push(e.getSettings().colHeaders[e.toPhysicalColumn(h+p)]||null)}),new GM({index:h,indexes:f,data:d,amount:i,headers:u,columnPositions:e.columnIndexMapper.getIndexesSequence(),rowPositions:e.rowIndexMapper.getIndexesSequence(),fixedColumnsStart:e.getSettings().fixedColumnsStart,removedCellMetas:$Y(e,0,e.countRows(),h,c)})};t.done(a,r)})}undo(e,t){const o=e.getSettings();o.fixedColumnsStart=this.fixedColumnsStart;const i=this.indexes.slice(0).sort(),s=(c,d,u)=>u[this.indexes.indexOf(i[d])],r=this.data.length,a=[];for(let c=0;c<r;c++)a.push(Tt(this.data[c],s));const l=Tt(this.headers,s),h=[];e.columnIndexMapper.setIndexesSequence(this.columnPositions),e.alter("insert_col_start",e.toVisualColumn(this.indexes[0]),this.indexes.length,"UndoRedo.undo"),e.batchExecution(()=>{e.rowIndexMapper.setIndexesSequence(this.rowPositions),e.columnIndexMapper.setIndexesSequence(this.columnPositions)},!0),O(e.getSourceDataArray(),(c,d)=>{O(i,(u,f)=>{c[u]=a[d][f],h.push([d,u,c[u]])})}),typeof this.headers<"u"&&O(l,(c,d)=>{e.getSettings().colHeaders[i[d]]=c}),this.removedCellMetas.forEach(([c,d,u])=>{e.setCellMetaObject(c,d,u)}),e.addHookOnce("afterViewRender",t),e.setSourceDataAtCell(h,null,null,"UndoRedo.undo")}redo(e,t){e.addHookOnce("afterRemoveCol",t),e.alter("remove_col",this.index,this.amount,"UndoRedo.redo")}constructor({index:e,indexes:t,data:o,amount:i,headers:s,columnPositions:r,rowPositions:a,fixedColumnsStart:l,removedCellMetas:h}){super("remove_col"),this.index=e,this.indexes=t,this.data=o,this.amount=i,this.headers=s,this.columnPositions=r.slice(0),this.rowPositions=a.slice(0),this.fixedColumnsStart=l,this.removedCellMetas=h}}class jM extends Is{static startRegisteringEvents(e,t){e.addHook("beforeRemoveRow",(o,i,s,r)=>{const a=()=>{const l=e.toPhysicalRow(o),h=l+i-1,c=Qn(e.getSourceData(l,0,l+i-1,e.countSourceCols()-1));return new jM({index:l,data:c,fixedRowsBottom:e.getSettings().fixedRowsBottom,fixedRowsTop:e.getSettings().fixedRowsTop,rowIndexesSequence:e.rowIndexMapper.getIndexesSequence(),removedCellMetas:$Y(e,l,h,0,e.countCols()-1)})};t.done(a,r)})}undo(e,t){const o=e.getSettings(),i=[];o.fixedRowsBottom=this.fixedRowsBottom,o.fixedRowsTop=this.fixedRowsTop,this.data.forEach((s,r)=>{Object.keys(s).forEach(a=>{const l=parseInt(a,10);i.push([this.index+r,isNaN(l)?a:l,s[a]])})}),e.rowIndexMapper.setIndexesSequence(this.rowIndexesSequence),e.alter("insert_row_above",e.toVisualRow(this.index),this.data.length,"UndoRedo.undo"),e.rowIndexMapper.setIndexesSequence(this.rowIndexesSequence),this.removedCellMetas.forEach(([s,r,a])=>{e.setCellMetaObject(s,r,a)}),e.addHookOnce("afterViewRender",t),e.setSourceDataAtCell(i,null,null,"UndoRedo.undo")}redo(e,t){e.addHookOnce("afterRemoveRow",t),e.alter("remove_row",e.toVisualRow(this.index),this.data.length,"UndoRedo.redo")}constructor({index:e,data:t,fixedRowsBottom:o,fixedRowsTop:i,rowIndexesSequence:s,removedCellMetas:r}){super("remove_row"),this.index=e,this.data=t,this.fixedRowsBottom=o,this.fixedRowsTop=i,this.rowIndexesSequence=s,this.removedCellMetas=r}}class qM extends Is{static startRegisteringEvents(e,t){e.addHook("beforeRowMove",(o,i)=>{o!==!1&&t.done(()=>new qM({rows:o,finalIndex:i}))})}undo(e,t){const o=e.getPlugin("manualRowMove");e.addHookOnce("afterViewRender",t),HM(this.rows,this.finalRowIndex,e.rowIndexMapper.getNumberOfIndexes()).reverse().forEach(({from:s,to:r})=>{s<r&&(r-=1),o.moveRow(r,s)}),e.render(),e.deselectCell(),e.selectRows(this.rows[0],this.rows[0]+this.rows.length-1)}redo(e,t){const o=e.getPlugin("manualRowMove");e.addHookOnce("afterViewRender",t),o.moveRows(this.rows.slice(),this.finalRowIndex),e.render(),e.deselectCell(),e.selectRows(this.finalRowIndex,this.finalRowIndex+this.rows.length-1)}constructor({rows:e,finalIndex:t}){super("row_move"),this.rows=e.slice(),this.finalRowIndex=t}}class KM extends Is{static startRegisteringEvents(e,t){e.addHook("afterUnmergeCells",(o,i)=>{i||t.done(()=>new KM({cellRange:o}))})}undo(e,t){const o=e.getPlugin("mergeCells");e.addHookOnce("afterViewRender",t),o.mergeRange(this.cellRange,!0)}redo(e,t){const o=e.getPlugin("mergeCells");e.addHookOnce("afterViewRender",t),o.unmergeRange(this.cellRange,!0),e.render()}constructor({cellRange:e}){super("unmerge_cells"),this.cellRange=e}}function iCe(n,e){[WM,$M,FM,BM,VM,zM,UM,YM,GM,jM,qM,KM].forEach(t=>t.startRegisteringEvents(n,e))}function sCe(n,e){if(e.has(n))throw new TypeError("Cannot initialize the same private elements twice on an object")}function rCe(n,e,t){if(!e.has(n))throw new TypeError("attempted to get private field on non-instance");return t}function aCe(n,e){sCe(n,e),e.add(n)}const t$="undoRedo",lCe="undoRedo",hCe=1e3;he.getSingleton().register("beforeUndo");he.getSingleton().register("afterUndo");he.getSingleton().register("beforeRedo");he.getSingleton().register("afterRedo");var n$=new WeakSet;class cCe extends rt{static get PLUGIN_KEY(){return lCe}static get PLUGIN_PRIORITY(){return hCe}static get SETTING_KEYS(){return!0}isEnabled(){return!!this.hot.getSettings().undo}enablePlugin(){this.enabled||(this.addHook("afterChange",(...e)=>rCe(this,n$,dCe).call(this,...e)),this.registerShortcuts(),super.enablePlugin())}disablePlugin(){super.disablePlugin(),this.clear(),this.unregisterShortcuts()}registerShortcuts(){const t=this.hot.getShortcutManager().getContext("grid"),i={runOnlyIf:s=>!s.altKey,group:t$};t.addShortcuts([{keys:[["Control/Meta","z"]],callback:()=>{this.undo()}},{keys:[["Control/Meta","y"],["Control/Meta","Shift","z"]],callback:()=>{this.redo()}}],i)}unregisterShortcuts(){this.hot.getShortcutManager().getContext("grid").removeShortcutsByGroup(t$)}done(e,t){if(this.ignoreNewActions||t==="UndoRedo.undo"||t==="UndoRedo.redo"||t==="auto")return;const i=this.doneActions.slice();if(this.hot.runHooks("beforeUndoStackChange",i,t)===!1)return;const r=e(),a=this.undoneActions.slice();r!==null&&this.doneActions.push(r),this.hot.runHooks("afterUndoStackChange",i,this.doneActions.slice()),this.hot.runHooks("beforeRedoStackChange",a),this.undoneActions.length=0,this.hot.runHooks("afterRedoStackChange",a,this.undoneActions.slice())}undo(){if(!this.isUndoAvailable())return;const e=this.doneActions.slice();this.hot.runHooks("beforeUndoStackChange",e);const t=this.doneActions.pop();this.hot.runHooks("afterUndoStackChange",e,this.doneActions.slice());const o=Qn(t);if(this.hot.runHooks("beforeUndo",o)===!1)return;this.ignoreNewActions=!0;const s=this.undoneActions.slice();this.hot.runHooks("beforeRedoStackChange",s),t.undo(this.hot,()=>{this.ignoreNewActions=!1,this.undoneActions.push(t)}),this.hot.runHooks("afterRedoStackChange",s,this.undoneActions.slice()),this.hot.runHooks("afterUndo",o)}redo(){if(!this.isRedoAvailable())return;const e=this.undoneActions.slice();this.hot.runHooks("beforeRedoStackChange",e);const t=this.undoneActions.pop();this.hot.runHooks("afterRedoStackChange",e,this.undoneActions.slice());const o=Qn(t);if(this.hot.runHooks("beforeRedo",o)===!1)return;this.ignoreNewActions=!0;const s=this.doneActions.slice();this.hot.runHooks("beforeUndoStackChange",s),t.redo(this.hot,()=>{this.ignoreNewActions=!1,this.doneActions.push(t)}),this.hot.runHooks("afterUndoStackChange",s,this.doneActions.slice()),this.hot.runHooks("afterRedo",o)}isUndoAvailable(){return this.doneActions.length>0}isRedoAvailable(){return this.undoneActions.length>0}clear(){this.doneActions.length=0,this.undoneActions.length=0}destroy(){this.clear(),this.doneActions=null,this.undoneActions=null,super.destroy()}constructor(e){super(e),aCe(this,n$),this.doneActions=[],this.undoneActions=[],this.ignoreNewActions=!1,iCe(e,this)}}function dCe(n,e){e==="loadData"&&this.clear()}const So="ht-dialog";function uCe(){function n(){return`
|
|
291
|
+
<div data-ref="contentElement" class="${So}__content"></div>
|
|
292
|
+
`}let e=null;const t={};function o(){const s=Bc`${n()}`;return Object.assign(t,s.refs),e=s.fragment,s}function i(){return e===null&&U("Compile the template first."),[]}return{TEMPLATE_NAME:"base",dialogA11YOptions(){return{role:"dialog"}},compile:o,focusableElements:i}}function fCe({id:n="",title:e="",description:t="",buttons:o=[]}){function i(){return`
|
|
293
|
+
<div tabindex="-1" data-ref="contentElement" class="${So}__content-wrapper-inner">
|
|
294
|
+
<div class="${So}__content">
|
|
295
|
+
<h2
|
|
296
|
+
id="${n}-dialog-confirm-title"
|
|
297
|
+
class="${So}__title">${gr(e)}</h2>
|
|
298
|
+
<p
|
|
299
|
+
id="${n}-dialog-confirm-description"
|
|
300
|
+
class="${So}__description">${gr(t)}</p>
|
|
301
|
+
</div>
|
|
302
|
+
${o.length>0?`
|
|
303
|
+
<div data-ref="buttonsContainer" class="${So}__buttons">
|
|
304
|
+
${o.map(h=>`
|
|
305
|
+
<button class="ht-button ht-button--${h.type}">${gr(h.text)}</button>
|
|
306
|
+
`).join("")}
|
|
307
|
+
</div>
|
|
308
|
+
`:""}
|
|
309
|
+
</div>
|
|
310
|
+
`}let s=null;const r={};function a(){const h=Bc`${i()}`;return Object.assign(r,h.refs),s=h.fragment,h}function l(){s===null&&U("Compile the template first.");const{contentElement:h,buttonsContainer:c}=r,d=[];return c?d.push(...Array.from(c.children)):d.push(h),d}return{TEMPLATE_NAME:"confirm",dialogA11YOptions(){return{role:"alertdialog",ariaLabelledby:`${n}-dialog-confirm-title`,ariaDescribedby:t?`${n}-dialog-confirm-description`:void 0}},compile:a,focusableElements:l}}const Og=new Map([["base",uCe],["confirm",fCe]]);function FY(n,e){if(e.has(n))throw new TypeError("Cannot initialize the same private elements twice on an object")}function gCe(n,e){return e.get?e.get.call(n):e.value}function pCe(n,e,t){if(e.set)e.set.call(n,t);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=t}}function BY(n,e,t){if(!e.has(n))throw new TypeError("attempted to "+t+" private field on non-instance");return e.get(n)}function Xt(n,e){var t=BY(n,e,"get");return gCe(n,t)}function tc(n,e,t){FY(n,e),e.set(n,t)}function $o(n,e,t){var o=BY(n,e,"set");return pCe(n,o,t),t}function o$(n,e,t){if(!e.has(n))throw new TypeError("attempted to get private field on non-instance");return t}function i$(n,e){FY(n,e),e.add(n)}const mCe=`
|
|
311
|
+
<div data-ref="dialogElement" class="${So}">
|
|
312
|
+
<div data-ref="dialogWrapperElement" class="${So}__content-wrapper">
|
|
313
|
+
</div>
|
|
314
|
+
`;var ZR=new WeakMap,Fo=new WeakMap,Mb=new WeakMap,Tu=new WeakMap,js=new WeakMap,Dg=new WeakMap,QR=new WeakMap,s$=new WeakSet,r$=new WeakSet;class VY{useTemplate(e,t={}){if(!Og.has(e)||e==="base"){const o=Array.from(Og.keys()).filter(i=>i!=="base").join(", ");U(pt`Invalid template: ${e}.\x20
|
|
315
|
+
Valid templates are: ${o}.`)}$o(this,js,Og.get(e)(t)),$o(this,Dg,(t.buttons??[]).map(o=>o.callback))}useDefaultTemplate(){$o(this,js,Og.get("base")()),$o(this,Dg,[])}install(){if(Xt(this,Fo)?.dialogElement)return;const e=Bc`${mCe}`;$o(this,Fo,e.refs);const{dialogElement:t}=Xt(this,Fo);fe(t,[GG(),["dir",Xt(this,Mb)?"rtl":"ltr"]]),t.addEventListener("transitionstart",()=>o$(this,r$,bCe).call(this)),t.addEventListener("transitionend",()=>o$(this,s$,wCe).call(this)),Xt(this,ZR).after(e.fragment)}getContainer(){return Xt(this,Fo).dialogElement}getFocusableElements(){return Xt(this,js).focusableElements()}updateDialog({isVisible:e,content:t,customClassName:o,background:i,contentBackground:s,animation:r,a11y:a}){const l=Xt(this,js).compile(),{dialogElement:h,dialogWrapperElement:c}=Xt(this,Fo);c.innerHTML="",c.appendChild(l.fragment),Object.assign(Xt(this,Fo),l.refs);const{contentElement:d,buttonsContainer:u}=Xt(this,Fo);Xt(this,js).TEMPLATE_NAME!=="base"&&Object.assign(a,Xt(this,js).dialogA11YOptions());const f=o?` ${o}`:"",p=i?` ${So}--background-${i}`:"",C=r?` ${So}--animation`:"",_=e?` ${So}--show`:"";h.className=[So,`${So}--${Xt(this,js).TEMPLATE_NAME}`,"handsontable",f,p,C,_].join(" "),fe(h,[Xt(this,js).TEMPLATE_NAME==="base"?wr(-1):void 0]),fe(h,[a.role==="alertdialog"?IG():MG()]),a.ariaLabel&&!a.ariaLabelledby?fe(h,[a.ariaLabel?Ni(a.ariaLabel):void 0]):Zr(h,"aria-label"),a.ariaLabelledby?fe(h,[NG(a.ariaLabelledby)]):Zr(h,"aria-labelledby"),a.ariaDescribedby?fe(h,[PG(a.ariaDescribedby)]):Zr(h,"aria-describedby");const S=s?` ${So}__content--background`:"";return B(d,`${So}__content${S}`),Xt(this,js).TEMPLATE_NAME==="base"?(d.innerHTML="",typeof t=="string"?Qc(d,t,Xt(this,QR)):(t instanceof HTMLElement||t instanceof DocumentFragment)&&d.appendChild(t)):u&&Array.from(u.children).forEach((T,P)=>{const F=Xt(this,Dg)[P];F&&T.addEventListener("click",F)}),this}showDialog(e){const{dialogElement:t}=Xt(this,Fo);return t.style.display="block",e&&t.offsetHeight,B(t,`${So}--show`),$o(this,Tu,!1),this}hideDialog(e){const{dialogElement:t}=Xt(this,Fo);return oe(t,`${So}--show`),(e&&!Xt(this,Tu)||!e)&&(t.style.display="none"),$o(this,Tu,!1),this}focusDialog(){Xt(this,Fo).dialogElement.focus()}updateWidth(e){return Xt(this,Fo).dialogElement.style.width=`${e}px`,this}updateHeight(e){return Xt(this,Fo).dialogElement.style.height=`calc(100% - ${e}px)`,this}destroyDialog(){Xt(this,Fo)?.dialogElement.remove(),$o(this,Fo,null)}constructor({rootElement:e,isRtl:t,sanitizer:o}){i$(this,s$),i$(this,r$),tc(this,ZR,{writable:!0,value:void 0}),tc(this,Fo,{writable:!0,value:void 0}),tc(this,Mb,{writable:!0,value:void 0}),tc(this,Tu,{writable:!0,value:void 0}),tc(this,js,{writable:!0,value:void 0}),tc(this,Dg,{writable:!0,value:void 0}),tc(this,QR,{writable:!0,value:void 0}),$o(this,Mb,!1),$o(this,Tu,!1),$o(this,js,Og.get("base")),$o(this,Dg,[]),$o(this,ZR,e),$o(this,Mb,t),$o(this,QR,o),this.install()}}function wCe(){const{dialogElement:n}=Xt(this,Fo);_e(n,`${So}--show`)||(n.style.display="none")}function bCe(){$o(this,Tu,!0)}Ct(VY,$n);function zY(n,e){if(e.has(n))throw new TypeError("Cannot initialize the same private elements twice on an object")}function CCe(n,e){return e.get?e.get.call(n):e.value}function yCe(n,e,t){if(e.set)e.set.call(n,t);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=t}}function UY(n,e,t){if(!e.has(n))throw new TypeError("attempted to "+t+" private field on non-instance");return e.get(n)}function _o(n,e){var t=UY(n,e,"get");return CCe(n,t)}function JR(n,e,t){zY(n,e),e.set(n,t)}function us(n,e,t){var o=UY(n,e,"set");return yCe(n,o,t),t}function Ng(n,e,t){if(!e.has(n))throw new TypeError("attempted to get private field on non-instance");return t}function Pg(n,e){zY(n,e),e.add(n)}const ih="dialog",_Ce=360,N0=ih,ky=`plugin:${ih}`;var Co=new WeakMap,fc=new WeakMap,Wl=new WeakMap,a$=new WeakSet,l$=new WeakSet,h$=new WeakSet,c$=new WeakSet,d$=new WeakSet;class Ty extends rt{static get PLUGIN_KEY(){return ih}static get PLUGIN_PRIORITY(){return _Ce}static get DEFAULT_SETTINGS(){return{template:null,content:"",customClassName:"",background:"solid",contentBackground:!1,animation:!0,closable:!1,a11y:{role:"dialog",ariaLabel:"Dialog",ariaLabelledby:"",ariaDescribedby:""}}}static get SETTINGS_VALIDATORS(){return{template:e=>ne(e)&&typeof["alert","confirm"].includes(e.type)&&typeof e.title=="string"&&(typeof e?.description>"u"||typeof e?.description=="string")&&(typeof e?.buttons>"u"||Array.isArray(e?.buttons)&&e.buttons.every(t=>typeof t=="object"&&typeof t.text=="string"&&["primary","secondary"].includes(t.type)&&(typeof t.callback>"u"||typeof t.callback=="function"))),content:e=>typeof e=="string"||typeof HTMLElement<"u"&&e instanceof HTMLElement||typeof DocumentFragment<"u"&&e instanceof DocumentFragment,customClassName:e=>typeof e=="string",background:e=>["solid","semi-transparent"].includes(e),contentBackground:e=>typeof e=="boolean",animation:e=>typeof e=="boolean",closable:e=>typeof e=="boolean",a11y:e=>ne(e)&&(typeof e?.role>"u"||["dialog","alertdialog"].includes(e?.role))&&(typeof e?.ariaLabel>"u"||typeof e?.ariaLabel=="string")&&(typeof e?.ariaLabelledby>"u"||typeof e?.ariaLabelledby=="string")&&(typeof e?.ariaDescribedby>"u"||typeof e?.ariaDescribedby=="string")}}isEnabled(){return!!this.hot.getSettings()[ih]}enablePlugin(){this.enabled||(_o(this,Co)||us(this,Co,new VY({rootElement:this.hot.rootGridElement,sanitizer:this.hot.getSettings().sanitizer,isRtl:this.hot.isRtl()})),Ng(this,a$,SCe).call(this),Ng(this,h$,RCe).call(this),this.addHook("afterViewRender",()=>Ng(this,d$,kCe).call(this)),super.enablePlugin())}updatePlugin(){this.disablePlugin(),this.enablePlugin(),super.updatePlugin()}disablePlugin(){this.hide(),Ng(this,l$,vCe).call(this),Ng(this,c$,ECe).call(this),super.disablePlugin()}isVisible(){return _o(this,fc)}show(e={}){if(this.enabled){if(this.isVisible()){this.update(e);return}this.hot.runHooks("beforeDialogShow"),this.update(e),_o(this,Co).showDialog(this.getSetting("animation")),us(this,fc,!0),this.hot.getFocusScopeManager().activateScope(ih),us(this,Wl,this.hot.selection.exportSelection()),this.hot.deselectCell(),this.hot.runHooks("afterDialogShow")}}hide(){this.isVisible()&&(this.hot.runHooks("beforeDialogHide"),_o(this,Co).hideDialog(this.getSetting("animation")),us(this,fc,!1),this.hot.getFocusScopeManager().deactivateScope(ih),_o(this,Wl)?.ranges.length>0?(this.hot.selection.importSelection(_o(this,Wl)),this.hot.view.render(),us(this,Wl,null)):(this.hot.view.render(),us(this,Wl,null)),this.hot.runHooks("afterDialogHide"))}update(e){if(!this.enabled)return;this.updatePluginSettings(e);const t=this.getSetting("template");t!==Ty.DEFAULT_SETTINGS.template&&this.getSetting("content")!==Ty.DEFAULT_SETTINGS.content&&U("The `template` option cannot be used together with the `content` option."),t?_o(this,Co).useTemplate(t.type,{id:this.hot.guid,...t}):_o(this,Co).useDefaultTemplate(),_o(this,Co).updateDialog({isVisible:this.isVisible(),content:this.getSetting("content"),customClassName:this.getSetting("customClassName"),background:this.getSetting("background"),contentBackground:this.getSetting("contentBackground"),animation:this.getSetting("animation"),a11y:this.getSetting("a11y")})}showAlert(e,t){const{title:o="Alert",description:i}=ne(e)?e:{title:e};this.show({template:{type:"confirm",title:o,description:i,buttons:[{text:this.hot.getTranslatedPhrase(xC),type:"primary",callback:(...s)=>t?.(...s)}]},contentBackground:!1,background:"solid",animation:!0,closable:!1})}showConfirm(e,t,o){const{title:i="Confirm",description:s}=ne(e)?e:{title:e};this.show({template:{type:"confirm",title:i,description:s,buttons:[{text:this.hot.getTranslatedPhrase(vk),type:"secondary",callback:(...r)=>o?.(...r)},{text:this.hot.getTranslatedPhrase(xC),type:"primary",callback:(...r)=>t?.(...r)}]},contentBackground:!0,background:"semi-transparent",animation:!0,closable:!1})}focus(){_o(this,Co).focusDialog()}destroy(){_o(this,Co)?.destroyDialog(),us(this,Co,null),us(this,fc,!1),us(this,Wl,null),super.destroy()}constructor(...e){super(...e),Pg(this,a$),Pg(this,l$),Pg(this,h$),Pg(this,c$),Pg(this,d$),JR(this,Co,{writable:!0,value:void 0}),JR(this,fc,{writable:!0,value:void 0}),JR(this,Wl,{writable:!0,value:void 0}),us(this,Co,null),us(this,fc,!1),us(this,Wl,null)}}function SCe(){const n=this.hot.getShortcutManager(),e=n.getContext(ky)??n.addContext(ky);e.addShortcut({keys:[["Escape"]],callback:()=>{this.hide()},runOnlyIf:()=>_o(this,fc)&&this.getSetting("closable"),group:N0}),e.addShortcut({keys:[["Shift","Tab"],["Tab"]],preventDefault:!1,callback:t=>{this.hot._registerTimeout(()=>{t.shiftKey?this.hot.runHooks("dialogFocusPreviousElement"):this.hot.runHooks("dialogFocusNextElement")})},group:N0})}function vCe(){this.hot.getShortcutManager().getContext(ky).removeShortcutsByGroup(N0)}function RCe(){this.hot.getFocusScopeManager().registerScope(ih,_o(this,Co).getContainer(),{shortcutsContextName:ky,type:"modal",runOnlyIf:()=>this.isVisible(),onActivate:n=>{const e=this.hot.isListening(),t=_o(this,Co).getFocusableElements();t.length>0?n==="tab_from_above"?t.at(0).focus():n==="tab_from_below"&&t.at(-1).focus():n!=="tab_from_above"&&n!=="tab_from_below"&&e&&!_o(this,Co).getContainer().contains(this.hot.rootDocument.activeElement)&&_o(this,Co).getContainer().focus(),e&&this.hot.runHooks("afterDialogFocus",n==="unknown"?"show":n)}})}function ECe(){this.hot.getFocusScopeManager().unregisterScope(ih)}function kCe(){const{view:n,rootWrapperElement:e,rootWindow:t}=this.hot,o=n.isHorizontallyScrollableByWindow()?n.getTotalTableWidth():n.getWorkspaceWidth();_o(this,Co).updateWidth(o);const i=e.querySelector(".hot-display-license-info");if(i){const s=i.offsetHeight,r=Number.parseFloat(t.getComputedStyle(i).marginTop);_o(this,Co).updateHeight(s+r)}}function TCe({id:n,icon:e,title:t,description:o}){return`
|
|
316
|
+
<div class="${Qi}__content">
|
|
317
|
+
<i class="${Qi}__icon">${e}</i>
|
|
318
|
+
<div class="${Qi}__text">
|
|
319
|
+
<h2 id="${n}-${Pu}-title" class="${Qi}__title">${t}</h2>
|
|
320
|
+
${o?`<p id="${n}-${Pu}-description" class="${Qi}__description">${o}</p>`:""}
|
|
321
|
+
</div>
|
|
322
|
+
</div>
|
|
323
|
+
`}function YY(n,e){if(e.has(n))throw new TypeError("Cannot initialize the same private elements twice on an object")}function xCe(n,e){return e.get?e.get.call(n):e.value}function MCe(n,e,t){if(e.set)e.set.call(n,t);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=t}}function GY(n,e,t){if(!e.has(n))throw new TypeError("attempted to "+t+" private field on non-instance");return e.get(n)}function Yi(n,e){var t=GY(n,e,"get");return xCe(n,t)}function ICe(n,e,t){YY(n,e),e.set(n,t)}function eE(n,e,t){var o=GY(n,e,"set");return MCe(n,o,t),t}function HCe(n,e,t){if(!e.has(n))throw new TypeError("attempted to get private field on non-instance");return t}function ACe(n,e){YY(n,e),e.add(n)}const Pu="loading",OCe=350;var Io=new WeakMap,u$=new WeakSet;class DCe extends rt{static get PLUGIN_KEY(){return Pu}static get PLUGIN_PRIORITY(){return OCe}static get DEFAULT_SETTINGS(){return{icon:`<svg class="${Qi}__icon-svg" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 16 16"><path stroke="currentColor" stroke-width="2" d="M15 8a7 7 0 1 1-3.5-6.062"></path></svg>`,title:void 0,description:""}}static get SETTINGS_VALIDATORS(){return{icon:e=>typeof e=="string",title:e=>typeof e=="string",description:e=>typeof e=="string"}}isEnabled(){return!!this.hot.getSettings()[Pu]}enablePlugin(){this.enabled||(Yi(this,Io)===null&&(eE(this,Io,this.hot.getPlugin("dialog")),Yi(this,Io)?.isEnabled()||(this.hot.getSettings().dialog=!0),this.hot.addHook("afterDialogFocus",()=>HCe(this,u$,NCe).call(this))),super.enablePlugin())}updatePlugin(){this.disablePlugin(),this.enablePlugin(),super.updatePlugin()}disablePlugin(){this.hide(),super.disablePlugin()}isVisible(){return Yi(this,Io)?.isVisible()??!1}show(e={}){if(!this.isEnabled()||!Yi(this,Io)||!Yi(this,Io)?.isEnabled())return;if(this.isVisible()){this.update(e);return}this.hot.runHooks("beforeLoadingShow")!==!1&&(this.update(e),Yi(this,Io).show(),this.hot.runHooks("afterLoadingShow"))}hide(){!Yi(this,Io)||!Yi(this,Io)?.isEnabled()||!this.isVisible()||this.hot.runHooks("beforeLoadingHide")===!1||(Yi(this,Io).hide(),this.hot.runHooks("afterLoadingHide"))}update(e){if(!this.isEnabled()||!Yi(this,Io)||!Yi(this,Io)?.isEnabled())return;this.updatePluginSettings(e);const t=this.hot.guid,o=this.getSetting("icon"),i=this.getSetting("title")??this.hot.getTranslatedPhrase(XT),s=this.getSetting("description"),r=TCe({id:t,icon:o,title:i,description:s});Yi(this,Io).update({content:r,customClassName:Qi,background:this.hot.countSourceRows()===0?"solid":"semi-transparent",a11y:{role:"alertdialog",ariaLabelledby:`${t}-${Pu}-title`,ariaDescribedby:s?`${t}-${Pu}-description`:void 0}})}destroy(){eE(this,Io,null),super.destroy()}constructor(...e){super(...e),ACe(this,u$),ICe(this,Io,{writable:!0,value:void 0}),eE(this,Io,null)}}function NCe(){Yi(this,Io).focus()}const Yn="ht-notification",qu=["top-start","top-end","bottom-start","bottom-end"],PCe=["info","success","warning","error"];function LCe(n,e){if(e.has(n))throw new TypeError("Cannot initialize the same private elements twice on an object")}function WCe(n,e){return e.get?e.get.call(n):e.value}function $Ce(n,e,t){if(e.set)e.set.call(n,t);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=t}}function jY(n,e,t){if(!e.has(n))throw new TypeError("attempted to "+t+" private field on non-instance");return e.get(n)}function Si(n,e){var t=jY(n,e,"get");return WCe(n,t)}function Lg(n,e,t){LCe(n,e),e.set(n,t)}function Hr(n,e,t){var o=jY(n,e,"set");return $Ce(n,o,t),t}var ru=new WeakMap,Ib=new WeakMap,Wg=new WeakMap,Ha=new WeakMap,$g=new WeakMap;class M_{install(){if(Si(this,Ha))return;const e=Si(this,ru).ownerDocument,t=e.createElement("div");t.className=`${Yn} handsontable`,t.setAttribute("dir",Si(this,Wg)?"rtl":"ltr"),qu.forEach(o=>{const i=e.createElement("div");i.className=`${Yn}__stack ${Yn}__stack--${o}`,i.dataset.htNotificationPosition=o,i.tabIndex=-1,t.appendChild(i),Si(this,$g).set(o,i)}),Si(this,ru).after(t),Hr(this,Ha,t)}getHost(){return Si(this,Ha)}getStack(e){return Si(this,$g).get(e)}setRtl(e){Hr(this,Wg,e),Si(this,Ha)&&Si(this,Ha).setAttribute("dir",e?"rtl":"ltr")}setSanitizer(e){Hr(this,Ib,e)}createToastElement(e,t,o){const i=Si(this,ru).ownerDocument,s=i.createElement("div"),r=e.variant==="error";s.className=`${Yn}__toast ${Yn}__toast--${e.variant}`,s.dataset.htNotificationId=e.id,s.setAttribute("role",r?"alert":"status"),s.setAttribute("aria-live",r?"assertive":"polite"),s.setAttribute("aria-atomic","true"),o&&(s.classList.add(`${Yn}__toast--animate`),s.classList.add(e.position.startsWith("top")?`${Yn}__toast--stack-top`:`${Yn}__toast--stack-bottom`));const a=i.createElement("div");a.className=`${Yn}__toast-inner`;const l=i.createElement("div");l.className=`${Yn}__accent`,l.setAttribute("aria-hidden","true"),a.appendChild(l);const h=i.createElement("div");if(h.className=`${Yn}__body`,e.title){const u=i.createElement("div");u.className=`${Yn}__title`,u.textContent=gr(e.title),h.appendChild(u)}const c=i.createElement("div");if(c.className=`${Yn}__message`,typeof e.message=="string"?Qc(c,e.message,Si(this,Ib)):c.appendChild(e.message),h.appendChild(c),e.actions?.length){const u=i.createElement("div");u.className=`${Yn}__actions`,e.actions.forEach((f,p)=>{const C=i.createElement("button");C.type="button",C.className=`ht-button ht-button--${f.type==="primary"?"primary":"secondary"}`,C.textContent=gr(f.label),C.dataset.htNotificationAction=String(p),u.appendChild(C)}),h.appendChild(u)}if(a.appendChild(h),e.closable){const u=i.createElement("button");u.type="button",u.className=`${Yn}__close`,u.setAttribute("aria-label",t),a.appendChild(u)}s.appendChild(a),s.tabIndex=-1,a.querySelectorAll("button").forEach(u=>{u.tabIndex=-1});const d=Si(this,ru).ownerDocument.defaultView;return o?d.requestAnimationFrame(()=>{d.requestAnimationFrame(()=>{s.classList.add(`${Yn}__toast--visible`)})}):s.classList.add(`${Yn}__toast--visible`),{element:s}}static getFocusables(e){const t=Array.from(e.querySelectorAll("button")).filter(o=>!o.disabled);return t.length>0?t:[e]}static setSequentialFocusWithinHost(e,t){if(!e)return;const o=t?0:-1;e.querySelectorAll(`.${Yn}__toast`).forEach(i=>{const s=Array.from(i.querySelectorAll("button")).filter(r=>!r.disabled);s.forEach(r=>{r.tabIndex=o}),s.length===0?i.tabIndex=o:i.tabIndex=-1})}destroy(){Si(this,Ha)?.remove(),Hr(this,Ha,null),Si(this,$g).clear()}constructor({rootElement:e,sanitizer:t,isRtl:o}){Lg(this,ru,{writable:!0,value:void 0}),Lg(this,Ib,{writable:!0,value:void 0}),Lg(this,Wg,{writable:!0,value:void 0}),Lg(this,Ha,{writable:!0,value:void 0}),Lg(this,$g,{writable:!0,value:void 0}),Hr(this,Wg,!1),Hr(this,Ha,null),Hr(this,$g,new Map),Hr(this,ru,e),Hr(this,Ib,t),Hr(this,Wg,o)}}function qY(n,e){if(e.has(n))throw new TypeError("Cannot initialize the same private elements twice on an object")}function FCe(n,e){return e.get?e.get.call(n):e.value}function BCe(n,e,t){if(e.set)e.set.call(n,t);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=t}}function KY(n,e,t){if(!e.has(n))throw new TypeError("attempted to "+t+" private field on non-instance");return e.get(n)}function we(n,e){var t=KY(n,e,"get");return FCe(n,t)}function qs(n,e,t){qY(n,e),e.set(n,t)}function ct(n,e,t){var o=KY(n,e,"set");return BCe(n,o,t),t}function ve(n,e,t){if(!e.has(n))throw new TypeError("attempted to get private field on non-instance");return t}function lt(n,e){qY(n,e),e.add(n)}const Qo="notification",VCe=375,xy=`plugin:${Qo}`,XY=`plugin:${Qo}:global`,Mc=Qo,zCe=new Set(qu),UCe=new Set(PCe),ZY=200;var $t=new WeakMap,Pn=new WeakMap,Ya=new WeakMap,Rs=new WeakMap,Qa=new WeakMap,Vp=new WeakMap,rf=new WeakMap,Xc=new WeakMap,nc=new WeakMap,tE=new WeakSet,f$=new WeakSet,nE=new WeakMap,g$=new WeakSet,P0=new WeakSet,L0=new WeakSet,QY=new WeakSet,JY=new WeakSet,km=new WeakSet,I_=new WeakSet,e6=new WeakSet,XM=new WeakSet,ZM=new WeakSet,W0=new WeakSet,p$=new WeakSet,m$=new WeakSet,oE=new WeakSet,iE=new WeakMap,QM=new WeakSet,t6=new WeakSet,JM=new WeakSet,n6=new WeakSet,o6=new WeakSet,i6=new WeakSet,sE=new WeakSet,w$=new WeakSet,s6=new WeakSet,eI=new WeakSet,$0=new WeakSet,r6=new WeakSet,a6=new WeakSet,l6=new WeakSet,h6=new WeakSet,b$=new WeakSet,C$=new WeakSet,y$=new WeakSet,Tm=new WeakSet,c6=new WeakSet,F0=new WeakSet;class YCe extends rt{static get PLUGIN_KEY(){return Qo}static get PLUGIN_PRIORITY(){return VCe}static get DEFAULT_SETTINGS(){return{stackLimit:10,animation:!0}}static get SETTINGS_VALIDATORS(){return{stackLimit:e=>typeof e=="number"&&e>0&&Number.isInteger(e),animation:e=>typeof e=="boolean"}}isEnabled(){return!!this.hot.getSettings()[Qo]}enablePlugin(){this.enabled||(we(this,$t)||ct(this,$t,new M_({rootElement:this.hot.rootGridElement,sanitizer:this.hot.getSettings().sanitizer,isRtl:this.hot.isRtl()})),we(this,$t).install(),ve(this,p$,ZCe).call(this),ve(this,m$,QCe).call(this),this.eventManager.addEventListener(this.hot.rootDocument,"focusin",we(this,iE),!0),this.addHook("afterUpdateSettings",we(this,nE)),this.eventManager.addEventListener(this.hot.rootDocument,"visibilitychange",()=>{ve(this,F0,b6).call(this)&&ve(this,Tm,A_).call(this)}),super.enablePlugin(),ct(this,nc,ve(this,tE,_$).call(this)))}updatePlugin(e){const t=ve(this,tE,_$).call(this);if(e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,Qo)&&we(this,nc)!==null&&ve(this,f$,GCe).call(this,we(this,nc),t)){super.updatePlugin();return}this.disablePlugin(),this.enablePlugin(),super.updatePlugin()}disablePlugin(){this.hideAll(),ve(this,oE,v$).call(this),ve(this,sE,R$).call(this),super.disablePlugin(),we(this,$t)?.destroy(),ct(this,$t,null),ct(this,Rs,null),ct(this,Qa,!1),ct(this,nc,null)}showMessage(e){if(!this.enabled)return"";const t=ve(this,g$,jCe).call(this,e);if(this.hot.runHooks("beforeNotificationShow",t)===!1)return"";const o=this.getSetting("stackLimit");return ve(this,P0,d6).call(this,t.position)>=o?(we(this,Ya)[t.position].push(t),t.id):(ve(this,L0,u6).call(this,t),t.id)}hide(e){if(!this.enabled||!e)return;const t=we(this,Pn).get(e);if(!t){ve(this,y$,dye).call(this,e);return}if(this.hot.runHooks("beforeNotificationHide",e)===!1){t.durationMs>0&&t.remainingMs<=0&&(t.remainingMs=t.durationMs);return}const i=this.hot.rootDocument.activeElement,s=i instanceof this.hot.rootWindow.HTMLElement&&t.element.contains(i);ve(this,w$,oye).call(this,t,!0),this.hot.runHooks("afterNotificationHide",e),ve(this,C$,cye).call(this,t.options.position),ve(this,b$,hye).call(this,s)}hideAll(){if(!this.enabled)return;qu.forEach(t=>{we(this,Ya)[t].length=0}),[...we(this,Pn).keys()].forEach(t=>this.hide(t))}isVisible(e){return e===void 0?we(this,Pn).size>0:we(this,Pn).has(e)}getQueueSize(){return qu.reduce((e,t)=>e+we(this,Ya)[t].length,0)}destroy(){qu.forEach(e=>{we(this,Ya)[e].length=0}),we(this,Pn).clear(),ve(this,oE,v$).call(this),ve(this,sE,R$).call(this),we(this,$t)?.destroy(),ct(this,$t,null),ct(this,Rs,null),ct(this,Qa,!1),ct(this,nc,null),super.destroy()}constructor(...e){super(...e),lt(this,tE),lt(this,f$),lt(this,g$),lt(this,P0),lt(this,L0),lt(this,QY),lt(this,JY),lt(this,km),lt(this,I_),lt(this,e6),lt(this,XM),lt(this,ZM),lt(this,W0),lt(this,p$),lt(this,m$),lt(this,oE),lt(this,QM),lt(this,t6),lt(this,JM),lt(this,n6),lt(this,o6),lt(this,i6),lt(this,sE),lt(this,w$),lt(this,s6),lt(this,eI),lt(this,$0),lt(this,r6),lt(this,a6),lt(this,l6),lt(this,h6),lt(this,b$),lt(this,C$),lt(this,y$),lt(this,Tm),lt(this,c6),lt(this,F0),qs(this,$t,{writable:!0,value:void 0}),qs(this,Pn,{writable:!0,value:void 0}),qs(this,Ya,{writable:!0,value:void 0}),qs(this,Rs,{writable:!0,value:void 0}),qs(this,Qa,{writable:!0,value:void 0}),qs(this,Vp,{writable:!0,value:void 0}),qs(this,rf,{writable:!0,value:void 0}),qs(this,Xc,{writable:!0,value:void 0}),qs(this,nc,{writable:!0,value:void 0}),qs(this,nE,{writable:!0,value:void 0}),qs(this,iE,{writable:!0,value:void 0}),ct(this,$t,null),ct(this,Pn,new Map),ct(this,Ya,{"top-start":[],"top-end":[],"bottom-start":[],"bottom-end":[]}),ct(this,Rs,null),ct(this,Qa,!1),ct(this,Vp,!1),ct(this,rf,!1),ct(this,Xc,!1),ct(this,nc,null),ct(this,nE,()=>{if(!this.enabled||!we(this,$t))return;const o=this.hot.rootElement.getAttribute("dir");o==="rtl"||o==="ltr"?we(this,$t).setRtl(o==="rtl"):we(this,$t).setRtl(this.hot.isRtl()),we(this,$t).setSanitizer(this.hot.getSettings().sanitizer)}),ct(this,iE,t=>{if(we(this,Pn).size===0)return;const o=we(this,$t)?.getHost(),i=t.target;if(!(!(i instanceof this.hot.rootWindow.HTMLElement)||!o)){if(o.contains(i)){if(we(this,Rs)!==null)return;const s=t.relatedTarget;s instanceof this.hot.rootWindow.HTMLElement&&this.hot.rootWrapperElement.contains(s)&&!o.contains(s)&&ct(this,Rs,s);return}ve(this,km,H_).call(this)}})}}function _$(){return{stackLimit:this.getSetting("stackLimit"),animation:this.getSetting("animation")}}function GCe(n,e){return n.stackLimit===e.stackLimit&&n.animation===e.animation}function jCe(n){(!ne(n)||typeof n.message!="string"&&!(typeof HTMLElement<"u"&&n.message instanceof HTMLElement))&&U("Notification.showMessage expects an object with a `message` string or HTMLElement.");const e=`htn-${V0()}`,t=UCe.has(n.variant)?n.variant:"info",o=zCe.has(n.position)?n.position:"bottom-end",i=typeof n.duration=="number"&&n.duration>=0?n.duration:4e3,s=typeof n.closable=="boolean"?n.closable:!0,r=Array.isArray(n.actions)?n.actions.map(a=>{(!ne(a)||typeof a.label!="string"||typeof a.callback!="function")&&U("Each notification action needs `label` (string) and `callback` (function).");const l=a.type==="primary"?"primary":"secondary";return{label:a.label,type:l,callback:a.callback}}):[];return{id:e,variant:t,title:typeof n.title=="string"?n.title:void 0,message:n.message,duration:i,position:o,closable:s,actions:r}}function d6(n){let e=0;return we(this,Pn).forEach(t=>{t.options.position===n&&(e+=1)}),e}function u6(n){const e=this.hot.getTranslatedPhrase(ZT),t=this.getSetting("animation"),{element:o}=we(this,$t).createToastElement(n,e,t),i=we(this,$t).getStack(n.position);i||U(`Unknown notification position "${n.position}".`),n.position.startsWith("top")?i.prepend(o):i.appendChild(o),n.position.startsWith("bottom")&&this.hot.rootWindow.requestAnimationFrame(()=>{this.enabled&&(i.scrollTop=i.scrollHeight)});const s=n.duration,r={id:n.id,options:n,element:o,durationMs:s,remainingMs:s,paused:!1};we(this,Pn).set(n.id,r),ve(this,QY,qCe).call(this,r),we(this,Qa)&&ve(this,I_,tI).call(this),this.hot.runHooks("afterNotificationShow",n.id,n),s>0&&ve(this,Tm,A_).call(this)}function qCe(n){n.toastEventDisposers=[this.eventManager.addEventListener(n.element,"click",e=>ve(this,JY,KCe).call(this,e,n)),this.eventManager.addEventListener(n.element,"mouseenter",()=>{n.paused=!0}),this.eventManager.addEventListener(n.element,"mouseleave",()=>{n.paused=!1,n.durationMs>0&&!this.hot.rootDocument.hidden&&ve(this,Tm,A_).call(this)})]}function KCe(n,e){const t=n.target;if(!(t instanceof this.hot.rootWindow.HTMLElement))return;if(t.closest(`.${Yn}__close`)){this.hide(e.id);return}const o=t.closest("[data-ht-notification-action]");if(!o||!e.element.contains(o))return;const i=Number.parseInt(o.dataset.htNotificationAction,10),s=e.options.actions[i];s&&s.callback()}function H_(){const n=we(this,$t)?.getHost();n&&M_.setSequentialFocusWithinHost(n,!1),ct(this,Qa,!1)}function tI(){const n=we(this,$t)?.getHost();!n||we(this,Pn).size===0||(M_.setSequentialFocusWithinHost(n,!0),ct(this,Qa,!0))}function XCe(){const n=we(this,$t)?.getHost();if(!n||we(this,Pn).size===0)return;const t=this.hot.rootDocument.activeElement;t instanceof this.hot.rootWindow.HTMLElement&&!n.contains(t)&&ct(this,Rs,t),this.hot.listen(),this.hot.getFocusScopeManager().activateScope(Qo)}function f6(){const n=this.hot.getFocusScopeManager();n.getActiveScopeId()!==mh&&n.activateScope(mh)}function g6(){const n=this.hot.getFocusScopeManager();if(ct(this,Xc,!0),n.getActiveScopeId()===Qo)n.deactivateScope(Qo);else{ct(this,Xc,!1),ve(this,km,H_).call(this);const e=we(this,Rs);ct(this,Rs,null),e?.isConnected&&this.hot.getFocusManager().focusElement(e,{preventScroll:!0}),ve(this,XM,f6).call(this)}}function S$(){const n=this.hot.rootDocument;we(this,$t)?.getHost()?.contains(n.activeElement)&&ve(this,ZM,g6).call(this)}function ZCe(){we(this,rf)||(this.hot.getFocusScopeManager().registerScope(Qo,we(this,$t).getHost(),{shortcutsContextName:xy,runOnlyIf:()=>we(this,Pn).size>0,enableFocusCatchers:!1,onActivate:()=>{we(this,$t)?.getHost()&&(ve(this,I_,tI).call(this),ve(this,r6,sye).call(this))},onDeactivate:()=>{if(ve(this,km,H_).call(this),we(this,Xc)){ct(this,Xc,!1);const e=we(this,Rs);ct(this,Rs,null),e?.isConnected&&this.hot.getFocusManager().focusElement(e,{preventScroll:!0}),ve(this,XM,f6).call(this)}}}),ct(this,rf,!0))}function QCe(){const n=this.hot.getShortcutManager(),e=n.getContext(xy)??n.addContext(xy),t=n.getOrCreateContext(XY,"global"),o=n.getContext(mh),i={keys:[["f6"]],preventDefault:!0,callback:()=>{ve(this,e6,XCe).call(this)},runOnlyIf:()=>ve(this,l6,aye).call(this),group:Mc};t.addShortcut(i),o&&o.addShortcut(i),e.addShortcut({keys:[["Escape"]],callback:()=>ve(this,W0,S$).call(this),runOnlyIf:()=>we(this,$t)?.getHost()?.contains(this.hot.rootDocument.activeElement)===!0,group:Mc}),e.addShortcut({keys:[["Tab"]],preventDefault:!0,callback:()=>ve(this,i6,nye).call(this),runOnlyIf:()=>ve(this,n6,eye).call(this),group:Mc}),e.addShortcut({keys:[["Shift","Tab"]],preventDefault:!0,callback:()=>ve(this,W0,S$).call(this),runOnlyIf:()=>ve(this,o6,tye).call(this),group:Mc})}function v$(){const n=this.hot.getShortcutManager();n.getContext(xy)?.removeShortcutsByGroup(Mc),n.getContext(XY)?.removeShortcutsByGroup(Mc),n.getContext(mh)?.removeShortcutsByGroup(Mc)}function p6(){const n=we(this,$t)?.getHost();if(!n)return[];const e=[...n.querySelectorAll(`.${Yn}__toast`)],t=[];for(let o=0;o<e.length;o+=1)t.push(...M_.getFocusables(e[o]));return t}function JCe(){return ve(this,QM,p6).call(this)[0]}function m6(){if(we(this,Pn).size===0)return null;const n=this.hot.rootDocument.activeElement,e=we(this,$t)?.getHost();if(!(n instanceof this.hot.rootWindow.HTMLElement)||!e?.contains(n))return null;const t=ve(this,QM,p6).call(this);if(t.length===0)return null;const o=t.indexOf(n);return o===-1?null:(we(this,Qa)||ve(this,I_,tI).call(this),{list:t,idx:o})}function eye(){const n=ve(this,JM,m6).call(this);return n!==null&&n.idx===n.list.length-1}function tye(){const n=ve(this,JM,m6).call(this);return n!==null&&n.idx===0}function nye(){const n=this.hot.getFocusScopeManager();ct(this,Xc,!1),n.getActiveScopeId()===Qo?n.deactivateScope(Qo):ve(this,km,H_).call(this),this.hot.listen(),n.activateScope(mh,zr.TAB_FROM_ABOVE),ct(this,Rs,null)}function R$(){we(this,rf)&&(this.hot.getFocusScopeManager().unregisterScope(Qo),ct(this,rf,!1))}function oye(n,e){n.toastEventDisposers&&(n.toastEventDisposers.forEach(t=>t()),n.toastEventDisposers=null),we(this,Pn).delete(n.id),e&&n.element.remove()}function iye(n){const e=we(this,$t)?.getHost();return e?n instanceof this.hot.rootWindow.HTMLElement&&e.contains(n):!1}function w6(n){let e=!1;return we(this,Pn).forEach(t=>{t.element.contains(n)&&(e=!0)}),e}function E$(){this.hot.listen();const n=this.hot.getFocusScopeManager();n.getActiveScopeId()===Qo&&n.deactivateScope(Qo),n.activateScope(Qo)}function sye(){const n=this.hot.rootDocument;if(!this.enabled||we(this,Pn).size===0||ve(this,eI,w6).call(this,n.activeElement))return;const e=ve(this,t6,JCe).call(this);e&&this.hot.getFocusManager().focusElement(e)}function rye(n){if(!(n instanceof this.hot.rootWindow.HTMLElement))return!1;const e=n.closest(".ht-root-wrapper");return e!==null?e===this.hot.rootWrapperElement:this.hot.rootDocument.querySelectorAll(".ht-root-wrapper").length<=1}function aye(){if(!this.enabled||we(this,Pn).size===0)return!1;const n=we(this,$t)?.getHost();if(!n)return!1;const e=this.hot.rootDocument.activeElement;return e instanceof this.hot.rootWindow.HTMLElement&&n.contains(e)?!1:ve(this,a6,rye).call(this,e)}function lye(){ve(this,ZM,g6).call(this)}function hye(n=!1){const e=this.hot.rootDocument,t=we(this,$t)?.getHost(),o=e.activeElement;if(we(this,Pn).size>0){const a=o instanceof this.hot.rootWindow.HTMLElement&&t?.contains(o)===!0;a&&!ve(this,eI,w6).call(this,o)?ve(this,$0,E$).call(this):!a&&n&&ve(this,$0,E$).call(this);return}const i=we(this,Qa),s=ve(this,s6,iye).call(this,e.activeElement);(i||n||s)&&ve(this,h6,lye).call(this)}function cye(n){const e=this.getSetting("stackLimit");for(;we(this,Ya)[n].length>0&&ve(this,P0,d6).call(this,n)<e;){const t=we(this,Ya)[n].shift();ve(this,L0,u6).call(this,t)}}function dye(n){qu.forEach(e=>{const t=we(this,Ya)[e],o=t.findIndex(i=>i.id===n);o>=0&&t.splice(o,1)})}function A_(){we(this,Vp)||!this.enabled||(ct(this,Vp,!0),this.hot._registerTimeout(()=>{ct(this,Vp,!1),this.enabled&&(ve(this,c6,uye).call(this),ve(this,F0,b6).call(this)&&ve(this,Tm,A_).call(this))},ZY))}function uye(){const e=!this.hot.rootDocument.hidden,t=[];we(this,Pn).forEach(o=>{o.durationMs<=0||o.paused||!e||(o.remainingMs-=ZY,o.remainingMs<=0&&t.push(o.id))}),t.forEach(o=>this.hide(o))}function b6(){if(this.hot.rootDocument.hidden)return!1;let e=!1;return we(this,Pn).forEach(t=>{t.durationMs>0&&!t.paused&&(e=!0)}),e}function fye(n,e){if(e.has(n))throw new TypeError("Cannot initialize the same private elements twice on an object")}function gye(n,e){return e.get?e.get.call(n):e.value}function pye(n,e,t){if(e.set)e.set.call(n,t);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=t}}function C6(n,e,t){if(!e.has(n))throw new TypeError("attempted to "+t+" private field on non-instance");return e.get(n)}function to(n,e){var t=C6(n,e,"get");return gye(n,t)}function Hb(n,e,t){fye(n,e),e.set(n,t)}function $l(n,e,t){var o=C6(n,e,"set");return pye(n,o,t),t}const vo="ht-empty-data-state",mye=150,wye=`<div data-ref="emptyDataStateElement" class="${vo} handsontable">
|
|
324
|
+
<div class="${vo}__content-wrapper">
|
|
325
|
+
<div data-ref="emptyDataStateInner" class="${vo}__content-wrapper-inner"></div>
|
|
326
|
+
</div>
|
|
327
|
+
</div>`,bye=({title:n,description:e,buttons:t},o=!1)=>`
|
|
328
|
+
${o?`<div class="${vo}__spinner" aria-hidden="true"></div>`:""}
|
|
329
|
+
<div class="${vo}__content">
|
|
330
|
+
${n?`<h2 class="${vo}__title">${gr(n)}</h2>`:""}
|
|
331
|
+
${e?`<p class="${vo}__description">${gr(e)}</p>`:""}
|
|
332
|
+
</div>
|
|
333
|
+
<div
|
|
334
|
+
data-ref="emptyDataStateButtons"
|
|
335
|
+
class="${vo}__buttons${t?.length>0?` ${vo}__buttons--has-buttons`:""}"
|
|
336
|
+
>${!o&&t?.length>0?t.map(s=>`<button class="ht-button ht-button--${s.type}">${gr(s.text)}</button>`).join(""):""}</div>`;function Cye(n,e,t,o,i){if(t!==0){i.element?.remove(),i.element=null;return}i.element||(i.element=n.createElement("div"),i.element.classList.add(`${o}-placeholder`),e._wt.wtTable.holder.appendChild(i.element)),i.element.style.width="100%",i.element.style.height=`${mye}px`}function yye(n,e,t){let o=n.getWorkspaceWidth();return n.isHorizontallyScrollableByWindow()?e>0?o=n.getTotalTableWidth():t&&(o=n.getViewportWidth()):n.getTableWidth()-n.getRowHeaderWidth()<n.getViewportWidth()&&e>0&&(o=n.getTableWidth()),o}function _ye(n,e,t,o){let i=n.getTableHeight();return n.isVerticallyScrollableByWindow()||n.hasVerticalScroll()?e>0?i=n.hot.getTableHeight()-n.getColumnHeaderHeight():i=n.hot.getTableHeight():t>0&&e>0?i=n.getViewportHeight()-o:t>0&&e===0&&(i=n.getWorkspaceHeight()-o),i}var rE=new WeakMap,aE=new WeakMap,mo=new WeakMap,oc=new WeakMap;class Sye{install(){if(to(this,mo)?.emptyDataStateElement)return;const e=Bc`${wye}`;$l(this,mo,e.refs);const{emptyDataStateInner:t,emptyDataStateElement:o}=to(this,mo);fe(t,[wr(-1)]),fe(o,[wr(-1)]),to(this,rE).after(e.fragment)}getElement(){return to(this,mo)?.emptyDataStateElement}getFocusableElements(){const{emptyDataStateButtons:e,emptyDataStateInner:t}=to(this,mo),o=Array.from(e?.children);return o.length===0?[t]:o}show(){to(this,mo)?.emptyDataStateElement&&(to(this,mo).emptyDataStateElement.style.display="block")}hide(){to(this,mo)?.emptyDataStateElement&&(to(this,oc)?.remove(),$l(this,oc,null),to(this,mo).emptyDataStateElement.style.display="none")}updateContent(e,t=!1){const{emptyDataStateElement:o,emptyDataStateInner:i}=to(this,mo);let s="";typeof e=="string"?s={title:e}:s={title:e?.title,description:e?.description,buttons:e?.buttons};const r=Bc`${bye(s,t)}`;t?(B(o,`${vo}--loading`),fe(i,[BI()])):(oe(o,`${vo}--loading`),Zr(i,BI()[0])),$l(this,mo,{...to(this,mo),...r.refs}),i.innerHTML="",i.appendChild(r.fragment),!t&&s.buttons?.length>0&&Array.from(to(this,mo).emptyDataStateButtons.children).forEach((a,l)=>{a.addEventListener("click",s.buttons[l].callback)})}updateClassNames(e){const{emptyDataStateElement:t}=to(this,mo);e.countRenderableColumns()>0&&e.getColumnHeadersCount()>0?B(t,`${vo}--disable-top-border`):oe(t,`${vo}--disable-top-border`),e.countRenderableRows()>0&&e.getRowHeadersCount()>0?B(t,`${vo}--disable-inline-border`):oe(t,`${vo}--disable-inline-border`),e.hasHorizontalScroll()&&!e.isHorizontallyScrollableByWindow()?B(t,`${vo}--disable-bottom-border`):oe(t,`${vo}--disable-bottom-border`)}updateSize(e,t=!1){const{emptyDataStateElement:o}=to(this,mo),i=e.hasHorizontalScroll()?xn(e.hot.rootDocument):0,s=e.countRenderableRows(),r=e.countRenderableColumns(),a=e.getColumnHeadersCount(),l=t===!0&&r>0,h=s>0||l;o.style.top=r>0?`${e.getColumnHeaderHeight()}px`:"0px",o.style.insetInlineStart="0px";const c={element:to(this,oc)};Cye(to(this,aE),e,s,vo,c),$l(this,oc,c.element);const d=yye(e,r,h),u=_ye(e,r,a,i);o.style.width=`${d}px`,o.style.height=`${u}px`}destroy(){to(this,mo)?.emptyDataStateElement?.remove(),to(this,oc)?.remove(),$l(this,oc,null),$l(this,mo,null)}constructor({rootElement:e,rootDocument:t}){Hb(this,rE,{writable:!0,value:void 0}),Hb(this,aE,{writable:!0,value:void 0}),Hb(this,mo,{writable:!0,value:void 0}),Hb(this,oc,{writable:!0,value:void 0}),$l(this,rE,e),$l(this,aE,t),this.install()}}function y6(n,e){if(e.has(n))throw new TypeError("Cannot initialize the same private elements twice on an object")}function vye(n,e){return e.get?e.get.call(n):e.value}function Rye(n,e,t){if(e.set)e.set.call(n,t);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=t}}function _6(n,e,t){if(!e.has(n))throw new TypeError("attempted to "+t+" private field on non-instance");return e.get(n)}function It(n,e){var t=_6(n,e,"get");return vye(n,t)}function au(n,e,t){y6(n,e),e.set(n,t)}function ln(n,e,t){var o=_6(n,e,"set");return Rye(n,o,t),t}function Nt(n,e,t){if(!e.has(n))throw new TypeError("attempted to get private field on non-instance");return t}function Po(n,e){y6(n,e),e.add(n)}const Zc="emptyDataState",Eye=370,zp=Object.freeze({UNKNOWN:"unknown",FILTERS:"filters",LOADING:"loading"}),kye=`plugin:${Zc}`;var Ja=new WeakMap,Nn=new WeakMap,Wc=new WeakMap,Up=new WeakMap,$c=new WeakMap,fr=new WeakMap,k$=new WeakSet,T$=new WeakSet,x$=new WeakSet,lE=new WeakSet,M$=new WeakSet,I$=new WeakSet,H$=new WeakSet,mC=new WeakSet,Ic=new WeakSet,B0=new WeakSet,xm=new WeakSet,nI=new WeakSet,S6=new WeakSet,A$=new WeakSet,O$=new WeakSet,D$=new WeakSet;class Tye extends rt{static get PLUGIN_KEY(){return Zc}static get PLUGIN_PRIORITY(){return Eye}static get DEFAULT_SETTINGS(){return{message:void 0}}static get SETTINGS_VALIDATORS(){return{message:e=>typeof e=="string"||typeof e=="function"||ne(e)&&(typeof e?.title>"u"||typeof e?.title=="string")&&(typeof e?.description>"u"||typeof e?.description=="string")&&(typeof e?.buttons>"u"||Array.isArray(e?.buttons)&&e?.buttons.every(t=>typeof t=="object"&&typeof t.text=="string"&&typeof t.type=="string"&&["primary","secondary"].includes(t.type)&&typeof t.callback=="function"))||e===void 0}}isEnabled(){return!!this.hot.getSettings()[Zc]}enablePlugin(){this.enabled||(It(this,Nn)||(ln(this,Nn,new Sye({rootElement:this.hot.rootGridElement,rootDocument:this.hot.rootDocument})),Nt(this,I$,Aye).call(this),Nt(this,k$,xye).call(this),Nt(this,T$,Mye).call(this)),this.addHook("afterInit",()=>Nt(this,A$,Nye).call(this)),this.addHook("afterRender",()=>Nt(this,O$,Pye).call(this)),this.addHook("afterRowSequenceCacheUpdate",()=>{Nt(this,Ic,Ku).call(this)}),this.addHook("afterColumnSequenceCacheUpdate",()=>{Nt(this,Ic,Ku).call(this)}),this.addHook("beforeFilter",e=>Nt(this,D$,Lye).call(this,e)),this.addHook("beforeDataProviderFetch",e=>{e.skipLoading||Nt(this,x$,Iye).call(this)}),this.addHook("afterDataProviderFetch",()=>Nt(this,lE,N$).call(this)),this.addHook("afterDataProviderFetchError",()=>Nt(this,lE,N$).call(this)),super.enablePlugin(),Nt(this,Ic,Ku).call(this))}updatePlugin(){this.disablePlugin(),this.enablePlugin(),Nt(this,xm,O_).call(this),this.isVisible()&&It(this,Nn).show(),super.updatePlugin()}disablePlugin(){ln(this,fr,!1),Nt(this,H$,Oye).call(this),Nt(this,M$,Hye).call(this),It(this,Nn).destroy(),ln(this,Nn,null),super.disablePlugin()}isVisible(){return It(this,Ja)}destroy(){ln(this,fr,!1),ln(this,Ja,!1),It(this,Nn)?.destroy(),ln(this,Nn,null),ln(this,Wc,null),ln(this,Up,!1),ln(this,$c,null),super.destroy()}constructor(...e){super(...e),Po(this,k$),Po(this,T$),Po(this,x$),Po(this,lE),Po(this,M$),Po(this,I$),Po(this,H$),Po(this,mC),Po(this,Ic),Po(this,B0),Po(this,xm),Po(this,nI),Po(this,S6),Po(this,A$),Po(this,O$),Po(this,D$),au(this,Ja,{writable:!0,value:void 0}),au(this,Nn,{writable:!0,value:void 0}),au(this,Wc,{writable:!0,value:void 0}),au(this,Up,{writable:!0,value:void 0}),au(this,$c,{writable:!0,value:void 0}),au(this,fr,{writable:!0,value:void 0}),ln(this,Ja,!1),ln(this,Nn,null),ln(this,Wc,null),ln(this,Up,!1),ln(this,$c,null),ln(this,fr,!1)}}function xye(){this.eventManager.addEventListener(It(this,Nn).getElement(),"wheel",n=>Nt(this,S6,Dye).call(this,n))}function Mye(){ln(this,Wc,new MutationObserver(()=>{if(!this.hot)return;const n=It(this,Nn).getElement();this.hot.rootGridElement.nextElementSibling!==n&&this.hot.rootGridElement.after(n)})),It(this,Wc).observe(this.hot.rootWrapperElement,{childList:!0})}function Iye(){It(this,fr)||(ln(this,fr,!0),Nt(this,Ic,Ku).call(this))}function N$(){It(this,fr)&&(ln(this,fr,!1),Nt(this,nI,v6).call(this),Nt(this,Ic,Ku).call(this),this.hot.render())}function Hye(){It(this,Wc).disconnect(),ln(this,Wc,null)}function Aye(){this.hot.getFocusScopeManager().registerScope(Zc,It(this,Nn).getElement(),{shortcutsContextName:kye,runOnlyIf:()=>this.isVisible(),onActivate:n=>{const e=It(this,Nn)?.getFocusableElements();e.length>0&&(n==="tab_from_above"?e.at(0).focus():n==="tab_from_below"&&e.at(-1).focus())}})}function Oye(){this.hot.getFocusScopeManager().unregisterScope(Zc)}function hE(n){let e;return typeof this.getSetting("message")=="function"?e=this.getSetting("message")(n):e=this.getSetting("message"),typeof e=="string"&&(e={title:e}),!e?.title&&!e?.description&&!e?.buttons&&(e={},n===zp.FILTERS?(e.title=this.hot.getTranslatedPhrase(tx),e.description=this.hot.getTranslatedPhrase(nx),e.buttons=[{text:this.hot.getTranslatedPhrase(ox),type:"secondary",callback:()=>{const t=this.hot.getPlugin("filters");t&&(t.clearConditions(),t.filter())}}]):n===zp.LOADING?(e.title=this.hot.getTranslatedPhrase(ix),e.description=this.hot.getTranslatedPhrase(sx)):(e.title=this.hot.getTranslatedPhrase(JT),e.description=this.hot.getTranslatedPhrase(ex))),e}function Ku(){if(this.hot.view){if(It(this,fr)){It(this,Ja)?Nt(this,xm,O_).call(this):Nt(this,B0,P$).call(this);return}this.hot.view.countRenderableColumns()===0||this.hot.view.countRenderableRows()===0?Nt(this,B0,P$).call(this):Nt(this,nI,v6).call(this)}}function P$(){It(this,Ja)||(this.hot.runHooks("beforeEmptyDataStateShow"),Nt(this,xm,O_).call(this),It(this,Nn).show(),ln(this,Ja,!0),ln(this,$c,this.hot.selection.exportSelection()),this.hot.getFocusScopeManager().activateScope(Zc),this.hot.runHooks("afterEmptyDataStateShow"))}function O_(){It(this,fr)?It(this,Nn).updateContent(Nt(this,mC,hE).call(this,zp.LOADING),!0):It(this,Up)?It(this,Nn).updateContent(Nt(this,mC,hE).call(this,zp.FILTERS),!1):It(this,Nn).updateContent(Nt(this,mC,hE).call(this,zp.UNKNOWN),!1)}function v6(){It(this,Ja)&&(this.hot.runHooks("beforeEmptyDataStateHide"),It(this,Nn).hide(),ln(this,Ja,!1),this.hot.getFocusScopeManager().deactivateScope(Zc),It(this,$c)?.ranges.length>0?(this.hot.selection.importSelection(It(this,$c)),this.hot.view.render(),ln(this,$c,null)):this.hot.selectCell(0,0,void 0,void 0,!1),this.hot.runHooks("afterEmptyDataStateHide"))}function Dye(n){const e=Number.isNaN(n.deltaX)?-1*n.wheelDeltaX:n.deltaX;e!==0&&this.hot.view.hasHorizontalScroll()&&!this.hot.view.isHorizontallyScrollableByWindow()&&(this.hot.view.setTableScrollPosition({left:this.hot.view.getTableScrollPosition().left+e}),n.preventDefault())}function Nye(){Nt(this,Ic,Ku).call(this),this.hot.render()}function Pye(){It(this,Nn)?.getElement()&&this.isVisible()&&this.hot.view&&(It(this,Nn).updateSize(this.hot.view,It(this,fr)),It(this,Nn).updateClassNames(this.hot.view))}function Lye(n){ln(this,Up,n?.length>0),this.isVisible()&&Nt(this,xm,O_).call(this)}function Wye(){ot(Sp),ot(xie),ot(vp),ot(ose),ot(cse),ot(z2),ot(sre),ot(jre),ot(S_),ot(Kae),ot(wle),ot(uhe),ot(Che),ot(k_),ot(jce),ot(Pue),ot(yfe),ot(qfe),ot(age),ot(yge),ot(Ige),ot(Fge),ot(ope),ot(fpe),ot(Wpe),ot(fme),ot(mme),ot(Kme),ot(Owe),ot(rbe),ot(kbe),ot(Vbe),ot(qbe),ot(nCe),ot(cCe),ot(Ty),ot(DCe),ot(YCe),ot(Tye)}function s_e(){_te(),Jne(),goe(),nie(),Wye()}export{hx as $,Vk as A,uT as B,vk as C,gT as D,Tk as E,xk as F,Uk as G,dT as H,cT as I,Rk as J,MC as K,Kk as L,Ak as M,hT as N,Ik as O,qk as P,Mk as Q,Ek as R,kk as S,fT as T,pT as U,Hk as V,zk as W,Yk as X,dx as Y,ax as Z,rx as _,qT as a,xB as a$,cx as a0,lx as a1,ox as a2,ex as a3,nx as a4,sx as a5,JT as a6,tx as a7,ix as a8,QT as a9,Vy as aA,MT as aB,IT as aC,HT as aD,zy as aE,IC as aF,vV as aG,nX as aH,XT as aI,ZT as aJ,xC as aK,BT as aL,zT as aM,GT as aN,VT as aO,YT as aP,FT as aQ,HC as aR,UT as aS,$T as aT,Fye as aU,$$ as aV,kB as aW,Xn as aX,H6 as aY,Be as aZ,s_e as a_,NT as aa,OT as ab,DT as ac,PT as ad,WT as ae,LT as af,AT as ag,Pm as ah,Lm as ai,yT as aj,Nm as ak,ST as al,mT as am,_T as an,bT as ao,RT as ap,ET as aq,kT as ar,TT as as,$y as at,xT as au,vT as av,wT as aw,CT as ax,Fy as ay,By as az,KT as b,W$ as b0,I6 as b1,Gk as c,Xk as d,oT as e,Qk as f,eT as g,Zk as h,nT as i,Jk as j,tT as k,iT as l,aT as m,lT as n,rT as o,sT as p,Ok as q,Dk as r,Lk as s,Pk as t,Nk as u,Wk as v,jk as w,$k as x,Fk as y,Bk as z};
|